This repository has been archived by the owner on Jan 14, 2022. It is now read-only.
forked from AOMediaCodec/av1-rtp-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
respec-w3c.js
800 lines (800 loc) · 291 KB
/
respec-w3c.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
window.respecVersion="25.14.0",function(){"use strict";window.addEventListener("error",e=>{console.error(e.error,e.message,e)});const e=[Promise.resolve().then((function(){return Mn})),Promise.resolve().then((function(){return wr})),Promise.resolve().then((function(){return vr})),Promise.resolve().then((function(){return b})),Promise.resolve().then((function(){return co})),Promise.resolve().then((function(){return uo})),Promise.resolve().then((function(){return fo})),Promise.resolve().then((function(){return mo})),Promise.resolve().then((function(){return vo})),Promise.resolve().then((function(){return xo})),Promise.resolve().then((function(){return nr})),Promise.resolve().then((function(){return Hn})),Promise.resolve().then((function(){return _o})),Promise.resolve().then((function(){return So})),Promise.resolve().then((function(){return Ro})),Promise.resolve().then((function(){return cs})),Promise.resolve().then((function(){return us})),Promise.resolve().then((function(){return ds})),Promise.resolve().then((function(){return fs})),Promise.resolve().then((function(){return gi})),Promise.resolve().then((function(){return yi})),Promise.resolve().then((function(){return ki})),Promise.resolve().then((function(){return xi})),Promise.resolve().then((function(){return Si})),Promise.resolve().then((function(){return Ti})),Promise.resolve().then((function(){return Ni})),Promise.resolve().then((function(){return ji})),Promise.resolve().then((function(){return ta})),Promise.resolve().then((function(){return Us})),Promise.resolve().then((function(){return ba})),Promise.resolve().then((function(){return Ra})),Promise.resolve().then((function(){return la})),Promise.resolve().then((function(){return Aa})),Promise.resolve().then((function(){return Js})),Promise.resolve().then((function(){return Ma})),Promise.resolve().then((function(){return Fa})),Promise.resolve().then((function(){return qa})),Promise.resolve().then((function(){return Ya})),Promise.resolve().then((function(){return Ja})),Promise.resolve().then((function(){return Xa})),Promise.resolve().then((function(){return tc})),Promise.resolve().then((function(){return ac})),Promise.resolve().then((function(){return gc})),Promise.resolve().then((function(){return Cc})),Promise.resolve().then((function(){return Ac})),Promise.resolve().then((function(){return Nc})),Promise.resolve().then((function(){return Wc})),Promise.resolve().then((function(){return Mc})),Promise.resolve().then((function(){return Bc})),Promise.resolve().then((function(){return Kc})),Promise.resolve().then((function(){return Hi})),Promise.resolve().then((function(){return nl})),Promise.resolve().then((function(){return il})),Promise.resolve().then((function(){return pl})),Promise.resolve().then((function(){return hl})),Promise.resolve().then((function(){return gl})),Promise.resolve().then((function(){return yl})),Promise.resolve().then((function(){return _l})),Promise.resolve().then((function(){return Rl})),Promise.resolve().then((function(){return Or})),Promise.resolve().then((function(){return Ll}))];(async()=>{const[t,{ui:n},...r]=await Promise.all(e);try{n.show(),await async function(){"loading"===document.readyState&&await new Promise(e=>document.addEventListener("DOMContentLoaded",e))}(),await t.runAll(r)}finally{n.enable()}})().catch(e=>{console.error(e)});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 Map;function o(e,...t){if(!r.has(e))return;if(Array.from(r.get(e)).forEach(e=>{try{e(...t)}catch(t){o("error",`Error when calling function ${e.name}. See developer console.`),console.error(t)}}),window.parent===window.self)return;const n=t.map(e=>String(JSON.stringify(e.stack||e)));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function s(e,t,n={once:!1}){return n.once?s(e,(function n(...o){!function({topic:e,cb:t}){const n=r.get(e);if(!n||!n.has(t))return console.warn("Already unsubscribed:",e,t),!1;n.delete(t)}({topic:e,cb:n}),t(...o)})):(r.has(e)?r.get(e).add(t):r.set(e,new Set([t])),{topic:e,cb:t})}s("error",e=>{console.error(e,e.stack)}),s("warn",e=>{console.warn(e)}),n("core/pubsubhub",{sub:s});const i={},a=e=>Object.assign(i,e),c=["githubToken","githubUser"];s("start-all",a),s("amend-user-config",a),s("end-all",()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of c)e in i&&delete i[e];e.innerHTML=JSON.stringify(i,null,2),document.head.appendChild(e)}),s("start-all",(function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter(([e,t])=>!!e&&!!t).map(([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let o;try{o=JSON.parse(r)}catch{o=r}return[n,o]}),r=Object.fromEntries(n);Object.assign(e,r),o("amend-user-config",r)}),{once:!0});const l=new Promise(e=>{s("end-all",e,{once:!0})});let u;Object.defineProperty(document,"respecIsReady",{get:()=>l});const d=new Promise(e=>{u=e});let p;s("plugins-done",async e=>{const t=[];if(Array.isArray(e.postProcess)){const n=e.postProcess.filter(e=>{const t="function"==typeof e;return t||o("error","Every item in `postProcess` must be a JS function."),t}).map(async t=>{try{return await t(e,document)}catch(e){o("error",`Function ${t.name} threw an error during \`postProcess\`. See developer console.`),console.error(e)}}),r=await Promise.all(n);t.push(...r)}"function"==typeof e.afterEnd&&t.push(await e.afterEnd(e,document)),u(t)},{once:!0});const f=new Promise(e=>{p=e});s("start-all",async e=>{const t=[];if(Array.isArray(e.preProcess)){const n=e.preProcess.filter(e=>{const t="function"==typeof e;return t||o("error","Every item in `preProcess` must be a JS function."),t}).map(async t=>{try{return await t(e,document)}catch(e){o("error",`Function ${t.name} threw an error during \`preProcess\`. See developer console.`),console.error(e)}}),r=await Promise.all(n);t.push(...r)}p(t)},{once:!0});const h=document.documentElement;h&&!h.hasAttribute("lang")&&(h.lang="en",h.hasAttribute("dir")||(h.dir="ltr"));const m={},g=h.lang;var b=Object.freeze({__proto__:null,name:"core/l10n",l10n:m,lang:g,run:function(e){e.l10n=m[g]||m.en}});let y,w;const v=new WeakMap,k=new WeakMap,x=new WeakMap,$=new WeakMap,_=new WeakMap;let C={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return k.get(e);if("objectStoreNames"===t)return e.objectStoreNames||x.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return R(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function S(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(w||(w=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(A(this),t),R(v.get(this))}:function(...t){return R(e.apply(A(this),t))}:function(t,...n){const r=e.call(A(this),t,...n);return x.set(r,t.sort?t.sort():[t]),R(r)}}function E(e){return"function"==typeof e?S(e):(e instanceof IDBTransaction&&function(e){if(k.has(e))return;const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});k.set(e,t)}(e),t=e,(y||(y=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>t instanceof e)?new Proxy(e,C):e);var t}function R(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(R(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&v.set(t,e)}).catch(()=>{}),_.set(t,e),t}(e);if($.has(e))return $.get(e);const t=E(e);return t!==e&&($.set(e,t),_.set(t,e)),t}const A=e=>_.get(e);const T=["get","getKey","getAll","getAllKeys","count"],L=["put","add","delete","clear"],P=new Map;function I(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(P.get(t))return P.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=L.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!T.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let i=s.store;r&&(i=i.index(t.shift()));const a=await i[n](...t);return o&&await s.done,a};return P.set(t,s),s}C=(e=>({...e,get:(t,n,r)=>I(t,n)||e.get(t,n,r),has:(t,n)=>!!I(t,n)||e.has(t,n)}))(C);var N=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",()=>t()),R(n).then(()=>{})},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=R(i);return r&&i.addEventListener("upgradeneeded",e=>{r(R(i.result),e.oldVersion,e.newVersion,R(i.transaction))}),n&&i.addEventListener("blocked",()=>n()),a.then(e=>{s&&e.addEventListener("close",()=>s()),o&&e.addEventListener("versionchange",()=>o())}).catch(()=>{}),a},unwrap:A,wrap:R});function D(e,t,n,r,o,{level:s="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 o=n.map(e=>e.trivia+e.value).join(""),s=e[t];return"eof"===s.type?o:r?o+s.trivia:o.slice(s.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"===o?"since":"inside",g=`${o} 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:s,ruleName:a,autofix:i,input:f,tokens:p}}function j(e,t,n,r){return D(e,t,n,r,"Syntax")}function O(e,t,n,r,o={}){return o.ruleName=n,D(t.source,e.index,t,r,"Validation",o)}class z{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 U(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 o=U(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,o),o)return{reference:e,dictionary:o.dictionary}}if("dictionary"===r.type&&(n||!e.nullable))return{reference:e,dictionary:r}}for(const n of e.subtype){const e=U(n,t);if(e)return n.union?e:{reference:n,dictionary:e.dictionary}}}class W extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class M extends z{static parser(e,t){return()=>{const n=e.consume(t);if(n)return new M({source:e.source,tokens:{value:n}})}}get value(){return re(this.tokens.value.value)}}function F(e,t){return oe(e,{parser:M.parser(e,t),listName:t+" list"})}const q=["identifier","decimal","integer","string"],B=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map(e=>[e,"Legacy"+e]),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function H(e){for(const t of q){const n=F(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class G extends z{static parse(e){const t={assign:e.consume("=")},n=me(new G({source:e.source,tokens:t}));return t.assign&&(t.secondaryName=e.consume(...q)),t.open=e.consume("("),t.open?(n.list=n.rhsIsList?H(e):ce(e),t.close=e.consume(")")||e.error("Unexpected token in extended attribute argument list")):n.hasRhs&&!t.secondaryName&&e.error("No right hand side to extended attribute assignment"),n.this}get rhsIsList(){return this.tokens.assign&&!this.tokens.secondaryName}get rhsType(){return this.rhsIsList?this.list[0].tokens.value.type+"-list":this.tokens.secondaryName?this.tokens.secondaryName.type:null}}class V extends z{static parse(e){const t=e.consume("identifier");if(t)return new V({source:e.source,tokens:{name:t},params:G.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:re(t.secondaryName.value)}}get arguments(){const{rhsIsList:e,list:t}=this.params;return!t||e?[]:t}*validate(e){const{name:t}=this;if("LegacyNoInterfaceObject"===t){const e="`[LegacyNoInterfaceObject]` extended attribute is an undesirable feature that may be removed from Web IDL in the future. Refer to the [relevant upstream PR](https://github.com/heycam/webidl/pull/609) for more information.";yield O(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(B.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${B.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/heycam/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=B.get(e),"TreatNullAs"===e&&(n.params.tokens={})})})}var n;for(const t of this.arguments)yield*t.validate(e)}}class Z extends W{static parse(e){const t={};if(t.open=e.consume("["),!t.open)return new Z({});const n=new Z({source:e.source,tokens:t});return n.push(...oe(e,{parser:V.parse,listName:"extended attribute"})),t.close=e.consume("]")||e.error("Unexpected closing token of extended attribute"),n.length||e.error("Found an empty extended attribute"),e.probe("[")&&e.error("Illegal double extended attribute lists, consider merging them"),n}*validate(e){for(const t of this)yield*t.validate(e)}}function Y(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function K(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","sequence","record");if(!n)return;const r=me(new J({source:e.source,tokens:{base:n}}));switch(r.tokens.open=e.consume("<")||e.error("No opening bracket after "+n.type),n.type){case"Promise":{e.probe("[")&&e.error("Promise type cannot have extended attribute");const n=ue(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"sequence":case"FrozenArray":case"ObservableArray":{const o=le(e,t)||e.error(`Missing ${n.type} subtype`);r.subtype.push(o);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...ye)||e.error("Record key must be one of: "+ye.join(", ")),o=new J({source:e.source,tokens:{base:n}});o.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),o.type=t;const s=le(e,t)||e.error("Error parsing generic type record");r.subtype.push(o,s);break}}return r.idlType||e.error("Error parsing generic type "+n.type),r.tokens.close=e.consume(">")||e.error("Missing closing bracket after "+n.type),r.this}(e,t)||ae(e);if(!n){const t=e.consume("identifier",...ye,...be);if(!t)return;n=new J({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,Y(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}class J extends z{static parse(e,t){return K(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=me(new J({source:e.source,tokens:n}));for(r.type=t||null;;){const t=le(e)||e.error("No type after open parenthesis or 'or' in union type");"any"===t.idlType&&e.error("Type `any` cannot be included in a union type"),"Promise"===t.generic&&e.error("Type `Promise` cannot be included in a union type"),r.subtype.push(t);const n=e.consume("or");if(!n)break;t.tokens.separator=n}return r.idlType.length<2&&e.error("At least two types are expected in a union type but found less"),n.close=e.consume(")")||e.error("Unterminated union type"),Y(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({})}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 re([this.tokens.prefix,this.tokens.base,this.tokens.postfix].filter(e=>e).map(e=>e.value).join(" "))}*validate(e){if(yield*this.extAttrs.validate(e),"void"===this.idlType){const e="`void` is now replaced by `undefined`. Refer to the [relevant GitHub issue](https://github.com/heycam/webidl/issues/60) for more information.";yield 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}=U(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)}}class X extends z{static parse(e){const t=e.consume("=");if(!t)return null;const n=se(e)||e.consume("string","null","[","{")||e.error("No value for default"),r=[n];if("["===n.type){const t=e.consume("]")||e.error("Default sequence value must be empty");r.push(t)}else if("{"===n.type){const t=e.consume("}")||e.error("Default dictionary value must be empty");r.push(t)}return new X({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 ie(this.expression[0]).type}get value(){return ie(this.expression[0]).value}get negative(){return ie(this.expression[0]).negative}}class Q extends z{static parse(e){const t=e.position,n={},r=me(new Q({source:e.source,tokens:n}));return r.extAttrs=Z.parse(e),n.optional=e.consume("optional"),r.idlType=le(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consume("identifier",...we),n.name?(r.default=n.optional?X.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 re(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e);const t=U(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:ee(this)})}}else if(this.parent&&!function e(t,n){if(n.cache.dictionaryIncludesRequiredField.has(t))return n.cache.dictionaryIncludesRequiredField.get(t);if(n.cache.dictionaryIncludesRequiredField.set(t,void 0),t.inheritance){const r=n.unique.get(t.inheritance);if(!r)return!0;if(e(r,n))return!0}const r=t.members.some(e=>e.required);return n.cache.dictionaryIncludesRequiredField.set(t,r),r}(t.dictionary,e)&&function(e){const t=e.parent.arguments||e.parent.list,n=t.indexOf(e);return!t.slice(n+1).some(e=>!e.optional)}(this)){const e="Dictionary argument must be optional if it has no required fields";yield O(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=he(n.idlType);n.tokens.optional={type:"optional",value:"optional",trivia:e.trivia},e.trivia=" ",ee(n)()})})}var n}}function ee(e){return()=>{e.default=X.parse(new $e(" = {}"))}}class te extends z{static parse(e,{special:t,regular:n}={}){const r={special:t},o=me(new te({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(o.arguments=[],o):(t||n||(r.special=e.consume("getter","setter","deleter")),o.idlType=ue(e)||e.error("Missing return type"),r.name=e.consume("identifier","includes"),r.open=e.consume("(")||e.error("Invalid operation"),o.arguments=ce(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),o.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?re(e.value):""}get special(){return this.tokens.special?this.tokens.special.value:""}*validate(e){if(!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)}}class ne extends z{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const o=e.position,s={special:t},i=me(new ne({source:e.source,tokens:s}));if(t||n||(s.special=e.consume("inherit")),"inherit"===i.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),s.readonly=e.consume("readonly"),r&&!s.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),s.base=e.consume("attribute"),s.base){switch(i.idlType=le(e,"attribute-type")||e.error("Attribute lacks a type"),i.idlType.generic){case"sequence":case"record":e.error(`Attributes cannot accept ${i.idlType.generic} types`)}return s.name=e.consume("identifier","async","required")||e.error("Attribute lacks a name"),s.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),i.this}e.unconsume(o)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return re(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e)}}function re(e){return e.startsWith("_")?e.slice(1):e}function oe(e,{parser:t,allowDangler:n,listName:r="list"}){const o=t(e);if(!o)return[];o.tokens.separator=e.consume(",");const s=[o];for(;o.tokens.separator;){const o=t(e);if(!o){n||e.error("Trailing comma in "+r);break}if(o.tokens.separator=e.consume(","),s.push(o),!o.tokens.separator)break}return s}function se(e){return e.consume("true","false","Infinity","-Infinity","NaN","decimal","integer")}function ie({type:e,value:t}){switch(e){case"true":case"false":return{type:"boolean",value:"true"===e};case"Infinity":case"-Infinity":return{type:"Infinity",negative:e.startsWith("-")};case"[":return{type:"sequence",value:[]};case"{":return{type:"dictionary"};case"decimal":case"integer":return{type:"number",value:t};case"string":return{type:"string",value:t.slice(1,-1)};default:return{type:e}}}function ae(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const o=e.consume("long");return new J({source:t,tokens:{prefix:n,base:r,postfix:o}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new J({source:t,tokens:{prefix:n,base:r}});n&&e.error("Failed to parse float type")}();if(n)return n;const r=e.consume("boolean","byte","octet","undefined");return r?new J({source:t,tokens:{base:r}}):void 0}function ce(e){return oe(e,{parser:Q.parse,listName:"arguments list"})}function le(e,t){const n=Z.parse(e),r=J.parse(e,t);return r&&(me(r).extAttrs=n),r}function ue(e,t){const n=J.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new J({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function de(e){const t=e.consume("stringifier");if(!t)return;return ne.parse(e,{special:t})||te.parse(e,{special:t})||e.error("Unterminated stringifier")}function pe(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function fe(e){return()=>{if(e.extAttrs.length){const t=new $e("Exposed=Window,"),n=V.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{me(e).extAttrs=Z.parse(new $e("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia="\n"+pe(t)}}}function he(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return he(e.idlType);return Object.values(e.tokens).sort((e,t)=>e.index-t.index)[0]}function me(e,t){return t||(t=e),e?new Proxy(e,{get(e,t){const n=e[t];return Array.isArray(n)?me(n,e):n},set(e,n,r){if(e[n]=r,!r)return!0;if(Array.isArray(r))for(const e of r)void 0!==e.parent&&(e.parent=t);else void 0!==r.parent&&(r.parent=t);return!0}}):e}const ge={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:/((\/(\/.*|\*([^*]|\*[^/])*\*\/)[\t\n\r ]*)+)/y,other:/[^\t\n\r 0-9A-Za-z]/y},be=["ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","Float32Array","Float64Array","any","object","symbol"],ye=["ByteString","DOMString","USVString"],we=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],ve=["-Infinity","FrozenArray","Infinity","NaN","ObservableArray","Promise","boolean","byte","double","false","float","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","undefined","unsigned","void"].concat(we,ye,be),ke=["(",")",",","...",":",";","<","=",">","?","[","]","{","}"],xe=["_constructor","toString","_toString"];class $e{constructor(e){this.source=function(e){const t=[];let n=0,r="",o=1,s=0;for(;n<e.length;){const a=e.charAt(n);let c=-1;if(/[\t\n\r ]/.test(a)?c=i("whitespace",{noFlushTrivia:!0}):"/"===a&&(c=i("comment",{noFlushTrivia:!0})),-1!==c){const e=t.pop().value;o+=(e.match(/\n/g)||[]).length,r+=e,s-=1}else if(/[-0-9.A-Z_a-z]/.test(a)){if(c=i("decimal"),-1===c&&(c=i("integer")),-1===c){c=i("identifier");const e=t.length-1,n=t[e];if(-1!==c){if(xe.includes(n.value)){const r=re(n.value)+" is a reserved identifier and must not be used.";throw new _e(j(t,e,null,r))}ve.includes(n.value)&&(n.type=n.value)}}}else'"'===a&&(c=i("string"));for(const i of ke)if(e.startsWith(i,n)){t.push({type:i,value:i,trivia:r,line:o,index:s}),r="",n+=i.length,c=n;break}if(-1===c&&(c=i("other")),-1===c)throw new Error("Token stream not progressing");n=c,s+=1}return t.push({type:"eof",value:"",trivia:r}),t;function i(i,{noFlushTrivia:a}={}){const c=ge[i];c.lastIndex=n;const l=c.exec(e);return l?(t.push({type:i,value:l[0],trivia:r,line:o,index:s}),a||(r=""),c.lastIndex):-1}}(e),this.position=0}error(e){throw new _e(j(this.source,this.position,this.current,e))}probe(e){return this.source.length>this.position&&this.source[this.position].type===e}consume(...e){for(const t of e){if(!this.probe(t))continue;const e=this.source[this.position];return this.position++,e}}unconsume(e){this.position=e}}class _e extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:o,input:s,tokens:i}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=o,this.input=s,this.tokens=i}}class Ce extends M{static parse(e){const t=e.consume("string");if(t)return new Ce({source:e.source,tokens:{value:t}})}get type(){return"enum-value"}get value(){return super.value.slice(1,-1)}}class Se extends z{static parse(e){const t={};if(t.base=e.consume("enum"),!t.base)return;t.name=e.consume("identifier")||e.error("No name for enum");const n=me(new Se({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=oe(e,{parser:Ce.parse,allowDangler:!0,listName:"enumeration"}),e.probe("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 re(this.tokens.name.value)}}class Ee extends z{static parse(e){const t=e.consume("identifier");if(!t)return;const n={target:t};if(n.includes=e.consume("includes"),n.includes)return n.mixin=e.consume("identifier")||e.error("Incomplete includes statement"),n.termination=e.consume(";")||e.error("No terminating ; for includes statement"),new Ee({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return re(this.tokens.target.value)}get includes(){return re(this.tokens.mixin.value)}}class Re extends z{static parse(e){const t={},n=me(new Re({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=le(e,"typedef-type")||e.error("Typedef lacks a type"),t.name=e.consume("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 re(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e)}}class Ae extends z{static parse(e,t){const n={base:t},r=me(new Ae({source:e.source,tokens:n}));return n.name=e.consume("identifier")||e.error("Callback lacks a name"),e.current=r.this,n.assign=e.consume("=")||e.error("Callback lacks an assignment"),r.idlType=ue(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=ce(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 re(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e)}}class Te extends z{static parse(e,t,{type:n,inheritable:r,allowedMembers:o}){const{tokens:s}=t;for(s.name=e.consume("identifier")||e.error("Missing name in "+t.type),e.current=t,t=me(t),r&&Object.assign(s,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consume("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),s.open=e.consume("{")||e.error("Bodyless "+n),t.members=[];;){if(s.close=e.consume("}"),s.close)return s.termination=e.consume(";")||e.error("Missing semicolon after "+n),t.this;const r=Z.parse(e);let i;for(const[t,...n]of o)if(i=me(t(e,...n)),i)break;i||e.error("Unknown member"),i.extAttrs=r,t.members.push(i.this)}}get partial(){return!!this.tokens.partial}get name(){return re(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?re(this.tokens.inheritance.value):null}*validate(e){for(const t of this.members)t.validate&&(yield*t.validate(e))}}class Le extends z{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=ae(e);if(!n){const t=e.consume("identifier")||e.error("Const lacks a type");n=new J({source:e.source,tokens:{base:t}})}e.probe("?")&&e.error("Unexpected nullable constant type"),n.type="const-type",t.name=e.consume("identifier")||e.error("Const lacks a name"),t.assign=e.consume("=")||e.error("Const lacks value assignment"),t.value=se(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new Le({source:e.source,tokens:t});return me(r).idlType=n,r}get type(){return"const"}get name(){return re(this.tokens.name.value)}get value(){return ie(this.tokens.value)}}class Pe extends z{static parse(e){const t=e.position,n={},r=me(new Pe({source:e.source,tokens:n}));if(n.readonly=e.consume("readonly"),n.readonly||(n.async=e.consume("async")),n.base=n.readonly?e.consume("maplike","setlike"):n.async?e.consume("iterable"):e.consume("iterable","maplike","setlike"),!n.base)return void e.unconsume(t);const{type:o}=r,s="maplike"===o,i=s||"iterable"===o,a=r.async&&"iterable"===o;n.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${o} declaration`);const c=le(e)||e.error(`Missing a type argument in ${o} declaration`);return r.idlType=[c],r.arguments=[],i&&(c.tokens.separator=e.consume(","),c.tokens.separator?r.idlType.push(le(e)):s&&e.error(`Missing second type argument in ${o} declaration`)),n.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${o} declaration`),e.probe("(")&&(a?(n.argsOpen=e.consume("("),r.arguments.push(...ce(e)),n.argsClose=e.consume(")")||e.error("Unterminated async iterable argument list")):e.error("Arguments are only allowed for `async iterable`")),n.termination=e.consume(";")||e.error(`Missing semicolon after ${o} declaration`),r.this}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}get async(){return!!this.tokens.async}*validate(e){for(const t of this.idlType)yield*t.validate(e);for(const t of this.arguments)yield*t.validate(e)}}class Ie extends z{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=ce(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const o=new Ie({source:e.source,tokens:n});return me(o).arguments=r,o}get type(){return"constructor"}*validate(e){this.idlType&&(yield*this.idlType.validate(e));for(const t of this.arguments)yield*t.validate(e)}}function Ne(e){const t=e.consume("static");if(!t)return;return ne.parse(e,{special:t})||te.parse(e,{special:t})||e.error("No body in static member")}class De extends Te{static parse(e,t,{partial:n=null}={}){const r={partial:n,base:t};return Te.parse(e,new De({source:e.source,tokens:r}),{type:"interface",inheritable:!n,allowedMembers:[[Le.parse],[Ie.parse],[Ne],[de],[Pe.parse],[ne.parse],[te.parse]]})}get type(){return"interface"}*validate(e){if(yield*this.extAttrs.validate(e),!this.partial&&this.extAttrs.every(e=>"Exposed"!==e.name)&&this.extAttrs.every(e=>"LegacyNoInterfaceObject"!==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:fe(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:je(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=new Set(i(t).map(e=>e.name)),r=e.partials.get(t.name)||[],o=e.mixinMap.get(t.name)||[];for(const e of[...r,...o]){const r=i(e);yield*s(r,n,e,t);for(const e of r)n.add(e.name)}function*s(e,t,n,r){for(const o of e){const{name:e}=o;if(e&&t.has(e)){const t=`The operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield O(o.tokens.name,n,"no-cross-overload",t)}}}function i(e){return e.members.filter(({type:e})=>"operation"===e)}}(e,this))}}function je(e,t){return e=me(e),()=>{const n=pe(e.extAttrs.tokens.open.trivia),r=e.members.length?pe(he(e.members[0]).trivia):function(e){const t=pe(e),n=t.includes("\t")?"\t":" ";return t+n}(n),o=Ie.parse(new $e(`\n${r}constructor();`));o.extAttrs=new Z({}),me(o).arguments=t.arguments;const s=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(s+1,0,o);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 Oe extends Te{static parse(e,t,{partial:n}={}){const r={partial:n,base:t};if(r.mixin=e.consume("mixin"),r.mixin)return Te.parse(e,new Oe({source:e.source,tokens:r}),{type:"interface mixin",allowedMembers:[[Le.parse],[de],[ne.parse,{noInherit:!0}],[te.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class ze extends z{static parse(e){const t={},n=me(new ze({source:e.source,tokens:t}));return n.extAttrs=Z.parse(e),t.required=e.consume("required"),n.idlType=le(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consume("identifier")||e.error("Dictionary member lacks a name"),n.default=X.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 re(this.tokens.name.value)}get required(){return!!this.tokens.required}*validate(e){yield*this.idlType.validate(e)}}class Ue extends Te{static parse(e,{partial:t}={}){const n={partial:t};if(n.base=e.consume("dictionary"),n.base)return Te.parse(e,new Ue({source:e.source,tokens:n}),{type:"dictionary",inheritable:!t,allowedMembers:[[ze.parse]]})}get type(){return"dictionary"}}class We extends Te{static parse(e,{partial:t}={}){const n={partial:t};if(n.base=e.consume("namespace"),n.base)return Te.parse(e,new We({source:e.source,tokens:n}),{type:"namespace",allowedMembers:[[ne.parse,{noInherit:!0,readonly:!0}],[te.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:fe(this)})}yield*super.validate(e)}}class Me extends Te{static parse(e,t,{partial:n=null}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return Te.parse(e,new Me({source:e.source,tokens:r}),{type:"callback interface",inheritable:!n,allowedMembers:[[Le.parse],[te.parse,{regular:!0}]]})}get type(){return"callback interface"}}function Fe(e,t){const n=e.source;function r(t){e.error(t)}function o(...t){return e.consume(...t)}function s(t){const n=o("interface");if(!n)return;return Oe.parse(e,n,t)||De.parse(e,n,t)||r("Interface has no proper body")}function i(){return function(){const t=o("callback");if(t)return e.probe("interface")?Me.parse(e,t):Ae.parse(e,t)}()||s()||function(){const t=o("partial");if(t)return Ue.parse(e,{partial:t})||s({partial:t})||We.parse(e,{partial:t})||r("Partial doesn't apply to anything")}()||Ue.parse(e)||Se.parse(e)||Re.parse(e)||Ee.parse(e)||We.parse(e)}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}me(n).extAttrs=t,s.push(n)}const a=o("eof");return t.concrete&&s.push(a),s}();return e.position<n.length&&r("Unrecognised tokens"),a}function qe(e){return e}const Be={wrap:e=>e.join(""),trivia:qe,name:qe,reference:qe,type:qe,generic:qe,nameless:qe,inheritance:qe,definition:qe,extendedAttribute:qe,extendedAttributeReference:qe};function He(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 o=n.get(e.target);o?o.push(r):n.set(e.target,[r])}return n}function*Ge(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const o of e)if(o.partial){const e=r.get(o.name);e?e.push(o):r.set(o.name,[o])}else o.name&&(t.has(o.name)?n.add(o):t.set(o.name,o));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:He(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 Ve=Object.freeze({__proto__:null,parse:function(e,t={}){const n=new $e(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),Fe(n,t)},write:function(e,{templates:t=Be}={}){function n(e,{unescaped:n,context:r}){return n||(n=e.startsWith("_")?e.slice(1):e),t.reference(e,n,r)}function r(e,n=qe,...r){if(!e)return"";const o=n(e.value,...r);return t.wrap([t.trivia(e.trivia),o])}function o(e,t){return r(e,n,{context:t})}function s(e,n){return r(e,t.name,n)}function i(e){if(e.union||e.generic)return t.wrap([r(e.tokens.base,t.generic),r(e.tokens.open),...e.subtype.map(a),r(e.tokens.close)]);const o=e.tokens.prefix||e.tokens.base,s=e.tokens.prefix?[e.tokens.prefix.value,t.trivia(e.tokens.base.trivia)]:[],i=n(t.wrap([...s,e.tokens.base.value,r(e.tokens.postfix)]),{unescaped:e.idlType,context:e});return t.wrap([t.trivia(o.trivia),i])}function a(e){return t.wrap([p(e.extAttrs),i(e),r(e.tokens.nullable),r(e.tokens.separator)])}function c(e){return e?t.wrap([r(e.tokens.assign),...e.expression.map(e=>r(e))]):""}function l(e){return t.wrap([p(e.extAttrs),r(e.tokens.optional),t.type(a(e.idlType)),r(e.tokens.variadic),s(e.tokens.name,{data:e}),c(e.default),r(e.tokens.separator)])}function u(e){return t.wrap([r(e.tokens.value),r(e.tokens.separator)])}function d(e){const{rhsType:n}=e.params;return t.wrap([t.trivia(e.tokens.name.trivia),t.extendedAttribute(t.wrap([t.extendedAttributeReference(e.name),r(e.params.tokens.assign),o(e.params.tokens.secondaryName,e),r(e.params.tokens.open),...e.params.list?e.params.list.map("identifier-list"===n?n=>function(e,n){return t.wrap([o(e.tokens.value,n),r(e.tokens.separator)])}(n,e):n&&n.endsWith("-list")?u:l):[],r(e.params.tokens.close)])),r(e.tokens.separator)])}function p(e){return e.length?t.wrap([r(e.tokens.open),...e.map(d),r(e.tokens.close)]):""}function f(e){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.callback),r(e.tokens.partial),r(e.tokens.base),r(e.tokens.mixin),s(e.tokens.name,{data:e}),(o=e,o.tokens.inheritance?t.wrap([r(o.tokens.colon),t.trivia(o.tokens.inheritance.trivia),t.inheritance(n(o.tokens.inheritance.value,{context:o}))]):""),r(e.tokens.open),g(e.members,e),r(e.tokens.close),r(e.tokens.termination)]),{data:e});var o}function h(e,n){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.readonly),r(e.tokens.async),r(e.tokens.base,t.generic),r(e.tokens.open),t.wrap(e.idlType.map(a)),r(e.tokens.close),r(e.tokens.argsOpen),t.wrap(e.arguments.map(l)),r(e.tokens.argsClose),r(e.tokens.termination)]),{data:e,parent:n})}t=Object.assign({},Be,t);const m={interface:f,"interface mixin":f,namespace:f,operation:function(e,n){const o=e.idlType?[t.type(a(e.idlType)),s(e.tokens.name,{data:e,parent:n}),r(e.tokens.open),t.wrap(e.arguments.map(l)),r(e.tokens.close)]:[];return t.definition(t.wrap([p(e.extAttrs),e.tokens.name?r(e.tokens.special):r(e.tokens.special,t.nameless,{data:e,parent:n}),...o,r(e.tokens.termination)]),{data:e,parent:n})},attribute:function(e,n){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.special),r(e.tokens.readonly),r(e.tokens.base),t.type(a(e.idlType)),s(e.tokens.name,{data:e,parent:n}),r(e.tokens.termination)]),{data:e,parent:n})},constructor:function(e,n){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.base,t.nameless,{data:e,parent:n}),r(e.tokens.open),t.wrap(e.arguments.map(l)),r(e.tokens.close),r(e.tokens.termination)]),{data:e,parent:n})},dictionary:f,field:function(e,n){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.required),t.type(a(e.idlType)),s(e.tokens.name,{data:e,parent:n}),c(e.default),r(e.tokens.termination)]),{data:e,parent:n})},const:function(e,n){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.base),t.type(a(e.idlType)),s(e.tokens.name,{data:e,parent:n}),r(e.tokens.assign),r(e.tokens.value),r(e.tokens.termination)]),{data:e,parent:n})},typedef:function(e){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.base),t.type(a(e.idlType)),s(e.tokens.name,{data:e}),r(e.tokens.termination)]),{data:e})},includes:function(e){return t.definition(t.wrap([p(e.extAttrs),o(e.tokens.target,e),r(e.tokens.includes),o(e.tokens.mixin,e),r(e.tokens.termination)]),{data:e})},callback:function(e){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.base),s(e.tokens.name,{data:e}),r(e.tokens.assign),t.type(a(e.idlType)),r(e.tokens.open),...e.arguments.map(l),r(e.tokens.close),r(e.tokens.termination)]),{data:e})},enum:function(e){return t.definition(t.wrap([p(e.extAttrs),r(e.tokens.base),s(e.tokens.name,{data:e}),r(e.tokens.open),g(e.values,e),r(e.tokens.close),r(e.tokens.termination)]),{data:e})},"enum-value":function(e,n){return t.wrap([t.trivia(e.tokens.value.trivia),t.definition(t.wrap(['"',t.name(e.value,{data:e,parent:n}),'"']),{data:e,parent:n}),r(e.tokens.separator)])},iterable:h,maplike:h,setlike:h,"callback interface":f,eof:function(e){return t.trivia(e.trivia)}};function g(e,n){if(!e)return;const r=e.map(e=>function(e,t){if(!m[e.type])throw new Error(`Type "${e.type}" is unsupported`);return m[e.type](e,t)}(e,n));return t.wrap(r)}return g(e)},validate:function(e){return[...Ge((t=e,t.flat?t.flat():[].concat(...t)))];var t},WebIDLParseError:_e});var Ze,Ye=(function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}}(Ze={exports:{}},Ze.exports),Ze.exports);Ye.defaults,Ye.getDefaults,Ye.changeDefaults;const Ke=/[&<>"']/,Je=/[&<>"']/g,Xe=/[<>"']|&(?!#?\w+;)/,Qe=/[<>"']|&(?!#?\w+;)/g,et={"&":"&","<":"<",">":">",'"':""","'":"'"},tt=e=>et[e];const nt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function rt(e){return e.replace(nt,(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 ot=/(^|[^\[])\^/g;const st=/[^\w:]/g,it=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const at={},ct=/^[^:]+:\/*[^/]*$/,lt=/^([^:]+:)[\s\S]*$/,ut=/^([^:]+:\/*[^/]*)[\s\S]*$/;function dt(e,t){at[" "+e]||(ct.test(e)?at[" "+e]=e+"/":at[" "+e]=pt(e,"/",!0));const n=-1===(e=at[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(lt,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(ut,"$1")+t:e+t}function pt(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){const s=e.charAt(r-o-1);if(s!==t||n){if(s===t||!n)break;o++}else o++}return e.substr(0,r-o)}var ft={escape:function(e,t){if(t){if(Ke.test(e))return e.replace(Je,tt)}else if(Xe.test(e))return e.replace(Qe,tt);return e},unescape:rt,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(ot,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(rt(n)).replace(st,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!it.test(n)&&(n=dt(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:dt,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:pt,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,o=0;for(;o<n;o++)if("\\"===e[o])o++;else if(e[o]===t[0])r++;else if(e[o]===t[1]&&(r--,r<0))return o;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}};const{defaults:ht}=Ye,{rtrim:mt,splitCells:gt,escape:bt,findClosingBracket:yt}=ft;function wt(e,t,n){const r=t.href,o=t.title?bt(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:o,text:s}:{type:"image",raw:n,href:r,title:o,text:bt(s)}}var vt=class{constructor(e){this.options=e||ht}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e,t){const n=this.rules.block.code.exec(e);if(n){const e=t[t.length-1];if(e&&"paragraph"===e.type)return{raw:n[0],text:n[0].trimRight()};const r=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:mt(r,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}}nptable(e){const t=this.rules.block.nptable.exec(e);if(t){const e={type:"table",header:gt(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(e.header.length===e.align.length){let t,n=e.align.length;for(t=0;t<n;t++)/^ *-+: *$/.test(e.align[t])?e.align[t]="right":/^ *:-+: *$/.test(e.align[t])?e.align[t]="center":/^ *:-+ *$/.test(e.align[t])?e.align[t]="left":e.align[t]=null;for(n=e.cells.length,t=0;t<n;t++)e.cells[t]=gt(e.cells[t],e.header.length);return 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){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}}list(e){const t=this.rules.block.list.exec(e);if(t){let e=t[0];const n=t[2],r=n.length>1,o=")"===n[n.length-1],s={type:"list",raw:e,ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]},i=t[0].match(this.rules.block.item);let a,c,l,u,d,p,f,h=!1;const m=i.length;for(let t=0;t<m;t++)a=i[t],e=a,c=a.length,a=a.replace(/^ *([*+-]|\d+[.)]) */,""),~a.indexOf("\n ")&&(c-=a.length,a=this.options.pedantic?a.replace(/^ {1,4}/gm,""):a.replace(new RegExp("^ {1,"+c+"}","gm"),"")),t!==m-1&&(l=this.rules.block.bullet.exec(i[t+1])[0],(r?1===l.length||!o&&")"===l[l.length-1]:l.length>1||this.options.smartLists&&l!==n)&&(u=i.slice(t+1).join("\n"),s.raw=s.raw.substring(0,s.raw.length-u.length),t=m-1)),d=h||/\n\n(?!\s*$)/.test(a),t!==m-1&&(h="\n"===a.charAt(a.length-1),d||(d=h)),d&&(s.loose=!0),p=/^\[[ xX]\] /.test(a),f=void 0,p&&(f=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),s.items.push({type:"list_item",raw:e,task:p,checked:f,loose:d,text:a});return s}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):bt(t[0]):t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));return{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:gt(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r=e.align.length;for(n=0;n<r;n++)/^ *-+: *$/.test(e.align[n])?e.align[n]="right":/^ *:-+: *$/.test(e.align[n])?e.align[n]="center":/^ *:-+ *$/.test(e.align[n])?e.align[n]="left":e.align[n]=null;for(r=e.cells.length,n=0;n<r;n++)e.cells[n]=gt(e.cells[n].replace(/^ *\| *| *\| *$/g,""),e.header.length);return e}}}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]}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}}text(e,t){const n=this.rules.block.text.exec(e);if(n){const e=t[t.length-1];return e&&"text"===e.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:bt(t[1])}}tag(e,t,n){const r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):bt(r[0]):r[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=yt(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e?(n=e[1],r=e[3]):r=""}else r=t[3]?t[3].slice(1,-1):"";n=n.trim().replace(/^<([\s\S]*)>$/,"$1");return wt(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0])}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return wt(n,e,n[0])}}strong(e,t,n=""){let r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);const n="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;let o;for(n.lastIndex=0;null!=(r=n.exec(t));)if(o=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)),o)return{type:"strong",raw:e.slice(0,o[0].length),text:e.slice(2,o[0].length-2)}}}em(e,t,n=""){let r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);const n="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;let o;for(n.lastIndex=0;null!=(r=n.exec(t));)if(o=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)),o)return{type:"em",raw:e.slice(0,o[0].length),text:e.slice(1,o[0].length-1)}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=e.startsWith(" ")&&e.endsWith(" ");return n&&r&&(e=e.substring(1,e.length-1)),e=bt(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[1]}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=bt(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=bt(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=bt(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=bt(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t,n){const r=this.rules.inline.text.exec(e);if(r){let e;return e=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):bt(r[0]):r[0]:bt(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:e}}}};const{noopTest:kt,edit:xt,merge:$t}=ft,_t={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:kt,table:kt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};_t.def=xt(_t.def).replace("label",_t._label).replace("title",_t._title).getRegex(),_t.bullet=/(?:[*+-]|\d{1,9}[.)])/,_t.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,_t.item=xt(_t.item,"gm").replace(/bull/g,_t.bullet).getRegex(),_t.list=xt(_t.list).replace(/bull/g,_t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_t.def.source+")").getRegex(),_t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_t._comment=/<!--(?!-?>)[\s\S]*?-->/,_t.html=xt(_t.html,"i").replace("comment",_t._comment).replace("tag",_t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_t.paragraph=xt(_t._paragraph).replace("hr",_t.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",_t._tag).getRegex(),_t.blockquote=xt(_t.blockquote).replace("paragraph",_t.paragraph).getRegex(),_t.normal=$t({},_t),_t.gfm=$t({},_t.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),_t.gfm.nptable=xt(_t.gfm.nptable).replace("hr",_t.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",_t._tag).getRegex(),_t.gfm.table=xt(_t.gfm.table).replace("hr",_t.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",_t._tag).getRegex(),_t.pedantic=$t({},_t.normal,{html:xt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:kt,paragraph:xt(_t.normal._paragraph).replace("hr",_t.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_t.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Ct={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:kt,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:kt,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};Ct.punctuation=xt(Ct.punctuation).replace(/punctuation/g,Ct._punctuation).getRegex(),Ct._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Ct._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Ct.em.start=xt(Ct.em.start).replace(/punctuation/g,Ct._punctuation).getRegex(),Ct.em.middle=xt(Ct.em.middle).replace(/punctuation/g,Ct._punctuation).replace(/overlapSkip/g,Ct._overlapSkip).getRegex(),Ct.em.endAst=xt(Ct.em.endAst,"g").replace(/punctuation/g,Ct._punctuation).getRegex(),Ct.em.endUnd=xt(Ct.em.endUnd,"g").replace(/punctuation/g,Ct._punctuation).getRegex(),Ct.strong.start=xt(Ct.strong.start).replace(/punctuation/g,Ct._punctuation).getRegex(),Ct.strong.middle=xt(Ct.strong.middle).replace(/punctuation/g,Ct._punctuation).replace(/blockSkip/g,Ct._blockSkip).getRegex(),Ct.strong.endAst=xt(Ct.strong.endAst,"g").replace(/punctuation/g,Ct._punctuation).getRegex(),Ct.strong.endUnd=xt(Ct.strong.endUnd,"g").replace(/punctuation/g,Ct._punctuation).getRegex(),Ct.blockSkip=xt(Ct._blockSkip,"g").getRegex(),Ct.overlapSkip=xt(Ct._overlapSkip,"g").getRegex(),Ct._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ct._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ct._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])?)+(?![-_])/,Ct.autolink=xt(Ct.autolink).replace("scheme",Ct._scheme).replace("email",Ct._email).getRegex(),Ct._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ct.tag=xt(Ct.tag).replace("comment",_t._comment).replace("attribute",Ct._attribute).getRegex(),Ct._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ct._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Ct._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ct.link=xt(Ct.link).replace("label",Ct._label).replace("href",Ct._href).replace("title",Ct._title).getRegex(),Ct.reflink=xt(Ct.reflink).replace("label",Ct._label).getRegex(),Ct.reflinkSearch=xt(Ct.reflinkSearch,"g").replace("reflink",Ct.reflink).replace("nolink",Ct.nolink).getRegex(),Ct.normal=$t({},Ct),Ct.pedantic=$t({},Ct.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ct._label).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ct._label).getRegex()}),Ct.gfm=$t({},Ct.normal,{escape:xt(Ct.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),Ct.gfm.url=xt(Ct.gfm.url,"i").replace("email",Ct.gfm._extended_email).getRegex(),Ct.breaks=$t({},Ct.gfm,{br:xt(Ct.br).replace("{2,}","*").getRegex(),text:xt(Ct.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var St={block:_t,inline:Ct};const{defaults:Et}=Ye,{block:Rt,inline:At}=St;function Tt(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Lt(e){let t,n,r="";const o=e.length;for(t=0;t<o;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Pt=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Et,this.options.tokenizer=this.options.tokenizer||new vt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;const t={block:Rt.normal,inline:At.normal};this.options.pedantic?(t.block=Rt.pedantic,t.inline=At.pedantic):this.options.gfm&&(t.block=Rt.gfm,this.options.breaks?t.inline=At.breaks:t.inline=At.gfm),this.tokenizer.rules=t}static get rules(){return{block:Rt,inline:At}}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens}blockTokens(e,t=[],n=!0){let r,o,s,i;for(e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):(i=t[t.length-1],i.raw+="\n"+r.raw,i.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),s=r.items.length,o=0;o<s;o++)r.items[o].tokens=this.blockTokens(r.items[o].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):(i=t[t.length-1],i.raw+="\n"+r.raw,i.text+="\n"+r.text);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 t}inline(e){let t,n,r,o,s,i;const a=e.length;for(t=0;t<a;t++)switch(i=e[t],i.type){case"paragraph":case"text":case"heading":i.tokens=[],this.inlineTokens(i.text,i.tokens);break;case"table":for(i.tokens={header:[],cells:[]},o=i.header.length,n=0;n<o;n++)i.tokens.header[n]=[],this.inlineTokens(i.header[n],i.tokens.header[n]);for(o=i.cells.length,n=0;n<o;n++)for(s=i.cells[n],i.tokens.cells[n]=[],r=0;r<s.length;r++)i.tokens.cells[n][r]=[],this.inlineTokens(s[r],i.tokens.cells[n][r]);break;case"blockquote":this.inline(i.tokens);break;case"list":for(o=i.items.length,n=0;n<o;n++)this.inline(i.items[n].tokens)}return e}inlineTokens(e,t=[],n=!1,r=!1,o=""){let s,i,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(s=this.tokenizer.escape(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.tag(e,n,r))e=e.substring(s.raw.length),n=s.inLink,r=s.inRawBlock,t.push(s);else if(s=this.tokenizer.link(e))e=e.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,r)),t.push(s);else if(s=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,r)),t.push(s);else if(s=this.tokenizer.strong(e,a,o))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],n,r),t.push(s);else if(s=this.tokenizer.em(e,a,o))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],n,r),t.push(s);else if(s=this.tokenizer.codespan(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.br(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.del(e))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],n,r),t.push(s);else if(s=this.tokenizer.autolink(e,Lt))e=e.substring(s.raw.length),t.push(s);else if(n||!(s=this.tokenizer.url(e,Lt))){if(s=this.tokenizer.inlineText(e,r,Tt))e=e.substring(s.raw.length),o=s.raw.slice(-1),t.push(s);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(s.raw.length),t.push(s);return t}};const{defaults:It}=Ye,{cleanUrl:Nt,escape:Dt}=ft;var jt=class{constructor(e){this.options=e||It}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return r?'<pre><code class="'+this.options.langPrefix+Dt(r,!0)+'">'+(n?e:Dt(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Dt(e,!0))+"</code></pre>\n"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(null===(e=Nt(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+Dt(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=Nt(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}},Ot=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}},zt=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}};const{defaults:Ut}=Ye,{unescape:Wt}=ft;var Mt=class e{constructor(e){this.options=e||Ut,this.options.renderer=this.options.renderer||new jt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ot,this.slugger=new zt}static parse(t,n){return new e(n).parse(t)}parse(e,t=!0){let n,r,o,s,i,a,c,l,u,d,p,f,h,m,g,b,y,w,v="";const k=e.length;for(n=0;n<k;n++)switch(d=e[n],d.type){case"space":continue;case"hr":v+=this.renderer.hr();continue;case"heading":v+=this.renderer.heading(this.parseInline(d.tokens),d.depth,Wt(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":v+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(l="",c="",s=d.header.length,r=0;r<s;r++)c+=this.renderer.tablecell(this.parseInline(d.tokens.header[r]),{header:!0,align:d.align[r]});for(l+=this.renderer.tablerow(c),u="",s=d.cells.length,r=0;r<s;r++){for(a=d.tokens.cells[r],c="",i=a.length,o=0;o<i;o++)c+=this.renderer.tablecell(this.parseInline(a[o]),{header:!1,align:d.align[o]});u+=this.renderer.tablerow(c)}v+=this.renderer.table(l,u);continue;case"blockquote":u=this.parse(d.tokens),v+=this.renderer.blockquote(u);continue;case"list":for(p=d.ordered,f=d.start,h=d.loose,s=d.items.length,u="",r=0;r<s;r++)g=d.items[r],b=g.checked,y=g.task,m="",g.task&&(w=this.renderer.checkbox(b),h?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(g.tokens,h),u+=this.renderer.listitem(m,y,b);v+=this.renderer.list(u,p,f);continue;case"html":v+=this.renderer.html(d.text);continue;case"paragraph":v+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<k&&"text"===e[n+1].type;)d=e[++n],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);v+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return v}parseInline(e,t){t=t||this.renderer;let n,r,o="";const s=e.length;for(n=0;n<s;n++)switch(r=e[n],r.type){case"escape":o+=t.text(r.text);break;case"html":o+=t.html(r.text);break;case"link":o+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":o+=t.image(r.href,r.title,r.text);break;case"strong":o+=t.strong(this.parseInline(r.tokens,t));break;case"em":o+=t.em(this.parseInline(r.tokens,t));break;case"codespan":o+=t.codespan(r.text);break;case"br":o+=t.br();break;case"del":o+=t.del(this.parseInline(r.tokens,t));break;case"text":o+=t.text(r.text);break;default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return o}};const{merge:Ft,checkSanitizeDeprecation:qt,escape:Bt}=ft,{getDefaults:Ht,changeDefaults:Gt,defaults:Vt}=Ye;function Zt(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),t=Ft({},Zt.defaults,t||{}),qt(t),n){const r=t.highlight;let o;try{o=Pt.lex(e,t)}catch(e){return n(e)}const s=function(e){let s;if(!e)try{s=Mt.parse(o,t)}catch(t){e=t}return t.highlight=r,e?n(e):n(null,s)};if(!r||r.length<3)return s();if(delete t.highlight,!o.length)return s();let i=0;return Zt.walkTokens(o,(function(e){"code"===e.type&&(i++,setTimeout(()=>{r(e.text,e.lang,(function(t,n){if(t)return s(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),i--,0===i&&s()}))},0))})),void(0===i&&s())}try{const n=Pt.lex(e,t);return t.walkTokens&&Zt.walkTokens(n,t.walkTokens),Mt.parse(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+Bt(e.message+"",!0)+"</pre>";throw e}}Zt.options=Zt.setOptions=function(e){return Ft(Zt.defaults,e),Gt(Zt.defaults),Zt},Zt.getDefaults=Ht,Zt.defaults=Vt,Zt.use=function(e){const t=Ft({},e);if(e.renderer){const n=Zt.defaults.renderer||new jt;for(const t in e.renderer){const r=n[t];n[t]=(...o)=>{let s=e.renderer[t].apply(n,o);return!1===s&&(s=r.apply(n,o)),s}}t.renderer=n}if(e.tokenizer){const n=Zt.defaults.tokenizer||new vt;for(const t in e.tokenizer){const r=n[t];n[t]=(...o)=>{let s=e.tokenizer[t].apply(n,o);return!1===s&&(s=r.apply(n,o)),s}}t.tokenizer=n}if(e.walkTokens){const n=Zt.defaults.walkTokens;t.walkTokens=t=>{e.walkTokens(t),n&&n(t)}}Zt.setOptions(t)},Zt.walkTokens=function(e,t){for(const n of e)switch(t(n),n.type){case"table":for(const e of n.tokens.header)Zt.walkTokens(e,t);for(const e of n.tokens.cells)for(const n of e)Zt.walkTokens(n,t);break;case"list":Zt.walkTokens(n.items,t);break;default:n.tokens&&Zt.walkTokens(n.tokens,t)}},Zt.Parser=Mt,Zt.parser=Mt.parse,Zt.Renderer=jt,Zt.TextRenderer=Ot,Zt.Lexer=Pt,Zt.lexer=Pt.lex,Zt.Tokenizer=vt,Zt.Slugger=zt,Zt.parse=Zt;var Yt=Zt;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Kt=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){!function(t,n){e.exports=n()}(0,(function(){var e=[],t=[],n={},r={},o={};function s(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,n){return t[n]||""}))}function c(e,t){return e.replace(t[0],(function(n,r){var o=a(t[1],arguments);return i(""===n?e[r-1]:n,o)}))}function l(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var o=r.length;o--;){var s=r[o];if(s[0].test(t))return c(t,s)}return t}function u(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):l(o,r,n)}}function d(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&l(o,o,n)===o}}function p(e,t,n){return(n?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=u(o,r,e),p.isPlural=d(o,r,e),p.singular=u(r,o,t),p.isSingular=d(r,o,t),p.addPluralRule=function(t,n){e.push([s(t),n])},p.addSingularRule=function(e,n){t.push([s(e),n])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),o[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return p.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return p.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return p.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(p.addUncountableRule),p}))})),Jt=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,o=s.prototype;return o.delete=function(e){return this.has(e)&&delete e[this._]},o.get=function(e){return this.has(e)?e[this._]:void 0},o.has=function(e){return r.call(e,this._)},o.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},s;function s(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=o.prototype;function o(){t(this,"_",{value:"_@ungap/weakmap"+e++})}n.add=function(e){return this.has(e)||t(e,this._,{value:!0,configurable:!0}),this},n.has=function(e){return this.hasOwnProperty.call(e,this._)},n.delete=function(e){return this.has(e)&&delete e[this._]},r.WeakSet=o}(Math.random(),Object.defineProperty)}function o(e,t,n,r,o,s){for(var i=("selectedIndex"in t),a=i;r<o;){var c,l=e(n[r],1);t.insertBefore(l,s),i&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function s(e,t){return e==t}function i(e){return e}function a(e,t,n,r,o,s,i){var a=s-o;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=o;c<n&&l<s&&i(e[c],r[l]);)c++,l++;if(l===s)return t;t=c+1}return-1}function c(e,t,n,r,o){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:o}function l(e,t,n,r){for(;n<r;)f(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,o=t;r<o;){var s=(r+o)/2>>>0;n<e[s]?o=s:r=1+s}return r},f=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function h(e,t,n,r){for(var u=(r=r||{}).compare||s,d=r.node||i,f=null==r.before?null:d(r.before,0),h=t.length,m=h,g=0,b=n.length,y=0;g<m&&y<b&&u(t[g],n[y]);)g++,y++;for(;g<m&&y<b&&u(t[m-1],n[b-1]);)m--,b--;var w=g===m,v=y===b;if(w&&v)return n;if(w&&y<b)return o(d,e,n,y,b,c(d,t,g,h,f)),n;if(v&&g<m)return l(d,t,g,m),n;var k=m-g,x=b-y,$=-1;if(k<x){if(-1<($=a(n,y,b,t,g,m,u)))return o(d,e,n,y,$,d(t[g],0)),o(d,e,n,$+k,b,c(d,t,m,h,f)),n}else if(x<k&&-1<($=a(t,g,m,n,y,b,u)))return l(d,t,g,$),l(d,t,$+x,m),n;return k<2||x<2?(o(d,e,n,y,b,d(t[g],0)),l(d,t,g,m)):k==x&&function(e,t,n,r,o,s){for(;r<o&&s(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?o(d,e,n,y,b,c(d,t,m,h,f)):function(e,t,n,r,s,i,a,c,u,d,f,h,m){!function(e,t,n,r,s,i,a,c,u){for(var d=[],p=e.length,f=a,h=0;h<p;)switch(e[h++]){case 0:s++,f++;break;case 1:d.push(r[s]),o(t,n,r,s++,s,f<c?t(i[f],0):u);break;case-1:f++}for(h=0;h<p;)switch(e[h++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:l(t,i,a++,a)}}(function(e,t,n,r,o,s,i){var a,c,l,u,d,p,f=n+s,h=[];e:for(b=0;b<=f;b++){if(50<b)return null;for(p=b-1,u=b?h[b-1]:[0,0],d=h[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<s&&c<n&&i(r[o+l],e[t+c]);)l++,c++;if(l===s&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+f/2),g=m.length-1,b=h.length-1;0<=b;b--){for(;0<l&&0<c&&i(r[o+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?h[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,i,a,c,d,h)||function(e,t,n,r,o,s,i,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var f=1;f<l;f++)d[f]=i;for(var h=o.slice(s,i),m=t;m<n;m++){var g,b=h.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+s))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--i;d[c]>i;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,k=w.oldi;v<n;)y[--l]=1,--n;for(;k<i;)y[--l]=-1,--i;y[--l]=0,--n,--i,w=w.prev}for(;t<=n;)y[--l]=1,--n;for(;s<=i;)y[--l]=-1,--i;return y}(n,r,s,i,a,c,u,d),e,t,n,r,a,c,f,m)}(d,e,n,y,b,x,t,g,m,k,h,u,f),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,y={};try{y.Map=Map}catch(u){y.Map=function(){var e=0,t=[],n=[];return{delete:function(o){var s=r(o);return s&&(t.splice(e,1),n.splice(e,1)),s},forEach:function(e,r){t.forEach((function(t,o){e.call(r,n[o],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(o,s){return n[r(o)?e:t.push(o)-1]=s,this}};function r(n){return-1<(e=t.indexOf(n))}}}var w=y.Map;function v(){return this}function k(e,t){var n="_"+e+"$";return{get:function(){return this[n]||x(this,n,t.call(this,e))},set:function(e){x(this,n,e)}}}var x=function(e,t,n){return Object.defineProperty(e,t,{configurable:!0,value:"function"==typeof n?function(){return e._wire$=n.apply(this,arguments)}:n})[t]};Object.defineProperties(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var $,_,C,S,E,R,A={},T={},L=[],P=T.hasOwnProperty,I=0,N={attributes:A,define:function(e,t){e.indexOf("-")<0?(e in T||(I=L.push(e)),T[e]=t):A[e]=t},invoke:function(e,t){for(var n=0;n<I;n++){var r=L[n];if(P.call(e,r))return T[r](e[r],t)}}},D=Array.isArray||(_=($={}.toString).call([]),function(e){return $.call(e)===_}),j=(C=e,S="fragment",R="content"in z(E="template")?function(e){var t=z(E);return t.innerHTML=e,t.content}:function(e){var t,n=z(S),r=z(E);return O(n,/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(e)?(t=RegExp.$1,r.innerHTML="<table>"+e+"</table>",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=z(S),n=z("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",O(t,n.firstChild.childNodes),t}:R)(e)});function O(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===S?C.createDocumentFragment():C.createElementNS("http://www.w3.org/1999/xhtml",e)}var U,W,M,F,q,B,H,G,V,Z=(W="appendChild",M="cloneNode",F="createTextNode",B=(q="importNode")in(U=e),(H=U.createDocumentFragment())[W](U[F]("g")),H[W](U[F]("")),(B?U[q](H,!0):H[M](!0)).childNodes.length<2?function e(t,n){for(var r=t[M](),o=t.childNodes||[],s=o.length,i=0;n&&i<s;i++)r[W](e(o[i],n));return r}:B?U[q]:function(e,t){return e[M](!!t)}),Y="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},K="-"+Math.random().toFixed(6)+"%",J=!1;try{G=e.createElement("template"),V="tabindex","content"in G&&(G.innerHTML="<p "+V+'="'+K+'"></p>',G.content.childNodes[0].getAttribute(V)==K)||(K="_dt: "+K.slice(1,-1)+";",J=!0)}catch(u){}var X="\x3c!--"+K+"--\x3e",Q=/^(?:style|textarea)$/i,ee=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,te=" \\f\\n\\r\\t",ne="[^"+te+"\\/>\"'=]+",re="["+te+"]+"+ne,oe="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",se="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+ne.replace("\\/","")+"))?)",ie=new RegExp(oe+re+se+"+)(["+te+"]*/?>)","g"),ae=new RegExp(oe+re+se+"*)(["+te+"]*/>)","g"),ce=new RegExp("("+re+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function le(e,t,n,r){return"<"+t+n.replace(ce,ue)+r}function ue(e,t,n){return t+(n||'"')+K+(n||'"')}function de(e,t,n){return ee.test(t)?e:"<"+t+n+"></"+t+">"}var pe=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 fe(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function he(e,t){return{type:"text",node:e,path:t}}var me,ge=(me=new n,{get:function(e){return me.get(e)},set:function(e,t){return me.set(e,t),t}});function be(t,n){var r=(t.convert||function(e){return e.join(X).replace(ae,de).replace(ie,le)})(n),o=t.transform;o&&(r=o(r));var s=j(r,t.type);we(s);var i=[];return function t(n,r,o,s){for(var i=n.childNodes,a=i.length,c=0;c<a;){var l=i[c];switch(l.nodeType){case 1:var u=s.concat(c);!function(t,n,r,o){for(var s,i=t.attributes,a=[],c=[],l=pe(i,r),u=l.length,d=0;d<u;){var p=l[d++],f=p.value===K;if(f||1<(s=p.value.split(X)).length){var h=p.name;if(a.indexOf(h)<0){a.push(h);var m=r.shift().replace(f?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+h+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(f)n.push(fe(g,o,m,null));else{for(var b=s.length-2;b--;)r.shift();n.push(fe(g,o,m,s))}}c.push(p)}}for(var y=((d=0)<(u=c.length)&&J&&!("ownerSVGElement"in t));d<u;){var w=c[d++];y&&(w.value=""),t.removeAttribute(w.name)}var v=t.nodeName;if(/^script$/i.test(v)){var k=e.createElement(v);for(u=i.length,d=0;d<u;)k.setAttributeNode(i[d++].cloneNode(!0));k.textContent=t.textContent,t.parentNode.replaceChild(k,t)}}(l,r,o,u),t(l,r,o,u);break;case 8:var d=l.textContent;if(d===K)o.shift(),r.push(Q.test(n.nodeName)?he(n,s):{type:"any",node:l,path:s.concat(c)});else switch(d.slice(0,2)){case"/*":if("*/"!==d.slice(-2))break;case"👻":n.removeChild(l),c--,a--}break;case 3:Q.test(n.nodeName)&&Y.call(l.textContent)===X&&(o.shift(),r.push(he(n,s)))}c++}}(s,i,n.slice(0),[]),{content:s,updates:function(e){for(var r=[],o=i.length,s=0,a=0;s<o;){var c=i[s++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(e,c.path);switch(c.type){case"any":r.push({fn:t.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=t.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:t.text(l),sparse:!1}),l.textContent=""}}return o+=a,function(){var t=arguments.length;if(o!==t-1)throw new Error(t-1+" values instead of "+o+"\n"+n.join("${value}"));for(var s=1,i=1;s<t;){var a=r[s-i];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(i+=d-2;u<d;)l+=arguments[s++]+c[u++];a.fn(l)}else a.fn(arguments[s++])}return e}}}}var ye=[];function we(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===Y.call(r.textContent).length&&e.removeChild(r)}}var ve,ke,xe=(ve=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,ke=/([^A-Z])([A-Z]+)/g,function(e,t){return"ownerSVGElement"in e?function(e,t){var n;return(n=t?t.cloneNode(!0):(e.setAttribute("style","--hyper:style;"),e.getAttributeNode("style"))).value="",e.setAttributeNode(n),_e(n,!0)}(e,t):_e(e.style,!1)});function $e(e,t,n){return t+"-"+n.toLowerCase()}function _e(e,t){var n,r;return function(o){var s,i,a,c;switch(typeof o){case"object":if(o){if("object"===n){if(!t&&r!==o)for(i in r)i in o||(e[i]="")}else t?e.value="":e.cssText="";for(i in s=t?{}:e,o)a="number"!=typeof(c=o[i])||ve.test(i)?c:c+"px",!t&&/^--/.test(i)?s.setProperty(i,a):s[i]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(ke,$e),":",e[t],";");return n.join("")}(r=s):r=o;break}default:r!=o&&(n="string",r=o,t?e.value=o||"":e.cssText=o||"")}}}var Ce,Se,Ee=(Ce=[].slice,(Se=Re.prototype).ELEMENT_NODE=1,Se.nodeType=111,Se.remove=function(e){var t,n=this.childNodes,r=this.firstChild,o=this.lastChild;return this._=null,e&&2===n.length?o.parentNode.removeChild(o):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(o),t.deleteContents()),r},Se.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,o=0,s=r.length;o<s;o++)t.appendChild(r[o]);return t},Re);function Re(e){var t=this.childNodes=Ce.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function Ae(e){return{html:e}}function Te(e,t){switch(e.nodeType){case We:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case Ue:return Te(e.render(),t);default:return e}}function Le(e,t){t(e.placeholder),"text"in e?Promise.resolve(e.text).then(String).then(t):"any"in e?Promise.resolve(e.any).then(t):"html"in e?Promise.resolve(e.html).then(Ae).then(t):Promise.resolve(N.invoke(e,t)).then(t)}function Pe(e){return null!=e&&"then"in e}var Ie,Ne,De,je,Oe,ze="ownerSVGElement",Ue=v.prototype.nodeType,We=Ee.prototype.nodeType,Me=(Ne=(Ie={Event:b,WeakSet:u}).Event,De=Ie.WeakSet,je=!0,Oe=null,function(e){return je&&(je=!je,Oe=new De,function(e){var t=new De,n=new De;try{new MutationObserver(i).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,o=[],s=function(e){o.push(e),clearTimeout(r),r=setTimeout((function(){i(o.splice(r=0,o.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){s({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){s({addedNodes:[e.target],removedNodes:[]})}),!0)}function i(e){for(var r,o=e.length,s=0;s<o;s++)a((r=e[s]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var o,s=new Ne(t),i=e.length,a=0;a<i;1===(o=e[a++]).nodeType&&function e(t,n,r,o,s){Oe.has(t)&&!o.has(t)&&(s.delete(t),o.add(t),t.dispatchEvent(n));for(var i=t.children||[],a=i.length,c=0;c<a;e(i[c++],n,r,o,s));}(o,s,t,n,r));}}(e.ownerDocument)),Oe.add(e),e}),Fe=/^(?:form|list)$/i,qe=[].slice;function Be(t){return this.type=t,function(t){var n=ye,r=we;return function(o){var s,i,a;return n!==o&&(s=t,i=n=o,a=ge.get(i)||ge.set(i,be(s,i)),r=a.updates(Z.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var He=!(Be.prototype={attribute:function(e,t,n){var r,o=ze in e;if("style"===t)return xe(e,n,o);if("."===t.slice(0,1))return i=e,a=t.slice(1),o?function(e){try{i[a]=e}catch(t){i.setAttribute(a,e)}}:function(e){i[a]=e};if(/^on/.test(t)){var s=t.slice(2);return"connected"===s||"disconnected"===s?Me(e):t.toLowerCase()in e&&(s=s.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(s,r,!1),(r=t)&&e.addEventListener(s,t,!1))}}if("data"===t||!o&&t in e&&!Fe.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in N.attributes)return function(n){var o=N.attributes[t](e,n);r!==o&&(null==(r=o)?e.removeAttribute(t):e.setAttribute(t,o))};var i,a,c=!1,l=n.cloneNode(!0);return function(t){r!==t&&(r=t,l.value!==t&&(null==t?(c&&(c=!1,e.removeAttributeNode(l)),l.value=t):(l.value=t,c||(c=!0,e.setAttributeNode(l)))))}},any:function(e,t){var n,r={node:Te,before:e},o=ze in e?"svg":"html",s=!1;return function i(a){switch(typeof a){case"string":case"number":case"boolean":s?n!==a&&(n=a,t[0].textContent=a):(s=!0,n=a,t=h(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){s=!1,t=h(e.parentNode,t,[],r);break}default:if(s=!1,D(n=a))if(0===a.length)t.length&&(t=h(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"object":if(D(a[0])&&(a=a.concat.apply([],a)),Pe(a[0])){Promise.all(a).then(i);break}default:t=h(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=h(e.parentNode,t,11===a.nodeType?qe.call(a.childNodes):[a],r):Pe(a)?a.then(i):"placeholder"in a?Le(a,i):"text"in a?i(String(a.text)):"any"in a?i(a.any):"html"in a?t=h(e.parentNode,t,qe.call(j([].concat(a.html).join(""),o).childNodes),r):i("length"in a?qe.call(a):N.invoke(a,i))}var c}},text:function(e){var t;return function n(r){var o;t!==r&&("object"==(o=typeof(t=r))&&r?Pe(r)?r.then(n):"placeholder"in r?Le(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?qe.call(r).join(""):N.invoke(r,n)):"function"==o?n(r(e)):e.textContent=null==r?"":r)}}}),Ge=function(t){var r,o,s,i,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(o={},s=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return o[t]||(o[t]=e)},Ge=c?s:(i=new n,function(e){return i.get(e)||(n=s(t=e),i.set(t,n),n);var t,n})):He=!0,Ve(t)};function Ve(e){return He?e:Ge(e)}function Ze(e){for(var t=arguments.length,n=[Ve(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Ye=new n,Ke=function(e){var t,n,r;return function(){var o=Ze.apply(null,arguments);return r!==o[0]?(r=o[0],n=new Be(e),t=Xe(n.apply(n,o))):n.apply(n,o),t}},Je=function(e,t){var n=t.indexOf(":"),r=Ye.get(e),o=t;return-1<n&&(o=t.slice(n+1),t=t.slice(0,n)||"html"),r||Ye.set(e,r={}),r[o]||(r[o]=Ke(t))},Xe=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Ee(t):e},Qe=new n;function et(){var e=Qe.get(this),t=Ze.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Be(ze in this?"svg":"html");Qe.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var tt,nt,rt,ot,st=N.define,it=Be.prototype;function at(e){return arguments.length<2?null==e?Ke("html"):"string"==typeof e?at.wire(null,e):"raw"in e?Ke("html")(e):"nodeType"in e?at.bind(e):Je(e,"html"):("raw"in e?Ke("html"):at.wire).apply(null,arguments)}return at.Component=v,at.bind=function(e){return et.bind(e)},at.define=st,at.diff=h,(at.hyper=at).observe=Me,at.tagger=it,at.wire=function(e,t){return null==e?Ke(t||"html"):Je(e,t||"html")},at._={WeakMap:n,WeakSet:u},tt=Ke,nt=new n,rt=Object.create,ot=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,o){var s,i,a,c=t.get(e)||ot(e,t);switch(typeof o){case"object":case"function":var l=c.w||(c.w=new n);return l.get(o)||(s=l,i=o,a=new e(r),s.set(i,a),a);default:var u=c.p||(c.p=rt(null));return u[o]||(u[o]=new e(r))}}(this,nt.get(e)||(r=e,o=new w,nt.set(r,o),o),e,null==t?"default":t);var r,o}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:k("html",tt),svg:k("svg",tt),state:k("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(e,{bubbles:!0,cancelable:!0,detail:t});return r.component=this,(n.dispatchEvent?n:n.firstChild).dispatchEvent(r)}return!1}},setState:{value:function(e,t){var n=this.state,r="function"==typeof e?e.call(this,n):e;for(var o in r)n[o]=r[o];return!1!==t&&this.render(),this}}}),at}(document);
/*! (c) Andrea Giammarchi (ISC) */const Xt=N,Qt=Ve,en=Jt,tn=Yt,nn=Kt,rn=/-/g;const on=yn({en:{x_and_y:" and ",x_y_and_z:", and "},de:{x_and_y:" und ",x_y_and_z:" und "}}),sn=new Intl.DateTimeFormat(["en-ca-iso8601"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"}),an=new Set(["dns-prefetch","preconnect","preload","prerender"]),cn=new Set(["document","embed","font","image","manifest","media","object","report","script","serviceworker","sharedworker","style","worker","xslt",""]),ln=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function un(e){if(!e||"object"!=typeof e)throw new TypeError("Missing options");if(!an.has(e.hint))throw new TypeError("Invalid resources hint");const t=new URL(e.href,location.href),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&"string"==typeof e.as&&(cn.has(e.as)||console.warn("Unknown request destination: "+e.as),n.setAttribute("as",e.as))}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function dn(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach(e=>{e.remove()})}function pn(e,t,n,r={}){Array.isArray(e)||(e=[e]);o("warn",hn(e,t,n,r)),console.warn(t,e)}function fn(e,t,n,r={}){Array.isArray(e)||(e=[e]);o("error",hn(e,t,n,r)),console.error(t,e)}function hn(e,t,n,{details:r}){const o=e.map((e,r)=>(function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t);e.id||Sn(e,"respec-offender")}(e,t,n),function(e,t){return`[${t+1}](#${e.id})`}(e,r))).join(", ");let s=`${t} at: ${o}.`;return r&&(s+=`\n\n<details>${r}</details>`),s}class mn{constructor(e,t){this.idb=e,this.storeName=t}async get(e){return await this.idb.transaction(this.storeName).objectStore(this.storeName).get(e)}async getMany(e){const t=new Set(e),n=new Map;let r=await this.idb.transaction(this.storeName).store.openCursor();for(;r;)t.has(r.key)&&n.set(r.key,r.value),r=await r.continue();return n}async set(e,t){const n=this.idb.transaction(this.storeName,"readwrite");return n.objectStore(this.storeName).put(t,e),await n.done}async addMany(e){const t=this.idb.transaction(this.storeName,"readwrite");for(const[n,r]of e)t.objectStore(this.storeName).put(r,n);return await t.done}async clear(){const e=this.idb.transaction(this.storeName,"readwrite");return e.objectStore(this.storeName).clear(),await e.done}async keys(){const e=this.idb.transaction(this.storeName),t=e.objectStore(this.storeName).getAllKeys();return await e.done,t}}function gn(e=[],t=(e=>e),n=g){const r=e.map(t);if(Intl.ListFormat&&"function"==typeof Intl.ListFormat){return new Intl.ListFormat(n,{style:"long",type:"conjunction"}).format(r)}switch(r.length){case 0:case 1:return r.toString();case 2:return r.join(on.x_and_y);default:{const e=r.join(", "),t=e.lastIndexOf(","),n=on.x_y_and_z;return`${e.substr(0,t)}${n}${e.slice(t+2)}`}}}function bn(e){return e.trim().replace(/\s+/g," ")}function yn(e,t=g){return t=function(e){return{"zh-hans":"zh","zh-cn":"zh"}[e]||e}(t.toLowerCase()),new Proxy(e,{get(e,n){const r=e[t]&&e[t][n]||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function wn(e,t=""){return sn.format(e).replace(rn,t)}function vn(e=new Date,t=document.documentElement.lang||"en"){e instanceof Date||(e=new Date(e));const n=[t,"en"];return`${e.toLocaleString(n,{day:"2-digit",timeZone:"UTC"})} ${e.toLocaleString(n,{month:"long",timeZone:"UTC"})} ${e.toLocaleString(n,{year:"numeric",timeZone:"UTC"})}`}function kn(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){o("warn",`call to \`${t}()\` failed with: ${e}. See error console for stack trace.`),console.error(e)}}}return e}async function xn(e,t=864e5){const n=new Request(e),r=new URL(n.url);let o,s;if("caches"in window)try{if(o=await caches.open(r.origin),s=await o.match(n),s&&new Date(s.headers.get("Expires"))>new Date)return s}catch(e){console.error("Failed to use Cache API.",e)}const i=await fetch(n);if(!i.ok&&s)return console.warn("Returning a stale cached response for "+r),s;if(o&&i.ok){const e=i.clone(),r=new Headers(i.headers),s=new Date(Date.now()+t);r.set("Expires",s.toISOString());const a=new Response(await e.blob(),{headers:r});await o.put(n,a).catch(console.error)}return i}function $n(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map(e=>en`${e}, `);return en`${r}${n[n.length-1]}`}function _n(e,t=(e=>e)){const n=e.map(t);switch(n.length){case 0:case 1:return n[0];case 2:return en`${n[0]}${on.x_and_y}${n[1]}`;default:{const e=$n(n.slice(0,-1));return en`${e}${on.x_y_and_z}${n[n.length-1]}`}}}function Cn(e,t=""){return Sn(e,t,function(e){let t=0;for(const n of e)t=Math.imul(31,t)+n.charCodeAt(0)|0;return String(t)}(bn(e.textContent)))}function Sn(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let o=r?n:n.toLowerCase();if(o=o.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),o?!/\.$/.test(o)&&/^[a-z]/i.test(t||o)||(o="x"+o):o="generatedID",t&&(o=`${t}-${o}`),e.ownerDocument.getElementById(o)){let t=0,n=`${o}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${o}-${t}`;o=n}return e.id=o,o}function En(e){const t=new Set,n="ltNodefault"in e.dataset?"":bn(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map(e=>bn(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(bn(e)))}return[...t]}function Rn(e,t){if(e.localName===t)return e;const n=e.ownerDocument.createElement(t);for(const{name:t,value:r}of e.attributes)n.setAttribute(t,r);return n.append(...e.childNodes),e.replaceWith(n),n}function An(e,t){const n=t.closest(ln);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 Tn(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Ln(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 Pn(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 In 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 Nn(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach(e=>e.removeAttribute("id")),t.querySelectorAll("dfn").forEach(e=>Rn(e,"span")),t.hasAttribute("id")&&t.removeAttribute("id"),Dn(t),t}function Dn(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...jn(t)])e.remove()}function*jn(e){for(;e.nextNode();)yield e.currentNode}class On 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())}}const zn="core/base-runner";function Un(e){const t=e.name||"";return t||console.warn("Plugin lacks name:",e),n=>new Promise(async(r,o)=>{const s=setTimeout(()=>{const n=`Plugin ${t} took too long.`;console.error(n,e),o(new Error(n))},15e3);performance.mark(t+"-start");try{e.Plugin?(await new e.Plugin(n).run(),r()):e.run&&(await e.run(n),r())}catch(e){o(e)}finally{clearTimeout(s)}performance.mark(t+"-end"),performance.measure(t,t+"-start",t+"-end")})}function Wn(e){return e&&(e.run||e.Plugin)}var Mn=Object.freeze({__proto__:null,name:zn,runAll:async function(e){o("start-all",respecConfig),performance.mark(zn+"-start"),await f;const t=e.filter(Wn).map(Un);for(const e of t)try{await e(respecConfig)}catch(e){console.error(e)}o("plugins-done",respecConfig),await d,o("end-all",respecConfig),dn(document),performance.mark(zn+"-end"),performance.measure(zn,zn+"-start",zn+"-end")}});async function Fn(e){const t=await fetch(new URL("../../"+e,document.currentScript&&document.currentScript.src||new URL("respec-w3c.js",document.baseURI).href));return await t.text()}async function qn(e){return Fn("assets/"+e)}function Bn(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter(e=>e.trim()).map(e=>e.search(/[^\s]/)),r=Math.min(...n);return t.map(e=>e.slice(r)).join("\n")}var Hn=Object.freeze({__proto__:null,name:"core/reindent",reindent:Bn,run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=Bn(e.innerHTML)}});const Gn=/>/gm,Vn=/&/gm;class Zn extends tn.Renderer{code(e,t,n){const{language:r,...o}=Zn.parseInfoString(t);if(/(^webidl$)/i.test(r))return`<pre class="idl">${e}</pre>`;const s=super.code(e,r,n),{example:i,illegalExample:a}=o;if(!i&&!a)return s;const c=i||a,l=`${r} ${i?"example":"illegal-example"}`;return s.replace("<pre>",`<pre title="${c}" class="${l}">`)}static parseInfoString(e){const t=e.search(/\s/);if(-1===t)return{language:e};const n=e.slice(0,t),r=e.slice(t+1);let o;if(r)try{o=JSON.parse(`{ ${r} }`)}catch(e){console.error(e)}return{language:n,...o}}heading(e,t,n,r){const o=/(.+)\s+{#([\w-]+)}$/;if(o.test(e)){const[,n,r]=e.match(o);return`<h${t} id="${r}">${n}</h${t}>`}return super.heading(e,t,n,r)}}function Yn(e){const t=Bn(e).replace(Gn,">").replace(Vn,"&");return tn(t,{sanitize:!1,gfm:!0,headerIds:!1,langPrefix:"",renderer:new Zn})}function Kn(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=Yn(e.innerHTML)}class Jn{constructor(e){this.doc=e,this.root=e.createDocumentFragment(),this.stack=[this.root],this.current=this.root}findPosition(e){return parseInt(e.tagName.charAt(1),10)}findParent(e){let t;for(;e>0;)if(e--,t=this.stack[e],t)return t}findHeader({firstChild:e}){for(;e;){if(/H[1-6]/.test(e.tagName))return e;e=e.nextSibling}return null}addHeader(e){const t=this.doc.createElement("section"),n=this.findPosition(e);t.appendChild(e),this.findParent(n).appendChild(t),this.stack[n]=t,this.stack.length=n+1,this.current=t}addSection(e,t){const n=this.findHeader(e),r=n?this.findPosition(n):1,o=this.findParent(r);n&&e.removeChild(n),e.appendChild(t(e)),n&&e.prepend(n),o.appendChild(e),this.current=o}addElement(e){this.current.appendChild(e)}}function Xn(e,t){return function e(n){const r=new Jn(t);for(;n.firstChild;){const t=n.firstChild;if(t.nodeType===Node.ELEMENT_NODE)switch(t.localName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":r.addHeader(t);break;case"section":r.addSection(t,e);break;default:r.addElement(t)}else n.removeChild(t)}return r.root}(e)}function Qn(e){const t=Xn(e,e.ownerDocument);if("section"===t.firstElementChild.localName&&"section"===e.localName){const n=t.firstElementChild;n.remove(),e.append(...n.childNodes)}else e.textContent="";e.appendChild(t)}const er=(tr="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(tr);return t.forEach(Kn),Array.from(t)});var tr;var nr=Object.freeze({__proto__:null,name:"core/markdown",markdownToHtml:Yn,restructure:Qn,run:function(e){const t=!!document.querySelector("[data-format=markdown]:not(body)"),n="markdown"===e.format;if(!n&&!t)return;if(!n){for(const e of er(document.body))Qn(e);return}const r=document.getElementById("respec-ui");r.remove();const o=document.body.cloneNode(!0);!function(e,t){const n=e.querySelectorAll(t);for(const e of n){const{innerHTML:t}=e;if(/^<\w/.test(t.trimStart()))continue;const n=t.split("\n"),r=n.slice(0,2).join("\n"),o=n.slice(-2).join("\n");if(r.trim()&&e.prepend("\n\n"),o.trim()){const t=Pn(e);e.append("\n\n"+t)}}}(o,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),Kn(o),function(e){Array.from(e).forEach(e=>{e.replaceWith(e.textContent)})}(o.querySelectorAll(".nolinks a[href]"));const s=Xn(o,document);o.append(r,s),document.body.replaceWith(o)}}),rr={all_shortcuts:{},add:function(e,t,n){var r={type:"keydown",propagate:!1,disable_in_input:!1,target:document,keycode:!1};if(n)for(var o in r)void 0===n[o]&&(n[o]=r[o]);else n=r;var s=n.target;"string"==typeof n.target&&(s=document.getElementById(n.target)),e=e.toLowerCase();var i=function(r){var o,s;if((r=r||window.event,n.disable_in_input)&&(r.target?s=r.target:r.srcElement&&(s=r.srcElement),3==s.nodeType&&(s=s.parentNode),"INPUT"==s.tagName||"TEXTAREA"==s.tagName))return;r.keyCode?o=r.keyCode:r.which&&(o=r.which);var i=String.fromCharCode(o).toLowerCase();188==o&&(i=","),190==o&&(i=".");var a=e.split("+"),c=0,l={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},u={esc:27,escape:27,tab:9,space:32,return:13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,break:19,insert:45,home:36,delete:46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,page_down:34,pd:34,left:37,up:38,right:39,down:40,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},d={shift:{wanted:!1,pressed:!1},ctrl:{wanted:!1,pressed:!1},alt:{wanted:!1,pressed:!1},meta:{wanted:!1,pressed:!1}};r.ctrlKey&&(d.ctrl.pressed=!0),r.shiftKey&&(d.shift.pressed=!0),r.altKey&&(d.alt.pressed=!0),r.metaKey&&(d.meta.pressed=!0);for(var p,f=0;p=a[f],f<a.length;f++)"ctrl"==p||"control"==p?(c++,d.ctrl.wanted=!0):"shift"==p?(c++,d.shift.wanted=!0):"alt"==p?(c++,d.alt.wanted=!0):"meta"==p?(c++,d.meta.wanted=!0):p.length>1?u[p]==o&&c++:n.keycode?n.keycode==o&&c++:(i==p||l[i]&&r.shiftKey&&(i=l[i])==p)&&c++;if(c==a.length&&d.ctrl.pressed==d.ctrl.wanted&&d.shift.pressed==d.shift.wanted&&d.alt.pressed==d.alt.wanted&&d.meta.pressed==d.meta.wanted&&(t(r),!n.propagate))return r.cancelBubble=!0,r.returnValue=!1,r.stopPropagation&&(r.stopPropagation(),r.preventDefault()),!1};this.all_shortcuts[e]={callback:i,target:s,event:n.type},s.addEventListener?s.addEventListener(n.type,i,!1):s.attachEvent?s.attachEvent("on"+n.type,i):s["on"+n.type]=i}};function or(e,t){e&&Array.from(t).forEach(([t,n])=>{e.setAttribute("aria-"+t,n)})}!async function(){const e=document.createElement("style");e.id="respec-ui-styles",e.textContent=await async function(){try{return(await Promise.resolve().then((function(){return Pl}))).default}catch{return qn("ui.css")}}(),e.classList.add("removeOnSave"),document.head.appendChild(e)}();const sr=en`<div id="respec-ui" class="removeOnSave" hidden></div>`,ir=en`<ul
id="respec-menu"
role="menu"
aria-labelledby="respec-pill"
hidden
></ul>`,ar=en`<button
class="close-button"
onclick=${()=>yr.closeModal()}
title="Close"
>
❌
</button>`;let cr,lr;window.addEventListener("load",()=>mr(ir));const ur=[],dr=[],pr={};s("start-all",()=>document.body.prepend(sr),{once:!0}),s("end-all",()=>document.body.prepend(sr),{once:!0});const fr=en`<button id="respec-pill" disabled>ReSpec</button>`;function hr(){ir.classList.toggle("respec-hidden"),ir.classList.toggle("respec-visible"),ir.hidden=!ir.hidden}function mr(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()))})}sr.appendChild(fr),fr.addEventListener("click",e=>{e.stopPropagation(),fr.setAttribute("aria-expanded",String(ir.hidden)),hr(),ir.querySelector("li:first-child button").focus()}),document.documentElement.addEventListener("click",()=>{ir.hidden||hr()}),sr.appendChild(ir),ir.addEventListener("keydown",e=>{"Escape"!==e.key||ir.hidden||(fr.setAttribute("aria-expanded",String(ir.hidden)),hr(),fr.focus())});const gr=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function br(e,t,n,r){t.push(e),pr.hasOwnProperty(n)||(pr[n]=function(e,t,n){const r=en`<button
id="${"respec-pill-"+e}"
class="respec-info-button"
></button>`;r.addEventListener("click",()=>{r.setAttribute("aria-expanded","true");const o=en`<ol class="${`respec-${e}-list`}"></ol>`;for(const e of t){const t=document.createRange().createContextualFragment(Yn(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),o.appendChild(n)}yr.freshModal(n,o,r)});const o=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return or(r,o),r}(n,t,r),sr.appendChild(pr[n]));const o=pr[n];o.textContent=t.length;const s=1===t.length?nn.singular(r):r;or(o,new Map([["label",`${t.length} ${s}`]]))}or(fr,gr);const yr={show(){try{sr.hidden=!1}catch(e){console.error(e)}},hide(){sr.hidden=!0},enable(){fr.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const o="respec-button-"+e.toLowerCase().replace(/\s+/,"-"),s=en`<button
id="${o}"
class="respec-option"
title="${n}"
>
<span class="respec-cmd-icon" aria-hidden="true">${r}</span> ${e}…
</button>`,i=en`<li role="menuitem">${s}</li>`;return i.addEventListener("click",t),ir.appendChild(i),n&&rr.add(n,t),s},error(e){br(e,ur,"error","ReSpec Errors")},warning(e){br(e,dr,"warning","ReSpec Warnings")},closeModal(e){lr&&(lr.classList.remove("respec-show-overlay"),lr.classList.add("respec-hide-overlay"),lr.addEventListener("transitionend",()=>{lr.remove(),lr=null})),e&&e.setAttribute("aria-expanded","false"),cr&&(cr.remove(),cr=null,fr.focus())},freshModal(e,t,n){cr&&cr.remove(),lr&&lr.remove(),lr=en`<div id="respec-overlay" class="removeOnSave"></div>`;const r=n.id+"-modal",o=r+"-heading";cr=en`<div
id="${r}"
class="respec-modal removeOnSave"
role="dialog"
aria-labelledby="${o}"
>
${ar}
<h3 id="${o}">${e}</h3>
<div class="inside">${t}</div>
</div>`;const s=new Map([["labelledby",o]]);or(cr,s),document.body.append(lr,cr),lr.addEventListener("click",()=>this.closeModal(n)),lr.classList.toggle("respec-show-overlay"),cr.hidden=!1,mr(cr)}};rr.add("Esc",()=>yr.closeModal()),rr.add("Ctrl+Alt+Shift+E",()=>{pr.error&&pr.error.click()}),rr.add("Ctrl+Alt+Shift+W",()=>{pr.warning&&pr.warning.click()}),window.respecUI=yr,s("error",e=>yr.error(e)),s("warn",e=>yr.warning(e));var wr=Object.freeze({__proto__:null,name:"core/ui",ui:yr});var vr=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){location.hash&&document.respecIsReady.then(()=>{let e=decodeURIComponent(location.hash).substr(1);const t=document.getElementById(e),n=/\W/.test(e);if(!t&&n){const t=e.replace(/[\W]+/gim,"-").replace(/^-+/,"").replace(/-+$/,"");document.getElementById(t)&&(e=t)}location.hash="#"+e})}});const kr=new WeakMap;class xr{constructor(e,t){kr.set(this,{name:e,lintingFunction:t})}get name(){return kr.get(this).name}lint(e={lint:{[this.name]:!1}},t=document){if(function(e,t){return!(!1===e.hasOwnProperty("lint")||!1===e.lint||!e.lint[t])}(e,this.name))return kr.get(this).lintingFunction(e,t)}}const $r={en:{description:"Document must only contain one `<meta>` tag with charset set to 'utf-8'",howToFix:'Add this line in your document `<head>` section - `<meta charset="utf-8">` or set charset to "utf-8" if not set already.'},zh:{description:"文档只能包含一个 charset 属性为 utf-8 的 `<meta>` 标签",howToFix:'将此行添加到文档的 `<head>` 部分—— `<meta charset="utf-8">` 或将 charset 设置为 utf-8(如果尚未设置)。'}},_r=g in $r?g:"en";const Cr=new xr("check-charset",(function(e,t){const n=t.querySelectorAll("meta[charset]"),r=[];for(const e of n)r.push(e.getAttribute("charset").trim().toLowerCase());return r.includes("utf-8")&&1===n.length?[]:{name:"check-charset",occurrences:n.length,...$r[_r]}})),Sr="check-internal-slots",Er={en:{description:"Internal slots should be preceded by a '.'",howToFix:"Add a '.' between the elements mentioned.",help:"See developer console."}},Rr=g in Er?g:"en";const Ar=new xr(Sr,(function(e,t){const n=[...t.querySelectorAll("var+a")].filter(({previousSibling:{nodeName:e}})=>e&&"VAR"===e);if(n.length)return{name:Sr,offendingElements:n,occurrences:n.length,...Er[Rr]}})),Tr=[".",":","!","?"],Lr={en:{description:"`p` elements should end with a punctuation mark.",howToFix:`Please make sure \`p\` elements end with one of: ${Tr.map(e=>`"${e}"`).join(", ")}.`}},Pr=g in Lr?g:"en";const Ir=new xr("check-punctuation",(function(e,t){const n=new RegExp(`[${Tr.join("")}\\]]$|^ *$`,"m"),r=[...t.querySelectorAll("p:not(#back-to-top)")].filter(e=>!n.test(e.textContent.trim()));if(r.length)return{name:"check-punctuation",offendingElements:r,occurrences:r.length,...Lr[Pr]}})),Nr=new WeakMap;const Dr=new class{constructor(){Nr.set(this,{rules:new Set})}get rules(){return Nr.get(this).rules}register(...e){e.forEach(e=>this.rules.add(e))}async lint(e,t=window.document){const n=[...Nr.get(this).rules].map(n=>async function(e){const t=await e;if(!t)return;const n={...jr,...t},{description:r,help:s,howToFix:i,name:a,occurrences:c,offendingElements:l}=n,u=`Linter (${a}): ${r} ${i} ${s}`;l.length?pn(l,u+" Occured"):o("warn",`${u} (Count: ${c})`)}(n.lint(e,t)));await n}},jr={name:"unknown",description:"",occurrences:0,howToFix:"",offendingElements:[],help:""};var Or=Object.freeze({__proto__:null,name:"core/linter",default:Dr,run:function(e){!1!==e.lint&&(async()=>{await document.respecIsReady;try{await Dr.lint(e,document)}catch(e){console.error("Error ocurred while running the linter",e)}})()}});const zr={en:{description:"Broken local reference found in document.",howToFix:"Please fix the links mentioned.",help:"See developer console."}},Ur=g in zr?g:"en";const Wr=new xr("local-refs-exist",(function(e,t){const n=[...t.querySelectorAll("a[href^='#']")].filter(Mr);if(n.length)return{name:"local-refs-exist",offendingElements:n,occurrences:n.length,...zr[Ur]}}));function Mr(e){const t=e.getAttribute("href").substring(1),n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}const Fr="no-headingless-sections",qr={en:{description:"All sections must start with a `h2-6` element.",howToFix:"Add a `h2-6` to the offending section or use a `<div>`.",help:"See developer console."},nl:{description:"Alle secties moeten beginnen met een `h2-6` element.",howToFix:"Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `<div>`.",help:"Zie de developer console."},zh:{description:"所有章节(section)都必须以 `h2-6` 元素开头。",howToFix:"将 `h2-6` 添加到有问题的章节或使用 `<div>`。"}},Br=g in qr?g:"en",Hr=({firstElementChild:e})=>null===e||!1===/^h[1-6]$/.test(e.localName);const Gr=new xr(Fr,(function(e,t){const n=[...t.querySelectorAll("section")].filter(Hr);if(n.length)return{name:Fr,offendingElements:n,occurrences:n.length,...qr[Br]}})),Vr={en:{description:"Insecure URLs are not allowed in `respecConfig`.",howToFix:"Please change the following properties to 'https://': "},zh:{description:"`respecConfig` 中不允许使用不安全的URL.",howToFix:"请将以下属性更改为 https://:"}},Zr=g in Vr?g:"en";const Yr=new xr("no-http-props",(function(e,t){if(!t.location.href.startsWith("http"))return;const n=Object.getOwnPropertyNames(e).filter(e=>e.endsWith("URI")||"prevED"===e).filter(n=>new URL(e[n],t.location.href).href.startsWith("http://"));if(!n.length)return;const r={name:"no-http-props",occurrences:n.length,...Vr[Zr]};return r.howToFix+=n.map(e=>`\`${e}\``).join(", ")+".",r})),Kr={en:{description:"Variable was defined, but never used.",howToFix:"Add a `data-ignore-unused` attribute to the `<var>`.",help:"See developer console."}},Jr=g in Kr?g:"en";const Xr=new xr("no-unused-vars",(function(e,t){const n=[],r=e=>!!e.querySelector(":scope > :not(section) ~ .algorithm, :scope > :not(section) .algorithm");for(const e of t.querySelectorAll("section")){if(!r(e))continue;const t=e.querySelectorAll(":scope > :not(section) var");if(!t.length)continue;const o=new Map;for(const e of t){const t=bn(e.textContent);(o.get(t)||o.set(t,[]).get(t)).push(e)}for(const e of o.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||n.push(e[0])}if(n.length)return{name:"no-unused-vars",offendingElements:n,occurrences:n.length,...Kr[Jr]}})),Qr={en:{description:"Document must a 'Privacy and/or Security' Considerations section.",howToFix:"Add a privacy and/or security considerations section.",help:"See the [Self-Review Questionnaire](https://w3ctag.github.io/security-questionnaire/)."}},eo=g in Qr?g:"en";const to=new xr("privsec-section",(function(e,t){if(e.isRecTrack&&!function(e){return Array.from(e.querySelectorAll("h2, h3, h4, h5, h6")).some(({textContent:e})=>{const t=/(privacy|security)/im.test(e),n=/(considerations)/im.test(e);return t&&n||t})}(t))return{name:"privsec-section",occurrences:1,...Qr[eo]}}));Dr.register(Yr,Gr,Xr,Ir,Wr,Ar,Cr,to);const no={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},ro={en:{description:"Non-existent Web Platform Tests",howToFix:"Please fix the tests mentioned.",help:"See developer console."}},oo=g in ro?g:"en";const so=new xr("wpt-tests-exist",(async function(e,t){const n=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 o("warn","Failed to parse WPT directory from testSuiteURI"),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 o("warn",`Failed to fetch files from WPT repository. Request failed with error: ${await s.text()} (${s.status})`),null}const{entries:i}=await s.json(),a=i.filter(e=>!e.endsWith("/"));return new Set(a)}(e.testSuiteURI,e.githubAPI);if(!n)return;const r=[],s=new Set,i=[...t.querySelectorAll("[data-tests]")].filter(e=>e.dataset.tests);for(const e of i){const t=e.dataset.tests.split(/,/gm).map(e=>e.trim().split("#")[0]).filter(e=>e).filter(e=>!n.has(e));t.length&&(r.push(e),t.forEach(e=>s.add(e)))}if(!r.length)return;const a=[...s].map(e=>`\`${e}\``);return{name:"wpt-tests-exist",offendingElements:r,occurrences:r.length,...ro[oo],description:`${ro[oo].description}: ${a.join(", ")}.`}}));Dr.register(to,so);const io={src:"https://www.w3.org/StyleSheets/TR/2016/logos/W3C",alt:"W3C",height:48,width:72,url:"https://www.w3.org/"},ao={lint:{"privsec-section":!0,"wpt-tests-exist":!1},doJsonLd:!1,license:"w3c-software-doc",logos:[],xref:!0};var co=Object.freeze({__proto__:null,name:"w3c/defaults",run:function(e){const t=!1!==e.lint&&{...no.lint,...ao.lint,...e.lint};e.specStatus&&"unofficial"!==e.specStatus.toLowerCase()&&ao.logos.push(io),Object.assign(e,{...no,...ao,...e,lint:t})}});const lo=async function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=await async function(){try{return(await Promise.resolve().then((function(){return Il}))).default}catch{return qn("respec.css")}}(),document.head.appendChild(e),e}();var uo=Object.freeze({__proto__:null,name:"core/style",run:async function(e){e.noReSpecCSS&&(await lo).remove()}});const po=[{hint:"preconnect",href:"https://www.w3.org"},{hint:"preload",href:"https://www.w3.org/scripts/TR/2016/fixup.js",as:"script"},{hint:"preload",href:"https://www.w3.org/StyleSheets/TR/2016/base.css",as:"style"}].map(un).reduce((e,t)=>(e.appendChild(t),e),document.createDocumentFragment());po.appendChild(function(){const e=document.createElement("link");return e.rel="stylesheet",e.href="https://www.w3.org/StyleSheets/TR/2016/base.css",e.classList.add("removeOnSave"),e}()),document.head.querySelector("meta[name=viewport]")||po.prepend(function(){const e=document.createElement("meta");return e.name="viewport",e.content=function(e,t=", ",n="="){return Array.from(Object.entries(e)).map(([e,t])=>`${e}${n}${JSON.stringify(t)}`).join(t)}({width:"device-width","initial-scale":"1","shrink-to-fit":"no"}).replace(/"/g,""),e}()),document.head.prepend(po);var fo=Object.freeze({__proto__:null,name:"w3c/style",run:function(e){if(!e.specStatus){const t="`respecConfig.specStatus` missing. Defaulting to 'base'.";e.specStatus="base",o("warn",t)}let t="W3C-";switch(e.specStatus.toUpperCase()){case"CG-DRAFT":case"CG-FINAL":case"BG-DRAFT":case"BG-FINAL":t=e.specStatus.toLowerCase();break;case"FPWD":case"LC":case"WD-NOTE":case"LC-NOTE":t+="WD";break;case"WG-NOTE":case"FPWD-NOTE":t+="WG-NOTE.css";break;case"UNOFFICIAL":t+="UD";break;case"FINDING":case"FINDING-DRAFT":case"BASE":t="base.css";break;default:t+=e.specStatus}const n=function(e){let t="";switch(e){case null:case!0:t="2016";break;default:e&&!isNaN(e)&&(t=e.toString().trim())}return t}(e.useExperimentalStyles||"2016");n&&!e.noToc&&s("end-all",()=>{!function(e,t){const n=e.createElement("script");location.hash&&n.addEventListener("load",()=>{window.location.href=location.hash},{once:!0}),n.src=`https://www.w3.org/scripts/TR/${t}/fixup.js`,e.body.appendChild(n)}(document,n)},{once:!0});const r=`https://www.w3.org/StyleSheets/TR/${n?n+"/":""}${t}`;var i;!function(e,t){const n=[].concat(t).map(t=>{const n=e.createElement("link");return n.rel="stylesheet",n.href=t,n}).reduce((e,t)=>(e.appendChild(t),e),e.createDocumentFragment());e.head.appendChild(n)}(document,r),s("beforesave",(i=r,e=>{const t=e.querySelector(`head link[href="${i}"]`);e.querySelector("head").append(t)}))}});const ho={en:{status_at_publication:en`This section describes the status of this
document at the time of its publication. Other documents may supersede
this document. A list of current W3C publications and the latest revision
of this technical report can be found in the
<a href="https://www.w3.org/TR/">W3C technical reports index</a> at
https://www.w3.org/TR/.`},ko:{status_at_publication:en`이 부분은 현재 문서의 발행 당시 상태에 대해
기술합니다. 다른 문서가 이 문서를 대체할 수 있습니다. W3C 발행 문서의 최신
목록 및 테크니컬 리포트 최신판을 https://www.w3.org/TR/ 의
<a href="https://www.w3.org/TR/">W3C technical reports index</a> 에서
열람할 수 있습니다.`},zh:{status_at_publication:en`本章节描述了本文档的发布状态。其它更新版本可能会覆盖本文档。W3C的文档列
表和最新版本可通过<a href="https://www.w3.org/TR/">W3C技术报告</a
>索引访问。`},ja:{status_at_publication:en`この節には、公開時点でのこの文書の位置づけが記されている。他の文書によって置き換えられる可能性がある。現時点でのW3Cの発行文書とこのテクニカルレポートの最新版は、下記から参照できる。
<a href="https://www.w3.org/TR/">W3C technical reports index</a>
(https://www.w3.org/TR/)`},es:{status_at_publication:en`Esta sección describe el estado del presente
documento al momento de su publicación. El presente documento puede ser
remplazado por otros. Una lista de las publicaciones actuales del W3C y la
última revisión del presente informe técnico puede hallarse en
http://www.w3.org/TR/
<a href="https://www.w3.org/TR/">el índice de informes técnicos</a> del
W3C.`},de:{status_at_publication:en`Dieser Abschnitt beschreibt den Status des
Dokuments zum Zeitpunkt der Publikation. Neuere Dokumente können dieses
Dokument obsolet machen. Eine Liste der aktuellen Publikatinen des W3C und
die aktuellste Fassung dieser Spezifikation kann im
<a href="https://www.w3.org/TR/">W3C technical reports index</a> unter
https://www.w3.org/TR/ abgerufen werden.`}};Object.keys(ho).forEach(e=>{m[e]||(m[e]={}),Object.assign(m[e],ho[e])});var mo=Object.freeze({__proto__:null,name:"w3c/l10n"});let go,bo;const yo=new Promise((e,t)=>{go=e,bo=e=>{o("error",e),t(new Error(e))}}),wo=yn({en:{file_a_bug:"File a bug",participate:"Participate",commit_history:"Commit history"},ko:{participate:"참여"},zh:{participate:"参与:",file_a_bug:"反馈错误"},ja:{file_a_bug:"問題報告",participate:"参加方法:",commit_history:"変更履歴"},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:{file_a_bug:"Fehler melden",participate:"Mitmachen",commit_history:"Revisionen"}});var vo=Object.freeze({__proto__:null,name:"core/github",github:yo,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void go(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){return void bo("Config option `[github](https://github.com/w3c/respec/wiki/github)` is missing property `repoURL`.")}let t,n=e.github.repoURL||e.github;n.endsWith("/")||(n+="/");try{t=new URL(n,"https://github.com")}catch{return void bo(`\`respecConf.github\` is not a valid URL? (${t})`)}if("https://github.com"!==t.origin){return void bo(`\`respecConf.github\` must be HTTPS and pointing to GitHub. (${t})`)}const[r,s]=t.pathname.split("/").filter(e=>e);if(!r||!s){return void bo("`respecConf.github` URL needs a path with, for example, w3c/my-spec")}const i=e.github.branch||"gh-pages",a=new URL("./issues/",t).href,c={edDraftURI:`https://${r.toLowerCase()}.github.io/${s}/`,githubToken:void 0,githubUser:void 0,issueBase:a,atRiskBase:a,otherLinks:[],pullBase:new URL("./pulls/",t).href,shortName:s},l={key:wo.participate,data:[{value:`GitHub ${r}/${s}`,href:t},{value:wo.file_a_bug,href:c.issueBase},{value:wo.commit_history,href:new URL("./commits/"+i,t.href).href},{value:"Pull requests",href:c.pullBase}]};let u="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)u=e.githubAPI;else{o("warn","`respecConfig.githubAPI` should not be added manually.")}const d={branch:i,repoURL:t.href,apiBase:u,fullName:`${r}/${s}`};go(d);const p={...c,...e,github:d,githubAPI:u};Object.assign(e,p),e.otherLinks.unshift(l)}});function ko(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`),o=kn(e,r.dataset.oninclude,n),s="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let o=t;"markdown"===r&&(o=Yn(o)),"text"===r?e.textContent=o:e.innerHTML=o,"markdown"===r&&Qn(e),n&&e.replaceWith(...e.childNodes)}(r,o,{replace:s}),s||function(e){["data-include","data-include-format","data-include-replace","data-include-id","oninclude"].forEach(t=>e.removeAttribute(t))}(r)}var xo=Object.freeze({__proto__:null,name:"core/data-include",run:async function(){const e=document.querySelectorAll("[data-include]"),t=Array.from(e).map(async e=>{const t=e.dataset.include;if(!t)return;const n="include-"+String(Math.random()).substr(2);e.dataset.includeId=n;try{const e=await fetch(t);ko(await e.text(),n,t)}catch(n){const r=`\`data-include\` failed: \`${t}\` (${n.message}). See console for details.`;console.error("data-include failed for element: ",e,n),o("error",r)}});await Promise.all(t)}});const $o=yn({en:{default_title:"No Title"},de:{default_title:"Kein Titel"},zh:{default_title:"无标题"}});var _o=Object.freeze({__proto__:null,name:"core/title",run:function(e){const t=document.querySelector("h1#title")||en`<h1 id="title"></h1>`;if(t.isConnected&&""===t.textContent.trim()){fn(t,'The document is missing a title, so using a default title. To fix this, please give your document a `<title>`. If you need special markup in the document\'s title, please use a `<h1 id="title">`.',"Document is missing a title")}t.id||(t.id="title"),t.classList.add("title"),function(e,t){t.isConnected||(t.textContent=document.title||""+$o.default_title);let n=bn(t.textContent);if(e.isPreview&&e.prNumber){const r=e.prUrl||`${e.github.repoURL}pull/${e.prNumber}`,{childNodes:o}=en`
Preview of PR <a href="${r}">#${e.prNumber}</a>:
`;t.prepend(...o),n=`Preview of PR #${e.prNumber}: ${n}`}document.title=n,e.title=n}(e,t),document.body.prepend(t)}});const Co=yn({en:{level:"Level"}});var So=Object.freeze({__proto__:null,name:"w3c/level",run:function(e){if(!e.hasOwnProperty("level"))return;const t=document.querySelector("h1#title"),n=parseInt(e.level);!Number.isInteger(n)||n<0?fn(t,`The \`level\` configuration option must be a number greater or equal to 0. It is currently set to \`${n}\``,"Invalid level config."):(t.append(` ${Co.level} ${n}`),document.title=`${document.title} ${Co.level} ${n}`,e.shortName=`${e.shortName}-${n}`,e.level=n)}});async function Eo(e){const t=new URL(e,"https://respec.org/w3c/groups/").href,n=await xn(t);if(n.ok){const e=await n.json(),{id:t,name:r,URI:o,patentURI:s}=e;return{wg:r,wgId:t,wgURI:o,wgPatentURI:s}}let r=`Failed to fetch group details (HTTP: ${n.status})`;if(404===n.status){r=`${`No group with name \`"${e}"\` found.`} ${"See [supported group names](https://respec.org/w3c/groups/) to use with the [`group`](https://github.com/w3c/respec/wiki/group) configuration option."}`}o("error",r)}var Ro=Object.freeze({__proto__:null,name:"w3c/group",run:async function(e){if(!e.group)return;const t=["wg","wgURI","wgId","wgPatentURI"].filter(t=>e[t]);if(t.length){o("warn",`${`Configuration options ${gn(t,e=>`\`${e}\``)} are superseded by \`group\` and will be overridden by ReSpec.`} ${"Please remove them from `respecConfig`."}`)}const{group:n}=e,r=Array.isArray(n)?await async function(e){const t=await Promise.all(e.map(Eo)),n={wg:[],wgId:[],wgURI:[],wgPatentURI:[]};for(const e of t.filter(e=>e))for(const t of Object.keys(n))n[t].push(e[t]);return n}(n):await Eo(n);Object.assign(e,r)}});function Ao(e){if(!e.key){const t="Found a link without `key` attribute in the configuration. See dev console.";return o("warn",t),void console.warn("warn",t,e)}return en`
<dt class="${e.class?e.class:null}">${e.key}:</dt>
${e.data?e.data.map(To):To(e)}
`}function To(e){return en`<dd class="${e.class?e.class:null}">
${e.href?en`<a href="${e.href}">${e.value||e.href}</a>`:e.value}
</dd>`}function Lo(e){const t=en`<a href="${e.url||""}" class="logo"></a>`;e.alt||pn(t,"Found spec logo without an `alt` attribute");const n=en`<img
id="${e.id}"
alt="${e.alt}"
width="${e.width}"
height="${e.height}"
/>`;return n.src=e.src,t.append(n),t}const Po={en:{until:e=>en` Until ${e} `},es:{until:e=>en` Hasta ${e} `},ko:{until:e=>en` ${e} 이전 `},ja:{until:e=>en` ${e} 以前 `},de:{until:e=>en` bis ${e} `},zh:{until:e=>en` 直到 ${e} `}},Io=g in Po?g:"en",No=en`<svg
width="16"
height="16"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 256 256"
>
<style>
.st1 {
fill: #fff;
}
</style>
<path
d="M256 128c0 70.7-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0s128 57.3 128 128z"
fill="#a6ce39"
/>
<path
class="st1"
d="M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h24.5c34.9 0 42.9-26.5 42.9-39.7C191.7 111.2 178 93 148 93h-23.7v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.6 10.1 10.1z"
/>
</svg>`;function Do(e=[]){const t=Po[Io];return e.map((function(e){const r=[e.name],o=[e.company],s=e.w3cid?parseInt(e.w3cid,10):null,i=en`<dd
class="p-author h-card vcard"
data-editor-id="${s}"
></dd>`,a=document.createDocumentFragment(),c=[];e.mailto?c.push(en`<a
class="ed_mailto u-email email p-name"
href="${"mailto:"+e.mailto}"
>${r}</a
>`):e.url?c.push(en`<a class="u-url url p-name fn" href="${e.url}">${r}</a>`):c.push(en`<span class="p-name fn">${r}</span>`);e.orcid&&c.push(en`<a class="p-name orcid" href="${e.orcid}">${No} </a>`);e.company&&(e.companyURL?c.push(en`
(<a class="p-org org h-org h-card" href="${e.companyURL}"
>${o}</a
>)
`):c.push(en` (${o}) `));e.note&&c.push(document.createTextNode(` (${e.note})`));if(e.extras){const t=e.extras.filter(e=>e.name&&e.name.trim()).map(n);for(const e of t)c.push(document.createTextNode(", "),e)}if(e.retiredDate){const n=new Date(e.retiredDate),r="Invalid Date"!==n.toString(),o=document.createElement("time");o.textContent=r?vn(n):"Invalid Date",r||fn(o,"The date is invalid. The expected format is YYYY-MM-DD.","Invalid date"),o.dateTime=(l=n,sn.format(l)),c.push(en` - ${t.until(o)} `)}var l;return en.bind(a)`${c}`,i.appendChild(a),i}));function n(e){const t=en`<span class="${e.class||null}"></span>`;let n=t;return e.href&&(n=en`<a href="${e.href}"></a>`,t.appendChild(n)),n.textContent=e.name,t}}const jo="https://creativecommons.org/licenses/by/4.0/",Oo="https://www.w3.org/Consortium/Legal/copyright-documents",zo="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer",Uo="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks",Wo=yn({en:{author:"Author:",authors:"Authors:",editor:"Editor:",editors:"Editors:",former_editor:"Former editor:",former_editors:"Former editors:",latest_editors_draft:"Latest editor's draft:",latest_published_version:"Latest published version:",edited_in_place:"edited in place",this_version:"This version:",test_suite:"Test suite:",implementation_report:"Implementation report:",prev_editor_draft:"Previous editor's draft:",prev_version:"Previous version:",prev_recommendation:"Previous Recommendation:",latest_recommendation:"Latest Recommendation:"},ko:{author:"저자:",authors:"저자:",editor:"편집자:",editors:"편집자:",former_editor:"이전 편집자:",former_editors:"이전 편집자:",latest_editors_draft:"최신 편집 초안:",latest_published_version:"최신 버전:",this_version:"현재 버전:"},zh:{author:"作者:",authors:"作者:",editor:"编辑:",editors:"编辑:",former_editor:"原编辑:",former_editors:"原编辑:",latest_editors_draft:"最新编辑草稿:",latest_published_version:"最新发布版本:",this_version:"本版本:",test_suite:"测试套件:",implementation_report:"实现报告:",prev_editor_draft:"上一版编辑草稿:",prev_version:"上一版:",prev_recommendation:"上一版正式推荐标准:",latest_recommendation:"最新发布的正式推荐标准:"},ja:{author:"著者:",authors:"著者:",editor:"編者:",editors:"編者:",former_editor:"以前の版の編者:",former_editors:"以前の版の編者:",latest_editors_draft:"最新の編集用草案:",latest_published_version:"最新バージョン:",this_version:"このバージョン:",test_suite:"テストスイート:",implementation_report:"実装レポート:"},nl:{author:"Auteur:",authors:"Auteurs:",editor:"Redacteur:",editors:"Redacteurs:",latest_editors_draft:"Laatste werkversie:",latest_published_version:"Laatst gepubliceerde versie:",this_version:"Deze versie:"},es:{author:"Autor:",authors:"Autores:",editor:"Editor:",editors:"Editores:",latest_editors_draft:"Borrador de editor mas reciente:",latest_published_version:"Versión publicada mas reciente:",this_version:"Ésta versión:"},de:{author:"Autor/in:",authors:"Autor/innen:",editor:"Redaktion:",editors:"Redaktion:",former_editor:"Frühere Mitwirkende:",former_editors:"Frühere Mitwirkende:",latest_editors_draft:"Letzter Entwurf:",latest_published_version:"Letzte publizierte Fassung:",this_version:"Diese Fassung:"}});
var Mo=``;
function Fo(e,t,n){return en`<a rel="license" href="${t}" class="${n}">${e}</a>`}var qo=(e,t)=>{const n=document.querySelector(".copyright");n&&n.remove();const r=document.querySelector("h1#title"),o=r.cloneNode(!0);return en`<div class="head">
${e.logos.map(Lo)} ${r}
${e.subtitle?en`<h2 id="subtitle">${e.subtitle}</h2>`:""}
<h2>
${e.longStatus}
<time class="dt-published" datetime="${e.dashDate}"
>${e.publishHumanDate}</time
>
</h2>
<dl>
${e.thisVersion?en`
<dt>${Wo.this_version}</dt>
<dd>
<a class="u-url" href="${e.thisVersion}"
>${e.thisVersion}</a
>
</dd>
`:""}
${e.latestVersion?en`
<dt>${Wo.latest_published_version}</dt>
<dd>
<a href="${e.latestVersion}">${e.latestVersion}</a>
</dd>
`:""}
${e.edDraftURI?en`
<dt>${Wo.latest_editors_draft}</dt>
<dd><a href="${e.edDraftURI}">${e.edDraftURI}</a></dd>
`:""}
${e.testSuiteURI?en`
<dt>Test suite:</dt>
<dd><a href="${e.testSuiteURI}">${e.testSuiteURI}</a></dd>
`:""}
${e.implementationReportURI?en`
<dt>Implementation report:</dt>
<dd>
<a href="${e.implementationReportURI}"
>${e.implementationReportURI}</a
>
</dd>
`:""}
${e.prevVersion?en`
<dt>Previous version:</dt>
<dd><a href="${e.prevVersion}">${e.prevVersion}</a></dd>
`:""}
${e.isCGFinal?"":en`
${e.prevED?en`
<dt>Previous editor's draft:</dt>
<dd><a href="${e.prevED}">${e.prevED}</a></dd>
`:""}
`}
<dt>${e.multipleEditors?Wo.editors:Wo.editor}</dt>
${Do(e.editors)}
${Array.isArray(e.formerEditors)&&e.formerEditors.length>0?en`
<dt>
${e.multipleFormerEditors?Wo.former_editors:Wo.former_editor}
</dt>
${Do(e.formerEditors)}
`:""}
${e.authors?en`
<dt>
${e.multipleAuthors?Wo.authors:Wo.author}
</dt>
${Do(e.authors)}
`:""}
${e.otherLinks?e.otherLinks.map(Ao):""}
</dl>
${e.alternateFormats?en`<p>
${t.multipleAlternates?"This document is also available in these non-normative formats:":"This document is also available in this non-normative format:"}
${t.alternatesHTML}
</p>`:""}
${n||en`<p class="copyright">
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
>Copyright</a
>
©
${e.copyrightStart?e.copyrightStart+"-":""}${e.publishYear}
${e.additionalCopyrightHolders?en` ${[e.additionalCopyrightHolders]} & `:""}
the Contributors to the ${o.childNodes}
Specification, published by the
<a href="${e.wgURI}">${e.wg}</a> under the
${e.isCGFinal?en`
<a href="https://www.w3.org/community/about/agreements/fsa/"
>W3C Community Final Specification Agreement (FSA)</a
>. A human-readable
<a
href="https://www.w3.org/community/about/agreements/fsa-deed/"
>summary</a
>
is available.
`:en`
<a href="https://www.w3.org/community/about/agreements/cla/"
>W3C Community Contributor License Agreement (CLA)</a
>. A human-readable
<a
href="https://www.w3.org/community/about/agreements/cla-deed/"
>summary</a
>
is available.
`}
</p>`}
<hr title="Separator for header" />
</div>`};const Bo=yn({en:{sotd:"Status of This Document"},ko:{sotd:"현재 문서의 상태"},zh:{sotd:"关于本文档"},ja:{sotd:"この文書の位置付け"},nl:{sotd:"Status van dit document"},es:{sotd:"Estado de este Document"},de:{sotd:"Status dieses Dokuments"}});var Ho=(e,t)=>en`
<h2>${Bo.sotd}</h2>
${e.isPreview?function(e){const{prUrl:t,prNumber:n,edDraftURI:r}=e;return en`<details class="annoying-warning" open="">
<summary
>This is a
preview${t&&n?en`
of pull request
<a href="${t}">#${n}</a>
`:""}</summary
>
<p>
Do not attempt to implement this version of the specification. Do not
reference this version as authoritative in any way.
${r?en`
Instead, see
<a href="${r}">${r}</a> for the Editor's draft.
`:""}
</p>
</details>`}(e):""}
${e.isUnofficial?function(e){const{additionalContent:t}=e;return en`
<p>
This document is 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.
</p>
${t}
`}(t):e.isTagFinding?t.additionalContent:e.isNoTrack?function(e,t){const{isMO:n}=e,{additionalContent:r}=t;return en`
<p>
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.
</p>
${r}
`}(e,t):en`
<p><em>${e.l10n.status_at_publication}</em></p>
${e.isSubmission?function(e,t){return en`
${t.additionalContent}
${e.isMemberSubmission?function(e){const t=`https://www.w3.org/Submission/${e.publishDate.getUTCFullYear()}/${e.submissionCommentNumber}/Comment/`;return en`<p>
By publishing this document, W3C acknowledges that the
<a href="${e.thisVersion}">Submitting Members</a> 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
<a href="https://www.w3.org/Consortium/Process">W3C Process</a>. A
<a href="${t}">W3C Team Comment</a> has been published in
conjunction with this Member Submission. Publication of acknowledged Member
Submissions at the W3C site is one of the benefits of
<a href="https://www.w3.org/Consortium/Prospectus/Joining">
W3C Membership</a
>. Please consult the requirements associated with Member Submissions of
<a href="https://www.w3.org/Consortium/Patent-Policy/#sec-submissions"
>section 3.3 of the W3C Patent Policy</a
>. Please consult the complete
<a href="https://www.w3.org/Submission"
>list of acknowledged W3C Member Submissions</a
>.
</p>`}(e):e.isTeamSubmission?function(e,t){return en`
${Go(e,t)}
<p>
Please consult the complete
<a href="https://www.w3.org/TeamSubmission/">list of Team Submissions</a>.
</p>
`}(e,t):""}
`}(e,t):en`
${e.sotdAfterWGinfo?"":t.additionalContent}
${e.overrideStatus?"":en`
${function(e){if(!e.wg)return;return en`<p>
This document was published by ${e.wgHTML} as ${e.anOrA}
${e.longStatus}.
${e.notYetRec?"This document is intended to become a W3C Recommendation.":""}
</p>`}(e)} ${function(e,t){if(!e.github&&!e.wgPublicList)return;return en`<p>
${e.github?en`
<a href="${e.issueBase}">GitHub Issues</a> are preferred for
discussion of this specification.
`:""}
${e.wgPublicList?en`
${e.github&&e.wgPublicList?"Alternatively, you can send comments to our mailing list.":"Comments regarding this document are welcome."}
Please send them to
<a href="${t.mailToWGPublicListWithSubject}"
>${e.wgPublicList}@w3.org</a
>
(<a
href="${`https://lists.w3.org/Archives/Public/${e.wgPublicList}/`}"
>archives</a
>)${e.subjectPrefix?en`
with <code>${e.subjectPrefix}</code> at the start of your
email's subject
`:""}.
`:""}
</p>`}(e,t)}
${e.isCR||e.isPER||e.isPR?en`<p>
${e.isCR?`\n W3C publishes a Candidate Recommendation to indicate that the document is believed to be\n stable and to encourage implementation by the developer community. This Candidate\n Recommendation is expected to advance to Proposed Recommendation no earlier than\n ${e.humanCREnd}.\n `:""}
${e.isPER?en`
W3C Advisory Committee Members are invited to
send formal review comments on this Proposed
Edited Recommendation to the W3C Team until
${e.humanPEREnd}. Members of the Advisory
Committee will find the appropriate review
form for this document by consulting their
list of current
<a
href="https://www.w3.org/2002/09/wbs/myQuestionnaires"
>WBS questionnaires</a
>.
`:""}
${e.isPR?en`
The W3C Membership and other interested
parties are invited to review the document and
send comments to
<a
rel="discussion"
href="${t.mailToWGPublicList}"
>${e.wgPublicList}@w3.org</a
>
(<a
href="${t.mailToWGPublicListSubscription}"
>subscribe</a
>,
<a
href="${`https://lists.w3.org/Archives/Public/${e.wgPublicList}/`}"
>archives</a
>) through ${e.humanPREnd}. Advisory
Committee Representatives should consult their
<a
href="https://www.w3.org/2002/09/wbs/myQuestionnaires"
>WBS questionnaires</a
>. Note that substantive technical comments
were expected during the Candidate
Recommendation review period that ended
${e.humanCREnd}.
`:""}
</p>`:""}
`}
${e.implementationReportURI?function(e){const{implementationReportURI:t}=e;return en`<p>
Please see the Working Group's
<a href="${t}">implementation report</a>.
</p>`}(e):""}
${e.sotdAfterWGinfo?t.additionalContent:""}
${e.isRec?en`<p>
This document has been reviewed by W3C Members, by software developers, and
by other W3C groups and interested parties, and is endorsed by the Director
as a W3C Recommendation. It is a stable document and may be used as
reference material or cited from another document. W3C's role in making the
Recommendation is to draw attention to the specification and to promote its
widespread deployment. This enhances the functionality and interoperability
of the Web.
</p>`:function({anOrA:e,textStatus:t}){return en`<p>
Publication as ${e} ${t} does not imply endorsement by the W3C
Membership. 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.
</p>`}(e)}
${function(e){const{isNote:t,wgId:n,isIGNote:r,multipleWGs:o,recNotExpected:s,wgPatentHTML:i,wgPatentURI:a,charterDisclosureURI:c}=e,l=r?"":en`
This document was produced by ${o?"groups":"a group"}
operating under the
<a href="https://www.w3.org/Consortium/Patent-Policy/"
>W3C Patent Policy</a
>.
`;return en`<p data-deliverer="${t||r?n:null}">
${l} ${s?"The group does not expect this document to become a W3C Recommendation.":""}
${t||r?"":en`
${o?en` W3C maintains ${i} `:en`
W3C maintains a
<a href="${[a]}" rel="disclosure"
>public list of any patent disclosures</a
>
`}
made in connection with the deliverables of
${o?"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
<a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential"
>Essential Claim(s)</a
>
must disclose the information in accordance with
<a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure"
>section 6 of the W3C Patent Policy</a
>.
`}
${r?en`
The disclosure obligations of the Participants of this group are
described in the
<a href="${c}">charter</a>.
`:""}
</p>`}(e)}
<p>
This document is governed by the
<a
id="w3c_process_revision"
href="https://www.w3.org/2019/Process-20190301/"
>1 March 2019 W3C Process Document</a
>.
</p>
${e.addPatentNote?en`<p>${[e.addPatentNote]}</p>`:""}
`}
`}
${t.additionalSections}
`;function Go(e,t){const{mailToWGPublicListWithSubject:n,mailToWGPublicListSubscription:r}=t,{wgPublicList:o,subjectPrefix:s}=e;return en`<p>
If you wish to make comments regarding this document, please send them to
<a href="${n}">${o}@w3.org</a>
(<a href="${r}">subscribe</a>,
<a href="${`https://lists.w3.org/Archives/Public/${o}/`}">archives</a>)${s?en` with <code>${s}</code> at the start of your email's
subject`:""}.
</p>`}var Vo=(e,t)=>en`
<h2>${Bo.sotd}</h2>
${e.isPreview?en`<details class="annoying-warning" open="">
<summary
>This is a
preview${e.prUrl&&e.prNumber?en`
of pull request
<a href="${e.prUrl}">#${e.prNumber}</a>
`:""}</summary
>
<p>
Do not attempt to implement this version of the specification. Do
not reference this version as authoritative in any way.
${e.edDraftURI?en`
Instead, see
<a href="${e.edDraftURI}">${e.edDraftURI}</a> for the
Editor's draft.
`:""}
</p>
</details>`:""}
<p>
This specification was published by the
<a href="${e.wgURI}">${e.wg}</a>. It is not a W3C Standard nor is it
on the W3C Standards Track.
${e.isCGFinal?en`
Please note that under the
<a href="https://www.w3.org/community/about/agreements/final/"
>W3C Community Final Specification Agreement (FSA)</a
>
other conditions apply.
`:en`
Please note that under the
<a href="https://www.w3.org/community/about/agreements/cla/"
>W3C Community Contributor License Agreement (CLA)</a
>
there is a limited opt-out and other conditions apply.
`}
Learn more about
<a href="https://www.w3.org/community/"
>W3C Community and Business Groups</a
>.
</p>
${e.sotdAfterWGinfo?"":t.additionalContent}
${e.wgPublicList?Go(e,t):""}
${e.sotdAfterWGinfo?t.additionalContent:""}
${t.additionalSections}
`;const Zo=new Intl.DateTimeFormat(["en-AU"],{timeZone:"UTC",year:"numeric",month:"long",day:"2-digit"}),Yo={LS:"WD",LD:"WD",FPWD:"WD",LC:"WD",FPLC:"WD","FPWD-NOTE":"NOTE","WD-NOTE":"WD","LC-NOTE":"LC","IG-NOTE":"NOTE","WG-NOTE":"NOTE"},Ko={NOTE:"w3p:NOTE",WD:"w3p:WD",LC:"w3p:LastCall",CR:"w3p:CR",PR:"w3p:PR",REC:"w3p:REC",PER:"w3p:PER",RSCND:"w3p:RSCND"},Jo={NOTE:"Working Group Note","WG-NOTE":"Working Group Note","CG-NOTE":"Co-ordination Group Note","IG-NOTE":"Interest Group Note","Member-SUBM":"Member Submission","Team-SUBM":"Team Submission",MO:"Member-Only Document",ED:"Editor's Draft",LS:"Living Standard",LD:"Living Document",FPWD:"First Public Working Draft",WD:"Working Draft","FPWD-NOTE":"Working Group Note","WD-NOTE":"Working Draft","LC-NOTE":"Working Draft",FPLC:"First Public and Last Call Working Draft",LC:"Last Call Working Draft",CR:"Candidate Recommendation",PR:"Proposed Recommendation",PER:"Proposed Edited Recommendation",REC:"Recommendation",RSCND:"Rescinded Recommendation",unofficial:"Unofficial Draft",base:"Document",finding:"TAG Finding","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"},Xo={...Jo,"FPWD-NOTE":"First Public Working Group Note","LC-NOTE":"Last Call Working Draft"},Qo=["FPWD","WD"],es=["FPLC","LC","CR","PR","PER","REC"],ts=["base","BG-DRAFT","BG-FINAL","CG-DRAFT","CG-FINAL","draft-finding","finding","MO","unofficial"],ns=["CG-DRAFT","CG-FINAL","BG-DRAFT","BG-FINAL"],rs=["ED","IG-NOTE"],os={cc0:{name:"Creative Commons 0 Public Domain Dedication",short:"CC0",url:"https://creativecommons.org/publicdomain/zero/1.0/"},"w3c-software":{name:"W3C Software Notice and License",short:"W3C Software",url:"https://www.w3.org/Consortium/Legal/2002/copyright-software-20021231"},"w3c-software-doc":{name:"W3C Software and Document Notice and License",short:"W3C Software and Document",url:"https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"},"cc-by":{name:"Creative Commons Attribution 4.0 International Public License",short:"CC-BY",url:"https://creativecommons.org/licenses/by/4.0/legalcode"}},ss=Object.freeze({id:"",alt:"",href:"",src:"",height:"48",width:"72"});function is(e,t,n=new Date){const r=e[t]?new Date(e[t]):new Date(n);if(Number.isFinite(r.valueOf())){const e=sn.format(r);return new Date(e)}return o("error",`[\`${t}\`](https://github.com/w3c/respec/wiki/${t}) is not a valid date: "${e[t]}". Expected format 'YYYY-MM-DD'.`),new Date(sn.format(new Date))}function as(e,{isTagFinding:t=!1}){const n=e.cloneNode(!0),r=document.createDocumentFragment();for(;n.hasChildNodes()&&(n.firstChild.nodeType!==Node.ELEMENT_NODE||"section"!==n.firstChild.localName);)r.appendChild(n.firstChild);return t&&!r.hasChildNodes()&&o("warn","ReSpec does not support automated SotD generation for TAG findings, please add the prerequisite content in the 'sotd' section"),{additionalContent:r,additionalSections:n.childNodes}}var cs=Object.freeze({__proto__:null,name:"w3c/headers",run:function(e){if(e.isUnofficial="unofficial"===e.specStatus,e.isUnofficial&&!Array.isArray(e.logos)&&(e.logos=[]),e.isCCBY="cc-by"===e.license,e.isW3CSoftAndDocLicense="w3c-software-doc"===e.license,["cc-by"].includes(e.license)){let t=`You cannot use license "\`${e.license}\`" with W3C Specs. `;t+='Please set `respecConfig.license: "w3c-software-doc"` instead.',o("error",t)}if(e.licenseInfo=os[e.license],e.isCGBG=ns.includes(e.specStatus),e.isCGFinal=e.isCGBG&&e.specStatus.endsWith("G-FINAL"),e.isBasic="base"===e.specStatus,e.isRegular=!e.isCGBG&&!e.isBasic,e.specStatus||o("error","Missing required configuration: `specStatus`"),e.isRegular&&!e.shortName&&o("error","Missing required configuration: `shortName`"),e.testSuiteURI){const t=new URL(e.testSuiteURI,location.href),{host:n,pathname:r}=t;if("github.com"===n&&r.startsWith("/w3c/web-platform-tests/")){o("warn",`Web Platform Tests have moved to a new Github Organization at https://github.com/web-platform-tests. Please update your [\`testSuiteURI\`](https://github.com/w3c/respec/wiki/testSuiteURI) to point to the new tests repository (e.g., https://github.com/web-platform-tests/wpt/${e.shortName} ).`)}}if(e.subtitle||(e.subtitle=""),e.publishDate=is(e,"publishDate",document.lastModified),e.publishYear=e.publishDate.getUTCFullYear(),e.publishHumanDate=Zo.format(e.publishDate),e.isNoTrack=ts.includes(e.specStatus),e.isRecTrack=!e.noRecTrack&&es.concat(Qo).includes(e.specStatus),e.isMemberSubmission="Member-SUBM"===e.specStatus,e.isMemberSubmission){const t={alt:"W3C Member Submission",href:"https://www.w3.org/Submission/",src:"https://www.w3.org/Icons/member_subm-v.svg",width:"211"};e.logos.push({...ss,...t})}if(e.isTeamSubmission="Team-SUBM"===e.specStatus,e.isTeamSubmission){const t={alt:"W3C Team Submission",href:"https://www.w3.org/TeamSubmission/",src:"https://www.w3.org/Icons/team_subm-v.svg",width:"211"};e.logos.push({...ss,...t})}e.isSubmission=e.isMemberSubmission||e.isTeamSubmission,e.anOrA=rs.includes(e.specStatus)?"an":"a",e.isTagFinding="finding"===e.specStatus||"draft-finding"===e.specStatus,e.edDraftURI||(e.edDraftURI="","ED"===e.specStatus&&o("warn","Editor's Drafts should set edDraftURI.")),e.maturity=Yo[e.specStatus]?Yo[e.specStatus]:e.specStatus;let t="TR";"Member-SUBM"===e.specStatus?t="Submission":"Team-SUBM"===e.specStatus&&(t="TeamSubmission"),e.isRegular&&(e.thisVersion=`https://www.w3.org/${t}/${e.publishDate.getUTCFullYear()}/${e.maturity}-${e.shortName}-${wn(e.publishDate)}/`),"ED"===e.specStatus&&(e.thisVersion=e.edDraftURI);const n="ED"===e.specStatus&&null===e.latestVersion;if(e.isRegular&&!n&&(e.latestVersion=`https://www.w3.org/${t}/${e.shortName}/`),e.isTagFinding&&(e.latestVersion="https://www.w3.org/2001/tag/doc/"+e.shortName,e.thisVersion=`${e.latestVersion}-${sn.format(e.publishDate)}`),e.previousPublishDate){e.previousMaturity||e.isTagFinding||o("error","`previousPublishDate` is set, but not `previousMaturity`."),e.previousPublishDate=is(e,"previousPublishDate");const t=Yo[e.previousMaturity]?Yo[e.previousMaturity]:e.previousMaturity;e.isTagFinding?e.prevVersion=`${e.latestVersion}-${sn.format(e.previousPublishDate)}`:e.isCGBG?e.prevVersion=e.prevVersion||"":e.isBasic?e.prevVersion="":e.prevVersion=`https://www.w3.org/TR/${e.previousPublishDate.getUTCFullYear()}/${t}-${e.shortName}-${wn(e.previousPublishDate)}/`}else e.specStatus.endsWith("NOTE")||"FPWD"===e.specStatus||"FPLC"===e.specStatus||"ED"===e.specStatus||e.noRecTrack||e.isNoTrack||e.isSubmission||o("error","Document on track but no previous version: Add `previousMaturity`, and `previousPublishDate` to ReSpec's config."),e.prevVersion||(e.prevVersion="");e.prevRecShortname&&!e.prevRecURI&&(e.prevRecURI="https://www.w3.org/TR/"+e.prevRecShortname);const r=function(e){if(e.name||o("error","All authors and editors must have a name."),e.orcid)try{e.orcid=function(e){const t=new URL(e,"https://orcid.org/");if("https://orcid.org"!==t.origin)throw new Error(`The origin should be "https://orcid.org", not "${t.origin}".`);const n=t.pathname.slice(1).replace(/\/$/,"");if(!/^\d{4}-\d{4}-\d{4}-\d{3}(\d|X)$/.test(n))throw new Error(`ORCIDs have the format "1234-1234-1234-1234", not "${n}"`);const r=n[n.length-1],o=(12-n.split("").slice(0,-1).filter(e=>/\d/.test(e)).map(Number).reduce((e,t)=>2*(e+t),0)%11)%11,s=10===o?"X":String(o);if(r!==s)throw new Error(`"${n}" has an invalid checksum.`);return t.href}(e.orcid)}catch(t){o("error",`"${e.orcid}" is not an ORCID. ${t.message}`),delete e.orcid}};if(e.formerEditors||(e.formerEditors=[]),e.editors){e.editors.forEach(r);for(let t=0;t<e.editors.length;t++){const n=e.editors[t];"retiredDate"in n&&(e.formerEditors.push(n),e.editors.splice(t--,1))}}e.editors&&0!==e.editors.length||o("error","At least one editor is required"),e.formerEditors.length&&e.formerEditors.forEach(r),e.authors&&e.authors.forEach(r),e.multipleEditors=e.editors&&e.editors.length>1,e.multipleFormerEditors=e.formerEditors.length>1,e.multipleAuthors=e.authors&&e.authors.length>1,(e.alternateFormats||[]).forEach(e=>{e.uri&&e.label||o("error","All alternate formats must have a uri and a label.")}),e.copyrightStart&&e.copyrightStart==e.publishYear&&(e.copyrightStart=""),e.longStatus=Xo[e.specStatus],e.textStatus=Jo[e.specStatus],Ko[e.specStatus]&&(e.rdfStatus=Ko[e.specStatus]),e.showThisVersion=!e.isNoTrack||e.isTagFinding,e.showPreviousVersion="FPWD"!==e.specStatus&&"FPLC"!==e.specStatus&&"ED"!==e.specStatus&&!e.isNoTrack&&!e.isSubmission,e.specStatus.endsWith("NOTE")&&!e.prevVersion&&(e.showPreviousVersion=!1),e.isTagFinding&&(e.showPreviousVersion=!!e.previousPublishDate),e.notYetRec=e.isRecTrack&&"REC"!==e.specStatus,e.isRec=e.isRecTrack&&"REC"===e.specStatus,e.isRec&&!e.errata&&o("error","Recommendations must have an errata link."),e.prependW3C=!e.isUnofficial,e.isED="ED"===e.specStatus,e.isCR="CR"===e.specStatus,e.isPR="PR"===e.specStatus,e.isPER="PER"===e.specStatus,e.isMO="MO"===e.specStatus,e.isNote=["FPWD-NOTE","WG-NOTE"].includes(e.specStatus),e.isIGNote="IG-NOTE"===e.specStatus,e.dashDate=sn.format(e.publishDate),e.publishISODate=e.publishDate.toISOString(),e.shortISODate=sn.format(e.publishDate),e.hasOwnProperty("wgPatentURI")&&!Array.isArray(e.wgPatentURI)?Object.defineProperty(e,"wgId",{get(){const e=this.wgPatentURI.split("/"),t=e.findIndex(e=>"pp-impl"===e)+1;return e[t]||""}}):e.wgId=e.wgId?e.wgId:"";const s={get multipleAlternates(){return e.alternateFormats&&e.alternateFormats.length>1},get alternatesHTML(){return e.alternateFormats&&_n(e.alternateFormats,e=>{const t=e.hasOwnProperty("lang")&&e.lang?e.lang:null,n=e.hasOwnProperty("type")&&e.type?e.type:null;return en`<a
rel="alternate"
href="${e.uri}"
hreflang="${t}"
type="${n}"
>${e.label}</a
>`})}},i=(e.isCGBG?qo:Mo)(e,s);document.body.prepend(i),document.body.classList.add("h-entry");const a=document.getElementById("sotd")||document.createElement("section");const c=[e.wg,e.wgURI,e.wgPatentURI];if(c.some(e=>Array.isArray(e))&&!c.every(e=>Array.isArray(e))&&o("error","If one of '`wg`', '`wgURI`', or '`wgPatentURI`' is an array, they all have to be."),e.isCGBG&&!e.wg&&o("error","[`wg`](https://github.com/w3c/respec/wiki/wg) configuration option is required for this kind of document."),Array.isArray(e.wg)){e.multipleWGs=e.wg.length>1,e.wgHTML=_n(e.wg,(t,n)=>en`the <a href="${e.wgURI[n]}">${t}</a>`);const t=[];for(let n=0,r=e.wg.length;n<r;n++)t.push(en`a
<a href="${e.wgPatentURI[n]}" rel="disclosure"
>public list of any patent disclosures (${e.wg[n]})</a
>`);e.wgPatentHTML=_n(t)}else e.multipleWGs=!1,e.wg&&(e.wgHTML=en`the <a href="${e.wgURI}">${e.wg}</a>`);"PR"!==e.specStatus||e.crEnd||o("error",'`specStatus` is "PR" but no `crEnd` is specified (needed to indicate end of previous CR).'),"CR"!==e.specStatus||e.crEnd||o("error",'`specStatus` is "CR", but no `crEnd` is specified in Respec config.'),e.crEnd=is(e,"crEnd"),e.humanCREnd=Zo.format(e.crEnd),"PR"!==e.specStatus||e.prEnd||o("error",'`specStatus` is "PR" but no `prEnd` is specified.'),e.prEnd=is(e,"prEnd"),e.humanPREnd=Zo.format(e.prEnd),"PER"!==e.specStatus||e.perEnd||o("error","Status is PER but no perEnd is specified"),e.perEnd=is(e,"perEnd"),e.humanPEREnd=Zo.format(e.perEnd),e.recNotExpected=!(!e.noRecTrack&&!e.recNotExpected)||!e.isRecTrack&&"WD"==e.maturity&&"FPWD-NOTE"!==e.specStatus,e.noRecTrack&&es.includes(e.specStatus)&&o("error",`Document configured as [\`noRecTrack\`](https://github.com/w3c/respec/wiki/noRecTrack), but its status ("${e.specStatus}") puts it on the W3C Rec Track. Status cannot be any of: ${es.join(", ")}. [More info](https://github.com/w3c/respec/wiki/noRecTrack).`),e.isIGNote&&!e.charterDisclosureURI&&o("error","IG-NOTEs must link to charter's disclosure section using `charterDisclosureURI`."),a.classList.contains("override")||en.bind(a)`${function(e,t){const n={...as(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}[email protected]?subject=subscribe`}};return(e.isCGBG?Vo:Ho)(e,n)}(e,a)}`,!e.implementationReportURI&&e.isCR&&o("error","CR documents must have an [`implementationReportURI`](https://github.com/w3c/respec/wiki/implementationReportURI) that describes [implementation experience](https://www.w3.org/2019/Process-20190301/#implementation-experience)."),!e.implementationReportURI&&e.isPR&&o("warn","PR documents should include an [`implementationReportURI`](https://github.com/w3c/respec/wiki/implementationReportURI) that describes [implementation experience](https://www.w3.org/2019/Process-20190301/#implementation-experience)."),o("amend-user-config",{publishISODate:e.publishISODate,generatedSubtitle:`${e.longStatus} ${e.publishHumanDate}`})}});const ls=yn({en:{abstract:"Abstract"},ko:{abstract:"요약"},zh:{abstract:"摘要"},ja:{abstract:"要約"},nl:{abstract:"Samenvatting"},es:{abstract:"Resumen"},de:{abstract:"Zusammenfassung"}});var us=Object.freeze({__proto__:null,name:"w3c/abstract",run:async function(){const e=document.getElementById("abstract");if(!e)return void o("error",'Document must have one element with `id="abstract"');e.classList.add("introductory");let t=document.querySelector("#abstract>h2");t||(t=document.createElement("h2"),t.textContent=ls.abstract,e.prepend(t))}});var ds=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach(e=>{e.innerHTML=kn(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")})}});function ps(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 o=e.dataset.lt||"";e.dataset.lt=o.split("|").filter(e=>e.trim()).concat(t).join("|")}var fs=Object.freeze({__proto__:null,name:"core/dfn-abbr",run:function(){const e=document.querySelectorAll("[data-abbr]");for(const t of e){const{localName:e}=t;switch(e){case"dfn":ps(t);break;default:pn(t,`[\`data-abbr\`](https://github.com/w3c/respec/wiki/data-abbr) attribute not supported on \`${e}\` elements.`,"Error: unsupported.")}}}});const hs=/^[a-z]+(\s+[a-z]+)+$/,ms=/\B"([^"]*)"\B/,gs=/(\w+)\((.*)\)$/,bs=/^\[\[(\w+)\]\]$/,ys=/^((?:\[\[)?(?:\w+)(?:\]\])?)$/,ws=/^(\w+)\["([\w- ]*)"\]$/,vs=/\.?(\w+\(.*\)$)/;function ks(e){const{identifier:t,renderParent:n}=e;if(n)return en`<a data-xref-type="_IDL_" data-link-type="idl"
><code>${t}</code></a
>`}function xs(e){const{identifier:t,parent:n,renderParent:r}=e,{identifier:o}=n||{};return en`${n&&r?".":""}<a
data-xref-type="attribute"
data-link-for=${o}
data-xref-for=${o}
data-lt="${`[[${t}]]`}"
><code>[[${t}]]</code></a
>`}function $s(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:o}=t||{};return en`${r?".":""}<a
data-link-type="idl"
data-xref-type="attribute|dict-member"
data-link-for="${o}"
data-xref-for="${o}"
><code>${n}</code></a
>`}function _s(e){const{args:t,identifier:n,type:r,parent:o,renderParent:s}=e,{identifier:i}=o||{},a=$n(t,e=>en`<var>${e}</var>`),c=`${n}(${t.join(", ")})`;return en`${o&&s?".":""}<a
data-link-type="idl"
data-xref-type="${r}"
data-link-for="${i}"
data-xref-for="${i}"
data-lt="${c}"
><code>${n}</code></a
><code>(${a})</code>`}function Cs(e){const{identifier:t,enumValue:n,parent:r}=e,o=r?r.identifier:t;return en`"<a
data-link-type="idl"
data-xref-type="enum-value"
data-link-for="${o}"
data-xref-for="${o}"
data-lt="${n?null:"the-empty-string"}"
><code>${n}</code></a
>"`}function Ss(e){const{identifier:t}=e;return en`"<a
data-link-type="idl"
data-cite="WebIDL"
data-xref-type="exception"
><code>${t}</code></a
>"`}function Es(e){const{identifier:t}=e;return en`<a
data-link-type="idl"
data-cite="WebIDL"
data-xref-type="interface"
><code>${t}</code></a
>`}function Rs(e){let t;try{t=function(e){const[t,n]=e.split(vs),r=t.split(/[./]/).concat(n).filter(e=>e&&e.trim()).map(e=>e.trim()),o=!e.includes("/"),s=[];for(;r.length;){const t=r.pop();if(gs.test(t)){const[,e,n]=t.match(gs),r=n.split(/,\s*/).filter(e=>e);s.push({type:"method",identifier:e,args:r,renderParent:o})}else if(ws.test(t)){const[,e,n]=t.match(ws);s.push({type:"enum",identifier:e,enumValue:n,renderParent:o})}else if(ms.test(t)){const[,e]=t.match(ms);o?s.push({type:"exception",identifier:e}):s.push({type:"enum",enumValue:e,renderParent:o})}else if(bs.test(t)){const[,e]=t.match(bs);s.push({type:"internal-slot",identifier:e,renderParent:o})}else if(ys.test(t)&&r.length){const[,e]=t.match(ys);s.push({type:"attribute",identifier:e,renderParent:o})}else if(hs.test(t))s.push({type:"idl-primitive",identifier:t,renderParent:o});else{if(!ys.test(t)||0!==r.length)throw new SyntaxError(`IDL micro-syntax parsing error in \`{{ ${e} }}\``);s.push({type:"base",identifier:t,renderParent:o})}}return s.forEach((e,t,n)=>{e.parent=n[t+1]||null}),s.reverse()}(e)}catch(t){const n=en`<span>{{ ${e} }}</span>`;return fn(n,t.message,"Error: Invalid inline IDL string"),n}const n=en(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=ks(e);t&&r.push(t);break}case"attribute":r.push($s(e));break;case"internal-slot":r.push(xs(e));break;case"method":r.push(_s(e));break;case"enum":r.push(Cs(e));break;case"exception":r.push(Ss(e));break;case"idl-primitive":r.push(Es(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const As=new Set(["alias","reference"]),Ts=async function(){return await Xt.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"})}})}();const Ls={get ready(){return Ts},async find(e){return await this.isAlias(e)&&(e=await this.resolveAlias(e)),await this.get("reference",e)},async has(e,t){if(!As.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(!As.has(e))throw new TypeError("Invalid type: "+e);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t),o=await n.openCursor(r);return o?o.value:o},async addAll(e){if(!e)return;const t={alias:[],reference:[]};for(const n of Object.keys(e)){const r={id:n,...e[n]};r.aliasOf?t.alias.push(r):t.reference.push(r)}const n=[...As].flatMap(e=>t[e].map(t=>this.add(e,t)));await Promise.all(n)},async add(e,t){if(!As.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,r=await this.has(e,t.id),o=n.transaction(e,"readwrite").store;return r?await o.put(t):await o.add(t)},async close(){(await this.ready).close()},async clear(){const e=await this.ready,t=[...As],n=e.transaction(t,"readwrite"),r=t.map(e=>n.objectStore(e).clear());await Promise.all(r)}},Ps={},Is=new URL("https://specref.herokuapp.com/bibrefs?refs="),Ns=un({hint:"dns-prefetch",href:Is.origin});let Ds;document.head.appendChild(Ns);const js=new Promise(e=>{Ds=e});async function Os(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(Is.href+n.join(","))}catch(e){return console.error(e),null}if(!t.forceUpdate&&!r.ok||200!==r.status)return null;const o=await r.json();try{await Ls.addAll(o)}catch(e){console.error(e)}return o}async function zs(e){const t=await js;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await zs(n.aliasOf):n}var Us=Object.freeze({__proto__:null,biblio:Ps,name:"core/biblio",updateFromNetwork:Os,resolveRef:zs,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=Ps;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=await async function(e){const t=[];try{await Ls.ready;const n=e.map(async e=>({id:e,data:await Ls.find(e)}));t.push(...await Promise.all(n))}catch(n){t.push(...e.map(e=>({id:e,data:null}))),console.warn(n)}return t}(n),o={hasData:[],noData:[]};r.forEach(e=>{(e.data?o.hasData:o.noData).push(e)}),o.hasData.forEach(e=>{Ps[e.id]=e.data});const s=o.noData.map(e=>e.id);if(s.length){const e=await Os(s,{forceUpdate:!0});Object.assign(Ps,e)}Object.assign(Ps,this.conf.localBiblio),(()=>{Ds(this.conf.biblio)})()}},wireReference:Ys,stringifyReference:Ks});const Ws=yn({en:{info_references:"Informative references",norm_references:"Normative references",references:"References"},ko:{references:"참조"},nl:{info_references:"Informatieve referenties",norm_references:"Normatieve referenties",references:"Referenties"},es:{info_references:"Referencias informativas",norm_references:"Referencias normativas",references:"Referencias"},ja:{info_references:"参照用参考文献",norm_references:"規範的参考文献",references:"参考文献"},de:{info_references:"Weiterführende Informationen",norm_references:"Normen und Spezifikationen",references:"Referenzen"},zh:{info_references:"非规范性引用",norm_references:"规范性引用",references:"参考文献"}}),Ms=new Map([["CR","W3C Candidate Recommendation"],["ED","W3C Editor's Draft"],["FPWD","W3C First Public Working Draft"],["LCWD","W3C Last Call Working Draft"],["NOTE","W3C Note"],["PER","W3C Proposed Edited Recommendation"],["PR","W3C Proposed Recommendation"],["REC","W3C Recommendation"],["WD","W3C Working Draft"],["WG-NOTE","W3C Working Group Note"]]),Fs=Object.freeze({authors:[],date:"",href:"",publisher:"",status:"",title:"",etAl:!1}),qs=(Bs=".",e=>{const t=e.trim();return!t||t.endsWith(Bs)?t:t+Bs});var Bs;function Hs(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(Gs)),s=function(e){const t=new Map;for(const n of e)t.has(n.refcontent.id)||t.set(n.refcontent.id,n);return[...t.values()]}(n),i=s.concat(r).sort((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase())),a=en`<section>
<h3>${t}</h3>
<dl class="bibliography">
${i.map(Zs)}
</dl>
</section>`;Sn(a,"",t);return function(e,t){e.map(({ref:e,refcontent:n})=>{const r="#bib-"+e.toLowerCase(),o=t.get(n.id).map(e=>`a.bibref[href="#bib-${e.toLowerCase()}"]`).join(",");return{refUrl:r,elems:document.querySelectorAll(o),refcontent:n}}).forEach(({refUrl:e,elems:t,refcontent:n})=>{t.forEach(t=>{t.setAttribute("href",e),t.setAttribute("title",n.title),t.dataset.linkType="biblio"})})}(s,function(e){return e.reduce((e,t)=>{const n=t.refcontent.id;return(e.has(n)?e.get(n):e.set(n,[]).get(n)).push(t.ref),e},new Map)}(n)),function(e){e.forEach(({ref:e})=>{const t=[...document.querySelectorAll(`a.bibref[href="#bib-${e.toLowerCase()}"]`)].filter(({textContent:t})=>t.toLowerCase()===e.toLowerCase());o("error",`Bad reference: [\`${e}\`] (appears ${t.length} times)`),console.warn("Bad references: ",t)})}(r),a}function Gs(e){let t=Ps[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;o("error",`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`)}else n=t.aliasOf,t=Ps[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function Vs(e,t){const n=e.replace(/^(!|\?)/,""),r="#bib-"+n.toLowerCase(),o=en`<cite
><a class="bibref" href="${r}" data-link-type="biblio">${t||n}</a></cite
>`;return t?o:en`[${o}]`}function Zs({ref:e,refcontent:t}){const n="bib-"+e.toLowerCase();return t?en`
<dt id="${n}">[${e}]</dt>
<dd>${{html:Ks(t)}}</dd>
`:en`
<dt id="${n}">[${e}]</dt>
<dd><em class="respec-offending-element">Reference not found.</em></dd>
`}function Ys(e,t="_blank"){if("object"!=typeof e)throw new TypeError("Only modern object references are allowed");const n=Object.assign({},Fs,e),r=n.authors.join("; ")+(n.etAl?" et al":""),o=Ms.get(n.status)||n.status;return en.wire(n)`
<cite>
<a
href="${n.href}"
target="${t}"
rel="noopener noreferrer">
${n.title.trim()}</a>.
</cite>
<span class="authors">
${qs(r)}
</span>
<span class="publisher">
${qs(n.publisher)}
</span>
<span class="pubDate">
${qs(n.date)}
</span>
<span class="pubStatus">
${qs(o)}
</span>
`}function Ks(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} ${qs(e.publisher)} `),e.date&&(t+=e.date+". "),e.status&&(t+=(Ms.get(e.status)||e.status)+". "),e.href&&(t+=`URL: <a href="${e.href}">${e.href}</a>`),t}var Js=Object.freeze({__proto__:null,name:"core/render-biblio",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")||en`<section id="references"></section>`;if(document.querySelector("section#references > h2")||r.prepend(en`<h2>${Ws.references}</h2>`),r.classList.add("appendix"),n.length){const e=Hs(n,Ws.norm_references);r.appendChild(e)}if(t.length){const e=Hs(t,Ws.info_references);r.appendChild(e)}document.body.appendChild(r)},renderInlineCitation:Vs,wireReference:Ys,stringifyReference:Ks});const Xs={},Qs=yn({en:{rfc2119Keywords:()=>new RegExp(["\\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"].join("|"))},de:{rfc2119Keywords:()=>new RegExp(["\\bMUSS\\b","\\bERFORDERLICH\\b","\\b(?:NICHT\\s+)?NÖTIG\\b","\\bDARF(?:\\s+NICHT)?\\b","\\bVERBOTEN\\b","\\bSOLL(?:\\s+NICHT)?\\b","\\b(?:NICHT\\s+)?EMPFOHLEN\\b","\\bKANN\\b","\\bOPTIONAL\\b"].join("|"))}}),ei=/(?:`[^`]+`)(?!`)/,ti=/(?:{{[^}]+}})/,ni=/\B\|\w[\w\s]*(?:\s*:[\w\s&;<>]+)?\|\B/,ri=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,oi=/(?:\[\[\[(?:!|\\|\?)?#?[\w-.]+\]\]\])/,si=/(?:\[=[^=]+=\])/,ii=/(?:\[\^[^^]+\^\])/;function ai(e){const t=e.slice(2,-2).trim(),[n,r]=t.split("/",2).map(e=>e&&e.trim()),[o,s,i]=r?["element-attr",n,r]:["element",null,n];return en`<code
><a data-xref-type="${o}" data-xref-for="${s}"
>${i}</a
></code
>`}function ci(e){const t=bn(e),n=en`<em class="rfc2119">${t}</em>`;return Xs[t]=!0,n}function li(e){const t=e.slice(3,-3).trim();if(!t.startsWith("#"))return en`<a data-cite="${t}"></a>`;if(document.querySelector(t))return en`<a href="${t}"></a>`;const n=en`<span>${e}</span>`;return fn(n,`Wasn't able to expand ${e} as it didn't match any id in the document.`,`Please make sure there is element with id ${t} in the document.`),n}function ui(e){const t=e.slice(2,-2).trim();return t.startsWith("\\")?e.replace("\\",""):Rs(bn(t))}function di(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(bn),{type:i,illegal:a}=An(o,t.parentNode),c=Vs(o,s),l=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){pn(c.childNodes[1]||c,`Normative references in informative sections are not allowed. 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 pi(e,t,n){return"ABBR"===t.parentElement.tagName?e:en`<abbr title="${n.get(e)}">${e}</abbr>`}function fi(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map(e=>e.trim());return en`<var data-type="${r}">${n}</var>`}function hi(e){const t=function(e,t=1/0){return e.replace("\\/","%%").split("/",t).map(e=>e&&e.trim().replace("%%","/"))}(e=e.slice(2,-2),2),[n,r]=2===t.length?t:[null,t[0]],[o,s]=r.includes("|")?r.split("|",2).map(e=>e.trim()):[null,r],i=function e(t){if(ei.test(t))return t.split(/(`[^`]+`)(?!`)/).map(t=>t.startsWith("`")?mi(t):e(t));return document.createTextNode(t)}(s),a=n?bn(n):null;return en`<a
data-link-type="dfn"
data-link-for="${a}"
data-xref-for="${a}"
data-lt="${o}"
>${i}</a
>`}function mi(e){const t=e.slice(1,-1);return en`<code>${t}</code>`}var gi=Object.freeze({__proto__:null,name:"core/inlines",rfc2119Usage:Xs,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new In,e.informativeReferences=new In,e.respecRFC2119||(e.respecRFC2119=Xs);const n=document.querySelectorAll("abbr[title]");for(const e of n)t.set(e.textContent,e.title);const r=[...t.keys()],o=r.length?`(?:\\b${r.join("\\b)|(?:\\b")}\\b)`:null,s=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),o=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,e=>n.wsNodes||e.data.trim()?r&&e.parentElement.closest(r)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT),s=[];let i;for(;i=o.nextNode();)s.push(i);return s}(document.body,["#respec-ui",".head","pre"],{wsNodes:!1}),i=Qs.rfc2119Keywords(),a=new RegExp(`(${[i.source,ti.source,ni.source,ri.source,oi.source,si.source,ei.source,ii.source,...o?[o]:[]].join("|")})`);for(const n of s){const r=n.data.split(a);if(1===r.length)continue;const o=document.createDocumentFragment();let s=!0;for(const a of r)if(s=!s,s)if(a.startsWith("{{")){const e=ui(a);o.append(e)}else if(a.startsWith("[[[")){const e=li(a);o.append(e)}else if(a.startsWith("[[")){const t=di(a,n,e);o.append(...t)}else if(a.startsWith("|")){const e=fi(a);o.append(e)}else if(a.startsWith("[=")){const e=hi(a);o.append(e)}else if(a.startsWith("`")){const e=mi(a);o.append(e)}else if(a.startsWith("[^")){const e=ai(a);o.append(e)}else if(t.has(a)){const e=pi(a,n,t);o.append(e)}else{if(!i.test(a))throw new Error(`Found token '${a}' but it does not correspond to anything`);{const e=ci(a);o.append(e)}}else o.append(a);n.replaceWith(o)}}});const bi=yn({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)=>en`<p>
The key word${t?"s":""} ${e} in this document
${t?"are":"is"} to be interpreted as described in
<a href="https://tools.ietf.org/html/bcp14">BCP 14</a>
${Vs("RFC2119")} ${Vs("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)=>en`<p>
${t?"Die Schlüsselwörter":"Das Schlüsselwort"} ${e} in
diesem Dokument ${t?"sind":"ist"} gemäß
<a href="https://tools.ietf.org/html/bcp14">BCP 14</a>
${Vs("RFC2119")} ${Vs("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 yi=Object.freeze({__proto__:null,name:"w3c/conformance",run:function(e){const t=document.querySelector("section#conformance");t&&!t.classList.contains("override")&&function(e,t){const n=[...Object.keys(Xs)];n.length&&(t.normativeReferences.add("RFC2119"),t.normativeReferences.add("RFC8174"));const r=_n(n.sort(),e=>en`<em class="rfc2119">${e}</em>`),o=n.length>1,s=en`
<h2>${bi.conformance}</h2>
<p>
${bi.normativity}
</p>
${n.length?bi.keywordInterpretation(r,o):null}
`;e.prepend(...s.childNodes)}(t,e),!t&&Object.keys(Xs).length}});const wi=new On;function vi(e,t){for(const n of t)wi.has(n)||wi.set(n,new Set),wi.get(n).add(e)}var ki=Object.freeze({__proto__:null,name:"core/dfn",run:function(){document.querySelectorAll("dfn").forEach(e=>{const t=En(e);vi(e,t),!e.dataset.dfnType&&/^\[\[\w+\]\]$/.test(t[0])&&(e.dataset.dfnType="idl"),1===t.length&&t[0]===bn(e.textContent)||(e.dataset.lt=t.join("|"))})}});var xi=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=bn(t.textContent).toLowerCase();e.add(n),t.dataset.lt&&e.add(t.dataset.lt)});const t=new Set;return document.querySelectorAll("dfn:not([data-lt-noDefault])").forEach(e=>{const n=bn(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=bn(n).toLowerCase(),o=nn.isSingular(r)?nn.plural(r):nn.singular(r);return e.has(o)&&!t.has(o)?o:""}}();document.querySelectorAll("dfn:not([data-lt-no-plural]):not([data-lt-noDefault])").forEach(e=>{const n=[e.textContent];e.dataset.lt&&n.push(...e.dataset.lt.split("|")),e.dataset.localLt&&n.push(...e.dataset.localLt.split("|"));const r=new Set(n.map(t).filter(e=>e));if(r.size){const t=e.dataset.plurals?e.dataset.plurals.split("|"):[],n=[...new Set([...t,...r])];e.dataset.plurals=n.join("|"),vi(e,n)}})}});const $i=yn({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"}}),_i=async function(){try{return(await Promise.resolve().then((function(){return Nl}))).default}catch{return qn("examples.css")}}();function Ci(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?" "+t:"",o=n.title?en`<span class="example-title">: ${n.title}</span>`:"";return en`<div class="marker">
<a class="self-link">${$i.example}<bdi>${r}</bdi></a
>${o}
</div>`}var Si=Object.freeze({__proto__:null,name:"core/examples",run:async function(){const e=document.querySelectorAll("pre.example, pre.illegal-example, aside.example");if(!e.length)return;const t=await _i;document.head.insertBefore(en`<style>
${t}
</style>`,document.querySelector("link"));let n=0;e.forEach(e=>{const t=e.classList.contains("illegal-example"),r={number:n,illegal:t},{title:s}=e;if("aside"===e.localName){++n;const t=Ci(e,n,r);e.prepend(t),s?Sn(e,"example-"+n,s):Sn(e,"example",String(n));const{id:i}=e;t.querySelector("a.self-link").href="#"+i,o("example",r)}else{const t=!!e.closest("aside");t||++n,r.content=e.innerHTML,e.classList.remove("example","illegal-example");const i=e.id?e.id:null;i&&e.removeAttribute("id");const a=Ci(e,t?0:n,r),c=en`<div class="example" id="${i}">
${a} ${e.cloneNode(!0)}
</div>`;s&&Sn(c,"example-"+n,s),Sn(c,"example",String(n));c.querySelector("a.self-link").href="#"+c.id,e.replaceWith(c),t||o("example",r)}})}});const Ei=async function(){try{return(await Promise.resolve().then((function(){return Dl}))).default}catch{return qn("issues-notes.css")}}();const Ri=yn({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 Ai(e,t,n){const r=function(){if(document.querySelector(".issue[data-number]"))return e=>{if(e.dataset.number)return Number(e.dataset.number)};let e=0;return t=>{if(t.classList.contains("issue")&&"span"!==t.localName)return++e}}(),s=document.createElement("ul");e.forEach(e=>{const{type:i,displayType:a,isFeatureAtRisk:c}=function(e){const t=e.classList.contains("issue"),n=e.classList.contains("warning"),r=e.classList.contains("ednote"),o=e.classList.contains("atrisk"),s=t?"issue":n?"warning":r?"ednote":"note",i=t?o?Ri.feature_at_risk:Ri.issue:n?Ri.warning:r?Ri.editors_note:Ri.note;return{type:s,displayType:i,isFeatureAtRisk:o}}(e),l="issue"===i,u="span"===e.localName,{number:d}=e.dataset,p={type:i,inline:u,title:e.title,number:r(e)};if(!u){const r=en`<div class="${c?i+" atrisk":i}" role="${"note"===i?"note":null}"></div>`,u=document.createElement("span"),f=en`<div role="heading" class="${i+"-title marker"}">${u}</div>`;Sn(f,"h",i);let h,m=a;if(e.id?(r.id=e.id,e.removeAttribute("id")):Sn(r,"issue-container",p.number?"number-"+p.number:""),l){if(void 0!==p.number&&(m+=" "+p.number),e.dataset.hasOwnProperty("number")){const e=function(e,t,{isFeatureAtRisk:n=!1}={}){if(!n&&t.issueBase)return en`<a href="${t.issueBase+e}" />`;if(n&&t.atRiskBase)return en`<a href="${t.atRiskBase+e}" />`}(d,n,{isFeatureAtRisk:c});e&&(u.before(e),e.append(u)),u.classList.add("issue-number"),h=t.get(d),h||o("warning","Failed to fetch issue number "+d),h&&!p.title&&(p.title=h.title)}void 0!==p.number&&s.append(function(e,t,n){const r=`${e} ${t.number}`,o=t.title?en`<span style="text-transform: none">: ${t.title}</span>`:"";return en`<li><a href="${"#"+n}">${r}</a>${o}</li>`}(Ri.issue,p,r.id))}if(u.textContent=m,p.title){e.removeAttribute("title");const{repoURL:t=""}=n.github||{},o=h?h.labels:[];h&&"CLOSED"===h.state&&r.classList.add("closed"),f.append(function(e,t,n){const r=e.map(e=>function(e,t){const{color:n,name:r}=e,o=new URL("./issues/",t);o.searchParams.set("q",`is:issue is:open label:"${e.name}"`);const s=(i=n,parseInt(i,16)>8388607.5?"#000":"#fff");var i;return en`<a
class="respec-gh-label"
style="${`background-color: #${n}; color: ${s}`}"
href="${o.href}"
>${r}</a
>`}(e,n)),o=e.map(e=>e.name),s=gn(o);r.length&&r.unshift(document.createTextNode(" "));if(o.length){return en`<span class="issue-label" aria-label="${`This issue is labelled as ${s}.`}"
>: ${t}${r}</span
>`}return en`<span class="issue-label">: ${t}${r}</span>`}(o,p.title,t))}let g=e;e.replaceWith(r),g.classList.remove(i),g.removeAttribute("data-number"),h&&!g.innerHTML.trim()&&(g=document.createRange().createContextualFragment(h.bodyHTML)),r.append(f,g);const b=Ln(f,"section").length+2;f.setAttribute("aria-level",b)}o(p.type,p)}),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(en`<p>${Ri.no_issues_in_spec}</p>`),(!n||n&&n!==t.firstElementChild)&&t.insertAdjacentHTML("afterbegin",`<h2>${Ri.issue_summary}</h2>`)}(s)}var Ti=Object.freeze({__proto__:null,name:"core/issues-notes",run:async function(e){const t=document.querySelectorAll(".issue, .note, .warning, .ednote");if(!t.length)return;const n=await async function(e){if(!e||!e.apiBase)return new Map;const t=[...document.querySelectorAll(".issue[data-number]")].map(e=>Number.parseInt(e.dataset.number,10)).filter(e=>e);if(!t.length)return new Map;const n=new URL("issues",`${e.apiBase}/${e.fullName}/`);n.searchParams.set("issues",t.join(","));const r=await fetch(n.href);if(!r.ok)return o("error",`Error fetching issues from GitHub. (HTTP Status ${r.status}).`),new Map;const s=await r.json();return new Map(Object.entries(s))}(e.github),r=await Ei,{head:s}=document;s.insertBefore(en`<style>
${r}
</style>`,s.querySelector("link")),Ai(t,n,e),document.querySelectorAll(".ednote").forEach(e=>{e.classList.remove("ednote"),e.classList.add("note")})}});const Li={en:{best_practice:"Best Practice "},ja:{best_practice:"最良実施例 "},de:{best_practice:"Musterbeispiel "},zh:{best_practice:"最佳实践 "}},Pi=yn(Li),Ii=g in Li?g:"en";var Ni=Object.freeze({__proto__:null,name:"core/best-practices",run:function(){const e=document.querySelectorAll(".practicelab"),t=document.getElementById("bp-summary"),n=t?document.createElement("ul"):null;[...e].forEach((e,t)=>{const r=Sn(e,"bp"),o=en`<a class="marker self-link" href="${"#"+r}"
><bdi lang="${Ii}">${Pi.best_practice}${t+1}</bdi></a
>`;if(n){const t=en`
<li>
${o}: ${Nn(e)}
</li>
`;n.appendChild(t)}const s=e.closest("div");if(!s)return void e.classList.add("advisement");s.classList.add("advisement");const i=en`${o.cloneNode(!0)}: ${e}`;s.prepend(...i.childNodes)}),e.length?t&&(t.appendChild(en`<h2>Best Practices Summary</h2>`),t.appendChild(n)):t&&(o("warn","Using best practices summary (#bp-summary) but no best practices found."),t.remove())}});const Di=yn({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 ji=Object.freeze({__proto__:null,name:"core/figures",run:function(){document.querySelectorAll(":not(picture)>img:not([width]):not([height]):not([srcset])").forEach(e=>{0!==e.naturalHeight&&0!==e.naturalWidth&&(e.height=e.naturalHeight,e.width=e.naturalWidth)});const e=function(){const e=[];return document.querySelectorAll("figure").forEach((t,n)=>{const r=t.querySelector("figcaption");r?(!function(e,t,n){const r=t.textContent;Sn(e,"fig",r),Tn(t,en`<span class="fig-title"></span>`),t.prepend(Di.fig,en`<bdi class="figno">${n+1}</bdi>`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach(e=>{Rn(e,"span").removeAttribute("href")}),en`<li class="tofline">
<a class="tocxref" href="${"#"+e}">${n.childNodes}</a>
</li>`}(t.id,r))):pn(t,"Found a `<figure>` without a `<figcaption>`")}),e}(),t=document.getElementById("tof");e.length&&t&&(!function(e){if(e.classList.contains("appendix")||e.classList.contains("introductory")||e.closest("section"))return;const t=function(e){const t=[];for(const n of function*(e){let t=e;for(;t.previousElementSibling;)t=t.previousElementSibling,yield t}(e))"section"===n.localName&&t.push(n);return t}(e);t.every(e=>e.classList.contains("introductory"))?e.classList.add("introductory"):t.some(e=>e.classList.contains("appendix"))&&e.classList.add("appendix")}(t),t.append(en`<h2>${Di.list_of_figures}</h2>`,en`<ul class="tof">
${e}
</ul>`))}});const Oi=new Set(["callback interface","callback","dictionary","enum","interface mixin","interface","typedef"]);function zi(e,t,{parent:n=""}={}){switch(e.type){case"constructor":case"operation":return function(e,t,n){if(n.includes("!overload"))return Ui(e,t,n);return Ui(e,t,n+"()",n)}(e,n,t);default:return Ui(e,n,t)}}function Ui(e,t,...n){const{type:r}=e;for(const e of n){let n="enum-value"===r&&""===e?"the-empty-string":e,o=Mi(n,t,e,r);if(0===o.length&&""!==t){n=`${t}.${n}`;const e=wi.get(n);e&&1===e.size&&(o=[...e],vi(o[0],[n]))}else n=e;if(o.length>1){fn(o,`WebIDL identifier \`${e}\` ${t?`for \`${t}\``:""} is defined multiple times`,"Duplicate definition.")}if(o.length)return o[0]}}function Wi(e,t,n,r){if(!e.id){const t=n.toLowerCase(),o=t?t+"-":"";let s=r.toLowerCase().replace(/[()]/g,"").replace(/\s/g,"-");""===s&&(s="the-empty-string"),e.id=`dom-${o}${s}`}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=Fi(t)}switch(e.querySelector("code")||e.closest("code")||!e.children||Tn(e,e.ownerDocument.createElement("code")),t.type){case"attribute":case"constructor":case"operation":!function(e,t){const{local:n,exportable:r}=t,o=e.dataset.lt?new Set(e.dataset.lt.split("|")):new Set;for(const e of r)o.add(e);n.filter(e=>o.has(e)).forEach(e=>o.delete(e)),e.dataset.lt=[...o].join("|"),e.dataset.localLt=n.join("|"),vi(e,[...n,...r])}(e,function(e,t,n){const{type:r}=e,o=`${t}.${n}`;switch(r){case"constructor":case"operation":return{local:[o,o+"()",n],exportable:[n+"()",...function(e,t){const n=[];if(0===t.length)return n;const r=[],o=[];for(const{name:e,optional:n,variadic:s}of t)n||s?o.push(e):r.push(e);const s=r.join(", "),i=`${e}(${s})`;n.push(i);const a=o.map((t,n)=>{const r=o.slice(0,n+1).join(", ");return`${e}(${s}${r?", "+r:""})`});return n.push(...a),n}(n,e.arguments)]};case"attribute":return{local:[o],exportable:[n]}}}(t,n,r))}return e}function Mi(e,t,n,r){const o=wi.get(e);if(!o||0===o.size)return[];const s=[...o],i=s.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===s.length)return s[0].textContent===n?s:[];if(Oi.has(r)&&s.length){const e=s.find(e=>e.textContent.trim()===n);if(e)return[e]}return i}function Fi(e){const{idlType:t,generic:n,union:r}=e;return"string"==typeof t?t:n||(r?t.map(Fi).join("|"):Fi(t))}const qi=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 Bi(e){const t=e.closest("pre.idl").cloneNode(!0);t.querySelector(".idlHeader").remove();const{textContent:n}=t,r=qi.cloneNode(!0);r.addEventListener("click",()=>{navigator.clipboard.writeText(n)}),e.append(r)}var Hi=Object.freeze({__proto__:null,name:"core/webidl-clipboard",addCopyIDLButton:Bi});const Gi={},Vi={},Zi={wrap:e=>e.flat().filter(e=>""!==e).map(e=>"string"==typeof e?new Text(e):e),trivia:e=>e.trim()?en`<span class="idlSectionComment">${e}</span>`:e,generic:e=>/^[A-Z]/.test(e)?en`<a data-xref-type="interface" data-cite="WebIDL">${e}</a>`:en`<a data-xref-type="dfn" data-cite="WebIDL">${e}</a>`,reference(e,t,n){if("extended-attribute"===n.type&&"Exposed"!==n.name)return e;let r,o="_IDL_",s=null;switch(t){case"Window":o="interface",s="HTML";break;case"object":o="interface",s="WebIDL";break;default:t.includes("Worker")&&"extended-attribute"===n.type&&(r=t+"GlobalScope",o="interface",s=["Worker","DedicatedWorker","SharedWorker"].includes(t)?"HTML":null)}return en`<a data-xref-type="${o}" data-cite="${s}" data-lt="${r}"
>${e}</a
>`},name(e,{data:t,parent:n}){if(t.idlType&&"argument-type"===t.idlType.type)return en`<span class="idlParamName">${e}</span>`;const r=Yi(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"constructor":return Yi(e,t,n);default:return e}},type:e=>en`<span class="idlType">${e}</span>`,inheritance:e=>en`<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 en`<span class="${r}">${e}</span>`}const o=n?n.name:"",{name:s,idlId:i}=Ji(t,o);return en`<span
class="${r}"
id="${i}"
data-idl
data-title="${s}"
>${e}</span
>`},extendedAttribute:e=>en`<span class="extAttr">${e}</span>`,extendedAttributeReference:e=>en`<a data-xref-type="extended-attribute">${e}</a>`};function Yi(e,t,n){const r=n?n.name:"",{name:o}=Ji(t,r),s=zi(t,o,{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(s){t.partial||(s.dataset.export="",s.dataset.dfnType=i),Wi(s,t,r,o);const n="#"+s.id;return en`<a
data-link-for="${r}"
data-link-type="${i}"
href="${n}"
class="internalDFN"
><code>${e}</code></a
>`}if("operation"===t.type&&"toJSON"===t.name&&t.extAttrs.some(({name:e})=>"Default"===e))return en`<a data-link-type="dfn" data-lt="default toJSON steps"
>${e}</a
>`;if(!t.partial){const n=en`<dfn data-export data-dfn-type="${i}"
>${e}</dfn
>`;return vi(n,[o]),Wi(n,t,r,o),n}const a=en`<a
data-idl="${t.partial?"partial":null}"
data-link-type="${i}"
data-title="${t.name}"
data-xref-type="${i}"
>${e}</a
>`;if(o&&"typedef"!==t.type&&!(t.partial&&!s)){pn(a,`Missing \`<dfn>\` for${r?` \`${r}\`'s`:""} \`${"operation"===t.type?o+"()":o}\` ${t.type}. [More info](https://github.com/w3c/respec/wiki/WebIDL-thing-is-not-defined).`,"")}return a}const Ki=new WeakMap;function Ji(e,t=""){if(Ki.has(e))return Ki.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;default:return e.name||e.type}}(e),r=function(e,t){if(!t)return"idl-def-"+e.toLowerCase();return`idl-def-${t.toLowerCase()}-${e.toLowerCase()}`}(n,t);switch(e.type){case"callback interface":case"dictionary":case"interface":case"interface mixin":r+=function(e){if(!e.partial)return"";Vi[e.name]||(Vi[e.name]=0);return Vi[e.name]+=1,"-partial-"+Vi[e.name]}(e);break;case"constructor":case"operation":{const o=function(e,t){const n=`${t}.${e}`,r=n+"()";let o;Gi[r]||(Gi[r]=0);Gi[n]?o="!overload-"+Gi[n]:Gi[n]=0;return Gi[r]+=1,Gi[n]+=1,o||""}(n,t);o?(n+=o,r+=o):e.arguments.length&&(r+=e.arguments.map(e=>"-"+e.name.toLowerCase()).join(""));break}}return{name:n,idlId:r}}(e,t);return Ki.set(e,n),n}function Xi(e,t){let n;try{n=Qt.parse(e.textContent,{sourceName:String(t)})}catch(t){return fn(e,`Failed to parse WebIDL: ${t.bareMessage}.`,t.bareMessage,{details:`<pre>${t.context}</pre>`}),[]}e.classList.add("def","idl");const r=Qt.write(n,{templates:Zi});en.bind(e)`${r}`,e.querySelectorAll("[data-idl]").forEach(e=>{if(e.dataset.dfnFor)return;const t=e.dataset.title,n=e.parentElement.closest("[data-idl][data-title]");n&&(e.dataset.dfnFor=n.dataset.title),"dfn"===e.localName&&vi(e,[t])});const o=e.closest("[data-cite], body"),{dataset:s}=o;if(s.cite||(s.cite="WebIDL"),!/\bwebidl\b/i.test(s.cite)){const e=s.cite.trim().split(/\s+/);s.cite=["WebIDL",...e].join(" ")}return Qi(e),n}function Qi(e){Cn(e,"webidl");const t=en`<span class="idlHeader"
><a class="self-link" href="${"#"+e.id}">WebIDL</a></span
>`;e.prepend(t),Bi(t)}const ea=async function(){try{return(await Promise.resolve().then((function(){return jl}))).default}catch{return qn("webidl.css")}}();var ta=Object.freeze({__proto__:null,name:"core/webidl",addIDLHeader:Qi,run:async function(){const e=document.querySelectorAll("pre.idl, pre.webidl");if(!e.length)return;if(!document.querySelector(".idl:not(pre), .webidl:not(pre)")){const e=document.querySelector("head link");if(e){const t=document.createElement("style");t.textContent=await ea,e.before(t)}}const t=[...e].map(Xi),n=Qt.validate(t);for(const r of n){let n=`<pre>${r.context}</pre>`;if(r.autofix){r.autofix();const e=Qt.write(t[r.sourceName]);n+=`Try fixing as:\n <pre>${e.replace(/&/g,"&").replace(/>/g,">").replace(/"/g,""").replace(/</g,"<")}</pre>`}fn(e[r.sourceName],"WebIDL validation error: "+r.bareMessage,r.bareMessage,{details:n})}document.normalize()}});async function na(e){const{key:t,frag:n,path:r}=e;let o="",s="";if("__SPEC__"===t)o=document.location.href;else{const e=await zs(t);if(!e)return null;o=e.href,s=e.title}if(r){const e=r.startsWith("/")?"."+r:r;o=new URL(e,o).href}return n&&(o=new URL(n,o).href),{href:o,title:s}}function ra(e,t,n){const{href:r,title:o}=t,s=!n.path&&!n.frag;if("a"!==e.localName){if("dfn"===e.localName){const t=document.createElement("a");if(t.href=r,e.textContent?Tn(e,t):(t.textContent=o,e.append(t)),s){const n=document.createElement("cite");n.append(t),e.append(n)}"export"in e.dataset&&(fn(e,"Exporting an linked external definition is not allowed. Please remove the `data-export` attribute","Please remove the `data-export` attribute."),delete e.dataset.export),e.dataset.noExport=""}}else{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=o),t.href=r,s){const e=document.createElement("cite");t.replaceWith(e),e.append(t)}}}function oa(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const sa=oa("#"),ia=oa("/");function aa(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:o}=t;if(n.startsWith("#")&&!r){const r=e.parentElement.closest('[data-cite]:not([data-cite^="#"])'),{key:o,isNormative:s}=r?aa(r):{key:"__SPEC__",isNormative:!1};return t.cite=s?o:"?"+o,t.citeFrag=n.replace("#",""),aa(e)}const s=r?"#"+r:sa(n),i=o||ia(n).split("#")[0],{type:a}=An(n,e),c="normative"===a,l=/^[?|!]/.test(n);return{key:n.split(/[/|#]/)[0].substring(Number(l)),isNormative:c,frag:s,path:i}}function ca(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 la=Object.freeze({__proto__:null,name:"core/data-cite",THIS_SPEC:"__SPEC__",toCiteDetails:aa,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(aa).map(async e=>({entry:e,result:await zs(e.key)})),n=(await Promise.all(t)).filter(({result:e})=>null===e).map(({entry:{key:e}})=>e),r=await Os(n);r&&Object.assign(Ps,r)}([...e]);for(const t of e){const e=t.dataset.cite,n=aa(t),r=await na(n);r?ra(t,r,n):pn(t,`Couldn't find a match for "${e}"`)}s("beforesave",ca)}});const ua=[],da=yn({en:{duplicateMsg:e=>`Duplicate definition(s) of '${e}'`,duplicateTitle:"This is defined more than once in the document."},ja:{duplicateMsg:e=>`'${e}' の重複定義`,duplicateTitle:"この文書内で複数回定義されています."},de:{duplicateMsg:e=>`Mehrfache Definition von '${e}'`,duplicateTitle:"Das Dokument enthält mehrere Definitionen dieses Eintrags."},zh:{duplicateMsg:e=>`'${e}' 的重复定义`,duplicateTitle:"在文档中有重复的定义。"}});function pa(e){const t=new Map,n=[];for(const r of wi.get(e)){const{dfnFor:o="",dfnType:s="dfn"}=r.dataset;if(t.has(o)&&t.get(o).has(s)){const e=t.get(o).get(s),i="dfn"===e.localName,a="dfn"===r.localName,c=s===(e.dataset.dfnType||"dfn"),l=o===(e.dataset.dfnFor||"");if(i&&a&&c&&l){n.push(r);continue}}const i="idl"in r.dataset||"dfn"!==s?"idl":"dfn";t.has(o)||t.set(o,new Map),t.get(o).set(i,r),Sn(r,"dfn",e)}return{result:t,duplicates:n}}function fa(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor:"";return En(e).reduce((e,r)=>{const o=r.split(".");return 2===o.length&&e.push({for:o[0],title:o[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r}),e},[])}(e).find(e=>t.has(e.title)&&t.get(e.title).has(e.for));if(!n)return;const r=t.get(n.title).get(n.for),{linkType:o}=e.dataset;if(o){const e="dfn"===o?"dfn":"idl";return r.get(e)||r.get("dfn")}{const e=n.for?"idl":"dfn";return r.get(e)||r.get("idl")}}function ha(e,t,n){let r=!1;const{linkFor:o}=e.dataset,{dfnFor:s}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(o&&!n.get(o)&&o!==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"),o=ma(e)||ma(t,n);r&&!o||Tn(e,document.createElement("code"))}(e,t),!r}function ma(e,t=""){switch(e.localName){case"a":if(e.querySelector("code"))return!0;break;default:{const{dataset:n}=e;if(e.textContent.trim()===t)return!0;if(n.title===t)return!0;if(n.lt||n.localLt){const e=[];return n.lt&&e.push(...n.lt.split("|")),n.localLt&&e.push(...n.localLt.split("|")),e.includes(t)}}}return!1}function ga(e){e.forEach(e=>{pn(e,`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,"Linking error: not matching `<dfn>`")})}var ba=Object.freeze({__proto__:null,name:"core/link-to-dfn",possibleExternalLinks:ua,run:async function(e){const t=function(){const e=new On;for(const t of wi.keys()){const{result:n,duplicates:r}=pa(t);e.set(t,n),r.length>0&&fn(r,da.duplicateMsg(t),da.duplicateTitle)}return e}(),n=[],r=document.querySelectorAll("a[data-cite=''], a:not([href]):not([data-cite]):not(.logo):not(.externalDFN)");for(const e of r){const r=fa(e,t);if(r){ha(e,r,t)||ua.push(e)}else""===e.dataset.cite?n.push(e):ua.push(e)}ga(n),function(e){const t=new RegExp(String.raw`\b${(e.shortName||"").toLowerCase()}([^-])\b`,"i"),n=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");for(const r of n){r.dataset.cite=r.dataset.cite.replace(t,"__SPEC__$1");const{key:n,isNormative:o}=aa(r);"__SPEC__"!==n&&(o||e.normativeReferences.has(n)?(e.normativeReferences.add(n),e.informativeReferences.delete(n)):e.informativeReferences.add(n))}}(e),e.xref||ga(ua)}});async function ya(){const e=await Xt.openDB("xref",1,{upgrade(e){e.createObjectStore("xrefs")}});return new mn(e,"xrefs")}async function wa(e){try{const t=await ya();return await async function(e,t){if(await async function(e){const t=await e.get("__LAST_VERSION_CHECK__"),n=Date.now();if(!t)return await e.set("__LAST_VERSION_CHECK__",n),!1;if(n-t<3e5)return!1;const r=new URL("meta/version",ka).href,o=await fetch(r);if(!o.ok)return!1;const s=await o.text();return await e.set("__LAST_VERSION_CHECK__",n),parseInt(s,10)>t}(t))return await t.clear(),new Map;return await t.getMany(e.map(e=>e.id))}(e,t)}catch(e){return console.error(e),new Map}}const va={"web-platform":["HTML","INFRA","URL","WEBIDL","DOM","FETCH"]},ka="https://respec.org/xref/";if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=un({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}function xa(e){const t="xrefType"in e.dataset;let n=$a(e);t||(n=n.toLowerCase());const r=function(e){const t=[];let n=e.closest("[data-cite]");for(;n;){const r=n.dataset.cite.toLowerCase().replace(/[!?]/g,"").split(/\s+/).filter(e=>e);if(r.length&&t.push(r),n===e)break;n=n.parentElement.closest("[data-cite]")}if(n!==e){const n=e.closest("section"),r=[...n?n.querySelectorAll("a.bibref"):[]].map(e=>e.textContent.toLowerCase());r.length&&t.push(r)}return function(e){const t=[];for(const n of e){const e=t[t.length-1]||[],r=[...new Set(n)].filter(t=>!e.includes(t));t.push(r.sort())}return t}(t)}(e),o=function(e,t){if(t)return e.dataset.xrefType?e.dataset.xrefType.split("|"):["_IDL_"];return["_CONCEPT_"]}(e,t),s=function(e,t){if(e.dataset.xrefFor)return bn(e.dataset.xrefFor);if(t){const t=e.closest("[data-xref-for]");if(t)return bn(t.dataset.xrefFor)}return null}(e,t);return{term:n,types:o,...r.length&&{specs:r},..."string"==typeof s&&{for:s}}}function $a(e){const{lt:t}=e.dataset;let n=t?t.split("|",1)[0]:e.textContent;return n=bn(n),"the-empty-string"===n?"":n}function _a(e,t,n,r){const{term:o,specs:s=[]}=t,{uri:i,shortname:a,spec:c,normative:l,type:u,for:d}=n,p=s.flat().includes(c)?c:a,f=new URL(i,"https://example.org"),{pathname:h}=f,m={cite:p,citePath:h,citeFrag:f.hash.slice(1),type:u};d&&(m.linkFor=d[0]),Object.assign(e.dataset,m),function(e,t,n,r,o){if(!function(e){const t=e.closest(".normative"),n=e.closest(ln);return!n||e===t||t&&n&&n.contains(t)}(e))return void(o.normativeReferences.has(t)||o.informativeReferences.add(t));if(n){const e=o.informativeReferences.has(t)?o.informativeReferences.getCanonicalKey(t):t;return o.normativeReferences.add(e),void o.informativeReferences.delete(e)}pn(e,`Adding an informative reference to "${r}" from "${t}" in a normative section`,"Error: Informative reference in normative section")}(e,p,l,o,r)}function Ca(e){const t=JSON.stringify(e,Object.keys(e).sort()),n=(new TextEncoder).encode(t);return crypto.subtle.digest("SHA-1",n).then(Sa)}function Sa(e){return[...new Uint8Array(e)].map(e=>e.toString(16).padStart(2,"0")).join("")}function Ea(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 Ra=Object.freeze({__proto__:null,name:"core/xref",API_URL:ka,run:async function(e){if(!e.xref)return;const t=function(e){const t={url:ka,specs:null},n=Object.assign({},t);switch(Array.isArray(e)?"array":typeof e){case"boolean":break;case"string":e.toLowerCase()in va?Object.assign(n,{specs:va[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 va){const r=(e.specs||[]).concat(va[t]);Object.assign(n,{specs:r})}else r(e.profile)}break;default:o("error",`Invalid value for \`xref\` configuration option. Received: "${e}".`)}return n;function r(e){o("error",`Invalid profile "${e}" in \`respecConfig.xref\`. Please use one of the supported profiles: ${Object.keys(va).map(e=>`"${e}"`).join(", ")}.`)}}(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=ua.concat(function(){const e=document.querySelectorAll("a[data-cite]:not([data-cite='']):not([data-cite*='#']), dfn[data-cite]:not([data-cite='']):not([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=xa(e),n=await Ca(t);r.push({...t,id:n})}const i=await async function(e,t){const n=new Set,r=e.filter(e=>!n.has(e.id)&&(n.add(e.id)&&!0)),o=await wa(r),s=r.filter(e=>!o.get(e.id)),i=await async function(e,t){if(!e.length)return new Map;const n={keys:e},r={method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}},o=await fetch(t,r),s=await o.json();return new Map(s.result)}(s,t);i.size&&await async function(e){try{const t=await ya();await t.addMany(e)}catch(e){console.error(e)}}(i);return new Map([...o,...i])}(r,t.url);!function(e,t,n,r){const o={ambiguous:new Map,notFound:new Map};for(let s=0,i=e.length;s<i;s++){if(e[s].closest("[data-no-xref]"))continue;const i=e[s],a=t[s],{id:c}=a,l=n.get(c);if(1===l.length)_a(i,a,l[0],r);else{const e=o[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(ka);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},r=e=>`[Learn more about this error](https://respec.org/docs/#error-term-not-found) or see [how to cite to resolve the error](${e})`;for(const{query:e,elems:o}of t.values()){const t=e.specs?[...new Set(e.specs.flat())].sort():[],s=$a(o[0]),i=n(s,e);fn(o,`Couldn't match "**${s}**" to anything in the document or in any other document cited in this specification: ${t.map(e=>`\`${e}\``).join(", ")}. ${r(i)}`,"Error: No matching dfn found.")}for(const{query:t,elems:o,results:s}of e.values()){const e=[...new Set(s.map(e=>e.shortname))].sort(),i=e.map(e=>`**${e}**`).join(", "),a=$a(o[0]);fn(o,`The term "**${a}**" is defined in ${i} in multiple ways, so it's ambiguous. ${r(n(a,t,e))}`,"Error: Linking an ambiguous dfn.")}}(o)}(n,r,i,e),s("beforesave",Ea)},getTermFromElement:$a});var Aa=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.def.idl:not(.exclude)")).filter(e=>!e.closest(ln));if(0===n.length){const t="This specification doesn't 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")),r.querySelectorAll(".idlHeader").forEach(e=>e.remove()),e.appendChild(r),Qi(r)}});const Ta=yn({en:{heading:"Index",headingExternal:"Terms defined by reference",headlingLocal:"Terms defined by this specification",dfnOf:"definition of"}}),La=new Set(["attribute","callback","dict-member","dictionary","element-attr","element","enum-value","enum","exception","extended-attribute","interface","method","typedef"]);function Pa(e){const t=e.dataset,n=t.dfnType||t.idl||t.linkType||"";switch(n){case"":case"dfn":return"";default:return n}}function Ia(e){const t=e.closest("[data-dfn-for]:not([data-dfn-for=''])");return t?t.dataset.dfnFor:""}function Na(e,t,n=""){if(n.startsWith("[[")){return`internal slot for <code>${Ia(e)}</code>`}switch(t){case"dict-member":case"method":case"attribute":case"enum-value":return`${"dict-member"===t?"member":t.replace("-"," ")} for <code>${Ia(e)}</code>`;case"interface":case"dictionary":case"enum":return t;case"constructor":return`for <code>${Ia(e)}</code>`;default:return""}}function Da(){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 en`<span class="print-only">${t}</span>`})(e.dataset.id)))}function ja(){const e=new Set,t=new Map,n=document.querySelectorAll("a[data-cite]");for(const r of n){if(!r.dataset.cite)continue;const n=r.href;if(e.has(n))continue;const{type:o,linkFor:s}=r.dataset,i=$a(r);if(!i)continue;const a=aa(r).key.toUpperCase();(t.get(a)||t.set(a,[]).get(a)).push({term:i,type:o,linkFor:s,elem:r}),e.add(n)}return t}function Oa(e){const{elem:t}=e,n=function(e){const{term:t,type:n,linkFor:r}=e;let o=t;La.has(n)&&("extended-attribute"===n&&(o=`[${o}]`),o=`<code>${o}</code>`);const s=Ua.has(t)?"type":za.get(n);s&&(o+=" "+s);if(r){let e=r;/\s/.test(r)||(e=`<code>${e}</code>`),"element-attr"===n&&(e+=" element"),o+=` (for ${e})`}return o}(e);return en`<li>
<span class="index-term" data-href="${t.href}">${{html:n}}</span>
</li>`}const za=new Map([["attribute","attribute"],["element-attr","attribute"],["element","element"],["enum","enum"],["exception","exception"],["extended-attribute","extended attribute"],["interface","interface"]]),Ua=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 Wa(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 Ma=Object.freeze({__proto__:null,name:"core/dfn-index",run:async function(){const e=document.querySelector("section#index");if(!e)return;const t=document.createElement("style");t.textContent=await async function(){try{return(await Promise.resolve().then((function(){return Ol}))).default}catch{return qn("dfn-index.css")}}(),document.head.appendChild(t),e.classList.add("appendix"),e.querySelector("h2")||e.prepend(en`<h2>${Ta.heading}</h2>`);const n=en`<section id="index-defined-here">
<h3>${Ta.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=bn(n.textContent);(e.get(t)||e.set(t,[]).get(t)).push(n)}return[...e].sort(([e],[t])=>e.slice(e.search(/\w/)).localeCompare(t.slice(t.search(/\w/))))}();return en`<ul class="index">
${e.map(([e,t])=>function(e,t){const n=(e,t,n)=>{const r="#"+e.id;return en`<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],o=Pa(r),s=function(e,t,n){let r=n;"enum-value"===t&&(r=`"${r}"`);(La.has(t)||e.dataset.idl||e.closest("code"))&&(r=`<code>${r}</code>`);return r}(r,o,e),i=Na(r,o,e);return n(r,s,i)}return en`<li>
${e}
<ul>
${t.map(t=>{const r=Na(t,Pa(t),e)||Ta.dfnOf;return n(t,r)})}
</ul>
</li>`}(e,t))}
</ul>`}()}
</section>`;e.append(n);const r=en`<section id="index-defined-elsewhere">
<h3>${Ta.headingExternal}</h3>
${function(){const e=[...ja().entries()].sort(([e],[t])=>e.localeCompare(t));return en`<ul class="index">
${e.map(([e,t])=>en`<li data-spec="${e}">
${Vs(e)} defines the following:
<ul>
${t.sort((e,t)=>e.term.localeCompare(t.term)).map(Oa)}
</ul>
</li>`)}
</ul>`}()}
</section>`;e.append(r);for(const e of r.querySelectorAll(".index-term"))Sn(e,"index-term");s("toc",Da,{once:!0}),s("beforesave",Wa)}});var Fa=Object.freeze({__proto__:null,name:"core/contrib",run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void o("error","Requested list of contributors from GitHub, but [`github`](https://github.com/w3c/respec/wiki/github) configuration option is not set.")}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 en(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=gn(r)}(r,n):n.textContent="Failed to fetch contributors.";async function s(){const{href:n}=new URL("contributors",t);try{const t=await xn(n);if(!t.ok)throw new Error(`Request to ${n} failed with status code ${t.status}`);return(await t.json()).filter(t=>!e.includes(t.name||t.login))}catch(e){return o("error","Error loading contributors from GitHub."),console.error(e),null}}}(t,n)}});var qa=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=>{Rn(e,"h"+Math.min(function(e,t){const n=[];for(;e!=e.ownerDocument.body;)e.matches(t)&&n.push(e),e=e.parentElement;return n}(e,"section").length+1,6))})}});const Ba=["h2","h3","h4","h5","h6"],Ha=["h1",...Ba],Ga=yn({en:{toc:"Table of Contents"},zh:{toc:"内容大纲"},ko:{toc:"목차"},ja:{toc:"目次"},nl:{toc:"Inhoudsopgave"},es:{toc:"Tabla de Contenidos"},de:{toc:"Inhaltsverzeichnis"}});function Va(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function Za(e,t){const n=en`<a href="${"#"+t}" class="tocxref" />`;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach(e=>{const t=Rn(e,"span");t.className="formerLink",t.removeAttribute("href")}),r.querySelectorAll("dfn").forEach(e=>{Rn(e,"span").removeAttribute("id")}),en`<li class="tocline">${n}</li>`}var Ya=Object.freeze({__proto__:null,name:"core/structure",run:function(e){if("tocIntroductory"in e==!1&&(e.tocIntroductory=!1),"maxTocLevel"in e==!1&&(e.maxTocLevel=1/0),function(){const e=function(){const e=Ha.map(e=>`section:not(.introductory) ${e}:first-child`).join(",");return[...document.querySelectorAll(e)].filter(e=>!e.closest("section.introductory"))}();if(!e.length)return;e.forEach(e=>{const t="h"+Math.min(Ln(e,"section").length+1,6);e.localName!==t&&Rn(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)){const e="`data-max-toc` must have a value between 0-6 (inclusive).";fn(t,e,e);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=function e(t,n,{prefix:r=""}={}){let o=!1,s=0,i=1;if(r.length&&!r.endsWith(".")&&(r+="."),0===t.length)return null;const a=en`<ol class="toc"></ol>`;for(const c of t){!c.isAppendix||r||o||(s=i,o=!0);let t=c.isIntro?"":o?Va(i-s+1):r+i;const l=t.split(".").length;if(1===l&&(t+=".",c.header.before(document.createComment("OddPage"))),c.isIntro||(i+=1,c.header.prepend(en`<bdi class="secno">${t} </bdi>`)),l<=n){const r=c.header.id||c.element.id,o=Za(c.header,r),s=e(c.subsections,n,{prefix:t});s&&o.append(s),a.append(o)}}return a}(function e(t,{tocIntroductory:n=!1}={}){const r=n?t.querySelectorAll(":scope > section"):t.querySelectorAll(":scope > section:not(.introductory)"),o=[];for(const t of r){const r=t.classList.contains("notoc");if(!t.children.length||r)continue;const s=t.children[0];if(!Ba.includes(s.localName))continue;const i=s.textContent;Sn(t,null,i),o.push({element:t,header:s,title:i,isIntro:t.classList.contains("introductory"),isAppendix:t.classList.contains("appendix"),subsections:e(t,{tocIntroductory:n})})}return o}(document.body,{tocIntroductory:e.tocIntroductory}),e.maxTocLevel);t&&function(e){if(!e)return;const t=en`<nav id="toc"></nav>`,n=en`<h2 class="introductory">${Ga.toc}</h2>`;Sn(n),t.append(n,e);const r=document.getElementById("toc")||document.getElementById("sotd")||document.getElementById("abstract");r&&("toc"===r.id?r.replaceWith(t):r.after(t));const o=en`<p role="navigation" id="back-to-top">
<a href="#title"><abbr title="Back to Top">↑</abbr></a>
</p>`;document.body.append(o)}(t)}o("toc")}});const Ka=yn({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 Ja=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(en`<p><em>${Ka.informative}</em></p>`)})}});var Xa=Object.freeze({__proto__:null,name:"core/id-headers",run:function(e){const t=document.querySelectorAll("section:not(.head):not(.introductory) h2, h3, h4, h5, h6");for(const n of t){let t=n.id;t||(Sn(n),t=n.parentElement.id||n.id),e.addSectionLinks&&n.appendChild(en`
<a href="${"#"+t}" class="self-link" aria-label="§"></a>
`)}}});const Qa=new Set(["and_chr","and_ff","and_uc","android","bb","chrome","edge","firefox","ie","ios_saf","op_mini","op_mob","opera","safari","samsung"]);if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=un({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}const ec=async function(){try{return(await Promise.resolve().then((function(){return zl}))).default}catch{return qn("caniuse.css")}}();var tc=Object.freeze({__proto__:null,name:"core/caniuse",run:async function(e){if(!e.caniuse)return;const t=function(e){const t={versions:4};if("string"==typeof e.caniuse)return{feature:e.caniuse,...t};const n={...t,...e.caniuse},{browsers:r}=n;if(Array.isArray(r)){const e=r.filter(e=>!Qa.has(e));if(e.length){o("warn",`Ignoring invalid browser(s): ${e.map(e=>`"\`${e}\`"`).join(", ")} in [\`respecConfig.caniuse.browsers\`](https://github.com/w3c/respec/wiki/caniuse)`)}}return n}(e);if(e.caniuse=t,!t.feature)return;const n=new URL(t.feature,"https://caniuse.com/").href,r=await ec;document.head.appendChild(en`<style class="removeOnSave">
${r}
</style>`);const i=document.querySelector(".head dl"),a=(async()=>{try{const e=t.apiURL||"https://respec.org/caniuse/",n=await async function(e,t){const{feature:n,versions:r,browsers:o}=t,s=new URLSearchParams;s.set("feature",n),s.set("versions",r),Array.isArray(o)&&s.set("browsers",o.join(","));s.set("format","html");const i=`${e}?${s.toString()}`,a=await fetch(i);if(!a.ok){const{status:e,statusText:t}=a;throw new Error(`Failed to get caniuse data: (${e}) ${t}`)}return await a.text()}(e,t);return en`${{html:n}}`}catch(e){console.error(e);return o("error",`Couldn't find feature "${t.feature}" on caniuse.com? Please check the feature key on [caniuse.com](https://caniuse.com)`),en`<a href="${n}">caniuse.com</a>`}})(),c=en`<dt class="caniuse-title">Browser support:</dt>
<dd class="caniuse-stats">
${{any:a,placeholder:"Fetching data from caniuse.com..."}}
</dd>`;i.append(...c.childNodes),await a,o("amend-user-config",{caniuse:t.feature}),s("beforesave",e=>{en.bind(e.querySelector(".caniuse-stats"))`
<a href="${n}">caniuse.com</a>`})}});const nc="https://w3c.github.io/mdn-spec-links/",rc={chrome:"Chrome",chrome_android:"Chrome Android",edge:"Edge",edge_mobile:"Edge Mobile",firefox:"Firefox",firefox_android:"Firefox Android",ie:"Internet Explorer",opera:"Opera",opera_android:"Opera Android",safari:"Safari",safari_ios:"Safari iOS",samsunginternet_android:"Samsung Internet",webview_android:"WebView Android"},oc=yn({en:{inAllEngines:"This feature is in all major engines.",inSomeEngines:"This feature has limited support."},zh:{inAllEngines:"所有主要引擎均支持此特性。",inSomeEngines:"此功能支持有限。"}});function sc(e){const t=e.closest("section");if(!t)return;const{previousElementSibling:n}=t;if(n&&n.classList.contains("mdn"))return n;const r=en`<aside class="mdn"></aside>`;return t.before(r),r}function ic(e){const{name:t,slug:n,summary:r,support:o,engines:s}=e,i=n.slice(n.indexOf("/")+1),a="https://developer.mozilla.org/en-US/docs/Web/"+n,c="Expand MDN details for "+t,l=function(e){if(3===e.length)return en`<span title="${oc.inAllEngines}">✅</span>`;if(e.length<2)return en`<span title="${oc.inSomeEngines}">🚫</span>`;return en`<span> </span>`}(s);return en`<details>
<summary aria-label="${c}"><span>MDN</span>${l}</summary>
<a title="${r}" href="${a}">${i}</a>
${function(e){if(3===e.length)return en`<p class="engines-all">${oc.inAllEngines}</p>`;if(e.length<2)return en`<p class="engines-some">${oc.inSomeEngines}</p>`}(s)}
${o?function(e){function t(e,t,n){const r="Unknown"===t?"?":t,o=`${e} ${t.toLowerCase()}`;return en`<tr class="${o}">
<td>${rc[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 en`<table>
${Object.keys(rc).map(r=>e[r]?n(r,e[r]):t(r,"Unknown",""))}
</table>`}(o):en`<p class="nosupportdata">No support data.</p>`}
</details>`}var ac=Object.freeze({__proto__:null,name:"core/mdn-annotation",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=nc,maxAge:r=864e5}=t,s=new URL(e+".json",n).href,i=await xn(s,r);if(404===i.status){return void o("error",`${`Could not find MDN data associated with key "${e}".`} ${"Please add a valid key to `respecConfig.mdn`"}`)}return await i.json()}(t,e.mdn);if(!n)return;const r=document.createElement("style");r.textContent=await async function(){try{return(await Promise.resolve().then((function(){return Ul}))).default}catch{return qn("mdn-annotation.css")}}(),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=sc(e);if(r)for(const e of t)r.append(ic(e))}}});const cc=new Map([["text/html","html"],["application/xml","xml"]]);function lc(e,t=document){const n=cc.get(e);if(!n){const t=[...cc.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=function(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;Dn(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach(e=>e.remove()),n.classList.remove("toc-sidebar"),dn(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=en`<meta charset="utf-8" />`);s.appendChild(a);const c="ReSpec "+(window.respecVersion||"Developer Channel"),l=en`
<meta name="generator" content="${c}" />
`;s.appendChild(l),t.prepend(s),o("beforesave",r)}(n);let r="";switch(e){case"xml":r=(new XMLSerializer).serializeToString(n);break;default:n.doctype&&(r+=(new XMLSerializer).serializeToString(n.doctype)),r+=n.documentElement.outerHTML}return r}(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}n("core/exporter",{rsDocToDataURL:lc});const uc=yn({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),dc=[{id:"respec-save-as-html",fileName:"index.html",title:"HTML",type:"text/html",get href(){return lc(this.type)}},{id:"respec-save-as-xml",fileName:"index.xhtml",title:"XML",type:"application/xml",get href(){return lc(this.type)}},{id:"respec-save-as-epub",fileName:"spec.epub",title:"EPUB 3",type:"application/epub+zip",get href(){const e=new URL("https://labs.w3.org/r2epub/");return e.searchParams.append("respec","true"),e.searchParams.append("url",document.location.href),e.href}}];function pc(e){const{id:t,href:n,fileName:r,title:o,type:s}=e;return en`<a
href="${n}"
id="${t}"
download="${r}"
type="${s}"
class="respec-save-button"
onclick=${()=>yr.closeModal()}
>${o}</a
>`}const fc={async show(e){await document.respecIsReady;const t=en`<div class="respec-save-buttons">
${dc.map(pc)}
</div>`;yr.freshModal(uc.save_snapshot,t,e)}},hc="download"in HTMLAnchorElement.prototype;let mc;hc&&(mc=yr.addCommand(uc.save_snapshot,(function(){if(!hc)return;fc.show(mc)}),"Ctrl+Shift+Alt+S","💾"));var gc=Object.freeze({__proto__:null,name:"ui/save-html",exportDocument:function(e,t){const n="Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed. Use core/exporter `rsDocToDataURL()` instead.";return o("warn",n),console.warn(n),lc(t)}});const bc=yn({en:{search_specref:"Search Specref"},nl:{search_specref:"Doorzoek Specref"},ja:{search_specref:"仕様検索"},de:{search_specref:"Spezifikationen durchsuchen"},zh:{search_specref:"搜索 Specref"}}),yc=yr.addCommand(bc.search_specref,(function(){_c(),yr.freshModal(bc.search_specref,wc,yc);wc.querySelector("input[type=search]").focus()}),"Ctrl+Shift+Alt+space","🔎"),wc=document.createElement("form"),vc=en.bind(wc),kc=en.bind(document.createElement("div"));function xc([e,t]){return en.wire(t)`
<dt>
[${e}]
</dt>
<dd>${Ys(t)}</dd>
`}wc.id="specref-ui",wc.addEventListener("submit",async e=>{e.preventDefault();const{searchBox:t}=wc,n=t.value;if(!n)return void t.focus();_c({state:"Searching Specref…"});const r=new URL("https://specref.herokuapp.com/search-refs");r.searchParams.set("q",n);const o=new URL("https://specref.herokuapp.com/reverse-lookup");o.searchParams.set("urls",n);try{const e=performance.now(),s=await Promise.all([fetch(r).then(e=>e.json()),fetch(o).then(e=>e.json())]),{checked:i}=wc.includeVersions,a=function({includeVersions:e=!1}={}){return(...t)=>{const n=Object.assign({},...t),r=new Map(Object.entries(n));return Array.from(r).filter(([,e])=>e.aliasOf).map(([e])=>e).reduce((e,t)=>e.delete(t)&&e,r),e||Array.from(r.values()).filter(e=>"object"==typeof e&&"versions"in e).flat().forEach(e=>{r.delete(e)}),Array.from(r).filter(([,e])=>"object"!=typeof e).forEach(([e])=>r.delete(e)),r}}({includeVersions:i});_c({query:n,results:a(...s),state:"",timeTaken:Math.round(performance.now()-e)/1e3})}catch(e){console.error(e),_c({state:"Error! Couldn't do search."})}finally{t.focus()}});const $c=en.wire()`
<header>
<p>
An Open-Source, Community-Maintained Database of
Web Standards & Related References.
</p>
</header>
<div class="searchcomponent">
<input
name="searchBox"
type="search"
aria-label="Search"
autocomplete="off"
placeholder="Keywords, titles, authors, urls…">
<button
type="submit">
Search
</button>
<label>
<input type="checkbox" name="includeVersions"> Include all versions.
</label>
</div>
`;function _c({state:e="",results:t,timeTaken:n,query:r}={}){t?vc`
<div>${$c}</div>
<p class="state" hidden="${!e}">
${e}
</p>
<section hidden="${!t}" aria-live="polite">${t?function(e,t,n){if(!e.size)return kc`
<p class="state">
Your search - <strong> ${t} </strong> -
did not match any references.
</p>
`;const r=Array.from(e).slice(0,99).map(xc).reduce((e,t)=>e.concat(t),[]);return kc`
<p class="result-stats">
${e.size} results (${n} seconds).
${e.size>99?"First 100 results.":""}
</p>
<dl class="specref-results">${r}</dl>
`}(t,r,n):[]}</section>
`:vc`<div>${$c}</div>`}var Cc=Object.freeze({__proto__:null});const Sc={en:{title:"Search definitions"},ja:{title:"定義検索"},de:{title:"Definitionen durchsuchen"},zh:{title:"搜索定义"}},Ec=Sc[g in Sc?g:"en"],Rc=yr.addCommand(Ec.title,(function(){const e=en`
<iframe id="xref-ui" src="${"https://respec.org/xref/"}" onload=${e=>e.target.classList.add("ready")}></iframe>
<a href="${"https://respec.org/xref/"}" target="_blank">Open Search UI in a new tab</a>
`;yr.freshModal(Ec.title,e,Rc)}),"Ctrl+Shift+Alt+x","📚");var Ac=Object.freeze({__proto__:null});const Tc=yn({en:{definition_list:"Definitions",list_of_definitions:"List of Definitions"},nl:{definition_list:"Lijst van Definities",list_of_definitions:"Lijst van Definities"},ja:{definition_list:"定義",list_of_definitions:"定義リスト"},de:{definition_list:"Definitionen",list_of_definitions:"Liste der Definitionen"},zh:{definition_list:"定义",list_of_definitions:"文档中的定义"}}),Lc=yr.addCommand(Tc.definition_list,(function(){const e=Array.from(wi).sort(([e],[t])=>e.localeCompare(t)).map(([,[e]])=>en.wire(e,":li>a")`
<li>
<a href="${"#"+e.id}">
${e.textContent}
</a>
${function(e){if(e.hasAttribute("data-export"))return en`<span class="dfn-status exported">exported</span>`;return null}(e)} ${function(e){if(!document.querySelector(`:not(.dfn-panel) > :not(li) > a[href^="#${e.id}"]`))return en`<span class="dfn-status unused">unused</span>`;return null}(e)}
</li>
`);Ic`${e}`,yr.freshModal(Tc.list_of_definitions,Pc,Lc)}),"Ctrl+Shift+Alt+D","📔"),Pc=document.createElement("ul");Pc.classList.add("respec-dfn-list");const Ic=en.bind(Pc);Pc.addEventListener("click",e=>{e.target instanceof HTMLElement&&e.target.matches("a")&&(yr.closeModal(),e.stopPropagation())});var Nc=Object.freeze({__proto__:null});const Dc=yn({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 jc=document.createElement("div"),Oc=en.bind(jc),zc=yr.addCommand(`${Dc.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(Uc).forEach(t=>{e.push(t)});Oc`
<p>
ReSpec is a document production toolchain, with a notable focus on W3C specifications.
</p>
<p>
<a href='https://github.com/w3c/respec/wiki'>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>
`,yr.freshModal(`${Dc.about_respec} - ${window.respecVersion}`,jc,zc)}),"Ctrl+Shift+Alt+A","ℹ️");function Uc({name:e,duration:t}){return en`
<tr>
<td><a href="${`https://github.com/w3c/respec/blob/develop/src/${e}.js`}">${e}</a></td>
<td>${t}</td>
</tr>
`}var Wc=Object.freeze({__proto__:null});var Mc=Object.freeze({__proto__:null,name:"core/seo",run:function(){const e=document.querySelector("#abstract p:first-of-type");if(!e)return;const t=e.textContent.replace(/\s+/," ").trim(),n=document.createElement("meta");n.name="description",n.content=t,document.head.appendChild(n)}});function Fc({name:e,url:t,mailto:n,company:r,companyURL:o}){const s={type:"Person",name:e,url:t,"foaf:mbox":n};return(r||o)&&(s.worksFor={name:r,url:o}),s}function qc(e){const{href:t,title:n,href:r}=e,o={id:t,type:"TechArticle",name:n,url:r};return e.authors&&(o.creator=e.authors.map(e=>({name:e}))),e.rawDate&&(o.publishedDate=e.rawDate),e.isbn&&(o.identifier=e.isbn),e.publisher&&(o.publisher={name:e.publisher}),o}var Bc=Object.freeze({__proto__:null,name:"w3c/seo",run:async function(e){if(!e.canonicalURI)switch(e.specStatus){case"CG-DRAFT":case"BG-DRAFT":case"unofficial":return}const t=e.shortName?`https://www.w3.org/TR/${e.shortName}/`:null;switch(e.canonicalURI){case"edDraft":e.edDraftURI?e.canonicalURI=new URL(e.edDraftURI,document.location.href).href:(o("warn","Canonical URI set to edDraft, but no edDraftURI is set in configuration"),e.canonicalURI=null);break;case"TR":t?e.canonicalURI=t:(o("warn","Canonical URI set to TR, but no shortName is set in configuration"),e.canonicalURI=null);break;default:if(e.canonicalURI)try{e.canonicalURI=new URL(e.canonicalURI,document.location.href).href}catch(t){o("warn","CanonicalURI is an invalid URL: "+t.message),e.canonicalURI=null}else t&&(e.canonicalURI=t)}if(e.canonicalURI){const t=document.createElement("link");t.setAttribute("rel","canonical"),t.setAttribute("href",e.canonicalURI),document.head.appendChild(t)}e.doJsonLd&&await async function(e,t){const n=["TechArticle"];e.rdfStatus&&n.push(e.rdfStatus);const r={"@context":["http://schema.org",{"@vocab":"http://schema.org/","@language":t.documentElement.lang||"en",w3p:"http://www.w3.org/2001/02pd/rec54#",foaf:"http://xmlns.com/foaf/0.1/",datePublished:{"@type":"http://www.w3.org/2001/XMLSchema#date"},inLanguage:{"@language":null},isBasedOn:{"@type":"@id"},license:{"@type":"@id"}}],id:e.canonicalURI||e.thisVersion,type:n,name:document.title,inLanguage:t.documentElement.lang||"en",license:e.licenseInfo.url,datePublished:e.dashDate,copyrightHolder:{name:"World Wide Web Consortium",url:"https://www.w3.org/"},discussionUrl:e.issueBase,alternativeHeadline:e.subtitle,isBasedOn:e.prevVersion};if(e.additionalCopyrightHolders){const t=Array.isArray(e.additionalCopyrightHolders)?e.additionalCopyrightHolders:[e.additionalCopyrightHolders];r.copyrightHolder=[r.copyrightHolder,...t.map(e=>({name:e}))]}const o=t.head.querySelector("meta[name=description]");o&&(r.description=o.content);e.editors&&(r.editor=e.editors.map(Fc));e.authors&&(r.contributor=e.authors.map(Fc));const s=[...e.normativeReferences,...e.informativeReferences],i=await Promise.all(s.map(e=>zs(e)));r.citation=i.filter(e=>"object"==typeof e).map(qc);const a=t.createElement("script");a.type="application/ld+json",a.textContent=JSON.stringify(r,null,2),t.head.appendChild(a)}(e,document)}});const Hc=un({hint:"preload",href:"https://www.w3.org/Tools/respec/respec-highlight",as:"script"});document.head.appendChild(Hc);const Gc=async function(){const e=await async function(){try{return(await Promise.resolve().then((function(){return Wl}))).default}catch{return Fn("worker/respec-worker.js")}}(),t=URL.createObjectURL(new Blob([e],{type:"application/javascript"}));return new Worker(t)}();n("core/worker",Gc.then(e=>({worker:e})));const Vc=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight"),Zc=async function(){try{return(await Promise.resolve().then((function(){return Ml}))).default}catch{return qn("highlight.css")}}();async function Yc(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:Vc(),languages:t},r=await Gc;return r.postMessage(n),new Promise((e,t)=>{const o=setTimeout(()=>{t(new Error("Timed out waiting for highlight."))},4e3);r.addEventListener("message",(function t(s){const{data:{id:i,language:a,value:c}}=s;i===n.id&&(r.removeEventListener("message",t),clearTimeout(o),e({language:a,value:c}))}))})}(e.innerText,t)}catch(e){return void console.error(e)}const{language:o,value:s}=r;switch(e.localName){case"pre":e.classList.remove(o),e.innerHTML=`<code class="hljs${o?" "+o:""}">${s}</code>`,e.classList.length||e.removeAttribute("class");break;case"code":e.innerHTML=s,e.classList.add("hljs"),o&&e.classList.add(o)}e.setAttribute("aria-busy","false")}var Kc=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(Yc),r=await Zc;document.head.appendChild(en`<style>
${r}
</style>`),await Promise.all(n)}});const Jc=yn({en:{missing_test_suite_uri:"Found tests in your spec, but missing '[`testSuiteURI`](https://github.com/w3c/respec/wiki/testSuiteURI)' in your ReSpec config.",tests:"tests",test:"test"},ja:{missing_test_suite_uri:"この仕様内にテストの項目を検出しましたが,ReSpec の設定に '[`testSuiteURI`](https://github.com/w3c/respec/wiki/testSuiteURI)' が見つかりません.",tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:"Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine '[`testSuiteURI`](https://github.com/w3c/respec/wiki/testSuiteURI)' angegeben.",tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:"本规范中包含测试,但在 ReSpec 配置中缺少 '[`testSuiteURI`](https://github.com/w3c/respec/wiki/testSuiteURI)'。",tests:"测试",test:"测试"}});function Xc(e){const t=[],[n]=new URL(e).pathname.split("/").reverse(),r=n.split(".");let[o]=r;if(r.find(e=>"https"===e)){const e=document.createElement("span");e.textContent="🔒",e.setAttribute("aria-label","requires a secure connection"),e.setAttribute("title","Test requires HTTPS"),o=o.replace(".https",""),t.push(e)}if(o.split(".").join("-").split("-").find(e=>"manual"===e)){const e=document.createElement("span");e.textContent="💪",e.setAttribute("aria-label","the test must be run manually"),e.setAttribute("title","Manual test"),o=o.replace("-manual",""),t.push(e)}return en`
<li>
<a href="${e}">
${o}
</a>
${t}
</li>
`}function Qc(e,t){return e.map(e=>{try{return new URL(e,t).href}catch{o("warn","Bad URI: "+e)}}).filter(e=>e)}function el(e,t){const n=e.filter((e,t,n)=>n.indexOf(e)!==t);n.length&&pn(t,"Duplicate tests found",'To fix, remove duplicates from "data-tests": '+n.map(e=>new URL(e).pathname).join(", "))}function tl(e){const t=[...new Set(e)];return en`
<details class="respec-tests-details removeOnSave">
<summary>
tests: ${t.length}
</summary>
<ul>
${t.map(Xc)}
</ul>
</details>
`}var nl=Object.freeze({__proto__:null,name:"core/data-tests",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=Qc(n.dataset.tests.split(/,/gm).map(e=>e.trim()),e.testSuiteURI);el(t,n);const r=tl(t);n.append(r)}else o("error",Jc.missing_test_suite_uri)}});function rl(e){const t="ascending"===e?1:-1;return({textContent:e},{textContent:n})=>t*e.trim().localeCompare(n.trim())}function ol(e,t){return[...e.querySelectorAll(":scope > li")].sort(rl(t)).reduce((e,t)=>(e.appendChild(t),e),document.createDocumentFragment())}function sl(e,t){return[...e.querySelectorAll(":scope > dt")].sort(rl(t)).reduce((e,t)=>{const{nodeType:n,nodeName:r}=t,o=document.createDocumentFragment();let{nextSibling:s}=t;for(;s&&s.nextSibling;){o.appendChild(s.cloneNode(!0));const{nodeType:e,nodeName:t}=s.nextSibling;if(e===n&&t===r)break;s=s.nextSibling}return o.prepend(t.cloneNode(!0)),e.appendChild(o),e},document.createDocumentFragment())}var il=Object.freeze({__proto__:null,name:"core/list-sorter",sortListItems:ol,sortDefinitionTerms:sl,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=sl(t,n);break;case"ol":case"ul":e=ol(t,n);break;default:o("warning",`ReSpec can't sort ${t.localName} elements.`)}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}}});const al=async function(){try{return(await Promise.resolve().then((function(){return Fl}))).default}catch{return qn("var.css")}}();function cl(e){e.stopPropagation();const{target:t}=e,n=function(e){const t=bn(e.textContent),n=e.closest("section"),r=ul(e),o=[...n.querySelectorAll("var")].filter(e=>bn(e.textContent)===t&&e.closest("section")===n),s=o[0].classList.contains("respec-hl");if(ll.set(r,s),s)return o.forEach(e=>dl(e,r)),[];o.forEach(e=>function(e,t){e.classList.add("respec-hl",t)}(e,r));return o}(t),r=()=>{const e=ul(t);n.forEach(t=>dl(t,e)),[...ll.keys()].forEach(e=>ll.set(e,!0))};n.length&&document.body.addEventListener("click",r,{once:!0})}const ll=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 ul(e){const{value:t}=e.classList,n=/respec-hl-\w+/,r=n.test(t)&&t.match(n);return r?r[0]:!0===ll.get("respec-hl-c1")?"respec-hl-c1":[...ll.keys()].find(e=>ll.get(e))||"respec-hl-c1"}function dl(e,t){e.classList.remove("respec-hl",t),e.classList.length||e.removeAttribute("class")}var pl=Object.freeze({__proto__:null,name:"core/highlight-vars",run:async function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=await al,t.classList.add("removeOnSave"),document.head.appendChild(t),document.querySelectorAll("var").forEach(e=>e.addEventListener("click",cl)),s("beforesave",e=>{e.querySelectorAll("var.respec-hl").forEach(dl)})}});function fl(e){const{id:t}=e,n=e.dataset.href||"#"+t,r=document.querySelectorAll(`a[href="${n}"]:not(.index-term)`),o="dfn-panel-for-"+e.id;return en`
<aside class="dfn-panel" id="${o}" hidden>
<span class="caret"></span>
<div>
<a class="self-link" href="${n}">Permalink</a>
${function(e){return e.matches("dfn[data-export]")?en`<span
class="dfn-exported"
title="Definition can be referenced by other specifications"
>exported</span
>`:null}(e)}
</div>
<b>Referenced in:</b>
${function(e,t){if(!t.length)return en`<ul>
<li>Not referenced in this document.</li>
</ul>`;const n=new Map;t.forEach((t,r)=>{const o=t.id||`ref-for-${e}-${r+1}`;t.id||(t.id=o);const s=function(e){const t=e.closest("section");if(!t)return null;const n=t.querySelector("h1, h2, h3, h4, h5, h6");return n?bn(n.textContent):null}(t);(n.get(s)||n.set(s,[]).get(s)).push(o)});const r=([e,t])=>[{title:e,id:t[0]}].concat(t.slice(1).map((e,t)=>({title:`(${t+2})`,id:e}))),o=e=>en`<li>
${r(e).map(e=>en`<a href="#${e.id}">${e.title}</a>${" "}`)}
</li>`;return en`<ul>
${[...n].map(o)}
</ul>`}(t,r)}
</aside>
`}var hl=Object.freeze({__proto__:null,name:"core/dfn-panel",run:async function(){const e=await async function(){try{return(await Promise.resolve().then((function(){return ql}))).default}catch{return qn("dfn-panel.css")}}();document.head.insertBefore(en`<style>
${e}
</style>`,document.querySelector("link"));const t=document.querySelectorAll("dfn[id], #index-defined-elsewhere .index-term"),n=document.createDocumentFragment();for(const e of t)n.append(fl(e));document.body.append(n);const r=document.createElement("script");r.id="respec-dfn-panel",r.textContent=await async function(){try{return(await Promise.resolve().then((function(){return Bl}))).default}catch{return Fn("./src/core/dfn-panel.runtime.js")}}(),document.body.append(r)}});const ml=async function(){try{return(await Promise.resolve().then((function(){return Hl}))).default}catch{return qn("datatype.css")}}();var gl=Object.freeze({__proto__:null,name:"core/data-type",run:async function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=await ml,document.head.appendChild(t);let n=null;const r=new Map,o=document.querySelectorAll("section var");for(const e of o){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 o=r.get(e.textContent.trim());o&&(e.dataset.type=o)}}});const bl=async function(){try{return(await Promise.resolve().then((function(){return Gl}))).default}catch{return qn("algorithms.css")}}();var yl=Object.freeze({__proto__:null,name:"core/algorithms",run:async function(){if(Array.from(document.querySelectorAll("ol.algorithm li")).filter(e=>e.textContent.trim().startsWith("Assert: ")).forEach(e=>e.classList.add("assert")),document.querySelector(".assert")){const e=document.createElement("style");e.textContent=await bl,document.head.appendChild(e)}}});function wl(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void fn(n,`Found matching element "${t}", but it has no title or marker.`,"Missing title.")}const o=Nn(r);n.append(...o.childNodes),n.classList.add("box-ref")}function vl(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void fn(n,`Found matching figure "${t}", but figure is lacking a \`<figcaption>\`.`,"Missing figcaption in referenced figure.")}const o=[...Nn(r).childNodes].filter(e=>!e.classList||!e.classList.contains("fig-title"));o.pop(),n.append(...o),n.classList.add("fig-ref");const s=r.querySelector(".fig-title");!n.hasAttribute("title")&&s&&(n.title=bn(s.textContent))}function kl(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)xl(r,n),$l(r,n);else{n.textContent=n.getAttribute("href");fn(n,"Found matching section, but the section was lacking a heading element.",`No matching id in document: "${t}".`)}}function xl(e,t){const n=e.querySelector(".self-link"),r=[...Nn(e).childNodes].filter(e=>!e.classList||!e.classList.contains("self-link"));t.append(...r),n&&t.prepend("§ "),t.classList.add("sec-ref")}function $l(e,t){for(const n of["dir","lang"]){if(t.hasAttribute(n))continue;const r=e.closest(`[${n}]`);if(!r)continue;const o=t.closest(`[${n}]`);o&&o.getAttribute(n)===r.getAttribute(n)||t.setAttribute(n,r.getAttribute(n))}}var _l=Object.freeze({__proto__:null,name:"core/anchor-expander",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":xl(n,t);break;case"section":kl(n,e,t);break;case"figure":vl(n,e,t);break;case"aside":case"div":wl(n,e,t);break;default:t.textContent=t.getAttribute("href");fn(t,"ReSpec doesn't support expanding this kind of reference.",`Can't expand "#${e}".`)}$l(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");fn(t,`Couldn't expand inline reference. The id "${e}" is not in the document.`,`No matching id in document: ${e}.`)}}}});const Cl=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;en.bind(this)`
<ul>
${{any:Sl(e,t,n).then(e=>async function(e){const{repoURL:t}=await yo;return e.map(e=>{const[n,r=null]=e.message.split(/\(#(\d+)\)/,2),o=`${t}commit/${e.hash}`,s=r&&en` (<a href="${r?`${t}pull/${r}`:null}">#${r}</a>)`;return en`<li><a href="${o}">${n.trim()}</a>${s}</li>`})}(e)).catch(e=>fn(this,e.message,e.message)).finally(()=>{this.dispatchEvent(new CustomEvent("done"))}),placeholder:"Loading list of commits..."}}
</ul>
`}};async function Sl(e,t,n){let r;try{const o=await yo;if(!o)throw new Error("`respecConfig.github` is not set");const s=new URL("commits",`${o.apiBase}/${o.fullName}/`);s.searchParams.set("from",e),s.searchParams.set("to",t);const i=await fetch(s.href);if(!i.ok)throw new Error(`Request to ${s} 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 El=[Object.freeze({__proto__:null,name:"rs-changelog",element:Cl})];var Rl=Object.freeze({__proto__:null,name:"core/custom-elements/index",run:async function(){El.forEach(e=>{customElements.define(e.name,e.element)});const e=El.map(e=>e.name).join(", "),t=[...document.querySelectorAll(e)].map(e=>new Promise(t=>e.addEventListener("done",t,{once:!0})));await Promise.all(t)}});const Al=["color-contrast","landmark-one-main","landmark-unique","region"];function Tl(e){const t=[];for(const n of e.split("\n\n")){const[e,...r]=n.split(/^\s{2}/m),o=r.map(e=>"- "+e.trimEnd()).join("\n");t.push(`${e}${o}`)}return t.join("\n\n")}var Ll=Object.freeze({__proto__:null,name:"core/a11y",run:async function(e){if(!e.a11y)return;const t=!0===e.a11y?{}:e.a11y,n=await async function(e){const{rules:t,...n}=e,r={rules:{...Object.fromEntries(Al.map(e=>[e,{enabled:!1}])),...t},...n,elementRef:!0,resultTypes:["violations"],reporter:"v1"};let s;try{s=await function(){const e=document.createElement("script");return e.classList.add("remove"),e.src="https://unpkg.com/axe-core@3/axe.min.js",document.head.appendChild(e),new Promise((t,n)=>{e.onload=()=>t(window.axe),e.onerror=n})}()}catch(e){return o("error","Failed to load a11y linter. See developer console for details."),console.error(e),[]}try{return(await s.run(document,r)).violations}catch(e){return o("error","Error while looking for a11y issues."),console.error(e),[]}}(t);for(const e of n){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:o,helpUrl:s}=e,i=`a11y/${n}: ${r}`;for(const[e,n]of t){pn(n,i,i,{details:`\n\n${o}.\n\n${Tl(e)}. ([Learn more](${s}))`})}}}}),Pl=Object.freeze({__proto__:null,default:'.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0}#respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000}#respec-pill,.respec-info-button{background:#fff;height:2.5em;color:#787878;border:1px solid #ccc;box-shadow:1px 1px 8px 0 rgba(100,100,100,.5)}.respec-info-button{border:none;opacity:.75;border-radius:2em;margin-right:1em;min-width:3.5em}.respec-info-button:focus,.respec-info-button:hover{opacity:1;transition:opacity .2s}#respec-pill:disabled{font-size:2.8px;text-indent:-9999em;border-top:1.1em solid rgba(40,40,40,.2);border-right:1.1em solid rgba(40,40,40,.2);border-bottom:1.1em solid rgba(40,40,40,.2);border-left:1.1em solid #fff;transform:translateZ(0);animation:respec-spin .5s infinite linear;box-shadow:none}#respec-pill:disabled,#respec-pill:disabled:after{border-radius:50%;width:10em;height:10em}@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:#fff;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:#f0f0f0;background:#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:#fff;background:#2a5aa8;padding:0;margin:0;border:0;padding-top:16px}.respec-save-button:link:focus{background:#193766}#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;list-style:none;font-family:sans-serif;background-color:#fffbe6;font-size:.85em}.respec-error-list>li,.respec-warning-list>li{padding:.4em .7em}.respec-warning-list>li::before{content:"⚠️";padding-right:.5em}.respec-error-list p,.respec-warning-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-error-list li::before{content:"💥";padding-right:.5em}.respec-error-list li{padding:.4em .7em;color:#5c3b00;border-bottom:thin solid #ffd7d7}.respec-error-list li>p{margin:0;padding:0;display:inline-block}.respec-error-list li>p:first-child,.respec-warning-list li>p:first-child{display:inline}.respec-error-list>li li,.respec-warning-list>li li{margin:0;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;margin:auto;top:10%;background:#fff;border:5px solid #666;min-width:20%;width:79%;padding:0;max-height:80%;overflow-y:auto;margin:0 -.5cm}@media screen and (min-width:78em){.respec-modal{width:62%}}.respec-modal h3{margin:0;padding:.2em;text-align:center;color:#000;background:linear-gradient(to bottom,#eee 0,#eee 50%,#ccc 100%);font-size:1em}.respec-modal .inside div p{padding-left:1cm}#respec-menu button.respec-option{background:#fff;padding:0 .2cm;border:none;width:100%;text-align:left;font-size:inherit;padding:1.2em 1.2em}#respec-menu button.respec-option:hover,#respec-menu button:focus{background-color:#eee}.respec-cmd-icon{padding-right:.5em}#respec-ui button.respec-option:last-child{border:none;border-radius:inherit}.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}#specref-ui{margin:0 2%;margin-bottom:.5cm}#specref-ui header{font-size:.7em;background-color:#eee;text-align:center;padding:.2cm;margin-bottom:.5cm;border-radius:0 0 .2cm .2cm}#specref-ui header h1{padding:0;margin:0;color:#000}#specref-ui p{padding:0;margin:0;font-size:.8em;text-align:center}#specref-ui p.state{margin:1cm}#specref-ui .searchcomponent{font-size:16px;display:grid;grid-template-columns:auto 2cm}#specref-ui button,#specref-ui input{border:0;padding:6px 12px}#specref-ui label{font-size:.6em;grid-column-end:3;text-align:right;grid-column-start:1}#specref-ui input[type=search]{-webkit-appearance:none;font-size:16px;border-radius:.1cm 0 0 .1cm;border:1px solid #ccc}#specref-ui button[type=submit]{color:#fff;border-radius:0 .1cm .1cm 0;background-color:#337ab7}#specref-ui button[type=submit]:hover{background-color:#286090;border-color:#204d74}#specref-ui .result-stats{margin:0;padding:0;color:grey;font-size:.7em;font-weight:700}#specref-ui .specref-results{font-size:.8em}#specref-ui .specref-results dd+dt{margin-top:.51cm}#specref-ui .specref-results a{text-transform:capitalize}#specref-ui .specref-results .authors{display:block;color:#006621}@media print{#respec-ui{display:none}}#xref-ui{width:100%;min-height:550px;height:100%;overflow:hidden;padding:0;margin:0;border:0}#xref-ui:not(.ready){background:url(https://respec.org/xref/loader.gif) no-repeat center}.respec-dfn-list .dfn-status{margin-left:.5em;padding:.1em;text-align:center;white-space:nowrap;font-size:90%;border-radius:.2em}.respec-dfn-list .exported{background:#d1edfd;color:#040b1c;box-shadow:0 0 0 .125em #1ca5f940}.respec-dfn-list .unused{background:#fde0e6;color:#9d0c29;box-shadow:0 0 0 .125em #f1466840}#xref-ui+a[href]{font-size:.9rem;float:right;margin:0 .5em .5em;border-bottom-width:1px}'}),Il=Object.freeze({__proto__:null,default:'@keyframes pop{0%{transform:scale(1,1)}25%{transform:scale(1.25,1.25);opacity:.75}100%{transform:scale(1,1)}}.hljs{background:0 0!important}a abbr,h1 abbr,h2 abbr,h3 abbr,h4 abbr,h5 abbr,h6 abbr{border:none}dfn{font-weight:700}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}code{color:#c63501}th code{color:inherit}a[href].orcid{padding-left:4px;padding-right:4px}a[href].orcid>svg{margin-bottom:-2px}.toc a,.tof a{text-decoration:none}a .figno,a .secno{color:#000}ol.tof,ul.tof{list-style:none outside none}.caption{margin-top:.5em;font-style:italic}table.simple{border-spacing:0;border-collapse:collapse;border-bottom:3px solid #005a9c}.simple th{background:#005a9c;color:#fff;padding:3px 5px;text-align:left}.simple th a{color:#fff;padding:3px 5px;text-align:left}.simple th[scope=row]{background:inherit;color:inherit;border-top:1px solid #ddd}.simple td{padding:3px 10px;border-top:1px solid #ddd}.simple tr:nth-child(even){background:#f0f6ff}.section dd>p:first-child{margin-top:0}.section dd>p:last-child{margin-bottom:0}.section dd{margin-bottom:1em}.section dl.attrs dd,.section dl.eldef dd{margin-bottom:0}#issue-summary>ul,.respec-dfn-list{column-count:2}#issue-summary li,.respec-dfn-list li{list-style:none}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}a[href].self-link:hover{opacity:1;text-decoration:none;background-color:transparent}h2,h3,h4,h5,h6{position:relative}aside.example .marker>a.self-link{color:inherit}h2>a.self-link,h3>a.self-link,h4>a.self-link,h5>a.self-link,h6>a.self-link{border:none;color:inherit;font-size:83%;height:2em;left:-1.6em;opacity:.5;position:absolute;text-align:center;text-decoration:none;top:0;transition:opacity .2s;width:2em}h2>a.self-link::before,h3>a.self-link::before,h4>a.self-link::before,h5>a.self-link::before,h6>a.self-link::before{content:"§";display:block}@media (max-width:767px){dd{margin-left:0}h2>a.self-link,h3>a.self-link,h4>a.self-link,h5>a.self-link,h6>a.self-link{left:auto;top:auto}}@media print{.removeOnSave{display:none}}'}),Nl=Object.freeze({__proto__:null,default:"span.example-title{text-transform:none}aside.example,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{padding:.5em;border-left-width:.5em;border-left-style:solid;border-color:#e0cb52;background:#fcfaee}aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}aside.example div.example span.example-title{color:#999}"}),Dl=Object.freeze({__proto__:null,default:'.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}.warning{border-color:#f11;border-width:.2em;border-style:solid;background:#fbe9e9}.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}'}),jl=Object.freeze({__proto__:null,default:"pre.idl{padding:1em;position:relative}@media print{pre.idl{white-space:pre-wrap}}.idlHeader{display:block;width:150px;background:#8ccbf2;color:#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}.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.selected:focus,.respec-button-copy-paste:focus:hover{border-color:#51a7e8}.respec-button-copy-paste.zeroclipboard-is-active,.respec-button-copy-paste.zeroclipboard-is-hover,.respec-button-copy-paste:active,.respec-button-copy-paste:hover{text-decoration:none;background-color:#ddd;background-image:linear-gradient(#eee,#ddd);border-color:#ccc}.respec-button-copy-paste.selected,.respec-button-copy-paste.zeroclipboard-is-active,.respec-button-copy-paste: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.disabled,.respec-button-copy-paste.disabled:hover,.respec-button-copy-paste:disabled,.respec-button-copy-paste: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}}"}),Ol=Object.freeze({__proto__:null,default:"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}}"}),zl=Object.freeze({__proto__:null,default:'.caniuse-stats{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:baseline;cursor:pointer}button.caniuse-cell{margin:1px 1px 0 0;border:none}.caniuse-browser{position:relative}@media print{.caniuse-cell.y::before{content:"✔️";padding:.5em}.caniuse-cell.n::before{content:"❌";padding:.5em}.caniuse-cell.a::before,.caniuse-cell.d::before,.caniuse-cell.p::before,.caniuse-cell.x::before{content:"⚠️";padding:.5em}}.caniuse-browser ul{display:none;margin:0;padding:0;list-style:none;position:absolute;left:0;z-index:2;background:#fff;margin-top:1px}.caniuse-stats a{white-space:nowrap;align-self:center;margin-left:.5em}.caniuse-cell{display:flex;color:rgba(0,0,0,.8);font-size:90%;height:.8cm;margin-right:1px;margin-top:0;min-width:3cm;overflow:visible;justify-content:center;align-items:center}li.caniuse-cell{margin-bottom:1px}.caniuse-cell:focus{outline:0}.caniuse-cell:hover{color:#000}.caniuse-cell.y{background:#8bc34a}.caniuse-cell.n{background:#e53935}.caniuse-cell.a,.caniuse-cell.d,.caniuse-cell.p,.caniuse-cell.x{background:#ffc107}.caniuse-stats .caniuse-browser:hover>ul,.caniuse-stats button:focus+ul{display:block}'}),Ul=Object.freeze({__proto__:null,default:'.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3em}.mdn details{width:100%;margin:1px 0;position:relative;z-index:10;box-sizing:border-box;padding:.4em;padding-top:0}.mdn details[open]{min-width:25ch;max-width:32ch;background:#fff;box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);border-radius:2px;z-index:11;margin-bottom:.4em}.mdn summary{text-align:right;cursor:default;margin-right:-.4em}.mdn summary span{font-family:zillaslab,Palatino,"Palatino Linotype",serif;color:#fff;background-color:#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://resources.whatwg.org/browser-logos/chrome.svg)}.mdn .edge::before,.mdn .edge_mobile::before{background-image:url(https://resources.whatwg.org/browser-logos/edge.svg)}.mdn .firefox::before,.mdn .firefox_android::before{background-image:url(https://resources.whatwg.org/browser-logos/firefox.png)}.mdn .ie::before{background-image:url(https://resources.whatwg.org/browser-logos/ie.png)}.mdn .opera::before,.mdn .opera_android::before{background-image:url(https://resources.whatwg.org/browser-logos/opera.svg)}.mdn .safari::before{background-image:url(https://resources.whatwg.org/browser-logos/safari.png)}.mdn .safari_ios::before{background-image:url(https://resources.whatwg.org/browser-logos/safari-ios.svg)}.mdn .samsunginternet_android::before{background-image:url(https://resources.whatwg.org/browser-logos/samsung.svg)}.mdn .webview_android::before{background-image:url(https://resources.whatwg.org/browser-logos/android-webview.png)}'}),Wl=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'}),Ml=Object.freeze({__proto__:null,default:".hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#717277;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#ca4706;font-weight:700}.hljs-literal{color:#0b76c5}.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#42803c}.hljs-built_in,.hljs-class .hljs-title{color:#9a6a01}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#336ae3}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"}),Fl=Object.freeze({__proto__:null,default:"var:hover{text-decoration:underline;cursor:pointer}var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)}var.respec-hl-c1{--bg-color:#f4d200}var.respec-hl-c2{--bg-color:#ff87a2}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}}"}),ql=Object.freeze({__proto__:null,default:'dfn{cursor:pointer}.dfn-panel{position:absolute;z-index:35;min-width:300px;max-width:500px;padding:.5em .75em;margin-top:.6em;font:small Helvetica Neue,sans-serif,Droid Sans Fallback;background:#fff;color:#000;box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);border-radius:2px}.dfn-panel:not(.docked)>.caret{position:absolute;top:-9px}.dfn-panel:not(.docked)>.caret::after,.dfn-panel:not(.docked)>.caret::before{content:"";position:absolute;border:10px solid transparent;border-top:0;border-bottom:10px solid #fff;top:0}.dfn-panel:not(.docked)>.caret::before{border-bottom:9px solid #a2a9b1}.dfn-panel *{margin:0}.dfn-panel b{display:block;color:#000;margin-top:.25em}.dfn-panel ul a[href]{color:#333}.dfn-panel a.self-link{font-weight:700}.dfn-panel .dfn-exported{float:right;padding:.1em;border-radius:.2em;text-align:center;white-space:nowrap;font-size:90%;background:#d1edfd;color:#040b1c;box-shadow:0 0 0 .125em #1ca5f940}.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}'}),Bl=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\nif (document.respecIsReady) {\n document.respecIsReady.then(dfnPanel);\n} else {\n dfnPanel();\n}\n\nfunction dfnPanel() {\n /** @type {HTMLElement} */\n let panel;\n document.body.addEventListener("click", event => {\n if (!(event.target instanceof HTMLElement)) return;\n\n /** @type {HTMLElement} */\n const el = event.target;\n\n const action = deriveAction(el);\n switch (action) {\n case "show": {\n if (panel) hidePanel(panel);\n /** @type {HTMLElement} */\n const dfn = el.closest("dfn, .index-term");\n panel = document.getElementById(`dfn-panel-for-${dfn.id}`);\n displayPanel(dfn, panel, { x: event.clientX, y: event.clientY });\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 break;\n }\n }\n });\n}\n\n/** @param {HTMLElement} clickTarget */\nfunction deriveAction(clickTarget) {\n const hitALink = !!clickTarget.closest("a");\n if (clickTarget.closest("dfn, .index-term")) {\n return hitALink ? null : "show";\n }\n if (clickTarget.closest(".dfn-panel")) {\n if (hitALink) {\n const clickedSelfLink = clickTarget.classList.contains("self-link");\n return clickedSelfLink ? "hide" : "dock";\n }\n const panel = clickTarget.closest(".dfn-panel");\n return panel.classList.contains("docked") ? "hide" : null;\n }\n if (document.querySelector(".dfn-panel:not([hidden])")) {\n return "hide";\n }\n return null;\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\n/** @param {HTMLElement} panel */\nfunction hidePanel(panel) {\n panel.hidden = true;\n panel.classList.remove("docked");\n}\n})()'}),Hl=Object.freeze({__proto__:null,default:'var{position:relative;cursor:pointer}var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none}var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#000}var[data-type]::after{content:attr(data-type);transform:translateX(-50%) translateY(-100%);background:#000;text-align:center;font-family:"Dank Mono","Fira Code",monospace;font-style:normal;padding:6px;border-radius:3px;color:#daca88;text-indent:0;font-weight:400}var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}'}),Gl=Object.freeze({__proto__:null,default:".assert{background:#eee;border-left:.5em solid #aaa;padding:.3em}"})}();
//# sourceMappingURL=respec-w3c.js.map