@parallelworks/ui 0.19.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/ai/adapter/openai/createOpenAIStream.js +3 -2
- package/dist/ai/agent/diff.d.ts +0 -1
- package/dist/ai/agent/diff.js +3 -2
- package/dist/ai/agent/toolfmt.js +2 -3
- package/dist/ai/ai.css +5 -0
- package/dist/ai/components/AllocationSelector.js +3 -2
- package/dist/ai/components/AttachmentManager.js +5 -2
- package/dist/ai/components/BranchNavigator.js +4 -2
- package/dist/ai/components/ChatInput.d.ts +2 -5
- package/dist/ai/components/ChatInput.js +10 -7
- package/dist/ai/components/ChatMessage.js +11 -8
- package/dist/ai/components/ChatSidebar.d.ts +0 -1
- package/dist/ai/components/ChatSidebar.js +4 -6
- package/dist/ai/components/ChatThread.js +5 -8
- package/dist/ai/components/ModelSelector.js +3 -2
- package/dist/ai/components/ShareDialog.js +6 -3
- package/dist/ai/components/SlashMenu.d.ts +0 -1
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -1
- package/dist/ai/components/agent/ActivityLine.js +2 -2
- package/dist/ai/components/agent/AgentMessageParts.d.ts +1 -26
- package/dist/ai/components/agent/AgentMessageParts.js +4 -5
- package/dist/ai/core/ChatProvider.d.ts +2 -6
- package/dist/ai/core/ChatProvider.js +42 -67
- package/dist/ai/core/KeyboardShortcutsProvider.js +1 -1
- package/dist/ai/core/chatReducer.d.ts +0 -6
- package/dist/ai/core/chatReducer.js +1 -15
- package/dist/ai/core/config.js +2 -1
- package/dist/ai/core/useKeyboardShortcuts.d.ts +3 -1
- package/dist/ai/core/useKeyboardShortcuts.js +9 -11
- package/dist/ai/core/useSSEStream.d.ts +0 -1
- package/dist/ai/core/useSSEStream.js +5 -17
- package/dist/ai/strings.d.ts +0 -1
- package/dist/ai/strings.js +0 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/ai/ui/Avatar.d.ts +1 -2
- package/dist/ai/ui/Avatar.js +7 -18
- package/dist/ai/ui/Markdown.d.ts +1 -3
- package/dist/ai/ui/Markdown.js +1 -2
- package/dist/ai/ui/sidebar.d.ts +0 -1
- package/dist/ai/ui/sidebar.js +3 -1
- package/dist/ai/utils.js +1 -1
- package/dist/assets/editor.worker-DfmPPyOL.js +60 -0
- package/dist/assets/json.worker-Dqgjpq9F.js +92 -0
- package/dist/assets/yaml.worker-DLx0whrM.js +1441 -0
- package/dist/components/Avatar.js +4 -2
- package/dist/components/BareModal.js +1 -5
- package/dist/components/Breadcrumbs.js +21 -14
- package/dist/components/CollapsiblePanel.d.ts +1 -3
- package/dist/components/CollapsiblePanel.js +5 -5
- package/dist/components/Dropdown.d.ts +0 -4
- package/dist/components/Dropdown.js +5 -6
- package/dist/components/Listbox.js +14 -18
- package/dist/components/MultiSelect.js +5 -8
- package/dist/components/Pagination.js +1 -1
- package/dist/components/Provider.d.ts +0 -8
- package/dist/components/Provider.js +12 -4
- package/dist/components/SwitchToggle.js +3 -5
- package/dist/components/Table.d.ts +1 -3
- package/dist/components/dropdownUtils.js +5 -6
- package/dist/components/relativeTime.d.ts +0 -7
- package/dist/components/relativeTime.js +1 -1
- package/dist/duration.js +1 -1
- package/dist/editor/Editor.d.ts +1 -1
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorField.d.ts +0 -1
- package/dist/editor/EditorField.js +8 -8
- package/dist/editor/FormCodePanel.js +14 -20
- package/dist/editor/Monaco.js +2 -25
- package/dist/editor/workers.d.ts +5 -0
- package/dist/editor/workers.js +14 -8
- package/dist/editor/yaml.d.ts +9 -1
- package/dist/editor/yaml.worker.d.ts +1 -0
- package/dist/editor/yamlLanguage.d.ts +6 -0
- package/dist/editor/yamlLanguage.js +312 -0
- package/dist/file-explorer/FileExplorer.js +60 -60
- package/dist/file-explorer/FileExplorerContext.d.ts +1 -2
- package/dist/file-explorer/FileExplorerContext.js +92 -125
- package/dist/file-explorer/FilePreview/Inline.d.ts +1 -2
- package/dist/file-explorer/FilePreview/Inline.js +2 -2
- package/dist/file-explorer/FilePreview/Viewer.js +0 -4
- package/dist/file-explorer/FilePreview/index.d.ts +1 -2
- package/dist/file-explorer/FilePreview/index.js +3 -3
- package/dist/file-explorer/FilePreview/parse.d.ts +2 -1
- package/dist/file-explorer/FilePreview/useObjectBlobUrl.d.ts +5 -4
- package/dist/file-explorer/FilePreview/useObjectBlobUrl.js +23 -36
- package/dist/file-explorer/FilePreview/useObjectText.d.ts +1 -2
- package/dist/file-explorer/FilePreview/useObjectText.js +5 -7
- package/dist/file-explorer/FileRow.js +1 -1
- package/dist/file-explorer/FileRowsWindow.d.ts +5 -12
- package/dist/file-explorer/FileTable.d.ts +2 -6
- package/dist/file-explorer/LoadMoreRow.d.ts +8 -0
- package/dist/file-explorer/TreeView.d.ts +0 -1
- package/dist/file-explorer/TreeView.js +6 -6
- package/dist/file-explorer/helpers.js +2 -4
- package/dist/file-explorer/lib/fileExplorer.d.ts +0 -2
- package/dist/file-explorer/lib/types.d.ts +0 -1
- package/dist/file-explorer/lib/utils.js +15 -20
- package/dist/file-explorer/toasts.js +36 -34
- package/dist/form/Fields/BooleanField.js +5 -4
- package/dist/form/Fields/CheckboxGroupField.js +5 -4
- package/dist/form/Fields/ColorField.js +5 -4
- package/dist/form/Fields/DropdownField.d.ts +0 -1
- package/dist/form/Fields/DropdownField.js +10 -13
- package/dist/form/Fields/DurationField.js +2 -2
- package/dist/form/Fields/LabelField.js +5 -5
- package/dist/form/Fields/MultiDropdownField.d.ts +1 -1
- package/dist/form/Fields/MultiDropdownField.js +8 -11
- package/dist/form/Fields/NumberField.js +6 -5
- package/dist/form/Fields/ObjectField.d.ts +1 -2
- package/dist/form/Fields/ObjectField.js +22 -21
- package/dist/form/Fields/RadioField.js +4 -3
- package/dist/form/Fields/RangeField.js +7 -6
- package/dist/form/Fields/StringField.js +2 -1
- package/dist/form/Fields/TextAreaField.js +2 -1
- package/dist/form/Form.d.ts +7 -8
- package/dist/form/Form.js +52 -78
- package/dist/form/SpecialTypes/DropdownWrapper.d.ts +0 -2
- package/dist/form/SpecialTypes/DropdownWrapper.js +1 -3
- package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +1 -3
- package/dist/form/SpecialTypes/FormikCustomDropdown.js +4 -7
- package/dist/form/SpecialTypes/FormikCustomInput.js +13 -11
- package/dist/form/Wizard/WizardContainer.js +8 -25
- package/dist/form/Wizard/WizardNavigation.d.ts +1 -1
- package/dist/form/Wizard/WizardNavigation.js +5 -6
- package/dist/form/Wizard/WizardStepContent.d.ts +1 -1
- package/dist/form/Wizard/WizardStepContent.js +2 -2
- package/dist/form/Wizard/WizardStepIndicator.js +7 -17
- package/dist/form/Wizard/types.d.ts +4 -46
- package/dist/form/Wizard/useWizardState.d.ts +2 -10
- package/dist/form/Wizard/useWizardState.js +42 -92
- package/dist/form/Wizard/utils.js +6 -11
- package/dist/form/lib.js +28 -54
- package/dist/form/types/fieldTypes.d.ts +4 -5
- package/dist/form/utils/dependentOptions.d.ts +6 -0
- package/dist/form/utils/dependentOptions.js +21 -0
- package/dist/form/utils/getParentValue.d.ts +2 -1
- package/dist/form/utils/getParentValue.js +10 -15
- package/dist/form/utils/getValueUsingPath.js +1 -1
- package/dist/graph/AnnotationBanner.d.ts +1 -1
- package/dist/graph/AnnotationBanner.js +1 -1
- package/dist/graph/Collapse.d.ts +3 -3
- package/dist/graph/Collapse.js +3 -8
- package/dist/graph/DependencyGraph.d.ts +5 -4
- package/dist/graph/DependencyGraph.js +172 -222
- package/dist/graph/JobSummary.d.ts +10 -8
- package/dist/graph/JobSummary.js +13 -13
- package/dist/graph/MatrixGroup.d.ts +5 -17
- package/dist/graph/MatrixGroup.js +11 -22
- package/dist/graph/TreeView.d.ts +1 -3
- package/dist/graph/TreeView.js +104 -491
- package/dist/graph/types.d.ts +3 -2
- package/dist/graph/util.d.ts +5 -0
- package/dist/graph/util.js +18 -0
- package/dist/icons.d.ts +5 -5
- package/dist/icons.js +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/list/ListViewControls.js +17 -35
- package/dist/list/RowContextMenu.js +9 -8
- package/dist/list/UserHoverCard.js +5 -5
- package/dist/logviewer/LogViewer.js +7 -9
- package/dist/logviewer/segments.js +2 -2
- package/dist/safeUrl.d.ts +6 -0
- package/dist/safeUrl.js +22 -0
- package/dist/styles/theme.css +1 -0
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +5 -5
- package/package.json +33 -37
- package/dist/ai/ui/buttons.d.ts +0 -1
- package/dist/assets/editor.worker-BmHUIVG4.js +0 -14807
- package/dist/assets/json.worker-D8bJ92nw.js +0 -22207
- package/dist/assets/yaml.worker-C4gyGAko.js +0 -50201
|
@@ -0,0 +1,1441 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
Third-party software bundled into this file:
|
|
3
|
+
|
|
4
|
+
@vscode/l10n@0.0.18
|
|
5
|
+
|
|
6
|
+
License: MIT
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
ajv-draft-04@1.0.0
|
|
11
|
+
|
|
12
|
+
MIT License
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2021 Evgeny Poberezkin
|
|
15
|
+
|
|
16
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
17
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
18
|
+
in the Software without restriction, including without limitation the rights
|
|
19
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
21
|
+
furnished to do so, subject to the following conditions:
|
|
22
|
+
|
|
23
|
+
The above copyright notice and this permission notice shall be included in all
|
|
24
|
+
copies or substantial portions of the Software.
|
|
25
|
+
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
29
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
30
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
32
|
+
SOFTWARE.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
ajv-i18n@4.2.0
|
|
37
|
+
|
|
38
|
+
The MIT License (MIT)
|
|
39
|
+
|
|
40
|
+
Copyright (c) 2015 Evgeny Poberezkin
|
|
41
|
+
|
|
42
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
43
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
44
|
+
in the Software without restriction, including without limitation the rights
|
|
45
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
46
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
47
|
+
furnished to do so, subject to the following conditions:
|
|
48
|
+
|
|
49
|
+
The above copyright notice and this permission notice shall be included in all
|
|
50
|
+
copies or substantial portions of the Software.
|
|
51
|
+
|
|
52
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
54
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
55
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
56
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
57
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
58
|
+
SOFTWARE.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
ajv@8.20.0
|
|
63
|
+
|
|
64
|
+
The MIT License (MIT)
|
|
65
|
+
|
|
66
|
+
Copyright (c) 2015-2021 Evgeny Poberezkin
|
|
67
|
+
|
|
68
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
69
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
70
|
+
in the Software without restriction, including without limitation the rights
|
|
71
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
72
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
73
|
+
furnished to do so, subject to the following conditions:
|
|
74
|
+
|
|
75
|
+
The above copyright notice and this permission notice shall be included in all
|
|
76
|
+
copies or substantial portions of the Software.
|
|
77
|
+
|
|
78
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
79
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
80
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
81
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
82
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
83
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
84
|
+
SOFTWARE.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
call-bind-apply-helpers@1.0.2
|
|
89
|
+
|
|
90
|
+
MIT License
|
|
91
|
+
|
|
92
|
+
Copyright (c) 2024 Jordan Harband
|
|
93
|
+
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
95
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
96
|
+
in the Software without restriction, including without limitation the rights
|
|
97
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
98
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
99
|
+
furnished to do so, subject to the following conditions:
|
|
100
|
+
|
|
101
|
+
The above copyright notice and this permission notice shall be included in all
|
|
102
|
+
copies or substantial portions of the Software.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
106
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
107
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
108
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
110
|
+
SOFTWARE.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
call-bound@1.0.4
|
|
115
|
+
|
|
116
|
+
MIT License
|
|
117
|
+
|
|
118
|
+
Copyright (c) 2024 Jordan Harband
|
|
119
|
+
|
|
120
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
121
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
122
|
+
in the Software without restriction, including without limitation the rights
|
|
123
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
124
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
125
|
+
furnished to do so, subject to the following conditions:
|
|
126
|
+
|
|
127
|
+
The above copyright notice and this permission notice shall be included in all
|
|
128
|
+
copies or substantial portions of the Software.
|
|
129
|
+
|
|
130
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
131
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
132
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
133
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
134
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
135
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
136
|
+
SOFTWARE.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
dunder-proto@1.0.1
|
|
141
|
+
|
|
142
|
+
MIT License
|
|
143
|
+
|
|
144
|
+
Copyright (c) 2024 ECMAScript Shims
|
|
145
|
+
|
|
146
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
147
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
148
|
+
in the Software without restriction, including without limitation the rights
|
|
149
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
150
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
151
|
+
furnished to do so, subject to the following conditions:
|
|
152
|
+
|
|
153
|
+
The above copyright notice and this permission notice shall be included in all
|
|
154
|
+
copies or substantial portions of the Software.
|
|
155
|
+
|
|
156
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
157
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
158
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
159
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
160
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
161
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
162
|
+
SOFTWARE.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
es-define-property@1.0.1
|
|
167
|
+
|
|
168
|
+
MIT License
|
|
169
|
+
|
|
170
|
+
Copyright (c) 2024 Jordan Harband
|
|
171
|
+
|
|
172
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
173
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
174
|
+
in the Software without restriction, including without limitation the rights
|
|
175
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
176
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
177
|
+
furnished to do so, subject to the following conditions:
|
|
178
|
+
|
|
179
|
+
The above copyright notice and this permission notice shall be included in all
|
|
180
|
+
copies or substantial portions of the Software.
|
|
181
|
+
|
|
182
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
183
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
184
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
185
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
186
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
187
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
188
|
+
SOFTWARE.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
es-errors@1.3.0
|
|
193
|
+
|
|
194
|
+
MIT License
|
|
195
|
+
|
|
196
|
+
Copyright (c) 2024 Jordan Harband
|
|
197
|
+
|
|
198
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
199
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
200
|
+
in the Software without restriction, including without limitation the rights
|
|
201
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
202
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
203
|
+
furnished to do so, subject to the following conditions:
|
|
204
|
+
|
|
205
|
+
The above copyright notice and this permission notice shall be included in all
|
|
206
|
+
copies or substantial portions of the Software.
|
|
207
|
+
|
|
208
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
209
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
210
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
211
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
212
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
213
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
214
|
+
SOFTWARE.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
es-object-atoms@1.1.2
|
|
219
|
+
|
|
220
|
+
MIT License
|
|
221
|
+
|
|
222
|
+
Copyright (c) 2024 Jordan Harband
|
|
223
|
+
|
|
224
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
225
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
226
|
+
in the Software without restriction, including without limitation the rights
|
|
227
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
228
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
229
|
+
furnished to do so, subject to the following conditions:
|
|
230
|
+
|
|
231
|
+
The above copyright notice and this permission notice shall be included in all
|
|
232
|
+
copies or substantial portions of the Software.
|
|
233
|
+
|
|
234
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
235
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
236
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
237
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
238
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
239
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
240
|
+
SOFTWARE.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
fast-deep-equal@3.1.3
|
|
245
|
+
|
|
246
|
+
MIT License
|
|
247
|
+
|
|
248
|
+
Copyright (c) 2017 Evgeny Poberezkin
|
|
249
|
+
|
|
250
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
251
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
252
|
+
in the Software without restriction, including without limitation the rights
|
|
253
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
254
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
255
|
+
furnished to do so, subject to the following conditions:
|
|
256
|
+
|
|
257
|
+
The above copyright notice and this permission notice shall be included in all
|
|
258
|
+
copies or substantial portions of the Software.
|
|
259
|
+
|
|
260
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
261
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
262
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
263
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
264
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
265
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
266
|
+
SOFTWARE.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
fast-uri@3.1.8
|
|
271
|
+
|
|
272
|
+
Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
|
|
273
|
+
Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
|
|
274
|
+
All rights reserved.
|
|
275
|
+
|
|
276
|
+
Redistribution and use in source and binary forms, with or without
|
|
277
|
+
modification, are permitted provided that the following conditions are met:
|
|
278
|
+
* Redistributions of source code must retain the above copyright
|
|
279
|
+
notice, this list of conditions and the following disclaimer.
|
|
280
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
281
|
+
notice, this list of conditions and the following disclaimer in the
|
|
282
|
+
documentation and/or other materials provided with the distribution.
|
|
283
|
+
* The names of any contributors may not be used to endorse or promote
|
|
284
|
+
products derived from this software without specific prior written
|
|
285
|
+
permission.
|
|
286
|
+
|
|
287
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
288
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
289
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
290
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
|
|
291
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
292
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
293
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
294
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
295
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
296
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
297
|
+
|
|
298
|
+
* * *
|
|
299
|
+
|
|
300
|
+
The complete list of contributors can be found at:
|
|
301
|
+
- https://github.com/garycourt/uri-js/graphs/contributors
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
function-bind@1.1.2
|
|
306
|
+
|
|
307
|
+
Copyright (c) 2013 Raynos.
|
|
308
|
+
|
|
309
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
310
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
311
|
+
in the Software without restriction, including without limitation the rights
|
|
312
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
313
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
314
|
+
furnished to do so, subject to the following conditions:
|
|
315
|
+
|
|
316
|
+
The above copyright notice and this permission notice shall be included in
|
|
317
|
+
all copies or substantial portions of the Software.
|
|
318
|
+
|
|
319
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
320
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
321
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
322
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
323
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
324
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
325
|
+
THE SOFTWARE.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
get-intrinsic@1.3.0
|
|
330
|
+
|
|
331
|
+
MIT License
|
|
332
|
+
|
|
333
|
+
Copyright (c) 2020 Jordan Harband
|
|
334
|
+
|
|
335
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
336
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
337
|
+
in the Software without restriction, including without limitation the rights
|
|
338
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
339
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
340
|
+
furnished to do so, subject to the following conditions:
|
|
341
|
+
|
|
342
|
+
The above copyright notice and this permission notice shall be included in all
|
|
343
|
+
copies or substantial portions of the Software.
|
|
344
|
+
|
|
345
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
346
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
347
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
348
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
349
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
350
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
351
|
+
SOFTWARE.
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
get-proto@1.0.1
|
|
356
|
+
|
|
357
|
+
MIT License
|
|
358
|
+
|
|
359
|
+
Copyright (c) 2025 Jordan Harband
|
|
360
|
+
|
|
361
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
362
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
363
|
+
in the Software without restriction, including without limitation the rights
|
|
364
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
365
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
366
|
+
furnished to do so, subject to the following conditions:
|
|
367
|
+
|
|
368
|
+
The above copyright notice and this permission notice shall be included in all
|
|
369
|
+
copies or substantial portions of the Software.
|
|
370
|
+
|
|
371
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
372
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
373
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
374
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
375
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
376
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
377
|
+
SOFTWARE.
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
gopd@1.2.0
|
|
382
|
+
|
|
383
|
+
MIT License
|
|
384
|
+
|
|
385
|
+
Copyright (c) 2022 Jordan Harband
|
|
386
|
+
|
|
387
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
388
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
389
|
+
in the Software without restriction, including without limitation the rights
|
|
390
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
391
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
392
|
+
furnished to do so, subject to the following conditions:
|
|
393
|
+
|
|
394
|
+
The above copyright notice and this permission notice shall be included in all
|
|
395
|
+
copies or substantial portions of the Software.
|
|
396
|
+
|
|
397
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
398
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
399
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
400
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
401
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
402
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
403
|
+
SOFTWARE.
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
has-symbols@1.1.0
|
|
408
|
+
|
|
409
|
+
MIT License
|
|
410
|
+
|
|
411
|
+
Copyright (c) 2016 Jordan Harband
|
|
412
|
+
|
|
413
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
414
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
415
|
+
in the Software without restriction, including without limitation the rights
|
|
416
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
417
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
418
|
+
furnished to do so, subject to the following conditions:
|
|
419
|
+
|
|
420
|
+
The above copyright notice and this permission notice shall be included in all
|
|
421
|
+
copies or substantial portions of the Software.
|
|
422
|
+
|
|
423
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
424
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
425
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
426
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
427
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
428
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
429
|
+
SOFTWARE.
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
hasown@2.0.4
|
|
434
|
+
|
|
435
|
+
MIT License
|
|
436
|
+
|
|
437
|
+
Copyright (c) Jordan Harband and contributors
|
|
438
|
+
|
|
439
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
440
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
441
|
+
in the Software without restriction, including without limitation the rights
|
|
442
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
443
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
444
|
+
furnished to do so, subject to the following conditions:
|
|
445
|
+
|
|
446
|
+
The above copyright notice and this permission notice shall be included in all
|
|
447
|
+
copies or substantial portions of the Software.
|
|
448
|
+
|
|
449
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
450
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
451
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
452
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
453
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
454
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
455
|
+
SOFTWARE.
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
json-schema-traverse@1.0.0
|
|
460
|
+
|
|
461
|
+
MIT License
|
|
462
|
+
|
|
463
|
+
Copyright (c) 2017 Evgeny Poberezkin
|
|
464
|
+
|
|
465
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
466
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
467
|
+
in the Software without restriction, including without limitation the rights
|
|
468
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
469
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
470
|
+
furnished to do so, subject to the following conditions:
|
|
471
|
+
|
|
472
|
+
The above copyright notice and this permission notice shall be included in all
|
|
473
|
+
copies or substantial portions of the Software.
|
|
474
|
+
|
|
475
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
476
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
477
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
478
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
479
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
480
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
481
|
+
SOFTWARE.
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
jsonc-parser@3.3.1
|
|
486
|
+
|
|
487
|
+
The MIT License (MIT)
|
|
488
|
+
|
|
489
|
+
Copyright (c) Microsoft
|
|
490
|
+
|
|
491
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
492
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
493
|
+
in the Software without restriction, including without limitation the rights
|
|
494
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
495
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
496
|
+
furnished to do so, subject to the following conditions:
|
|
497
|
+
|
|
498
|
+
The above copyright notice and this permission notice shall be included in all
|
|
499
|
+
copies or substantial portions of the Software.
|
|
500
|
+
|
|
501
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
502
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
503
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
504
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
505
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
506
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
507
|
+
SOFTWARE.
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
math-intrinsics@1.1.0
|
|
512
|
+
|
|
513
|
+
MIT License
|
|
514
|
+
|
|
515
|
+
Copyright (c) 2024 ECMAScript Shims
|
|
516
|
+
|
|
517
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
518
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
519
|
+
in the Software without restriction, including without limitation the rights
|
|
520
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
521
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
522
|
+
furnished to do so, subject to the following conditions:
|
|
523
|
+
|
|
524
|
+
The above copyright notice and this permission notice shall be included in all
|
|
525
|
+
copies or substantial portions of the Software.
|
|
526
|
+
|
|
527
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
528
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
529
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
530
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
531
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
532
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
533
|
+
SOFTWARE.
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
object-inspect@1.13.4
|
|
538
|
+
|
|
539
|
+
MIT License
|
|
540
|
+
|
|
541
|
+
Copyright (c) 2013 James Halliday
|
|
542
|
+
|
|
543
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
544
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
545
|
+
in the Software without restriction, including without limitation the rights
|
|
546
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
547
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
548
|
+
furnished to do so, subject to the following conditions:
|
|
549
|
+
|
|
550
|
+
The above copyright notice and this permission notice shall be included in all
|
|
551
|
+
copies or substantial portions of the Software.
|
|
552
|
+
|
|
553
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
554
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
555
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
556
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
557
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
558
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
559
|
+
SOFTWARE.
|
|
560
|
+
|
|
561
|
+
---
|
|
562
|
+
|
|
563
|
+
path-browserify@1.0.1
|
|
564
|
+
|
|
565
|
+
MIT License
|
|
566
|
+
|
|
567
|
+
Copyright (c) 2013 James Halliday
|
|
568
|
+
|
|
569
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
570
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
571
|
+
the Software without restriction, including without limitation the rights to
|
|
572
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
573
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
574
|
+
subject to the following conditions:
|
|
575
|
+
|
|
576
|
+
The above copyright notice and this permission notice shall be included in all
|
|
577
|
+
copies or substantial portions of the Software.
|
|
578
|
+
|
|
579
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
580
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
581
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
582
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
583
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
584
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
585
|
+
|
|
586
|
+
---
|
|
587
|
+
|
|
588
|
+
picomatch@4.0.7
|
|
589
|
+
|
|
590
|
+
The MIT License (MIT)
|
|
591
|
+
|
|
592
|
+
Copyright (c) 2017-present, Jon Schlinkert.
|
|
593
|
+
|
|
594
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
595
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
596
|
+
in the Software without restriction, including without limitation the rights
|
|
597
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
598
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
599
|
+
furnished to do so, subject to the following conditions:
|
|
600
|
+
|
|
601
|
+
The above copyright notice and this permission notice shall be included in
|
|
602
|
+
all copies or substantial portions of the Software.
|
|
603
|
+
|
|
604
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
605
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
606
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
607
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
608
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
609
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
610
|
+
THE SOFTWARE.
|
|
611
|
+
|
|
612
|
+
---
|
|
613
|
+
|
|
614
|
+
prettier@3.9.9
|
|
615
|
+
|
|
616
|
+
Copyright © James Long and contributors
|
|
617
|
+
|
|
618
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
619
|
+
|
|
620
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
621
|
+
|
|
622
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
623
|
+
|
|
624
|
+
---
|
|
625
|
+
|
|
626
|
+
punycode@1.4.1
|
|
627
|
+
|
|
628
|
+
Copyright Mathias Bynens <https://mathiasbynens.be/>
|
|
629
|
+
|
|
630
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
631
|
+
a copy of this software and associated documentation files (the
|
|
632
|
+
"Software"), to deal in the Software without restriction, including
|
|
633
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
634
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
635
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
636
|
+
the following conditions:
|
|
637
|
+
|
|
638
|
+
The above copyright notice and this permission notice shall be
|
|
639
|
+
included in all copies or substantial portions of the Software.
|
|
640
|
+
|
|
641
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
642
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
643
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
644
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
645
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
646
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
647
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
648
|
+
|
|
649
|
+
---
|
|
650
|
+
|
|
651
|
+
qs@6.16.0
|
|
652
|
+
|
|
653
|
+
BSD 3-Clause License
|
|
654
|
+
|
|
655
|
+
Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors)
|
|
656
|
+
All rights reserved.
|
|
657
|
+
|
|
658
|
+
Redistribution and use in source and binary forms, with or without
|
|
659
|
+
modification, are permitted provided that the following conditions are met:
|
|
660
|
+
|
|
661
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
662
|
+
list of conditions and the following disclaimer.
|
|
663
|
+
|
|
664
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
665
|
+
this list of conditions and the following disclaimer in the documentation
|
|
666
|
+
and/or other materials provided with the distribution.
|
|
667
|
+
|
|
668
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
669
|
+
contributors may be used to endorse or promote products derived from
|
|
670
|
+
this software without specific prior written permission.
|
|
671
|
+
|
|
672
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
673
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
674
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
675
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
676
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
677
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
678
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
679
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
680
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
681
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
request-light@0.5.8
|
|
686
|
+
|
|
687
|
+
The MIT License (MIT)
|
|
688
|
+
|
|
689
|
+
Copyright (c) Microsoft
|
|
690
|
+
|
|
691
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
692
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
693
|
+
in the Software without restriction, including without limitation the rights
|
|
694
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
695
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
696
|
+
furnished to do so, subject to the following conditions:
|
|
697
|
+
|
|
698
|
+
The above copyright notice and this permission notice shall be included in all
|
|
699
|
+
copies or substantial portions of the Software.
|
|
700
|
+
|
|
701
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
702
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
703
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
704
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
705
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
706
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
707
|
+
SOFTWARE.
|
|
708
|
+
|
|
709
|
+
---
|
|
710
|
+
|
|
711
|
+
side-channel-list@1.0.1
|
|
712
|
+
|
|
713
|
+
MIT License
|
|
714
|
+
|
|
715
|
+
Copyright (c) 2024 Jordan Harband
|
|
716
|
+
|
|
717
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
718
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
719
|
+
in the Software without restriction, including without limitation the rights
|
|
720
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
721
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
722
|
+
furnished to do so, subject to the following conditions:
|
|
723
|
+
|
|
724
|
+
The above copyright notice and this permission notice shall be included in all
|
|
725
|
+
copies or substantial portions of the Software.
|
|
726
|
+
|
|
727
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
728
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
729
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
730
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
731
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
732
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
733
|
+
SOFTWARE.
|
|
734
|
+
|
|
735
|
+
---
|
|
736
|
+
|
|
737
|
+
side-channel-map@1.0.1
|
|
738
|
+
|
|
739
|
+
MIT License
|
|
740
|
+
|
|
741
|
+
Copyright (c) 2024 Jordan Harband
|
|
742
|
+
|
|
743
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
744
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
745
|
+
in the Software without restriction, including without limitation the rights
|
|
746
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
747
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
748
|
+
furnished to do so, subject to the following conditions:
|
|
749
|
+
|
|
750
|
+
The above copyright notice and this permission notice shall be included in all
|
|
751
|
+
copies or substantial portions of the Software.
|
|
752
|
+
|
|
753
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
754
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
755
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
756
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
757
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
758
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
759
|
+
SOFTWARE.
|
|
760
|
+
|
|
761
|
+
---
|
|
762
|
+
|
|
763
|
+
side-channel-weakmap@1.0.2
|
|
764
|
+
|
|
765
|
+
MIT License
|
|
766
|
+
|
|
767
|
+
Copyright (c) 2019 Jordan Harband
|
|
768
|
+
|
|
769
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
770
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
771
|
+
in the Software without restriction, including without limitation the rights
|
|
772
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
773
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
774
|
+
furnished to do so, subject to the following conditions:
|
|
775
|
+
|
|
776
|
+
The above copyright notice and this permission notice shall be included in all
|
|
777
|
+
copies or substantial portions of the Software.
|
|
778
|
+
|
|
779
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
780
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
781
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
782
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
783
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
784
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
785
|
+
SOFTWARE.
|
|
786
|
+
|
|
787
|
+
---
|
|
788
|
+
|
|
789
|
+
side-channel@1.1.1
|
|
790
|
+
|
|
791
|
+
MIT License
|
|
792
|
+
|
|
793
|
+
Copyright (c) 2019 Jordan Harband
|
|
794
|
+
|
|
795
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
796
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
797
|
+
in the Software without restriction, including without limitation the rights
|
|
798
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
799
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
800
|
+
furnished to do so, subject to the following conditions:
|
|
801
|
+
|
|
802
|
+
The above copyright notice and this permission notice shall be included in all
|
|
803
|
+
copies or substantial portions of the Software.
|
|
804
|
+
|
|
805
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
806
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
807
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
808
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
809
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
810
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
811
|
+
SOFTWARE.
|
|
812
|
+
|
|
813
|
+
---
|
|
814
|
+
|
|
815
|
+
url@0.11.4
|
|
816
|
+
|
|
817
|
+
The MIT License (MIT)
|
|
818
|
+
|
|
819
|
+
Copyright 2014 Joyent, Inc. and other Node contributors.
|
|
820
|
+
|
|
821
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
822
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
823
|
+
in the Software without restriction, including without limitation the rights
|
|
824
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
825
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
826
|
+
furnished to do so, subject to the following conditions:
|
|
827
|
+
|
|
828
|
+
The above copyright notice and this permission notice shall be included in all
|
|
829
|
+
copies or substantial portions of the Software.
|
|
830
|
+
|
|
831
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
832
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
833
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
834
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
835
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
836
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
837
|
+
SOFTWARE.
|
|
838
|
+
|
|
839
|
+
---
|
|
840
|
+
|
|
841
|
+
vscode-jsonrpc@8.2.0
|
|
842
|
+
|
|
843
|
+
Copyright (c) Microsoft Corporation
|
|
844
|
+
|
|
845
|
+
All rights reserved.
|
|
846
|
+
|
|
847
|
+
MIT License
|
|
848
|
+
|
|
849
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
850
|
+
|
|
851
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
852
|
+
|
|
853
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
854
|
+
|
|
855
|
+
---
|
|
856
|
+
|
|
857
|
+
vscode-languageserver-protocol@3.17.5
|
|
858
|
+
|
|
859
|
+
Copyright (c) Microsoft Corporation
|
|
860
|
+
|
|
861
|
+
All rights reserved.
|
|
862
|
+
|
|
863
|
+
MIT License
|
|
864
|
+
|
|
865
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
866
|
+
|
|
867
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
868
|
+
|
|
869
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
870
|
+
|
|
871
|
+
---
|
|
872
|
+
|
|
873
|
+
vscode-languageserver-textdocument@1.0.15
|
|
874
|
+
|
|
875
|
+
Copyright (c) Microsoft Corporation
|
|
876
|
+
|
|
877
|
+
All rights reserved.
|
|
878
|
+
|
|
879
|
+
MIT License
|
|
880
|
+
|
|
881
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
882
|
+
|
|
883
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
884
|
+
|
|
885
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
886
|
+
|
|
887
|
+
---
|
|
888
|
+
|
|
889
|
+
vscode-languageserver-types@3.17.5
|
|
890
|
+
|
|
891
|
+
Copyright (c) Microsoft Corporation
|
|
892
|
+
|
|
893
|
+
All rights reserved.
|
|
894
|
+
|
|
895
|
+
MIT License
|
|
896
|
+
|
|
897
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
898
|
+
|
|
899
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
900
|
+
|
|
901
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
902
|
+
|
|
903
|
+
---
|
|
904
|
+
|
|
905
|
+
vscode-languageserver@9.0.1
|
|
906
|
+
|
|
907
|
+
Copyright (c) Microsoft Corporation
|
|
908
|
+
|
|
909
|
+
All rights reserved.
|
|
910
|
+
|
|
911
|
+
MIT License
|
|
912
|
+
|
|
913
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
914
|
+
|
|
915
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
916
|
+
|
|
917
|
+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
918
|
+
|
|
919
|
+
---
|
|
920
|
+
|
|
921
|
+
vscode-uri@3.2.0
|
|
922
|
+
|
|
923
|
+
The MIT License (MIT)
|
|
924
|
+
|
|
925
|
+
Copyright (c) Microsoft
|
|
926
|
+
|
|
927
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
928
|
+
|
|
929
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
930
|
+
|
|
931
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
932
|
+
|
|
933
|
+
---
|
|
934
|
+
|
|
935
|
+
yaml-language-server@1.24.0
|
|
936
|
+
|
|
937
|
+
MIT License
|
|
938
|
+
|
|
939
|
+
Copyright (c) 2017 Red Hat Inc. and others.
|
|
940
|
+
|
|
941
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
942
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
943
|
+
in the Software without restriction, including without limitation the rights
|
|
944
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
945
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
946
|
+
furnished to do so, subject to the following conditions:
|
|
947
|
+
|
|
948
|
+
The above copyright notice and this permission notice shall be included in all
|
|
949
|
+
copies or substantial portions of the Software.
|
|
950
|
+
|
|
951
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
952
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
953
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
954
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
955
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
956
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
957
|
+
SOFTWARE.
|
|
958
|
+
|
|
959
|
+
---
|
|
960
|
+
|
|
961
|
+
yaml@2.8.3
|
|
962
|
+
|
|
963
|
+
Copyright Eemeli Aro <eemeli@gmail.com>
|
|
964
|
+
|
|
965
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
966
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
967
|
+
and this permission notice appear in all copies.
|
|
968
|
+
|
|
969
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
970
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
971
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
972
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
973
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
974
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
975
|
+
THIS SOFTWARE.
|
|
976
|
+
*/
|
|
977
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);async function f(e){if(e.protocol===`http:`||e.protocol===`https:`)return await(await fetch(e)).text();throw Error(`Unsupported protocol`)}function p(e){throw Error(`Unsupported in browser`)}var m;function h(e){if(`contents`in e){m=typeof e.contents==`string`?JSON.parse(e.contents):e.contents;return}if(`fsPath`in e){let t=p(e.fsPath),n=JSON.parse(t);m=y(n)?n.contents.bundle:n;return}if(e.uri){let t=e.uri;return typeof e.uri==`string`&&(t=new URL(e.uri)),new Promise((e,n)=>{f(t).then(t=>{try{let n=JSON.parse(t);m=y(n)?n.contents.bundle:n,e()}catch(e){n(e)}}).catch(e=>{n(e)})})}}function g(...e){let t=e[0],n,r,i;if(typeof t==`string`)n=t,r=t,e.splice(0,1),i=!e||typeof e[0]!=`object`?e:e[0];else if(t instanceof Array){let n=e.slice(1);if(t.length!==n.length+1)throw Error(`expected a string as the first argument to l10n.t`);let r=t[0];for(let e=1;e<t.length;e++)r+=`{${e-1}}`+t[e];return g(r,...n)}else r=t.message,n=r,t.comment&&t.comment.length>0&&(n+=`/${Array.isArray(t.comment)?t.comment.join(``):t.comment}`),i=t.args??{};let a=m?.[n];return a?typeof a==`string`?v(a,i):a.comment?v(a.message,i):v(r,i):v(r,i)}var _=/{([^}]+)}/g;function v(e,t){return Object.keys(t).length===0?e:e.replace(_,(e,n)=>t[n]??e)}function y(e){return typeof e?.contents?.bundle==`object`&&typeof e?.version==`string`}var b=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}e.string=n;function r(e){return typeof e==`number`||e instanceof Number}e.number=r;function i(e){return e instanceof Error}e.error=i;function a(e){return typeof e==`function`}e.func=a;function o(e){return Array.isArray(e)}e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}e.stringArray=s})),x=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;let t=b();var n;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(n||(e.ErrorCodes=n={})),e.ResponseError=class e extends Error{constructor(r,i,a){super(i),this.code=t.number(r)?r:n.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,e.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};var r=class e{constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=r,r.auto=new r(`auto`),r.byPosition=new r(`byPosition`),r.byName=new r(`byName`);var i=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}};e.AbstractMessageSignature=i,e.RequestType0=class extends i{constructor(e){super(e,0)}},e.RequestType=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType1=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType2=class extends i{constructor(e){super(e,2)}},e.RequestType3=class extends i{constructor(e){super(e,3)}},e.RequestType4=class extends i{constructor(e){super(e,4)}},e.RequestType5=class extends i{constructor(e){super(e,5)}},e.RequestType6=class extends i{constructor(e){super(e,6)}},e.RequestType7=class extends i{constructor(e){super(e,7)}},e.RequestType8=class extends i{constructor(e){super(e,8)}},e.RequestType9=class extends i{constructor(e){super(e,9)}},e.NotificationType=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType0=class extends i{constructor(e){super(e,0)}},e.NotificationType1=class extends i{constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType2=class extends i{constructor(e){super(e,2)}},e.NotificationType3=class extends i{constructor(e){super(e,3)}},e.NotificationType4=class extends i{constructor(e){super(e,4)}},e.NotificationType5=class extends i{constructor(e){super(e,5)}},e.NotificationType6=class extends i{constructor(e){super(e,6)}},e.NotificationType7=class extends i{constructor(e){super(e,7)}},e.NotificationType8=class extends i{constructor(e){super(e,8)}},e.NotificationType9=class extends i{constructor(e){super(e,9)}};var a;(function(e){function n(e){let n=e;return n&&t.string(n.method)&&(t.string(n.id)||t.number(n.id))}e.isRequest=n;function r(e){let n=e;return n&&t.string(n.method)&&e.id===void 0}e.isNotification=r;function i(e){let n=e;return n&&(n.result!==void 0||!!n.error)&&(t.string(n.id)||t.number(n.id)||n.id===null)}e.isResponse=i})(a||(e.Message=a={}))})),S=/* @__PURE__ */ s((e=>{var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var n;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(n||(e.Touch=n={}));var r=class{constructor(){this[t]=`LinkedMap`,this._map=/* @__PURE__ */ new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){let r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:this.addItemLast(i);break;default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(t===n.First||t===n.Last){if(t===n.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}};e.LinkedMap=r,e.LRUCache=class extends r{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}})),C=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(e){function t(e){return{dispose:e}}e.create=t})(t||(e.Disposable=t={}))})),w=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t;function n(){if(t===void 0)throw Error(`No runtime abstraction layer installed`);return t}(function(e){function n(e){if(e===void 0)throw Error(`No runtime abstraction layer provided`);t=e}e.install=n})(n||={}),e.default=n})),T=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;let t=w();var n;(function(e){let t={dispose(){}};e.None=function(){return t}})(n||(e.Event=n={}));var r=class{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t){this._callbacks.splice(r,1),this._contexts.splice(r,1);return}n=!0}if(n)throw Error(`When adding a listener with a context, you should remove it with the same context`)}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=r.length;a<o;a++)try{n.push(r[a].apply(i[a],e))}catch(e){(0,t.default)().console.error(e)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},i=class e{constructor(e){this._options=e}get event(){return this._event||=(t,n,i)=>{this._callbacks||=new r,this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let a={dispose:()=>{this._callbacks&&(this._callbacks.remove(t,n),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(i)&&i.push(a),a},this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&=(this._callbacks.dispose(),void 0)}};e.Emitter=i,i._noop=function(){}})),E=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;let t=w(),n=b(),r=T();var i;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None});function t(t){let r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(i||(e.CancellationToken=i={}));let a=Object.freeze(function(e,n){let r=(0,t.default)().timer.setTimeout(e.bind(n),0);return{dispose(){r.dispose()}}});var o=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||=new r.Emitter,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),void 0)}};e.CancellationTokenSource=class{get token(){return this._token||=new o,this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=i.None}}})),D=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;let t=E();var n;(function(e){e.Continue=0,e.Cancelled=1})(n||={}),e.SharedArraySenderStrategy=class{constructor(){this.buffers=/* @__PURE__ */ new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=n.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,n.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};var r=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===n.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},i=class{constructor(e){this.token=new r(e)}cancel(){}dispose(){}};e.SharedArrayReceiverStrategy=class{constructor(){this.kind=`request`}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new t.CancellationTokenSource:new i(n)}}})),O=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;let t=w();e.Semaphore=class{constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length!==0&&this._active!==this._capacity&&(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}})),k=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;let t=w(),n=b(),r=T(),i=O();var a;(function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}e.is=t})(a||(e.MessageReader=a={}));var o=class{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:/* @__PURE__ */ Error(`Reader received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageReader=o;var s;(function(e){function n(e){let n,r,i=/* @__PURE__ */ new Map,a,o=/* @__PURE__ */ new Map;if(e===void 0||typeof e==`string`)n=e??`utf-8`;else{if(n=e.charset??`utf-8`,e.contentDecoder!==void 0&&(r=e.contentDecoder,i.set(r.name,r)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,t.default)().applicationJson.decoder,o.set(a.name,a)),{charset:n,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}e.fromOptions=n})(s||={}),e.ReadableStreamMessageReader=class extends o{constructor(e,n){super(),this.readable=e,this.options=s.fromOptions(n),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(/* @__PURE__ */ Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(/* @__PURE__ */ Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&=(this.partialMessageTimer.dispose(),void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}})),ee=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;let t=w(),n=b(),r=O(),i=T();var a;(function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}e.is=t})(a||(e.MessageWriter=a={}));var o=class{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:/* @__PURE__ */ Error(`Writer received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageWriter=o;var s;(function(e){function n(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}e.fromOptions=n})(s||={}),e.WriteableStreamMessageWriter=class extends o{constructor(e,t){super(),this.writable=e,this.options=s.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(`Content-Length: `,t.byteLength.toString(),`\r
|
|
978
|
+
`),n.push(`\r
|
|
979
|
+
`),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}})),te=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0,e.AbstractMessageBuffer=class{constructor(e=`utf-8`){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==`string`?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,n=0,r=0,i=0;row:for(;n<this._chunks.length;){let e=this._chunks[n];r=0;column:for(;r<e.length;){switch(e[r]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,r++;break row;default:t=0}break;default:t=0}r++}i+=e.byteLength,n++}if(t!==4)return;let a=this._read(i+r),o=/* @__PURE__ */ new Map,s=this.toString(a,`ascii`).split(`\r
|
|
980
|
+
`);if(s.length<2)return o;for(let t=0;t<s.length-2;t++){let n=s[t],r=n.indexOf(`:`);if(r===-1)throw Error(`Message header must separate key and value using ':'\n${n}`);let i=n.substr(0,r),a=n.substr(r+1).trim();o.set(e?i.toLowerCase():i,a)}return o}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}})),A=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;let t=w(),n=b(),r=x(),i=S(),a=T(),o=E();var s;(function(e){e.type=new r.NotificationType(`$/cancelRequest`)})(s||={});var c;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}e.is=t})(c||(e.ProgressToken=c={}));var l;(function(e){e.type=new r.NotificationType(`$/progress`)})(l||={}),e.ProgressType=class{constructor(){}};var u;(function(e){function t(e){return n.func(e)}e.is=t})(u||={}),e.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var d;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(d||(e.Trace=d={}));var f;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(f||(e.TraceValues=f={})),(function(e){function t(t){if(!n.string(t))return e.Off;switch(t=t.toLowerCase(),t){case`off`:return e.Off;case`messages`:return e.Messages;case`compact`:return e.Compact;case`verbose`:return e.Verbose;default:return e.Off}}e.fromString=t;function r(t){switch(t){case e.Off:return`off`;case e.Messages:return`messages`;case e.Compact:return`compact`;case e.Verbose:return`verbose`;default:return`off`}}e.toString=r})(d||(e.Trace=d={}));var p;(function(e){e.Text=`text`,e.JSON=`json`})(p||(e.TraceFormat=p={})),(function(e){function t(t){return n.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}e.fromString=t})(p||(e.TraceFormat=p={}));var m;(function(e){e.type=new r.NotificationType(`$/setTrace`)})(m||(e.SetTraceNotification=m={}));var h;(function(e){e.type=new r.NotificationType(`$/logTrace`)})(h||(e.LogTraceNotification=h={}));var g;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(g||(e.ConnectionErrors=g={}));var _=class e extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};e.ConnectionError=_;var v;(function(e){function t(e){let t=e;return t&&n.func(t.cancelUndispatched)}e.is=t})(v||(e.ConnectionStrategy=v={}));var y;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}e.is=t})(y||(e.IdCancellationReceiverStrategy=y={}));var C;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}e.is=t})(C||(e.RequestCancellationReceiverStrategy=C={}));var D;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new o.CancellationTokenSource}});function t(e){return y.is(e)||C.is(e)}e.is=t})(D||(e.CancellationReceiverStrategy=D={}));var O;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(s.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&n.func(t.sendCancellation)&&n.func(t.cleanup)}e.is=t})(O||(e.CancellationSenderStrategy=O={}));var k;(function(e){e.Message=Object.freeze({receiver:D.Message,sender:O.Message});function t(e){let t=e;return t&&D.is(t.receiver)&&O.is(t.sender)}e.is=t})(k||(e.CancellationStrategy=k={}));var ee;(function(e){function t(e){let t=e;return t&&n.func(t.handleMessage)}e.is=t})(ee||(e.MessageStrategy=ee={}));var te;(function(e){function t(e){let t=e;return t&&(k.is(t.cancellationStrategy)||v.is(t.connectionStrategy)||ee.is(t.messageStrategy))}e.is=t})(te||(e.ConnectionOptions=te={}));var A;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(A||={});function j(f,v,b,x){let S=b===void 0?e.NullLogger:b,C=0,w=0,T=0,E,D=/* @__PURE__ */ new Map,O,te=/* @__PURE__ */ new Map,j=/* @__PURE__ */ new Map,ne,M=new i.LinkedMap,N=/* @__PURE__ */ new Map,P=/* @__PURE__ */ new Set,F=/* @__PURE__ */ new Map,I=d.Off,re=p.Text,L,R=A.New,z=new a.Emitter,ie=new a.Emitter,ae=new a.Emitter,oe=new a.Emitter,se=new a.Emitter,ce=x&&x.cancellationStrategy?x.cancellationStrategy:k.Message;function le(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}function ue(e){return e===null?`res-unknown-`+(++T).toString():`res-`+e.toString()}function de(){return`not-`+(++w).toString()}function B(e,t){r.Message.isRequest(t)?e.set(le(t.id),t):r.Message.isResponse(t)?e.set(ue(t.id),t):e.set(de(),t)}function fe(e){}function pe(){return R===A.Listening}function me(){return R===A.Closed}function he(){return R===A.Disposed}function ge(){(R===A.New||R===A.Listening)&&(R=A.Closed,ie.fire(void 0))}function _e(e){z.fire([e,void 0,void 0])}function ve(e){z.fire(e)}f.onClose(ge),f.onError(_e),v.onClose(ge),v.onError(ve);function ye(){ne||M.size===0||(ne=(0,t.default)().timer.setImmediate(()=>{ne=void 0,xe()}))}function be(e){r.Message.isRequest(e)?Ce(e):r.Message.isNotification(e)?Te(e):r.Message.isResponse(e)?we(e):Ee(e)}function xe(){if(M.size===0)return;let e=M.shift();try{let t=x?.messageStrategy;ee.is(t)?t.handleMessage(e,be):be(e)}finally{ye()}}let Se=e=>{try{if(r.Message.isNotification(e)&&e.method===s.type.method){let t=e.params.id,n=le(t),i=M.get(n);if(r.Message.isRequest(i)){let r=x?.connectionStrategy,a=r&&r.cancelUndispatched?r.cancelUndispatched(i,fe):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){M.delete(n),F.delete(t),a.id=i.id,Ae(a,e.method,Date.now()),v.write(a).catch(()=>S.error(`Sending response for canceled message failed.`));return}}let a=F.get(t);if(a!==void 0){a.cancel(),Me(e);return}P.add(t)}B(M,e)}finally{ye()}};function Ce(e){if(he())return;function t(t,n,i){let a={jsonrpc:`2.0`,id:e.id};t instanceof r.ResponseError?a.error=t.toJson():a.result=t===void 0?null:t,Ae(a,n,i),v.write(a).catch(()=>S.error(`Sending response failed.`))}function i(t,n,r){let i={jsonrpc:`2.0`,id:e.id,error:t.toJson()};Ae(i,n,r),v.write(i).catch(()=>S.error(`Sending response failed.`))}function a(t,n,r){t===void 0&&(t=null);let i={jsonrpc:`2.0`,id:e.id,result:t};Ae(i,n,r),v.write(i).catch(()=>S.error(`Sending response failed.`))}je(e);let o=D.get(e.method),s,c;o&&(s=o.type,c=o.handler);let l=Date.now();if(c||E){let o=e.id??String(Date.now()),u=y.is(ce.receiver)?ce.receiver.createCancellationTokenSource(o):ce.receiver.createCancellationTokenSource(e);e.id!==null&&P.has(e.id)&&u.cancel(),e.id!==null&&F.set(o,u);try{let d;if(c){if(e.params===void 0){if(s!==void 0&&s.numberOfParams!==0){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${s.numberOfParams} params but received none.`),e.method,l);return}d=c(u.token)}else if(Array.isArray(e.params)){if(s!==void 0&&s.parameterStructures===r.ParameterStructures.byName){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);return}d=c(...e.params,u.token)}else{if(s!==void 0&&s.parameterStructures===r.ParameterStructures.byPosition){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);return}d=c(e.params,u.token)}}else E&&(d=E(e.method,e.params,u.token));let f=d;d?f.then?f.then(n=>{F.delete(o),t(n,e.method,l)},t=>{F.delete(o),t instanceof r.ResponseError?i(t,e.method,l):t&&n.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}):(F.delete(o),t(d,e.method,l)):(F.delete(o),a(d,e.method,l))}catch(a){F.delete(o),a instanceof r.ResponseError?t(a,e.method,l):a&&n.string(a.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${a.message}`),e.method,l):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}function we(e){if(!he()){if(e.id===null)e.error?S.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):S.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=N.get(t);if(Ne(e,n),n!==void 0){N.delete(t);try{if(e.error){let t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else if(e.result!==void 0)n.resolve(e.result);else throw Error(`Should never happen.`)}catch(e){e.message?S.error(`Response handler '${n.method}' failed with message: ${e.message}`):S.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}}function Te(e){if(he())return;let t,n;if(e.method===s.type.method){let t=e.params.id;P.delete(t),Me(e);return}{let r=te.get(e.method);r&&(n=r.handler,t=r.type)}if(n||O)try{if(Me(e),n){if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){let i=e.params;e.method===l.type.method&&i.length===2&&c.is(i[0])?n({token:i[0],value:i[1]}):(t!==void 0&&(t.parameterStructures===r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else t!==void 0&&t.parameterStructures===r.ParameterStructures.byPosition&&S.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params)}else O&&O(e.method,e.params)}catch(t){t.message?S.error(`Notification handler '${e.method}' failed with message: ${t.message}`):S.error(`Notification handler '${e.method}' failed unexpectedly.`)}else ae.fire(e)}function Ee(e){if(!e){S.error(`Received empty message.`);return}S.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(n.string(t.id)||n.number(t.id)){let e=t.id,n=N.get(e);n&&n.reject(/* @__PURE__ */ Error(`The received response has neither a result nor an error property.`))}}function De(e){if(e!=null)switch(I){case d.Verbose:return JSON.stringify(e,null,4);case d.Compact:return JSON.stringify(e);default:return}}function Oe(e){if(I!==d.Off&&L){if(re===p.Text){let t;(I===d.Verbose||I===d.Compact)&&e.params&&(t=`Params: ${De(e.params)}\n\n`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Pe(`send-request`,e)}}function ke(e){if(I!==d.Off&&L){if(re===p.Text){let t;(I===d.Verbose||I===d.Compact)&&(t=e.params?`Params: ${De(e.params)}\n\n`:`No parameters provided.
|
|
981
|
+
|
|
982
|
+
`),L.log(`Sending notification '${e.method}'.`,t)}else Pe(`send-notification`,e)}}function Ae(e,t,n){if(I!==d.Off&&L){if(re===p.Text){let r;(I===d.Verbose||I===d.Compact)&&(e.error&&e.error.data?r=`Error data: ${De(e.error.data)}\n\n`:e.result?r=`Result: ${De(e.result)}\n\n`:e.error===void 0&&(r=`No result returned.
|
|
983
|
+
|
|
984
|
+
`)),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Pe(`send-response`,e)}}function je(e){if(I!==d.Off&&L){if(re===p.Text){let t;(I===d.Verbose||I===d.Compact)&&e.params&&(t=`Params: ${De(e.params)}\n\n`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else Pe(`receive-request`,e)}}function Me(e){if(I!==d.Off&&L&&e.method!==h.type.method){if(re===p.Text){let t;(I===d.Verbose||I===d.Compact)&&(t=e.params?`Params: ${De(e.params)}\n\n`:`No parameters provided.
|
|
985
|
+
|
|
986
|
+
`),L.log(`Received notification '${e.method}'.`,t)}else Pe(`receive-notification`,e)}}function Ne(e,t){if(I!==d.Off&&L){if(re===p.Text){let n;if((I===d.Verbose||I===d.Compact)&&(e.error&&e.error.data?n=`Error data: ${De(e.error.data)}\n\n`:e.result?n=`Result: ${De(e.result)}\n\n`:e.error===void 0&&(n=`No result returned.
|
|
987
|
+
|
|
988
|
+
`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else L.log(`Received response ${e.id} without active response promise.`,n)}else Pe(`receive-response`,e)}}function Pe(e,t){if(!L||I===d.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(n)}function Fe(){if(me())throw new _(g.Closed,`Connection is closed.`);if(he())throw new _(g.Disposed,`Connection is disposed.`)}function Ie(){if(pe())throw new _(g.AlreadyListening,`Connection is already listening`)}function Le(){if(!pe())throw Error(`Call listen() first.`)}function Re(e){return e===void 0?null:e}function ze(e){if(e!==null)return e}function Be(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}function Ve(e,t){switch(e){case r.ParameterStructures.auto:return Be(t)?ze(t):[Re(t)];case r.ParameterStructures.byName:if(!Be(t))throw Error(`Received parameters by name but param is not an object literal.`);return ze(t);case r.ParameterStructures.byPosition:return[Re(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}function He(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=Ve(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(Re(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}let Ue={sendNotification:(e,...t)=>{Fe();let i,a;if(n.string(e)){i=e;let n=t[0],o=0,s=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,s=n);let c=t.length,l=c-o;switch(l){case 0:a=void 0;break;case 1:a=Ve(s,t[o]);break;default:if(s===r.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);a=t.slice(o,c).map(e=>Re(e))}}else{let n=t;i=e.method,a=He(e,n)}let o={jsonrpc:`2.0`,method:i,params:a};return ke(o),v.write(o).catch(e=>{throw S.error(`Sending notification failed.`),e})},onNotification:(e,t)=>{Fe();let r;return n.func(e)?O=e:t&&(n.string(e)?(r=e,te.set(e,{type:void 0,handler:t})):(r=e.method,te.set(e.method,{type:e,handler:t}))),{dispose:()=>{r===void 0?O=void 0:te.delete(r)}}},onProgress:(e,t,n)=>{if(j.has(t))throw Error(`Progress handler for token ${t} already registered`);return j.set(t,n),{dispose:()=>{j.delete(t)}}},sendProgress:(e,t,n)=>Ue.sendNotification(l.type,{token:t,value:n}),onUnhandledProgress:oe.event,sendRequest:(e,...t)=>{Fe(),Le();let i,a,s;if(n.string(e)){i=e;let n=t[0],c=t[t.length-1],l=0,u=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;o.CancellationToken.is(c)&&(--d,s=c);let f=d-l;switch(f){case 0:a=void 0;break;case 1:a=Ve(u,t[l]);break;default:if(u===r.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(l,d).map(e=>Re(e))}}else{let n=t;i=e.method,a=He(e,n);let r=e.numberOfParams;s=o.CancellationToken.is(n[r])?n[r]:void 0}let c=C++,l;s&&(l=s.onCancellationRequested(()=>{let e=ce.sender.sendCancellation(Ue,c);return e===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${c}`),Promise.resolve()):e.catch(()=>{S.log(`Sending cancellation messages for id ${c} failed`)})}));let u={jsonrpc:`2.0`,id:c,method:i,params:a};return Oe(u),typeof ce.sender.enableCancellation==`function`&&ce.sender.enableCancellation(u),new Promise(async(e,t)=>{let n={method:i,timerStart:Date.now(),resolve:t=>{e(t),ce.sender.cleanup(c),l?.dispose()},reject:e=>{t(e),ce.sender.cleanup(c),l?.dispose()}};try{await v.write(u),N.set(c,n)}catch(e){throw S.error(`Sending request failed.`),n.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},onRequest:(e,t)=>{Fe();let r=null;return u.is(e)?(r=void 0,E=e):n.string(e)?(r=null,t!==void 0&&(r=e,D.set(e,{handler:t,type:void 0}))):t!==void 0&&(r=e.method,D.set(e.method,{type:e,handler:t})),{dispose:()=>{r!==null&&(r===void 0?E=void 0:D.delete(r))}}},hasPendingResponse:()=>N.size>0,trace:async(e,t,r)=>{let i=!1,a=p.Text;r!==void 0&&(n.boolean(r)?i=r:(i=r.sendNotification||!1,a=r.traceFormat||p.Text)),I=e,re=a,L=I===d.Off?void 0:t,i&&!me()&&!he()&&await Ue.sendNotification(m.type,{value:d.toString(e)})},onError:z.event,onClose:ie.event,onUnhandledNotification:ae.event,onDispose:se.event,end:()=>{v.end()},dispose:()=>{if(he())return;R=A.Disposed,se.fire(void 0);let e=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of N.values())t.reject(e);N=/* @__PURE__ */ new Map,F=/* @__PURE__ */ new Map,P=/* @__PURE__ */ new Set,M=new i.LinkedMap,n.func(v.dispose)&&v.dispose(),n.func(f.dispose)&&f.dispose()},listen:()=>{Fe(),Ie(),R=A.Listening,f.listen(Se)},inspect:()=>{(0,t.default)().console.log(`inspect`)}};return Ue.onNotification(h.type,e=>{if(I===d.Off||!L)return;let t=I===d.Verbose||I===d.Compact;L.log(e.message,t?e.verbose:void 0)}),Ue.onNotification(l.type,e=>{let t=j.get(e.token);t?t(e.value):oe.fire(e)}),Ue}e.createMessageConnection=j})),j=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;let t=x();Object.defineProperty(e,"Message",{enumerable:!0,get:function(){return t.Message}}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:function(){return t.RequestType}}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:function(){return t.RequestType0}}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:function(){return t.RequestType1}}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:function(){return t.RequestType2}}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:function(){return t.RequestType3}}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:function(){return t.RequestType4}}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:function(){return t.RequestType5}}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:function(){return t.RequestType6}}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:function(){return t.RequestType7}}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:function(){return t.RequestType8}}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:function(){return t.RequestType9}}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:function(){return t.ResponseError}}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return t.ErrorCodes}}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:function(){return t.NotificationType}}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:function(){return t.NotificationType0}}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:function(){return t.NotificationType1}}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:function(){return t.NotificationType2}}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:function(){return t.NotificationType3}}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:function(){return t.NotificationType4}}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:function(){return t.NotificationType5}}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:function(){return t.NotificationType6}}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:function(){return t.NotificationType7}}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:function(){return t.NotificationType8}}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:function(){return t.NotificationType9}}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:function(){return t.ParameterStructures}});let n=S();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:function(){return n.LinkedMap}}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:function(){return n.LRUCache}}),Object.defineProperty(e,"Touch",{enumerable:!0,get:function(){return n.Touch}});let r=C();Object.defineProperty(e,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});let i=T();Object.defineProperty(e,"Event",{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:function(){return i.Emitter}});let a=E();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});let o=D();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return o.SharedArraySenderStrategy}}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return o.SharedArrayReceiverStrategy}});let s=k();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:function(){return s.MessageReader}}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:function(){return s.AbstractMessageReader}}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return s.ReadableStreamMessageReader}});let c=ee();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:function(){return c.MessageWriter}}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:function(){return c.AbstractMessageWriter}}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return c.WriteableStreamMessageWriter}});let l=te();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:function(){return l.AbstractMessageBuffer}});let u=A();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:function(){return u.ConnectionStrategy}}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:function(){return u.ConnectionOptions}}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:function(){return u.NullLogger}}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:function(){return u.createMessageConnection}}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:function(){return u.ProgressToken}}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:function(){return u.ProgressType}}),Object.defineProperty(e,"Trace",{enumerable:!0,get:function(){return u.Trace}}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:function(){return u.TraceValues}}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:function(){return u.TraceFormat}}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:function(){return u.SetTraceNotification}}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:function(){return u.LogTraceNotification}}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:function(){return u.ConnectionErrors}}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:function(){return u.ConnectionError}}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return u.CancellationReceiverStrategy}}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:function(){return u.CancellationSenderStrategy}}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:function(){return u.CancellationStrategy}}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:function(){return u.MessageStrategy}}),e.RAL=w().default})),ne=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=j();var n=class e extends t.AbstractMessageBuffer{constructor(e=`utf-8`){super(e),this.asciiDecoder=new TextDecoder(`ascii`)}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t===`ascii`?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};n.emptyBuffer=/* @__PURE__ */ new Uint8Array;var r=class{constructor(e){this.socket=e,this._onData=new t.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,t.RAL)().console.error(`Converting blob to array buffer failed.`)})},this.socket.addEventListener(`message`,this._messageListener)}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}onData(e){return this._onData.event(e)}},i=class{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}write(e,t){if(typeof e==`string`){if(t!==void 0&&t!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}};let a=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:e=>new n(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:(e,t)=>{if(t.charset!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:`application/json`,decode:(e,t)=>{if(!(e instanceof Uint8Array))throw Error(`In a Browser environments only Uint8Arrays are supported.`);return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new r(e),asWritableStream:e=>new i(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function s(){return o}(function(e){function n(){t.RAL.install(o)}e.install=n})(s||={}),e.default=s})),M=/* @__PURE__ */ s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,ne().default.install();let r=j();n(j(),e),e.BrowserMessageReader=class extends r.AbstractMessageReader{constructor(e){super(),this._onData=new r.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener(`error`,e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},e.BrowserMessageWriter=class extends r.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function i(e,t,n,i){return n===void 0&&(n=r.NullLogger),r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}e.createMessageConnection=i})),N=/* @__PURE__ */ s(((e,t)=>{t.exports=M()})),P=/* @__PURE__ */ c({AnnotatedTextEdit:()=>ye,ChangeAnnotation:()=>_e,ChangeAnnotationIdentifier:()=>ve,CodeAction:()=>nt,CodeActionContext:()=>tt,CodeActionKind:()=>$e,CodeActionTriggerKind:()=>et,CodeDescription:()=>pe,CodeLens:()=>rt,Color:()=>oe,ColorInformation:()=>se,ColorPresentation:()=>ce,Command:()=>he,CompletionItem:()=>Be,CompletionItemKind:()=>Pe,CompletionItemLabelDetails:()=>ze,CompletionItemTag:()=>Ie,CompletionList:()=>Ve,CreateFile:()=>xe,DeleteFile:()=>Ce,Diagnostic:()=>me,DiagnosticRelatedInformation:()=>de,DiagnosticSeverity:()=>B,DiagnosticTag:()=>fe,DocumentHighlight:()=>qe,DocumentHighlightKind:()=>Ke,DocumentLink:()=>at,DocumentSymbol:()=>Qe,DocumentUri:()=>F,EOL:()=>wt,FoldingRange:()=>ue,FoldingRangeKind:()=>le,FormattingOptions:()=>it,Hover:()=>Ue,InlayHint:()=>gt,InlayHintKind:()=>mt,InlayHintLabelPart:()=>ht,InlineCompletionContext:()=>St,InlineCompletionItem:()=>vt,InlineCompletionList:()=>yt,InlineCompletionTriggerKind:()=>bt,InlineValueContext:()=>pt,InlineValueEvaluatableExpression:()=>ft,InlineValueText:()=>ut,InlineValueVariableLookup:()=>dt,InsertReplaceEdit:()=>Le,InsertTextFormat:()=>Fe,InsertTextMode:()=>Re,Location:()=>ie,LocationLink:()=>ae,MarkedString:()=>He,MarkupContent:()=>Ne,MarkupKind:()=>Me,OptionalVersionedTextDocumentIdentifier:()=>Ae,ParameterInformation:()=>We,Position:()=>R,Range:()=>z,RenameFile:()=>Se,SelectedCompletionInfo:()=>xt,SelectionRange:()=>ot,SemanticTokenModifiers:()=>ct,SemanticTokenTypes:()=>st,SemanticTokens:()=>lt,SignatureInformation:()=>Ge,StringValue:()=>_t,SymbolInformation:()=>Xe,SymbolKind:()=>Je,SymbolTag:()=>Ye,TextDocument:()=>Tt,TextDocumentEdit:()=>be,TextDocumentIdentifier:()=>Oe,TextDocumentItem:()=>je,TextEdit:()=>ge,URI:()=>I,VersionedTextDocumentIdentifier:()=>ke,WorkspaceChange:()=>De,WorkspaceEdit:()=>we,WorkspaceFolder:()=>Ct,WorkspaceSymbol:()=>Ze,integer:()=>re,uinteger:()=>L}),F,I,re,L,R,z,ie,ae,oe,se,ce,le,ue,de,B,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,V,Dt=o((()=>{(function(e){function t(e){return typeof e==`string`}e.is=t})(F||={}),(function(e){function t(e){return typeof e==`string`}e.is=t})(I||={}),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(re||={}),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(L||={}),(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=L.MAX_VALUE),t===Number.MAX_VALUE&&(t=L.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.uinteger(t.line)&&V.uinteger(t.character)}e.is=n})(R||={}),(function(e){function t(e,t,n,r){if(V.uinteger(e)&&V.uinteger(t)&&V.uinteger(n)&&V.uinteger(r))return{start:R.create(e,t),end:R.create(n,r)};if(R.is(e)&&R.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&R.is(t.start)&&R.is(t.end)}e.is=n})(z||={}),(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&z.is(t.range)&&(V.string(t.uri)||V.undefined(t.uri))}e.is=n})(ie||={}),(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&z.is(t.targetRange)&&V.string(t.targetUri)&&z.is(t.targetSelectionRange)&&(z.is(t.originSelectionRange)||V.undefined(t.originSelectionRange))}e.is=n})(ae||={}),(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.numberRange(t.red,0,1)&&V.numberRange(t.green,0,1)&&V.numberRange(t.blue,0,1)&&V.numberRange(t.alpha,0,1)}e.is=n})(oe||={}),(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&z.is(t.range)&&oe.is(t.color)}e.is=n})(se||={}),(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.string(t.label)&&(V.undefined(t.textEdit)||ge.is(t))&&(V.undefined(t.additionalTextEdits)||V.typedArray(t.additionalTextEdits,ge.is))}e.is=n})(ce||={}),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(le||={}),(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return V.defined(n)&&(o.startCharacter=n),V.defined(r)&&(o.endCharacter=r),V.defined(i)&&(o.kind=i),V.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.uinteger(t.startLine)&&V.uinteger(t.startLine)&&(V.undefined(t.startCharacter)||V.uinteger(t.startCharacter))&&(V.undefined(t.endCharacter)||V.uinteger(t.endCharacter))&&(V.undefined(t.kind)||V.string(t.kind))}e.is=n})(ue||={}),(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&ie.is(t.location)&&V.string(t.message)}e.is=n})(de||={}),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(B||={}),(function(e){e.Unnecessary=1,e.Deprecated=2})(fe||={}),(function(e){function t(e){let t=e;return V.objectLiteral(t)&&V.string(t.href)}e.is=t})(pe||={}),(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return V.defined(n)&&(o.severity=n),V.defined(r)&&(o.code=r),V.defined(i)&&(o.source=i),V.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return V.defined(t)&&z.is(t.range)&&V.string(t.message)&&(V.number(t.severity)||V.undefined(t.severity))&&(V.integer(t.code)||V.string(t.code)||V.undefined(t.code))&&(V.undefined(t.codeDescription)||V.string(t.codeDescription?.href))&&(V.string(t.source)||V.undefined(t.source))&&(V.undefined(t.relatedInformation)||V.typedArray(t.relatedInformation,de.is))}e.is=n})(me||={}),(function(e){function t(e,t,...n){let r={title:e,command:t};return V.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.title)&&V.string(t.command)}e.is=n})(he||={}),(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return V.objectLiteral(t)&&V.string(t.newText)&&z.is(t.range)}e.is=i})(ge||={}),(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&V.string(t.label)&&(V.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(V.string(t.description)||t.description===void 0)}e.is=n})(_e||={}),(function(e){function t(e){let t=e;return V.string(t)}e.is=t})(ve||={}),(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return ge.is(t)&&(_e.is(t.annotationId)||ve.is(t.annotationId))}e.is=i})(ye||={}),(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&Ae.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(be||={}),(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&V.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||V.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||V.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||ve.is(t.annotationId))}e.is=n})(xe||={}),(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&V.string(t.oldUri)&&V.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||V.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||V.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||ve.is(t.annotationId))}e.is=n})(Se||={}),(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&V.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||V.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||V.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||ve.is(t.annotationId))}e.is=n})(Ce||={}),(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>V.string(e.kind)?xe.is(e)||Se.is(e)||Ce.is(e):be.is(e)))}e.is=t})(we||={}),Te=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=ge.insert(e,t):ve.is(n)?(i=n,r=ye.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=ye.insert(e,t,i)),this.edits.push(r),i!==void 0)return i}replace(e,t,n){let r,i;if(n===void 0?r=ge.replace(e,t):ve.is(n)?(i=n,r=ye.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=ye.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=ge.del(e):ve.is(t)?(r=t,n=ye.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=ye.del(e,r)),this.edits.push(n),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},Ee=class{constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(ve.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw Error(`Id ${n} is already in use.`);if(t===void 0)throw Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}},De=class{constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ee(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(be.is(e)){let t=new Te(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new Te(e.changes[t]);this._textEditChanges[t]=n}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Ae.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){let e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new Te(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new Te(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ee,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;_e.is(t)||ve.is(t)?r=t:n=t;let i,a;if(r===void 0?i=xe.create(e,n):(a=ve.is(r)?r:this._changeAnnotations.manage(r),i=xe.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let i;_e.is(n)||ve.is(n)?i=n:r=n;let a,o;if(i===void 0?a=Se.create(e,t,r):(o=ve.is(i)?i:this._changeAnnotations.manage(i),a=Se.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;_e.is(t)||ve.is(t)?r=t:n=t;let i,a;if(r===void 0?i=Ce.create(e,n):(a=ve.is(r)?r:this._changeAnnotations.manage(r),i=Ce.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)}e.is=n})(Oe||={}),(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&V.integer(t.version)}e.is=n})(ke||={}),(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&(t.version===null||V.integer(t.version))}e.is=n})(Ae||={}),(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.string(t.uri)&&V.string(t.languageId)&&V.integer(t.version)&&V.string(t.text)}e.is=n})(je||={}),(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(Me||={}),(function(e){function t(e){let t=e;return V.objectLiteral(e)&&Me.is(t.kind)&&V.string(t.value)}e.is=t})(Ne||={}),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Pe||={}),(function(e){e.PlainText=1,e.Snippet=2})(Fe||={}),(function(e){e.Deprecated=1})(Ie||={}),(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&V.string(t.newText)&&z.is(t.insert)&&z.is(t.replace)}e.is=n})(Le||={}),(function(e){e.asIs=1,e.adjustIndentation=2})(Re||={}),(function(e){function t(e){let t=e;return t&&(V.string(t.detail)||t.detail===void 0)&&(V.string(t.description)||t.description===void 0)}e.is=t})(ze||={}),(function(e){function t(e){return{label:e}}e.create=t})(Be||={}),(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(Ve||={}),(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return V.string(t)||V.objectLiteral(t)&&V.string(t.language)&&V.string(t.value)}e.is=n})(He||={}),(function(e){function t(e){let t=e;return!!t&&V.objectLiteral(t)&&(Ne.is(t.contents)||He.is(t.contents)||V.typedArray(t.contents,He.is))&&(e.range===void 0||z.is(e.range))}e.is=t})(Ue||={}),(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(We||={}),(function(e){function t(e,t,...n){let r={label:e};return V.defined(t)&&(r.documentation=t),r.parameters=V.defined(n)?n:[],r}e.create=t})(Ge||={}),(function(e){e.Text=1,e.Read=2,e.Write=3})(Ke||={}),(function(e){function t(e,t){let n={range:e};return V.number(t)&&(n.kind=t),n}e.create=t})(qe||={}),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Je||={}),(function(e){e.Deprecated=1})(Ye||={}),(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(Xe||={}),(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(Ze||={}),(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&V.string(t.name)&&V.number(t.kind)&&z.is(t.range)&&z.is(t.selectionRange)&&(t.detail===void 0||V.string(t.detail))&&(t.deprecated===void 0||V.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(Qe||={}),(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})($e||={}),(function(e){e.Invoked=1,e.Automatic=2})(et||={}),(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return V.defined(t)&&V.typedArray(t.diagnostics,me.is)&&(t.only===void 0||V.typedArray(t.only,V.string))&&(t.triggerKind===void 0||t.triggerKind===et.Invoked||t.triggerKind===et.Automatic)}e.is=n})(tt||={}),(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):he.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&V.string(t.title)&&(t.diagnostics===void 0||V.typedArray(t.diagnostics,me.is))&&(t.kind===void 0||V.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||he.is(t.command))&&(t.isPreferred===void 0||V.boolean(t.isPreferred))&&(t.edit===void 0||we.is(t.edit))}e.is=n})(nt||={}),(function(e){function t(e,t){let n={range:e};return V.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return V.defined(t)&&z.is(t.range)&&(V.undefined(t.command)||he.is(t.command))}e.is=n})(rt||={}),(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&V.uinteger(t.tabSize)&&V.boolean(t.insertSpaces)}e.is=n})(it||={}),(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return V.defined(t)&&z.is(t.range)&&(V.undefined(t.target)||V.string(t.target))}e.is=n})(at||={}),(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return V.objectLiteral(n)&&z.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(ot||={}),(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(st||={}),(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(ct||={}),(function(e){function t(e){let t=e;return V.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(lt||={}),(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&z.is(t.range)&&V.string(t.text)}e.is=n})(ut||={}),(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&z.is(t.range)&&V.boolean(t.caseSensitiveLookup)&&(V.string(t.variableName)||t.variableName===void 0)}e.is=n})(dt||={}),(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&z.is(t.range)&&(V.string(t.expression)||t.expression===void 0)}e.is=n})(ft||={}),(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return V.defined(t)&&z.is(e.stoppedLocation)}e.is=n})(pt||={}),(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(mt||={}),(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&(t.tooltip===void 0||V.string(t.tooltip)||Ne.is(t.tooltip))&&(t.location===void 0||ie.is(t.location))&&(t.command===void 0||he.is(t.command))}e.is=n})(ht||={}),(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return V.objectLiteral(t)&&R.is(t.position)&&(V.string(t.label)||V.typedArray(t.label,ht.is))&&(t.kind===void 0||mt.is(t.kind))&&t.textEdits===void 0||V.typedArray(t.textEdits,ge.is)&&(t.tooltip===void 0||V.string(t.tooltip)||Ne.is(t.tooltip))&&(t.paddingLeft===void 0||V.boolean(t.paddingLeft))&&(t.paddingRight===void 0||V.boolean(t.paddingRight))}e.is=n})(gt||={}),(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(_t||={}),(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(vt||={}),(function(e){function t(e){return{items:e}}e.create=t})(yt||={}),(function(e){e.Invoked=0,e.Automatic=1})(bt||={}),(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(xt||={}),(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(St||={}),(function(e){function t(e){let t=e;return V.objectLiteral(t)&&I.is(t.uri)&&V.string(t.name)}e.is=t})(Ct||={}),wt=[`
|
|
989
|
+
`,`\r
|
|
990
|
+
`,`\r`],(function(e){function t(e,t,n,r){return new Et(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(V.defined(t)&&V.string(t.uri)&&(V.undefined(t.languageId)||V.string(t.languageId))&&V.uinteger(t.lineCount)&&V.func(t.getText)&&V.func(t.positionAt)&&V.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(Tt||={}),Et=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
|
|
991
|
+
`,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
|
|
992
|
+
`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return R.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return R.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}e.defined=n;function r(e){return e===void 0}e.undefined=r;function i(e){return e===!0||e===!1}e.boolean=i;function a(e){return t.call(e)===`[object String]`}e.string=a;function o(e){return t.call(e)===`[object Number]`}e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}e.numberRange=s;function c(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)===`[object Function]`}e.func=u;function d(e){return typeof e==`object`&&!!e}e.objectLiteral=d;function f(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=f})(V||={})})),Ot=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;let t=M();var n;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(n||(e.MessageDirection=n={})),e.RegistrationType=class{constructor(e){this.method=e}},e.ProtocolRequestType0=class extends t.RequestType0{constructor(e){super(e)}},e.ProtocolRequestType=class extends t.RequestType{constructor(e){super(e,t.ParameterStructures.byName)}},e.ProtocolNotificationType0=class extends t.NotificationType0{constructor(e){super(e)}},e.ProtocolNotificationType=class extends t.NotificationType{constructor(e){super(e,t.ParameterStructures.byName)}}})),kt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}e.string=n;function r(e){return typeof e==`number`||e instanceof Number}e.number=r;function i(e){return e instanceof Error}e.error=i;function a(e){return typeof e==`function`}e.func=a;function o(e){return Array.isArray(e)}e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}e.stringArray=s;function c(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=c;function l(e){return typeof e==`object`&&!!e}e.objectLiteral=l})),At=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))})),jt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))})),Mt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;let t=Ot();var n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))})),Nt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;let t=Ot();var n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))})),Pt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))})),Ft=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))})),It=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))})),Lt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))})),Rt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;let t=M(),n=Ot();var r;(function(e){e.type=new t.ProgressType;function n(t){return t===e.type}e.is=n})(r||(e.WorkDoneProgress=r={}));var i;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))})),zt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))})),Bt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;let t=Ot();var n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))})),Vt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;let t=Ot();var n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))})),Ht=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))})),Ut=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;let t=Ot();var n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var c;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(c||(e.WillDeleteFilesRequest=c={}))})),Wt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;let t=Ot();var n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))})),Gt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))})),Kt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))})),qt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))})),Jt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;let t=M(),n=kt(),r=Ot();var i;(function(e){function t(e){let t=e;return t&&n.boolean(t.retriggerRequest)}e.is=t})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(a||(e.DocumentDiagnosticReportKind=a={}));var o;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(o||(e.DocumentDiagnosticRequest=o={}));var s;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(s||(e.WorkspaceDiagnosticRequest=s={}));var c;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)})(c||(e.DiagnosticRefreshRequest=c={}))})),Yt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;let t=(Dt(),d(P)),n=kt(),r=Ot();var i;(function(e){e.Markup=1,e.Code=2;function t(e){return e===1||e===2}e.is=t})(i||(e.NotebookCellKind=i={}));var a;(function(e){function r(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.executionOrder)&&(r.success===void 0||n.boolean(r.success))}e.is=i;function a(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}e.equals=a})(a||(e.ExecutionSummary=a={}));var o;(function(e){function r(e,t){return{kind:e,document:t}}e.create=r;function o(e){let r=e;return n.objectLiteral(r)&&i.is(r.kind)&&t.DocumentUri.is(r.document)&&(r.metadata===void 0||n.objectLiteral(r.metadata))}e.is=o;function s(e,t){let n=/* @__PURE__ */ new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!c(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!a.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}e.diff=s;function c(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!c(e[n],t[n]))return!1}if(n.objectLiteral(e)&&n.objectLiteral(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||(n.sort(),r.sort(),!c(n,r)))return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!c(e[i],t[i]))return!1}}return!0}})(o||(e.NotebookCell=o={}));var s;(function(e){function r(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}}e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&n.string(r.uri)&&t.integer.is(r.version)&&n.typedArray(r.cells,o.is)}e.is=i})(s||(e.NotebookDocument=s={}));var c;(function(e){e.method=`notebookDocument/sync`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.RegistrationType(e.method)})(c||(e.NotebookDocumentSyncRegistrationType=c={}));var l;(function(e){e.method=`notebookDocument/didOpen`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=c.method})(l||(e.DidOpenNotebookDocumentNotification=l={}));var u;(function(e){function r(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.start)&&t.uinteger.is(r.deleteCount)&&(r.cells===void 0||n.typedArray(r.cells,o.is))}e.is=r;function i(e,t,n){let r={start:e,deleteCount:t};return n!==void 0&&(r.cells=n),r}e.create=i})(u||(e.NotebookCellArrayChange=u={}));var f;(function(e){e.method=`notebookDocument/didChange`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=c.method})(f||(e.DidChangeNotebookDocumentNotification=f={}));var p;(function(e){e.method=`notebookDocument/didSave`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=c.method})(p||(e.DidSaveNotebookDocumentNotification=p={}));var m;(function(e){e.method=`notebookDocument/didClose`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=c.method})(m||(e.DidCloseNotebookDocumentNotification=m={}))})),Xt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;let t=Ot();var n;(function(e){e.method=`textDocument/inlineCompletion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineCompletionRequest=n={}))})),Zt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;let t=Ot(),n=(Dt(),d(P)),r=kt(),i=At();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:function(){return i.ImplementationRequest}});let a=jt();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});let o=Mt();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return o.WorkspaceFoldersRequest}}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return o.DidChangeWorkspaceFoldersNotification}});let s=Nt();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:function(){return s.ConfigurationRequest}});let c=Pt();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:function(){return c.DocumentColorRequest}}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:function(){return c.ColorPresentationRequest}});let l=Ft();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:function(){return l.FoldingRangeRequest}}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return l.FoldingRangeRefreshRequest}});let u=It();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:function(){return u.DeclarationRequest}});let f=Lt();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});let p=Rt();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});let m=zt();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});let h=Bt();Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:function(){return h.TokenFormat}}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:function(){return h.SemanticTokensRequest}}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return h.SemanticTokensDeltaRequest}}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return h.SemanticTokensRangeRequest}}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return h.SemanticTokensRefreshRequest}}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return h.SemanticTokensRegistrationType}});let g=Vt();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:function(){return g.ShowDocumentRequest}});let _=Ht();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return _.LinkedEditingRangeRequest}});let v=Ut();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:function(){return v.FileOperationPatternKind}}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:function(){return v.DidCreateFilesNotification}}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:function(){return v.WillCreateFilesRequest}}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:function(){return v.DidRenameFilesNotification}}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:function(){return v.WillRenameFilesRequest}}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return v.DidDeleteFilesNotification}}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return v.WillDeleteFilesRequest}});let y=Wt();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:function(){return y.UniquenessLevel}}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:function(){return y.MonikerKind}}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:function(){return y.MonikerRequest}});let b=Gt();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return b.TypeHierarchyPrepareRequest}}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySubtypesRequest}}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySupertypesRequest}});let x=Kt();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:function(){return x.InlineValueRequest}}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return x.InlineValueRefreshRequest}});let S=qt();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:function(){return S.InlayHintRequest}}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:function(){return S.InlayHintResolveRequest}}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return S.InlayHintRefreshRequest}});let C=Jt();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return C.DiagnosticServerCancellationData}}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return C.DocumentDiagnosticReportKind}}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return C.DocumentDiagnosticRequest}}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return C.WorkspaceDiagnosticRequest}}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return C.DiagnosticRefreshRequest}});let w=Yt();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:function(){return w.NotebookCellKind}}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:function(){return w.ExecutionSummary}}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:function(){return w.NotebookCell}}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:function(){return w.NotebookDocument}}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return w.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return w.DidOpenNotebookDocumentNotification}}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:function(){return w.NotebookCellArrayChange}}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return w.DidChangeNotebookDocumentNotification}}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return w.DidSaveNotebookDocumentNotification}}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return w.DidCloseNotebookDocumentNotification}});let T=Xt();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:function(){return T.InlineCompletionRequest}});var E;(function(e){function t(e){let t=e;return r.string(t)||r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}e.is=t})(E||(e.TextDocumentFilter=E={}));var D;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebookType)||r.string(t.scheme)||r.string(t.pattern))}e.is=t})(D||(e.NotebookDocumentFilter=D={}));var O;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebook)||D.is(t.notebook))&&(t.language===void 0||r.string(t.language))}e.is=t})(O||(e.NotebookCellTextDocumentFilter=O={}));var k;(function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!E.is(t)&&!O.is(t))return!1;return!0}e.is=t})(k||(e.DocumentSelector=k={}));var ee;(function(e){e.method=`client/registerCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(ee||(e.RegistrationRequest=ee={}));var te;(function(e){e.method=`client/unregisterCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(te||(e.UnregistrationRequest=te={}));var A;(function(e){e.Create=`create`,e.Rename=`rename`,e.Delete=`delete`})(A||(e.ResourceOperationKind=A={}));var j;(function(e){e.Abort=`abort`,e.Transactional=`transactional`,e.TextOnlyTransactional=`textOnlyTransactional`,e.Undo=`undo`})(j||(e.FailureHandlingKind=j={}));var ne;(function(e){e.UTF8=`utf-8`,e.UTF16=`utf-16`,e.UTF32=`utf-32`})(ne||(e.PositionEncodingKind=ne={}));var M;(function(e){function t(e){let t=e;return t&&r.string(t.id)&&t.id.length>0}e.hasId=t})(M||(e.StaticRegistrationOptions=M={}));var N;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||k.is(t.documentSelector))}e.is=t})(N||(e.TextDocumentRegistrationOptions=N={}));var F;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(t.workDoneProgress===void 0||r.boolean(t.workDoneProgress))}e.is=t;function n(e){let t=e;return t&&r.boolean(t.workDoneProgress)}e.hasWorkDoneProgress=n})(F||(e.WorkDoneProgressOptions=F={}));var I;(function(e){e.method=`initialize`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(I||(e.InitializeRequest=I={}));var re;(function(e){e.unknownProtocolVersion=1})(re||(e.InitializeErrorCodes=re={}));var L;(function(e){e.method=`initialized`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(L||(e.InitializedNotification=L={}));var R;(function(e){e.method=`shutdown`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType0(e.method)})(R||(e.ShutdownRequest=R={}));var z;(function(e){e.method=`exit`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType0(e.method)})(z||(e.ExitNotification=z={}));var ie;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ie||(e.DidChangeConfigurationNotification=ie={}));var ae;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ae||(e.MessageType=ae={}));var oe;(function(e){e.method=`window/showMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(oe||(e.ShowMessageNotification=oe={}));var se;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(se||(e.ShowMessageRequest=se={}));var ce;(function(e){e.method=`window/logMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(ce||(e.LogMessageNotification=ce={}));var le;(function(e){e.method=`telemetry/event`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(le||(e.TelemetryEventNotification=le={}));var ue;(function(e){e.None=0,e.Full=1,e.Incremental=2})(ue||(e.TextDocumentSyncKind=ue={}));var de;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(de||(e.DidOpenTextDocumentNotification=de={}));var B;(function(e){function t(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}e.isIncremental=t;function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}e.isFull=n})(B||(e.TextDocumentContentChangeEvent=B={}));var fe;(function(e){e.method=`textDocument/didChange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(fe||(e.DidChangeTextDocumentNotification=fe={}));var pe;(function(e){e.method=`textDocument/didClose`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(pe||(e.DidCloseTextDocumentNotification=pe={}));var me;(function(e){e.method=`textDocument/didSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(me||(e.DidSaveTextDocumentNotification=me={}));var he;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(he||(e.TextDocumentSaveReason=he={}));var ge;(function(e){e.method=`textDocument/willSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ge||(e.WillSaveTextDocumentNotification=ge={}));var _e;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(_e||(e.WillSaveTextDocumentWaitUntilRequest=_e={}));var ve;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ve||(e.DidChangeWatchedFilesNotification=ve={}));var ye;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ye||(e.FileChangeType=ye={}));var be;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(n.URI.is(t.baseUri)||n.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}e.is=t})(be||(e.RelativePattern=be={}));var xe;(function(e){e.Create=1,e.Change=2,e.Delete=4})(xe||(e.WatchKind=xe={}));var Se;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(Se||(e.PublishDiagnosticsNotification=Se={}));var Ce;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Ce||(e.CompletionTriggerKind=Ce={}));var we;(function(e){e.method=`textDocument/completion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(we||(e.CompletionRequest=we={}));var Te;(function(e){e.method=`completionItem/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Te||(e.CompletionResolveRequest=Te={}));var Ee;(function(e){e.method=`textDocument/hover`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ee||(e.HoverRequest=Ee={}));var De;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(De||(e.SignatureHelpTriggerKind=De={}));var Oe;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Oe||(e.SignatureHelpRequest=Oe={}));var ke;(function(e){e.method=`textDocument/definition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ke||(e.DefinitionRequest=ke={}));var Ae;(function(e){e.method=`textDocument/references`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ae||(e.ReferencesRequest=Ae={}));var je;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(je||(e.DocumentHighlightRequest=je={}));var Me;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Me||(e.DocumentSymbolRequest=Me={}));var Ne;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ne||(e.CodeActionRequest=Ne={}));var Pe;(function(e){e.method=`codeAction/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Pe||(e.CodeActionResolveRequest=Pe={}));var Fe;(function(e){e.method=`workspace/symbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Fe||(e.WorkspaceSymbolRequest=Fe={}));var Ie;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ie||(e.WorkspaceSymbolResolveRequest=Ie={}));var Le;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Le||(e.CodeLensRequest=Le={}));var Re;(function(e){e.method=`codeLens/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Re||(e.CodeLensResolveRequest=Re={}));var ze;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(ze||(e.CodeLensRefreshRequest=ze={}));var Be;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Be||(e.DocumentLinkRequest=Be={}));var Ve;(function(e){e.method=`documentLink/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ve||(e.DocumentLinkResolveRequest=Ve={}));var He;(function(e){e.method=`textDocument/formatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(He||(e.DocumentFormattingRequest=He={}));var Ue;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ue||(e.DocumentRangeFormattingRequest=Ue={}));var We;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(We||(e.DocumentRangesFormattingRequest=We={}));var Ge;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ge||(e.DocumentOnTypeFormattingRequest=Ge={}));var Ke;(function(e){e.Identifier=1})(Ke||(e.PrepareSupportDefaultBehavior=Ke={}));var qe;(function(e){e.method=`textDocument/rename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(qe||(e.RenameRequest=qe={}));var Je;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Je||(e.PrepareRenameRequest=Je={}));var Ye;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ye||(e.ExecuteCommandRequest=Ye={}));var Xe;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(`workspace/applyEdit`)})(Xe||(e.ApplyWorkspaceEditRequest=Xe={}))})),Qt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;let t=M();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}e.createProtocolConnection=n})),$t=/* @__PURE__ */ s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,n(M(),e),n((Dt(),d(P)),e),n(Ot(),e),n(Zt(),e);var r=Qt();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:function(){return r.createProtocolConnection}});var i;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))})),en=/* @__PURE__ */ s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;let r=N();n(N(),e),n($t(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}e.createProtocolConnection=i})),tn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensBuilder=e.SemanticTokensDiff=e.SemanticTokensFeature=void 0;let t=en();e.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(t.SemanticTokensRefreshRequest.type),on:e=>{let n=t.SemanticTokensRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))},onDelta:e=>{let n=t.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))},onRange:e=>{let n=t.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))}}}};var n=class{constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){let e=this.originalSequence.length,t=this.modifiedSequence.length,n=0;for(;n<t&&n<e&&this.originalSequence[n]===this.modifiedSequence[n];)n++;if(n<t&&n<e){let r=e-1,i=t-1;for(;r>=n&&i>=n&&this.originalSequence[r]===this.modifiedSequence[i];)r--,i--;(r<n||i<n)&&(r++,i++);let a=r-n+1,o=this.modifiedSequence.slice(n,i+1);return o.length===1&&o[0]===this.originalSequence[r]?[{start:n,deleteCount:a-1}]:[{start:n,deleteCount:a,data:o}]}return n<t?[{start:n,deleteCount:0,data:this.modifiedSequence.slice(n)}]:n<e?[{start:n,deleteCount:e-n}]:[]}};e.SemanticTokensDiff=n,e.SemanticTokensBuilder=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(e,t,n,r,i){let a=e,o=t;this._dataLen>0&&(a-=this._prevLine,a===0&&(o-=this._prevChar)),this._data[this._dataLen++]=a,this._data[this._dataLen++]=o,this._data[this._dataLen++]=n,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData===void 0?this.build():{resultId:this.id,edits:new n(this._prevData,this._data).computeDiff()}}}})),nn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionFeature=void 0;let t=en();e.InlineCompletionFeature=e=>class extends e{get inlineCompletion(){return{on:e=>this.connection.onRequest(t.InlineCompletionRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t)))}}}})),rn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextDocuments=void 0;let t=en();e.TextDocuments=class{constructor(e){this._configuration=e,this._syncedDocuments=/* @__PURE__ */ new Map,this._onDidChangeContent=new t.Emitter,this._onDidOpen=new t.Emitter,this._onDidClose=new t.Emitter,this._onDidSave=new t.Emitter,this._onWillSave=new t.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=t.TextDocumentSyncKind.Incremental;let n=[];return n.push(e.onDidOpenTextDocument(e=>{let t=e.textDocument,n=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,n);let r=Object.freeze({document:n});this._onDidOpen.fire(r),this._onDidChangeContent.fire(r)})),n.push(e.onDidChangeTextDocument(e=>{let t=e.textDocument,n=e.contentChanges;if(n.length===0)return;let{version:r}=t;if(r==null)throw Error(`Received document change event for ${t.uri} without valid version identifier`);let i=this._syncedDocuments.get(t.uri);i!==void 0&&(i=this._configuration.update(i,n,r),this._syncedDocuments.set(t.uri,i),this._onDidChangeContent.fire(Object.freeze({document:i})))})),n.push(e.onDidCloseTextDocument(e=>{let t=this._syncedDocuments.get(e.textDocument.uri);t!==void 0&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))})),n.push(e.onWillSaveTextDocument(e=>{let t=this._syncedDocuments.get(e.textDocument.uri);t!==void 0&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))})),n.push(e.onWillSaveTextDocumentWaitUntil((e,t)=>{let n=this._syncedDocuments.get(e.textDocument.uri);return n!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:n,reason:e.reason}),t):[]})),n.push(e.onDidSaveTextDocument(e=>{let t=this._syncedDocuments.get(e.textDocument.uri);t!==void 0&&this._onDidSave.fire(Object.freeze({document:t}))})),t.Disposable.create(()=>{n.forEach(e=>e.dispose())})}}})),an=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDocuments=e.NotebookSyncFeature=void 0;let t=en(),n=rn();e.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(t.DidOpenNotebookDocumentNotification.type,t=>{e(t)}),onDidChangeNotebookDocument:e=>this.connection.onNotification(t.DidChangeNotebookDocumentNotification.type,t=>{e(t)}),onDidSaveNotebookDocument:e=>this.connection.onNotification(t.DidSaveNotebookDocumentNotification.type,t=>{e(t)}),onDidCloseNotebookDocument:e=>this.connection.onNotification(t.DidCloseNotebookDocumentNotification.type,t=>{e(t)})}}};var r=class e{onDidOpenTextDocument(e){return this.openHandler=e,t.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,t.Disposable.create(()=>{this.changeHandler=e})}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,t.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}};r.NULL_DISPOSE=Object.freeze({dispose:()=>{}}),e.NotebookDocuments=class{constructor(e){this._cellTextDocuments=e instanceof n.TextDocuments?e:new n.TextDocuments(e),this.notebookDocuments=/* @__PURE__ */ new Map,this.notebookCellMap=/* @__PURE__ */ new Map,this._onDidOpen=new t.Emitter,this._onDidChange=new t.Emitter,this._onDidSave=new t.Emitter,this._onDidClose=new t.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){let t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){let t=typeof e==`string`?e:e.document,n=this.notebookCellMap.get(t);return n&&n[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){let n=new r,i=[];return i.push(this.cellTextDocuments.listen(n)),i.push(e.notebooks.synchronization.onDidOpenNotebookDocument(e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(let t of e.cellTextDocuments)n.openTextDocument({textDocument:t});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)})),i.push(e.notebooks.synchronization.onDidChangeNotebookDocument(e=>{let t=this.notebookDocuments.get(e.notebookDocument.uri);if(t===void 0)return;t.version=e.notebookDocument.version;let r=t.metadata,i=!1,a=e.change;a.metadata!==void 0&&(i=!0,t.metadata=a.metadata);let o=[],s=[],c=[],l=[];if(a.cells!==void 0){let e=a.cells;if(e.structure!==void 0){let r=e.structure.array;if(t.cells.splice(r.start,r.deleteCount,...r.cells===void 0?[]:r.cells),e.structure.didOpen!==void 0)for(let t of e.structure.didOpen)n.openTextDocument({textDocument:t}),o.push(t.uri);if(e.structure.didClose)for(let t of e.structure.didClose)n.closeTextDocument({textDocument:t}),s.push(t.uri)}if(e.data!==void 0){let n=new Map(e.data.map(e=>[e.document,e]));for(let e=0;e<=t.cells.length;e++){let r=n.get(t.cells[e].document);if(r!==void 0){let i=t.cells.splice(e,1,r);if(c.push({old:i[0],new:r}),n.delete(r.document),n.size===0)break}}}if(e.textContent!==void 0)for(let t of e.textContent)n.changeTextDocument({textDocument:t.document,contentChanges:t.changes}),l.push(t.document.uri)}this.updateCellMap(t);let u={notebookDocument:t};i&&(u.metadata={old:r,new:t.metadata});let d=[];for(let e of o)d.push(this.getNotebookCell(e));let f=[];for(let e of s)f.push(this.getNotebookCell(e));let p=[];for(let e of l)p.push(this.getNotebookCell(e));(d.length>0||f.length>0||c.length>0||p.length>0)&&(u.cells={added:d,removed:f,changed:{data:c,textContent:p}}),(u.metadata!==void 0||u.cells!==void 0)&&this._onDidChange.fire(u)})),i.push(e.notebooks.synchronization.onDidSaveNotebookDocument(e=>{let t=this.notebookDocuments.get(e.notebookDocument.uri);t!==void 0&&this._onDidSave.fire(t)})),i.push(e.notebooks.synchronization.onDidCloseNotebookDocument(e=>{let t=this.notebookDocuments.get(e.notebookDocument.uri);if(t!==void 0){this._onDidClose.fire(t);for(let t of e.cellTextDocuments)n.closeTextDocument({textDocument:t});this.notebookDocuments.delete(e.notebookDocument.uri);for(let e of t.cells)this.notebookCellMap.delete(e.document)}})),t.Disposable.create(()=>{i.forEach(e=>e.dispose())})}updateCellMap(e){for(let t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}})),on=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.thenable=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}e.string=n;function r(e){return typeof e==`number`||e instanceof Number}e.number=r;function i(e){return e instanceof Error}e.error=i;function a(e){return typeof e==`function`}e.func=a;function o(e){return Array.isArray(e)}e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}e.stringArray=s;function c(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=c;function l(e){return e&&a(e.then)}e.thenable=l})),sn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=e.parse=e.isUUID=e.v4=e.empty=void 0;var t=class{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}},n=class e extends t{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),`-`,e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),`-`,`4`,e._randomHex(),e._randomHex(),e._randomHex(),`-`,e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),`-`,e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(``))}};n._chars=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`],n._timeHighBits=[`8`,`9`,`a`,`b`],e.empty=new t(`00000000-0000-0000-0000-000000000000`);function r(){return new n}e.v4=r;let i=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function a(e){return i.test(e)}e.isUUID=a;function o(e){if(!a(e))throw Error(`invalid uuid`);return new t(e)}e.parse=o;function s(){return r().asHex()}e.generateUuid=s})),cn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.attachPartialResult=e.ProgressFeature=e.attachWorkDone=void 0;let t=en(),n=sn();var r=class e{constructor(t,n){this._connection=t,this._token=n,e.Instances.set(this._token,this)}begin(e,n,r,i){let a={kind:`begin`,title:e,percentage:n,message:r,cancellable:i};this._connection.sendProgress(t.WorkDoneProgress.type,this._token,a)}report(e,n){let r={kind:`report`};typeof e==`number`?(r.percentage=e,n!==void 0&&(r.message=n)):r.message=e,this._connection.sendProgress(t.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(t.WorkDoneProgress.type,this._token,{kind:`end`})}};r.Instances=/* @__PURE__ */ new Map;var i=class extends r{constructor(e,n){super(e,n),this._source=new t.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},a=class{constructor(){}begin(){}report(){}done(){}},o=class extends a{constructor(){super(),this._source=new t.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function s(e,t){if(t===void 0||t.workDoneToken===void 0)return new a;let n=t.workDoneToken;return delete t.workDoneToken,new r(e,n)}e.attachWorkDone=s,e.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),e?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(t.WorkDoneProgressCancelNotification.type,e=>{let t=r.Instances.get(e.token);(t instanceof i||t instanceof o)&&t.cancel()}))}attachWorkDoneProgress(e){return e===void 0?new a:new r(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){let e=(0,n.generateUuid)();return this.connection.sendRequest(t.WorkDoneProgressCreateRequest.type,{token:e}).then(()=>new i(this.connection,e))}return Promise.resolve(new o)}};var c;(function(e){e.type=new t.ProgressType})(c||={});var l=class{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(c.type,this._token,e)}};function u(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new l(e,n)}e.attachPartialResult=u})),ln=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationFeature=void 0;let t=en(),n=on();e.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?n.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let n={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(t.ConfigurationRequest.type,n).then(t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null)}}})),un=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceFoldersFeature=void 0;let t=en();e.WorkspaceFoldersFeature=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let n=e.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new t.Emitter,this.connection.onNotification(t.DidChangeWorkspaceFoldersNotification.type,e=>{this._onDidChangeWorkspaceFolders.fire(e.event)}))}fillServerCapabilities(e){super.fillServerCapabilities(e);let t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=t===!0||typeof t==`string`}getWorkspaceFolders(){return this.connection.sendRequest(t.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw Error(`Client doesn't support sending workspace folder change events.`);return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(t.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}})),dn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyFeature=void 0;let t=en();e.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(t.CallHierarchyPrepareRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)),onIncomingCalls:e=>{let n=t.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))},onOutgoingCalls:e=>{let n=t.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))}}}}})),fn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentFeature=void 0;let t=en();e.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(t.ShowDocumentRequest.type,e)}}})),pn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FileOperationsFeature=void 0;let t=en();e.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(t.DidCreateFilesNotification.type,t=>{e(t)})}onDidRenameFiles(e){return this.connection.onNotification(t.DidRenameFilesNotification.type,t=>{e(t)})}onDidDeleteFiles(e){return this.connection.onNotification(t.DidDeleteFilesNotification.type,t=>{e(t)})}onWillCreateFiles(e){return this.connection.onRequest(t.WillCreateFilesRequest.type,(t,n)=>e(t,n))}onWillRenameFiles(e){return this.connection.onRequest(t.WillRenameFilesRequest.type,(t,n)=>e(t,n))}onWillDeleteFiles(e){return this.connection.onRequest(t.WillDeleteFilesRequest.type,(t,n)=>e(t,n))}}})),mn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeFeature=void 0;let t=en();e.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(t.LinkedEditingRangeRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0))}}})),hn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyFeature=void 0;let t=en();e.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(t.TypeHierarchyPrepareRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t),void 0)),onSupertypes:e=>{let n=t.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))},onSubtypes:e=>{let n=t.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))}}}}})),gn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueFeature=void 0;let t=en();e.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(t.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(t.InlineValueRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t)))}}}})),_n=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeFeature=void 0;let t=en();e.FoldingRangeFeature=e=>class extends e{get foldingRange(){return{refresh:()=>this.connection.sendRequest(t.FoldingRangeRefreshRequest.type),on:e=>{let n=t.FoldingRangeRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))}}}}})),vn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintFeature=void 0;let t=en();e.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(t.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(t.InlayHintRequest.type,(t,n)=>e(t,n,this.attachWorkDoneProgress(t))),resolve:e=>this.connection.onRequest(t.InlayHintResolveRequest.type,(t,n)=>e(t,n))}}}})),yn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticFeature=void 0;let t=en();e.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(t.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(t.DocumentDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:e=>this.connection.onRequest(t.WorkspaceDiagnosticRequest.type,(n,r)=>e(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(t.WorkspaceDiagnosticRequest.partialResult,n)))}}}})),bn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerFeature=void 0;let t=en();e.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{let n=t.MonikerRequest.type;return this.connection.onRequest(n,(t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n,t)))}}}}})),xn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createConnection=e.combineFeatures=e.combineNotebooksFeatures=e.combineLanguagesFeatures=e.combineWorkspaceFeatures=e.combineWindowFeatures=e.combineClientFeatures=e.combineTracerFeatures=e.combineTelemetryFeatures=e.combineConsoleFeatures=e._NotebooksImpl=e._LanguagesImpl=e.BulkUnregistration=e.BulkRegistration=e.ErrorMessageTracker=void 0;let t=en(),n=on(),r=sn(),i=cn(),a=ln(),o=un(),s=dn(),c=tn(),l=fn(),u=pn(),d=mn(),f=hn(),p=gn(),m=_n(),h=vn(),g=yn(),_=an(),v=bn();function y(e){if(e!==null)return e}e.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||=0,t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach(t=>{e.window.showErrorMessage(t)})}};var b=class{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(t.MessageType.Error,e)}warn(e){this.send(t.MessageType.Warning,e)}info(e){this.send(t.MessageType.Info,e)}log(e){this.send(t.MessageType.Log,e)}debug(e){this.send(t.MessageType.Debug,e)}send(e,n){this._rawConnection&&this._rawConnection.sendNotification(t.LogMessageNotification.type,{type:e,message:n}).catch(()=>{(0,t.RAL)().console.error(`Sending log message failed`)})}},x=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...n){let r={type:t.MessageType.Error,message:e,actions:n};return this.connection.sendRequest(t.ShowMessageRequest.type,r).then(y)}showWarningMessage(e,...n){let r={type:t.MessageType.Warning,message:e,actions:n};return this.connection.sendRequest(t.ShowMessageRequest.type,r).then(y)}showInformationMessage(e,...n){let r={type:t.MessageType.Info,message:e,actions:n};return this.connection.sendRequest(t.ShowMessageRequest.type,r).then(y)}};let S=(0,l.ShowDocumentFeature)((0,i.ProgressFeature)(x));var C;(function(e){function t(){return new w}e.create=t})(C||(e.BulkRegistration=C={}));var w=class{constructor(){this._registrations=[],this._registered=/* @__PURE__ */ new Set}add(e,t){let i=n.string(e)?e:e.method;if(this._registered.has(i))throw Error(`${i} is already added to this registration`);let a=r.generateUuid();this._registrations.push({id:a,method:i,registerOptions:t||{}}),this._registered.add(i)}asRegistrationParams(){return{registrations:this._registrations}}},T;(function(e){function t(){return new E(void 0,[])}e.create=t})(T||(e.BulkUnregistration=T={}));var E=class{constructor(e,t){this._connection=e,this._unregistrations=/* @__PURE__ */ new Map,t.forEach(e=>{this._unregistrations.set(e.method,e)})}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let n={unregisterations:e};this._connection.sendRequest(t.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info(`Bulk unregistration failed.`)})}disposeSingle(e){let r=n.string(e)?e:e.method,i=this._unregistrations.get(r);if(!i)return!1;let a={unregisterations:[i]};return this._connection.sendRequest(t.UnregistrationRequest.type,a).then(()=>{this._unregistrations.delete(r)},e=>{this._connection.console.info(`Un-registering request handler for ${i.id} failed.`)}),!0}},D=class{attach(e){this._connection=e}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,n){return e instanceof w?this.registerMany(e):e instanceof E?this.registerSingle1(e,t,n):this.registerSingle2(e,t)}registerSingle1(e,i,a){let o=n.string(i)?i:i.method,s=r.generateUuid(),c={registrations:[{id:s,method:o,registerOptions:a||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(t.RegistrationRequest.type,c).then(t=>(e.add({id:s,method:o}),e),e=>(this.connection.console.info(`Registering request handler for ${o} failed.`),Promise.reject(e)))}registerSingle2(e,i){let a=n.string(e)?e:e.method,o=r.generateUuid(),s={registrations:[{id:o,method:a,registerOptions:i||{}}]};return this.connection.sendRequest(t.RegistrationRequest.type,s).then(e=>t.Disposable.create(()=>{this.unregisterSingle(o,a).catch(()=>{this.connection.console.info(`Un-registering capability with id ${o} failed.`)})}),e=>(this.connection.console.info(`Registering request handler for ${a} failed.`),Promise.reject(e)))}unregisterSingle(e,n){let r={unregisterations:[{id:e,method:n}]};return this.connection.sendRequest(t.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)})}registerMany(e){let n=e.asRegistrationParams();return this.connection.sendRequest(t.RegistrationRequest.type,n).then(()=>new E(this._connection,n.registrations.map(e=>({id:e.id,method:e.method}))),e=>(this.connection.console.info(`Bulk registration failed.`),Promise.reject(e)))}},O=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){function n(e){return e&&!!e.edit}let r=n(e)?e:{edit:e};return this.connection.sendRequest(t.ApplyWorkspaceEditRequest.type,r)}};let k=(0,u.FileOperationsFeature)((0,o.WorkspaceFoldersFeature)((0,a.ConfigurationFeature)(O)));var ee=class{constructor(){this._trace=t.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,n){this._trace!==t.Trace.Off&&this.connection.sendNotification(t.LogTraceNotification.type,{message:e,verbose:this._trace===t.Trace.Verbose?n:void 0}).catch(()=>{})}},te=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(t.TelemetryEventNotification.type,e).catch(()=>{this.connection.console.log(`Sending TelemetryEventNotification failed`)})}},A=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,i.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,i.attachPartialResult)(this.connection,t)}};e._LanguagesImpl=A;let j=(0,m.FoldingRangeFeature)((0,v.MonikerFeature)((0,g.DiagnosticFeature)((0,h.InlayHintFeature)((0,p.InlineValueFeature)((0,f.TypeHierarchyFeature)((0,d.LinkedEditingRangeFeature)((0,c.SemanticTokensFeature)((0,s.CallHierarchyFeature)(A)))))))));var ne=class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw Error(`Remote is not attached to a connection yet.`);return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,i.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,i.attachPartialResult)(this.connection,t)}};e._NotebooksImpl=ne;let M=(0,_.NotebookSyncFeature)(ne);function N(e,t){return function(n){return t(e(n))}}e.combineConsoleFeatures=N;function P(e,t){return function(n){return t(e(n))}}e.combineTelemetryFeatures=P;function F(e,t){return function(n){return t(e(n))}}e.combineTracerFeatures=F;function I(e,t){return function(n){return t(e(n))}}e.combineClientFeatures=I;function re(e,t){return function(n){return t(e(n))}}e.combineWindowFeatures=re;function L(e,t){return function(n){return t(e(n))}}e.combineWorkspaceFeatures=L;function R(e,t){return function(n){return t(e(n))}}e.combineLanguagesFeatures=R;function z(e,t){return function(n){return t(e(n))}}e.combineNotebooksFeatures=z;function ie(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:`features`,console:n(e.console,t.console,N),tracer:n(e.tracer,t.tracer,F),telemetry:n(e.telemetry,t.telemetry,P),client:n(e.client,t.client,I),window:n(e.window,t.window,re),workspace:n(e.workspace,t.workspace,L),languages:n(e.languages,t.languages,R),notebooks:n(e.notebooks,t.notebooks,z)}}e.combineFeatures=ie;function ae(e,r,a){let o=a&&a.console?new(a.console(b)):new b,s=e(o);o.rawAttach(s);let c=a&&a.tracer?new(a.tracer(ee)):new ee,l=a&&a.telemetry?new(a.telemetry(te)):new te,u=a&&a.client?new(a.client(D)):new D,d=a&&a.window?new(a.window(S)):new S,f=a&&a.workspace?new(a.workspace(k)):new k,p=a&&a.languages?new(a.languages(j)):new j,m=a&&a.notebooks?new(a.notebooks(M)):new M,h=[o,c,l,u,d,f,p,m];function g(e){return e instanceof Promise?e:n.thenable(e)?new Promise((t,n)=>{e.then(e=>t(e),e=>n(e))}):Promise.resolve(e)}let _,v,y,x={listen:()=>s.listen(),sendRequest:(e,...t)=>s.sendRequest(n.string(e)?e:e.method,...t),onRequest:(e,t)=>s.onRequest(e,t),sendNotification:(e,t)=>{let r=n.string(e)?e:e.method;return s.sendNotification(r,t)},onNotification:(e,t)=>s.onNotification(e,t),onProgress:s.onProgress,sendProgress:s.sendProgress,onInitialize:e=>(v=e,{dispose:()=>{v=void 0}}),onInitialized:e=>s.onNotification(t.InitializedNotification.type,e),onShutdown:e=>(_=e,{dispose:()=>{_=void 0}}),onExit:e=>(y=e,{dispose:()=>{y=void 0}}),get console(){return o},get telemetry(){return l},get tracer(){return c},get client(){return u},get window(){return d},get workspace(){return f},get languages(){return p},get notebooks(){return m},onDidChangeConfiguration:e=>s.onNotification(t.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>s.onNotification(t.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>s.onNotification(t.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>s.onNotification(t.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>s.onNotification(t.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>s.onNotification(t.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>s.onRequest(t.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>s.onNotification(t.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>s.sendNotification(t.PublishDiagnosticsNotification.type,e),onHover:e=>s.onRequest(t.HoverRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),void 0)),onCompletion:e=>s.onRequest(t.CompletionRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onCompletionResolve:e=>s.onRequest(t.CompletionResolveRequest.type,e),onSignatureHelp:e=>s.onRequest(t.SignatureHelpRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),void 0)),onDeclaration:e=>s.onRequest(t.DeclarationRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onDefinition:e=>s.onRequest(t.DefinitionRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onTypeDefinition:e=>s.onRequest(t.TypeDefinitionRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onImplementation:e=>s.onRequest(t.ImplementationRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onReferences:e=>s.onRequest(t.ReferencesRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onDocumentHighlight:e=>s.onRequest(t.DocumentHighlightRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onDocumentSymbol:e=>s.onRequest(t.DocumentSymbolRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onWorkspaceSymbol:e=>s.onRequest(t.WorkspaceSymbolRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onWorkspaceSymbolResolve:e=>s.onRequest(t.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>s.onRequest(t.CodeActionRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onCodeActionResolve:e=>s.onRequest(t.CodeActionResolveRequest.type,(t,n)=>e(t,n)),onCodeLens:e=>s.onRequest(t.CodeLensRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onCodeLensResolve:e=>s.onRequest(t.CodeLensResolveRequest.type,(t,n)=>e(t,n)),onDocumentFormatting:e=>s.onRequest(t.DocumentFormattingRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),void 0)),onDocumentRangeFormatting:e=>s.onRequest(t.DocumentRangeFormattingRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),void 0)),onDocumentOnTypeFormatting:e=>s.onRequest(t.DocumentOnTypeFormattingRequest.type,(t,n)=>e(t,n)),onRenameRequest:e=>s.onRequest(t.RenameRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),void 0)),onPrepareRename:e=>s.onRequest(t.PrepareRenameRequest.type,(t,n)=>e(t,n)),onDocumentLinks:e=>s.onRequest(t.DocumentLinkRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onDocumentLinkResolve:e=>s.onRequest(t.DocumentLinkResolveRequest.type,(t,n)=>e(t,n)),onDocumentColor:e=>s.onRequest(t.DocumentColorRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onColorPresentation:e=>s.onRequest(t.ColorPresentationRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onFoldingRanges:e=>s.onRequest(t.FoldingRangeRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onSelectionRanges:e=>s.onRequest(t.SelectionRangeRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),(0,i.attachPartialResult)(s,t))),onExecuteCommand:e=>s.onRequest(t.ExecuteCommandRequest.type,(t,n)=>e(t,n,(0,i.attachWorkDone)(s,t),void 0)),dispose:()=>s.dispose()};for(let e of h)e.attach(x);return s.onRequest(t.InitializeRequest.type,e=>{r.initialize(e),n.string(e.trace)&&(c.trace=t.Trace.fromString(e.trace));for(let t of h)t.initialize(e.capabilities);if(v)return g(v(e,new t.CancellationTokenSource().token,(0,i.attachWorkDone)(s,e),void 0)).then(e=>{if(e instanceof t.ResponseError)return e;let r=e;r||={capabilities:{}};let i=r.capabilities;i||(i={},r.capabilities=i),i.textDocumentSync===void 0||i.textDocumentSync===null?i.textDocumentSync=n.number(x.__textDocumentSync)?x.__textDocumentSync:t.TextDocumentSyncKind.None:!n.number(i.textDocumentSync)&&!n.number(i.textDocumentSync.change)&&(i.textDocumentSync.change=n.number(x.__textDocumentSync)?x.__textDocumentSync:t.TextDocumentSyncKind.None);for(let e of h)e.fillServerCapabilities(i);return r});{let e={capabilities:{textDocumentSync:t.TextDocumentSyncKind.None}};for(let t of h)t.fillServerCapabilities(e.capabilities);return e}}),s.onRequest(t.ShutdownRequest.type,()=>{if(r.shutdownReceived=!0,_)return _(new t.CancellationTokenSource().token)}),s.onNotification(t.ExitNotification.type,()=>{try{y&&y()}finally{r.shutdownReceived?r.exit(0):r.exit(1)}}),s.onNotification(t.SetTraceNotification.type,e=>{c.trace=t.Trace.fromString(e.value)}),x}e.createConnection=ae})),Sn=/* @__PURE__ */ s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.ProposedFeatures=e.NotebookDocuments=e.TextDocuments=e.SemanticTokensBuilder=void 0;let r=tn();Object.defineProperty(e,"SemanticTokensBuilder",{enumerable:!0,get:function(){return r.SemanticTokensBuilder}});let i=nn();n(en(),e);let a=rn();Object.defineProperty(e,"TextDocuments",{enumerable:!0,get:function(){return a.TextDocuments}});let o=an();Object.defineProperty(e,"NotebookDocuments",{enumerable:!0,get:function(){return o.NotebookDocuments}}),n(xn(),e);var s;(function(e){e.all={__brand:`features`,languages:i.InlineCompletionFeature}})(s||(e.ProposedFeatures=s={}))})),Cn=/* @__PURE__ */ s(((e,t)=>{t.exports=en()})),wn=/* @__PURE__ */ s((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createConnection=void 0;let r=Sn();n(Cn(),e),n(Sn(),e);let i=!1,a={initialize:e=>{},get shutdownReceived(){return i},set shutdownReceived(e){i=e},exit:e=>{}};function o(e,t,n,i){let o,s,c,l;return e!==void 0&&e.__brand===`features`&&(o=e,e=t,t=n,n=i),r.ConnectionStrategy.is(e)||r.ConnectionOptions.is(e)?l=e:(s=e,c=t,l=n),(0,r.createConnection)(e=>(0,r.createProtocolConnection)(s,c,e,l),a,o)}e.createConnection=o})),Tn=/* @__PURE__ */ s(((e,t)=>{t.exports=wn()})),En=wn(),Dn=Tn();function On(e){if([`true`,`True`,`TRUE`,`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`].lastIndexOf(e)>=0)return!0;if([`false`,`False`,`FALSE`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`].lastIndexOf(e)>=0)return!1;throw`Invalid boolean "${e}"`}function kn(e,t,n){if(n===`boolean`&&typeof e==`string`&&(e=On(e)),e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`||Array.isArray(e)!==Array.isArray(t))return!1;let r,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!kn(e[r],t[r]))return!1}else{let n=[];for(i in e)n.push(i);n.sort();let a=[];for(i in t)a.push(i);if(a.sort(),!kn(n,a))return!1;for(r=0;r<n.length;r++)if(!kn(e[n[r]],t[n[r]]))return!1}return!0}function An(e){return typeof e==`number`}function jn(e){return e!==void 0}function Mn(e){return typeof e==`boolean`}function Nn(e){return typeof e==`string`}function Pn(e){return Symbol.iterator in Object(e)}function Fn(e){return e?e instanceof Error?e.stack??e.toString():e.toString():`null`}var In=class{constructor(e){this.connection=e}send(e){this.connection.telemetry.logEvent(e)}sendError(e,t){this.send({name:e,type:`track`,properties:{error:Fn(t)}})}sendTrack(e,t){this.send({name:e,type:`track`,properties:t})}},Ln=/* @__PURE__ */ s(((e,t)=>{function n(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function r(e,t){for(var n=``,r=0,i=-1,a=0,o,s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(i!==s-1&&a!==1){if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var c=n.lastIndexOf(`/`);if(c!==n.length-1){c===-1?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1}i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}function i(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+e+r:r}var a={resolve:function(){for(var e=``,t=!1,i,a=arguments.length-1;a>=-1&&!t;a--){var o;a>=0?o=arguments[a]:(i===void 0&&(i=process.cwd()),o=i),n(o),o.length!==0&&(e=o+`/`+e,t=o.charCodeAt(0)===47)}return e=r(e,!t),t?e.length>0?`/`+e:`/`:e.length>0?e:`.`},normalize:function(e){if(n(e),e.length===0)return`.`;var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=r(e,!t),e.length===0&&!t&&(e=`.`),e.length>0&&i&&(e+=`/`),t?`/`+e:e},isAbsolute:function(e){return n(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(e===void 0?e=r:e+=`/`+r)}return e===void 0?`.`:a.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t||(e=a.resolve(e),t=a.resolve(t),e===t))return``;for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var i=e.length,o=i-r,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var c=t.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(t.charCodeAt(s+d)===47)return t.slice(s+d+1);if(d===0)return t.slice(s+d)}else o>l&&(e.charCodeAt(r+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=r+u+1;d<=i;++d)(d===i||e.charCodeAt(d)===47)&&(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+t.slice(s+u):(s+=u,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),e.length===0)return`.`;for(var t=e.charCodeAt(0),r=t===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if(t=e.charCodeAt(o),t===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);n(e);var r=0,i=-1,a=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;var s=t.length-1,c=-1;for(o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(l===47){if(!a){r=o+1;break}}else c===-1&&(a=!1,c=o+1),s>=0&&(l===t.charCodeAt(s)?--s===-1&&(i=o):(s=-1,i=c))}return r===i?i=c:i===-1&&(i=e.length),e.slice(r,i)}for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!a){r=o+1;break}}else i===-1&&(a=!1,i=o+1);return i===-1?``:e.slice(r,i)},extname:function(e){n(e);for(var t=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c===47){if(!a){r=s+1;break}continue}i===-1&&(a=!1,i=s+1),c===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||i===-1||o===0||o===1&&t===i-1&&t===r+1?``:e.slice(t,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return i(`/`,e)},parse:function(e){n(e);var t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;var r=e.charCodeAt(0),i=r===47,a;i?(t.root=`/`,a=1):a=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=a;--u){if(r=e.charCodeAt(u),r===47){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),r===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(t.base=t.name=s===0&&i?e.slice(1,c):e.slice(s,c)):(s===0&&i?(t.name=e.slice(1,o),t.base=e.slice(1,c)):(t.name=e.slice(s,o),t.base=e.slice(s,c)),t.ext=e.slice(o,c)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir=`/`),t},sep:`/`,delimiter:`:`,win32:null,posix:null};a.posix=a,t.exports=a})),Rn=/* @__PURE__ */ s((e=>{(()=>{var t={};(()=>{var e=t;Object.defineProperty(e,"__esModule",{value:!0}),e.getErrorStatusDescription=e.xhr=e.configure=void 0,e.configure=(e,t)=>{},e.xhr=async e=>{let t=new Headers;if(e.headers)for(let n in e.headers){let r=e.headers[n];Array.isArray(r)?r.forEach((e=>t.set(n,e))):t.set(n,r)}e.user&&e.password&&t.set(`Authorization`,`Basic `+btoa(e.user+`:`+e.password));let n={method:e.type,redirect:e.followRedirects>0?`follow`:`manual`,mode:`cors`,headers:t};e.data&&(n.body=e.data);let r=new Request(e.url,n),i=await fetch(r),a={};i.headers.forEach(((e,t)=>{a[t]=e}));let o=await i.arrayBuffer();return new class{constructor(){this.status=i.status,this.headers=a}get responseText(){return new TextDecoder().decode(o)}get body(){return new Uint8Array(o)}}},e.getErrorStatusDescription=function(e){return String(e)}})();var n=e;for(var r in t)n[r]=t[r];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})()})),zn=/* @__PURE__ */ s(((e,t)=>{
|
|
993
|
+
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
994
|
+
(function(n){var r=typeof e==`object`&&e&&!e.nodeType&&e,i=typeof t==`object`&&t&&!t.nodeType&&t,a=typeof global==`object`&&global;(a.global===a||a.window===a||a.self===a)&&(n=a);var o,s=2147483647,c=36,l=1,u=26,d=38,f=700,p=72,m=128,h=`-`,g=/^xn--/,_=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:`Overflow: input needs wider integers to process`,"not-basic":`Illegal input >= 0x80 (not a basic code point)`,"invalid-input":`Invalid input`},b=c-l,x=Math.floor,S=String.fromCharCode,C;function w(e){throw RangeError(y[e])}function T(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function E(e,t){var n=e.split(`@`),r=``;n.length>1&&(r=n[0]+`@`,e=n[1]),e=e.replace(v,`.`);var i=T(e.split(`.`),t).join(`.`);return r+i}function D(e){for(var t=[],n=0,r=e.length,i,a;n<r;)i=e.charCodeAt(n++),i>=55296&&i<=56319&&n<r?(a=e.charCodeAt(n++),(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)):t.push(i);return t}function O(e){return T(e,function(e){var t=``;return e>65535&&(e-=65536,t+=S(e>>>10&1023|55296),e=56320|e&1023),t+=S(e),t}).join(``)}function k(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function ee(e,t){return e+22+75*(e<26)-((t!=0)<<5)}function te(e,t,n){var r=0;for(e=n?x(e/f):e>>1,e+=x(e/t);e>b*u>>1;r+=c)e=x(e/b);return x(r+(b+1)*e/(e+d))}function A(e){var t=[],n=e.length,r,i=0,a=m,o=p,d=e.lastIndexOf(h),f,g,_,v,y,b,S,C;for(d<0&&(d=0),f=0;f<d;++f)e.charCodeAt(f)>=128&&w(`not-basic`),t.push(e.charCodeAt(f));for(g=d>0?d+1:0;g<n;){for(_=i,v=1,y=c;g>=n&&w(`invalid-input`),b=k(e.charCodeAt(g++)),(b>=c||b>x((s-i)/v))&&w(`overflow`),i+=b*v,S=y<=o?l:y>=o+u?u:y-o,!(b<S);y+=c)C=c-S,v>x(s/C)&&w(`overflow`),v*=C;r=t.length+1,o=te(i-_,r,_==0),x(i/r)>s-a&&w(`overflow`),a+=x(i/r),i%=r,t.splice(i++,0,a)}return O(t)}function j(e){var t,n,r,i,a,o,d,f,g,_,v,y=[],b,C,T,E;for(e=D(e),b=e.length,t=m,n=0,a=p,o=0;o<b;++o)v=e[o],v<128&&y.push(S(v));for(r=i=y.length,i&&y.push(h);r<b;){for(d=s,o=0;o<b;++o)v=e[o],v>=t&&v<d&&(d=v);for(C=r+1,d-t>x((s-n)/C)&&w(`overflow`),n+=(d-t)*C,t=d,o=0;o<b;++o)if(v=e[o],v<t&&++n>s&&w(`overflow`),v==t){for(f=n,g=c;_=g<=a?l:g>=a+u?u:g-a,!(f<_);g+=c)E=f-_,T=c-_,y.push(S(ee(_+E%T,0))),f=x(E/T);y.push(S(ee(f,0))),a=te(n,C,r==i),n=0,++r}++n,++t}return y.join(``)}function ne(e){return E(e,function(e){return g.test(e)?A(e.slice(4).toLowerCase()):e})}function M(e){return E(e,function(e){return _.test(e)?`xn--`+j(e):e})}if(o={version:`1.4.1`,ucs2:{decode:D,encode:O},decode:A,encode:j,toASCII:M,toUnicode:ne},typeof define==`function`&&typeof define.amd==`object`&&define.amd)define(`punycode`,function(){return o});else if(r&&i){if(t.exports==r)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(r[C]=o[C])}else n.punycode=o})(e)})),Bn=/* @__PURE__ */ s(((e,t)=>{t.exports=TypeError})),Vn=/* @__PURE__ */ s(((e,t)=>{t.exports={}})),Hn=/* @__PURE__ */ s(((e,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype?WeakMap.prototype.has:null,d=typeof WeakSet==`function`&&WeakSet.prototype?WeakSet.prototype.has:null,f=typeof WeakRef==`function`&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,h=Function.prototype.toString,g=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,y=String.prototype.toUpperCase,b=String.prototype.toLowerCase,x=RegExp.prototype.test,S=Array.prototype.concat,C=Array.prototype.join,w=Array.prototype.slice,T=Math.floor,E=typeof BigInt==`function`?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,O=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,k=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,ee=typeof Symbol==`function`&&Symbol.toStringTag?Symbol.toStringTag:null,te=Object.prototype.propertyIsEnumerable,A=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function j(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||x.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-T(-e):T(e);if(r!==e){var i=String(r),a=_.call(t,i.length+1);return v.call(i,n,`$&_`)+`.`+v.call(v.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return v.call(t,n,`$&_`)}var ne=Vn(),M=ne.custom,N=le(M)?M:null,P={__proto__:null,double:`"`,single:`'`},F={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(B(s,`quoteStyle`)&&!B(P,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(B(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!B(s,`customInspect`)||s.customInspect;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return xe(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?j(t,f):f}if(typeof t==`bigint`){var m=String(t)+`n`;return d?j(t,m):m}var h=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=h&&h>0&&typeof t==`object`)return R(t)?`[Array]`:`[Object]`;var g=De(s,r);if(o===void 0)o=[];else if(me(o,t)>=0)return`[Circular]`;function y(t,n,i){if(n&&(o=w.call(o),o.push(n)),i){var a={depth:s.depth};return B(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!ie(t)){var x=pe(t),T=ke(t,y);return`[Function`+(x?`: `+x:` (anonymous)`)+`]`+(T.length>0?` { `+C.call(T,`, `)+` }`:``)}if(le(t)){var D=k?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):O.call(t);return typeof t==`object`&&!k?Ce(D):D}if(be(t)){for(var M=`<`+b.call(String(t.nodeName)),F=t.attributes||[],L=0;L<F.length;L++)M+=` `+F[L].name+`=`+I(re(F[L].value),`double`,s);return M+=`>`,t.childNodes&&t.childNodes.length&&(M+=`...`),M+=`</`+b.call(String(t.nodeName))+`>`,M}if(R(t)){if(t.length===0)return`[]`;var de=ke(t,y);return g&&!Ee(de)?`[`+Oe(de,g)+`]`:`[ `+C.call(de,`, `)+` ]`}if(ae(t)){var Se=ke(t,y);return!(`cause`in Error.prototype)&&`cause`in t&&!te.call(t,`cause`)?`{ [`+String(t)+`] `+C.call(S.call(`[cause]: `+y(t.cause),Se),`, `)+` }`:Se.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+C.call(Se,`, `)+` }`}if(typeof t==`object`&&u){if(N&&typeof t[N]==`function`&&ne)return ne(t,{depth:h-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(he(t)){var Ae=[];return a&&a.call(t,function(e,n){Ae.push(y(n,t,!0)+` => `+y(e,t))}),Te(`Map`,i.call(t),Ae,g)}if(ve(t)){var je=[];return l&&l.call(t,function(e){je.push(y(e,t))}),Te(`Set`,c.call(t),je,g)}if(ge(t))return we(`WeakMap`);if(ye(t))return we(`WeakSet`);if(_e(t))return we(`WeakRef`);if(se(t))return Ce(y(Number(t)));if(ue(t))return Ce(y(E.call(t)));if(ce(t))return Ce(p.call(t));if(oe(t))return Ce(y(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!z(t)&&!ie(t)){var Me=ke(t,y),Ne=A?A(t)===Object.prototype:t instanceof Object||t.constructor===Object,Pe=t instanceof Object?``:`null prototype`,Fe=!Ne&&ee&&Object(t)===t&&ee in t?_.call(fe(t),8,-1):Pe?`Object`:``,Ie=(Ne||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``)+(Fe||Pe?`[`+C.call(S.call([],Fe||[],Pe||[]),`: `)+`] `:``);return Me.length===0?Ie+`{}`:g?Ie+`{`+Oe(Me,g)+`}`:Ie+`{ `+C.call(Me,`, `)+` }`}return String(t)};function I(e,t,n){var r=P[n.quoteStyle||t];return r+e+r}function re(e){return v.call(String(e),/"/g,`"`)}function L(e){return!ee||!(typeof e==`object`&&(ee in e||e[ee]!==void 0))}function R(e){return fe(e)===`[object Array]`&&L(e)}function z(e){return fe(e)===`[object Date]`&&L(e)}function ie(e){return fe(e)===`[object RegExp]`&&L(e)}function ae(e){return fe(e)===`[object Error]`&&L(e)}function oe(e){return fe(e)===`[object String]`&&L(e)}function se(e){return fe(e)===`[object Number]`&&L(e)}function ce(e){return fe(e)===`[object Boolean]`&&L(e)}function le(e){if(k)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!O)return!1;try{return O.call(e),!0}catch{}return!1}function ue(e){if(!e||typeof e!=`object`||!E)return!1;try{return E.call(e),!0}catch{}return!1}var de=Object.prototype.hasOwnProperty||function(e){return e in this};function B(e,t){return de.call(e,t)}function fe(e){return m.call(e)}function pe(e){if(e.name)return e.name;var t=g.call(h.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function me(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function he(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ge(e){if(!u||!e||typeof e!=`object`)return!1;try{u.call(e,u);try{d.call(e,d)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function _e(e){if(!f||!e||typeof e!=`object`)return!1;try{return f.call(e),!0}catch{}return!1}function ve(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ye(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{u.call(e,u)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function be(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement||typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function xe(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return xe(_.call(e,0,t.maxStringLength),t)+r}var i=F[t.quoteStyle||`single`];return i.lastIndex=0,I(v.call(v.call(e,i,`\\$1`),/[\x00-\x1f]/g,Se),`single`,t)}function Se(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+y.call(t.toString(16))}function Ce(e){return`Object(`+e+`)`}function we(e){return e+` { ? }`}function Te(e,t,n,r){var i=r?Oe(n,r):C.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function Ee(e){for(var t=0;t<e.length;t++)if(me(e[t],`
|
|
995
|
+
`)>=0)return!1;return!0}function De(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=C.call(Array(e.indent+1),` `);else return null;return{base:n,prev:C.call(Array(t+1),n)}}function Oe(e,t){if(e.length===0)return``;var n=`
|
|
996
|
+
`+t.prev+t.base;return n+C.call(e,`,`+n)+`
|
|
997
|
+
`+t.prev}function ke(e,t){var n=R(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=B(e,i)?t(e[i],e):``}var a=typeof D==`function`?D(e):[],o;if(k){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e)B(e,c)&&(n&&String(Number(c))===c&&c<e.length||k&&o[`$`+c]instanceof Symbol||(x.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))));if(typeof D==`function`)for(var l=0;l<a.length;l++)te.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}})),Un=/* @__PURE__ */ s(((e,t)=>{var n=Hn(),r=Bn(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=c(e,t);return n&&e&&!e.next&&(e=void 0),!!n},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}})),Wn=/* @__PURE__ */ s(((e,t)=>{t.exports=Object})),Gn=/* @__PURE__ */ s(((e,t)=>{t.exports=Error})),Kn=/* @__PURE__ */ s(((e,t)=>{t.exports=EvalError})),qn=/* @__PURE__ */ s(((e,t)=>{t.exports=RangeError})),Jn=/* @__PURE__ */ s(((e,t)=>{t.exports=ReferenceError})),Yn=/* @__PURE__ */ s(((e,t)=>{t.exports=SyntaxError})),Xn=/* @__PURE__ */ s(((e,t)=>{t.exports=URIError})),Zn=/* @__PURE__ */ s(((e,t)=>{t.exports=Math.abs})),Qn=/* @__PURE__ */ s(((e,t)=>{t.exports=Math.floor})),$n=/* @__PURE__ */ s(((e,t)=>{t.exports=Math.max})),er=/* @__PURE__ */ s(((e,t)=>{t.exports=Math.min})),tr=/* @__PURE__ */ s(((e,t)=>{t.exports=Math.pow})),nr=/* @__PURE__ */ s(((e,t)=>{t.exports=Math.round})),rr=/* @__PURE__ */ s(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),ir=/* @__PURE__ */ s(((e,t)=>{var n=rr();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),ar=/* @__PURE__ */ s(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),or=/* @__PURE__ */ s(((e,t)=>{var n=ar();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),sr=/* @__PURE__ */ s(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),cr=/* @__PURE__ */ s(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),lr=/* @__PURE__ */ s(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=cr();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),ur=/* @__PURE__ */ s(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),dr=/* @__PURE__ */ s(((e,t)=>{t.exports=Wn().getPrototypeOf||null})),fr=/* @__PURE__ */ s(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),pr=/* @__PURE__ */ s(((e,t)=>{var n=fr();t.exports=Function.prototype.bind||n})),mr=/* @__PURE__ */ s(((e,t)=>{t.exports=Function.prototype.call})),hr=/* @__PURE__ */ s(((e,t)=>{t.exports=Function.prototype.apply})),gr=/* @__PURE__ */ s(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),_r=/* @__PURE__ */ s(((e,t)=>{var n=pr(),r=hr(),i=mr();t.exports=gr()||n.call(i,r)})),vr=/* @__PURE__ */ s(((e,t)=>{var n=pr(),r=Bn(),i=mr(),a=_r();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),yr=/* @__PURE__ */ s(((e,t)=>{var n=vr(),r=or(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),br=/* @__PURE__ */ s(((e,t)=>{var n=ur(),r=dr(),i=yr();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),xr=/* @__PURE__ */ s(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=pr().call(n,r)})),Sr=/* @__PURE__ */ s(((e,t)=>{var n,r=Wn(),i=Gn(),a=Kn(),o=qn(),s=Jn(),c=Yn(),l=Bn(),u=Xn(),d=Zn(),f=Qn(),p=$n(),m=er(),h=tr(),g=nr(),_=ir(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=or(),x=sr(),S=function(){throw new l},C=b?function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}}():S,w=lr()(),T=br(),E=dr(),D=ur(),O=hr(),k=mr(),ee={},te=typeof Uint8Array>`u`||!T?n:T(Uint8Array),A={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":ee,"%AsyncGenerator%":ee,"%AsyncGeneratorFunction%":ee,"%AsyncIteratorPrototype%":ee,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":ee,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T((/* @__PURE__ */ new Map())[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T((/* @__PURE__ */ new Set())[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":te,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){A[`%Error.prototype%`]=T(T(e))}var j=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return A[t]=n,n},ne={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},M=pr(),N=xr(),P=M.call(k,Array.prototype.concat),F=M.call(O,Array.prototype.splice),I=M.call(k,String.prototype.replace),re=M.call(k,String.prototype.slice),L=M.call(k,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,ie=function(e){var t=re(e,0,1),n=re(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return I(e,R,function(e,t,n,i){r[r.length]=n?I(i,z,`$1`):t||e}),r},ae=function(e,t){var n=e,r;if(N(ne,n)&&(r=ne[n],n=`%`+r[0]+`%`),N(A,n)){var i=A[n];if(i===ee&&(i=j(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(L(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ie(e),r=n.length>0?n[0]:``,i=ae(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],F(n,P([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=re(p,0,1),h=re(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,N(A,a))o=A[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=N(o,p),o=o[p];f&&!s&&(A[a]=o)}}return o}})),Cr=/* @__PURE__ */ s(((e,t)=>{var n=Sr(),r=vr(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),wr=/* @__PURE__ */ s(((e,t)=>{var n=Sr(),r=Cr(),i=Hn(),a=Bn(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}})),Tr=/* @__PURE__ */ s(((e,t)=>{var n=Sr(),r=Cr(),i=Hn(),a=wr(),o=Bn(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a})),Er=/* @__PURE__ */ s(((e,t)=>{var n=Bn(),r=Hn(),i=Un(),a=wr(),o=Tr()||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+(e&&Object(e)===e?`the given object key`:r(e)))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=o(),e.set(t,n)}};return t}})),Dr=/* @__PURE__ */ s(((e,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}})),Or=/* @__PURE__ */ s(((e,t)=>{var n=Dr(),r=Er(),i=sr(),a=Object.prototype.hasOwnProperty,o=Array.isArray,s=r(),c=function(e,t){return s.set(e,t),e},l=function(e){return s.has(e)},u=function(e){return s.get(e)},d=function(e,t){s.set(e,t)},f=function(){for(var e=[],t=0;t<256;++t)e[e.length]=`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase();return e}(),p=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)n[i]!==void 0&&(r[r.length]=n[i]);t.obj[t.prop]=r}}},m=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},h=function(e,t,n){t===`__proto__`&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},g=function e(t,n,r){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(o(t)){var i=t.length;if(r&&typeof r.arrayLimit==`number`&&i>=r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(t.concat(n),r),i)}t[i]=n}else if(t&&typeof t==`object`){if(l(t)){var s=u(t)+1;t[s]=n,d(t,s)}else if(r&&r.strictMerge)return[t,n];else(r&&(r.plainObjects||r.allowPrototypes)||!a.call(Object.prototype,n))&&(t[n]=!0)}else return[t,n];return t}if(!t||typeof t!=`object`){if(l(n)){for(var f=Object.keys(n),p=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},g=0;g<f.length;g++){var _=parseInt(f[g],10);p[_+1]=n[f[g]]}return c(p,u(n)+1)}var v=[t].concat(n);if(r&&typeof r.arrayLimit==`number`&&v.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(v,r),v.length-1)}return v}var y=t;if(o(t)&&!o(n)&&(y=m(t,r)),o(t)&&o(n)){if(n.forEach(function(n,i){if(a.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,r):t[t.length]=n}else t[i]=n}),r&&typeof r.arrayLimit==`number`&&t.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);return c(m(t,r),t.length-1)}return t}return Object.keys(n).reduce(function(t,i){var o=n[i];if(a.call(t,i)?h(t,i,e(t[i],o,r)):h(t,i,o),l(n)&&!l(t)&&c(t,u(n)),l(t)){var s=parseInt(i,10);String(s)===i&&s>=0&&s>u(t)&&d(t,s)}return t},y)},_=function(e,t){return Object.keys(t).reduce(function(e,n){return h(e,n,t[n]),e},e)},v=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},y=1024;t.exports={arrayToObject:m,assign:_,combine:function(e,t,n,r,i){if(l(e)){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);for(var a=o(t)?t:[t],s=u(e),f=0;f<a.length;++f)s+=1,e[s]=a[f];return d(e,s),e}var p=[].concat(e,t);if(p.length>n){if(i)throw RangeError(`Array limit exceeded. Only `+n+` element`+(n===1?``:`s`)+` allowed in an array.`);return c(m(p,{plainObjects:r}),p.length-1)}return p},compact:function(e){for(var t=[{obj:{o:e},prop:`o`}],n=r(),i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],s=Object.keys(o),c=0;c<s.length;++c){var l=s[c],u=o[l];typeof u==`object`&&u&&!n.has(u)&&(t[t.length]={obj:o,prop:l},n.set(u,!0))}return p(t),e},decode:v,encode:function(e,t,r,i,a){if(e.length===0)return e;var o=e;if(typeof e==`symbol`?o=Symbol.prototype.toString.call(e):typeof e!=`string`&&(o=String(e)),r===`iso-8859-1`)return escape(o).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var s=``,c=0;c<o.length;c+=y){var l=o.length>=y?o.slice(c,c+y):o;if(c+y<o.length){var u=l.charCodeAt(l.length-1);u>=55296&&u<=56319&&(l=l.slice(0,-1),--c)}for(var d=[],p=0;p<l.length;++p){var m=l.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||a===n.RFC1738&&(m===40||m===41)){d[d.length]=l.charAt(p);continue}if(m<128){d[d.length]=f[m];continue}if(m<2048){d[d.length]=f[192|m>>6]+f[128|m&63];continue}if(m<55296||m>=57344){d[d.length]=f[224|m>>12]+f[128|m>>6&63]+f[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|l.charCodeAt(p)&1023),d[d.length]=f[240|m>>18]+f[128|m>>12&63]+f[128|m>>6&63]+f[128|m&63]}s+=d.join(``)}return s},isBuffer:function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},markOverflow:c,maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n[n.length]=t(e[r]);return n}return t(e)},merge:g}})),kr=/* @__PURE__ */ s(((e,t)=>{var n=Er(),r=Or(),i=Dr(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,depth:1/0,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T,E,D){var O=t;if(D>E)throw RangeError(`Input depth exceeded depth option of `+E);for(var k=T,ee=0,te=!1;(k=k.get(m))!==void 0&&!te;){var A=k.get(t);if(ee+=1,A!==void 0){if(A===ee)throw RangeError(`Cyclic object value`);te=!0}k.get(m)===void 0&&(ee=0)}if(O=typeof _==`function`?_(i,O):O,O instanceof Date?O=b(O):a===`comma`&&s(O)&&(O=r.maybeMap(O,function(e){return e instanceof Date?b(e):e})),O===null){if(u)return S(g&&!C?g(i,f.encoder,w,`key`,x):i);O=``}if(p(O)||r.isBuffer(O))return g?[S(C?i:g(i,f.encoder,w,`key`,x))+`=`+S(g(O,f.encoder,w,`value`,x))]:[S(i)+`=`+S(String(O))];var j=[];if(O===void 0)return j;var ne;if(a===`comma`&&s(O))C&&g&&(O=r.maybeMap(O,function(e){return e==null?e:g(e)})),ne=[{value:O.length>0?O.join(`,`)||null:void 0}];else if(s(_))ne=_;else{var M=Object.keys(O);ne=v?M.sort(v):M}var N=h?String(i).replace(/\./g,`%2E`):String(i),P=o&&s(O)&&O.length===1?N+`[]`:N;if(c&&s(O)&&O.length===0&&Object.keys(O).length===0)return P+`[]`;for(var F=0;F<ne.length;++F){var I=ne[F],re=typeof I==`object`&&I&&I.value!==void 0?I.value:O[I];if(!(d&&re===null)){var L=y&&h?String(I).replace(/\./g,`%2E`):String(I),R=s(O)?typeof a==`function`?a(P,L):P:P+(y?`.`+L:`[`+L+`]`);T.set(t,ee);var z=n();z.set(m,T),l(j,e(re,R,a,o,c,u,d,h,a===`comma`&&C&&s(O)?null:g,_,v,y,b,x,S,C,w,z,E,D+1))}}return j},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat;if(`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0||f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,depth:typeof e.depth==`number`?e.depth:f.depth,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m];if(_!=null){var v=r[_];i.skipNulls&&v===null||l(u,h(v,i.encodeDotInKeys?String(_).replace(/\./g,`%2E`):String(_),d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p,i.depth,0))}}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B`+i.delimiter:b+=`utf8=%E2%9C%93`+i.delimiter),y.length>0?b+y:``}})),Ar=/* @__PURE__ */ s(((e,t)=>{var n=Or(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1){if(t.throwOnLimitExceeded)for(var r=0,i=e.indexOf(`,`);i>-1;){if(r+=1,r>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);i=e.indexOf(`,`,i+1)}return e.split(`,`)}if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded&&f!==void 0?f+1:f);if(t.throwOnLimitExceeded&&f!==void 0&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;if(y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),b!==null&&(x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0),function(e){return t.decoder(e,a.decoder,g,`value`)}))),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x),t.comma&&i(x)&&x.length>t.arrayLimit&&(x=n.combine([],x,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded)),b!==null){var S=r.call(u,b);S&&(t.duplicates===`combine`||_.indexOf(`[]=`)>-1)?u[b]=n.combine(u[b],x,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded):(!S||t.duplicates===`last`)&&(u[b]=x)}}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=n.isOverflow(c)?c:r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c,r.arrayLimit,r.plainObjects,r.throwOnLimitExceeded);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10),h=!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays;if(!r.parseArrays&&p===``)u={0:c};else if(h&&m<r.arrayLimit)u=[],u[m]=c;else if(h&&r.throwOnLimitExceeded)throw RangeError(`Array limit exceeded. Only `+r.arrayLimit+` element`+(r.arrayLimit===1?``:`s`)+` allowed in an array.`);else h?(u[m]=c,n.markOverflow(u,m)):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t){var n=t.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e;if(t.depth<=0)return!t.plainObjects&&r.call(Object.prototype,n)&&!t.allowPrototypes?void 0:[n];var i=[],a=n.indexOf(`[`),o=a>=0?n.slice(0,a):n;if(o){if(!t.plainObjects&&r.call(Object.prototype,o)&&!t.allowPrototypes)return;i[i.length]=o}for(var s=n.length,c=a,l=0;c>=0&&l<t.depth;){for(var u=1,d=c+1,f=-1;d<s&&f<0;){var p=n.charCodeAt(d);p===91?u+=1:p===93&&(--u,u===0&&(f=d)),d+=1}if(f<0)return i[i.length]=`[`+n.slice(c)+`]`,i;var m=n.slice(c,f+1),h=m.slice(1,-1);if(!t.plainObjects&&r.call(Object.prototype,h)&&!t.allowPrototypes)return;i[i.length]=m,l+=1,c=n.indexOf(`[`,f+1)}if(c>=0){if(t.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+t.depth+` and strictDepth is true`);i[i.length]=`[`+n.slice(c)+`]`}return i},p=function(e,t,n,r){if(e){var i=f(e,n);if(i)return d(i,t,n,r)}},m=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);return{allowDots:e.allowDots===void 0?e.decodeDotInKeys===!0||a.allowDots:!!e.allowDots,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictMerge:typeof e.strictMerge==`boolean`?!!e.strictMerge:a.strictMerge,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`&&e.throwOnLimitExceeded}};t.exports=function(e,t){var r=m(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=p(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}})),jr=/* @__PURE__ */ s(((e,t)=>{var n=kr(),r=Ar();t.exports={formats:Dr(),parse:r,stringify:n}})),Mr=/* @__PURE__ */ s((e=>{var t=zn();function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,i=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=[`'`,`{`,`}`,`|`,`\\`,`^`,"`",`<`,`>`,`"`,"`",` `,`\r`,`
|
|
998
|
+
`,` `],s=[`%`,`/`,`?`,`;`,`#`].concat(o),c=[`/`,`?`,`#`],l=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},h=jr();function g(e,t,r){if(e&&typeof e==`object`&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}n.prototype.parse=function(e,n,i){if(typeof e!=`string`)throw TypeError(`Parameter 'url' must be a string, not `+typeof e);var g=e.indexOf(`?`),_=g!==-1&&g<e.indexOf(`#`)?`?`:`#`,v=e.split(_);v[0]=v[0].replace(/\\/g,`/`),e=v.join(_);var y=e;if(y=y.trim(),!i&&e.split(`#`).length===1){var b=a.exec(y);if(b)return this.path=y,this.href=y,this.pathname=b[1],b[2]?(this.search=b[2],this.query=n?h.parse(this.search.substr(1)):this.search.substr(1)):n&&(this.search=``,this.query={}),this}var x=r.exec(y);if(x){x=x[0];var S=x.toLowerCase();this.protocol=S,y=y.substr(x.length)}if(i||x||y.match(/^\/\/[^@/]+@[^@/]+/)){var C=y.substr(0,2)===`//`;C&&!(x&&p[x])&&(y=y.substr(2),this.slashes=!0)}if(!p[x]&&(C||x&&!m[x])){for(var w=-1,T=0;T<c.length;T++){var E=y.indexOf(c[T]);E!==-1&&(w===-1||E<w)&&(w=E)}var D,O=w===-1?y.lastIndexOf(`@`):y.lastIndexOf(`@`,w);O!==-1&&(D=y.slice(0,O),y=y.slice(O+1),this.auth=decodeURIComponent(D)),w=-1;for(var T=0;T<s.length;T++){var E=y.indexOf(s[T]);E!==-1&&(w===-1||E<w)&&(w=E)}w===-1&&(w=y.length),this.host=y.slice(0,w),y=y.slice(w),this.parseHost(),this.hostname=this.hostname||``;var k=this.hostname[0]===`[`&&this.hostname[this.hostname.length-1]===`]`;if(!k)for(var ee=this.hostname.split(/\./),T=0,te=ee.length;T<te;T++){var A=ee[T];if(A&&!A.match(u)){for(var j=``,ne=0,M=A.length;ne<M;ne++)A.charCodeAt(ne)>127?j+=`x`:j+=A[ne];if(!j.match(u)){var N=ee.slice(0,T),P=ee.slice(T+1),F=A.match(d);F&&(N.push(F[1]),P.unshift(F[2])),P.length&&(y=`/`+P.join(`.`)+y),this.hostname=N.join(`.`);break}}}this.hostname=this.hostname.length>l?``:this.hostname.toLowerCase(),k||(this.hostname=t.toASCII(this.hostname));var I=this.port?`:`+this.port:``,re=this.hostname||``;this.host=re+I,this.href+=this.host,k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),y[0]!==`/`&&(y=`/`+y))}if(!f[S])for(var T=0,te=o.length;T<te;T++){var L=o[T];if(y.indexOf(L)!==-1){var R=encodeURIComponent(L);R===L&&(R=escape(L)),y=y.split(L).join(R)}}var z=y.indexOf(`#`);z!==-1&&(this.hash=y.substr(z),y=y.slice(0,z));var ie=y.indexOf(`?`);if(ie===-1?n&&(this.search=``,this.query={}):(this.search=y.substr(ie),this.query=y.substr(ie+1),n&&(this.query=h.parse(this.query)),y=y.slice(0,ie)),y&&(this.pathname=y),m[S]&&this.hostname&&!this.pathname&&(this.pathname=`/`),this.pathname||this.search){var I=this.pathname||``,ae=this.search||``;this.path=I+ae}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||``;e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,`:`),e+=`@`);var t=this.protocol||``,n=this.pathname||``,r=this.hash||``,i=!1,a=``;this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(`:`)===-1?this.hostname:`[`+this.hostname+`]`),this.port&&(i+=`:`+this.port)),this.query&&typeof this.query==`object`&&Object.keys(this.query).length&&(a=h.stringify(this.query,{arrayFormat:`repeat`,addQueryPrefix:!1}));var o=this.search||a&&`?`+a||``;return t&&t.substr(-1)!==`:`&&(t+=`:`),this.slashes||(!t||m[t])&&i!==!1?(i=`//`+(i||``),n&&n.charAt(0)!==`/`&&(n=`/`+n)):i||=``,r&&r.charAt(0)!==`#`&&(r=`#`+r),o&&o.charAt(0)!==`?`&&(o=`?`+o),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace(`#`,`%23`),t+i+n+o+r};function _(e,t){return g(e,!1,!0).resolve(t)}n.prototype.resolve=function(e){return this.resolveObject(g(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(typeof e==`string`){var t=new n;t.parse(e,!1,!0),e=t}for(var r=new n,i=Object.keys(this),a=0;a<i.length;a++){var o=i[a];r[o]=this[o]}if(r.hash=e.hash,e.href===``)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];l!==`protocol`&&(r[l]=e[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname=`/`,r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var u=Object.keys(e),d=0;d<u.length;d++){var f=u[d];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!p[e.protocol]){for(var h=(e.pathname||``).split(`/`);h.length&&!(e.host=h.shift()););e.host||(e.host=``),e.hostname||(e.hostname=``),h[0]!==``&&h.unshift(``),h.length<2&&h.unshift(``),r.pathname=h.join(`/`)}else r.pathname=e.pathname;return r.search=e.search,r.query=e.query,r.host=e.host||``,r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,(r.pathname||r.search)&&(r.path=(r.pathname||``)+(r.search||``)),r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var g=r.pathname&&r.pathname.charAt(0)===`/`,_=e.host||e.pathname&&e.pathname.charAt(0)===`/`,v=_||g||r.host&&e.pathname,y=v,b=r.pathname&&r.pathname.split(`/`)||[],h=e.pathname&&e.pathname.split(`/`)||[],x=r.protocol&&!m[r.protocol];if(x&&(r.hostname=``,r.port=null,r.host&&(b[0]===``?b[0]=r.host:b.unshift(r.host)),r.host=``,e.protocol&&(e.hostname=null,e.port=null,e.host&&(h[0]===``?h[0]=e.host:h.unshift(e.host)),e.host=null),v&&=h[0]===``||b[0]===``),_)r.host=e.host||e.host===``?e.host:r.host,r.hostname=e.hostname||e.hostname===``?e.hostname:r.hostname,r.search=e.search,r.query=e.query,b=h;else if(h.length)b||=[],b.pop(),b=b.concat(h),r.search=e.search,r.query=e.query;else if(e.search!=null){if(x){r.host=b.shift(),r.hostname=r.host;var S=r.host&&r.host.indexOf(`@`)>0?r.host.split(`@`):!1;S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.href=r.format(),r}if(!b.length)return r.pathname=null,r.path=r.search?`/`+r.search:null,r.href=r.format(),r;for(var C=b.slice(-1)[0],w=(r.host||e.host||b.length>1)&&(C===`.`||C===`..`)||C===``,T=0,E=b.length;E>=0;E--)C=b[E],C===`.`?b.splice(E,1):C===`..`?(b.splice(E,1),T++):T&&(b.splice(E,1),T--);if(!v&&!y)for(;T--;)b.unshift(`..`);v&&b[0]!==``&&(!b[0]||b[0].charAt(0)!==`/`)&&b.unshift(``),w&&b.join(`/`).substr(-1)!==`/`&&b.push(``);var D=b[0]===``||b[0]&&b[0].charAt(0)===`/`;if(x){r.hostname=D?``:b.length?b.shift():``,r.host=r.hostname;var S=r.host&&r.host.indexOf(`@`)>0?r.host.split(`@`):!1;S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return v||=r.host&&b.length,v&&!D&&b.unshift(``),b.length>0?r.pathname=b.join(`/`):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:``)+(r.search?r.search:``)),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=i.exec(e);t&&(t=t[0],t!==`:`&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.resolve=_})),Nr=/* @__PURE__ */ u(Ln()),Pr=Rn(),Fr=/* @__PURE__ */ u(Mr()),Ir={975(e){function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(a!==s-1&&o!==1){if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1}a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}var r={resolve:function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},normalize:function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},isAbsolute:function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var c=n.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s===-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r}(0,e)},parse:function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},Lr={};function Rr(e){var t=Lr[e];if(t!==void 0)return t.exports;var n=Lr[e]={exports:{}};return Ir[e](n,n.exports,Rr),n.exports}let zr;Rr.d=(e,t)=>{for(var n in t)Rr.o(t,n)&&!Rr.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Rr.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),typeof process==`object`?zr=process.platform===`win32`:typeof navigator==`object`&&(zr=navigator.userAgent.indexOf(`Windows`)>=0);const Br=/^\w[\w\d+.-]*$/,Vr=/^\//,Hr=/^\/\//;function Ur(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Br.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!Vr.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(Hr.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}const Wr=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;var Gr=class e{static isUri(t){return t instanceof e||!!t&&typeof t.authority==`string`&&typeof t.fragment==`string`&&typeof t.path==`string`&&typeof t.query==`string`&&typeof t.scheme==`string`&&typeof t.fsPath==`string`&&typeof t.with==`function`&&typeof t.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=function(e,t){return e||t?e:`file`}(e,a),this.authority=t||``,this.path=function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t}(this.scheme,n||``),this.query=r||``,this.fragment=i||``,Ur(this,a))}get fsPath(){return Zr(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new qr(t,n,r,i,a)}static parse(e,t=!1){let n=Wr.exec(e);return n?new qr(n[2]||``,ti(n[4]||``),ti(n[5]||``),ti(n[7]||``),ti(n[9]||``),t):new qr(``,``,``,``,``)}static file(e){let t=``;if(zr&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new qr(`file`,t,e,``,``)}static from(e){let t=new qr(e.scheme,e.authority,e.path,e.query,e.fragment);return Ur(t,!0),t}toString(e=!1){return Qr(this,e)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{let e=new qr(t);return e._formatted=t.external,e._fsPath=t._sep===Kr?t.fsPath:null,e}}return t}};const Kr=zr?1:void 0;var qr=class extends Gr{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=Zr(this,!1),this._fsPath}toString(e=!1){return e?Qr(this,!0):(this._formatted||=Qr(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Kr),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}};const Jr={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function Yr(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=Jr[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}function Xr(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=Jr[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function Zr(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,zr&&(n=n.replace(/\//g,`\\`)),n}function Qr(e,t){let n=t?Xr:Yr,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:Yr(c,!1,!1)),r}function $r(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+$r(e.substr(3)):e}}const ei=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ti(e){return e.match(ei)?e.replace(ei,e=>$r(e)):e}var ni=Rr(975);const ri=ni.posix||ni;var ii;(function(e){e.joinPath=function(e,...t){return e.with({path:ri.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=ri.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=ri.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return ri.basename(e.path)},e.extname=function(e){return ri.extname(e.path)}})(ii||={});var ai;(function(e){e.type=new En.NotificationType(`json/schemaAssociations`)})(ai||={});var oi;(function(e){e.type=new En.NotificationType(`yaml/registerCustomSchemaRequest`)})(oi||={});var si;(function(e){e.type=new En.NotificationType(`yaml/registerContentRequest`)})(si||={});var ci;(function(e){e.type=new En.NotificationType(`yaml/resultLimitReached`)})(ci||={});var li;(function(e){e.type=new En.RequestType(`vscode/content`)})(li||={});var ui;(function(e){e.type=new En.RequestType(`custom/schema/content`)})(ui||={});var di;(function(e){e.type=new En.RequestType(`custom/schema/request`)})(di||={});var fi;(function(e){e.type=new En.RequestType(`json/colorSymbols`)})(fi||={});var pi;(function(e){e.type=new En.RequestType(`json/schema/modify`)})(pi||={});var mi;(function(e){e.type=new En.NotificationType(`yaml/supportSchemaSelection`),e.getSchema=new En.RequestType(`yaml/get/jsonSchema`),e.getAllSchemas=new En.RequestType(`yaml/get/all/jsonSchemas`),e.schemaStoreInitialized=new En.NotificationType(`yaml/schema/store/initialized`)})(mi||={});const hi=e=>/^(((\.\.?)|([\w-@. ]+))(\/|\\\\?))*[\w-. ]*\.[\w-]+$/i.test(e),gi=(e,t,n)=>{for(let t of e)if(n.startsWith(t.name)){let e=Gr.parse(t.uri).fsPath,r=n.split(Nr.sep);return r.shift(),Gr.file((0,Nr.join)(e,r.join())).toString()}return t?Gr.file((0,Nr.join)(t.fsPath,n)).toString():(0,Nr.normalize)(n)},_i=(e,t)=>(e=e.filter(e=>!t.removed.some(t=>t.uri===e.uri)),e=e.filter(e=>!t.added.some(t=>t.uri===e.uri)).concat(t.added),e);var vi;(function(e){e.type=new En.RequestType(`fs/readUri`)})(vi||={});const yi=async(e,t,n,r,i,a,o)=>{if(!t)return Promise.reject(`No schema specified`);if(hi(t)){if(n.length===1&&o){let r=Gr.parse(n[0].uri),i=r.path,a=r.with({path:(0,Nr.join)(i,t)});try{return e.sendRequest(vi.type,a.toString())}catch(t){e.window.showErrorMessage(`failed to get content of '${a}': ${t}`)}}else t=gi(n,r,t)}let s=Gr.parse(t).scheme.toLowerCase();if(/^[a-z]:[\\/]/i.test(t)){let e=Gr.file(t);s=e.scheme.toLowerCase(),t=e.toString()}if(s===`file`){let e=Gr.parse(t).fsPath;return a.readFile(e,`UTF-8`).catch(()=>``)}if(s===`http`||s===`https`){if(i)try{return await e.sendRequest(li.type,t)}catch(e){throw e.message}let n={"Accept-Encoding":`gzip, deflate`,"User-Agent":`yaml-language-server/${typeof process<`u`&&`1.24.0`||`unknown`} (RedHat)${typeof process<`u`&&process.versions?.node?` node/${process.versions.node}`:``}${typeof process<`u`&&process.platform?` (${process.platform})`:``}`};try{return(await(0,Pr.xhr)({url:t,followRedirects:5,headers:n})).responseText}catch(e){throw e.responseText||(0,Pr.getErrorStatusDescription)(e.status)||e.toString()}}return e.sendRequest(ui.type,t)},bi={resolveRelativePath:(e,t)=>Fr.resolve(t,e)};var xi;(function(e){e.JUMP_TO_SCHEMA=`jumpToSchema`})(xi||={});const Si=new class{constructor(){this.commands=/* @__PURE__ */ new Map}executeCommand(e){if(this.commands.has(e.command))return this.commands.get(e.command)(...e.arguments);throw Error(`Command '${e.command}' not found`)}registerCommand(e,t){this.commands.set(e,t)}};function Ci(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function wi(e){return e.replace(/[-\\{}+?|^$.,[\]()#\s]/g,`\\$&`).replace(/[*]/g,`.*`)}function Ti(e,t){if(e.length<t)return 0;for(let n=0;n<t;n++){let t=e.charCodeAt(n);if(t!==32&&t!==9)return n}return t}function Ei(e){let t=``;e=e.replace(/\(\?([ims]+)\)/g,(e,n)=>{for(let e of n)t.includes(e)||(t+=e);return``});try{return new RegExp(e,t+`u`)}catch{try{return new RegExp(e,t)}catch{return}}}function Di(e,t){t++;for(let n=t;n<e.length;n++){let r=e.charAt(n);if(r===` `||r===` `)t++;else return t}return t}function Oi(e){let t=``;Ci(e,`(?i)`)&&(e=e.substring(4),t=`i`);try{return new RegExp(e,t+`u`)}catch{try{return new RegExp(e,t)}catch{return}}}var ki=class{constructor(e){try{this.patternRegExp=RegExp(wi(e)+`$`)}catch{this.patternRegExp=null}this.schemas=[]}addSchema(e){this.schemas.push(e)}matchesPattern(e){return this.patternRegExp&&this.patternRegExp.test(e)}getSchemas(){return this.schemas}};function Ai(e,t){for(let n of e)n.isKubernetes=t}function ji(e,t){for(let n in t){let r=t[n];if(new ki(r).matchesPattern(e.uri))return!0}return!1}var Mi=class{constructor(e,t,n,r){this.connection=e,this.languageService=t,this.yamlSettings=n,this.validationHandler=r,this.pendingLimitExceededWarnings={}}registerHandlers(){this.connection.onDocumentLinks(e=>this.documentLinkHandler(e)),this.connection.onDocumentSymbol(e=>this.documentSymbolHandler(e)),this.connection.onDocumentFormatting(e=>this.formatterHandler(e)),this.connection.onHover(e=>this.hoverHandler(e)),this.connection.onCompletion(e=>this.completionHandler(e)),this.connection.onDidChangeWatchedFiles(e=>this.watchedFilesHandler(e)),this.connection.onFoldingRanges(e=>this.foldingRangeHandler(e)),this.connection.onSelectionRanges(e=>this.selectionRangeHandler(e)),this.connection.onCodeAction(e=>this.codeActionHandler(e)),this.connection.onDocumentOnTypeFormatting(e=>this.formatOnTypeHandler(e)),this.connection.onCodeLens(e=>this.codeLensHandler(e)),this.connection.onCodeLensResolve(e=>this.codeLensResolveHandler(e)),this.connection.onDefinition(e=>this.definitionHandler(e)),this.connection.onPrepareRename(e=>this.prepareRenameHandler(e)),this.connection.onRenameRequest(e=>this.renameHandler(e)),this.yamlSettings.documents.onDidChangeContent(e=>this.cancelLimitExceededWarnings(e.document.uri)),this.yamlSettings.documents.onDidClose(e=>this.cancelLimitExceededWarnings(e.document.uri))}documentLinkHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);return t?this.languageService.findLinks(t):Promise.resolve([])}documentSymbolHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);if(!t)return;let n=this.onResultLimitExceeded(t.uri,this.yamlSettings.maxItemsComputed,`document symbols`),r={resultLimit:this.yamlSettings.maxItemsComputed,onResultLimitExceeded:n};return this.yamlSettings.hierarchicalDocumentSymbolSupport?this.languageService.findDocumentSymbols2(t,r):this.languageService.findDocumentSymbols(t,r)}async formatterHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);if(!t||!await this.resolveFormatterState(t))return[];let n={tabWidth:e.options.tabSize,...this.yamlSettings.yamlFormatterSettings};return this.languageService.doFormat(t,n)}formatOnTypeHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);if(t)return this.languageService.doDocumentOnTypeFormatting(t,e)}hoverHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);return t?this.languageService.doHover(t,e.position):Promise.resolve(void 0)}completionHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);return t?this.languageService.doComplete(t,e.position,ji(t,this.yamlSettings.specificValidatorPaths)):Promise.resolve({items:[],isIncomplete:!1})}watchedFilesHandler(e){let t=!1;e.changes.forEach(e=>{this.languageService.resetSchema(e.uri)&&(t=!0)}),t&&this.yamlSettings.documents.all().forEach(e=>this.validationHandler.validate(e))}foldingRangeHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);if(!t)return;let n=this.yamlSettings.capabilities.textDocument.foldingRange,r=this.yamlSettings.maxItemsComputed||n.rangeLimit,i={rangeLimit:r,onRangeLimitExceeded:this.onResultLimitExceeded(t.uri,r,`folding ranges`),lineFoldingOnly:n.lineFoldingOnly};return this.languageService.getFoldingRanges(t,i)}selectionRangeHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);if(t)return this.languageService.getSelectionRanges(t,e.positions)}codeActionHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);if(t)return this.languageService.getCodeAction(t,e)}async codeLensHandler(e){await this.yamlSettings.configurationPullPromise;let t=this.yamlSettings.documents.get(e.textDocument.uri);if(t)return this.languageService.getCodeLens(t)}codeLensResolveHandler(e){return this.languageService.resolveCodeLens(e)}definitionHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);if(t)return this.languageService.doDefinition(t,e)}prepareRenameHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);return t?this.languageService.prepareRename(t,e):null}renameHandler(e){let t=this.yamlSettings.documents.get(e.textDocument.uri);return t?this.languageService.doRename(t,e):null}cancelLimitExceededWarnings(e){let t=this.pendingLimitExceededWarnings[e];t&&t.timeout&&(clearTimeout(t.timeout),delete this.pendingLimitExceededWarnings[e])}onResultLimitExceeded(e,t,n){return()=>{let r=this.pendingLimitExceededWarnings[e];if(r){if(!r.timeout)return;r.features[n]=n,r.timeout.refresh()}else r={features:{[n]:n}},r.timeout=setTimeout(()=>{this.connection.sendNotification(ci.type,`${Nr.basename(e)}: For performance reasons, ${Object.keys(r.features).join(` and `)} have been limited to ${t} items.`),r.timeout=void 0},2e3),this.pendingLimitExceededWarnings[e]=r}}async resolveFormatterState(e){let t=this.yamlSettings.yamlFormatterSettings.enable!==!1;if(this.yamlSettings.hasConfigurationCapability&&this.connection.workspace?.getConfiguration)try{let t=await this.connection.workspace.getConfiguration({section:`[${e.languageId}]`,scopeUri:e.uri});if(typeof t?.[`yaml.format.enable`]==`boolean`)return t[`yaml.format.enable`]}catch{}return t}},Ni=class{constructor(e,t,n,r){this.connection=e,this.languageService=t,this.yamlSettings=n,this.settingsHandler=r}registerHandlers(){this.connection.onNotification(ai.type,e=>this.schemaAssociationNotificationHandler(e)),this.connection.onNotification(oi.type,()=>this.dynamicSchemaRequestHandler()),this.connection.onNotification(si.type,()=>this.vscodeContentRequestHandler()),this.connection.onNotification(mi.type,()=>this.schemaSelectionRequestHandler())}schemaAssociationNotificationHandler(e){this.yamlSettings.schemaAssociations=e,this.yamlSettings.specificValidatorPaths=[],this.settingsHandler.pullConfiguration().catch(e=>console.log(e))}dynamicSchemaRequestHandler(){this.languageService.registerCustomSchemaProvider((e=>this.connection.sendRequest(di.type,e)))}vscodeContentRequestHandler(){this.yamlSettings.useVSCodeContentRequest=!0}schemaSelectionRequestHandler(){this.yamlSettings.useSchemaSelectionRequests=!0}},Pi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;let a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),Fi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=Pi();var n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;let o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=/* @__PURE__ */ new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||/* @__PURE__ */ new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Ii=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=Pi(),n=Fi();var r=Pi();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=Fi();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ee(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(te(t),n instanceof e?[n]:n.nodes);if(t!==!1&&this.nodes.length)return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
999
|
+
`:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=/* @__PURE__ */ new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){return e instanceof t.Name?i(e):a(e)?new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[])):e;function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function ee(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function te(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${P(e)}`}e.not=te;let A=N(e.operators.AND);function j(...e){return e.reduce(A)}e.and=j;let ne=N(e.operators.OR);function M(...e){return e.reduce(ne)}e.or=M;function N(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${P(n)} ${e} ${P(r)}`}function P(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),Li=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let t=Ii(),n=Pi();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0||(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0||{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0||(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0||Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;let _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),Ri=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),zi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=Ii(),n=Li(),r=Ri();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){
|
|
1000
|
+
/* istanbul ignore if */
|
|
1001
|
+
if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}let u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),Bi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=zi(),n=Ii(),r=Ri(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),Vi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;let t=/* @__PURE__ */ new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Hi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),Ui=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let t=Vi(),n=Hi(),r=zi(),i=Ii(),a=Li();var o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;let u=/* @__PURE__ */ new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
|
|
1002
|
+
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
|
|
1003
|
+
|| (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
|
|
1004
|
+
|| ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;let g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),Wi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=Ii(),n=Li();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),Gi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=Ii(),n=Li(),r=Ri(),i=Li();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;let h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;
|
|
1005
|
+
/* istanbul ignore if */
|
|
1006
|
+
if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),Ki=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=Ii(),n=Ri(),r=Gi(),i=zi();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){
|
|
1007
|
+
/* istanbul ignore if */
|
|
1008
|
+
if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),qi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=Ii(),n=Li();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=/* @__PURE__ */ new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),Ji=/* @__PURE__ */ s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Yi=/* @__PURE__ */ s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else(p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Xi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=Li(),n=Ji(),r=Yi(),i=/* @__PURE__ */ new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;let o=/* @__PURE__ */ new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;let d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;let m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=/* @__PURE__ */ new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return/* @__PURE__ */ Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Zi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=Bi(),n=Ui(),r=Hi(),i=Ui(),a=Wi(),o=Ki(),s=qi(),c=Ii(),l=Ri(),u=Xi(),d=Li(),f=zi();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&ee(e),D(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),te(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&ee(e),O(e),k(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),E(e)}function T(e,t){if(e.opts.jtd)return j(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);j(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function E(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function D(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function O(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function k(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function ee({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function te(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&A(e),t.return((0,c._)`${l.default.errors} === 0`))}function A({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function j(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>ie(e,`$ref`,h.all.$ref.definition));return}p.jtd||M(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),ne(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):ne(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function ne(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&ie(e,n.keyword,n.definition,t.type)})}function M(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(N(e,t),e.opts.allowUnionTypes||P(e,t),F(e,e.dataTypes))}function N(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{re(e.dataTypes,t)||R(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),L(e,t)}}function P(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&R(e,`use allowUnionTypes to allow union type keyword`)}function F(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>I(t,e))&&R(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function I(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function re(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function L(e,t){let n=[];for(let r of e.dataTypes)re(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function R(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var z=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,se(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){
|
|
1009
|
+
/* istanbul ignore if */
|
|
1010
|
+
if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=z;function ie(e,t,n,r){let i=new z(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}let ae=/^\/(?:[^~]|~0|~1)*$/,oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!ae.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=oe.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=se})),Qi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),$i=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Xi();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),ea=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=Ii(),n=Qi(),r=Ri(),i=Xi(),a=Li(),o=Zi();var s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:/* @__PURE__ */ new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;let h=/* @__PURE__ */ new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),ta=/* @__PURE__ */ c({$id:()=>na,additionalProperties:()=>!1,default:()=>sa,description:()=>ra,properties:()=>oa,required:()=>aa,type:()=>ia}),na,ra,ia,aa,oa,sa,ca=o((()=>{na=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,ra=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,ia=`object`,aa=[`$data`],oa={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},sa={$id:na,description:ra,type:ia,required:aa,properties:oa,additionalProperties:!1}})),la=/* @__PURE__ */ s(((e,t)=>{let n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^\d*$/u),a=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),l=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),u=Array(256);{let e=`0123456789ABCDEF`;for(let t=0;t<256;t++)u[t]=`%`+e[t>>4]+e[t&15]}function d(e){return e<2048?u[192|e>>6]+u[128|e&63]:e<65536?u[224|e>>12]+u[128|e>>6&63]+u[128|e&63]:u[240|e>>18]+u[128|e>>12&63]+u[128|e>>6&63]+u[128|e&63]}function f(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}let p=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),h=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),g=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function _(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!h(e[t])){if(e[t]===`%`&&t+2<e.length&&a(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function v(e){let t=-1,n=0,r=-1,i=0;for(let a=0;a<e.length;a++)e[a]===`0`?(r===-1&&(r=a),i++,i>n&&(n=i,t=r)):(r=-1,i=0);if(n<2)return e.join(`:`);let a=e.slice(0,t).join(`:`),o=e.slice(t+n).join(`:`);return a+`::`+o}function y(e){let t=e.indexOf(`::`);if(t!==-1&&e.indexOf(`::`,t+1)!==-1)return;let n=t===-1?e.split(`:`):e.slice(0,t).split(`:`),i=t===-1?[]:e.slice(t+2).split(`:`);t!==-1&&(n.length===1&&n[0]===``&&(n.length=0),i.length===1&&i[0]===``&&(i.length=0));let a=n.concat(i),o=0;for(let e=0;e<a.length;e++){let n=a[e];if(n===``)return;if(n.indexOf(`.`)!==-1){if(e!==a.length-1||t!==-1&&i.length===0||!r(n))return;o+=2;continue}if(!p(n))return;a[e]=parseInt(n,16).toString(16),o++}if(t===-1)return o===8?v(a):void 0;if(o>=8)return;let s=a.slice(0,n.length);for(let e=o;e<8;e++)s.push(`0`);for(let e=n.length;e<a.length;e++)s.push(a[e]);return v(s)}function b(e){let t=e[0]===`[`&&e[e.length-1]===`]`;if((e[0]===`[`||e[e.length-1]===`]`)&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&m(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(x(n,`:`)<2)return{host:e,isIPV6:!1,error:t};let r=``,i=n.indexOf(`%`);if(i!==-1){let t=n.slice(i,i+3).toLowerCase()===`%25`?3:1;if(r=n.slice(i+t),!_(r))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,i)}let a=y(n);return a===void 0?{host:e,isIPV6:!1,error:!0}:{host:a+(r?`%`+r:``),escapedHost:a+(r?`%25`+r:``),isIPV6:!0}}function x(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function S(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}n.push(t);break}if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}let C={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},w=/[@/?#:]/g,T=/[@/?#]/g;function E(e,t){let n=t?T:w;return n.lastIndex=0,e.replace(n,e=>C[e])}function D(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let i=e.slice(r+1,r+3);if(a(i)){let e=i.toUpperCase(),a=String.fromCharCode(parseInt(e,16));t&&o(a)?n+=a:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function O(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&o(i)?t+=i:t+=`%`+e,n+=2;continue}}if(s(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=ne(i)?r:u[i];else if(i<55296||i>57343)t+=d(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function k(e,t=!1){let n=``,r=t&&e[0]!==`/`;for(let t=0;t<e.length;t++){let i=e[t];if(i===`%`&&t+2<e.length){let r=e.slice(t+1,t+3);if(a(r)){n+=`%`+r.toUpperCase(),t+=2;continue}}if(i===`/`&&(r=!1),s(i)&&(i!==`:`||!r))n+=i;else{let r=e.charCodeAt(t);if(r<128)n+=u[r];else if(r<55296||r>57343)n+=d(r);else if(r<=56319&&t+1<e.length){let i=e.charCodeAt(t+1);i>=56320&&i<=57343?(n+=d(65536+(r-55296<<10)+(i-56320)),t++):n+=d(65533)}else n+=d(65533)}}return n}function ee(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`%`&&r+2<e.length){let t=e.slice(r+1,r+3);if(a(t)){n+=`%`+t.toUpperCase(),r+=2;continue}}if(t(i))n+=i;else{let t=e.charCodeAt(r);if(t<128)n+=u[t];else if(t<55296||t>57343)n+=d(t);else if(t<=56319&&r+1<e.length){let i=e.charCodeAt(r+1);i>=56320&&i<=57343?(n+=d(65536+(t-55296<<10)+(i-56320)),r++):n+=d(65533)}else n+=d(65533)}}return n}function te(e){return ee(e,l)}function A(e){return ee(e,c)}function j(e){return ee(e,c)}function ne(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function M(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));o(i)?t+=i:t+=`%`+e,n+=2;continue}}if(c(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=ne(i)?r:u[i];else if(i<55296||i>57343)t+=d(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function N(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function P(e){let t=[];if(e.userinfo!==void 0&&(t.push(te(e.userinfo)),t.push(`@`)),e.host!==void 0){let n=e.host;if(!r(n)){let e=b(n);e.isIPV6!==!0&&e.isIPVFuture!==!0&&(n=D(n,!0),e=b(n)),n=e.isIPV6===!0||e.isIPVFuture===!0?`[${e.escapedHost}]`:E(n,!1)}t.push(n)}if(typeof e.port==`number`||typeof e.port==`string`){let n=String(e.port);if(!i(n))throw TypeError(`URI port is malformed.`);t.push(`:`),t.push(n)}return t.length?t.join(``):void 0}t.exports={nonSimpleDomain:g,recomposeAuthority:P,reescapeHostDelimiters:E,normalizePercentEncoding:D,normalizePathEncoding:O,serializePathEncoding:k,normalizeQueryFragmentEncoding:M,encodeUserinfo:te,encodeQuery:A,encodeFragment:j,escapePreservingEscapes:N,removeDotSegments:S,isIPv4:r,isUUID:n,normalizeIPv6:b,stringArrayToHexStripped:f}})),ua=/* @__PURE__ */ s(((e,t)=>{let{isUUID:n}=la(),r=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf(`?`),n=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=n&&n!==`/`?n:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n&&n[0]===e.path){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}let h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),da=/* @__PURE__ */ s(((e,t)=>{let{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,serializePathEncoding:s,normalizeQueryFragmentEncoding:c,encodeQuery:l,encodeFragment:u,reescapeHostDelimiters:d,isIPv4:f,nonSimpleDomain:p}=la(),{SCHEMES:m,getSchemeHandler:h}=ua(),g=/^[A-Za-z][A-Za-z0-9+.-]*$/u,_=`URI scheme is malformed.`;function v(e){let t=unescape(String(e));if(!g.test(t))throw TypeError(_);return t}function y(e,t){return typeof e==`string`?e=ne(e,t):typeof e==`object`&&(e=j(C(e,t),t)),e}function b(e,t,r){let i=r?Object.assign({scheme:`null`},r):{scheme:`null`},{parsed:a,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:c,malformedHost:l,malformedScheme:u}=A(e,i),{parsed:d,malformedAuthorityOrPort:p,malformedPercentEncoding:m,malformedSchemeSpecific:g,malformedHost:_,malformedScheme:v}=A(t,i);if(o||p||s||m||c||g||l||_||u||v)throw Error(a.error||d.error||`URI is malformed.`);let y=x(a,d,i,!0),b=h(r&&r.scheme||y.scheme),S=y.host,w=S!==void 0&&S!==``&&(f(S)||n(S).isIPV6);te(y,r||{},b,w);let T=S&&S.indexOf(`%`)!==-1&&!/\P{ASCII}/u.test(S);if(y.error&&!T)throw Error(y.error);return i.skipEscape=!0,C(y,i)}function x(e,t,n,i){let a={};return i||(e=j(C(e,n),n),t=j(C(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):(a.path=(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?`/`+t.path:e.path?e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,a.query=t.query===void 0?e.query:t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function S(e,t,n){let r=N(e,n),i=N(t,n);return r!==void 0&&i!==void 0&&r===i}function C(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[];n.scheme&&=v(n.scheme);let d=h(o.scheme||n.scheme);d&&d.serialize&&d.serialize(n,o);let f=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,p=!o.skipEscape&&n.scheme===void 0&&!f;n.path!==void 0&&(n.path=o.skipEscape?a(n.path):s(n.path,p)),o.reference!==`suffix`&&n.scheme&&(n.scheme=v(n.scheme),c.push(n.scheme,`:`));let m=i(n);if(m!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(m),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!d||!d.absolutePath)&&(e=r(e)),p&&(e=s(e,!0)),m===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,l(n.query)),n.fragment!==void 0&&c.push(`#`,u(n.fragment)),c.join(``)}let w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,T=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,E=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function D(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function O(e){if(e===void 0)return!1;let t=e.indexOf(`%`);for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf(`%`,t+3)}return!1}function k(e){return e[0]===`[`&&e[e.length-1]===`]`}function ee(e){let t=e[4];return O(e[3])||t!==void 0&&!k(t)&&O(t)||O(e[6])||O(e[7])||O(e[8])}function te(e,t,n,r){if(!t.unicodeSupport&&(!n||!n.unicodeSupport)&&e.host&&!k(e.host)&&(t.domainHost||n&&n.domainHost)&&r===!1&&p(e.host))try{e.host=new URL(`http://`+e.host).hostname}catch(t){return e.error=e.error||`Host's domain name can not be converted to ASCII: `+t,!0}return!1}function A(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},s=!1,l=!1,u=!1,p=!1,v=!1,y=!1,b=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let x=e.match(T);x!==null&&x[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,s=!0);let S=e.match(E);if(S!==null){let e=S[1],t=e.replace(/[\t\n\r]/g,``);t.length>=2&&(t.slice(0,2)===`//`?e.length!==t.length&&(i.error=i.error||`URI authority introducer must not contain whitespace.`,s=!0):(i.error=i.error||`URI authority must not contain a literal backslash.`,s=!0))}let C=e.match(w);if(C){if(i.scheme=C[1],i.userinfo=C[3],i.host=C[4],i.port=parseInt(C[5],10),i.path=C[6]||``,i.query=C[7],i.fragment=C[8],i.scheme!==void 0){let e=unescape(i.scheme);g.test(e)?i.scheme=e.toLowerCase():(i.error=i.error||_,y=!0)}l=ee(C),l&&(i.error=i.error||`URI contains malformed percent-encoding.`),isNaN(i.port)&&(i.port=C[5]);let t=D(i,C);if(t!==void 0&&(i.error=i.error||t,s=!0),i.host){if(f(i.host)===!1){let e=k(i.host),t=i.host.indexOf(`[`)!==-1||i.host.indexOf(`]`)!==-1,r=n(i.host);b=r.isIPV6||r.isIPVFuture===!0,v=t&&(!e||r.error===!0),i.host=b?r.host:r.host.toLowerCase(),v&&(i.error=i.error||`URI host is malformed.`,s=!0)}else b=!0}i.reference=i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?`same-document`:i.scheme===void 0?`relative`:i.fragment===void 0?`absolute`:`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let x=h(r.scheme||i.scheme);if(v||(p=te(i,r,x,b)),e.indexOf(`%`)!==-1&&i.host!==void 0&&!v){let e=b?i.host:a(i.host,!0);b||(e=a(e.toLowerCase())),i.host=d(e,b)}(!x||x&&!x.skipNormalize)&&(i.path&&=o(i.path),i.query&&=c(i.query),i.fragment&&=c(i.fragment)),x&&x.parse&&(x.parse(i,r),x===m.urn&&i.nid===void 0&&(u=!0))}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:s,malformedPercentEncoding:l,malformedSchemeSpecific:u,malformedHost:p,malformedScheme:y}}function j(e,t){return A(e,t).parsed}function ne(e,t){return M(e,t).normalized}function M(e,t){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}=A(e,t);return{normalized:r||i||a||o||s?e:C(n,t),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}}function N(e,t){if(typeof e!=`string`&&typeof e!=`object`)return;let n;try{n=typeof e==`string`?e:C(e,t)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:a,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:c}=M(n,t);return i||a||o||s||c?void 0:r}let P={SCHEMES:m,normalize:y,resolve:b,resolveComponent:x,equal:S,serialize:C,parse:j};t.exports=P,t.exports.default=P,t.exports.fastUri=P})),fa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=da();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),pa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Zi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Ii();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});let r=Qi(),i=$i(),a=Vi(),o=ea(),s=Ii(),c=Xi(),l=Ui(),u=Li(),f=(ca(),d(ta).default),p=fa(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;let h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=/* @__PURE__ */ new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`};function y(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??200,loopEnum:e.loopEnum??200,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var b=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=/* @__PURE__ */ new Set,this._loading={},this._cache=/* @__PURE__ */ new Map,e=this.opts={...e,...y(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=O(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),x.call(this,_,e,`NOT SUPPORTED`),x.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=E.call(this),e.formats&&w.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&T.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),C.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=S.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=S.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(ee.call(this,n,t),!t)return(0,u.eachItem)(n,e=>te.call(this,e)),this;j.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>te.call(this,e,r):e=>r.type.forEach(t=>te.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=M(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){
|
|
1011
|
+
/* istanbul ignore if */
|
|
1012
|
+
if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};b.ValidationError=r.default,b.MissingRefError=i.default,e.default=b;function x(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function S(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function C(){let e=this.opts.schemas;if(e){if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}}function w(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function T(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function E(){let e={...this.opts};for(let t of h)delete e[t];return e}let D={log(){},warn(){},error(){}};function O(e){if(e===!1)return D;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}let k=/^[a-z_$][a-z0-9_$:-]*$/i;function ee(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!k.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function te(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?A.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function A(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function j(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=M(t)),e.validateSchema=this.compile(t,!0))}let ne={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function M(e){return{anyOf:[e,ne]}}})),ma=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),ha=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=$i(),n=Gi(),r=Ii(),i=Ri(),a=ea(),o=Li(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);return h instanceof a.SchemaEnv?_(h):v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0){if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}}if(l.items!==!0){if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}}e.callRef=l,e.default=s})),ga=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ma(),n=ha();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),_a=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),va=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),ya=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),ba=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li(),r=ya();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),xa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Gi(),n=Li(),r=Ii();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),Sa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),Ca=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Gi(),n=Ii(),r=Li();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),wa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),Ta=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ji();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Ea=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ui(),n=Ii(),r=Li(),i=Ta();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),Da=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li(),r=Ta();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),Oa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li(),r=Ta();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{
|
|
1013
|
+
/* istanbul ignore if */
|
|
1014
|
+
if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),ka=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_a(),n=va(),r=ba(),i=xa(),a=Sa(),o=Ca(),s=wa(),c=Ea(),l=Da(),u=Oa();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),Aa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=Ii(),n=Li(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),ja=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=Ii(),n=Li(),r=Gi(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),Ma=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ja();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),Na=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li(),r=Gi(),i=Aa();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Pa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Fa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=Ii(),n=Li(),r=Gi();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
|
|
1015
|
+
missingProperty: ${i},
|
|
1016
|
+
depsCount: ${n},
|
|
1017
|
+
deps: ${r}}`};let i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Ia=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),La=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Gi(),n=Ii(),r=Ri(),i=Li();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;
|
|
1018
|
+
/* istanbul ignore if */
|
|
1019
|
+
if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),Ra=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Zi(),n=Gi(),r=Li(),i=La();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),za=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Gi(),n=Ii(),r=Li(),i=Li();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),Ba=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Li();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Va=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:Gi().validateUnion,error:{message:`must match a schema in anyOf`}}})),Ha=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;
|
|
1020
|
+
/* istanbul ignore if */
|
|
1021
|
+
if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Ua=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Li();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;
|
|
1022
|
+
/* istanbul ignore if */
|
|
1023
|
+
if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),Wa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Ga=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Li();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Ka=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Aa(),n=Ma(),r=ja(),i=Na(),a=Pa(),o=Fa(),s=Ia(),c=La(),l=Ra(),u=za(),d=Ba(),f=Va(),p=Ha(),m=Ua(),h=Wa(),g=Ga();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),qa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Ja=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[qa().default]})),Ya=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Xa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ga(),n=ka(),r=Ka(),i=Ja(),a=Ya();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Za=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Qa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Za(),r=ea(),i=$i(),a=Li();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),$a=/* @__PURE__ */ c({$id:()=>to,$schema:()=>eo,default:()=>oo,definitions:()=>ro,properties:()=>ao,title:()=>no,type:()=>io}),eo,to,no,ro,io,ao,oo,so=o((()=>{eo=`http://json-schema.org/draft-07/schema#`,to=`http://json-schema.org/draft-07/schema#`,no=`Core schema meta-schema`,ro={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},io=[`object`,`boolean`],ao={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},oo={$schema:eo,$id:to,title:no,definitions:ro,type:io,properties:ao,default:!0}})),co=/* @__PURE__ */ s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let n=pa(),r=Xa(),i=Qa(),a=(so(),d($a).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`;var c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=Zi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Ii();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=Qi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=$i();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),lo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=Ii(),n=Ri(),r=ea(),i=ha(),a={keyword:`$dynamicAnchor`,schemaType:`string`,code:e=>o(e,e.schema)};function o(e,r){let{gen:i,it:a}=e;a.schemaEnv.root.dynamicAnchors[r]=!0;let o=(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(r)}`,c=a.errSchemaPath===`#`?a.validateName:s(e);i.if((0,t._)`!${o}`,()=>i.assign(o,c))}e.dynamicAnchor=o;function s(e){let{schemaEnv:t,schema:n,self:a}=e.it,{root:o,baseId:s,localRefs:c,meta:l}=t.root,{schemaId:u}=a.opts,d=new r.SchemaEnv({schema:n,schemaId:u,root:o,baseId:s,localRefs:c,meta:l});return r.compileSchema.call(a,d),(0,i.getValidate)(e,d)}e.default=a})),uo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=Ii(),n=Ri(),r=ha(),i={keyword:`$dynamicRef`,schemaType:`string`,code:e=>a(e,e.schema)};function a(e,i){let{gen:a,keyword:o,it:s}=e;if(i[0]!==`#`)throw Error(`"${o}" only supports hash fragment reference`);let c=i.slice(1);if(s.allErrors)l();else{let t=a.let(`valid`,!1);l(t),e.ok(t)}function l(e){if(s.schemaEnv.root.dynamicAnchors[c]){let r=a.let(`_v`,(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(c)}`);a.if(r,u(r,e),u(s.validateName,e))}else u(s.validateName,e)()}function u(t,n){return n?()=>a.block(()=>{(0,r.callRef)(e,t),a.let(n,!0)}):()=>(0,r.callRef)(e,t)}}e.dynamicRef=a,e.default=i})),fo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lo(),n=Li();e.default={keyword:`$recursiveAnchor`,schemaType:`boolean`,code(e){e.schema?(0,t.dynamicAnchor)(e,``):(0,n.checkStrictMode)(e.it,`$recursiveAnchor: false is ignored`)}}})),po=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=uo();e.default={keyword:`$recursiveRef`,schemaType:`string`,code:e=>(0,t.dynamicRef)(e,e.schema)}})),mo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lo(),n=uo(),r=fo(),i=po();e.default=[t.default,n.default,r.default,i.default]})),ho=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Fa();e.default={keyword:`dependentRequired`,type:`object`,schemaType:`object`,error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}})),go=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Fa();e.default={keyword:`dependentSchemas`,type:`object`,schemaType:`object`,code:e=>(0,t.validateSchemaDeps)(e)}})),_o=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Li();e.default={keyword:[`maxContains`,`minContains`],type:`array`,schemaType:`number`,code({keyword:e,parentSchema:n,it:r}){n.contains===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}})),vo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ho(),n=go(),r=_o();e.default=[t.default,n.default,r.default]})),yo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li(),r=Ri();e.default={keyword:`unevaluatedProperties`,type:`object`,schemaType:[`boolean`,`object`],trackErrors:!0,error:{message:`must NOT have unevaluated properties`,params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:i,schema:a,data:o,errsCount:s,it:c}=e;
|
|
1024
|
+
/* istanbul ignore if */
|
|
1025
|
+
if(!s)throw Error(`ajv implementation error`);let{allErrors:l,props:u}=c;u instanceof t.Name?i.if((0,t._)`${u} !== true`,()=>i.forIn(`key`,o,e=>i.if(f(u,e),()=>d(e)))):u!==!0&&i.forIn(`key`,o,e=>u===void 0?d(e):i.if(p(u,e),()=>d(e))),c.props=!0,e.ok((0,t._)`${s} === ${r.default.errors}`);function d(r){if(a===!1){e.setParams({unevaluatedProperty:r}),e.error(),l||i.break();return}if(!(0,n.alwaysValidSchema)(c,a)){let a=i.name(`valid`);e.subschema({keyword:`unevaluatedProperties`,dataProp:r,dataPropType:n.Type.Str},a),l||i.if((0,t.not)(a),()=>i.break())}}function f(e,n){return(0,t._)`!${e} || !${e}[${n}]`}function p(e,n){let r=[];for(let i in e)e[i]===!0&&r.push((0,t._)`${n} !== ${i}`);return(0,t.and)(...r)}}}})),bo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ii(),n=Li();e.default={keyword:`unevaluatedItems`,type:`array`,schemaType:[`boolean`,`object`],error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e,s=o.items||0;if(s===!0)return;let c=r.const(`len`,(0,t._)`${a}.length`);if(i===!1)e.setParams({len:s}),e.fail((0,t._)`${c} > ${s}`);else if(typeof i==`object`&&!(0,n.alwaysValidSchema)(o,i)){let n=r.var(`valid`,(0,t._)`${c} <= ${s}`);r.if((0,t.not)(n),()=>l(n,s)),e.ok(n)}o.items=!0;function l(i,a){r.forRange(`i`,a,c,a=>{e.subschema({keyword:`unevaluatedItems`,dataProp:a,dataPropType:n.Type.Num},i),o.allErrors||r.if((0,t.not)(i),()=>r.break())})}}}})),xo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=yo(),n=bo();e.default=[t.default,n.default]})),So=/* @__PURE__ */ c({$id:()=>wo,$recursiveAnchor:()=>!0,$schema:()=>Co,$vocabulary:()=>To,allOf:()=>Do,default:()=>Ao,properties:()=>ko,title:()=>Eo,type:()=>Oo}),Co,wo,To,Eo,Do,Oo,ko,Ao,jo=o((()=>{Co=`https://json-schema.org/draft/2019-09/schema`,wo=`https://json-schema.org/draft/2019-09/schema`,To={"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},Eo=`Core and Validation specifications meta-schema`,Do=[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format`},{$ref:`meta/content`}],Oo=[`object`,`boolean`],ko={definitions:{$comment:`While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.`,type:`object`,additionalProperties:{$recursiveRef:`#`},default:{}},dependencies:{$comment:`"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"`,type:`object`,additionalProperties:{anyOf:[{$recursiveRef:`#`},{$ref:`meta/validation#/$defs/stringArray`}]}}},Ao={$schema:Co,$id:wo,$vocabulary:To,$recursiveAnchor:!0,title:Eo,allOf:Do,type:Oo,properties:ko}})),Mo=/* @__PURE__ */ c({$defs:()=>zo,$id:()=>Po,$recursiveAnchor:()=>!0,$schema:()=>No,$vocabulary:()=>Fo,default:()=>Bo,properties:()=>Ro,title:()=>Io,type:()=>Lo}),No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo=o((()=>{No=`https://json-schema.org/draft/2019-09/schema`,Po=`https://json-schema.org/draft/2019-09/meta/applicator`,Fo={"https://json-schema.org/draft/2019-09/vocab/applicator":!0},Io=`Applicator vocabulary meta-schema`,Lo=[`object`,`boolean`],Ro={additionalItems:{$recursiveRef:`#`},unevaluatedItems:{$recursiveRef:`#`},items:{anyOf:[{$recursiveRef:`#`},{$ref:`#/$defs/schemaArray`}]},contains:{$recursiveRef:`#`},additionalProperties:{$recursiveRef:`#`},unevaluatedProperties:{$recursiveRef:`#`},properties:{type:`object`,additionalProperties:{$recursiveRef:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$recursiveRef:`#`},propertyNames:{format:`regex`},default:{}},dependentSchemas:{type:`object`,additionalProperties:{$recursiveRef:`#`}},propertyNames:{$recursiveRef:`#`},if:{$recursiveRef:`#`},then:{$recursiveRef:`#`},else:{$recursiveRef:`#`},allOf:{$ref:`#/$defs/schemaArray`},anyOf:{$ref:`#/$defs/schemaArray`},oneOf:{$ref:`#/$defs/schemaArray`},not:{$recursiveRef:`#`}},zo={schemaArray:{type:`array`,minItems:1,items:{$recursiveRef:`#`}}},Bo={$schema:No,$id:Po,$vocabulary:Fo,$recursiveAnchor:!0,title:Io,type:Lo,properties:Ro,$defs:zo}})),Ho=/* @__PURE__ */ c({$id:()=>Wo,$recursiveAnchor:()=>!0,$schema:()=>Uo,$vocabulary:()=>Go,default:()=>Yo,properties:()=>Jo,title:()=>Ko,type:()=>qo}),Uo,Wo,Go,Ko,qo,Jo,Yo,Xo=o((()=>{Uo=`https://json-schema.org/draft/2019-09/schema`,Wo=`https://json-schema.org/draft/2019-09/meta/content`,Go={"https://json-schema.org/draft/2019-09/vocab/content":!0},Ko=`Content vocabulary meta-schema`,qo=[`object`,`boolean`],Jo={contentMediaType:{type:`string`},contentEncoding:{type:`string`},contentSchema:{$recursiveRef:`#`}},Yo={$schema:Uo,$id:Wo,$vocabulary:Go,$recursiveAnchor:!0,title:Ko,type:qo,properties:Jo}})),Zo=/* @__PURE__ */ c({$id:()=>$o,$recursiveAnchor:()=>!0,$schema:()=>Qo,$vocabulary:()=>es,default:()=>is,properties:()=>rs,title:()=>ts,type:()=>ns}),Qo,$o,es,ts,ns,rs,is,as=o((()=>{Qo=`https://json-schema.org/draft/2019-09/schema`,$o=`https://json-schema.org/draft/2019-09/meta/core`,es={"https://json-schema.org/draft/2019-09/vocab/core":!0},ts=`Core vocabulary meta-schema`,ns=[`object`,`boolean`],rs={$id:{type:`string`,format:`uri-reference`,$comment:`Non-empty fragments not allowed.`,pattern:`^[^#]*#?$`},$schema:{type:`string`,format:`uri`},$anchor:{type:`string`,pattern:`^[A-Za-z][-A-Za-z0-9.:_]*$`},$ref:{type:`string`,format:`uri-reference`},$recursiveRef:{type:`string`,format:`uri-reference`},$recursiveAnchor:{type:`boolean`,default:!1},$vocabulary:{type:`object`,propertyNames:{type:`string`,format:`uri`},additionalProperties:{type:`boolean`}},$comment:{type:`string`},$defs:{type:`object`,additionalProperties:{$recursiveRef:`#`},default:{}}},is={$schema:Qo,$id:$o,$vocabulary:es,$recursiveAnchor:!0,title:ts,type:ns,properties:rs}})),os=/* @__PURE__ */ c({$id:()=>cs,$recursiveAnchor:()=>!0,$schema:()=>ss,$vocabulary:()=>ls,default:()=>ps,properties:()=>fs,title:()=>us,type:()=>ds}),ss,cs,ls,us,ds,fs,ps,ms=o((()=>{ss=`https://json-schema.org/draft/2019-09/schema`,cs=`https://json-schema.org/draft/2019-09/meta/format`,ls={"https://json-schema.org/draft/2019-09/vocab/format":!0},us=`Format vocabulary meta-schema`,ds=[`object`,`boolean`],fs={format:{type:`string`}},ps={$schema:ss,$id:cs,$vocabulary:ls,$recursiveAnchor:!0,title:us,type:ds,properties:fs}})),hs=/* @__PURE__ */ c({$id:()=>_s,$recursiveAnchor:()=>!0,$schema:()=>gs,$vocabulary:()=>vs,default:()=>Ss,properties:()=>xs,title:()=>ys,type:()=>bs}),gs,_s,vs,ys,bs,xs,Ss,Cs=o((()=>{gs=`https://json-schema.org/draft/2019-09/schema`,_s=`https://json-schema.org/draft/2019-09/meta/meta-data`,vs={"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},ys=`Meta-data vocabulary meta-schema`,bs=[`object`,`boolean`],xs={title:{type:`string`},description:{type:`string`},default:!0,deprecated:{type:`boolean`,default:!1},readOnly:{type:`boolean`,default:!1},writeOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0}},Ss={$schema:gs,$id:_s,$vocabulary:vs,$recursiveAnchor:!0,title:ys,type:bs,properties:xs}})),ws=/* @__PURE__ */ c({$defs:()=>js,$id:()=>Es,$recursiveAnchor:()=>!0,$schema:()=>Ts,$vocabulary:()=>Ds,default:()=>Ms,properties:()=>As,title:()=>Os,type:()=>ks}),Ts,Es,Ds,Os,ks,As,js,Ms,Ns=o((()=>{Ts=`https://json-schema.org/draft/2019-09/schema`,Es=`https://json-schema.org/draft/2019-09/meta/validation`,Ds={"https://json-schema.org/draft/2019-09/vocab/validation":!0},Os=`Validation vocabulary meta-schema`,ks=[`object`,`boolean`],As={multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/$defs/nonNegativeInteger`},minLength:{$ref:`#/$defs/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},maxItems:{$ref:`#/$defs/nonNegativeInteger`},minItems:{$ref:`#/$defs/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxContains:{$ref:`#/$defs/nonNegativeInteger`},minContains:{$ref:`#/$defs/nonNegativeInteger`,default:1},maxProperties:{$ref:`#/$defs/nonNegativeInteger`},minProperties:{$ref:`#/$defs/nonNegativeIntegerDefault0`},required:{$ref:`#/$defs/stringArray`},dependentRequired:{type:`object`,additionalProperties:{$ref:`#/$defs/stringArray`}},const:!0,enum:{type:`array`,items:!0},type:{anyOf:[{$ref:`#/$defs/simpleTypes`},{type:`array`,items:{$ref:`#/$defs/simpleTypes`},minItems:1,uniqueItems:!0}]}},js={nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{$ref:`#/$defs/nonNegativeInteger`,default:0},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},Ms={$schema:Ts,$id:Es,$vocabulary:Ds,$recursiveAnchor:!0,title:Os,type:ks,properties:As,$defs:js}})),Ps=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=(jo(),d(So).default),n=(Vo(),d(Mo).default),r=(Xo(),d(Ho).default),i=(as(),d(Zo).default),a=(ms(),d(os).default),o=(Cs(),d(hs).default),s=(Ns(),d(ws).default),c=[`/properties`];function l(e){return[t,n,r,i,l(this,a),o,l(this,s)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function l(t,n){return e?t.$dataMetaSchema(n,c):n}}e.default=l})),Fs=/* @__PURE__ */ s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let n=pa(),r=Xa(),i=mo(),a=vo(),o=xo(),s=Qa(),c=Ps(),l=`https://json-schema.org/draft/2019-09/schema`;var u=class extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(i.default),r.default.forEach(e=>this.addVocabulary(e)),this.addVocabulary(a.default),this.addVocabulary(o.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(c.default.call(this,e),this.refs[`http://json-schema.org/schema`]=l)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}};e.Ajv2019=u,t.exports=e=u,t.exports.Ajv2019=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var d=Zi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=Ii();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var p=Qi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=$i();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})),Is=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ga(),n=ka(),r=Ka(),i=mo(),a=vo(),o=xo(),s=Ja(),c=Ya();e.default=[i.default,t.default,n.default,(0,r.default)(!0),s.default,c.metadataVocabulary,c.contentVocabulary,a.default,o.default]})),Ls=/* @__PURE__ */ c({$comment:()=>Gs,$dynamicAnchor:()=>Vs,$id:()=>zs,$schema:()=>Rs,$vocabulary:()=>Bs,allOf:()=>Us,default:()=>qs,properties:()=>Ks,title:()=>Hs,type:()=>Ws}),Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js=o((()=>{Rs=`https://json-schema.org/draft/2020-12/schema`,zs=`https://json-schema.org/draft/2020-12/schema`,Bs={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},Vs=`meta`,Hs=`Core and Validation specifications meta-schema`,Us=[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/unevaluated`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format-annotation`},{$ref:`meta/content`}],Ws=[`object`,`boolean`],Gs=`This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.`,Ks={definitions:{$comment:`"definitions" has been replaced by "$defs".`,type:`object`,additionalProperties:{$dynamicRef:`#meta`},deprecated:!0,default:{}},dependencies:{$comment:`"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.`,type:`object`,additionalProperties:{anyOf:[{$dynamicRef:`#meta`},{$ref:`meta/validation#/$defs/stringArray`}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:`"$recursiveAnchor" has been replaced by "$dynamicAnchor".`,$ref:`meta/core#/$defs/anchorString`,deprecated:!0},$recursiveRef:{$comment:`"$recursiveRef" has been replaced by "$dynamicRef".`,$ref:`meta/core#/$defs/uriReferenceString`,deprecated:!0}},qs={$schema:Rs,$id:zs,$vocabulary:Bs,$dynamicAnchor:Vs,title:Hs,allOf:Us,type:Ws,$comment:Gs,properties:Ks}})),Ys=/* @__PURE__ */ c({$defs:()=>rc,$dynamicAnchor:()=>$s,$id:()=>Zs,$schema:()=>Xs,$vocabulary:()=>Qs,default:()=>ic,properties:()=>nc,title:()=>ec,type:()=>tc}),Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac=o((()=>{Xs=`https://json-schema.org/draft/2020-12/schema`,Zs=`https://json-schema.org/draft/2020-12/meta/applicator`,Qs={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$s=`meta`,ec=`Applicator vocabulary meta-schema`,tc=[`object`,`boolean`],nc={prefixItems:{$ref:`#/$defs/schemaArray`},items:{$dynamicRef:`#meta`},contains:{$dynamicRef:`#meta`},additionalProperties:{$dynamicRef:`#meta`},properties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},patternProperties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},propertyNames:{format:`regex`},default:{}},dependentSchemas:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},propertyNames:{$dynamicRef:`#meta`},if:{$dynamicRef:`#meta`},then:{$dynamicRef:`#meta`},else:{$dynamicRef:`#meta`},allOf:{$ref:`#/$defs/schemaArray`},anyOf:{$ref:`#/$defs/schemaArray`},oneOf:{$ref:`#/$defs/schemaArray`},not:{$dynamicRef:`#meta`}},rc={schemaArray:{type:`array`,minItems:1,items:{$dynamicRef:`#meta`}}},ic={$schema:Xs,$id:Zs,$vocabulary:Qs,$dynamicAnchor:$s,title:ec,type:tc,properties:nc,$defs:rc}})),oc=/* @__PURE__ */ c({$dynamicAnchor:()=>uc,$id:()=>cc,$schema:()=>sc,$vocabulary:()=>lc,default:()=>mc,properties:()=>pc,title:()=>dc,type:()=>fc}),sc,cc,lc,uc,dc,fc,pc,mc,hc=o((()=>{sc=`https://json-schema.org/draft/2020-12/schema`,cc=`https://json-schema.org/draft/2020-12/meta/unevaluated`,lc={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},uc=`meta`,dc=`Unevaluated applicator vocabulary meta-schema`,fc=[`object`,`boolean`],pc={unevaluatedItems:{$dynamicRef:`#meta`},unevaluatedProperties:{$dynamicRef:`#meta`}},mc={$schema:sc,$id:cc,$vocabulary:lc,$dynamicAnchor:uc,title:dc,type:fc,properties:pc}})),gc=/* @__PURE__ */ c({$dynamicAnchor:()=>bc,$id:()=>vc,$schema:()=>_c,$vocabulary:()=>yc,default:()=>wc,properties:()=>Cc,title:()=>xc,type:()=>Sc}),_c,vc,yc,bc,xc,Sc,Cc,wc,Tc=o((()=>{_c=`https://json-schema.org/draft/2020-12/schema`,vc=`https://json-schema.org/draft/2020-12/meta/content`,yc={"https://json-schema.org/draft/2020-12/vocab/content":!0},bc=`meta`,xc=`Content vocabulary meta-schema`,Sc=[`object`,`boolean`],Cc={contentEncoding:{type:`string`},contentMediaType:{type:`string`},contentSchema:{$dynamicRef:`#meta`}},wc={$schema:_c,$id:vc,$vocabulary:yc,$dynamicAnchor:bc,title:xc,type:Sc,properties:Cc}})),Ec=/* @__PURE__ */ c({$defs:()=>Pc,$dynamicAnchor:()=>Ac,$id:()=>Oc,$schema:()=>Dc,$vocabulary:()=>kc,default:()=>Fc,properties:()=>Nc,title:()=>jc,type:()=>Mc}),Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc,Ic=o((()=>{Dc=`https://json-schema.org/draft/2020-12/schema`,Oc=`https://json-schema.org/draft/2020-12/meta/core`,kc={"https://json-schema.org/draft/2020-12/vocab/core":!0},Ac=`meta`,jc=`Core vocabulary meta-schema`,Mc=[`object`,`boolean`],Nc={$id:{$ref:`#/$defs/uriReferenceString`,$comment:`Non-empty fragments not allowed.`,pattern:`^[^#]*#?$`},$schema:{$ref:`#/$defs/uriString`},$ref:{$ref:`#/$defs/uriReferenceString`},$anchor:{$ref:`#/$defs/anchorString`},$dynamicRef:{$ref:`#/$defs/uriReferenceString`},$dynamicAnchor:{$ref:`#/$defs/anchorString`},$vocabulary:{type:`object`,propertyNames:{$ref:`#/$defs/uriString`},additionalProperties:{type:`boolean`}},$comment:{type:`string`},$defs:{type:`object`,additionalProperties:{$dynamicRef:`#meta`}}},Pc={anchorString:{type:`string`,pattern:`^[A-Za-z_][-A-Za-z0-9._]*$`},uriString:{type:`string`,format:`uri`},uriReferenceString:{type:`string`,format:`uri-reference`}},Fc={$schema:Dc,$id:Oc,$vocabulary:kc,$dynamicAnchor:Ac,title:jc,type:Mc,properties:Nc,$defs:Pc}})),Lc=/* @__PURE__ */ c({$dynamicAnchor:()=>Vc,$id:()=>zc,$schema:()=>Rc,$vocabulary:()=>Bc,default:()=>Gc,properties:()=>Wc,title:()=>Hc,type:()=>Uc}),Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc=o((()=>{Rc=`https://json-schema.org/draft/2020-12/schema`,zc=`https://json-schema.org/draft/2020-12/meta/format-annotation`,Bc={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Vc=`meta`,Hc=`Format vocabulary meta-schema for annotation results`,Uc=[`object`,`boolean`],Wc={format:{type:`string`}},Gc={$schema:Rc,$id:zc,$vocabulary:Bc,$dynamicAnchor:Vc,title:Hc,type:Uc,properties:Wc}})),qc=/* @__PURE__ */ c({$dynamicAnchor:()=>Zc,$id:()=>Yc,$schema:()=>Jc,$vocabulary:()=>Xc,default:()=>tl,properties:()=>el,title:()=>Qc,type:()=>$c}),Jc,Yc,Xc,Zc,Qc,$c,el,tl,nl=o((()=>{Jc=`https://json-schema.org/draft/2020-12/schema`,Yc=`https://json-schema.org/draft/2020-12/meta/meta-data`,Xc={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Zc=`meta`,Qc=`Meta-data vocabulary meta-schema`,$c=[`object`,`boolean`],el={title:{type:`string`},description:{type:`string`},default:!0,deprecated:{type:`boolean`,default:!1},readOnly:{type:`boolean`,default:!1},writeOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0}},tl={$schema:Jc,$id:Yc,$vocabulary:Xc,$dynamicAnchor:Zc,title:Qc,type:$c,properties:el}})),rl=/* @__PURE__ */ c({$defs:()=>dl,$dynamicAnchor:()=>sl,$id:()=>al,$schema:()=>il,$vocabulary:()=>ol,default:()=>fl,properties:()=>ul,title:()=>cl,type:()=>ll}),il,al,ol,sl,cl,ll,ul,dl,fl,pl=o((()=>{il=`https://json-schema.org/draft/2020-12/schema`,al=`https://json-schema.org/draft/2020-12/meta/validation`,ol={"https://json-schema.org/draft/2020-12/vocab/validation":!0},sl=`meta`,cl=`Validation vocabulary meta-schema`,ll=[`object`,`boolean`],ul={type:{anyOf:[{$ref:`#/$defs/simpleTypes`},{type:`array`,items:{$ref:`#/$defs/simpleTypes`},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/$defs/nonNegativeInteger`},minLength:{$ref:`#/$defs/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},maxItems:{$ref:`#/$defs/nonNegativeInteger`},minItems:{$ref:`#/$defs/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxContains:{$ref:`#/$defs/nonNegativeInteger`},minContains:{$ref:`#/$defs/nonNegativeInteger`,default:1},maxProperties:{$ref:`#/$defs/nonNegativeInteger`},minProperties:{$ref:`#/$defs/nonNegativeIntegerDefault0`},required:{$ref:`#/$defs/stringArray`},dependentRequired:{type:`object`,additionalProperties:{$ref:`#/$defs/stringArray`}}},dl={nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{$ref:`#/$defs/nonNegativeInteger`,default:0},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},fl={$schema:il,$id:al,$vocabulary:ol,$dynamicAnchor:sl,title:cl,type:ll,properties:ul,$defs:dl}})),ml=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=(Js(),d(Ls).default),n=(ac(),d(Ys).default),r=(hc(),d(oc).default),i=(Tc(),d(gc).default),a=(Ic(),d(Ec).default),o=(Kc(),d(Lc).default),s=(nl(),d(qc).default),c=(pl(),d(rl).default),l=[`/properties`];function u(e){return[t,n,r,i,a,u(this,o),s,u(this,c)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function u(t,n){return e?t.$dataMetaSchema(n,l):n}}e.default=u})),hl=/* @__PURE__ */ s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=pa(),r=Is(),i=Qa(),a=ml(),o=`https://json-schema.org/draft/2020-12/schema`;var s=class extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(a.default.call(this,e),this.refs[`http://json-schema.org/schema`]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var c=Zi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=Ii();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=Qi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var d=$i();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})),gl=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[`$schema`,`id`,`$defs`,{keyword:`$comment`},`definitions`,ha().default]})),_l=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pa(),n=Ii().operators,r={maximum:{exclusive:`exclusiveMaximum`,ops:[{okStr:`<=`,ok:n.LTE,fail:n.GT},{okStr:`<`,ok:n.LT,fail:n.GTE}]},minimum:{exclusive:`exclusiveMinimum`,ops:[{okStr:`>=`,ok:n.GTE,fail:n.LT},{okStr:`>`,ok:n.GT,fail:n.LTE}]}},i={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:e=>t.str`must be ${a(e).okStr} ${e.schemaCode}`,params:e=>t._`{comparison: ${a(e).okStr}, limit: ${e.schemaCode}}`},code(e){let{data:n,schemaCode:r}=e;e.fail$data(t._`${n} ${a(e).fail} ${r} || isNaN(${n})`)}};function a(e){let t=e.keyword,n=+!!e.parentSchema?.[r[t].exclusive];return r[t].ops[n]}e.default=i})),vl=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={exclusiveMaximum:`maximum`,exclusiveMinimum:`minimum`};e.default={keyword:Object.keys(t),type:`number`,schemaType:`boolean`,code({keyword:e,parentSchema:n}){let r=t[e];if(n[r]===void 0)throw Error(`${e} can only be used with ${r}`)}}})),yl=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_l(),n=vl(),r=va(),i=ba(),a=xa(),o=Sa(),s=Ca(),c=wa(),l=Ea(),u=Da(),d=Oa();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,l.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},u.default,d.default]})),bl=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=gl(),n=yl(),r=Ka(),i=Ja();e.default=[t.default,n.default,r.default(),i.default,[`title`,`description`,`default`]]})),xl=/* @__PURE__ */ c({$schema:()=>Cl,default:()=>kl,definitions:()=>Tl,dependencies:()=>Ol,description:()=>wl,id:()=>Sl,properties:()=>Dl,type:()=>El}),Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al=o((()=>{Sl=`http://json-schema.org/draft-04/schema#`,Cl=`http://json-schema.org/draft-04/schema#`,wl=`Core schema meta-schema`,Tl={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},positiveInteger:{type:`integer`,minimum:0},positiveIntegerDefault0:{allOf:[{$ref:`#/definitions/positiveInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},minItems:1,uniqueItems:!0}},El=`object`,Dl={id:{type:`string`,format:`uri`},$schema:{type:`string`,format:`uri`},title:{type:`string`},description:{type:`string`},default:{},multipleOf:{type:`number`,minimum:0,exclusiveMinimum:!0},maximum:{type:`number`},exclusiveMaximum:{type:`boolean`,default:!1},minimum:{type:`number`},exclusiveMinimum:{type:`boolean`,default:!1},maxLength:{$ref:`#/definitions/positiveInteger`},minLength:{$ref:`#/definitions/positiveIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{anyOf:[{type:`boolean`},{$ref:`#`}],default:{}},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:{}},maxItems:{$ref:`#/definitions/positiveInteger`},minItems:{$ref:`#/definitions/positiveIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxProperties:{$ref:`#/definitions/positiveInteger`},minProperties:{$ref:`#/definitions/positiveIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{anyOf:[{type:`boolean`},{$ref:`#`}],default:{}},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},enum:{type:`array`,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},Ol={exclusiveMaximum:[`maximum`],exclusiveMinimum:[`minimum`]},kl={id:Sl,$schema:Cl,description:wl,definitions:Tl,type:El,properties:Dl,dependencies:Ol,default:{}}})),jl=/* @__PURE__ */ s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;let n=pa(),r=bl(),i=Qa(),a=(Al(),d(xl).default),o=[`/properties`],s=`http://json-schema.org/draft-04/schema`;var c=class extends n.default{constructor(e={}){super({...e,schemaId:`id`})}_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};t.exports=e=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=pa();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=pa();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}})})),Ml=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`additionalProperties`:e=`must NOT have additional properties`;break;case`anyOf`:e=`must match a schema in "anyOf"`;break;case`const`:e=`must be equal to constant`;break;case`contains`:e=`must contain a valid item`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`must have propert`,e+=t==1?`y`:`ies`,e+=` `+r.params.deps+` when property `+r.params.property+` is present`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`must pass "`+r.keyword+`" keyword validation`}break;case`enum`:e=`must be equal to one of the allowed values`;break;case`false schema`:e=`boolean schema is false`;break;case`format`:e=`must match format "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`must be `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`must be `+n;break;case`if`:e=`must match "`+r.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`must be `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`maxLength`:e=``;var t=r.params.limit;e+=`must NOT be longer than `+t+` character`,t!=1&&(e+=`s`);break;case`maxProperties`:e=``;var t=r.params.limit;e+=`must NOT have more than `+t+` propert`,e+=t==1?`y`:`ies`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`must be `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`must NOT have less than `+t+` item`,t!=1&&(e+=`s`);break;case`minLength`:e=``;var t=r.params.limit;e+=`must NOT be shorter than `+t+` character`,t!=1&&(e+=`s`);break;case`minProperties`:e=``;var t=r.params.limit;e+=`must NOT have less than `+t+` propert`,e+=t==1?`y`:`ies`;break;case`multipleOf`:e=`must be a multiple of `+r.params.multipleOf;break;case`not`:e=`must NOT be valid according to schema in "not"`;break;case`oneOf`:e=`must match exactly one schema in "oneOf"`;break;case`pattern`:e=`must match pattern "`+r.params.pattern+`"`;break;case`patternRequired`:e=`must have property matching pattern "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`property name is invalid`;break;case`required`:e=`must have required property `+r.params.missingProperty;break;case`type`:e=`must be `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`must NOT have duplicate items (items ## `+r.params.j+` and `+r.params.i+` are identical)`;break;default:e=`must pass "`+r.keyword+`" keyword validation`}r.message=e}}})),Nl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=` يجب أن لا يحوي أكثر من `+t+` عنصر`;break;case`additionalProperties`:e=`يجب أن لا يحوي خصائص إضافية`;break;case`anyOf`:e=`يجب أن يوافق أحد المخططات الموجودة في "anyOf"`;break;case`const`:e=`يجب أن يكون ثابتاً`;break;case`contains`:e=`يجب أن يحوي عنصرا صحيح`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=` يجب أن يحوي الخصائص `+r.params.deps+` عندما تكون الخاصية `+r.params.property+` موجودة`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`يجب أن تمرر كلمة التحقق المفتاحية "`+r.keyword+`"`}break;case`enum`:e=`قيمة هذا الحقل يجب أن تكون مساوية لأحد القيم المعرفة مسبقاً`;break;case`false schema`:e=`المخطط المنطقي غير صحيح`;break;case`format`:e=`يجب أن يوافق الصيغة "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=` يجب أن يكون `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=` يجب أن يكون `+n;break;case`if`:e=`يجب أن توافق المخطط "`+r.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=` يجب أن يكون `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=` يجب أن لا يحوي أكثر من `+t+` عنصر`;break;case`maxLength`:e=``;var t=r.params.limit;e+=` يجب أن لا يحوي أكثر من `+t+` محرف`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=` يجب أن لا يحوي أكثر من `+t+` خصائص`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=` يجب أن يكون `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=` يجب أن لا يحوي أقل من `+t+` عنصر`;break;case`minLength`:e=``;var t=r.params.limit;e+=` يجب أن لا يحوي أقل من `+t+` محرف`;break;case`minProperties`:e=``;var t=r.params.limit;e+=` يجب أن لا يحوي أقل من `+t+` خصائص`;break;case`multipleOf`:e=` يجب أن يحوي أكثر من `+r.params.multipleOf;break;case`not`:e=`يجب أن يكون غير صحيح وفقاً للمخطط "not"`;break;case`oneOf`:e=`يجب أن يوافق مخطط واحد فقط موجود في "oneOf"`;break;case`pattern`:e=`يجب أن يوافق النمط "`+r.params.pattern+`"`;break;case`patternRequired`:e=`يجب أن يحوي خاصية توافق النمط "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`اسم الخاصية غير صالح`;break;case`required`:e=`هذا الحقل إلزامي`;break;case`type`:e=`قيمة هذا الحقل غير صالحة`;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`يجب أن لا يحوي عناصر مكررة (العنصر ## `+r.params.j+` و `+r.params.i+` متطابقة)`;break;default:e=`يجب أن تمرر كلمة التحقق المفتاحية "`+r.keyword+`"`}r.message=e}}})),Pl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`no ha de tenir més de `+t+` element`,t!=1&&(e+=`s`);break;case`additionalProperties`:e=`no ha de tenir propietats addicionals`;break;case`anyOf`:e=`ha de coincidir amb algun esquema definit a "anyOf"`;break;case`const`:e=`ha de ser igual a la constant`;break;case`contains`:e=`ha de contenir un ítem vàlid`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`ha de contenir la propietat`,t!=1&&(e+=`s`),e+=` `+r.params.deps+` quan la propietat `+r.params.property+` és present`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`ha de passar la validació de la clau "`+r.keyword+`"`}break;case`enum`:e=`ha de ser igual a un dels valors predefinits`;break;case`false schema`:e=`l’esquema és fals`;break;case`format`:e=`ha de coincidir amb el format "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`ha de ser `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`ha de ser `+n;break;case`if`:e=`ha de correspondre’s amb l’esquema "`+r.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`ha de ser `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`no ha de tenir més de `+t+` ítem`,t!=1&&(e+=`s`);break;case`maxLength`:e=``;var t=r.params.limit;e+=`no pot contenir més de `+t+` caràcter`,t!=1&&(e+=`s`);break;case`maxProperties`:e=``;var t=r.params.limit;e+=`no pot contenir més de `+t+` propietat`,t!=1&&(e+=`s`);break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`ha de ser `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`no ha de tenir menys de `+t+` ítem`,t!=1&&(e+=`s`);break;case`minLength`:e=``;var t=r.params.limit;e+=`no pot contenir menys de `+t+` caràcter`,t!=1&&(e+=`s`);break;case`minProperties`:e=``;var t=r.params.limit;e+=`no pot contenir menys de `+t+` propietat`,t!=1&&(e+=`s`);break;case`multipleOf`:e=`ha de ser múltiple de `+r.params.multipleOf;break;case`not`:e=`no ha de ser vàlid d’acord amb l’esquema definit a "not"`;break;case`oneOf`:e=`ha de coincidir només amb un esquema definit a "oneOf"`;break;case`pattern`:e=`ha de coincidir amb el patró "`+r.params.pattern+`"`;break;case`patternRequired`:e=`la propietat ha de coincidir amb el patró "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`la propietat no és vàlida`;break;case`required`:e=`ha de tenir la propietat requerida `+r.params.missingProperty;break;case`type`:e=`ha de ser del tipus `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`no ha de tenir ítems duplicats (els ítems ## `+r.params.j+` i `+r.params.i+` són idèntics)`;break;default:e=`ha de passar la validació de la clau "`+r.keyword+`"`}r.message=e}}})),Fl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`nemůže mít víc, než `+t+` prv`,e+=t>=2&&t<=4?`ky`:t==1?`ků`:`ek`;break;case`additionalProperties`:e=`nemůže mít další položky`;break;case`anyOf`:e=`musí vyhovět alespoň jednomu schématu v "anyOf"`;break;case`const`:e=`musí být roven konstantě`;break;case`contains`:e=`musí obsahovat prvek odpovídající schématu`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`musí mít polož`,e+=t>=2&&t<=4?`ky`:t==1?`ka`:`ek`,e+=`: `+r.params.deps+`, pokud obsahuje `+r.params.property;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`musí vyhovět "`+r.keyword+`" validaci`}break;case`enum`:e=`musí být rovno jedné hodnotě z výčtu`;break;case`false schema`:e=`schéma je false`;break;case`format`:e=`musí být ve formátu "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`musí být `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`musí být `+n;break;case`if`:e=`musí vyhovět "`+r.params.failingKeyword+`" schématu`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`musí být `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`nesmí obsahovat víc než `+t+` prv`,e+=t>=2&&t<=4?`ky`:t==1?`ků`:`ek`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`nesmí být delší než `+t+` zna`,e+=t>=2&&t<=4?`ky`:t==1?`ků`:`k`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`nesmí mít víc než `+t+` polož`,e+=t>=2&&t<=4?`ky`:t==1?`ka`:`ek`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`musí být `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`nesmí obsahovat méně než `+t+` prv`,e+=t>=2&&t<=4?`ky`:t==1?`ků`:`ek`;break;case`minLength`:e=``;var t=r.params.limit;e+=`nesmí být kratší než `+t+` zna`,e+=t>=2&&t<=4?`ky`:t==1?`ků`:`k`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`nesmí mít méně než `+t+` polož`,e+=t>=2&&t<=4?`ky`:t==1?`ka`:`ek`;break;case`multipleOf`:e=`musí být násobkem `+r.params.multipleOf;break;case`not`:e=`nesmí vyhovět schématu v "not"`;break;case`oneOf`:e=`musí vyhovět právě jednomu schématu v "oneOf"`;break;case`pattern`:e=`musí vyhovět regulárnímu výrazu "`+r.params.pattern+`"`;break;case`patternRequired`:e=`musí obsahovat položku vyhovující regulárnímu výrazu "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`název položky není platný`;break;case`required`:e=`musí obsahovat požadovanou položku `+r.params.missingProperty;break;case`type`:e=`musí být `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`nesmí obsahovat duplicitní prvky (prvky ## `+r.params.j+` a `+r.params.i+` jsou identické)`;break;default:e=`musí vyhovět "`+r.keyword+`" validaci`}r.message=e}}})),Il=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`darf nicht mehr als `+t+` Element`,t!=1&&(e+=`e`),e+=` enthalten`;break;case`additionalProperties`:e=`darf keine zusätzlichen Attribute haben`;break;case`anyOf`:e=`muss einem der Schemata in "anyOf" entsprechen`;break;case`const`:e=`muss gleich der Konstanten sein`;break;case`contains`:e=`muss ein valides Element enthalten`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`muss Attribut`,t!=1&&(e+=`e`),e+=` `+r.params.deps+` aufweisen, wenn Attribut `+r.params.property+` gesetzt ist`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`der Tag "`+r.params.tag+`" muss eine Zeichenkette sein`;break;case`mapping`:e=`der Wert vom Tag "`+r.params.tag+`" muss im oneOf enthalten sein`;break;default:e=`muss die Validierung "`+r.keyword+`" bestehen`}break;case`enum`:e=`muss einem der vorgegebenen Werte entsprechen`;break;case`false schema`:e=`boolesches Schema ist falsch`;break;case`format`:e=`muss diesem Format entsprechen: "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`muss `+n+` sein`;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`muss `+n+` sein`;break;case`if`:e=`muss dem Schema "`+r.params.failingKeyword+`" entsprechen`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`muss `+n+` sein`;break;case`maxItems`:e=``;var t=r.params.limit;e+=`darf nicht mehr als `+t+` Element`,t!=1&&(e+=`e`),e+=` haben`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`darf nicht länger als `+t+` Zeichen sein`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`darf nicht mehr als `+t+` Attribut`,t!=1&&(e+=`e`),e+=` haben`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`muss `+n+` sein`;break;case`minItems`:e=``;var t=r.params.limit;e+=`darf nicht weniger als `+t+` Element`,t!=1&&(e+=`e`),e+=` haben`;break;case`minLength`:e=``;var t=r.params.limit;e+=`darf nicht kürzer als `+t+` Zeichen sein`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`darf nicht weniger als `+t+` Attribut`,t!=1&&(e+=`e`),e+=` haben`;break;case`multipleOf`:e=`muss ein Vielfaches von `+r.params.multipleOf+` sein`;break;case`not`:e=`muss dem in "not" angegebenen Schema widersprechen`;break;case`oneOf`:e=`muss genau einem der Schemata in "oneOf" entsprechen`;break;case`pattern`:e=`muss diesem Muster entsprechen: "`+r.params.pattern+`"`;break;case`patternRequired`:e=`muss ein Attribut nach folgendem Muster haben "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`Attributname ist ungültig`;break;case`required`:e=`muss das erforderliche Attribut `+r.params.missingProperty+` enthalten`;break;case`type`:e=`muss sein: `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`darf nicht mehr als `+t+` Element`,t!=1&&(e+=`e`),e+=` haben`;break;case`unevaluatedProperties`:e=`darf keine unausgewerteten Attribute haben`;break;case`uniqueItems`:e=`darf keine Duplikate enthalten (Elemente #`+r.params.j+` und #`+r.params.i+` sind gleich)`;break;default:e=`muss die Validierung "`+r.keyword+`" bestehen`}r.message=e}}})),Ll=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`no debe tener más de `+t+` elemento`,t!=1&&(e+=`s`);break;case`additionalProperties`:e=`no debe tener propiedades adicionales`;break;case`anyOf`:e=`debe coincidir con algún esquema en "anyOf"`;break;case`const`:e=`debe ser igual a la constante`;break;case`contains`:e=`debe contener un elemento válido`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`debe contener la`,t!=1&&(e+=`s`),e+=` propiedad`,t!=1&&(e+=`es`),e+=` `+r.params.deps+` cuando la propiedad `+r.params.property+` se encuentra presente`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`debe pasar la validación de palabra clave "`+r.keyword+`"`}break;case`enum`:e=`deber ser igual a uno de los valores predefinidos`;break;case`false schema`:e=`el esquema és falso`;break;case`format`:e=`debe coincidir con el formato "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`debe ser `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`debe ser `+n;break;case`if`:e=`debe corresponderse con el esquema "`+r.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`debe ser `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`no debe contener más de `+t+` elemento`,t!=1&&(e+=`s`);break;case`maxLength`:e=``;var t=r.params.limit;e+=`no debe contener más de `+t+` caracter`,t!=1&&(e+=`es`);break;case`maxProperties`:e=``;var t=r.params.limit;e+=`no debe contener más de `+t+` propiedad`,t!=1&&(e+=`es`);break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`debe ser `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`no debe contener menos de `+t+` elemento`,t!=1&&(e+=`s`);break;case`minLength`:e=``;var t=r.params.limit;e+=`no debe contener menos de `+t+` caracter`,t!=1&&(e+=`es`);break;case`minProperties`:e=``;var t=r.params.limit;e+=`no debe contener menos de `+t+` propiedad`,t!=1&&(e+=`es`);break;case`multipleOf`:e=`debe ser múltiplo de `+r.params.multipleOf;break;case`not`:e=`no debe ser válido según el esquema en "not"`;break;case`oneOf`:e=`debe coincidir con un solo esquema en "oneOf"`;break;case`pattern`:e=`debe coincidir con el patron "`+r.params.pattern+`"`;break;case`patternRequired`:e=`la propiedad debe coincidir con el patrón "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`la propiedad no és válida`;break;case`required`:e=`debe tener la propiedad requerida `+r.params.missingProperty;break;case`type`:e=`debe ser `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`no debe contener elementos duplicados, (los elementos ## `+r.params.j+` y `+r.params.i+` son idénticos)`;break;default:e=`debe pasar la validación de palabra clave "`+r.keyword+`"`}r.message=e}}})),Rl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let i of e){let e;switch(i.keyword){case`additionalItems`:case`items`:e=``;var t=i.params.limit;e+=`saa sisältää enintään `+t,e+=t==1?`:n elementin`:` elementtiä`;break;case`additionalProperties`:e=`ei saa sisältää ylimääräisiä ominaisuuksia`;break;case`anyOf`:e=`täytyy vastata "anyOf" skeemaa`;break;case`const`:e=`täytyy olla yhtä kuin vakio`;break;case`contains`:e=`täytyy sisältää kelvollinen elementti`;break;case`dependencies`:case`dependentRequired`:e=``;var t=i.params.depsCount;e+=`täytyy sisältää `+i.params.deps+` ominaisuu`,e+=t==1?`s`:`det`,e+=` kun `+i.params.property+`-ominaisuus on läsnä`;break;case`discriminator`:switch(i.params.error){case`tag`:e=`tunniste "`+i.params.tag+`" täytyy olla merkkijono`;break;case`mapping`:e=`tunnisteen "`+i.params.tag+`" arvon muoto pitää olla oneOf`;break;default:e=`täytyy läpäistä "`+i.keyword+`" avainsanatarkistus`}break;case`enum`:e=`täytyy olla yhtä kuin jokin sallituista arvoista`;break;case`false schema`:e=`boolean skeema on väärä`;break;case`format`:e=`täytyy vastata muotoa "`+i.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`täytyy olla `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`täytyy olla `+n;break;case`if`:e=`täytyy vastata "`+i.params.failingKeyword+`" skeemaa`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`täytyy olla `+n;break;case`maxItems`:e=``;var t=i.params.limit;e+=`tulee sisältää enintään `+t+` `,e+=t==1?`elementti`:`elementtiä`;break;case`maxLength`:e=``;var t=i.params.limit;e+=`ei saa olla pidempi kuin `+t+` merkki`,t!=1&&(e+=`ä`);break;case`maxProperties`:e=``;var t=i.params.limit;e+=`tulee sisältää enintään `+t+` `,e+=t==1?`ominaisuus`:`ominaisuutta`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`täytyy olla `+n;break;case`minItems`:e=``;var t=i.params.limit;e+=`tulee sisältää vähintään `+t+` `,e+=t==1?`elementti`:`elementtiä`;break;case`minLength`:e=``;var t=i.params.limit;e+=`ei saa olla lyhyempi kuin `+t+` merkki`,t!=1&&(e+=`ä`);break;case`minProperties`:e=``;var t=i.params.limit;e+=`tulee sisältää vähintään `+t+` `,e+=t==1?`ominaisuus`:`ominaisuutta`;break;case`multipleOf`:e=`täytyy olla moninkertainen: `+i.params.multipleOf;break;case`not`:e=`ei saa olla hyväksytty skeeman "not" mukaan`;break;case`oneOf`:e=`täytyy vastata täsmälleen yhtä "oneOf" -kohdassa määriteltyä skeemaa`;break;case`pattern`:e=`täytyy vastata muotoa "`+i.params.pattern+`"`;break;case`patternRequired`:e=`täytyy sisältää ominaisuus joka vastaa kaavaa "`+i.params.missingPattern+`"`;break;case`propertyNames`:e=`ominaisuuden nimi on virheellinen`;break;case`required`:e=`täytyy sisältää vaadittu ominaisuus `+i.params.missingProperty;break;case`type`:e=``;var r=i.params.type;e+=`täytyy olla `,e+=r==`number`?`numero`:r==`integer`?`kokonaisluku`:r==`string`?`merkkijono`:r==`boolean`?`boolean`:r;break;case`unevaluatedItems`:e=``;var t=i.params.len;e+=`ei saa olla enemmän kuin `+t+` elementti`,t!=1&&(e+=`ä`);break;case`unevaluatedProperties`:e=`ei saa sisältää arvioimattomia ominaisuuksia`;break;case`uniqueItems`:e=`ei saa sisältää duplikaatteja (elementit ## `+i.params.j+` ja `+i.params.i+` ovat identtiset)`;break;default:e=`täytyy läpäistä "`+i.keyword+`" avainsanatarkistus`}i.message=e}}})),zl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`ne doit pas contenir plus de `+t+` élémént`,t!=1&&(e+=`s`);break;case`additionalProperties`:e=`ne doit pas contenir de propriétés additionnelles`;break;case`anyOf`:e=`doit correspondre à un schéma de "anyOf"`;break;case`const`:e=`doit être égal à la constante`;break;case`contains`:e=`doit contenir un élément valide`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`doit avoir la propriété `+r.params.deps+` quand la propriété `+r.params.property+` est présente`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`doit être valide selon le critère "`+r.keyword+`"`}break;case`enum`:e=`doit être égal à une des valeurs prédéfinies`;break;case`false schema`:e=`le schema est "false"`;break;case`format`:e=`doit correspondre au format "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`doit être `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`doit être `+n;break;case`if`:e=`doit correspondre au schéma "`+r.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`doit être `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`ne doit pas contenir plus de `+t+` élément`,t!=1&&(e+=`s`);break;case`maxLength`:e=``;var t=r.params.limit;e+=`ne doit pas dépasser `+t+` caractère`,t!=1&&(e+=`s`);break;case`maxProperties`:e=``;var t=r.params.limit;e+=`ne doit pas contenir plus de `+t+` propriété`,t!=1&&(e+=`s`);break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`doit être `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`ne doit pas contenir moins de `+t+` élément`,t!=1&&(e+=`s`);break;case`minLength`:e=``;var t=r.params.limit;e+=`ne doit pas faire moins de `+t+` caractère`,t!=1&&(e+=`s`);break;case`minProperties`:e=``;var t=r.params.limit;e+=`ne doit pas contenir moins de `+t+` propriété`,t!=1&&(e+=`s`);break;case`multipleOf`:e=`doit être un multiple de `+r.params.multipleOf;break;case`not`:e=`est invalide selon le schéma "not"`;break;case`oneOf`:e=`doit correspondre à exactement un schéma de "oneOf"`;break;case`pattern`:e=`doit correspondre au format "`+r.params.pattern+`"`;break;case`patternRequired`:e=`la propriété doit correspondre au format "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`le nom de propriété est invalide`;break;case`required`:e=`requiert la propriété `+r.params.missingProperty;break;case`type`:e=`doit être de type `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`ne doit pas contenir de doublons (les éléments ## `+r.params.j+` et `+r.params.i+` sont identiques)`;break;default:e=`doit être valide selon le critère "`+r.keyword+`"`}r.message=e}}})),Bl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`nem lehet több, mint `+t+` eleme`;break;case`additionalProperties`:e=`nem lehetnek további elemei`;break;case`anyOf`:e=`meg kell feleljen legalább egy "anyOf" alaknak`;break;case`const`:e=`must be equal to constant`;break;case`contains`:e=`must contain a valid item`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`-nak kell legyen`,t>1&&(e+=`ek`),e+=` a következő tulajdonsága`,t!=1&&(e+=`i`),e+=`: `+r.params.deps+`, ha van `+r.params.property+` tulajdonsága`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`must pass "`+r.keyword+`" keyword validation`}break;case`enum`:e=`egyenlő kell legyen valamely előre meghatározott értékkel`;break;case`false schema`:e=`boolean schema is false`;break;case`format`:e=`meg kell feleljen a következő formátumnak: "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`must be `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`must be `+n;break;case`if`:e=`must match "`+r.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`kell legyen `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`nem lehet több, mint `+t+` eleme`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`nem lehet hosszabb, mint `+t+` szimbólum`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`nem lehet több, mint `+t+` tulajdonsága`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`kell legyen `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`nem lehet kevesebb, mint `+t+` eleme`;break;case`minLength`:e=``;var t=r.params.limit;e+=`nem lehet rövidebb, mint `+t+` szimbólum`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`nem lehet kevesebb, mint `+t+` tulajdonsága`;break;case`multipleOf`:e=`a többszöröse kell legyen a következő számnak: `+r.params.multipleOf;break;case`not`:e=`nem lehet érvényes a "not" alaknak megfelelően`;break;case`oneOf`:e=`meg kell feleljen pontosan egy "oneOf" alaknak`;break;case`pattern`:e=`meg kell feleljen a következő mintának: "`+r.params.pattern+`"`;break;case`patternRequired`:e=`must have property matching pattern "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`property name is invalid`;break;case`required`:e=`kell legyen `+r.params.missingProperty+` tulajdonsága`;break;case`type`:e=``+r.params.type+` kell legyen`;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`nem lehetnek azonos elemei (`+r.params.j+` és `+r.params.i+` elemek azonosak)`;break;default:e=`must pass "`+r.keyword+`" keyword validation`}r.message=e}}})),Vl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=` tidak boleh memiliki lebih dari `+t+` item`;break;case`additionalProperties`:e=`tidak boleh memiliki properti tambahan`;break;case`anyOf`:e=`harus cocok dengan beberapa skema pada "anyOf"`;break;case`const`:e=`harus sama dengan konstan`;break;case`contains`:e=`harus berisi item yang valid`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=` harus memiliki properti `+r.params.deps+` ketika properti `+r.params.property+` hadir`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`harus lulus validasi kata kunci "`+r.keyword+`"`}break;case`enum`:e=`harus sama dengan salah satu dari nilai yang telah ditentukan`;break;case`false schema`:e=`skema boolean salah`;break;case`format`:e=`harus cocok dengan format "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`harus `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`harus `+n;break;case`if`:e=`harus cocok dengan skema "`+r.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`harus `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=` tidak boleh memiliki lebih dari `+t+` item`;break;case`maxLength`:e=``;var t=r.params.limit;e+=` tidak boleh lebih dari `+t+` karakter`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=` tidak boleh memiliki lebih dari `+t+` properti`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`harus `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=` tidak boleh kurang dari `+t+` item`;break;case`minLength`:e=``;var t=r.params.limit;e+=` tidak boleh lebih pendek dari `+t+` karakter`;break;case`minProperties`:e=``;var t=r.params.limit;e+=` tidak boleh kurang dari `+t+` properti`;break;case`multipleOf`:e=`harus merupakan kelipatan dari `+r.params.multipleOf;break;case`not`:e=`tidak boleh valid sesuai dengan skema pada "not"`;break;case`oneOf`:e=`harus sama persis dengan satu skema pada "oneOf"`;break;case`pattern`:e=`harus cocok dengan pola "`+r.params.pattern+`"`;break;case`patternRequired`:e=`harus memiliki pola pencocokan properti "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`nama properti tidak valid`;break;case`required`:e=`harus memiliki properti `+r.params.missingProperty;break;case`type`:e=`harus berupa `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`tidak boleh memiliki item duplikat (item ## `+r.params.j+` dan `+r.params.i+` identik)`;break;default:e=`harus lulus validasi kata kunci "`+r.keyword+`"`}r.message=e}}})),Hl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`non dovrebbe avere più di `+t+` element`,e+=t==1?`o`:`i`;break;case`additionalProperties`:e=`non deve avere attributi aggiuntivi`;break;case`anyOf`:e=`deve corrispondere ad uno degli schema in "anyOf"`;break;case`const`:e=`deve essere uguale alla costante`;break;case`contains`:e=`deve contentere un elemento valido`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`dovrebbe avere `,e+=t==1?`l'`:`gli `,e+=`attribut`,e+=t==1?`o`:`i`,e+=` `+r.params.deps+` quando l'attributo `+r.params.property+` è presente`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`il tag "`+r.params.tag+`" deve essere di tipo stringa`;break;case`mapping`:e=`il valore del tag "`+r.params.tag+`" deve essere nei oneOf`;break;default:e=`deve essere valido secondo il criterio "`+r.keyword+`"`}break;case`enum`:e=`deve essere uguale ad uno dei valori consentiti`;break;case`false schema`:e=`lo schema booleano è falso`;break;case`format`:e=`deve corrispondere al formato "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`deve essere `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`deve essere `+n;break;case`if`:e=`deve corrispondere allo schema "`+r.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`deve essere `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`non deve avere più di `+t+` element`,e+=t==1?`o`:`i`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`non deve essere più lungo di `+t+` caratter`,e+=t==1?`e`:`i`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`non deve avere più di `+t+` attribut`,e+=t==1?`o`:`i`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`deve essere `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`non deve avere meno di `+t+` element`,e+=t==1?`o`:`i`;break;case`minLength`:e=``;var t=r.params.limit;e+=`non deve essere meno lungo di `+t+` caratter`,e+=t==1?`e`:`i`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`non deve avere meno di `+t+` attribut`,e+=t==1?`o`:`i`;break;case`multipleOf`:e=`deve essere un multiplo di `+r.params.multipleOf;break;case`not`:e=`non deve essere valido in base allo schema di "non"`;break;case`oneOf`:e=`deve corrispondere esattamente ad uno degli schema in "oneOf"`;break;case`pattern`:e=`deve corrispondere al formato "`+r.params.pattern+`"`;break;case`patternRequired`:e=`deve avere un attributo che corrisponda al formato "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`il nome dell'attritbuto non è valido`;break;case`required`:e=`deve avere l'attributo obbligatorio `+r.params.missingProperty;break;case`type`:e=`deve essere di tipo `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`non deve avere più di `+t+` elementi`,e+=t==1?`o`:`i`;break;case`unevaluatedProperties`:e=`non deve avere attributi non valutati`;break;case`uniqueItems`:e=`non deve avere duplicati (gli elementi ## `+r.params.j+` e `+r.params.i+` sono uguali)`;break;default:e=`deve essere valido secondo il criterio "`+r.keyword+`"`}r.message=e}}})),Ul=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`は`+t+`以上あってはいけない`;break;case`additionalProperties`:e=`追加してはいけない`;break;case`anyOf`:e=`"anyOf"のスキーマとマッチしなくてはいけない`;break;case`const`:e=`must be equal to constant`;break;case`contains`:e=`must contain a valid item`;break;case`dependencies`:case`dependentRequired`:e=``+r.params.property+`がある場合、`;var t=r.params.depsCount;e+=`は`+r.params.deps+`をつけなければいけない`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`must pass "`+r.keyword+`" keyword validation`}break;case`enum`:e=`事前に定義された値のいずれかに等しくなければいけない`;break;case`false schema`:e=`boolean schema is false`;break;case`format`:e=`"`+r.params.format+`"形式に揃えなければいけない`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`must be `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`must be `+n;break;case`if`:e=`must match "`+r.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=n+`でなければいけない`;break;case`maxItems`:e=``;var t=r.params.limit;e+=`は`+t+`個以上であってはいけない`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`は`+t+`文字以上であってはいけない`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`は`+t+`個以上のプロパティを有してはいけない`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=n+`でなければいけない`;break;case`minItems`:e=``;var t=r.params.limit;e+=`は`+t+`個以下であってはいけない`;break;case`minLength`:e=``;var t=r.params.limit;e+=`は`+t+`文字以下であってはいけない`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`は`+t+`個以下のプロパティを有してはいけない`;break;case`multipleOf`:e=``+r.params.multipleOf+`の倍数でなければいけない`;break;case`not`:e=`"not"のスキーマに従って有効としてはいけない`;break;case`oneOf`:e=`"oneOf"のスキーマと完全に一致しなくてはいけない`;break;case`pattern`:e=`"`+r.params.pattern+`"のパターンと一致しなければいけない`;break;case`patternRequired`:e=`must have property matching pattern "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`property name is invalid`;break;case`required`:e=`必要なプロパティ`+r.params.missingProperty+`がなければいけない`;break;case`type`:e=``+r.params.type+`でなければいけない`;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`重複するアイテムがあってはいけない(`+r.params.j+`と`+r.params.i+`は同じである)`;break;default:e=`must pass "`+r.keyword+`" keyword validation`}r.message=e}}})),Wl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=` 항목은 아이템을 `+t+`개 이상 가질 수 없습니다`;break;case`additionalProperties`:e=`추가적인 속성은 허용되지 않습니다`;break;case`anyOf`:e=`"anyOf"의 스키마와 일치해야 합니다`;break;case`const`:e=`상수와 같아야합니다`;break;case`contains`:e=`올바른 아이템을 포함해야 합니다`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=r.params.property+`속성이 있는 경우, `+r.params.deps+` 속성이 있어야합니다`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`"`+r.params.tag+`"태그는 반드시 문자열이여야 합니다`;break;case`mapping`:e=`"`+r.params.tag+`"태그의 값은 반드시 oneOf에 있어야 합니다`;break;default:e=`"`+r.keyword+`"키워드 검사를 통과해야 합니다`}break;case`enum`:e=`미리 정의된 값중 하나여야 합니다`;break;case`false schema`:e=`boolean 스키마는 올바르지 않습니다`;break;case`format`:e=`"`+r.params.format+`" 포맷과 일치해야 합니다`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=` `+n+` 이여야 합니다`;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=` `+n+` 이여야 합니다`;break;case`if`:e=`"`+r.params.failingKeyword+`" 스키마와 일치해야 합니다`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=` `+n+` 이여야 합니다`;break;case`maxItems`:e=``;var t=r.params.limit;e+=`아이템이 최대 `+t+`개이여야 합니다`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`최대 `+t+`글자여야 합니다`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`속성은 최대 `+t+`개 이내여야 합니다`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=` `+n+` 이여야 합니다`;break;case`minItems`:e=``;var t=r.params.limit;e+=`아이템이 최소 `+t+`개이여야 합니다`;break;case`minLength`:e=``;var t=r.params.limit;e+=`최소 `+t+`글자여야 합니다`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`속성은 최소 `+t+`개 이상이여야 합니다`;break;case`multipleOf`:e=``+r.params.multipleOf+`의 배수여야 합니다`;break;case`not`:e=`"not"스키마에 따라 유효하지 않아야 합니다`;break;case`oneOf`:e=`"oneOf" 스키마중 하나와 정확하게 일치해야 합니다`;break;case`pattern`:e=`"`+r.params.pattern+`"패턴과 일치해야 합니다`;break;case`patternRequired`:e=`"`+r.params.missingPattern+`"패턴과 일치하는 속성을 가져야 합니다`;break;case`propertyNames`:e=`속성명이 올바르지 않습니다`;break;case`required`:e=``+r.params.missingProperty+` 속성은 필수입니다`;break;case`type`:e=``+r.params.type+`이여야 합니다`;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`항목이 `+t+`개 아이템을 초과하면 안됩니다`;break;case`unevaluatedProperties`:e=`평가되지 않은 속성이 없어야합니다.`;break;case`uniqueItems`:e=`중복 아이템이 없어야 합니다 (아이템`+r.params.j+`과 아이템`+r.params.i+`가 동일합니다)`;break;default:e=`"`+r.keyword+`"키워드 검사를 통과해야 합니다`}r.message=e}}})),Gl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let i of e){let e;switch(i.keyword){case`additionalItems`:case`items`:e=``;var t=i.params.limit;e+=`kan ikke ha mer enn `+t+` element`,t!=1&&(e+=`er`);break;case`additionalProperties`:e=`kan ikke ha flere egenskaper`;break;case`anyOf`:e=`må samsvare med et schema i "anyOf"`;break;case`const`:e=`må være lik konstanten`;break;case`contains`:e=`må inneholde et gyldig element`;break;case`dependencies`:case`dependentRequired`:e=``;var t=i.params.depsCount;e+=`må ha egenskapen`,t!=1&&(e+=`e`),e+=` `+i.params.deps+` når egenskapen `+i.params.property+` er angitt`;break;case`discriminator`:switch(i.params.error){case`tag`:e=`tag "`+i.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+i.params.tag+`" must be in oneOf`;break;default:e=`må samsvare med valideringen for `+i.keyword}break;case`enum`:e=`må være lik en av de forhåndsdefinerte verdiene`;break;case`false schema`:e=`boolsk schema er usannt`;break;case`format`:e=`må stemme overens med formatet "`+i.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`må være `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`må være `+n;break;case`if`:e=`must match "`+i.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`må være `+n;break;case`maxItems`:e=``;var t=i.params.limit;e+=`kan ikke ha fler enn `+t+` element`,t!=1&&(e+=`er`);break;case`maxLength`:e=``;var t=i.params.limit;e+=`kan ikke være lengre enn `+t+` tegn`;break;case`maxProperties`:e=``;var t=i.params.limit;e+=`kan ikke ha mer enn `+t+` egenskap`,t!=1&&(e+=`er`);break;case`minimum`:case`exclusiveMinimum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`må være `+n;break;case`minItems`:e=``;var t=i.params.limit;e+=`kan ikke ha færre enn `+t+` element`,t!=1&&(e+=`er`);break;case`minLength`:e=``;var t=i.params.limit;e+=`kan ikke være kortere enn `+t+` tegn`;break;case`minProperties`:e=``;var t=i.params.limit;e+=`kan ikke ha mindre enn `+t+` egenskap`,t!=1&&(e+=`er`);break;case`multipleOf`:e=`må være et multiplum av `+i.params.multipleOf;break;case`not`:e=`kan ikke samsvare med schema i "not"`;break;case`oneOf`:e=`må samsvare med nøyaktig ett schema i "oneOf"`;break;case`pattern`:e=`må samsvare med mønsteret "`+i.params.pattern+`"`;break;case`patternRequired`:e=`må ha en egenskap som samsvarer med mønsteret "`+i.params.missingPattern;break;case`propertyNames`:e=`egenskapen med navnet '`,i.params.propertyNameout+=`' er ugyldig`;break;case`required`:e=`må ha den påkrevde egenskapen `+i.params.missingProperty;break;case`type`:e=``;var r=i.params.type;e+=`må være `,e+=r==`number`?`et tall`:r==`integer`?`et heltall`:r==`string`?`en streng`:r==`boolean`?`ja eller nei`:r;break;case`unevaluatedItems`:e=``;var t=i.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`kan ikke ha duplikate elemeneter (elementene ## `+i.params.j+` og `+i.params.i+` er identiske)`;break;default:e=`må samsvare med valideringen for `+i.keyword}i.message=e}}})),Kl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let i of e){let e;switch(i.keyword){case`additionalItems`:case`items`:e=``;var t=i.params.limit;e+=`mag niet meer dan `+t+` item`,t!=1&&(e+=`s`),e+=` bevatten`;break;case`additionalProperties`:e=`mag geen extra eigenschappen bevatten`;break;case`anyOf`:e=`moet overeenkomen met een schema in "anyOf"`;break;case`const`:e=`moet gelijk zijn aan constante`;break;case`contains`:e=`moet een geldig item bevatten`;break;case`dependencies`:case`dependentRequired`:e=``;var t=i.params.depsCount;e+=`moet de eigenschap`,t!=1&&(e+=`pen`),e+=` `+i.params.deps+` bevatten als `+i.params.property+` is gedefinieerd`;break;case`discriminator`:switch(i.params.error){case`tag`:e=`tag "`+i.params.tag+`" moet een tekenreeks zijn`;break;case`mapping`:e=`de waarde van het veld "`+i.params.tag+`" moet voorkomen in de oneOf`;break;default:e=`moet sleutelwoord validatie "`+i.keyword+`" doorstaan`}break;case`enum`:e=`moet overeenkomen met één van de voorgedefinieerde waarden`;break;case`false schema`:e=`boolean schema is fout`;break;case`format`:e=`moet overeenkomen met het volgende formaat: "`+i.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`moet `+n+` zijn`;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`moet `+n+` zijn`;break;case`if`:e=`moet overeenkomen met "`+i.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`moet `+n+` zijn`;break;case`maxItems`:e=``;var t=i.params.limit;e+=`mag niet meer dan `+t+` item`,t!=1&&(e+=`s`),e+=` bevatten`;break;case`maxLength`:e=``;var t=i.params.limit;e+=`mag niet langer dan `+t+` karakter`,t!=1&&(e+=`s`),e+=` zijn`;break;case`maxProperties`:e=``;var t=i.params.limit;e+=`mag niet meer dan `+t+` eigenschap`,t!=1&&(e+=`pen`),e+=` bevatten`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`moet `+n+` zijn`;break;case`minItems`:e=``;var t=i.params.limit;e+=`mag niet minder dan `+t+` item`,t!=1&&(e+=`s`),e+=` bevatten`;break;case`minLength`:e=``;var t=i.params.limit;e+=`mag niet korter dan `+t+` karakter`,t!=1&&(e+=`s`),e+=` zijn`;break;case`minProperties`:e=``;var t=i.params.limit;e+=`mag niet minder dan `+t+` eigenschap`,t!=1&&(e+=`pen`),e+=` bevatten`;break;case`multipleOf`:e=`moet een veelvoud van `+i.params.multipleOf+` zijn`;break;case`not`:e=`mag niet overeenkomen met een schema in "not"`;break;case`oneOf`:e=`moet overeenkomen met één schema in "oneOf"`;break;case`pattern`:e=`moet overeenkomen met het volgende patroon: "`+i.params.pattern+`"`;break;case`patternRequired`:e=`moet een eigenschap bevatten die overeenkomt met het pattroon: "`+i.params.missingPattern+`"`;break;case`propertyNames`:e=`eigenschapnaam is ongeldig`;break;case`required`:e=`moet de eigenschap `+i.params.missingProperty+` bevatten`;break;case`type`:e=``;var r=i.params.type;e+=`moet een `,r==`number`?e+=`nummer`:r==`integer`?e+=`geheel getal`:r==`string`?e+=`tekenreeks`:r==`boolean`&&(e+=`ja of nee waarde`),e+=` (`+r+`) bevatten`;break;case`unevaluatedItems`:e=``;var t=i.params.len;e+=`mag niet meer dan `+t+` item`,t!=1&&(e+=`s`),e+=` bevatten`;break;case`unevaluatedProperties`:e=`mag geen ongecontroleerde eigenschappen bevatten`;break;case`uniqueItems`:e=`mag geen gedupliceerde items bevatten (items ## `+i.params.j+` en `+i.params.i+` zijn identiek)`;break;default:e=`moet sleutelwoord validatie "`+i.keyword+`" doorstaan`}i.message=e}}})),ql=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`nie powinien mieć więcej niż `+t+` element`,e+=t==1?`u`:`ów`;break;case`additionalProperties`:e=`nie powinien zawierać dodatkowych pól`;break;case`anyOf`:e=`powinien pasować do wzoru z sekcji "anyOf"`;break;case`const`:e=`powinien być równy stałej`;break;case`contains`:e=`must contain a valid item`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`powinien zawierać pol`,e+=t==1?`e`:`a`,e+=` `+r.params.deps+` kiedy pole `+r.params.property+` jest obecne`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`powinien przejść walidację "`+r.keyword+`"`}break;case`enum`:e=`powinien być równy jednej z predefiniowanych wartości`;break;case`false schema`:e=`boolean schema is false`;break;case`format`:e=`powinien zgadzać się z formatem "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`powinien być `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`powinien być `+n;break;case`if`:e=`must match "`+r.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`powinien być `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`nie powinien mieć więcej niż `+t+` element`,e+=t==1?`u`:`ów`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`nie powinien być dłuższy niż `+t+` znak`,t!=1&&(e+=`ów`);break;case`maxProperties`:e=``;var t=r.params.limit;e+=`nie powinien zawierać więcej niż `+t+` `,e+=t==1?`pole`:`pól`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`powinien być `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`nie powinien mieć mniej niż `+t+` element`,e+=t==1?`u`:`ów`;break;case`minLength`:e=``;var t=r.params.limit;e+=`nie powinien być krótszy niż `+t+` znak`,t!=1&&(e+=`ów`);break;case`minProperties`:e=``;var t=r.params.limit;e+=`nie powinien zawierać mniej niż `+t+` `,e+=t==1?`pole`:`pól`;break;case`multipleOf`:e=`powinien być wielokrotnością `+r.params.multipleOf;break;case`not`:e=`nie powinien pasować do wzoru z sekcji "not"`;break;case`oneOf`:e=`powinien pasować do jednego wzoru z sekcji "oneOf"`;break;case`pattern`:e=`powinien zgadzać się ze wzorem "`+r.params.pattern+`"`;break;case`patternRequired`:e=`powinien mieć pole pasujące do wzorca "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`property name is invalid`;break;case`required`:e=`powinien zawierać wymagane pole `+r.params.missingProperty;break;case`type`:e=`powinien być `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`nie powinien zawierać elementów które się powtarzają (elementy `+r.params.j+` i `+r.params.i+` są identyczne)`;break;default:e=`powinien przejść walidację "`+r.keyword+`"`}r.message=e}}})),Jl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let i of e){let e;switch(i.keyword){case`additionalItems`:case`items`:e=`não são permitidos itens adicionais (mais do que `+t+`)`;break;case`additionalProperties`:e=`não são permitidas propriedades adicionais`;break;case`anyOf`:e=`os dados não correspondem a nenhum schema de "anyOf"`;break;case`const`:e=`deve ser igual à constante`;break;case`contains`:e=`deve conter um item válido`;break;case`dependencies`:case`dependentRequired`:e=``;var t=i.params.depsCount;e+=` deve ter propriedade`,t!=1&&(e+=`s`),e+=` `+i.params.deps+` quando a propriedade `+i.params.property+` estiver presente`;break;case`discriminator`:switch(i.params.error){case`tag`:e=`a tag "`+i.params.tag+`" deve ser uma string`;break;case`mapping`:e=`o valor da tag "`+i.params.tag+`" deve estar no oneOf`;break;default:e=`deve passar a validação da keyword "`+i.keyword+`"`}break;case`enum`:e=`deve ser igual a um dos valores permitidos`;break;case`false schema`:e=`o schema booleano é "false"`;break;case`format`:e=`deve corresponder ao formato "`+i.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`deve ser `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`deve ser `+n;break;case`if`:e=`deve corresponder ao schema "`+i.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`deve ser `+n;break;case`maxItems`:e=``;var t=i.params.limit;e+=`não deve ter mais que `+t+` elemento`,t!=1&&(e+=`s`);break;case`maxLength`:e=``;var t=i.params.limit;e+=`não deve ser maior que `+t+` caracter`,t!=1&&(e+=`es`);break;case`maxProperties`:e=``;var t=i.params.limit;e+=`não deve ter mais que `+t+` propriedade`,t!=1&&(e+=`s`);break;case`minimum`:case`exclusiveMinimum`:e=``;var n=i.params.comparison+` `+i.params.limit;e+=`deve ser `+n;break;case`minItems`:e=``;var t=i.params.limit;e+=`não deve ter menos que `+t+` elemento`,t!=1&&(e+=`s`);break;case`minLength`:e=``;var t=i.params.limit;e+=`não deve ser mais curta que `+t+` caracter`,t!=1&&(e+=`es`);break;case`minProperties`:e=``;var t=i.params.limit;e+=`não deve ter menos que `+t+` propriedade`,t!=1&&(e+=`s`);break;case`multipleOf`:e=`deve ser múltiplo de `+i.params.multipleOf;break;case`not`:e=`não deve ser valido segundo o schema em "not"`;break;case`oneOf`:e=`deve corresponder exatamente com um schema em "oneOf"`;break;case`pattern`:e=`deve corresponder ao padrão "`+i.params.pattern+`"`;break;case`patternRequired`:e=`deve ter a propriedade correspondente ao padrão "`+i.params.missingPattern+`"`;break;case`propertyNames`:e=`o nome da propriedade é inválido`;break;case`required`:e=`deve ter a propriedade obrigatória `+i.params.missingProperty;break;case`type`:e=``;var r=i.params.type;e+=`deve ser `,e+=r==`number`?`um número`:r==`integer`?`um número inteiro`:r==`string`?`um texto`:r==`boolean`?`um booleano`:r;break;case`unevaluatedItems`:e=``;var t=i.params.len;e+=`não pode possuir mais que `+t+` `,e+=t==1?`item`:`itens`;break;case`unevaluatedProperties`:e=`não pode possuir propridades não avaliadas`;break;case`uniqueItems`:e=`não deve ter itens duplicados (os itens ## `+i.params.j+` e `+i.params.i+` são idênticos)`;break;default:e=`deve passar a validação da keyword "`+i.keyword+`"`}i.message=e}}})),Yl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`должно иметь не более, чем `+t+` элемент`,t>=2&&t<=4?e+=`а`:t!=1&&(e+=`ов`);break;case`additionalProperties`:e=`не должно иметь дополнительных полей`;break;case`anyOf`:e=`должно соответствовать одной их схем в "anyOf"`;break;case`const`:e=`должно быть равно заданному значению`;break;case`contains`:e=`должно содержать значение соответствующее схеме`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`должно иметь пол`,e+=t==1?`е`:`я`,e+=` `+r.params.deps+`, когда присутствует поле `+r.params.property;break;case`discriminator`:switch(r.params.error){case`tag`:e=`поле "`+r.params.tag+`" должно быть строкой`;break;case`mapping`:e=`значение поля "`+r.params.tag+`" должно быть в одной из oneOf схем `;break;default:e=`должно соответствовать правилу "`+r.keyword+`"`}break;case`enum`:e=`должно быть равно одному из разрешенных значений`;break;case`false schema`:e=`схема равна false`;break;case`format`:e=`должно соответствовать формату "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`должно быть `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`должно быть `+n;break;case`if`:e=`должно соответствовать схемe "`+r.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`должно быть `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`должно иметь не более, чем `+t+` элемент`,t>=2&&t<=4?e+=`а`:t!=1&&(e+=`ов`);break;case`maxLength`:e=``;var t=r.params.limit;e+=`должно быть не длиннее, чем `+t+` символ`,t>=2&&t<=4?e+=`а`:t!=1&&(e+=`ов`);break;case`maxProperties`:e=``;var t=r.params.limit;e+=`должно иметь не более, чем `+t+` пол`,e+=t==1?`е`:t>=2&&t<=4?`я`:`ей`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`должно быть `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`должно иметь не менее, чем `+t+` элемент`,t>=2&&t<=4?e+=`а`:t!=1&&(e+=`ов`);break;case`minLength`:e=``;var t=r.params.limit;e+=`должно быть не короче, чем `+t+` символ`,t>=2&&t<=4?e+=`а`:t!=1&&(e+=`ов`);break;case`minProperties`:e=``;var t=r.params.limit;e+=`должно иметь не менее, чем `+t+` пол`,e+=t==1?`е`:t>=2&&t<=4?`я`:`ей`;break;case`multipleOf`:e=`должно быть кратным `+r.params.multipleOf;break;case`not`:e=`должно не соответствовать схеме в "not"`;break;case`oneOf`:e=`должно соответствовать в точности одной схемe в "oneOf"`;break;case`pattern`:e=`должно соответствовать образцу "`+r.params.pattern+`"`;break;case`patternRequired`:e=`должно иметь поле, соответствующее образцу "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`имя поля не соответствует схеме`;break;case`required`:e=`должно иметь обязательное поле `+r.params.missingProperty;break;case`type`:e=`должно быть `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`должно иметь не более, чем `+t+` элемент`,t>=2&&t<=4?e+=`а`:t!=1&&(e+=`ов`);break;case`unevaluatedProperties`:e=`не должно иметь непроверенных полей`;break;case`uniqueItems`:e=`не должно иметь повторяющихся элементов (элементы `+r.params.j+` и `+r.params.i+` идентичны)`;break;default:e=`должно соответствовать правилу "`+r.keyword+`"`}r.message=e}}})),Xl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`nemôže obsahovať viac, než `+t+` prv`,e+=t==1?`ok`:`kov`;break;case`additionalProperties`:e=`nemôže obsahovať ďalšie položky`;break;case`anyOf`:e=`musí splňovať aspoň jednu zo schém v "anyOf"`;break;case`const`:e=`musí byť konštanta`;break;case`contains`:e=`musí obsahovať prvok zodpovedajúci schéme`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=` musí obsahovať polož`,e+=t>=2&&t<=4?`ky`:t==1?`ka`:`iek`,e+=`: `+r.params.deps+`, ak obsahuje `+r.params.property;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`musí splniť "`+r.keyword+`" validáciu`}break;case`enum`:e=`musí byť jedna z definovaných hodnôt`;break;case`false schema`:e=`schéma je false`;break;case`format`:e=`musí obsahovať formát "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`musí byť `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`musí byť `+n;break;case`if`:e=`must match "`+r.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`musí byť `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`nesmie obsahovať viac než `+t+` prv`,e+=t==1?`ok`:`kov`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`nesmie byť dlhší než `+t+` znak`,t!=1&&(e+=`ov`);break;case`maxProperties`:e=``;var t=r.params.limit;e+=`nesmie obsahovať viac než `+t+` polož`,e+=t>=2&&t<=4?`ky`:t==1?`ka`:`iek`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`musí byť `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`nesmie obsahovať menej než `+t+` prv`,e+=t==1?`ok`:`kov`;break;case`minLength`:e=``;var t=r.params.limit;e+=`nesmie byť kratší než `+t+` znak`,t!=1&&(e+=`ov`);break;case`minProperties`:e=``;var t=r.params.limit;e+=`nesmie obsahovať menej než `+t+` polož`,e+=t>=2&&t<=4?`ky`:t==1?`ka`:`iek`;break;case`multipleOf`:e=`musí byť násobkom `+r.params.multipleOf;break;case`not`:e=`nesmie splňovať schému v "not"`;break;case`oneOf`:e=`musí splňovať práve jednu schému v "oneOf"`;break;case`pattern`:e=`musí splňovať regulárny výraz "`+r.params.pattern+`"`;break;case`patternRequired`:e=`musí obsahovať položku splňjúcu regulárny výraz "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`názov položky nezodpovedá schéme`;break;case`required`:e=`musí obsahovať požadovanú položku `+r.params.missingProperty;break;case`type`:e=`musí byť `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`nesmie obsahovať duplicitné prvky (prvky ## `+r.params.j+` a `+r.params.i+` sú rovnaké)`;break;default:e=`musí splniť "`+r.keyword+`" validáciu`}r.message=e}}})),Zl=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`borde ha fler än `+t+` sak`,t!=1&&(e+=`er`);break;case`additionalProperties`:e=`borde inte ha fler egenskaper`;break;case`anyOf`:e=`borde matcha något schema i "anyOf"`;break;case`const`:e=`bör vara en konstant`;break;case`contains`:e=`bör innehålla ett giltigt objekt`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`borde ha egenskap`,t!=1&&(e+=`er`),e+=` `+r.params.deps+` när egenskap `+r.params.property+` finns tillgängligt`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" must be string`;break;case`mapping`:e=`value of tag "`+r.params.tag+`" must be in oneOf`;break;default:e=`bör passera "`+r.keyword+`" nyckelord validering`}break;case`enum`:e=`borde vara ekvivalent med en av dess fördefinierade värden`;break;case`false schema`:e=`boolean schema är falskt`;break;case`format`:e=`borde matcha formatet "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`bör vara `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`bör vara `+n;break;case`if`:e=`must match "`+r.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`borde vara `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`borde inte ha fler än `+t+` sak`,t!=1&&(e+=`er`);break;case`maxLength`:e=``;var t=r.params.limit;e+=`borde inte vara längre än `+t+` tecken`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`borde inte ha fler än `+t+` egenskap`,t!=1&&(e+=`er`);break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`borde vara `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`borde inte ha färre än `+t+` sak`,t!=1&&(e+=`er`);break;case`minLength`:e=``;var t=r.params.limit;e+=`borde inte vara kortare än `+t+` tecken`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`borde inte ha färre än `+t+` egenskap`,t!=1&&(e+=`er`);break;case`multipleOf`:e=`borde vara en multipel av `+r.params.multipleOf;break;case`not`:e=`borde inte vara giltigt enligt schema i "not"`;break;case`oneOf`:e=`borde matcha exakt ett schema i "oneOf"`;break;case`pattern`:e=`borde matcha mönstret "`+r.params.pattern+`"`;break;case`patternRequired`:e=`bör ha en egenskap som matchar mönstret "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`egenskap med namnet är inte giltig`;break;case`required`:e=`borde ha den nödvändiga egenskapen `+r.params.missingProperty;break;case`type`:e=`borde vara `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`must NOT have more than `+t+` item`,t!=1&&(e+=`s`);break;case`unevaluatedProperties`:e=`must NOT have unevaluated properties`;break;case`uniqueItems`:e=`borde inte ha duplicerade saker (sakerna ## `+r.params.j+` och `+r.params.i+` är identiska)`;break;default:e=`bör passera "`+r.keyword+`" nyckelord validering`}r.message=e}}})),Ql=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`ต้องมีสมาชิกไม่เกิน `+t+` ตัว`;break;case`additionalProperties`:e=`ต้องไม่มี property อื่นๆ นอกเหนีอจากที่กำหนดไว้`;break;case`anyOf`:e=`ต้องตรงกับหนึ่งใน schema ที่กำหนดไว้ใน "anyOf"`;break;case`const`:e=`ต้องเท่ากับค่าคงที่`;break;case`contains`:e=`ต้องมีสมาชิกที่ผ่านเงื่อนไขอยู่`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`เมื่อมี property `+r.params.property+` แล้วจะต้องมี property `+r.params.deps+` ด้วย`;break;case`discriminator`:switch(r.params.error){case`tag`:e=`tag "`+r.params.tag+`" ต้องเป็น string`;break;case`mapping`:e=`ต้องมีค่าของ tag "`+r.params.tag+`" ใน oneOf`;break;default:e=`ต้องผ่านคีย์เวิร์ด "`+r.keyword+`"`}break;case`enum`:e=`ต้องตรงกับหนึ่งในค่าที่กำหนดไว้`;break;case`false schema`:e=`schema เป็น false`;break;case`format`:e=`ต้องเป็นรูปแบบ "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`ต้อง `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`ต้อง `+n;break;case`if`:e=`ต้องตรงกับ schema "`+r.params.failingKeyword+`"`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`ต้อง `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`ต้องมีสมาชิกไม่เกิน `+t;break;case`maxLength`:e=``;var t=r.params.limit;e+=`ต้องยาวไม่เกิน `+t+` ตัวอักษร`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`ต้องมี property ไม่เกิน `+t+` ตัว`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`ต้อง `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`ควรมีสมาชิกไม่น้อยกว่า `+t;break;case`minLength`:e=``;var t=r.params.limit;e+=`ต้องมีอย่างน้อย `+t+` ตัวอักษร`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`ต้องมี property อย่างน้อย `+t+` ตัว`;break;case`multipleOf`:e=`ต้องเป็นเลขที่หาร `+r.params.multipleOf+` ลงตัว`;break;case`not`:e=`ต้องไม่ผ่าน schema ที่กำหนดไว้ใน "not"`;break;case`oneOf`:e=`ต้องตรงกับ schema ตัวเดียวใน "oneOf" เท่านั้น`;break;case`pattern`:e=`ต้องตรงตาม pattern "`+r.params.pattern+`"`;break;case`patternRequired`:e=`ต้องมี property ที่มีชื่อตรงตาม pattern "`+r.params.missingPattern+`"`;break;case`propertyNames`:e=`ชื่อ property ไม่ถูกต้อง`;break;case`required`:e=`ต้องมี property `+r.params.missingProperty+` ด้วย`;break;case`type`:e=`ต้องเป็น `+r.params.type;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=`ต้องมีไม่เกิน `+t+` ตัว`;break;case`unevaluatedProperties`:e=`ต้องไม่มี property ที่ยังไม่ได้ผ่านการตรวจสอบเงื่อนไขใดๆ`;break;case`uniqueItems`:e=`ต้องมีสมาชิกไม่ซ้ำักัน (ลำดับที่ `+r.params.j+` กับ `+r.params.i+` ซ้ำกัน)`;break;default:e=`ต้องผ่านคีย์เวิร์ด "`+r.keyword+`"`}r.message=e}}})),$l=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`不允许超过`+t+`个元素`;break;case`additionalProperties`:e=`不允许有额外的属性`;break;case`anyOf`:e=`数据应为 anyOf 所指定的其中一个`;break;case`const`:e=`应当等于常量`;break;case`contains`:e=`应当包含一个有效项`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`应当拥有属性`+r.params.property+`的依赖属性`+r.params.deps;break;case`discriminator`:switch(r.params.error){case`tag`:e=`标签 "`+r.params.tag+`" 的类型必须为字符串`;break;case`mapping`:e=`标签 "`+r.params.tag+`" 的值必须在 oneOf 之中`;break;default:e=`应当通过 "`+r.keyword+` 关键词校验"`}break;case`enum`:e=`应当是预设定的枚举值之一`;break;case`false schema`:e=`布尔模式出错`;break;case`format`:e=`应当匹配格式 "`+r.params.format+`"`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`应当是 `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`应当是 `+n;break;case`if`:e=`应当匹配模式 "`+r.params.failingKeyword+`" `;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`应当为 `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`不应多于 `+t+` 个项`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`不应多于 `+t+` 个字符`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`不应有多于 `+t+` 个属性`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`应当为 `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`不应少于 `+t+` 个项`;break;case`minLength`:e=``;var t=r.params.limit;e+=`不应少于 `+t+` 个字符`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`不应有少于 `+t+` 个属性`;break;case`multipleOf`:e=`应当是 `+r.params.multipleOf+` 的整数倍`;break;case`not`:e=`不应当匹配 "not" schema`;break;case`oneOf`:e=`只能匹配一个 "oneOf" 中的 schema`;break;case`pattern`:e=`应当匹配模式 "`+r.params.pattern+`"`;break;case`patternRequired`:e=`应当有属性匹配模式 `+r.params.missingPattern;break;case`propertyNames`:e=`属性名 无效`;break;case`required`:e=`应当有必需属性 `+r.params.missingProperty;break;case`type`:e=`应当是 `+r.params.type+` 类型`;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=` 不允许有超过 `+t+` 个元素`;break;case`unevaluatedProperties`:e=`不允许存在未求值的属性`;break;case`uniqueItems`:e=`不应当含有重复项 (第 `+r.params.j+` 项与第 `+r.params.i+` 项是重复的)`;break;default:e=`应当通过 "`+r.keyword+` 关键词校验"`}r.message=e}}})),eu=/* @__PURE__ */ s(((e,t)=>{t.exports=function(e){if(e&&e.length)for(let r of e){let e;switch(r.keyword){case`additionalItems`:case`items`:e=``;var t=r.params.limit;e+=`不可以超過`+t+`個元素`;break;case`additionalProperties`:e=`不可以有額外的屬性`;break;case`anyOf`:e=`不符合 anyOf 指定的模式`;break;case`const`:e=`應該等於常數`;break;case`contains`:e=`應該包含一個有效元素`;break;case`dependencies`:case`dependentRequired`:e=``;var t=r.params.depsCount;e+=`應該要有屬性`+r.params.property+`的依賴屬性`+r.params.deps;break;case`discriminator`:switch(r.params.error){case`tag`:e=`標籤 "`+r.params.tag+`" 的類型必須是字串`;break;case`mapping`:e=`標籤 "`+r.params.tag+`" 必須在 oneOf 其中之一`;break;default:e=`應該通過 "`+r.keyword+` 關鍵詞檢驗"`}break;case`enum`:e=`應該要在預設的值之中`;break;case`false schema`:e=`布林模式不正確`;break;case`format`:e=`應該要符合`+r.params.format+`格式`;break;case`formatMaximum`:case`formatExclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`應該是 `+n;break;case`formatMinimum`:case`formatExclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`應該是 `+n;break;case`if`:e=`應該符合 "`+r.params.failingKeyword+`" schema`;break;case`maximum`:case`exclusiveMaximum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`應該要 `+n;break;case`maxItems`:e=``;var t=r.params.limit;e+=`不應該多於 `+t+` 個`;break;case`maxLength`:e=``;var t=r.params.limit;e+=`不應該多於 `+t+` 個字元`;break;case`maxProperties`:e=``;var t=r.params.limit;e+=`不應該多於 `+t+` 個屬性`;break;case`minimum`:case`exclusiveMinimum`:e=``;var n=r.params.comparison+` `+r.params.limit;e+=`應該要 `+n;break;case`minItems`:e=``;var t=r.params.limit;e+=`不應該少於 `+t+` 個`;break;case`minLength`:e=``;var t=r.params.limit;e+=`不應該少於 `+t+` 個字元`;break;case`minProperties`:e=``;var t=r.params.limit;e+=`不應該少於 `+t+` 個屬性`;break;case`multipleOf`:e=`應該是 `+r.params.multipleOf+` 的整數倍`;break;case`not`:e=`不應該符合 "not" schema`;break;case`oneOf`:e=`只能符合一個 "oneOf" 中的 schema`;break;case`pattern`:e=`應該符合模式 "`+r.params.pattern+`"`;break;case`patternRequired`:e=`應該有屬性對應模式 `+r.params.missingPattern;break;case`propertyNames`:e=`属性名 無效`;break;case`required`:e=`應該有必須屬性 `+r.params.missingProperty;break;case`type`:e=`應該是 `+r.params.type+` 類型`;break;case`unevaluatedItems`:e=``;var t=r.params.len;e+=` 的元素不可以超過 `+t+` 個`;break;case`unevaluatedProperties`:e=`不應該有未驗證的屬性`;break;case`uniqueItems`:e=`不應該有重複項目 (第 `+r.params.j+` 項和第 `+r.params.i+` 項是重複的)`;break;default:e=`應該通過 "`+r.keyword+` 關鍵詞檢驗"`}r.message=e}}})),tu=/* @__PURE__ */ s(((e,t)=>{t.exports={en:Ml(),ar:Nl(),ca:Pl(),cs:Fl(),de:Il(),es:Ll(),fi:Rl(),fr:zl(),hu:Bl(),id:Vl(),it:Hl(),ja:Ul(),ko:Wl(),nb:Gl(),nl:Kl(),pl:ql(),"pt-BR":Jl(),ru:Yl(),sk:Xl(),sv:Zl(),th:Ql(),zh:$l(),"zh-TW":eu()}})),nu=/* @__PURE__ */ u(co()),ru=/* @__PURE__ */ u(Fs()),iu=/* @__PURE__ */ u(hl()),au=/* @__PURE__ */ u(jl()),ou=/* @__PURE__ */ u(tu());function su(e,t=!1){let n=e.length,r=0,i=``,a=0,o=16,s=0,c=0,l=0,u=0,d=0;function f(t,n){let i=0,a=0;for(;i<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=a*16+t-48;else if(t>=65&&t<=70)a=a*16+t-65+10;else if(t>=97&&t<=102)a=a*16+t-97+10;else break;r++,i++}return i<t&&(a=-1),a}function p(e){r=e,i=``,a=0,o=16,d=0}function m(){let t=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&uu(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46){if(r++,r<e.length&&uu(e.charCodeAt(r)))for(r++;r<e.length&&uu(e.charCodeAt(r));)r++;else return d=3,e.substring(t,r)}let n=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101)){if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&uu(e.charCodeAt(r))){for(r++;r<e.length&&uu(e.charCodeAt(r));)r++;n=r}else d=3}return e.substring(t,n)}function h(){let t=``,i=r;for(;;){if(r>=n){t+=e.substring(i,r),d=2;break}let a=e.charCodeAt(r);if(a===34){t+=e.substring(i,r),r++;break}if(a===92){if(t+=e.substring(i,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+=`"`;break;case 92:t+=`\\`;break;case 47:t+=`/`;break;case 98:t+=`\b`;break;case 102:t+=`\f`;break;case 110:t+=`
|
|
1026
|
+
`;break;case 114:t+=`\r`;break;case 116:t+=` `;break;case 117:let e=f(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}i=r;continue}if(a>=0&&a<=31){if(lu(a)){t+=e.substring(i,r),d=2;break}d=6}r++}return t}function g(){if(i=``,d=0,a=r,c=s,u=l,r>=n)return a=n,o=17;let t=e.charCodeAt(r);if(cu(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(cu(t));return o=15}if(lu(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
|
|
1027
|
+
`),s++,l=r,o=14;switch(t){case 123:return r++,o=1;case 125:return r++,o=2;case 91:return r++,o=3;case 93:return r++,o=4;case 58:return r++,o=6;case 44:return r++,o=5;case 34:return r++,i=h(),o=10;case 47:let c=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!lu(e.charCodeAt(r));)r++;return i=e.substring(c,r),o=12}if(e.charCodeAt(r+1)===42){r+=2;let t=n-1,a=!1;for(;r<t;){let t=e.charCodeAt(r);if(t===42&&e.charCodeAt(r+1)===47){r+=2,a=!0;break}r++,lu(t)&&(t===13&&e.charCodeAt(r)===10&&r++,s++,l=r)}return a||(r++,d=1),i=e.substring(c,r),o=13}return i+=String.fromCharCode(t),r++,o=16;case 45:if(i+=String.fromCharCode(t),r++,r===n||!uu(e.charCodeAt(r)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),o=11;default:for(;r<n&&_(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(i=e.substring(a,r),i){case`true`:return o=8;case`false`:return o=9;case`null`:return o=7}return o=16}return i+=String.fromCharCode(t),r++,o=16}}function _(e){if(cu(e)||lu(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function v(){let e;do e=g();while(e>=12&&e<=15);return e}return{setPosition:p,getPosition:()=>r,scan:t?v:g,getToken:()=>o,getTokenValue:()=>i,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>c,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}function cu(e){return e===32||e===9}function lu(e){return e===10||e===13}function uu(e){return e>=48&&e<=57}var du;(function(e){e[e.lineFeed=10]=`lineFeed`,e[e.carriageReturn=13]=`carriageReturn`,e[e.space=32]=`space`,e[e._0=48]=`_0`,e[e._1=49]=`_1`,e[e._2=50]=`_2`,e[e._3=51]=`_3`,e[e._4=52]=`_4`,e[e._5=53]=`_5`,e[e._6=54]=`_6`,e[e._7=55]=`_7`,e[e._8=56]=`_8`,e[e._9=57]=`_9`,e[e.a=97]=`a`,e[e.b=98]=`b`,e[e.c=99]=`c`,e[e.d=100]=`d`,e[e.e=101]=`e`,e[e.f=102]=`f`,e[e.g=103]=`g`,e[e.h=104]=`h`,e[e.i=105]=`i`,e[e.j=106]=`j`,e[e.k=107]=`k`,e[e.l=108]=`l`,e[e.m=109]=`m`,e[e.n=110]=`n`,e[e.o=111]=`o`,e[e.p=112]=`p`,e[e.q=113]=`q`,e[e.r=114]=`r`,e[e.s=115]=`s`,e[e.t=116]=`t`,e[e.u=117]=`u`,e[e.v=118]=`v`,e[e.w=119]=`w`,e[e.x=120]=`x`,e[e.y=121]=`y`,e[e.z=122]=`z`,e[e.A=65]=`A`,e[e.B=66]=`B`,e[e.C=67]=`C`,e[e.D=68]=`D`,e[e.E=69]=`E`,e[e.F=70]=`F`,e[e.G=71]=`G`,e[e.H=72]=`H`,e[e.I=73]=`I`,e[e.J=74]=`J`,e[e.K=75]=`K`,e[e.L=76]=`L`,e[e.M=77]=`M`,e[e.N=78]=`N`,e[e.O=79]=`O`,e[e.P=80]=`P`,e[e.Q=81]=`Q`,e[e.R=82]=`R`,e[e.S=83]=`S`,e[e.T=84]=`T`,e[e.U=85]=`U`,e[e.V=86]=`V`,e[e.W=87]=`W`,e[e.X=88]=`X`,e[e.Y=89]=`Y`,e[e.Z=90]=`Z`,e[e.asterisk=42]=`asterisk`,e[e.backslash=92]=`backslash`,e[e.closeBrace=125]=`closeBrace`,e[e.closeBracket=93]=`closeBracket`,e[e.colon=58]=`colon`,e[e.comma=44]=`comma`,e[e.dot=46]=`dot`,e[e.doubleQuote=34]=`doubleQuote`,e[e.minus=45]=`minus`,e[e.openBrace=123]=`openBrace`,e[e.openBracket=91]=`openBracket`,e[e.plus=43]=`plus`,e[e.slash=47]=`slash`,e[e.formFeed=12]=`formFeed`,e[e.tab=9]=`tab`})(du||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
|
|
1028
|
+
`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
|
|
1029
|
+
`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
|
|
1030
|
+
`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
|
|
1031
|
+
`+` `.repeat(t));var fu;(function(e){e.DEFAULT={allowTrailingComma:!1}})(fu||={});function pu(e,t=[],n=fu.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return mu(e,{onObjectBegin:()=>{let e={};o(e),a.push(i),i=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{i=a.pop()},onArrayBegin:()=>{let e=[];o(e),a.push(i),i=e,r=null},onArrayEnd:()=>{i=a.pop()},onLiteralValue:o,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),i[0]}function mu(e,t,n=fu.DEFAULT){let r=su(e,!1),i=[],a=0;function o(e){return e?()=>a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>a===0&&e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function l(e){return e?()=>{a>0?a++:e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice())===!1&&(a=1)}:()=>!0}function u(e){return e?()=>{a>0&&a--,a===0&&e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let d=l(t.onObjectBegin),f=c(t.onObjectProperty),p=u(t.onObjectEnd),m=l(t.onArrayBegin),h=u(t.onArrayEnd),g=c(t.onLiteralValue),_=s(t.onSeparator),v=o(t.onComment),y=s(t.onError),b=n&&n.disallowComments,x=n&&n.allowTrailingComma;function S(){for(;;){let e=r.scan();switch(r.getTokenError()){case 4:C(14);break;case 5:C(15);break;case 3:C(13);break;case 1:b||C(11);break;case 2:C(12);break;case 6:C(16)}switch(e){case 12:case 13:b?C(10):v();break;case 16:C(1);break;case 15:case 14:break;default:return e}}}function C(e,t=[],n=[]){if(y(e),t.length+n.length>0){let e=r.getToken();for(;e!==17;){if(t.indexOf(e)!==-1){S();break}if(n.indexOf(e)!==-1)break;e=S()}}}function w(e){let t=r.getTokenValue();return e?g(t):(f(t),i.push(t)),S(),!0}function T(){switch(r.getToken()){case 11:let e=r.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return S(),!0}function E(){return r.getToken()===10?(w(!1),r.getToken()===6?(_(`:`),S(),k()||C(4,[],[2,5])):C(5,[],[2,5]),i.pop(),!0):(C(3,[],[2,5]),!1)}function D(){d(),S();let e=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(e||C(4,[],[]),_(`,`),S(),r.getToken()===2&&x)break}else e&&C(6,[],[]);E()||C(4,[],[2,5]),e=!0}return p(),r.getToken()===2?S():C(7,[2],[]),!0}function O(){m(),S();let e=!0,t=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(t||C(4,[],[]),_(`,`),S(),r.getToken()===4&&x)break}else t&&C(6,[],[]);e?(i.push(0),e=!1):i[i.length-1]++,k()||C(4,[],[4,5]),t=!0}return h(),e||i.pop(),r.getToken()===4?S():C(8,[4],[]),!0}function k(){switch(r.getToken()){case 3:return O();case 1:return D();case 10:return w(!0);default:return T()}}return S(),r.getToken()===17?n.allowEmptyContent?!0:(C(4,[],[]),!1):k()?(r.getToken()!==17&&C(9,[],[]),!0):(C(4,[],[]),!1)}var hu;(function(e){e[e.None=0]=`None`,e[e.UnexpectedEndOfComment=1]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=2]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=3]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=4]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=5]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=6]=`InvalidCharacter`})(hu||={});var gu;(function(e){e[e.OpenBraceToken=1]=`OpenBraceToken`,e[e.CloseBraceToken=2]=`CloseBraceToken`,e[e.OpenBracketToken=3]=`OpenBracketToken`,e[e.CloseBracketToken=4]=`CloseBracketToken`,e[e.CommaToken=5]=`CommaToken`,e[e.ColonToken=6]=`ColonToken`,e[e.NullKeyword=7]=`NullKeyword`,e[e.TrueKeyword=8]=`TrueKeyword`,e[e.FalseKeyword=9]=`FalseKeyword`,e[e.StringLiteral=10]=`StringLiteral`,e[e.NumericLiteral=11]=`NumericLiteral`,e[e.LineCommentTrivia=12]=`LineCommentTrivia`,e[e.BlockCommentTrivia=13]=`BlockCommentTrivia`,e[e.LineBreakTrivia=14]=`LineBreakTrivia`,e[e.Trivia=15]=`Trivia`,e[e.Unknown=16]=`Unknown`,e[e.EOF=17]=`EOF`})(gu||={});const _u=pu;var vu;(function(e){e[e.InvalidSymbol=1]=`InvalidSymbol`,e[e.InvalidNumberFormat=2]=`InvalidNumberFormat`,e[e.PropertyNameExpected=3]=`PropertyNameExpected`,e[e.ValueExpected=4]=`ValueExpected`,e[e.ColonExpected=5]=`ColonExpected`,e[e.CommaExpected=6]=`CommaExpected`,e[e.CloseBraceExpected=7]=`CloseBraceExpected`,e[e.CloseBracketExpected=8]=`CloseBracketExpected`,e[e.EndOfFileExpected=9]=`EndOfFileExpected`,e[e.InvalidCommentToken=10]=`InvalidCommentToken`,e[e.UnexpectedEndOfComment=11]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=12]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=13]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=14]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=15]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=16]=`InvalidCharacter`})(vu||={});var yu=/* @__PURE__ */ s(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,alnum:`a-zA-Z0-9`,alpha:`a-zA-Z`,ascii:`\\x00-\\x7F`,blank:` \\t`,cntrl:`\\x00-\\x1F\\x7F`,digit:`0-9`,graph:`\\x21-\\x7E`,lower:`a-z`,print:`\\x20-\\x7E `,punct:`\\-!"#$%&'()\\*+,./:;<=>?@[\\]^_\`{|}~`,space:` \\t\\r\\n\\v\\f`,upper:`A-Z`,word:`A-Za-z0-9_`,xdigit:`A-Fa-f0-9`},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:`negate`,open:`(?:(?!(?:`,close:`))${e.STAR})`},"?":{type:`qmark`,open:`(?:`,close:`)?`},"+":{type:`plus`,open:`(?:`,close:`)+`},"*":{type:`star`,open:`(?:`,close:`)*`},"@":{type:`at`,open:`(?:`,close:`)`}}},globChars(e){return e===!0?c:s}}})),bu=/* @__PURE__ */ s((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=yu();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),xu=/* @__PURE__ */ s(((e,t)=>{let n=bu(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:_}=yu(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.tokens===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,ee=!1,te=!1,A=!1,j=!1,ne=!1,M=!1,N=!1,P=!1,F=!1,I=!1,re=0,L,R,z={value:``,depth:0,isGlob:!1},ie=()=>D>=x,ae=()=>E.charCodeAt(D+1),oe=()=>(L=R,E.charCodeAt(++D));for(;D<x;){R=oe();let e;if(R===a){N=z.backslashes=!0,R=oe(),R===u&&(M=!0);continue}if(M===!0||R===u){for(re++;ie()!==!0&&(R=oe());){if(R===a){N=z.backslashes=!0,oe();continue}if(R===u){re++;continue}if(M!==!0&&R===s&&(R=oe())===s){if(ee=z.isBrace=!0,A=z.isGlob=!0,I=!0,S===!0)continue;break}if(M!==!0&&R===o){if(ee=z.isBrace=!0,A=z.isGlob=!0,I=!0,S===!0)continue;break}if(R===h&&(re--,re===0)){M=!1,ee=z.isBrace=!0,I=!0;break}}if(S===!0)continue;break}if(R===l){if(C.push(D),w.push(z),z={value:``,depth:0,isGlob:!1},I===!0)continue;if(L===s&&D===O+1){O+=2;continue}k=D+1;continue}if(b.noext!==!0&&(R===p||R===i||R===r||R===m||R===c)&&ae()===d){if(A=z.isGlob=!0,j=z.isExtglob=!0,I=!0,R===c&&D===O&&(F=!0),S===!0){let e=0;for(;ie()!==!0&&(R=oe());){if(R===a){N=z.backslashes=!0,oe();continue}if(R===d){e++;continue}if(R===g&&--e===0){I=!0;break}}continue}break}if(R===r){if(L===r&&(ne=z.isGlobstar=!0),A=z.isGlob=!0,I=!0,S===!0)continue;break}if(R===m){if(A=z.isGlob=!0,I=!0,S===!0)continue;break}if(R===f){for(;ie()!==!0&&(e=oe());){if(e===a){N=z.backslashes=!0,oe();continue}if(e===_){te=z.isBracket=!0,A=z.isGlob=!0,I=!0;break}}if(S===!0)continue;break}if(b.nonegate!==!0&&R===c&&D===O){P=z.negated=!0,O++;continue}if(b.noparen!==!0&&R===d){if(A=z.isGlob=!0,S===!0){let e=1;for(;ie()!==!0&&(R=oe());){if(R===a){N=z.backslashes=!0,oe();continue}if(R===d){e++;continue}if(R===g&&--e===0){I=!0;break}}continue}break}if(A===!0){if(I=!0,S===!0)continue;break}}b.noext===!0&&(j=!1,A=!1);let se=E,ce=``,le=``;O>0&&(ce=E.slice(0,O),E=E.slice(O),k-=O),se&&A===!0&&k>0?(se=E.slice(0,k),le=E.slice(k)):A===!0?(se=``,le=E):se=E,se&&se!==``&&se!==`/`&&se!==E&&v(se.charCodeAt(se.length-1))&&(se=se.slice(0,-1)),b.unescape===!0&&(le&&=n.removeBackslashes(le),se&&N===!0&&(se=n.removeBackslashes(se)));let ue={prefix:ce,input:e,start:O,base:se,glob:le,isBrace:ee,isBracket:te,isGlob:A,isExtglob:j,isGlobstar:ne,negated:P,negatedExtglob:F};if(b.tokens===!0&&(ue.maxDepth=0,v(R)||w.push(z),ue.tokens=w),b.parts===!0||b.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t===void 0?O:t+1,i=C[n],a=e.slice(r,i);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=ce):w[n].value=a,y(w[n]),ue.maxDepth+=w[n].depth),i>=O&&(T.push(a),t=i)}let n=t===void 0?O:t+1,r=e.slice(n);T.push(r),b.tokens&&t&&t+1<e.length&&(w[w.length-1].value=r,y(w[w.length-1]),ue.maxDepth+=w[w.length-1].depth),ue.slashes=C,ue.parts=T}return ue}})),Su=/* @__PURE__ */ s(((e,t)=>{let n=yu(),r=bu(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=e=>{let t=[],n=0,r=0,i=0,a=``,o=!1;for(let s of e){if(o===!0){a+=s,o=!1;continue}if(s===`\\`){a+=s,o=!0;continue}if(s===`"`){i=i===1?0:1,a+=s;continue}if(i===0){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(n===0){if(s===`(`)r++;else if(s===`)`&&r>0)r--;else if(s===`|`&&r===0){t.push(a),a=``;continue}}}a+=s}return t.push(a),t},f=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n===`\\`){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},p=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(f(t))return t.replace(/\\(.)/g,`$1`)},m=e=>{let t=e.map(p).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],a=r[0];if(a&&r===a.repeat(r.length)&&i===a.repeat(i.length)&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1},h=(e,t=!0)=>{if(e[0]!==`+`&&e[0]!==`*`||e[1]!==`(`)return;let n=0,r=0,i=0,a=!1;for(let o=1;o<e.length;o++){let s=e[o];if(a===!0){a=!1;continue}if(s===`\\`){a=!0;continue}if(s===`"`){i=i===1?0:1;continue}if(i!==1){if(s===`[`){n++;continue}if(s===`]`&&n>0){n--;continue}if(!(n>0)){if(s===`(`){r++;continue}if(s===`)`&&(r--,r===0))return t===!0&&o!==e.length-1?void 0:{type:e[0],body:e.slice(2,o),end:o}}}}},g=e=>`${e.length===1?r.escapeRegex(e[0]):`[${e.map(e=>r.escapeRegex(e)).join(``)}]`}*`,_=e=>{let t=0,n=[];for(;t<e.length;){let r=h(e.slice(t),!1);if(!r||r.type!==`*`)return;let i=d(r.body).map(e=>e.trim());if(i.length!==1)return;let a=p(i[0]);if(!a||a.length!==1)return;n.push(a),t+=r.end+1}if(!(n.length<1))return n},v=e=>{let t=0,n=e.trim(),r=h(n);for(;r;)t++,n=r.body.trim(),r=h(n);return t},y=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let r=typeof t.maxExtglobRecursion==`number`?t.maxExtglobRecursion:n.DEFAULT_MAX_EXTGLOB_RECURSION,i=d(e).map(e=>e.trim());if(i.length>1&&(i.some(e=>e===``)||i.some(e=>/^[*?]+$/.test(e))||m(i)))return{risky:!0};let a=[],o=!1,s=!0;for(let e of i){let t=_(e);if(t){o=!0,a.push(...t);continue}let n=p(e);if(n&&n.length===1){a.push(n);continue}if(s=!1,v(e)>r)return{risky:!0}}return o?s?{risky:!0,safeOutput:g([...new Set(a)])}:{risky:!0}:{risky:!1}},b=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let d={...t},f=typeof d.maxLength==`number`?Math.min(i,d.maxLength):i,p=e.length;if(p>f)throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${f}`);let m={type:`bos`,value:``,output:d.prepend||``},h=[m],g=d.capture?``:`?:`,_=n.globChars(d.windows),v=n.extglobChars(_),{DOT_LITERAL:x,PLUS_LITERAL:S,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:T,NO_DOT:E,NO_DOT_SLASH:D,NO_DOTS_SLASH:O,QMARK:k,QMARK_NO_DOT:ee,STAR:te,START_ANCHOR:A}=_,j=e=>`(${g}(?:(?!${A}${e.dot?T:x}).)*?)`,ne=d.dot?``:E,M=d.dot?k:ee,N=d.bash===!0?j(d):te;d.capture&&(N=`(${N})`),typeof d.noext==`boolean`&&(d.noextglob=d.noext);let P={input:e,index:-1,start:0,dot:d.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:h};e=r.removePrefix(e,P),p=e.length;let F=[],I=[],re=[],L=m,R,z=()=>P.index===p-1,ie=P.peek=(t=1)=>e[P.index+t],ae=P.advance=()=>e[++P.index]||``,oe=()=>e.slice(P.index+1),se=(e=``,t=0)=>{P.consumed+=e,P.index+=t},ce=e=>{P.output+=e.output==null?e.value:e.output,se(e.value)},le=()=>{let e=1;for(;ie()===`!`&&(ie(2)!==`(`||ie(3)===`?`);)ae(),P.start++,e++;return e%2!=0&&(P.negated=!0,P.start++,!0)},ue=e=>{P[e]++,re.push(e)},de=e=>{P[e]--,re.pop()},B=e=>{if(L.type===`globstar`){let t=P.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||F.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(P.output=P.output.slice(0,-L.output.length),L.type=`star`,L.value=`*`,L.output=N,P.output+=L.output)}if(F.length&&e.type!==`paren`&&(F[F.length-1].inner+=e.value),(e.value||e.output)&&ce(e),L&&L.type===`text`&&e.type===`text`){L.output=(L.output||L.value)+e.value,L.value+=e.value;return}e.prev=L,h.push(e),L=e},fe=(e,t)=>{let n={...v[t],conditions:1,inner:``};n.prev=L,n.parens=P.parens,n.output=P.output,n.startIndex=P.index,n.tokensIndex=h.length;let r=(d.capture?`(`:``)+n.open;ue(`parens`),B({type:e,value:t,output:P.output?``:w}),B({type:`paren`,extglob:!0,value:ae(),output:r}),F.push(n)},pe=n=>{let i=e.slice(n.startIndex,P.index+1),a=e.slice(n.startIndex+2,P.index),o=y(a,d);if((n.type===`plus`||n.type===`star`)&&o.risky){let e=o.safeOutput?(n.output?``:w)+(d.capture?`(${o.safeOutput})`:o.safeOutput):void 0,t=h[n.tokensIndex];t.type=`text`,t.value=i,t.output=e||r.escapeRegex(i);for(let e=n.tokensIndex+1;e<h.length;e++)h[e].value=``,h[e].output=``,delete h[e].suffix;P.output=n.output+t.output,P.backtrack=!0,B({type:`paren`,extglob:!0,value:R,output:``}),de(`parens`);return}let s=n.close+(d.capture?`)`:``),c;if(n.type===`negate`){let e=N;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=j(d)),(e!==N||z()||/^\)+$/.test(oe()))&&(s=n.close=`)$))${e}`),n.inner.includes(`*`)&&(c=oe())&&/^\.[^\\/.]+$/.test(c)&&(s=n.close=`)${b(c,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(P.negatedExtglob=!0)}B({type:`paren`,extglob:!0,value:R,output:s}),de(`parens`)};if(d.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?k.repeat(a.length):``):o===0?M+(a?k.repeat(a.length):``):k.repeat(r.length):i===`.`?x.repeat(r.length):i===`*`?t?t+i+(a?N:``):N:t?e:`\\${e}`);return n===!0&&(i=d.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&d.contains===!0?(P.output=e,P):(P.output=r.wrapOutput(i,P,t),P)}for(;!z();){if(R=ae(),R===`\0`)continue;if(R===`\\`){let e=ie();if(e===`/`&&d.bash!==!0||e===`.`||e===`;`)continue;if(!e){R+=`\\`,B({type:`text`,value:R});continue}let t=/^\\+/.exec(oe()),n=0;if(t&&t[0].length>2&&(n=t[0].length,P.index+=n,n%2!=0&&(R+=`\\`)),d.unescape===!0?R=ae():R+=ae(),P.brackets===0){B({type:`text`,value:R});continue}}if(P.brackets>0&&(R!==`]`||L.value===`[`||L.value===`[^`)){if(d.posix!==!1&&R===`:`){let e=L.value.slice(1);if(e.includes(`[`)&&(L.posix=!0,e.includes(`:`))){let e=L.value.lastIndexOf(`[`),t=L.value.slice(0,e),n=L.value.slice(e+2),r=a[n];if(r){L.value=t+r,P.backtrack=!0,ae(),!m.output&&h.indexOf(L)===1&&(m.output=w);continue}}}(R===`[`&&ie()!==`:`||R===`-`&&ie()===`]`)&&(R=`\\${R}`),R===`]`&&(L.value===`[`||L.value===`[^`)&&(R=`\\${R}`),d.posix===!0&&R===`!`&&L.value===`[`&&(R=`^`),L.value+=R,ce({value:R});continue}if(P.quotes===1&&R!==`"`){R=r.escapeRegex(R),L.value+=R,ce({value:R});continue}if(R===`"`){P.quotes=P.quotes===1?0:1,d.keepQuotes===!0&&B({type:`text`,value:R});continue}if(R===`(`){ue(`parens`),B({type:`paren`,value:R});continue}if(R===`)`){if(P.parens===0&&d.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=F[F.length-1];if(e&&P.parens===e.parens+1){pe(F.pop());continue}B({type:`paren`,value:R,output:P.parens?`)`:`\\)`}),de(`parens`);continue}if(R===`[`){if(d.nobracket===!0||!oe().includes(`]`)){if(d.nobracket!==!0&&d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));R=`\\${R}`}else ue(`brackets`);B({type:`bracket`,value:R});continue}if(R===`]`){if(d.nobracket===!0||L&&L.type===`bracket`&&L.value.length===1){B({type:`text`,value:R,output:`\\${R}`});continue}if(P.brackets===0){if(d.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));B({type:`text`,value:R,output:`\\${R}`});continue}de(`brackets`);let e=L.value.slice(1);if(L.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(R=`/${R}`),L.value+=R,ce({value:R}),d.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(L.value);if(P.output=P.output.slice(0,-L.value.length),d.literalBrackets===!0){P.output+=t,L.value=t;continue}L.value=`(${g}${t}|${L.value})`,P.output+=L.value;continue}if(R===`{`&&d.nobrace!==!0){ue(`braces`);let e={type:`brace`,value:R,output:`(`,outputIndex:P.output.length,tokensIndex:P.tokens.length};I.push(e),B(e);continue}if(R===`}`){let e=I[I.length-1];if(d.nobrace===!0||!e){B({type:`text`,value:R,output:R});continue}let t=`)`;if(e.dots===!0){let e=h.slice(),n=[];for(let t=e.length-1;t>=0&&(h.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,d),P.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=P.output.slice(0,e.outputIndex),r=P.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,R=t=`\\}`,P.output=n;for(let e of r)P.output+=e.output||e.value}B({type:`brace`,value:R,output:t}),de(`braces`),I.pop();continue}if(R===`|`){F.length>0&&F[F.length-1].conditions++,B({type:`text`,value:R});continue}if(R===`,`){let e=R,t=I[I.length-1];t&&re[re.length-1]===`braces`&&(t.comma=!0,e=`|`),B({type:`comma`,value:R,output:e});continue}if(R===`/`){if(L.type===`dot`&&P.index===P.start+1){P.start=P.index+1,P.consumed=``,P.output=``,h.pop(),L=m;continue}B({type:`slash`,value:R,output:C});continue}if(R===`.`){if(P.braces>0&&L.type===`dot`){L.value===`.`&&(L.output=x);let e=I[I.length-1];L.type=`dots`,L.output+=R,L.value+=R,e.dots=!0;continue}if(P.braces+P.parens===0&&L.type!==`bos`&&L.type!==`slash`){B({type:`text`,value:R,output:x});continue}B({type:`dot`,value:R,output:x});continue}if(R===`?`){if(!(L&&L.value===`(`)&&d.noextglob!==!0&&ie()===`(`&&ie(2)!==`?`){fe(`qmark`,R);continue}if(L&&L.type===`paren`){let e=ie(),t=R;(L.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(oe()))&&(t=`\\${R}`),B({type:`text`,value:R,output:t});continue}if(d.dot!==!0&&(L.type===`slash`||L.type===`bos`)){B({type:`qmark`,value:R,output:ee});continue}B({type:`qmark`,value:R,output:k});continue}if(R===`!`){if(d.noextglob!==!0&&ie()===`(`&&(ie(2)!==`?`||!/[!=<:]/.test(ie(3)))){fe(`negate`,R);continue}if(d.nonegate!==!0&&P.index===0){le();continue}}if(R===`+`){if(d.noextglob!==!0&&ie()===`(`&&ie(2)!==`?`){fe(`plus`,R);continue}if(L&&L.value===`(`||d.regex===!1){B({type:`plus`,value:R,output:S});continue}if(L&&(L.type===`bracket`||L.type===`paren`||L.type===`brace`)||P.parens>0){B({type:`plus`,value:R});continue}B({type:`plus`,value:S});continue}if(R===`@`){if(d.noextglob!==!0&&ie()===`(`&&ie(2)!==`?`){B({type:`at`,extglob:!0,value:R,output:``});continue}B({type:`text`,value:R});continue}if(R!==`*`){(R===`$`||R===`^`)&&(R=`\\${R}`);let e=o.exec(oe());e&&(R+=e[0],P.index+=e[0].length),B({type:`text`,value:R});continue}if(L&&(L.type===`globstar`||L.star===!0)){L.type=`star`,L.star=!0,L.value+=R,L.output=N,P.backtrack=!0,P.globstar=!0,se(R);continue}let t=oe();if(d.noextglob!==!0&&/^\([^?]/.test(t)){fe(`star`,R);continue}if(L.type===`star`){if(d.noglobstar===!0){se(R);continue}let n=L.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(d.bash===!0&&(!i||t[0]&&t[0]!==`/`)){B({type:`star`,value:R,output:``});continue}let o=P.braces>0&&(n.type===`comma`||n.type===`brace`),s=F.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){B({type:`star`,value:R,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[P.index+4];if(n&&n!==`/`)break;t=t.slice(3),se(`/**`,3)}let c=z()||P.parens>0&&t===`)`.repeat(P.parens)&&!F.some(e=>e.type===`negate`);if(n.type===`bos`&&z()){L.type=`globstar`,L.value+=R,L.output=j(d),P.output=L.output,P.globstar=!0,se(R);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&c){P.output=P.output.slice(0,-(n.output+L.output).length),n.output=`(?:${n.output}`,L.type=`globstar`,L.output=j(d)+(d.strictSlashes?`)`:`|$)`),L.value+=R,P.globstar=!0,P.output+=n.output+L.output,se(R);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;P.output=P.output.slice(0,-(n.output+L.output).length),n.output=`(?:${n.output}`,L.type=`globstar`,L.output=`${j(d)}${C}|${C}${e})`,L.value+=R,P.output+=n.output+L.output,P.globstar=!0,se(R+ae()),B({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){L.type=`globstar`,L.value+=R,L.output=`(?:^|${C}|${j(d)}${C})`,P.output=L.output,P.globstar=!0,se(R+ae()),B({type:`slash`,value:`/`,output:``});continue}P.output=P.output.slice(0,-L.output.length),L.type=`globstar`,L.output=j(d),L.value+=R,P.output+=L.output,P.globstar=!0,se(R);continue}let n={type:`star`,value:R,output:N};if(d.bash===!0){n.output=`.*?`,(L.type===`bos`||L.type===`slash`)&&(n.output=ne+n.output),B(n);continue}if(L&&(L.type===`bracket`||L.type===`paren`)&&d.regex===!0){n.output=R,B(n);continue}(P.index===P.start||L.type===`slash`||L.type===`dot`)&&(L.type===`dot`?(P.output+=D,L.output+=D):d.dot===!0?(P.output+=O,L.output+=O):(P.output+=ne,L.output+=ne),ie()!==`*`&&(P.output+=w,L.output+=w)),B(n)}for(;P.brackets>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));P.output=r.escapeLast(P.output,`[`),de(`brackets`)}for(;P.parens>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));P.output=r.escapeLast(P.output,`(`),de(`parens`)}for(;P.braces>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));P.output=r.escapeLast(P.output,`{`),de(`braces`)}if(d.strictSlashes!==!0&&(L.type===`star`||L.type===`bracket`)&&B({type:`maybe_slash`,value:``,output:`${C}?`}),P.backtrack===!0){P.output=``;for(let e of P.tokens)P.output+=e.output==null?e.value:e.output,e.suffix&&(P.output+=e.suffix)}return P};b.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},T=w(r.removePrefix(e,x));return T&&a.strictSlashes!==!0&&(T+=`${u}?`),T},t.exports=b})),Cu=/* @__PURE__ */ s(((e,t)=>{let n=xu(),r=Su(),i=bu(),a=yu(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),!r||p)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n,r=n&&n.windows)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e,{windows:r})),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),wu=/* @__PURE__ */ s(((e,t)=>{let n=Cu(),r=bu();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i}));Dt();var Tu=/* @__PURE__ */ u(wu());const Eu=Symbol.for(`yaml.alias`),Du=Symbol.for(`yaml.document`),Ou=Symbol.for(`yaml.map`),ku=Symbol.for(`yaml.pair`),Au=Symbol.for(`yaml.scalar`),ju=Symbol.for(`yaml.seq`),Mu=Symbol.for(`yaml.node.type`),Nu=e=>!!e&&typeof e==`object`&&e[Mu]===Eu,Pu=e=>!!e&&typeof e==`object`&&e[Mu]===Du,Fu=e=>!!e&&typeof e==`object`&&e[Mu]===Ou,Iu=e=>!!e&&typeof e==`object`&&e[Mu]===ku,H=e=>!!e&&typeof e==`object`&&e[Mu]===Au,Lu=e=>!!e&&typeof e==`object`&&e[Mu]===ju;function Ru(e){if(e&&typeof e==`object`)switch(e[Mu]){case Ou:case ju:return!0}return!1}function zu(e){if(e&&typeof e==`object`)switch(e[Mu]){case Eu:case Ou:case Au:case ju:return!0}return!1}const Bu=e=>(H(e)||Ru(e))&&!!e.anchor,Vu=Symbol(`break visit`),Hu=Symbol(`skip children`),Uu=Symbol(`remove node`);function Wu(e,t){let n=Ku(t);Pu(e)?Gu(null,e.contents,n,Object.freeze([e]))===Uu&&(e.contents=null):Gu(null,e,n,Object.freeze([]))}Wu.BREAK=Vu,Wu.SKIP=Hu,Wu.REMOVE=Uu;function Gu(e,t,n,r){let i=qu(e,t,n,r);if(zu(i)||Iu(i))return Ju(e,r,i),Gu(e,i,n,r);if(typeof i!=`symbol`){if(Ru(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Gu(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Vu)return Vu;else i===Uu&&(t.items.splice(e,1),--e)}}else if(Iu(t)){r=Object.freeze(r.concat(t));let e=Gu(`key`,t.key,n,r);if(e===Vu)return Vu;e===Uu&&(t.key=null);let i=Gu(`value`,t.value,n,r);if(i===Vu)return Vu;i===Uu&&(t.value=null)}}return i}function Ku(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 qu(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Fu(t))return n.Map?.(e,t,r);if(Lu(t))return n.Seq?.(e,t,r);if(Iu(t))return n.Pair?.(e,t,r);if(H(t))return n.Scalar?.(e,t,r);if(Nu(t))return n.Alias?.(e,t,r)}function Ju(e,t,n){let r=t[t.length-1];if(Ru(r))r.items[e]=n;else if(Iu(r))e===`key`?r.key=n:r.value=n;else if(Pu(r))r.contents=n;else{let e=Nu(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}const Yu={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Xu=e=>e.replace(/[!,[\]{}]/g,e=>Yu[e]);var Zu=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Xu(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&zu(e.contents)){let t={};Wu(e.contents,(e,n)=>{zu(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
1032
|
+
`)}};Zu.defaultYaml={explicit:!1,version:`1.2`},Zu.defaultTags={"!!":`tag:yaml.org,2002:`};function Qu(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 $u(e){let t=/* @__PURE__ */ new Set;return Wu(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function ed(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function td(e,t){let n=[],r=/* @__PURE__ */ new Map,i=null;return{onAnchor:r=>{n.push(r),i??=$u(e);let a=ed(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(H(t.node)||Ru(t.node)))t.node.anchor=t.anchor;else{let t=/* @__PURE__ */ Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function nd(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=nd(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=nd(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=nd(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=nd(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function rd(e,t,n){if(Array.isArray(e))return e.map((e,t)=>rd(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Bu(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var id=class{constructor(e){Object.defineProperty(this,Mu,{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:n,onAnchor:r,reviver:i}={}){if(!Pu(e))throw TypeError(`A document argument is required`);let a={anchors:/* @__PURE__ */ new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=rd(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?nd(i,{"":o},``,o):o}},ad=class extends id{constructor(e){super(Eu),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Wu(e,{Node:(e,t)=>{(Nu(t)||Bu(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);
|
|
1033
|
+
/* istanbul ignore if */
|
|
1034
|
+
if(o||=(rd(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=od(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Qu(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function od(e,t,n){if(Nu(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Ru(t)){let r=0;for(let i of t.items){let t=od(e,i,n);t>r&&(r=t)}return r}if(Iu(t)){let r=od(e,t.key,n),i=od(e,t.value,n);return Math.max(r,i)}return 1}const sd=e=>!e||typeof e!=`function`&&typeof e!=`object`;var cd=class extends id{constructor(e){super(Au),this.value=e}toJSON(e,t){return t?.keep?this.value:rd(this.value,e,t)}toString(){return String(this.value)}};cd.BLOCK_FOLDED=`BLOCK_FOLDED`,cd.BLOCK_LITERAL=`BLOCK_LITERAL`,cd.PLAIN=`PLAIN`,cd.QUOTE_DOUBLE=`QUOTE_DOUBLE`,cd.QUOTE_SINGLE=`QUOTE_SINGLE`;function ld(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function ud(e,t,n){if(Pu(e)&&(e=e.contents),zu(e))return e;if(Iu(e)){let t=n.schema[Ou].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new ad(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=`tag:yaml.org,2002:`+t.slice(2));let l=ld(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new cd(e);return c&&(c.node=t),t}l=e instanceof Map?o[Ou]:Symbol.iterator in Object(e)?o[ju]:o[Ou]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new cd(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function dd(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=/* @__PURE__ */ new Map([[n,r]])}return ud(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:/* @__PURE__ */ new Map})}const fd=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done;var pd=class extends id{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(t=>zu(t)||Iu(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(fd(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Ru(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,dd(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Ru(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&H(i)?i.value:i:Ru(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Iu(t))return!1;let n=t.value;return n==null||e&&H(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Ru(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Ru(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,dd(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};const md=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function hd(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const gd=(e,t,n)=>e.endsWith(`
|
|
1035
|
+
`)?hd(n,t):n.includes(`
|
|
1036
|
+
`)?`
|
|
1037
|
+
`+hd(n,t):(e.endsWith(` `)?``:` `)+n,_d=`flow`;function vd(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=yd(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
|
1038
|
+
`)n===`block`&&(h=yd(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
|
1039
|
+
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
1040
|
+
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function yd(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
1041
|
+
`);r=t,i=t+1,a=e[i]}return r}const bd=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),xd=e=>/^(%|---|\.\.\.)/m.test(e);function Sd(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
|
1042
|
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Cd(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(xd(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
|
1043
|
+
|
|
1044
|
+
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
|
1045
|
+
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:vd(o,a,`quoted`,bd(t,!1))}function wd(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
1046
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Cd(e,t);let n=t.indent||(xd(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:vd(r,n,_d,bd(t,!1))}function Td(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Cd;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?wd:i&&!t?Cd:n?wd:Cd}return r(e,t)}let Ed;try{Ed=/* @__PURE__ */ RegExp(`(^|(?<!
|
|
1047
|
+
))
|
|
1048
|
+
+(?!
|
|
1049
|
+
|$)`,`g`)}catch{Ed=/\n+(?!\n|$)/g}function Dd({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return Td(n,r);let l=r.indent||(r.forceBlockIndent||xd(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===cd.BLOCK_FOLDED?!1:t===cd.BLOCK_LITERAL||!Sd(n,c,l.length);if(!n)return u?`|
|
|
1050
|
+
`:`>
|
|
1051
|
+
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
|
1052
|
+
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
|
1053
|
+
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
|
1054
|
+
`&&(p=p.slice(0,-1)),p.replace(Ed,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
|
1055
|
+
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
|
1056
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=bd(r,!0);o!==`folded`&&t!==cd.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=vd(`${v}${e}${p}`,l,`block`,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function Od(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
|
1057
|
+
`)||u&&/[[\]{},]/.test(a))return Td(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
|
1058
|
+
`)?Td(a,t):Dd(e,t,n,r);if(!s&&!u&&i!==cd.PLAIN&&a.includes(`
|
|
1059
|
+
`))return Dd(e,t,n,r);if(xd(a)){if(c===``)return t.forceBlockIndent=!0,Dd(e,t,n,r);if(s&&c===l)return Td(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return Td(a,t)}return s?d:vd(d,c,_d,bd(t,!1))}function kd(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==cd.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=cd.QUOTE_DOUBLE);let c=e=>{switch(e){case cd.BLOCK_FOLDED:case cd.BLOCK_LITERAL:return i||a?Td(o.value,t):Dd(o,t,n,r);case cd.QUOTE_DOUBLE:return Cd(o.value,t);case cd.QUOTE_SINGLE:return wd(o.value,t);case cd.PLAIN:return Od(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function Ad(e,t){let n=Object.assign({blockQuote:!0,commentString:md,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),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:/* @__PURE__ */ new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function jd(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(H(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Md(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(H(e)||Ru(e))&&e.anchor;a&&Qu(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function Nd(e,t,n,r){if(Iu(e))return e.toString(t,n,r);if(Nu(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=/* @__PURE__ */ new Set([e]),e=e.resolve(t.doc)}let i,a=zu(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=jd(t.doc.schema.tags,a);let o=Md(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):H(a)?kd(a,t,n,r):a.toString(t,n,r);return o?H(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Pd({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=zu(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(Ru(e)||!zu(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||Ru(e)||(H(e)?e.type===cd.BLOCK_FOLDED||e.type===cd.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Nd(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=gd(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=gd(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=gd(g,n.indent,l(f))));let _,v,y;zu(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&H(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&Lu(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Nd(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
|
1060
|
+
`:``,v){let e=l(v);S+=`\n${hd(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
|
1061
|
+
`&&y&&(S=`
|
|
1062
|
+
|
|
1063
|
+
`):S+=`\n${n.indent}`}else if(!p&&Ru(t)){let e=x[0],r=x.indexOf(`
|
|
1064
|
+
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
|
1065
|
+
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=gd(g,n.indent,l(y)):h&&i&&i(),g}function Fd(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}const Id={identify:e=>e===`<<`||typeof e==`symbol`&&e.description===`<<`,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new cd(Symbol(`<<`)),{addToJSMap:Rd}),stringify:()=>`<<`},Ld=(e,t)=>(Id.identify(t)||H(t)&&(!t.type||t.type===cd.PLAIN)&&Id.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Id.tag&&e.default);function Rd(e,t,n){if(n=e&&Nu(n)?n.resolve(e.doc):n,Lu(n))for(let r of n.items)zd(e,t,r);else if(Array.isArray(n))for(let r of n)zd(e,t,r);else zd(e,t,n)}function zd(e,t,n){let r=e&&Nu(n)?n.resolve(e.doc):n;if(!Fu(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Bd(e,t,{key:n,value:r}){if(zu(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Ld(e,n))Rd(e,t,r);else{let i=rd(n,``,e);if(t instanceof Map)t.set(i,rd(r,i,e));else if(t instanceof Set)t.add(i);else{let a=Vd(n,i,e),o=rd(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function Vd(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(zu(e)&&n?.doc){let t=Ad(n.doc,{});t.anchors=/* @__PURE__ */ new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Fd(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function Hd(e,t,n){return new Ud(ud(e,void 0,n),ud(t,void 0,n))}var Ud=class e{constructor(e,t=null){Object.defineProperty(this,Mu,{value:ku}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return zu(n)&&(n=n.clone(t)),zu(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return Bd(t,t?.mapAsMap?/* @__PURE__ */ new Map:{},this)}toString(e,t,n){return e?.doc?Pd(this,e,t,n):JSON.stringify(this)}};function Wd(e,t,n){return(t.inFlow??e.flow?Kd:Gd)(e,t,n)}function Gd({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(zu(i))!d&&i.spaceBefore&&f.push(``),qd(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(Iu(i)){let e=zu(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),qd(n,f,e.commentBefore,d))}d=!1;let s=Nd(i,u,()=>o=null,()=>d=!0);o&&(s+=gd(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
|
1066
|
+
`}}return e?(p+=`
|
|
1067
|
+
`+hd(l(e),c),s&&s()):d&&o&&o(),p}function Kd({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(zu(i))i.spaceBefore&&d.push(``),qd(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(Iu(i)){let e=zu(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),qd(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=zu(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=Nd(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
1068
|
+
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=gd(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
|
1069
|
+
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function qd({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=hd(t(r),e);n.push(i.trimStart())}}function Jd(e,t){let n=H(t)?t.value:t;for(let r of e)if(Iu(r)&&(r.key===t||r.key===n||H(r.key)&&r.key.value===n))return r}var Yd=class extends pd{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Ou,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(Hd(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=Iu(e)?e:!e||typeof e!=`object`||!(`key`in e)?new Ud(e,e?.value):new Ud(e.key,e.value);let r=Jd(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);H(r.value)&&sd(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=Jd(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=Jd(this.items,e)?.value;return(!t&&H(n)?n.value:n)??void 0}has(e){return!!Jd(this.items,e)}set(e,t){this.add(new Ud(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?/* @__PURE__ */ new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)Bd(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Iu(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Wd(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}};const Xd={collection:`map`,default:!0,nodeClass:Yd,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Fu(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Yd.from(e,t,n)};var Zd=class extends pd{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(ju,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Qd(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=Qd(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&H(r)?r.value:r}has(e){let t=Qd(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=Qd(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];H(r)&&sd(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(rd(e,String(r++),t));return n}toString(e,t,n){return e?Wd(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(ud(a,void 0,n))}}return i}};function Qd(e){let t=H(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}const $d={collection:`seq`,default:!0,nodeClass:Zd,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return Lu(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>Zd.from(e,t,n)},ef={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),kd(e,t,n,r)}},tf={identify:e=>e==null,createNode:()=>new cd(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new cd(null),stringify:({source:e},t)=>typeof e==`string`&&tf.test.test(e)?e:t.options.nullStr},nf={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new cd(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&nf.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function rf({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^\d/.test(a)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}const af={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:rf},of={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():rf(e)}},sf={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 cd(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:rf},cf=e=>typeof e==`bigint`||Number.isInteger(e),lf=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function uf(e,t,n){let{value:r}=e;return cf(r)&&r>=0?n+r.toString(t):rf(e)}const df={identify:e=>cf(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>lf(e,2,8,n),stringify:e=>uf(e,8,`0o`)},ff={identify:cf,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>lf(e,0,10,n),stringify:rf},pf={identify:e=>cf(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>lf(e,2,16,n),stringify:e=>uf(e,16,`0x`)},mf=[Xd,$d,ef,tf,nf,df,ff,pf,af,of,sf];function hf(e){return typeof e==`bigint`||Number.isInteger(e)}const gf=({value:e})=>JSON.stringify(e),_f=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:gf},{identify:e=>e==null,createNode:()=>new cd(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:gf},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:gf},{identify:hf,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>hf(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:gf}],vf=[Xd,$d].concat(_f,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),yf={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=cd.BLOCK_LITERAL,t!==cd.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===cd.BLOCK_LITERAL?`
|
|
1070
|
+
`:` `)}return kd({comment:e,type:t,value:s},r,i,a)}};function bf(e,t){if(Lu(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Iu(r)){if(Fu(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new Ud(new cd(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=Iu(r)?r:new Ud(r)}}else t(`Expected a sequence for this tag`);return e}function xf(e,t,n){let{replacer:r}=n,i=new Zd(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(Hd(o,s,n))}return i}const Sf={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:bf,createNode:xf};var Cf=class e extends Zd{constructor(){super(),this.add=Yd.prototype.add.bind(this),this.delete=Yd.prototype.delete.bind(this),this.get=Yd.prototype.get.bind(this),this.has=Yd.prototype.has.bind(this),this.set=Yd.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=/* @__PURE__ */ new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(Iu(e)?(r=rd(e.key,``,t),i=rd(e.value,r,t)):r=rd(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=xf(e,t,n),i=new this;return i.items=r.items,i}};Cf.tag=`tag:yaml.org,2002:omap`;const wf={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Cf,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=bf(e,t),r=[];for(let{key:e}of n.items)H(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Cf,n)},createNode:(e,t,n)=>Cf.from(e,t,n)};function Tf({value:e,source:t},n){return t&&(e?Ef:Df).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const Ef={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 cd(!0),stringify:Tf},Df={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 cd(!1),stringify:Tf},Of={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:rf},kf={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():rf(e)}},Af={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 cd(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:rf},jf=e=>typeof e==`bigint`||Number.isInteger(e);function Mf(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function Nf(e,t,n){let{value:r}=e;if(jf(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return rf(e)}const Pf={identify:jf,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Mf(e,2,2,n),stringify:e=>Nf(e,2,`0b`)},Ff={identify:jf,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Mf(e,1,8,n),stringify:e=>Nf(e,8,`0`)},If={identify:jf,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Mf(e,0,10,n),stringify:rf},Lf={identify:jf,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Mf(e,2,16,n),stringify:e=>Nf(e,16,`0x`)};var Rf=class e extends Yd{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Iu(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new Ud(e.key,null):new Ud(e,null),Jd(this.items,t.key)||this.items.push(t)}get(e,t){let n=Jd(this.items,e);return!t&&Iu(n)?H(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Jd(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Ud(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(Hd(e,null,n));return i}};Rf.tag=`tag:yaml.org,2002:set`;const zf={collection:`map`,identify:e=>e instanceof Set,nodeClass:Rf,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>Rf.from(e,t,n),resolve(e,t){if(Fu(e)){if(e.hasAllNullValues(!0))return Object.assign(new Rf,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function Bf(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function Vf(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return rf(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}const Hf={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:n})=>Bf(e,n),stringify:Vf},Uf={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=>Bf(e,!1),stringify:Vf},Wf={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(Wf.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=Bf(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},Gf=[Xd,$d,ef,tf,Ef,Df,Pf,Ff,If,Lf,Of,kf,Af,yf,Id,wf,Sf,zf,Hf,Uf,Wf],Kf=/* @__PURE__ */ new Map([[`core`,mf],[`failsafe`,[Xd,$d,ef]],[`json`,vf],[`yaml11`,Gf],[`yaml-1.1`,Gf]]),qf={binary:yf,bool:nf,float:sf,floatExp:of,floatNaN:af,floatTime:Uf,int:ff,intHex:pf,intOct:df,intTime:Hf,map:Xd,merge:Id,null:tf,omap:wf,pairs:Sf,seq:$d,set:zf,timestamp:Wf},Jf={"tag:yaml.org,2002:binary":yf,"tag:yaml.org,2002:merge":Id,"tag:yaml.org,2002:omap":wf,"tag:yaml.org,2002:pairs":Sf,"tag:yaml.org,2002:set":zf,"tag:yaml.org,2002:timestamp":Wf};function Yf(e,t,n){let r=Kf.get(t);if(r&&!e)return n&&!r.includes(Id)?r.concat(Id):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(Kf.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(Id)),i.reduce((e,t)=>{let n=typeof t==`string`?qf[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(qf).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}const Xf=(e,t)=>e.key<t.key?-1:+(e.key>t.key);var Zf=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Yf(e,`compat`):e?Yf(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?Jf:{},this.tags=Yf(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Ou,{value:Xd}),Object.defineProperty(this,Au,{value:ef}),Object.defineProperty(this,ju,{value:$d}),this.sortMapEntries=typeof a==`function`?a:a===!0?Xf:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Qf(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=Ad(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(hd(t,``))}let o=!1,s=null;if(e.contents){if(zu(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(hd(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=Nd(e.contents,i,()=>s=null,t);s&&(c+=gd(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Nd(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
|
|
1071
|
+
`)?(n.push(`...`),n.push(hd(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(hd(a(t),``)))}return n.join(`
|
|
1072
|
+
`)+`
|
|
1073
|
+
`}var $f=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Mu,{value:Du});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Zu({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Mu]:{value:Du}});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=zu(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){ep(this.contents)&&this.contents.add(e)}addIn(e,t){ep(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=$u(this);e.anchor=!t||n.has(t)?ed(t||`a`,n):t}return new ad(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=td(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=ud(e,l,p);return o&&Ru(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new Ud(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return ep(this.contents)?this.contents.delete(e):!1}deleteIn(e){return fd(e)?this.contents!=null&&(this.contents=null,!0):ep(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ru(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return fd(e)?!t&&H(this.contents)?this.contents.value:this.contents:Ru(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ru(this.contents)?this.contents.has(e):!1}hasIn(e){return fd(e)?this.contents!==void 0:Ru(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=dd(this.schema,[e],t):ep(this.contents)&&this.contents.set(e,t)}setIn(e,t){fd(e)?this.contents=t:this.contents==null?this.contents=dd(this.schema,Array.from(e),t):ep(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new Zu({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new Zu({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Zf(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:/* @__PURE__ */ new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=rd(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?nd(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return Qf(this,e)}};function ep(e){if(Ru(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var tp=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},np=class extends tp{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},rp=class extends tp{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}};const ip=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
|
1074
|
+
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function ap(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function op(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
|
1075
|
+
`))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 e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(op(t.key)||op(t.value))return!0}return!1;default:return!0}}function sp(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&op(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function cp(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||H(e)&&H(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}const lp=`All mapping items must start at the same column`;function up({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Yd)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=ap(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,lp)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
|
|
1076
|
+
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||op(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,lp);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&sp(r.indent,u,i),n.atKey=!1,cp(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=ap(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&sp(r.indent,f,i),s=c.range[2];let l=new Ud(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
|
|
1077
|
+
`+_.comment:g.comment=_.comment);let e=new Ud(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function dp({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Zd)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=ap(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&sp(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function fp(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}const pp=`Block collections are not allowed within flow collections`,mp=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function hp({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?Yd:Zd))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=ap(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
|
|
1078
|
+
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&op(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];Iu(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
|
1079
|
+
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],mp(m)&&i(r.range,`BLOCK_IN_FLOW`,pp)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);mp(f)&&i(g.range,`BLOCK_IN_FLOW`,pp),n.atKey=!1;let _=ap(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?mp(m)&&i(v.range,`BLOCK_IN_FLOW`,pp):_.comment&&(g.comment?g.comment+=`
|
|
1080
|
+
`+_.comment:g.comment=_.comment);let y=new Ud(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;cp(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new Yd(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=fp(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
|
1081
|
+
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function gp(e,t,n,r,i,a){let o=n.type===`block-map`?up(e,t,n,r,a):n.type===`block-seq`?dp(e,t,n,r,a):hp(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function _p(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===Yd.tagName&&s===`map`||o===Zd.tagName&&s===`seq`)return gp(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),gp(e,t,n,i,o)}let l=gp(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=zu(u)?u:new cd(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function vp(e,t,n){let r=t.offset,i=yp(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?cd.BLOCK_FOLDED:cd.BLOCK_LITERAL,o=t.source?bp(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
|
1082
|
+
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
|
1083
|
+
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;
|
|
1084
|
+
/* istanbul ignore if already caught in lexer */
|
|
1085
|
+
if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===cd.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
|
1086
|
+
`):t.length>c||r[0]===` `?(f===` `?f=`
|
|
1087
|
+
`:!p&&f===`
|
|
1088
|
+
`&&(f=`
|
|
1089
|
+
|
|
1090
|
+
`),d+=f+t.slice(c)+r,f=`
|
|
1091
|
+
`,p=!0):r===``?f===`
|
|
1092
|
+
`?d+=`
|
|
1093
|
+
`:f=`
|
|
1094
|
+
`:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
|
|
1095
|
+
`+o[e][0].slice(c);d[d.length-1]!==`
|
|
1096
|
+
`&&(d+=`
|
|
1097
|
+
`);break;default:d+=`
|
|
1098
|
+
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function yp({offset:e,props:t},n,r){
|
|
1099
|
+
/* istanbul ignore if should not happen */
|
|
1100
|
+
if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;
|
|
1101
|
+
/* istanbul ignore next should not happen */
|
|
1102
|
+
default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function bp(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function xp(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=cd.PLAIN,c=Sp(a,l);break;case`single-quoted-scalar`:s=cd.QUOTE_SINGLE,c=Cp(a,l);break;case`double-quoted-scalar`:s=cd.QUOTE_DOUBLE,c=Tp(a,l);break;
|
|
1103
|
+
/* istanbul ignore next should not happen */
|
|
1104
|
+
default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=fp(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Sp(e,t){let n=``;switch(e[0]){
|
|
1105
|
+
/* istanbul ignore next should not happen */
|
|
1106
|
+
case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),wp(e)}function Cp(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),wp(e.slice(1,-1)).replace(/''/g,`'`)}function wp(e){let t,n;try{t=/* @__PURE__ */ RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
1107
|
+
`,`sy`),n=/* @__PURE__ */ RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
1108
|
+
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
|
|
1109
|
+
`?i+=a:a=`
|
|
1110
|
+
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function Tp(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
|
|
1111
|
+
`){if(i===`
|
|
1112
|
+
`){let{fold:t,offset:i}=Ep(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=Dp[i];if(a)n+=a;else if(i===`
|
|
1113
|
+
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
|
1114
|
+
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a={x:2,u:4,U:8}[i];n+=Op(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
|
1115
|
+
`&&(a!==`\r`||e[r+2]!==`
|
|
1116
|
+
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function Ep(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
|
1117
|
+
`||r===`\r`)&&(r!==`\r`||e[t+2]===`
|
|
1118
|
+
`);)r===`
|
|
1119
|
+
`&&(n+=`
|
|
1120
|
+
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}const Dp={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
|
1121
|
+
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function Op(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(a)){let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}return String.fromCodePoint(a)}function kp(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?vp(e,t,r):xp(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[Au]:c?Ap(e.schema,i,c,n,r):t.type===`scalar`?jp(e,i,t,r):e.schema[Au];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=H(a)?a:new cd(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new cd(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function Ap(e,t,n,r,i){if(n===`!`)return e[Au];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)a.push(t);else return t}for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[Au])}function jp({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[Au];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Au];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function Mp(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}const Np={composeNode:Pp,composeEmptyNode:Fp};function Pp(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=Ip(e,t,r),(s||c)&&r(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`:l=kp(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=_p(Np,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=Fp(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!H(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function Fp(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=kp(e,{type:`scalar`,offset:Mp(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function Ip({options:e},{offset:t,source:n,end:r},i){let a=new ad(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=fp(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function Lp(e,t,{offset:n,start:r,value:i,end:a},o){let s=new $f(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=ap(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?Pp(c,i,l,o):Fp(c,l.end,r,null,l,o);let u=s.contents.range[2],d=fp(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function Rp(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:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function zp(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
|
|
1122
|
+
|
|
1123
|
+
`:`
|
|
1124
|
+
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var Bp=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=Rp(e);r?this.warnings.push(new rp(i,t,n)):this.errors.push(new np(i,t,n))},this.directives=new Zu({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=zp(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(Ru(i)&&!i.flow&&i.items.length>0){let e=i.items[0];Iu(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:zp(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=Rp(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=Lp(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,n=new np(Rp(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new np(Rp(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=fp(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new np(Rp(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 e=new $f(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}};const Vp=e=>`type`in e?Hp(e):Up(e);function Hp(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=Hp(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=Up(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=Up(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=Up(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if(`end`in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function Up({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=Hp(t)),n)for(let e of n)i+=e.source;return r&&(i+=Hp(r)),i}const Wp=Symbol(`break visit`),Gp=Symbol(`skip children`),Kp=Symbol(`remove item`);function qp(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),Jp(Object.freeze([]),e,t)}qp.BREAK=Wp,qp.SKIP=Gp,qp.REMOVE=Kp,qp.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},qp.parentCollection=(e,t)=>{let n=qp.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function Jp(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=Jp(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===Wp)return Wp;else r===Kp&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}const Yp=e=>!!e&&`items`in e,Xp=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function Zp(e){switch(e){case``: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`
|
|
1125
|
+
`:case`\r
|
|
1126
|
+
`: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 Qp(e){switch(e){case void 0:case` `:case`
|
|
1127
|
+
`:case`\r`:case` `:return!0;default:return!1}}const $p=/* @__PURE__ */ new Set(`0123456789ABCDEFabcdef`),em=/* @__PURE__ */ new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),tm=/* @__PURE__ */ new Set(`,[]{}`),nm=/* @__PURE__ */ new Set(` ,[]{}
|
|
1128
|
+
\r `),rm=e=>!e||nm.has(e);var im=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 n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
|
1129
|
+
`||t===`\r`&&this.buffer[e+1]===`
|
|
1130
|
+
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
|
1131
|
+
`||!t&&!this.atEnd)return e+n+1}return t===`
|
|
1132
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&Qp(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(`
|
|
1133
|
+
`,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]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),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 e=this.peek(3);if((e===`---`||e===`...`)&&Qp(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Qp(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===`:`)&&Qp(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,yield*this.parseBlockStart()}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(rm),`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,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&Qp(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`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(rm),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||Qp(e)||e===`,`)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 e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
1134
|
+
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
|
1135
|
+
`,e)}r!==-1&&(t=r-(n[r-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(e=>Qp(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
|
1136
|
+
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
|
1137
|
+
`)break}default:break loop}if(!n&&!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 t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
|
1138
|
+
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
|
1139
|
+
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
|
1140
|
+
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(Qp(r)||e&&tm.has(r))break;t=n}else if(Qp(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
|
1141
|
+
`?(n+=1,r=`
|
|
1142
|
+
`,i=this.buffer[n+1]):t=n),i===`#`||e&&tm.has(i))break;if(r===`
|
|
1143
|
+
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&tm.has(r))break;t=n}return!r&&!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 n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){switch(this.charAt(0)){case`!`:return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`&`:return(yield*this.pushUntil(rm))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`-`:case`?`:case`:`:{let e=this.flowLevel>0,t=this.charAt(1);if(Qp(t)||e&&tm.has(t))return e?this.flowKey&&=!1:this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!Qp(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(em.has(t))t=this.buffer[++e];else if(t===`%`&&$p.has(this.buffer[e+1])&&$p.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===`
|
|
1144
|
+
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
|
1145
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},am=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function om(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function sm(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 cm(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 lm(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;
|
|
1146
|
+
/* istanbul ignore next should not happen */
|
|
1147
|
+
default:return[]}}function um(e){if(e.length===0)return[];let t=e.length;loop: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 loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function dm(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!om(t.start,`explicit-key-ind`)&&!om(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,cm(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}var fm=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 im,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);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=Zp(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else 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}}*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});return}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)}
|
|
1148
|
+
/* istanbul ignore next should not happen */
|
|
1149
|
+
yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();
|
|
1150
|
+
/* istanbul ignore if should not happen */
|
|
1151
|
+
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 e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&dm(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}
|
|
1152
|
+
/* istanbul ignore next should not happen */
|
|
1153
|
+
default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&sm(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.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`:sm(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=um(lm(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}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 e=this.source.indexOf(`
|
|
1154
|
+
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1155
|
+
`,e)+1}yield*this.pop();break;
|
|
1156
|
+
/* istanbul ignore next should not happen */
|
|
1157
|
+
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 n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.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 n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),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):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,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(om(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=um(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(om(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(cm(t.key)&&!om(t.sep,`newline`)){let e=um(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):om(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 n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!om(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 n&&e.items.push({start:i});this.stack.push(r);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 n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.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 n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start),n.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||om(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.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 n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);
|
|
1158
|
+
/* istanbul ignore else should not happen */
|
|
1159
|
+
n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=um(lm(t));dm(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
|
1160
|
+
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1161
|
+
`,e)+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=um(lm(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=um(lm(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(e=>e.type===`newline`||e.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 pm(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new am||null,prettyErrors:t}}function mm(e,t={}){let{lineCounter:n,prettyErrors:r}=pm(t),i=new fm(n?.addNewLine),a=new Bp(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new np(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(ip(e,n)),o.warnings.forEach(ip(e,n))),o}function hm(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=mm(e,n);if(!i)return null;if(i.warnings.forEach(e=>Fd(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function gm(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return Pu(e)&&!r?e.toString(n):new $f(e,r,n).toString(n)}function _m(e){switch(e.type){case`array`:return e.children.map(_m);case`object`:{let t=Object.create(null);for(let n=0,r=e.children;n<r.length;n++){let e=r[n],i=e.children[1];i&&(t[e.children[0].value]=_m(i))}return t}case`null`:case`string`:case`number`:return e.value;case`boolean`:return e.source;default:return}}function vm(e,t,n=!1){return t>=e.offset&&t<=e.offset+e.length||n&&t===e.offset+e.length}function ym(e,t,n){if(n===void 0&&(n=!1),vm(e,t,n)){let r=e.children;if(Array.isArray(r))for(let e=0;e<r.length&&r[e].offset<=t;e++){let i=ym(r[e],t,n);if(i)return i}return e}}var bm=class e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=Tm(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Cm(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;e<t;e++)o[e+i+1]=s[e];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));let c=n.text.length-(r-t);if(c!==0)for(let e=i+1+s.length,t=o.length;e<t;e++)o[e]=o[e]+c}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error(`Unknown change event received`);this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Cm(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}getLineRange(e){let t=this.getLineOffsets();if(e>=t.length){let e=t.length-1;return{start:{line:e,character:0},end:{line:e,character:this._content.length-t[e]}}}if(e<0)return{start:{line:0,character:0},end:{line:0,character:0}};let n=t[e],r=e+1<t.length?t[e+1]:this._content.length,i=this.ensureBeforeEOL(r,n);return{start:{line:e,character:0},end:{line:e,character:i-n}}}getEOLCharacters(e){let t=this.getLineOffsets();if(e>=t.length||e<0)return``;let n=e+1<t.length?t[e+1]:this._content.length,r=this.ensureBeforeEOL(n,t[e]);return this._content.substring(r,n)}ensureBeforeEOL(e,t){for(;e>t&&wm(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},xm;(function(e){function t(e,t,n,r){return new bm(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof bm)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}e.update=n;function r(e,t){let n=e.getText(),r=Sm(t.map(Em),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<i)throw Error(`Overlapping edit`);r>i&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}e.applyEdits=r})(xm||={});function Sm(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Sm(r,t),Sm(i,t);let a=0,o=0,s=0;for(;a<r.length&&o<i.length;)t(r[a],i[o])<=0?e[s++]=r[a++]:e[s++]=i[o++];for(;a<r.length;)e[s++]=r[a++];for(;o<i.length;)e[s++]=i[o++];return e}function Cm(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);wm(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}function wm(e){return e===13||e===10}function Tm(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Em(e){let t=Tm(e.range);return t===e.range?e:{newText:e.newText,range:t}}var Dm;(function(e){e[e.Undefined=0]=`Undefined`,e[e.EnumValueMismatch=1]=`EnumValueMismatch`,e[e.Deprecated=2]=`Deprecated`,e[e.UnexpectedEndOfComment=257]=`UnexpectedEndOfComment`,e[e.UnexpectedEndOfString=258]=`UnexpectedEndOfString`,e[e.UnexpectedEndOfNumber=259]=`UnexpectedEndOfNumber`,e[e.InvalidUnicode=260]=`InvalidUnicode`,e[e.InvalidEscapeCharacter=261]=`InvalidEscapeCharacter`,e[e.InvalidCharacter=262]=`InvalidCharacter`,e[e.PropertyExpected=513]=`PropertyExpected`,e[e.CommaExpected=514]=`CommaExpected`,e[e.ColonExpected=515]=`ColonExpected`,e[e.ValueExpected=516]=`ValueExpected`,e[e.CommaOrCloseBacketExpected=517]=`CommaOrCloseBacketExpected`,e[e.CommaOrCloseBraceExpected=518]=`CommaOrCloseBraceExpected`,e[e.TrailingComma=519]=`TrailingComma`,e[e.DuplicateKey=520]=`DuplicateKey`,e[e.CommentNotPermitted=521]=`CommentNotPermitted`,e[e.PropertyKeysMustBeDoublequoted=528]=`PropertyKeysMustBeDoublequoted`,e[e.SchemaUnsupportedFeature=769]=`SchemaUnsupportedFeature`,e[e.SchemaResolveError=65536]=`SchemaResolveError`})(Dm||={});var Om;(function(e){e[e.v3=3]=`v3`,e[e.v4=4]=`v4`,e[e.v6=6]=`v6`,e[e.v7=7]=`v7`,e[e.v2019_09=19]=`v2019_09`,e[e.v2020_12=20]=`v2020_12`})(Om||={}),Me.Markdown,Me.PlainText;function km(e){let t=e.type&&e.closestTitle;return e.title?e.title:e.$id?Am(e.$id):e.$ref||e._$ref?Am(e.$ref||e._$ref):Array.isArray(e.type)?e.type.join(` | `):t?e.type.concat(`(`,e.closestTitle,`)`):e.type||e.closestTitle}function Am(e){let t=e.match(/^(?:.*\/)?(.*?)(?:\.schema\.json)?$/),n=!!t&&t[1];return n||(n=`typeNotFound`,console.error(`$ref (${e}) not parsed properly`)),n}function jm(e,t){let n=Gr.parse(t),r=Nr.basename(n.fsPath);return Nr.extname(n.fsPath)||(r+=`.json`),Object.getOwnPropertyDescriptor(e,`name`)?Object.getOwnPropertyDescriptor(e,`name`).value+` (${r})`:e.title?e.description?e.title+` - `+e.description+` (${r})`:e.title+` (${r})`:r}function Mm(e){return e.type!==`object`&&!Nm(e)}function Nm(e){return!!(e.anyOf||e.allOf||e.oneOf)}function Pm(e){let t=/* @__PURE__ */ new Set,n=[];for(let r in e){let i=e[r],a=JSON.stringify(i);t.has(a)||(n.push(i),t.add(a))}return n}function Fm(e,t){for(let n of t.documents)if(n.internalDocument&&n.internalDocument.range[0]<=e&&n.internalDocument.range[2]>=e)return n;return t.documents.length===1?t.documents[0]:null}function Im(e,t){if(!t||!e||t.length!==e.length)return!1;for(let n=e.length-1;n>=0;n--)if(e[n]!==t[n])return!1;return!0}function Lm(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=Math.max(n,r);return parseInt(e.toFixed(i).replace(`.`,``))%parseInt(t.toFixed(i).replace(`.`,``))/10**i}Dt();const Rm=`YAML`,zm=`yaml-schema: `;var Bm;(function(e){e.missingRequiredPropWarning=`missingRequiredPropWarning`,e.typeMismatchWarning=`typeMismatchWarning`,e.constWarning=`constWarning`})(Bm||={});const Vm={[Bm.missingRequiredPropWarning]:`Missing property "{0}".`,[Bm.typeMismatchWarning]:`Incorrect type. Expected "{0}".`,[Bm.constWarning]:`Value must be {0}.`};var Hm=class e{constructor(e=-1,t=null){this.focusOffset=e,this.exclude=t,this.schemas=[]}add(e){this.schemas.push(e)}merge(e){this.schemas.push(...e.schemas)}include(e){return(this.focusOffset===-1||vm(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},Um=class{constructor(){}get schemas(){return[]}add(){}merge(){}include(){return!0}newSub(){return this}};Um.instance=new Um;const Wm={"color-hex":{errorMessage:g(`Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.`),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:g(`String is not a RFC3339 date-time.`),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:g(`String is not a RFC3339 date.`),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:g(`String is not a RFC3339 time.`),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:g(`String is not an e-mail address.`),pattern:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/},ipv4:{errorMessage:g(`String does not match IPv4 format.`),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:g(`String does not match IPv6 format.`),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}};var Gm=class{constructor(e){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null,e&&(this.enumValues=[])}getEvaluatedItems(e){this.evaluatedItemsByNode??=/* @__PURE__ */ new Map;let t=this.evaluatedItemsByNode.get(e);return t||(t=/* @__PURE__ */ new Set,this.evaluatedItemsByNode.set(e,t)),t}hasProblems(){return this.problems.length>0}merge(e){if(this.problems=this.problems.concat(e.problems),e.evaluatedProperties){this.evaluatedProperties??=/* @__PURE__ */ new Set;for(let t of e.evaluatedProperties)this.evaluatedProperties.add(t)}if(e.evaluatedItemsByNode){this.evaluatedItemsByNode??=/* @__PURE__ */ new Map;for(let[t,n]of e.evaluatedItemsByNode){let e=this.evaluatedItemsByNode.get(t);if(e)for(let t of n)e.add(t);else this.evaluatedItemsByNode.set(t,new Set(n))}}}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(let e of this.problems)e.code===Dm.EnumValueMismatch&&(e.message=g(`Value is not accepted. Valid values: {0}.`,[...new Set(this.enumValues)].map(e=>JSON.stringify(e)).join(`, `)))}}mergeWarningGeneric(e,t){if(this.problems?.length)for(let n of t){let t=this.problems.filter(e=>e.problemType===n);for(let r of t){let t=e.problems?.find(e=>e.problemType===n&&r.location.offset===e.location.offset&&(n!==Bm.missingRequiredPropWarning||Im(e.problemArgs,r.problemArgs)));t&&(t.problemArgs?.length&&(t.problemArgs.filter(e=>!r.problemArgs.includes(e)).forEach(e=>r.problemArgs.push(e)),r.problemType&&(r.message=Jm(r.problemType,r.problemArgs??[]))),this.mergeSources(t,r))}}}mergePropertyMatch(e,t=!0){t?this.merge(e):this.problems=this.problems.concat(e.problems),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&this.primaryValueMatches++}mergeSources(e,t){let n=(e.source??``).replace(zm,``);n&&t.source&&!t.source.includes(n)&&(t.source=t.source+` | `+n),t.schemaUri&&e.schemaUri&&!t.schemaUri.includes(e.schemaUri[0])&&(t.schemaUri=t.schemaUri.concat(e.schemaUri))}compareGeneric(e){let t=this.hasProblems();return t===e.hasProblems()?this.enumValueMatch===e.enumValueMatch?this.propertiesValueMatches===e.propertiesValueMatches?this.primaryValueMatches===e.primaryValueMatches?this.propertiesMatches-e.propertiesMatches:this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches-e.propertiesValueMatches:e.enumValueMatch?-1:1:t?-1:1}compareKubernetes(e){let t=this.hasProblems();return this.propertiesMatches===e.propertiesMatches?this.enumValueMatch===e.enumValueMatch?this.primaryValueMatches===e.primaryValueMatches?this.propertiesValueMatches===e.propertiesValueMatches?t===e.hasProblems()?this.propertiesMatches-e.propertiesMatches:t?-1:1:this.propertiesValueMatches-e.propertiesValueMatches:this.primaryValueMatches-e.primaryValueMatches:e.enumValueMatch?-1:1:this.propertiesMatches-e.propertiesMatches}},Km=class{collectSeenKeys(e){let t=Object.create(null),n=[...e.properties];for(;n.length>0;){let e=n.pop();if(!e)continue;let r=e.keyNode.value;if(r===`<<`&&e.valueNode){let t=e.valueNode;switch(t.type){case`object`:n.push(...t.properties);break;case`array`:t.items.forEach(e=>{e&&e.type===`object`&&Pn(e.properties)&&n.push(...e.properties)})}}else t[r]=e.valueNode}return t}validateDocument(e,t,n,r){let i=new Gm(r.isKubernetes);return this.validateNode(e,n,n,i,Um.instance,r),i.problems.map(e=>{let n=z.create(t.positionAt(e.location.offset),t.positionAt(e.location.offset+e.location.length)),r=me.create(n,e.message,e.severity,e.code?e.code:Dm.Undefined,e.source);return r.data={schemaUri:e.schemaUri,...e.data},r})}getMatchingSchemas(e,t,n,r,i){let a=new Hm(r,i);return this.validateNode(e,t,t,new Gm(n.isKubernetes),a,n),a.schemas}getNoOpCollector(){return Um.instance}getSchemaSource(e,t){let n;if(e.title)n=e.title;else if(e.closestTitle)n=e.closestTitle;else if(t.closestTitle)n=t.closestTitle;else{let r=e.url??t.url;r&&(n=Gr.parse(r).toString())}return n?`${zm}${n}`:Rm}getSchemaUri(e,t){let n=e.url??t.url;return n?[n]:[]}matchesSchemaType(e,t){let n=e.customTagReturnType??e.type;return t===`integer`?n===`integer`||n===`number`&&e.isInteger:t===`number`?n===`number`||n===`integer`:n===t}validateNode(e,t,n,r,i,a){if(e&&t&&typeof t==`object`){if(t._schemaDraft){let o=t._schemaDraft;if(o!==this.getCurrentSchemaDraft()){eh(o).validateNode(e,t,n,r,i,a);return}}switch(t.url||=n.url,t.closestTitle=t.title||n.closestTitle,e.type){case`object`:this.validateObjectNode(e,t,n,r,i,a);break;case`array`:this.validateArrayNode(e,t,n,r,i,a);break;case`string`:this.validateStringNode(e,t,n,r);break;case`number`:this.validateNumberNode(e,t,n,r);break;case`property`:this.validateNode(e.valueNode,t,t,r,i,a)}if(this.validateGenericNode(e,t,n,r,i,a),i.add({node:e,schema:t}),this.applyUnevaluatedItems(e,t,n,r,i,a),e.type===`object`){let o=this.collectSeenKeys(e);this.applyUnevaluatedProperties(e,t,n,r,i,a,o)}}}validateGenericNode(e,t,n,r,i,a){let{isKubernetes:o,callFromAutoComplete:s}=a,c=t=>this.matchesSchemaType(e,t),l=(e,t)=>{if(t.evaluatedProperties){e.evaluatedProperties??=/* @__PURE__ */ new Set;for(let n of t.evaluatedProperties)e.evaluatedProperties.add(n)}if(t.evaluatedItemsByNode){e.evaluatedItemsByNode??=/* @__PURE__ */ new Map;for(let[n,r]of t.evaluatedItemsByNode){let t=e.evaluatedItemsByNode.get(n);if(t)for(let e of r)t.add(e);else e.evaluatedItemsByNode.set(n,new Set(r))}}};if(Array.isArray(t.type))t.type.some(c)||r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.errorMessage||g(`Incorrect type. Expected one of {0}.`,t.type.join(`, `)),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});else if(t.type&&!c(t.type)){let i=t.type===`object`?km(t):t.type;r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.errorMessage||Jm(Bm.typeMismatchWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemType:Bm.typeMismatchWarning,problemArgs:[i]})}if(Array.isArray(t.allOf))for(let n of t.allOf){let s=qm(n),c=new Gm(o),l=i.newSub();this.validateNode(e,s,t,c,l,a),r.merge(c),r.propertiesMatches+=c.propertiesMatches,r.propertiesValueMatches+=c.propertiesValueMatches,i.merge(l)}let u=qm(t.not);if(u){let s=new Gm(o),c=i.newSub();this.validateNode(e,u,t,s,c,a),s.hasProblems()||r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Matches a schema that is not allowed.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});for(let e of c.schemas)e.inverted=!e.inverted,i.add(e)}let d=(c,u)=>{let d=[],f=[],p=[],m=null;for(let n of c){let r={...qm(n)},c=new Gm(o),l=i.newSub();this.validateNode(e,r,t,c,l,a),(!c.hasProblems()||s)&&(d.push(r),c.propertiesMatches===0&&f.push(r),r.format&&d.pop()),c.hasProblems()||p.push(c),m=m?o?this.alternativeComparison(c,m,r,l):this.genericComparison(e,u,c,m,r,l):{schema:r,validationResult:c,matchingSchemas:l}}if(d.length>1&&(d.length>1||f.length===0)&&u&&r.problems.push({location:{offset:e.offset,length:1},severity:B.Warning,message:g(`Matches multiple schemas when only one must validate.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),m&&(r.merge(m.validationResult),r.propertiesMatches+=m.validationResult.propertiesMatches,r.propertiesValueMatches+=m.validationResult.propertiesValueMatches,r.enumValueMatch=r.enumValueMatch||m.validationResult.enumValueMatch,m.validationResult.enumValues?.length&&(r.enumValues=(r.enumValues||[]).concat(m.validationResult.enumValues)),i.merge(m.matchingSchemas)),p.length>0)for(let e of p)l(r,e)};Array.isArray(t.anyOf)&&d(t.anyOf,!1),Array.isArray(t.oneOf)&&d(t.oneOf,!0);let f=(t,n)=>{let s=new Gm(o),c=i.newSub();this.validateNode(e,qm(t),n,s,c,a),r.merge(s),r.propertiesMatches+=s.propertiesMatches,r.propertiesValueMatches+=s.propertiesValueMatches,i.merge(c)},p=(c,u,d,p)=>{let m=qm(c),h=new Gm(o),_=i.newSub();this.validateNode(e,m,u,h,_,a),s||i.merge(_);let v=m?.filePatternAssociation;v&&(new ki(v).matchesPattern(a.uri)||h.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`filePatternAssociation '{0}' does not match with doc uri '{1}'`,v,a.uri),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})),h.hasProblems()?p&&f(p,u):(l(r,h),d&&f(d,u))},m=qm(t.if);if(m&&p(m,t,qm(t.then),qm(t.else)),Array.isArray(t.enum)){let i=_m(e),a=!1;for(let n of t.enum)if(kn(i,n,e.type)||Ym(s,e,i,n)){a=!0;break}r.enumValues=t.enum,r.enumValueMatch=a,a||r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,code:Dm.EnumValueMismatch,message:t.errorMessage||g(`Value is not accepted. Valid values: {0}.`,(t.enum??[]).map(e=>JSON.stringify(e)).join(`, `)),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),data:{values:t.enum}})}if(jn(t.const)){let i=_m(e),a=t.const;!kn(i,a,e.type)&&!Ym(s,e,i,a)?(r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,code:Dm.EnumValueMismatch,problemType:Bm.constWarning,message:t.errorMessage||Jm(Bm.constWarning,[JSON.stringify(a)]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemArgs:[JSON.stringify(a)],data:{values:[a]}}),r.enumValueMatch=!1):r.enumValueMatch=!0,r.enumValues=[a]}t.deprecationMessage&&e.parent&&r.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:B.Warning,message:t.deprecationMessage,source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}validateStringNode(e,t,n,r){let i=e.value;if(An(t.minLength)&&i.length<(t.minLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`String is shorter than the minimum length of {0}.`,t.minLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),An(t.maxLength)&&i.length>(t.maxLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`String is longer than the maximum length of {0}.`,t.maxLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),Nn(t.pattern)){let a=Ei(t.pattern);a?a.test(i)||r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.patternErrorMessage||t.errorMessage||g(`String does not match the pattern of "{0}".`,t.pattern),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}):r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Invalid pattern: "{0}"`,t.pattern),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}if(t.format)switch(t.format){case`uri`:case`uri-reference`:{let a;if(!i)a=g(`URI expected.`);else try{!Gr.parse(i).scheme&&t.format===`uri`&&(a=g(`URI with a scheme is expected.`))}catch(e){a=e instanceof Error?e.message:String(e)}a&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.patternErrorMessage||t.errorMessage||g(`String is not a URI: {0}`,a),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});break}case`color-hex`:case`date-time`:case`date`:case`time`:case`email`:case`ipv4`:case`ipv6`:{let a=Wm[t.format];(!i||!a.pattern.test(i))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.patternErrorMessage||t.errorMessage||g(a.errorMessage),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});break}}}validateNumberNode(e,t,n,r){let i=e.value;An(t.multipleOf)&&Lm(i,t.multipleOf??0)!==0&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Value is not divisible by {0}.`,t.multipleOf),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});let a=this.getNumberLimits(t);An(a.exclusiveMinimum)&&i<=a.exclusiveMinimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Value is below the exclusive minimum of {0}.`,a.exclusiveMinimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),An(a.exclusiveMaximum)&&i>=a.exclusiveMaximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Value is above the exclusive maximum of {0}.`,a.exclusiveMaximum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),An(a.minimum)&&i<a.minimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Value is below the minimum of {0}.`,a.minimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),An(a.maximum)&&i>a.maximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Value is above the maximum of {0}.`,a.maximum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}validateArrayNode(e,t,n,r,i,a){let{isKubernetes:o}=a,s=e.items??[],c=t.items?r.getEvaluatedItems(e):void 0;if(Array.isArray(t.items)){let l=t.items;for(let e=0;e<l.length;e++){let n=qm(l[e]),u=new Gm(o),d=s[e];d?(this.validateNode(d,n,t,u,i,a),r.mergePropertyMatch(u,!1),r.mergeEnumValues(u),c?.add(e)):s.length>=l.length&&r.propertiesValueMatches++}if(s.length>l.length){let u=t.additionalItems;if(u===!1){r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Array has too many items according to schema. Expected {0} or fewer.`,l.length),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});for(let e=l.length;e<s.length;e++)c?.add(e)}else if(typeof u==`object`)for(let e=l.length;e<s.length;e++){let n=new Gm(o);this.validateNode(s[e],u,t,n,i,a),r.mergePropertyMatch(n,!1),r.mergeEnumValues(n),c?.add(e)}else if(u===!0)for(let e=l.length;e<s.length;e++)c?.add(e)}}else{let n=qm(t.items);if(n){let c=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let l=s[e],u=new Gm(o);this.validateNode(l,n,t,u,i,a),r.mergePropertyMatch(u,!1),r.mergeEnumValues(u),c.add(e)}}}this.applyContains(e,t,n,r,i,a),this.applyArrayLength(e,t,n,r,a),this.applyUniqueItems(e,t,n,r)}applyContains(e,t,n,r,i,a){let{isKubernetes:o}=a,s=qm(t.contains);s&&((e.items??[]).some(e=>{let n=new Gm(o);return this.validateNode(e,s,t,n,Um.instance,a),!n.hasProblems()})||r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.errorMessage||g(`Array does not contain required item.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}))}applyArrayLength(e,t,n,r,i){An(t.minItems)&&e.items.length<(t.minItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Array has too few items. Expected {0} or more.`,t.minItems),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),An(t.maxItems)&&e.items.length>(t.maxItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Array has too many items. Expected {0} or fewer.`,t.maxItems),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}applyUniqueItems(e,t,n,r){if(t.uniqueItems===!0){let i=_m(e);Array.isArray(i)&&i.some((e,t)=>t!==i.lastIndexOf(e))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Array has duplicate items.`),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}}validateObjectNode(e,t,n,r,i,a){let o=Object.create(null),s=[],c=[...e.properties];for(;c.length>0;){let e=c.pop();if(!e)continue;let t=e.keyNode.value;if(t===`<<`&&e.valueNode)switch(e.valueNode.type){case`object`:c.push(...e.valueNode.properties);break;case`array`:e.valueNode.items.forEach(e=>{e&&e.type===`object`&&Pn(e.properties)&&c.push(...e.properties)})}else o[t]=e.valueNode,s.push(t)}let l=e=>{let t=s.indexOf(e);for(;t>=0;)s.splice(t,1),t=s.indexOf(e)};this.applyRequired(e,t,n,r,a,o),this.applyProperties(e,t,n,r,i,a,o,s,l),this.applyPatternProperties(e,t,n,r,i,a,o,s,l),this.applyAdditionalProperties(e,t,n,r,i,a,o,s),this.applyPropertyCount(e,t,n,r),this.applyDependencies(e,t,n,r,i,a,o),this.applyPropertyNames(e,t,r,a)}applyRequired(e,t,n,r,i,a){if(Array.isArray(t.required)){for(let i of t.required)if(a[i]===void 0){let a=e.parent&&e.parent.type===`property`&&e.parent.keyNode,o=a?{offset:a.offset,length:a.length}:{offset:e.offset,length:1};r.problems.push({location:o,severity:B.Warning,message:t.errorMessage||Jm(Bm.missingRequiredPropWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemArgs:[i],problemType:Bm.missingRequiredPropWarning})}}}applyProperties(e,t,n,r,i,a,o,s,c){let{isKubernetes:l}=a,u=t.properties;if(u)for(let e of Object.keys(u)){c(e);let s=u[e],d=o[e];if(d){if(r.evaluatedProperties??=/* @__PURE__ */ new Set,r.evaluatedProperties.add(e),Mn(s)){if(s)r.propertiesMatches++,r.propertiesValueMatches++;else{let i=d.parent;r.problems.push({location:{offset:i.keyNode.offset,length:i.keyNode.length},severity:B.Warning,message:t.errorMessage||g(`Property {0} is not allowed.`,e),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}}else{s.url=t.url??n.url;let e=new Gm(l);this.validateNode(d,s,t,e,i,a),r.mergePropertyMatch(e,!1),r.mergeEnumValues(e)}}}}applyPatternProperties(e,t,n,r,i,a,o,s,c){let{isKubernetes:l}=a,u=t.patternProperties;if(u)for(let e of Object.keys(u)){let d=Ei(e);if(d)for(let f of s.slice(0)){if(!d.test(f))continue;c(f);let s=o[f];if(!s)continue;r.evaluatedProperties??=/* @__PURE__ */ new Set,r.evaluatedProperties.add(f);let p=u[e];if(Mn(p)){if(p)r.propertiesMatches++,r.propertiesValueMatches++;else{let e=s.parent;r.problems.push({location:{offset:e.keyNode.offset,length:e.keyNode.length},severity:B.Warning,message:t.errorMessage||g(`Property {0} is not allowed.`,f),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}}else{let e=new Gm(l);this.validateNode(s,p,t,e,i,a),r.mergePropertyMatch(e,!1),r.mergeEnumValues(e)}}}}applyAdditionalProperties(e,t,n,r,i,a,o,s){let{isKubernetes:c}=a,l=t.additionalProperties;if(typeof l==`object`){for(let e of s){let n=o[e];if(!n)continue;r.evaluatedProperties??=/* @__PURE__ */ new Set,r.evaluatedProperties.add(e);let s=new Gm(c);this.validateNode(n,l,t,s,i,a),r.mergePropertyMatch(s,!1),r.mergeEnumValues(s)}return}if(l===!0){if(s.length>0){r.evaluatedProperties??=/* @__PURE__ */ new Set;for(let e of s)o[e]&&r.evaluatedProperties.add(e)}return}if(!(l===!1||t.type===`object`&&l===void 0&&a.disableAdditionalProperties===!0)||s.length===0)return;let u=t.properties&&Object.entries(t.properties).filter(([e,t])=>!(o[e]||t&&typeof t==`object`&&(t.doNotSuggest||t.deprecationMessage))).map(([e])=>e);for(let e of s){let i=o[e];if(!i)continue;let a=i.type===`property`?i:i.parent??i;a.type===`object`&&(a=a.properties[0]??a);let s=a.type===`property`?a.keyNode:a,c={location:{offset:s.offset,length:s.length},severity:B.Warning,code:Dm.PropertyExpected,message:t.errorMessage||g(`Property {0} is not allowed.`,e),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)};u?.length&&(c.data={properties:u}),r.problems.push(c)}}applyPropertyCount(e,t,n,r){An(t.maxProperties)&&e.properties.length>(t.maxProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Object has more properties than limit of {0}.`,t.maxProperties),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),An(t.minProperties)&&e.properties.length<(t.minProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Object has fewer properties than the required number of {0}`,t.minProperties),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}applyDependencies(e,t,n,r,i,a,o){let{isKubernetes:s}=a,c=t.dependencies;if(c)for(let l of Object.keys(c)){if(!o[l])continue;let u=c[l];if(Array.isArray(u))for(let i of u)o[i]?r.propertiesValueMatches++:r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Object is missing property {0} required by property {1}.`,i,l),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});else{let n=qm(u);if(n){let o=new Gm(s);this.validateNode(e,n,t,o,i,a),r.mergePropertyMatch(o),r.mergeEnumValues(o)}}}}applyPropertyNames(e,t,n,r){let i=qm(t.propertyNames);if(i)for(let a of e.properties){let e=a.keyNode;e&&this.validateNode(e,i,t,n,Um.instance,r)}}applyUnevaluatedProperties(e,t,n,r,i,a,o,s){}applyUnevaluatedItems(e,t,n,r,i,a){}alternativeComparison(e,t,n,r){let i=e.compareKubernetes(t.validationResult);return i>0?{schema:n,validationResult:e,matchingSchemas:r}:(i===0&&(t.matchingSchemas.merge(r),t.validationResult.mergeEnumValues(e)),t)}genericComparison(e,t,n,r,i,a){if(!t&&!n.hasProblems()&&!r.validationResult.hasProblems())r.matchingSchemas.merge(a),r.validationResult.propertiesMatches+=n.propertiesMatches,r.validationResult.propertiesValueMatches+=n.propertiesValueMatches;else{let o=n.compareGeneric(r.validationResult);o>0||o===0&&t&&r.schema.type===`object`&&e.type!==`null`&&(e.customTagReturnType??e.type)!==r.schema.type?r={schema:i,validationResult:n,matchingSchemas:a}:(o===0||(e.value===null||e.type===`null`)&&e.length===0)&&this.mergeValidationMatches(r,a,n)}return r}mergeValidationMatches(e,t,n){e.matchingSchemas.merge(t),e.validationResult.mergeEnumValues(n),e.validationResult.mergeWarningGeneric(n,[Bm.missingRequiredPropWarning,Bm.typeMismatchWarning,Bm.constWarning])}};function qm(e){if(e!==void 0)return Mn(e)?e?{}:{not:{}}:typeof e==`object`?e:(console.warn(`Wrong schema: ${JSON.stringify(e)}, it MUST be an Object or Boolean`),{type:e})}function Jm(e,t){return g(Vm[e],t.join(` | `))}function Ym(e,t,n,r){return e?n===null&&t.length===0||Nn(n)&&Nn(r)&&r.startsWith(n):!1}var Xm=class extends Km{getCurrentSchemaDraft(){return Om.v4}getNumberLimits(e){let t=An(e.minimum)?e.minimum:void 0,n=An(e.maximum)?e.maximum:void 0,r=Mn(e.exclusiveMinimum)&&e.exclusiveMinimum?t:void 0,i=Mn(e.exclusiveMaximum)&&e.exclusiveMaximum?n:void 0;return{minimum:r===void 0?t:void 0,maximum:i===void 0?n:void 0,exclusiveMinimum:r,exclusiveMaximum:i}}},Zm=class extends Km{getCurrentSchemaDraft(){return Om.v7}getNumberLimits(e){let t=An(e.minimum)?e.minimum:void 0,n=An(e.maximum)?e.maximum:void 0,r=An(e.exclusiveMinimum)?e.exclusiveMinimum:void 0,i=An(e.exclusiveMaximum)?e.exclusiveMaximum:void 0;return{minimum:r===void 0?t:void 0,maximum:i===void 0?n:void 0,exclusiveMinimum:r,exclusiveMaximum:i}}};Dt();var Qm=class extends Zm{getCurrentSchemaDraft(){return Om.v2019_09}applyContains(e,t,n,r,i,a){let o=qm(t.contains);if(!o)return;let s=t.minContains,c=t.maxContains,l=An(s)?s:1,u=An(c)?c:void 0,d=0,f=e.items??[];for(let e of f){let n=new Gm(a.isKubernetes);if(this.validateNode(e,o,t,n,this.getNoOpCollector(),a),!n.hasProblems()&&(d++,u!==void 0&&d>u))break}d<l&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.errorMessage||g(`Array has too few items matching "contains". Expected {0} or more.`,l),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),u!==void 0&&d>u&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.errorMessage||g(`Array has too many items matching "contains". Expected {0} or fewer.`,u),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}applyDependencies(e,t,n,r,i,a,o){super.applyDependencies(e,t,n,r,i,a,o);let s=t.dependentRequired;if(s&&typeof s==`object`)for(let i of Object.keys(s)){if(!o[i])continue;let a=s[i];if(Array.isArray(a))for(let s of a)o[s]?r.propertiesValueMatches++:r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Object is missing property {0} required by property {1}.`,s,i),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}let c=t.dependentSchemas;if(c&&typeof c==`object`)for(let n of Object.keys(c)){if(!o[n])continue;let s=qm(c[n]);if(!s)continue;let l=new Gm(a.isKubernetes);this.validateNode(e,s,t,l,i,a),r.mergePropertyMatch(l),r.mergeEnumValues(l)}}applyUnevaluatedProperties(e,t,n,r,i,a,o){let s=t.unevaluatedProperties;if(s===void 0||!o)return;r.evaluatedProperties??=/* @__PURE__ */ new Set;let c=Object.keys(o).filter(e=>!r.evaluatedProperties?.has(e));if(c.length===0)return;if(s===!1){for(let e of c){let i=o[e];if(!i)continue;let a=(i.type===`property`?i:i.parent).keyNode;a&&(r.problems.push({location:{offset:a.offset,length:a.length},severity:B.Warning,code:Dm.PropertyExpected,message:t.errorMessage||g(`Property {0} is not allowed.`,e),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),r.evaluatedProperties?.add(e))}return}if(s===!0){for(let e of c)r.evaluatedProperties?.add(e);return}let l=qm(s);if(l)for(let e of c){let n=o[e];if(!n)continue;let s=n.type===`property`?n.valueNode:n;if(!s)continue;let c=new Gm(a.isKubernetes);this.validateNode(s,l,t,c,i,a),r.mergePropertyMatch(c),r.mergeEnumValues(c),r.evaluatedProperties?.add(e)}}applyUnevaluatedItems(e,t,n,r,i,a){let o=t.unevaluatedItems;if(o===void 0)return;let s=e.items??[];if(s.length===0)return;let c=r.getEvaluatedItems(e),l=[];for(let e=0;e<s.length;e++)c.has(e)||l.push(e);if(l.length===0)return;if(o===!1){for(let e of l){let i=s[e];r.problems.push({location:{offset:i.offset,length:i.length||1},severity:B.Warning,code:Dm.PropertyExpected,message:t.errorMessage||g(`Array has too many items according to schema. Expected {0} or fewer.`,e),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),c.add(e)}return}if(o===!0){for(let e of l)c.add(e);return}let u=qm(o);if(u)for(let e of l){let n=s[e],o=new Gm(a.isKubernetes);this.validateNode(n,u,t,o,i,a),r.merge(o),r.mergeEnumValues(o),c.add(e)}}};Dt();var $m=class extends Qm{getCurrentSchemaDraft(){return Om.v2020_12}validateArrayNode(e,t,n,r,i,a){let o=e.items??[],s=r.getEvaluatedItems(e),c=t.prefixItems;if(Array.isArray(c)){let e=Math.min(c.length,o.length);for(let n=0;n<e;n++){let e=qm(c[n]);if(!e){s.add(n);continue}let l=new Gm(a.isKubernetes);this.validateNode(o[n],e,t,l,i,a),r.mergePropertyMatch(l,!1),r.mergeEnumValues(l),s.add(n)}}let l=t.items,u=Array.isArray(c)?c.length:0;if(o.length>u){if(l===!1){r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:g(`Array has too many items according to schema. Expected {0} or fewer.`,u),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)});for(let e=u;e<o.length;e++)s.add(e)}else{let e=qm(l);if(e)for(let n=u;n<o.length;n++){let c=new Gm(a.isKubernetes);this.validateNode(o[n],e,t,c,i,a),r.mergePropertyMatch(c,!1),r.mergeEnumValues(c),s.add(n)}}}this.applyContains(e,t,n,r,i,a),this.applyArrayLength(e,t,n,r,a),this.applyUniqueItems(e,t,n,r)}applyContains(e,t,n,r,i,a){let o=qm(t.contains);if(!o)return;let s=e.items??[],c=t.minContains,l=t.maxContains,u=An(c)?c:1,d=An(l)?l:void 0,f=0,p=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let n=new Gm(a.isKubernetes);if(this.validateNode(s[e],o,t,n,this.getNoOpCollector(),a),!n.hasProblems()&&(p.add(e),f++,d!==void 0&&f>d))break}f<u&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.errorMessage||g(`Array has too few items matching "contains". Expected {0} or more.`,u),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),d!==void 0&&f>d&&r.problems.push({location:{offset:e.offset,length:e.length},severity:B.Warning,message:t.errorMessage||g(`Array has too many items matching "contains". Expected {0} or fewer.`,d),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}};function eh(e){switch(e){case Om.v4:return new Xm;case Om.v7:return new Zm;case Om.v2019_09:return new Qm;case Om.v2020_12:return new $m;default:return new Zm}}var th=class{constructor(e,t,n,r){this.offset=n,this.length=r,this.parent=e,this.internalNode=t}getNodeFromOffsetEndInclusive(e){let t=[],n=r=>{if(e>=r.offset&&e<=r.offset+r.length){let i=r.children;for(let r=0;r<i.length&&i[r].offset<=e;r++){let e=n(i[r]);e&&t.push(e)}return r}return null},r=n(this),i=Number.MAX_VALUE,a=null;for(let n of t){let t=n.length+n.offset-e+(e-n.offset);t<i&&(a=n,i=t)}return a||r}get children(){return[]}toString(){return`type: `+this.type+` (`+this.offset+`/`+this.length+`)`+(this.parent?` parent: {`+this.parent.toString()+`}`:``)}},nh=class extends th{constructor(e,t,n,r){super(e,t,n,r),this.type=`null`,this.value=null}},rh=class extends th{constructor(e,t,n,r,i,a){super(e,t,i,a),this.type=`boolean`,this.value=n,this.source=r}},ih=class extends th{constructor(e,t,n,r){super(e,t,n,r),this.type=`array`,this.items=[]}get children(){return this.items}},ah=class extends th{constructor(e,t,n,r){super(e,t,n,r),this.type=`number`,this.isInteger=!0,this.value=NaN}},oh=class extends th{constructor(e,t,n,r){super(e,t,n,r),this.type=`string`,this.value=``}},sh=class extends th{constructor(e,t,n,r){super(e,t,n,r),this.type=`property`,this.colonOffset=-1}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},ch=class extends th{constructor(e,t,n,r){super(e,t,n,r),this.type=`object`,this.properties=[]}get children(){return this.properties}},lh;(function(e){e[e.Key=0]=`Key`,e[e.Enum=1]=`Enum`})(lh||={});var uh=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return ym(this.root,e,t)}getNodeFromOffsetEndInclusive(e){return this.root&&this.root.getNodeFromOffsetEndInclusive(e)}visit(e){if(this.root){let t=n=>{let r=e(n),i=n.children;if(Array.isArray(i))for(let e=0;e<i.length&&r;e++)r=t(i[e]);return r};t(this.root)}}validate(e,t){return!this.root||!t?null:eh(t._schemaDraft).validateDocument(this.root,e,t,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri})}getMatchingSchemas(e,t=-1,n=null,r){return!this.root||!e?[]:eh(e._schemaDraft).getMatchingSchemas(this.root,e,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:r},t,n)}};const dh=[`mapping`,`scalar`,`sequence`],fh={mapping:`object`,object:`object`,sequence:`array`,array:`array`,scalar:`string`,string:`string`,number:`number`,integer:`integer`,boolean:`boolean`,null:`null`};function ph(e){if(typeof e!=`string`)return;let t=e.trim().split(/\s+/),n=t[0];if(!n)return;let r=t[1]&&t[1].toLowerCase()||`scalar`,[i,a,o]=r.split(`:`),s=dh.find(e=>e===i);if(o||!s)return;if(!r.includes(`:`))return{tag:n,inputType:s};let c=fh[a];if(c)return{tag:n,inputType:s,returnType:c}}function mh(e){if(!e||typeof e!=`object`)return;let t=e.customTagReturnType;if(typeof t==`string`)return Object.values(fh).includes(t)?t:void 0}function hh(e,t){t&&e&&typeof e==`object`&&(e.customTagReturnType=t)}const gh={maxRefCount:1e3,currentRefDepth:0,aliasResolutionCache:/* @__PURE__ */ new Map};function _h(e,t,n,r){if(e||(gh.currentRefDepth=0,gh.aliasResolutionCache=/* @__PURE__ */ new Map),!t)return null;let i;return Fu(t)?i=vh(t,e,n,r):Iu(t)?i=yh(t,e,n,r):Lu(t)?i=bh(t,e,n,r):H(t)?i=xh(t,e):Nu(t)&&gh.currentRefDepth<gh.maxRefCount&&(i=Sh(t,e,n,r)),i&&zu(t)&&(i.customTagReturnType=mh(t)),i}function vh(e,t,n,r){let i;i=e.flow&&!e.range?Th(e):e.range;let a=new ch(t,e,...wh(i,r));for(let t of e.items)Iu(t)&&a.properties.push(_h(a,t,n,r));return a}function yh(e,t,n,r){let i=e.key,a=e.value,o=i.range[0],s=i.range[1],c=i.range[2];a&&(s=a.range[1],c=a.range[2]);let l=new sh(t,e,...wh([o,s,c],r));if(Nu(i)){let e=new oh(t,i,...Ch(i.range));e.value=i.source,l.keyNode=e}else l.keyNode=_h(l,i,n,r);return l.valueNode=_h(l,a,n,r),l}function bh(e,t,n,r){let i=new ih(t,e,...Ch(e.range));for(let t of e.items)if(zu(t)){let e=_h(i,t,n,r);e&&i.children.push(e)}return i}function xh(e,t){if(e.value===null)return new nh(t,e,...Ch(e.range));switch(typeof e.value){case`string`:{let n=new oh(t,e,...Ch(e.range));return n.value=e.value,n}case`boolean`:return new rh(t,e,e.value,e.source,...Ch(e.range));case`number`:{let n=new ah(t,e,...Ch(e.range));return n.value=e.value,n.isInteger=Number.isInteger(n.value),n}default:{let n=new oh(t,e,...Ch(e.range));return n.value=e.source,n}}}function Sh(e,t,n,r){if(gh.aliasResolutionCache.has(e))return gh.aliasResolutionCache.get(e);gh.currentRefDepth++;let i=e.resolve(n),a;if(i)a=_h(t,i,n,r);else{let n=new oh(t,e,...Ch(e.range));n.value=e.source,a=n}return gh.currentRefDepth--,gh.aliasResolutionCache.set(e,a),a}function Ch(e){return[e[0],e[1]-e[0]]}function wh(e,t){let n=t.linePos(e[0]),r=t.linePos(e[1]),i=[e[0],e[1]-e[0]];return n.line!==r.line&&(t.lineStarts.length!==r.line||r.col===1)&&i[1]--,i}function Th(e){let t=2**53-1,n=0;for(let r of e.items)Iu(r)&&(zu(r.key)&&r.key.range&&r.key.range[0]<=t&&(t=r.key.range[0]),zu(r.value)&&r.value.range&&r.value.range[2]>=n&&(n=r.value.range[2]));return[t,n,n]}function Eh(e,t){let n;if(Wu(e,(e,r,i)=>{if(r===t)return n=i[i.length-1],Wu.BREAK}),!Pu(n))return n}function Dh(e){if(e.items.length>1)return!1;let t=e.items[0];return H(t.key)&&H(t.value)&&t.key.value===``&&!t.value.value}function Oh(e,t){for(let[n,r]of e.items.entries())if(t===r)return n}function kh(e,t){let n=!1;for(let r of e){if(r.type===`document`)jh([],r,e=>{if(Ah(e)&&e.value?.type===`comment`){if(r.offset<=t&&e.value.source.length+e.value.offset>=t)return n=!0,Wu.BREAK}else if(e.type===`comment`&&e.offset<=t&&e.offset+e.source.length>=t)return n=!0,Wu.BREAK});else if(r.type===`comment`&&r.offset<=t&&r.source.length+r.offset>=t)return!0;if(n)break}return n}function Ah(e){return e.start!==void 0}function jh(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=jh(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===Wu.BREAK)return Wu.BREAK;else r===Wu.REMOVE&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}let i=t.sep;if(i)for(let t=0;t<i.length;++t){let r=jh(Object.freeze(e),i[t],n);if(typeof r==`number`)t=r-1;else if(r===Wu.BREAK)return Wu.BREAK;else r===Wu.REMOVE&&(i.items.splice(t,1),--t)}return typeof r==`function`?r(t,e):r}var Mh=class e extends uh{constructor(e){super(null,[]),this._documentHeaderComments=[],this.lineCounter=e}clone(){let t=new e(this.lineCounter);return t.isKubernetes=this.isKubernetes,t.disableAdditionalProperties=this.disableAdditionalProperties,t.uri=this.uri,t.currentDocIndex=this.currentDocIndex,t._lineComments=this.lineComments.slice(),t._documentHeaderComments=this.documentHeaderComments.slice(),t.internalDocument=this._internalDocument.clone(),t}collectLineComments(){this._lineComments=[],this._internalDocument.commentBefore&&this._internalDocument.commentBefore.split(`
|
|
1162
|
+
`).forEach(e=>this._lineComments.push(`#${e}`)),Wu(this.internalDocument,(e,t)=>{t?.commentBefore&&(t?.commentBefore.split(`
|
|
1163
|
+
`)).forEach(e=>this._lineComments.push(`#${e}`)),t?.comment&&this._lineComments.push(`#${t.comment}`)}),this._internalDocument.comment&&this._lineComments.push(`#${this._internalDocument.comment}`)}updateFromInternalDocument(){this.root=_h(null,this._internalDocument.contents,this._internalDocument,this.lineCounter)}set internalDocument(e){this._internalDocument=e,this.updateFromInternalDocument()}get internalDocument(){return this._internalDocument}get lineComments(){return this._lineComments||this.collectLineComments(),this._lineComments}set lineComments(e){this._lineComments=e}get documentHeaderComments(){return this._documentHeaderComments}set documentHeaderComments(e){this._documentHeaderComments=e}get errors(){return this.internalDocument.errors.map(Fh)}get warnings(){return this.internalDocument.warnings.map(Fh)}getNodeFromPosition(e,t,n){let r=t.getPosition(e),i=t.getLineContent(r.line);if(i.trim().length===0)return[this.findClosestNode(e,t,n),!0];let a=i.substring(r.character).match(/^([ ]+)\n?$/),o=!!a,s=a?.[1].length,c;return Wu(this.internalDocument,(t,n)=>{if(!n)return;let r=n.range;if(r){if(r[0]<=e&&r[1]>=e||o&&e+s===r[2]&&H(n)&&n.value===null)c=n;else return Wu.SKIP}}),[c,!1]}findClosestNode(e,t,n){let r=this.internalDocument.range[2],i=this.internalDocument.range[0],a;Wu(this.internalDocument,(t,n)=>{if(!n)return;let o=n.range;if(!o)return;let s=o[1]-e;i<=o[0]&&s<=0&&Math.abs(s)<=r&&(r=Math.abs(s),i=o[0],a=n)});let o=t.getPosition(e),s=Ti(t.getLineContent(o.line),o.character);return H(a)&&a.value===null||s===o.character&&(a=this.getProperParentByIndentation(s,a,t,``,n)),a}getProperParentByIndentation(e,t,n,r,i,a){if(!t)return this.internalDocument.contents;if(i||=2,zu(t)&&t.range){let o=n.getPosition(t.range[0]),s=n.getLineContent(o.line);if(r=r===``?s.trim():r,r.startsWith(`-`)&&e===i&&r===s.trim()&&(o.character+=e),o.character>e&&o.character>0){let o=this.getParent(t);if(o)return this.getProperParentByIndentation(e,o,n,r,i,a)}else if(o.character<e){let e=this.getParent(t);if(Iu(e)&&zu(e.value))return e.value;if(Iu(a)&&zu(a.value))return a.value}else return t}else if(Iu(t)){a=t;let o=this.getParent(t);return this.getProperParentByIndentation(e,o,n,r,i,a)}return t}getParent(e){return Eh(this.internalDocument,e)}},Nh=class{constructor(e,t){this.documents=e,this.tokens=t,this.errors=[],this.warnings=[]}};const Ph=new class{constructor(){this.cache=/* @__PURE__ */ new Map}getYamlDocument(e,t,n=!1){return this.ensureCache(e,t??Bh,n),this.cache.get(e.uri).document}clear(){this.cache.clear()}ensureCache(e,t,n){let r=e.uri;this.cache.has(r)||this.cache.set(r,{version:-1,document:new Nh([],[]),parserOptions:Bh});let i=this.cache.get(r);if(i.version!==e.version||t.customTags&&!Im(i.parserOptions.customTags,t.customTags)){let r=e.getText();n&&!/\S/.test(r)&&(r=`{${r}}`),i.document=Vh(r,t,e),i.version=e.version,i.parserOptions=t}}};function Fh(e){return{message:e.message,location:{start:e.pos[0],end:e.pos[1],toLineEnd:!0},severity:1,code:Dm.Undefined}}var Ih=class{constructor(e,t,n){this.tag=e,this.type=t,this.returnType=n}get collection(){if(this.type===`mapping`)return`map`;if(this.type===`sequence`)return`seq`}resolve(e){if(Fu(e)&&this.type===`mapping`||Lu(e)&&this.type===`sequence`||typeof e==`string`&&this.type===`scalar`)return this.addReturnTypeMetadata(e)}addReturnTypeMetadata(e){if(!this.returnType)return e;if(typeof e==`string`){let t=new cd(e);return hh(t,this.returnType),t}return hh(e,this.returnType),e}},Lh=class{constructor(){this.tag=`!include`,this.type=`scalar`}resolve(e,t){if(e&&e.length>0&&e.trim())return e;t(`!include without value`)}};function Rh(e){let t=[];for(let n of e??[]){let e=ph(n);e&&t.push(new Ih(e.tag,e.inputType,e.returnType))}return t.push(new Lh),t}Dt();var zh=class{constructor(e){this.doc=e}getLineCount(){return this.doc.lineCount}getLineLength(e){let t=this.doc.getLineOffsets();return e>=t.length?this.doc.getText().length:e<0?0:(e+1<t.length?t[e+1]:this.doc.getText().length)-t[e]}getLineContent(e){let t=this.doc.getLineOffsets();if(e>=t.length)return this.doc.getText();if(e<0)return``;let n=e+1<t.length?t[e+1]:this.doc.getText().length;return this.doc.getText().substring(t[e],n)}getLineCharCode(e,t){return this.doc.getText(z.create(e-1,t,e-1,t+1)).charCodeAt(0)}getText(e){return this.doc.getText(e)}getPosition(e){return this.doc.positionAt(e)}};const Bh={customTags:[],yamlVersion:`1.2`};function Vh(e,t=Bh,n){let r=new Bp({strict:!1,customTags:Rh(t.customTags),version:t.yamlVersion??Bh.yamlVersion,keepSourceTokens:!0}),i=new am,a=!1;if(n){let t=new zh(n),r=t.getPosition(e.length);a=t.getLineContent(r.line).trim().length===0}let o=(a?new fm:new fm(i.addNewLine)).parse(e),s=Array.from(o),c=r.compose(s,!0,e.length),l=Uh(s);return new Nh(Array.from(c,(e,t)=>Hh(e,i,l[t]??[])),s)}function Hh(e,t,n){let r=new Mh(t);return r.documentHeaderComments=n,r.internalDocument=e,r}function Uh(e){let t=[],n=[];for(let r of e){if(r.type===`comment`){n.push(r.source);continue}if(r.type!==`newline`&&r.type!==`space`&&r.type!==`byte-order-mark`&&r.type!==`directive`){if(r.type===`doc-end`){n=[];continue}if(r.type===`document`){let e=r.start.filter(e=>e.type===`comment`).map(e=>e.source);t.push([...n,...e]),n=[];continue}n=[]}}return n.length>0&&t.push(n),t}function Wh(e){if((e instanceof Mh||e instanceof uh)&&e.root?.type===`object`){let t;for(let n of e.root.properties)if(n.keyNode?.value===`$schema`&&typeof n.valueNode?.value==`string`){t=n.valueNode?.value;break}if(typeof t==`string`)return t;t&&console.log(`The $schema attribute is not a string, and will be ignored`)}}function Gh(e){if(e instanceof Mh){let t=e.documentHeaderComments.find(e=>Kh(e));if(t!=null){let e=t.match(/\$schema(?:=|:[^\S\r\n]*)(\S+)/);if(e!==null&&e.length===2)return e[1]}}}function Kh(e){let t=e.match(/^#\s+(?:yaml-language-server\s*:|\$schema:)/g);return t!==null&&t.length===1}Dt();var qh=class{constructor(e){this.telemetry=e}findDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){let n=[];try{let r=Ph.getYamlDocument(e);if(!r||r.documents.length===0)return null;for(let i of r.documents)i.root&&(n=n.concat(this.findFlatDocumentSymbols(e,i.root,t)))}catch(e){this.telemetry?.sendError(`yaml.documentSymbols.error`,e)}return n}findHierarchicalDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){let n=[];try{let r=Ph.getYamlDocument(e);if(!r||r.documents.length===0)return null;for(let i of r.documents)i.root&&(n=n.concat(this.findHierarchicalSymbols(e,i.root,t)))}catch(e){this.telemetry?.sendError(`yaml.hierarchicalDocumentSymbols.error`,e)}return n}findFlatDocumentSymbols(e,t,n){let r=n.resultLimit||Number.MAX_VALUE,i=[{node:t,containerName:``}],a=0,o=!1,s=[],c=(t,n)=>{t.type===`array`?t.items.forEach(e=>{e&&i.push({node:e,containerName:n})}):t.type===`object`&&t.properties.forEach(t=>{let a=t.valueNode;if(a){if(r>0){r--;let o=ie.create(e.uri,Zh(e,t)),c=n?n+`.`+t.keyNode.value:t.keyNode.value;s.push({name:Yh(t),kind:Jh(a.type),location:o,containerName:n}),i.push({node:a,containerName:c})}else o=!0}})};for(;a<i.length;){let e=i[a++];c(e.node,e.containerName)}return o&&n.onResultLimitExceeded?.(e.uri),s}findHierarchicalSymbols(e,t,n){let r=n.resultLimit||Number.MAX_VALUE,i=[],a=[{node:t,result:i}],o=0,s=!1,c=(t,n)=>{t.type===`array`?t.items.forEach((t,i)=>{if(t){if(r>0){r--;let o=Zh(e,t),s={name:String(i),kind:Jh(t.type),range:o,selectionRange:o,children:[]};n.push(s),a.push({result:s.children,node:t})}else s=!0}}):t.type===`object`&&t.properties.forEach(t=>{let i=t.valueNode;if(i){if(r>0){r--;let o=[],s={name:Yh(t),kind:Jh(i.type),range:Zh(e,t),selectionRange:Zh(e,t.keyNode),children:o,detail:Xh(i)};n.push(s),a.push({result:o,node:i})}else s=!0}})};for(;o<a.length;){let e=a[o++];c(e.node,e.result)}return s&&n.onResultLimitExceeded?.(e.uri),i}};function Jh(e){switch(e){case`object`:return Je.Module;case`string`:return Je.String;case`number`:return Je.Number;case`array`:return Je.Array;case`boolean`:return Je.Boolean;default:return Je.Variable}}function Yh(e){let t=e.keyNode.internalNode,n;return n=Fu(t)?`{}`:Lu(t)?`[]`:`source`in t&&typeof t.source==`string`?t.source:e.keyNode.value,n&&=n.replace(/[\n]/g,`↵`),n&&n.trim()?n:`"${n}"`}function Xh(e){if(e){if(e.type===`boolean`||e.type===`number`||e.type===`null`||e.type===`string`)return String(e.value);if(e.type===`array`)return e.children.length?void 0:`[]`;if(e.type===`object`)return e.children.length?void 0:`{}`}}function Zh(e,t){return z.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function Qh(e,t=!1){let n=t?`'`:`"`;if(e.length===0)return`${n}${n}`;if(e.length===1&&e===`"`)return`"\\""`;if(e.length===2&&(e[0]===`"`&&e[1]===`"`||e[0]===`'`&&e[1]===`'`))return e[0]===`"`?`"\\"\\""`:`"''"`;if(e.length>=2){let t=e[0],n=e[e.length-1];if(t===`"`&&n===`"`||t===`'`&&n===`'`)return e}return/["\\]/.test(e)?JSON.stringify(e):/^(?:on|off|true|false|yes|no|null|~)$/i.test(e)?`${n}${e}${n}`:/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/.test(e)||/^0x[0-9a-fA-F]+$/.test(e)||/^0o[0-7]+$/.test(e)||/^0[0-7]+$/.test(e)?`"${e}"`:/^\s|\s$/.test(e)||/(?:^|\s)#/.test(e)||/^[\][{}#&*!|>'"%@`]/.test(e)||/^[-?:](\s|$)/.test(e)||/(?:^|[^:]):(?:\s|$)/.test(e)?t?`'${e.replace(/'/g,`''`)}'`:JSON.stringify(e):/[\n\t\r]/.test(e)?JSON.stringify(e):e}Dt();var $h=class{constructor(e,t){this.telemetry=t,this.shouldHover=!0,this.schemaService=e}configure(e){e&&(this.shouldHover=e.hover,this.shouldHoverAnchor=e.hoverAnchor,this.indentation=e.indentation,this.hoverSchemaSource=e.hoverSchemaSource??!0)}doHover(e,t,n=!1){try{if(!this.shouldHover||!e)return Promise.resolve(void 0);let r=Ph.getYamlDocument(e),i=Fm(e.offsetAt(t),r);return i===null?Promise.resolve(void 0):(Ai(r.documents,n),i.currentDocIndex=r.documents.indexOf(i),this.getHover(e,t,i))}catch(e){this.telemetry?.sendError(`yaml.hover.error`,e)}}async getHover(e,t,n){let r=e.offsetAt(t),i=n.getNodeFromOffset(r);if(!i||(i.type===`object`||i.type===`array`)&&r>i.offset+1&&r<i.offset+i.length-1)return Promise.resolve(null);let a=i;if(i.type===`string`){let e=i.parent;if(e&&e.type===`property`&&e.keyNode===i&&(i=e.valueNode,!i))return Promise.resolve(null)}let o=z.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),s=e=>({contents:{kind:Me.Markdown,value:e},range:o});if(this.shouldHoverAnchor&&i.type===`property`&&i.valueNode&&i.valueNode.type===`object`){let e="```yaml\n"+gm(this.resolveMergeKeys(i.valueNode,n),null,2)+"\n```";return Promise.resolve(s(e))}let c=e=>e.replace(/\s\|\|\s*$/,``),l=await this.schemaService.getSchemaForResource(e.uri,n);if(l&&i&&!l.errors.length){let e=n.getMatchingSchemas(l.schema,i.offset),t,r,a=[],o=[],u=[],d;e.every(n=>((n.node===i||i.type===`property`&&i.valueNode===n.node)&&!n.inverted&&n.schema&&(t=t||n.schema.title||n.schema.closestTitle,r=r||n.schema.markdownDescription||this.toMarkdown(n.schema.description),n.schema.enum&&(d=n.schema.enum.indexOf(_m(i)),a=n.schema.markdownEnumDescriptions?n.schema.markdownEnumDescriptions:n.schema.enumDescriptions?n.schema.enumDescriptions.map(this.toMarkdown,this):[],n.schema.enum.forEach((e,t)=>{var n;e=typeof e==`string`?Qh(e,!1):JSON.stringify(e);let r=u.findIndex(t=>t.value===e);r<0?u.push({value:e,description:a[t]}):(n=u[r]).description||(n.description=a[t])})),n.schema.anyOf&&rg(i,e,n.schema)&&(t=``,r=n.schema.description?n.schema.description+`
|
|
1164
|
+
`:``,n.schema.anyOf.forEach((e,i)=>{t+=e.title||n.schema.closestTitle||``,r+=e.markdownDescription||this.toMarkdown(e.description)||``,i!==n.schema.anyOf.length-1&&(t+=` || `,r+=` || `)}),t=c(t),r=c(r)),n.schema.examples&&n.schema.examples.forEach(e=>{o.push(gm(e,null,2))})),!0));let f=``;return t&&(f=`#### `+this.toMarkdown(t)),r&&(f=eg(f),f+=r),u.length!==0&&(f=eg(f),f+=g(`Allowed Values:`)+`
|
|
1165
|
+
|
|
1166
|
+
`,d&&u.unshift(u.splice(d,1)[0]),u.forEach(e=>{e.description?f+=`* \`${ng(e.value)}\`: ${e.description}\n`:f+=`* \`${ng(e.value)}\`\n`})),o.length!==0&&o.forEach(e=>{f=eg(f),f+=g(`Example:`)+`
|
|
1167
|
+
|
|
1168
|
+
`,f+=`\`\`\`yaml\n${e}\`\`\`\n`}),f.length>0&&l.schema.url&&this.hoverSchemaSource&&(f=eg(f),f+=g(`Source: [{0}]({1})`,tg(l.schema),l.schema.url)),s(f)}return null}resolveMergeKeys(e,t,n=0){let r={},i=[...e.properties];for(;i.length>0;){let e=i.shift(),a=e.keyNode.value;if(a===`<<`&&e.valueNode){let i=this.resolveMergeValue(e.valueNode,t,n+1);if(i&&typeof i==`object`&&!Array.isArray(i)){let e=Object.keys(i);for(let t of e)r[t]=i[t]}}else r[a]=this.astNodeToValue(e.valueNode,t,n)}return r}resolveMergeValue(e,t,n){return n>=10?{"<<":e.parent.internalNode.value+` (recursion limit reached)`}:e.type===`object`?this.resolveMergeKeys(e,t,n):this.astNodeToValue(e,t,n)}astNodeToValue(e,t,n){if(!e)return null;switch(e.type){case`object`:return this.resolveMergeKeys(e,t,n);case`array`:return e.children.map(e=>this.astNodeToValue(e,t,n));case`string`:case`number`:case`boolean`:case`null`:return e.value;default:return this.nodeToValue(e.internalNode)}}nodeToValue(e){if(Nu(e))return e.source;if(Fu(e)){let t={};for(let n of e.items)if(n.key&&n.value){let e=this.nodeToValue(n.key),r=this.nodeToValue(n.value);typeof e==`string`&&(t[e]=r)}return t}return Lu(e)?e.items.map(e=>this.nodeToValue(e)):e.value}toMarkdown(e){if(e){let t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
1169
|
+
|
|
1170
|
+
$3`);if(t=t.replace(/[\\`*_{}[\]#+!]/g,`\\$&`),this.indentation!==void 0){let e=RegExp(` {${this.indentation.length}}`,`g`);t=t.replace(e,` `)}return t}}};function eg(e){return e.length===0?e:(e.endsWith(`
|
|
1171
|
+
`)||(e+=`
|
|
1172
|
+
`),e+`
|
|
1173
|
+
`)}function tg(e){let t=`JSON Schema`,n=e.url;if(n){let e=Gr.parse(n);t=Nr.basename(e.fsPath)}else e.title&&(t=e.title);return t}function ng(e){return e.indexOf("`")===-1?e:"`` "+e+" ``"}function rg(e,t,n){let r=0;for(let i of t)e===i.node&&i.schema!==n&&n.anyOf.forEach(e=>{i.schema.title===e.title&&i.schema.description===e.description&&i.schema.properties===e.properties&&r++});return r===n.anyOf.length}const ig=/^\s*#\s*yaml-language-server-disable\b(.*)$/;function ag(e){let t=e.trim();return t?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):[]}function og(e,t){if(e.length===0)return!0;let n=t.toLowerCase();return e.some(e=>n.includes(e))}function sg(e,t,n,r){return e.filter(e=>{let i=t(e);if(i===0)return!0;let a=r(i-1);if(a===void 0)return!0;let o=ig.exec(a);return!o||!og(ag(o[1]),n(e))})}Dt();var cg=class{validate(e,t){let n=[],r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Set,a=/* @__PURE__ */ new Set,o=/* @__PURE__ */ new Map;Wu(t.internalDocument,(e,n,s)=>{zu(n)&&((Ru(n)||H(n))&&n.anchor&&(r.add(n),o.set(n,s[s.length-1])),Nu(n)&&(n.resolve(t.internalDocument)?i.add(n.resolve(t.internalDocument)):a.add(n)))});for(let t of r)if(!i.has(t)){let r=this.getAnchorNode(o.get(t),t);if(r){let t=z.create(e.positionAt(r.offset),e.positionAt(r.offset+r.source.length)),i=me.create(t,g(`Unused anchor "{0}"`,r.source),B.Information,0);i.tags=[fe.Unnecessary],n.push(i)}}return a.forEach(t=>{let r=t.range;if(r){let i=r[0],a=r[1],o=z.create(e.positionAt(i),e.positionAt(a)),s=me.create(o,g(`Unresolved alias "{0}"`,t.toString()),B.Information,0);s.tags=[fe.Unnecessary],n.push(s)}}),n}getAnchorNode(e,t){if(e&&e.srcToken){let n=e.srcToken;if(Ah(n))return lg(n);if(Yp(n))for(let e of n.items){if(t.srcToken!==e.value)continue;let n=lg(e);if(n)return n}}}};function lg(e){for(let t of e.start)if(t.type===`anchor`)return t;if(e.sep&&Array.isArray(e.sep)){for(let t of e.sep)if(t.type===`anchor`)return t}}Dt();var ug=class{constructor(e){this.forbidMapping=e.flowMapping===`forbid`,this.forbidSequence=e.flowSequence===`forbid`}validate(e,t){let n=[];return Wu(t.internalDocument,(t,r)=>{this.forbidMapping&&Fu(r)&&r.srcToken?.type===`flow-collection`&&n.push(me.create(this.getRangeOf(e,r.srcToken),g(`Flow style mapping is forbidden`),B.Error,`flowMap`)),this.forbidSequence&&Lu(r)&&r.srcToken?.type===`flow-collection`&&n.push(me.create(this.getRangeOf(e,r.srcToken),g(`Flow style sequence is forbidden`),B.Error,`flowSeq`))}),n}getRangeOf(e,t){let n=t.end[0].offset,r=e.positionAt(n);return r={character:r.character+1,line:r.line},z.create(e.positionAt(t.start.offset),r)}};Dt();var dg=class{validate(e,t){let n=[];return Wu(t.internalDocument,(t,r)=>{if(Fu(r)){for(let t=1;t<r.items.length;t++)if(pg(r.items[t-1],r.items[t])>0){let i=fg(e,r.items[t-1]);n.push(me.create(i,`Wrong ordering of key "${r.items[t-1].key}" in mapping`,B.Error,`mapKeyOrder`));break}}}),n}};function fg(e,t){let n=t.key.srcToken,r=n.offset,i=r+n.source.length;return z.create(e.positionAt(r),e.positionAt(i))}function pg(e,t){let n=String(t.key);return String(e.key).localeCompare(n)}const mg=/^https:\/\/raw\.githubusercontent\.com\/yannh\/kubernetes-json-schema\/master\/((?:v(\d+)\.(\d+)\.(\d+))-standalone-strict)\/all\.json$/;function hg(e){return e.trim().toLowerCase()===`kubernetes`||mg.test(e)}function gg(e,t,n,r,i){let a=n.trim().toLowerCase()===`kubernetes`;if(a||mg.test(n))return r.send({name:`yaml.schema.configured`,properties:{kubernetes:!0}}),a?`https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/${i??`v1.34.1`}-standalone-strict/all.json`:n;if(Nr.isAbsolute(n)||/^[a-z]:[\\/]/i.test(n)){let e=n.split(`#`,2)[0];return Gr.file(e).toString()+n.substring(e.length)}return hi(n)?gi(e,t,n):n}function _g(e){let t=/* @__PURE__ */ new Map;return e&&(e.url?e.url.startsWith(`schemaservice://combinedSchema/`)?vg(e,t):t.set(e.url,e):vg(e,t)),t}function vg(e,t){e.allOf&&yg(e.allOf,t),e.anyOf&&yg(e.anyOf,t),e.oneOf&&yg(e.oneOf,t)}function yg(e,t){for(let n of e)!Mn(n)&&n.url&&!t.has(n.url)&&t.set(n.url,n)}Dt();const bg=(e,t)=>{let n=t.positionAt(e.location.start),r={start:n,end:e.location.toLineEnd?R.create(n.line,new zh(t).getLineLength(n.line)):t.positionAt(e.location.end)};return me.create(r,e.message,e.severity,e.code,Rm)};var xg=class{constructor(e,t){this.schemaService=e,this.telemetry=t,this.validationEnabled=!0,this.validators=[],this.MATCHES_MULTIPLE=`Matches multiple schemas when only one must validate.`}configure(e){this.validators=[],e&&(this.validationEnabled=e.validate,this.customTags=e.customTags,this.disableAdditionalProperties=e.disableAdditionalProperties,this.yamlVersion=e.yamlVersion,(e.flowMapping===`forbid`||e.flowSequence===`forbid`)&&this.validators.push(new ug(e)),e.keyOrdering&&this.validators.push(new dg)),this.validators.push(new cg)}async doValidation(e,t=!1){if(!this.validationEnabled)return[];let n=[],r=t;try{let i=Ph.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0);for(let[a,o]of i.documents.entries()){let i=t||this.hasKubernetesModelineSchema(o);o.isKubernetes=i,r||=i,o.currentDocIndex=a,o.disableAdditionalProperties=this.disableAdditionalProperties,o.uri=e.uri,n.push(...o.errors,...o.warnings,...await this.getSchemaDiagnostics(e,o),...this.runAdditionalValidators(e,o))}}catch(e){this.telemetry?.sendError(`yaml.validation.error`,e)}let i,a=/* @__PURE__ */ new Set,o=[];for(let t of n){if(r&&t.message===this.MATCHES_MULTIPLE)continue;if(Sg(t)&&(t=bg(t,e)),t.source||(t.source=Rm),i&&i.message===t.message&&i.range.end.line===t.range.start.line&&Math.abs(i.range.end.character-t.range.end.character)>=1){i.range.end=t.range.end;continue}i=t;let n=t.range.start.line+` `+t.range.start.character+` `+t.message;a.has(n)||(o.push(t),a.add(n))}let s=new zh(e);return sg(o,e=>e.range.start.line,e=>e.message,e=>{if(!(e<0||e>=s.getLineCount()))return s.getLineContent(e).replace(/[\r\n]+$/,``)})}hasKubernetesModelineSchema(e){let t=Gh(e);return typeof t==`string`&&hg(t)}async getSchemaDiagnostics(e,t){let n=await this.schemaService.getSchemaForResource(e.uri,t);if(!n)return[];let r=[],i=(n,i,a)=>{if(!t.root)return;let o=t.root,s=o.type===`object`?o.properties[0]:void 0;if(s&&s.keyNode.value===`$schema`){let t=s.valueNode||s,o=z.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));r.push(me.create(o,n,B.Warning,i,Rm,a))}else{let t=z.create(e.positionAt(o.offset),e.positionAt(o.offset+1));r.push(me.create(t,n,B.Warning,i,Rm,a))}};if(n.errors.length){let e=n.errors[0];i(e.message,e.code,e.relatedInformation)}else{for(let e of n.warnings)i(e.message,e.code,e.relatedInformation);let a=t.validate(e,n.schema);a&&r.push(...a)}return r}runAdditionalValidators(e,t){return this.validators.flatMap(n=>n.validate(e,t))}};function Sg(e){return`location`in e}var Cg=/* @__PURE__ */ c({__parsePrettierYamlConfig:()=>Hw,default:()=>Eg,languages:()=>Vv,options:()=>Uv,parsers:()=>Wv,printers:()=>Vw}),wg=Object.defineProperty,Tg=(e,t)=>{for(var n in t)wg(e,n,{get:t[n],enumerable:!0})},Eg={};Tg(Eg,{__parsePrettierYamlConfig:()=>Hw,languages:()=>Vv,options:()=>Uv,parsers:()=>Wv,printers:()=>Vw});var Dg=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function Og(e){return this[e<0?this.length+e:e]}var kg=Dg(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return Og}),Ag=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},jg=Dg(`replaceAll`,function(){if(typeof this==`string`)return Ag}),Mg=()=>{},Ng=`string`,Pg=`array`,Fg=`cursor`,Ig=`indent`,Lg=`align`,Rg=`trim`,zg=`group`,Bg=`fill`,Vg=`if-break`,Hg=`indent-if-break`,Ug=`line-suffix`,Wg=`line-suffix-boundary`,Gg=`line`,Kg=`label`,qg=`break-parent`,Jg=/* @__PURE__ */ new Set([Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg]);function Yg(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function Xg(e){if(typeof e==`string`)return Ng;if(Array.isArray(e))return Pg;if(!e)return;let{type:t}=e;if(Jg.has(t))return t}var Zg=Xg,Qg=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function $g(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
|
|
1174
|
+
Expected it to be 'string' or 'object'.`;if(Zg(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=Qg([...Jg].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
|
|
1175
|
+
Expected it to be ${r}.`}var e_=class extends Error{name=`InvalidDocError`;constructor(e){super($g(e)),this.doc=e}};function t_(e,t){if(typeof e==`string`)return t(e);let n=/* @__PURE__ */ new Map;return r(e);function r(e){return Yg(n,e,i)}function i(e){switch(Zg(e)){case Pg:return t(e.map(r));case Bg:return t({...e,parts:e.parts.map(r)});case Vg:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case zg:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case Lg:case Ig:case Hg:case Kg:case Ug:return t({...e,contents:r(e.contents)});case Ng:case Fg:case Rg:case Wg:case Gg:case qg:return t(e);default:throw new e_(e)}}}function n_(e,t=b_){return t_(e,e=>typeof e==`string`?g_(t,e.split(`
|
|
1176
|
+
`)):e)}var r_=Mg,i_=Mg,a_=Mg,o_=Mg;function s_(e,t){return o_(e),r_(t),{type:Lg,contents:t,n:e}}function c_(e){return s_(-1/0,e)}function l_(e){return s_({type:`root`},e)}function u_(e){return s_(-1,e)}var d_={type:qg};function f_(e){return a_(e),{type:Bg,parts:e}}function p_(e,t={}){return r_(e),i_(t.expandedStates,!0),{type:zg,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function m_(e,t){return p_(e[0],{...t,expandedStates:e})}function h_(e,t=``,n={}){return r_(e),t!==``&&r_(t),{type:Vg,breakContents:e,flatContents:t,groupId:n.groupId}}function g_(e,t){r_(e),i_(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var __={type:Gg},v_={type:Gg,soft:!0},y_=[{type:Gg,hard:!0},d_],b_=[{type:Gg,hard:!0,literal:!0},d_];function x_(e){return r_(e),{type:Ug,contents:e}}function S_(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var C_=S_(` `),w_=e=>e===`
|
|
1177
|
+
`||e===`\r`||e===`\u2028`||e===`\u2029`;function T_(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
|
|
1178
|
+
`)return t-2;if(w_(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
|
|
1179
|
+
`)return t+2;if(w_(i))return t+1}return t}var E_=T_;function D_(e,t){let n=t-1;n=C_(e,n,{backwards:!0}),n=E_(e,n,{backwards:!0}),n=C_(e,n,{backwards:!0});let r=E_(e,n,{backwards:!0});return n!==r}var O_=D_,k_=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function A_(e,t){let{node:n}=e;if(n.type===`root`&&t.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(t.filepath))return async e=>{let n=await e(t.originalText,{parser:`json`});return n?[n,y_]:void 0}}A_.getVisitorKeys=()=>[];var j_=A_,M_=null;function N_(e){if(M_!==null&&typeof M_.property){let e=M_;return M_=N_.prototype=null,e}return M_=N_.prototype=e??Object.create(null),new N_}var P_=10;for(let e=0;e<=P_;e++)N_();function F_(e){return N_(e)}function I_(e,t=`type`){F_(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(/* @__PURE__ */ Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var L_=I_,R_=[[`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`key`,`value`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`content`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],[`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`]],z_=L_({root:R_[0],document:[`head`,`body`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],documentHead:R_[0],documentBody:R_[0],directive:R_[1],alias:R_[1],blockLiteral:R_[1],blockFolded:R_[0],plain:R_[0],quoteSingle:R_[1],quoteDouble:R_[1],mapping:R_[0],mappingItem:R_[2],mappingKey:R_[3],mappingValue:R_[3],sequence:R_[0],sequenceItem:R_[3],flowMapping:R_[0],flowMappingItem:R_[2],flowSequence:R_[0],flowSequenceItem:R_[3],comment:R_[1],tag:R_[4],anchor:R_[4]}),B_=e=>e.position.start.offset,V_=e=>e.position.end.offset,H_=`format`,U_=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/,W_=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/,G_=/^\s*@(?:format|prettier)\s*$/,K_=e=>G_.test(e),q_=e=>W_.test(e),J_=e=>U_.test(e),Y_=e=>`# @${H_}
|
|
1180
|
+
|
|
1181
|
+
${e}`;function X_(e,t){switch(e.type){case`comment`:if(K_(e.value))return null;break;case`quoteDouble`:case`quoteSingle`:t.type=`quote`;break;case`document`:t.directivesEndMarker||delete t.directivesEndMarker,t.documentEndMarker||delete t.documentEndMarker;break;case`blockLiteral`:case`blockFolded`:e.chomping===`keep`?t.value=e.value.split(`
|
|
1182
|
+
`).map(e=>e.replace(/[ \t]+$/,``)).join(`
|
|
1183
|
+
`):(e.chomping===`clip`||e.chomping===`strip`)&&(t.value=e.value.trimEnd())}}X_.ignoredProperties=/* @__PURE__ */ new Set([`position`]);function Z_(e){return Array.isArray(e)&&e.length>0}var Q_=Z_;function $_(e,t){return typeof e?.type==`string`&&t.includes(e.type)}function ev(e,t,n){return t(`children`in e?{...e,children:e.children.map(n=>ev(n,t,e))}:e,n)}function tv(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function nv(e,t){let n=0,r=t.length;for(let i=e.position.end.offset-1;i<r;i++){let e=t[i];if(e===`
|
|
1184
|
+
`&&n++,n===1&&/\S/.test(e))return!1;if(n===2)return!0}return!1}function rv(e){let{node:t}=e;switch(t.type){case`tag`:case`anchor`:case`comment`:return!1}let n=e.stack.length;for(let t=1;t<n;t++){let n=e.stack[t],r=e.stack[t-1];if(Array.isArray(r)&&typeof n==`number`&&n!==r.length-1)return!1}return!0}function iv(e){return Q_(e.children)?iv(kg(0,e.children,-1)):e}function av(e){return e.value.trim()===`prettier-ignore`}function ov(e){let{node:t}=e;if(t.type===`documentBody`){let t=e.parent.head;return pv(t)&&av(kg(0,t.endComments,-1))}return lv(t)&&av(kg(0,t.leadingComments,-1))}function sv(e){return!Q_(e.children)&&!cv(e)}function cv(e){return lv(e)||uv(e)||dv(e)||fv(e)||pv(e)}function lv(e){return Q_(e?.leadingComments)}function uv(e){return Q_(e?.middleComments)}function dv(e){return e?.indicatorComment}function fv(e){return e?.trailingComment}function pv(e){return Q_(e?.endComments)}function mv(e){return e?e.split(/(?<!^| ) (?! |$)/):[]}function hv(e,t,n){let r=t.split(`
|
|
1185
|
+
`).map((e,t,n)=>t===0&&t===n.length-1?e:t!==0&&t!==n.length-1?e.trim():t===0?e.trimEnd():e.trimStart());if(n.proseWrap===`preserve`)return r.map(e=>e?[e]:[]);let i=[];for(let[t,n]of r.entries()){let a=mv(n);t>0&&r[t-1].length>0&&a.length>0&&!(e===`quoteDouble`&&kg(0,kg(0,i,-1),-1).endsWith(`\\`))?i[i.length-1]=[...kg(0,i,-1),...a]:i.push(a)}return n.proseWrap===`never`?i.map(e=>[e.join(` `)]):i}function gv(e,{parentIndent:t,isLastDescendant:n,options:r}){let i=e.position.start.line===e.position.end.line?``:r.originalText.slice(e.position.start.offset,e.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1];if(i===``)return[];let a;if(e.indent===null){let e=i.match(/^(?<leadingSpace> *)[^\n\r ]/m);a=e?e.groups.leadingSpace.length:1/0}else a=e.indent-1+t;let o=i.split(`
|
|
1186
|
+
`).map(e=>e.slice(a));if(r.proseWrap===`preserve`||e.type===`blockLiteral`)return c(o.map(e=>e?[e]:[]));let s=[];for(let[e,t]of o.entries()){let n=mv(t);e>0&&n.length>0&&o[e-1].length>0&&!/^\s/.test(n[0])&&!/^\s|\s$/.test(kg(0,s,-1))?s[s.length-1]=[...kg(0,s,-1),...n]:s.push(n)}return s=s.map(e=>{let t=[];for(let n of e)t.length>0&&/\s$/.test(kg(0,t,-1))?t[t.length-1]+=` `+n:t.push(n);return t}),r.proseWrap===`never`&&(s=s.map(e=>[e.join(` `)])),c(s);function c(t){if(e.chomping===`keep`)return i.endsWith(`
|
|
1187
|
+
`)&&kg(0,t,-1).length===0?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&t[e].every(e=>e.replace(/[ \t]+$/,``)===``);e--)r++;return r===0?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r)}}function _v(e){if(!e)return!0;switch(e.type){case`plain`:case`quoteDouble`:case`quoteSingle`:case`alias`:case`flowMapping`:case`flowSequence`:return!0;default:return!1}}var vv=/* @__PURE__ */ new WeakMap;function yv(e,t){let{node:n,root:r}=e,i=Yg(vv,r,()=>/* @__PURE__ */ new Set);return!i.has(n.position.end.offset)&&(i.add(n.position.end.offset),nv(n,t)&&!bv(e.parent))?v_:``}function bv(e){return pv(e)&&!$_(e,[`documentHead`,`documentBody`,`flowMapping`,`flowSequence`])}function xv(e,t){return s_(` `.repeat(e),t)}function Sv(e,t,n){let{node:r}=e,i=e.ancestors.filter(e=>e.type===`sequence`||e.type===`mapping`).length,a=rv(e),o=[r.type===`blockFolded`?`>`:`|`];r.indent!==null&&o.push(r.indent.toString()),r.chomping!==`clip`&&o.push(r.chomping===`keep`?`+`:`-`),dv(r)&&o.push(` `,n(`indicatorComment`));let s=gv(r,{parentIndent:i,isLastDescendant:a,options:t}),c=[];for(let[e,t]of s.entries())e===0&&c.push(y_),c.push(f_(g_(__,t))),e===s.length-1?r.chomping===`keep`&&a&&c.push(c_(t.length===0?y_:b_)):c.push(t.length===0?y_:l_(b_));return r.indent===null?o.push(u_(xv(t.tabWidth,c))):o.push(c_(xv(r.indent-1+i,c))),o}var Cv=Sv;function wv(e,t,n){let{node:r}=e,i=r.type===`flowMapping`,a=i?`{`:`[`,o=i?`}`:`]`,s=v_;i&&r.children.length>0&&t.bracketSpacing&&(s=__);let c=kg(0,r.children,-1),l=c?.type===`flowMappingItem`&&sv(c.key)&&sv(c.value);return[a,xv(t.tabWidth,[s,Tv(e,t,n),t.trailingComma===`none`?``:h_(`,`),pv(r)?[y_,g_(y_,e.map(n,`endComments`))]:``]),l?``:s,o]}function Tv(e,t,n){return e.map(({isLast:r,node:i,next:a})=>[n(),r?``:[`,`,__,i.position.start.line===a.position.start.line?``:yv(e,t.originalText)]],`children`)}function Ev(e,t,n){let{node:r,parent:i}=e,{key:a,value:o}=r,s=sv(a),c=sv(o);if(s&&c)return`: `;let l=n(`key`),u=Ov(r)?` `:``;if(c)return r.type===`flowMappingItem`&&i.type===`flowMapping`?l:r.type===`mappingItem`&&Dv(a.content,t)&&!fv(a.content)&&i.tag?.value!==`tag:yaml.org,2002:set`?[l,u,`:`]:[`? `,xv(2,l)];let d=n(`value`);if(s)return[`: `,xv(2,d)];if(lv(o)||!_v(a.content))return[`? `,xv(2,l),y_,...e.map(()=>[n(),y_],`value`,`leadingComments`),`: `,xv(2,d)];if(kv(a.content)&&!lv(a.content)&&!uv(a.content)&&!fv(a.content)&&!pv(a)&&!lv(o.content)&&!uv(o.content)&&!pv(o)&&Dv(o.content,t)&&Dv(a.content,t))return[l,u,`: `,d];let f=Symbol(`mappingKey`),p=p_([h_(`? `),p_(xv(2,l),{id:f})]),m=[y_,`: `,xv(2,d)],h=[u,`:`];pv(o)&&o.content&&$_(o.content,[`flowMapping`,`flowSequence`])&&o.content.children.length===0?h.push(` `):lv(o.content)||pv(o)&&o.content&&!$_(o.content,[`mapping`,`sequence`])||i.type===`mapping`&&fv(a.content)&&_v(o.content)||$_(o.content,[`mapping`,`sequence`])&&o.content.tag===null&&o.content.anchor===null?h.push(y_):o.content?h.push(__):fv(o)&&h.push(` `),h.push(d);let g=xv(t.tabWidth,h);return Dv(a.content,t)&&!lv(a.content)&&!uv(a.content)&&!fv(a.content)&&!pv(a)?m_([[l,g]]):m_([[p,h_(m,g,{groupId:f})]])}function Dv(e,t){if(!e)return!0;switch(e.type){case`plain`:case`quoteSingle`:case`quoteDouble`:break;case`alias`:return!0;default:return!1}if(t.proseWrap===`preserve`)return e.position.start.line===e.position.end.line;if(/\\$/m.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case`never`:return!e.value.includes(`
|
|
1188
|
+
`);case`always`:return!/[\n ]/.test(e.value);default:return!1}}function Ov(e){return e.key.content?.type===`alias`}function kv(e){if(!e)return!0;switch(e.type){case`plain`:case`quoteDouble`:case`quoteSingle`:return e.position.start.line===e.position.end.line;case`alias`:return!0;default:return!1}}var Av=Ev;function jv(e){return ev(e,Mv)}function Mv(e){switch(e.type){case`document`:tv(e,`head`,()=>e.children[0]),tv(e,`body`,()=>e.children[1]);break;case`documentBody`:case`sequenceItem`:case`flowSequenceItem`:case`mappingKey`:case`mappingValue`:tv(e,`content`,()=>e.children[0]);break;case`mappingItem`:case`flowMappingItem`:tv(e,`key`,()=>e.children[0]),tv(e,`value`,()=>e.children[1])}return e}var Nv=jv;function Pv(e,t,n){let{node:r}=e,i=[];r.type!==`mappingValue`&&lv(r)&&i.push([g_(y_,e.map(n,`leadingComments`)),y_]);let{tag:a,anchor:o}=r;a&&i.push(n(`tag`)),a&&o&&i.push(` `),o&&i.push(n(`anchor`));let s=``;return $_(r,[`mapping`,`sequence`,`comment`,`directive`,`mappingItem`,`sequenceItem`])&&!rv(e)&&(s=yv(e,t.originalText)),(a||o)&&($_(r,[`sequence`,`mapping`])&&!uv(r)?i.push(y_):i.push(` `)),uv(r)&&i.push([r.middleComments.length===1?``:y_,g_(y_,e.map(n,`middleComments`)),y_]),ov(e)?i.push(n_(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(p_(Fv(e,t,n))),fv(r)&&!$_(r,[`document`,`documentHead`])&&i.push(x_([r.type===`mappingValue`&&!r.content?``:` `,e.parent.type===`mappingKey`&&e.getParentNode(2).type===`mapping`&&_v(r)?``:d_,n(`trailingComment`)])),bv(r)&&i.push(xv(r.type===`sequenceItem`?2:0,[y_,g_(y_,e.map(({node:e})=>[O_(t.originalText,B_(e))?y_:``,n()],`endComments`))])),i.push(s),i}function Fv(e,t,n){let{node:r}=e;switch(r.type){case`root`:{let t=iv(r),i=!($_(t,[`blockLiteral`,`blockFolded`])&&t.chomping===`keep`),a=[];return e.each(({node:t,isFirst:r})=>{r||a.push(y_),a.push(n()),Lv(e)&&(i&&a.push(y_),a.push(`...`),fv(t)&&a.push(` `,n(`trailingComment`)))},`children`),i&&a.push(y_),a}case`document`:{let t=[];return Rv(e)&&((r.head.children.length>0||r.head.endComments.length>0)&&t.push(n(`head`)),fv(r.head)?t.push([`---`,` `,n([`head`,`trailingComment`])]):t.push(`---`)),Iv(r)&&t.push(n(`body`)),g_(y_,t)}case`documentHead`:return g_(y_,[...e.map(n,`children`),...e.map(n,`endComments`)]);case`documentBody`:{let{children:i,endComments:a}=r,o=``;if(i.length>0&&a.length>0){let e=iv(r);$_(e,[`blockFolded`,`blockLiteral`])?e.chomping!==`keep`&&(o=[y_,y_]):o=$_(kg(0,i,-1),[`mapping`])&&O_(t.originalText,B_(a[0]))?[y_,y_]:y_}return[g_(y_,e.map(n,`children`)),o,g_(y_,e.map(n,`endComments`))]}case`directive`:return[`%`,g_(` `,[r.name,...r.parameters])];case`comment`:return[`#`,r.value];case`alias`:return[`*`,r.value];case`tag`:return t.originalText.slice(r.position.start.offset,r.position.end.offset);case`anchor`:return[`&`,r.value];case`plain`:return zv(r.type,t.originalText.slice(r.position.start.offset,r.position.end.offset),t);case`quoteDouble`:case`quoteSingle`:{let e=t.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type===`quoteSingle`&&e.includes(`\\`)||r.type===`quoteDouble`&&/\\[^"]/.test(e)){let n=r.type===`quoteDouble`?`"`:`'`;return[n,zv(r.type,e,t),n]}if(e.includes(`"`))return[`'`,zv(r.type,r.type===`quoteDouble`?jg(0,jg(0,e,`\\"`,`"`),`'`,`'`.repeat(2)):e,t),`'`];if(e.includes(`'`))return[`"`,zv(r.type,r.type===`quoteSingle`?jg(0,e,`''`,`'`):e,t),`"`];let n=t.singleQuote?`'`:`"`;return[n,zv(r.type,e,t),n]}case`blockFolded`:case`blockLiteral`:return Cv(e,t,n);case`mapping`:case`sequence`:return g_(y_,e.map(n,`children`));case`sequenceItem`:return[`- `,xv(2,r.content?n(`content`):``)];case`mappingKey`:case`mappingValue`:return r.content?n(`content`):``;case`mappingItem`:case`flowMappingItem`:return Av(e,t,n);case`flowMapping`:return wv(e,t,n);case`flowSequence`:return wv(e,t,n);case`flowSequenceItem`:return n(`content`);default:throw new k_(r,`YAML`)}}function Iv(e){return e.body.children.length>0||pv(e.body)}function Lv(e){let t=e.node;if(t.documentEndMarker||fv(t))return!0;if(e.isLast)return!1;let n=e.next;return n.head.children.length>0||pv(n.head)}function Rv(e){let t=e.node;return t.directivesEndMarker||t.head.children.length>0||pv(t.head)||fv(t.head)}function zv(e,t,n){return g_(y_,hv(e,t,n).map(e=>f_(g_(__,e))))}var Bv={preprocess:Nv,embed:j_,print:Pv,massageAstNode:X_,insertPragma:Y_,getVisitorKeys:z_},Vv=[{name:`YAML`,type:`data`,aceMode:`yaml`,extensions:[`.yml`,`.mir`,`.reek`,`.rviz`,`.sublime-syntax`,`.syntax`,`.yaml`,`.yaml-tmlanguage`,`.yaml.sed`,`.yml.mysql`],filenames:[`.clang-format`,`.clang-tidy`,`.clangd`,`.gemrc`,`CITATION.cff`,`glide.lock`,`pixi.lock`,`.prettierrc`,`.stylelintrc`,`.lintstagedrc`],tmScope:`source.yaml`,aliases:[`yml`],codemirrorMode:`yaml`,codemirrorMimeType:`text/x-yaml`,parsers:[`yaml`],vscodeLanguageIds:[`yaml`,`ansible`,`dockercompose`,`github-actions-workflow`,`home-assistant`],linguistLanguageId:407}],Hv={bracketSpacing:{category:`Common`,type:`boolean`,default:!0,description:`Print spaces between brackets.`,oppositeDescription:`Do not print spaces between brackets.`},objectWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap object literals.`,choices:[{value:`preserve`,description:`Keep as multi-line, if there is a newline between the opening brace and first property.`},{value:`collapse`,description:`Fit to a single line when possible.`}]},singleQuote:{category:`Common`,type:`boolean`,default:!1,description:`Use single quotes instead of double quotes.`},proseWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap prose.`,choices:[{value:`always`,description:`Wrap prose if it exceeds the print width.`},{value:`never`,description:`Do not wrap prose.`},{value:`preserve`,description:`Wrap prose as-is.`}]},bracketSameLine:{category:`Common`,type:`boolean`,default:!1,description:`Put > of opening tags on the last line instead of on a new line.`},singleAttributePerLine:{category:`Common`,type:`boolean`,default:!1,description:`Enforce single attribute per line in HTML, Vue and JSX.`}},Uv={bracketSpacing:Hv.bracketSpacing,singleQuote:Hv.singleQuote,proseWrap:Hv.proseWrap},Wv={};Tg(Wv,{yaml:()=>Bw});var Gv=class extends SyntaxError{name=`YAMLSyntaxError`;code;source;position;constructor(e,t){super(t.message,{cause:t}),this.cause??=t,this.code=t.code,this.source=e.text,this.position=e.transformRange(t.pos)}};function Kv(e,t=null){`children`in e&&e.children.forEach(t=>Kv(t,e)),`anchor`in e&&e.anchor&&Kv(e.anchor,e),`tag`in e&&e.tag&&Kv(e.tag,e),`leadingComments`in e&&e.leadingComments.forEach(t=>Kv(t,e)),`middleComments`in e&&e.middleComments.forEach(t=>Kv(t,e)),`indicatorComment`in e&&e.indicatorComment&&Kv(e.indicatorComment,e),`trailingComment`in e&&e.trailingComment&&Kv(e.trailingComment,e),`endComments`in e&&e.endComments.forEach(t=>Kv(t,e)),Object.defineProperty(e,"_parent",{value:t,enumerable:!1})}function qv(e){return`${e.line}:${e.column}`}function Jv(e){Kv(e);let t=Yv(e),n=e.children.slice();e.comments.filter(e=>!e._parent).forEach(e=>{for(;n.length>1&&e.position.start.line>n[0].position.end.line;)n.shift();Zv(e,t,n[0])})}function Yv(e){let t=Array.from(Array(e.position.end.line),()=>({}));for(let n of e.comments)t[n.position.start.line-1].comment=n;return Xv(t,e),t}function Xv(e,t){if(t.position.start.offset!==t.position.end.offset){if(`leadingComments`in t){let{start:n}=t.position,{leadingAttachableNode:r}=e[n.line-1];(!r||n.column<r.position.start.column)&&(e[n.line-1].leadingAttachableNode=t)}if(`trailingComment`in t&&t.position.end.column>1&&t.type!==`document`&&t.type!==`documentHead`){let{end:n}=t.position,{trailingAttachableNode:r}=e[n.line-1];(!r||n.column>=r.position.end.column)&&(e[n.line-1].trailingAttachableNode=t)}if(t.type!==`root`&&t.type!==`document`&&t.type!==`documentHead`&&t.type!==`documentBody`){let{start:n,end:r}=t.position,i=[r.line].concat(n.line===r.line?[]:n.line);for(let n of i){let i=e[n-1].trailingNode;(!i||r.column>=i.position.end.column)&&(e[n-1].trailingNode=t)}}`children`in t&&t.children.forEach(t=>{Xv(e,t)})}}function Zv(e,t,n){let r=e.position.start.line,{trailingAttachableNode:i}=t[r-1];if(i){if(i.trailingComment)throw Error(`Unexpected multiple trailing comment at ${qv(e.position.start)}`);Kv(e,i),i.trailingComment=e;return}for(let i=r;i>=n.position.start.line;i--){let{trailingNode:n}=t[i-1],a;if(n)a=n;else if(i!==r&&t[i-1].comment)a=t[i-1].comment._parent;else continue;if((a.type===`sequence`||a.type===`mapping`)&&(a=a.children[0]),a.type===`mappingItem`){let[e,t]=a.children;a=$v(e)?e:t}for(;;){if(Qv(a,e)){Kv(e,a),a.endComments.push(e);return}if(!a._parent)break;a=a._parent}break}for(let i=r+1;i<=n.position.end.line;i++){let{leadingAttachableNode:n}=t[i-1];if(n){Kv(e,n),n.leadingComments.push(e);return}}let a=n.children[1];Kv(e,a),a.endComments.push(e)}function Qv(e,t){if(e.position.start.offset<t.position.start.offset&&e.position.end.offset>t.position.end.offset)switch(e.type){case`flowMapping`:case`flowSequence`:return e.children.length===0||t.position.start.line>e.children[e.children.length-1].position.end.line}if(t.position.end.offset<e.position.end.offset)return!1;switch(e.type){case`sequenceItem`:return t.position.start.column>e.position.start.column;case`mappingKey`:case`mappingValue`:return t.position.start.column>e._parent.position.start.column&&(e.children.length===0||e.children.length===1&&e.children[0].type!==`blockFolded`&&e.children[0].type!==`blockLiteral`)&&(e.type===`mappingValue`||$v(e));default:return!1}}function $v(e){return e.position.start!==e.position.end&&(e.children.length===0||e.position.start.offset!==e.children[0].position.start.offset)}function ey(e,t,n){return{type:`root`,position:e,children:t,comments:n}}function ty(e,t){return{start:e,end:t}}function ny(e){return{start:e,end:e}}function ry(e,t){return{type:`comment`,position:t.transformRange([e.offset,e.offset+e.source.length]),value:e.source.slice(1)}}function iy(e,t){return{type:`anchor`,position:e,value:t}}function ay(e,t,n){return{anchor:t,tag:e,middleComments:n}}function oy(e,t){return{type:`tag`,position:e,value:t}}function sy(e,t,n){let r=[],i=null,a=null,o=null;for(let s of t){let t=[s.offset,s.offset+s.source.length];switch(s.type){case`tag`:{i??=t;let r=e.tag??s.source.slice(s.source.startsWith(`!!`)?2:1);r===`!`&&(r=`tag:yaml.org,2002:str`),a=oy(n.transformRange(t),r)}break;case`anchor`:i??=t,o=iy(n.transformRange(t),e.anchor);break;case`comment`:{let a=n.transformComment(s);i&&i[0]<=t[0]&&t[1]<=e.range[0]&&r.push(a);break}default:throw Error(`Unexpected content property token type: ${s.type}`)}}return ay(a,o,r)}function cy(e,t,n){return{type:`alias`,position:e,leadingComments:[],trailingComment:null,...t,value:n}}function*ly(...e){for(let t of e)if(t)for(let e of t)uy(e)||(yield e)}function uy(e){return e.type===`space`||e.type===`newline`}function dy(e){return e.type===`comment`||e.type===`tag`||e.type===`anchor`}function fy(e,t){let n=[];for(let r of ly(e))r.type===`comment`?t.transformComment(r):n.push(r);return n}function py(e,t,n){let r=e.srcToken;for(let e of fy(r.end,t))throw Error(`Unexpected token type in alias end: ${e.type}`);return cy(t.transformRange(e.range),t.transformContentProperties(e,n.tokens),e.source)}function my(e){return{...e,type:`blockFolded`}}function hy(e,t,n,r,i,a){return{type:`blockValue`,position:e,leadingComments:[],...t,chomping:n,indent:r,value:i,indicatorComment:a}}function gy(e,t,n,r){let i=null,a=null;for(let e of ly(t.props))if(e.type===`comment`)a=n.transformComment(e);else if(e.type===`block-scalar-header`)i=e;else throw Error(`Unexpected token type in block value end: ${e.type}`);if(!i)throw Error(`Expected block scalar header token`);let o=_y(i.source);return hy(n.transformRange(e.range),n.transformContentProperties(e,r.tokens),o.chomping,o.indent,e.source,a)}function _y(e){let t=/([+-]?)(\d*)([+-]?)$/u.exec(e),n=null,r=`clip`;if(t){n=t[2]?Number(t[2]):null;let e=t[3]||t[1];r=e===`+`?`keep`:e===`-`?`strip`:`clip`}return{chomping:r,indent:n}}function vy(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-scalar`)throw Error(`Expected block scalar srcToken`);return my(gy(e,r,t,n))}function yy(e){return{...e,type:`blockLiteral`}}function by(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-scalar`)throw Error(`Expected block scalar srcToken`);return yy(gy(e,r,t,n))}function xy(e,t,n){return{type:`flowCollection`,position:e,leadingComments:[],trailingComment:null,endComments:[],...t,children:n}}function Sy(e,t,n){return{...xy(e,t,n),type:`flowMapping`}}function Cy(e,t,n){return{type:`flowMappingItem`,position:e,leadingComments:[],children:[t,n]}}function wy(e,t){return{type:`mappingKey`,position:e,trailingComment:null,endComments:[],children:t?[t]:[]}}function Ty(e,t){return{type:`mappingValue`,position:e,leadingComments:[],trailingComment:null,endComments:[],children:t?[t]:[]}}function Ey(e,t,n,r){let i=[],a=null;for(let e of ly(t.start)){if(dy(e)){i.push(e);continue}if(e.type===`explicit-key-ind`){a=e;continue}if(e.type!==`comma`)throw Error(`Unexpected token type in collection item start: ${e.type}`)}let o=[],s=null;for(let e of ly(t.sep)){if(dy(e)){o.push(e);continue}if(e.type===`map-value-ind`){s=e;continue}throw Error(`Unexpected token type in collection item sep: ${e.type}`)}let c=a?.offset??t.key?.offset??s?.offset??t.value.offset,l=[c,t.key?e.key.range[1]:a?a.offset+a.source.length:c],u=null;if(e.value){let n=s?.offset??t.value?.offset??e.value.range[0];u=[n,t.value?e.value.range[1]:s?s.offset+s.source.length:n]}return Dy(e,n,r,{range:l,props:{tokens:i}},{range:u,props:{tokens:o}})}function Dy(e,t,n,r,i){let a=null;dw(e.key,r.props)?fy(r.props.tokens,t):a=t.transformNode(e.key,r.props);let o=null;dw(e.value,i.props)?fy(i.props.tokens,t):o=t.transformNode(e.value,i.props);let s=wy(t.transformRange([r.range?r.range[0]:a.position.start.offset,a?a.position.end.offset:r.range[1]]),a),c=o||i.range?Ty(t.transformRange([i.range?i.range[0]:o.position.start.offset,o?o.position.end.offset:i.range[0]+1]),o):null;return n(ty(s.position.start,c?c.position.end:s.position.end),s,c||Ty(ny(s.position.end),null))}function Oy(e,t,n){let r=e.srcToken;if(!r||r.type!==`flow-collection`)throw Error(`Expected flow-collection CST node for flow map`);let i=e.items.map((e,n)=>{let i=r.items[n];return Ey(e,i,t,Cy)});if(e.items.length<r.items.length)for(let n=e.items.length;n<r.items.length;n++){let e=r.items[n];for(let n of fy(e.start,t))if(n.type!==`comma`)throw Error(`Unexpected token type in collection item start: ${n.type}`)}let a=null;for(let e of fy(r.end,t)){if(e.type===`flow-map-end`){a=e;continue}throw Error(`Unexpected token type in flow map end: ${e.type}`)}if(!a)throw Error(`Expected flow-map-end token`);return Sy(t.transformRange([r.start.offset,a.offset+a.source.length]),t.transformContentProperties(e,n.tokens),i)}function ky(e,t,n){return{...xy(e,t,n),type:`flowSequence`}}function Ay(e,t){return{type:`flowSequenceItem`,position:e,children:[t]}}function jy(e){return e[e.length-1]}var My={};Tg(My,{Alias:()=>hb,CST:()=>tC,Composer:()=>eC,Document:()=>pS,Lexer:()=>AC,LineCounter:()=>jC,Pair:()=>ix,Parser:()=>zC,Scalar:()=>vb,Schema:()=>dS,YAMLError:()=>hS,YAMLMap:()=>ux,YAMLParseError:()=>gS,YAMLSeq:()=>fx,YAMLWarning:()=>_S,isAlias:()=>By,isCollection:()=>Ky,isDocument:()=>Vy,isMap:()=>Hy,isNode:()=>qy,isPair:()=>Uy,isScalar:()=>Wy,isSeq:()=>Gy,parse:()=>UC,parseAllDocuments:()=>VC,parseDocument:()=>HC,stringify:()=>WC,visit:()=>Qy,visitAsync:()=>eb});var Ny=Symbol.for(`yaml.alias`),Py=Symbol.for(`yaml.document`),Fy=Symbol.for(`yaml.map`),Iy=Symbol.for(`yaml.pair`),Ly=Symbol.for(`yaml.scalar`),Ry=Symbol.for(`yaml.seq`),zy=Symbol.for(`yaml.node.type`),By=e=>!!e&&typeof e==`object`&&e[zy]===Ny,Vy=e=>!!e&&typeof e==`object`&&e[zy]===Py,Hy=e=>!!e&&typeof e==`object`&&e[zy]===Fy,Uy=e=>!!e&&typeof e==`object`&&e[zy]===Iy,Wy=e=>!!e&&typeof e==`object`&&e[zy]===Ly,Gy=e=>!!e&&typeof e==`object`&&e[zy]===Ry;function Ky(e){if(e&&typeof e==`object`)switch(e[zy]){case Fy:case Ry:return!0}return!1}function qy(e){if(e&&typeof e==`object`)switch(e[zy]){case Ny:case Fy:case Ly:case Ry:return!0}return!1}var Jy=e=>(Wy(e)||Ky(e))&&!!e.anchor,Yy=Symbol(`break visit`),Xy=Symbol(`skip children`),Zy=Symbol(`remove node`);function Qy(e,t){let n=nb(t);Vy(e)?$y(null,e.contents,n,Object.freeze([e]))===Zy&&(e.contents=null):$y(null,e,n,Object.freeze([]))}Qy.BREAK=Yy,Qy.SKIP=Xy,Qy.REMOVE=Zy;function $y(e,t,n,r){let i=rb(e,t,n,r);if(qy(i)||Uy(i))return ib(e,r,i),$y(e,i,n,r);if(typeof i!=`symbol`){if(Ky(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=$y(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else{if(i===Yy)return Yy;i===Zy&&(t.items.splice(e,1),--e)}}}else if(Uy(t)){r=Object.freeze(r.concat(t));let e=$y(`key`,t.key,n,r);if(e===Yy)return Yy;e===Zy&&(t.key=null);let i=$y(`value`,t.value,n,r);if(i===Yy)return Yy;i===Zy&&(t.value=null)}}return i}async function eb(e,t){let n=nb(t);Vy(e)?await tb(null,e.contents,n,Object.freeze([e]))===Zy&&(e.contents=null):await tb(null,e,n,Object.freeze([]))}eb.BREAK=Yy,eb.SKIP=Xy,eb.REMOVE=Zy;async function tb(e,t,n,r){let i=await rb(e,t,n,r);if(qy(i)||Uy(i))return ib(e,r,i),tb(e,i,n,r);if(typeof i!=`symbol`){if(Ky(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await tb(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else{if(i===Yy)return Yy;i===Zy&&(t.items.splice(e,1),--e)}}}else if(Uy(t)){r=Object.freeze(r.concat(t));let e=await tb(`key`,t.key,n,r);if(e===Yy)return Yy;e===Zy&&(t.key=null);let i=await tb(`value`,t.value,n,r);if(i===Yy)return Yy;i===Zy&&(t.value=null)}}return i}function nb(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 rb(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Hy(t))return n.Map?.(e,t,r);if(Gy(t))return n.Seq?.(e,t,r);if(Uy(t))return n.Pair?.(e,t,r);if(Wy(t))return n.Scalar?.(e,t,r);if(By(t))return n.Alias?.(e,t,r)}function ib(e,t,n){let r=t[t.length-1];if(Ky(r))r.items[e]=n;else if(Uy(r))e===`key`?r.key=n:r.value=n;else if(Vy(r))r.contents=n;else{let e=By(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ab={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},ob=e=>e.replace(/[!,[\]{}]/g,e=>ab[e]),sb=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+ob(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&qy(e.contents)){let t={};Qy(e.contents,(e,n)=>{qy(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
1189
|
+
`)}};sb.defaultYaml={explicit:!1,version:`1.2`},sb.defaultTags={"!!":`tag:yaml.org,2002:`};function cb(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 lb(e){let t=/* @__PURE__ */ new Set;return Qy(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function ub(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function db(e,t){let n=[],r=/* @__PURE__ */ new Map,i=null;return{onAnchor:r=>{n.push(r),i??=lb(e);let a=ub(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(Wy(t.node)||Ky(t.node)))t.node.anchor=t.anchor;else{let t=/* @__PURE__ */ Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function fb(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=fb(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=fb(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=fb(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=fb(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function pb(e,t,n){if(Array.isArray(e))return e.map((e,t)=>pb(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Jy(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var mb=class{constructor(e){Object.defineProperty(this,zy,{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:n,onAnchor:r,reviver:i}={}){if(!Vy(e))throw TypeError(`A document argument is required`);let a={anchors:/* @__PURE__ */ new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=pb(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?fb(i,{"":o},``,o):o}},hb=class extends mb{constructor(e){super(Ny),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 n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Qy(e,{Node:(e,t)=>{(By(t)||Jy(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(pb(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=gb(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(cb(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function gb(e,t,n){if(By(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Ky(t)){let r=0;for(let i of t.items){let t=gb(e,i,n);t>r&&(r=t)}return r}if(Uy(t)){let r=gb(e,t.key,n),i=gb(e,t.value,n);return Math.max(r,i)}return 1}var _b=e=>!e||typeof e!=`function`&&typeof e!=`object`,vb=class extends mb{constructor(e){super(Ly),this.value=e}toJSON(e,t){return t?.keep?this.value:pb(this.value,e,t)}toString(){return String(this.value)}};vb.BLOCK_FOLDED=`BLOCK_FOLDED`,vb.BLOCK_LITERAL=`BLOCK_LITERAL`,vb.PLAIN=`PLAIN`,vb.QUOTE_DOUBLE=`QUOTE_DOUBLE`,vb.QUOTE_SINGLE=`QUOTE_SINGLE`;var yb=`tag:yaml.org,2002:`;function bb(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function xb(e,t,n){if(Vy(e)&&(e=e.contents),qy(e))return e;if(Uy(e)){let t=n.schema[Fy].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new hb(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=yb+t.slice(2));let l=bb(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new vb(e);return c&&(c.node=t),t}l=e instanceof Map?o[Fy]:Symbol.iterator in Object(e)?o[Ry]:o[Fy]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new vb(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Sb(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=/* @__PURE__ */ new Map([[n,r]])}return xb(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:/* @__PURE__ */ new Map})}var Cb=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,wb=class extends mb{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(t=>qy(t)||Uy(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Cb(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Ky(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Sb(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Ky(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Wy(i)?i.value:i:Ky(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Uy(t))return!1;let n=t.value;return n==null||e&&Wy(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Ky(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Ky(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Sb(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Tb=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Eb(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Db=(e,t,n)=>e.endsWith(`
|
|
1190
|
+
`)?Eb(n,t):n.includes(`
|
|
1191
|
+
`)?`
|
|
1192
|
+
`+Eb(n,t):(e.endsWith(` `)?``:` `)+n,Ob=`flow`,kb=`block`,Ab=`quoted`;function jb(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===kb&&(h=Mb(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===Ab&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
|
1193
|
+
`)n===kb&&(h=Mb(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
|
1194
|
+
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
1195
|
+
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===Ab){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`
|
|
1196
|
+
${t}${e.slice(0,a)}`:(n===Ab&&u[i]&&(v+=`${e[i]}\\`),v+=`
|
|
1197
|
+
${t}${e.slice(i+1,a)}`)}return v}function Mb(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
1198
|
+
`);r=t,i=t+1,a=e[i]}return r}var Nb=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Pb=e=>/^(%|---|\.\.\.)/m.test(e);function Fb(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
|
1199
|
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Ib(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Pb(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
|
1200
|
+
|
|
1201
|
+
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
|
1202
|
+
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:jb(o,a,Ab,Nb(t,!1))}function Lb(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
1203
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Ib(e,t);let n=t.indent||(Pb(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&
|
|
1204
|
+
${n}`)+`'`;return t.implicitKey?r:jb(r,n,Ob,Nb(t,!1))}function Rb(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Ib;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Lb:i&&!t?Ib:n?Lb:Ib}return r(e,t)}var zb;try{zb=/* @__PURE__ */ RegExp(`(^|(?<!
|
|
1205
|
+
))
|
|
1206
|
+
+(?!
|
|
1207
|
+
|$)`,`g`)}catch{zb=/\n+(?!\n|$)/g}function Bb({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return Rb(n,r);let l=r.indent||(r.forceBlockIndent||Pb(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===vb.BLOCK_FOLDED?!1:t===vb.BLOCK_LITERAL||!Fb(n,c,l.length);if(!n)return u?`|
|
|
1208
|
+
`:`>
|
|
1209
|
+
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
|
1210
|
+
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
|
1211
|
+
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
|
1212
|
+
`&&(p=p.slice(0,-1)),p.replace(zb,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
|
1213
|
+
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
|
1214
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=Nb(r,!0);o!==`folded`&&t!==vb.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=jb(`${v}${e}${p}`,l,kb,a);if(!i)return`>${y}
|
|
1215
|
+
${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}
|
|
1216
|
+
${l}${v}${n}${p}`}function Vb(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
|
1217
|
+
`)||u&&/[[\]{},]/.test(a))return Rb(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
|
1218
|
+
`)?Rb(a,t):Bb(e,t,n,r);if(!s&&!u&&i!==vb.PLAIN&&a.includes(`
|
|
1219
|
+
`))return Bb(e,t,n,r);if(Pb(a)){if(c===``)return t.forceBlockIndent=!0,Bb(e,t,n,r);if(s&&c===l)return Rb(a,t)}let d=a.replace(/\n+/g,`$&
|
|
1220
|
+
${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return Rb(a,t)}return s?d:jb(d,c,Ob,Nb(t,!1))}function Hb(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==vb.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=vb.QUOTE_DOUBLE);let c=e=>{switch(e){case vb.BLOCK_FOLDED:case vb.BLOCK_LITERAL:return i||a?Rb(o.value,t):Bb(o,t,n,r);case vb.QUOTE_DOUBLE:return Ib(o.value,t);case vb.QUOTE_SINGLE:return Lb(o.value,t);case vb.PLAIN:return Vb(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function Ub(e,t){let n=Object.assign({blockQuote:!0,commentString:Tb,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),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:/* @__PURE__ */ new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function Wb(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(Wy(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Gb(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(Wy(e)||Ky(e))&&e.anchor;a&&cb(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function Kb(e,t,n,r){if(Uy(e))return e.toString(t,n,r);if(By(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=/* @__PURE__ */ new Set([e]),e=e.resolve(t.doc)}let i,a=qy(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Wb(t.doc.schema.tags,a);let o=Gb(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):Wy(a)?Hb(a,t,n,r):a.toString(t,n,r);return o?Wy(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}
|
|
1221
|
+
${t.indent}${s}`:s}function qb({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=qy(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(Ky(e)||!qy(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||Ky(e)||(Wy(e)?e.type===vb.BLOCK_FOLDED||e.type===vb.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Kb(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Db(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Db(g,n.indent,l(f))),g=`? ${g}
|
|
1222
|
+
${s}:`):(g=`${g}:`,f&&(g+=Db(g,n.indent,l(f))));let _,v,y;qy(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&Wy(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&Gy(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Kb(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
|
1223
|
+
`:``,v){let e=l(v);S+=`
|
|
1224
|
+
${Eb(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
|
1225
|
+
`&&y&&(S=`
|
|
1226
|
+
|
|
1227
|
+
`):S+=`
|
|
1228
|
+
${n.indent}`}else if(!p&&Ky(t)){let e=x[0],r=x.indexOf(`
|
|
1229
|
+
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`
|
|
1230
|
+
${n.indent}`)}}else(x===``||x[0]===`
|
|
1231
|
+
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=Db(g,n.indent,l(y)):h&&i&&i(),g}function Jb(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var Yb=`<<`,Xb={identify:e=>e===Yb||typeof e==`symbol`&&e.description===Yb,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new vb(Symbol(Yb)),{addToJSMap:Qb}),stringify:()=>Yb},Zb=(e,t)=>(Xb.identify(t)||Wy(t)&&(!t.type||t.type===vb.PLAIN)&&Xb.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Xb.tag&&e.default);function Qb(e,t,n){let r=ex(e,n);if(Gy(r))for(let n of r.items)$b(e,t,n);else if(Array.isArray(r))for(let n of r)$b(e,t,n);else $b(e,t,r)}function $b(e,t,n){let r=ex(e,n);if(!Hy(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function ex(e,t){return e&&By(t)?t.resolve(e.doc,e):t}function tx(e,t,{key:n,value:r}){if(qy(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Zb(e,n))Qb(e,t,r);else{let i=pb(n,``,e);if(t instanceof Map)t.set(i,pb(r,i,e));else if(t instanceof Set)t.add(i);else{let a=nx(n,i,e),o=pb(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function nx(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(qy(e)&&n?.doc){let t=Ub(n.doc,{});t.anchors=/* @__PURE__ */ new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Jb(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function rx(e,t,n){return new ix(xb(e,void 0,n),xb(t,void 0,n))}var ix=class e{constructor(e,t=null){Object.defineProperty(this,zy,{value:Iy}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return qy(n)&&(n=n.clone(t)),qy(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return tx(t,t?.mapAsMap?/* @__PURE__ */ new Map:{},this)}toString(e,t,n){return e?.doc?qb(this,e,t,n):JSON.stringify(this)}};function ax(e,t,n){return(t.inFlow??e.flow?sx:ox)(e,t,n)}function ox({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(qy(i))!d&&i.spaceBefore&&f.push(``),cx(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(Uy(i)){let e=qy(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),cx(n,f,e.commentBefore,d))}d=!1;let s=Kb(i,u,()=>o=null,()=>d=!0);o&&(s+=Db(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`
|
|
1232
|
+
${c}${t}`:`
|
|
1233
|
+
`}}return e?(p+=`
|
|
1234
|
+
`+Eb(l(e),c),s&&s()):d&&o&&o(),p}function sx({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(qy(i))i.spaceBefore&&d.push(``),cx(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(Uy(i)){let e=qy(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),cx(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=qy(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=Kb(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
1235
|
+
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Db(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`
|
|
1236
|
+
${a}${i}${t}`:`
|
|
1237
|
+
`;return`${e}
|
|
1238
|
+
${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function cx({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=Eb(t(r),e);n.push(i.trimStart())}}function lx(e,t){let n=Wy(t)?t.value:t;for(let r of e)if(Uy(r)&&(r.key===t||r.key===n||Wy(r.key)&&r.key.value===n))return r}var ux=class extends wb{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Fy,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(rx(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=Uy(e)?e:!e||typeof e!=`object`||!(`key`in e)?new ix(e,e?.value):new ix(e.key,e.value);let r=lx(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);Wy(r.value)&&_b(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=lx(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=lx(this.items,e)?.value;return(!t&&Wy(n)?n.value:n)??void 0}has(e){return!!lx(this.items,e)}set(e,t){this.add(new ix(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?/* @__PURE__ */ new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)tx(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Uy(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ax(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},dx={collection:`map`,default:!0,nodeClass:ux,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Hy(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>ux.from(e,t,n)},fx=class extends wb{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Ry,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=px(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=px(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&Wy(r)?r.value:r}has(e){let t=px(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=px(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Wy(r)&&_b(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(pb(e,String(r++),t));return n}toString(e,t,n){return e?ax(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(xb(a,void 0,n))}}return i}};function px(e){let t=Wy(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var mx={collection:`seq`,default:!0,nodeClass:fx,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return Gy(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>fx.from(e,t,n)},hx={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),Hb(e,t,n,r)}},gx={identify:e=>e==null,createNode:()=>new vb(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new vb(null),stringify:({source:e},t)=>typeof e==`string`&&gx.test.test(e)?e:t.options.nullStr},_x={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new vb(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&_x.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function vx({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var yx={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:vx},bx={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():vx(e)}},xx={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 vb(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:vx},Sx=e=>typeof e==`bigint`||Number.isInteger(e),Cx=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function wx(e,t,n){let{value:r}=e;return Sx(r)&&r>=0?n+r.toString(t):vx(e)}var Tx={identify:e=>Sx(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>Cx(e,2,8,n),stringify:e=>wx(e,8,`0o`)},Ex={identify:Sx,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Cx(e,0,10,n),stringify:vx},Dx={identify:e=>Sx(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Cx(e,2,16,n),stringify:e=>wx(e,16,`0x`)},Ox=[dx,mx,hx,gx,_x,Tx,Ex,Dx,yx,bx,xx];function kx(e){return typeof e==`bigint`||Number.isInteger(e)}var Ax=({value:e})=>JSON.stringify(e),jx=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Ax},{identify:e=>e==null,createNode:()=>new vb(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Ax},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Ax},{identify:kx,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>kx(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:Ax}],Mx=[dx,mx].concat(jx,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),Nx={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=vb.BLOCK_LITERAL,t!==vb.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===vb.BLOCK_LITERAL?`
|
|
1239
|
+
`:` `)}return Hb({comment:e,type:t,value:s},r,i,a)}};function Px(e,t){if(Gy(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Uy(r)){if(Hy(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new ix(new vb(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}
|
|
1240
|
+
${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}
|
|
1241
|
+
${t.comment}`:r.comment}r=e}e.items[n]=Uy(r)?r:new ix(r)}}else t(`Expected a sequence for this tag`);return e}function Fx(e,t,n){let{replacer:r}=n,i=new fx(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(rx(o,s,n))}return i}var Ix={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Px,createNode:Fx},Lx=class e extends fx{constructor(){super(),this.add=ux.prototype.add.bind(this),this.delete=ux.prototype.delete.bind(this),this.get=ux.prototype.get.bind(this),this.has=ux.prototype.has.bind(this),this.set=ux.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=/* @__PURE__ */ new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(Uy(e)?(r=pb(e.key,``,t),i=pb(e.value,r,t)):r=pb(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=Fx(e,t,n),i=new this;return i.items=r.items,i}};Lx.tag=`tag:yaml.org,2002:omap`;var Rx={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Lx,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Px(e,t),r=[];for(let{key:e}of n.items)Wy(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Lx,n)},createNode:(e,t,n)=>Lx.from(e,t,n)};function zx({value:e,source:t},n){return t&&(e?Bx:Vx).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Bx={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 vb(!0),stringify:zx},Vx={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 vb(!1),stringify:zx},Hx={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:vx},Ux={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():vx(e)}},Wx={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 vb(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:vx},Gx=e=>typeof e==`bigint`||Number.isInteger(e);function Kx(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function qx(e,t,n){let{value:r}=e;if(Gx(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return vx(e)}var Jx={identify:Gx,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Kx(e,2,2,n),stringify:e=>qx(e,2,`0b`)},Yx={identify:Gx,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Kx(e,1,8,n),stringify:e=>qx(e,8,`0`)},Xx={identify:Gx,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Kx(e,0,10,n),stringify:vx},Zx={identify:Gx,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Kx(e,2,16,n),stringify:e=>qx(e,16,`0x`)},Qx=class e extends ux{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Uy(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new ix(e.key,null):new ix(e,null),lx(this.items,t.key)||this.items.push(t)}get(e,t){let n=lx(this.items,e);return!t&&Uy(n)?Wy(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=lx(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new ix(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(rx(e,null,n));return i}};Qx.tag=`tag:yaml.org,2002:set`;var $x={collection:`map`,identify:e=>e instanceof Set,nodeClass:Qx,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>Qx.from(e,t,n),resolve(e,t){if(Hy(e)){if(e.hasAllNullValues(!0))return Object.assign(new Qx,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function eS(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function tS(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return vx(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var nS={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:n})=>eS(e,n),stringify:tS},rS={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=>eS(e,!1),stringify:tS},iS={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(iS.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=eS(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},aS=[dx,mx,hx,gx,Bx,Vx,Jx,Yx,Xx,Zx,Hx,Ux,Wx,Nx,Xb,Rx,Ix,$x,nS,rS,iS],oS=/* @__PURE__ */ new Map([[`core`,Ox],[`failsafe`,[dx,mx,hx]],[`json`,Mx],[`yaml11`,aS],[`yaml-1.1`,aS]]),sS={binary:Nx,bool:_x,float:xx,floatExp:bx,floatNaN:yx,floatTime:rS,int:Ex,intHex:Dx,intOct:Tx,intTime:nS,map:dx,merge:Xb,null:gx,omap:Rx,pairs:Ix,seq:mx,set:$x,timestamp:iS},cS={"tag:yaml.org,2002:binary":Nx,"tag:yaml.org,2002:merge":Xb,"tag:yaml.org,2002:omap":Rx,"tag:yaml.org,2002:pairs":Ix,"tag:yaml.org,2002:set":$x,"tag:yaml.org,2002:timestamp":iS};function lS(e,t,n){let r=oS.get(t);if(r&&!e)return n&&!r.includes(Xb)?r.concat(Xb):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(oS.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(Xb)),i.reduce((e,t)=>{let n=typeof t==`string`?sS[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(sS).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var uS=(e,t)=>e.key<t.key?-1:+(e.key>t.key),dS=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?lS(e,`compat`):e?lS(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?cS:{},this.tags=lS(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Fy,{value:dx}),Object.defineProperty(this,Ly,{value:hx}),Object.defineProperty(this,Ry,{value:mx}),this.sortMapEntries=typeof a==`function`?a:a===!0?uS:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function fS(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=Ub(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(Eb(t,``))}let o=!1,s=null;if(e.contents){if(qy(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(Eb(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=Kb(e.contents,i,()=>s=null,t);s&&(c+=Db(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Kb(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
|
|
1242
|
+
`)?(n.push(`...`),n.push(Eb(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(Eb(a(t),``)))}return n.join(`
|
|
1243
|
+
`)+`
|
|
1244
|
+
`}var pS=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,zy,{value:Py});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new sb({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[zy]:{value:Py}});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=qy(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){mS(this.contents)&&this.contents.add(e)}addIn(e,t){mS(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=lb(this);e.anchor=!t||n.has(t)?ub(t||`a`,n):t}return new hb(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=db(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=xb(e,l,p);return o&&Ky(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new ix(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return mS(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Cb(e)?this.contents!=null&&(this.contents=null,!0):mS(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ky(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Cb(e)?!t&&Wy(this.contents)?this.contents.value:this.contents:Ky(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ky(this.contents)?this.contents.has(e):!1}hasIn(e){return Cb(e)?this.contents!==void 0:Ky(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Sb(this.schema,[e],t):mS(this.contents)&&this.contents.set(e,t)}setIn(e,t){Cb(e)?this.contents=t:this.contents==null?this.contents=Sb(this.schema,Array.from(e),t):mS(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new sb({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new sb({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new dS(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:/* @__PURE__ */ new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=pb(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?fb(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return fS(this,e)}};function mS(e){if(Ky(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var hS=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},gS=class extends hS{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},_S=class extends hS{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},vS=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
|
1245
|
+
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:
|
|
1246
|
+
|
|
1247
|
+
${o}
|
|
1248
|
+
${s}
|
|
1249
|
+
`}};function yS(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function bS(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
|
1250
|
+
`))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 e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(bS(t.key)||bS(t.value))return!0}return!1;default:return!0}}function xS(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&bS(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function SS(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||Wy(e)&&Wy(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var CS=`All mapping items must start at the same column`;function wS({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??ux)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=yS(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,CS)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
|
|
1251
|
+
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||bS(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,CS);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&xS(r.indent,u,i),n.atKey=!1,SS(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=yS(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&xS(r.indent,f,i),s=c.range[2];let l=new ix(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
|
|
1252
|
+
`+_.comment:g.comment=_.comment);let e=new ix(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function TS({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??fx)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=yS(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&xS(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function ES(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var DS=`Block collections are not allowed within flow collections`,OS=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function kS({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?ux:fx))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=yS(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
|
|
1253
|
+
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&bS(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;e:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break e;default:break e}if(e){let t=c.items[c.items.length-1];Uy(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
|
1254
|
+
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],OS(m)&&i(r.range,`BLOCK_IN_FLOW`,DS)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);OS(f)&&i(g.range,`BLOCK_IN_FLOW`,DS),n.atKey=!1;let _=yS(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?OS(m)&&i(v.range,`BLOCK_IN_FLOW`,DS):_.comment&&(g.comment?g.comment+=`
|
|
1255
|
+
`+_.comment:g.comment=_.comment);let y=new ix(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;SS(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new ux(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=ES(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
|
1256
|
+
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function AS(e,t,n,r,i,a){let o=n.type===`block-map`?wS(e,t,n,r,a):n.type===`block-seq`?TS(e,t,n,r,a):kS(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function jS(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===ux.tagName&&s===`map`||o===fx.tagName&&s===`seq`)return AS(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),AS(e,t,n,i,o)}let l=AS(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=qy(u)?u:new vb(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function MS(e,t,n){let r=t.offset,i=NS(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?vb.BLOCK_FOLDED:vb.BLOCK_LITERAL,o=t.source?PS(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
|
1257
|
+
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
|
1258
|
+
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===vb.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
|
1259
|
+
`):t.length>c||r[0]===` `?(f===` `?f=`
|
|
1260
|
+
`:!p&&f===`
|
|
1261
|
+
`&&(f=`
|
|
1262
|
+
|
|
1263
|
+
`),d+=f+t.slice(c)+r,f=`
|
|
1264
|
+
`,p=!0):r===``?f===`
|
|
1265
|
+
`?d+=`
|
|
1266
|
+
`:f=`
|
|
1267
|
+
`:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
|
|
1268
|
+
`+o[e][0].slice(c);d[d.length-1]!==`
|
|
1269
|
+
`&&(d+=`
|
|
1270
|
+
`);break;default:d+=`
|
|
1271
|
+
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function NS({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function PS(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function FS(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=vb.PLAIN,c=IS(a,l);break;case`single-quoted-scalar`:s=vb.QUOTE_SINGLE,c=LS(a,l);break;case`double-quoted-scalar`:s=vb.QUOTE_DOUBLE,c=zS(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=ES(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function IS(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),RS(e)}function LS(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),RS(e.slice(1,-1)).replace(/''/g,`'`)}function RS(e){let t,n;try{t=/* @__PURE__ */ RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
1272
|
+
`,`sy`),n=/* @__PURE__ */ RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
1273
|
+
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
|
|
1274
|
+
`?i+=a:a=`
|
|
1275
|
+
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function zS(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
|
|
1276
|
+
`){if(i===`
|
|
1277
|
+
`){let{fold:t,offset:i}=BS(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=VS[i];if(a)n+=a;else if(i===`
|
|
1278
|
+
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
|
1279
|
+
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=HS(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
|
1280
|
+
`&&(a!==`\r`||e[r+2]!==`
|
|
1281
|
+
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function BS(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
|
1282
|
+
`||r===`\r`)&&(r!==`\r`||e[t+2]===`
|
|
1283
|
+
`);)r===`
|
|
1284
|
+
`&&(n+=`
|
|
1285
|
+
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var VS={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
|
1286
|
+
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function HS(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function US(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?MS(e,t,r):FS(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[Ly]:c?WS(e.schema,i,c,n,r):t.type===`scalar`?GS(e,i,t,r):e.schema[Ly];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=Wy(a)?a:new vb(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new vb(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function WS(e,t,n,r,i){if(n===`!`)return e[Ly];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)a.push(t);else return t}for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[Ly])}function GS({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[Ly];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Ly];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function KS(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var qS={composeNode:JS,composeEmptyNode:YS};function JS(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=XS(e,t,r),(s||c)&&r(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`:l=US(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=jS(qS,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=YS(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!Wy(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function YS(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=US(e,{type:`scalar`,offset:KS(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function XS({options:e},{offset:t,source:n,end:r},i){let a=new hb(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=ES(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function ZS(e,t,{offset:n,start:r,value:i,end:a},o){let s=new pS(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=yS(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?JS(c,i,l,o):YS(c,l.end,r,null,l,o);let u=s.contents.range[2],d=ES(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function QS(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:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function $S(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
|
|
1287
|
+
|
|
1288
|
+
`:`
|
|
1289
|
+
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var eC=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=QS(e);r?this.warnings.push(new _S(i,t,n)):this.errors.push(new gS(i,t,n))},this.directives=new sb({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=$S(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
1290
|
+
${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(Ky(i)&&!i.flow&&i.items.length>0){let e=i.items[0];Uy(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}
|
|
1291
|
+
${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}
|
|
1292
|
+
${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:$S(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=QS(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=ZS(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,n=new gS(QS(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new gS(QS(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=ES(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
|
|
1293
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new gS(QS(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 e=new pS(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},tC={};Tg(tC,{BOM:()=>gC,DOCUMENT:()=>_C,FLOW_END:()=>vC,SCALAR:()=>yC,createScalarToken:()=>rC,isCollection:()=>bC,isScalar:()=>xC,prettyToken:()=>SC,resolveAsScalar:()=>nC,setScalarValue:()=>iC,stringify:()=>cC,tokenType:()=>CC,visit:()=>mC});function nC(e,t=!0,n){if(e){let r=(e,t,r)=>{let i=typeof e==`number`?e:Array.isArray(e)?e[0]:e.offset;if(n)n(i,t,r);else throw new gS([i,i+1],t,r)};switch(e.type){case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return FS(e,t,r);case`block-scalar`:return MS({options:{strict:t}},e,r)}}return null}function rC(e,t){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:a=-1,type:o=`PLAIN`}=t,s=Hb({type:o,value:e},{implicitKey:n,indent:r>0?` `.repeat(r):``,inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=t.end??[{type:`newline`,offset:-1,indent:r,source:`
|
|
1294
|
+
`}];switch(s[0]){case`|`:case`>`:{let e=s.indexOf(`
|
|
1295
|
+
`),t=s.substring(0,e),n=s.substring(e+1)+`
|
|
1296
|
+
`,i=[{type:`block-scalar-header`,offset:a,indent:r,source:t}];return oC(i,c)||i.push({type:`newline`,offset:-1,indent:r,source:`
|
|
1297
|
+
`}),{type:`block-scalar`,offset:a,indent:r,props:i,source:n}}case`"`:return{type:`double-quoted-scalar`,offset:a,indent:r,source:s,end:c};case`'`:return{type:`single-quoted-scalar`,offset:a,indent:r,source:s,end:c};default:return{type:`scalar`,offset:a,indent:r,source:s,end:c}}}function iC(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:a=!1,type:o}=n,s=`indent`in e?e.indent:null;if(r&&typeof s==`number`&&(s+=2),!o)switch(e.type){case`single-quoted-scalar`:o=`QUOTE_SINGLE`;break;case`double-quoted-scalar`:o=`QUOTE_DOUBLE`;break;case`block-scalar`:{let t=e.props[0];if(t.type!==`block-scalar-header`)throw Error(`Invalid block scalar header`);o=t.source[0]===`>`?`BLOCK_FOLDED`:`BLOCK_LITERAL`;break}default:o=`PLAIN`}let c=Hb({type:o,value:t},{implicitKey:i||s===null,indent:s!==null&&s>0?` `.repeat(s):``,inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case`|`:case`>`:aC(e,c);break;case`"`:sC(e,c,`double-quoted-scalar`);break;case`'`:sC(e,c,`single-quoted-scalar`);break;default:sC(e,c,`scalar`)}}function aC(e,t){let n=t.indexOf(`
|
|
1298
|
+
`),r=t.substring(0,n),i=t.substring(n+1)+`
|
|
1299
|
+
`;if(e.type===`block-scalar`){let t=e.props[0];if(t.type!==`block-scalar-header`)throw Error(`Invalid block scalar header`);t.source=r,e.source=i}else{let{offset:t}=e,n=`indent`in e?e.indent:-1,a=[{type:`block-scalar-header`,offset:t,indent:n,source:r}];oC(a,`end`in e?e.end:void 0)||a.push({type:`newline`,offset:-1,indent:n,source:`
|
|
1300
|
+
`});for(let t of Object.keys(e))t!==`type`&&t!==`offset`&&delete e[t];Object.assign(e,{type:`block-scalar`,indent:n,props:a,source:i})}}function oC(e,t){if(t)for(let n of t)switch(n.type){case`space`:case`comment`:e.push(n);break;case`newline`:return e.push(n),!0}return!1}function sC(e,t,n){switch(e.type){case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:e.type=n,e.source=t;break;case`block-scalar`:{let r=e.props.slice(1),i=t.length;e.props[0].type===`block-scalar-header`&&(i-=e.props[0].source.length);for(let e of r)e.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case`block-map`:case`block-seq`:{let r={type:`newline`,offset:e.offset+t.length,indent:e.indent,source:`
|
|
1301
|
+
`};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let r=`indent`in e?e.indent:-1,i=`end`in e&&Array.isArray(e.end)?e.end.filter(e=>e.type===`space`||e.type===`comment`||e.type===`newline`):[];for(let t of Object.keys(e))t!==`type`&&t!==`offset`&&delete e[t];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}var cC=e=>`type`in e?lC(e):uC(e);function lC(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=lC(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=uC(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=uC(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=uC(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if(`end`in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function uC({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=lC(t)),n)for(let e of n)i+=e.source;return r&&(i+=lC(r)),i}var dC=Symbol(`break visit`),fC=Symbol(`skip children`),pC=Symbol(`remove item`);function mC(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),hC(Object.freeze([]),e,t)}mC.BREAK=dC,mC.SKIP=fC,mC.REMOVE=pC,mC.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},mC.parentCollection=(e,t)=>{let n=mC.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function hC(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=hC(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else{if(r===dC)return dC;r===pC&&(a.items.splice(t,1),--t)}}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}var gC=``,_C=``,vC=``,yC=``,bC=e=>!!e&&`items`in e,xC=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function SC(e){switch(e){case gC:return`<BOM>`;case _C:return`<DOC>`;case vC:return`<FLOW_END>`;case yC:return`<SCALAR>`;default:return JSON.stringify(e)}}function CC(e){switch(e){case gC:return`byte-order-mark`;case _C:return`doc-mode`;case vC:return`flow-error-end`;case yC:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
|
1302
|
+
`:case`\r
|
|
1303
|
+
`: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 wC(e){switch(e){case void 0:case` `:case`
|
|
1304
|
+
`:case`\r`:case` `:return!0;default:return!1}}var TC=/* @__PURE__ */ new Set(`0123456789ABCDEFabcdef`),EC=/* @__PURE__ */ new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),DC=/* @__PURE__ */ new Set(`,[]{}`),OC=/* @__PURE__ */ new Set(` ,[]{}
|
|
1305
|
+
\r `),kC=e=>!e||OC.has(e),AC=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 n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
|
1306
|
+
`||t===`\r`&&this.buffer[e+1]===`
|
|
1307
|
+
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
|
1308
|
+
`||!t&&!this.atEnd)return e+n+1}return t===`
|
|
1309
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&wC(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(`
|
|
1310
|
+
`,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]===gC&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),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 _C,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 e=this.peek(3);if((e===`---`||e===`...`)&&wC(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!wC(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===`:`)&&wC(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`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(kC),`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,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&wC(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield vC,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`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(kC),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||wC(e)||e===`,`)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 e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
1311
|
+
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
|
1312
|
+
`,e)}r!==-1&&(t=r-(n[r-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(e=>wC(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
|
1313
|
+
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
|
1314
|
+
`)break}default:break e}if(!n&&!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 t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
|
1315
|
+
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
|
1316
|
+
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
|
1317
|
+
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield yC,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(wC(r)||e&&DC.has(r))break;t=n}else if(wC(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
|
1318
|
+
`?(n+=1,r=`
|
|
1319
|
+
`,i=this.buffer[n+1]):t=n),i===`#`||e&&DC.has(i))break;if(r===`
|
|
1320
|
+
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&DC.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield yC,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 n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.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(kC),e+=yield*this.pushSpaces(!0);continue e;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(wC(n)||t&&DC.has(n)){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(;!wC(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(EC.has(t))t=this.buffer[++e];else if(t===`%`&&TC.has(this.buffer[e+1])&&TC.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===`
|
|
1321
|
+
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
|
1322
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},jC=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function MC(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function NC(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 PC(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 FC(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 IC(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 LC(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function RC(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!MC(t.start,`explicit-key-ind`)&&!MC(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,PC(t.value)?t.value.end?LC(t.value.end,t.sep):t.value.end=t.sep:LC(t.start,t.sep),delete t.sep)}var zC=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 AC,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);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=CC(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 t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,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});return}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 e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&RC(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&NC(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.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`:NC(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=IC(FC(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}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 e=this.source.indexOf(`
|
|
1323
|
+
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1324
|
+
`,e)+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 n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.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 n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){LC(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),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):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,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(MC(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(PC(t.key)&&!MC(t.sep,`newline`)){let e=IC(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else if(MC(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=IC(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):MC(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 n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!MC(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 n&&e.items.push({start:i});this.stack.push(r);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 n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.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 n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){LC(n,t.start),n.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||MC(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.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 n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=IC(FC(t));RC(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
|
1325
|
+
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1326
|
+
`,e)+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=IC(FC(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=IC(FC(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(e=>e.type===`newline`||e.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 BC(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new jC||null,prettyErrors:t}}function VC(e,t={}){let{lineCounter:n,prettyErrors:r}=BC(t),i=new zC(n?.addNewLine),a=new eC(t),o=Array.from(a.compose(i.parse(e)));if(r&&n)for(let t of o)t.errors.forEach(vS(e,n)),t.warnings.forEach(vS(e,n));return o.length>0?o:Object.assign([],{empty:!0},a.streamInfo())}function HC(e,t={}){let{lineCounter:n,prettyErrors:r}=BC(t),i=new zC(n?.addNewLine),a=new eC(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new gS(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(vS(e,n)),o.warnings.forEach(vS(e,n))),o}function UC(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=HC(e,n);if(!i)return null;if(i.warnings.forEach(e=>Jb(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function WC(e,t,n){let r=null;if(typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==`string`&&(n=n.length),typeof n==`number`){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return Vy(e)&&!r?e.toString(n):new pS(e,r,n).toString(n)}var GC=My;function KC(e,t,n){let r=e.srcToken;if(!r||r.type!==`flow-collection`)throw Error(`Expected flow-collection CST node for flow sequence`);let i=e.items.map((e,n)=>{let i=r.items[n];if(qC(e,i))return Ey(jy(e.items),i,t,Cy);if(Uy(e))return Ey(e,i,t,Cy);{let n=[];for(let e of ly(i.start)){if(dy(e)){n.push(e);continue}if(e.type!==`comma`)throw Error(`Unexpected token type in sequence item start: ${e.type}`)}let r=t.transformNode(e,{tokens:n});return Ay(ty(r.position.start,r.position.end),r)}});if(e.items.length<r.items.length)for(let n=e.items.length;n<r.items.length;n++){let e=r.items[n];for(let n of fy(e.start,t))if(n.type!==`comma`)throw Error(`Unexpected token type in collection item start: ${n.type}`)}let a=null;for(let e of ly(r.end)){if(e.type===`comment`){t.transformComment(e);continue}if(e.type===`flow-seq-end`){a=e;continue}throw Error(`Unexpected token type in flow seq end: ${e.type}`)}if(!a)throw Error(`Expected flow-seq-end token`);return ky(t.transformRange([r.start.offset,a.offset+a.source.length]),t.transformContentProperties(e,n.tokens),i)}function qC(e,t){return e.srcToken||!Hy(e)?!1:e.items.length===1&&e.items[0].srcToken===t}function JC(e,t,n){return{type:`mapping`,position:e,leadingComments:[],...t,children:n}}function YC(e,t,n){return{type:`mappingItem`,position:e,leadingComments:[],children:[t,n]}}function XC(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-map`)throw Error(`Expected block mapping srcToken`);let i=e.items.map((e,n)=>{let i=r.items[n];return Ey(e,i,t,YC)});if(e.items.length<r.items.length)for(let n=e.items.length;n<r.items.length;n++){let e=r.items[n];for(let n of fy(e.start,t))throw Error(`Unexpected token type in collection item start: ${n.type}`)}return JC(ty(i[0].position.start,jy(i).position.end),t.transformContentProperties(e,n.tokens),i)}function ZC(e,t,n){return{type:`plain`,position:e,leadingComments:[],trailingComment:null,...t,value:n}}function QC(e,t,n){for(let r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}function $C(e,t,n){if(e.range[0]===e.range[1]){let r=QC(t.text,e.range[0]-1,/\S/u)+1;return ZC(t.transformRange([r,r]),t.transformContentProperties(e,n.tokens),``)}let r=e.srcToken;if(!r||r.type!==`scalar`)throw Error(`Expected plain scalar srcToken`);for(let e of fy(r.end,t))throw Error(`Unexpected token type in plain scalar end: ${e.type}`);return ZC(t.transformRange(e.range),t.transformContentProperties(e,n.tokens),e.source)}function ew(e){return{...e,type:`quoteDouble`}}function tw(e,t,n){return{type:`quoteValue`,position:e,...t,leadingComments:[],trailingComment:null,value:n}}function nw(e,t,n,r){for(let e of fy(t.end,n))throw Error(`Unexpected token type in quote value end: ${e.type}`);return tw(n.transformRange(e.range),n.transformContentProperties(e,r.tokens),e.source)}function rw(e,t,n){let r=e.srcToken;if(!r||r.type!==`double-quoted-scalar`)throw Error(`Expected double-quoted scalar srcToken`);return ew(nw(e,r,t,n))}function iw(e){return{...e,type:`quoteSingle`}}function aw(e,t,n){let r=e.srcToken;if(!r||r.type!==`single-quoted-scalar`)throw Error(`Expected single-quoted scalar srcToken`);return iw(nw(e,r,t,n))}function ow(e,t,n){return{type:`sequence`,position:e,leadingComments:[],endComments:[],...t,children:n}}function sw(e,t){return{type:`sequenceItem`,position:e,leadingComments:[],trailingComment:null,endComments:[],children:t?[t]:[]}}function cw(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-seq`)throw Error(`Expected block sequence srcToken`);let i=e.items.map((e,n)=>{let i=r.items[n],a=[],o=null;for(let e of ly(i.start)){if(dy(e)){a.push(e);continue}if(e.type===`seq-item-ind`){o=e;continue}throw Error(`Unexpected token type in sequence item start: ${e.type}`)}let s=lw(e,t,{tokens:a});return sw(ty(o?t.transformOffset(o.offset):s.position.start,s?.position.end??t.transformOffset(o.offset+o.source.length)),s)});if(e.items.length<r.items.length)for(let n=e.items.length;n<r.items.length;n++){let e=r.items[n];for(let n of fy(e.start,t))throw Error(`Unexpected token type in collection item start: ${n.type}`)}return ow(ty(i[0].position.start,jy(i).position.end),t.transformContentProperties(e,n.tokens),i)}function lw(e,t,n){if(!Uy(e))return dw(e,n)?(fy(n.tokens,t),null):t.transformNode(e,n);let r=e.srcToken,i=Ey(e,r,t,YC);return JC(i.position,t.transformContentProperties(e.key,n.tokens),[i])}function uw(e,t,n){if(e==null)return null;if(By(e))return py(e,t,n);if(Hy(e))return e.flow?Oy(e,t,n):XC(e,t,n);if(Gy(e))return e.flow?KC(e,t,n):cw(e,t,n);if(Wy(e)){switch(e.type){case`BLOCK_FOLDED`:return vy(e,t,n);case`BLOCK_LITERAL`:return by(e,t,n);case`PLAIN`:return $C(e,t,n);case`QUOTE_DOUBLE`:return rw(e,t,n);case`QUOTE_SINGLE`:return aw(e,t,n)}throw Error(`Unexpected scalar type: ${e.type}`)}throw Error(`Unexpected unknown node type`)}function dw(e,t){return!e||e.range[0]===e.range[1]&&t.tokens.every(e=>e.type===`comment`)}var fw=class{text;comments=[];#e;constructor(e,t){this.text=e,this.#e=t}transformOffset(e){let{line:t,col:n}=this.#e.linePos(e);return{line:t,column:n,offset:e}}transformRange(e){let[t,n]=e.map(e=>this.transformOffset(e));return ty(t,n)}transformNode(e,t){return uw(e,this,t)}transformComment(e){let t=ry(e,this);return this.comments.push(t),t}transformContentProperties(e,t){return sy(e,t,this)}};function pw(e,t,n,r,i,a){return{type:`document`,position:e,trailingComment:a,directivesEndMarker:t,documentEndMarker:n,children:[r,i]}}function mw(e,t,n){return{type:`documentBody`,position:e,endComments:n,children:t?[t]:[]}}function hw(e,t,n){for(let r=t;r<e.length;r++)if(n.test(e[r]))return r;return null}function gw(e,t,n,r,i,a,o){let{documentTrailingComment:s,endComments:c,propTokens:l}=_w(t,n,i,a,o),u=r.contents&&(r.contents.range[0]<r.contents.range[1]||l.some(e=>e.type===`tag`||e.type===`anchor`)),d=u?o.transformNode(r.contents,{tokens:l}):null;if(!u)for(let e of fy(l,o))throw Error(`Unexpected token type in empty document body: ${e.type}`);let{position:f,documentEndPoint:p}=vw(e,r,d,a,o);return{documentBody:mw(f,d,c),documentEndPoint:p,documentTrailingComment:s}}function _w(e,t,n,r,i){let a=[],o=[],s=[];for(let t of e){if(dy(t)){s.push(t);continue}throw Error(`Unexpected token type: ${t.type}`)}for(let e of fy(n,i))throw Error(`Unexpected token type: ${e.type}`);let c=r?i.transformOffset(r.offset):null;if(t)for(let e of ly(t.end,r?.end)){if(e.type===`comment`){let t=i.transformComment(e);c?c.line===t.position.start.line?o.push(t):t.position.start.line<c.line&&a.push(t):a.push(t);continue}throw Error(`Unexpected token type: ${e.type}`)}if(o.length>1)throw Error(`Unexpected multiple document trailing comments at ${qv(o[1].position.start)}`);return{propTokens:s,endComments:a,documentTrailingComment:jy(o)||null}}function vw(e,t,n,r,i){let a=r?Math.max(0,r.offset-1):hw(i.text,t.range[2],/\S/u)??i.text.length;i.text[a-1]===`\r`&&a--;let o=n===null?a:n.position.start.offset;if(e){let t=e.offset+e.source.length+1;o<t&&t<=a&&(o=t)}let s=i.transformRange([o,a]);return{position:s,documentEndPoint:r?i.transformOffset(r.offset+r.source.length):s.end}}function yw(e,t,n,r){return{type:`documentHead`,position:e,endComments:n,trailingComment:r,children:t}}function bw(e,t,n){return{type:`directive`,position:e,leadingComments:[],trailingComment:null,name:t,parameters:n}}function xw(e,t){let n=e.source.trim().split(/[\t ]+/),r=n.shift().replace(/^%/,``);return bw(t.transformRange([e.offset,e.offset+e.source.length]),r,n)}function Sw(e,t,n,r){let{directives:i,endCommentCandidates:a}=Cw(e,r),o=[],s=null;if(t){for(let e of ly(t.start))if(o.push(e),!s&&e.type===`doc-start`){for(let e of o)if(e.type===`comment`){let t=r.transformComment(e);a.push(t)}o=[],s=e}}let c=ww(i,n,s,r),l=null;if(s&&o.length>0){let e=o[0];e.type===`comment`&&r.transformOffset(e.offset).line===c.end.line&&(l=r.transformComment(e),o.shift())}return{documentHead:yw(c,i,s?a:[],l),docStart:s,tokensBeforeBody:o}}function Cw(e,t){let n=[],r=[],i=null;for(let a of e)if(a.type===`comment`){let e=t.transformComment(a);i&&i.position.end.line===e.position.start.line&&!i.trailingComment?(i.trailingComment=e,i.position.end=e.position.end):r.push(e)}else{let e=xw(a,t);n.push(e),i=e,r=[]}return{directives:n,endCommentCandidates:r}}function ww(e,t,n,r){let i=n?[n.offset,n.offset+n.source.length]:t.contents?[t.contents.range[0],t.contents.range[0]]:[t.range[0],t.range[0]];return e.length!==0&&(i[0]=e[0].position.start.offset),r.transformRange(i)}function Tw(e,t){let{documentHead:n,tokensBeforeBody:r,docStart:i}=Sw(e.tokensBeforeBody,e.cstNode,e.node,t),{documentBody:a,documentEndPoint:o,documentTrailingComment:s}=gw(i,r,e.cstNode,e.node,e.tokensAfterBody,e.documentEnd,t);return pw(ty(n.position.start,o),!!i,!!e.documentEnd,n,a,s)}function Ew(e,t,n){if(e.length===0)return[];let r=[],i=[],a=[],o=null,s=t=>{let n={tokensBeforeBody:[...a,...i],cstNode:t,node:e[r.length],tokensAfterBody:[],documentEnd:null};return r.push(n),a.length=0,i.length=0,n};for(let c of ly(t)){if(c.type===`document`){if(r.length>=e.length)throw Error(`Unexpected 'document' token at ${qv(n.transformOffset(c.offset))}`);o=s(c);continue}if(c.type===`comment`){i.push(c);continue}if(c.type===`directive`){a.push(...i,c),i.length=0;continue}if(c.type===`doc-end`){if(!o||o.documentEnd)throw Error(`Unexpected 'doc-end' token at ${qv(n.transformOffset(c.offset))}`);o.tokensAfterBody=[...i],i.length=0,o.documentEnd=c;continue}}if(a.length>0){let[e]=a;throw Error(`Unexpected '${e.type}' token at ${qv(n.transformOffset(e.offset))}`)}return i.length>0&&(o||=s(null),i.length>0&&(o.tokensAfterBody.push(...i),i.length=0)),r.map(e=>Tw(e,n))}function Dw(e,t,n,r){let i=t(e);return t=>{r(i,t)&&n(e,i=t)}}function Ow(e){if(e===null||!(`children`in e))return;let t=e.children;if(t.forEach(Ow),e.type===`document`){let[t,n]=e.children;t.position.start.offset===t.position.end.offset?t.position.start=t.position.end=n.position.start:n.position.start.offset===n.position.end.offset&&(n.position.start=n.position.end=t.position.end)}let n=Dw(e.position,kw,Aw,Nw),r=Dw(e.position,jw,Mw,Pw);`endComments`in e&&e.endComments.length!==0&&(n(e.endComments[0].position.start),r(jy(e.endComments).position.end));let i=t.filter(e=>e!==null);if(i.length!==0){let e=i[0],t=jy(i);n(e.position.start),r(t.position.end),`leadingComments`in e&&e.leadingComments.length!==0&&n(e.leadingComments[0].position.start),`tag`in e&&e.tag&&n(e.tag.position.start),`anchor`in e&&e.anchor&&n(e.anchor.position.start),`trailingComment`in t&&t.trailingComment&&r(t.trailingComment.position.end)}}function kw(e){return e.start}function Aw(e,t){e.start=t}function jw(e){return e.end}function Mw(e,t){e.end=t}function Nw(e,t){return t.offset<e.offset}function Pw(e,t){return t.offset>e.offset}function Fw(e,t){let n=new jC,r=new fw(e,n),i=new zC(n.addNewLine),a=new eC({keepSourceTokens:!0,uniqueKeys:t?.uniqueKeys,lineCounter:n,merge:!0}),o=[],s=[...i.parse(e)];for(let t of a.compose(s,!0,e.length)){let{errors:e}=t;if(e.length>0)throw new Gv(r,e[0]);o.push(t)}let c=Ew(o,s,r),l=r.comments.sort((e,t)=>e.position.start.offset-t.position.end.offset),u=ey(r.transformRange([0,e.length]),c,l);return Jv(u),Ow(u),u}function Iw(e,t){let n=/* @__PURE__ */ SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var Lw=Iw,Rw={uniqueKeys:!1};function zw(e){let t;try{t=Fw(e,Rw)}catch(e){throw e instanceof Gv?Lw(e.message,{loc:e.position,cause:e}):e}return delete t.comments,t}var Bw={astFormat:`yaml`,parse:zw,hasPragma:q_,hasIgnorePragma:J_,locStart:B_,locEnd:V_},Vw={yaml:Bv},Hw=GC.parse,Uw=/* @__PURE__ */ c({default:()=>Kw,languages:()=>Tz,options:()=>Cz,printers:()=>wz}),Ww=Object.defineProperty,Gw=(e,t)=>{for(var n in t)Ww(e,n,{get:t[n],enumerable:!0})},Kw={};Gw(Kw,{languages:()=>Tz,options:()=>Cz,printers:()=>wz});var qw=[{name:`JavaScript`,type:`programming`,aceMode:`javascript`,extensions:/* @__PURE__ */ `.js,._js,.bones,.cjs,.es,.es6,.gs,.jake,.javascript,.jsb,.jscad,.jsfl,.jslib,.jsm,.jspre,.jss,.mjs,.njs,.pac,.sjs,.ssjs,.xsjs,.xsjslib,.start.frag,.end.frag,.wxs`.split(`,`),filenames:[`Jakefile`,`start.frag`,`end.frag`],tmScope:`source.js`,aliases:[`js`,`node`],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`bun`,`chakra`,`d8`,`deno`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`,`zx`],parsers:[`babel`,`acorn`,`espree`,`meriyah`,`babel-flow`,`babel-ts`,`flow`,`typescript`],vscodeLanguageIds:[`javascript`,`mongo`],linguistLanguageId:183},{name:`Flow`,type:`programming`,aceMode:`javascript`,extensions:[`.js.flow`],filenames:[],tmScope:`source.js`,aliases:[],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,interpreters:[`bun`,`chakra`,`d8`,`deno`,`gjs`,`js`,`node`,`nodejs`,`qjs`,`rhino`,`v8`,`v8-shell`],parsers:[`flow`,`babel-flow`],vscodeLanguageIds:[`javascript`],linguistLanguageId:183},{name:`JSX`,type:`programming`,aceMode:`javascript`,extensions:[`.jsx`],filenames:void 0,tmScope:`source.js.jsx`,aliases:void 0,codemirrorMode:`jsx`,codemirrorMimeType:`text/jsx`,interpreters:void 0,parsers:[`babel`,`babel-flow`,`babel-ts`,`flow`,`typescript`,`espree`,`meriyah`],vscodeLanguageIds:[`javascriptreact`],group:`JavaScript`,linguistLanguageId:183},{name:`TypeScript`,type:`programming`,aceMode:`typescript`,extensions:[`.ts`,`.cts`,`.mts`],tmScope:`source.ts`,aliases:[`ts`],codemirrorMode:`javascript`,codemirrorMimeType:`application/typescript`,interpreters:[`bun`,`deno`,`ts-node`,`tsx`],parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescript`],linguistLanguageId:378},{name:`TSX`,type:`programming`,aceMode:`tsx`,extensions:[`.tsx`],tmScope:`source.tsx`,aliases:[`typescriptreact`],codemirrorMode:`jsx`,codemirrorMimeType:`text/typescript-jsx`,group:`TypeScript`,parsers:[`typescript`,`babel-ts`],vscodeLanguageIds:[`typescriptreact`],linguistLanguageId:94901924}],Jw={};Gw(Jw,{estree:()=>dz});function Yw(e){return Array.isArray(e)&&e.length>0}var Xw=Yw,Zw=()=>{};function U(e){let t=new Set(e);return e=>t.has(e?.type)}var Qw=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function $w(e){return this[e<0?this.length+e:e]}var eT=Qw(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return $w});function tT(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function nT(e){let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),t}var rT=/* @__PURE__ */ new WeakMap;function iT(e){return tT(rT,e,nT)}function aT(e,t){let{node:n}=e,r=0,i=()=>t(e,r++);n.this&&e.call(i,`this`),e.each(i,`params`),n.rest&&e.call(i,`rest`)}function oT(e){return e.rest?!0:eT(0,iT(e),-1)?.type===`RestElement`}var sT=e=>e?.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`;function cT({node:e,parent:t}){return e?.type===`EmptyStatement`?t.type===`IfStatement`?t.consequent===e||t.alternate===e:t.type===`DoWhileStatement`||t.type===`ForInStatement`||t.type===`ForOfStatement`||t.type===`ForStatement`||t.type===`LabeledStatement`||t.type===`WithStatement`||t.type===`WhileStatement`?t.body===e:!1:!1}function lT(e){return e.method&&e.kind===`init`||e.kind===`get`||e.kind===`set`}var uT=e=>Number.isSafeInteger(e)&&e>=0;function dT(e){return e.range?.[1]??e.end}function W(e){let t=e.range?.[0]??e.start,n=(e.declaration?.decorators??e.decorators)?.[0];return n?Math.min(W(n),t):t}var fT=5,pT=8,mT=8,hT=e=>t=>t.label?G(t.label):W(t)+e,gT=e=>e.__contentEnd??dT(e),_T=[`ExpressionStatement`,`Directive`,`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`ReturnStatement`,`ThrowStatement`,`DoWhileStatement`],vT=new Map([[`BreakStatement`,hT(fT)],[`ContinueStatement`,hT(pT)],[`DebuggerStatement`,e=>W(e)+mT],[`VariableDeclaration`,e=>G(eT(0,e.declarations,-1))],..._T.map(e=>[e,gT])]),yT=U(_T),bT=e=>{if(yT(e)&&e.__contentEnd)return!0;let{type:t}=e;return t===`BreakStatement`||t===`ContinueStatement`||t===`DebuggerStatement`||t===`VariableDeclaration`?!0:t===`IfStatement`?bT(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?bT(e.body):!1};function G(e){let{type:t}=e;return t===`IfStatement`?G(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?G(e.body):vT.get(t)?.(e)??dT(e)}function xT(e,t){let n=W(e);return uT(n)&&n===W(t)}function ST(e,t){let n=G(e);return uT(n)&&n===G(t)}function CT(e,t){return xT(e,t)&&ST(e,t)}function wT(e){return e.extra?.raw??e.raw}function TT(e){return e.type===`BigIntLiteral`||e.type===`Literal`&&!!e.bigint}function ET(e){return e.type===`BooleanLiteral`||e.type===`Literal`&&typeof e.value==`boolean`}function DT(e){return e.type===`NumericLiteral`||e.type===`Literal`&&typeof e.value==`number`}function OT(e){return e.type===`RegExpLiteral`||e.type===`Literal`&&!!e.regex}function kT(e){return e?.type===`StringLiteral`||e?.type===`Literal`&&typeof e.value==`string`}var AT=U([`TSAsExpression`,`TSSatisfiesExpression`,`AsExpression`,`AsConstExpression`,`SatisfiesExpression`]),jT=U([`SatisfiesExpression`,`TSSatisfiesExpression`]),MT=U([`TSUnionType`,`UnionTypeAnnotation`]),NT=U([`TSIntersectionType`,`IntersectionTypeAnnotation`]),PT=U([`TupleTypeAnnotation`,`TSTupleType`]),FT=U([`TSConditionalType`,`ConditionalTypeAnnotation`]),IT=U([`TSTypeAliasDeclaration`,`TypeAlias`]),LT=U([`ReturnStatement`,`ThrowStatement`]),RT=U([`ExportDefaultDeclaration`,`DeclareExportDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportAllDeclaration`]),zT=U([`ArrayExpression`]),BT=U([`ObjectExpression`]),VT=U([`Literal`,`BooleanLiteral`,`BigIntLiteral`,`DirectiveLiteral`,`NullLiteral`,`NumericLiteral`,`RegExpLiteral`,`StringLiteral`]),HT=U([`ObjectTypeAnnotation`,`TSTypeLiteral`,`TSMappedType`]),UT=U([`FunctionExpression`,`ArrowFunctionExpression`]),WT=U([`JSXElement`,`JSXFragment`]),GT=U([`BinaryExpression`,`LogicalExpression`,`NGPipeExpression`]),KT=U([`CallExpression`,`OptionalCallExpression`]),qT=U([`MemberExpression`,`OptionalMemberExpression`]),JT=U([`CallExpression`,`OptionalCallExpression`,`NewExpression`]),YT=U([`CallExpression`,`OptionalCallExpression`,`NewExpression`,`ImportExpression`]),XT=U([`ChainExpression`,`TSNonNullExpression`]),ZT=U([`TSArrayType`,`ArrayTypeAnnotation`]),QT=U([`TSTypeParameterInstantiation`,`TypeParameterInstantiation`]);function $T(e){if(e.type!==`ImportSpecifier`&&e.type!==`ExportSpecifier`)return!1;let{local:t,[e.type===`ImportSpecifier`?`imported`:`exported`]:n}=e;return t.type!==n.type||!CT(t,n)?!1:kT(t)?t.value===n.value&&wT(t)===wT(n):t.type===`Identifier`&&t.name===n.name}var eE=U([`File`,`TemplateElement`,`TSEmptyBodyFunctionExpression`,`ChainExpression`]),tE=(e,[t])=>t?.type===`ComponentParameter`&&t.shorthand&&t.name===e&&t.local!==t.name||t?.type===`MatchObjectPatternProperty`&&t.shorthand&&t.key===e||t?.type===`ObjectProperty`&&t.shorthand&&t.key===e&&t.value!==t.key||t?.type===`Property`&&t.shorthand&&t.key===e&&!lT(t)&&t.value!==t.key||t?.type===`ImportSpecifier`&&$T(t)&&t.local===e&&t.local!==t.imported||t?.type===`ExportSpecifier`&&$T(t)&&t.exported===e&&t.local!==t.exported,nE=(e,[t])=>!(e.type!==`FunctionExpression`||t.type!==`MethodDefinition`||t.value!==e||iT(e).length!==0||e.returnType||Xw(e.typeParameters)||!e.body),rE=(e,[t])=>t?.typeAnnotation===e&&sT(t),iE=(e,[t,...n])=>rE(e,[t])||t?.typeName===e&&rE(t,n);function aE(e,t){return eE(e)||tE(e,t)||nE(e,t)?!1:e.type===`EmptyStatement`?cT({node:e,parent:t[0]}):!(iE(e,t)||e.type===`TSTypeAnnotation`&&t[0].type===`TSPropertySignature`)}var oE=aE;function sE(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function cE(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=sE(e)}function lE(e,t){t.leading=!0,t.trailing=!1,cE(e,t)}function uE(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),cE(e,t)}function dE(e,t){t.leading=!1,t.trailing=!0,cE(e,t)}function fE(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var pE=fE(` `),mE=fE(`,; `),hE=fE(/[^\n\r]/);function gE(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var _E=gE,vE=e=>e===`
|
|
1327
|
+
`||e===`\r`||e===`\u2028`||e===`\u2029`;function yE(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
|
|
1328
|
+
`)return t-2;if(vE(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
|
|
1329
|
+
`)return t+2;if(vE(i))return t+1}return t}var bE=yE;function xE(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?hE(e,t):t}var SE=xE;function CE(e,t){let n=null,r=t;for(;r!==n;)n=r,r=pE(e,r),r=_E(e,r),r=SE(e,r),r=bE(e,r);return r}var wE=CE;function TE(e,t){let n=wE(e,t);return n===!1?``:e.charAt(n)}var EE=TE;function DE(e,t,n={}){let r=pE(e,n.backwards?t-1:t,n);return r!==bE(e,r,n)}var OE=DE;function kE(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
|
|
1330
|
+
`)return!0;return!1}var AE=kE,jE=/* @__PURE__ */ new WeakMap;function ME(e){let t;return e.type===`ImportExpression`||e.type===`TSImportType`?(t=[e.source],e.options&&t.push(e.options)):t=e.type===`TSExternalModuleReference`?[e.expression]:e.arguments,t}function NE(e){return tT(jE,e,ME)}function PE(e,t){let{node:n}=e;n.type===`ImportExpression`||n.type===`TSImportType`?(e.call(()=>t(e,0),`source`),n.options&&e.call(()=>t(e,1),`options`)):n.type===`TSExternalModuleReference`?e.call(()=>t(e,0),`expression`):e.each(t,`arguments`)}function FE(e,t){if(e.type===`ImportExpression`||e.type===`TSImportType`){if(t===0||t===(e.options?-2:-1))return[`source`];if(e.options&&(t===1||t===-1))return[`options`];throw RangeError(`Invalid argument index`)}if(e.type===`TSExternalModuleReference`){if(t===0||t===-1)return[`expression`]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return[`arguments`,t];throw RangeError(`Invalid argument index`)}var IE=Symbol.for(`comments`),LE=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},RE=Qw(`replaceAll`,function(){if(typeof this==`string`)return LE});function zE(e){return RE(0,e,/[^\n]/g,` `)}var BE=zE;function VE(e,t){for(let n of t){let t=W(n),r=G(n);e=e.slice(0,t)+BE(e.slice(t,r))+e.slice(r)}return e}var HE=/* @__PURE__ */ new WeakMap;function UE(e){let t=e[IE];return tT(HE,t,t=>VE(e.originalText,t))}function WE(e,t){let n=G(e)-1;if(t.originalText[n]===`)`)return n}function GE(e,t){if(WE(e,t)===void 0)return;let n=UE(t),r=G(e.typeArguments??e.callee),i=n.indexOf(`(`,r);if(i!==-1)return i}function KE(e,t,n){let r=WE(e,n);if(r===void 0||G(t)>r)return!1;let i=GE(e,n);return i!==void 0&&W(t)>i}var qE=U([`Block`,`CommentBlock`,`MultiLine`]),JE=U([`Line`,`CommentLine`,`SingleLine`,`HashbangComment`,`HTMLOpen`,`HTMLClose`,`Hashbang`,`InterpreterDirective`]);function YE(e){return e?.type===`ObjectProperty`||e?.type===`Property`&&!lT(e)}function XE(e){return e.value.trim()===`prettier-ignore`&&!e.unignore}var ZE=/* @__PURE__ */ new WeakMap;function QE(e){return tT(ZE,e,e=>qE(e)&&e.value[0]===`*`&&/@(?:type|satisfies)\b/.test(e.value))}function $E({comment:e,enclosingNode:t,followingNode:n,options:r}){if((t?.type===`ForInStatement`||t?.type===`ForOfStatement`||t?.type===`ForStatement`)&&n&&n===t.body){let t=UE(r).lastIndexOf(`)`,W(n));if(W(e)>t)return lE(n,e),!0}return!1}var eD=(e,t)=>qE(e)&&!AE(t,W(e),G(e)),tD=(e,t)=>JE(e)||eD(e,t);function nD(e,t){e.type===`BlockStatement`?rD(e,t):lE(e,t)}function rD(e,t){let n=(e.body||e.properties).find(({type:e})=>e!==`EmptyStatement`);n?lE(n,t):uE(e,t)}function iD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){return n?.type!==`IfStatement`||!r?!1:EE(i,G(e))===`)`?(dE(t,e),!0):r===n.consequent?(lE(r,e),!0):t===n.consequent&&r===n.alternate&&aD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a})}function aD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){let o=UE(a).indexOf(`else`,G(n.consequent));return W(e)>=o?(lE(r,e),!0):t.type!==`BlockStatement`&&tD(e,i)&&!AE(i,G(t),W(e))?(dE(t,e),!0):(uE(n,e),!0)}function oD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return n?.type===`SwitchStatement`&&n.cases.length===0&&!r&&t===n.discriminant&&EE(i,G(e))===`}`&&(uE(n,e),!0)}function sD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return(n?.type===`WhileStatement`||n?.type===`WithStatement`)&&r?EE(i,G(e))===`)`?(dE(t,e),!0):n.body===r&&(lE(r,e),!0):!1}function cD(e,{comment:t,text:n,options:r}){if(MT(e)&&eD(t,n)&&!XE(t)){let n=UE(r).slice(G(t),W(e));return/^[ \t]*$/.test(n)}return!1}function lD(e,t){return lE(cD(e,t)?e.types[0]:e,t.comment),!0}function uD(e){return[DD,VD,_D,OD,hD,iD,sD,oD,mD,yD,$E,jD,MD,PD,FD,ID,xD,kD,gD,KD,UD,YD,$D].some(t=>t(e))}function dD(e){return[DD,pD,OD,_D,FD,iD,sD,oD,mD,yD,$E,kD,AD,ND,PD,zD,WD,GD,qD,UD,ZD,QD,JD,YD].some(t=>t(e))}function fD(e){return[DD,VD,iD,sD,oD,$E,xD,PD,zD,UD,wD,CD,BD,QD,YD,$D].some(t=>t(e))}function pD({comment:e,followingNode:t}){return t&&QE(e)?(lE(t,e),!0):!1}function mD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n?.type!==`TryStatement`&&n?.type!==`CatchClause`||!r?!1:n.type===`CatchClause`&&t?(dE(t,e),!0):r.type===`BlockStatement`?(rD(r,e),!0):r.type===`TryStatement`?(nD(r.finalizer,e),!0):r.type===`CatchClause`&&(nD(r.body,e),!0)}function hD({comment:e,enclosingNode:t,followingNode:n}){return qT(t)&&n?.type===`Identifier`?(lE(t,e),!0):!1}function gD({comment:e,enclosingNode:t,followingNode:n,options:r}){return!r.experimentalTernaries||!(t?.type===`ConditionalExpression`||FT(t))?!1:n?.type===`ConditionalExpression`||FT(n)?(uE(t,e),!0):!1}function _D({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){let o=t&&!AE(i,G(t),W(e));return(!t||!o)&&(n?.type===`ConditionalExpression`||FT(n))&&r?a.experimentalTernaries&&n.alternate===r&&(!qE(e)||AE(a.originalText,W(e),G(e)))?(uE(n,e),!0):(lE(r,e),!0):!1}var vD=U([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function yD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){if(vD(n)){let{decorators:i}=n;if(Xw(i)&&r?.type!==`Decorator`)return dE(eT(0,i,-1),e),!0;if(n.body&&r===n.body)return rD(n.body,e),!0;if(r){let{superClass:i}=n;if(i&&r===i&&t&&(t===n.id||t===n.typeParameters))return dE(t,e),!0;for(let a of[`implements`,`extends`,`mixins`])if(n[a]&&r===n[a][0])return t&&(t===n.id||t===n.typeParameters||t===i)?dE(t,e):uE(n,e,a),!0}}return!1}var bD=U([`ClassMethod`,`ClassProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`,`MethodDefinition`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`TSParameterProperty`]);function xD({placement:e,comment:t,precedingNode:n,enclosingNode:r,followingNode:i,text:a}){return r&&n&&EE(a,G(t))===`(`&&(r.type===`Property`||r.type===`TSDeclareMethod`||r.type===`TSAbstractMethodDefinition`)&&n.type===`Identifier`&&r.key===n&&EE(a,G(n))!==`:`?(dE(n,t),!0):bD(r)&&!i&&e===`remaining`?(dE(EE(a,G(t))===`(`?n:r,t),!0):n?.type===`Decorator`&&bD(r)&&(JE(t)||e===`ownLine`)?(dE(n,t),!0):!1}var SD=U([`FunctionDeclaration`,`FunctionExpression`,`ClassMethod`,`MethodDefinition`,`ObjectMethod`]);function CD({comment:e,precedingNode:t,enclosingNode:n,text:r}){return EE(r,G(e))===`(`&&t&&SD(n)?(dE(t,e),!0):!1}function wD({comment:e,enclosingNode:t,text:n}){if(t?.type!==`ArrowFunctionExpression`)return!1;let r=wE(n,G(e));return r!==!1&&n.slice(r,r+2)===`=>`&&(uE(t,e,`commentBeforeArrow`),!0)}function TD(e,t,n){if(W(t)>=G(e)||G(t)<=W(e))return!1;let r=UE(n);return r.slice(0,W(t)).trimEnd().endsWith(`(`)&&r.slice(G(t)).trimStart().startsWith(`)`)}var ED=U([`ComponentDeclaration`,`DeclareComponent`,`ComponentTypeAnnotation`]);function DD({comment:e,enclosingNode:t,options:n}){if(!t)return!1;if(YT(t)&&NE(t).length===0&&TD(t,e,n))return uE(t,e),!0;let r=eO(t)||ED(t)||t.type===`HookTypeAnnotation`?t:t.type===`MethodDefinition`||t.type===`TSAbstractMethodDefinition`||t.type===`Property`&&lT(t)?t.value:void 0;return r&&iT(r).length===0&&TD(r,e,n)?(uE(r,e),!0):!1}function OD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return t?.type===`FunctionTypeParam`&&n?.type===`FunctionTypeAnnotation`&&r?.type!==`FunctionTypeParam`||t?.type===`ComponentTypeParameter`&&(n?.type===`DeclareComponent`||n?.type===`ComponentTypeAnnotation`)&&r?.type!==`ComponentTypeParameter`||(t?.type===`Identifier`||t?.type===`AssignmentPattern`||t?.type===`ObjectPattern`||t?.type===`ArrayPattern`||t?.type===`RestElement`||t?.type===`TSParameterProperty`)&&(eO(n)||(n?.type===`TSAbstractMethodDefinition`||n?.type===`MethodDefinition`)&&n.value.type===`TSEmptyBodyFunctionExpression`)&&EE(i,G(e))===`)`||(t?.type===`ComponentParameter`||t?.type===`RestElement`)&&(n?.type===`ComponentDeclaration`||n?.type===`DeclareComponent`)&&EE(i,G(e))===`)`?(dE(t,e),!0):!qE(e)&&r?.type===`BlockStatement`&&SD(n)&&(n.type===`MethodDefinition`?n.value.body:n.body)===r&&wE(i,G(e))===W(r)?(rD(r,e),!0):!1}function kD({comment:e,enclosingNode:t}){return t?.type===`LabeledStatement`&&(lE(t,e),!0)}function AD({comment:e,precedingNode:t,enclosingNode:n,options:r}){return JT(n)&&n.callee===t&&n.arguments.length>0&&KE(n,e,r)?(lE(n.arguments[0],e),!0):!1}function jD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return MT(n)?(XE(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(dE(t,e),!0):!1):(MT(r)&&XE(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function MD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n&&n.type===`MatchOrPattern`?(XE(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(dE(t,e),!0):!1):(r&&r.type===`MatchOrPattern`&&XE(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function ND({comment:e,enclosingNode:t}){return YE(t)?(lE(t,e),!0):!1}function PD({comment:e,enclosingNode:t,ast:n,isLastComment:r}){return n?.body?.length===0?(r?uE(n,e):lE(n,e),!0):t?.type===`Program`&&t.body.length===0&&!Xw(t.directives)&&(r?uE(t,e):lE(t,e),!0)}function FD({comment:e,precedingNode:t,enclosingNode:n,text:r}){if(n?.type===`ImportSpecifier`||n?.type===`ExportSpecifier`)return lE(n,e),!0;let i=t?.type===`ImportSpecifier`&&n?.type===`ImportDeclaration`,a=t?.type===`ExportSpecifier`&&n?.type===`ExportNamedDeclaration`;return(i||a)&&OE(r,G(e))?(dE(t,e),!0):!1}function ID({comment:e,enclosingNode:t}){return t?.type===`AssignmentPattern`&&(lE(t,e),!0)}var LD=U([`VariableDeclarator`,`AssignmentExpression`,`TypeAlias`,`TSTypeAliasDeclaration`]),RD=U([`ObjectExpression`,`ArrayExpression`,`TemplateLiteral`,`TaggedTemplateExpression`,`ObjectTypeAnnotation`,`TSTypeLiteral`]);function zD(e){let{comment:t,enclosingNode:n,followingNode:r,options:i,placement:a}=e;if(LD(n)&&r&&a===`endOfLine`&&(RD(r)||qE(t)))return lD(r,e);if(IT(n)&&r){let a=n.id,o=UE(i).indexOf(`=`,G(a));if(W(t)>=o)return lD(r,e)}return!1}function BD({comment:e,enclosingNode:t,precedingNode:n,followingNode:r,text:i}){return!r&&(t?.type===`TSMethodSignature`||t?.type===`TSDeclareFunction`||t?.type===`TSAbstractMethodDefinition`)&&(!n||n!==t.returnType)&&EE(i,G(e))===`;`&&(dE(t,e),!0)}function VD({comment:e,enclosingNode:t,followingNode:n}){if(XE(e)&&t?.type===`TSMappedType`&&n===t.key)return t.prettierIgnore=!0,e.unignore=!0,!0}function HD(e,t,n){let r=UE(n).indexOf(`[`,W(e));return G(t)<r}function UD({comment:e,enclosingNode:t,options:n}){if(t?.type===`TSMappedType`&&HD(t,e,n))return uE(t,e),!0}function WD({comment:e,enclosingNode:t,followingNode:n}){return!t||t.type!==`SwitchCase`||t.test||!n||n!==t.consequent[0]?!1:(n.type===`BlockStatement`&&JE(e)?rD(n,e):uE(t,e),!0)}function GD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return MT(t)&&(ZT(n)&&!r||NT(n)||MT(n))?(dE(eT(0,t.types,-1),e),!0):!1}function KD({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if((t?.type===`ObjectPattern`||t?.type===`ArrayPattern`)&&r?.type===`TSTypeAnnotation`)return n?dE(n,e):uE(t,e),!0}function qD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return!r&&n?.type===`UnaryExpression`&&(t?.type===`LogicalExpression`||t?.type===`BinaryExpression`)&&AE(i,W(n.argument),W(t.right))&&tD(e,i)&&!AE(i,W(t.right),W(e))?(dE(t.right,e),!0):!1}function JD({enclosingNode:e,followingNode:t,comment:n}){if(e&&(e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`)&&(MT(t)||NT(t)))return lE(t,n),!0}function YD({enclosingNode:e,precedingNode:t,followingNode:n,comment:r,text:i}){if(AT(e)&&t===e.expression&&!tD(r,i))return n?lE(n,r):dE(e,r),!0}function XD(e,t,n){let r=UE(n).lastIndexOf(`=>`,W(t.body));return G(e)<r}function ZD({comment:e,enclosingNode:t,followingNode:n,precedingNode:r,options:i}){return t?.type!==`ArrowFunctionExpression`||!n||!r||XD(e,t,i)?!1:(nD(n,e),!0)}function QD({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if(!r&&t&&n){if(t.type===`ExpressionStatement`&&t.expression===n)return dE(t,e),!0;let r=n.type===`SequenceExpression`,i=n.type===`AssignmentExpression`;if((r||i)&&(t.type===`ArrowFunctionExpression`&&t.body===n||t.type===`VariableDeclarator`&&t.init===n||t.type===`ReturnStatement`&&t.argument===n||t.type===`AssignmentExpression`&&t.right===n))return dE(r?eT(0,n.expressions,-1):n.right,e),!0}return!1}function $D(e){let{followingNode:t,comment:n}=e;return cD(t,e)?(lE(t.types[0],n),!0):!1}var eO=U([`ArrowFunctionExpression`,`FunctionExpression`,`FunctionDeclaration`,`ObjectMethod`,`ClassMethod`,`TSDeclareFunction`,`TSCallSignatureDeclaration`,`TSConstructSignatureDeclaration`,`TSMethodSignature`,`TSConstructorType`,`TSFunctionType`,`TSDeclareMethod`,`HookDeclaration`]),tO={endOfLine:dD,ownLine:uD,remaining:fD};function nO(e,{parser:t}){if(t===`flow`||t===`hermes`||t===`babel-flow`)return e=RE(0,e,/[\s(]/g,``),e===``||e===`/*`||e===`/*::`}var rO=nO,K={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},iO=(e,t)=>{if(typeof e==`function`&&(t=e,e=0),e||t)return(n,r,i)=>!(e&K.Leading&&!n.leading||e&K.Trailing&&!n.trailing||e&K.Dangling&&(n.leading||n.trailing)||e&K.Block&&!qE(n)||e&K.Line&&!JE(n)||e&K.First&&r!==0||e&K.Last&&r!==i.length-1||e&K.PrettierIgnore&&!XE(n)||t&&!t(n))};function q(e,t,n){if(!Xw(e?.comments))return!1;let r=iO(t,n);return!r||e.comments.some(r)}function aO(e,t,n){if(!Array.isArray(e?.comments))return[];let r=iO(t,n);return r?e.comments.filter(r):e.comments}function oO(e){return e?.prettierIgnore||q(e,K.PrettierIgnore)}function sO(e){let{node:t}=e;return(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`)&&(e.key===`callee`&&KT(e.parent)||e.key===`tag`&&e.parent.type===`TaggedTemplateExpression`)}var cO=new Map([[`|>`],[`??`],[`||`],[`&&`],[`|`],[`^`],[`&`],[`==`,`===`,`!=`,`!==`],[`<`,`>`,`<=`,`>=`,`in`,`instanceof`],[`>>`,`<<`,`>>>`],[`+`,`-`],[`*`,`/`,`%`],[`**`]].flatMap((e,t)=>e.map(e=>[e,t])));function lO(e){return cO.get(e)}var uO={"==":!0,"!=":!0,"===":!0,"!==":!0},dO={"*":!0,"/":!0,"%":!0},fO={">>":!0,">>>":!0,"<<":!0};function pO(e,t){return!(lO(t)!==lO(e)||e===`**`||uO[e]&&uO[t]||t===`%`&&dO[e]||e===`%`&&dO[t]||t!==e&&dO[t]&&dO[e]||fO[e]&&fO[t])}function mO(e){return!!fO[e]||e===`|`||e===`^`||e===`&`}function hO(e){return e.type===`LogicalExpression`&&e.operator===`??`}function gO(e,t){switch(e.type){case`BinaryExpression`:case`LogicalExpression`:case`AssignmentExpression`:case`NGPipeExpression`:return gO(e.left,t);case`MemberExpression`:case`OptionalMemberExpression`:return gO(e.object,t);case`TaggedTemplateExpression`:return e.tag.type!==`FunctionExpression`&&gO(e.tag,t);case`CallExpression`:case`OptionalCallExpression`:return e.callee.type!==`FunctionExpression`&&gO(e.callee,t);case`ConditionalExpression`:return gO(e.test,t);case`UpdateExpression`:return!e.prefix&&gO(e.argument,t);case`BindExpression`:return e.object&&gO(e.object,t);case`SequenceExpression`:return gO(e.expressions[0],t);case`ChainExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSAsExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return gO(e.expression,t);default:return t(e)}}function _O(e){let{key:t,parent:n}=e;return t===`expression`&&n.type===`TSNonNullExpression`||t===`object`&&n.type===`MemberExpression`&&!n.optional||t===`callee`&&n.type===`CallExpression`&&!n.optional||t===`callee`&&n.type===`NewExpression`||t===`tag`&&n.type===`TaggedTemplateExpression`}var vO=e=>e.extra?.parenthesized,yO=U([`OptionalCallExpression`,`OptionalMemberExpression`]);function bO(e){let{node:t}=e,n=t;for(;n.type===`TSNonNullExpression`;)if(n=n.expression,vO(n))return!1;return yO(n)?vO(t)?!0:e.key!==`expression`||e.parent.type!==`TSNonNullExpression`:!1}function xO(e){return(e.node.type===`ChainExpression`||bO(e))&&_O(e)}function SO(e){let{node:t}=e;if(t.type!==`Identifier`)return!1;if(t.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(t.name))return!0;let{key:n,parent:r}=e;if(n===`left`&&(t.name===`async`&&!r.await||t.name===`let`)&&r.type===`ForOfStatement`)return!0;if(t.name===`let`){let n=e.findAncestor(e=>e.type===`ForOfStatement`||e.type===`ForInStatement`)?.left;if(n&&gO(n,e=>e===t))return!0}if(n===`object`&&t.name===`let`&&r.type===`MemberExpression`&&r.computed&&!r.optional){let n=e.findAncestor(e=>e.type===`ExpressionStatement`||e.type===`ForStatement`||e.type===`ForInStatement`),r=n?n.type===`ExpressionStatement`?n.expression:n.type===`ForStatement`?n.init:n.left:void 0;if(r&&gO(r,e=>e===t))return!0}if(n===`expression`)switch(t.name){case`await`:case`interface`:case`module`:case`using`:case`yield`:case`let`:case`component`:case`hook`:case`type`:{let t=e.findAncestor(e=>!AT(e));if(t!==r&&t.type===`ExpressionStatement`)return!0}}return!1}function CO(e){return typeof e==`object`&&!!e}var wO=CO;function*TO(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>wO(e)&&r(e);for(let t of n(e)){let n=e[t];if(Array.isArray(n))for(let e of n)i(e)&&(yield e);else i(n)&&(yield n)}}function*EO(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of TO(r,t))yield e,n.push(e)}}function DO(e,{getVisitorKeys:t,predicate:n}){for(let r of EO(e,{getVisitorKeys:t}))if(n(r))return!0;return!1}var OO=null;function kO(e){if(OO!==null&&typeof OO.property){let e=OO;return OO=kO.prototype=null,e}return OO=kO.prototype=e??Object.create(null),new kO}var AO=10;for(let e=0;e<=AO;e++)kO();function jO(e){return kO(e)}function MO(e,t=`type`){jO(e);function n(n){let r=n[t],i=e[r];if(!Array.isArray(i))throw Object.assign(/* @__PURE__ */ Error(`Missing visitor keys for '${r}'.`),{node:n});return i}return n}var NO=MO,J=[[`elements`],[`left`,`right`],[`value`],[`directives`,`body`],[`label`],[`callee`,`typeArguments`,`arguments`],[`test`,`consequent`,`alternate`],[`body`,`test`],[`expression`],[`left`,`right`,`body`],[`id`,`typeParameters`,`params`,`predicate`,`returnType`,`body`],[`object`,`property`],[`properties`],[`decorators`,`key`,`typeParameters`,`params`,`returnType`,`body`],[`decorators`,`key`,`value`],[`argument`],[`expressions`],[`id`,`init`],[`body`],[`decorators`,`id`,`typeParameters`,`superClass`,`superTypeArguments`,`mixins`,`implements`,`body`],[`declaration`,`specifiers`,`source`,`attributes`],[`local`],[`exported`],[`decorators`,`variance`,`key`,`typeAnnotation`,`value`],[`id`],[`key`,`value`],[`elementType`],[`id`,`typeParameters`],[`id`,`typeParameters`,`extends`,`body`],[`id`,`body`],[`typeAnnotation`],[`id`,`typeParameters`,`right`],[`name`,`typeAnnotation`],[`types`],[`qualification`,`id`],[`elementTypes`],[`expression`,`typeAnnotation`],[`params`],[`members`],[`objectType`,`indexType`],[`decorators`,`key`,`typeAnnotation`,`value`],[`id`,`typeParameters`,`params`,`returnType`,`body`],[`key`,`typeParameters`,`params`,`returnType`],[`typeParameters`,`params`,`returnType`],[`parameterName`,`typeAnnotation`],[`checkType`,`extendsType`,`trueType`,`falseType`],[`typeParameter`],[`literal`],[`expression`,`typeArguments`],[`decorators`,`key`,`typeAnnotation`],[`argument`,`cases`],[`pattern`,`body`,`guard`],[`properties`,`rest`],[`node`]],PO=NO({ArrayExpression:J[0],AssignmentExpression:J[1],BinaryExpression:J[1],InterpreterDirective:[],Directive:J[2],DirectiveLiteral:[],BlockStatement:J[3],BreakStatement:J[4],CallExpression:J[5],CatchClause:[`param`,`body`],ConditionalExpression:J[6],ContinueStatement:J[4],DebuggerStatement:[],DoWhileStatement:J[7],EmptyStatement:[],ExpressionStatement:J[8],File:[`program`],ForInStatement:J[9],ForStatement:[`init`,`test`,`update`,`body`],FunctionDeclaration:J[10],FunctionExpression:J[10],Identifier:[`typeAnnotation`,`decorators`],IfStatement:J[6],LabeledStatement:[`label`,`body`],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:J[1],MemberExpression:J[11],NewExpression:J[5],Program:J[3],ObjectExpression:J[12],ObjectMethod:J[13],ObjectProperty:J[14],RestElement:[`argument`,`typeAnnotation`,`decorators`],ReturnStatement:J[15],SequenceExpression:J[16],ParenthesizedExpression:J[8],SwitchCase:[`test`,`consequent`],SwitchStatement:[`discriminant`,`cases`],ThisExpression:[],ThrowStatement:J[15],TryStatement:[`block`,`handler`,`finalizer`],UnaryExpression:J[15],UpdateExpression:J[15],VariableDeclaration:[`declarations`],VariableDeclarator:J[17],WhileStatement:J[7],WithStatement:[`object`,`body`],AssignmentPattern:[`left`,`right`,`decorators`,`typeAnnotation`],ArrayPattern:[`elements`,`typeAnnotation`,`decorators`],ArrowFunctionExpression:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],ClassBody:J[18],ClassExpression:J[19],ClassDeclaration:J[19],ExportAllDeclaration:[`source`,`attributes`,`exported`],ExportDefaultDeclaration:[`declaration`],ExportNamedDeclaration:J[20],ExportSpecifier:[`local`,`exported`],ForOfStatement:J[9],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportDefaultSpecifier:J[21],ImportNamespaceSpecifier:J[21],ImportSpecifier:[`imported`,`local`],MetaProperty:[`meta`,`property`],ClassMethod:J[13],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],SpreadElement:J[15],Super:[],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],TemplateElement:[],TemplateLiteral:[`quasis`,`expressions`],YieldExpression:J[15],AwaitExpression:J[15],ImportExpression:[`source`,`options`],BigIntLiteral:[],ExportNamespaceSpecifier:J[22],OptionalMemberExpression:J[11],OptionalCallExpression:J[5],ClassProperty:J[23],ClassPrivateProperty:J[23],ClassPrivateMethod:J[13],PrivateName:J[24],StaticBlock:J[18],ImportAttribute:J[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:J[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:J[27],DeclareClass:[`id`,`typeParameters`,`extends`,`mixins`,`implements`,`body`],DeclareFunction:[`id`,`predicate`],DeclareInterface:J[28],DeclareModule:J[29],DeclareModuleExports:J[30],DeclareTypeAlias:J[31],DeclareOpaqueType:[`id`,`typeParameters`,`supertype`,`lowerBound`,`upperBound`],DeclareVariable:[`id`,`declarations`],DeclareExportDeclaration:J[20],DeclareExportAllDeclaration:[`source`,`attributes`],DeclaredPredicate:J[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:[`typeParameters`,`this`,`params`,`rest`,`returnType`],FunctionTypeParam:J[32],GenericTypeAnnotation:J[27],InferredPredicate:[],InterfaceExtends:J[27],InterfaceDeclaration:J[28],InterfaceTypeAnnotation:[`extends`,`body`],IntersectionTypeAnnotation:J[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:J[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:[`properties`,`indexers`,`callProperties`,`internalSlots`],ObjectTypeInternalSlot:[`id`,`value`],ObjectTypeCallProperty:J[2],ObjectTypeIndexer:[`variance`,`id`,`key`,`value`],ObjectTypeProperty:[`key`,`value`,`variance`],ObjectTypeSpreadProperty:J[15],OpaqueType:[`id`,`typeParameters`,`supertype`,`impltype`,`lowerBound`,`upperBound`],QualifiedTypeIdentifier:J[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:J[35],TypeofTypeAnnotation:[`argument`,`typeArguments`],TypeAlias:J[31],TypeAnnotation:J[30],TypeCastExpression:J[36],TypeParameter:[`bound`,`default`,`variance`],TypeParameterDeclaration:J[37],TypeParameterInstantiation:J[37],UnionTypeAnnotation:J[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:J[29],EnumBooleanBody:J[38],EnumNumberBody:J[38],EnumStringBody:J[38],EnumSymbolBody:J[38],EnumBooleanMember:J[17],EnumNumberMember:J[17],EnumStringMember:J[17],EnumDefaultedMember:J[24],IndexedAccessType:J[39],OptionalIndexedAccessType:J[39],JSXAttribute:[`name`,`value`],JSXClosingElement:[`name`],JSXElement:[`openingElement`,`children`,`closingElement`],JSXEmptyExpression:[],JSXExpressionContainer:J[8],JSXSpreadChild:J[8],JSXIdentifier:[],JSXMemberExpression:J[11],JSXNamespacedName:[`namespace`,`name`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXSpreadAttribute:J[15],JSXText:[],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:[`object`,`callee`],ClassAccessorProperty:J[40],Decorator:J[8],DoExpression:J[18],ExportDefaultSpecifier:J[22],ModuleExpression:J[18],TopicReference:[],VoidPattern:[],TSParameterProperty:[`parameter`,`decorators`],TSDeclareFunction:J[41],TSDeclareMethod:J[42],TSQualifiedName:J[1],TSCallSignatureDeclaration:J[43],TSConstructSignatureDeclaration:J[43],TSPropertySignature:[`key`,`typeAnnotation`],TSMethodSignature:J[42],TSIndexSignature:[`parameters`,`typeAnnotation`],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:J[43],TSConstructorType:J[43],TSTypeReference:[`typeName`,`typeArguments`],TSTypePredicate:J[44],TSTypeQuery:[`exprName`,`typeArguments`],TSTypeLiteral:J[38],TSArrayType:J[26],TSTupleType:J[35],TSOptionalType:J[30],TSRestType:J[30],TSNamedTupleMember:[`label`,`elementType`],TSUnionType:J[33],TSIntersectionType:J[33],TSConditionalType:J[45],TSInferType:J[46],TSParenthesizedType:J[30],TSTypeOperator:J[30],TSIndexedAccessType:J[39],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSTemplateLiteralType:[`quasis`,`types`],TSLiteralType:J[47],TSClassImplements:J[48],TSInterfaceHeritage:J[48],TSInterfaceDeclaration:J[28],TSInterfaceBody:J[18],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSInstantiationExpression:J[48],TSAsExpression:J[36],TSSatisfiesExpression:J[36],TSTypeAssertion:J[36],TSEnumBody:J[38],TSEnumDeclaration:J[29],TSEnumMember:[`id`,`initializer`],TSModuleDeclaration:J[29],TSModuleBlock:J[18],TSImportType:[`source`,`options`,`qualifier`,`typeArguments`],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSExternalModuleReference:J[8],TSNonNullExpression:J[8],TSExportAssignment:J[8],TSNamespaceExportDeclaration:J[24],TSTypeAnnotation:J[30],TSTypeParameterInstantiation:J[37],TSTypeParameterDeclaration:J[37],TSTypeParameter:[`name`,`constraint`,`default`],ChainExpression:J[8],Literal:[],MethodDefinition:J[14],PrivateIdentifier:[],Property:J[25],PropertyDefinition:J[23],AccessorProperty:J[40],TSAbstractAccessorProperty:J[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:J[25],TSAbstractPropertyDefinition:J[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:J[8],AsExpression:J[36],BigIntTypeAnnotation:[],ComponentDeclaration:[`id`,`params`,`body`,`typeParameters`,`rendersType`],ComponentParameter:[`name`,`local`],ComponentTypeAnnotation:[`params`,`rest`,`typeParameters`,`rendersType`],ComponentTypeParameter:J[32],ConditionalTypeAnnotation:J[45],DeclareComponent:[`id`,`params`,`rest`,`typeParameters`,`rendersType`],DeclareEnum:J[29],DeclareHook:J[24],DeclareNamespace:J[29],EnumBigIntBody:J[38],EnumBigIntMember:J[17],EnumBody:J[38],HookDeclaration:J[41],HookTypeAnnotation:[`params`,`returnType`,`rest`,`typeParameters`],InferTypeAnnotation:J[46],KeyofTypeAnnotation:J[15],MatchArrayPattern:[`elements`,`rest`],MatchAsPattern:[`pattern`,`target`],MatchBindingPattern:J[24],MatchExpression:J[50],MatchExpressionCase:J[51],MatchIdentifierPattern:J[24],MatchInstanceObjectPattern:J[52],MatchInstancePattern:[`targetConstructor`,`properties`],MatchLiteralPattern:J[47],MatchMemberPattern:[`base`,`property`],MatchObjectPattern:J[52],MatchObjectPatternProperty:[`key`,`pattern`],MatchOrPattern:[`patterns`],MatchRestPattern:J[15],MatchStatement:J[50],MatchStatementCase:J[51],MatchUnaryPattern:J[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:[`keyTparam`,`propType`,`sourceType`,`variance`],QualifiedTypeofIdentifier:J[34],RecordDeclaration:[`id`,`typeParameters`,`implements`,`body`],RecordDeclarationBody:J[0],RecordDeclarationImplements:[`id`,`typeArguments`],RecordDeclarationProperty:[`key`,`typeAnnotation`,`defaultValue`],RecordDeclarationStaticProperty:[`key`,`typeAnnotation`,`value`],RecordExpression:[`recordConstructor`,`typeArguments`,`properties`],RecordExpressionProperties:J[12],SatisfiesExpression:J[36],TupleTypeLabeledElement:[`label`,`elementType`,`variance`],TupleTypeSpreadElement:[`label`,`typeAnnotation`],TypeOperator:J[30],TypePredicate:J[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:J[16],NGEmptyExpression:[],NGPipeExpression:[`left`,`right`,`arguments`],NGMicrosyntax:J[18],NGMicrosyntaxAs:[`key`,`alias`],NGMicrosyntaxExpression:[`expression`,`alias`],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:[`key`,`expression`],NGMicrosyntaxLet:J[25],NGRoot:J[53],JsExpressionRoot:J[53],JsonRoot:J[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:J[30],TSJSDocNonNullableType:J[30]});function FO(e,t){return t(e)||DO(e,{getVisitorKeys:PO,predicate:t})}function IO(e){return e.type===`AssignmentExpression`||e.type===`BinaryExpression`||e.type===`LogicalExpression`||e.type===`NGPipeExpression`||e.type===`ConditionalExpression`||KT(e)||qT(e)||e.type===`SequenceExpression`||e.type===`TaggedTemplateExpression`||e.type===`BindExpression`||e.type===`UpdateExpression`&&!e.prefix||AT(e)||XT(e)}function LO(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function RO(e){if(e.expressions)return[`expressions`,0];if(e.left)return[`left`];if(e.test)return[`test`];if(e.object)return[`object`];if(e.callee)return[`callee`];if(e.tag)return[`tag`];if(e.argument)return[`argument`];if(e.expression)return[`expression`];throw Error(`Unexpected node has no left side.`)}function zO(e,t){return WT(t)?oO(t):q(t,K.Leading,t=>OE(e,G(t)))}function BO(e,t){if(zO(t.originalText,e)||q(e,K.Leading,e=>AE(t.originalText,W(e),G(e)))&&!WT(e))return!0;if(IO(e)){let n=e,r;for(;r=LO(n);)if(n=r,zO(t.originalText,n))return!0}return!1}var VO=/* @__PURE__ */ new WeakMap;function HO(e,t){return tT(VO,e,e=>BO(e,t))}function UO(e){for(;XT(e);)e=e.expression;return e}function WO(e,t,n){let{node:r,key:i,parent:a}=e;switch(a.type){case`ReturnStatement`:case`ThrowStatement`:if(GO(e,t))return!1;break;case`ParenthesizedExpression`:return!1;case`ClassDeclaration`:case`ClassExpression`:if(i===`superClass`){let e=UO(r);if(e.type===`ArrowFunctionExpression`||e.type===`AssignmentExpression`||e.type===`AwaitExpression`||e.type===`BinaryExpression`||e.type===`ConditionalExpression`||e.type===`LogicalExpression`||e.type===`NewExpression`||e.type===`ObjectExpression`||e.type===`SequenceExpression`||e.type===`TaggedTemplateExpression`||e.type===`UnaryExpression`||e.type===`UpdateExpression`||e.type===`YieldExpression`||e.type===`ClassExpression`&&Xw(e.decorators))return!0}break;case`ExportDefaultDeclaration`:if(KO(e,t,n))return!0;break;case`Decorator`:if(i===`expression`&&!qO(r))return!0;break;case`TypeAnnotation`:if(e.match(void 0,void 0,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)&&!(r.type===`NullableTypeAnnotation`&&e.call(()=>n(e,t),`typeAnnotation`))&&YO(r))return!0;break;case`VariableDeclarator`:if(i===`init`&&e.match(void 0,void 0,(e,t)=>t===`declarations`&&e.type===`VariableDeclaration`,(e,t)=>t===`left`&&e.type===`ForInStatement`))return!0;break;case`TSInstantiationExpression`:if(i===`expression`&&(r.type===`AwaitExpression`||r.type===`YieldExpression`))return!0}}function GO(e,t){let{key:n,parent:r}=e;if(!(n===`argument`&<(r)))return!1;let{node:i}=e;return!(i.type!==`SequenceExpression`&&i.type!==`AssignmentExpression`||!HO(i,t))}function KO(e,t,n){let{node:r,parent:i}=e;return r.type===`FunctionExpression`||r.type===`ClassExpression`?i.type===`ExportDefaultDeclaration`||!n(e,t):!IO(r)||i.type!==`ExportDefaultDeclaration`&&n(e,t)?!1:e.call(()=>KO(e,t,n),...RO(r))}function qO(e){return e.type===`ChainExpression`&&(e=e.expression),JO(e)||KT(e)&&!e.optional&&JO(e.callee)}function JO(e){return e.type===`Identifier`?!0:qT(e)?!e.computed&&!e.optional&&e.property.type===`Identifier`&&JO(e.object):!1}function YO(e){return FO(e,e=>e.type===`ObjectTypeAnnotation`&&FO(e,e=>e.type===`FunctionTypeAnnotation`))}function XO(e,t){if(e.isRoot)return!1;let{node:n,key:r,parent:i}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&$O(n)&&ek(e))return!0;if(ZO(n))return!1;if(n.type===`Identifier`)return SO(e);if(n.type===`ObjectExpression`||n.type===`FunctionExpression`||n.type===`ClassExpression`||n.type===`DoExpression`){let t=e.findAncestor(e=>e.type===`ExpressionStatement`)?.expression;if(t&&gO(t,e=>e===n))return!0}if(n.type===`ObjectExpression`){let t=e.findAncestor(e=>e.type===`ArrowFunctionExpression`)?.body;if(t&&t.type!==`SequenceExpression`&&t.type!==`AssignmentExpression`&&gO(t,e=>e===n))return!0}let a=WO(e,t,XO);if(typeof a==`boolean`)return a;switch(n.type){case`UpdateExpression`:if(i.type===`UnaryExpression`)return n.prefix&&(n.operator===`++`&&i.operator===`+`||n.operator===`--`&&i.operator===`-`);case`UnaryExpression`:switch(i.type){case`UnaryExpression`:return n.operator===i.operator&&(n.operator===`+`||n.operator===`-`);case`BindExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`TaggedTemplateExpression`:return!0;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`BinaryExpression`:return r===`left`&&n.type===`UnaryExpression`&&(i.operator===`in`||i.operator===`instanceof`)||r===`left`&&i.operator===`**`;case`TSNonNullExpression`:return!0;default:return!1}case`BinaryExpression`:if(i.type===`UpdateExpression`||n.operator===`in`&&QO(e))return!0;if(n.operator===`|>`&&n.extra?.parenthesized){let t=e.grandparent;if(t.type===`BinaryExpression`&&t.operator===`|>`)return!0}case`TSTypeAssertion`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`LogicalExpression`:switch(i.type){case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return!AT(n);case`ConditionalExpression`:return AT(n)||hO(n);case`CallExpression`:case`NewExpression`:case`OptionalCallExpression`:return r===`callee`;case`ClassExpression`:case`ClassDeclaration`:return r===`superClass`;case`TSTypeAssertion`:case`TaggedTemplateExpression`:case`JSXSpreadAttribute`:case`SpreadElement`:case`BindExpression`:case`AwaitExpression`:case`TSNonNullExpression`:case`UpdateExpression`:return!0;case`UnaryExpression`:if(!q(n))return!0;break;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`AssignmentExpression`:case`AssignmentPattern`:return r===`left`&&(n.type===`TSTypeAssertion`||AT(n));case`LogicalExpression`:if(n.type===`LogicalExpression`)return i.operator!==n.operator;case`BinaryExpression`:{let{operator:e,type:t}=n;if(!e&&t!==`TSTypeAssertion`)return!0;let a=lO(e),o=i.operator,s=lO(o);return!!(s>a||r===`right`&&s===a||s===a&&!pO(o,e)||s<a&&e===`%`&&(o===`+`||o===`-`)||mO(o))}default:return!1}break;case`SequenceExpression`:return i.type!==`ForStatement`;case`YieldExpression`:if(i.type===`AwaitExpression`||i.type===`TSTypeAssertion`)return!0;case`AwaitExpression`:switch(i.type){case`TaggedTemplateExpression`:case`UnaryExpression`:case`LogicalExpression`:case`SpreadElement`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`TSNonNullExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`BindExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`ConditionalExpression`:return r===`test`;case`BinaryExpression`:return!(!n.argument&&i.operator===`|>`);default:return!1}case`TSFunctionType`:if(e.match(e=>e.type===`TSFunctionType`,(e,t)=>t===`typeAnnotation`&&e.type===`TSTypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`))return!0;case`TSConditionalType`:case`TSConstructorType`:case`ConditionalTypeAnnotation`:if(r===`extendsType`&&FT(n)&&i.type===n.type||r===`constraint`&&n.type===`TSConditionalType`&&i.type===`TSTypeParameter`||r===`typeAnnotation`&&n.type===`ConditionalTypeAnnotation`&&i.type===`TypeAnnotation`&&e.grandparent.type===`TypeParameter`&&e.grandparent.bound===i&&e.grandparent.usesExtendsBound||r===`checkType`&&FT(i))return!0;if(r===`extendsType`&&i.type===`TSConditionalType`){let{typeAnnotation:e}=n.returnType||n.typeAnnotation;if(e.type===`TSTypePredicate`&&e.typeAnnotation&&(e=e.typeAnnotation.typeAnnotation),e.type===`TSInferType`&&e.typeParameter.constraint)return!0}case`TSUnionType`:case`TSIntersectionType`:if(MT(i)||NT(i))return!0;case`TSInferType`:if(n.type===`TSInferType`){if(i.type===`TSRestType`)return!1;if(r===`types`&&(i.type===`TSUnionType`||i.type===`TSIntersectionType`)&&n.typeParameter.type===`TSTypeParameter`&&n.typeParameter.constraint)return!0}case`TSTypeOperator`:return i.type===`TSArrayType`||i.type===`TSOptionalType`||i.type===`TSRestType`||r===`objectType`&&i.type===`TSIndexedAccessType`||i.type===`TSTypeOperator`||i.type===`TSTypeAnnotation`&&e.grandparent.type.startsWith(`TSJSDoc`);case`TSTypeQuery`:return r===`objectType`&&i.type===`TSIndexedAccessType`||r===`elementType`&&i.type===`TSArrayType`;case`TypeOperator`:return i.type===`ArrayTypeAnnotation`||i.type===`NullableTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`)||i.type===`TypeOperator`;case`TypeofTypeAnnotation`:case`KeyofTypeAnnotation`:return r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`)||r===`elementType`&&i.type===`ArrayTypeAnnotation`;case`ArrayTypeAnnotation`:return i.type===`NullableTypeAnnotation`;case`IntersectionTypeAnnotation`:case`UnionTypeAnnotation`:return i.type===`TypeOperator`||i.type===`KeyofTypeAnnotation`||i.type===`ArrayTypeAnnotation`||i.type===`NullableTypeAnnotation`||i.type===`IntersectionTypeAnnotation`||i.type===`UnionTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`);case`InferTypeAnnotation`:case`NullableTypeAnnotation`:if(i.type===`ArrayTypeAnnotation`||r===`objectType`&&(i.type===`IndexedAccessType`||i.type===`OptionalIndexedAccessType`))return!0;break;case`ComponentTypeAnnotation`:case`FunctionTypeAnnotation`:{if(n.type===`ComponentTypeAnnotation`&&(n.rendersType===null||n.rendersType===void 0))return!1;if(e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`TypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)||e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`NullableTypeAnnotation`,(e,t)=>t===`typeAnnotation`&&e.type===`TypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`)||e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`TypePredicate`,(e,t)=>t===`typeAnnotation`&&e.type===`TypeAnnotation`,(e,t)=>t===`returnType`&&e.type===`ArrowFunctionExpression`))return!0;let t=i.type===`NullableTypeAnnotation`?e.grandparent:i;return t.type===`UnionTypeAnnotation`||t.type===`IntersectionTypeAnnotation`||t.type===`ArrayTypeAnnotation`||r===`objectType`&&(t.type===`IndexedAccessType`||t.type===`OptionalIndexedAccessType`)||r===`checkType`&&i.type===`ConditionalTypeAnnotation`||r===`extendsType`&&i.type===`ConditionalTypeAnnotation`&&n.returnType?.type===`InferTypeAnnotation`&&n.returnType.typeParameter.bound||t.type===`NullableTypeAnnotation`||i.type===`FunctionTypeParam`&&i.name===null&&iT(n).some(e=>e.typeAnnotation?.type===`NullableTypeAnnotation`)}case`OptionalIndexedAccessType`:return r===`objectType`&&i.type===`IndexedAccessType`;case`StringLiteral`:case`NumericLiteral`:case`Literal`:if(typeof n.value==`string`&&i.type===`ExpressionStatement`&&typeof i.directive!=`string`){let t=e.grandparent;return t.type===`Program`||t.type===`BlockStatement`}return r===`object`&&qT(i)&&DT(n);case`AssignmentExpression`:return!((r===`init`||r===`update`)&&i.type===`ForStatement`||r===`expression`&&n.left.type!==`ObjectPattern`&&i.type===`ExpressionStatement`||r===`key`&&i.type===`TSPropertySignature`||i.type===`AssignmentExpression`||r===`expressions`&&i.type===`SequenceExpression`&&e.match(void 0,void 0,(e,t)=>(t===`init`||t===`update`)&&e.type===`ForStatement`)||r===`value`&&i.type===`Property`&&e.match(void 0,void 0,(e,t)=>t===`properties`&&e.type===`ObjectPattern`)||i.type===`NGChainedExpression`||r===`node`&&i.type===`JsExpressionRoot`);case`ConditionalExpression`:switch(i.type){case`TaggedTemplateExpression`:case`UnaryExpression`:case`SpreadElement`:case`BinaryExpression`:case`LogicalExpression`:case`NGPipeExpression`:case`AwaitExpression`:case`JSXSpreadAttribute`:case`TSTypeAssertion`:case`TypeCastExpression`:case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`TSNonNullExpression`:return!0;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`ConditionalExpression`:return!t.experimentalTernaries&&r===`test`;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;default:return!1}case`FunctionExpression`:switch(i.type){case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`TaggedTemplateExpression`:return!0;case`ExportDefaultDeclaration`:return r===`declaration`;default:return!1}case`ArrowFunctionExpression`:switch(i.type){case`BinaryExpression`:return i.operator!==`|>`||n.extra?.parenthesized;case`NewExpression`:case`CallExpression`:case`OptionalCallExpression`:return r===`callee`;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`TSAsExpression`:case`TSSatisfiesExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:case`TSNonNullExpression`:case`BindExpression`:case`TaggedTemplateExpression`:case`UnaryExpression`:case`LogicalExpression`:case`AwaitExpression`:case`TSTypeAssertion`:case`MatchExpressionCase`:return!0;case`TSInstantiationExpression`:return r===`expression`;case`ConditionalExpression`:return r===`test`;default:return!1}case`ClassExpression`:switch(i.type){case`NewExpression`:return r===`callee`;case`ExportDefaultDeclaration`:return r===`declaration`;default:return!1}case`OptionalMemberExpression`:case`OptionalCallExpression`:case`ChainExpression`:case`TSNonNullExpression`:if(xO(e))return!0;case`CallExpression`:case`MemberExpression`:case`TaggedTemplateExpression`:case`ImportExpression`:if(r===`callee`&&(i.type===`BindExpression`||i.type===`NewExpression`)){let e=n;for(;e;)switch(e.type){case`CallExpression`:case`ImportExpression`:return!0;case`MemberExpression`:case`OptionalMemberExpression`:case`BindExpression`:e=e.object;break;case`TaggedTemplateExpression`:e=e.tag;break;case`TSNonNullExpression`:e=e.expression;break;default:return!1}}return!1;case`BindExpression`:return r===`callee`&&(i.type===`BindExpression`||i.type===`NewExpression`)||r===`object`&&qT(i);case`NGPipeExpression`:return!(i.type===`NGRoot`||i.type===`NGMicrosyntaxExpression`||i.type===`ObjectProperty`&&!n.extra?.parenthesized||zT(i)||r===`arguments`&&KT(i)||r===`right`&&i.type===`NGPipeExpression`||r===`property`&&i.type===`MemberExpression`||i.type===`AssignmentExpression`);case`JSXFragment`:case`JSXElement`:return r===`callee`||r===`left`&&i.type===`BinaryExpression`&&i.operator===`<`||!zT(i)&&i.type!==`ArrowFunctionExpression`&&i.type!==`AssignmentExpression`&&i.type!==`AssignmentPattern`&&i.type!==`BinaryExpression`&&i.type!==`ConditionalExpression`&&i.type!==`ExpressionStatement`&&i.type!==`JsExpressionRoot`&&i.type!==`JSXAttribute`&&i.type!==`JSXElement`&&i.type!==`JSXExpressionContainer`&&i.type!==`JSXFragment`&&i.type!==`LogicalExpression`&&!JT(i)&&!YE(i)&&!LT(i)&&i.type!==`TypeCastExpression`&&i.type!==`VariableDeclarator`&&i.type!==`YieldExpression`&&i.type!==`MatchExpressionCase`&&(r!==`declaration`||i.type!==`ExportDefaultDeclaration`);case`TSInstantiationExpression`:return r===`object`&&qT(i);case`MatchOrPattern`:return i.type===`MatchAsPattern`}return!1}var ZO=U(/* @__PURE__ */ `BlockStatement.BreakStatement.ComponentDeclaration.ClassBody.ClassDeclaration.ClassMethod.ClassProperty.PropertyDefinition.ClassPrivateProperty.ContinueStatement.DebuggerStatement.DeclareComponent.DeclareClass.DeclareExportAllDeclaration.DeclareExportDeclaration.DeclareFunction.DeclareHook.DeclareInterface.DeclareModule.DeclareModuleExports.DeclareNamespace.DeclareVariable.DeclareEnum.DoWhileStatement.EnumDeclaration.ExportAllDeclaration.ExportDefaultDeclaration.ExportNamedDeclaration.ExpressionStatement.ForInStatement.ForOfStatement.ForStatement.FunctionDeclaration.HookDeclaration.IfStatement.ImportDeclaration.InterfaceDeclaration.LabeledStatement.MethodDefinition.ReturnStatement.SwitchStatement.ThrowStatement.TryStatement.TSDeclareFunction.TSEnumDeclaration.TSImportEqualsDeclaration.TSInterfaceDeclaration.TSModuleDeclaration.TSNamespaceExportDeclaration.TypeAlias.VariableDeclaration.WhileStatement.WithStatement`.split(`.`));function QO(e){let t=0,{node:n}=e;for(;n;){let r=e.getParentNode(t++);if(r?.type===`ForStatement`&&r.init===n)return!0;n=r}return!1}function $O(e){return BT(e)}function ek(e){let{parent:t,key:n}=e;switch(t.type){case`NGPipeExpression`:if(n===`arguments`&&e.isLast)return e.callParent(ek);break;case`ObjectProperty`:if(n===`value`)return e.callParent(()=>e.key===`properties`&&e.isLast);break;case`BinaryExpression`:case`LogicalExpression`:if(n===`right`)return e.callParent(ek);break;case`ConditionalExpression`:if(n===`alternate`)return e.callParent(ek);break;case`UnaryExpression`:if(t.prefix&&e.callParent(ek))return!0}return!1}var tk=XO,nk=`string`,rk=`array`,ik=`cursor`,ak=`indent`,ok=`align`,sk=`trim`,ck=`group`,lk=`fill`,uk=`if-break`,dk=`indent-if-break`,fk=`line-suffix`,pk=`line-suffix-boundary`,mk=`line`,hk=`label`,gk=`break-parent`,_k=/* @__PURE__ */ new Set([ik,ak,ok,sk,ck,lk,uk,dk,fk,pk,mk,hk,gk]);function vk(e){if(typeof e==`string`)return nk;if(Array.isArray(e))return rk;if(!e)return;let{type:t}=e;if(_k.has(t))return t}var yk=vk,bk=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function xk(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
|
|
1331
|
+
Expected it to be 'string' or 'object'.`;if(yk(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=bk([..._k].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
|
|
1332
|
+
Expected it to be ${r}.`}var Sk=class extends Error{name=`InvalidDocError`;constructor(e){super(xk(e)),this.doc=e}},Ck={};function wk(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Ck){n(i.pop());continue}n&&i.push(e,Ck);let a=yk(e);if(!a)throw new Sk(e);if(t?.(e)!==!1)switch(a){case rk:case lk:{let t=a===rk?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case uk:i.push(e.flatContents,e.breakContents);break;case ck:if(r&&e.expandedStates)for(let t=e.expandedStates.length,n=t-1;n>=0;--n)i.push(e.expandedStates[n]);else i.push(e.contents);break;case ok:case ak:case dk:case hk:case fk:i.push(e.contents);break;case nk:case ik:case sk:case pk:case mk:case gk:break;default:throw new Sk(e)}}}var Tk=wk;function Ek(e,t){if(typeof e==`string`)return t(e);let n=/* @__PURE__ */ new Map;return r(e);function r(e){return tT(n,e,i)}function i(e){switch(yk(e)){case rk:return t(e.map(r));case lk:return t({...e,parts:e.parts.map(r)});case uk:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case ck:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case ok:case ak:case dk:case hk:case fk:return t({...e,contents:r(e.contents)});case nk:case ik:case sk:case pk:case mk:case gk:return t(e);default:throw new Sk(e)}}}function Dk(e,t,n){let r=n,i=!1;function a(e){if(i)return!1;let n=t(e);n!==void 0&&(i=!0,r=n)}return Tk(e,a),r}function Ok(e){if(e.type===ck&&e.break||e.type===mk&&e.hard||e.type===gk)return!0}function kk(e){return Dk(e,Ok,!1)}function Ak(e){if(e.length>0){let t=eT(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function jk(e){let t=/* @__PURE__ */ new Set,n=[];function r(e){if(e.type===gk&&Ak(n),e.type===ck){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===ck&&n.pop().break&&Ak(n)}Tk(e,r,i,!0)}function Mk(e){return e.type===mk&&!e.hard?e.soft?``:` `:e.type===uk?e.flatContents:e}function Nk(e){return Ek(e,Mk)}function Pk(e){switch(yk(e)){case lk:{let{parts:t}=e;if(t.every(e=>e===``))return``;if(t.length===1)return t[0];break}case ck:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===ck&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case ok:case ak:case dk:case fk:if(!e.contents)return``;break;case uk:if(!e.flatContents&&!e.breakContents)return``;break;case rk:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof eT(0,t,-1)==`string`?t[t.length-1]+=e:t.push(e),t.push(...r)}return t.length===0?``:t.length===1?t[0]:t}case nk:case ik:case sk:case pk:case mk:case hk:case gk:break;default:throw new Sk(e)}return e}function Fk(e){return Ek(e,e=>Pk(e))}function Ik(e,t=aA){return Ek(e,e=>typeof e==`string`?nA(t,e.split(`
|
|
1333
|
+
`)):e)}function Lk(e){if(e.type===mk)return!0}function Rk(e){return Dk(e,Lk,!1)}function zk(e,t){return e.type===hk?{...e,contents:t(e.contents)}:t(e)}function Bk(e){let t=!0;return Tk(e,e=>{switch(yk(e)){case nk:if(e===``)break;case sk:case pk:case mk:case gk:return t=!1,!1}}),t}var Vk=Zw,Hk=Zw,Uk=Zw,Wk=Zw;function Y(e){return Vk(e),{type:ak,contents:e}}function Gk(e,t){return Wk(e),Vk(t),{type:ok,contents:t,n:e}}function Kk(e){return Gk(-1/0,e)}function qk(e){return Gk({type:`root`},e)}function Jk(e){return Gk(-1,e)}function Yk(e,t,n){Vk(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=Y(r);r=Gk(t%n,r),r=Gk(-1/0,r)}return r}var Xk={type:gk},Zk={type:ik};function Qk(e){return Uk(e),{type:lk,parts:e}}function X(e,t={}){return Vk(e),Hk(t.expandedStates,!0),{type:ck,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function $k(e,t){return X(e[0],{...t,expandedStates:e})}function eA(e,t=``,n={}){return Vk(e),t!==``&&Vk(t),{type:uk,breakContents:e,flatContents:t,groupId:n.groupId}}function tA(e,t){return Vk(e),{type:dk,contents:e,groupId:t.groupId,negate:t.negate}}function nA(e,t){Vk(e),Hk(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function rA(e,t){return Vk(t),e?{type:hk,label:e,contents:t}:t}var Z={type:mk},Q={type:mk,soft:!0},iA={type:mk,hard:!0},$=[iA,Xk],aA=[{type:mk,hard:!0,literal:!0},Xk];function oA(e){return Vk(e),{type:fk,contents:e}}var sA={type:pk},cA=`cr`,lA=`crlf`,uA=`\r`,dA=`\r
|
|
1334
|
+
`,fA=`
|
|
1335
|
+
`;function pA(e){return e===cA?uA:e===lA?dA:fA}var mA=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,hA=12288,gA=65510,_A=[12288,12288,65281,65376,65504,65510],vA=4352,yA=262141,bA=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],xA=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},SA=19968,[CA,wA]=TA(bA);function TA(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(SA>=i&&SA<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var EA=e=>e<hA||e>gA?!1:xA(_A,e),DA=e=>e>=CA&&e<=wA?!0:e<vA||e>yA?!1:xA(bA,e),OA=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,kA=e=>OA.test(e),AA=/[^\x20-\x7F]/;function jA(e){if(!e)return 0;if(!AA.test(e))return e.length;let t=0;e=e.replace(mA(),e=>(t+=kA(e)?1:2,``));for(let n of e){let e=n.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||e>=65024&&e<=65039||(t+=EA(e)||DA(e)?2:1)}return t}var MA=jA,NA={type:0},PA={type:1},FA={value:``,length:0,queue:[],get root(){return FA}};function IA(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i=``,a=0,o=0,s=0;for(let e of r)switch(e.type){case 0:u(),n.useTabs?c(1):l(n.tabWidth);break;case 3:{let{string:t}=e;u(),i+=t,a+=t.length;break}case 2:{let{width:t}=e;o+=1,s+=t;break}default:throw Error(`Unexpected indent comment '${e.type}'.`)}return f(),{...e,value:i,length:a,queue:r};function c(e){i+=` `.repeat(e),a+=n.tabWidth*e}function l(e){i+=` `.repeat(e),a+=e}function u(){n.useTabs?d():f()}function d(){o>0&&c(o),p()}function f(){s>0&&l(s),p()}function p(){o=0,s=0}}function LA(e,t,n){if(!t)return e;if(t.type===`root`)return{...e,root:e};if(t===-1/0)return e.root;let r;return r=typeof t==`number`?t<0?PA:{type:2,width:t}:{type:3,string:t},IA(e,r,n)}function RA(e,t){return IA(e,NA,t)}function zA(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===` `||r===` `)t++;else break}return t}function BA(e){let t=zA(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var VA=class{#e=[];#t=``;#n=0;#r=[];#i=[];#a(){let e=this.#t;e!==``&&(this.#e.push(e),this.#n+=e.length,this.#t=``);for(let e of this.#i)this.#r.push(Math.min(e,this.#n));this.#i.length=0}markPosition(){if(this.#r.length+this.#i.length>=2)throw Error(`There are too many 'cursor' in doc.`);this.#i.push(this.#n+this.#t.length)}write(e){this.#t+=e}trim(){let{text:e,count:t}=BA(this.#t);return this.#t=e,this.#a(),t}finish(){return this.#a(),{text:this.#e.join(``),positions:this.#r}}},HA=Symbol(`MODE_BREAK`),UA=Symbol(`MODE_FLAT`),WA=Symbol(`DOC_FILL_PRINTED_LENGTH`);function GA(e,t,n,r,i,a){if(n===1/0)return!0;let o=t.length,s=!1,c=[e],l=``;for(;n>=0;){if(c.length===0){if(o===0)return!0;c.push(t[--o]);continue}let{mode:e,doc:u}=c.pop(),d=yk(u);switch(d){case nk:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=MA(u));break;case rk:case lk:{let t=d===rk?u:u.parts,n=u[WA]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case ak:case ok:case dk:case hk:c.push({mode:e,doc:u.contents});break;case sk:{let{text:e,count:t}=BA(l);l=e,n+=t;break}case ck:{if(a&&u.break)return!1;let t=u.break?HA:e,n=u.expandedStates&&t===HA?eT(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case uk:{let t=(u.groupId?i[u.groupId]||UA:e)===HA?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case mk:if(e===HA||u.hard)return!0;u.soft||(s=!0);break;case fk:r=!0;break;case pk:if(r)return!1}}return!1}function KA(e,t){let n=Object.create(null),r=t.printWidth,i=pA(t.endOfLine),a=0,o=[{indent:FA,mode:HA,doc:e}],s=!1,c=[],l=new VA;for(jk(e);o.length>0;){let{indent:e,mode:u,doc:d}=o.pop();switch(yk(d)){case nk:{let e=i===`
|
|
1336
|
+
`?d:RE(0,d,`
|
|
1337
|
+
`,i);e&&(l.write(e),o.length>0&&(a+=MA(e)));break}case rk:for(let t=d.length-1;t>=0;t--)o.push({indent:e,mode:u,doc:d[t]});break;case ik:l.markPosition();break;case ak:o.push({indent:RA(e,t),mode:u,doc:d.contents});break;case ok:o.push({indent:LA(e,d.n,t),mode:u,doc:d.contents});break;case sk:a-=l.trim();break;case ck:{let t=(function(){if(u===UA&&!s)return{indent:e,mode:d.break?HA:UA,doc:d.contents};s=!1;let t=r-a,i=c.length>0,l={indent:e,mode:UA,doc:d.contents};if(!d.break&&GA(l,o,t,i,n))return l;if(!d.expandedStates)return{indent:e,mode:HA,doc:d.contents};if(!d.break)for(let r=1;r<d.expandedStates.length-1;r++){let a={indent:e,mode:UA,doc:d.expandedStates[r]};if(GA(a,o,t,i,n))return a}return{indent:e,mode:HA,doc:eT(0,d.expandedStates,-1)}})();o.push(t),d.id&&(n[d.id]=t.mode);break}case lk:{let t=r-a,i=d[WA]??0,{parts:s}=d,l=s.length-i;if(l===0)break;let f=s[i+0],p=s[i+1],m={indent:e,mode:UA,doc:f},h={indent:e,mode:HA,doc:f},g=GA(m,[],t,c.length>0,n,!0);if(l===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:UA,doc:p},v={indent:e,mode:HA,doc:p};if(l===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:u,doc:{...d,[WA]:i+2}},x=GA({indent:e,mode:UA,doc:[f,p,y]},[],t,c.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case uk:case dk:{let t=d.groupId?n[d.groupId]:u;if(t===HA){let t=d.type===uk?d.breakContents:d.negate?d.contents:Y(d.contents);t&&o.push({indent:e,mode:u,doc:t})}if(t===UA){let t=d.type===uk?d.flatContents:d.negate?Y(d.contents):d.contents;t&&o.push({indent:e,mode:u,doc:t})}break}case fk:c.push({indent:e,mode:u,doc:d.contents});break;case pk:c.length>0&&o.push({indent:e,mode:u,doc:iA});break;case mk:switch(u){case UA:if(!d.hard){d.soft||(l.write(` `),a+=1);break}s=!0;case HA:if(c.length>0){o.push({indent:e,mode:u,doc:d},...c.reverse()),c.length=0;break}d.literal?(l.write(i),a=0,e.root&&(e.root.value&&l.write(e.root.value),a=e.root.length)):(l.trim(),l.write(i+e.value),a=e.length)}break;case hk:o.push({indent:e,mode:u,doc:d.contents});break;case gk:break;default:throw new Sk(d)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let{text:u,positions:d}=l.finish();if(d.length!==2)return{formatted:u};let[f,p]=d;return{formatted:u,cursorNodeStart:f,cursorNodeText:u.slice(f,p)}}var qA=class extends Error{name=`ArgExpansionBailout`};function JA(e){return(e.type===`ObjectTypeProperty`||e.type===`ObjectTypeInternalSlot`)&&!e.static&&!e.method&&e.kind!==`get`&&e.kind!==`set`&&e.value.type===`FunctionTypeAnnotation`}function YA(e,t){let n=null,r=t;for(;r!==n;)n=r,r=mE(e,r),r=_E(e,r),r=pE(e,r);return r=SE(e,r),r=bE(e,r),r!==!1&&OE(e,r)}var XA=YA,ZA=(e,{originalText:t})=>{let n=G(e);if(XA(t,n))return!0;let r=dT(e);return r!==n&&XA(t,r)},QA=U([`AnyTypeAnnotation`,`ThisTypeAnnotation`,`NumberTypeAnnotation`,`VoidTypeAnnotation`,`BooleanTypeAnnotation`,`BigIntTypeAnnotation`,`SymbolTypeAnnotation`,`StringTypeAnnotation`,`NeverTypeAnnotation`,`UndefinedTypeAnnotation`,`UnknownTypeAnnotation`,`EmptyTypeAnnotation`,`MixedTypeAnnotation`]),$A=U([`TSThisType`,`NullLiteralTypeAnnotation`,`BooleanLiteralTypeAnnotation`,`StringLiteralTypeAnnotation`,`BigIntLiteralTypeAnnotation`,`NumberLiteralTypeAnnotation`,`TSLiteralType`,`TSTemplateLiteralType`]);function ej({type:e}){return e.startsWith(`TS`)&&e.endsWith(`Keyword`)}var tj=ej;function nj(e){return tj(e)||QA(e)||$A(e)||e.type===`GenericTypeAnnotation`&&!e.typeParameters||e.type===`TSTypeReference`&&!e.typeArguments}function rj(e){return(e.type===`TypeAnnotation`||e.type===`TSTypeAnnotation`)&&e.typeAnnotation.type===`FunctionTypeAnnotation`&&!e.static&&!xT(e,e.typeAnnotation)}function ij(e,t){let n=t.split(`.`);for(let t=n.length-1;t>=0;t--){let r=n[t];if(t===0)return e.type===`Identifier`&&e.name===r;if(t===1&&e.type===`MetaProperty`&&e.property.type===`Identifier`&&e.property.name===r){e=e.meta;continue}if(e.type===`MemberExpression`&&!e.optional&&!e.computed&&e.property.type===`Identifier`&&e.property.name===r){e=e.object;continue}return!1}}function aj(e,t){return t.some(t=>ij(e,t))}var oj=/* @__PURE__ */ `it,it.only,it.skip,describe,describe.only,describe.skip,test,test.only,test.skip,test.fixme,test.step,test.describe,test.describe.only,test.describe.skip,test.describe.fixme,test.describe.parallel,test.describe.parallel.only,test.describe.serial,test.describe.serial.only,skip,xit,xdescribe,xtest,fit,fdescribe,ftest`.split(`,`);function sj(e){return aj(e,oj)}function cj(e){return e.type===`Identifier`&&(e.name===`beforeEach`||e.name===`beforeAll`||e.name===`afterEach`||e.name===`afterAll`)}function lj(e){return KT(e)&&e.callee.type===`Identifier`&&[`async`,`inject`,`fakeAsync`,`waitForAsync`].includes(e.callee.name)}function uj(e){return e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`}function dj(e,t){if(e?.type!==`CallExpression`||e.optional)return!1;let n=NE(e);if(n.length===1){if(lj(e)&&dj(t))return UT(n[0]);if(cj(e.callee))return lj(n[0])}else if((n.length===2||n.length===3)&&(n[0].type===`TemplateLiteral`||kT(n[0]))&&sj(e.callee))return n[2]&&!DT(n[2])?!1:(n.length===2?UT(n[1]):uj(n[1])&&iT(n[1]).length<=1)||lj(n[1]);return!1}function fj(e,t){let n=t-1;n=pE(e,n,{backwards:!0}),n=bE(e,n,{backwards:!0}),n=pE(e,n,{backwards:!0});let r=bE(e,n,{backwards:!0});return n!==r}var pj=fj,mj=()=>!0;function hj(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function gj(e,t){let n=e.node,r=[hj(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=` `;OE(a,s(n))&&(e=OE(a,o(n),{backwards:!0})?$:Z),r.push(e)}else r.push($);let c=bE(a,pE(a,s(n)));return c!==!1&&OE(a,c)&&r.push($),r}function _j(e,t,n){let r=e.node,i=hj(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||OE(o,s(r),{backwards:!0})?{doc:oA([$,pj(o,s(r))?$:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[oA([` `,i]),Xk],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function vj(e,t,n={}){let{indent:r=!1,marker:i,filter:a=mj}=n,o=new Set(e.node?.comments?.filter(e=>!(e.leading||e.trailing||e.marker!==i||!a(e))));if(o.size===0)return``;let s=nA($,e.map(({node:n})=>o.has(n)?hj(e,t):``,`comments`).filter(Boolean));return r?Y([$,s]):s}function yj(e,t,n){let r=t[Symbol.for(`printedComments`)],i=n?.filter??mj,a=new Set(e.node?.comments?.filter(e=>!r?.has(e)&&e.leading&&i(e)));return a.size===0?``:e.map(({node:n})=>a.has(n)?gj(e,t):``,`comments`).filter(Boolean)}function bj(e,t,n){let r=e.node?.comments,i=new Set(r?.filter(e=>e.trailing)),a=t[Symbol.for(`printedComments`)],o=n?.filter??mj,s=new Set(r?.filter(e=>i.has(e)&&!a?.has(e)&&o(e)));if(s.size===0)return``;let c=[],l;return e.each(({node:n})=>{i.has(n)&&(l=_j(e,t,l),s.has(n)&&c.push(l.doc))},`comments`),c}function xj(e,t,n){return{leading:yj(e,t,n),trailing:bj(e,t,n)}}function Sj(e,t,n,r){let i=yj(e,n,r),a=bj(e,n,r);return i||a?zk(t,e=>[i,e,a]):t}function Cj(e,t=`es5`){return e.trailingComma===`es5`&&t===`es5`||e.trailingComma===`all`&&(t===`all`||t===`es5`)}function wj(e){let{node:t}=e;return!t.optional||t.type===`Identifier`&&t===e.parent.key?``:KT(t)||qT(t)&&t.computed||t.type===`OptionalIndexedAccessType`?`?.`:`?`}function Tj(e){return e.node.definite||e.match(void 0,(e,t)=>t===`id`&&e.type===`VariableDeclarator`&&e.definite)?`!`:``}var Ej=U([`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`DeclareVariable`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`,`DeclareOpaqueType`,`DeclareTypeAlias`,`DeclareEnum`,`DeclareInterface`]),Dj=e=>{let{node:t}=e;return Ej(t)?e.parent.type!==`DeclareExportDeclaration`&&!t.implicitDeclare:t.declare};function Oj(e){return Dj(e)?`declare `:``}var kj=U([`TSAbstractMethodDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]);function Aj({node:e}){return e.abstract||kj(e)?`abstract `:``}function jj(e){return e.accessibility?e.accessibility+` `:``}var Mj=e=>e.type===`UnaryExpression`&&e.operator===`!`;function Nj(e){return q(e)||!Mj(e)?!1:(e=e.argument,e=Mj(e)?e.argument:e,e.type===`LogicalExpression`)}function Pj(e,t,n){let{node:r}=e,i=r.type===`WithStatement`?`object`:`test`,a=n(i);return Nj(r[i])?a:X([Y([Q,a]),Q])}function Fj(e,t,n){let{node:r}=e;return q(r,K.Dangling,n)?[Y([Q,vj(e,t,{filter:n})]),q(r,K.Dangling|K.Line,n)?$:Q]:``}function Ij(e,t=`es5`){return Cj(e,t)?eA(`,`):``}function Lj(e){return e.semi?`;`:``}var Rj=e=>e.mark!==`commentBeforeArrow`;function zj(e,t,n,r,i){let a=e.node,o=iT(a),s=i&&a.typeParameters?n(`typeParameters`):``;if(o.length===0)return[s,`(`,Fj(e,t,Rj),`)`];let{parent:c}=e,l=dj(c),u=Bj(a),d=[];if(aT(e,(e,r)=>{let i=r===o.length-1;i&&a.rest&&d.push(`...`),d.push(n()),!i&&(d.push(`,`),l||u?d.push(` `):ZA(o[r],t)?d.push($,$):d.push(Z))}),r&&!Uj(e)){if(kk(s)||kk(d))throw new qA;return X([Nk(s),`(`,Nk(d),`)`])}let f=o.every(e=>!Xw(e.decorators));return u&&f||l?[s,`(`,...d,`)`]:(JA(c)||rj(c)||c.type===`TypeAlias`||c.type===`UnionTypeAnnotation`||c.type===`IntersectionTypeAnnotation`||c.type===`FunctionTypeAnnotation`&&c.returnType===a)&&o.length===1&&o[0].name===null&&a.this!==o[0]&&o[0].typeAnnotation&&a.typeParameters===null&&nj(o[0].typeAnnotation)&&!a.rest?t.arrowParens===`always`||a.type===`HookTypeAnnotation`?[`(`,...d,`)`]:d:[s,`(`,Y([Q,...d]),!oT(a)&&e.root.type!==`NGRoot`?Ij(t,`all`):``,Q,`)`]}function Bj(e){if(!e)return!1;let t=iT(e);if(t.length!==1)return!1;let[n]=t;return!q(n)&&(n.type===`ObjectPattern`||n.type===`ArrayPattern`||n.type===`Identifier`&&n.typeAnnotation&&(n.typeAnnotation.type===`TypeAnnotation`||n.typeAnnotation.type===`TSTypeAnnotation`)&&HT(n.typeAnnotation.typeAnnotation)||n.type===`FunctionTypeParam`&&HT(n.typeAnnotation)&&n!==e.rest||n.type===`AssignmentPattern`&&(n.left.type===`ObjectPattern`||n.left.type===`ArrayPattern`)&&(n.right.type===`Identifier`||BT(n.right)&&n.right.properties.length===0||zT(n.right)&&n.right.elements.length===0))}function Vj(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function Hj(e,t){let n=Vj(e);if(!n)return!1;let r=e.typeParameters?.params;if(r){if(r.length>1)return!1;if(r.length===1){let e=r[0];if(e.constraint||e.default)return!1}}return iT(e).length===1&&(HT(n)||kk(t))}function Uj(e){return e.match(e=>e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`,(e,t)=>{if(e.type===`CallExpression`&&t===`arguments`&&e.arguments.length===1&&e.callee.type===`CallExpression`){let t=e.callee.callee;return t.type===`Identifier`||t.type===`MemberExpression`&&!t.computed&&t.object.type===`Identifier`&&t.property.type===`Identifier`}return!1},(e,t)=>e.type===`VariableDeclarator`&&t===`init`||e.type===`ExportDefaultDeclaration`&&t===`declaration`||e.type===`TSExportAssignment`&&t===`expression`||e.type===`AssignmentExpression`&&t===`right`&&e.left.type===`MemberExpression`&&e.left.object.type===`Identifier`&&e.left.object.name===`module`&&e.left.property.type===`Identifier`&&e.left.property.name===`exports`,e=>e.type!==`VariableDeclaration`||e.kind===`const`&&e.declarations.length===1)}function Wj(e){let t=iT(e);return t.length>1&&t.some(e=>e.type===`TSParameterProperty`)}function Gj(e,t){return(t===`params`||t===`this`||t===`rest`)&&Bj(e)}var Kj=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,qj=e=>Kj.test(e);function Jj(e){return e.length===1?e:e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,`$1$2`).replace(/^([+-]?[\d.]+)e[+-]?0+$/,`$1`).replace(/^([+-])?\./,`$10.`).replace(/(\.\d+?)0+(?=e|$)/,`$1`).replace(/\.(?=e|$)/,``)}var Yj=Jj,Xj=Object.freeze({character:`'`,codePoint:39}),Zj=Object.freeze({character:`"`,codePoint:34}),Qj=Object.freeze({preferred:Xj,alternate:Zj}),$j=Object.freeze({preferred:Zj,alternate:Xj});function eM(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?Qj:$j,{length:i}=e,a=0,o=0;for(let t=0;t<i;t++){let i=e.charCodeAt(t);i===n.codePoint?a++:i===r.codePoint&&o++}return(a>o?r:n).character}var tM=/\\(["'\\])|(["'])/g;function nM(e,t){let n=t===`"`?`'`:`"`;return t+RE(0,e,tM,(e,r,i)=>r?r===n?n:e:i===t?`\\`+i:i)+t}var rM=nM;function iM(e,t){/^(?<quote>["']).*\k<quote>$/s.test(e);let n=e.slice(1,-1),r;return r=t.parser===`json`||t.parser===`jsonc`||t.parser===`json-stringify`||t.parser===`json5`&&t.quoteProps===`preserve`&&!t.singleQuote?`"`:t.__isInHtmlAttribute?`'`:eM(n,t.singleQuote),e.charAt(0)===r?e:rM(n,r)}var aM=iM,oM=e=>e.type===`TSEnumMember`,sM=e=>oM(e)?`id`:`key`,cM=e=>e[sM(e)],lM=e=>!oM(e)&&e.computed;function uM(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}var dM=({parser:e})=>e===`typescript`||e===`babel-ts`||e===`oxc-ts`||e===`yuku-ts`;function fM(e,t){let n=cM(e);if(n.type===`Identifier`)return!0;if(!DT(n)||dM(t))return!1;let r=Yj(wT(n));return String(n.value)===r&&uM(r)}function pM(e,t){let{parser:n}=t;if(n===`json`||n===`jsonc`)return!1;let r=cM(e);if(!kT(r))return!1;let{value:i}=r;return aM(wT(r),t).slice(1,-1)!==i||e.type===`TSMethodSignature`&&i===`new`?!1:!!(!(n===`babel-ts`&&e.type===`ClassProperty`||(n===`typescript`||n===`oxc-ts`||n===`yuku-ts`)&&e.type===`PropertyDefinition`)&&qj(i)||(n===`babel`||n===`acorn`||n===`oxc`||n===`yuku`||n===`espree`||n===`meriyah`||n===`__babel_estree`)&&e.type!==`ImportAttribute`&&uM(i)&&String(Number(i))===i)}var mM=/* @__PURE__ */ new WeakMap;function hM(e,t){return tT(mM,e.parent,()=>e.siblings.some(e=>!lM(e)&&kT(cM(e))&&!pM(e,t)))}function gM(e,t){return(t.parser===`json`||t.parser===`jsonc`||t.quoteProps===`consistent`&&hM(e,t))&&fM(e.node,t)}function _M(e,t){return(t.quoteProps===`as-needed`||t.quoteProps===`consistent`&&!hM(e,t))&&pM(e.node,t)}function vM(e,t,n){let{node:r}=e,i=sM(r);if(lM(r))return[`[`,n(i),`]`];if(gM(e,t)){let n=cM(r),a=aM(JSON.stringify(n.type===`Identifier`?n.name:String(n.value)),t);return e.call(()=>Sj(e,a,t),i)}if(_M(e,t)){let{value:n}=cM(r),a=/^\d/.test(n)?Yj(n):n;return e.call(()=>Sj(e,a,t),i)}return n(i)}var yM=U([`VoidTypeAnnotation`,`TSVoidKeyword`,`NullLiteralTypeAnnotation`,`TSNullKeyword`]),bM=U([`ObjectTypeAnnotation`,`TSTypeLiteral`,`GenericTypeAnnotation`,`TSTypeReference`]);function xM(e){return e.key===`elementTypes`&&PT(e.parent)&&e.parent.elementTypes.length>1}function SM(e){let{types:t}=e;if(t.some(e=>q(e)))return!1;let n=t.find(e=>bM(e));return n?t.every(e=>e===n||yM(e)):!1}function CM(e){let{key:t,node:n,parent:r}=e;return!(SM(n)||t===`types`&&MT(r)||t===`types`&&NT(r)||xM(e))}function wM(e,t,n,r){let{node:i}=e;if(SM(i))return nA(` | `,e.map(n,`types`));let a=X(e.map(({isFirst:r})=>{let i=r?eA(`| `):[Z,`| `],a=n();return q(e.node,K.Leading)?[i,Gk(2,Sj(e,a,t))]:[i,Sj(e,Gk(2,a),t)]},`types`));return CM(e)&&(a=Sj(e,a,t)),tk(e,t)?X([Y([Q,a]),Q]):xM(e)?X([Y([eA([`(`,Q]),a]),Q,eA(`)`)]):r?.assignmentLayout===`break-after-operator`||!TM(e)?a:X(Y([Q,a]))}function TM(e){let{key:t,parent:n}=e;return!(t===`typeAnnotation`&&n.type===`TSTypeAssertion`||t===`elementTypes`&&PT(n)||(t===`trueType`||t===`falseType`)&&FT(n)||t===`params`&&QT(n)||t===`typeAnnotation`&&n.type===`FunctionTypeParam`&&!n.name&&e.grandparent.this!==n||e.match(void 0,(e,t)=>t===`typeAnnotation`&&e.type===`FunctionTypeParam`,(e,t)=>t===`params`&&e.type===`FunctionTypeAnnotation`,(e,t)=>t===`value`&&e.type===`ObjectTypeProperty`&&JA(e)))}function EM(e){return nj(e)||HT(e)?!0:MT(e)?SM(e):!1}var DM=/* @__PURE__ */ new WeakSet;function OM(e,t,n=`typeAnnotation`){let{node:{[n]:r}}=e;if(!r)return``;let i=!1;if(r.type===`TSTypeAnnotation`||r.type===`TypeAnnotation`){let t=e.call(kM,n);(t===`=>`||t===`:`&&q(r,K.Leading))&&(i=!0),DM.add(r)}return i?[` `,t(n)]:t(n)}var kM=e=>e.match(e=>e.type===`TSTypeAnnotation`,(e,t)=>(t===`returnType`||t===`typeAnnotation`)&&(e.type===`TSFunctionType`||e.type===`TSConstructorType`))?`=>`:e.match(e=>e.type===`TSTypeAnnotation`,(e,t)=>t===`typeAnnotation`&&(e.type===`TSJSDocNullableType`||e.type===`TSJSDocNonNullableType`||e.type===`TSTypePredicate`))||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`typeAnnotation`&&e.type===`Identifier`,(e,t)=>t===`id`&&e.type===`DeclareFunction`)||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`typeAnnotation`&&e.type===`Identifier`,(e,t)=>t===`id`&&e.type===`DeclareHook`)||e.match(e=>e.type===`TypeAnnotation`,(e,t)=>t===`bound`&&e.type===`TypeParameter`&&e.usesExtendsBound)?``:`:`;function AM(e,t,n){let r=kM(e);return r?[r,` `,n(`typeAnnotation`)]:n(`typeAnnotation`)}var jM=({node:e,key:t,parent:n})=>t===`value`&&e.type===`FunctionExpression`&&(n.type===`ObjectMethod`||n.type===`ClassMethod`||n.type===`ClassPrivateMethod`||n.type===`MethodDefinition`||n.type===`TSAbstractMethodDefinition`||n.type===`TSDeclareMethod`||n.type===`Property`&&lT(n));function MM(e,t,n,r){if(jM(e))return PM(e,t,n);let{node:i}=e,a=!1;if(i.type===`FunctionExpression`&&r?.expandLastArg){let{parent:t}=e;KT(t)&&(NE(t).length>1||iT(i).every(e=>e.type===`Identifier`&&!e.typeAnnotation))&&(a=!0)}let o=zj(e,t,n,a),s=LM(e,n),c=Hj(i,s),l=i.type===`HookDeclaration`?`hook`:`function`;return[Oj(e),i.async?`async `:``,l,i.generator?`*`:``,` `,i.id?n(`id`):``,n(`typeParameters`),X([c?X(o):o,s]),i.body?` `:``,n(`body`),i.declare||!i.body?Lj(t):``]}function NM(e,t,n){let{node:r}=e,{kind:i}=r,a=r.value||r,o=[];return!i||i===`init`||i===`method`||i===`constructor`?a.async&&o.push(`async `):o.push(i,` `),a.generator&&o.push(`*`),o.push(vM(e,t,n),r.optional?`?`:``,r===a?PM(e,t,n):n(`value`)),o}function PM(e,t,n){let{node:r}=e,i=zj(e,t,n),a=LM(e,n),o=Wj(r),s=Hj(r,a),c=[n(`typeParameters`),X([o?X(i,{shouldBreak:!0}):s?X(i):i,a])];return r.body?c.push(` `,n(`body`)):c.push(Lj(t)),c}function FM(e){let t=iT(e);return t.length===1&&!e.typeParameters&&!q(e,K.Dangling)&&t[0].type===`Identifier`&&!t[0].typeAnnotation&&!q(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function IM(e,t){if(t.arrowParens===`always`)return!1;if(t.arrowParens===`avoid`){let{node:t}=e;return FM(t)}return!1}function LM(e,t){let{node:n}=e,r=[OM(e,t,`returnType`)];return n.predicate&&r.push(t(`predicate`)),r}function RM(e,t){if(t.semi)return!1;let{node:n}=e;if(n.type!==`ExpressionStatement`||VM(e,t)||UM(e,t)||HM(e,t))return!1;let{key:r,parent:i}=e;return!!((r===`body`&&(i.type===`Program`||i.type===`BlockStatement`||i.type===`StaticBlock`||i.type===`TSModuleBlock`)||r===`consequent`&&i.type===`SwitchCase`)&&e.call(()=>zM(e,t),`expression`))}function zM(e,t){let{node:n}=e;switch(n.type){case`ParenthesizedExpression`:case`TypeCastExpression`:case`TSTypeAssertion`:case`ArrayExpression`:case`ArrayPattern`:case`TemplateLiteral`:case`TemplateElement`:case`RegExpLiteral`:return!0;case`ArrowFunctionExpression`:if(!IM(e,t))return!0;break;case`UnaryExpression`:{let{prefix:e,operator:t}=n;if(e&&(t===`+`||t===`-`))return!0;break}case`BindExpression`:if(!n.object)return!0;break;case`Literal`:if(n.regex)return!0;break;default:if(WT(n))return!0}return tk(e,t)?!0:IO(n)?e.call(()=>zM(e,t),...RO(n)):!1}var BM=({node:e,parent:t})=>e.type===`ExpressionStatement`&&t.type===`Program`&&t.body.length===1&&(Array.isArray(t.directives)&&t.directives.length===0||!t.directives);function VM(e,t){return(t.parentParser===`markdown`||t.parentParser===`mdx`)&&BM(e)&&WT(e.node.expression)}function HM(e,t){return t.__isHtmlInlineEventHandler&&BM(e)}function UM(e,t){return(t.parser===`__vue_event_binding`||t.parser===`__vue_ts_event_binding`)&&BM(e)}function WM(e,t){if(!RM(e,t))return!1;let n=eT(0,aO(e.node,K.Leading),-1);return!!(n&&QE(n))}var GM=U([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function KM(e,t){let{key:n,parent:r}=e;if(n===`types`&&MT(r)||n===`argument`&&r.type===`JSXSpreadAttribute`||n===`expression`&&r.type===`JSXSpreadChild`||n===`superClass`&&(r.type===`ClassDeclaration`||r.type===`ClassExpression`)||(n===`id`||n===`typeParameters`)&&GM(r)||n===`patterns`&&r.type===`MatchOrPattern`||sO(e))return!0;let{node:i}=e;return oO(i)?!1:i.type===`ExpressionStatement`?WM(e,t):MT(i)?CM(e):!!WT(i)}var qM=KM;function JM(e,t,n=0){let r=0;for(let i=n;i<e.length;++i)e[i]===` `?r=r+t-r%t:r++;return r}var YM=JM;function XM(e,t){let n=e.lastIndexOf(`
|
|
1338
|
+
`);return n===-1?0:YM(e.slice(n+1).match(/^[\t ]*/)[0],t)}var ZM=XM;function QM(e,t,n){if(lN(e)){let r=eN(e,t,n);if(r)return r}let r=iN(e,t,n);return[sA,"`",...e.map(({isLast:e,index:t})=>[n(),e?``:r[t]],`quasis`),"`"]}function $M(e,t,n){let r=n(`quasi`),{node:i}=e,a=``,o=aO(i.quasi,K.Leading)[0];return o&&(a=AE(t.originalText,G(i.typeArguments??i.tag),W(o))?Q:` `),rA(r.label&&{tagged:!0,...r.label},[n(`tag`),n(`typeArguments`),a,sA,r])}function eN(e,t,n){let{node:r}=e,i=r.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some(e=>e.length>0)){t.__inJestEach=!0;let a=iN(e,t,n);t.__inJestEach=!1;let o=a.map(e=>KA(e,{...t,printWidth:1/0,endOfLine:`lf`}).formatted),s=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<r.quasis.length;e++){let t=eT(0,s,-1),n=o[e-1];t.cells.push(n),n.includes(`
|
|
1339
|
+
`)&&(t.hasLineBreak=!0),r.quasis[e].value.raw.includes(`
|
|
1340
|
+
`)&&s.push({hasLineBreak:!1,cells:[]})}let c=Math.max(i.length,...s.map(e=>e.cells.length)),l=Array.from({length:c},()=>0),u=[{cells:i},...s.filter(e=>e.cells.length>0)];for(let e of u)if(!e.hasLineBreak)for(let[t,n]of e.cells.entries())l[t]=Math.max(l[t],MA(n));return[sA,"`",Y([$,nA($,u.map(e=>nA(` | `,e.cells.map((t,n)=>e.hasLineBreak?t:t+` `.repeat(l[n]-MA(t))))))]),$,"`"]}}var tN=/* @__PURE__ */ new WeakMap;function nN(e,t){let{parent:n,index:r}=e;return tT(tN,n,e=>{let{tabWidth:n}=t,r=0;return e.quasis.map(e=>{let t=e.value.raw,i=t.includes(`
|
|
1341
|
+
`)?ZM(t,n):r;return r=i,{indentSize:i,previousQuasiText:t}})})[r]}function rN(e,t,n,r=!0){let{node:i,index:a}=e,o=n(),{quasis:s}=e.parent,c=G(s[a]),l=W(s[a+1]),u=AE(t.originalText,c,l);if(!u){let e=KA(o,{...t,printWidth:1/0}).formatted;e.includes(`
|
|
1342
|
+
`)?u=!0:o=e}if(u&&(q(i)||i.type===`Identifier`||qT(UO(i))||i.type===`ConditionalExpression`||i.type===`SequenceExpression`||AT(i)||GT(i))&&(o=[Y([Q,o]),Q]),!r)return X(["${",o,sA,`}`]);let{indentSize:d,previousQuasiText:f}=nN(e,t);return t.__inJestEach&&(d=Math.max(d,t.tabWidth)),o=d===0&&f.endsWith(`
|
|
1343
|
+
`)?Gk(-1/0,o):Yk(o,d,t.tabWidth),X(["${",o,sA,`}`])}function iN(e,t,n){return e.map(()=>rN(e,t,n),e.node.type===`TSTemplateLiteralType`?`types`:`expressions`)}function aN(e,t,n){return e.map(()=>rN(e,t,n,!1),`expressions`)}function oN(e,t){return Ek(e,e=>typeof e==`string`?t?RE(0,e,/(\\*)`/g,"$1$1\\`"):sN(e):e)}function sN(e){return RE(0,e,/([\\`]|\$\{)/g,`\\$1`)}var cN=/^[fx]?(?:describe|it|test)$/;function lN({node:e,parent:t}){return e.type===`TemplateLiteral`&&t.type===`TaggedTemplateExpression`&&t.quasi===e&&t.tag.type===`MemberExpression`&&t.tag.property.type===`Identifier`&&t.tag.property.name===`each`&&(t.tag.object.type===`Identifier`&&cN.test(t.tag.object.name)||t.tag.object.type===`MemberExpression`&&t.tag.object.property.type===`Identifier`&&(t.tag.object.property.name===`only`||t.tag.object.property.name===`skip`)&&t.tag.object.object.type===`Identifier`&&cN.test(t.tag.object.object.name))}var uN=[(e,t)=>t===`properties`&&e.type===`ObjectExpression`,(e,t)=>t===`arguments`&&e.type===`CallExpression`&&e.callee.type===`Identifier`&&e.callee.name===`Component`,(e,t)=>t===`expression`&&e.type===`Decorator`];function dN(e){let t=e=>e.type===`TemplateLiteral`,n=(e,t)=>YE(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`styles`&&t===`value`;return e.match(t,(e,t)=>zT(e)&&t===`elements`,n,...uN)||e.match(t,n,...uN)}function fN(e){return e.match(e=>e.type===`TemplateLiteral`,(e,t)=>YE(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`template`&&t===`value`,...uN)}function pN(e,t){return q(e,K.Block|K.Leading,({value:e})=>e===` ${t} `)}function mN({node:e,parent:t},n){return pN(e,n)||hN(t)&&pN(t,n)||t.type===`ExpressionStatement`&&pN(t,n)}function hN(e){return e.type===`AsConstExpression`||e.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`}async function gN(e,t,n,r){let{node:i}=n,a=``;for(let[e,t]of i.quasis.entries()){let{raw:n}=t.value;e>0&&(a+=`@prettier-placeholder-`+(e-1)+`-id`),a+=n}let o=_N(await e(a,{parser:`scss`}),aN(n,r,t));if(!o)throw Error(`Couldn't insert all the expressions`);return["`",Y([$,o]),Q,"`"]}function _N(e,t){if(!Xw(t))return e;let n=0,r=Ek(Fk(e),e=>typeof e!=`string`||!e.includes(`@prettier-placeholder`)?e:e.split(/@prettier-placeholder-(\d+)-id/).map((e,r)=>r%2==0?Ik(e):(n++,t[e])));return t.length===n?r:null}function vN(e){return e.match(void 0,(e,t)=>t===`quasi`&&e.type===`TaggedTemplateExpression`&&aj(e.tag,[`css`,`css.global`,`css.resolve`]))||e.match(void 0,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`,(e,t)=>t===`children`&&e.type===`JSXElement`&&e.openingElement.name.type===`JSXIdentifier`&&e.openingElement.name.name===`style`&&e.openingElement.attributes.some(e=>e.type===`JSXAttribute`&&e.name.type===`JSXIdentifier`&&e.name.name===`jsx`))}function yN(e){return e.type===`Identifier`&&e.name===`styled`}function bN(e){return/^[A-Z]/.test(e.object.name)&&e.property.name===`extend`}function xN({parent:e}){if(!e||e.type!==`TaggedTemplateExpression`)return!1;let t=e.tag.type===`ParenthesizedExpression`?e.tag.expression:e.tag;switch(t.type){case`MemberExpression`:return yN(t.object)||bN(t);case`CallExpression`:return yN(t.callee)||t.callee.type===`MemberExpression`&&(t.callee.object.type===`MemberExpression`&&(yN(t.callee.object.object)||bN(t.callee.object))||t.callee.object.type===`CallExpression`&&yN(t.callee.object.callee));case`Identifier`:return t.name===`css`;default:return!1}}function SN({parent:e,grandparent:t}){return t?.type===`JSXAttribute`&&e.type===`JSXExpressionContainer`&&t.name.type===`JSXIdentifier`&&t.name.name===`css`}var CN=e=>vN(e)||xN(e)||SN(e)||dN(e);async function wN(e,t,n,r){let{node:i}=n,a=i.quasis.length,o=aN(n,r,t),s=[];for(let t=0;t<a;t++){let n=i.quasis[t],r=t===0,c=t===a-1,l=n.value.cooked,u=l.split(`
|
|
1344
|
+
`),d=u.length;if(!c&&/#[^\n\r]*$/.test(u[d-1]))return null;let f=d>2&&u[0].trim()===``&&u[1].trim()===``,p=d>2&&u[d-1].trim()===``&&u[d-2].trim()===``,m=u.every(e=>/^\s*(?:#[^\n\r]*)?$/.test(e)),h;h=m?TN(u):await e(l,{parser:`graphql`}),h?(h=oN(h,!1),!r&&f&&s.push(``),s.push(h),!c&&p&&s.push(``)):!r&&!c&&f&&s.push(``),c||s.push(o[t])}return["`",Y([$,nA($,s)]),$,"`"]}function TN(e){let t=[],n=!1,r=e.map(e=>e.trim());for(let[e,i]of r.entries())i!==``&&(r[e-1]===``&&n?t.push([$,i]):t.push(i),n=!0);return t.length===0?null:nA($,t)}function EN({node:e,parent:t}){return mN({node:e,parent:t},`GraphQL`)||t&&(t.type===`TaggedTemplateExpression`&&(t.tag.type===`MemberExpression`&&t.tag.object.name===`graphql`&&t.tag.property.name===`experimental`||t.tag.type===`Identifier`&&(t.tag.name===`gql`||t.tag.name===`graphql`))||t.type===`CallExpression`&&t.callee.type===`Identifier`&&t.callee.name===`graphql`)}var DN=0;async function ON(e,t,n,r,i){let{node:a}=r,o=DN;DN=DN+1>>>0;let s=e=>`PRETTIER_HTML_PLACEHOLDER_${e}_${o}_IN_JS`,c=a.quasis.map((e,t,n)=>t===n.length-1?e.value.cooked:e.value.cooked+s(t)).join(``),l=aN(r,i,n),u=new RegExp(s(`(\\d+)`),`g`),d=0,f=Ek(await t(c,{parser:e,__onHtmlRoot(e){d=e.children.length}}),e=>{if(typeof e!=`string`)return e;let t=[],n=e.split(u);for(let e=0;e<n.length;e++){let r=n[e];if(e%2==0){r&&(r=sN(r),i.__embeddedInHtml&&(r=RE(0,r,/<\/(?=script\b)/gi,`<\\/`)),t.push(r));continue}let a=Number(r);t.push(l[a])}return t}),p=/^\s/.test(c)?` `:``,m=/\s$/.test(c)?` `:``,h=i.htmlWhitespaceSensitivity===`ignore`?$:p&&m?Z:null;return h?X(["`",Y([h,X(f)]),h,"`"]):rA({hug:!1},X(["`",p,d>1?Y(X(f)):X(f),m,"`"]))}function kN(e){return mN(e,`HTML`)||e.match(e=>e.type===`TemplateLiteral`,(e,t)=>e.type===`TaggedTemplateExpression`&&e.tag.type===`Identifier`&&e.tag.name===`html`&&t===`quasi`)}var AN=ON.bind(void 0,`html`),jN=ON.bind(void 0,`angular`);async function MN(e,t,n){let{node:r}=n,i=RE(0,r.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(e,t)=>`\\`.repeat(t.length/2)+"`"),a=NN(i),o=a!==``;o&&(i=RE(0,i,RegExp(`^${a}`,`gm`),``));let s=oN(await e(i,{parser:`markdown`,__inJsTemplate:!0}),!0);return["`",o?Y([Q,s]):[aA,Kk(s)],Q,"`"]}function NN(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?``:t[1]}function PN({node:e,parent:t}){return t?.type===`TaggedTemplateExpression`&&e.quasis.length===1&&t.tag.type===`Identifier`&&(t.tag.name===`md`||t.tag.name===`markdown`)}var FN=[{test:CN,print:gN},{test:EN,print:wN},{test:kN,print:AN},{test:fN,print:jN},{test:PN,print:MN}].map(({test:e,print:t})=>({test:e,print:LN(t)}));function IN(e){let{node:t}=e;if(t.type!==`TemplateLiteral`||RN(t))return;let n=FN.find(({test:t})=>t(e));if(n)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===``?"``":n.print}function LN(e){return async(...t)=>{let n=await e(...t);return n&&rA({embed:!0,...n.label},n)}}function RN({quasis:e}){return e.some(({value:{cooked:e}})=>e===null)}var zN=IN;function BN(e,t){e.type===`ChainExpression`?UN(t):(e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`)&&WN(t)}function VN(e){if(qT(e))return`object`;if(KT(e))return`callee`;if(XT(e))return`expression`}function HN(e){let t=VN(e);if(t)return e[t]}function UN(e){for(e=HN(e);e.type===`MemberExpression`||e.type===`CallExpression`||e.type===`TSNonNullExpression`;e=HN(e)){let t=VN(e),n=e[t];n.type===`ChainExpression`&&(e[t]=n.expression)}}function WN(e){for(e=HN(e);e.type===`MemberExpression`||e.type===`CallExpression`;e=HN(e))e.type=`Optional${e.type}`}function GN(e,t,n){let r=t[n];(kT(r)||DT(r))&&(e[n]=String(r.value)),r.type===`Identifier`&&(e[n]=r.name)}function KN(e,t){(e.type===`Property`||e.type===`ObjectProperty`||e.type===`MethodDefinition`||e.type===`ClassProperty`||e.type===`ClassMethod`||e.type===`PropertyDefinition`||e.type===`TSDeclareMethod`||e.type===`TSPropertySignature`||e.type===`TSMethodSignature`||e.type===`ObjectTypeProperty`||e.type===`ImportAttribute`||e.type===`RecordDeclarationProperty`||e.type===`RecordDeclarationStaticProperty`)&&!e.computed&&GN(t,e,`key`),e.type===`TSEnumMember`&&GN(t,e,`id`)}function qN(e,t){e.type===`RegExpLiteral`&&(t.flags=[...e.flags].sort().join(``)),e.type===`Literal`&&`regex`in e&&(t.regex.flags=[...e.regex.flags].sort().join(``))}var JN=/* @__PURE__ */ new Set([`range`,`raw`,`comments`,`extra`,`start`,`end`,`loc`,`errors`,`tokens`,`trailingComma`,`docblock`,`__contentEnd`]),YN=e=>{for(let t of e.quasis)delete t.value};function XN(e,t,n){if(e.type===`Program`&&delete t.sourceType,BN(e,t),KN(e,t),qN(e,t),(TT(e)||e.type===`BigIntLiteralTypeAnnotation`)&&`bigint`in e&&(t.bigint=e.bigint.toLowerCase()),e.type===`EmptyStatement`&&!cT({node:e,parent:n})||e.type===`JSXText`||e.type===`JSXExpressionContainer`&&(e.expression.type===`Literal`||e.expression.type===`StringLiteral`)&&e.expression.value===` `)return null;if(e.type===`JSXElement`&&e.openingElement.name.type===`JSXIdentifier`&&e.openingElement.name.name===`style`&&e.openingElement.attributes.some(e=>e.type===`JSXAttribute`&&e.name.name===`jsx`))for(let{type:e,expression:n}of t.children)e===`JSXExpressionContainer`&&n.type===`TemplateLiteral`&&YN(n);e.type===`JSXAttribute`&&e.name.name===`css`&&e.value.type===`JSXExpressionContainer`&&e.value.expression.type===`TemplateLiteral`&&YN(t.value.expression),e.type===`JSXAttribute`&&kT(e.value)&&/["']|"|'/.test(e.value.value)&&(t.value.value=RE(0,e.value.value,/["']|"|'/g,`"`));let r=e.expression||e.callee;if(e.type===`Decorator`&&r.type===`CallExpression`&&r.callee.name===`Component`&&r.arguments.length===1){let n=e.expression.arguments[0].properties;for(let[e,r]of t.expression.arguments[0].properties.entries())switch(n[e].key.name){case`styles`:zT(r.value)&&YN(r.value.elements[0]);break;case`template`:r.value.type===`TemplateLiteral`&&YN(r.value)}}e.type===`TaggedTemplateExpression`&&(e.tag.type===`MemberExpression`||e.tag.type===`Identifier`&&(e.tag.name===`gql`||e.tag.name===`graphql`||e.tag.name===`css`||e.tag.name===`md`||e.tag.name===`markdown`||e.tag.name===`html`)||e.tag.type===`CallExpression`)&&YN(t.quasi),(e.type===`CallExpression`||e.type===`MemberExpression`)&&!e.optional&&delete t.optional,e.type===`TemplateLiteral`&&YN(t)}XN.ignoredProperties=JN;var ZN=/\*\/$/,QN=/^\/\*\*?/,$N=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,eP=/(^|\s+)\/\/([^\n\r]*)/g,tP=/^(\r?\n)+/,nP=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,rP=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,iP=/(\r?\n|^) *\* ?/g,aP=[];function oP(e){let t=e.match($N);return t?t[0].trimStart():``}function sP(e){let t=e.match($N)?.[0];return t==null?e:e.slice(t.length)}function cP(e){e=RE(0,e.replace(QN,``).replace(ZN,``),iP,`$1`);let t=``;for(;t!==e;)t=e,e=RE(0,e,nP,`
|
|
1345
|
+
$1 $2
|
|
1346
|
+
`);e=e.replace(tP,``).trimEnd();let n=Object.create(null),r=RE(0,e,rP,``).replace(tP,``).trimEnd(),i;for(;i=rP.exec(e);){let e=RE(0,i[2],eP,``);if(typeof n[i[1]]==`string`||Array.isArray(n[i[1]])){let t=n[i[1]];n[i[1]]=[...aP,...Array.isArray(t)?t:[t],e]}else n[i[1]]=e}return{comments:r,pragmas:n}}function lP({comments:e=``,pragmas:t={}}){let n=Object.keys(t),r=n.flatMap(e=>uP(e,t[e])).map(e=>` * ${e}
|
|
1347
|
+
`).join(``);if(!e){if(n.length===0)return``;if(n.length===1&&!Array.isArray(t[n[0]])){let e=t[n[0]];return`/** ${uP(n[0],e)[0]} */`}}let i=e.split(`
|
|
1348
|
+
`).map(e=>` * ${e}`).join(`
|
|
1349
|
+
`)+`
|
|
1350
|
+
`;return`/**
|
|
1351
|
+
`+(e?i:``)+(e&&n.length>0?` *
|
|
1352
|
+
`:``)+r+` */`}function uP(e,t){return[...aP,...Array.isArray(t)?t:[t]].map(t=>`@${e} ${t}`.trim())}var dP=`format`;function fP(e){if(!e.startsWith(`#!`))return``;let t=e.indexOf(`
|
|
1353
|
+
`);return t===-1?e:e.slice(0,t)}var pP=fP;function mP(e){let t=pP(e);t&&(e=e.slice(t.length+1));let{pragmas:n,comments:r}=cP(oP(e));return{shebang:t,text:e,pragmas:n,comments:r}}function hP(e){let{shebang:t,text:n,pragmas:r,comments:i}=mP(e),a=sP(n),o=lP({pragmas:{[dP]:``,...r},comments:i.trimStart()});return(t?`${t}
|
|
1354
|
+
`:``)+o+(a.startsWith(`
|
|
1355
|
+
`)?`
|
|
1356
|
+
`:`
|
|
1357
|
+
|
|
1358
|
+
`)+a}function gP(e){if(!qE(e)||!e.value.includes(`
|
|
1359
|
+
`))return[];let t=[];for(let n of`*${e.value}*`.split(`
|
|
1360
|
+
`)){if(n=n.trimStart(),!n.startsWith(`*`))return[];t.push(n)}return t}var _P=/* @__PURE__ */ new WeakMap;function vP(e){return tT(_P,e,gP)}function yP(e){return vP(e).length>0}function bP(e,t){let n=e.node;if(JE(n))return t.originalText.slice(W(n),G(n)).trimEnd();if(yP(n))return xP(n);if(qE(n))return[`/*`,Ik(n.value),`*/`];throw Error(`Not a comment: `+JSON.stringify(n))}function xP(e){let t=vP(e),n=e.value[0]===`*`&&e.value[1]!==`*`;return[`/`,t.map((e,r)=>{if(r===0)return[e.trimEnd(),$];if(r===t.length-1)return[` `,e];let i=e.trimEnd(),a=[` `,i];return n&&i!==`*`&&e.endsWith(` `)?[a,` `,qk(aA)]:[a,$]}),`/`]}function SP(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var CP=new class{#e;constructor(e){this.#e=new Set(e)}getLeadingWhitespaceCount(e){let t=this.#e,n=0;for(let r=0;r<e.length&&t.has(e.charAt(r));r++)n++;return n}getTrailingWhitespaceCount(e){let t=this.#e,n=0;for(let r=e.length-1;r>=0&&t.has(e.charAt(r));r--)n++;return n}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return this.#e.has(e.charAt(0))}hasTrailingWhitespace(e){return this.#e.has(eT(0,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let n=`[${SP([...this.#e].join(``))}]+`,r=new RegExp(t?`(${n})`:n);return e.split(r)}hasWhitespaceCharacter(e){let t=this.#e;return Array.prototype.some.call(e,e=>t.has(e))}hasNonWhitespaceCharacter(e){let t=this.#e;return Array.prototype.some.call(e,e=>!t.has(e))}isWhitespaceOnly(e){let t=this.#e;return Array.prototype.every.call(e,e=>t.has(e))}#t(e){let t=1/0;for(let n of e.split(`
|
|
1361
|
+
`)){if(n.length===0)continue;let e=this.getLeadingWhitespaceCount(n);if(e===0)return 0;n.length!==e&&e<t&&(t=e)}return t===1/0?0:t}dedentString(e){let t=this.#t(e);return t===0?e:e.split(`
|
|
1362
|
+
`).map(e=>e.slice(t)).join(`
|
|
1363
|
+
`)}}(`
|
|
1364
|
+
\r `);function wP(e){return e.type===`JSXText`&&(CP.hasNonWhitespaceCharacter(wT(e))||!/\n/.test(wT(e)))}function TP(e){let{node:t,parent:n}=e;if(!WT(t)||!WT(n))return!1;let{index:r,siblings:i}=e,a;for(let e=r;e>0;e--){let t=i[e-1];if(t.type!==`JSXText`||wP(t)){a=t;break}}return a?.type===`JSXExpressionContainer`&&a.expression.type===`JSXEmptyExpression`&&oO(a.expression)}function EP(e){return oO(e.node)||TP(e)}var DP=EP,OP=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function kP(e){return e.type===`CallExpression`&&!e.optional&&e.arguments.length===1&&e.callee.type===`Identifier`&&e.callee.name===`Boolean`}var AP=0;function jP(e,t,n){let{node:r,parent:i,grandparent:a,key:o}=e,s=o!==`body`&&(i.type===`IfStatement`||i.type===`WhileStatement`||i.type===`SwitchStatement`||i.type===`DoWhileStatement`),c=r.operator===`|>`&&e.root.extra?.__isUsingHackPipeline,l=MP(e,t,n,!1,s);if(s)return l;if(c)return X(l);if(o===`callee`&&JT(i)||i.type===`UnaryExpression`&&!q(r)||qT(i)&&!i.computed)return X([Y([Q,...l]),Q]);let u=LT(i)||i.type===`JSXExpressionContainer`&&a.type===`JSXAttribute`||r.operator!==`|`&&i.type===`JsExpressionRoot`||r.type!==`NGPipeExpression`&&(i.type===`NGRoot`&&t.parser===`__ng_binding`||i.type===`NGMicrosyntaxExpression`&&a.type===`NGMicrosyntax`&&a.body.length===1)||r===i.body&&i.type===`ArrowFunctionExpression`||r!==i.body&&i.type===`ForStatement`||i.type===`ConditionalExpression`&&!LT(a)&&!JT(a)||i.type===`TemplateLiteral`||o===`argument`&&i.type===`UnaryExpression`||o===`arguments`&&kP(i),d=i.type===`AssignmentExpression`||i.type===`VariableDeclarator`||i.type===`ClassProperty`||i.type===`PropertyDefinition`||i.type===`TSAbstractPropertyDefinition`||i.type===`ClassPrivateProperty`||YE(i),f=GT(r.left)&&pO(r.operator,r.left.operator);if(u||NP(r)&&!f||!NP(r)&&d)return X(l);if(l.length===0)return``;let p=WT(r.right),m=l.findIndex(e=>typeof e!=`string`&&!Array.isArray(e)&&e.type===ck),h=l.slice(0,m===-1?1:m+1),g=l.slice(h.length,p?-1:void 0),_=Symbol(`logicalChain-`+ ++AP),v=X([...h,Y(g)],{id:_});return p?X([v,tA(eT(0,l,-1),{groupId:_})]):v}function MP(e,t,n,r,i){let{node:a}=e;if(!GT(a))return[X(n())];let o=[];pO(a.operator,a.left.operator)?o=e.call(()=>MP(e,t,n,!0,i),`left`):o.push(X(n(`left`)));let s=NP(a),c=a.right.type===`ChainExpression`?a.right.expression:a.right,l=(a.type===`NGPipeExpression`||a.operator===`|>`||FP(e,t))&&!zO(t.originalText,c),u=!q(c,K.Leading,QE)&&zO(t.originalText,c),d=a.type===`NGPipeExpression`?`|`:a.operator,f=a.type===`NGPipeExpression`&&a.arguments.length>0?X(Y([Q,`: `,nA([Z,`: `],e.map(()=>Gk(2,X(n())),`arguments`))])):``,p;if(s)p=[d,zO(t.originalText,c)?Y([Z,n(`right`),f]):[` `,n(`right`),f]];else{let r=d===`|>`&&e.root.extra?.__isUsingHackPipeline?e.call(()=>MP(e,t,n,!0,i),`right`):n(`right`);if(t.experimentalOperatorPosition===`start`){let e=``;if(u)switch(yk(r)){case rk:e=r[0],r.shift();break;case hk:e=r.contents[0],r.contents.shift()}p=[Z,e,d,` `,r,f]}else p=[l?Z:``,d,l?` `:Z,r,f]}let{parent:m}=e,h=q(a.left,K.Trailing|K.Line);if((h||!(i&&a.type===`LogicalExpression`)&&m.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type)&&(p=X(p,{shouldBreak:h})),t.experimentalOperatorPosition===`start`?o.push(s||u?` `:``,p):o.push(l?``:` `,p),r&&q(a)){let n=Fk(Sj(e,o,t));return n.type===lk?n.parts:Array.isArray(n)?n:[n]}return o}function NP(e){return e.type===`LogicalExpression`&&!!(BT(e.right)&&e.right.properties.length>0||zT(e.right)&&e.right.elements.length>0||WT(e.right))}var PP=e=>e.type===`BinaryExpression`&&e.operator===`|`;function FP(e,t){return(t.parser===`__vue_expression`||t.parser===`__vue_ts_expression`)&&PP(e.node)&&!e.hasAncestor(e=>!PP(e)&&e.type!==`JsExpressionRoot`)}function IP(e,t,n){let{node:r}=e;if(r.type.startsWith(`NG`))switch(r.type){case`NGRoot`:return n(`node`);case`NGPipeExpression`:return jP(e,t,n);case`NGChainedExpression`:return X(nA([`;`,Z],e.map(()=>BP(e)?n():[`(`,n(),`)`],`expressions`)));case`NGEmptyExpression`:return``;case`NGMicrosyntax`:return e.map(()=>[e.isFirst?``:LP(e)?` `:[`;`,Z],n()],`body`);case`NGMicrosyntaxKey`:return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(r.name)?r.name:JSON.stringify(r.name);case`NGMicrosyntaxExpression`:return[n(`expression`),r.alias===null?``:[` as `,n(`alias`)]];case`NGMicrosyntaxKeyedExpression`:{let{index:t,parent:i}=e,a=LP(e)||RP(e)||(t===1&&(r.key.name===`then`||r.key.name===`else`||r.key.name===`as`)||t===2&&(r.key.name===`else`&&i.body[t-1].type===`NGMicrosyntaxKeyedExpression`&&i.body[t-1].key.name===`then`||r.key.name===`track`))&&i.body[0].type===`NGMicrosyntaxExpression`;return[n(`key`),a?` `:`: `,n(`expression`)]}case`NGMicrosyntaxLet`:return[`let `,n(`key`),r.value===null?``:[` = `,n(`value`)]];case`NGMicrosyntaxAs`:return[n(`key`),` as `,n(`alias`)];default:throw new OP(r,`Angular`)}}function LP({node:e,index:t}){return e.type===`NGMicrosyntaxKeyedExpression`&&e.key.name===`of`&&t===1}function RP(e){let{node:t}=e;return e.parent.body[1].key.name===`of`&&t.type===`NGMicrosyntaxKeyedExpression`&&t.key.name===`track`&&t.key.type===`NGMicrosyntaxKey`}var zP=U([`CallExpression`,`OptionalCallExpression`,`AssignmentExpression`]);function BP({node:e}){return FO(e,zP)}function VP(e,t,n){let{node:r}=e;return X([nA(Z,e.map(n,`decorators`)),WP(r,t)?$:Z])}function HP(e,t,n){return GP(e.node)?[nA($,e.map(n,`declaration`,`decorators`)),$]:``}function UP(e,t,n){let{node:r,parent:i}=e,{decorators:a}=r;if(!Xw(a)||GP(i)||DP(e))return``;let o=r.type===`ClassExpression`||r.type===`ClassDeclaration`||WP(r,t);return[e.key===`declaration`&&RT(i)?$:o?Xk:``,nA(Z,e.map(n,`decorators`)),Z]}function WP(e,t){return e.decorators.some(e=>OE(t.originalText,G(e)))}function GP(e){if(e.type!==`ExportDefaultDeclaration`&&e.type!==`ExportNamedDeclaration`&&e.type!==`DeclareExportDeclaration`)return!1;let t=e.declaration?.decorators;return Xw(t)&&xT(e,t[0])}function KP(e){return e.type===`UnaryExpression`&&(e.operator===`+`||e.operator===`-`)&&DT(e.argument)}function qP(e,t,n){let{node:r}=e,i=[],a=PT(r)?`elementTypes`:`elements`,o=r[a];if(o.length===0&&!r.inexact)i.push(X([`[`,Fj(e,t),`]`]));else{let s=eT(0,o,-1),c=s?.type!==`RestElement`&&!r.inexact,l=s===null,u=Symbol(`array`),d=!t.__inJestEach&&o.length>1&&o.every((e,t,n)=>{if(!zT(e)&&!BT(e))return!1;let r=e?.type,i=n[t+1];if(i&&r!==i.type)return!1;let a=zT(e)?`elements`:`properties`;return e[a]&&e[a].length>1})||q(r,K.Dangling|K.Line),f=JP(r,t),p=c?l?`,`:Cj(t)?f?eA(`,`,``,{groupId:u}):eA(`,`):``:``;i.push(X([`[`,Y([Q,f?ZP(e,t,n,p):[XP(e,t,n,a,r.inexact),p],vj(e,t)]),Q,`]`],{shouldBreak:d,id:u}))}return i.push(wj(e),OM(e,n)),i}function JP(e,t){return zT(e)&&e.elements.length>0&&e.elements.every(e=>e&&(DT(e)||KP(e)&&!q(e.argument))&&!q(e,K.Trailing|K.Line,e=>!OE(t.originalText,W(e),{backwards:!0})))}function YP({node:e},{originalText:t}){let n=G(e);if(n===W(e))return!1;let{length:r}=t;for(;n<r&&t[n]!==`,`;)n=_E(t,SE(t,n+1));return XA(t,n)}function XP(e,t,n,r,i){let a=[];return e.each(({node:r,isLast:o})=>{a.push(r?X(n()):``),(!o||i)&&a.push([`,`,Z,r&&YP(e,t)?Q:``])},r),i&&a.push(`...`),a}function ZP(e,t,n,r){let i=[];return e.each(({isLast:a,next:o})=>{i.push([n(),a?r:`,`]),a||i.push(YP(e,t)?[$,$]:q(o,K.Leading|K.Line)?$:Z)},`elements`),Qk(i)}function QP(e){return e.quasis.some(e=>e.value.raw.includes(`
|
|
1365
|
+
`))}function $P(e,t){return(e.type===`TemplateLiteral`&&QP(e)||e.type===`TaggedTemplateExpression`&&QP(e.quasi))&&!OE(t,W(e),{backwards:!0})}var eF=/* @__PURE__ */ new WeakMap;function tF(e){return tT(eF,e,e=>e.type===`ConditionalExpression`&&!gO(e,e=>e.type===`ObjectExpression`))}var nF=e=>e.type===`SequenceExpression`;function rF(e,t,n,r={}){let i=[],a,o=[],s=!1,c=!r.expandLastArg&&e.node.body.type===`ArrowFunctionExpression`,l;(function u(){let{node:d}=e,f=iF(e,t,n,r);if(i.length===0)i.push(f);else{let{leading:n,trailing:r}=xj(e,t);i.push([n,f]),o.unshift(r)}c&&(s||=d.returnType&&iT(d).length>0||d.typeParameters||iT(d).some(e=>e.type!==`Identifier`)),!c||d.body.type!==`ArrowFunctionExpression`?(a=n(`body`,r),l=d.body):e.call(u,`body`)})();let u=!zO(t.originalText,l)&&(nF(l)||aF(l,a,t)||!s&&tF(l)),d=e.key===`callee`&&YT(e.parent),f=Symbol(`arrow-chain`),p=oF(e,r,{signatureDocs:i,shouldBreak:s}),m=!1,h=!1,g=!1;return c&&(d||r.assignmentLayout)&&(h=!0,g=!q(e.node,K.Leading&K.Line),m=r.assignmentLayout===`chain-tail-arrow-chain`||d&&!u),a=sF(e,t,r,{bodyDoc:a,bodyComments:o,functionBody:l,shouldPutBodyOnSameLine:u}),X([X(h?Y([g?Q:``,p]):p,{shouldBreak:m,id:f}),` =>`,c?tA(a,{groupId:f}):X(a),c&&d?eA(Q,``,{groupId:f}):``])}function iF(e,t,n,r){let{node:i}=e,a=[];if(i.async&&a.push(`async `),IM(e,t))a.push(n([`params`,0]));else{let i=r.expandLastArg||r.expandFirstArg,o=LM(e,n);if(i){if(kk(o))throw new qA;o=X(Nk(o))}a.push(X([zj(e,t,n,i,!0),o]))}let o=vj(e,t,{marker:`commentBeforeArrow`});return o&&a.push(` `,o),a}function aF(e,t,n){return zT(e)||BT(e)||e.type===`ArrowFunctionExpression`||e.type===`DoExpression`||e.type===`BlockStatement`||WT(e)||t.label?.hug!==!1&&(t.label?.embed||$P(e,n.originalText))}function oF(e,t,{signatureDocs:n,shouldBreak:r}){if(n.length===1)return n[0];let{parent:i,key:a}=e;return a!==`callee`&&YT(i)||GT(i)?X([n[0],` =>`,Y([Z,nA([` =>`,Z],n.slice(1))])],{shouldBreak:r}):a===`callee`&&YT(i)||t.assignmentLayout?X(nA([` =>`,Z],n),{shouldBreak:r}):X(Y(nA([` =>`,Z],n)),{shouldBreak:r})}function sF(e,t,n,{bodyDoc:r,bodyComments:i,functionBody:a,shouldPutBodyOnSameLine:o}){let{node:s,parent:c}=e,l=n.expandLastArg?Ij(t,`all`):``,u=(n.expandLastArg||c.type===`JSXExpressionContainer`)&&!q(s)?Q:``;return o&&tF(a)?[` `,X([eA(``,`(`),Y([Q,r]),eA(``,`)`),l,u]),i]:o?[` `,r,i]:[Y([Z,r,i]),l,u]}var cF=.25;function lF(e,t){let{printWidth:n}=t;if(q(e))return!1;let r=n*cF;if(e.type===`ThisExpression`||e.type===`Identifier`&&e.name.length<=r||KP(e)&&!q(e.argument))return!0;let i=e.type===`Literal`&&`regex`in e&&e.regex.pattern||e.type===`RegExpLiteral`&&e.pattern;return i?i.length<=r:kT(e)?aM(wT(e),t).length<=r:e.type===`TemplateLiteral`?e.expressions.length===0&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes(`
|
|
1366
|
+
`):e.type===`UnaryExpression`?lF(e.argument,{printWidth:n}):e.type===`CallExpression`&&e.arguments.length===0&&e.callee.type===`Identifier`?e.callee.name.length<=r-2:VT(e)}function uF(e){return qT(e)||e.type===`BindExpression`&&!!e.object}function dF(e){if(e.length<=1)return!1;let t=0;for(let n of e)if(UT(n)){if(t+=1,t>1)return!0}else if(n=UO(n),KT(n)){for(let e of NE(n))if(UT(e))return!0}return!1}function fF(e){let{node:t,parent:n,key:r}=e;return r===`callee`&&KT(t)&&KT(n)&&n.arguments.length>0&&t.arguments.length>n.arguments.length}var pF=/* @__PURE__ */ new Set([`!`,`-`,`+`,`~`]),mF=U([`Identifier`,`ThisExpression`,`Super`,`PrivateName`,`PrivateIdentifier`]);function hF(e,t=2){if(t<=0)return!1;let n=e=>hF(e,t-1);if(e=UO(e),OT(e))return MA(e.pattern??e.regex.pattern)<=5;if(VT(e)||mF(e)||e.type===`ArgumentPlaceholder`)return!0;if(e.type===`TemplateLiteral`)return e.quasis.every(e=>!e.value.raw.includes(`
|
|
1367
|
+
`))&&e.expressions.every(n);if(BT(e))return e.properties.every(e=>!e.computed&&(e.shorthand||e.value&&n(e.value)));if(zT(e))return e.elements.every(e=>e===null||n(e));if(YT(e)){if(e.type===`ImportExpression`||hF(e.callee,t)){let r=NE(e);return r.length<=t&&r.every(n)}return!1}return qT(e)?hF(e.object,t)&&hF(e.property,t):e.type===`UnaryExpression`&&pF.has(e.operator)||e.type===`UpdateExpression`?hF(e.argument,t):!1}function gF(e,t,n){let{node:r}=e,i=NE(r);if(i.length===0)return X([`(`,Fj(e,t),`)`]);let a=i.length-1;if(xF(i)){let t=[`(`];return PE(e,(e,r)=>{t.push(n()),r!==a&&t.push(`, `)}),t.push(`)`),t}let o=!1,s=[];PE(e,({node:e},r)=>{let i=n();r===a||(ZA(e,t)?(o=!0,i=[i,`,`,$,$]):i=[i,`,`,Z]),s.push(i)});let c=e.root.type!==`NGRoot`&&r.type!==`ImportExpression`&&r.type!==`TSImportType`&&r.type!==`TSExternalModuleReference`?Ij(t,`all`):``;function l(){return X([`(`,Y([Z,...s]),c,Z,`)`],{shouldBreak:!0})}if(o||e.parent.type!==`Decorator`&&dF(i))return l();if(yF(i)){let e=s.slice(1);if(e.some(kk))return l();let t;try{t=n(FE(r,0),{expandFirstArg:!0})}catch(e){if(e instanceof qA)return l();throw e}return kk(t)?[Xk,$k([[`(`,X(t,{shouldBreak:!0}),`, `,...e,`)`],l()])]:$k([[`(`,t,`, `,...e,`)`],[`(`,X(t,{shouldBreak:!0}),`, `,...e,`)`],l()])}if(vF(i,s,t)){let e=s.slice(0,-1);if(e.some(kk))return l();let t;try{t=n(FE(r,-1),{expandLastArg:!0})}catch(e){if(e instanceof qA)return l();throw e}return kk(t)?[Xk,$k([[`(`,...e,X(t,{shouldBreak:!0}),`)`],l()])]:$k([[`(`,...e,t,`)`],[`(`,...e,X(t,{shouldBreak:!0}),`)`],l()])}let u=[`(`,Y([Q,...s]),c,Q,`)`];return fF(e)?u:X(u,{shouldBreak:s.some(kk)||o})}function _F(e,t=!1){if(BT(e)&&(e.properties.length>0||q(e))||zT(e)&&(e.elements.length>0||q(e))||(AT(e)||e.type===`TSTypeAssertion`)&&_F(e.expression)||e.type===`FunctionExpression`||e.type===`DoExpression`||e.type===`ModuleExpression`)return!0;if(e.type===`ArrowFunctionExpression`){let{body:n}=e;if(n.type===`BlockStatement`||WT(n)||BT(n)||zT(n)||n.type===`ArrowFunctionExpression`&&_F(n,!0)||!t&&(n.type===`ConditionalExpression`||KT(UO(n))))return!0}return!1}function vF(e,t,n){if(e.length===1){let e=eT(0,t,-1);if(e.label?.embed&&e.label?.hug!==!1)return!0}let r=eT(0,e,-1),i=eT(0,e,-2);return!q(r,K.Leading)&&!q(r,K.Trailing)&&_F(r)&&(!i||i.type!==r.type)&&(e.length!==2||i.type!==`ArrowFunctionExpression`||!zT(r))&&!(e.length>1&&JP(r,n))}function yF(e){if(e.length!==2)return!1;let[t,n]=e;return t.type===`ModuleExpression`&&CF(n)?!0:!q(t)&&(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`&&t.body.type===`BlockStatement`)&&n.type!==`FunctionExpression`&&n.type!==`ArrowFunctionExpression`&&n.type!==`ConditionalExpression`&&bF(n)&&!_F(n)}function bF(e){if(e.type===`ParenthesizedExpression`)return bF(e.expression);if(AT(e)||e.type===`TypeCastExpression`){let{typeAnnotation:t}=e;if(t.type===`TypeAnnotation`&&(t=t.typeAnnotation),t.type===`TSArrayType`&&(t=t.elementType,t.type===`TSArrayType`&&(t=t.elementType)),t.type===`GenericTypeAnnotation`||t.type===`TSTypeReference`){let e=t.type===`GenericTypeAnnotation`?t.typeParameters:t.typeArguments;e?.params.length===1&&(t=e.params[0])}return nj(t)&&hF(e.expression,1)}return YT(e)&&NE(e).length>1?!1:GT(e)?hF(e.left,1)&&hF(e.right,1):OT(e)||hF(e)}function xF(e){return e.length===2?SF(e,0):e.length===3&&e[0].type===`Identifier`&&SF(e,1)}function SF(e,t){let n=e[t],r=e[t+1];return n.type===`ArrowFunctionExpression`&&iT(n).length===0&&n.body.type===`BlockStatement`&&r.type===`ArrayExpression`&&e.every(e=>!q(e))}function CF(e){if(e.type!==`ObjectExpression`||e.properties.length!==1)return!1;let[t]=e.properties;return YE(t)?!t.computed&&(t.key.type===`Identifier`&&t.key.name===`type`||kT(t.key)&&t.key.value===`type`)&&kT(t.value)&&t.value.value===`module`:!1}var wF=gF;function TF(e,t,n){return[n(`object`),X(Y([Q,EF(e,t,n)]))]}function EF(e,t,n){return[`::`,n(`callee`)]}var DF=e=>KT(e)&&NE(e).length>0;function OF(e){let{node:t,ancestors:n}=e;for(let e of n){if(!(qT(e)&&e.object===t||e.type===`TSNonNullExpression`&&e.expression===t))return e.type===`NewExpression`&&e.callee===t;t=e}return!1}function kF(e,t,n){let r=n(`object`),i=AF(e,t,n),{node:a}=e,o=e.findAncestor(e=>!(qT(e)||e.type===`TSNonNullExpression`)),s=e.findAncestor(e=>!XT(e)),c=o.type===`BindExpression`||o.type===`AssignmentExpression`&&o.left.type!==`Identifier`||OF(e)||a.computed||a.object.type===`Identifier`&&a.property.type===`Identifier`&&!qT(s)||(s.type===`AssignmentExpression`||s.type===`VariableDeclarator`)&&(DF(UO(a.object))||r.label?.memberChain);return rA(r.label,[r,sA,c?i:X(Y([Q,i]))])}function AF(e,t,n){let r=n(`property`),{node:i}=e,a=wj(e);return i.computed?!i.property||DT(i.property)?[a,`[`,r,`]`]:X([a,`[`,Y([Q,r]),Q,`]`]):[a,`.`,r]}function jF(e,t,n){let r=(e.parent.type===`ChainExpression`?e.grandparent:e.parent).type===`ExpressionStatement`,i=[];function a(e){let{originalText:n}=t,r=wE(n,G(e));return n.charAt(r)===`)`?r!==!1&&XA(n,r+1):ZA(e,t)}function o(){let{node:r}=e;if(KT(r)&&(uF(r.callee)||KT(r.callee))&&!tk(e,t)){let s=a(r);i.unshift({node:r,hasTrailingEmptyLine:s,printed:[Sj(e,[wj(e),n(`typeArguments`),wF(e,t,n)],t),s?$:``]}),e.call(o,`callee`)}else uF(r)&&!tk(e,t)?(i.unshift({node:r,printed:Sj(e,qT(r)?AF(e,t,n):EF(e,t,n),t)}),e.call(o,`object`)):r.type===`ChainExpression`&&!tk(e,t)?e.call(o,`expression`):r.type===`TSNonNullExpression`&&!tk(e,t)?(i.unshift({node:r,printed:Sj(e,`!`,t)}),e.call(o,`expression`)):i.unshift({node:r,printed:n()})}let{node:s}=e;i.unshift({node:s,printed:[wj(e),n(`typeArguments`),wF(e,t,n)]}),s.callee&&e.call(o,`callee`);let c=[],l=[i[0]],u=1;for(;u<i.length&&(i[u].node.type===`TSNonNullExpression`||i[u].node.type===`ChainExpression`||KT(i[u].node)||qT(i[u].node)&&i[u].node.computed&&DT(i[u].node.property));++u)l.push(i[u]);if(!KT(i[0].node))for(;u+1<i.length&&uF(i[u].node)&&uF(i[u+1].node);++u)l.push(i[u]);c.push(l),l=[];let d=!1;for(;u<i.length;++u){if(d&&uF(i[u].node)){if(i[u].node.computed&&DT(i[u].node.property)){l.push(i[u]);continue}c.push(l),l=[],d=!1}(KT(i[u].node)||i[u].node.type===`ImportExpression`)&&(d=!0),l.push(i[u]),q(i[u].node,K.Trailing)&&(c.push(l),l=[],d=!1)}l.length>0&&c.push(l);function f(e){return/^[A-Z]|^[$_]+$/.test(e)}function p(e){return e.length<=t.tabWidth}function m(e){let t=e[1][0]?.node.computed;if(e[0].length===1){let n=e[0][0].node;return n.type===`ThisExpression`||n.type===`Identifier`&&(f(n.name)||r&&p(n.name)||t)}let n=eT(0,e[0],-1).node;return qT(n)&&n.property.type===`Identifier`&&(f(n.property.name)||t)}let h=c.length>=2&&!q(c[1][0].node)&&m(c);function g(e){return e.map(e=>e.printed)}function _(e){return e.length===0?``:Y([$,nA($,e.map(g))])}let v=c.map(g),y=v,b=h?3:2,x=c.flat(),S=x.slice(1,-1).some(e=>q(e.node,K.Leading))||x.slice(0,-1).some(e=>q(e.node,K.Trailing))||c[b]&&q(c[b][0].node,K.Leading);if(c.length<=b&&!S&&c.every(e=>!eT(0,e,-1).hasTrailingEmptyLine))return fF(e)?y:X(y);let C=eT(0,c[+!!h],-1).node,w=!KT(C)&&a(C),T=[g(c[0]),h?c.slice(1,2).map(g):``,w?$:``,_(c.slice(h?2:1))],E=i.map(({node:e})=>e).filter(KT);function D(){let e=eT(0,eT(0,c,-1),-1).node,t=eT(0,v,-1);return KT(e)&&kk(t)&&E.slice(0,-1).some(e=>e.arguments.some(UT))}let O;return O=S||E.length>2&&E.some(e=>e.arguments.some(e=>!hF(e)))||v.slice(0,-1).some(kk)||D()?X(T):[kk(y)||w?Xk:``,$k([y,T])],rA({memberChain:!0},O)}var MF=jF;function NF(e,t,n){let{node:r}=e,i=r.type===`NewExpression`,a=wj(e),o=NE(r),s=r.type!==`TSImportType`&&r.typeArguments?[n(`typeArguments`),sA]:``,c=o.length===1&&$P(o[0],t.originalText);if(c||IF(e)||LF(e)||dj(r,e.parent)){let t=[];if(PE(e,()=>{t.push(n())}),!(c&&t[0].label?.embed))return[PF(e,n),a,s,`(`,nA(`, `,t),`)`]}let l=r.type===`ImportExpression`||r.type===`TSImportType`||r.type===`TSExternalModuleReference`;if(!l&&!i&&uF(r.callee)&&!e.call(()=>tk(e,t),`callee`,...r.callee.type===`ChainExpression`?[`expression`]:[]))return MF(e,t,n);let u=[PF(e,n),a,s,wF(e,t,n)];return l||KT(r.callee)?X(u):u}function PF(e,t){let{node:n}=e;return n.type===`ImportExpression`?`import${n.phase?`.${n.phase}`:``}`:n.type===`TSImportType`?`import`:n.type===`TSExternalModuleReference`?`require`:[n.type===`NewExpression`?`new `:``,t(`callee`),sA]}var FF=[`require`,`require.resolve`,`require.resolve.paths`,`import.meta.resolve`];function IF(e){let{node:t}=e;if(!(t.type===`ImportExpression`||t.type===`TSImportType`||t.type===`TSExternalModuleReference`||t.type===`CallExpression`&&!t.optional&&aj(t.callee,FF)))return!1;let n=NE(t);return n.length===1&&kT(n[0])&&!q(n[0])}function LF(e){let{node:t}=e;if(t.type!==`CallExpression`||t.optional||t.callee.type!==`Identifier`)return!1;let n=NE(t);return t.callee.name===`require`?(n.length===1&&kT(n[0])||n.length>1)&&!q(n[0]):t.callee.name===`define`&&e.parent.type===`ExpressionStatement`?n.length===1||n.length===2&&n[0].type===`ArrayExpression`||n.length===3&&kT(n[0])&&n[1].type===`ArrayExpression`:!1}function RF(e,t,n,r,i,a){let o=VF(e,t,n,r,a),s=a?n(a,{assignmentLayout:o}):``;switch(o){case`break-after-operator`:return X([X(r),i,X(Y([Z,s]))]);case`never-break-after-operator`:return X([X(r),i,` `,s]);case`fluid`:{let e=Symbol(`assignment`);return X([X(r),i,X(Y(Z),{id:e}),sA,tA(s,{groupId:e})])}case`break-lhs`:return X([r,i,` `,X(s)]);case`chain`:return[X(r),i,Z,s];case`chain-tail`:return[X(r),i,Y([Z,s])];case`chain-tail-arrow-chain`:return[X(r),i,s];case`only-left`:return r}}function zF(e,t,n){let{node:r}=e;return RF(e,t,n,n(`left`),[` `,r.operator],`right`)}function BF(e,t,n){return RF(e,t,n,n(`id`),` =`,`init`)}function VF(e,t,n,r,i){let{node:a}=e,o=a[i];if(!o)return`only-left`;let s=!WF(o);if(e.match(WF,GF,e=>!s||e.type!==`ExpressionStatement`&&e.type!==`VariableDeclaration`))return s?o.type===`ArrowFunctionExpression`&&o.body.type===`ArrowFunctionExpression`?`chain-tail-arrow-chain`:`chain-tail`:`chain`;if(!s&&WF(o.right)||MT(o)&&!SM(o)||zO(t.originalText,o)||q(o,K.Leading,yP))return`break-after-operator`;if(a.type===`ImportAttribute`||o.type===`CallExpression`&&o.callee.name===`require`||e.root.type===`JsonRoot`)return`never-break-after-operator`;let c=Rk(r);if(UF(a)||JF(a)||YF(a)&&c)return`break-lhs`;let l=QF(a,r,t);return e.call(()=>HF(e,t,n,l),i)?`break-after-operator`:KF(a)?`break-lhs`:!c&&(l||o.type===`TemplateLiteral`||o.type===`TaggedTemplateExpression`||ET(o)||DT(o)||o.type===`ClassExpression`)?`never-break-after-operator`:`fluid`}function HF(e,t,n,r){let i=e.node;if(GT(i)&&!NP(i))return!0;switch(i.type){case`StringLiteralTypeAnnotation`:case`SequenceExpression`:return!0;case`TSConditionalType`:case`ConditionalTypeAnnotation`:if(!t.experimentalTernaries&&!tI(i))break;return!0;case`ConditionalExpression`:{if(!t.experimentalTernaries){let{test:e}=i;return GT(e)&&!NP(e)}let{consequent:e,alternate:n}=i;return e.type===`ConditionalExpression`||n.type===`ConditionalExpression`}case`ClassExpression`:return Xw(i.decorators)}if(r)return!1;let a=i,o=[];for(;;)if(a.type===`UnaryExpression`||a.type===`AwaitExpression`||a.type===`YieldExpression`&&a.argument!==null)a=a.argument,o.push(`argument`);else if(a.type===`TSNonNullExpression`)a=a.expression,o.push(`expression`);else break;return!!(kT(a)||e.call(()=>ZF(e,t,n),...o))}function UF(e){if(GF(e)){let t=e.left||e.id;return t.type===`ObjectPattern`&&t.properties.length>2&&t.properties.some(e=>YE(e)&&(!e.shorthand||e.value?.type===`AssignmentPattern`))}return!1}function WF(e){return e.type===`AssignmentExpression`}function GF(e){return WF(e)||e.type===`VariableDeclarator`}function KF(e){let t=qF(e);if(Xw(t)){let n=e.type===`TSTypeAliasDeclaration`?`constraint`:`bound`;if(t.length>1&&t.some(e=>e[n]||e.default))return!0}return!1}function qF(e){if(IT(e))return e.typeParameters?.params}function JF(e){if(e.type!==`VariableDeclarator`)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let n=XF(t.typeAnnotation);return Xw(n)&&n.length>1&&n.some(e=>Xw(XF(e))||e.type===`TSConditionalType`)}function YF(e){return e.type===`VariableDeclarator`&&e.init?.type===`ArrowFunctionExpression`}function XF(e){let t;switch(e.type){case`GenericTypeAnnotation`:t=e.typeParameters;break;case`TSTypeReference`:t=e.typeArguments}return t?.params}function ZF(e,t,n,r=!1){let{node:i}=e,a=()=>ZF(e,t,n,!0);if(XT(i))return e.call(a,`expression`);if(KT(i)){if(NF(e,t,n).label?.memberChain)return!1;let r=NE(i);return!(r.length===0||r.length===1&&lF(r[0],t))||$F(i,n)?!1:e.call(a,`callee`)}return qT(i)?e.call(a,`object`):r&&(i.type===`Identifier`||i.type===`ThisExpression`)}function QF(e,t,n){return YE(e)?(t=Fk(t),typeof t==`string`&&MA(t)<n.tabWidth+3):!1}function $F(e,t){let n=e.typeArguments?.params;if(Xw(n)){if(n.length>1)return!0;if(n.length===1){let e=n[0];if(MT(e)||NT(e)||e.type===`TSTypeLiteral`||e.type===`ObjectTypeAnnotation`)return!0}if(kk(t(`typeArguments`)))return!0}return!1}function eI(e){switch(e.type){case`FunctionTypeAnnotation`:case`GenericTypeAnnotation`:case`TSFunctionType`:return!!e.typeParameters;case`TSTypeReference`:return!!e.typeArguments;default:return!1}}function tI(e){return eI(e.checkType)||eI(e.extendsType)}function nI(e,t,n){let{node:r}=e,i=[`await`];if(r.argument){i.push(` `,n(`argument`));let{parent:t}=e;if(KT(t)&&t.callee===r||qT(t)&&t.object===r){i=[Y([Q,...i]),Q];let t=e.findAncestor(e=>e.type===`AwaitExpression`||e.type===`BlockStatement`);if(t?.type!==`AwaitExpression`||!gO(t.argument,e=>e===r))return X(i)}}return i}var rI=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},iI=Qw(`findLast`,function(){if(Array.isArray(this))return rI});function aI(e,t,n,r){let{node:i}=e,a=[],o=iI(0,i[r],e=>e.type!==`EmptyStatement`);return e.each(({node:e})=>{e.type!==`EmptyStatement`&&(a.push(n()),e!==o&&(a.push($),ZA(e,t)&&a.push($)))},r),a}function oI(e,t,n){let r=sI(e,t,n),{node:i,parent:a}=e;if(i.type===`Program`&&a?.type!==`ModuleExpression`)return r?[r,$]:``;let o=[];if(i.type===`StaticBlock`&&o.push(`static `),o.push(`{`),r)o.push(Y([$,r]),$);else{let t=e.grandparent;a.type===`ArrowFunctionExpression`||a.type===`FunctionExpression`||a.type===`FunctionDeclaration`||a.type===`ComponentDeclaration`||a.type===`HookDeclaration`||a.type===`ObjectMethod`||a.type===`ClassMethod`||a.type===`ClassPrivateMethod`||a.type===`ForStatement`||a.type===`WhileStatement`||a.type===`DoWhileStatement`||a.type===`DoExpression`||a.type===`ModuleExpression`||a.type===`CatchClause`&&!t.finalizer||a.type===`TSModuleDeclaration`||a.type===`DeclareModule`||a.type===`MatchStatementCase`||i.type===`StaticBlock`||o.push($)}return o.push(`}`),o}function sI(e,t,n){let{node:r}=e,i=Xw(r.directives),a=r.body.some(e=>e.type!==`EmptyStatement`),o=q(r,K.Dangling);if(!i&&!a&&!o)return``;let s=[];return i&&(s.push(aI(e,t,n,`directives`)),(a||o)&&(s.push($),ZA(eT(0,r.directives,-1),t)&&s.push($))),a&&s.push(aI(e,t,n,`body`)),o&&s.push(vj(e,t)),s}function cI(e){let t=/* @__PURE__ */ new WeakMap;return n=>tT(t,n,()=>Symbol(e))}var lI=cI,uI=[`properties`,`indexers`,`callProperties`,`internalSlots`];function dI(e,t){let{node:n}=e;if(n.type===`ClassBody`||n.type===`TSInterfaceBody`){e.each(t,`body`);return}if(n.type===`TSTypeLiteral`){e.each(t,`members`);return}if(n.type===`RecordDeclarationBody`){e.each(t,`elements`);return}if(n.type===`ObjectTypeAnnotation`){let n=uI.flatMap(t=>e.map(({node:e,index:n})=>({node:e,loc:W(e),selector:[t,n]}),t)).sort((e,t)=>e.loc-t.loc);for(let[r,{node:i,selector:a}]of n.entries())e.call(()=>t({node:i,next:n[r+1]?.node,isLast:r===n.length-1}),...a)}}function fI(e){return e.type===`ObjectTypeAnnotation`?uI.some(t=>Xw(e[t])):Xw(e.type===`RecordDeclarationBody`?e.elements:e.body)}function pI(e,t,n){let{node:r}=e,i=[],a=r.type===`ObjectTypeAnnotation`,o=r.type===`RecordDeclarationBody`,s=!mI(e),c=s?Z:$,l=q(r,K.Dangling),[u,d]=a&&r.exact?[`{|`,`|}`]:`{}`,f=!0,p;if(dI(e,({node:r,next:l,isLast:u})=>{if(p??=r,f&&=!1,i.push(n()),!o&&s&&a){let{parent:n}=e;n.inexact||!u?i.push(`,`):i.push(Ij(t))}o&&r.type!==`MethodDefinition`&&i.push(`,`),!o&&!s&&(vI({node:r,next:l},t)||bI({node:r,next:l},t))&&i.push(`;`),u||(i.push(c),ZA(r,t)&&i.push($))}),l&&i.push(vj(e,t)),r.type===`ObjectTypeAnnotation`&&r.inexact){f&&=!1;let e;e=q(r,K.Dangling)?[q(r,K.Line)||OE(t.originalText,G(eT(0,aO(r),-1)))?$:Z,`...`]:[p?Z:``,`...`],i.push(e)}if(s){let n=q(r,K.Dangling|K.Line)||t.objectWrap===`preserve`&&p&&AE(t.originalText,W(r),W(p)),a;if(i.length===0)a=u+d;else{let e=!t.bracketSpacing||f&&!n?Q:Z;a=[u,Y([e,...i]),e,d]}return e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,Gj)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,Gj)?a:X(a,{shouldBreak:n})}return[u,i.length>0?[Y([$,i]),$]:``,d]}function mI(e){let{node:t}=e;if(t.type===`ObjectTypeAnnotation`){let{key:t,parent:n}=e;return t===`body`&&(n.type===`InterfaceDeclaration`||n.type===`DeclareInterface`||n.type===`DeclareClass`)}return t.type===`ClassBody`||t.type===`TSInterfaceBody`||t.type===`RecordDeclarationBody`}function hI(e,t){let{parent:n}=e;return e.callParent(mI)?n.type===`ObjectTypeAnnotation`?`;`:Lj(t):n.type===`TSTypeLiteral`?e.isLast?t.semi?eA(`;`):``:t.semi||bI({node:e.node,next:e.next},t)?`;`:eA(``,`;`):``}var gI=U([`ClassProperty`,`PropertyDefinition`,`ClassPrivateProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]),_I=e=>{if(e.computed||e.typeAnnotation)return!1;let{type:t,name:n}=e.key;return t===`Identifier`&&(n===`static`||n===`get`||n===`set`)};function vI({node:e,next:t},n){if(n.semi||!gI(e))return!1;if(!e.value&&_I(e))return!0;if(!t||t.static||t.accessibility||t.readonly)return!1;if(!t.computed){let e=t.key?.name;if(e===`in`||e===`instanceof`)return!0}if(gI(t)&&!t.static&&t.variance&&!t.declare)return!0;switch(t.type){case`ClassProperty`:case`PropertyDefinition`:case`TSAbstractPropertyDefinition`:return t.computed;case`MethodDefinition`:case`TSAbstractMethodDefinition`:case`ClassMethod`:case`ClassPrivateMethod`:{if((t.value?t.value.async:t.async)||t.kind===`get`||t.kind===`set`)return!1;let e=t.value?t.value.generator:t.generator;return!!(t.computed||e)}case`TSIndexSignature`:return!0}return!1}var yI=U([`TSPropertySignature`]);function bI({node:e,next:t},n){return n.semi||!yI(e)?!1:_I(e)?!0:t&&t.type===`TSCallSignatureDeclaration`?!(e.type===`TSPropertySignature`&&e.typeAnnotation):!1}var xI=lI(`heritageGroup`),SI=U([`TSInterfaceDeclaration`,`DeclareInterface`,`InterfaceDeclaration`,`InterfaceTypeAnnotation`]);function CI(e,t,n){let r=wI(e,t,n),{node:i}=e;if(i.type===`ClassExpression`&&Xw(i.decorators)){let i=UP(e,t,n);return tk(e,t)?[Y([Q,i,r]),Q]:[i,r]}return r}function wI(e,t,n){let{node:r}=e,i=SI(r),a=r.type===`RecordDeclaration`,o=i?`interface`:a?`record`:`class`,s=[Oj(e),Aj(e),o],c=OI(e),l=[],u=[];if(r.type!==`InterfaceTypeAnnotation`){r.id&&l.push(` `);for(let i of[`id`,`typeParameters`])if(r[i]){let{leading:r,trailing:a}=e.call(()=>xj(e,t),i);l.push(r,n(i),Y(a))}}if(r.superClass){let r=[AI(e,t,n),n(`superTypeArguments`)],i=e.call(()=>[`extends `,Sj(e,r,t)],`superClass`);c?u.push(Z,X(i)):u.push(` `,i)}else u.push(kI(e,t,n,`extends`));u.push(kI(e,t,n,`mixins`),kI(e,t,n,`implements`));let d;return c?(d=xI(r),s.push(X([...l,Y(u)],{id:d}))):s.push(...l,...u),!i&&c&&fI(r.body)?s.push(eA($,` `,{groupId:d})):s.push(` `),s.push(n(`body`)),s}function TI(e){let t=+!!e.superClass;for(let n of[`extends`,`mixins`,`implements`])if(Array.isArray(e[n])&&(t+=e[n].length),t>1)return!0;return t>1}function EI(e){let{node:t}=e;if(q(t.id,K.Trailing)||q(t.typeParameters,K.Trailing)||q(t.superClass)||TI(t))return!0;if(t.superClass)return e.parent.type!==`AssignmentExpression`&&!t.superTypeArguments&&qT(UO(t.superClass));let n=t.extends?.[0]??t.mixins?.[0]??t.implements?.[0];return n?n.type===`InterfaceExtends`&&n.id.type===`QualifiedTypeIdentifier`&&!n.typeParameters||(n.type===`TSClassImplements`||n.type===`TSInterfaceHeritage`)&&qT(n.expression)&&!n.typeArguments:!1}var DI=/* @__PURE__ */ new WeakMap;function OI(e){return tT(DI,e.node,()=>EI(e))}function kI(e,t,n,r){let{node:i}=e;if(!Xw(i[r]))return``;let a=vj(e,t,{marker:r}),o=nA([`,`,Z],e.map(n,r));if(!TI(i)){let t=[`${r} `,a,o];return OI(e)?[Z,X(t)]:[` `,t]}return[Z,a,a&&$,r,X(Y([Z,o]))]}function AI(e,t,n){let r=n(`superClass`),{parent:i}=e;return i.type===`AssignmentExpression`?X(eA([`(`,Y([Q,r]),Q,`)`],r)):r}function jI(e,t,n){let{node:r}=e,i=[];return Xw(r.decorators)&&i.push(VP(e,t,n)),i.push(jj(r)),r.static&&i.push(`static `),i.push(Aj(e)),r.override&&i.push(`override `),i.push(NM(e,t,n)),i}function MI(e,t,n){let{node:r}=e,i=[];return Xw(r.decorators)&&i.push(VP(e,t,n)),i.push(Oj(e),jj(r)),r.static&&i.push(`static `),i.push(Aj(e)),r.override&&i.push(`override `),r.readonly&&i.push(`readonly `),r.variance&&i.push(n(`variance`)),(r.type===`ClassAccessorProperty`||r.type===`AccessorProperty`||r.type===`TSAbstractAccessorProperty`)&&i.push(`accessor `),i.push(vM(e,t,n),wj(e),Tj(e),OM(e,n)),[RF(e,t,n,i,` =`,r.type===`TSAbstractPropertyDefinition`||r.type===`TSAbstractAccessorProperty`?void 0:`value`),Lj(t)]}function NI(e,t){let n=aO(e,K.Leading);if(n.length===0)return!1;let[r]=n,i=t.originalText,a=W(r);return AE(i,a,G(r))||OE(i,a,{backwards:!0})}function PI(e,t,n,r=`body`){return e.call(({node:r})=>{let i=n();if(r.type===`EmptyStatement`)return q(r,K.Leading)?[` `,i]:i;let a=r.type===`BlockStatement`;return NI(r,t)?a?[$,i]:Y([$,i]):a||r.type===`IfStatement`&&e.parent.type===`IfStatement`&&e.key===`alternate`?[` `,i]:Y([Z,i])},r)}var FI=(e,t,n)=>PI(e,t,n,`consequent`),II=(e,t,n)=>PI(e,t,n,`alternate`);function LI(e,t,n){return[X([`do`,PI(e,t,n)]),e.node.body.type===`BlockStatement`?` `:$,`while (`,Pj(e,t,n),`)`,Lj(t)]}var RI=U([`TSAsExpression`,`TSTypeAssertion`,`TSNonNullExpression`,`TSInstantiationExpression`,`TSSatisfiesExpression`]);function zI(e){return RI(e)?zI(e.expression):e}var BI=U([`FunctionExpression`,`ArrowFunctionExpression`]);function VI(e){return e.type===`MemberExpression`||e.type===`OptionalMemberExpression`||e.type===`Identifier`&&e.name!==`undefined`}function HI(e,t){if(UM(e,t)){let t=zI(e.node.expression);return BI(t)||VI(t)}return!(!t.semi||VM(e,t)||HM(e,t))}function UI(e,t,n){let r=[n(`expression`)];if(RM(e,t)){if(WM(e,t)){let{node:n}=e,i=eT(0,aO(n,K.Leading),-1);return Sj(e,[`;`,yj(e,t,{filter:e=>e===i}),...r],t,{filter:e=>e!==i})}r.unshift(`;`)}else HI(e,t)&&r.push(`;`);return r}function WI(e,t,n){let{node:r}=e,i=PI(e,t,n),a=vj(e,t),o=a?[a,Q]:``;return!r.init&&!r.test&&!r.update?[o,X([`for (;;)`,i])]:[o,X([`for (`,X([Y([Q,n(`init`),`;`,Z,n(`test`),`;`,r.update?[Z,n(`update`)]:``]),Q]),`)`,i])]}function GI(e,t,n){let{node:r}=e,i=r.type===`ForOfStatement`;return X([`for`,i&&r.await?` await`:``,` (`,n(`left`),` `,i?`of`:`in`,` `,n(`right`),`)`,PI(e,t,n)])}function KI(e,t,n){if(t.__isVueBindings||t.__isVueForBindingLeft){let r=e.map(n,`program`,`body`,0,`params`);if(r.length===1)return r[0];let i=nA([`,`,Z],r);return t.__isVueForBindingLeft?[`(`,Y([Q,X(i)]),Q,`)`]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(n,`program`,`body`,0,`typeParameters`,`params`);return nA([`,`,Z],t)}}var qI=(e,{originalText:t})=>pj(t,W(e));function JI(e){return JE(eT(0,aO(e,K.Dangling),-1))}function YI(e,t,n){let{node:r}=e,i=X([`if (`,Pj(e,t,n),`)`,FI(e,t,n)]);if(!r.alternate)return i;let{consequent:a}=r,o=a.type===`BlockStatement`,s=[i],c=o;o||(s.push($),c=!1);let l=aO(r,K.Dangling);if(l.length>0){let[n]=l;qI(n,t)?s.push(o?[$,$]:$):OE(t.originalText,W(n),{backwards:!0})?s.push(o?$:``):s.push(` `),s.push(vj(e,t),JI(r)||OE(t.originalText,G(eT(0,l,-1)))?$:` `),c=!1}return s.push(c?` `:``,`else`,X(II(e,t,n))),s}function XI(e,t){let{node:n}=e;switch(n.type){case`RegExpLiteral`:return $I(n);case`BigIntLiteral`:return QI(n.extra.raw);case`NumericLiteral`:return Yj(n.extra.raw);case`StringLiteral`:return Ik(aM(n.extra.raw,t));case`NullLiteral`:return`null`;case`BooleanLiteral`:return String(n.value);case`DirectiveLiteral`:return tL(n.extra.raw,t);case`Literal`:{if(n.regex)return $I(n.regex);if(n.bigint)return QI(n.raw);let{value:r}=n;return typeof r==`number`?Yj(n.raw):typeof r==`string`?ZI(e)?tL(n.raw,t):Ik(aM(n.raw,t)):String(r)}}}function ZI(e){if(e.key!==`expression`)return;let{parent:t}=e;return t.type===`ExpressionStatement`&&typeof t.directive==`string`}function QI(e){return e.toLowerCase()}function $I({pattern:e,flags:t}){return t=[...t].sort().join(``),`/${e}/${t}`}var eL=`use strict`;function tL(e,t){let n=e.slice(1,-1);if(n===eL||!(n.includes(`"`)||n.includes(`'`))){let e=t.singleQuote?`'`:`"`;return e+n+e}return e}var nL=U([`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`]),rL=U([`EnumBody`,`EnumBooleanBody`,`EnumNumberBody`,`EnumBigIntBody`,`EnumStringBody`,`EnumSymbolBody`]);function iL(e,t,n){let{node:r,parent:i}=e,a=rL(r),o=r.type===`TSEnumBody`||a,s=nL(r),c=a&&r.hasUnknownMembers,l=o?`members`:s?`attributes`:`properties`,u=r[l],d=o||r.type===`ObjectPattern`&&i.type!==`FunctionDeclaration`&&i.type!==`FunctionExpression`&&i.type!==`ArrowFunctionExpression`&&i.type!==`ObjectMethod`&&i.type!==`ClassMethod`&&i.type!==`ClassPrivateMethod`&&i.type!==`AssignmentPattern`&&i.type!==`CatchClause`&&r.properties.some(e=>e.value&&(e.value.type===`ObjectPattern`||e.value.type===`ArrayPattern`))||r.type!==`ObjectPattern`&&t.objectWrap===`preserve`&&u.length>0&&aL(r,u[0],t),f=[],p=e.map(({node:e})=>{let r=[...f,n()];return f=[`,`,Z],ZA(e,t)&&f.push($),r},l);if(c){let n;if(q(r,K.Dangling)){let i=q(r,K.Line);n=[vj(e,t),i||OE(t.originalText,G(eT(0,aO(r),-1)))?$:Z,`...`]}else n=[`...`];p.push([...f,...n])}let m=!(c||eT(0,u,-1)?.type===`RestElement`),h;if(p.length===0)h=X([`{`,Fj(e,t),`}`,wj(e),OM(e,n)]);else{let r=t.bracketSpacing?Z:Q;h=[`{`,Y([r,...p]),m?Ij(t):``,r,`}`,wj(e),OM(e,n)]}return e.match(e=>e.type===`ObjectPattern`&&!Xw(e.decorators),Gj)||HT(r)&&(e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,Gj)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,Gj))||!d&&e.match(e=>e.type===`ObjectPattern`,e=>e.type===`AssignmentExpression`||e.type===`VariableDeclarator`)?h:X(h,{shouldBreak:d})}function aL(e,t,n){let r=n.originalText,i=W(t),a=W(e);return nL(e)&&(a=UE(n).lastIndexOf(`{`,i)),AE(r,a,i)}function oL(e,t,n){let{node:r}=e;return[`import`,r.phase?` ${r.phase}`:``,fL(r),hL(e,t,n),mL(e,t,n),yL(e,t,n),Lj(t)]}var sL=e=>e.type===`ExportDefaultDeclaration`||e.type===`DeclareExportDeclaration`&&e.default;function cL(e,t,n){let{node:r}=e,i=[HP(e,t,n),Oj(e),`export`,sL(r)?` default`:``],{declaration:a,exported:o}=r;return q(r,K.Dangling)&&(i.push(` `,vj(e,t)),JI(r)&&i.push($)),a?i.push(` `,n(`declaration`)):(i.push(pL(r)),r.type===`ExportAllDeclaration`||r.type===`DeclareExportAllDeclaration`?(i.push(` *`),o&&i.push(` as `,n(`exported`))):i.push(hL(e,t,n)),i.push(mL(e,t,n),yL(e,t,n))),i.push(uL(r,t)),i}var lL=U([`ClassDeclaration`,`ComponentDeclaration`,`FunctionDeclaration`,`TSInterfaceDeclaration`,`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`HookDeclaration`,`TSDeclareFunction`,`EnumDeclaration`]);function uL(e,t){return!e.declaration||sL(e)&&!lL(e.declaration)?Lj(t):``}function dL(e,t=!0){return e&&e!==`value`?`${t?` `:``}${e}${t?``:` `}`:``}function fL(e,t){return dL(e.importKind,t)}function pL(e){return dL(e.exportKind)}function mL(e,t,n){let{node:r}=e;return r.source?[gL(r,t)?` from`:``,` `,n(`source`)]:``}function hL(e,t,n){let{node:r}=e;if(!gL(r,t))return``;let i=[` `];if(Xw(r.specifiers)){let a=[],o=[];e.each(()=>{let t=e.node.type;if(t===`ExportNamespaceSpecifier`||t===`ExportDefaultSpecifier`||t===`ImportNamespaceSpecifier`||t===`ImportDefaultSpecifier`)a.push(n());else if(t===`ExportSpecifier`||t===`ImportSpecifier`)o.push(n());else throw new OP(r,`specifier`)},`specifiers`),i.push(nA(`, `,a)),o.length>0&&(a.length>0&&i.push(`, `),o.length>1||a.length>0||r.specifiers.some(e=>q(e))?i.push(X([`{`,Y([t.bracketSpacing?Z:Q,nA([`,`,Z],o)]),Ij(t),t.bracketSpacing?Z:Q,`}`])):i.push([`{`,t.bracketSpacing?` `:``,...o,t.bracketSpacing?` `:``,`}`]))}else i.push(`{}`);return i}function gL(e,t){return e.type!==`ImportDeclaration`||Xw(e.specifiers)||e.importKind===`type`?!0:UE(t).slice(W(e),W(e.source)).trimEnd().endsWith(`from`)}function _L(e,t){let n=UE(t).slice(G(e.source),e.attributes?.[0]?W(e.attributes[0]):G(e)).trimStart();return n.startsWith(`assert`)?`assert`:n.startsWith(`with`)||Xw(e.attributes)?`with`:void 0}var vL=e=>{let{attributes:t}=e;if(t.length!==1)return!1;let[n]=t,{type:r,key:i,value:a}=n;return r===`ImportAttribute`&&(i.type===`Identifier`&&i.name===`type`||kT(i)&&i.value===`type`)&&kT(a)&&!q(n)&&!q(i)&&!q(a)};function yL(e,t,n){let{node:r}=e;if(!r.source)return``;let i=_L(r,t);if(!i)return``;let a=iL(e,t,n);return vL(r)&&(a=Nk(a)),[` ${i} `,a]}function bL(e,t,n){let{node:r}=e,{type:i}=r,a=i.startsWith(`Import`),o=a?`imported`:`local`,s=a?`local`:`exported`,c=r[o],l=r[s],u=``,d=``;return i===`ExportNamespaceSpecifier`||i===`ImportNamespaceSpecifier`?u=`*`:c&&(u=n(o)),l&&!$T(r)&&(d=n(s)),[dL(i===`ImportSpecifier`?r.importKind:r.exportKind,!1),u,u&&d?` as `:``,d]}function xL(e,t,n){let{node:r}=e;return r.shorthand?n(`value`):RF(e,t,n,vM(e,t,n),`:`,`value`)}function SL(e,t){return[`...`,t(`argument`),OM(e,t)]}function CL(e,t,n){let{node:r}=e,i=n();return HO(r,t)?[`(`,Y([$,i]),$,`)`]:GT(r)||t.experimentalTernaries&&r.type===`ConditionalExpression`&&(r.consequent.type===`ConditionalExpression`||r.alternate.type===`ConditionalExpression`)?X([eA(`(`),Y([Q,i]),Q,eA(`)`)]):i}function wL(e,t,n){let{node:r}=e;return[r.type===`ThrowStatement`?`throw`:`return`,r.argument?[` `,e.call(()=>CL(e,t,n),`argument`)]:``,Lj(t)]}function TL(e,t){let{key:n,parent:r}=e;return!!(n===`argument`&<(r)&&tk(e,t)||n===`body`&&r.type===`ArrowFunctionExpression`)}function EL(e,t,n){let{parent:r}=e;if(r.type===`ExpressionStatement`||r.type===`ForStatement`){let t=[];return e.each(({isFirst:e})=>{e?t.push(n()):t.push(`,`,Y([Z,n()]))},`expressions`),X(t)}let i=nA([`,`,Z],e.map(n,`expressions`));return TL(e,t)?X(eA([Y([Q,i]),Q],i)):X(i)}function DL(e,t,n){return[X([`switch (`,Y([Q,n(`discriminant`)]),Q,`)`]),` {`,e.node.cases.length>0?Y([$,nA($,e.map(({node:e,isLast:r})=>[n(),!r&&ZA(e,t)?$:``],`cases`))]):vj(e,t,{indent:!0}),$,`}`]}function OL(e,t,n){let{node:r}=e,i=[];r.test?i.push(`case `,n(`test`),`:`):i.push(`default:`),q(r,K.Dangling)&&i.push(` `,vj(e,t));let a=r.consequent.filter(e=>e.type!==`EmptyStatement`);if(a.length>0){let r=aI(e,t,n,`consequent`);i.push(a.length===1&&a[0].type===`BlockStatement`?[` `,r]:Y([$,r]))}return i}function kL(e,t){let n=0;for(let r in e){let i=e[r];if(wO(i)&&typeof i.type==`string`&&(n++,n+=kL(i,t-n)),n>t)return n}return n}function AL(e,t=5){return kL(e,t)<=t}function jL(e){let t=[e];for(let e=0;e<t.length;e++){let n=t[e];for(let e of[`test`,`consequent`,`alternate`]){let r=n[e];if(WT(r))return!0;r.type===`ConditionalExpression`&&t.push(r)}}return!1}function ML(e,t,n){let{node:r}=e,i=r.type===`ConditionalExpression`,a=i?`alternate`:`falseType`,{parent:o}=e,s=i?n(`test`):[n(`checkType`),` `,`extends`,` `,n(`extendsType`)];return o.type===r.type&&o[a]===r?Gk(2,s):s}var NL=/* @__PURE__ */ new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function PL(e){let{node:t}=e;if(t.type!==`ConditionalExpression`)return!1;let n,r=t;for(let t=0;!n;t++){let i=e.getParentNode(t);if(XT(i)&&i.expression===r||KT(i)&&i.callee===r||qT(i)&&i.object===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||AT(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[NL.get(n.type)]===r}function FL(e,t,n){let{node:r}=e,i=r.type===`ConditionalExpression`,a=i?`consequent`:`trueType`,o=i?`alternate`:`falseType`,s=i?[`test`]:[`checkType`,`extendsType`],c=r[a],l=r[o],u=[],d=!1,{parent:f}=e,p=f.type===r.type&&s.some(e=>f[e]===r),m=f.type===r.type&&!p,h,g,_=0;do g=h||r,h=e.getParentNode(_),_++;while(h&&h.type===r.type&&s.every(e=>h[e]!==g));let v=h||f,y=g;if(i&&(WT(r[s[0]])||WT(c)||WT(l)||jL(y))){d=!0,m=!0;let e=e=>[eA(`(`),Y([Q,e]),Q,eA(`)`)],t=e=>e.type===`NullLiteral`||e.type===`Literal`&&e.value===null||e.type===`Identifier`&&e.name===`undefined`;u.push(` ? `,t(c)?n(a):e(n(a)),` : `,l.type===r.type||t(l)?n(o):e(n(o)))}else{let e=e=>t.useTabs?Y(n(e)):Gk(2,n(e)),i=[Z,`? `,c.type===r.type?eA(``,`(`):``,e(a),c.type===r.type?eA(``,`)`):``,Z,`: `,e(o)];u.push(f.type!==r.type||f[o]===r||p?i:t.useTabs?Jk(Y(i)):Gk(Math.max(0,t.tabWidth-2),i))}let b=e=>f===v?X(e):e,x=!d&&(qT(f)||f.type===`NGPipeExpression`&&f.left===r)&&!f.computed,S=PL(e),C=b([ML(e,t,n),m?u:Y(u),i&&x&&!S?Q:``]);return p||S?X([Y([Q,C]),Q]):C}function IL(e,t){return(qT(t)||t.type===`NGPipeExpression`&&t.left===e)&&!t.computed}function LL(e,t,n,r){return[...e.map(e=>aO(e)),aO(t),aO(n)].flat().some(e=>qE(e)&&AE(r.originalText,W(e),G(e)))}var RL=/* @__PURE__ */ new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function zL(e){let{node:t}=e;if(t.type!==`ConditionalExpression`)return!1;let n,r=t;for(let t=0;!n;t++){let i=e.getParentNode(t);if(XT(i)&&i.expression===r||KT(i)&&i.callee===r||qT(i)&&i.object===r){r=i;continue}i.type===`NewExpression`&&i.callee===r||AT(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[RL.get(n.type)]===r}var BL=e=>[eA(`(`),Y([Q,e]),Q,eA(`)`)];function VL(e,t,n,r){if(!t.experimentalTernaries)return FL(e,t,n);let{node:i}=e,a=i.type===`ConditionalExpression`,o=FT(i),s=a?`consequent`:`trueType`,c=a?`alternate`:`falseType`,l=a?[`test`]:[`checkType`,`extendsType`],u=i[s],d=i[c],f=l.map(e=>i[e]),{parent:p}=e,m=p.type===i.type,h=m&&l.some(e=>p[e]===i),g=m&&p[c]===i,_=u.type===i.type,v=d.type===i.type,y=v||g,b=t.tabWidth>2||t.useTabs,x,S,C=0;do S=x||i,x=e.getParentNode(C),C++;while(x&&x.type===i.type&&l.every(e=>x[e]!==S));let w=x||p,T=r&&r.assignmentLayout&&r.assignmentLayout!==`break-after-operator`&&(p.type===`AssignmentExpression`||p.type===`VariableDeclarator`||p.type===`ClassProperty`||p.type===`PropertyDefinition`||p.type===`ClassPrivateProperty`||p.type===`ObjectProperty`||p.type===`Property`),E=LT(p)&&!(_||v),D=a&&w.type===`JSXExpressionContainer`&&e.grandparent.type!==`JSXAttribute`,O=zL(e),k=IL(i,p),ee=o&&tk(e,t),te=b?t.useTabs?` `:` `.repeat(t.tabWidth-1):``,A=LL(f,u,d,t)||_||v,j=!y&&!m&&!o&&(D?u.type===`NullLiteral`||u.type===`Literal`&&u.value===null:lF(u,t)&&AL(i.test,3)),ne=y||g||o&&!m||m&&a&&AL(i.test,1)||j,M=[];q(i.test,K.Dangling)&&e.call(()=>{M.push(vj(e,t))},`test`),q(i,K.Dangling)&&M.push(vj(e,t));let N=Symbol(`test`),P=Symbol(`consequent`),F=Symbol(`test-and-consequent`),I=X([a?[BL(n(`test`)),i.test.type===`ConditionalExpression`?Xk:``]:[n(`checkType`),` `,`extends`,` `,FT(i.extendsType)||i.extendsType.type===`TSMappedType`?n(`extendsType`):X(BL(n(`extendsType`)))],` ?`],{id:N}),re=n(s),L=Y([_||D&&(WT(u)||m||y)?$:Z,re]),R=ne?X([I,y?L:eA(L,X(L,{id:P}),{groupId:N})],{id:F}):[I,L],z=n(c),ie=j?eA(z,Jk(BL(z)),{groupId:F}):z,ae=[R,M.length>0?[Y([$,M]),$]:v?$:j?eA(Z,` `,{groupId:F}):Z,`:`,v||!b?` `:ne?eA(te,eA(y||j?` `:te,` `),{groupId:F}):eA(te,` `),v?ie:X([Y(ie),D&&!j?Q:``]),k&&!O?Q:``,A?Xk:``];return T&&!A?X(Y([Q,X(ae)])):T||E?X(Y(ae)):O||o&&h?X([Y([Q,ae]),ee?Q:``]):p===w?X(ae):ae}function HL(e,t,n){let{node:r}=e;return[`try `,n(`block`),r.handler?[` `,n(`handler`)]:``,r.finalizer?[` finally `,n(`finalizer`)]:``]}function UL(e,t,n){let{node:r}=e;if(r.param){let e=q(r.param,e=>!qE(e)||e.leading&&OE(t.originalText,G(e))||e.trailing&&OE(t.originalText,W(e),{backwards:!0})),i=n(`param`);return[`catch `,e?[`(`,Y([Q,i]),Q,`) `]:[`(`,i,`) `],n(`body`)]}return[`catch `,n(`body`)]}function WL(e,t,n){let{node:r}=e,i=e.map(n,`declarations`),a=e.key===`init`&&e.parent.type===`ForStatement`||e.key===`left`&&(e.parent.type===`ForInStatement`||e.parent.type===`ForOfStatement`),o=r.declarations.some(e=>e.init),s;return s=i.length===1&&!q(r.declarations[0])?i[0]:Y(i[0]),X([Oj(e),r.kind,s?[` `,s]:``,Y(i.slice(1).map(e=>[`,`,o&&!a?$:Z,e])),a?``:Lj(t)])}function GL(e,t,n){let{node:r}=e;return X([r.type===`WithStatement`?`with`:`while`,` (`,Pj(e,t,n),`)`,PI(e,t,n)])}function KL(e,t,n,r){let{node:i}=e;if(VT(i))return XI(e,t);switch(i.type){case`JsExpressionRoot`:return n(`node`);case`JsonRoot`:return[vj(e,t),n(`node`),$];case`File`:return KI(e,t,n)??n(`program`);case`ExpressionStatement`:return UI(e,t,n);case`ChainExpression`:return n(`expression`);case`ParenthesizedExpression`:return!q(i.expression)&&(BT(i.expression)||zT(i.expression))?[`(`,n(`expression`),`)`]:X([`(`,Y([Q,n(`expression`)]),Q,`)`]);case`AssignmentExpression`:return zF(e,t,n);case`VariableDeclarator`:return BF(e,t,n);case`BinaryExpression`:case`LogicalExpression`:return jP(e,t,n);case`AssignmentPattern`:return[n(`left`),` = `,n(`right`)];case`OptionalMemberExpression`:case`MemberExpression`:return kF(e,t,n);case`MetaProperty`:return[n(`meta`),`.`,n(`property`)];case`BindExpression`:return TF(e,t,n);case`Identifier`:return[i.name,wj(e),Tj(e),OM(e,n)];case`V8IntrinsicIdentifier`:return[`%`,i.name];case`SpreadElement`:return SL(e,n);case`RestElement`:return SL(e,n);case`FunctionDeclaration`:case`FunctionExpression`:return MM(e,t,n,r);case`ArrowFunctionExpression`:return rF(e,t,n,r);case`YieldExpression`:return[`yield${i.delegate?`*`:``}`,i.argument?[` `,n(`argument`)]:``];case`AwaitExpression`:return nI(e,t,n);case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ExportAllDeclaration`:return cL(e,t,n);case`ImportDeclaration`:return oL(e,t,n);case`ImportSpecifier`:case`ExportSpecifier`:case`ImportNamespaceSpecifier`:case`ExportNamespaceSpecifier`:case`ImportDefaultSpecifier`:case`ExportDefaultSpecifier`:return bL(e,t,n);case`ImportAttribute`:return xL(e,t,n);case`Program`:case`BlockStatement`:case`StaticBlock`:return oI(e,t,n);case`ClassBody`:return pI(e,t,n);case`ThrowStatement`:return wL(e,t,n);case`ReturnStatement`:return wL(e,t,n);case`NewExpression`:case`ImportExpression`:case`OptionalCallExpression`:case`CallExpression`:return NF(e,t,n);case`ObjectExpression`:case`ObjectPattern`:return iL(e,t,n);case`Property`:return lT(i)?NM(e,t,n):xL(e,t,n);case`ObjectProperty`:return xL(e,t,n);case`ObjectMethod`:return NM(e,t,n);case`Decorator`:return[`@`,n(`expression`)];case`ArrayExpression`:case`ArrayPattern`:return qP(e,t,n);case`SequenceExpression`:return EL(e,t,n);case`ThisExpression`:return`this`;case`Super`:return`super`;case`Directive`:return[n(`value`),Lj(t)];case`UnaryExpression`:{let e=[i.operator];/[a-z]$/.test(i.operator)&&e.push(` `);let t=n(`argument`);return q(i.argument)?e.push(X([`(`,Y([Q,t]),Q,`)`])):e.push(t),e}case`UpdateExpression`:return[i.prefix?i.operator:``,n(`argument`),i.prefix?``:i.operator];case`ConditionalExpression`:return VL(e,t,n,r);case`VariableDeclaration`:return WL(e,t,n);case`IfStatement`:return YI(e,t,n);case`ForStatement`:return WI(e,t,n);case`WithStatement`:case`WhileStatement`:return GL(e,t,n);case`DoWhileStatement`:return LI(e,t,n);case`ForInStatement`:case`ForOfStatement`:return GI(e,t,n);case`DoExpression`:return[i.async?`async `:``,`do `,n(`body`)];case`BreakStatement`:case`ContinueStatement`:return[i.type===`BreakStatement`?`break`:`continue`,i.label?[` `,n(`label`)]:``,Lj(t)];case`LabeledStatement`:return[n(`label`),`:${i.body.type===`EmptyStatement`&&!q(i.body,K.Leading)?``:` `}`,n(`body`)];case`TryStatement`:return HL(e,t,n);case`CatchClause`:return UL(e,t,n);case`SwitchStatement`:return DL(e,t,n);case`SwitchCase`:return OL(e,t,n);case`DebuggerStatement`:return[`debugger`,Lj(t)];case`ClassDeclaration`:case`ClassExpression`:return CI(e,t,n);case`ClassMethod`:case`ClassPrivateMethod`:case`MethodDefinition`:return jI(e,t,n);case`ClassProperty`:case`PropertyDefinition`:case`ClassPrivateProperty`:case`ClassAccessorProperty`:case`AccessorProperty`:return MI(e,t,n);case`TemplateElement`:return Ik(i.value.raw);case`TemplateLiteral`:return QM(e,t,n);case`TaggedTemplateExpression`:return $M(e,t,n);case`PrivateIdentifier`:return[`#`,i.name];case`PrivateName`:return[`#`,n(`id`)];case`TopicReference`:return`%`;case`ArgumentPlaceholder`:return`?`;case`ModuleExpression`:return[`module `,n(`body`)];case`VoidPattern`:return`void`;case`EmptyStatement`:if(cT(e))return`;`;default:throw new OP(i,`ESTree`)}}function qL(e){return[e(`elementType`),`[]`]}function JL(e,t,n){let{parent:r,node:i,key:a}=e,o=i.type===`AsConstExpression`?`const`:n(`typeAnnotation`),s=[n(`expression`),` `,jT(i)?`satisfies`:`as`,` `,o];return a===`callee`&&JT(r)||a===`object`&&qT(r)?X([Y([Q,...s]),Q]):s}function YL(e,t,n){let{node:r}=e,i=[Oj(e),r.async?`async `:``,`component`];r.id&&i.push(` `,n(`id`)),i.push(n(`typeParameters`));let a=zj(e,t,n);return r.rendersType?i.push(X([a,` `,n(`rendersType`)])):i.push(X([a])),r.body&&i.push(` `,n(`body`)),r.type===`DeclareComponent`&&i.push(Lj(t)),i}function XL(e,t,n){let{node:r}=e;return r.shorthand?n(`local`):[n(`name`),` as `,n(`local`)]}function ZL(e,t,n){let{node:r}=e,i=[];return r.name&&i.push(n(`name`),r.optional?`?: `:`: `),i.push(n(`typeAnnotation`)),i}function QL(e,t,n){let{node:r}=e;return[r.explicitType?`of ${r.explicitType} `:``,iL(e,t,n)]}function $L(e,t,n){let{node:r}=e;return[r.type===`EnumSymbolBody`||r.explicitType?`of ${r.type.slice(4,-4).toLowerCase()} `:``,iL(e,t,n)]}function eR(e,t,n){let{node:r}=e,i=r.type===`TSEnumMember`,a=i?vM(e,t,n):n(`id`),o=i?`initializer`:`init`;return r[o]?[a,` = `,n(o)]:a}function tR(e,t){let{node:n}=e;return[Oj(e),n.const?`const `:``,`enum `,t(`id`),` `,t(`body`)]}function nR(e,t,n){let{node:r}=e,i=[Aj(e)];(r.type===`TSConstructorType`||r.type===`TSConstructSignatureDeclaration`)&&i.push(`new `);let a=zj(e,t,n,!1,!0),o=[];return r.type===`FunctionTypeAnnotation`?o.push(rR(e)?` => `:`: `,n(`returnType`)):o.push(OM(e,n,`returnType`)),Hj(r,o)&&(a=X(a)),i.push(a,o),[X(i),r.type===`TSConstructSignatureDeclaration`||r.type===`TSCallSignatureDeclaration`?hI(e,t):``]}function rR(e){let{node:t,parent:n}=e;return t.type===`FunctionTypeAnnotation`&&(JA(n)||!((n.type===`ObjectTypeProperty`||n.type===`ObjectTypeInternalSlot`)&&!n.variance&&!n.optional&&xT(n,t)||n.type===`ObjectTypeCallProperty`||e.getParentNode(2)?.type===`DeclareFunction`))}function iR(e,t,n){return[Oj(e),`hook`,e.node.id?[` `,n(`id`)]:``,Lj(t)]}function aR(e){let{node:t}=e;return t.type===`HookTypeAnnotation`&&e.getParentNode(2)?.type===`DeclareHook`}function oR(e,t,n){let{node:r}=e,i=zj(e,t,n,!1,!0),a=[aR(e)?`: `:` => `,n(`returnType`)];return X([aR(e)?``:`hook `,Hj(r,a)?X(i):i,a])}function sR(e,t,n){return[n(`objectType`),wj(e),`[`,n(`indexType`),`]`]}function cR(e,t,n){return[`infer `,n(`typeParameter`)]}function lR(e,t,n){let r=!1;return X(e.map(({isFirst:e,previous:i,node:a,index:o})=>{let s=n();if(e)return s;let c=HT(a),l=HT(i);return l&&c?[` & `,r?Y(s):s]:!l&&!c||zO(t.originalText,a)?t.experimentalOperatorPosition===`start`?Y([Z,`& `,s]):Y([` &`,Z,s]):(o>1&&(r=!0),[` & `,o>1?Y(s):s])},`types`))}function uR(e){switch(e){case null:return``;case`PlusOptional`:return`+?`;case`MinusOptional`:return`-?`;case`Optional`:return`?`}}function dR(e,t,n){let{node:r}=e;return[X([r.variance?n(`variance`):``,X([`[`,Y([Q,n(`keyTparam`),` in `,n(`sourceType`)]),Q,`]`]),uR(r.optional),`: `,n(`propType`)]),hI(e,t)]}function fR(e,t){return e===`+`||e===`-`?e+t:t}function pR(e,t,n){let{node:r}=e,i=!1;if(t.objectWrap===`preserve`){let e=UE(t),n=W(r)+1,a=n+e.slice(n).search(/\S/);AE(t.originalText,n,a)&&(i=!0)}let a=[],o=aO(r,K.Dangling);if(o.length>0){let n=eT(0,o,-1),r=vj(e,t);a.push(...r.slice(0,-1),X([eT(0,r,-1),JE(n)||OE(t.originalText,G(n))?$:Z]))}return X([`{`,Y([t.bracketSpacing?Z:Q,...a,r.readonly?[fR(r.readonly,`readonly`),` `]:``,X([`[`,Y([Q,n(`key`),` in `,n(`constraint`),r.nameType?[` as `,n(`nameType`)]:``]),Q,`]`]),r.optional?fR(r.optional,`?`):``,r.typeAnnotation?`: `:``,n(`typeAnnotation`),t.semi?eA(`;`):``]),t.bracketSpacing?Z:Q,`}`],{shouldBreak:i})}function mR(e,t,n){let{node:r}=e;return[X([`match (`,Y([Q,n(`argument`)]),Q,`)`]),` {`,r.cases.length>0?Y([$,nA($,e.map(({node:e,isLast:r})=>[n(),!r&&ZA(e,t)?$:``],`cases`))]):``,$,`}`]}function hR(e,t,n){let{node:r}=e,i=q(r,K.Dangling)?[` `,vj(e,t)]:[],a=r.type===`MatchStatementCase`?[` `,n(`body`)]:Y([Z,n(`body`),`,`]);return[n(`pattern`),r.guard?X([Y([Z,`if (`,n(`guard`),`)`])]):``,X([` =>`,i,a])]}function gR(e,t,n){let{node:r}=e;switch(r.type){case`MatchOrPattern`:return xR(e,t,n);case`MatchAsPattern`:return[n(`pattern`),` as `,n(`target`)];case`MatchWildcardPattern`:return[`_`];case`MatchLiteralPattern`:return n(`literal`);case`MatchUnaryPattern`:return[r.operator,n(`argument`)];case`MatchIdentifierPattern`:return n(`id`);case`MatchMemberPattern`:{let e=r.property.type===`Identifier`?[`.`,n(`property`)]:[`[`,Y([Q,n(`property`)]),Q,`]`];return X([n(`base`),e])}case`MatchBindingPattern`:return[r.kind,` `,n(`id`)];case`MatchObjectPattern`:case`MatchInstanceObjectPattern`:return _R(e,t,n);case`MatchInstancePattern`:return X([n(`targetConstructor`),` `,n(`properties`)]);case`MatchArrayPattern`:{let t=e.map(n,`elements`);return r.rest&&t.push(n(`rest`)),X([`[`,Y([Q,nA([`,`,Z],t)]),r.rest?``:eA(`,`),Q,`]`])}case`MatchObjectPatternProperty`:return r.shorthand?n(`pattern`):X([n(`key`),`:`,Y([Z,n(`pattern`)])]);case`MatchRestPattern`:{let e=[`...`];return r.argument&&e.push(n(`argument`)),e}}}function _R(e,t,n){let{node:r}=e,i=e.map(n,`properties`);return r.rest&&i.push(n(`rest`)),X([`{`,Y([Q,nA([`,`,Z],i)]),r.rest?``:eA(`,`),Q,`}`])}var vR=U([`MatchWildcardPattern`,`MatchLiteralPattern`,`MatchUnaryPattern`,`MatchIdentifierPattern`]);function yR(e){let{patterns:t}=e;if(t.some(e=>q(e)))return!1;let n=t.find(e=>e.type===`MatchObjectPattern`);return n?t.every(e=>e===n||vR(e)):!1}function bR(e){return vR(e)||e.type===`MatchObjectPattern`?!0:e.type===`MatchOrPattern`&&yR(e)}function xR(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`MatchStatementCase`&&i.type!==`MatchExpressionCase`&&i.type!==`MatchArrayPattern`&&i.type!==`MatchObjectPatternProperty`&&!zO(t.originalText,r),o=bR(r),s=e.map(()=>{let r=n();return o||(r=Gk(2,r)),Sj(e,r,t)},`patterns`);if(o)return nA(` | `,s);let c=[eA([`| `]),nA([Z,`| `],s)];return tk(e,t)?X([Y([eA([Q]),c]),Q]):i.type===`MatchArrayPattern`&&i.elements.length>1?X([Y([eA([`(`,Q]),c]),Q,eA(`)`)]):X(a?Y(c):c)}function SR(e,t,n){let{node:r}=e,i=[Oj(e),`opaque type `,n(`id`),n(`typeParameters`)];if(r.supertype&&i.push(`: `,n(`supertype`)),r.lowerBound||r.upperBound){let e=[];r.lowerBound&&e.push(Y([Z,`super `,n(`lowerBound`)])),r.upperBound&&e.push(Y([Z,`extends `,n(`upperBound`)])),i.push(X(e))}return r.impltype&&i.push(` = `,n(`impltype`)),i.push(Lj(t)),i}function CR(e,t,n){let{node:r}=e;return[`...`,...r.type===`TupleTypeSpreadElement`&&r.label?[n(`label`),`: `]:[],n(`typeAnnotation`)]}function wR(e,t,n){let{node:r}=e;return[r.variance?n(`variance`):``,n(`label`),r.optional?`?`:``,`: `,n(`elementType`)]}function TR(e,t,n){let{node:r}=e;return[RF(e,t,n,[Oj(e),`type `,n(`id`),n(`typeParameters`)],` =`,r.type===`TSTypeAliasDeclaration`?`typeAnnotation`:`right`),Lj(t)]}function ER(e,t,n){let{node:r}=e;return iT(r).length===1&&r.type.startsWith(`TS`)&&!r[n][0].constraint&&e.parent.type===`ArrowFunctionExpression`&&!(t.filepath&&/\.ts$/.test(t.filepath))}function DR(e,t,n,r){let{node:i}=e,a=i[r];if(!a)return``;if(!Array.isArray(a))return n(r);let o=dj(e.grandparent),s=e.match(e=>!(e[r].length===1&&HT(e[r][0])),void 0,(e,t)=>t===`typeAnnotation`,e=>e.type===`Identifier`,YF);if(a.length===0||!s&&(o||a.length===1&&(a[0].type===`NullableTypeAnnotation`||EM(a[0])))&&!a.some(e=>{let n=aO(e,e=>e.leading||e.trailing);return n.length>0&&(n.some(e=>JE(e))||OE(t.originalText,G(eT(0,n,-1))))}))return[`<`,nA(`, `,e.map(n,r)),OR(e,t),`>`];let c=i.type===`TSTypeParameterInstantiation`?``:ER(e,t,r)?`,`:Ij(t);return X([`<`,Y([Q,nA([`,`,Z],e.map(n,r))]),c,Q,`>`])}function OR(e,t){let{node:n}=e;if(!q(n,K.Dangling))return``;let r=!q(n,K.Line),i=vj(e,t,{indent:!r});return r?i:[i,$]}function kR(e,t,n){let{node:r}=e,i=[r.const?`const `:``],a=r.type===`TSTypeParameter`?n(`name`):r.name;if(r.variance&&i.push(n(`variance`)),r.in&&i.push(`in `),r.out&&i.push(`out `),i.push(a),r.bound&&(r.usesExtendsBound&&i.push(` extends `),i.push(OM(e,n,`bound`))),r.constraint){let e=Symbol(`constraint`);i.push(` extends`,X(Y(Z),{id:e}),sA,tA(n(`constraint`),{groupId:e}))}if(r.default){let e=Symbol(`default`);i.push(` =`,X(Y(Z),{id:e}),sA,tA(n(`default`),{groupId:e}))}return X(i)}function AR(e,t){let{node:n}=e;return[n.type===`TSTypePredicate`&&n.asserts?`asserts `:n.type===`TypePredicate`&&n.kind?`${n.kind} `:``,t(`parameterName`),n.typeAnnotation?[` is `,OM(e,t)]:``]}function jR({node:e},t){return[`typeof `,t(e.type===`TSTypeQuery`?`exprName`:`argument`),t(`typeArguments`)]}function MR(e,t,n,r){let{node:i}=e;if(QA(i))return i.type.slice(0,-14).toLowerCase();switch(i.type){case`ComponentDeclaration`:case`DeclareComponent`:case`ComponentTypeAnnotation`:return YL(e,t,n);case`ComponentParameter`:return XL(e,t,n);case`ComponentTypeParameter`:return ZL(e,t,n);case`HookDeclaration`:return MM(e,t,n);case`DeclareHook`:return iR(e,t,n);case`HookTypeAnnotation`:return oR(e,t,n);case`DeclareFunction`:return[Oj(e),`function `,n(`id`),n(`predicate`),Lj(t)];case`DeclareModule`:return[`declare module `,n(`id`),` `,n(`body`)];case`DeclareModuleExports`:return[`declare module.exports`,OM(e,n),Lj(t)];case`DeclareNamespace`:return[`declare namespace `,n(`id`),` `,n(`body`)];case`DeclareVariable`:return Array.isArray(i.declarations)?WL(e,t,n):[Oj(e),i.kind??`var`,` `,n(`id`),Lj(t)];case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:return cL(e,t,n);case`DeclareOpaqueType`:case`OpaqueType`:return SR(e,t,n);case`DeclareTypeAlias`:case`TypeAlias`:return TR(e,t,n);case`IntersectionTypeAnnotation`:return lR(e,t,n);case`UnionTypeAnnotation`:return wM(e,t,n,r);case`ConditionalTypeAnnotation`:return VL(e,t,n);case`InferTypeAnnotation`:return cR(e,t,n);case`FunctionTypeAnnotation`:return nR(e,t,n);case`TupleTypeAnnotation`:return qP(e,t,n);case`TupleTypeLabeledElement`:return wR(e,t,n);case`TupleTypeSpreadElement`:return CR(e,t,n);case`GenericTypeAnnotation`:return[n(`id`),DR(e,t,n,`typeParameters`)];case`IndexedAccessType`:case`OptionalIndexedAccessType`:return sR(e,t,n);case`TypeAnnotation`:return AM(e,t,n);case`TypeParameter`:return kR(e,t,n);case`TypeofTypeAnnotation`:return jR(e,n);case`ExistsTypeAnnotation`:return`*`;case`ArrayTypeAnnotation`:return qL(n);case`DeclareEnum`:case`EnumDeclaration`:return tR(e,n);case`EnumBody`:return QL(e,t,n);case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumBigIntBody`:case`EnumStringBody`:case`EnumSymbolBody`:return $L(e,t,n);case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumBigIntMember`:case`EnumStringMember`:case`EnumDefaultedMember`:return eR(e,t,n);case`FunctionTypeParam`:{let t=i.name?n(`name`):e.parent.this===i?`this`:``;return[t,wj(e),t?`: `:``,n(`typeAnnotation`)]}case`DeclareClass`:case`DeclareInterface`:case`InterfaceDeclaration`:case`InterfaceTypeAnnotation`:case`RecordDeclaration`:return CI(e,t,n);case`ObjectTypeAnnotation`:case`RecordDeclarationBody`:return pI(e,t,n);case`ClassImplements`:case`InterfaceExtends`:return[n(`id`),n(`typeParameters`)];case`RecordDeclarationImplements`:return[n(`id`),n(`typeArguments`)];case`NullableTypeAnnotation`:return[`?`,n(`typeAnnotation`)];case`Variance`:{let{kind:e}=i;return e===`plus`?`+`:e===`minus`?`-`:`${e} `}case`KeyofTypeAnnotation`:return[`keyof `,n(`argument`)];case`ObjectTypeCallProperty`:return[i.static?`static `:``,n(`value`),hI(e,t)];case`ObjectTypeMappedTypeProperty`:return dR(e,t,n);case`ObjectTypeIndexer`:return[i.static?`static `:``,i.variance?n(`variance`):``,`[`,n(`id`),i.id?`: `:``,n(`key`),`]: `,n(`value`),hI(e,t)];case`ObjectTypeProperty`:{let r=``;return i.proto?r=`proto `:i.static&&(r=`static `),[r,i.kind===`init`?``:i.kind+` `,i.variance?n(`variance`):``,vM(e,t,n),wj(e),lT(i)?``:`: `,n(`value`),hI(e,t)]}case`ObjectTypeInternalSlot`:return[i.static?`static `:``,`[[`,n(`id`),`]]`,wj(e),i.method?``:`: `,n(`value`),hI(e,t)];case`ObjectTypeSpreadProperty`:return SL(e,n);case`QualifiedTypeofIdentifier`:case`QualifiedTypeIdentifier`:return[n(`qualification`),`.`,n(`id`)];case`NullLiteralTypeAnnotation`:return`null`;case`BooleanLiteralTypeAnnotation`:return String(i.value);case`StringLiteralTypeAnnotation`:return Ik(aM(wT(i),t));case`NumberLiteralTypeAnnotation`:return Yj(wT(i));case`BigIntLiteralTypeAnnotation`:return QI(wT(i));case`TypeCastExpression`:return[`(`,n(`expression`),OM(e,n),`)`];case`TypePredicate`:return AR(e,n);case`TypeOperator`:return[i.operator,` `,n(`typeAnnotation`)];case`TypeParameterDeclaration`:case`TypeParameterInstantiation`:return DR(e,t,n,`params`);case`InferredPredicate`:case`DeclaredPredicate`:return[e.key===`predicate`&&e.parent.type!==`DeclareFunction`&&!e.parent.returnType?`: `:` `,`%checks`,...i.type===`DeclaredPredicate`?[`(`,n(`value`),`)`]:[]];case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return JL(e,t,n);case`MatchExpression`:case`MatchStatement`:return mR(e,t,n);case`MatchExpressionCase`:case`MatchStatementCase`:return hR(e,t,n);case`MatchOrPattern`:case`MatchAsPattern`:case`MatchWildcardPattern`:case`MatchLiteralPattern`:case`MatchUnaryPattern`:case`MatchIdentifierPattern`:case`MatchInstancePattern`:case`MatchInstanceObjectPattern`:case`MatchMemberPattern`:case`MatchBindingPattern`:case`MatchObjectPattern`:case`MatchObjectPatternProperty`:case`MatchRestPattern`:case`MatchArrayPattern`:return gR(e,t,n);case`RecordExpression`:return[n(`recordConstructor`),n(`typeArguments`),` `,n(`properties`)];case`RecordExpressionProperties`:return iL(e,t,n);case`RecordDeclarationProperty`:case`RecordDeclarationStaticProperty`:{let r=i.type===`RecordDeclarationStaticProperty`,a=r?`value`:`defaultValue`;return[r?`static `:``,vM(e,t,n),OM(e,n),i[a]?[` = `,n(a)]:``]}}}function NR(e,t){let{node:n}=e,r=t.originalText.slice(W(n),G(n));return t.semi&&bT(n)?r+=`;`:RM(e,t)&&(r=`;${r}`),n.type===`ClassExpression`&&Xw(n.decorators)?[Y([Q,r]),Q]:r}var PR=e=>e===``||e===Z||e===$||e===Q;function FR(e,t,n){let{node:r}=e;if(r.type===`JSXElement`&&$R(r))return[n(`openingElement`),n(`closingElement`)];let i=r.type===`JSXElement`?n(`openingElement`):n(`openingFragment`),a=r.type===`JSXElement`?n(`closingElement`):n(`closingFragment`);if(r.children.length===1&&r.children[0].type===`JSXExpressionContainer`&&(r.children[0].expression.type===`TemplateLiteral`||r.children[0].expression.type===`TaggedTemplateExpression`))return[i,...e.map(n,`children`),a];r.children=r.children.map(e=>ez(e)?{type:`JSXText`,value:` `,raw:` `}:e);let o=r.children.some(WT),s=r.children.filter(e=>e.type===`JSXExpressionContainer`).length>1,c=r.type===`JSXElement`&&r.openingElement.attributes.length>1,l=kk(i)||o||c||s,u=e.parent.rootMarker===`mdx`,d=t.singleQuote?`{' '}`:`{" "}`,f=u?Z:eA([d,Q],` `),p=IR(e,t,n,f,r.openingElement?.name?.name===`fbt`),m=r.children.some(e=>wP(e));for(let e=p.length-2;e>=0;e--){let t=p[e]===``&&p[e+1]===``,n=p[e]===$&&p[e+1]===``&&p[e+2]===$,r=(p[e]===Q||p[e]===$)&&p[e+1]===``&&p[e+2]===f,i=p[e]===f&&p[e+1]===``&&(p[e+2]===Q||p[e+2]===$),a=p[e]===f&&p[e+1]===``&&p[e+2]===f,o=p[e]===Q&&p[e+1]===``&&p[e+2]===$||p[e]===$&&p[e+1]===``&&p[e+2]===Q;n&&m||t||r||a||o?p.splice(e,2):i&&p.splice(e+1,2)}for(;p.length>0&&PR(eT(0,p,-1));)p.pop();for(;p.length>1&&PR(p[0])&&PR(p[1]);)p.shift(),p.shift();let h=[``];for(let[e,t]of p.entries()){if(t===f){if(e===1&&Bk(p[e-1])){if(p.length===2){h.push([h.pop(),d]);continue}h.push([d,$],``);continue}if(e===p.length-1){h.push([h.pop(),d]);continue}if(p[e-1]===``&&p[e-2]===$){h.push([h.pop(),d]);continue}}e%2==0?h.push([h.pop(),t]):h.push(t,``),kk(t)&&(l=!0)}let g=m?Qk(h):X(h,{shouldBreak:!0});if(t.cursorNode?.type===`JSXText`&&r.children.includes(t.cursorNode)?g=[Zk,g,Zk]:t.nodeBeforeCursor?.type===`JSXText`&&r.children.includes(t.nodeBeforeCursor)?g=[Zk,g]:t.nodeAfterCursor?.type===`JSXText`&&r.children.includes(t.nodeAfterCursor)&&(g=[g,Zk]),u)return g;let _=X([i,Y([$,g]),$,a]);return l?_:$k([X([i,...p,a]),_])}function IR(e,t,n,r,i){let a=``,o=[a];function s(e){a=e,o.push([o.pop(),e])}function c(e){e!==``&&(a=e,o.push(e,``))}return e.each(({node:e,next:t})=>{if(e.type===`JSXText`){let n=wT(e);if(wP(e)){let o=CP.split(n,!0);o[0]===``&&(o.shift(),/\n/.test(o[0])?c(RR(i,o[1],e,t)):c(r),o.shift());let l;if(eT(0,o,-1)===``&&(o.pop(),l=o.pop()),o.length===0)return;for(let[e,t]of o.entries())e%2==1?c(Z):s(t);l===void 0?c(LR(i,a,e,t)):/\n/.test(l)?c(RR(i,a,e,t)):c(r)}else/\n/.test(n)?n.match(/\n/g).length>1&&c($):c(r)}else if(s(n()),t&&wP(t)){let n=CP.trim(wT(t)),[r]=CP.split(n);c(LR(i,r,e,t))}else c($)},`children`),o}function LR(e,t,n,r){return e?``:n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?t.length===1?Q:$:Q}function RR(e,t,n,r){return e?$:t.length===1?n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?$:Q:$}var zR=U([`ArrayExpression`,`JSXAttribute`,`JSXElement`,`JSXExpressionContainer`,`JSXFragment`,`ExpressionStatement`,`NewExpression`,`CallExpression`,`OptionalCallExpression`,`ConditionalExpression`,`JsExpressionRoot`,`MatchExpressionCase`]);function BR(e,t,n){let{parent:r}=e;if(zR(r))return t;let i=VR(e),a=tk(e,n);return X([a?``:eA(`(`),Y([Q,t]),Q,a?``:eA(`)`)],{shouldBreak:i})}function VR(e){return e.match(void 0,(e,t)=>t===`body`&&e.type===`ArrowFunctionExpression`,(e,t)=>t===`arguments`&&KT(e))&&(e.match(void 0,void 0,void 0,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`)||e.match(void 0,void 0,void 0,(e,t)=>t===`expression`&&e.type===`ChainExpression`,(e,t)=>t===`expression`&&e.type===`JSXExpressionContainer`))}function HR(e,t,n){let{node:r}=e,i=[n(`name`)];if(r.value){let a;if(kT(r.value)){let n=RE(0,RE(0,wT(r.value).slice(1,-1),`'`,`'`),`"`,`"`),i=eM(n,t.jsxSingleQuote);n=i===`"`?RE(0,n,`"`,`"`):RE(0,n,`'`,`'`),a=e.call(()=>Sj(e,Ik(i+n+i),t),`value`)}else a=n(`value`);i.push(`=`,a)}return i}function UR(e,t,n){let{node:r}=e,i=(e,t)=>e.type===`JSXEmptyExpression`||!q(e)&&(zT(e)||BT(e)||e.type===`ArrowFunctionExpression`||e.type===`AwaitExpression`&&(i(e.argument,e)||e.argument.type===`JSXElement`)||KT(UO(e))||e.type===`FunctionExpression`||e.type===`TemplateLiteral`||e.type===`TaggedTemplateExpression`||e.type===`DoExpression`||WT(t)&&(e.type===`ConditionalExpression`||GT(e)));return i(r.expression,e.parent)?X([`{`,n(`expression`),sA,`}`]):X([`{`,Y([Q,n(`expression`)]),Q,sA,`}`])}function WR(e,t,n){let{node:r}=e,i=q(r.name)||q(r.typeArguments);if(r.selfClosing&&r.attributes.length===0&&!i)return[`<`,n(`name`),n(`typeArguments`),` />`];if(r.attributes?.length===1&&kT(r.attributes[0].value)&&!r.attributes[0].value.value.includes(`
|
|
1368
|
+
`)&&!i&&!q(r.attributes[0]))return X([`<`,n(`name`),n(`typeArguments`),` `,...e.map(n,`attributes`),r.selfClosing?` />`:`>`]);let a=r.attributes?.some(e=>kT(e.value)&&e.value.value.includes(`
|
|
1369
|
+
`)),o=t.singleAttributePerLine&&r.attributes.length>1?$:Z;return X([`<`,n(`name`),n(`typeArguments`),Y(e.map(({isFirst:e,previous:r})=>[e?o:ZA(r,t)?[$,$]:o,n()],`attributes`)),...GR(r,t,i)],{shouldBreak:a})}function GR(e,t,n){return e.selfClosing?[Z,`/>`]:KR(e,t,n)?[`>`]:[Q,`>`]}function KR(e,t,n){let r=e.attributes.length>0&&q(eT(0,e.attributes,-1),K.Trailing);return e.attributes.length===0&&!n||(t.bracketSameLine||t.jsxBracketSameLine)&&(!n||e.attributes.length>0)&&!r}function qR(e,t,n){let{node:r}=e,i=[`</`],a=n(`name`);return q(r.name,K.Leading|K.Line)?i.push(Y([$,a]),$):q(r.name,K.Leading|K.Block)?i.push(` `,a):i.push(a),i.push(`>`),i}function JR(e,t){let{node:n}=e,r=q(n),i=q(n,K.Line),a=n.type===`JSXOpeningFragment`;return[a?`<`:`</`,Y([i?$:r&&!a?` `:``,vj(e,t)]),i?$:``,`>`]}function YR(e,t,n){return BR(e,Sj(e,FR(e,t,n),t),t)}function XR(e,t){let{node:n}=e,r=q(n,K.Line);return[vj(e,t,{indent:r}),r?$:``]}function ZR(e,t,n){let{node:r}=e;return[`{`,e.call(({node:r})=>{let i=[`...`,n()];return q(r)?[Y([Q,Sj(e,i,t)]),Q]:i},r.type===`JSXSpreadAttribute`?`argument`:`expression`),`}`]}function QR(e,t,n){let{node:r}=e;if(r.type.startsWith(`JSX`))switch(r.type){case`JSXAttribute`:return HR(e,t,n);case`JSXIdentifier`:return r.name;case`JSXNamespacedName`:return nA(`:`,[n(`namespace`),n(`name`)]);case`JSXMemberExpression`:return nA(`.`,[n(`object`),n(`property`)]);case`JSXSpreadAttribute`:case`JSXSpreadChild`:return ZR(e,t,n);case`JSXExpressionContainer`:return UR(e,t,n);case`JSXFragment`:case`JSXElement`:return YR(e,t,n);case`JSXOpeningElement`:return WR(e,t,n);case`JSXClosingElement`:return qR(e,t,n);case`JSXOpeningFragment`:case`JSXClosingFragment`:return JR(e,t);case`JSXEmptyExpression`:return XR(e,t);case`JSXText`:throw Error(`JSXText should be handled by JSXElement`);default:throw new OP(r,`JSX`)}}function $R(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type===`JSXText`&&!wP(t)}function ez(e){return e.type===`JSXExpressionContainer`&&kT(e.expression)&&e.expression.value===` `&&!q(e.expression)}function tz(e,t,n){let{node:r}=e,i=r.parameters.length>1?Ij(t):``,a=X([Y([Q,nA([`, `,Q],e.map(n,`parameters`))]),i,Q]);return[e.key===`body`&&e.parent.type===`ClassBody`&&r.static?`static `:``,r.readonly?`readonly `:``,`[`,r.parameters?a:``,`]`,OM(e,n),hI(e,t)]}function nz(e,t,n){let{node:r}=e;return[r.postfix?``:n,OM(e,t),r.postfix?n:``]}function rz(e,t,n){let{node:r}=e,i=[],a=r.kind&&r.kind!==`method`?`${r.kind} `:``;i.push(jj(r),a,vM(e,t,n),wj(e));let o=zj(e,t,n,!1,!0),s=OM(e,n,`returnType`),c=Hj(r,s);return i.push(c?X(o):o),r.returnType&&i.push(X(s)),[X(i),hI(e,t)]}function iz(e,t,n){let{node:r}=e;return[Oj(e),r.kind===`global`?``:`${r.kind} `,n(`id`),r.body?[` `,X(n(`body`))]:Lj(t)]}function az(e,t,n){let{node:r}=e,i=!(zT(r.expression)||BT(r.expression)),a=X([`<`,Y([Q,n(`typeAnnotation`)]),Q,`>`]),o=[eA(`(`),Y([Q,n(`expression`)]),Q,eA(`)`)];return i?$k([[a,n(`expression`)],[a,X(o,{shouldBreak:!0})],[a,n(`expression`)]]):X([a,n(`expression`)])}function oz(e,t,n,r){let{node:i}=e;if(i.type.startsWith(`TS`)){if(tj(i))return i.type.slice(2,-7).toLowerCase();switch(i.type){case`TSThisType`:return`this`;case`TSTypeAssertion`:return az(e,t,n);case`TSDeclareFunction`:return MM(e,t,n);case`TSExportAssignment`:return[`export = `,n(`expression`),Lj(t)];case`TSModuleBlock`:return oI(e,t,n);case`TSInterfaceBody`:case`TSTypeLiteral`:return pI(e,t,n);case`TSTypeAliasDeclaration`:return TR(e,t,n);case`TSQualifiedName`:return[n(`left`),`.`,n(`right`)];case`TSAbstractMethodDefinition`:case`TSDeclareMethod`:return jI(e,t,n);case`TSAbstractAccessorProperty`:case`TSAbstractPropertyDefinition`:return MI(e,t,n);case`TSInterfaceHeritage`:case`TSClassImplements`:case`TSInstantiationExpression`:return[n(`expression`),n(`typeArguments`)];case`TSTemplateLiteralType`:return QM(e,t,n);case`TSNamedTupleMember`:return wR(e,t,n);case`TSRestType`:return CR(e,t,n);case`TSOptionalType`:return[n(`typeAnnotation`),`?`];case`TSInterfaceDeclaration`:return CI(e,t,n);case`TSTypeParameterDeclaration`:case`TSTypeParameterInstantiation`:return DR(e,t,n,`params`);case`TSTypeParameter`:return kR(e,t,n);case`TSAsExpression`:case`TSSatisfiesExpression`:return JL(e,t,n);case`TSArrayType`:return qL(n);case`TSPropertySignature`:return[i.readonly?`readonly `:``,vM(e,t,n),wj(e),OM(e,n),hI(e,t)];case`TSParameterProperty`:return[jj(i),i.static?`static `:``,i.override?`override `:``,i.readonly?`readonly `:``,n(`parameter`)];case`TSTypeQuery`:return jR(e,n);case`TSIndexSignature`:return tz(e,t,n);case`TSTypePredicate`:return AR(e,n);case`TSNonNullExpression`:return[n(`expression`),`!`];case`TSImportType`:return[NF(e,t,n),i.qualifier?[`.`,n(`qualifier`)]:``,DR(e,t,n,`typeArguments`)];case`TSLiteralType`:return n(`literal`);case`TSIndexedAccessType`:return sR(e,t,n);case`TSTypeOperator`:return[i.operator,` `,n(`typeAnnotation`)];case`TSMappedType`:return pR(e,t,n);case`TSMethodSignature`:return rz(e,t,n);case`TSNamespaceExportDeclaration`:return[`export as namespace `,n(`id`),Lj(t)];case`TSEnumDeclaration`:return tR(e,n);case`TSEnumBody`:return iL(e,t,n);case`TSEnumMember`:return eR(e,t,n);case`TSImportEqualsDeclaration`:return[`import `,fL(i,!1),n(`id`),` = `,n(`moduleReference`),Lj(t)];case`TSExternalModuleReference`:return NF(e,t,n);case`TSModuleDeclaration`:return iz(e,t,n);case`TSConditionalType`:return VL(e,t,n);case`TSInferType`:return cR(e,t,n);case`TSIntersectionType`:return lR(e,t,n);case`TSUnionType`:return wM(e,t,n,r);case`TSFunctionType`:case`TSCallSignatureDeclaration`:case`TSConstructorType`:case`TSConstructSignatureDeclaration`:return nR(e,t,n);case`TSTupleType`:return qP(e,t,n);case`TSTypeReference`:return[n(`typeName`),DR(e,t,n,`typeArguments`)];case`TSTypeAnnotation`:return AM(e,t,n);case`TSEmptyBodyFunctionExpression`:return PM(e,t,n);case`TSJSDocAllType`:return`*`;case`TSJSDocUnknownType`:return`?`;case`TSJSDocNullableType`:return nz(e,n,`?`);case`TSJSDocNonNullableType`:return nz(e,n,`!`);default:throw new OP(i,`TypeScript`)}}}function sz(e,t,n,r){for(let i of[IP,QR,MR,oz,KL]){let a=i(e,t,n,r);if(a!==void 0)return a}}var cz=U([`ClassMethod`,`ClassPrivateMethod`,`ClassProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`ClassPrivateProperty`,`MethodDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`]);function lz(e,t,n,r){e.isRoot&&t.__onHtmlBindingRoot?.(e.node,t);let{node:i}=e,a=DP(e)?NR(e,t):sz(e,t,n,r);if(!a)return``;if(cz(i))return a;a=uz(e,t,a);let o=i.type!==`ClassExpression`&&Xw(i.decorators)?UP(e,t,n):``,s=tk(e,t);return!o&&!s?a:zk(a,e=>[s?`(`:``,o?X([o,e]):e,s?`)`:``])}function uz(e,t,n){let{node:r}=e;return(q(r,K.Leading)||q(r,K.Trailing))&&sO(e)?[Y([Q,Sj(e,n,t)]),Q]:n}var dz={features:{experimental_avoidAstMutation:!0,experimental_locForRangeFormat:{locStart:W,locEnd:dT}},massageAstNode:XN,canAttachComment:oE,handleComments:tO,isGap:rO,willPrintOwnComments:qM,embed:zN,insertPragma:hP,printComment:bP,printPrettierIgnored:lz,print:lz,getVisitorKeys:PO,isBlockComment:qE,hasPrettierIgnore:DP},fz=[{name:`JSON.stringify`,type:`data`,aceMode:`json`,extensions:[`.importmap`],filenames:[`package.json`,`package-lock.json`,`composer.json`],tmScope:`source.json`,aliases:[`geojson`,`jsonl`,`sarif`,`topojson`],codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json-stringify`],vscodeLanguageIds:[`json`],linguistLanguageId:174},{name:`JSON`,type:`data`,aceMode:`json`,extensions:[`.json`,`.4DForm`,`.4DProject`,`.avsc`,`.geojson`,`.gltf`,`.har`,`.ice`,`.JSON-tmLanguage`,`.json.example`,`.mcmeta`,`.sarif`,`.slnlaunch`,`.tact`,`.tfstate`,`.tfstate.backup`,`.topojson`,`.webapp`,`.webmanifest`,`.yy`,`.yyp`],filenames:[`.all-contributorsrc`,`.arcconfig`,`.auto-changelog`,`.c8rc`,`.htmlhintrc`,`.imgbotconfig`,`.nycrc`,`.tern-config`,`.tern-project`,`.watchmanconfig`,`.babelrc`,`.jscsrc`,`.jshintrc`,`.jslintrc`,`.swcrc`],tmScope:`source.json`,aliases:[`geojson`,`jsonl`,`sarif`,`topojson`],codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json`],vscodeLanguageIds:[`json`],linguistLanguageId:174},{name:`JSON with Comments`,type:`data`,aceMode:`javascript`,extensions:[`.jsonc`,`.code-snippets`,`.code-workspace`,`.sublime-build`,`.sublime-color-scheme`,`.sublime-commands`,`.sublime-completions`,`.sublime-keymap`,`.sublime-macro`,`.sublime-menu`,`.sublime-mousemap`,`.sublime-project`,`.sublime-settings`,`.sublime-theme`,`.sublime-workspace`,`.sublime_metrics`,`.sublime_session`],filenames:[],tmScope:`source.json.comments`,aliases:[`jsonc`],codemirrorMode:`javascript`,codemirrorMimeType:`text/javascript`,group:`JSON`,parsers:[`jsonc`],vscodeLanguageIds:[`jsonc`],linguistLanguageId:423},{name:`JSON5`,type:`data`,aceMode:`json5`,extensions:[`.json5`],tmScope:`source.js`,codemirrorMode:`javascript`,codemirrorMimeType:`application/json`,parsers:[`json5`],vscodeLanguageIds:[`json5`],linguistLanguageId:175}],pz={};Gw(pz,{estree:()=>dz,"estree-json":()=>bz});var mz=NO({JsonRoot:[`node`],ArrayExpression:[`elements`],ObjectExpression:[`properties`],ObjectProperty:[`key`,`value`],UnaryExpression:[`argument`],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:[`quasis`],TemplateElement:[]});function hz(e){return e.extra.raw}var gz=/* @__PURE__ */ new Set([`start`,`end`,`loc`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`errors`,`range`,`tokens`]);function _z(e,t){let{type:n}=e;if(n===`ObjectProperty`){let{key:n}=e;if(n.type===`Identifier`){let{name:e}=n;t.key={type:`StringLiteral`,value:e,extra:{rawValue:e}}}else if(n.type===`NumericLiteral`){let e=hz(n);String(Number(e))===e&&(t.key={type:`StringLiteral`,value:e,extra:{rawValue:e}})}}if(n===`StringLiteral`&&delete t.extra.raw,n===`UnaryExpression`&&e.operator===`+`)return t.argument;if((n===`ArrayExpression`||n===`ObjectExpression`)&&(t.extra??={},e.extra?.trailingComma&&delete t.extra.trailingComma),n===`ArrayExpression`){for(let[n,r]of e.elements.entries())r===null&&t.elements.splice(n,0,{type:`NullLiteral`});return}if(n===`TemplateLiteral`){let t=e.quasis[0].value.cooked;return{type:`StringLiteral`,value:t,extra:{rawValue:t}}}}_z.ignoredProperties=gz;function vz(e,t,n){let{node:r}=e;switch(r.type){case`JsonRoot`:return[n(`node`),$];case`ArrayExpression`:{if(r.elements.length===0)return`[]`;let t=e.map(()=>e.node===null?`null`:n(),`elements`);return[`[`,Y([$,nA([`,`,$],t)]),$,`]`]}case`ObjectExpression`:return r.properties.length===0?`{}`:[`{`,Y([$,nA([`,`,$],e.map(n,`properties`))]),$,`}`];case`ObjectProperty`:return[n(`key`),`: `,n(`value`)];case`UnaryExpression`:return[r.operator===`+`?``:r.operator,n(`argument`)];case`NullLiteral`:return`null`;case`BooleanLiteral`:return r.value?`true`:`false`;case`StringLiteral`:return aM(hz(r),t);case`NumericLiteral`:{let t=hz(r);return yz(e)&&String(Number(t))===t?`"${t}"`:t}case`Identifier`:return yz(e)?JSON.stringify(r.name):r.name;case`TemplateLiteral`:return n([`quasis`,0]);case`TemplateElement`:return JSON.stringify(r.value.cooked);default:throw new OP(r,`JSON`)}}function yz(e){return e.key===`key`&&e.parent.type===`ObjectProperty`}var bz={massageAstNode:_z,print:vz,getVisitorKeys:mz},xz={bracketSpacing:{category:`Common`,type:`boolean`,default:!0,description:`Print spaces between brackets.`,oppositeDescription:`Do not print spaces between brackets.`},objectWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap object literals.`,choices:[{value:`preserve`,description:`Keep as multi-line, if there is a newline between the opening brace and first property.`},{value:`collapse`,description:`Fit to a single line when possible.`}]},singleQuote:{category:`Common`,type:`boolean`,default:!1,description:`Use single quotes instead of double quotes.`},proseWrap:{category:`Common`,type:`choice`,default:`preserve`,description:`How to wrap prose.`,choices:[{value:`always`,description:`Wrap prose if it exceeds the print width.`},{value:`never`,description:`Do not wrap prose.`},{value:`preserve`,description:`Wrap prose as-is.`}]},bracketSameLine:{category:`Common`,type:`boolean`,default:!1,description:`Put > of opening tags on the last line instead of on a new line.`},singleAttributePerLine:{category:`Common`,type:`boolean`,default:!1,description:`Enforce single attribute per line in HTML, Vue and JSX.`}},Sz=`JavaScript`,Cz={arrowParens:{category:Sz,type:`choice`,default:`always`,description:`Include parentheses around a sole arrow function parameter.`,choices:[{value:`always`,description:"Always include parens. Example: `(x) => x`"},{value:`avoid`,description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:xz.bracketSameLine,objectWrap:xz.objectWrap,bracketSpacing:xz.bracketSpacing,jsxBracketSameLine:{category:Sz,type:`boolean`,description:`Put > on the last line instead of at a new line.`,deprecated:`2.4.0`},semi:{category:Sz,type:`boolean`,default:!0,description:`Print semicolons.`,oppositeDescription:`Do not print semicolons, except at the beginning of lines which may need them.`},experimentalOperatorPosition:{category:Sz,type:`choice`,default:`end`,description:`Where to print operators when binary expressions wrap lines.`,choices:[{value:`start`,description:`Print operators at the start of new lines.`},{value:`end`,description:`Print operators at the end of previous lines.`}]},experimentalTernaries:{category:Sz,type:`boolean`,default:!1,description:`Use curious ternaries, with the question mark after the condition.`,oppositeDescription:`Default behavior of ternaries; keep question marks on the same line as the consequent.`},singleQuote:xz.singleQuote,jsxSingleQuote:{category:Sz,type:`boolean`,default:!1,description:`Use single quotes in JSX.`},quoteProps:{category:Sz,type:`choice`,default:`as-needed`,description:`Change when properties in objects are quoted.`,choices:[{value:`as-needed`,description:`Only add quotes around object properties where required.`},{value:`consistent`,description:`If at least one property in an object requires quotes, quote all properties.`},{value:`preserve`,description:`Respect the input use of quotes in object properties.`}]},trailingComma:{category:Sz,type:`choice`,default:`all`,description:`Print trailing commas wherever possible when multi-line.`,choices:[{value:`all`,description:`Trailing commas wherever possible (including function arguments).`},{value:`es5`,description:`Trailing commas where valid in ES5 (objects, arrays, etc.)`},{value:`none`,description:`No trailing commas.`}]},singleAttributePerLine:xz.singleAttributePerLine},wz={...Jw,...pz},Tz=[...qw,...fz],Ez=Object.defineProperty,Dz=(e,t)=>{for(var n in t)Ez(e,n,{get:t[n],enumerable:!0})};Dz({},{__debug:()=>xK,check:()=>yK,doc:()=>NG,format:()=>vK,formatWithCursor:()=>_K,getSupportInfo:()=>bK,util:()=>RG,version:()=>LG});var Oz=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),kz=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Az=Oz(`replaceAll`,function(){if(typeof this==`string`)return kz}),jz=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Mz=new class extends jz{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function Nz(e,t,n){return Mz.diff(e,t,n)}var Pz=()=>{},Fz=`cr`,Iz=`crlf`,Lz=`lf`,Rz=`\r`,zz=`\r
|
|
1370
|
+
`,Bz=`
|
|
1371
|
+
`,Vz=Bz;function Hz(e){let t=e.indexOf(Rz);return t===-1?Lz:e.charAt(t+1)===Bz?Iz:Fz}function Uz(e){return e===Fz?Rz:e===Iz?zz:Vz}var Wz=/* @__PURE__ */ new Map([[Bz,/\n/g],[Rz,/\r/g],[zz,/\r\n/g]]);function Gz(e,t){let n=Wz.get(t);return e.match(n)?.length??0}var Kz=/\r\n?/g;function qz(e){return Az(0,e,Kz,Bz)}var Jz=Symbol.for(`comments`);function Yz(e){return this[e<0?this.length+e:e]}var Xz=Oz(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return Yz}),Zz=`string`,Qz=`array`,$z=`cursor`,eB=`indent`,tB=`align`,nB=`trim`,rB=`group`,iB=`fill`,aB=`if-break`,oB=`indent-if-break`,sB=`line-suffix`,cB=`line-suffix-boundary`,lB=`line`,uB=`label`,dB=`break-parent`,fB=/* @__PURE__ */ new Set([$z,eB,tB,nB,rB,iB,aB,oB,sB,cB,lB,uB,dB]);function pB(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
|
|
1372
|
+
`);)t--;return t<e.length?e.slice(0,t):e}function mB(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function hB(e){if(typeof e==`string`)return Zz;if(Array.isArray(e))return Qz;if(!e)return;let{type:t}=e;if(fB.has(t))return t}var gB=hB,_B=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function vB(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
|
|
1373
|
+
Expected it to be 'string' or 'object'.`;if(gB(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=_B([...fB].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
|
|
1374
|
+
Expected it to be ${r}.`}var yB=class extends Error{name=`InvalidDocError`;constructor(e){super(vB(e)),this.doc=e}},bB={};function xB(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===bB){n(i.pop());continue}n&&i.push(e,bB);let a=gB(e);if(!a)throw new yB(e);if(t?.(e)!==!1)switch(a){case Qz:case iB:{let t=a===Qz?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case aB:i.push(e.flatContents,e.breakContents);break;case rB:if(r&&e.expandedStates)for(let t=e.expandedStates.length,n=t-1;n>=0;--n)i.push(e.expandedStates[n]);else i.push(e.contents);break;case tB:case eB:case oB:case uB:case sB:i.push(e.contents);break;case Zz:case $z:case nB:case cB:case lB:case dB:break;default:throw new yB(e)}}}var SB=xB;function CB(e,t){if(typeof e==`string`)return t(e);let n=/* @__PURE__ */ new Map;return r(e);function r(e){return mB(n,e,i)}function i(e){switch(gB(e)){case Qz:return t(e.map(r));case iB:return t({...e,parts:e.parts.map(r)});case aB:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case rB:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case tB:case eB:case oB:case uB:case sB:return t({...e,contents:r(e.contents)});case Zz:case $z:case nB:case cB:case lB:case dB:return t(e);default:throw new yB(e)}}}function wB(e,t,n){let r=n,i=!1;function a(e){if(i)return!1;let n=t(e);n!==void 0&&(i=!0,r=n)}return SB(e,a),r}function TB(e){if(e.type===rB&&e.break||e.type===lB&&e.hard||e.type===dB)return!0}function EB(e){return wB(e,TB,!1)}function DB(e){if(e.length>0){let t=Xz(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function OB(e){let t=/* @__PURE__ */ new Set,n=[];function r(e){if(e.type===dB&&DB(n),e.type===rB){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===rB&&n.pop().break&&DB(n)}SB(e,r,i,!0)}function kB(e){return e.type===lB&&!e.hard?e.soft?``:` `:e.type===aB?e.flatContents:e}function AB(e){return CB(e,kB)}function jB(e){for(e=[...e];e.length>=2&&Xz(0,e,-2).type===lB&&Xz(0,e,-1).type===dB;)e.length-=2;if(e.length>0){let t=MB(Xz(0,e,-1));e[e.length-1]=t}return e}function MB(e){switch(gB(e)){case eB:case oB:case rB:case sB:case uB:{let t=MB(e.contents);return{...e,contents:t}}case aB:return{...e,breakContents:MB(e.breakContents),flatContents:MB(e.flatContents)};case iB:return{...e,parts:jB(e.parts)};case Qz:return jB(e);case Zz:return pB(e);case tB:case $z:case nB:case cB:case lB:case dB:break;default:throw new yB(e)}return e}function NB(e){return MB(FB(e))}function PB(e){switch(gB(e)){case iB:{let{parts:t}=e;if(t.every(e=>e===``))return``;if(t.length===1)return t[0];break}case rB:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===rB&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case tB:case eB:case oB:case sB:if(!e.contents)return``;break;case aB:if(!e.flatContents&&!e.breakContents)return``;break;case Qz:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof Xz(0,t,-1)==`string`?t[t.length-1]+=e:t.push(e),t.push(...r)}return t.length===0?``:t.length===1?t[0]:t}case Zz:case $z:case nB:case cB:case lB:case uB:case dB:break;default:throw new yB(e)}return e}function FB(e){return CB(e,e=>PB(e))}function IB(e,t=uV){return CB(e,e=>typeof e==`string`?rV(t,e.split(`
|
|
1375
|
+
`)):e)}function LB(e){if(e.type===lB)return!0}function RB(e){return wB(e,LB,!1)}function zB(e,t){return e.type===uB?{...e,contents:t(e.contents)}:t(e)}var BB=Pz,VB=Pz,HB=Pz,UB=Pz;function WB(e){return BB(e),{type:eB,contents:e}}function GB(e,t){return UB(e),BB(t),{type:tB,contents:t,n:e}}function KB(e){return GB(-1/0,e)}function qB(e){return GB({type:`root`},e)}function JB(e){return GB(-1,e)}function YB(e,t,n){BB(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=WB(r);r=GB(t%n,r),r=GB(-1/0,r)}return r}var XB={type:dB},ZB={type:$z};function QB(e){return HB(e),{type:iB,parts:e}}function $B(e,t={}){return BB(e),VB(t.expandedStates,!0),{type:rB,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function eV(e,t){return $B(e[0],{...t,expandedStates:e})}function tV(e,t=``,n={}){return BB(e),t!==``&&BB(t),{type:aB,breakContents:e,flatContents:t,groupId:n.groupId}}function nV(e,t){return BB(e),{type:oB,contents:e,groupId:t.groupId,negate:t.negate}}function rV(e,t){BB(e),VB(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function iV(e,t){return BB(t),e?{type:uB,label:e,contents:t}:t}var aV={type:lB},oV={type:lB,soft:!0},sV={type:lB,hard:!0},cV=[sV,XB],lV={type:lB,hard:!0,literal:!0},uV=[lV,XB];function dV(e){return BB(e),{type:sB,contents:e}}var fV={type:cB},pV={type:nB};function mV(e){if(!e)return``;if(Array.isArray(e)){let t=[];for(let n of e)if(Array.isArray(n))t.push(...mV(n));else{let e=mV(n);e!==``&&t.push(e)}return t}return e.type===aB?{...e,breakContents:mV(e.breakContents),flatContents:mV(e.flatContents)}:e.type===rB?{...e,contents:mV(e.contents),expandedStates:e.expandedStates?.map(mV)}:e.type===iB?{type:`fill`,parts:e.parts.map(mV)}:e.contents?{...e,contents:mV(e.contents)}:e}function hV(e){let t=Object.create(null),n=/* @__PURE__ */ new Set;return r(mV(e));function r(e,t,n){if(typeof e==`string`)return JSON.stringify(e);if(Array.isArray(e)){let t=e.map(r).filter(Boolean);return t.length===1?t[0]:`[${t.join(`, `)}]`}if(e.type===lB){let r=n?.[t+1]?.type===dB;return e.literal?r?`literalline`:`literallineWithoutBreakParent`:e.hard?r?`hardline`:`hardlineWithoutBreakParent`:e.soft?`softline`:`line`}if(e.type===dB)return n?.[t-1]?.type===lB&&n[t-1].hard?void 0:`breakParent`;if(e.type===nB)return`trim`;if(e.type===eB)return`indent(`+r(e.contents)+`)`;if(e.type===tB)return e.n===-1/0?`dedentToRoot(`+r(e.contents)+`)`:e.n<0?`dedent(`+r(e.contents)+`)`:e.n.type===`root`?`markAsRoot(`+r(e.contents)+`)`:`align(`+JSON.stringify(e.n)+`, `+r(e.contents)+`)`;if(e.type===aB)return`ifBreak(`+r(e.breakContents)+(e.flatContents?`, `+r(e.flatContents):``)+(e.groupId?(e.flatContents?``:`, ""`)+`, { groupId: ${i(e.groupId)} }`:``)+`)`;if(e.type===oB){let t=[];e.negate&&t.push(`negate: true`),e.groupId&&t.push(`groupId: ${i(e.groupId)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return`indentIfBreak(${r(e.contents)}${n})`}if(e.type===rB){let t=[];e.break&&e.break!==`propagated`&&t.push(`shouldBreak: true`),e.id&&t.push(`id: ${i(e.id)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return e.expandedStates?`conditionalGroup([${e.expandedStates.map(e=>r(e)).join(`,`)}]${n})`:`group(${r(e.contents)}${n})`}if(e.type===iB)return`fill([${e.parts.map(e=>r(e)).join(`, `)}])`;if(e.type===sB)return`lineSuffix(`+r(e.contents)+`)`;if(e.type===cB)return`lineSuffixBoundary`;if(e.type===uB)return`label(${JSON.stringify(e.label)}, ${r(e.contents)})`;if(e.type===$z)return`cursor`;throw Error(`Unknown doc type `+e.type)}function i(e){if(typeof e!=`symbol`)return JSON.stringify(String(e));if(e in t)return t[e];let r=e.description||`symbol`;for(let i=0;;i++){let a=r+(i>0?` #${i}`:``);if(!n.has(a))return n.add(a),t[e]=`Symbol.for(${JSON.stringify(a)})`}}}var gV=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,_V=12288,vV=65510,yV=[12288,12288,65281,65376,65504,65510],bV=4352,xV=262141,SV=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],CV=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},wV=19968,[TV,EV]=DV(SV);function DV(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(wV>=i&&wV<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var OV=e=>e<_V||e>vV?!1:CV(yV,e),kV=e=>e>=TV&&e<=EV?!0:e<bV||e>xV?!1:CV(SV,e),AV=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05-\u2B07]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF3\uDFF5\uDFF7]|\uD83D[\uDC3F\uDC41\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])$/,jV=e=>AV.test(e),MV=/[^\x20-\x7F]/;function NV(e){if(!e)return 0;if(!MV.test(e))return e.length;let t=0;e=e.replace(gV(),e=>(t+=jV(e)?1:2,``));for(let n of e){let e=n.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||e>=65024&&e<=65039||(t+=OV(e)||kV(e)?2:1)}return t}var PV=NV,FV={type:0},IV={type:1},LV={value:``,length:0,queue:[],get root(){return LV}};function RV(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i=``,a=0,o=0,s=0;for(let e of r)switch(e.type){case 0:u(),n.useTabs?c(1):l(n.tabWidth);break;case 3:{let{string:t}=e;u(),i+=t,a+=t.length;break}case 2:{let{width:t}=e;o+=1,s+=t;break}default:throw Error(`Unexpected indent comment '${e.type}'.`)}return f(),{...e,value:i,length:a,queue:r};function c(e){i+=` `.repeat(e),a+=n.tabWidth*e}function l(e){i+=` `.repeat(e),a+=e}function u(){n.useTabs?d():f()}function d(){o>0&&c(o),p()}function f(){s>0&&l(s),p()}function p(){o=0,s=0}}function zV(e,t,n){if(!t)return e;if(t.type===`root`)return{...e,root:e};if(t===-1/0)return e.root;let r;return r=typeof t==`number`?t<0?IV:{type:2,width:t}:{type:3,string:t},RV(e,r,n)}function BV(e,t){return RV(e,FV,t)}function VV(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===` `||r===` `)t++;else break}return t}function HV(e){let t=VV(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var UV=class{#e=[];#t=``;#n=0;#r=[];#i=[];#a(){let e=this.#t;e!==``&&(this.#e.push(e),this.#n+=e.length,this.#t=``);for(let e of this.#i)this.#r.push(Math.min(e,this.#n));this.#i.length=0}markPosition(){if(this.#r.length+this.#i.length>=2)throw Error(`There are too many 'cursor' in doc.`);this.#i.push(this.#n+this.#t.length)}write(e){this.#t+=e}trim(){let{text:e,count:t}=HV(this.#t);return this.#t=e,this.#a(),t}finish(){return this.#a(),{text:this.#e.join(``),positions:this.#r}}},WV=Symbol(`MODE_BREAK`),GV=Symbol(`MODE_FLAT`),KV=Symbol(`DOC_FILL_PRINTED_LENGTH`);function qV(e,t,n,r,i,a){if(n===1/0)return!0;let o=t.length,s=!1,c=[e],l=``;for(;n>=0;){if(c.length===0){if(o===0)return!0;c.push(t[--o]);continue}let{mode:e,doc:u}=c.pop(),d=gB(u);switch(d){case Zz:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=PV(u));break;case Qz:case iB:{let t=d===Qz?u:u.parts,n=u[KV]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case eB:case tB:case oB:case uB:c.push({mode:e,doc:u.contents});break;case nB:{let{text:e,count:t}=HV(l);l=e,n+=t;break}case rB:{if(a&&u.break)return!1;let t=u.break?WV:e,n=u.expandedStates&&t===WV?Xz(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case aB:{let t=(u.groupId?i[u.groupId]||GV:e)===WV?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case lB:if(e===WV||u.hard)return!0;u.soft||(s=!0);break;case sB:r=!0;break;case cB:if(r)return!1}}return!1}function JV(e,t){let n=Object.create(null),r=t.printWidth,i=Uz(t.endOfLine),a=0,o=[{indent:LV,mode:WV,doc:e}],s=!1,c=[],l=new UV;for(OB(e);o.length>0;){let{indent:e,mode:u,doc:d}=o.pop();switch(gB(d)){case Zz:{let e=i===`
|
|
1376
|
+
`?d:Az(0,d,`
|
|
1377
|
+
`,i);e&&(l.write(e),o.length>0&&(a+=PV(e)));break}case Qz:for(let t=d.length-1;t>=0;t--)o.push({indent:e,mode:u,doc:d[t]});break;case $z:l.markPosition();break;case eB:o.push({indent:BV(e,t),mode:u,doc:d.contents});break;case tB:o.push({indent:zV(e,d.n,t),mode:u,doc:d.contents});break;case nB:a-=l.trim();break;case rB:{let t=(function(){if(u===GV&&!s)return{indent:e,mode:d.break?WV:GV,doc:d.contents};s=!1;let t=r-a,i=c.length>0,l={indent:e,mode:GV,doc:d.contents};if(!d.break&&qV(l,o,t,i,n))return l;if(!d.expandedStates)return{indent:e,mode:WV,doc:d.contents};if(!d.break)for(let r=1;r<d.expandedStates.length-1;r++){let a={indent:e,mode:GV,doc:d.expandedStates[r]};if(qV(a,o,t,i,n))return a}return{indent:e,mode:WV,doc:Xz(0,d.expandedStates,-1)}})();o.push(t),d.id&&(n[d.id]=t.mode);break}case iB:{let t=r-a,i=d[KV]??0,{parts:s}=d,l=s.length-i;if(l===0)break;let f=s[i+0],p=s[i+1],m={indent:e,mode:GV,doc:f},h={indent:e,mode:WV,doc:f},g=qV(m,[],t,c.length>0,n,!0);if(l===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:GV,doc:p},v={indent:e,mode:WV,doc:p};if(l===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],b={indent:e,mode:u,doc:{...d,[KV]:i+2}},x=qV({indent:e,mode:GV,doc:[f,p,y]},[],t,c.length>0,n,!0);o.push(b),x?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case aB:case oB:{let t=d.groupId?n[d.groupId]:u;if(t===WV){let t=d.type===aB?d.breakContents:d.negate?d.contents:WB(d.contents);t&&o.push({indent:e,mode:u,doc:t})}if(t===GV){let t=d.type===aB?d.flatContents:d.negate?WB(d.contents):d.contents;t&&o.push({indent:e,mode:u,doc:t})}break}case sB:c.push({indent:e,mode:u,doc:d.contents});break;case cB:c.length>0&&o.push({indent:e,mode:u,doc:sV});break;case lB:switch(u){case GV:if(!d.hard){d.soft||(l.write(` `),a+=1);break}s=!0;case WV:if(c.length>0){o.push({indent:e,mode:u,doc:d},...c.reverse()),c.length=0;break}d.literal?(l.write(i),a=0,e.root&&(e.root.value&&l.write(e.root.value),a=e.root.length)):(l.trim(),l.write(i+e.value),a=e.length)}break;case uB:o.push({indent:e,mode:u,doc:d.contents});break;case dB:break;default:throw new yB(d)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let{text:u,positions:d}=l.finish();if(d.length!==2)return{formatted:u};let[f,p]=d;return{formatted:u,cursorNodeStart:f,cursorNodeText:u.slice(f,p)}}function YV(e,t,n=0){let r=0;for(let i=n;i<e.length;++i)e[i]===` `?r=r+t-r%t:r++;return r}var XV=YV,ZV=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return Xz(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:Xz(0,this.stack,-2)}get node(){return Xz(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=Xz(0,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#t()]}getName(){let{stack:e}=this,{length:t}=e;return t>1?Xz(0,e,-2):null}getValue(){return Xz(0,this.stack,-1)}getNode(e=0){let t=this.#e(e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#e(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1}call(e,...t){let{stack:n}=this,{length:r}=n,i=Xz(0,n,-1);for(let e of t)i=i?.[e],n.push(e,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=this.#e(t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=Xz(0,n,-1);for(let e of t)i=i[e],n.push(e,i);try{for(let t=0;t<i.length;++t)n.push(t,i[t]),e(this,t,i),n.length-=2}finally{n.length=r}}map(e,...t){let n=[];return this.each((t,r,i)=>{n[r]=e(t,r,i)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let e=null;if(typeof n==`number`&&(e=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,e))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#t())if(e(t))return t}hasAncestor(e){for(let t of this.#t())if(e(t))return!0;return!1}*#t(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}}};function QV(e){return Array.isArray(e)&&e.length>0}var $V=QV;function eH(e){return typeof e==`object`&&!!e}var tH=eH;function nH(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var rH=nH(/\s/),iH=nH(` `),aH=nH(`,; `),oH=nH(/[^\n\r]/),sH=e=>e===`
|
|
1378
|
+
`||e===`\r`||e===`\u2028`||e===`\u2029`;function cH(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
|
|
1379
|
+
`)return t-2;if(sH(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
|
|
1380
|
+
`)return t+2;if(sH(i))return t+1}return t}var lH=cH;function uH(e,t,n={}){let r=iH(e,n.backwards?t-1:t,n);return r!==lH(e,r,n)}var dH=uH;function*fH(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>tH(e)&&r(e);for(let t of n(e)){let n=e[t];if(Array.isArray(n))for(let e of n)i(e)&&(yield e);else i(n)&&(yield n)}}function*pH(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of fH(r,t))yield e,n.push(e)}}function mH(e,t){return fH(e,t).next().done}function hH(e,t,n){let{filter:r}=n;if(!r)return[];let i,a=(n.getChildren?.(e,n)??[...fH(e,{getVisitorKeys:n.getVisitorKeys})]).flatMap(a=>(i??=[e,...t],r(a,i)?[a]:gH(a,i,n))),{locStart:o,locEnd:s}=n;return a.sort((e,t)=>o(e)-o(t)||s(e)-s(t)),a}function gH(e,t,n){return mB(n.cache,e,e=>hH(e,t,n))}var _H=gH;function vH(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function yH(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=vH(e)}function bH(e,t){t.leading=!0,t.trailing=!1,yH(e,t)}function xH(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),yH(e,t)}function SH(e,t){t.leading=!1,t.trailing=!0,yH(e,t)}var CH=/* @__PURE__ */ new WeakMap;function wH(e,t,n,r,i=[]){let{locStart:a,locEnd:o}=n,s=a(t),c=o(t),l=_H(e,i,{cache:CH,locStart:a,locEnd:o,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes}),u,d,f=0,p=l.length;for(;f<p;){let e=f+p>>1,r=l[e],m=a(r),h=o(r);if(m<=s&&c<=h)return wH(r,t,n,r,[r,...i]);if(h<=s){u=r,f=e+1;continue}if(c<=m){d=r,p=e;continue}throw Error(`Comment location overlaps with node location`)}if(r?.type===`TemplateLiteral`){let{quasis:e}=r,i=jH(e,t,n);u&&jH(e,u,n)!==i&&(u=null),d&&jH(e,d,n)!==i&&(d=null)}return{enclosingNode:r,precedingNode:u,followingNode:d}}var TH=()=>!1;function EH(e,t){let{comments:n}=e;if(delete e.comments,!$V(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:a={}},originalText:o}=t,{ownLine:s=TH,endOfLine:c=TH,remaining:l=TH}=a,u=n.map((r,i)=>({...wH(e,r,t),comment:r,text:o,options:t,ast:e,isLastComment:n.length-1===i,placement:void 0})),d=!i;for(let[e,t]of u.entries()){let{comment:n,precedingNode:a,enclosingNode:o,followingNode:f,text:p,options:m,ast:h,isLastComment:g}=t,_=OH(p,m,u,e)?`ownLine`:kH(p,m,u,e)?`endOfLine`:`remaining`,v;if(i?(t.placement=_,v=[t]):v=[n,p,m,h,g],d&&(n.enclosingNode=o,n.precedingNode=a,n.followingNode=f),n.placement=_,_===`ownLine`)s(...v)||(f?bH(f,n):a?SH(a,n):xH(o||h,n));else if(_===`endOfLine`)c(...v)||(a?SH(a,n):f?bH(f,n):xH(o||h,n));else if(!l(...v)){if(a&&f){let e=r.length;e>0&&r[e-1].followingNode!==f&&AH(r,m),r.push(t)}else a?SH(a,n):f?bH(f,n):xH(o||h,n)}}if(AH(r,t),d)for(let e of n)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}var DH=e=>!/[\S\n\u2028\u2029]/.test(e);function OH(e,t,n,r){let{comment:i,precedingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=o(i);if(a)for(let t=r-1;t>=0;t--){let{comment:r,precedingNode:i}=n[t];if(i!==a||!DH(e.slice(s(r),c)))break;c=o(r)}return dH(e,c,{backwards:!0})}function kH(e,t,n,r){let{comment:i,followingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=s(i);if(a)for(let t=r+1;t<n.length;t++){let{comment:r,followingNode:i}=n[t];if(i!==a||!DH(e.slice(c,o(r))))break;c=s(r)}return dH(e,c)}function AH(e,t){let n=e.length;if(n===0)return;let{precedingNode:r,followingNode:i}=e[0],a=t.locStart(i),o;for(o=n;o>0;--o){let{comment:n,precedingNode:r,followingNode:i}=e[o-1],s=t.originalText.slice(t.locEnd(n),a);if(t.printer.isGap?.(s,t)??/^[\s(]*$/.test(s))a=t.locStart(n);else break}for(let[t,{comment:n}]of e.entries())t<o?SH(r,n):bH(i,n);for(let e of[r,i])e.comments&&e.comments.length>1&&e.comments.sort((e,n)=>t.locStart(e)-t.locStart(n));e.length=0}function jH(e,t,n){let r=n.locStart(t)-1;for(let t=1;t<e.length;++t)if(r<n.locStart(e[t]))return t-1;return 0}function MH(e,t){let n=t-1;n=iH(e,n,{backwards:!0}),n=lH(e,n,{backwards:!0}),n=iH(e,n,{backwards:!0});let r=lH(e,n,{backwards:!0});return n!==r}var NH=MH,PH=()=>!0;function FH(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function IH(e,t){let n=e.node,r=[FH(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=` `;dH(a,s(n))&&(e=dH(a,o(n),{backwards:!0})?cV:aV),r.push(e)}else r.push(cV);let c=lH(a,iH(a,s(n)));return c!==!1&&dH(a,c)&&r.push(cV),r}function LH(e,t,n){let r=e.node,i=FH(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||dH(o,s(r),{backwards:!0})?{doc:dV([cV,NH(o,s(r))?cV:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[dV([` `,i]),XB],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function RH(e,t,n){let r=t[Symbol.for(`printedComments`)],i=n?.filter??PH,a=new Set(e.node?.comments?.filter(e=>!r?.has(e)&&e.leading&&i(e)));return a.size===0?``:e.map(({node:n})=>a.has(n)?IH(e,t):``,`comments`).filter(Boolean)}function zH(e,t,n){let r=e.node?.comments,i=new Set(r?.filter(e=>e.trailing)),a=t[Symbol.for(`printedComments`)],o=n?.filter??PH,s=new Set(r?.filter(e=>i.has(e)&&!a?.has(e)&&o(e)));if(s.size===0)return``;let c=[],l;return e.each(({node:n})=>{i.has(n)&&(l=LH(e,t,l),s.has(n)&&c.push(l.doc))},`comments`),c}function BH(e,t,n,r){let i=RH(e,n,r),a=zH(e,n,r);return i||a?zB(t,e=>[i,e,a]):t}function VH(e){let{[Jz]:t,[Symbol.for(`printedComments`)]:n}=e;for(let e of t){if(!e.printed&&!n.has(e))throw Error(`Comment "`+e.value.trim()+`" was not printed. Please report this error!`);delete e.printed}}var HH=()=>Pz,UH=class extends Error{name=`ConfigError`},WH=class extends Error{name=`UndefinedParserError`},GH=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),KH={checkIgnorePragma:{category:`Special`,type:`boolean`,default:!1,description:`Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.`,cliCategory:`Other`},cursorOffset:{category:`Special`,type:`int`,default:-1,range:{start:-1,end:1/0,step:1},description:`Print (to stderr) where a cursor at the given position would move to after formatting.`,cliCategory:`Editor`},endOfLine:{category:`Global`,type:`choice`,default:`lf`,description:`Which end of line characters to apply.`,choices:[{value:`lf`,description:`Line Feed only (\\n), common on Linux and macOS as well as inside git repos`},{value:`crlf`,description:`Carriage Return + Line Feed characters (\\r\\n), common on Windows`},{value:`cr`,description:`Carriage Return character only (\\r), used very rarely`},{value:`auto`,description:`Maintain existing
|
|
1381
|
+
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:`Special`,type:`path`,description:`Specify the input filepath. This will be used to do parser inference.`,cliName:`stdin-filepath`,cliCategory:`Other`,cliDescription:`Path to the file to pretend that stdin comes from.`},insertPragma:{category:`Special`,type:`boolean`,default:!1,description:`Insert @format pragma into file's first docblock comment.`,cliCategory:`Other`},parser:{category:`Global`,type:`choice`,default:void 0,description:`Which parser to use.`,exception:e=>typeof e==`string`||typeof e==`function`,choices:[{value:`flow`,description:`Flow`},{value:`babel`,description:`JavaScript`},{value:`babel-flow`,description:`Flow`},{value:`babel-ts`,description:`TypeScript`},{value:`typescript`,description:`TypeScript`},{value:`acorn`,description:`JavaScript`},{value:`espree`,description:`JavaScript`},{value:`meriyah`,description:`JavaScript`},{value:`css`,description:`CSS`},{value:`less`,description:`Less`},{value:`scss`,description:`SCSS`},{value:`json`,description:`JSON`},{value:`json5`,description:`JSON5`},{value:`jsonc`,description:`JSON with Comments`},{value:`json-stringify`,description:`JSON.stringify`},{value:`graphql`,description:`GraphQL`},{value:`markdown`,description:`Markdown`},{value:`mdx`,description:`MDX`},{value:`vue`,description:`Vue`},{value:`yaml`,description:`YAML`},{value:`glimmer`,description:`Ember / Handlebars`},{value:`html`,description:`HTML`},{value:`angular`,description:`Angular`},{value:`lwc`,description:`Lightning Web Components`},{value:`mjml`,description:`MJML`}]},plugins:{type:`path`,array:!0,default:[{value:[]}],category:`Global`,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e==`string`||typeof e==`object`,cliName:`plugin`,cliCategory:`Config`},printWidth:{category:`Global`,type:`int`,default:80,description:`The line length where Prettier will try wrap.`,range:{start:0,end:1/0,step:1}},rangeEnd:{category:`Special`,type:`int`,default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
|
|
1382
|
+
The range will extend forwards to the end of the selected statement.`,cliCategory:`Editor`},rangeStart:{category:`Special`,type:`int`,default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
|
|
1383
|
+
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:`Editor`},requirePragma:{category:`Special`,type:`boolean`,default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.`,cliCategory:`Other`},tabWidth:{type:`int`,category:`Global`,default:2,description:`Number of spaces per indentation level.`,range:{start:0,end:1/0,step:1}},useTabs:{category:`Global`,type:`boolean`,default:!1,description:`Indent with tabs instead of spaces.`},embeddedLanguageFormatting:{category:`Global`,type:`choice`,default:`auto`,description:`Control how Prettier formats quoted code embedded in the file.`,choices:[{value:`auto`,description:`Format embedded code if Prettier can automatically identify it.`},{value:`off`,description:`Never automatically format embedded code.`}]}};function qH({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(e=>e.languages??[]),r=[];for(let i of YH(Object.assign({},...e.map(({options:e})=>e),KH)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(e=>!e.deprecated)),i.name===`parser`&&(i.choices=[...i.choices,...JH(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(e=>e.defaultOptions?.[i.name]!==void 0).map(e=>[e.name,e.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*JH(e,t,n){let r=new Set(e.map(e=>e.value));for(let e of t)if(e.parsers){for(let t of e.parsers)if(!r.has(t)){r.add(t);let i=n.find(e=>e.parsers&&GH(e.parsers,t)),a=e.name;i?.name&&(a+=` (plugin: ${i.name})`),yield{value:t,description:a}}}}function YH(e){let t=[];for(let[n,r]of Object.entries(e)){let e={name:n,...r};Array.isArray(e.default)&&(e.default=Xz(0,e.default,-1).value),t.push(e)}return t}var XH=Array.prototype.toReversed??function(){return[...this].reverse()},ZH=Oz(`toReversed`,function(){if(Array.isArray(this))return XH});function QH(){let e=globalThis,t=e.process?.platform;if(typeof t==`string`)return t.startsWith(`win`);let n=e.Deno?.build?.os;return typeof n==`string`?n===`windows`:e.navigator?.platform?.startsWith(`Win`)??!1}var $H=QH();function eU(e){if(e=e instanceof URL?e:new URL(e),e.protocol!==`file:`)throw TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function tU(e){return e=eU(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function nU(e){e=eU(e);let t=decodeURIComponent(e.pathname.replace(/\//g,`\\`).replace(/%(?![0-9A-Fa-f]{2})/g,`%25`)).replace(/^\\*([A-Za-z]:)(\\|$)/,`$1\\`);return e.hostname!==``&&(t=`\\\\${e.hostname}${t}`),t}function rU(e){return $H?nU(e):tU(e)}var iU=e=>String(e).split(/[/\\]/).pop(),aU=e=>String(e).startsWith(`file:`);function oU(e,t){if(!t)return;let n=iU(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function sU(e,t){if(t)return e.find(({name:e})=>e.toLowerCase()===t)??e.find(({aliases:e})=>e?.includes(t))??e.find(({extensions:e})=>e?.includes(`.${t}`))}var cU=void 0;function lU(e,t){if(t){if(aU(t))try{t=rU(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function uU(e,t){let n=ZH(0,e.plugins).flatMap(e=>e.languages??[]);return(sU(n,t.language)??oU(n,t.physicalFile)??oU(n,t.file)??lU(n,t.physicalFile)??lU(n,t.file)??cU?.(n,t.physicalFile))?.parsers[0]}var dU=uU,fU={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(typeof e!=`object`||!e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(e=>fU.value(e)).join(`, `)}]`;let t=Object.keys(e);return t.length===0?`{}`:`{ ${t.map(t=>`${fU.key(t)}: ${fU.value(e[t])}`).join(`, `)} }`},pair:({key:e,value:t})=>fU.value({[e]:t})},pU=new Proxy(String,{get:()=>pU}),mU=pU,hU=(e,t,{descriptor:n})=>{let r=[`${mU.yellow(typeof e==`string`?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${mU.blue(typeof t==`string`?n.key(t):n.pair(t))}`),r.join(`; `)+`.`},gU=Symbol.for(`vnopts.VALUE_NOT_EXIST`),_U=Symbol.for(`vnopts.VALUE_UNCHANGED`),vU=` `.repeat(2),yU=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),a=[];return r&&a.push(bU(e,t,r,n.descriptor)),i&&a.push([bU(e,t,i.title,n.descriptor)].concat(i.values.map(e=>xU(e,n.loggerPrintWidth))).join(`
|
|
1384
|
+
`)),SU(a,n.loggerPrintWidth)};function bU(e,t,n,r){return[`Invalid ${mU.red(r.key(e))} value.`,`Expected ${mU.blue(n)},`,`but received ${t===gU?mU.gray(`nothing`):mU.red(r.value(t))}.`].join(` `)}function xU({text:e,list:t},n){let r=[];return e&&r.push(`- ${mU.blue(e)}`),t&&r.push([`- ${mU.blue(t.title)}:`].concat(t.values.map(e=>xU(e,n-vU.length).replace(/^|\n/g,`$&${vU}`))).join(`
|
|
1385
|
+
`)),SU(r,n)}function SU(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,a]=e.map(e=>e.split(`
|
|
1386
|
+
`,1)[0].length);return i>t&&i>a?r:n}var CU=[],wU=[];function TU(e,t,n){if(e===t)return 0;let r=n?.maxDistance,i=e;e.length>t.length&&(e=t,t=i);let a=e.length,o=t.length;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-o);)a--,o--;let s=0;for(;s<a&&e.charCodeAt(s)===t.charCodeAt(s);)s++;if(a-=s,o-=s,r!==void 0&&o-a>r)return r;if(a===0)return r!==void 0&&o>r?r:o;let c,l,u,d,f=0,p=0;for(;f<a;)wU[f]=e.charCodeAt(s+f),CU[f]=++f;for(;p<o;){for(c=t.charCodeAt(s+p),u=p++,l=p,f=0;f<a;f++)d=c===wU[f]?u:u+1,u=CU[f],l=CU[f]=u>l?d>l?l+1:d:d>u?u+1:d;if(r!==void 0){let e=l;for(f=0;f<a;f++)CU[f]<e&&(e=CU[f]);if(e>r)return r}}return CU.length=a,wU.length=a,r!==void 0&&l>r?r:l}function EU(e,t,n){if(!Array.isArray(t)||t.length===0)return;let r=n?.maxDistance,i=e.length;for(let n of t)if(n===e)return n;if(r===0)return;let a,o=1/0,s=/* @__PURE__ */ new Set;for(let n of t){if(s.has(n))continue;s.add(n);let t=Math.abs(n.length-i);if(t>=o||r!==void 0&&t>r)continue;let c=Number.isFinite(o)?r===void 0?o:Math.min(o,r):r,l=c===void 0?TU(e,n):TU(e,n,{maxDistance:c});if(r!==void 0&&l>r)continue;let u=l;if(c!==void 0&&l===c&&c===r&&(u=TU(e,n)),u<o&&(o=u,a=n,o===0))break}if(!(r!==void 0&&o>r))return a}var DU=(e,t,{descriptor:n,logger:r,schemas:i})=>{let a=[`Ignored unknown option ${mU.yellow(n.pair({key:e,value:t}))}.`],o=EU(e,Object.keys(i),{maxDistance:3});o&&a.push(`Did you mean ${mU.blue(n.key(o))}?`),r.warn(a.join(` `))},OU=[`default`,`expected`,`validate`,`deprecated`,`forward`,`redirect`,`overlap`,`preprocess`,`postprocess`];function kU(e,t){let n=new e(t),r=Object.create(n);for(let e of OU)e in t&&(r[e]=jU(t[e],n,AU.prototype[e].length));return r}var AU=class{static create(e){return kU(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return`nothing`}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return _U}};function jU(e,t,n){return typeof e==`function`?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var MU=class extends AU{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},NU=class extends AU{expected(){return`anything`}validate(){return!0}},PU=class extends AU{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:`an array of the following values`,values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let e=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);e!==!0&&n.push(e.value)}return n.length===0||{value:n}}deprecated(e,t){let n=[];for(let r of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);e!==!1&&n.push(...e.map(({value:e})=>({value:[e]})))}return n}forward(e,t){let n=[];for(let r of e){let e=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...e.map(FU))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);`remain`in e&&n.push(e.remain),r.push(...e.redirect.map(FU))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function FU({from:e,to:t}){return{from:[e],to:t}}var IU=class extends AU{expected(){return`true or false`}validate(e){return typeof e==`boolean`}};function LU(e,t){let n=Object.create(null);for(let r of e){let e=r[t];if(n[e])throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n[e]=r}return n}function RU(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let e=r[t];if(n.has(e))throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n.set(e,r)}return n}function zU(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function BU(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function VU(e){return e===Math.floor(e)}function HU(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=[`undefined`,`object`,`boolean`,`number`,`string`];return n===r?n===`string`?e.localeCompare(t):Number(e)-Number(t):i.indexOf(n)-i.indexOf(r)}function UU(e){return(...t)=>{let n=e(...t);return typeof n==`string`?Error(n):n}}function WU(e){return e===void 0?{}:e}function GU(e){if(typeof e==`string`)return{text:e};let{text:t,list:n}=e;return ZU((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(GU)}}:{text:t}}function KU(e,t){return e===!0?!0:e===!1?{value:t}:e}function qU(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:`value`in e?[e]:e.length!==0&&e}function JU(e,t){return typeof e==`string`||`key`in e?{from:t,to:e}:`from`in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function YU(e,t){return e===void 0?[]:Array.isArray(e)?e.map(e=>JU(e,t)):[JU(e,t)]}function XU(e,t){let n=YU(typeof e==`object`&&`redirect`in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e==`object`&&`remain`in e?{remain:e.remain,redirect:n}:{redirect:n}}function ZU(e,t){if(!e)throw Error(t)}var QU=class extends AU{constructor(e){super(e),this._choices=RU(e.choices.map(e=>e&&typeof e==`object`?e:{value:e}),`value`)}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(e=>this._choices.get(e)).filter(({hidden:e})=>!e).map(e=>e.value).sort(HU).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(` or `)).join(`, `),list:{title:`one of the following values`,values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},$U=class extends AU{expected(){return`a number`}validate(e,t){return typeof e==`number`}},eW=class extends $U{expected(){return`an integer`}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&VU(e)}},tW=class extends AU{expected(){return`a string`}validate(e){return typeof e==`string`}},nW=fU,rW=DU,iW=yU,aW=hU,oW=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=nW,unknown:a=rW,invalid:o=iW,deprecated:s=aW,missing:c=()=>!1,required:l=()=>!1,preprocess:u=e=>e,postprocess:d=()=>_U}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:LU(e,`name`),normalizeDefaultResult:WU,normalizeExpectedResult:GU,normalizeDeprecatedResult:qU,normalizeForwardResult:YU,normalizeRedirectResult:XU,normalizeValidateResult:KU},this._unknownHandler=a,this._invalidHandler=UU(o),this._deprecatedHandler=s,this._identifyMissing=(e,t)=>!(e in t)||c(e,t),this._identifyRequired=l,this._preprocess=u,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=zU()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let e=n.shift(),r=this._applyNormalization(e,t);n.push(...r)}};r();for(let e of Object.keys(this._utils.schemas)){let r=this._utils.schemas[e];if(!(e in t)){let t=WU(r.default(this._utils));`value`in t&&n.push({[e]:t.value})}}r();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let n=this._utils.schemas[e],r=t[e],i=n.postprocess(r,this._utils);i!==_U&&(this._applyValidation(i,e,n),t[e]=i)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let i of r){let r=this._utils.schemas[i],a=r.preprocess(e[i],this._utils);this._applyValidation(a,i,r);let o=({from:e,to:t})=>{n.push(typeof t==`string`?{[t]:e}:{[t.key]:t.value})},s=({value:e,redirectTo:t})=>{let n=qU(r.deprecated(e,this._utils),a,!0);if(n!==!1){if(n===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(let{value:e}of n){let n={key:i,value:e};if(!this._hasDeprecationWarned(n)){let r=typeof t==`string`?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(n,r,this._utils))}}}};YU(r.forward(a,this._utils),a).forEach(o);let c=XU(r.redirect(a,this._utils),a);if(c.redirect.forEach(o),`remain`in c){let e=c.remain;t[i]=i in t?r.overlap(t[i],e,this._utils):e,s({value:e})}for(let{from:e,to:t}of c.redirect)s({value:e,redirectTo:t})}for(let r of i){let i=e[r];this._applyUnknownHandler(r,i,t,(e,t)=>{n.push({[e]:t})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,gU,this._utils)}_partitionOptionKeys(e){let[t,n]=BU(Object.keys(e).filter(t=>!this._identifyMissing(t,e)),e=>e in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=KU(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let e of Object.keys(i)){if(this._identifyMissing(e,i))continue;let t=i[e];e in this._utils.schemas?r(e,t):n[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==_U){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let r of n){let n=t.override[r];this._applyValidation(n,r,this._utils.schemas[r]),e[r]=n}for(let n of r){let r=t.override[n];this._applyUnknownHandler(n,r,e,(t,n)=>{let r=this._utils.schemas[t];this._applyValidation(n,t,r),e[t]=n})}}}}},sW;function cW(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:a,descriptor:o}={}){if(r){if(!a)throw Error(`'FlagSchema' option is required.`);if(!o)throw Error(`'descriptor' option is required.`)}else o=fU;let s=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,n)=>{let{_:r,...i}=n.schemas;return DU(e,t,{...n,schemas:i})},c=new oW(lW(t,{isCLI:r,FlagSchema:a}),{logger:n,unknown:s,descriptor:o}),l=n!==!1;l&&sW&&(c._hasDeprecationWarned=sW);let u=c.normalize(e);return l&&(sW=c._hasDeprecationWarned),u}function lW(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(NU.create({name:`_`}));for(let i of e)r.push(uW(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(MU.create({name:i.alias,sourceName:i.name}));return r}function uW(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,a={name:i},o,s={};switch(e.type){case`int`:o=eW,t&&(a.preprocess=Number);break;case`string`:o=tW;break;case`choice`:o=QU,a.choices=e.choices.map(t=>t?.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case`boolean`:o=IU;break;case`flag`:o=r,a.flags=n.flatMap(e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean));break;case`path`:o=tW;break;default:throw Error(`Unexpected type ${e.type}`)}if(a.validate=e.exception?(t,n,r)=>e.exception(t)||n.validate(t,r):(e,t,n)=>e===void 0||t.validate(e,n),e.redirect&&(s.redirect=t=>t?{to:typeof e.redirect==`string`?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,n,r)=>n.preprocess(e(Array.isArray(t)?Xz(0,t,-1):t),r)}return e.array?PU.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...s,valueSchema:o.create(a)}):o.create({...a,...s})}var dW=cW,fW=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},pW=Oz(`findLast`,function(){if(Array.isArray(this))return fW}),mW=Symbol.for(`PRETTIER_IS_FRONT_MATTER`),hW=[];function gW(e){return!!e?.[mW]}var _W=gW,vW=/* @__PURE__ */ new Set([`yaml`,`toml`]),yW=({node:e})=>_W(e)&&vW.has(e.language);async function bW(e,t,n,r){let{node:i}=n,{language:a}=i;if(!vW.has(a))return;let o=i.value.trim(),s;if(o){let t=a===`yaml`?a:dU(r,{language:a});if(!t)return;s=o?await e(o,{parser:t}):``}else s=o;return qB([i.startDelimiter,i.explicitLanguage??``,cV,s,s?cV:``,i.endDelimiter])}function xW(e,t){return yW({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var SW=xW;function CW({node:e}){return e.raw}var wW=CW,TW=/* @__PURE__ */ new Set([`tokens`,`comments`,`parent`,`enclosingNode`,`precedingNode`,`followingNode`]),EW=e=>Object.keys(e).filter(e=>!TW.has(e));function DW(e,t){let n=e?t=>e(t,TW):EW;return t?new Proxy(n,{apply:(e,t,n)=>_W(n[0])?hW:Reflect.apply(e,t,n)}):n}var OW=DW;function kW(e,t){if(!t)throw Error(`parserName is required.`);let n=pW(0,e,e=>e.parsers&&GH(e.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new UH(r)}function AW(e,t){if(!t)throw Error(`astFormat is required.`);let n=pW(0,e,e=>e.printers&&GH(e.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new UH(r)}function jW({plugins:e,parser:t}){return MW(kW(e,t),t)}function MW(e,t){let n=e.parsers[t];return typeof n==`function`?n():n}async function NW(e,t){let n=e.printers[t];return IW(typeof n==`function`?await n():n)}function PW(e){let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:a,...o}=e;t=zW(t);let s=t.experimental_frontMatterSupport;n=OW(n,s.massageAstNode||s.embed||s.print);let c=i;i&&s.massageAstNode&&(c=new Proxy(i,{apply(e,t,n){return SW(...n),Reflect.apply(e,t,n)}}));let l=r;if(r){let e;l=new Proxy(r,{get(t,i,a){return i===`getVisitorKeys`?(e??=r.getVisitorKeys?OW(r.getVisitorKeys,s.massageAstNode||s.embed):n,e):Reflect.get(t,i,a)},apply:(e,t,n)=>s.embed&&yW(...n)?bW:Reflect.apply(e,t,n)})}let u=a;return s.print&&(u=new Proxy(a,{apply(e,t,n){let[r]=n;return _W(r.node)?wW(r):Reflect.apply(e,t,n)}})),{features:t,getVisitorKeys:n,embed:l,massageAstNode:c,print:u,...o}}var FW=/* @__PURE__ */ new WeakMap;function IW(e){return mB(FW,e,PW)}var LW=Object.fromEntries([`clean`,`embed`,`print`].map(e=>[e,!1]));function RW(e){return{...LW,...e}}function zW(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:RW(e?.experimental_frontMatterSupport)}}var BW={astFormat:`estree`,printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function VW(e,t={}){let n={...e};if(!n.parser){if(!n.filepath)throw new WH(`No parser and no file path given, couldn't infer a parser.`);if(n.parser=dU(n,{physicalFile:n.filepath}),!n.parser)throw new WH(`No parser could be inferred for file "${n.filepath}".`)}let r=qH({plugins:e.plugins,showDeprecated:!0}).options,i={...BW,...Object.fromEntries(r.filter(e=>e.default!==void 0).map(e=>[e.name,e.default]))},a=kW(n.plugins,n.parser),o=await MW(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let s=a.printers?.[o.astFormat]?a:AW(n.plugins,o.astFormat),c=await NW(s,o.astFormat);n.printer=c,n.getVisitorKeys=c.getVisitorKeys;let l=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,e])=>e!==void 0)):{},u={...i,...l};for(let[e,t]of Object.entries(u))n[e]??(n[e]=t);return n.parser===`json`&&(n.trailingComma=`none`),dW(n,r,{passThrough:Object.keys(BW),...t})}var HW=VW,UW=/\r\n|[\n\r\u2028\u2029]/;function WW(e,t,n,r){let i={column:null,line:-1,...e.start},a={...i,...e.end},{linesAbove:o=2,linesBelow:s=3}=n||{},c=i.line-r,l=i.column,u=a.line-r,d=a.column,f=Math.max(c-(o+1),0),p=Math.min(t.length,u+s);c===-1&&(f=0),u===-1&&(p=t.length);let m=u-c,h={};if(m)for(let e=0;e<=m;e++){let n=e+c;h[n]=l==null?!0:e===0?[l,t[n-1].length-l]:e===m?[0,d]:[0,t[n-1].length]}else if(l===d)h[c]=l==null||[l,0];else{let e=l??0;h[c]=[e,(d??e)-e]}return{start:f,end:p,markerLines:h}}function GW(e,t,n={},r){let{defs:i,highlight:a}=r||{defs:{gutter:String,marker:String,message:String,reset:String},highlight:String},o=(n.startLine||1)-1,{start:s,end:c,markerLines:l}=WW(t,e.split(UW),n,o),u=t.start&&typeof t.start.column==`number`,d=String(c+o).length,f=a(e).split(UW,c).slice(s,c).map((e,t)=>{let r=s+1+t,a=` ${` ${r+o}`.slice(-d)} |`,c=l[r],u=!l[r+1];if(c){let t=``;if(Array.isArray(c)){let r=e.slice(0,c[0]).replace(/[^\t]/g,` `),o=c[1]||1;t=[`
|
|
1387
|
+
`,i.gutter(a.replace(/\d/g,` `)),` `,r,i.marker(`^`).repeat(o)].join(``),u&&n.message&&(t+=` `+i.message(n.message))}return[i.marker(`>`),i.gutter(a),e.length>0?` ${e}`:``,t].join(``)}return` ${i.gutter(a)}${e.length>0?` ${e}`:``}`}).join(`
|
|
1388
|
+
`);return n.message&&!u&&(f=`${` `.repeat(d+1)}${n.message}
|
|
1389
|
+
${f}`),i.reset(f)}function KW(e,t,n={}){return GW(e,t,n)}async function qW(e,t){let n=await jW(t),r=n.preprocess?await n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(t){JW(t,e)}return{text:r,ast:i}}function JW(e,t){let{loc:n}=e;if(n){let{start:r,end:i}=n;r&&={line:r.line,column:r.column-1},i&&={line:i.line,column:i.column-1};let a=KW(t,{start:r,end:i},{highlightCode:!0});e.message+=`
|
|
1390
|
+
`+a,e.codeFrame=a}throw e}var YW=qW;async function XW(e,t,n,r,i){if(n.embeddedLanguageFormatting!==`auto`)return;let{printer:a}=n,{embed:o}=a;if(!o)return;if(o.length>2)throw Error(`printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed`);let{hasPrettierIgnore:s}=a,{getVisitorKeys:c}=o,l=[];f();let u=e.stack;for(let{print:r,node:a,pathStack:o}of l)try{e.stack=o;let s=await r(d,t,e,n);s&&i.set(a,s)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}e.stack=u;function d(e,t){return ZW(e,t,n,r)}function f(){let{node:t}=e;if(typeof t!=`object`||!t||s?.(e))return;for(let n of c(t))Array.isArray(t[n])?e.each(f,n):e.call(f,n);let r=o(e,n);if(r){if(typeof r==`function`){l.push({print:r,node:t,pathStack:[...e.stack]});return}i.set(t,r)}}}async function ZW(e,t,n,r){let i=await HW({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await YW(e,i);return NB(await r(a,i))}function QW(e,t,n,r){let{originalText:i,[Jz]:a,locStart:o,locEnd:s,[Symbol.for(`printedComments`)]:c}=t,{node:l}=e,u=o(l),d=s(l);for(let e of a)o(e)>=u&&s(e)<=d&&c.add(e);let{printPrettierIgnored:f}=t.printer;return f?f(e,t,n,r):i.slice(u,d)}var $W=QW;async function eG(e,t){({ast:e}=await nG(e,t));let n=/* @__PURE__ */ new Map,r=new ZV(e),i=HH(t),a=/* @__PURE__ */ new Map;await XW(r,s,t,eG,a);let o=await tG(r,t,s,void 0,a);if(VH(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[ZB,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,ZB]}return o;function s(e,t){return e===void 0||e===r?c(t):Array.isArray(e)?r.call(()=>c(t),...e):r.call(()=>c(t),e)}function c(e){i(r);let o=r.node;if(o==null)return``;let c=tH(o)&&e===void 0;if(c&&n.has(o))return n.get(o);let l=tG(r,t,s,e,a);return c&&n.set(o,l),l}}function tG(e,t,n,r,i){let{node:a}=e,{printer:o}=t,s;switch(s=o.hasPrettierIgnore?.(e)?$W(e,t,n,r):i.has(a)?i.get(a):o.print(e,t,n,r),a){case t.cursorNode:s=zB(s,e=>[ZB,e,ZB]);break;case t.nodeBeforeCursor:s=zB(s,e=>[e,ZB]);break;case t.nodeAfterCursor:s=zB(s,e=>[ZB,e])}return o.printComment&&$V(a.comments)&&!o.willPrintOwnComments?.(e,t)&&(s=BH(e,s,t)),s}async function nG(e,t){let n=e.comments??[];t[Jz]=n,t[Symbol.for(`printedComments`)]=/* @__PURE__ */ new Set,EH(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function rG(e,t){let{cursorOffset:n,locStart:r,locEnd:i,getVisitorKeys:a}=t,o=e=>r(e)<=n&&i(e)>=n,s=e,c=[e];for(let t of pH(e,{getVisitorKeys:a,filter:o}))c.push(t),s=t;if(mH(s,{getVisitorKeys:a}))return{cursorNode:s};let l,u,d=-1,f=1/0;for(;c.length>0&&(l===void 0||u===void 0);){s=c.pop();let e=l!==void 0,t=u!==void 0;for(let o of fH(s,{getVisitorKeys:a})){if(!e){let e=i(o);e<=n&&e>d&&(l=o,d=e)}if(!t){let e=r(o);e>=n&&e<f&&(u=o,f=e)}}}return{nodeBeforeCursor:l,nodeAfterCursor:u}}var iG=rG;function aG(e,t){let{printer:n}=t,r=n.massageAstNode;if(!r)return e;let{getVisitorKeys:i}=n,{ignoredProperties:a}=r;return o(e);function o(e,t){if(!tH(e))return e;if(Array.isArray(e))return e.map(e=>o(e,t)).filter(Boolean);let n={},s=new Set(i(e));for(let t in e)!GH(e,t)||a?.has(t)||(n[t]=s.has(t)?o(e[t],e):e[t]);let c=r(e,n,t);if(c!==null)return c??n}}var oG=aG,sG=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return t}return-1},cG=Oz(`findLastIndex`,function(){if(Array.isArray(this))return sG});function lG(e,t){return t=new Set(t),e.find(e=>mG.has(e.type)&&t.has(e))}function uG(e){let t=cG(0,e,e=>e.type!==`Program`&&e.type!==`File`);return t===-1?e:e.slice(0,t+1)}function dG(e,t,{locStart:n,locEnd:r}){let[i,...a]=e,[o,...s]=t;if(i===o)return[i,o];let c=n(i);for(let e of uG(s))if(n(e)>=c)o=e;else break;let l=r(o);for(let e of uG(a)){if(r(e)<=l)i=e;else break;if(i===o)break}return[i,o]}function fG(e,t,n,r,i=[],a,o){let{locStart:s,locEnd:c}=o,l=s(e),u=c(e);if(t>u||t<l||a===`rangeEnd`&&t===l||a===`rangeStart`&&t===u)return;let d=[e,...i],f=_H(e,d,{cache:CH,locStart:s,locEnd:c,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes});for(let e of f){let i=fG(e,t,n,r,d,a,o);if(i)return i}if(r(e,i[0]))return d}function pG(e,t){return t!==`DeclareExportDeclaration`&&e!==`TypeParameterDeclaration`&&(e===`Directive`||e===`TypeAlias`||e===`TSExportAssignment`||e.startsWith(`Declare`)||e.startsWith(`TSDeclare`)||e.endsWith(`Statement`)||e.endsWith(`Declaration`))}var mG=/* @__PURE__ */ new Set([`JsonRoot`,`ObjectExpression`,`ArrayExpression`,`StringLiteral`,`NumericLiteral`,`BooleanLiteral`,`NullLiteral`,`UnaryExpression`,`TemplateLiteral`]),hG=/* @__PURE__ */ new Set([`OperationDefinition`,`FragmentDefinition`,`VariableDefinition`,`TypeExtensionDefinition`,`ObjectTypeDefinition`,`FieldDefinition`,`DirectiveDefinition`,`EnumTypeDefinition`,`EnumValueDefinition`,`InputValueDefinition`,`InputObjectTypeDefinition`,`SchemaDefinition`,`OperationTypeDefinition`,`InterfaceTypeDefinition`,`UnionTypeDefinition`,`ScalarTypeDefinition`]);function gG(e,t,n){if(!t)return!1;switch(e.parser){case`flow`:case`hermes`:case`babel`:case`babel-flow`:case`babel-ts`:case`typescript`:case`acorn`:case`espree`:case`meriyah`:case`oxc`:case`oxc-ts`:case`yuku`:case`yuku-ts`:case`__babel_estree`:return pG(t.type,n?.type);case`json`:case`json5`:case`jsonc`:case`json-stringify`:return mG.has(t.type);case`graphql`:return hG.has(t.kind);case`vue`:return t.tag!==`root`}return!1}function _G(e,t,n){let{rangeStart:r,rangeEnd:i}=t,a=e.slice(r,i).search(/\S/),o=a===-1;if(!o)for(r+=a;i>r&&!/\S/.test(e[i-1]);--i);let s=t.printer.features?.experimental_locForRangeFormat??t,c=fG(n,r,t,(e,n)=>gG(t,e,n),[],`rangeStart`,s);if(!c)return;let l=o?c:fG(n,i,t,e=>gG(t,e),[],`rangeEnd`,s);if(!l)return;let u,d;if(n.type===`JsonRoot`){let e=lG(c,l);u=e,d=e}else[u,d]=dG(c,l,t);let{locStart:f,locEnd:p}=s;return[Math.min(f(u),f(d)),Math.max(p(u),p(d))]}var vG=``,yG=Symbol(`cursor`);async function bG(e,t,n=0){if(!e||e.trim().length===0)return{formatted:``,cursorOffset:-1,comments:[]};let{ast:r,text:i}=await YW(e,t);t.cursorOffset>=0&&(t={...t,...iG(r,t)});let a=await eG(r,t,n);n>0&&(a=YB([cV,a],n,t.tabWidth));let o=JV(a,t);if(n>0){let e=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(e),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>e.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=e+Uz(t.endOfLine)}let s=t[Jz];if(t.cursorOffset>=0){let e,n,r,a;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText){if(r=o.cursorNodeStart,a=o.cursorNodeText,t.cursorNode)e=t.locStart(t.cursorNode),n=i.slice(e,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw Error(`Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor`);e=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let r=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):i.length;n=i.slice(e,r)}}else e=0,n=i,r=0,a=o.formatted;let c=t.cursorOffset-e;if(n===a)return{formatted:o.formatted,cursorOffset:r+c,comments:s};let l=n.split(``);l.splice(c,0,yG);let u=Nz(l,a.split(``)),d=r;for(let e of u)if(e.removed){if(e.value.includes(yG))break}else d+=e.count;return{formatted:o.formatted,cursorOffset:d,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function xG(e,t){let{ast:n,text:r}=await YW(e,t),[i,a]=_G(r,t,n)??[0,0],o=r.slice(i,a),s=Math.min(i,r.lastIndexOf(`
|
|
1391
|
+
`,i)+1),c=r.slice(s,i).match(/^\s*/)[0],l=XV(c,t.tabWidth),u=await bG(o,{...t,rangeStart:0,rangeEnd:1/0,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=a?t.cursorOffset-i:-1,endOfLine:`lf`},l),d=u.formatted.trimEnd(),{cursorOffset:f}=t;f>a?f+=d.length-o.length:u.cursorOffset>=0&&(f=u.cursorOffset+i);let p=r.slice(0,i)+d+r.slice(a);if(t.endOfLine!==`lf`){let e=Uz(t.endOfLine);f>=0&&e===`\r
|
|
1392
|
+
`&&(f+=Gz(p.slice(0,f),`
|
|
1393
|
+
`)),p=Az(0,p,`
|
|
1394
|
+
`,e)}return{formatted:p,cursorOffset:f,comments:u.comments}}function SG(e,t,n){return typeof t!=`number`||Number.isNaN(t)||t<0||t>e.length?n:t}function CG(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=SG(e,n,-1),r=SG(e,r,0),i=SG(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function wG(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a}=CG(e,t),o=e.charAt(0)===vG;if(o&&(e=e.slice(1),n--,r--,i--),a===`auto`&&(a=Hz(e)),e.includes(`\r`)){let t=t=>Gz(e.slice(0,Math.max(t,0)),`\r
|
|
1395
|
+
`);n-=t(n),r-=t(r),i-=t(i),e=qz(e)}return{hasBOM:o,text:e,options:CG(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a})}}async function TG(e,t){let n=await jW(t);return!n.hasPragma||n.hasPragma(e)}async function EG(e,t){return(await jW(t)).hasIgnorePragma?.(e)}async function DG(e,t){let{hasBOM:n,text:r,options:i}=wG(e,await HW(t));if(i.rangeStart>=i.rangeEnd&&r!==``||i.requirePragma&&!await TG(r,i)||i.checkIgnorePragma&&await EG(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd<r.length?a=await xG(r,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await TG(r,i)&&(r=i.printer.insertPragma(r)),a=await bG(r,i)),n&&(a.formatted=vG+a.formatted,a.cursorOffset>=0&&a.cursorOffset++),a}async function OG(e,t,n){let{text:r,options:i}=wG(e,await HW(t)),a=await YW(r,i);return n&&(n.preprocessForPrint&&(a.ast=await nG(a.ast,i)),n.massage&&(a.ast=oG(a.ast,i))),a}async function kG(e,t){return t=await HW(t),JV(await eG(e,t),t)}async function AG(e,t){let{formatted:n}=await DG(hV(e),{...t,parser:`__js_expression`});return n}async function jG(e,t){t=await HW(t);let{ast:n}=await YW(e,t);return t.cursorOffset>=0&&(t={...t,...iG(n,t)}),eG(n,t)}async function MG(e,t){return JV(e,await HW(t))}var NG={};Dz(NG,{builders:()=>PG,printer:()=>FG,utils:()=>IG});var PG={join:rV,line:aV,softline:oV,hardline:cV,literalline:uV,group:$B,conditionalGroup:eV,fill:QB,lineSuffix:dV,lineSuffixBoundary:fV,cursor:ZB,breakParent:XB,ifBreak:tV,trim:pV,indent:WB,indentIfBreak:nV,align:GB,addAlignmentToDoc:YB,markAsRoot:qB,dedentToRoot:KB,dedent:JB,hardlineWithoutBreakParent:sV,literallineWithoutBreakParent:lV,label:iV,concat:e=>e},FG={printDocToString:JV},IG={willBreak:EB,traverseDoc:SB,findInDoc:wB,mapDoc:CB,removeLines:AB,stripTrailingHardline:NB,replaceEndOfLine:IB,canBreak:RB},LG=`3.9.9`,RG={};Dz(RG,{addDanglingComment:()=>xH,addLeadingComment:()=>bH,addTrailingComment:()=>SH,getAlignmentSize:()=>XV,getIndentSize:()=>JG,getMaxContinuousCount:()=>ZG,getNextNonSpaceNonCommentCharacter:()=>$G,getNextNonSpaceNonCommentCharacterIndex:()=>uK,getPreferredQuote:()=>iK,getStringWidth:()=>PV,hasNewline:()=>dH,hasNewlineInRange:()=>oK,hasSpaces:()=>cK,isNextLineEmpty:()=>hK,isNextLineEmptyAfterIndex:()=>KG,isPreviousLineEmpty:()=>fK,makeString:()=>mK,skip:()=>nH,skipEverythingButNewLine:()=>oH,skipInlineComment:()=>BG,skipNewline:()=>lH,skipSpaces:()=>iH,skipToLineEnd:()=>aH,skipTrailingComment:()=>HG,skipWhitespace:()=>rH});function zG(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var BG=zG;function VG(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?oH(e,t):t}var HG=VG;function UG(e,t){let n=null,r=t;for(;r!==n;)n=r,r=iH(e,r),r=BG(e,r),r=HG(e,r),r=lH(e,r);return r}var WG=UG;function GG(e,t){let n=null,r=t;for(;r!==n;)n=r,r=aH(e,r),r=BG(e,r),r=iH(e,r);return r=HG(e,r),r=lH(e,r),r!==!1&&dH(e,r)}var KG=GG;function qG(e,t){let n=e.lastIndexOf(`
|
|
1396
|
+
`);return n===-1?0:XV(e.slice(n+1).match(/^[\t ]*/)[0],t)}var JG=qG;function YG(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function XG(e,t){let n=e.matchAll(RegExp(`(?:${YG(t)})+`,`g`));return n.reduce||(n=[...n]),n.reduce((e,[t])=>Math.max(e,t.length),0)/t.length}var ZG=XG;function QG(e,t){let n=WG(e,t);return n===!1?``:e.charAt(n)}var $G=QG,eK=Object.freeze({character:`'`,codePoint:39}),tK=Object.freeze({character:`"`,codePoint:34}),nK=Object.freeze({preferred:eK,alternate:tK}),rK=Object.freeze({preferred:tK,alternate:eK});function iK(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?nK:rK,{length:i}=e,a=0,o=0;for(let t=0;t<i;t++){let i=e.charCodeAt(t);i===n.codePoint?a++:i===r.codePoint&&o++}return(a>o?r:n).character}function aK(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
|
|
1397
|
+
`)return!0;return!1}var oK=aK;function sK(e,t,n={}){return iH(e,n.backwards?t-1:t,n)!==t}var cK=sK;function lK(e,t,n){return WG(e,n(t))}function uK(e,t){return arguments.length===2||typeof t==`number`?WG(e,t):lK(...arguments)}function dK(e,t,n){return NH(e,n(t))}function fK(e,t){return arguments.length===2||typeof t==`number`?NH(e,t):dK(...arguments)}function pK(e,t,n){return KG(e,n(t))}function mK(e,t,n){let r=t===`"`?`'`:`"`;return t+Az(0,e,/\\(.)|(["'])/gs,(e,i,a)=>i===r?i:a===t?`\\`+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:`\\`+i))+t}function hK(e,t){return arguments.length===2||typeof t==`number`?KG(e,t):pK(...arguments)}function gK(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},await e(...n)}}var _K=gK(DG);async function vK(e,t){let{formatted:n}=await _K(e,{...t,cursorOffset:-1});return n}async function yK(e,t){return await vK(e,t)===e}var bK=gK(qH,0),xK={parse:gK(OG),formatAST:gK(kG),formatDoc:gK(AG),printToDoc:gK(jG),printDocToString:gK(MG)};Dt();var SK=class{constructor(){this.formatterEnabled=!0}configure(e){e&&(this.formatterEnabled=e.format)}async format(e,t={}){if(!this.formatterEnabled)return[];try{let n=e.getText(),r=await vK(n,{parser:`yaml`,plugins:[Cg,Uw],tabWidth:t.tabWidth||t.tabSize,singleQuote:t.singleQuote,bracketSpacing:t.bracketSpacing,proseWrap:t.proseWrap===`always`?`always`:t.proseWrap===`never`?`never`:`preserve`,printWidth:t.printWidth,trailingComma:t.trailingComma===!1?`none`:`all`});return r===n?[]:[ge.replace(z.create(R.create(0,0),e.positionAt(n.length)),r)]}catch{return[]}}};Dt();var CK=class{constructor(e){this.telemetry=e}async findLinks(e){try{let t=Ph.getYamlDocument(e),n=[];for(let r of t.documents)n.push(wK(e,r));let r=await Promise.all(n);return[].concat(...r)}catch(e){this.telemetry?.sendError(`yaml.documentLink.error`,e)}}};function wK(e,t){let n=[];return t.visit(r=>{if(r.type===`property`&&r.keyNode.value===`$ref`&&r.valueNode?.type===`string`){let i=r.valueNode.value,a=EK(t,i);if(a){let t=e.positionAt(a.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:TK(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function TK(e,t){return z.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function EK(e,t){let n=OK(t);return n?DK(n,e.root):null}function DK(e,t){if(!t)return null;if(e.length===0)return t;let n=e.shift();if(t&&t.type===`object`){let r=t.properties.find(e=>e.keyNode.value===n);return r?DK(e,r.valueNode):null}if(t&&t.type===`array`&&n.match(/^(0|[1-9][0-9]*)$/)){let r=Number.parseInt(n),i=t.items[r];return i?DK(e,i):null}return null}function OK(e){return e===`#`?[]:e[0]!==`#`||e[1]!==`/`?null:e.substring(2).split(/\//).map(kK)}function kK(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}Dt();function AK(e,t){if(!e)return;let n=[],r=Ph.getYamlDocument(e);for(let t of r.documents)r.documents.length>1&&n.push(jK(e,t.root)),t.visit(t=>{if(t.type===`object`&&t.parent?.type===`array`&&n.push(jK(e,t)),t.type===`property`&&t.valueNode)switch(t.valueNode.type){case`array`:case`object`:n.push(jK(e,t));break;case`string`:{let r=e.positionAt(t.offset),i=e.positionAt(t.valueNode.offset+t.valueNode.length);r.line!==i.line&&n.push(jK(e,t));break}default:return!0}return!0});let i=t&&t.rangeLimit;return typeof i!=`number`||n.length<=i?n:(t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri),n.slice(0,t.rangeLimit))}function jK(e,t){let n=e.positionAt(t.offset),r=e.positionAt(t.offset+t.length),i=e.getText(z.create(n,r)),a=i.length-i.trimRight().length;return a>0&&(r=e.positionAt(t.offset+t.length-a)),ue.create(n.line,r.line,n.character,r.character)}var MK=class{constructor(e,t){this.indentation=e,this.maxLineLength=t}writeFoldedBlockScalar(e){if(e.type!==`QUOTE_DOUBLE`&&e.type!==`QUOTE_SINGLE`)return null;let t=e.value,n=e.srcToken.indent,r=this.indentation;for(let e=0;e<n/this.indentation.length;e++)r+=this.indentation;let i=[],a=t.split(`
|
|
1398
|
+
`);for(let e of a){let t=e;slicing:for(;t.length>this.maxLineLength;){let e=this.maxLineLength;for(;!/ /.test(t.charAt(e));)if(e++,e>=t.length)break slicing;for(;/ /.test(t.charAt(e));)if(e++,e>=t.length)break slicing;let n=t.substring(0,e-1);i.push(n),t=t.substring(e)}i.push(t),i.push(`
|
|
1399
|
+
`)}i.pop();for(let e=1;e<i.length;){if(/^[ \t]+$/.test(i[e])){if(i[e-1]===`
|
|
1400
|
+
`||i[e-1]===``){i.splice(e-1,1);continue}return null}e++}let o=`>`;i[i.length-1]!==`
|
|
1401
|
+
`&&i[i.length-1]!==``?o+=`-`:(i[i.length-2]===`
|
|
1402
|
+
`||i[i.length-2]===``)&&i[i.length-3]!==`
|
|
1403
|
+
`&&i[i.length-3]!==``?i.splice(i.length-2,2):o+=`+`,/ /.test(t.charAt(0))&&(o+=`${r.length}`);let s=i.flatMap(t=>t===`
|
|
1404
|
+
`||t===``?[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
|
|
1405
|
+
`}]:[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
|
|
1406
|
+
`},{type:`space`,indent:0,offset:e.srcToken.offset,source:r},{type:`scalar`,indent:0,offset:e.srcToken.offset,source:t}]);s.unshift({type:`block-scalar-header`,source:o,offset:e.srcToken.offset,indent:0});let c={type:`block-scalar`,offset:e.srcToken.offset,indent:0,source:``,props:s};return Vp(c)}writeLiteralBlockScalar(e){if(e.type!==`QUOTE_DOUBLE`&&e.type!==`QUOTE_SINGLE`)return null;let t=e.value;if(t.indexOf(`
|
|
1407
|
+
`)<0)return null;let n=e.srcToken.indent,r=this.indentation;for(let e=0;e<n/this.indentation.length;e++)r+=this.indentation;let i=t.split(`
|
|
1408
|
+
`),a=`|`;i[i.length-1]!==`
|
|
1409
|
+
`&&i[i.length-1]!==``?a+=`-`:i[i.length-2]!==`
|
|
1410
|
+
`&&i[i.length-2]!==``?i.splice(i.length-1,1):a+=`+`,/ /.test(t.charAt(0))&&(a+=`${r.length}`);let o=i.flatMap(t=>t===``?[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
|
|
1411
|
+
`}]:[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
|
|
1412
|
+
`},{type:`space`,indent:0,offset:e.srcToken.offset,source:r},{type:`scalar`,indent:0,offset:e.srcToken.offset,source:t}]);o.unshift({type:`block-scalar-header`,source:a,offset:e.srcToken.offset,indent:0});let s={type:`block-scalar`,offset:e.srcToken.offset,indent:0,source:``,props:o};return Vp(s)}},NK=class{constructor(e){this.indentation=e}write(e){if(e.internalNode.srcToken.type!==`flow-collection`)return null;let t=e.internalNode.srcToken,n=t.start.type===`flow-map-start`?`block-map`:`block-seq`,r=e.parent.type,i={type:n,offset:t.offset,indent:t.indent,items:[]};for(let e of t.items)qp(e,({key:e,sep:t,value:a})=>{if(n===`block-map`){let n=[{type:`space`,indent:0,offset:e.offset,source:this.indentation}];r===`property`&&n.unshift({type:`newline`,indent:0,offset:e.offset,source:`
|
|
1413
|
+
`}),i.items.push({start:n,key:e,sep:t,value:a})}else n===`block-seq`&&i.items.push({start:[{type:`newline`,indent:0,offset:a.offset,source:`
|
|
1414
|
+
`},{type:`space`,indent:0,offset:a.offset,source:this.indentation},{type:`seq-item-ind`,indent:0,offset:a.offset,source:`-`},{type:`space`,indent:0,offset:a.offset,source:` `}],value:a});if(a.type===`flow-collection`)return Wu.SKIP});return Vp(i)}};Dt();var PK=class{constructor(e){this.clientCapabilities=e,this.indentation=` `,this.lineWidth=80}configure(e,t){this.indentation=e.indentation,this.lineWidth=t}getCodeAction(e,t){if(!t.context.diagnostics)return;let n=[];return n.push(...this.getConvertToBooleanActions(t.context.diagnostics,e)),n.push(...this.getJumpToSchemaActions(t.context.diagnostics)),n.push(...this.getTabToSpaceConverting(t.context.diagnostics,e)),n.push(...this.getUnusedAnchorsDelete(t.context.diagnostics,e)),n.push(...this.getConvertToBlockStyleActions(t.context.diagnostics,e)),n.push(...this.getConvertStringToBlockStyleActions(t.range,e)),n.push(...this.getKeyOrderActions(t.context.diagnostics,e)),n.push(...this.getQuickFixForPropertyOrValueMismatch(t.context.diagnostics,e)),n}getJumpToSchemaActions(e){if(!(this.clientCapabilities?.window?.showDocument?.support??!1))return[];let t=/* @__PURE__ */ new Map;for(let n of e){let e=n.data?.schemaUri||[];for(let r of e)r&&(t.has(r)||t.set(r,[]),t.get(r).push(n))}let n=[];for(let e of t.keys()){let r=nt.create(g(`Jump to schema location ({0})`,Nr.basename(e)),he.create(`JumpToSchema`,xi.JUMP_TO_SCHEMA,e));r.diagnostics=t.get(e),n.push(r)}return n}getTabToSpaceConverting(e,t){let n=[],r=new zh(t),i=[];for(let a of e)if(a.message===`Tabs are not allowed as indentation`){if(i.includes(a.range.start.line))continue;let e=r.getLineContent(a.range.start.line),o=0,s=``;for(let t=a.range.start.character;t<=a.range.end.character&&e.charAt(t)===` `;t++)o++,s+=this.indentation;i.push(a.range.start.line);let c=a.range;o!==a.range.end.character-a.range.start.character&&(c=z.create(a.range.start,R.create(a.range.end.line,a.range.start.character+o))),n.push(nt.create(g(`Convert Tab to Spaces`),IK(t.uri,[ge.replace(c,s)]),$e.QuickFix))}if(n.length!==0){let e=[];for(let t=0;t<=r.getLineCount();t++){let n=r.getLineContent(t),i=0,a=``;for(let r=0;r<n.length;r++){let o=n.charAt(r);if(o!==` `&&o!==` `){i!==0&&(e.push(ge.replace(z.create(t,r-i,t,r),a)),i=0,a=``);break}if(o===` `&&i!==0){e.push(ge.replace(z.create(t,r-i,t,r),a)),i=0,a=``;continue}o===` `&&(a+=this.indentation,i++)}i!==0&&e.push(ge.replace(z.create(t,0,t,r.getLineLength(t)),a))}e.length>0&&n.push(nt.create(g(`Convert all Tabs to Spaces`),IK(t.uri,e),$e.QuickFix))}return n}getUnusedAnchorsDelete(e,t){let n=[],r=new zh(t);for(let i of e)if(i.message.startsWith(`Unused anchor`)&&i.source===`YAML`){let e=z.create(i.range.start,i.range.end),a=r.getText(e),o=Di(r.getLineContent(e.end.line),e.end.character);e.end.character=o;let s=nt.create(g(`Delete unused anchor: {0}`,a),IK(t.uri,[ge.del(e)]),$e.QuickFix);s.diagnostics=[i],n.push(s)}return n}getConvertToBooleanActions(e,t){let n=[];for(let r of e)if(r.message===`Incorrect type. Expected "boolean".`){let e=t.getText(r.range).toLocaleLowerCase();if(e===`"true"`||e===`"false"`||e===`'true'`||e===`'false'`){let i=e.includes(`true`)?`true`:`false`;n.push(nt.create(g(`Convert to boolean`),IK(t.uri,[ge.replace(r.range,i)]),$e.QuickFix))}}return n}getConvertToBlockStyleActions(e,t){let n=[];for(let r of e)if(r.code===`flowMap`||r.code===`flowSeq`){let e=FK(t,r);if(Fu(e.internalNode)||Lu(e.internalNode)){let i=Fu(e.internalNode)?`map`:`sequence`,a=new NK(this.indentation);n.push(nt.create(g(`Convert to block style {0}`,i),IK(t.uri,[ge.replace(r.range,a.write(e))]),$e.QuickFix))}}return n}getConvertStringToBlockStyleActions(e,t){let n=Ph.getYamlDocument(t),r=e?t.offsetAt(e.start):0,i=e?t.offsetAt(e.end):1/0,a=[];for(let e of n.documents){let n=[];Wu(e.internalDocument,(e,t)=>{H(t)&&(r<=t.range[0]&&t.range[2]<=i||t.range[0]<=r&&i<=t.range[2])&&(t.type===`QUOTE_DOUBLE`||t.type===`QUOTE_SINGLE`)&&typeof t.value==`string`&&(t.value.indexOf(`
|
|
1415
|
+
`)>=0||t.value.length>this.lineWidth)&&n.push(t)});for(let e of n){let n=z.create(t.positionAt(e.range[0]),t.positionAt(e.range[1])),r=new MK(this.indentation,this.lineWidth),i=r.writeFoldedBlockScalar(e);i!==null&&a.push(nt.create(g(`Convert string to folded block string`),IK(t.uri,[ge.replace(n,i)]),$e.Refactor));let o=r.writeLiteralBlockScalar(e);o!==null&&a.push(nt.create(g(`Convert string to literal block string`),IK(t.uri,[ge.replace(n,o)]),$e.Refactor))}}return a}getKeyOrderActions(e,t){let n=[];for(let r of e)if(r?.code===`mapKeyOrder`){let e=FK(t,r);for(;e&&e.type!==`object`;)e=e.parent;if(e&&Fu(e.internalNode)){let r=structuredClone(e.internalNode),i=e=>{if(e){if(Xp(e))return e.type===`block-scalar`?(e.props??=[],e.props):(e.end??=[],e.end);if(e.type===`flow-collection`)return e.end??=[],e.end;if(e.type===`block-map`){let t=e.items[e.items.length-1];return t?i(t.value):void 0}}};if((r.srcToken.type===`block-map`||r.srcToken.type===`flow-collection`)&&(e.internalNode.srcToken.type===`block-map`||e.internalNode.srcToken.type===`flow-collection`)){r.srcToken.items.sort((e,t)=>{if(e.key&&t.key&&Xp(e.key)&&Xp(t.key))return e.key.source.localeCompare(t.key.source);if(!e.key&&t.key)return-1;if(e.key&&!t.key)return 1;if(!e.key&&!t.key)return 0});for(let t=0;t<r.srcToken.items.length;t++){let n=r.srcToken.items[t],a=e.internalNode.srcToken.items[t];for(n.start=a.start;n.start?.[0]?.type===`newline`;)n.start.shift();let o=i(n.value),s=o?.findIndex(e=>e.type===`newline`)??-1,c=i(a.value)?.find(t=>t.type===`newline`&&t.offset<e.offset+e.length)??null;c&&s<0&&o&&o.push({type:`newline`,indent:0,offset:n.value.offset,source:`
|
|
1416
|
+
`}),!c&&s>-1&&o&&o.splice(s,1)}}let a=z.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length));n.push(nt.create(g(`Fix key order for this map`),IK(t.uri,[ge.replace(a,Vp(r.srcToken))]),$e.QuickFix))}}return n}getPossibleQuickFixValues(e){if(typeof e.data==`object`){if(e.code===Dm.EnumValueMismatch&&`values`in e.data&&Array.isArray(e.data.values))return e.data.values;if(e.code===Dm.PropertyExpected&&`properties`in e.data&&Array.isArray(e.data.properties))return e.data.properties}}getQuickFixForPropertyOrValueMismatch(e,t){let n=[];for(let r of e){let e=this.getPossibleQuickFixValues(r);if(e?.length)for(let i of e){let e=typeof i==`string`?Qh(i):String(i);n.push(nt.create(e,IK(t.uri,[ge.replace(r.range,e)]),$e.QuickFix))}}return n}};function FK(e,t){let n=Ph.getYamlDocument(e),r=e.offsetAt(t.range.start),i=e.offsetAt(t.range.end),a=Fm(r,n),o=a.getNodeFromOffset(r);if(o&&r<i&&o.offset+o.length===r){let e=a.getNodeFromOffset(r+1);e&&(o=e)}return o}function IK(e,t){let n={};return n[e]=t,{changes:n}}Dt();function LK(e,t){let{position:n}=t,r=new zh(e);if(t.ch===`
|
|
1417
|
+
`){let e=r.getLineContent(n.line-1);if(e.trimEnd().endsWith(`:`)){let i=e.length-e.trimStart().length+t.options.tabSize;e.trimStart().startsWith(`-`)&&(i+=t.options.tabSize);let a=r.getLineContent(n.line).replace(`\r`,``).replace(`
|
|
1418
|
+
`,``);return a.trim().length!==0||a.length===i?void 0:a.length<i?[ge.insert(n,` `.repeat(i-a.length))]:[ge.del(z.create(R.create(n.line,0),R.create(n.line,a.length-i)))]}if(e.trimEnd().endsWith(`|`))return[ge.insert(n,` `.repeat(t.options.tabSize))];if(e.includes(` - `)&&!e.includes(`: `))return[ge.insert(n,`- `)];if(e.includes(` - `)&&e.includes(`: `))return[ge.insert(n,` `)]}}Dt();var RK=class{constructor(e,t){this.schemaService=e,this.telemetry=t}async getCodeLens(e){let t=[];try{let n=Ph.getYamlDocument(e),r=/* @__PURE__ */ new Map;for(let t of n.documents){let n=await this.schemaService.getSchemaForResource(e.uri,t);n?.schema&&(r=new Map([..._g(n?.schema),...r]))}for(let e of r){let n=rt.create(z.create(0,0,0,0));n.command={title:jm(e[1],e[0]),command:xi.JUMP_TO_SCHEMA,arguments:[e[0]]},t.push(n)}}catch(e){this.telemetry?.sendError(`yaml.codeLens.error`,e)}return t}resolveCodeLens(e){return e}},zK=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}};function BK(e,t,n,r,i){i.spacesDiff=0,i.looksLikeAlignment=!1;let a=0;for(;a<t&&a<r&&e.charCodeAt(a)===n.charCodeAt(a);a++);let o=0,s=0;for(let n=a;n<t;n++)e.charCodeAt(n)===32?o++:s++;let c=0,l=0;for(let e=a;e<r;e++)n.charCodeAt(e)===32?c++:l++;if(o>0&&s>0||c>0&&l>0)return;let u=Math.abs(s-l),d=Math.abs(o-c);if(u===0){i.spacesDiff=d,d>0&&0<=c-1&&c-1<e.length&&c<n.length&&n.charCodeAt(c)!==32&&e.charCodeAt(c-1)===32&&e.charCodeAt(e.length-1)===44&&(i.looksLikeAlignment=!0);return}d%u===0&&(i.spacesDiff=d/u)}function VK(e,t,n){let r=Math.min(e.getLineCount(),1e4),i=0,a=0,o=``,s=0,c=[2,4,6,8,3,5,7],l=[0,0,0,0,0,0,0,0,0],u=new zK;for(let c=1;c<=r;c++){let r=e.getLineLength(c),d=e.getLineContent(c),f=r<=65536,p=!1,m=0,h=0,g=0;for(let t=0,n=r;t<n;t++){let n=f?d.charCodeAt(t):e.getLineCharCode(c,t);if(n===9)g++;else if(n===32)h++;else{p=!0,m=t;break}}if(!p||(g>0?i++:h>1&&a++,BK(o,s,d,m,u),u.looksLikeAlignment&&!(n&&t===u.spacesDiff)))continue;let _=u.spacesDiff;_<=8&&l[_]++,o=d,s=m}let d=n;i!==a&&(d=i<a);let f=t;if(d){let e=d?0:.1*r;c.forEach(t=>{let n=l[t];n>e&&(e=n,f=t)}),f===4&&l[4]>0&&l[2]>0&&l[2]>=l[4]/2&&(f=2)}return{insertSpaces:d,tabSize:f}}function HK(e,t,n,r,i=0,a=0){if(typeof e==`object`&&e){let o=i===0&&r.shouldIndentWithTab||i>0?t+r.indentation:``;if(Array.isArray(e)){if(a+=1,e.length===0)return``;let s=``;for(let c=0;c<e.length;c++){let l=e[c];if(typeof e[c]!=`object`){s+=`
|
|
1419
|
+
`+o+`- `+n(e[c]);continue}Array.isArray(e[c])||(l=UK(e[c],a)),s+=HK(l,t,n,r,i+=1,a)}return s}{let a=Object.keys(e);if(a.length===0)return``;let s=i===0&&r.newLineFirst||i>0?`
|
|
1420
|
+
`:``,c=!0;for(let l=0;l<a.length;l++){let u=a[l];if(i===0&&r.existingProps.includes(u))continue;let d=typeof e[u]==`object`,f=d?`:`:`: `,p=o+(d&&/^\s|-/.test(u)?r.indentation:``),m=c?``:`
|
|
1421
|
+
`;if(i===0&&c&&!r.indentFirstObject){let a=HK(e[u],p,n,r,i+1,0);s+=m+t+u+f+a}else{let t=HK(e[u],p,n,r,i+1,0);s+=m+o+u+f+t}c=!1}return s}}return n(e)}function UK(e,t){let n={};for(let r=0;r<Object.keys(e).length;r++){let i=Object.keys(e)[r];r===0?n[`- `.repeat(t)+i]=e[i]:n[` `.repeat(t)+i]=e[i]}return n}Dt();const WK=Pe.Class;var GK=class{constructor(e,t={},n,r){this.schemaService=e,this.clientCapabilities=t,this.yamlDocument=n,this.telemetry=r,this.completionEnabled=!0,this.arrayPrefixIndentation=``}configure(e,t){e&&(this.completionEnabled=e.completion),this.customTags=e.customTags,this.yamlVersion=e.yamlVersion,this.isSingleQuote=t?.yamlFormatterSettings?.singleQuote||!1,this.configuredIndentation=e.indentation,this.disableDefaultProperties=e.disableDefaultProperties,this.parentSkeletonSelectedFirst=e.parentSkeletonSelectedFirst}async doComplete(e,t,n=!1,r=!0){let i=Ve.create([],!1);if(!this.completionEnabled)return i;let a=this.yamlDocument.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0),o=new zh(e);if(this.configuredIndentation)this.indentation=this.configuredIndentation;else{let e=VK(o,2,!0);this.indentation=e.insertSpaces?` `.repeat(e.tabSize):` `}Ai(a.documents,n);for(let t of a.documents)t.uri=e.uri;let s=e.offsetAt(t),c=e.getText();if(c.charAt(s-1)===`:`)return Promise.resolve(i);let l=Fm(s,a);if(l===null)return Promise.resolve(i);l=l.clone();let[u,d]=l.getNodeFromPosition(s,o,this.indentation.length),f=this.getCurrentWord(e,s),p=o.getLineContent(t.line),m=p.substring(t.character),h=/^[ ]+\n?$/.test(m);this.arrayPrefixIndentation=``;let _=null;if(h){_=z.create(t,R.create(t.line,p.length));let e=p.trim().length===0,n=p.match(/^\s*(-)\s*$/);if(u&&H(u)&&!e&&!n){let e=p.substring(0,t.character),n=e.match(/^[\s-]*([^:]+)?$/)||e.match(/:[ \t]((?!:[ \t]).*)$/);n?.[1]&&(_=z.create(R.create(t.line,t.character-n[1].length),R.create(t.line,p.length)))}}else if(u&&H(u)&&u.value===`null`){let t=e.positionAt(u.range[0]);t.character+=1;let n=e.positionAt(u.range[2]);n.character+=1,_=z.create(t,n)}else if(u&&H(u)&&u.value){let t=e.positionAt(u.range[0]);_=z.create(t,e.positionAt(u.range[1]))}else if(u&&H(u)&&u.value===null&&f===`-`)_=z.create(t,t),this.arrayPrefixIndentation=` `;else{let n=s-f.length;n>0&&c[n-1]===`"`&&n--,_=z.create(e.positionAt(n),t)}let v={},y={add:(e,t)=>{let n=function(e){if(v[e.label]?.label===`__`)return;let t=e.parent.schema,n=km(t),r=t.markdownDescription||t.description,a=i.items.find(e=>e.parent?.schema===t&&e.kind===WK);a&&a.parent.insertTexts.includes(e.insertText)||(a?a.parent.insertTexts.push(e.insertText):(a={...e,label:n,documentation:r,sortText:`_`+n,kind:WK},a.label=a.label||e.label,a.parent.insertTexts=[e.insertText],i.items.push(a)))},r=!!e.parent,a=e.label;if(!a){console.warn(`Ignoring CompletionItem without label: ${JSON.stringify(e)}`);return}if(Nn(a)||(a=String(a)),a=a.replace(/\n|\\n/g,`↵`),a.length>60){let e=a.substr(0,57).trim()+`...`;v[e]||(a=e)}if(e.label.toLowerCase()===`regular expression`){let t=e.documentation.value.split(`:`);a=t.length>0?`${this.getQuote()}\\${JSON.parse(t[1])}${this.getQuote()}`:e.label,e.insertText=a,e.textEdit=ge.replace(_,a)}else{let t=e.insertText.replace(/\${[0-9]+[:|](.*)}/g,(e,t)=>t).replace(/\$([0-9]+)/g,``).match(/^([^:"]+):\s*(['\\"\\])$/);if(t){let n=t[1],r=t[2];e.insertText=`${n}: ${this.getQuote()}\\${r}${this.getQuote()}`}e.insertText.endsWith(`$1`)&&!r&&(e.insertText=e.insertText.substr(0,e.insertText.length-2)),_&&_.start.line===_.end.line&&(e.textEdit=ge.replace(_,e.insertText))}if(e.label=a,r){n(e);return}this.arrayPrefixIndentation&&this.updateCompletionText(e,this.arrayPrefixIndentation+e.insertText);let o=v[a],s=o?.label!==`__`&&o?.insertText!==e.insertText;if(!o)v[a]=e,i.items.push(e);else if(s){let n=this.mergeSimpleInsertTexts(a,o.insertText,e.insertText,t);n?this.updateCompletionText(o,n):(v[a]=e,i.items.push(e))}o&&!o.documentation&&e.documentation&&(o.documentation=e.documentation),o&&!o.detail&&e.detail&&(o.detail=e.detail)},error:e=>{this.telemetry?.sendError(`yaml.completion.error`,e)},log:e=>{console.log(e)},getNumberOfProposals:()=>i.items.length,result:i,proposed:v};this.customTags&&this.customTags.length>0&&this.getCustomTagValueCompletions(y),p.endsWith(`
|
|
1422
|
+
`)&&(p=p.substr(0,p.length-1));try{let n=await this.schemaService.getSchemaForResource(e.uri,l);if((!n||n.errors.length)&&t.line===0&&t.character===0&&!Kh(p)){let e={kind:Pe.Text,label:g(`Inline schema`),insertText:`# yaml-language-server: $schema=`,insertTextFormat:Fe.PlainText};i.items.push(e)}if(Kh(p)||kh(a.tokens,s)){let e=p.match(/\$schema[=:]/);if(e)return e.index+e[0].length<=t.character&&this.schemaService.getAllSchemas().forEach(e=>{let t={kind:Pe.Constant,label:e.name??e.uri,detail:e.description,insertText:e.uri,insertTextFormat:Fe.PlainText,insertTextMode:Re.asIs};i.items.push(t)}),i}if(!n||n.errors.length)return i;let m=null;if(!u){if(!l.internalDocument.contents||H(l.internalDocument.contents)){let e=l.internalDocument.createNode({});e.range=[s,s+1,s+1],l.internalDocument.contents=e,l.updateFromInternalDocument(),u=e}else u=l.findClosestNode(s,o),d=!0}let h=u;if(u){if(p.length===0)u=l.internalDocument.contents;else{let n=l.getParent(u);if(n){if(H(u)){if(u.value){if(Iu(n)){if(n.value===u){if(p.trim().length>0&&p.indexOf(`:`)<0){let e=this.createTempObjNode(f,u,l),t=l.getParent(n);if(Lu(l.internalDocument.contents)){let t=Oh(l.internalDocument.contents,n);typeof t==`number`&&(l.internalDocument.set(t,e),l.updateFromInternalDocument())}else t&&(Fu(t)||Lu(t))?(t.set(n.key,e),l.updateFromInternalDocument()):(l.internalDocument.set(n.key,e),l.updateFromInternalDocument());m=e.items[0],u=e}else if(p.trim().length===0){let e=l.getParent(n);e&&(u=e)}}else if(n.key===u){let e=l.getParent(n);m=n,e&&(u=e)}}else if(Lu(n)){if(p.trim().length>0){let e=this.createTempObjNode(f,u,l);n.delete(u),n.add(e),l.updateFromInternalDocument(),u=e}else u=n}}else if(u.value===null){if(Iu(n)){if(n.key===u)u=n;else if(zu(n.key)&&n.key.range){let r=l.getParent(n);if(d&&r&&Fu(r)&&Dh(r))u=r;else{let i=e.positionAt(n.key.range[0]);if(t.character>i.character&&t.line!==i.line){let e=this.createTempObjNode(f,u,l);r&&(Fu(r)||Lu(r))?(r.set(n.key,e),l.updateFromInternalDocument()):(l.internalDocument.set(n.key,e),l.updateFromInternalDocument()),m=e.items[0],u=e}else i.character===t.character&&r&&(u=r)}}}else if(Lu(n)){if(p.charAt(t.character-1)!==`-`){let e=this.createTempObjNode(f,u,l);n.delete(u),n.add(e),l.updateFromInternalDocument(),u=e}else if(p.charAt(t.character-1)===`-`){let e=this.createTempObjNode(``,u,l);n.delete(u),n.add(e),l.updateFromInternalDocument(),u=e}else u=n}}}else if(Fu(u)&&!d&&p.trim().length===0&&Lu(n)){let e=o.getLineContent(t.line+1);(o.getLineCount()===t.line+1||e.trim().length===0)&&(u=n)}}else if(H(u)){let e=this.createTempObjNode(f,u,l);l.internalDocument.contents=e,l.updateFromInternalDocument(),m=e.items[0],u=e}else if(Fu(u))for(let e of u.items)zu(e.value)&&e.value.range&&e.value.range[0]===s+1&&(u=e.value);else if(Lu(u)&&p.charAt(t.character-1)!==`-`){let e=this.createTempObjNode(f,u,l);e.items=[],l.updateFromInternalDocument();for(let t of u.items)Fu(t)&&t.items.forEach(t=>{e.items.push(t)});u=e}}}let b=o.getLineContent(_.start.line).trim().length===0&&h&&(H(h)&&h.value===null||Lu(h));if(u&&Fu(u)){let e=u.items;for(let t of e)(!m||m!==t)&&H(t.key)&&(v[t.key.value+``]=Be.create(`__`));this.addPropertyCompletions(n,l,u,h,``,y,o,_,r,b),!n&&f.length>0&&c.charAt(s-f.length-1)!==`"`&&y.add({kind:Pe.Property,label:f,insertText:this.getInsertTextForProperty(f,null,``),insertTextFormat:Fe.Snippet})}this.getValueCompletions(n,l,u,s,e,y,{},r,b)}catch(e){this.telemetry?.sendError(`yaml.completion.error`,e)}this.finalizeParentCompletion(i);let b=i.items.filter((e,t,n)=>t===n.findIndex(t=>t.label===e.label&&t.insertText===e.insertText&&t.kind===e.kind));return b?.length>0&&(i.items=b),i}updateCompletionText(e,t){e.insertText=t,e.textEdit&&(e.textEdit.newText=t)}mergeSimpleInsertTexts(e,t,n,r){let i=e=>e.includes(`
|
|
1423
|
+
`),a=e=>e.startsWith(`
|
|
1424
|
+
`),o=e=>{let t=e.indexOf(`
|
|
1425
|
+
`);return t>0&&e.substring(t,e.length).trim().length===0};if(i(t)||i(n))return r&&o(t)&&!o(n)&&!a(n)?n:void 0;let s=this.getValuesFromInsertText(t),c=this.getValuesFromInsertText(n),l=Array.prototype.concat(s,c);if(l.length)return l.length===1?`${e}: \${1:${l[0]}}`:`${e}: \${1|${l.join(`,`)}|}`}getValuesFromInsertText(e){let t=e.substring(e.indexOf(`:`)+1).trim();if(!t)return[];let n=t.match(/^\${1[|:]([^|]*)+\|?}$/);return n?n[1].split(`,`):[t]}finalizeParentCompletion(e){let t=e=>{let t=0;return e.map(e=>{let n=e.match(/\$([0-9]+)|\${[0-9]+:/g);if(!n)return e;let r=n.map(e=>+e.replace(/\${([0-9]+)[:|]/g,`$1`).replace(`$`,``)).reduce((e,t)=>t>e?t:e,0),i=e.replace(/\$([0-9]+)/g,(e,n)=>`$`+(+n+t)).replace(/\${([0-9]+)[:|]/g,(e,n)=>"${"+(+n+t)+`:`);return t+=r,i})};e.items.forEach(e=>{if(this.isParentCompletionItem(e)){let n=e.parent.indent||``,r=t(e.parent.insertTexts).join(`\n${n}`);r.endsWith(`$1`)&&(r=r.substring(0,r.length-2)),e.insertText=this.arrayPrefixIndentation+r,e.textEdit&&(e.textEdit.newText=e.insertText);let i=r.replace(/\${[0-9]+[:|](.*)}/g,(e,t)=>t).replace(/\$([0-9]+)/g,``),a=e.documentation?[e.documentation,``,`----`,``]:[];e.documentation={kind:Me.Markdown,value:[...a,"```yaml",n+i,"```"].join(`
|
|
1426
|
+
`)},delete e.parent}})}createTempObjNode(e,t,n){let r={};r[e]=null;let i=n.internalDocument.createNode(r);return i.range=t.range,i.items[0].key.range=t.range,i.items[0].value.range=t.range,i}addPropertyCompletions(e,t,n,r,i,a,o,s,c,l){let u=t.getMatchingSchemas(e.schema,-1,null,c),d=o.getText(s),f=o.getLineContent(s.start.line),p=f.trim().length===0,m=f.indexOf(`:`)!==-1,h=f.trimStart().indexOf(`-`)===0,g=t.getParent(n),_=u.find(e=>e.node.internalNode===r&&e.schema.properties),v=u.filter(e=>e.schema.oneOf).map(e=>e.schema.oneOf)[0],y=!1;v?.length<u.length&&v?.forEach((e,t)=>{!u[t]?.schema.oneOf&&u[t]?.schema.properties===e.properties&&(y=!0)});for(let e of u){if((e.node.internalNode===n&&!_||e.node.internalNode===r&&!m||e.node.parent?.internalNode===r&&!m)&&!e.inverted){this.collectDefaultSnippets(e.schema,i,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:h});let t=e.schema.properties;if(t){let c=e.schema.maxProperties;if(c===void 0||n.items===void 0||n.items.length<c||n.items.length===c&&!p){for(let c in t)if(Object.prototype.hasOwnProperty.call(t,c)){let u=t[c];if(typeof u==`object`&&!u.deprecationMessage&&!u.doNotSuggest){let t=``;if(g&&Lu(g)&&n.items.length<=1&&!p){let e=o.getText(),r=e.lastIndexOf(`-`,n.range[0]-1);if(r>=0){let i=s.end.character-s.start.character;t=` `+e.slice(r+1,n.range[1]-i)}}t+=this.arrayPrefixIndentation;let f;u.type===`array`&&(f=n.items.find(e=>H(e.key)&&e.key.range&&e.key.value===c&&H(e.value)&&!e.value.value&&o.getPosition(e.key.range[2]).line===s.end.line-1))&&f&&(Array.isArray(u.items)?this.addSchemaValueCompletions(u.items[0],i,a,{},l,!0):typeof u.items==`object`&&u.items.type===`object`&&this.addArrayItemValueCompletion(u.items,i,a));let h=c,_=Array.isArray(e.schema.required)?e.schema.required.includes(c):!1;(!c.startsWith(d)||!m)&&(h=this.getInsertTextForProperty(c,u,i,t+this.indentation,_));let v=H(r)&&r.value===null||Fu(r)&&r.items.length===0,b=e.schema.required?.length>0;(!this.parentSkeletonSelectedFirst||!v||!b)&&a.add({kind:Pe.Property,label:c,insertText:h,insertTextFormat:Fe.Snippet,documentation:this.fromMarkup(u.markdownDescription)||u.description||``},y),e.schema.required?.includes(c)&&a.add({label:c,insertText:this.getInsertTextForProperty(c,u,i,t+this.indentation,!0),insertTextFormat:Fe.Snippet,documentation:this.fromMarkup(u.markdownDescription)||u.description||``,parent:{schema:e.schema,indent:t}})}}}}if(g&&Lu(g)&&Mm(e.schema)&&this.addSchemaValueCompletions(e.schema,i,a,{},l),e.schema.type===`object`&&e.schema.propertyNames&&e.schema.additionalProperties!==!1){let t=qm(e.schema.propertyNames);if(!t.deprecationMessage&&!t.doNotSuggest){let e=this.fromMarkup((t.markdownDescription||t.description||``)+(t.pattern?`\n\n**Pattern:** \`${t.pattern}\``:``)),{candidates:n,impossible:r}=this.getPropertyNamesCandidates(t);if(!r){if(n.length)for(let t of n)a.add({kind:Pe.Property,label:t,insertText:`${t}: `,insertTextFormat:Fe.PlainText,documentation:e});else{let n=t.title||`property`;a.add({kind:Pe.Property,label:n,insertText:`\${1:${n}}: `,insertTextFormat:Fe.Snippet,documentation:e})}}}}}g&&e.node.internalNode===g&&e.schema.defaultSnippets&&(n.items.length===1?this.collectDefaultSnippets(e.schema,i,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!0},1):this.collectDefaultSnippets(e.schema,i,a,{newLineFirst:!1,indentFirstObject:!0,shouldIndentWithTab:!1},1))}}getValueCompletions(e,t,n,r,i,a,o,s,c){let l=null;if(n&&H(n)&&(n=t.getParent(n)),!n){this.addSchemaValueCompletions(e.schema,``,a,o,!1);return}if(Iu(n)){let e=n.value;if(e&&e.range&&r>e.range[0]+e.range[2])return;l=H(n.key)?n.key.value+``:null,n=t.getParent(n)}if(n&&(l!==null||Lu(n))){let u=t.getMatchingSchemas(e.schema,-1,null,s);for(let e of u)if(e.node.internalNode===n&&!e.inverted&&e.schema){if(e.schema.items&&(this.collectDefaultSnippets(e.schema,``,a,{newLineFirst:!1,indentFirstObject:!1,shouldIndentWithTab:!1}),Lu(n)&&n.items)){if(Array.isArray(e.schema.items)){let t=this.findItemAtOffset(n,i,r);t<e.schema.items.length&&this.addSchemaValueCompletions(e.schema.items[t],``,a,o,!1)}else this.addSchemaValueCompletions(e.schema.items,``,a,o,c,typeof e.schema.items==`object`&&(e.schema.items.type===`object`||Nm(e.schema.items)))}if(e.schema.properties){let t=e.schema.properties[l];t&&this.addSchemaValueCompletions(t,``,a,o,c)}e.schema.additionalProperties&&this.addSchemaValueCompletions(e.schema.additionalProperties,``,a,o,c)}o.boolean&&(this.addBooleanValueCompletion(!0,``,a),this.addBooleanValueCompletion(!1,``,a)),o.null&&this.addNullValueCompletion(``,a)}}addArrayItemValueCompletion(e,t,n,r){let i=km(e),a=`- ${this.getInsertTextForObject(e,t).insertText.trimStart()}`,o=i?" type `"+i+"`":``,s=e.description?` (`+e.description+`)`:``,c=this.getDocumentationWithMarkdownText(g(`Create an item of an array{0}{1}`,o,s),a);n.add({kind:this.getSuggestionKind(e.type),label:g(`- (array item) `)+(i||r),documentation:c,insertText:a,insertTextFormat:Fe.Snippet})}getInsertTextForProperty(e,t,n,r=this.indentation,i=!1){let a=this.getInsertTextForValue(e,``,`string`),o=a+`:`,s=t&&i&&jn(t.default),c,l=0;if(t){let e=Array.isArray(t.type)?t.type[0]:t.type;if(e||(t.properties?e=`object`:t.items?e=`array`:t.anyOf&&(e=`anyOf`)),Array.isArray(t.defaultSnippets)){if(t.defaultSnippets.length===1){let e=t.defaultSnippets[0].body;jn(e)&&(c=this.getInsertTextForSnippetValue(e,``,{newLineFirst:!0,indentFirstObject:!1,shouldIndentWithTab:!1},[],1),!c.startsWith(` `)&&!c.startsWith(`
|
|
1427
|
+
`)&&(c=` `+c))}l+=t.defaultSnippets.length}if(t.enum&&(!c&&t.enum.length===1&&(c=` `+this.getInsertTextForGuessedValue(t.enum[0],``,e)),l+=t.enum.length),jn(t.const)&&(c||=(c=this.getInsertTextForGuessedValue(t.const,``,e),c=this.evaluateTab1Symbol(c),` `+c),l++),jn(t.default)){if(!c||s){let n=this.getInsertTextForGuessedValue(t.default,``,e);s&&(n=this.evaluateTab1Symbol(n)),c=` `+n}l++}if(Array.isArray(t.examples)&&t.examples.length&&(c||=` `+this.getInsertTextForGuessedValue(t.examples[0],``,e),l+=t.examples.length),t.properties)return`${o}\n${this.getInsertTextForObject(t,n,r).insertText}`;if(t.items)return e===`array`&&Array.isArray(t.default)?t.default.length===0?`${o} []${n}`:o+this.getInsertTemplateForValue(t.default,r,{index:1},n).trimEnd():`${o}\n${r}- ${this.getInsertTextForArray(t.items,n,1,r).insertText}`;if(l===0)switch(e){case`boolean`:case`string`:case`anyOf`:c=` $1`;break;case`object`:c=`\n${r}`;break;case`array`:c=`\n${r}- `;break;case`number`:case`integer`:c=" ${1:0}";break;case`null`:c=" ${1:null}";break;default:return a}}return(!c||l>1&&!s)&&(c=` $1`),o+c+n}getInsertTextForObject(e,t,n=this.indentation,r=1){let i=``;return e.properties?(Object.keys(e.properties).forEach(a=>{let o=e.properties[a],s=Array.isArray(o.type)?o.type[0]:o.type;if(s||(o.anyOf&&(s=`anyOf`),o.properties&&(s=`object`),o.items&&(s=`array`)),e.required&&e.required.indexOf(a)>-1)switch(s){case`boolean`:case`string`:case`number`:case`integer`:case`anyOf`:{let e=o.default===void 0?o.const:o.default;e===void 0?i+=`${n}${a}: $${r++}\n`:(s===`string`&&(e=Qh(e)),i+=`${n}${a}: \${${r++}:${e}}\n`);break}case`array`:{let e=this.getInsertTextForArray(o.items,t,r++,n),s=e.insertText.split(`
|
|
1428
|
+
`),c=e.insertText;if(s.length>1){for(let e=1;e<s.length;e++){let t=s[e];s[e]=` ${t}`}c=s.join(`
|
|
1429
|
+
`)}r=e.insertIndex,i+=`${n}${a}:\n${n}${this.indentation}- ${c}\n`}break;case`object`:{let e=this.getInsertTextForObject(o,t,`${n}${this.indentation}`,r++);r=e.insertIndex,i+=`${n}${a}:\n${e.insertText}\n`}}else if(!this.disableDefaultProperties&&o.default!==void 0)switch(s){case`boolean`:case`number`:case`integer`:i+=`${n}${a===`null`?this.getInsertTextForValue(a,``,`string`):a}: \${${r++}:${o.default}}\n`;break;case`string`:i+=`${n}${a}: \${${r++}:${Qh(o.default)}}\n`}}),i.trim().length===0&&(i=`${n}$${r++}\n`),i=i.trimEnd()+t,{insertText:i,insertIndex:r}):(i=`${n}$${r++}\n`,{insertText:i,insertIndex:r})}getInsertTextForArray(e,t,n=1,r=this.indentation){let i=``;if(!e)return i=`$${n++}`,{insertText:i,insertIndex:n};let a=Array.isArray(e.type)?e.type[0]:e.type;if(a||(e.properties&&(a=`object`),e.items&&(a=`array`)),jn(e.default))i=this.getInsertTextForGuessedValue(e.default,t,a);else switch(e.type){case`boolean`:i=`\${${n++}:false}`;break;case`number`:case`integer`:i=`\${${n++}:0}`;break;case`string`:i=`\${${n++}}`;break;case`object`:{let a=this.getInsertTextForObject(e,t,`${r} `,n++);i=a.insertText.trimStart(),n=a.insertIndex}}return{insertText:i,insertIndex:n}}getInsertTextForGuessedValue(e,t,n){switch(typeof e){case`object`:return e===null?"${1:null}"+t:this.getInsertTextForValue(e,t,n);case`string`:return n===`number`||n===`integer`?"${1:"+e+`}`+t:"${1:"+this.getInsertTextForPlainText(Qh(e))+`}`+t;case`number`:case`boolean`:return"${1:"+e+`}`+t}return this.getInsertTextForValue(e,t,n)}getInsertTextForPlainText(e){return e.replace(/\\(?=[$}\\])/g,`\\\\`).replace(/[$}]/g,`\\$&`)}getInsertTextForValue(e,t,n){if(e===null)return`null`;switch(typeof e){case`object`:{let n=this.indentation;return this.getInsertTemplateForValue(e,n,{index:1},t)}case`number`:case`boolean`:return this.getInsertTextForPlainText(e+t)}return n=Array.isArray(n)?n[0]:n,n===`string`&&(e=Qh(String(e),this.isSingleQuote)),this.getInsertTextForPlainText(e+t)}getInsertTemplateForValue(e,t,n,r){if(Array.isArray(e)){let r=`
|
|
1430
|
+
`;for(let i of e)r+=`${t}- \${${n.index++}:${i}}\n`;return r}if(typeof e==`object`){let i=`
|
|
1431
|
+
`;for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)){let o=e[a];i+=`${t}\${${n.index++}:${a}}:`;let s;s=typeof o==`object`?`${this.getInsertTemplateForValue(o,t+this.indentation,n,r)}`:` \${${n.index++}:${this.getInsertTextForPlainText(o+r)}}\n`,i+=`${s}`}return i}return this.getInsertTextForPlainText(e+r)}addSchemaValueCompletions(e,t,n,r,i=!1,a=!1){typeof e==`object`&&(this.addEnumValueCompletions(e,t,n,i),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),a&&!Nm(e)&&this.addArrayItemValueCompletion(e,t,n),Array.isArray(e.allOf)&&e.allOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r,i,a)),Array.isArray(e.anyOf)&&e.anyOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r,i,a)),Array.isArray(e.oneOf)&&e.oneOf.forEach(e=>this.addSchemaValueCompletions(e,t,n,r,i,a)))}collectTypes(e,t){if(Array.isArray(e.enum)||jn(e.const))return;let n=e.type;Array.isArray(n)?n.forEach(function(e){return t[e]=!0}):n&&(t[n]=!0)}addDefaultValueCompletions(e,t,n,r=0){let i=!1;if(jn(e.default)){let a=e.type,o=e.default;for(let e=r;e>0;e--)o=[o],a=`array`;let s;s=typeof o==`object`?g(`Default value`):this.getLabelForValue(o),n.add({kind:this.getSuggestionKind(a),label:s,insertText:this.getInsertTextForValue(o,t,a),insertTextFormat:Fe.Snippet,detail:g(`Default value`)}),i=!0}Array.isArray(e.examples)&&e.examples.forEach(a=>{let o=e.type,s=a;for(let e=r;e>0;e--)s=[s],o=`array`;n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t,o),insertTextFormat:Fe.Snippet}),i=!0}),this.collectDefaultSnippets(e,t,n,{newLineFirst:!0,indentFirstObject:!0,shouldIndentWithTab:!0}),!i&&typeof e.items==`object`&&!Array.isArray(e.items)&&this.addDefaultValueCompletions(e.items,t,n,r+1)}addEnumValueCompletions(e,t,n,r){if(jn(e.const)&&(!r||typeof e.const==`object`)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t,e.type),insertTextFormat:Fe.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(let i=0,a=e.enum.length;i<a;i++){let a=e.enum[i];if(r&&typeof a!=`object`)continue;let o=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&i<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(e.markdownEnumDescriptions[i]):e.enumDescriptions&&i<e.enumDescriptions.length&&(o=e.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t,e.type),insertTextFormat:Fe.Snippet,documentation:o})}}getLabelForValue(e){return e===null?`null`:Array.isArray(e)?JSON.stringify(e):typeof e==`string`?Qh(e,this.isSingleQuote):String(e)}collectDefaultSnippets(e,t,n,r,i=0){if(Array.isArray(e.defaultSnippets))for(let a of e.defaultSnippets){let o=e.type,s=a.body,c=a.label,l,u;if(jn(s)){let o=a.type||e.type;if(i===0&&o===`array`){let e={};Object.keys(s).forEach((t,n)=>{n===0&&!t.startsWith(`-`)?e[`- ${t}`]=s[t]:e[` ${t}`]=s[t]}),s=e}let u=Object.keys(n.proposed).filter(e=>n.proposed[e].label===`__`);if(l=this.getInsertTextForSnippetValue(s,t,r,u),l===``&&s)continue;c||=this.getLabelForSnippetValue(s)}else if(typeof a.bodyText==`string`){let e=``,n=``,r=``;for(let t=i;t>0;t--)e=e+r+`[
|
|
1432
|
+
`,n=n+`
|
|
1433
|
+
`+r+`]`,r+=this.indentation,o=`array`;l=e+r+a.bodyText.split(`
|
|
1434
|
+
`).join(`
|
|
1435
|
+
`+r)+n+t,c||=l,u=l.replace(/[\n]/g,``)}n.add({kind:a.suggestionKind||this.getSuggestionKind(o),label:c,sortText:a.sortText||a.label,documentation:this.fromMarkup(a.markdownDescription)||a.description,insertText:l,insertTextFormat:Fe.Snippet,filterText:u})}}getInsertTextForSnippetValue(e,t,n,r,i){return HK(e,``,e=>{if(typeof e==`string`){if(e[0]===`^`)return e.substr(1);if(e===`true`||e===`false`)return`"${e}"`}return e},{...n,indentation:this.indentation,existingProps:r},i)+t}addBooleanValueCompletion(e,t,n){n.add({kind:this.getSuggestionKind(`boolean`),label:e?`true`:`false`,insertText:this.getInsertTextForValue(e,t,`boolean`),insertTextFormat:Fe.Snippet,documentation:``})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind(`null`),label:`null`,insertText:`null`+e,insertTextFormat:Fe.Snippet,documentation:``})}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,`$1`)}getCustomTagValueCompletions(e){for(let t of this.customTags??[]){let n=ph(t);n&&this.addCustomTagValueCompletion(e,` `,n.tag)}}addCustomTagValueCompletion(e,t,n){e.add({kind:this.getSuggestionKind(`string`),label:n,insertText:n+t,insertTextFormat:Fe.Snippet,documentation:``})}getDocumentationWithMarkdownText(e,t){let n=e;return this.doesSupportMarkdown()&&(t=t.replace(/\${[0-9]+[:|](.*)}/g,(e,t)=>t).replace(/\$([0-9]+)/g,``),n=this.fromMarkup(`${e}\n \`\`\`\n${t}\n\`\`\``)),n}getSuggestionKind(e){if(Array.isArray(e)){let t=e;e=t.length>0?t[0]:null}if(!e)return Pe.Value;switch(e){case`string`:return Pe.Value;case`object`:return Pe.Module;case`property`:return Pe.Property;default:return Pe.Value}}getCurrentWord(e,t){let n=t-1,r=e.getText();for(;n>=0&&`
|
|
1436
|
+
\r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:Me.Markdown,value:e}}doesSupportMarkdown(){if(this.supportsMarkdown===void 0){let e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&e.completionItem.documentationFormat.indexOf(Me.Markdown)!==-1}return this.supportsMarkdown}findItemAtOffset(e,t,n){for(let t=e.items.length-1;t>=0;t--){let r=e.items[t];if(zu(r)&&r.range&&(n>r.range[1]||n>=r.range[0]))return t}return 0}getPropertyNamesCandidates(e){let t=!1,n=e=>{if(!e||typeof e!=`object`)return null;if(Array.isArray(e.allOf)&&e.allOf.length){let r=null;for(let i of e.allOf){let e=n(i);if(e&&(r=r?new Set([...r].filter(t=>e.has(t))):new Set(e),r.size===0))return t=!0,/* @__PURE__ */ new Set}if(r)return r}let r=/* @__PURE__ */ new Set;return typeof e.const==`string`&&r.add(e.const),e.enum?.forEach(e=>typeof e==`string`&&r.add(e)),e.anyOf?.forEach(e=>n(e)?.forEach(e=>r.add(e))),e.oneOf?.forEach(e=>n(e)?.forEach(e=>r.add(e))),r.size?r:null},r=n(e);return{candidates:r?[...r]:[],impossible:t}}getQuote(){return this.isSingleQuote?`'`:`"`}evaluateTab1Symbol(e){return e.replace(/\$\{1:(.*)\}/,`$1`)}isParentCompletionItem(e){return`parent`in e}},KK=class{constructor(e,t,n){this.schemaService=e,this.yamlSettings=t,this.connection=n,this.connection?.onRequest(mi.getSchema,e=>this.getSchemas(e)),this.connection?.onRequest(mi.getAllSchemas,e=>this.getAllSchemas(e))}async getSchemas(e){let t=await this.getSchemasForFile(e);return Array.from(t).map(e=>({name:e[1].title,uri:e[0],description:e[1].description,versions:e[1].versions}))}async getSchemasForFile(e){let t=this.yamlSettings?.documents.get(e),n=/* @__PURE__ */ new Map;if(!t)return n;let r=Ph.getYamlDocument(t);for(let e of r.documents){let r=await this.schemaService.getSchemaDescriptionsForResource(t.uri,e);for(let e of r)n.set(e.uri,{url:e.uri,title:e.name,description:e.description,versions:e.versions})}return n}async getAllSchemas(e){let t=await this.getSchemasForFile(e),n=Array.from(t.entries()).map(e=>({uri:e[0],fromStore:!1,usedForCurrentFile:!0,name:e[1].title,description:e[1].description,versions:e[1].versions})),r=[],i=this.schemaService.getAllSchemas();return i=i.filter(e=>!t.has(e.uri)),r.push(...n),r.push(...i),r}};Dt();var qK=class{constructor(e){this.telemetry=e}getDefinition(e,t){try{let n=Ph.getYamlDocument(e),r=e.offsetAt(t.position),i=Fm(r,n);if(i){let[t]=i.getNodeFromPosition(r,new zh(e));if(t&&Nu(t)){let n=t.resolve(i.internalDocument);if(n&&n.range){let t=z.create(e.positionAt(n.range[0]),e.positionAt(n.range[2])),r=z.create(e.positionAt(n.range[0]),e.positionAt(n.range[1]));return[ae.create(e.uri,t,r)]}}}}catch(e){this.telemetry?.sendError(`yaml.definition.error`,e)}}};Dt();function JK(e,t){let n=Ph.getYamlDocument(e);return t.map(e=>{let t=r(e),n;for(let e of t)n=ot.create(e,n);return n??ot.create({start:e,end:e})});function r(t){let r=e.offsetAt(t),o=[];for(let s of n.documents){let n,c;for(s.visit(e=>{let o=e.offset+e.length;if(o<r||a(o-1,o)===`
|
|
1437
|
+
`&&o-1<r)return!0;let s=e.offset;if(s>r){let n=i(e,t);if(!n||n>r)return!0;s=n}return(!n||s>=n.offset)&&(n=e,c=s),!0});n;){let t=c??n.offset,i=n.offset+n.length,a={start:e.positionAt(t),end:e.positionAt(i)},s=YK(e.getText(a)),l=t+s.length;l>=r&&(a.end=e.positionAt(l));let u=(e,t)=>s.startsWith(e)&&s.endsWith(t||e);(n.type===`string`&&(u(`'`)||u(`"`))||n.type===`object`&&u(`{`,`}`)||n.type===`array`&&u(`[`,`]`))&&o.push({start:e.positionAt(t+1),end:e.positionAt(i-1)}),o.push(a),n=n.parent,c=void 0}if(o.length>0)break}return o.reverse()}function i(t,n){let r=e.positionAt(t.offset);if(r.line===n.line){if(t.parent?.type===`array`&&a(t.offset-2,t.offset)===`- `)return t.offset-2;if(t.type===`array`||t.type===`object`){let t={line:r.line,character:0};if(e.getText({start:t,end:r}).trim().length===0)return e.offsetAt(t)}}}function a(t,n){return e.getText({start:e.positionAt(t),end:e.positionAt(n)})}}function YK(e){return e.endsWith(`\r
|
|
1438
|
+
`)?e.substring(0,e.length-2):e.endsWith(`
|
|
1439
|
+
`)?e.substring(0,e.length-1):e}Dt();var XK=en(),ZK=class{constructor(e){this.telemetry=e}prepareRename(e,t){try{let n=this.findTarget(e,t.position);return!n||!this.findAnchorToken(n.yamlDoc,n.anchorNode)?null:this.getNameRange(e,n.token)}catch(e){return this.telemetry?.sendError(`yaml.prepareRename.error`,e),null}}doRename(e,t){try{let n=this.findTarget(e,t.position);if(!n)return null;let r=this.findAnchorToken(n.yamlDoc,n.anchorNode);if(!r)return null;let i=t.newName,a=this.findInvalidAnchorChar(i);if(a!==null)throw new XK.ResponseError(XK.ErrorCodes.InvalidParams,`Anchor name cannot contain '${a}'`);let o=[];return o.push(ge.replace(this.getNameRange(e,r),i)),Wu(n.yamlDoc.internalDocument,(t,r)=>{Nu(r)&&r.srcToken&&r.resolve(n.yamlDoc.internalDocument)===n.anchorNode&&o.push(ge.replace(this.getNameRange(e,r.srcToken),i))}),{changes:{[e.uri]:o}}}catch(e){if(e instanceof XK.ResponseError)throw e;return this.telemetry?.sendError(`yaml.rename.error`,e),null}}findTarget(e,t){let n=Ph.getYamlDocument(e),r=e.offsetAt(t),i=Fm(r,n);if(!i)return null;let[a]=i.getNodeFromPosition(r,new zh(e));if(!a)return this.findByToken(i,r);if(Nu(a)&&a.srcToken&&this.isOffsetInsideToken(a.srcToken,r)){let e=a.resolve(i.internalDocument);return e?{anchorNode:e,token:a.srcToken,yamlDoc:i}:null}if((Ru(a)||H(a))&&a.anchor){let e=this.findAnchorToken(i,a);if(e&&this.isOffsetInsideToken(e,r))return{anchorNode:a,token:e,yamlDoc:i}}return this.findByToken(i,r)}findByToken(e,t){let n;return Wu(e.internalDocument,(r,i)=>{if(Nu(i)&&i.srcToken&&this.isOffsetInsideToken(i.srcToken,t)){let t=i.resolve(e.internalDocument);if(t)return n={anchorNode:t,token:i.srcToken,yamlDoc:e},Wu.BREAK}if((Ru(i)||H(i))&&i.anchor){let r=this.findAnchorToken(e,i);if(r&&this.isOffsetInsideToken(r,t))return n={anchorNode:i,token:r,yamlDoc:e},Wu.BREAK}}),n??null}findAnchorToken(e,t){let n=e.getParent(t),r=[];n&&n.srcToken&&r.push(n.srcToken),t.srcToken&&r.push(t.srcToken);for(let e of r){let n=this.getAnchorFromToken(e,t);if(n)return n}}getAnchorFromToken(e,t){if(Ah(e))return this.getAnchorFromCollectionItem(e);if(Yp(e)){let n=e;for(let e of n.items??[]){if(e.value!==t.srcToken)continue;let n=this.getAnchorFromCollectionItem(e);if(n)return n}}}getAnchorFromCollectionItem(e){for(let t of e.start)if(t.type===`anchor`)return t;if(e.sep&&Array.isArray(e.sep)){for(let t of e.sep)if(t.type===`anchor`)return t}}getNameRange(e,t){let n=t.offset+1,r=t.offset+t.source.length;return z.create(e.positionAt(n),e.positionAt(r))}isOffsetInsideToken(e,t){return t>=e.offset&&t<=e.offset+e.source.length}findInvalidAnchorChar(e){for(let t of[`[`,`]`,`{`,`}`,`,`,` `,` `])if(e.includes(t))return t===` `?`space`:t===` `?`tab`:t;return null}},QK;(function(e){e[e.SchemaStore=1]=`SchemaStore`,e[e.SchemaAssociation=2]=`SchemaAssociation`,e[e.Settings=3]=`Settings`,e[e.SchemaDetectionDisabled=4]=`SchemaDetectionDisabled`})(QK||={});function $K(e){let t=new Sq(e.schemaRequestService,e.workspaceContext,null,e.yamlSettings),n=new GK(t,e.clientCapabilities,Ph,e.telemetry),r=new $h(t,e.telemetry),i=new qh(e.telemetry),a=new xg(t,e.telemetry),o=new SK,s=new PK(e.clientCapabilities),c=new RK(t,e.telemetry),l=new CK(e.telemetry),u=new qK(e.telemetry),d=new ZK(e.telemetry);return new KK(t,e.yamlSettings,e.connection),{configure:i=>{t.clearExternalSchemas(),i.schemas&&(t.schemaPriorityMapping=/* @__PURE__ */ new Map,i.schemas.forEach(e=>{let n=e.priority?e.priority:0;t.addSchemaPriority(e.uri,n),t.registerExternalSchema(e.uri,e.fileMatch,e.schema,e.name,e.description,e.versions)})),a.configure(i),r.configure(i),n.configure(i,e.yamlSettings),o.configure(i),s.configure(i,e?.yamlSettings?.yamlFormatterSettings?.printWidth||80)},registerCustomSchemaProvider:e=>{t.registerCustomSchemaProvider(e)},findLinks:l.findLinks.bind(l),doComplete:n.doComplete.bind(n),doValidation:a.doValidation.bind(a),doHover:r.doHover.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findHierarchicalDocumentSymbols.bind(i),doDefinition:u.getDefinition.bind(u),resetSchema:e=>t.onResourceChange(e),doFormat:o.format.bind(o),doDocumentOnTypeFormatting:LK,addSchema:(e,n)=>t.saveSchema(e,n),deleteSchema:e=>t.deleteSchema(e),modifySchemaContent:e=>t.addContent(e),deleteSchemaContent:e=>t.deleteContent(e),deleteSchemasWhole:e=>t.deleteSchemas(e),getFoldingRanges:AK,getSelectionRanges:JK,getCodeAction:(e,t)=>s.getCodeAction(e,t),getCodeLens:e=>c.getCodeLens(e),resolveCodeLens:e=>c.resolveCodeLens(e),prepareRename:(e,t)=>d.prepareRename(e,t),doRename:(e,t)=>d.doRename(e,t)}}function eq(e,t,n,r){let i=rq(e);if(!i||!i.group||!i.version||!i.kind)return;let a=tq(i,t,n);if(a)return a;let o=nq(i,r);if(o)return o}function tq(e,t,n){let{group:r,version:i,kind:a}=e,o=`io.k8s.api.${r.replace(`.k8s.io`,``).replace(`rbac.authorization`,`rbac`).toLowerCase()}.${i.toLowerCase()}.${a.toLowerCase()}`,s=(t.schema.oneOf||[]).map(e=>{if(typeof e!=`boolean`)return e._$ref||e.$ref}).find(e=>e?e.replace(`_definitions.json#/definitions/`,``).toLowerCase()===o:!1);if(s){let e=n.lastIndexOf(`/`),t=e===-1?null:n.substring(0,e+1);return t?t+s:void 0}}function nq(e,t){let{group:n,version:r,kind:i}=e;return`io.k8s.api.${n.replace(`.k8s.io`,``).replace(`rbac.authorization`,`rbac`).toLowerCase()}.${r.toLowerCase()}.${i.toLowerCase()}`.includes(`openshift.io`)?`${t}/openshift/v4.15-strict/${i.toLowerCase()}_${n.toLowerCase()}_${r.toLowerCase()}.json`:`${t}/${n.toLowerCase()}/${i.toLowerCase()}_${r.toLowerCase()}.json`}function rq(e){if(e instanceof Mh)try{let t=e.root.internalNode.toJSON();if(!t)return;let n=t.apiVersion;if(!n)return;let[r,i]=n.split(`/`);if(!r||!i)return;let a=t.kind;return a?{group:r,version:i,kind:a}:void 0}catch(e){console.error(`Error parsing YAML document:`,e);return}}Dt();const iq=new au.default({allErrors:!0}),aq=new nu.default({allErrors:!0}),oq=new ru.default({allErrors:!0}),sq=new iu.default({allErrors:!0}),cq=jq(iq),lq=jq(aq),uq=jq(oq),dq=jq(sq),fq=/* @__PURE__ */ new Map,pq=/* @__PURE__ */ new Map,mq=/* @__PURE__ */ new Map([[`zh-cn`,`zh`],[`zh-tw`,`zh-TW`]]),hq=/* @__PURE__ */ new Set(/* @__PURE__ */ `$ref._$ref.$schema.$id.id._baseUri._sourceUri._schemaDraft.$anchor.$dynamicAnchor.$dynamicRef.$recursiveAnchor.$recursiveRef.definitions.$defs.$comment.title.description.markdownDescription.$vocabulary.examples.default.url.closestTitle.unevaluatedProperties.unevaluatedItems`.split(`.`));var gq;(function(e){e[e.delete=0]=`delete`,e[e.add=1]=`add`,e[e.deleteAll=2]=`deleteAll`})(gq||={});var _q=class{constructor(e,t,n){this.folderUri=t,this.uris=n;try{let n=e.map(e=>{let t=e;return t[0]===`/`&&(t=t.substring(1)),`**/`+t}).filter(e=>e.length>0);this.isMatch=(0,Tu.default)(n,{bash:!0,noglobstar:!1}),t&&(t=wq(t),t.endsWith(`/`)||(t+=`/`),this.folderUri=t)}catch{this.isMatch=()=>!1,this.uris=[]}}matchesPattern(e){return this.folderUri&&!e.startsWith(this.folderUri)?!1:this.isMatch(e)}getURIs(){return this.uris}},vq=class{constructor(e,t,n){this.service=e,this.uri=t,this.dependencies={},this.anchors=void 0,n&&(this.unresolvedSchema=this.service.promise.resolve(new yq(n)))}getUnresolvedSchema(){return this.unresolvedSchema||=this.service.loadSchema(this.uri),this.unresolvedSchema}getResolvedSchema(){return this.resolvedSchema||=this.getUnresolvedSchema().then(e=>this.service.resolveSchemaContent(e,this.uri,this.dependencies)),this.resolvedSchema}clearSchema(){let e=!!this.unresolvedSchema;return this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={},this.anchors=void 0,e}},yq=class{constructor(e,t=[]){this.schema=e,this.errors=t}};function bq(e,t,n){return{message:e,code:t,relatedInformation:n?[{location:{uri:n,range:z.create(0,0,0,0)},message:e}]:void 0}}var xq=class{constructor(e,t=[],n=[],r){this.schema=e,this.errors=t,this.warnings=n,this.schemaDraft=r}getSection(e){let t=this.getSectionRecursive(e,this.schema);if(t)return qm(t)}getSectionRecursive(e,t){if(!t||typeof t==`boolean`||e.length===0)return t;let n=e.shift();if(t.properties&&typeof t.properties[n])return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties){for(let r of Object.keys(t.patternProperties))if(Oi(r)?.test(n))return this.getSectionRecursive(e,t.patternProperties[r])}else if(typeof t.additionalProperties==`object`)return this.getSectionRecursive(e,t.additionalProperties);else if(n.match(`[0-9]+`)){if(Array.isArray(t.items)){let r=parseInt(n,10);if(!isNaN(r)&&t.items[r])return this.getSectionRecursive(e,t.items[r])}else if(t.items)return this.getSectionRecursive(e,t.items)}}},Sq=class{constructor(e,t,n,r){this.schemaUriToNameAndDescription=/* @__PURE__ */ new Map,this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.customSchemaProvider=void 0,this.schemaPriorityMapping=/* @__PURE__ */ new Map,this.yamlSettings=r}registerCustomSchemaProvider(e){this.customSchemaProvider=e}getAllSchemas(){let e=[],t=/* @__PURE__ */ new Set;for(let n of this.filePatternAssociations){let r=n.uris[0];if(r===`vscode://schemas/empty`||t.has(r))continue;t.add(r);let i={uri:r,fromStore:!1,usedForCurrentFile:!1};if(this.schemaUriToNameAndDescription.has(r)){let{name:e,description:t,versions:n}=this.schemaUriToNameAndDescription.get(r);i.name=e,i.description=t,i.fromStore=!0,i.versions=n}e.push(i)}return e}collectSchemaNodes(e,...t){let n=t=>{if(t&&typeof t==`object`){if(Array.isArray(t)){for(let e of t)n(e);return}e(t)}};for(let e of t)n(e)}schemaMapValues(e){if(e&&typeof e==`object`)return Object.values(e)}resolveSchemaRef(e,t){if(!t.startsWith(`file:`)&&!t.startsWith(`http`)){let n=``;if(t.indexOf(`#`)>0){let e=t.split(`#`,2);t=e[0],n=e[1]}if(Nr.isAbsolute(t))t=Gr.file(t).toString();else{let n=Gr.parse(e);t=Gr.file(Nr.resolve(Nr.parse(n.fsPath).dir,t)).toString()}n.length>0&&(t+=`#`+n)}return t}resolveModelineSchema(e,t){let n=Gh(t);if(n!==void 0)return n.trim().toLowerCase()===`none`?`none`:this.resolveSchemaRef(e,n)}resolveDollarSchema(e,t){let n=Wh(t);if(n!==void 0)return this.resolveSchemaRef(e,n)}async getSchemaIdsForResource(e,t){let n=this.resolveModelineSchema(e,t);if(n)return n===`none`?[]:[n];let r=this.resolveDollarSchema(e,t);if(r)return[r];if(this.customSchemaProvider)try{let t=await this.customSchemaProvider(e);if(Array.isArray(t)){if(t.length>0)return t}else if(t)return[t]}catch{}let i=Object.create(null),a=[];for(let t of this.filePatternAssociations)if(t.matchesPattern(e))for(let e of t.getURIs())i[e]||(a.push(e),i[e]=!0);return a.length>0?this.highestPrioritySchemas(a):[]}async getSchemaDescriptionsForResource(e,t){let n=await this.getSchemaIdsForResource(e,t),r=[];for(let e of n){if(e===`vscode://schemas/empty`)continue;let t=this.schemaUriToNameAndDescription.get(e),n;if(!t)try{let t=await this.loadSchema(e);t.schema&&typeof t.schema==`object`&&(n=t.schema)}catch{}r.push({uri:e,name:t?.name??n?.title,description:t?.description??n?.description,versions:t?.versions??n?.versions})}return r}async resolveSchemaContent(e,t,n){let r=e.errors.slice(0),i=Cq(t),a=e.schema;if(a===null||Array.isArray(a)||typeof a!=`object`&&typeof a!=`boolean`){let e=a===null?`null`:Array.isArray(a)?`array`:typeof a;return r.push(bq(g(`Schema '{0}' is not valid: {1}`,i,`expected a JSON Schema object or boolean, got "${e}".`),Dm.SchemaResolveError,t)),new xq({},r)}let o=(e,t)=>{e&&typeof e==`object`&&t&&(e._sourceUri=t)},s=(e,t,n)=>{if(typeof e!=`object`||!e)return e;if(n){let r=n(e,t.size);if(r!==void 0)return r}if(t.has(e))return t.get(e);if(Array.isArray(e)){let r=[];t.set(e,r);for(let i of e)r.push(s(i,t,n));return r}let r={};t.set(e,r);for(let i in e)r[i]=s(e[i],t,n);return o(r,e._sourceUri),r},c=this.loadSchema.bind(this),l=this.yamlSettings?.locale;async function u(e,n){if(!e||typeof e!=`object`)return;let a=await Mq(e.$schema,c);a&&(e._schemaDraft=a);let o=Nq(a);if(!o)return;let u=e;n&&(u=s(e,/* @__PURE__ */ new Map,(e,t)=>{if(t!==0&&e&&typeof e==`object`&&e.$schema)return{}}));let d=!1;try{d=o(u)}catch(e){console.warn(g(`Schema '{0}' could not be fully validated: {1}`,i,e.message));return}if(!d){Aq(o.errors,l);let e=[];for(let t of o.errors)e.push(`${t.instancePath} : ${t.message}`);r.push(bq(g(`Schema '{0}' is not valid: {1}`,i,`\n${e.join(`
|
|
1440
|
+
`)}`),Dm.SchemaResolveError,t))}}let d=/* @__PURE__ */ new Map,f=e=>{let t=d.get(e);return t||(t={fragments:/* @__PURE__ */ new Map},d.set(e,t)),t},p=(e,t)=>{let n=d.get(t);if(!n||n.fragments.size===0)return e;let r=e;for(let[i,a]of n.fragments){if(!a.dynamic)continue;let n=r?.get(i)??[];n.some(e=>e._baseUri===t)||(r===e&&(r=e?new Map(e):/* @__PURE__ */ new Map),r.set(i,n.concat(a.node)))}return r},m=(e,t)=>this.contextService?this.contextService.resolveRelativePath(t,e):Eq(t),h=async(e,t)=>{let n=[{node:e,baseUri:t,sourceUri:t}],r=[],i=/* @__PURE__ */ new WeakMap,a=/* @__PURE__ */ new Set;for(;n.length;){let e=n.pop();if(!e)continue;let t=e.node;if(!t||typeof t!=`object`||a.has(t))continue;a.add(t);let s=e.baseUri;o(t,e.sourceUri);let c=t.$id||t.id;if(c){let e=m(s,c);t._baseUri=e;let n=e.indexOf(`#`);if(n!==-1&&n<e.length-1){let r=e.slice(n+1);f(s).fragments.set(r,{node:t})}else{s=e;let n=f(e);n.root||=t}}t.$anchor&&f(s).fragments.set(t.$anchor,{node:t}),t.$dynamicAnchor&&(t._baseUri=s,f(s).fragments.set(t.$dynamicAnchor,{node:t,dynamic:!0}));let l=[];i.set(t,l),this.collectSchemaNodes(t=>{l.push(t),n.push({node:t,baseUri:s,sourceUri:e.sourceUri})},t.not,t.if,t.then,t.else,t.contains,t.propertyNames,t.additionalProperties,t.items,t.additionalItems,t.prefixItems,this.schemaMapValues(t.properties),this.schemaMapValues(t.patternProperties),this.schemaMapValues(t.definitions),this.schemaMapValues(t.$defs),this.schemaMapValues(t.dependentSchemas),this.schemaMapValues(t.dependencies),t.allOf,t.anyOf,t.oneOf,t.schemaSequence),r.push(t)}let s=/* @__PURE__ */ new WeakMap;for(;r.length;){let t=r.pop(),n=!1;for(let e of i.get(t))if(e.$schema||s.get(e)){n=!0;break}s.set(t,n),(t===e||t.$schema)&&await u(t,n)}},_=a,v=e.uri??t;await h(_,v);let y=(e,t,n)=>{if(!t)return e;if(t[0]===`/`){let n=e,r=t.substring(1).split(`/`);for(let e of r)if(n=n?.[e.replace(/~1/g,`/`).replace(/~0/g,`~`)],n===null)return;return n}return f(n).fragments.get(t).node},b=(e,t,n,i,a=!1)=>{let c=y(t,i,n);if(typeof c==`boolean`){c||(e.not={});return}if(typeof c==`object`&&c){let t=a?s(c,/* @__PURE__ */ new Map):c;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n]);o(e,t._sourceUri);return}r.push(bq(g(`$ref '{0}' in '{1}' cannot be resolved.`,i,n),Dm.SchemaResolveError,n))},x=(e,t)=>{let n=m(e,t);if(!t.startsWith(`/`))return n;let r=d.get(e)?.root,i=r?.$id||r?.id;if(!i)return n;let a=m(e,i);return!a.startsWith(`http://`)&&!a.startsWith(`https://`)?n:m(a,t)},S=(e,t)=>{try{let n=Gr.parse(e),r=Gr.parse(t);if(n.scheme!==`file`||r.scheme!==`http`&&r.scheme!==`https`)return;let i=Nr.posix.basename(r.path);if(!i)return;let a=Nr.posix.dirname(n.path),o=Nr.posix.join(a,i);return n.with({path:o,query:r.query,fragment:r.fragment}).toString()}catch{return}},C=(e,t,n,i,a,o,s,c,l)=>{let u=(e,t,n,r,i,a,o,s,c)=>{i[n]=!0,b(e,t,n,r,!!c||!!s),(!s||!e._baseUri)&&(e._baseUri=n),e.url=n;let l=new Set(o);return l.add(n),w(e,t,n,a,l,s,c)},f=async(t,i=0)=>{let a=t[i],p=d.get(a)?.root;if(p)return u(e,p,a,n,o,o,s,c,l);let m=this.getOrAddSchemaHandle(a),_=await Promise.resolve(m.getUnresolvedSchema());if(_.errors?.some(e=>e.message.toLowerCase().includes(`unable to load schema from`))&&i+1<t.length)return f(t,i+1);if(_.errors.length){let e=_.errors[0],t=n?a+`#`+n:a;r.push(bq(g(`Problems loading reference '{0}': {1}`,t,e.message),e.code,a))}return await h(_.schema,a),await u(e,_.schema,a,n,o,m.dependencies,s,c,l)},p=x(i,t),m=d.get(p)?.root?void 0:S(a,p);return f(m&&m!==p?[m,p]:[p])},w=async(e,t,n,r,i,a,o)=>{if(!e||typeof e!=`object`)return null;let s=[{node:e,baseUri:n,sourceUri:e._sourceUri??n,recursiveAnchorBase:a,inheritedDynamicScope:o}],c=/* @__PURE__ */ new WeakSet,l=[],u=(e,n,a,o,c,u,f)=>{let h=p(u,n);this.collectSchemaNodes(e=>s.push({node:e,baseUri:n,sourceUri:a,recursiveAnchorBase:c,inheritedDynamicScope:h}),this.schemaMapValues(e.definitions||e.$defs));let g=e=>{for(let t of Object.keys(e))if(!hq.has(t))return!0;return!1},_=e=>{let t={};for(let n of Object.keys(e))hq.has(n)||(t[n]=e[n],delete e[n]);let n=e.$dynamicRef??e.$recursiveRef??e.$ref;typeof n==`string`&&(e.allOf=[{[e.$dynamicRef?`$dynamicRef`:e.$recursiveRef?`$recursiveRef`:`$ref`]:n},t],delete e.$dynamicRef,delete e.$recursiveRef,delete e.$ref)},v=e=>{for(let t of Object.keys(e))hq.has(t)||delete e[t]},y=/* @__PURE__ */ new Set,x=(t,n,r)=>{if(!i.has(n))return!1;if(!y.has(t)){let i=d.get(n)?.root;i&&typeof i==`object`&&b(e,i,n,r,!!c),y.add(t)}return!0};for(;e.$dynamicRef||e.$recursiveRef||e.$ref;){let u=typeof e.$dynamicRef==`string`,p=!u&&typeof e.$recursiveRef==`string`,S=e.$dynamicRef??e.$recursiveRef??e.$ref;if(typeof S!=`string`)break;e._$ref=S;let w=decodeURIComponent(S),T=w.split(`#`,2),E=T[0],D=T.length>1?T[1]:``,O=`${E?m(n,E):n}#${D}`;if(g(e)){if(o===Om.v4||o===Om.v7)v(e);else{if(f?.has(O))break;if(_(e),Array.isArray(e.allOf))for(let t=0;t<e.allOf.length;t++){let r=e.allOf[t];if(r&&typeof r==`object`){let e;t===0&&(e=new Set(f),e.add(O)),s.push({node:r,baseUri:n,sourceUri:a,recursiveAnchorBase:c,inheritedDynamicScope:h,siblingRefCycleKeys:e})}}return}}if(delete e.$dynamicRef,delete e.$recursiveRef,delete e.$ref,p&&(w===`#`||w===``)){let o=d.get(n)?.root?.$recursiveAnchor&&c?c:n;if(o.length>0){if(i?.has(o)||o===n){let n=d.get(o)?.root??t;y.has(w)||(b(e,n,o,``,!1),y.add(w));continue}l.push(C(e,o,``,n,a,r,i,c,h));return}continue}if(u){let t=E.length>0?m(n,E):n,o=d.get(t)?.fragments,s=D.length>0&&o?.get(D)?.dynamic,u=s?h?.get(D)?.[0]:void 0,f=u?u._baseUri:t;if(u&&(f===n||i.has(f))){y.has(w)||(b(e,u,f,``,!1),y.add(w));continue}if(E.length>0||s){if(x(w,f,D))continue;l.push(C(e,f,D,n,a,r,i,c,h));return}}else if(E.length>0){if(x(w,m(n,E),D))continue;l.push(C(e,E,D,n,a,r,i,c,h));return}y.has(w)||(b(e,t,n,D,u&&!!h),y.add(w))}this.collectSchemaNodes(t=>s.push({node:t,baseUri:e._baseUri||n,sourceUri:e._sourceUri||a,schemaDraft:o,recursiveAnchorBase:c,inheritedDynamicScope:h}),e.not,e.if,e.then,e.else,e.contains,e.propertyNames,e.additionalProperties,e.items,e.additionalItems,e.prefixItems,this.schemaMapValues(e.properties),this.schemaMapValues(e.patternProperties),this.schemaMapValues(e.dependentSchemas),this.schemaMapValues(e.dependencies),e.allOf,e.anyOf,e.oneOf,e.schemaSequence)};if(n.indexOf(`#`)>0){let e=n.split(`#`,2);if(e[0].length>0&&e[1].length>0){let t={};await C(t,e[0],e[1],n,_._sourceUri??n,r,i,a,o);for(let e in _)e!==`required`&&Object.prototype.hasOwnProperty.call(_,e)&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=_[e]);_=t}}for(;s.length;){let e=s.pop(),t=e.node,n=t._baseUri||e.baseUri,r=t._sourceUri||n,i=t._schemaDraft||e.schemaDraft,a=e.recursiveAnchorBase??(t.$recursiveAnchor?n:void 0);c.has(t)||(c.add(t),u(t,n,r,i,a,e.inheritedDynamicScope,e.siblingRefCycleKeys))}return Promise.all(l)},T=/* @__PURE__ */ new Set,E=_._baseUri||t;return E&&T.add(E),await w(_,_,t,n,T),new xq(_,r)}async getSchemaForResource(e,t){let n=async n=>{let r=this.createCombinedSchema(e,n),i=await Promise.resolve(r.getResolvedSchema());return this.finalizeResolvedSchema(i,r.uri,t,!1)},r=async()=>{let r=Object.create(null),i=[],a,o;for(let n of this.filePatternAssociations)if(n.matchesPattern(e)){for(let e of n.getURIs())if(!r[e]){if(this.yamlSettings?.kubernetesCRDStoreEnabled&&hg(e)){a||=(o=e,await this.getResolvedSchema(e));let n=eq(t,a,o??e,this.yamlSettings.kubernetesCRDStoreUrl??`https://raw.githubusercontent.com/datreeio/CRDs-catalog/main`);n?(i.push(n),r[e]=!0):(i.push(e),r[e]=!0)}else i.push(e),r[e]=!0}}if(i.length>0){let e=this.highestPrioritySchemas(i);return n(e)}return Promise.resolve(null)},i=this.resolveModelineSchema(e,t);if(i)return i===`none`?Promise.resolve(null):n([i]);let a=this.resolveDollarSchema(e,t);if(a)return n([a]);if(this.customSchemaProvider)try{let n=await this.customSchemaProvider(e);if(Array.isArray(n)){if(n.length===0)return r();let e=await Promise.all(n.map(e=>this.resolveCustomSchema(e,t))),i=e.flatMap(e=>e.errors??[]),a=e.flatMap(e=>e.warnings??[]),o=e.find(e=>e.schemaDraft)?.schemaDraft;return new xq({allOf:e.map(e=>e.schema)},i,a,o)}return n?this.resolveCustomSchema(n,t):r()}catch{return r()}return r()}finalizeResolvedSchema(e,t,n,r){if(e.schema&&typeof e.schema==`object`&&(e.schema.url=t,e.schema.schemaSequence&&e.schema.schemaSequence[n.currentDocIndex])){let t=e.schema.schemaSequence[n.currentDocIndex];return r?new xq(t,e.errors,e.warnings,e.schemaDraft):new xq(t,[],[],e.schemaDraft)}return e}addSchemaPriority(e,t){let n=this.schemaPriorityMapping.get(e);n?(n=n.add(t),this.schemaPriorityMapping.set(e,n)):this.schemaPriorityMapping.set(e,(/* @__PURE__ */ new Set()).add(t))}highestPrioritySchemas(e){let t=0,n=/* @__PURE__ */ new Map;return e.forEach(e=>{(this.schemaPriorityMapping.get(e)||[0]).forEach(r=>{r>t&&(t=r);let i=n.get(r);i?(i=i.concat(e),n.set(r,i)):n.set(r,[e])})}),n.get(t)||[]}async resolveCustomSchema(e,t){let n=await this.loadSchema(e),r=await this.resolveSchemaContent(n,e,{});return this.finalizeResolvedSchema(r,e,t,!0)}async saveSchema(e,t){let n=Eq(e);return this.getOrAddSchemaHandle(n,t),this.schemaPriorityMapping.set(n,(/* @__PURE__ */ new Set()).add(QK.Settings)),Promise.resolve(void 0)}async deleteSchemas(e){return e.schemas.forEach(e=>{this.deleteSchema(e)}),Promise.resolve(void 0)}async deleteSchema(e){let t=Eq(e);return this.schemasById[t]&&delete this.schemasById[t],this.schemaPriorityMapping.delete(t),Promise.resolve(void 0)}async addContent(e){let t=await this.getResolvedSchema(e.schema);if(t){let n=this.resolveJSONSchemaToSection(t.schema,e.path);typeof n==`object`&&(n[e.key]=e.content),await this.saveSchema(e.schema,t.schema)}}async deleteContent(e){let t=await this.getResolvedSchema(e.schema);if(t){let n=this.resolveJSONSchemaToSection(t.schema,e.path);typeof n==`object`&&delete n[e.key],await this.saveSchema(e.schema,t.schema)}}resolveJSONSchemaToSection(e,t){let n=t.split(`/`),r=e;for(let e of n)e!==``&&(this.resolveNext(r,e),r=r[e]);return r}resolveNext(e,t){if(Array.isArray(e)&&isNaN(t))throw Error(`Expected a number after the array object`);if(typeof e==`object`&&typeof t!=`string`)throw Error(`Expected a string after the object`)}get promise(){return this.promiseConstructor}dispose(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()}addSchemaHandle(e,t){let n=new vq(this,e,t);return this.schemasById[e]=n,n}getOrAddSchemaHandle(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)}addFilePatternAssociation(e,t,n){let r=new _q(e,t,n);return this.filePatternAssociations.push(r),r}createCombinedSchema(e,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);let n=`schemaservice://combinedSchema/`+encodeURIComponent(e),r={allOf:t.map(e=>({$ref:e}))};return this.addSchemaHandle(n,r)}getAssociatedSchemas(e){let t=Object.create(null),n=[],r=wq(e);for(let e of this.filePatternAssociations)if(e.matchesPattern(r))for(let r of e.getURIs())t[r]||(n.push(r),t[r]=!0);return n}getSchemaURIsForResource(e,t){if(t){let n=this.resolveModelineSchema(e,t);if(n)return n===`none`?[]:[n];let r=this.resolveDollarSchema(e,t);if(r)return[r]}return this.getAssociatedSchemas(e)}async loadJSONSchema(e){if(!this.requestService)return new yq({},[bq(g(`Unable to load schema from '{0}'. No schema request service available`,Cq(e)),Dm.SchemaResolveError,e)]);try{let t=await this.requestService(e);if(!t)return new yq({},[bq(g(`Unable to load schema from '{0}': No content.`,Cq(e)),Dm.SchemaResolveError,e)]);let n=[];t.charCodeAt(0)===65279&&(n.push(bq(g(`Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.`,Cq(e)),Dm.SchemaResolveError,e)),t=t.trimStart());let r={},i=[];return r=_u(t,i),i.length&&n.push(bq(g(`Unable to parse content from '{0}': Parse error at offset {1}.`,Cq(e),i[0].offset),Dm.SchemaResolveError,e)),new yq(r,n)}catch(t){let n=typeof t.message==`string`?t.message:t.toString(),{code:r}=t,i=n.split(`Error: `);i.length>1&&(n=i[1]),n.endsWith(`.`)&&(n=n.slice(0,-1));let a=Dm.SchemaResolveError+(typeof r==`number`&&r<65536?r:0);return new yq({},[bq(g(`Unable to load schema from '{0}': {1}.`,Cq(e),n),a,e)])}}async loadSchema(e){let t=this.requestService,n=await this.loadJSONSchema(e);if(n.errors&&(n.schema===void 0||typeof n.schema==`number`))try{let r=await t(e);if(!r)return new yq({},[bq(g(`Unable to load schema from '{0}': No content. {1}`,Cq(e),n.errors.map(e=>e.message).join(`, `)),Dm.SchemaResolveError,e)]);try{return new yq(hm(r),[])}catch(t){return new yq({},[bq(g(`Unable to parse content from '{0}': {1}.`,Cq(e),t),Dm.SchemaResolveError,e)])}}catch(t){let n=t.toString(),r=t.toString().split(`Error: `);return r.length>1&&(n=r[1]),new yq({},[bq(n,Dm.SchemaResolveError,e)])}if(n.uri=e,this.schemaUriToNameAndDescription.has(e)){let{name:t,description:r,versions:i}=this.schemaUriToNameAndDescription.get(e);n.schema.title=t??n.schema.title,n.schema.description=r??n.schema.description,n.schema.versions=i??n.schema.versions}else if(n.errors&&n.errors.length>0){let r=n.errors[0],i=r.message;if(i.toLowerCase().indexOf(`load`)!==-1)i=g(`Unable to load schema from '{0}': No content.`,Cq(e));else if(i.toLowerCase().indexOf(`parse`)!==-1){let n=await t(e),r=[],a=_u(n,r);if(r.length&&a){let{offset:t}=r[0],{line:a,column:o}=Tq(n,t);i=g(`Unable to parse content from '{0}': Parse error at line: {1} column: {2}`,Cq(e),a,o)}}return new yq({},[bq(i,r.code,e)])}return n}registerExternalSchema(e,t,n,r,i,a){(r||i)&&this.schemaUriToNameAndDescription.set(e,{name:r,description:i,versions:a});let o={uri:e,fileMatch:t,schema:n},s=Eq(o.uri);return this.registeredSchemasIds[s]=!0,o.fileMatch&&o.fileMatch.length&&this.addFilePatternAssociation(o.fileMatch,o.folderUri,[s]),o.schema?this.addSchemaHandle(s,o.schema):this.getOrAddSchemaHandle(s)}clearExternalSchemas(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(let e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(let e of this.contributionAssociations)this.filePatternAssociations.push(e)}setSchemaContributions(e){if(e.schemas){let t=e.schemas;for(let e in t){let n=Eq(e);this.contributionSchemas[n]=this.addSchemaHandle(n,t[e])}}if(Array.isArray(e.schemaAssociations)){let t=e.schemaAssociations;for(let e of t){let t=e.uris.map(Eq),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{let n=Gr.parse(t).scheme;return n!==`schemaservice`&&(!e||e(n))})}getResolvedSchema(e){let t=Eq(e),n=this.schemasById[t];return n?Promise.resolve(n.getResolvedSchema()):Promise.resolve(void 0)}onResourceChange(e){this.cachedSchemaForResource=void 0;let t=!1;e=Eq(e);let n=[e],r=Object.keys(this.schemasById).map(e=>this.schemasById[e]);for(;n.length;){let e=n.pop();for(let i=0;i<r.length;i++){let a=r[i];a&&(a.uri===e||a.dependencies[e])&&(a.uri!==e&&n.push(a.uri),a.clearSchema()&&(t=!0),r[i]=void 0)}}return t}};function Cq(e){try{let t=Gr.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}function wq(e){try{return Gr.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function Tq(e,t){let n=e.slice(0,t).split(/\r?\n/);return{line:n.length,column:n[n.length-1].length+1}}function Eq(e){e.startsWith(`http://json-schema.org/`)&&(e=`https://json-schema.org/`+e.substring(23));try{return Gr.parse(e).toString(!0)}catch{return e}}function Dq(e){if(!e)return``;let t;t=typeof e==`string`?e:e.$id||e.id||``,t=t.trim();let n=t.indexOf(`#`);return t=n===-1?t:t.slice(0,n),Eq(t).replace(/\/+$/g,``)}function Oq(e){if(e===Dq(iq.defaultMeta()))return Om.v4;if(e===Dq(aq.defaultMeta()))return Om.v7;if(e===Dq(oq.defaultMeta()))return Om.v2019_09;if(e===Dq(sq.defaultMeta()))return Om.v2020_12}function kq(e){if(!e)return;let t=e.trim().toLowerCase(),n=mq.get(t);return ou[e]||ou[t]||(n?ou[n]:void 0)}function Aq(e,t){(kq(t)||ou.default.en)(e)}function jq(e){let t=e.defaultMeta(),n=e.getSchema(t);if(n)return n;throw Error(`Unable to resolve default JSON meta-schema validator`)}async function Mq(e,t){if(!e)return;let n=Dq(e||``),r=Oq(n);if(r)return r;if(fq.has(n))return fq.get(n);let i=pq.get(n);if(i)return i;if(!t)return;let a=(async()=>{let e=await t(n);if(e.errors?.length)return;let r=e.schema;if(!r||typeof r!=`object`)return;let i=Oq(r.$schema);if(i)return i})();pq.set(n,a);try{let e=await a;return fq.set(n,e),e}finally{pq.delete(n)}}function Nq(e){switch(e){case Om.v4:return cq;case Om.v7:return lq;case Om.v2019_09:return uq;case Om.v2020_12:return dq;default:return}}var Pq=class{constructor(e,t){this.connection=e,this.languageService=t}registerHandlers(){this.connection.onRequest(pi.type,e=>this.registerSchemaModificationNotificationHandler(e))}registerSchemaModificationNotificationHandler(e){e.action===gq.add?this.languageService.modifySchemaContent(e):e.action===gq.delete?this.languageService.deleteSchemaContent(e):e.action===gq.deleteAll&&this.languageService.deleteSchemasWhole(e)}},Fq=class{constructor(e,t,n,r,i){this.connection=e,this.languageService=t,this.yamlSettings=n,this.validationHandler=r,this.telemetry=i}async registerHandlers(){if(this.yamlSettings.hasConfigurationCapability&&this.yamlSettings.clientDynamicRegisterSupport)try{await this.connection.client.register(En.DidChangeConfigurationNotification.type)}catch(e){this.telemetry.sendError(`yaml.settings.error`,e)}this.connection.onDidChangeConfiguration(()=>this.pullConfiguration())}pullConfiguration(){let e=this.doPullConfiguration();return this.yamlSettings.configurationPullPromise=e.catch(()=>void 0),e}async doPullConfiguration(){let e=await this.connection.workspace.getConfiguration([{section:`yaml`},{section:`http`},{section:`[yaml]`},{section:`editor`},{section:`files`}]),t={yaml:e[0],http:{proxy:e[1]?.proxy??``,proxyStrictSSL:e[1]?.proxyStrictSSL??!1},yamlEditor:e[2],vscodeEditor:e[3],files:e[4]};await this.setConfiguration(t)}async setConfiguration(e){if((0,Pr.configure)(e.http&&e.http.proxy,e.http&&e.http.proxyStrictSSL),this.yamlSettings.specificValidatorPaths=[],e.yaml){if(Object.prototype.hasOwnProperty.call(e.yaml,`schemas`)&&(this.yamlSettings.yamlConfigurationSettings=e.yaml.schemas),Object.prototype.hasOwnProperty.call(e.yaml,`validate`)&&(this.yamlSettings.yamlShouldValidate=e.yaml.validate),Object.prototype.hasOwnProperty.call(e.yaml,`hover`)&&(this.yamlSettings.yamlShouldHover=e.yaml.hover),Object.prototype.hasOwnProperty.call(e.yaml,`hoverAnchor`)&&(this.yamlSettings.yamlShouldHoverAnchor=e.yaml.hoverAnchor),Object.prototype.hasOwnProperty.call(e.yaml,`completion`)&&(this.yamlSettings.yamlShouldCompletion=e.yaml.completion),Object.prototype.hasOwnProperty.call(e.yaml,`hoverSchemaSource`)&&(this.yamlSettings.yamlHoverSchemaSource=e.yaml.hoverSchemaSource),Object.prototype.hasOwnProperty.call(e.yaml,`kubernetesVersion`)){let t=typeof e.yaml.kubernetesVersion==`string`?/^v?(\d+)\.(\d+)\.(\d+)$/i.exec(e.yaml.kubernetesVersion.trim()):void 0;this.yamlSettings.kubernetesVersion=t?`v${t[1]}.${t[2]}.${t[3]}`:void 0}if(this.yamlSettings.yamlDisableSchemaDetection=Array.isArray(e.yaml.disableSchemaDetection)?e.yaml.disableSchemaDetection:e.yaml.disableSchemaDetection?[e.yaml.disableSchemaDetection]:[],this.yamlSettings.customTags=e.yaml.customTags?e.yaml.customTags:[],this.yamlSettings.maxItemsComputed=Math.trunc(Math.max(0,Number(e.yaml.maxItemsComputed)))||5e3,e.yaml.schemaStore&&(this.yamlSettings.schemaStoreEnabled=e.yaml.schemaStore.enable,e.yaml.schemaStore.url&&(this.yamlSettings.schemaStoreUrl=e.yaml.schemaStore.url)),e.yaml.kubernetesCRDStore&&(this.yamlSettings.kubernetesCRDStoreEnabled=e.yaml.kubernetesCRDStore.enable,e.yaml.kubernetesCRDStore.url?.length!==0&&(this.yamlSettings.kubernetesCRDStoreUrl=e.yaml.kubernetesCRDStore.url)),e.files?.associations)for(let[t,n]of Object.entries(e.files.associations))n===`yaml`&&this.yamlSettings.fileExtensions.push(t);this.yamlSettings.yamlVersion=e.yaml.yamlVersion??`1.2`,e.yaml.format&&(this.yamlSettings.yamlFormatterSettings={proseWrap:e.yaml.format.proseWrap||`preserve`,printWidth:e.yaml.format.printWidth||80},e.yaml.format.singleQuote!==void 0&&(this.yamlSettings.yamlFormatterSettings.singleQuote=e.yaml.format.singleQuote),e.yaml.format.bracketSpacing!==void 0&&(this.yamlSettings.yamlFormatterSettings.bracketSpacing=e.yaml.format.bracketSpacing),e.yaml.format.trailingComma!==void 0&&(this.yamlSettings.yamlFormatterSettings.trailingComma=e.yaml.format.trailingComma),e.yaml.format.enable!==void 0&&(this.yamlSettings.yamlFormatterSettings.enable=e.yaml.format.enable)),this.yamlSettings.disableAdditionalProperties=e.yaml.disableAdditionalProperties,this.yamlSettings.disableDefaultProperties=e.yaml.disableDefaultProperties,e.yaml.suggest&&(this.yamlSettings.suggest.parentSkeletonSelectedFirst=e.yaml.suggest.parentSkeletonSelectedFirst),this.yamlSettings.style={flowMapping:e.yaml.style?.flowMapping??`allow`,flowSequence:e.yaml.style?.flowSequence??`allow`},this.yamlSettings.keyOrdering=e.yaml.keyOrdering??!1}this.yamlSettings.schemaConfigurationSettings=[];let t=2;e.vscodeEditor&&(t=!e.vscodeEditor.detectIndentation&&e.yamlEditor?e.yamlEditor[`editor.tabSize`]:t),e.yamlEditor&&e.yamlEditor[`editor.tabSize`]&&(this.yamlSettings.indentation=` `.repeat(t));for(let e in this.yamlSettings.yamlConfigurationSettings){let t=this.yamlSettings.yamlConfigurationSettings[e],n={fileMatch:Array.isArray(t)?t:[t],uri:e};this.yamlSettings.schemaConfigurationSettings.push(n)}await this.setSchemaStoreSettingsIfNotSet(),this.updateConfiguration(),this.yamlSettings.useSchemaSelectionRequests&&this.connection.sendNotification(mi.schemaStoreInitialized,{}),this.yamlSettings.clientDynamicRegisterSupport&&(e&&e.yaml&&e.yaml.format&&e.yaml.format.enable?this.yamlSettings.formatterRegistration||(this.yamlSettings.formatterRegistration=this.connection.client.register(En.DocumentFormattingRequest.type,{documentSelector:[{language:`yaml`},{language:`yaml-textmate`},{language:`yaml-tmlanguage`},{language:`ansible`},{language:`azure-pipelines`},{language:`dockercompose`},{language:`github-actions-workflow`},{language:`home-assistant`},{language:`manifest-yaml`},{language:`spring-boot-properties-yaml`}]})):this.yamlSettings.formatterRegistration&&(this.yamlSettings.formatterRegistration.then(e=>e.dispose()),this.yamlSettings.formatterRegistration=null))}async setSchemaStoreSettingsIfNotSet(){let e=this.yamlSettings.schemaStoreSettings.length!==0,t=this.yamlSettings.schemaStoreUrl||`https://www.schemastore.org/api/json/catalog.json`;if(this.yamlSettings.schemaStoreEnabled&&!e)try{let e=await this.getSchemaStoreMatchingSchemas(t);this.yamlSettings.schemaStoreSettings=e.schemas}catch{}else this.yamlSettings.schemaStoreEnabled||(this.yamlSettings.schemaStoreSettings=[])}async getSchemaStoreMatchingSchemas(e){let t=await(0,Pr.xhr)({url:e}),n={schemas:[]},r=JSON.parse(t.responseText);for(let e in r.schemas){let t=r.schemas[e];if(!t.url)continue;let i=t.fileMatch??[];if(i.length===0)n.schemas.push({uri:t.url,fileMatch:[],priority:QK.SchemaStore,name:t.name,description:t.description,versions:t.versions});else for(let e of i)this.yamlSettings.fileExtensions.findIndex(t=>e.indexOf(t)>-1)>-1&&n.schemas.push({uri:t.url,fileMatch:[e],priority:QK.SchemaStore,name:t.name,description:t.description,versions:t.versions})}return n}updateConfiguration(){let e={validate:this.yamlSettings.yamlShouldValidate,hover:this.yamlSettings.yamlShouldHover,hoverAnchor:this.yamlSettings.yamlShouldHoverAnchor,completion:this.yamlSettings.yamlShouldCompletion,schemas:[],customTags:this.yamlSettings.customTags,format:this.yamlSettings.yamlFormatterSettings.enable,indentation:this.yamlSettings.indentation,disableAdditionalProperties:this.yamlSettings.disableAdditionalProperties,disableDefaultProperties:this.yamlSettings.disableDefaultProperties,parentSkeletonSelectedFirst:this.yamlSettings.suggest.parentSkeletonSelectedFirst,flowMapping:this.yamlSettings.style?.flowMapping,flowSequence:this.yamlSettings.style?.flowSequence,yamlVersion:this.yamlSettings.yamlVersion,keyOrdering:this.yamlSettings.keyOrdering,hoverSchemaSource:this.yamlSettings.yamlHoverSchemaSource};if(this.yamlSettings.yamlDisableSchemaDetection&&Array.isArray(this.yamlSettings.yamlDisableSchemaDetection)&&(e=this.configureSchemas(`vscode://schemas/empty`,this.yamlSettings.yamlDisableSchemaDetection,!0,e,QK.SchemaDetectionDisabled)),this.yamlSettings.schemaAssociations){if(Array.isArray(this.yamlSettings.schemaAssociations))this.yamlSettings.schemaAssociations.forEach(t=>{e=this.configureSchemas(t.uri,t.fileMatch,t.schema,e,QK.SchemaAssociation)});else for(let t in this.yamlSettings.schemaAssociations){let n=this.yamlSettings.schemaAssociations[t];e=this.configureSchemas(t,n,null,e,QK.SchemaAssociation)}}this.yamlSettings.schemaConfigurationSettings&&this.yamlSettings.schemaConfigurationSettings.forEach(t=>{let n=t.uri;!n&&t.schema&&(n=t.schema.id),!n&&t.fileMatch&&(n=`vscode://schemas/custom/`+encodeURIComponent(t.fileMatch.join(`&`))),n&&(hi(n)&&(n=gi(this.yamlSettings.workspaceFolders,this.yamlSettings.workspaceRoot,n)),e=this.configureSchemas(n,t.fileMatch,t.schema,e,QK.Settings))}),this.yamlSettings.schemaStoreSettings&&(e.schemas=e.schemas.concat(this.yamlSettings.schemaStoreSettings)),this.languageService.configure(e);let t=this.schemaSettings!==void 0&&!kn(this.schemaSettings,e.schemas);this.schemaSettings=e.schemas,t&&this.refreshCodeLens(),this.yamlSettings.documents.all().forEach(e=>this.validationHandler.validate(e))}refreshCodeLens(){this.yamlSettings.hasCodeLensRefreshSupport&&this.connection.sendRequest(XK.CodeLensRefreshRequest.type).catch(e=>this.telemetry.sendError(`yaml.codeLens.refresh.error`,e))}configureSchemas(e,t,n,r,i){return e=gg(this.yamlSettings.workspaceFolders,this.yamlSettings.workspaceRoot,e,this.telemetry,this.yamlSettings.kubernetesVersion),n===null?r.schemas.push({uri:e,fileMatch:t,priority:i}):r.schemas.push({uri:e,fileMatch:t,schema:n,priority:i}),hg(e)&&(Array.isArray(t)?t.forEach(e=>{this.yamlSettings.specificValidatorPaths.push(e)}):this.yamlSettings.specificValidatorPaths.push(t)),r}},Iq=class{constructor(e,t,n){this.connection=e,this.languageService=t,this.yamlSettings=n,this.yamlSettings.documents.onDidChangeContent(e=>{this.validate(e.document)}),this.yamlSettings.documents.onDidClose(e=>{this.cleanPendingValidation(e.document),this.connection.sendDiagnostics({uri:e.document.uri,diagnostics:[]})})}validate(e){this.cleanPendingValidation(e),this.yamlSettings.pendingValidationRequests[e.uri]=setTimeout(()=>{delete this.yamlSettings.pendingValidationRequests[e.uri],this.validateTextDocument(e)},this.yamlSettings.validationDelayMs)}cleanPendingValidation(e){let t=this.yamlSettings.pendingValidationRequests[e.uri];t&&(clearTimeout(t),delete this.yamlSettings.pendingValidationRequests[e.uri])}async validateTextDocument(e){if(!e)return;if(!await this.resolveValidationState(e))return this.connection.sendDiagnostics({uri:e.uri,diagnostics:[]}),[];let t=await this.languageService.doValidation(e,ji(e,this.yamlSettings.specificValidatorPaths)),n=[];for(let e of t)e.severity===2&&(e.severity=1),n.push(e);let r=Pm(n);return this.connection.sendDiagnostics({uri:e.uri,diagnostics:r}),r}async resolveValidationState(e){if(this.yamlSettings.hasConfigurationCapability&&this.connection.workspace?.getConfiguration)try{let t=await this.connection.workspace.getConfiguration({section:`[${e.languageId}]`,scopeUri:e.uri});if(typeof t?.[`yaml.validate`]==`boolean`)return t[`yaml.validate`]}catch{}return this.yamlSettings.yamlShouldValidate}},Lq=class{constructor(e,t){this.connection=e,this.commandExecutor=t}registerHandlers(){this.connection.onExecuteCommand(e=>this.executeCommand(e))}executeCommand(e){return this.commandExecutor.executeCommand(e)}};function Rq(e,t){e.registerCommand(xi.JUMP_TO_SCHEMA,async e=>{if(!e)return;let n=await t.workspace.getWorkspaceFolders();if(e.indexOf(`:`)<0&&!e.startsWith(`/`)){if(n.length===1){let t=Gr.parse(n[0].uri);e=t.with({path:t.path+e}).toString()}}else if(e.startsWith(`file://`)&&n.length===1&&Gr.parse(n[0].uri).scheme!=`file`){let t=Gr.parse(n[0].uri),r=Gr.parse(e).path;e=t.with({path:r}).toString()}else if(!e.startsWith(`file`)&&!e.startsWith(`/`)&&!/^[a-z]:[\\/]/i.test(e)){let t=Gr.parse(e);e=Gr.from({scheme:`json-schema`,authority:t.authority,path:t.path.endsWith(`.json`)?t.path:t.path+`.json`,fragment:e}).toString()}(e.startsWith(`/`)||/^[a-z]:[\\/]/i.test(e))&&(e=Gr.file(e).toString()),await t.window.showDocument({uri:e,external:!1,takeFocus:!0})||t.window.showErrorMessage(`Cannot open ${e}`)})}var zq=class{constructor(e,t,n,r,i,a=()=>Promise.resolve()){this.connection=e,this.yamlSettings=t,this.workspaceContext=n,this.schemaRequestService=r,this.telemetry=i,this.setupl10nBundle=a,this.yamlSettings.documents.listen(this.connection),this.connection.onInitialize(async e=>this.connectionInitialized(e)),this.connection.onInitialized(()=>{this.yamlSettings.hasWsChangeWatchedFileDynamicRegistration&&this.connection.workspace.onDidChangeWorkspaceFolders(e=>{this.yamlSettings.workspaceFolders=_i(this.yamlSettings.workspaceFolders,e)}),this.settingsHandler.registerHandlers(),this.settingsHandler.pullConfiguration()})}async connectionInitialized(e){return this.yamlSettings.locale=e.locale||`en`,this.yamlSettings.capabilities=e.capabilities,this.languageService=$K({schemaRequestService:this.schemaRequestService,workspaceContext:this.workspaceContext,connection:this.connection,yamlSettings:this.yamlSettings,telemetry:this.telemetry,clientCapabilities:e.capabilities}),e.rootUri&&(this.yamlSettings.workspaceRoot=Gr.parse(e.rootUri)),this.yamlSettings.workspaceFolders=e.workspaceFolders||[],this.yamlSettings.hierarchicalDocumentSymbolSupport=!!(this.yamlSettings.capabilities.textDocument&&this.yamlSettings.capabilities.textDocument.documentSymbol&&this.yamlSettings.capabilities.textDocument.documentSymbol.hierarchicalDocumentSymbolSupport),this.yamlSettings.clientDynamicRegisterSupport=!!(this.yamlSettings.capabilities.textDocument&&this.yamlSettings.capabilities.textDocument.formatting&&this.yamlSettings.capabilities.textDocument.formatting.dynamicRegistration),this.yamlSettings.hasWorkspaceFolderCapability=this.yamlSettings.capabilities.workspace&&!!this.yamlSettings.capabilities.workspace.workspaceFolders,this.yamlSettings.hasConfigurationCapability=!!(this.yamlSettings.capabilities.workspace&&this.yamlSettings.capabilities.workspace.configuration),this.yamlSettings.hasCodeLensRefreshSupport=!!this.yamlSettings.capabilities.workspace?.codeLens?.refreshSupport,this.yamlSettings.hasWsChangeWatchedFileDynamicRegistration=!!(this.yamlSettings.capabilities.workspace&&this.yamlSettings.capabilities.workspace.didChangeWatchedFiles&&this.yamlSettings.capabilities.workspace.didChangeWatchedFiles.dynamicRegistration),this.registerHandlers(),Rq(Si,this.connection),await this.setupl10nBundle(e),{serverInfo:{name:`yaml-language-server`,version:`1.24.0`},capabilities:{textDocumentSync:En.TextDocumentSyncKind.Incremental,completionProvider:{resolveProvider:!1},hoverProvider:!0,documentSymbolProvider:!0,documentFormattingProvider:!this.yamlSettings.clientDynamicRegisterSupport,documentOnTypeFormattingProvider:{firstTriggerCharacter:`
|
|
1441
|
+
`},documentRangeFormattingProvider:!1,definitionProvider:!0,renameProvider:{prepareProvider:!0},documentLinkProvider:{},foldingRangeProvider:!0,selectionRangeProvider:!0,codeActionProvider:!0,codeLensProvider:{resolveProvider:!1},executeCommandProvider:{commands:Object.keys(xi).map(e=>xi[e])},workspace:{workspaceFolders:{changeNotifications:!0,supported:!0}}}}}registerHandlers(){this.validationHandler=new Iq(this.connection,this.languageService,this.yamlSettings),this.settingsHandler=new Fq(this.connection,this.languageService,this.yamlSettings,this.validationHandler,this.telemetry),this.languageHandler=new Mi(this.connection,this.languageService,this.yamlSettings,this.validationHandler),this.languageHandler.registerHandlers(),new Ni(this.connection,this.languageService,this.yamlSettings,this.settingsHandler).registerHandlers(),new Pq(this.connection,this.languageService).registerHandlers(),new Lq(this.connection,Si).registerHandlers()}start(){this.connection.listen()}},Bq=class{constructor(){this.yamlConfigurationSettings=void 0,this.schemaAssociations=void 0,this.formatterRegistration=null,this.specificValidatorPaths=[],this.schemaConfigurationSettings=[],this.yamlShouldValidate=!0,this.yamlFormatterSettings={singleQuote:!1,bracketSpacing:!0,proseWrap:`preserve`,printWidth:80,trailingComma:!0,enable:!0},this.yamlShouldHover=!0,this.yamlShouldHoverAnchor=!0,this.yamlShouldCompletion=!0,this.yamlHoverSchemaSource=!0,this.yamlDisableSchemaDetection=[],this.schemaStoreSettings=[],this.customTags=[],this.schemaStoreEnabled=!0,this.schemaStoreUrl=`https://www.schemastore.org/api/json/catalog.json`,this.kubernetesCRDStoreEnabled=!0,this.kubernetesCRDStoreUrl=`https://raw.githubusercontent.com/datreeio/CRDs-catalog/main`,this.kubernetesVersion=void 0,this.indentation=void 0,this.disableAdditionalProperties=!1,this.disableDefaultProperties=!1,this.suggest={parentSkeletonSelectedFirst:!1},this.keyOrdering=!1,this.maxItemsComputed=5e3,this.pendingValidationRequests={},this.validationDelayMs=200,this.documents=new En.TextDocuments(xm),this.workspaceRoot=null,this.workspaceFolders=[],this.clientDynamicRegisterSupport=!1,this.hierarchicalDocumentSymbolSupport=!1,this.hasWorkspaceFolderCapability=!1,this.hasConfigurationCapability=!1,this.hasCodeLensRefreshSupport=!1,this.configurationPullPromise=Promise.resolve(),this.useVSCodeContentRequest=!1,this.yamlVersion=`1.2`,this.useSchemaSelectionRequests=!1,this.hasWsChangeWatchedFileDynamicRegistration=!1,this.fileExtensions=[`.yml`,`.yaml`],this.locale=`en`}},Vq;(function(e){e.type=new En.RequestType(`fs/readFile`)})(Vq||={}),self.onmessage=e=>{let t=new Dn.BrowserMessageReader(globalThis),n=new Dn.BrowserMessageWriter(globalThis),r=(0,Dn.createConnection)(t,n),i=new Bq,a={readFile:e=>r.sendRequest(Vq.type,e)},o=((e,t)=>yi(e,t,i.workspaceFolders,i.workspaceRoot,i.useVSCodeContentRequest,a,!0)).bind(void 0,r),s=new In(r);h({contents:e.data.l10nBundle}),new zq(r,i,bi,o,s).start()};
|