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

    ${e}

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

    An error occurred:

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

    ',G.content.childNodes[0].getAttribute(V)==Z)||(Z="_dt: "+Z.slice(1,-1)+";",J=!0)}catch(u){}var Q="\x3c!--"+Z+"--\x3e",X=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,se=" \\f\\n\\r\\t",oe="[^"+se+"\\/>\"'=]+",ie="["+se+"]+"+oe,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+oe.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+se+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+se+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+Q+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+Z+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+">"}var me=J?function(e,t){var n=t.join(" ");return t.slice.call(e,0).sort((function(e,t){return n.indexOf(e.name)<=n.indexOf(t.name)?-1:1}))}:function(e,t){return t.slice.call(e,0)};function ge(t,n,r,s){for(var o=t.childNodes,i=o.length,a=0;a{e.remove()}))}function Tn(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:s})=>"element"===n&&t?t(s,r++,e):s))}}const Ln=Tn("conjunction"),Pn=Tn("disjunction");function In(e,t){return Ln(e,t).join("")}function Dn(e,t){return Pn(e,t).join("")}function Nn(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/"/g,""").replace(/new Date)return o}catch(e){console.error("Failed to use Cache API.",e)}const i=await fetch(n);if(!i.ok&&o)return console.warn(`Returning a stale cached response for ${r}`),o;if(s&&i.ok){const e=i.clone(),r=new Headers(i.headers),o=new Date(Date.now()+t);r.set("Expires",o.toISOString());const a=new Response(await e.blob(),{headers:r});await s.put(n,a).catch(console.error)}return i}function Wn(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>bn`${e}, `));return bn`${r}${n[n.length-1]}`}function Fn(e,t){return[].concat(Ln(e,t)).map((e=>"string"==typeof e?bn`${e}`:e))}function Bn(e,t=""){const n=function(e){let t=0;for(const n of e)t=Math.imul(31,t)+n.charCodeAt(0)|0;return String(t)}(jn(e.textContent));return Hn(e,t,n)}function Hn(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let s=r?n:n.toLowerCase();if(s=s.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),s?!/\.$/.test(s)&&/^[a-z]/i.test(t||s)||(s=`x${s}`):s="generatedID",t&&(s=`${t}-${s}`),e.ownerDocument.getElementById(s)){let t=0,n=`${s}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${s}-${t}`;s=n}return e.id=s,s}function Gn(e){const t=new Set,n="ltNodefault"in e.dataset?"":jn(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>jn(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(jn(e))))}return[...t]}function Vn(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function Yn(e,t){const n=t.closest(Rn);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function Kn(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Zn(e){const t=[];for(const n of function*(e){let t=e;for(;t.previousElementSibling;)t=t.previousElementSibling,yield t}(e))"section"===n.localName&&t.push(n);return t}function Jn(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function Qn(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class Xn extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function er(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{Vn(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),tr(t),t}function tr(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...nr(t)])e.remove()}function*nr(e){for(;e.nextNode();)yield e.currentNode}class rr extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class sr extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||Hn(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:s,elements:o,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:s,elements:o,title:i,details:a,stack:n}}}function or(e,t,n={}){const r={...n,isWarning:!1};s("error",new sr(e,t,r))}function ir(e,t,n={}){const r={...n,isWarning:!0};s("warn",new sr(e,t,r))}function ar(e){return{showError:(t,n)=>or(t,e,n),showWarning:(t,n)=>ir(t,e,n)}}function cr(e){return e?`\`${e}\``:""}function lr(e,{quotes:t}={quotes:!1}){return Dn(e,t?e=>cr(dr(e)):cr)}function ur(e,{quotes:t}={quotes:!1}){return In(e,t?e=>cr(dr(e)):cr)}function dr(e){return String(e)?`"${e}"`:""}function pr(e,...t){return fr(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[s,o]=r.slice(1,-1).split("|");if(o){return`${e}[${s}](${new URL(o,"https://respec.org/docs/")})`}return`${e}[\`${s}\`](https://respec.org/docs/#${s})`})).join(""))}function fr(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const hr=new Map([["text/html","html"],["application/xml","xml"]]);function mr(e,t=document){const n=hr.get(e);if(!n){const t=[...hr.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=gr(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function gr(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;tr(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),An(r);const o=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&o.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=bn``);o.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=bn` `;o.appendChild(l),t.prepend(o),s("beforesave",r)}(n);let r="";if("xml"===e)r=(new XMLSerializer).serializeToString(n);else!function(e){e.querySelectorAll("style").forEach((e=>{e.innerHTML=`\n${e.innerHTML}\n`})),e.querySelectorAll("head > *").forEach((e=>{e.outerHTML=`\n${e.outerHTML}`}))}(n),n.doctype&&(r+=(new XMLSerializer).serializeToString(n.doctype)),r+=n.documentElement.outerHTML;return r}n("core/exporter",{rsDocToDataURL:mr});class br{constructor(){this._respecDonePromise=new Promise((e=>{o("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],o("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),o("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return gr("html",document)}}const yr="core/post-process";const wr="core/pre-process";const vr="core/base-runner";async function $r(e){!function(){const e=new br;Object.defineProperty(document,"respec",{value:e})}(),s("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),o("amend-user-config",n),o("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of i)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)}))}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter((([e,t])=>!!e&&!!t)).map((([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let s;try{s=JSON.parse(r)}catch{s=r}return[n,s]})),r=Object.fromEntries(n);Object.assign(e,r),s("amend-user-config",r)}(respecConfig),performance.mark(`${vr}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||or("Every item in `preProcess` must be a JS function.",wr),t})).map((async(t,n)=>{const r=ar(`${wr}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){or(`Function ${t.name} threw an error during \`preProcess\`.`,wr,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}}(respecConfig);const t=e.filter((e=>{return(t=e)&&(t.run||t.Plugin);var t}));t.forEach((e=>!e.name&&console.warn("Plugin lacks name:",e))),await async function(e,t){for(const n of e.filter((e=>e.prepare)))try{await n.prepare(t)}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise((async(r,s)=>{const o=setTimeout((()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),s(new Error(t))}),15e3);performance.mark(`${e}-start`);try{n.Plugin?(await new n.Plugin(t).run(),r()):n.run&&(await n.run(t),r())}catch(e){s(e)}finally{clearTimeout(o),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),s("plugins-done",respecConfig),await async function(e){if(Array.isArray(e.postProcess)){const t=e.postProcess.filter((e=>{const t="function"==typeof e;return t||or("Every item in `postProcess` must be a JS function.",yr),t})).map((async(t,n)=>{const r=ar(`${yr}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){or(`Function ${t.name} threw an error during \`postProcess\`.`,yr,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),s("end-all"),An(document),performance.mark(`${vr}-end`),performance.measure(vr,`${vr}-start`,`${vr}-end`)}var kr=String.raw`.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0} #respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000} #respec-pill,.respec-info-button{height:2.4em;background:#fff;background:var(--bg,#fff);color:#787878;color:var(--tocnav-normal-text,#787878);border:1px solid #ccc;box-shadow:1px 1px 8px 0 rgba(100,100,100,.5);box-shadow:1px 1px 8px 0 var(--tocsidebar-shadow,rgba(100,100,100,.5));padding:.2em 0} .respec-info-button{border:none;opacity:.75;border-radius:2em;margin-right:1em;min-width:3.5em;will-change:opacity} .respec-info-button:focus,.respec-info-button:hover{opacity:1;transition:opacity .2s} #respec-pill{width:4.8em} #respec-pill:not(:disabled){animation:respec-fadein .6s ease-in-out} @keyframes respec-fadein{ from{margin-top:-1.2em;border-radius:50%;border:.2em solid rgba(100,100,100,.5);box-shadow:none;height:4.8em} to{margin-top:0;border:1px solid #ccc;border-radius:0;box-shadow:1px 1px 8px 0 rgba(100,100,100,.5);height:2.4em} } #respec-pill:disabled{margin-top:-1.2em;position:relative;border:none;box-shadow:none;border-radius:50%;width:4.8em;height:4.8em;padding:0} #respec-pill:disabled::after{position:absolute;content:'';inset:-.2em;border-radius:50%;border:.2em solid rgba(100,100,100,.5);border-left:.2em solid transparent;animation:respec-spin .5s infinite linear} @media (prefers-reduced-motion){ #respec-pill:not(:disabled){animation:none} #respec-pill:disabled::after{animation:none;border-left:.2em solid rgba(100,100,100,.5)} } @keyframes respec-spin{ 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} } .respec-hidden{visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s linear} .respec-visible{visibility:visible;opacity:1;transition:opacity .2s linear} #respec-pill:focus,#respec-pill:hover{color:#000;background-color:#f5f5f5;transition:color .2s} #respec-menu{position:absolute;margin:0;padding:0;font-family:sans-serif;background:var(--bg,#fff);color:var(--text,#000);box-shadow:1px 1px 8px 0 rgba(100,100,100,.5);width:200px;display:none;text-align:left;margin-top:32px;font-size:.8em} #respec-menu:not([hidden]){display:block} #respec-menu li{list-style-type:none;margin:0;padding:0} .respec-save-buttons{display:grid;grid-template-columns:repeat(auto-fill,minmax(47%,2fr));grid-gap:.5cm;padding:.5cm} .respec-save-button:link{padding-top:16px;color:var(--def-text,#fff);background:var(--def-bg,#2a5aa8);justify-self:stretch;height:1cm;text-decoration:none;text-align:center;font-size:inherit;border:none;border-radius:.2cm} .respec-save-button:link:hover{color:var(--def-text,#fff);background:var(--defrow-border,#2a5aa8);padding:0;margin:0;border:0;padding-top:16px} .respec-save-button:link:focus{background:var(--tocnav-active-bg,#193766);color:var(--tocnav-active-text,#000)} #respec-pill:focus,#respec-ui button:focus,.respec-option:focus{outline:0;outline-style:none} #respec-pill-error{background-color:red;color:#fff} #respec-pill-warning{background-color:orange;color:#fff} .respec-error-list,.respec-warning-list{margin:0;padding:0;font-family:sans-serif;font-size:.85em} .respec-warning-list{background-color:#fffbe6} :is(.respec-warning-list,.respec-error-list)>li{list-style-type:none;margin:0;padding:.5em 0;padding-left:2em;padding-right:.5em} :is(.respec-warning-list,.respec-error-list)>li+li{margin-top:.5rem} :is(.respec-warning-list,.respec-error-list)>li:before{position:absolute;left:.4em} :is(.respec-warning-list,.respec-error-list) p{padding:0;margin:0} .respec-warning-list>li{color:#5c3b00;border-bottom:thin solid #fff5c2} .respec-error-list,.respec-error-list li{background-color:#fff0f0} .respec-warning-list>li::before{content:"⚠️"} .respec-error-list>li::before{content:"💥"} .respec-error-list>li{color:#5c3b00;border-bottom:thin solid #ffd7d7} :is(.respec-warning-list,.respec-error-list)>li li{list-style:disc} #respec-overlay{display:block;position:fixed;z-index:10000;top:0;left:0;height:100%;width:100%;background:#000} .respec-show-overlay{transition:opacity .2s linear;opacity:.5} .respec-hide-overlay{transition:opacity .2s linear;opacity:0} .respec-modal{display:block;position:fixed;z-index:11000;top:10%;background:var(--bg,#fff);color:var(--text,#000);border:5px solid #666;border-color:var(--tocsidebar-shadow,#666);min-width:20%;padding:0;max-height:80%;overflow-y:auto;margin:0 -.5cm;left:20%;max-width:75%;min-width:60%} .respec-modal h3{margin:0;padding:.2em;left:0!important;text-align:center;background:var(--tocsidebar-shadow,#ddd);color:var(--text,#000);font-size:1em} #respec-menu button.respec-option{background:var(--bg,#fff);color:var(--text,#000);border:none;width:100%;text-align:left;font-size:inherit;padding:1.2em 1.2em} #respec-menu button.respec-option:hover{background-color:var(--tocnav-hover-bg,#eee);color:var(--tocnav-hover-text,#000)} .respec-cmd-icon{padding-right:.5em} #respec-ui button.respec-option:first-child{margin-top:0} #respec-ui button.respec-option:last-child{border:none;border-radius:inherit;margin-bottom:0} .respec-button-copy-paste{position:absolute;height:28px;width:40px;cursor:pointer;background-image:linear-gradient(#fcfcfc,#eee);border:1px solid #90b8de;border-left:0;border-radius:0 0 3px 0;-webkit-user-select:none;user-select:none;-webkit-appearance:none;top:0;left:127px} @media print{ #respec-ui{display:none} } .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} p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em} .respec-plugin{text-align:right;color:rgb(120,120,120,.5);font-size:.6em}`;const xr=/>/gm,_r=/&/gm;class Cr extends wn.Renderer{code(e,t,n){const{language:r,...s}=Cr.parseInfoString(t);if(/(^webidl$)/i.test(r))return`
    ${e}
    `;const o=super.code(e,r,n).replace('class="language-','class="'),{example:i,illegalExample:a}=s;if(!i&&!a)return o;const c=i||a,l=`${r} ${i?"example":"illegal-example"}`;return o.replace("
    ",`
    `)}image(e,t,n){if(!t)return super.image(e,t,n);return String.raw`
          
    ${n}
    ${t}
    `}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){const r=/(.+)\s+{#([\w-]+)}$/;if(r.test(e)){const[,n,s]=e.match(r);return`${n}`}return super.heading(e,t,n)}}const Sr={gfm:!0,renderer:new Cr};function Rr(e,t={inline:!1}){const n=fr(e).replace(xr,">").replace(_r,"&");return t.inline?wn.parseInline(n,Sr):wn.parse(n,Sr)}function Er(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=Rr(e.innerHTML)}const Ar=(Tr="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(Tr);return t.forEach(Er),Array.from(t)});var Tr;var Lr=Object.freeze({__proto__:null,markdownToHtml:Rr,name:"core/markdown",run:function(e){const t=!!document.querySelector("[data-format=markdown]:not(body)"),n="markdown"===e.format;if(!n&&!t)return;if(!n)return void Ar(document.body);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=Qn(e);e.append(`\n\n${t}`)}}}(s,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),Er(s),function(e){Array.from(e).forEach((e=>{e.replaceWith(e.textContent)}))}(s.querySelectorAll(".nolinks a[href]")),s.append(r),document.body.replaceWith(s)}});function Pr(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=kr,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const Ir=bn``,Dr=bn``,Nr=bn``;let jr,Or;window.addEventListener("load",(()=>Fr(Dr)));const Mr=[],qr=[],zr={};o("start-all",(()=>document.body.prepend(Ir)),{once:!0}),o("end-all",(()=>document.body.prepend(Ir)),{once:!0});const Ur=bn``;function Wr(){Dr.classList.toggle("respec-hidden"),Dr.classList.toggle("respec-visible"),Dr.hidden=!Dr.hidden}function Fr(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()))}))}Ir.appendChild(Ur),Ur.addEventListener("click",(e=>{e.stopPropagation(),Ur.setAttribute("aria-expanded",String(Dr.hidden)),Wr(),Dr.querySelector("li:first-child button").focus()})),document.documentElement.addEventListener("click",(()=>{Dr.hidden||Wr()})),Ir.appendChild(Dr),Dr.addEventListener("keydown",(e=>{"Escape"!==e.key||Dr.hidden||(Ur.setAttribute("aria-expanded",String(Dr.hidden)),Wr(),Ur.focus())}));const Br=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function Hr(e,t,n,r){t.push(e),zr.hasOwnProperty(n)||(zr[n]=function(e,t,n){const r=`respec-pill-${e}`,s=bn``;s.addEventListener("click",(()=>{s.setAttribute("aria-expanded","true");const r=bn`
      `;for(const e of t){const t=document.createRange().createContextualFragment(Vr(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),r.appendChild(n)}Gr.freshModal(n,r,s)}));const o=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return Pr(s,o),s}(n,t,r),Ir.appendChild(zr[n]));const s=zr[n];s.textContent=t.length;const o=1===t.length?$n.singular(r):r;Pr(s,new Map([["label",`${t.length} ${o}`]]))}Pr(Ur,Br);const Gr={show(){try{Ir.hidden=!1}catch(e){console.error(e)}},hide(){Ir.hidden=!0},enable(){Ur.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const s=`respec-button-${e.toLowerCase().replace(/\s+/,"-")}`,o=bn``,i=bn`
    1. ${o}
    2. `;return i.addEventListener("click",t),Dr.appendChild(i),o},error(e){Hr(e,Mr,"error","ReSpec Errors")},warning(e){Hr(e,qr,"warning","ReSpec Warnings")},closeModal(e){Or&&(Or.classList.remove("respec-show-overlay"),Or.classList.add("respec-hide-overlay"),Or.addEventListener("transitionend",(()=>{Or.remove(),Or=null}))),e&&e.setAttribute("aria-expanded","false"),jr&&(jr.remove(),jr=null,Ur.focus())},freshModal(e,t,n){jr&&jr.remove(),Or&&Or.remove(),Or=bn`
      `;const r=`${n.id}-modal`,s=`${r}-heading`;jr=bn``;const o=new Map([["labelledby",s]]);Pr(jr,o),document.body.append(Or,jr),Or.addEventListener("click",(()=>this.closeModal(n))),Or.classList.toggle("respec-show-overlay"),jr.hidden=!1,Fr(jr)}};function Vr(e){if("string"==typeof e)return e;const t=e.plugin?`

      (plugin: "${e.plugin}")

      `:"",n=e.hint?`\n${Rr(`

      How to fix: ${fr(e.hint)}`,{inline:!e.hint.includes("\n")})}\n`:"",r=Array.isArray(e.elements)?`

      Occurred ${e.elements.length} times at:

      \n ${Rr(e.elements.map(Yr).join("\n"))}`:"",s=e.details?`\n\n
      \n${e.details}\n
      \n`:"";return`${Rr(`**${Nn(e.message)}**`,{inline:!0})}${n}${r}${s}${t}`}function Yr(e){return`* [\`<${e.localName}>\`](#${e.id}) element`}async function Kr(e){try{Gr.show(),await async function(){"loading"===document.readyState&&await new Promise((e=>document.addEventListener("DOMContentLoaded",e)))}(),await $r(e)}finally{Gr.enable()}}document.addEventListener("keydown",(e=>{"Escape"===e.key&&Gr.closeModal()})),window.respecUI=Gr,o("error",(e=>Gr.error(e))),o("warn",(e=>Gr.warning(e))),window.addEventListener("error",(e=>{console.error(e.error,e.message,e)}));const Zr=[Promise.resolve().then((function(){return Jr})),Promise.resolve().then((function(){return u})),Promise.resolve().then((function(){return ts})),Promise.resolve().then((function(){return Ys})),Promise.resolve().then((function(){return Js})),Promise.resolve().then((function(){return no})),Promise.resolve().then((function(){return co})),Promise.resolve().then((function(){return bo})),Promise.resolve().then((function(){return Lr})),Promise.resolve().then((function(){return yo})),Promise.resolve().then((function(){return $o})),Promise.resolve().then((function(){return _o})),Promise.resolve().then((function(){return Ws})),Promise.resolve().then((function(){return Ro})),Promise.resolve().then((function(){return Eo})),Promise.resolve().then((function(){return Lo})),Promise.resolve().then((function(){return zi})),Promise.resolve().then((function(){return Fi})),Promise.resolve().then((function(){return Xi})),Promise.resolve().then((function(){return ea})),Promise.resolve().then((function(){return sa})),Promise.resolve().then((function(){return la})),Promise.resolve().then((function(){return ha})),Promise.resolve().then((function(){return ba})),Promise.resolve().then((function(){return wa})),Promise.resolve().then((function(){return Ua})),Promise.resolve().then((function(){return ai})),Promise.resolve().then((function(){return ac})),Promise.resolve().then((function(){return kc})),Promise.resolve().then((function(){return Ja})),Promise.resolve().then((function(){return yi})),Promise.resolve().then((function(){return Nc})),Promise.resolve().then((function(){return Oc})),Promise.resolve().then((function(){return fo})),Promise.resolve().then((function(){return Mc})),Promise.resolve().then((function(){return qc})),Promise.resolve().then((function(){return Vc})),Promise.resolve().then((function(){return Kc})),Promise.resolve().then((function(){return Jc})),Promise.resolve().then((function(){return rl})),Promise.resolve().then((function(){return pl})),Promise.resolve().then((function(){return gl})),Promise.resolve().then((function(){return vl})),Promise.resolve().then((function(){return _l})),Promise.resolve().then((function(){return Tl})),Promise.resolve().then((function(){return Ll})),Promise.resolve().then((function(){return Ol})),Promise.resolve().then((function(){return Bl})),Promise.resolve().then((function(){return Ea})),Promise.resolve().then((function(){return Jl})),Promise.resolve().then((function(){return nu})),Promise.resolve().then((function(){return cu})),Promise.resolve().then((function(){return uu})),Promise.resolve().then((function(){return pu})),Promise.resolve().then((function(){return vu})),Promise.resolve().then((function(){return xu})),Promise.resolve().then((function(){return Eu})),Promise.resolve().then((function(){return Au})),Promise.resolve().then((function(){return Tu})),Promise.resolve().then((function(){return Pu})),Promise.resolve().then((function(){return Nu})),Promise.resolve().then((function(){return qu})),Promise.resolve().then((function(){return Wu})),Promise.resolve().then((function(){return Gu})),Promise.resolve().then((function(){return Ku})),Promise.resolve().then((function(){return ed})),Promise.resolve().then((function(){return rd})),Promise.resolve().then((function(){return id})),Promise.resolve().then((function(){return pd})),Promise.resolve().then((function(){return md})),Promise.resolve().then((function(){return yd})),Promise.resolve().then((function(){return kd})),Promise.resolve().then((function(){return Sd}))];Promise.all(Zr).then((e=>Kr(e))).catch((e=>console.error(e)));var Jr=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){window.location.hash&&document.respec.ready.then((()=>{let e=decodeURIComponent(window.location.hash).slice(1);const t=document.getElementById(e),n=/\W/.test(e);if(!t&&n){const t=e.replace(/[\W]+/gim,"-").replace(/^-+/,"").replace(/-+$/,"");document.getElementById(t)&&(e=t)}window.location.hash=`#${e}`}))}});const Qr="w3c/group",Xr="https://respec.org/w3c/groups/";async function es(e){let t="",n=e;e.includes("/")&&([t,n]=e.split("/",2));const r=new URL(`${n}/${t}`,Xr),s=await Un(r.href);if(s.ok){const e=await s.json(),{id:t,name:n,patentURI:r,patentPolicy:o,type:i,wgURI:a}=e;return{wg:n,wgId:t,wgURI:a,wgPatentURI:r,wgPatentPolicy:o,groupType:i}}const o=await s.text();let i,a=`Failed to fetch group details (HTTP: ${s.status}).`;409===s.status?[a,i]=o.split("\n",2):404===s.status&&(i=pr`See the list of [supported group names](https://respec.org/w3c/groups/) to use with the ${"[group]"} configuration option.`),or(a,Qr,{hint:i})}var ts=Object.freeze({__proto__:null,name:Qr,run:async function(e){if(!e.group)return;const{group:t}=e,n=Array.isArray(t)?await async function(e){const t=await Promise.all(e.map(es)),n={wg:[],wgId:[],wgURI:[],wgPatentURI:[],wgPatentPolicy:[],groupType:[]};for(const e of t.filter(Boolean))for(const t of Object.keys(n))n[t].push(e[t]);return n}(t):await es(t);Object.assign(e,n)}});function ns(e){if(!e.key){const t="Found a link without `key` attribute in the configuration. See dev console.";return ir(t,"core/templates/show-link"),void console.warn(t,e)}return bn`
      ${e.key}
      ${e.data?e.data.map(rs):rs(e)} `}function rs(e){return bn`
      ${e.href?bn`${e.value||e.href}`:e.value}
      `}const ss="core/templates/show-logo";function os(e,t){const n=bn``;if(!e.alt){const r=pr`Add the missing "\`alt\`" property describing the logo. See ${"[logos]"} for more information.`;or(`Logo at index ${t}${e.src?`, with \`src\` ${e.src}, `:""} is missing required "\`alt\`" property.`,ss,{hint:r,elements:[n]})}if(!e.src){const e=pr`The \`src\` property is required on every logo. See ${"[logos]"} for more information.`;or(`Logo at index ${t} is missing "\`src\`" property.`,ss,{hint:e,elements:[n]})}return n}const is="core/templates/show-people",as=On({en:{until:e=>bn` Until ${e} `},es:{until:e=>bn` Hasta ${e} `},ko:{until:e=>bn` ${e} 이전 `},ja:{until:e=>bn` ${e} 以前 `},de:{until:e=>bn` bis ${e} `},zh:{until:e=>bn` 直到 ${e} `}}),cs=()=>bn` `;function ls(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.`,o=`Error processing the [person object](${n}#person) at index ${t} of the "[\`${s}\`](${n}#${s})" configuration option.`;if(!e.name)return or(`${o} Missing required property \`"name"\`.`,is,{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=`${o} ORCID "${e.orcid}" at index ${t} is invalid.`,s=`The origin should be "https://orcid.org", not "${r.origin}".`;return or(n,is,{hint:s}),!1}const s=r.pathname.slice(1).replace(/\/$/,"");if(!/^\d{4}-\d{4}-\d{4}-\d{3}(\d|X)$/.test(s))return or(`${o} ORCID "${s}" has wrong format.`,is,{hint:'ORCIDs have the format "1234-1234-1234-1234."'}),!1;if(!function(e){const t=e[e.length-1],n=e.split("").slice(0,-1).filter((e=>/\d/.test(e))).map(Number).reduce(((e,t)=>2*(e+t)),0),r=(12-n%11)%11,s=10===r?"X":String(r);return t===s}(n))return or(`${o} ORCID "${n}" failed checksum check.`,is,{hint:"Please check that the ORCID is valid."}),!1;e.orcid=r.href}return e.retiredDate&&(i=e.retiredDate,"Invalid Date"===(/\d{4}-\d{2}-\d{2}/.test(i)?new Date(i):"Invalid Date").toString())?(or(`${o} The property "\`retiredDate\`" is not a valid date.`,is,{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 or(`${n}. Member "extra" at index ${r} is not an object.`,is,{hint:t}),!1;case!e.hasOwnProperty("name"):return or(`${n} \`PersonExtra\` object at index ${r} is missing required "name" member.`,is,{hint:t}),!1;case"string"==typeof e.name&&""===e.name.trim():return or(`${n} \`PersonExtra\` object at index ${r} "name" can't be empty.`,is,{hint:t}),!1}return!0})):(or(`${n}. A person's "extras" member must be an array.`,is,{hint:t}),!1)}(e.extras,r,o))&&(e.url&&e.mailto&&ir(`${o} Has both "url" and "mailto" property.`,is,{hint:`Please choose either "url" or "mailto" ("url" is preferred). ${r}`}),e.companyURL&&!e.company&&ir(`${o} Has a "\`companyURL\`" property but no "\`company\`" property.`,is,{hint:`Please add a "\`company\`" property. ${r}.`}),!0);var i});var s;return n.filter(r).map(us)}function us(e){const t=[e.name],n=[e.company],r=e.w3cid||null,s=[];if(e.mailto&&(e.url=`mailto:${e.mailto}`),e.url){const n="mailto:"===new URL(e.url,document.location.href).protocol?"ed_mailto u-email email p-name":"u-url url p-name fn";s.push(bn`${t}`)}else s.push(bn`${t}`);if(e.orcid&&s.push(bn`${cs()}`),e.company){const t="p-org org h-org",r=e.companyURL?bn`${n}`:bn`${n}`;s.push(bn` (${r})`)}e.note&&s.push(document.createTextNode(` (${e.note})`)),e.extras&&s.push(...e.extras.map((e=>bn`, ${function(e){const t=e.class||null,{name:n,href:r}=e;return r?bn`${n}`:bn`${n}`}(e)}`)));const{retiredDate:o}=e;if(e.retiredDate){const e=bn``;s.push(bn` - ${as.until(e)} `)}return bn`
      ${s}
      `}const ds=On({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",multiple_alternates:e=>`This document is also available in ${e?"these non-normative formats":"this non-normative format"}:`,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:"作者:",commit_history:"Git提交历史",editor:"编辑:",editors:"编辑:",feedback:"反馈:",former_editor:"原编辑:",former_editors:"原编辑:",history:"历史:",implementation_report:"实现报告:",latest_editors_draft:"最新编辑草稿:",latest_published_version:"最新发布版本:",latest_recommendation:"最新发布的正式推荐标准:",message_topic:"… 邮件主题 …",prev_editor_draft:"上一版编辑草稿:",prev_recommendation:"上一版正式推荐标准:",prev_version:"上一版:",test_suite:"测试套件:",this_version:"本版本:"},ja:{archives:"アーカイブ",author:"著者:",authors:"著者:",commit_history:"更新履歴",edited_in_place:"改版なく更新",editor:"編者:",editors:"編者:",feedback:"フィードバック:",former_editor:"以前の版の編者:",former_editors:"以前の版の編者:",history:"履歴:",implementation_report:"実装レポート:",latest_editors_draft:"最新の編集用草案:",latest_published_version:"最新バージョン:",latest_recommendation:"最新の勧告版:",message_topic:"… メール件名 …",more_details_about_this_doc:"この文書についてのより詳細",prev_editor_draft:"前回の編集用草案:",prev_recommendation:"前回の勧告版:",prev_version:"前回のバージョン:",publication_history:"公表履歴",test_suite:"テストスイート:",this_version:"このバージョン:",with_subject_line:"次の件名で"},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:{archives:"Archiv",author:"Autor/in:",authors:"Autor/innen:",commit_history:"Commit-Historie",edited_in_place:"zuletzt geändert am",editor:"Redaktion:",editors:"Redaktion:",feedback:"Feedback:",former_editor:"Frühere Mitwirkende:",former_editors:"Frühere Mitwirkende:",history:"Verlauf:",implementation_report:"Umsetzungsbericht:",latest_editors_draft:"Letzter Entwurf:",latest_published_version:"Letzte publizierte Fassung:",latest_recommendation:"Aktuellste Empfehlung:",more_details_about_this_doc:"Mehr Informationen über dieses Dokument",multiple_alternates:e=>`Dieses Dokument ist ebenfalls in ${e?"diesen nicht-normativen Formaten verfügbar":"diesem nicht-normativen Format verfügbar"}:`,prev_editor_draft:"Vorheriger Entwurf:",prev_recommendation:"Vorherige Empfehlung:",prev_version:"Vorherige Version:",publication_history:"Veröffentlichungsverlauf",test_suite:"Testumgebung:",this_version:"Diese Fassung:"}});function ps(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}var fs=(e,t)=>(o("beforesave",(e=>{e.querySelector(".head details").open=!0})),bn`
      ${e.logos.length?bn`

      ${e.logos.map(os)}

      `:""} ${document.querySelector("h1#title")} ${ps(e)}

      ${function(e){const t=e.isCR||e.isCRY?e.longStatus:e.textStatus,n=e.prependW3C?bn`W3C ${t}`:bn`${t}`;return bn`${n}${" "} ${e.modificationDate?bn`, ${ds.edited_in_place}${" "} `:""}`}(e)}

      ${ds.more_details_about_this_doc}
      ${e.thisVersion?bn`
      ${ds.this_version}
      ${e.thisVersion}
      `:""} ${"latestVersion"in e?bn`
      ${ds.latest_published_version}
      ${e.latestVersion?bn`${e.latestVersion}`:"none"}
      `:""} ${e.edDraftURI?bn`
      ${ds.latest_editors_draft}
      ${e.edDraftURI}
      `:""} ${e.historyURI||e.github?bn`
      ${ds.history}
      ${e.historyURI?bn`
      ${e.historyURI}
      `:""} ${e.github?bn`
      ${ds.commit_history}
      `:""}`:""} ${e.testSuiteURI?bn`
      ${ds.test_suite}
      ${e.testSuiteURI}
      `:""} ${e.implementationReportURI?bn`
      ${ds.implementation_report}
      ${e.implementationReportURI}
      `:""} ${e.prevED?bn`
      ${ds.prev_editor_draft}
      ${e.prevED}
      `:""} ${e.showPreviousVersion?bn`
      ${ds.prev_version}
      ${e.prevVersion}
      `:""} ${e.prevRecURI?e.isRec?bn`
      ${ds.prev_recommendation}
      ${e.prevRecURI}
      `:bn`
      ${ds.latest_recommendation}
      ${e.prevRecURI}
      `:""} ${e.editors.length?bn`
      ${e.editors.length>1?ds.editors:ds.editor}
      ${ls(e,"editors")} `:""} ${e.formerEditors.length?bn`
      ${e.formerEditors.length>1?ds.former_editors:ds.former_editor}
      ${ls(e,"formerEditors")} `:""} ${e.authors.length?bn`
      ${e.authors.length>1?ds.authors:ds.author}
      ${ls(e,"authors")} `:""} ${e.github||e.wgPublicList?bn`
      ${ds.feedback}
      ${hs(e)}`:""} ${e.errata?bn`
      Errata:
      Errata exists.
      `:""} ${e.otherLinks?e.otherLinks.map(ns):""}
      ${e.isRec?bn`

      See also translations.

      `:""} ${e.alternateFormats?bn`

      ${ds.multiple_alternates(t.multipleAlternates)} ${t.alternatesHTML}

      `:""} ${function(e){const t=document.querySelector(".copyright");if(t)return t.remove(),t;if(e.isUnofficial&&e.licenseInfo)return bn``;return function(e){return bn``}(e)}(e)}
      `);function hs(e){const t=[];if(e.github){const{repoURL:n,issuesURL:r,newIssuesURL:s,pullsURL:o,fullName:i}=e.github;t.push(bn`
      GitHub ${i} (pull requests, new issue, open issues)
      `)}if(e.wgPublicList){const n=new URL(`mailto:${e.wgPublicList}@w3.org`),r=e.subjectPrefix??`[${e.shortName}] ${ds.your_topic_here}`,s=bn`${n.pathname}`,o=e.subjectPrefix||bn`[${e.shortName}] ${ds.message_topic}`,i=bn`${ds.with_subject_line}${" "} ${o}`,a=new URL(e.wgPublicList,"https://lists.w3.org/Archives/Public/"),c=bn`(${ds.archives})`;t.push(bn`
      ${s} ${i} ${c}
      `)}return t}var ms=(e,t)=>{const n=document.querySelector(".copyright");n&&n.remove();const r=document.querySelector("h1#title"),s=r.cloneNode(!0);return bn`
      ${e.logos.length?bn`

      ${e.logos.map(os)}

      `:""} ${r} ${ps(e)}

      ${e.longStatus}

      ${e.thisVersion?bn`
      ${ds.this_version}
      ${e.thisVersion}
      `:""} ${"latestVersion"in e?bn`
      ${ds.latest_published_version}
      ${e.latestVersion?bn`${e.latestVersion}`:"none"}
      `:""} ${e.edDraftURI?bn`
      ${ds.latest_editors_draft}
      ${e.edDraftURI}
      `:""} ${e.testSuiteURI?bn`
      Test suite:
      ${e.testSuiteURI}
      `:""} ${e.implementationReportURI?bn`
      Implementation report:
      ${e.implementationReportURI}
      `:""} ${e.prevVersion?bn`
      Previous version:
      ${e.prevVersion}
      `:""} ${e.isCGFinal?"":bn` ${e.prevED?bn`
      Previous editor's draft:
      ${e.prevED}
      `:""} `} ${e.editors.length?bn`
      ${e.editors.length>1?ds.editors:ds.editor}
      ${ls(e,"editors")} `:""} ${e.formerEditors.length?bn`
      ${e.formerEditors.length>1?ds.former_editors:ds.former_editor}
      ${ls(e,"formerEditors")} `:""} ${e.authors.length?bn`
      ${e.authors.length>1?ds.authors:ds.author}
      ${ls(e,"authors")} `:""} ${e.github||e.wgPublicList?bn`
      ${ds.feedback}
      ${hs(e)}`:""} ${e.otherLinks?e.otherLinks.map(ns):""}
      ${e.alternateFormats?bn`

      ${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||bn``}
      `};const gs=On({en:{sotd:"Status of This Document",status_at_publication:bn`This section describes the status of this document at the time of its publication. 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:{sotd:"현재 문서의 상태",status_at_publication:bn`이 부분은 현재 문서의 발행 당시 상태에 대해 기술합니다. W3C 발행 문서의 최신 목록 및 테크니컬 리포트 최신판을 https://www.w3.org/TR/ 의 W3C technical reports index 에서 열람할 수 있습니다.`},zh:{sotd:"关于本文档",status_at_publication:bn`本章节描述了本文档的发布状态。W3C的文档列表和最新版本可通过W3C技术报告索引访问。`},ja:{sotd:"この文書の位置付け",status_at_publication:bn`この節には、公開時点でのこの文書の位置づけが記されている。現時点でのW3Cの発行文書とこのテクニカルレポートの最新版は、下記から参照できる。 W3C technical reports index (https://www.w3.org/TR/)`},nl:{sotd:"Status van dit document"},es:{sotd:"Estado de este Document",status_at_publication:bn`Esta sección describe el estado del presente documento al momento de su publicación. 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:{sotd:"Status dieses Dokuments",status_at_publication:bn`Dieser Abschnitt beschreibt den Status des Dokuments zum Zeitpunkt der Publikation. 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.`}}),bs="https://www.w3.org/2023/Process-20231103/";function ys(e){return/^[aeiou]/i.test(e)?`an ${e}`:`a ${e}`}var ws=(e,t)=>bn`

      ${gs.sotd}

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

      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 bn`

      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):bn`

      ${gs.status_at_publication}

      ${e.isMemberSubmission?function(e,t){return bn` ${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 bn`

      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 W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or will be allocating any resources to the issues addressed by it. This document is not the product of a chartered W3C group, but is published as potential input to the W3C Process. A W3C Team Comment has been published in conjunction with this Member Submission. Publication of acknowledged Member Submissions at the W3C site is one of the benefits of W3C Membership. Please consult the requirements associated with Member Submissions of section 3.3 of the W3C Patent Policy. Please consult the complete list of acknowledged W3C Member Submissions.

      `}(e):""} `}(e,t):bn` ${e.sotdAfterWGinfo?"":t.additionalContent} ${e.overrideStatus?"":bn` ${function(e){if(!e.wg)return;let t=null;if(e.isRec&&e.revisionTypes&&e.revisionTypes.length){const n=e.revisionTypes.includes("proposed-addition"),r=e.revisionTypes.includes("proposed-correction"),s=e.revisionTypes.includes("addition"),o=e.revisionTypes.includes("correction");n&&r||s&&o?t=bn`It includes ${n?bn` proposed amendments`:bn` candidate amendments`}, introducing substantive changes and new features since the previous Recommendation.`:n||s?t=bn`It includes ${n?bn` proposed additions`:bn` candidate additions`}, introducing new features since the previous Recommendation.`:(r||o)&&(t=bn`It includes ${r?bn` proposed corrections`:bn` candidate corrections`}.`)}const n=Es[e.specStatus]?bn` using the ${Es[e.specStatus]} track`:"";return bn`

      This document was published by ${$s(e)} as ${ys(e.longStatus)}${n}. ${t}

      `}(e)} `} ${e.sotdAfterWGinfo?t.additionalContent:""} ${e.isRec?function(e){const{updateableRec:t,revisionTypes:n=[],revisedRecEnd:r}=e;let s="";n.includes("proposed-addition")?s="additions":n.includes("proposed-correction")&&(s="corrections");return bn`

      W3C recommends the wide deployment of this specification as a standard for the Web.

      A W3C Recommendation is a specification that, after extensive consensus-building, is endorsed by W3C and its Members, and has commitments from Working Group members to royalty-free licensing for implementations. ${t?bn`Future updates to this Recommendation may incorporate new features.`:""}

      ${n.includes("addition")?bn`

      Candidate additions are marked in the document.

      `:""} ${n.includes("correction")?bn`

      Candidate corrections are marked in the document.

      `:""} ${n.includes("proposed-addition")?bn`

      Proposed additions are marked in the document.

      `:""} ${n.includes("proposed-correction")?bn`

      Proposed corrections are marked in the document.

      `:""} ${s?bn`

      The W3C Membership and other interested parties are invited to review the proposed ${s} and send comments through ${Sn.format(r)}. Advisory Committee Representatives should consult their WBS questionnaires.

      `:""} `}(e):function(e){let t=null,n=null,r=bn`Publication as ${ys(e.textStatus)} does not imply endorsement by W3C and its Members.`,s=bn`

      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?bn`Future updates to this specification may incorporate new features.`:""}

      `;"DISC"===e.specStatus&&(s=bn`

      Publication as a Discontinued Draft implies that this document is no longer intended to advance or to be maintained. It is inappropriate to cite this document as other than abandoned work.

      `);const o=bn`

      This document is maintained and updated at any time. Some parts of this document are work in progress.

      `;switch(e.specStatus){case"STMT":r=bn`

      A W3C Statement is a specification that, after extensive consensus-building, has received the endorsement of the W3C and its Members.

      `;break;case"RY":r=bn`

      W3C recommends the wide usage of this registry.

      A W3C Registry is a specification that, after extensive consensus-building, has received the endorsement of the W3C and its Members.

      `;break;case"CRD":t=bn`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&&(s=o);break;case"CRYD":t=bn`A Candidate Registry Draft integrates changes from the previous Candidate Registry Snapshot that the Working Group intends to include in a subsequent Candidate Registry Snapshot.`,"LS"===e.pubMode&&(s=o);break;case"CRY":t=bn`A Candidate Registry Snapshot has received wide review.`,n=bn`

      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}.

      `;break;case"CR":t=bn`A Candidate Recommendation Snapshot has received wide review, is intended to gather implementation experience, and has commitments from Working Group members to royalty-free licensing for implementations.`,s=bn`${e.updateableRec?bn`Future updates to this specification may incorporate new features.`:""}`,n="LS"===e.pubMode?bn`

      Comments are welcome at any time but most especially before ${Sn.format(e.crEnd)}.

      `:bn`

      This Candidate Recommendation is not expected to advance to Proposed Recommendation any earlier than ${Sn.format(e.crEnd)}.

      `;break;case"PR":n=bn`

      The W3C Membership and other interested parties are invited to review the document and send comments through ${Sn.format(e.prEnd)}. Advisory Committee Representatives should consult their WBS questionnaires. Note that substantive technical comments were expected during the Candidate Recommendation review period that ended ${Sn.format(e.crEnd)}.

      `;break;case"DNOTE":r=bn`${e.textStatus}s are not endorsed by W3C nor its Members.`;break;case"NOTE":r=bn`This ${e.textStatus} is endorsed by ${$s(e)}, but is not endorsed by W3C itself nor its Members.`}return bn`

      ${r} ${t}

      ${s} ${n}`}(e)} ${function(e){const{isNote:t,isRegistry:n,wgId:r,multipleWGs:s,wgPatentHTML:o,wgPatentURI:i,wgPatentPolicy:a}=e,c="PP2017"===a?"https://www.w3.org/Consortium/Patent-Policy-20170801/":"https://www.w3.org/Consortium/Patent-Policy/",l=t||n?bn` The ${"PP2017"===a?"1 August 2017 ":""}W3C Patent Policy does not carry any licensing requirements or commitments on this document. `:bn` This document was produced by ${s?"groups":"a group"} operating under the ${"PP2017"===a?"1 August 2017 ":""}W3C Patent Policy. `;return bn`

      ${l} ${t||n?"":bn` ${s?bn` W3C maintains ${o} `:bn` W3C maintains a public list of any patent disclosures `} made in connection with the deliverables of ${s?"each group; these pages also include":"the group; that page also includes"} instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy. `}

      `}(e)}

      This document is governed by the 03 November 2023 W3C Process Document.

      `} `} ${t.additionalSections} `;function vs(e){const{prUrl:t,prNumber:n,edDraftURI:r}=e;return bn`
      This is a preview${t&&n?bn` of pull request #${n} `:""}

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

      `}function $s(e){return Array.isArray(e.wg)?Fn(e.wg,((t,n)=>bn`the ${t}`)):e.wg?bn`the ${e.wg}`:void 0}var ks=(e,t)=>bn`

      ${gs.sotd}

      ${e.isPreview?vs(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?bn` Please note that under the W3C Community Final Specification Agreement (FSA) other conditions apply. `:bn` Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. `} Learn more about W3C Community and Business Groups.

      ${e.sotdAfterWGinfo?"":t.additionalContent} ${!e.github&&e.wgPublicList?function(e,t){const{mailToWGPublicListWithSubject:n,mailToWGPublicListSubscription:r}=t,{wgPublicList:s,subjectPrefix:o}=e;return bn`

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

      `}(e,t):""} ${e.github?function(e,t){if(e.github||e.wgPublicList)return bn`

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

      `}(e,t):""} ${e.sotdAfterWGinfo?t.additionalContent:""} ${t.additionalSections} `;const xs="w3c/headers";function _s(e){return new URL(e,"https://www.w3.org/").href}const Cs={LS:"WD",LD:"WD",FPWD:"WD","Member-SUBM":"SUBM"},Ss={DNOTE:"Group Draft Note",NOTE:"Group Note",STMT:"Statement","Member-SUBM":"Member Submission",MO:"Member-Only Document",ED:"Editor's Draft",LS:"Living Standard",LD:"Living Document",FPWD:"First Public Working Draft",WD:"Working Draft",CR:"Candidate Recommendation",CRD:"Candidate Recommendation",PR:"Proposed Recommendation",REC:"Recommendation",DISC:"Discontinued Draft",RSCND:"Rescinded Recommendation",DRY:"Draft Registry",CRYD:"Candidate Registry",CRY:"Candidate Registry",RY:"Registry",unofficial:"Unofficial Draft",UD:"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"},Rs={...Ss,CR:"Candidate Recommendation Snapshot",CRD:"Candidate Recommendation Draft",CRY:"Candidate Registry Snapshot",CRYD:"Candidate Registry Draft"},Es={DNOTE:"Note",NOTE:"Note",STMT:"Note","WG-NOTE":"Note","IG-NOTE":"Note",FPWD:"Recommendation",WD:"Recommendation",CR:"Recommendation",CRD:"Recommendation",PR:"Recommendation",REC:"Recommendation",DISC:"Recommendation",RSCND:"Recommendation",DRY:"Registry",CRYD:"Registry",CRY:"Registry",RY:"Registry"},As=["DNOTE","NOTE","STMT"],Ts=["CR","CRD","DISC","FPWD","PR","REC","RSCND","WD"],Ls=["DRY","CRY","CRYD","RY"],Ps=["draft-finding","finding","editor-draft-finding"],Is=["CG-DRAFT","CG-FINAL"],Ds=["BG-DRAFT","BG-FINAL"],Ns=[...Is,...Ds],js=[...As,...Ts,...Ls],Os=["base",...Is,...Ds,"editor-draft-finding","draft-finding","finding","MO","unofficial"],Ms=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/copyright/software-license-2002/"}],["w3c-software-doc",{name:"W3C Software and Document Notice and License",short:"permissive document license",url:"https://www.w3.org/copyright/software-license-2023/"}],["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/copyright/document-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"}]]),qs=["PP2017","PP2020"];function zs(e,t,n=new Date){const r=e[t]?new Date(e[t]):new Date(n);if(Number.isFinite(r.valueOf())){const e=_n.format(r);return new Date(e)}return or(pr`${t} is not a valid date: "${e[t]}". Expected format 'YYYY-MM-DD'.`,xs),new Date(_n.format(new Date))}function Us(e,{isTagFinding:t=!1}){const n=e.cloneNode(!0),r=document.createDocumentFragment();for(;n.hasChildNodes()&&(n.nodeType!==Node.ELEMENT_NODE||"section"!==n.firstChild.localName);)r.appendChild(n.firstChild);if(t&&!r.hasChildNodes()){ir(pr`ReSpec does not support automated SotD generation for TAG findings.`,xs,{hint:"Please add the prerequisite content in the 'sotd' section."})}return{additionalContent:r,additionalSections:n.childNodes}}var Ws=Object.freeze({__proto__:null,W3CNotes:As,bgStatus:Ds,cgStatus:Is,cgbgStatus:Ns,licenses:Ms,name:xs,noTrackStatus:Os,recTrackStatus:Ts,registryTrackStatus:Ls,run:async function(e){if(e.isBasic="base"===e.specStatus,e.isCGBG=Ns.includes(e.specStatus),e.isCGFinal=e.isCGBG&&e.specStatus.endsWith("G-FINAL"),e.isCR="CR"===e.specStatus||"CRD"===e.specStatus,e.isCRDraft="CRD"===e.specStatus,e.isCRY="CRY"===e.specStatus||"CRYD"===e.specStatus,e.isEd="ED"===e.specStatus,e.isMemberSubmission="Member-SUBM"===e.specStatus,e.isMO="MO"===e.specStatus,e.isNote=As.includes(e.specStatus),e.isNoTrack=Os.includes(e.specStatus),e.isPR="PR"===e.specStatus,e.isRecTrack=Ts.includes(e.specStatus),e.isRec=e.isRecTrack&&"REC"===e.specStatus,e.isRegistry=Ls.includes(e.specStatus),e.isRegular=!e.isCGBG&&!e.isBasic,e.isTagEditorFinding="editor-draft-finding"===e.specStatus,e.isTagFinding=Ps.includes(e.specStatus),e.isUnofficial="unofficial"===e.specStatus,e.licenseInfo=function(e){let t;if("string"==typeof e.license){const n=e.license.toLowerCase();if(Ms.has(n))t=n;else{const t=`The license "\`${e.license}\`" is not supported.`,n=pr`Please set ${"[license]"} to one of: ${lr([...Ms.keys()].filter((e=>e)),{quotes:!0})}. If in doubt, remove \`license\` and let ReSpec pick one for you.`;or(t,xs,{hint:n})}}if(e.isUnofficial&&!t&&(t="cc-by"),!e.isUnofficial&&["cc-by","cc0"].includes(t)){const t=pr`Please set ${"[license]"} to \`"w3c-software-doc"\` instead.`;or(pr`License "\`${e.license}\`" is not allowed for W3C Specifications.`,xs,{hint:t})}return Ms.get(t)}(e),e.prependW3C=!e.isBasic&&!e.isUnofficial,e.longStatus=Rs[e.specStatus],e.textStatus=Ss[e.specStatus],e.showPreviousVersion=!1,e.isRegular&&!e.shortName){const e=pr`Please set ${"[shortName]"} to a short name for the specification.`;or(pr`The ${"[shortName]"} configuration option is required for this kind of document.`,xs,{hint:e})}if(e.publishDate=zs(e,"publishDate",document.lastModified),e.publishYear=e.publishDate.getUTCFullYear(),e.modificationDate&&(e.modificationDate=zs(e,"modificationDate",document.lastModified)),e.isRecTrack&&!e.github&&!e.wgPublicList){const e=pr`Use the ${"[github]"} configuration option to add a link to a repository. Alternatively use ${"[wgPublicList]"} to link to a mailing list.`;or("W3C Process requires a either a link to a public repository or mailing list.",xs,{hint:e})}if(e.isEd&&!e.edDraftURI){const e=pr`Please set ${"[edDraftURI]"} to the URL of the Editor's Draft. Alternatively, use the set ${"[github]"} option, which automatically sets it for you.`;ir(pr`Editor's Drafts should set ${"[edDraftURI]"} configuration option.`,xs,{hint:e})}const t=function(e){const{specStatus:t,group:n}=e;if(js.includes(t)||"wg"===e.groupType)return"/TR";switch(t){case"CG-FINAL":case"BG-FINAL":return`/community/reports/${n}`;case"finding":case"draft-finding":return"/2001/tag/doc";case"Member-SUBM":return"/Submission"}return""}(e);if(t&&!e.thisVersion){const n=Cs[e.specStatus]||e.specStatus,{shortName:r,publishDate:s}=e,o=`${n}-${r}-${qn(s)}`,i=[...js,"Member-SUBM"].includes(e.specStatus)?`${s.getUTCFullYear()}/`:"";e.thisVersion=_s(`${t}/${i}${o}/`)}e.isEd&&(e.thisVersion=e.edDraftURI),e.isCGBG&&function(e){const t=Ss[e.specStatus],n=e.latestVersion?new URL(_s(e.latestVersion)):null;if(!e.wg){return void or(pr`The ${"[group]"} configuration option is required for this kind of document (${t}).`,xs)}if(e.isCGFinal){if(!1===("https://www.w3.org"===n?.origin||"https://w3.org/"===n?.origin)){or(pr`For ${t}, the ${"[latestVersion]"} URL must point to somewhere at https://www.w3.org/.`,xs,{hint:"Ask a W3C Team Member for a W3C URL where the report can be published."})}}}(e),null!==e.latestVersion&&(e.latestVersion=e.latestVersion?_s(e.latestVersion):_s(`${t}/${e.shortName}/`)),e.latestVersion&&function(e){const t=new URL(e.latestVersion);if(("https://www.w3.org"===t.origin||"https://w3.org/"===t.origin)&&t.pathname.startsWith("/TR/")&&!1===["ED",...js].includes(e.specStatus)){const t=pr`Ask a W3C Team Member for a W3C URL where the report can be published and change ${"[latestVersion]"} to something else.`;or(pr`Documents with a status of \`"${e.specStatus}"\` can't be published on the W3C's /TR/ (Technical Report) space.`,xs,{hint:t})}}(e);const n=`${t}/${e.shortName}`;if(e.previousPublishDate){if(!e.previousMaturity&&!e.isTagFinding){or(pr`${"[`previousPublishDate`]"} is set, but missing ${"[`previousMaturity`]"}.`,xs)}e.previousPublishDate=zs(e,"previousPublishDate");const r=Cs[e.previousMaturity]??e.previousMaturity;if(e.isTagFinding&&e.latestVersion){const t=_n.format(e.publishDate);e.thisVersion=_s(`${n}-${t}`);const r=_n.format(e.previousPublishDate);e.prevVersion=_s(`${n}-${r}}`)}else if(e.isCGBG||e.isBasic)e.prevVersion=e.prevVersion||"";else{const n=e.previousPublishDate.getUTCFullYear(),{shortName:s}=e,o=qn(e.previousPublishDate);e.prevVersion=_s(`${t}/${n}/${r}-${s}-${o}/`)}}e.prevRecShortname&&!e.prevRecURI&&(e.prevRecURI=_s(`${t}/${e.prevRecShortname}`));for(let t=0;t{if(e.w3cid)return;const n=pr`See ${"[w3cid]"} for instructions for how to retrieve it and add it.`;or(pr`Editor ${e.name?`"${e.name}"`:`number ${t+1}`} is missing their ${"[w3cid]"}.`,xs,{hint:n})}));if(e.alternateFormats?.some((({uri:e,label:t})=>!e||!t))){or(pr`Every ${"[`alternateFormats`]"} entry must have a \`uri\` and a \`label\`.`,xs)}if(e.copyrightStart==e.publishYear&&(e.copyrightStart=""),e.isRec&&!e.errata&&!e.revisionTypes?.length){const e=pr`Add an ${"[errata]"} URL to your ${"[respecConfig]"}.`;or("Recommendations must have an errata link.",xs,{hint:e})}e.dashDate=_n.format(e.publishDate),e.publishISODate=e.publishDate.toISOString(),e.shortISODate=_n.format(e.publishDate),function(e){if(!e.wgPatentPolicy)return;const t=new Set([].concat(e.wgPatentPolicy));if(t.size&&![...t].every((e=>qs.includes(e)))){const e=pr`Invalid ${"[wgPatentPolicy]"} value(s): ${ur([...t].filter((e=>!qs.includes(e))))}.`,n=`Please use one of: ${lr(qs)}.`;or(e,xs,{hint:n})}if(1!==t.size){const e="When collaborating across multiple groups, they must use the same patent policy.",n=pr`For ${"[wgPatentPolicy]"}, please check the patent policies of each group. The patent policies were: ${[...t].join(", ")}.`;or(e,xs,{hint:n})}e.wgPatentPolicy=[...t][0]}(e),await async function(e){if(!e.shortName||null===e.historyURI||!e.latestVersion)return;const t=e.isEd||js.includes(e.specStatus);if(e.historyURI&&!t){const t=pr`Please remove ${"[historyURI]"}.`;return or(pr`The ${"[historyURI]"} can't be used with non /TR/ documents.`,xs,{hint:t}),void(e.historyURI=null)}const n=new URL(e.historyURI??`${e.shortName}/`,"https://www.w3.org/standards/history/");if(e.historyURI&&t||["FPWD","DNOTE","NOTE","DRY"].includes(e.specStatus))return void(e.historyURI=n.href);try{const t=await fetch(n,{method:"HEAD"});t.ok&&(e.historyURI=t.url)}catch{}}(e),e.isTagEditorFinding&&(delete e.thisVersion,delete e.latestVersion),e.isTagFinding&&(e.showPreviousVersion=!!e.previousPublishDate);const r={get multipleAlternates(){return e.alternateFormats&&e.alternateFormats.length>1},get alternatesHTML(){return e.alternateFormats&&Fn(e.alternateFormats.map((({label:e})=>e)),((t,n)=>{const r=e.alternateFormats[n];return bn`${r.label}`}))}},o=(e.isCGBG?ms:fs)(e,r);document.body.prepend(o),document.body.classList.add("h-entry");const i=document.getElementById("sotd")||document.createElement("section");if((e.isCGBG||!e.isNoTrack||e.isTagFinding)&&!i.id){or("A Status of This Document must include at least on custom paragraph.",xs,{elements:[i],hint:"Add a `

      ` in the 'sotd' section that reflects the status of this specification."})}i.id=i.id||"sotd",i.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=pr`Use the ${"[group]"} option with an array instead.`;or(pr`If one of ${"[wg]"}, ${"[wgURI]"}, or ${"[wgPatentURI]"} is an array, they all have to be.`,xs,{hint:e})}if(Array.isArray(e.wg)?(e.multipleWGs=e.wg.length>1,e.wgPatentHTML=Fn(e.wg,((t,n)=>bn`a public list of any patent disclosures (${t})`))):e.multipleWGs=!1,e.isPR&&!e.crEnd){or(pr`${"[specStatus]"} is "PR" but no ${"[crEnd]"} is specified in the ${"[respecConfig]"} (needed to indicate end of previous CR).`,xs)}if(e.isCR&&!e.crEnd){or(pr`${"[specStatus]"} is "CR", but no ${"[crEnd]"} is specified in the ${"[respecConfig]"}.`,xs)}if(e.crEnd=zs(e,"crEnd"),e.isPr&&!e.prEnd){or(pr`${"[specStatus]"} is "PR" but no ${"[prEnd]"} is specified in the ${"[respecConfig]"}.`,xs)}if(e.prEnd=zs(e,"prEnd"),e.hasOwnProperty("updateableRec")){const t=pr`Add an ${"[`updateable-rec`|#updateable-rec-class]"} CSS class to the Status of This Document section instead.`;ir("Configuration option `updateableRec` is deprecated.",xs,{hint:t}),e.updateableRec&&i.classList.add("updateable-rec")}e.updateableRec=i.classList.contains("updateable-rec");const c=["addition","correction","proposed-addition","proposed-correction"];if(e.isRec&&e.revisionTypes?.length>0){if(e.revisionTypes.some((e=>!c.includes(e)))){const t=pr`${"[specStatus]"} is "REC" with unknown ${"[revisionTypes]"}: '${lr(e.revisionTypes.filter((e=>!c.includes(e))))}'.`,n=pr`The valid values for ${"[revisionTypes]"} are: ${lr(c)}.`;or(t,xs,{hint:n})}if((e.revisionTypes.includes("proposed-addition")||e.revisionTypes.includes("addition"))&&!e.updateableRec){or(pr`${"[specStatus]"} is "REC" with proposed additions but the Recommendation is not marked as allowing new features.`,xs)}}if("REC"===e.specStatus&&e.updateableRec&&e.revisionTypes&&e.revisionTypes.length>0&&["proposed-addition","proposed-correction"].some((t=>e.revisionTypes.includes(t)))&&!e.revisedRecEnd){or(pr`${"[specStatus]"} is "REC" with proposed corrections or additions but no ${"[revisedRecEnd]"} is specified in the ${"[respecConfig]"}.`,xs)}if(e.revisedRecEnd=zs(e,"revisedRecEnd"),e.noRecTrack&&Ts.includes(e.specStatus)){const t=pr`Document configured as ${"[noRecTrack]"}, but its status ("${e.specStatus}") puts it on the W3C Rec Track.`,n=lr(Ts,{quotes:!0});or(t,xs,{hint:`Status **can't** be any of: ${n}.`})}if(i.classList.contains("override")||bn.bind(i)`${function(e,t){const n={...Us(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`}},r=e.isCGBG?ks:ws;return r(e,n)}(e,i)}`,!e.implementationReportURI&&e.isCR){const e=pr`CR documents must have an ${"[implementationReportURI]"} that describes the [implementation experience](https://www.w3.org/2019/Process-20190301/#implementation-experience).`;or(pr`Missing ${"[implementationReportURI]"} configuration option in ${"[respecConfig]"}.`,xs,{hint:e})}if(!e.implementationReportURI&&e.isPR){ir(pr`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).`,xs)}s("amend-user-config",{publishISODate:e.publishISODate,generatedSubtitle:jn(document.getElementById("w3c-state")?.textContent??"")})},status2text:Ss,status2track:Es,tagStatus:Ps,trStatus:js});const Fs={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},Bs="w3c/defaults",Hs={src:"https://www.w3.org/StyleSheets/TR/2021/logos/W3C",alt:"W3C",height:48,width:72,url:"https://www.w3.org/"},Gs={alt:"W3C Member Submission",href:"https://www.w3.org/Submission/",src:"https://www.w3.org/Icons/member_subm-v.svg",width:"211",height:"48"},Vs={lint:{"privsec-section":!1,"required-sections":!0,"wpt-tests-exist":!1,"informative-dfn":"warn","no-unused-dfns":"warn",a11y:!1},doJsonLd:!1,logos:[],xref:!0,wgId:"",otherLinks:[],excludeGithubLinks:!0,subtitle:"",prevVersion:"",formerEditors:[],editors:[],authors:[]};var Ys=Object.freeze({__proto__:null,name:Bs,run:function(e){const t=!1!==e.lint&&{...Fs.lint,...Vs.lint,...e.lint};Object.assign(e,{...Fs,...Vs,...e,lint:t}),"unofficial"===e.specStatus||e.hasOwnProperty("license")||(e.license="w3c-software-doc"),function(e){const{specStatus:t,groupType:n,group:r}=e;if(!t){const t=pr`Select an appropriate status from ${"[specStatus]"} based on your W3C group. If in doubt, use \`"unofficial"\`.`;return or(pr`The ${"[specStatus]"} configuration option is required.`,Bs,{hint:t}),void(e.specStatus="base")}if(void 0===Ss[t]){const n=pr`The ${"[specStatus]"} "\`${t}\`" is not supported at for this type of document.`,r=pr`set ${"[specStatus]"} to one of: ${lr(Object.keys(Ss),{quotes:!0})}.`;return or(n,Bs,{hint:r}),void(e.specStatus="base")}switch(n){case"cg":if(![...Is,"unofficial","UD"].includes(t)){const n=pr`W3C Community Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=lr(Is,{quotes:!0});or(n,Bs,{hint:`Please use one of: ${r}. Automatically falling back to \`"CG-DRAFT"\`.`}),e.specStatus="CG-DRAFT"}break;case"bg":if(![...Ds,"unofficial","UD"].includes(t)){const n=pr`W3C Business Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=lr(Ds,{quotes:!0});or(n,Bs,{hint:`Please use one of: ${r}. Automatically falling back to \`"BG-DRAFT"\`.`}),e.specStatus="BG-DRAFT"}break;case"wg":if(![...js,"unofficial","UD","ED"].includes(t)){const e=pr`Pleas see ${"[specStatus]"} for appropriate status for W3C Working Group documents.`;or(pr`W3C Working Group documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,Bs,{hint:e})}break;case"other":if("tag"===r&&!["ED",...js,...Ps].includes(t)){const n=pr`The W3C Technical Architecture Group's documents can't use \`"${t}"\` for the ${"[specStatus]"} configuration option.`,r=lr(["ED",...js,...Ps],{quotes:!0});or(n,Bs,{hint:`Please use one of: ${r}. Automatically falling back to \`"unofficial"\`.`}),e.specStatus="unofficial"}break;default:if(!e.wgId&&!["unofficial","base","UD","Member-SUBM"].includes(e.specStatus)){const t="Document is not associated with a [W3C group](https://respec.org/w3c/groups/). Defaulting to 'base' status.",n=pr`Use the ${"[group]"} configuration option to associated this document with a W3C group.`;e.specStatus="base",or(t,Bs,{hint:n})}}}(e),function(e){const{specStatus:t,wg:n}=e,r=[...Ts,...Ls,...As,...Ps,"ED"].includes(t),s=n&&n.length&&r,o=["Member-SUBM"].includes(t);(s||o)&&(e.logos.unshift(Hs),"Member-SUBM"===t&&e.logos.push(Gs))}(e)}});var Ks=String.raw`@keyframes pop{ 0%{transform:scale(1,1)} 25%{transform:scale(1.25,1.25);opacity:.75} 100%{transform:scale(1,1)} } a.internalDFN{color:inherit;border-bottom:1px solid #99c;text-decoration:none} a.externalDFN{color:inherit;border-bottom:1px dotted #ccc;text-decoration:none} a.bibref{text-decoration:none} .respec-offending-element:target{animation:pop .25s ease-in-out 0s 1} .respec-offending-element,a[href].respec-offending-element{text-decoration:red wavy underline} @supports not (text-decoration:red wavy underline){ .respec-offending-element:not(pre){display:inline-block} .respec-offending-element{background:url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=) bottom repeat-x} } #references :target{background:#eaf3ff;animation:pop .4s ease-in-out 0s 1} cite .bibref{font-style:normal} a[href].orcid{padding-left:4px;padding-right:4px} a[href].orcid>svg{margin-bottom:-2px} ol.tof,ul.tof{list-style:none outside none} .caption{margin-top:.5em;font-style:italic} #issue-summary>ul{column-count:2} #issue-summary li{list-style:none;display:inline-block} details.respec-tests-details{margin-left:1em;display:inline-block;vertical-align:top} details.respec-tests-details>*{padding-right:2em} details.respec-tests-details[open]{z-index:999999;position:absolute;border:thin solid #cad3e2;border-radius:.3em;background-color:#fff;padding-bottom:.5em} details.respec-tests-details[open]>summary{border-bottom:thin solid #cad3e2;padding-left:1em;margin-bottom:1em;line-height:2em} details.respec-tests-details>ul{width:100%;margin-top:-.3em} details.respec-tests-details>li{padding-left:1em} .self-link:hover{opacity:1;text-decoration:none;background-color:transparent} aside.example .marker>a.self-link{color:inherit} .header-wrapper{display:flex;align-items:baseline} :is(h2,h3,h4,h5,h6):not(#toc>h2,#abstract>h2,#sotd>h2,.head>h2){position:relative;left:-.5em} :is(h2,h3,h4,h5,h6):not(#toch2)+a.self-link{color:inherit;order:-1;position:relative;left:-1.1em;font-size:1rem;opacity:.5} :is(h2,h3,h4,h5,h6)+a.self-link::before{content:"§";text-decoration:none;color:var(--heading-text)} :is(h2,h3)+a.self-link{top:-.2em} :is(h4,h5,h6)+a.self-link::before{color:#000} @media (max-width:767px){ dd{margin-left:0} } @media print{ .removeOnSave{display:none} }`;const Zs=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=Ks,document.head.appendChild(e),e}();var Js=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&Zs.remove()}});function Qs(){const e=document.createElement("script");e.src="https://www.w3.org/scripts/TR/2021/fixup.js",location.hash&&e.addEventListener("load",(()=>{window.location.href=location.hash}),{once:!0}),document.body.appendChild(e)}const Xs=function(){const e=[{hint:"preconnect",href:"https://www.w3.org"},{hint:"preload",href:"https://www.w3.org/scripts/TR/2021/fixup.js",as:"script"},{hint:"preload",href:to("base.css").href,as:"style"},{hint:"preload",href:to("dark.css").href,as:"style"},{hint:"preload",href:"https://www.w3.org/StyleSheets/TR/2021/logos/W3C",as:"image",corsMode:"anonymous"}],t=document.createDocumentFragment();for(const n of e.map(En))t.appendChild(n);return t}();function eo(e){return t=>{const n=t.querySelector(`head link[href="${e}"]`);t.querySelector("head").append(n)}}function to(e="base.css"){return new URL(`/StyleSheets/TR/2021/${e}`,"https://www.w3.org/")}Xs.appendChild(bn``),document.head.querySelector("meta[name=viewport]")||Xs.prepend(bn``),document.head.prepend(Xs);var no=Object.freeze({__proto__:null,name:"w3c/style",run:function(e){e.noToc||o("end-all",Qs,{once:!0});const t=to(function(e){const t=e.specStatus?.toUpperCase()??"";let n="";const r=[...Ts,...Ls,...As,"ED","MEMBER-SUBM"].includes(t)&&e.wgId;switch(t){case"WD":case"FPWD":n=r?"W3C-WD":"base.css";break;case"CG-DRAFT":case"CG-FINAL":case"BG-DRAFT":case"BG-FINAL":n=t.toLowerCase();break;case"UD":case"UNOFFICIAL":n="W3C-UD";break;case"FINDING":case"DRAFT-FINDING":case"EDITOR-DRAFT-FINDING":case"BASE":n="base.css";break;case"MEMBER-SUBM":n="W3C-Member-SUBM";break;default:n=r?`W3C-${e.specStatus}`:"base.css"}return n}(e));document.head.appendChild(bn``),o("beforesave",eo(t));let n=document.querySelector("head meta[name=color-scheme]");if(n||(n=bn``,document.head.appendChild(n)),n.content.includes("dark")){const e=to("dark.css");document.head.appendChild(bn``),o("beforesave",eo(e))}}});const ro="core/github";let so,oo;const io=new Promise(((e,t)=>{so=e,oo=e=>{or(e,ro),t(new Error(e))}})),ao=On({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 co=Object.freeze({__proto__:null,github:io,name:ro,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void so(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=pr`Config option ${"[github]"} is missing property \`repoURL\`.`;return void oo(e)}let t,n=e.github.repoURL||e.github;n.endsWith("/")||(n+="/");try{t=new URL(n,"https://github.com")}catch{const e=pr`${"[github]"} configuration option is not a valid URL? (${n}).`;return void oo(e)}if("https://github.com"!==t.origin){const e=pr`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${t.href}).`;return void oo(e)}const[r,s]=t.pathname.split("/").filter((e=>e));if(!r||!s){const e=pr`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void oo(e)}const o=e.github.branch||"gh-pages",i=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:i,atRiskBase:i,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{ir("The `githubAPI` configuration option is private and should not be added manually.",ro)}if(!e.excludeGithubLinks){const n={key:ao.participate,data:[{value:`GitHub ${r}/${s}`,href:t},{value:ao.file_a_bug,href:c.issueBase},{value:ao.commit_history,href:a.href},{value:"Pull requests",href:c.pullBase}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(n)}const u={branch:o,repoURL:t.href,apiBase:l,fullName:`${r}/${s}`,issuesURL:i,pullsURL:c.pullBase,newIssuesURL:new URL("./new/choose",i).href,commitHistoryURL:a.href};so(u);const d={...c,...e,github:u,githubAPI:l};Object.assign(e,d)}});class lo{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){const t=this.findHeader(e),n=t?this.findPosition(t):1,r=this.findParent(n);t&&e.removeChild(t),e.appendChild(uo(e)),t&&e.prepend(t),r.appendChild(e),this.current=r}addElement(e){this.current.appendChild(e)}}function uo(e){const t=new lo(e.ownerDocument);for(;e.firstChild;){const n=e.firstChild;switch(n.localName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":t.addHeader(n);break;case"section":t.addSection(n);break;default:t.addElement(n)}}return t.root}function po(e){const t=uo(e);if("section"===t.firstElementChild.localName&&"section"===e.localName){const n=t.firstElementChild;n.remove(),e.append(...n.childNodes)}else e.textContent="";e.appendChild(t)}var fo=Object.freeze({__proto__:null,name:"core/sections",restructure:po,run:function(){po(document.body)}});const ho="core/data-include";function mo(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`),s=zn(e,r.dataset.oninclude,n),o="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let s=t;"markdown"===r&&(s=Rr(s)),"text"===r?e.textContent=s:e.innerHTML=s,"markdown"===r&&po(e),n&&e.replaceWith(...e.childNodes)}(r,s,{replace:o}),o||function(e){["data-include","data-include-format","data-include-replace","data-include-id","oninclude"].forEach((t=>e.removeAttribute(t)))}(r)}async function go(e,t){const n=e.querySelectorAll("[data-include]"),r=Array.from(n).map((async e=>{const n=e.dataset.include;if(!n)return;const r=`include-${String(Math.random()).slice(2)}`;e.dataset.includeId=r;try{const s=await fetch(n);mo(await s.text(),r,n),t<3&&await go(e,t+1)}catch(t){const r=`\`data-include\` failed: \`${n}\` (${t.message}).`;console.error(r,e,t),or(r,ho,{elements:[e]})}}));await Promise.all(r)}var bo=Object.freeze({__proto__:null,name:ho,run:async function(){await go(document,1)}});var yo=Object.freeze({__proto__:null,name:"core/reindent",run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=fr(e.innerHTML)}});const wo="core/title",vo=On({en:{default_title:"No Title"},de:{default_title:"Kein Titel"},zh:{default_title:"无标题"}});var $o=Object.freeze({__proto__:null,name:wo,run:function(e){const t=document.querySelector("h1#title")||bn`

      `;if(t.isConnected&&""===t.textContent.trim()){or('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">`.',wo,{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||`${vo.default_title}`);const n=document.createElement("h1");n.innerHTML=t.innerHTML.replace(/:<br>/g,": ").replace(/<br>/g," - ");let r=jn(n.textContent);if(e.isPreview&&e.prNumber){const n=e.prUrl||`${e.github.repoURL}pull/${e.prNumber}`,{childNodes:s}=bn` 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 ko="w3c/level",xo=On({en:{level:"Level"},ja:{level:"レベル"},nl:{level:"Niveau"},de:{level:"Stufe"},zh:{level:"级别"}});var _o=Object.freeze({__proto__:null,name:ko,run:function(e){if(!e.hasOwnProperty("level"))return;const t=document.querySelector("h1#title"),n=parseInt(e.level);if(!Number.isInteger(n)||n<0){or(`The \`level\` configuration option must be a number greater or equal to 0. It is currently set to \`${n}\``,ko,{title:"Invalid level config.",elements:[t]})}else t.append(` ${xo.level} ${n}`),document.title=`${document.title} ${xo.level} ${n}`,e.shortName=`${e.shortName}-${n}`,e.level=n}});const Co="w3c/abstract",So=On({en:{abstract:"Abstract"},ko:{abstract:"요약"},zh:{abstract:"摘要"},ja:{abstract:"要約"},nl:{abstract:"Samenvatting"},es:{abstract:"Resumen"},de:{abstract:"Zusammenfassung"}});var Ro=Object.freeze({__proto__:null,name:Co,run:async function(){const e=function(){const e=document.getElementById("abstract");if(e)switch(e.localName){case"section":return e;case"div":return Vn(e,"section");default:return or("The abstract should be a `<section>` element.",Co,{elements:[e]}),e}const t=So.abstract.toLocaleLowerCase(l);for(const e of document.querySelectorAll("h2, h3, h4, h5, h6"))if(jn(e.textContent).toLocaleLowerCase(l)===t)return e.closest("section");return e}();e?(e.classList.add("introductory"),e.id="abstract",e.querySelector("h2")||e.prepend(bn`<h2>${So.abstract}</h2>`)):or('Document must have one `<section id="abstract">`.',Co)}});var Eo=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach((e=>{e.innerHTML=zn(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")}))}});const Ao="core/dfn-abbr";function To(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 Lo=Object.freeze({__proto__:null,name:Ao,run:function(){const e=document.querySelectorAll("[data-abbr]");for(const t of e){const{localName:e}=t;if("dfn"===e)To(t);else{or(`\`data-abbr\` attribute not supported on \`${e}\` elements.`,Ao,{elements:[t],title:"Error: unsupported."})}}}});const Po=/^[a-z]+(\s+[a-z]+)+\??$/,Io=/\B"([^"]*)"\B/,Do=/^(\w+)\(([^\\)]*)\)(?:\|(\w+)(?:\((?:([^\\)]*))\))?)?$/,No=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,jo=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,Oo=/^(?:\w+)\??$/,Mo=/^(\w+)\["([\w- ]*)"\]$/,qo=/\.?(\w+\(.*\)$)/,zo=/\/(.+)/,Uo=/\[\[.+\]\]/;function Wo(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return bn`<a data-xref-type="_IDL_" data-link-type="idl" data-lt="${t}" ><code>${t+(r?"?":"")}</code></a >`}function Fo(e){const{identifier:t,parent:n,slotType:r,renderParent:s,args:o}=e,{identifier:i}=n||{},a="method"===r,c=a?bn`(${Wn(o,Bo)})`:null,l=a?`(${o.join(", ")})`:"";return bn`${n&&s?".":""}<a data-xref-type="${r}" data-link-type="${r}" data-link-for="${i}" data-xref-for="${i}" data-lt="${`[[${t}]]${l}`}" ><code>[[${t}]]${c}</code></a >`}function Bo(e,t,n){if(t<n.length-1)return bn`<var>${e}</var>`;const r=e.split(/(^\.{3})(.+)/),s=r.length>1,o=s?r[2]:r[0];return bn`${s?"...":null}<var>${o}</var>`}function Ho(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:s}=t||{};return bn`${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 Go(e){const{args:t,identifier:n,type:r,parent:s,renderParent:o}=e,{renderText:i,renderArgs:a}=e,{identifier:c}=s||{},l=Wn(a||t,Bo),u=`${n}(${t.join(", ")})`;return bn`${s&&o?".":""}<a data-link-type="idl" data-xref-type="${r}" data-link-for="${c}" data-xref-for="${c}" data-lt="${u}" ><code>${i||n}</code></a >${!i||a?bn`<code>(${l})</code>`:""}`}function Vo(e){const{identifier:t,enumValue:n,parent:r}=e,s=r?r.identifier:t;return bn`"<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 Yo(e){const{identifier:t}=e;return bn`"<a data-link-type="idl" data-cite="webidl" data-xref-type="exception" ><code>${t}</code></a >"`}function Ko(e){const{identifier:t,nullable:n}=e;return bn`<a data-link-type="idl" data-cite="webidl" data-xref-type="interface" data-lt="${t}" ><code>${t+(n?"?":"")}</code></a >`}function Zo(e){let t;try{t=function(e){const t=Uo.test(e),n=t?zo:qo,[r,s]=e.split(n);if(t&&r&&!s)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const o=r.split(/[./]/).concat(s).filter((e=>e&&e.trim())).map((e=>e.trim())),i=!e.includes("/"),a=[];for(;o.length;){const t=o.pop();if(Do.test(t)){const[,e,n,r,s]=t.match(Do),o=n.split(/,\s*/).filter((e=>e)),c=r?.trim(),l=s?.split(/,\s*/).filter((e=>e));a.push({type:"method",identifier:e,args:o,renderParent:i,renderText:c,renderArgs:l})}else if(Mo.test(t)){const[,e,n]=t.match(Mo);a.push({type:"enum",identifier:e,enumValue:n,renderParent:i})}else if(Io.test(t)){const[,e]=t.match(Io);i?a.push({type:"exception",identifier:e}):a.push({type:"enum",enumValue:e,renderParent:i})}else if(No.test(t)){const[,e,n]=t.match(No),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:i})}else if(jo.test(t)&&o.length){const[,e]=t.match(jo);a.push({type:"attribute",identifier:e,renderParent:i})}else if(Po.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:i,nullable:e})}else{if(!Oo.test(t)||0!==o.length)throw new SyntaxError(`IDL micro-syntax parsing error in \`{{ ${e} }}\``);{const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"base",identifier:n,renderParent:i,nullable:e})}}}return a.forEach(((e,t,n)=>{e.parent=n[t+1]||null})),a.reverse()}(e)}catch(t){const n=bn`<span>{{ ${e} }}</span>`,r="Error: Invalid inline IDL string.";return or(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=bn(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=Wo(e);t&&r.push(t);break}case"attribute":r.push(Ho(e));break;case"internal-slot":r.push(Fo(e));break;case"method":r.push(Go(e));break;case"enum":r.push(Vo(e));break;case"exception":r.push(Yo(e));break;case"idl-primitive":r.push(Ko(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const Jo=new Set(["alias","reference"]),Qo=async function(){const e=await yn.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[...Jo]){const r=e.transaction(n,"readwrite").store,s=IDBKeyRange.lowerBound(t);let o=await r.openCursor(s);for(;o?.value;){const e=o.value;(void 0===e.expires||e.expires<t)&&await r.delete(e.id),o=await o.continue()}}return e}();const Xo={get ready(){return Qo},async find(e){return await this.isAlias(e)&&(e=await this.resolveAlias(e)),await this.get("reference",e)},async has(e,t){if(!Jo.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(!Jo.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=[...Jo].flatMap((e=>n[e].map((t=>this.add(e,t)))));await Promise.all(r)},async add(e,t){if(!Jo.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=[...Jo],n=e.transaction(t,"readwrite"),r=t.map((e=>n.objectStore(e).clear()));await Promise.all(r)}},ei={},ti=new URL("https://api.specref.org/bibrefs?refs="),ni=En({hint:"dns-prefetch",href:ti.origin});let ri;document.head.appendChild(ni);const si=new Promise((e=>{ri=e}));async function oi(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(ti.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(),o=Date.now()+36e5;try{const e=r.headers.has("Expires")?Math.min(Date.parse(r.headers.get("Expires")),o):o;await Xo.addAll(s,e)}catch(e){console.error(e)}return s}async function ii(e){const t=await si;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await ii(n.aliasOf):n}var ai=Object.freeze({__proto__:null,Plugin:class{constructor(e){this.conf=e}normalizeReferences(){const e=new Set([...this.conf.normativeReferences].map((e=>e.toLowerCase())));Array.from(this.conf.informativeReferences).filter((t=>e.has(t.toLowerCase()))).forEach((e=>this.conf.informativeReferences.delete(e)))}getRefKeys(){return{informativeReferences:Array.from(this.conf.informativeReferences),normativeReferences:Array.from(this.conf.normativeReferences)}}async run(){this.conf.localBiblio||(this.conf.localBiblio={}),this.conf.biblio=ei;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 Xo.ready;const n=e.map((async e=>({id:e,data:await Xo.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=>{ei[e.id]=e.data}));const o=s.noData.map((e=>e.id));if(o.length){const e=await oi(o,{forceUpdate:!0});Object.assign(ei,e)}Object.assign(ei,this.conf.localBiblio),(()=>{ri(this.conf.biblio)})()}},biblio:ei,name:"core/biblio",resolveRef:ii,updateFromNetwork:oi});const ci="core/render-biblio",li=On({en:{info_references:"Informative references",norm_references:"Normative references",references:"References",reference_not_found:"Reference not found."},ko:{references:"참조"},nl:{info_references:"Informatieve referenties",norm_references:"Normatieve referenties",references:"Referenties"},es:{info_references:"Referencias informativas",norm_references:"Referencias normativas",references:"Referencias",reference_not_found:"Referencia no encontrada."},ja:{info_references:"参照用参考文献",norm_references:"規範的参考文献",references:"参考文献"},de:{info_references:"Weiterführende Informationen",norm_references:"Normen und Spezifikationen",references:"Referenzen"},zh:{info_references:"非规范性引用",norm_references:"规范性引用",references:"参考文献"}}),ui=new Map([["CR","W3C Candidate Recommendation"],["ED","W3C Editor's Draft"],["LCWD","W3C Last Call Working Draft"],["NOTE","W3C Working Group Note"],["PR","W3C Proposed Recommendation"],["REC","W3C Recommendation"],["WD","W3C Working Draft"]]),di=(pi=".",e=>{const t=e.trim();return!t||t.endsWith(pi)?t:t+pi});var pi;function fi(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(hi)),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),o=s.concat(r).sort(((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase()))),i=bn`<section> <h3>${t}</h3> <dl class="bibliography">${o.map(gi)}</dl> </section>`;Hn(i,"",t);const a=function(e){return e.reduce(((e,t)=>{const n=t.refcontent.id;return(e.has(n)?e.get(n):e.set(n,[]).get(n)).push(t.ref),e}),new Map)}(n);return function(e,t){e.map((({ref:e,refcontent:n})=>{const r=`#bib-${e.toLowerCase()}`,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,a),function(e){for(const{ref:t}of e){const e=[...document.querySelectorAll(`a.bibref[href="#bib-${t.toLowerCase()}"]`)].filter((({textContent:e})=>e.toLowerCase()===t.toLowerCase()));or(`Reference "[${t}]" not found.`,ci,{hint:`Search for ["${t}"](https://www.specref.org?q=${t}) on Specref to see if it exists or if it's misspelled.`,elements:e})}}(r),i}function hi(e){let t=ei[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;or(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,ci)}else n=t.aliasOf,t=ei[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function mi(e,t){const n=e.replace(/^(!|\?)/,""),r=`#bib-${n.toLowerCase()}`,s=bn`<cite ><a class="bibref" href="${r}" data-link-type="biblio">${t||n}</a></cite >`;return t?s:bn`[${s}]`}function gi(e){const{ref:t,refcontent:n}=e,r=`bib-${t.toLowerCase()}`;return bn` <dt id="${r}">[${t}]</dt> <dd> ${n?{html:bi(n)}:bn`<em class="respec-offending-element" >${li.reference_not_found}</em >`} </dd> `}function bi(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} ${di(e.publisher)} `),e.date&&(t+=`${e.date}. `),e.status&&(t+=`${ui.get(e.status)||e.status}. `),e.href&&(t+=`URL: <a href="${e.href}">${e.href}</a>`),t}var yi=Object.freeze({__proto__:null,name:ci,renderInlineCitation:mi,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")||bn`<section id="references"></section>`;if(document.querySelector("section#references > :is(h2, h1)")||r.prepend(bn`<h1>${li.references}</h1>`),r.classList.add("appendix"),n.length){const e=fi(n,li.norm_references);r.appendChild(e)}if(t.length){const e=fi(t,li.info_references);r.appendChild(e)}document.body.appendChild(r)}});const wi="core/inlines",vi={},$i=e=>new RegExp(e.map((e=>e.source)).join("|")),ki=On({en:{rfc2119Keywords:()=>$i([/\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:()=>$i([/\bMUSS\b/,/\bMÜSSEN\b/,/\bERFORDERLICH\b/,/\b(?:NICHT\s+)?NÖTIG\b/,/\bDARF(?:\s+NICHT)?\b/,/\bDÜRFEN(?:\s+NICHT)?\b/,/\bVERBOTEN\b/,/\bSOLL(?:\s+NICHT)?\b/,/\bSOLLEN(?:\s+NICHT)?\b/,/\b(?:NICHT\s+)?EMPFOHLEN\b/,/\bKANN\b/,/\bKÖNNEN\b/,/\bOPTIONAL\b/])}}),xi=/(?:`[^`]+`)(?!`)/,_i=/(?:{{[^}]+\?*}})/,Ci=/\B\|\w[\w\s]*(?:\s*:[\w\s&;"<>]+\??)?\|\B/,Si=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,Ri=/(?:\[\[\[(?:!|\\|\?)?#?[\w-.]+\]\]\])/,Ei=/(?:\[=[^=]+=\])/,Ai=/(?:\[\^[^^]+\^\])/;function Ti(e){const t=e.slice(2,-2).trim(),[n,r,s]=t.split("/",3).map((e=>e&&e.trim())).filter((e=>!!e)),[o,i,a]=t.startsWith("/")?["element-attr",null,n]:s?["attr-value",`${n}/${r}`,s]:r?["element-attr",n,r]:["element",null,n];return bn`<code ><a data-xref-type="${o}" data-xref-for="${i}" data-link-type="${o}" data-link-for="${i}" >${a}</a ></code >`}function Li(e){const t=jn(e),n=bn`<em class="rfc2119">${t}</em>`;return vi[t]=!0,n}function Pi(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?bn`<a href="${t}" data-matched-text="${e}"></a>`:bn`<a data-cite="${t}" data-matched-text="${e}"></a>`}function Ii(e,t){const n=jn(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=Zo(n);return!!t.parentElement.closest("dfn")?Mi(`\`${r.textContent}\``):r}function Di(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[s,o]=r.split("|").map(jn),{type:i,illegal:a}=Yn(s,t.parentElement),c=mi(s,o),l=s.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;ir("Normative references in informative sections are not allowed. ",wi,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function Ni(e,t,n){return"ABBR"===t.parentElement.tagName?e:bn`<abbr title="${n.get(e)}">${e}</abbr>`}function ji(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return bn`<var data-type="${r}">${n}</var>`}function Oi(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(jn).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const s=n.substring(0,r),o=n.substring(r+1,n.length);return[t(s),t(o)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[s,o]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=qi(o),a=n?jn(n):null;return bn`<a data-link-type="dfn|abstract-op" data-link-for="${a}" data-xref-for="${a}" data-lt="${s}" >${i}</a >`}function Mi(e){const t=e.slice(1,-1);return bn`<code>${t}</code>`}function qi(e){return xi.test(e)?e.split(/(`[^`]+`)(?!`)/).map((e=>e.startsWith("`")?Mi(e):qi(e))):document.createTextNode(e)}var zi=Object.freeze({__proto__:null,name:wi,rfc2119Usage:vi,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new Xn,e.informativeReferences=new Xn,e.respecRFC2119||(e.respecRFC2119=vi);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=jn(e),s=jn(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)),o=[];let i;for(;i=s.nextNode();)o.push(i);return o}(document.body,["#respec-ui",".head","pre","svg"],{wsNodes:!1}),o=ki.rfc2119Keywords(),i=new RegExp(`(${$i([o,_i,Ci,Si,Ri,Ei,xi,Ai,...r?[r]:[]]).source})`);for(const n of s){const r=n.data.split(i);if(1===r.length)continue;const s=document.createDocumentFragment();let a=!0;for(const i of r)if(a=!a,a)switch(!0){case i.startsWith("{{"):s.append(Ii(i,n));break;case i.startsWith("[[["):s.append(Pi(i));break;case i.startsWith("[["):s.append(...Di(i,n,e));break;case i.startsWith("|"):s.append(ji(i));break;case i.startsWith("[="):s.append(Oi(i));break;case i.startsWith("`"):s.append(Mi(i));break;case i.startsWith("[^"):s.append(Ti(i));break;case t.has(i):s.append(Ni(i,n,t));break;case o.test(i):s.append(Li(i))}else s.append(i);n.replaceWith(s)}}});const Ui="w3c/conformance",Wi=On({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)=>bn`<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> ${mi("RFC2119")} ${mi("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)=>bn`<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> ${mi("RFC2119")} ${mi("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 Fi=Object.freeze({__proto__:null,name:Ui,run:function(e){const t=document.querySelector("section#conformance");if(t&&!t.classList.contains("override")&&function(e,t){const n=[...Object.keys(vi)];n.length&&(t.normativeReferences.add("RFC2119"),t.normativeReferences.add("RFC8174"));const r=Fn(n.sort(),(e=>bn`<em class="rfc2119">${e}</em>`)),s=n.length>1,o=bn` <h1>${Wi.conformance}</h1> <p>${Wi.normativity}</p> ${n.length?Wi.keywordInterpretation(r,s):null} `;e.prepend(...o.childNodes)}(t,e),!t&&Object.keys(vi).length){ir("Document uses RFC2119 keywords but lacks a conformance section.",Ui,{hint:'Please add a `<section id="conformance">`.'})}}});function Bi(e,t,n,r){try{switch(t){case"element-attr":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(s){or(`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 Hi(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return or(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const Gi=new rr;function Vi(e,t){for(const n of t)Gi.has(n)||Gi.set(n,new Set),Gi.get(n).add(e)}const Yi="core/dfn",Ki=new Map([["abstract-op",{requiresFor:!1}],["attr-value",{requiresFor:!0,associateWith:"a markup attribute",validator:Hi}],["element",{requiresFor:!1,validator:Bi}],["element-attr",{requiresFor:!1,validator:Bi}],["element-state",{requiresFor:!0,associateWith:"a markup attribute",validator:Hi}],["event",{requiresFor:!1,validator:Hi}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new vn(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(s){return or(`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:Hi}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?Hi(e.slice(1,-1),t,n,r):(or(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),Zi=[...Ki.keys()];function Ji(e,t){let n="";switch(!0){case Zi.some((t=>e.classList.contains(t))):n=[...e.classList].find((e=>Ki.has(e))),function(e,t,n){const r=Ki.get(t);if(r.requiresFor&&!n.dataset.dfnFor){const e=pr`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:s}=r,o=pr`Use a ${"[data-dfn-for]"} attribute to associate this with ${s}.`;or(e,Yi,{hint:o,elements:[n]})}r.validator&&r.validator(e,t,n,Yi)}(t,n,e);break;case No.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=pr`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;or(`Internal slot "${e}" must be associated with a WebIDL interface.`,Yi,{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:o}=t.dataset;if(!s.includes(o)||r!==o){const n=pr`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,o=`The only allowed types are: ${lr(s,{quotes:!0})}. The slot "${e}" seems to be a "${cr(r)}"?`;return or(n,Yi,{hint:o,elements:[t]}),"dfn"}return o}(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 Qi(e){switch(!0){case e.matches(".export.no-export"):or(pr`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,Yi,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){or(pr`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,Yi,{elements:[e],hint:"Please chose only one."}),delete e.dataset.export}e.dataset.noexport="";break;case e.matches(":is(.export):not([data-noexport], .no-export)"):e.dataset.export=""}}var Xi=Object.freeze({__proto__:null,name:Yi,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Gn(e);if(Vi(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;Ji(e,n),Qi(e),1===t.length&&n===jn(e.textContent)||(e.dataset.lt=t.join("|"))}}});var ea=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=jn(t.textContent).toLowerCase();e.add(n),t.dataset.lt&&e.add(t.dataset.lt)}));const t=new Set,n=document.querySelectorAll("dfn:not([data-lt-noDefault])");return n.forEach((e=>{const n=jn(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=jn(n).toLowerCase(),s=$n.isSingular(r)?$n.plural(r):$n.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("|"),Vi(e,n)}}))}});var ta=String.raw`span.example-title{text-transform:none} :is(aside,div).example,div.illegal-example{padding:.5em;margin:1em 0;position:relative;clear:both} div.illegal-example{color:red} div.illegal-example p{color:#000} aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}`;const na=On({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"}});function ra(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?` ${t}`:"",s=n.title?bn`<span class="example-title">: ${n.title}</span>`:"";return bn`<div class="marker"> <a class="self-link">${na.example}<bdi>${r}</bdi></a >${s} </div>`}var sa=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(bn`<style> ${ta} </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=ra(e,t,r);e.prepend(n);const o=Hn(e,"example",s||String(t));n.querySelector("a.self-link").href=`#${o}`}else{const n=!!e.closest("aside");n||++t,r.content=e.innerHTML,e.classList.remove("example","illegal-example");const o=e.id?e.id:null;o&&e.removeAttribute("id");const i=ra(e,n?0:t,r),a=bn`<div class="example" id="${o}"> ${i} ${e.cloneNode(!0)} </div>`;Hn(a,"example",s||String(t));a.querySelector("a.self-link").href=`#${a.id}`,e.replaceWith(a)}}))}});var oa=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} .issue.closed span.issue-number{text-decoration:line-through} .issue.closed span.issue-number::after{content:" (Closed)";font-size:smaller} .warning{border-color:#f11;border-color:var(--warning-border,#f11);border-width:.2em;border-style:solid;background:#fbe9e9;background:var(--warning-bg,#fbe9e9);color:#000;color:var(--text,#000)} .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 ia="core/issues-notes",aa=On({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 ca(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:o,displayType:i,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"),o=t?"issue":n?"warning":r?"ednote":"note",i=t?s?aa.feature_at_risk:aa.issue:n?aa.warning:r?aa.editors_note:aa.note;return{type:o,displayType:i,isFeatureAtRisk:s}}(e),c="issue"===o,l="span"===e.localName,{number:u}=e.dataset,d={type:o,inline:l,title:e.title,number:r(e)};if(!l){const r=bn`<div class="${a?`${o} atrisk`:o}" role="${"note"===o?"note":null}"></div>`,l=document.createElement("span"),p=bn`<div role="heading" class="${`${o}-title marker`}">${l}</div>`;Hn(p,"h",o);let f,h=i;if(e.id?(r.id=e.id,e.removeAttribute("id")):Hn(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 bn`<a href="${t.issueBase+e}" />`;if(n&&t.atRiskBase)return bn`<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){ir(`Failed to fetch issue number ${u}.`,ia)}f&&!d.title&&(d.title=f.title)}s.append(function(e,t,n){const r=`${e}${t.number?` ${t.number}`:""}`,s=t.title?bn`<span style="text-transform: none">: ${t.title}</span>`:"";return bn`<li><a href="${`#${n}`}">${r}</a>${s}</li>`}(aa.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 o=function(e){const[t,n,r]=[e.slice(0,2),e.slice(2,4),e.slice(4,6)],[s,o,i]=[t,n,r].map((e=>parseInt(e,16)/255)).map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4));return.2126*s+.7152*o+.0722*i>.179?"#000":"#fff"}(n),i=`background-color: #${n}; color: ${o}`,a=`GitHub label: ${r}`;return bn` <a class="respec-gh-label" style="${i}" href="${s.href}" aria-label="${a}" >${r}</a >`}(e,n)));r.length&&r.unshift(document.createTextNode(" "));return bn`<span class="issue-label">: ${t}${r}</span>`}(s,d.title,t))}let m=e;e.replaceWith(r),m.classList.remove(o),m.removeAttribute("data-number"),f&&!m.innerHTML.trim()&&(m=document.createRange().createContextualFragment(f.bodyHTML)),r.append(p,m);const g=Jn(p,"section").length+2;p.setAttribute("aria-level",g)}})),function(e){const t=document.getElementById("issue-summary");if(!t)return;const n=t.querySelector("h2, h3, h4, h5, h6");e.hasChildNodes()?t.append(e):t.append(bn`<p>${aa.no_issues_in_spec}</p>`),(!n||n&&n!==t.firstElementChild)&&t.insertAdjacentHTML("afterbegin",`<h1>${aa.issue_summary}</h1>`)}(s)}var la=Object.freeze({__proto__:null,name:ia,run:async function(e){const t=document.querySelectorAll(".issue, .note, .warning, .ednote"),n=Array.from(t).filter((e=>e instanceof HTMLElement));if(!n.length)return;const r=await async function(e){if(!e||!e.apiBase)return new Map;const t=[...document.querySelectorAll(".issue[data-number]")].map((e=>Number.parseInt(e.dataset.number,10))).filter((e=>e));if(!t.length)return new Map;const n=new URL("issues",`${e.apiBase}/${e.fullName}/`);n.searchParams.set("issues",t.join(","));const r=await fetch(n.href);if(!r.ok)return or(`Error fetching issues from GitHub. (HTTP Status ${r.status}).`,ia),new Map;const s=await r.json();return new Map(Object.entries(s))}(e.github),{head:s}=document;s.insertBefore(bn`<style> ${oa} </style>`,s.querySelector("link")),ca(n,r,e),document.querySelectorAll(".ednote").forEach((e=>{e.classList.remove("ednote"),e.classList.add("note")}))}});const ua="core/best-practices",da={en:{best_practice:"Best Practice "},ja:{best_practice:"最良実施例 "},de:{best_practice:"Musterbeispiel "},zh:{best_practice:"最佳实践 "}},pa=On(da),fa=l in da?l:"en";var ha=Object.freeze({__proto__:null,name:ua,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=Hn(e,"bp"),s=bn`<a class="marker self-link" href="${`#${r}`}" ><bdi lang="${fa}">${pa.best_practice}${t+1}</bdi></a >`;if(n){const t=bn`<li>${s}: ${er(e)}</li>`;n.appendChild(t)}const o=e.closest("div");if(!o)return void e.classList.add("advisement");o.classList.add("advisement");const i=bn`${s.cloneNode(!0)}: ${e}`;o.prepend(...i.childNodes)})),e.length)t&&(t.appendChild(bn`<h1>Best Practices Summary</h1>`),t.appendChild(n));else if(t){ir("Using best practices summary (#bp-summary) but no best practices found.",ua),t.remove()}}});const ma="core/figures",ga=On({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 ba=Object.freeze({__proto__:null,name:ma,run:function(){const e=function(){const e=[];return document.querySelectorAll("figure").forEach(((t,n)=>{const r=t.querySelector("figcaption");if(r)!function(e,t,n){const r=t.textContent;Hn(e,"fig",r),Kn(t,bn`<span class="fig-title"></span>`),t.prepend(bn`<a class="self-link" href="#${e.id}" >${ga.fig}<bdi class="figno">${n+1}</bdi></a >`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach((e=>{Vn(e,"span").removeAttribute("href")})),bn`<li class="tofline"> <a class="tocxref" href="${`#${e}`}">${n.childNodes}</a> </li>`}(t.id,r));else{ir("Found a `<figure>` without a `<figcaption>`.",ma,{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=Zn(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(bn`<h1>${ga.list_of_figures}</h1>`,bn`<ul class="tof"> ${e} </ul>`))}});const ya=On({en:{list_of_tables:"List of Tables",table:"Table "}});var wa=Object.freeze({__proto__:null,name:"core/tables",run:function(){const e=function(){const e=[],t=document.querySelectorAll("table.numbered");return[...t].filter((e=>!!e.querySelector("caption"))).forEach(((t,n)=>{const r=t.querySelector("caption");!function(e,t,n){const r=t.textContent;Hn(e,"table",r),Kn(t,bn`<span class="table-title"></span>`),t.prepend(bn`<a class="self-link" href="#${e.id}" >${ya.table}<bdi class="tableno">${n+1}</bdi></a >`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);for(const e of n.querySelectorAll("a"))Vn(e,"span",{copyAttributes:!1});return bn`<li> <a class="tocxref" href="${`#${e}`}" >${n.childNodes}</a > </li>`}(t.id,r))})),e}(),t=document.querySelector("section#list-of-tables");e.length&&t&&(!function(e){if(e.matches(".appendix, .introductory")||e.closest("section"))return;const t=Zn(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(bn`<h1>${ya.list_of_tables}</h1>`,bn`<ul class="list-of-tables"> ${e} </ul>`))}});const va=new Set(["callback interface","callback","dictionary","enum","interface mixin","interface","typedef"]);function $a(e,t,{parent:n=""}={}){switch(e.type){case"constructor":case"operation":return function(e,t,n){if(n.includes("!overload"))return ka(e,t,n);const r=`${n}()`;return ka(e,t,r,n)}(e,n,t);default:return ka(e,n,t)}}function ka(e,t,...n){const{type:r}=e;for(const e of n){let n="enum-value"===r&&""===e?"the-empty-string":e,s=_a(n,t,e,r);if(0===s.length&&""!==t){n=`${t}.${n}`;const e=Gi.get(n);e&&1===e.size&&(s=[...e],Vi(s[0],[n]))}else n=e;if(s.length>1){or(`WebIDL identifier \`${e}\` ${t?`for \`${t}\``:""} is defined multiple times`,e,{title:"Duplicate definition.",elements:s})}if(s.length)return s[0]}}function xa(e,t,n,r){if(!e.id){const t=n.toLowerCase(),s=t?`${t}-`:"";let o=r.toLowerCase().replace(/[()]/g,"").replace(/\s/g,"-");""===o&&(o="the-empty-string",e.setAttribute("aria-label","the empty string")),e.id=`dom-${s}${o}`}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||Kn(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("|"),Vi(e,[...n,...r])}(e,function(e,t,n){const{type:r}=e,s=`${t}.${n}`;switch(r){case"constructor":case"operation":{const t=`${n}()`,r=`${s}()`,o=function(e,t){const n=[];if(0===t.length)return n;const r=[],s=[];for(const{name:e,optional:n,variadic:o}of t)n||o?s.push(e):r.push(e);const o=r.join(", "),i=`${e}(${o})`;n.push(i);const a=s.map(((t,n)=>{const o=[...r,...s.slice(0,n+1)].join(", ");return`${e}(${o})`}));return n.push(...a),n}(n,e.arguments);return{local:[s,r,n],exportable:[t,...o]}}case"attribute":return{local:[s],exportable:[n]}}}(t,n,r))}return e}function _a(e,t,n,r){const s=Gi.get(e);if(!s||0===s.size)return[];const o=[...s],i=o.filter((e=>{if("dfn"===e.dataset.dfnType)return!1;const n=e.closest("[data-dfn-for]");return n&&n.dataset.dfnFor===t}));if(0===i.length&&""===t&&1===o.length)return o[0].textContent===n?o:[];if(va.has(r)&&o.length){const e=o.find((e=>e.textContent.trim()===n));if(e)return[e]}return i}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 Sa=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 Ra(e){const t=e.closest("pre.idl").cloneNode(!0);t.querySelector(".idlHeader").remove();const{textContent:n}=t,r=Sa.cloneNode(!0);r.addEventListener("click",(()=>{navigator.clipboard.writeText(n)})),e.append(r)}var Ea=Object.freeze({__proto__:null,addCopyIDLButton:Ra,name:"core/webidl-clipboard"});var Aa=String.raw`pre.idl{padding:1em;position:relative} pre.idl>code{color:#000;color:var(--text,#000)} @media print{ pre.idl{white-space:pre-wrap} } .idlHeader{display:block;width:150px;background:#8ccbf2;background:var(--def-border,#8ccbf2);color:#fff;color:var(--defrow-border,#fff);font-family:sans-serif;font-weight:700;margin:-1em 0 1em -1em;height:28px;line-height:28px} .idlHeader a.self-link{margin-left:.3cm;text-decoration:none;border-bottom:none;color:inherit} .idlID{font-weight:700;color:#005a9c} .idlType{color:#005a9c} .idlName{color:#ff4500} .idlName a{color:#ff4500;border-bottom:1px dotted #ff4500;text-decoration:none} a.idlEnumItem{color:#000;border-bottom:1px dotted #ccc;text-decoration:none} .idlSuperclass{font-style:italic;color:#005a9c} .idlDefaultValue,.idlParamName{font-style:italic} .extAttr{color:#666} .idlSectionComment{color:gray} .idlIncludes a{font-weight:700} .respec-button-copy-paste:focus{text-decoration:none;border-color:#51a7e8;outline:0;box-shadow:0 0 5px rgba(81,167,232,.5)} .respec-button-copy-paste:is(:focus:hover,.selected:focus){border-color:#51a7e8} .respec-button-copy-paste:is(:hover,:active,.zeroclipboard-is-hover,.zeroclipboard-is-active){text-decoration:none;background-color:#ddd;background-image:linear-gradient(#eee,#ddd);border-color:#ccc} .respec-button-copy-paste:is(:active,.selected,.zeroclipboard-is-active){background-color:#dcdcdc;background-image:none;border-color:#b5b5b5;box-shadow:inset 0 2px 4px rgba(0,0,0,.15)} .respec-button-copy-paste.selected:hover{background-color:#cfcfcf} .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 Ta="core/webidl",La=Ta,Pa={},Ia={},Da={wrap:e=>e.flat().filter((e=>""!==e)).map((e=>"string"==typeof e?new Text(e):e)),trivia:e=>e.trim()?bn`<span class="idlSectionComment">${e}</span>`:e,generic:e=>/^[A-Z]/.test(e)?bn`<a data-xref-type="interface" data-cite="WEBIDL">${e}</a>`:bn`<a data-xref-type="dfn" data-cite="WEBIDL">${e}</a>`,reference(e,t,n){if("extended-attribute"===n.type)return e;let r="_IDL_",s=null;if("object"===t)r="interface",s="WEBIDL";return bn`<a data-link-type="${"_IDL_"===r?"idl":r}" data-xref-type="${r}" data-cite="${s}" data-lt="${undefined}" >${e}</a >`},name(e,{data:t,parent:n}){if(t.idlType&&"argument-type"===t.idlType.type)return bn`<span class="idlParamName">${e}</span>`;const r=Na(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 Na(e,t,n);default:return e}},type:e=>bn`<span class="idlType">${e}</span>`,inheritance:e=>bn`<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 bn`<span class="${r}">${e}</span>`}const s=n?n.name:"",{name:o,idlId:i}=Oa(t,s);return bn`<span class="${r}" id="${i}" data-idl data-title="${o}" >${e}</span >`},extendedAttribute:e=>bn`<span class="extAttr">${e}</span>`,extendedAttributeReference:e=>bn`<a data-xref-type="extended-attribute">${e}</a>`};function Na(e,t,n){const r=n?n.name:"",{name:s}=Oa(t,r),o=$a(t,s,{parent:r}),i=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(o){t.partial||(o.matches("[data-noexport]")||(o.dataset.export=""),o.dataset.dfnType=i),xa(o,t,r,s);const n=`#${o.id}`;return bn`<a data-link-for="${r}" data-link-type="${i}" href="${n}" class="internalDFN" ><code>${e}</code></a >`}const a="operation"===t.type&&"toJSON"===t.name&&t.extAttrs.some((({name:e})=>"Default"===e));if(a)return bn`<a data-link-type="dfn" data-lt="default toJSON steps" >${e}</a >`;if(!t.partial){const n=bn`<dfn data-export data-dfn-type="${i}" >${e}</dfn >`;return Vi(n,[s]),xa(n,t,r,s),n}const c=bn`<a data-idl="${t.partial?"partial":null}" data-link-type="${i}" data-title="${t.name}" data-xref-type="${i}" >${e}</a >`;if(s&&"typedef"!==t.type&&!(t.partial&&!o)){const e=pr`See ${"using `data-dfn-for`|#data-dfn-for"} in ReSpec's documentation.`;ir(`Missing \`<dfn>\` for${r?` \`${r}\`'s`:""} \`${"operation"===t.type?`${s}()`:s}\` ${t.type}.`,La,{elements:[c],hint:e})}return c}const ja=new WeakMap;function Oa(e,t=""){if(ja.has(e))return ja.get(e);const n=function(e,t){let n=function(e){switch(e.type){case"enum-value":return e.value;case"operation":return e.name||e.special;default:return e.name||e.type}}(e);const r=e.special&&""===e.name?"anonymous-":"";let s=function(e,t){if(!t)return`idl-def-${e.toLowerCase()}`;return`idl-def-${t.toLowerCase()}-${e.toLowerCase()}`}(r+n,t);switch(e.type){case"callback interface":case"dictionary":case"interface":case"interface mixin":s+=function(e){if(!e.partial)return"";Ia[e.name]||(Ia[e.name]=0);return Ia[e.name]+=1,`-partial-${Ia[e.name]}`}(e);break;case"constructor":case"operation":{const r=function(e,t){const n=`${t}.${e}`,r=`${n}()`;let s;Pa[r]||(Pa[r]=0);Pa[n]?s=`!overload-${Pa[n]}`:Pa[n]=0;return Pa[r]+=1,Pa[n]+=1,s||""}(n,t);r?(n+=r,s+=r):e.arguments.length&&(s+=e.arguments.map((e=>`-${e.name.toLowerCase()}`)).join(""));break}}return{name:n,idlId:s}}(e,t);return ja.set(e,n),n}const Ma=["interface","interface mixin","dictionary","namespace","enum","typedef","callback"];function qa(e,t){let n;try{n=kn.parse(e.textContent,{sourceName:String(t)})}catch(t){return or(`Failed to parse WebIDL: ${t.bareMessage}.`,La,{title:t.bareMessage,details:`<pre>${t.context}</pre>`,elements:[e]}),[]}e.classList.add("def","idl");const r=kn.write(n,{templates:Da});bn.bind(e)`${r}`,Kn(e,document.createElement("code")),e.querySelectorAll("[data-idl]").forEach((e=>{if(e.dataset.dfnFor)return;const t=e.dataset.title,n=e.dataset.dfnType,r=e.parentElement.closest("[data-idl][data-title]");r&&!Ma.includes(n)&&(e.dataset.dfnFor=r.dataset.title),"dfn"===e.localName&&Vi(e,[t])}));const s=e.closest("[data-cite], body"),{dataset:o}=s;if(o.cite||(o.cite="WEBIDL"),!/\bwebidl\b/i.test(o.cite)){const e=o.cite.trim().split(/\s+/);o.cite=["WEBIDL",...e].join(" ")}return za(e),n}function za(e){Bn(e,"webidl");const t=bn`<span class="idlHeader" ><a class="self-link" href="${`#${e.id}`}">WebIDL</a></span >`;e.prepend(t),Ra(t)}var Ua=Object.freeze({__proto__:null,addIDLHeader:za,name:Ta,run:async function(){const e=document.querySelectorAll("pre.idl, pre.webidl");if(!e.length)return;const t=document.createElement("style");t.textContent=Aa,document.querySelector("head link, head > *:last-child").before(t);const n=[...e].map(qa),r=kn.validate(n);for(const t of r){let r=`<pre>${Nn(t.context)}</pre>`;if(t.autofix){t.autofix();r+=`Try fixing as:\n <pre>${Nn(kn.write(n[t.sourceName]))}</pre>`}or(`WebIDL validation error: ${t.bareMessage}`,La,{details:r,elements:[e[t.sourceName]],title:t.bareMessage})}document.normalize()}});const Wa="core/data-cite",Fa="__SPEC__";async function Ba(e){const{key:t,frag:n,path:r,href:s}=e;let o="",i="";if(t===Fa)o=document.location.href;else{const e=await ii(t);if(!e)return null;o=e.href,i=e.title}if(s)o=s;else{if(r){const e=r.startsWith("/")?`.${r}`:r;o=new URL(e,o).href}n&&(o=new URL(n,o).href)}return{href:o,title:i}}function Ha(e,t,n){const{href:r,title:s}=t,o=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=s),t.href=r,o){const e=document.createElement("cite");t.replaceWith(e),e.append(t)}break}case"dfn":{const t=document.createElement("a");if(t.href=r,t.dataset.cite=n.key,t.dataset.citePath=n.path,t.dataset.citeFrag=n.frag,e.textContent?Kn(e,t):(t.textContent=s,e.append(t)),o){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){or("Exporting a linked external definition is not allowed.",Wa,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function Ga(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const Va=Ga("#"),Ya=Ga("/");function Ka(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:s,citeHref:o}=t;if(n.startsWith("#")&&!r){const r=e.parentElement.closest('[data-cite]:not([data-cite^="#"])'),{key:s,isNormative:o}=r?Ka(r):{key:Fa,isNormative:!1};return t.cite=o?s:`?${s}`,t.citeFrag=n.replace("#",""),Ka(e)}const i=r?`#${r}`:Va(n),a=s||Ya(n).split("#")[0],{type:c}=Yn(n,e),l="normative"===c,u=/^[?|!]/.test(n);return{key:n.split(/[/|#]/)[0].substring(Number(u)),isNormative:l,frag:i,path:a,href:o}}function Za(e){const t=["data-cite","data-cite-frag","data-cite-path"];e.querySelectorAll("a[data-cite], dfn[data-cite]").forEach((e=>t.forEach((t=>e.removeAttribute(t)))))}var Ja=Object.freeze({__proto__:null,THIS_SPEC:Fa,name:Wa,run:async function(){const e=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");await async function(e){const t=e.map(Ka).map((async e=>({entry:e,result:await ii(e.key)}))),n=(await Promise.all(t)).filter((({result:e})=>null===e)).map((({entry:{key:e}})=>e)),r=await oi(n);r&&Object.assign(ei,r)}([...e]);for(const t of e){const e=t.dataset.cite,n=Ka(t),r=await Ba(n);if(r)Ha(t,r,n);else{const n=`Couldn't find a match for "${e}"`;t.dataset.matchedText&&(t.textContent=t.dataset.matchedText),ir(n,Wa,{elements:[t]})}}o("beforesave",Za)},toCiteDetails:Ka});const Qa="core/link-to-dfn",Xa=[],ec={en:{duplicateMsg:e=>`Duplicate definition(s) of '${e}'`,duplicateTitle:"This is defined more than once in the document."},ja:{duplicateMsg:e=>`'${e}' の重複定義`,duplicateTitle:"この文書内で複数回定義されています."},de:{duplicateMsg:e=>`Mehrfache Definition von '${e}'`,duplicateTitle:"Das Dokument enthält mehrere Definitionen dieses Eintrags."},zh:{duplicateMsg:e=>`'${e}' 的重复定义`,duplicateTitle:"在文档中有重复的定义。"}},tc=On(ec);function nc(e){const t=new Map,n=[];for(const r of Gi.get(e)){const{dfnType:s="dfn"}=r.dataset,o=r.dataset.dfnFor?.split(",").map((e=>e.trim()))??[""];for(const i of o){if(t.has(i)&&t.get(i).has(s)){const e=t.get(i).get(s),o="dfn"===e.localName,a="dfn"===r.localName,c=s===(e.dataset.dfnType||"dfn"),l=!i&&!e.dataset.dfnFor||e.dataset.dfnFor?.split(",").map((e=>e.trim())).includes(i);if(o&&a&&c&&l){n.push(r);continue}}t.has(i)||t.set(i,new Map),t.get(i).set(s,r),("idl"in r.dataset||"dfn"!==s)&&t.get(i).set("idl",r),Hn(r,"dfn",e)}}return{result:t,duplicates:n}}function rc(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor:"",r=Gn(e).reduce(((e,r)=>{const s=r.split(".");return 2===s.length&&e.push({for:s[0],title:s[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r}),e}),[]);return r}(e),r=n.find((e=>t.has(e.title)&&t.get(e.title).has(e.for)));if(!r)return;const s=t.get(r.title).get(r.for),{linkType:o}=e.dataset;if(o){for(const e of o.split("|"))if(s.get(e))return s.get(e);return s.get("dfn")}{const e=r.for?"idl":"dfn";return s.get(e)||s.get("idl")}}function sc(e,t,n){let r=!1;const{linkFor:s}=e.dataset,{dfnFor:o}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(s&&!n.get(s)&&o&&!o.split(",").map((e=>e.trim())).includes(s))r=!0;else if(t.classList.contains("externalDFN")){const n=t.dataset.lt?t.dataset.lt.split("|"):[];e.dataset.lt=n[0]||t.textContent,r=!0}else"partial"!==e.dataset.idl?(e.href=`#${t.id}`,e.classList.add("internalDFN")):r=!0;return e.hasAttribute("data-link-type")||(e.dataset.linkType="idl"in t.dataset?"idl":"dfn"),function(e){if(e.closest("code,pre"))return!0;if(1!==e.childNodes.length)return!1;const[t]=e.childNodes;return"code"===t.localName}(t)&&function(e,t){const n=e.textContent.trim(),r=t.dataset.hasOwnProperty("idl"),s=oc(e)&&oc(t,n);r&&!s||Kn(e,document.createElement("code"))}(e,t),!r}function oc(e,t=""){if("a"===e.localName){if(!e.querySelector("code"))return!0}else{const{dataset:n}=e;if(e.textContent.trim()===t)return!0;if(n.title===t)return!0;if(n.lt||n.localLt){const e=[];return n.lt&&e.push(...n.lt.split("|")),n.localLt&&e.push(...n.localLt.split("|")),e.includes(t)}}return!1}function ic(e){e.forEach((e=>{ir(`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,Qa,{title:"Linking error: not matching `<dfn>`",elements:[e]})}))}var ac=Object.freeze({__proto__:null,name:Qa,possibleExternalLinks:Xa,run:async function(e){const t=function(){const e=new rr;for(const t of Gi.keys()){const{result:n,duplicates:r}=nc(t);e.set(t,n),r.length>0&&or(tc.duplicateMsg(t),Qa,{title:tc.duplicateTitle,elements:r})}return e}(),n=[],r=document.querySelectorAll("a[data-cite=''], a:not([href]):not([data-cite]):not(.logo):not(.externalDFN)");for(const e of r){if(!e.dataset?.linkType&&e.dataset?.xrefType){Xa.push(e);continue}const r=rc(e,t);if(r){sc(e,r,t)||Xa.push(e)}else""===e.dataset.cite?n.push(e):Xa.push(e)}ic(n),function(e){const{shortName:t=""}=e,n=new RegExp(String.raw`^([?!])?${t}\b([^-])`,"i"),r=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");for(const t of r){t.dataset.cite=t.dataset.cite.replace(n,`$1${Fa}$2`);const{key:r,isNormative:s}=Ka(t);r!==Fa&&(s||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||ic(Xa)}});const cc="xrefs",lc=3e5;async function uc(){return await yn.openDB("xref",2,{upgrade(e){[...e.objectStoreNames].forEach((t=>e.deleteObjectStore(t)));e.createObjectStore(cc,{keyPath:"query.id"}).createIndex("byTerm","query.term",{unique:!1})}})}async function dc(e){const t=new Map;if(await async function(){const e="XREF:LAST_VERSION_CHECK",t=parseInt(localStorage.getItem(e),10),n=Date.now();if(!t)return localStorage.setItem(e,n.toString()),!1;if(n-t<lc)return!1;const r=new URL("meta/version",hc).href,s=await fetch(r);if(!s.ok)return!1;const o=await s.text();return localStorage.setItem(e,n.toString()),parseInt(o,10)>t}())return await async function(){try{await uc().then((e=>e.clear(cc)))}catch(e){console.error(e)}}(),t;const n=new Set(e.map((e=>e.id)));try{const e=await uc();let r=await e.transaction(cc).store.openCursor();for(;r;)n.has(r.key)&&t.set(r.key,r.value.result),r=await r.continue()}catch(e){console.error(e)}return t}const pc="core/xref",fc={"web-platform":["HTML","INFRA","URL","WEBIDL","DOM","FETCH"]},hc="https://respec.org/xref/",mc=[];if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=En({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}function gc(e){const t="xrefType"in e.dataset;let n=bc(e);t||(n=n.toLowerCase());const r=function(e){const t=[];let n=e.closest("[data-cite]");for(;n;){const r=n.dataset.cite.toLowerCase().replace(/[!?]/g,"").split(/\s+/).filter((e=>e));if(r.length&&t.push(r),n===e)break;n=n.parentElement.closest("[data-cite]")}if(n!==e){const n=e.closest("section"),r=[...n?n.querySelectorAll("a.bibref"):[]].map((e=>e.textContent.toLowerCase()));r.length&&t.push(r)}const r=function(e){const t=[];for(const n of e){const e=t[t.length-1]||[],r=[...new Set(n)].filter((t=>!e.includes(t)));t.push(r.sort())}return t}(t);return r}(e),s=function(e,t){if(t)return e.dataset.xrefType?e.dataset.xrefType.split("|"):["_IDL_"];return["_CONCEPT_"]}(e,t),o=function(e,t){if(e.dataset.xrefFor)return jn(e.dataset.xrefFor);if(t){const t=e.closest("[data-xref-for]");if(t)return jn(t.dataset.xrefFor)}return null}(e,t);return{id:"",term:n,types:s,...r.length&&{specs:r},..."string"==typeof o&&{for:o}}}function bc(e){const{lt:t}=e.dataset;let n=t?t.split("|",1)[0]:e.textContent;return n=jn(n),"the-empty-string"===n?"":n}function yc(e,t,n,r){const{term:s,specs:o=[]}=t,{uri:i,shortname:a,spec:c,normative:l,type:u,for:d}=n,p=o.flat().includes(c)?c:a,f=new URL(i,"https://partial"),{pathname:h}=f,m={cite:p,citePath:h,citeFrag:f.hash.slice(1),type:u};d&&(m.linkFor=d[0]),f.origin&&"https://partial"!==f.origin&&(m.citeHref=f.href),Object.assign(e.dataset,m),function(e,t,n,r,s){const o=function(e){const t=e.closest(".normative"),n=e.closest(Rn);return!n||e===t||t&&n&&n.contains(t)}(e);if(!o)return void(s.normativeReferences.has(t)||s.informativeReferences.add(t));if(n){const e=s.informativeReferences.has(t)?s.informativeReferences.getCanonicalKey(t):t;return s.normativeReferences.add(e),void s.informativeReferences.delete(e)}mc.push({term:r,spec:t,element:e})}(e,p,l,s,r)}function wc(e){const t=JSON.stringify(e,Object.keys(e).sort()),n=(new TextEncoder).encode(t);return crypto.subtle.digest("SHA-1",n).then(vc)}function vc(e){return[...new Uint8Array(e)].map((e=>e.toString(16).padStart(2,"0"))).join("")}function $c(e){const t=e.querySelectorAll("a[data-xref-for], a[data-xref-type], a[data-link-for]"),n=["data-xref-for","data-xref-type","data-link-for"];t.forEach((e=>{n.forEach((t=>e.removeAttribute(t)))}))}var kc=Object.freeze({__proto__:null,API_URL:hc,getTermFromElement:bc,informativeRefsInNormative:mc,name:pc,run:async function(e){if(!e.xref)return;const t=function(e){const t={url:new URL("search/",hc).href,specs:null},n=Object.assign({},t);switch(Array.isArray(e)?"array":typeof e){case"boolean":break;case"string":e.toLowerCase()in fc?Object.assign(n,{specs:fc[e.toLowerCase()]}):r(e);break;case"array":Object.assign(n,{specs:e});break;case"object":if(Object.assign(n,e),e.profile){const t=e.profile.toLowerCase();if(t in fc){const r=(e.specs??[]).concat(fc[t]);Object.assign(n,{specs:r})}else r(e.profile)}break;default:or(`Invalid value for \`xref\` configuration option. Received: "${e}".`,pc)}return n;function r(e){or(`Invalid profile "${e}" in \`respecConfig.xref\`. Please use one of the supported profiles: ${Dn(Object.keys(fc),(e=>`"${e}"`))}.`,pc)}}(e.xref);if(t.specs){const e=document.body.dataset.cite?document.body.dataset.cite.split(/\s+/):[];document.body.dataset.cite=e.concat(t.specs).join(" ")}const n=Xa.concat(function(){const e=document.querySelectorAll(":is(a,dfn)[data-cite]:not([data-cite=''],[data-cite*='#'])"),t=document.querySelectorAll("dfn.externalDFN");return[...e].filter((e=>{if(""===e.textContent.trim())return!1;const t=e.closest("[data-cite]");return!t||""!==t.dataset.cite})).concat(...t)}());if(!n.length)return;const r=[];for(const e of n){const t=gc(e);t.id=await wc(t),r.push(t)}const s=await async function(e,t){const n=new Set,r=e.filter((e=>!n.has(e.id)&&(n.add(e.id)&&!0))),s=await dc(r),o=r.filter((e=>!s.get(e.id))),i=await async function(e,t){if(!e.length)return new Map;const n={method:"POST",body:JSON.stringify({queries:e}),headers:{"Content-Type":"application/json"}},r=await fetch(t,n),s=await r.json();return new Map(s.results.map((({id:e,result:t})=>[e,t])))}(o,t);i.size&&await async function(e,t){try{const n=(await uc()).transaction(cc,"readwrite");for(const r of e){const e=t.get(r.id);n.objectStore(cc).add({query:r,result:e})}await n.done}catch(e){console.error(e)}}(r,i);return new Map([...s,...i])}(r,t.url);!function(e,t,n,r){const s={ambiguous:new Map,notFound:new Map};for(let o=0,i=e.length;o<i;o++){if(e[o].closest("[data-no-xref]"))continue;const i=e[o],a=t[o],{id:c}=a,l=n.get(c);if(1===l.length)yc(i,a,l[0],r);else{const e=s[0===l.length?"notFound":"ambiguous"];e.has(c)||e.set(c,{elems:[],results:l,query:a}),e.get(c).elems.push(i)}}!function({ambiguous:e,notFound:t}){const n=(e,t,n=[])=>{const r=new URL(hc);return r.searchParams.set("term",e),t.for&&r.searchParams.set("for",t.for),r.searchParams.set("types",t.types.join(",")),n.length&&r.searchParams.set("specs",n.join(",")),r.href},r=(e,t)=>pr`[See search matches for "${t}"](${e}) or ${"[Learn about this error|#error-term-not-found]"}.`;for(const{query:e,elems:s}of t.values()){const t=e.specs?[...new Set(e.specs.flat())].sort():[],o=bc(s[0]),i=n(o,e),a=In(t,(e=>`**[${e}]**`)),c=r(i,o);or(`Couldn't find "**${o}**"${e.for?`, for **"${e.for}"**, `:""} in this document or other cited documents: ${a}.`,pc,{title:"No matching definition found.",elements:s,hint:c})}for(const{query:t,elems:s,results:o}of e.values()){const e=[...new Set(o.map((e=>e.shortname)))].sort(),i=In(e,(e=>`**[${e}]**`)),a=bc(s[0]),c=n(a,t,e),l=t.for?`, for **"${t.for}"**, `:"",u=pr`To fix, use the ${"[data-cite]"} attribute to pick the one you mean from the appropriate specification. ${r(c,a)}.`;or(`The term "**${a}**"${l} is ambiguous because it's defined in ${i}.`,pc,{title:"Definition is ambiguous.",elements:s,hint:u})}}(s)}(n,r,s,e),o("beforesave",$c)}});var xc=String.raw`ul.index{columns:30ch;column-gap:1.5em} ul.index li{list-style:inherit} ul.index li span{color:inherit;cursor:pointer;white-space:normal} #index-defined-here ul.index li{font-size:.9rem} ul.index code{color:inherit} #index-defined-here .print-only{display:none} @media print{ #index-defined-here .print-only{display:initial} }`;const _c=On({en:{heading:"Index",headingExternal:"Terms defined by reference",headlingLocal:"Terms defined by this specification",dfnOf:"definition of"}}),Cc=new Set(["attribute","callback","dict-member","dictionary","element-attr","element","enum-value","enum","exception","extended-attribute","interface","method","typedef"]);function Sc(e){const t=e.dataset,n=t.dfnType||t.idl||t.linkType||"";switch(n){case"":case"dfn":return"";default:return n}}function Rc(e){const t=e.closest("[data-dfn-for]:not([data-dfn-for=''])");return t?t.dataset.dfnFor:""}function Ec(e,t,n=""){if(n.startsWith("[[")){return`internal slot for <code>${Rc(e)}</code>`}switch(t){case"dict-member":case"method":case"attribute":case"enum-value":return`${"dict-member"===t?"member":t.replace("-"," ")} for <code>${Rc(e)}</code>`;case"interface":case"dictionary":case"enum":return t;case"constructor":return`for <code>${Rc(e)}</code>`;default:return""}}function Ac(){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 bn`<span class="print-only">${t}</span>`})(e.dataset.id))))}function Tc(){const e=new Set,t=new Map,n=document.querySelectorAll("a[data-cite]");for(const r of n){if(!r.dataset.cite)continue;const{cite:n,citeFrag:s,xrefType:o,linkType:i}=r.dataset;if(!(o||i||n.includes("#")||s))continue;const a=r.href;if(e.has(a))continue;const{type:c,linkFor:l}=r.dataset,u=bc(r);if(!u)continue;const d=Ka(r).key.toUpperCase();(t.get(d)||t.set(d,[]).get(d)).push({term:u,type:c,linkFor:l,elem:r}),e.add(a)}return t}function Lc(e){const{elem:t}=e,n=function(e){const{term:t,type:n,linkFor:r}=e;let s=Nn(t);Cc.has(n)&&("extended-attribute"===n&&(s=`[${s}]`),s=`<code>${s}</code>`);const o=Ic.has(t)?"type":Pc.get(n);o&&(s+=` ${o}`);if(r){let e=r;/\s/.test(r)||(e=`<code>${e}</code>`),"element-attr"===n&&(e+=" element"),s+=` (for ${e})`}return s}(e);return bn`<li> <span class="index-term" data-href="${t.href}">${{html:n}}</span> </li>`}const Pc=new Map([["attribute","attribute"],["element-attr","attribute"],["element","element"],["enum","enum"],["exception","exception"],["extended-attribute","extended attribute"],["interface","interface"]]),Ic=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 Dc(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 Nc=Object.freeze({__proto__:null,name:"core/dfn-index",run:function(){const e=document.querySelector("section#index");if(!e)return void o("toc",(()=>{}),{once:!0});const t=document.createElement("style");t.textContent=xc,document.head.appendChild(t),e.classList.add("appendix"),e.querySelector("h2, h1")||e.prepend(bn`<h1>${_c.heading}</h1>`);const n=bn`<section id="index-defined-here"> <h3>${_c.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=jn(n.textContent);(e.get(t)||e.set(t,[]).get(t)).push(n)}const n=[...e].sort((([e],[t])=>e.slice(e.search(/\w/)).localeCompare(t.slice(t.search(/\w/)))));return n}();return bn`<ul class="index"> ${e.map((([e,t])=>function(e,t){const n=(e,t,n)=>{const r=`#${e.id}`;return bn`<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=Sc(r),o=function(e,t,n){let r=n;"enum-value"===t&&(r=`"${r}"`);(Cc.has(t)||e.dataset.idl||e.closest("code"))&&(r=`<code>${r}</code>`);return r}(r,s,e),i=Ec(r,s,e);return n(r,o,i)}return bn`<li> ${e} <ul> ${t.map((t=>{const r=Ec(t,Sc(t),e)||_c.dfnOf;return n(t,r)}))} </ul> </li>`}(e,t)))} </ul>`}()} </section>`;e.append(n);const r=bn`<section id="index-defined-elsewhere"> <h3>${_c.headingExternal}</h3> ${function(){const e=[...Tc().entries()].sort((([e],[t])=>e.localeCompare(t)));return bn`<ul class="index"> ${e.map((([e,t])=>bn`<li data-spec="${e}"> ${mi(e)} defines the following: <ul> ${t.sort(((e,t)=>e.term.localeCompare(t.term))).map(Lc)} </ul> </li>`))} </ul>`}()} </section>`;e.append(r);for(const e of r.querySelectorAll(".index-term"))Hn(e,"index-term");o("toc",Ac,{once:!0}),o("beforesave",Dc)}});const jc="core/contrib";var Oc=Object.freeze({__proto__:null,name:jc,run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void or(pr`Requested list of contributors from GitHub, but ${"[github]"} configuration option is not set.`,jc)}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 bn(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=In(r)}(r,n):n.textContent="Failed to fetch contributors.";async function s(){const{href:n}=new URL("contributors",t);try{const t=await Un(n);if(!t.ok)throw new Error(`Request to ${n} failed with status code ${t.status}`);return(await t.json()).filter((t=>!e.includes(t.name||t.login)&&!t.login.includes("[bot]")))}catch(e){return or("Error loading contributors from GitHub.",jc),console.error(e),null}}}(t,n)}});var Mc=Object.freeze({__proto__:null,name:"core/fix-headers",run:function(){[...document.querySelectorAll("section:not(.introductory)")].map((e=>e.querySelector("h1, h2, h3, h4, h5, h6"))).filter((e=>e)).forEach((e=>{const t=Math.min(function(e,t){const n=[];for(;e!=e.ownerDocument.body;)e.matches(t)&&n.push(e),e=e.parentElement;return n}(e,"section").length+1,6);Vn(e,`h${t}`)}))}});var qc=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(Rn)));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),Kn(r,document.createElement("code")),za(r)}});const zc=["h2","h3","h4","h5","h6"],Uc="core/structure",Wc=On({en:{toc:"Table of Contents"},zh:{toc:"内容大纲"},ko:{toc:"목차"},ja:{toc:"目次"},nl:{toc:"Inhoudsopgave"},es:{toc:"Tabla de Contenidos"},de:{toc:"Inhaltsverzeichnis"}});function Fc(e,t,{prefix:n=""}={}){let r=!1,s=0,o=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const i=bn`<ol class="toc"></ol>`;for(const a of e){!a.isAppendix||n||r||(s=o,r=!0);let e=a.isIntro?"":r?Bc(o-s+1):n+o;const c=e.split(".").length;if(1===c&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(o+=1,a.header.prepend(bn`<bdi class="secno">${e} </bdi>`)),c<=t){const n=a.header.id||a.element.id,r=Gc(a.header,n),s=Fc(a.subsections,t,{prefix:e});s&&r.append(s),i.append(r)}}return i}function Bc(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function Hc(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(!zc.includes(r.localName))continue;const s=r.textContent;Hn(e,null,s),n.push({element:e,header:r,title:s,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:Hc(e)})}return n}function Gc(e,t){const n=bn`<a href="${`#${t}`}" class="tocxref" />`;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach((e=>{const t=Vn(e,"span");t.className="formerLink",t.removeAttribute("href")})),r.querySelectorAll("dfn").forEach((e=>{Vn(e,"span").removeAttribute("id")})),bn`<li class="tocline">${n}</li>`}var Vc=Object.freeze({__proto__:null,name:Uc,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(Jn(e,"section").length+1,6)}`;e.localName!==t&&Vn(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)){or("`data-max-toc` must have a value between 0-6 (inclusive).",Uc,{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=Fc(Hc(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=bn`<nav id="toc"></nav>`,n=bn`<h2 class="introductory">${Wc.toc}</h2>`;Hn(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=bn`<p role="navigation" id="back-to-top"> <a href="#title"><abbr title="Back to Top">↑</abbr></a> </p>`;document.body.append(s)}(t)}s("toc")}});const Yc=On({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 Kc=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(bn`<p><em>${Yc.informative}</em></p>`)}))}});const Zc=On({en:{permalinkLabel(e,t){let n=`Permalink for${t?"":" this"} ${e}`;return t&&(n+=` ${jn(t.textContent)}`),n}}});var Jc=Object.freeze({__proto__:null,name:"core/id-headers",run:function(e){const t=document.querySelectorAll("section:not(.head,#abstract,#sotd) h2, h3, h4, h5, h6");for(const n of t){let t=n.id;if(t||(Hn(n),t=n.parentElement.id||n.id),!e.addSectionLinks)continue;const r=Zc.permalinkLabel(n.closest(".appendix")?"Appendix":"Section",n.querySelector(":scope > bdi.secno")),s=bn`<div class="header-wrapper"></div>`;n.replaceWith(s);const o=bn`<a href="#${t}" class="self-link" aria-label="${r}" ></a>`;s.append(n,o)}}});var Qc=String.raw`.caniuse-stats{display:flex;column-gap:2em} .caniuse-group{display:flex;flex:1;flex-direction:column;justify-content:flex-end;flex-basis:auto} .caniuse-browsers{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;margin-top:.2em;column-gap:.4em;border-bottom:1px solid #ccc;row-gap:.4em;padding-bottom:.4cm} .caniuse-type{align-self:center;border-top:none;text-transform:capitalize;font-size:.8em;margin-top:-.8em;font-weight:700} .caniuse-type span{background-color:var(--bg,#fff);padding:0 .4em} .caniuse-cell{align-items:center;border-radius:1cm;color:#fff;display:flex;font-size:90%;min-width:1.5cm;padding:.3rem;justify-content:space-evenly;--supported:#2a8436dd;--no-support:#c44230dd;--no-support-alt:#b43b2bdd;--partial:#807301dd;--partial-alt:#746c00dd;--unknown:#757575;background:repeating-linear-gradient(var(--caniuse-angle,45deg),var(--caniuse-bg) 0,var(--caniuse-bg-alt) 1px,var(--caniuse-bg-alt) .4em,var(--caniuse-bg) calc(.25em + 1px),var(--caniuse-bg) .75em)} img.caniuse-browser{filter:drop-shadow(0 0 .1cm #666);background:0 0} .caniuse-cell span.browser-version{margin-left:.4em;text-shadow:0 0 .1em #fff;font-weight:100;font-size:.9em} .caniuse-stats a[href]{white-space:nowrap;align-self:flex-end} .caniuse-cell.y{background:var(--supported)} .caniuse-cell:is(.n,.d){--caniuse-angle:45deg;--caniuse-bg:var(--no-support);--caniuse-bg-alt:var(--no-support-alt)} .caniuse-cell.u{background:var(--unknown)} .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)} @media print{ .caniuse-cell.y::before{content:"✔️";padding:.5em} .caniuse-cell.n::before{content:"❌";padding:.5em} .caniuse-cell:is(.a,.d,.p,.x,.u)::before{content:"⚠️";padding:.5em} }`;const Xc="core/caniuse",el="https://respec.org/caniuse/",tl=new Map([["and_chr",{name:"Android Chrome",path:"chrome",type:"mobile"}],["and_ff",{name:"Android Firefox",path:"firefox",type:"mobile"}],["and_uc",{name:"Android UC",path:"uc",type:"mobile"}],["chrome",{name:"Chrome",type:"desktop"}],["edge",{name:"Edge",type:"desktop"}],["firefox",{name:"Firefox",type:"desktop"}],["ios_saf",{name:"iOS Safari",path:"safari-ios",type:"mobile"}],["op_mob",{name:"Opera Mobile",path:"opera",type:"mobile"}],["opera",{name:"Opera",type:"desktop"}],["safari",{name:"Safari",type:"desktop"}],["samsung",{name:"Samsung Internet",path:"samsung-internet",type:"mobile"}]]),nl=new Map([["a","almost supported (aka Partial support)"],["d","disabled by default"],["n","no support, or disabled by default"],["p","no support, but has Polyfill"],["u","unknown support"],["x","requires prefix to work"],["y","supported by default"]]);var rl=Object.freeze({__proto__:null,BROWSERS:tl,name:Xc,prepare:function(e){if(!e.caniuse)return;!function(e){const t=new Set(tl.keys());t.delete("op_mob"),t.delete("opera");const n={removeOnSave:!0,browsers:[...t]};if("string"==typeof e.caniuse)return void(e.caniuse={feature:e.caniuse,...n});e.caniuse={...n,...e.caniuse}}(e),function({caniuse:e}){const{browsers:t}=e,n=t.filter((e=>!tl.has(e)));if(n.length){ir(pr`Invalid browser(s): (${ur(n,{quotes:!0})}) in the \`browser\` property of ${"[caniuse]"}.`,Xc)}}(e);const t=e.caniuse;t.feature&&document.head.appendChild(bn`<style id="caniuse-stylesheet" class="${t.removeOnSave?"removeOnSave":""}" > ${Qc} </style>`)},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"),i=async function(e){const{feature:t,browsers:n,apiURL:r}=e,s=new URL(r||`./${t}`,el);n.forEach((e=>s.searchParams.append("browsers",e)));const o=await fetch(s);if(!o.ok){const{status:e,statusText:t}=o;throw new Error(`Failed to get caniuse data: (${e}) ${t}`)}return o.json()}(e.caniuse).then((e=>async function(e,{feature:t}){const n=e.result,r=new Map([["desktop",[]],["mobile",[]]]),s=function(e){return(t,{browser:n,version:r,caniuse:s})=>{const{name:o,type:i}=tl.get(n),a=`${o}${r?` version ${r}`:""}`,c=nl.get(s),l=`${e} is ${c} since ${a} on ${i}.`,u=`caniuse-cell ${s}`,d=(p=`${c} since ${a}.`).charAt(0).toUpperCase()+p.slice(1);var p;const f=r||"—",h=function(e){const t=tl.get(e).path??e;return`https://www.w3.org/assets/logos/browser-logos/${t}/${t}.svg`}(n),m=bn` <div class="${u}" title="${d}" aria-label="${l}"> <img class="caniuse-browser" width="20" height="20" src="${h}" alt="${o} logo" /><span class="browser-version">${f}</span> </div> `;return t.get(i).push(m),t}}(t);n.reduce(s,r);const o=[...r].filter((([,e])=>e.length)).map((([e,t])=>bn`<div class="caniuse-group"> <div class="caniuse-browsers">${t}</div> <div class="caniuse-type"><span>${e}</div> </div>`));return o.push(bn`<a class="caniuse-cell" href="https://caniuse.com/${t}" >More info</a >`),o}(e,t))).catch((e=>function(e,t,n){const r=`Failed to retrieve feature "${t.feature}".`,s=pr`Please check the feature key on [caniuse.com](https://caniuse.com) and update ${"[caniuse]"}.`;return or(r,Xc,{hint:s}),console.error(e),bn`<a href="${n}">caniuse.com</a>`}(e,t,n))),a=bn`<dt class="caniuse-title">Browser support:</dt> <dd class="caniuse-stats"> ${{any:i,placeholder:"Fetching data from caniuse.com..."}} </dd>`;r.append(...a.childNodes),await i,s("amend-user-config",{caniuse:t.feature}),t.removeOnSave&&(r.querySelectorAll(".caniuse-browser").forEach((e=>e.classList.add("removeOnSave"))),o("beforesave",(e=>{bn.bind(e.querySelector(".caniuse-stats"))` <a href="${n}">caniuse.com</a>`})))}});var sl=String.raw`.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3rem} .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;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--indextable-hover-text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px;z-index:11;margin-bottom:.4em} .mdn summary{text-align:right;cursor:default;margin-right:-.4em} .mdn summary span{font-family:zillaslab,Palatino,"Palatino Linotype",serif;color:#fff;color:var(--bg,#fff);background-color:#000;background-color:var(--text,#000);display:inline-block;padding:3px} .mdn a{display:inline-block;word-break:break-all} .mdn p{margin:0} .mdn .engines-all{color:#058b00} .mdn .engines-some{color:#b00} .mdn table{width:100%;font-size:.9em} .mdn td{border:none} .mdn td:nth-child(2){text-align:right} .mdn .nosupportdata{font-style:italic;margin:0} .mdn tr::before{content:"";display:table-cell;width:1.5em;height:1.5em;background:no-repeat center center/contain;font-size:.75em} .mdn .no,.mdn .unknown{color:#ccc;filter:grayscale(100%)} .mdn .no::before,.mdn .unknown::before{opacity:.5} .mdn .chrome::before,.mdn .chrome_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/chrome/chrome.svg)} .mdn .edge::before,.mdn .edge_mobile::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/edge/edge.svg)} .mdn .firefox::before,.mdn .firefox_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/firefox/firefox.svg)} .mdn .opera::before,.mdn .opera_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/opera/opera.svg)} .mdn .safari::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/safari/safari.svg)} .mdn .safari_ios::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/safari-ios/safari-ios.svg)} .mdn .samsunginternet_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/samsung-internet/samsung-internet.svg)} .mdn .webview_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/android-webview/android-webview.png)}`;const ol="core/mdn-annotation",il="https://w3c.github.io/mdn-spec-links/",al="https://developer.mozilla.org/en-US/docs/Web/",cl={chrome:"Chrome",chrome_android:"Chrome Android",edge:"Edge",edge_mobile:"Edge Mobile",firefox:"Firefox",firefox_android:"Firefox Android",opera:"Opera",opera_android:"Opera Android",safari:"Safari",safari_ios:"Safari iOS",samsunginternet_android:"Samsung Internet",webview_android:"WebView Android"},ll=On({en:{inAllEngines:"This feature is in all major engines.",inSomeEngines:"This feature has limited support."},zh:{inAllEngines:"所有主要引擎均支持此特性。",inSomeEngines:"此功能支持有限。"}});function ul(e){const t=e.closest("section");if(!t)return;const{previousElementSibling:n}=t;if(n&&n.classList.contains("mdn"))return n;const r=bn`<aside class="mdn"></aside>`;return t.before(r),r}function dl(e){const{name:t,slug:n,summary:r,support:s,engines:o}=e,i=n.slice(n.indexOf("/")+1),a=`${al}${n}`,c=`Expand MDN details for ${t}`,l=function(e){if(3===e.length)return bn`<span title="${ll.inAllEngines}">✅</span>`;if(e.length<2)return bn`<span title="${ll.inSomeEngines}">🚫</span>`;return bn`<span> </span>`}(o);return bn`<details> <summary aria-label="${c}"><span>MDN</span>${l}</summary> <a title="${r}" href="${a}">${i}</a> ${function(e){if(3===e.length)return bn`<p class="engines-all">${ll.inAllEngines}</p>`;if(e.length<2)return bn`<p class="engines-some">${ll.inSomeEngines}</p>`}(o)} ${s?function(e){function t(e,t,n){const r="Unknown"===t?"?":t,s=`${e} ${t.toLowerCase()}`;return bn`<tr class="${s}"> <td>${cl[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 bn`<table> ${Object.keys(cl).map((r=>e[r]?n(r,e[r]):t(r,"Unknown","")))} </table>`}(s):bn`<p class="nosupportdata">No support data.</p>`} </details>`}var pl=Object.freeze({__proto__:null,name:ol,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=il,maxAge:r=864e5}=t,s=new URL(`${e}.json`,n).href,o=await Un(s,r);if(404===o.status){return void or(`Could not find MDN data associated with key "${e}".`,ol,{hint:"Please add a valid key to `respecConfig.mdn`"})}return await o.json()}(t,e.mdn);if(!n)return;const r=document.createElement("style");r.textContent=sl,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=ul(e);if(r)for(const e of t)r.append(dl(e))}}});const fl="ui/save-html",hl=On({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),ml=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return mr(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return mr(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 gl=Object.freeze({__proto__:null,exportDocument:function(e,t){return ir("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",fl,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),mr(t)},name:fl,run:function(e){const t={async show(t){await document.respec.ready;const n=bn`<div class="respec-save-buttons"> ${ml.map((t=>function(e,t){const{id:n,href:r,ext:s,title:o,type:i}=e,a=qn(t.publishDate||new Date),c=[t.specStatus,t.shortName||"spec",a].join("-");return bn`<a href="${r}" id="${n}" download="${c}.${s}" type="${i}" class="respec-save-button" onclick=${()=>Gr.closeModal()} >${o}</a >`}(t,e)))} </div>`;Gr.freshModal(hl.save_snapshot,n,t)}},n="download"in HTMLAnchorElement.prototype;let r;n&&(r=Gr.addCommand(hl.save_snapshot,(function(){if(!n)return;t.show(r)}),"Ctrl+Shift+Alt+S","💾"))}});const bl="https://respec.org/specref/",yl=On({en:{search_specref:"Search Specref"},nl:{search_specref:"Doorzoek Specref"},ja:{search_specref:"仕様検索"},de:{search_specref:"Spezifikationen durchsuchen"},zh:{search_specref:"搜索 Specref"}}),wl=Gr.addCommand(yl.search_specref,(function(){const e=bn` <iframe class="respec-iframe" src="${bl}" onload=${e=>e.target.classList.add("ready")}></iframe> <a href="${bl}" target="_blank">Open Search UI in a new tab</a> `;Gr.freshModal(yl.search_specref,e,wl)}),"Ctrl+Shift+Alt+space","🔎");var vl=Object.freeze({__proto__:null});const $l="https://respec.org/xref/",kl=On({en:{title:"Search definitions"},ja:{title:"定義検索"},de:{title:"Definitionen durchsuchen"},zh:{title:"搜索定义"}}),xl=Gr.addCommand(kl.title,(function(){const e=bn` <iframe class="respec-iframe" src="${$l}" onload="${e=>e.target.classList.add("ready")}"></iframe> <a href="${$l}" target="_blank">Open Search UI in a new tab</a> `;Gr.freshModal(kl.title,e,xl)}),"Ctrl+Shift+Alt+x","📚");var _l=Object.freeze({__proto__:null});const Cl=On({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 Sl=document.createElement("div"),Rl=bn.bind(Sl),El=Gr.addCommand(`${Cl.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(Al).forEach((t=>{e.push(t)}));Rl` <p> ReSpec is a document production toolchain, with a notable focus on W3C specifications. </p> <p> <a href='https://respec.org/docs'>Documentation</a>, <a href='https://github.com/w3c/respec/issues'>Bugs</a>. </p> <table border="1" width="100%" hidden="${!e.length}"> <caption> Loaded plugins </caption> <thead> <tr> <th> Plugin Name </th> <th> Processing time </th> </tr> </thead> <tbody>${e}</tbody> </table> `,Gr.freshModal(`${Cl.about_respec} - ${window.respecVersion}`,Sl,El)}),"Ctrl+Shift+Alt+A","ℹ️");function Al({name:e,duration:t}){return bn` <tr> <td><a href="${`https://github.com/w3c/respec/blob/develop/src/${e}.js`}">${e}</a></td> <td>${t}</td> </tr> `}var Tl=Object.freeze({__proto__:null});var Ll=Object.freeze({__proto__:null,name:"core/seo",run:function(e){if(e.gitRevision){const t=bn`<meta name="revision" content="${e.gitRevision}" />`;document.head.appendChild(t)}const t=document.querySelector("#abstract p:first-of-type");if(!t)return;const n=t.textContent.replace(/\s+/," ").trim(),r=document.createElement("meta");r.name="description",r.content=n,document.head.appendChild(r)}});const Pl="w3c/seo",Il={NOTE:"w3p:NOTE",WD:"w3p:WD",LC:"w3p:LastCall",CR:"w3p:CR",CRD:"w3p:CRD",PR:"w3p:PR",REC:"w3p:REC",RSCND:"w3p:RSCND"},Dl=new Set([...As,...Ts,...Ls,"BG-FINAL","CG-FINAL","CRY","DRY","draft-finding","finding"]);function Nl({name:e,url:t,mailto:n,company:r,companyURL:s}){const o={type:"Person",name:e,url:t,"foaf:mbox":n};return(r||s)&&(o.worksFor={name:r,url:s}),o}function jl(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 Ol=Object.freeze({__proto__:null,name:Pl,requiresCanonicalLink:Dl,run:async function(e){if((e.canonicalURI||Dl.has(e.specStatus))&&e.shortName){switch(e.canonicalURI){case"edDraft":if(e.edDraftURI)e.canonicalURI=new URL(e.edDraftURI,document.location.href).href;else{ir("Canonical URI set to edDraft, but no edDraftURI is set in configuration",Pl),e.canonicalURI=null}break;case"TR":if(e.latestVersion)e.canonicalURI=e.latestVersion;else{ir("Canonical URI set to TR, but no shortName is set in configuration",Pl),e.canonicalURI=null}break;default:e.latestVersion&&!e.canonicalURI&&(e.canonicalURI=e.latestVersion)}if(e.canonicalURI){const t=bn`<link rel="canonical" href="${e.canonicalURI}" />`;document.head.appendChild(t)}e.doJsonLd&&await async function(e,t){const n=Il[e.specStatus],r=["TechArticle"];n&&r.push(n);const s={"@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:r,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];s.copyrightHolder=[s.copyrightHolder,...t.map((e=>({name:e})))]}const o=t.head.querySelector("meta[name=description]");o&&(s.description=o.content);e.editors&&(s.editor=e.editors.map(Nl));e.authors&&(s.contributor=e.authors.map(Nl));const i=[...e.normativeReferences,...e.informativeReferences],a=await Promise.all(i.map((e=>ii(e))));s.citation=a.filter((e=>"object"==typeof e)).map(jl);const c=t.createElement("script");c.type="application/ld+json",c.textContent=JSON.stringify(s,null,2),t.head.appendChild(c)}(e,document)}}});var Ml=String.raw`.hljs{--base:#fafafa;--mono-1:#383a42;--mono-2:#686b77;--mono-3:#717277;--hue-1:#0b76c5;--hue-2:#336ae3;--hue-3:#a626a4;--hue-4:#42803c;--hue-5:#ca4706;--hue-5-2:#c91243;--hue-6:#986801;--hue-6-2:#9a6a01} @media (prefers-color-scheme:dark){ .hljs{--base:#282c34;--mono-1:#abb2bf;--mono-2:#818896;--mono-3:#5c6370;--hue-1:#56b6c2;--hue-2:#61aeee;--hue-3:#c678dd;--hue-4:#98c379;--hue-5:#e06c75;--hue-5-2:#be5046;--hue-6:#d19a66;--hue-6-2:#e6c07b} } .hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;color:var(--mono-1,#383a42);background:#fafafa;background:var(--base,#fafafa)} .hljs-comment,.hljs-quote{color:#717277;color:var(--mono-3,#717277);font-style:italic} .hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4;color:var(--hue-3,#a626a4)} .hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#ca4706;color:var(--hue-5,#ca4706);font-weight:700} .hljs-literal{color:#0b76c5;color:var(--hue-1,#0b76c5)} .hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#42803c;color:var(--hue-4,#42803c)} .hljs-built_in,.hljs-class .hljs-title{color:#9a6a01;color:var(--hue-6-2,#9a6a01)} .hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801;color:var(--hue-6,#986801)} .hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#336ae3;color:var(--hue-2,#336ae3)} .hljs-emphasis{font-style:italic} .hljs-strong{font-weight:700} .hljs-link{text-decoration:underline}`;async function ql(t){const n=await fetch(new URL(`../../${t}`,e&&e.src||new URL("respec-w3c.js",document.baseURI).href));return await n.text()}const zl=En({hint:"preload",href:"https://www.w3.org/Tools/respec/respec-highlight",as:"script"});document.head.appendChild(zl);const Ul=async function(){const e=await async function(){try{return(await Promise.resolve().then((function(){return Rd}))).default}catch{return ql("worker/respec-worker.js")}}(),t=URL.createObjectURL(new Blob([e],{type:"application/javascript"}));return new Worker(t)}();n("core/worker",Ul.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 Fl(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 Ul;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(o){const{data:{id:i,language:a,value:c}}=o;i===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:o}=r;switch(e.localName){case"pre":e.classList.remove(s),e.innerHTML=`<code class="hljs${s?` ${s}`:""}">${o}</code>`,e.classList.length||e.removeAttribute("class");break;case"code":e.innerHTML=o,e.classList.add("hljs"),s&&e.classList.add(s)}e.setAttribute("aria-busy","false")}var Bl=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(Fl);document.head.appendChild(bn`<style> ${Ml} </style>`),await Promise.all(n)}});const Hl=On({en:{missing_test_suite_uri:pr`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:pr`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:pr`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:pr`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),Gl="core/data-tests";function Vl(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 bn` <li> <a href="${e}">${s}</a> ${t} </li> `}function Yl(e,t,n){return e.map((e=>{try{return new URL(e,t).href}catch{ir(pr`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,Gl,{elements:[n]})}})).filter((e=>e))}function Kl(e,t){const n=e.filter(((e,t,n)=>n.indexOf(e)!==t));if(n.length){const e=pr`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=pr`To fix, remove duplicates from ${"[data-tests]"}: ${ur(n,{quotes:!0})}.`;ir(e,Gl,{hint:r,elements:[t]})}}function Zl(e){const t=[...new Set(e)];return bn` <details class="respec-tests-details removeOnSave"> <summary>tests: ${t.length}</summary> <ul> ${t.map(Vl)} </ul> </details> `}var Jl=Object.freeze({__proto__:null,name:Gl,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=Yl(n.dataset.tests.split(/,/gm).map((e=>e.trim())),e.testSuiteURI,n);Kl(t,n);const r=Zl(t);n.append(r)}else or(Hl.missing_test_suite_uri,Gl)}});const Ql="core/list-sorter";function Xl(e){const t="ascending"===e?1:-1;return({textContent:e},{textContent:n})=>t*e.trim().localeCompare(n.trim())}function eu(e,t){return[...e.querySelectorAll(":scope > li")].sort(Xl(t)).reduce(((e,t)=>(e.appendChild(t),e)),document.createDocumentFragment())}function tu(e,t){return[...e.querySelectorAll(":scope > dt")].sort(Xl(t)).reduce(((e,t)=>{const{nodeType:n,nodeName:r}=t,s=document.createDocumentFragment();let{nextSibling:o}=t;for(;o&&o.nextSibling;){s.appendChild(o.cloneNode(!0));const{nodeType:e,nodeName:t}=o.nextSibling;if(e===n&&t===r)break;o=o.nextSibling}return s.prepend(t.cloneNode(!0)),e.appendChild(s),e}),document.createDocumentFragment())}var nu=Object.freeze({__proto__:null,name: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=tu(t,n);break;case"ol":case"ul":e=eu(t,n);break;default:ir(`ReSpec can't sort ${t.localName} elements.`,Ql,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}},sortDefinitionTerms:tu,sortListItems:eu});var ru=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)} @media (prefers-color-scheme:dark){ var.respec-hl{filter:saturate(.9) brightness(.9)} } var.respec-hl-c1{--bg-color:#f4d200} var.respec-hl-c2{--bg-color:#ff87a2} var.respec-hl-c3{--bg-color:#96e885} var.respec-hl-c4{--bg-color:#3eeed2} var.respec-hl-c5{--bg-color:#eacfb6} 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 su(e){e.stopPropagation();const{target:t}=e,n=function(e){const t=jn(e.textContent),n=e.closest(".algorithm, section"),r=iu(e),s=[...n.querySelectorAll("var")].filter((e=>jn(e.textContent)===t&&e.closest(".algorithm, section")===n)),o=s[0].classList.contains("respec-hl");if(ou.set(r,o),o)return s.forEach((e=>au(e,r))),[];s.forEach((e=>function(e,t){e.classList.add("respec-hl",t)}(e,r)));return s}(t),r=()=>{const e=iu(t);n.forEach((t=>au(t,e))),[...ou.keys()].forEach((e=>ou.set(e,!0)))};n.length&&document.body.addEventListener("click",r,{once:!0})}const ou=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 iu(e){const{value:t}=e.classList,n=/respec-hl-\w+/,r=n.test(t)&&t.match(n);return r?r[0]:!0===ou.get("respec-hl-c1")?"respec-hl-c1":[...ou.keys()].find((e=>ou.get(e)))||"respec-hl-c1"}function au(e,t){e.classList.remove("respec-hl",t),e.classList.length||e.removeAttribute("class")}var cu=Object.freeze({__proto__:null,name:"core/highlight-vars",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=ru,t.classList.add("removeOnSave"),document.head.appendChild(t),document.querySelectorAll("var").forEach((e=>e.addEventListener("click",su))),o("beforesave",(e=>{e.querySelectorAll("var.respec-hl").forEach(au)}))}});var lu=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:#222} var[data-type]::after{content:attr(data-type);transform:translateX(-50%) translateY(-100%);background:#222;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 uu=Object.freeze({__proto__:null,name:"core/data-type",run:function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=lu,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 du=String.raw`:root{--assertion-border:#aaa;--assertion-bg:#eee;--assertion-text:black} .assert{border-left:.5em solid #aaa;padding:.3em;border-color:#aaa;border-color:var(--assertion-border);background:#eee;background:var(--assertion-bg);color:#000;color:var(--assertion-text)} @media (prefers-color-scheme:dark){ :root{--assertion-border:#444;--assertion-bg:var(--borderedblock-bg);--assertion-text:var(--text)} }`;var pu=Object.freeze({__proto__:null,name:"core/algorithms",run:function(){const e=Array.from(document.querySelectorAll("ol.algorithm li")).filter((e=>e.textContent.trim().startsWith("Assert: ")));if(!e.length)return;for(const t of e){t.classList.add("assert");const e=t.firstChild;e instanceof Text&&e.textContent.startsWith("Assert: ")&&(e.textContent=e.textContent.replace("Assert: ",""),t.prepend(bn`<a href="https://infra.spec.whatwg.org/#assert">Assert</a>`,": "))}const t=document.createElement("style");t.textContent=du,document.head.appendChild(t)}});const fu="core/anchor-expander";function hu(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void or(`Found matching element "${t}", but it has no title or marker.`,fu,{title:"Missing title.",elements:[n]})}const s=er(r);n.append(...s.childNodes),n.classList.add("box-ref")}function mu(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void or(`Found matching figure "${t}", but figure is lacking a \`<figcaption>\`.`,fu,{title:"Missing figcaption in referenced figure.",elements:[n]})}const s=[...er(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("figno"),e)));n.append(...s),n.classList.add("fig-ref");const o=r.querySelector(".fig-title");!n.hasAttribute("title")&&o&&(n.title=jn(o.textContent))}function gu(e,t,n){if(!e.classList.contains("numbered"))return;const r=e.querySelector("caption");if(!r){n.textContent=n.getAttribute("href");return void or(`Found matching table "${t}", but table is lacking a \`<caption>\`.`,fu,{title:"Missing caption in referenced table.",elements:[n]})}const s=[...er(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("tableno"),e)));n.append(...s),n.classList.add("table-ref");const o=r.querySelector(".table-title");!n.hasAttribute("title")&&o&&(n.title=jn(o.textContent))}function bu(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)yu(r,n),wu(r,n);else{n.textContent=n.getAttribute("href");or("Found matching section, but the section was lacking a heading element.",fu,{title:`No matching id in document: "${t}".`,elements:[n]})}}function yu(e,t){const n=e.querySelector(".self-link"),r=[...er(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=Vn(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)}))}function wu(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 vu=Object.freeze({__proto__:null,name:fu,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":yu(n,t);break;case"section":bu(n,e,t);break;case"figure":mu(n,e,t);break;case"table":gu(n,e,t);break;case"aside":case"div":hu(n,e,t);break;default:t.textContent=t.getAttribute("href");or("ReSpec doesn't support expanding this kind of reference.",fu,{title:`Can't expand "#${e}".`,elements:[t]})}wu(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");or(`Couldn't expand inline reference. The id "${e}" is not in the document.`,fu,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});var $u=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-family:"Helvetica Neue",sans-serif;font-size:small;background:#fff;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px} .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;border-bottom-color:var(--indextable-hover-bg,#fff);top:0} .dfn-panel:not(.docked)>.caret::before{border-bottom:9px solid #a2a9b1;border-bottom-color:var(--indextable-hover-bg,#a2a9b1)} .dfn-panel *{margin:0} .dfn-panel b{display:block;color:#000;color:var(--text,#000);margin-top:.25em} .dfn-panel ul a[href]{color:#333;color:var(--text,#333)} .dfn-panel>div{display:flex} .dfn-panel a.self-link{font-weight:700;margin-right:auto} .dfn-panel .marker{padding:.1em;margin-left:.5em;border-radius:.2em;text-align:center;white-space:nowrap;font-size:90%;color:#040b1c} .dfn-panel .marker.dfn-exported{background:#d1edfd;box-shadow:0 0 0 .125em #1ca5f940} .dfn-panel .marker.idl-block{background:#8ccbf2;box-shadow:0 0 0 .125em #0670b161} .dfn-panel a:not(:hover){text-decoration:none!important;border-bottom:none!important} .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 ku(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}`,o=e.getAttribute("aria-label")||jn(e.textContent),i=bn` <div class="dfn-panel" id="${s}" hidden role="dialog" aria-modal="true" aria-label="Links in this document to definition: ${o}" > <span class="caret"></span> <div> <a class="self-link" href="${n}" aria-label="Permalink for definition: ${o}. Activate to close this dialog." >Permalink</a > ${function(e){return e.matches("dfn[data-export]")?bn`<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 bn`<a href="${e}" class="marker idl-block" title="Jump to IDL declaration" >IDL</a >`}}return null}(e,r)} </div> <p><b>Referenced in:</b></p> ${function(e,t){if(!t.length)return bn`<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 o=function(e){const t=e.closest("section");if(!t)return null;const n=t.querySelector("h1, h2, h3, h4, h5, h6");return n?`§ ${jn(n.textContent)}`:null}(t);(n.get(o)||n.set(o,[]).get(o)).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=>bn`<li> ${r(e).map((e=>bn`<a href="#${e.id}" title="${e.title}">${e.text}</a >${" "}`))} </li>`;return bn`<ul> ${[...n].map(s)} </ul>`}(t,r)} </div> `;return i}var xu=Object.freeze({__proto__:null,name:"core/dfn-panel",run:async function(){document.head.insertBefore(bn`<style> ${$u} </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(ku(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 Ed}))).default}catch{return ql("./src/core/dfn-panel.runtime.js")}}(),document.body.append(n)}});const _u="rs-changelog",Cu=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;bn.bind(this)` <ul> ${{any:Su(e,t,n).then((e=>async function(e){const{repoURL:t}=await io;return e.map((e=>{const[n,r=null]=e.message.split(/\(#(\d+)\)/,2),s=`${t}commit/${e.hash}`,o=r&&bn` (<a href="${r?`${t}pull/${r}`:null}">#${r}</a>)`;return bn`<li><a href="${s}">${n.trim()}</a>${o}</li>`}))}(e))).catch((e=>or(e.message,_u,{elements:[this]}))).finally((()=>{this.dispatchEvent(new CustomEvent("done"))})),placeholder:"Loading list of commits..."}} </ul> `}};async function Su(e,t,n){let r;try{const s=await io;if(!s)throw new Error("`respecConfig.github` is not set");const o=new URL("commits",`${s.apiBase}/${s.fullName}/`);o.searchParams.set("from",e),o.searchParams.set("to",t);const i=await fetch(o.href);if(!i.ok)throw new Error(`Request to ${o} failed with status code ${i.status}`);if(r=await i.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,element:Cu,name:_u})];var Eu=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 Au=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(bn`<meta name="monetization" content="${r}" class="${s}" />`)}});var Tu=Object.freeze({__proto__:null,name:"core/dfn-contract",run:function(){!function(){const e=document.querySelectorAll("dfn:is([data-dfn-type=''],:not([data-dfn-type]))");for(const t of e)t.dataset.dfnType="dfn";const t=document.querySelectorAll("dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])");for(const e of t)e.dataset.export=""}(),function(){const e=document.querySelectorAll("dl.definitions dt:has(dfn[data-dfn-type])");for(const t of e){const e=t.querySelector("dfn[data-dfn-type]").id,n=t.nextElementSibling;n&&!n.dataset.defines&&e&&(n.dataset.defines=`#${e}`)}const t=document.querySelectorAll(".definition:has(dfn[data-dfn-type])");for(const e of t){const t=e.querySelector("dfn[data-dfn-type]");t.id&&!e.dataset.defines&&(e.dataset.defines=`#${t.id}`)}}()}});const Lu="core/before-save";var Pu=Object.freeze({__proto__:null,name:Lu,run:function(e){if(e.beforeSave)if(Array.isArray(e.beforeSave)&&!e.beforeSave.some((e=>"function"!=typeof e||"AsyncFunction"===e.constructor.name)))o("beforesave",(t=>{!function(e,t){let n=0;for(const r of e)try{r(t)}catch(e){or(pr`Function ${`\`${r.name}\``||`at position ${n}`}\` threw an error during processing of ${"[beforeSave]"}.`,Lu,{hint:"See developer console."}),console.error(e)}finally{n++}}(e.beforeSave,t.ownerDocument)}),{once:!0});else{or(pr`${"[beforeSave]"} configuration option must be an array of synchronous JS functions.`,Lu)}}});const Iu="core/linter-rules/check-charset",Du=On({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 Nu=Object.freeze({__proto__:null,name:Iu,run:function(e){if(!e.lint?.["check-charset"])return;const t=document.querySelectorAll("meta[charset]"),n=[];for(const e of t)n.push(e.getAttribute("charset").trim().toLowerCase());n.includes("utf-8")&&1===t.length||ir(Du.msg,Iu,{hint:Du.hint,elements:[...t]})}});const ju="core/linter-rules/check-punctuation",Ou=[".",":","!","?"],Mu=On({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${Ou.map((e=>`"${e}"`)).join(", ")}.`}});var qu=Object.freeze({__proto__:null,name:ju,run:function(e){if(!e.lint?.["check-punctuation"])return;const t=new RegExp(`[${Ou.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top,#w3c-state)")].filter((e=>!t.test(e.textContent.trim())));n.length&&ir(Mu.msg,ju,{hint:Mu.hint,elements:n})}});const zu="core/linter-rules/check-internal-slots",Uu=On({en:{msg:"Internal slots should be preceded by a '.'",hint:"Add a '.' between the elements mentioned."}});var Wu=Object.freeze({__proto__:null,name:zu,run:function(e){if(!e.lint?.["check-internal-slots"])return;const t=[...document.querySelectorAll("var+a")].filter((({previousSibling:{nodeName:e}})=>e&&"VAR"===e));t.length&&ir(Uu.msg,zu,{hint:Uu.hint,elements:t})}});const Fu="core/linter-rules/local-refs-exist",Bu=On({en:{msg:"Broken local reference found in document.",hint:"Please fix the links mentioned."}});function Hu(e){const t=e.getAttribute("href").substring(1),n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var Gu=Object.freeze({__proto__:null,name:Fu,run:function(e){if(!e.lint?.["local-refs-exist"])return;const t=[...document.querySelectorAll("a[href^='#']")].filter(Hu);t.length&&ir(Bu.msg,Fu,{hint:Bu.hint,elements:t})}});const Vu="core/linter-rules/no-captionless-tables",Yu=On({en:{msg:"All tables marked with class='numbered' must start with a caption element.",hint:"Add a `caption` to the offending table."}});var Ku=Object.freeze({__proto__:null,name:Vu,run:function(e){if(!e.lint?.["no-captionless-tables"])return;const t=[...document.querySelectorAll("table.numbered")].filter((e=>!(e.firstElementChild instanceof HTMLTableCaptionElement)));t.length&&ir(Yu.msg,Vu,{hint:Yu.hint,elements:t})}});const Zu="no-unused-dfns",Ju="core/linter-rules/no-unused-dfns",Qu=On({en:{msg:e=>`Found definition for "${e}", but nothing links to it. This is usually a spec bug!`,get hint(){return pr` You can do one of the following... * Add a \`class="lint-ignore"\` attribute the definition. * Either remove the definition or change \`<dfn>\` to another type of HTML element. * If you meant to ${"[export|#data-export]"} the definition, add \`class="export"\` to the definition. To silence this warning entirely, set \`lint: { "no-unused-dfns": false }\` in your \`respecConfig\`.`}}});function Xu(e){return!document.querySelector(`a[href="#${e.id}"]:not(.index-term, .self-link)`)}var ed=Object.freeze({__proto__:null,name:Ju,run:function(e){if(!e.lint?.[Zu])return;const t="error"===e.lint[Zu]?or:ir;[...document.querySelectorAll("dfn:not(.lint-ignore, [data-export], [data-cite])")].filter(Xu).forEach((e=>{const n=[e],r=jn(e.textContent);t(Qu.msg(r),Ju,{elements:n,hint:Qu.hint})}))}});const td="core/linter-rules/no-headingless-sections",nd=On({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>`。"}});var rd=Object.freeze({__proto__:null,name:td,run:function(e){if(!e.lint?.["no-headingless-sections"])return;const t=[...document.querySelectorAll("section:not(.head,#abstract,#sotd)")].filter((({firstElementChild:e})=>!e||!(e.matches(".header-wrapper")||e instanceof HTMLHeadingElement)));t.length&&ir(nd.msg,td,{hint:nd.hint,elements:t})}});const sd="core/linter-rules/no-unused-vars",od=On({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the `<var>`."}});var id=Object.freeze({__proto__:null,name:sd,run:function(e){if(!e.lint?.["no-unused-vars"])return;const t=[],n=e=>!!e.querySelector(":scope > :not(section) ~ .algorithm, :scope > :not(section) .algorithm");for(const e of document.querySelectorAll("section")){if(!n(e))continue;const r=e.querySelectorAll(":scope > :not(section) var");if(!r.length)continue;const s=new Map;for(const e of r){const t=jn(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&&ir(od.msg,sd,{hint:od.hint,elements:t})}});const ad="required-sections",cd="w3c/linter-rules/required-sections",ld={en:{msg:e=>`W3C Recommendation track documents require a separate "${e}" section.`,hint:e=>pr`Add a \`<section>\` with a "${e}" header. See the [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review). If the document is not intended for the W3C Recommendation track, set ${"[noRecTrack]"} to \`true\` or turn off the ${`[${ad}]`} linter rule.`,privacy_considerations:"Privacy Considerations",security_considerations:"Security Considerations"},es:{msg:e=>`Documentos que van a ser "W3C Recommendation" requieren una sección "${e}" separada.`,hint:e=>pr`Agrega una \`<section>\` con título "${e}". Ver los [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review). Si el documento no está destinado a ser un W3C Recommendation, puedes poner ${"[noRecTrack]"} a \`true\` o apaga la regla de linter ${`[${ad}]`}.`,privacy_considerations:"Consideraciones de privacidad",security_considerations:"Consideraciones de Seguridad"}},ud=On(ld),dd=new Set([...Ts]);dd.delete("DISC"),As.forEach((e=>dd.delete(e)));var pd=Object.freeze({__proto__:null,name:cd,requiresSomeSectionStatus:dd,run:function(e){if(!e.lint?.[ad])return;if(!Mn(ld,"privacy_considerations")){return void ir("Cannot check for required sections as translations are not available.",cd,{hint:"File an issue to add translations or use a supported language."})}if(e.noRecTrack||!dd.has(e.specStatus))return;const t="error"===e.lint[ad]?or:ir,n=new Xn([ud.privacy_considerations,ud.security_considerations]),r=document.querySelectorAll("h2, h3, h4, h5, h6");for(const e of r){const t=e.cloneNode(!0);t.querySelectorAll("bdi")?.forEach((e=>e.remove()));const r=jn(t.textContent);if(n.has(r)&&(n.delete(r),0===n.size))return}for(const e of n)t(ud.msg(e),cd,{hint:ud.hint(e)})}});const fd="core/linter-rules/wpt-tests-exist",hd=On({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 md=Object.freeze({__proto__:null,name:fd,run:async function(e){if(!e.lint?.["wpt-tests-exist"])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 ir("Failed to parse WPT directory from testSuiteURI",`linter/${fd}`),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 ir(`Failed to fetch files from WPT repository. Request failed with error: ${await s.text()} (${s.status})`,`linter/${fd}`),null}const{entries:o}=await s.json(),i=o.filter((e=>!e.endsWith("/")));return new Set(i)}(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=>{ir(`${hd.msg} \`${t}\`.`,fd,{hint:hd.hint,elements:[e]})}))}});const gd="core/linter-rules/no-http-props",bd=On({en:{msg:pr`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:pr`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"}});var yd=Object.freeze({__proto__:null,name:gd,run:function(e){if(!e.lint?.["no-http-props"])return;if(!parent.location.href.startsWith("http"))return;const t=Object.getOwnPropertyNames(e).filter((t=>t.endsWith("URI")&&e[t]||"prevED"===t)).filter((t=>new URL(e[t],parent.location.href).href.startsWith("http://")));if(t.length){const e=In(t,(e=>pr`${`[${e}]`}`));ir(bd.msg,gd,{hint:bd.hint+e})}}});const wd="core/linter-rules/a11y",vd=["color-contrast","landmark-one-main","landmark-unique","region"];function $d(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 kd=Object.freeze({__proto__:null,name:wd,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(vd.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://cdn.jsdelivr.net/npm/axe-core@4/axe.min.js",document.head.appendChild(e),new Promise(((t,n)=>{e.onload=()=>t(window.axe),e.onerror=n}))}()}catch(e){return or("Failed to load a11y linter.",wd),console.error(e),[]}try{return(await s.run(document,r)).violations}catch(e){return or("Error while looking for a11y issues.",wd),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:o}=e,i=`a11y/${n}: ${r}.`;for(const[e,n]of t){const t=$d(e);ir(i,wd,{details:`\n\n${s}.\n\n${t}. ([Learn more](${o}))`,elements:n})}}}});const xd="informative-dfn",_d="core/linter-rules/informative-dfn",Cd=On({en:{msg:(e,t)=>`Normative reference to "${e}" found but term is defined "informatively" in "${t}".`,get hint(){return pr` You can do one of the following... * Get the source definition to be made normative * Add a \`class="lint-ignore"\` attribute to the link. * Use a local normative proxy for the definition à la \`<dfn data-cite="spec">term</dfn>\` To silence this warning entirely, set \`lint: { "${xd}": false }\` in your \`respecConfig\`.`}}});var Sd=Object.freeze({__proto__:null,name:_d,run:function(e){if(!e.lint?.[xd])return;const t="error"===e.lint[xd]?or:ir;mc.forEach((({term:e,spec:n,element:r})=>{r.classList.contains("lint-ignore")||t(Cd.msg(e,n),_d,{title:"Normative reference to non-normative term.",elements:[r],hint:Cd.hint})}))}}),Rd=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'}),Ed=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