footing 0.6.6

Feature-gated foundations for Rust backend services
Documentation
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
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
/*!
 * @license
 * rapidoc v14.0.0
 * (c) 2026 Mrinmoy Majumdar <mrin9@yahoo.com>
 * SPDX-License-Identifier: MIT
 * Bundled third-party code and its licenses: ui.LICENSE.txt
 */
var Er=globalThis,La=Er.ShadowRoot&&(Er.ShadyCSS===void 0||Er.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Na=Symbol(),Fs=new WeakMap,js=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==Na)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(La&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=Fs.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Fs.set(t,e))}return e}toString(){return this.cssText}},Rs=e=>new js(typeof e=="string"?e:e+"",void 0,Na),G=(e,...t)=>new js(e.length===1?e[0]:t.reduce((r,a,n)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[n+1],e[0]),e,Na),Yc=(e,t)=>{if(La)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let a=document.createElement("style"),n=Er.litNonce;n!==void 0&&a.setAttribute("nonce",n),a.textContent=r.cssText,e.appendChild(a)}},_s=La?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let a of t.cssRules)r+=a.cssText;return Rs(r)})(e):e,{is:Qc,defineProperty:ed,getOwnPropertyDescriptor:td,getOwnPropertyNames:rd,getOwnPropertySymbols:ad,getPrototypeOf:nd}=Object,Dr=globalThis,qs=Dr.trustedTypes,sd=qs?qs.emptyScript:"",id=Dr.reactiveElementPolyfillSupport,Wt=(e,t)=>e,Cr={toAttribute(e,t){switch(t){case Boolean:e=e?sd:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Ba=(e,t)=>!Qc(e,t),Is={attribute:!0,type:String,converter:Cr,reflect:!1,useDefault:!1,hasChanged:Ba};Symbol.metadata??=Symbol("metadata"),Dr.litPropertyMetadata??=new WeakMap;var ft=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Is){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),a=this.getPropertyDescriptor(e,r,t);a!==void 0&&ed(this.prototype,e,a)}}static getPropertyDescriptor(e,t,r){let{get:a,set:n}=td(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:a,set(s){let i=a?.call(this);n?.call(this,s),this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Is}static _$Ei(){if(this.hasOwnProperty(Wt("elementProperties")))return;let e=nd(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Wt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Wt("properties"))){let t=this.properties,r=[...rd(t),...ad(t)];for(let a of r)this.createProperty(a,t[a])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,a]of t)this.elementProperties.set(r,a)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let a=this._$Eu(t,r);a!==void 0&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let a of r)t.unshift(_s(a))}else e!==void 0&&t.push(_s(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Yc(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,r);if(a!==void 0&&r.reflect===!0){let n=(r.converter?.toAttribute===void 0?Cr:r.converter).toAttribute(t,r.type);this._$Em=e,n==null?this.removeAttribute(a):this.setAttribute(a,n),this._$Em=null}}_$AK(e,t){let r=this.constructor,a=r._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let n=r.getPropertyOptions(a),s=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute===void 0?Cr:n.converter;this._$Em=a;let i=s.fromAttribute(t,n.type);this[a]=i??this._$Ej?.get(a)??i,this._$Em=null}}requestUpdate(e,t,r,a=!1,n){if(e!==void 0){let s=this.constructor;if(a===!1&&(n=this[e]),r??=s.getPropertyOptions(e),!((r.hasChanged??Ba)(n,t)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:a,wrapped:n},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),n!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),a===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[a,n]of this._$Ep)this[a]=n;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[a,n]of r){let{wrapped:s}=n,i=this[a];s!==!0||this._$AL.has(a)||i===void 0||this.C(a,void 0,n,i)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};ft.elementStyles=[],ft.shadowRootOptions={mode:"open"},ft[Wt("elementProperties")]=new Map,ft[Wt("finalized")]=new Map,id?.({ReactiveElement:ft}),(Dr.reactiveElementVersions??=[]).push("2.1.2");var za=globalThis,Ls=e=>e,Tr=za.trustedTypes,Ns=Tr?Tr.createPolicy("lit-html",{createHTML:e=>e}):void 0,Pa="$lit$",Se=`lit$${Math.random().toFixed(9).slice(2)}$`,Ua="?"+Se,od=`<${Ua}>`,We=document,Kt=()=>We.createComment(""),Vt=e=>e===null||typeof e!="object"&&typeof e!="function",Ma=Array.isArray,Bs=e=>Ma(e)||typeof e?.[Symbol.iterator]=="function",Ha=`[ 	
\f\r]`,Zt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zs=/-->/g,Ps=/>/g,Ke=RegExp(`>|${Ha}(?:([^\\s"'>=/]+)(${Ha}*=${Ha}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),Us=/'/g,Ms=/"/g,Hs=/^(?:script|style|textarea|title)$/i,u=(e=>(t,...r)=>({_$litType$:e,strings:t,values:r}))(1),ie=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),Ws=new WeakMap,Ve=We.createTreeWalker(We,129);function Ks(e,t){if(!Ma(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ns===void 0?t:Ns.createHTML(t)}var Vs=(e,t)=>{let r=e.length-1,a=[],n,s=t===2?"<svg>":t===3?"<math>":"",i=Zt;for(let o=0;o<r;o++){let l=e[o],c,d,p=-1,f=0;for(;f<l.length&&(i.lastIndex=f,d=i.exec(l),d!==null);)f=i.lastIndex,i===Zt?d[1]==="!--"?i=zs:d[1]===void 0?d[2]===void 0?d[3]!==void 0&&(i=Ke):(Hs.test(d[2])&&(n=RegExp("</"+d[2],"g")),i=Ke):i=Ps:i===Ke?d[0]===">"?(i=n??Zt,p=-1):d[1]===void 0?p=-2:(p=i.lastIndex-d[2].length,c=d[1],i=d[3]===void 0?Ke:d[3]==='"'?Ms:Us):i===Ms||i===Us?i=Ke:i===zs||i===Ps?i=Zt:(i=Ke,n=void 0);let h=i===Ke&&e[o+1].startsWith("/>")?" ":"";s+=i===Zt?l+od:p>=0?(a.push(c),l.slice(0,p)+Pa+l.slice(p)+Se+h):l+Se+(p===-2?o:h)}return[Ks(e,s+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),a]},Wa=class Wc{constructor({strings:t,_$litType$:r},a){let n;this.parts=[];let s=0,i=0,o=t.length-1,l=this.parts,[c,d]=Vs(t,r);if(this.el=Wc.createElement(c,a),Ve.currentNode=this.el.content,r===2||r===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=Ve.nextNode())!==null&&l.length<o;){if(n.nodeType===1){if(n.hasAttributes())for(let p of n.getAttributeNames())if(p.endsWith(Pa)){let f=d[i++],h=n.getAttribute(p).split(Se),y=/([.?@])?(.*)/.exec(f);l.push({type:1,index:s,name:y[2],strings:h,ctor:y[1]==="."?Js:y[1]==="?"?Gs:y[1]==="@"?Xs:Jt}),n.removeAttribute(p)}else p.startsWith(Se)&&(l.push({type:6,index:s}),n.removeAttribute(p));if(Hs.test(n.tagName)){let p=n.textContent.split(Se),f=p.length-1;if(f>0){n.textContent=Tr?Tr.emptyScript:"";for(let h=0;h<f;h++)n.append(p[h],Kt()),Ve.nextNode(),l.push({type:2,index:++s});n.append(p[f],Kt())}}}else if(n.nodeType===8)if(n.data===Ua)l.push({type:2,index:s});else{let p=-1;for(;(p=n.data.indexOf(Se,p+1))!==-1;)l.push({type:7,index:s}),p+=Se.length-1}s++}}static createElement(t,r){let a=We.createElement("template");return a.innerHTML=t,a}};function Ze(e,t,r=e,a){if(t===ie)return t;let n=a===void 0?r._$Cl:r._$Co?.[a],s=Vt(t)?void 0:t._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),s===void 0?n=void 0:(n=new s(e),n._$AT(e,r,a)),a===void 0?r._$Cl=n:(r._$Co??=[])[a]=n),n!==void 0&&(t=Ze(e,n._$AS(e,t.values),n,a)),t}var Zs=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,a=(e?.creationScope??We).importNode(t,!0);Ve.currentNode=a;let n=Ve.nextNode(),s=0,i=0,o=r[0];for(;o!==void 0;){if(s===o.index){let l;o.type===2?l=new Or(n,n.nextSibling,this,e):o.type===1?l=new o.ctor(n,o.name,o.strings,this,e):o.type===6&&(l=new Ys(n,this,e)),this._$AV.push(l),o=r[++i]}s!==o?.index&&(n=Ve.nextNode(),s++)}return Ve.currentNode=We,a}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings===void 0?r._$AI(e[t]):(r._$AI(e,r,t),t+=r.strings.length-2)),t++}},Or=class Kc{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,a,n){this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=a,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Ze(this,t,r),Vt(t)?t===F||t==null||t===""?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==ie&&this._(t):t._$litType$===void 0?t.nodeType===void 0?Bs(t)?this.k(t):this._(t):this.T(t):this.$(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==F&&Vt(this._$AH)?this._$AA.nextSibling.data=t:this.T(We.createTextNode(t)),this._$AH=t}$(t){let{values:r,_$litType$:a}=t,n=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=Wa.createElement(Ks(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===n)this._$AH.p(r);else{let s=new Zs(n,this),i=s.u(this.options);s.p(r),this.T(i),this._$AH=s}}_$AC(t){let r=Ws.get(t.strings);return r===void 0&&Ws.set(t.strings,r=new Wa(t)),r}k(t){Ma(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,a,n=0;for(let s of t)n===r.length?r.push(a=new Kc(this.O(Kt()),this.O(Kt()),this,this.options)):a=r[n],a._$AI(s),n++;n<r.length&&(this._$AR(a&&a._$AB.nextSibling,n),r.length=n)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){let a=Ls(t).nextSibling;Ls(t).remove(),t=a}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Jt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,a,n){this.type=1,this._$AH=F,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=F}_$AI(e,t=this,r,a){let n=this.strings,s=!1;if(n===void 0)e=Ze(this,e,t,0),s=!Vt(e)||e!==this._$AH&&e!==ie,s&&(this._$AH=e);else{let i=e,o,l;for(e=n[0],o=0;o<n.length-1;o++)l=Ze(this,i[r+o],t,o),l===ie&&(l=this._$AH[o]),s||=!Vt(l)||l!==this._$AH[o],l===F?e=F:e!==F&&(e+=(l??"")+n[o+1]),this._$AH[o]=l}s&&!a&&this.j(e)}j(e){e===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Js=class extends Jt{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===F?void 0:e}},Gs=class extends Jt{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==F)}},Xs=class extends Jt{constructor(e,t,r,a,n){super(e,t,r,a,n),this.type=5}_$AI(e,t=this){if((e=Ze(this,e,t,0)??F)===ie)return;let r=this._$AH,a=e===F&&r!==F||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==F&&(r===F||a);a&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Ys=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){Ze(this,e)}},ld={M:Pa,P:Se,A:Ua,C:1,L:Vs,R:Zs,D:Bs,V:Ze,I:Or,H:Jt,N:Gs,U:Xs,B:Js,F:Ys},cd=za.litHtmlPolyfillSupport;cd?.(Wa,Or),(za.litHtmlVersions??=[]).push("3.3.3");var dd=(e,t,r)=>{let a=r?.renderBefore??t,n=a._$litPart$;if(n===void 0){let s=r?.renderBefore??null;a._$litPart$=n=new Or(t.insertBefore(Kt(),s),s,void 0,r??{})}return n._$AI(e),n},Ka=globalThis,fe=class extends ft{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=dd(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ie}};fe._$litElement$=!0,fe.finalized=!0,Ka.litElementHydrateSupport?.({LitElement:fe});var pd=Ka.litElementPolyfillSupport;pd?.({LitElement:fe}),(Ka.litElementVersions??=[]).push("4.2.2");var Ae=e=>(t,r)=>{r===void 0?customElements.define(e,t):r.addInitializer(()=>{customElements.define(e,t)})},ud={attribute:!0,type:String,converter:Cr,reflect:!1,hasChanged:Ba},hd=(e=ud,t,r)=>{let{kind:a,metadata:n}=r,s=globalThis.litPropertyMetadata.get(n);if(s===void 0&&globalThis.litPropertyMetadata.set(n,s=new Map),a==="setter"&&((e=Object.create(e)).wrapped=!0),s.set(r.name,e),a==="accessor"){let{name:i}=r;return{set(o){let l=t.get.call(this);t.set.call(this,o),this.requestUpdate(i,l,e,!0,o)},init(o){return o!==void 0&&this.C(i,void 0,e,o),o}}}if(a==="setter"){let{name:i}=r;return function(o){let l=this[i];t.call(this,o),this.requestUpdate(i,l,e,!0,o)}}throw Error("Unsupported decorator location: "+a)};function S(e){return(t,r)=>typeof r=="object"?hd(e,t,r):((a,n,s)=>{let i=n.hasOwnProperty(s);return n.constructor.createProperty(s,a),i?Object.getOwnPropertyDescriptor(n,s):void 0})(e,t,r)}function ae(e){return S({...e,state:!0,attribute:!1})}function Va(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Je=Va();function Qs(e){Je=e}var Ge={exec:()=>null};function Xe(e){let t=[];return r=>{let a=Math.max(0,Math.min(3,r-1)),n=t[a];return n||(n=e(a),t[a]=n),n}}function I(e,t=""){let r=typeof e=="string"?e:e.source,a={replace:(n,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(re.caret,"$1"),r=r.replace(n,i),a},getRegex:()=>new RegExp(r,t)};return a}var ei=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),re={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Xe(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`)),hrRegex:Xe(e=>RegExp(`^ {0,${e}}((?:-[ 	]*){3,}|(?:_[ 	]*){3,}|(?:\\*[ 	]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Xe(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Xe(e=>RegExp(`^ {0,${e}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Xe(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Xe(e=>RegExp(`^ {0,${e}}(?:</?(?:${Xt})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Xe(e=>RegExp(`^ {0,${e}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},md=/^(?:[ \t]*(?:\n|$))+/,fd=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gd=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Gt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Za=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ti=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,ri=I(ti).replace(/bull/g,Za).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),bd=I(ti).replace(/bull/g,Za).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ja=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,vd=/^[^\n]+/,Ga=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,xd=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ga).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),wd=I(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Za).getRegex(),Xt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xa=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kd=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",Xa).replace("tag",Xt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ai=e=>I(Ja).replace("hr",Gt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Xt).getRegex(),$d=ai(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Sd=ai(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ya={blockquote:I(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",Sd).getRegex(),code:fd,def:xd,fences:gd,heading:yd,hr:Gt,html:kd,lheading:ri,list:wd,newline:md,paragraph:$d,table:Ge,text:vd},ni=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Xt).getRegex(),Ad={...Ya,lheading:bd,table:ni,paragraph:I(Ja).replace("hr",Gt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ni).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Xt).getRegex()},Ed={...Ya,html:I(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",Xa).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ge,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(Ja).replace("hr",Gt).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ri).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Dd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Cd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,si=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Td=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,we=/[\p{P}\p{S}]/u,gt=/[\s\p{P}\p{S}]/u,Yt=/[^\s\p{P}\p{S}]/u,Od=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,gt).getRegex(),Fd=/[\p{Pi}\p{Ps}"']/u,ii=/(?!~)[\p{P}\p{S}]/u,jd=/(?!~)[\s\p{P}\p{S}]/u,Rd=/(?:[^\s\p{P}\p{S}]|~)/u,_d=I(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ei?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),oi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,qd=I(oi,"u").replace(/punct/g,we).getRegex(),Id=I(oi,"u").replace(/punct/g,ii).getRegex(),Ld=I(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,Fd).replace(/punct/g,we).getRegex(),li="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Nd=I(li,"gu").replace(/notPunctSpace/g,Yt).replace(/punctSpace/g,gt).replace(/punct/g,we).getRegex(),Bd=I(li,"gu").replace(/notPunctSpace/g,Rd).replace(/punctSpace/g,jd).replace(/punct/g,ii).getRegex(),zd=I("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Yt).replace(/punctSpace/g,gt).replace(/punct/g,we).getRegex(),Pd=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yt).replace(/punctSpace/g,gt).replace(/punct/g,we).getRegex(),Ud=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Yt).replace(/punctSpace/g,gt).replace(/punct/g,we).getRegex(),Md=I(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,we).getRegex(),Hd=I("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Yt).replace(/punctSpace/g,gt).replace(/punct/g,we).getRegex(),Wd=I(/\\(punct)/,"gu").replace(/punct/g,we).getRegex(),Kd=I(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,we).getRegex(),Vd=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Zd=I(Xa).replace("(?:-->|$)","-->").getRegex(),Jd=I("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Zd).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ci=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Fr=I(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",ci).getRegex(),Gd=I(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Fr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Xd=I(/^!?\[(label)\]\[(ref)\]/).replace("label",Fr).replace("ref",Ga).getRegex(),Yd=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ga).getRegex(),di=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Qd=I(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",ci).getRegex(),ep=I("reflink|nolink(?!\\()","g").replace("reflink",I(/^!?\[(label)\]\[(ref)\]/).replace("label",Qd).replace("ref",di).getRegex()).replace("nolink",I(/^!?\[(ref)\](?:\[\])?/).replace("ref",di).getRegex()).getRegex(),pi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,tp=I(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),Qa={_backpedal:Ge,anyPunctuation:Wd,anyPunctuationOutsideCode:Kd,autolink:Vd,blockSkip:_d,br:si,code:Cd,del:Ge,delLDelim:Ge,delRDelim:Ge,emStrongLDelim:qd,emStrongRDelimAst:Nd,emStrongRDelimUnd:Pd,escape:Dd,link:Gd,nolink:Yd,punctuation:Od,reflink:Xd,reflinkSearch:ep,tag:Jd,text:Td,url:Ge},rp={...Qa,emStrongLDelim:Ld,emStrongRDelimAst:zd,emStrongRDelimUnd:Ud,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",Fr).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Fr).getRegex()},en={...Qa,emStrongRDelimAst:Bd,emStrongLDelim:Id,delLDelim:Md,delRDelim:Hd,url:I(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",tp).replace("protocol",pi).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:I(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",pi).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",ei?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},ap={...en,br:I(si).replace("{2,}","*").getRegex(),text:I(en.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},jr={normal:Ya,gfm:Ad,pedantic:Ed},Qt={normal:Qa,gfm:en,breaks:ap,pedantic:rp},np={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ui=e=>np[e];function oe(e,t){if(t){if(re.escapeTest.test(e))return e.replace(re.escapeReplace,ui)}else if(re.escapeTestNoEncode.test(e))return e.replace(re.escapeReplaceNoEncode,ui);return e}function sp(e){return re.numericCharacterReference.test(e)?e.replace(re.numericCharacterReferenceOrAmpersand,(t,r,a)=>{if(r===void 0&&a===void 0)return"&amp;";let n=r===void 0?Number.parseInt(a,16):Number.parseInt(r,10);return n===0||n>1114111||n>=55296&&n<=57343?"\uFFFD":n===38?"&amp;":String.fromCodePoint(n)}):e}function hi(e){try{e=encodeURI(e).replace(re.percentDecode,"%")}catch{return null}return e}function mi(e,t){let r=e.replace(re.findPipe,(n,s,i)=>{let o=!1,l=s;for(;--l>=0&&i[l]==="\\";)o=!o;return o?"|":" |"}).split(re.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(re.slashPipe,"|");return r}function Ee(e,t,r){let a=e.length;if(a===0)return"";let n=0;for(;n<a;){let s=e.charAt(a-n-1);if(s===t&&!r)n++;else if(s!==t&&r)n++;else break}return e.slice(0,a-n)}function fi(e){let t=e.split(`
`),r=t.length-1;for(;r>=0&&re.blankLine.test(t[r]);)r--;return t.length-r<=2?e:t.slice(0,r+1).join(`
`)}function Rr(e){return e.trim().replace(re.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function gi(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let r=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])r++;else if(e[a]===t[1]&&(r--,r<0))return a;return r>0?-2:-1}var yt=new WeakMap;function tn(e){let t={"*":-1,_:-1},r=-1,a=e.length;for(let n=0;n<a;n++){let s=e[n];if(s!=="*"&&s!=="_"&&s!=="~")continue;let i=n===0?`
`:e[n-1],o=n+1;for(;o<a&&e[o]===s;)o++;i!==" "&&i!=="	"&&i!==`
`&&i!=="\r"&&i!=="\f"&&(s==="~"?r=n:t[s]=n),n=o-1}return{maskedSrc:e,lastPossibleEmStrongCloserIndex:t,lastPossibleDelCloserIndex:r}}function ip(e,t){let r=tn(t),a=yt.get(e);a?a.push(r):yt.set(e,[r])}function op(e){let t=yt.get(e);t&&(t.pop(),t.length===0&&yt.delete(e))}function lp(e,t,r){let a=yt.get(e)?.at(-1);return a&&a.maskedSrc===t?a.lastPossibleEmStrongCloserIndex[r]:tn(t).lastPossibleEmStrongCloserIndex[r]}function cp(e,t){let r=yt.get(e)?.at(-1);return r&&r.maskedSrc===t?r.lastPossibleDelCloserIndex:tn(t).lastPossibleDelCloserIndex}function _r(e,t=0){let r=t,a="";for(let n of e)if(n==="	"){let s=4-r%4;a+=" ".repeat(s),r+=s}else a+=n,r++;return a}function yi(e,t,r,a,n){let s=t.href,i=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1"),l=e[0].charAt(0)==="!",c=a.state.inLink,d=a.state.linkEmitted,p=a.state.inRawBlock;a.state.inLink=!0,a.state.linkEmitted=!1;let f=a.inlineTokens(o),h=a.state.linkEmitted;if(a.state.linkEmitted=d,a.state.inLink=c,!l){if(h){a.state.inRawBlock=p;return}a.state.linkEmitted=!0}return{type:l?"image":"link",raw:r,href:s,title:i,text:o,tokens:f}}function dp(e,t,r){let a=e.match(r.other.indentCodeCompensation);if(a===null)return t;let n=a[1];return t.split(`
`).map(s=>{let i=s.match(r.other.beginningSpace);if(i===null)return s;let[o]=i;return s.slice(Math.min(o.length,n.length))}).join(`
`)}function bi(e,t,r,a){if(!t.includes("<"))return!1;for(let n=0;n<t.length;n++){if(t[n]==="\\"){n++;continue}if(t[n]==="`"){let o=a.inline.code.exec(t.slice(n));if(o){n+=o[0].length-1;continue}}if(t[n]!=="<")continue;let s=e.slice(r+n),i=a.inline.tag.exec(s)||a.inline.autolink.exec(s);if(i){if(i[0].length>t.length-n)return!0;n+=i[0].length-1}}return!1}var bt=class{options;rules;lexer;constructor(e){this.options=e||Je}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=this.options.pedantic?t[0]:fi(t[0]);return{type:"code",raw:r,codeBlockStyle:"indented",text:r.replace(this.rules.other.codeRemoveIndent,"")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],a=dp(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let a=Ee(r,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceTabChar.test(a))&&(r=a.trim())}return{type:"heading",raw:Ee(t[0],`
`),depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ee(t[0],`
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Ee(t[0],`
`).split(`
`),a="",n="",s=[];for(;r.length>0;){let i=!1,o=[],l=0;for(;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),i=!0;else if(!i)o.push(r[l]);else break;r=r.slice(l);let c=o.join(`
`),d=c.replace(this.rules.other.blockquoteMarkerWhitespace,(h,y,m)=>y+_r(m,y.length)).replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
${c}`:c,n=n?`${n}
${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=p,r.length===0)break;let f=s.at(-1);if(f?.type==="code"||f?.type==="heading"||f?.type==="hr"||f?.type==="html"||f?.type==="table")break;if(f?.type==="blockquote"){let h=f,y=r.join(`
`),m=h.raw+`
`+y.replace(this.rules.other.blockquoteSetextReplace2,""),g=this.blockquote(m);s[s.length-1]=g;let k=m.substring(g.raw.length).replace(/^\n/,""),v=k?k.split(`
`).length:0,w=v?r.slice(0,-v):r;if(w.length>0&&(a=`${a}
${w.join(`
`)}`),n=n.substring(0,n.length-h.text.length)+g.text,r=r.slice(w.length),r.length>0&&this.rules.other.blockquoteStart.test(r[0]))continue;break}if(f?.type==="list"){let h=f,y=h.raw+`
`+r.join(`
`),m=this.list(y);s[s.length-1]=m;let g=m.raw.length>h.raw.length?y.slice(h.raw.length+1,m.raw.length).split(`
`).length:0;if(g>0){let k=r.slice(0,g).join(`
`);a=`${a}
${k}`,n=`${n}
${k}`}r=r.slice(g)}}return{type:"blockquote",raw:a,tokens:s,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){if(!this.options.pedantic&&this.lexer.state.lastToken?.type==="text"&&!this.rules.other.listInterruptsParagraph.test(e))return;let r=e,a=()=>r.length-e.length,n=t[1].trim(),s=n.length>1,i={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let o=this.rules.other.listItemRegex(n),l=!1;for(;e;){let d=!1,p="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;let f=a();e=e.substring(t[0].length);let h=t[2].split(`
`,1)[0],y=t[1].length,m=this.options.pedantic?_r(h,y):h.replace(this.rules.other.leadingSpaceTab,b=>_r(b,y)),g=e.split(`
`,1)[0],k=!m.trim(),v=0;if(this.options.pedantic?(v=2,p=m.trimStart()):k?v=y+1:(v=m.search(this.rules.other.nonSpaceChar),v=v>4?1:v,p=m.slice(v),v+=y),k&&this.rules.other.blankLine.test(g)&&(e=e.substring(g.length+1),d=!0),!d){let b=this.rules.other.nextBulletRegex(v),A=this.rules.other.hrRegex(v),$=this.rules.other.fencesBeginRegex(v),E=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(v):this.rules.other.headingBeginRegex(v),D=this.rules.other.htmlBeginRegex(v),O=this.rules.other.blockquoteBeginRegex(v),j=!1;for(;e;){let R=e.split(`
`,1)[0],N;if(g=R,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting,"  "),N=g):N=g.replace(this.rules.other.leadingSpaceTab,W=>_r(W)),$.test(g)||E.test(g)||D.test(g)||O.test(g)||b.test(g)||A.test(g))break;if(N.search(this.rules.other.nonSpaceChar)>=v||!g.trim())p+=`
`+N.slice(v),j=!1;else{if(k||m.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||$.test(m)||E.test(m)||D.test(m)||A.test(m))break;if(!this.options.pedantic&&!j){let q=m.replace(this.rules.other.nestedContainerMarkers,"");if(this.rules.block.fences.test(q)||this.rules.block.heading.test(q)||this.rules.block.hr.test(q))break}let W=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(g)&&this.rules.block.lheading.test(`${m}
${g}`)?`    ${N.replace(/^ {0,3}/,"")}`:g;p+=`
`+W,j=!0}k=!g.trim(),e=e.substring(R.length+1),m=N.slice(v)}}let w=r.slice(f,a());i.loose||(l?i.loose=!0:this.rules.other.doubleBlankLine.test(w)&&(l=!0)),i.items.push({type:"list_item",raw:w,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]})}let c=i.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;i.raw=r.slice(0,a()).trimEnd();for(let d of i.items)if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),!i.loose){let p=d.tokens.filter(f=>f.type==="space");i.loose=p.length>0&&p.some(f=>this.rules.other.anyLine.test(f.raw))}for(let d of i.items){let p=d.tokens[0];if(d.task&&(p?.type==="text"||p?.type==="paragraph")){d.text=d.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let f=this.rules.other.listTaskCheckbox.exec(d.raw);if(f){let h={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};d.checked=h.checked,i.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=h.raw+d.tokens[0].raw,d.tokens[0].text=h.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(h)):d.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):d.tokens.unshift(h)}}else d.task&&=!1}if(i.loose)for(let d of i.items){d.loose=!0;for(let p of d.tokens)p.type==="text"&&(p.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let r=fi(t[0]);return{type:"html",block:!0,raw:r,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:r}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&gi(t[2],"()")!==-1)return;let r=Rr(t[1]),a=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:Ee(t[0],`
`),href:a,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=mi(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],s={type:"table",raw:Ee(t[0],`
`),header:[],align:[],rows:[]};if(r.length===a.length){for(let i of a)this.rules.other.tableAlignRight.test(i)?s.align.push("right"):this.rules.other.tableAlignCenter.test(i)?s.align.push("center"):this.rules.other.tableAlignLeft.test(i)?s.align.push("left"):s.align.push(null);for(let i=0;i<r.length;i++)s.header.push({text:r[i],tokens:this.lexer.inline(r[i]),header:!0,align:s.align[i]});for(let i of n)s.rows.push(mi(i,s.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[l]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:Ee(t[0],`
`),depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let r=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&bi(e,t[1],r,this.rules))return;let a=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;let o=Ee(a.slice(0,-1),"\\");if((a.length-o.length)%2==0)return}else{let o=gi(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=Ee(t[0].slice(0,-1),"\\");if((t[0].length-n.length)%2==0)return;let s=t[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(s=this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?s.slice(1):s.slice(1,-1)),yi(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let a=r[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&bi(e,r[1],a,this.rules))return;let n=t[Rr(r[2]||r[1])];if(!n){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return yi(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!a||!a[1]&&!a[2]&&!a[3]&&!a[4])return;let n=a[0][0],s=r===n,i=t.length-e.length,o=i;for(;!this.options.pedantic&&o>0&&t[o-1]===n;)o--;let l=[...t.slice(Math.max(0,o-2),o)].at(-1)??"",c=l==="*"||l==="_"||!!this.rules.inline.punctuation.exec(l);o<i&&(r=l);let d=o<i?c:r==="*"||r==="_"||!!this.rules.inline.punctuation.exec(r);if(a[4]&&r.match(this.rules.other.unicodeAlphaNumeric))return;let p=a[1]||a[3]||"";if(!p||!r||d){let f=[...a[0]].length-1,h,y,m=f,g=0,k=i-o+f,v=!this.options.pedantic&&!!l.trim()&&(!!p||n==="*"&&!c);if(n!=="*"&&n!=="_")return;let w=n==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,b=lp(this,t,n),A=t.length-e.length+f;if(b<A)return;t=t.slice(-1*e.length+f);let $=b-A;for(w.lastIndex=0;(a=w.exec(t))!==null&&!(a.index>$);){if(h=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!h)continue;if(y=[...h].length,a[3]||a[4]){m+=y;continue}if(a[5]||a[6]||v){if(s&&(a[5]||a[6]))break;if(k%3&&!((k+y)%3)){g+=y;continue}}if(m-=y,m>0)continue;y=Math.min(y,y+m+g);let E=[...a[0]][0].length,D=e.slice(0,f+a.index+E+y);if(Math.min(f,y)%2){let j=D.slice(1,-1);return{type:"em",raw:D,text:j,tokens:this.lexer.inlineTokens(j)}}let O=D.slice(2,-2);return{type:"strong",raw:D,text:O,tokens:this.lexer.inlineTokens(O)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return a&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!r||this.rules.inline.punctuation.exec(r))){let n=[...a[0]].length-1,s,i,o=n,l=this.rules.inline.delRDelim,c=cp(this,t),d=t.length-e.length+n;if(c<d)return;t=t.slice(-1*e.length+n);let p=c-d;for(l.lastIndex=0;(a=l.exec(t))!==null&&!(a.index>p);){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s||(i=[...s].length,i!==n))continue;if(a[3]||a[4]){o+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o);let f=[...a[0]][0].length,h=e.slice(0,n+a.index+f+i),y=h.slice(n,-n);return{type:"del",raw:h,text:y,tokens:this.lexer.inlineTokens(y)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,a;return t[2]==="@"?(r=t[1],a="mailto:"+r):(r=t[1],a=r),{type:"link",raw:t[0],text:r,href:a,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,a;if(t[2]==="@")r=t[0],a="mailto:"+r;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);r=t[0],a=t[1]==="www."?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:r,href:a,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:r?t[0]:sp(t[0]),escaped:r}}}},ge=class Ts{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Je,this.options.tokenizer=this.options.tokenizer||new bt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let r={other:re,block:jr.normal,inline:Qt.normal};this.options.pedantic?(r.block=jr.pedantic,r.inline=Qt.pedantic):this.options.gfm&&(r.block=jr.gfm,r.inline=this.options.breaks?Qt.breaks:Qt.gfm),this.tokenizer.rules=r}static get rules(){return{block:jr,inline:Qt}}static lex(t,r){return new Ts(r).lex(t)}static lexInline(t,r){return new Ts(r).inlineTokens(t)}lex(t){t=t.replace(re.carriageReturn,`
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let a=this.inlineQueue[r];this.state.inRawBlock=!1,this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],a=!1){this.tokenizer.lexer=this;let n=this.state.lastToken;this.options.pedantic&&(t=t.replace(re.tabCharGlobal,"    ").replace(re.spaceLine,""));let s=1/0;for(;t;){if(t.length<s)s=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}this.state.lastToken=r.at(-1);let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let l=r.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let l=r.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
`)?"":`
`)+i.raw,l.text+=`
`+i.text,this.inlineQueue.at(-1).src=l.text):r.push(i);continue}if((i=this.tokenizer.fences(t))||(i=this.tokenizer.heading(t))||(i=this.tokenizer.hr(t))||(i=this.tokenizer.blockquote(t))||(i=this.tokenizer.list(t))||(i=this.tokenizer.html(t))){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let l=r.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
`)?"":`
`)+i.raw,l.text+=`
`+i.raw,this.inlineQueue.at(-1).src=l.text):(this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}),r.push(i));continue}if((i=this.tokenizer.table(t))||(i=this.tokenizer.lheading(t))){t=t.substring(i.raw.length),r.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let l=r.at(-1);a&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
`)?"":`
`)+i.raw,l.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(i),a=o.length!==t.length,t=t.substring(i.raw.length)}else if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let l=r.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
`)?"":`
`)+i.raw,l.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):r.push(i)}else if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=n,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}linkInText(t){if(!t.includes("["))return!1;let r=this.tokenizer.rules.inline.link;for(let a of t.matchAll(this.tokenizer.rules.inline.blockSkip))if(r.test(a[0])&&t.charAt(a.index-1)!=="!")return!0;for(let a of t.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let n=a[0],s=n.lastIndexOf("[");if(n.charAt(0)!=="!"&&Object.hasOwn(this.tokens.links,Rr(n.slice(s+1,-1)))&&!(s>1&&this.linkInText(n.slice(1,s-1))))return!0}return!1}inlineTokens(t,r=[]){this.tokenizer.lexer=this;let a=this.state.linkParenPossible;this.state.linkParenPossible=a&&t.includes(")");try{return this.#e(t,r)}finally{this.state.linkParenPossible=a}}#e(t,r){let a=t.includes("*")||t.includes("_")||t.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==bt.prototype.emStrong||this.tokenizer.del!==bt.prototype.del?this.#a(t):t;ip(this.tokenizer,a);try{return this.#t(t,a,r)}finally{op(this.tokenizer)}}#t(t,r,a){let n=!1,s="",i=1/0;for(;t;){if(t.length<i)i=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}n||(s=""),n=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},t,a))?(t=t.substring(o.raw.length),a.push(o),!0):!1))continue;if((o=this.tokenizer.escape(t))||(o=this.tokenizer.tag(t))||(o=this.tokenizer.link(t))){t=t.substring(o.raw.length),a.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let c=a.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):a.push(o);continue}if((o=this.tokenizer.emStrong(t,r,s))||(o=this.tokenizer.codespan(t))||(o=this.tokenizer.br(t))||(o=this.tokenizer.del(t,r,s))||(o=this.tokenizer.autolink(t))||!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),a.push(o);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0,d=t.slice(1),p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(o=this.tokenizer.inlineText(l)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),n=!0;let c=a.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):a.push(o)}else if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return a}#r(t){let{blockSkip:r,tag:a,autolink:n}=this.tokenizer.rules.inline,s="",i=0,o;for(r.lastIndex=0;o=r.exec(t);){let l=o.index+(o[2]?o[2].length:0),c=o.index+o[0].length;if(t.charAt(l)==="<"){let d=t.slice(l),p=a.exec(d)||n.exec(d);if(!p){r.lastIndex=l+1;continue}c=l+p[0].length,r.lastIndex=c}s+=t.slice(i,l)+"["+"a".repeat(c-l-2)+"]",i=c}return s+t.slice(i)}#a(t){let r=t;if(this.tokens.links&&t.includes("[")){let a=this.tokenizer.rules.inline.reflinkSearch,n=s=>{let i=s.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Rr(s.slice(i+1,-1))))return s;if(i>1&&s.charAt(0)!=="!"){let o=s.slice(1,i-1);if(this.linkInText(o))return"["+o.replace(a,n)+"]["+"a".repeat(s.length-i-2)+"]"}return"["+"a".repeat(s.length-2)+"]"};r=r.replace(a,n)}return r=r.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(a,n,s)=>s?"+".repeat(a.length):n?n+a.slice(n.length,-n.length).replace(/`/g,"+")+n:a),r=this.#r(r),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r,r}infiniteLoopError(t){let r="Infinite loop on byte: "+t;if(!this.options.silent)throw Error(r)}},qr=class{options;parser;constructor(e){this.options=e||Je}space(e){return""}code({text:e,lang:t,escaped:r}){let a=(t||"").match(re.notSpaceStart)?.[0],n=e?e.replace(re.endingNewline,"")+`
`:"";return a?'<pre><code class="language-'+oe(a)+'">'+(r?n:oe(n,!0))+`</code></pre>
`:"<pre><code>"+(r?n:oe(n,!0))+`</code></pre>
`}blockquote({tokens:e}){return`<blockquote>
${this.parser.parse(e)}</blockquote>
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
`}hr(e){return`<hr>
`}list(e){let t=e.ordered,r=e.start,a="";for(let i=0;i<e.items.length;i++){let o=e.items[i];a+=this.listitem(o)}let n=t?"ol":"ul",s=t&&r!==1?' start="'+r+'"':"";return"<"+n+s+`>
`+a+"</"+n+`>
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
`}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let a="";for(let n=0;n<e.rows.length;n++){let s=e.rows[n];r="";for(let i=0;i<s.length;i++)r+=this.tablecell(s[i]);a+=this.tablerow({text:r})}return a&&=`<tbody>${a}</tbody>`,`<table>
<thead>
`+t+`</thead>
`+a+`</table>
`}tablerow({text:e}){return`<tr>
${e}</tr>
`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${oe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:r,tokens:a,autolink:n}){let s=n?oe(r,!0):this.parser.parseInline(a),i=hi(e);if(i===null)return s;e=oe(i,n);let o='<a href="'+e+'"';return t&&(o+=' title="'+oe(t)+'"'),o+=">"+s+"</a>",o}image({href:e,title:t,text:r,tokens:a}){a&&(r=this.parser.parseInline(a,this.parser.textRenderer));let n=hi(e);if(n===null)return oe(r);e=n;let s=`<img src="${oe(e)}" alt="${oe(r)}"`;return t&&(s+=` title="${oe(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:oe(e.text)}},rn=class{parser;strong({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}em({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}codespan({text:e}){return e}del({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}html({text:e}){return e}text({text:e}){return e}link({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}image({text:e,tokens:t}){return t?this.parser.parseInline(t,this):e}br(){return`
`}checkbox({raw:e}){return e}},ye=class Os{options;renderer;textRenderer;constructor(t){this.options=t||Je,this.options.renderer=this.options.renderer||new qr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new rn,this.textRenderer.parser=this}static parse(t,r){return new Os(r).parse(t)}static parseInline(t,r){return new Os(r).parseInline(t)}parse(t){this.renderer.parser=this;let r="";for(let a=0;a<t.length;a++){let n=t[a];if(this.options.extensions?.renderers?.[n.type]){let i=n,o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(i.type)){r+=o===!1?"":o??"";continue}}let s=n;switch(s.type){case"space":r+=this.renderer.space(s);break;case"hr":r+=this.renderer.hr(s);break;case"heading":r+=this.renderer.heading(s);break;case"code":r+=this.renderer.code(s);break;case"table":r+=this.renderer.table(s);break;case"blockquote":r+=this.renderer.blockquote(s);break;case"list":r+=this.renderer.list(s);break;case"checkbox":r+=this.renderer.checkbox(s);break;case"html":r+=this.renderer.html(s);break;case"def":r+=this.renderer.def(s);break;case"paragraph":r+=this.renderer.paragraph(s);break;case"text":r+=this.renderer.text(s);break;default:{let i='Token with "'+s.type+'" type was not found.';if(this.options.silent)return"";throw Error(i)}}}return r}parseInline(t,r=this.renderer){this.renderer.parser=this;let a="";for(let n=0;n<t.length;n++){let s=t[n];if(this.options.extensions?.renderers?.[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){a+=o===!1?"":o??"";continue}}let i=s;switch(i.type){case"escape":a+=r.text(i);break;case"html":a+=r.html(i);break;case"link":a+=r.link(i);break;case"image":a+=r.image(i);break;case"checkbox":a+=r.checkbox(i);break;case"strong":a+=r.strong(i);break;case"em":a+=r.em(i);break;case"codespan":a+=r.codespan(i);break;case"br":a+=r.br(i);break;case"del":a+=r.del(i);break;case"text":a+=r.text(i);break;default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return"";throw Error(o)}}}return a}},er=class{options;block;constructor(e){this.options=e||Je}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ge.lex:ge.lexInline}provideParser(e=this.block){return e?ye.parse:ye.parseInline}};function Le(e,t){if(Array.isArray(t))for(let r=0;r<t.length;r++)e.push(t[r]);else e.push(t)}var Ye=new class{defaults=Va();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ye;Renderer=qr;TextRenderer=rn;Lexer=ge;Tokenizer=bt;Hooks=er;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let a of e)switch(Le(r,t.call(this,a)),a.type){case"table":{let n=a;for(let s of n.header)Le(r,this.walkTokens(s.tokens,t));for(let s of n.rows)for(let i of s)Le(r,this.walkTokens(i.tokens,t));break}case"list":{let n=a;Le(r,this.walkTokens(n.items,t));break}default:{let n=a;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(s=>{let i=n[s].flat(1/0);Le(r,this.walkTokens(i,t))}):n.tokens&&Le(r,this.walkTokens(n.tokens,t))}}return r}use(...e){let t=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return e.forEach(r=>{let a={...r};if(a.async=this.defaults.async||a.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw Error("extension name required");if("renderer"in n){let s=t.renderers[n.name];s?t.renderers[n.name]=function(...i){let o=n.renderer.apply(this,i);return o===!1&&(o=s.apply(this,i)),o}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let s=t[n.level];s?s.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),a.extensions=t),r.renderer){let n=this.defaults.renderer||new qr(this.defaults);for(let s in r.renderer){if(!(s in n))throw Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let i=s,o=r.renderer[i],l=n[i];n[i]=(...c)=>{let d=o.apply(n,c);return d===!1&&(d=l.apply(n,c)),d===!1?"":d??""}}a.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new bt(this.defaults);for(let s in r.tokenizer){if(!(s in n))throw Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let i=s,o=r.tokenizer[i],l=n[i];n[i]=(...c)=>{let d=o.apply(n,c);return d===!1&&(d=l.apply(n,c)),d}}a.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new er;for(let s in r.hooks){if(!(s in n))throw Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let i=s,o=r.hooks[i],l=n[i];n[i]=er.passThroughHooks.has(s)?c=>{if(n.options.async&&er.passThroughHooksRespectAsync.has(s))return(async()=>{let p=await o.call(n,c);return l.call(n,p)})();let d=o.call(n,c);return l.call(n,d)}:(...c)=>{if(n.options.async)return(async()=>{let p=await o.apply(n,c);return p===!1&&(p=await l.apply(n,c)),p})();let d=o.apply(n,c);return d===!1&&(d=l.apply(n,c)),d}}a.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,s=r.walkTokens;a.walkTokens=function(i){let o=[];return Le(o,s.call(this,i)),n&&Le(o,n.call(this,i)),o}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ge.lex(e,t??this.defaults)}parser(e,t){return ye.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let a={...r},n={...this.defaults,...a},s=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&a.async===!1)return s(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let i=n.hooks?await n.hooks.preprocess(t):t,o=await(n.hooks?await n.hooks.provideLexer(e):e?ge.lex:ge.lexInline)(i,n),l=n.hooks?await n.hooks.processAllTokens(o):o;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let c=await(n.hooks?await n.hooks.provideParser(e):e?ye.parse:ye.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(c):c})().catch(s);try{n.hooks&&(t=n.hooks.preprocess(t));let i=(n.hooks?n.hooks.provideLexer(e):e?ge.lex:ge.lexInline)(t,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let o=(n.hooks?n.hooks.provideParser(e):e?ye.parse:ye.parseInline)(i,n);return n.hooks&&(o=n.hooks.postprocess(o)),o}catch(i){return s(i)}}}onError(e,t){return r=>{if(r.message+=`
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+oe(r.message+"",!0)+"</pre>";return t?Promise.resolve(a):a}if(t)return Promise.reject(r);throw r}}};function T(e,t){return Ye.parse(e,t)}T.options=T.setOptions=function(e){return Ye.setOptions(e),T.defaults=Ye.defaults,Qs(T.defaults),T},T.getDefaults=Va,T.defaults=Je;function pp(...e){return Ye.use(...e),T.defaults=Ye.defaults,Qs(T.defaults),T}T.use=pp,T.walkTokens=function(e,t){return Ye.walkTokens(e,t)},T.parseInline=Ye.parseInline,T.Parser=ye,T.parser=ye.parse,T.Renderer=qr,T.TextRenderer=rn,T.Lexer=ge,T.lexer=ge.lex,T.Tokenizer=bt,T.Hooks=er,T.parse=T,T.options,T.setOptions,T.walkTokens,T.parseInline,ye.parse,ge.lex;var vi=!1;function an(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function xi(e,{href:t,title:r,tokens:a}){if(!t?.startsWith("#")||typeof location>"u")return!1;let n=`${location.href.replace(/#.*/,"")}${t}`,s=r?` title="${an(r)}"`:"";return`<a class="anchor-link" href="${an(n)}"${s}>${e.parser.parseInline(a)}</a>`}function Ir(e){let t=e.link;e.link=function(r){let a=xi(this,r);return a===!1?t.call(this,r):a}}function wi(e){let t=e.type==="list"?e.items[0]?.tokens?.find(r=>r.type==="text"||r.type==="paragraph")?.text:e.text;return T.parseInline((t||"").replace(/\s*\n\s*/g," ").trim())}function ki(e){switch(e?.type){case"table":{let t=e.rows.length;return`<span class="descr-placeholder">Table \xB7 ${t} ${t===1?"row":"rows"}</span>`}case"code":return`<span class="descr-placeholder">Code block${e.lang?` \xB7 ${an(e.lang)}`:""}</span>`;case"html":return e.text.replace(/<(script|style)\b[\s\S]*?<\/\1>/gi,"").replace(/<[^>]*>/g," ").replace(/[<>]/g,"").replace(/\s+/g," ").trim()||'<span class="descr-placeholder">HTML content</span>';case"blockquote":{let t=e.tokens.find(r=>r.type!=="space");return t?["paragraph","heading","list","text"].includes(t.type)?wi(t):ki(t):""}default:return""}}function up(){vi||(vi=!0,T.use({renderer:{link(e){return xi(this,e)}}}))}up();var hp=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,mp=Object.hasOwnProperty,Qe=class{constructor(){this.occurrences,this.reset()}slug(e,t){let r=this,a=fp(e,t===!0),n=a;for(;mp.call(r.occurrences,a);)r.occurrences[n]++,a=n+"-"+r.occurrences[n];return r.occurrences[a]=0,a}reset(){this.occurrences=Object.create(null)}};function fp(e,t){return typeof e=="string"?(t||(e=e.toLowerCase()),e.replace(hp,"").replace(/ /g,"-")):""}var $i={astro:{scopeName:"source.astro",dependencies:["html","css","scss","javascript","typescript","tsx"],patterns:[{include:"#frontmatter"},{include:"#script"},{include:"#style"},{include:"#interpolation"},{include:"text.html.basic"}],repository:{frontmatter:{begin:"^---\\s*$",end:"^---\\s*$",beginCaptures:{0:{name:"punctuation.definition.frontmatter.begin.astro"}},endCaptures:{0:{name:"punctuation.definition.frontmatter.end.astro"}},contentName:"meta.embedded.block.astro",patterns:[{include:"source.ts"}]},script:{patterns:[{begin:"<(script)\\s*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.astro",patterns:[{include:"source.ts"}]},{include:"text.html.basic#embedded-javascript"}]},style:{patterns:[{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.scss.embedded.astro",patterns:[{include:"source.scss"}]},{include:"source.css"}]},interpolation:{begin:"\\{",end:"\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin.astro"}},endCaptures:{0:{name:"punctuation.section.embedded.end.astro"}},contentName:"meta.embedded.expression.astro",patterns:[{include:"text.html.basic#comments"},{include:"source.tsx"}]}}},bash:{scopeName:"source.shell",patterns:[{match:"^#!.*$",name:"comment.line.shebang"},{match:"(?!^#!)#.*$",name:"comment.line.number-sign"},{match:"'(?:[^']*)'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"\\$[a-zA-Z_][\\w]*|\\$\\d+|\\$[?@*#$!_-]|\\$\\{[^}]+\\}",name:"entity.name.variable"},{match:"\\b([a-zA-Z_][\\w]*)(?==)",captures:{1:{name:"entity.name.variable.assignment"}}},{match:"\\b(?:if|then|else|elif|fi|for|while|until|in|do|done|case|esac|function|select|time|coproc)\\b",name:"keyword.control"},{match:"(?:&&|\\|\\||[|&;])",name:"keyword.operator"},{match:"(?<![\\w-])--?[a-zA-Z][\\w-]*(?:=[^\\s]+)?",name:"constant.language.option"},{match:"(?<![\\w.])-?\\d+(?:\\.\\d+)?\\b",name:"constant.numeric"}]},c:{scopeName:"source.c",patterns:[{include:"#comments"},{include:"#preprocessor"},{include:"#strings"},{include:"#storage-types"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},preprocessor:{patterns:[{begin:"^\\s*#\\s*include\\b",end:"$",name:"keyword.control.directive.include",patterns:[{match:"<[^>]*>",name:"string.quoted.other.lt-gt"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},{match:"^\\s*#\\s*(?:define|undef|ifdef|ifndef|if|elif|else|endif|pragma|error|warning|line)\\b.*$",name:"keyword.control.directive"}]},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},"storage-types":{match:"\\b(?:auto|const|enum|extern|inline|register|restrict|signed|static|struct|typedef|union|unsigned|volatile)\\b",name:"storage.modifier"},keywords:{match:"\\b(?:break|case|continue|default|do|else|for|goto|if|return|sizeof|switch|while)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:char|double|float|int|long|short|void|_Bool|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|size_t|ssize_t|ptrdiff_t|FILE)\\b",name:"support.class.builtin"},constants:{match:"\\b(?:NULL|true|false)\\b",name:"constant.language"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F]+|0[bB][01]+|(?:\\d+\\.\\d*|\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?)[uUlLfF]*\\b",name:"constant.numeric"},operators:{match:"(?:->|\\+\\+|--|&&|\\|\\||<<=?|>>=?|==|!=|<=|>=|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*\\()",name:"entity.name.function"}}},cpp:{scopeName:"source.cpp",dependencies:["c"],patterns:[{include:"source.c#comments"},{include:"source.c#preprocessor"},{include:"source.c#strings"},{include:"#class-declaration"},{include:"#keywords"},{include:"source.c#storage-types"},{include:"source.c#keywords"},{include:"source.c#builtin-types"},{include:"#stl-types"},{include:"#constants"},{include:"source.c#constants"},{include:"#numbers"},{include:"#operators"},{include:"source.c#function-declaration"}],repository:{"class-declaration":{match:"\\b(class|struct|enum|namespace)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:catch|class|const_cast|constexpr|decltype|delete|dynamic_cast|explicit|export|final|friend|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|reinterpret_cast|static_assert|static_cast|template|this|throw|try|typeid|typename|using|virtual)\\b",name:"keyword.control"},"stl-types":{match:"\\bstd::(?:array|deque|forward_list|list|map|multimap|multiset|pair|priority_queue|queue|set|shared_ptr|stack|string|tuple|unique_ptr|unordered_map|unordered_set|vector|weak_ptr)\\b",name:"support.class.builtin"},constants:{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F']+|0[bB][01']+|(?:\\d[\\d']*\\.[\\d']*|\\.\\d[\\d']*|\\d[\\d']*)(?:[eE][+-]?\\d+)?)[uUlLfF]*\\b",name:"constant.numeric"},operators:{match:"(?:->\\*?|::|\\.\\.\\.|<=>|&&|\\|\\||<<=?|>>=?|==|!=|<=|>=|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"}}},csharp:{scopeName:"source.cs",patterns:[{include:"#comments"},{include:"#strings"},{include:"#attributes"},{include:"#class-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"///.*$",name:"comment.line.documentation"},{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{match:'@"(?:""|[^"])*"',name:"string.quoted.double.verbatim"},{match:'\\$@"(?:""|\\{\\{|\\}\\}|[^"])*"',name:"string.quoted.double.interpolated"},{match:'@\\$"(?:""|\\{\\{|\\}\\}|[^"])*"',name:"string.quoted.double.interpolated"},{match:'\\$"(?:\\\\.|\\{\\{|\\}\\}|[^"\\\\\\r\\n])*"',name:"string.quoted.double.interpolated"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},attributes:{match:"\\[[A-Za-z_][\\w.]*\\]",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class|interface|struct|enum|record)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:abstract|as|async|await|base|break|case|catch|checked|const|continue|default|delegate|do|else|event|explicit|extern|finally|fixed|for|foreach|goto|if|implicit|in|internal|is|lock|namespace|new|null|operator|out|override|params|partial|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|try|typeof|unchecked|unsafe|using|virtual|volatile|while|yield)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:bool|byte|char|decimal|double|dynamic|float|int|long|object|sbyte|short|string|uint|ulong|ushort|var|void)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[uUlLfFdDmM]*\\b",name:"constant.numeric"},operators:{match:"(?:=>|\\?\\?=?|\\?\\.|::|&&|\\|\\||==|!=|<=|>=|<<=?|>>=?|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*(?:<[^>]*>)?\\s*\\()",name:"entity.name.function"}}},css:{scopeName:"source.css",patterns:[{include:"#comments"},{include:"#strings"},{include:"#keyframes"},{include:"#at-rule-block"},{include:"#at-rule-statement"},{include:"#rule-set"}],repository:{comments:{begin:"/\\*",end:"\\*/",name:"comment.block"},strings:{match:`(['"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1`,name:"string.quoted"},keyframes:{begin:"(@(?:-\\w+-)?keyframes)\\s+([a-zA-Z_-][\\w-]*)\\s*\\{",end:"\\}",beginCaptures:{1:{name:"keyword.control.at-rule"},2:{name:"entity.name.animation"}},patterns:[{include:"$self"}]},"at-rule-block":{begin:"(@(?:container|counter-style|document|font-face|font-feature-values|font-palette-values|layer|media|page|position-try|scope|starting-style|supports|view-transition)\\b)[^{;]*\\{",end:"\\}",beginCaptures:{1:{name:"keyword.control.at-rule"}},patterns:[{include:"$self"}]},"at-rule-statement":{begin:"(@(?:charset|custom-media|import|namespace|property)\\b)",end:";",beginCaptures:{1:{name:"keyword.control.at-rule"}},patterns:[{include:"#comments"},{include:"#strings"},{include:"#values"}]},"rule-set":{begin:"([^\\s@{};<][^@{};<]*?)\\s*\\{",end:"\\}",beginCaptures:{1:{name:"entity.name.selector"}},patterns:[{include:"#comments"},{include:"#strings"},{include:"#keyframes"},{include:"#at-rule-block"},{include:"#at-rule-statement"},{include:"#rule-set"},{include:"#declarations"},{include:"#values"}]},declarations:{match:"(--[a-zA-Z0-9_-]+|[a-zA-Z-][\\w-]*)(\\s*:)",captures:{1:{name:"support.type.property-name"}}},values:{patterns:[{match:"!important\\b",name:"keyword.other.important"},{match:"\\b(var)\\(\\s*(--[a-zA-Z0-9_-]+)",captures:{1:{name:"entity.name.function"},2:{name:"variable.other.custom-property"}}},{match:"\\b([a-zA-Z_-][\\w-]*)(?=\\()",captures:{1:{name:"entity.name.function"}}},{match:"#(?:[0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{4}|[0-9a-fA-F]{3})\\b",name:"constant.other.color"},{match:"(?<![\\w.-])-?(?:\\d*\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?(?:%|[a-zA-Z]+)?\\b",name:"constant.numeric"},{match:"\\b(?:auto|currentColor|inherit|initial|none|normal|revert|revert-layer|transparent|unset)\\b",name:"constant.language"},{match:"(?:[+*/]|(?<=\\s)-(?!-))",name:"keyword.operator"}]}}},go:{scopeName:"source.go",patterns:[{include:"#comments"},{include:"#strings"},{include:"#function-declaration"},{include:"#type-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#builtin-types"},{include:"#builtin-functions"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:"`",end:"`",name:"string.quoted.raw"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.rune"}]},"function-declaration":{match:"\\b(func)\\s+(?:\\([^)]*\\)\\s*)?([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},"type-declaration":{match:"\\b(type)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go|goto|if|import|interface|map|package|range|return|select|struct|switch|type|var)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:nil|iota)\\b",name:"constant.language"}]},"builtin-types":{match:"\\b(?:any|bool|byte|complex64|complex128|error|float32|float64|int|int8|int16|int32|int64|rune|string|uint|uint8|uint16|uint32|uint64|uintptr)\\b",name:"support.class.builtin"},"builtin-functions":{match:"\\b(?:append|cap|close|complex|copy|delete|imag|len|make|new|panic|print|println|real|recover)\\b(?=\\s*\\()",name:"entity.name.function"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?i?)\\b",name:"constant.numeric"},operators:{match:"(?::=|\\.\\.\\.|<-|\\|\\||&&|==|!=|<=|>=|<<|>>|[+\\-*/%&|^!<>=]=?)",name:"keyword.operator"}}},html:{scopeName:"text.html.basic",dependencies:["css","json","javascript"],patterns:[{include:"#comments"},{include:"#doctype"},{include:"#embedded-css"},{include:"#embedded-json"},{include:"#embedded-javascript"},{include:"#raw-text"},{include:"#tags"},{include:"#entities"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},doctype:{match:"<![Dd][Oo][Cc][Tt][Yy][Pp][Ee]\\b[^>]*>",name:"keyword.control.doctype"},"embedded-css":{begin:`<([Ss][Tt][Yy][Ll][Ee])\\b(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Tt][Yy][Ll][Ee])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.html",patterns:[{include:"source.css"}]},"embedded-json":{begin:`<([Ss][Cc][Rr][Ii][Pp][Tt])\\b(?=[^>]*\\b[Tt][Yy][Pp][Ee]\\s*=\\s*(['"])(?:application/(?:ld\\+)?json|importmap|speculationrules)\\2)(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Cc][Rr][Ii][Pp][Tt])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.json.embedded.html",patterns:[{include:"source.json"}]},"embedded-javascript":{begin:`<([Ss][Cc][Rr][Ii][Pp][Tt])\\b(?:(?![^>]*\\b[Tt][Yy][Pp][Ee]\\s*=)|(?=[^>]*\\b[Tt][Yy][Pp][Ee]\\s*=\\s*(['"])(?:module|(?:text|application)/(?:java|ecma)script)\\2))(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Ss][Cc][Rr][Ii][Pp][Tt])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.html",patterns:[{include:"source.js"}]},"raw-text":{begin:`<([Tt][Ee][Xx][Tt][Aa][Rr][Ee][Aa]|[Tt][Ii][Tt][Ll][Ee])\\b(?:"[^"]*"|'[^']*'|[^'">])*>`,end:"</([Tt][Ee][Xx][Tt][Aa][Rr][Ee][Aa]|[Tt][Ii][Tt][Ll][Ee])[ \\t]*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"string.unquoted.raw-text"},tags:{begin:"<(/?)([a-zA-Z][\\w.-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#inline-css"},{include:"#inline-javascript"},{include:"#attributes"},{include:"#unquoted-attributes"},{include:"#boolean-attributes"}]},"inline-css":{begin:`[ \\t]+(style)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.css.embedded.inline",patterns:[{include:"source.css#comments"},{include:"source.css#strings"},{include:"source.css#declarations"},{include:"source.css#values"}]},"inline-javascript":{begin:`[ \\t]+(on[a-zA-Z][\\w-]*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.js.embedded.inline",patterns:[{include:"source.js"}]},attributes:{begin:`[ \\t]+([a-zA-Z_:][\\w:.-]*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"string.quoted.attribute-value",patterns:[{include:"#entities"}]},"unquoted-attributes":{match:"[ \\t]+([a-zA-Z_:][\\w:.-]*)\\s*=\\s*([^\\s\"'`=<>]+)",captures:{1:{name:"entity.other.attribute-name"},2:{name:"string.unquoted.attribute-value"}}},"boolean-attributes":{match:"[ \\t]+([a-zA-Z_:][\\w:.-]*)(?=[ \\t]*/?>|[ \\t]+[a-zA-Z_:])",captures:{1:{name:"entity.other.attribute-name"}}},entities:{match:"&(?:#\\d+|#x[0-9a-fA-F]+|[a-zA-Z][\\w]+);",name:"constant.character.entity"}}},http:{scopeName:"source.http",patterns:[{match:"^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|TRACE|CONNECT)\\s+([^\\s]+)\\s+(HTTP\\/[0-9.]+)",captures:{1:{name:"keyword.control.http"},2:{name:"string.unquoted.http"},3:{name:"keyword.other.http"}}},{match:"^(HTTP\\/[0-9.]+)\\s+([0-9]{3})(?:\\s+(.*))?",captures:{1:{name:"keyword.other.http"},2:{name:"constant.numeric.http"},3:{name:"string.unquoted.http"}}},{match:"^([a-zA-Z0-9_-]+):\\s*(.*)",captures:{1:{name:"support.type.property-name.http"},2:{name:"string.unquoted.http"}}}]},java:{scopeName:"source.java",patterns:[{include:"#comments"},{include:"#strings"},{include:"#annotations"},{include:"#class-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-declaration"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},annotations:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class|interface|enum|record)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},keywords:{match:"\\b(?:abstract|assert|break|case|catch|continue|default|do|else|extends|final|finally|for|goto|if|implements|import|instanceof|native|new|non-sealed|package|permits|private|protected|public|return|sealed|static|strictfp|super|switch|synchronized|this|throw|throws|transient|try|var|volatile|while|yield)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:boolean|byte|char|double|float|int|long|short|void|Boolean|Byte|Character|Double|Float|Integer|Long|Short|String|Object|List|Map|Set|ArrayList|HashMap|HashSet|Optional)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[lLfFdD]?\\b",name:"constant.numeric"},operators:{match:"(?:->|::|&&|\\|\\||==|!=|<=|>=|<<=?|>>>?=?|[+\\-*/%&|^!~<>=]=?)",name:"keyword.operator"},"function-declaration":{match:"\\b([A-Za-z_]\\w*)(?=\\s*\\()",name:"entity.name.function"}}},javascript:{scopeName:"source.js",patterns:[{include:"#comments"},{include:"#strings"},{include:"#template"},{include:"#regexp"},{include:"#jsx-closing-tag"},{include:"#jsx-tag"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#variable-declaration"},{include:"#keywords"},{include:"#numbers"},{include:"#constants"},{include:"#decorators"},{include:"#private-fields"},{include:"#properties"},{include:"#functions"},{include:"#built-ins"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"}]},template:{begin:"`",end:"(?<!\\\\)(?:\\\\\\\\)*`",name:"string.quoted.template",patterns:[{include:"#template-interpolation"}]},"template-interpolation":{begin:"\\$\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},"balanced-braces":{begin:"\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},regexp:{match:"(?<![\\w)$\\]])/(?![/*])(?:\\\\.|\\[(?:\\\\.|[^\\]\\\\])*\\]|[^/\\\\\\r\\n])+/[dgimsuvy]*",name:"string.regexp"},"jsx-closing-tag":{match:"</([A-Za-z][\\w.-]*)\\s*>",captures:{1:{name:"entity.name.tag"}}},"jsx-tag":{begin:"<([A-Za-z][\\w.-]*)",end:"/?>",beginCaptures:{1:{name:"entity.name.tag"}},patterns:[{include:"#jsx-expression"},{include:"#strings"},{include:"#jsx-boolean-attributes"},{include:"#jsx-attributes"}]},"jsx-expression":{begin:"\\{",end:"\\}",patterns:[{include:"#balanced-braces"},{include:"$self"}]},"jsx-attributes":{match:"\\b([a-zA-Z_:][\\w:.-]*)(?=\\s*(?:=|/?>))",captures:{1:{name:"entity.other.attribute-name"}}},"jsx-boolean-attributes":{match:"\\b([a-zA-Z_:][\\w:.-]*)(?=\\s+(?:[a-zA-Z_:][\\w:.-]*\\s*=|/?>))",captures:{1:{name:"entity.other.attribute-name"}}},"class-declaration":{match:"\\b(class)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(?:(async)\\s+)?(function)\\s*(\\*)?\\s*([A-Za-z_$][\\w$]*)?",captures:{1:{name:"storage.modifier.async"},2:{name:"storage.type.function"},4:{name:"entity.name.function"}}},"variable-declaration":{match:"\\b(const|let|var)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type.variable"},2:{name:"variable.other.readwrite"}}},keywords:{match:"\\b(?:as|assert|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b",name:"keyword.control"},numbers:{match:"(?<![\\w$])(?:0[xX][0-9a-fA-F](?:_?[0-9a-fA-F])*n?|0[bB][01](?:_?[01])*n?|0[oO][0-7](?:_?[0-7])*n?|\\d(?:_?\\d)*n|(?:\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?|\\.\\d(?:_?\\d)*)(?:[eE][+-]?\\d(?:_?\\d)*)?)(?![\\w$])",name:"constant.numeric"},constants:{patterns:[{match:"\\b(?:false|true)\\b",name:"constant.language.boolean"},{match:"\\b(?:Infinity|NaN|null|undefined)\\b",name:"constant.language"}]},decorators:{match:"@[A-Za-z_$][\\w$]*",name:"entity.name.decorator"},"private-fields":{match:"#[A-Za-z_$][\\w$]*",name:"variable.other.private"},properties:{match:"(?<=\\.)[A-Za-z_$][\\w$]*|[A-Za-z_$][\\w$]*(?=\\s*:)",name:"entity.name.property"},functions:{match:"\\b[A-Za-z_$][\\w$]*(?=\\s*\\()",name:"entity.name.function"},"built-ins":{match:"\\b(?:Array|BigInt|Boolean|console|customElements|Date|document|Error|JSON|Map|Math|Number|Object|Promise|Reflect|RegExp|Set|String|Symbol|WeakMap|WeakSet|window)\\b",name:"support.class"},operators:{match:"(?:=>|===|!==|==|!=|<=|>=|\\?\\?|\\?\\.|\\+\\+|--|&&|\\|\\||\\*\\*|[+*%&|^!~?:-])",name:"keyword.operator"}}},json:{scopeName:"source.json",patterns:[{match:'"(?:\\\\.|[^"\\\\])*"(?=\\s*:)',name:"entity.name.key"},{match:'"(?:\\\\.|[^"\\\\])*"(?=\\s*[,}\\]])',name:"string.quoted.double"},{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"},{match:"(?<![\\w.])-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\b",name:"constant.numeric"}]},kotlin:{scopeName:"source.kotlin",patterns:[{include:"#comments"},{include:"#strings"},{include:"#annotations"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtin-types"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\\\r\\n])'",name:"string.quoted.char"}]},annotations:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(?:(data|sealed|abstract|open|inner|enum|annotation)\\s+)?(class|interface|object)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.modifier"},2:{name:"storage.type.class"},3:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(fun)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:abstract|actual|annotation|as|break|by|catch|companion|const|constructor|continue|crossinline|data|delegate|do|dynamic|else|enum|expect|external|final|finally|for|get|if|import|in|infix|init|inline|inner|internal|is|lateinit|noinline|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|try|typealias|val|var|vararg|when|where|while)\\b",name:"keyword.control"},"builtin-types":{match:"\\b(?:Any|Array|Boolean|Byte|Char|Double|Float|Int|List|Long|Map|MutableList|MutableMap|MutableSet|Nothing|Set|Short|String|Unit)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)[fFLuU]*\\b",name:"constant.numeric"},operators:{match:"(?:->|\\?:|\\?\\.|!!|\\.\\.|::|&&|\\|\\||==|!=|<=|>=|[+\\-*/%!<>=]=?)",name:"keyword.operator"}}},markdown:{scopeName:"text.html.markdown",dependencies:["yaml"],patterns:[{include:"#front-matter"},{include:"#comments"},{include:"#fenced-code"},{include:"#headings"},{include:"#quotes"},{include:"#lists"},{include:"#links"},{include:"#inline-code"}],repository:{"front-matter":{begin:"^[ \\t]*---[ \\t]*$",end:"^[ \\t]*(?:---|\\.\\.\\.)[ \\t]*$",patterns:[{include:"source.yaml"}]},comments:{begin:"<!--",end:"-->",name:"comment.block.html"},"fenced-code":{begin:"^[ \\t]*(```+|~~~+).*$",end:"^[ \\t]*\\1[ \\t]*$",name:"string.unquoted.fenced-code"},headings:{match:"^[ \\t]{0,3}#{1,6}[ \\t]+(.+)$",captures:{1:{name:"entity.name.section"}}},quotes:{match:"^[ \\t]*>.*$",name:"comment.blockquote"},lists:{match:"^[ \\t]*(?:[-+*]|\\d+[.)])(?=[ \\t]+)",name:"keyword.control.list"},links:{match:`!?\\[([^\\]]+)\\](\\([^\\s)]+(?:\\s+['"][^'"]*['"])?\\))`,captures:{1:{name:"entity.name.link"},2:{name:"string.other.link"}}},"inline-code":{match:"(`+)(.+?)\\1",captures:{2:{name:"string.other.raw"}}}}},"objective-c":{scopeName:"source.objc",dependencies:["c"],patterns:[{include:"source.c#comments"},{include:"source.c#preprocessor"},{include:"#interface-declaration"},{include:"#directives"},{include:"#nsstring"},{include:"source.c#strings"},{include:"#method-declaration"},{include:"#language-variables"},{include:"source.c#storage-types"},{include:"source.c#keywords"},{include:"#property-attributes"},{include:"#builtin-types"},{include:"source.c#builtin-types"},{include:"#constants"},{include:"source.c#constants"},{include:"source.c#numbers"},{include:"source.c#operators"},{include:"source.c#function-declaration"}],repository:{"interface-declaration":{match:"\\b(@interface|@implementation|@protocol)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},directives:{match:"@(?:end|property|synthesize|dynamic|optional|required|class|import|selector|encode|synchronized|autoreleasepool|try|catch|finally|throw)\\b",name:"keyword.control.directive.objc"},nsstring:{match:'@"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},"method-declaration":{match:"^\\s*[-+]\\s*\\([^)]*\\)\\s*([A-Za-z_]\\w*)",captures:{1:{name:"entity.name.function"}}},"language-variables":{match:"\\b(?:self|super)\\b",name:"variable.language.objc"},"property-attributes":{match:"\\b(?:nonatomic|atomic|strong|weak|copy|assign|retain|readonly|readwrite|unsafe_unretained|nullable|nonnull|null_resettable)\\b",name:"storage.modifier"},"builtin-types":{match:"\\b(?:id|instancetype|BOOL|SEL|Class|IMP|NSInteger|NSUInteger|CGFloat|NSString|NSMutableString|NSArray|NSMutableArray|NSDictionary|NSMutableDictionary|NSNumber|NSObject|NSError|NSData|NSURL|NSNotification)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:YES|NO)\\b",name:"constant.language.boolean"},{match:"\\b(?:nil|Nil)\\b",name:"constant.language"}]}}},perl:{scopeName:"source.perl",patterns:[{include:"#comments"},{include:"#pod"},{include:"#strings"},{include:"#variables"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtins"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},pod:{begin:"^=\\w+",end:"^=cut\\b",name:"comment.block.documentation"},strings:{patterns:[{match:"qw\\s*\\(([^)]*)\\)",name:"string.quoted.other.qw"},{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"`(?:\\\\.|[^`\\\\])*`",name:"string.interpolated.backtick"}]},variables:{match:"[$@%&][A-Za-z_]\\w*(?:::\\w+)*|\\$\\{[^}]+\\}|\\$[0-9]+|\\$[!@_/\\\\,.;]",name:"entity.name.variable"},"function-declaration":{match:"\\b(sub)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:my|our|local|sub|if|elsif|else|unless|while|until|for|foreach|do|return|last|next|redo|use|no|package|require|and|or|not|xor|eq|ne|lt|gt|le|ge|cmp|given|when|default)\\b",name:"keyword.control"},builtins:{match:"\\b(?:print|printf|sprintf|push|pop|shift|unshift|splice|join|split|map|grep|sort|keys|values|each|defined|exists|delete|ref|bless|die|warn|chomp|chop|length|substr|index|lc|uc|lcfirst|ucfirst|wantarray|scalar)\\b",name:"support.class.builtin"},constants:{match:"\\bundef\\b",name:"constant.language"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"(?:=>|->|::|\\.\\.\\.?|<=>|==|!=|<=|>=|&&|\\|\\||//|=~|!~|\\*\\*|[+\\-*/%.!<>=]=?)",name:"keyword.operator"}}},php:{scopeName:"source.php",patterns:[{match:"<\\?php\\b|<\\?=|\\?>",name:"punctuation.section.embedded"},{include:"#comments"},{include:"#attributes"},{include:"#strings"},{include:"#variables"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#numbers"},{include:"#operators"},{include:"#function-call"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{match:"#(?!\\[).*$",name:"comment.line.number-sign"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},attributes:{match:"#\\[[^\\]]*\\]",name:"entity.name.decorator"},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"}]},variables:{match:"\\$[A-Za-z_]\\w*",name:"entity.name.variable"},"class-declaration":{match:"\\b(class|interface|trait|enum)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(function)\\s+&?([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|finally|fn|for|foreach|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|print|private|protected|public|readonly|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false|TRUE|FALSE)\\b",name:"constant.language.boolean"},{match:"\\b(?:null|NULL)\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"(?:->|=>|::|\\?\\?=?|<=>|===|!==|==|!=|<=|>=|\\.=|&&|\\|\\||[+\\-*/%.!<>=]=?)",name:"keyword.operator"},"function-call":{match:"\\b[A-Za-z_]\\w*(?=\\s*\\()",name:"entity.name.function"}}},powershell:{scopeName:"source.powershell",patterns:[{include:"#comments"},{include:"#strings"},{include:"#constants"},{include:"#variables"},{include:"#function-declaration"},{include:"#operators"},{include:"#keywords"},{include:"#parameters"},{include:"#cmdlets"},{include:"#numbers"}],repository:{comments:{patterns:[{begin:"<#",end:"#>",name:"comment.block"},{match:"#.*$",name:"comment.line.number-sign"}]},strings:{patterns:[{match:"'(?:''|[^'])*'",name:"string.quoted.single"},{match:'"(?:`.|[^"])*"',name:"string.quoted.double"}]},variables:{match:"\\$(?:\\{[^}]+\\}|[A-Za-z_][\\w:]*)",name:"entity.name.variable"},"function-declaration":{match:"\\b(function|filter)\\s+([A-Za-z_][\\w-]*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},operators:{match:"-(?:eq|ne|gt|lt|ge|le|like|notlike|match|notmatch|contains|notcontains|in|notin|and|or|not|xor|replace|split|join|is|isnot|as)\\b",name:"keyword.operator"},keywords:{match:"\\b(?:begin|break|catch|class|continue|do|dynamicparam|else|elseif|end|exit|finally|for|foreach|if|in|param|process|return|switch|throw|trap|try|until|while)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\$(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\$(?:null)\\b",name:"constant.language"}]},parameters:{match:"(?<![\\w-])-[A-Za-z][\\w]*",name:"constant.language.option"},cmdlets:{match:"\\b[A-Z][a-zA-Z]*-[A-Za-z]+\\b",name:"entity.name.function"},numbers:{match:"(?<![\\w.])-?\\d+(?:\\.\\d+)?(?:[kKmMgGtTpP][bB])?\\b",name:"constant.numeric"}}},python:{scopeName:"source.python",patterns:[{include:"#comments"},{include:"#strings"},{include:"#decorators"},{include:"#class-declaration"},{include:"#function-declaration"},{include:"#keywords"},{include:"#constants"},{include:"#builtins"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},strings:{patterns:[{begin:'[rRbBfFuU]{0,2}"""',end:'"""',name:"string.quoted.triple.double"},{begin:"[rRbBfFuU]{0,2}'''",end:"'''",name:"string.quoted.triple.single"},{match:'[rRbBfFuU]{0,2}"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"[rRbBfFuU]{0,2}'(?:\\\\.|[^'\\\\\\r\\n])*'",name:"string.quoted.single"}]},decorators:{match:"@[A-Za-z_][\\w.]*",name:"entity.name.decorator"},"class-declaration":{match:"\\b(class)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},"function-declaration":{match:"\\b(def)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},keywords:{match:"\\b(?:and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:True|False)\\b",name:"constant.language.boolean"},{match:"\\b(?:None|Ellipsis|NotImplemented|__debug__)\\b",name:"constant.language"},{match:"\\b(?:self|cls)\\b",name:"variable.language.python"}]},builtins:{match:"\\b(?:abs|all|any|bool|bytearray|bytes|callable|chr|classmethod|dict|dir|divmod|enumerate|filter|float|format|frozenset|getattr|hasattr|hash|hex|id|input|int|isinstance|issubclass|iter|len|list|map|max|min|next|object|oct|open|ord|pow|print|property|range|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|vars|zip)\\b(?=\\s*\\()",name:"support.class.builtin"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|(?:\\d(?:_?\\d)*)?\\.?\\d(?:_?\\d)*(?:[eE][+-]?\\d+)?[jJ]?)\\b",name:"constant.numeric"},operators:{match:"(?::=|\\*\\*|//|<=|>=|==|!=|->|[+\\-*/%@&|^~<>=])",name:"keyword.operator"}}},r:{scopeName:"source.r",patterns:[{include:"#comments"},{include:"#strings"},{include:"#function-declaration"},{include:"#keywords"},{include:"#builtins"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},strings:{patterns:[{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"}]},"function-declaration":{match:"\\b([A-Za-z_.][\\w.]*)\\s*(?=<-\\s*function\\b|=\\s*function\\b)",name:"entity.name.function"},keywords:{match:"\\b(?:if|else|repeat|while|function|for|next|break|in)\\b",name:"keyword.control"},builtins:{match:"\\b(?:c|list|vector|matrix|data\\.frame|print|cat|paste|paste0|sprintf|nrow|ncol|length|names|colnames|rownames|sapply|lapply|vapply|mapply|apply|Map|Filter|Reduce|library|require|source|setwd|getwd|summary|str|head|tail|is\\.na|is\\.null|as\\.character|as\\.numeric|as\\.integer|as\\.factor|as\\.data\\.frame)\\b",name:"support.class.builtin"},constants:{patterns:[{match:"\\b(?:TRUE|FALSE|T|F)\\b",name:"constant.language.boolean"},{match:"\\b(?:NULL|NA|NA_integer_|NA_real_|NA_character_|NA_complex_|Inf|NaN)\\b",name:"constant.language"}]},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F]+|(?:\\d+\\.\\d*|\\.\\d+|\\d+)(?:[eE][+-]?\\d+)?[Li]?)\\b",name:"constant.numeric"},operators:{match:"(?:%[^%\\s]*%|<<-|<-|->>|->|==|!=|<=|>=|&&|\\|\\||[-+*/^!<>=&|~?:])",name:"keyword.operator"}}},ruby:{scopeName:"source.ruby",patterns:[{match:"#(?!\\{).*$",name:"comment.line.number-sign"},{begin:`<<[-~]?(['"]?)([A-Z][A-Z0-9_]*)\\1`,end:"^\\2$",name:"string.unquoted.heredoc"},{match:"'(?:\\\\.|[^'\\\\])*'",name:"string.quoted.single"},{match:'"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"(?:@@|@|\\$)[a-zA-Z_][\\w]*",name:"entity.name.variable"},{match:":[a-zA-Z_][\\w]*[!?=]?",name:"constant.other.symbol"},{match:"\\b(def)\\s+([a-zA-Z_][\\w]*[!?=]?)",captures:{1:{name:"storage.type.method"},2:{name:"entity.name.function"}}},{match:"\\b(class|module)\\s+([A-Z][\\w]*(?:::[A-Z][\\w]*)*)",captures:{1:{name:"storage.type.class"},2:{name:"entity.name.type.class"}}},{match:"\\b(?:false|true)\\b",name:"constant.language.boolean"},{match:"\\bnil\\b",name:"constant.language"},{match:"\\b(?:BEGIN|END|alias|and|begin|break|case|catch|defined|do|else|elsif|ensure|for|if|in|next|not|or|redo|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\\b",name:"keyword.control"},{match:"\\b[A-Z][\\w]*(?:::[A-Z][\\w]*)*\\b",name:"entity.name.type.constant"},{match:"(?<![\\w.])-?(?:0[xX][0-9a-fA-F]+|0[bB][01]+|\\d+(?:_\\d+)*(?:\\.\\d+)?)\\b",name:"constant.numeric"}]},rust:{scopeName:"source.rust",patterns:[{include:"#comments"},{include:"#strings"},{include:"#attributes"},{include:"#function-declaration"},{include:"#type-declaration"},{include:"#macros"},{include:"#keywords"},{include:"#constants"},{include:"#builtin-types"},{include:"#lifetimes"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{patterns:[{match:"//.*$",name:"comment.line.double-slash"},{begin:"/\\*",end:"\\*/",name:"comment.block"}]},strings:{patterns:[{begin:'b?r#"',end:'"#',name:"string.quoted.raw"},{match:'b?r"[^"]*"',name:"string.quoted.raw"},{match:'b?"(?:\\\\.|[^"\\\\])*"',name:"string.quoted.double"},{match:"'(?:\\\\.|[^'\\\\])'",name:"string.quoted.char"}]},attributes:{match:"#!?\\[[^\\]]*\\]",name:"entity.name.decorator"},"function-declaration":{match:"\\b(fn)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type.function"},2:{name:"entity.name.function"}}},"type-declaration":{match:"\\b(struct|enum|trait|union|type)\\s+([A-Za-z_]\\w*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},macros:{match:"\\b[A-Za-z_]\\w*!(?=\\s*[\\(\\[{])",name:"entity.name.function.macro"},keywords:{match:"\\b(?:as|async|await|break|const|continue|crate|dyn|else|enum|extern|fn|for|if|impl|in|let|loop|match|mod|move|mut|pub|ref|return|self|Self|static|struct|super|trait|type|union|unsafe|use|where|while)\\b",name:"keyword.control"},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:None|Some|Ok|Err)\\b",name:"constant.language"}]},"builtin-types":{match:"\\b(?:bool|char|str|String|i8|i16|i32|i64|i128|isize|u8|u16|u32|u64|u128|usize|f32|f64|Vec|Option|Result|Box|Rc|Arc|RefCell|HashMap|HashSet)\\b",name:"support.class.builtin"},lifetimes:{match:"'[a-z_]\\w*\\b",name:"variable.language.lifetime"},numbers:{match:"(?<![\\w.])(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)(?:[iuf](?:8|16|32|64|128|size))?\\b",name:"constant.numeric"},operators:{match:"(?:->|=>|::|\\.\\.=?|&&|\\|\\||==|!=|<=|>=|<<|>>|[+\\-*/%&|^!<>=]=?)",name:"keyword.operator"}}},svelte:{scopeName:"source.svelte",dependencies:["html","css","scss","javascript","typescript"],patterns:[{include:"#comments"},{include:"#typescript"},{include:"#javascript"},{include:"#scss"},{include:"#css"},{include:"#blocks"},{include:"#interpolation"},{include:"#tags"},{include:"text.html.basic"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},typescript:{begin:`<(script)\\b(?=[^>]*\\blang\\s*=\\s*(['"])(?:ts|typescript)\\2)[^>]*>`,end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.svelte",patterns:[{include:"source.ts"}]},javascript:{begin:"<(script)\\b[^>]*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]},scss:{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.scss.embedded.svelte",patterns:[{include:"source.scss"}]},css:{begin:"<(style)\\b[^>]*>",end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.svelte",patterns:[{include:"source.css"}]},blocks:{match:"\\{([#/:@])\\s*(if|else|each|key|await|then|catch|snippet|render|html|debug|const)\\b",captures:{1:{name:"punctuation.definition.keyword"},2:{name:"keyword.control"}}},interpolation:{begin:"\\{(?![#/:@])",end:"\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin"}},endCaptures:{0:{name:"punctuation.section.embedded.end"}},contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]},tags:{begin:"<(/?)([a-zA-Z][\\w.:-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#directive"},{include:"#shorthand"},{include:"text.html.basic#inline-css"},{include:"text.html.basic#attributes"},{include:"text.html.basic#unquoted-attributes"},{include:"text.html.basic#boolean-attributes"}]},directive:{match:"[ \\t]+((?:bind|on|class|use|transition|in|out|animate|let):[\\w-]+(?:\\|[\\w-]+)*)",captures:{1:{name:"entity.other.attribute-name"}}},shorthand:{begin:"[ \\t]+\\{",end:"\\}",contentName:"source.js.embedded.svelte",patterns:[{include:"source.js"}]}}},toml:{scopeName:"source.toml",patterns:[{include:"#comments"},{include:"#table-headers"},{include:"#datetime"},{include:"#strings"},{include:"#keys"},{include:"#constants"},{include:"#numbers"},{include:"#operators"}],repository:{comments:{match:"#.*$",name:"comment.line.number-sign"},"table-headers":{match:"^\\s*(\\[\\[?)([^\\[\\]]+)(\\]\\]?)\\s*$",captures:{1:{name:"punctuation.definition.table"},2:{name:"entity.name.type.class"},3:{name:"punctuation.definition.table"}}},strings:{patterns:[{begin:'"""',end:'"""',name:"string.quoted.triple.double"},{begin:"'''",end:"'''",name:"string.quoted.triple.single"},{match:'"(?:\\\\.|[^"\\\\\\r\\n])*"',name:"string.quoted.double"},{match:"'[^'\\r\\n]*'",name:"string.quoted.single"}]},keys:{match:`^\\s*((?:[A-Za-z0-9_-]+|"(?:\\\\.|[^"\\\\])*"|'[^']*')(?:\\s*\\.\\s*(?:[A-Za-z0-9_-]+|"(?:\\\\.|[^"\\\\])*"|'[^']*'))*)\\s*(?==)`,captures:{1:{name:"entity.name.key"}}},constants:{patterns:[{match:"\\b(?:true|false)\\b",name:"constant.language.boolean"},{match:"\\b(?:inf|nan)\\b",name:"constant.language"}]},datetime:{match:"\\b\\d{4}-\\d{2}-\\d{2}(?:[Tt ]\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:[Zz]|[+-]\\d{2}:\\d{2})?)?\\b",name:"constant.other.date-time"},numbers:{match:"(?<![\\w.])[+-]?(?:0[xX][0-9a-fA-F_]+|0[oO][0-7_]+|0[bB][01_]+|\\d(?:_?\\d)*(?:\\.\\d(?:_?\\d)*)?(?:[eE][+-]?\\d+)?)\\b",name:"constant.numeric"},operators:{match:"=",name:"keyword.operator"}}},tsx:{scopeName:"source.tsx",dependencies:["javascript","typescript"],patterns:[{include:"source.js#comments"},{include:"source.js#strings"},{include:"source.js#template"},{include:"source.js#regexp"},{include:"source.js#jsx-closing-tag"},{include:"source.js#jsx-tag"},{include:"source.ts#type-declaration"},{include:"source.js#class-declaration"},{include:"source.js#function-declaration"},{include:"source.js#variable-declaration"},{include:"source.ts#type-keywords"},{include:"source.js#keywords"},{include:"source.js#numbers"},{include:"source.js#constants"},{include:"source.ts#builtin-types"},{include:"source.js#decorators"},{include:"source.js#private-fields"},{include:"source.js#properties"},{include:"source.js#functions"},{include:"source.js#built-ins"},{include:"source.js#operators"}]},typescript:{scopeName:"source.ts",dependencies:["javascript"],patterns:[{include:"source.js#comments"},{include:"source.js#strings"},{include:"source.js#template"},{include:"source.js#regexp"},{include:"#type-declaration"},{include:"source.js#class-declaration"},{include:"source.js#function-declaration"},{include:"source.js#variable-declaration"},{include:"#type-keywords"},{include:"source.js#keywords"},{include:"source.js#numbers"},{include:"source.js#constants"},{include:"#builtin-types"},{include:"source.js#decorators"},{include:"source.js#private-fields"},{include:"source.js#properties"},{include:"source.js#functions"},{include:"source.js#built-ins"},{include:"source.js#operators"}],repository:{"type-declaration":{match:"\\b(interface|enum|namespace|module|type)\\s+([A-Za-z_$][\\w$]*)",captures:{1:{name:"storage.type"},2:{name:"entity.name.type.class"}}},"type-keywords":{match:"\\b(?:abstract|accessor|asserts|declare|infer|keyof|override|readonly|satisfies|unique)\\b",name:"keyword.control.ts"},"builtin-types":{match:"\\b(?:any|bigint|boolean|never|number|object|string|symbol|undefined|unknown|void)\\b",name:"support.class.builtin"}}},vue:{scopeName:"text.html.vue",dependencies:["html","css","scss","javascript","typescript"],patterns:[{include:"#comments"},{include:"#typescript"},{include:"#javascript"},{include:"#scss"},{include:"#css"},{include:"#interpolation"},{include:"#tags"},{include:"text.html.basic"}],repository:{comments:{begin:"<!--",end:"-->",name:"comment.block"},typescript:{begin:`<(script)\\b(?=[^>]*\\blang\\s*=\\s*(['"])(?:ts|typescript)\\2)[^>]*>`,end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.ts.embedded.vue",patterns:[{include:"source.ts"}]},javascript:{begin:"<(script)\\b[^>]*>",end:"</(script)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},scss:{begin:`<(style)\\b(?=[^>]*\\blang\\s*=\\s*(['"])scss\\2)[^>]*>`,end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.scss.embedded.vue",patterns:[{include:"source.scss"}]},css:{begin:"<(style)\\b[^>]*>",end:"</(style)\\s*>",beginCaptures:{1:{name:"entity.name.tag"}},endCaptures:{1:{name:"entity.name.tag"}},contentName:"source.css.embedded.vue",patterns:[{include:"source.css"}]},interpolation:{begin:"\\{\\{",end:"\\}\\}",beginCaptures:{0:{name:"punctuation.section.embedded.begin"}},endCaptures:{0:{name:"punctuation.section.embedded.end"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},tags:{begin:"<(/?)([a-zA-Z][\\w.:-]*)",end:">",beginCaptures:{2:{name:"entity.name.tag"}},patterns:[{include:"#directive-value"},{include:"#directive"},{include:"text.html.basic#inline-css"},{include:"text.html.basic#attributes"},{include:"text.html.basic#unquoted-attributes"},{include:"text.html.basic#boolean-attributes"}]},"directive-value":{begin:`[ \\t]+((?:v-[\\w-]+(?::[\\w-]+)?|[:@#][\\w-]+)(?:\\.[\\w-]+)*)\\s*=\\s*(['"])`,end:"\\2",beginCaptures:{1:{name:"entity.other.attribute-name"},2:{name:"punctuation.definition.string.begin"}},endCaptures:{0:{name:"punctuation.definition.string.end"}},contentName:"source.js.embedded.vue",patterns:[{include:"source.js"}]},directive:{match:"[ \\t]+((?:v-[\\w-]+(?::[\\w-]+)?|[:@#][\\w-]+)(?:\\.[\\w-]+)*)",captures:{1:{name:"entity.other.attribute-name"}}}}},yaml:{scopeName:"source.yaml",patterns:[{match:"#.*$",name:"comment.line.number-sign"},{match:"^(?:---|\\.\\.\\.)\\s*$|^%YAML\\b.*$",name:"keyword.control.document"},{match:"^\\s*(?:-\\s+)?([^#\\s][^\\r\\n:#]*?)(?=\\s*:)",captures:{1:{name:"entity.name.key"}}},{match:"[&*][a-zA-Z_][\\w-]*|![^\\s]+",name:"entity.name.anchor"},{match:`(['"])(?:\\\\.|(?!\\1)[^\\\\\\r\\n]|\\r?\\n[ \\t]+)*\\1`,name:"string.quoted"},{match:"(?<=:\\s)[|>][-+]?\\s*$",name:"keyword.control.block-scalar"},{match:"\\b(?:true|false|yes|no|on|off)\\b",name:"constant.language.boolean"},{match:"\\bnull\\b|~",name:"constant.language"},{match:"(?<![\\w.-])-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:e[+-]?\\d+)?\\b",name:"constant.numeric"}]}},Si=new Map;Object.values($i).forEach(e=>{e?.scopeName&&Si.set(e.scopeName,e)});var gp={"c++":"cpp",cs:"csharp",curl:"bash",js:"javascript",jsx:"javascript",markup:"html",md:"markdown",objc:"objective-c",ps1:"powershell",py:"python",rb:"ruby",sh:"bash",shell:"bash",svg:"html",ts:"typescript",xml:"html",yml:"yaml",zsh:"bash"},yp={indices:[[1/0,1/0]]},tr=new Map,bp=e=>{let t=e.split("."),[r,a,n]=t,s=t.at(-1);if(r==="markup"&&["quote","inserted","deleted","raw"].includes(a))return a;if(r==="entity"&&a==="name")return n;if(e.startsWith("constant.character.entity"))return"character-entity";if(t.includes("numeric"))return"numeric";if(e.startsWith("support.type.property-name"))return"property";if(t.includes("attribute-value"))return"attribute-value";if(e.startsWith("string.other.link"))return"link";if(["doctype","at-rule","important","regexp","boolean","symbol","operator","attribute-name"].includes(s))return s;if(["comment","string","constant","storage","keyword","variable","punctuation","entity","support"].includes(r))return r},Lr=(e,t,r,a)=>{let n=bp(a);if(!n||t===r)return;let s=new Range;s.setStart(e,t),s.setEnd(e,r),tr.has(n)||tr.set(n,new Highlight),tr.get(n).add(s)},nn=(e,t,r={})=>{Object.entries(r).forEach(([a,n])=>{let s=t.indices[+a];s&&Lr(e,...s,n.name)})},vp=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),xp=(e,t)=>e.replace(/\\(\d+)/g,(r,a)=>t[a]===void 0?r:vp(t[a])),Ai=e=>e?Array.isArray(e)?e:e.match||e.begin||e.include?[e]:e.patterns||[]:[],wp=(e,t,r)=>{if(e==="$self")return{grammar:t,rules:t.patterns};if(e==="$base")return{grammar:r,rules:r.patterns};if(e[0]==="#")return{grammar:t,rules:Ai(t.repository?.[e.slice(1)])};let[a,n]=e.split("#"),s=Si.get(a);return s?{grammar:s,rules:n?Ai(s.repository?.[n]):s.patterns}:null},Ei=(e,t,r,a=new Set)=>{let n=[];return e.forEach(s=>{if(s.include){let i=`${t.scopeName}:${s.include}`;if(a.has(i))return;let o=wp(s.include,t,r);if(!o)return;let l=new Set(a);l.add(i),n.push(...Ei(o.rules,o.grammar,r,l))}else(s.match||s.begin&&s.end)&&n.push({grammar:t,rule:s})}),n},sn=new Map,on=new Map,Di=(e,t,r,a)=>{let n=on.get(e);if(!n||n.indices[0][0]<r){sn.has(e)||sn.set(e,new RegExp(e,"dgm"));let s=sn.get(e);s.lastIndex=r,n=s.exec(t.data)||yp,on.set(e,n)}return n.indices[0][0]<a&&n.indices[0][1]<=a?n:null},kp=(e,t,r,a)=>{let n=null;return t.forEach(s=>{let i=Di(s.rule.match||s.rule.begin,e,r,a);i&&(!n||i.indices[0][0]<n.match.indices[0][0])&&(n={...s,match:i})}),n},Ci=(e,t,r,a,n,s=n,i=null)=>{let o=Ei(t,n,s),l=r;for(;l<a;){let c=kp(e,o,l,a),d=i?Di(i.pattern,e,l,a):null,p=c?.match.indices[0][0]??1/0,f=d?.indices[0][0]??1/0;if(d&&(f<p||f===p&&!i?.applyEndPatternLast))return{contentEnd:f,end:d.indices[0][1],match:d};if(!c)return{contentEnd:a,end:a,match:null};let{rule:h,match:y,grammar:m}=c;if(h.match){h.name&&Lr(e,...y.indices[0],h.name),nn(e,y,h.captures),l=y.indices[0][1]>l?y.indices[0][1]:l+1;continue}let g=Ci(e,h.patterns||[],y.indices[0][1],a,m,s,{pattern:xp(h.end,y),applyEndPatternLast:h.applyEndPatternLast});h.name&&Lr(e,y.indices[0][0],g.end,h.name),h.contentName&&Lr(e,y.indices[0][1],g.contentEnd,h.contentName),nn(e,y,h.beginCaptures||h.captures),g.match&&nn(e,g.match,h.endCaptures||h.captures),l=g.end>l?g.end:l+1}return{contentEnd:a,end:a,match:null}},Ti=e=>{let t=e.parentElement,r=a=>!a||!a.classList?null:[...a.classList].find(n=>n.startsWith("language-"))?.slice(9);return(r(e)||e.dataset?.language||r(t)||t?.dataset?.language||t?.getAttribute?.("lang")||"").toLowerCase()},$p=e=>gp[e]||e,Sp=(e=document)=>{let t=[],r=new Set,a=n=>{if(n&&!r.has(n)&&(r.add(n),n.querySelectorAll)){let s=n.querySelectorAll("pre > code");t.push(...s);let i=n.querySelectorAll("*");for(let o=0;o<i.length;o++){let l=i[o];l.shadowRoot&&a(l.shadowRoot)}}};return a(e),t},ln=!1,Ap=(e=document)=>{if(typeof window>"u"||typeof CSS>"u"||!CSS.highlights)return;let t=Sp(e).filter(Ti);t.length!==0&&(tr.forEach((r,a)=>{CSS.highlights.get(a)===r&&CSS.highlights.delete(a),r.clear()}),t.forEach(r=>{let a=$i[$p(Ti(r))];if(!a)return;let n=Array.from(r.childNodes).filter(s=>s.nodeType===Node.TEXT_NODE&&s.data?.length>0);n.length!==0&&(on=new Map,n.forEach(s=>{Ci(s,a.patterns,0,s.data.length,a)}))}),tr.forEach((r,a)=>{r.size&&CSS.highlights.set(a,r)}))},Nr=(e=document)=>{typeof window<"u"&&typeof CSS<"u"&&CSS.highlights&&(ln||(ln=!0,requestAnimationFrame(()=>{ln=!1,Ap(e)})))},et=G`.hover-bg:hover{background:var(--muted)}::selection{background:var(--selection-bg);color:var(--selection-fg)}.regular-font{font-family:var(--font-sans)}.mono-font{font-family:var(--font-mono)}.title{font-size:calc(var(--font-size-small) + 1.125rem);text-wrap:balance;font-weight:400}.sub-title{font-size:var(--h3-font-size);text-wrap:balance}.req-res-title{font-family:var(--font-sans);font-size:calc(var(--font-size-small) + .25rem);text-align:start;text-wrap:balance;margin-bottom:.5rem;font-weight:700}.tiny-title{font-size:calc(var(--font-size-small) + 1px);font-weight:700}.regular-font-size{font-size:var(--font-size-regular)}.small-font-size{font-size:var(--font-size-small)}.upper{text-transform:uppercase}.primary-text{color:var(--primary)}.bold-text{font-weight:700}.gray-text{color:var(--muted-foreground)}.red-text{color:var(--destructive)}.blue-text{color:var(--blue)}.multiline{max-height:var(--resp-area-height);color:var(--muted-foreground);overflow:scroll}.method-fg{color:var(--method-default)}.method-fg.put{color:var(--method-put)}.method-fg.post{color:var(--method-post)}.method-fg.get{color:var(--method-get)}.method-fg.delete{color:var(--method-delete)}.method-fg.head{color:var(--method-head)}.method-fg.patch{color:var(--method-patch)}.method-fg.options{color:var(--method-options)}.method-fg.trace{color:var(--method-trace)}.method-fg.query{color:var(--method-query)}.method-fg.copy,.method-fg.purge{color:var(--method-default)}h1,h2,h3,h4,h5,h6,.rapidoc-heading:is(h1,h2,h3,h4,h5,h6){font-family:var(--heading-font);font-weight:var(--heading-weight);line-height:var(--heading-line-height);letter-spacing:var(--heading-letter-spacing);color:var(--heading-color);margin-block:var(--heading-margin-top) var(--heading-margin-bottom);text-wrap:balance;padding:0}h1,h1.rapidoc-heading{font-size:var(--h1-font-size)}h2,h2.rapidoc-heading{font-size:var(--h2-font-size)}h3,h3.rapidoc-heading{font-size:var(--h3-font-size)}h4,h4.rapidoc-heading{font-size:var(--h4-font-size)}h5,h5.rapidoc-heading{font-size:var(--h5-font-size)}h6,h6.rapidoc-heading{font-size:var(--h6-font-size)}:is(h1,h2,h3,h4,h5,h6):first-child,.rapidoc-heading:is(h1,h2,h3,h4,h5,h6):first-child{margin-block-start:0}.rapidoc-heading.label-heading{font-size:var(--label-heading-font-size);font-weight:var(--heading-weight);letter-spacing:.04em;text-transform:uppercase;margin-block:16px 6px;line-height:1.4}.rapidoc-heading.label-heading.req-res-title{font-size:calc(var(--font-size-small) + .25rem);margin-block:0 .5rem}.rapidoc-heading.label-heading.tiny-title{font-size:calc(var(--font-size-small) + 1px);margin-block:0 8px}.table-title{font-size:var(--font-size-small);vertical-align:middle;margin:12px 0 4px;font-weight:600}.table-title>.rapidoc-heading.label-heading{margin:0}.visually-hidden{clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}p{margin-block-start:.5em}a{color:var(--primary-text);text-underline-offset:.2em;cursor:pointer;text-decoration:none}a:hover,a:focus-visible{text-decoration:underline}code,pre{font-family:var(--font-mono);font-size:calc(var(--font-size-mono) - 1px);margin:0}.m-markdown,.m-markdown-small{color:var(--foreground);overflow-wrap:anywhere;display:block}.m-markdown p,.m-markdown span{font-size:var(--font-size-regular);line-height:var(--line-height);color:inherit}.m-markdown li{font-size:var(--font-size-regular);line-height:var(--line-height);color:inherit;margin-block:.25em}.m-markdown-small p,.m-markdown-small span{font-size:var(--font-size-description);line-height:calc(var(--font-size-description) + 6px);color:inherit}.m-markdown-small li{font-size:var(--font-size-description);line-height:calc(var(--font-size-description) + 8px);color:inherit;margin-block:3px}.m-markdown strong,.m-markdown b,.m-markdown-small strong,.m-markdown-small b{color:var(--foreground);font-weight:600}.m-markdown h1,.m-markdown h2,.m-markdown h3,.m-markdown h4,.m-markdown h5,.m-markdown h6,.m-markdown-small h1,.m-markdown-small h2,.m-markdown-small h3,.m-markdown-small h4,.m-markdown-small h5,.m-markdown-small h6{color:var(--foreground)}.m-markdown p:not(:first-child){margin-block-start:var(--paragraph-spacing)}.m-markdown-small p:not(:first-child){margin-block-start:12px}.m-markdown-small p:first-child{margin-block-start:0}.m-markdown p,.m-markdown-small p{margin-block-end:0}.m-markdown code span{font-size:var(--font-size-mono)}.m-markdown-small code,.m-markdown code{border-radius:min(var(--radius), .5rem);color:var(--foreground);background-color:var(--muted);font-size:calc(var(--font-size-mono));padding:1px 6px;line-height:1.2}.m-markdown-small code{font-size:calc(var(--font-size-mono) - 1px);padding:1px 5px}.m-markdown-small pre,.m-markdown pre{white-space:pre-wrap;overflow-wrap:normal;border-radius:min(var(--radius), .5rem);border:1px solid var(--input);line-height:normal;overflow-x:auto}.m-markdown pre{background:var(--code-bg);color:var(--foreground);padding:12px;& code{color:var(--foreground);background:0 0;border:none;padding:0}}.m-markdown-small pre{background:var(--code-bg);color:var(--card-foreground);margin-top:4px;padding:2px 4px;& code{color:var(--card-foreground);background:0 0;border:none;padding:0}}.m-markdown ul,.m-markdown ol{padding-inline-start:30px}.m-markdown-small ul,.m-markdown-small ol{padding-inline-start:20px}.m-markdown-small a,.m-markdown a{color:var(--primary-text);text-decoration:underline;text-decoration-color:color-mix(in srgb, var(--primary-text) 40%, transparent)}.m-markdown-small a:hover,.m-markdown-small a:focus-visible,.m-markdown a:hover,.m-markdown a:focus-visible{text-decoration-color:var(--primary-text)}.m-markdown-small img,.m-markdown img{max-width:100%}.m-markdown-small table,.m-markdown table{border-spacing:0;border-collapse:separate;border:1px solid var(--border);border-radius:min(var(--radius), .5rem);font-size:calc(var(--font-size-small) + 1px);line-height:calc(var(--font-size-small) + 4px);width:max-content;max-width:100%;margin:10px 0;display:block;overflow-x:auto}.m-markdown-small table{font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 2px);margin:8px 0}.m-markdown-small td,.m-markdown-small th,.m-markdown td,.m-markdown th{vertical-align:top;border-top:1px solid var(--border);line-height:calc(var(--font-size-small) + 4px)}.m-markdown-small tr:first-child th,.m-markdown tr:first-child th{border-top:0}.m-markdown th,.m-markdown td{padding:10px 12px}.m-markdown-small th,.m-markdown-small td{padding:8px}.m-markdown th,.m-markdown-small th{background:var(--card);vertical-align:middle;font-weight:600}.m-markdown-small table code,.m-markdown table code{font-size:calc(var(--font-size-mono) - 1px)}.m-markdown blockquote,.m-markdown-small blockquote{border-inline-start:3px solid var(--border);margin-inline:0;padding:6px 0 6px 6px}.m-markdown hr{border:1px solid var(--border)}`,rr=G`.btn{border-radius:var(--radius);font-weight:600;font-size:var(--font-size-small);vertical-align:middle;text-align:center;white-space:nowrap;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);color:var(--primary);user-select:none;cursor:pointer;outline:0;justify-content:center;align-items:center;padding:.45em 1em;line-height:1.25;transition:background .2s,color .2s,border-color .2s,transform .1s;display:inline-flex;&:hover{background:color-mix(in srgb, var(--primary) 28%, transparent);color:var(--foreground)}&:disabled{background:var(--muted);color:var(--muted-foreground);border-color:var(--border);cursor:not-allowed;opacity:.4;box-shadow:none}&:active{filter:brightness(85%);transition:scale;transform:scale(.97)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.btn-primary,.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--primary-foreground);&:hover{background:var(--primary);filter:brightness(110%);color:var(--primary-foreground)}}.btn-secondary,.btn.secondary{background:var(--muted);border-color:var(--border);color:var(--foreground);box-shadow:none;&:hover{background:color-mix(in srgb, var(--muted) 80%, var(--foreground));color:var(--foreground)}}.btn-outline,.btn.thin-border{border-width:1px;border-color:var(--input);background:color-mix(in srgb, var(--foreground) 5%, transparent);color:var(--foreground);box-shadow:none;&:hover{background:var(--muted);border-color:var(--muted-foreground);color:var(--foreground)}}.btn-ghost,.btn.ghost{color:var(--muted-foreground);box-shadow:none;background:0 0;border-color:#0000;&:hover{background:var(--muted);color:var(--foreground)}}.btn-destructive,.btn.destructive{border-color:var(--method-delete);background:color-mix(in srgb, var(--method-delete) 15%, transparent);color:var(--method-delete);&:hover{background:var(--method-delete);color:#fff}}.btn-link,.btn.link{color:var(--primary-text);box-shadow:none;text-decoration:underline;text-decoration-color:color-mix(in srgb, var(--primary-text) 40%, transparent);text-underline-offset:.2em;background:0 0;border-color:#0000;padding:0;text-decoration-thickness:1px}.btn-link:hover,.btn-link:focus-visible,.btn.link:hover,.btn.link:focus-visible{text-decoration-color:var(--primary-text);background:0 0}.btn-lg,.btn.large{font-size:var(--font-size-regular);padding:.55em 1.1em}.btn-sm,.btn.small{font-size:var(--font-size-small);padding:.3em .75em}.btn-xs,.btn.tiny{font-size:var(--font-size-xs);padding:.2em .5em}.btn-icon,.btn.circle{border-radius:50%;width:calc(2.15em + 2px);min-width:calc(2.15em + 2px);height:calc(2.15em + 2px);padding:.35em}.btn.nav{border:1px solid var(--primary);&:hover{background:var(--primary)}}.badge{border-radius:var(--radius);font-size:var(--font-size-xs);white-space:nowrap;background:var(--primary);color:var(--primary-foreground);user-select:none;border:1px solid #0000;justify-content:center;align-items:center;padding:2px 6px;font-weight:600;line-height:1;display:inline-flex}.badge-secondary{background:var(--muted);color:var(--foreground);border-color:var(--border)}.badge-outline{color:var(--foreground);border-color:var(--border);background:0 0}.badge-destructive{background:color-mix(in srgb, var(--method-delete) 15%, transparent);color:var(--method-delete);border-color:var(--method-delete)}.badge-sm{font-size:var(--font-size-xs);padding:1px 4px}.input,input,textarea,select,pre{color:var(--foreground);background:var(--input-background);border:1px solid var(--input);border-radius:var(--radius);outline:none}textarea,pre{border-radius:min(var(--radius), .5rem)}pre{background:var(--code-bg)}button{font-family:var(--font-sans);color:var(--foreground)}.input,pre,select,textarea,input[type=file],input[type=text],input[type=password]{font-family:var(--font-mono);font-weight:400;font-size:var(--font-size-small);padding:6px 8px;transition:border-color .2s,box-shadow .2s}.input,select,input[type=text],input[type=password]{vertical-align:middle;padding:.45em .75em;line-height:1.25}.input:focus,.input:focus-visible,input[type=text]:focus,input[type=text]:focus-visible,input[type=password]:focus,input[type=password]:focus-visible,textarea:focus,textarea:focus-visible{border-color:var(--primary);box-shadow:var(--focus-shadow)}.input-sm{font-size:var(--font-size-small);padding:.3em .5em}select{font-family:var(--font-sans);-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20d%3D%22M10.3%203.3L6%207.6%201.7%203.3A1%201%200%2000.3%204.7l5%205a1%201%200%20001.4%200l5-5a1%201%200%2010-1.4-1.4z%22%20fill%3D%22%23777777%22%2F%3E%3C%2Fsvg%3E);background-position:calc(100% - 5px);background-repeat:no-repeat;background-size:10px;padding-right:2.25em}select:hover{border-color:var(--primary)}@supports (appearance:base-select){select,select::picker(select){appearance:base-select}select{background-image:none;justify-content:space-between;align-items:center;padding-right:.75em;display:inline-flex}select:focus-visible{border-color:var(--primary);box-shadow:var(--focus-shadow);outline:none}select::picker(select){background:var(--input-background);color:var(--foreground);border:1px solid var(--input);border-radius:var(--radius);font-family:var(--font-sans);font-size:var(--font-size-small);scrollbar-width:thin;scrollbar-color:var(--input) var(--input-background);padding:4px;box-shadow:0 4px 16px #00000040}select option{border-radius:var(--radius);color:var(--foreground);cursor:pointer;font-family:var(--font-sans);font-size:var(--font-size-small);background:0 0;align-items:center;padding:4px 6px;transition:background .15s,color .15s;display:flex}select option:hover,select option:focus-visible{background:var(--primary);color:var(--primary-foreground)}select option:checked{background:color-mix(in srgb, var(--primary) 8%, transparent);color:var(--foreground);font-weight:500}select option:checked:hover,select option:checked:focus-visible{background:var(--primary);color:var(--primary-foreground)}select::picker-icon{content:"";background-color:var(--muted-foreground);transform-origin:50%;justify-content:center;align-items:center;width:12px;height:12px;margin-left:8px;transition:transform .2s,background-color .15s;display:inline-flex;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") 50%/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") 50%/contain no-repeat}select:hover::picker-icon{background-color:var(--primary)}select:open::picker-icon{transform:rotate(180deg)}select option::checkmark{content:"➜";width:14px;height:14px;line-height:1;font-size:var(--font-size-xs);color:var(--primary);flex-shrink:0;justify-content:center;align-items:center;margin-right:8px;display:inline-flex}select option:not(:checked)::checkmark{visibility:hidden}select option:hover::checkmark,select option:focus-visible::checkmark,select option:checked:hover::checkmark,select option:checked:focus-visible::checkmark{color:var(--primary-foreground)}}textarea::placeholder,input[type=text]::placeholder,input[type=password]::placeholder{color:var(--muted-foreground);opacity:1}input[type=file]{font-family:var(--font-sans);cursor:pointer;background:var(--input-background);border:1px solid var(--input);border-radius:var(--radius);padding:calc(.45em - 1px)}input[type=file]::file-selector-button,input[type=file]::-webkit-file-upload-button{font-family:var(--font-sans);font-size:var(--font-size-small);cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-foreground);border-radius:var(--radius);-webkit-appearance:none;outline:none;padding:.3em .75em;line-height:1.25}input[type=file]::file-selector-button,input[type=file]::file-selector-button{font-family:var(--font-sans);font-size:var(--font-size-small);cursor:pointer;border:1px solid var(--primary);background:var(--primary);color:var(--primary-foreground);border-radius:var(--radius);-webkit-appearance:none;outline:none;padding:.3em .75em;line-height:1.25}pre,textarea{scrollbar-width:thin;scrollbar-color:var(--input) var(--input-background)}pre::-webkit-scrollbar,textarea::-webkit-scrollbar{width:8px;height:8px}pre::-webkit-scrollbar-track,textarea::-webkit-scrollbar-track{background:var(--input-background)}pre::-webkit-scrollbar-thumb,textarea::-webkit-scrollbar-thumb{background:var(--input);border-radius:2px}.link{font-size:var(--font-size-small);text-decoration:underline;text-decoration-color:color-mix(in srgb, var(--primary-text) 40%, transparent);text-underline-offset:.2em;color:var(--primary-text);font-family:var(--font-mono);margin-bottom:2px}input[type=checkbox]{appearance:none;box-sizing:border-box;width:3em;height:1.5em;font-size:var(--font-size-small);vertical-align:middle;background:var(--muted);border:1px solid var(--input);cursor:pointer;border-radius:999px;flex:none;margin:0;transition:background-color .2s,border-color .2s;position:relative;&:after{content:"";background:var(--background);border-radius:50%;width:calc(1.5em - 4px);height:calc(1.5em - 4px);transition:transform .2s;position:absolute;top:1px;left:1px;box-shadow:0 1px 2px #0000004d}&:checked{background:var(--green);border-color:var(--green)}&:checked:after{transform:translate(1.5em)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}&:disabled{opacity:.5;cursor:not-allowed}@media (prefers-reduced-motion:reduce){&,&:after{transition:none}}}`,Br=G`.row,.col{display:flex}.row{flex-direction:row;align-items:center}.col{flex-direction:column;align-items:stretch}`,Oi=G`.auth-status{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.5rem;display:flex}.auth-list{border:1px solid var(--border);border-radius:min(var(--radius), .5rem);background:color-mix(in srgb, var(--card) 80%, transparent);font-size:var(--font-size-small);direction:ltr;margin:0;padding:0;line-height:1.5;list-style:none;container-type:inline-size}.auth-scheme{padding:calc(var(--auth-scheme-padding) * 1.5);overflow-wrap:break-word;margin:0;&+.auth-scheme{border-top:1px solid var(--border)}}.auth-scheme-body,.oauth-flow{flex-direction:column;align-items:flex-start;gap:.75em;display:flex;&>*{max-width:100%;margin:0}}.auth-scheme-header{flex-wrap:wrap;align-items:center;gap:.5em;display:flex}.auth-scheme-title{font-size:var(--font-size-regular);font-weight:600}.auth-scheme-body>.m-markdown,.auth-hint,.auth-host-note{max-width:70ch}.auth-host-toggle{font-size:var(--font-size-small)}.auth-controls{grid-template-columns:repeat(auto-fill,minmax(12em,16em));align-items:center;gap:.5em;width:100%;display:grid;&>:is(input,select){box-sizing:border-box;width:100%;min-width:0}&>.btn{justify-self:start}}.oauth-flow{padding-block:1.25em;&+.oauth-flow{border-top:1px dashed var(--border)}&:last-child{padding-bottom:0}&>.tiny-title{margin:0}}.oauth-urls{grid-template-columns:max-content minmax(0,1fr);gap:.25em 1.5em;display:grid;&>dt{color:var(--muted-foreground)}&>dd{overflow-wrap:anywhere;margin:0}}.oauth-scopes-label{color:var(--muted-foreground);margin-bottom:-.25em}.oauth-scopes{flex-direction:column;gap:.5em;display:flex}.oauth-scope-name{color:var(--foreground)}.oauth-scope-descr{color:var(--muted-foreground);&:before{content:"– "}}.auth-toggle{cursor:pointer;align-items:flex-start;gap:.625em;display:inline-flex}.oauth-resp-display:empty{display:none}@container (width<=30rem){.auth-controls{grid-template-columns:minmax(0,1fr)}.oauth-urls{grid-template-columns:minmax(0,1fr);&>dd+dt{margin-top:.375em}}}.operation-security{min-width:0;max-width:100%;font-size:var(--font-size-small);align-items:flex-start;gap:.375em;margin:0 0 12px;line-height:1.25;display:flex}.security-chips{align-items:center;row-gap:6px;&>li{align-items:center;display:inline-flex}}.value-list-items.security-chips>li:not(:last-child):after{content:"OR";font-size:var(--font-size-xs);letter-spacing:.04em;margin-inline:.625em}.security-chip{min-width:0;max-width:100%;color:var(--foreground);background:color-mix(in srgb, var(--card) 80%, transparent);border:1px solid var(--input);border-radius:var(--radius);align-items:center;gap:.375em;padding:.25em .625em;transition:color .15s,border-color .15s;display:inline-flex;&.has-details{cursor:pointer}&.has-details:is(:hover,:focus-within){color:var(--primary);border-color:var(--primary)}}.security-lock-btn{width:calc(1.75em + 2px);height:calc(1.75em + 2px);color:var(--muted-foreground);border-radius:var(--radius);flex:none;justify-content:center;align-items:center;display:inline-flex}a.security-lock-btn{transition:color .15s,background-color .15s;&:hover{color:var(--foreground);background:var(--muted)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.security-lock{stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;width:1.25em;height:1.25em}.security-chip-label{white-space:nowrap;text-overflow:ellipsis;max-width:240px;color:inherit;font:inherit;cursor:inherit;background:0 0;border:none;border-radius:0;padding:0;text-decoration:none;display:block;overflow:hidden;&:focus-visible{outline:2px solid var(--ring);outline-offset:2px}}.security-popover{position-area:bottom span-right;position-try-fallbacks:flip-block;width:max-content;max-width:min(400px,100vw - 16px);color:var(--foreground);background:var(--background);border:1px solid var(--border);border-radius:var(--radius);font-family:var(--font-sans);font-size:var(--font-size-description);text-align:start;overflow-wrap:anywhere;cursor:auto;margin:6px 0;padding:.75em 1em;line-height:1.5;inset:auto;box-shadow:0 1px 2px #0000000f,0 4px 12px #00000014}`,zr=G`.param-list-container{container-type:inline-size}.param-list{grid-template-columns:var(--param-label-width) minmax(10rem, 1fr) minmax(0, 1.5fr);border:1px solid var(--border);border-radius:min(var(--radius), .5rem);background:color-mix(in srgb, var(--card) 80%, transparent);font-size:var(--font-size-small);line-height:calc(var(--font-size-small) + 4px);word-break:break-word;direction:ltr;margin:0;padding:0;list-style:none;display:grid}.param{grid-column:1/-1;grid-template-columns:subgrid;column-gap:var(--param-gap);row-gap:var(--param-row-gap);padding:var(--param-padding);margin:0;display:grid;&+.param{border-top:1px solid var(--border)}}.param-label{grid-area:1/1/span 2;min-width:0}.param-input{grid-column:2;min-width:0}.param-input :is(input[type=text],input[type=password],select){padding:.75em;line-height:1.25}@supports not (appearance:base-select){.param-input select{padding-right:2.25em}}.param-constraint{align-content:start;column-gap:var(--value-list-label-gap);row-gap:var(--param-row-gap);grid-column:3;grid-template-columns:max-content minmax(0,1fr);min-width:0;margin:0;display:grid;&>dd{min-width:0;margin:0}}.param-details{grid-column:2/-1;min-width:0;&:not(:has(*)){display:none}}.param:not(:has(.param-constraint)) .param-input,.param:not(:has(.param-input)) .param-constraint{grid-column:2/-1}.param-name,.param-type{text-align:right;margin:1px 0;line-height:1.35}.param-name{color:var(--foreground);font-family:var(--font-mono);&.deprecated{color:var(--destructive)}}.param-required{color:var(--destructive)}.param-deprecated-icon{stroke:var(--destructive);margin-right:-6px}.param-type{color:var(--muted-foreground);font-family:var(--font-sans)}.param-constraint-label{color:var(--muted-foreground);font-weight:600}.value-list{column-gap:var(--value-list-label-gap);grid-template-columns:max-content minmax(0,1fr);align-items:baseline;display:grid}.value-list-items{row-gap:var(--value-list-row-gap);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex;&>li{margin:0}&>li:not(:last-child):after{content:"┃";margin-inline:var(--value-list-gap);color:var(--muted-foreground)}}.value-link{font:inherit;font-family:var(--font-mono);line-height:inherit;text-align:start;overflow-wrap:anywhere;color:var(--primary-text);text-decoration:underline dotted;text-decoration-color:color-mix(in srgb, var(--primary-text) 55%, transparent);text-underline-offset:.25em;cursor:pointer;background:0 0;border:none;margin:0;padding:0;text-decoration-thickness:1px;display:inline;&:hover,&:focus-visible{text-decoration-style:solid;text-decoration-color:var(--primary-text)}&:focus-visible{box-shadow:var(--focus-shadow);border-radius:2px;outline:none}&:disabled{color:var(--foreground);cursor:text;user-select:text;text-decoration:none}}.param-example-list{margin:var(--param-row-gap) 0 0;padding:0;list-style:none;&>li{margin:0 0 var(--param-row-gap);border-inline-start:2px solid var(--border);padding-inline-start:var(--param-padding)}&>li:is(:hover,:focus-within){border-inline-start-color:var(--primary)}}@container (width<=36rem){.param-list{grid-template-columns:minmax(0,1fr)}.param-label,.param-input,.param-constraint,.param-details,.param:not(:has(.param-constraint)) .param-input,.param:not(:has(.param-input)) .param-constraint{grid-area:auto/1}.param-label{align-items:baseline;gap:var(--param-gap);flex-wrap:wrap;display:flex}.param-name,.param-type{text-align:start}}`,Fi=G`.only-large-screen{display:none}.endpoint-head{& .path{font-family:var(--font-mono);font-size:var(--font-size-small);overflow-wrap:break-word;word-break:break-all;align-items:center;display:flex}& .descr{font-size:var(--font-size-small);color:var(--muted-foreground);overflow-wrap:break-word;word-break:break-all;align-items:center;margin-inline-start:auto;padding-inline-start:16px;font-weight:400;display:none}}.external-docs-box{background:var(--muted);border-radius:min(var(--radius), .5rem);margin:8px 0;padding:2px 8px 8px}.external-docs-link{font-family:var(--font-mono);font-size:var(--font-size-small)}.external-docs-arrow{margin-left:5px;display:inline-block;transform:rotate(270deg)scale(1.5)}.section-expand-collapse-container{justify-content:flex-end;gap:4px;display:flex}.callback-operation-list{margin-left:16px}.callback-operation-item{margin-top:12px}.callback-operation-item>.expanded-req-resp-container{flex-direction:column!important}.callback-operation-header{align-items:baseline;gap:8px;display:flex}.callback-method{vertical-align:baseline;text-align:left;border:none;width:70px;margin:0;padding:0;line-height:20px}.read-mode-group,.read-mode-tag{border-top:1px solid var(--border)}.section-gap--read-mode:is(.read-mode-group,.read-mode-tag){padding-top:24px}.section-gap--read-mode.read-mode-group{margin-top:24px;padding-bottom:0}.section-gap--read-mode.read-mode-group+.read-mode-tag{border-top:none;padding-top:.5em}.rapidoc-heading.title.tag-group{font-size:var(--font-size-regular);letter-spacing:.06em;text-transform:uppercase;color:var(--muted-foreground);margin:0;font-weight:600}.expanded-endpoint-body[data-first-operation-in-tag=true]{margin-top:32px}.tag-group-description{color:var(--muted-foreground);margin-top:.5em}.rapidoc-heading.mini-tag-title{font-size:var(--h4-font-size);margin:12px 16px 4px 21px}.mini-tag-descr{padding:0 16px 12px 21px}.m-endpoint{border-radius:min(var(--radius), 1rem);--method-color:var(--method-default)}.m-endpoint.expanded{margin-bottom:16px}.m-endpoint>.endpoint-head{border:1px solid #0000;border-left-width:5px;border-top-color:var(--border);border-radius:min(var(--radius), 1rem);cursor:pointer;align-items:center;padding:6px 16px;display:flex}.m-endpoint>.endpoint-head.expanded{border-bottom-right-radius:0;border-bottom-left-radius:0}.m-endpoint>.endpoint-head:hover,.m-endpoint>.endpoint-head.expanded{border-color:var(--method-color,var(--method-default));background:color-mix(in srgb, var(--method-color,var(--method-default)) 10%, transparent)}.m-endpoint>.endpoint-head.put:hover,.m-endpoint>.endpoint-head.put.expanded{border-color:var(--method-put);background:color-mix(in srgb, var(--method-put) 10%, transparent)}.m-endpoint>.endpoint-head.post:hover,.m-endpoint>.endpoint-head.post.expanded{border-color:var(--method-post);background:color-mix(in srgb, var(--method-post) 10%, transparent)}.m-endpoint>.endpoint-head.get:hover,.m-endpoint>.endpoint-head.get.expanded{border-color:var(--method-get);background:color-mix(in srgb, var(--method-get) 10%, transparent)}.m-endpoint>.endpoint-head.delete:hover,.m-endpoint>.endpoint-head.delete.expanded{border-color:var(--method-delete);background:color-mix(in srgb, var(--method-delete) 10%, transparent)}.m-endpoint>.endpoint-head.head:hover,.m-endpoint>.endpoint-head.head.expanded,.m-endpoint>.endpoint-head.patch:hover,.m-endpoint>.endpoint-head.patch.expanded,.m-endpoint>.endpoint-head.options:hover,.m-endpoint>.endpoint-head.options.expanded{border-color:var(--yellow);background:color-mix(in srgb, var(--yellow) 10%, transparent)}.m-endpoint>.endpoint-head.trace:hover,.m-endpoint>.endpoint-head.trace.expanded{border-color:var(--pink);background:color-mix(in srgb, var(--pink) 10%, transparent)}.m-endpoint>.endpoint-head.query:hover,.m-endpoint>.endpoint-head.query.expanded{border-color:var(--purple);background:color-mix(in srgb, var(--purple) 10%, transparent)}.m-endpoint>.endpoint-head.copy:hover,.m-endpoint>.endpoint-head.copy.expanded,.m-endpoint>.endpoint-head.purge:hover,.m-endpoint>.endpoint-head.purge.expanded{border-color:var(--method-color,var(--method-default));background:color-mix(in srgb, var(--method-color,var(--method-default)) 10%, transparent)}.m-endpoint>.endpoint-head.deprecated:hover,.m-endpoint>.endpoint-head.deprecated.expanded{border-color:var(--border);filter:opacity(.6)}.m-endpoint .endpoint-body{border-style:solid;border-width:0 1px 1px 5px;border-color:var(--method-color,var(--method-default));border-bottom-left-radius:min(var(--radius), 1rem);border-bottom-right-radius:min(var(--radius), 1rem);flex-wrap:wrap;padding:16px 0 0;box-shadow:0 4px 3px -3px #00000026}.m-endpoint .endpoint-body.get{border-color:var(--method-get)}.m-endpoint .endpoint-body.post{border-color:var(--method-post)}.m-endpoint .endpoint-body.put{border-color:var(--method-put)}.m-endpoint .endpoint-body.delete{border-color:var(--method-delete)}.m-endpoint .endpoint-body.patch{border-color:var(--method-patch)}.m-endpoint .endpoint-body.head{border-color:var(--method-head)}.m-endpoint .endpoint-body.options{border-color:var(--method-options)}.m-endpoint .endpoint-body.trace{border-color:var(--method-trace)}.m-endpoint .endpoint-body.query{border-color:var(--method-query)}.m-endpoint .endpoint-body.deprecated{border-color:var(--border);filter:opacity(.6)}.endpoint-head .deprecated{color:var(--muted-foreground);filter:opacity(.6)}.summary{padding:8px}.summary .title{overflow-wrap:anywhere}.endpoint-head .method{box-sizing:border-box;vertical-align:middle;font-size:var(--font-size-small);height:calc(var(--font-size-small) + 16px);line-height:calc(var(--font-size-small) + 8px);border-radius:var(--radius);text-align:center;text-transform:uppercase;border:2px solid var(--method-color,var(--method-default));width:60px;margin-inline-end:5px;padding:2px 5px;font-weight:700;display:inline-block}.endpoint-head .method.delete{border:2px solid var(--method-delete)}.endpoint-head .method.put{border:2px solid var(--method-put)}.endpoint-head .method.post{border:2px solid var(--method-post)}.endpoint-head .method.get{border:2px solid var(--method-get)}.endpoint-head .method.get.deprecated{border:2px solid var(--border)}.endpoint-head .method.head{border:2px solid var(--method-head)}.endpoint-head .method.patch{border:2px solid var(--method-patch)}.endpoint-head .method.options{border:2px solid var(--method-options)}.endpoint-head .method.trace{border:2px solid var(--method-trace)}.endpoint-head .method.query{border:2px solid var(--method-query)}.endpoint-head .method.copy,.endpoint-head .method.purge{border:2px solid var(--method-default)}.head{--method-color:var(--method-head)}.patch{--method-color:var(--method-patch)}.options{--method-color:var(--method-options)}.trace{--method-color:var(--method-trace)}.query{--method-color:var(--method-query)}.put{--method-color:var(--method-put)}.post{--method-color:var(--method-post)}.get{--method-color:var(--method-get)}.delete{--method-color:var(--method-delete)}.copy,.purge{--method-color:var(--method-default)}.req-resp-container{border-top:1px solid var(--border);flex-direction:column;align-items:stretch;min-width:0;margin-top:16px;display:flex}.expanded-req-resp-container{border-top:none;flex-direction:column;align-items:stretch;min-width:0;margin-top:16px;display:flex}.request-panel,.view-mode-request,api-response{box-sizing:border-box;flex:auto;min-width:0;min-height:100px;padding:16px 8px;overflow:hidden}.m-endpoint .request-panel,.m-endpoint .view-mode-request{border-style:dashed;border-width:0 0 1px;border-color:var(--method-color,var(--primary));flex-direction:column;display:flex}.expanded-endpoint-body .request-panel,.expanded-req-resp-container .request-panel{border:0;flex-direction:column;display:flex}.head .view-mode-request,.patch .view-mode-request,.options .view-mode-request{border-color:var(--yellow)}.put .view-mode-request{border-color:var(--orange)}.post .view-mode-request{border-color:var(--green)}.get .view-mode-request{border-color:var(--blue)}.delete .view-mode-request{border-color:var(--destructive)}.trace .view-mode-request{border-color:var(--pink)}.query .view-mode-request{border-color:var(--purple)}.copy .view-mode-request,.purge .view-mode-request{border-color:var(--method-color,var(--method-default))}@container (width>=860px){.only-large-screen{display:block}.endpoint-head .path{font-size:var(--font-size-regular)}.endpoint-head .descr{display:flex}.endpoint-head .m-markdown-small,.descr .m-markdown-small{display:block}.req-resp-container,.expanded-req-resp-container{flex-direction:row}:host([layout=column]) .req-resp-container,:host([layout=column]) .expanded-req-resp-container,.req-resp-container.column-layout,.expanded-req-resp-container.column-layout{flex-direction:column!important}:host([layout=column]) .m-endpoint .request-panel,:host([layout=column]) .view-mode-request,.m-endpoint .request-panel.column-layout,.view-mode-request.column-layout{border-width:0 0 1px;padding:16px 8px}:host([layout=column]) .expanded-endpoint-body .request-panel,:host([layout=column]) .expanded-req-resp-container .request-panel,.expanded-endpoint-body .request-panel.column-layout,.expanded-req-resp-container .request-panel.column-layout{padding:16px 8px;border:0!important}:host([layout=row]) .req-resp-container,:host([layout=row]) .expanded-req-resp-container,.req-resp-container.row-layout,.expanded-req-resp-container.row-layout{flex-direction:row}:host([layout=row]) .request-panel,:host([layout=row]) .view-mode-request,:host([layout=row]) api-response,.req-resp-container.row-layout .request-panel,.req-resp-container.row-layout .view-mode-request,.req-resp-container.row-layout api-response,.expanded-req-resp-container.row-layout .request-panel,.expanded-req-resp-container.row-layout .view-mode-request,.expanded-req-resp-container.row-layout api-response{flex:1;min-width:0}:host([layout=row]) .m-endpoint .request-panel.row-layout,:host([layout=row]) .view-mode-request.row-layout,.m-endpoint .request-panel.row-layout,.view-mode-request.row-layout{border-style:dashed;border-width:0 1px 0 0;border-color:var(--method-color,var(--primary));padding:16px 20px 16px 8px}:host([layout=row]) .expanded-endpoint-body .request-panel.row-layout,:host([layout=row]) .expanded-req-resp-container.row-layout .request-panel,.expanded-endpoint-body .request-panel.row-layout,.expanded-req-resp-container.row-layout .request-panel{border-style:dashed;border-width:0 1px 0 0;border-color:color-mix(in srgb, var(--method-color,var(--primary)) 50%, transparent);padding:16px 20px 16px 8px}.head .expanded-endpoint-body .request-panel,.head .expanded-req-resp-container .request-panel,.patch .expanded-endpoint-body .request-panel,.patch .expanded-req-resp-container .request-panel,.options .expanded-endpoint-body .request-panel,.options .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--yellow) 50%, transparent)}.put .expanded-endpoint-body .request-panel,.put .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--orange) 50%, transparent)}.post .expanded-endpoint-body .request-panel,.post .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--green) 50%, transparent)}.get .expanded-endpoint-body .request-panel,.get .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--blue) 50%, transparent)}.delete .expanded-endpoint-body .request-panel,.delete .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--destructive) 50%, transparent)}.trace .expanded-endpoint-body .request-panel,.trace .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--pink) 50%, transparent)}.query .expanded-endpoint-body .request-panel,.query .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--purple) 50%, transparent)}.copy .expanded-endpoint-body .request-panel,.copy .expanded-req-resp-container .request-panel,.purge .expanded-endpoint-body .request-panel,.purge .expanded-req-resp-container .request-panel{border-color:color-mix(in srgb, var(--method-color,var(--method-default)) 50%, transparent)}:host([layout=row]) api-response,.req-resp-container.row-layout api-response,.expanded-req-resp-container.row-layout api-response{padding:16px 8px 16px 20px}.summary{padding:8px 16px}}`,cn=G`code[class*=language-],pre[class*=language-]{text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;line-height:1.5}pre[class*=language-]{border-radius:min(var(--radius), .5rem);background:var(--code-bg);border:1px solid var(--input);margin:.5em 0;padding:1em;overflow:auto}:not(pre)>code[class*=language-]{white-space:normal;border-radius:min(var(--radius), .5rem)}::highlight(comment),::highlight(quote){color:var(--syntax-comment)}::highlight(keyword),::highlight(storage),::highlight(at-rule),::highlight(doctype),::highlight(important),::highlight(section){color:var(--syntax-keyword)}::highlight(operator),::highlight(punctuation){color:var(--syntax-operator)}::highlight(string),::highlight(regexp),::highlight(attribute-value),::highlight(link),::highlight(raw){color:var(--syntax-string)}::highlight(numeric),::highlight(boolean),::highlight(constant),::highlight(symbol),::highlight(character-entity),::highlight(anchor),::highlight(entity){color:var(--syntax-constant)}::highlight(function),::highlight(decorator),::highlight(animation){color:var(--syntax-function)}::highlight(type),::highlight(support){color:var(--syntax-type)}::highlight(variable),::highlight(interpolation){color:var(--syntax-variable)}::highlight(property),::highlight(key),::highlight(attribute-name){color:var(--syntax-property)}::highlight(tag){color:var(--syntax-tag)}::highlight(selector){color:var(--syntax-selector)}::highlight(inserted){color:var(--syntax-inserted)}::highlight(deleted){color:var(--syntax-deleted)}`,Pr=G`.tab-panel{min-width:0}.tabs,.tab-buttons{min-height:2.5em;box-shadow:inset 0 -1px 0 var(--border);font-size:var(--font-size-small);scrollbar-width:none;align-items:center;gap:1.25em;display:flex;overflow-x:auto;&::-webkit-scrollbar{display:none}}.tab,.tab-btn{font-family:var(--font-sans);font-size:inherit;letter-spacing:.04em;white-space:nowrap;color:var(--muted-foreground);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;border-radius:0;flex:none;align-self:stretch;margin:0;padding:0 .125em;font-weight:600;transition:color .15s,border-color .15s;&:hover{color:var(--foreground)}&.tab-active,&.active{color:var(--primary);border-bottom-color:var(--primary)}&:focus-visible{outline:2px solid var(--ring);outline-offset:-2px}}.tab-bar-end{color:var(--muted-foreground);flex:none;margin-inline-start:auto}select.select-sm{max-width:100%;font-size:var(--font-size-small);background-color:#0000;padding:.3em .75em}@supports not (appearance:base-select){select.select-sm{padding-right:2em}}.example-select{width:fit-content;margin-bottom:.75em;display:flex}.tab-content{min-width:0;min-height:50px;padding-top:.75em;position:relative;& .toolbar-btn{position:absolute;top:12px;right:8px}}`,ji=G`#advanced-search-btn{width:75px;margin-left:5px;display:none}.btn-clear-filter{color:var(--foreground);width:75px;margin-left:5px}.nav-bar-header{z-index:10;box-sizing:border-box;-webkit-backdrop-filter:blur(12px);flex-direction:column;width:100%;transition:box-shadow .2s,background .2s;display:flex;position:sticky;top:0}@container scroll-state(scrollable:top){.nav-bar-header{box-shadow:0 4px 12px -2px #00000040,0 2px 4px -1px #00000026}}.nav-bar-search-container{box-sizing:border-box;flex-direction:row;justify-content:center;align-items:stretch;width:100%;padding:8px 16px 12px;display:flex}.nav-bar-search-container.has-bottom-border{border-bottom:1px solid var(--muted)}.nav-bar-search-input-wrapper{flex:1;line-height:22px;display:flex;position:relative}.nav-bar-search-input-wrapper .nav-bar-search-input{width:100%;color:var(--foreground);border:1px solid var(--input);border-radius:var(--radius);background:var(--input-background);font-family:inherit;line-height:1.25;font-size:calc(var(--font-size-small) + 1px);box-sizing:border-box;padding:.45em 28px .45em 10px;transition:border-color .2s,box-shadow .2s}.nav-bar-search-input:focus{border-color:var(--sidebar-ring);box-shadow:0 0 0 2px color-mix(in srgb, var(--sidebar-ring) 25%, transparent);outline:none}.nav-bar-search-icon{font-size:var(--font-size-regular);cursor:pointer;color:var(--foreground);opacity:.6;user-select:none;position:absolute;top:50%;right:8px;transform:translateY(-50%)}svg.nav-bar-search-icon{cursor:default;pointer-events:none}.nav-bar-search-icon:hover{opacity:1;color:var(--foreground)}#nav-bar-btn{background:var(--card);width:40px;height:40px;color:var(--muted-foreground);border:1px solid var(--border);border-radius:var(--radius);cursor:pointer;z-index:10;justify-content:center;align-items:center;padding:0;transition:color .15s,border-color .15s;display:flex;position:absolute;top:16px;right:16px;box-shadow:0 1px 2px #0000001f,0 4px 12px #00000029;& svg{width:20px;height:20px;overflow:visible}&:hover{color:var(--foreground);border-color:var(--muted-foreground)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}&:has(+.nav-bar.floating-nav){color:var(--primary);border-color:var(--primary)}}.nav-bar-btn-line{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;transform-box:fill-box;transform-origin:50%;transition:transform .2s,opacity .15s}#nav-bar-btn:has(+.nav-bar.floating-nav) .nav-bar-btn-line{&:first-child{transform:translateY(5px)rotate(45deg)}&:nth-child(2){opacity:0}&:nth-child(3){transform:translateY(-5px)rotate(-45deg)}}@media (prefers-reduced-motion:reduce){.nav-bar-btn-line,.nav-bar.floating-nav{transition:none;animation:none}}.body.nav-floating #nav-bar-btn{display:flex}.body.nav-floating .nav-bar:not(.floating-nav){border-right:0;width:0}@keyframes nav-slide-in{0%{opacity:0;transform:translate(-12px)}}.nav-bar{width:0;height:100%;color:var(--sidebar-foreground);background:var(--sidebar);background-blend-mode:multiply;border-right:1px solid var(--sidebar-border);font-size:var(--font-size-regular);line-height:calc(var(--font-size-regular) + 6px);word-break:break-word;flex-flow:column;position:relative;overflow:hidden;&.floating-nav{z-index:5;width:330px;animation:.18s ease-out nav-slide-in;position:absolute;top:0;left:0;overflow:scroll;box-shadow:8px 0 24px -6px #00000073,2px 0 6px -2px #00000040}}.nav-bar-info:focus-visible,.nav-bar-tag:focus-visible,.nav-bar-path:focus-visible{box-shadow:none;outline-offset:-4px;outline:1px solid}.nav-bar-expand-all:focus-visible,.nav-bar-collapse-all:focus-visible,.nav-bar-tag-icon:focus-visible{box-shadow:none;outline-offset:2px;outline:1px solid}::slotted([slot=nav-logo]){max-height:var(--sidebar-logo-max-height);box-sizing:border-box;object-fit:contain;width:auto;padding:16px 16px 0;overflow:hidden}.nav-scroll{overflow:hidden auto;overflow-y:overlay;scrollbar-width:thin;scrollbar-color:var(--muted) transparent;scroll-padding-top:60px;container-type:scroll-state}.nav-bar-tag{flex-direction:row;justify-content:space-between;align-items:center;display:flex}.nav-bar-paths-under-tag,.nav-bar-tags-under-group{interpolate-size:allow-keywords;height:auto;transition:height .25s,visibility;overflow:hidden}.nav-bar-tag-and-paths.collapsed .nav-bar-paths-under-tag,.nav-bar-tag-group.collapsed .nav-bar-tags-under-group{visibility:hidden;height:0;transition:height .25s,visibility 0s linear .25s}@media (prefers-reduced-motion:reduce){.nav-bar-paths-under-tag,.nav-bar-tags-under-group{transition:none}}.nav-bar-paths-under-tag{padding-left:10px}.nav-bar-expand-all{cursor:pointer;margin-inline-end:10px;transform:rotate(90deg)}.nav-bar-collapse-all{cursor:pointer;transform:rotate(270deg)}.nav-bar-expand-all:hover,.nav-bar-collapse-all:hover{color:var(--primary)}.nav-bar-tag-icon,.nav-bar-tag-group-icon{color:var(--foreground);cursor:pointer;user-select:none;justify-content:center;align-items:center;width:16px;height:16px;font-size:14px;line-height:1;transition:color .15s;display:inline-flex}.nav-bar-tag-icon:hover,.nav-bar-tag-group-icon:hover{color:var(--foreground)}.nav-bar-tag-icon:after,.nav-bar-tag-group-icon:after{content:"";transform-origin:50%;background-color:currentColor;width:14px;height:14px;transition:transform .2s ease-out;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:14px 14px;mask-size:14px 14px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon:after,.nav-bar-tag-group.collapsed .nav-bar-tag-group-icon:after{transform:rotate(-90deg)}.nav-bar-tag-and-paths.expanded .nav-bar-tag-icon:after,.nav-bar-tag-group.expanded .nav-bar-tag-group-icon:after{transform:rotate(0)}.nav-scroll::-webkit-scrollbar{width:8px}.nav-scroll::-webkit-scrollbar-track{background:0 0}.nav-scroll::-webkit-scrollbar-thumb{background:var(--muted)}.nav-bar-tag-group{margin-top:6px;margin-bottom:2px}.nav-bar-tag-group-header{text-transform:uppercase;letter-spacing:.05em;color:var(--sidebar-foreground);cursor:pointer;user-select:none;border-inline-start:4px solid #0000;justify-content:space-between;align-items:center;padding:8px 15px 4px 6px;font-weight:700;transition:border-color .15s,color .15s;display:flex}.nav-bar-tag-group-header:hover{color:var(--sidebar-accent-foreground)}.nav-bar-tag-group-title{flex:1;min-width:0}.nav-bar-tags-under-group{border-inline-start:1px solid var(--border);margin-inline-start:10px}.nav-bar-tag{color:var(--primary);text-transform:capitalize;border-inline-start:4px solid #0000;min-width:0;padding:10px 15px 10px 10px;font-weight:600}.nav-bar-tag a,.nav-bar-tag-title,a.nav-bar-tag-title{color:inherit;flex:1;min-width:0;text-decoration:none}.nav-bar-tag a:hover,.nav-bar-tag-title:hover,a.nav-bar-tag-title:hover{color:inherit;text-decoration:none}a.nav-bar-tag{text-decoration:none}.nav-bar-components,.nav-bar-h1,.nav-bar-h2,.nav-bar-info,.nav-bar-tag,.nav-bar-path{cursor:pointer;box-sizing:border-box;width:100%;color:var(--sidebar-foreground);background:0 0;border:none;border-inline-start:4px solid #0000;text-decoration:none;transition:background .15s,color .15s;display:flex}.nav-bar-path,a.nav-bar-path{justify-content:space-between;align-items:center;gap:8px;min-width:0}a.nav-bar-info:hover,a.nav-bar-path:hover{text-decoration:none}.nav-bar-path>*{pointer-events:none}.nav-bar-path.deprecated{filter:opacity(.5)}.portal-sidebar-footer-link{padding:16px 12px}.nav-bar-path-label{flex:1;align-items:baseline;min-width:0;display:flex}.nav-bar-webhook{font-weight:700;font-size:var(--font-size-xs);flex-shrink:0;margin-right:8px}.nav-bar-path-label .mono-font{font-family:var(--font-mono)}.nav-method{font-weight:700;font-size:var(--font-size-xs);white-space:nowrap;flex-shrink:0;margin-inline-start:auto;&.false{display:none}}.nav-method.as-colored-text{color:var(--method-default)}.nav-method.as-colored-text.get{color:var(--method-get)}.nav-method.as-colored-text.put{color:var(--method-put)}.nav-method.as-colored-text.post{color:var(--method-post)}.nav-method.as-colored-text.delete{color:var(--method-delete)}.nav-method.as-colored-text.head{color:var(--method-head)}.nav-method.as-colored-text.patch{color:var(--method-patch)}.nav-method.as-colored-text.options{color:var(--method-options)}.nav-method.as-colored-text.trace{color:var(--method-trace)}.nav-method.as-colored-text.query{color:var(--method-query)}.nav-method.as-colored-text.copy,.nav-method.as-colored-text.purge{color:var(--method-default)}.nav-method.as-colored-block{text-align:center;min-width:32px;color:var(--method-badge-fg);background:var(--method-default);border-radius:4px;padding:1px 4px;font-weight:600}:host([color-scheme=light]) .nav-method.as-colored-block{color:var(--method-badge-fg)}@media (prefers-color-scheme:light){:host([color-scheme=system]) .nav-method.as-colored-block{color:var(--method-badge-fg)}}.colored-block .nav-method.as-colored-block{outline:1px solid}.nav-method.as-colored-block.get{background:var(--method-get)}.nav-method.as-colored-block.put{background:var(--method-put)}.nav-method.as-colored-block.post{background:var(--method-post)}.nav-method.as-colored-block.delete{background:var(--method-delete)}.nav-method.as-colored-block.head{background:var(--method-head)}.nav-method.as-colored-block.patch{background:var(--method-patch)}.nav-method.as-colored-block.options{background:var(--method-options)}.nav-method.as-colored-block.trace{background:var(--method-trace)}.nav-method.as-colored-block.query{background:var(--method-query)}.nav-method.as-colored-block.copy,.nav-method.as-colored-block.purge{background:var(--method-default)}.nav-bar-h1,.nav-bar-h2,.nav-bar-path{padding:var(--sidebar-item-padding);font-weight:400}.nav-bar-info{padding:12px 10px;font-weight:600}.nav-bar-section{color:var(--foreground);padding:var(--sidebar-item-padding);flex-direction:row;justify-content:space-between;font-weight:700;display:flex}.nav-bar-section.operations{display:none!important}.nav-bar-section:first-child{display:none}.nav-bar-h2{padding-inline-start:28px}.nav-bar-h1.active,.nav-bar-h2.active,.nav-bar-info.active,.nav-bar-tag.active,.nav-bar-path.active,.nav-bar-section.operations.active,.nav-bar-h1.left-bar.active,.nav-bar-h2.left-bar.active,.nav-bar-info.left-bar.active,.nav-bar-tag.left-bar.active,.nav-bar-path.left-bar.active,.nav-bar-section.left-bar.operations.active{border-inline-start:4px solid var(--sidebar-primary);color:var(--sidebar-primary)}.nav-bar-h1.active:hover,.nav-bar-h2.active:hover,.nav-bar-info.active:hover,.nav-bar-tag.active:hover,.nav-bar-path.active:hover,.nav-bar-section.operations.active:hover,.nav-bar-h1.left-bar.active:hover,.nav-bar-h2.left-bar.active:hover,.nav-bar-info.left-bar.active:hover,.nav-bar-tag.left-bar.active:hover,.nav-bar-path.left-bar.active:hover,.nav-bar-section.left-bar.operations.active:hover{color:var(--sidebar-primary)}.nav-bar-tag-and-paths.collapsed:has(.nav-bar-path.active)>.nav-bar-tag,.nav-bar-tag-group.collapsed:has(.active)>.nav-bar-tag-group-header{border-inline-start-color:var(--sidebar-primary);color:var(--sidebar-primary)}.nav-bar-tag-and-paths.collapsed:has(.nav-bar-path.active)>.nav-bar-tag:hover,.nav-bar-tag-group.collapsed:has(.active)>.nav-bar-tag-group-header:hover{color:var(--sidebar-primary)}.nav-bar-h1:hover,.nav-bar-h2:hover,.nav-bar-info:hover,.nav-bar-tag:hover,.nav-bar-path:hover{color:var(--sidebar-accent-foreground);background:var(--sidebar-accent)}:host([nav-item-overflow=ellipsis]) .nav-bar-tag-group-title,:host(:not([nav-item-overflow])) .nav-bar-tag-group-title,.overflow-ellipsis .nav-bar-tag-group-title,:host([nav-item-overflow=ellipsis]) .nav-bar-tag-title,:host(:not([nav-item-overflow])) .nav-bar-tag-title,.overflow-ellipsis .nav-bar-tag-title,:host([nav-item-overflow=ellipsis]) .nav-bar-path-label,:host(:not([nav-item-overflow])) .nav-bar-path-label,.overflow-ellipsis .nav-bar-path-label,:host([nav-item-overflow=ellipsis]) .nav-bar-info,:host(:not([nav-item-overflow])) .nav-bar-info,.overflow-ellipsis .nav-bar-info,:host([nav-item-overflow=ellipsis]) .nav-bar-section-title,:host(:not([nav-item-overflow])) .nav-bar-section-title,.overflow-ellipsis .nav-bar-section-title{white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden}:host([nav-item-overflow=wrap]) .nav-bar-tag-group-title,.overflow-wrap .nav-bar-tag-group-title,:host([nav-item-overflow=wrap]) .nav-bar-tag-title,.overflow-wrap .nav-bar-tag-title,:host([nav-item-overflow=wrap]) .nav-bar-path-label,.overflow-wrap .nav-bar-path-label,:host([nav-item-overflow=wrap]) .nav-bar-info,.overflow-wrap .nav-bar-info,:host([nav-item-overflow=wrap]) .nav-bar-section-title,.overflow-wrap .nav-bar-section-title{white-space:normal;text-overflow:clip;word-break:break-word;overflow:visible}`,Ri=G`#api-title .version{vertical-align:middle;border:1px solid var(--border);border-radius:var(--radius);background:var(--muted);color:var(--muted-foreground);font-family:var(--font-mono);font-size:var(--font-size-small);letter-spacing:normal;margin-inline-start:.5em;padding:.125em .5em;font-weight:500;line-height:1.5;display:inline-block}#api-info{font-size:calc(var(--font-size-regular) - 1px);margin-top:8px}#api-info span:before{content:"|";opacity:.5;text-align:center;width:15px;display:inline-block}#api-info span:first-child:before{content:"";width:0}.no-spec{border:1px dashed var(--border);border-radius:var(--radius);color:var(--muted-foreground);font-size:var(--font-size-small);opacity:0;margin:1rem;padding:12px;animation:.2s ease-in 1.5s forwards no-spec-show}.no-spec code{font-family:var(--font-mono);color:var(--foreground)}@keyframes no-spec-show{to{opacity:1}}@media (prefers-reduced-motion:reduce){.no-spec{animation-duration:0s}}`,vt=G``,Ep=G`*,:before,:after{box-sizing:border-box}.dialog-box{background:var(--card);color:var(--card-foreground);border-radius:min(var(--radius), .5rem);border:1px solid var(--border);width:70vw;max-width:70vw;height:70vh;max-height:70vh;padding:0;position:absolute;top:100px;overflow:hidden;box-shadow:0 14px 28px #00000040,0 10px 10px #00000038}.dialog-box-header{z-index:10;backdrop-filter:blur(12px);border-bottom:1px solid var(--border);border-top-left-radius:min(var(--radius), .5rem);border-top-right-radius:min(var(--radius), .5rem);align-self:stretch;align-items:center;min-height:60px;max-height:60px;padding:0 16px;display:flex;position:sticky;top:0;overflow:hidden;& button{color:var(--foreground);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:50%;outline:none;margin-inline-end:-8px;font-size:1.5rem;font-weight:700;line-height:1;&:hover{border-color:var(--primary)}}}.dialog-box-content{height:100%;padding:1rem;display:block;overflow:auto}.dialog-box-title{font-size:var(--h2-font-size);flex-grow:1}.search-options-row{flex-wrap:wrap;gap:16px;margin:8px 0 24px;display:flex}.search-option-label{cursor:pointer;user-select:none;align-items:center;gap:.5em;display:inline-flex}.search-option-label input{cursor:pointer}.search-match-row{cursor:pointer;border-bottom:1px solid var(--border);padding:5px}.search-match-row *{pointer-events:none}`,Dp=G`rapi-doc:not(:defined){display:none}:host{all:initial;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-sans);flex-direction:column;margin:0;padding:0;display:flex;overflow:hidden;container-type:inline-size}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.body{background:var(--background);width:100%;height:100%;display:flex;position:relative;overflow:hidden}.main-content{scrollbar-width:thin;scrollbar-color:var(--border) transparent;flex:1;height:100%;margin:0;padding:0;display:block;overflow:hidden auto;container-type:inline-size}:host([auto-height]),:host([auto-height=true]),:host([auto-height]) .body,:host([auto-height=true]) .body,:host([auto-height]) .main-content,:host([auto-height=true]) .main-content{height:auto;overflow:visible}.main-content-inner--view-mode{padding:0 8px}.main-content-inner--read-mode{padding:0 8px min(70vh,600px)}.main-content::-webkit-scrollbar{width:8px;height:8px}.main-content::-webkit-scrollbar-track{background:0 0}.main-content::-webkit-scrollbar-thumb{background:var(--border)}.section-gap.section-tag{border-bottom:1px solid var(--border)}.section-gap,.section-gap--focused-mode,.section-gap--read-mode{scroll-margin-top:var(--scroll-margin-top);padding:0 4px}:host([auto-height]) .main-content-inner--read-mode,:host([auto-height=true]) .main-content-inner--read-mode{padding-bottom:40px}.section-tag-header{cursor:n-resize;padding:12px 0;position:relative}.collapsed .section-tag-header:hover{cursor:s-resize}.section-tag-header:hover{background-image:linear-gradient(to right, #0000, var(--border), #0000)}.section-tag-header:hover:after{color:var(--primary);content:"⬆";margin-left:-24px;font-size:20px;position:absolute;top:calc(50% - 14px)}.collapsed .section-tag-header:after{color:var(--border);content:"⬇";margin-left:-24px;font-size:20px;position:absolute;top:calc(50% - 14px)}.collapsed .section-tag-header:hover:after{color:var(--primary)}.collapsed .section-tag-body{display:none}.section-gap.section-tag-group{border-bottom:2px solid var(--border);margin-top:24px;margin-bottom:8px}.section-tag-group-header{cursor:pointer;user-select:none;justify-content:space-between;align-items:center;padding:16px 0 8px;display:flex;position:relative}.section-tag-group-header:hover{background-image:linear-gradient(to right, #0000, var(--border), #0000)}.section-tag-group.collapsed .section-tag-group-body{display:none}.section-tag-group-body{border-inline-start:2px solid var(--border);margin-inline-start:4px;padding-inline-start:12px}.section-tag-group-icon{color:var(--muted-foreground);justify-content:center;align-items:center;width:16px;height:16px;font-size:14px;display:inline-flex}.section-tag-group-icon:after{content:"";transform-origin:50%;background-color:currentColor;width:14px;height:14px;transition:transform .2s ease-out;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:14px 14px;mask-size:14px 14px;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.section-tag-group.collapsed .section-tag-group-icon:after{transform:rotate(-90deg)}::slotted([slot=fixed-header]){background:var(--background);max-height:40px;color:var(--foreground);text-align:center;padding:4px 12px;overflow:hidden}::slotted([slot=logo]){object-fit:contain;width:auto;height:36px;margin-left:5px}.only-large-screen-flex,.only-large-screen{display:none}.main-header{background:var(--background);color:var(--foreground);min-height:48px;padding:8px 4px}.main-header-controls{flex:1;align-items:center;margin:0 8px;display:flex}.header-title{font-size:calc(var(--font-size-regular) + 8px);padding:0 8px}input.header-input{background:var(--input-background);color:var(--foreground);border:1px solid var(--border);border-radius:var(--radius);flex:1;padding-right:24px}input.header-input::placeholder{opacity:.4}input.header-input:autofill,input.header-input:-webkit-autofill{-webkit-text-fill-color:var(--foreground);caret-color:var(--foreground);box-shadow:0 0 0 100vmax var(--input-background) inset;transition:background-color 9999s}input.header-input:autofill,input.header-input:autofill{-webkit-text-fill-color:var(--foreground);caret-color:var(--foreground);box-shadow:0 0 0 100vmax var(--input-background) inset;transition:background-color 9999s}.loader{border:4px solid var(--muted);border-top:4px solid var(--primary);border-radius:50%;width:36px;height:36px;margin:16px auto;animation:2s linear infinite spin}.expanded-endpoint-body{padding:6px 0;position:relative}.expanded-endpoint-body .tag-description{background:var(--code-bg);border-radius:min(var(--radius), .5rem);transition:max-height .2s ease-out}.expanded-endpoint-body .tag-icon{transition:transform .2s ease-out}.expanded-endpoint-body .tag-icon.expanded{transform:rotate(180deg)}.divider{border-top:1px solid var(--border);width:100%;margin:24px 0}.downloads-bar{flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:8px;margin:12px 0;display:flex}.download-btn{white-space:nowrap;vertical-align:middle;box-sizing:border-box;justify-content:center;align-items:center;min-width:170px;height:32px;padding:0 14px;line-height:30px;display:inline-flex}.download-btn.view-spec{min-width:190px}.download-select{white-space:nowrap;vertical-align:middle;box-sizing:border-box;cursor:pointer;justify-content:space-between;align-items:center;min-width:180px;height:32px;padding:0 14px;line-height:30px;display:inline-flex}.header-action-icon{font-size:var(--font-size-regular);cursor:pointer;user-select:none;margin:6px 5px 0 -24px}#spec-not-found{border:1px dashed var(--border);overflow-wrap:anywhere;font-size:var(--font-size-small);color:var(--destructive);font-family:var(--font-mono);justify-content:center;align-items:center;padding:12px;display:flex}.server-opt-row{align-items:baseline;gap:6px;margin:4px 0;display:flex}.server-opt-row input[type=radio],.server-opt-row label{cursor:pointer}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@container (width>=768px){.nav-bar{width:260px;display:flex}#nav-bar-btn{display:none}#advanced-search-btn,.only-large-screen{display:block}.only-large-screen-flex{display:flex}.section-gap{padding:0 0 0 24px}.section-gap--focused-mode,.section-gap--read-mode{padding:24px 8px}.endpoint-body{padding:36px 0 48px;position:relative}}@container (width>=1024px){.nav-bar{width:var(--sidebar-width);display:flex}#nav-bar-btn{display:none}#advanced-search-btn{display:block}.section-gap--focused-mode{padding:12px 80px}.section-gap--read-mode{padding:24px 80px 12px}}`,tt="ember",_i={ember:{dark:`
      --primary: #f76b39;
      --primary-foreground: #000000;
    `,light:`
      --primary: #f76b39;
      --primary-foreground: #000000;
    `},carbon:{dark:`
      --primary: #fafafa;
      --primary-foreground: #18181b;
      --ring: #a1a1aa;
      --background: #121214;
      --foreground: #e4e4e7;
    `,light:`
      --primary: #18181b;
      --primary-foreground: #fafafa;
      --ring: #52525b;
      --background: #ffffff;
      --foreground: #18181b;
    `},cobalt:{dark:`
      --primary: #7aa2d6;
      --primary-foreground: #0f1a2a;
      --background: #1e2530;
      --foreground: #b4bcc8;
      --card: #181e27;
      --card-foreground: #ced5df;
    `,light:`
      --primary: #3a6cb0;
      --primary-foreground: #ffffff;
      --background: #ffffff;
      --foreground: #243244;
      --card: color-mix(in srgb, var(--background) 94%, var(--foreground));
      --card-foreground: color-mix(in srgb, var(--foreground) 90%, #000000);
    `},jade:{dark:`
      --primary: #00d390;
      --primary-foreground: #0b1f17;
      --background: #1d232a;
      --foreground: #a6adbb;
      --card: #181e25;
      --card-foreground: #c8cfd9;
    `,light:`
      --primary: #047857;
      --primary-foreground: #ffffff;
      --background: #ffffff;
      --foreground: #1a2e26;
      --card: color-mix(in srgb, var(--background) 94%, var(--foreground));
      --card-foreground: color-mix(in srgb, var(--foreground) 90%, #000000);
    `},indigo:{dark:`
      --primary: #818cf8;
      --primary-foreground: #1e1b4b;
      --background: #0f0e1c;
      --foreground: #e4e2f5;
    `,light:`
      --primary: #4f46e5;
      --primary-foreground: #ffffff;
      --background: #ffffff;
      --foreground: #1e1b3a;
    `}},qi=Object.keys(_i),Cp=4.5,Tp=.12,Ii={dark:{background:"#1f1f23",foreground:"#d4d4d8",card:.08},light:{background:"#ffffff",foreground:"#27272a",card:.06}};function Ne(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6})([0-9a-f]{2})?$/i.exec(String(e||"").trim());if(!t)return null;let r=t[1].length===3?[...t[1]].map(a=>a+a).join(""):t[1];return[0,2,4].map(a=>parseInt(r.slice(a,a+2),16))}var dn=e=>`#${e.map(t=>Math.round(t).toString(16).padStart(2,"0")).join("")}`,pn=(e,t,r)=>e.map((a,n)=>a+(t[n]-a)*r);function Li(e){let[t,r,a]=e.map(n=>{let s=n/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4});return .2126*t+.7152*r+.0722*a}function Op(e,t){let[r,a]=[Ne(e),Ne(t)];if(!r||!a)return 1;let[n,s]=[Li(r),Li(a)].sort((i,o)=>o-i);return(n+.05)/(s+.05)}function un(e,t,r={}){let a=Ne(e);if(!a)return e;let n=Ii[t]||Ii.dark,s=Ne(r.background)||Ne(n.background),i=Ne(r.foreground)||Ne(n.foreground),o=[s,Ne(r.card)||pn(s,i,n.card),pn(s,a,Tp)].map(dn),l=t==="light"?[0,0,0]:[255,255,255];for(let c=0;c<=50;c++){let d=dn(pn(a,l,c/50));if(o.every(p=>Op(d,p)>=Cp))return d}return dn(l)}var Ur=(e,t)=>RegExp(`--${t}:\\s*([^;]+);`).exec(e)?.[1].trim();function Ni(e,t){return`${e}  --primary-text-${t}: ${un(Ur(e,"primary"),t,{background:Ur(e,"background"),foreground:Ur(e,"foreground"),card:Ur(e,"card")})};
    `}function Fp(e,{dark:t,light:r}){let a=n=>{let s=n?`[color-scheme='${n}']`:"",i=[`:host([theme='${e}']${s})`];return e==="ember"&&i.push(`:host(:not([theme])${s})`),i.join(`,
  `)};return`
  /* --------- ${e.toUpperCase()}${e==="ember"?" (default)":""} --------- */
  ${a()} {${t}}
  ${a("light")} {${r}}
  @media (prefers-color-scheme: light) {
    ${a("system")} {${r}}
  }
`}var jp=Rs(Object.entries(_i).map(([e,{dark:t,light:r}])=>Fp(e,{dark:Ni(t,"dark"),light:Ni(r,"light")})).join(""));function xt(e){return!e||typeof e!="string"?!1:/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e.trim())}function wt(e){if(!e||typeof e!="string")return{theme:tt};let t=e.trim(),r=t.toLowerCase();return qi.includes(r)?{theme:r}:xt(t)?{theme:t}:{theme:tt}}function Rp(e){if(!e||typeof e!="string")return!1;let t=e.trim().replace(/^#/,"");if(t.length===3&&(t=t.split("").map(r=>r+r).join("")),t.length===6||t.length===8){let r=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16);return(r*299+a*587+n*114)/1e3>=128}return!1}function kt(e,t){if(!e||!e.style)return;if(typeof t!="string"||qi.includes(t.trim().toLowerCase())||!xt(t)){e.style.removeProperty("--primary"),e.style.removeProperty("--primary-foreground"),e.style.removeProperty("--primary-text-dark"),e.style.removeProperty("--primary-text-light");return}let r=t.trim();e.style.setProperty("--primary",r);let a=Rp(r)?"#000000":"#ffffff";e.style.setProperty("--primary-foreground",a),e.style.setProperty("--primary-text-dark",un(r,"dark")),e.style.setProperty("--primary-text-light",un(r,"light"))}var Bi=G`:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Roboto Mono", monospace;--heading-font:var(--font-sans);--heading-weight:600;--heading-line-height:1.25;--heading-letter-spacing:normal;--heading-color:var(--foreground);--heading-margin-top:1.5em;--heading-margin-bottom:.5em;--h1-font-size:2rem;--h2-font-size:1.5rem;--h3-font-size:1.25rem;--h4-font-size:1rem;--h5-font-size:.875rem;--h6-font-size:.8125rem;--label-heading-font-size:var(--font-size-small);--line-height:1.6;--paragraph-spacing:1em;--radius:.25rem;--font-size-xs:11px;--font-size-small:12px;--font-size-description:13px;--font-size-mono:13px;--font-size-regular:14px;--resp-area-height:400px;--table-schema-key-width:240px;--table-schema-key-text-overflow:ellipsis;--table-schema-key-whitespace:nowrap;--scroll-margin-top:120px;--param-label-width:12rem;--param-gap:.5rem;--param-row-gap:.25rem;--param-padding:.5rem;--auth-scheme-padding:.75rem;--value-list-gap:.375rem;--value-list-row-gap:.125rem;--value-list-label-gap:.25rem;--primary-text-dark:var(--primary);--primary-text-light:var(--primary);--ring:var(--primary);--focus-shadow:0 0 0 1px transparent, 0 0 0 2px color-mix(in srgb, var(--ring) 40%, transparent);--selection-bg:color-mix(in srgb, var(--primary) 25%, transparent);--selection-fg:var(--foreground);--sidebar-width:18.75rem;--sidebar-item-padding:.4375rem 1rem .4375rem .625rem;--sidebar-logo-max-height:60px;--sidebar:var(--background);--sidebar-foreground:var(--foreground);--sidebar-primary:var(--primary);--sidebar-accent-foreground:var(--foreground);--sidebar-border:var(--border);--sidebar-ring:var(--ring)}:host([radius=none]){--radius:0px}:host([radius=sm]),:host(:not([radius])){--radius:.25rem}:host([radius=md]){--radius:.375rem}:host([radius=lg]){--radius:.5rem}:host([radius=full]){--radius:9999px}:host([scale=sm]){--font-size-xs:11px;--font-size-small:11px;--font-size-description:12px;--font-size-mono:12px;--font-size-regular:13px;--sidebar-width:17rem}:host([scale=default]),:host(:not([scale])){--font-size-xs:11px;--font-size-small:12px;--font-size-description:13px;--font-size-mono:13px;--font-size-regular:14px;--sidebar-width:18.75rem}:host([scale=lg]){--font-size-xs:12px;--font-size-small:14px;--font-size-description:15px;--font-size-mono:15px;--font-size-regular:16px;--sidebar-width:21rem}:host([nav-item-spacing=compact]){--sidebar-item-padding:.3125rem 1rem .3125rem .625rem}:host([nav-item-spacing=default]),:host(:not([nav-item-spacing])){--sidebar-item-padding:.4375rem 1rem .4375rem .625rem}:host([nav-item-spacing=relaxed]){--sidebar-item-padding:.625rem 1rem .625rem .625rem}:host,:host([color-scheme=dark]),:host([color-scheme=system]),:host(:not([color-scheme])){--background:#1f1f23;--foreground:#d4d4d8;--card:color-mix(in srgb, var(--background) 92%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #fff);--muted:color-mix(in srgb, var(--background) 86%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 65%, var(--background));--primary-text:var(--primary-text-dark);--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 88%, var(--foreground));--input:oklch(from var(--border) calc(l + .05) c h);--input-background:color-mix(in srgb, var(--background) 80%, #000);--method-get:#5c98f9;--method-post:#68cc97;--method-put:#f59e0b;--method-delete:#f75252;--method-patch:#a78bfa;--method-head:#eab308;--method-options:#06b6d4;--method-trace:#ec4899;--method-query:#818cf8;--method-default:#64748b;--method-badge-fg:#000;--destructive:#ef4444;--blue:#3b82f6;--green:#10b981;--orange:#f59e0b;--red:#ef4444;--purple:#8b5cf6;--yellow:#eab308;--pink:#ec4899;--brown:#d97706;--syntax-comment:#8b949e;--syntax-keyword:#ff7b72;--syntax-operator:#c9d1d9;--syntax-string:#a5d6ff;--syntax-constant:#79c0ff;--syntax-function:#d2a8ff;--syntax-type:#d2a8ff;--syntax-variable:#ffa657;--syntax-property:#79c0ff;--syntax-tag:#7ee787;--syntax-selector:#d2a8ff;--syntax-inserted:#7ee787;--syntax-deleted:#ff7b72;--code-bg:var(--input-background)}:host([color-scheme=light]){--background:#fff;--foreground:#27272a;--card:color-mix(in srgb, var(--background) 94%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #000);--muted:color-mix(in srgb, var(--background) 94%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 60%, var(--background));--primary-text:var(--primary-text-light);--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 92%, var(--foreground));--input:color-mix(in srgb, var(--border) 75%, var(--foreground));--input-background:var(--background);--method-get:#2563eb;--method-post:#047857;--method-put:#c2410c;--method-delete:#b91c1c;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#be185d;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--destructive:#dc2626;--blue:#2768f4;--green:#059669;--orange:#d97706;--red:#dc2626;--purple:#7c3aed;--yellow:#b45309;--pink:#db2777;--brown:#92400e;--syntax-comment:#6e7781;--syntax-keyword:#cf222e;--syntax-operator:#24292f;--syntax-string:#0a3069;--syntax-constant:#0550ae;--syntax-function:#8250df;--syntax-type:#8250df;--syntax-variable:#953800;--syntax-property:#0550ae;--syntax-tag:#116329;--syntax-selector:#8250df;--syntax-inserted:#116329;--syntax-deleted:#cf222e;--code-bg:color-mix(in srgb, var(--background) 96%, var(--foreground))}@media (prefers-color-scheme:light){:host([color-scheme=system]){--background:#fff;--foreground:#27272a;--card:color-mix(in srgb, var(--background) 94%, var(--foreground));--card-foreground:color-mix(in srgb, var(--foreground) 90%, #000);--muted:color-mix(in srgb, var(--background) 94%, var(--foreground));--muted-foreground:color-mix(in srgb, var(--foreground) 60%, var(--background));--primary-text:var(--primary-text-light);--border:color-mix(in srgb, var(--background) 85%, var(--foreground));--sidebar-accent:color-mix(in srgb, var(--background) 92%, var(--foreground));--input:color-mix(in srgb, var(--border) 75%, var(--foreground));--input-background:var(--background);--method-get:#2563eb;--method-post:#047857;--method-put:#c2410c;--method-delete:#b91c1c;--method-patch:#7c3aed;--method-head:#b45309;--method-options:#0e7490;--method-trace:#be185d;--method-query:#4f46e5;--method-default:#475569;--method-badge-fg:#fff;--destructive:#dc2626;--blue:#2768f4;--green:#059669;--orange:#d97706;--red:#dc2626;--purple:#7c3aed;--yellow:#b45309;--pink:#db2777;--brown:#92400e;--syntax-comment:#6e7781;--syntax-keyword:#cf222e;--syntax-operator:#24292f;--syntax-string:#0a3069;--syntax-constant:#0550ae;--syntax-function:#8250df;--syntax-type:#8250df;--syntax-variable:#953800;--syntax-property:#0550ae;--syntax-tag:#116329;--syntax-selector:#8250df;--syntax-inserted:#116329;--syntax-deleted:#cf222e;--code-bg:color-mix(in srgb, var(--background) 96%, var(--foreground))}}${jp}`,_p=/[\s#:?&={}]/g,ar="_rapidoc_api_key";function Mr(e){return new Promise(t=>setTimeout(t,e))}function nr(e,t){let r=t.target,a=document.createElement("textarea");a.value=e,a.style.position="fixed",document.body.appendChild(a),a.focus(),a.select();try{document.execCommand("copy"),r.innerText="Copied",setTimeout(()=>{r.innerText="Copy"},5e3)}catch{}document.body.removeChild(a)}function qp(e,t){return t.name.toLowerCase().includes(e.toLowerCase())}function Hr(e="",t,r=""){return!e||`${t.method} ${t.path} ${t.summary||""} ${t.description||""} ${t.operationId||""} ${r}`.toLowerCase().includes(e.toLowerCase())}function hn(e){return!e||typeof e!="object"?!1:e.xInternal===!0||e.xInternal==="true"||e.xHidden===!0||e.xHidden==="true"||e["x-internal"]===!0||e["x-internal"]==="true"||e["x-hidden"]===!0||e["x-hidden"]==="true"||e.rawOperation?.["x-internal"]===!0||e.rawOperation?.["x-internal"]==="true"||e.rawOperation?.["x-hidden"]===!0||e.rawOperation?.["x-hidden"]==="true"}function mn(e,t=new Set){return e&&Object.keys(e).forEach(r=>{t.add(r),e[r].properties?mn(e[r].properties,t):e[r].items?.properties&&mn(e[r].items?.properties,t)}),t}function Ip(e,t,r=[]){if(!e.trim()||r.length===0)return;let a=[];return t.forEach(n=>{n.paths.forEach(s=>{let i="";if(r.includes("search-api-path")&&(i=s.path),r.includes("search-api-descr")&&(i=`${i} ${(s.summary||"")+(s.description||"")}`),r.includes("search-api-params")&&(i=`${i} ${s.parameters?.map(o=>o.name).join(" ")||""}`),r.includes("search-api-request-body")&&s.requestBody){let o=new Set;for(let l in s.requestBody?.content)s.requestBody.content[l].schema?.properties&&(o=mn(s.requestBody.content[l].schema?.properties)),i=`${i} ${[...o].join(" ")}`}r.includes("search-api-resp-descr")&&(i=`${i} ${Object.values(s.responses).map(o=>o.description||"").join(" ")}`),i.toLowerCase().includes(e.trim().toLowerCase())&&a.push({elementId:s.elementId,method:s.method,path:s.path,summary:s.summary||s.description||"",deprecated:s.deprecated})})}),a}function zi(e,t){if(e){let r=document.createElement("a");document.body.appendChild(r),r.style="display: none",r.href=e,r.download=t,r.click(),r.remove()}}function Pi(e){if(e){let t=document.createElement("a");document.body.appendChild(t),t.style="display: none",t.href=e,t.target="_blank",t.click(),t.remove()}}function $t(e){return`var(--${e==="primary-color"?"primary":e})`}var fn=Symbol.for("yaml.alias"),gn=Symbol.for("yaml.document"),Be=Symbol.for("yaml.map"),Ui=Symbol.for("yaml.pair"),ke=Symbol.for("yaml.scalar"),St=Symbol.for("yaml.seq"),pe=Symbol.for("yaml.node.type"),At=e=>!!e&&typeof e=="object"&&e[pe]===fn,Wr=e=>!!e&&typeof e=="object"&&e[pe]===gn,sr=e=>!!e&&typeof e=="object"&&e[pe]===Be,X=e=>!!e&&typeof e=="object"&&e[pe]===Ui,V=e=>!!e&&typeof e=="object"&&e[pe]===ke,ir=e=>!!e&&typeof e=="object"&&e[pe]===St;function Y(e){if(e&&typeof e=="object")switch(e[pe]){case Be:case St:return!0}return!1}function Q(e){if(e&&typeof e=="object")switch(e[pe]){case fn:case Be:case ke:case St:return!0}return!1}var Mi=e=>(V(e)||Y(e))&&!!e.anchor,rt=Symbol("break visit"),Lp=Symbol("skip children"),or=Symbol("remove node");function Et(e,t){let r=Np(t);Wr(e)?Dt(null,e.contents,r,Object.freeze([e]))===or&&(e.contents=null):Dt(null,e,r,Object.freeze([]))}Et.BREAK=rt,Et.SKIP=Lp,Et.REMOVE=or;function Dt(e,t,r,a){let n=Bp(e,t,r,a);if(Q(n)||X(n))return zp(e,a,n),Dt(e,n,r,a);if(typeof n!="symbol"){if(Y(t)){a=Object.freeze(a.concat(t));for(let s=0;s<t.items.length;++s){let i=Dt(s,t.items[s],r,a);if(typeof i=="number")s=i-1;else{if(i===rt)return rt;i===or&&(t.items.splice(s,1),--s)}}}else if(X(t)){a=Object.freeze(a.concat(t));let s=Dt("key",t.key,r,a);if(s===rt)return rt;s===or&&(t.key=null);let i=Dt("value",t.value,r,a);if(i===rt)return rt;i===or&&(t.value=null)}}return n}function Np(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Bp(e,t,r,a){if(typeof r=="function")return r(e,t,a);if(sr(t))return r.Map?.(e,t,a);if(ir(t))return r.Seq?.(e,t,a);if(X(t))return r.Pair?.(e,t,a);if(V(t))return r.Scalar?.(e,t,a);if(At(t))return r.Alias?.(e,t,a)}function zp(e,t,r){let a=t[t.length-1];if(Y(a))a.items[e]=r;else if(X(a))e==="key"?a.key=r:a.value=r;else if(Wr(a))a.contents=r;else{let n=At(a)?"alias":"scalar";throw Error(`Cannot replace node with ${n} parent`)}}var Pp={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Up=e=>e.replace(/[!,[\]{}]/g,t=>Pp[t]),Ct=class Ie{constructor(t,r){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ie.defaultYaml,t),this.tags=Object.assign({},Ie.defaultTags,r)}clone(){let t=new Ie(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new Ie(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ie.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ie.defaultTags)}return t}add(t,r){this.atNextDocument&&=(this.yaml={explicit:Ie.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ie.defaultTags),!1);let a=t.trim().split(/[ \t]+/),n=a.shift();switch(n){case"%TAG":{if(a.length!==2&&(r(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;let[s,i]=a;return this.tags[s]=i,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return r(0,"%YAML directive should contain exactly one part"),!1;let[s]=a;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{let i=/^\d+\.\d+$/.test(s);return r(6,`Unsupported YAML version ${s}`,i),!1}}default:return r(0,`Unknown directive ${n}`,!0),!1}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!")return r(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let i=t.slice(2,-1);return i==="!"||i==="!!"?(r(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&r("Verbatim tags must end with a >"),i)}let[,a,n]=t.match(/^(.*!)([^!]*)$/s);n||r(`The ${t} tag has no suffix`);let s=this.tags[a];if(s)try{return s+decodeURIComponent(n)}catch(i){return r(String(i)),null}return a==="!"?t:(r(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[r,a]of Object.entries(this.tags))if(t.startsWith(a))return r+Up(t.substring(a.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags),n;if(t&&a.length>0&&Q(t.contents)){let s={};Et(t.contents,(i,o)=>{Q(o)&&o.tag&&(s[o.tag]=!0)}),n=Object.keys(s)}else n=[];for(let[s,i]of a)s==="!!"&&i==="tag:yaml.org,2002:"||t&&!n.some(o=>o.startsWith(i))||r.push(`%TAG ${s} ${i}`);return r.join(`
`)}};Ct.defaultYaml={explicit:!1,version:"1.2"},Ct.defaultTags={"!!":"tag:yaml.org,2002:"};function Hi(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Wi(e){let t=new Set;return Et(e,{Value(r,a){a.anchor&&t.add(a.anchor)}}),t}function Ki(e,t){for(let r=1;;++r){let a=`${e}${r}`;if(!t.has(a))return a}}function Mp(e,t){let r=[],a=new Map,n=null;return{onAnchor:s=>{r.push(s),n??=Wi(e);let i=Ki(t,n);return n.add(i),i},setAnchors:()=>{for(let s of r){let i=a.get(s);if(typeof i=="object"&&i.anchor&&(V(i.node)||Y(i.node)))i.node.anchor=i.anchor;else{let o=Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:a}}function Tt(e,t,r,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let n=0,s=a.length;n<s;++n){let i=a[n],o=Tt(e,a,String(n),i);o===void 0?delete a[n]:o!==i&&(a[n]=o)}else if(a instanceof Map)for(let n of Array.from(a.keys())){let s=a.get(n),i=Tt(e,a,n,s);i===void 0?a.delete(n):i!==s&&a.set(n,i)}else if(a instanceof Set)for(let n of Array.from(a)){let s=Tt(e,a,n,n);s===void 0?a.delete(n):s!==n&&(a.delete(n),a.add(s))}else for(let[n,s]of Object.entries(a)){let i=Tt(e,a,n,s);i===void 0?delete a[n]:i!==s&&(a[n]=i)}return e.call(t,r,a)}function ue(e,t,r){if(Array.isArray(e))return e.map((a,n)=>ue(a,String(n),r));if(e&&typeof e.toJSON=="function"){if(!r||!Mi(e))return e.toJSON(t,r);let a={aliasCount:0,count:1,res:void 0};r.anchors.set(e,a),r.onCreate=s=>{a.res=s,delete r.onCreate};let n=e.toJSON(t,r);return r.onCreate&&r.onCreate(n),n}return typeof e=="bigint"&&!r?.keep?Number(e):e}var yn=class{constructor(e){Object.defineProperty(this,pe,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:a,reviver:n}={}){if(!Wr(e))throw TypeError("A document argument is required");let s={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},i=ue(this,"",s);if(typeof a=="function")for(let{count:o,res:l}of s.anchors.values())a(l,o);return typeof n=="function"?Tt(n,{"":i},"",i):i}},bn=class extends yn{constructor(e){super(fn),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");let r;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],Et(e,{Node:(n,s)=>{(At(s)||Mi(s))&&r.push(s)}}),t&&(t.aliasResolveCache=r));let a;for(let n of r){if(n===this)break;n.anchor===this.source&&(a=n)}if(a&&t){let{anchors:n,doc:s,maxAliasCount:i}=t,o=n.get(a);if(o||=(ue(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Kr(s,a,n)),o.count*o.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return a}toJSON(e,t){if(!t)return{source:this.source};let r=this.resolve(t.doc,t);if(!r){let a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(a)}return t.anchors.get(r).res}toString(e,t,r){let a=`*${this.source}`;if(e){if(Hi(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(n)}if(e.implicitKey)return`${a} `}return a}};function Kr(e,t,r){if(At(t)){let a=t.resolve(e),n=r&&a&&r.get(a);return n?n.count*n.aliasCount:0}if(Y(t)){let a=0;for(let n of t.items){let s=Kr(e,n,r);s>a&&(a=s)}return a}if(X(t)){let a=Kr(e,t.key,r),n=Kr(e,t.value,r);return Math.max(a,n)}return 1}var Vi=e=>!e||typeof e!="function"&&typeof e!="object",L=class extends yn{constructor(e){super(ke),this.value=e}toJSON(e,t){return t?.keep?this.value:ue(this.value,e,t)}toString(){return String(this.value)}};L.BLOCK_FOLDED="BLOCK_FOLDED",L.BLOCK_LITERAL="BLOCK_LITERAL",L.PLAIN="PLAIN",L.QUOTE_DOUBLE="QUOTE_DOUBLE",L.QUOTE_SINGLE="QUOTE_SINGLE";var Hp="tag:yaml.org,2002:";function Wp(e,t,r){if(t){let a=r.filter(s=>s.tag===t),n=a.find(s=>!s.format)??a[0];if(!n)throw Error(`Tag ${t} not found`);return n}return r.find(a=>a.identify?.(e)&&!a.format)}function lr(e,t,r){if(Wr(e)&&(e=e.contents),Q(e))return e;if(X(e)){let p=r.schema[Be].createNode?.(r.schema,null,r);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:a,onAnchor:n,onTagObj:s,schema:i,sourceObjects:o}=r,l;if(a&&e&&typeof e=="object"){if(l=o.get(e),l)return l.anchor??(l.anchor=n(e)),new bn(l.anchor);l={anchor:null,node:null},o.set(e,l)}t?.startsWith("!!")&&(t=Hp+t.slice(2));let c=Wp(e,t,i.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let p=new L(e);return l&&(l.node=p),p}c=e instanceof Map?i[Be]:Symbol.iterator in Object(e)?i[St]:i[Be]}s&&(s(c),delete r.onTagObj);let d=c?.createNode?c.createNode(r.schema,e,r):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(r.schema,e,r):new L(e);return t?d.tag=t:c.default||(d.tag=c.tag),l&&(l.node=d),d}function Vr(e,t,r){let a=r;for(let n=t.length-1;n>=0;--n){let s=t[n];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){let i=[];i[s]=a,a=i}else a=new Map([[s,a]])}return lr(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var cr=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,Zi=class extends yn{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(r=>Q(r)||X(r)?r.clone(e):r),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(cr(e))this.add(t);else{let[r,...a]=e,n=this.get(r,!0);if(Y(n))n.addIn(a,t);else if(n===void 0&&this.schema)this.set(r,Vr(this.schema,a,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}deleteIn(e){let[t,...r]=e;if(r.length===0)return this.delete(t);let a=this.get(t,!0);if(Y(a))return a.deleteIn(r);throw Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){let[r,...a]=e,n=this.get(r,!0);return a.length===0?!t&&V(n)?n.value:n:Y(n)?n.getIn(a,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!X(t))return!1;let r=t.value;return r==null||e&&V(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){let[t,...r]=e;if(r.length===0)return this.has(t);let a=this.get(t,!0);return Y(a)?a.hasIn(r):!1}setIn(e,t){let[r,...a]=e;if(a.length===0)this.set(r,t);else{let n=this.get(r,!0);if(Y(n))n.setIn(a,t);else if(n===void 0&&this.schema)this.set(r,Vr(this.schema,a,t));else throw Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}},Kp=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function De(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var at=(e,t,r)=>e.endsWith(`
`)?De(r,t):r.includes(`
`)?`
`+De(r,t):(e.endsWith(" ")?"":" ")+r,Ji="flow",Vp="block",Zp="quoted";function Zr(e,t,r="flow",{indentAtStart:a,lineWidth:n=80,minContentWidth:s=20,onFold:i,onOverflow:o}={}){if(!n||n<0)return e;n<s&&(s=0);let l=Math.max(1+s,1+n-t.length);if(e.length<=l)return e;let c=[],d={},p=n-t.length;typeof a=="number"&&(a>n-Math.max(2,s)?c.push(0):p=n-a);let f,h,y=!1,m=-1,g=-1,k=-1;r==="block"&&(m=Gi(e,m,t.length),m!==-1&&(p=m+l));for(let w;w=e[m+=1];){if(r==="quoted"&&w==="\\"){switch(g=m,e[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}k=m}if(w===`
`)r==="block"&&(m=Gi(e,m,t.length)),p=m+t.length+l,f=void 0;else{if(w===" "&&h&&h!==" "&&h!==`
`&&h!=="	"){let b=e[m+1];b&&b!==" "&&b!==`
`&&b!=="	"&&(f=m)}if(m>=p)if(f)c.push(f),p=f+l,f=void 0;else if(r==="quoted"){for(;h===" "||h==="	";)h=w,w=e[m+=1],y=!0;let b=m>k+1?m-2:g-1;if(d[b])return e;c.push(b),d[b]=!0,p=b+l,f=void 0}else y=!0}h=w}if(y&&o&&o(),c.length===0)return e;i&&i();let v=e.slice(0,c[0]);for(let w=0;w<c.length;++w){let b=c[w],A=c[w+1]||e.length;b===0?v=`
${t}${e.slice(0,A)}`:(r==="quoted"&&d[b]&&(v+=`${e[b]}\\`),v+=`
${t}${e.slice(b+1,A)}`)}return v}function Gi(e,t,r){let a=t,n=t+1,s=e[n];for(;s===" "||s==="	";)if(t<n+r)s=e[++t];else{do s=e[++t];while(s&&s!==`
`);a=t,n=t+1,s=e[n]}return a}var Jr=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Gr=e=>/^(%|---|\.\.\.)/m.test(e);function Jp(e,t,r){if(!t||t<0)return!1;let a=t-r,n=e.length;if(n<=a)return!1;for(let s=0,i=0;s<n;++s)if(e[s]===`
`){if(s-i>a)return!0;if(i=s+1,n-i<=a)return!1}return!0}function dr(e,t){let r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;let{implicitKey:a}=t,n=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(Gr(e)?"  ":""),i="",o=0;for(let l=0,c=r[l];c;c=r[++l])if(c===" "&&r[l+1]==="\\"&&r[l+2]==="n"&&(i+=r.slice(o,l)+"\\ ",l+=1,o=l,c="\\"),c==="\\")switch(r[l+1]){case"u":{i+=r.slice(o,l);let d=r.substr(l+2,4);switch(d){case"0000":i+="\\0";break;case"0007":i+="\\a";break;case"000b":i+="\\v";break;case"001b":i+="\\e";break;case"0085":i+="\\N";break;case"00a0":i+="\\_";break;case"2028":i+="\\L";break;case"2029":i+="\\P";break;default:d.substr(0,2)==="00"?i+="\\x"+d.substr(2):i+=r.substr(l,6)}l+=5,o=l+1}break;case"n":if(a||r[l+2]==='"'||r.length<n)l+=1;else{for(i+=r.slice(o,l)+`

`;r[l+2]==="\\"&&r[l+3]==="n"&&r[l+4]!=='"';)i+=`
`,l+=2;i+=s,r[l+2]===" "&&(i+="\\"),l+=1,o=l+1}break;default:l+=1}return i=o?i+r.slice(o):r,a?i:Zr(i,s,Zp,Jr(t,!1))}function vn(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
`)||/[ \t]\n|\n[ \t]/.test(e))return dr(e,t);let r=t.indent||(Gr(e)?"  ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
${r}`)+"'";return t.implicitKey?a:Zr(a,r,Ji,Jr(t,!1))}function Ot(e,t){let{singleQuote:r}=t.options,a;if(r===!1)a=dr;else{let n=e.includes('"'),s=e.includes("'");a=n&&!s?vn:s&&!n?dr:r?vn:dr}return a(e,t)}var xn;try{xn=RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{xn=/\n+(?!\n|$)/g}function Xr({comment:e,type:t,value:r},a,n,s){let{blockQuote:i,commentString:o,lineWidth:l}=a.options;if(!i||/\n[\t ]+$/.test(r))return Ot(r,a);let c=a.indent||(a.forceBlockIndent||Gr(r)?"  ":""),d=i==="literal"?!0:i==="folded"||t===L.BLOCK_FOLDED?!1:t===L.BLOCK_LITERAL||!Jp(r,l,c.length);if(!r)return d?`|
`:`>
`;let p,f;for(f=r.length;f>0;--f){let b=r[f-1];if(b!==`
`&&b!=="	"&&b!==" ")break}let h=r.substring(f),y=h.indexOf(`
`);y===-1?p="-":r===h||y!==h.length-1?(p="+",s&&s()):p="",h&&=(r=r.slice(0,-h.length),h[h.length-1]===`
`&&(h=h.slice(0,-1)),h.replace(xn,`$&${c}`));let m=!1,g,k=-1;for(g=0;g<r.length;++g){let b=r[g];if(b===" ")m=!0;else if(b===`
`)k=g;else break}let v=r.substring(0,k<g?k+1:g);v&&=(r=r.substring(v.length),v.replace(/\n+/g,`$&${c}`));let w=(m?c?"2":"1":"")+p;if(e&&(w+=" "+o(e.replace(/ ?[\r\n]+/g," ")),n&&n()),!d){let b=r.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,$=Jr(a,!0);i!=="folded"&&t!==L.BLOCK_FOLDED&&($.onOverflow=()=>{A=!0});let E=Zr(`${v}${b}${h}`,c,Vp,$);if(!A)return`>${w}
${c}${E}`}return r=r.replace(/\n+/g,`$&${c}`),`|${w}
${c}${v}${r}${h}`}function Gp(e,t,r,a){let{type:n,value:s}=e,{actualString:i,implicitKey:o,indent:l,indentStep:c,inFlow:d}=t;if(o&&s.includes(`
`)||d&&/[[\]{},]/.test(s))return Ot(s,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||d||!s.includes(`
`)?Ot(s,t):Xr(e,t,r,a);if(!o&&!d&&n!==L.PLAIN&&s.includes(`
`))return Xr(e,t,r,a);if(Gr(s)){if(l==="")return t.forceBlockIndent=!0,Xr(e,t,r,a);if(o&&l===c)return Ot(s,t)}let p=s.replace(/\n+/g,`$&
${l}`);if(i){let f=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(p),{compat:h,tags:y}=t.doc.schema;if(y.some(f)||h?.some(f))return Ot(s,t)}return o?p:Zr(p,l,Ji,Jr(t,!1))}function wn(e,t,r,a){let{implicitKey:n,inFlow:s}=t,i=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:o}=e;o!==L.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(i.value)&&(o=L.QUOTE_DOUBLE);let l=d=>{switch(d){case L.BLOCK_FOLDED:case L.BLOCK_LITERAL:return n||s?Ot(i.value,t):Xr(i,t,r,a);case L.QUOTE_DOUBLE:return dr(i.value,t);case L.QUOTE_SINGLE:return vn(i.value,t);case L.PLAIN:return Gp(i,t,r,a);default:return null}},c=l(o);if(c===null){let{defaultKeyType:d,defaultStringType:p}=t.options,f=n&&d||p;if(c=l(f),c===null)throw Error(`Unsupported default string type ${f}`)}return c}function Xi(e,t){let r=Object.assign({blockQuote:!0,commentString:Kp,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),a;switch(r.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):"  ",inFlow:a,options:r}}function Xp(e,t){if(t.tag){let n=e.filter(s=>s.tag===t.tag);if(n.length>0)return n.find(s=>s.format===t.format)??n[0]}let r,a;if(V(t)){a=t.value;let n=e.filter(s=>s.identify?.(a));if(n.length>1){let s=n.filter(i=>i.test);s.length>0&&(n=s)}r=n.find(s=>s.format===t.format)??n.find(s=>!s.format)}else a=t,r=e.find(n=>n.nodeClass&&a instanceof n.nodeClass);if(!r){let n=a?.constructor?.name??(a===null?"null":typeof a);throw Error(`Tag not resolved for ${n} value`)}return r}function Yp(e,t,{anchors:r,doc:a}){if(!a.directives)return"";let n=[],s=(V(e)||Y(e))&&e.anchor;s&&Hi(s)&&(r.add(s),n.push(`&${s}`));let i=e.tag??(t.default?null:t.tag);return i&&n.push(a.directives.tagString(i)),n.join(" ")}function Ft(e,t,r,a){if(X(e))return e.toString(t,r,a);if(At(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let n,s=Q(e)?e:t.doc.createNode(e,{onTagObj:l=>n=l});n??=Xp(t.doc.schema.tags,s);let i=Yp(s,n,t);i.length>0&&(t.indentAtStart=(t.indentAtStart??0)+i.length+1);let o=typeof n.stringify=="function"?n.stringify(s,t,r,a):V(s)?wn(s,t,r,a):s.toString(t,r,a);return i?V(s)||o[0]==="{"||o[0]==="["?`${i} ${o}`:`${i}
${t.indent}${o}`:o}function Qp({key:e,value:t},r,a,n){let{allNullValues:s,doc:i,indent:o,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:p}}=r,f=Q(e)&&e.comment||null;if(p){if(f)throw Error("With simple keys, key nodes cannot have comments");if(Y(e)||!Q(e)&&typeof e=="object")throw Error("With simple keys, collection cannot be used as a key value")}let h=!p&&(!e||f&&t==null&&!r.inFlow||Y(e)||(V(e)?e.type===L.BLOCK_FOLDED||e.type===L.BLOCK_LITERAL:typeof e=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!h&&(p||!s),indent:o+l});let y=!1,m=!1,g=Ft(e,r,()=>y=!0,()=>m=!0);if(!h&&!r.inFlow&&g.length>1024){if(p)throw Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(r.inFlow){if(s||t==null)return y&&a&&a(),g===""?"?":h?`? ${g}`:g}else if(s&&!p||t==null&&h)return g=`? ${g}`,f&&!y?g+=at(g,r.indent,c(f)):m&&n&&n(),g;y&&(f=null),h?(f&&(g+=at(g,r.indent,c(f))),g=`? ${g}
${o}:`):(g=`${g}:`,f&&(g+=at(g,r.indent,c(f))));let k,v,w;Q(t)?(k=!!t.spaceBefore,v=t.commentBefore,w=t.comment):(k=!1,v=null,w=null,t&&typeof t=="object"&&(t=i.createNode(t))),r.implicitKey=!1,!h&&!f&&V(t)&&(r.indentAtStart=g.length+1),m=!1,!d&&l.length>=2&&!r.inFlow&&!h&&ir(t)&&!t.flow&&!t.tag&&!t.anchor&&(r.indent=r.indent.substring(2));let b=!1,A=Ft(t,r,()=>b=!0,()=>m=!0),$=" ";if(f||k||v){if($=k?`
`:"",v){let E=c(v);$+=`
${De(E,r.indent)}`}A===""&&!r.inFlow?$===`
`&&w&&($=`

`):$+=`
${r.indent}`}else if(!h&&Y(t)){let E=A[0],D=A.indexOf(`
`),O=D!==-1,j=r.inFlow??t.flow??t.items.length===0;if(O||!j){let R=!1;if(O&&(E==="&"||E==="!")){let N=A.indexOf(" ");E==="&"&&N!==-1&&N<D&&A[N+1]==="!"&&(N=A.indexOf(" ",N+1)),(N===-1||D<N)&&(R=!0)}R||($=`
${r.indent}`)}}else(A===""||A[0]===`
`)&&($="");return g+=$+A,r.inFlow?b&&a&&a():w&&!b?g+=at(g,r.indent,c(w)):m&&n&&n(),g}function pg(e,t){}var Yr="<<",Ce={identify:e=>e===Yr||typeof e=="symbol"&&e.description===Yr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new L(Symbol(Yr)),{addToJSMap:Yi}),stringify:()=>Yr},eu=(e,t)=>(Ce.identify(t)||V(t)&&(!t.type||t.type===L.PLAIN)&&Ce.identify(t.value))&&e?.doc.schema.tags.some(r=>r.tag===Ce.tag&&r.default);function Yi(e,t,r){let a=Qi(e,r);if(ir(a))for(let n of a.items)kn(e,t,n);else if(Array.isArray(a))for(let n of a)kn(e,t,n);else kn(e,t,a)}function kn(e,t,r){let a=Qi(e,r);if(!sr(a))throw Error("Merge sources must be maps or map aliases");let n=a.toJSON(null,e,Map);for(let[s,i]of n)t instanceof Map?t.has(s)||t.set(s,i):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function Qi(e,t){return e&&At(t)?t.resolve(e.doc,e):t}function eo(e,t,{key:r,value:a}){if(Q(r)&&r.addToJSMap)r.addToJSMap(e,t,a);else if(eu(e,r))Yi(e,t,a);else{let n=ue(r,"",e);if(t instanceof Map)t.set(n,ue(a,n,e));else if(t instanceof Set)t.add(n);else{let s=tu(r,n,e),i=ue(a,s,e);s in t?Object.defineProperty(t,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):t[s]=i}}return t}function tu(e,t,r){if(t===null)return"";if(typeof t!="object")return String(t);if(Q(e)&&r?.doc){let a=Xi(r.doc,{});a.anchors=new Set;for(let s of r.anchors.keys())a.anchors.add(s.anchor);a.inFlow=!0,a.inStringifyKey=!0;let n=e.toString(a);if(!r.mapKeyWarned){let s=JSON.stringify(n);s.length>40&&(s=s.substring(0,36)+'..."'),r.doc.options.logLevel,`${s}`,r.mapKeyWarned=!0}return n}return JSON.stringify(t)}function $n(e,t,r){return new le(lr(e,void 0,r),lr(t,void 0,r))}var le=class Vc{constructor(t,r=null){Object.defineProperty(this,pe,{value:Ui}),this.key=t,this.value=r}clone(t){let{key:r,value:a}=this;return Q(r)&&(r=r.clone(t)),Q(a)&&(a=a.clone(t)),new Vc(r,a)}toJSON(t,r){return eo(r,r?.mapAsMap?new Map:{},this)}toString(t,r,a){return t?.doc?Qp(this,t,r,a):JSON.stringify(this)}};function to(e,t,r){return(t.inFlow??e.flow?au:ru)(e,t,r)}function ru({comment:e,items:t},r,{blockItemPrefix:a,flowChars:n,itemIndent:s,onChompKeep:i,onComment:o}){let{indent:l,options:{commentString:c}}=r,d=Object.assign({},r,{indent:s,type:null}),p=!1,f=[];for(let y=0;y<t.length;++y){let m=t[y],g=null;if(Q(m))!p&&m.spaceBefore&&f.push(""),Qr(r,f,m.commentBefore,p),m.comment&&(g=m.comment);else if(X(m)){let v=Q(m.key)?m.key:null;v&&(!p&&v.spaceBefore&&f.push(""),Qr(r,f,v.commentBefore,p))}p=!1;let k=Ft(m,d,()=>g=null,()=>p=!0);g&&(k+=at(k,s,c(g))),p&&g&&(p=!1),f.push(a+k)}let h;if(f.length===0)h=n.start+n.end;else{h=f[0];for(let y=1;y<f.length;++y){let m=f[y];h+=m?`
${l}${m}`:`
`}}return e?(h+=`
`+De(c(e),l),o&&o()):p&&i&&i(),h}function au({items:e},t,{flowChars:r,itemIndent:a}){let{indent:n,indentStep:s,flowCollectionPadding:i,options:{commentString:o}}=t;a+=s;let l=Object.assign({},t,{indent:a,inFlow:!0,type:null}),c=!1,d=0,p=[];for(let y=0;y<e.length;++y){let m=e[y],g=null;if(Q(m))m.spaceBefore&&p.push(""),Qr(t,p,m.commentBefore,!1),m.comment&&(g=m.comment);else if(X(m)){let v=Q(m.key)?m.key:null;v&&(v.spaceBefore&&p.push(""),Qr(t,p,v.commentBefore,!1),v.comment&&(c=!0));let w=Q(m.value)?m.value:null;w?(w.comment&&(g=w.comment),w.commentBefore&&(c=!0)):m.value==null&&v?.comment&&(g=v.comment)}g&&(c=!0);let k=Ft(m,l,()=>g=null);c||=p.length>d||k.includes(`
`),y<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||=p.reduce((v,w)=>v+w.length+2,2)+(k.length+2)>t.options.lineWidth),c&&(k+=",")),g&&(k+=at(k,a,o(g))),p.push(k),d=p.length}let{start:f,end:h}=r;if(p.length===0)return f+h;if(!c){let y=p.reduce((m,g)=>m+g.length+2,2);c=t.options.lineWidth>0&&y>t.options.lineWidth}if(c){let y=f;for(let m of p)y+=m?`
${s}${n}${m}`:`
`;return`${y}
${n}${h}`}return`${f}${i}${p.join(" ")}${i}${h}`}function Qr({indent:e,options:{commentString:t}},r,a,n){if(a&&n&&(a=a.replace(/^\n+/,"")),a){let s=De(t(a),e);r.push(s.trimStart())}}function nt(e,t){let r=V(t)?t.value:t;for(let a of e)if(X(a)&&(a.key===t||a.key===r||V(a.key)&&a.key.value===r))return a}var he=class extends Zi{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Be,e),this.items=[]}static from(e,t,r){let{keepUndefined:a,replacer:n}=r,s=new this(e),i=(o,l)=>{if(typeof n=="function")l=n.call(t,o,l);else if(Array.isArray(n)&&!n.includes(o))return;(l!==void 0||a)&&s.items.push($n(o,l,r))};if(t instanceof Map)for(let[o,l]of t)i(o,l);else if(t&&typeof t=="object")for(let o of Object.keys(t))i(o,t[o]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,t){let r;r=X(e)?e:!e||typeof e!="object"||!("key"in e)?new le(e,e?.value):new le(e.key,e.value);let a=nt(this.items,r.key),n=this.schema?.sortMapEntries;if(a){if(!t)throw Error(`Key ${r.key} already set`);V(a.value)&&Vi(r.value)?a.value.value=r.value:a.value=r.value}else if(n){let s=this.items.findIndex(i=>n(r,i)<0);s===-1?this.items.push(r):this.items.splice(s,0,r)}else this.items.push(r)}delete(e){let t=nt(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let r=nt(this.items,e)?.value;return(!t&&V(r)?r.value:r)??void 0}has(e){return!!nt(this.items,e)}set(e,t){this.add(new le(e,t),!0)}toJSON(e,t,r){let a=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(a);for(let n of this.items)eo(t,a,n);return a}toString(e,t,r){if(!e)return JSON.stringify(this);for(let a of this.items)if(!X(a))throw Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),to(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}},jt={collection:"map",default:!0,nodeClass:he,tag:"tag:yaml.org,2002:map",resolve(e,t){return sr(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,r)=>he.from(e,t,r)},st=class extends Zi{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(St,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ea(e);return typeof t=="number"&&this.items.splice(t,1).length>0}get(e,t){let r=ea(e);if(typeof r!="number")return;let a=this.items[r];return!t&&V(a)?a.value:a}has(e){let t=ea(e);return typeof t=="number"&&t<this.items.length}set(e,t){let r=ea(e);if(typeof r!="number")throw Error(`Expected a valid index, not ${e}.`);let a=this.items[r];V(a)&&Vi(t)?a.value=t:this.items[r]=t}toJSON(e,t){let r=[];t?.onCreate&&t.onCreate(r);let a=0;for(let n of this.items)r.push(ue(n,String(a++),t));return r}toString(e,t,r){return e?to(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){let{replacer:a}=r,n=new this(e);if(t&&Symbol.iterator in Object(t)){let s=0;for(let i of t){if(typeof a=="function"){let o=t instanceof Set?i:String(s++);i=a.call(t,o,i)}n.items.push(lr(i,void 0,r))}}return n}};function ea(e){let t=V(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}var Rt={collection:"seq",default:!0,nodeClass:st,tag:"tag:yaml.org,2002:seq",resolve(e,t){return ir(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,r)=>st.from(e,t,r)},ta={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,a){return t=Object.assign({actualString:!0},t),wn(e,t,r,a)}},ra={identify:e=>e==null,createNode:()=>new L(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new L(null),stringify:({source:e},t)=>typeof e=="string"&&ra.test.test(e)?e:t.options.nullStr},Sn={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new L(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){return e&&Sn.test.test(e)&&t===(e[0]==="t"||e[0]==="T")?e:t?r.options.trueStr:r.options.falseStr}};function be({format:e,minFractionDigits:t,tag:r,value:a}){if(typeof a=="bigint")return String(a);let n=typeof a=="number"?a:Number(a);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let s=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^-?\d/.test(s)&&!s.includes("e")){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=t-(s.length-i-1);for(;o-- >0;)s+="0"}return s}var ro={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?-1/0:1/0,stringify:be},ao={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():be(e)}},no={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new L(parseFloat(e)),r=e.indexOf(".");return r!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-r-1),t},stringify:be},aa=e=>typeof e=="bigint"||Number.isInteger(e),An=(e,t,r,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),r);function so(e,t,r){let{value:a}=e;return aa(a)&&a>=0?r+a.toString(t):be(e)}var io={identify:e=>aa(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>An(e,2,8,r),stringify:e=>so(e,8,"0o")},oo={identify:aa,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>An(e,0,10,r),stringify:be},lo={identify:e=>aa(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>An(e,2,16,r),stringify:e=>so(e,16,"0x")},nu=[jt,Rt,ta,ra,Sn,io,oo,lo,ro,ao,no];function co(e){return typeof e=="bigint"||Number.isInteger(e)}var na=({value:e})=>JSON.stringify(e),su=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:na},{identify:e=>e==null,createNode:()=>new L(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:na},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:na},{identify:co,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>co(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:na}],iu=[jt,Rt].concat(su,{default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),En={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){let r=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(r.length);for(let n=0;n<r.length;++n)a[n]=r.charCodeAt(n);return a}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},a,n,s){if(!r)return"";let i=r,o;if(typeof btoa=="function"){let l="";for(let c=0;c<i.length;++c)l+=String.fromCharCode(i[c]);o=btoa(l)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??=L.BLOCK_LITERAL,t!==L.QUOTE_DOUBLE){let l=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),c=Math.ceil(o.length/l),d=Array(c);for(let p=0,f=0;p<c;++p,f+=l)d[p]=o.substr(f,l);o=d.join(t===L.BLOCK_LITERAL?`
`:" ")}return wn({comment:e,type:t,value:o},a,n,s)}};function po(e,t){if(ir(e))for(let r=0;r<e.items.length;++r){let a=e.items[r];if(!X(a)){if(sr(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");let n=a.items[0]||new le(new L(null));if(a.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${a.commentBefore}
${n.key.commentBefore}`:a.commentBefore),a.comment){let s=n.value??n.key;s.comment=s.comment?`${a.comment}
${s.comment}`:a.comment}a=n}e.items[r]=X(a)?a:new le(a)}}else t("Expected a sequence for this tag");return e}function uo(e,t,r){let{replacer:a}=r,n=new st(e);n.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let i of t){typeof a=="function"&&(i=a.call(t,String(s++),i));let o,l;if(Array.isArray(i))if(i.length===2)o=i[0],l=i[1];else throw TypeError(`Expected [key, value] tuple: ${i}`);else if(i&&i instanceof Object){let c=Object.keys(i);if(c.length===1)o=c[0],l=i[o];else throw TypeError(`Expected tuple with one key, not ${c.length} keys`)}else o=i;n.items.push($n(o,l,r))}return n}var Dn={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:po,createNode:uo},sa=class Zc extends st{constructor(){super(),this.add=he.prototype.add.bind(this),this.delete=he.prototype.delete.bind(this),this.get=he.prototype.get.bind(this),this.has=he.prototype.has.bind(this),this.set=he.prototype.set.bind(this),this.tag=Zc.tag}toJSON(t,r){if(!r)return super.toJSON(t);let a=new Map;r?.onCreate&&r.onCreate(a);for(let n of this.items){let s,i;if(X(n)?(s=ue(n.key,"",r),i=ue(n.value,s,r)):s=ue(n,"",r),a.has(s))throw Error("Ordered maps must not include duplicate keys");a.set(s,i)}return a}static from(t,r,a){let n=uo(t,r,a),s=new this;return s.items=n.items,s}};sa.tag="tag:yaml.org,2002:omap";var Cn={collection:"seq",identify:e=>e instanceof Map,nodeClass:sa,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let r=po(e,t),a=[];for(let{key:n}of r.items)V(n)&&(a.includes(n.value)?t(`Ordered maps must not include duplicate keys: ${n.value}`):a.push(n.value));return Object.assign(new sa,r)},createNode:(e,t,r)=>sa.from(e,t,r)};function ho({value:e,source:t},r){return t&&(e?mo:fo).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}var mo={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new L(!0),stringify:ho},fo={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new L(!1),stringify:ho},ou={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?-1/0:1/0,stringify:be},lu={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():be(e)}},cu={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new L(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(r!==-1){let a=e.substring(r+1).replace(/_/g,"");a[a.length-1]==="0"&&(t.minFractionDigits=a.length)}return t},stringify:be},pr=e=>typeof e=="bigint"||Number.isInteger(e);function ia(e,t,r,{intAsBigInt:a}){let n=e[0];if((n==="-"||n==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),a){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let i=BigInt(e);return n==="-"?BigInt(-1)*i:i}let s=parseInt(e,r);return n==="-"?-1*s:s}function Tn(e,t,r){let{value:a}=e;if(pr(a)){let n=a.toString(t);return a<0?"-"+r+n.substr(1):r+n}return be(e)}var du={identify:pr,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>ia(e,2,2,r),stringify:e=>Tn(e,2,"0b")},pu={identify:pr,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>ia(e,1,8,r),stringify:e=>Tn(e,8,"0")},uu={identify:pr,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>ia(e,0,10,r),stringify:be},hu={identify:pr,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>ia(e,2,16,r),stringify:e=>Tn(e,16,"0x")},oa=class Jc extends he{constructor(t){super(t),this.tag=Jc.tag}add(t){let r;r=X(t)?t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?new le(t.key,null):new le(t,null),nt(this.items,r.key)||this.items.push(r)}get(t,r){let a=nt(this.items,t);return!r&&X(a)?V(a.key)?a.key.value:a.key:a}set(t,r){if(typeof r!="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);let a=nt(this.items,t);a&&!r?this.items.splice(this.items.indexOf(a),1):!a&&r&&this.items.push(new le(t))}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,a){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),r,a);throw Error("Set items must all have null values")}static from(t,r,a){let{replacer:n}=a,s=new this(t);if(r&&Symbol.iterator in Object(r))for(let i of r)typeof n=="function"&&(i=n.call(r,i,i)),s.items.push($n(i,null,a));return s}};oa.tag="tag:yaml.org,2002:set";var On={collection:"map",identify:e=>e instanceof Set,nodeClass:oa,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>oa.from(e,t,r),resolve(e,t){if(sr(e)){if(e.hasAllNullValues(!0))return Object.assign(new oa,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Fn(e,t){let r=e[0],a=r==="-"||r==="+"?e.substring(1):e,n=i=>t?BigInt(i):Number(i),s=a.replace(/_/g,"").split(":").reduce((i,o)=>i*n(60)+n(o),n(0));return r==="-"?n(-1)*s:s}function go(e){let{value:t}=e,r=i=>i;if(typeof t=="bigint")r=i=>BigInt(i);else if(isNaN(t)||!isFinite(t))return be(e);let a="";t<0&&(a="-",t*=r(-1));let n=r(60),s=[t%n];return t<60?s.unshift(0):(t=(t-s[0])/n,s.unshift(t%n),t>=60&&(t=(t-s[0])/n,s.unshift(t))),a+s.map(i=>String(i).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var yo={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>Fn(e,r),stringify:go},bo={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Fn(e,!1),stringify:go},la={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(la.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,r,a,n,s,i,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(r,a-1,n,s||0,i||0,o||0,l),d=t[8];if(d&&d!=="Z"){let p=Fn(d,!1);Math.abs(p)<30&&(p*=60),c-=6e4*p}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},vo=[jt,Rt,ta,ra,mo,fo,du,pu,uu,hu,ou,lu,cu,En,Ce,Cn,Dn,On,yo,bo,la],xo=new Map([["core",nu],["failsafe",[jt,Rt,ta]],["json",iu],["yaml11",vo],["yaml-1.1",vo]]),wo={binary:En,bool:Sn,float:no,floatExp:ao,floatNaN:ro,floatTime:bo,int:oo,intHex:lo,intOct:io,intTime:yo,map:jt,merge:Ce,null:ra,omap:Cn,pairs:Dn,seq:Rt,set:On,timestamp:la},mu={"tag:yaml.org,2002:binary":En,"tag:yaml.org,2002:merge":Ce,"tag:yaml.org,2002:omap":Cn,"tag:yaml.org,2002:pairs":Dn,"tag:yaml.org,2002:set":On,"tag:yaml.org,2002:timestamp":la};function jn(e,t,r){let a=xo.get(t);if(a&&!e)return r&&!a.includes(Ce)?a.concat(Ce):a.slice();let n=a;if(!n)if(Array.isArray(e))n=[];else{let s=Array.from(xo.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${s} or define customTags array`)}if(Array.isArray(e))for(let s of e)n=n.concat(s);else typeof e=="function"&&(n=e(n.slice()));return r&&(n=n.concat(Ce)),n.reduce((s,i)=>{let o=typeof i=="string"?wo[i]:i;if(!o){let l=JSON.stringify(i),c=Object.keys(wo).map(d=>JSON.stringify(d)).join(", ");throw Error(`Unknown custom tag ${l}; use one of ${c}`)}return s.includes(o)||s.push(o),s},[])}var fu=(e,t)=>e.key<t.key?-1:+(e.key>t.key),gu=class Gc{constructor({compat:t,customTags:r,merge:a,resolveKnownTags:n,schema:s,sortMapEntries:i,toStringDefaults:o}){this.compat=Array.isArray(t)?jn(t,"compat"):t?jn(null,t):null,this.name=typeof s=="string"&&s||"core",this.knownTags=n?mu:{},this.tags=jn(r,this.name,a),this.toStringOptions=o??null,Object.defineProperty(this,Be,{value:jt}),Object.defineProperty(this,ke,{value:ta}),Object.defineProperty(this,St,{value:Rt}),this.sortMapEntries=typeof i=="function"?i:i===!0?fu:null}clone(){let t=Object.create(Gc.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function yu(e,t){let r=[],a=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(r.push(l),a=!0):e.directives.docStart&&(a=!0)}a&&r.push("---");let n=Xi(e,t),{commentString:s}=n.options;if(e.commentBefore){r.length!==1&&r.unshift("");let l=s(e.commentBefore);r.unshift(De(l,""))}let i=!1,o=null;if(e.contents){if(Q(e.contents)){if(e.contents.spaceBefore&&a&&r.push(""),e.contents.commentBefore){let d=s(e.contents.commentBefore);r.push(De(d,""))}n.forceBlockIndent=!!e.comment,o=e.contents.comment}let l=o?void 0:()=>i=!0,c=Ft(e.contents,n,()=>o=null,l);o&&(c+=at(c,"",s(o))),(c[0]==="|"||c[0]===">")&&r[r.length-1]==="---"?r[r.length-1]=`--- ${c}`:r.push(c)}else r.push(Ft(e.contents,n));if(e.directives?.docEnd)if(e.comment){let l=s(e.comment);l.includes(`
`)?(r.push("..."),r.push(De(l,""))):r.push(`... ${l}`)}else r.push("...");else{let l=e.comment;l&&i&&(l=l.replace(/^\n+/,"")),l&&((!i||o)&&r[r.length-1]!==""&&r.push(""),r.push(De(s(l),"")))}return r.join(`
`)+`
`}var ko=class Xc{constructor(t,r,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,pe,{value:gn});let n=null;typeof r=="function"||Array.isArray(r)?n=r:a===void 0&&r&&(a=r,r=void 0);let s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=s;let{version:i}=s;a?._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new Ct({version:i}),this.setSchema(i,a),this.contents=t===void 0?null:this.createNode(t,n,a)}clone(){let t=Object.create(Xc.prototype,{[pe]:{value:gn}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Q(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){_t(this.contents)&&this.contents.add(t)}addIn(t,r){_t(this.contents)&&this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){let a=Wi(this);t.anchor=!r||a.has(r)?Ki(r||"a",a):r}return new bn(t.anchor)}createNode(t,r,a){let n;if(typeof r=="function")t=r.call({"":t},"",t),n=r;else if(Array.isArray(r)){let g=r.filter(k=>typeof k=="number"||k instanceof String||k instanceof Number).map(String);g.length>0&&(r=r.concat(g)),n=r}else a===void 0&&r&&(a=r,r=void 0);let{aliasDuplicateObjects:s,anchorPrefix:i,flow:o,keepUndefined:l,onTagObj:c,tag:d}=a??{},{onAnchor:p,setAnchors:f,sourceObjects:h}=Mp(this,i||"a"),y={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:p,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:h},m=lr(t,d,y);return o&&Y(m)&&(m.flow=!0),f(),m}createPair(t,r,a={}){return new le(this.createNode(t,null,a),this.createNode(r,null,a))}delete(t){return _t(this.contents)?this.contents.delete(t):!1}deleteIn(t){return cr(t)?this.contents!=null&&(this.contents=null,!0):_t(this.contents)?this.contents.deleteIn(t):!1}get(t,r){return Y(this.contents)?this.contents.get(t,r):void 0}getIn(t,r){return cr(t)?!r&&V(this.contents)?this.contents.value:this.contents:Y(this.contents)?this.contents.getIn(t,r):void 0}has(t){return Y(this.contents)?this.contents.has(t):!1}hasIn(t){return cr(t)?this.contents!==void 0:Y(this.contents)?this.contents.hasIn(t):!1}set(t,r){this.contents==null?this.contents=Vr(this.schema,[t],r):_t(this.contents)&&this.contents.set(t,r)}setIn(t,r){cr(t)?this.contents=r:this.contents==null?this.contents=Vr(this.schema,Array.from(t),r):_t(this.contents)&&this.contents.setIn(t,r)}setSchema(t,r={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ct({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Ct({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{let n=JSON.stringify(t);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(a)this.schema=new gu(Object.assign(a,r));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:r,mapAsMap:a,maxAliasCount:n,onAnchor:s,reviver:i}={}){let o={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=ue(this.contents,r??"",o);if(typeof s=="function")for(let{count:c,res:d}of o.anchors.values())s(d,c);return typeof i=="function"?Tt(i,{"":l},"",l):l}toJSON(t,r){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let r=JSON.stringify(t.indent);throw Error(`"indent" option must be a positive integer, not ${r}`)}return yu(this,t)}};function _t(e){if(Y(e))return!0;throw Error("Expected a YAML collection as document contents")}var $o=class extends Error{constructor(e,t,r,a){super(),this.name=e,this.code=r,this.message=a,this.pos=t}},ur=class extends $o{constructor(e,t,r){super("YAMLParseError",e,t,r)}},bu=class extends $o{constructor(e,t,r){super("YAMLWarning",e,t,r)}},So=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(o=>t.linePos(o));let{line:a,col:n}=r.linePos[0];r.message+=` at line ${a}, column ${n}`;let s=n-1,i=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(s>=60&&i.length>80){let o=Math.min(s-39,i.length-79);i="\u2026"+i.substring(o),s-=o-1}if(i.length>80&&(i=i.substring(0,79)+"\u2026"),a>1&&/^ *$/.test(i.substring(0,s))){let o=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);o.length>80&&(o=o.substring(0,79)+`\u2026
`),i=o+i}if(/[^ ]/.test(i)){let o=1,l=r.linePos[1];l?.line===a&&l.col>n&&(o=Math.max(1,Math.min(l.col-n,80-s)));let c=" ".repeat(s)+"^".repeat(o);r.message+=`:

${i}
${c}
`}};function qt(e,{flow:t,indicator:r,next:a,offset:n,onError:s,parentIndent:i,startOnNewline:o}){let l=!1,c=o,d=o,p="",f="",h=!1,y=!1,m=null,g=null,k=null,v=null,w=null,b=null,A=null;for(let D of e)switch(y&&=(D.type!=="space"&&D.type!=="newline"&&D.type!=="comma"&&s(D.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),!1),m&&=(c&&D.type!=="comment"&&D.type!=="newline"&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),null),D.type){case"space":!t&&(r!=="doc-start"||a?.type!=="flow-collection")&&D.source.includes("	")&&(m=D),d=!0;break;case"comment":{d||s(D,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let O=D.source.substring(1)||" ";p?p+=f+O:p=O,f="",c=!1;break}case"newline":c?p?p+=D.source:b&&r==="seq-item-ind"||(l=!0):f+=D.source,c=!0,h=!0,(g||k)&&(v=D),d=!0;break;case"anchor":g&&s(D,"MULTIPLE_ANCHORS","A node can have at most one anchor"),D.source.endsWith(":")&&s(D.offset+D.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=D,A??=D.offset,c=!1,d=!1,y=!0;break;case"tag":k&&s(D,"MULTIPLE_TAGS","A node can have at most one tag"),k=D,A??=D.offset,c=!1,d=!1,y=!0;break;case r:(g||k)&&s(D,"BAD_PROP_ORDER",`Anchors and tags must be after the ${D.source} indicator`),b&&s(D,"UNEXPECTED_TOKEN",`Unexpected ${D.source} in ${t??"collection"}`),b=D,c=r==="seq-item-ind"||r==="explicit-key-ind",d=!1;break;case"comma":if(t){w&&s(D,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),w=D,c=!1,d=!1;break}default:s(D,"UNEXPECTED_TOKEN",`Unexpected ${D.type} token`),c=!1,d=!1}let $=e[e.length-1],E=$?$.offset+$.source.length:n;return y&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&s(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=i||a?.type==="block-map"||a?.type==="block-seq")&&s(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:w,found:b,spaceBefore:l,comment:p,hasNewline:h,anchor:g,tag:k,newlineAfterProp:v,end:E,start:A??E}}function hr(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
`))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let r of t.start)if(r.type==="newline")return!0;if(t.sep){for(let r of t.sep)if(r.type==="newline")return!0}if(hr(t.key)||hr(t.value))return!0}return!1;default:return!0}}function Rn(e,t,r){if(t?.type==="flow-collection"){let a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&hr(t)&&r(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Ao(e,t,r){let{uniqueKeys:a}=e.options;if(a===!1)return!1;let n=typeof a=="function"?a:(s,i)=>s===i||V(s)&&V(i)&&s.value===i.value;return t.some(s=>n(s.key,r))}var Eo="All mapping items must start at the same column";function vu({composeNode:e,composeEmptyNode:t},r,a,n,s){let i=new(s?.nodeClass??he)(r.schema);r.atRoot&&=!1;let o=a.offset,l=null;for(let c of a.items){let{start:d,key:p,sep:f,value:h}=c,y=qt(d,{indicator:"explicit-key-ind",next:p??f?.[0],offset:o,onError:n,parentIndent:a.indent,startOnNewline:!0}),m=!y.found;if(m){if(p&&(p.type==="block-seq"?n(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==a.indent&&n(o,"BAD_INDENT",Eo)),!y.anchor&&!y.tag&&!f){l=y.end,y.comment&&(i.comment?i.comment+=`
`+y.comment:i.comment=y.comment);continue}(y.newlineAfterProp||hr(p))&&n(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else y.found?.indent!==a.indent&&n(o,"BAD_INDENT",Eo);r.atKey=!0;let g=y.end,k=p?e(r,p,y,n):t(r,g,d,null,y,n);r.schema.compat&&Rn(a.indent,p,n),r.atKey=!1,Ao(r,i.items,k)&&n(g,"DUPLICATE_KEY","Map keys must be unique");let v=qt(f??[],{indicator:"map-value-ind",next:h,offset:k.range[2],onError:n,parentIndent:a.indent,startOnNewline:!p||p.type==="block-scalar"});if(o=v.end,v.found){m&&(h?.type==="block-map"&&!v.hasNewline&&n(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&y.start<v.found.offset-1024&&n(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let w=h?e(r,h,v,n):t(r,o,f,null,v,n);r.schema.compat&&Rn(a.indent,h,n),o=w.range[2];let b=new le(k,w);r.options.keepSourceTokens&&(b.srcToken=c),i.items.push(b)}else{m&&n(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(k.comment?k.comment+=`
`+v.comment:k.comment=v.comment);let w=new le(k);r.options.keepSourceTokens&&(w.srcToken=c),i.items.push(w)}}return l&&l<o&&n(l,"IMPOSSIBLE","Map comment with trailing content"),i.range=[a.offset,o,l??o],i}function xu({composeNode:e,composeEmptyNode:t},r,a,n,s){let i=new(s?.nodeClass??st)(r.schema);r.atRoot&&=!1,r.atKey&&=!1;let o=a.offset,l=null;for(let{start:c,value:d}of a.items){let p=qt(c,{indicator:"seq-item-ind",next:d,offset:o,onError:n,parentIndent:a.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||d)d?.type==="block-seq"?n(p.end,"BAD_INDENT","All sequence items must start at the same column"):n(o,"MISSING_CHAR","Sequence item without - indicator");else{l=p.end,p.comment&&(i.comment=p.comment);continue}let f=d?e(r,d,p,n):t(r,p.end,c,null,p,n);r.schema.compat&&Rn(a.indent,d,n),o=f.range[2],i.items.push(f)}return i.range=[a.offset,o,l??o],i}function mr(e,t,r,a){let n="";if(e){let s=!1,i="";for(let o of e){let{source:l,type:c}=o;switch(c){case"space":s=!0;break;case"comment":{r&&!s&&a(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";n?n+=i+d:n=d,i="";break}case"newline":n&&(i+=l),s=!0;break;default:a(o,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:n,offset:t}}var _n="Block collections are not allowed within flow collections",qn=e=>e&&(e.type==="block-map"||e.type==="block-seq");function wu({composeNode:e,composeEmptyNode:t},r,a,n,s){let i=a.start.source==="{",o=i?"flow map":"flow sequence",l=new(s?.nodeClass??(i?he:st))(r.schema);l.flow=!0;let c=r.atRoot;c&&(r.atRoot=!1),r.atKey&&=!1;let d=a.offset+a.start.source.length;for(let m=0;m<a.items.length;++m){let g=a.items[m],{start:k,key:v,sep:w,value:b}=g,A=qt(k,{flow:o,indicator:"explicit-key-ind",next:v??w?.[0],offset:d,onError:n,parentIndent:a.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!w&&!b){m===0&&A.comma?n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):m<a.items.length-1&&n(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),A.comment&&(l.comment?l.comment+=`
`+A.comment:l.comment=A.comment),d=A.end;continue}!i&&r.options.strict&&hr(v)&&n(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)A.comma&&n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(A.comma||n(A.start,"MISSING_CHAR",`Missing , between ${o} items`),A.comment){let $="";e:for(let E of k)switch(E.type){case"comma":case"space":break;case"comment":$=E.source.substring(1);break e;default:break e}if($){let E=l.items[l.items.length-1];X(E)&&(E=E.value??E.key),E.comment?E.comment+=`
`+$:E.comment=$,A.comment=A.comment.substring($.length+1)}}if(!i&&!w&&!A.found){let $=b?e(r,b,A,n):t(r,A.end,w,null,A,n);l.items.push($),d=$.range[2],qn(b)&&n($.range,"BLOCK_IN_FLOW",_n)}else{r.atKey=!0;let $=A.end,E=v?e(r,v,A,n):t(r,$,k,null,A,n);qn(v)&&n(E.range,"BLOCK_IN_FLOW",_n),r.atKey=!1;let D=qt(w??[],{flow:o,indicator:"map-value-ind",next:b,offset:E.range[2],onError:n,parentIndent:a.indent,startOnNewline:!1});if(D.found){if(!i&&!A.found&&r.options.strict){if(w)for(let R of w){if(R===D.found)break;if(R.type==="newline"){n(R,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<D.found.offset-1024&&n(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else b&&("source"in b&&b.source?.[0]===":"?n(b,"MISSING_CHAR",`Missing space after : in ${o}`):n(D.start,"MISSING_CHAR",`Missing , or : between ${o} items`));let O=b?e(r,b,D,n):D.found?t(r,D.end,w,null,D,n):null;O?qn(b)&&n(O.range,"BLOCK_IN_FLOW",_n):D.comment&&(E.comment?E.comment+=`
`+D.comment:E.comment=D.comment);let j=new le(E,O);if(r.options.keepSourceTokens&&(j.srcToken=g),i){let R=l;Ao(r,R.items,E)&&n($,"DUPLICATE_KEY","Map keys must be unique"),R.items.push(j)}else{let R=new he(r.schema);R.flow=!0,R.items.push(j);let N=(O??E).range;R.range=[E.range[0],N[1],N[2]],l.items.push(R)}d=O?O.range[2]:D.end}}let p=i?"}":"]",[f,...h]=a.end,y=d;if(f?.source===p)y=f.offset+f.source.length;else{let m=o[0].toUpperCase()+o.substring(1),g=c?`${m} must end with a ${p}`:`${m} in block collection must be sufficiently indented and end with a ${p}`;n(d,c?"MISSING_CHAR":"BAD_INDENT",g),f&&f.source.length!==1&&h.unshift(f)}if(h.length>0){let m=mr(h,y,r.options.strict,n);m.comment&&(l.comment?l.comment+=`
`+m.comment:l.comment=m.comment),l.range=[a.offset,y,m.offset]}else l.range=[a.offset,y,y];return l}function In(e,t,r,a,n,s){let i=r.type==="block-map"?vu(e,t,r,a,s):r.type==="block-seq"?xu(e,t,r,a,s):wu(e,t,r,a,s),o=i.constructor;return n==="!"||n===o.tagName?(i.tag=o.tagName,i):(n&&(i.tag=n),i)}function ku(e,t,r,a,n){let s=a.tag,i=s?t.directives.tagName(s.source,f=>n(s,"TAG_RESOLVE_FAILED",f)):null;if(r.type==="block-seq"){let{anchor:f,newlineAfterProp:h}=a,y=f&&s?f.offset>s.offset?f:s:f??s;y&&(!h||h.offset<y.offset)&&n(y,"MISSING_CHAR","Missing newline after block sequence props")}let o=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!s||!i||i==="!"||i===he.tagName&&o==="map"||i===st.tagName&&o==="seq")return In(e,t,r,n,i);let l=t.schema.tags.find(f=>f.tag===i&&f.collection===o);if(!l){let f=t.schema.knownTags[i];if(f?.collection===o)t.schema.tags.push(Object.assign({},f,{default:!1})),l=f;else return f?n(s,"BAD_COLLECTION_TYPE",`${f.tag} used for ${o} collection, but expects ${f.collection??"scalar"}`,!0):n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,!0),In(e,t,r,n,i)}let c=In(e,t,r,n,i,l),d=l.resolve?.(c,f=>n(s,"TAG_RESOLVE_FAILED",f),t.options)??c,p=Q(d)?d:new L(d);return p.range=c.range,p.tag=i,l?.format&&(p.format=l.format),p}function $u(e,t,r){let a=t.offset,n=Su(t,e.options.strict,r);if(!n)return{value:"",type:null,comment:"",range:[a,a,a]};let s=n.mode===">"?L.BLOCK_FOLDED:L.BLOCK_LITERAL,i=t.source?Au(t.source):[],o=i.length;for(let m=i.length-1;m>=0;--m){let g=i[m][1];if(g===""||g==="\r")o=m;else break}if(o===0){let m=n.chomp==="+"&&i.length>0?`
`.repeat(Math.max(1,i.length-1)):"",g=a+n.length;return t.source&&(g+=t.source.length),{value:m,type:s,comment:n.comment,range:[a,g,g]}}let l=t.indent+n.indent,c=t.offset+n.length,d=0;for(let m=0;m<o;++m){let[g,k]=i[m];if(k===""||k==="\r")n.indent===0&&g.length>l&&(l=g.length);else{g.length<l&&r(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=g.length),d=m,l===0&&!e.atRoot&&r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+k.length+1}for(let m=i.length-1;m>=o;--m)i[m][0].length>l&&(o=m+1);let p="",f="",h=!1;for(let m=0;m<d;++m)p+=i[m][0].slice(l)+`
`;for(let m=d;m<o;++m){let[g,k]=i[m];c+=g.length+k.length+1;let v=k[k.length-1]==="\r";if(v&&(k=k.slice(0,-1)),k&&g.length<l){let w=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;r(c-k.length-(v?2:1),"BAD_INDENT",w),g=""}s===L.BLOCK_LITERAL?(p+=f+g.slice(l)+k,f=`
`):g.length>l||k[0]==="	"?(f===" "?f=`
`:!h&&f===`
`&&(f=`

`),p+=f+g.slice(l)+k,f=`
`,h=!0):k===""?f===`
`?p+=`
`:f=`
`:(p+=f+k,f=" ",h=!1)}switch(n.chomp){case"-":break;case"+":for(let m=o;m<i.length;++m)p+=`
`+i[m][0].slice(l);p[p.length-1]!==`
`&&(p+=`
`);break;default:p+=`
`}let y=a+n.length+t.source.length;return{value:p,type:s,comment:n.comment,range:[a,y,y]}}function Su({offset:e,props:t},r,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=t[0],s=n[0],i=0,o="",l=-1;for(let f=1;f<n.length;++f){let h=n[f];if(!o&&(h==="-"||h==="+"))o=h;else{let y=Number(h);!i&&y?i=y:l===-1&&(l=e+f)}}l!==-1&&a(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,d="",p=n.length;for(let f=1;f<t.length;++f){let h=t[f];switch(h.type){case"space":c=!0;case"newline":p+=h.source.length;break;case"comment":r&&!c&&a(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=h.source.length,d=h.source.substring(1);break;case"error":a(h,"UNEXPECTED_TOKEN",h.message),p+=h.source.length;break;default:{a(h,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${h.type}`);let y=h.source;y&&typeof y=="string"&&(p+=y.length)}}}return{mode:s,indent:i,chomp:o,comment:d,length:p}}function Au(e){let t=e.split(/\n( *)/),r=t[0],a=r.match(/^( *)/),n=[a?.[1]?[a[1],r.slice(a[1].length)]:["",r]];for(let s=1;s<t.length;s+=2)n.push([t[s],t[s+1]]);return n}function Eu(e,t,r){let{offset:a,type:n,source:s,end:i}=e,o,l,c=(f,h,y)=>r(a+f,h,y);switch(n){case"scalar":o=L.PLAIN,l=Du(s,c);break;case"single-quoted-scalar":o=L.QUOTE_SINGLE,l=Cu(s,c);break;case"double-quoted-scalar":o=L.QUOTE_DOUBLE,l=Tu(s,c);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[a,a+s.length,a+s.length]}}let d=a+s.length,p=mr(i,d,t,r);return{value:l,type:o,comment:p.comment,range:[a,d,p.offset]}}function Du(e,t){let r="";switch(e[0]){case"	":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Do(e)}function Cu(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Do(e.slice(1,-1)).replace(/''/g,"'")}function Do(e){let t=/(.*?)\r?\n/sy,r=t.exec(e);if(!r)return e;let a,n;try{a=RegExp("(?<![ 	])[ 	]+$"),n=RegExp("^[ 	]+|(?<![ 	])[ 	]+$","g")}catch{a=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let s=r[1].replace(a,""),i=" ",o=t.lastIndex;for(;r=t.exec(e);){let c=r[1].replace(n,"");c===""?i===`
`?s+=i:i=`
`:(s+=i+c,i=" "),o=t.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=o,r=l.exec(e),s+i+(r?.[1]??"")}function Tu(e,t){let r="";for(let a=1;a<e.length-1;++a){let n=e[a];if(n!=="\r"||e[a+1]!==`
`)if(n===`
`){let{fold:s,offset:i}=Ou(e,a);r+=s,a=i}else if(n==="\\"){let s=e[++a],i=Fu[s];if(i)r+=i;else if(s===`
`)for(s=e[a+1];s===" "||s==="	";)s=e[++a+1];else if(s==="\r"&&e[a+1]===`
`)for(s=e[++a+1];s===" "||s==="	";)s=e[++a+1];else if(s==="x"||s==="u"||s==="U"){let o=s==="x"?2:s==="u"?4:8;r+=ju(e,a+1,o,t),a+=o}else{let o=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${o}`),r+=o}}else if(n===" "||n==="	"){let s=a,i=e[a+1];for(;i===" "||i==="	";)i=e[++a+1];i!==`
`&&(i!=="\r"||e[a+2]!==`
`)&&(r+=a>s?e.slice(s,a+1):n)}else r+=n}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}function Ou(e,t){let r="",a=e[t+1];for(;(a===" "||a==="	"||a===`
`||a==="\r")&&(a!=="\r"||e[t+2]===`
`);)a===`
`&&(r+=`
`),t+=1,a=e[t+1];return r||=" ",{fold:r,offset:t}}var Fu={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:"	",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function ju(e,t,r,a){let n=e.substr(t,r),s=n.length===r&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(s)}catch{let i=e.substr(t-2,r+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}}function Co(e,t,r,a){let{value:n,type:s,comment:i,range:o}=t.type==="block-scalar"?$u(e,t,a):Eu(t,e.options.strict,a),l=r?e.directives.tagName(r.source,p=>a(r,"TAG_RESOLVE_FAILED",p)):null,c;c=e.options.stringKeys&&e.atKey?e.schema[ke]:l?Ru(e.schema,n,l,r,a):t.type==="scalar"?_u(e,n,t,a):e.schema[ke];let d;try{let p=c.resolve(n,f=>a(r??t,"TAG_RESOLVE_FAILED",f),e.options);d=V(p)?p:new L(p)}catch(p){let f=p instanceof Error?p.message:String(p);a(r??t,"TAG_RESOLVE_FAILED",f),d=new L(n)}return d.range=o,d.source=n,s&&(d.type=s),l&&(d.tag=l),c.format&&(d.format=c.format),i&&(d.comment=i),d}function Ru(e,t,r,a,n){if(r==="!")return e[ke];let s=[];for(let o of e.tags)if(!o.collection&&o.tag===r)if(o.default&&o.test)s.push(o);else return o;for(let o of s)if(o.test?.test(t))return o;let i=e.knownTags[r];return i&&!i.collection?(e.tags.push(Object.assign({},i,{default:!1,test:void 0})),i):(n(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),e[ke])}function _u({atKey:e,directives:t,schema:r},a,n,s){let i=r.tags.find(o=>(o.default===!0||e&&o.default==="key")&&o.test?.test(a))||r[ke];if(r.compat){let o=r.compat.find(l=>l.default&&l.test?.test(a))??r[ke];i.tag!==o.tag&&s(n,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(i.tag)} or ${t.tagString(o.tag)}`,!0)}return i}function qu(e,t,r){if(t){r??=t.length;for(let a=r-1;a>=0;--a){let n=t[a];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++a];n?.type==="space";)e+=n.source.length,n=t[++a];break}}return e}var Iu={composeNode:To,composeEmptyNode:Ln};function To(e,t,r,a){let n=e.atKey,{spaceBefore:s,comment:i,anchor:o,tag:l}=r,c,d=!0;switch(t.type){case"alias":c=Lu(e,t,a),(o||l)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Co(e,t,l,a),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=ku(Iu,e,t,r,a),o&&(c.anchor=o.source.substring(1))}catch(p){a(t,"RESOURCE_EXHAUSTION",p instanceof Error?p.message:String(p))}break;default:a(t,"UNEXPECTED_TOKEN",t.type==="error"?t.message:`Unsupported token (type: ${t.type})`),d=!1}return c??=Ln(e,t.offset,void 0,null,r,a),o&&c.anchor===""&&a(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&e.options.stringKeys&&(!V(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&a(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(c.spaceBefore=!0),i&&(t.type==="scalar"&&t.source===""?c.comment=i:c.commentBefore=i),e.options.keepSourceTokens&&d&&(c.srcToken=t),c}function Ln(e,t,r,a,{spaceBefore:n,comment:s,anchor:i,tag:o,end:l},c){let d=Co(e,{type:"scalar",offset:qu(t,r,a),indent:-1,source:""},o,c);return i&&(d.anchor=i.source.substring(1),d.anchor===""&&c(i,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(d.spaceBefore=!0),s&&(d.comment=s,d.range[2]=l),d}function Lu({options:e},{offset:t,source:r,end:a},n){let s=new bn(r.substring(1));s.source===""&&n(t,"BAD_ALIAS","Alias cannot be an empty string"),s.source.endsWith(":")&&n(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let i=t+r.length,o=mr(a,i,e.strict,n);return s.range=[t,i,o.offset],o.comment&&(s.comment=o.comment),s}function Nu(e,t,{offset:r,start:a,value:n,end:s},i){let o=new ko(void 0,Object.assign({_directives:t},e)),l={atKey:!1,atRoot:!0,directives:o.directives,options:o.options,schema:o.schema},c=qt(a,{indicator:"doc-start",next:n??s?.[0],offset:r,onError:i,parentIndent:0,startOnNewline:!0});c.found&&(o.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!c.hasNewline&&i(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),o.contents=n?To(l,n,c,i):Ln(l,c.end,a,null,c,i);let d=o.contents.range[2],p=mr(s,d,!1,i);return p.comment&&(o.comment=p.comment),o.range=[r,d,p.offset],o}function fr(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:r}=e;return[t,t+(typeof r=="string"?r.length:1)]}function Oo(e){let t="",r=!1,a=!1;for(let n=0;n<e.length;++n){let s=e[n];switch(s[0]){case"#":t+=(t===""?"":a?`

`:`
`)+(s.substring(1)||" "),r=!0,a=!1;break;case"%":e[n+1]?.[0]!=="#"&&(n+=1),r=!1;break;default:r||(a=!0),r=!1}}return{comment:t,afterEmptyLine:a}}var Bu=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,r,a,n)=>{let s=fr(t);n?this.warnings.push(new bu(s,r,a)):this.errors.push(new ur(s,r,a))},this.directives=new Ct({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:r,afterEmptyLine:a}=Oo(this.prelude);if(r){let n=e.contents;if(t)e.comment=e.comment?`${e.comment}
${r}`:r;else if(a||e.directives.docStart||!n)e.commentBefore=r;else if(Y(n)&&!n.flow&&n.items.length>0){let s=n.items[0];X(s)&&(s=s.key);let i=s.commentBefore;s.commentBefore=i?`${r}
${i}`:r}else{let s=n.commentBefore;n.commentBefore=s?`${r}
${s}`:r}}if(t){for(let n=0;n<this.errors.length;++n)e.errors.push(this.errors[n]);for(let n=0;n<this.warnings.length;++n)e.warnings.push(this.warnings[n])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Oo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(let a of e)yield*this.next(a);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,a)=>{let n=fr(e);n[0]+=t,this.onError(n,"BAD_DIRECTIVE",r,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Nu(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new ur(fr(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){this.errors.push(new ur(fr(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=mr(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let r=this.doc.comment;this.doc.comment=r?`${r}
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new ur(fr(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let r=new ko(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}},Nn=Symbol("break visit"),zu=Symbol("skip children"),Fo=Symbol("remove item");function It(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),jo(Object.freeze([]),e,t)}It.BREAK=Nn,It.SKIP=zu,It.REMOVE=Fo,It.itemAtPath=(e,t)=>{let r=e;for(let[a,n]of t){let s=r?.[a];if(s&&"items"in s)r=s.items[n];else return}return r},It.parentCollection=(e,t)=>{let r=It.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],n=r?.[a];if(n&&"items"in n)return n;throw Error("Parent collection not found")};function jo(e,t,r){let a=r(t,e);if(typeof a=="symbol")return a;for(let n of["key","value"]){let s=t[n];if(s&&"items"in s){for(let i=0;i<s.items.length;++i){let o=jo(Object.freeze(e.concat([[n,i]])),s.items[i],r);if(typeof o=="number")i=o-1;else{if(o===Nn)return Nn;o===Fo&&(s.items.splice(i,1),--i)}}typeof a=="function"&&n==="key"&&(a=a(t,e))}}return typeof a=="function"?a(t,e):a}function Pu(e){switch(e){case"\uFEFF":return"byte-order-mark";case"":return"doc-mode";case"":return"flow-error-end";case"":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"	":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function ve(e){switch(e){case void 0:case" ":case`
`:case"\r":case"	":return!0;default:return!1}}var Ro=new Set("0123456789ABCDEFabcdef"),Uu=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ca=new Set(",[]{}"),Mu=new Set(` ,[]{}
\r	`),Bn=e=>!e||Mu.has(e),Hu=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t==="	";)t=this.buffer[++e];return!t||t==="#"||t===`
`||t==="\r"&&this.buffer[e+1]===`
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;t===" ";)t=this.buffer[++r+e];if(t==="\r"){let a=this.buffer[r+e+1];if(a===`
`||!a&&!this.atEnd)return e+r+1}return t===`
`||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){let r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&ve(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]==="\uFEFF"&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,r=e.indexOf("#");for(;r!==-1;){let n=e[r-1];if(n===" "||n==="	"){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){let n=e[t-1];if(n===" "||n==="	")--t;else break}let a=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"",yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&ve(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ve(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ve(t)){let r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Bn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let a=this.getLine();if(a===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&a[0]!=="#"||r===0&&(a.startsWith("---")||a.startsWith("..."))&&ve(a[3]))&&(r!==this.indentNext-1||this.flowLevel!==1||a[0]!=="]"&&a[0]!=="}"))return this.flowLevel=0,yield"",yield*this.parseLineStart();let n=0;for(;a[n]===",";)n+=yield*this.pushCount(1),n+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(n+=yield*this.pushIndicators(),a[n]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-n),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Bn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let s=this.charAt(1);if(this.flowKey||ve(s)||s===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let n=0;for(;this.buffer[t-1-n]==="\\";)n+=1;if(n%2==0)break;t=this.buffer.indexOf('"',t+1)}let r=this.buffer.substring(0,t),a=r.indexOf(`
`,this.pos);if(a!==-1){for(;a!==-1;){let n=this.continueScalar(a+1);if(n===-1)break;a=r.indexOf(`
`,n)}a!==-1&&(t=a-(r[a-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>ve(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,r;e:for(let n=this.pos;r=this.buffer[n];++n)switch(r){case" ":t+=1;break;case`
`:e=n,t=0;break;case"\r":{let s=this.buffer[n+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let n=this.continueScalar(e+1);if(n===-1)break;e=this.buffer.indexOf(`
`,n)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let a=e+1;for(r=this.buffer[a];r===" ";)r=this.buffer[++a];if(r==="	"){for(;r==="	"||r===" "||r==="\r"||r===`
`;)r=this.buffer[++a];e=a-1}else if(!this.blockScalarKeep)do{let n=e-1,s=this.buffer[n];s==="\r"&&(s=this.buffer[--n]);let i=n;for(;s===" ";)s=this.buffer[--n];if(s===`
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield"",yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,r=this.pos-1,a;for(;a=this.buffer[++r];)if(a===":"){let n=this.buffer[r+1];if(ve(n)||e&&ca.has(n))break;t=r}else if(ve(a)){let n=this.buffer[r+1];if(a==="\r"&&(n===`
`?(r+=1,a=`
`,n=this.buffer[r+1]):t=r),n==="#"||e&&ca.has(n))break;if(a===`
`){let s=this.continueScalar(r+1);if(s===-1)break;r=Math.max(r,s-2)}}else{if(e&&ca.has(a))break;t=r}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield"",yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Bn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,r=this.charAt(1);if(ve(r)||t&&ca.has(r)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!ve(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Uu.has(t))t=this.buffer[++e];else if(t==="%"&&Ro.has(this.buffer[e+1])&&Ro.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,r;do r=this.buffer[++t];while(r===" "||e&&r==="	");let a=t-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=t),a}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},Wu=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){let n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let a=this.lineStarts[t-1];return{line:t,col:e-a+1}}}};function ze(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function _o(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function qo(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function da(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Lt(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function pa(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function Io(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!ze(t.start,"explicit-key-ind")&&!ze(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,qo(t.value)?t.value.end?pa(t.value.end,t.sep):t.value.end=t.sep:pa(t.start,t.sep),delete t.sep)}var Ku=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Hu,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Pu(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}else{if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let r=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in r?r.indent:0:t.type==="flow-collection"&&r.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Io(t),r.type){case"document":r.value=t;break;case"block-scalar":r.props.push(t);break;case"block-map":{let a=r.items[r.items.length-1];if(a.value){r.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(a.sep)a.value=t;else{Object.assign(a,{key:t,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{let a=r.items[r.items.length-1];a.value?r.items.push({start:[],value:t}):a.value=t;break}case"flow-collection":{let a=r.items[r.items.length-1];!a||a.value?r.items.push({start:[],key:t,sep:[]}):a.sep?a.value=t:Object.assign(a,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let a=t.items[t.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&_o(a.start)===-1&&(t.indent===0||a.start.every(n=>n.type!=="comment"||n.indent<t.indent))&&(r.type==="document"?r.end=a.start:r.items.push({start:a.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":_o(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=Lt(da(this.peek(2))),r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){pa(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let r=!this.onKeyLine&&this.indent===e.indent,a=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",n=[];if(a&&t.sep&&!t.value){let s=[];for(let i=0;i<t.sep.length;++i){let o=t.sep[i];switch(o.type){case"newline":s.push(i);break;case"space":break;case"comment":o.indent>e.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(n=t.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":a||t.value?(n.push(this.sourceToken),e.items.push({start:n}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):a||t.value?(n.push(this.sourceToken),e.items.push({start:n,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ze(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]});else if(qo(t.key)&&!ze(t.sep,"newline")){let s=Lt(t.start),i=t.key,o=t.sep;o.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:i,sep:o}]})}else n.length>0?t.sep=t.sep.concat(n,this.sourceToken):t.sep.push(this.sourceToken);else if(ze(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let s=Lt(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||a?e.items.push({start:n,key:null,sep:[this.sourceToken]}):ze(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);a||t.value?(e.items.push({start:n,key:s,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(s):(Object.assign(t,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(e);if(s){if(s.type==="block-seq"){if(!t.explicitKey&&t.sep&&!ze(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&e.items.push({start:n});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let r="end"in t.value?t.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){pa(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||ze(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let r=this.startBlockValue(e);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:a,sep:[]}):t.sep?this.stack.push(a):Object.assign(t,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let a=Lt(da(r));Io(e);let n=e.end.splice(1,e.end.length);n.push(this.sourceToken);let s={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:a,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Lt(da(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Lt(da(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function Vu(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Wu||null,prettyErrors:t}}function Zu(e,t={}){let{lineCounter:r,prettyErrors:a}=Vu(t),n=new Ku(r?.addNewLine),s=new Bu(t),i=null;for(let o of s.compose(n.parse(e),!0,e.length))if(!i)i=o;else if(i.options.logLevel!=="silent"){i.errors.push(new ur(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&r&&(i.errors.forEach(So(e,r)),i.warnings.forEach(So(e,r))),i}function zn(e,t,r){let a;typeof t=="function"?a=t:r===void 0&&t&&typeof t=="object"&&(r=t);let n=Zu(e,r);if(!n)return null;if(n.warnings.forEach(s=>(n.options.logLevel,void 0)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:a},r))}var Ju=e=>e.startsWith("\uFEFF")?e.slice(1):e;function ua(e){if(e!==null){if(typeof e=="string"){let t=Ju(e);if(t.trim()==="")return;try{return JSON.parse(t)}catch{let r=/^[^:]+:/.test(t),a=t.slice(0,50).trimStart(),n=a.startsWith("{")||a.startsWith("[");return!r||n?void 0:zn(t,{maxAliasCount:1e4,merge:!0})}}return e}}var ee=e=>{if(typeof e!="object"||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},te=e=>typeof e=="object"&&!!e,Gu=new Set(["properties","patternProperties","$defs","definitions"]),Pn=(e,t)=>t===1&&(e[0]==="responses"||e[0]==="parameters")||t===2&&e[0]==="components"&&(e[1]==="responses"||e[1]==="parameters")||e[t-1]==="headers"&&!Pn(e,t-1)&&!Te(e.slice(0,t-1));function Te(e){let t=e?.[e.length-1];return!e||t===void 0||Pn(e,e.length-1)?!1:t==="schemas"&&e?.[e.length-2]==="components"||Gu.has(t)&&!Te(e?.slice(0,-1))}function Xu(e,t){return e[t]==="default"&&e[t-1]==="responses"&&!Te(e.slice(0,t-1))}var Yu=new Set(["example","default","const","enum"]);function Lo(e,t){if(!e)return!1;for(let[r,a]of e.entries())if(!Pn(e,r)&&((Yu.has(a)||t==="2.0"&&a==="x-example")&&!Te(e.slice(0,r))&&!Xu(e,r)||t==="2.0"&&a==="examples"&&e[r-2]==="responses"&&!Te(e.slice(0,r-2))||a==="value"&&e[r-2]==="examples"&&!Te(e.slice(0,r-2))))return!0;return!1}function it(e,t,r=[]){let a={...e};for(let[n,s]of Object.entries(e)){let i=[...r,n];a[n]=Array.isArray(s)?s.map((o,l)=>typeof o=="object"&&!Array.isArray(o)&&o!==null?it(o,t,[...i,l.toString()]):o):te(s)?it(s,t,i):s}return t(a,r)}var ot=e=>e.replace(/~/g,"~0").replace(/\//g,"~1"),No=e=>e.replaceAll("~1","/").replaceAll("~0","~"),Qu=e=>{if(!te(e))return;let t=new Map;for(let[r,a]of Object.entries(e)){if(!te(a))continue;let n=[a["x-ms-discriminator-value"],a["x-discriminator-value"]].filter(l=>typeof l=="string");if(n.length===0)continue;let s=`#/components/schemas/${encodeURIComponent(ot(r))}`,i=Array.isArray(a.allOf)?[...a.allOf]:[],o=new Set([a]);for(;i.length>0;){let l=i.pop();if(!te(l)||o.has(l)||(o.add(l),Array.isArray(l.allOf)&&i.push(...l.allOf),typeof l.$ref!="string"||!l.$ref.startsWith("#/definitions/")))continue;let c;try{let f=decodeURIComponent(l.$ref.slice(14));if(f.includes("/"))continue;c=No(f)}catch{continue}let d=Object.hasOwn(e,c)?e[c]:void 0;if(!te(d)||o.has(d)||(i.push(d),!te(d.discriminator)||typeof d.discriminator.propertyName!="string"))continue;let p=t.get(d.discriminator)??new Map;for(let f of n)p.set(f,p.has(f)&&p.get(f)!==s?void 0:s);t.set(d.discriminator,p)}}for(let[r,a]of t){let n=Object.fromEntries([...a].filter(([,s])=>s!==void 0));Object.keys(n).length!==0&&(r.mapping===void 0||te(r.mapping))&&(r.mapping={...n,...r.mapping})}},Pe="application/json";function Un(e){let t=e["x-example"],r=e["x-examples"];return delete e["x-example"],delete e["x-examples"],{xExample:t,xExamples:r}}function Ue(e){return typeof e=="object"&&!!e&&!Array.isArray(e)&&Object.keys(e).length>0}function eh(e){return Ue(e)&&Object.values(e).every(t=>typeof t=="object"&&!!t&&!Array.isArray(t))}function th(e){if(!te(e))return!0;let t=e;return!(t.allOf||t.oneOf||t.anyOf||t.items||t.$ref||"additionalProperties"in t||["enum","const","not","format","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","maxProperties","minProperties","required"].some(r=>r in t)||typeof t.properties=="object"&&t.properties!==null&&Object.keys(t.properties).length>0)}function Bo(e){let t=Object.keys(e);if(t.some(r=>{let a=e[r];return te(a)&&(a.example!==void 0||a.examples!==void 0)}))for(let r of t){let a=e[r];if(!te(a))continue;let n=a.example!==void 0||a.examples!==void 0;a.schema!==void 0&&!n&&Object.keys(a).length===1&&th(a.schema)&&delete e[r]}}var rh=new Set(["summary","description","value","externalValue"]);function zo(e){if(typeof e!="object"||!e)return!1;let t=e,r="value"in t||"externalValue"in t,a=Object.keys(t).every(n=>rh.has(n));return r&&a}function lt(e){return zo(e)?e:{value:e}}var ah=/^(\*|application|audio|example|font|haptics|image|message|model|multipart|text|video)\/[a-zA-Z0-9*+.-]+$/,Mn=(e,t)=>t.includes(e)||ah.test(e);function nh(e){return Object.entries(e).reduce((t,[r,a])=>(t[r]={value:a},t),{})}var sh=e=>{switch(e){case"application":return"clientCredentials";case"accessCode":return"authorizationCode";case"implicit":return"implicit";case"password":return"password";default:return e}};function Po(e){let t=e;if(typeof t=="object"&&t&&typeof t.swagger=="string"&&t.swagger?.startsWith("2.0"))t.openapi="3.0.4",delete t.swagger;else return t;if(t.host){let r=Array.isArray(t.schemes)&&t.schemes?.length?t.schemes:["http"];t.servers=r.map(a=>({url:`${a}://${t.host}${t.basePath??""}`})),delete t.basePath,delete t.schemes,delete t.host}else t.basePath&&(t.servers=[{url:t.basePath}],delete t.basePath);if(t.definitions){for(let r of Object.values(t.definitions))Oe(r);Qu(t.definitions),t.components=Object.assign({},t.components,{schemas:t.definitions}),delete t.definitions,t=it(t,r=>(typeof r.$ref=="string"&&r.$ref.startsWith("#/definitions/")&&(r.$ref=r.$ref.replace(/^#\/definitions\//,"#/components/schemas/")),r))}if(t=it(t,(r,a)=>(r.type==="file"&&!Lo(a,"2.0")&&(r.type="string",r.format="binary"),r)),Object.hasOwn(t,"parameters")){t=it(t,s=>{if(typeof s.$ref=="string"&&s.$ref.startsWith("#/parameters/")){let i=s.$ref.split("/")[2];if(!i)return s;let o=te(t.parameters)&&i in t.parameters?t.parameters[i]:void 0;s.$ref=o&&typeof o=="object"&&"in"in o&&(o.in==="body"||o.in==="formData")?s.$ref.replace(/^#\/parameters\//,"#/components/requestBodies/"):s.$ref.replace(/^#\/parameters\//,"#/components/parameters/")}return s}),t.components??={};let r={},a={},n=te(t.parameters)?t.parameters:{};for(let[s,i]of Object.entries(n))i&&typeof i=="object"&&("$ref"in i?r[s]=Wn(i):"in"in i&&(i.in==="body"?a[s]=Wo(i,t.consumes??[Pe]):i.in==="formData"?a[s]=Ko([i],t.consumes):r[s]=Wn(i)));Object.keys(r).length>0&&(t.components.parameters=r),Object.keys(a).length>0&&(t.components.requestBodies=a),delete t.parameters}if(Object.hasOwn(t,"responses")&&typeof t.responses=="object"&&t.responses!==null){t=it(t,n=>(typeof n.$ref=="string"&&n.$ref.startsWith("#/responses/")&&(n.$ref=n.$ref.replace(/^#\/responses\//,"#/components/responses/")),n)),t.components??={};let r={},a=t.responses;for(let[n,s]of Object.entries(a))if(te(s))if("$ref"in s)r[n]=s;else{let i=s,o=t.produces??[Pe];if(i.schema){Oe(i.schema),typeof i.content!="object"&&(i.content={});for(let l of o)i.content[l]={schema:i.schema};delete i.schema}if(i.examples&&typeof i.examples=="object"){typeof i.content!="object"&&(i.content={});let l=o[0]??Pe;for(let[c,d]of Object.entries(i.examples))if(Mn(c,o))typeof i.content[c]!="object"&&(i.content[c]={}),i.content[c].example=d;else{typeof i.content[l]!="object"&&(i.content[l]={});let p=i.content[l];typeof p.examples!="object"&&(p.examples={}),p.examples[c]=lt(d)}delete i.examples}i.content&&typeof i.content=="object"&&Bo(i.content),te(i.headers)&&(i.headers=Object.entries(i.headers).reduce((l,[c,d])=>d&&typeof d=="object"?{[c]:Uo(d),...l}:l,{})),r[n]=i}Object.keys(r).length>0&&(t.components.responses=r),delete t.responses}if(typeof t.paths=="object"){for(let r in t.paths)if(Object.hasOwn(t.paths,r)){let a=te(t.paths)&&r in t.paths?t.paths[r]:void 0;if(!a||typeof a!="object")continue;let n;for(let s in a)if(s==="parameters"&&Object.hasOwn(a,s)){let i=Vo(a.parameters,t.consumes??[Pe]);a.parameters=i.parameters,n=i.requestBody}else if(Object.hasOwn(a,s)){let i=a[s];if(n&&(i.requestBody=n),i.parameters){let o=Vo(i.parameters,i.consumes??t.consumes??[Pe]);i.parameters=o.parameters,o.requestBody&&(i.requestBody=o.requestBody)}if(delete i.consumes,i.responses){for(let o in i.responses)if(Object.hasOwn(i.responses,o)){let l=i.responses[o];if(l.headers&&typeof l.headers=="object"&&(l.headers=Object.entries(l.headers).reduce((c,[d,p])=>p&&typeof p=="object"?{[d]:Uo(p),...c}:c,{})),l.schema){Oe(l.schema);let c=i.produces??t.produces??[Pe];typeof l.content!="object"&&(l.content={});for(let d of c)l.content[d]={schema:l.schema};delete l.schema}if(l.examples&&typeof l.examples=="object"){typeof l.content!="object"&&(l.content={});let c=i.produces??t.produces??[Pe],d=c[0]??Pe;for(let[p,f]of Object.entries(l.examples))if(Mn(p,c))typeof l.content[p]!="object"&&(l.content[p]={}),l.content[p].example=f;else{typeof l.content[d]!="object"&&(l.content[d]={});let h=l.content[d];typeof h.examples!="object"&&(h.examples={}),h.examples[p]=lt(f)}delete l.examples}l.content&&typeof l.content=="object"&&Bo(l.content)}}delete i.produces,i.parameters?.length===0&&delete i.parameters}}}if(t.securityDefinitions){(typeof t.components!="object"||t.components===null)&&(t.components={}),t.components&&typeof t.components=="object"&&Object.assign(t.components,{securitySchemes:{}});for(let[r,a]of Object.entries(t.securityDefinitions))if(typeof a=="object"){let n=Object.fromEntries(Object.entries(a).filter(([s])=>s==="description"||s.startsWith("x-")));if("type"in a&&a.type==="oauth2"){let{flow:s,authorizationUrl:i,tokenUrl:o,scopes:l}=a;t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:{...n,type:"oauth2",flows:{[sh(s||"implicit")]:Object.assign({},i&&{authorizationUrl:i},o&&{tokenUrl:o},l&&{scopes:l})}}})}else"type"in a&&a.type==="basic"?t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:{...n,type:"http",scheme:"basic"}}):t.components&&typeof t.components=="object"&&"securitySchemes"in t.components&&t.components.securitySchemes&&Object.assign(t.components.securitySchemes,{[r]:a})}delete t.securityDefinitions}return delete t.consumes,delete t.produces,t}var Oe=e=>{if(te(e)){if(typeof e.discriminator=="string"){let t=e.discriminator;e.discriminator={propertyName:t},e.required===void 0?e.required=[t]:Array.isArray(e.required)&&!e.required.includes(t)&&e.required.push(t)}if(typeof e["x-nullable"]=="boolean"&&(e["x-nullable"]&&(e.nullable=!0),delete e["x-nullable"]),te(e.properties))for(let t of Object.values(e.properties))Oe(t);if(Oe(e.items),Oe(e.additionalProperties),Array.isArray(e.allOf))for(let t of e.allOf)Oe(t)}};function Hn(e){let t=["type","format","default","items","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf","x-nullable"].reduce((r,a)=>(Object.hasOwn(e,a)&&(r[a]=e[a],delete e[a]),r),{});return Oe(t),t}function ih(e){if(e==="formData")throw Error("Encountered a formData parameter which should have been filtered out by the caller");if(e==="body")throw Error("Encountered a body parameter which should have been filtered out by the caller");return e}function Wn(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=oh(e),r=Hn(e),{xExample:a,xExamples:n}=Un(e);if(Ue(a)?e.examples=nh(a):Ue(n)&&(e.examples=Object.entries(n).reduce((s,[i,o])=>(s[i]=lt(o),s),{})),delete e.collectionFormat,delete e.default,!e.in)throw Error('Parameter object must have an "in" property');return{schema:r,...t,...e,in:ih(e.in)}}function Uo(e){if(Object.hasOwn(e,"$ref")&&typeof e.$ref=="string")return{$ref:e.$ref};let t=Hn(e),{xExample:r,xExamples:a}=Un(e),n=Ue(a)?Object.fromEntries(Object.entries(a).map(([s,i])=>[s,lt(i)])):void 0;return{...e,schema:t,...n?{examples:n}:{},...!n&&r!==void 0?{example:r}:{}}}var Mo={ssv:{style:"spaceDelimited",explode:!1},pipes:{style:"pipeDelimited",explode:!1},multi:{style:"form",explode:!0},csv:{style:"form",explode:!1},tsv:{}},Ho={ssv:{},pipes:{},multi:{},csv:{style:"simple",explode:!1},tsv:{}},Kn={header:Ho,query:Mo,path:Ho};function oh(e){if(e.type!=="array"||e.in!=="query"&&e.in!=="path"&&e.in!=="header")return{};let t=e.collectionFormat??"csv";return e.in in Kn&&t in Kn[e.in]?Kn[e.in][t]:{}}function lh(e){if(e.type!=="array"||typeof e.collectionFormat!="string")return;let t=Mo[e.collectionFormat];if(t&&Object.keys(t).length!==0)return t}function Wo(e,t){let{xExample:r,xExamples:a}=Un(e);delete e.name,delete e.in;let{schema:n,...s}=e;Oe(n);let i={content:{},...s};if(i.content)for(let o of t){if(i.content[o]={schema:n},Ue(a)&&o in a){let l=a[o];Ue(l)&&Object.values(l).every(c=>zo(c))?i.content[o].examples=l:eh(l)?i.content[o].examples=Object.entries(l).reduce((c,[d,p])=>(c[d]=lt(p),c),{}):i.content[o].examples={default:lt(l)}}else if(Ue(a)){let l=Object.entries(a).filter(([c])=>!Mn(c,t));l.length&&(i.content[o].examples=l.reduce((c,[d,p])=>(c[d]=lt(p),c),{}))}!i.content[o].examples&&Ue(r)&&o in r&&(i.content[o].example=r[o])}return i}function Ko(e,t=["multipart/form-data"]){let r={content:{}},a=t.filter(s=>s==="multipart/form-data"||s==="application/x-www-form-urlencoded"),n=a.length>0?a:["multipart/form-data"];if(r.content)for(let s of n){r.content[s]={schema:{type:"object",properties:{},required:[]}};let i=r.content?.[s];if(i?.schema&&typeof i.schema=="object"&&"properties"in i.schema){for(let o of e)if(o.name&&i.schema.properties){let l=structuredClone(o),c=Hn(l);i.schema.properties[o.name]={...c,...Object.fromEntries(Object.entries(l).filter(([p])=>p.startsWith("x-"))),...o.description===void 0?{}:{description:o.description}};let d=lh(o);d&&(i.encoding??={},i.encoding[o.name]=d),o.required&&Array.isArray(i.schema.required)&&i.schema.required.push(o.name)}}}return r}function Vo(e,t){let r={parameters:e.filter(s=>s.in!=="body"&&s.in!=="formData").map(s=>Wn(s))},a=structuredClone(e.find(s=>s.in==="body")??{});a&&Object.keys(a).length&&(r.requestBody=Wo(a,t));let n=e.filter(s=>s.in==="formData");if(n.length>0){let s=Ko(n,t);r.requestBody=typeof r.requestBody=="object"?{...r.requestBody,content:{...r.requestBody.content,...s.content}}:s,typeof r.requestBody!="object"&&(r.requestBody={content:{}})}return r}var ch=new Set(["properties","items","allOf","anyOf","oneOf","not","additionalProperties","schema","schemas"]),dh=new Set(["paths","webhooks","responses","content","headers","examples","links","encoding","variables","parameters","requestBodies","securitySchemes","pathItems","scopes"]),Vn=e=>{if(!e)return!1;let t=e[0]==="x-ext"&&e[1]!==void 0?e.slice(2):e,r=0;for(let a of t)if(r>0)r--;else{if(ch.has(a)||a.endsWith("Schema"))return!0;a==="callbacks"?r=2:dh.has(a)&&(r=1)}return!1},ph=new Set(["title","description","deprecated","default","example","examples","externalDocs","readOnly","writeOnly"]);function uh(e){if(!e||e.length<2||!Vn(e.slice(0,-2))||e.some((a,n)=>{let s=e.slice(0,n);return a.startsWith("x-")&&Vn(s)&&!Te(s)}))return!1;let t=e[e.length-2],r=e[e.length-1];return(t==="oneOf"||t==="anyOf")&&r!==void 0&&/^\d+$/.test(r)}function hh(e){return Object.keys(e).every(t=>t==="nullable"||ph.has(t)||t.startsWith("x-"))}function Zo(e){let t=e;return t===null||typeof t.openapi!="string"||!t.openapi.startsWith("3.0")||(t.openapi="3.1.1",t=it(t,mh)),t}var mh=(e,t)=>{if(Lo(t,"3.0"))return e;if(e.type!==void 0&&e.nullable===!0)e.type=[e.type,"null"],delete e.nullable;else if(e.nullable===!0&&e.type===void 0){if(typeof e.$ref=="string"){let{nullable:s,$ref:i,...o}=e;return{...o,anyOf:[{$ref:i},{type:"null"}]}}if(Array.isArray(e.allOf)){let{nullable:s,allOf:i,...o}=e,l=i.length===1?i[0]:{allOf:i};return{...o,anyOf:[l,{type:"null"}]}}uh(t)&&hh(e)&&(delete e.nullable,e.type="null")}e.exclusiveMinimum===!0&&e.minimum!==void 0?(e.exclusiveMinimum=e.minimum,delete e.minimum):typeof e.exclusiveMinimum=="boolean"&&delete e.exclusiveMinimum,e.exclusiveMaximum===!0&&e.maximum!==void 0?(e.exclusiveMaximum=e.maximum,delete e.maximum):typeof e.exclusiveMaximum=="boolean"&&delete e.exclusiveMaximum;let r=t?.some((s,i)=>s==="examples"&&i>0&&!Te(t.slice(0,i)));e.example!==void 0&&!r&&!Te(t)&&(e.examples=Vn(t)?[e.example]:{default:{value:e.example}},delete e.example);let{format:a,...n}=e;if(e.type==="string"||Array.isArray(e.type)&&e.type.includes("string")){if(e.format==="binary"){let{type:s,...i}=n;return t?.at(-1)==="schema"&&t.at(-3)==="content"?i:{contentMediaType:"application/octet-stream",...i}}if(e.format==="base64"||e.format==="byte")return{...n,contentEncoding:"base64"}}return e["x-webhooks"]!==void 0&&(t===void 0||t.length===0)&&(e.webhooks=e["x-webhooks"],delete e["x-webhooks"]),e},fh=["2.0","3.0","3.1","3.2"],me={EMPTY_OR_INVALID:"Can't find JSON, YAML or filename in data.",OPENAPI_VERSION_NOT_SUPPORTED:"Can't find supported Swagger/OpenAPI version in the provided document, version must be a string.",INVALID_REFERENCE:"Can't resolve reference: %s",EXTERNAL_REFERENCE_NOT_FOUND:"Can't resolve external reference: %s",SELF_REFERENCE:"Can't resolve reference to itself: %s",FILE_DOES_NOT_EXIST:"File does not exist: %s",NO_CONTENT:"No content found"};function Jo(e){if(e===null)return{version:void 0,specificationType:void 0,specificationVersion:void 0};if(ee(e))for(let t of new Set(fh)){let r=t==="2.0"?"swagger":"openapi",a=e[r];if(typeof a!="string")continue;let[n,s]=a.split(".");if(`${n}.${s}`===t)return{version:t,specificationType:r,specificationVersion:a}}return{version:void 0,specificationType:void 0,specificationVersion:void 0}}function ct(e){return e?.find(t=>t.isEntrypoint)}function gh(e){return decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function Go(e){return e.split("/").slice(1).map(gh)}var yh=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas"]),bh=new Set(["allOf","anyOf","oneOf","prefixItems"]),vh=new Set(["schema","items","additionalItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","not","if","then","else","contentSchema"]),xh=new Set(["additionalOperations","webhooks","content","mediaTypes","headers","encoding","variables","parameters","requestBodies","securitySchemes","pathItems"]),wh=new Set(["example","default","enum","const","dependentRequired"]),Xo=(e,t,r)=>e==="literal"?"literal":e==="callbackMap"?"callback":e==="callback"?"object":e==="responseMap"||e==="paths"?t.startsWith("x-")?"literal":e==="paths"?"object":"response":e==="namedResponseMap"?"response":e==="schemaMap"?"schema":e==="objectMap"?"object":e==="linkMap"?"link":e==="exampleMap"?"example":t.startsWith("x-")||t==="scopes"||e==="discriminator"&&t==="mapping"||e==="link"&&(t==="requestBody"||t==="parameters")?"literal":t==="links"?"linkMap":t==="discriminator"?"discriminator":wh.has(t)||e==="example"&&(t==="value"||t==="dataValue")?"literal":t==="examples"?e==="schema"||e==="response"||Array.isArray(r)?"literal":"exampleMap":yh.has(t)||bh.has(t)||t==="schemas"?"schemaMap":vh.has(t)?Array.isArray(r)?"schemaMap":"schema":t==="components"?"components":t==="paths"?"paths":t==="responses"?e==="components"||e==="document"?"namedResponseMap":"responseMap":t==="callbacks"?"callbackMap":xh.has(t)?"objectMap":"object",Yo=e=>e==="document"||e==="link"||e==="object"||e==="schema"||e==="example"||e==="callback"||e==="response",Qo=(e,t=[{fragment:"",context:"document"}])=>{let r=[],a=[],n=new WeakMap,s=({fragment:o,context:l})=>{try{let c=Go(o).reduce((d,p)=>te(d)&&Object.hasOwn(d,p)?d[p]:void 0,e);i(c,l)}catch{}},i=(o,l)=>{if(l==="literal"||!te(o)||n.get(o)?.has(l))return;let c=n.get(o)??new Set;if(c.add(l),n.set(o,c),Yo(l)&&typeof o.$ref=="string"&&o.$ref){let[d,p=""]=o.$ref.split("#",2);d?r.push({filename:d,fragment:p,context:l}):a.push({fragment:p,context:l})}for(let[d,p]of Object.entries(o))i(p,Xo(l,d,p))};for(let o of t)s(o);for(let o of a)s(o);return r},kh=e=>[...new Set(Qo(e).map(({filename:t})=>t))];function el(e){return e!==void 0&&Array.isArray(e)&&e.length>0&&e.some(t=>t.isEntrypoint===!0)}function Zn(e,t={}){if(el(e))return e;let r=ua(e);return Array.isArray(r)?r:[{isEntrypoint:!0,specification:r,filename:null,dir:"./",references:kh(r),...t}]}function $h(e,t,r,a=[]){let n=Zn(structuredClone(e)),s=ct(n),i=r?.specification??s.specification;if(!ee(i)){if(t?.throwOnError)throw Error(me.NO_CONTENT);return{valid:!1,errors:a,schema:i}}Jn(i,n,r??s,new WeakSet,a,t,"document");let o=a.filter((l,c,d)=>c===d.findIndex(p=>p.message===l.message&&p.code===l.code));return{valid:o.length===0,errors:o,schema:i}}function Jn(e,t,r,a,n,s,i="object"){if(i==="literal"||e===null||a.has(e))return;a.add(e);let o=(c,d)=>{let p=tl(`#${d}`,s,c,t,o,n);return te(p)&&Jn(p,t,c,a,n,s,i),p},l=new Set;for(;Yo(i)&&e.$ref!==void 0;){if(l.has(e.$ref)){n.push({code:"SELF_REFERENCE",message:me.SELF_REFERENCE.replace("%s",e.$ref)}),delete e.$ref;break}l.add(e.$ref);let c=tl(e.$ref,s,r,t,o,n);if(typeof c!="object"||!c)break;let d=e.$ref;delete e.$ref;for(let p of Object.keys(c))e[p]===void 0&&(e[p]=c[p]);d&&s?.onDereference?.({schema:e,ref:d,resolved:c})}for(let[c,d]of Object.entries(e))typeof d=="object"&&d&&Jn(d,t,r,a,n,s,Xo(i,c,d))}function tl(e,t,r,a,n,s){if(typeof e!="string"){if(t?.throwOnError)throw Error(me.INVALID_REFERENCE.replace("%s",e));s.push({code:"INVALID_REFERENCE",message:me.INVALID_REFERENCE.replace("%s",e)});return}let[i,o]=e.split("#",2),l=i!==r.filename;if(i&&l){let c=a.find(d=>d.filename===i);if(!c){if(t?.throwOnError)throw Error(me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i));s.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",i)});return}return n(c,o??"")}try{return Go(o).reduce((c,d)=>{if(!te(c)||!(d in c))throw Error(me.INVALID_REFERENCE.replace("%s",e));return c[d]},r.specification)}catch{if(t?.throwOnError)throw Error(me.INVALID_REFERENCE.replace("%s",e));s.push({code:"INVALID_REFERENCE",message:me.INVALID_REFERENCE.replace("%s",e)})}}function rl(e,t){let r=Zn(e),a=ct(r),n=$h(r,t);return{specification:a.specification,errors:n.errors,schema:n.schema,...Jo(a.specification)}}var Sh=1e5,Ah=10,al=e=>{let t=new WeakSet,r={sourceEntries:0,copiedEntries:0,sizes:new Map},a=n=>{if(n===null||typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n===void 0)return n;if(!Array.isArray(n)&&!ee(n))return structuredClone(n);if(t.has(n))throw Error("Cannot upgrade to OpenAPI 3.2: cyclic objects cannot be represented in JSON. Use $ref instead.");let s=r.sizes.get(n)??1+(Array.isArray(n)?n.length:Object.keys(n).length);if(r.sizes.has(n)||(r.sizes.set(n,s),r.sourceEntries+=s),r.copiedEntries+=s,r.copiedEntries>Sh&&r.copiedEntries>r.sourceEntries*Ah)throw Error("Cannot upgrade to OpenAPI 3.2: excessive YAML alias expansion. Use $ref for shared schemas.");t.add(n);let i=Array.isArray(n)?n.map(a):Object.fromEntries(Object.entries(n).map(([o,l])=>[o,a(l)]));return t.delete(n),i};return a(e)},Eh=e=>decodeURI(No(e)),nl=e=>e.split("/").slice(1).map(Eh),sl=class extends AggregateError{errors;constructor(e){super(e,e.map(t=>t.message).join(`
`)),this.errors=e,this.name="UpgradeIncompatibilityError"}},Dh=["properties","patternProperties","$defs","dependentSchemas"],Ch=["allOf","anyOf","oneOf","prefixItems"],Th=["items","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","not","if","then","else","contentSchema"],Oh=(e,t="throw")=>{let r=new WeakMap,a=(b,A)=>{let $=r.get(b)??new Map(Object.entries(Object.getOwnPropertyDescriptors(b)).filter(([,E])=>Object.hasOwn(E,"value")).map(([E,D])=>[E,D.value]));return r.set(b,$),$.get(A)},n=new Set,s=[],i=new WeakMap,o=new WeakSet,l={evaluations:0},c=new WeakSet,d=[],p=b=>{ee(b)&&!c.has(b)&&(c.add(b),p(b.items),Array.isArray(b.prefixItems)&&b.prefixItems.forEach(p))},f=new WeakMap,h=new WeakMap,y=(b,A)=>{s.push(Error(`Cannot upgrade to OpenAPI 3.2 at ${b}: ${A}`))},m=(b,A=!1)=>{if(typeof b=="string"&&b.startsWith("#/"))try{return nl(decodeURIComponent(b.slice(1))).reduce(($,E)=>{if((!A||!ee($)||$.$id===void 0&&$.$schema===void 0)&&(!Array.isArray($)||/^(0|[1-9]\d*)$/.test(E))&&(ee($)||Array.isArray($))&&Object.hasOwn($,E))return a($,E)},e)}catch{return}},g=(b,A)=>{if(typeof b!="string")return;let $=[...b.matchAll(/\{([^{}]+)\}/g)].map(E=>E[1]);new Set($).size!==$.length&&y(A,"Template variables must not be repeated. Rename the repeated variable and define it separately.")},k=(b,A,$=new Set)=>{if(b===!1)return!0;if(b===!0)return!1;if(!ee(b)||b.$id!==void 0||b.$schema!==void 0)return;if($.has(b)){for(let R of $)o.add(R);return}let E=i.get(b)??new Map;if(E.has(A))return E.get(A);if(++l.evaluations>1e5){l.evaluations===100001&&y("#","Discriminator requiredness analysis was truncated after 100,000 evaluations.");return}let D=R=>(R===void 0&&o.has(b)||(E.set(A,R),i.set(b,E)),R);if(Array.isArray(b.required)&&b.required.includes(A))return D(!0);let O=new Set([...$,b]),j=[];b.$ref!==void 0&&j.push(k(m(b.$ref,!0),A,O)),Array.isArray(b.allOf)&&j.push(...b.allOf.map(R=>k(R,A,O)));for(let R of["oneOf","anyOf"])if(Array.isArray(b[R])){let N=b[R].map(W=>k(W,A,O));N.every(W=>W===!0)?j.push(!0):N.every(W=>W===!1)?j.push(!1):j.push(void 0)}return j.includes(!0)?D(!0):j.includes(void 0)||["if","not","$dynamicRef","const","enum","minProperties","dependentRequired","dependentSchemas"].some(R=>R in b)?D(void 0):D(!1)},v=(b,A,{inferredName:$,propertyName:E,dialect:D,ancestors:O=new Set,baseChanged:j=!1})=>{if(!ee(b)||O.has(b)||(b.$schema??D)!==void 0)return;let R=j||b.$id!==void 0,N=[$,E,R].join(":"),W=f.get(b)??new Set;if(W.has(N))return;let q=ee(b.xml)?b.xml:{},Z=b.$ref!==void 0||b.$dynamicRef!==void 0||b.type==="array"?"none":"element",B=q.wrapped===!0?"element":Z,P=q.nodeType??(q.attribute===!0?"attribute":B);P!=="element"&&P!=="attribute"||$||q.name!==void 0||y(A,"An inline XML element needs an explicit xml.name.");let U={dialect:D,ancestors:new Set([...O,b]),baseChanged:R};if(!R&&typeof b.$ref=="string"){let J=m(b.$ref,!0);if(ee(J)){let K=nl(decodeURIComponent(b.$ref.slice(1))),Ht=K.length===3&&K[0]==="components"&&K[1]==="schemas",mt=c.has(J);v(J,b.$ref,{...U,inferredName:Ht||mt,propertyName:mt})}}for(let J of["allOf","anyOf","oneOf"]){let K=b[J];Array.isArray(K)&&K.forEach((Ht,mt)=>v(Ht,A+"/"+J+"/"+mt,{...U,inferredName:!1,propertyName:!1}))}if(v(b.items,A+"/items",{...U,inferredName:E,propertyName:E}),Array.isArray(b.prefixItems)&&b.prefixItems.forEach((J,K)=>v(J,A+"/prefixItems/"+K,{...U,inferredName:E,propertyName:E})),ee(b.properties))for(let[J,K]of Object.entries(b.properties))v(K,A+"/properties/"+ot(J),{...U,inferredName:!0,propertyName:!0});W.add(N),f.set(b,W)},w=(b,A,$,E=e.jsonSchemaDialect,D=!1)=>{if(!ee(b))return;let O=A==="schema"?b.$schema??E:E,j=D||A==="schema"&&b.$id!==void 0,R=`${A}:${String(O)}:${j}`,N=h.get(b)??new Set;if(N.has(R))return;N.add(R),h.set(b,N);let W=(B,P)=>w(a(b,B),P,`${$}/${ot(B)}`,O,j),q=(B,P)=>{let U=a(b,B);Array.isArray(U)&&U.forEach((J,K)=>w(J,P,`${$}/${B}/${K}`,O,j))},Z=(B,P)=>{let U=a(b,B);if(ee(U))for(let[J,K]of Object.entries(U))B==="responses"&&J.startsWith("x-")||(A==="schema"&&B==="properties"&&p(K),w(K,P,`${$}/${B}/${ot(J)}`,O,j))};if(A==="schema"){if(O!==void 0)return;let B=a(b,"xml");ee(B)&&(B.wrapped===!0&&B.attribute===!0&&y(`${$}/xml`,"wrapped and attribute cannot both be true."),(B.wrapped===!0||B.attribute===!0)&&(B.nodeType=B.attribute===!0?"attribute":"element",delete B.wrapped,delete B.attribute)),!j&&b.$ref!==void 0&&w(m(b.$ref,!0),"schema",String(b.$ref),O);let P=b.discriminator;ee(P)&&typeof P.propertyName=="string"&&P.defaultMapping===void 0&&!j&&k(b,P.propertyName)===!1&&y(`${$}/discriminator`,"An optional discriminating property needs an explicit defaultMapping.");for(let U of Dh)Z(U,"schema");for(let U of Ch)q(U,"schema");for(let U of Th)W(U,"schema")}else switch(b.$ref!==void 0&&w(m(b.$ref),A,String(b.$ref),O),A){case"document":{let B=a(b,"paths");if(ee(B))for(let[U,J]of Object.entries(B)){if(!U.startsWith("/"))continue;let K=`${$}/paths/${ot(U)}`;g(U,K),w(J,"pathItem",K)}Z("webhooks","pathItem"),q("servers","server");let P=a(b,"components");if(ee(P))for(let[U,J]of Object.entries({schemas:"schema",parameters:"parameter",headers:"header",requestBodies:"body",responses:"response",callbacks:"callback",pathItems:"pathItem"})){let K=a(P,U);if(ee(K))for(let[Ht,mt]of Object.entries(K))w(mt,J,`${$}/components/${U}/${ot(Ht)}`)}break}case"pathItem":for(let B of["get","put","post","delete","options","head","patch","trace"])W(B,"operation");q("parameters","parameter"),q("servers","server");break;case"operation":if(Array.isArray(b.tags))for(let B of b.tags)typeof B=="string"&&n.add(B);q("parameters","parameter"),q("servers","server"),W("requestBody","body"),Z("responses","response"),Z("callbacks","callback");break;case"callback":for(let[B,P]of Object.entries(b))!B.startsWith("x-")&&B!=="$ref"&&w(P,"pathItem",`${$}/${ot(B)}`,O,j);break;case"parameter":(b.in==="path"||b.in==="cookie")&&delete b.allowReserved,W("schema","schema"),Z("content","media");break;case"header":W("schema","schema"),Z("content","media");break;case"response":Z("headers","header"),Z("content","media");break;case"body":Z("content","media");break;case"media":/\/(?:[^;]+\+)?xml(?:\s*;|$)/i.test($.slice($.lastIndexOf("/")+1).replace(/~1/g,"/"))&&d.push({schema:b.schema,path:`${$}/schema`,dialect:O}),W("schema","schema"),Z("encoding","encoding");break;case"encoding":Z("headers","header");break;case"server":g(b.url,`${$}/url`)}};w(e,"document","#");for(let{schema:b,path:A,dialect:$}of d)v(b,A,{inferredName:!1,propertyName:!1,dialect:$});if(s.length>0&&t==="throw")throw new sl(s);return n},Fh=(e,t)=>{let r=e["x-tagGroups"];if(!Array.isArray(r)||r.length===0||e.tags!==void 0&&!Array.isArray(e.tags))return;let a=e.tags??[];if(!a.every(l=>ee(l)&&typeof l.name=="string"))return;let n=new Map(a.map(l=>[l.name,l])),s=new Set,i=new Set;for(let l of r){if(!ee(l)||typeof l.name!="string"||!l.name||!Array.isArray(l.tags)||!l.tags.every(c=>typeof c=="string")||Object.keys(l).some(c=>c!=="name"&&c!=="tags")||s.has(l.name)||n.has(l.name)||t.has(l.name))return;s.add(l.name);for(let c of l.tags){if(i.has(c)||n.get(c)?.parent!==void 0)return;i.add(c)}}if([...s].some(l=>i.has(l))||n.size!==a.length)return;let o=[];for(let l of r){o.push({name:l.name,kind:"nav"});for(let c of l.tags)o.push({...n.get(c)??{name:c},parent:l.name})}e.tags=[...o,...a.filter(l=>!i.has(l.name))]},jh=e=>{if(!ee(e)||typeof e.openapi!="string")return!1;if(/^3\.1\.\d+$/.test(e.openapi))return!0;if(/^3\.1(?:\D|$)/.test(e.openapi))throw Error(`Cannot upgrade to OpenAPI 3.2: invalid OpenAPI version "${e.openapi}". Expected 3.1.x with a numeric patch version.`);return!1},Rh=(e,t="throw")=>(jh(e)&&(Fh(e,Oh(e,t)),e.openapi="3.2.0"),e);function il(e,t,r){if(t==="3.2"){let n=Zo(Po(al(e)));try{let s=Rh(n,r?.onIncompatible==="ignore"?"ignore":"throw");return r?.onIncompatible==="collect"?{document:s,diagnostics:[]}:s}catch(s){if(r?.onIncompatible!=="collect"||!(s instanceof sl))throw s;return{document:il(al(e),"3.1"),diagnostics:s.errors}}}let a=Po(e);return t==="3.0"?a:Zo(a)}function _h(e){if(!e)return{specification:null,version:void 0};let t=il(el(e)?ct(e).specification:ua(e),"3.1"),{version:r}=Jo(t);return{specification:t,version:r==="3.1"||r==="3.2"?r:void 0}}var qh=(e,t)=>ol(e,t),ol=async(e,t,r,a=new Map)=>{let n=[];if(t?.filesystem?.find(m=>m.filename===e))return{specification:ct(t.filesystem)?.specification,filesystem:t.filesystem,errors:n};let s=t?.plugins?.find(m=>m.check(e)),i=typeof e=="string"?e:t?.filename,o=i===void 0?void 0:a.get(i),l=o?.content??ua(e);if(s&&!o)try{l=ua(await s.get(e))}catch{if(t?.throwOnError)throw Error(me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e));return n.push({code:"EXTERNAL_REFERENCE_NOT_FOUND",message:me.EXTERNAL_REFERENCE_NOT_FOUND.replace("%s",e)}),{specification:null,filesystem:[],errors:n}}if(l===void 0){if(t?.throwOnError)throw Error("No content to load");return n.push({code:"NO_CONTENT",message:me.NO_CONTENT}),{specification:null,filesystem:[],errors:n}}let c=Zn(l,{filename:t?.filename??null}),d=t?.filename?c.find(m=>m.filename===t?.filename):ct(c),p=o?.targets??new Set,f=(r??[{fragment:"",context:"document"}]).filter(m=>{let g=JSON.stringify(m);return!p.has(g)&&(p.add(g),!0)});i!==void 0&&a.set(i,{content:l,targets:p});let h=Qo(d.specification,f),y=[...new Set(h.map(({filename:m})=>m))];if(d.references=y,y.length===0)return{specification:ct(c)?.specification,filesystem:c,errors:n};for(let m of y){let g=t?.plugins?.find(w=>w.check(m));if(!g)continue;let{filesystem:k,errors:v}=await ol(g.check(m)&&g.resolvePath?g.resolvePath(e,m):m,{...t,filename:m},h.filter(({filename:w})=>w===m).map(({fragment:w,context:b})=>({fragment:w,context:b})),a);n.push(...v);for(let w of k){let b=c.find(A=>A.filename===w.filename);b?b.references=[...new Set([...b.references,...w.references])]:c.push({...w,isEntrypoint:!1})}}return{specification:ct(c)?.specification,filesystem:c,errors:n}},Ih=new Set(["get","put","post","delete","options","head","patch","trace","query"]);function Lh(e){let t=[],r=/"([^"]*)"|([^\s,"]+(?:"[^"]*")?)/g,a;for(;a=r.exec(String(e||""));)t.push(a[1]===void 0?a[2]:a[1]);return t}var Nh=e=>e.replace(/^"|"$/g,"");function ll(e){let t=e.toLowerCase();if(!t.includes("*"))return s=>s.toLowerCase()===t;let r=s=>s.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),a=t.split("/").slice(1).map(s=>s==="**"?"(?:/.*)?":`/${s.split("*").map(r).join("[^/]*")}`).join(""),n=RegExp(`^${a}$`);return s=>n.test(s.toLowerCase())}function Bh(e,t){if(Ih.has(e.toLowerCase())&&t?.startsWith("/")){let a=e.toLowerCase(),n=ll(t);return{consumed:2,test:s=>s.method===a&&n(s.path)}}if(e.startsWith("/")){let a=ll(e);return{consumed:1,test:n=>a(n.path)}}let r=e.match(/^(tag|badge):(.+)$/i);if(r){let a=Nh(r[2]).toLowerCase(),n=r[1].toLowerCase()==="tag"?"tags":"badges";return{consumed:1,test:s=>s[n].some(i=>i.toLowerCase()===a)}}return e.toLowerCase()==="deprecated"?{consumed:1,test:a=>a.deprecated}:{consumed:1,test:a=>a.operationId===e}}function zh(e){let t=Lh(e);if(!t.length)return null;let r=[],a=[];for(let n=0;n<t.length;){let s=t[n].startsWith("!"),i=s?t[n].slice(1):t[n];if(!i){n+=1;continue}let{consumed:o,test:l}=Bh(i,t[n+1]);(s?a:r).push(l),n+=o}return r.length||a.length?{include:r,exclude:a}:null}function Ph(e,t,r){let a=Array.isArray(r?.["x-badges"])?r["x-badges"]:[];return{method:String(e).toLowerCase(),path:String(t),operationId:r?.operationId||"",tags:Array.isArray(r?.tags)?r.tags.map(String):[],badges:a.map(n=>String(n?.label??"")).filter(Boolean),deprecated:!!r?.deprecated}}function Uh(e,t){return e?e.exclude.some(r=>r(t))?-1:e.include.length?e.include.findIndex(r=>r(t)):0:0}function dt(e){return String(e||"").trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/[_\s/\\.]+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/-+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()}function Mh(e,t=40){if(!e||e.length<=t)return e;let r=e.slice(0,t),a=r.lastIndexOf("-");return a>8?r.slice(0,a):r}function cl(e,t){let r=(e||"get").toLowerCase(),a=(t||"").replace(/[{}]/g,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"");return a?`${r}-${a}`:r}function Hh(e={}){if(typeof e.operationId=="string"){let t=e.operationId.trim();if(t.length>0&&t.length<=45&&!/^(endpoint|operation|method|api)[-_]?\d+$/i.test(t)&&dt(t))return"operationId"}return typeof e.summary=="string"&&dt(e.summary.trim().slice(0,100))?"summary":"path"}var dl=class{constructor(){this.slugger=new Qe,this.used=new Set,this.opMap=new Map}reset(){this.slugger.reset(),this.used.clear(),this.opMap.clear()}slugOp(e={}){let t=Hh(e);return t==="operationId"?dt(e.operationId.trim()):t==="summary"?Mh(dt(e.summary.trim().slice(0,100)),40):cl(e.method,e.path)}slug(e={},t=""){let r=JSON.stringify([t,e.isWebhook===!0,(e.method||"get").toLowerCase(),e.path||""]);if(this.opMap.has(r))return this.opMap.get(r);let a=t&&t!=="general"?`${t}--`:"",n=(e.isWebhook?"webhook-":"")+this.slugOp(e),s=`${a}${n}`;if(this.used.has(s)){let o=`${a}${(e.method||"get").toLowerCase()}-${n}`;this.used.has(o)||(s=o)}let i=this.slugger.slug(s);return this.used.add(i),r&&this.opMap.set(r,i),i}slugTag(e){return`tag--${dt(e)}`}slugTagGroup(e){return`tag-group--${dt(e)}`}};function pl(e){if(typeof e!="string")return!1;let t=e.trim();return!(t.startsWith("{")||t.startsWith("[")||t.includes(`
`))}function Gn(){return typeof window<"u"&&window.location?.href?window.location.href:"http://localhost/"}function Wh(e){let t=new URL(e||Gn(),Gn());return{check(r){return typeof r!="string"||r.startsWith("#")?!1:pl(r)},resolvePath(r,a){if(typeof a=="string"&&(a.startsWith("http://")||a.startsWith("https://")))return a;let n=typeof r=="string"&&(r.startsWith("http://")||r.startsWith("https://"))?new URL(r):t;return new URL(a,n).href},async get(r){let a=r.startsWith("http://")||r.startsWith("https://")?r:new URL(r,t).href,n=await fetch(a);if(!n.ok){let i=Error(`Failed to load ${a} (${n.status})`);throw i.status=n.status,i.statusCode=n.status,i.response=n,i.url=a,i}let s=await n.text();try{return JSON.parse(s)}catch{try{return zn(s,{maxAliasCount:-1,merge:!0})}catch{return s}}}}}function ul(e){let t=new WeakMap,r=new WeakSet;function a(n,s=new Set,i=null){if(!n||typeof n!="object")return n;let o=n["x-ref"];if(o&&s.has(o))return{$ref:o};if(o){for(let d of Object.values(n))if(d&&typeof d=="object"&&r.has(d))return{$ref:o}}if(r.has(n))return{$ref:o||i||"#/components/schemas/Circular"};if(t.has(n))return t.get(n);r.add(n);let l=s;o&&(l=new Set(s),l.add(o));let c;if(Array.isArray(n)){c=[],t.set(n,c);for(let d=0;d<n.length;d++)c.push(a(n[d],l,o||i))}else{c={},t.set(n,c);for(let d of Object.keys(n))d!=="x-ref"&&(c[d]=a(n[d],l,o||i))}return r.delete(n),c}return a(e)}function Kh(e){return String(e||"").replace(/[^a-zA-Z0-9]+(.)/g,(t,r)=>r.toUpperCase()).replace(/^[a-z]/,t=>t.toUpperCase())}async function hl(e,t=!1,r=!1,a=!1,n="none",s="",i="",o="",l="",c="",d=!1){let p,f=new Map;try{this?.requestUpdate?.();let h=e,y;if(typeof e=="string"&&pl(e))try{y=new URL(e.trim(),Gn()).href,h=y}catch{y=e}else if(typeof e=="string")try{h=JSON.parse(e)}catch{try{h=zn(e,{maxAliasCount:-1,merge:!0})}catch{h=e}}let m=Wh(y),g=await qh(h,{plugins:[m]});if(g.errors&&g.errors.length>0&&!g.specification){let w=g.errors[0],b=Error(w.message||"Error loading specification");throw b.status=404,b}let k={onDereference:({schema:w,ref:b})=>{w["x-ref"]=b}},v;if(v=g.specification?.swagger&&String(g.specification.swagger).startsWith("2")?ul((await rl(_h(g.filesystem).specification,k)).schema):ul((await rl(g.filesystem,k)).schema),await Mr(0),v&&(v.components||v.info||v.servers||v.tags||v.paths))f=Vh(v,c),p=v,this?.dispatchEvent?.(new CustomEvent("before-render",{detail:{spec:p}}));else return{specLoadError:!0,isSpecLoading:!1,info:{title:"Invalid Spec Definition",description:"Invalid Spec Definition",version:""},tags:[],tagGroups:[]}}catch(h){let y;return y=h.statusCode===404||h.status===404?h.response?.url||h.url?`${h.response?.url||h.url} \u2503 Not Found (${h.response?.status||h.status})`:"Spec Not Found \u2503 404":`Unable to load ${h.response?.url||h.url||(typeof e=="string"?e:"")} \u2503 ${h.response?.status||h.status||h.message}`,{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:y,version:""},tags:[],tagGroups:[]}}try{let h=!!(p?.["x-tagGroups"]&&p["x-tagGroups"].length>0||p?.["x-tag-groups"]&&p["x-tag-groups"].length>0),y=Jh(p,n,t,r,h,d,f),m=Gh(p,y),g=Zh(p,a),k=p.info?.description?Xn(p.info.description):[],v=[];if(p.components?.securitySchemes){let b=new Set;Object.entries(p.components.securitySchemes).forEach(A=>{if(!b.has(A[0])){b.add(A[0]);let $={securitySchemeId:A[0],...A[1]};$.in="header",$.name="Authorization",$.nameId=A[1].name||A[0],$.user="",$.password="",$.clientId="",$.clientSecret="",$.value="",$.finalKeyValue="",A[1].type==="apiKey"&&($.in=A[1].in||"header",$.name=A[1].name||"Authorization"),v.push($)}})}s&&i&&o&&v.push({securitySchemeId:ar,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:s,nameId:s,in:i,value:o,finalKeyValue:o}),v.forEach(b=>{b.typeDisplay=b.type==="http"?b.scheme==="basic"?"HTTP Basic":`HTTP Bearer ${b.nameId}`:b.type==="apiKey"?`API Key (${b.name})`:b.type==="oauth2"?`OAuth (${b.securitySchemeId})`:b.type||"None"});let w=[];return p.servers&&Array.isArray(p.servers)&&p.servers.length>0?(p.servers.forEach(b=>{let A=String(b.url??"").trim();A.startsWith("http")||A.startsWith("//")||A.startsWith("{")||typeof window<"u"&&window.location?.origin?.startsWith("http")&&(b.url=window.location.origin+b.url,A=b.url),b.variables&&Object.entries(b.variables).forEach($=>{let E=RegExp(`{${$[0]}}`,"g");A=A.replace(E,$[1].default||""),$[1].value=$[1].default||""}),b.computedUrl=A}),l&&p.servers.push({url:l,computedUrl:l})):l?p.servers=[{url:l,computedUrl:l}]:typeof window<"u"&&window.location?.origin?.startsWith("http")?p.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:p.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],w=p.servers,{specLoadError:!1,isSpecLoading:!1,info:p.info,infoDescriptionHeaders:k,tags:y,tagGroups:m,components:g,externalDocs:p.externalDocs,securitySchemes:v,servers:w}}catch(h){return{specLoadError:!0,isSpecLoading:!1,info:{title:"Error processing the spec",description:`Unable to process the spec \u2503 ${h?.message||h}`,version:""},tags:[],tagGroups:[]}}}/* Path filtering correction start */
function Vh(spec, filterText = "") {
  const filter = zh(filterText);
  const ranks = new Map();
  const paths = {};
  function keep(method, path, operation) {
    const rank = Uh(filter, Ph(method, path, operation));
    if (rank < 0) return false;
    if (filter) ranks.set(`${method.toLowerCase()} ${path}`, rank);
    return true;
  }
  for (const [path, item] of Object.entries(spec.paths ?? {})) {
    if (!path.startsWith("/")) continue;
    const kept = {};
    let operations = 0;
    for (const [key, value] of Object.entries(item)) {
      if (Ih.has(key)) {
        if (keep(key, path, value)) {
          kept[key] = value;
          operations++;
        }
      } else if (key === "additionalOperations") {
        const additional = {};
        for (const [method, operation] of Object.entries(value)) {
          if (keep(method, path, operation)) additional[method] = operation;
        }
        if (Object.keys(additional).length) {
          kept.additionalOperations = additional;
          operations++;
        }
      } else {
        kept[key] = value;
      }
    }
    if (operations) paths[path] = kept;
  }
  spec.paths = paths;
  return ranks;
}
/* Path filtering correction end */
function Xn(e){return T.lexer(e).filter(t=>t.type==="heading"&&t.depth<=2)||[]}function Zh(e,t=!1){if(!e.components)return[];let r=[];for(let a in e.components){let n=[];for(let l in e.components[a]){let c={show:!0,id:`${a.toLowerCase()}-${l.toLowerCase()}`.replace(_p,"-"),name:l,component:e.components[a][l]};n.push(c)}let s=a,i=a;switch(a){case"schemas":t&&n.sort((l,c)=>l.name.localeCompare(c.name)),i="Schemas",s="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":i="Responses",s="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":i="Parameters",s="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":i="Examples",s="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":i="Request Bodies",s="Describes common request bodies that are used across the API operations.";break;case"headers":i="Headers",s='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":i="Security Schemes",s="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":i="Links",s="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":i="Callbacks",s="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:i=a,s=a}let o={show:!0,name:i,description:s,subComponents:n};r.push(o)}return r||[]}function Yn(e){if(!e)return!0;let t=e["x-tag-expanded"]??e["x-tagExpanded"]??e["x-expanded"]??e.expanded;return t!==!1&&t!=="false"}function Jh(e,t="none",r=!1,a=!1,n=!1,s=!1,i=new Map){let o=["get","put","post","delete","patch","head","options","trace","query"],l=new dl,c=e.tags&&Array.isArray(e.tags)&&e.tags.length>0?e.tags.map(m=>({show:!0,elementId:l.slugTag(m.name),name:m.name,displayName:m["x-displayName"]||m.name,description:m.description||"",headers:m.description?Xn(m.description):[],paths:[],expanded:Yn(m),xInternal:m["x-internal"]??void 0,xHidden:m["x-hidden"]??void 0})):[],d=[...Object.entries(e.paths||{}).filter(([name])=>name.startsWith("/")).map(([m,g])=>[m,g,!1]),...Object.entries(e.webhooks||{}).map(([m,g])=>[m,g,!0])];for(let[m,g,k]of d){let v=g.parameters,w={servers:g.servers||[],parameters:g.parameters||[]},b=[];o.forEach(A=>{g[A]&&b.push({methodName:A,pathOrHookObj:g[A]})}),g.additionalOperations&&typeof g.additionalOperations=="object"&&Object.entries(g.additionalOperations).forEach(([A,$])=>{$&&typeof $=="object"&&b.push({methodName:A.toLowerCase(),pathOrHookObj:$})}),b.forEach(({methodName:A,pathOrHookObj:$})=>{let E=$.tags?[...$.tags]:[];if(E.length===0)if(r){let D=m.replace(/^\/+|\/+$/g,""),O=D.indexOf("/");O===-1?E.push(D):E.push(D.substring(0,O))}else E.push("General");E.forEach(D=>{let O,j;e.tags&&(j=e.tags.find(P=>P.name?.toLowerCase()===D.toLowerCase())),O=c.find(P=>P.name===D),O||(O={show:!0,elementId:l.slugTag(D),name:D,displayName:j?.["x-displayName"]||j?.name||D,description:j?.description||"",headers:j?.description?Xn(j.description):[],paths:[],expanded:Yn(j),xInternal:j?.["x-internal"]??void 0,xHidden:j?.["x-hidden"]??void 0},c.push(O));let R=($.summary||$.description||`${A.toUpperCase()} ${m}`).trim();R.length>100&&([R]=R.split(/[.|!|?]\s|[\r?\n]/));let N=[];if(N=v?$.parameters?v.filter(P=>{if(!$.parameters.some(U=>P.name===U.name&&P.in===U.in))return P}).concat($.parameters):v.slice(0):$.parameters?$.parameters.slice(0):[],$.callbacks)for(let[P,U]of Object.entries($.callbacks)){let J=Object.entries(U).filter(K=>typeof K[1]=="object")||[];$.callbacks[P]=Object.fromEntries(J)}let W=`${A}${Kh((m||"").replace(/[{}]/g,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,""))}`,q=$.operationId||W,Z=n?dt(D):"",B=l.slug({method:A,path:m,isWebhook:k,operationId:$.operationId,summary:$.summary||$.description},Z);O.paths.push({show:!0,expanded:!1,isWebhook:k,expandedAtLeastOnce:!1,summary:$.summary||"",description:$.description||"",externalDocs:$.externalDocs,shortSummary:R,method:A,path:m,operationId:q,elementId:B,servers:$.servers??w.servers,parameters:N,requestBody:$.requestBody,responses:$.responses,callbacks:$.callbacks,deprecated:$.deprecated,security:$.security??e.security,xBadges:$["x-badges"]||void 0,xCodeSamples:$["x-codeSamples"]||$["x-code-samples"]||"",rawOperation:$,xInternal:$["x-internal"]??g?.["x-internal"]??void 0,xHidden:$["x-hidden"]??g?.["x-hidden"]??void 0})})})}let p=new Set((e["x-tagGroups"]||e["x-tag-groups"]||[]).flatMap(m=>Array.isArray(m?.tags)?m.tags:[]).filter(m=>typeof m=="string").map(m=>m.toLowerCase())),f=c.filter(m=>m.paths&&m.paths.length>0?!0:m.description&&(s||p.has(m.name?.toLowerCase()))?(m.descriptionOnly=!0,!0):!1),h=m=>i.get(`${String(m.method).toLowerCase()} ${m.path}`)??0,y=i.size>0;if(f.forEach(m=>{y&&(!t||t==="none")&&m.paths.sort((g,k)=>h(g)-h(k)),t!=="none"&&(t==="method"?m.paths.sort((g,k)=>{let v=o.indexOf(g.method),w=o.indexOf(k.method);return v!==-1&&w!==-1?v-w:v===-1?w===-1?g.method.localeCompare(k.method):1:-1}):t==="summary"?m.paths.sort((g,k)=>g.shortSummary.localeCompare(k.shortSummary)):t==="path"&&m.paths.sort((g,k)=>g.path.localeCompare(k.path))),m.firstPathId=m.paths[0]?.elementId||""}),a)return f.sort((m,g)=>m.name.localeCompare(g.name));if(y){let m=g=>Math.min(1/0,...g.paths.map(h));return f.sort((g,k)=>m(g)-m(k))}return f}function Gh(e,t=[]){let r=e?.["x-tagGroups"]||e?.["x-tag-groups"]||e?.["x-taggroups"];if(!r||!Array.isArray(r)||r.length===0)return[];let a=new dl,n=new Set,s=[];return r.forEach(i=>{if(!i||!i.name)return;let o=Array.isArray(i.tags)?i.tags:[],l=[];o.forEach(c=>{if(typeof c!="string")return;let d=t.find(p=>p.name===c||p.name.toLowerCase()===c.toLowerCase());d&&!l.includes(d)&&(l.push(d),n.add(d.name))}),l.length>0&&s.push({name:i.name,displayName:i["x-displayName"]||i.displayName||i.name,description:i.description||"",elementId:a.slugTagGroup(i.name),tags:l,expanded:Yn(i),xInternal:i["x-internal"]??void 0,xHidden:i["x-hidden"]??void 0})}),s}function Xh(e){if(!e||typeof e!="string")return"";try{let t=e.trim();t.startsWith("^")&&(t=t.slice(1)),t.endsWith("$")&&!t.endsWith("\\$")&&(t=t.slice(0,-1)),t=t.replace(/\((?:\?:)?([^()|]+)(?:\|[^()]+)*\)/g,"$1");let r=/(\[[^\]]+\]|\\[dwsDWS]|\\[^]|\.|[^\\[\]{}()+*?|])(?:\{(\d+)(?:,\d*)?\}|([+*?]))?/g,a="",n;for(;(n=r.exec(t))!==null;){let s=n[1],i=n[2],o=n[3],l=1;i===void 0?o==="+"?l=1:(o==="*"||o==="?")&&(l=0):l=parseInt(i,10),l=Math.min(Math.max(0,l),50);let c="a";if(s==="\\d")c="0";else if(s==="\\D")c="a";else if(s==="\\w")c="a";else if(s==="\\W")c="_";else if(s==="\\s")c=" ";else if(s==="\\S")c="a";else if(s===".")c="a";else if(s.startsWith("\\"))c=s.slice(1);else if(s.startsWith("[")){let d=s.slice(1,-1);d.startsWith("^")?c=d.includes("a")?"0":"a":/[1-9]/.test(d)&&!d.includes("0")?c="1":/[0-9]/.test(d)&&!/[a-zA-Z]/.test(d)||/[0-9]/.test(d)&&/[a-fA-F]/.test(d)&&!/[g-zG-Z]/.test(d)?c="0":/[A-Z]/.test(d)&&!/[a-z]/.test(d)?c="A":/[a-z]/.test(d)?c="a":d.length>0&&(c=d[0])}else c=s;a+=c.repeat(l)}return a||e}catch{return e}}function ce(e){if(e===void 0)return"";if(e===null)return"null";if(e==="")return"\u2205";if(typeof e=="boolean"||typeof e=="number")return`${e}`;if(Array.isArray(e))return e.map(t=>t===null?"null":t===""?"\u2205":t.toString().replace(/^ +| +$/g,r=>"\u25CF".repeat(r.length))||"").join(", ");if(typeof e=="object"){let t=Object.keys(e);return`{ ${t[0]}:${e[t[0]]}${t.length>1?",":""} ... }`}return e.toString().replace(/^ +| +$/g,t=>"\u25CF".repeat(t.length))||""}function ml(e){return e?e.format==="binary"||e.contentEncoding==="binary"||!!e.contentMediaType&&e.contentEncoding!=="base64":!1}var Yh=new Set(["title","description","example","examples","default","deprecated","readOnly","writeOnly","externalDocs"]);function Qh(e){return Object.keys(e).every(t=>Yh.has(t)||t.startsWith("x-"))}var em={integer:["int8","int16","int32","int64","uint8","uint16","uint32","uint64"],number:["float","double","decimal","decimal128"],string:["date","date-time","time","duration","email","idn-email","hostname","idn-hostname","ipv4","ipv6","uri","uri-reference","uri-template","iri","iri-reference","url","uuid","json-pointer","relative-json-pointer","regex","byte","binary","base64url","password"]};function ha(e,t="",r=""){let a=String(e||r||"").split("\u2503"),n=a.find(o=>o&&o!=="null")||a[0]||"";if(r&&/(^|┃)(enum|const)(┃|$)|^\{/.test(r))return{label:r,cssType:r,formatNote:""};if(!e||!t)return{label:a.join("\u2503"),cssType:n,formatNote:""};let s=String(t),i=!1;return{label:a.map(o=>!i&&em[o]?.includes(s.toLowerCase())?(i=!0,s):o).join("\u2503"),cssType:n,formatNote:i?"":s}}function ma(e){if(!e)return;let t="",r="",a="";if(e.$ref){let o=e.$ref.lastIndexOf("/");t=`{recursive: ${e.$ref.substring(o+1)}} `}else if(e.type)t=Array.isArray(e.type)?e.type.join("\u2503"):e.type,r=e.nullable?`${t}\u2503null`:t,(e.format||e.enum||e.const!==void 0)&&(t=t.replace("string",e.enum?"enum":e.const===void 0?e.format:"const")),e.nullable&&(t+="\u2503null");else if(e.const!==void 0)t="const";else if(e.anyOf||e.oneOf){let o=(e.anyOf||e.oneOf).filter(Boolean),l=[];o.forEach(c=>{let d=ma(c);d?.type&&d.type!=="{missing-type-info}"&&d.type.split("\u2503").forEach(p=>{let f=p.trim();f&&!l.includes(f)&&l.push(f)})}),t=l.length>0?l.join("\u2503"):"{missing-type-info}"}else t=Qh(e)?"any":"{missing-type-info}";let n=e.anyOf||e.oneOf?{...(e.anyOf||e.oneOf).find(o=>o&&o.type&&o.type!=="null")||(e.anyOf||e.oneOf)[0],...e}:e,s={type:t,baseType:r,format:e.format||n.format||"",contentMediaType:e.contentMediaType||n.contentMediaType||"",contentEncoding:e.contentEncoding||n.contentEncoding||"",contentSchema:e.contentSchema||n.contentSchema||null,pattern:(e.pattern||n.pattern)&&!e.enum&&!n.enum?e.pattern||n.pattern:"",readOrWriteOnly:e.readOnly?"\u{1F181}":e.writeOnly?"\u{1F186}":n.readOnly?"\u{1F181}":n.writeOnly?"\u{1F186}":"",deprecated:e.deprecated||n.deprecated?"\u274C":"",examples:e.examples||e.example||n.examples||n.example,default:ce(e.default===void 0?n.default:e.default),description:e.description||n.description||"",constrain:"",allowedValues:"",arrayType:"",html:""};if((s.type==="{missing-type-info}"||s.type==="any")&&(s.description=s.description||""),s.allowedValues=e.const===void 0?Array.isArray(e.enum)?e.enum.map(o=>ce(o)).join("\u2503"):n.const===void 0?Array.isArray(n.enum)?n.enum.map(o=>ce(o)).join("\u2503"):"":ce(n.const):ce(e.const),!s.allowedValues&&(e.anyOf||e.oneOf)){let o=[];(e.anyOf||e.oneOf).forEach(l=>{let c=l.const===void 0?Array.isArray(l.enum)?l.enum.map(d=>ce(d)).join("\u2503"):"":ce(l.const);c&&!o.includes(c)&&o.push(c)}),o.length>0&&(s.allowedValues=o.join("\u2503"))}let i=e.items||n.items;if((t==="array"||t.split("\u2503").includes("array"))&&i){let o=ha(Array.isArray(i?.type)?i.type.join("\u2503"):i?.type||"",i.format),l=(i.format&&!o.formatNote?o.label:"")||i.contentMediaType||o.label||"",c=ce(i.default);s.arrayType=l?`array of ${l}`:`${e.type||"array"}`,s.default||=c,s.allowedValues||=i.const===void 0?Array.isArray(i?.enum)?i.enum.map(d=>ce(d)).join("\u2503"):"":ce(i.const)}if(t.match(/integer|number/g)){let o=e.minimum===void 0?n.minimum:e.minimum,l=e.exclusiveMinimum===void 0?n.exclusiveMinimum:e.exclusiveMinimum;(o!==void 0||l!==void 0)&&(a+=o===void 0?`More than ${l}`:`Min ${o}`);let c=e.maximum===void 0?n.maximum:e.maximum,d=e.exclusiveMaximum===void 0?n.exclusiveMaximum:e.exclusiveMaximum;(c!==void 0||d!==void 0)&&(a+=c===void 0?`${a?"\u2503":""}Less than ${d}`:`${a?"\u2503":""}Max ${c}`);let p=e.multipleOf===void 0?n.multipleOf:e.multipleOf;p!==void 0&&(a+=`${a?"\u2503":""} multiple of ${p}`)}if([].concat(n.type||[]).includes("string")||t.match(/string/g)){let o=e.minLength===void 0?n.minLength:e.minLength,l=e.maxLength===void 0?n.maxLength:e.maxLength;o!==void 0&&l!==void 0?a+=`${a?"\u2503":""}${o} to ${l} chars`:o===void 0?l!==void 0&&(a+=`${a?"\u2503":""}Max ${l} chars`):a+=`${a?"\u2503":""}Min ${o} chars`}return s.constrain=a,s.html=`${s.type}~|~${s.readOrWriteOnly}~|~${s.constrain}~|~${s.default}~|~${s.allowedValues}~|~${s.pattern}~|~${s.description}~|~${e.title||""}~|~${s.deprecated?"deprecated":""}`,s}function xe(e){if(typeof e=="object"&&e&&!Array.isArray(e)){if(e.value!==void 0)return{Example:{...e}};let t=Object.entries(e).filter(([r,a])=>a?.value!==void 0);return t.length===0?void 0:Object.fromEntries(t)}return Array.isArray(e)?e.reduce((t,r,a)=>(t[`Example${a+1}`]={value:r},t),{}):e?{Example:{value:e}}:void 0}function fl(e,t="string"){if(!e)return{exampleVal:"",exampleList:[]};if(e.constructor===Object){let r=Object.values(e).filter(a=>a["x-example-show-value"]!==!1).map(a=>({value:typeof a.value=="boolean"||typeof a.value=="number"?`${a.value}`:a.value||"",printableValue:ce(a.value),summary:a.summary||"",description:a.description||""}));return{exampleVal:r.length>0?r[0].value:"",exampleList:r}}if(Array.isArray(e)||(e=e?[e]:[]),e.length===0)return{exampleVal:"",exampleList:[]};if(t==="array"){let[r]=e;return{exampleVal:r,exampleList:e.map(a=>({value:a,printableValue:ce(a)}))}}return{exampleVal:e[0].toString(),exampleList:e.map(r=>({value:r.toString(),printableValue:ce(r)}))}}function gl(e){return e.some(t=>t.summary?.length>0||t.description?.length>0)}function Fe(e){let t;return e&&(t=e.examples&&e.examples.length>=1?e.examples[0]:e.example),t}function Qn(e){let t=Fe(e);if(t==="")return"";if(t===null)return null;if(t===0)return 0;if(t===!1)return!1;if(t instanceof Date)switch(e.format.toLowerCase()){case"date":return t.toISOString().split("T")[0];case"time":return t.toISOString().split("T")[1];default:return t.toISOString()}if(t)return t;if(Object.keys(e).length===0)return null;if(e.$ref)return{};if(e.const===!1||e.const===0||e.const===null||e.const===""||e.const)return e.const;if(e.default)return e.default;let r=Array.isArray(e.type)?e.type[0]:e.type;if(!r)return null;if(r.match(/^integer|^number/g)){let a=Number.isNaN(Number(e.multipleOf))?void 0:Number(e.multipleOf),n=Number.isNaN(Number(e.maximum))?void 0:Number(e.maximum),s=Number.isNaN(Number(e.minimum))?Number.isNaN(Number(e.exclusiveMinimum))?n||0:Number(e.exclusiveMinimum)+(r.startsWith("integer")?1:.001):Number(e.minimum);return a?a>=s?a:s%a===0?s:Math.ceil(s/a)*a:s}if(r.match(/^boolean/g))return!1;if(r.match(/^null/g))return null;if(r.match(/^string/g)){if(e.enum)return e.enum[0];if(e.const)return e.const;if(e.pattern)try{return Xh(e.pattern)}catch{return e.pattern}if(e.contentEncoding)switch(e.contentEncoding.toLowerCase()){case"base64":return"ZXhhbXBsZQ==";case"binary":case"7bit":case"8bit":case"quoted-printable":return"string"}if(e.contentMediaType){if(e.contentMediaType.toLowerCase()==="application/json"){if(e.contentSchema){let a=de(e.contentSchema),n=a?.["example-0"]??a;return JSON.stringify(n)}return"{}"}if(e.contentMediaType.startsWith("text/"))return"text content"}if(e.format)switch(e.format.toLowerCase()){case"url":case"uri":return"http://example.com";case"date":return new Date(0).toISOString().split("T")[0];case"time":return new Date(0).toISOString().split("T")[1];case"date-time":return new Date(0).toISOString();case"duration":return"P3Y6M4DT12H30M5S";case"email":case"idn-email":return"user@example.com";case"hostname":case"idn-hostname":return"www.example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"uuid":return"3fa85f64-5717-4562-b3fc-2c963f66afa6";case"byte":case"base64":return"ZXhhbXBsZQ==";case"binary":return"binary";default:return""}else{let a=Number.isNaN(e.minLength)?void 0:Number(e.minLength),n=Number.isNaN(e.maxLength)?void 0:Number(e.maxLength),s=a||(n>6?6:n||void 0);return s?"A".repeat(s):"string"}}return null}function es(e,t=1){if(e==null)return"";let r="  ".repeat(t),a="";if(typeof e!="object")return`
${r}${e.toString()}`;for(let n in e){if(n.startsWith("::"))continue;let s=e[n],i=n;Array.isArray(s)?i=s["::XML_TAG"]||s[0]?.["::XML_TAG"]||n:s&&typeof s=="object"?i=s["::XML_TAG"]||n:Array.isArray(e)&&e["::XML_TAG"]&&(i=e["::XML_TAG"]),a=s==null?`${a}
${r}<${i}></${i}>`:Array.isArray(s)||typeof s=="object"?`${a}
${r}<${i}>${es(s,t+1)}
${r}</${i}>`:`${a}
${r}<${i}>${s.toString()}</${i}>`}return a}function gr(e,t){typeof t=="object"&&t&&(e.title&&(t["::TITLE"]=e.title),e.description&&(t["::DESCRIPTION"]=e.description),e.xml?.name&&(t["::XML_TAG"]=e.xml?.name),e.xml?.wrapped&&(t["::XML_WRAP"]=e.xml?.wrapped.toString()))}function yl(e){if(typeof e=="object"&&e){delete e["::TITLE"],delete e["::DESCRIPTION"],delete e["::XML_TAG"],delete e["::XML_WRAP"];for(let t in e)yl(e[t])}}function fa(e,t,r){if(!e||typeof e!="object")return e;let a=r&&typeof r=="object"&&"example-0"in r?r["example-0"]:r&&typeof r=="object"&&Object.keys(r).length>0&&!Array.isArray(r)?Object.values(r)[0]:r;for(let n in e)e[n]&&typeof e[n]=="object"&&(e[n][t]=a);return e}var tm=new Set(["readOnly","writeOnly","deprecated","nullable"]),rm=new Set(["title","description"]),bl=["type","properties","patternProperties","additionalProperties","items","enum","const","format"],vl=new WeakMap;function ga(e,t){let r={...e};return t.forEach(a=>delete r[a]),r}function xl(e,t){let r={};return t.forEach(a=>{e[a]!==void 0&&(r[a]=e[a])}),r}var ts=new Set;function wl(e,t){return e===t||!e||typeof e!="object"?t:!t||typeof t!="object"?e:$e({allOf:[e,t]})}function rs(e,t,r){for(let a in t){let n=t[a];if(!(a==="allOf"||n===void 0||a==="x-ref"&&!r))if(a==="required")Array.isArray(n)&&(e.required=[...new Set([...e.required||[],...n])]);else if(a==="properties"||a==="patternProperties"){let s={...e[a]};for(let i in n)s[i]=i in s?wl(s[i],n[i]):n[i];e[a]=s}else a==="items"||a==="additionalProperties"?e[a]=typeof e[a]=="object"&&typeof n=="object"?wl(e[a],n):n:tm.has(a)?e[a]=!!(e[a]||n):rm.has(a)?n!==""&&(r||e[a]===void 0)&&(e[a]=n):e[a]=n}}function $e(e){if(!e||typeof e!="object"||!Array.isArray(e.allOf))return e;let t=vl.get(e);if(t)return t;if(ts.has(e))return ga(e,["allOf"]);ts.add(e);try{let r={},a=[],n=[...e.allOf,ga(e,["allOf"])];n.forEach((o,l)=>{if(!o||typeof o!="object")return;let c=l===n.length-1,d=$e(o);if(d.allOf)rs(r,d,c),a.push(...d.allOf.slice(1));else if(d.oneOf||d.anyOf){let p=[d.oneOf?"oneOf":"anyOf","discriminator"];rs(r,ga(d,p),c),a.push(xl(d,[...p,"title","description"]))}else rs(r,d,c)});let s=bl.some(o=>r[o]!==void 0);r.$ref&&s&&delete r.$ref;let i=r;return a.length>0&&(i=a.length===1&&!s?{...a[0],...r}:{...r,allOf:[xl(r,[...bl,"required"]),...a]}),vl.set(e,i),i}finally{ts.delete(e)}}function am(e){return!!(e.allOf||e.type==="object"||e.properties||e.patternProperties||e.additionalProperties&&typeof e.additionalProperties=="object")}function de(e,t={},r=0){let a={};if(!(!e||r>8)){if(e.allOf&&!am($e(e))&&(e=$e(e)),e.allOf){let n={};[...e.allOf,ga(e,["allOf"])].forEach(s=>{if(s){if(s.type==="object"||s.properties||s.allOf||s.anyOf||s.oneOf){let i=de(s,t,r+1),o=i?.["example-0"]??i;o&&typeof o=="object"&&!Array.isArray(o)&&Object.assign(n,o)}else if(s.type==="array"||s.items){let i=de(s,t,r+1),o=i?.["example-0"]??i;Array.isArray(o)&&(n[Object.keys(n).length]=o)}else if(s.type){let i=`prop${Object.keys(n).length}`;n[i]=Qn(s)}}}),a={"example-0":n},gr(e,a["example-0"])}else if(e.oneOf){let n={};if(e.properties)for(let s in e.properties){let i=e.properties[s],o=$e(i);if(o?.properties||o?.items){let l=de(i,t,r+1);n[s]=l?.["example-0"]??l}else n[s]=Qn(o)}if(e.oneOf.length>0){let s=r===0?e.oneOf:[e.oneOf[0]],i=0;for(let o=0;o<s.length;o++){let l=s[o],c=de(l,t,r+1);for(let d in c){let p=c[d];if(Object.keys(n).length>0&&p&&typeof p=="object"&&!Array.isArray(p)&&(p={...n,...p}),a[`example-${i}`]=p,gr(l,a[`example-${i}`]),i++,r>0)break}}}}else if(e.anyOf){let n={"example-0":{}};if(e.type==="object"||e.properties)for(let s in e.properties){let i=e.properties[s],o=$e(i);if(o?.deprecated&&!t.includeDeprecated||o?.readOnly&&!t.includeReadOnly||o?.writeOnly&&!t.includeWriteOnly)continue;let l=Fe(i);l===void 0?fa(n,s,de(i,t,r+1)):n["example-0"][s]=l}if(e.anyOf.length>0){let s=r===0?e.anyOf:[e.anyOf[0]],i=0;for(let o=0;o<s.length;o++){let l=s[o],c=de(l,t,r+1);for(let d in c){let p=c[d];if(n?.["example-0"]&&Object.keys(n["example-0"]).length>0?a[`example-${i}`]={...n["example-0"],...typeof p=="object"?p:{}}:a[`example-${i}`]=p,gr(l,a[`example-${i}`]),i++,r>0)break}}}}else if(e.type==="object"||e.properties){a["example-0"]={},gr(e,a["example-0"]);let n=Fe(e);if(n!==void 0)a["example-0"]=n;else{for(let s in e.properties){let i=e.properties[s],o=$e(i);if(o&&(!o.deprecated||t.includeDeprecated)&&(!o.readOnly||t.includeReadOnly)&&(!o.writeOnly||t.includeWriteOnly))if(o.type==="array"||o.items){let l=Fe(o);if(l!==void 0)a["example-0"][s]=l;else if(Fe(o.items)!==void 0)a["example-0"][s]=[Fe(o.items)];else{let c=de(o.items,t,r+1),d=c?.["example-0"]??c;if(t.useXmlTagForProp){let p=o.xml?.name||s;o.xml?.wrapped?a["example-0"][p]={[p]:d}:a["example-0"][p]=[d]}else a["example-0"][s]=[d]}}else fa(a,s,de(i,t,r+1))}if(typeof e.additionalProperties=="object"&&e.additionalProperties!==null){let s=e.additionalProperties["x-additionalPropertiesName"]||"property";fa(a,`${s}1`,de(e.additionalProperties,t,r+1)),fa(a,`${s}2`,de(e.additionalProperties,t,r+1))}}}else if(e.type==="array"||e.items){let n=Fe(e);if(n!==void 0)a["example-0"]=n;else if(e.items){let s=Fe(e.items);if(s!==void 0)a["example-0"]=[s];else{let i=de(e.items,t,r+1),o=i?.["example-0"]??i;a["example-0"]=[o],gr(e.items,a["example-0"])}}else a["example-0"]=[]}else return{"example-0":Qn(e)};return a}}function as(e,t=0){let r="";e.title?r=e.description?`<b>${e.title}:</b> ${e.description}`:e.title:e.description&&(r=e.description);let a=[];e.minItems&&a.push(`<span class="descr-label">Min Items:</span> <span class="descr-value">${e.minItems}</span>`),e.maxItems&&a.push(`<span class="descr-label">Max Items:</span> <span class="descr-value">${e.maxItems}</span>`),e.uniqueItems===!0&&a.push('<span class="descr-label">Must have unique items</span>');let n=r?[r.trim()]:[];if(a.length>0&&n.push(`<div class="item-details">${a.join(" ")}</div>`),t>0&&e.items?.description){let s="";e.items.minProperties&&(s=`<span class="descr-label">Min Properties:</span> <span class="descr-value">${e.items.minProperties}</span>`),e.items.maxProperties&&(s=`${s} <span class="descr-label">Max Properties:</span> <span class="descr-value">${e.items.maxProperties}</span>`),n.push(`\u2B95 ${s} [ ${e.items.description} ]`)}return n.join(`

`)}function ns(e,t,r,a){let n=e.nullable||Array.isArray(e.type)&&e.type.includes("null")||!1,s=[];if(e.properties)for(let l in e.properties){let c=Array.isArray(e.required)&&e.required.includes(l),d=se(e.properties[l],t+1,l,c);d&&s.push(d)}let i=[];if(e.patternProperties)for(let l in e.patternProperties){let c=se(e.patternProperties[l],t+1,`[pattern: ${l}]`,!1);c&&i.push(c)}let o=null;return e.additionalProperties&&typeof e.additionalProperties=="object"&&(o=se(e.additionalProperties,t+1,"[any-key]",!1)),{kind:"object",name:r,title:e.title||"",description:as(e,t),required:a,deprecated:e.deprecated||!1,readOnly:e.readOnly||!1,writeOnly:e.writeOnly||!1,nullable:n,dataTypeLabel:n?"object \u2503 null":"object",properties:s,patternProperties:i,additionalProperties:o}}function ss(e,t,r,a){let n=e.nullable||Array.isArray(e.type)&&e.type.includes("null")||!1,s=null;e.items&&(s=se(e.items,t+1,"",!1));let i="";return e.items?.items?i=e.items.items.type||"":e.items?.type&&typeof e.items.type=="string"&&(i=e.items.type),{kind:"array",name:r,title:e.title||"",description:as(e,t),required:a,deprecated:e.deprecated||!1,readOnly:e.readOnly||!1,writeOnly:e.writeOnly||!1,nullable:n,dataTypeLabel:n?"array \u2503 null":"array",arrayType:i,minItems:e.minItems,maxItems:e.maxItems,uniqueItems:e.uniqueItems||!1,items:s}}function is(e,t,r){let a=ma(e)||{},n=a.type||e.type||"",s=a.format||e.format||"",i=ha(a.baseType,s,n);return{kind:"primitive",name:t,type:n,typeLabel:i.label,typeCss:i.cssType,formatNote:i.formatNote,format:s,contentMediaType:a.contentMediaType||e.contentMediaType||"",contentEncoding:a.contentEncoding||e.contentEncoding||"",contentSchema:a.contentSchema||e.contentSchema||null,pattern:a.pattern||e.pattern||"",constraints:a.constrain||"",defaultValue:a.default!==void 0&&a.default!==""?String(a.default):"",allowedValues:a.allowedValues||"",description:(e.description||a.description||"").trim(),title:(e.title||"").trim(),required:r,deprecated:e.deprecated||!!a.deprecated,readOnly:e.readOnly||a.readOrWriteOnly==="\u{1F181}",writeOnly:e.writeOnly||a.readOrWriteOnly==="\u{1F186}",html:a.html||""}}var kl=8,$l=8e3,Sl=4;function Al(e){let t=Array.isArray(e.type)?e.type:[e.type];return t.includes("object")||t.includes("array")||!!(e.properties||e.patternProperties||e.items)||!!e.additionalProperties&&typeof e.additionalProperties=="object"||!!e.allOf?.some(r=>r&&Al(r))}var ya=new Set,yr=kl,ba=0;function se(e,t=0,r="",a=!1,n=""){if(!e)return null;if(ya.size>0)return El(e,t,r,a,n);for(yr=kl;;--yr){ba=0;let s=El(e,t,r,a,n);if(ba<=$l||yr<=Sl)return s}}function El(e,t,r,a,n){if(!e)return null;ba+=1;let s=ba>$l&&yr>Sl;if(ya.has(e)||(t>yr||s)&&Al(e)){let i=e.type==="array"||Array.isArray(e.type)&&e.type.includes("array")||!!e.items;return{kind:i?"array":"object",name:r,type:i?"array":"object",title:e.title||"",description:e.description||"",required:a,truncated:!0}}ya.add(e);try{return nm(e,t,r,a,n)}finally{ya.delete(e)}}function nm(e,t,r,a,n){if(e.allOf){let s=$e(e);if(!s.allOf)return se(s,t,r,a,n);e=s;let i=[],o=[],l=null,c=[],d=e.title||"",p=e.description||"",f=e.deprecated||!1,h=e.readOnly||!1,y=e.writeOnly||!1,m=e.nullable||!1;return e.allOf.forEach((g,k)=>{if(g.title&&!d&&(d=g.title),g.description&&!p&&(p=g.description),g.deprecated&&(f=!0),g.readOnly&&(h=!0),g.writeOnly&&(y=!0),g.nullable&&(m=!0),g.type==="object"||g.properties||g.allOf||g.anyOf||g.oneOf){let v=se(g,t,"",!1,(g.anyOf||g.oneOf)&&k>0?`${k}`:"");v&&(v.kind==="object"?(v.properties&&i.push(...v.properties),v.patternProperties&&o.push(...v.patternProperties),v.additionalProperties&&(l=v.additionalProperties)):v.kind==="union"&&c.push(v))}else if(g.type==="array"||g.items){let v=se(g,t);v&&i.push(v)}else if(g.type){let v=`prop${i.length}`;i.push(se(g,t,v,!1))}}),{kind:"object",name:r,title:d,description:as({...e,title:d,description:p},t),required:a,deprecated:f,readOnly:h,writeOnly:y,nullable:m,dataTypeLabel:m?"object \u2503 null":"object",properties:i,patternProperties:o,additionalProperties:l,unions:c}}if(e.anyOf||e.oneOf){let s=e.anyOf?"anyOf":"oneOf",i=(e.anyOf||e.oneOf).map((l,c)=>{let d=l.title||"",p=se(l,t,d||`Option ${c+1}`,!1);return p&&(p.readOnly=!1,p.writeOnly=!1,p.optionIndex=c+1,p.optionTitle=d,p.kind==="primitive"&&!d&&(p.name="")),p}).filter(Boolean),o=[];if((e.type==="object"||e.properties)&&e.properties)for(let l in e.properties){let c=Array.isArray(e.required)&&e.required.includes(l),d=se(e.properties[l],t+1,l,c);d&&o.push(d)}return{kind:"union",operator:s,name:r,suffix:n,title:e.title||"",description:e.description||"",required:a,properties:o,options:i}}if(Array.isArray(e.type)){if(e.type.length===2&&e.type.includes("null")){if(e.type.includes("object"))return ns(e,t,r,a);if(e.type.includes("array"))return ss(e,t,r,a)}let s=typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e)),i=[],o=[];if(s.type.forEach(l=>{l.match(/integer|number|string|null|boolean/g)?i.push(l):l==="array"&&typeof s.items?.type=="string"&&s.items?.type.match(/integer|number|string|null|boolean/g)?s.items.type==="string"&&(s.items.format||s.items.contentMediaType)?i.push(`[${s.items.format||s.items.contentMediaType}]`):i.push(`[${s.items.type}]`):o.push(l)}),o.length===0&&i.length>0)return s.type=i.join("\u2503"),is(s,r,a);if(o.length>0){let l=[],c=1;if(o.forEach(d=>{if(d==="object"){let p=ns(e,t,e.title||`Option ${c}`,!1);p.optionIndex=c++,p.optionTitle=e.title||"",l.push(p)}else if(d==="array"){let p=ss(e,t,e.title||`Option ${c}`,!1);p.optionIndex=c++,p.optionTitle=e.title||"",l.push(p)}}),i.length>0){s.type=i.join("\u2503");let d=is(s,`Option ${c}`,!1);d.optionIndex=c++,l.push(d)}return{kind:"union",operator:"oneOf",name:r,title:e.title||"",description:e.description||"",required:a,options:l}}}return e.type==="object"||e.properties?ns(e,t,r,a):e.type==="array"||e.items?ss(e,t,r,a):is(e,r,a)}function os(e,t="",r="json"){let a=e,n="text";if(t?.toLowerCase().includes("json"))if(r==="text")a=typeof e=="string"?e:JSON.stringify(e,void 0,2),n="text";else if(typeof e=="object"&&e)a=e,n="json";else if(typeof e=="string")try{a=JSON.parse(e),n="json"}catch{a=e,n="text"}else a=e,n="json";else a=typeof e=="object"&&e?JSON.stringify(e,void 0,2):String(e??""),n="text";return{content:a,format:n}}function Nt(e,t="",r=null,a=null,n=!0,s=!0,i="json",o=!1){let l=[],c=t?.toLowerCase().includes("json"),d=t?.toLowerCase().includes("xml");if(r&&typeof r=="object"&&Object.keys(r).length>0)for(let p in r){let{content:f,format:h}=os(r[p]?.value===void 0?r[p]:r[p].value,t,i);l.push({exampleId:p,exampleSummary:r[p]?.summary||p,exampleDescription:r[p]?.description||"",exampleType:t,exampleValue:f,exampleFormat:h})}else if(a!=null&&(typeof a!="object"||Object.keys(a).length>0)){let{content:p,format:f}=os(a?.value===void 0?a:a.value,t,i);l.push({exampleId:"Example",exampleSummary:a?.summary||"",exampleDescription:a?.description||"",exampleType:t,exampleValue:p,exampleFormat:f})}if(l.length===0||o===!0)if(e){let p=Fe(e);if(p!=null){let{content:f,format:h}=os(p,t,i);l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:f,exampleFormat:h})}else if(c||d||t?.toLowerCase().includes("text")||t?.toLowerCase().includes("yaml")||t?.toLowerCase().includes("*/*")){let f="",h="",y=i;d&&(f=e.xml?.name?`<${e.xml.name}${e.xml.namespace?` xmlns="${e.xml.namespace}"`:""}>`:"<root>",h=e.xml?.name?`</${e.xml.name}>`:"</root>",y="text");let m=de(e,{includeReadOnly:n,includeWriteOnly:s,deprecated:!0,useXmlTagForProp:d}),g=0;for(let k in m){if(!m[k])continue;let v=m[k]["::TITLE"]||`Example ${++g}`,w=m[k]["::DESCRIPTION"]||"",b="";d?b=`<?xml version="1.0" encoding="UTF-8"?>
${f}${es(m[k],1)}
${h}`:(yl(m[k]),b=i==="text"?JSON.stringify(m[k],null,2):m[k]),l.push({exampleId:k,exampleSummary:v,exampleDescription:w,exampleType:t,exampleFormat:y,exampleValue:b})}}else t?.toLowerCase().includes("jose")?l.push({exampleId:"Example",exampleSummary:"Base64 Encoded",exampleDescription:"",exampleType:t,exampleValue:e.pattern||"bXJpbg==",exampleFormat:"text"}):l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:"",exampleFormat:"text"})}else l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:"",exampleFormat:"text"});return l}function sm(e){return e==="application/json"?"json":e==="application/xml"?"xml":null}function Bt(e){return e?.exampleSummary||e?.exampleId||""}function im(e){if(e.schema)return[e.schema,null,null];if(e.content){for(let t of Object.keys(e.content))if(e.content[t].schema)return[e.content[t].schema,sm(t),e.content[t]]}return[null,null,null]}var ls=Object.freeze([]);function om(e){return!e||typeof e!="object"?{}:{...$e(e).properties}}function lm(e){if(!e||typeof e!="object")return[];let{required:t}=$e(e);return Array.isArray(t)?[...t]:[]}var cs={200:"OK",201:"Created",202:"Accepted",204:"No Content",301:"Moved Permanently",302:"Found",304:"Not Modified",400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",409:"Conflict",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},zt=null,Pt=null,br=null,va=null,je=new Map,ds=Symbol("rapidoc-mock");function Dl(e){if(e&&typeof e=="object"){let r={};for(let[a,n]of Object.entries(e)){let s=a.trim();s&&n&&(r[s==="*"?"*":s.replace(/^(\w+)\s+/,(i,o)=>`${o.toUpperCase()} `)]=String(n))}return r}let t=typeof e=="string"?e.trim():"";if(t.startsWith("{"))try{return Dl(JSON.parse(t))}catch{return""}return t}function cm(e,t){return!e||typeof e=="string"?e||"":e[t]??e["*"]??""}function Cl(e={},t={}){return{statusCode:e.statusCode===void 0?t.statusCode||"":Dl(e.statusCode),statusStrategy:e.statusStrategy===void 0?t.statusStrategy||"first":e.statusStrategy||"first",delay:e.delay===void 0?t.delay||0:Number(e.delay)||0,log:e.log===void 0?t.log!==!1:e.log!=="false"}}function Tl(e=[]){let t=new Map;return t.set("|",{origin:null,base:""}),e.forEach(r=>{let a=r.computedUrl||r.url||"";if(a)try{if(a.startsWith("http://")||a.startsWith("https://")){let n=new URL(a),s=n.pathname.replace(/\/+$/,"");t.set(`${n.origin}|${s}`,{origin:n.origin,base:s})}else{let n=a.replace(/\/+$/,"");n&&t.set(`|${n}`,{origin:null,base:n.startsWith("/")?n:`/${n}`})}}catch{}}),Array.from(t.values())}function dm(e,t=""){let r=((t.endsWith("/")?t.slice(0,-1):t)+(e.startsWith("/")?e:`/${e}`)).replace(/\{([a-zA-Z0-9_-]+)\}/g,"__PARAM_$1__").replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").replace(/__PARAM_([a-zA-Z0-9_-]+)__/g,"(?<$1>[^/?#]+)");return RegExp(`^${r}(?:\\/)?$`)}function pm(e){let t=[],r=Tl(e?.servers);if(!e?.tags||!Array.isArray(e.tags))return t;let a=new Set;return e.tags.forEach(n=>{(n.paths||[]).forEach(s=>{let i=(s.method||"GET").toUpperCase(),o=s.path||"",l=`${i} ${o}`;if(a.has(l))return;a.add(l);let c=(s.servers?.length>0?Tl(s.servers):r).map(({origin:d,base:p})=>({regex:dm(o,p),origin:d,base:p}));t.push({method:i,pathTemplate:o,routeKey:l,patterns:c,responses:s.responses||{},parameters:s.parameters||[]})})}),t}function Ol(e,t){if(!je.size||!t)return null;let r;try{let i=typeof window<"u"&&window.location?.href?window.location.href:"http://localhost";r=new URL(t,i)}catch{return null}let a=(e||"GET").toUpperCase(),n=decodeURI(r.pathname),s=null;for(let i of je.values())for(let o of i.routes)if(o.method===a)for(let l of o.patterns){let c=n.match(l.regex);if(!c)continue;let d=+!!l.base+(l.origin&&l.origin===r.origin?1:0);(!s||d>s.rank)&&(s={mock:i,route:o,rank:d,pathParams:c.groups||{},url:r})}return s}function um(e,t,r,a={},n){let s=(e||"").split(",").map(i=>i.trim()).filter(Boolean);if(s.length===0)return Object.keys(a).find(i=>i.startsWith("2"))||("default"in a?"default":Object.keys(a)[0]||"200");if(t==="random")return s[Math.floor(Math.random()*s.length)];if(t==="cycle"&&n){let i=n.get(r)||0,o=s[i%s.length];return n.set(r,(i+1)%s.length),o}return s[0]}function hm(e,t){let r=e.responses?.[t]||e.responses?.[String(t)]||e.responses?.default,a={"X-Mock-Server":"RapiDoc","Access-Control-Allow-Origin":"*"},n="",s="application/json";if(r?.content){let i=Object.keys(r.content);s=i.find(l=>l.includes("json"))||i.find(l=>l.includes("xml"))||i.find(l=>l.includes("text"))||i[0]||"application/json";let o=r.content[s];if(o){if(o.example!==void 0)n=typeof o.example=="object"?JSON.stringify(o.example,null,2):String(o.example);else if(o.examples&&Object.keys(o.examples).length>0){let l=Object.values(o.examples)[0]?.value;l!==void 0&&(n=typeof l=="object"?JSON.stringify(l,null,2):String(l))}if(!n&&o.schema){let l=Nt(o.schema,s,null,null,!0,!1,"text",!0);if(l&&l.length>0){let c=l[0].exampleValue;n=typeof c=="object"?JSON.stringify(c,null,2):String(c)}}}}if(!n)if(String(t)==="204")n="";else if(s.includes("json")){let i=Number(t)||200;n=JSON.stringify({status:i,message:cs[i]||"Mock Response"},null,2)}else n=cs[Number(t)]||"OK";return r?.headers&&Object.entries(r.headers).forEach(([i,o])=>{o.schema?.default===void 0?o.example!==void 0&&(a[i]=String(o.example)):a[i]=String(o.schema.default)}),String(t)!=="204"&&(a["Content-Type"]=s),{statusCode:Number(t)||200,statusText:cs[Number(t)]||(t==="default"?"OK":"Mock Response"),headers:a,body:n}}function Fl(e){let{config:t,cycle:r}=e.mock,a=um(cm(t.statusCode,e.route.routeKey),t.statusStrategy,e.route.routeKey,e.route.responses,r);return{config:t,statusCode:a,payload:hm(e.route,a)}}function xa(e,t={}){let r=t.owner||ds,a=je.get(r);je.set(r,{routes:pm(e),config:Cl(t,a?.config),cycle:new Map}),typeof window<"u"&&(!zt&&window.fetch&&(zt=window.fetch,window.fetch=async function(n,s={}){if(!je.size)return zt.apply(this,arguments);let i="",o="GET";typeof n=="string"?(i=n,o=s?.method||"GET"):n instanceof URL?(i=n.href,o=s?.method||"GET"):n&&typeof n=="object"&&"url"in n&&(i=n.url,o=s?.method||n.method||"GET");let l=Ol(o,i);if(!l)return zt.apply(this,arguments);let{config:c,payload:d}=Fl(l);return c.delay>0&&await new Promise(p=>setTimeout(p,c.delay)),c.log,new Response(d.body,{status:d.statusCode,statusText:d.statusText,headers:d.headers})}),!Pt&&window.XMLHttpRequest&&(Pt=window.XMLHttpRequest.prototype.open,br=window.XMLHttpRequest.prototype.send,va=window.XMLHttpRequest.prototype.setRequestHeader,window.XMLHttpRequest.prototype.open=function(n,s,...i){return this._mockMethod=n,this._mockUrl=s,this._mockHeaders={},Pt.apply(this,[n,s,...i])},window.XMLHttpRequest.prototype.setRequestHeader=function(n,s){return this._mockHeaders&&(this._mockHeaders[n]=s),va.apply(this,arguments)},window.XMLHttpRequest.prototype.send=function(){if(!je.size)return br.apply(this,arguments);let n=Ol(this._mockMethod,this._mockUrl);if(!n)return br.apply(this,arguments);let{config:s,payload:i}=Fl(n),o=s.delay>0?s.delay:10;setTimeout(()=>{s.log,Object.defineProperty(this,"readyState",{value:4,writable:!0}),Object.defineProperty(this,"status",{value:i.statusCode,writable:!0}),Object.defineProperty(this,"statusText",{value:i.statusText,writable:!0}),Object.defineProperty(this,"responseText",{value:i.body,writable:!0}),Object.defineProperty(this,"response",{value:i.body,writable:!0});let l=Object.entries(i.headers).map(([c,d])=>`${c}: ${d}\r
`).join("");this.getAllResponseHeaders=()=>l,this.getResponseHeader=c=>{let d=c.toLowerCase(),p=Object.keys(i.headers).find(f=>f.toLowerCase()===d);return p?i.headers[p]:null},this.dispatchEvent(new Event("readystatechange")),this.dispatchEvent(new Event("load")),this.dispatchEvent(new Event("loadend")),typeof this.onreadystatechange=="function"&&this.onreadystatechange(),typeof this.onload=="function"&&this.onload()},o)}))}function wa(e=ds){je.delete(e),je.size||typeof window<"u"&&(zt&&=(window.fetch=zt,null),Pt&&(window.XMLHttpRequest.prototype.open=Pt,window.XMLHttpRequest.prototype.send=br,window.XMLHttpRequest.prototype.setRequestHeader=va,Pt=null,br=null,va=null))}function jl(e={}){let t=je.get(e.owner||ds);t&&(t.config=Cl(e,t.config))}var Me={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ka=e=>(...t)=>({_$litDirective$:e,values:t}),$a=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}},ps=class extends $a{constructor(e){if(super(e),this.it=F,e.type!==Me.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===F||e==null)return this._t=void 0,this.it=e;if(e===ie)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ps.directiveName="unsafeHTML",ps.resultType=1;var M=ka(ps),Rl;function H(e){if(typeof e!="string")return"";if(typeof window<"u"&&window.Sanitizer&&Element.prototype.setHTML)try{let n=document.createElement("div");return Rl??=new window.Sanitizer({allowAttributes:{"*":["*"]}}),n.setHTML(e,{sanitizer:Rl}),n.innerHTML}catch{}let t;if(typeof DOMParser<"u")t=new DOMParser().parseFromString(e,"text/html");else return e;let r=t.querySelectorAll("script");for(let n=r.length-1;n>=0;n--)r[n].parentNode.removeChild(r[n]);let a=t.querySelectorAll("*");for(let n=0;n<a.length;n++){let s=a[n];for(let i=s.attributes.length-1;i>=0;i--){let o=s.attributes[i],l=o.name.toLowerCase(),c=o.value.toLowerCase();(l.startsWith("on")||(l==="href"||l==="src")&&(c.includes("javascript:")||c.includes("data:text/html")))&&s.removeAttribute(o.name)}}return t.body.innerHTML}function mm(e="",t={}){let r=e;if(!t||typeof t!="object")return r;for(let[a,n]of Object.entries(t)){let s=n==null?"":String(n),i=`{${a}}`;r=r.replaceAll(i,encodeURIComponent(s))}return r}function fm(e,t){if(typeof e!="string")return e;let r=String(t).split(","),a=e.trim();return(r.includes("integer")||r.includes("number"))&&a!==""&&Number.isFinite(Number(a))?Number(a):r.includes("boolean")&&(a==="true"||a==="false")?a==="true":e}function _l(e,t,r={}){let{style:a="form",explode:n=a==="form",isArray:s=Array.isArray(t),isObject:i=!1,itemType:o=""}=r;if(t==null||t==="")return[];if(i||typeof t=="object"&&!Array.isArray(t)){let l=t;if(typeof t=="string")try{l=JSON.parse(t)}catch{return[]}if(!l||typeof l!="object")return[];if(a==="json")return[[e,JSON.stringify(l)]];if(a==="xml")return[[e,es(l)]];let c=[];for(let d of Object.keys(l)){let p=l[d];if(p!=null)if(Array.isArray(p)){let f=p.filter(h=>h!==""&&h!=null);f.length>0&&c.push([d,f.map(String)])}else c.push([d,[typeof p=="object"?JSON.stringify(p):String(p)]])}if(a==="deepObject")return c.flatMap(([d,p])=>p.map(f=>[`${e}[${d}]`,f]));if(!n||a==="spaceDelimited"||a==="pipeDelimited"){if(c.length===0)return[];let d=a==="spaceDelimited"?" ":a==="pipeDelimited"?"|":",";return[[e,c.map(([p,f])=>[p,f.join(",")].join(d)).join(d)]]}return c.flatMap(([d,p])=>p.map(f=>[d,f]))}if(s||Array.isArray(t)){let l=(Array.isArray(t)?t:[t]).filter(c=>c!==""&&c!=null);return l.length===0?[]:a==="json"?[[e,JSON.stringify(l.map(c=>fm(c,o)))]]:a==="spaceDelimited"?[[e,l.join(" ")]]:a==="pipeDelimited"?[[e,l.join("|")]]:n?l.map(c=>[e,String(c)]):[[e,l.join(",")]]}return[[e,String(t)]]}function gm(e){return encodeURI(e).replace(/&/g,"%26").replace(/=/g,"%3D").replace(/\+/g,"%2B")}function ym(e=[]){if(!Array.isArray(e)||e.length===0)return"";let t=[];for(let r of e){let{name:a,value:n,style:s="form",explode:i=s==="form",allowReserved:o=!1,isArray:l=!1,isObject:c=!1,itemType:d=""}=r,p=_l(a,n,{style:s,explode:i,isArray:l,isObject:c,itemType:d});for(let[f,h]of p){let y=encodeURIComponent(f),m=o?gm(h):encodeURIComponent(h);t.push(`${y}=${m}`)}}return t.join("&")}function bm(e,t="oauth-receiver.html"){if(/^[a-z][a-z0-9+.-]*:/i.test(t))return new URL(t);if(t.startsWith("/"))return new URL(t,e.origin);let r=e.pathname.substring(0,e.pathname.lastIndexOf("/"));return new URL(`${e.origin}${r}/${t}`)}function vm(e="",t=""){return`${(e||"").replace(/\/+$/,"")}${t?`/${t.replace(/^\/+/,"")}`:""}`}function xm({serverUrl:e="",path:t="",pathParams:r={},queryParams:a=[],apiKeys:n=[]}={}){let s=mm(t,r),i=ym(a);return i&&(s=`${s}${s.includes("?")?"&":"?"}${i}`),Array.isArray(n)&&n.filter(o=>o&&o.in==="query"&&o.finalKeyValue).forEach(o=>{s=`${s}${s.includes("?")?"&":"?"}${encodeURIComponent(o.name)}=${encodeURIComponent(o.finalKeyValue)}`}),vm(e,s)}var ql="rapidoc-oauth";function Il(e){let t="";for(let r of e)t+=String.fromCharCode(r);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function us(e=32){return Il(crypto.getRandomValues(new Uint8Array(e)))}async function wm(e){let t=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(e));return Il(new Uint8Array(t))}function km(e){if(e.search&&e.search.length>1){let t=new URLSearchParams(e.search);return{responseType:"code",code:t.get("code"),state:t.get("state"),error:t.get("error"),errorDescription:t.get("error_description")}}if(e.hash&&e.hash.length>1){let t=new URLSearchParams(e.hash.slice(1));return{responseType:"token",accessToken:t.get("access_token"),tokenType:t.get("token_type"),expiresIn:t.get("expires_in"),state:t.get("state"),error:t.get("error"),errorDescription:t.get("error_description")}}return null}function Ll(e,t,r,a,n){return!(!e||typeof e!="object"||e.responseType!=="code"&&e.responseType!=="token"||!t.state||e.state!==t.state||t.origin!==void 0&&r!==t.origin||n!==void 0&&a!==n)}var Nl="rapidoc";function Bl(e){try{let t=new TextEncoder().encode(e),r="";for(let a=0;a<t.byteLength;a++)r+=String.fromCharCode(t[a]);return btoa(r)}catch{return btoa(e)}}function Sa(e){let t=new URLSearchParams;if(!e)return t;if(e instanceof URLSearchParams){for(let[r,a]of e.entries())t.set(r,a);return t}if(typeof e=="object")return Object.entries(e).forEach(([r,a])=>{a!=null&&t.set(r,String(a))}),t;if(typeof e=="string"){let r=e.trim();if(r.startsWith("{")&&r.endsWith("}"))try{let s=JSON.parse(r);if(typeof s=="object"&&s)return Object.entries(s).forEach(([i,o])=>{o!=null&&t.set(i,String(o))}),t}catch{}let a=r.startsWith("?")?r.slice(1):r,n=new URLSearchParams(a);for(let[s,i]of n.entries())t.set(s,i);return t}return t}function pt(e,t="",r="",a="",n=""){let s=this.resolvedSpec.securitySchemes?.find(o=>o.securitySchemeId===e);if(!s)return!1;let i="";return s.scheme?.toLowerCase()==="basic"?t&&(i=`Basic ${Bl(`${t}:${r}`)}`):a&&(s.value=a,i=`${s.scheme?.toLowerCase()==="bearer"?"Bearer ":""}${a}`),i?(s.finalKeyValue=i,s.hostNote=n?String(n):"",s.hostFormOpen=!1,this.requestUpdate(),!0):!1}function hs(){this.resolvedSpec.securitySchemes?.forEach(e=>{e.user="",e.password="",e.value="",e.finalKeyValue="",e.hostNote=""}),this.persistAuth==="true"&&vr.call(this,{}),this.requestUpdate()}function Aa(){return JSON.parse(localStorage.getItem(Nl))||{}}function vr(e){localStorage.setItem(Nl,JSON.stringify(e))}function $m(){let e=Aa.call(this),t=!1;Object.entries(e).forEach(([r,a])=>{a.expiresAt&&a.expiresAt<=Date.now()?(delete e[r],t=!0):pt.call(this,a.securitySchemeId,"","",a.value)}),t&&vr.call(this,e)}function ms(e){let t="",r=this.resolvedSpec.securitySchemes.find(a=>a.securitySchemeId===e);if(r){let a=this.shadowRoot.getElementById(`security-scheme-${e}`);if(a){if(r.type&&r.scheme&&r.type==="http"&&r.scheme.toLowerCase()==="basic"){let n=a.querySelector(".api-key-user").value.trim(),s=a.querySelector(".api-key-password").value.trim();pt.call(this,e,n,s)}else t=a.querySelector(".api-key-input").value.trim(),pt.call(this,e,"","",t);if(this.persistAuth==="true"){let n=Aa.call(this);r.value?n[e]={securitySchemeId:e,value:r.value}:delete n[e],vr.call(this,n)}}}}function xr(e,t,r){if(!e)return;let a=document.createElement("span");a.style.color=`var(${r})`,a.textContent=t,e.replaceChildren(a)}function zl(e,t,r="Bearer",a=0){let n=this.resolvedSpec.securitySchemes.find(s=>s.securitySchemeId===e);if(n.finalKeyValue=`${r.toLowerCase()==="bearer"?"Bearer":r.toLowerCase()==="mac"?"MAC":r} ${t}`,n.hostNote="",this.persistAuth==="true"){n.value=n.finalKeyValue;let s={securitySchemeId:e,value:n.finalKeyValue},i=Number(a);i>0&&(s.expiresAt=Date.now()+i*1e3);let o=Aa.call(this);o[e]=s,vr.call(this,o)}this.requestUpdate()}/* OAuth security patch start */
// Extends RapiDoc 14 OAuth with strict callbacks and cancellable transactions.
// Reuses zl (apply token), Sa (parameters), us (randomness) and wm (PKCE).
const oauthAuthorization = (() => {
  const pending = new WeakMap();
  const lifetime = 5 * 60 * 1000;

  function display(element, message) {
    if (element) element.textContent = message;
  }

  function stopCallback(operation) {
    if (operation.listener) window.removeEventListener('message', operation.listener);
    clearInterval(operation.poll);
    operation.listener = undefined;
    if (operation.popup && !operation.popup.closed) operation.popup.close();
  }

  function finish(operation) {
    if (!operation.active) return;
    operation.active = false;
    stopCallback(operation);
    clearTimeout(operation.deadline);
    window.removeEventListener('pagehide', operation.onPageHide);
    operation.controller.abort();
    if (operation.operations.get(operation.scheme) === operation) {
      operation.operations.delete(operation.scheme);
    }
  }

  function begin(viewer, scheme, element) {
    let operations = pending.get(viewer);
    if (!operations) {
      operations = new Map();
      pending.set(viewer, operations);
    }
    const previous = operations.get(scheme);
    if (previous) finish(previous);
    const operation = {
      active: true, operations, scheme, element, spec: viewer.resolvedSpec,
      controller: new AbortController(),
    };
    operations.set(scheme, operation);
    operation.onPageHide = () => finish(operation);
    window.addEventListener('pagehide', operation.onPageHide, { once: true });
    operation.deadline = setTimeout(() => {
      display(element, 'Authorization timed out. Please try again.');
      finish(operation);
    }, lifetime);
    return operation;
  }

  function validText(value) {
    return typeof value === 'string' && value.length > 0;
  }

  function isCurrent(viewer, operation) {
    if (!operation.active) return false;
    if (operation.spec === viewer.resolvedSpec) return true;
    finish(operation);
    return false;
  }

  async function fetchToken(viewer, operation, tokenUrl, clientId, clientSecret,
    redirectUrl, grantType, authCode, sendClientSecretIn, scopes, username, password, verifier, tokenParamsSpec) {
    try {
      const form = Sa(tokenParamsSpec);
      for (const [name, value] of Sa(viewer.additionalTokenParams)) form.set(name, value);
      // Extensions may add provider parameters, but cannot introduce a second
      // authentication method or stale values from another grant.
      for (const name of ['grant_type', 'client_id', 'client_secret', 'code',
        'code_verifier', 'redirect_uri', 'username', 'password']) form.delete(name);
      const headers = new Headers();
      form.set('grant_type', grantType);
      if (clientSecret && sendClientSecretIn === 'header') {
        // RFC 6749 section 2.3.1 encodes each credential before HTTP Basic.
        const encode = (value) => new URLSearchParams([['', value]]).toString().slice(1);
        headers.set('Authorization', `Basic ${btoa(`${encode(clientId)}:${encode(clientSecret)}`)}`);
      } else {
        form.set('client_id', clientId);
        if (clientSecret) form.set('client_secret', clientSecret);
      }
      if (grantType === 'authorization_code') {
        form.set('redirect_uri', redirectUrl);
        form.set('code', authCode);
        if (verifier) form.set('code_verifier', verifier);
      }
      if (grantType === 'password') {
        form.set('username', username);
        form.set('password', password);
      }
      if (scopes) form.set('scope', scopes);
      const request = { method: 'POST', headers, body: form };
      const beforeToken = new CustomEvent('before-token-request', {
        bubbles: true, composed: true, cancelable: true,
        detail: { securitySchemeId: operation.scheme, grantType, tokenUrl,
          params: form, headers, request },
      });
      if (!viewer.dispatchEvent(beforeToken) || !isCurrent(viewer, operation)) return false;
      const response = await fetch(tokenUrl, { ...request, signal: operation.controller.signal });
      const token = await response.json();
      if (!isCurrent(viewer, operation)) return false;
      if (!response.ok || !token || typeof token !== 'object' || Array.isArray(token) || 'error' in token
        || !validText(token.access_token) || !validText(token.token_type)) {
        display(operation.element, token && typeof token.error_description === 'string'
          ? token.error_description : 'Unable to get access token');
        return false;
      }
      zl.call(viewer, operation.scheme, token.access_token, token.token_type, token.expires_in);
      display(operation.element, 'Access Token Received');
      return true;
    } catch {
      if (operation.active) display(operation.element, 'Failed to get access token');
      return false;
    } finally {
      finish(operation);
    }
  }

  async function invoke(scheme, flowType, authUrl, tokenUrl, event, authorizeParamsSpec, tokenParamsSpec) {
    const flow = event.target.closest('.oauth-flow');
    const read = (selector, fallback = '') => flow.querySelector(selector)?.value ?? fallback;
    const clientId = read('.oauth-client-id');
    const clientSecret = read('.oauth-client-secret');
    const username = read('.api-key-user');
    const password = read('.api-key-password');
    const sendSecretIn = read('.oauth-send-client-secret-in', 'request-body');
    const scopes = [...flow.querySelectorAll('.scope-checkbox:checked')].map((e) => e.value).join(' ');
    const element = flow.querySelector('.oauth-resp-display');
    display(element, '');
    const operation = begin(this, scheme, element);
    if (flowType === 'clientCredentials' || flowType === 'password') {
      return fetchToken(this, operation, tokenUrl, clientId, clientSecret, '',
        flowType === 'clientCredentials' ? 'client_credentials' : 'password', '',
        sendSecretIn, scopes, username, password, undefined, tokenParamsSpec);
    }
    if (flowType !== 'authorizationCode' && flowType !== 'implicit') {
      finish(operation);
      return false;
    }
    try {
      const redirect = new URL(this.oauthReceiver || 'oauth-receiver.html', document.baseURI);
      if (redirect.origin !== window.location.origin) throw new Error('OAuth receiver must be same-origin');
      const authorization = new URL(authUrl);
      if (!['https:', 'http:'].includes(authorization.protocol)) throw new Error('Invalid authorization URL');
      // Open synchronously during the user gesture, before SHA-256 yields.
      operation.popup = window.open('about:blank', '_blank');
      if (!operation.popup) throw new Error('Authorization popup was blocked');
      operation.poll = setInterval(() => {
        if (operation.popup.closed) finish(operation);
      }, 250);
      const state = us();
      const nonce = us();
      const verifier = us();
      const pkceInput = [...flow.querySelectorAll('input[id]')].find((input) => input.id === `${scheme}-pkce`);
      const usePkce = flowType === 'authorizationCode' && Boolean(pkceInput?.checked);
      const responseType = flowType === 'implicit' ? 'token' : 'code';
      const parameters = authorization.searchParams;
      for (const [name, value] of Sa(authorizeParamsSpec)) parameters.set(name, value);
      for (const [name, value] of Sa(this.additionalAuthorizeParams)) parameters.set(name, value);
      parameters.set('client_id', clientId);
      parameters.set('redirect_uri', redirect.href);
      parameters.set('response_type', responseType);
      parameters.set('state', state);
      parameters.set('nonce', nonce);
      if (scopes) parameters.set('scope', scopes);
      if (usePkce) {
        parameters.set('code_challenge', await wm(verifier));
        parameters.set('code_challenge_method', 'S256');
      } else {
        parameters.delete('code_challenge');
        parameters.delete('code_challenge_method');
      }
      const beforeAuthorize = new CustomEvent('before-authorize', {
        bubbles: true, composed: true, cancelable: true,
        detail: { securitySchemeId: scheme, flowType, authUrl, authParams: parameters },
      });
      if (!this.dispatchEvent(beforeAuthorize)) {
        finish(operation);
        return false;
      }
      if (!isCurrent(this, operation) || operation.popup.closed) {
        finish(operation);
        return false;
      }
      operation.listener = (message) => {
        const data = message.data;
        if (!isCurrent(this, operation) || operation.callbackConsumed || message.origin !== redirect.origin
          || message.source !== operation.popup || !data || typeof data !== 'object'
          || Array.isArray(data) || data.state !== state) return;
        if (validText(data.error)) {
          display(element, validText(data.error_description) ? data.error_description : 'Authorization was denied');
          finish(operation);
          return;
        }
        if (data.responseType !== responseType) return;
        if (responseType === 'code' && !validText(data.code)) return;
        if (responseType === 'token' && (!validText(data.access_token) || !validText(data.token_type))) return;
        operation.callbackConsumed = true;
        // Stop listening before applying credentials or beginning an exchange.
        // Keep the overall deadline and pagehide cancellation during fetch.
        stopCallback(operation);
        if (responseType === 'token') {
          zl.call(this, scheme, data.access_token, data.token_type, data.expires_in);
          display(element, 'Access Token Received');
          finish(operation);
        } else {
          void fetchToken(this, operation, tokenUrl, clientId, clientSecret, redirect.href,
            'authorization_code', data.code, sendSecretIn, '', '', '', usePkce ? verifier : undefined, tokenParamsSpec);
        }
      };
      window.addEventListener('message', operation.listener);
      operation.popup.location.replace(authorization.href);
      return true;
    } catch {
      if (operation.active) display(element, 'Unable to start authorization. Allow popups and use a secure browser context.');
      finish(operation);
      return false;
    }
  }
  return { invoke };
})();

function Em(...args) { return oauthAuthorization.invoke.apply(this, args); }
/* OAuth security patch end */
function Dm(e,t,r,a,n,s=[],i="request-body",o=void 0,l="true",c=null,d=null){let{authorizationUrl:p,tokenUrl:f,refreshUrl:h}=n,y=n["x-pkce-only"]||!1,m=new URL(this.selectedServer.computedUrl,document.baseURI);p&&(p=new URL(p,m).href),f&&(f=new URL(f,m).href),h&&(h=new URL(h,m).href);let k;k=e==="authorizationCode"?"Authorization Code Flow":e==="clientCredentials"?"Client Credentials Flow":e==="implicit"?"Implicit Flow":e==="password"?"Password Flow":e;let v=e==="authorizationCode"||e==="clientCredentials"||e==="password",w=v||e==="implicit";return u`<div class="oauth-flow ${e}"><h3 class="rapidoc-heading label-heading tiny-title upper" part="heading heading-3">${k}</h3>${p||f||h?u`<dl class="oauth-urls">${p?u`<dt>Auth URL</dt><dd class="mono-font">${p}</dd>`:""} ${f?u`<dt>Token URL</dt><dd class="mono-font">${f}</dd>`:""} ${h?u`<dt>Refresh URL</dt><dd class="mono-font">${h}</dd>`:""}</dl>`:""} ${w&&n.scopes?u`<div class="oauth-scopes-label">Scopes</div><div class="oauth-scopes" part="section-auth-scopes">${Object.entries(n.scopes).map(([b,A],$)=>u`<label class="auth-toggle" for="${a}${e}${$}"><input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${a}${e}${$}" ?checked="${s.includes(b)}" value="${b}"> <span><span class="oauth-scope-name mono-font">${b}</span>${b!==A&&A?u`<span class="oauth-scope-descr">${A}</span>`:""}</span></label>`)}</div>`:""} ${w&&l==="true"?u`${e==="authorizationCode"?u`<label class="auth-toggle oauth-pkce" for="${a}-pkce"><input type="checkbox" part="checkbox checkbox-auth-scope" id="${a}-pkce" checked="checked" ?disabled="${y}"> <span>Send Proof Key for Code Exchange (PKCE)</span></label>`:""} ${e==="password"?u`<div class="auth-controls"><input type="text" placeholder="username" spellcheck="false" class="oauth2 ${e} ${a} api-key-user" part="textbox textbox-username" id="input-${a}-${e}-api-key-user"> <input type="password" placeholder="password" spellcheck="false" class="oauth2 ${e} ${a} api-key-password" part="textbox textbox-password" id="input-${a}-${e}-api-key-password"></div>`:""}<div class="auth-controls"><input type="text" part="textbox textbox-auth-client-id" value="${t||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${e} ${a} oauth-client-id"> ${v?u`<input id="${a}-${e}-oauth-client-secret" type="password" part="textbox textbox-auth-client-secret" value="${r||""}" placeholder="client-secret" spellcheck="false" class="oauth2 ${e} ${a} oauth-client-secret" ?hidden="${y}"> <select class="${e} ${a} oauth-send-client-secret-in" aria-label="Send client secret in" ?hidden="${y}">${!o||o.includes("request-body")?u`<option value="request-body" .selected="${i==="request-body"}">Request Body</option>`:""} ${!o||o.includes("header")?u`<option value="header" .selected="${i==="header"}">Authorization Header</option>`:""}</select>`:""} <button class="btn btn-outline" part="btn btn-outline" @click="${b=>{Em.call(this,a,e,p,f,b,c,d)}}">GET TOKEN</button></div><div class="oauth-resp-display red-text small-font-size"></div>`:""}</div>`}function Cm(e){let t=this.resolvedSpec.securitySchemes?.find(r=>r.securitySchemeId===e);if(t.user="",t.password="",t.value="",t.finalKeyValue="",t.hostNote="",this.persistAuth==="true"){let r=Aa.call(this);delete r[t.securitySchemeId],vr.call(this,r)}this.requestUpdate()}function Pl(e="true"){if(!this.resolvedSpec)return"";let t=this.resolvedSpec.securitySchemes?.filter(r=>r.finalKeyValue);if(t)return u`<section id="auth" part="section-auth" style="text-align:left;direction:ltr;margin-top:24px;margin-bottom:24px" class="observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap "}"><h2 class="rapidoc-heading sub-title regular-font" part="section-auth-title heading heading-2">Authentication</h2>${e==="true"?u`<div class="auth-status small-font-size">${t.length>0?u`<div class="blue-text">${t.length} API key applied</div><button class="btn btn-outline" part="btn btn-outline" @click="${()=>{hs.call(this)}}">CLEAR ALL API KEYS</button>`:u`<div class="red-text">No API key applied</div>`}</div>`:""} ${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?u`<ul class="auth-list" id="auth-list" part="auth-list" role="list">${this.resolvedSpec.securitySchemes.filter(r=>r.type).map(r=>{let a=e==="true"&&r.finalKeyValue?r.hostNote:"",n=a&&!r.hostFormOpen;return u`<li id="security-scheme-${r.securitySchemeId}" class="auth-scheme ${r.type.toLowerCase()}" part="auth-scheme"><div class="auth-scheme-body"><div class="auth-scheme-header"><span class="auth-scheme-title">${r.typeDisplay}</span> ${r.finalKeyValue?u`<span class="blue-text">Key Applied</span> <button class="btn btn-outline btn-sm" part="btn btn-outline" @click="${()=>{Cm.call(this,r.securitySchemeId)}}">REMOVE</button>`:""}</div>${r.description?u`<div class="m-markdown">${M(H(T(r.description||"")))}</div>`:""} ${a?u`<div class="auth-host-note" part="auth-host-note">${a}</div><button class="btn btn-link auth-host-toggle" part="btn btn-link" aria-expanded="${n?"false":"true"}" @click="${()=>{r.hostFormOpen=!r.hostFormOpen,this.requestUpdate()}}">${n?"Use a different token":"Hide token form"}</button>`:""} ${!n&&r.type.toLowerCase()==="apikey"?u`<div class="auth-hint">Send <code>${r.name}</code> in <code>${r.in}</code></div>${e==="true"?r.in==="cookie"?u`<div class="auth-hint gray-text">Cookies cannot be set from here</div>`:u`<div class="auth-controls"><input type="text" value="${r.value}" class="${r.type} ${r.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${r.type}-${r.securitySchemeId}-api-key-input"> <button class="btn btn-outline" part="btn btn-outline" @click="${()=>{ms.call(this,r.securitySchemeId)}}">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""} ${!n&&r.type.toLowerCase()==="http"&&r.scheme?.toLowerCase()==="basic"?u`<div class="auth-hint">Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.</div>${e==="true"?u`<div class="auth-controls"><input type="text" value="${r.user}" placeholder="username" spellcheck="false" class="${r.type} ${r.securitySchemeId} api-key-user" id="input-${r.type}-${r.securitySchemeId}-api-key-user"> <input type="password" value="${r.password}" placeholder="password" spellcheck="false" class="${r.type} ${r.securitySchemeId} api-key-password" id="input-${r.type}-${r.securitySchemeId}-api-key-password"> <button class="btn btn-outline" @click="${()=>{ms.call(this,r.securitySchemeId)}}" part="btn btn-outline">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""} ${!n&&r.type.toLowerCase()==="http"&&r.scheme?.toLowerCase()==="bearer"?u`<div class="auth-hint">Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and token value</div>${e==="true"?u`<div class="auth-controls"><input type="text" value="${r.value}" class="${r.type} ${r.securitySchemeId} api-key-input" placeholder="api-token" spellcheck="false" id="${r.type}-${r.securitySchemeId}-api-key-input"> <button class="btn btn-outline" part="btn btn-outline" @click="${()=>{ms.call(this,r.securitySchemeId)}}">${r.finalKeyValue?"UPDATE":"SET"}</button></div>`:""}`:""}</div>${!n&&r.type.toLowerCase()==="oauth2"?u`<div class="auth-flows" part="auth-flows">${Object.keys(r.flows).map(s=>Dm.call(this,s,r.flows[s]["x-client-id"]||r["x-client-id"]||"",r.flows[s]["x-client-secret"]||r["x-client-secret"]||"",r.securitySchemeId,r.flows[s],r.flows[s]["x-default-scopes"]||r["x-default-scopes"],r.flows[s]["x-receive-token-in"]||r["x-receive-token-in"],r.flows[s]["x-receive-token-in-options"]||r["x-receive-token-in-options"],e,r.flows[s]["x-authorize-params"]||r["x-authorize-params"]||null,r.flows[s]["x-token-params"]||r["x-token-params"]||null))}</div>`:""}</li>`})}</ul>`:""}<slot name="auth"></slot></section>`}function Tm(e,t,r){let a=e.scopes?u`<div><b>Required scopes:</b><br><div style="margin-left:8px">${e.scopes.split(",").map((n,s)=>u`${s===0?"":"\u2503"}<span>${n.trim()}</span>`)}</div></div>`:"";return e.type==="oauth2"?u`<div>${t?u`<b>${r+1}.</b>  `:"Needs "}OAuth Token <span style="font-family:var(--font-mono);color:var(--primary)">${e.securitySchemeId}</span> in <b>Authorization header</b> ${a}</div>`:e.type==="http"?u`<div>${t?u`<b>${r+1}.</b>  `:"Requires "} ${e.scheme==="basic"?"Base 64 encoded username:password":u`Bearer Token <b>${e.nameId}</b>`} in <b>Authorization header</b> ${a}</div>`:u`<div>${t?u`<b>${r+1}.</b>  `:"Requires "} Token in <b>${e.name} ${e.in}</b> ${a}</div>`}var Om=typeof CSS<"u"&&CSS.supports?.("anchor-name: --a"),gs=new WeakMap,Re=null;function Ul(e){e.key==="Escape"&&Re&&ys(Re)}function ys(e){e.matches(":popover-open")&&e.hidePopover(),Re===e&&(Re=null,document.removeEventListener("keydown",Ul))}function Fm(e,t){let r=e.getBoundingClientRect(),{offsetWidth:a,offsetHeight:n}=t,s=Math.max(8,Math.min(r.left,window.innerWidth-a-8)),i=r.bottom+6+n>window.innerHeight&&r.top-6-n>=0?r.top-6-n:r.bottom+6;Object.assign(t.style,{inset:"auto",margin:"0",left:`${s}px`,top:`${i}px`})}function bs(e){let t=e.currentTarget.closest(".security-chip"),r=t?.querySelector(".security-popover");r&&typeof r.showPopover=="function"&&(clearTimeout(gs.get(t)),Re&&Re!==r&&ys(Re),r.matches(":popover-open")||r.showPopover(),Om||Fm(t,r),Re!==r&&(Re=r,document.addEventListener("keydown",Ul)))}function Ml(e){let t=e.currentTarget;clearTimeout(gs.get(t)),gs.set(t,setTimeout(()=>{let r=t.querySelector(".security-popover");r&&!t.matches(":hover, :focus-within")&&ys(r)},150))}var Hl=u`<svg class="security-lock" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke-width="1.75"><rect x="5" y="11" width="14" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>`;function Wl(e,t=""){if(!this.resolvedSpec.securitySchemes||!Array.isArray(e)||e.length===0)return"";let r=e.some(o=>!o||Object.keys(o).length===0),a=e.filter(o=>o&&Object.keys(o).length>0);if(a.length===0)return"";let n=[];a.forEach(o=>{let l=[],c=[];Object.keys(o).forEach(p=>{let f="",h=this.resolvedSpec.securitySchemes.find(y=>y.securitySchemeId===p);o[p]&&Array.isArray(o[p])&&(f=o[p].join(", ")),h&&(c.push(h.typeDisplay),l.push({...h,scopes:f}))});let d=c.length>1?`${c[0]} + ${c.length-1} more`:c[0];n.push({securityTypes:r?`${d} (Optional)`:d,securityDefs:l})});let s=`${t||"operation"}--security`,i=`--${s.replace(/[^\w-]/g,"_")}`;return u`<div class="operation-security" part="section-operation-security" role="group" aria-labelledby="${s}-label"><span id="${s}-label" class="security-label visually-hidden" part="label-operation-security">Authorization</span> ${this.updateRoute==="true"&&this.allowAuthentication==="true"?u`<a class="security-lock-btn" part="anchor anchor-operation-security" href="#auth" title="Go to Authentication" aria-label="Authorization: go to Authentication section">${Hl}</a>`:u`<span class="security-lock-btn">${Hl}</span>`}<ul class="value-list-items security-chips" role="list">${n.map((o,l)=>{if(!o.securityTypes)return"";let c=o.securityDefs.length>1,d=o.securityDefs.length>0,p=`${s}-${l}`,f=`${i}-${l}`,h=d?u`<button type="button" class="security-chip-label" aria-describedby="${p}" @click="${bs}">${o.securityTypes}</button>`:u`<span class="security-chip-label">${o.securityTypes}</span>`;return u`<li><span class="security-chip ${d?"has-details":""}" part="operation-security-chip" style="anchor-name:${f}" @mouseenter="${bs}" @mouseleave="${Ml}" @focusin="${bs}" @focusout="${Ml}">${h} ${d?u`<div id="${p}" class="security-popover" part="operation-security-details" popover="hint" role="tooltip" style="position-anchor:${f}">${c?u`<div>Requires <b>all</b> of the following:</div>`:""}<div style="padding-left:${c?"8px":"0"}">${o.securityDefs.map((y,m)=>Tm(y,c,m))}</div></div>`:""}</span></li>`})}</ul></div>`}function Kl(e){return u`<div class="code-samples-container"><h4 class="rapidoc-heading label-heading table-title top-gap" part="heading heading-4">Code samples</h4><div part="tab-panel" class="tab-panel col" @click="${t=>{if(!t.target.classList.contains("tab-btn"))return;let r=t.target.dataset.tab,a=[...t.currentTarget.querySelectorAll(".tab-btn")],n=[...t.currentTarget.querySelectorAll(".tab-content")];a.forEach(s=>s.classList[s.dataset.tab===r?"add":"remove"]("active")),n.forEach(s=>{s.style.display=s.dataset.tab===r?"block":"none"}),Nr(t.currentTarget.getRootNode()?.host?.shadowRoot||t.currentTarget)}}"><div part="tab-btn-row" class="tab-buttons row" style="width:100%;overflow:auto">${e.map((t,r)=>u`<button part="tab-btn" class="tab-btn ${r===0?"active":""}" data-tab="${t.lang}${r}">${t.label||t.lang}</button>`)}</div>${e.map((t,r)=>u`<div class="tab-content m-markdown" style="display:${r===0?"block":"none"}" data-tab="${t.lang}${r}"><button class="btn btn-sm btn-outline toolbar-btn" part="btn btn-outline btn-copy" @click="${a=>{nr(t.source,a)}}">Copy</button><pre><code class="language-${t.lang?.toLowerCase()}">${t.source}</code></pre></div>`)}</div></div>`}function Vl(e){return u`<h4 class="rapidoc-heading label-heading req-res-title" part="heading heading-4">Callbacks</h4>${Object.entries(e).map(t=>u`<div class="tiny-title" style="padding:12px;border:1px solid var(--border)"><h5 class="rapidoc-heading callback-name" part="heading heading-5">${t[0]}</h5>${Object.entries(t[1]).map(r=>u`<div class="callback-operation-list mono-font small-font-size">${Object.entries(r[1]).map(a=>u`<div class="callback-operation-item"><div class="callback-operation-header"><div class="method method-fg ${a[0]} callback-method"><span style="font-size:20px">⥄ </span>${a[0]}</div><span style="line-height:20px;vertical-align:baseline">${r[0]}</span></div><div class="expanded-req-resp-container"><api-request .config="${this.config}" class="${this.renderStyle}-mode callback" style="width:100%" callback="true" method="${a[0]||""}" path="${r[0]||""}" .parameters="${a[1]?.parameters||""}" .request_body="${a[1]?.requestBody||""}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="false" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":"true"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
            wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
                          tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content, 
                          file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, 
                          anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request><api-response .config="${this.config}" style="width:100%" class="${this.renderStyle}-mode" callback="true" .responses="${a[1]?.responses}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":"true"}" schema-hide-write-only="false" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
            btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-outline:btn-outline, btn-copy:btn-copy,
                          tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content, 
                          schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items"></api-response></div></div>`)}</div>`)}</div>`)}`}var jm={},wr=ka(class extends $a{constructor(){super(...arguments),this.ot=jm}render(e,t){return t()}update(e,[t,r]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((a,n)=>a===this.ot[n]))return ie}else if(this.ot===t)return ie;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,r)}}),Ea=G`.border-top{border-top:1px solid var(--border)}.border,.light-border{border:1px solid var(--border);border-radius:min(var(--radius), .5rem)}.pad-8-16{padding:8px 16px}.pad-top-8{padding-top:8px}.mar-top-8{margin-top:8px}`;function vs(e){if(!e||typeof e!="string")return e||"";let t=[];return e.split(",").map(r=>{let a=r.trim(),n=a.toLowerCase();return t.includes(n)?null:(t.push(n),a)}).filter(r=>r!==null).join(", ")}function Rm({method:e="GET",url:t="",headers:r,body:a,contentType:n="",partContentTypes:s={},baseLocation:i=typeof location<"u"?location.href:""}={}){let o=t;if(!t.startsWith("http://")&&!t.startsWith("https://")&&i)try{o=new URL(t,i).href}catch{o=t}let l=`curl -X ${e.toUpperCase()} "${o}" \\
`,c=[];r instanceof Headers||r&&typeof r.forEach=="function"?r.forEach((y,m)=>{c.push([m,vs(y)])}):Array.isArray(r)?r.forEach(([y,m])=>{c.push([y,vs(m)])}):r&&typeof r=="object"&&Object.entries(r).forEach(([y,m])=>{c.push([y,vs(String(m))])});let d=c.map(([y,m])=>` -H '${y}: ${m}'`).join(`\\
`);d&&=`${d} \\
`;let p="",f="";if(typeof URLSearchParams<"u"&&a instanceof URLSearchParams)p=` -d ${a.toString()} \\
`;else if(typeof File<"u"&&a instanceof File)p=` --data-binary @${a.name} \\
`;else if(typeof FormData<"u"&&a instanceof FormData)f=Array.from(a).map(([y,m])=>{let g=s?.[y]?`;type=${s[y]}`:"";return typeof File<"u"&&m instanceof File?` -F "${y}=@${m.name}${m.type?"":g}"`:` -F "${y}=${typeof m=="string"?m.replace(/\\/g,"\\\\").replace(/"/g,'\\"'):m}${g}"`}).join(`\\
`),f&&=`${f} \\
`;else if(a!=null&&a!==""){let y=typeof a=="object"?JSON.stringify(a):String(a);if(n.includes("json")||y.trim().startsWith("{")&&y.trim().endsWith("}"))try{p=` -d '${JSON.stringify(JSON.parse(y)).replace(/'/g,"'\\''")}' \\
`}catch{}p||=` -d '${y.replace(/'/g,`'"'"'`)}' \\
`}let h=`${l}${d}${p}${f}`;return h.endsWith(` \\
`)?h.slice(0,-3):h}function _m(e,t={}){let{explode:r=!1,isObject:a=!1}=t;if(e==null||e==="")return"";if(a||typeof e=="object"&&!Array.isArray(e)){let n=e;if(typeof e=="string")try{n=JSON.parse(e.replace(/\n/g,"").trim())}catch{return""}if(!n||typeof n!="object")return"";let s=r?"=":",";return Object.keys(n).map(i=>{let o=n[i],l=typeof o=="object"?JSON.stringify(o):String(o);return`${i}${s}${l}`}).join(",")}return Array.isArray(e)?e.filter(n=>n!==""&&n!=null).join(","):String(e)}function qm({accept:e="",apiKeys:t=[],headerParams:r=[],contentType:a=""}={}){let n=new Headers;return e&&n.append("Accept",e),Array.isArray(t)&&t.filter(s=>s&&s.in==="header"&&s.finalKeyValue).forEach(s=>{n.append(s.name,s.finalKeyValue)}),Array.isArray(r)&&r.forEach(s=>{if(s&&s.name&&s.value!==void 0&&s.value!==null&&s.value!==""){let i=_m(s.value,{explode:s.explode===!0||s.explode==="true",isObject:s.isObject===!0});i&&n.append(s.name,i)}}),a&&!a.includes("form-data")&&n.append("Content-Type",a),n}function Zl(e=[],t=""){let r=new URLSearchParams;if(t)try{let a=JSON.parse(t);if(a&&typeof a=="object"){for(let n of Object.keys(a))r.append(n,typeof a[n]=="object"?JSON.stringify(a[n]):String(a[n]));return r}}catch{}return Array.isArray(e)&&e.forEach(a=>{if(!a||!a.name||a.value===void 0||a.value===null||a.value==="")return;let n=a.style||"form";_l(a.name,a.value,{style:n,explode:typeof a.explode=="boolean"?a.explode:n==="form",isArray:!!a.isArray,isObject:!!a.isObject}).forEach(([s,i])=>r.append(s,i))}),r}var Jl=e=>!!e&&(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")||!e.type&&!!e.properties);function Im(e,t){return(typeof t?.contentType=="string"?t.contentType.split(",")[0].trim():"")||(Jl(e)||e?.type==="array"&&Jl(e.items)?"application/json":"")}var Gl=e=>String(e).replace(/"/g,"%22").replace(/\r/g,"%0D").replace(/\n/g,"%0A");function Lm(e,t={},r=`----RapiDocFormBoundary${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`){let a=[];for(let[n,s]of e.entries()){let i=typeof s!="string",o=`--${r}\r
Content-Disposition: form-data; name="${Gl(n)}"`;i?o+=`; filename="${Gl(s.name??"blob")}"\r
Content-Type: ${s.type||t[n]||"application/octet-stream"}`:t[n]&&(o+=`\r
Content-Type: ${t[n]}`),a.push(`${o}\r
\r
`,i?s:s.replace(/\r?\n/g,`\r
`),`\r
`)}return a.push(`--${r}--\r
`),{body:new Blob(a),contentType:`multipart/form-data; boundary=${r}`}}function Nm(e=[]){let t=new FormData;return Array.isArray(e)&&e.forEach(r=>{r&&r.name&&(typeof File<"u"&&r.file instanceof File?t.append(r.name,r.file,r.file.name):r.value!==void 0&&r.value!==null&&r.value!==""&&(r.isArray?(Array.isArray(r.value)?r.value:[r.value]).filter(a=>a!==""&&a!=null).forEach(a=>{typeof File<"u"&&a instanceof File?t.append(r.name,a,a.name):t.append(r.name,String(a))}):t.append(r.name,String(r.value))))}),t}function Bm(e,{indentor:t="  ",textNodesOnSameLine:r=!0}={}){if(!e||typeof e!="string")return"";let a=e.split(/(<[^>]+>)/g).map(i=>i.trim()).filter(Boolean),n=0,s=[];for(let i=0;i<a.length;i++){let o=a[i],l=o.startsWith("</"),c=o.endsWith("/>"),d=/^<[^/!?]/.test(o)&&!c;l&&(n=Math.max(0,n-1));let p=t.repeat(n);if(r&&d&&i+2<a.length&&!a[i+1].startsWith("<")&&a[i+2].startsWith("</")){let f=o.match(/^<([a-zA-Z0-9_\-:]+)/)?.[1],h=a[i+2].match(/^<\/([a-zA-Z0-9_\-:]+)/)?.[1];if(f&&h&&f===h){s.push(`${p}${o}${a[i+1]}${a[i+2]}`),i+=2;continue}}s.push(`${p}${o}`),d&&n++}return s.join(`
`)}async function zm(e){let t,r,a,n=!1,s="",i="",o="",l="",c=e.headers.get("content-type");if((await e.clone().text()).length===0)l="";else if(c){if(c=c.split(";")[0].trim(),c==="application/x-ndjson")l=await e.text();else if(c.includes("json"))if(/charset=[^"']+/.test(c)){let d=c.split("charset=")[1],p=await e.arrayBuffer();try{a=new TextDecoder(d).decode(p)}catch{a=new TextDecoder("utf-8").decode(p)}try{r=JSON.parse(a),l=JSON.stringify(r,null,2)}catch{l=a}}else r=await e.json(),l=JSON.stringify(r,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(c)?(n=!0,s="download"):c.startsWith("image")?(n=!0,s="image"):/^audio|^image|^video/.test(c)?(n=!0,s="view"):(a=await e.text(),l=c.includes("xml")?Bm(a,{textNodesOnSameLine:!0,indentor:"  "}):a);if(n){let d=e.headers.get("content-disposition")||"",p="filename";if(d){let f=d.match(/filename\*=\s*UTF-8''([^;]+)/);if(f)p=decodeURIComponent(f[1]);else{let h=d.match(/filename="?([^"]+)"?/);h&&(p=h[1])}}o=p,t=await e.blob(),typeof URL<"u"&&URL.createObjectURL&&(i=URL.createObjectURL(t))}}else a=await e.text(),l=a;return{responseText:l,respJson:r,respBlob:t,respText:a,responseIsBlob:n,responseBlobType:s,responseBlobUrl:i,respContentDisposition:o}}function Pm(e,t={}){let{callback:r=!1,webhook:a=!1}=t,n=r===!0||r==="true"||a===!0||a==="true",s={},i={},o="",l="";if(!e||typeof e!="object")return{headersForEachRespStatus:s,mimeResponsesForEachStatus:i,defaultStatus:o,defaultMimeType:l};for(let c of Object.keys(e)){if(c==="$$ref")continue;o||=c;let d={},p=e[c]?.content;if(p&&typeof p=="object")for(let h of Object.keys(p)){let y=p[h];l||=h;let m=y?.schema?se(y.schema):null,g=Nt(y?.schema,h,xe(y?.examples),xe(y?.example),!n,n,h.includes("json")?"json":"text");d[h]={description:e[c].description,examples:g,selectedExample:g[0]?.exampleId||"",schemaTree:m}}let f=[];if(e[c]?.headers)for(let h of Object.keys(e[c].headers))f.push({name:h,...e[c].headers[h]});s[c]=f,i[c]=d}return{headersForEachRespStatus:s,mimeResponsesForEachStatus:i,defaultStatus:o,defaultMimeType:l}}var{I:Um}=ld,Xl=e=>e,Mm=e=>e.strings===void 0,Yl=()=>document.createComment(""),kr=(e,t,r)=>{let a=e._$AA.parentNode,n=t===void 0?e._$AB:t._$AA;if(r===void 0)r=new Um(a.insertBefore(Yl(),n),a.insertBefore(Yl(),n),e,e.options);else{let s=r._$AB.nextSibling,i=r._$AM,o=i!==e;if(o){let l;r._$AQ?.(e),r._$AM=e,r._$AP!==void 0&&(l=e._$AU)!==i._$AU&&r._$AP(l)}if(s!==n||o){let l=r._$AA;for(;l!==s;){let c=Xl(l).nextSibling;Xl(a).insertBefore(l,n),l=c}}}return r},ut=(e,t,r=e)=>(e._$AI(t,r),e),Hm={},Ql=(e,t=Hm)=>e._$AH=t,Wm=e=>e._$AH,xs=e=>{e._$AR(),e._$AA.remove()},$r=ka(class extends $a{constructor(e){if(super(e),e.type!==Me.PROPERTY&&e.type!==Me.ATTRIBUTE&&e.type!==Me.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Mm(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ie||t===F)return t;let r=e.element,a=e.name;if(e.type===Me.PROPERTY){if(t===r[a])return ie}else if(e.type===Me.BOOLEAN_ATTRIBUTE){if(!!t===r.hasAttribute(a))return ie}else if(e.type===Me.ATTRIBUTE&&r.getAttribute(a)===t+"")return ie;return Ql(e),t}}),ec=G`*,:before,:after{box-sizing:border-box}:host{interpolate-size:allow-keywords;container-type:inline-size}.tr{box-sizing:content-box;border-bottom:1px dotted #0000;flex:none;width:100%;transition:max-height .3s ease-out;display:flex;&.expanded-descr{max-height:3000px;@supports (interpolate-size:allow-keywords){max-height:max-content}}}.td{flex:none;display:block}.key{font-family:var(--font-mono);white-space:normal;word-break:break-all}.collapsed-all-descr .key{overflow:hidden}.key-descr{font-family:var(--font-sans);color:var(--muted-foreground);flex-shrink:1;align-items:flex-start;gap:4px;min-width:0;display:flex;overflow:hidden;& .descr-expand-toggle{top:0;text-align:center;user-select:none;width:1em;color:var(--foreground);cursor:pointer;visibility:hidden;border-radius:2px;font-weight:400;transition:transform .2s;position:absolute;inset-inline-start:0;transform:rotate(45deg);&:hover{color:var(--primary)}&:focus-visible{outline:2px solid var(--primary)}}& .descr-body{flex:1;min-width:0;padding-inline-start:calc(1em + 4px);position:relative;&>.descr-expand-toggle+*{margin-top:0}& .item-details{margin-top:2px}& .descr-chip{line-break:anywhere;margin-right:8px;display:inline-block}& .descr-summary{display:none}& .descr-placeholder{color:var(--muted-foreground)}}& .descr-label,& b{font-weight:500;font-size:var(--font-size-xs);color:var(--primary)}& .descr-value{font-family:var(--font-mono);font-size:var(--font-size-small);line-height:1}}.expanded-descr .key-descr .descr-expand-toggle{transform:rotate(-90deg)}.key-descr .descr-body.has-more>.descr-expand-toggle,.tr.expanded-descr .key-descr .descr-expand-toggle{visibility:visible}.expanded-all-descr .tr .key-descr .descr-body>.descr-expand-toggle{visibility:hidden}.collapsed-all-descr .tr.expanded-descr .descr-body{cursor:pointer}.collapsed-all-descr .tr:not(.expanded-descr) .descr-body{white-space:nowrap;text-overflow:ellipsis;color:var(--foreground);overflow:hidden;&.has-more{cursor:pointer}&>.descr-expand-toggle+*{white-space:inherit;margin:0;padding:0;display:inline}&>.descr-expand-toggle+:is(ul,ol)>li{display:inline}&>.descr-expand-toggle+:is(h1,h2,h3,h4,h5,h6){font-size:var(--font-size-description);line-height:inherit;font-weight:600}& .descr-chip{display:inline}&>.descr-expand-toggle+:is(ul,ol)>li:not(:first-child),&>.descr-expand-toggle+*~*{display:none}}@supports (container-type:scroll-state){.collapsed-all-descr .tr:not(.expanded-descr) .descr-body{container-type:scroll-state}@container scroll-state(scrollable:inline-end){.descr-body>*{cursor:pointer}.descr-body>.descr-expand-toggle{visibility:visible}}}.xxx-of-key{font-size:var(--font-size-xs);line-height:calc(var(--font-size-small) + 1px);border-radius:var(--radius);corner-shape:squircle;border:1px solid var(--primary);background:color-mix(in srgb, var(--primary) 12%, transparent);color:var(--primary);vertical-align:middle;margin-bottom:1px;padding:1px 6px;display:inline-block}.xxx-of-descr{font-family:var(--font-sans);color:var(--primary);font-size:var(--font-size-xs);vertical-align:middle;margin-inline-start:4px}.stri,.string,.uri,.url,.byte,.bina,.date,.pass,.ipv4,.ipv4,.uuid,.emai,.host{color:var(--green)}.inte,.numb,.number,.int6,.int3,.floa,.doub,.deci{color:var(--blue)}.null{color:var(--destructive)}.bool,.boolean{color:var(--orange)}.enum,.cons{color:var(--purple)}.recu{color:var(--brown)}.toolbar{width:100%;color:var(--primary);padding:2px 0;display:flex}.toolbar-item{cursor:pointer;margin:0 2px;padding:5px 0;&:first-of-type{margin:0 2px 0 0}}.schema-root-type{cursor:auto;color:var(--muted-foreground);text-transform:uppercase;font-weight:600}@container (width<500px){.tr{flex-wrap:wrap}.tr>.key-descr{flex-basis:100%;&:empty{display:none}}}`;function x(e,t,r,a){var n=arguments.length,s=n<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,r):a,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,a);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(n<3?i(s):n>3?i(t,r,s):i(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s}var Km=/[*_`~[\]<>#|\\&\n]|https?:|ftp:|www\.|@|^([-+]|\d+[.)])\s|^-{3,}$/;function tc(e){return!Km.test(e)}var Da=new Map,Vm=5e3;function Zm(e,t){let r=`${t}

${e}`,a=Da.get(r);if(a)return a;let n=e?T.lexer(e).find(f=>f.type!=="space"):null,s=ki(n),i=t?`<b>${t}${e?":":""}</b>`:"",o=!!i&&!!n&&n.type!=="paragraph",l=o?`${i} ${s||wi(n)}`:s,c=i&&e?`${i}${o?`

`:" "}${e}`:i||e,d=c?T.lexer(c):[],p=d.filter(f=>f.type!=="space");return a={summary:l?H(l):"",html:p.length?H(T.parser(d)).trim():"",hasMore:!!l||p.length>1||p[0]?.type==="list"&&p[0].items.length>1||/<br\s*\/?>(?!\s*$)/i.test(c)},Da.size>=Vm&&Da.clear(),Da.set(r,a),a}function rc(e,t){return e==="never"?"false":e==="true"||e==="false"?e:t}var _e=class extends fe{constructor(...e){super(...e),this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="true",this.schemaHideWriteOnly="true"}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.schemaHideReadOnly=rc(this.config.schemaHideReadOnly,this.schemaHideReadOnly),this.schemaHideWriteOnly=rc(this.config.schemaHideWriteOnly,this.schemaHideWriteOnly)),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}handleAllEvents(e){let t=e.target.closest(".open-bracket, .obj-toggle");if(t)this.toggleObjectExpand(t);else if(e.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(e.target.closest(".descr-expand-toggle, .descr-body")){if(this.schemaDescriptionExpanded==="true"||e.target.closest("a")||window.getSelection()?.isCollapsed===!1)return;let r=e.target.closest(".tr");if(r&&(r.classList.contains("expanded-descr")||this.descrHasMore(e.target.closest(".descr-body")))){let a=r.classList.toggle("expanded-descr");r.querySelector(".descr-expand-toggle")?.setAttribute("aria-expanded",a?"true":"false")}}}descrHasMore(e){if(!e)return!1;let t=e.querySelector(":scope > .descr-expand-toggle");return t&&getComputedStyle(t).visibility==="visible"||e.scrollWidth>e.clientWidth}handleKeyDown(e){if(e.key==="Enter"||e.key===" "){let t=e.target.closest(".open-bracket, .obj-toggle, .descr-expand-toggle, .schema-multiline-toggle");t&&(e.preventDefault(),t.click())}}toggleObjectExpand(e){let t=e.closest(".tr");if(!t)return;let r=t.classList.contains("collapsed");r?t.classList.replace("collapsed","expanded"):t.classList.replace("expanded","collapsed");let a=t.querySelector(".open-bracket, .obj-toggle");a&&a.setAttribute("aria-expanded",r?"true":"false")}isFieldHidden(e){return!!(!e||this.schemaHideReadOnly==="true"&&e.readOnly||this.schemaHideWriteOnly==="true"&&e.writeOnly)}renderDeprecatedIcon(e){return e?.deprecated?u`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--destructive);margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}getReadWriteBadge(e){return e?.readOnly?u`🆁`:e?.writeOnly?u`🆆`:""}getReadWriteTip(e){return e?.readOnly?"Read-Only":e?.writeOnly?"Write-Only":""}getDataTypeCss(e){return(e||"").replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase()}hasDetailChips(e){return!!(e&&(e.constraints||e.defaultValue||e.allowedValues||e.pattern||e.formatNote||e.contentMediaType||e.contentEncoding))}renderDetailChips(e){return e?u`${e.constraints?u`<div class="descr-chip"><span class="descr-label">Constraints:</span> <span class="descr-value">${e.constraints}</span></div>`:""} ${e.defaultValue?u`<div class="descr-chip"><span class="descr-label">Default:</span> <span class="descr-value">${e.defaultValue}</span></div>`:""} ${e.allowedValues?u`<div class="descr-chip"><span class="descr-label">${e.type==="const"?"Value":"Allowed"}:</span> <span class="descr-value">${e.allowedValues}</span></div>`:""} ${e.pattern?u`<div class="descr-chip"><span class="descr-label">Pattern:</span> <span class="descr-value">${e.pattern}</span></div>`:""} ${e.formatNote?u`<div class="descr-chip"><span class="descr-label">Format:</span> <span class="descr-value">${e.formatNote}</span></div>`:""} ${e.contentMediaType?u`<div class="descr-chip"><span class="descr-label">Media-Type:</span> <span class="descr-value">${e.contentMediaType}</span></div>`:""} ${e.contentEncoding?u`<div class="descr-chip"><span class="descr-label">Encoding:</span> <span class="descr-value">${e.contentEncoding}</span></div>`:""}`:""}renderDescriptionHtml(e,t=""){return!e&&!t?"":u`${M(H(T(t?e?`<b>${t}:</b> ${e}`:`<b>${t}</b>`:e)))}`}renderDescrCell(e,t=null,r=""){let a=typeof e=="string"?e.trim():"",n=this.hasDetailChips(t);if(!a&&!r&&!n)return u`<div class="td key-descr"></div>`;let s,i;if(tc(a)&&tc(r))s=r?u`<p><b>${r}${a?":":""}</b> ${a}</p>`:a?u`<p>${a}</p>`:"",i=n&&!!s;else{let l=Zm(a,r);s=u`${l.summary?u`<span class="descr-summary">${M(l.summary)}</span>`:""}${l.html?M(l.html):""}`,i=l.hasMore||!!l.html&&n}let o=this.schemaDescriptionExpanded==="true";return u`<div class="td key-descr"><div class="descr-body m-markdown-small ${i?"has-more":""}"><span class="descr-expand-toggle" role="button" tabindex="0" aria-label="Toggle description" aria-expanded="${o?"true":"false"}">➔</span>${s}${n?u`<div class="item-details">${this.renderDetailChips(t)}</div>`:""}</div></div>`}renderToolbar(e){return u`<div class="toolbar"><div class="toolbar-item schema-root-type ${e}">${e}</div>${this.allowSchemaDescriptionExpandToggle==="true"?u`<div style="flex:1"></div><div part="schema-toolbar-item schema-multiline-toggle" class="toolbar-item schema-multiline-toggle">${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}</div>`:""}</div>`}};x([S({type:Object})],_e.prototype,"config",void 0),x([S({type:Object})],_e.prototype,"data",void 0),x([S({type:Number,attribute:"schema-expand-level"})],_e.prototype,"schemaExpandLevel",void 0),x([S({type:String,attribute:"schema-description-expanded"})],_e.prototype,"schemaDescriptionExpanded",void 0),x([S({type:String,attribute:"allow-schema-description-expand-toggle"})],_e.prototype,"allowSchemaDescriptionExpandToggle",void 0),x([S({type:String,attribute:"schema-hide-read-only"})],_e.prototype,"schemaHideReadOnly",void 0),x([S({type:String,attribute:"schema-hide-write-only"})],_e.prototype,"schemaHideWriteOnly",void 0);var ac=class extends _e{static get styles(){return[et,ec,Ea,G`.tree{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px);direction:ltr;& .tr:hover{background-color:#00000026}& .tr.expanded-descr{max-height:none}&.expanded-all-descr .tr,&.collapsed-all-descr .tr.expanded-descr{border-bottom:1px solid color-mix(in srgb, var(--border) 60%, transparent)}&.collapsed-all-descr .tr.expanded-descr{box-shadow:0 -1px 0 color-mix(in srgb, var(--border) 60%, transparent)}& .key{max-width:300px}&.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + 8px);overflow:hidden;& .key{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}}}.tr{&.expanded{&:hover{&>.td.key>.open-bracket,&+.inside-bracket+.close-bracket{color:var(--primary)}&+.inside-bracket{border-left:1px solid var(--muted-foreground)}}& .open-bracket .open-bracket-collapsed{display:none}}&.collapsed{&+.inside-bracket,&+.inside-bracket+.close-bracket{display:none;overflow:hidden}& .open-bracket .open-bracket-expanded{display:none}}}@container (width<500px){.tree.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(2 * (var(--font-size-small) + 8px))}}.inside-bracket{&.xxx-of-option{border-left:1px solid #0000}&.object,&.array{border-left:1px dotted var(--border)}}.open-bracket{cursor:pointer;border-radius:min(var(--radius), .5rem);border:1px solid #0000;padding:0 20px 0 0;display:inline-block;&:hover{color:var(--primary);border:1px solid var(--border)}&:focus-visible{outline:2px solid var(--primary);border-color:var(--primary)}}.close-bracket{font-family:var(--font-mono);display:inline-block}`,vt]}render(){if(!this.data)return u`<div class="tree"><span class="mono-font" style="color:var(--destructive)">Schema not found</span></div>`;let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return u`<div class="tree ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${r=>this.handleAllEvents(r)}" @keydown="${r=>this.handleKeyDown(r)}">${this.renderToolbar(e)} <span part="schema-description" class="m-markdown">${this.renderDescriptionHtml(t)}</span> ${this.renderAST(this.data)}</div>`}renderAST(e,t="",r=0,a=0){if(this.isFieldHidden(e))return"";let n=400-a*12,s=r<this.schemaExpandLevel,i=this.getReadWriteBadge(e),o=this.getReadWriteTip(e),l=e.nullable?"null\u2503":"",c=e.nullable?"nullable":"",d=this.renderDeprecatedIcon(e);if(e.kind==="array"){let p=e.items;if(!p){let h=e.name?`${e.name}${o?` (${o})`:""}`:"";return u`<div class="tr ${s?"expanded":"collapsed"} array ${c}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${n}px">${d}${e.name?u`<span class="key-label" title="${h}">${e.name}${e.required?u`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} <span class="open-bracket array">${l}[ ]</span></div>${this.renderDescrCell(e.description)}</div>`}if(p.kind==="primitive"){let h=(p.formatNote||!p.format?p.contentMediaType:"")||p.typeLabel||p.type||"string",y=this.getDataTypeCss(p.typeCss||h),m=e.name?`${e.name}${o?` (${o})`:""}`:"";return u`<div class="tr primitive ${c}" title="${e.deprecated||p.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated||p.deprecated?"deprecated":""}" style="min-width:${n}px">${d}${e.name?u`<span class="key-label" title="${m}">${e.name}${e.required?u`<span style="color:var(--destructive)">*</span>`:""}:</span>`:""} <span class="${y}" title="${o||F}">${l}[${h}]${i}</span></div>${this.renderDescrCell(e.description||p.description,p)}</div>`}if(p.kind==="object"){let h=u`<span class="open-bracket array-of-object" role="button" tabindex="0" aria-label="Toggle ${e.name||"object"}" aria-expanded="${s?"true":"false"}">${l}<span class="open-bracket-expanded">[{</span><span class="open-bracket-collapsed">[{...}]</span></span>`,y=e.name?`${e.name}${o?` (${o})`:""}`:"";return u`<div class="tr ${s?"expanded":"collapsed"} object ${c}" title="${e.deprecated||p.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated||p.deprecated?"deprecated":""}" style="min-width:${n}px">${d}${e.name?u`<span class="key-label" title="${y}">${e.name}${e.required?u`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} ${h}</div>${this.renderDescrCell(e.description||p.description)}</div><div class="inside-bracket object" style="padding-left:${12}px">${p.properties?.map(m=>this.renderAST(m,"object",r+1,a+1))} ${p.patternProperties?.map(m=>this.renderAST(m,"object",r+1,a+1))} ${p.additionalProperties?this.renderAST(p.additionalProperties,"object",r+1,a+1):""} ${p.unions?.map(m=>this.renderAST(m,"object",r+1,a+1))}</div><div class="close-bracket">${"}]"}</div>`}if(p.kind==="array"){let h=e.arrayType==="object"?"":e.arrayType,y=u`<span class="open-bracket array-of-array" data-array-type="${h}" role="button" tabindex="0" aria-label="Toggle ${e.name||"array"}" aria-expanded="${s?"true":"false"}">${l}<span class="open-bracket-expanded">[[ ${h} </span><span class="open-bracket-collapsed">[[...]]</span></span>`,m=e.name?`${e.name}${o?` (${o})`:""}`:"";return u`<div class="tr ${s?"expanded":"collapsed"} array ${c}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${n}px">${d}${e.name?u`<span class="key-label" title="${m}">${e.name}${e.required?u`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} ${y}</div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(p,"array",r+1,a+1)}</div><div class="close-bracket">${"]]"}</div>`}let f=e.name?`${e.name}${o?` (${o})`:""}`:"";return u`<div class="tr ${s?"expanded":"collapsed"} array ${c}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${n}px">${d}${e.name?u`<span class="key-label" title="${f}">${e.name}${e.required?u`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} <span class="open-bracket array" role="button" tabindex="0" aria-label="Toggle ${e.name||"array"}" aria-expanded="${s?"true":"false"}">${l}<span class="open-bracket-expanded">[</span><span class="open-bracket-collapsed">[...]</span></span></div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket array" style="padding-left:${12}px">${this.renderAST(p,"array",r+1,a+1)}</div><div class="close-bracket">]</div>`}if(e.kind==="object"){let p=u`<span class="open-bracket object" role="button" tabindex="0" aria-label="Toggle ${e.name||"object"}" aria-expanded="${s?"true":"false"}">${l}<span class="open-bracket-expanded">{</span><span class="open-bracket-collapsed">{...}</span></span>`,f=e.name?`${e.name}${o?` (${o})`:""}`:"";return u`<div class="tr ${s?"expanded":"collapsed"} object ${c}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${n}px">${d}${e.name?u`<span class="key-label" title="${f}">${e.name}${e.required?u`<span style="color:var(--destructive)">*</span>`:""}${i}:</span>`:""} ${p}</div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket object" style="padding-left:${12}px">${e.properties?.map(h=>this.renderAST(h,"object",r+1,a+1))} ${e.patternProperties?.map(h=>this.renderAST(h,"object",r+1,a+1))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",r+1,a+1):""} ${e.unions?.map(h=>this.renderAST(h,"object",r+1,a+1))}</div><div class="close-bracket">${"}"}</div>`}if(e.kind==="union"){let p=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),f=t==="xxx-of-option"?a:a+1,h=e.name&&t!=="xxx-of-option",y=h?n-12:n,m=u`<div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${y}px"><span class="key-label xxx-of-key">${p}</span></div>${h?"":this.renderDescrCell(e.description)}</div><div class="inside-bracket xxx-of-option" style="padding-left:0">${e.options?.map((g,k)=>u`<div><div class="tr expanded xxx-of-option"><div class="td key" style="min-width:${y}px"><span class="key-label xxx-of-key">OPT ${g.optionIndex||k+1}</span> ${g.optionTitle?u`<span class="xxx-of-descr">${g.optionTitle}</span>`:""}</div></div>${this.renderAST(g,"xxx-of-option",r,f)}</div>`)}</div>`;return u`${e.properties?.map(g=>this.renderAST(g,"object",r,a))} ${h?u`<div class="tr expanded xxx-of-prop"><div class="td key" style="min-width:${n}px"><span class="key-label" title="${e.name}">${e.name}${e.required?u`<span style="color:var(--destructive)">*</span>`:""}:</span></div>${this.renderDescrCell(e.description)}</div><div class="inside-bracket xxx-of-option" style="padding-left:${12}px">${m}</div>`:m}`}if(e.kind==="primitive"){let p=this.getDataTypeCss(e.typeCss||e.type),f=e.name?`${e.name}${o?` (${o})`:""}`:"";return u`<div class="tr primitive" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="min-width:${n}px">${d}${e.name?u`<span class="key-label" title="${f}">${e.name}${e.required?u`<span style="color:var(--destructive)">*</span>`:""}:</span>`:""} <span class="${p}" title="${o||F}">${t==="array"?`[${e.typeLabel||e.type}]`:e.typeLabel||e.type}${i}</span></div>${this.renderDescrCell(e.description,e,e.title)}</div>`}return""}};ac=x([Ae("schema-tree")],ac);var Ca=class extends fe{constructor(...e){super(...e),this.placeholder="",this.value=[]}static get properties(){return Object.fromEntries(this.elementProperties||[])}render(){let e="";return Array.isArray(this.value)&&(e=u`${this.value.filter(t=>t!==""&&t!=null&&String(t).trim()!=="").map(t=>u`<span class="tag">${t}</span>`)}`),u`<div class="tags" @click="${t=>this.focusEditor(t)}">${e} <input type="text" class="editor" @paste="${t=>this.afterPaste(t)}" @keydown="${t=>this.afterKeyDown(t)}" @blur="${t=>this.onBlur(t)}" placeholder="${this.placeholder||""}"></div>`}focusEditor(e){e.target.classList.contains("tags")&&this.shadowRoot?.querySelector(".editor")?.focus()}dispatchEvents(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:this.value}})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:this.value}}))}afterPaste(e){let t=(e.clipboardData||window.clipboardData).getData("Text"),r=t?t.split(",").filter(a=>a.trim()!==""):"";r&&(this.value=Array.isArray(this.value)?[...this.value,...r]:r,this.dispatchEvents()),e.preventDefault()}afterKeyDown(e){if(e.key==="Enter"||e.keyCode===13){e.stopPropagation(),e.preventDefault();let t=e.target.value?e.target.value.trim():"";t&&(this.value=Array.isArray(this.value)?[...this.value,t]:[t],e.target.value="",this.dispatchEvents())}else(e.key==="Backspace"||e.key==="Delete"||e.keyCode===8||e.keyCode===46)&&(!e.target.value||e.target.value.length===0)&&Array.isArray(this.value)&&this.value.length>0&&(e.preventDefault(),this.value=this.value.slice(0,-1),this.dispatchEvents())}onBlur(e){let t=e.target.value?e.target.value.trim():"";t&&(this.value=Array.isArray(this.value)?[...this.value,t]:[t],e.target.value="",this.dispatchEvents())}static get styles(){return[G`.tags{box-sizing:border-box;min-height:calc(2.75 * var(--font-size-small) + 2px);border-radius:var(--radius);border:1px solid var(--input);cursor:text;background:var(--input-background);outline:none;flex-wrap:wrap;align-items:center;padding:0;transition:border-color .2s,box-shadow .2s;display:flex;overflow:hidden;&:focus-within{border-color:var(--primary);box-shadow:var(--focus-shadow)}}.tag,.editor{margin:2px;padding:3px}.tag{border:1px solid var(--input);background:var(--muted);color:var(--foreground);border-radius:var(--radius);word-break:break-all;font-size:var(--font-size-small)}.tag:hover~#cursor{display:block}.editor{color:var(--foreground);min-width:60px;line-height:inherit;font-family:inherit;font-size:calc(var(--font-size-small) + 1px);background:0 0;border:1px solid #0000;outline:none;flex:1}.editor::placeholder{color:var(--muted-foreground);opacity:1}`]}};x([S({type:String})],Ca.prototype,"placeholder",void 0),x([S({type:Array,attribute:"value",converter:{fromAttribute:e=>e?e.split(",").filter(t=>t.trim()!==""):[],toAttribute:e=>Array.isArray(e)?e.join(","):e},hasChanged(e,t){return e===t?!1:!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length||e.some((r,a)=>r!==t[a])}})],Ca.prototype,"value",void 0),Ca=x([Ae("tag-input")],Ca);function Ta(e,t,{cls:r="tab-btn",part:a=!0}={}){let n=a?"tab-btn":F,s=u`<button part="${n}" class="${r} ${t==="example"?"active":""}" data-tab="example">EXAMPLE</button>`,i=u`<button part="${n}" class="${r} ${t==="example"?"":"active"}" data-tab="schema">SCHEMA</button>`;return e==="schema"?[i,s]:[s,i]}function Jm(e,t){return u`<div class="value-list" part="value-list"><span class="param-constraint-label value-list-label" part="value-list-label">${e}</span><ul class="value-list-items" part="value-list-items" role="list">${t.map(r=>u`<li>${r}</li>`)}</ul></div>`}function nc(e,t,r){let a=s=>u`<ul class="value-list-items" part="value-list-items" role="list">${s.map(i=>u`<li>${i}</li>`)}</ul>`,n=(s,i)=>u`<dt class="param-constraint-label" part="param-constraint-label">${s}</dt><dd>${i}</dd>`;return u`<dl class="param-constraint" part="param-constraint">${e.default?n("Default:",e.default):""} ${e.pattern?n("Pattern:",e.pattern):""} ${e.formatNote?n("Format:",e.formatNote):""} ${e.constrain?n("Limits:",a(e.constrain.split("\u2503").map(s=>s.trim()).filter(Boolean))):""} ${t?n("Allowed:",a(t)):""} ${r?n("Examples:",a(r)):""}</dl>`}function sc(e,t,r=[]){return!e?.trim()&&!!t&&r.length>0&&!gl(r)}function Oa(e,t,r){return u`${t==="array"?"[":""} <button type="button" part="anchor anchor-param-example" class="value-link" ?disabled="${this.allowTry!=="true"}" data-example-type="${t==="array"?t:"string"}" data-example="${e.value&&Array.isArray(e.value)?e.value?.join("~|~"):(typeof e.value=="object"?JSON.stringify(e.value,null,2):e.value)||""}" title="${e.value&&Array.isArray(e.value)?e.value?.join("~|~"):(typeof e.value=="object"?JSON.stringify(e.value,null,2):e.value)||""}" @click="${a=>{let n=a.target.closest(".param-list").querySelector(`[data-pname="${r}"]`);n&&(n.value=a.target.dataset.exampleType==="array"?a.target.dataset.example.split("~|~"):a.target.dataset.example)}}">${e.printableValue||e.value}</button> ${t==="array"?"] ":""}`}function Gm(e,t,r){return Jm("Examples:",e.map(a=>Oa.call(this,a,t,r)))}function Xm(e,t,r){return u`<ul class="param-example-list" part="param-example-list" role="list">${e.map(a=>u`<li>${Oa.call(this,a,t,r)} ${a.summary?.length>0?u`<span>(${a.summary})</span>`:""} ${a.description?.length>0?u`<div class="m-markdown-small">${M(H(T(a.description)))}</div>`:""}</li>`)}</ul>`}function ic(e,t,r=[]){return u`${r.length>0?gl(r)?u`<span class="param-constraint-label">Examples: </span>${Xm.call(this,r,t,e)}`:Gm.call(this,r,t,e):""}`}var oc=e=>typeof e=="object"&&e&&!Array.isArray(e)?{Example:{value:e}}:xe(e);function Fa(e){let t=this.parameters?this.parameters.filter(n=>n.in===e):[];if(t.length===0)return"";let r="";e==="path"?r="Path parameters":e==="query"?r="Query-string parameters":e==="header"?r="Request headers":e==="cookie"&&(r="Cookies");let a=[];for(let n of t){let[s,i,o]=im(n);if(!s)continue;let l=ma(s);if(!l)continue;let c=ha(l.baseType,l.format,l.type);l.formatNote=c.formatNote;let d=se(s),p=this.activeParameterSchemaTabs?.[n.name]||this.config?.defaultSchemaTab||"example",f="form",h=!0,y=!1;(e==="query"||e==="header"||e==="path")&&(n.style&&["form","spaceDelimited","pipeDelimited","deepObject"].includes(n.style)?f=n.style:i&&(f=i),typeof n.explode=="boolean"&&(h=n.explode),typeof n.allowReserved=="boolean"&&(y=n.allowReserved));let m=fl(xe(n.examples)||oc(n.example)||oc(o?.example)||xe(o?.examples)||xe(l.examples)||xe(l.example),l.type);!m.exampleVal&&(l.type==="object"||l.type.split("\u2503").includes("object"))&&(m.exampleVal=Nt(s,i||"json",{},{},this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1)[0]?.exampleValue||"");let g=l.default||l.constrain||l.allowedValues||l.pattern||l.formatNote,k=sc(n.description,g,m.exampleList);a.push(u`<li class="param ${n.deprecated?"deprecated":""}" part="param" title="${n.deprecated?"Deprecated":""}"><div class="param-label" part="param-label"><div class="param-name ${n.deprecated?"deprecated":""}" part="param-name">${n.deprecated?u`<svg class="param-deprecated-icon" viewBox="0 0 10 10" width="10" height="10" aria-hidden="true"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${n.required?u`<span class="param-required" title="Required">*</span>`:""} ${n.name}</div><div class="param-type" part="param-type">${l.type==="array"||l.type.split("\u2503").includes("array")?`${l.arrayType||l.type}`:`${l.format&&!c.formatNote?c.label:l.contentMediaType&&!l.type.includes("\u2503")?l.contentMediaType:c.label}`}</div></div>${this.allowTry==="true"?u`<div class="param-input" part="param-input">${l.type==="array"||l.type.split("\u2503").includes("array")&&!l.type.split("\u2503").includes("object")?u`<tag-input class="request-param" id="tag-input-request-param-${n.name}" style="width:100%" data-ptype="${e}" data-pname="${n.name}" data-item-type="${s.items?.type||""}" data-example="${Array.isArray(m.exampleVal)?m.exampleVal.join("~|~"):m.exampleVal}" data-param-serialize-style="${f}" data-param-serialize-explode="${h}" data-param-allow-reserved="${y}" data-x-fill-example="${n["x-fill-example"]||"yes"}" data-array="true" placeholder="add-multiple ↩" .value="${n["x-fill-example"]==="no"?ls:$r(this.fillRequestFieldsWithExample==="true"?Array.isArray(m.exampleVal)?m.exampleVal:[m.exampleVal]:ls)}" @input="${v=>{let w=this.getRequestPanel(v);this.liveCURLSyntaxUpdate(w)}}" @change="${v=>{let w=this.getRequestPanel(v);this.liveCURLSyntaxUpdate(w)}}"></tag-input>`:l.type==="object"||l.type.split("\u2503").includes("object")?u`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${v=>{if(v.target.tagName.toLowerCase()==="button"){let w={...this.activeParameterSchemaTabs};w[n.name]=v.target.dataset.tab,this.activeParameterSchemaTabs=w}}}">${Ta(this.config?.defaultSchemaTab,p)}</div>${u`<div part="tab-content" class="tab-content col" data-tab="example" style="display:${p==="example"?"block":"none"};padding-left:5px;width:100%"><textarea id="textarea-request-param-${n.name}" class="textarea request-param" part="textarea textarea-param" data-ptype="${e}-object" data-pname="${n.name}" data-example="${typeof m.exampleVal=="object"?JSON.stringify(m.exampleVal,null,2):m.exampleVal}" data-param-serialize-style="${f}" data-param-serialize-explode="${h}" data-param-allow-reserved="${y}" data-x-fill-example="${n["x-fill-example"]||"yes"}" spellcheck="false" .value="${n["x-fill-example"]==="no"?"":$r(this.fillRequestFieldsWithExample==="true"?typeof m.exampleVal=="object"?JSON.stringify(m.exampleVal,null,2):m.exampleVal:"")}" style="resize:vertical;width:100%;height:${"read focused".includes(this.renderStyle)?"180px":"120px"}" @input="${v=>{let w=this.getRequestPanel(v);this.liveCURLSyntaxUpdate(w)}}"></textarea></div>`} ${u`<div part="tab-content" class="tab-content col" data-tab="schema" style="display:${p==="example"?"none":"block"};padding-left:5px;width:100%"><schema-tree class="json" style="display:block" .data="${d}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly.includes(this.method)}" schema-hide-write-only="${this.schemaHideWriteOnly.includes(this.method)}" exportparts="wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
                          file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, 
                          anchor:anchor, anchor-param-example:anchor-param-example"></schema-tree></div>`}</div>`:u`<input type="${l.format==="password"?"password":"text"}" spellcheck="false" style="width:100%" id="input-request-param-${n.name}" class="request-param" part="textbox textbox-param" data-ptype="${e}" data-pname="${n.name}" data-example="${Array.isArray(m.exampleVal)?m.exampleVal.join("~|~"):m.exampleVal}" data-param-allow-reserved="${y}" data-x-fill-example="${n["x-fill-example"]||"yes"}" data-array="false" .value="${n["x-fill-example"]==="no"?"":$r(this.fillRequestFieldsWithExample==="true"?m.exampleVal:"")}" @input="${v=>{let w=this.getRequestPanel(v);this.liveCURLSyntaxUpdate(w)}}">`}</div>`:""} ${g?nc(l,l.allowedValues&&String(l.allowedValues).split("\u2503").map(v=>u`<button type="button" part="anchor anchor-param-constraint" class="value-link" ?disabled="${this.allowTry!=="true"}" data-type="${l.type==="array"?l.type:"string"}" data-enum="${v.trim()}" @click="${w=>{let b=w.target.closest(".param-list").querySelector(`[data-pname="${n.name}"]`);b&&(b.value=w.target.dataset.type==="array"?[w.target.dataset.enum]:w.target.dataset.enum)}}">${v}</button>`),k&&m.exampleList.map(v=>Oa.call(this,v,l.type,n.name))):""}<div class="param-details" part="param-details">${n.description?u`<div class="m-markdown-small">${M(H(T(n.description)))}</div>`:""} ${k?"":ic.call(this,n.name,l.type,m.exampleList)}</div></li>`)}return u`<h5 class="rapidoc-heading label-heading table-title top-gap" part="heading heading-5">${r}</h5><div class="param-list-container"><ul class="param-list" part="param-list" role="list">${a}</ul></div>`}var lc=(e,t,r)=>{let a=new Map;for(let n=t;n<=r;n++)a.set(e[n],n);return a},Ym=ka(class extends $a{constructor(e){if(super(e),e.type!==Me.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,r){let a;r===void 0?r=t:t!==void 0&&(a=t);let n=[],s=[],i=0;for(let o of e)n[i]=a?a(o,i):i,s[i]=r(o,i),i++;return{values:s,keys:n}}render(e,t,r){return this.dt(e,t,r).values}update(e,[t,r,a]){let n=Wm(e),{values:s,keys:i}=this.dt(t,r,a);if(!Array.isArray(n))return this.ut=i,s;let o=this.ut??=[],l=[],c,d,p=0,f=n.length-1,h=0,y=s.length-1;for(;p<=f&&h<=y;)if(n[p]===null)p++;else if(n[f]===null)f--;else if(o[p]===i[h])l[h]=ut(n[p],s[h]),p++,h++;else if(o[f]===i[y])l[y]=ut(n[f],s[y]),f--,y--;else if(o[p]===i[y])l[y]=ut(n[p],s[y]),kr(e,l[y+1],n[p]),p++,y--;else if(o[f]===i[h])l[h]=ut(n[f],s[h]),kr(e,n[p],n[f]),f--,h++;else if(c===void 0&&(c=lc(i,h,y),d=lc(o,p,f)),c.has(o[p]))if(c.has(o[f])){let m=d.get(i[h]),g=m===void 0?null:n[m];if(g===null){let k=kr(e,n[p]);ut(k,s[h]),l[h]=k}else l[h]=ut(g,s[h]),kr(e,n[p],g),n[m]=null;h++}else xs(n[f]),f--;else xs(n[p]),p++;for(;h<=y;){let m=kr(e,l[y+1]);ut(m,s[h]),l[h++]=m}for(;p<=f;){let m=n[p++];m!==null&&xs(m)}return this.ut=i,Ql(e,l),ie}}),He=e=>e??F,cc=class extends _e{static get styles(){return[et,ec,G`.table{font-size:var(--font-size-small);text-align:left;line-height:calc(var(--font-size-small) + 6px);& .table-container{border:1px solid var(--border);background:color-mix(in srgb, var(--card) 80%, transparent);max-width:100%;overflow-x:auto}& .table-header{background:var(--card);border-bottom:1px solid var(--border);padding:8px 4px;display:flex;& .td{font-family:var(--font-sans);color:var(--foreground);font-weight:700}}& .tr{border-bottom:1px dotted var(--border);width:calc(100% - 5px);padding:0 0 0 5px;&.expanded{& .obj-toggle:after{content:"-"}&+.object-body{display:block}}&.collapsed{& .obj-toggle:after{content:"+"}&+.object-body{display:none}}}& .td{padding:4px 0}& .key{width:var(--table-schema-key-width);text-overflow:var(--table-schema-key-text-overflow);white-space:var(--table-schema-key-whitespace);overflow:hidden;& .key-label{font-size:var(--font-size-mono)}&.deprecated .key-label{color:var(--destructive)}}& .key-type{white-space:normal;width:150px}&.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(var(--font-size-small) + 16px);overflow:hidden}}.obj-toggle{color:var(--primary);cursor:pointer;font-size:14px;font-family:var(--font-mono);text-align:center;user-select:none;box-sizing:border-box;vertical-align:middle;background:0 0;border:1px solid #0000;border-radius:2px;justify-content:center;align-items:center;width:14px;min-width:14px;height:14px;margin-top:-2px;margin-left:-16px;padding:0;line-height:12px;display:inline-flex;&:hover{border-color:var(--primary)}&:focus-visible{outline:2px solid var(--primary);border-color:var(--primary)}}@supports (grid-template-columns:subgrid){.table{& .table-container{grid-template-columns:minmax(var(--table-schema-key-width), auto) minmax(150px, auto) 1fr;display:grid}& .table-header,& .tr{grid-column:1/-1;grid-template-columns:subgrid;box-sizing:border-box;width:100%;padding:0 4px;display:grid;& .key,& .key-type{width:auto}& .key-descr{min-width:0}}& .object-body{display:contents}& .tr.collapsed+.object-body{display:none}& .tr.expanded+.object-body{display:contents}}}@container (width<500px){.table{& .table-container{grid-template-columns:minmax(0,1fr) minmax(0,max-content) 0}& .tr>.key-descr{grid-column:1/-1}& .table-header>.key-descr{display:none}&.collapsed-all-descr .tr:not(.expanded-descr){max-height:calc(2 * (var(--font-size-small) + 16px))}}}`,vt]}render(){if(!this.data)return"";let e=this.data.kind==="primitive"?this.data.type:this.data.kind||"",t=this.data.description||"";return u`<div class="table ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${r=>this.handleAllEvents(r)}" @keydown="${r=>this.handleKeyDown(r)}">${this.renderToolbar(e)} <span part="schema-description" class="m-markdown">${this.renderDescriptionHtml(t)}</span><div class="table-container"><div class="tr table-header"><div class="td key">Field</div><div class="td key-type">Type</div><div class="td key-descr">Description</div></div>${this.renderAST(this.data)}</div></div>`}renderAST(e,t="",r=0,a=0){if(this.isFieldHidden(e))return"";let n=16*(a+1),s=r<this.schemaExpandLevel,i=e.nullable?"nullable":"",o=this.renderDeprecatedIcon(e),l=this.getReadWriteBadge(e),c=this.getReadWriteTip(e);if(e.kind==="array"){let d=e.items;if(!d){let h=e.dataTypeLabel||(e.nullable?"array \u2503 null":"array");return u`<div class="tr array ${i}" data-obj="${e.name||""}"><div class="td key" style="padding-left:${n}px"><span class="key-label" title="${e.name||F}">${o}${e.name||""}</span> ${e.required?u`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${c||F}">${h}${l}</div>${this.renderDescrCell(e.description)}</div>`}if(d.kind==="primitive"){let h=(d.formatNote||!d.format?d.contentMediaType:"")||d.typeLabel||d.type||"string",y=this.getDataTypeCss(d.typeCss||h);return u`<div class="tr primitive ${i}" title="${e.deprecated||d.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated||d.deprecated?"deprecated":""}" style="padding-left:${n}px">${o}${e.name?u`<span class="key-label" title="${e.name}">${e.name}</span>`:""} ${e.required?u`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type ${y}" title="${c||F}">[${h}]${e.nullable?" \u2503 null":""}${l}</div>${this.renderDescrCell(e.description||d.description,d)}</div>`}let p="array";d.kind==="object"?p="array of object":d.kind==="array"?p=`array of array ${e.arrayType?`of ${e.arrayType}`:""}`.trim():d.kind==="union"&&(p="array of union"),e.nullable&&(p+=" \u2503 null");let f=d.kind!=="object"||!!(d.properties&&d.properties.length>0||d.patternProperties&&d.patternProperties.length>0||d.additionalProperties||d.unions&&d.unions.length>0);return u`<div class="tr ${s?"expanded":"collapsed"} array ${i}" data-obj="${e.name||""}" title="${e.deprecated?`Deprecated ${e.name}`:e.name||F}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${n}px">${e.name&&f?u`<button type="button" class="obj-toggle" data-obj="${e.name}" aria-label="Toggle ${e.name}" aria-expanded="${s?"true":"false"}"></button>`:""} <span class="key-label" title="${e.name||F}" style="display:inline-block;${f?"margin-left:-6px;":""}">${o}${e.name||""} </span>${e.required?u`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${c||F}">${p}${l}</div>${this.renderDescrCell(e.description||d.description)}</div>${f?u`<div class="object-body">${d.kind==="object"?u`${d.properties?.map(h=>this.renderAST(h,"object",r+1,a+1))} ${d.patternProperties?.map(h=>this.renderAST(h,"object",r+1,a+1))} ${d.additionalProperties?this.renderAST(d.additionalProperties,"object",r+1,a+1):""} ${d.unions?.map(h=>this.renderAST(h,"object",r+1,a+1))}`:this.renderAST(d,"array",r+1,a+1)}</div>`:""}`}if(e.kind==="object"){let d=e.dataTypeLabel||(e.nullable?"object \u2503 null":"object"),p=!!(e.properties&&e.properties.length>0||e.patternProperties&&e.patternProperties.length>0||e.additionalProperties||e.unions&&e.unions.length>0);return u`${e.name?u`<div class="tr ${s?"expanded":"collapsed"} object ${i}" data-obj="${e.name}" title="${e.deprecated?`Deprecated ${e.name}`:e.name}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${n}px">${p?u`<button type="button" class="obj-toggle" data-obj="${e.name}" aria-label="Toggle ${e.name}" aria-expanded="${s?"true":"false"}"></button>`:""} <span class="key-label" title="${e.name||F}" style="display:inline-block;${p?"margin-left:-6px;":""}">${o}${e.name} </span>${e.required?u`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type" title="${c||F}">${d}${l}</div>${this.renderDescrCell(e.description)}</div>`:""} ${p?u`<div class="object-body">${e.properties?.map(f=>this.renderAST(f,"object",r+1,a+ +!!e.name))} ${e.patternProperties?.map(f=>this.renderAST(f,"object",r+1,a+ +!!e.name))} ${e.additionalProperties?this.renderAST(e.additionalProperties,"object",r+1,a+ +!!e.name):""} ${e.unions?.map(f=>this.renderAST(f,"object",r+1,a+ +!!e.name))}</div>`:""}`}if(e.kind==="union"){let d=(e.operator==="anyOf"?"ANY OF":"ONE OF")+(e.suffix?` ${e.suffix}`:""),p=e.name&&t!=="xxx-of-option";return u`${e.properties?.map(f=>this.renderAST(f,"object",r,a))}<div class="tr expanded xxx-of" data-obj="${p?e.name:d}">${p?u`<div class="td key" style="padding-left:${n}px"><span class="key-label" title="${e.name}">${e.name}</span> ${e.required?u`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type"><span class="xxx-of-key">${d}</span></div>`:u`<div class="td key" style="padding-left:${n}px"><span class="xxx-of-key" style="margin-left:-6px">${d}</span></div><div class="td key-type"></div>`} ${this.renderDescrCell(e.description)}</div><div class="object-body">${e.options?.map((f,h)=>f.kind==="primitive"?u`<div class="object-body">${this.renderAST(f,"xxx-of-option",r+1,a+1)}</div>`:u`<div class="tr expanded xxx-of-option" data-obj="OPTION ${f.optionIndex||h+1}"><div class="td key" style="padding-left:${n+16}px"><span class="xxx-of-key">OPT ${f.optionIndex||h+1}</span> ${f.optionTitle?u`<span class="xxx-of-descr">${f.optionTitle}</span>`:""}</div><div class="td key-type"></div><div class="td key-descr"></div></div><div class="object-body">${this.renderAST(f,"xxx-of-option",r+1,a+1)}</div>`)}</div>`}if(e.kind==="primitive"){let d=this.getDataTypeCss(e.typeCss||e.type),p=t==="xxx-of-option"&&!!e.optionIndex;return u`<div class="tr primitive ${i}" title="${e.deprecated?"Deprecated":F}"><div class="td key ${e.deprecated?"deprecated":""}" style="padding-left:${n}px">${p?u`<span class="xxx-of-key">OPT ${e.optionIndex}</span>${e.optionTitle?u`<span class="xxx-of-descr">${e.optionTitle}</span>`:""}`:""}${o}${e.name&&!p?u`<span class="key-label" title="${e.name}">${e.name}</span>`:""} ${e.required?u`<span style="color:var(--destructive)">*</span>`:""}</div><div class="td key-type ${d}" title="${c||F}">${t==="array"?`[${e.typeLabel||e.type}]`:e.typeLabel||e.type}${l}</div>${this.renderDescrCell(e.description,e,e.title)}</div>`}return""}};cc=x([Ae("schema-table")],cc);function dc(e,t){if(!e.includes("form-urlencode"))return{style:void 0,explode:void 0};let r=/json/i.test(t?.contentType||"")?"json":["form","spaceDelimited","pipeDelimited","deepObject"].includes(t?.style)?t.style:"form",a=typeof t?.explode=="boolean"?t.explode:r==="form";return{style:r,explode:String(a)}}function Qm(e,t,r,a="",n=void 0){let s=dc(r,n),i=se(t),o=Nt(t,"json",xe(t.examples),xe(t.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);return u`<div part="tab-panel" class="tab-panel row" style="min-height:220px;border-left:6px solid var(--border);align-items:stretch"><div style="width:24px;background:var(--border)"><div class="row" style="flex-direction:row-reverse;width:160px;height:24px;transform:rotate(270deg) translateX(-160px);transform-origin:top left;display:block" @click="${l=>{if(l.target.classList.contains("v-tab-btn")){let{tab:c}=l.target.dataset;if(c){let d=l.target.closest(".tab-panel"),p=d.querySelector(`.v-tab-btn[data-tab="${c}"]`),f=[...d.querySelectorAll(`.v-tab-btn:not([data-tab="${c}"])`)],h=d.querySelector(`.tab-content[data-tab="${c}"]`),y=[...d.querySelectorAll(`.tab-content:not([data-tab="${c}"])`)];p.classList.add("active"),h.style.display="block",f.forEach(m=>{m.classList.remove("active")}),y.forEach(m=>{m.style.display="none"})}}l.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=l.target.dataset.tab)}}">${Ta(this.config?.defaultSchemaTab,this.activeSchemaTab,{cls:"v-tab-btn",part:!1})}</div></div>${u`<div class="tab-content col" data-tab="example" style="display:${this.activeSchemaTab==="example"?"block":"none"};padding-left:5px;width:100%"><textarea class="textarea" part="textarea textarea-param" style="width:100%;border:none;resize:vertical" data-array="false" data-ptype="${r.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${e}" data-content-type="${a}" data-object="true" data-param-serialize-style="${He(s.style)}" data-param-serialize-explode="${He(s.explode)}" data-example="${o[0]?.exampleValue||""}" .value="${$r(this.fillRequestFieldsWithExample==="true"&&o[0]?.exampleValue||"")}" spellcheck="false"></textarea></div>`} ${u`<div class="tab-content col" data-tab="schema" style="display:${this.activeSchemaTab==="example"?"none":"block"};padding-left:5px;width:100%">${this.schemaStyle==="table"?u`<schema-table .data="${i}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:u`<schema-tree .data="${i}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}</div>`}</div>`}function ef(e,t,r="",a={}){let n=[],s=om(e),i=lm(e);if(Object.keys(s).length>0){for(let o in s){let l=s[o];if(l.readOnly)continue;let c=l.examples||l.example||"",d=l.type,p=t.includes("form-data")?Im(l,a?.[o]):"",f=dc(t,a?.[o]),h=ma(l),y=ha(h.baseType,h.format,h.type);h.formatNote=y.formatNote;let m=fl(h.examples||h.example,h.type),g=d!=="object"&&(h.default||h.constrain||h.allowedValues||h.pattern||h.formatNote),k=sc(l.description,g,m.exampleList);n.push(u`<li class="param ${l.deprecated?"deprecated":""}" part="param" title="${l.deprecated?"Deprecated":""}"><div class="param-label" part="param-label"><div class="param-name ${l.deprecated?"deprecated":""}" part="param-name">${o}${i.includes(o)?u`<span class="param-required" title="Required">*</span>`:""}</div><div class="param-type" part="param-type">${h.type==="array"||h.type.split("\u2503").includes("array")?`${h.arrayType||h.type}`:`${h.format&&!y.formatNote?y.label:h.contentMediaType&&!h.type.includes("\u2503")?h.contentMediaType:y.label}`}</div></div>${d!=="object"&&this.allowTry!=="true"?"":u`<div class="param-input" part="param-input">${d==="array"?ml(l.items)?u`<div class="file-input-container col" style="align-items:flex-start;width:100%">${Ym(this.fileInputKeys[o]??[0],v=>v,(v,w)=>u`<div class="input-set row" style="width:100%;margin-top:${w>0?"4px":"0"}"><input type="file" part="file-input" style="width:100%" data-pname="${o}" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-array="false" data-file-array="true"> <button class="file-input-remove-btn" aria-label="Remove file" title="Remove" @click="${()=>this.onRemoveFileInput(o,v)}">✕</button></div>`)} <button class="btn btn-primary btn-sm file-input-add-btn" part="btn btn-fill" @click="${()=>this.onAddFileInput(o)}">ADD</button></div>`:u`<tag-input style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${o}" data-content-type="${p}" data-param-serialize-style="${He(f.style)}" data-param-serialize-explode="${He(f.explode)}" data-example="${Array.isArray(c)?c.join("~|~"):c}" data-array="true" placeholder="add-multiple ↩" .value="${Array.isArray(c)?Array.isArray(c[0])?c[0]:c:ls}"></tag-input>`:u`${d==="object"?Qm.call(this,o,l,t,p,a?.[o]):u`${this.allowTry==="true"?u`<input .value="${this.fillRequestFieldsWithExample==="true"?m.exampleVal:""}" spellcheck="false" type="${ml(l)?"file":l.format==="password"?"password":"text"}" part="textbox textbox-param" style="width:100%" data-ptype="${t.includes("form-urlencode")?"form-urlencode":"form-data"}" data-pname="${o}" data-content-type="${p}" data-param-serialize-style="${He(f.style)}" data-param-serialize-explode="${He(f.explode)}" data-example="${Array.isArray(c)?c[0]:c}" data-array="false">`:""}`}`}</div>`} ${g?nc(h,h.allowedValues&&String(h.allowedValues).split("\u2503").map(v=>u`<button type="button" part="anchor anchor-param-constraint" class="value-link" ?disabled="${this.allowTry!=="true"}" data-type="${h.type==="array"?h.type:"string"}" data-enum="${v.trim()}" @click="${w=>{let b=w.target.closest(".param-list").querySelector(`[data-pname="${o}"]`);if(b){b.value=w.target.dataset.type==="array"?[w.target.dataset.enum]:w.target.dataset.enum;let A=this.getRequestPanel(w);this.liveCURLSyntaxUpdate(A)}}}">${v}</button>`),k&&m.exampleList.map(v=>Oa.call(this,v,h.type,o))):""} ${d==="object"?"":u`<div class="param-details" part="param-details">${l.description?u`<div class="m-markdown-small">${M(H(T(l.description)))}</div>`:""} ${k?"":ic.call(this,o,h.type,m.exampleList)}</div>`}</li>`)}return u`<div class="param-list-container"><ul class="param-list" part="param-list" role="list" @input="${o=>{let l=this.getRequestPanel(o);this.liveCURLSyntaxUpdate(l)}}" @change="${o=>{let l=this.getRequestPanel(o);this.liveCURLSyntaxUpdate(l)}}">${n}</ul></div>`}return u`<textarea class="textarea dynamic-form-param ${t}" part="textarea textarea-param" spellcheck="false" data-pname="dynamic-form" data-ptype="${t}" .value="${$r(r)}" style="width:100%"></textarea> ${e.description?u`<span class="m-markdown-small">${M(H(T(e.description)))}</span>`:""}`}function tf(){if(!this.request_body||Object.keys(this.request_body).length===0)return"";let e="",t="",r="",a="",n="",s=[],{content:i}=this.request_body;for(let o in i)s.push({mimeType:o,schema:i[o].schema,example:i[o].example,examples:i[o].examples,encoding:i[o].encoding}),this.selectedRequestBodyType||=o;return e=s.length===1?"":u`<select class="select-sm" aria-label="request body media type" @change="${o=>this.onMimeTypeChange(o)}">${s.map(o=>u`<option value="${o.mimeType}" ?selected="${o.mimeType===this.selectedRequestBodyType}">${o.mimeType}</option>`)}</select>`,s.forEach(o=>{let l,c=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))o.mimeType===this.selectedRequestBodyType&&(c=Nt(o.schema,o.mimeType,xe(o.examples),xe(o.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1),this.selectedRequestBodyExample||=c.length>0?c[0].exampleId:"",n=u`${n}<div class="example-panel">${c.length===1?"":u`<select class="select-sm example-select" aria-label="request body examples" title="${Bt(c.find(d=>d.exampleId===this.selectedRequestBodyExample))}" @change="${d=>this.onSelectExample(d)}">${c.map(d=>u`<option value="${d.exampleId}" title="${Bt(d)}" ?selected="${d.exampleId===this.selectedRequestBodyExample}">${Bt(d)}</option>`)}</select>`} ${c.filter(d=>d.exampleId===this.selectedRequestBodyExample).map(d=>u`<div class="example ${d.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example="${d.exampleId}">${c.length===1&&d.exampleSummary&&d.exampleSummary.length>80?u`<div style="padding:4px 0">${d.exampleSummary}</div>`:""} ${d.exampleDescription?u`<div class="m-markdown-small" style="padding:4px 0">${M(H(T(d.exampleDescription||"")))}</div>`:""}<pre class="textarea is-hidden request-body-param ${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" spellcheck="false" data-ptype="${o.mimeType}" style="width:100%;resize:vertical;display:none">
${d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2)}</pre><textarea class="textarea request-body-param-user-input" part="textarea textarea-param" spellcheck="false" data-ptype="${o.mimeType}" data-example="${d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2)}" data-example-format="${d.exampleFormat}" style="width:100%;resize:vertical" .value="${this.fillRequestFieldsWithExample==="true"?d.exampleFormat==="text"?d.exampleValue:JSON.stringify(d.exampleValue,null,2):""}" @input="${p=>{let f=this.getRequestPanel(p);this.liveCURLSyntaxUpdate(f)}}" @keydown="${p=>{if((p.keyCode===10||p.keyCode===13)&&p.ctrlKey)return this.onTryClick(p)}}"></textarea></div>`)}</div>`);else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(o.mimeType===this.selectedRequestBodyType){let d=Nt(o.schema,o.mimeType,o.examples,o.example,this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);o.schema&&(r=ef.call(this,o.schema,o.mimeType,d[0]?d[0].exampleValue:"",o.encoding))}}else/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(this.selectedRequestBodyType)&&o.mimeType===this.selectedRequestBodyType&&(t=u`<input id="input-request-body-param-file" type="file" part="file-input" style="max-width:100%" class="request-body-param-file small-font-size bold-text" data-ptype="${o.mimeType}" spellcheck="false">`);(o.mimeType.includes("json")||o.mimeType.includes("xml")||o.mimeType.includes("text")||this.selectedRequestBodyType.includes("jose"))&&(l=se(o.schema),this.schemaStyle==="table"?a=u`${a}<schema-table class="${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" style="display:${this.selectedRequestBodyType===o.mimeType?"block":"none"}" .data="${l}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:this.schemaStyle==="tree"&&(a=u`${a}<schema-tree class="${o.mimeType.substring(o.mimeType.indexOf("/")+1)}" style="display:${this.selectedRequestBodyType===o.mimeType?"block":"none"}" .data="${l}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`))}),u`<div class="request-body-container" data-selected-request-body-type="${He(this.selectedRequestBodyType)}"><div class="table-title top-gap row" style="justify-content:space-between;align-items:center"><h5 class="rapidoc-heading label-heading" part="heading heading-5">Request body ${this.request_body.required?u`<span class="mono-font" style="color:var(--destructive)">*</span>`:""} <span style="font-weight:400;margin-left:5px;text-transform:none">${this.selectedRequestBodyType}</span></h5>${e}</div>${this.request_body.description?u`<div class="m-markdown" style="margin-bottom:12px">${M(H(T(this.request_body.description)))}</div>`:""} ${this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose")?u`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${o=>{o.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=o.target.dataset.tab)}}">${Ta(this.config?.defaultSchemaTab,this.activeSchemaTab)}</div>${u`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"block":"none"}">${n}</div>`} ${u`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"none":"block"}">${a}</div>`}</div>`:u`${t} ${r}`}</div>`}function pc(e="flex"){return u`<div class="col m-markdown" style="flex:1;display:${e};position:relative;max-width:100%"><button class="btn btn-sm btn-outline toolbar-btn" style="position:absolute;top:12px;right:8px" @click="${t=>{nr(this.curlSyntax.trim().replace(/\\$/,""),t)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre"><code class="language-shell">${this.curlSyntax.trim().replace(/\\$/,"")}</code></pre></div>`}function rf(){let e="",t="";return this.responseIsBlob||(e=this.responseHeaders.includes("application/x-ndjson")||this.responseHeaders.includes("json")?"json":this.responseHeaders.includes("html")||this.responseHeaders.includes("xml")?"html":"text",t=u`<code class="language-${e}">${this.responseText}</code>`),u`<div class="row" style="font-size:var(--font-size-small);margin:5px 0;justify-content:space-between;align-items:center"><div class="response-message ${this.responseStatus}">Response Status: ${this.responseMessage}</div><button class="btn btn-outline" part="btn btn-outline btn-clear-response" @click="${this.clearResponseData}">CLEAR RESPONSE</button></div><div part="tab-panel" class="tab-panel col"><div id="tab_buttons" part="tab-btn-row" class="tab-buttons row" @click="${r=>{(r.target.classList.contains("tab-btn")!==!1||r.target.classList.contains("tab")!==!1)&&(this.activeResponseTab=r.target.dataset.tab)}}"><button part="tab-btn" class="tab-btn ${this.activeResponseTab==="response"?"active":""}" data-tab="response">RESPONSE</button> <button part="tab-btn" class="tab-btn ${this.activeResponseTab==="headers"?"active":""}" data-tab="headers">RESPONSE HEADERS</button> ${this.showCurlBeforeTry==="true"?"":u`<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="curl"?"active":""}" data-tab="curl">CURL</button>`}</div>${this.responseIsBlob?u`<div part="tab-content" class="tab-content col" style="flex:1;display:${this.activeResponseTab==="response"?"flex":"none"}">${this.responseBlobType==="image"?u`<img style="max-height:var(--resp-area-height);object-fit:contain" class="mar-top-8" src="${He(this.responseBlobUrl)}">`:""} <button class="btn btn-outline mar-top-8" style="width:135px" @click="${()=>{zi(this.responseBlobUrl,this.respContentDisposition)}}" part="btn btn-outline">DOWNLOAD</button> ${this.responseBlobType==="view"||this.responseBlobType==="image"?u`<button class="btn btn-outline mar-top-8" style="width:135px" @click="${()=>{Pi(this.responseBlobUrl)}}" part="btn btn-outline">VIEW (NEW TAB)</button>`:""}</div>`:u`<div part="tab-content" class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab==="response"?"flex":"none"}"><button class="btn btn-sm btn-outline toolbar-btn" @click="${r=>{nr(this.responseText,r)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre;min-height:50px;height:var(--resp-area-height);resize:vertical;overflow:auto">
${t}</pre></div>`}<div part="tab-content" class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab==="headers"?"flex":"none"}"><button class="btn btn-sm btn-outline toolbar-btn" @click="${r=>{nr(this.responseHeaders,r)}}" part="btn btn-outline btn-copy">Copy</button><pre style="white-space:pre"><code class="language-css">${this.responseHeaders}</code></pre></div>${this.showCurlBeforeTry==="true"?"":pc.call(this,this.activeResponseTab==="curl"?"flex":"none")}</div>`}function af(){let e;return e=this.security?.length>0&&!this.security.every(t=>!t||Object.keys(t).length===0)?this.api_keys.length>0?u`<span class="blue-text">${this.api_keys.length===1?`${this.api_keys[0]?.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}</span>`:this.security.some(t=>!t||Object.keys(t).length===0)?u`Optional (None Applied)`:u`Required <span class="red-text">(None Applied)</span>`:u`Not Required`,u`<div class="try-bar" part="wrap-request-btn"><div class="try-layout"><dl class="try-info">${this.serverUrl?u`<dt>API Server</dt><dd class="try-server-url">${this.serverUrl}</dd>`:""}<dt>Authentication</dt><dd>${e}</dd></dl><div class="try-actions">${this.parameters.length>0||this.request_body?u`${this.hasExampleToFill?u`<button class="btn btn-outline" part="btn btn-outline btn-fill btn-fill-example" ?disabled="${this.loading}" @click="${this.onFillRequestData}" title="Fills the request fields with their examples">FILL EXAMPLE</button>`:""} <button class="btn btn-outline" part="btn btn-outline btn-clear" ?disabled="${this.loading||!this.hasValueToClear}" @click="${this.onClearRequestData}">CLEAR</button>`:""} <button class="btn btn-primary" part="btn btn-try" ?disabled="${this.loading}" aria-busy="${this.loading}" title="${this.mockServer==="true"?"The in-browser mock answers this request; it does not reach the server":""}" @click="${this.onTryClick}">${this.loading?"TRYING...":this.mockServer==="true"?"TRY (Mock)":"TRY"}</button></div></div></div><div class="row" style="font-size:var(--font-size-small);margin:5px 0">${this.showCurlBeforeTry==="true"?pc.call(this):""}</div>${this.responseMessage===""?"":rf.call(this)}`}var _=class extends fe{constructor(){super(),this.serverUrl="",this.servers=[],this.method="",this.path="",this.security=[],this.parameters=[],this.api_keys=[],this.accept="",this.callback="",this.webhook="",this.fillRequestFieldsWithExample="",this.allowTry="true",this.showCurlBeforeTry="false",this.renderStyle="view",this.schemaStyle="tree",this.activeSchemaTab="schema",this.activeParameterSchemaTabs={},this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="true",this.schemaHideWriteOnly="false",this.fetchCredentials="",this.mockServer="false",this.responseMessage="",this.responseText="",this.responseHeaders="",this.responseStatus="success",this.responseUrl="",this.curlSyntax="",this.responseIsBlob=!1,this.responseBlobType="",this.responseBlobUrl="",this.respContentDisposition="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.fileInputKeys={},this.loading=!1,this.hasExampleToFill=!1,this.hasValueToClear=!1,this.activeAbortController=null,this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.responseIsBlob=!1,this.responseBlobType="",this.responseBlobUrl="",this.respContentDisposition="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.activeParameterSchemaTabs={},this.fileInputKeys={},this.loading=!1}static get styles(){return[zr,rr,et,Br,Ea,Pr,cn,G`*,:before,:after{box-sizing:border-box}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}tag-input:focus-within{outline:1px solid}.top-gap{margin-top:24px}.request-panel>div>.top-gap:first-child,.request-panel>div>.request-body-container:first-child>.top-gap{margin-top:4px}.textarea{resize:vertical;direction:ltr;min-height:220px;padding:5px}.response-message{text-overflow:ellipsis;font-weight:700;&.error{color:var(--destructive)}&.success{color:var(--blue)}}.file-input-container{align-items:flex-start;width:100%;& .input-set{align-items:center;width:100%;display:flex;position:relative;&:first-child .file-input-remove-btn{display:none}&:not(:first-child) input[type=file]{padding-right:2.25em}}& .file-input-add-btn{align-self:flex-start;margin:4px 0 0 .45em;font-weight:400}}.file-input-remove-btn{color:var(--destructive);border-radius:var(--radius);cursor:pointer;background:0 0;border:none;padding:0 .25em;font-size:1.25em;line-height:1;position:absolute;top:50%;right:.45em;transform:translateY(-50%);&:hover{background:color-mix(in srgb, var(--destructive) 15%, transparent)}&:focus-visible{box-shadow:var(--focus-shadow);outline:none}}.v-tab-btn{font-size:var(--font-size-small);opacity:.3;cursor:pointer;background:0 0;border:none;height:24px;padding:4px 8px;&.active{background:var(--background);opacity:1;font-weight:700}}@container (width>=768px){.textarea{padding:8px}}.try-bar{font-size:var(--font-size-small);margin:16px 0;container-type:inline-size}.try-layout{flex-direction:column;gap:.75em;display:flex}.try-info{grid-template-columns:max-content minmax(0,1fr);gap:.25em .75em;margin:0;line-height:1.35;display:grid;&>dt{color:var(--foreground);font-weight:600}&>dd{min-width:0;color:var(--muted-foreground);overflow-wrap:anywhere;margin:0}}.try-actions{flex-wrap:wrap;justify-content:flex-end;gap:.5em;display:flex}@container (width>=34rem){.try-layout{flex-direction:row;align-items:center;gap:1.5em}.try-info{flex:1;min-width:0}.try-actions{flex:none}}@container (width<=20rem){.try-info{grid-template-columns:minmax(0,1fr);gap:0;&>dd+dt{margin-top:.5em}}}`,vt]}get commonConfigDeps(){return[this.schemaStyle,this.schemaExpandLevel,this.schemaDescriptionExpanded,this.allowSchemaDescriptionExpandToggle,this.schemaHideReadOnly,this.schemaHideWriteOnly,this.fillRequestFieldsWithExample,this.renderStyle,this.allowTry,this.callback,this.webhook]}get parameterGuardDeps(){return[this.method,this.path,this.parameters,this.activeParameterSchemaTabs,...this.commonConfigDeps]}get requestBodyGuardDeps(){return[this.method,this.path,this.request_body,this.selectedRequestBodyType,this.selectedRequestBodyExample,this.activeSchemaTab,this.fileInputKeys,...this.commonConfigDeps]}render(){return u`<div @input="${this.syncTryBarState}" @change="${this.syncTryBarState}" class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||this.callback==="true"?"read-mode":"view-mode"}">${this.callback==="true"?u`<h6 class="rapidoc-heading label-heading tiny-title" part="section-request-title heading heading-6">Callback request</h6>`:u`<h4 class="rapidoc-heading label-heading req-res-title" part="section-request-title heading heading-4">Request</h4>`}<div>${wr(this.parameterGuardDeps,()=>Fa.call(this,"path"))} ${wr(this.parameterGuardDeps,()=>Fa.call(this,"query"))} ${wr(this.requestBodyGuardDeps,()=>tf.call(this))} ${wr(this.parameterGuardDeps,()=>Fa.call(this,"header"))} ${wr(this.parameterGuardDeps,()=>Fa.call(this,"cookie"))} ${this.allowTry==="false"?"":u`${af.call(this)}`}</div></div>`}async updated(e){this.showCurlBeforeTry==="true"&&(!e||!e.has("curlSyntax")||e.size>1)&&this.applyCURLSyntax(this.shadowRoot),Nr(this.getRootNode()?.host?.shadowRoot||this.shadowRoot),this.webhook==="true"&&(this.allowTry="false"),queueMicrotask(()=>this.syncTryBarState())}async beforeNavigationFocusedMode(){}async afterNavigationFocusedMode(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.clearResponseData()}onSelectExample(e){this.selectedRequestBodyExample=e.target.value;let t=e.target;window.setTimeout(r=>{let a=r.closest(".example-panel").querySelector(".request-body-param"),n=r.closest(".example-panel").querySelector(".request-body-param-user-input");n.value=a.innerText;let s=this.getRequestPanel({target:r});this.liveCURLSyntaxUpdate(s)},0,t)}onMimeTypeChange(e){this.selectedRequestBodyType=e.target.value;let t=e.target;this.selectedRequestBodyExample="",window.setTimeout(r=>{let a=r.closest(".request-body-container").querySelector(".request-body-param");if(a){let n=r.closest(".request-body-container").querySelector(".request-body-param-user-input");n.value=a.innerText}},0,t)}async onFillRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(t=>{t.dataset.example&&(t.value=t.tagName.toUpperCase()==="TAG-INPUT"?t.dataset.example.split("~|~"):t.dataset.example)}),this.syncTryBarState()}async onClearRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach(t=>{t.value=""}),this.syncTryBarState()}syncTryBarState(){let e=this.shadowRoot?.querySelector(".request-panel"),t=e?[...e.querySelectorAll("input, tag-input, textarea:not(.is-hidden)")]:[];this.hasExampleToFill=t.some(r=>!!r.dataset.example),this.hasValueToClear=t.some(r=>Array.isArray(r.value)?r.value.length>0:r.value!=="")}buildFetchURL(e){let t=[...e.querySelectorAll("[data-ptype='path']")],r=[...e.querySelectorAll("[data-ptype='query']")],a=[...e.querySelectorAll("[data-ptype='query-object']")],n={};t.forEach(i=>{n[i.dataset.pname]=i.value});let s=[];return r.forEach(i=>{let o=i.dataset.array!=="false",l=i.dataset.paramSerializeStyle||"form",c=i.dataset.paramSerializeExplode===void 0?l==="form":i.dataset.paramSerializeExplode==="true",d=i.dataset.paramAllowReserved==="true";s.push({name:i.dataset.pname,value:i.value,style:l,explode:c,allowReserved:d,isArray:o,itemType:i.dataset.itemType||""})}),a.forEach(i=>{let o=i.dataset.paramSerializeStyle||"form",l=i.dataset.paramSerializeExplode===void 0?o==="form":i.dataset.paramSerializeExplode==="true",c=i.dataset.paramAllowReserved==="true";s.push({name:i.dataset.pname,value:i.value,style:o,explode:l,allowReserved:c,isObject:!0})}),xm({serverUrl:this.serverUrl,path:this.path,pathParams:n,queryParams:s,apiKeys:this.api_keys})}buildFetchHeaders(e){let t=this.closest(".expanded-req-resp-container, .req-resp-container")?.getElementsByTagName("api-response")[0],r=[...e.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],a=e.querySelector(".request-body-container"),n=t?.selectedMimeType||this.accept||"",s=a?.dataset?.selectedRequestBodyType||"",i=r.map(o=>({name:o.dataset.pname,value:o.value,explode:o.dataset.paramSerializeExplode==="true",isObject:o.dataset.ptype==="header-object"}));return qm({accept:n,apiKeys:this.api_keys,headerParams:i,contentType:s})}buildFetchBodyOptions(e){let t=e.querySelector(".request-body-container"),r={method:this.method.toUpperCase()};if(t){let a=t.dataset.selectedRequestBodyType||"";if(a.includes("form-urlencoded")){let n=e.querySelector("[data-ptype='dynamic-form']");r.body=n?Zl([],n.value):Zl([...e.querySelectorAll("[data-ptype='form-urlencode']")].filter(s=>s.type!=="file").map(s=>({name:s.dataset.pname,value:s.value,isArray:s.dataset.array!=="false",isObject:s.dataset.object==="true",style:s.dataset.paramSerializeStyle,explode:s.dataset.paramSerializeExplode===void 0?void 0:s.dataset.paramSerializeExplode==="true"})))}else if(a.includes("form-data")){let n=[...e.querySelectorAll("[data-ptype='form-data']")];r.body=Nm(n.map(i=>({name:i.dataset.pname,value:i.value,file:i.type==="file"?i.files?.[0]:void 0,isArray:i.dataset.array!=="false"})));let s=Object.fromEntries(n.filter(i=>i.dataset.contentType).map(i=>[i.dataset.pname,i.dataset.contentType]));Object.keys(s).length>0&&(r.partContentTypes=s)}else if(/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(a)){let n=e.querySelector(".request-body-param-file");n?.files[0]&&(r.body=n.files[0])}else if(a.includes("json")||a.includes("xml")||a.includes("text")){let n=e.querySelector(".request-body-param-user-input");n?.value&&(r.body=n.value)}}return r}async onTryClick(e){let t=e?.target?this.getRequestPanel(e):this.shadowRoot.querySelector(".request-panel"),r=this.buildFetchURL(t),a=this.buildFetchBodyOptions(t),n=this.buildFetchHeaders(t);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(r,n,a,t),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),this.fetchCredentials&&(a.credentials=this.fetchCredentials);let s=new AbortController;this.activeAbortController=s;let{signal:i}=s;a.headers=n;let o={url:r,...a};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:o,controller:s}}));let l={method:o.method,headers:o.headers,credentials:o.credentials,body:o.body};if(o.body instanceof FormData&&o.partContentTypes){let f=Lm(o.body,o.partContentTypes),h=new Headers(o.headers);h.set("Content-Type",f.contentType),l.headers=h,l.body=f.body}let c,d,p;try{this.loading=!0,this.responseText="\u231B",this.responseMessage="",c=new Request(o.url,l);let f=performance.now();d=await fetch(c,{signal:i});let h=performance.now();p=d.clone(),this.responseMessage=u`${d.statusText?`${d.statusText}:${d.status}`:d.status}<div style="color:var(--muted-foreground)">Took ${Math.round(h-f)} milliseconds</div>`,this.responseUrl=d.url;let y={};d.headers.forEach((g,k)=>{y[k]=g,this.responseHeaders=`${this.responseHeaders}${k}: ${g}
`});let m=await zm(d);this.responseText=m.responseText,this.responseIsBlob=m.responseIsBlob,this.responseBlobType=m.responseBlobType,this.responseBlobUrl=m.responseBlobUrl,this.respContentDisposition=m.respContentDisposition,this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:c,response:p,responseHeaders:y,responseBody:m.respJson||m.respText||m.respBlob,responseStatus:p.ok}}))}catch(f){f.name==="AbortError"?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:f,request:c}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:f,request:c}})),this.responseMessage=o.method?.toUpperCase()==="TRACE"?`${f.message} (Browser security restricts TRACE requests in fetch. Use the cURL snippet below.)`:`${f.message} (CORS or Network Issue)`)}finally{this.loading=!1,this.activeAbortController=null}}liveCURLSyntaxUpdate(e){this.applyCURLSyntax(e)}onGenerateCURLClick(e){let t=this.getRequestPanel(e);this.applyCURLSyntax(t)}getRequestPanel(e){return e.target.closest(".request-panel")}applyCURLSyntax(e){let t=this.buildFetchURL(e),r=this.buildFetchBodyOptions(e),a=this.buildFetchHeaders(e),n=this.generateCURLSyntax(t,a,r,e);this.curlSyntax!==n&&(this.curlSyntax=n)}generateCURLSyntax(e,t,r,a){let n=a?.querySelector(".request-body-container"),s=n?.dataset?.selectedRequestBodyType||"",i=r?.body;if(!i&&n){let o=a.querySelector(".request-body-param-user-input");o?.value&&(i=o.value)}return Rm({method:this.method,url:e,headers:t,body:i,contentType:s,partContentTypes:r?.partContentTypes})}onAddFileInput(e){let t=this.fileInputKeys[e]??[0],r=t.length>0?Math.max(...t)+1:0;this.fileInputKeys={...this.fileInputKeys,[e]:[...t,r]}}onRemoveFileInput(e,t){let r=this.fileInputKeys[e]??[0];this.fileInputKeys={...this.fileInputKeys,[e]:r.filter(a=>a!==t)}}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.fileInputKeys={},this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),"")}willUpdate(e){super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.renderStyle&&(this.renderStyle=this.config.renderStyle),this.config.schemaStyle&&(this.schemaStyle=this.config.schemaStyle),this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly==="never"||this.webhook==="true"?"false":"true"),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly==="never"?"false":this.webhook==="true"?"true":"false"),this.config.fillRequestFieldsWithExample!==void 0&&(this.fillRequestFieldsWithExample=this.config.fillRequestFieldsWithExample),this.config.allowTry!==void 0&&(this.allowTry=this.config.allowTry),this.config.showCurlBeforeTry!==void 0&&(this.showCurlBeforeTry=this.config.showCurlBeforeTry),this.config.fetchCredentials!==void 0&&(this.fetchCredentials=this.config.fetchCredentials),this.config.mockServer!==void 0&&(this.mockServer=this.config.mockServer),this.config.defaultSchemaTab&&(this.activeSchemaTab=this.config.defaultSchemaTab))}disconnectedCallback(){this.curlSyntax="",this.activeAbortController&&=(this.activeAbortController.abort(),null),this.responseBlobUrl&&=(URL.revokeObjectURL(this.responseBlobUrl),""),super.disconnectedCallback()}};x([S({type:Object})],_.prototype,"config",void 0),x([S({type:String,attribute:"server-url"})],_.prototype,"serverUrl",void 0),x([S({type:Array})],_.prototype,"servers",void 0),x([S({type:String})],_.prototype,"method",void 0),x([S({type:String})],_.prototype,"path",void 0),x([S({type:Array})],_.prototype,"security",void 0),x([S({type:Array})],_.prototype,"parameters",void 0),x([S({type:Object})],_.prototype,"request_body",void 0),x([S({type:Array})],_.prototype,"api_keys",void 0),x([S({type:Object})],_.prototype,"parser",void 0),x([S({type:String})],_.prototype,"accept",void 0),x([S({type:String})],_.prototype,"callback",void 0),x([S({type:String})],_.prototype,"webhook",void 0),x([S({type:String,attribute:"fill-request-fields-with-example"})],_.prototype,"fillRequestFieldsWithExample",void 0),x([S({type:String,attribute:"allow-try"})],_.prototype,"allowTry",void 0),x([S({type:String,attribute:"show-curl-before-try"})],_.prototype,"showCurlBeforeTry",void 0),x([S({type:String,attribute:"render-style"})],_.prototype,"renderStyle",void 0),x([S({type:String,attribute:"schema-style"})],_.prototype,"schemaStyle",void 0),x([S({type:String,attribute:"active-schema-tab"})],_.prototype,"activeSchemaTab",void 0),x([S({type:Object,converter:{fromAttribute:e=>JSON.parse(e),toAttribute:e=>JSON.stringify(e)},attribute:"active-parameter-schema-tabs"})],_.prototype,"activeParameterSchemaTabs",void 0),x([S({type:Number,attribute:"schema-expand-level"})],_.prototype,"schemaExpandLevel",void 0),x([S({type:String,attribute:"schema-description-expanded"})],_.prototype,"schemaDescriptionExpanded",void 0),x([S({type:String,attribute:"allow-schema-description-expand-toggle"})],_.prototype,"allowSchemaDescriptionExpandToggle",void 0),x([S({type:String,attribute:"schema-hide-read-only"})],_.prototype,"schemaHideReadOnly",void 0),x([S({type:String,attribute:"schema-hide-write-only"})],_.prototype,"schemaHideWriteOnly",void 0),x([S({type:String,attribute:"fetch-credentials"})],_.prototype,"fetchCredentials",void 0),x([S({type:String,attribute:"mock-server"})],_.prototype,"mockServer",void 0),x([ae()],_.prototype,"responseMessage",void 0),x([ae()],_.prototype,"responseText",void 0),x([ae()],_.prototype,"responseHeaders",void 0),x([ae()],_.prototype,"responseStatus",void 0),x([ae()],_.prototype,"responseUrl",void 0),x([ae()],_.prototype,"curlSyntax",void 0),x([ae()],_.prototype,"responseIsBlob",void 0),x([ae()],_.prototype,"responseBlobType",void 0),x([ae()],_.prototype,"responseBlobUrl",void 0),x([ae()],_.prototype,"respContentDisposition",void 0),x([ae()],_.prototype,"activeResponseTab",void 0),x([ae()],_.prototype,"selectedRequestBodyType",void 0),x([ae()],_.prototype,"selectedRequestBodyExample",void 0),x([ae()],_.prototype,"fileInputKeys",void 0),x([ae()],_.prototype,"loading",void 0),x([ae()],_.prototype,"hasExampleToFill",void 0),x([ae()],_.prototype,"hasValueToClear",void 0),_=x([Ae("api-request")],_);var ja=class extends fe{constructor(...e){super(...e),this.data=null,this.renderStyle=""}static get styles(){return[et,Ea,rr,G`:host{display:flex}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.json-tree{font-family:var(--font-mono);font-size:var(--font-size-small);word-break:break-all;line-height:calc(var(--font-size-small) + 6px);text-align:left;direction:ltr;flex:1;min-height:40px;display:inline-block;position:relative;overflow:hidden}.open-bracket{cursor:pointer;border-radius:min(var(--radius), .5rem);border:1px solid #0000;padding:0 20px 0 0;display:inline-block;&:hover{color:var(--primary);border:1px solid var(--border)}&.expanded:hover~.inside-bracket{border-left:1px solid var(--muted-foreground)}&.expanded:hover~.close-bracket{color:var(--primary)}&.collapsed+.inside-bracket,&.collapsed+.inside-bracket+.close-bracket,&.expanded .open-bracket-collapsed,&.collapsed .open-bracket-expanded{display:none}}.close-bracket{border-radius:min(var(--radius), .5rem);border:1px solid #0000;display:inline-block}.inside-bracket{border-left:1px dotted var(--border);padding-left:12px;overflow:hidden}.string{color:var(--green)}.number{color:var(--blue)}.null{color:var(--destructive)}.boolean{color:var(--purple)}.object{color:var(--foreground)}.toolbar{align-items:center;padding:2px;display:flex;position:absolute;top:5px;right:6px}`,vt]}render(){return u`<div class="json-tree" @click="${e=>{e.target.classList.contains("btn-copy")?nr(JSON.stringify(this.data,null,2),e):this.toggleExpand(e)}}"><div class="toolbar"><button class="btn btn-sm btn-outline toolbar-btn btn-copy" part="btn btn-outline btn-copy">Copy</button></div>${this.generateTree(this.data,!0)}</div>`}generateTree(e,t=!1){if(e===null)return u`<span class="null">null</span>${t?"":","}`;if(typeof e=="object"&&!(e instanceof Date)){let r=Array.isArray(e)?"array":"pure_object";return Object.keys(e).length===0?u`${Array.isArray(e)?"[ ],":"{ },"}`:u`<div class="open-bracket expanded ${r==="array"?"array":"object"}"><span class="open-bracket-expanded">${r==="array"?"[":"{"}</span> <span class="open-bracket-collapsed">${r==="array"?"[...]":"{...}"}</span></div><div class="inside-bracket">${Object.keys(e).map((a,n,s)=>u`<div class="item">${r==="pure_object"?u`"${a}":`:""} ${this.generateTree(e[a],n===s.length-1)}</div>`)}</div><div class="close-bracket">${r==="array"?"]":"}"}${t?"":","}</div>`}return typeof e=="string"||e instanceof Date?u`<span class="${typeof e}">"${e}"</span>${t?"":","}`:u`<span class="${typeof e}">${e}</span>${t?"":","}`}toggleExpand(e){let t=e.target.closest(".open-bracket");t&&(t.classList.contains("expanded")?t.classList.replace("expanded","collapsed"):t.classList.replace("collapsed","expanded"))}};x([S({type:Object})],ja.prototype,"data",void 0),x([S({type:String,attribute:"render-style"})],ja.prototype,"renderStyle",void 0),ja=x([Ae("json-tree")],ja);var ne=class extends fe{constructor(){super(),this.callback="",this.webhook="",this.schemaStyle="",this.renderStyle="",this.selectedStatus="",this.selectedMimeType="",this.activeSchemaTab="schema",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="false",this.schemaHideReadOnly="false",this.schemaHideWriteOnly="true",this.defaultStatus="",this.defaultMimeType="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.selectedStatus="",this.defaultStatus="",this.defaultMimeType="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get styles(){return[et,Br,Pr,zr,rr,Ea,G`.resp-headers-list{margin-bottom:16px}:where(button,input[type=checkbox],[tabindex="0"]):focus-visible{box-shadow:var(--focus-shadow)}:where(input[type=text],input[type=password],select,textarea):focus-visible{border-color:var(--primary)}.resp-head{vertical-align:middle;padding:16px 0 8px;&.divider{border-top:1px solid var(--border);margin-top:10px}}.resp-status{font-weight:700;font-size:calc(var(--font-size-small) + 1px)}.resp-descr{font-size:var(--font-size-description);color:var(--muted-foreground);text-align:left}.top-gap{margin-top:16px}.example-panel{font-size:var(--font-size-small);margin:0}.status-group{flex-wrap:wrap;margin-top:8px;display:inline-flex}.status-btn{border-color:var(--input);background:color-mix(in srgb, var(--foreground) 5%, transparent);color:var(--muted-foreground);border-radius:0;margin:0 0 0 -1px;&:first-child{border-start-start-radius:var(--radius);border-end-start-radius:var(--radius);margin-left:0}&:last-child{border-start-end-radius:var(--radius);border-end-end-radius:var(--radius)}&:hover{background:var(--muted);color:var(--foreground)}&[aria-pressed=true]{z-index:1;border-color:var(--primary);background:color-mix(in srgb, var(--primary) 14%, transparent);color:var(--primary);position:relative}&:focus-visible{z-index:2}}`,vt]}willUpdate(e){if(super.willUpdate?.(e),this.config&&e.has("config")&&(this.config.renderStyle&&(this.renderStyle=this.config.renderStyle),this.config.schemaStyle&&(this.schemaStyle=this.config.schemaStyle),this.config.schemaExpandLevel!==void 0&&(this.schemaExpandLevel=this.config.schemaExpandLevel),this.config.schemaDescriptionExpanded!==void 0&&(this.schemaDescriptionExpanded=this.config.schemaDescriptionExpanded),this.config.allowSchemaDescriptionExpandToggle!==void 0&&(this.allowSchemaDescriptionExpandToggle=this.config.allowSchemaDescriptionExpandToggle),this.config.schemaHideReadOnly!==void 0&&(this.schemaHideReadOnly=this.config.schemaHideReadOnly==="never"?"false":this.webhook==="true"?"true":"false"),this.config.schemaHideWriteOnly!==void 0&&(this.schemaHideWriteOnly=this.config.schemaHideWriteOnly==="never"||this.webhook==="true"?"false":"true"),this.config.defaultSchemaTab&&(this.activeSchemaTab=this.config.defaultSchemaTab)),e.has("responses")||e.has("callback")||e.has("webhook")){if(!this.responses||typeof this.responses!="object")return;let t=Pm(this.responses,{callback:this.callback,webhook:this.webhook});this.headersForEachRespStatus=t.headersForEachRespStatus,this.mimeResponsesForEachStatus=t.mimeResponsesForEachStatus,this.defaultStatus=t.defaultStatus,this.defaultMimeType=t.defaultMimeType,this.selectedStatus&&this.responses?.[this.selectedStatus]||(this.selectedStatus=t.defaultStatus),this.selectedMimeType||=t.defaultMimeType}}render(){return u`<div class="col regular-font response-panel ${this.renderStyle}-mode">${this.callback==="true"?u`<h6 class="rapidoc-heading label-heading tiny-title" part="section-response-title heading heading-6">Callback response</h6>`:u`<h4 class="rapidoc-heading label-heading req-res-title" part="section-response-title heading heading-4">Response</h4>`}<div>${this.responseTemplate()}</div></div>`}resetSelection(){this.selectedStatus=this.defaultStatus||this.responses&&Object.keys(this.responses).find(e=>e!=="$$ref")||"",this.selectedMimeType=this.selectedStatus&&this.mimeResponsesForEachStatus?.[this.selectedStatus]?Object.keys(this.mimeResponsesForEachStatus[this.selectedStatus])[0]||"":this.defaultMimeType||""}responseTemplate(){return this.responses?(this.selectedStatus&&this.responses[this.selectedStatus]||(this.selectedStatus=this.defaultStatus||Object.keys(this.responses).find(e=>e!=="$$ref")||Object.keys(this.responses)[0]||""),!this.selectedMimeType&&this.selectedStatus&&this.mimeResponsesForEachStatus?.[this.selectedStatus]&&(this.selectedMimeType=Object.keys(this.mimeResponsesForEachStatus[this.selectedStatus])[0]||this.defaultMimeType||""),u`${Object.keys(this.responses).length>1?u`<div class="status-group" role="group" aria-label="Response status">${Object.keys(this.responses).map(e=>u`${e==="$$ref"?"":u`<button @click="${()=>{this.selectedStatus=e,this.selectedMimeType=this.responses[e].content&&Object.keys(this.responses[e].content)[0]?Object.keys(this.responses[e].content)[0]:void 0}}" class="btn btn-sm status-btn" aria-pressed="${this.selectedStatus===e?"true":"false"}" part="btn ${this.selectedStatus===e?"btn-response-status btn-selected-response-status":" btn-response-status"}">${e}</button>`}`)}</div>`:u`<span>${Object.keys(this.responses)[0]}</span>`} ${Object.keys(this.responses).map(e=>u`<div style="display:${e===this.selectedStatus?"block":"none"}"><div class="top-gap"><span class="resp-descr m-markdown">${M(H(T(this.responses[e]?.description||"")))}</span> ${this.headersForEachRespStatus[e]&&this.headersForEachRespStatus[e]?.length>0?u`${this.responseHeaderListTemplate(this.headersForEachRespStatus[e])}`:""}</div>${!this.mimeResponsesForEachStatus[e]||Object.keys(this.mimeResponsesForEachStatus[e]).length===0?"":u`<div part="tab-panel" class="tab-panel col"><div part="tab-btn-row" class="tab-buttons row" @click="${t=>{t.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=t.target.dataset.tab)}}">${Ta(this.config?.defaultSchemaTab,this.activeSchemaTab)} ${Object.keys(this.mimeResponsesForEachStatus[e]).length===1?u`<span class="tab-bar-end">${Object.keys(this.mimeResponsesForEachStatus[e])[0]}</span>`:u`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[e]))}`}</div>${this.activeSchemaTab==="example"?u`<div part="tab-content" class="tab-content col">${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`:u`<div part="tab-content" class="tab-content col">${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}</div>`}</div>`}</div>`)}`):""}responseHeaderListTemplate(e){return u`<h5 class="rapidoc-heading label-heading resp-headers" part="heading heading-5">Response headers</h5><div class="param-list-container resp-headers-list"><ul class="param-list" part="param-list" role="list">${e.map(t=>u`<li class="param" part="param"><div class="param-label" part="param-label"><div class="param-name" part="param-name">${t.name||""}</div>${t.schema?.type?u`<div class="param-type" part="param-type">${t.schema.type}</div>`:""}</div>${t.schema?.example?u`<dl class="param-constraint" part="param-constraint"><dt class="param-constraint-label" part="param-constraint-label">Example:</dt><dd>${t.schema.example}</dd></dl>`:""}<div class="param-details" part="param-details">${t.description?u`<div class="m-markdown-small">${M(H(T(t.description)))}</div>`:""}</div></li>`)}</ul></div>`}mimeTypeDropdownTemplate(e){return u`<select aria-label="mime types" class="select-sm tab-bar-end" @change="${t=>{this.selectedMimeType=t.target.value}}">${e.map(t=>u`<option value="${t}" ?selected="${t===this.selectedMimeType}">${t}</option>`)}</select>`}onSelectExample(e){[...e.target.closest(".example-panel").querySelectorAll(".example")].forEach(t=>{t.style.display=t.dataset.example===e.target.value?"block":"none"})}mimeExampleTemplate(e){return!e||!e.examples||e.examples.length===0?u`<pre style="color:var(--destructive)" class="example-panel"> No example provided </pre>`:u`${e.examples.length===1?u`${e.examples[0].exampleFormat==="json"?u`${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?u`<div style="padding:4px 0">${e.examples[0].exampleSummary}</div>`:""} ${e.examples[0].exampleDescription?u`<div class="m-markdown-small" style="padding:4px 0">${M(H(T(e.examples[0].exampleDescription||"")))}</div>`:""}<json-tree render-style="${this.renderStyle}" .data="${e.examples[0].exampleValue}" class="example-panel" exportparts="btn:btn, btn-outline:btn-outline, btn-copy:btn-copy"></json-tree>`:u`${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?u`<div style="padding:4px 0">${e.examples[0].exampleSummary}</div>`:""} ${e.examples[0].exampleDescription?u`<div class="m-markdown-small" style="padding:4px 0">${M(H(T(e.examples[0].exampleDescription||"")))}</div>`:""}<pre class="example-panel">${e.examples[0].exampleValue}</pre>`}`:u`<div class="example-panel"><select aria-label="response examples" class="select-sm example-select" title="${Bt(e.examples.find(t=>t.exampleId===e.selectedExample))}" @change="${t=>this.onSelectExample(t)}">${e.examples.map(t=>u`<option value="${t.exampleId}" title="${Bt(t)}" ?selected="${t.exampleId===e.selectedExample}">${Bt(t)}</option>`)}</select> ${e.examples.map(t=>u`<div class="example" data-example="${t.exampleId}" style="display:${t.exampleId===e.selectedExample?"block":"none"}">${t.exampleDescription?u`<div class="m-markdown-small" style="padding:4px 0">${M(H(T(t.exampleDescription||"")))}</div>`:""} ${t.exampleFormat==="json"?u`<json-tree render-style="${this.renderStyle}" .data="${t.exampleValue}" exportparts="btn:btn, btn-outline:btn-outline, btn-copy:btn-copy"></json-tree>`:u`<pre>${t.exampleValue}</pre>`}</div>`)}</div>`}`}mimeSchemaTemplate(e){return e?u`${this.schemaStyle==="table"?u`<schema-table .data="${e.schemaTree}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:u`<schema-tree .data="${e.schemaTree}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly}" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}`:u`<pre style="color:var(--destructive)" class="example-panel"> Schema not found</pre>`}};x([S({type:Object})],ne.prototype,"config",void 0),x([S({type:String})],ne.prototype,"callback",void 0),x([S({type:String})],ne.prototype,"webhook",void 0),x([S({type:Object})],ne.prototype,"responses",void 0),x([S({type:Object})],ne.prototype,"parser",void 0),x([S({type:String,attribute:"schema-style"})],ne.prototype,"schemaStyle",void 0),x([S({type:String,attribute:"render-style"})],ne.prototype,"renderStyle",void 0),x([S({type:String,attribute:"selected-status"})],ne.prototype,"selectedStatus",void 0),x([S({type:String,attribute:"selected-mime-type"})],ne.prototype,"selectedMimeType",void 0),x([S({type:String,attribute:"active-schema-tab"})],ne.prototype,"activeSchemaTab",void 0),x([S({type:Number,attribute:"schema-expand-level"})],ne.prototype,"schemaExpandLevel",void 0),x([S({type:String,attribute:"schema-description-expanded"})],ne.prototype,"schemaDescriptionExpanded",void 0),x([S({type:String,attribute:"allow-schema-description-expand-toggle"})],ne.prototype,"allowSchemaDescriptionExpandToggle",void 0),x([S({type:String,attribute:"schema-hide-read-only"})],ne.prototype,"schemaHideReadOnly",void 0),x([S({type:String,attribute:"schema-hide-write-only"})],ne.prototype,"schemaHideWriteOnly",void 0),ne=x([Ae("api-response")],ne);function nf(e){let t=new Qe,r=new T.Renderer;return r.heading=({text:a,depth:n})=>`<h${n} class="observe-me" id="${e}--${t.slug(a)}">${a}</h${n}>`,Ir(r),r}function ws(e,t="",r="",a=!1){let n=new Set;for(let c in e.responses)for(let d in e.responses[c]?.content)n.add(d.trim());let s=[...n].join(", "),i=this.resolvedSpec.securitySchemes.filter(c=>c.finalKeyValue&&e.security?.some(d=>c.securitySchemeId in d))||[],o=this.resolvedSpec.securitySchemes.find(c=>c.securitySchemeId==="_rapidoc_api_key"&&c.value!=="-");o&&i.push(o);let l=e.xCodeSamples?Kl.call(this,e.xCodeSamples):"";return u`${this.renderStyle==="read"&&!a?u`<div class="divider" part="operation-divider"></div>`:""}<div class="expanded-endpoint-body observe-me ${e.method} ${e.deprecated?"deprecated":""}" part="section-operation ${e.elementId}" id="${e.elementId}" data-first-operation-in-tag="${a?"true":F}">${this.renderStyle==="focused"&&t?u`<div class="tag-container" part="section-operation-tag" style="margin-bottom:16px"><h2 class="rapidoc-heading upper" part="heading heading-2" style="font-size:var(--h3-font-size);margin:0">${t}</h2>${a&&r?u`<div class="tag-description regular-font" part="section-tag-description" style="margin-top:12px;padding:12px 14px;background:var(--code-bg);border-radius:min(var(--radius),.5rem);border:1px solid var(--border)"><div class="m-markdown">${M(H(T(r)))}</div></div>`:""}</div>`:""} ${e.deprecated?u`<div class="bold-text red-text">DEPRECATED</div>`:""} ${u`${e.xBadges&&e.xBadges?.length>0?u`<div style="display:flex;flex-wrap:wrap;margin-bottom:-24px;font-size:var(--font-size-small)">${e.xBadges.map(c=>c.color==="none"?"":u`<span style="margin:1px;margin-right:5px;padding:1px 8px;font-weight:700;border-radius:var(--radius);background:color-mix(in srgb,${$t(c.color)} 10%,transparent);color:${$t(c.color)};border:1px solid ${$t(c.color)}">${c.label}</span>`)}</div>`:""}<h3 class="rapidoc-heading operation-summary" part="section-operation-summary heading heading-3">${e.shortSummary||`${e.method.toUpperCase()} ${e.path}`}</h3>${e.isWebhook?u`<span part="section-operation-webhook" style="color:var(--primary);font-weight:700;font-size:var(--font-size-regular)">WEBHOOK</span>`:u`<div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left;direction:ltr;padding:8px 0;color:var(--muted-foreground)"><span part="label-operation-method" class="regular-font upper method-fg bold-text ${e.method}">${e.method}</span> <span style="overflow-wrap:break-word" part="label-operation-path">${e.path}</span></div>`} ${Wl.call(this,e.security,e.elementId)}<slot name="${e.elementId}"></slot>`} ${e.description?u`<div class="m-markdown">${M(H(T(e.description)))}</div>`:""} ${e.externalDocs?.url||e.externalDocs?.description?u`<div class="external-docs-box"><div class="m-markdown">${M(H(T(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?u`<a class="external-docs-link" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url} <span class="external-docs-arrow">⇲</span></a>`:""}</div>`:""} ${l}<div class="req-resp-container expanded-req-resp-container ${this.layout}-layout" part="section-req-resp-container"><div class="request-panel view-mode-request ${this.renderStyle}-mode ${this.layout}-layout" part="section-request-panel"><api-request .config="${this.config}" class="${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" method="${e.method}" path="${e.path}" .security="${e.security}" .parameters="${e.parameters}" .request_body="${e.requestBody}" .api_keys="${i}" .servers="${e.servers}" server-url="${e.servers?.[0]?.url||this.selectedServer?.computedUrl}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="${this.allowTry}" show-curl-before-try="${this.showCurlBeforeTry}" accept="${s}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"||e.isWebhook?"false":"true"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":e.isWebhook?"true":"false"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
            wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
            tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content, 
            file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, 
            anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?Vl.call(this,e.callbacks):""}</div><api-response .config="${this.config}" class="response-panel ${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" .responses="${e.responses}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" active-schema-tab="${this.defaultSchemaTab}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":e.isWebhook?"true":"false"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"||e.isWebhook?"false":"true"}" selected-status="${Object.keys(e.responses||{})[0]||""}" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
            btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-outline:btn-outline, btn-copy:btn-copy,
          tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content, 
          schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items"></api-response></div></div>`}function sf(){if(!this.resolvedSpec)return"";let e=t=>u`<section id="${t.elementId}" part="section-tag" class="regular-font section-gap--read-mode observe-me read-mode-tag"><h2 class="rapidoc-heading title tag" part="section-tag-title label-tag-title heading heading-2">${t.displayName||t.name}</h2><slot name="${t.elementId}"></slot>${M(`
        <div class="m-markdown regular-font">
          ${H(T(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:nf(t.elementId)}:void 0))}
        </div>`)}</section>${t.paths.length>0?u`<section class="regular-font section-gap--read-mode" part="section-operations-in-tag">${t.paths.map((r,a)=>ws.call(this,r,t.name,t.description,a===0))}</section>`:""}`;if(this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0){let t=new Set;this.resolvedSpec.tagGroups.forEach(a=>{(a.tags||[]).forEach(n=>t.add(n.name.toLowerCase()))});let r=(this.resolvedSpec.tags||[]).filter(a=>!t.has(a.name.toLowerCase()));return u`${this.resolvedSpec.tagGroups.map(a=>u`<section id="${a.elementId}" part="section-tag-group" class="regular-font section-gap--read-mode observe-me read-mode-group"><h2 class="rapidoc-heading title tag-group" part="section-tag-group-title heading heading-2">${a.displayName||a.name}</h2>${a.description?u`<div class="m-markdown tag-group-description">${M(H(T(a.description)))}</div>`:""}</section>${a.tags.map(n=>e(n))}`)} ${r.map(a=>e(a))}`}return u`${this.resolvedSpec.tags.map(t=>e(t))}`}function of(e){return u`<div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}"><h3 class="rapidoc-heading component-title" part="heading heading-3">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">Schema</span></h3>${this.schemaStyle==="table"?u`<schema-table .data="${se(e.component)}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-table>`:u`<schema-tree .data="${se(e.component)}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="false" schema-hide-write-only="${this.schemaHideWriteOnly}" exportparts="schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></schema-tree>`}</div>`}function lf(e,t){return e.id.indexOf("schemas-")===-1?u`<div class="expanded-endpoint-body observe-me ${e.name}" id="cmp--${e.id}">${u`<h3 class="rapidoc-heading component-title" part="heading heading-3">${e.name} <span style="color:var(--muted-foreground);font-size:var(--font-size-small);font-weight:400">${t}</span></h3>${e.component?u`<div class="mono-font regular-font-size" style="padding:8px 0;color:var(--card-foreground)"><json-tree class="border tree" render-style="${this.renderStyle}" .data="${e.component}"></json-tree></div>`:""}`}</div>`:of.call(this,e)}function uc(){return this.resolvedSpec?u`${this.resolvedSpec.components.map(e=>u`<div id="cmp--${e.name.toLowerCase()}" class="regular-font section-gap--read-mode observe-me read-mode-tag"><h2 class="rapidoc-heading title tag" part="heading heading-2">${e.name}</h2>${M(`<div class='m-markdown regular-font'>${H(T(e.description||""))}</div>`)}</div><div class="regular-font section-gap--read-mode">${e.subComponents.filter(t=>t.expanded!==!1).map(t=>lf.call(this,t,e.name))}</div>`)}`:""}function cf(){let e=new Qe,t=new T.Renderer;return t.heading=({text:r,depth:a})=>`<h${a} class="observe-me" id="overview--${e.slug(r)}">${r}</h${a}>`,Ir(t),t}function ks(){return u`<section id="overview" part="section-overview" class="observe-me ${this.renderStyle==="view"?"section-gap":"section-gap--read-mode"}">${this.resolvedSpec?.info?u`<h1 id="api-title" class="rapidoc-heading" part="section-overview-title heading heading-1">${this.resolvedSpec.info.title} ${this.resolvedSpec.info.version?u`<span class="version" part="label-overview-version">${this.resolvedSpec.info.version}</span>`:""}</h1><div id="api-info">${this.resolvedSpec.info.contact?.email?u`<span>${this.resolvedSpec.info.contact.name||"Email"}: <a href="mailto:${this.resolvedSpec.info.contact.email}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.email}</a></span>`:""} ${this.resolvedSpec.info.contact?.url?u`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""} ${this.resolvedSpec.info.license?u`<span>License: ${this.resolvedSpec.info.license.url?u`<a href="${this.resolvedSpec.info.license.url}" part="anchor anchor-overview">${this.resolvedSpec.info.license.name}</a>`:this.resolvedSpec.info.license.name}</span>`:""} ${this.resolvedSpec.info.termsOfService?u`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""}</div><slot name="overview"></slot>${this.resolvedSpec.info.description?u`<div id="api-description" class="m-markdown regular-font">${M(H(T(this.resolvedSpec.info.description,this.infoDescriptionHeadingsInNavBar==="true"?{renderer:cf()}:void 0)))}</div>`:""}`:""}</section>`}function $s(e){return String(e||"").replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").replace(/^_|_$/g,"").toUpperCase()||"API_KEY"}var df=new Set(["authorization","cookie","set-cookie","x-api-key","api-key","apikey","api_key","user-agent","host","content-length","accept","accept-encoding","connection"]);function hc(e){if(!e||e==="false")return!1;let t=(Array.isArray(e)?e:String(e).split(",")).map(r=>String(r).trim().toLowerCase()).filter(Boolean);return t.length?!t.some(r=>r==="none"||r==="false"):!1}function ht(e){return e?e.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9_]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"").toLowerCase():"tool"}function Ut(e,t=300){if(!e||typeof e!="string")return"";let r=e.replace(/<[^>]*>/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[`*_~#<>]/g,"").replace(/\s+/g," ").trim();return r.length<=t?r:r.slice(0,t-3)+"..."}function pf(e,t){return ht(`${e}_${t.split("/").filter(Boolean).map(r=>r.startsWith("{")&&r.endsWith("}")?`by_${r.slice(1,-1)}`:r).join("_")}`)}function mc(e){let t=e?.tools||[],r=e?.resources||[],a=0,n=0;for(let i of t)a+=Math.ceil((i.name.length+(i.description||"").length+JSON.stringify(i.inputSchema||{}).length)/4),a+=25,i.annotations?.readOnlyHint||n++;for(let i of r)a+=Math.ceil((i.name.length+(i.description||"").length+i.uri.length)/4)+20;let s=[];return a>5e3&&s.push(`Context overhead (~${a.toLocaleString()} tokens/turn) is high. Consider hiding unused operations with x-internal: true.`),t.length>30&&s.push(`${t.length} tools exceeds the recommended limit of 30 tools per agent to prevent model paralysis.`),{totalTools:t.length,totalResources:r.length,estimatedTokens:a,consequentialCount:n,warnings:s}}function fc(e){let t=e.map(r=>String(r).toLowerCase());return t.some(r=>["put","patch","delete"].includes(r))?{destructiveHint:!0}:t.every(r=>["get","head","options"].includes(r))?{destructiveHint:!1}:{}}function gc(e,t={}){let r=ht(e||"api_mcp_server"),a=t.schemes?.length?t.schemes:[],n={};for(let o of a)n[$s(o)]=`your-${ht(o).replace(/_/g,"-")}`;a.length||(n.API_KEY="your-api-key-here");let s={mcpServers:{[r]:{command:"npx",args:["-y","tsx",t.serverPath||`/absolute/path/to/${r.replace(/_/g,"-")}/server.ts`],env:n}}},i=s;return{claudeDesktopConfig:JSON.stringify(s,null,2),cursorConfig:JSON.stringify(i,null,2)}}var uf=new Set(["type","title","description","default","enum","const","format","multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","maxProperties","minProperties","required"]),hf=new Set(["items","additionalProperties","not"]),mf=new Set(["allOf","anyOf","oneOf"]);function yc(e,t){if(typeof t=="string"&&t.startsWith("#/"))return t.slice(2).split("/").map(r=>decodeURIComponent(r).replace(/~1/g,"/").replace(/~0/g,"~")).reduce((r,a)=>r&&typeof r=="object"?r[a]:void 0,e)}function qe(e,t,r=new Set){if(!e||typeof e!="object")return{};if(e.$ref){let s=yc(t,e.$ref);return!s||typeof s!="object"?{description:`See ${e.$ref}`}:qe(s,t,r)}if(r.has(e))return e.type?{type:e.type}:{};r.add(e);let a={},n=!1;for(let[s,i]of Object.entries(e))if(s==="properties"&&i&&typeof i=="object"){a.properties={};for(let[o,l]of Object.entries(i))l?.readOnly!==!0&&(a.properties[o]=qe(l,t,r))}else hf.has(s)?a[s]=typeof i=="object"?qe(i,t,r):i:mf.has(s)&&Array.isArray(i)?a[s]=i.map(o=>qe(o,t,r)):s==="nullable"?n=i===!0:uf.has(s)&&(a[s]=i);r.delete(e),a.properties&&Array.isArray(a.required)&&(a.required=a.required.filter(s=>s in a.properties),a.required.length||delete a.required);for(let[s,i]of[["exclusiveMinimum","minimum"],["exclusiveMaximum","maximum"]])typeof a[s]=="boolean"&&(a[s]&&a[i]!==void 0?(a[s]=a[i],delete a[i]):delete a[s]);return n&&a.type&&![].concat(a.type).includes("null")&&(a.type=[].concat(a.type,"null")),a}function bc(e,t,r){if(!t||typeof t.reference!="string")return t;let a=t.reference.match(/^\$components\.([A-Za-z]+)\.([A-Za-z0-9_.-]+)$/);if(!a||a[1]!==r)return null;let n=e?.components?.[r]?.[a[2]];return n?{...n,...t.value===void 0?{}:{value:t.value}}:null}var ff=["get","put","post","delete","options","head","patch","trace","query"];function gf(e,t){let r=typeof t?.$ref=="string"&&t.$ref.match(/^#\/(?:components\/)?parameters\/(.+)$/);if(!r)return t;let a=r[1].replace(/~1/g,"/").replace(/~0/g,"~");return e?.components?.parameters?.[a]??e?.parameters?.[a]}function vc(e,t=r=>r){let r=new Set;for(let a of e)for(let n of Array.isArray(a)?a:[]){let s=t(n);s?.in==="query"&&s.allowReserved===!0&&s.name&&r.add(s.name)}return[...r]}function xc(e){let t=new Map,r=new Map;for(let[a,n]of Object.entries(e?.paths||{}))if(n&&typeof n=="object")for(let s of ff){let i=n[s];if(!i||typeof i!="object")continue;let o={operationId:i.operationId||"",method:s,path:a,summary:i.summary||""},l=i.security??e.security;l!==void 0&&(o.security=l);let c=vc([n.parameters,i.parameters],d=>gf(e,d));c.length&&(o.allowReserved=c),i.operationId&&t.set(i.operationId,o),r.set(`${s} ${a}`,o)}return{byId:t,byPath:r}}function wc(e){let t=new Map,r=new Map;for(let a of e?.tags||[])for(let n of a?.paths||[]){if(!n?.method||!n.path||n.isWebhook)continue;let s=n.method.toLowerCase(),i={operationId:n.operationId||"",method:s,path:n.path,summary:n.summary||""};n.security!==void 0&&(i.security=n.security);let o=vc([n.parameters]);o.length&&(i.allowReserved=o);let l=`${s} ${n.path}`;r.has(l)||(n.operationId&&t.set(n.operationId,i),r.set(l,i))}return{byId:t,byPath:r}}function yf(e){return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}function bf(e,t){if(!t?.size)return null;if(e.operationId){let r="",a=e.operationId,n=a.match(/^\$sourceDescriptions\.([A-Za-z0-9_-]+)\.(.+)$/);n&&([,r,a]=n);for(let[s,i]of t){if(r&&s!==r)continue;let o=i.byId.get(a);if(o)return{source:s,...o}}return null}if(e.operationPath){let r=e.operationPath.match(/^\{\$sourceDescriptions\.([A-Za-z0-9_-]+)\.url\}#(.*)$/);if(!r)return null;let[,a,n]=r,s=n.split("/").slice(1).map(yf);if(s.length!==3||s[0]!=="paths")return null;let i=t.get(a)?.byPath.get(`${s[2].toLowerCase()} ${s[1]}`);return i?{source:a,...i}:null}return null}var vf=/\$(inputs|steps|workflows)\.([A-Za-z0-9_-]+)(?:\.([A-Za-z0-9_-]+)(?:\.([A-Za-z0-9_-]+))?)?/g;function Ss(e,t,r){if(typeof e=="string")for(let a of e.matchAll(vf)){let[n,s,i,o,l]=a,c;c=s==="inputs"?{kind:"input",name:i,expr:n}:s==="steps"&&o==="outputs"&&l?{kind:"step",stepId:i,name:l,expr:n}:s==="steps"?{kind:"step",stepId:i,name:"",expr:n}:o==="outputs"&&l?{kind:"workflow",workflowId:i,name:l,expr:n}:{kind:"workflow",workflowId:i,name:"",expr:n},r.has(n)||(r.add(n),t.push(c))}else if(Array.isArray(e))for(let a of e)Ss(a,t,r);else if(e&&typeof e=="object")for(let a of Object.values(e))Ss(a,t,r)}function xf(e){let t=[];return Ss(e,t,new Set),t}var wf=new Set(["end","goto","retry"]);function kc(e){return(Array.isArray(e)?e:[]).flatMap((t,r)=>t&&typeof t.condition=="string"?[{index:r,condition:t.condition,context:t.context||"",type:typeof t.type=="string"?t.type:t.type?.type||"simple"}]:[])}function kf(e,t,r){return(Array.isArray(t)?t:[]).flatMap((a,n)=>{let s=bc(e,a,r);return!s||!wf.has(s.type)?[]:[{index:n,type:s.type,name:s.name||"",stepId:s.stepId||"",workflowId:s.workflowId||"",retryAfter:s.retryAfter,retryLimit:s.retryLimit,criteria:kc(s.criteria)}]})}function $c(e,t){let r=new Set(e.map(a=>a.name).filter(Boolean));return[...e,...t.filter(a=>!a.name||!r.has(a.name))]}var Sc={apiKey:["apiKey"],basic:["username","password"],bearer:["token"]};function $f(e){if(!e||typeof e!="object")return null;if(e.type==="apiKey")return"apiKey";if(e.type==="oauth2"||e.type==="openIdConnect")return"bearer";if(e.type==="http"){let t=String(e.scheme||"").toLowerCase();if(t==="basic"||t==="bearer")return t}return null}function Sf(e){return!e||typeof e!="object"?"":e.type==="apiKey"?["apiKey",e.in,e.name].filter(Boolean).join(" "):e.type==="http"?String(e.scheme||"http").toLowerCase():String(e.type||"")}function Ac(e){return(Array.isArray(e)?e:[]).map((t,r)=>({e:t,index:r})).filter(({e:t})=>t&&typeof t=="object").map(({e:t,index:r})=>{let a={index:r,values:t.values&&typeof t.values=="object"?t.values:{}};return typeof t.schemeName=="string"&&(a.schemeName=t.schemeName),t.scheme&&typeof t.scheme=="object"&&(a.scheme=t.scheme),a})}function Af(e,t){return[...Ac(e?.["x-security"]).map(r=>({...r,inherited:!0})),...Ac(t?.["x-security"]).map(r=>({...r,inherited:!1}))]}var Ef=["get","post","put","patch","delete","head","options","connect","trace"],Df=e=>String(e).includes("$");function Cf(e){try{return["http:","https:"].includes(new URL(String(e)).protocol)}catch{return!1}}function Tf(e){let t=e?.["x-operation"];return!t||typeof t!="object"?null:{method:typeof t.method=="string"?t.method.toLowerCase():"",url:typeof t.url=="string"?t.url:""}}var Of=new Set(["path","query","header","cookie"]);function Ec(e,t,r){let a=[];for(let n of e)n.type==="simple"?a.push({condition:n.condition}):r.push(`${t}[${n.index}]: criterion type ${n.type} is not supported, only simple conditions`);return a}function Ra(e,t,r,a,n,s){let i=[];for(let o of kf(e,t,r)){let l=`${a}[${o.index}]`;if(o.workflowId){s.push(`${l}: ${o.type} to another workflow is not supported`);continue}if(o.stepId&&!n.has(o.stepId)){s.push(`${l}: no step "${o.stepId}"`);continue}let c={name:o.name,type:o.type,criteria:Ec(o.criteria,l,s)};o.stepId&&(c.stepId=o.stepId),o.type==="retry"&&(c.retryLimit=Number.isFinite(o.retryLimit)?o.retryLimit:1,c.retryAfter=Number.isFinite(o.retryAfter)?o.retryAfter:0),i.push(c)}return i}function Mt(e,t,r){for(let a of xf(e))a.kind==="workflow"&&r.push(`${t}: ${a.expr} refers to another workflow, which is not supported`)}function Ff(e,t,r,a,n,s){let i=[];for(let o of Af(e,t)){let l=`${o.inherited?"x-security":`${n}.x-security`}[${o.index}]`;if(!!o.schemeName==!!o.scheme){s.push(`${l}: needs exactly one of schemeName or scheme`);continue}if(o.schemeName&&!r.source){s.push(`${l}: schemeName can't be used with x-operation: define the scheme inline`);continue}let c=o.scheme||a?.[r.source]?.[o.schemeName];if(!c){s.push(`${l}: no security scheme "${o.schemeName}" in ${r.source}`);continue}let d=$f(c);if(!d){s.push(`${l}: ${Sf(c)} security is not supported`);continue}if(d==="apiKey"&&(!c.name||!["header","query","cookie"].includes(c.in))){s.push(`${l}: an apiKey scheme needs a name and in: header, query or cookie`);continue}let p=d==="bearer"?["token","accessToken"]:Sc[d],f={};for(let y of p)o.values[y]!==void 0&&(f[y]=o.values[y]);if(!Object.keys(f).length){s.push(`${l}: values needs ${Sc[d].join(" and ")}`);continue}Mt(f,l,s);let h={type:c.type};for(let y of["scheme","in","name"])c[y]&&(h[y]=c[y]);i.push({scheme:h,values:f})}return i}function jf(e,t,r,a,n,s,i){let o=`steps.${t.stepId}`;if(t.workflowId)return s.push(`${o}: calls workflow "${t.workflowId}", which is not supported`),null;let l=Tf(t);if(l){if(!Ef.includes(l.method))return s.push(`${o}.x-operation.method: "${l.method}" is not an HTTP method`),null;if(!Df(l.url)&&!Cf(l.url))return s.push(`${o}.x-operation.url: must be an absolute http or https URL`),null;Mt(l.url,`${o}.x-operation.url`,s)}let c=l?{source:"",method:l.method,url:l.url}:bf(t,a);if(!c){let g=t.operationId||t.operationPath||"(no operation)";return s.push(`${o}: operation ${g} was not found in ${[...a.keys()].join(", ")||"any source"}`),null}let d=[],p=[];for(let[g,k]of(Array.isArray(t.parameters)?t.parameters:[]).entries()){let v=bc(e,k,"parameters");if(!v?.name)continue;if(!Of.has(v.in)){s.push(`${o}.parameters[${g}]: "in" must be path, query, header or cookie`);continue}let w=typeof v["x-allowReserved"]=="boolean"?v["x-allowReserved"]:!!c.allowReserved?.includes(v.name);c.url&&v.in==="path"&&!c.url.includes(`{${v.name}}`)?s.push(`${o}.parameters[${g}]: the x-operation URL has no {${v.name}}`):(d.push(v.in==="query"&&w?{name:v.name,in:v.in,allowReserved:!0}:{name:v.name,in:v.in}),p.push({name:v.name,in:v.in,value:v.value}),Mt(v.value,`${o}.parameters[${g}]`,s))}let f=null;if(t.requestBody&&typeof t.requestBody=="object"){let g=t.requestBody.contentType||"application/json";f={contentType:g,payload:t.requestBody.payload??null},Array.isArray(t.requestBody.replacements)&&(f.replacements=t.requestBody.replacements.filter(k=>k&&typeof k.target=="string").map(k=>({target:k.target,value:k.value}))),d.push({name:"body",in:"body",contentType:g}),Mt(t.requestBody,`${o}.requestBody`,s)}let h=Ra(e,t.onSuccess,"successActions",`${o}.onSuccess`,n,s),y=Ra(e,t.onFailure,"failureActions",`${o}.onFailure`,n,s),m={};for(let[g,k]of Object.entries(t.outputs||{}))m[g]=k,Mt(k,`${o}.outputs.${g}`,s);return{stepId:t.stepId,description:t.description||"",operation:{source:c.source,method:c.method.toUpperCase(),...c.url?{url:c.url}:{path:c.path},params:d,security:Array.isArray(c.security)?c.security.filter(g=>g&&typeof g=="object"):[]},parameters:p,requestBody:f,security:Ff(r.raw,t,c,i,o,s),successCriteria:Ec(kc(t.successCriteria),`${o}.successCriteria`,s),onSuccess:$c(h,r.successActions),onFailure:$c(y,r.failureActions),outputs:m}}function Rf(e,t={}){let r=t.sources||new Map,a=[],n={},s=Array.isArray(e?.workflows)?e.workflows:[];for(let[i,o]of s.entries()){if(!o?.workflowId)continue;let l=[],c=Array.isArray(o.steps)?o.steps:[],d=new Set(c.map(g=>g?.stepId).filter(Boolean)),p={raw:o,successActions:Ra(e,o.successActions,"successActions","successActions",d,l),failureActions:Ra(e,o.failureActions,"failureActions","failureActions",d,l)},f=c.filter(g=>g?.stepId).map(g=>jf(e,g,p,r,d,l,t.schemes)).filter(Boolean);f.length||l.push("has no runnable step");let h={};for(let[g,k]of Object.entries(o.outputs||{}))h[g]=k,Mt(k,`outputs.${g}`,l);if(l.length){t.onProblem?.({level:"error",path:`workflows[${i}]`,message:`workflow ${o.workflowId} is left out of the MCP export: ${l.join("; ")}`});continue}let y=o.inputs?qe(o.inputs,e):{type:"object",properties:{}};y.type||="object",y.properties||={};let m=f.map(g=>g.operation.method);a.push({name:ht(o.workflowId),description:Ut(o.summary||o.description||o.workflowId),inputSchema:y,annotations:{readOnlyHint:m.every(g=>g==="GET"),...fc(m),idempotentHint:!1},workflow:o.workflowId}),n[o.workflowId]={workflowId:o.workflowId,summary:o.summary||"",description:o.description||"",inputs:y,steps:f,outputs:h}}return{tools:a,workflows:n}}var _f=["get","put","post","delete","options","head","patch","trace","query"],qf=["/reference","/currencies","/countries","/tiers","/categories","/schema"],If=["type","description","in","name","scheme","bearerFormat","openIdConnectUrl"];function Dc(e){return"specLoadError"in e||Array.isArray(e.tags)&&e.tags.some(t=>Array.isArray(t?.paths))}function As(e,t){for(let r=0;r<10&&typeof e?.$ref=="string"&&e.$ref.startsWith("#/");r++){let a=t;for(let n of e.$ref.slice(2).split("/")){let s=decodeURIComponent(n).replace(/~1/g,"/").replace(/~0/g,"~");a=a?.[s]}if(!a||typeof a!="object")return e;e=a}return e}function Lf(e,t){let r=[];if(t){for(let n of e.tags||[])for(let s of n.paths||[])r.push({method:String(s.method||"get").toLowerCase(),path:s.path||"",operationId:s.rawOperation?.operationId||"",summary:s.summary||"",description:s.description||"",deprecated:s.deprecated===!0,isWebhook:s.isWebhook===!0,internal:s.xInternal===!0||s.xHidden===!0,resource:s.rawOperation?.["x-mcp-resource"],parameters:Array.isArray(s.parameters)?s.parameters:[],requestBody:s.requestBody||null,security:s.security,tag:n.name||""});return r}let a=n=>Array.isArray(n)?n.map(s=>As(s,e)):[];for(let[n,s]of Object.entries(e.paths||{})){let i=As(s,e);if(!i||typeof i!="object")continue;let o=a(i.parameters);for(let l of _f){let c=i[l];if(!c||typeof c!="object")continue;let d=a(c.parameters),p=o.filter(f=>!d.some(h=>h?.name===f?.name&&h?.in===f?.in)).concat(d);r.push({method:l,path:n,operationId:c.operationId||"",summary:c.summary||"",description:c.description||"",deprecated:c.deprecated===!0,isWebhook:!1,internal:c["x-internal"]===!0||c["x-hidden"]===!0||i["x-internal"]===!0||i["x-hidden"]===!0,resource:c["x-mcp-resource"],parameters:p,requestBody:As(c.requestBody,e)||null,security:c.security??e.security,tag:Array.isArray(c.tags)&&c.tags[0]||""})}}return r}function Cc(e,t){let r={},a=(n,s)=>{if(!s||typeof s!="object"||!s.type)return;let i={};for(let o of If)s[o]!==void 0&&(i[o]=s[o]);s.type==="oauth2"&&s.flows&&typeof s.flows=="object"&&(i.flows=s.flows),r[n]=i};if(t)for(let n of e.securitySchemes||[])n?.securitySchemeId&&n.securitySchemeId!=="_rapidoc_api_key"&&a(n.securitySchemeId,n.type==="apiKey"?n:{...n,in:void 0,name:void 0});else{let n=e.components?.securitySchemes||e.securityDefinitions||{};for(let[s,i]of Object.entries(n))a(s,i?.$ref?yc(e,i.$ref):i)}return r}function Tc(e,t){let r=e.servers?.[0];if(r?.url){let a=String(r.url);for(let[n,s]of Object.entries(r.variables||{}))a=a.split(`{${n}}`).join(String(s?.default??s?.enum?.[0]??""));return a}return!t&&e.host?`${e.schemes?.[0]||"https"}://${e.host}${e.basePath||""}`:"http://localhost"}function Oc(e,t){if(e.schema)return qe(e.schema,t);if(e.content&&typeof e.content=="object"){let a=Object.values(e.content)[0];if(a?.schema)return qe(a.schema,t)}let r={};for(let a of["type","format","enum","items","default","minimum","maximum","pattern"])e[a]!==void 0&&(r[a]=e[a]);return r.type?qe(r,t):{type:"string"}}function Nf(e){let t=e?.content;if(!t||typeof t!="object")return null;let r=Object.keys(t),a=r.find(n=>n==="application/json")||r.find(n=>n.endsWith("+json"))||r.find(n=>n==="application/x-www-form-urlencoded")||r.find(n=>n==="multipart/form-data")||r[0];return a?{contentType:a,schema:t[a]?.schema}:null}function Fc(e,t={}){let r=e&&typeof e=="object"?e:{},a=Dc(r),{includeInternal:n=!1,includeDeprecated:s=!1,includeOperations:i=!0}=t,o=r.info||{},l=o.title||"OpenAPI MCP Server",c=typeof t.arazzo=="string"?JSON.parse(t.arazzo):t.arazzo,d=(c?.sourceDescriptions||[]).find(w=>w?.name&&(!w.type||w.type==="openapi")),p=t.sourceName||d?.name||"api",f=Cc(r,a),h=new Set(Object.values(f).filter(w=>w.type==="apiKey"&&w.name).map(w=>`${w.in||"header"}:${String(w.name).toLowerCase()}`)),y=[],m=[],g=new Map;for(let w of i?Lf(r,a):[]){if(w.isWebhook||w.internal&&!n||w.deprecated&&!s)continue;let b={},A=[],$=[];for(let q of w.parameters){if(!q?.name)continue;let Z=q.in||"query",B=String(q.name).toLowerCase();if(Z==="header"&&df.has(B)||h.has(`${Z}:${B}`))continue;if(Z==="body"){let K=Oc(q,r);q.description&&(K.description=Ut(q.description)),b.body=K,q.required&&A.push("body"),$.push({name:"body",in:"body",contentType:"application/json"});continue}if(Z==="formData")continue;let P=q.name;P in b&&(P=`${q.name}_${Z}`);let U=Oc(q,r);q.description&&(U.description=Ut(q.description)),b[P]=U,(q.required||Z==="path")&&A.push(P);let J=P===q.name?{name:q.name,in:Z}:{name:q.name,in:Z,arg:P};Z==="query"&&q.allowReserved===!0&&(J.allowReserved=!0),$.push(J)}let E=Nf(w.requestBody);if(E){let q=E.schema?qe(E.schema,r):{type:"object"};w.requestBody.description&&(q.description=Ut(w.requestBody.description)),b.body=q,w.requestBody.required&&A.push("body"),$.push({name:"body",in:"body",contentType:E.contentType})}let D={type:"object",properties:b};A.length&&(D.required=A);let O=ht(w.operationId||pf(w.method,w.path)),j=g.get(O)||0;g.set(O,j+1),j&&(O=`${O}_${j+1}`);let R=Ut(w.summary||w.description||`${w.method.toUpperCase()} ${w.path}`),N={source:p,method:w.method.toUpperCase(),path:w.path,params:$,security:Array.isArray(w.security)?w.security.filter(q=>q&&typeof q=="object"):[]},W=w.method==="get";W&&!A.length&&w.resource!==!1&&(w.resource===!0||qf.some(q=>w.path.includes(q)))?m.push({name:O,uri:`reference://${O.replace(/^get_/,"").replace(/_/g,"-")}`,description:R,mimeType:"application/json",operation:N}):y.push({name:O,description:R,inputSchema:D,annotations:{readOnlyHint:W,...fc([w.method]),idempotentHint:["get","put","delete"].includes(w.method)},operation:N})}let k={},v={[p]:{baseUrl:Tc(r,a),securitySchemes:f}};if(c&&typeof c=="object"){let w=new Map([[p,a?wc(r):xc(r)]]);for(let[A,$]of Object.entries(t.sources||{})){if(A===p||!$||typeof $!="object")continue;let E=Dc($);w.set(A,E?wc($):xc($)),v[A]={baseUrl:Tc($,E),securitySchemes:Cc($,E)}}let b=Rf(c,{sources:w,schemes:Object.fromEntries(Object.entries(v).map(([A,$])=>[A,$.securitySchemes])),onProblem:t.onProblem});for(let A of b.tools){let $=g.get(A.name)||0;g.set(A.name,$+1),y.push($?{...A,name:`${A.name}_${$+1}`}:A)}Object.assign(k,b.workflows)}return{manifestVersion:1,server:{name:ht(t.serverName||l),version:o.version||"1.0.0",description:Ut(o.description||"")},sources:v,tools:y,resources:m,workflows:k}}var Bf=`/**
 * RapiDoc MCP runtime: executes the operation tools of an MCP manifest (see manifest.js) with
 * \`fetch\`, so the same code runs in Node, browsers and edge workers. Workflow tools are run by
 * workflow-runtime.js, plugged in through the \`runWorkflow\` option, so pages and exports without
 * workflows carry no Arazzo code.
 *
 * This file is copied verbatim into every exported MCP server project as \`runtime.js\`, so it
 * imports nothing and relies only on \`fetch\`, \`URLSearchParams\`, \`TextEncoder\` and \`btoa\`.
 */

/** @param {string} text UTF-8 text as base64 */
function base64(text) {
  const bytes = new TextEncoder().encode(text);
  let binary = "";
  for (const b of bytes) binary += String.fromCharCode(b);
  return btoa(binary);
}

function serialize(value) {
  if (typeof value === "string") return value;
  if (value && typeof value === "object") return JSON.stringify(value);
  return String(value);
}

// RFC 3986 reserved characters a query value with allowReserved keeps as they are, all but "#",
// which would end the URL's query (encodeURIComponent already leaves ! ' ( ) * alone)
const RESERVED_ESCAPES = /%(3A|2F|3F|5B|5D|40|24|26|2B|2C|3B|3D)/gi;

/** A query value percent-encoded except for the reserved characters (OpenAPI \`allowReserved\`). */
function encodeAllowReserved(value) {
  return encodeURIComponent(value).replace(RESERVED_ESCAPES, (m) => decodeURIComponent(m));
}

/** The host (with port) of an absolute http or https URL, lower-case, or "" for anything else. */
function httpHost(url) {
  try {
    const u = new URL(String(url));
    return u.protocol === "http:" || u.protocol === "https:" ? u.host.toLowerCase() : "";
  } catch {
    return "";
  }
}

/**
 * The hosts a workflow names: its sources' base URLs (the manifest's and \`baseUrls\`) and the
 * x-operation URLs written out in its steps. A URL computed at run time may go only to these,
 * unless the runtime's \`externalHosts\` allows more.
 */
function knownHosts(manifest, baseUrls = {}) {
  const hosts = new Set();
  const add = (url) => {
    const host = httpHost(url);
    if (host) hosts.add(host);
  };
  for (const source of Object.values(manifest.sources || {})) add(source?.baseUrl);
  for (const url of Object.values(baseUrls)) add(url);
  for (const workflow of Object.values(manifest.workflows || {})) {
    for (const step of workflow?.steps || []) {
      const url = step?.operation?.url;
      if (url && !String(url).includes("$")) add(url);
    }
  }
  return hosts;
}

/**
 * The URL an x-operation step calls, checked: absolute http or https, and, when it was computed
 * from expressions (an input, a response), on a host the workflow names or \`externalHosts\` lists
 * (\`"*"\` for any). Otherwise an MCP server would fetch whatever URL an agent or an API hands it.
 */
function externalUrl(manifest, operation, options) {
  const url = String(options.url ?? operation.url);
  const host = httpHost(url);
  if (!host) throw new Error(\`x-operation URL "\${url}" is not an absolute http or https URL\`);
  if (!String(operation.url).includes("$")) return url;
  const allowed = (options.externalHosts || []).map((h) => String(h).toLowerCase());
  if (allowed.includes("*") || allowed.includes(host) || allowed.includes(new URL(url).hostname)) {
    return url;
  }
  if ((options.knownHosts || knownHosts(manifest, options.baseUrls)).has(host)) return url;
  throw new Error(
    \`x-operation URL host \${host} is not allowed: a URL computed at run time may only go to a host the workflow names, unless the runtime's externalHosts lists it\`,
  );
}

function parseJson(text) {
  try {
    return JSON.parse(text);
  } catch {
    return undefined;
  }
}

/** The environment variable name that holds a scheme's credential: \`petstore_auth\` \u2192 \`PETSTORE_AUTH\`. */
export function envNameFor(schemeId) {
  const name = String(schemeId || "")
    .replace(/([a-z0-9])([A-Z])/g, "$1_$2")
    .replace(/[^a-zA-Z0-9]+/g, "_")
    .replace(/^_|_$/g, "")
    .toUpperCase();
  return name || "API_KEY";
}

/**
 * Credentials for every security scheme in the manifest, read from environment variables:
 * \`<SCHEME>\` (the scheme id in upper snake case). \`API_KEY\` is a fallback only when the manifest
 * has one scheme: with several, one key would be sent as every scheme's credential. HTTP Basic takes
 * \`<SCHEME>\` as \`user:password\`, or \`<SCHEME>_USERNAME\` and \`<SCHEME>_PASSWORD\`.
 *
 * @param {object} manifest
 * @param {Record<string, string|undefined>} env such as \`process.env\`
 * @returns {Record<string, string|{ username: string, password: string }>}
 */
export function credentialsFromEnv(manifest, env = {}) {
  const credentials = {};
  const schemeIds = new Set(
    Object.values(manifest.sources || {}).flatMap((s) => Object.keys(s.securitySchemes || {})),
  );
  const fallback = schemeIds.size === 1 ? env.API_KEY : undefined;
  for (const source of Object.values(manifest.sources || {})) {
    for (const [id, scheme] of Object.entries(source.securitySchemes || {})) {
      const key = envNameFor(id);
      if (scheme.type === "http" && String(scheme.scheme).toLowerCase() === "basic") {
        if (env[\`\${key}_USERNAME\`] !== undefined) {
          credentials[id] = {
            username: env[\`\${key}_USERNAME\`],
            password: env[\`\${key}_PASSWORD\`] || "",
          };
          continue;
        }
      }
      const value = env[key] ?? fallback;
      if (value !== undefined && value !== "") credentials[id] = value;
    }
  }
  return credentials;
}

/** Sets a header, replacing one of the same name in any case. */
function setHeader(headers, name, value) {
  for (const key of Object.keys(headers)) {
    if (key.toLowerCase() === name.toLowerCase()) delete headers[key];
  }
  headers[name] = value;
}

/**
 * Sends one credential the way its scheme says: an API key in its header, query parameter or
 * cookie, HTTP Basic from "user:password" or \`{ username, password }\`, and a bearer token for
 * http bearer, oauth2 and openIdConnect. A later credential for the same place replaces an earlier one.
 */
function applyCredential(scheme, credential, target) {
  const token =
    typeof credential === "string" ? credential : credential?.token || credential?.accessToken;
  if (scheme.type === "apiKey") {
    const value = serialize(credential);
    if (scheme.in === "query") target.query.set(scheme.name, value);
    else if (scheme.in === "cookie") {
      const prefix = \`\${scheme.name}=\`;
      const kept = target.cookies.filter((c) => !c.startsWith(prefix));
      target.cookies.splice(0, target.cookies.length, ...kept, prefix + encodeURIComponent(value));
    } else setHeader(target.headers, scheme.name || "Authorization", value);
  } else if (scheme.type === "http" && String(scheme.scheme).toLowerCase() === "basic") {
    const pair =
      typeof credential === "string"
        ? credential
        : \`\${credential?.username ?? ""}:\${credential?.password ?? ""}\`;
    setHeader(target.headers, "Authorization", \`Basic \${base64(pair)}\`);
  } else if (token) {
    setHeader(target.headers, "Authorization", \`Bearer \${serialize(token)}\`);
  }
}

/**
 * The hosts \`EXTERNAL_HOSTS\` lists (comma-separated; \`*\` for any), as createMcpRuntime's
 * \`externalHosts\`: where a workflow's x-operation URL computed at run time may go besides the
 * hosts the workflow names. Every server that runs workflows reads the same variable.
 *
 * @param {Record<string, string|undefined>} env such as \`process.env\`
 * @returns {string[]}
 */
export function externalHostsFromEnv(env = {}) {
  return String(env.EXTERNAL_HOSTS || "")
    .split(",")
    .map((h) => h.trim())
    .filter(Boolean);
}

/**
 * Adds the credentials a security requirement asks for. \`security\` is a list of alternatives,
 * each \`{ schemeId: scopes }\`; the first alternative every credential of which is known is used.
 * With none fully known, nothing is sent when an alternative is empty (anonymous access), else
 * the first alternative is applied as far as credentials go, so the API's 401 says what is missing.
 */
function applySecurity(security, schemes, credentials, target) {
  if (!Array.isArray(security) || !security.length) return;
  const known = (alt) => Object.keys(alt).every((id) => credentials[id] !== undefined);
  let chosen = security.find(known);
  if (!chosen) {
    if (security.some((alt) => !Object.keys(alt).length)) return;
    chosen = security[0];
  }
  for (const id of Object.keys(chosen)) {
    const scheme = schemes?.[id];
    const credential = credentials[id];
    if (scheme && credential !== undefined) applyCredential(scheme, credential, target);
  }
}

/**
 * Adds a workflow step's \`x-security\` credentials, after the operation's own, in order: where
 * two set the same header, query parameter or cookie, the later one wins. Each entry is
 * \`{ scheme, values }\` with its values filled in (\`apiKey\`, \`username\` and \`password\`, or
 * \`token\`); an entry whose values are missing (an input not given) sends nothing.
 */
function applyStepSecurity(entries, target) {
  const given = (v) => v !== undefined && v !== null && v !== "";
  for (const { scheme, values = {} } of entries || []) {
    if (!scheme) continue;
    let credential;
    if (scheme.type === "apiKey") credential = values.apiKey;
    else if (scheme.type === "http" && String(scheme.scheme).toLowerCase() === "basic") {
      if (given(values.username) || given(values.password)) {
        credential = {
          username: serialize(values.username ?? ""),
          password: serialize(values.password ?? ""),
        };
      }
    } else credential = given(values.token) ? values.token : values.accessToken;
    if (given(credential)) applyCredential(scheme, credential, target);
  }
}

/**
 * The HTTP request a tool call makes, without sending it.
 *
 * @param {object} manifest
 * @param {object} operation a tool's or resource's \`operation\`
 * @param {object} args the tool arguments
 * @param {object} [options]
 * @param {object} [options.credentials] by security scheme id
 * @param {Record<string, string>} [options.baseUrls] by source name, overriding the manifest
 * @param {string} [options.url] an x-operation step's URL with its expressions filled in
 * @param {string[]} [options.externalHosts] hosts an x-operation URL computed at run time may go
 *   to besides those the workflow names; \`"*"\` allows any
 * @param {object[]} [options.security] a workflow step's \`x-security\` credentials, values filled
 *   in (\`{ scheme, values }\`), sent after the operation's own
 * @returns {{ url: string, method: string, headers: Record<string, string>, body?: string }}
 */
export function buildRequest(manifest, operation, args = {}, options = {}) {
  const source = manifest.sources?.[operation.source] || {};
  // An x-operation step names its own URL, no source
  const base = operation.url
    ? ""
    : String(options.baseUrls?.[operation.source] || source.baseUrl || "").replace(/\\/$/, "");
  const headers = {};
  const query = new URLSearchParams();
  // Query parameters with allowReserved, as "name=value" pairs: URLSearchParams would encode them
  const reservedQuery = [];
  const cookies = [];
  let path = operation.url ? externalUrl(manifest, operation, options) : operation.path || "";
  let body;
  for (const p of operation.params || []) {
    const value = args[p.arg || p.name];
    if (value === undefined || value === null) continue;
    if (p.in === "path") {
      const segment = serialize(value);
      // Percent-encoding keeps "/" inside the segment, but "." and ".." are dot segments that URL
      // parsing resolves: "/orders/../items" would call "/items"
      if (segment === "." || segment === "..") {
        throw new Error(\`Path parameter \${p.name} can't be "\${segment}"\`);
      }
      path = path.split(\`{\${p.name}}\`).join(encodeURIComponent(segment));
    } else if (p.in === "query") {
      for (const v of Array.isArray(value) ? value : [value]) {
        if (p.allowReserved) {
          reservedQuery.push(\`\${encodeURIComponent(p.name)}=\${encodeAllowReserved(serialize(v))}\`);
        } else query.append(p.name, serialize(v));
      }
    } else if (p.in === "header") {
      headers[p.name] = serialize(value);
    } else if (p.in === "cookie") {
      cookies.push(\`\${p.name}=\${encodeURIComponent(serialize(value))}\`);
    } else if (p.in === "body") {
      body = { contentType: p.contentType || "application/json", value };
    }
  }
  const missing = path.match(/\\{[^}]+\\}/g);
  if (missing) throw new Error(\`Missing path parameter \${missing.join(", ")}\`);

  const target = { headers, query, cookies };
  applySecurity(operation.security, source.securitySchemes, options.credentials || {}, target);
  applyStepSecurity(options.security, target);

  const request = { url: base + path, method: operation.method || "GET", headers };
  const qs = [query.toString(), ...reservedQuery].filter(Boolean).join("&");
  if (qs) request.url += (request.url.includes("?") ? "&" : "?") + qs;
  if (cookies.length) headers.Cookie = cookies.join("; ");
  if (!Object.keys(headers).some((h) => h.toLowerCase() === "accept")) {
    headers.Accept = "application/json";
  }
  if (body) {
    if (body.contentType === "application/x-www-form-urlencoded") {
      const form = new URLSearchParams();
      for (const [k, v] of Object.entries(body.value || {})) form.append(k, serialize(v));
      request.body = form.toString();
      headers["Content-Type"] = body.contentType;
    } else {
      request.body = typeof body.value === "string" ? body.value : JSON.stringify(body.value);
      headers["Content-Type"] = body.contentType.startsWith("multipart/")
        ? "application/json"
        : body.contentType;
    }
  }
  return request;
}

function errorResult(text) {
  return { isError: true, content: [{ type: "text", text }] };
}

/**
 * @param {object} manifest from buildMcpManifest()
 * @param {object} [options]
 * @param {typeof fetch} [options.fetch] defaults to the global fetch
 * @param {object} [options.credentials] by security scheme id: an API key or token string, or
 *   \`{ username, password }\` for HTTP Basic
 * @param {Record<string, string>} [options.baseUrls] by source name, overriding the manifest
 * @param {string[]} [options.externalHosts] hosts a workflow's x-operation URL computed at run
 *   time (from an input or a response) may go to, besides the hosts the workflow names (its
 *   sources' and its written-out x-operation URLs'); \`["*"]\` allows any, as in a browser page
 * @param {Function} [options.runWorkflow] \`(runtime, tool, args, hooks) => Promise<result>\` from
 *   workflow-runtime.js; without it a workflow tool answers with an error result
 * @returns {{ manifest: object, listTools(): object[], listResources(): object[],
 *   callTool(name: string, args?: object, hooks?: object): Promise<object>,
 *   readResource(uri: string): Promise<object>, execute(operation: object, args: object,
 *   extra?: { headers?: object, security?: object[], url?: string }): Promise<object> }} MCP results: \`callTool\` returns \`{ content, structuredContent?,
 *   isError? }\`, \`readResource\` returns \`{ contents }\`. \`execute\` sends one operation and returns
 *   \`{ request, response, headers, text, data }\` or \`{ request?, error }\`, for workflow runners.
 */
export function createMcpRuntime(manifest, options = {}) {
  const fetchImpl = options.fetch || globalThis.fetch;
  const requestOptions = {
    credentials: options.credentials || {},
    baseUrls: options.baseUrls || {},
    externalHosts: options.externalHosts || [],
    knownHosts: knownHosts(manifest, options.baseUrls),
  };
  const tools = new Map((manifest.tools || []).map((t) => [t.name, t]));
  const resources = new Map((manifest.resources || []).map((r) => [r.uri, r]));

  async function send(operation, args, extra = {}) {
    let request;
    try {
      request = buildRequest(manifest, operation, args, {
        ...requestOptions,
        security: extra.security,
        url: extra.url,
      });
      if (extra.headers) request.headers = { ...request.headers, ...extra.headers };
    } catch (err) {
      return { error: errorResult(err.message) };
    }
    let response;
    try {
      response = await fetchImpl(request.url, {
        method: request.method,
        headers: request.headers,
        body: request.body,
      });
    } catch (err) {
      return { request, error: errorResult(\`Request failed: \${err.message}\`) };
    }
    const text = await response.text();
    const headers = {};
    if (typeof response.headers?.forEach === "function") {
      response.headers.forEach((v, k) => (headers[k] = v));
    }
    return { request, response, headers, text, data: parseJson(text) };
  }

  const runtime = {
    manifest,
    execute: send,
    listTools() {
      return [...tools.values()].map(({ name, description, inputSchema, annotations }) => ({
        name,
        description,
        inputSchema,
        annotations,
      }));
    },
    listResources() {
      return [...resources.values()].map(({ name, uri, description, mimeType }) => ({
        name,
        uri,
        description,
        mimeType,
      }));
    },
    async callTool(name, args = {}, hooks = {}) {
      const tool = tools.get(name);
      if (!tool) return errorResult(\`Unknown tool "\${name}"\`);
      if (tool.workflow) {
        if (!options.runWorkflow) {
          return errorResult(
            \`Tool "\${name}" is a workflow; this runtime was created without workflow support\`,
          );
        }
        return options.runWorkflow(runtime, tool, args, hooks);
      }
      if (!tool.operation) return errorResult(\`Tool "\${name}" has nothing to run\`);
      const { error, response, text, data } = await send(tool.operation, args || {});
      if (error) return error;
      const pretty = data === undefined ? text : JSON.stringify(data, null, 2);
      if (!response.ok) {
        return errorResult(
          \`HTTP \${response.status}\${response.statusText ? \` \${response.statusText}\` : ""}\\n\${pretty}\`,
        );
      }
      const result = { content: [{ type: "text", text: pretty }] };
      if (data && typeof data === "object" && !Array.isArray(data)) result.structuredContent = data;
      return result;
    },
    async readResource(uri) {
      const resource = resources.get(uri);
      if (!resource) throw new Error(\`Unknown resource "\${uri}"\`);
      const { error, response, text } = await send(resource.operation, {});
      if (error) throw new Error(error.content[0].text);
      if (!response.ok) throw new Error(\`HTTP \${response.status} reading \${uri}: \${text}\`);
      return { contents: [{ uri, mimeType: resource.mimeType || "application/json", text }] };
    },
  };
  return runtime;
}
`,zf=`/**
 * MCP server over stdio for the API described in manifest.json. Exported by RapiDoc.
 *
 * The tools, resources and the API's base URL come from the manifest and the requests are made
 * by runtime.js, so this file is the same for every API. Credentials come from environment
 * variables named after the API's security schemes (see mcp.json);
 * API_BASE_URL overrides the base URL.
 */
import { readFileSync } from "node:fs";
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
  CallToolRequestSchema,
  ListResourcesRequestSchema,
  ListToolsRequestSchema,
  ReadResourceRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
import { createMcpRuntime, credentialsFromEnv, externalHostsFromEnv } from "./runtime.js";

// workflow-runtime.js is part of the export only when the manifest has workflow tools
const { runWorkflow } = await import("./workflow-runtime.js").catch(() => ({
  runWorkflow: undefined,
}));

const manifest = JSON.parse(readFileSync(new URL("./manifest.json", import.meta.url), "utf8"));

const baseUrls: Record<string, string> = {};
if (process.env.API_BASE_URL) {
  for (const name of Object.keys(manifest.sources)) baseUrls[name] = process.env.API_BASE_URL;
}
const runtime = createMcpRuntime(manifest, {
  credentials: credentialsFromEnv(manifest, process.env),
  baseUrls,
  // Hosts a workflow's x-operation URL computed at run time may go to, besides those it names
  externalHosts: externalHostsFromEnv(process.env),
  runWorkflow,
});

const server = new Server(
  { name: manifest.server.name, version: manifest.server.version },
  { capabilities: { tools: {}, resources: {} } },
);
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: runtime.listTools() }));
server.setRequestHandler(CallToolRequestSchema, async (request) =>
  runtime.callTool(request.params.name, request.params.arguments ?? {}),
);
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
  resources: runtime.listResources(),
}));
server.setRequestHandler(ReadResourceRequestSchema, async (request) =>
  runtime.readResource(request.params.uri),
);

await server.connect(new StdioServerTransport());
console.error(\`[MCP] \${manifest.server.name}: \${manifest.tools.length} tools on stdio\`);
`;function Pf(e){return Object.values(e.workflows||{}).some(t=>(t?.steps||[]).some(r=>String(r?.operation?.url||"").includes("$")))}function Uf(e,t={}){let r=e.server.name||"api_mcp_server",a=Object.keys(e.workflows||{}).length>0,n=Object.values(e.sources||{}).flatMap(c=>Object.keys(c.securitySchemes||{})),s=gc(t.serverName||r,{schemes:n,serverPath:t.serverPath}),i={name:ht(t.serverName||r).replace(/_/g,"-"),version:e.server.version||"1.0.0",private:!0,type:"module",scripts:{start:"tsx server.ts"},dependencies:{"@modelcontextprotocol/sdk":"^1.12.0"},devDependencies:{tsx:"^4.19.0"}},o=n.length?n.map(c=>{let d=Object.values(e.sources).map(f=>f.securitySchemes?.[c]).find(Boolean),p=d?.type==="apiKey"?`the API key sent as ${d.in||"header"} \`${d.name}\``:d?.type==="http"&&String(d.scheme).toLowerCase()==="basic"?"`user:password` for HTTP Basic":"the bearer token";return`- \`${$s(c)}\`: ${p} (security scheme \`${c}\`)`}):["- `API_KEY`: not needed; this API declares no security scheme"],l=`# ${e.server.name} MCP server

Exported by RapiDoc from the API's OpenAPI document. \`manifest.json\` lists ${e.tools.length} tools${a?` (${Object.keys(e.workflows).length} of them workflows)`:""}${e.resources.length?` and ${e.resources.length} resources`:""}; \`server.ts\` serves them over stdio and \`runtime.js\` makes the requests${a&&t.workflowRuntime?", with workflow-runtime.js running the workflows":""}.

## Run

\`\`\`bash
npm install
${n.map(c=>`${$s(c)}="..." `).join("")}npm start
\`\`\`

Environment variables:

${o.join(`
`)}
- \`API_BASE_URL\`: overrides the base URL in the manifest (${Object.values(e.sources)[0]?.baseUrl||""})${Pf(e)?"\n- `EXTERNAL_HOSTS`: hosts, separated by commas, that a workflow step's URL computed at run time (`x-operation`) may go to besides those the workflow names; `*` allows any":""}

## Use with an AI app

Any app that can start a local MCP server works: Claude Desktop, Cursor, Claude Code, Codex and
others. Copy the \`mcpServers\` entry from \`mcp.json\` into the app's MCP configuration (apps
with another file format take the same command, arguments and variables),
${t.serverPath?"":"replace the path in `args` with the absolute path of this folder's `server.ts`, "}and fill in the credentials. The host starts the server itself, as a child process that talks over
stdin and stdout: it listens on no port, and \`npm start\` is only for trying it out. Run
\`npm install\` here first.
`;return{"manifest.json":JSON.stringify(e,null,2),"server.ts":zf,"runtime.js":Bf,...a&&t.workflowRuntime?{"workflow-runtime.js":t.workflowRuntime}:{},"package.json":JSON.stringify(i,null,2),"README.md":l,"mcp.json":s.claudeDesktopConfig}}var Mf=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let a=0;a<8;a++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r>>>0}return e})();function Hf(e){let t=4294967295;for(let r=0;r<e.length;r++)t=Mf[(t^e[r])&255]^t>>>8;return(t^4294967295)>>>0}function Wf(e){let t=new TextEncoder,r=Object.entries(e).map(([h,y])=>({name:t.encode(h),data:t.encode(String(y??""))}));for(let h of r)h.crc=Hf(h.data);let a=r.reduce((h,y)=>h+30+y.name.length+y.data.length,0),n=r.reduce((h,y)=>h+46+y.name.length,0),s=new Uint8Array(a+n+22),i=new DataView(s.buffer),o=0,l=h=>{i.setUint16(o,h,!0),o+=2},c=h=>{i.setUint32(o,h>>>0,!0),o+=4},d=h=>{s.set(h,o),o+=h.length},p=2048;for(let h of r)h.offset=o,c(67324752),l(20),l(p),l(0),l(0),l(33),c(h.crc),c(h.data.length),c(h.data.length),l(h.name.length),l(0),d(h.name),d(h.data);let f=o;for(let h of r)c(33639248),l(20),l(20),l(p),l(0),l(0),l(33),c(h.crc),c(h.data.length),c(h.data.length),l(h.name.length),l(0),l(0),l(0),l(0),c(0),c(h.offset),d(h.name);return c(101010256),l(0),l(0),l(r.length),l(r.length),c(n),c(f),l(0),s}function Kf(e,t={}){let r=[],a=Fc(e,{...t,onProblem:o=>r.push(o)}),n=Uf(a,t),s=mc(a),i=Object.values(a.sources).flatMap(o=>Object.keys(o.securitySchemes));return{manifest:a,files:n,budget:s,hostConfig:gc(a.server.name,{schemes:i,serverPath:t.serverPath}).claudeDesktopConfig,problems:r}}function _a(){let e=this.specUrl&&this.allowSpecFileDownload==="true",t=hc(this.mcp);if(!e&&!t)return"";let r="section-gap";return this.renderStyle==="focused"?r="section-gap--focused-mode":this.renderStyle==="read"&&(r="section-gap--read-mode"),u`<section id="downloads" part="section-downloads" class="downloads-bar observe-me ${r}">${e?u`<button class="btn btn-outline download-btn" part="btn btn-outline" @click="${()=>{zi(this.specUrl,"openapi-spec")}}">Download OpenAPI spec</button> ${this.specUrl?.trim().toLowerCase().endsWith("json")?u`<button class="btn btn-outline download-btn view-spec" part="btn btn-outline" @click="${()=>{Pi(this.specUrl)}}">View OpenAPI spec (New Tab)</button>`:""}`:""} ${t?u`<button class="btn btn-outline download-btn" part="btn btn-outline btn-mcp-export" title="Download an MCP server project (manifest, runtime and stdio server) as a zip" @click="${()=>{this.downloadMcpServer()}}">Export MCP Server</button>`:""}</section>`}function Es(e){let t=this.resolvedSpec?.servers.find(r=>r.url===e);return t?(this.selectedServer=t,this.requestUpdate(),this.dispatchEvent(new CustomEvent("api-server-change",{bubbles:!0,composed:!0,detail:{selectedServer:t}})),!0):!1}function jc(e,t){let r=[...e.currentTarget.closest(".server-vars").querySelectorAll("input, select")],a=t.url;r.forEach(n=>{let s=RegExp(`{${n.dataset.var}}`,"g");a=a.replace(s,n.value)}),t.computedUrl=a,this.requestUpdate()}function Vf(){return this.selectedServer&&this.selectedServer.variables?u`<h3 class="rapidoc-heading label-heading table-title" part="heading heading-3">Server variables</h3><div class="param-list-container"><ul class="param-list server-vars" part="param-list" role="list">${Object.entries(this.selectedServer.variables).map(e=>u`<li class="param" part="param"><div class="param-label" part="param-label"><div class="param-name" part="param-name">${e[0]}</div></div><div class="param-input" part="param-input">${e[1].enum?u`<select data-var="${e[0]}" @input="${t=>{jc.call(this,t,this.selectedServer)}}">${Object.entries(e[1].enum).map(t=>e[1].default===t[1]?u`<option selected="selected" label="${t[1]}" value="${t[1]}"></option>`:u`<option label="${t[1]}" value="${t[1]}"></option>`)}</select>`:u`<input type="text" part="textbox textbox-server-var" spellcheck="false" data-var="${e[0]}" value="${e[1].default}" @input="${t=>{jc.call(this,t,this.selectedServer)}}">`}</div>${e[1].description?u`<div class="param-details" part="param-details"><div class="m-markdown-small">${M(H(T(e[1].description)))}</div></div>`:""}</li>`)}</ul></div>`:""}function Rc(){return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":u`<section id="servers" part="section-servers" style="text-align:left;direction:ltr;margin-top:24px;margin-bottom:24px" class="regular-font observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap"}"><h2 part="section-servers-title heading heading-2" class="rapidoc-heading sub-title" style="display:flex;align-items:center;gap:8px">API Server ${this.mockServer==="true"?u`<span style="font-size:var(--font-size-small);font-weight:700;color:var(--green);border:1px solid var(--green);border-radius:var(--radius);padding:1px 6px;letter-spacing:.5px" title="In-browser mock server is active">MOCK ACTIVE</span>`:""}</h2><div class="mono-font" style="margin:12px 0;font-size:calc(var(--font-size-small) + 1px)">${!this.resolvedSpec.servers||this.resolvedSpec.servers?.length===0?"":u`${this.resolvedSpec?.servers.map((e,t)=>u`<div class="server-opt-row"><input type="radio" name="api_server" id="srvr-opt-${t}" value="${e.url}" @change="${()=>{Es.call(this,e.url)}}" .checked="${this.selectedServer.url===e.url}"> <label for="srvr-opt-${t}">${e.url} ${e.description?u`- <span class="regular-font">${M(H(T.parseInline(e.description)))}</span>`:""}</label></div>`)}`}<div class="table-title primary-text" part="label-selected-server">SELECTED: ${this.selectedServer?.computedUrl||"none"} ${this.mockServer==="true"?u`<span style="color:var(--green);margin-left:6px">(Mocked)</span>`:""}</div></div><slot name="servers"></slot>${Vf.call(this)}</section>`}function Sr(e,t="toggle"){let r=e?.closest(".nav-bar-tag-and-paths");if(r){let a=r.classList.contains("expanded");a&&(t==="toggle"||t==="collapse")?(r.classList.replace("expanded","collapsed"),r.querySelector(".nav-bar-tag-icon")?.setAttribute("aria-expanded","false")):a||t!=="toggle"&&t!=="expand"||(r.classList.replace("collapsed","expanded"),r.querySelector(".nav-bar-tag-icon")?.setAttribute("aria-expanded","true"))}}function qa(e,t="toggle"){let r=e?.closest(".nav-bar-tag-group");if(r){let a=r.classList.contains("expanded");a&&(t==="toggle"||t==="collapse")?(r.classList.replace("expanded","collapsed"),r.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","false")):a||t!=="toggle"&&t!=="expand"||(r.classList.replace("collapsed","expanded"),r.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","true"))}}function Ds(e){e&&(qa(e,"expand"),Sr(e,"expand"))}function _c(e,t,r){return hn(e)?!1:!t||Hr(t,e,r)}function Ar(e,t){return hn(e)?!1:e.descriptionOnly?!t:(e.paths||[]).some(r=>_c(r,t,e.name))}function Zf(e,t){return!hn(e)&&(e.tags||[]).some(r=>Ar(r,t))}function Jf(e,t="expand-all"){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let r=e.target.closest(".nav-scroll"),a=[...r.querySelectorAll(".nav-bar-tag-group")];t==="expand-all"?a.forEach(s=>{s.classList.replace("collapsed","expanded"),s.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","true")}):a.forEach(s=>{s.classList.replace("expanded","collapsed"),s.querySelector(".nav-bar-tag-group-header")?.setAttribute("aria-expanded","false")});let n=[...r.querySelectorAll(".nav-bar-tag-and-paths")];t==="expand-all"?n.forEach(s=>{s.classList.replace("collapsed","expanded"),s.querySelector(".nav-bar-tag-icon")?.setAttribute("aria-expanded","true")}):n.forEach(s=>{s.classList.replace("expanded","collapsed"),s.querySelector(".nav-bar-tag-icon")?.setAttribute("aria-expanded","false")})}function qc(e){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let t=e.target.closest("[data-action]")||e.target;if(!(t.closest("#nav-bar-search")||t.closest("#advanced-search-btn")||t.closest('[part~="btn-clear-filter"]')||t.closest('slot[name="nav-logo"]')))if(e.stopPropagation(),t.dataset?.action==="navigate"){this.scrollToEventTarget(e,!1);let r=e.currentTarget.closest("#nav-bar");r.classList.contains("floating-nav")&&r.classList.remove("floating-nav")}else t.dataset?.action==="expand-all"||t.dataset?.action==="collapse-all"?Jf(e,t.dataset.action):t.dataset?.action==="expand-collapse-tag-group"?qa(t,"toggle"):t.dataset?.action==="expand-collapse-tag"&&Sr(t,"toggle")}function Gf(){let e=new Qe,t=!0;function r(){return t?(t=!1,!0):!1}return!this.resolvedSpec||this.resolvedSpec.specLoadError?u`<nav class="nav-bar" part="section-navbar"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo" part="section-navbar-logo"></slot></div></nav>`:u`<button id="nav-bar-btn" part="btn-navbar" type="button" aria-label="Menu" aria-controls="nav-bar" @click="${this.onOpenNavBarToggle}"><svg viewBox="0 0 24 24" aria-hidden="true"><path class="nav-bar-btn-line" d="M5 7h14"/><path class="nav-bar-btn-line" d="M5 12h14"/><path class="nav-bar-btn-line" d="M5 17h14"/></svg></button><nav id="nav-bar" class="nav-bar ${this.renderStyle} overflow-${this.navItemOverflow||"ellipsis"}" part="section-navbar"><div class="nav-scroll" tabindex="-1" part="section-navbar-scroll" @click="${a=>qc.call(this,a)}" @keyup="${a=>qc.call(this,a)}"><div class="nav-bar-header" part="section-navbar-header"><slot name="nav-logo" class="logo" part="section-navbar-logo"></slot>${this.allowSearch==="false"&&this.allowAdvancedSearch==="false"?"":u`<div class="nav-bar-search-container ${this.allowAdvancedSearch==="false"?"has-bottom-border":""}" part="section-navbar-search">${this.allowSearch==="false"?"":u`<div class="nav-bar-search-input-wrapper"><input id="nav-bar-search" part="textbox textbox-nav-filter" class="nav-bar-search-input" type="text" placeholder="Filter" @change="${this.onSearchChange}" spellcheck="false"><div class="nav-bar-search-icon" @click="${this.onSearchChange}">↩</div></div>${this.searchVal?u`<button @click="${this.onClearSearch}" class="btn btn-outline btn-clear-filter" part="btn btn-outline btn-clear-filter">CLEAR</button>`:""}`} ${this.allowAdvancedSearch==="false"||this.searchVal?"":u`<button id="advanced-search-btn" class="btn btn-primary" part="btn btn-fill btn-search" @click="${this.onShowAdvancedSearchClicked}">SEARCH</button>`}</div>`}</div>${this.showInfo==="false"||!this.resolvedSpec.info?"":u`${this.infoDescriptionHeadingsInNavBar==="true"?u`${this.resolvedSpec.infoDescriptionHeaders.length>0?(()=>{let a=r();return u`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-overview" data-content-id="overview" data-action="navigate" data-first-nav-item="${a?"true":F}" tabindex="0" part="section-navbar-item section-navbar-overview">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`})():""}<div class="overview-headers">${this.resolvedSpec.infoDescriptionHeaders.map(a=>{let n=e.slug(a.text);return u`<div class="nav-bar-h${a.depth}" id="link-overview--${n}" data-action="navigate" data-content-id="overview--${n}">${a.text}</div>`})}</div>${this.resolvedSpec.infoDescriptionHeaders.length>0?u`<hr style="border-top:1px solid var(--muted);border-width:1px 0 0 0;margin:15px 0 0 0">`:""}`:(()=>{let a=r();return u`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-overview" data-action="navigate" data-content-id="overview" data-first-nav-item="${a?"true":F}" tabindex="0">${this.resolvedSpec.info?.title?.trim()||"Overview"}</div>`})()}`} ${this.allowServerSelection==="false"?"":(()=>{let a=r();return u`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-servers" data-action="navigate" data-content-id="servers" data-first-nav-item="${a?"true":F}" tabindex="0" part="section-navbar-item section-navbar-servers">API Servers</div>`})()} ${this.allowAuthentication==="false"||!this.resolvedSpec.securitySchemes?"":(()=>{let a=r();return u`<div class="nav-bar-info${a?" first-nav-item":""}" id="link-auth" data-action="navigate" data-content-id="auth" data-first-nav-item="${a?"true":F}" tabindex="0" part="section-navbar-item section-navbar-auth">Authentication</div>`})()}<div id="link-operations-top" class="nav-bar-section operations" data-action="navigate" data-content-id="${this.renderStyle==="focused"?"":"operations-top"}" part="section-navbar-item section-navbar-operations-top"><div style="font-size:16px;display:flex;margin-left:10px">${this.renderStyle==="focused"?u`<div class="nav-bar-expand-all" data-action="expand-all" tabindex="0" title="Expand all">▸</div><div class="nav-bar-collapse-all" data-action="collapse-all" tabindex="0" title="Collapse all">▸</div>`:""}</div><div class="nav-bar-section-title">OPERATIONS</div></div>${(()=>{let a=n=>{if(n.descriptionOnly)return Ar(n,this.searchVal)?u`<div class="nav-bar-tag-and-paths description-only"><div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" id="link-${n.elementId}" data-action="navigate" data-content-id="${n.elementId}" tabindex="0"><div class="nav-bar-tag-title">${n.displayName||n.name}</div></div></div>`:"";let s=(n.paths||[]).filter(o=>_c(o,this.searchVal,n.name));if(s.length===0)return"";let i=s[0].elementId;return u`<div class="nav-bar-tag-and-paths ${n.expanded?"expanded":"collapsed"}"><div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" id="link-${n.elementId}" data-action="navigate" data-content-id="${n.elementId}" data-first-path-id="${i}" tabindex="0"><div class="nav-bar-tag-title">${n.displayName||n.name}</div><div class="nav-bar-tag-icon" tabindex="0" role="button" aria-label="Expand or collapse ${n.displayName||n.name}" aria-expanded="${n.expanded?"true":"false"}" data-action="expand-collapse-tag"></div></div>${this.infoDescriptionHeadingsInNavBar==="true"?u`<div class="tag-headers">${(()=>{let o=new Qe;return n.headers.map(l=>{let c=o.slug(l.text);return u`<div class="nav-bar-h${l.depth}" part="section-navbar-item section-navbar-h${l.depth}" id="link-${n.elementId}--${c}" data-action="navigate" data-content-id="${n.elementId}--${c}" tabindex="0">${l.text}</div>`})})()}</div>`:""}<div class="nav-bar-paths-under-tag">${s.map(o=>{let l=r();return u`<div class="nav-bar-path${l?" first-nav-item":""}" style="${o.deprecated?"filter:opacity(0.5);":""}" part="section-navbar-item section-navbar-path" data-action="navigate" data-content-id="${o.elementId}" data-first-nav-item="${l?"true":F}" id="link-${o.elementId}" tabindex="0"><span class="nav-bar-path-label">${o.isWebhook?u`<span class="nav-bar-webhook">WEBHOOK</span>`:""} ${this.usePathInNavBar==="true"?u`<span class="mono-font">${o.path}</span>`:o.summary||o.shortSummary} </span>${u`<span class="nav-method ${this.showMethodInNavBar} ${o.method}">${this.showMethodInNavBar==="as-colored-block"?o.method.substring(0,3).toUpperCase():o.method.toUpperCase()}</span>`}</div>`})}</div></div>`};if(this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0){let n=new Set;return this.resolvedSpec.tagGroups.forEach(s=>{(s.tags||[]).forEach(i=>{n.add(i.name.toLowerCase())})}),u`${this.resolvedSpec.tagGroups.filter(s=>Zf(s,this.searchVal)).map(s=>{let i=s.tags.filter(o=>Ar(o,this.searchVal));return i.length===0?"":u`<div class="nav-bar-tag-group ${s.expanded?"expanded":"collapsed"}" id="link-${s.elementId}"><div class="nav-bar-tag-group-header" part="section-navbar-item section-navbar-tag-group" data-action="expand-collapse-tag-group" tabindex="0" role="button" aria-expanded="${s.expanded?"true":"false"}"><div class="nav-bar-tag-group-title">${s.displayName||s.name}</div><div class="nav-bar-tag-group-icon" tabindex="0" data-action="expand-collapse-tag-group"></div></div><div class="nav-bar-tags-under-group">${i.map(o=>a(o))}</div></div>`})}${(this.resolvedSpec.tags||[]).filter(s=>!n.has(s.name.toLowerCase())&&Ar(s,this.searchVal)).map(s=>a(s))}`}return(this.resolvedSpec.tags||[]).filter(n=>Ar(n,this.searchVal)).map(n=>a(n))})()} ${this.resolvedSpec.components&&this.showComponents==="true"?u`<div id="link-components" class="nav-bar-section components"><div class="nav-bar-section-title">COMPONENTS</div></div>${this.resolvedSpec.components.map(a=>a.subComponents.length?u`<div class="nav-bar-tag" part="section-navbar-item section-navbar-tag" data-action="navigate" data-content-id="cmp--${a.name.toLowerCase()}" id="link-cmp--${a.name.toLowerCase()}">${a.name}</div>${a.subComponents.filter(n=>n.expanded!==!1).map(n=>u`<div class="nav-bar-path" data-action="navigate" data-content-id="cmp--${n.id}" id="link-cmp--${n.id}"><span style="pointer-events:none">${n.name}</span></div>`)}`:"")}`:""}</div></nav>`}function Xf(e){let t=new T.Renderer,r=new Qe;return t.heading=({text:a,depth:n})=>`<h${n} class="observe-me" id="${e}--${r.slug(a)}">${a}</h${n}>`,Ir(t),t}function Ia(e){return u`<div class="regular-font section-gap--focused-mode" part="section-operations-in-tag">${e}</div>`}function Ic(){if(this.showInfo==="true")return Ia(u`${ks.call(this)}${_a.call(this)}`);let e=this.resolvedSpec.tags.find(r=>r.paths.length>0),t=e?.paths[0];return Ia(e&&t?ws.call(this,t,e.name||"",e.description||"",!0):"")}function Yf(e){return u`<h2 id="${e.elementId}" class="rapidoc-heading title tag" part="section-tag-title label-tag-title heading heading-2">${e.displayName||e.name}</h2>${e.description?u`<div class="m-markdown regular-font">${M(H(T(e.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:Xf(e.elementId)}:void 0)))}</div>`:""}`}function Qf(){if(!this.focusedElementId&&this.resolvedSpec&&(this.focusedElementId=this.showInfo==="false"||this.showInfo===!1?this.resolvedSpec.tags?.find(n=>n.paths.length>0)?.paths[0]?.elementId||"":"overview"),!this.focusedElementId||!this.resolvedSpec)return;let e=this.focusedElementId,t=null,r=null,a;if(e.startsWith("overview")&&this.showInfo==="true")a=u`${ks.call(this)}${_a.call(this)}`;else if(e==="auth"&&this.allowAuthentication==="true")a=Pl.call(this,this.allowTry);else if(e==="servers"&&this.allowServerSelection==="true")a=Rc.call(this);else if(e==="operations-top")a=u`<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>`;else if(e.startsWith("cmp--")&&this.showComponents==="true")a=uc.call(this);else if(e.startsWith("tag--")){let n=e.indexOf("--",4)>0?e.substring(0,e.indexOf("--",5)):e;r=this.resolvedSpec.tags.find(s=>s.elementId===n),a=r?Ia.call(this,Yf.call(this,r)):Ic.call(this)}else{for(let n of this.resolvedSpec.tags)if(r=n,t=n.paths.find(s=>`${s.elementId}`===e),t)break;if(t){let n=this.shadowRoot?.getElementById(`link-${e}`);Sr(n,"expand");let s=r?.paths?.[0]?.elementId===t.elementId;a=Ia.call(this,ws.call(this,t,r.name||"",r.description||"",s))}else a=Ic.call(this)}return a}function eg(e){if(e.expanded)e.expanded=!1,this.updateRoute==="true"&&this.replaceHistoryState("");else if(e.expanded=!0,this.updateRoute==="true"){let t=`#${e.elementId}`;window.location.hash!==t&&this.replaceHistoryState(e.elementId)}this.requestUpdate()}function Lc(e="expand-all"){let t=e==="expand-all";(this.resolvedSpec.tagGroups||[]).forEach(r=>{r.expanded=t,(r.tags||[]).forEach(a=>{a.expanded=t})}),(this.resolvedSpec.tags||[]).forEach(r=>{r.expanded=t}),this.requestUpdate()}function Nc(e,t=!1){return u`<summary @click="${r=>{eg.call(this,e,r)}}" part="section-endpoint-head-${e.expanded?"expanded":"collapsed"}" class="endpoint-head ${e.method} ${e.deprecated?"deprecated":""} ${t||e.expanded?"expanded":"collapsed"}"><div part="section-endpoint-head-method" class="method ${e.method} ${e.deprecated?"deprecated":""}">${e.method}</div><div part="section-endpoint-head-path" class="path ${e.deprecated?"deprecated":""}">${e.path} ${e.isWebhook?u`<span style="font-family:var(--font-sans);font-size:var(--font-size-small);color:var(--primary);margin-left:16px">Webhook</span>`:""}</div>${e.deprecated?u`<span style="font-size:var(--font-size-small);text-transform:uppercase;font-weight:700;color:var(--destructive);margin:2px 0 0 5px">deprecated</span>`:""} ${this.showSummaryWhenCollapsed?u`<div part="section-endpoint-head-description" class="descr">${e.summary||e.shortSummary}</div>`:""}</summary>`}function Bc(e){let t=new Set;for(let i in e.responses)for(let o in e.responses[i]?.content)t.add(o.trim());let r=[...t].join(", "),a=this.resolvedSpec.securitySchemes.filter(i=>i.finalKeyValue&&e.security?.some(o=>i.securitySchemeId in o))||[],n=this.resolvedSpec.securitySchemes.find(i=>i.securitySchemeId==="_rapidoc_api_key"&&i.value!=="-");n&&a.push(n);let s=e.xCodeSamples?Kl(e.xCodeSamples):"";return u`<div part="section-endpoint-body-${e.expanded?"expanded":"collapsed"}" class="endpoint-body ${e.method} ${e.deprecated?"deprecated":""}"><div class="summary">${e.summary?u`<h3 class="rapidoc-heading title" part="section-endpoint-body-title heading heading-3">${e.summary}</h3>`:e.shortSummary===e.description?u`<h3 class="visually-hidden">${e.method.toUpperCase()} ${e.path}</h3>`:u`<h3 class="rapidoc-heading title" part="section-endpoint-body-title heading heading-3">${e.shortSummary}</h3>`} ${e.xBadges&&e.xBadges?.length>0?u`<div style="display:flex;flex-wrap:wrap;font-size:var(--font-size-small)">${e.xBadges.map(i=>i.color==="none"?"":u`<span part="endpoint-badge" style="margin:1px;margin-right:5px;padding:1px 8px;font-weight:700;border-radius:var(--radius);background:color-mix(in srgb,${$t(i.color)} 20%,transparent);color:${$t(i.color)};border:1px solid ${$t(i.color)}">${i.label}</span>`)}</div>`:""} ${Wl.call(this,e.security,e.elementId)} ${e.description?u`<div part="section-endpoint-body-description" class="m-markdown">${M(H(T(e.description)))}</div>`:""} ${e.externalDocs?.url||e.externalDocs?.description?u`<div class="external-docs-box"><div class="m-markdown">${M(H(T(e.externalDocs?.description||"")))}</div>${e.externalDocs?.url?u`<a class="external-docs-link" href="${e.externalDocs?.url}" target="_blank">${e.externalDocs?.url} <span class="external-docs-arrow">⇲</span></a>`:""}</div>`:""}<slot name="${e.elementId}"></slot>${s}</div><div class="req-resp-container ${this.layout}-layout" part="section-req-resp-container"><div class="request-panel view-mode-request ${this.layout}-layout" part="section-request-panel"><api-request .config="${this.config}" class="${this.renderStyle}-mode ${this.layout}-layout" style="width:100%" webhook="${e.isWebhook}" method="${e.method}" path="${e.path}" .security="${e.security}" .parameters="${e.parameters}" .request_body="${e.requestBody}" .api_keys="${a}" .servers="${e.servers}" server-url="${e.servers?.length>0?e.servers[0].url:this.selectedServer?.computedUrl}" active-schema-tab="${this.defaultSchemaTab}" fill-request-fields-with-example="${this.fillRequestFieldsWithExample}" allow-try="${this.allowTry}" show-curl-before-try="${this.showCurlBeforeTry}" accept="${r}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"||e.isWebhook?"false":"true"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"?"false":e.isWebhook?"true":"false"}" fetch-credentials="${this.fetchCredentials}" exportparts="section-request-title:section-request-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
            wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-fill-example:btn-fill-example, btn-clear-resp:btn-clear-resp,
          tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content, 
          file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, 
          anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-request>${e.callbacks?Vl.call(this,e.callbacks):""}</div><api-response .config="${this.config}" class="response-panel ${this.renderStyle}-mode ${this.layout}-layout" part="section-response-panel" style="width:100%" webhook="${e.isWebhook}" .responses="${e.responses}" active-schema-tab="${this.defaultSchemaTab}" render-style="${this.renderStyle}" schema-style="${this.schemaStyle}" schema-expand-level="${this.schemaExpandLevel}" schema-description-expanded="${this.schemaDescriptionExpanded}" allow-schema-description-expand-toggle="${this.allowSchemaDescriptionExpandToggle}" schema-hide-read-only="${this.schemaHideReadOnly==="never"?"false":e.isWebhook?"true":"false"}" schema-hide-write-only="${this.schemaHideWriteOnly==="never"||e.isWebhook?"false":"true"}" selected-status="${Object.keys(e.responses||{})[0]||""}" exportparts="section-response-title:section-response-title, heading:heading, heading-4:heading-4, heading-5:heading-5, heading-6:heading-6,
            btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input, 
        textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, anchor-param-constraint:anchor-param-constraint, param-list:param-list, param:param, param-label:param-label, param-name:param-name, param-type:param-type, param-input:param-input, param-constraint:param-constraint, param-constraint-label:param-constraint-label, param-details:param-details, param-example-list:param-example-list, value-list:value-list, value-list-label:value-list-label, value-list-items:value-list-items, btn-clear-resp:btn-clear-resp,
        tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-content:tab-content, 
        schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"></api-response></div></div>`}function tg(e=!1,t=!1){if(!this.resolvedSpec)return"";let r=i=>u`${e?u`<div class="section-tag-body">${this.showTags==="true"?u`<h2 class="rapidoc-heading mini-tag-title" part="section-tag-title heading heading-2">${i.displayName||i.name}</h2>${i.description?u`<div class="regular-font regular-font-size m-markdown mini-tag-descr" part="section-tag-description">${M(H(T(i.description||"")))}</div>`:""}`:""} ${i.paths.filter(o=>!this.searchVal||Hr(this.searchVal,o,i.name)).map((o,l)=>u`<section id="${o.elementId}" class="m-endpoint regular-font ${o.method} ${t||o.expanded?"expanded":"collapsed"}" data-first-operation-in-tag="${l===0?"true":F}">${Nc.call(this,o,t)} ${t||o.expanded?Bc.call(this,o):""}</section>`)}</div>`:u`<div class="regular-font section-gap section-tag ${i.expanded?"expanded":"collapsed"}"><div class="section-tag-header" @click="${()=>{i.expanded=!i.expanded,this.requestUpdate()}}"><h2 id="${i.elementId}" class="rapidoc-heading sub-title tag" part="heading heading-2" style="color:var(--primary)">${i.displayName||i.name}</h2></div><div class="section-tag-body"><slot name="${i.elementId}"></slot>${i.description?u`<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${M(H(T(i.description||"")))}</div>`:""} ${i.paths.filter(o=>!this.searchVal||Hr(this.searchVal,o,i.name)).map((o,l)=>u`<section part="section-endpoint" id="${o.elementId}" class="m-endpoint regular-font ${o.method} ${t||o.expanded?"expanded":"collapsed"}" data-first-operation-in-tag="${l===0?"true":F}">${Nc.call(this,o,t)} ${t||o.expanded?Bc.call(this,o):""}</section>`)}</div></div>`}`,a=this.resolvedSpec.tagGroups&&this.resolvedSpec.tagGroups.length>0,n=new Set;a&&this.resolvedSpec.tagGroups.forEach(i=>{(i.tags||[]).forEach(o=>n.add(o.name.toLowerCase()))});let s=a?(this.resolvedSpec.tags||[]).filter(i=>!n.has(i.name.toLowerCase())):[];return u`${e?"":u`<div class="section-expand-collapse-container"><span @click="${()=>Lc.call(this,"expand-all")}" style="color:var(--primary);cursor:pointer">Expand all </span> |  <span @click="${()=>Lc.call(this,"collapse-all")}" style="color:var(--primary);cursor:pointer">Collapse all </span>  sections</div>`} ${a?u`${this.resolvedSpec.tagGroups.map(i=>u`<div class="regular-font section-gap section-tag-group ${i.expanded?"expanded":"collapsed"}" id="${i.elementId}"><div class="section-tag-group-header" @click="${()=>{i.expanded=!i.expanded,this.requestUpdate()}}"><h2 class="rapidoc-heading sub-title tag-group" part="heading heading-2" style="color:var(--foreground);font-size:var(--h4-font-size);font-weight:700;text-transform:uppercase;letter-spacing:.05em">${i.displayName||i.name}</h2><div class="section-tag-group-icon"></div></div><div class="section-tag-group-body">${i.description?u`<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">${M(H(T(i.description||"")))}</div>`:""} ${i.tags.map(o=>r(o))}</div></div>`)} ${s.map(i=>r(i))}`:this.resolvedSpec.tags.map(i=>r(i))}`}function rg(e){return u`<svg style="${e}" viewBox="1 0 511 512"><path d="M351 411a202 202 0 01-350 0 203 203 0 01333-24 203 203 0 0117 24zm0 0" fill="#adc165"/><path d="M334 387a202 202 0 01-216-69 202 202 0 01216 69zm78 32H85a8 8 0 01-8-8 8 8 0 018-8h327a8 8 0 017 8 8 8 0 01-7 8zm0 0" fill="#99aa52"/><path d="M374 338l-5 30a202 202 0 01-248-248 203 203 0 01253 218zm0 0" fill="#ffc73b"/><path d="M374 338a202 202 0 01-100-197 203 203 0 01100 197zm38 81l-6-2-231-231a8 8 0 0111-11l231 230a8 8 0 01-5 14zm0 0" fill="#efb025"/><path d="M311 175c0 75 40 140 101 175a202 202 0 000-350 202 202 0 00-101 175zm0 0" fill="#ff903e"/><path d="M412 419a8 8 0 01-8-8V85a8 8 0 0115 0v326a8 8 0 01-7 8zm0 0" fill="#e87425"/></svg>`}function ag(){return u`<header class="row main-header regular-font" part="section-header"><div class="only-large-screen-flex" style="align-items:center"><slot name="logo" class="logo" part="section-logo">${rg("height:36px;width:36px;margin-left:5px")}</slot><div class="header-title" part="label-header-title">${this.headingText}</div></div><div class="main-header-controls">${this.allowSpecUrlLoad==="false"?"":u`<input id="spec-url" type="text" style="font-size:var(--font-size-small)" class="header-input mono-font" part="textbox textbox-spec-url" autocomplete="off" placeholder="Spec URL" value="${this.specUrl||""}" @change="${this.onSpecUrlChange}" spellcheck="false"><div class="header-action-icon" @click="${this.onSpecUrlChange}">↩</div>`} ${this.allowSpecFileLoad==="false"?"":u`<input id="spec-file" part="file-input" type="file" style="display:none" value="${this.specFile||""}" @change="${this.onSpecFileChange}" spellcheck="false"> <button class="btn btn-primary only-large-screen" style="margin-left:10px" part="btn btn-fill" @click="${this.onFileLoadClick}">LOCAL JSON FILE</button>`}<slot name="header"></slot>${this.allowSearch==="false"||"read focused".includes(this.renderStyle)?"":u`<input id="search" class="header-input" autocomplete="off" type="text" part="textbox textbox-header-filter" placeholder="Filter" @change="${this.onSearchChange}" style="max-width:130px;margin-left:10px" spellcheck="false"><div class="header-action-icon" @click="${this.onSearchChange}">↩</div>`} ${this.allowAdvancedSearch==="false"||"read focused".includes(this.renderStyle)?"":u`<button class="btn btn-primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px" @click="${this.onShowAdvancedSearchClicked}">Search</button>`}</div></header>`}function ng(){return u`<dialog id="advanced-search-dialog" class="dialog-box"><header class="dialog-box-header"><span class="dialog-box-title">Search</span> <button type="button" @click="${e=>this.onAdvancedSearchClose(e)}">×</button></header><div class="dialog-box-content"><div class="advanced-search-options"><input id="input-advanced-search-dialog" style="width:100%;padding-right:20px" type="text" part="textbox textbox-search-dialog" placeholder="search text..." spellcheck="false" @keyup="${e=>this.onAdvancedSearch(e,400)}"><div class="search-options-row"><label class="search-option-label" for="search-api-path"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> API Path</label> <label class="search-option-label" for="search-api-descr"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked="checked" @change="${e=>this.onAdvancedSearch(e,0)}"> API Description</label> <label class="search-option-label" for="search-api-params"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change="${e=>this.onAdvancedSearch(e,0)}"> API Parameters</label> <label class="search-option-label" for="search-api-request-body"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change="${e=>this.onAdvancedSearch(e,0)}"> Request Body Parameters</label> <label class="search-option-label" for="search-api-resp-descr"><input type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change="${e=>this.onAdvancedSearch(e,0)}"> Response Description</label></div></div>${this.advancedSearchMatches?.map(e=>u`<div class="mono-font small-font-size hover-bg search-match-row" style="${e.deprecated?"filter:opacity(0.5);":""}" data-content-id="${e.elementId}" tabindex="0" @click="${t=>{this.searchVal="",this.shadowRoot.getElementById("advanced-search-dialog").close(),this.requestUpdate(),this.scrollToEventTarget(t,!0)}}"><span class="upper bold-text method-fg ${e.method}">${e.method}</span> <span>${e.path}</span> <span class="regular-font gray-text">${e.summary}</span></div>`)}</div></dialog>`}function zc(e=!1,t=!1){return this.resolvedSpec?(this.persistAuth==="true"&&$m.call(this),this.resolvedSpec.specLoadError?u`<div id="spec-not-found">${this.resolvedSpec.info.description}</div>`:this.resolvedSpec.isSpecLoading?u`<main class="main-content regular-font" part="section-main-content"><slot></slot><div class="main-content-inner--${this.renderStyle}-mode"><div class="loader"></div></div></main>`:u`<slot name="fixed-header"></slot>${this.showHeader==="false"?"":ag.call(this)} ${this.allowAdvancedSearch==="false"?"":ng.call(this)}<div id="the-main-body" class="body ${this.showSideNav==="floating"?"nav-floating":""} ${this.cssClasses}" dir="${this.pageDirection}">${(this.renderStyle==="read"||this.renderStyle==="focused")&&(this.showSideNav==="true"||this.showSideNav==="floating")&&this.resolvedSpec?Gf.call(this):""}<main class="main-content regular-font" tabindex="-1" part="section-main-content"><slot></slot><div class="main-content-inner--${this.renderStyle}-mode">${this.loading===!0?u`<div class="loader"></div>`:u`${this.loadFailed===!0?u`<div style="text-align:center;margin:16px">Unable to load the Spec</div>`:u`<div class="operations-root" @click="${r=>{this.handleHref(r)}}">${this.renderStyle==="focused"?u`${this.showInfo==="false"?_a.call(this):""}${Qf.call(this)}`:u`${this.showInfo==="true"?ks.call(this):""} ${_a.call(this)} ${this.allowServerSelection==="true"?Rc.call(this):""} ${this.allowAuthentication==="true"?Pl.call(this,this.allowTry):""}<div id="operations-top" class="observe-me"><slot name="operations-top"></slot></div>${this.renderStyle==="read"?sf.call(this):tg.call(this,e,t)} ${this.showComponents==="true"?uc.call(this):""}`}</div>`}`}</div><slot name="footer"></slot></main></div>`):!this.specUrl&&!this.loading?u`<p class="no-spec" part="no-spec" role="status">No API spec to show. Set <code>spec-url</code>, or call <code>loadSpec()</code>.</p>`:""}function sg(e,t,r={}){let a=typeof e=="string"?document.querySelector(e):e,n=typeof t=="string"?document.querySelector(t):t;if(!a||typeof window>"u")return()=>{};let s=r.activeClass||"active",i=r.updateHistory!==!1;function o(y){return y?a.querySelector(`#link-${CSS.escape(y)}`)||a.querySelector(`.nav-bar-path[data-content-id="${CSS.escape(y)}"]`)||a.querySelector(`.nav-bar-path[data-op-slug="${CSS.escape(y)}"]`)||a.querySelector(`#link-${CSS.escape(y.replace(/^[a-z0-9_-]+--/,""))}`)||(y==="overview"?a.querySelector("#link-overview, .nav-bar-info"):null):null}function l(y,m=!0){let g=o(y);if(!g||g.classList.contains(s))return;if(a.querySelectorAll("."+s).forEach(v=>v.classList.remove(s)),g.classList.add(s),Ds(g),m&&i){let v=g.getAttribute("href");v&&window.history.replaceState(window.history.state,"",v)}let k=g.closest(".nav-scroll");if(k){let v=g.getBoundingClientRect(),w=k.getBoundingClientRect();if(v.top<w.top+20||v.bottom>w.bottom-40){let b=v.top-w.top+k.scrollTop-40;k.scrollTo({top:b,behavior:"smooth"})}}}let c=y=>{let m=y.target.closest("[data-action]")||y.target.closest(".nav-bar-path, .nav-bar-info");if(!m)return;let g=m.dataset?.action;if(g==="expand-collapse-tag")Sr(m,"toggle");else if(g==="expand-collapse-tag-group")qa(m,"toggle");else if(g==="navigate"||m.classList.contains("nav-bar-path")||m.classList.contains("nav-bar-info")){let k=m.getAttribute("href")||m.getAttribute("data-tag-href"),v=k?k.indexOf("#"):-1,w=(v===-1?"":k.substring(v+1))||m.getAttribute("data-content-id")||m.getAttribute("data-op-slug")||m.id?.replace(/^link-/,"");w&&n&&typeof n.scrollToPath=="function"&&(y.preventDefault(),l(w,!1),n.scrollToPath(w),i&&k&&window.history.pushState(null,"",k))}};a.addEventListener("click",c);let d=a.querySelector(".portal-filter-input, .nav-bar-search-input"),p=null;d&&(p=y=>{let m=(y.target.value||"").toLowerCase().trim();a.querySelectorAll(".nav-bar-path, .portal-sidebar-op-item").forEach(g=>{g.style.display=g.textContent.toLowerCase().includes(m)?"flex":"none"}),a.querySelectorAll(".nav-bar-tag-and-paths").forEach(g=>{let k=g.querySelector('.nav-bar-path:not([style*="display: none"]), .portal-sidebar-op-item:not([style*="display: none"])');g.style.display=k||!m?"":"none",m&&k&&Sr(g,"expand")}),a.querySelectorAll(".nav-bar-tag-group").forEach(g=>{let k=g.querySelector('.nav-bar-path:not([style*="display: none"]), .portal-sidebar-op-item:not([style*="display: none"])');g.style.display=k||!m?"":"none",m&&k&&qa(g,"expand")})},d.addEventListener("input",p));let f=y=>{let m=y.detail?.operationId||y.detail?.id||y.detail?.elementId;m&&l(m,!0)};n&&n.addEventListener("nav-active-change",f);let h=()=>{if(window.location.hash){let y=window.location.hash.replace(/^#/,"");y&&(l(y,!1),n&&typeof n.scrollToPath=="function"&&n.scrollToPath(y))}};return window.addEventListener("popstate",h),window.addEventListener("hashchange",h),n&&(n.addEventListener("spec-loaded",()=>setTimeout(h,80)),typeof n.updateComplete?.then=="function"&&n.updateComplete.then(()=>setTimeout(h,50))),setTimeout(h,150),()=>{a.removeEventListener("click",c),d&&p&&d.removeEventListener("input",p),n&&n.removeEventListener("nav-active-change",f),window.removeEventListener("popstate",h),window.removeEventListener("hashchange",h)}}var Pc=class{constructor(e){this.host=e,this.active=!1,this.resolved="",this.observer=null,this.media=null,this.onPageChange=()=>this.apply(),e.addController(this)}hostConnected(){this.host.colorScheme==="auto"?this.enable():this.active&&(this.watch(!0),this.apply())}hostDisconnected(){this.watch(!1)}hostUpdate(){let e=this.host.colorScheme;e==="auto"?this.enable():this.active&&e!==this.resolved&&(this.active=!1,this.watch(!1))}enable(){this.active=!0,this.watch(!0),this.apply()}apply(){if(!this.active||typeof window>"u")return;let e=ig(this.host);this.resolved=e,this.host.colorScheme!==e&&(this.host.colorScheme=e),this.host.getAttribute("color-scheme")!==e&&this.host.setAttribute("color-scheme",e)}watch(e){this.observer?.disconnect(),this.observer=null,this.media?.removeEventListener("change",this.onPageChange),this.media=null,e&&typeof window<"u"&&(this.observer=new MutationObserver(this.onPageChange),this.observer.observe(document.documentElement,{attributes:!0}),document.body&&this.observer.observe(document.body,{attributes:!0}),this.media=window.matchMedia("(prefers-color-scheme: light)"),this.media.addEventListener("change",this.onPageChange))}};function ig(e){let t=e.parentElement||e.getRootNode().host||document.documentElement,r=getComputedStyle(t).colorScheme||"",a=/\bdark\b/.test(r);return a===/\blight\b/.test(r)?window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":a?"dark":"light"}var Uc={fromAttribute:e=>{if(!e)return null;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t},toAttribute:e=>typeof e=="object"&&e?JSON.stringify(e):e},Mc=["pointerdown","keydown","wheel","touchstart"],C=class extends fe{constructor(){super(),this.specUrl="",this.sortTags="false",this.sortSchemas="false",this.sortEndpointsBy="path",this.showUnusedTags="false",this.generateMissingTags="false",this.filterOperations="",this.renderStyle="read",this.layout="row",this.responseAreaHeight="400px",this.pageDirection="ltr",this.scrollOffset="",this.scrollBehavior="smooth",this.scrollContainer="",this.autoHeight="false",this.theme=tt,this.colorScheme="dark",this.radius="sm",this.scale="default",this.primaryColor="",this.cssFile="",this.cssClasses="",this.showSideNav="true",this.showMethodInNavBar="false",this.usePathInNavBar="false",this.navItemSpacing="default",this.navItemOverflow="ellipsis",this.infoDescriptionHeadingsInNavBar="false",this.updateRoute="true",this.gotoPath="",this.showHeader="true",this.headingText="",this.showInfo="true",this.showComponents="false",this.allowSearch="true",this.allowAdvancedSearch="true",this.allowSpecUrlLoad="true",this.allowSpecFileLoad="true",this.allowSpecFileDownload="false",this.schemaStyle="tree",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.allowSchemaDescriptionExpandToggle="true",this.schemaHideReadOnly="default",this.schemaHideWriteOnly="default",this.defaultSchemaTab="example",this.allowTry="true",this.showCurlBeforeTry="false",this.fillRequestFieldsWithExample="true",this.allowServerSelection="true",this.serverUrl="",this.defaultApiServerUrl="",this.fetchCredentials="",this.allowAuthentication="true",this.persistAuth="false",this.apiKeyName="",this.apiKeyLocation="header",this.apiKeyValue="-",this.oauthReceiver="oauth-receiver.html",this.mockServer="false",this.mockServerStatusCode="200",this.mockServerStatusStrategy="first",this.mockServerDelay=0,this.mockServerLog="false",this.mcp="false",this.mcpServerName="",this._autoColorScheme=new Pc(this),this.loading=!1,this.focusedElementId="",this.searchVal="",this.showSummaryWhenCollapsed=!0,this._intersectingElements=new Map,this.isIntersectionObserverActive=!1,this._userSetLayout=!1,this._isDefaultingLayout=!1,this._observerLockTimeout=null,this._observerLockCleanup=null,this._readerHasInteracted=!1,this._onFirstInteraction=null,this._onHashChange=null,this._specLoadSeq=0,this._lastSpecUrlRequested=null,this._lastLoadedSpec=null,this.initIntersectionObserver()}static get styles(){return[Bi,et,rr,Br,Oi,zr,Fi,cn,Pr,ji,Ri,Ep,Dp,vt]}connectedCallback(){super.connectedCallback(),this.initIntersectionObserver(),this.shadowRoot&&this.shadowRoot.querySelector(".main-content")&&(this._hasDsd=!0);let e=this.parentElement;if(e&&e.tagName==="BODY"&&(e.offsetWidth===0&&e.style.width===""&&(e.style.width="100vw"),e.offsetHeight===0&&e.style.height===""&&(e.style.height="100vh"),e.style.marginTop||(e.style.marginTop="0"),e.style.marginRight||(e.style.marginRight="0"),e.style.marginBottom||(e.style.marginBottom="0"),e.style.marginLeft||(e.style.marginLeft="0")),this.renderStyle&&"read, view, focused,".includes(`${this.renderStyle},`)||(this.renderStyle="focused"),this.hasAttribute("layout")){let r=this.getAttribute("layout");"row, column,".includes(`${r},`)&&(this.layout=r,this._userSetLayout=!0)}if(this._userSetLayout)this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row",this.setAttribute("layout",this.layout));else{let r=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=r,this.setAttribute("layout",r),this._isDefaultingLayout=!1}this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),(this.theme==="light"||this.theme==="dark")&&(this.colorScheme=this.theme,this.theme=tt),this.primaryColor&&xt(this.primaryColor)&&(this.theme=this.primaryColor);let t=wt(this.theme);if(this.theme=t.theme,this.setAttribute("theme",this.theme),this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.radius&&"none, sm, md, lg, full,".includes(`${this.radius},`)||(this.radius="sm"),this.scale&&"sm, default, lg,".includes(`${this.scale},`)||(this.scale="default"),this.navItemSpacing&&"compact, default, relaxed,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.getAttribute("theme")||this.setAttribute("theme",this.theme),this.getAttribute("color-scheme")||this.setAttribute("color-scheme",this.colorScheme),this.getAttribute("radius")||this.setAttribute("radius",this.radius),this.getAttribute("scale")||this.setAttribute("scale",this.scale),kt(this,this.theme),!this.defaultSchemaTab||!"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab="example":this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"default, never,".includes(`${this.schemaHideReadOnly},`)||(this.schemaHideReadOnly="default"),this.schemaHideWriteOnly&&"default, never,".includes(`${this.schemaHideWriteOnly},`)||(this.schemaHideWriteOnly="default"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||="400px",this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes(`${this.allowAdvancedSearch},`)||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||="-",this.apiKeyLocation||="header",this.apiKeyName||="",this.oauthReceiver||="oauth-receiver.html",this.updateRoute&&"true, false,".includes(`${this.updateRoute},`)||(this.updateRoute="true"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortSchemas&&"true, false,".includes(`${this.sortSchemas},`)||(this.sortSchemas="false"),this.generateMissingTags&&"true, false,".includes(`${this.generateMissingTags},`)||(this.generateMissingTags="false"),this.showUnusedTags&&"true, false,".includes(`${this.showUnusedTags},`)||(this.showUnusedTags="false"),this.sortEndpointsBy&&"method, path, summary, none,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.navItemSpacing&&"compact, relaxed, default,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.showMethodInNavBar&&"false, as-plain-text, as-colored-text, as-colored-block,".includes(`${this.showMethodInNavBar},`)||(this.showMethodInNavBar="false"),this.usePathInNavBar&&"true, false,".includes(`${this.usePathInNavBar},`)||(this.usePathInNavBar="false"),this.navItemOverflow&&"ellipsis, wrap,".includes(`${this.navItemOverflow},`)||(this.navItemOverflow="ellipsis"),this.getAttribute("nav-item-overflow")||this.setAttribute("nav-item-overflow",this.navItemOverflow),this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes(`${this.allowServerSelection},`)||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes(`${this.allowAuthentication},`)||(this.allowAuthentication="true"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),["true","false","floating"].includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes(`${this.infoDescriptionHeadingsInNavBar},`)||(this.infoDescriptionHeadingsInNavBar="false"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),this.scrollBehavior&&"smooth, auto,".includes(`${this.scrollBehavior},`)||(this.scrollBehavior="auto"),this.cssFile||=null,this.cssClasses||="",this.mcp||="none",this._onHashChange||(this._onHashChange=()=>{this.scrollToPath(this.getElementIDFromURL())},window.addEventListener("hashchange",this._onHashChange,!0)),!this._readerHasInteracted&&!this._onFirstInteraction&&(this._onFirstInteraction=()=>{this._readerHasInteracted=!0,this.removeFirstInteractionListeners()},Mc.forEach(r=>window.addEventListener(r,this._onFirstInteraction,{capture:!0,passive:!0}))),!this.resolvedSpec){let r=this.querySelector('script[type="application/json"][slot="rapidoc-spec"]');if(r?.textContent)try{let a=JSON.parse(r.textContent);this._lastSpecUrlRequested=this.getAttribute("spec-url"),this._loadSpec(a)}catch{}else this.getAttribute("spec-url")&&this.loadSpec(this.getAttribute("spec-url"))}}disconnectedCallback(){this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),typeof this._observerLockCleanup=="function"&&(this._observerLockCleanup(),this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null),this.intersectionObserver&&this.intersectionObserver.disconnect(),this._onHashChange&&=(window.removeEventListener("hashchange",this._onHashChange,!0),null),this.removeFirstInteractionListeners(),this.mockServer==="true"&&wa(this),super.disconnectedCallback()}removeFirstInteractionListeners(){this._onFirstInteraction&&=(Mc.forEach(e=>window.removeEventListener(e,this._onFirstInteraction,{capture:!0})),null)}getContentScrollBehavior(){return this._readerHasInteracted?this.scrollBehavior:"instant"}infoDescriptionHeadingRenderer(){let e=new T.Renderer,t=new Qe;return e.heading=({text:r,depth:a})=>`<h${a} class="observe-me" id="${t.slug(r)}">${r}</h${a}>`,Ir(e),e}willUpdate(e){if(super.willUpdate?.(e),this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),e.has("layout")&&!this._isDefaultingLayout&&(this._userSetLayout=!!(this.layout&&"row, column,".includes(`${this.layout},`))),e.has("renderStyle")&&!this._userSetLayout){let t=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this.layout!==t&&(this._isDefaultingLayout=!0,this.layout=t,this.setAttribute("layout",t),this._isDefaultingLayout=!1)}}_clearDsdIfNeeded(){this._hasDsd&&this.shadowRoot&&(this.shadowRoot.replaceChildren(),this.renderOptions&&delete this.renderOptions.renderBefore,this._hasDsd=!1)}render(){if(this._hasDsd&&!this.resolvedSpec)return ie;if(this._clearDsdIfNeeded(),this.cssFile){let e=document.querySelector(`link[href*="${CSS.escape(this.cssFile)}"]`);e&&this.shadowRoot.appendChild(e.cloneNode())}return zc.call(this)}get config(){return{renderStyle:this.renderStyle,schemaStyle:this.schemaStyle,defaultSchemaTab:this.defaultSchemaTab,schemaExpandLevel:this.schemaExpandLevel,schemaDescriptionExpanded:this.schemaDescriptionExpanded,allowSchemaDescriptionExpandToggle:this.allowSchemaDescriptionExpandToggle,schemaHideReadOnly:this.schemaHideReadOnly,schemaHideWriteOnly:this.schemaHideWriteOnly,fillRequestFieldsWithExample:this.fillRequestFieldsWithExample,allowTry:this.allowTry,showCurlBeforeTry:this.showCurlBeforeTry,fetchCredentials:this.fetchCredentials,mockServer:this.mockServer}}updated(e){if(super.updated?.(e),Nr(this.shadowRoot),e.has("theme")){(this.theme==="light"||this.theme==="dark")&&(this.colorScheme=this.theme,this.setAttribute("color-scheme",this.colorScheme),this.theme=tt,this.setAttribute("theme",tt));let t=wt(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),kt(this,this.theme)}e.has("primaryColor")&&this.primaryColor&&xt(this.primaryColor)&&(this.theme=wt(this.primaryColor).theme,this.setAttribute("theme",this.theme),kt(this,this.theme)),e.has("colorScheme")&&(this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.getAttribute("color-scheme")!==this.colorScheme&&this.setAttribute("color-scheme",this.colorScheme)),e.has("mockServer")&&(this.mockServer==="true"&&this.resolvedSpec?xa(this.resolvedSpec,{owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}):this.mockServer!=="true"&&wa(this)),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&jl({owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}),e.has("scrollContainer")&&this.initIntersectionObserver()}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach(e=>{this.intersectionObserver.observe(e)})}attributeChangedCallback(e,t,r){if(e==="spec-url"&&t!==r&&window.setTimeout(async()=>{r!==this._lastSpecUrlRequested&&(await this.loadSpec(r),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath))},0),e==="filter-operations"&&t!==r&&window.setTimeout(async()=>{await this._loadSpec(this._lastLoadedSpec||this.specUrl)},0),e==="scroll-offset"&&t!==r&&window.setTimeout(()=>this.initIntersectionObserver(),0),e==="layout"&&!this._isDefaultingLayout){if(r!==null&&"row, column,".includes(`${r},`))this._userSetLayout=!0,this.layout=r;else if(r===null){this._userSetLayout=!1;let a=this.renderStyle==="read"||this.renderStyle==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=a,this.setAttribute("layout",a),this._isDefaultingLayout=!1}}if(e==="render-style"&&(r==="read"?window.setTimeout(()=>{this.observeExpandedContent()},100):this.intersectionObserver.disconnect(),!this._userSetLayout)){let a=r==="read"||r==="focused"?"column":"row";this._isDefaultingLayout=!0,this.layout=a,this.setAttribute("layout",a),this._isDefaultingLayout=!1}if(e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let a=!1,n="",s="",i="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(n=r,s=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),a=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(s=r,n=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),a=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=r,s=this.getAttribute("api-key-location"),n=this.getAttribute("api-key-name"),a=!0),a&&this.resolvedSpec?.securitySchemes){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===ar);o?(o.name=n,o.in=s,o.value=i,o.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:ar,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:n,in:s,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSpecFileChange(e){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);let t=e.target.files[0],r=new FileReader;r.onload=()=>{try{let a=JSON.parse(r.result);this.loadSpec(a),this.shadowRoot.getElementById("spec-url").value=""}catch{}},r.readAsText(t)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(e){let t=e.target instanceof HTMLInputElement?e.target:this.shadowRoot.getElementById("nav-bar-search");this.searchVal=t?.value??"",this.resolvedSpec.tags.forEach(r=>r.paths.filter(a=>{this.searchVal&&Hr(this.searchVal,a,r.name)&&(r.expanded=!0)})),this.resolvedSpec.components.forEach(r=>r.subComponents.filter(a=>{a.expanded=!1,qp(this.searchVal,a)&&(a.expanded=!0)})),this.requestUpdate()}onClearSearch(){let e=this.shadowRoot.getElementById("nav-bar-search");e.value="",this.searchVal="",this.resolvedSpec.components.forEach(t=>t.subComponents.filter(r=>{r.expanded=!0}))}onOpenNavBarToggle(){this.shadowRoot.getElementById("nav-bar").classList.toggle("floating-nav")}onShowAdvancedSearchClicked(){this.shadowRoot.getElementById("advanced-search-dialog").showModal()}onAdvancedSearchClose(){this.shadowRoot.getElementById("advanced-search-dialog").close()}async loadSpec(e){e&&(this.specUrl=typeof e=="string"?e:"",await this._loadSpec(e))}async _loadSpec(e){if(!e)return;this._lastLoadedSpec=e,typeof e=="string"&&(this._lastSpecUrlRequested=e);let t=++this._specLoadSeq;this.searchVal="";try{this._hasDsd||(this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0),this.loadFailed=!1;let r=await hl.call(this,e,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.filterOperations,this.showUnusedTags==="true");if(t!==this._specLoadSeq)return;this.loading=!1,this.afterSpecParsedAndValidated(r,t)}catch{if(t!==this._specLoadSeq)return;this.loading=!1,this._clearDsdIfNeeded(),this.loadFailed=!0,this.resolvedSpec=null}}async afterSpecParsedAndValidated(e,t=this._specLoadSeq){for(this._clearDsdIfNeeded(),this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(n=>n.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);if(t!==this._specLoadSeq)return;let r=new CustomEvent("spec-loaded",{detail:e});if(this.dispatchEvent(r),this.mockServer==="true"&&xa(this.resolvedSpec,{owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}),this.intersectionObserver.disconnect(),this._intersectingElements&&this._intersectingElements.clear(),this.renderStyle==="read"){if(await Mr(100),t!==this._specLoadSeq)return;this.observeExpandedContent()}this.isIntersectionObserverActive=!0;let a=this.getElementIDFromURL();if(a)this.renderStyle==="view"?this.expandAndGotoOperation(a,!0,!0):this.scrollToPath(a);else if(this.gotoPath)this.scrollToPath(this.gotoPath);else if(this.renderStyle==="focused"&&!this.gotoPath){let n=this.showInfo==="true"?"overview":this.resolvedSpec.tags.find(s=>s.paths.length>0)?.paths[0]?.elementId;n&&this.scrollToPath(n)}}getComponentBaseURL(){return window.location.href.split("#")[0]}getElementIDFromURL(){return window.location.hash?window.location.hash.substring(1):""}replaceHistoryState(e){let t=this.getComponentBaseURL();window.history.replaceState(window.history.state,"",e?`${t}#${e}`:t)}expandAndGotoOperation(e,t=!0){if(!this.resolvedSpec)return;let r=!0,a=e.indexOf("#")===-1?e:e.substring(1);if(a.startsWith("overview")||a==="servers"||a==="auth")r=!1;else{for(let n=0;n<this.resolvedSpec.tags?.length;n++){let s=this.resolvedSpec.tags[n];if(s.elementId===e){r=!s.expanded,s.expanded=!0;break}let i=s.paths?.find(o=>o.elementId===e);i&&(i.expanded&&s.expanded?r=!1:(i.expanded=!0,s.expanded=!0))}if(this.resolvedSpec.tagGroups)for(let n=0;n<this.resolvedSpec.tagGroups.length;n++){let s=this.resolvedSpec.tagGroups[n];s.tags?.some(i=>i.elementId===e||i.paths?.some(o=>o.elementId===e))&&!s.expanded&&(s.expanded=!0,r=!0)}}t&&(r&&this.requestUpdate(),window.setTimeout(()=>{let n=this.shadowRoot.querySelector(".first-nav-item"),s=n&&n.dataset.contentId===a,i=this.shadowRoot.getElementById(a);if(i){let o=this.shadowRoot.querySelector(".main-content"),l;if(this.autoHeight==="true")this.scrollAutoHeightTarget(i,a);else if(s)l=0,this.lockObserverDuringScroll(i,a,l),o?o.scrollTo({top:0,behavior:this.getContentScrollBehavior()}):i.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});else if(o){let c=o.getBoundingClientRect();l=i.getBoundingClientRect().top-c.top+o.scrollTop,this.lockObserverDuringScroll(i,a,l),o.scrollTo({top:l,behavior:this.getContentScrollBehavior()})}else this.lockObserverDuringScroll(i,a),i.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});this._activeElementId=a,this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:a,elementId:a},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(a)}},r?150:0))}isValidTopId(e){return e.startsWith("overview")||e==="servers"||e==="auth"}isValidPathId(e){return e==="overview"&&this.showInfo||e==="servers"&&this.allowServerSelection||e==="auth"&&this.allowAuthentication?!0:e.startsWith("tag--")?this.resolvedSpec?.tags?.find(t=>t.elementId===e):this.resolvedSpec?.tags?.find(t=>t.paths.find(r=>r.elementId===e))}initIntersectionObserver(){this.intersectionObserver&&this.intersectionObserver.disconnect();let e=null;if(this.scrollContainer&&typeof document<"u")try{e=document.querySelector(this.scrollContainer);let r=!!(e&&(e.contains(this)||this.assignedSlot&&e.contains(this.assignedSlot)||e.shadowRoot&&e.shadowRoot.contains(this.assignedSlot)));e&&!r&&(e=null)}catch{}if(!e&&typeof window<"u"){let r=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;r&&r!==document.body&&r!==document.documentElement;){let a=window.getComputedStyle(r).overflowY;if(a==="auto"||a==="scroll"){e=r;break}r=r.parentElement||(r.getRootNode&&r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null)}}this._scrollRootContainer=e;let t={root:e,rootMargin:`-${this.getScrollOffset()}px 0px -50% 0px`,threshold:0};this.intersectionObserver=new IntersectionObserver(r=>{this.onIntersect(r)},t),this.isIntersectionObserverActive&&this.observeExpandedContent()}onIntersect(e){if(this.isIntersectionObserverActive===!1)return;this._intersectingElements||=new Map;for(let o of e)o.isIntersecting&&o.intersectionRatio>0?this._intersectingElements.set(o.target.id,o.target):this._intersectingElements.delete(o.target.id);if(this._intersectingElements.size===0)return;let t=Array.from(this._intersectingElements.values()).filter(o=>o.isConnected);if(t.length===0)return;let r=(this._scrollRootContainer?this._scrollRootContainer.getBoundingClientRect().top:0)+this.getScrollOffset(),a=[],n=[];for(let o of t){let l=o.getBoundingClientRect().top-r;l>-1?a.push({el:o,top:l}):n.push({el:o,top:l})}let s;a.length>0?(a.sort((o,l)=>o.top-l.top),s=a[0].el):(n.sort((o,l)=>l.top-o.top),s=n[0].el);let i=s.id;this._activeElementId!==i&&(this._activeElementId=i,this._intersectionRaf&&cancelAnimationFrame(this._intersectionRaf),this._intersectionRaf=requestAnimationFrame(()=>{let o=i;if(i.startsWith("tag--")&&this.resolvedSpec?.tags){let c=this.resolvedSpec.tags.find(d=>d.elementId===i);c?.paths?.[0]?.elementId&&(o=c.paths[0].elementId)}this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:i,elementId:i,operationId:o},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(i);let l=this.shadowRoot.getElementById(`link-${i}`);if(l){let c=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");c&&c!==l&&(c.classList.remove("active"),c.part.remove("section-navbar-active-item")),Ds(l),l.classList.add("active"),l.part.add("section-navbar-active-item");let d=l.closest(".nav-scroll");if(d){let p=d.querySelector(".nav-bar-header")||d.querySelector(".nav-bar-search-container"),f=p?p.offsetHeight:0;if(l.offsetTop<=f+30){if(d.scrollTop>0){let h=this.scrollBehavior==="auto"?"auto":"smooth";d.scrollTo({top:0,behavior:h})}}else{let h=d.getBoundingClientRect(),y=l.getBoundingClientRect();if(y.top<h.top+f+15||y.bottom>h.bottom-40){let m=this.scrollBehavior==="auto"?"auto":"smooth",g=y.top-h.top+d.scrollTop-f-20;d.scrollTo({top:g,behavior:m})}}}}}))}handleHref(e){if(e.target.tagName.toLowerCase()==="a"&&e.target.getAttribute("href").startsWith("#")){let t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));if(t){let r=this.shadowRoot.querySelector(".main-content");if(this.autoHeight==="true"||this.hasAttribute("auto-height"))this.scrollAutoHeightTarget(t,t.id);else if(r){let a=r.getBoundingClientRect(),n=t.getBoundingClientRect().top-a.top+r.scrollTop;r.scrollTo({top:n,behavior:this.scrollBehavior})}else t.scrollIntoView({behavior:this.scrollBehavior,block:"start"})}}}getScrollOffset(){if(!(this.autoHeight==="true"||this.hasAttribute("auto-height"))||typeof window>"u")return 0;let e=parseFloat(this.scrollOffset);if(Number.isFinite(e))return e;let t=this._scrollRootContainer||document.scrollingElement||document.documentElement,r=getComputedStyle(t).scrollPaddingTop,a=parseFloat(r);return Number.isFinite(a)?r.endsWith("%")?a/100*t.clientHeight:a:0}scrollAutoHeightTarget(e,t){let r=e.getBoundingClientRect().top-this.getScrollOffset(),a=this._scrollRootContainer;if(a){let n=r-a.getBoundingClientRect().top+a.scrollTop;this.lockObserverDuringScroll(e,t,n),a.scrollTo({top:n,behavior:this.getContentScrollBehavior()})}else{let n=r+window.scrollY;this.lockObserverDuringScroll(e,t,n),window.scrollTo({top:n,behavior:this.getContentScrollBehavior()})}}lockObserverDuringScroll(e,t="",r){this._intersectionRaf&&=(cancelAnimationFrame(this._intersectionRaf),null),typeof this._observerLockCleanup=="function"&&(this._observerLockCleanup(),this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null);let a=e?.id||t;this.isIntersectionObserverActive=!1,this._intersectingElements&&(this._intersectingElements.clear(),e&&a&&this._intersectingElements.set(a,e)),a&&(this._activeElementId=a);let n=this.autoHeight==="true"||this.hasAttribute("auto-height")?this._scrollRootContainer||(typeof window<"u"?window:null):this.shadowRoot?.querySelector(".main-content")||(typeof window<"u"?window:null);if(!n||typeof window>"u"){this.isIntersectionObserverActive=!0;return}let s=!1,i=()=>{s||(s=!0,d&&(d(),d=null,this._observerLockCleanup=null),this._observerLockTimeout&&=(clearTimeout(this._observerLockTimeout),null),e&&a&&this._intersectingElements&&this._intersectingElements.set(a,e),this.isIntersectionObserverActive=!0)},o=null,l=()=>{clearTimeout(o),o=setTimeout(i,120)},c=()=>{i()},d=()=>{n.removeEventListener?.("scrollend",c),window.removeEventListener?.("scrollend",c),n.removeEventListener?.("scroll",l),window.removeEventListener?.("scroll",l),clearTimeout(o)};this._observerLockCleanup=d,"onscrollend"in window&&(n.addEventListener?.("scrollend",c,{once:!0,passive:!0}),window.addEventListener?.("scrollend",c,{once:!0,passive:!0})),n.addEventListener?.("scroll",l,{passive:!0}),window.addEventListener?.("scroll",l,{passive:!0});let p=n===window?window.scrollY:n.scrollTop||0,f=typeof r=="number"&&Math.abs(r-p)<3?60:this.getContentScrollBehavior()==="smooth"?1200:100;this._observerLockTimeout=setTimeout(i,f)}async scrollToEventTarget(e,t=!0){if(!(e.type==="click"||e.type==="keyup"&&e.keyCode===13))return;let r=e.target?.closest?.("[data-content-id]")||e.target;if(!r?.dataset?.contentId)return;if(this.renderStyle==="focused"){let n=this.shadowRoot.querySelector("api-request");typeof n?.beforeNavigationFocusedMode=="function"&&n.beforeNavigationFocusedMode()}let a=r.dataset.firstNavItem==="true";this.scrollToPath(r.dataset.contentId,!0,t,a)}getTargetElement(e){return!e||!this.shadowRoot?null:this.shadowRoot.getElementById(e)||this.shadowRoot.querySelector(`[data-op-slug="${CSS.escape(e)}"]`)||this.shadowRoot.querySelector(`[id$="--${CSS.escape(e)}"]`)||this.shadowRoot.getElementById(e.replace(/^[a-z0-9_-]+--/,""))}resolveOperationAlias(e){if(!e||this.getTargetElement(e))return e;let t=a=>a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),r=t(e);for(let a of this.resolvedSpec?.tags||[]){let n=a.paths?.find(s=>t(cl(s.method,s.path))===r);if(n)return n.elementId}return e}bindNavBar(e,t){return sg(e,this,t)}async scrollTo(e){return this.scrollToPath(e)}async scrollToPath(e,t=!0,r=!0,a=!1){if(e=this.resolveOperationAlias(e),this.renderStyle==="focused"&&(this.focusedElementId=e,await Mr(0)),this.renderStyle==="view")this.expandAndGotoOperation(e,t,!0);else{let n=this.getTargetElement(e),s=!!n;if(n){let i=this.shadowRoot.querySelector(".first-nav-item"),o=a||i&&i.dataset.contentId===e,l=this.shadowRoot.querySelector(".main-content"),c;if(this.autoHeight==="true"||this.hasAttribute("auto-height"))this.scrollAutoHeightTarget(n,e);else if(o)c=0,this.lockObserverDuringScroll(n,e,c),l?l.scrollTo({top:0,behavior:this.getContentScrollBehavior()}):n.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"});else if(l){let d=l.getBoundingClientRect();c=n.getBoundingClientRect().top-d.top+l.scrollTop,this.lockObserverDuringScroll(n,e,c),l.scrollTo({top:c,behavior:this.getContentScrollBehavior()})}else this.lockObserverDuringScroll(n,e),n.scrollIntoView({behavior:this.getContentScrollBehavior(),block:"start"})}if(s){if(this.renderStyle==="focused"){let o=this.shadowRoot.querySelector("api-request");typeof o?.afterNavigationFocusedMode=="function"&&o.afterNavigationFocusedMode();let l=this.shadowRoot.querySelector("api-response");typeof l?.resetSelection=="function"&&l.resetSelection()}this._activeElementId=n?.id||e,this.dispatchEvent(new CustomEvent("nav-active-change",{detail:{id:e,elementId:e},bubbles:!0,composed:!0})),this.updateRoute==="true"&&this.replaceHistoryState(e);let i=this.shadowRoot.getElementById(`link-${e}`);if(i){if(Ds(i),r){let l=this.shadowRoot.querySelector(".nav-scroll");if(l){let c=l.getBoundingClientRect(),d=i.getBoundingClientRect().top-c.top+l.scrollTop-l.clientHeight/2;l.scrollTo({top:d,behavior:this.scrollBehavior})}else i.scrollIntoView({behavior:this.scrollBehavior,block:"center"})}await Mr(0);let o=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");o&&(o.classList.remove("active"),o.part.remove("active"),o.part.remove("section-navbar-active-item")),i.classList.add("active"),i.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(e,t,r){return pt.call(this,e,t,r)}setApiKey(e,t,r={}){return pt.call(this,e,"","",t,r?.note||"")}removeAllSecurityKeys(){return hs.call(this)}setApiServer(e){return Es.call(this,e)}get mcpEnabled(){return hc(this.mcp)}findArazzoDocument(){if(typeof customElements>"u"||!customElements.get("rapi-flow"))return;let e=[...document.querySelectorAll("rapi-flow")];return e.find(t=>this.id&&t.getAttribute("for")===this.id&&t.arazzoDocument)||e.find(t=>!t.getAttribute("for")&&t.arazzoDocument)}mcpOptions(e){let t=this.findArazzoDocument();return{serverName:this.mcpServerName,arazzo:t?.arazzoDocument,workflowRuntime:t?.workflowRuntimeSource,...e}}generateMcpServer(e={}){let t=this.resolvedSpec||this.openApiSpec;return t?Kf(t,this.mcpOptions(e)):null}downloadMcpServer(e={}){let t=this.generateMcpServer(e);if(!t)return;let r=new Blob([Wf(t.files)],{type:"application/zip"}),a=document.createElement("a");a.href=URL.createObjectURL(r);let n=e.includeOperations===!1?"-workflows":"";a.download=`${t.manifest.server.name.replace(/_/g,"-").replace(/-mcp$/,"")}${n}-mcp.zip`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(a.href)}getMcpBudget(e={}){let t=this.resolvedSpec||this.openApiSpec;return t?mc(Fc(t,this.mcpOptions(e))):null}onAdvancedSearch(e,t){let r=e.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{let a;a=r.type==="text"?r:r.closest(".advanced-search-options").querySelector("input[type=text]");let n=[...r.closest(".advanced-search-options").querySelectorAll("input:checked")].map(s=>s.id);this.advancedSearchMatches=Ip(a.value,this.resolvedSpec.tags,n)},t)}};x([S({type:String,attribute:"spec-url"})],C.prototype,"specUrl",void 0),x([S({type:String,attribute:"sort-tags"})],C.prototype,"sortTags",void 0),x([S({type:String,attribute:"sort-schemas"})],C.prototype,"sortSchemas",void 0),x([S({type:String,attribute:"sort-endpoints-by"})],C.prototype,"sortEndpointsBy",void 0),x([S({type:String,attribute:"show-unused-tags"})],C.prototype,"showUnusedTags",void 0),x([S({type:String,attribute:"generate-missing-tags"})],C.prototype,"generateMissingTags",void 0),x([S({type:String,attribute:"filter-operations"})],C.prototype,"filterOperations",void 0),x([S({type:String,attribute:"render-style"})],C.prototype,"renderStyle",void 0),x([S({type:String,reflect:!0})],C.prototype,"layout",void 0),x([S({type:String,attribute:"response-area-height"})],C.prototype,"responseAreaHeight",void 0),x([S({type:String,attribute:"page-direction"})],C.prototype,"pageDirection",void 0),x([S({type:String,attribute:"scroll-offset"})],C.prototype,"scrollOffset",void 0),x([S({type:String,attribute:"scroll-behavior"})],C.prototype,"scrollBehavior",void 0),x([S({type:String,attribute:"scroll-container"})],C.prototype,"scrollContainer",void 0),x([S({type:String,attribute:"auto-height"})],C.prototype,"autoHeight",void 0),x([S({type:String,reflect:!0})],C.prototype,"theme",void 0),x([S({type:String,attribute:"color-scheme",reflect:!0})],C.prototype,"colorScheme",void 0),x([S({type:String,reflect:!0})],C.prototype,"radius",void 0),x([S({type:String,reflect:!0})],C.prototype,"scale",void 0),x([S({type:String,attribute:"primary-color"})],C.prototype,"primaryColor",void 0),x([S({type:String,attribute:"css-file"})],C.prototype,"cssFile",void 0),x([S({type:String,attribute:"css-classes"})],C.prototype,"cssClasses",void 0),x([S({type:String,attribute:"show-side-nav"})],C.prototype,"showSideNav",void 0),x([S({type:String,attribute:"show-method-in-nav-bar"})],C.prototype,"showMethodInNavBar",void 0),x([S({type:String,attribute:"use-path-in-nav-bar"})],C.prototype,"usePathInNavBar",void 0),x([S({type:String,attribute:"nav-item-spacing",reflect:!0})],C.prototype,"navItemSpacing",void 0),x([S({type:String,attribute:"nav-item-overflow",reflect:!0})],C.prototype,"navItemOverflow",void 0),x([S({type:String,attribute:"info-description-headings-in-navbar"})],C.prototype,"infoDescriptionHeadingsInNavBar",void 0),x([S({type:String,attribute:"update-route"})],C.prototype,"updateRoute",void 0),x([S({type:String,attribute:"goto-path"})],C.prototype,"gotoPath",void 0),x([S({type:String,attribute:"show-header"})],C.prototype,"showHeader",void 0),x([S({type:String,attribute:"heading-text"})],C.prototype,"headingText",void 0),x([S({type:String,attribute:"show-info"})],C.prototype,"showInfo",void 0),x([S({type:String,attribute:"show-components"})],C.prototype,"showComponents",void 0),x([S({type:String,attribute:"allow-search"})],C.prototype,"allowSearch",void 0),x([S({type:String,attribute:"allow-advanced-search"})],C.prototype,"allowAdvancedSearch",void 0),x([S({type:String,attribute:"allow-spec-url-load"})],C.prototype,"allowSpecUrlLoad",void 0),x([S({type:String,attribute:"allow-spec-file-load"})],C.prototype,"allowSpecFileLoad",void 0),x([S({type:String,attribute:"allow-spec-file-download"})],C.prototype,"allowSpecFileDownload",void 0),x([S({type:String,attribute:"schema-style"})],C.prototype,"schemaStyle",void 0),x([S({type:Number,attribute:"schema-expand-level"})],C.prototype,"schemaExpandLevel",void 0),x([S({type:String,attribute:"schema-description-expanded"})],C.prototype,"schemaDescriptionExpanded",void 0),x([S({type:String,attribute:"allow-schema-description-expand-toggle"})],C.prototype,"allowSchemaDescriptionExpandToggle",void 0),x([S({type:String,attribute:"schema-hide-read-only"})],C.prototype,"schemaHideReadOnly",void 0),x([S({type:String,attribute:"schema-hide-write-only"})],C.prototype,"schemaHideWriteOnly",void 0),x([S({type:String,attribute:"default-schema-tab"})],C.prototype,"defaultSchemaTab",void 0),x([S({type:String,attribute:"allow-try"})],C.prototype,"allowTry",void 0),x([S({type:String,attribute:"show-curl-before-try"})],C.prototype,"showCurlBeforeTry",void 0),x([S({type:String,attribute:"fill-request-fields-with-example"})],C.prototype,"fillRequestFieldsWithExample",void 0),x([S({type:String,attribute:"allow-server-selection"})],C.prototype,"allowServerSelection",void 0),x([S({type:String,attribute:"server-url"})],C.prototype,"serverUrl",void 0),x([S({type:String,attribute:"default-api-server"})],C.prototype,"defaultApiServerUrl",void 0),x([S({type:String,attribute:"fetch-credentials"})],C.prototype,"fetchCredentials",void 0),x([S({type:String,attribute:"allow-authentication"})],C.prototype,"allowAuthentication",void 0),x([S({type:String,attribute:"persist-auth"})],C.prototype,"persistAuth",void 0),x([S({type:String,attribute:"api-key-name"})],C.prototype,"apiKeyName",void 0),x([S({type:String,attribute:"api-key-location"})],C.prototype,"apiKeyLocation",void 0),x([S({type:String,attribute:"api-key-value"})],C.prototype,"apiKeyValue",void 0),x([S({type:String,attribute:"oauth-receiver"})],C.prototype,"oauthReceiver",void 0),x([S({type:Object,attribute:"additional-authorize-params",converter:Uc})],C.prototype,"additionalAuthorizeParams",void 0),x([S({type:Object,attribute:"additional-token-params",converter:Uc})],C.prototype,"additionalTokenParams",void 0),x([S({type:String,attribute:"mock-server"})],C.prototype,"mockServer",void 0),x([S({type:String,attribute:"mock-server-status-code"})],C.prototype,"mockServerStatusCode",void 0),x([S({type:String,attribute:"mock-server-status-strategy"})],C.prototype,"mockServerStatusStrategy",void 0),x([S({type:Number,attribute:"mock-server-delay"})],C.prototype,"mockServerDelay",void 0),x([S({type:String,attribute:"mock-server-log"})],C.prototype,"mockServerLog",void 0),x([S({type:String,attribute:"mcp"})],C.prototype,"mcp",void 0),x([S({type:String,attribute:"mcp-server-name"})],C.prototype,"mcpServerName",void 0),x([S({type:String,attribute:!1})],C.prototype,"specFile",void 0),x([S({type:Boolean})],C.prototype,"loading",void 0),x([S({type:String})],C.prototype,"focusedElementId",void 0),x([S({type:Object})],C.prototype,"advancedSearchMatches",void 0),x([S({type:String})],C.prototype,"searchVal",void 0),C=x([Ae("rapi-doc")],C);var og=C,Hc={fromAttribute:e=>{if(!e)return null;let t=e.trim();if(t.startsWith("{")&&t.endsWith("}"))try{return JSON.parse(t)}catch{return t}return t},toAttribute:e=>typeof e=="object"&&e?JSON.stringify(e):e},z=class extends fe{constructor(){super(),this.specUrl="",this.sortEndpointsBy="path",this.layout="row",this.pathsExpanded="false",this.defaultSchemaTab="example",this.responseAreaHeight="300px",this.showSummaryWhenCollapsed="true",this.fillRequestFieldsWithExample="true",this.persistAuth="false",this.schemaStyle="tree",this.schemaExpandLevel=99999,this.schemaDescriptionExpanded="false",this.apiKeyName="",this.apiKeyLocation="header",this.apiKeyValue="-",this.defaultApiServerUrl="",this.serverUrl="",this.oauthReceiver="oauth-receiver.html",this.mockServer="false",this.mockServerStatusCode="200",this.mockServerStatusStrategy="first",this.mockServerDelay=0,this.mockServerLog="false",this.allowTry="true",this.showCurlBeforeTry="false",this.theme=tt,this.primaryColor="",this.colorScheme="dark",this._autoColorScheme=new Pc(this),this.radius="sm",this.scale="default",this.fetchCredentials="",this.filterOperations="",this.showTags="false",this.loading=!1,this._loadQueued=!1,this._queuedSpec=null,this.isMini=!0,this._specLoadSeq=0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false",this.loadFailed=!1}static get styles(){return[Bi,et,rr,Br,Oi,zr,Fi,cn,Pr,ji,Ri,G`:host{all:initial;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;letter-spacing:normal;width:100%;min-width:360px;height:100%;color:var(--foreground);background:var(--background);font-family:var(--font-sans);flex-direction:column;margin:0;padding:0;display:flex;overflow:hidden;container-type:inline-size}@container (width>=768px){.only-large-screen{display:block}.only-large-screen-flex{display:flex}}`]}connectedCallback(){super.connectedCallback(),this.showSummaryWhenCollapsed&&"true, false,".includes(`${this.showSummaryWhenCollapsed},`)||(this.showSummaryWhenCollapsed="true"),this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.primaryColor&&xt(this.primaryColor)&&(this.theme=this.primaryColor);let e=wt(this.theme);this.theme=e.theme,this.setAttribute("theme",this.theme),this.colorScheme&&"dark, light, system,".includes(`${this.colorScheme},`)||(this.colorScheme="dark"),this.radius&&"none, sm, md, lg, full,".includes(`${this.radius},`)||(this.radius="sm"),this.scale&&"sm, default, lg,".includes(`${this.scale},`)||(this.scale="default"),this.getAttribute("theme")||this.setAttribute("theme",this.theme),this.getAttribute("color-scheme")||this.setAttribute("color-scheme",this.colorScheme),this.getAttribute("radius")||this.setAttribute("radius",this.radius),this.getAttribute("scale")||this.setAttribute("scale",this.scale),kt(this,this.theme),!this.defaultSchemaTab||!"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab="example":this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"),this.pathsExpanded=this.pathsExpanded==="true",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||="300px",this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||="-",this.apiKeyLocation||="header",this.apiKeyName||="",this.oauthReceiver||="oauth-receiver.html",this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials="")}disconnectedCallback(){this.mockServer==="true"&&wa(this),super.disconnectedCallback()}render(){return zc.call(this,!0,this.pathsExpanded)}get config(){return{renderStyle:this.renderStyle,schemaStyle:this.schemaStyle,defaultSchemaTab:this.defaultSchemaTab,schemaExpandLevel:this.schemaExpandLevel,schemaDescriptionExpanded:this.schemaDescriptionExpanded,allowSchemaDescriptionExpandToggle:this.allowSchemaDescriptionExpandToggle,schemaHideReadOnly:this.schemaHideReadOnly,schemaHideWriteOnly:this.schemaHideWriteOnly,fillRequestFieldsWithExample:this.fillRequestFieldsWithExample,allowTry:this.allowTry,showCurlBeforeTry:this.showCurlBeforeTry,fetchCredentials:this.fetchCredentials,mockServer:this.mockServer}}updated(e){if(super.updated?.(e),Nr(this.shadowRoot),e.has("theme")){let t=wt(this.theme);this.theme!==t.theme&&(this.theme=t.theme,this.setAttribute("theme",this.theme)),kt(this,this.theme)}e.has("primaryColor")&&this.primaryColor&&xt(this.primaryColor)&&(this.theme=wt(this.primaryColor).theme,this.setAttribute("theme",this.theme),kt(this,this.theme)),e.has("mockServer")&&(this.mockServer==="true"&&this.resolvedSpec?xa(this.resolvedSpec,{owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog}):this.mockServer!=="true"&&wa(this)),(e.has("mockServerStatusCode")||e.has("mockServerStatusStrategy")||e.has("mockServerDelay")||e.has("mockServerLog"))&&jl({owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}attributeChangedCallback(e,t,r){if(e==="spec-url"&&t!==r&&this.queueLoad({spec:r}),e==="filter-operations"&&t!==r&&this.queueLoad(),e==="api-key-name"||e==="api-key-location"||e==="api-key-value"){let a=!1,n="",s="",i="";if(e==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(n=r,s=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),a=!0):e==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(s=r,n=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),a=!0):e==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=r,s=this.getAttribute("api-key-location"),n=this.getAttribute("api-key-name"),a=!0),a&&this.resolvedSpec?.securitySchemes){let o=this.resolvedSpec.securitySchemes.find(l=>l.securitySchemeId===ar);o?(o.name=n,o.in=s,o.value=i,o.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:ar,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:n,in:s,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}async loadSpec(e){if(!e)return;this._lastLoadedSpec=e;let t=++this._specLoadSeq;try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();let r=await hl.call(this,e,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.filterOperations);if(t!==this._specLoadSeq)return;this.loading=!1,this.afterSpecParsedAndValidated(r,t)}catch{if(t!==this._specLoadSeq)return;this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null}}queueLoad(e){e&&(this._queuedSpec=e),this._loadQueued||(this._loadQueued=!0,window.setTimeout(async()=>{this._loadQueued=!1;let t=this._queuedSpec;this._queuedSpec=null,await this.loadSpec(t?t.spec:this._lastLoadedSpec||this.specUrl)},0))}setHttpUserNameAndPassword(e,t,r){return pt.call(this,e,t,r)}setApiKey(e,t,r={}){return pt.call(this,e,"","",t,r?.note||"")}removeAllSecurityKeys(){return hs.call(this)}async showOperation(e){let t=String(e||"").trim(),[r,...a]=t.split(/\s+/),n=a.join(" "),s=(this.resolvedSpec?.tags||[]).flatMap(i=>i.paths||[]).find(i=>n?i.method===r.toLowerCase()&&i.path===n:i.operationId===t);return s?(s.expanded=!0,this.requestUpdate(),await this.updateComplete,this.shadowRoot?.getElementById(s.elementId)?.scrollIntoView({behavior:"smooth",block:"nearest"}),!0):!1}setApiServer(e){return Es.call(this,e)}async afterSpecParsedAndValidated(e,t=this._specLoadSeq){for(this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find(a=>a.url===this.defaultApiServerUrl))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);if(t!==this._specLoadSeq)return;let r=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(r),this.mockServer==="true"&&xa(this.resolvedSpec,{owner:this,statusCode:this.mockServerStatusCode,statusStrategy:this.mockServerStatusStrategy,delay:this.mockServerDelay,log:this.mockServerLog})}handleHref(e){if(e.target.tagName.toLowerCase()==="a"&&e.target.getAttribute("href").startsWith("#")){let t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:"auto",block:"start"})}}};x([S({type:String,attribute:"spec-url"})],z.prototype,"specUrl",void 0),x([S({type:String,attribute:"sort-endpoints-by"})],z.prototype,"sortEndpointsBy",void 0),x([S({type:String})],z.prototype,"layout",void 0),x([S({type:String,attribute:"paths-expanded"})],z.prototype,"pathsExpanded",void 0),x([S({type:String,attribute:"default-schema-tab"})],z.prototype,"defaultSchemaTab",void 0),x([S({type:String,attribute:"response-area-height"})],z.prototype,"responseAreaHeight",void 0),x([S({type:String,attribute:"show-summary-when-collapsed"})],z.prototype,"showSummaryWhenCollapsed",void 0),x([S({type:String,attribute:"fill-request-fields-with-example"})],z.prototype,"fillRequestFieldsWithExample",void 0),x([S({type:String,attribute:"persist-auth"})],z.prototype,"persistAuth",void 0),x([S({type:String,attribute:"schema-style"})],z.prototype,"schemaStyle",void 0),x([S({type:Number,attribute:"schema-expand-level"})],z.prototype,"schemaExpandLevel",void 0),x([S({type:String,attribute:"schema-description-expanded"})],z.prototype,"schemaDescriptionExpanded",void 0),x([S({type:String,attribute:"api-key-name"})],z.prototype,"apiKeyName",void 0),x([S({type:String,attribute:"api-key-location"})],z.prototype,"apiKeyLocation",void 0),x([S({type:String,attribute:"api-key-value"})],z.prototype,"apiKeyValue",void 0),x([S({type:String,attribute:"default-api-server"})],z.prototype,"defaultApiServerUrl",void 0),x([S({type:String,attribute:"server-url"})],z.prototype,"serverUrl",void 0),x([S({type:String,attribute:"oauth-receiver"})],z.prototype,"oauthReceiver",void 0),x([S({type:Object,attribute:"additional-authorize-params",converter:Hc})],z.prototype,"additionalAuthorizeParams",void 0),x([S({type:Object,attribute:"additional-token-params",converter:Hc})],z.prototype,"additionalTokenParams",void 0),x([S({type:String,attribute:"mock-server"})],z.prototype,"mockServer",void 0),x([S({type:String,attribute:"mock-server-status-code"})],z.prototype,"mockServerStatusCode",void 0),x([S({type:String,attribute:"mock-server-status-strategy"})],z.prototype,"mockServerStatusStrategy",void 0),x([S({type:Number,attribute:"mock-server-delay"})],z.prototype,"mockServerDelay",void 0),x([S({type:String,attribute:"mock-server-log"})],z.prototype,"mockServerLog",void 0),x([S({type:String,attribute:"allow-try"})],z.prototype,"allowTry",void 0),x([S({type:String,attribute:"show-curl-before-try"})],z.prototype,"showCurlBeforeTry",void 0),x([S({type:String,reflect:!0})],z.prototype,"theme",void 0),x([S({type:String,attribute:"primary-color"})],z.prototype,"primaryColor",void 0),x([S({type:String,attribute:"color-scheme",reflect:!0})],z.prototype,"colorScheme",void 0),x([S({type:String,reflect:!0})],z.prototype,"radius",void 0),x([S({type:String,reflect:!0})],z.prototype,"scale",void 0),x([S({type:String,attribute:"fetch-credentials"})],z.prototype,"fetchCredentials",void 0),x([S({type:String,attribute:"filter-operations"})],z.prototype,"filterOperations",void 0),x([S({type:String,attribute:"show-tags"})],z.prototype,"showTags",void 0),x([S({type:Boolean})],z.prototype,"loading",void 0),z=x([Ae("rapi-doc-mini")],z);var lg=z,Cs=class extends HTMLElement{connectedCallback(){let e=km(window.location);if(e&&(window.history.replaceState(null,"",window.location.pathname),window.opener&&window.opener.postMessage(e,window.location.origin),typeof BroadcastChannel=="function")){let t=new BroadcastChannel(ql);t.postMessage(e),t.close()}}};Cs=x([Ae("oauth-receiver")],Cs);var cg=Cs,dg={RapiDoc:og};export{cg as OAuthReceiver,lg as RapiDocMini,dg as default};