diff --git a/respec-w3c.js b/respec-w3c.js index d9de85e0..f8e69b04 100644 --- a/respec-w3c.js +++ b/respec-w3c.js @@ -1,7 +1,7 @@ -window.respecVersion="26.16.0",function(){"use strict";const e=!!window.require;if(!e){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 t(t,n){e||(window.require.modules[t]=n)}const n=document.documentElement;n&&!n.hasAttribute("lang")&&(n.lang="en",n.hasAttribute("dir")||(n.dir="ltr"));const r={},s=n.lang;var i=Object.freeze({__proto__:null,name:"core/l10n",l10n:r,lang:s,run:function(e){e.l10n=r[s]||r.en}});let o,a;const c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakMap;let f={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return l.get(e);if("objectStoreNames"===t)return e.objectStoreNames||u.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return g(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function h(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(a||(a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(b(this),t),g(c.get(this))}:function(...t){return g(e.apply(b(this),t))}:function(t,...n){const r=e.call(b(this),t,...n);return u.set(r,t.sort?t.sort():[t]),g(r)}}function m(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",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});l.set(e,t)}(e),t=e,(o||(o=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,f):e);var t}function g(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{t(g(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",i)});return t.then(t=>{t instanceof IDBCursor&&c.set(t,e)}).catch(()=>{}),p.set(t,e),t}(e);if(d.has(e))return d.get(e);const t=m(e);return t!==e&&(d.set(e,t),p.set(t,e)),t}const b=e=>p.get(e);const y=["get","getKey","getAll","getAllKeys","count"],w=["put","add","delete","clear"],v=new Map;function k(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,s=w.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!y.includes(n))return;const i=async function(e,...t){const i=this.transaction(e,s?"readwrite":"readonly");let o=i.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),s&&i.done]))[0]};return v.set(t,i),i}f=(e=>({...e,get:(t,n,r)=>k(t,n)||e.get(t,n,r),has:(t,n)=>!!k(t,n)||e.has(t,n)}))(f);var $=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",()=>t()),g(n).then(()=>{})},openDB:function(e,t,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(e,t),a=g(o);return r&&o.addEventListener("upgradeneeded",e=>{r(g(o.result),e.oldVersion,e.newVersion,g(o.transaction))}),n&&o.addEventListener("blocked",()=>n()),a.then(e=>{i&&e.addEventListener("close",()=>i()),s&&e.addEventListener("versionchange",()=>s())}).catch(()=>{}),a},unwrap:b,wrap:g});function x(e,t,n,r,s,{level:i="error",autofix:o,ruleName:a}={}){function c(n){return n>0?e.slice(t,t+n):e.slice(Math.max(t+n,0),t)}function l(n,{precedes:r}={}){const s=n.map(e=>e.trivia+e.value).join(""),i=e[t];return"eof"===i.type?s:r?s+i.trivia:s.slice(i.trivia.length)}const u="eof"!==e[t].type?e[t].line:e.length>1?e[t-1].line:1,d=function(e){const t=e.split("\n");return t[t.length-1]}(l(c(-5),{precedes:!0})),p=c(5),f=l(p),h=d+f.split("\n")[0]+"\n"+(" ".repeat(d.length)+"^"),m="Syntax"===s?"since":"inside",g=`${s} error at line ${u}${e.name?" in "+e.name:""}${n&&n.name?`, ${m} \`${n.partial?"partial ":""}${function(e){const t=[e];for(;e&&e.parent;){const{parent:n}=e;t.unshift(n),e=n}return t.map(e=>function(e,t){let n=e;return t&&(n+=" "+t),n}(e.type,e.name)).join(" -> ")}(n)}\``:""}:\n${h}`;return{message:`${g} ${r}`,bareMessage:r,context:g,line:u,sourceName:e.name,level:i,ruleName:a,autofix:o,input:f,tokens:p}}function _(e,t,n,r){return x(e,t,n,r,"Syntax")}function S(e,t,n,r,s={}){return s.ruleName=n,x(t.source,e.index,t,r,"Validation",s)}class C{constructor({source:e,tokens:t}){Object.defineProperties(this,{source:{value:e},tokens:{value:t,writable:!0},parent:{value:null,writable:!0},this:{value:this}})}toJSON(){const e={type:void 0,name:void 0,inheritance:void 0};let t=this;for(;t!==Object.prototype;){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))(r.enumerable||r.get)&&(e[t]=this[t]);t=Object.getPrototypeOf(t)}return e}}function E(e,t,{useNullableInner:n}={}){if(!e.union){const r=t.unique.get(e.idlType);if(!r)return;if("typedef"===r.type){const{typedefIncludesDictionary:n}=t.cache;if(n.has(r))return n.get(r);t.cache.typedefIncludesDictionary.set(r,void 0);const s=E(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,s),s)return{reference:e,dictionary:s.dictionary}}if("dictionary"===r.type&&(n||!e.nullable))return{reference:e,dictionary:r}}for(const n of e.subtype){const e=E(n,t);if(e)return n.union?e:{reference:n,dictionary:e.dictionary}}}function R(e,t){if(t.cache.dictionaryIncludesRequiredField.has(e))return t.cache.dictionaryIncludesRequiredField.get(e);t.cache.dictionaryIncludesRequiredField.set(e,void 0);let n=e.members.some(e=>e.required);if(!n&&e.inheritance){const r=t.unique.get(e.inheritance);r?R(r,t)&&(n=!0):n=!0}return t.cache.dictionaryIncludesRequiredField.set(e,n),n}class T extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class A extends C{static parser(e,t){return()=>{const n=e.consumeType(t);if(n)return new A({source:e.source,tokens:{value:n}})}}get value(){return G(this.tokens.value.value)}}function L(e,t){return V(e,{parser:A.parser(e,t),listName:t+" list"})}const P=["identifier","decimal","integer","string"],I=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map(e=>[e,"Legacy"+e]),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function D(e){for(const t of P){const n=L(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class N extends C{static parse(e){const t={assign:e.consume("=")},n=se(new N({source:e.source,tokens:t}));return t.assign&&(t.secondaryName=e.consumeType(...P)),t.open=e.consume("("),t.open?(n.list=n.rhsIsList?D(e):K(e),t.close=e.consume(")")||e.error("Unexpected token in extended attribute argument list")):n.hasRhs&&!t.secondaryName&&e.error("No right hand side to extended attribute assignment"),n.this}get rhsIsList(){return this.tokens.assign&&!this.tokens.secondaryName}get rhsType(){return this.rhsIsList?this.list[0].tokens.value.type+"-list":this.tokens.secondaryName?this.tokens.secondaryName.type:null}write(e){const{rhsType:t}=this;return e.ts.wrap([e.token(this.tokens.assign),e.reference_token(this.tokens.secondaryName,this.parent),e.token(this.tokens.open),...this.list?this.list.map(n=>{return"identifier-list"===t?e.identifier(n,this.parent):t&&t.endsWith("-list")?(r=n,e.ts.wrap([e.token(r.tokens.value),e.token(r.tokens.separator)])):n.write(e);var r}):[],e.token(this.tokens.close)])}}class O extends C{static parse(e){const t=e.consumeType("identifier");if(t)return new O({source:e.source,tokens:{name:t},params:N.parse(e)})}constructor({source:e,tokens:t,params:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"params",{value:n})}get type(){return"extended-attribute"}get name(){return this.tokens.name.value}get rhs(){const{rhsType:e,tokens:t,list:n}=this.params;if(!e)return null;return{type:e,value:this.params.rhsIsList?n:G(t.secondaryName.value)}}get arguments(){const{rhsIsList:e,list:t}=this.params;return!t||e?[]:t}*validate(e){const{name:t}=this;if("LegacyNoInterfaceObject"===t){const e="`[LegacyNoInterfaceObject]` extended attribute is an undesirable feature that may be removed from Web IDL in the future. Refer to the [relevant upstream PR](https://github.com/heycam/webidl/pull/609) for more information.";yield S(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(I.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${I.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/heycam/webidl/pull/870) for more information.`;yield S(this.tokens.name,this,"renamed-legacy",e,{level:"warning",autofix:(n=this,()=>{const{name:e}=n;n.tokens.name.value=I.get(e),"TreatNullAs"===e&&(n.params.tokens={})})})}var n;for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.wrap([e.ts.trivia(this.tokens.name.trivia),e.ts.extendedAttribute(e.ts.wrap([e.ts.extendedAttributeReference(this.name),this.params.write(e)])),e.token(this.tokens.separator)])}}class j extends T{static parse(e){const t={};if(t.open=e.consume("["),!t.open)return new j({});const n=new j({source:e.source,tokens:t});return n.push(...V(e,{parser:O.parse,listName:"extended attribute"})),t.close=e.consume("]")||e.error("Unexpected closing token of extended attribute"),n.length||e.error("Found an empty extended attribute"),e.probe("[")&&e.error("Illegal double extended attribute lists, consider merging them"),n}*validate(e){for(const t of this)yield*t.validate(e)}write(e){return this.length?e.ts.wrap([e.token(this.tokens.open),...this.map(t=>t.write(e)),e.token(this.tokens.close)]):""}}function z(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function M(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","sequence","record");if(!n)return;const r=se(new U({source:e.source,tokens:{base:n}}));switch(r.tokens.open=e.consume("<")||e.error("No opening bracket after "+n.value),n.value){case"Promise":{e.probe("[")&&e.error("Promise type cannot have extended attribute");const n=X(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"sequence":case"FrozenArray":case"ObservableArray":{const s=Q(e,t)||e.error(`Missing ${n.value} subtype`);r.subtype.push(s);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...ae)||e.error("Record key must be one of: "+ae.join(", ")),s=new U({source:e.source,tokens:{base:n}});s.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),s.type=t;const i=Q(e,t)||e.error("Error parsing generic type record");r.subtype.push(s,i);break}}return r.idlType||e.error("Error parsing generic type "+n.value),r.tokens.close=e.consume(">")||e.error("Missing closing bracket after "+n.value),r.this}(e,t)||J(e);if(!n){const t=e.consumeType("identifier")||e.consume(...ae,...oe);if(!t)return;n=new U({source:e.source,tokens:{base:t}}),e.probe("<")&&e.error("Unsupported generic type "+t.value)}return"Promise"===n.generic&&e.probe("?")&&e.error("Promise type cannot be nullable"),n.type=t||null,z(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}class U extends C{static parse(e,t){return M(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=se(new U({source:e.source,tokens:n}));for(r.type=t||null;;){const t=Q(e)||e.error("No type after open parenthesis or 'or' in union type");"any"===t.idlType&&e.error("Type `any` cannot be included in a union type"),"Promise"===t.generic&&e.error("Type `Promise` cannot be included in a union type"),r.subtype.push(t);const n=e.consume("or");if(!n)break;t.tokens.separator=n}return r.idlType.length<2&&e.error("At least two types are expected in a union type but found less"),n.close=e.consume(")")||e.error("Unterminated union type"),z(e,r),r.this}(e,t)}constructor({source:e,tokens:t}){super({source:e,tokens:t}),Object.defineProperty(this,"subtype",{value:[],writable:!0}),this.extAttrs=new j({})}get generic(){return this.subtype.length&&this.tokens.base?this.tokens.base.value:""}get nullable(){return Boolean(this.tokens.nullable)}get union(){return Boolean(this.subtype.length)&&!this.tokens.base}get idlType(){if(this.subtype.length)return this.subtype;return G([this.tokens.prefix,this.tokens.base,this.tokens.postfix].filter(e=>e).map(e=>e.value).join(" "))}*validate(e){if(yield*this.extAttrs.validate(e),"void"===this.idlType){const e="`void` is now replaced by `undefined`. Refer to the [relevant GitHub issue](https://github.com/heycam/webidl/issues/60) for more information.";yield S(this.tokens.base,this,"replace-void",e,{autofix:(t=this,()=>{t.tokens.base.value="undefined"})})}var t;const n=!this.union&&e.unique.get(this.idlType),r=this.union?this:n&&"typedef"===n.type?n.idlType:void 0;if(r&&this.nullable){const{reference:t}=E(r,e)||{};if(t){const e=(this.union?t:this).tokens.base,n="Nullable union cannot include a dictionary type.";yield S(e,this,"no-nullable-union-dict",n)}}else for(const t of this.subtype)yield*t.validate(e)}write(e){return e.ts.wrap([this.extAttrs.write(e),(()=>{if(this.union||this.generic)return e.ts.wrap([e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),...this.subtype.map(t=>t.write(e)),e.token(this.tokens.close)]);const t=this.tokens.prefix||this.tokens.base,n=this.tokens.prefix?[this.tokens.prefix.value,e.ts.trivia(this.tokens.base.trivia)]:[],r=e.reference(e.ts.wrap([...n,this.tokens.base.value,e.token(this.tokens.postfix)]),{unescaped:this.idlType,context:this});return e.ts.wrap([e.ts.trivia(t.trivia),r])})(),e.token(this.tokens.nullable),e.token(this.tokens.separator)])}}class W extends C{static parse(e){const t=e.consume("=");if(!t)return null;const n=Z(e)||e.consumeType("string")||e.consume("null","[","{")||e.error("No value for default"),r=[n];if("["===n.value){const t=e.consume("]")||e.error("Default sequence value must be empty");r.push(t)}else if("{"===n.value){const t=e.consume("}")||e.error("Default dictionary value must be empty");r.push(t)}return new W({source:e.source,tokens:{assign:t},expression:r})}constructor({source:e,tokens:t,expression:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"expression",{value:n})}get type(){return Y(this.expression[0]).type}get value(){return Y(this.expression[0]).value}get negative(){return Y(this.expression[0]).negative}write(e){return e.ts.wrap([e.token(this.tokens.assign),...this.expression.map(t=>e.token(t))])}}class q extends C{static parse(e){const t=e.position,n={},r=se(new q({source:e.source,tokens:n}));return r.extAttrs=j.parse(e),n.optional=e.consume("optional"),r.idlType=Q(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consumeType("identifier")||e.consume(...ce),n.name?(r.default=n.optional?W.parse(e):null,r.this):e.unconsume(t)):e.unconsume(t)}get type(){return"argument"}get optional(){return!!this.tokens.optional}get variadic(){return!!this.tokens.variadic}get name(){return G(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e);const t=E(this.idlType,e,{useNullableInner:!0});if(t)if(this.idlType.nullable){const e="Dictionary arguments cannot be nullable.";yield S(this.tokens.name,this,"no-nullable-dict-arg",e)}else if(this.optional){if(!this.default){const e="Optional dictionary arguments must have a default value of `{}`.";yield S(this.tokens.name,this,"dict-arg-default",e,{autofix:F(this)})}}else if(this.parent&&!R(t.dictionary,e)&&function(e){const t=e.parent.arguments||e.parent.list,n=t.indexOf(e);return!t.slice(n+1).some(e=>!e.optional)}(this)){const e="Dictionary argument must be optional if it has no required fields";yield S(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=re(n.idlType);n.tokens.optional={type:"optional",value:"optional",trivia:e.trivia},e.trivia=" ",F(n)()})})}var n}write(e){return e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.optional),e.ts.type(this.idlType.write(e)),e.token(this.tokens.variadic),e.name_token(this.tokens.name,{data:this}),this.default?this.default.write(e):"",e.token(this.tokens.separator)])}}function F(e){return()=>{e.default=W.parse(new pe(" = {}"))}}class B extends C{static parse(e,{special:t,regular:n}={}){const r={special:t},s=se(new B({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(s.arguments=[],s):(t||n||(r.special=e.consume("getter","setter","deleter")),s.idlType=X(e)||e.error("Missing return type"),r.name=e.consumeType("identifier")||e.consume("includes"),r.open=e.consume("(")||e.error("Invalid operation"),s.arguments=K(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),s.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?G(e.value):""}get special(){return this.tokens.special?this.tokens.special.value:""}*validate(e){if(yield*this.extAttrs.validate(e),!this.name&&["","static"].includes(this.special)){const e="Regular or static operations must have both a return type and an identifier.";yield S(this.tokens.open,this,"incomplete-op",e)}this.idlType&&(yield*this.idlType.validate(e));for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this,n=this.idlType?[e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map(t=>t.write(e))),e.token(this.tokens.close)]:[];return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),this.tokens.name?e.token(this.tokens.special):e.token(this.tokens.special,e.ts.nameless,{data:this,parent:t}),...n,e.token(this.tokens.termination)]),{data:this,parent:t})}}class H extends C{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const s=e.position,i={special:t},o=se(new H({source:e.source,tokens:i}));if(t||n||(i.special=e.consume("inherit")),"inherit"===o.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),i.readonly=e.consume("readonly"),r&&!i.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),i.base=e.consume("attribute"),i.base)return o.idlType=Q(e,"attribute-type")||e.error("Attribute lacks a type"),i.name=e.consumeType("identifier")||e.consume("async","required")||e.error("Attribute lacks a name"),i.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),o.this;e.unconsume(s)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return G(this.tokens.name.value)}*validate(e){switch(yield*this.extAttrs.validate(e),yield*this.idlType.validate(e),this.idlType.generic){case"sequence":case"record":{const e=`Attributes cannot accept ${this.idlType.generic} types.`;yield S(this.tokens.name,this,"attr-invalid-type",e);break}default:{const{reference:t}=E(this.idlType,e)||{};if(t){const e=(this.idlType.union?t:this.idlType).tokens.base,n="Attributes cannot accept dictionary types.";yield S(e,this,"attr-invalid-type",n)}}}}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.special),e.token(this.tokens.readonly),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.termination)]),{data:this,parent:t})}}function G(e){return e.startsWith("_")?e.slice(1):e}function V(e,{parser:t,allowDangler:n,listName:r="list"}){const s=t(e);if(!s)return[];s.tokens.separator=e.consume(",");const i=[s];for(;s.tokens.separator;){const s=t(e);if(!s){n||e.error("Trailing comma in "+r);break}if(s.tokens.separator=e.consume(","),i.push(s),!s.tokens.separator)break}return i}function Z(e){return e.consumeType("decimal","integer")||e.consume("true","false","Infinity","-Infinity","NaN")}function Y({type:e,value:t}){switch(e){case"decimal":case"integer":return{type:"number",value:t};case"string":return{type:"string",value:t.slice(1,-1)}}switch(t){case"true":case"false":return{type:"boolean",value:"true"===t};case"Infinity":case"-Infinity":return{type:"Infinity",negative:t.startsWith("-")};case"[":return{type:"sequence",value:[]};case"{":return{type:"dictionary"};default:return{type:t}}}function J(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const s=e.consume("long");return new U({source:t,tokens:{prefix:n,base:r,postfix:s}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new U({source:t,tokens:{prefix:n,base:r}});n&&e.error("Failed to parse float type")}();if(n)return n;const r=e.consume("bigint","boolean","byte","octet","undefined");return r?new U({source:t,tokens:{base:r}}):void 0}function K(e){return V(e,{parser:q.parse,listName:"arguments list"})}function Q(e,t){const n=j.parse(e),r=U.parse(e,t);return r&&(se(r).extAttrs=n),r}function X(e,t){const n=U.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new U({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function ee(e){const t=e.consume("stringifier");if(!t)return;return H.parse(e,{special:t})||B.parse(e,{special:t})||e.error("Unterminated stringifier")}function te(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function ne(e){return()=>{if(e.extAttrs.length){const t=new pe("Exposed=Window,"),n=O.parse(t);n.tokens.separator=t.consume(",");const r=e.extAttrs[0];/^\s/.test(r.tokens.name.trivia)||(r.tokens.name.trivia=" "+r.tokens.name.trivia),e.extAttrs.unshift(n)}else{se(e).extAttrs=j.parse(new pe("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia="\n"+te(t)}}}function re(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return re(e.idlType);return Object.values(e.tokens).sort((e,t)=>e.index-t.index)[0]}function se(e,t){return t||(t=e),e?new Proxy(e,{get(e,t){const n=e[t];return Array.isArray(n)?se(n,e):n},set(e,n,r){if(e[n]=r,!r)return!0;if(Array.isArray(r))for(const e of r)void 0!==e.parent&&(e.parent=t);else void 0!==r.parent&&(r.parent=t);return!0}}):e}const ie={decimal:/-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,integer:/-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,identifier:/[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,string:/"[^"]*"/y,whitespace:/[\t\n\r ]+/y,comment:/\/\/.*|\/\*[\s\S]*?\*\//y,other:/[^\t\n\r 0-9A-Za-z]/y},oe=["ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","Float32Array","Float64Array","any","object","symbol"],ae=["ByteString","DOMString","USVString"],ce=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],le=["-Infinity","FrozenArray","Infinity","NaN","ObservableArray","Promise","bigint","boolean","byte","double","false","float","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","undefined","unsigned","void"].concat(ce,ae,oe),ue=["(",")",",","...",":",";","<","=",">","?","[","]","{","}"],de=["_constructor","toString","_toString"];class pe{constructor(e){this.source=function(e){const t=[];let n=0,r="",s=1,i=0;for(;nthis.position&&this.source[this.position].type===e}probe(e){return this.probeType("inline")&&this.source[this.position].value===e}consumeType(...e){for(const t of e){if(!this.probeType(t))continue;const e=this.source[this.position];return this.position++,e}}consume(...e){if(!this.probeType("inline"))return;const t=this.source[this.position];for(const n of e)if(t.value===n)return this.position++,t}unconsume(e){this.position=e}}class fe extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:s,input:i,tokens:o}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=s,this.input=i,this.tokens=o}}class he extends A{static parse(e){const t=e.consumeType("string");if(t)return new he({source:e.source,tokens:{value:t}})}get type(){return"enum-value"}get value(){return super.value.slice(1,-1)}write(e){const{parent:t}=this;return e.ts.wrap([e.ts.trivia(this.tokens.value.trivia),e.ts.definition(e.ts.wrap(['"',e.ts.name(this.value,{data:this,parent:t}),'"']),{data:this,parent:t}),e.token(this.tokens.separator)])}}class me extends C{static parse(e){const t={};if(t.base=e.consume("enum"),!t.base)return;t.name=e.consumeType("identifier")||e.error("No name for enum");const n=se(new me({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=V(e,{parser:he.parse,allowDangler:!0,listName:"enumeration"}),e.probeType("string")&&e.error("No comma between enum values"),t.close=e.consume("}")||e.error("Unexpected value in enum"),n.values.length||e.error("No value in enum"),t.termination=e.consume(";")||e.error("No semicolon after enum"),n.this}get type(){return"enum"}get name(){return G(this.tokens.name.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.open),e.ts.wrap(this.values.map(t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class ge extends C{static parse(e){const t=e.consumeType("identifier");if(!t)return;const n={target:t};if(n.includes=e.consume("includes"),n.includes)return n.mixin=e.consumeType("identifier")||e.error("Incomplete includes statement"),n.termination=e.consume(";")||e.error("No terminating ; for includes statement"),new ge({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return G(this.tokens.target.value)}get includes(){return G(this.tokens.mixin.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.reference_token(this.tokens.target,this),e.token(this.tokens.includes),e.reference_token(this.tokens.mixin,this),e.token(this.tokens.termination)]),{data:this})}}class be extends C{static parse(e){const t={},n=se(new be({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=Q(e,"typedef-type")||e.error("Typedef lacks a type"),t.name=e.consumeType("identifier")||e.error("Typedef lacks a name"),e.current=n.this,t.termination=e.consume(";")||e.error("Unterminated typedef, expected `;`"),n.this}get type(){return"typedef"}get name(){return G(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.termination)]),{data:this})}}class ye extends C{static parse(e,t){const n={base:t},r=se(new ye({source:e.source,tokens:n}));return n.name=e.consumeType("identifier")||e.error("Callback lacks a name"),e.current=r.this,n.assign=e.consume("=")||e.error("Callback lacks an assignment"),r.idlType=X(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=K(e),n.close=e.consume(")")||e.error("Unterminated callback"),n.termination=e.consume(";")||e.error("Unterminated callback, expected `;`"),r.this}get type(){return"callback"}get name(){return G(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.assign),e.ts.type(this.idlType.write(e)),e.token(this.tokens.open),...this.arguments.map(t=>t.write(e)),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class we extends C{static parse(e,t,{type:n,inheritable:r,allowedMembers:s}){const{tokens:i}=t;for(i.name=e.consumeType("identifier")||e.error("Missing name in "+t.type),e.current=t,t=se(t),r&&Object.assign(i,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consumeType("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),i.open=e.consume("{")||e.error("Bodyless "+n),t.members=[];;){if(i.close=e.consume("}"),i.close)return i.termination=e.consume(";")||e.error("Missing semicolon after "+n),t.this;const r=j.parse(e);let o;for(const[t,...n]of s)if(o=se(t(e,...n)),o)break;o||e.error("Unknown member"),o.extAttrs=r,t.members.push(o.this)}}get partial(){return!!this.tokens.partial}get name(){return G(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?G(this.tokens.inheritance.value):null}*validate(e){for(const t of this.members)t.validate&&(yield*t.validate(e))}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.callback),e.token(this.tokens.partial),e.token(this.tokens.base),e.token(this.tokens.mixin),e.name_token(this.tokens.name,{data:this}),(()=>this.tokens.inheritance?e.ts.wrap([e.token(this.tokens.colon),e.ts.trivia(this.tokens.inheritance.trivia),e.ts.inheritance(e.reference(this.tokens.inheritance.value,{context:this}))]):"")(),e.token(this.tokens.open),e.ts.wrap(this.members.map(t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class ve extends C{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=J(e);if(!n){const t=e.consumeType("identifier")||e.error("Const lacks a type");n=new U({source:e.source,tokens:{base:t}})}e.probe("?")&&e.error("Unexpected nullable constant type"),n.type="const-type",t.name=e.consumeType("identifier")||e.error("Const lacks a name"),t.assign=e.consume("=")||e.error("Const lacks value assignment"),t.value=Z(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new ve({source:e.source,tokens:t});return se(r).idlType=n,r}get type(){return"const"}get name(){return G(this.tokens.name.value)}get value(){return Y(this.tokens.value)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.assign),e.token(this.tokens.value),e.token(this.tokens.termination)]),{data:this,parent:t})}}class ke extends C{static parse(e){const t=e.position,n={},r=se(new ke({source:e.source,tokens:n}));if(n.readonly=e.consume("readonly"),n.readonly||(n.async=e.consume("async")),n.base=n.readonly?e.consume("maplike","setlike"):n.async?e.consume("iterable"):e.consume("iterable","maplike","setlike"),!n.base)return void e.unconsume(t);const{type:s}=r,i="maplike"===s,o=i||"iterable"===s,a=r.async&&"iterable"===s;n.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${s} declaration`);const c=Q(e)||e.error(`Missing a type argument in ${s} declaration`);return r.idlType=[c],r.arguments=[],o&&(c.tokens.separator=e.consume(","),c.tokens.separator?r.idlType.push(Q(e)):i&&e.error(`Missing second type argument in ${s} declaration`)),n.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${s} declaration`),e.probe("(")&&(a?(n.argsOpen=e.consume("("),r.arguments.push(...K(e)),n.argsClose=e.consume(")")||e.error("Unterminated async iterable argument list")):e.error("Arguments are only allowed for `async iterable`")),n.termination=e.consume(";")||e.error(`Missing semicolon after ${s} declaration`),r.this}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}get async(){return!!this.tokens.async}*validate(e){for(const t of this.idlType)yield*t.validate(e);for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.readonly),e.token(this.tokens.async),e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),e.ts.wrap(this.idlType.map(t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.argsOpen),e.ts.wrap(this.arguments.map(t=>t.write(e))),e.token(this.tokens.argsClose),e.token(this.tokens.termination)]),{data:this,parent:this.parent})}}class $e extends C{static parse(e){const t=e.consume("constructor");if(!t)return;const n={base:t};n.open=e.consume("(")||e.error("No argument list in constructor");const r=K(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const s=new $e({source:e.source,tokens:n});return se(s).arguments=r,s}get type(){return"constructor"}*validate(e){this.idlType&&(yield*this.idlType.validate(e));for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base,e.ts.nameless,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map(t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this,parent:t})}}function xe(e){const t=e.consume("static");if(!t)return;return H.parse(e,{special:t})||B.parse(e,{special:t})||e.error("No body in static member")}class _e extends we{static parse(e,t,{partial:n=null}={}){const r={partial:n,base:t};return we.parse(e,new _e({source:e.source,tokens:r}),{type:"interface",inheritable:!n,allowedMembers:[[ve.parse],[$e.parse],[xe],[ee],[ke.parse],[H.parse],[B.parse]]})}get type(){return"interface"}*validate(e){if(yield*this.extAttrs.validate(e),!this.partial&&this.extAttrs.every(e=>"Exposed"!==e.name)){const e="Interfaces must have `[Exposed]` extended attribute. To fix, add, for example, `[Exposed=Window]`. Please also consider carefully if your interface should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield S(this.tokens.name,this,"require-exposed",e,{autofix:ne(this)})}const t=this.extAttrs.filter(e=>"Constructor"===e.name);for(const e of t){const t="Constructors should now be represented as a `constructor()` operation on the interface instead of `[Constructor]` extended attribute. Refer to the [WebIDL spec section on constructor operations](https://heycam.github.io/webidl/#idl-constructors) for more information.";yield S(e.tokens.name,this,"constructor-member",t,{autofix:Se(this,e)})}if(this.extAttrs.some(e=>"Global"===e.name)){const e=this.extAttrs.filter(e=>"LegacyFactoryFunction"===e.name);for(const t of e){const e="Interfaces marked as `[Global]` cannot have factory functions.";yield S(t.tokens.name,this,"no-constructible-global",e)}const t=this.members.filter(e=>"constructor"===e.type);for(const e of t){const t="Interfaces marked as `[Global]` cannot have constructors.";yield S(e.tokens.base,this,"no-constructible-global",t)}}yield*super.validate(e),this.partial||(yield*function*(e,t){const n=new Set(o(t).map(e=>e.name)),r=e.partials.get(t.name)||[],s=e.mixinMap.get(t.name)||[];for(const e of[...r,...s]){const r=o(e);yield*i(r,n,e,t);for(const e of r)n.add(e.name)}function*i(e,t,n,r){for(const s of e){const{name:e}=s;if(e&&t.has(e)){const t=`The operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield S(s.tokens.name,n,"no-cross-overload",t)}}}function o(e){return e.members.filter(({type:e})=>"operation"===e)}}(e,this))}}function Se(e,t){return e=se(e),()=>{const n=te(e.extAttrs.tokens.open.trivia),r=e.members.length?te(re(e.members[0]).trivia):function(e){const t=te(e),n=t.includes("\t")?"\t":" ";return t+n}(n),s=$e.parse(new pe(`\n${r}constructor();`));s.extAttrs=new j({}),se(s).arguments=t.arguments;const i=function(e,t){const n=e.slice().reverse().findIndex(t);return-1===n?n:e.length-n-1}(e.members,e=>"constructor"===e.type);e.members.splice(i+1,0,s);const{close:o}=e.tokens;o.trivia.includes("\n")||(o.trivia+="\n"+n);const{extAttrs:a}=e,c=a.indexOf(t),l=a.splice(c,1);a.length?a.length===c?a[c-1].tokens.separator=void 0:a[c].tokens.name.trivia.trim()||(a[c].tokens.name.trivia=l[0].tokens.name.trivia):a.tokens.open=a.tokens.close=void 0}}class Ce extends we{static parse(e,t,{partial:n}={}){const r={partial:n,base:t};if(r.mixin=e.consume("mixin"),r.mixin)return we.parse(e,new Ce({source:e.source,tokens:r}),{type:"interface mixin",allowedMembers:[[ve.parse],[ee],[H.parse,{noInherit:!0}],[B.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class Ee extends C{static parse(e){const t={},n=se(new Ee({source:e.source,tokens:t}));return n.extAttrs=j.parse(e),t.required=e.consume("required"),n.idlType=Q(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consumeType("identifier")||e.error("Dictionary member lacks a name"),n.default=W.parse(e),t.required&&n.default&&e.error("Required member must not have a default"),t.termination=e.consume(";")||e.error("Unterminated dictionary member, expected `;`"),n.this}get type(){return"field"}get name(){return G(this.tokens.name.value)}get required(){return!!this.tokens.required}*validate(e){yield*this.idlType.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.required),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),this.default?this.default.write(e):"",e.token(this.tokens.termination)]),{data:this,parent:t})}}class Re extends we{static parse(e,{partial:t}={}){const n={partial:t};if(n.base=e.consume("dictionary"),n.base)return we.parse(e,new Re({source:e.source,tokens:n}),{type:"dictionary",inheritable:!t,allowedMembers:[[Ee.parse]]})}get type(){return"dictionary"}}class Te extends we{static parse(e,{partial:t}={}){const n={partial:t};if(n.base=e.consume("namespace"),n.base)return we.parse(e,new Te({source:e.source,tokens:n}),{type:"namespace",allowedMembers:[[H.parse,{noInherit:!0,readonly:!0}],[ve.parse],[B.parse,{regular:!0}]]})}get type(){return"namespace"}*validate(e){if(!this.partial&&this.extAttrs.every(e=>"Exposed"!==e.name)){const e="Namespaces must have [Exposed] extended attribute. To fix, add, for example, [Exposed=Window]. Please also consider carefully if your namespace should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield S(this.tokens.name,this,"require-exposed",e,{autofix:ne(this)})}yield*super.validate(e)}}class Ae extends we{static parse(e,t,{partial:n=null}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return we.parse(e,new Ae({source:e.source,tokens:r}),{type:"callback interface",inheritable:!n,allowedMembers:[[ve.parse],[B.parse,{regular:!0}]]})}get type(){return"callback interface"}}function Le(e,t){const n=e.source;function r(t){e.error(t)}function s(...t){return e.consume(...t)}function i(t){const n=s("interface");if(!n)return;return Ce.parse(e,n,t)||_e.parse(e,n,t)||r("Interface has no proper body")}function o(){return function(){const t=s("callback");if(t)return e.probe("interface")?Ae.parse(e,t):ye.parse(e,t)}()||i()||function(){const t=s("partial");if(t)return Re.parse(e,{partial:t})||i({partial:t})||Te.parse(e,{partial:t})||r("Partial doesn't apply to anything")}()||Re.parse(e)||me.parse(e)||be.parse(e)||ge.parse(e)||Te.parse(e)}const a=function(){if(!n.length)return[];const s=[];for(;;){const t=j.parse(e),n=o();if(!n){t.length&&r("Stray extended attributes");break}se(n).extAttrs=t,s.push(n)}const i=e.consumeType("eof");return t.concrete&&s.push(i),s}();return e.positione.join(""),trivia:Pe,name:Pe,reference:Pe,type:Pe,generic:Pe,nameless:Pe,inheritance:Pe,definition:Pe,extendedAttribute:Pe,extendedAttributeReference:Pe};class De{constructor(e){this.ts=Object.assign({},Ie,e)}reference(e,{unescaped:t,context:n}){return t||(t=e.startsWith("_")?e.slice(1):e),this.ts.reference(e,t,n)}token(e,t=Pe,...n){if(!e)return"";const r=t(e.value,...n);return this.ts.wrap([this.ts.trivia(e.trivia),r])}reference_token(e,t){return this.token(e,this.reference.bind(this),{context:t})}name_token(e,t){return this.token(e,this.ts.name,t)}identifier(e,t){return this.ts.wrap([this.reference_token(e.tokens.value,t),this.token(e.tokens.separator)])}}function Ne(e,t){const n=new Map,r=e.filter(e=>"includes"===e.type);for(const e of r){const r=t.get(e.includes);if(!r)continue;const s=n.get(e.target);s?s.push(r):n.set(e.target,[r])}return n}function*Oe(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const s of e)if(s.partial){const e=r.get(s.name);e?e.push(s):r.set(s.name,[s])}else s.name&&(t.has(s.name)?n.add(s):t.set(s.name,s));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:Ne(e,t),cache:{typedefIncludesDictionary:new WeakMap,dictionaryIncludesRequiredField:new WeakMap}}}(e);for(const e of t.all)e.validate&&(yield*e.validate(t));yield*function*({unique:e,duplicates:t}){for(const n of t){const{name:t}=n,r=`The name "${t}" of type "${e.get(t).type}" was already seen`;yield S(n.tokens.name,n,"no-duplicate",r)}}(t)}var je=Object.freeze({__proto__:null,parse:function(e,t={}){const n=new pe(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),Le(n,t)},write:function(e,{templates:t=Ie}={}){t=Object.assign({},Ie,t);const n=new De(t);return t.wrap(e.map((function(e){return"eof"===e.type?t.trivia(e.trivia):e.write(n)})))},validate:function(e){return[...Oe((t=e,t.flat?t.flat():[].concat(...t)))];var t},WebIDLParseError:fe});const ze=/^[!#$%&'*+-.^`|~\w]+$/,Me=/[\u000A\u000D\u0009\u0020]/u,Ue=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function We(e,t,n){(t&&""!==t&&!e.has(t)&&Ue.test(n)||null===n)&&e.set(t.toLowerCase(),n)}var qe={exports:{}};function Fe(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}qe.exports={defaults:{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:Fe,changeDefaults:function(e){qe.exports.defaults=e}};const Be=/[&<>"']/,He=/[&<>"']/g,Ge=/[<>"']|&(?!#?\w+;)/,Ve=/[<>"']|&(?!#?\w+;)/g,Ze={"&":"&","<":"<",">":">",'"':""","'":"'"},Ye=e=>Ze[e];const Je=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Ke(e){return e.replace(Je,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const Qe=/(^|[^\[])\^/g;const Xe=/[^\w:]/g,et=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const tt={},nt=/^[^:]+:\/*[^/]*$/,rt=/^([^:]+:)[\s\S]*$/,st=/^([^:]+:\/*[^/]*)[\s\S]*$/;function it(e,t){tt[" "+e]||(nt.test(e)?tt[" "+e]=e+"/":tt[" "+e]=ot(e,"/",!0));const n=-1===(e=tt[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(rt,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(st,"$1")+t:e+t}function ot(e,t,n){const r=e.length;if(0===r)return"";let s=0;for(;s(r=(r=r.source||r).replace(Qe,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(Ke(n)).replace(Xe,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!et.test(n)&&(n=it(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:it,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n[n.length-1].trim()||n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}};const{defaults:ct}=qe.exports,{rtrim:lt,splitCells:ut,escape:dt,findClosingBracket:pt}=at;function ft(e,t,n,r){const s=t.href,i=t.title?dt(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:s,title:i,text:o,tokens:r.inlineTokens(o,[])};return r.state.inLink=!1,e}return{type:"image",raw:n,href:s,title:i,text:dt(o)}}var ht=class{constructor(e){this.options=e||ct}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:lt(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=lt(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const n={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,s,i,o,a,c,l,u,d,p=t[1].trim();const f=p.length>1,h={type:"list",raw:"",ordered:f,start:f?+p.slice(0,-1):"",loose:!1,items:[]};p=f?"\\d{1,9}\\"+p.slice(-1):"\\"+p,this.options.pedantic&&(p=f?p:"[*+-]");const m=new RegExp(`^( {0,3}${p})((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))`);for(;e&&!this.rules.block.hr.test(e)&&(t=m.exec(e));){u=t[2].split("\n"),this.options.pedantic?(i=2,d=u[0].trimLeft()):(i=t[2].search(/[^ ]/),i=t[1].length+(i>4?1:i),d=u[0].slice(i-t[1].length)),a=!1,n=t[0],!u[0]&&/^ *$/.test(u[1])&&(n=t[1]+u.slice(0,2).join("\n")+"\n",h.loose=!0,u=[]);const p=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(o=1;o=i)&&l.trim()){n=t[1]+u.slice(0,o).join("\n")+"\n";break}d+="\n"+l.slice(i)}else l.trim()||(a=!0),l.search(/[^ ]/)>=i?d+="\n"+l.slice(i):d+="\n"+l}h.loose||(c?h.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d),r&&(s="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,""))),h.items.push({type:"list_item",raw:n,task:!!r,checked:s,loose:!1,text:d}),h.raw+=n,e=e.slice(n.length)}h.items[h.items.length-1].raw=n.trimRight(),h.items[h.items.length-1].text=d.trimRight(),h.raw=h.raw.trimRight();const g=h.items.length;for(o=0;o"space"===e.type)&&(h.loose=!0,h.items[o].loose=!0);return h}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):dt(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:ut(t[1]).map(e=>({text:e})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,s,i,o=e.align.length;for(n=0;n({text:e}));for(o=e.header.length,r=0;r/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):dt(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=lt(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=pt(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),ft(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ft(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const s=r[1]||r[2]||"";if(!s||s&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let s,i,o=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(i=s.length,r[3]||r[4]){o+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){a+=i;continue}if(o-=i,o>0)continue;if(i=Math.min(i,i+o+a),Math.min(n,i)%2){const t=e.slice(1,n+r.index+i);return{type:"em",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,n+r.index+i-1);return{type:"strong",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=dt(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=dt(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=dt(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=dt(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=dt(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):dt(n[0]):n[0]:dt(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}};const{noopTest:mt,edit:gt,merge:bt}=at,yt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:mt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};yt.def=gt(yt.def).replace("label",yt._label).replace("title",yt._title).getRegex(),yt.bullet=/(?:[*+-]|\d{1,9}[.)])/,yt.listItemStart=gt(/^( *)(bull) */).replace("bull",yt.bullet).getRegex(),yt.list=gt(yt.list).replace(/bull/g,yt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+yt.def.source+")").getRegex(),yt._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",yt._comment=/|$)/,yt.html=gt(yt.html,"i").replace("comment",yt._comment).replace("tag",yt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yt.paragraph=gt(yt._paragraph).replace("hr",yt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",yt._tag).getRegex(),yt.blockquote=gt(yt.blockquote).replace("paragraph",yt.paragraph).getRegex(),yt.normal=bt({},yt),yt.gfm=bt({},yt.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),yt.gfm.table=gt(yt.gfm.table).replace("hr",yt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",yt._tag).getRegex(),yt.pedantic=bt({},yt.normal,{html:gt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",yt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mt,paragraph:gt(yt.normal._paragraph).replace("hr",yt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",yt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const wt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:mt,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:mt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};wt.punctuation=gt(wt.punctuation).replace(/punctuation/g,wt._punctuation).getRegex(),wt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,wt.escapedEmSt=/\\\*|\\_/g,wt._comment=gt(yt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),wt.emStrong.lDelim=gt(wt.emStrong.lDelim).replace(/punct/g,wt._punctuation).getRegex(),wt.emStrong.rDelimAst=gt(wt.emStrong.rDelimAst,"g").replace(/punct/g,wt._punctuation).getRegex(),wt.emStrong.rDelimUnd=gt(wt.emStrong.rDelimUnd,"g").replace(/punct/g,wt._punctuation).getRegex(),wt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,wt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,wt._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])?)+(?![-_])/,wt.autolink=gt(wt.autolink).replace("scheme",wt._scheme).replace("email",wt._email).getRegex(),wt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,wt.tag=gt(wt.tag).replace("comment",wt._comment).replace("attribute",wt._attribute).getRegex(),wt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,wt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,wt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,wt.link=gt(wt.link).replace("label",wt._label).replace("href",wt._href).replace("title",wt._title).getRegex(),wt.reflink=gt(wt.reflink).replace("label",wt._label).getRegex(),wt.reflinkSearch=gt(wt.reflinkSearch,"g").replace("reflink",wt.reflink).replace("nolink",wt.nolink).getRegex(),wt.normal=bt({},wt),wt.pedantic=bt({},wt.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:gt(/^!?\[(label)\]\((.*?)\)/).replace("label",wt._label).getRegex(),reflink:gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wt._label).getRegex()}),wt.gfm=bt({},wt.normal,{escape:gt(wt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}const{defaults:Rt}=qe.exports,{cleanUrl:Tt,escape:At}=at;var Lt=class{constructor(e){this.options=e||Rt}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'
'+(n?e:At(e,!0))+"
\n":"
"+(n?e:At(e,!0))+"
\n"}blockquote(e){return"
\n"+e+"
\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e){return"
  • "+e+"
  • \n"}checkbox(e){return" "}paragraph(e){return"

    "+e+"

    \n"}table(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return"\n"+e+"\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"}strong(e){return""+e+""}em(e){return""+e+""}codespan(e){return""+e+""}br(){return this.options.xhtml?"
    ":"
    "}del(e){return""+e+""}link(e,t,n){if(null===(e=Tt(this.options.sanitize,this.options.baseUrl,e)))return n;let r='",r}image(e,t,n){if(null===(e=Tt(this.options.sanitize,this.options.baseUrl,e)))return n;let r=''+n+'":">",r}text(e){return e}},Pt=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}},It=class{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}};const Dt=Lt,Nt=Pt,Ot=It,{defaults:jt}=qe.exports,{unescape:zt}=at;const Mt=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||$t,this.options.tokenizer=this.options.tokenizer||new kt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:xt.normal,inline:_t.normal};this.options.pedantic?(t.block=xt.pedantic,t.inline=_t.pedantic):this.options.gfm&&(t.block=xt.gfm,this.options.breaks?t.inline=_t.breaks:t.inline=_t.gfm),this.tokenizer.rules=t}static get rules(){return{block:xt,inline:_t}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,s,i;for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let n,r,s,i,o,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+St("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+St("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,Et))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,Et))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s,Ct))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),o=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}},Ut=class e{constructor(e){this.options=e||jt,this.options.renderer=this.options.renderer||new Dt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Nt,this.slugger=new Ot}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,r,s,i,o,a,c,l,u,d,p,f,h,m,g,b,y,w,v,k="";const $=e.length;for(n=0;n<$;n++)if(d=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(v=this.options.extensions.renderers[d.type].call({parser:this},d),!1!==v||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)))k+=v||"";else switch(d.type){case"space":continue;case"hr":k+=this.renderer.hr();continue;case"heading":k+=this.renderer.heading(this.parseInline(d.tokens),d.depth,zt(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":k+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(l="",c="",i=d.header.length,r=0;r0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(g.tokens,h),u+=this.renderer.listitem(m,y,b);k+=this.renderer.list(u,p,f);continue;case"html":k+=this.renderer.html(d.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<$&&"text"===e[n+1].type;)d=e[++n],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);k+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return k}parseInline(e,t){t=t||this.renderer;let n,r,s,i="";const o=e.length;for(n=0;n{r(e.text,e.lang,(function(t,n){if(t)return i(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),o--,0===o&&i()}))},0))})),void(0===o&&i())}try{const n=Mt.lex(e,t);return t.walkTokens&&Kt.walkTokens(n,t.walkTokens),Ut.parse(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+Vt(e.message+"",!0)+"
    ";throw e}}Kt.options=Kt.setOptions=function(e){return Ht(Kt.defaults,e),Yt(Kt.defaults),Kt},Kt.getDefaults=Zt,Kt.defaults=Jt,Kt.use=function(...e){const t=Ht({},...e),n=Kt.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(e=>{if(e.extensions&&(r=!0,e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let r=e.renderer.apply(this,n);return!1===r&&(r=t.apply(this,n)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)})),e.renderer){const n=Kt.defaults.renderer||new qt;for(const t in e.renderer){const r=n[t];n[t]=(...s)=>{let i=e.renderer[t].apply(n,s);return!1===i&&(i=r.apply(n,s)),i}}t.renderer=n}if(e.tokenizer){const n=Kt.defaults.tokenizer||new Wt;for(const t in e.tokenizer){const r=n[t];n[t]=(...s)=>{let i=e.tokenizer[t].apply(n,s);return!1===i&&(i=r.apply(n,s)),i}}t.tokenizer=n}if(e.walkTokens){const n=Kt.defaults.walkTokens;t.walkTokens=t=>{e.walkTokens.call(this,t),n&&n(t)}}r&&(t.extensions=n),Kt.setOptions(t)})},Kt.walkTokens=function(e,t){for(const n of e)switch(t(n),n.type){case"table":for(const e of n.header)Kt.walkTokens(e.tokens,t);for(const e of n.rows)for(const n of e)Kt.walkTokens(n.tokens,t);break;case"list":Kt.walkTokens(n.items,t);break;default:Kt.defaults.extensions&&Kt.defaults.extensions.childTokens&&Kt.defaults.extensions.childTokens[n.type]?Kt.defaults.extensions.childTokens[n.type].forEach((function(e){Kt.walkTokens(n[e],t)})):n.tokens&&Kt.walkTokens(n.tokens,t)}},Kt.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Ht({},Kt.defaults,t||{}),Gt(t);try{const n=Mt.lexInline(e,t);return t.walkTokens&&Kt.walkTokens(n,t.walkTokens),Ut.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+Vt(e.message+"",!0)+"
    ";throw e}},Kt.Parser=Ut,Kt.parser=Ut.parse,Kt.Renderer=qt,Kt.TextRenderer=Ft,Kt.Lexer=Mt,Kt.lexer=Mt.lex,Kt.Tokenizer=Wt,Kt.Slugger=Bt,Kt.parse=Kt;var Qt=Kt;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Xt,en={exports:{}};Xt=en,function(e,t){Xt.exports=t()}(0,(function(){var e=[],t=[],n={},r={},s={};function i(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function o(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(/\$(\d{1,2})/g,(function(e,n){return t[n]||""}))}function c(e,t){return e.replace(t[0],(function(n,r){var s=a(t[1],arguments);return o(""===n?e[r-1]:n,s)}))}function l(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var s=r.length;s--;){var i=r[s];if(i[0].test(t))return c(t,i)}return t}function u(e,t,n){return function(r){var s=r.toLowerCase();return t.hasOwnProperty(s)?o(r,s):e.hasOwnProperty(s)?o(r,e[s]):l(s,r,n)}}function d(e,t,n,r){return function(r){var s=r.toLowerCase();return!!t.hasOwnProperty(s)||!e.hasOwnProperty(s)&&l(s,s,n)===s}}function p(e,t,n){return(n?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=u(s,r,e),p.isPlural=d(s,r,e),p.singular=u(r,s,t),p.isSingular=d(r,s,t),p.addPluralRule=function(t,n){e.push([i(t),n])},p.addSingularRule=function(e,n){t.push([i(e),n])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),s[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return p.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 p.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 p.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(p.addUncountableRule),p}));var tn=en.exports,nn=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,s=i.prototype;return s.delete=function(e){return this.has(e)&&delete e[this._]},s.get=function(e){return this.has(e)?e[this._]:void 0},s.has=function(e){return r.call(e,this._)},s.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},i;function i(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(o,this)}function o(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=s.prototype;function s(){t(this,"_",{value:"_@ungap/weakmap"+e++})}n.add=function(e){return this.has(e)||t(e,this._,{value:!0,configurable:!0}),this},n.has=function(e){return this.hasOwnProperty.call(e,this._)},n.delete=function(e){return this.has(e)&&delete e[this._]},r.WeakSet=s}(Math.random(),Object.defineProperty)}function s(e,t,n,r,s,i){for(var o=("selectedIndex"in t),a=o;r>>0;no;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,k=w.oldi;v"+e+"",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=z(C),n=z("div");return n.innerHTML=''+e+"",j(t,n.firstChild.childNodes),t}:R)(e)});function j(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===C?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var M,U,W,q,F,B,H,G,V,Z=(U="appendChild",W="cloneNode",q="createTextNode",B=(F="importNode")in(M=e),(H=M.createDocumentFragment())[U](M[q]("g")),H[U](M[q]("")),(B?M[F](H,!0):H[W](!0)).childNodes.length<2?function e(t,n){for(var r=t[W](),s=t.childNodes||[],i=s.length,o=0;n&&o

    ',G.content.childNodes[0].getAttribute(V)==J)||(J="_dt: "+J.slice(1,-1)+";",K=!0)}catch(u){}var Q="\x3c!--"+J+"--\x3e",X=/^(?:style|textarea)$/i,ee=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,te=" \\f\\n\\r\\t",ne="[^"+te+"\\/>\"'=]+",re="["+te+"]+"+ne,se="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ie="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+ne.replace("\\/","")+"))?)",oe=new RegExp(se+re+ie+"+)(["+te+"]*/?>)","g"),ae=new RegExp(se+re+ie+"*)(["+te+"]*/>)","g"),ce=new RegExp("("+re+"\\s*=\\s*)(['\"]?)"+Q+"\\2","gi");function le(e,t,n,r){return"<"+t+n.replace(ce,ue)+r}function ue(e,t,n){return t+(n||'"')+J+(n||'"')}function de(e,t,n){return ee.test(t)?e:"<"+t+n+">"}var pe=K?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 fe(t,n,r,s){for(var i=t.childNodes,o=i.length,a=0;a{e.remove()})}function mn(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:s})=>"element"===n&&t?t(s,r++,e):s)}}const gn=mn("conjunction"),bn=mn("disjunction");function yn(e,t){return gn(e,t).join("")}function wn(e,t){return bn(e,t).join("")}function vn(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/"/g,""").replace(/new Date)return i}catch(e){console.error("Failed to use Cache API.",e)}const o=await fetch(n);if(!o.ok&&i)return console.warn("Returning a stale cached response for "+r),i;if(s&&o.ok){const e=o.clone(),r=new Headers(o.headers),i=new Date(Date.now()+t);r.set("Expires",i.toISOString());const a=new Response(await e.blob(),{headers:r});await s.put(n,a).catch(console.error)}return o}function En(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map(e=>on`${e}, `);return on`${r}${n[n.length-1]}`}function Rn(e,t){return[].concat(gn(e,t)).map(e=>"string"==typeof e?on`${e}`:e)}function Tn(e,t=""){return An(e,t,function(e){let t=0;for(const n of e)t=Math.imul(31,t)+n.charCodeAt(0)|0;return String(t)}(kn(e.textContent)))}function An(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let s=r?n:n.toLowerCase();if(s=s.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),s?!/\.$/.test(s)&&/^[a-z]/i.test(t||s)||(s="x"+s):s="generatedID",t&&(s=`${t}-${s}`),e.ownerDocument.getElementById(s)){let t=0,n=`${s}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${s}-${t}`;s=n}return e.id=s,s}function Ln(e){const t=new Set,n="ltNodefault"in e.dataset?"":kn(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map(e=>kn(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(kn(e)))}return[...t]}function Pn(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 In(e,t){const n=t.closest(pn);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 Dn(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Nn(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 On(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 jn 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 zn(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach(e=>e.removeAttribute("id")),t.querySelectorAll("dfn").forEach(e=>{Pn(e,"span",{copyAttributes:!1})}),t.hasAttribute("id")&&t.removeAttribute("id"),Mn(t),t}function Mn(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Un(t)])e.remove()}function*Un(e){for(;e.nextNode();)yield e.currentNode}class Wn 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 qn extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach(t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||An(e,"respec-offender")}(t,e,n.title))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:s,elements:i,title:o,details:a}=this;return{message:e,name:t,plugin:r,hint:s,elements:i,title:o,details:a,stack:n}}}function Fn(e,t,n={}){const r={...n,isWarning:!1};Qn("error",new qn(e,t,r))}function Bn(e,t,n={}){const r={...n,isWarning:!0};Qn("warn",new qn(e,t,r))}function Hn(e){return e?`\`${e}\``:""}function Gn(e,{quotes:t}={quotes:!1}){return wn(e,t?e=>Hn(Zn(e)):Hn)}function Vn(e,{quotes:t}={quotes:!1}){return yn(e,t?e=>Hn(Zn(e)):Hn)}function Zn(e){return String(e)?`"${e}"`:""}function Yn(e,...t){return e.map((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[s,i]=r.slice(1,-1).split("|");if(i){return`${e}[${s}](${new URL(i,"https://respec.org/docs/")})`}return`${e}[\`${s}\`](https://respec.org/docs/#${s})`}).join("")}const Jn="core/pubsubhub",Kn=new Map;function Qn(e,...t){if(!Kn.has(e))return;if(Array.from(Kn.get(e)).forEach(e=>{try{e(...t)}catch(t){Fn(`Error when calling function ${e.name}.`,Jn,{hint:"See developer console."}),console.error(t)}}),window.parent===window.self)return;const n=t.map(e=>String(JSON.stringify(e.stack||e)));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function Xn(e,t,n={once:!1}){return n.once?Xn(e,(function n(...r){!function({topic:e,cb:t}){const n=Kn.get(e);if(!n||!n.has(t))return console.warn("Already unsubscribed:",e,t),!1;n.delete(t)}({topic:e,cb:n}),t(...r)})):(Kn.has(e)?Kn.get(e).add(t):Kn.set(e,new Set([t])),{topic:e,cb:t})}t(Jn,{sub:Xn});const er=["githubToken","githubUser"];const tr=new Map([["text/html","html"],["application/xml","xml"]]);function nr(e,t=document){const n=tr.get(e);if(!n){const t=[...tr.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=rr(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function rr(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;Mn(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach(e=>e.remove()),n.classList.remove("toc-sidebar"),hn(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let o=e.querySelector("meta[charset], meta[content*='charset=']");o||(o=on``);s.appendChild(o);const a="ReSpec "+(window.respecVersion||"Developer Channel"),c=on` +window.respecVersion="26.16.1",function(){"use strict";const e=!!window.require;if(!e){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 t(t,n){e||(window.require.modules[t]=n)}const n=document.documentElement;n&&!n.hasAttribute("lang")&&(n.lang="en",n.hasAttribute("dir")||(n.dir="ltr"));const r={},s=n.lang;var i=Object.freeze({__proto__:null,name:"core/l10n",l10n:r,lang:s,run:function(e){e.l10n=r[s]||r.en}});let o,a;const c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakMap;let f={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return l.get(e);if("objectStoreNames"===t)return e.objectStoreNames||u.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return g(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function h(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(a||(a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(b(this),t),g(c.get(this))}:function(...t){return g(e.apply(b(this),t))}:function(t,...n){const r=e.call(b(this),t,...n);return u.set(r,t.sort?t.sort():[t]),g(r)}}function m(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",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});l.set(e,t)}(e),t=e,(o||(o=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,f):e);var t}function g(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{t(g(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",i)});return t.then(t=>{t instanceof IDBCursor&&c.set(t,e)}).catch(()=>{}),p.set(t,e),t}(e);if(d.has(e))return d.get(e);const t=m(e);return t!==e&&(d.set(e,t),p.set(t,e)),t}const b=e=>p.get(e);const y=["get","getKey","getAll","getAllKeys","count"],w=["put","add","delete","clear"],v=new Map;function k(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,s=w.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!y.includes(n))return;const i=async function(e,...t){const i=this.transaction(e,s?"readwrite":"readonly");let o=i.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),s&&i.done]))[0]};return v.set(t,i),i}f=(e=>({...e,get:(t,n,r)=>k(t,n)||e.get(t,n,r),has:(t,n)=>!!k(t,n)||e.has(t,n)}))(f);var $=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",()=>t()),g(n).then(()=>{})},openDB:function(e,t,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(e,t),a=g(o);return r&&o.addEventListener("upgradeneeded",e=>{r(g(o.result),e.oldVersion,e.newVersion,g(o.transaction))}),n&&o.addEventListener("blocked",()=>n()),a.then(e=>{i&&e.addEventListener("close",()=>i()),s&&e.addEventListener("versionchange",()=>s())}).catch(()=>{}),a},unwrap:b,wrap:g});function x(e,t,n,r,s,{level:i="error",autofix:o,ruleName:a}={}){function c(n){return n>0?e.slice(t,t+n):e.slice(Math.max(t+n,0),t)}function l(n,{precedes:r}={}){const s=n.map(e=>e.trivia+e.value).join(""),i=e[t];return"eof"===i.type?s:r?s+i.trivia:s.slice(i.trivia.length)}const u="eof"!==e[t].type?e[t].line:e.length>1?e[t-1].line:1,d=function(e){const t=e.split("\n");return t[t.length-1]}(l(c(-5),{precedes:!0})),p=c(5),f=l(p),h=d+f.split("\n")[0]+"\n"+(" ".repeat(d.length)+"^"),m="Syntax"===s?"since":"inside",g=`${s} error at line ${u}${e.name?" in "+e.name:""}${n&&n.name?`, ${m} \`${n.partial?"partial ":""}${function(e){const t=[e];for(;e&&e.parent;){const{parent:n}=e;t.unshift(n),e=n}return t.map(e=>function(e,t){let n=e;return t&&(n+=" "+t),n}(e.type,e.name)).join(" -> ")}(n)}\``:""}:\n${h}`;return{message:`${g} ${r}`,bareMessage:r,context:g,line:u,sourceName:e.name,level:i,ruleName:a,autofix:o,input:f,tokens:p}}function _(e,t,n,r){return x(e,t,n,r,"Syntax")}function S(e,t,n,r,s={}){return s.ruleName=n,x(t.source,e.index,t,r,"Validation",s)}class C{constructor({source:e,tokens:t}){Object.defineProperties(this,{source:{value:e},tokens:{value:t,writable:!0},parent:{value:null,writable:!0},this:{value:this}})}toJSON(){const e={type:void 0,name:void 0,inheritance:void 0};let t=this;for(;t!==Object.prototype;){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))(r.enumerable||r.get)&&(e[t]=this[t]);t=Object.getPrototypeOf(t)}return e}}function E(e,t,{useNullableInner:n}={}){if(!e.union){const r=t.unique.get(e.idlType);if(!r)return;if("typedef"===r.type){const{typedefIncludesDictionary:n}=t.cache;if(n.has(r))return n.get(r);t.cache.typedefIncludesDictionary.set(r,void 0);const s=E(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,s),s)return{reference:e,dictionary:s.dictionary}}if("dictionary"===r.type&&(n||!e.nullable))return{reference:e,dictionary:r}}for(const n of e.subtype){const e=E(n,t);if(e)return n.union?e:{reference:n,dictionary:e.dictionary}}}function R(e,t){if(t.cache.dictionaryIncludesRequiredField.has(e))return t.cache.dictionaryIncludesRequiredField.get(e);t.cache.dictionaryIncludesRequiredField.set(e,void 0);let n=e.members.some(e=>e.required);if(!n&&e.inheritance){const r=t.unique.get(e.inheritance);r?R(r,t)&&(n=!0):n=!0}return t.cache.dictionaryIncludesRequiredField.set(e,n),n}class T extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class A extends C{static parser(e,t){return()=>{const n=e.consumeType(t);if(n)return new A({source:e.source,tokens:{value:n}})}}get value(){return G(this.tokens.value.value)}}function L(e,t){return V(e,{parser:A.parser(e,t),listName:t+" list"})}const P=["identifier","decimal","integer","string"],I=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map(e=>[e,"Legacy"+e]),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function D(e){for(const t of P){const n=L(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class N extends C{static parse(e){const t={assign:e.consume("=")},n=se(new N({source:e.source,tokens:t}));return t.assign&&(t.secondaryName=e.consumeType(...P)),t.open=e.consume("("),t.open?(n.list=n.rhsIsList?D(e):K(e),t.close=e.consume(")")||e.error("Unexpected token in extended attribute argument list")):n.hasRhs&&!t.secondaryName&&e.error("No right hand side to extended attribute assignment"),n.this}get rhsIsList(){return this.tokens.assign&&!this.tokens.secondaryName}get rhsType(){return this.rhsIsList?this.list[0].tokens.value.type+"-list":this.tokens.secondaryName?this.tokens.secondaryName.type:null}write(e){const{rhsType:t}=this;return e.ts.wrap([e.token(this.tokens.assign),e.reference_token(this.tokens.secondaryName,this.parent),e.token(this.tokens.open),...this.list?this.list.map(n=>{return"identifier-list"===t?e.identifier(n,this.parent):t&&t.endsWith("-list")?(r=n,e.ts.wrap([e.token(r.tokens.value),e.token(r.tokens.separator)])):n.write(e);var r}):[],e.token(this.tokens.close)])}}class O extends C{static parse(e){const t=e.consumeType("identifier");if(t)return new O({source:e.source,tokens:{name:t},params:N.parse(e)})}constructor({source:e,tokens:t,params:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"params",{value:n})}get type(){return"extended-attribute"}get name(){return this.tokens.name.value}get rhs(){const{rhsType:e,tokens:t,list:n}=this.params;if(!e)return null;return{type:e,value:this.params.rhsIsList?n:G(t.secondaryName.value)}}get arguments(){const{rhsIsList:e,list:t}=this.params;return!t||e?[]:t}*validate(e){const{name:t}=this;if("LegacyNoInterfaceObject"===t){const e="`[LegacyNoInterfaceObject]` extended attribute is an undesirable feature that may be removed from Web IDL in the future. Refer to the [relevant upstream PR](https://github.com/heycam/webidl/pull/609) for more information.";yield S(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(I.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${I.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/heycam/webidl/pull/870) for more information.`;yield S(this.tokens.name,this,"renamed-legacy",e,{level:"warning",autofix:(n=this,()=>{const{name:e}=n;n.tokens.name.value=I.get(e),"TreatNullAs"===e&&(n.params.tokens={})})})}var n;for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.wrap([e.ts.trivia(this.tokens.name.trivia),e.ts.extendedAttribute(e.ts.wrap([e.ts.extendedAttributeReference(this.name),this.params.write(e)])),e.token(this.tokens.separator)])}}class j extends T{static parse(e){const t={};if(t.open=e.consume("["),!t.open)return new j({});const n=new j({source:e.source,tokens:t});return n.push(...V(e,{parser:O.parse,listName:"extended attribute"})),t.close=e.consume("]")||e.error("Unexpected closing token of extended attribute"),n.length||e.error("Found an empty extended attribute"),e.probe("[")&&e.error("Illegal double extended attribute lists, consider merging them"),n}*validate(e){for(const t of this)yield*t.validate(e)}write(e){return this.length?e.ts.wrap([e.token(this.tokens.open),...this.map(t=>t.write(e)),e.token(this.tokens.close)]):""}}function z(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function M(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","sequence","record");if(!n)return;const r=se(new U({source:e.source,tokens:{base:n}}));switch(r.tokens.open=e.consume("<")||e.error("No opening bracket after "+n.value),n.value){case"Promise":{e.probe("[")&&e.error("Promise type cannot have extended attribute");const n=X(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"sequence":case"FrozenArray":case"ObservableArray":{const s=Q(e,t)||e.error(`Missing ${n.value} subtype`);r.subtype.push(s);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...ae)||e.error("Record key must be one of: "+ae.join(", ")),s=new U({source:e.source,tokens:{base:n}});s.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),s.type=t;const i=Q(e,t)||e.error("Error parsing generic type record");r.subtype.push(s,i);break}}return r.idlType||e.error("Error parsing generic type "+n.value),r.tokens.close=e.consume(">")||e.error("Missing closing bracket after "+n.value),r.this}(e,t)||J(e);if(!n){const t=e.consumeType("identifier")||e.consume(...ae,...oe);if(!t)return;n=new U({source:e.source,tokens:{base:t}}),e.probe("<")&&e.error("Unsupported generic type "+t.value)}return"Promise"===n.generic&&e.probe("?")&&e.error("Promise type cannot be nullable"),n.type=t||null,z(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}class U extends C{static parse(e,t){return M(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=se(new U({source:e.source,tokens:n}));for(r.type=t||null;;){const t=Q(e)||e.error("No type after open parenthesis or 'or' in union type");"any"===t.idlType&&e.error("Type `any` cannot be included in a union type"),"Promise"===t.generic&&e.error("Type `Promise` cannot be included in a union type"),r.subtype.push(t);const n=e.consume("or");if(!n)break;t.tokens.separator=n}return r.idlType.length<2&&e.error("At least two types are expected in a union type but found less"),n.close=e.consume(")")||e.error("Unterminated union type"),z(e,r),r.this}(e,t)}constructor({source:e,tokens:t}){super({source:e,tokens:t}),Object.defineProperty(this,"subtype",{value:[],writable:!0}),this.extAttrs=new j({})}get generic(){return this.subtype.length&&this.tokens.base?this.tokens.base.value:""}get nullable(){return Boolean(this.tokens.nullable)}get union(){return Boolean(this.subtype.length)&&!this.tokens.base}get idlType(){if(this.subtype.length)return this.subtype;return G([this.tokens.prefix,this.tokens.base,this.tokens.postfix].filter(e=>e).map(e=>e.value).join(" "))}*validate(e){if(yield*this.extAttrs.validate(e),"void"===this.idlType){const e="`void` is now replaced by `undefined`. Refer to the [relevant GitHub issue](https://github.com/heycam/webidl/issues/60) for more information.";yield S(this.tokens.base,this,"replace-void",e,{autofix:(t=this,()=>{t.tokens.base.value="undefined"})})}var t;const n=!this.union&&e.unique.get(this.idlType),r=this.union?this:n&&"typedef"===n.type?n.idlType:void 0;if(r&&this.nullable){const{reference:t}=E(r,e)||{};if(t){const e=(this.union?t:this).tokens.base,n="Nullable union cannot include a dictionary type.";yield S(e,this,"no-nullable-union-dict",n)}}else for(const t of this.subtype)yield*t.validate(e)}write(e){return e.ts.wrap([this.extAttrs.write(e),(()=>{if(this.union||this.generic)return e.ts.wrap([e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),...this.subtype.map(t=>t.write(e)),e.token(this.tokens.close)]);const t=this.tokens.prefix||this.tokens.base,n=this.tokens.prefix?[this.tokens.prefix.value,e.ts.trivia(this.tokens.base.trivia)]:[],r=e.reference(e.ts.wrap([...n,this.tokens.base.value,e.token(this.tokens.postfix)]),{unescaped:this.idlType,context:this});return e.ts.wrap([e.ts.trivia(t.trivia),r])})(),e.token(this.tokens.nullable),e.token(this.tokens.separator)])}}class W extends C{static parse(e){const t=e.consume("=");if(!t)return null;const n=Z(e)||e.consumeType("string")||e.consume("null","[","{")||e.error("No value for default"),r=[n];if("["===n.value){const t=e.consume("]")||e.error("Default sequence value must be empty");r.push(t)}else if("{"===n.value){const t=e.consume("}")||e.error("Default dictionary value must be empty");r.push(t)}return new W({source:e.source,tokens:{assign:t},expression:r})}constructor({source:e,tokens:t,expression:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"expression",{value:n})}get type(){return Y(this.expression[0]).type}get value(){return Y(this.expression[0]).value}get negative(){return Y(this.expression[0]).negative}write(e){return e.ts.wrap([e.token(this.tokens.assign),...this.expression.map(t=>e.token(t))])}}class q extends C{static parse(e){const t=e.position,n={},r=se(new q({source:e.source,tokens:n}));return r.extAttrs=j.parse(e),n.optional=e.consume("optional"),r.idlType=Q(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consumeType("identifier")||e.consume(...ce),n.name?(r.default=n.optional?W.parse(e):null,r.this):e.unconsume(t)):e.unconsume(t)}get type(){return"argument"}get optional(){return!!this.tokens.optional}get variadic(){return!!this.tokens.variadic}get name(){return G(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e);const t=E(this.idlType,e,{useNullableInner:!0});if(t)if(this.idlType.nullable){const e="Dictionary arguments cannot be nullable.";yield S(this.tokens.name,this,"no-nullable-dict-arg",e)}else if(this.optional){if(!this.default){const e="Optional dictionary arguments must have a default value of `{}`.";yield S(this.tokens.name,this,"dict-arg-default",e,{autofix:F(this)})}}else if(this.parent&&!R(t.dictionary,e)&&function(e){const t=e.parent.arguments||e.parent.list,n=t.indexOf(e);return!t.slice(n+1).some(e=>!e.optional)}(this)){const e="Dictionary argument must be optional if it has no required fields";yield S(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=re(n.idlType);n.tokens.optional={type:"optional",value:"optional",trivia:e.trivia},e.trivia=" ",F(n)()})})}var n}write(e){return e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.optional),e.ts.type(this.idlType.write(e)),e.token(this.tokens.variadic),e.name_token(this.tokens.name,{data:this}),this.default?this.default.write(e):"",e.token(this.tokens.separator)])}}function F(e){return()=>{e.default=W.parse(new pe(" = {}"))}}class B extends C{static parse(e,{special:t,regular:n}={}){const r={special:t},s=se(new B({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(s.arguments=[],s):(t||n||(r.special=e.consume("getter","setter","deleter")),s.idlType=X(e)||e.error("Missing return type"),r.name=e.consumeType("identifier")||e.consume("includes"),r.open=e.consume("(")||e.error("Invalid operation"),s.arguments=K(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),s.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?G(e.value):""}get special(){return this.tokens.special?this.tokens.special.value:""}*validate(e){if(yield*this.extAttrs.validate(e),!this.name&&["","static"].includes(this.special)){const e="Regular or static operations must have both a return type and an identifier.";yield S(this.tokens.open,this,"incomplete-op",e)}this.idlType&&(yield*this.idlType.validate(e));for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this,n=this.idlType?[e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map(t=>t.write(e))),e.token(this.tokens.close)]:[];return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),this.tokens.name?e.token(this.tokens.special):e.token(this.tokens.special,e.ts.nameless,{data:this,parent:t}),...n,e.token(this.tokens.termination)]),{data:this,parent:t})}}class H extends C{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const s=e.position,i={special:t},o=se(new H({source:e.source,tokens:i}));if(t||n||(i.special=e.consume("inherit")),"inherit"===o.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),i.readonly=e.consume("readonly"),r&&!i.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),i.base=e.consume("attribute"),i.base)return o.idlType=Q(e,"attribute-type")||e.error("Attribute lacks a type"),i.name=e.consumeType("identifier")||e.consume("async","required")||e.error("Attribute lacks a name"),i.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),o.this;e.unconsume(s)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return G(this.tokens.name.value)}*validate(e){switch(yield*this.extAttrs.validate(e),yield*this.idlType.validate(e),this.idlType.generic){case"sequence":case"record":{const e=`Attributes cannot accept ${this.idlType.generic} types.`;yield S(this.tokens.name,this,"attr-invalid-type",e);break}default:{const{reference:t}=E(this.idlType,e)||{};if(t){const e=(this.idlType.union?t:this.idlType).tokens.base,n="Attributes cannot accept dictionary types.";yield S(e,this,"attr-invalid-type",n)}}}}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.special),e.token(this.tokens.readonly),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.termination)]),{data:this,parent:t})}}function G(e){return e.startsWith("_")?e.slice(1):e}function V(e,{parser:t,allowDangler:n,listName:r="list"}){const s=t(e);if(!s)return[];s.tokens.separator=e.consume(",");const i=[s];for(;s.tokens.separator;){const s=t(e);if(!s){n||e.error("Trailing comma in "+r);break}if(s.tokens.separator=e.consume(","),i.push(s),!s.tokens.separator)break}return i}function Z(e){return e.consumeType("decimal","integer")||e.consume("true","false","Infinity","-Infinity","NaN")}function Y({type:e,value:t}){switch(e){case"decimal":case"integer":return{type:"number",value:t};case"string":return{type:"string",value:t.slice(1,-1)}}switch(t){case"true":case"false":return{type:"boolean",value:"true"===t};case"Infinity":case"-Infinity":return{type:"Infinity",negative:t.startsWith("-")};case"[":return{type:"sequence",value:[]};case"{":return{type:"dictionary"};default:return{type:t}}}function J(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const s=e.consume("long");return new U({source:t,tokens:{prefix:n,base:r,postfix:s}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new U({source:t,tokens:{prefix:n,base:r}});n&&e.error("Failed to parse float type")}();if(n)return n;const r=e.consume("bigint","boolean","byte","octet","undefined");return r?new U({source:t,tokens:{base:r}}):void 0}function K(e){return V(e,{parser:q.parse,listName:"arguments list"})}function Q(e,t){const n=j.parse(e),r=U.parse(e,t);return r&&(se(r).extAttrs=n),r}function X(e,t){const n=U.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new U({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function ee(e){const t=e.consume("stringifier");if(!t)return;return H.parse(e,{special:t})||B.parse(e,{special:t})||e.error("Unterminated stringifier")}function te(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function ne(e){return()=>{if(e.extAttrs.length){const t=new pe("Exposed=Window,"),n=O.parse(t);n.tokens.separator=t.consume(",");const r=e.extAttrs[0];/^\s/.test(r.tokens.name.trivia)||(r.tokens.name.trivia=" "+r.tokens.name.trivia),e.extAttrs.unshift(n)}else{se(e).extAttrs=j.parse(new pe("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia="\n"+te(t)}}}function re(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return re(e.idlType);return Object.values(e.tokens).sort((e,t)=>e.index-t.index)[0]}function se(e,t){return t||(t=e),e?new Proxy(e,{get(e,t){const n=e[t];return Array.isArray(n)?se(n,e):n},set(e,n,r){if(e[n]=r,!r)return!0;if(Array.isArray(r))for(const e of r)void 0!==e.parent&&(e.parent=t);else void 0!==r.parent&&(r.parent=t);return!0}}):e}const ie={decimal:/-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,integer:/-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,identifier:/[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,string:/"[^"]*"/y,whitespace:/[\t\n\r ]+/y,comment:/\/\/.*|\/\*[\s\S]*?\*\//y,other:/[^\t\n\r 0-9A-Za-z]/y},oe=["ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","Float32Array","Float64Array","any","object","symbol"],ae=["ByteString","DOMString","USVString"],ce=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],le=["-Infinity","FrozenArray","Infinity","NaN","ObservableArray","Promise","bigint","boolean","byte","double","false","float","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","undefined","unsigned","void"].concat(ce,ae,oe),ue=["(",")",",","...",":",";","<","=",">","?","[","]","{","}"],de=["_constructor","toString","_toString"];class pe{constructor(e){this.source=function(e){const t=[];let n=0,r="",s=1,i=0;for(;nthis.position&&this.source[this.position].type===e}probe(e){return this.probeType("inline")&&this.source[this.position].value===e}consumeType(...e){for(const t of e){if(!this.probeType(t))continue;const e=this.source[this.position];return this.position++,e}}consume(...e){if(!this.probeType("inline"))return;const t=this.source[this.position];for(const n of e)if(t.value===n)return this.position++,t}unconsume(e){this.position=e}}class fe extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:s,input:i,tokens:o}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=s,this.input=i,this.tokens=o}}class he extends A{static parse(e){const t=e.consumeType("string");if(t)return new he({source:e.source,tokens:{value:t}})}get type(){return"enum-value"}get value(){return super.value.slice(1,-1)}write(e){const{parent:t}=this;return e.ts.wrap([e.ts.trivia(this.tokens.value.trivia),e.ts.definition(e.ts.wrap(['"',e.ts.name(this.value,{data:this,parent:t}),'"']),{data:this,parent:t}),e.token(this.tokens.separator)])}}class me extends C{static parse(e){const t={};if(t.base=e.consume("enum"),!t.base)return;t.name=e.consumeType("identifier")||e.error("No name for enum");const n=se(new me({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=V(e,{parser:he.parse,allowDangler:!0,listName:"enumeration"}),e.probeType("string")&&e.error("No comma between enum values"),t.close=e.consume("}")||e.error("Unexpected value in enum"),n.values.length||e.error("No value in enum"),t.termination=e.consume(";")||e.error("No semicolon after enum"),n.this}get type(){return"enum"}get name(){return G(this.tokens.name.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.open),e.ts.wrap(this.values.map(t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class ge extends C{static parse(e){const t=e.consumeType("identifier");if(!t)return;const n={target:t};if(n.includes=e.consume("includes"),n.includes)return n.mixin=e.consumeType("identifier")||e.error("Incomplete includes statement"),n.termination=e.consume(";")||e.error("No terminating ; for includes statement"),new ge({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return G(this.tokens.target.value)}get includes(){return G(this.tokens.mixin.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.reference_token(this.tokens.target,this),e.token(this.tokens.includes),e.reference_token(this.tokens.mixin,this),e.token(this.tokens.termination)]),{data:this})}}class be extends C{static parse(e){const t={},n=se(new be({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=Q(e,"typedef-type")||e.error("Typedef lacks a type"),t.name=e.consumeType("identifier")||e.error("Typedef lacks a name"),e.current=n.this,t.termination=e.consume(";")||e.error("Unterminated typedef, expected `;`"),n.this}get type(){return"typedef"}get name(){return G(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.termination)]),{data:this})}}class ye extends C{static parse(e,t){const n={base:t},r=se(new ye({source:e.source,tokens:n}));return n.name=e.consumeType("identifier")||e.error("Callback lacks a name"),e.current=r.this,n.assign=e.consume("=")||e.error("Callback lacks an assignment"),r.idlType=X(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=K(e),n.close=e.consume(")")||e.error("Unterminated callback"),n.termination=e.consume(";")||e.error("Unterminated callback, expected `;`"),r.this}get type(){return"callback"}get name(){return G(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.assign),e.ts.type(this.idlType.write(e)),e.token(this.tokens.open),...this.arguments.map(t=>t.write(e)),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class we extends C{static parse(e,t,{type:n,inheritable:r,allowedMembers:s}){const{tokens:i}=t;for(i.name=e.consumeType("identifier")||e.error("Missing name in "+t.type),e.current=t,t=se(t),r&&Object.assign(i,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consumeType("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),i.open=e.consume("{")||e.error("Bodyless "+n),t.members=[];;){if(i.close=e.consume("}"),i.close)return i.termination=e.consume(";")||e.error("Missing semicolon after "+n),t.this;const r=j.parse(e);let o;for(const[t,...n]of s)if(o=se(t(e,...n)),o)break;o||e.error("Unknown member"),o.extAttrs=r,t.members.push(o.this)}}get partial(){return!!this.tokens.partial}get name(){return G(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?G(this.tokens.inheritance.value):null}*validate(e){for(const t of this.members)t.validate&&(yield*t.validate(e))}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.callback),e.token(this.tokens.partial),e.token(this.tokens.base),e.token(this.tokens.mixin),e.name_token(this.tokens.name,{data:this}),(()=>this.tokens.inheritance?e.ts.wrap([e.token(this.tokens.colon),e.ts.trivia(this.tokens.inheritance.trivia),e.ts.inheritance(e.reference(this.tokens.inheritance.value,{context:this}))]):"")(),e.token(this.tokens.open),e.ts.wrap(this.members.map(t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class ve extends C{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=J(e);if(!n){const t=e.consumeType("identifier")||e.error("Const lacks a type");n=new U({source:e.source,tokens:{base:t}})}e.probe("?")&&e.error("Unexpected nullable constant type"),n.type="const-type",t.name=e.consumeType("identifier")||e.error("Const lacks a name"),t.assign=e.consume("=")||e.error("Const lacks value assignment"),t.value=Z(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new ve({source:e.source,tokens:t});return se(r).idlType=n,r}get type(){return"const"}get name(){return G(this.tokens.name.value)}get value(){return Y(this.tokens.value)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.assign),e.token(this.tokens.value),e.token(this.tokens.termination)]),{data:this,parent:t})}}class ke extends C{static parse(e){const t=e.position,n={},r=se(new ke({source:e.source,tokens:n}));if(n.readonly=e.consume("readonly"),n.readonly||(n.async=e.consume("async")),n.base=n.readonly?e.consume("maplike","setlike"):n.async?e.consume("iterable"):e.consume("iterable","maplike","setlike"),!n.base)return void e.unconsume(t);const{type:s}=r,i="maplike"===s,o=i||"iterable"===s,a=r.async&&"iterable"===s;n.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${s} declaration`);const c=Q(e)||e.error(`Missing a type argument in ${s} declaration`);return r.idlType=[c],r.arguments=[],o&&(c.tokens.separator=e.consume(","),c.tokens.separator?r.idlType.push(Q(e)):i&&e.error(`Missing second type argument in ${s} declaration`)),n.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${s} declaration`),e.probe("(")&&(a?(n.argsOpen=e.consume("("),r.arguments.push(...K(e)),n.argsClose=e.consume(")")||e.error("Unterminated async iterable argument list")):e.error("Arguments are only allowed for `async iterable`")),n.termination=e.consume(";")||e.error(`Missing semicolon after ${s} declaration`),r.this}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}get async(){return!!this.tokens.async}*validate(e){for(const t of this.idlType)yield*t.validate(e);for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.readonly),e.token(this.tokens.async),e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),e.ts.wrap(this.idlType.map(t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.argsOpen),e.ts.wrap(this.arguments.map(t=>t.write(e))),e.token(this.tokens.argsClose),e.token(this.tokens.termination)]),{data:this,parent:this.parent})}}class $e extends C{static parse(e){const t=e.consume("constructor");if(!t)return;const n={base:t};n.open=e.consume("(")||e.error("No argument list in constructor");const r=K(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const s=new $e({source:e.source,tokens:n});return se(s).arguments=r,s}get type(){return"constructor"}*validate(e){this.idlType&&(yield*this.idlType.validate(e));for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base,e.ts.nameless,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map(t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this,parent:t})}}function xe(e){const t=e.consume("static");if(!t)return;return H.parse(e,{special:t})||B.parse(e,{special:t})||e.error("No body in static member")}class _e extends we{static parse(e,t,{partial:n=null}={}){const r={partial:n,base:t};return we.parse(e,new _e({source:e.source,tokens:r}),{type:"interface",inheritable:!n,allowedMembers:[[ve.parse],[$e.parse],[xe],[ee],[ke.parse],[H.parse],[B.parse]]})}get type(){return"interface"}*validate(e){if(yield*this.extAttrs.validate(e),!this.partial&&this.extAttrs.every(e=>"Exposed"!==e.name)){const e="Interfaces must have `[Exposed]` extended attribute. To fix, add, for example, `[Exposed=Window]`. Please also consider carefully if your interface should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield S(this.tokens.name,this,"require-exposed",e,{autofix:ne(this)})}const t=this.extAttrs.filter(e=>"Constructor"===e.name);for(const e of t){const t="Constructors should now be represented as a `constructor()` operation on the interface instead of `[Constructor]` extended attribute. Refer to the [WebIDL spec section on constructor operations](https://heycam.github.io/webidl/#idl-constructors) for more information.";yield S(e.tokens.name,this,"constructor-member",t,{autofix:Se(this,e)})}if(this.extAttrs.some(e=>"Global"===e.name)){const e=this.extAttrs.filter(e=>"LegacyFactoryFunction"===e.name);for(const t of e){const e="Interfaces marked as `[Global]` cannot have factory functions.";yield S(t.tokens.name,this,"no-constructible-global",e)}const t=this.members.filter(e=>"constructor"===e.type);for(const e of t){const t="Interfaces marked as `[Global]` cannot have constructors.";yield S(e.tokens.base,this,"no-constructible-global",t)}}yield*super.validate(e),this.partial||(yield*function*(e,t){const n=new Set(o(t).map(e=>e.name)),r=e.partials.get(t.name)||[],s=e.mixinMap.get(t.name)||[];for(const e of[...r,...s]){const r=o(e);yield*i(r,n,e,t);for(const e of r)n.add(e.name)}function*i(e,t,n,r){for(const s of e){const{name:e}=s;if(e&&t.has(e)){const t=`The operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield S(s.tokens.name,n,"no-cross-overload",t)}}}function o(e){return e.members.filter(({type:e})=>"operation"===e)}}(e,this))}}function Se(e,t){return e=se(e),()=>{const n=te(e.extAttrs.tokens.open.trivia),r=e.members.length?te(re(e.members[0]).trivia):function(e){const t=te(e),n=t.includes("\t")?"\t":" ";return t+n}(n),s=$e.parse(new pe(`\n${r}constructor();`));s.extAttrs=new j({}),se(s).arguments=t.arguments;const i=function(e,t){const n=e.slice().reverse().findIndex(t);return-1===n?n:e.length-n-1}(e.members,e=>"constructor"===e.type);e.members.splice(i+1,0,s);const{close:o}=e.tokens;o.trivia.includes("\n")||(o.trivia+="\n"+n);const{extAttrs:a}=e,c=a.indexOf(t),l=a.splice(c,1);a.length?a.length===c?a[c-1].tokens.separator=void 0:a[c].tokens.name.trivia.trim()||(a[c].tokens.name.trivia=l[0].tokens.name.trivia):a.tokens.open=a.tokens.close=void 0}}class Ce extends we{static parse(e,t,{partial:n}={}){const r={partial:n,base:t};if(r.mixin=e.consume("mixin"),r.mixin)return we.parse(e,new Ce({source:e.source,tokens:r}),{type:"interface mixin",allowedMembers:[[ve.parse],[ee],[H.parse,{noInherit:!0}],[B.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class Ee extends C{static parse(e){const t={},n=se(new Ee({source:e.source,tokens:t}));return n.extAttrs=j.parse(e),t.required=e.consume("required"),n.idlType=Q(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consumeType("identifier")||e.error("Dictionary member lacks a name"),n.default=W.parse(e),t.required&&n.default&&e.error("Required member must not have a default"),t.termination=e.consume(";")||e.error("Unterminated dictionary member, expected `;`"),n.this}get type(){return"field"}get name(){return G(this.tokens.name.value)}get required(){return!!this.tokens.required}*validate(e){yield*this.idlType.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.required),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),this.default?this.default.write(e):"",e.token(this.tokens.termination)]),{data:this,parent:t})}}class Re extends we{static parse(e,{partial:t}={}){const n={partial:t};if(n.base=e.consume("dictionary"),n.base)return we.parse(e,new Re({source:e.source,tokens:n}),{type:"dictionary",inheritable:!t,allowedMembers:[[Ee.parse]]})}get type(){return"dictionary"}}class Te extends we{static parse(e,{partial:t}={}){const n={partial:t};if(n.base=e.consume("namespace"),n.base)return we.parse(e,new Te({source:e.source,tokens:n}),{type:"namespace",allowedMembers:[[H.parse,{noInherit:!0,readonly:!0}],[ve.parse],[B.parse,{regular:!0}]]})}get type(){return"namespace"}*validate(e){if(!this.partial&&this.extAttrs.every(e=>"Exposed"!==e.name)){const e="Namespaces must have [Exposed] extended attribute. To fix, add, for example, [Exposed=Window]. Please also consider carefully if your namespace should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield S(this.tokens.name,this,"require-exposed",e,{autofix:ne(this)})}yield*super.validate(e)}}class Ae extends we{static parse(e,t,{partial:n=null}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return we.parse(e,new Ae({source:e.source,tokens:r}),{type:"callback interface",inheritable:!n,allowedMembers:[[ve.parse],[B.parse,{regular:!0}]]})}get type(){return"callback interface"}}function Le(e,t){const n=e.source;function r(t){e.error(t)}function s(...t){return e.consume(...t)}function i(t){const n=s("interface");if(!n)return;return Ce.parse(e,n,t)||_e.parse(e,n,t)||r("Interface has no proper body")}function o(){return function(){const t=s("callback");if(t)return e.probe("interface")?Ae.parse(e,t):ye.parse(e,t)}()||i()||function(){const t=s("partial");if(t)return Re.parse(e,{partial:t})||i({partial:t})||Te.parse(e,{partial:t})||r("Partial doesn't apply to anything")}()||Re.parse(e)||me.parse(e)||be.parse(e)||ge.parse(e)||Te.parse(e)}const a=function(){if(!n.length)return[];const s=[];for(;;){const t=j.parse(e),n=o();if(!n){t.length&&r("Stray extended attributes");break}se(n).extAttrs=t,s.push(n)}const i=e.consumeType("eof");return t.concrete&&s.push(i),s}();return e.positione.join(""),trivia:Pe,name:Pe,reference:Pe,type:Pe,generic:Pe,nameless:Pe,inheritance:Pe,definition:Pe,extendedAttribute:Pe,extendedAttributeReference:Pe};class De{constructor(e){this.ts=Object.assign({},Ie,e)}reference(e,{unescaped:t,context:n}){return t||(t=e.startsWith("_")?e.slice(1):e),this.ts.reference(e,t,n)}token(e,t=Pe,...n){if(!e)return"";const r=t(e.value,...n);return this.ts.wrap([this.ts.trivia(e.trivia),r])}reference_token(e,t){return this.token(e,this.reference.bind(this),{context:t})}name_token(e,t){return this.token(e,this.ts.name,t)}identifier(e,t){return this.ts.wrap([this.reference_token(e.tokens.value,t),this.token(e.tokens.separator)])}}function Ne(e,t){const n=new Map,r=e.filter(e=>"includes"===e.type);for(const e of r){const r=t.get(e.includes);if(!r)continue;const s=n.get(e.target);s?s.push(r):n.set(e.target,[r])}return n}function*Oe(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const s of e)if(s.partial){const e=r.get(s.name);e?e.push(s):r.set(s.name,[s])}else s.name&&(t.has(s.name)?n.add(s):t.set(s.name,s));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:Ne(e,t),cache:{typedefIncludesDictionary:new WeakMap,dictionaryIncludesRequiredField:new WeakMap}}}(e);for(const e of t.all)e.validate&&(yield*e.validate(t));yield*function*({unique:e,duplicates:t}){for(const n of t){const{name:t}=n,r=`The name "${t}" of type "${e.get(t).type}" was already seen`;yield S(n.tokens.name,n,"no-duplicate",r)}}(t)}var je=Object.freeze({__proto__:null,parse:function(e,t={}){const n=new pe(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),Le(n,t)},write:function(e,{templates:t=Ie}={}){t=Object.assign({},Ie,t);const n=new De(t);return t.wrap(e.map((function(e){return"eof"===e.type?t.trivia(e.trivia):e.write(n)})))},validate:function(e){return[...Oe((t=e,t.flat?t.flat():[].concat(...t)))];var t},WebIDLParseError:fe});const ze=/^[!#$%&'*+-.^`|~\w]+$/,Me=/[\u000A\u000D\u0009\u0020]/u,Ue=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function We(e,t,n){(t&&""!==t&&!e.has(t)&&Ue.test(n)||null===n)&&e.set(t.toLowerCase(),n)}var qe={exports:{}},Fe={exports:{}};function Be(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}Fe.exports={defaults:{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:Be,changeDefaults:function(e){Fe.exports.defaults=e}};const He=/[&<>"']/,Ge=/[&<>"']/g,Ve=/[<>"']|&(?!#?\w+;)/,Ze=/[<>"']|&(?!#?\w+;)/g,Ye={"&":"&","<":"<",">":">",'"':""","'":"'"},Je=e=>Ye[e];const Ke=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Qe(e){return e.replace(Ke,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const Xe=/(^|[^\[])\^/g;const et=/[^\w:]/g,tt=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const nt={},rt=/^[^:]+:\/*[^/]*$/,st=/^([^:]+:)[\s\S]*$/,it=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ot(e,t){nt[" "+e]||(rt.test(e)?nt[" "+e]=e+"/":nt[" "+e]=at(e,"/",!0));const n=-1===(e=nt[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(st,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(it,"$1")+t:e+t}function at(e,t,n){const r=e.length;if(0===r)return"";let s=0;for(;s(r=(r=r.source||r).replace(Xe,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(Qe(n)).replace(et,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!tt.test(n)&&(n=ot(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:ot,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n[n.length-1].trim()||n.pop(),n.length>t)n.splice(t);else for(;n.length1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}};const{defaults:lt}=Fe.exports,{rtrim:ut,splitCells:dt,escape:pt,findClosingBracket:ft}=ct;function ht(e,t,n,r){const s=t.href,i=t.title?pt(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:s,title:i,text:o,tokens:r.inlineTokens(o,[])};return r.state.inLink=!1,e}return{type:"image",raw:n,href:s,title:i,text:pt(o)}}var mt=class{constructor(e){this.options=e||lt}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ut(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=ut(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const n={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,s,i,o,a,c,l,u,d,p=t[1].trim();const f=p.length>1,h={type:"list",raw:"",ordered:f,start:f?+p.slice(0,-1):"",loose:!1,items:[]};p=f?"\\d{1,9}\\"+p.slice(-1):"\\"+p,this.options.pedantic&&(p=f?p:"[*+-]");const m=new RegExp(`^( {0,3}${p})((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))`);for(;e&&!this.rules.block.hr.test(e)&&(t=m.exec(e));){u=t[2].split("\n"),this.options.pedantic?(i=2,d=u[0].trimLeft()):(i=t[2].search(/[^ ]/),i=t[1].length+(i>4?1:i),d=u[0].slice(i-t[1].length)),a=!1,n=t[0],!u[0]&&/^ *$/.test(u[1])&&(n=t[1]+u.slice(0,2).join("\n")+"\n",h.loose=!0,u=[]);const p=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(o=1;o=i)&&l.trim()){n=t[1]+u.slice(0,o).join("\n")+"\n";break}d+="\n"+l.slice(i)}else l.trim()||(a=!0),l.search(/[^ ]/)>=i?d+="\n"+l.slice(i):d+="\n"+l}h.loose||(c?h.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(d),r&&(s="[ ] "!==r[0],d=d.replace(/^\[[ xX]\] +/,""))),h.items.push({type:"list_item",raw:n,task:!!r,checked:s,loose:!1,text:d}),h.raw+=n,e=e.slice(n.length)}h.items[h.items.length-1].raw=n.trimRight(),h.items[h.items.length-1].text=d.trimRight(),h.raw=h.raw.trimRight();const g=h.items.length;for(o=0;o"space"===e.type)&&(h.loose=!0,h.items[o].loose=!0);return h}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):pt(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:dt(t[1]).map(e=>({text:e})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,s,i,o=e.align.length;for(n=0;n({text:e}));for(o=e.header.length,r=0;r/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):pt(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=ut(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=ft(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),ht(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ht(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const s=r[1]||r[2]||"";if(!s||s&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let s,i,o=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(i=s.length,r[3]||r[4]){o+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){a+=i;continue}if(o-=i,o>0)continue;if(i=Math.min(i,i+o+a),Math.min(n,i)%2){const t=e.slice(1,n+r.index+i);return{type:"em",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,n+r.index+i-1);return{type:"strong",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=pt(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=pt(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=pt(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=pt(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=pt(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):pt(n[0]):n[0]:pt(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}};const{noopTest:gt,edit:bt,merge:yt}=ct,wt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:gt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};wt.def=bt(wt.def).replace("label",wt._label).replace("title",wt._title).getRegex(),wt.bullet=/(?:[*+-]|\d{1,9}[.)])/,wt.listItemStart=bt(/^( *)(bull) */).replace("bull",wt.bullet).getRegex(),wt.list=bt(wt.list).replace(/bull/g,wt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+wt.def.source+")").getRegex(),wt._tag="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wt._comment=/|$)/,wt.html=bt(wt.html,"i").replace("comment",wt._comment).replace("tag",wt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wt.paragraph=bt(wt._paragraph).replace("hr",wt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",wt._tag).getRegex(),wt.blockquote=bt(wt.blockquote).replace("paragraph",wt.paragraph).getRegex(),wt.normal=yt({},wt),wt.gfm=yt({},wt.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),wt.gfm.table=bt(wt.gfm.table).replace("hr",wt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",wt._tag).getRegex(),wt.pedantic=yt({},wt.normal,{html:bt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",wt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gt,paragraph:bt(wt.normal._paragraph).replace("hr",wt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",wt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const vt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:gt,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:gt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};vt.punctuation=bt(vt.punctuation).replace(/punctuation/g,vt._punctuation).getRegex(),vt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,vt.escapedEmSt=/\\\*|\\_/g,vt._comment=bt(wt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),vt.emStrong.lDelim=bt(vt.emStrong.lDelim).replace(/punct/g,vt._punctuation).getRegex(),vt.emStrong.rDelimAst=bt(vt.emStrong.rDelimAst,"g").replace(/punct/g,vt._punctuation).getRegex(),vt.emStrong.rDelimUnd=bt(vt.emStrong.rDelimUnd,"g").replace(/punct/g,vt._punctuation).getRegex(),vt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,vt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,vt._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])?)+(?![-_])/,vt.autolink=bt(vt.autolink).replace("scheme",vt._scheme).replace("email",vt._email).getRegex(),vt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,vt.tag=bt(vt.tag).replace("comment",vt._comment).replace("attribute",vt._attribute).getRegex(),vt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,vt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,vt.link=bt(vt.link).replace("label",vt._label).replace("href",vt._href).replace("title",vt._title).getRegex(),vt.reflink=bt(vt.reflink).replace("label",vt._label).getRegex(),vt.reflinkSearch=bt(vt.reflinkSearch,"g").replace("reflink",vt.reflink).replace("nolink",vt.nolink).getRegex(),vt.normal=yt({},vt),vt.pedantic=yt({},vt.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",vt._label).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",vt._label).getRegex()}),vt.gfm=yt({},vt.normal,{escape:bt(vt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Tt=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||xt,this.options.tokenizer=this.options.tokenizer||new $t,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:_t.normal,inline:St.normal};this.options.pedantic?(t.block=_t.pedantic,t.inline=St.pedantic):this.options.gfm&&(t.block=_t.gfm,this.options.breaks?t.inline=St.breaks:t.inline=St.gfm),this.tokenizer.rules=t}static get rules(){return{block:_t,inline:St}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,s,i;for(this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let n,r,s,i,o,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+Ct("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+Ct("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,Rt))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,Rt))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s,Et))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),o=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}};const{defaults:At}=Fe.exports,{cleanUrl:Lt,escape:Pt}=ct;var It=class{constructor(e){this.options=e||At}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:Pt(e,!0))+"
    \n":"
    "+(n?e:Pt(e,!0))+"
    \n"}blockquote(e){return"
    \n"+e+"
    \n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"}hr(){return this.options.xhtml?"
    \n":"
    \n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e){return"
  • "+e+"
  • \n"}checkbox(e){return" "}paragraph(e){return"

    "+e+"

    \n"}table(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return"\n"+e+"\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"}strong(e){return""+e+""}em(e){return""+e+""}codespan(e){return""+e+""}br(){return this.options.xhtml?"
    ":"
    "}del(e){return""+e+""}link(e,t,n){if(null===(e=Lt(this.options.sanitize,this.options.baseUrl,e)))return n;let r='
    ",r}image(e,t,n){if(null===(e=Lt(this.options.sanitize,this.options.baseUrl,e)))return n;let r=''+n+'":">",r}text(e){return e}},Dt=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}},Nt=class{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}};const Ot=It,jt=Dt,zt=Nt,{defaults:Mt}=Fe.exports,{unescape:Ut}=ct;var Wt=class e{constructor(e){this.options=e||Mt,this.options.renderer=this.options.renderer||new Ot,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new jt,this.slugger=new zt}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,r,s,i,o,a,c,l,u,d,p,f,h,m,g,b,y,w,v,k="";const $=e.length;for(n=0;n<$;n++)if(d=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(v=this.options.extensions.renderers[d.type].call({parser:this},d),!1!==v||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)))k+=v||"";else switch(d.type){case"space":continue;case"hr":k+=this.renderer.hr();continue;case"heading":k+=this.renderer.heading(this.parseInline(d.tokens),d.depth,Ut(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":k+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(l="",c="",i=d.header.length,r=0;r0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(g.tokens,h),u+=this.renderer.listitem(m,y,b);k+=this.renderer.list(u,p,f);continue;case"html":k+=this.renderer.html(d.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<$&&"text"===e[n+1].type;)d=e[++n],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);k+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return k}parseInline(e,t){t=t||this.renderer;let n,r,s,i="";const o=e.length;for(n=0;n{r(e.text,e.lang,(function(t,n){if(t)return i(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),o--,0===o&&i()}))},0))})),void(0===o&&i())}try{const n=qt.lex(e,t);return t.walkTokens&&en.walkTokens(n,t.walkTokens),Ft.parse(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+Jt(e.message+"",!0)+"
    ";throw e}}en.options=en.setOptions=function(e){return Zt(en.defaults,e),Qt(en.defaults),en},en.getDefaults=Kt,en.defaults=Xt,en.use=function(...e){const t=Zt({},...e),n=en.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach(e=>{if(e.extensions&&(r=!0,e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let r=e.renderer.apply(this,n);return!1===r&&(r=t.apply(this,n)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)})),e.renderer){const n=en.defaults.renderer||new Ht;for(const t in e.renderer){const r=n[t];n[t]=(...s)=>{let i=e.renderer[t].apply(n,s);return!1===i&&(i=r.apply(n,s)),i}}t.renderer=n}if(e.tokenizer){const n=en.defaults.tokenizer||new Bt;for(const t in e.tokenizer){const r=n[t];n[t]=(...s)=>{let i=e.tokenizer[t].apply(n,s);return!1===i&&(i=r.apply(n,s)),i}}t.tokenizer=n}if(e.walkTokens){const n=en.defaults.walkTokens;t.walkTokens=t=>{e.walkTokens.call(this,t),n&&n(t)}}r&&(t.extensions=n),en.setOptions(t)})},en.walkTokens=function(e,t){for(const n of e)switch(t(n),n.type){case"table":for(const e of n.header)en.walkTokens(e.tokens,t);for(const e of n.rows)for(const n of e)en.walkTokens(n.tokens,t);break;case"list":en.walkTokens(n.items,t);break;default:en.defaults.extensions&&en.defaults.extensions.childTokens&&en.defaults.extensions.childTokens[n.type]?en.defaults.extensions.childTokens[n.type].forEach((function(e){en.walkTokens(n[e],t)})):n.tokens&&en.walkTokens(n.tokens,t)}},en.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Zt({},en.defaults,t||{}),Yt(t);try{const n=qt.lexInline(e,t);return t.walkTokens&&en.walkTokens(n,t.walkTokens),Ft.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+Jt(e.message+"",!0)+"
    ";throw e}},en.Parser=Ft,en.parser=Ft.parse,en.Renderer=Ht,en.TextRenderer=Gt,en.Lexer=qt,en.lexer=qt.lex,en.Tokenizer=Bt,en.Slugger=Vt,en.parse=en;const tn=en,nn=Tt,rn=Wt,sn=mt,on=It,an=Dt,cn=Nt;qe.exports=tn,qe.exports.parse=tn,qe.exports.Parser=rn,qe.exports.parser=rn.parse,qe.exports.Renderer=on,qe.exports.TextRenderer=an,qe.exports.Lexer=nn,qe.exports.lexer=nn.lex,qe.exports.Tokenizer=sn,qe.exports.Slugger=cn;var ln=qe.exports;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var un,dn={exports:{}};un=dn,function(e,t){un.exports=t()}(0,(function(){var e=[],t=[],n={},r={},s={};function i(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function o(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(/\$(\d{1,2})/g,(function(e,n){return t[n]||""}))}function c(e,t){return e.replace(t[0],(function(n,r){var s=a(t[1],arguments);return o(""===n?e[r-1]:n,s)}))}function l(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var s=r.length;s--;){var i=r[s];if(i[0].test(t))return c(t,i)}return t}function u(e,t,n){return function(r){var s=r.toLowerCase();return t.hasOwnProperty(s)?o(r,s):e.hasOwnProperty(s)?o(r,e[s]):l(s,r,n)}}function d(e,t,n,r){return function(r){var s=r.toLowerCase();return!!t.hasOwnProperty(s)||!e.hasOwnProperty(s)&&l(s,s,n)===s}}function p(e,t,n){return(n?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=u(s,r,e),p.isPlural=d(s,r,e),p.singular=u(r,s,t),p.isSingular=d(r,s,t),p.addPluralRule=function(t,n){e.push([i(t),n])},p.addSingularRule=function(e,n){t.push([i(e),n])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),s[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return p.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 p.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 p.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(p.addUncountableRule),p}));var pn=dn.exports,fn=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,s=i.prototype;return s.delete=function(e){return this.has(e)&&delete e[this._]},s.get=function(e){return this.has(e)?e[this._]:void 0},s.has=function(e){return r.call(e,this._)},s.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},i;function i(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(o,this)}function o(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=s.prototype;function s(){t(this,"_",{value:"_@ungap/weakmap"+e++})}n.add=function(e){return this.has(e)||t(e,this._,{value:!0,configurable:!0}),this},n.has=function(e){return this.hasOwnProperty.call(e,this._)},n.delete=function(e){return this.has(e)&&delete e[this._]},r.WeakSet=s}(Math.random(),Object.defineProperty)}function s(e,t,n,r,s,i){for(var o=("selectedIndex"in t),a=o;r>>0;no;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,k=w.oldi;v"+e+"",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=z(C),n=z("div");return n.innerHTML=''+e+"",j(t,n.firstChild.childNodes),t}:R)(e)});function j(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===C?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var M,U,W,q,F,B,H,G,V,Z=(U="appendChild",W="cloneNode",q="createTextNode",B=(F="importNode")in(M=e),(H=M.createDocumentFragment())[U](M[q]("g")),H[U](M[q]("")),(B?M[F](H,!0):H[W](!0)).childNodes.length<2?function e(t,n){for(var r=t[W](),s=t.childNodes||[],i=s.length,o=0;n&&o

    ',G.content.childNodes[0].getAttribute(V)==J)||(J="_dt: "+J.slice(1,-1)+";",K=!0)}catch(u){}var Q="\x3c!--"+J+"--\x3e",X=/^(?:style|textarea)$/i,ee=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,te=" \\f\\n\\r\\t",ne="[^"+te+"\\/>\"'=]+",re="["+te+"]+"+ne,se="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ie="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+ne.replace("\\/","")+"))?)",oe=new RegExp(se+re+ie+"+)(["+te+"]*/?>)","g"),ae=new RegExp(se+re+ie+"*)(["+te+"]*/>)","g"),ce=new RegExp("("+re+"\\s*=\\s*)(['\"]?)"+Q+"\\2","gi");function le(e,t,n,r){return"<"+t+n.replace(ce,ue)+r}function ue(e,t,n){return t+(n||'"')+J+(n||'"')}function de(e,t,n){return ee.test(t)?e:"<"+t+n+">"}var pe=K?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 fe(t,n,r,s){for(var i=t.childNodes,o=i.length,a=0;a{e.remove()})}function Sn(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:s})=>"element"===n&&t?t(s,r++,e):s)}}const Cn=Sn("conjunction"),En=Sn("disjunction");function Rn(e,t){return Cn(e,t).join("")}function Tn(e,t){return En(e,t).join("")}function An(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/"/g,""").replace(/new Date)return i}catch(e){console.error("Failed to use Cache API.",e)}const o=await fetch(n);if(!o.ok&&i)return console.warn("Returning a stale cached response for "+r),i;if(s&&o.ok){const e=o.clone(),r=new Headers(o.headers),i=new Date(Date.now()+t);r.set("Expires",i.toISOString());const a=new Response(await e.blob(),{headers:r});await s.put(n,a).catch(console.error)}return o}function jn(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map(e=>gn`${e}, `);return gn`${r}${n[n.length-1]}`}function zn(e,t){return[].concat(Cn(e,t)).map(e=>"string"==typeof e?gn`${e}`:e)}function Mn(e,t=""){return Un(e,t,function(e){let t=0;for(const n of e)t=Math.imul(31,t)+n.charCodeAt(0)|0;return String(t)}(Ln(e.textContent)))}function Un(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let s=r?n:n.toLowerCase();if(s=s.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),s?!/\.$/.test(s)&&/^[a-z]/i.test(t||s)||(s="x"+s):s="generatedID",t&&(s=`${t}-${s}`),e.ownerDocument.getElementById(s)){let t=0,n=`${s}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${s}-${t}`;s=n}return e.id=s,s}function Wn(e){const t=new Set,n="ltNodefault"in e.dataset?"":Ln(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map(e=>Ln(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(Ln(e)))}return[...t]}function qn(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 Fn(e,t){const n=t.closest($n);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 Bn(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Hn(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 Gn(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 Vn 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 Zn(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach(e=>e.removeAttribute("id")),t.querySelectorAll("dfn").forEach(e=>{qn(e,"span",{copyAttributes:!1})}),t.hasAttribute("id")&&t.removeAttribute("id"),Yn(t),t}function Yn(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Jn(t)])e.remove()}function*Jn(e){for(;e.nextNode();)yield e.currentNode}class Kn 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 Qn extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach(t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||Un(e,"respec-offender")}(t,e,n.title))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:s,elements:i,title:o,details:a}=this;return{message:e,name:t,plugin:r,hint:s,elements:i,title:o,details:a,stack:n}}}function Xn(e,t,n={}){const r={...n,isWarning:!1};cr("error",new Qn(e,t,r))}function er(e,t,n={}){const r={...n,isWarning:!0};cr("warn",new Qn(e,t,r))}function tr(e){return e?`\`${e}\``:""}function nr(e,{quotes:t}={quotes:!1}){return Tn(e,t?e=>tr(sr(e)):tr)}function rr(e,{quotes:t}={quotes:!1}){return Rn(e,t?e=>tr(sr(e)):tr)}function sr(e){return String(e)?`"${e}"`:""}function ir(e,...t){return e.map((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[s,i]=r.slice(1,-1).split("|");if(i){return`${e}[${s}](${new URL(i,"https://respec.org/docs/")})`}return`${e}[\`${s}\`](https://respec.org/docs/#${s})`}).join("")}const or="core/pubsubhub",ar=new Map;function cr(e,...t){if(!ar.has(e))return;if(Array.from(ar.get(e)).forEach(e=>{try{e(...t)}catch(t){Xn(`Error when calling function ${e.name}.`,or,{hint:"See developer console."}),console.error(t)}}),window.parent===window.self)return;const n=t.map(e=>String(JSON.stringify(e.stack||e)));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function lr(e,t,n={once:!1}){return n.once?lr(e,(function n(...r){!function({topic:e,cb:t}){const n=ar.get(e);if(!n||!n.has(t))return console.warn("Already unsubscribed:",e,t),!1;n.delete(t)}({topic:e,cb:n}),t(...r)})):(ar.has(e)?ar.get(e).add(t):ar.set(e,new Set([t])),{topic:e,cb:t})}t(or,{sub:lr});const ur=["githubToken","githubUser"];const dr=new Map([["text/html","html"],["application/xml","xml"]]);function pr(e,t=document){const n=dr.get(e);if(!n){const t=[...dr.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=fr(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function fr(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;Yn(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach(e=>e.remove()),n.classList.remove("toc-sidebar"),_n(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let o=e.querySelector("meta[charset], meta[content*='charset=']");o||(o=gn``);s.appendChild(o);const a="ReSpec "+(window.respecVersion||"Developer Channel"),c=gn` - `;s.appendChild(c),t.prepend(s),Qn("beforesave",r)}(n);let r="";switch(e){case"xml":r=(new XMLSerializer).serializeToString(n);break;default:!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}t("core/exporter",{rsDocToDataURL:nr});class sr{constructor(){this._respecDonePromise=new Promise(e=>{Xn("end-all",e,{once:!0})}),this.errors=[],this.warnings=[],Xn("error",e=>{console.error(e,e.toJSON()),this.errors.push(e)}),Xn("warn",e=>{console.warn(e,e.toJSON()),this.warnings.push(e)})}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return rr("html",document)}}const ir="core/post-process";const or="core/pre-process";const ar="core/base-runner";async function cr(e){!function(){const e=new sr;Object.defineProperty(document,"respec",{value:e});let t=!1;Object.defineProperty(document,"respecIsReady",{get:()=>(t||(Bn("`document.respecIsReady` is deprecated and will be removed in a future release.","core/respec-global",{hint:"Use `document.respec.ready` instead."}),t=!0),document.respec.ready)})}(),Qn("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),Xn("amend-user-config",n),Xn("end-all",()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of er)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)})}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter(([e,t])=>!!e&&!!t).map(([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let s;try{s=JSON.parse(r)}catch{s=r}return[n,s]}),r=Object.fromEntries(n);Object.assign(e,r),Qn("amend-user-config",r)}(respecConfig),performance.mark(ar+"-start"),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter(e=>{const t="function"==typeof e;return t||Fn("Every item in `preProcess` must be a JS function.",or),t}).map(async t=>{try{return await t(e,document)}catch(e){Fn(`Function ${t.name} threw an error during \`preProcess\`.`,or,{hint:"See developer console."}),console.error(e)}});await Promise.all(t)}}(respecConfig);const t=e.filter(e=>{return(t=e)&&(t.run||t.Plugin);var t});t.forEach(e=>!e.name&&console.warn("Plugin lacks name:",e)),respecConfig.state={},await async function(e,t){for(const n of e.filter(e=>e.prepare))try{await n.prepare(t)}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise(async(r,s)=>{const i=setTimeout(()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),s(new Error(t))},15e3);performance.mark(e+"-start");try{n.Plugin?(await new n.Plugin(t).run(),r()):n.run&&(await n.run(t),r())}catch(e){s(e)}finally{clearTimeout(i),performance.mark(e+"-end"),performance.measure(e,e+"-start",e+"-end")}})}catch(e){console.error(e)}}}(t,respecConfig),respecConfig.state={},Qn("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||Fn("Every item in `postProcess` must be a JS function.",ir),t}).map(async t=>{try{return await t(e,document)}catch(e){Fn(`Function ${t.name} threw an error during \`postProcess\`.`,ir,{hint:"See developer console."}),console.error(e)}});await Promise.all(t)}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),Qn("end-all"),hn(document),performance.mark(ar+"-end"),performance.measure(ar,ar+"-start",ar+"-end")}var lr=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} + `;s.appendChild(c),t.prepend(s),cr("beforesave",r)}(n);let r="";switch(e){case"xml":r=(new XMLSerializer).serializeToString(n);break;default:!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}t("core/exporter",{rsDocToDataURL:pr});class hr{constructor(){this._respecDonePromise=new Promise(e=>{lr("end-all",e,{once:!0})}),this.errors=[],this.warnings=[],lr("error",e=>{console.error(e,e.toJSON()),this.errors.push(e)}),lr("warn",e=>{console.warn(e,e.toJSON()),this.warnings.push(e)})}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return fr("html",document)}}const mr="core/post-process";const gr="core/pre-process";const br="core/base-runner";async function yr(e){!function(){const e=new hr;Object.defineProperty(document,"respec",{value:e});let t=!1;Object.defineProperty(document,"respecIsReady",{get:()=>(t||(er("`document.respecIsReady` is deprecated and will be removed in a future release.","core/respec-global",{hint:"Use `document.respec.ready` instead."}),t=!0),document.respec.ready)})}(),cr("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),lr("amend-user-config",n),lr("end-all",()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of ur)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)})}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter(([e,t])=>!!e&&!!t).map(([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let s;try{s=JSON.parse(r)}catch{s=r}return[n,s]}),r=Object.fromEntries(n);Object.assign(e,r),cr("amend-user-config",r)}(respecConfig),performance.mark(br+"-start"),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter(e=>{const t="function"==typeof e;return t||Xn("Every item in `preProcess` must be a JS function.",gr),t}).map(async t=>{try{return await t(e,document)}catch(e){Xn(`Function ${t.name} threw an error during \`preProcess\`.`,gr,{hint:"See developer console."}),console.error(e)}});await Promise.all(t)}}(respecConfig);const t=e.filter(e=>{return(t=e)&&(t.run||t.Plugin);var t});t.forEach(e=>!e.name&&console.warn("Plugin lacks name:",e)),respecConfig.state={},await async function(e,t){for(const n of e.filter(e=>e.prepare))try{await n.prepare(t)}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise(async(r,s)=>{const i=setTimeout(()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),s(new Error(t))},15e3);performance.mark(e+"-start");try{n.Plugin?(await new n.Plugin(t).run(),r()):n.run&&(await n.run(t),r())}catch(e){s(e)}finally{clearTimeout(i),performance.mark(e+"-end"),performance.measure(e,e+"-start",e+"-end")}})}catch(e){console.error(e)}}}(t,respecConfig),respecConfig.state={},cr("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||Xn("Every item in `postProcess` must be a JS function.",mr),t}).map(async t=>{try{return await t(e,document)}catch(e){Xn(`Function ${t.name} threw an error during \`postProcess\`.`,mr,{hint:"See developer console."}),console.error(e)}});await Promise.all(t)}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),cr("end-all"),_n(document),performance.mark(br+"-end"),performance.measure(br,br+"-start",br+"-end")}var wr=String.raw`.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0} #respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000} #respec-pill,.respec-info-button{background:#fff;height:2.5em;color:#787878;border:1px solid #ccc;box-shadow:1px 1px 8px 0 rgba(100,100,100,.5)} .respec-info-button{border:none;opacity:.75;border-radius:2em;margin-right:1em;min-width:3.5em} @@ -55,37 +55,37 @@ window.respecVersion="26.16.0",function(){"use strict";const e=!!window.require; } .respec-iframe{width:100%;min-height:550px;height:100%;overflow:hidden;padding:0;margin:0;border:0} .respec-iframe:not(.ready){background:url(https://respec.org/xref/loader.gif) no-repeat center} -.respec-iframe+a[href]{font-size:.9rem;float:right;margin:0 .5em .5em;border-bottom-width:1px}`;function ur(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")}var dr=Object.freeze({__proto__:null,name:"core/reindent",reindent:ur,run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=ur(e.innerHTML)}});const pr=/>/gm,fr=/&/gm;class hr extends an.Renderer{code(e,t,n){const{language:r,...s}=hr.parseInfoString(t);if(/(^webidl$)/i.test(r))return`
    ${e}
    `;const i=super.code(e,r,n),{example:o,illegalExample:a}=s;if(!o&&!a)return i;const c=o||a,l=`${r} ${o?"example":"illegal-example"}`;return i.replace("
    ",`
    `)}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 s;if(r)try{s=JSON.parse(`{ ${r} }`)}catch(e){console.error(e)}return{language:n,...s}}heading(e,t,n,r){const s=/(.+)\s+{#([\w-]+)}$/;if(s.test(e)){const[,n,r]=e.match(s);return`${n}`}return super.heading(e,t,n,r)}}function mr(e){const t=ur(e).replace(pr,">").replace(fr,"&");return an(t,{sanitize:!1,gfm:!0,headerIds:!1,langPrefix:"",renderer:new hr})}function gr(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=mr(e.innerHTML)}class br{constructor(e){this.doc=e,this.root=e.createDocumentFragment(),this.stack=[this.root],this.current=this.root}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}addSection(e,t){const n=this.findHeader(e),r=n?this.findPosition(n):1,s=this.findParent(r);n&&e.removeChild(n),e.appendChild(t(e)),n&&e.prepend(n),s.appendChild(e),this.current=s}addElement(e){this.current.appendChild(e)}}function yr(e,t){return function e(n){const r=new br(t);for(;n.firstChild;){const t=n.firstChild;if(t.nodeType===Node.ELEMENT_NODE)switch(t.localName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":r.addHeader(t);break;case"section":r.addSection(t,e);break;default:r.addElement(t)}else n.removeChild(t)}return r.root}(e)}function wr(e){const t=yr(e,e.ownerDocument);if("section"===t.firstElementChild.localName&&"section"===e.localName){const n=t.firstElementChild;n.remove(),e.append(...n.childNodes)}else e.textContent="";e.appendChild(t)}const vr=(kr="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(kr);return t.forEach(gr),Array.from(t)});var kr;var $r=Object.freeze({__proto__:null,name:"core/markdown",markdownToHtml:mr,restructure:wr,run:function(e){const t=!!document.querySelector("[data-format=markdown]:not(body)"),n="markdown"===e.format;if(!n&&!t)return;if(!n){for(const e of vr(document.body))wr(e);return}const r=document.getElementById("respec-ui");r.remove();const s=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"),s=n.slice(-2).join("\n");if(r.trim()&&e.prepend("\n\n"),s.trim()){const t=On(e);e.append("\n\n"+t)}}}(s,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),gr(s),function(e){Array.from(e).forEach(e=>{e.replaceWith(e.textContent)})}(s.querySelectorAll(".nolinks a[href]"));const i=yr(s,document);s.append(r,i),document.body.replaceWith(s)}});function xr(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=lr,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const _r=on``,Sr=on`
      e.trim()).map(e=>e.search(/[^\s]/)),r=Math.min(...n);return t.map(e=>e.slice(r)).join("\n")}var kr=Object.freeze({__proto__:null,name:"core/reindent",reindent:vr,run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=vr(e.innerHTML)}});const $r=/>/gm,xr=/&/gm;class _r extends bn.Renderer{code(e,t,n){const{language:r,...s}=_r.parseInfoString(t);if(/(^webidl$)/i.test(r))return`
      ${e}
      `;const i=super.code(e,r,n),{example:o,illegalExample:a}=s;if(!o&&!a)return i;const c=o||a,l=`${r} ${o?"example":"illegal-example"}`;return i.replace("
      ",`
      `)}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 s;if(r)try{s=JSON.parse(`{ ${r} }`)}catch(e){console.error(e)}return{language:n,...s}}heading(e,t,n,r){const s=/(.+)\s+{#([\w-]+)}$/;if(s.test(e)){const[,n,r]=e.match(s);return`${n}`}return super.heading(e,t,n,r)}}function Sr(e){const t=vr(e).replace($r,">").replace(xr,"&");return bn(t,{sanitize:!1,gfm:!0,headerIds:!1,langPrefix:"",renderer:new _r})}function Cr(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=Sr(e.innerHTML)}class Er{constructor(e){this.doc=e,this.root=e.createDocumentFragment(),this.stack=[this.root],this.current=this.root}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}addSection(e,t){const n=this.findHeader(e),r=n?this.findPosition(n):1,s=this.findParent(r);n&&e.removeChild(n),e.appendChild(t(e)),n&&e.prepend(n),s.appendChild(e),this.current=s}addElement(e){this.current.appendChild(e)}}function Rr(e,t){return function e(n){const r=new Er(t);for(;n.firstChild;){const t=n.firstChild;if(t.nodeType===Node.ELEMENT_NODE)switch(t.localName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":r.addHeader(t);break;case"section":r.addSection(t,e);break;default:r.addElement(t)}else n.removeChild(t)}return r.root}(e)}function Tr(e){const t=Rr(e,e.ownerDocument);if("section"===t.firstElementChild.localName&&"section"===e.localName){const n=t.firstElementChild;n.remove(),e.append(...n.childNodes)}else e.textContent="";e.appendChild(t)}const Ar=(Lr="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(Lr);return t.forEach(Cr),Array.from(t)});var Lr;var Pr=Object.freeze({__proto__:null,name:"core/markdown",markdownToHtml:Sr,restructure:Tr,run:function(e){const t=!!document.querySelector("[data-format=markdown]:not(body)"),n="markdown"===e.format;if(!n&&!t)return;if(!n){for(const e of Ar(document.body))Tr(e);return}const r=document.getElementById("respec-ui");r.remove();const s=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"),s=n.slice(-2).join("\n");if(r.trim()&&e.prepend("\n\n"),s.trim()){const t=Gn(e);e.append("\n\n"+t)}}}(s,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),Cr(s),function(e){Array.from(e).forEach(e=>{e.replaceWith(e.textContent)})}(s.querySelectorAll(".nolinks a[href]"));const i=Rr(s,document);s.append(r,i),document.body.replaceWith(s)}});function Ir(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=wr,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const Dr=gn``,Nr=gn``,Cr=on`
    `,Or=gn``;let Er,Rr;window.addEventListener("load",()=>Dr(Sr));const Tr=[],Ar=[],Lr={};Xn("start-all",()=>document.body.prepend(_r),{once:!0}),Xn("end-all",()=>document.body.prepend(_r),{once:!0});const Pr=on``;function Ir(){Sr.classList.toggle("respec-hidden"),Sr.classList.toggle("respec-visible"),Sr.hidden=!Sr.hidden}function Dr(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()))})}_r.appendChild(Pr),Pr.addEventListener("click",e=>{e.stopPropagation(),Pr.setAttribute("aria-expanded",String(Sr.hidden)),Ir(),Sr.querySelector("li:first-child button").focus()}),document.documentElement.addEventListener("click",()=>{Sr.hidden||Ir()}),_r.appendChild(Sr),Sr.addEventListener("keydown",e=>{"Escape"!==e.key||Sr.hidden||(Pr.setAttribute("aria-expanded",String(Sr.hidden)),Ir(),Pr.focus())});const Nr=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function Or(e,t,n,r){t.push(e),Lr.hasOwnProperty(n)||(Lr[n]=function(e,t,n){const r=on``;function Fr(){Nr.classList.toggle("respec-hidden"),Nr.classList.toggle("respec-visible"),Nr.hidden=!Nr.hidden}function Br(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()))})}Dr.appendChild(qr),qr.addEventListener("click",e=>{e.stopPropagation(),qr.setAttribute("aria-expanded",String(Nr.hidden)),Fr(),Nr.querySelector("li:first-child button").focus()}),document.documentElement.addEventListener("click",()=>{Nr.hidden||Fr()}),Dr.appendChild(Nr),Nr.addEventListener("keydown",e=>{"Escape"!==e.key||Nr.hidden||(qr.setAttribute("aria-expanded",String(Nr.hidden)),Fr(),qr.focus())});const Hr=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function Gr(e,t,n,r){t.push(e),Wr.hasOwnProperty(n)||(Wr[n]=function(e,t,n){const r=gn``;r.addEventListener("click",()=>{r.setAttribute("aria-expanded","true");const s=on`
      `;for(const e of t){const t=document.createRange().createContextualFragment(zr(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),s.appendChild(n)}jr.freshModal(n,s,r)});const s=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return xr(r,s),r}(n,t,r),_r.appendChild(Lr[n]));const s=Lr[n];s.textContent=t.length;const i=1===t.length?cn.singular(r):r;xr(s,new Map([["label",`${t.length} ${i}`]]))}xr(Pr,Nr);const jr={show(){try{_r.hidden=!1}catch(e){console.error(e)}},hide(){_r.hidden=!0},enable(){Pr.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const s="respec-button-"+e.toLowerCase().replace(/\s+/,"-"),i=on``;r.addEventListener("click",()=>{r.setAttribute("aria-expanded","true");const s=gn`
        `;for(const e of t){const t=document.createRange().createContextualFragment(Zr(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),s.appendChild(n)}Vr.freshModal(n,s,r)});const s=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return Ir(r,s),r}(n,t,r),Dr.appendChild(Wr[n]));const s=Wr[n];s.textContent=t.length;const i=1===t.length?yn.singular(r):r;Ir(s,new Map([["label",`${t.length} ${i}`]]))}Ir(qr,Hr);const Vr={show(){try{Dr.hidden=!1}catch(e){console.error(e)}},hide(){Dr.hidden=!0},enable(){qr.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const s="respec-button-"+e.toLowerCase().replace(/\s+/,"-"),i=gn``,o=on`
      1. ${i}
      2. `;return o.addEventListener("click",t),Sr.appendChild(o),i},error(e){Or(e,Tr,"error","ReSpec Errors")},warning(e){Or(e,Ar,"warning","ReSpec Warnings")},closeModal(e){Rr&&(Rr.classList.remove("respec-show-overlay"),Rr.classList.add("respec-hide-overlay"),Rr.addEventListener("transitionend",()=>{Rr.remove(),Rr=null})),e&&e.setAttribute("aria-expanded","false"),Er&&(Er.remove(),Er=null,Pr.focus())},freshModal(e,t,n){Er&&Er.remove(),Rr&&Rr.remove(),Rr=on`
        `;const r=n.id+"-modal",s=r+"-heading";Er=on`
        `,o=gn`
      3. ${i}
      4. `;return o.addEventListener("click",t),Nr.appendChild(o),i},error(e){Gr(e,Mr,"error","ReSpec Errors")},warning(e){Gr(e,Ur,"warning","ReSpec Warnings")},closeModal(e){zr&&(zr.classList.remove("respec-show-overlay"),zr.classList.add("respec-hide-overlay"),zr.addEventListener("transitionend",()=>{zr.remove(),zr=null})),e&&e.setAttribute("aria-expanded","false"),jr&&(jr.remove(),jr=null,qr.focus())},freshModal(e,t,n){jr&&jr.remove(),zr&&zr.remove(),zr=gn`
        `;const r=n.id+"-modal",s=r+"-heading";jr=gn``;const i=new Map([["labelledby",s]]);xr(Er,i),document.body.append(Rr,Er),Rr.addEventListener("click",()=>this.closeModal(n)),Rr.classList.toggle("respec-show-overlay"),Er.hidden=!1,Dr(Er)}};function zr(e){if("string"==typeof e)return e;const t=e.plugin?` (Plugin: "${e.plugin}").`:"",n=e.hint?" "+e.hint:"",r=Array.isArray(e.elements)?` Occurred at: ${yn(e.elements.map(Mr))}.`:"",s=e.details?`\n\n
        \n${e.details}\n
        \n`:"";return mr(`${e.message}${n}${r}${t}${s}`)}function Mr(e,t){return`[${t+1}](#${e.id})`}async function Ur(e){try{jr.show(),await async function(){"loading"===document.readyState&&await new Promise(e=>document.addEventListener("DOMContentLoaded",e))}(),await cr(e)}finally{jr.enable()}}document.addEventListener("keydown",e=>{"Escape"===e.key&&jr.closeModal()}),window.respecUI=jr,Xn("error",e=>jr.error(e)),Xn("warn",e=>jr.warning(e)),window.addEventListener("error",e=>{console.error(e.error,e.message,e)});const Wr=[Promise.resolve().then((function(){return qr})),Promise.resolve().then((function(){return i})),Promise.resolve().then((function(){return Gr})),Promise.resolve().then((function(){return zs})),Promise.resolve().then((function(){return Ws})),Promise.resolve().then((function(){return Bs})),Promise.resolve().then((function(){return Gs})),Promise.resolve().then((function(){return Qs})),Promise.resolve().then((function(){return ti})),Promise.resolve().then((function(){return $r})),Promise.resolve().then((function(){return dr})),Promise.resolve().then((function(){return si})),Promise.resolve().then((function(){return ai})),Promise.resolve().then((function(){return Is})),Promise.resolve().then((function(){return ui})),Promise.resolve().then((function(){return di})),Promise.resolve().then((function(){return hi})),Promise.resolve().then((function(){return _o})),Promise.resolve().then((function(){return Eo})),Promise.resolve().then((function(){return zo})),Promise.resolve().then((function(){return Mo})),Promise.resolve().then((function(){return Fo})),Promise.resolve().then((function(){return Zo})),Promise.resolve().then((function(){return Xo})),Promise.resolve().then((function(){return na})),Promise.resolve().then((function(){return _a})),Promise.resolve().then((function(){return Bi})),Promise.resolve().then((function(){return Fa})),Promise.resolve().then((function(){return rc})),Promise.resolve().then((function(){return Da})),Promise.resolve().then((function(){return sc})),Promise.resolve().then((function(){return to})),Promise.resolve().then((function(){return bc})),Promise.resolve().then((function(){return wc})),Promise.resolve().then((function(){return vc})),Promise.resolve().then((function(){return Rc})),Promise.resolve().then((function(){return Ac})),Promise.resolve().then((function(){return Lc})),Promise.resolve().then((function(){return Oc})),Promise.resolve().then((function(){return Bc})),Promise.resolve().then((function(){return Zc})),Promise.resolve().then((function(){return Qc})),Promise.resolve().then((function(){return rl})),Promise.resolve().then((function(){return ll})),Promise.resolve().then((function(){return ul})),Promise.resolve().then((function(){return hl})),Promise.resolve().then((function(){return kl})),Promise.resolve().then((function(){return da})),Promise.resolve().then((function(){return Rl})),Promise.resolve().then((function(){return Il})),Promise.resolve().then((function(){return Ml})),Promise.resolve().then((function(){return ql})),Promise.resolve().then((function(){return Bl})),Promise.resolve().then((function(){return Gl})),Promise.resolve().then((function(){return Xl})),Promise.resolve().then((function(){return su})),Promise.resolve().then((function(){return iu})),Promise.resolve().then((function(){return lu})),Promise.resolve().then((function(){return hu})),Promise.resolve().then((function(){return yu})),Promise.resolve().then((function(){return xu})),Promise.resolve().then((function(){return Ru})),Promise.resolve().then((function(){return Pu})),Promise.resolve().then((function(){return Ou})),Promise.resolve().then((function(){return Uu})),Promise.resolve().then((function(){return Bu})),Promise.resolve().then((function(){return Zu}))];Promise.all(Wr).then(e=>Ur(e)).catch(e=>console.error(e));var qr=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){location.hash&&document.respec.ready.then(()=>{let e=decodeURIComponent(location.hash).substr(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)}location.hash="#"+e})}});const Fr="w3c/group",Br=["wg","wgURI","wgId","wgPatentURI","wgPatentPolicy"];async function Hr(e){let t="",n=e;e.includes("/")&&([t,n]=e.split("/",2));const r=new URL(`${n}/${t}`,"https://respec.org/w3c/groups/"),s=await Cn(r.href);if(s.ok){const e=await s.json(),{id:t,name:n,URI:r,patentURI:i,patentPolicy:o,type:a}=e;return{wg:n,wgId:t,wgURI:r,wgPatentURI:i,wgPatentPolicy:o,groupType:a}}const i=await s.text(),o=`Failed to fetch group details (HTTP: ${s.status}). ${i}`,a=404===s.status?Yn`See the list of [supported group names](https://respec.org/w3c/groups/) to use with the ${"[group]"} configuration option.`:void 0;Fn(o,Fr,{hint:a})}var Gr=Object.freeze({__proto__:null,name:Fr,run:async function(e){const t=Br.filter(t=>e[t]);if(!e.group){if(t.length){const e=Yn`Please use the ${"[group]"} configuration option instead.`;Bn(`Configuration options ${Vn(Br)} are deprecated.`,Fr,{hint:e})}return}if(t.length){const e=Yn`Remove them from the document's ${"[respecConfig]"} to silence this warning.`;Bn(Yn`Configuration options ${Vn(t)} are superseded by ${"[group]"} and will be overridden by ReSpec.`,Fr,{hint:e})}const{group:n}=e,r=Array.isArray(n)?await async function(e){const t=await Promise.all(e.map(Hr)),n={wg:[],wgId:[],wgURI:[],wgPatentURI:[],wgPatentPolicy:[],groupType:[]};for(const e of t.filter(e=>e))for(const t of Object.keys(n))n[t].push(e[t]);return n}(n):await Hr(n);Object.assign(e,r)}});function Vr(e){if(!e.key){const t="Found a link without `key` attribute in the configuration. See dev console.";return Bn(t,"core/templates/show-link"),void console.warn(t,e)}return on` +
        `;const i=new Map([["labelledby",s]]);Ir(jr,i),document.body.append(zr,jr),zr.addEventListener("click",()=>this.closeModal(n)),zr.classList.toggle("respec-show-overlay"),jr.hidden=!1,Br(jr)}};function Zr(e){if("string"==typeof e)return e;const t=e.plugin?` (Plugin: "${e.plugin}").`:"",n=e.hint?" "+e.hint:"",r=Array.isArray(e.elements)?` Occurred at: ${Rn(e.elements.map(Yr))}.`:"",s=e.details?`\n\n
        \n${e.details}\n
        \n`:"";return Sr(`${e.message}${n}${r}${t}${s}`)}function Yr(e,t){return`[${t+1}](#${e.id})`}async function Jr(e){try{Vr.show(),await async function(){"loading"===document.readyState&&await new Promise(e=>document.addEventListener("DOMContentLoaded",e))}(),await yr(e)}finally{Vr.enable()}}document.addEventListener("keydown",e=>{"Escape"===e.key&&Vr.closeModal()}),window.respecUI=Vr,lr("error",e=>Vr.error(e)),lr("warn",e=>Vr.warning(e)),window.addEventListener("error",e=>{console.error(e.error,e.message,e)});const Kr=[Promise.resolve().then((function(){return Qr})),Promise.resolve().then((function(){return i})),Promise.resolve().then((function(){return ns})),Promise.resolve().then((function(){return Zs})),Promise.resolve().then((function(){return Ks})),Promise.resolve().then((function(){return ei})),Promise.resolve().then((function(){return ni})),Promise.resolve().then((function(){return ci})),Promise.resolve().then((function(){return di})),Promise.resolve().then((function(){return Pr})),Promise.resolve().then((function(){return kr})),Promise.resolve().then((function(){return hi})),Promise.resolve().then((function(){return bi})),Promise.resolve().then((function(){return Fs})),Promise.resolve().then((function(){return vi})),Promise.resolve().then((function(){return ki})),Promise.resolve().then((function(){return _i})),Promise.resolve().then((function(){return Do})),Promise.resolve().then((function(){return jo})),Promise.resolve().then((function(){return Zo})),Promise.resolve().then((function(){return Yo})),Promise.resolve().then((function(){return Xo})),Promise.resolve().then((function(){return sa})),Promise.resolve().then((function(){return la})),Promise.resolve().then((function(){return pa})),Promise.resolve().then((function(){return Da})),Promise.resolve().then((function(){return eo})),Promise.resolve().then((function(){return Xa})),Promise.resolve().then((function(){return fc})),Promise.resolve().then((function(){return Ba})),Promise.resolve().then((function(){return hc})),Promise.resolve().then((function(){return po})),Promise.resolve().then((function(){return Ec})),Promise.resolve().then((function(){return Tc})),Promise.resolve().then((function(){return Ac})),Promise.resolve().then((function(){return zc})),Promise.resolve().then((function(){return Uc})),Promise.resolve().then((function(){return Wc})),Promise.resolve().then((function(){return Gc})),Promise.resolve().then((function(){return el})),Promise.resolve().then((function(){return sl})),Promise.resolve().then((function(){return cl})),Promise.resolve().then((function(){return fl})),Promise.resolve().then((function(){return wl})),Promise.resolve().then((function(){return vl})),Promise.resolve().then((function(){return _l})),Promise.resolve().then((function(){return Ll})),Promise.resolve().then((function(){return ka})),Promise.resolve().then((function(){return zl})),Promise.resolve().then((function(){return Fl})),Promise.resolve().then((function(){return Yl})),Promise.resolve().then((function(){return Ql})),Promise.resolve().then((function(){return eu})),Promise.resolve().then((function(){return nu})),Promise.resolve().then((function(){return lu})),Promise.resolve().then((function(){return hu})),Promise.resolve().then((function(){return mu})),Promise.resolve().then((function(){return wu})),Promise.resolve().then((function(){return _u})),Promise.resolve().then((function(){return Ru})),Promise.resolve().then((function(){return Iu})),Promise.resolve().then((function(){return zu})),Promise.resolve().then((function(){return qu})),Promise.resolve().then((function(){return Gu})),Promise.resolve().then((function(){return Ju})),Promise.resolve().then((function(){return ed})),Promise.resolve().then((function(){return sd}))];Promise.all(Kr).then(e=>Jr(e)).catch(e=>console.error(e));var Qr=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){location.hash&&document.respec.ready.then(()=>{let e=decodeURIComponent(location.hash).substr(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)}location.hash="#"+e})}});const Xr="w3c/group",es=["wg","wgURI","wgId","wgPatentURI","wgPatentPolicy"];async function ts(e){let t="",n=e;e.includes("/")&&([t,n]=e.split("/",2));const r=new URL(`${n}/${t}`,"https://respec.org/w3c/groups/"),s=await On(r.href);if(s.ok){const e=await s.json(),{id:t,name:n,URI:r,patentURI:i,patentPolicy:o,type:a}=e;return{wg:n,wgId:t,wgURI:r,wgPatentURI:i,wgPatentPolicy:o,groupType:a}}const i=await s.text(),o=`Failed to fetch group details (HTTP: ${s.status}). ${i}`,a=404===s.status?ir`See the list of [supported group names](https://respec.org/w3c/groups/) to use with the ${"[group]"} configuration option.`:void 0;Xn(o,Xr,{hint:a})}var ns=Object.freeze({__proto__:null,name:Xr,run:async function(e){const t=es.filter(t=>e[t]);if(!e.group){if(t.length){const e=ir`Please use the ${"[group]"} configuration option instead.`;er(`Configuration options ${rr(es)} are deprecated.`,Xr,{hint:e})}return}if(t.length){const e=ir`Remove them from the document's ${"[respecConfig]"} to silence this warning.`;er(ir`Configuration options ${rr(t)} are superseded by ${"[group]"} and will be overridden by ReSpec.`,Xr,{hint:e})}const{group:n}=e,r=Array.isArray(n)?await async function(e){const t=await Promise.all(e.map(ts)),n={wg:[],wgId:[],wgURI:[],wgPatentURI:[],wgPatentPolicy:[],groupType:[]};for(const e of t.filter(e=>e))for(const t of Object.keys(n))n[t].push(e[t]);return n}(n):await ts(n);Object.assign(e,r)}});function rs(e){if(!e.key){const t="Found a link without `key` attribute in the configuration. See dev console.";return er(t,"core/templates/show-link"),void console.warn(t,e)}return gn`
        ${e.key}
        - ${e.data?e.data.map(Zr):Zr(e)} - `}function Zr(e){return on`
        - ${e.href?on`${e.value||e.href}`:e.value} -
        `}const Yr="core/templates/show-logo";function Jr(e,t){const n=on`${e.value||e.href}`:e.value} + `}const is="core/templates/show-logo";function os(e,t){const n=gn``;if(!e.alt){const r=Yn`Add the missing "\`alt\`" property describing the logo. See ${"[logos]"} for more information.`;Fn(`Logo at index ${t}${e.src?`, with \`src\` ${e.src}, `:""} is missing required "\`alt\`" property.`,Yr,{hint:r,elements:[n]})}if(!e.src){const e=Yn`The \`src\` property is required on every logo. See ${"[logos]"} for more information.`;Fn(`Logo at index ${t} is missing "\`src\`" property.`,Yr,{hint:e,elements:[n]})}return n}const Kr="core/templates/show-people",Qr={en:{until:e=>on` Until ${e} `},es:{until:e=>on` Hasta ${e} `},ko:{until:e=>on` ${e} 이전 `},ja:{until:e=>on` ${e} 以前 `},de:{until:e=>on` bis ${e} `},zh:{until:e=>on` 直到 ${e} `}},Xr=s in Qr?s:"en";function es(e,t){const n=e[t];if(!Array.isArray(n)||!n.length)return;const r=(s=t,function(e,t){const n="https://respec.org/docs/",r=`See [person](${n}#person) configuration for available options.`,i=`Error processing the [person object](${n}#person) at index ${t} of the "[\`${s}\`](${n}#${s})" configuration option.`;if(!e.name)return Fn(i+' Missing required property `"name"`.',Kr,{hint:r}),!1;if(e.orcid){const{orcid:n}=e,r=new URL(n,"https://orcid.org/");if("https://orcid.org"!==r.origin){const n=`${i} ORCID "${e.orcid}" at index ${t} is invalid.`,s=`The origin should be "https://orcid.org", not "${r.origin}".`;return Fn(n,Kr,{hint:s}),!1}const s=r.pathname.slice(1).replace(/\/$/,"");if(!/^\d{4}-\d{4}-\d{4}-\d{3}(\d|X)$/.test(s))return Fn(`${i} ORCID "${s}" has wrong format.`,Kr,{hint:'ORCIDs have the format "1234-1234-1234-1234."'}),!1;if(!function(e){const t=e[e.length-1],n=(12-e.split("").slice(0,-1).filter(e=>/\d/.test(e)).map(Number).reduce((e,t)=>2*(e+t),0)%11)%11,r=10===n?"X":String(n);return t===r}(n))return Fn(`${i} ORCID "${n}" failed checksum check.`,Kr,{hint:"Please check that the ORCID is valid."}),!1;e.orcid=r.href}return e.retiredDate&&(o=e.retiredDate,"Invalid Date"===(/\d{4}-\d{2}-\d{2}/.test(o)?new Date(o):"Invalid Date").toString())?(Fn(i+' The property "`retiredDate`" is not a valid date.',Kr,{hint:"The expected format is YYYY-MM-DD. "+r}),!1):!(e.hasOwnProperty("extras")&&!function(e,t,n){return Array.isArray(e)?e.every((e,r)=>{switch(!0){case"object"!=typeof e:return Fn(`${n}. Member "extra" at index ${r} is not an object.`,Kr,{hint:t}),!1;case!e.hasOwnProperty("name"):return Fn(`${n} \`PersonExtra\` object at index ${r} is missing required "name" member.`,Kr,{hint:t}),!1;case"string"==typeof e.name&&""===e.name.trim():return Fn(`${n} \`PersonExtra\` object at index ${r} "name" can't be empty.`,Kr,{hint:t}),!1}return!0}):(Fn(n+'. A person\'s "extras" member must be an array.',Kr,{hint:t}),!1)}(e.extras,r,i))&&(e.url&&e.mailto&&Bn(i+' Has both "url" and "mailto" property.',Kr,{hint:'Please choose either "url" or "mailto" ("url" is preferred). '+r}),e.companyURL&&!e.company&&Bn(i+' Has a "`companyURL`" property but no "`company`" property.',Kr,{hint:`Please add a "\`company\`" property. ${r}.`}),!0);var o});var s;return n.filter(r).map(ts)}function ts(e){const t=Qr[Xr],n=[e.name],r=[e.company],s=e.w3cid||null,i=[];if(e.mailto&&(e.url="mailto:"+e.mailto),e.url){const t="mailto:"===new URL(e.url,document.location.href).protocol?"ed_mailto u-email email p-name":"u-url url p-name fn";i.push(on`${n}`)}else i.push(on`${n}`);if(e.orcid&&i.push(on`${on``;if(!e.alt){const r=ir`Add the missing "\`alt\`" property describing the logo. See ${"[logos]"} for more information.`;Xn(`Logo at index ${t}${e.src?`, with \`src\` ${e.src}, `:""} is missing required "\`alt\`" property.`,is,{hint:r,elements:[n]})}if(!e.src){const e=ir`The \`src\` property is required on every logo. See ${"[logos]"} for more information.`;Xn(`Logo at index ${t} is missing "\`src\`" property.`,is,{hint:e,elements:[n]})}return n}const as="core/templates/show-people",cs={en:{until:e=>gn` Until ${e} `},es:{until:e=>gn` Hasta ${e} `},ko:{until:e=>gn` ${e} 이전 `},ja:{until:e=>gn` ${e} 以前 `},de:{until:e=>gn` bis ${e} `},zh:{until:e=>gn` 直到 ${e} `}},ls=s in cs?s:"en";function us(e,t){const n=e[t];if(!Array.isArray(n)||!n.length)return;const r=(s=t,function(e,t){const n="https://respec.org/docs/",r=`See [person](${n}#person) configuration for available options.`,i=`Error processing the [person object](${n}#person) at index ${t} of the "[\`${s}\`](${n}#${s})" configuration option.`;if(!e.name)return Xn(i+' Missing required property `"name"`.',as,{hint:r}),!1;if(e.orcid){const{orcid:n}=e,r=new URL(n,"https://orcid.org/");if("https://orcid.org"!==r.origin){const n=`${i} ORCID "${e.orcid}" at index ${t} is invalid.`,s=`The origin should be "https://orcid.org", not "${r.origin}".`;return Xn(n,as,{hint:s}),!1}const s=r.pathname.slice(1).replace(/\/$/,"");if(!/^\d{4}-\d{4}-\d{4}-\d{3}(\d|X)$/.test(s))return Xn(`${i} ORCID "${s}" has wrong format.`,as,{hint:'ORCIDs have the format "1234-1234-1234-1234."'}),!1;if(!function(e){const t=e[e.length-1],n=(12-e.split("").slice(0,-1).filter(e=>/\d/.test(e)).map(Number).reduce((e,t)=>2*(e+t),0)%11)%11,r=10===n?"X":String(n);return t===r}(n))return Xn(`${i} ORCID "${n}" failed checksum check.`,as,{hint:"Please check that the ORCID is valid."}),!1;e.orcid=r.href}return e.retiredDate&&(o=e.retiredDate,"Invalid Date"===(/\d{4}-\d{2}-\d{2}/.test(o)?new Date(o):"Invalid Date").toString())?(Xn(i+' The property "`retiredDate`" is not a valid date.',as,{hint:"The expected format is YYYY-MM-DD. "+r}),!1):!(e.hasOwnProperty("extras")&&!function(e,t,n){return Array.isArray(e)?e.every((e,r)=>{switch(!0){case"object"!=typeof e:return Xn(`${n}. Member "extra" at index ${r} is not an object.`,as,{hint:t}),!1;case!e.hasOwnProperty("name"):return Xn(`${n} \`PersonExtra\` object at index ${r} is missing required "name" member.`,as,{hint:t}),!1;case"string"==typeof e.name&&""===e.name.trim():return Xn(`${n} \`PersonExtra\` object at index ${r} "name" can't be empty.`,as,{hint:t}),!1}return!0}):(Xn(n+'. A person\'s "extras" member must be an array.',as,{hint:t}),!1)}(e.extras,r,i))&&(e.url&&e.mailto&&er(i+' Has both "url" and "mailto" property.',as,{hint:'Please choose either "url" or "mailto" ("url" is preferred). '+r}),e.companyURL&&!e.company&&er(i+' Has a "`companyURL`" property but no "`company`" property.',as,{hint:`Please add a "\`company\`" property. ${r}.`}),!0);var o});var s;return n.filter(r).map(ds)}function ds(e){const t=cs[ls],n=[e.name],r=[e.company],s=e.w3cid||null,i=[];if(e.mailto&&(e.url="mailto:"+e.mailto),e.url){const t="mailto:"===new URL(e.url,document.location.href).protocol?"ed_mailto u-email email p-name":"u-url url p-name fn";i.push(gn`${n}`)}else i.push(gn`${n}`);if(e.orcid&&i.push(gn`${gn` -`}`),e.company){const t="p-org org h-org",n=e.companyURL?on`${r}`:on`${r}`;i.push(on` (${n})`)}if(e.note&&i.push(document.createTextNode(` (${e.note})`)),e.extras&&i.push(...e.extras.map(e=>on`, ${function(e){const t=e.class||null,{name:n,href:r}=e;return r?on`${n}`:on`${n}`}(e)}`)),e.retiredDate){const{retiredDate:n}=e,r=on``;i.push(on` - ${t.until(r)} `)}return on`
        `}`),e.company){const t="p-org org h-org",n=e.companyURL?gn`${r}`:gn`${r}`;i.push(gn` (${n})`)}if(e.note&&i.push(document.createTextNode(` (${e.note})`)),e.extras&&i.push(...e.extras.map(e=>gn`, ${function(e){const t=e.class||null,{name:n,href:r}=e;return r?gn`${n}`:gn`${n}`}(e)}`)),e.retiredDate){const{retiredDate:n}=e,r=gn``;i.push(gn` - ${t.until(r)} `)}return gn`
        ${i} -
        `}const ns="w3c/templates/headers",rs=$n({en:{archives:"archives",author:"Author:",authors:"Authors:",commit_history:"Commit history",edited_in_place:"edited in place",editor:"Editor:",editors:"Editors:",feedback:"Feedback:",former_editor:"Former editor:",former_editors:"Former editors:",history:"History:",implementation_report:"Implementation report:",latest_editors_draft:"Latest editor's draft:",latest_published_version:"Latest published version:",latest_recommendation:"Latest Recommendation:",message_topic:"… message topic …",more_details_about_this_doc:"More details about this document",prev_editor_draft:"Previous editor's draft:",prev_recommendation:"Previous Recommendation:",prev_version:"Previous version:",publication_history:"Publication history",test_suite:"Test suite:",this_version:"This version:",with_subject_line:"with subject line",your_topic_here:"YOUR TOPIC HERE"},ko:{author:"저자:",authors:"저자:",editor:"편집자:",editors:"편집자:",former_editor:"이전 편집자:",former_editors:"이전 편집자:",latest_editors_draft:"최신 편집 초안:",latest_published_version:"최신 버전:",this_version:"현재 버전:"},zh:{author:"作者:",authors:"作者:",editor:"编辑:",editors:"编辑:",former_editor:"原编辑:",former_editors:"原编辑:",latest_editors_draft:"最新编辑草稿:",latest_published_version:"最新发布版本:",this_version:"本版本:",test_suite:"测试套件:",implementation_report:"实现报告:",prev_editor_draft:"上一版编辑草稿:",prev_version:"上一版:",prev_recommendation:"上一版正式推荐标准:",latest_recommendation:"最新发布的正式推荐标准:"},ja:{author:"著者:",authors:"著者:",editor:"編者:",editors:"編者:",former_editor:"以前の版の編者:",former_editors:"以前の版の編者:",latest_editors_draft:"最新の編集用草案:",latest_published_version:"最新バージョン:",this_version:"このバージョン:",test_suite:"テストスイート:",implementation_report:"実装レポート:"},nl:{author:"Auteur:",authors:"Auteurs:",editor:"Redacteur:",editors:"Redacteurs:",latest_editors_draft:"Laatste werkversie:",latest_published_version:"Laatst gepubliceerde versie:",this_version:"Deze versie:"},es:{archives:"archivos",author:"Autor:",authors:"Autores:",commit_history:"Historial de cambios",edited_in_place:"editado en lugar",editor:"Editor:",editors:"Editores:",feedback:"Comentarios:",former_editor:"Antiguo editor:",former_editors:"Antiguos editores:",history:"Historia:",implementation_report:"Informe de implementación:",latest_editors_draft:"Última versión del editor:",latest_published_version:"Última versión publicada:",latest_recommendation:"Recomendación más reciente:",message_topic:"… detalles de mensaje …",more_details_about_this_doc:"Más detalles sobre este documento:",publication_history:"Historial de publicación",prev_editor_draft:"Última versión del editor:",prev_recommendation:"Última Recomendación:",prev_version:"Última versión:",test_suite:"Suite de pruebas:",this_version:"Esta versión:",with_subject_line:"con línea de asunto",your_topic_here:"TU SUJETO AQUÍ"},de:{author:"Autor/in:",authors:"Autor/innen:",editor:"Redaktion:",editors:"Redaktion:",former_editor:"Frühere Mitwirkende:",former_editors:"Frühere Mitwirkende:",latest_editors_draft:"Letzter Entwurf:",latest_published_version:"Letzte publizierte Fassung:",this_version:"Diese Fassung:"}});var ss=(e,t)=>on`
        - ${e.logos.map(Jr)} ${document.querySelector("h1#title")} + `}const ps="w3c/templates/headers",fs=Pn({en:{archives:"archives",author:"Author:",authors:"Authors:",commit_history:"Commit history",edited_in_place:"edited in place",editor:"Editor:",editors:"Editors:",feedback:"Feedback:",former_editor:"Former editor:",former_editors:"Former editors:",history:"History:",implementation_report:"Implementation report:",latest_editors_draft:"Latest editor's draft:",latest_published_version:"Latest published version:",latest_recommendation:"Latest Recommendation:",message_topic:"… message topic …",more_details_about_this_doc:"More details about this document",prev_editor_draft:"Previous editor's draft:",prev_recommendation:"Previous Recommendation:",prev_version:"Previous version:",publication_history:"Publication history",test_suite:"Test suite:",this_version:"This version:",with_subject_line:"with subject line",your_topic_here:"YOUR TOPIC HERE"},ko:{author:"저자:",authors:"저자:",editor:"편집자:",editors:"편집자:",former_editor:"이전 편집자:",former_editors:"이전 편집자:",latest_editors_draft:"최신 편집 초안:",latest_published_version:"최신 버전:",this_version:"현재 버전:"},zh:{author:"作者:",authors:"作者:",editor:"编辑:",editors:"编辑:",former_editor:"原编辑:",former_editors:"原编辑:",latest_editors_draft:"最新编辑草稿:",latest_published_version:"最新发布版本:",this_version:"本版本:",test_suite:"测试套件:",implementation_report:"实现报告:",prev_editor_draft:"上一版编辑草稿:",prev_version:"上一版:",prev_recommendation:"上一版正式推荐标准:",latest_recommendation:"最新发布的正式推荐标准:"},ja:{author:"著者:",authors:"著者:",editor:"編者:",editors:"編者:",former_editor:"以前の版の編者:",former_editors:"以前の版の編者:",latest_editors_draft:"最新の編集用草案:",latest_published_version:"最新バージョン:",this_version:"このバージョン:",test_suite:"テストスイート:",implementation_report:"実装レポート:"},nl:{author:"Auteur:",authors:"Auteurs:",editor:"Redacteur:",editors:"Redacteurs:",latest_editors_draft:"Laatste werkversie:",latest_published_version:"Laatst gepubliceerde versie:",this_version:"Deze versie:"},es:{archives:"archivos",author:"Autor:",authors:"Autores:",commit_history:"Historial de cambios",edited_in_place:"editado en lugar",editor:"Editor:",editors:"Editores:",feedback:"Comentarios:",former_editor:"Antiguo editor:",former_editors:"Antiguos editores:",history:"Historia:",implementation_report:"Informe de implementación:",latest_editors_draft:"Última versión del editor:",latest_published_version:"Última versión publicada:",latest_recommendation:"Recomendación más reciente:",message_topic:"… detalles de mensaje …",more_details_about_this_doc:"Más detalles sobre este documento:",publication_history:"Historial de publicación",prev_editor_draft:"Última versión del editor:",prev_recommendation:"Última Recomendación:",prev_version:"Última versión:",test_suite:"Suite de pruebas:",this_version:"Esta versión:",with_subject_line:"con línea de asunto",your_topic_here:"TU SUJETO AQUÍ"},de:{author:"Autor/in:",authors:"Autor/innen:",editor:"Redaktion:",editors:"Redaktion:",former_editor:"Frühere Mitwirkende:",former_editors:"Frühere Mitwirkende:",latest_editors_draft:"Letzter Entwurf:",latest_published_version:"Letzte publizierte Fassung:",this_version:"Diese Fassung:"}});var hs=(e,t)=>gn`
        + ${e.logos.map(os)} ${document.querySelector("h1#title")} ${function(e){let t=document.querySelector("h2#subtitle");return t&&t.parentElement?(t.remove(),e.subtitle=t.textContent.trim()):e.subtitle&&(t=document.createElement("h2"),t.textContent=e.subtitle,t.id="subtitle"),t&&t.classList.add("subtitle"),t}(e)} -

        ${function(e){const t=e.isCR?e.longStatus:e.textStatus,n=e.prependW3C?on`W3C ${t}`:on`${t}`;return on`${n}${" "} +

        ${function(e){const t=e.isCR?e.longStatus:e.textStatus,n=e.prependW3C?gn`W3C ${t}`:gn`${t}`;return gn`${n}${" "} ${e.modificationDate?on`, ${rs.edited_in_place}${" "} - ${function(e){const t=_n(new Date(e));return on`

        - ${rs.more_details_about_this_doc} + ${fs.more_details_about_this_doc}
        - ${e.isTagFinding&&!e.isTagEditorFinding||!e.isNoTrack?on` -
        ${rs.this_version}
        + ${e.isTagFinding&&!e.isTagEditorFinding||!e.isNoTrack?gn` +
        ${fs.this_version}
        ${e.thisVersion}
        -
        ${rs.latest_published_version}
        +
        ${fs.latest_published_version}
        - ${e.latestVersion?on`${e.latestVersion}`:"none"}
        `:""} - ${e.edDraftURI?on` -
        ${rs.latest_editors_draft}
        + ${e.edDraftURI?gn` +
        ${fs.latest_editors_draft}
        ${e.edDraftURI}
        `:""} - ${function(e){if(!e.historyURI&&!e.github)return;const t=[];if(e.historyURI){const n=on`
        - ${rs.publication_history} -
        `;t.push(n)}if(e.github){const n=on` + ${function(e){if(!e.historyURI&&!e.github)return;const t=[];if(e.historyURI){const n=gn`
        + ${fs.publication_history} +
        `;t.push(n)}if(e.github){const n=gn`
        - ${rs.commit_history} + ${fs.commit_history}
        - `;t.push(n)}return on`
        ${rs.history}
        + `;t.push(n)}return gn`
        ${fs.history}
        ${t}`}(e)} - ${e.testSuiteURI?on` -
        ${rs.test_suite}
        + ${e.testSuiteURI?gn` +
        ${fs.test_suite}
        ${e.testSuiteURI}
        `:""} - ${e.implementationReportURI?on` -
        ${rs.implementation_report}
        + ${e.implementationReportURI?gn` +
        ${fs.implementation_report}
        ${e.implementationReportURI}
        `:""} - ${e.isED&&e.prevED?on` -
        ${rs.prev_editor_draft}
        + ${e.isED&&e.prevED?gn` +
        ${fs.prev_editor_draft}
        ${e.prevED}
        `:""} - ${e.showPreviousVersion?on` -
        ${rs.prev_version}
        + ${e.showPreviousVersion?gn` +
        ${fs.prev_version}
        ${e.prevVersion}
        `:""} - ${e.prevRecURI?e.isRec?on` -
        ${rs.prev_recommendation}
        + ${e.prevRecURI?e.isRec?gn` +
        ${fs.prev_recommendation}
        ${e.prevRecURI}
        - `:on` -
        ${rs.latest_recommendation}
        + `:gn` +
        ${fs.latest_recommendation}
        ${e.prevRecURI}
        `:""} -
        ${e.multipleEditors?rs.editors:rs.editor}
        - ${es(e,"editors")} - ${Array.isArray(e.formerEditors)&&e.formerEditors.length>0?on` +
        ${e.multipleEditors?fs.editors:fs.editor}
        + ${us(e,"editors")} + ${Array.isArray(e.formerEditors)&&e.formerEditors.length>0?gn`
        - ${e.multipleFormerEditors?rs.former_editors:rs.former_editor} + ${e.multipleFormerEditors?fs.former_editors:fs.former_editor}
        - ${es(e,"formerEditors")} + ${us(e,"formerEditors")} `:""} - ${e.authors?on` -
        ${e.multipleAuthors?rs.authors:rs.author}
        - ${es(e,"authors")} + ${e.authors?gn` +
        ${e.multipleAuthors?fs.authors:fs.author}
        + ${us(e,"authors")} `:""} - ${function(e){if(!e.github&&!e.wgPublicList)return;const t=[];if(e.github){const{repoURL:n,issuesURL:r,newIssuesURL:s,pullsURL:i,fullName:o}=e.github;t.push(on`
        + ${function(e){if(!e.github&&!e.wgPublicList)return;const t=[];if(e.github){const{repoURL:n,issuesURL:r,newIssuesURL:s,pullsURL:i,fullName:o}=e.github;t.push(gn`
        GitHub ${o} (pull requests, new issue, open issues) -
        `)}if(e.wgPublicList){const n=new URL(`mailto:${e.wgPublicList}@w3.org`),r=e.subjectPrefix??`[${e.shortName}] ${rs.your_topic_here}`,s=on``)}if(e.wgPublicList){const n=new URL(`mailto:${e.wgPublicList}@w3.org`),r=e.subjectPrefix??`[${e.shortName}] ${fs.your_topic_here}`,s=gn`${n.pathname}`,i=e.subjectPrefix||on`[${e.shortName}] ${rs.message_topic}`,o=on`${rs.with_subject_line}${" "} - ${i}`,a=new URL(e.wgPublicList,"https://lists.w3.org/Archives/Public/"),c=on`(${rs.archives})`;t.push(on`
        ${s} ${o} ${c}
        `)}return on`
        ${rs.feedback}
        + >`,i=e.subjectPrefix||gn`[${e.shortName}] ${fs.message_topic}`,o=gn`${fs.with_subject_line}${" "} + ${i}`,a=new URL(e.wgPublicList,"https://lists.w3.org/Archives/Public/"),c=gn`(${fs.archives})`;t.push(gn`
        ${s} ${o} ${c}
        `)}return gn`
        ${fs.feedback}
        ${t}`}(e)} - ${e.otherLinks?e.otherLinks.map(Vr):""} + ${e.otherLinks?e.otherLinks.map(rs):""}
        - ${e.errata?on`

        + ${e.errata?gn`

        Please check the errata for any errors or issues reported since publication.

        `:""} - ${e.isRec?on`

        + ${e.isRec?gn`

        See also translations.

        `:""} - ${e.alternateFormats?on`

        + ${e.alternateFormats?gn`

        ${t.multipleAlternates?"This document is also available in these non-normative formats:":"This document is also available in this non-normative format:"} ${t.alternatesHTML}

        `:""} - ${function(e){const t=document.querySelector(".copyright");if(t)return t.remove(),t;if(e.hasOwnProperty("overrideCopyright")){return Bn("The `overrideCopyright` configuration option is deprecated.",ns,{hint:'Please add a ``;return function(e){return on``;return function(e){return gn``}(e)}(e)}
        -
        `;var is=(e,t)=>{const n=document.querySelector(".copyright");n&&n.remove();const r=document.querySelector("h1#title"),s=r.cloneNode(!0);return on`
        - ${e.logos.map(Jr)} ${r} - ${e.subtitle?on`

        ${e.subtitle}

        `:""} +
        `;var ms=(e,t)=>{const n=document.querySelector(".copyright");n&&n.remove();const r=document.querySelector("h1#title"),s=r.cloneNode(!0);return gn`
        + ${e.logos.map(os)} ${r} + ${e.subtitle?gn`

        ${e.subtitle}

        `:""}

        ${e.longStatus}

        - ${e.thisVersion?on` -
        ${rs.this_version}
        + ${e.thisVersion?gn` +
        ${fs.this_version}
        ${e.thisVersion}
        `:""} - ${e.latestVersion?on` -
        ${rs.latest_published_version}
        + ${e.latestVersion?gn` +
        ${fs.latest_published_version}
        ${e.latestVersion}
        `:""} - ${e.edDraftURI?on` -
        ${rs.latest_editors_draft}
        + ${e.edDraftURI?gn` +
        ${fs.latest_editors_draft}
        ${e.edDraftURI}
        `:""} - ${e.testSuiteURI?on` + ${e.testSuiteURI?gn`
        Test suite:
        ${e.testSuiteURI}
        `:""} - ${e.implementationReportURI?on` + ${e.implementationReportURI?gn`
        Implementation report:
        `:""} - ${e.prevVersion?on` + ${e.prevVersion?gn`
        Previous version:
        ${e.prevVersion}
        `:""} - ${e.isCGFinal?"":on` - ${e.prevED?on` + ${e.isCGFinal?"":gn` + ${e.prevED?gn`
        Previous editor's draft:
        ${e.prevED}
        `:""} `} -
        ${e.multipleEditors?rs.editors:rs.editor}
        - ${es(e,"editors")} - ${Array.isArray(e.formerEditors)&&e.formerEditors.length>0?on` +
        ${e.multipleEditors?fs.editors:fs.editor}
        + ${us(e,"editors")} + ${Array.isArray(e.formerEditors)&&e.formerEditors.length>0?gn`
        - ${e.multipleFormerEditors?rs.former_editors:rs.former_editor} + ${e.multipleFormerEditors?fs.former_editors:fs.former_editor}
        - ${es(e,"formerEditors")} + ${us(e,"formerEditors")} `:""} - ${e.authors?on` -
        ${e.multipleAuthors?rs.authors:rs.author}
        - ${es(e,"authors")} + ${e.authors?gn` +
        ${e.multipleAuthors?fs.authors:fs.author}
        + ${us(e,"authors")} `:""} - ${e.otherLinks?e.otherLinks.map(Vr):""} + ${e.otherLinks?e.otherLinks.map(rs):""}
        - ${e.alternateFormats?on`

        + ${e.alternateFormats?gn`

        ${t.multipleAlternates?"This document is also available in these non-normative formats:":"This document is also available in this non-normative format:"} ${t.alternatesHTML}

        `:""} - ${n||on``}
        -
        `};const os=$n({en:{sotd:"Status of This Document"},ko:{sotd:"현재 문서의 상태"},zh:{sotd:"关于本文档"},ja:{sotd:"この文書の位置付け"},nl:{sotd:"Status van dit document"},es:{sotd:"Estado de este Document"},de:{sotd:"Status dieses Dokuments"}});var as=(e,t)=>on` -

        ${os.sotd}

        - ${e.isPreview?cs(e):""} - ${e.isUnofficial?function(e){const{additionalContent:t}=e;return on` +
        `};const gs=Pn({en:{sotd:"Status of This Document"},ko:{sotd:"현재 문서의 상태"},zh:{sotd:"关于本文档"},ja:{sotd:"この文書の位置付け"},nl:{sotd:"Status van dit document"},es:{sotd:"Estado de este Document"},de:{sotd:"Status dieses Dokuments"}});var bs=(e,t)=>gn` +

        ${gs.sotd}

        + ${e.isPreview?ys(e):""} + ${e.isUnofficial?function(e){const{additionalContent:t}=e;return gn`

        This document is a draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organization.

        ${t} - `}(t):e.isTagFinding?t.additionalContent:e.isNoTrack?function(e,t){const{isMO:n}=e,{additionalContent:r}=t;return on` + `}(t):e.isTagFinding?t.additionalContent:e.isNoTrack?function(e,t){const{isMO:n}=e,{additionalContent:r}=t;return gn`

        This document is merely a W3C-internal ${n?"member-confidential":""} document. It has no official standing of any kind and does not represent consensus of the W3C Membership.

        ${r} - `}(e,t):on` + `}(e,t):gn`

        ${e.l10n.status_at_publication}

        - ${e.isSubmission?function(e,t){return on` + ${e.isSubmission?function(e,t){return gn` ${t.additionalContent} - ${e.isMemberSubmission?function(e){const t=`https://www.w3.org/Submission/${e.publishDate.getUTCFullYear()}/${e.submissionCommentNumber}/Comment/`,n="PP2017"===e.wgPatentPolicy?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/Consortium/Patent-Policy/";return on`

        + ${e.isMemberSubmission?function(e){const t=`https://www.w3.org/Submission/${e.publishDate.getUTCFullYear()}/${e.submissionCommentNumber}/Comment/`,n="PP2017"===e.wgPatentPolicy?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/Consortium/Patent-Policy/";return gn`

        By publishing this document, W3C acknowledges that the Submitting Members have made a formal Submission request to W3C for discussion. Publication of this document by @@ -408,51 +408,51 @@ window.respecVersion="26.16.0",function(){"use strict";const e=!!window.require; list of acknowledged W3C Member Submissions. -

        `}(e):e.isTeamSubmission?function(e,t){return on` - ${ls(e,t)} +

        `}(e):e.isTeamSubmission?function(e,t){return gn` + ${ws(e,t)}

        Please consult the complete list of Team Submissions.

        `}(e,t):""} - `}(e,t):on` + `}(e,t):gn` ${e.sotdAfterWGinfo?"":t.additionalContent} - ${e.overrideStatus?"":on` - ${function(e){if(!e.wg)return;let t=null;e.isRec&&e.revisionTypes&&e.revisionTypes.length&&(e.revisionTypes.includes("addition")?t=e.revisionTypes.includes("correction")?on`It includes + ${e.overrideStatus?"":gn` + ${function(e){if(!e.wg)return;let t=null;e.isRec&&e.revisionTypes&&e.revisionTypes.length&&(e.revisionTypes.includes("addition")?t=e.revisionTypes.includes("correction")?gn`It includes proposed changes, introducing substantive changes and new features since the previous - Recommentation.`:on`It includes + Recommentation.`:gn`It includes proposed additions, introducing new features since the previous Recommentation.`:e.revisionTypes.includes("correction")&&(t=on`It includes + >, introducing new features since the previous Recommentation.`:e.revisionTypes.includes("correction")&&(t=gn`It includes proposed corrections.`));return on`

        + >.`));return gn`

        This document was published by ${e.wgHTML} as ${e.anOrA} ${e.longStatus}. ${t} ${e.notYetRec?"This document is intended to become a W3C Recommendation.":""} -

        `}(e)} ${us(e,t)} +

        `}(e)} ${vs(e,t)} `} ${e.sotdAfterWGinfo?t.additionalContent:""} - ${e.isRec?function({updateableRec:e,revisionTypes:t=[],humanRevisedRecEnd:n}){let r="";t.includes("addition")&&(r="additions");t.includes("correction")&&!r&&(r="corrections");return on`

        + ${e.isRec?function({updateableRec:e,revisionTypes:t=[],humanRevisedRecEnd:n}){let r="";t.includes("addition")&&(r="additions");t.includes("correction")&&!r&&(r="corrections");return gn`

        A W3C Recommendation is a specification that, after extensive consensus-building, has received the endorsement of the W3C and its Members. W3C recommends the wide deployment of this specification as a standard for the Web. - ${e?on`Future updates to this Recommendation may incorporate + ${e?gn`Future updates to this Recommendation may incorporate new features.`:""}

        - ${t.includes("addition")?on`

        + ${t.includes("addition")?gn`

        Proposed additions are marked in the document.

        `:""} - ${t.includes("correction")?on`

        + ${t.includes("correction")?gn`

        Proposed corrections are marked in the document.

        `:""} - ${r?on`

        + ${r?gn`

        The W3C Membership and other interested parties are invited to review the proposed ${r} and send comments through ${n}. Advisory Committee Representatives should @@ -460,51 +460,51 @@ window.respecVersion="26.16.0",function(){"use strict";const e=!!window.require; WBS questionnaires. -

        `:""} `}(e):function(e){let t="",n=on`This is a draft document and may be updated, replaced +

        `:""} `}(e):function(e){let t="",n=gn`This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress. - ${e.updateableRec?on`Future updates to this specification may incorporate + ${e.updateableRec?gn`Future updates to this specification may incorporate new features.`:""}`,r="";"CRD"===e.specStatus?(t="A Candidate Recommendation Draft integrates changes from the previous Candidate Recommendation that the Working Group intends to include in a subsequent Candidate Recommendation Snapshot.","LS"===e.pubMode&&(n="This document is maintained and updated at any time. Some parts of this document are work in progress. ")):"CR"===e.specStatus?(t=on`A Candidate Recommendation Snapshot has received + >.`:""}`,r="";"CRD"===e.specStatus?(t="A Candidate Recommendation Draft integrates changes from the previous Candidate Recommendation that the Working Group intends to include in a subsequent Candidate Recommendation Snapshot.","LS"===e.pubMode&&(n="This document is maintained and updated at any time. Some parts of this document are work in progress. ")):"CR"===e.specStatus?(t=gn`A Candidate Recommendation Snapshot has received wide review and is intended to gather - implementation experience.`,n=on`${e.updateableRec?on`Future updates to this specification may incorporate + implementation experience.`,n=gn`${e.updateableRec?gn`Future updates to this specification may incorporate new features.`:""}`,r="LS"===e.pubMode?`Comments are welcome at any time but most especially before ${e.humanCREnd}.`:`This Candidate Recommendation is not expected to advance to Proposed Recommendation any earlier than ${e.humanCREnd}.`):e.isPR?r=on` The W3C Membership and other interested parties are + >.`:""}`,r="LS"===e.pubMode?`Comments are welcome at any time but most especially before ${e.humanCREnd}.`:`This Candidate Recommendation is not expected to advance to Proposed Recommendation any earlier than ${e.humanCREnd}.`):e.isPR?r=gn` The W3C Membership and other interested parties are invited to review the document and send comments through ${e.humanPREnd}. Advisory Committee Representatives should consult their WBS questionnaires. Note that substantive technical comments were expected during the - Candidate Recommendation review period that ended ${e.humanCREnd}.`:e.isPER&&(r=on` W3C Advisory Committee Members are invited to send + Candidate Recommendation review period that ended ${e.humanCREnd}.`:e.isPER&&(r=gn` W3C Advisory Committee Members are invited to send formal review comments on this Proposed Edited Recommendation to the W3C Team until ${e.humanPEREnd}. Members of the Advisory Committee will find the appropriate review form for this document by consulting their list of current WBS questionnaires.`);return on`

        + >.`);return gn`

        Publication as ${e.anOrA} ${e.textStatus} does not imply endorsement by the W3C Membership. ${t}

        - ${n?on`

        ${n}

        `:""} + ${n?gn`

        ${n}

        `:""}

        ${r}

        `}(e)} - ${function(e){const{isNote:t,wgId:n,isIGNote:r,multipleWGs:s,recNotExpected:i,wgPatentHTML:o,wgPatentURI:a,charterDisclosureURI:c,wgPatentPolicy:l}=e,u="PP2017"===l?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/Consortium/Patent-Policy/",d=r?"":on` + ${function(e){const{isNote:t,wgId:n,isIGNote:r,multipleWGs:s,recNotExpected:i,wgPatentHTML:o,wgPatentURI:a,charterDisclosureURI:c,wgPatentPolicy:l}=e,u="PP2017"===l?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/Consortium/Patent-Policy/",d=r?"":gn` This document was produced by ${s?"groups":"a group"} operating under the ${"PP2017"===l?"1 August 2017 ":""}W3C Patent Policy. - `;return on`

        + `;return gn`

        ${d} ${i?`The ${s?"groups do":"group does"} not expect this document to become a W3C Recommendation.`:""} - ${t||r?"":on` - ${s?on` W3C maintains ${o} `:on` + ${t||r?"":gn` + ${s?gn` W3C maintains ${o} `:gn` W3C maintains a public list of any patent disclosuressection 6 of the W3C Patent Policy. `} - ${r?on` + ${r?gn` The disclosure obligations of the Participants of this group are described in the charter. @@ -534,14 +534,14 @@ window.respecVersion="26.16.0",function(){"use strict";const e=!!window.require; >15 September 2020 W3C Process Document.

        - ${e.addPatentNote?on`

        ${[e.addPatentNote]}

        `:""} + ${e.addPatentNote?gn`

        ${[e.addPatentNote]}

        `:""} `} `} ${t.additionalSections} - `;function cs(e){const{prUrl:t,prNumber:n,edDraftURI:r}=e;return on`
        + `;function ys(e){const{prUrl:t,prNumber:n,edDraftURI:r}=e;return gn`
        This is a - preview${t&&n?on` + preview${t&&n?gn` of pull request #${n} `:""} @@ -549,23 +549,23 @@ window.respecVersion="26.16.0",function(){"use strict";const e=!!window.require;

        Do not attempt to implement this version of the specification. Do not reference this version as authoritative in any way. - ${r?on` + ${r?gn` Instead, see ${r} for the Editor's draft. `:""}

        -
        `}function ls(e,t){const{mailToWGPublicListWithSubject:n,mailToWGPublicListSubscription:r}=t,{wgPublicList:s,subjectPrefix:i}=e;return on`

        +

        `}function ws(e,t){const{mailToWGPublicListWithSubject:n,mailToWGPublicListSubscription:r}=t,{wgPublicList:s,subjectPrefix:i}=e;return gn`

        If you wish to make comments regarding this document, please send them to ${s}@w3.org (subscribe, - archives)${i?on` with ${i} at the start of your email's + archives)${i?gn` with ${i} at the start of your email's subject`:""}. -

        `}function us(e,t){if(e.github||e.wgPublicList)return on`

        - ${e.github?on` +

        `}function vs(e,t){if(e.github||e.wgPublicList)return gn`

        + ${e.github?gn` GitHub Issues are preferred for discussion of this specification. `:""} - ${e.wgPublicList?on` + ${e.wgPublicList?gn` ${e.github&&e.wgPublicList?"Alternatively, you can send comments to our mailing list.":"Comments regarding this document are welcome."} Please send them to archives)${e.subjectPrefix?on` with ${e.subjectPrefix} at the start of your + >)${e.subjectPrefix?gn` with ${e.subjectPrefix} at the start of your email's subject`:""}. `:""} -

        `}var ds=(e,t)=>on` -

        ${os.sotd}

        - ${e.isPreview?cs(e):""} +

        `}var ks=(e,t)=>gn` +

        ${gs.sotd}

        + ${e.isPreview?ys(e):""}

        This specification was published by the ${e.wg}. It is not a W3C Standard nor is it on the W3C Standards Track. - ${e.isCGFinal?on` + ${e.isCGFinal?gn` Please note that under the W3C Community Final Specification Agreement (FSA) other conditions apply. - `:on` + `:gn` Please note that under the W3C Community Contributor License Agreement (CLA).

        ${e.sotdAfterWGinfo?"":t.additionalContent} - ${!e.github&&e.wgPublicList?ls(e,t):""} - ${e.github?us(e,t):""} + ${!e.github&&e.wgPublicList?ws(e,t):""} + ${e.github?vs(e,t):""} ${e.sotdAfterWGinfo?t.additionalContent:""} ${t.additionalSections} - `;const ps="w3c/headers",fs=new Intl.DateTimeFormat(["en-AU"],{timeZone:"UTC",year:"numeric",month:"long",day:"2-digit"});function hs(e){return new URL(e,"https://www.w3.org/").href}const ms={LS:"WD",LD:"WD",FPWD:"WD",LC:"WD",FPLC:"WD","FPWD-NOTE":"NOTE","WD-NOTE":"WD","LC-NOTE":"LC","IG-NOTE":"NOTE","WG-NOTE":"NOTE"},gs={"Member-SUBM":"/Submission","Team-SUBM":"/TeamSubmission/",finding:"/2001/tag/doc","draft-finding":"/2001/tag/doc"},bs={NOTE:"w3p:NOTE",WD:"w3p:WD",LC:"w3p:LastCall",CR:"w3p:CR",CRD:"w3p:CRD",PR:"w3p:PR",REC:"w3p:REC",PER:"w3p:PER",RSCND:"w3p:RSCND"},ys={NOTE:"Working Group Note","WG-NOTE":"Working Group Note","CG-NOTE":"Co-ordination Group Note","IG-NOTE":"Interest Group Note","Member-SUBM":"Member Submission","Team-SUBM":"Team Submission",MO:"Member-Only Document",ED:"Editor's Draft",LS:"Living Standard",LD:"Living Document",FPWD:"First Public Working Draft",WD:"Working Draft","FPWD-NOTE":"Working Group Note","WD-NOTE":"Working Draft","LC-NOTE":"Working Draft",FPLC:"First Public and Last Call Working Draft",LC:"Last Call Working Draft",CR:"Candidate Recommendation",CRD:"Candidate Recommendation",PR:"Proposed Recommendation",PER:"Proposed Edited Recommendation",REC:"Recommendation",RSCND:"Rescinded Recommendation",unofficial:"Unofficial Draft",base:"",finding:"TAG Finding","draft-finding":"Draft TAG Finding","editor-draft-finding":"Draft TAG Finding","CG-DRAFT":"Draft Community Group Report","CG-FINAL":"Final Community Group Report","BG-DRAFT":"Draft Business Group Report","BG-FINAL":"Final Business Group Report"},ws={...ys,CR:"Candidate Recommendation Snapshot",CRD:"Candidate Recommendation Draft","FPWD-NOTE":"First Public Working Group Note","LC-NOTE":"Last Call Working Draft"},vs=["FPWD-NOTE","WG-NOTE"],ks=["FPWD","WD"],$s=["FPLC","LC","CR","CRD","PR","PER","REC"],xs=["CG-DRAFT","CG-FINAL"],_s=["BG-DRAFT","BG-FINAL"],Ss=[...xs,..._s],Cs=["base",...xs,..._s,"editor-draft-finding","draft-finding","finding","MO","unofficial"],Es=["ED","IG-NOTE"],Rs=new Map([["cc0",{name:"Creative Commons 0 Public Domain Dedication",short:"CC0",url:"https://creativecommons.org/publicdomain/zero/1.0/"}],["w3c-software",{name:"W3C Software Notice and License",short:"W3C Software",url:"https://www.w3.org/Consortium/Legal/2002/copyright-software-20021231"}],["w3c-software-doc",{name:"W3C Software and Document Notice and License",short:"permissive document license",url:"https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"}],["cc-by",{name:"Creative Commons Attribution 4.0 International Public License",short:"CC-BY",url:"https://creativecommons.org/licenses/by/4.0/legalcode"}],["document",{name:"W3C Document License",short:"document use",url:"https://www.w3.org/Consortium/Legal/2015/doc-license"}],["dual",{name:"W3C Dual License",short:"dual license",url:"https://www.w3.org/Consortium/Legal/2013/copyright-documents-dual.html"}],[void 0,{name:"unlicensed",url:null,short:"UNLICENSED"}]]),Ts=["PP2017","PP2020"],As=Object.freeze({id:"",alt:"",href:"",src:"",height:"48",width:"72"});function Ls(e,t,n=new Date){const r=e[t]?new Date(e[t]):new Date(n);if(Number.isFinite(r.valueOf())){const e=dn.format(r);return new Date(e)}return Fn(Yn`${t} is not a valid date: "${e[t]}". Expected format 'YYYY-MM-DD'.`,ps),new Date(dn.format(new Date))}function Ps(e,{isTagFinding:t=!1}){const n=e.cloneNode(!0),r=document.createDocumentFragment();for(;n.hasChildNodes()&&(n.firstChild.nodeType!==Node.ELEMENT_NODE||"section"!==n.firstChild.localName);)r.appendChild(n.firstChild);if(t&&!r.hasChildNodes()){Bn(Yn`ReSpec does not support automated SotD generation for TAG findings.`,ps,{hint:"Please add the prerequisite content in the 'sotd' section."})}return{additionalContent:r,additionalSections:n.childNodes}}var Is=Object.freeze({__proto__:null,name:ps,W3CNotes:vs,maybeRecTrack:ks,recTrackStatus:$s,cgStatus:xs,bgStatus:_s,cgbgStatus:Ss,licenses:Rs,run:async function(e){if(!e.specStatus){const e=Yn`Please select an appropriate status from ${"[specStatus]"} based on your W3C group. If in doubt, use \`"unofficial"\`.`;Fn(Yn`Missing required configuration: ${"[specStatus]"}.`,ps,{hint:e})}if(e.isUnofficial="unofficial"===e.specStatus,e.isUnofficial&&!Array.isArray(e.logos)&&(e.logos=[]),e.licenseInfo=function(e){let t=void 0;if("string"==typeof e.license){const n=e.license.toLowerCase();if(Rs.has(n))t=n;else{const t=`The license "\`${e.license}\`" is not supported.`,n=Yn`Please set - ${"[license]"} to one of: ${Gn([...Rs.keys()].filter(e=>e),{quotes:!0})}. If in doubt, remove \`license\` and let ReSpec pick one for you.`;Fn(t,ps,{hint:n})}}if(e.isUnofficial&&!t&&(t="cc-by"),!e.isUnofficial&&["cc-by","cc0"].includes(t)){const t=Yn`Please set ${"[license]"} to \`"w3c-software-doc"\` instead.`;Fn(Yn`License "\`${e.license}\`" is not allowed for W3C Specifications.`,ps,{hint:t})}return Rs.get(t)}(e),e.isCGBG=Ss.includes(e.specStatus),e.isCGFinal=e.isCGBG&&e.specStatus.endsWith("G-FINAL"),e.isBasic="base"===e.specStatus,e.isRegular=!e.isCGBG&&!e.isBasic,e.isRegular&&!e.shortName){Fn("Missing required configuration: `shortName`",ps)}if(e.testSuiteURI){const t=new URL(e.testSuiteURI,location.href),{host:n,pathname:r}=t;if("github.com"===n&&r.startsWith("/w3c/web-platform-tests/")){const t="Web Platform Tests have moved to a new Github Organization at https://github.com/web-platform-tests. ",n=Yn`Please update your ${"[testSuiteURI]"} to point to the new tests repository (e.g., ${"https://wpt.live/"+e.shortName}).`;Bn(t,ps,{hint:n})}}if(e.subtitle||(e.subtitle=""),e.publishDate=Ls(e,"publishDate",document.lastModified),e.publishYear=e.publishDate.getUTCFullYear(),e.publishHumanDate=fs.format(e.publishDate),e.isNoTrack=Cs.includes(e.specStatus),e.isRecTrack=!e.noRecTrack&&$s.concat(ks).includes(e.specStatus),e.isMemberSubmission="Member-SUBM"===e.specStatus,e.isMemberSubmission){const t={alt:"W3C Member Submission",href:"https://www.w3.org/Submission/",src:"https://www.w3.org/Icons/member_subm-v.svg",width:"211"};e.logos.push({...As,...t})}if(e.isTeamSubmission="Team-SUBM"===e.specStatus,e.isTeamSubmission){const t={alt:"W3C Team Submission",href:"https://www.w3.org/TeamSubmission/",src:"https://www.w3.org/Icons/team_subm-v.svg",width:"211"};e.logos.push({...As,...t})}if(e.isSubmission=e.isMemberSubmission||e.isTeamSubmission,e.anOrA=Es.includes(e.specStatus)?"an":"a",e.isTagFinding="finding"===e.specStatus||"draft-finding"===e.specStatus||"editor-draft-finding"===e.specStatus,e.isTagEditorFinding="editor-draft-finding"===e.specStatus,e.isRecTrack&&!e.github&&!e.wgPublicList){const e=Yn`Use the ${"[github]"} configuration option to add a link to a repository. Alternatively use ${"[wgPublicList]"} to link to a mailing list.`;Fn("W3C Process requires a either a link to a public repository or mailing list.",ps,{hint:e})}if(!e.edDraftURI&&(e.edDraftURI="","ED"===e.specStatus)){Bn("Editor's Drafts should set edDraftURI.",ps)}const t=ms[e.specStatus]||e.specStatus,n=gs[e.specStatus]||"/TR";if(e.isRegular){const{shortName:r,publishDate:s}=e,i=e.publishDate.getUTCFullYear(),o=`${t}-${r}-${xn(s)}`;e.thisVersion=hs(`${n}/${i}/${o}/`)}"ED"===e.specStatus&&(e.thisVersion=e.edDraftURI);const r=`${n}/${e.shortName}`;if(null!==e.latestVersion&&(e.latestVersion=e.latestVersion?hs(""+e.latestVersion):hs(`${n}/${e.shortName}/`)),e.previousPublishDate){if(!e.previousMaturity&&!e.isTagFinding){Fn("`previousPublishDate` is set, but not `previousMaturity`.",ps)}e.previousPublishDate=Ls(e,"previousPublishDate");const t=ms[e.previousMaturity]??e.previousMaturity;if(e.isTagFinding&&e.latestVersion){const t=dn.format(e.publishDate);e.thisVersion=hs(`${r}-${t}`);const n=dn.format(e.previousPublishDate);e.prevVersion=hs(`${r}-${n}}`)}else if(e.isCGBG||e.isBasic)e.prevVersion=e.prevVersion||"";else{const r=e.previousPublishDate.getUTCFullYear(),{shortName:s}=e,i=xn(e.previousPublishDate);e.prevVersion=hs(`${n}/${r}/${t}-${s}-${i}/`)}}else{if(!(e.specStatus.endsWith("NOTE")||"FPWD"===e.specStatus||"FPLC"===e.specStatus||"ED"===e.specStatus||e.noRecTrack||e.isNoTrack||e.isSubmission)){const e=Yn`Add ${"[previousMaturity]"} and ${"[previousPublishDate]"} to the document's ${"[respecConfig]"}.`;Fn("This document is on the W3C Recommendation Track, but is missing the required 'Previous Version' link.",ps,{hint:e})}e.prevVersion||(e.prevVersion="")}if(e.prevRecShortname&&!e.prevRecURI&&(e.prevRecURI=hs(`${n}/${e.prevRecShortname}`)),e.formerEditors||(e.formerEditors=[]),e.editors)for(let t=0;t1,e.multipleFormerEditors=e.formerEditors.length>1,e.multipleAuthors=e.authors&&e.authors.length>1,e.alternateFormats?.forEach(e=>{if(!e.uri||!e.label){Fn("All alternate formats must have a uri and a label.",ps)}}),e.copyrightStart&&e.copyrightStart==e.publishYear&&(e.copyrightStart=""),e.longStatus=ws[e.specStatus],e.textStatus=ys[e.specStatus],bs[e.specStatus]&&(e.rdfStatus=bs[e.specStatus]),e.showPreviousVersion="FPWD"!==e.specStatus&&"FPLC"!==e.specStatus&&"ED"!==e.specStatus&&!e.isNoTrack&&!e.isSubmission,e.specStatus.endsWith("NOTE")&&!e.prevVersion&&(e.showPreviousVersion=!1),e.isTagFinding&&(e.showPreviousVersion=!!e.previousPublishDate),e.notYetRec=e.isRecTrack&&"REC"!==e.specStatus,e.isRec=e.isRecTrack&&"REC"===e.specStatus,e.isRec&&!e.errata){const e=Yn`Add an ${"[errata]"} URL to your ${"[respecConfig]"}.`;Fn("Recommendations must have an errata link.",ps,{hint:e})}e.prependW3C=!e.isBasic&&!e.isUnofficial,e.isED="ED"===e.specStatus,e.isCR="CR"===e.specStatus||"CRD"===e.specStatus,e.isCRDraft="CRD"===e.specStatus,e.isPR="PR"===e.specStatus,e.isPER="PER"===e.specStatus,e.isMO="MO"===e.specStatus,e.isNote=vs.includes(e.specStatus),e.isIGNote="IG-NOTE"===e.specStatus,e.dashDate=dn.format(e.publishDate),e.publishISODate=e.publishDate.toISOString(),e.shortISODate=dn.format(e.publishDate),function(e){if(!e.wgPatentPolicy)return;const t=new Set([].concat(e.wgPatentPolicy));if(t.size&&![...t].every(e=>Ts.includes(e))){const e=Yn`Invalid ${"[wgPatentPolicy]"} value(s): ${Vn([...t].filter(e=>!Ts.includes(e)))}.`,n=`Please use one of: ${Gn(Ts)}.`;Fn(e,ps,{hint:n})}if(1!==t.size){const e="When collaborating across multiple groups, they must use the same patent policy.",n=Yn`For ${"[wgPatentPolicy]"}, please check the patent policies of each group. The patent policies were: ${[...t].join(", ")}.`;Fn(e,ps,{hint:n})}e.wgPatentPolicy=[...t][0]}(e),await async function(e){if(!e.shortName||null===e.historyURI)return;const t=new URL(e.historyURI??e.shortName,"https://www.w3.org/standards/history/");if([...$s,...vs,...ks].includes(e.specStatus))return void(e.historyURI=t.href);try{const n=await fetch(t,{method:"HEAD"});n.ok&&(e.historyURI=n.url)}catch{}}(e);const s={get multipleAlternates(){return e.alternateFormats&&e.alternateFormats.length>1},get alternatesHTML(){return e.alternateFormats&&Rn(e.alternateFormats.map(({label:e})=>e),(t,n)=>{const r=e.alternateFormats[n];return on`e),{quotes:!0})}. If in doubt, remove \`license\` and let ReSpec pick one for you.`;Xn(t,$s,{hint:n})}}if(e.isUnofficial&&!t&&(t="cc-by"),!e.isUnofficial&&["cc-by","cc0"].includes(t)){const t=ir`Please set ${"[license]"} to \`"w3c-software-doc"\` instead.`;Xn(ir`License "\`${e.license}\`" is not allowed for W3C Specifications.`,$s,{hint:t})}return zs.get(t)}(e),e.isCGBG=Ns.includes(e.specStatus),e.isCGFinal=e.isCGBG&&e.specStatus.endsWith("G-FINAL"),e.isBasic="base"===e.specStatus,e.isRegular=!e.isCGBG&&!e.isBasic,e.isRegular&&!e.shortName){Xn("Missing required configuration: `shortName`",$s)}if(e.testSuiteURI){const t=new URL(e.testSuiteURI,location.href),{host:n,pathname:r}=t;if("github.com"===n&&r.startsWith("/w3c/web-platform-tests/")){const t="Web Platform Tests have moved to a new Github Organization at https://github.com/web-platform-tests. ",n=ir`Please update your ${"[testSuiteURI]"} to point to the new tests repository (e.g., ${"https://wpt.live/"+e.shortName}).`;er(t,$s,{hint:n})}}if(e.subtitle||(e.subtitle=""),e.publishDate=Ws(e,"publishDate",document.lastModified),e.publishYear=e.publishDate.getUTCFullYear(),e.publishHumanDate=xs.format(e.publishDate),e.isNoTrack=Os.includes(e.specStatus),e.isRecTrack=!e.noRecTrack&&Ps.concat(Ls).includes(e.specStatus),e.isMemberSubmission="Member-SUBM"===e.specStatus,e.isMemberSubmission){const t={alt:"W3C Member Submission",href:"https://www.w3.org/Submission/",src:"https://www.w3.org/Icons/member_subm-v.svg",width:"211"};e.logos.push({...Us,...t})}if(e.isTeamSubmission="Team-SUBM"===e.specStatus,e.isTeamSubmission){const t={alt:"W3C Team Submission",href:"https://www.w3.org/TeamSubmission/",src:"https://www.w3.org/Icons/team_subm-v.svg",width:"211"};e.logos.push({...Us,...t})}if(e.isSubmission=e.isMemberSubmission||e.isTeamSubmission,e.anOrA=js.includes(e.specStatus)?"an":"a",e.isTagFinding="finding"===e.specStatus||"draft-finding"===e.specStatus||"editor-draft-finding"===e.specStatus,e.isTagEditorFinding="editor-draft-finding"===e.specStatus,e.isRecTrack&&!e.github&&!e.wgPublicList){const e=ir`Use the ${"[github]"} configuration option to add a link to a repository. Alternatively use ${"[wgPublicList]"} to link to a mailing list.`;Xn("W3C Process requires a either a link to a public repository or mailing list.",$s,{hint:e})}if(!e.edDraftURI&&(e.edDraftURI="","ED"===e.specStatus)){er("Editor's Drafts should set edDraftURI.",$s)}const t=Ss[e.specStatus]||e.specStatus,n=Cs[e.specStatus]||"/TR";if(e.isRegular){const{shortName:r,publishDate:s}=e,i=e.publishDate.getUTCFullYear(),o=`${t}-${r}-${In(s)}`;e.thisVersion=_s(`${n}/${i}/${o}/`)}"ED"===e.specStatus&&(e.thisVersion=e.edDraftURI);const r=`${n}/${e.shortName}`;if(null!==e.latestVersion&&(e.latestVersion=e.latestVersion?_s(""+e.latestVersion):_s(`${n}/${e.shortName}/`)),e.previousPublishDate){if(!e.previousMaturity&&!e.isTagFinding){Xn("`previousPublishDate` is set, but not `previousMaturity`.",$s)}e.previousPublishDate=Ws(e,"previousPublishDate");const t=Ss[e.previousMaturity]??e.previousMaturity;if(e.isTagFinding&&e.latestVersion){const t=kn.format(e.publishDate);e.thisVersion=_s(`${r}-${t}`);const n=kn.format(e.previousPublishDate);e.prevVersion=_s(`${r}-${n}}`)}else if(e.isCGBG||e.isBasic)e.prevVersion=e.prevVersion||"";else{const r=e.previousPublishDate.getUTCFullYear(),{shortName:s}=e,i=In(e.previousPublishDate);e.prevVersion=_s(`${n}/${r}/${t}-${s}-${i}/`)}}else{if(!(e.specStatus.endsWith("NOTE")||"FPWD"===e.specStatus||"FPLC"===e.specStatus||"ED"===e.specStatus||e.noRecTrack||e.isNoTrack||e.isSubmission)){const e=ir`Add ${"[previousMaturity]"} and ${"[previousPublishDate]"} to the document's ${"[respecConfig]"}.`;Xn("This document is on the W3C Recommendation Track, but is missing the required 'Previous Version' link.",$s,{hint:e})}e.prevVersion||(e.prevVersion="")}if(e.prevRecShortname&&!e.prevRecURI&&(e.prevRecURI=_s(`${n}/${e.prevRecShortname}`)),e.formerEditors||(e.formerEditors=[]),e.editors)for(let t=0;t1,e.multipleFormerEditors=e.formerEditors.length>1,e.multipleAuthors=e.authors&&e.authors.length>1,e.alternateFormats?.forEach(e=>{if(!e.uri||!e.label){Xn("All alternate formats must have a uri and a label.",$s)}}),e.copyrightStart&&e.copyrightStart==e.publishYear&&(e.copyrightStart=""),e.longStatus=Ts[e.specStatus],e.textStatus=Rs[e.specStatus],Es[e.specStatus]&&(e.rdfStatus=Es[e.specStatus]),e.showPreviousVersion="FPWD"!==e.specStatus&&"FPLC"!==e.specStatus&&"ED"!==e.specStatus&&!e.isNoTrack&&!e.isSubmission,e.specStatus.endsWith("NOTE")&&!e.prevVersion&&(e.showPreviousVersion=!1),e.isTagFinding&&(e.showPreviousVersion=!!e.previousPublishDate),e.notYetRec=e.isRecTrack&&"REC"!==e.specStatus,e.isRec=e.isRecTrack&&"REC"===e.specStatus,e.isRec&&!e.errata){const e=ir`Add an ${"[errata]"} URL to your ${"[respecConfig]"}.`;Xn("Recommendations must have an errata link.",$s,{hint:e})}e.prependW3C=!e.isBasic&&!e.isUnofficial,e.isED="ED"===e.specStatus,e.isCR="CR"===e.specStatus||"CRD"===e.specStatus,e.isCRDraft="CRD"===e.specStatus,e.isPR="PR"===e.specStatus,e.isPER="PER"===e.specStatus,e.isMO="MO"===e.specStatus,e.isNote=As.includes(e.specStatus),e.isIGNote="IG-NOTE"===e.specStatus,e.dashDate=kn.format(e.publishDate),e.publishISODate=e.publishDate.toISOString(),e.shortISODate=kn.format(e.publishDate),function(e){if(!e.wgPatentPolicy)return;const t=new Set([].concat(e.wgPatentPolicy));if(t.size&&![...t].every(e=>Ms.includes(e))){const e=ir`Invalid ${"[wgPatentPolicy]"} value(s): ${rr([...t].filter(e=>!Ms.includes(e)))}.`,n=`Please use one of: ${nr(Ms)}.`;Xn(e,$s,{hint:n})}if(1!==t.size){const e="When collaborating across multiple groups, they must use the same patent policy.",n=ir`For ${"[wgPatentPolicy]"}, please check the patent policies of each group. The patent policies were: ${[...t].join(", ")}.`;Xn(e,$s,{hint:n})}e.wgPatentPolicy=[...t][0]}(e),await async function(e){if(!e.shortName||null===e.historyURI)return;const t=new URL(e.historyURI??e.shortName,"https://www.w3.org/standards/history/");if([...Ps,...As,...Ls].includes(e.specStatus))return void(e.historyURI=t.href);try{const n=await fetch(t,{method:"HEAD"});n.ok&&(e.historyURI=n.url)}catch{}}(e);const s={get multipleAlternates(){return e.alternateFormats&&e.alternateFormats.length>1},get alternatesHTML(){return e.alternateFormats&&zn(e.alternateFormats.map(({label:e})=>e),(t,n)=>{const r=e.alternateFormats[n];return gn`${r.label}`})}},i=(e.isCGBG?is:ss)(e,s);document.body.prepend(i),document.body.classList.add("h-entry");const o=document.getElementById("sotd")||document.createElement("section");if((e.isCGBG||!e.isNoTrack||e.isTagFinding)&&!o.id){Fn("A Status of This Document must include at least on custom paragraph.",ps,{elements:[o],hint:"Add a `

        ` in the 'sotd' section that reflects the status of this specification."})}o.id=o.id||"sotd",o.classList.add("introductory");const a=[e.wg,e.wgURI,e.wgPatentURI];if(a.some(e=>Array.isArray(e))&&!a.every(e=>Array.isArray(e))){const e=Yn`Use the ${"[group]"} option with an array instead.`;Fn(Yn`If one of ${"[wg]"}, ${"[wgURI]"}, or ${"[wgPatentURI]"} is an array, they all have to be.`,ps,{hint:e})}if(e.isCGBG&&!e.wg){Fn(Yn`${"[wg]"} configuration option is required for this kind of document.`,ps)}if(Array.isArray(e.wg)?(e.multipleWGs=e.wg.length>1,e.wgHTML=Rn(e.wg,(t,n)=>on`the ${t}`),e.wgPatentHTML=Rn(e.wg,(t,n)=>on`a + >`})}},i=(e.isCGBG?ms:hs)(e,s);document.body.prepend(i),document.body.classList.add("h-entry");const o=document.getElementById("sotd")||document.createElement("section");if((e.isCGBG||!e.isNoTrack||e.isTagFinding)&&!o.id){Xn("A Status of This Document must include at least on custom paragraph.",$s,{elements:[o],hint:"Add a `

        ` in the 'sotd' section that reflects the status of this specification."})}o.id=o.id||"sotd",o.classList.add("introductory");const a=[e.wg,e.wgURI,e.wgPatentURI];if(a.some(e=>Array.isArray(e))&&!a.every(e=>Array.isArray(e))){const e=ir`Use the ${"[group]"} option with an array instead.`;Xn(ir`If one of ${"[wg]"}, ${"[wgURI]"}, or ${"[wgPatentURI]"} is an array, they all have to be.`,$s,{hint:e})}if(e.isCGBG&&!e.wg){Xn(ir`${"[wg]"} configuration option is required for this kind of document.`,$s)}if(Array.isArray(e.wg)?(e.multipleWGs=e.wg.length>1,e.wgHTML=zn(e.wg,(t,n)=>gn`the ${t}`),e.wgPatentHTML=zn(e.wg,(t,n)=>gn`a public list of any patent disclosures (${t})`)):(e.multipleWGs=!1,e.wg&&(e.wgHTML=on`the ${e.wg}`)),"PR"===e.specStatus&&!e.crEnd){Fn(Yn`${"[specStatus]"} is "PR" but no ${"[crEnd]"} is specified in the ${"[respecConfig]"} (needed to indicate end of previous CR).`,ps)}if("CR"===e.specStatus&&!e.crEnd){Fn(Yn`${"[specStatus]"} is "CR", but no ${"[crEnd]"} is specified in the ${"[respecConfig]"}.`,ps)}if(e.crEnd=Ls(e,"crEnd"),e.humanCREnd=fs.format(e.crEnd),"PR"===e.specStatus&&!e.prEnd){Fn(Yn`${"[specStatus]"} is "PR" but no ${"[prEnd]"} is specified in the ${"[respecConfig]"}.`,ps)}if(e.prEnd=Ls(e,"prEnd"),e.humanPREnd=fs.format(e.prEnd),"PER"===e.specStatus&&!e.perEnd){Fn(Yn`${"[specStatus]"} is "PR", but no ${"[prEnd]"} is specified`,ps)}if(e.perEnd=Ls(e,"perEnd"),e.humanPEREnd=fs.format(e.perEnd),e.hasOwnProperty("updateableRec")){const t=Yn`Add an ${"[`updateable-rec`|#updateable-rec-class]"} CSS class to the Status of This Document section instead.`;Bn("Configuration option `updateableRec` is deprecated.",ps,{hint:t}),e.updateableRec&&o.classList.add("updateable-rec")}e.updateableRec=o.classList.contains("updateable-rec");const c=["addition","correction"];if("REC"===e.specStatus&&e.revisionTypes?.length>0){if(e.revisionTypes.some(e=>!c.includes(e))){const t=Yn`${"[specStatus]"} is "REC" with unknown ${"[revisionTypes]"}: '${Gn(e.revisionTypes.filter(e=>!c.includes(e)))}'.`,n=Yn`The valid values for ${"[revisionTypes]"} are: ${Gn(c)}.`;Fn(t,ps,{hint:n})}if(e.revisionTypes.includes("addition")&&!e.updateableRec){Fn(Yn`${"[specStatus]"} is "REC" with proposed additions but the Recommendation is not marked as a allowing new features.`,ps)}}if("REC"===e.specStatus&&e.updateableRec&&e.revisionTypes&&e.revisionTypes.length>0&&!e.revisedRecEnd){Fn(Yn`${"[specStatus]"} is "REC" with proposed corrections or additions but no ${"[revisedRecEnd]"} is specified in the ${"[respecConfig]"}.`,ps)}if(e.revisedRecEnd=Ls(e,"revisedRecEnd"),e.humanRevisedRecEnd=fs.format(e.revisedRecEnd),e.recNotExpected=!(!e.noRecTrack&&!e.recNotExpected)||!e.isRecTrack&&"WD"==t&&"FPWD-NOTE"!==e.specStatus,e.noRecTrack&&$s.includes(e.specStatus)){const t=Yn`Document configured as ${"[noRecTrack]"}, but its status ("${e.specStatus}") puts it on the W3C Rec Track.`,n=Gn($s,{quotes:!0});Fn(t,ps,{hint:`Status **can't** be any of: ${n}.`})}if(e.isIGNote&&!e.charterDisclosureURI){Fn(Yn`IG-NOTEs must link to charter's disclosure section using ${"[charterDisclosureURI]"}.`,ps)}if(o.classList.contains("override")||on.bind(o)`${function(e,t){const n={...Ps(t,e),get mailToWGPublicList(){return`mailto:${e.wgPublicList}@w3.org`},get mailToWGPublicListWithSubject(){const t=e.subjectPrefix?"?subject="+encodeURIComponent(e.subjectPrefix):"";return this.mailToWGPublicList+t},get mailToWGPublicListSubscription(){return`mailto:${e.wgPublicList}-request@w3.org?subject=subscribe`}};return(e.isCGBG?ds:as)(e,n)}(e,o)}`,!e.implementationReportURI&&e.isCR){const e=Yn`CR documents must have an ${"[implementationReportURI]"} that describes the [implementation experience](https://www.w3.org/2019/Process-20190301/#implementation-experience).`;Fn(Yn`Missing ${"[implementationReportURI]"} configuration option in ${"[respecConfig]"}.`,ps,{hint:e})}if(!e.implementationReportURI&&e.isPR){Bn(Yn`PR documents should include an ${"[implementationReportURI]"}, which needs to link to a document that describes the [implementation experience](https://www.w3.org/2019/Process-20190301/#implementation-experience).`,ps)}Qn("amend-user-config",{publishISODate:e.publishISODate,generatedSubtitle:`${e.longStatus} ${e.publishHumanDate}`})}});const Ds={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},Ns="w3c/defaults",Os={src:"https://www.w3.org/StyleSheets/TR/2016/logos/W3C",alt:"W3C",height:48,width:72,url:"https://www.w3.org/"},js={lint:{"privsec-section":!0,"wpt-tests-exist":!1,a11y:!1},doJsonLd:!1,logos:[],xref:!0,wgId:"",otherLinks:[],excludeGithubLinks:!0};var zs=Object.freeze({__proto__:null,name:Ns,run:function(e){const t=!1!==e.lint&&{...Ds.lint,...js.lint,...e.lint};Object.assign(e,{...Ds,...js,...e,lint:t}),"unofficial"===e.specStatus||e.hasOwnProperty("license")||(e.license="w3c-software-doc"),function(e){const t=e.specStatus??"";[...ks,...$s,...vs].includes(t)&&e.logos?.unshift(Os);"ED"===t&&0===e.logos?.length&&e.logos.push(Os)}(e),e.groupType&&e.specStatus&&function(e){const{specStatus:t,groupType:n}=e;switch(n){case"cg":if(![...Ss,"unofficial"].includes(t)){const n=Yn`W3C Community Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=Gn(xs,{quotes:!0});Fn(n,Ns,{hint:`Please use one of: ${r}. Automatically falling back to \`"CG-DRAFT"\`.`}),e.specStatus="CG-DRAFT"}break;case"bg":if(![..._s,"unofficial"].includes(t)){const n=Yn`W3C Business Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=Gn(_s,{quotes:!0});Fn(n,Ns,{hint:`Please use one of: ${r}. Automatically falling back to \`"BG-DRAFT"\`.`}),e.specStatus="BG-DRAFT"}break;case"wg":if(Ss.includes(t)){const e=Yn`Please see ${"[specStatus]"} for appropriate values for this type of group.`;Fn(Yn`W3C Working Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,Ns,{hint:e})}}}(e)}});var Ms=String.raw`@keyframes pop{ + >`)):(e.multipleWGs=!1,e.wg&&(e.wgHTML=gn`the ${e.wg}`)),"PR"===e.specStatus&&!e.crEnd){Xn(ir`${"[specStatus]"} is "PR" but no ${"[crEnd]"} is specified in the ${"[respecConfig]"} (needed to indicate end of previous CR).`,$s)}if("CR"===e.specStatus&&!e.crEnd){Xn(ir`${"[specStatus]"} is "CR", but no ${"[crEnd]"} is specified in the ${"[respecConfig]"}.`,$s)}if(e.crEnd=Ws(e,"crEnd"),e.humanCREnd=xs.format(e.crEnd),"PR"===e.specStatus&&!e.prEnd){Xn(ir`${"[specStatus]"} is "PR" but no ${"[prEnd]"} is specified in the ${"[respecConfig]"}.`,$s)}if(e.prEnd=Ws(e,"prEnd"),e.humanPREnd=xs.format(e.prEnd),"PER"===e.specStatus&&!e.perEnd){Xn(ir`${"[specStatus]"} is "PR", but no ${"[prEnd]"} is specified`,$s)}if(e.perEnd=Ws(e,"perEnd"),e.humanPEREnd=xs.format(e.perEnd),e.hasOwnProperty("updateableRec")){const t=ir`Add an ${"[`updateable-rec`|#updateable-rec-class]"} CSS class to the Status of This Document section instead.`;er("Configuration option `updateableRec` is deprecated.",$s,{hint:t}),e.updateableRec&&o.classList.add("updateable-rec")}e.updateableRec=o.classList.contains("updateable-rec");const c=["addition","correction"];if("REC"===e.specStatus&&e.revisionTypes?.length>0){if(e.revisionTypes.some(e=>!c.includes(e))){const t=ir`${"[specStatus]"} is "REC" with unknown ${"[revisionTypes]"}: '${nr(e.revisionTypes.filter(e=>!c.includes(e)))}'.`,n=ir`The valid values for ${"[revisionTypes]"} are: ${nr(c)}.`;Xn(t,$s,{hint:n})}if(e.revisionTypes.includes("addition")&&!e.updateableRec){Xn(ir`${"[specStatus]"} is "REC" with proposed additions but the Recommendation is not marked as a allowing new features.`,$s)}}if("REC"===e.specStatus&&e.updateableRec&&e.revisionTypes&&e.revisionTypes.length>0&&!e.revisedRecEnd){Xn(ir`${"[specStatus]"} is "REC" with proposed corrections or additions but no ${"[revisedRecEnd]"} is specified in the ${"[respecConfig]"}.`,$s)}if(e.revisedRecEnd=Ws(e,"revisedRecEnd"),e.humanRevisedRecEnd=xs.format(e.revisedRecEnd),e.recNotExpected=!(!e.noRecTrack&&!e.recNotExpected)||!e.isRecTrack&&"WD"==t&&"FPWD-NOTE"!==e.specStatus,e.noRecTrack&&Ps.includes(e.specStatus)){const t=ir`Document configured as ${"[noRecTrack]"}, but its status ("${e.specStatus}") puts it on the W3C Rec Track.`,n=nr(Ps,{quotes:!0});Xn(t,$s,{hint:`Status **can't** be any of: ${n}.`})}if(e.isIGNote&&!e.charterDisclosureURI){Xn(ir`IG-NOTEs must link to charter's disclosure section using ${"[charterDisclosureURI]"}.`,$s)}if(o.classList.contains("override")||gn.bind(o)`${function(e,t){const n={...qs(t,e),get mailToWGPublicList(){return`mailto:${e.wgPublicList}@w3.org`},get mailToWGPublicListWithSubject(){const t=e.subjectPrefix?"?subject="+encodeURIComponent(e.subjectPrefix):"";return this.mailToWGPublicList+t},get mailToWGPublicListSubscription(){return`mailto:${e.wgPublicList}-request@w3.org?subject=subscribe`}};return(e.isCGBG?ks:bs)(e,n)}(e,o)}`,!e.implementationReportURI&&e.isCR){const e=ir`CR documents must have an ${"[implementationReportURI]"} that describes the [implementation experience](https://www.w3.org/2019/Process-20190301/#implementation-experience).`;Xn(ir`Missing ${"[implementationReportURI]"} configuration option in ${"[respecConfig]"}.`,$s,{hint:e})}if(!e.implementationReportURI&&e.isPR){er(ir`PR documents should include an ${"[implementationReportURI]"}, which needs to link to a document that describes the [implementation experience](https://www.w3.org/2019/Process-20190301/#implementation-experience).`,$s)}cr("amend-user-config",{publishISODate:e.publishISODate,generatedSubtitle:`${e.longStatus} ${e.publishHumanDate}`})}});const Bs={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},Hs="w3c/defaults",Gs={src:"https://www.w3.org/StyleSheets/TR/2016/logos/W3C",alt:"W3C",height:48,width:72,url:"https://www.w3.org/"},Vs={lint:{"privsec-section":!0,"wpt-tests-exist":!1,a11y:!1},doJsonLd:!1,logos:[],xref:!0,wgId:"",otherLinks:[],excludeGithubLinks:!0};var Zs=Object.freeze({__proto__:null,name:Hs,run:function(e){const t=!1!==e.lint&&{...Bs.lint,...Vs.lint,...e.lint};Object.assign(e,{...Bs,...Vs,...e,lint:t}),"unofficial"===e.specStatus||e.hasOwnProperty("license")||(e.license="w3c-software-doc"),function(e){const t=e.specStatus??"";[...Ls,...Ps,...As].includes(t)&&e.logos?.unshift(Gs);"ED"===t&&0===e.logos?.length&&e.logos.push(Gs)}(e),e.groupType&&e.specStatus&&function(e){const{specStatus:t,groupType:n}=e;switch(n){case"cg":if(![...Ns,"unofficial"].includes(t)){const n=ir`W3C Community Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=nr(Is,{quotes:!0});Xn(n,Hs,{hint:`Please use one of: ${r}. Automatically falling back to \`"CG-DRAFT"\`.`}),e.specStatus="CG-DRAFT"}break;case"bg":if(![...Ds,"unofficial"].includes(t)){const n=ir`W3C Business Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=nr(Ds,{quotes:!0});Xn(n,Hs,{hint:`Please use one of: ${r}. Automatically falling back to \`"BG-DRAFT"\`.`}),e.specStatus="BG-DRAFT"}break;case"wg":if(Ns.includes(t)){const e=ir`Please see ${"[specStatus]"} for appropriate values for this type of group.`;Xn(ir`W3C Working Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,Hs,{hint:e})}}}(e)}});var Ys=String.raw`@keyframes pop{ 0%{transform:scale(1,1)} 25%{transform:scale(1.25,1.25);opacity:.75} 100%{transform:scale(1,1)} @@ -674,130 +674,130 @@ dd{margin-left:0} } @media print{ .removeOnSave{display:none} -}`;const Us=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=Ms,document.head.appendChild(e),e}();var Ws=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&Us.remove()}});const qs="w3c/style";const Fs=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:"preload",href:"https://www.w3.org/StyleSheets/TR/2016/base.css",as:"style"},{hint:"preload",href:"https://www.w3.org/StyleSheets/TR/2016/logos/W3C",as:"image"}],t=document.createDocumentFragment();for(const n of e.map(fn))t.appendChild(n);return t}();Fs.appendChild(function(){const e=document.createElement("link");return e.rel="stylesheet",e.href="https://www.w3.org/StyleSheets/TR/2016/base.css",e.classList.add("removeOnSave"),e}()),document.head.querySelector("meta[name=viewport]")||Fs.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(Fs);var Bs=Object.freeze({__proto__:null,name:qs,run:function(e){if(!e.specStatus){const t="`respecConfig.specStatus` missing. Defaulting to 'base'.";e.specStatus="base",Bn(t,qs)}let t="W3C-";switch(e.specStatus.toUpperCase()){case"CG-DRAFT":case"CG-FINAL":case"BG-DRAFT":case"BG-FINAL":t=e.specStatus.toLowerCase();break;case"FPWD":case"LC":case"WD-NOTE":case"LC-NOTE":t+="WD";break;case"WG-NOTE":case"FPWD-NOTE":t+="WG-NOTE.css";break;case"UNOFFICIAL":t+="UD";break;case"FINDING":case"DRAFT-FINDING":case"EDITOR-DRAFT-FINDING":case"BASE":t="base.css";break;default:t+=e.specStatus}const n=function(e){let t="";switch(e){case null:case!0:t="2016";break;default:e&&!isNaN(e)&&(t=e.toString().trim())}return t}(e.useExperimentalStyles||"2016");n&&!e.noToc&&Xn("end-all",()=>{!function(e,t){const n=e.createElement("script");location.hash&&n.addEventListener("load",()=>{window.location.href=location.hash},{once:!0}),n.src=`https://www.w3.org/scripts/TR/${t}/fixup.js`,e.body.appendChild(n)}(document,n)},{once:!0});const r=`https://www.w3.org/StyleSheets/TR/${n?n+"/":""}${t}`;var s;!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,r),Xn("beforesave",(s=r,e=>{const t=e.querySelector(`head link[href="${s}"]`);e.querySelector("head").append(t)}))}});const Hs={en:{status_at_publication:on`This section describes the status of this +}`;const Js=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=Ys,document.head.appendChild(e),e}();var Ks=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&Js.remove()}});const Qs="w3c/style";const Xs=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:"preload",href:"https://www.w3.org/StyleSheets/TR/2016/base.css",as:"style"},{hint:"preload",href:"https://www.w3.org/StyleSheets/TR/2016/logos/W3C",as:"image"}],t=document.createDocumentFragment();for(const n of e.map(xn))t.appendChild(n);return t}();Xs.appendChild(function(){const e=document.createElement("link");return e.rel="stylesheet",e.href="https://www.w3.org/StyleSheets/TR/2016/base.css",e.classList.add("removeOnSave"),e}()),document.head.querySelector("meta[name=viewport]")||Xs.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(Xs);var ei=Object.freeze({__proto__:null,name:Qs,run:function(e){if(!e.specStatus){const t="`respecConfig.specStatus` missing. Defaulting to 'base'.";e.specStatus="base",er(t,Qs)}let t="W3C-";switch(e.specStatus.toUpperCase()){case"CG-DRAFT":case"CG-FINAL":case"BG-DRAFT":case"BG-FINAL":t=e.specStatus.toLowerCase();break;case"FPWD":case"LC":case"WD-NOTE":case"LC-NOTE":t+="WD";break;case"WG-NOTE":case"FPWD-NOTE":t+="WG-NOTE.css";break;case"UNOFFICIAL":t+="UD";break;case"FINDING":case"DRAFT-FINDING":case"EDITOR-DRAFT-FINDING":case"BASE":t="base.css";break;default:t+=e.specStatus}const n=function(e){let t="";switch(e){case null:case!0:t="2016";break;default:e&&!isNaN(e)&&(t=e.toString().trim())}return t}(e.useExperimentalStyles||"2016");n&&!e.noToc&&lr("end-all",()=>{!function(e,t){const n=e.createElement("script");location.hash&&n.addEventListener("load",()=>{window.location.href=location.hash},{once:!0}),n.src=`https://www.w3.org/scripts/TR/${t}/fixup.js`,e.body.appendChild(n)}(document,n)},{once:!0});const r=`https://www.w3.org/StyleSheets/TR/${n?n+"/":""}${t}`;var s;!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,r),lr("beforesave",(s=r,e=>{const t=e.querySelector(`head link[href="${s}"]`);e.querySelector("head").append(t)}))}});const ti={en:{status_at_publication:gn`This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at - https://www.w3.org/TR/.`},ko:{status_at_publication:on`이 부분은 현재 문서의 발행 당시 상태에 대해 + https://www.w3.org/TR/.`},ko:{status_at_publication:gn`이 부분은 현재 문서의 발행 당시 상태에 대해 기술합니다. 다른 문서가 이 문서를 대체할 수 있습니다. W3C 발행 문서의 최신 목록 및 테크니컬 리포트 최신판을 https://www.w3.org/TR/ 의 W3C technical reports index 에서 - 열람할 수 있습니다.`},zh:{status_at_publication:on`本章节描述了本文档的发布状态。其它更新版本可能会覆盖本文档。W3C的文档列 + 열람할 수 있습니다.`},zh:{status_at_publication:gn`本章节描述了本文档的发布状态。其它更新版本可能会覆盖本文档。W3C的文档列 表和最新版本可通过W3C技术报告索引访问。`},ja:{status_at_publication:on`この節には、公開時点でのこの文書の位置づけが記されている。他の文書によって置き換えられる可能性がある。現時点でのW3Cの発行文書とこのテクニカルレポートの最新版は、下記から参照できる。 + >索引访问。`},ja:{status_at_publication:gn`この節には、公開時点でのこの文書の位置づけが記されている。他の文書によって置き換えられる可能性がある。現時点でのW3Cの発行文書とこのテクニカルレポートの最新版は、下記から参照できる。 W3C technical reports index - (https://www.w3.org/TR/)`},es:{status_at_publication:on`Esta sección describe el estado del presente + (https://www.w3.org/TR/)`},es:{status_at_publication:gn`Esta sección describe el estado del presente documento al momento de su publicación. El presente documento puede ser remplazado por otros. Una lista de las publicaciones actuales del W3C y la última revisión del presente informe técnico puede hallarse en http://www.w3.org/TR/ el índice de informes técnicos del - W3C.`},de:{status_at_publication:on`Dieser Abschnitt beschreibt den Status des + W3C.`},de:{status_at_publication:gn`Dieser Abschnitt beschreibt den Status des Dokuments zum Zeitpunkt der Publikation. Neuere Dokumente können dieses Dokument obsolet machen. Eine Liste der aktuellen Publikatinen des W3C und die aktuellste Fassung dieser Spezifikation kann im W3C technical reports index unter - https://www.w3.org/TR/ abgerufen werden.`}};Object.keys(Hs).forEach(e=>{r[e]||(r[e]={}),Object.assign(r[e],Hs[e])});var Gs=Object.freeze({__proto__:null,name:"w3c/l10n"});const Vs="core/github";let Zs,Ys;const Js=new Promise((e,t)=>{Zs=e,Ys=e=>{Fn(e,Vs),t(new Error(e))}}),Ks=$n({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 Qs=Object.freeze({__proto__:null,name:Vs,github:Js,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void Zs(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=Yn`Config option ${"[github]"} is missing property \`repoURL\`.`;return void Ys(e)}let t,n=e.github.repoURL||e.github;n.endsWith("/")||(n+="/");try{t=new URL(n,"https://github.com")}catch{const e=Yn`${"[github]"} configuration option is not a valid URL? (${n}).`;return void Ys(e)}if("https://github.com"!==t.origin){const e=Yn`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${t.href}).`;return void Ys(e)}const[r,s]=t.pathname.split("/").filter(e=>e);if(!r||!s){const e=Yn`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void Ys(e)}const i=e.github.branch||"gh-pages",o=new URL("./issues/",t).href,a=new URL("./commits/"+(e.github.branch??""),t.href),c={edDraftURI:`https://${r.toLowerCase()}.github.io/${s}/`,githubToken:void 0,githubUser:void 0,issueBase:o,atRiskBase:o,otherLinks:[],pullBase:new URL("./pulls/",t).href,shortName:s};let l="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)l=e.githubAPI;else{Bn("The `githubAPI` configuration option is private and should not be added manually.",Vs)}if(!e.excludeGithubLinks){const n={key:Ks.participate,data:[{value:`GitHub ${r}/${s}`,href:t},{value:Ks.file_a_bug,href:c.issueBase},{value:Ks.commit_history,href:a.href},{value:"Pull requests",href:c.pullBase}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(n)}const u={branch:i,repoURL:t.href,apiBase:l,fullName:`${r}/${s}`,issuesURL:o,pullsURL:c.pullBase,newIssuesURL:new URL("./new/choose",o).href,commitHistoryURL:a.href};Zs(u);const d={...c,...e,github:u,githubAPI:l};Object.assign(e,d)}});const Xs="core/data-include";function ei(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`),s=Sn(e,r.dataset.oninclude,n),i="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let s=t;"markdown"===r&&(s=mr(s)),"text"===r?e.textContent=s:e.innerHTML=s,"markdown"===r&&wr(e),n&&e.replaceWith(...e.childNodes)}(r,s,{replace:i}),i||function(e){["data-include","data-include-format","data-include-replace","data-include-id","oninclude"].forEach(t=>e.removeAttribute(t))}(r)}var ti=Object.freeze({__proto__:null,name:Xs,run:async function(){const e=document.querySelectorAll("[data-include]"),t=Array.from(e).map(async e=>{const t=e.dataset.include;if(!t)return;const n="include-"+String(Math.random()).substr(2);e.dataset.includeId=n;try{const e=await fetch(t);ei(await e.text(),n,t)}catch(n){const r=`\`data-include\` failed: \`${t}\` (${n.message}).`;console.error(r,e,n),Fn(r,Xs,{elements:[e]})}});await Promise.all(t)}});const ni="core/title",ri=$n({en:{default_title:"No Title"},de:{default_title:"Kein Titel"},zh:{default_title:"无标题"}});var si=Object.freeze({__proto__:null,name:ni,run:function(e){const t=document.querySelector("h1#title")||on`

        `;if(t.isConnected&&""===t.textContent.trim()){Fn('The document is missing a title, so using a default title. To fix this, please give your document a ``. If you need special markup in the document\'s title, please use a `<h1 id="title">`.',ni,{title:"Document is missing a title",elements:[t]})}t.id||(t.id="title"),t.classList.add("title"),function(e,t){t.isConnected||(t.textContent=document.title||""+ri.default_title);const n=document.createElement("h1");n.innerHTML=t.innerHTML.replace(/:<br>/g,": ").replace(/<br>/g," - ");let r=kn(n.textContent);if(e.isPreview&&e.prNumber){const n=e.prUrl||`${e.github.repoURL}pull/${e.prNumber}`,{childNodes:s}=on` + https://www.w3.org/TR/ abgerufen werden.`}};Object.keys(ti).forEach(e=>{r[e]||(r[e]={}),Object.assign(r[e],ti[e])});var ni=Object.freeze({__proto__:null,name:"w3c/l10n"});const ri="core/github";let si,ii;const oi=new Promise((e,t)=>{si=e,ii=e=>{Xn(e,ri),t(new Error(e))}}),ai=Pn({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 ci=Object.freeze({__proto__:null,name:ri,github:oi,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void si(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=ir`Config option ${"[github]"} is missing property \`repoURL\`.`;return void ii(e)}let t,n=e.github.repoURL||e.github;n.endsWith("/")||(n+="/");try{t=new URL(n,"https://github.com")}catch{const e=ir`${"[github]"} configuration option is not a valid URL? (${n}).`;return void ii(e)}if("https://github.com"!==t.origin){const e=ir`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${t.href}).`;return void ii(e)}const[r,s]=t.pathname.split("/").filter(e=>e);if(!r||!s){const e=ir`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void ii(e)}const i=e.github.branch||"gh-pages",o=new URL("./issues/",t).href,a=new URL("./commits/"+(e.github.branch??""),t.href),c={edDraftURI:`https://${r.toLowerCase()}.github.io/${s}/`,githubToken:void 0,githubUser:void 0,issueBase:o,atRiskBase:o,otherLinks:[],pullBase:new URL("./pulls/",t).href,shortName:s};let l="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)l=e.githubAPI;else{er("The `githubAPI` configuration option is private and should not be added manually.",ri)}if(!e.excludeGithubLinks){const n={key:ai.participate,data:[{value:`GitHub ${r}/${s}`,href:t},{value:ai.file_a_bug,href:c.issueBase},{value:ai.commit_history,href:a.href},{value:"Pull requests",href:c.pullBase}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(n)}const u={branch:i,repoURL:t.href,apiBase:l,fullName:`${r}/${s}`,issuesURL:o,pullsURL:c.pullBase,newIssuesURL:new URL("./new/choose",o).href,commitHistoryURL:a.href};si(u);const d={...c,...e,github:u,githubAPI:l};Object.assign(e,d)}});const li="core/data-include";function ui(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`),s=Nn(e,r.dataset.oninclude,n),i="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let s=t;"markdown"===r&&(s=Sr(s)),"text"===r?e.textContent=s:e.innerHTML=s,"markdown"===r&&Tr(e),n&&e.replaceWith(...e.childNodes)}(r,s,{replace:i}),i||function(e){["data-include","data-include-format","data-include-replace","data-include-id","oninclude"].forEach(t=>e.removeAttribute(t))}(r)}var di=Object.freeze({__proto__:null,name:li,run:async function(){const e=document.querySelectorAll("[data-include]"),t=Array.from(e).map(async e=>{const t=e.dataset.include;if(!t)return;const n="include-"+String(Math.random()).substr(2);e.dataset.includeId=n;try{const e=await fetch(t);ui(await e.text(),n,t)}catch(n){const r=`\`data-include\` failed: \`${t}\` (${n.message}).`;console.error(r,e,n),Xn(r,li,{elements:[e]})}});await Promise.all(t)}});const pi="core/title",fi=Pn({en:{default_title:"No Title"},de:{default_title:"Kein Titel"},zh:{default_title:"无标题"}});var hi=Object.freeze({__proto__:null,name:pi,run:function(e){const t=document.querySelector("h1#title")||gn`<h1 id="title"></h1>`;if(t.isConnected&&""===t.textContent.trim()){Xn('The document is missing a title, so using a default title. To fix this, please give your document a `<title>`. If you need special markup in the document\'s title, please use a `<h1 id="title">`.',pi,{title:"Document is missing a title",elements:[t]})}t.id||(t.id="title"),t.classList.add("title"),function(e,t){t.isConnected||(t.textContent=document.title||""+fi.default_title);const n=document.createElement("h1");n.innerHTML=t.innerHTML.replace(/:<br>/g,": ").replace(/<br>/g," - ");let r=Ln(n.textContent);if(e.isPreview&&e.prNumber){const n=e.prUrl||`${e.github.repoURL}pull/${e.prNumber}`,{childNodes:s}=gn` Preview of PR <a href="${n}">#${e.prNumber}</a>: - `;t.prepend(...s),r=`Preview of PR #${e.prNumber}: ${r}`}document.title=r,e.title=r}(e,t),document.body.prepend(t)}});const ii="w3c/level",oi=$n({en:{level:"Level"}});var ai=Object.freeze({__proto__:null,name:ii,run:function(e){if(!e.hasOwnProperty("level"))return;const t=document.querySelector("h1#title"),n=parseInt(e.level);if(!Number.isInteger(n)||n<0){Fn(`The \`level\` configuration option must be a number greater or equal to 0. It is currently set to \`${n}\``,ii,{title:"Invalid level config.",elements:[t]})}else t.append(` ${oi.level} ${n}`),document.title=`${document.title} ${oi.level} ${n}`,e.shortName=`${e.shortName}-${n}`,e.level=n}});const ci="w3c/abstract",li=$n({en:{abstract:"Abstract"},ko:{abstract:"요약"},zh:{abstract:"摘要"},ja:{abstract:"要約"},nl:{abstract:"Samenvatting"},es:{abstract:"Resumen"},de:{abstract:"Zusammenfassung"}});var ui=Object.freeze({__proto__:null,name:ci,run:async function(){const e=document.getElementById("abstract");if(!e){return void Fn('Document must have one element with `id="abstract"`.',ci)}e.classList.add("introductory");let t=document.querySelector("#abstract>h2");t||(t=document.createElement("h2"),t.textContent=li.abstract,e.prepend(t))}});var di=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach(e=>{e.innerHTML=Sn(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")})}});const pi="core/dfn-abbr";function fi(e){const t=(n=e).dataset.abbr?n.dataset.abbr:n.textContent.match(/\b([a-z])/gi).join("").toUpperCase();var n;const r=e.textContent.replace(/\s\s+/g," ").trim();e.insertAdjacentHTML("afterend",` (<abbr title="${r}">${t}</abbr>)`);const s=e.dataset.lt||"";e.dataset.lt=s.split("|").filter(e=>e.trim()).concat(t).join("|")}var hi=Object.freeze({__proto__:null,name:pi,run:function(){const e=document.querySelectorAll("[data-abbr]");for(const t of e){const{localName:e}=t;switch(e){case"dfn":fi(t);break;default:Fn(`\`data-abbr\` attribute not supported on \`${e}\` elements.`,pi,{elements:[t],title:"Error: unsupported."})}}}});const mi=/^[a-z]+(\s+[a-z]+)+\??$/,gi=/\B"([^"]*)"\B/,bi=/(\w+)\((.*)\)$/,yi=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,wi=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,vi=/^(?:\w+)\??$/,ki=/^(\w+)\["([\w- ]*)"\]$/,$i=/\.?(\w+\(.*\)$)/,xi=/\/(.+)/,_i=/\[\[.+\]\]/;function Si(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return on`<a + `;t.prepend(...s),r=`Preview of PR #${e.prNumber}: ${r}`}document.title=r,e.title=r}(e,t),document.body.prepend(t)}});const mi="w3c/level",gi=Pn({en:{level:"Level"}});var bi=Object.freeze({__proto__:null,name:mi,run:function(e){if(!e.hasOwnProperty("level"))return;const t=document.querySelector("h1#title"),n=parseInt(e.level);if(!Number.isInteger(n)||n<0){Xn(`The \`level\` configuration option must be a number greater or equal to 0. It is currently set to \`${n}\``,mi,{title:"Invalid level config.",elements:[t]})}else t.append(` ${gi.level} ${n}`),document.title=`${document.title} ${gi.level} ${n}`,e.shortName=`${e.shortName}-${n}`,e.level=n}});const yi="w3c/abstract",wi=Pn({en:{abstract:"Abstract"},ko:{abstract:"요약"},zh:{abstract:"摘要"},ja:{abstract:"要約"},nl:{abstract:"Samenvatting"},es:{abstract:"Resumen"},de:{abstract:"Zusammenfassung"}});var vi=Object.freeze({__proto__:null,name:yi,run:async function(){const e=document.getElementById("abstract");if(!e){return void Xn('Document must have one element with `id="abstract"`.',yi)}e.classList.add("introductory");let t=document.querySelector("#abstract>h2");t||(t=document.createElement("h2"),t.textContent=wi.abstract,e.prepend(t))}});var ki=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach(e=>{e.innerHTML=Nn(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")})}});const $i="core/dfn-abbr";function xi(e){const t=(n=e).dataset.abbr?n.dataset.abbr:n.textContent.match(/\b([a-z])/gi).join("").toUpperCase();var n;const r=e.textContent.replace(/\s\s+/g," ").trim();e.insertAdjacentHTML("afterend",` (<abbr title="${r}">${t}</abbr>)`);const s=e.dataset.lt||"";e.dataset.lt=s.split("|").filter(e=>e.trim()).concat(t).join("|")}var _i=Object.freeze({__proto__:null,name:$i,run:function(){const e=document.querySelectorAll("[data-abbr]");for(const t of e){const{localName:e}=t;switch(e){case"dfn":xi(t);break;default:Xn(`\`data-abbr\` attribute not supported on \`${e}\` elements.`,$i,{elements:[t],title:"Error: unsupported."})}}}});const Si=/^[a-z]+(\s+[a-z]+)+\??$/,Ci=/\B"([^"]*)"\B/,Ei=/(\w+)\((.*)\)$/,Ri=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,Ti=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,Ai=/^(?:\w+)\??$/,Li=/^(\w+)\["([\w- ]*)"\]$/,Pi=/\.?(\w+\(.*\)$)/,Ii=/\/(.+)/,Di=/\[\[.+\]\]/;function Ni(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return gn`<a data-xref-type="_IDL_" data-link-type="idl" data-lt="${t}" ><code>${t+(r?"?":"")}</code></a - >`}function Ci(e){const{identifier:t,parent:n,slotType:r,renderParent:s,args:i}=e,{identifier:o}=n||{},a="method"===r,c=a?on`(${En(i,Ei)})`:null,l=a?`(${i.join(", ")})`:"";return on`${n&&s?".":""}<a + >`}function Oi(e){const{identifier:t,parent:n,slotType:r,renderParent:s,args:i}=e,{identifier:o}=n||{},a="method"===r,c=a?gn`(${jn(i,ji)})`:null,l=a?`(${i.join(", ")})`:"";return gn`${n&&s?".":""}<a data-xref-type="${r}" data-link-for="${o}" data-xref-for="${o}" data-lt="${`[[${t}]]${l}`}" ><code>[[${t}]]${c}</code></a - >`}function Ei(e,t,n){if(t<n.length-1)return on`<var>${e}</var>`;const r=e.split(/(^\.{3})(.+)/),s=r.length>1,i=s?r[2]:r[0];return on`${s?"...":null}<var>${i}</var>`}function Ri(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:s}=t||{};return on`${r?".":""}<a + >`}function ji(e,t,n){if(t<n.length-1)return gn`<var>${e}</var>`;const r=e.split(/(^\.{3})(.+)/),s=r.length>1,i=s?r[2]:r[0];return gn`${s?"...":null}<var>${i}</var>`}function zi(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:s}=t||{};return gn`${r?".":""}<a data-link-type="idl" data-xref-type="attribute|dict-member|const" data-link-for="${s}" data-xref-for="${s}" ><code>${n}</code></a - >`}function Ti(e){const{args:t,identifier:n,type:r,parent:s,renderParent:i}=e,{identifier:o}=s||{},a=En(t,Ei),c=`${n}(${t.join(", ")})`;return on`${s&&i?".":""}<a + >`}function Mi(e){const{args:t,identifier:n,type:r,parent:s,renderParent:i}=e,{identifier:o}=s||{},a=jn(t,ji),c=`${n}(${t.join(", ")})`;return gn`${s&&i?".":""}<a data-link-type="idl" data-xref-type="${r}" data-link-for="${o}" data-xref-for="${o}" data-lt="${c}" ><code>${n}</code></a - ><code>(${a})</code>`}function Ai(e){const{identifier:t,enumValue:n,parent:r}=e,s=r?r.identifier:t;return on`"<a + ><code>(${a})</code>`}function Ui(e){const{identifier:t,enumValue:n,parent:r}=e,s=r?r.identifier:t;return gn`"<a data-link-type="idl" data-xref-type="enum-value" data-link-for="${s}" data-xref-for="${s}" data-lt="${n?null:"the-empty-string"}" ><code>${n}</code></a - >"`}function Li(e){const{identifier:t}=e;return on`"<a + >"`}function Wi(e){const{identifier:t}=e;return gn`"<a data-link-type="idl" data-cite="WebIDL" data-xref-type="exception" ><code>${t}</code></a - >"`}function Pi(e){const{identifier:t,nullable:n}=e;return on`<a + >"`}function qi(e){const{identifier:t,nullable:n}=e;return gn`<a data-link-type="idl" data-cite="WebIDL" data-xref-type="interface" data-lt="${t}" ><code>${t+(n?"?":"")}</code></a - >`}function Ii(e){let t;try{t=function(e){const t=_i.test(e),n=t?xi:$i,[r,s]=e.split(n);if(t&&r&&!s)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const i=r.split(/[./]/).concat(s).filter(e=>e&&e.trim()).map(e=>e.trim()),o=!e.includes("/"),a=[];for(;i.length;){const t=i.pop();if(bi.test(t)){const[,e,n]=t.match(bi),r=n.split(/,\s*/).filter(e=>e);a.push({type:"method",identifier:e,args:r,renderParent:o})}else if(ki.test(t)){const[,e,n]=t.match(ki);a.push({type:"enum",identifier:e,enumValue:n,renderParent:o})}else if(gi.test(t)){const[,e]=t.match(gi);o?a.push({type:"exception",identifier:e}):a.push({type:"enum",enumValue:e,renderParent:o})}else if(yi.test(t)){const[,e,n]=t.match(yi),r=n?"method":"attribute",s=n?.slice(1,-1).split(/,\s*/).filter(e=>e);a.push({type:"internal-slot",slotType:r,identifier:e,args:s,renderParent:o})}else if(wi.test(t)&&i.length){const[,e]=t.match(wi);a.push({type:"attribute",identifier:e,renderParent:o})}else if(mi.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:o,nullable:e})}else{if(!vi.test(t)||0!==i.length)throw new SyntaxError(`IDL micro-syntax parsing error in \`{{ ${e} }}\``);{const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"base",identifier:n,renderParent:o,nullable:e})}}}return a.forEach((e,t,n)=>{e.parent=n[t+1]||null}),a.reverse()}(e)}catch(t){const n=on`<span>{{ ${e} }}</span>`,r="Error: Invalid inline IDL string.";return Fn(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=on(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=Si(e);t&&r.push(t);break}case"attribute":r.push(Ri(e));break;case"internal-slot":r.push(Ci(e));break;case"method":r.push(Ti(e));break;case"enum":r.push(Ai(e));break;case"exception":r.push(Li(e));break;case"idl-primitive":r.push(Pi(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const Di=new Set(["alias","reference"]),Ni=async function(){const e=await rn.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[...Di]){const r=e.transaction(n,"readwrite").store,s=IDBKeyRange.lowerBound(t);let i=await r.openCursor(s);for(;i?.value;){const e=i.value;(void 0===e.expires||e.expires<t)&&await r.delete(e.id),i=await i.continue()}}return e}();const Oi={get ready(){return Ni},async find(e){return await this.isAlias(e)&&(e=await this.resolveAlias(e)),await this.get("reference",e)},async has(e,t){if(!Di.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:r},async get(e,t){if(!Di.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),s=await n.openCursor(r);return s?s.value:s},async addAll(e,t){if(!e)return;const n={alias:[],reference:[]};for(const r of Object.keys(e)){const s={id:r,...e[r],expires:t};s.aliasOf?n.alias.push(s):n.reference.push(s)}const r=[...Di].flatMap(e=>n[e].map(t=>this.add(e,t)));await Promise.all(r)},async add(e,t){if(!Di.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 s=await this.get(e,t.id);if(s?.expires<Date.now()){const{store:s}=n.transaction(e,"readwrite");await s.delete(t.id),r=!1}}const{store:s}=n.transaction(e,"readwrite");return r?await s.put(t):await s.add(t)},async close(){(await this.ready).close()},async clear(){const e=await this.ready,t=[...Di],n=e.transaction(t,"readwrite"),r=t.map(e=>n.objectStore(e).clear());await Promise.all(r)}},ji={},zi=new URL("https://api.specref.org/bibrefs?refs="),Mi=fn({hint:"dns-prefetch",href:zi.origin});let Ui;document.head.appendChild(Mi);const Wi=new Promise(e=>{Ui=e});async function qi(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(zi.href+n.join(","))}catch(e){return console.error(e),null}if(!t.forceUpdate&&!r.ok||200!==r.status)return null;const s=await r.json(),i=Date.now()+36e5;try{const e=r.headers.has("Expires")?Math.min(Date.parse(r.headers.get("Expires")),i):i;await Oi.addAll(s,e)}catch(e){console.error(e)}return s}async function Fi(e){const t=await Wi;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await Fi(n.aliasOf):n}var Bi=Object.freeze({__proto__:null,biblio:ji,name:"core/biblio",updateFromNetwork:qi,resolveRef:Fi,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=ji;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 Oi.ready;const n=e.map(async e=>({id:e,data:await Oi.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):[],s={hasData:[],noData:[]};r.forEach(e=>{(e.data?s.hasData:s.noData).push(e)}),s.hasData.forEach(e=>{ji[e.id]=e.data});const i=s.noData.map(e=>e.id);if(i.length){const e=await qi(i,{forceUpdate:!0});Object.assign(ji,e)}Object.assign(ji,this.conf.localBiblio),(()=>{Ui(this.conf.biblio)})()}}});const Hi="core/render-biblio",Gi=$n({en:{info_references:"Informative references",norm_references:"Normative references",references:"References"},ko:{references:"참조"},nl:{info_references:"Informatieve referenties",norm_references:"Normatieve referenties",references:"Referenties"},es:{info_references:"Referencias informativas",norm_references:"Referencias normativas",references:"Referencias"},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:"参考文献"}}),Vi=new Map([["CR","W3C Candidate Recommendation"],["ED","W3C Editor's Draft"],["FPWD","W3C First Public Working Draft"],["LCWD","W3C Last Call Working Draft"],["NOTE","W3C Note"],["PER","W3C Proposed Edited Recommendation"],["PR","W3C Proposed Recommendation"],["REC","W3C Recommendation"],["WD","W3C Working Draft"],["WG-NOTE","W3C Working Group Note"]]),Zi=(Yi=".",e=>{const t=e.trim();return!t||t.endsWith(Yi)?t:t+Yi});var Yi;function Ji(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(Ki)),s=function(e){const t=new Map;for(const n of e)t.has(n.refcontent.id)||t.set(n.refcontent.id,n);return[...t.values()]}(n),i=s.concat(r).sort((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase())),o=on`<section> + >`}function Fi(e){let t;try{t=function(e){const t=Di.test(e),n=t?Ii:Pi,[r,s]=e.split(n);if(t&&r&&!s)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const i=r.split(/[./]/).concat(s).filter(e=>e&&e.trim()).map(e=>e.trim()),o=!e.includes("/"),a=[];for(;i.length;){const t=i.pop();if(Ei.test(t)){const[,e,n]=t.match(Ei),r=n.split(/,\s*/).filter(e=>e);a.push({type:"method",identifier:e,args:r,renderParent:o})}else if(Li.test(t)){const[,e,n]=t.match(Li);a.push({type:"enum",identifier:e,enumValue:n,renderParent:o})}else if(Ci.test(t)){const[,e]=t.match(Ci);o?a.push({type:"exception",identifier:e}):a.push({type:"enum",enumValue:e,renderParent:o})}else if(Ri.test(t)){const[,e,n]=t.match(Ri),r=n?"method":"attribute",s=n?.slice(1,-1).split(/,\s*/).filter(e=>e);a.push({type:"internal-slot",slotType:r,identifier:e,args:s,renderParent:o})}else if(Ti.test(t)&&i.length){const[,e]=t.match(Ti);a.push({type:"attribute",identifier:e,renderParent:o})}else if(Si.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:o,nullable:e})}else{if(!Ai.test(t)||0!==i.length)throw new SyntaxError(`IDL micro-syntax parsing error in \`{{ ${e} }}\``);{const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"base",identifier:n,renderParent:o,nullable:e})}}}return a.forEach((e,t,n)=>{e.parent=n[t+1]||null}),a.reverse()}(e)}catch(t){const n=gn`<span>{{ ${e} }}</span>`,r="Error: Invalid inline IDL string.";return Xn(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=gn(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=Ni(e);t&&r.push(t);break}case"attribute":r.push(zi(e));break;case"internal-slot":r.push(Oi(e));break;case"method":r.push(Mi(e));break;case"enum":r.push(Ui(e));break;case"exception":r.push(Wi(e));break;case"idl-primitive":r.push(qi(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const Bi=new Set(["alias","reference"]),Hi=async function(){const e=await hn.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[...Bi]){const r=e.transaction(n,"readwrite").store,s=IDBKeyRange.lowerBound(t);let i=await r.openCursor(s);for(;i?.value;){const e=i.value;(void 0===e.expires||e.expires<t)&&await r.delete(e.id),i=await i.continue()}}return e}();const Gi={get ready(){return Hi},async find(e){return await this.isAlias(e)&&(e=await this.resolveAlias(e)),await this.get("reference",e)},async has(e,t){if(!Bi.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:r},async get(e,t){if(!Bi.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),s=await n.openCursor(r);return s?s.value:s},async addAll(e,t){if(!e)return;const n={alias:[],reference:[]};for(const r of Object.keys(e)){const s={id:r,...e[r],expires:t};s.aliasOf?n.alias.push(s):n.reference.push(s)}const r=[...Bi].flatMap(e=>n[e].map(t=>this.add(e,t)));await Promise.all(r)},async add(e,t){if(!Bi.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 s=await this.get(e,t.id);if(s?.expires<Date.now()){const{store:s}=n.transaction(e,"readwrite");await s.delete(t.id),r=!1}}const{store:s}=n.transaction(e,"readwrite");return r?await s.put(t):await s.add(t)},async close(){(await this.ready).close()},async clear(){const e=await this.ready,t=[...Bi],n=e.transaction(t,"readwrite"),r=t.map(e=>n.objectStore(e).clear());await Promise.all(r)}},Vi={},Zi=new URL("https://api.specref.org/bibrefs?refs="),Yi=xn({hint:"dns-prefetch",href:Zi.origin});let Ji;document.head.appendChild(Yi);const Ki=new Promise(e=>{Ji=e});async function Qi(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(Zi.href+n.join(","))}catch(e){return console.error(e),null}if(!t.forceUpdate&&!r.ok||200!==r.status)return null;const s=await r.json(),i=Date.now()+36e5;try{const e=r.headers.has("Expires")?Math.min(Date.parse(r.headers.get("Expires")),i):i;await Gi.addAll(s,e)}catch(e){console.error(e)}return s}async function Xi(e){const t=await Ki;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await Xi(n.aliasOf):n}var eo=Object.freeze({__proto__:null,biblio:Vi,name:"core/biblio",updateFromNetwork:Qi,resolveRef:Xi,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=Vi;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 Gi.ready;const n=e.map(async e=>({id:e,data:await Gi.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):[],s={hasData:[],noData:[]};r.forEach(e=>{(e.data?s.hasData:s.noData).push(e)}),s.hasData.forEach(e=>{Vi[e.id]=e.data});const i=s.noData.map(e=>e.id);if(i.length){const e=await Qi(i,{forceUpdate:!0});Object.assign(Vi,e)}Object.assign(Vi,this.conf.localBiblio),(()=>{Ji(this.conf.biblio)})()}}});const to="core/render-biblio",no=Pn({en:{info_references:"Informative references",norm_references:"Normative references",references:"References"},ko:{references:"참조"},nl:{info_references:"Informatieve referenties",norm_references:"Normatieve referenties",references:"Referenties"},es:{info_references:"Referencias informativas",norm_references:"Referencias normativas",references:"Referencias"},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:"参考文献"}}),ro=new Map([["CR","W3C Candidate Recommendation"],["ED","W3C Editor's Draft"],["FPWD","W3C First Public Working Draft"],["LCWD","W3C Last Call Working Draft"],["NOTE","W3C Note"],["PER","W3C Proposed Edited Recommendation"],["PR","W3C Proposed Recommendation"],["REC","W3C Recommendation"],["WD","W3C Working Draft"],["WG-NOTE","W3C Working Group Note"]]),so=(io=".",e=>{const t=e.trim();return!t||t.endsWith(io)?t:t+io});var io;function oo(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(ao)),s=function(e){const t=new Map;for(const n of e)t.has(n.refcontent.id)||t.set(n.refcontent.id,n);return[...t.values()]}(n),i=s.concat(r).sort((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase())),o=gn`<section> <h3>${t}</h3> - <dl class="bibliography">${i.map(Xi)}</dl> - </section>`;An(o,"",t);return function(e,t){e.map(({ref:e,refcontent:n})=>{const r="#bib-"+e.toLowerCase(),s=t.get(n.id).map(e=>`a.bibref[href="#bib-${e.toLowerCase()}"]`).join(",");return{refUrl:r,elems:document.querySelectorAll(s),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"})})}(s,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)),function(e){e.forEach(({ref:e})=>{const t=[...document.querySelectorAll(`a.bibref[href="#bib-${e.toLowerCase()}"]`)].filter(({textContent:t})=>t.toLowerCase()===e.toLowerCase());Fn(`Bad reference: [\`${e}\`] (appears ${t.length} times)`,Hi),console.warn("Bad references: ",t)})}(r),o}function Ki(e){let t=ji[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;Fn(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,Hi)}else n=t.aliasOf,t=ji[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function Qi(e,t){const n=e.replace(/^(!|\?)/,""),r="#bib-"+n.toLowerCase(),s=on`<cite + <dl class="bibliography">${i.map(lo)}</dl> + </section>`;Un(o,"",t);return function(e,t){e.map(({ref:e,refcontent:n})=>{const r="#bib-"+e.toLowerCase(),s=t.get(n.id).map(e=>`a.bibref[href="#bib-${e.toLowerCase()}"]`).join(",");return{refUrl:r,elems:document.querySelectorAll(s),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"})})}(s,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)),function(e){e.forEach(({ref:e})=>{const t=[...document.querySelectorAll(`a.bibref[href="#bib-${e.toLowerCase()}"]`)].filter(({textContent:t})=>t.toLowerCase()===e.toLowerCase());Xn(`Bad reference: [\`${e}\`] (appears ${t.length} times)`,to),console.warn("Bad references: ",t)})}(r),o}function ao(e){let t=Vi[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;Xn(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,to)}else n=t.aliasOf,t=Vi[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function co(e,t){const n=e.replace(/^(!|\?)/,""),r="#bib-"+n.toLowerCase(),s=gn`<cite ><a class="bibref" href="${r}" data-link-type="biblio">${t||n}</a></cite - >`;return t?s:on`[${s}]`}function Xi({ref:e,refcontent:t}){const n="bib-"+e.toLowerCase();return t?on` + >`;return t?s:gn`[${s}]`}function lo({ref:e,refcontent:t}){const n="bib-"+e.toLowerCase();return t?gn` <dt id="${n}">[${e}]</dt> - <dd>${{html:eo(t)}}</dd> - `:on` + <dd>${{html:uo(t)}}</dd> + `:gn` <dt id="${n}">[${e}]</dt> <dd><em class="respec-offending-element">Reference not found.</em></dd> - `}function eo(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+=". "),e.publisher&&(t=`${t} ${Zi(e.publisher)} `),e.date&&(t+=e.date+". "),e.status&&(t+=(Vi.get(e.status)||e.status)+". "),e.href&&(t+=`URL: <a href="${e.href}">${e.href}</a>`),t}var to=Object.freeze({__proto__:null,name:Hi,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")||on`<section id="references"></section>`;if(document.querySelector("section#references > h2")||r.prepend(on`<h2>${Gi.references}</h2>`),r.classList.add("appendix"),n.length){const e=Ji(n,Gi.norm_references);r.appendChild(e)}if(t.length){const e=Ji(t,Gi.info_references);r.appendChild(e)}document.body.appendChild(r)},renderInlineCitation:Qi});const no="core/inlines",ro={},so=e=>new RegExp(e.map(e=>e.source).join("|")),io=$n({en:{rfc2119Keywords:()=>so([/\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:()=>so([/\bMUSS\b/,/\bERFORDERLICH\b/,/\b(?:NICHT\s+)?NÖTIG\b/,/\bDARF(?:\s+NICHT)?\b/,/\bVERBOTEN\b/,/\bSOLL(?:\s+NICHT)?\b/,/\b(?:NICHT\s+)?EMPFOHLEN\b/,/\bKANN\b/,/\bOPTIONAL\b/])}}),oo=/(?:`[^`]+`)(?!`)/,ao=/(?:{{[^}]+\?*}})/,co=/\B\|\w[\w\s]*(?:\s*:[\w\s&;<>]+\??)?\|\B/,lo=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,uo=/(?:\[\[\[(?:!|\\|\?)?#?[\w-.]+\]\]\])/,po=/(?:\[=[^=]+=\])/,fo=/(?:\[\^[^^]+\^\])/;function ho(e){const t=e.slice(2,-2).trim(),[n,r,s]=t.split("/",3).map(e=>e&&e.trim()).filter(e=>!!e),[i,o,a]=t.startsWith("/")?["element-attr",null,n]:s?["attr-value",`${n}/${r}`,s]:r?["element-attr",n,r]:["element",null,n];return on`<code + `}function uo(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+=". "),e.publisher&&(t=`${t} ${so(e.publisher)} `),e.date&&(t+=e.date+". "),e.status&&(t+=(ro.get(e.status)||e.status)+". "),e.href&&(t+=`URL: <a href="${e.href}">${e.href}</a>`),t}var po=Object.freeze({__proto__:null,name:to,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")||gn`<section id="references"></section>`;if(document.querySelector("section#references > h2")||r.prepend(gn`<h2>${no.references}</h2>`),r.classList.add("appendix"),n.length){const e=oo(n,no.norm_references);r.appendChild(e)}if(t.length){const e=oo(t,no.info_references);r.appendChild(e)}document.body.appendChild(r)},renderInlineCitation:co});const fo="core/inlines",ho={},mo=e=>new RegExp(e.map(e=>e.source).join("|")),go=Pn({en:{rfc2119Keywords:()=>mo([/\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:()=>mo([/\bMUSS\b/,/\bERFORDERLICH\b/,/\b(?:NICHT\s+)?NÖTIG\b/,/\bDARF(?:\s+NICHT)?\b/,/\bVERBOTEN\b/,/\bSOLL(?:\s+NICHT)?\b/,/\b(?:NICHT\s+)?EMPFOHLEN\b/,/\bKANN\b/,/\bOPTIONAL\b/])}}),bo=/(?:`[^`]+`)(?!`)/,yo=/(?:{{[^}]+\?*}})/,wo=/\B\|\w[\w\s]*(?:\s*:[\w\s&;<>]+\??)?\|\B/,vo=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,ko=/(?:\[\[\[(?:!|\\|\?)?#?[\w-.]+\]\]\])/,$o=/(?:\[=[^=]+=\])/,xo=/(?:\[\^[^^]+\^\])/;function _o(e){const t=e.slice(2,-2).trim(),[n,r,s]=t.split("/",3).map(e=>e&&e.trim()).filter(e=>!!e),[i,o,a]=t.startsWith("/")?["element-attr",null,n]:s?["attr-value",`${n}/${r}`,s]:r?["element-attr",n,r]:["element",null,n];return gn`<code ><a data-xref-type="${i}" data-xref-for="${o}" >${a}</a ></code - >`}function mo(e){const t=kn(e),n=on`<em class="rfc2119">${t}</em>`;return ro[t]=!0,n}function go(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?on`<a href="${t}"></a>`:on`<a data-cite="${t}"></a>`}function bo(e,t){const n=kn(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=Ii(n);return!!t.parentElement.closest("dfn")?$o(`\`${r.textContent}\``):r}function yo(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[s,i]=r.split("|").map(kn),{type:o,illegal:a}=In(s,t.parentElement),c=Qi(s,i),l=s.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;Bn("Normative references in informative sections are not allowed. ",no,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==o||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function wo(e,t,n){return"ABBR"===t.parentElement.tagName?e:on`<abbr title="${n.get(e)}">${e}</abbr>`}function vo(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map(e=>e.trim());return on`<var data-type="${r}">${n}</var>`}function ko(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(kn).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const s=n.substring(0,r),i=n.substring(r+1,n.length);return[t(s),t(i)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[s,i]=r.includes("|")?r.split("|",2).map(e=>e.trim()):[null,r],o=xo(i),a=n?kn(n):null;return on`<a + >`}function So(e){const t=Ln(e),n=gn`<em class="rfc2119">${t}</em>`;return ho[t]=!0,n}function Co(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?gn`<a href="${t}"></a>`:gn`<a data-cite="${t}"></a>`}function Eo(e,t){const n=Ln(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=Fi(n);return!!t.parentElement.closest("dfn")?Po(`\`${r.textContent}\``):r}function Ro(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[s,i]=r.split("|").map(Ln),{type:o,illegal:a}=Fn(s,t.parentElement),c=co(s,i),l=s.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;er("Normative references in informative sections are not allowed. ",fo,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==o||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function To(e,t,n){return"ABBR"===t.parentElement.tagName?e:gn`<abbr title="${n.get(e)}">${e}</abbr>`}function Ao(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map(e=>e.trim());return gn`<var data-type="${r}">${n}</var>`}function Lo(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(Ln).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const s=n.substring(0,r),i=n.substring(r+1,n.length);return[t(s),t(i)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[s,i]=r.includes("|")?r.split("|",2).map(e=>e.trim()):[null,r],o=Io(i),a=n?Ln(n):null;return gn`<a data-link-type="dfn" data-link-for="${a}" data-xref-for="${a}" data-lt="${s}" >${o}</a - >`}function $o(e){const t=e.slice(1,-1);return on`<code>${t}</code>`}function xo(e){return oo.test(e)?e.split(/(`[^`]+`)(?!`)/).map(e=>e.startsWith("`")?$o(e):xo(e)):document.createTextNode(e)}var _o=Object.freeze({__proto__:null,name:no,rfc2119Usage:ro,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new jn,e.informativeReferences=new jn,e.respecRFC2119||(e.respecRFC2119=ro);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=kn(e),s=kn(r);t.set(n,s)}const r=t.size?new RegExp(`(?:\\b${[...t.keys()].join("\\b)|(?:\\b")}\\b)`):null,s=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),s=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),i=[];let o;for(;o=s.nextNode();)i.push(o);return i}(document.body,["#respec-ui",".head","pre"],{wsNodes:!1}),i=io.rfc2119Keywords(),o=new RegExp(`(${so([i,ao,co,lo,uo,po,oo,fo,...r?[r]:[]]).source})`);for(const n of s){const r=n.data.split(o);if(1===r.length)continue;const s=document.createDocumentFragment();let a=!0;for(const o of r)if(a=!a,a)switch(!0){case o.startsWith("{{"):s.append(bo(o,n));break;case o.startsWith("[[["):s.append(go(o));break;case o.startsWith("[["):s.append(...yo(o,n,e));break;case o.startsWith("|"):s.append(vo(o));break;case o.startsWith("[="):s.append(ko(o));break;case o.startsWith("`"):s.append($o(o));break;case o.startsWith("[^"):s.append(ho(o));break;case t.has(o):s.append(wo(o,n,t));break;case i.test(o):s.append(mo(o))}else s.append(o);n.replaceWith(s)}}});const So="w3c/conformance",Co=$n({en:{conformance:"Conformance",normativity:"As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.",keywordInterpretation:(e,t)=>on`<p> + >`}function Po(e){const t=e.slice(1,-1);return gn`<code>${t}</code>`}function Io(e){return bo.test(e)?e.split(/(`[^`]+`)(?!`)/).map(e=>e.startsWith("`")?Po(e):Io(e)):document.createTextNode(e)}var Do=Object.freeze({__proto__:null,name:fo,rfc2119Usage:ho,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new Vn,e.informativeReferences=new Vn,e.respecRFC2119||(e.respecRFC2119=ho);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=Ln(e),s=Ln(r);t.set(n,s)}const r=t.size?new RegExp(`(?:\\b${[...t.keys()].join("\\b)|(?:\\b")}\\b)`):null,s=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),s=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),i=[];let o;for(;o=s.nextNode();)i.push(o);return i}(document.body,["#respec-ui",".head","pre"],{wsNodes:!1}),i=go.rfc2119Keywords(),o=new RegExp(`(${mo([i,yo,wo,vo,ko,$o,bo,xo,...r?[r]:[]]).source})`);for(const n of s){const r=n.data.split(o);if(1===r.length)continue;const s=document.createDocumentFragment();let a=!0;for(const o of r)if(a=!a,a)switch(!0){case o.startsWith("{{"):s.append(Eo(o,n));break;case o.startsWith("[[["):s.append(Co(o));break;case o.startsWith("[["):s.append(...Ro(o,n,e));break;case o.startsWith("|"):s.append(Ao(o));break;case o.startsWith("[="):s.append(Lo(o));break;case o.startsWith("`"):s.append(Po(o));break;case o.startsWith("[^"):s.append(_o(o));break;case t.has(o):s.append(To(o,n,t));break;case i.test(o):s.append(So(o))}else s.append(o);n.replaceWith(s)}}});const No="w3c/conformance",Oo=Pn({en:{conformance:"Conformance",normativity:"As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.",keywordInterpretation:(e,t)=>gn`<p> The key word${t?"s":""} ${e} in this document ${t?"are":"is"} to be interpreted as described in <a href="https://datatracker.ietf.org/doc/html/bcp14">BCP 14</a> - ${Qi("RFC2119")} ${Qi("RFC8174")} + ${co("RFC2119")} ${co("RFC8174")} when, and only when, they appear in all capitals, as shown here. - </p>`},de:{conformance:"Anforderungen",normativity:"Neben den explizit als nicht-normativ gekennzeichneten Abschnitten sind auch alle Diagramme, Beispiele und Hinweise in diesem Dokument nicht normativ. Alle anderen Angaben sind normativ.",keywordInterpretation:(e,t)=>on`<p> + </p>`},de:{conformance:"Anforderungen",normativity:"Neben den explizit als nicht-normativ gekennzeichneten Abschnitten sind auch alle Diagramme, Beispiele und Hinweise in diesem Dokument nicht normativ. Alle anderen Angaben sind normativ.",keywordInterpretation:(e,t)=>gn`<p> ${t?"Die Schlüsselwörter":"Das Schlüsselwort"} ${e} in diesem Dokument ${t?"sind":"ist"} gemäß <a href="https://datatracker.ietf.org/doc/html/bcp14">BCP 14</a> - ${Qi("RFC2119")} ${Qi("RFC8174")} + ${co("RFC2119")} ${co("RFC8174")} und unter Berücksichtigung von <a href="https://github.com/adfinis-sygroup/2119/blob/master/2119de.rst" >2119de</a > zu interpretieren, wenn und nur wenn ${t?"sie":"es"} wie hier gezeigt durchgehend groß geschrieben wurde${t?"n":""}. - </p>`}});var Eo=Object.freeze({__proto__:null,name:So,run:function(e){const t=document.querySelector("section#conformance");if(t&&!t.classList.contains("override")&&function(e,t){const n=[...Object.keys(ro)];n.length&&(t.normativeReferences.add("RFC2119"),t.normativeReferences.add("RFC8174"));const r=Rn(n.sort(),e=>on`<em class="rfc2119">${e}</em>`),s=n.length>1,i=on` - <h2>${Co.conformance}</h2> - <p>${Co.normativity}</p> - ${n.length?Co.keywordInterpretation(r,s):null} - `;e.prepend(...i.childNodes)}(t,e),!t&&Object.keys(ro).length){Bn("Document uses RFC2119 keywords but lacks a conformance section.",So,{hint:'Please add a `<section id="conformance">`.'})}}});function Ro(e,t,n,r){try{switch(t){case"attribute":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(s){Fn(`Invalid ${t} name "${e}": ${s.message}`,r,{hint:`Check that the ${t} name is allowed per the XML's Name production for ${t}.`,elements:[n]})}return!1}function To(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return Fn(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const Ao=new Wn;function Lo(e,t){for(const n of t)Ao.has(n)||Ao.set(n,new Set),Ao.get(n).add(e)}const Po="core/dfn",Io=new Map([["abstract-op",{requiresFor:!1}],["attribute",{requiresFor:!1,validator:Ro}],["attr-value",{requiresFor:!0,associateWith:"an HTML attribute",validator:To}],["element",{requiresFor:!1,validator:Ro}],["element-state",{requiresFor:!0,associateWith:"an HTML attribute",validator:To}],["event",{requiresFor:!1,validator:To}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new ln(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(s){return Fn(`Invalid ${t} "${e}": ${s.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:To}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?To(e.slice(1,-1),t,n,r):(Fn(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),Do=[...Io.keys()];function No(e,t){let n="";switch(!0){case Do.some(t=>e.classList.contains(t)):n=[...e.classList].find(e=>Io.has(e)),function(e,t,n){const r=Io.get(t);if(r.requiresFor&&!n.dataset.dfnFor){const e=Yn`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:s}=r,i=Yn`Use a ${"[data-dfn-for]"} attribute to associate this with ${s}.`;Fn(e,Po,{hint:i,elements:[n]})}r.validator&&r.validator(e,t,n,Po)}(t,n,e);break;case yi.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=Yn`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;Fn(`Internal slot "${e}" must be associated with a WebIDL interface.`,Po,{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 s=["attribute","method"],{dfnType:i}=t.dataset;if(!s.includes(i)||r!==i){const n=Yn`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,i=`The only allowed types are: ${Gn(s,{quotes:!0})}. The slot "${e}" seems to be a "${Hn(r)}"?`;return Fn(n,Po,{hint:i,elements:[t]}),"dfn"}return i}(t,e)}if(!n&&!e.matches("[data-dfn-type]")){const t=e.closest("[data-dfn-type]");n=t?.dataset.dfnType}n&&!e.dataset.dfnType&&(e.dataset.dfnType=n)}function Oo(e){switch(!0){case e.matches(".export.no-export"):Fn(Yn`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,Po,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){Fn(Yn`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,Po,{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=""}}function jo(){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=""}var zo=Object.freeze({__proto__:null,name:Po,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Ln(e);if(Lo(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;No(e,n),Oo(e),1===t.length&&n===kn(e.textContent)||(e.dataset.lt=t.join("|"))}Xn("plugins-done",jo)}});var Mo=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=kn(t.textContent).toLowerCase();e.add(n),t.dataset.lt&&e.add(t.dataset.lt)});const t=new Set;return document.querySelectorAll("dfn:not([data-lt-noDefault])").forEach(e=>{const n=kn(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=kn(n).toLowerCase(),s=cn.isSingular(r)?cn.plural(r):cn.singular(r);return e.has(s)&&!t.has(s)?s:""}}();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("|"),Lo(e,n)}})}});var Uo=String.raw`span.example-title{text-transform:none} + </p>`}});var jo=Object.freeze({__proto__:null,name:No,run:function(e){const t=document.querySelector("section#conformance");if(t&&!t.classList.contains("override")&&function(e,t){const n=[...Object.keys(ho)];n.length&&(t.normativeReferences.add("RFC2119"),t.normativeReferences.add("RFC8174"));const r=zn(n.sort(),e=>gn`<em class="rfc2119">${e}</em>`),s=n.length>1,i=gn` + <h2>${Oo.conformance}</h2> + <p>${Oo.normativity}</p> + ${n.length?Oo.keywordInterpretation(r,s):null} + `;e.prepend(...i.childNodes)}(t,e),!t&&Object.keys(ho).length){er("Document uses RFC2119 keywords but lacks a conformance section.",No,{hint:'Please add a `<section id="conformance">`.'})}}});function zo(e,t,n,r){try{switch(t){case"attribute":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(s){Xn(`Invalid ${t} name "${e}": ${s.message}`,r,{hint:`Check that the ${t} name is allowed per the XML's Name production for ${t}.`,elements:[n]})}return!1}function Mo(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return Xn(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const Uo=new Kn;function Wo(e,t){for(const n of t)Uo.has(n)||Uo.set(n,new Set),Uo.get(n).add(e)}const qo="core/dfn",Fo=new Map([["abstract-op",{requiresFor:!1}],["attribute",{requiresFor:!1,validator:zo}],["attr-value",{requiresFor:!0,associateWith:"an HTML attribute",validator:Mo}],["element",{requiresFor:!1,validator:zo}],["element-state",{requiresFor:!0,associateWith:"an HTML attribute",validator:Mo}],["event",{requiresFor:!1,validator:Mo}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new wn(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(s){return Xn(`Invalid ${t} "${e}": ${s.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:Mo}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?Mo(e.slice(1,-1),t,n,r):(Xn(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),Bo=[...Fo.keys()];function Ho(e,t){let n="";switch(!0){case Bo.some(t=>e.classList.contains(t)):n=[...e.classList].find(e=>Fo.has(e)),function(e,t,n){const r=Fo.get(t);if(r.requiresFor&&!n.dataset.dfnFor){const e=ir`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:s}=r,i=ir`Use a ${"[data-dfn-for]"} attribute to associate this with ${s}.`;Xn(e,qo,{hint:i,elements:[n]})}r.validator&&r.validator(e,t,n,qo)}(t,n,e);break;case Ri.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=ir`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;Xn(`Internal slot "${e}" must be associated with a WebIDL interface.`,qo,{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 s=["attribute","method"],{dfnType:i}=t.dataset;if(!s.includes(i)||r!==i){const n=ir`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,i=`The only allowed types are: ${nr(s,{quotes:!0})}. The slot "${e}" seems to be a "${tr(r)}"?`;return Xn(n,qo,{hint:i,elements:[t]}),"dfn"}return i}(t,e)}if(!n&&!e.matches("[data-dfn-type]")){const t=e.closest("[data-dfn-type]");n=t?.dataset.dfnType}n&&!e.dataset.dfnType&&(e.dataset.dfnType=n)}function Go(e){switch(!0){case e.matches(".export.no-export"):Xn(ir`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,qo,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){Xn(ir`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,qo,{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=""}}function Vo(){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=""}var Zo=Object.freeze({__proto__:null,name:qo,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Wn(e);if(Wo(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;Ho(e,n),Go(e),1===t.length&&n===Ln(e.textContent)||(e.dataset.lt=t.join("|"))}lr("plugins-done",Vo)}});var Yo=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=Ln(t.textContent).toLowerCase();e.add(n),t.dataset.lt&&e.add(t.dataset.lt)});const t=new Set;return document.querySelectorAll("dfn:not([data-lt-noDefault])").forEach(e=>{const n=Ln(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=Ln(n).toLowerCase(),s=yn.isSingular(r)?yn.plural(r):yn.singular(r);return e.has(s)&&!t.has(s)?s:""}}();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("|"),Wo(e,n)}})}});var Jo=String.raw`span.example-title{text-transform:none} :is(aside,div).example,div.illegal-example{padding:.5em;margin:1em 0;position:relative;clear:both} div.illegal-example{color:red} div.illegal-example p{color:#000} :is(aside,div).example{border-left-width:.5em;border-left-style:solid;border-color:#e0cb52;background:#fcfaee} aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff} -.example pre{background-color:rgba(0,0,0,.03)}`;const Wo=$n({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"}});function qo(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?" "+t:"",s=n.title?on`<span class="example-title">: ${n.title}</span>`:"";return on`<div class="marker"> - <a class="self-link">${Wo.example}<bdi>${r}</bdi></a +.example pre{background-color:rgba(0,0,0,.03)}`;const Ko=Pn({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"}});function Qo(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?" "+t:"",s=n.title?gn`<span class="example-title">: ${n.title}</span>`:"";return gn`<div class="marker"> + <a class="self-link">${Ko.example}<bdi>${r}</bdi></a >${s} - </div>`}var Fo=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(on`<style> - ${Uo} - </style>`,document.querySelector("link"));let t=0;e.forEach(e=>{const n=e.classList.contains("illegal-example"),r={number:t,illegal:n},{title:s}=e;if("aside"===e.localName){++t;const n=qo(e,t,r);e.prepend(n);const i=An(e,"example",s||String(t));n.querySelector("a.self-link").href="#"+i,Qn("example",r)}else{const n=!!e.closest("aside");n||++t,r.content=e.innerHTML,e.classList.remove("example","illegal-example");const i=e.id?e.id:null;i&&e.removeAttribute("id");const o=qo(e,n?0:t,r),a=on`<div class="example" id="${i}"> + </div>`}var Xo=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(gn`<style> + ${Jo} + </style>`,document.querySelector("link"));let t=0;e.forEach(e=>{const n=e.classList.contains("illegal-example"),r={number:t,illegal:n},{title:s}=e;if("aside"===e.localName){++t;const n=Qo(e,t,r);e.prepend(n);const i=Un(e,"example",s||String(t));n.querySelector("a.self-link").href="#"+i,cr("example",r)}else{const n=!!e.closest("aside");n||++t,r.content=e.innerHTML,e.classList.remove("example","illegal-example");const i=e.id?e.id:null;i&&e.removeAttribute("id");const o=Qo(e,n?0:t,r),a=gn`<div class="example" id="${i}"> ${o} ${e.cloneNode(!0)} - </div>`;An(a,"example",s||String(t));a.querySelector("a.self-link").href="#"+a.id,e.replaceWith(a),n||Qn("example",r)}})}});var Bo=String.raw`.issue-label{text-transform:initial} + </div>`;Un(a,"example",s||String(t));a.querySelector("a.self-link").href="#"+a.id,e.replaceWith(a),n||cr("example",r)}})}});var ea=String.raw`.issue-label{text-transform:initial} .warning>p:first-child{margin-top:0} .warning{padding:.5em;border-left-width:.5em;border-left-style:solid} span.warning{padding:.1em .5em .15em} @@ -806,21 +806,21 @@ span.warning{padding:.1em .5em .15em} .warning-title:before{content:"⚠";font-size:1.3em;float:left;padding-right:.3em;margin-top:-.3em} li.task-list-item{list-style:none} input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle} -.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 Ho="core/issues-notes",Go=$n({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:"警告"}});function Vo(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}}(),s=document.createElement("ul");e.forEach(e=>{const{type:i,displayType:o,isFeatureAtRisk:a}=function(e){const t=e.classList.contains("issue"),n=e.classList.contains("warning"),r=e.classList.contains("ednote"),s=e.classList.contains("atrisk"),i=t?"issue":n?"warning":r?"ednote":"note",o=t?s?Go.feature_at_risk:Go.issue:n?Go.warning:r?Go.editors_note:Go.note;return{type:i,displayType:o,isFeatureAtRisk:s}}(e),c="issue"===i,l="span"===e.localName,{number:u}=e.dataset,d={type:i,inline:l,title:e.title,number:r(e)};if(!l){const r=on`<div class="${a?i+" atrisk":i}" role="${"note"===i?"note":null}"></div>`,l=document.createElement("span"),p=on`<div role="heading" class="${i+"-title marker"}">${l}</div>`;An(p,"h",i);let f,h=o;if(e.id?(r.id=e.id,e.removeAttribute("id")):An(r,"issue-container",d.number?"number-"+d.number:""),c){if(void 0!==d.number&&(h+=" "+d.number),e.dataset.hasOwnProperty("number")){const e=function(e,t,{isFeatureAtRisk:n=!1}={}){if(!n&&t.issueBase)return on`<a href="${t.issueBase+e}" />`;if(n&&t.atRiskBase)return on`<a href="${t.atRiskBase+e}" />`}(u,n,{isFeatureAtRisk:a});if(e&&(l.before(e),e.append(l)),l.classList.add("issue-number"),f=t.get(u),!f){Bn(`Failed to fetch issue number ${u}.`,Ho)}f&&!d.title&&(d.title=f.title)}void 0!==d.number&&s.append(function(e,t,n){const r=`${e} ${t.number}`,s=t.title?on`<span style="text-transform: none">: ${t.title}</span>`:"";return on`<li><a href="${"#"+n}">${r}</a>${s}</li>`}(Go.issue,d,r.id))}if(l.textContent=h,d.title){e.removeAttribute("title");const{repoURL:t=""}=n.github||{},s=f?f.labels:[];f&&"CLOSED"===f.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,s=new URL("./issues/",t);s.searchParams.set("q",`is:issue is:open label:"${e.name}"`);const i=(a=n,parseInt(a,16)>8388607.5?"#000":"#fff"),o="GitHub label: "+r;var a;return on` <a +.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 ta="core/issues-notes",na=Pn({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:"警告"}});function ra(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}}(),s=document.createElement("ul");e.forEach(e=>{const{type:i,displayType:o,isFeatureAtRisk:a}=function(e){const t=e.classList.contains("issue"),n=e.classList.contains("warning"),r=e.classList.contains("ednote"),s=e.classList.contains("atrisk"),i=t?"issue":n?"warning":r?"ednote":"note",o=t?s?na.feature_at_risk:na.issue:n?na.warning:r?na.editors_note:na.note;return{type:i,displayType:o,isFeatureAtRisk:s}}(e),c="issue"===i,l="span"===e.localName,{number:u}=e.dataset,d={type:i,inline:l,title:e.title,number:r(e)};if(!l){const r=gn`<div class="${a?i+" atrisk":i}" role="${"note"===i?"note":null}"></div>`,l=document.createElement("span"),p=gn`<div role="heading" class="${i+"-title marker"}">${l}</div>`;Un(p,"h",i);let f,h=o;if(e.id?(r.id=e.id,e.removeAttribute("id")):Un(r,"issue-container",d.number?"number-"+d.number:""),c){if(void 0!==d.number&&(h+=" "+d.number),e.dataset.hasOwnProperty("number")){const e=function(e,t,{isFeatureAtRisk:n=!1}={}){if(!n&&t.issueBase)return gn`<a href="${t.issueBase+e}" />`;if(n&&t.atRiskBase)return gn`<a href="${t.atRiskBase+e}" />`}(u,n,{isFeatureAtRisk:a});if(e&&(l.before(e),e.append(l)),l.classList.add("issue-number"),f=t.get(u),!f){er(`Failed to fetch issue number ${u}.`,ta)}f&&!d.title&&(d.title=f.title)}void 0!==d.number&&s.append(function(e,t,n){const r=`${e} ${t.number}`,s=t.title?gn`<span style="text-transform: none">: ${t.title}</span>`:"";return gn`<li><a href="${"#"+n}">${r}</a>${s}</li>`}(na.issue,d,r.id))}if(l.textContent=h,d.title){e.removeAttribute("title");const{repoURL:t=""}=n.github||{},s=f?f.labels:[];f&&"CLOSED"===f.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,s=new URL("./issues/",t);s.searchParams.set("q",`is:issue is:open label:"${e.name}"`);const i=(a=n,parseInt(a,16)>8388607.5?"#000":"#fff"),o="GitHub label: "+r;var a;return gn` <a class="respec-gh-label" style="${`background-color: #${n}; color: ${i}`}" href="${s.href}" aria-label="${o}" >${r}</a - >`}(e,n));r.length&&r.unshift(document.createTextNode(" "));return on`<span class="issue-label">: ${t}${r}</span>`}(s,d.title,t))}let m=e;e.replaceWith(r),m.classList.remove(i),m.removeAttribute("data-number"),f&&!m.innerHTML.trim()&&(m=document.createRange().createContextualFragment(f.bodyHTML)),r.append(p,m);const g=Nn(p,"section").length+2;p.setAttribute("aria-level",g)}Qn(d.type,d)}),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(on`<p>${Go.no_issues_in_spec}</p>`),(!n||n&&n!==t.firstElementChild)&&t.insertAdjacentHTML("afterbegin",`<h2>${Go.issue_summary}</h2>`)}(s)}var Zo=Object.freeze({__proto__:null,name:Ho,run:async function(e){const t=document.querySelectorAll(".issue, .note, .warning, .ednote");if(!t.length)return;const n=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 Fn(`Error fetching issues from GitHub. (HTTP Status ${r.status}).`,Ho),new Map;const s=await r.json();return new Map(Object.entries(s))}(e.github),{head:r}=document;r.insertBefore(on`<style> - ${Bo} - </style>`,r.querySelector("link")),Vo(t,n,e),document.querySelectorAll(".ednote").forEach(e=>{e.classList.remove("ednote"),e.classList.add("note")})}});const Yo="core/best-practices",Jo={en:{best_practice:"Best Practice "},ja:{best_practice:"最良実施例 "},de:{best_practice:"Musterbeispiel "},zh:{best_practice:"最佳实践 "}},Ko=$n(Jo),Qo=s in Jo?s:"en";var Xo=Object.freeze({__proto__:null,name:Yo,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=An(e,"bp"),s=on`<a class="marker self-link" href="${"#"+r}" - ><bdi lang="${Qo}">${Ko.best_practice}${t+1}</bdi></a - >`;if(n){const t=on`<li>${s}: ${zn(e)}</li>`;n.appendChild(t)}const i=e.closest("div");if(!i)return void e.classList.add("advisement");i.classList.add("advisement");const o=on`${s.cloneNode(!0)}: ${e}`;i.prepend(...o.childNodes)}),e.length)t&&(t.appendChild(on`<h2>Best Practices Summary</h2>`),t.appendChild(n));else if(t){Bn("Using best practices summary (#bp-summary) but no best practices found.",Yo),t.remove()}}});const ea="core/figures",ta=$n({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 na=Object.freeze({__proto__:null,name:ea,run:function(){document.querySelectorAll(":not(picture)>img:not([width]):not([height]):not([srcset])").forEach(e=>{0!==e.naturalHeight&&0!==e.naturalWidth&&(e.height=e.naturalHeight,e.width=e.naturalWidth)});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;An(e,"fig",r),Dn(t,on`<span class="fig-title"></span>`),t.prepend(ta.fig,on`<bdi class="figno">${n+1}</bdi>`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach(e=>{Pn(e,"span").removeAttribute("href")}),on`<li class="tofline"> + >`}(e,n));r.length&&r.unshift(document.createTextNode(" "));return gn`<span class="issue-label">: ${t}${r}</span>`}(s,d.title,t))}let m=e;e.replaceWith(r),m.classList.remove(i),m.removeAttribute("data-number"),f&&!m.innerHTML.trim()&&(m=document.createRange().createContextualFragment(f.bodyHTML)),r.append(p,m);const g=Hn(p,"section").length+2;p.setAttribute("aria-level",g)}cr(d.type,d)}),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(gn`<p>${na.no_issues_in_spec}</p>`),(!n||n&&n!==t.firstElementChild)&&t.insertAdjacentHTML("afterbegin",`<h2>${na.issue_summary}</h2>`)}(s)}var sa=Object.freeze({__proto__:null,name:ta,run:async function(e){const t=document.querySelectorAll(".issue, .note, .warning, .ednote");if(!t.length)return;const n=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 Xn(`Error fetching issues from GitHub. (HTTP Status ${r.status}).`,ta),new Map;const s=await r.json();return new Map(Object.entries(s))}(e.github),{head:r}=document;r.insertBefore(gn`<style> + ${ea} + </style>`,r.querySelector("link")),ra(t,n,e),document.querySelectorAll(".ednote").forEach(e=>{e.classList.remove("ednote"),e.classList.add("note")})}});const ia="core/best-practices",oa={en:{best_practice:"Best Practice "},ja:{best_practice:"最良実施例 "},de:{best_practice:"Musterbeispiel "},zh:{best_practice:"最佳实践 "}},aa=Pn(oa),ca=s in oa?s:"en";var la=Object.freeze({__proto__:null,name:ia,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=Un(e,"bp"),s=gn`<a class="marker self-link" href="${"#"+r}" + ><bdi lang="${ca}">${aa.best_practice}${t+1}</bdi></a + >`;if(n){const t=gn`<li>${s}: ${Zn(e)}</li>`;n.appendChild(t)}const i=e.closest("div");if(!i)return void e.classList.add("advisement");i.classList.add("advisement");const o=gn`${s.cloneNode(!0)}: ${e}`;i.prepend(...o.childNodes)}),e.length)t&&(t.appendChild(gn`<h2>Best Practices Summary</h2>`),t.appendChild(n));else if(t){er("Using best practices summary (#bp-summary) but no best practices found.",ia),t.remove()}}});const ua="core/figures",da=Pn({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 pa=Object.freeze({__proto__:null,name:ua,run:function(){document.querySelectorAll(":not(picture)>img:not([width]):not([height]):not([srcset])").forEach(e=>{0!==e.naturalHeight&&0!==e.naturalWidth&&(e.height=e.naturalHeight,e.width=e.naturalWidth)});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;Un(e,"fig",r),Bn(t,gn`<span class="fig-title"></span>`),t.prepend(da.fig,gn`<bdi class="figno">${n+1}</bdi>`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach(e=>{qn(e,"span").removeAttribute("href")}),gn`<li class="tofline"> <a class="tocxref" href="${"#"+e}">${n.childNodes}</a> - </li>`}(t.id,r));else{Bn("Found a `<figure>` without a `<figcaption>`.",ea,{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(on`<h2>${ta.list_of_figures}</h2>`,on`<ul class="tof"> + </li>`}(t.id,r));else{er("Found a `<figure>` without a `<figcaption>`.",ua,{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(gn`<h2>${da.list_of_figures}</h2>`,gn`<ul class="tof"> ${e} - </ul>`))}});const ra=new Set(["callback interface","callback","dictionary","enum","interface mixin","interface","typedef"]);function sa(e,t,{parent:n=""}={}){switch(e.type){case"constructor":case"operation":return function(e,t,n){if(n.includes("!overload"))return ia(e,t,n);return ia(e,t,n+"()",n)}(e,n,t);default:return ia(e,n,t)}}function ia(e,t,...n){const{type:r}=e;for(const e of n){let n="enum-value"===r&&""===e?"the-empty-string":e,s=aa(n,t,e,r);if(0===s.length&&""!==t){n=`${t}.${n}`;const e=Ao.get(n);e&&1===e.size&&(s=[...e],Lo(s[0],[n]))}else n=e;if(s.length>1){Fn(`WebIDL identifier \`${e}\` ${t?`for \`${t}\``:""} is defined multiple times`,e,{title:"Duplicate definition.",elements:s})}if(s.length)return s[0]}}function oa(e,t,n,r){if(!e.id){const t=n.toLowerCase(),s=t?t+"-":"";let i=r.toLowerCase().replace(/[()]/g,"").replace(/\s/g,"-");""===i&&(i="the-empty-string",e.setAttribute("aria-label","the empty string")),e.id=`dom-${s}${i}`}switch(e.dataset.idl=t.type,e.dataset.title=e.textContent,e.dataset.dfnFor=n,t.type){case"operation":case"attribute":case"field":e.dataset.type=ca(t)}switch(e.querySelector("code")||e.closest("code")||!e.children||Dn(e,e.ownerDocument.createElement("code")),t.type){case"attribute":case"constructor":case"operation":!function(e,t){const{local:n,exportable:r}=t,s=e.dataset.lt?new Set(e.dataset.lt.split("|")):new Set;for(const e of r)s.add(e);n.filter(e=>s.has(e)).forEach(e=>s.delete(e)),e.dataset.lt=[...s].join("|"),e.dataset.localLt=n.join("|"),Lo(e,[...n,...r])}(e,function(e,t,n){const{type:r}=e,s=`${t}.${n}`;switch(r){case"constructor":case"operation":return{local:[s,s+"()",n],exportable:[n+"()",...function(e,t){const n=[];if(0===t.length)return n;const r=[],s=[];for(const{name:e,optional:n,variadic:i}of t)n||i?s.push(e):r.push(e);const i=r.join(", "),o=`${e}(${i})`;n.push(o);const a=s.map((t,n)=>{const i=[...r,...s.slice(0,n+1)].join(", ");return`${e}(${i})`});return n.push(...a),n}(n,e.arguments)]};case"attribute":return{local:[s],exportable:[n]}}}(t,n,r))}return e}function aa(e,t,n,r){const s=Ao.get(e);if(!s||0===s.size)return[];const i=[...s],o=i.filter(e=>{if("dfn"===e.dataset.dfnType)return!1;const n=e.closest("[data-dfn-for]");return n&&n.dataset.dfnFor===t});if(0===o.length&&""===t&&1===i.length)return i[0].textContent===n?i:[];if(ra.has(r)&&i.length){const e=i.find(e=>e.textContent.trim()===n);if(e)return[e]}return o}function ca(e={}){const{idlType:t,generic:n,union:r}=e;return void 0===t?"":"string"==typeof t?t:n||(r?t.map(ca).join("|"):ca(t))}const la=function(){const e=document.createElement("button");return e.innerHTML='<svg height="16" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg>',e.title="Copy IDL to clipboard",e.classList.add("respec-button-copy-paste","removeOnSave"),e}();function ua(e){const t=e.closest("pre.idl").cloneNode(!0);t.querySelector(".idlHeader").remove();const{textContent:n}=t,r=la.cloneNode(!0);r.addEventListener("click",()=>{navigator.clipboard.writeText(n)}),e.append(r)}var da=Object.freeze({__proto__:null,name:"core/webidl-clipboard",addCopyIDLButton:ua});var pa=String.raw`pre.idl{padding:1em;position:relative} + </ul>`))}});const fa=new Set(["callback interface","callback","dictionary","enum","interface mixin","interface","typedef"]);function ha(e,t,{parent:n=""}={}){switch(e.type){case"constructor":case"operation":return function(e,t,n){if(n.includes("!overload"))return ma(e,t,n);return ma(e,t,n+"()",n)}(e,n,t);default:return ma(e,n,t)}}function ma(e,t,...n){const{type:r}=e;for(const e of n){let n="enum-value"===r&&""===e?"the-empty-string":e,s=ba(n,t,e,r);if(0===s.length&&""!==t){n=`${t}.${n}`;const e=Uo.get(n);e&&1===e.size&&(s=[...e],Wo(s[0],[n]))}else n=e;if(s.length>1){Xn(`WebIDL identifier \`${e}\` ${t?`for \`${t}\``:""} is defined multiple times`,e,{title:"Duplicate definition.",elements:s})}if(s.length)return s[0]}}function ga(e,t,n,r){if(!e.id){const t=n.toLowerCase(),s=t?t+"-":"";let i=r.toLowerCase().replace(/[()]/g,"").replace(/\s/g,"-");""===i&&(i="the-empty-string",e.setAttribute("aria-label","the empty string")),e.id=`dom-${s}${i}`}switch(e.dataset.idl=t.type,e.dataset.title=e.textContent,e.dataset.dfnFor=n,t.type){case"operation":case"attribute":case"field":e.dataset.type=ya(t)}switch(e.querySelector("code")||e.closest("code")||!e.children||Bn(e,e.ownerDocument.createElement("code")),t.type){case"attribute":case"constructor":case"operation":!function(e,t){const{local:n,exportable:r}=t,s=e.dataset.lt?new Set(e.dataset.lt.split("|")):new Set;for(const e of r)s.add(e);n.filter(e=>s.has(e)).forEach(e=>s.delete(e)),e.dataset.lt=[...s].join("|"),e.dataset.localLt=n.join("|"),Wo(e,[...n,...r])}(e,function(e,t,n){const{type:r}=e,s=`${t}.${n}`;switch(r){case"constructor":case"operation":return{local:[s,s+"()",n],exportable:[n+"()",...function(e,t){const n=[];if(0===t.length)return n;const r=[],s=[];for(const{name:e,optional:n,variadic:i}of t)n||i?s.push(e):r.push(e);const i=r.join(", "),o=`${e}(${i})`;n.push(o);const a=s.map((t,n)=>{const i=[...r,...s.slice(0,n+1)].join(", ");return`${e}(${i})`});return n.push(...a),n}(n,e.arguments)]};case"attribute":return{local:[s],exportable:[n]}}}(t,n,r))}return e}function ba(e,t,n,r){const s=Uo.get(e);if(!s||0===s.size)return[];const i=[...s],o=i.filter(e=>{if("dfn"===e.dataset.dfnType)return!1;const n=e.closest("[data-dfn-for]");return n&&n.dataset.dfnFor===t});if(0===o.length&&""===t&&1===i.length)return i[0].textContent===n?i:[];if(fa.has(r)&&i.length){const e=i.find(e=>e.textContent.trim()===n);if(e)return[e]}return o}function ya(e={}){const{idlType:t,generic:n,union:r}=e;return void 0===t?"":"string"==typeof t?t:n||(r?t.map(ya).join("|"):ya(t))}const wa=function(){const e=document.createElement("button");return e.innerHTML='<svg height="16" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg>',e.title="Copy IDL to clipboard",e.classList.add("respec-button-copy-paste","removeOnSave"),e}();function va(e){const t=e.closest("pre.idl").cloneNode(!0);t.querySelector(".idlHeader").remove();const{textContent:n}=t,r=wa.cloneNode(!0);r.addEventListener("click",()=>{navigator.clipboard.writeText(n)}),e.append(r)}var ka=Object.freeze({__proto__:null,name:"core/webidl-clipboard",addCopyIDLButton:va});var $a=String.raw`pre.idl{padding:1em;position:relative} pre.idl>code{color:#000} @media print{ pre.idl{white-space:pre-wrap} @@ -845,35 +845,35 @@ a.idlEnumItem{color:#000;border-bottom:1px dotted #ccc;text-decoration:none} .respec-button-copy-paste:is(:disabled,:disabled:hover,.disabled,.disabled:hover){color:rgba(102,102,102,.5);cursor:default;background-color:rgba(229,229,229,.5);background-image:none;border-color:rgba(197,197,197,.5);box-shadow:none} @media print{ .respec-button-copy-paste{visibility:hidden} -}`;const fa="core/webidl",ha=fa,ma={},ga={},ba={wrap:e=>e.flat().filter(e=>""!==e).map(e=>"string"==typeof e?new Text(e):e),trivia:e=>e.trim()?on`<span class="idlSectionComment">${e}</span>`:e,generic:e=>/^[A-Z]/.test(e)?on`<a data-xref-type="interface" data-cite="WEBIDL">${e}</a>`:on`<a data-xref-type="dfn" data-cite="WEBIDL">${e}</a>`,reference(e,t,n){if("extended-attribute"===n.type&&"Exposed"!==n.name)return e;let r,s="_IDL_",i=null;switch(t){case"Window":s="interface",i="HTML";break;case"object":s="interface",i="WebIDL";break;default:t.includes("Worker")&&"extended-attribute"===n.type&&(r=t+"GlobalScope",s="interface",i=["Worker","DedicatedWorker","SharedWorker"].includes(t)?"HTML":null)}return on`<a data-xref-type="${s}" data-cite="${i}" data-lt="${r}" +}`;const xa="core/webidl",_a=xa,Sa={},Ca={},Ea={wrap:e=>e.flat().filter(e=>""!==e).map(e=>"string"==typeof e?new Text(e):e),trivia:e=>e.trim()?gn`<span class="idlSectionComment">${e}</span>`:e,generic:e=>/^[A-Z]/.test(e)?gn`<a data-xref-type="interface" data-cite="WEBIDL">${e}</a>`:gn`<a data-xref-type="dfn" data-cite="WEBIDL">${e}</a>`,reference(e,t,n){if("extended-attribute"===n.type&&"Exposed"!==n.name)return e;let r,s="_IDL_",i=null;switch(t){case"Window":s="interface",i="HTML";break;case"object":s="interface",i="WebIDL";break;default:t.includes("Worker")&&"extended-attribute"===n.type&&(r=t+"GlobalScope",s="interface",i=["Worker","DedicatedWorker","SharedWorker"].includes(t)?"HTML":null)}return gn`<a data-xref-type="${s}" data-cite="${i}" data-lt="${r}" >${e}</a - >`},name(e,{data:t,parent:n}){if(t.idlType&&"argument-type"===t.idlType.type)return on`<span class="idlParamName">${e}</span>`;const r=ya(e,t,n);if("enum-value"!==t.type){const e=n?"idlName":"idlID";r.classList.add(e)}return r},nameless(e,{data:t,parent:n}){switch(t.type){case"operation":case"constructor":return ya(e,t,n);default:return e}},type:e=>on`<span class="idlType">${e}</span>`,inheritance:e=>on`<span class="idlSuperclass">${e}</span>`,definition(e,{data:t,parent:n}){const r=function(e){switch(e.type){case"callback interface":return"idlInterface";case"operation":return"idlMethod";case"field":return"idlMember";case"enum-value":return"idlEnumItem";case"callback function":return"idlCallback"}return`idl${e.type[0].toUpperCase()}${e.type.slice(1)}`}(t);switch(t.type){case"includes":case"enum-value":return on`<span class="${r}">${e}</span>`}const s=n?n.name:"",{name:i,idlId:o}=va(t,s);return on`<span + >`},name(e,{data:t,parent:n}){if(t.idlType&&"argument-type"===t.idlType.type)return gn`<span class="idlParamName">${e}</span>`;const r=Ra(e,t,n);if("enum-value"!==t.type){const e=n?"idlName":"idlID";r.classList.add(e)}return r},nameless(e,{data:t,parent:n}){switch(t.type){case"operation":case"constructor":return Ra(e,t,n);default:return e}},type:e=>gn`<span class="idlType">${e}</span>`,inheritance:e=>gn`<span class="idlSuperclass">${e}</span>`,definition(e,{data:t,parent:n}){const r=function(e){switch(e.type){case"callback interface":return"idlInterface";case"operation":return"idlMethod";case"field":return"idlMember";case"enum-value":return"idlEnumItem";case"callback function":return"idlCallback"}return`idl${e.type[0].toUpperCase()}${e.type.slice(1)}`}(t);switch(t.type){case"includes":case"enum-value":return gn`<span class="${r}">${e}</span>`}const s=n?n.name:"",{name:i,idlId:o}=Aa(t,s);return gn`<span class="${r}" id="${o}" data-idl data-title="${i}" >${e}</span - >`},extendedAttribute:e=>on`<span class="extAttr">${e}</span>`,extendedAttributeReference:e=>on`<a data-xref-type="extended-attribute">${e}</a>`};function ya(e,t,n){const r=n?n.name:"",{name:s}=va(t,r),i=sa(t,s,{parent:r}),o=function(e){switch(e){case"operation":return"method";case"field":return"dict-member";case"callback interface":case"interface mixin":return"interface";default:return e}}(t.type);if(i){t.partial||(i.matches("[data-noexport]")||(i.dataset.export=""),i.dataset.dfnType=o),oa(i,t,r,s);const n="#"+i.id;return on`<a + >`},extendedAttribute:e=>gn`<span class="extAttr">${e}</span>`,extendedAttributeReference:e=>gn`<a data-xref-type="extended-attribute">${e}</a>`};function Ra(e,t,n){const r=n?n.name:"",{name:s}=Aa(t,r),i=ha(t,s,{parent:r}),o=function(e){switch(e){case"operation":return"method";case"field":return"dict-member";case"callback interface":case"interface mixin":return"interface";default:return e}}(t.type);if(i){t.partial||(i.matches("[data-noexport]")||(i.dataset.export=""),i.dataset.dfnType=o),ga(i,t,r,s);const n="#"+i.id;return gn`<a data-link-for="${r}" data-link-type="${o}" href="${n}" class="internalDFN" ><code>${e}</code></a - >`}if("operation"===t.type&&"toJSON"===t.name&&t.extAttrs.some(({name:e})=>"Default"===e))return on`<a data-link-type="dfn" data-lt="default toJSON steps" + >`}if("operation"===t.type&&"toJSON"===t.name&&t.extAttrs.some(({name:e})=>"Default"===e))return gn`<a data-link-type="dfn" data-lt="default toJSON steps" >${e}</a - >`;if(!t.partial){const n=on`<dfn data-export data-dfn-type="${o}" + >`;if(!t.partial){const n=gn`<dfn data-export data-dfn-type="${o}" >${e}</dfn - >`;return Lo(n,[s]),oa(n,t,r,s),n}const a=on`<a + >`;return Wo(n,[s]),ga(n,t,r,s),n}const a=gn`<a data-idl="${t.partial?"partial":null}" data-link-type="${o}" data-title="${t.name}" data-xref-type="${o}" >${e}</a - >`;if(s&&"typedef"!==t.type&&!(t.partial&&!i)){const e=Yn`See ${"using `data-dfn-for`|#data-dfn-for"} in ReSpec's documentation.`;Bn(`Missing \`<dfn>\` for${r?` \`${r}\`'s`:""} \`${"operation"===t.type?s+"()":s}\` ${t.type}.`,ha,{elements:[a],hint:e})}return a}const wa=new WeakMap;function va(e,t=""){if(wa.has(e))return wa.get(e);const n=function(e,t){let n=function(e){switch(e.type){case"enum-value":return e.value;case"operation":return e.name||e.special;default:return e.name||e.type}}(e);let r=function(e,t){if(!t)return"idl-def-"+e.toLowerCase();return`idl-def-${t.toLowerCase()}-${e.toLowerCase()}`}((e.special&&""===e.name?"anonymous-":"")+n,t);switch(e.type){case"callback interface":case"dictionary":case"interface":case"interface mixin":r+=function(e){if(!e.partial)return"";ga[e.name]||(ga[e.name]=0);return ga[e.name]+=1,"-partial-"+ga[e.name]}(e);break;case"constructor":case"operation":{const s=function(e,t){const n=`${t}.${e}`,r=n+"()";let s;ma[r]||(ma[r]=0);ma[n]?s="!overload-"+ma[n]:ma[n]=0;return ma[r]+=1,ma[n]+=1,s||""}(n,t);s?(n+=s,r+=s):e.arguments.length&&(r+=e.arguments.map(e=>"-"+e.name.toLowerCase()).join(""));break}}return{name:n,idlId:r}}(e,t);return wa.set(e,n),n}const ka=["interface","interface mixin","dictionary","namespace","enum","typedef","callback"];function $a(e,t){let n;try{n=sn.parse(e.textContent,{sourceName:String(t)})}catch(t){return Fn(`Failed to parse WebIDL: ${t.bareMessage}.`,ha,{title:t.bareMessage,details:`<pre>${t.context}</pre>`,elements:[e]}),[]}e.classList.add("def","idl");const r=sn.write(n,{templates:ba});on.bind(e)`${r}`,Dn(e,document.createElement("code")),e.querySelectorAll("[data-idl]").forEach(e=>{if(e.dataset.dfnFor)return;const t=e.dataset.title,n=e.dataset.dfnType,r=e.parentElement.closest("[data-idl][data-title]");r&&!ka.includes(n)&&(e.dataset.dfnFor=r.dataset.title),"dfn"===e.localName&&Lo(e,[t])});const s=e.closest("[data-cite], body"),{dataset:i}=s;if(i.cite||(i.cite="WEBIDL"),!/\bwebidl\b/i.test(i.cite)){const e=i.cite.trim().split(/\s+/);i.cite=["WEBIDL",...e].join(" ")}return xa(e),n}function xa(e){Tn(e,"webidl");const t=on`<span class="idlHeader" + >`;if(s&&"typedef"!==t.type&&!(t.partial&&!i)){const e=ir`See ${"using `data-dfn-for`|#data-dfn-for"} in ReSpec's documentation.`;er(`Missing \`<dfn>\` for${r?` \`${r}\`'s`:""} \`${"operation"===t.type?s+"()":s}\` ${t.type}.`,_a,{elements:[a],hint:e})}return a}const Ta=new WeakMap;function Aa(e,t=""){if(Ta.has(e))return Ta.get(e);const n=function(e,t){let n=function(e){switch(e.type){case"enum-value":return e.value;case"operation":return e.name||e.special;default:return e.name||e.type}}(e);let r=function(e,t){if(!t)return"idl-def-"+e.toLowerCase();return`idl-def-${t.toLowerCase()}-${e.toLowerCase()}`}((e.special&&""===e.name?"anonymous-":"")+n,t);switch(e.type){case"callback interface":case"dictionary":case"interface":case"interface mixin":r+=function(e){if(!e.partial)return"";Ca[e.name]||(Ca[e.name]=0);return Ca[e.name]+=1,"-partial-"+Ca[e.name]}(e);break;case"constructor":case"operation":{const s=function(e,t){const n=`${t}.${e}`,r=n+"()";let s;Sa[r]||(Sa[r]=0);Sa[n]?s="!overload-"+Sa[n]:Sa[n]=0;return Sa[r]+=1,Sa[n]+=1,s||""}(n,t);s?(n+=s,r+=s):e.arguments.length&&(r+=e.arguments.map(e=>"-"+e.name.toLowerCase()).join(""));break}}return{name:n,idlId:r}}(e,t);return Ta.set(e,n),n}const La=["interface","interface mixin","dictionary","namespace","enum","typedef","callback"];function Pa(e,t){let n;try{n=mn.parse(e.textContent,{sourceName:String(t)})}catch(t){return Xn(`Failed to parse WebIDL: ${t.bareMessage}.`,_a,{title:t.bareMessage,details:`<pre>${t.context}</pre>`,elements:[e]}),[]}e.classList.add("def","idl");const r=mn.write(n,{templates:Ea});gn.bind(e)`${r}`,Bn(e,document.createElement("code")),e.querySelectorAll("[data-idl]").forEach(e=>{if(e.dataset.dfnFor)return;const t=e.dataset.title,n=e.dataset.dfnType,r=e.parentElement.closest("[data-idl][data-title]");r&&!La.includes(n)&&(e.dataset.dfnFor=r.dataset.title),"dfn"===e.localName&&Wo(e,[t])});const s=e.closest("[data-cite], body"),{dataset:i}=s;if(i.cite||(i.cite="WEBIDL"),!/\bwebidl\b/i.test(i.cite)){const e=i.cite.trim().split(/\s+/);i.cite=["WEBIDL",...e].join(" ")}return Ia(e),n}function Ia(e){Mn(e,"webidl");const t=gn`<span class="idlHeader" ><a class="self-link" href="${"#"+e.id}">WebIDL</a></span - >`;e.prepend(t),ua(t)}var _a=Object.freeze({__proto__:null,name:fa,addIDLHeader:xa,run:async function(){const e=document.querySelectorAll("pre.idl, pre.webidl");if(!e.length)return;const t=document.createElement("style");t.textContent=pa,document.querySelector("head link, head > *:last-child").before(t);const n=[...e].map($a),r=sn.validate(n);for(const t of r){let r=`<pre>${vn(t.context)}</pre>`;if(t.autofix){t.autofix();r+=`Try fixing as:\n <pre>${vn(sn.write(n[t.sourceName]))}</pre>`}Fn("WebIDL validation error: "+t.bareMessage,ha,{details:r,elements:[e[t.sourceName]],title:t.bareMessage})}document.normalize()}});const Sa="core/data-cite",Ca="__SPEC__";async function Ea(e){const{key:t,frag:n,path:r,href:s}=e;let i="",o="";if(t===Ca)i=document.location.href;else{const e=await Fi(t);if(!e)return null;i=e.href,o=e.title}if(s)i=s;else{if(r){const e=r.startsWith("/")?"."+r:r;i=new URL(e,i).href}n&&(i=new URL(n,i).href)}return{href:i,title:o}}function Ra(e,t,n){const{href:r,title:s}=t,i=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=s),t.href=r,i){const e=document.createElement("cite");t.replaceWith(e),e.append(t)}break}case"dfn":{const t=document.createElement("a");if(t.href=r,e.textContent?Dn(e,t):(t.textContent=s,e.append(t)),i){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){Fn("Exporting an linked external definition is not allowed.",Sa,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function Ta(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const Aa=Ta("#"),La=Ta("/");function Pa(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:s,citeHref:i}=t;if(n.startsWith("#")&&!r){const r=e.parentElement.closest('[data-cite]:not([data-cite^="#"])'),{key:s,isNormative:i}=r?Pa(r):{key:Ca,isNormative:!1};return t.cite=i?s:"?"+s,t.citeFrag=n.replace("#",""),Pa(e)}const o=r?"#"+r:Aa(n),a=s||La(n).split("#")[0],{type:c}=In(n,e),l="normative"===c,u=/^[?|!]/.test(n);return{key:n.split(/[/|#]/)[0].substring(Number(u)),isNormative:l,frag:o,path:a,href:i}}function Ia(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 Da=Object.freeze({__proto__:null,name:Sa,THIS_SPEC:Ca,toCiteDetails:Pa,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(Pa).map(async e=>({entry:e,result:await Fi(e.key)})),n=(await Promise.all(t)).filter(({result:e})=>null===e).map(({entry:{key:e}})=>e),r=await qi(n);r&&Object.assign(ji,r)}([...e]);for(const t of e){const e=t.dataset.cite,n=Pa(t),r=await Ea(n);if(r)Ra(t,r,n);else{Bn(`Couldn't find a match for "${e}"`,Sa,{elements:[t]})}}Xn("beforesave",Ia)}});const Na="core/link-to-dfn",Oa=[],ja=$n({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:"在文档中有重复的定义。"}});function za(e){const t=new Map,n=[];for(const r of Ao.get(e)){const{dfnFor:s="",dfnType:i="dfn"}=r.dataset;if(t.has(s)&&t.get(s).has(i)){const e=t.get(s).get(i),o="dfn"===e.localName,a="dfn"===r.localName,c=i===(e.dataset.dfnType||"dfn"),l=s===(e.dataset.dfnFor||"");if(o&&a&&c&&l){n.push(r);continue}}const o="idl"in r.dataset||"dfn"!==i?"idl":"dfn";t.has(s)||t.set(s,new Map),t.get(s).set(o,r),An(r,"dfn",e)}return{result:t,duplicates:n}}function Ma(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor:"";return Ln(e).reduce((e,r)=>{const s=r.split(".");return 2===s.length&&e.push({for:s[0],title:s[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r}),e},[])}(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:s}=e.dataset;if(s){const e="dfn"===s?"dfn":"idl";return r.get(e)||r.get("dfn")}{const e=n.for?"idl":"dfn";return r.get(e)||r.get("idl")}}function Ua(e,t,n){let r=!1;const{linkFor:s}=e.dataset,{dfnFor:i}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(s&&!n.get(s)&&s!==i)r=!0;else if(t.classList.contains("externalDFN")){const n=t.dataset.lt?t.dataset.lt.split("|"):[];e.dataset.lt=n[0]||t.textContent,r=!0}else"partial"!==e.dataset.idl?(e.href="#"+t.id,e.classList.add("internalDFN")):r=!0;return e.hasAttribute("data-link-type")||(e.dataset.linkType="idl"in t.dataset?"idl":"dfn"),function(e){if(e.closest("code,pre"))return!0;if(1!==e.childNodes.length)return!1;const[t]=e.childNodes;return"code"===t.localName}(t)&&function(e,t){const n=e.textContent.trim(),r=t.dataset.hasOwnProperty("idl"),s=Wa(e)&&Wa(t,n);r&&!s||Dn(e,document.createElement("code"))}(e,t),!r}function Wa(e,t=""){switch(e.localName){case"a":if(!e.querySelector("code"))return!0;break;default:{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 qa(e){e.forEach(e=>{Bn(`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,Na,{title:"Linking error: not matching `<dfn>`",elements:[e]})})}var Fa=Object.freeze({__proto__:null,name:Na,possibleExternalLinks:Oa,run:async function(e){const t=function(){const e=new Wn;for(const t of Ao.keys()){const{result:n,duplicates:r}=za(t);e.set(t,n),r.length>0&&Fn(ja.duplicateMsg(t),Na,{title:ja.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){const r=Ma(e,t);if(r){Ua(e,r,t)||Oa.push(e)}else""===e.dataset.cite?n.push(e):Oa.push(e)}qa(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__SPEC__$2");const{key:r,isNormative:s}=Pa(t);r!==Ca&&(s||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||qa(Oa)}});const Ba="xrefs",Ha=3e5;async function Ga(){return await rn.openDB("xref",2,{upgrade(e){[...e.objectStoreNames].forEach(t=>e.deleteObjectStore(t));e.createObjectStore(Ba,{keyPath:"query.id"}).createIndex("byTerm","query.term",{unique:!1})}})}async function Va(e){const t=new Map;if(await async function(){const e="XREF:LAST_VERSION_CHECK",t=parseInt(localStorage.getItem(e),10),n=Date.now();if(!t)return localStorage.setItem(e,n.toString()),!1;if(n-t<Ha)return!1;const r=new URL("meta/version",Ja).href,s=await fetch(r);if(!s.ok)return!1;const i=await s.text();return localStorage.setItem(e,n.toString()),parseInt(i,10)>t}())return await async function(){try{await Ga().then(e=>e.clear(Ba))}catch(e){console.error(e)}}(),t;const n=new Set(e.map(e=>e.id));try{const e=await Ga();let r=await e.transaction(Ba).store.openCursor();for(;r;)n.has(r.key)&&t.set(r.key,r.value.result),r=await r.continue()}catch(e){console.error(e)}return t}const Za="core/xref",Ya={"web-platform":["HTML","INFRA","URL","WEBIDL","DOM","FETCH"]},Ja="https://respec.org/xref/";if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=fn({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}function Ka(e){const t="xrefType"in e.dataset;let n=Qa(e);t||(n=n.toLowerCase());const r=function(e){const t=[];let n=e.closest("[data-cite]");for(;n;){const r=n.dataset.cite.toLowerCase().replace(/[!?]/g,"").split(/\s+/).filter(e=>e);if(r.length&&t.push(r),n===e)break;n=n.parentElement.closest("[data-cite]")}if(n!==e){const n=e.closest("section"),r=[...n?n.querySelectorAll("a.bibref"):[]].map(e=>e.textContent.toLowerCase());r.length&&t.push(r)}return function(e){const t=[];for(const n of e){const e=t[t.length-1]||[],r=[...new Set(n)].filter(t=>!e.includes(t));t.push(r.sort())}return t}(t)}(e),s=function(e,t){if(t)return e.dataset.xrefType?e.dataset.xrefType.split("|"):["_IDL_"];return["_CONCEPT_"]}(e,t),i=function(e,t){if(e.dataset.xrefFor)return kn(e.dataset.xrefFor);if(t){const t=e.closest("[data-xref-for]");if(t)return kn(t.dataset.xrefFor)}return null}(e,t);return{id:"",term:n,types:s,...r.length&&{specs:r},..."string"==typeof i&&{for:i}}}function Qa(e){const{lt:t}=e.dataset;let n=t?t.split("|",1)[0]:e.textContent;return n=kn(n),"the-empty-string"===n?"":n}function Xa(e,t,n,r){const{term:s,specs:i=[]}=t,{uri:o,shortname:a,spec:c,normative:l,type:u,for:d}=n,p=i.flat().includes(c)?c:a,f=new URL(o,"https://partial"),{pathname:h}=f,m={cite:p,citePath:h,citeFrag:f.hash.slice(1),type:u};d&&(m.linkFor=d[0]),f.origin&&"https://partial"!==f.origin&&(m.citeHref=f.href),Object.assign(e.dataset,m),function(e,t,n,r,s){if(!function(e){const t=e.closest(".normative"),n=e.closest(pn);return!n||e===t||t&&n&&n.contains(t)}(e))return void(s.normativeReferences.has(t)||s.informativeReferences.add(t));if(n){const e=s.informativeReferences.has(t)?s.informativeReferences.getCanonicalKey(t):t;return s.normativeReferences.add(e),void s.informativeReferences.delete(e)}Bn(`Normative reference to "${r}" found but term is defined "informatively" in "${t}".`,Za,{title:"Normative reference to non-normative term.",elements:[e]})}(e,p,l,s,r)}function ec(e){const t=JSON.stringify(e,Object.keys(e).sort()),n=(new TextEncoder).encode(t);return crypto.subtle.digest("SHA-1",n).then(tc)}function tc(e){return[...new Uint8Array(e)].map(e=>e.toString(16).padStart(2,"0")).join("")}function nc(e){const t=e.querySelectorAll("a[data-xref-for], a[data-xref-type], a[data-link-for]"),n=["data-xref-for","data-xref-type","data-link-for"];t.forEach(e=>{n.forEach(t=>e.removeAttribute(t))})}var rc=Object.freeze({__proto__:null,name:Za,API_URL:Ja,run:async function(e){if(!e.xref)return;const t=function(e){const t={url:Ja,specs:null},n=Object.assign({},t);switch(Array.isArray(e)?"array":typeof e){case"boolean":break;case"string":e.toLowerCase()in Ya?Object.assign(n,{specs:Ya[e.toLowerCase()]}):r(e);break;case"array":Object.assign(n,{specs:e});break;case"object":if(Object.assign(n,e),e.profile){const t=e.profile.toLowerCase();if(t in Ya){const r=(e.specs??[]).concat(Ya[t]);Object.assign(n,{specs:r})}else r(e.profile)}break;default:Fn(`Invalid value for \`xref\` configuration option. Received: "${e}".`,Za)}return n;function r(e){Fn(`Invalid profile "${e}" in \`respecConfig.xref\`. Please use one of the supported profiles: ${wn(Object.keys(Ya),e=>`"${e}"`)}.`,Za)}}(e.xref);if(t.specs){const e=document.body.dataset.cite?document.body.dataset.cite.split(/\s+/):[];document.body.dataset.cite=e.concat(t.specs).join(" ")}const n=Oa.concat(function(){const e=document.querySelectorAll(":is(a,dfn)[data-cite]:not([data-cite=''],[data-cite*='#'])"),t=document.querySelectorAll("dfn.externalDFN");return[...e].filter(e=>{if(""===e.textContent.trim())return!1;const t=e.closest("[data-cite]");return!t||""!==t.dataset.cite}).concat(...t)}());if(!n.length)return;const r=[];for(const e of n){const t=Ka(e);t.id=await ec(t),r.push(t)}const s=await async function(e,t){const n=new Set,r=e.filter(e=>!n.has(e.id)&&(n.add(e.id)&&!0)),s=await Va(r),i=r.filter(e=>!s.get(e.id)),o=await async function(e,t){if(!e.length)return new Map;const n={keys:e},r={method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}},s=await fetch(t,r),i=await s.json();return new Map(i.result)}(i,t);o.size&&await async function(e,t){try{const n=(await Ga()).transaction(Ba,"readwrite");for(const r of e){const e=t.get(r.id);n.objectStore(Ba).add({query:r,result:e})}await n.done}catch(e){console.error(e)}}(r,o);return new Map([...s,...o])}(r,t.url);!function(e,t,n,r){const s={ambiguous:new Map,notFound:new Map};for(let i=0,o=e.length;i<o;i++){if(e[i].closest("[data-no-xref]"))continue;const o=e[i],a=t[i],{id:c}=a,l=n.get(c);if(1===l.length)Xa(o,a,l[0],r);else{const e=s[0===l.length?"notFound":"ambiguous"];e.has(c)||e.set(c,{elems:[],results:l,query:a}),e.get(c).elems.push(o)}}!function({ambiguous:e,notFound:t}){const n=(e,t,n=[])=>{const r=new URL(Ja);return r.searchParams.set("term",e),t.for&&r.searchParams.set("for",t.for),r.searchParams.set("types",t.types.join(",")),n.length&&r.searchParams.set("specs",n.join(",")),r.href},r=(e,t)=>Yn` + >`;e.prepend(t),va(t)}var Da=Object.freeze({__proto__:null,name:xa,addIDLHeader:Ia,run:async function(){const e=document.querySelectorAll("pre.idl, pre.webidl");if(!e.length)return;const t=document.createElement("style");t.textContent=$a,document.querySelector("head link, head > *:last-child").before(t);const n=[...e].map(Pa),r=mn.validate(n);for(const t of r){let r=`<pre>${An(t.context)}</pre>`;if(t.autofix){t.autofix();r+=`Try fixing as:\n <pre>${An(mn.write(n[t.sourceName]))}</pre>`}Xn("WebIDL validation error: "+t.bareMessage,_a,{details:r,elements:[e[t.sourceName]],title:t.bareMessage})}document.normalize()}});const Na="core/data-cite",Oa="__SPEC__";async function ja(e){const{key:t,frag:n,path:r,href:s}=e;let i="",o="";if(t===Oa)i=document.location.href;else{const e=await Xi(t);if(!e)return null;i=e.href,o=e.title}if(s)i=s;else{if(r){const e=r.startsWith("/")?"."+r:r;i=new URL(e,i).href}n&&(i=new URL(n,i).href)}return{href:i,title:o}}function za(e,t,n){const{href:r,title:s}=t,i=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=s),t.href=r,i){const e=document.createElement("cite");t.replaceWith(e),e.append(t)}break}case"dfn":{const t=document.createElement("a");if(t.href=r,e.textContent?Bn(e,t):(t.textContent=s,e.append(t)),i){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){Xn("Exporting an linked external definition is not allowed.",Na,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function Ma(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const Ua=Ma("#"),Wa=Ma("/");function qa(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:s,citeHref:i}=t;if(n.startsWith("#")&&!r){const r=e.parentElement.closest('[data-cite]:not([data-cite^="#"])'),{key:s,isNormative:i}=r?qa(r):{key:Oa,isNormative:!1};return t.cite=i?s:"?"+s,t.citeFrag=n.replace("#",""),qa(e)}const o=r?"#"+r:Ua(n),a=s||Wa(n).split("#")[0],{type:c}=Fn(n,e),l="normative"===c,u=/^[?|!]/.test(n);return{key:n.split(/[/|#]/)[0].substring(Number(u)),isNormative:l,frag:o,path:a,href:i}}function Fa(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 Ba=Object.freeze({__proto__:null,name:Na,THIS_SPEC:Oa,toCiteDetails:qa,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(qa).map(async e=>({entry:e,result:await Xi(e.key)})),n=(await Promise.all(t)).filter(({result:e})=>null===e).map(({entry:{key:e}})=>e),r=await Qi(n);r&&Object.assign(Vi,r)}([...e]);for(const t of e){const e=t.dataset.cite,n=qa(t),r=await ja(n);if(r)za(t,r,n);else{er(`Couldn't find a match for "${e}"`,Na,{elements:[t]})}}lr("beforesave",Fa)}});const Ha="core/link-to-dfn",Ga=[],Va=Pn({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:"在文档中有重复的定义。"}});function Za(e){const t=new Map,n=[];for(const r of Uo.get(e)){const{dfnFor:s="",dfnType:i="dfn"}=r.dataset;if(t.has(s)&&t.get(s).has(i)){const e=t.get(s).get(i),o="dfn"===e.localName,a="dfn"===r.localName,c=i===(e.dataset.dfnType||"dfn"),l=s===(e.dataset.dfnFor||"");if(o&&a&&c&&l){n.push(r);continue}}const o="idl"in r.dataset||"dfn"!==i?"idl":"dfn";t.has(s)||t.set(s,new Map),t.get(s).set(o,r),Un(r,"dfn",e)}return{result:t,duplicates:n}}function Ya(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor:"";return Wn(e).reduce((e,r)=>{const s=r.split(".");return 2===s.length&&e.push({for:s[0],title:s[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r}),e},[])}(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:s}=e.dataset;if(s){const e="dfn"===s?"dfn":"idl";return r.get(e)||r.get("dfn")}{const e=n.for?"idl":"dfn";return r.get(e)||r.get("idl")}}function Ja(e,t,n){let r=!1;const{linkFor:s}=e.dataset,{dfnFor:i}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(s&&!n.get(s)&&s!==i)r=!0;else if(t.classList.contains("externalDFN")){const n=t.dataset.lt?t.dataset.lt.split("|"):[];e.dataset.lt=n[0]||t.textContent,r=!0}else"partial"!==e.dataset.idl?(e.href="#"+t.id,e.classList.add("internalDFN")):r=!0;return e.hasAttribute("data-link-type")||(e.dataset.linkType="idl"in t.dataset?"idl":"dfn"),function(e){if(e.closest("code,pre"))return!0;if(1!==e.childNodes.length)return!1;const[t]=e.childNodes;return"code"===t.localName}(t)&&function(e,t){const n=e.textContent.trim(),r=t.dataset.hasOwnProperty("idl"),s=Ka(e)&&Ka(t,n);r&&!s||Bn(e,document.createElement("code"))}(e,t),!r}function Ka(e,t=""){switch(e.localName){case"a":if(!e.querySelector("code"))return!0;break;default:{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 Qa(e){e.forEach(e=>{er(`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,Ha,{title:"Linking error: not matching `<dfn>`",elements:[e]})})}var Xa=Object.freeze({__proto__:null,name:Ha,possibleExternalLinks:Ga,run:async function(e){const t=function(){const e=new Kn;for(const t of Uo.keys()){const{result:n,duplicates:r}=Za(t);e.set(t,n),r.length>0&&Xn(Va.duplicateMsg(t),Ha,{title:Va.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){const r=Ya(e,t);if(r){Ja(e,r,t)||Ga.push(e)}else""===e.dataset.cite?n.push(e):Ga.push(e)}Qa(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__SPEC__$2");const{key:r,isNormative:s}=qa(t);r!==Oa&&(s||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||Qa(Ga)}});const ec="xrefs",tc=3e5;async function nc(){return await hn.openDB("xref",2,{upgrade(e){[...e.objectStoreNames].forEach(t=>e.deleteObjectStore(t));e.createObjectStore(ec,{keyPath:"query.id"}).createIndex("byTerm","query.term",{unique:!1})}})}async function rc(e){const t=new Map;if(await async function(){const e="XREF:LAST_VERSION_CHECK",t=parseInt(localStorage.getItem(e),10),n=Date.now();if(!t)return localStorage.setItem(e,n.toString()),!1;if(n-t<tc)return!1;const r=new URL("meta/version",oc).href,s=await fetch(r);if(!s.ok)return!1;const i=await s.text();return localStorage.setItem(e,n.toString()),parseInt(i,10)>t}())return await async function(){try{await nc().then(e=>e.clear(ec))}catch(e){console.error(e)}}(),t;const n=new Set(e.map(e=>e.id));try{const e=await nc();let r=await e.transaction(ec).store.openCursor();for(;r;)n.has(r.key)&&t.set(r.key,r.value.result),r=await r.continue()}catch(e){console.error(e)}return t}const sc="core/xref",ic={"web-platform":["HTML","INFRA","URL","WEBIDL","DOM","FETCH"]},oc="https://respec.org/xref/";if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=xn({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}function ac(e){const t="xrefType"in e.dataset;let n=cc(e);t||(n=n.toLowerCase());const r=function(e){const t=[];let n=e.closest("[data-cite]");for(;n;){const r=n.dataset.cite.toLowerCase().replace(/[!?]/g,"").split(/\s+/).filter(e=>e);if(r.length&&t.push(r),n===e)break;n=n.parentElement.closest("[data-cite]")}if(n!==e){const n=e.closest("section"),r=[...n?n.querySelectorAll("a.bibref"):[]].map(e=>e.textContent.toLowerCase());r.length&&t.push(r)}return function(e){const t=[];for(const n of e){const e=t[t.length-1]||[],r=[...new Set(n)].filter(t=>!e.includes(t));t.push(r.sort())}return t}(t)}(e),s=function(e,t){if(t)return e.dataset.xrefType?e.dataset.xrefType.split("|"):["_IDL_"];return["_CONCEPT_"]}(e,t),i=function(e,t){if(e.dataset.xrefFor)return Ln(e.dataset.xrefFor);if(t){const t=e.closest("[data-xref-for]");if(t)return Ln(t.dataset.xrefFor)}return null}(e,t);return{id:"",term:n,types:s,...r.length&&{specs:r},..."string"==typeof i&&{for:i}}}function cc(e){const{lt:t}=e.dataset;let n=t?t.split("|",1)[0]:e.textContent;return n=Ln(n),"the-empty-string"===n?"":n}function lc(e,t,n,r){const{term:s,specs:i=[]}=t,{uri:o,shortname:a,spec:c,normative:l,type:u,for:d}=n,p=i.flat().includes(c)?c:a,f=new URL(o,"https://partial"),{pathname:h}=f,m={cite:p,citePath:h,citeFrag:f.hash.slice(1),type:u};d&&(m.linkFor=d[0]),f.origin&&"https://partial"!==f.origin&&(m.citeHref=f.href),Object.assign(e.dataset,m),function(e,t,n,r,s){if(!function(e){const t=e.closest(".normative"),n=e.closest($n);return!n||e===t||t&&n&&n.contains(t)}(e))return void(s.normativeReferences.has(t)||s.informativeReferences.add(t));if(n){const e=s.informativeReferences.has(t)?s.informativeReferences.getCanonicalKey(t):t;return s.normativeReferences.add(e),void s.informativeReferences.delete(e)}er(`Normative reference to "${r}" found but term is defined "informatively" in "${t}".`,sc,{title:"Normative reference to non-normative term.",elements:[e]})}(e,p,l,s,r)}function uc(e){const t=JSON.stringify(e,Object.keys(e).sort()),n=(new TextEncoder).encode(t);return crypto.subtle.digest("SHA-1",n).then(dc)}function dc(e){return[...new Uint8Array(e)].map(e=>e.toString(16).padStart(2,"0")).join("")}function pc(e){const t=e.querySelectorAll("a[data-xref-for], a[data-xref-type], a[data-link-for]"),n=["data-xref-for","data-xref-type","data-link-for"];t.forEach(e=>{n.forEach(t=>e.removeAttribute(t))})}var fc=Object.freeze({__proto__:null,name:sc,API_URL:oc,run:async function(e){if(!e.xref)return;const t=function(e){const t={url:oc,specs:null},n=Object.assign({},t);switch(Array.isArray(e)?"array":typeof e){case"boolean":break;case"string":e.toLowerCase()in ic?Object.assign(n,{specs:ic[e.toLowerCase()]}):r(e);break;case"array":Object.assign(n,{specs:e});break;case"object":if(Object.assign(n,e),e.profile){const t=e.profile.toLowerCase();if(t in ic){const r=(e.specs??[]).concat(ic[t]);Object.assign(n,{specs:r})}else r(e.profile)}break;default:Xn(`Invalid value for \`xref\` configuration option. Received: "${e}".`,sc)}return n;function r(e){Xn(`Invalid profile "${e}" in \`respecConfig.xref\`. Please use one of the supported profiles: ${Tn(Object.keys(ic),e=>`"${e}"`)}.`,sc)}}(e.xref);if(t.specs){const e=document.body.dataset.cite?document.body.dataset.cite.split(/\s+/):[];document.body.dataset.cite=e.concat(t.specs).join(" ")}const n=Ga.concat(function(){const e=document.querySelectorAll(":is(a,dfn)[data-cite]:not([data-cite=''],[data-cite*='#'])"),t=document.querySelectorAll("dfn.externalDFN");return[...e].filter(e=>{if(""===e.textContent.trim())return!1;const t=e.closest("[data-cite]");return!t||""!==t.dataset.cite}).concat(...t)}());if(!n.length)return;const r=[];for(const e of n){const t=ac(e);t.id=await uc(t),r.push(t)}const s=await async function(e,t){const n=new Set,r=e.filter(e=>!n.has(e.id)&&(n.add(e.id)&&!0)),s=await rc(r),i=r.filter(e=>!s.get(e.id)),o=await async function(e,t){if(!e.length)return new Map;const n={keys:e},r={method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}},s=await fetch(t,r),i=await s.json();return new Map(i.result)}(i,t);o.size&&await async function(e,t){try{const n=(await nc()).transaction(ec,"readwrite");for(const r of e){const e=t.get(r.id);n.objectStore(ec).add({query:r,result:e})}await n.done}catch(e){console.error(e)}}(r,o);return new Map([...s,...o])}(r,t.url);!function(e,t,n,r){const s={ambiguous:new Map,notFound:new Map};for(let i=0,o=e.length;i<o;i++){if(e[i].closest("[data-no-xref]"))continue;const o=e[i],a=t[i],{id:c}=a,l=n.get(c);if(1===l.length)lc(o,a,l[0],r);else{const e=s[0===l.length?"notFound":"ambiguous"];e.has(c)||e.set(c,{elems:[],results:l,query:a}),e.get(c).elems.push(o)}}!function({ambiguous:e,notFound:t}){const n=(e,t,n=[])=>{const r=new URL(oc);return r.searchParams.set("term",e),t.for&&r.searchParams.set("for",t.for),r.searchParams.set("types",t.types.join(",")),n.length&&r.searchParams.set("specs",n.join(",")),r.href},r=(e,t)=>ir` [See search matches for "${t}"](${e}) or - ${"[Learn about this error|#error-term-not-found]"}.`;for(const{query:e,elems:s}of t.values()){const t=e.specs?[...new Set(e.specs.flat())].sort():[],i=Qa(s[0]),o=n(i,e),a=yn(t,e=>`**[${e}]**`),c=r(o,i);Fn(`Couldn't find "**${i}**"${e.for?`, for **"${e.for}"**, `:""} in this document or other cited documents: ${a}.`,Za,{title:"No matching definition found.",elements:s,hint:c})}for(const{query:t,elems:s,results:i}of e.values()){const e=[...new Set(i.map(e=>e.shortname))].sort(),o=yn(e,e=>`**[${e}]**`),a=Qa(s[0]),c=n(a,t,e),l=t.for?`, for **"${t.for}"**, `:"",u=Yn`To fix, use the ${"[data-cite]"} attribute to pick the one you mean from the appropriate specification. ${r(c,a)}.`;Fn(`The term "**${a}**"${l} is ambiguous because it's defined in ${o}.`,Za,{title:"Definition is ambiguous.",elements:s,hint:u})}}(s)}(n,r,s,e),Xn("beforesave",nc)},getTermFromElement:Qa});var sc=Object.freeze({__proto__:null,name:"core/webidl-index",run:function(){const e=document.querySelector("section#idl-index");if(!e)return;const t=[2,3,4,5,6].map(e=>`h${e}:first-child`).join(",");if(!e.querySelector(t)){const t=document.createElement("h2");e.title?(t.textContent=e.title,e.removeAttribute("title")):t.textContent="IDL Index",e.prepend(t)}const n=Array.from(document.querySelectorAll("pre.idl:not(.exclude) > code")).filter(e=>!e.closest(pn));if(0===n.length){const t="This specification doesn't normatively declare any Web IDL.";return void e.append(t)}const r=document.createElement("pre");r.classList.add("idl","def"),r.id="actual-idl-index",n.map(e=>{const t=document.createDocumentFragment();for(const n of e.children)t.appendChild(n.cloneNode(!0));return t}).forEach(e=>{r.lastChild&&r.append("\n\n"),r.appendChild(e)}),r.querySelectorAll("*[id]").forEach(e=>e.removeAttribute("id")),e.appendChild(r),Dn(r,document.createElement("code")),xa(r)}});var ic=String.raw`ul.index{columns:30ch;column-gap:1.5em} + ${"[Learn about this error|#error-term-not-found]"}.`;for(const{query:e,elems:s}of t.values()){const t=e.specs?[...new Set(e.specs.flat())].sort():[],i=cc(s[0]),o=n(i,e),a=Rn(t,e=>`**[${e}]**`),c=r(o,i);Xn(`Couldn't find "**${i}**"${e.for?`, for **"${e.for}"**, `:""} in this document or other cited documents: ${a}.`,sc,{title:"No matching definition found.",elements:s,hint:c})}for(const{query:t,elems:s,results:i}of e.values()){const e=[...new Set(i.map(e=>e.shortname))].sort(),o=Rn(e,e=>`**[${e}]**`),a=cc(s[0]),c=n(a,t,e),l=t.for?`, for **"${t.for}"**, `:"",u=ir`To fix, use the ${"[data-cite]"} attribute to pick the one you mean from the appropriate specification. ${r(c,a)}.`;Xn(`The term "**${a}**"${l} is ambiguous because it's defined in ${o}.`,sc,{title:"Definition is ambiguous.",elements:s,hint:u})}}(s)}(n,r,s,e),lr("beforesave",pc)},getTermFromElement:cc});var hc=Object.freeze({__proto__:null,name:"core/webidl-index",run:function(){const e=document.querySelector("section#idl-index");if(!e)return;const t=[2,3,4,5,6].map(e=>`h${e}:first-child`).join(",");if(!e.querySelector(t)){const t=document.createElement("h2");e.title?(t.textContent=e.title,e.removeAttribute("title")):t.textContent="IDL Index",e.prepend(t)}const n=Array.from(document.querySelectorAll("pre.idl:not(.exclude) > code")).filter(e=>!e.closest($n));if(0===n.length){const t="This specification doesn't normatively declare any Web IDL.";return void e.append(t)}const r=document.createElement("pre");r.classList.add("idl","def"),r.id="actual-idl-index",n.map(e=>{const t=document.createDocumentFragment();for(const n of e.children)t.appendChild(n.cloneNode(!0));return t}).forEach(e=>{r.lastChild&&r.append("\n\n"),r.appendChild(e)}),r.querySelectorAll("*[id]").forEach(e=>e.removeAttribute("id")),e.appendChild(r),Bn(r,document.createElement("code")),Ia(r)}});var mc=String.raw`ul.index{columns:30ch;column-gap:1.5em} ul.index li{list-style:inherit} ul.index li span{color:inherit;cursor:pointer;white-space:normal} #index-defined-here ul.index li{font-size:.9rem} @@ -881,35 +881,35 @@ ul.index code{color:inherit} #index-defined-here .print-only{display:none} @media print{ #index-defined-here .print-only{display:initial} -}`;const oc=$n({en:{heading:"Index",headingExternal:"Terms defined by reference",headlingLocal:"Terms defined by this specification",dfnOf:"definition of"}}),ac=new Set(["attribute","callback","dict-member","dictionary","element-attr","element","enum-value","enum","exception","extended-attribute","interface","method","typedef"]);function cc(e){const t=e.dataset,n=t.dfnType||t.idl||t.linkType||"";switch(n){case"":case"dfn":return"";default:return n}}function lc(e){const t=e.closest("[data-dfn-for]:not([data-dfn-for=''])");return t?t.dataset.dfnFor:""}function uc(e,t,n=""){if(n.startsWith("[[")){return`internal slot for <code>${lc(e)}</code>`}switch(t){case"dict-member":case"method":case"attribute":case"enum-value":return`${"dict-member"===t?"member":t.replace("-"," ")} for <code>${lc(e)}</code>`;case"interface":case"dictionary":case"enum":return t;case"constructor":return`for <code>${lc(e)}</code>`;default:return""}}function dc(){document.querySelectorAll("#index-defined-here li[data-id]").forEach(e=>e.append((e=>{const t="§"+document.getElementById(e).closest("section").querySelector(".secno").textContent.trim();return on`<span class="print-only">${t}</span>`})(e.dataset.id)))}function pc(){const e=new Set,t=new Map,n=document.querySelectorAll("a[data-cite]");for(const r of n){if(!r.dataset.cite)continue;const n=r.href;if(e.has(n))continue;const{type:s,linkFor:i}=r.dataset,o=Qa(r);if(!o)continue;const a=Pa(r).key.toUpperCase();(t.get(a)||t.set(a,[]).get(a)).push({term:o,type:s,linkFor:i,elem:r}),e.add(n)}return t}function fc(e){const{elem:t}=e,n=function(e){const{term:t,type:n,linkFor:r}=e;let s=t;ac.has(n)&&("extended-attribute"===n&&(s=`[${s}]`),s=`<code>${s}</code>`);const i=mc.has(t)?"type":hc.get(n);i&&(s+=" "+i);if(r){let e=r;/\s/.test(r)||(e=`<code>${e}</code>`),"element-attr"===n&&(e+=" element"),s+=` (for ${e})`}return s}(e);return on`<li> +}`;const gc=Pn({en:{heading:"Index",headingExternal:"Terms defined by reference",headlingLocal:"Terms defined by this specification",dfnOf:"definition of"}}),bc=new Set(["attribute","callback","dict-member","dictionary","element-attr","element","enum-value","enum","exception","extended-attribute","interface","method","typedef"]);function yc(e){const t=e.dataset,n=t.dfnType||t.idl||t.linkType||"";switch(n){case"":case"dfn":return"";default:return n}}function wc(e){const t=e.closest("[data-dfn-for]:not([data-dfn-for=''])");return t?t.dataset.dfnFor:""}function vc(e,t,n=""){if(n.startsWith("[[")){return`internal slot for <code>${wc(e)}</code>`}switch(t){case"dict-member":case"method":case"attribute":case"enum-value":return`${"dict-member"===t?"member":t.replace("-"," ")} for <code>${wc(e)}</code>`;case"interface":case"dictionary":case"enum":return t;case"constructor":return`for <code>${wc(e)}</code>`;default:return""}}function kc(){document.querySelectorAll("#index-defined-here li[data-id]").forEach(e=>e.append((e=>{const t="§"+document.getElementById(e).closest("section").querySelector(".secno").textContent.trim();return gn`<span class="print-only">${t}</span>`})(e.dataset.id)))}function $c(){const e=new Set,t=new Map,n=document.querySelectorAll("a[data-cite]");for(const r of n){if(!r.dataset.cite)continue;const n=r.href;if(e.has(n))continue;const{type:s,linkFor:i}=r.dataset,o=cc(r);if(!o)continue;const a=qa(r).key.toUpperCase();(t.get(a)||t.set(a,[]).get(a)).push({term:o,type:s,linkFor:i,elem:r}),e.add(n)}return t}function xc(e){const{elem:t}=e,n=function(e){const{term:t,type:n,linkFor:r}=e;let s=t;bc.has(n)&&("extended-attribute"===n&&(s=`[${s}]`),s=`<code>${s}</code>`);const i=Sc.has(t)?"type":_c.get(n);i&&(s+=" "+i);if(r){let e=r;/\s/.test(r)||(e=`<code>${e}</code>`),"element-attr"===n&&(e+=" element"),s+=` (for ${e})`}return s}(e);return gn`<li> <span class="index-term" data-href="${t.href}">${{html:n}}</span> - </li>`}const hc=new Map([["attribute","attribute"],["element-attr","attribute"],["element","element"],["enum","enum"],["exception","exception"],["extended-attribute","extended attribute"],["interface","interface"]]),mc=new Set(["boolean","byte","octet","short","unsigned short","long","unsigned long","long long","unsigned long long","float","unrestricted float","double","unrestricted double","undefined","any","object","symbol"]);function gc(e){e.querySelectorAll("#index-defined-elsewhere li[data-spec]").forEach(e=>e.removeAttribute("data-spec")),e.querySelectorAll("#index-defined-here li[data-id]").forEach(e=>e.removeAttribute("data-id"))}var bc=Object.freeze({__proto__:null,name:"core/dfn-index",run:function(){const e=document.querySelector("section#index");if(!e)return;const t=document.createElement("style");t.textContent=ic,document.head.appendChild(t),e.classList.add("appendix"),e.querySelector("h2")||e.prepend(on`<h2>${oc.heading}</h2>`);const n=on`<section id="index-defined-here"> - <h3>${oc.headlingLocal}</h3> - ${function(){const e=function(){const e=new Map,t=document.querySelectorAll("dfn:not([data-cite])");for(const n of t){if(!n.id)continue;const t=kn(n.textContent);(e.get(t)||e.set(t,[]).get(t)).push(n)}return[...e].sort(([e],[t])=>e.slice(e.search(/\w/)).localeCompare(t.slice(t.search(/\w/))))}();return on`<ul class="index"> - ${e.map(([e,t])=>function(e,t){const n=(e,t,n)=>{const r="#"+e.id;return on`<li data-id=${e.id}> + </li>`}const _c=new Map([["attribute","attribute"],["element-attr","attribute"],["element","element"],["enum","enum"],["exception","exception"],["extended-attribute","extended attribute"],["interface","interface"]]),Sc=new Set(["boolean","byte","octet","short","unsigned short","long","unsigned long","long long","unsigned long long","float","unrestricted float","double","unrestricted double","undefined","any","object","symbol"]);function Cc(e){e.querySelectorAll("#index-defined-elsewhere li[data-spec]").forEach(e=>e.removeAttribute("data-spec")),e.querySelectorAll("#index-defined-here li[data-id]").forEach(e=>e.removeAttribute("data-id"))}var Ec=Object.freeze({__proto__:null,name:"core/dfn-index",run:function(){const e=document.querySelector("section#index");if(!e)return;const t=document.createElement("style");t.textContent=mc,document.head.appendChild(t),e.classList.add("appendix"),e.querySelector("h2")||e.prepend(gn`<h2>${gc.heading}</h2>`);const n=gn`<section id="index-defined-here"> + <h3>${gc.headlingLocal}</h3> + ${function(){const e=function(){const e=new Map,t=document.querySelectorAll("dfn:not([data-cite])");for(const n of t){if(!n.id)continue;const t=Ln(n.textContent);(e.get(t)||e.set(t,[]).get(t)).push(n)}return[...e].sort(([e],[t])=>e.slice(e.search(/\w/)).localeCompare(t.slice(t.search(/\w/))))}();return gn`<ul class="index"> + ${e.map(([e,t])=>function(e,t){const n=(e,t,n)=>{const r="#"+e.id;return gn`<li data-id=${e.id}> <a class="index-term" href="${r}">${{html:t}}</a> ${n?{html:n}:""} - </li>`};if(1===t.length){const r=t[0],s=cc(r),i=function(e,t,n){let r=n;"enum-value"===t&&(r=`"${r}"`);(ac.has(t)||e.dataset.idl||e.closest("code"))&&(r=`<code>${r}</code>`);return r}(r,s,e),o=uc(r,s,e);return n(r,i,o)}return on`<li> + </li>`};if(1===t.length){const r=t[0],s=yc(r),i=function(e,t,n){let r=n;"enum-value"===t&&(r=`"${r}"`);(bc.has(t)||e.dataset.idl||e.closest("code"))&&(r=`<code>${r}</code>`);return r}(r,s,e),o=vc(r,s,e);return n(r,i,o)}return gn`<li> ${e} <ul> - ${t.map(t=>{const r=uc(t,cc(t),e)||oc.dfnOf;return n(t,r)})} + ${t.map(t=>{const r=vc(t,yc(t),e)||gc.dfnOf;return n(t,r)})} </ul> </li>`}(e,t))} </ul>`}()} - </section>`;e.append(n);const r=on`<section id="index-defined-elsewhere"> - <h3>${oc.headingExternal}</h3> - ${function(){const e=[...pc().entries()].sort(([e],[t])=>e.localeCompare(t));return on`<ul class="index"> - ${e.map(([e,t])=>on`<li data-spec="${e}"> - ${Qi(e)} defines the following: + </section>`;e.append(n);const r=gn`<section id="index-defined-elsewhere"> + <h3>${gc.headingExternal}</h3> + ${function(){const e=[...$c().entries()].sort(([e],[t])=>e.localeCompare(t));return gn`<ul class="index"> + ${e.map(([e,t])=>gn`<li data-spec="${e}"> + ${co(e)} defines the following: <ul> - ${t.sort((e,t)=>e.term.localeCompare(t.term)).map(fc)} + ${t.sort((e,t)=>e.term.localeCompare(t.term)).map(xc)} </ul> </li>`)} </ul>`}()} - </section>`;e.append(r);for(const e of r.querySelectorAll(".index-term"))An(e,"index-term");Xn("toc",dc,{once:!0}),Xn("beforesave",gc)}});const yc="core/contrib";var wc=Object.freeze({__proto__:null,name:yc,run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void Fn(Yn`Requested list of contributors from GitHub, but ${"[github]"} configuration option is not set.`,yc)}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 s();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 on(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=yn(r)}(r,n):n.textContent="Failed to fetch contributors.";async function s(){const{href:n}=new URL("contributors",t);try{const t=await Cn(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))}catch(e){return Fn("Error loading contributors from GitHub.",yc),console.error(e),null}}}(t,n)}});var vc=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=>{Pn(e,"h"+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))})}});const kc=["h2","h3","h4","h5","h6"],$c="core/structure",xc=$n({en:{toc:"Table of Contents"},zh:{toc:"内容大纲"},ko:{toc:"목차"},ja:{toc:"目次"},nl:{toc:"Inhoudsopgave"},es:{toc:"Tabla de Contenidos"},de:{toc:"Inhaltsverzeichnis"}});function _c(e,t,{prefix:n=""}={}){let r=!1,s=0,i=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const o=on`<ol class="toc"></ol>`;for(const a of e){!a.isAppendix||n||r||(s=i,r=!0);let e=a.isIntro?"":r?Sc(i-s+1):n+i;const c=e.split(".").length;if(1===c&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(i+=1,a.header.prepend(on`<bdi class="secno">${e} </bdi>`)),c<=t){const n=a.header.id||a.element.id,r=Ec(a.header,n),s=_c(a.subsections,t,{prefix:e});s&&r.append(s),o.append(r)}}return o}function Sc(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function Cc(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(!kc.includes(r.localName))continue;const s=r.textContent;An(e,null,s),n.push({element:e,header:r,title:s,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:Cc(e)})}return n}function Ec(e,t){const n=on`<a href="${"#"+t}" class="tocxref" />`;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach(e=>{const t=Pn(e,"span");t.className="formerLink",t.removeAttribute("href")}),r.querySelectorAll("dfn").forEach(e=>{Pn(e,"span").removeAttribute("id")}),on`<li class="tocline">${n}</li>`}var Rc=Object.freeze({__proto__:null,name:$c,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(Nn(e,"section").length+1,6);e.localName!==t&&Pn(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)){Fn("`data-max-toc` must have a value between 0-6 (inclusive).",$c,{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=_c(Cc(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=on`<nav id="toc"></nav>`,n=on`<h2 class="introductory">${xc.toc}</h2>`;An(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 s=on`<p role="navigation" id="back-to-top"> + </section>`;e.append(r);for(const e of r.querySelectorAll(".index-term"))Un(e,"index-term");lr("toc",kc,{once:!0}),lr("beforesave",Cc)}});const Rc="core/contrib";var Tc=Object.freeze({__proto__:null,name:Rc,run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void Xn(ir`Requested list of contributors from GitHub, but ${"[github]"} configuration option is not set.`,Rc)}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 s();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 gn(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=Rn(r)}(r,n):n.textContent="Failed to fetch contributors.";async function s(){const{href:n}=new URL("contributors",t);try{const t=await On(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))}catch(e){return Xn("Error loading contributors from GitHub.",Rc),console.error(e),null}}}(t,n)}});var Ac=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=>{qn(e,"h"+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))})}});const Lc=["h2","h3","h4","h5","h6"],Pc="core/structure",Ic=Pn({en:{toc:"Table of Contents"},zh:{toc:"内容大纲"},ko:{toc:"목차"},ja:{toc:"目次"},nl:{toc:"Inhoudsopgave"},es:{toc:"Tabla de Contenidos"},de:{toc:"Inhaltsverzeichnis"}});function Dc(e,t,{prefix:n=""}={}){let r=!1,s=0,i=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const o=gn`<ol class="toc"></ol>`;for(const a of e){!a.isAppendix||n||r||(s=i,r=!0);let e=a.isIntro?"":r?Nc(i-s+1):n+i;const c=e.split(".").length;if(1===c&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(i+=1,a.header.prepend(gn`<bdi class="secno">${e} </bdi>`)),c<=t){const n=a.header.id||a.element.id,r=jc(a.header,n),s=Dc(a.subsections,t,{prefix:e});s&&r.append(s),o.append(r)}}return o}function Nc(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function Oc(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(!Lc.includes(r.localName))continue;const s=r.textContent;Un(e,null,s),n.push({element:e,header:r,title:s,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:Oc(e)})}return n}function jc(e,t){const n=gn`<a href="${"#"+t}" class="tocxref" />`;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach(e=>{const t=qn(e,"span");t.className="formerLink",t.removeAttribute("href")}),r.querySelectorAll("dfn").forEach(e=>{qn(e,"span").removeAttribute("id")}),gn`<li class="tocline">${n}</li>`}var zc=Object.freeze({__proto__:null,name:Pc,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(Hn(e,"section").length+1,6);e.localName!==t&&qn(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)){Xn("`data-max-toc` must have a value between 0-6 (inclusive).",Pc,{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=Dc(Oc(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=gn`<nav id="toc"></nav>`,n=gn`<h2 class="introductory">${Ic.toc}</h2>`;Un(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 s=gn`<p role="navigation" id="back-to-top"> <a href="#title"><abbr title="Back to Top">↑</abbr></a> - </p>`;document.body.append(s)}(t)}Qn("toc")}});const Tc=$n({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:"本章节不包含规范性内容。"}});var Ac=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(on`<p><em>${Tc.informative}</em></p>`)})}});var Lc=Object.freeze({__proto__:null,name:"core/id-headers",run:function(e){const t=document.querySelectorAll("section:not(.head):not(.introductory) h2, h3, h4, h5, h6");for(const n of t){let t=n.id;t||(An(n),t=n.parentElement.id||n.id),e.addSectionLinks&&n.appendChild(on` + </p>`;document.body.append(s)}(t)}cr("toc")}});const Mc=Pn({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:"本章节不包含规范性内容。"}});var Uc=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(gn`<p><em>${Mc.informative}</em></p>`)})}});var Wc=Object.freeze({__proto__:null,name:"core/id-headers",run:function(e){const t=document.querySelectorAll("section:not(.head):not(.introductory) h2, h3, h4, h5, h6");for(const n of t){let t=n.id;t||(Un(n),t=n.parentElement.id||n.id),e.addSectionLinks&&n.appendChild(gn` <a href="${"#"+t}" class="self-link" aria-label="§"></a> - `)}}});var Pc=String.raw`.caniuse-stats{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:baseline} + `)}}});var qc=String.raw`.caniuse-stats{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:baseline} button.caniuse-cell{margin:1px 1px 0 0;border:none} .caniuse-browser{position:relative} @media print{ @@ -926,18 +926,18 @@ li.caniuse-cell{margin-bottom:1px} .caniuse-cell:is(.n,.d){--caniuse-angle:45deg;--caniuse-bg:var(--no-support);--caniuse-bg-alt:var(--no-support-alt)} .caniuse-cell.d{--caniuse-angle:180deg} .caniuse-cell:is(.a,.x,.p){--caniuse-angle:90deg;--caniuse-bg:var(--partial);--caniuse-bg-alt:var(--partial-alt)} -.caniuse-stats .caniuse-browser:hover>ul,.caniuse-stats button:focus+ul{display:block}`;const Ic="core/caniuse",Dc=new Set(["and_chr","and_ff","and_uc","android","bb","chrome","edge","firefox","ie","ios_saf","op_mini","op_mob","opera","safari","samsung"]);async function Nc(e,t){const{feature:n,versions:r,browsers:s}=t,i=new URLSearchParams;i.set("feature",n),i.set("versions",r),Array.isArray(s)&&i.set("browsers",s.join(",")),i.set("format","html");const o=`${e}?${i.toString()}`,a=await fetch(o);if(!a.ok){const{status:e,statusText:t}=a;throw new Error(`Failed to get caniuse data: (${e}) ${t}`)}return await a.text()}var Oc=Object.freeze({__proto__:null,name:Ic,prepare:function(e){if(!e.caniuse)return;const t=function(e){const t={versions:4,removeOnSave:!1};if("string"==typeof e.caniuse)return{feature:e.caniuse,...t};const n={...t,...e.caniuse},{browsers:r}=n;if(Array.isArray(r)){const e=r.filter(e=>!Dc.has(e));if(e.length){Bn(Yn`Invalid browser(s): (${Vn(e,{quotes:!0})}) in the \`browser\` property of ${"[caniuse]"}.`,Ic)}}return n}(e);if(e.caniuse=t,!t.feature)return;document.head.appendChild(on`<style +.caniuse-stats .caniuse-browser:hover>ul,.caniuse-stats button:focus+ul{display:block}`;const Fc="core/caniuse",Bc=new Set(["and_chr","and_ff","and_uc","android","bb","chrome","edge","firefox","ie","ios_saf","op_mini","op_mob","opera","safari","samsung"]);async function Hc(e,t){const{feature:n,versions:r,browsers:s}=t,i=new URLSearchParams;i.set("feature",n),i.set("versions",r),Array.isArray(s)&&i.set("browsers",s.join(",")),i.set("format","html");const o=`${e}?${i.toString()}`,a=await fetch(o);if(!a.ok){const{status:e,statusText:t}=a;throw new Error(`Failed to get caniuse data: (${e}) ${t}`)}return await a.text()}var Gc=Object.freeze({__proto__:null,name:Fc,prepare:function(e){if(!e.caniuse)return;const t=function(e){const t={versions:4,removeOnSave:!1};if("string"==typeof e.caniuse)return{feature:e.caniuse,...t};const n={...t,...e.caniuse},{browsers:r}=n;if(Array.isArray(r)){const e=r.filter(e=>!Bc.has(e));if(e.length){er(ir`Invalid browser(s): (${rr(e,{quotes:!0})}) in the \`browser\` property of ${"[caniuse]"}.`,Fc)}}return n}(e);if(e.caniuse=t,!t.feature)return;document.head.appendChild(gn`<style id="caniuse-stylesheet" class="${t.removeOnSave?"removeOnSave":""}" > - ${Pc} - </style>`);const n=t.apiURL||"https://respec.org/caniuse/";e.state[Ic]={fetchPromise:Nc(n,t)}},run:async function(e){const t=e.caniuse;if(!t?.feature)return;const n=new URL(t.feature,"https://caniuse.com/").href,r=document.querySelector(".head dl"),s=(async()=>{try{const t=await e.state[Ic].fetchPromise;return on`${{html:t}}`}catch(e){const r=Yn`Please check the feature key on [caniuse.com](https://caniuse.com) and update ${"[caniuse]"}`;return Fn(`Couldn't find feature "${t.feature}" on caniuse.com.`,Ic,{hint:r}),console.error(e),on`<a href="${n}">caniuse.com</a>`}})(),i=on`<dt class="caniuse-title"> + ${qc} + </style>`);const n=t.apiURL||"https://respec.org/caniuse/";e.state[Fc]={fetchPromise:Hc(n,t)}},run:async function(e){const t=e.caniuse;if(!t?.feature)return;const n=new URL(t.feature,"https://caniuse.com/").href,r=document.querySelector(".head dl"),s=(async()=>{try{const t=await e.state[Fc].fetchPromise;return gn`${{html:t}}`}catch(e){const r=ir`Please check the feature key on [caniuse.com](https://caniuse.com) and update ${"[caniuse]"}`;return Xn(`Couldn't find feature "${t.feature}" on caniuse.com.`,Fc,{hint:r}),console.error(e),gn`<a href="${n}">caniuse.com</a>`}})(),i=gn`<dt class="caniuse-title"> Browser support (caniuse.com): </dt> <dd class="caniuse-stats"> ${{any:s,placeholder:"Fetching data from caniuse.com..."}} - </dd>`;r.append(...i.childNodes),await s,Qn("amend-user-config",{caniuse:t.feature}),t.removeOnSave&&(r.querySelectorAll(".caniuse-browser").forEach(e=>e.classList.add("removeOnSave")),Xn("beforesave",e=>{on.bind(e.querySelector(".caniuse-stats"))` - <a href="${n}">caniuse.com</a>`}))}});var jc=String.raw`.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3em} + </dd>`;r.append(...i.childNodes),await s,cr("amend-user-config",{caniuse:t.feature}),t.removeOnSave&&(r.querySelectorAll(".caniuse-browser").forEach(e=>e.classList.add("removeOnSave")),lr("beforesave",e=>{gn.bind(e.querySelector(".caniuse-stats"))` + <a href="${n}">caniuse.com</a>`}))}});var Vc=String.raw`.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3em} .mdn details{width:100%;margin:1px 0;position:relative;z-index:10;box-sizing:border-box;padding:.4em;padding-top:0} .mdn details[open]{min-width:25ch;max-width:32ch;background:#fff;box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);border-radius:2px;z-index:11;margin-bottom:.4em} .mdn summary{text-align:right;cursor:default;margin-right:-.4em} @@ -961,33 +961,33 @@ li.caniuse-cell{margin-bottom:1px} .mdn .safari::before{background-image:url(https://resources.whatwg.org/browser-logos/safari.png)} .mdn .safari_ios::before{background-image:url(https://resources.whatwg.org/browser-logos/safari-ios.svg)} .mdn .samsunginternet_android::before{background-image:url(https://resources.whatwg.org/browser-logos/samsung.svg)} -.mdn .webview_android::before{background-image:url(https://resources.whatwg.org/browser-logos/android-webview.png)}`;const zc="core/mdn-annotation",Mc="https://w3c.github.io/mdn-spec-links/",Uc={chrome:"Chrome",chrome_android:"Chrome Android",edge:"Edge",edge_mobile:"Edge Mobile",firefox:"Firefox",firefox_android:"Firefox Android",ie:"Internet Explorer",opera:"Opera",opera_android:"Opera Android",safari:"Safari",safari_ios:"Safari iOS",samsunginternet_android:"Samsung Internet",webview_android:"WebView Android"},Wc=$n({en:{inAllEngines:"This feature is in all major engines.",inSomeEngines:"This feature has limited support."},zh:{inAllEngines:"所有主要引擎均支持此特性。",inSomeEngines:"此功能支持有限。"}});function qc(e){const t=e.closest("section");if(!t)return;const{previousElementSibling:n}=t;if(n&&n.classList.contains("mdn"))return n;const r=on`<aside class="mdn"></aside>`;return t.before(r),r}function Fc(e){const{name:t,slug:n,summary:r,support:s,engines:i}=e,o=n.slice(n.indexOf("/")+1),a="https://developer.mozilla.org/en-US/docs/Web/"+n,c="Expand MDN details for "+t,l=function(e){if(3===e.length)return on`<span title="${Wc.inAllEngines}">✅</span>`;if(e.length<2)return on`<span title="${Wc.inSomeEngines}">🚫</span>`;return on`<span> </span>`}(i);return on`<details> +.mdn .webview_android::before{background-image:url(https://resources.whatwg.org/browser-logos/android-webview.png)}`;const Zc="core/mdn-annotation",Yc="https://w3c.github.io/mdn-spec-links/",Jc={chrome:"Chrome",chrome_android:"Chrome Android",edge:"Edge",edge_mobile:"Edge Mobile",firefox:"Firefox",firefox_android:"Firefox Android",ie:"Internet Explorer",opera:"Opera",opera_android:"Opera Android",safari:"Safari",safari_ios:"Safari iOS",samsunginternet_android:"Samsung Internet",webview_android:"WebView Android"},Kc=Pn({en:{inAllEngines:"This feature is in all major engines.",inSomeEngines:"This feature has limited support."},zh:{inAllEngines:"所有主要引擎均支持此特性。",inSomeEngines:"此功能支持有限。"}});function Qc(e){const t=e.closest("section");if(!t)return;const{previousElementSibling:n}=t;if(n&&n.classList.contains("mdn"))return n;const r=gn`<aside class="mdn"></aside>`;return t.before(r),r}function Xc(e){const{name:t,slug:n,summary:r,support:s,engines:i}=e,o=n.slice(n.indexOf("/")+1),a="https://developer.mozilla.org/en-US/docs/Web/"+n,c="Expand MDN details for "+t,l=function(e){if(3===e.length)return gn`<span title="${Kc.inAllEngines}">✅</span>`;if(e.length<2)return gn`<span title="${Kc.inSomeEngines}">🚫</span>`;return gn`<span> </span>`}(i);return gn`<details> <summary aria-label="${c}"><span>MDN</span>${l}</summary> <a title="${r}" href="${a}">${o}</a> - ${function(e){if(3===e.length)return on`<p class="engines-all">${Wc.inAllEngines}</p>`;if(e.length<2)return on`<p class="engines-some">${Wc.inSomeEngines}</p>`}(i)} - ${s?function(e){function t(e,t,n){const r="Unknown"===t?"?":t,s=`${e} ${t.toLowerCase()}`;return on`<tr class="${s}"> - <td>${Uc[e]}</td> + ${function(e){if(3===e.length)return gn`<p class="engines-all">${Kc.inAllEngines}</p>`;if(e.length<2)return gn`<p class="engines-some">${Kc.inSomeEngines}</p>`}(i)} + ${s?function(e){function t(e,t,n){const r="Unknown"===t?"?":t,s=`${e} ${t.toLowerCase()}`;return gn`<tr class="${s}"> + <td>${Jc[e]}</td> <td>${n||r}</td> - </tr>`}function n(e,n){if(n.version_removed)return t(e,"No","");const r=n.version_added;return"boolean"==typeof r?t(e,r?"Yes":"No",""):r?t(e,"Yes",r+"+"):t(e,"Unknown","")}return on`<table> - ${Object.keys(Uc).map(r=>e[r]?n(r,e[r]):t(r,"Unknown",""))} - </table>`}(s):on`<p class="nosupportdata">No support data.</p>`} - </details>`}var Bc=Object.freeze({__proto__:null,name:zc,run:async function(e){const t=function(e){const{shortName:t,mdn:n}=e;if(!n)return;return"string"==typeof n?n:n.key||t}(e);if(!t)return;const n=await async function(e,t){const{baseJsonPath:n=Mc,maxAge:r=864e5}=t,s=new URL(e+".json",n).href,i=await Cn(s,r);if(404===i.status){return void Fn(`Could not find MDN data associated with key "${e}".`,zc,{hint:"Please add a valid key to `respecConfig.mdn`"})}return await i.json()}(t,e.mdn);if(!n)return;const r=document.createElement("style");r.textContent=jc,document.head.append(r);for(const e of function(e){return[...document.body.querySelectorAll("[id]:not(script)")].filter(({id:t})=>Array.isArray(e[t]))}(n)){const t=n[e.id],r=qc(e);if(r)for(const e of t)r.append(Fc(e))}}});const Hc="ui/save-html",Gc=$n({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),Vc=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return nr(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return nr(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}}];var Zc=Object.freeze({__proto__:null,name:Hc,run:function(e){const t={async show(t){await document.respec.ready;const n=on`<div class="respec-save-buttons"> - ${Vc.map(t=>function(e,t){const{id:n,href:r,ext:s,title:i,type:o}=e,a=xn(t.publishDate||new Date),c=[t.specStatus,t.shortName||"spec",a].join("-");return on`<a + </tr>`}function n(e,n){if(n.version_removed)return t(e,"No","");const r=n.version_added;return"boolean"==typeof r?t(e,r?"Yes":"No",""):r?t(e,"Yes",r+"+"):t(e,"Unknown","")}return gn`<table> + ${Object.keys(Jc).map(r=>e[r]?n(r,e[r]):t(r,"Unknown",""))} + </table>`}(s):gn`<p class="nosupportdata">No support data.</p>`} + </details>`}var el=Object.freeze({__proto__:null,name:Zc,run:async function(e){const t=function(e){const{shortName:t,mdn:n}=e;if(!n)return;return"string"==typeof n?n:n.key||t}(e);if(!t)return;const n=await async function(e,t){const{baseJsonPath:n=Yc,maxAge:r=864e5}=t,s=new URL(e+".json",n).href,i=await On(s,r);if(404===i.status){return void Xn(`Could not find MDN data associated with key "${e}".`,Zc,{hint:"Please add a valid key to `respecConfig.mdn`"})}return await i.json()}(t,e.mdn);if(!n)return;const r=document.createElement("style");r.textContent=Vc,document.head.append(r);for(const e of function(e){return[...document.body.querySelectorAll("[id]:not(script)")].filter(({id:t})=>Array.isArray(e[t]))}(n)){const t=n[e.id],r=Qc(e);if(r)for(const e of t)r.append(Xc(e))}}});const tl="ui/save-html",nl=Pn({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),rl=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return pr(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return pr(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}}];var sl=Object.freeze({__proto__:null,name:tl,run:function(e){const t={async show(t){await document.respec.ready;const n=gn`<div class="respec-save-buttons"> + ${rl.map(t=>function(e,t){const{id:n,href:r,ext:s,title:i,type:o}=e,a=In(t.publishDate||new Date),c=[t.specStatus,t.shortName||"spec",a].join("-");return gn`<a href="${r}" id="${n}" download="${c}.${s}" type="${o}" class="respec-save-button" - onclick=${()=>jr.closeModal()} + onclick=${()=>Vr.closeModal()} >${i}</a >`}(t,e))} - </div>`;jr.freshModal(Gc.save_snapshot,n,t)}},n="download"in HTMLAnchorElement.prototype;let r;n&&(r=jr.addCommand(Gc.save_snapshot,(function(){if(!n)return;t.show(r)}),"Ctrl+Shift+Alt+S","💾"))},exportDocument:function(e,t){return Bn("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",Hc,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),nr(t)}});const Yc="https://respec.org/specref/",Jc=$n({en:{search_specref:"Search Specref"},nl:{search_specref:"Doorzoek Specref"},ja:{search_specref:"仕様検索"},de:{search_specref:"Spezifikationen durchsuchen"},zh:{search_specref:"搜索 Specref"}}),Kc=jr.addCommand(Jc.search_specref,(function(){const e=on` - <iframe class="respec-iframe" src="${Yc}" onload=${e=>e.target.classList.add("ready")}></iframe> - <a href="${Yc}" target="_blank">Open Search UI in a new tab</a> - `;jr.freshModal(Jc.search_specref,e,Kc)}),"Ctrl+Shift+Alt+space","🔎");var Qc=Object.freeze({__proto__:null});const Xc="https://respec.org/xref/",el={en:{title:"Search definitions"},ja:{title:"定義検索"},de:{title:"Definitionen durchsuchen"},zh:{title:"搜索定义"}},tl=el[s in el?s:"en"],nl=jr.addCommand(tl.title,(function(){const e=on` - <iframe class="respec-iframe" src="${Xc}" onload="${e=>e.target.classList.add("ready")}"></iframe> - <a href="${Xc}" target="_blank">Open Search UI in a new tab</a> - `;jr.freshModal(tl.title,e,nl)}),"Ctrl+Shift+Alt+x","📚");var rl=Object.freeze({__proto__:null});const sl=$n({en:{about_respec:"About"},zh:{about_respec:"关于"},nl:{about_respec:"Over"},ja:{about_respec:"これについて"},de:{about_respec:"Über"}});window.respecVersion=window.respecVersion||"Developer Edition";const il=document.createElement("div"),ol=on.bind(il),al=jr.addCommand(`${sl.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(cl).forEach(t=>{e.push(t)});ol` + </div>`;Vr.freshModal(nl.save_snapshot,n,t)}},n="download"in HTMLAnchorElement.prototype;let r;n&&(r=Vr.addCommand(nl.save_snapshot,(function(){if(!n)return;t.show(r)}),"Ctrl+Shift+Alt+S","💾"))},exportDocument:function(e,t){return er("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",tl,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),pr(t)}});const il="https://respec.org/specref/",ol=Pn({en:{search_specref:"Search Specref"},nl:{search_specref:"Doorzoek Specref"},ja:{search_specref:"仕様検索"},de:{search_specref:"Spezifikationen durchsuchen"},zh:{search_specref:"搜索 Specref"}}),al=Vr.addCommand(ol.search_specref,(function(){const e=gn` + <iframe class="respec-iframe" src="${il}" onload=${e=>e.target.classList.add("ready")}></iframe> + <a href="${il}" target="_blank">Open Search UI in a new tab</a> + `;Vr.freshModal(ol.search_specref,e,al)}),"Ctrl+Shift+Alt+space","🔎");var cl=Object.freeze({__proto__:null});const ll="https://respec.org/xref/",ul={en:{title:"Search definitions"},ja:{title:"定義検索"},de:{title:"Definitionen durchsuchen"},zh:{title:"搜索定义"}},dl=ul[s in ul?s:"en"],pl=Vr.addCommand(dl.title,(function(){const e=gn` + <iframe class="respec-iframe" src="${ll}" onload="${e=>e.target.classList.add("ready")}"></iframe> + <a href="${ll}" target="_blank">Open Search UI in a new tab</a> + `;Vr.freshModal(dl.title,e,pl)}),"Ctrl+Shift+Alt+x","📚");var fl=Object.freeze({__proto__:null});const hl=Pn({en:{about_respec:"About"},zh:{about_respec:"关于"},nl:{about_respec:"Over"},ja:{about_respec:"これについて"},de:{about_respec:"Über"}});window.respecVersion=window.respecVersion||"Developer Edition";const ml=document.createElement("div"),gl=gn.bind(ml),bl=Vr.addCommand(`${hl.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(yl).forEach(t=>{e.push(t)});gl` <p> ReSpec is a document production toolchain, with a notable focus on W3C specifications. </p> @@ -1011,12 +1011,12 @@ li.caniuse-cell{margin-bottom:1px} </thead> <tbody>${e}</tbody> </table> -`,jr.freshModal(`${sl.about_respec} - ${window.respecVersion}`,il,al)}),"Ctrl+Shift+Alt+A","ℹ️");function cl({name:e,duration:t}){return on` +`,Vr.freshModal(`${hl.about_respec} - ${window.respecVersion}`,ml,bl)}),"Ctrl+Shift+Alt+A","ℹ️");function yl({name:e,duration:t}){return gn` <tr> <td><a href="${`https://github.com/w3c/respec/blob/develop/src/${e}.js`}">${e}</a></td> <td>${t}</td> </tr> - `}var ll=Object.freeze({__proto__:null});var ul=Object.freeze({__proto__:null,name:"core/seo",run:function(){const e=document.querySelector("#abstract p:first-of-type");if(!e)return;const t=e.textContent.replace(/\s+/," ").trim(),n=document.createElement("meta");n.name="description",n.content=t,document.head.appendChild(n)}});const dl="w3c/seo";function pl({name:e,url:t,mailto:n,company:r,companyURL:s}){const i={type:"Person",name:e,url:t,"foaf:mbox":n};return(r||s)&&(i.worksFor={name:r,url:s}),i}function fl(e){const{href:t,title:n,href:r}=e,s={id:t,type:"TechArticle",name:n,url:r};return e.authors&&(s.creator=e.authors.map(e=>({name:e}))),e.rawDate&&(s.publishedDate=e.rawDate),e.isbn&&(s.identifier=e.isbn),e.publisher&&(s.publisher={name:e.publisher}),s}var hl=Object.freeze({__proto__:null,name:dl,run:async function(e){if(!e.canonicalURI)switch(e.specStatus){case"CG-DRAFT":case"BG-DRAFT":case"unofficial":return}const t=e.shortName?`https://www.w3.org/TR/${e.shortName}/`:null;switch(e.canonicalURI){case"edDraft":if(e.edDraftURI)e.canonicalURI=new URL(e.edDraftURI,document.location.href).href;else{Bn("Canonical URI set to edDraft, but no edDraftURI is set in configuration",dl),e.canonicalURI=null}break;case"TR":if(t)e.canonicalURI=t;else{Bn("Canonical URI set to TR, but no shortName is set in configuration",dl),e.canonicalURI=null}break;default:if(e.canonicalURI)try{e.canonicalURI=new URL(e.canonicalURI,document.location.href).href}catch(t){Bn("CanonicalURI is an invalid URL: "+t.message,dl),e.canonicalURI=null}else t&&(e.canonicalURI=t)}if(e.canonicalURI){const t=document.createElement("link");t.setAttribute("rel","canonical"),t.setAttribute("href",e.canonicalURI),document.head.appendChild(t)}e.doJsonLd&&await async function(e,t){const n=["TechArticle"];e.rdfStatus&&n.push(e.rdfStatus);const r={"@context":["http://schema.org",{"@vocab":"http://schema.org/","@language":t.documentElement.lang||"en",w3p:"http://www.w3.org/2001/02pd/rec54#",foaf:"http://xmlns.com/foaf/0.1/",datePublished:{"@type":"http://www.w3.org/2001/XMLSchema#date"},inLanguage:{"@language":null},isBasedOn:{"@type":"@id"},license:{"@type":"@id"}}],id:e.canonicalURI||e.thisVersion,type:n,name:document.title,inLanguage:t.documentElement.lang||"en",license:e.licenseInfo?.url,datePublished:e.dashDate,copyrightHolder:{name:"World Wide Web Consortium",url:"https://www.w3.org/"},discussionUrl:e.issueBase,alternativeHeadline:e.subtitle,isBasedOn:e.prevVersion};if(e.additionalCopyrightHolders){const t=Array.isArray(e.additionalCopyrightHolders)?e.additionalCopyrightHolders:[e.additionalCopyrightHolders];r.copyrightHolder=[r.copyrightHolder,...t.map(e=>({name:e}))]}const s=t.head.querySelector("meta[name=description]");s&&(r.description=s.content);e.editors&&(r.editor=e.editors.map(pl));e.authors&&(r.contributor=e.authors.map(pl));const i=[...e.normativeReferences,...e.informativeReferences],o=await Promise.all(i.map(e=>Fi(e)));r.citation=o.filter(e=>"object"==typeof e).map(fl);const a=t.createElement("script");a.type="application/ld+json",a.textContent=JSON.stringify(r,null,2),t.head.appendChild(a)}(e,document)}});var ml=String.raw`.hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;background:#fafafa} + `}var wl=Object.freeze({__proto__:null});var vl=Object.freeze({__proto__:null,name:"core/seo",run:function(){const e=document.querySelector("#abstract p:first-of-type");if(!e)return;const t=e.textContent.replace(/\s+/," ").trim(),n=document.createElement("meta");n.name="description",n.content=t,document.head.appendChild(n)}});const kl="w3c/seo";function $l({name:e,url:t,mailto:n,company:r,companyURL:s}){const i={type:"Person",name:e,url:t,"foaf:mbox":n};return(r||s)&&(i.worksFor={name:r,url:s}),i}function xl(e){const{href:t,title:n,href:r}=e,s={id:t,type:"TechArticle",name:n,url:r};return e.authors&&(s.creator=e.authors.map(e=>({name:e}))),e.rawDate&&(s.publishedDate=e.rawDate),e.isbn&&(s.identifier=e.isbn),e.publisher&&(s.publisher={name:e.publisher}),s}var _l=Object.freeze({__proto__:null,name:kl,run:async function(e){if(!e.canonicalURI)switch(e.specStatus){case"CG-DRAFT":case"BG-DRAFT":case"unofficial":return}const t=e.shortName?`https://www.w3.org/TR/${e.shortName}/`:null;switch(e.canonicalURI){case"edDraft":if(e.edDraftURI)e.canonicalURI=new URL(e.edDraftURI,document.location.href).href;else{er("Canonical URI set to edDraft, but no edDraftURI is set in configuration",kl),e.canonicalURI=null}break;case"TR":if(t)e.canonicalURI=t;else{er("Canonical URI set to TR, but no shortName is set in configuration",kl),e.canonicalURI=null}break;default:if(e.canonicalURI)try{e.canonicalURI=new URL(e.canonicalURI,document.location.href).href}catch(t){er("CanonicalURI is an invalid URL: "+t.message,kl),e.canonicalURI=null}else t&&(e.canonicalURI=t)}if(e.canonicalURI){const t=document.createElement("link");t.setAttribute("rel","canonical"),t.setAttribute("href",e.canonicalURI),document.head.appendChild(t)}e.doJsonLd&&await async function(e,t){const n=["TechArticle"];e.rdfStatus&&n.push(e.rdfStatus);const r={"@context":["http://schema.org",{"@vocab":"http://schema.org/","@language":t.documentElement.lang||"en",w3p:"http://www.w3.org/2001/02pd/rec54#",foaf:"http://xmlns.com/foaf/0.1/",datePublished:{"@type":"http://www.w3.org/2001/XMLSchema#date"},inLanguage:{"@language":null},isBasedOn:{"@type":"@id"},license:{"@type":"@id"}}],id:e.canonicalURI||e.thisVersion,type:n,name:document.title,inLanguage:t.documentElement.lang||"en",license:e.licenseInfo?.url,datePublished:e.dashDate,copyrightHolder:{name:"World Wide Web Consortium",url:"https://www.w3.org/"},discussionUrl:e.issueBase,alternativeHeadline:e.subtitle,isBasedOn:e.prevVersion};if(e.additionalCopyrightHolders){const t=Array.isArray(e.additionalCopyrightHolders)?e.additionalCopyrightHolders:[e.additionalCopyrightHolders];r.copyrightHolder=[r.copyrightHolder,...t.map(e=>({name:e}))]}const s=t.head.querySelector("meta[name=description]");s&&(r.description=s.content);e.editors&&(r.editor=e.editors.map($l));e.authors&&(r.contributor=e.authors.map($l));const i=[...e.normativeReferences,...e.informativeReferences],o=await Promise.all(i.map(e=>Xi(e)));r.citation=o.filter(e=>"object"==typeof e).map(xl);const a=t.createElement("script");a.type="application/ld+json",a.textContent=JSON.stringify(r,null,2),t.head.appendChild(a)}(e,document)}});var Sl=String.raw`.hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;background:#fafafa} .hljs-comment,.hljs-quote{color:#717277;font-style:italic} .hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4} .hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#ca4706;font-weight:700} @@ -1027,21 +1027,21 @@ li.caniuse-cell{margin-bottom:1px} .hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#336ae3} .hljs-emphasis{font-style:italic} .hljs-strong{font-weight:700} -.hljs-link{text-decoration:underline}`;async function gl(e){const t=await fetch(new URL("../../"+e,document.currentScript&&document.currentScript.src||new URL("respec-w3c.js",document.baseURI).href));return await t.text()}const bl=fn({hint:"preload",href:"https://www.w3.org/Tools/respec/respec-highlight",as:"script"});document.head.appendChild(bl);const yl=async function(){const e=await async function(){try{return(await Promise.resolve().then((function(){return Yu}))).default}catch{return gl("worker/respec-worker.js")}}(),t=URL.createObjectURL(new Blob([e],{type:"application/javascript"}));return new Worker(t)}();t("core/worker",yl.then(e=>({worker:e})));const wl=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight");async function vl(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:wl(),languages:t},r=await yl;return r.postMessage(n),new Promise((e,t)=>{const s=setTimeout(()=>{t(new Error("Timed out waiting for highlight."))},4e3);r.addEventListener("message",(function t(i){const{data:{id:o,language:a,value:c}}=i;o===n.id&&(r.removeEventListener("message",t),clearTimeout(s),e({language:a,value:c}))}))})}(e.innerText,t)}catch(e){return void console.error(e)}const{language:s,value:i}=r;switch(e.localName){case"pre":e.classList.remove(s),e.innerHTML=`<code class="hljs${s?" "+s:""}">${i}</code>`,e.classList.length||e.removeAttribute("class");break;case"code":e.innerHTML=i,e.classList.add("hljs"),s&&e.classList.add(s)}e.setAttribute("aria-busy","false")}var kl=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(vl);document.head.appendChild(on`<style> - ${ml} - </style>`),await Promise.all(n)}});const $l=$n({en:{missing_test_suite_uri:Yn`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:Yn`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:Yn`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:Yn`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),xl="core/data-tests";function _l(e){const t=[],[n]=new URL(e).pathname.split("/").reverse(),r=n.split(".");let[s]=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"),s=s.replace(".https",""),t.push(e)}if(s.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"),s=s.replace("-manual",""),t.push(e)}return on` +.hljs-link{text-decoration:underline}`;async function Cl(e){const t=await fetch(new URL("../../"+e,document.currentScript&&document.currentScript.src||new URL("respec-w3c.js",document.baseURI).href));return await t.text()}const El=xn({hint:"preload",href:"https://www.w3.org/Tools/respec/respec-highlight",as:"script"});document.head.appendChild(El);const Rl=async function(){const e=await async function(){try{return(await Promise.resolve().then((function(){return id}))).default}catch{return Cl("worker/respec-worker.js")}}(),t=URL.createObjectURL(new Blob([e],{type:"application/javascript"}));return new Worker(t)}();t("core/worker",Rl.then(e=>({worker:e})));const Tl=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight");async function Al(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:Tl(),languages:t},r=await Rl;return r.postMessage(n),new Promise((e,t)=>{const s=setTimeout(()=>{t(new Error("Timed out waiting for highlight."))},4e3);r.addEventListener("message",(function t(i){const{data:{id:o,language:a,value:c}}=i;o===n.id&&(r.removeEventListener("message",t),clearTimeout(s),e({language:a,value:c}))}))})}(e.innerText,t)}catch(e){return void console.error(e)}const{language:s,value:i}=r;switch(e.localName){case"pre":e.classList.remove(s),e.innerHTML=`<code class="hljs${s?" "+s:""}">${i}</code>`,e.classList.length||e.removeAttribute("class");break;case"code":e.innerHTML=i,e.classList.add("hljs"),s&&e.classList.add(s)}e.setAttribute("aria-busy","false")}var Ll=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(Al);document.head.appendChild(gn`<style> + ${Sl} + </style>`),await Promise.all(n)}});const Pl=Pn({en:{missing_test_suite_uri:ir`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:ir`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:ir`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:ir`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),Il="core/data-tests";function Dl(e){const t=[],[n]=new URL(e).pathname.split("/").reverse(),r=n.split(".");let[s]=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"),s=s.replace(".https",""),t.push(e)}if(s.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"),s=s.replace("-manual",""),t.push(e)}return gn` <li> <a href="${e}">${s}</a> ${t} </li> - `}function Sl(e,t,n){return e.map(e=>{try{return new URL(e,t).href}catch{Bn(Yn`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,xl,{elements:[n]})}}).filter(e=>e)}function Cl(e,t){const n=e.filter((e,t,n)=>n.indexOf(e)!==t);if(n.length){const e=Yn`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=Yn`To fix, remove duplicates from ${"[data-tests]"}: ${Vn(n,{quotes:!0})}.`;Bn(e,xl,{hint:r,elements:[t]})}}function El(e){const t=[...new Set(e)];return on` + `}function Nl(e,t,n){return e.map(e=>{try{return new URL(e,t).href}catch{er(ir`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,Il,{elements:[n]})}}).filter(e=>e)}function Ol(e,t){const n=e.filter((e,t,n)=>n.indexOf(e)!==t);if(n.length){const e=ir`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=ir`To fix, remove duplicates from ${"[data-tests]"}: ${rr(n,{quotes:!0})}.`;er(e,Il,{hint:r,elements:[t]})}}function jl(e){const t=[...new Set(e)];return gn` <details class="respec-tests-details removeOnSave"> <summary>tests: ${t.length}</summary> <ul> - ${t.map(_l)} + ${t.map(Dl)} </ul> </details> - `}var Rl=Object.freeze({__proto__:null,name:xl,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=Sl(n.dataset.tests.split(/,/gm).map(e=>e.trim()),e.testSuiteURI,n);Cl(t,n);const r=El(t);n.append(r)}else Fn($l.missing_test_suite_uri,xl)}});const Tl="core/list-sorter";function Al(e){const t="ascending"===e?1:-1;return({textContent:e},{textContent:n})=>t*e.trim().localeCompare(n.trim())}function Ll(e,t){return[...e.querySelectorAll(":scope > li")].sort(Al(t)).reduce((e,t)=>(e.appendChild(t),e),document.createDocumentFragment())}function Pl(e,t){return[...e.querySelectorAll(":scope > dt")].sort(Al(t)).reduce((e,t)=>{const{nodeType:n,nodeName:r}=t,s=document.createDocumentFragment();let{nextSibling:i}=t;for(;i&&i.nextSibling;){s.appendChild(i.cloneNode(!0));const{nodeType:e,nodeName:t}=i.nextSibling;if(e===n&&t===r)break;i=i.nextSibling}return s.prepend(t.cloneNode(!0)),e.appendChild(s),e},document.createDocumentFragment())}var Il=Object.freeze({__proto__:null,name:Tl,sortListItems:Ll,sortDefinitionTerms:Pl,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=Pl(t,n);break;case"ol":case"ul":e=Ll(t,n);break;default:Bn(`ReSpec can't sort ${t.localName} elements.`,Tl,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}}});var Dl=String.raw`var:hover{text-decoration:underline;cursor:pointer} + `}var zl=Object.freeze({__proto__:null,name:Il,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=Nl(n.dataset.tests.split(/,/gm).map(e=>e.trim()),e.testSuiteURI,n);Ol(t,n);const r=jl(t);n.append(r)}else Xn(Pl.missing_test_suite_uri,Il)}});const Ml="core/list-sorter";function Ul(e){const t="ascending"===e?1:-1;return({textContent:e},{textContent:n})=>t*e.trim().localeCompare(n.trim())}function Wl(e,t){return[...e.querySelectorAll(":scope > li")].sort(Ul(t)).reduce((e,t)=>(e.appendChild(t),e),document.createDocumentFragment())}function ql(e,t){return[...e.querySelectorAll(":scope > dt")].sort(Ul(t)).reduce((e,t)=>{const{nodeType:n,nodeName:r}=t,s=document.createDocumentFragment();let{nextSibling:i}=t;for(;i&&i.nextSibling;){s.appendChild(i.cloneNode(!0));const{nodeType:e,nodeName:t}=i.nextSibling;if(e===n&&t===r)break;i=i.nextSibling}return s.prepend(t.cloneNode(!0)),e.appendChild(s),e},document.createDocumentFragment())}var Fl=Object.freeze({__proto__:null,name:Ml,sortListItems:Wl,sortDefinitionTerms:ql,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=ql(t,n);break;case"ol":case"ul":e=Wl(t,n);break;default:er(`ReSpec can't sort ${t.localName} elements.`,Ml,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}}});var Bl=String.raw`var:hover{text-decoration:underline;cursor:pointer} var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)} var.respec-hl-c1{--bg-color:#f4d200} var.respec-hl-c2{--bg-color:#ff87a2} @@ -1052,7 +1052,7 @@ var.respec-hl-c6{--bg-color:#82ddff} var.respec-hl-c7{--bg-color:#ffbcf2} @media print{ var.respec-hl{background:0 0;color:#000;box-shadow:unset} -}`;function Nl(e){e.stopPropagation();const{target:t}=e,n=function(e){const t=kn(e.textContent),n=e.closest("section"),r=jl(e),s=[...n.querySelectorAll("var")].filter(e=>kn(e.textContent)===t&&e.closest("section")===n),i=s[0].classList.contains("respec-hl");if(Ol.set(r,i),i)return s.forEach(e=>zl(e,r)),[];s.forEach(e=>function(e,t){e.classList.add("respec-hl",t)}(e,r));return s}(t),r=()=>{const e=jl(t);n.forEach(t=>zl(t,e)),[...Ol.keys()].forEach(e=>Ol.set(e,!0))};n.length&&document.body.addEventListener("click",r,{once:!0})}const Ol=new Map([["respec-hl-c1",!0],["respec-hl-c2",!0],["respec-hl-c3",!0],["respec-hl-c4",!0],["respec-hl-c5",!0],["respec-hl-c6",!0],["respec-hl-c7",!0]]);function jl(e){const{value:t}=e.classList,n=/respec-hl-\w+/,r=n.test(t)&&t.match(n);return r?r[0]:!0===Ol.get("respec-hl-c1")?"respec-hl-c1":[...Ol.keys()].find(e=>Ol.get(e))||"respec-hl-c1"}function zl(e,t){e.classList.remove("respec-hl",t),e.classList.length||e.removeAttribute("class")}var Ml=Object.freeze({__proto__:null,name:"core/highlight-vars",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=Dl,t.classList.add("removeOnSave"),document.head.appendChild(t),document.querySelectorAll("var").forEach(e=>e.addEventListener("click",Nl)),Xn("beforesave",e=>{e.querySelectorAll("var.respec-hl").forEach(zl)})}});var Ul=String.raw`dfn{cursor:pointer} +}`;function Hl(e){e.stopPropagation();const{target:t}=e,n=function(e){const t=Ln(e.textContent),n=e.closest("section"),r=Vl(e),s=[...n.querySelectorAll("var")].filter(e=>Ln(e.textContent)===t&&e.closest("section")===n),i=s[0].classList.contains("respec-hl");if(Gl.set(r,i),i)return s.forEach(e=>Zl(e,r)),[];s.forEach(e=>function(e,t){e.classList.add("respec-hl",t)}(e,r));return s}(t),r=()=>{const e=Vl(t);n.forEach(t=>Zl(t,e)),[...Gl.keys()].forEach(e=>Gl.set(e,!0))};n.length&&document.body.addEventListener("click",r,{once:!0})}const Gl=new Map([["respec-hl-c1",!0],["respec-hl-c2",!0],["respec-hl-c3",!0],["respec-hl-c4",!0],["respec-hl-c5",!0],["respec-hl-c6",!0],["respec-hl-c7",!0]]);function Vl(e){const{value:t}=e.classList,n=/respec-hl-\w+/,r=n.test(t)&&t.match(n);return r?r[0]:!0===Gl.get("respec-hl-c1")?"respec-hl-c1":[...Gl.keys()].find(e=>Gl.get(e))||"respec-hl-c1"}function Zl(e,t){e.classList.remove("respec-hl",t),e.classList.length||e.removeAttribute("class")}var Yl=Object.freeze({__proto__:null,name:"core/highlight-vars",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=Bl,t.classList.add("removeOnSave"),document.head.appendChild(t),document.querySelectorAll("var").forEach(e=>e.addEventListener("click",Hl)),lr("beforesave",e=>{e.querySelectorAll("var.respec-hl").forEach(Zl)})}});var Jl=String.raw`dfn{cursor:pointer} .dfn-panel{position:absolute;z-index:35;min-width:300px;max-width:500px;padding:.5em .75em;margin-top:.6em;font:small Helvetica Neue,sans-serif,Droid Sans Fallback;background:#fff;color:#000;box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);border-radius:2px} .dfn-panel:not(.docked)>.caret{position:absolute;top:-9px} .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;top:0} @@ -1069,7 +1069,7 @@ var.respec-hl{background:0 0;color:#000;box-shadow:unset} .dfn-panel a[href]:hover{border-bottom-width:1px} .dfn-panel ul{padding:0} .dfn-panel li{margin-left:1em} -.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 Wl(e){const{id:t}=e,n=e.dataset.href||"#"+t,r=document.querySelectorAll(`a[href="${n}"]:not(.index-term)`),s="dfn-panel-for-"+e.id,i=e.getAttribute("aria-label")||kn(e.textContent);return on` +.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 Kl(e){const{id:t}=e,n=e.dataset.href||"#"+t,r=document.querySelectorAll(`a[href="${n}"]:not(.index-term)`),s="dfn-panel-for-"+e.id,i=e.getAttribute("aria-label")||Ln(e.textContent);return gn` <div class="dfn-panel" id="${s}" @@ -1086,11 +1086,11 @@ var.respec-hl{background:0 0;color:#000;box-shadow:unset} aria-label="Permalink for definition: ${i}. Activate to close this dialog." >Permalink</a > - ${function(e){return e.matches("dfn[data-export]")?on`<span + ${function(e){return e.matches("dfn[data-export]")?gn`<span class="marker dfn-exported" title="Definition can be referenced by other specifications" >exported</span - >`: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 on`<a + >`: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 gn`<a href="${e}" class="marker idl-block" title="Jump to IDL declaration" @@ -1098,27 +1098,27 @@ var.respec-hl{background:0 0;color:#000;box-shadow:unset} >`}}return null}(e,r)} </div> <p><b>Referenced in:</b></p> - ${function(e,t){if(!t.length)return on`<ul> + ${function(e,t){if(!t.length)return gn`<ul> <li>Not referenced in this document.</li> - </ul>`;const n=new Map;t.forEach((t,r)=>{const s=t.id||`ref-for-${e}-${r+1}`;t.id||(t.id=s);const i=function(e){const t=e.closest("section");if(!t)return null;const n=t.querySelector("h1, h2, h3, h4, h5, h6");return n?"§ "+kn(n.textContent):null}(t);(n.get(i)||n.set(i,[]).get(i)).push(s)});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}))),s=e=>on`<li> - ${r(e).map(e=>on`<a href="#${e.id}" title="${e.title}">${e.text}</a>${" "}`)} - </li>`;return on`<ul> + </ul>`;const n=new Map;t.forEach((t,r)=>{const s=t.id||`ref-for-${e}-${r+1}`;t.id||(t.id=s);const i=function(e){const t=e.closest("section");if(!t)return null;const n=t.querySelector("h1, h2, h3, h4, h5, h6");return n?"§ "+Ln(n.textContent):null}(t);(n.get(i)||n.set(i,[]).get(i)).push(s)});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}))),s=e=>gn`<li> + ${r(e).map(e=>gn`<a href="#${e.id}" title="${e.title}">${e.text}</a>${" "}`)} + </li>`;return gn`<ul> ${[...n].map(s)} </ul>`}(t,r)} </div> - `}var ql=Object.freeze({__proto__:null,name:"core/dfn-panel",run:async function(){document.head.insertBefore(on`<style> - ${Ul} - </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(Wl(n)),n.tabIndex=0,n.setAttribute("aria-haspopup","dialog");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 Ju}))).default}catch{return gl("./src/core/dfn-panel.runtime.js")}}(),document.body.append(n)}});var Fl=String.raw`var{position:relative;cursor:pointer} + `}var Ql=Object.freeze({__proto__:null,name:"core/dfn-panel",run:async function(){document.head.insertBefore(gn`<style> + ${Jl} + </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(Kl(n)),n.tabIndex=0,n.setAttribute("aria-haspopup","dialog");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 od}))).default}catch{return Cl("./src/core/dfn-panel.runtime.js")}}(),document.body.append(n)}});var Xl=String.raw`var{position:relative;cursor:pointer} var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none} var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#000} var[data-type]::after{content:attr(data-type);transform:translateX(-50%) translateY(-100%);background:#000;text-align:center;font-family:"Dank Mono","Fira Code",monospace;font-style:normal;padding:6px;border-radius:3px;color:#daca88;text-indent:0;font-weight:400} -var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var Bl=Object.freeze({__proto__:null,name:"core/data-type",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=Fl,document.head.appendChild(t);let n=null;const r=new Map,s=document.querySelectorAll("section var");for(const e of s){const t=e.closest("section");if(n!==t&&(n=t,r.clear()),e.dataset.type){r.set(e.textContent.trim(),e.dataset.type);continue}const s=r.get(e.textContent.trim());s&&(e.dataset.type=s)}}});var Hl=String.raw`.assert{background:#eee;border-left:.5em solid #aaa;padding:.3em}`;var Gl=Object.freeze({__proto__:null,name:"core/algorithms",run:function(){if(Array.from(document.querySelectorAll("ol.algorithm li")).filter(e=>e.textContent.trim().startsWith("Assert: ")).forEach(e=>e.classList.add("assert")),document.querySelector(".assert")){const e=document.createElement("style");e.textContent=Hl,document.head.appendChild(e)}}});const Vl="core/anchor-expander";function Zl(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void Fn(`Found matching element "${t}", but it has no title or marker.`,Vl,{title:"Missing title.",elements:[n]})}const s=zn(r);n.append(...s.childNodes),n.classList.add("box-ref")}function Yl(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void Fn(`Found matching figure "${t}", but figure is lacking a \`<figcaption>\`.`,Vl,{title:"Missing figcaption in referenced figure.",elements:[n]})}const s=[...zn(r).childNodes].filter(e=>!e.classList||!e.classList.contains("fig-title"));s.pop(),n.append(...s),n.classList.add("fig-ref");const i=r.querySelector(".fig-title");!n.hasAttribute("title")&&i&&(n.title=kn(i.textContent))}function Jl(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)Kl(r,n),Ql(r,n);else{n.textContent=n.getAttribute("href");Fn("Found matching section, but the section was lacking a heading element.",Vl,{title:`No matching id in document: "${t}".`,elements:[n]})}}function Kl(e,t){const n=e.querySelector(".self-link"),r=[...zn(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=Pn(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)})}function Ql(e,t){for(const n of["dir","lang"]){if(t.hasAttribute(n))continue;const r=e.closest(`[${n}]`);if(!r)continue;const s=t.closest(`[${n}]`);s&&s.getAttribute(n)===r.getAttribute(n)||t.setAttribute(n,r.getAttribute(n))}}var Xl=Object.freeze({__proto__:null,name:Vl,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":Kl(n,t);break;case"section":Jl(n,e,t);break;case"figure":Yl(n,e,t);break;case"aside":case"div":Zl(n,e,t);break;default:t.textContent=t.getAttribute("href");Fn("ReSpec doesn't support expanding this kind of reference.",Vl,{title:`Can't expand "#${e}".`,elements:[t]})}Ql(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");Fn(`Couldn't expand inline reference. The id "${e}" is not in the document.`,Vl,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});const eu="rs-changelog",tu=class extends HTMLElement{constructor(){super(),this.props={from:this.getAttribute("from"),to:this.getAttribute("to")||"HEAD",filter:"function"==typeof window[this.getAttribute("filter")]?window[this.getAttribute("filter")]:()=>!0}}connectedCallback(){const{from:e,to:t,filter:n}=this.props;on.bind(this)` +var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}`;var eu=Object.freeze({__proto__:null,name:"core/data-type",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=Xl,document.head.appendChild(t);let n=null;const r=new Map,s=document.querySelectorAll("section var");for(const e of s){const t=e.closest("section");if(n!==t&&(n=t,r.clear()),e.dataset.type){r.set(e.textContent.trim(),e.dataset.type);continue}const s=r.get(e.textContent.trim());s&&(e.dataset.type=s)}}});var tu=String.raw`.assert{background:#eee;border-left:.5em solid #aaa;padding:.3em}`;var nu=Object.freeze({__proto__:null,name:"core/algorithms",run:function(){if(Array.from(document.querySelectorAll("ol.algorithm li")).filter(e=>e.textContent.trim().startsWith("Assert: ")).forEach(e=>e.classList.add("assert")),document.querySelector(".assert")){const e=document.createElement("style");e.textContent=tu,document.head.appendChild(e)}}});const ru="core/anchor-expander";function su(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void Xn(`Found matching element "${t}", but it has no title or marker.`,ru,{title:"Missing title.",elements:[n]})}const s=Zn(r);n.append(...s.childNodes),n.classList.add("box-ref")}function iu(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void Xn(`Found matching figure "${t}", but figure is lacking a \`<figcaption>\`.`,ru,{title:"Missing figcaption in referenced figure.",elements:[n]})}const s=[...Zn(r).childNodes].filter(e=>!e.classList||!e.classList.contains("fig-title"));s.pop(),n.append(...s),n.classList.add("fig-ref");const i=r.querySelector(".fig-title");!n.hasAttribute("title")&&i&&(n.title=Ln(i.textContent))}function ou(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)au(r,n),cu(r,n);else{n.textContent=n.getAttribute("href");Xn("Found matching section, but the section was lacking a heading element.",ru,{title:`No matching id in document: "${t}".`,elements:[n]})}}function au(e,t){const n=e.querySelector(".self-link"),r=[...Zn(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=qn(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)})}function cu(e,t){for(const n of["dir","lang"]){if(t.hasAttribute(n))continue;const r=e.closest(`[${n}]`);if(!r)continue;const s=t.closest(`[${n}]`);s&&s.getAttribute(n)===r.getAttribute(n)||t.setAttribute(n,r.getAttribute(n))}}var lu=Object.freeze({__proto__:null,name:ru,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":au(n,t);break;case"section":ou(n,e,t);break;case"figure":iu(n,e,t);break;case"aside":case"div":su(n,e,t);break;default:t.textContent=t.getAttribute("href");Xn("ReSpec doesn't support expanding this kind of reference.",ru,{title:`Can't expand "#${e}".`,elements:[t]})}cu(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");Xn(`Couldn't expand inline reference. The id "${e}" is not in the document.`,ru,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});const uu="rs-changelog",du=class extends HTMLElement{constructor(){super(),this.props={from:this.getAttribute("from"),to:this.getAttribute("to")||"HEAD",filter:"function"==typeof window[this.getAttribute("filter")]?window[this.getAttribute("filter")]:()=>!0}}connectedCallback(){const{from:e,to:t,filter:n}=this.props;gn.bind(this)` <ul> - ${{any:nu(e,t,n).then(e=>async function(e){const{repoURL:t}=await Js;return e.map(e=>{const[n,r=null]=e.message.split(/\(#(\d+)\)/,2),s=`${t}commit/${e.hash}`,i=r&&on` (<a href="${r?`${t}pull/${r}`:null}">#${r}</a>)`;return on`<li><a href="${s}">${n.trim()}</a>${i}</li>`})}(e)).catch(e=>Fn(e.message,eu,{elements:[this]})).finally(()=>{this.dispatchEvent(new CustomEvent("done"))}),placeholder:"Loading list of commits..."}} + ${{any:pu(e,t,n).then(e=>async function(e){const{repoURL:t}=await oi;return e.map(e=>{const[n,r=null]=e.message.split(/\(#(\d+)\)/,2),s=`${t}commit/${e.hash}`,i=r&&gn` (<a href="${r?`${t}pull/${r}`:null}">#${r}</a>)`;return gn`<li><a href="${s}">${n.trim()}</a>${i}</li>`})}(e)).catch(e=>Xn(e.message,uu,{elements:[this]})).finally(()=>{this.dispatchEvent(new CustomEvent("done"))}),placeholder:"Loading list of commits..."}} </ul> - `}};async function nu(e,t,n){let r;try{const s=await Js;if(!s)throw new Error("`respecConfig.github` is not set");const i=new URL("commits",`${s.apiBase}/${s.fullName}/`);i.searchParams.set("from",e),i.searchParams.set("to",t);const o=await fetch(i.href);if(!o.ok)throw new Error(`Request to ${i} failed with status code ${o.status}`);if(r=await o.json(),!r.length)throw new Error(`No commits between ${e}..${t}.`);r=r.filter(n)}catch(e){const t="Error loading commits from GitHub. "+e.message;throw console.error(e),new Error(t)}return r}const ru=[Object.freeze({__proto__:null,name:eu,element:tu})];var su=Object.freeze({__proto__:null,name:"core/custom-elements/index",run:async function(){ru.forEach(e=>{customElements.define(e.name,e.element)});const e=ru.map(e=>e.name).join(", "),t=[...document.querySelectorAll(e)].map(e=>new Promise(t=>e.addEventListener("done",t,{once:!0})));await Promise.all(t)}});var iu=Object.freeze({__proto__:null,name:"core/web-monetization",run:function(e){if(!1===e.monetization)return;const{monetization:t}=e,{removeOnSave:n,paymentPointer:r}=function(e){const t={paymentPointer:"$respec.org",removeOnSave:!0};switch(typeof e){case"string":t.paymentPointer=e;break;case"object":e.paymentPointer&&(t.paymentPointer=String(e.paymentPointer)),!1===e.removeOnSave&&(t.removeOnSave=!1)}return t}(t),s=n?"removeOnSave":null;document.head.append(on`<meta + `}};async function pu(e,t,n){let r;try{const s=await oi;if(!s)throw new Error("`respecConfig.github` is not set");const i=new URL("commits",`${s.apiBase}/${s.fullName}/`);i.searchParams.set("from",e),i.searchParams.set("to",t);const o=await fetch(i.href);if(!o.ok)throw new Error(`Request to ${i} failed with status code ${o.status}`);if(r=await o.json(),!r.length)throw new Error(`No commits between ${e}..${t}.`);r=r.filter(n)}catch(e){const t="Error loading commits from GitHub. "+e.message;throw console.error(e),new Error(t)}return r}const fu=[Object.freeze({__proto__:null,name:uu,element:du})];var hu=Object.freeze({__proto__:null,name:"core/custom-elements/index",run:async function(){fu.forEach(e=>{customElements.define(e.name,e.element)});const e=fu.map(e=>e.name).join(", "),t=[...document.querySelectorAll(e)].map(e=>new Promise(t=>e.addEventListener("done",t,{once:!0})));await Promise.all(t)}});var mu=Object.freeze({__proto__:null,name:"core/web-monetization",run:function(e){if(!1===e.monetization)return;const{monetization:t}=e,{removeOnSave:n,paymentPointer:r}=function(e){const t={paymentPointer:"$respec.org",removeOnSave:!0};switch(typeof e){case"string":t.paymentPointer=e;break;case"object":e.paymentPointer&&(t.paymentPointer=String(e.paymentPointer)),!1===e.removeOnSave&&(t.removeOnSave=!1)}return t}(t),s=n?"removeOnSave":null;document.head.append(gn`<meta name="monetization" content="${r}" class="${s}" - />`)}});const ou="check-charset",au="core/linter-rules/check-charset",cu=$n({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(如果尚未设置)。'}});var lu=Object.freeze({__proto__:null,name:au,run:function(e){if(!e.lint?.[ou])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||Bn(cu.msg,au,{hint:cu.hint,elements:[...t]})}});const uu="check-punctuation",du="core/linter-rules/check-punctuation",pu=[".",":","!","?"],fu=$n({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${pu.map(e=>`"${e}"`).join(", ")}.`}});var hu=Object.freeze({__proto__:null,name:du,run:function(e){if(!e.lint?.[uu])return;const t=new RegExp(`[${pu.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top)")].filter(e=>!t.test(e.textContent.trim()));n.length&&Bn(fu.msg,du,{hint:fu.hint,elements:n})}});const mu="check-internal-slots",gu="core/linter-rules/check-internal-slots",bu=$n({en:{msg:"Internal slots should be preceded by a '.'",hint:"Add a '.' between the elements mentioned."}});var yu=Object.freeze({__proto__:null,name:gu,run:function(e){if(!e.lint?.[mu])return;const t=[...document.querySelectorAll("var+a")].filter(({previousSibling:{nodeName:e}})=>e&&"VAR"===e);t.length&&Bn(bu.msg,gu,{hint:bu.hint,elements:t})}});const wu="local-refs-exist",vu="core/linter-rules/local-refs-exist",ku=$n({en:{msg:"Broken local reference found in document.",hint:"Please fix the links mentioned."}});function $u(e){const t=e.getAttribute("href").substring(1),n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var xu=Object.freeze({__proto__:null,name:vu,run:function(e){if(!e.lint?.[wu])return;const t=[...document.querySelectorAll("a[href^='#']")].filter($u);t.length&&Bn(ku.msg,vu,{hint:ku.hint,elements:t})}});const _u="no-headingless-sections",Su="core/linter-rules/no-headingless-sections",Cu=$n({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>`。"}}),Eu=({firstElementChild:e})=>null===e||!1===/^h[1-6]$/.test(e.localName);var Ru=Object.freeze({__proto__:null,name:Su,run:function(e){if(!e.lint?.[_u])return;const t=[...document.querySelectorAll("section")].filter(Eu);t.length&&Bn(Cu.msg,Su,{hint:Cu.hint,elements:t})}});const Tu="no-unused-vars",Au="core/linter-rules/no-unused-vars",Lu=$n({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the `<var>`."}});var Pu=Object.freeze({__proto__:null,name:Au,run:function(e){if(!e.lint?.[Tu])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 s=new Map;for(const e of r){const t=kn(e.textContent);(s.get(t)||s.set(t,[]).get(t)).push(e)}for(const e of s.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||t.push(e[0])}t.length&&Bn(Lu.msg,Au,{hint:Lu.hint,elements:t})}});const Iu="privsec-section",Du="core/linter-rules/privsec-section",Nu=$n({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/)."}});var Ou=Object.freeze({__proto__:null,name:Du,run:function(e){var t;e.lint?.[Iu]&&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}))&&Bn(Nu.msg,Du,{hint:Nu.hint})}});const ju="wpt-tests-exist",zu="core/linter-rules/wpt-tests-exist",Mu=$n({en:{msg:"The following test could not be found in Web Platform Tests:",hint:"Check [wpt.live](https://wpt.live) to see if it was deleted or renamed."}});var Uu=Object.freeze({__proto__:null,name:zu,run:async function(e){if(!e.lint?.[ju])return;const t=await async function(e,t){let n;try{const t=new URL(e);if(t.pathname.startsWith("/web-platform-tests/wpt/tree/master/")){const e=/web-platform-tests\/wpt\/tree\/master\/(.+)/;n=t.pathname.match(e)[1].replace(/\//g,"")}else n=t.pathname.replace(/\//g,"")}catch(e){return Bn("Failed to parse WPT directory from testSuiteURI","linter/"+zu),console.error(e),null}const r=new URL("web-platform-tests/wpt/files",t+"/");r.searchParams.set("path",n);const s=await fetch(r);if(!s.ok){return Bn(`Failed to fetch files from WPT repository. Request failed with error: ${await s.text()} (${s.status})`,"linter/"+zu),null}const{entries:i}=await s.json(),o=i.filter(e=>!e.endsWith("/"));return new Set(o)}(e.testSuiteURI,e.githubAPI);if(!t)return;const n=[...document.querySelectorAll("[data-tests]")].filter(e=>e.dataset.tests);for(const e of n)e.dataset.tests.split(/,/gm).map(e=>e.trim().split("#")[0]).filter(e=>e&&!t.has(e)).map(t=>{Bn(`${Mu.msg} \`${t}\`.`,zu,{hint:Mu.hint,elements:[e]})})}});const Wu="no-http-props",qu="core/linter-rules/no-http-props",Fu=$n({en:{msg:Yn`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:Yn`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"}});var Bu=Object.freeze({__proto__:null,name:qu,run:function(e){if(!e.lint?.[Wu])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=yn(t,e=>Yn`${`[${e}]`}`);Bn(Fu.msg,qu,{hint:Fu.hint+e})}}});const Hu="core/linter-rules/a11y",Gu=["color-contrast","landmark-one-main","landmark-unique","region"];function Vu(e){const t=[];for(const n of e.split("\n\n")){const[e,...r]=n.split(/^\s{2}/m),s=r.map(e=>"- "+e.trimEnd()).join("\n");t.push(`${e}${s}`)}return t.join("\n\n")}var Zu=Object.freeze({__proto__:null,name:Hu,run:async function(e){if(!e.lint?.a11y&&!e.a11y)return;const t=e.lint?.a11y||e.a11y,n=!0===t?{}:t,r=await async function(e){const{rules:t,...n}=e,r={rules:{...Object.fromEntries(Gu.map(e=>[e,{enabled:!1}])),...t},...n,elementRef:!0,resultTypes:["violations"],reporter:"v1"};let s;try{s=await function(){const e=document.createElement("script");return e.classList.add("remove"),e.src="https://unpkg.com/axe-core@3/axe.min.js",document.head.appendChild(e),new Promise((t,n)=>{e.onload=()=>t(window.axe),e.onerror=n})}()}catch(e){return Fn("Failed to load a11y linter.",Hu),console.error(e),[]}try{return(await s.run(document,r)).violations}catch(e){return Fn("Error while looking for a11y issues.",Hu),console.error(e),[]}}(n);for(const e of r){const t=new Map;for(const n of e.nodes){const{failureSummary:e,element:r}=n;(t.get(e)||t.set(e,[]).get(e)).push(r)}const{id:n,help:r,description:s,helpUrl:i}=e,o=`a11y/${n}: ${r}`;for(const[e,n]of t){const t=Vu(e);Bn(o,Hu,{details:`\n\n${s}.\n\n${t}. ([Learn more](${i}))`,elements:n})}}}}),Yu=Object.freeze({__proto__:null,default:'// ReSpec Worker v1.0.0\n"use strict";\ntry {\n importScripts("https://www.w3.org/Tools/respec/respec-highlight");\n} catch (err) {\n console.error("Network error loading highlighter", err);\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'}),Ju=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})()'})}(); + />`)}});const gu="check-charset",bu="core/linter-rules/check-charset",yu=Pn({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(如果尚未设置)。'}});var wu=Object.freeze({__proto__:null,name:bu,run:function(e){if(!e.lint?.[gu])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||er(yu.msg,bu,{hint:yu.hint,elements:[...t]})}});const vu="check-punctuation",ku="core/linter-rules/check-punctuation",$u=[".",":","!","?"],xu=Pn({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${$u.map(e=>`"${e}"`).join(", ")}.`}});var _u=Object.freeze({__proto__:null,name:ku,run:function(e){if(!e.lint?.[vu])return;const t=new RegExp(`[${$u.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top)")].filter(e=>!t.test(e.textContent.trim()));n.length&&er(xu.msg,ku,{hint:xu.hint,elements:n})}});const Su="check-internal-slots",Cu="core/linter-rules/check-internal-slots",Eu=Pn({en:{msg:"Internal slots should be preceded by a '.'",hint:"Add a '.' between the elements mentioned."}});var Ru=Object.freeze({__proto__:null,name:Cu,run:function(e){if(!e.lint?.[Su])return;const t=[...document.querySelectorAll("var+a")].filter(({previousSibling:{nodeName:e}})=>e&&"VAR"===e);t.length&&er(Eu.msg,Cu,{hint:Eu.hint,elements:t})}});const Tu="local-refs-exist",Au="core/linter-rules/local-refs-exist",Lu=Pn({en:{msg:"Broken local reference found in document.",hint:"Please fix the links mentioned."}});function Pu(e){const t=e.getAttribute("href").substring(1),n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var Iu=Object.freeze({__proto__:null,name:Au,run:function(e){if(!e.lint?.[Tu])return;const t=[...document.querySelectorAll("a[href^='#']")].filter(Pu);t.length&&er(Lu.msg,Au,{hint:Lu.hint,elements:t})}});const Du="no-headingless-sections",Nu="core/linter-rules/no-headingless-sections",Ou=Pn({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>`。"}}),ju=({firstElementChild:e})=>null===e||!1===/^h[1-6]$/.test(e.localName);var zu=Object.freeze({__proto__:null,name:Nu,run:function(e){if(!e.lint?.[Du])return;const t=[...document.querySelectorAll("section")].filter(ju);t.length&&er(Ou.msg,Nu,{hint:Ou.hint,elements:t})}});const Mu="no-unused-vars",Uu="core/linter-rules/no-unused-vars",Wu=Pn({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the `<var>`."}});var qu=Object.freeze({__proto__:null,name:Uu,run:function(e){if(!e.lint?.[Mu])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 s=new Map;for(const e of r){const t=Ln(e.textContent);(s.get(t)||s.set(t,[]).get(t)).push(e)}for(const e of s.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||t.push(e[0])}t.length&&er(Wu.msg,Uu,{hint:Wu.hint,elements:t})}});const Fu="privsec-section",Bu="core/linter-rules/privsec-section",Hu=Pn({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/)."}});var Gu=Object.freeze({__proto__:null,name:Bu,run:function(e){var t;e.lint?.[Fu]&&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}))&&er(Hu.msg,Bu,{hint:Hu.hint})}});const Vu="wpt-tests-exist",Zu="core/linter-rules/wpt-tests-exist",Yu=Pn({en:{msg:"The following test could not be found in Web Platform Tests:",hint:"Check [wpt.live](https://wpt.live) to see if it was deleted or renamed."}});var Ju=Object.freeze({__proto__:null,name:Zu,run:async function(e){if(!e.lint?.[Vu])return;const t=await async function(e,t){let n;try{const t=new URL(e);if(t.pathname.startsWith("/web-platform-tests/wpt/tree/master/")){const e=/web-platform-tests\/wpt\/tree\/master\/(.+)/;n=t.pathname.match(e)[1].replace(/\//g,"")}else n=t.pathname.replace(/\//g,"")}catch(e){return er("Failed to parse WPT directory from testSuiteURI","linter/"+Zu),console.error(e),null}const r=new URL("web-platform-tests/wpt/files",t+"/");r.searchParams.set("path",n);const s=await fetch(r);if(!s.ok){return er(`Failed to fetch files from WPT repository. Request failed with error: ${await s.text()} (${s.status})`,"linter/"+Zu),null}const{entries:i}=await s.json(),o=i.filter(e=>!e.endsWith("/"));return new Set(o)}(e.testSuiteURI,e.githubAPI);if(!t)return;const n=[...document.querySelectorAll("[data-tests]")].filter(e=>e.dataset.tests);for(const e of n)e.dataset.tests.split(/,/gm).map(e=>e.trim().split("#")[0]).filter(e=>e&&!t.has(e)).map(t=>{er(`${Yu.msg} \`${t}\`.`,Zu,{hint:Yu.hint,elements:[e]})})}});const Ku="no-http-props",Qu="core/linter-rules/no-http-props",Xu=Pn({en:{msg:ir`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:ir`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"}});var ed=Object.freeze({__proto__:null,name:Qu,run:function(e){if(!e.lint?.[Ku])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=Rn(t,e=>ir`${`[${e}]`}`);er(Xu.msg,Qu,{hint:Xu.hint+e})}}});const td="core/linter-rules/a11y",nd=["color-contrast","landmark-one-main","landmark-unique","region"];function rd(e){const t=[];for(const n of e.split("\n\n")){const[e,...r]=n.split(/^\s{2}/m),s=r.map(e=>"- "+e.trimEnd()).join("\n");t.push(`${e}${s}`)}return t.join("\n\n")}var sd=Object.freeze({__proto__:null,name:td,run:async function(e){if(!e.lint?.a11y&&!e.a11y)return;const t=e.lint?.a11y||e.a11y,n=!0===t?{}:t,r=await async function(e){const{rules:t,...n}=e,r={rules:{...Object.fromEntries(nd.map(e=>[e,{enabled:!1}])),...t},...n,elementRef:!0,resultTypes:["violations"],reporter:"v1"};let s;try{s=await function(){const e=document.createElement("script");return e.classList.add("remove"),e.src="https://unpkg.com/axe-core@3/axe.min.js",document.head.appendChild(e),new Promise((t,n)=>{e.onload=()=>t(window.axe),e.onerror=n})}()}catch(e){return Xn("Failed to load a11y linter.",td),console.error(e),[]}try{return(await s.run(document,r)).violations}catch(e){return Xn("Error while looking for a11y issues.",td),console.error(e),[]}}(n);for(const e of r){const t=new Map;for(const n of e.nodes){const{failureSummary:e,element:r}=n;(t.get(e)||t.set(e,[]).get(e)).push(r)}const{id:n,help:r,description:s,helpUrl:i}=e,o=`a11y/${n}: ${r}`;for(const[e,n]of t){const t=rd(e);er(o,td,{details:`\n\n${s}.\n\n${t}. ([Learn more](${i}))`,elements:n})}}}}),id=Object.freeze({__proto__:null,default:'// ReSpec Worker v1.0.0\n"use strict";\ntry {\n importScripts("https://www.w3.org/Tools/respec/respec-highlight");\n} catch (err) {\n console.error("Network error loading highlighter", err);\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'}),od=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})()'})}(); //# sourceMappingURL=respec-w3c.js.map