@parallelworks/ui 0.76.0 → 0.78.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.
Files changed (270) hide show
  1. package/README.md +30 -5
  2. package/dist/access/AccessDrawer.d.ts +28 -7
  3. package/dist/access/AccessDrawer.js +216 -35
  4. package/dist/access/AccessList.d.ts +19 -1
  5. package/dist/access/AccessList.js +220 -9
  6. package/dist/access/GrantView.d.ts +3 -1
  7. package/dist/access/GrantView.js +17 -4
  8. package/dist/access/PrincipalPicker.js +5 -5
  9. package/dist/access/focus.js +1 -1
  10. package/dist/access/index.d.ts +2 -2
  11. package/dist/access/index.js +2 -2
  12. package/dist/access/strings.d.ts +18 -0
  13. package/dist/access/strings.js +20 -2
  14. package/dist/access/types.d.ts +26 -0
  15. package/dist/ai/adapter/types.d.ts +1 -0
  16. package/dist/ai/components/AllocationSelector.js +1 -1
  17. package/dist/ai/components/AttachmentManager.js +5 -5
  18. package/dist/ai/components/AttachmentUpload.js +2 -2
  19. package/dist/ai/components/BranchNavigator.js +1 -1
  20. package/dist/ai/components/ChatActivity.d.ts +2 -0
  21. package/dist/ai/components/ChatActivity.js +31 -0
  22. package/dist/ai/components/ChatEmptyState.js +3 -3
  23. package/dist/ai/components/ChatInput.js +3 -5
  24. package/dist/ai/components/ChatLayout.js +1 -1
  25. package/dist/ai/components/ChatMessage.js +1 -1
  26. package/dist/ai/components/ChatMessageList.js +2 -2
  27. package/dist/ai/components/ChatSidebar.js +3 -3
  28. package/dist/ai/components/ChatThread.js +4 -4
  29. package/dist/ai/components/ComposerAddMenu.js +9 -20
  30. package/dist/ai/components/ModelSelector.js +3 -3
  31. package/dist/ai/components/PastedText.js +5 -5
  32. package/dist/ai/components/SessionView.js +5 -2
  33. package/dist/ai/components/ShareDialog.js +3 -3
  34. package/dist/ai/components/SlashMenu.d.ts +31 -4
  35. package/dist/ai/components/SlashMenu.js +36 -63
  36. package/dist/ai/components/agent/ActivityLine.js +1 -1
  37. package/dist/ai/components/agent/AgentMessageParts.d.ts +1 -1
  38. package/dist/ai/components/agent/AgentMessageParts.js +44 -18
  39. package/dist/ai/components/conversationActions.js +3 -3
  40. package/dist/ai/core/ChatProvider.js +11 -2
  41. package/dist/ai/core/config.d.ts +10 -1
  42. package/dist/ai/core/config.js +1 -1
  43. package/dist/ai/index.d.ts +1 -1
  44. package/dist/ai/strings.d.ts +2 -0
  45. package/dist/ai/strings.js +2 -1
  46. package/dist/ai/types.d.ts +3 -0
  47. package/dist/ai/ui/ConversationSidebar.js +3 -3
  48. package/dist/ai/ui/sidebar.js +3 -3
  49. package/dist/assets/yaml.worker-DOBV2lND.js +884 -0
  50. package/dist/components/ActionMenu.d.ts +38 -9
  51. package/dist/components/ActionMenu.js +48 -22
  52. package/dist/components/Avatar.d.ts +66 -6
  53. package/dist/components/Avatar.js +130 -18
  54. package/dist/components/Breadcrumbs.d.ts +4 -0
  55. package/dist/components/Breadcrumbs.js +26 -10
  56. package/dist/components/Button.d.ts +3 -2
  57. package/dist/components/Button.js +11 -1
  58. package/dist/components/Callout.d.ts +3 -2
  59. package/dist/components/Callout.js +3 -2
  60. package/dist/components/Card.d.ts +33 -9
  61. package/dist/components/Card.js +24 -8
  62. package/dist/components/Checkbox.d.ts +3 -1
  63. package/dist/components/Checkbox.js +4 -2
  64. package/dist/components/ColorInput.js +1 -1
  65. package/dist/components/Combobox.d.ts +23 -0
  66. package/dist/components/Combobox.js +252 -86
  67. package/dist/components/ConfirmModal.d.ts +26 -2
  68. package/dist/components/ConfirmModal.js +81 -15
  69. package/dist/components/ContextMenu.d.ts +29 -2
  70. package/dist/components/ContextMenu.js +60 -8
  71. package/dist/components/CopyButton.d.ts +21 -8
  72. package/dist/components/CopyButton.js +29 -9
  73. package/dist/components/CreateModal.d.ts +16 -4
  74. package/dist/components/CreateModal.js +27 -16
  75. package/dist/components/DatePicker.d.ts +31 -1
  76. package/dist/components/DatePicker.js +178 -47
  77. package/dist/components/DescriptionList.d.ts +13 -3
  78. package/dist/components/DescriptionList.js +43 -11
  79. package/dist/components/Disclosure.d.ts +10 -2
  80. package/dist/components/Disclosure.js +18 -7
  81. package/dist/components/Drawer.js +5 -5
  82. package/dist/components/EmptyState.d.ts +12 -4
  83. package/dist/components/EmptyState.js +18 -10
  84. package/dist/components/ErrorPage.d.ts +40 -0
  85. package/dist/components/ErrorPage.js +101 -0
  86. package/dist/components/ExternalLink.d.ts +4 -1
  87. package/dist/components/ExternalLink.js +4 -5
  88. package/dist/components/Field.d.ts +21 -6
  89. package/dist/components/Field.js +32 -16
  90. package/dist/components/FileButton.d.ts +19 -0
  91. package/dist/components/FileButton.js +32 -0
  92. package/dist/components/HoverCard.d.ts +26 -6
  93. package/dist/components/HoverCard.js +11 -5
  94. package/dist/components/IconButton.js +4 -2
  95. package/dist/components/InfoTip.js +3 -3
  96. package/dist/components/Input.d.ts +33 -3
  97. package/dist/components/Input.js +149 -14
  98. package/dist/components/Kbd.d.ts +40 -0
  99. package/dist/components/Kbd.js +168 -0
  100. package/dist/components/Listbox.d.ts +103 -0
  101. package/dist/components/Listbox.js +190 -0
  102. package/dist/components/Loader.d.ts +8 -2
  103. package/dist/components/Loader.js +16 -1
  104. package/dist/components/Markdown.js +1 -1
  105. package/dist/components/MarkdownImpl.js +1 -1
  106. package/dist/components/Menu.d.ts +20 -2
  107. package/dist/components/Menu.js +48 -19
  108. package/dist/components/MenuEntries.d.ts +38 -2
  109. package/dist/components/MenuEntries.js +266 -39
  110. package/dist/components/Meter.d.ts +50 -11
  111. package/dist/components/Meter.js +71 -21
  112. package/dist/components/Modal.d.ts +9 -3
  113. package/dist/components/Modal.js +68 -29
  114. package/dist/components/OneTimeCodeInput.js +1 -1
  115. package/dist/components/PageHeader.js +111 -7
  116. package/dist/components/PageHeaderAction.d.ts +8 -3
  117. package/dist/components/PageHeaderAction.js +122 -34
  118. package/dist/components/Pagination.d.ts +13 -1
  119. package/dist/components/Pagination.js +90 -19
  120. package/dist/components/Popover.d.ts +13 -2
  121. package/dist/components/Popover.js +20 -21
  122. package/dist/components/Provider.d.ts +140 -3
  123. package/dist/components/Provider.js +142 -12
  124. package/dist/components/RefreshButton.d.ts +13 -6
  125. package/dist/components/RefreshButton.js +17 -9
  126. package/dist/components/RunStatusIcon.d.ts +16 -7
  127. package/dist/components/RunStatusIcon.js +21 -8
  128. package/dist/components/Section.d.ts +11 -4
  129. package/dist/components/Section.js +33 -22
  130. package/dist/components/SegmentedControl.d.ts +16 -3
  131. package/dist/components/SegmentedControl.js +7 -3
  132. package/dist/components/Select.d.ts +19 -3
  133. package/dist/components/Select.js +114 -68
  134. package/dist/components/SelectionCopy.d.ts +10 -0
  135. package/dist/components/SelectionCopy.js +105 -0
  136. package/dist/components/SettingModeOption.js +1 -1
  137. package/dist/components/SettingsCard.js +1 -1
  138. package/dist/components/Skeleton.js +1 -1
  139. package/dist/components/StatusBadge.d.ts +55 -10
  140. package/dist/components/StatusBadge.js +91 -15
  141. package/dist/components/StickyBar.js +1 -1
  142. package/dist/components/Table.d.ts +22 -4
  143. package/dist/components/Table.js +46 -24
  144. package/dist/components/Tabs.d.ts +9 -4
  145. package/dist/components/Tabs.js +9 -4
  146. package/dist/components/Tag.d.ts +49 -0
  147. package/dist/components/Tag.js +199 -0
  148. package/dist/components/ThemeEditor.js +1 -1
  149. package/dist/components/Toast.js +1 -1
  150. package/dist/components/ToggleGroup.d.ts +4 -1
  151. package/dist/components/ToggleGroup.js +30 -13
  152. package/dist/components/Tooltip.d.ts +9 -3
  153. package/dist/components/Tooltip.js +55 -39
  154. package/dist/components/buttonClasses.d.ts +5 -2
  155. package/dist/components/buttonClasses.js +11 -10
  156. package/dist/components/chart.d.ts +69 -0
  157. package/dist/components/chart.js +145 -0
  158. package/dist/components/comboboxItems.d.ts +7 -1
  159. package/dist/components/comboboxItems.js +6 -2
  160. package/dist/components/dismiss.d.ts +5 -1
  161. package/dist/components/dismiss.js +6 -2
  162. package/dist/components/floating.d.ts +4 -4
  163. package/dist/components/floating.js +5 -5
  164. package/dist/components/headerActionsFit.d.ts +37 -0
  165. package/dist/components/headerActionsFit.js +81 -0
  166. package/dist/components/pageHeaderStore.d.ts +3 -0
  167. package/dist/components/pageHeaderStore.js +3 -0
  168. package/dist/components/pathBreaks.js +2 -2
  169. package/dist/components/popupContainer.d.ts +17 -0
  170. package/dist/components/popupContainer.js +69 -0
  171. package/dist/components/relativeTime.d.ts +21 -10
  172. package/dist/components/relativeTime.js +50 -22
  173. package/dist/components/segmented.d.ts +18 -4
  174. package/dist/components/segmented.js +48 -6
  175. package/dist/components/typedDate.d.ts +5 -0
  176. package/dist/components/typedDate.js +50 -0
  177. package/dist/components/useClosingValue.d.ts +4 -0
  178. package/dist/components/useClosingValue.js +12 -0
  179. package/dist/components/useCopy.d.ts +6 -0
  180. package/dist/components/useCopy.js +3 -3
  181. package/dist/components/useNarrow.d.ts +2 -0
  182. package/dist/components/useNarrow.js +16 -0
  183. package/dist/editor/Editor.js +1 -1
  184. package/dist/editor/FormCodePanel.js +1 -1
  185. package/dist/editor/Monaco.js +1 -1
  186. package/dist/editor/workers.js +1 -1
  187. package/dist/file-explorer/FileExplorer.js +16 -15
  188. package/dist/file-explorer/FileExplorerContext.js +2 -2
  189. package/dist/file-explorer/FilePreview/Viewer.js +3 -3
  190. package/dist/file-explorer/FilePreview/index.js +2 -2
  191. package/dist/file-explorer/FileRowsWindow.js +3 -3
  192. package/dist/file-explorer/FileTable.js +1 -1
  193. package/dist/file-explorer/LoadMoreRow.js +1 -1
  194. package/dist/file-explorer/TreeView.js +5 -5
  195. package/dist/file-explorer/helpers.js +2 -2
  196. package/dist/file-explorer/toasts.js +2 -2
  197. package/dist/form/Fields/CheckboxGroupField.js +1 -1
  198. package/dist/form/Fields/DropdownField.js +1 -1
  199. package/dist/form/Fields/DurationField.js +2 -2
  200. package/dist/form/Fields/MultiDropdownField.js +1 -1
  201. package/dist/form/Fields/NumberField.js +1 -1
  202. package/dist/form/Fields/ObjectField.js +1 -1
  203. package/dist/form/Fields/RangeField.js +1 -1
  204. package/dist/form/Fields/StringField.js +1 -1
  205. package/dist/form/Form.js +3 -3
  206. package/dist/form/FormLayout.js +1 -1
  207. package/dist/form/Wizard/WizardContainer.js +1 -1
  208. package/dist/form/Wizard/WizardNavigation.js +1 -1
  209. package/dist/form/Wizard/WizardStepContent.js +1 -1
  210. package/dist/form/fieldRegistry.js +1 -1
  211. package/dist/form/formEditing.js +1 -1
  212. package/dist/format.d.ts +17 -7
  213. package/dist/format.js +39 -16
  214. package/dist/graph/AnnotationBanner.js +2 -2
  215. package/dist/graph/Connectors.js +5 -5
  216. package/dist/graph/DependencyGraph.js +10 -9
  217. package/dist/graph/GraphEditor.js +4 -4
  218. package/dist/graph/GraphEditorDialogs.js +13 -12
  219. package/dist/graph/GraphNode.js +1 -1
  220. package/dist/graph/InputDialog.js +5 -5
  221. package/dist/graph/InputsEditor.js +7 -7
  222. package/dist/graph/MatrixGroup.js +2 -2
  223. package/dist/graph/ProblemsButton.js +3 -3
  224. package/dist/graph/Reveal.js +1 -1
  225. package/dist/graph/RunWarningsList.js +1 -1
  226. package/dist/graph/ShortcutsButton.js +25 -8
  227. package/dist/graph/StepSummaries.js +1 -1
  228. package/dist/graph/TreeView.js +2 -2
  229. package/dist/graph/WorkflowSettingsDialog.js +3 -3
  230. package/dist/graph/editorFields.js +3 -3
  231. package/dist/graph/editorPrimitives.js +1 -1
  232. package/dist/graph/editorRows.js +5 -5
  233. package/dist/graph/fieldProblems.js +2 -2
  234. package/dist/graph/inputRefs.js +7 -6
  235. package/dist/graph/stepWith.js +2 -2
  236. package/dist/index.d.ts +30 -21
  237. package/dist/index.js +20 -12
  238. package/dist/list/ActionToolbar.d.ts +4 -0
  239. package/dist/list/ActionToolbar.js +35 -12
  240. package/dist/list/ListFilterBar.d.ts +42 -0
  241. package/dist/list/ListFilterBar.js +789 -0
  242. package/dist/list/ListPage.d.ts +42 -4
  243. package/dist/list/ListPage.js +56 -22
  244. package/dist/list/ListTable.d.ts +27 -3
  245. package/dist/list/ListTable.js +48 -23
  246. package/dist/list/ListToolbar.d.ts +31 -0
  247. package/dist/list/ListToolbar.js +43 -0
  248. package/dist/list/ListViewControls.d.ts +8 -4
  249. package/dist/list/ListViewControls.js +22 -14
  250. package/dist/list/UserHoverCard.d.ts +8 -2
  251. package/dist/list/UserHoverCard.js +26 -13
  252. package/dist/list/filterModel.d.ts +122 -0
  253. package/dist/list/filterModel.js +308 -0
  254. package/dist/list/index.d.ts +6 -2
  255. package/dist/list/index.js +6 -2
  256. package/dist/list/listSearch.d.ts +1 -1
  257. package/dist/list/listSearch.js +8 -4
  258. package/dist/list/listView.d.ts +24 -2
  259. package/dist/list/listView.js +47 -45
  260. package/dist/list/rowMenu.d.ts +10 -5
  261. package/dist/list/rowMenu.js +17 -7
  262. package/dist/list/useListFilters.d.ts +68 -0
  263. package/dist/list/useListFilters.js +252 -0
  264. package/dist/logviewer/LogViewer.js +4 -4
  265. package/dist/styles/theme.css +94 -0
  266. package/dist/styles.css +1 -1
  267. package/package.json +11 -11
  268. package/dist/assets/yaml.worker-k9AdOqzf.js +0 -1441
  269. package/dist/components/fullscreen.d.ts +0 -4
  270. package/dist/components/fullscreen.js +0 -18
@@ -0,0 +1,884 @@
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
+ fast-deep-equal@3.1.3
89
+
90
+ MIT License
91
+
92
+ Copyright (c) 2017 Evgeny Poberezkin
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
+ fast-uri@3.1.8
115
+
116
+ Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
117
+ Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
118
+ All rights reserved.
119
+
120
+ Redistribution and use in source and binary forms, with or without
121
+ modification, are permitted provided that the following conditions are met:
122
+ * Redistributions of source code must retain the above copyright
123
+ notice, this list of conditions and the following disclaimer.
124
+ * Redistributions in binary form must reproduce the above copyright
125
+ notice, this list of conditions and the following disclaimer in the
126
+ documentation and/or other materials provided with the distribution.
127
+ * The names of any contributors may not be used to endorse or promote
128
+ products derived from this software without specific prior written
129
+ permission.
130
+
131
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
132
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
133
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
134
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
135
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
136
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
137
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
138
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
139
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
140
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
141
+
142
+ * * *
143
+
144
+ The complete list of contributors can be found at:
145
+ - https://github.com/garycourt/uri-js/graphs/contributors
146
+
147
+ ---
148
+
149
+ json-schema-traverse@1.0.0
150
+
151
+ MIT License
152
+
153
+ Copyright (c) 2017 Evgeny Poberezkin
154
+
155
+ Permission is hereby granted, free of charge, to any person obtaining a copy
156
+ of this software and associated documentation files (the "Software"), to deal
157
+ in the Software without restriction, including without limitation the rights
158
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
159
+ copies of the Software, and to permit persons to whom the Software is
160
+ furnished to do so, subject to the following conditions:
161
+
162
+ The above copyright notice and this permission notice shall be included in all
163
+ copies or substantial portions of the Software.
164
+
165
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
166
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
167
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
168
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
169
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
170
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
171
+ SOFTWARE.
172
+
173
+ ---
174
+
175
+ jsonc-parser@3.3.1
176
+
177
+ The MIT License (MIT)
178
+
179
+ Copyright (c) Microsoft
180
+
181
+ Permission is hereby granted, free of charge, to any person obtaining a copy
182
+ of this software and associated documentation files (the "Software"), to deal
183
+ in the Software without restriction, including without limitation the rights
184
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
185
+ copies of the Software, and to permit persons to whom the Software is
186
+ furnished to do so, subject to the following conditions:
187
+
188
+ The above copyright notice and this permission notice shall be included in all
189
+ copies or substantial portions of the Software.
190
+
191
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
192
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
193
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
194
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
195
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
196
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
197
+ SOFTWARE.
198
+
199
+ ---
200
+
201
+ path-browserify@1.0.1
202
+
203
+ MIT License
204
+
205
+ Copyright (c) 2013 James Halliday
206
+
207
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
208
+ this software and associated documentation files (the "Software"), to deal in
209
+ the Software without restriction, including without limitation the rights to
210
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
211
+ the Software, and to permit persons to whom the Software is furnished to do so,
212
+ subject to the following conditions:
213
+
214
+ The above copyright notice and this permission notice shall be included in all
215
+ copies or substantial portions of the Software.
216
+
217
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
218
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
219
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
220
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
221
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
222
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
223
+
224
+ ---
225
+
226
+ picomatch@4.0.7
227
+
228
+ The MIT License (MIT)
229
+
230
+ Copyright (c) 2017-present, Jon Schlinkert.
231
+
232
+ Permission is hereby granted, free of charge, to any person obtaining a copy
233
+ of this software and associated documentation files (the "Software"), to deal
234
+ in the Software without restriction, including without limitation the rights
235
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
236
+ copies of the Software, and to permit persons to whom the Software is
237
+ furnished to do so, subject to the following conditions:
238
+
239
+ The above copyright notice and this permission notice shall be included in
240
+ all copies or substantial portions of the Software.
241
+
242
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
243
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
244
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
245
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
246
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
247
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
248
+ THE SOFTWARE.
249
+
250
+ ---
251
+
252
+ prettier@3.9.10
253
+
254
+ Copyright © James Long and contributors
255
+
256
+ 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:
257
+
258
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
259
+
260
+ 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.
261
+
262
+ ---
263
+
264
+ request-light@0.5.8
265
+
266
+ The MIT License (MIT)
267
+
268
+ Copyright (c) Microsoft
269
+
270
+ Permission is hereby granted, free of charge, to any person obtaining a copy
271
+ of this software and associated documentation files (the "Software"), to deal
272
+ in the Software without restriction, including without limitation the rights
273
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
274
+ copies of the Software, and to permit persons to whom the Software is
275
+ furnished to do so, subject to the following conditions:
276
+
277
+ The above copyright notice and this permission notice shall be included in all
278
+ copies or substantial portions of the Software.
279
+
280
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
281
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
282
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
283
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
284
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
285
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
286
+ SOFTWARE.
287
+
288
+ ---
289
+
290
+ vscode-jsonrpc@8.2.0
291
+
292
+ Copyright (c) Microsoft Corporation
293
+
294
+ All rights reserved.
295
+
296
+ MIT License
297
+
298
+ 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:
299
+
300
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
301
+
302
+ 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.
303
+
304
+ ---
305
+
306
+ vscode-languageserver-protocol@3.17.5
307
+
308
+ Copyright (c) Microsoft Corporation
309
+
310
+ All rights reserved.
311
+
312
+ MIT License
313
+
314
+ 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:
315
+
316
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
317
+
318
+ 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.
319
+
320
+ ---
321
+
322
+ vscode-languageserver-textdocument@1.0.15
323
+
324
+ Copyright (c) Microsoft Corporation
325
+
326
+ All rights reserved.
327
+
328
+ MIT License
329
+
330
+ 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:
331
+
332
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
333
+
334
+ 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.
335
+
336
+ ---
337
+
338
+ vscode-languageserver-types@3.17.5
339
+
340
+ Copyright (c) Microsoft Corporation
341
+
342
+ All rights reserved.
343
+
344
+ MIT License
345
+
346
+ 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:
347
+
348
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
349
+
350
+ 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.
351
+
352
+ ---
353
+
354
+ vscode-languageserver@9.0.1
355
+
356
+ Copyright (c) Microsoft Corporation
357
+
358
+ All rights reserved.
359
+
360
+ MIT License
361
+
362
+ 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:
363
+
364
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
365
+
366
+ 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.
367
+
368
+ ---
369
+
370
+ vscode-uri@3.2.0
371
+
372
+ The MIT License (MIT)
373
+
374
+ Copyright (c) Microsoft
375
+
376
+ 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:
377
+
378
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
379
+
380
+ 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.
381
+
382
+ ---
383
+
384
+ yaml-language-server@1.25.0
385
+
386
+ MIT License
387
+
388
+ Copyright (c) 2017 Red Hat Inc. and others.
389
+
390
+ Permission is hereby granted, free of charge, to any person obtaining a copy
391
+ of this software and associated documentation files (the "Software"), to deal
392
+ in the Software without restriction, including without limitation the rights
393
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
394
+ copies of the Software, and to permit persons to whom the Software is
395
+ furnished to do so, subject to the following conditions:
396
+
397
+ The above copyright notice and this permission notice shall be included in all
398
+ copies or substantial portions of the Software.
399
+
400
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
401
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
402
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
403
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
404
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
405
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
406
+ SOFTWARE.
407
+
408
+ ---
409
+
410
+ yaml@2.8.3
411
+
412
+ Copyright Eemeli Aro <eemeli@gmail.com>
413
+
414
+ Permission to use, copy, modify, and/or distribute this software for any purpose
415
+ with or without fee is hereby granted, provided that the above copyright notice
416
+ and this permission notice appear in all copies.
417
+
418
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
419
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
420
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
421
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
422
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
423
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
424
+ THIS SOFTWARE.
425
+ */
426
+ 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;else if(`fsPath`in e){let t=p(e.fsPath),n=JSON.parse(t);m=y(n)?n.contents.bundle:n}else 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
427
+ `),n.push(`\r
428
+ `),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
429
+ `);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}}})),ne=/* @__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 ne;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(ne||={});function re(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,re=/* @__PURE__ */ new Map,ie,ae=new i.LinkedMap,oe=/* @__PURE__ */ new Map,A=/* @__PURE__ */ new Set,se=/* @__PURE__ */ new Map,j=d.Off,ce=p.Text,M,N=ne.New,P=new a.Emitter,le=new a.Emitter,ue=new a.Emitter,de=new a.Emitter,fe=new a.Emitter,pe=x&&x.cancellationStrategy?x.cancellationStrategy:k.Message;function me(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 he(e){return e===null?`res-unknown-`+(++T).toString():`res-`+e.toString()}function ge(){return`not-`+(++w).toString()}function F(e,t){r.Message.isRequest(t)?e.set(me(t.id),t):r.Message.isResponse(t)?e.set(he(t.id),t):e.set(ge(),t)}function _e(e){}function ve(){return N===ne.Listening}function ye(){return N===ne.Closed}function be(){return N===ne.Disposed}function xe(){(N===ne.New||N===ne.Listening)&&(N=ne.Closed,le.fire(void 0))}function Se(e){P.fire([e,void 0,void 0])}function Ce(e){P.fire(e)}f.onClose(xe),f.onError(Se),v.onClose(xe),v.onError(Ce);function we(){ie||ae.size===0||(ie=(0,t.default)().timer.setImmediate(()=>{ie=void 0,Ee()}))}function Te(e){r.Message.isRequest(e)?Oe(e):r.Message.isNotification(e)?Ae(e):r.Message.isResponse(e)?ke(e):je(e)}function Ee(){if(ae.size===0)return;let e=ae.shift();try{let t=x?.messageStrategy;ee.is(t)?t.handleMessage(e,Te):Te(e)}finally{we()}}let De=e=>{try{if(r.Message.isNotification(e)&&e.method===s.type.method){let t=e.params.id,n=me(t),i=ae.get(n);if(r.Message.isRequest(i)){let r=x?.connectionStrategy,a=r&&r.cancelUndispatched?r.cancelUndispatched(i,_e):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){ae.delete(n),se.delete(t),a.id=i.id,Fe(a,e.method,Date.now()),v.write(a).catch(()=>S.error(`Sending response for canceled message failed.`));return}}let a=se.get(t);if(a!==void 0){a.cancel(),Le(e);return}A.add(t)}F(ae,e)}finally{we()}};function Oe(e){if(be())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,Fe(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()};Fe(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};Fe(i,n,r),v.write(i).catch(()=>S.error(`Sending response failed.`))}Ie(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(pe.receiver)?pe.receiver.createCancellationTokenSource(o):pe.receiver.createCancellationTokenSource(e);e.id!==null&&A.has(e.id)&&u.cancel(),e.id!==null&&se.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=>{se.delete(o),t(n,e.method,l)},t=>{se.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)}):(se.delete(o),t(d,e.method,l)):(se.delete(o),a(d,e.method,l))}catch(a){se.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 ke(e){if(!be()){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=oe.get(t);if(Re(e,n),n!==void 0){oe.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 Ae(e){if(be())return;let t,n;if(e.method===s.type.method){let t=e.params.id;A.delete(t),Le(e)}else{{let r=te.get(e.method);r&&(n=r.handler,t=r.type)}if(n||O)try{if(Le(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 ue.fire(e)}}function je(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=oe.get(e);n&&n.reject(/* @__PURE__ */ Error(`The received response has neither a result nor an error property.`))}}function Me(e){if(e!=null)switch(j){case d.Verbose:return JSON.stringify(e,null,4);case d.Compact:return JSON.stringify(e);default:return}}function Ne(e){if(j!==d.Off&&M){if(ce===p.Text){let t;(j===d.Verbose||j===d.Compact)&&e.params&&(t=`Params: ${Me(e.params)}\n\n`),M.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ze(`send-request`,e)}}function Pe(e){if(j!==d.Off&&M){if(ce===p.Text){let t;(j===d.Verbose||j===d.Compact)&&(t=e.params?`Params: ${Me(e.params)}\n\n`:`No parameters provided.
430
+
431
+ `),M.log(`Sending notification '${e.method}'.`,t)}else ze(`send-notification`,e)}}function Fe(e,t,n){if(j!==d.Off&&M){if(ce===p.Text){let r;(j===d.Verbose||j===d.Compact)&&(e.error&&e.error.data?r=`Error data: ${Me(e.error.data)}\n\n`:e.result?r=`Result: ${Me(e.result)}\n\n`:e.error===void 0&&(r=`No result returned.
432
+
433
+ `)),M.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else ze(`send-response`,e)}}function Ie(e){if(j!==d.Off&&M){if(ce===p.Text){let t;(j===d.Verbose||j===d.Compact)&&e.params&&(t=`Params: ${Me(e.params)}\n\n`),M.log(`Received request '${e.method} - (${e.id})'.`,t)}else ze(`receive-request`,e)}}function Le(e){if(j!==d.Off&&M&&e.method!==h.type.method){if(ce===p.Text){let t;(j===d.Verbose||j===d.Compact)&&(t=e.params?`Params: ${Me(e.params)}\n\n`:`No parameters provided.
434
+
435
+ `),M.log(`Received notification '${e.method}'.`,t)}else ze(`receive-notification`,e)}}function Re(e,t){if(j!==d.Off&&M){if(ce===p.Text){let n;if((j===d.Verbose||j===d.Compact)&&(e.error&&e.error.data?n=`Error data: ${Me(e.error.data)}\n\n`:e.result?n=`Result: ${Me(e.result)}\n\n`:e.error===void 0&&(n=`No result returned.
436
+
437
+ `)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;M.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else M.log(`Received response ${e.id} without active response promise.`,n)}else ze(`receive-response`,e)}}function ze(e,t){if(!M||j===d.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};M.log(n)}function Be(){if(ye())throw new _(g.Closed,`Connection is closed.`);if(be())throw new _(g.Disposed,`Connection is disposed.`)}function Ve(){if(ve())throw new _(g.AlreadyListening,`Connection is already listening`)}function He(){if(!ve())throw Error(`Call listen() first.`)}function Ue(e){return e===void 0?null:e}function We(e){if(e!==null)return e}function Ge(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}function Ke(e,t){switch(e){case r.ParameterStructures.auto:return Ge(t)?We(t):[Ue(t)];case r.ParameterStructures.byName:if(!Ge(t))throw Error(`Received parameters by name but param is not an object literal.`);return We(t);case r.ParameterStructures.byPosition:return[Ue(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}function qe(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=Ke(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(Ue(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}let Je={sendNotification:(e,...t)=>{Be();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=Ke(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=>Ue(e))}}else{let n=t;i=e.method,a=qe(e,n)}let o={jsonrpc:`2.0`,method:i,params:a};return Pe(o),v.write(o).catch(e=>{throw S.error(`Sending notification failed.`),e})},onNotification:(e,t)=>{Be();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(re.has(t))throw Error(`Progress handler for token ${t} already registered`);return re.set(t,n),{dispose:()=>{re.delete(t)}}},sendProgress:(e,t,n)=>Je.sendNotification(l.type,{token:t,value:n}),onUnhandledProgress:de.event,sendRequest:(e,...t)=>{Be(),He();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=Ke(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=>Ue(e))}}else{let n=t;i=e.method,a=qe(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=pe.sender.sendCancellation(Je,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 Ne(u),typeof pe.sender.enableCancellation==`function`&&pe.sender.enableCancellation(u),new Promise(async(e,t)=>{let n={method:i,timerStart:Date.now(),resolve:t=>{e(t),pe.sender.cleanup(c),l?.dispose()},reject:e=>{t(e),pe.sender.cleanup(c),l?.dispose()}};try{await v.write(u),oe.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)=>{Be();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:()=>oe.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)),j=e,ce=a,M=j===d.Off?void 0:t,i&&!ye()&&!be()&&await Je.sendNotification(m.type,{value:d.toString(e)})},onError:P.event,onClose:le.event,onUnhandledNotification:ue.event,onDispose:fe.event,end:()=>{v.end()},dispose:()=>{if(be())return;N=ne.Disposed,fe.fire(void 0);let e=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of oe.values())t.reject(e);oe=/* @__PURE__ */ new Map,se=/* @__PURE__ */ new Map,A=/* @__PURE__ */ new Set,ae=new i.LinkedMap,n.func(v.dispose)&&v.dispose(),n.func(f.dispose)&&f.dispose()},listen:()=>{Be(),Ve(),N=ne.Listening,f.listen(De)},inspect:()=>{(0,t.default)().console.log(`inspect`)}};return Je.onNotification(h.type,e=>{if(j===d.Off||!M)return;let t=j===d.Verbose||j===d.Compact;M.log(e.message,t?e.verbose:void 0)}),Je.onNotification(l.type,e=>{let t=re.get(e.token);t?t(e.value):de.fire(e)}),Je}e.createMessageConnection=re})),re=/* @__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=ne();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})),ie=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=re();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})),ae=/* @__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,ie().default.install();let r=re();n(re(),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})),oe=/* @__PURE__ */ s(((e,t)=>{t.exports=ae()})),A=/* @__PURE__ */ c({AnnotatedTextEdit:()=>we,ChangeAnnotation:()=>Se,ChangeAnnotationIdentifier:()=>Ce,CodeAction:()=>st,CodeActionContext:()=>ot,CodeActionKind:()=>it,CodeActionTriggerKind:()=>at,CodeDescription:()=>ve,CodeLens:()=>ct,Color:()=>de,ColorInformation:()=>fe,ColorPresentation:()=>pe,Command:()=>be,CompletionItem:()=>Ge,CompletionItemKind:()=>ze,CompletionItemLabelDetails:()=>We,CompletionItemTag:()=>Ve,CompletionList:()=>Ke,CreateFile:()=>Ee,DeleteFile:()=>Oe,Diagnostic:()=>ye,DiagnosticRelatedInformation:()=>ge,DiagnosticSeverity:()=>F,DiagnosticTag:()=>_e,DocumentHighlight:()=>Qe,DocumentHighlightKind:()=>Ze,DocumentLink:()=>ut,DocumentSymbol:()=>rt,DocumentUri:()=>se,EOL:()=>kt,FoldingRange:()=>he,FoldingRangeKind:()=>me,FormattingOptions:()=>lt,Hover:()=>Je,InlayHint:()=>xt,InlayHintKind:()=>yt,InlayHintLabelPart:()=>bt,InlineCompletionContext:()=>Dt,InlineCompletionItem:()=>Ct,InlineCompletionList:()=>wt,InlineCompletionTriggerKind:()=>Tt,InlineValueContext:()=>vt,InlineValueEvaluatableExpression:()=>_t,InlineValueText:()=>ht,InlineValueVariableLookup:()=>gt,InsertReplaceEdit:()=>He,InsertTextFormat:()=>Be,InsertTextMode:()=>Ue,Location:()=>le,LocationLink:()=>ue,MarkedString:()=>qe,MarkupContent:()=>Re,MarkupKind:()=>Le,OptionalVersionedTextDocumentIdentifier:()=>Fe,ParameterInformation:()=>Ye,Position:()=>N,Range:()=>P,RenameFile:()=>De,SelectedCompletionInfo:()=>Et,SelectionRange:()=>dt,SemanticTokenModifiers:()=>pt,SemanticTokenTypes:()=>ft,SemanticTokens:()=>mt,SignatureInformation:()=>Xe,StringValue:()=>St,SymbolInformation:()=>tt,SymbolKind:()=>$e,SymbolTag:()=>et,TextDocument:()=>At,TextDocumentEdit:()=>Te,TextDocumentIdentifier:()=>Ne,TextDocumentItem:()=>Ie,TextEdit:()=>xe,URI:()=>j,VersionedTextDocumentIdentifier:()=>Pe,WorkspaceChange:()=>Me,WorkspaceEdit:()=>ke,WorkspaceFolder:()=>Ot,WorkspaceSymbol:()=>nt,integer:()=>ce,uinteger:()=>M}),se,j,ce,M,N,P,le,ue,de,fe,pe,me,he,ge,F,_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,Dt,Ot,kt,At,jt,I,Mt=o((()=>{(function(e){function t(e){return typeof e==`string`}e.is=t})(se||={}),(function(e){function t(e){return typeof e==`string`}e.is=t})(j||={}),(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})(ce||={}),(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})(M||={}),(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=M.MAX_VALUE),t===Number.MAX_VALUE&&(t=M.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return I.objectLiteral(t)&&I.uinteger(t.line)&&I.uinteger(t.character)}e.is=n})(N||={}),(function(e){function t(e,t,n,r){if(I.uinteger(e)&&I.uinteger(t)&&I.uinteger(n)&&I.uinteger(r))return{start:N.create(e,t),end:N.create(n,r)};if(N.is(e)&&N.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 I.objectLiteral(t)&&N.is(t.start)&&N.is(t.end)}e.is=n})(P||={}),(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return I.objectLiteral(t)&&P.is(t.range)&&(I.string(t.uri)||I.undefined(t.uri))}e.is=n})(le||={}),(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 I.objectLiteral(t)&&P.is(t.targetRange)&&I.string(t.targetUri)&&P.is(t.targetSelectionRange)&&(P.is(t.originSelectionRange)||I.undefined(t.originSelectionRange))}e.is=n})(ue||={}),(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 I.objectLiteral(t)&&I.numberRange(t.red,0,1)&&I.numberRange(t.green,0,1)&&I.numberRange(t.blue,0,1)&&I.numberRange(t.alpha,0,1)}e.is=n})(de||={}),(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return I.objectLiteral(t)&&P.is(t.range)&&de.is(t.color)}e.is=n})(fe||={}),(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return I.objectLiteral(t)&&I.string(t.label)&&(I.undefined(t.textEdit)||xe.is(t))&&(I.undefined(t.additionalTextEdits)||I.typedArray(t.additionalTextEdits,xe.is))}e.is=n})(pe||={}),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(me||={}),(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return I.defined(n)&&(o.startCharacter=n),I.defined(r)&&(o.endCharacter=r),I.defined(i)&&(o.kind=i),I.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return I.objectLiteral(t)&&I.uinteger(t.startLine)&&I.uinteger(t.startLine)&&(I.undefined(t.startCharacter)||I.uinteger(t.startCharacter))&&(I.undefined(t.endCharacter)||I.uinteger(t.endCharacter))&&(I.undefined(t.kind)||I.string(t.kind))}e.is=n})(he||={}),(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return I.defined(t)&&le.is(t.location)&&I.string(t.message)}e.is=n})(ge||={}),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(F||={}),(function(e){e.Unnecessary=1,e.Deprecated=2})(_e||={}),(function(e){function t(e){let t=e;return I.objectLiteral(t)&&I.string(t.href)}e.is=t})(ve||={}),(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return I.defined(n)&&(o.severity=n),I.defined(r)&&(o.code=r),I.defined(i)&&(o.source=i),I.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return I.defined(t)&&P.is(t.range)&&I.string(t.message)&&(I.number(t.severity)||I.undefined(t.severity))&&(I.integer(t.code)||I.string(t.code)||I.undefined(t.code))&&(I.undefined(t.codeDescription)||I.string(t.codeDescription?.href))&&(I.string(t.source)||I.undefined(t.source))&&(I.undefined(t.relatedInformation)||I.typedArray(t.relatedInformation,ge.is))}e.is=n})(ye||={}),(function(e){function t(e,t,...n){let r={title:e,command:t};return I.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return I.defined(t)&&I.string(t.title)&&I.string(t.command)}e.is=n})(be||={}),(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 I.objectLiteral(t)&&I.string(t.newText)&&P.is(t.range)}e.is=i})(xe||={}),(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 I.objectLiteral(t)&&I.string(t.label)&&(I.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(I.string(t.description)||t.description===void 0)}e.is=n})(Se||={}),(function(e){function t(e){let t=e;return I.string(t)}e.is=t})(Ce||={}),(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 xe.is(t)&&(Se.is(t.annotationId)||Ce.is(t.annotationId))}e.is=i})(we||={}),(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return I.defined(t)&&Fe.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(Te||={}),(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`&&I.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||I.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||I.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||Ce.is(t.annotationId))}e.is=n})(Ee||={}),(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`&&I.string(t.oldUri)&&I.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||I.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||I.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||Ce.is(t.annotationId))}e.is=n})(De||={}),(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`&&I.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||I.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||I.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||Ce.is(t.annotationId))}e.is=n})(Oe||={}),(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=>I.string(e.kind)?Ee.is(e)||De.is(e)||Oe.is(e):Te.is(e)))}e.is=t})(ke||={}),Ae=class{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=xe.insert(e,t):Ce.is(n)?(i=n,r=we.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=we.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=xe.replace(e,t):Ce.is(n)?(i=n,r=we.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=we.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=xe.del(e):Ce.is(t)?(r=t,n=we.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=we.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.`)}},je=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(Ce.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()}},Me=class{constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new je(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(Te.is(e)){let t=new Ae(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new Ae(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(Fe.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 Ae(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 Ae(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new je,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;Se.is(t)||Ce.is(t)?r=t:n=t;let i,a;if(r===void 0?i=Ee.create(e,n):(a=Ce.is(r)?r:this._changeAnnotations.manage(r),i=Ee.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;Se.is(n)||Ce.is(n)?i=n:r=n;let a,o;if(i===void 0?a=De.create(e,t,r):(o=Ce.is(i)?i:this._changeAnnotations.manage(i),a=De.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;Se.is(t)||Ce.is(t)?r=t:n=t;let i,a;if(r===void 0?i=Oe.create(e,n):(a=Ce.is(r)?r:this._changeAnnotations.manage(r),i=Oe.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 I.defined(t)&&I.string(t.uri)}e.is=n})(Ne||={}),(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return I.defined(t)&&I.string(t.uri)&&I.integer(t.version)}e.is=n})(Pe||={}),(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return I.defined(t)&&I.string(t.uri)&&(t.version===null||I.integer(t.version))}e.is=n})(Fe||={}),(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 I.defined(t)&&I.string(t.uri)&&I.string(t.languageId)&&I.integer(t.version)&&I.string(t.text)}e.is=n})(Ie||={}),(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(Le||={}),(function(e){function t(e){let t=e;return I.objectLiteral(e)&&Le.is(t.kind)&&I.string(t.value)}e.is=t})(Re||={}),(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})(ze||={}),(function(e){e.PlainText=1,e.Snippet=2})(Be||={}),(function(e){e.Deprecated=1})(Ve||={}),(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&&I.string(t.newText)&&P.is(t.insert)&&P.is(t.replace)}e.is=n})(He||={}),(function(e){e.asIs=1,e.adjustIndentation=2})(Ue||={}),(function(e){function t(e){let t=e;return t&&(I.string(t.detail)||t.detail===void 0)&&(I.string(t.description)||t.description===void 0)}e.is=t})(We||={}),(function(e){function t(e){return{label:e}}e.create=t})(Ge||={}),(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(Ke||={}),(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return I.string(t)||I.objectLiteral(t)&&I.string(t.language)&&I.string(t.value)}e.is=n})(qe||={}),(function(e){function t(e){let t=e;return!!t&&I.objectLiteral(t)&&(Re.is(t.contents)||qe.is(t.contents)||I.typedArray(t.contents,qe.is))&&(e.range===void 0||P.is(e.range))}e.is=t})(Je||={}),(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(Ye||={}),(function(e){function t(e,t,...n){let r={label:e};return I.defined(t)&&(r.documentation=t),r.parameters=I.defined(n)?n:[],r}e.create=t})(Xe||={}),(function(e){e.Text=1,e.Read=2,e.Write=3})(Ze||={}),(function(e){function t(e,t){let n={range:e};return I.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})($e||={}),(function(e){e.Deprecated=1})(et||={}),(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})(tt||={}),(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})(nt||={}),(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&&I.string(t.name)&&I.number(t.kind)&&P.is(t.range)&&P.is(t.selectionRange)&&(t.detail===void 0||I.string(t.detail))&&(t.deprecated===void 0||I.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(rt||={}),(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`})(it||={}),(function(e){e.Invoked=1,e.Automatic=2})(at||={}),(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 I.defined(t)&&I.typedArray(t.diagnostics,ye.is)&&(t.only===void 0||I.typedArray(t.only,I.string))&&(t.triggerKind===void 0||t.triggerKind===at.Invoked||t.triggerKind===at.Automatic)}e.is=n})(ot||={}),(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):be.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&&I.string(t.title)&&(t.diagnostics===void 0||I.typedArray(t.diagnostics,ye.is))&&(t.kind===void 0||I.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||be.is(t.command))&&(t.isPreferred===void 0||I.boolean(t.isPreferred))&&(t.edit===void 0||ke.is(t.edit))}e.is=n})(st||={}),(function(e){function t(e,t){let n={range:e};return I.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return I.defined(t)&&P.is(t.range)&&(I.undefined(t.command)||be.is(t.command))}e.is=n})(ct||={}),(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return I.defined(t)&&I.uinteger(t.tabSize)&&I.boolean(t.insertSpaces)}e.is=n})(lt||={}),(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return I.defined(t)&&P.is(t.range)&&(I.undefined(t.target)||I.string(t.target))}e.is=n})(ut||={}),(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return I.objectLiteral(n)&&P.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(dt||={}),(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`})(ft||={}),(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`})(pt||={}),(function(e){function t(e){let t=e;return I.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})(mt||={}),(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&P.is(t.range)&&I.string(t.text)}e.is=n})(ht||={}),(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&&P.is(t.range)&&I.boolean(t.caseSensitiveLookup)&&(I.string(t.variableName)||t.variableName===void 0)}e.is=n})(gt||={}),(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&P.is(t.range)&&(I.string(t.expression)||t.expression===void 0)}e.is=n})(_t||={}),(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return I.defined(t)&&P.is(e.stoppedLocation)}e.is=n})(vt||={}),(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(yt||={}),(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return I.objectLiteral(t)&&(t.tooltip===void 0||I.string(t.tooltip)||Re.is(t.tooltip))&&(t.location===void 0||le.is(t.location))&&(t.command===void 0||be.is(t.command))}e.is=n})(bt||={}),(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 I.objectLiteral(t)&&N.is(t.position)&&(I.string(t.label)||I.typedArray(t.label,bt.is))&&(t.kind===void 0||yt.is(t.kind))&&t.textEdits===void 0||I.typedArray(t.textEdits,xe.is)&&(t.tooltip===void 0||I.string(t.tooltip)||Re.is(t.tooltip))&&(t.paddingLeft===void 0||I.boolean(t.paddingLeft))&&(t.paddingRight===void 0||I.boolean(t.paddingRight))}e.is=n})(xt||={}),(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(St||={}),(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Ct||={}),(function(e){function t(e){return{items:e}}e.create=t})(wt||={}),(function(e){e.Invoked=0,e.Automatic=1})(Tt||={}),(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(Et||={}),(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(Dt||={}),(function(e){function t(e){let t=e;return I.objectLiteral(t)&&j.is(t.uri)&&I.string(t.name)}e.is=t})(Ot||={}),kt=[`
438
+ `,`\r
439
+ `,`\r`],(function(e){function t(e,t,n,r){return new jt(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(I.defined(t)&&I.string(t.uri)&&(I.undefined(t.languageId)||I.string(t.languageId))&&I.uinteger(t.lineCount)&&I.func(t.getText)&&I.func(t.positionAt)&&I.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}})(At||={}),jt=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===`
440
+ `,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
441
+ `&&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 N.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 N.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})(I||={})})),Nt=/* @__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=ae();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)}}})),Pt=/* @__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})),Ft=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;let t=Nt();var n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))})),It=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;let t=Nt();var n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))})),Lt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;let t=Nt();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={}))})),Rt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;let t=Nt();var n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))})),zt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;let t=Nt();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={}))})),Bt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;let t=Nt();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={}))})),Vt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;let t=Nt();var n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))})),Ht=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;let t=Nt();var n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))})),Ut=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;let t=ae(),n=Nt();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={}))})),Wt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;let t=Nt();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={}))})),Gt=/* @__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=Nt();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={}))})),Kt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;let t=Nt();var n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))})),qt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;let t=Nt();var n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))})),Jt=/* @__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=Nt();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={}))})),Yt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;let t=Nt();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={}))})),Xt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;let t=Nt();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={}))})),Zt=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;let t=Nt();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=Nt();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={}))})),$t=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;let t=ae(),n=Pt(),r=Nt();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={}))})),en=/* @__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=(Mt(),d(A)),n=Pt(),r=Nt();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={}))})),tn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;let t=Nt();var n;(function(e){e.method=`textDocument/inlineCompletion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineCompletionRequest=n={}))})),nn=/* @__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=Nt(),n=(Mt(),d(A)),r=Pt(),i=Ft();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:function(){return i.ImplementationRequest}});let a=It();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});let o=Lt();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return o.WorkspaceFoldersRequest}}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return o.DidChangeWorkspaceFoldersNotification}});let s=Rt();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:function(){return s.ConfigurationRequest}});let c=zt();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:function(){return c.DocumentColorRequest}}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:function(){return c.ColorPresentationRequest}});let l=Bt();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:function(){return l.FoldingRangeRequest}}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return l.FoldingRangeRefreshRequest}});let u=Vt();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:function(){return u.DeclarationRequest}});let f=Ht();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});let p=Ut();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=Wt();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=Gt();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=Kt();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:function(){return g.ShowDocumentRequest}});let _=qt();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return _.LinkedEditingRangeRequest}});let v=Jt();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=Yt();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=Xt();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=Zt();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=$t();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=en();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=tn();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 ne;(function(e){e.Create=`create`,e.Rename=`rename`,e.Delete=`delete`})(ne||(e.ResourceOperationKind=ne={}));var re;(function(e){e.Abort=`abort`,e.Transactional=`transactional`,e.TextOnlyTransactional=`textOnlyTransactional`,e.Undo=`undo`})(re||(e.FailureHandlingKind=re={}));var ie;(function(e){e.UTF8=`utf-8`,e.UTF16=`utf-16`,e.UTF32=`utf-32`})(ie||(e.PositionEncodingKind=ie={}));var ae;(function(e){function t(e){let t=e;return t&&r.string(t.id)&&t.id.length>0}e.hasId=t})(ae||(e.StaticRegistrationOptions=ae={}));var oe;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||k.is(t.documentSelector))}e.is=t})(oe||(e.TextDocumentRegistrationOptions=oe={}));var se;(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})(se||(e.WorkDoneProgressOptions=se={}));var j;(function(e){e.method=`initialize`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(j||(e.InitializeRequest=j={}));var ce;(function(e){e.unknownProtocolVersion=1})(ce||(e.InitializeErrorCodes=ce={}));var M;(function(e){e.method=`initialized`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(M||(e.InitializedNotification=M={}));var N;(function(e){e.method=`shutdown`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType0(e.method)})(N||(e.ShutdownRequest=N={}));var P;(function(e){e.method=`exit`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType0(e.method)})(P||(e.ExitNotification=P={}));var le;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(le||(e.DidChangeConfigurationNotification=le={}));var ue;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ue||(e.MessageType=ue={}));var de;(function(e){e.method=`window/showMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(de||(e.ShowMessageNotification=de={}));var fe;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(fe||(e.ShowMessageRequest=fe={}));var pe;(function(e){e.method=`window/logMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(pe||(e.LogMessageNotification=pe={}));var me;(function(e){e.method=`telemetry/event`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(me||(e.TelemetryEventNotification=me={}));var he;(function(e){e.None=0,e.Full=1,e.Incremental=2})(he||(e.TextDocumentSyncKind=he={}));var ge;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ge||(e.DidOpenTextDocumentNotification=ge={}));var F;(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})(F||(e.TextDocumentContentChangeEvent=F={}));var _e;(function(e){e.method=`textDocument/didChange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(_e||(e.DidChangeTextDocumentNotification=_e={}));var ve;(function(e){e.method=`textDocument/didClose`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ve||(e.DidCloseTextDocumentNotification=ve={}));var ye;(function(e){e.method=`textDocument/didSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ye||(e.DidSaveTextDocumentNotification=ye={}));var be;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(be||(e.TextDocumentSaveReason=be={}));var xe;(function(e){e.method=`textDocument/willSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(xe||(e.WillSaveTextDocumentNotification=xe={}));var Se;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Se||(e.WillSaveTextDocumentWaitUntilRequest=Se={}));var Ce;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Ce||(e.DidChangeWatchedFilesNotification=Ce={}));var we;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(we||(e.FileChangeType=we={}));var Te;(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})(Te||(e.RelativePattern=Te={}));var Ee;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Ee||(e.WatchKind=Ee={}));var De;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(De||(e.PublishDiagnosticsNotification=De={}));var Oe;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Oe||(e.CompletionTriggerKind=Oe={}));var ke;(function(e){e.method=`textDocument/completion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ke||(e.CompletionRequest=ke={}));var Ae;(function(e){e.method=`completionItem/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ae||(e.CompletionResolveRequest=Ae={}));var je;(function(e){e.method=`textDocument/hover`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(je||(e.HoverRequest=je={}));var Me;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Me||(e.SignatureHelpTriggerKind=Me={}));var Ne;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ne||(e.SignatureHelpRequest=Ne={}));var Pe;(function(e){e.method=`textDocument/definition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Pe||(e.DefinitionRequest=Pe={}));var Fe;(function(e){e.method=`textDocument/references`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Fe||(e.ReferencesRequest=Fe={}));var Ie;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ie||(e.DocumentHighlightRequest=Ie={}));var Le;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Le||(e.DocumentSymbolRequest=Le={}));var Re;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Re||(e.CodeActionRequest=Re={}));var ze;(function(e){e.method=`codeAction/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ze||(e.CodeActionResolveRequest=ze={}));var Be;(function(e){e.method=`workspace/symbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Be||(e.WorkspaceSymbolRequest=Be={}));var Ve;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ve||(e.WorkspaceSymbolResolveRequest=Ve={}));var He;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(He||(e.CodeLensRequest=He={}));var Ue;(function(e){e.method=`codeLens/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ue||(e.CodeLensResolveRequest=Ue={}));var We;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(We||(e.CodeLensRefreshRequest=We={}));var Ge;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ge||(e.DocumentLinkRequest=Ge={}));var Ke;(function(e){e.method=`documentLink/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ke||(e.DocumentLinkResolveRequest=Ke={}));var qe;(function(e){e.method=`textDocument/formatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(qe||(e.DocumentFormattingRequest=qe={}));var Je;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Je||(e.DocumentRangeFormattingRequest=Je={}));var Ye;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ye||(e.DocumentRangesFormattingRequest=Ye={}));var Xe;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Xe||(e.DocumentOnTypeFormattingRequest=Xe={}));var Ze;(function(e){e.Identifier=1})(Ze||(e.PrepareSupportDefaultBehavior=Ze={}));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 $e;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})($e||(e.PrepareRenameRequest=$e={}));var et;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(et||(e.ExecuteCommandRequest=et={}));var tt;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(`workspace/applyEdit`)})(tt||(e.ApplyWorkspaceEditRequest=tt={}))})),rn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;let t=ae();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}e.createProtocolConnection=n})),an=/* @__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(ae(),e),n((Mt(),d(A)),e),n(Nt(),e),n(nn(),e);var r=rn();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={}))})),on=/* @__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=oe();n(oe(),e),n(an(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}e.createProtocolConnection=i})),sn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensBuilder=e.SemanticTokensDiff=e.SemanticTokensFeature=void 0;let t=on();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()}}}})),cn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionFeature=void 0;let t=on();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)))}}}})),ln=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TextDocuments=void 0;let t=on();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())})}}})),un=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDocuments=e.NotebookSyncFeature=void 0;let t=on(),n=ln();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])}}})),dn=/* @__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})),fn=/* @__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})),pn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.attachPartialResult=e.ProgressFeature=e.attachWorkDone=void 0;let t=on(),n=fn();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})),mn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationFeature=void 0;let t=on(),n=dn();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)}}})),hn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceFoldersFeature=void 0;let t=on();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}}})),gn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyFeature=void 0;let t=on();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)))}}}}})),_n=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentFeature=void 0;let t=on();e.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(t.ShowDocumentRequest.type,e)}}})),vn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FileOperationsFeature=void 0;let t=on();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))}}})),yn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeFeature=void 0;let t=on();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))}}})),bn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyFeature=void 0;let t=on();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)))}}}}})),xn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueFeature=void 0;let t=on();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)))}}}})),Sn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeFeature=void 0;let t=on();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)))}}}}})),Cn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintFeature=void 0;let t=on();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))}}}})),wn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticFeature=void 0;let t=on();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)))}}}})),Tn=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerFeature=void 0;let t=on();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)))}}}}})),En=/* @__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=on(),n=dn(),r=fn(),i=pn(),a=mn(),o=hn(),s=gn(),c=sn(),l=_n(),u=vn(),d=yn(),f=bn(),p=xn(),m=Sn(),h=Cn(),g=wn(),_=un(),v=Tn();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`)})}},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._LanguagesImpl=ne;let re=(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)(ne)))))))));var ie=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=ie;let ae=(0,_.NotebookSyncFeature)(ie);function oe(e,t){return function(n){return t(e(n))}}e.combineConsoleFeatures=oe;function A(e,t){return function(n){return t(e(n))}}e.combineTelemetryFeatures=A;function se(e,t){return function(n){return t(e(n))}}e.combineTracerFeatures=se;function j(e,t){return function(n){return t(e(n))}}e.combineClientFeatures=j;function ce(e,t){return function(n){return t(e(n))}}e.combineWindowFeatures=ce;function M(e,t){return function(n){return t(e(n))}}e.combineWorkspaceFeatures=M;function N(e,t){return function(n){return t(e(n))}}e.combineLanguagesFeatures=N;function P(e,t){return function(n){return t(e(n))}}e.combineNotebooksFeatures=P;function le(e,t){function n(e,t,n){return e&&t?n(e,t):e||t}return{__brand:`features`,console:n(e.console,t.console,oe),tracer:n(e.tracer,t.tracer,se),telemetry:n(e.telemetry,t.telemetry,A),client:n(e.client,t.client,j),window:n(e.window,t.window,ce),workspace:n(e.workspace,t.workspace,M),languages:n(e.languages,t.languages,N),notebooks:n(e.notebooks,t.notebooks,P)}}e.combineFeatures=le;function ue(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(re)):new re,m=a&&a.notebooks?new(a.notebooks(ae)):new ae,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=ue})),Dn=/* @__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=sn();Object.defineProperty(e,"SemanticTokensBuilder",{enumerable:!0,get:function(){return r.SemanticTokensBuilder}});let i=cn();n(on(),e);let a=ln();Object.defineProperty(e,"TextDocuments",{enumerable:!0,get:function(){return a.TextDocuments}});let o=un();Object.defineProperty(e,"NotebookDocuments",{enumerable:!0,get:function(){return o.NotebookDocuments}}),n(En(),e);var s;(function(e){e.all={__brand:`features`,languages:i.InlineCompletionFeature}})(s||(e.ProposedFeatures=s={}))})),On=/* @__PURE__ */ s(((e,t)=>{t.exports=on()})),kn=/* @__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=Dn();n(On(),e),n(Dn(),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})),An=/* @__PURE__ */ s(((e,t)=>{t.exports=kn()})),jn=kn(),Mn=An();function Nn(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 Pn(e,t,n){if(n===`boolean`&&typeof e==`string`&&(e=Nn(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(!Pn(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(),!Pn(n,a))return!1;for(r=0;r<n.length;r++)if(!Pn(e[n[r]],t[n[r]]))return!1}return!0}function Fn(e){return typeof e==`number`}function In(e){return e!==void 0}function Ln(e){return typeof e==`boolean`}function Rn(e){return typeof e==`string`}function zn(e){return Symbol.iterator in Object(e)}function Bn(e){return e?e instanceof Error?e.stack??e.toString():e.toString():`null`}var Vn=class{constructor(e){this.connection=e}send(e){this.connection.telemetry.logEvent(e)}sendError(e,t){this.send({name:e,type:`track`,properties:{error:Bn(t)}})}sendTrack(e,t){this.send({name:e,type:`track`,properties:t})}},Hn=/* @__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}}else 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}}else 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})),Un=/* @__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})})()})),Wn=/* @__PURE__ */ u(Hn()),Gn=Un(),Kn={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}},qn={};function Jn(e){var t=qn[e];if(t!==void 0)return t.exports;var n=qn[e]={exports:{}};return Kn[e](n,n.exports,Jn),n.exports}let Yn;Jn.d=(e,t)=>{for(var n in t)Jn.o(t,n)&&!Jn.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},Jn.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),typeof process==`object`?Yn=process.platform===`win32`:typeof navigator==`object`&&(Yn=navigator.userAgent.indexOf(`Windows`)>=0);const Xn=/^\w[\w\d+.-]*$/,Zn=/^\//,Qn=/^\/\//;function $n(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&&!Xn.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!Zn.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(Qn.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 er=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;var tr=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||``,$n(this,a))}get fsPath(){return sr(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 rr(t,n,r,i,a)}static parse(e,t=!1){let n=er.exec(e);return n?new rr(n[2]||``,dr(n[4]||``),dr(n[5]||``),dr(n[7]||``),dr(n[9]||``),t):new rr(``,``,``,``,``)}static file(e){let t=``;if(Yn&&(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 rr(`file`,t,e,``,``)}static from(e){let t=new rr(e.scheme,e.authority,e.path,e.query,e.fragment);return $n(t,!0),t}toString(e=!1){return cr(this,e)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{let e=new rr(t);return e._formatted=t.external,e._fsPath=t._sep===nr?t.fsPath:null,e}}return t}};const nr=Yn?1:void 0;var rr=class extends tr{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=sr(this,!1),this._fsPath}toString(e=!1){return e?cr(this,!0):(this._formatted||=cr(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=nr),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 ir={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 ar(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=ir[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 or(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+=ir[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}function sr(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,Yn&&(n=n.replace(/\//g,`\\`)),n}function cr(e,t){let n=t?or:ar,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:ar(c,!1,!1)),r}function lr(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+lr(e.substr(3)):e}}const ur=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function dr(e){return e.match(ur)?e.replace(ur,e=>lr(e)):e}var fr=Jn(975);const pr=fr.posix||fr;var mr;(function(e){e.joinPath=function(e,...t){return e.with({path:pr.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=pr.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=pr.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return pr.basename(e.path)},e.extname=function(e){return pr.extname(e.path)}})(mr||={});var hr;(function(e){e.type=new jn.NotificationType(`json/schemaAssociations`)})(hr||={});var gr;(function(e){e.type=new jn.NotificationType(`yaml/registerCustomSchemaRequest`)})(gr||={});var _r;(function(e){e.type=new jn.NotificationType(`yaml/registerContentRequest`)})(_r||={});var vr;(function(e){e.type=new jn.NotificationType(`yaml/resultLimitReached`)})(vr||={});var yr;(function(e){e.type=new jn.RequestType(`vscode/content`)})(yr||={});var br;(function(e){e.type=new jn.RequestType(`custom/schema/content`)})(br||={});var xr;(function(e){e.type=new jn.RequestType(`custom/schema/request`)})(xr||={});var Sr;(function(e){e.type=new jn.RequestType(`json/colorSymbols`)})(Sr||={});var Cr;(function(e){e.type=new jn.RequestType(`json/schema/modify`)})(Cr||={});var wr;(function(e){e.type=new jn.NotificationType(`yaml/supportSchemaSelection`),e.getSchema=new jn.RequestType(`yaml/get/jsonSchema`),e.getAllSchemas=new jn.RequestType(`yaml/get/all/jsonSchemas`),e.schemaStoreInitialized=new jn.NotificationType(`yaml/schema/store/initialized`)})(wr||={});const Tr=e=>/^(((\.\.?)|([\w-@. ]+))(\/|\\\\?))*[\w-. ]*\.[\w-]+$/i.test(e),Er=(e,t,n)=>{for(let t of e){let e=n.slice(t.name.length);if(n.startsWith(t.name)&&(e.startsWith(`/`)||e.startsWith(Wn.sep))){let n=tr.parse(t.uri).fsPath;return tr.file((0,Wn.join)(n,e)).toString()}}return t?tr.file((0,Wn.join)(t.fsPath,n)).toString():(0,Wn.normalize)(n)},Dr=(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),Or=/* @__PURE__ */ new Set([429,502,503,504]),kr=/* @__PURE__ */ new Set([`ECONNRESET`,`ETIMEDOUT`,`ECONNABORTED`,`EPIPE`,`EAI_AGAIN`]),Ar=1e3,jr=e=>new Promise(t=>setTimeout(t,e));function Mr(e){return e?.code&&kr.has(e.code)?!0:typeof e?.status==`number`&&Or.has(e.status)}function Nr(e,t){let n=e?.[`retry-after`]??e?.[`Retry-After`];if(!n)return;let r=Number(n);if(!Number.isNaN(r))return r>=0?r*1e3:void 0;let i=Date.parse(n);return Number.isNaN(i)?void 0:Math.max(0,i-t)}function Pr(e,t){let n=Nr(e?.headers,Date.now());if(n!==void 0)return Math.min(n,Ar);let r=200*2**t,i=Math.random()*200;return Math.min(r+i,Ar)}async function Fr(e,t,n={}){let r=n.maxRetries??2,i=n.delay??jr;for(let n=0;;n++)try{return(await(0,Gn.xhr)({url:e,followRedirects:5,headers:t})).responseText}catch(e){if(n>=r||!Mr(e))throw e;await i(Pr(e,n))}}var Ir;(function(e){e.type=new jn.RequestType(`fs/readUri`)})(Ir||={});const Lr=async(e,t,n,r,i,a,o,s)=>{if(!t)return Promise.reject(`No schema specified`);if(Tr(t)){if(n.length===1&&o){let r=tr.parse(n[0].uri),i=r.path,a=r.with({path:(0,Wn.join)(i,t)});try{return e.sendRequest(Ir.type,a.toString())}catch(t){e.window.showErrorMessage(`failed to get content of '${a}': ${t}`)}}else t=Er(n,r,t)}let c=tr.parse(t).scheme.toLowerCase();if(/^[a-z]:[\\/]/i.test(t)){let e=tr.file(t);c=e.scheme.toLowerCase(),t=e.toString()}if(c===`file`){let e=tr.parse(t).fsPath;return a.readFile(e,`UTF-8`).catch(()=>``)}if(c===`http`||c===`https`){if(i)try{return await e.sendRequest(yr.type,t)}catch(e){throw e.message}let n={"Accept-Encoding":`gzip, deflate`,"User-Agent":`yaml-language-server/${typeof process<`u`&&`1.25.0`||`unknown`} (RedHat)${typeof process<`u`&&process.versions?.node?` node/${process.versions.node}`:``}${typeof process<`u`&&process.platform?` (${process.platform})`:``}`};try{return await Fr(t,n,s)}catch(e){throw e.responseText||(0,Gn.getErrorStatusDescription)(e.status)||e.toString()}}return e.sendRequest(br.type,t)},Rr={resolveRelativePath:(e,t)=>new URL(e,t).toString()};var zr;(function(e){e.JUMP_TO_SCHEMA=`jumpToSchema`})(zr||={});const Br=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 Vr(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 Hr(e){return e.replace(/[-\\{}+?|^$.,[\]()#\s]/g,`\\$&`).replace(/[*]/g,`.*`)}function Ur(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 Wr(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 Gr(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 Kr(e){let t=``;Vr(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 qr=class{constructor(e){try{this.patternRegExp=RegExp(Hr(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 Jr(e,t){for(let n of e)n.isKubernetes=t}function Yr(e,t){for(let n in t){let r=t[n];if(new qr(r).matchesPattern(e.uri))return!0}return!1}var Xr=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)return[];let n=await this.resolveFormatterSettings(t);if(n.enable===!1)return[];let r={tabWidth:e.options.tabSize,...n};return this.languageService.doFormat(t,r)}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,Yr(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(vr.type,`${Wn.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 resolveFormatterSettings(e){let t=this.yamlSettings.yamlFormatterSettings;if(this.yamlSettings.hasConfigurationCapability&&this.connection.workspace?.getConfiguration)try{let[n,r]=await this.connection.workspace.getConfiguration([{section:`yaml.format`,scopeUri:e.uri},{section:`[${e.languageId}]`,scopeUri:e.uri}]),i={...t,...n??{}};return typeof r?.[`yaml.format.enable`]==`boolean`&&(i.enable=r[`yaml.format.enable`]),i}catch{}return t}},Zr=class{constructor(e,t,n,r){this.connection=e,this.languageService=t,this.yamlSettings=n,this.settingsHandler=r}registerHandlers(){this.connection.onNotification(hr.type,e=>this.schemaAssociationNotificationHandler(e)),this.connection.onNotification(gr.type,()=>this.dynamicSchemaRequestHandler()),this.connection.onNotification(_r.type,()=>this.vscodeContentRequestHandler()),this.connection.onNotification(wr.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(xr.type,e)))}vscodeContentRequestHandler(){this.yamlSettings.useVSCodeContentRequest=!0}schemaSelectionRequestHandler(){this.yamlSettings.useSchemaSelectionRequests=!0}},Qr=/* @__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})),$r=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=Qr();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}}})),L=/* @__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=Qr(),n=$r();var r=Qr();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=$r();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?`
442
+ `:``},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._)`!${A(e)}`}e.not=te;let ne=oe(e.operators.AND);function re(...e){return e.reduce(ne)}e.and=re;let ie=oe(e.operators.OR);function ae(...e){return e.reduce(ie)}e.or=ae;function oe(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${A(n)} ${e} ${A(r)}`}function A(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),R=/* @__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=L(),n=Qr();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})),ei=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L();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`)}})),ti=/* @__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=L(),n=R(),r=ei();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}){
443
+ /* istanbul ignore if */
444
+ 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])}})),ni=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=ti(),n=L(),r=ei(),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)}})),ri=/* @__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})),ii=/* @__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})),ai=/* @__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=ri(),n=ii(),r=ti(),i=L(),a=R();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
445
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
446
+ || (${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"
447
+ || ${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}}})),oi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=L(),n=R();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)}`)}})),si=/* @__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=L(),n=R(),r=ei(),i=R();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;
448
+ /* istanbul ignore if */
449
+ 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})),ci=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=L(),n=ei(),r=si(),i=ti();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){
450
+ /* istanbul ignore if */
451
+ 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})),li=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=L(),n=R();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})),ui=/* @__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}})),di=/* @__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`)}})),fi=/* @__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=R(),n=ui(),r=di(),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})),pi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=ni(),n=ai(),r=ii(),i=ai(),a=oi(),o=ci(),s=li(),c=L(),l=ei(),u=fi(),d=R(),f=ti();function p(e){S(e)&&(w(e),x(e))?_(e):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){S(e)&&(w(e),x(e))?C(e,n):(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 re(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);re(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&&ne(e),t.return((0,c._)`${l.default.errors} === 0`))}function ne({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 re(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(()=>le(e,`$ref`,h.all.$ref.definition));return}p.jtd||ae(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)),ie(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):ie(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function ie(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)&&le(e,n.keyword,n.definition,t.type)})}function ae(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(oe(e,t),e.opts.allowUnionTypes||A(e,t),se(e,e.dataTypes))}function oe(e,t){t.length&&(e.dataTypes.length?(t.forEach(t=>{ce(e.dataTypes,t)||N(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),M(e,t)):e.dataTypes=t)}function A(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&N(e,`use allowUnionTypes to allow union type keyword`)}function se(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=>j(t,e))&&N(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function j(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function ce(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function M(e,t){let n=[];for(let r of e.dataTypes)ce(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function N(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var P=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`,fe(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){e===void 0?(this.error(),this.allErrors||this.gen.if(!1)):(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){t?(this.setParams(t),this._error(e,n),this.setParams({})):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){
452
+ /* istanbul ignore if */
453
+ 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=P;function le(e,t,n,r){let i=new P(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 ue=/^\/(?:[^~]|~0|~1)*$/,de=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function fe(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!ue.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=de.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=fe})),mi=/* @__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}}})),hi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=fi();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))}}})),gi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=L(),n=mi(),r=ei(),i=fi(),a=R(),o=pi();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}})),_i=/* @__PURE__ */ c({$id:()=>vi,additionalProperties:()=>!1,default:()=>Ci,description:()=>yi,properties:()=>Si,required:()=>xi,type:()=>bi}),vi,yi,bi,xi,Si,Ci,wi=o((()=>{vi=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,yi=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,bi=`object`,xi=[`$data`],Si={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},Ci={$id:vi,description:yi,type:bi,required:xi,properties:Si,additionalProperties:!1}})),Ti=/* @__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;else 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}else{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+=ie(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 ne(e){return ee(e,c)}function re(e){return ee(e,c)}function ie(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 ae(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+=ie(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 oe(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 A(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:A,reescapeHostDelimiters:E,normalizePercentEncoding:D,normalizePathEncoding:O,serializePathEncoding:k,normalizeQueryFragmentEncoding:ae,encodeUserinfo:te,encodeQuery:ne,encodeFragment:re,escapePreservingEscapes:oe,removeDotSegments:S,isIPv4:r,isUUID:n,normalizeIPv6:b,stringArrayToHexStripped:f}})),Ei=/* @__PURE__ */ s(((e,t)=>{let{isUUID:n}=Ti(),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}})),Di=/* @__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}=Ti(),{SCHEMES:m,getSchemeHandler:h}=Ei(),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=ie(e,t):typeof e==`object`&&(e=re(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}=ne(e,i),{parsed:d,malformedAuthorityOrPort:p,malformedPercentEncoding:m,malformedSchemeSpecific:g,malformedHost:_,malformedScheme:v}=ne(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=re(C(e,n),n),t=re(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=oe(e,n),i=oe(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 ne(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 re(e,t){return ne(e,t).parsed}function ie(e,t){return ae(e,t).normalized}function ae(e,t){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}=ne(e,t);return{normalized:r||i||a||o||s?e:C(n,t),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}}function oe(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}=ae(n,t);return i||a||o||s||c?void 0:r}let A={SCHEMES:m,normalize:y,resolve:b,resolveComponent:x,equal:S,serialize:C,parse:re};t.exports=A,t.exports.default=A,t.exports.fastUri=A})),Oi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Di();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),ki=/* @__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=pi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=L();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=mi(),i=hi(),a=ri(),o=gi(),s=L(),c=fi(),l=ai(),u=R(),f=(wi(),d(_i).default),p=Oi(),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;re.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]=ae(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){
454
+ /* istanbul ignore if */
455
+ 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);else{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?ne.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 ne(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 re(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=ae(t)),e.validateSchema=this.compile(t,!0))}let ie={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function ae(e){return{anyOf:[e,ie]}}})),Ai=/* @__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`)}}})),ji=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=hi(),n=si(),r=L(),i=ei(),a=gi(),o=R(),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})),Mi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ai(),n=ji();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),Ni=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),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})`)}}})),Pi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L();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}))`)}}})),Fi=/* @__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`})),Ii=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R(),r=Fi();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}`)}}})),Li=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=si(),n=R(),r=L();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})`)}}}})),Ri=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L();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}`)}}})),zi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=si(),n=L(),r=R();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)}}}})),Bi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L();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}`)}}})),Vi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ui();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Hi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ai(),n=L(),r=R(),i=Vi();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)})))}}}})),Ui=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R(),r=Vi();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}`)}}})),Wi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R(),r=Vi();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{
456
+ /* istanbul ignore if */
457
+ 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}`}}}})),Gi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ni(),n=Pi(),r=Ii(),i=Li(),a=Ri(),o=zi(),s=Bi(),c=Hi(),l=Ui(),u=Wi();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]})),Ki=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=L(),n=R(),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;Array.isArray(a)?i(e,a):(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`)}};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})),qi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=L(),n=R(),r=si(),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})),Ji=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=qi();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),Yi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R(),r=si(),i=Ki();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)))}}})),Xi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R();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)))}}}})),Zi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=L(),n=R(),r=si();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},
458
+ missingProperty: ${i},
459
+ depsCount: ${n},
460
+ 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})),Qi=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R();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)}}})),$i=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=si(),n=L(),r=ei(),i=R();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;
461
+ /* istanbul ignore if */
462
+ 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);else if(o===!1)e.setParams({additionalProperty:t}),e.error(),d||a.break();else 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)}}}})),ea=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pi(),n=si(),r=R(),i=$i();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)}}}})),ta=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=si(),n=L(),r=R(),i=R();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())})})}}}})),na=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=R();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`}}})),ra=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:si().validateUnion,error:{message:`must match a schema in anyOf`}}})),ia=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R();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;
463
+ /* istanbul ignore if */
464
+ 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)})})}}}})),aa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=R();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;
465
+ /* istanbul ignore if */
466
+ 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)})}}})),oa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R(),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})),sa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=R();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`)}}})),ca=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ki(),n=Ji(),r=qi(),i=Yi(),a=Xi(),o=Zi(),s=Qi(),c=$i(),l=ea(),u=ta(),d=na(),f=ra(),p=ia(),m=aa(),h=oa(),g=sa();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=_})),la=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L();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})`}}}}})),ua=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[la().default]})),da=/* @__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`]})),fa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Mi(),n=Gi(),r=ca(),i=ua(),a=da();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),pa=/* @__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={}))})),ma=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=pa(),r=gi(),i=hi(),a=R();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}}}}})),ha=/* @__PURE__ */ c({$id:()=>_a,$schema:()=>ga,default:()=>Sa,definitions:()=>ya,properties:()=>xa,title:()=>va,type:()=>ba}),ga,_a,va,ya,ba,xa,Sa,Ca=o((()=>{ga=`http://json-schema.org/draft-07/schema#`,_a=`http://json-schema.org/draft-07/schema#`,va=`Core schema meta-schema`,ya={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:[]}},ba=[`object`,`boolean`],xa={$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:`#`}},Sa={$schema:ga,$id:_a,title:va,definitions:ya,type:ba,properties:xa,default:!0}})),wa=/* @__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=ki(),r=fa(),i=ma(),a=(Ca(),d(ha).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=pi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=L();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=mi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=hi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),Ta=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=L(),n=ei(),r=gi(),i=ji(),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})),Ea=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=L(),n=ei(),r=ji(),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})),Da=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ta(),n=R();e.default={keyword:`$recursiveAnchor`,schemaType:`boolean`,code(e){e.schema?(0,t.dynamicAnchor)(e,``):(0,n.checkStrictMode)(e.it,`$recursiveAnchor: false is ignored`)}}})),Oa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ea();e.default={keyword:`$recursiveRef`,schemaType:`string`,code:e=>(0,t.dynamicRef)(e,e.schema)}})),ka=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ta(),n=Ea(),r=Da(),i=Oa();e.default=[t.default,n.default,r.default,i.default]})),Aa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Zi();e.default={keyword:`dependentRequired`,type:`object`,schemaType:`object`,error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}})),ja=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Zi();e.default={keyword:`dependentSchemas`,type:`object`,schemaType:`object`,code:e=>(0,t.validateSchemaDeps)(e)}})),Ma=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=R();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`)}}})),Na=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Aa(),n=ja(),r=Ma();e.default=[t.default,n.default,r.default]})),Pa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R(),r=ei();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;
467
+ /* istanbul ignore if */
468
+ 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();else 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)}}}})),Fa=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=L(),n=R();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())})}}}})),Ia=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Pa(),n=Fa();e.default=[t.default,n.default]})),La=/* @__PURE__ */ c({$id:()=>za,$recursiveAnchor:()=>!0,$schema:()=>Ra,$vocabulary:()=>Ba,allOf:()=>Ha,default:()=>Ga,properties:()=>Wa,title:()=>Va,type:()=>Ua}),Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka=o((()=>{Ra=`https://json-schema.org/draft/2019-09/schema`,za=`https://json-schema.org/draft/2019-09/schema`,Ba={"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},Va=`Core and Validation specifications meta-schema`,Ha=[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format`},{$ref:`meta/content`}],Ua=[`object`,`boolean`],Wa={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`}]}}},Ga={$schema:Ra,$id:za,$vocabulary:Ba,$recursiveAnchor:!0,title:Va,allOf:Ha,type:Ua,properties:Wa}})),qa=/* @__PURE__ */ c({$defs:()=>eo,$id:()=>Ya,$recursiveAnchor:()=>!0,$schema:()=>Ja,$vocabulary:()=>Xa,default:()=>to,properties:()=>$a,title:()=>Za,type:()=>Qa}),Ja,Ya,Xa,Za,Qa,$a,eo,to,no=o((()=>{Ja=`https://json-schema.org/draft/2019-09/schema`,Ya=`https://json-schema.org/draft/2019-09/meta/applicator`,Xa={"https://json-schema.org/draft/2019-09/vocab/applicator":!0},Za=`Applicator vocabulary meta-schema`,Qa=[`object`,`boolean`],$a={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:`#`}},eo={schemaArray:{type:`array`,minItems:1,items:{$recursiveRef:`#`}}},to={$schema:Ja,$id:Ya,$vocabulary:Xa,$recursiveAnchor:!0,title:Za,type:Qa,properties:$a,$defs:eo}})),ro=/* @__PURE__ */ c({$id:()=>ao,$recursiveAnchor:()=>!0,$schema:()=>io,$vocabulary:()=>oo,default:()=>uo,properties:()=>lo,title:()=>so,type:()=>co}),io,ao,oo,so,co,lo,uo,fo=o((()=>{io=`https://json-schema.org/draft/2019-09/schema`,ao=`https://json-schema.org/draft/2019-09/meta/content`,oo={"https://json-schema.org/draft/2019-09/vocab/content":!0},so=`Content vocabulary meta-schema`,co=[`object`,`boolean`],lo={contentMediaType:{type:`string`},contentEncoding:{type:`string`},contentSchema:{$recursiveRef:`#`}},uo={$schema:io,$id:ao,$vocabulary:oo,$recursiveAnchor:!0,title:so,type:co,properties:lo}})),po=/* @__PURE__ */ c({$id:()=>ho,$recursiveAnchor:()=>!0,$schema:()=>mo,$vocabulary:()=>go,default:()=>bo,properties:()=>yo,title:()=>_o,type:()=>vo}),mo,ho,go,_o,vo,yo,bo,xo=o((()=>{mo=`https://json-schema.org/draft/2019-09/schema`,ho=`https://json-schema.org/draft/2019-09/meta/core`,go={"https://json-schema.org/draft/2019-09/vocab/core":!0},_o=`Core vocabulary meta-schema`,vo=[`object`,`boolean`],yo={$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:{}}},bo={$schema:mo,$id:ho,$vocabulary:go,$recursiveAnchor:!0,title:_o,type:vo,properties:yo}})),So=/* @__PURE__ */ c({$id:()=>wo,$recursiveAnchor:()=>!0,$schema:()=>Co,$vocabulary:()=>To,default:()=>ko,properties:()=>Oo,title:()=>Eo,type:()=>Do}),Co,wo,To,Eo,Do,Oo,ko,Ao=o((()=>{Co=`https://json-schema.org/draft/2019-09/schema`,wo=`https://json-schema.org/draft/2019-09/meta/format`,To={"https://json-schema.org/draft/2019-09/vocab/format":!0},Eo=`Format vocabulary meta-schema`,Do=[`object`,`boolean`],Oo={format:{type:`string`}},ko={$schema:Co,$id:wo,$vocabulary:To,$recursiveAnchor:!0,title:Eo,type:Do,properties:Oo}})),jo=/* @__PURE__ */ c({$id:()=>No,$recursiveAnchor:()=>!0,$schema:()=>Mo,$vocabulary:()=>Po,default:()=>Ro,properties:()=>Lo,title:()=>Fo,type:()=>Io}),Mo,No,Po,Fo,Io,Lo,Ro,zo=o((()=>{Mo=`https://json-schema.org/draft/2019-09/schema`,No=`https://json-schema.org/draft/2019-09/meta/meta-data`,Po={"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},Fo=`Meta-data vocabulary meta-schema`,Io=[`object`,`boolean`],Lo={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}},Ro={$schema:Mo,$id:No,$vocabulary:Po,$recursiveAnchor:!0,title:Fo,type:Io,properties:Lo}})),Bo=/* @__PURE__ */ c({$defs:()=>qo,$id:()=>Ho,$recursiveAnchor:()=>!0,$schema:()=>Vo,$vocabulary:()=>Uo,default:()=>Jo,properties:()=>Ko,title:()=>Wo,type:()=>Go}),Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo=o((()=>{Vo=`https://json-schema.org/draft/2019-09/schema`,Ho=`https://json-schema.org/draft/2019-09/meta/validation`,Uo={"https://json-schema.org/draft/2019-09/vocab/validation":!0},Wo=`Validation vocabulary meta-schema`,Go=[`object`,`boolean`],Ko={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}]}},qo={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:[]}},Jo={$schema:Vo,$id:Ho,$vocabulary:Uo,$recursiveAnchor:!0,title:Wo,type:Go,properties:Ko,$defs:qo}})),Xo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=(Ka(),d(La).default),n=(no(),d(qa).default),r=(fo(),d(ro).default),i=(xo(),d(po).default),a=(Ao(),d(So).default),o=(zo(),d(jo).default),s=(Yo(),d(Bo).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})),Zo=/* @__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=ki(),r=fa(),i=ka(),a=Na(),o=Ia(),s=ma(),c=Xo(),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=pi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=L();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=mi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=hi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})),Qo=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Mi(),n=Gi(),r=ca(),i=ka(),a=Na(),o=Ia(),s=ua(),c=da();e.default=[i.default,t.default,n.default,(0,r.default)(!0),s.default,c.metadataVocabulary,c.contentVocabulary,a.default,o.default]})),$o=/* @__PURE__ */ c({$comment:()=>ss,$dynamicAnchor:()=>rs,$id:()=>ts,$schema:()=>es,$vocabulary:()=>ns,allOf:()=>as,default:()=>ls,properties:()=>cs,title:()=>is,type:()=>os}),es,ts,ns,rs,is,as,os,ss,cs,ls,us=o((()=>{es=`https://json-schema.org/draft/2020-12/schema`,ts=`https://json-schema.org/draft/2020-12/schema`,ns={"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},rs=`meta`,is=`Core and Validation specifications meta-schema`,as=[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/unevaluated`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format-annotation`},{$ref:`meta/content`}],os=[`object`,`boolean`],ss=`This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.`,cs={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}},ls={$schema:es,$id:ts,$vocabulary:ns,$dynamicAnchor:rs,title:is,allOf:as,type:os,$comment:ss,properties:cs}})),ds=/* @__PURE__ */ c({$defs:()=>ys,$dynamicAnchor:()=>hs,$id:()=>ps,$schema:()=>fs,$vocabulary:()=>ms,default:()=>bs,properties:()=>vs,title:()=>gs,type:()=>_s}),fs,ps,ms,hs,gs,_s,vs,ys,bs,xs=o((()=>{fs=`https://json-schema.org/draft/2020-12/schema`,ps=`https://json-schema.org/draft/2020-12/meta/applicator`,ms={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},hs=`meta`,gs=`Applicator vocabulary meta-schema`,_s=[`object`,`boolean`],vs={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`}},ys={schemaArray:{type:`array`,minItems:1,items:{$dynamicRef:`#meta`}}},bs={$schema:fs,$id:ps,$vocabulary:ms,$dynamicAnchor:hs,title:gs,type:_s,properties:vs,$defs:ys}})),Ss=/* @__PURE__ */ c({$dynamicAnchor:()=>Es,$id:()=>ws,$schema:()=>Cs,$vocabulary:()=>Ts,default:()=>As,properties:()=>ks,title:()=>Ds,type:()=>Os}),Cs,ws,Ts,Es,Ds,Os,ks,As,js=o((()=>{Cs=`https://json-schema.org/draft/2020-12/schema`,ws=`https://json-schema.org/draft/2020-12/meta/unevaluated`,Ts={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},Es=`meta`,Ds=`Unevaluated applicator vocabulary meta-schema`,Os=[`object`,`boolean`],ks={unevaluatedItems:{$dynamicRef:`#meta`},unevaluatedProperties:{$dynamicRef:`#meta`}},As={$schema:Cs,$id:ws,$vocabulary:Ts,$dynamicAnchor:Es,title:Ds,type:Os,properties:ks}})),Ms=/* @__PURE__ */ c({$dynamicAnchor:()=>Is,$id:()=>Ps,$schema:()=>Ns,$vocabulary:()=>Fs,default:()=>Bs,properties:()=>zs,title:()=>Ls,type:()=>Rs}),Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs=o((()=>{Ns=`https://json-schema.org/draft/2020-12/schema`,Ps=`https://json-schema.org/draft/2020-12/meta/content`,Fs={"https://json-schema.org/draft/2020-12/vocab/content":!0},Is=`meta`,Ls=`Content vocabulary meta-schema`,Rs=[`object`,`boolean`],zs={contentEncoding:{type:`string`},contentMediaType:{type:`string`},contentSchema:{$dynamicRef:`#meta`}},Bs={$schema:Ns,$id:Ps,$vocabulary:Fs,$dynamicAnchor:Is,title:Ls,type:Rs,properties:zs}})),Hs=/* @__PURE__ */ c({$defs:()=>Xs,$dynamicAnchor:()=>Ks,$id:()=>Ws,$schema:()=>Us,$vocabulary:()=>Gs,default:()=>Zs,properties:()=>Ys,title:()=>qs,type:()=>Js}),Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs=o((()=>{Us=`https://json-schema.org/draft/2020-12/schema`,Ws=`https://json-schema.org/draft/2020-12/meta/core`,Gs={"https://json-schema.org/draft/2020-12/vocab/core":!0},Ks=`meta`,qs=`Core vocabulary meta-schema`,Js=[`object`,`boolean`],Ys={$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`}}},Xs={anchorString:{type:`string`,pattern:`^[A-Za-z_][-A-Za-z0-9._]*$`},uriString:{type:`string`,format:`uri`},uriReferenceString:{type:`string`,format:`uri-reference`}},Zs={$schema:Us,$id:Ws,$vocabulary:Gs,$dynamicAnchor:Ks,title:qs,type:Js,properties:Ys,$defs:Xs}})),$s=/* @__PURE__ */ c({$dynamicAnchor:()=>rc,$id:()=>tc,$schema:()=>ec,$vocabulary:()=>nc,default:()=>sc,properties:()=>oc,title:()=>ic,type:()=>ac}),ec,tc,nc,rc,ic,ac,oc,sc,cc=o((()=>{ec=`https://json-schema.org/draft/2020-12/schema`,tc=`https://json-schema.org/draft/2020-12/meta/format-annotation`,nc={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},rc=`meta`,ic=`Format vocabulary meta-schema for annotation results`,ac=[`object`,`boolean`],oc={format:{type:`string`}},sc={$schema:ec,$id:tc,$vocabulary:nc,$dynamicAnchor:rc,title:ic,type:ac,properties:oc}})),lc=/* @__PURE__ */ c({$dynamicAnchor:()=>pc,$id:()=>dc,$schema:()=>uc,$vocabulary:()=>fc,default:()=>_c,properties:()=>gc,title:()=>mc,type:()=>hc}),uc,dc,fc,pc,mc,hc,gc,_c,vc=o((()=>{uc=`https://json-schema.org/draft/2020-12/schema`,dc=`https://json-schema.org/draft/2020-12/meta/meta-data`,fc={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},pc=`meta`,mc=`Meta-data vocabulary meta-schema`,hc=[`object`,`boolean`],gc={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}},_c={$schema:uc,$id:dc,$vocabulary:fc,$dynamicAnchor:pc,title:mc,type:hc,properties:gc}})),yc=/* @__PURE__ */ c({$defs:()=>Dc,$dynamicAnchor:()=>Cc,$id:()=>xc,$schema:()=>bc,$vocabulary:()=>Sc,default:()=>Oc,properties:()=>Ec,title:()=>wc,type:()=>Tc}),bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,kc=o((()=>{bc=`https://json-schema.org/draft/2020-12/schema`,xc=`https://json-schema.org/draft/2020-12/meta/validation`,Sc={"https://json-schema.org/draft/2020-12/vocab/validation":!0},Cc=`meta`,wc=`Validation vocabulary meta-schema`,Tc=[`object`,`boolean`],Ec={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`}}},Dc={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:[]}},Oc={$schema:bc,$id:xc,$vocabulary:Sc,$dynamicAnchor:Cc,title:wc,type:Tc,properties:Ec,$defs:Dc}})),Ac=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=(us(),d($o).default),n=(xs(),d(ds).default),r=(js(),d(Ss).default),i=(Vs(),d(Ms).default),a=(Qs(),d(Hs).default),o=(cc(),d($s).default),s=(vc(),d(lc).default),c=(kc(),d(yc).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})),jc=/* @__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=ki(),r=Qo(),i=ma(),a=Ac(),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=pi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=L();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=mi();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var d=hi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})),Mc=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[`$schema`,`id`,`$defs`,{keyword:`$comment`},`definitions`,ji().default]})),Nc=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ki(),n=L().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})),Pc=/* @__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}`)}}})),Fc=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Nc(),n=Pc(),r=Pi(),i=Ii(),a=Li(),o=Ri(),s=zi(),c=Bi(),l=Hi(),u=Ui(),d=Wi();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]})),Ic=/* @__PURE__ */ s((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Mc(),n=Fc(),r=ca(),i=ua();e.default=[t.default,n.default,r.default(),i.default,[`title`,`description`,`default`]]})),Lc=/* @__PURE__ */ c({$schema:()=>zc,default:()=>Gc,definitions:()=>Vc,dependencies:()=>Wc,description:()=>Bc,id:()=>Rc,properties:()=>Uc,type:()=>Hc}),Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc=o((()=>{Rc=`http://json-schema.org/draft-04/schema#`,zc=`http://json-schema.org/draft-04/schema#`,Bc=`Core schema meta-schema`,Vc={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}},Hc=`object`,Uc={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:`#`}},Wc={exclusiveMaximum:[`maximum`],exclusiveMinimum:[`minimum`]},Gc={id:Rc,$schema:zc,description:Bc,definitions:Vc,type:Hc,properties:Uc,dependencies:Wc,default:{}}})),qc=/* @__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=ki(),r=Ic(),i=ma(),a=(Kc(),d(Lc).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=ki();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=ki();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}})})),Jc=/* @__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}}})),Yc=/* @__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}}})),Xc=/* @__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}}})),Zc=/* @__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}}})),Qc=/* @__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}}})),$c=/* @__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}}})),el=/* @__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}}})),tl=/* @__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}}})),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+=`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}}})),rl=/* @__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}}})),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+=`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}}})),al=/* @__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}}})),ol=/* @__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}}})),sl=/* @__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}}})),cl=/* @__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}}})),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+=`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}}})),ul=/* @__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}}})),dl=/* @__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}}})),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 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}}})),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+=`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}}})),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+=`ต้องมีสมาชิกไม่เกิน `+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}}})),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+=`不允许超过`+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}}})),gl=/* @__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}}})),_l=/* @__PURE__ */ s(((e,t)=>{t.exports={en:Jc(),ar:Yc(),ca:Xc(),cs:Zc(),de:Qc(),es:$c(),fi:el(),fr:tl(),hu:nl(),id:rl(),it:il(),ja:al(),ko:ol(),nb:sl(),nl:cl(),pl:ll(),"pt-BR":ul(),ru:dl(),sk:fl(),sv:pl(),th:ml(),zh:hl(),"zh-TW":gl()}})),vl=/* @__PURE__ */ u(wa()),yl=/* @__PURE__ */ u(Zo()),bl=/* @__PURE__ */ u(jc()),xl=/* @__PURE__ */ u(qc()),Sl=/* @__PURE__ */ u(_l());function Cl(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&&El(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46){if(r++,r<e.length&&El(e.charCodeAt(r)))for(r++;r<e.length&&El(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&&El(e.charCodeAt(r))){for(r++;r<e.length&&El(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+=`
469
+ `;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}else{if(a>=0&&a<=31){if(Tl(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(wl(t)){do r++,i+=String.fromCharCode(t),t=e.charCodeAt(r);while(wl(t));return o=15}if(Tl(t))return r++,i+=String.fromCharCode(t),t===13&&e.charCodeAt(r)===10&&(r++,i+=`
470
+ `),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&&!Tl(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++,Tl(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||!El(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(wl(e)||Tl(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 wl(e){return e===32||e===9}function Tl(e){return e===10||e===13}function El(e){return e>=48&&e<=57}var Dl;(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`})(Dl||={}),Array(20).fill(0).map((e,t)=>` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
471
+ `+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
472
+ `+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`
473
+ `+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r`+` `.repeat(t)),Array(200).fill(0).map((e,t)=>`\r
474
+ `+` `.repeat(t));var Ol;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Ol||={});function kl(e,t=[],n=Ol.DEFAULT){let r=null,i=[],a=[];function o(e){Array.isArray(i)?i.push(e):r!==null&&(i[r]=e)}return Al(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 Al(e,t,n=Ol.DEFAULT){let r=Cl(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 jl;(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`})(jl||={});var Ml;(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`})(Ml||={});const Nl=kl;var Pl;(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`})(Pl||={});var Fl=/* @__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}}})),Il=/* @__PURE__ */ s((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=Fl();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}})),Ll=/* @__PURE__ */ s(((e,t)=>{let n=Il(),{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:_}=Fl(),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,ne=!1,re=!1,ie=!1,ae=!1,oe=!1,A=!1,se=!1,j=!1,ce=0,M,N,P={value:``,depth:0,isGlob:!1},le=()=>D>=x,ue=()=>E.charCodeAt(D+1),de=()=>(M=N,E.charCodeAt(++D));for(;D<x;){N=de();let e;if(N===a)oe=P.backslashes=!0,N=de(),N===u&&(ae=!0);else{if(ae===!0||N===u){for(ce++;le()!==!0&&(N=de());)if(N===a)oe=P.backslashes=!0,de();else if(N===u)ce++;else{if(ae!==!0&&N===s&&(N=de())===s||ae!==!0&&N===o){if(ee=P.isBrace=!0,ne=P.isGlob=!0,j=!0,S===!0)continue;break}if(N===h&&(ce--,ce===0)){ae=!1,ee=P.isBrace=!0,j=!0;break}}if(S===!0)continue;break}if(N===l){if(C.push(D),w.push(P),P={value:``,depth:0,isGlob:!1},j===!0)continue;if(M===s&&D===O+1){O+=2;continue}k=D+1}else{if(b.noext!==!0&&(N===p||N===i||N===r||N===m||N===c)&&ue()===d){if(ne=P.isGlob=!0,re=P.isExtglob=!0,j=!0,N===c&&D===O&&(se=!0),S===!0){let e=0;for(;le()!==!0&&(N=de());)if(N===a)oe=P.backslashes=!0,de();else if(N===d)e++;else if(N===g&&--e===0){j=!0;break}continue}break}if(N===r){if(M===r&&(ie=P.isGlobstar=!0),ne=P.isGlob=!0,j=!0,S===!0)continue;break}if(N===m){if(ne=P.isGlob=!0,j=!0,S===!0)continue;break}if(N===f){for(;le()!==!0&&(e=de());)if(e===a)oe=P.backslashes=!0,de();else if(e===_){te=P.isBracket=!0,ne=P.isGlob=!0,j=!0;break}if(S===!0)continue;break}if(b.nonegate!==!0&&N===c&&D===O)A=P.negated=!0,O++;else{if(b.noparen!==!0&&N===d){if(ne=P.isGlob=!0,S===!0){let e=1;for(;le()!==!0&&(N=de());)if(N===a)oe=P.backslashes=!0,de();else if(N===d)e++;else if(N===g&&--e===0){j=!0;break}continue}break}if(ne===!0){if(j=!0,S===!0)continue;break}}}}}b.noext===!0&&(re=!1,ne=!1);let fe=E,pe=``,me=``;O>0&&(pe=E.slice(0,O),E=E.slice(O),k-=O),fe&&ne===!0&&k>0?(fe=E.slice(0,k),me=E.slice(k)):ne===!0?(fe=``,me=E):fe=E,fe&&fe!==``&&fe!==`/`&&fe!==E&&v(fe.charCodeAt(fe.length-1))&&(fe=fe.slice(0,-1)),b.unescape===!0&&(me&&=n.removeBackslashes(me),fe&&oe===!0&&(fe=n.removeBackslashes(fe)));let he={prefix:pe,input:e,start:O,base:fe,glob:me,isBrace:ee,isBracket:te,isGlob:ne,isExtglob:re,isGlobstar:ie,negated:A,negatedExtglob:se};if(b.tokens===!0&&(he.maxDepth=0,v(N)||w.push(P),he.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=pe):w[n].value=a,y(w[n]),he.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]),he.maxDepth+=w[w.length-1].depth),he.slashes=C,he.parts=T}return he}})),Rl=/* @__PURE__ */ s(((e,t)=>{let n=Fl(),r=Il(),{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;else if(s===`\\`)a+=s,o=!0;else if(s===`"`)i=i===1?0:1,a+=s;else{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;else if(n===`\\`)t=!0;else 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;else if(s===`\\`)a=!0;else if(s===`"`)i=i===1?0:1;else if(i!==1){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(!(n>0)){if(s===`(`)r++;else 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);else 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:ne}=_,re=e=>`(${g}(?:(?!${ne}${e.dot?T:x}).)*?)`,ie=d.dot?``:E,ae=d.dot?k:ee,oe=d.bash===!0?re(d):te;d.capture&&(oe=`(${oe})`),typeof d.noext==`boolean`&&(d.noextglob=d.noext);let A={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,A),p=e.length;let se=[],j=[],ce=[],M=m,N,P=()=>A.index===p-1,le=A.peek=(t=1)=>e[A.index+t],ue=A.advance=()=>e[++A.index]||``,de=()=>e.slice(A.index+1),fe=(e=``,t=0)=>{A.consumed+=e,A.index+=t},pe=e=>{A.output+=e.output==null?e.value:e.output,fe(e.value)},me=()=>{let e=1;for(;le()===`!`&&(le(2)!==`(`||le(3)===`?`);)ue(),A.start++,e++;return e%2!=0&&(A.negated=!0,A.start++,!0)},he=e=>{A[e]++,ce.push(e)},ge=e=>{A[e]--,ce.pop()},F=e=>{if(M.type===`globstar`){let t=A.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||se.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(A.output=A.output.slice(0,-M.output.length),M.type=`star`,M.value=`*`,M.output=oe,A.output+=M.output)}se.length&&e.type!==`paren`&&(se[se.length-1].inner+=e.value),(e.value||e.output)&&pe(e),M&&M.type===`text`&&e.type===`text`?(M.output=(M.output||M.value)+e.value,M.value+=e.value):(e.prev=M,h.push(e),M=e)},_e=(e,t)=>{let n={...v[t],conditions:1,inner:``};n.prev=M,n.parens=A.parens,n.output=A.output,n.startIndex=A.index,n.tokensIndex=h.length;let r=(d.capture?`(`:``)+n.open;he(`parens`),F({type:e,value:t,output:A.output?``:w}),F({type:`paren`,extglob:!0,value:ue(),output:r}),se.push(n)},ve=n=>{let i=e.slice(n.startIndex,A.index+1),a=e.slice(n.startIndex+2,A.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;A.output=n.output+t.output,A.backtrack=!0,F({type:`paren`,extglob:!0,value:N,output:``}),ge(`parens`);return}let s=n.close+(d.capture?`)`:``),c;if(n.type===`negate`){let e=oe;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=re(d)),(e!==oe||P()||/^\)+$/.test(de()))&&(s=n.close=`)$))${e}`),n.inner.includes(`*`)&&(c=de())&&/^\.[^\\/.]+$/.test(c)&&(s=n.close=`)${b(c,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(A.negatedExtglob=!0)}F({type:`paren`,extglob:!0,value:N,output:s}),ge(`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?ae+(a?k.repeat(a.length):``):k.repeat(r.length):i===`.`?x.repeat(r.length):i===`*`?t?t+i+(a?oe:``):oe: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?(A.output=e,A):(A.output=r.wrapOutput(i,A,t),A)}for(;!P();){if(N=ue(),N===`\0`)continue;if(N===`\\`){let e=le();if(e===`/`&&d.bash!==!0||e===`.`||e===`;`)continue;if(!e){N+=`\\`,F({type:`text`,value:N});continue}let t=/^\\+/.exec(de()),n=0;if(t&&t[0].length>2&&(n=t[0].length,A.index+=n,n%2!=0&&(N+=`\\`)),d.unescape===!0?N=ue():N+=ue(),A.brackets===0){F({type:`text`,value:N});continue}}if(A.brackets>0&&(N!==`]`||M.value===`[`||M.value===`[^`)){if(d.posix!==!1&&N===`:`){let e=M.value.slice(1);if(e.includes(`[`)&&(M.posix=!0,e.includes(`:`))){let e=M.value.lastIndexOf(`[`),t=M.value.slice(0,e),n=M.value.slice(e+2),r=a[n];if(r){M.value=t+r,A.backtrack=!0,ue(),!m.output&&h.indexOf(M)===1&&(m.output=w);continue}}}(N===`[`&&le()!==`:`||N===`-`&&le()===`]`)&&(N=`\\${N}`),N===`]`&&(M.value===`[`||M.value===`[^`)&&(N=`\\${N}`),d.posix===!0&&N===`!`&&M.value===`[`&&(N=`^`),M.value+=N,pe({value:N});continue}if(A.quotes===1&&N!==`"`){N=r.escapeRegex(N),M.value+=N,pe({value:N});continue}if(N===`"`){A.quotes=A.quotes===1?0:1,d.keepQuotes===!0&&F({type:`text`,value:N});continue}if(N===`(`){he(`parens`),F({type:`paren`,value:N});continue}if(N===`)`){if(A.parens===0&&d.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=se[se.length-1];if(e&&A.parens===e.parens+1){ve(se.pop());continue}F({type:`paren`,value:N,output:A.parens?`)`:`\\)`}),ge(`parens`);continue}if(N===`[`){if(d.nobracket===!0||!de().includes(`]`)){if(d.nobracket!==!0&&d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));N=`\\${N}`}else he(`brackets`);F({type:`bracket`,value:N});continue}if(N===`]`){if(d.nobracket===!0||M&&M.type===`bracket`&&M.value.length===1){F({type:`text`,value:N,output:`\\${N}`});continue}if(A.brackets===0){if(d.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));F({type:`text`,value:N,output:`\\${N}`});continue}ge(`brackets`);let e=M.value.slice(1);if(M.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(N=`/${N}`),M.value+=N,pe({value:N}),d.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(M.value);if(A.output=A.output.slice(0,-M.value.length),d.literalBrackets===!0){A.output+=t,M.value=t;continue}M.value=`(${g}${t}|${M.value})`,A.output+=M.value;continue}if(N===`{`&&d.nobrace!==!0){he(`braces`);let e={type:`brace`,value:N,output:`(`,outputIndex:A.output.length,tokensIndex:A.tokens.length};j.push(e),F(e);continue}if(N===`}`){let e=j[j.length-1];if(d.nobrace===!0||!e){F({type:`text`,value:N,output:N});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),A.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=A.output.slice(0,e.outputIndex),r=A.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,N=t=`\\}`,A.output=n;for(let e of r)A.output+=e.output||e.value}F({type:`brace`,value:N,output:t}),ge(`braces`),j.pop();continue}if(N===`|`){se.length>0&&se[se.length-1].conditions++,F({type:`text`,value:N});continue}if(N===`,`){let e=N,t=j[j.length-1];t&&ce[ce.length-1]===`braces`&&(t.comma=!0,e=`|`),F({type:`comma`,value:N,output:e});continue}if(N===`/`){if(M.type===`dot`&&A.index===A.start+1){A.start=A.index+1,A.consumed=``,A.output=``,h.pop(),M=m;continue}F({type:`slash`,value:N,output:C});continue}if(N===`.`){if(A.braces>0&&M.type===`dot`){M.value===`.`&&(M.output=x);let e=j[j.length-1];M.type=`dots`,M.output+=N,M.value+=N,e.dots=!0;continue}if(A.braces+A.parens===0&&M.type!==`bos`&&M.type!==`slash`){F({type:`text`,value:N,output:x});continue}F({type:`dot`,value:N,output:x});continue}if(N===`?`){if(!(M&&M.value===`(`)&&d.noextglob!==!0&&le()===`(`&&le(2)!==`?`){_e(`qmark`,N);continue}if(M&&M.type===`paren`){let e=le(),t=N;(M.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(de()))&&(t=`\\${N}`),F({type:`text`,value:N,output:t});continue}if(d.dot!==!0&&(M.type===`slash`||M.type===`bos`)){F({type:`qmark`,value:N,output:ee});continue}F({type:`qmark`,value:N,output:k});continue}if(N===`!`){if(d.noextglob!==!0&&le()===`(`&&(le(2)!==`?`||!/[!=<:]/.test(le(3)))){_e(`negate`,N);continue}if(d.nonegate!==!0&&A.index===0){me();continue}}if(N===`+`){if(d.noextglob!==!0&&le()===`(`&&le(2)!==`?`){_e(`plus`,N);continue}if(M&&M.value===`(`||d.regex===!1){F({type:`plus`,value:N,output:S});continue}if(M&&(M.type===`bracket`||M.type===`paren`||M.type===`brace`)||A.parens>0){F({type:`plus`,value:N});continue}F({type:`plus`,value:S});continue}if(N===`@`){if(d.noextglob!==!0&&le()===`(`&&le(2)!==`?`){F({type:`at`,extglob:!0,value:N,output:``});continue}F({type:`text`,value:N});continue}if(N!==`*`){(N===`$`||N===`^`)&&(N=`\\${N}`);let e=o.exec(de());e&&(N+=e[0],A.index+=e[0].length),F({type:`text`,value:N});continue}if(M&&(M.type===`globstar`||M.star===!0)){M.type=`star`,M.star=!0,M.value+=N,M.output=oe,A.backtrack=!0,A.globstar=!0,fe(N);continue}let t=de();if(d.noextglob!==!0&&/^\([^?]/.test(t)){_e(`star`,N);continue}if(M.type===`star`){if(d.noglobstar===!0){fe(N);continue}let n=M.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]!==`/`)){F({type:`star`,value:N,output:``});continue}let o=A.braces>0&&(n.type===`comma`||n.type===`brace`),s=se.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){F({type:`star`,value:N,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[A.index+4];if(n&&n!==`/`)break;t=t.slice(3),fe(`/**`,3)}let c=P()||A.parens>0&&t===`)`.repeat(A.parens)&&!se.some(e=>e.type===`negate`);if(n.type===`bos`&&P()){M.type=`globstar`,M.value+=N,M.output=re(d),A.output=M.output,A.globstar=!0,fe(N);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&c){A.output=A.output.slice(0,-(n.output+M.output).length),n.output=`(?:${n.output}`,M.type=`globstar`,M.output=re(d)+(d.strictSlashes?`)`:`|$)`),M.value+=N,A.globstar=!0,A.output+=n.output+M.output,fe(N);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;A.output=A.output.slice(0,-(n.output+M.output).length),n.output=`(?:${n.output}`,M.type=`globstar`,M.output=`${re(d)}${C}|${C}${e})`,M.value+=N,A.output+=n.output+M.output,A.globstar=!0,fe(N+ue()),F({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){M.type=`globstar`,M.value+=N,M.output=`(?:^|${C}|${re(d)}${C})`,A.output=M.output,A.globstar=!0,fe(N+ue()),F({type:`slash`,value:`/`,output:``});continue}A.output=A.output.slice(0,-M.output.length),M.type=`globstar`,M.output=re(d),M.value+=N,A.output+=M.output,A.globstar=!0,fe(N);continue}let n={type:`star`,value:N,output:oe};d.bash===!0?(n.output=`.*?`,(M.type===`bos`||M.type===`slash`)&&(n.output=ie+n.output),F(n)):M&&(M.type===`bracket`||M.type===`paren`)&&d.regex===!0?(n.output=N,F(n)):((A.index===A.start||M.type===`slash`||M.type===`dot`)&&(M.type===`dot`?(A.output+=D,M.output+=D):d.dot===!0?(A.output+=O,M.output+=O):(A.output+=ie,M.output+=ie),le()!==`*`&&(A.output+=w,M.output+=w)),F(n))}for(;A.brackets>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));A.output=r.escapeLast(A.output,`[`),ge(`brackets`)}for(;A.parens>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));A.output=r.escapeLast(A.output,`(`),ge(`parens`)}for(;A.braces>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));A.output=r.escapeLast(A.output,`{`),ge(`braces`)}if(d.strictSlashes!==!0&&(M.type===`star`||M.type===`bracket`)&&F({type:`maybe_slash`,value:``,output:`${C}?`}),A.backtrack===!0){A.output=``;for(let e of A.tokens)A.output+=e.output==null?e.value:e.output,e.suffix&&(A.output+=e.suffix)}return A};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})),zl=/* @__PURE__ */ s(((e,t)=>{let n=Ll(),r=Rl(),i=Il(),a=Fl(),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})),Bl=/* @__PURE__ */ s(((e,t)=>{let n=zl(),r=Il();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}));Mt();var Vl=/* @__PURE__ */ u(Bl());const Hl=Symbol.for(`yaml.alias`),Ul=Symbol.for(`yaml.document`),Wl=Symbol.for(`yaml.map`),Gl=Symbol.for(`yaml.pair`),Kl=Symbol.for(`yaml.scalar`),ql=Symbol.for(`yaml.seq`),Jl=Symbol.for(`yaml.node.type`),Yl=e=>!!e&&typeof e==`object`&&e[Jl]===Hl,Xl=e=>!!e&&typeof e==`object`&&e[Jl]===Ul,Zl=e=>!!e&&typeof e==`object`&&e[Jl]===Wl,Ql=e=>!!e&&typeof e==`object`&&e[Jl]===Gl,z=e=>!!e&&typeof e==`object`&&e[Jl]===Kl,$l=e=>!!e&&typeof e==`object`&&e[Jl]===ql;function eu(e){if(e&&typeof e==`object`)switch(e[Jl]){case Wl:case ql:return!0}return!1}function tu(e){if(e&&typeof e==`object`)switch(e[Jl]){case Hl:case Wl:case Kl:case ql:return!0}return!1}const nu=e=>(z(e)||eu(e))&&!!e.anchor,ru=Symbol(`break visit`),iu=Symbol(`skip children`),au=Symbol(`remove node`);function ou(e,t){let n=cu(t);Xl(e)?su(null,e.contents,n,Object.freeze([e]))===au&&(e.contents=null):su(null,e,n,Object.freeze([]))}ou.BREAK=ru,ou.SKIP=iu,ou.REMOVE=au;function su(e,t,n,r){let i=lu(e,t,n,r);if(tu(i)||Ql(i))return uu(e,r,i),su(e,i,n,r);if(typeof i!=`symbol`){if(eu(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=su(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===ru)return ru;else i===au&&(t.items.splice(e,1),--e)}}else if(Ql(t)){r=Object.freeze(r.concat(t));let e=su(`key`,t.key,n,r);if(e===ru)return ru;e===au&&(t.key=null);let i=su(`value`,t.value,n,r);if(i===ru)return ru;i===au&&(t.value=null)}}return i}function cu(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 lu(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Zl(t))return n.Map?.(e,t,r);if($l(t))return n.Seq?.(e,t,r);if(Ql(t))return n.Pair?.(e,t,r);if(z(t))return n.Scalar?.(e,t,r);if(Yl(t))return n.Alias?.(e,t,r)}function uu(e,t,n){let r=t[t.length-1];if(eu(r))r.items[e]=n;else if(Ql(r))e===`key`?r.key=n:r.value=n;else if(Xl(r))r.contents=n;else{let e=Yl(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}const du={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},fu=e=>e.replace(/[!,[\]{}]/g,e=>du[e]);var pu=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+fu(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&&tu(e.contents)){let t={};ou(e.contents,(e,n)=>{tu(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(`
475
+ `)}};pu.defaultYaml={explicit:!1,version:`1.2`},pu.defaultTags={"!!":`tag:yaml.org,2002:`};function mu(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 hu(e){let t=/* @__PURE__ */ new Set;return ou(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function gu(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function _u(e,t){let n=[],r=/* @__PURE__ */ new Map,i=null;return{onAnchor:r=>{n.push(r),i??=hu(e);let a=gu(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(z(t.node)||eu(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 vu(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=vu(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=vu(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=vu(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=vu(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function yu(e,t,n){if(Array.isArray(e))return e.map((e,t)=>yu(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!nu(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 bu=class{constructor(e){Object.defineProperty(this,Jl,{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(!Xl(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=yu(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?vu(i,{"":o},``,o):o}},xu=class extends bu{constructor(e){super(Hl),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=[],ou(e,{Node:(e,t)=>{(Yl(t)||nu(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);
476
+ /* istanbul ignore if */
477
+ if(o||=(yu(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=Su(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(mu(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 Su(e,t,n){if(Yl(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(eu(t)){let r=0;for(let i of t.items){let t=Su(e,i,n);t>r&&(r=t)}return r}if(Ql(t)){let r=Su(e,t.key,n),i=Su(e,t.value,n);return Math.max(r,i)}return 1}const Cu=e=>!e||typeof e!=`function`&&typeof e!=`object`;var B=class extends bu{constructor(e){super(Kl),this.value=e}toJSON(e,t){return t?.keep?this.value:yu(this.value,e,t)}toString(){return String(this.value)}};B.BLOCK_FOLDED=`BLOCK_FOLDED`,B.BLOCK_LITERAL=`BLOCK_LITERAL`,B.PLAIN=`PLAIN`,B.QUOTE_DOUBLE=`QUOTE_DOUBLE`,B.QUOTE_SINGLE=`QUOTE_SINGLE`;function wu(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 Tu(e,t,n){if(Xl(e)&&(e=e.contents),tu(e))return e;if(Ql(e)){let t=n.schema[Wl].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 xu(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=`tag:yaml.org,2002:`+t.slice(2));let l=wu(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new B(e);return c&&(c.node=t),t}l=e instanceof Map?o[Wl]:Symbol.iterator in Object(e)?o[ql]:o[Wl]}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 B(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Eu(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 Tu(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 Du=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done;var Ou=class extends bu{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=>tu(t)||Ql(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Du(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(eu(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Eu(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(eu(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&&z(i)?i.value:i:eu(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Ql(t))return!1;let n=t.value;return n==null||e&&z(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 eu(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(eu(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Eu(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};const ku=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Au(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const ju=(e,t,n)=>e.endsWith(`
478
+ `)?Au(n,t):n.includes(`
479
+ `)?`
480
+ `+Au(n,t):(e.endsWith(` `)?``:` `)+n,Mu=`flow`;function Nu(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=Pu(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===`
481
+ `)n===`block`&&(h=Pu(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
482
+ `&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
483
+ `&&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 Pu(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!==`
484
+ `);r=t,i=t+1,a=e[i]}return r}const Fu=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Iu=e=>/^(%|---|\.\.\.)/m.test(e);function Lu(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]===`
485
+ `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Ru(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Iu(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)+`
486
+
487
+ `;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
488
+ `,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:Nu(o,a,`quoted`,Fu(t,!1))}function zu(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
489
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Ru(e,t);let n=t.indent||(Iu(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:Nu(r,n,Mu,Fu(t,!1))}function Bu(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Ru;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?zu:i&&!t?Ru:n?zu:Ru}return r(e,t)}let Vu;try{Vu=/* @__PURE__ */ RegExp(`(^|(?<!
490
+ ))
491
+ +(?!
492
+ |$)`,`g`)}catch{Vu=/\n+(?!\n|$)/g}function Hu({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 Bu(n,r);let l=r.indent||(r.forceBlockIndent||Iu(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===B.BLOCK_FOLDED?!1:t===B.BLOCK_LITERAL||!Lu(n,c,l.length);if(!n)return u?`|
493
+ `:`>
494
+ `;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
495
+ `&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
496
+ `);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
497
+ `&&(p=p.slice(0,-1)),p.replace(Vu,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
498
+ `)_=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,`
499
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=Fu(r,!0);o!==`folded`&&t!==B.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=Nu(`${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 Uu(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(`
500
+ `)||u&&/[[\]{},]/.test(a))return Bu(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
501
+ `)?Bu(a,t):Hu(e,t,n,r);if(!s&&!u&&i!==B.PLAIN&&a.includes(`
502
+ `))return Hu(e,t,n,r);if(Iu(a)){if(c===``)return t.forceBlockIndent=!0,Hu(e,t,n,r);if(s&&c===l)return Bu(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 Bu(a,t)}return s?d:Nu(d,c,Mu,Fu(t,!1))}function Wu(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!==B.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=B.QUOTE_DOUBLE);let c=e=>{switch(e){case B.BLOCK_FOLDED:case B.BLOCK_LITERAL:return i||a?Bu(o.value,t):Hu(o,t,n,r);case B.QUOTE_DOUBLE:return Ru(o.value,t);case B.QUOTE_SINGLE:return zu(o.value,t);case B.PLAIN:return Uu(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 Gu(e,t){let n=Object.assign({blockQuote:!0,commentString:ku,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 Ku(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(z(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 qu(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(z(e)||eu(e))&&e.anchor;a&&mu(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 Ju(e,t,n,r){if(Ql(e))return e.toString(t,n,r);if(Yl(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=tu(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Ku(t.doc.schema.tags,a);let o=qu(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):z(a)?Wu(a,t,n,r):a.toString(t,n,r);return o?z(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Yu({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=tu(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(eu(e)||!tu(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||eu(e)||(z(e)?e.type===B.BLOCK_FOLDED||e.type===B.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Ju(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+=ju(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=ju(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=ju(g,n.indent,l(f))));let _,v,y;tu(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&&z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&$l(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Ju(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
503
+ `:``,v){let e=l(v);S+=`\n${Au(e,n.indent)}`}x===``&&!n.inFlow?S===`
504
+ `&&y&&(S=`
505
+
506
+ `):S+=`\n${n.indent}`}else if(!p&&eu(t)){let e=x[0],r=x.indexOf(`
507
+ `),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]===`
508
+ `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=ju(g,n.indent,l(y)):h&&i&&i(),g}function Xu(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}const Zu={identify:e=>e===`<<`||typeof e==`symbol`&&e.description===`<<`,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new B(Symbol(`<<`)),{addToJSMap:$u}),stringify:()=>`<<`},Qu=(e,t)=>(Zu.identify(t)||z(t)&&(!t.type||t.type===B.PLAIN)&&Zu.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Zu.tag&&e.default);function $u(e,t,n){if(n=e&&Yl(n)?n.resolve(e.doc):n,$l(n))for(let r of n.items)ed(e,t,r);else if(Array.isArray(n))for(let r of n)ed(e,t,r);else ed(e,t,n)}function ed(e,t,n){let r=e&&Yl(n)?n.resolve(e.doc):n;if(!Zl(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 td(e,t,{key:n,value:r}){if(tu(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Qu(e,n))$u(e,t,r);else{let i=yu(n,``,e);if(t instanceof Map)t.set(i,yu(r,i,e));else if(t instanceof Set)t.add(i);else{let a=nd(n,i,e),o=yu(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function nd(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(tu(e)&&n?.doc){let t=Gu(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)+`..."`),Xu(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 rd(e,t,n){return new id(Tu(e,void 0,n),Tu(t,void 0,n))}var id=class e{constructor(e,t=null){Object.defineProperty(this,Jl,{value:Gl}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return tu(n)&&(n=n.clone(t)),tu(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return td(t,t?.mapAsMap?/* @__PURE__ */ new Map:{},this)}toString(e,t,n){return e?.doc?Yu(this,e,t,n):JSON.stringify(this)}};function ad(e,t,n){return(t.inFlow??e.flow?sd:od)(e,t,n)}function od({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(tu(i))!d&&i.spaceBefore&&f.push(``),cd(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(Ql(i)){let e=tu(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),cd(n,f,e.commentBefore,d))}d=!1;let s=Ju(i,u,()=>o=null,()=>d=!0);o&&(s+=ju(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}`:`
509
+ `}}return e?(p+=`
510
+ `+Au(l(e),c),s&&s()):d&&o&&o(),p}function sd({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(tu(i))i.spaceBefore&&d.push(``),cd(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(Ql(i)){let e=tu(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),cd(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=tu(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=Ju(i,c,()=>a=null);l||=d.length>u||o.includes(`
511
+ `),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+=ju(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}`:`
512
+ `;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function cd({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=Au(t(r),e);n.push(i.trimStart())}}function ld(e,t){let n=z(t)?t.value:t;for(let r of e)if(Ql(r)&&(r.key===t||r.key===n||z(r.key)&&r.key.value===n))return r}var ud=class extends Ou{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Wl,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(rd(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=Ql(e)?e:!e||typeof e!=`object`||!(`key`in e)?new id(e,e?.value):new id(e.key,e.value);let r=ld(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);z(r.value)&&Cu(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=ld(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=ld(this.items,e)?.value;return(!t&&z(n)?n.value:n)??void 0}has(e){return!!ld(this.items,e)}set(e,t){this.add(new id(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)td(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Ql(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})),ad(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}};const dd={collection:`map`,default:!0,nodeClass:ud,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Zl(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>ud.from(e,t,n)};var fd=class extends Ou{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(ql,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=pd(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=pd(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&z(r)?r.value:r}has(e){let t=pd(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=pd(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];z(r)&&Cu(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(yu(e,String(r++),t));return n}toString(e,t,n){return e?ad(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(Tu(a,void 0,n))}}return i}};function pd(e){let t=z(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}const md={collection:`seq`,default:!0,nodeClass:fd,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return $l(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>fd.from(e,t,n)},hd={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),Wu(e,t,n,r)}},gd={identify:e=>e==null,createNode:()=>new B(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new B(null),stringify:({source:e},t)=>typeof e==`string`&&gd.test.test(e)?e:t.options.nullStr},_d={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new B(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&_d.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function vd({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 yd={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:vd},bd={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():vd(e)}},xd={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 B(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:vd},Sd=e=>typeof e==`bigint`||Number.isInteger(e),Cd=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function wd(e,t,n){let{value:r}=e;return Sd(r)&&r>=0?n+r.toString(t):vd(e)}const Td={identify:e=>Sd(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>Cd(e,2,8,n),stringify:e=>wd(e,8,`0o`)},Ed={identify:Sd,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Cd(e,0,10,n),stringify:vd},Dd={identify:e=>Sd(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Cd(e,2,16,n),stringify:e=>wd(e,16,`0x`)},Od=[dd,md,hd,gd,_d,Td,Ed,Dd,yd,bd,xd];function kd(e){return typeof e==`bigint`||Number.isInteger(e)}const Ad=({value:e})=>JSON.stringify(e),jd=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Ad},{identify:e=>e==null,createNode:()=>new B(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Ad},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Ad},{identify:kd,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})=>kd(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:Ad}],Md=[dd,md].concat(jd,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),Nd={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??=B.BLOCK_LITERAL,t!==B.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===B.BLOCK_LITERAL?`
513
+ `:` `)}return Wu({comment:e,type:t,value:s},r,i,a)}};function Pd(e,t){if($l(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Ql(r)){if(Zl(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new id(new B(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]=Ql(r)?r:new id(r)}}else t(`Expected a sequence for this tag`);return e}function Fd(e,t,n){let{replacer:r}=n,i=new fd(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(rd(o,s,n))}return i}const Id={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Pd,createNode:Fd};var Ld=class e extends fd{constructor(){super(),this.add=ud.prototype.add.bind(this),this.delete=ud.prototype.delete.bind(this),this.get=ud.prototype.get.bind(this),this.has=ud.prototype.has.bind(this),this.set=ud.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(Ql(e)?(r=yu(e.key,``,t),i=yu(e.value,r,t)):r=yu(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=Fd(e,t,n),i=new this;return i.items=r.items,i}};Ld.tag=`tag:yaml.org,2002:omap`;const Rd={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Ld,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Pd(e,t),r=[];for(let{key:e}of n.items)z(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Ld,n)},createNode:(e,t,n)=>Ld.from(e,t,n)};function zd({value:e,source:t},n){return t&&(e?Bd:Vd).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const Bd={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 B(!0),stringify:zd},Vd={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 B(!1),stringify:zd},Hd={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:vd},Ud={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():vd(e)}},Wd={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 B(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:vd},Gd=e=>typeof e==`bigint`||Number.isInteger(e);function Kd(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 qd(e,t,n){let{value:r}=e;if(Gd(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return vd(e)}const Jd={identify:Gd,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Kd(e,2,2,n),stringify:e=>qd(e,2,`0b`)},Yd={identify:Gd,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Kd(e,1,8,n),stringify:e=>qd(e,8,`0`)},Xd={identify:Gd,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Kd(e,0,10,n),stringify:vd},Zd={identify:Gd,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Kd(e,2,16,n),stringify:e=>qd(e,16,`0x`)};var Qd=class e extends ud{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Ql(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new id(e.key,null):new id(e,null),ld(this.items,t.key)||this.items.push(t)}get(e,t){let n=ld(this.items,e);return!t&&Ql(n)?z(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=ld(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new id(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(rd(e,null,n));return i}};Qd.tag=`tag:yaml.org,2002:set`;const $d={collection:`map`,identify:e=>e instanceof Set,nodeClass:Qd,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>Qd.from(e,t,n),resolve(e,t){if(Zl(e)){if(e.hasAllNullValues(!0))return Object.assign(new Qd,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function ef(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 tf(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return vd(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 nf={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})=>ef(e,n),stringify:tf},rf={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=>ef(e,!1),stringify:tf},af={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(af.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=ef(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$/,``)??``},of=[dd,md,hd,gd,Bd,Vd,Jd,Yd,Xd,Zd,Hd,Ud,Wd,Nd,Zu,Rd,Id,$d,nf,rf,af],sf=/* @__PURE__ */ new Map([[`core`,Od],[`failsafe`,[dd,md,hd]],[`json`,Md],[`yaml11`,of],[`yaml-1.1`,of]]),cf={binary:Nd,bool:_d,float:xd,floatExp:bd,floatNaN:yd,floatTime:rf,int:Ed,intHex:Dd,intOct:Td,intTime:nf,map:dd,merge:Zu,null:gd,omap:Rd,pairs:Id,seq:md,set:$d,timestamp:af},lf={"tag:yaml.org,2002:binary":Nd,"tag:yaml.org,2002:merge":Zu,"tag:yaml.org,2002:omap":Rd,"tag:yaml.org,2002:pairs":Id,"tag:yaml.org,2002:set":$d,"tag:yaml.org,2002:timestamp":af};function uf(e,t,n){let r=sf.get(t);if(r&&!e)return n&&!r.includes(Zu)?r.concat(Zu):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(sf.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(Zu)),i.reduce((e,t)=>{let n=typeof t==`string`?cf[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(cf).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 df=(e,t)=>e.key<t.key?-1:+(e.key>t.key);var ff=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?uf(e,`compat`):e?uf(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?lf:{},this.tags=uf(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Wl,{value:dd}),Object.defineProperty(this,Kl,{value:hd}),Object.defineProperty(this,ql,{value:md}),this.sortMapEntries=typeof a==`function`?a:a===!0?df:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function pf(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=Gu(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(Au(t,``))}let o=!1,s=null;if(e.contents){if(tu(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(Au(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=Ju(e.contents,i,()=>s=null,t);s&&(c+=ju(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Ju(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
514
+ `)?(n.push(`...`),n.push(Au(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(Au(a(t),``)))}return n.join(`
515
+ `)+`
516
+ `}var mf=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Jl,{value:Ul});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 pu({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Jl]:{value:Ul}});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=tu(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){hf(this.contents)&&this.contents.add(e)}addIn(e,t){hf(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=hu(this);e.anchor=!t||n.has(t)?gu(t||`a`,n):t}return new xu(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}=_u(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=Tu(e,l,p);return o&&eu(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new id(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return hf(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Du(e)?this.contents!=null&&(this.contents=null,!0):hf(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return eu(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Du(e)?!t&&z(this.contents)?this.contents.value:this.contents:eu(this.contents)?this.contents.getIn(e,t):void 0}has(e){return eu(this.contents)?this.contents.has(e):!1}hasIn(e){return Du(e)?this.contents!==void 0:eu(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Eu(this.schema,[e],t):hf(this.contents)&&this.contents.set(e,t)}setIn(e,t){Du(e)?this.contents=t:this.contents==null?this.contents=Eu(this.schema,Array.from(e),t):hf(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 pu({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 pu({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 ff(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=yu(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`?vu(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 pf(this,e)}};function hf(e){if(eu(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var gf=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},_f=class extends gf{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},vf=class extends gf{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}};const yf=(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)+`…
517
+ `),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 bf(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 xf(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
518
+ `))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(xf(t.key)||xf(t.value))return!0}return!1;default:return!0}}function Sf(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&xf(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function Cf(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||z(e)&&z(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}const wf=`All mapping items must start at the same column`;function Tf({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??ud)(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=bf(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`,wf)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
519
+ `+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||xf(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`,wf);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&Sf(r.indent,u,i),n.atKey=!1,Cf(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=bf(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&&Sf(r.indent,f,i),s=c.range[2];let l=new id(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+=`
520
+ `+_.comment:g.comment=_.comment);let e=new id(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 Ef({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??fd)(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=bf(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&&Sf(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function Df(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 Of=`Block collections are not allowed within flow collections`,kf=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function Af({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?ud:fd))(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=bf(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+=`
521
+ `+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&xf(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];Ql(t)&&(t=t.value??t.key),t.comment?t.comment+=`
522
+ `+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],kf(m)&&i(r.range,`BLOCK_IN_FLOW`,Of)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);kf(f)&&i(g.range,`BLOCK_IN_FLOW`,Of),n.atKey=!1;let _=bf(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?kf(m)&&i(v.range,`BLOCK_IN_FLOW`,Of):_.comment&&(g.comment?g.comment+=`
523
+ `+_.comment:g.comment=_.comment);let y=new id(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;Cf(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new ud(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=Df(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
524
+ `+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function jf(e,t,n,r,i,a){let o=n.type===`block-map`?Tf(e,t,n,r,a):n.type===`block-seq`?Ef(e,t,n,r,a):Af(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function Mf(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===ud.tagName&&s===`map`||o===fd.tagName&&s===`seq`)return jf(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),jf(e,t,n,i,o)}let l=jf(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=tu(u)?u:new B(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function Nf(e,t,n){let r=t.offset,i=Pf(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?B.BLOCK_FOLDED:B.BLOCK_LITERAL,o=t.source?Ff(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?`
525
+ `.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)+`
526
+ `;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`;
527
+ /* istanbul ignore if already caught in lexer */
528
+ 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===B.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
529
+ `):t.length>c||r[0]===` `?(f===` `?f=`
530
+ `:!p&&f===`
531
+ `&&(f=`
532
+
533
+ `),d+=f+t.slice(c)+r,f=`
534
+ `,p=!0):r===``?f===`
535
+ `?d+=`
536
+ `:f=`
537
+ `:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
538
+ `+o[e][0].slice(c);d[d.length-1]!==`
539
+ `&&(d+=`
540
+ `);break;default:d+=`
541
+ `}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function Pf({offset:e,props:t},n,r){
542
+ /* istanbul ignore if should not happen */
543
+ 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;
544
+ /* istanbul ignore next should not happen */
545
+ 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 Ff(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 If(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=B.PLAIN,c=Lf(a,l);break;case`single-quoted-scalar`:s=B.QUOTE_SINGLE,c=Rf(a,l);break;case`double-quoted-scalar`:s=B.QUOTE_DOUBLE,c=Bf(a,l);break;
546
+ /* istanbul ignore next should not happen */
547
+ 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=Df(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Lf(e,t){let n=``;switch(e[0]){
548
+ /* istanbul ignore next should not happen */
549
+ 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}`),zf(e)}function Rf(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),zf(e.slice(1,-1)).replace(/''/g,`'`)}function zf(e){let t,n;try{t=/* @__PURE__ */ RegExp(`(.*?)(?<![ ])[ ]*\r?
550
+ `,`sy`),n=/* @__PURE__ */ RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
551
+ `,`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===`
552
+ `?i+=a:a=`
553
+ `:(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 Bf(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
554
+ `){if(i===`
555
+ `){let{fold:t,offset:i}=Vf(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=Hf[i];if(a)n+=a;else if(i===`
556
+ `)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
557
+ `)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+=Uf(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!==`
558
+ `&&(a!==`\r`||e[r+2]!==`
559
+ `)&&(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 Vf(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
560
+ `||r===`\r`)&&(r!==`\r`||e[t+2]===`
561
+ `);)r===`
562
+ `&&(n+=`
563
+ `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}const Hf={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
564
+ `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function Uf(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 Wf(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?Nf(e,t,r):If(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[Kl]:c?Gf(e.schema,i,c,n,r):t.type===`scalar`?Kf(e,i,t,r):e.schema[Kl];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=z(a)?a:new B(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new B(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 Gf(e,t,n,r,i){if(n===`!`)return e[Kl];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[Kl])}function Kf({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[Kl];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Kl];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 qf(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 Jf={composeNode:Yf,composeEmptyNode:Xf};function Yf(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=Zf(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=Wf(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=Mf(Jf,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??=Xf(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&&(!z(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 Xf(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=Wf(e,{type:`scalar`,offset:qf(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 Zf({options:e},{offset:t,source:n,end:r},i){let a=new xu(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=Df(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function Qf(e,t,{offset:n,start:r,value:i,end:a},o){let s=new mf(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=bf(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?Yf(c,i,l,o):Xf(c,l.end,r,null,l,o);let u=s.contents.range[2],d=Df(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function $f(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 ep(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?`
565
+
566
+ `:`
567
+ `)+(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 tp=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=$f(e);r?this.warnings.push(new vf(i,t,n)):this.errors.push(new _f(i,t,n))},this.directives=new pu({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=ep(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(eu(i)&&!i.flow&&i.items.length>0){let e=i.items[0];Ql(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:ep(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=$f(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=Qf(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 _f($f(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 _f($f(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=Df(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 _f($f(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 mf(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 np=e=>`type`in e?rp(e):ip(e);function rp(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=rp(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=ip(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=ip(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=ip(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 ip({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=rp(t)),n)for(let e of n)i+=e.source;return r&&(i+=rp(r)),i}const ap=Symbol(`break visit`),op=Symbol(`skip children`),sp=Symbol(`remove item`);function cp(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),lp(Object.freeze([]),e,t)}cp.BREAK=ap,cp.SKIP=op,cp.REMOVE=sp,cp.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},cp.parentCollection=(e,t)=>{let n=cp.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 lp(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=lp(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===ap)return ap;else r===sp&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}const up=e=>!!e&&`items`in e,dp=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function fp(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`
568
+ `:case`\r
569
+ `: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 pp(e){switch(e){case void 0:case` `:case`
570
+ `:case`\r`:case` `:return!0;default:return!1}}const mp=/* @__PURE__ */ new Set(`0123456789ABCDEFabcdef`),hp=/* @__PURE__ */ new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),gp=/* @__PURE__ */ new Set(`,[]{}`),_p=/* @__PURE__ */ new Set(` ,[]{}
571
+ \r `),vp=e=>!e||_p.has(e);var yp=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===`
572
+ `||t===`\r`&&this.buffer[e+1]===`
573
+ `}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===`
574
+ `||!t&&!this.atEnd)return e+n+1}return t===`
575
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&pp(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(`
576
+ `,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===`...`)&&pp(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&&!pp(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===`:`)&&pp(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(vp),`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(`...`))&&pp(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(vp),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||pp(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(`
577
+ `,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
578
+ `,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=>pp(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`
579
+ `:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
580
+ `)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(`
581
+ `,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===`
582
+ `;)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===`
583
+ `&&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(pp(r)||e&&gp.has(r))break;t=n}else if(pp(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
584
+ `?(n+=1,r=`
585
+ `,i=this.buffer[n+1]):t=n),i===`#`||e&&gp.has(i))break;if(r===`
586
+ `){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&gp.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(vp))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case`-`:case`?`:case`:`:{let e=this.flowLevel>0,t=this.charAt(1);if(pp(t)||e&&gp.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(;!pp(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(hp.has(t))t=this.buffer[++e];else if(t===`%`&&mp.has(this.buffer[e+1])&&mp.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===`
587
+ `?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
588
+ `?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)}},bp=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 xp(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Sp(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 Cp(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 wp(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;
589
+ /* istanbul ignore next should not happen */
590
+ default:return[]}}function Tp(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 Ep(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!xp(t.start,`explicit-key-ind`)&&!xp(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,Cp(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 Dp=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 yp,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=fp(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})}else{if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}
591
+ /* istanbul ignore next should not happen */
592
+ yield*this.pop()}}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();
593
+ /* istanbul ignore if should not happen */
594
+ 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`&&Ep(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}
595
+ /* istanbul ignore next should not happen */
596
+ 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&&Sp(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`:Sp(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=Tp(wp(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(`
597
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
598
+ `,e)+1}yield*this.pop();break;
599
+ /* istanbul ignore next should not happen */
600
+ 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(xp(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=Tp(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(xp(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(Cp(t.key)&&!xp(t.sep,`newline`)){let e=Tp(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]}):xp(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&&!xp(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||xp(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);
601
+ /* istanbul ignore else should not happen */
602
+ 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=Tp(wp(t));Ep(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(`
603
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
604
+ `,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=Tp(wp(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=Tp(wp(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 Op(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new bp||null,prettyErrors:t}}function kp(e,t={}){let{lineCounter:n,prettyErrors:r}=Op(t),i=new Dp(n?.addNewLine),a=new tp(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 _f(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(yf(e,n)),o.warnings.forEach(yf(e,n))),o}function Ap(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=kp(e,n);if(!i)return null;if(i.warnings.forEach(e=>Xu(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 jp(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 Xl(e)&&!r?e.toString(n):new mf(e,r,n).toString(n)}function Mp(e){switch(e.type){case`array`:return e.children.map(Mp);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]=Mp(i))}return t}case`null`:case`string`:case`number`:return e.value;case`boolean`:return e.value;default:return}}function Np(e,t,n=!1){return t>=e.offset&&t<=e.offset+e.length||n&&t===e.offset+e.length}function Pp(e,t,n){if(n===void 0&&(n=!1),Np(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=Pp(r[e],t,n);if(i)return i}return e}}var Fp=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=Bp(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=Rp(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=Rp(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&&zp(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}},Ip;(function(e){function t(e,t,n,r){return new Fp(e,t,n,r)}e.create=t;function n(e,t,n){if(e instanceof Fp)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=Lp(t.map(Vp),(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})(Ip||={});function Lp(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Lp(r,t),Lp(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 Rp(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);zp(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}function zp(e){return e===13||e===10}function Bp(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 Vp(e){let t=Bp(e.range);return t===e.range?e:{newText:e.newText,range:t}}var Hp;(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`})(Hp||={});var Up;(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`})(Up||={}),Le.Markdown,Le.PlainText;function Wp(e,t=!1){let n=e.type&&e.closestTitle;if(e.title)return e.title;if(e.$id&&!(t&&Gp(e.$id)))return Kp(e.$id);let r=e.$ref||e._$ref;return r&&!(t&&Gp(r))?Kp(r):Array.isArray(e.type)?e.type.join(` | `):n?e.type.concat(`(`,e.closestTitle,`)`):e.type||e.closestTitle}function Gp(e){return!e.includes(`#`)}function Kp(e){let t=e.match(/^(?:.*\/)?(.*?)(?:\.schema\.json)?$/),n=!!t&&t[1];return n||(n=`typeNotFound`,console.error(`$ref (${e}) not parsed properly`)),n}function qp(e,t){let n=tr.parse(t),r=Wn.basename(n.fsPath),i=n.fragment.split(`/`).filter(Boolean).pop(),a=n.path.match(/\/(v\d+\.\d+\.\d+)-standalone-strict\/(?:_definitions|all)\.json$/)?.[1];return a?i?`${i.split(`.`).pop()} (Kubernetes ${a})`:`Kubernetes ${a}`:Object.getOwnPropertyDescriptor(e,`name`)?Object.getOwnPropertyDescriptor(e,`name`).value+` (${r})`:e.title?e.description?e.title+` - `+e.description+` (${r})`:e.title+` (${r})`:r}function Jp(e){return e.type!==`object`&&!Yp(e)}function Yp(e){return!!(e.anyOf||e.allOf||e.oneOf)}function Xp(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 Zp(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 Qp(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 $p(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}Mt();const em=`YAML`,tm=`yaml-schema: `;var nm;(function(e){e.missingRequiredPropWarning=`missingRequiredPropWarning`,e.typeMismatchWarning=`typeMismatchWarning`,e.constWarning=`constWarning`})(nm||={});const rm={[nm.missingRequiredPropWarning]:`Missing property "{0}".`,[nm.typeMismatchWarning]:`Incorrect type. Expected "{0}".`,[nm.constWarning]:`Value must be {0}.`};var im=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||Np(e,this.focusOffset))&&e!==this.exclude}newSub(){return new e(-1,this.exclude)}},am=class{constructor(){}get schemas(){return[]}add(){}merge(){}include(){return!0}newSub(){return this}};am.instance=new am;const om={"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 sm=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===Hp.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!==nm.missingRequiredPropWarning||Qp(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=um(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(tm,``);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}},cm=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`&&zn(e.properties)&&n.push(...e.properties)})}}else t[r]=e.valueNode}return t}validateDocument(e,t,n,r){let i=new sm(r.isKubernetes);return this.validateNode(e,n,n,i,am.instance,r),i.problems.map(e=>{let n=P.create(t.positionAt(e.location.offset),t.positionAt(e.location.offset+e.location.length)),r=ye.create(n,e.message,e.severity,e.code?e.code:Hp.Undefined,e.source);return r.data={schemaUri:e.schemaUri,...e.data},r})}getMatchingSchemas(e,t,n,r,i){let a=new im(r,i);return this.validateNode(e,t,t,new sm(n.isKubernetes),a,n),a.schemas}getNoOpCollector(){return am.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=tr.parse(r).toString())}return n?`${tm}${n}`:em}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()){gm(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:F.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`?Wp(t,!0):t.type;r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,message:t.errorMessage||um(nm.typeMismatchWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemType:nm.typeMismatchWarning,problemArgs:[i]})}if(Array.isArray(t.allOf))for(let n of t.allOf){let s=lm(n),c=new sm(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=lm(t.not);if(u){let s=new sm(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:F.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={...lm(n)},c=new sm(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:F.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 sm(o),c=i.newSub();this.validateNode(e,lm(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=lm(c),h=new sm(o),_=i.newSub();this.validateNode(e,m,u,h,_,a),s||i.merge(_);let v=m?.filePatternAssociation;v&&(new qr(v).matchesPattern(a.uri)||h.problems.push({location:{offset:e.offset,length:e.length},severity:F.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=lm(t.if);if(m&&p(m,t,lm(t.then),lm(t.else)),Array.isArray(t.enum)){let i=Mp(e),a=!1;for(let n of t.enum)if(Pn(i,n,e.type)||dm(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:F.Warning,code:Hp.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(In(t.const)){let i=Mp(e),a=t.const;!Pn(i,a,e.type)&&!dm(s,e,i,a)?(r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,code:Hp.EnumValueMismatch,problemType:nm.constWarning,message:t.errorMessage||um(nm.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:F.Warning,message:t.deprecationMessage,source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)})}validateStringNode(e,t,n,r){let i=e.value;if(Fn(t.minLength)&&i.length<(t.minLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,message:g(`String is shorter than the minimum length of {0}.`,t.minLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),Fn(t.maxLength)&&i.length>(t.maxLength??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,message:g(`String is longer than the maximum length of {0}.`,t.maxLength),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),Rn(t.pattern)){let a=Wr(t.pattern);a?a.test(i)||r.problems.push({location:{offset:e.offset,length:e.length},severity:F.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:F.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{!tr.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:F.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=om[t.format];(!i||!a.pattern.test(i))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.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;Fn(t.multipleOf)&&$p(i,t.multipleOf??0)!==0&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.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);Fn(a.exclusiveMinimum)&&i<=a.exclusiveMinimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,message:g(`Value is below the exclusive minimum of {0}.`,a.exclusiveMinimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),Fn(a.exclusiveMaximum)&&i>=a.exclusiveMaximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,message:g(`Value is above the exclusive maximum of {0}.`,a.exclusiveMaximum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),Fn(a.minimum)&&i<a.minimum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,message:g(`Value is below the minimum of {0}.`,a.minimum),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),Fn(a.maximum)&&i>a.maximum&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.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=lm(l[e]),u=new sm(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:F.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 sm(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=lm(t.items);if(n){let c=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let l=s[e],u=new sm(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=lm(t.contains);s&&((e.items??[]).some(e=>{let n=new sm(o);return this.validateNode(e,s,t,n,am.instance,a),!n.hasProblems()})||r.problems.push({location:{offset:e.offset,length:e.length},severity:F.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){Fn(t.minItems)&&e.items.length<(t.minItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,message:g(`Array has too few items. Expected {0} or more.`,t.minItems),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),Fn(t.maxItems)&&e.items.length>(t.maxItems??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.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=Mp(e);Array.isArray(i)&&i.some((e,t)=>t!==i.lastIndexOf(e))&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.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`&&zn(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:F.Warning,message:t.errorMessage||um(nm.missingRequiredPropWarning,[i]),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n),problemArgs:[i],problemType:nm.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),Ln(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:F.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 sm(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=Wr(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(Ln(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:F.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 sm(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 sm(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:F.Warning,code:Hp.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){Fn(t.maxProperties)&&e.properties.length>(t.maxProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.Warning,message:g(`Object has more properties than limit of {0}.`,t.maxProperties),source:this.getSchemaSource(t,n),schemaUri:this.getSchemaUri(t,n)}),Fn(t.minProperties)&&e.properties.length<(t.minProperties??0)&&r.problems.push({location:{offset:e.offset,length:e.length},severity:F.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:F.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=lm(u);if(n){let o=new sm(s);this.validateNode(e,n,t,o,i,a),r.mergePropertyMatch(o),r.mergeEnumValues(o)}}}}applyPropertyNames(e,t,n,r){let i=lm(t.propertyNames);if(i)for(let a of e.properties){let e=a.keyNode;e&&this.validateNode(e,i,t,n,am.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,[nm.missingRequiredPropWarning,nm.typeMismatchWarning,nm.constWarning])}};function lm(e){if(e!==void 0)return Ln(e)?e?{}:{not:{}}:typeof e==`object`?e:(console.warn(`Wrong schema: ${JSON.stringify(e)}, it MUST be an Object or Boolean`),{type:e})}function um(e,t){return g(rm[e],t.join(` | `))}function dm(e,t,n,r){return e?n===null&&t.length===0||Rn(n)&&Rn(r)&&r.startsWith(n):!1}var fm=class extends cm{getCurrentSchemaDraft(){return Up.v4}getNumberLimits(e){let t=Fn(e.minimum)?e.minimum:void 0,n=Fn(e.maximum)?e.maximum:void 0,r=Ln(e.exclusiveMinimum)&&e.exclusiveMinimum?t:void 0,i=Ln(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}}},pm=class extends cm{getCurrentSchemaDraft(){return Up.v7}getNumberLimits(e){let t=Fn(e.minimum)?e.minimum:void 0,n=Fn(e.maximum)?e.maximum:void 0,r=Fn(e.exclusiveMinimum)?e.exclusiveMinimum:void 0,i=Fn(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}}};Mt();var mm=class extends pm{getCurrentSchemaDraft(){return Up.v2019_09}applyContains(e,t,n,r,i,a){let o=lm(t.contains);if(!o)return;let s=t.minContains,c=t.maxContains,l=Fn(s)?s:1,u=Fn(c)?c:void 0,d=0,f=e.items??[];for(let e of f){let n=new sm(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:F.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:F.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:F.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=lm(c[n]);if(!s)continue;let l=new sm(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:F.Warning,code:Hp.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=lm(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 sm(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:F.Warning,code:Hp.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=lm(o);if(u)for(let e of l){let n=s[e],o=new sm(a.isKubernetes);this.validateNode(n,u,t,o,i,a),r.merge(o),r.mergeEnumValues(o),c.add(e)}}};Mt();var hm=class extends mm{getCurrentSchemaDraft(){return Up.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=lm(c[n]);if(!e){s.add(n);continue}let l=new sm(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:F.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=lm(l);if(e)for(let n=u;n<o.length;n++){let c=new sm(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=lm(t.contains);if(!o)return;let s=e.items??[],c=t.minContains,l=t.maxContains,u=Fn(c)?c:1,d=Fn(l)?l:void 0,f=0,p=r.getEvaluatedItems(e);for(let e=0;e<s.length;e++){let n=new sm(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:F.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:F.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 gm(e){switch(e){case Up.v4:return new fm;case Up.v7:return new pm;case Up.v2019_09:return new mm;case Up.v2020_12:return new hm;default:return new pm}}var _m=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()+`}`:``)}},vm=class extends _m{constructor(e,t,n,r){super(e,t,n,r),this.type=`null`,this.value=null}},ym=class extends _m{constructor(e,t,n,r,i,a){super(e,t,i,a),this.type=`boolean`,this.value=n,this.source=r}},bm=class extends _m{constructor(e,t,n,r){super(e,t,n,r),this.type=`array`,this.items=[]}get children(){return this.items}},xm=class extends _m{constructor(e,t,n,r){super(e,t,n,r),this.type=`number`,this.isInteger=!0,this.value=NaN}},Sm=class extends _m{constructor(e,t,n,r){super(e,t,n,r),this.type=`string`,this.value=``}},Cm=class extends _m{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]}},wm=class extends _m{constructor(e,t,n,r){super(e,t,n,r),this.type=`object`,this.properties=[]}get children(){return this.properties}},Tm;(function(e){e[e.Key=0]=`Key`,e[e.Enum=1]=`Enum`})(Tm||={});var Em=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return Pp(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:gm(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?[]:gm(e._schemaDraft).getMatchingSchemas(this.root,e,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:r},t,n)}};const Dm=[`mapping`,`scalar`,`sequence`],Om={mapping:`object`,object:`object`,sequence:`array`,array:`array`,scalar:`string`,string:`string`,number:`number`,integer:`integer`,boolean:`boolean`,null:`null`};function km(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=Dm.find(e=>e===i);if(o||!s)return;if(!r.includes(`:`))return{tag:n,inputType:s};let c=Om[a];if(c)return{tag:n,inputType:s,returnType:c}}function Am(e){if(!e||typeof e!=`object`)return;let t=e.customTagReturnType;if(typeof t==`string`)return Object.values(Om).includes(t)?t:void 0}function jm(e,t){t&&e&&typeof e==`object`&&(e.customTagReturnType=t)}const Mm={maxRefCount:1e3,currentRefDepth:0,aliasResolutionCache:/* @__PURE__ */ new Map};function Nm(e,t,n,r){if(e||(Mm.currentRefDepth=0,Mm.aliasResolutionCache=/* @__PURE__ */ new Map),!t)return null;let i;return Zl(t)?i=Pm(t,e,n,r):Ql(t)?i=Fm(t,e,n,r):$l(t)?i=Im(t,e,n,r):z(t)?i=Lm(t,e):Yl(t)&&Mm.currentRefDepth<Mm.maxRefCount&&(i=Rm(t,e,n,r)),i&&tu(t)&&(i.customTagReturnType=Am(t)),i}function Pm(e,t,n,r){let i;i=e.flow&&!e.range?Vm(e):e.range;let a=new wm(t,e,...Bm(i,r));for(let t of e.items)Ql(t)&&a.properties.push(Nm(a,t,n,r));return a}function Fm(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 Cm(t,e,...Bm([o,s,c],r));if(Yl(i)){let e=new Sm(t,i,...zm(i.range));e.value=i.source,l.keyNode=e}else l.keyNode=Nm(l,i,n,r);return l.valueNode=Nm(l,a,n,r),l}function Im(e,t,n,r){let i=new bm(t,e,...zm(e.range));for(let t of e.items)if(tu(t)){let e=Nm(i,t,n,r);e&&i.children.push(e)}return i}function Lm(e,t){if(e.value===null)return new vm(t,e,...zm(e.range));switch(typeof e.value){case`string`:{let n=new Sm(t,e,...zm(e.range));return n.value=e.value,n}case`boolean`:return new ym(t,e,e.value,e.source,...zm(e.range));case`number`:{let n=new xm(t,e,...zm(e.range));return n.value=e.value,n.isInteger=Number.isInteger(n.value),n}default:{let n=new Sm(t,e,...zm(e.range));return n.value=e.source,n}}}function Rm(e,t,n,r){if(Mm.aliasResolutionCache.has(e))return Mm.aliasResolutionCache.get(e);Mm.currentRefDepth++;let i=e.resolve(n),a;if(i)a=Nm(t,i,n,r);else{let n=new Sm(t,e,...zm(e.range));n.value=e.source,a=n}return Mm.currentRefDepth--,Mm.aliasResolutionCache.set(e,a),a}function zm(e){return[e[0],e[1]-e[0]]}function Bm(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 Vm(e){let t=2**53-1,n=0;for(let r of e.items)Ql(r)&&(tu(r.key)&&r.key.range&&r.key.range[0]<=t&&(t=r.key.range[0]),tu(r.value)&&r.value.range&&r.value.range[2]>=n&&(n=r.value.range[2]));return[t,n,n]}function Hm(e,t){let n;if(ou(e,(e,r,i)=>{if(r===t)return n=i[i.length-1],ou.BREAK}),!Xl(n))return n}function Um(e){if(e.items.length>1)return!1;let t=e.items[0];return z(t.key)&&z(t.value)&&t.key.value===``&&!t.value.value}function Wm(e,t){for(let[n,r]of e.items.entries())if(t===r)return n}function Gm(e,t){let n=!1;for(let r of e){if(r.type===`document`)qm([],r,e=>{if(Km(e)&&e.value?.type===`comment`){if(r.offset<=t&&e.value.source.length+e.value.offset>=t)return n=!0,ou.BREAK}else if(e.type===`comment`&&e.offset<=t&&e.offset+e.source.length>=t)return n=!0,ou.BREAK});else if(r.type===`comment`&&r.offset<=t&&r.source.length+r.offset>=t)return!0;if(n)break}return n}function Km(e){return e.start!==void 0}function qm(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=qm(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===ou.BREAK)return ou.BREAK;else r===ou.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=qm(Object.freeze(e),i[t],n);if(typeof r==`number`)t=r-1;else if(r===ou.BREAK)return ou.BREAK;else r===ou.REMOVE&&(i.items.splice(t,1),--t)}return typeof r==`function`?r(t,e):r}var Jm=class e extends Em{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(`
605
+ `).forEach(e=>this._lineComments.push(`#${e}`)),ou(this.internalDocument,(e,t)=>{t?.commentBefore&&(t?.commentBefore.split(`
606
+ `)).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=Nm(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(Zm)}get warnings(){return this.internalDocument.warnings.map(Zm)}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 ou(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]&&z(n)&&n.value===null)c=n;else return ou.SKIP}}),[c,!1]}findClosestNode(e,t,n){let r=this.internalDocument.range[2],i=this.internalDocument.range[0],a;ou(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=Ur(t.getLineContent(o.line),o.character);return z(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,tu(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(Ql(e)&&tu(e.value))return e.value;if(Ql(a)&&tu(a.value))return a.value}else return t}else if(Ql(t)){a=t;let o=this.getParent(t);return this.getProperParentByIndentation(e,o,n,r,i,a)}return t}getParent(e){return Hm(this.internalDocument,e)}},Ym=class{constructor(e,t){this.documents=e,this.tokens=t,this.errors=[],this.warnings=[]}};const Xm=new class{constructor(){this.cache=/* @__PURE__ */ new Map}getYamlDocument(e,t,n=!1){return this.ensureCache(e,t??nh,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 Ym([],[]),parserOptions:nh});let i=this.cache.get(r);if(i.version!==e.version||t.customTags&&!Qp(i.parserOptions.customTags,t.customTags)){let r=e.getText();n&&!/\S/.test(r)&&(r=`{${r}}`),i.document=rh(r,t,e),i.version=e.version,i.parserOptions=t}}};function Zm(e){return{message:e.message,location:{start:e.pos[0],end:e.pos[1],toLineEnd:!0},severity:1,code:Hp.Undefined}}var Qm=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(Zl(e)&&this.type===`mapping`||$l(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 B(e);return jm(t,this.returnType),t}return jm(e,this.returnType),e}},$m=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 eh(e){let t=[];for(let n of e??[]){let e=km(n);e&&t.push(new Qm(e.tag,e.inputType,e.returnType))}return t.push(new $m),t}Mt();var th=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(P.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 nh={customTags:[],yamlVersion:`1.2`};function rh(e,t=nh,n){let r=new tp({strict:!1,customTags:eh(t.customTags),version:t.yamlVersion??nh.yamlVersion,keepSourceTokens:!0}),i=new bp,a=!1;if(n){let t=new th(n),r=t.getPosition(e.length);a=t.getLineContent(r.line).trim().length===0}let o=(a?new Dp:new Dp(i.addNewLine)).parse(e),s=Array.from(o),c=r.compose(s,!0,e.length),l=ah(s);return new Ym(Array.from(c,(e,t)=>ih(e,i,l[t]??[])),s)}function ih(e,t,n){let r=new Jm(t);return r.documentHeaderComments=n,r.internalDocument=e,r}function ah(e){let t=[],n=[];for(let r of e)if(r.type===`comment`)n.push(r.source);else if(r.type!==`newline`&&r.type!==`space`&&r.type!==`byte-order-mark`&&r.type!==`directive`){if(r.type===`doc-end`)n=[];else if(r.type===`document`){let e=r.start.filter(e=>e.type===`comment`).map(e=>e.source);t.push([...n,...e]),n=[]}else n=[]}return n.length>0&&t.push(n),t}function oh(e){if((e instanceof Jm||e instanceof Em)&&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 sh(e){if(e instanceof Jm){let t=e.documentHeaderComments.find(e=>ch(e));if(t!=null){let e=t.match(/\$schema(?:=|:[^\S\r\n]*)(\S+)/);if(e!==null&&e.length===2)return e[1]}}}function ch(e){let t=e.match(/^#\s+(?:yaml-language-server\s*:|\$schema:)/g);return t!==null&&t.length===1}Mt();var lh=class{constructor(e){this.telemetry=e}findDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){let n=[];try{let r=Xm.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=Xm.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=le.create(e.uri,ph(e,t)),c=n?n+`.`+t.keyNode.value:t.keyNode.value;s.push({name:dh(t),kind:uh(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=ph(e,t),s={name:String(i),kind:uh(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:dh(t),kind:uh(i.type),range:ph(e,t),selectionRange:ph(e,t.keyNode),children:o,detail:fh(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 uh(e){switch(e){case`object`:return $e.Module;case`string`:return $e.String;case`number`:return $e.Number;case`array`:return $e.Array;case`boolean`:return $e.Boolean;default:return $e.Variable}}function dh(e){let t=e.keyNode.internalNode,n;return n=Zl(t)?`{}`:$l(t)?`[]`:`source`in t&&typeof t.source==`string`?t.source:e.keyNode.value,n&&=n.replace(/[\n]/g,`↵`),n&&n.trim()?n:`"${n}"`}function fh(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 ph(e,t){return P.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}function mh(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}Mt();var hh=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=Xm.getYamlDocument(e),i=Zp(e.offsetAt(t),r);return i===null?Promise.resolve(void 0):(Jr(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=P.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length)),s=e=>({contents:{kind:Le.Markdown,value:e},range:o});if(this.shouldHoverAnchor&&i.type===`property`&&i.valueNode&&i.valueNode.type===`object`){let e="```yaml\n"+jp(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(Mp(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`?mh(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&&yh(i,e,n.schema)&&(t=``,r=n.schema.description?n.schema.description+`
607
+ `:``,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(jp(e,null,2))})),!0));let f=``;return t&&(f=`#### `+this.toMarkdown(t)),r&&(f=gh(f),f+=r),u.length!==0&&(f=gh(f),f+=g(`Allowed Values:`)+`
608
+
609
+ `,d&&u.unshift(u.splice(d,1)[0]),u.forEach(e=>{e.description?f+=`* \`${vh(e.value)}\`: ${e.description}\n`:f+=`* \`${vh(e.value)}\`\n`})),o.length!==0&&o.forEach(e=>{f=gh(f),f+=g(`Example:`)+`
610
+
611
+ `,f+=`\`\`\`yaml\n${e}\`\`\`\n`}),f.length>0&&l.schema.url&&this.hoverSchemaSource&&(f=gh(f),f+=g(`Source: [{0}]({1})`,_h(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(Yl(e))return e.source;if(Zl(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 $l(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
612
+
613
+ $3`);if(t=t.replace(/[\\`*_{}[\]#+!]/g,`\\$&`),this.indentation!==void 0){let e=RegExp(` {${this.indentation.length}}`,`g`);t=t.replace(e,`&emsp;`)}return t}}};function gh(e){return e.length===0?e:(e.endsWith(`
614
+ `)||(e+=`
615
+ `),e+`
616
+ `)}function _h(e){let t=`JSON Schema`,n=e.url;if(n){let e=tr.parse(n);t=Wn.basename(e.fsPath)}else e.title&&(t=e.title);return t}function vh(e){return e.indexOf("`")===-1?e:"`` "+e+" ``"}function yh(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 bh=/^\s*#\s*yaml-language-server-disable\b(.*)$/;function xh(e){let t=e.trim();return t?t.split(`,`).map(e=>e.trim().toLowerCase()).filter(e=>e.length>0):[]}function Sh(e,t){if(e.length===0)return!0;let n=t.toLowerCase();return e.some(e=>n.includes(e))}function Ch(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=bh.exec(a);return!o||!Sh(xh(o[1]),n(e))})}Mt();var wh=class{validate(e,t){let n=[],r=/* @__PURE__ */ new Set,i=/* @__PURE__ */ new Set,a=/* @__PURE__ */ new Set,o=/* @__PURE__ */ new Map;ou(t.internalDocument,(e,n,s)=>{tu(n)&&((eu(n)||z(n))&&n.anchor&&(r.add(n),o.set(n,s[s.length-1])),Yl(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=P.create(e.positionAt(r.offset),e.positionAt(r.offset+r.source.length)),i=ye.create(t,g(`Unused anchor "{0}"`,r.source),F.Information,0);i.tags=[_e.Unnecessary],n.push(i)}}return a.forEach(t=>{let r=t.range;if(r){let i=r[0],a=r[1],o=P.create(e.positionAt(i),e.positionAt(a)),s=ye.create(o,g(`Unresolved alias "{0}"`,t.toString()),F.Information,0);s.tags=[_e.Unnecessary],n.push(s)}}),n}getAnchorNode(e,t){if(e&&e.srcToken){let n=e.srcToken;if(Km(n))return Th(n);if(up(n))for(let e of n.items){if(t.srcToken!==e.value)continue;let n=Th(e);if(n)return n}}}};function Th(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}}Mt();var Eh=class{constructor(e){this.forbidMapping=e.flowMapping===`forbid`,this.forbidSequence=e.flowSequence===`forbid`}validate(e,t){let n=[];return ou(t.internalDocument,(t,r)=>{this.forbidMapping&&Zl(r)&&r.srcToken?.type===`flow-collection`&&n.push(ye.create(this.getRangeOf(e,r.srcToken),g(`Flow style mapping is forbidden`),F.Error,`flowMap`)),this.forbidSequence&&$l(r)&&r.srcToken?.type===`flow-collection`&&n.push(ye.create(this.getRangeOf(e,r.srcToken),g(`Flow style sequence is forbidden`),F.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},P.create(e.positionAt(t.start.offset),r)}};Mt();var Dh=class{validate(e,t){let n=[];return ou(t.internalDocument,(t,r)=>{if(Zl(r)){for(let t=1;t<r.items.length;t++)if(kh(r.items[t-1],r.items[t])>0){let i=Oh(e,r.items[t-1]);n.push(ye.create(i,`Wrong ordering of key "${r.items[t-1].key}" in mapping`,F.Error,`mapKeyOrder`));break}}}),n}};function Oh(e,t){let n=t.key.srcToken,r=n.offset,i=r+n.source.length;return P.create(e.positionAt(r),e.positionAt(i))}function kh(e,t){let n=String(t.key);return String(e.key).localeCompare(n)}const Ah=/^https:\/\/raw\.githubusercontent\.com\/yannh\/kubernetes-json-schema\/master\/((?:v(\d+)\.(\d+)\.(\d+))-standalone-strict)\/all\.json$/;function jh(e){return e.trim().toLowerCase()===`kubernetes`||Ah.test(e)}function Mh(e,t,n,r,i){let a=n.trim().toLowerCase()===`kubernetes`;if(a||Ah.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(Wn.isAbsolute(n)||/^[a-z]:[\\/]/i.test(n)){let e=n.split(`#`,2)[0];return tr.file(e).toString()+n.substring(e.length)}return Tr(n)?Er(e,t,n):n}function Nh(e){let t=/* @__PURE__ */ new Map;return e&&(e.url?e.url.startsWith(`schemaservice://combinedSchema/`)?Ph(e,t):t.set(e.url,e):Ph(e,t)),t}function Ph(e,t){e.allOf&&Fh(e.allOf,t),e.anyOf&&Fh(e.anyOf,t),e.oneOf&&Fh(e.oneOf,t)}function Fh(e,t){for(let n of e)!Ln(n)&&n.url&&!t.has(n.url)&&t.set(n.url,n)}Mt();const Ih=(e,t)=>{let n=t.positionAt(e.location.start),r={start:n,end:e.location.toLineEnd?N.create(n.line,new th(t).getLineLength(n.line)):t.positionAt(e.location.end)};return ye.create(r,e.message,e.severity,e.code,em)};var Lh=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 Eh(e)),e.keyOrdering&&this.validators.push(new Dh)),this.validators.push(new wh)}async doValidation(e,t=!1){if(!this.validationEnabled)return[];let n=[],r=t;try{let i=Xm.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(Rh(t)&&(t=Ih(t,e)),t.source||(t.source=em),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 th(e);return Ch(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=sh(e);return typeof t==`string`&&jh(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=P.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length));r.push(ye.create(o,n,F.Warning,i,em,a))}else{let t=P.create(e.positionAt(o.offset),e.positionAt(o.offset+1));r.push(ye.create(t,n,F.Warning,i,em,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 Rh(e){return`location`in e}var zh=/* @__PURE__ */ c({__parsePrettierYamlConfig:()=>rw,default:()=>Hh,languages:()=>rv,options:()=>av,parsers:()=>ov,printers:()=>nw}),Bh=Object.defineProperty,Vh=(e,t)=>{for(var n in t)Bh(e,n,{get:t[n],enumerable:!0})},Hh={};Vh(Hh,{__parsePrettierYamlConfig:()=>rw,languages:()=>rv,options:()=>av,parsers:()=>ov,printers:()=>nw});var Uh=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function Wh(e){return this[e<0?this.length+e:e]}var Gh=Uh(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return Wh}),Kh=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},qh=Uh(`replaceAll`,function(){if(typeof this==`string`)return Kh}),Jh=()=>{},Yh=`string`,Xh=`array`,Zh=`cursor`,Qh=`indent`,$h=`align`,eg=`trim`,tg=`group`,ng=`fill`,rg=`if-break`,ig=`indent-if-break`,ag=`line-suffix`,og=`line-suffix-boundary`,sg=`line`,cg=`label`,lg=`break-parent`,ug=/* @__PURE__ */ new Set([Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg]);function dg(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function fg(e){if(typeof e==`string`)return Yh;if(Array.isArray(e))return Xh;if(!e)return;let{type:t}=e;if(ug.has(t))return t}var pg=fg,mg=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function hg(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
617
+ Expected it to be 'string' or 'object'.`;if(pg(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=mg([...ug].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
618
+ Expected it to be ${r}.`}var gg=class extends Error{name=`InvalidDocError`;constructor(e){super(hg(e)),this.doc=e}};function _g(e,t){if(typeof e==`string`)return t(e);let n=/* @__PURE__ */ new Map;return r(e);function r(e){return dg(n,e,i)}function i(e){switch(pg(e)){case Xh:return t(e.map(r));case ng:return t({...e,parts:e.parts.map(r)});case rg:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case tg:{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 $h:case Qh:case ig:case cg:case ag:return t({...e,contents:r(e.contents)});case Yh:case Zh:case eg:case og:case sg:case lg:return t(e);default:throw new gg(e)}}}function vg(e,t=Ig){return _g(e,e=>typeof e==`string`?Mg(t,e.split(`
619
+ `)):e)}var yg=Jh,bg=Jh,xg=Jh,Sg=Jh;function Cg(e,t){return Sg(e),yg(t),{type:$h,contents:t,n:e}}function wg(e){return Cg(-1/0,e)}function Tg(e){return Cg({type:`root`},e)}function Eg(e){return Cg(-1,e)}var Dg={type:lg};function Og(e){return xg(e),{type:ng,parts:e}}function kg(e,t={}){return yg(e),bg(t.expandedStates,!0),{type:tg,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Ag(e,t){return kg(e[0],{...t,expandedStates:e})}function jg(e,t=``,n={}){return yg(e),t!==``&&yg(t),{type:rg,breakContents:e,flatContents:t,groupId:n.groupId}}function Mg(e,t){yg(e),bg(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var Ng={type:sg},Pg={type:sg,soft:!0},Fg=[{type:sg,hard:!0},Dg],Ig=[{type:sg,hard:!0,literal:!0},Dg];function Lg(e){return yg(e),{type:ag,contents:e}}function Rg(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 zg=Rg(` `),Bg=e=>e===`
620
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function Vg(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===`
621
+ `)return t-2;if(Bg(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
622
+ `)return t+2;if(Bg(i))return t+1}return t}var Hg=Vg;function Ug(e,t){let n=t-1;n=zg(e,n,{backwards:!0}),n=Hg(e,n,{backwards:!0}),n=zg(e,n,{backwards:!0});let r=Hg(e,n,{backwards:!0});return n!==r}var Wg=Ug,Gg=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function Kg(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,Fg]:void 0}}Kg.getVisitorKeys=()=>[];var qg=Kg,Jg=null;function Yg(e){if(Jg!==null&&typeof Jg.property){let e=Jg;return Jg=Yg.prototype=null,e}return Jg=Yg.prototype=e??Object.create(null),new Yg}var Xg=10;for(let e=0;e<=Xg;e++)Yg();function Zg(e){return Yg(e)}function Qg(e,t=`type`){Zg(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 $g=Qg,e_=[[`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`]],t_=$g({root:e_[0],document:[`head`,`body`,`children`,`anchor`,`tag`,`indicatorComment`,`leadingComments`,`middleComments`,`trailingComment`,`endComments`],documentHead:e_[0],documentBody:e_[0],directive:e_[1],alias:e_[1],blockLiteral:e_[1],blockFolded:e_[0],plain:e_[0],quoteSingle:e_[1],quoteDouble:e_[1],mapping:e_[0],mappingItem:e_[2],mappingKey:e_[3],mappingValue:e_[3],sequence:e_[0],sequenceItem:e_[3],flowMapping:e_[0],flowMappingItem:e_[2],flowSequence:e_[0],flowSequenceItem:e_[3],comment:e_[1],tag:e_[4],anchor:e_[4]}),n_=e=>e.position.start.offset,r_=e=>e.position.end.offset,i_=`format`,a_=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/,o_=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/,s_=/^\s*@(?:format|prettier)\s*$/,c_=e=>s_.test(e),l_=e=>o_.test(e),u_=e=>a_.test(e),d_=e=>`# @${i_}
623
+
624
+ ${e}`;function f_(e,t){switch(e.type){case`comment`:if(c_(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(`
625
+ `).map(e=>e.replace(/[ \t]+$/,``)).join(`
626
+ `):(e.chomping===`clip`||e.chomping===`strip`)&&(t.value=e.value.trimEnd())}}f_.ignoredProperties=/* @__PURE__ */ new Set([`position`]);function p_(e){return Array.isArray(e)&&e.length>0}var m_=p_;function h_(e,t){return typeof e?.type==`string`&&t.includes(e.type)}function g_(e,t,n){return t(`children`in e?{...e,children:e.children.map(n=>g_(n,t,e))}:e,n)}function __(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1})}function v_(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===`
627
+ `&&n++,n===1&&/\S/.test(e))return!1;if(n===2)return!0}return!1}function y_(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 b_(e){return m_(e.children)?b_(Gh(0,e.children,-1)):e}function x_(e){return e.value.trim()===`prettier-ignore`}function S_(e){let{node:t}=e;if(t.type===`documentBody`){let t=e.parent.head;return k_(t)&&x_(Gh(0,t.endComments,-1))}return T_(t)&&x_(Gh(0,t.leadingComments,-1))}function C_(e){return!m_(e.children)&&!w_(e)}function w_(e){return T_(e)||E_(e)||D_(e)||O_(e)||k_(e)}function T_(e){return m_(e?.leadingComments)}function E_(e){return m_(e?.middleComments)}function D_(e){return e?.indicatorComment}function O_(e){return e?.trailingComment}function k_(e){return m_(e?.endComments)}function A_(e){return e?e.split(/(?<!^| ) (?! |$)/):[]}function j_(e,t,n){let r=t.split(`
628
+ `).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=A_(n);t>0&&r[t-1].length>0&&a.length>0&&!(e===`quoteDouble`&&Gh(0,Gh(0,i,-1),-1).endsWith(`\\`))?i[i.length-1]=[...Gh(0,i,-1),...a]:i.push(a)}return n.proseWrap===`never`?i.map(e=>[e.join(` `)]):i}function M_(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(`
629
+ `).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=A_(t);e>0&&n.length>0&&o[e-1].length>0&&!/^\s/.test(n[0])&&!/^\s|\s$/.test(Gh(0,s,-1))?s[s.length-1]=[...Gh(0,s,-1),...n]:s.push(n)}return s=s.map(e=>{let t=[];for(let n of e)t.length>0&&/\s$/.test(Gh(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(`
630
+ `)&&Gh(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 N_(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 P_=/* @__PURE__ */ new WeakMap;function F_(e,t){let{node:n,root:r}=e,i=dg(P_,r,()=>/* @__PURE__ */ new Set);return!i.has(n.position.end.offset)&&(i.add(n.position.end.offset),v_(n,t)&&!I_(e.parent))?Pg:``}function I_(e){return k_(e)&&!h_(e,[`documentHead`,`documentBody`,`flowMapping`,`flowSequence`])}function L_(e,t){return Cg(` `.repeat(e),t)}function R_(e,t,n){let{node:r}=e,i=e.ancestors.filter(e=>e.type===`sequence`||e.type===`mapping`).length,a=y_(e),o=[r.type===`blockFolded`?`>`:`|`];r.indent!==null&&o.push(r.indent.toString()),r.chomping!==`clip`&&o.push(r.chomping===`keep`?`+`:`-`),D_(r)&&o.push(` `,n(`indicatorComment`));let s=M_(r,{parentIndent:i,isLastDescendant:a,options:t}),c=[];for(let[e,t]of s.entries())e===0&&c.push(Fg),c.push(Og(Mg(Ng,t))),e===s.length-1?r.chomping===`keep`&&a&&c.push(wg(t.length===0?Fg:Ig)):c.push(t.length===0?Fg:Tg(Ig));return r.indent===null?o.push(Eg(L_(t.tabWidth,c))):o.push(wg(L_(r.indent-1+i,c))),o}var z_=R_;function B_(e,t,n){let{node:r}=e,i=r.type===`flowMapping`,a=i?`{`:`[`,o=i?`}`:`]`,s=Pg;i&&r.children.length>0&&t.bracketSpacing&&(s=Ng);let c=Gh(0,r.children,-1),l=c?.type===`flowMappingItem`&&C_(c.key)&&C_(c.value);return[a,L_(t.tabWidth,[s,V_(e,t,n),t.trailingComma===`none`?``:jg(`,`),k_(r)?[Fg,Mg(Fg,e.map(n,`endComments`))]:``]),l?``:s,o]}function V_(e,t,n){return e.map(({isLast:r,node:i,next:a})=>[n(),r?``:[`,`,Ng,i.position.start.line===a.position.start.line?``:F_(e,t.originalText)]],`children`)}function H_(e,t,n){let{node:r,parent:i}=e,{key:a,value:o}=r,s=C_(a),c=C_(o);if(s&&c)return`: `;let l=n(`key`),u=W_(r)?` `:``;if(c)return r.type===`flowMappingItem`&&i.type===`flowMapping`?l:r.type===`mappingItem`&&U_(a.content,t)&&!O_(a.content)&&i.tag?.value!==`tag:yaml.org,2002:set`?[l,u,`:`]:[`? `,L_(2,l)];let d=n(`value`);if(s)return[`: `,L_(2,d)];if(T_(o)||!N_(a.content))return[`? `,L_(2,l),Fg,...e.map(()=>[n(),Fg],`value`,`leadingComments`),`: `,L_(2,d)];if(G_(a.content)&&!T_(a.content)&&!E_(a.content)&&!O_(a.content)&&!k_(a)&&!T_(o.content)&&!E_(o.content)&&!k_(o)&&U_(o.content,t)&&U_(a.content,t))return[l,u,`: `,d];let f=Symbol(`mappingKey`),p=kg([jg(`? `),kg(L_(2,l),{id:f})]),m=[Fg,`: `,L_(2,d)],h=[u,`:`];k_(o)&&o.content&&h_(o.content,[`flowMapping`,`flowSequence`])&&o.content.children.length===0?h.push(` `):T_(o.content)||k_(o)&&o.content&&!h_(o.content,[`mapping`,`sequence`])||i.type===`mapping`&&O_(a.content)&&N_(o.content)||h_(o.content,[`mapping`,`sequence`])&&o.content.tag===null&&o.content.anchor===null?h.push(Fg):o.content?h.push(Ng):O_(o)&&h.push(` `),h.push(d);let g=L_(t.tabWidth,h);return U_(a.content,t)&&!T_(a.content)&&!E_(a.content)&&!O_(a.content)&&!k_(a)?Ag([[l,g]]):Ag([[p,jg(m,g,{groupId:f})]])}function U_(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(`
631
+ `);case`always`:return!/[\n ]/.test(e.value);default:return!1}}function W_(e){return e.key.content?.type===`alias`}function G_(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 K_=H_;function q_(e){return g_(e,J_)}function J_(e){switch(e.type){case`document`:__(e,`head`,()=>e.children[0]),__(e,`body`,()=>e.children[1]);break;case`documentBody`:case`sequenceItem`:case`flowSequenceItem`:case`mappingKey`:case`mappingValue`:__(e,`content`,()=>e.children[0]);break;case`mappingItem`:case`flowMappingItem`:__(e,`key`,()=>e.children[0]),__(e,`value`,()=>e.children[1])}return e}var Y_=q_;function X_(e,t,n){let{node:r}=e,i=[];r.type!==`mappingValue`&&T_(r)&&i.push([Mg(Fg,e.map(n,`leadingComments`)),Fg]);let{tag:a,anchor:o}=r;a&&i.push(n(`tag`)),a&&o&&i.push(` `),o&&i.push(n(`anchor`));let s=``;return h_(r,[`mapping`,`sequence`,`comment`,`directive`,`mappingItem`,`sequenceItem`])&&!y_(e)&&(s=F_(e,t.originalText)),(a||o)&&(h_(r,[`sequence`,`mapping`])&&!E_(r)?i.push(Fg):i.push(` `)),E_(r)&&i.push([r.middleComments.length===1?``:Fg,Mg(Fg,e.map(n,`middleComments`)),Fg]),S_(e)?i.push(vg(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):i.push(kg(Z_(e,t,n))),O_(r)&&!h_(r,[`document`,`documentHead`])&&i.push(Lg([r.type===`mappingValue`&&!r.content?``:` `,e.parent.type===`mappingKey`&&e.getParentNode(2).type===`mapping`&&N_(r)?``:Dg,n(`trailingComment`)])),I_(r)&&i.push(L_(r.type===`sequenceItem`?2:0,[Fg,Mg(Fg,e.map(({node:e})=>[Wg(t.originalText,n_(e))?Fg:``,n()],`endComments`))])),i.push(s),i}function Z_(e,t,n){let{node:r}=e;switch(r.type){case`root`:{let t=b_(r),i=!(h_(t,[`blockLiteral`,`blockFolded`])&&t.chomping===`keep`),a=[];return e.each(({node:t,isFirst:r})=>{r||a.push(Fg),a.push(n()),$_(e)&&(i&&a.push(Fg),a.push(`...`),O_(t)&&a.push(` `,n(`trailingComment`)))},`children`),i&&a.push(Fg),a}case`document`:{let t=[];return ev(e)&&((r.head.children.length>0||r.head.endComments.length>0)&&t.push(n(`head`)),O_(r.head)?t.push([`---`,` `,n([`head`,`trailingComment`])]):t.push(`---`)),Q_(r)&&t.push(n(`body`)),Mg(Fg,t)}case`documentHead`:return Mg(Fg,[...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=b_(r);h_(e,[`blockFolded`,`blockLiteral`])?e.chomping!==`keep`&&(o=[Fg,Fg]):o=h_(Gh(0,i,-1),[`mapping`])&&Wg(t.originalText,n_(a[0]))?[Fg,Fg]:Fg}return[Mg(Fg,e.map(n,`children`)),o,Mg(Fg,e.map(n,`endComments`))]}case`directive`:return[`%`,Mg(` `,[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 tv(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,tv(r.type,e,t),n]}if(e.includes(`"`))return[`'`,tv(r.type,r.type===`quoteDouble`?qh(0,qh(0,e,`\\"`,`"`),`'`,`'`.repeat(2)):e,t),`'`];if(e.includes(`'`))return[`"`,tv(r.type,r.type===`quoteSingle`?qh(0,e,`''`,`'`):e,t),`"`];let n=t.singleQuote?`'`:`"`;return[n,tv(r.type,e,t),n]}case`blockFolded`:case`blockLiteral`:return z_(e,t,n);case`mapping`:case`sequence`:return Mg(Fg,e.map(n,`children`));case`sequenceItem`:return[`- `,L_(2,r.content?n(`content`):``)];case`mappingKey`:case`mappingValue`:return r.content?n(`content`):``;case`mappingItem`:case`flowMappingItem`:return K_(e,t,n);case`flowMapping`:return B_(e,t,n);case`flowSequence`:return B_(e,t,n);case`flowSequenceItem`:return n(`content`);default:throw new Gg(r,`YAML`)}}function Q_(e){return e.body.children.length>0||k_(e.body)}function $_(e){let t=e.node;if(t.documentEndMarker||O_(t))return!0;if(e.isLast)return!1;let n=e.next;return n.head.children.length>0||k_(n.head)}function ev(e){let t=e.node;return t.directivesEndMarker||t.head.children.length>0||k_(t.head)||O_(t.head)}function tv(e,t,n){return Mg(Fg,j_(e,t,n).map(e=>Og(Mg(Ng,e))))}var nv={preprocess:Y_,embed:qg,print:X_,massageAstNode:f_,insertPragma:d_,getVisitorKeys:t_},rv=[{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}],iv={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.`}},av={bracketSpacing:iv.bracketSpacing,singleQuote:iv.singleQuote,proseWrap:iv.proseWrap},ov={};Vh(ov,{yaml:()=>tw});var sv=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 cv(e,t=null){`children`in e&&e.children.forEach(t=>cv(t,e)),`anchor`in e&&e.anchor&&cv(e.anchor,e),`tag`in e&&e.tag&&cv(e.tag,e),`leadingComments`in e&&e.leadingComments.forEach(t=>cv(t,e)),`middleComments`in e&&e.middleComments.forEach(t=>cv(t,e)),`indicatorComment`in e&&e.indicatorComment&&cv(e.indicatorComment,e),`trailingComment`in e&&e.trailingComment&&cv(e.trailingComment,e),`endComments`in e&&e.endComments.forEach(t=>cv(t,e)),Object.defineProperty(e,"_parent",{value:t,enumerable:!1})}function lv(e){return`${e.line}:${e.column}`}function uv(e){cv(e);let t=dv(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();pv(e,t,n[0])})}function dv(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 fv(t,e),t}function fv(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=>{fv(e,t)})}}function pv(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 ${lv(e.position.start)}`);cv(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=hv(e)?e:t}for(;;){if(mv(a,e)){cv(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){cv(e,n),n.leadingComments.push(e);return}}let a=n.children[1];cv(e,a),a.endComments.push(e)}function mv(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`||hv(e));default:return!1}}function hv(e){return e.position.start!==e.position.end&&(e.children.length===0||e.position.start.offset!==e.children[0].position.start.offset)}function gv(e,t,n){return{type:`root`,position:e,children:t,comments:n}}function _v(e,t){return{start:e,end:t}}function vv(e){return{start:e,end:e}}function yv(e,t){return{type:`comment`,position:t.transformRange([e.offset,e.offset+e.source.length]),value:e.source.slice(1)}}function bv(e,t){return{type:`anchor`,position:e,value:t}}function xv(e,t,n){return{anchor:t,tag:e,middleComments:n}}function Sv(e,t){return{type:`tag`,position:e,value:t}}function Cv(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=Sv(n.transformRange(t),r)}break;case`anchor`:i??=t,o=bv(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 xv(a,o,r)}function wv(e,t,n){return{type:`alias`,position:e,leadingComments:[],trailingComment:null,...t,value:n}}function*Tv(...e){for(let t of e)if(t)for(let e of t)Ev(e)||(yield e)}function Ev(e){return e.type===`space`||e.type===`newline`}function Dv(e){return e.type===`comment`||e.type===`tag`||e.type===`anchor`}function Ov(e,t){let n=[];for(let r of Tv(e))r.type===`comment`?t.transformComment(r):n.push(r);return n}function kv(e,t,n){let r=e.srcToken;for(let e of Ov(r.end,t))throw Error(`Unexpected token type in alias end: ${e.type}`);return wv(t.transformRange(e.range),t.transformContentProperties(e,n.tokens),e.source)}function Av(e){return{...e,type:`blockFolded`}}function jv(e,t,n,r,i,a){return{type:`blockValue`,position:e,leadingComments:[],...t,chomping:n,indent:r,value:i,indicatorComment:a}}function Mv(e,t,n,r){let i=null,a=null;for(let e of Tv(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=Nv(i.source);return jv(n.transformRange(e.range),n.transformContentProperties(e,r.tokens),o.chomping,o.indent,e.source,a)}function Nv(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 Pv(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-scalar`)throw Error(`Expected block scalar srcToken`);return Av(Mv(e,r,t,n))}function Fv(e){return{...e,type:`blockLiteral`}}function Iv(e,t,n){let r=e.srcToken;if(!r||r.type!==`block-scalar`)throw Error(`Expected block scalar srcToken`);return Fv(Mv(e,r,t,n))}function Lv(e,t,n){return{type:`flowCollection`,position:e,leadingComments:[],trailingComment:null,endComments:[],...t,children:n}}function Rv(e,t,n){return{...Lv(e,t,n),type:`flowMapping`}}function zv(e,t,n){return{type:`flowMappingItem`,position:e,leadingComments:[],children:[t,n]}}function Bv(e,t){return{type:`mappingKey`,position:e,trailingComment:null,endComments:[],children:t?[t]:[]}}function Vv(e,t){return{type:`mappingValue`,position:e,leadingComments:[],trailingComment:null,endComments:[],children:t?[t]:[]}}function Hv(e,t,n,r){let i=[],a=null;for(let e of Tv(t.start))if(Dv(e))i.push(e);else if(e.type===`explicit-key-ind`)a=e;else if(e.type!==`comma`)throw Error(`Unexpected token type in collection item start: ${e.type}`);let o=[],s=null;for(let e of Tv(t.sep))if(Dv(e))o.push(e);else if(e.type===`map-value-ind`)s=e;else 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 Uv(e,n,r,{range:l,props:{tokens:i}},{range:u,props:{tokens:o}})}function Uv(e,t,n,r,i){let a=null;EC(e.key,r.props)?Ov(r.props.tokens,t):a=t.transformNode(e.key,r.props);let o=null;EC(e.value,i.props)?Ov(i.props.tokens,t):o=t.transformNode(e.value,i.props);let s=Bv(t.transformRange([r.range?r.range[0]:a.position.start.offset,a?a.position.end.offset:r.range[1]]),a),c=o||i.range?Vv(t.transformRange([i.range?i.range[0]:o.position.start.offset,o?o.position.end.offset:i.range[0]+1]),o):null;return n(_v(s.position.start,c?c.position.end:s.position.end),s,c||Vv(vv(s.position.end),null))}function Wv(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 Hv(e,i,t,zv)});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 Ov(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 Ov(r.end,t))if(e.type===`flow-map-end`)a=e;else throw Error(`Unexpected token type in flow map end: ${e.type}`);if(!a)throw Error(`Expected flow-map-end token`);return Rv(t.transformRange([r.start.offset,a.offset+a.source.length]),t.transformContentProperties(e,n.tokens),i)}function Gv(e,t,n){return{...Lv(e,t,n),type:`flowSequence`}}function Kv(e,t){return{type:`flowSequenceItem`,position:e,children:[t]}}function qv(e){return e[e.length-1]}var Jv={};Vh(Jv,{Alias:()=>jy,CST:()=>gS,Composer:()=>hS,Document:()=>Ox,Lexer:()=>GS,LineCounter:()=>KS,Pair:()=>yb,Parser:()=>eC,Scalar:()=>V,Schema:()=>Ex,YAMLError:()=>Ax,YAMLMap:()=>Tb,YAMLParseError:()=>jx,YAMLSeq:()=>Db,YAMLWarning:()=>Mx,isAlias:()=>ny,isCollection:()=>cy,isDocument:()=>ry,isMap:()=>iy,isNode:()=>ly,isPair:()=>ay,isScalar:()=>oy,isSeq:()=>sy,parse:()=>iC,parseAllDocuments:()=>nC,parseDocument:()=>rC,stringify:()=>aC,visit:()=>my,visitAsync:()=>gy});var Yv=Symbol.for(`yaml.alias`),Xv=Symbol.for(`yaml.document`),Zv=Symbol.for(`yaml.map`),Qv=Symbol.for(`yaml.pair`),$v=Symbol.for(`yaml.scalar`),ey=Symbol.for(`yaml.seq`),ty=Symbol.for(`yaml.node.type`),ny=e=>!!e&&typeof e==`object`&&e[ty]===Yv,ry=e=>!!e&&typeof e==`object`&&e[ty]===Xv,iy=e=>!!e&&typeof e==`object`&&e[ty]===Zv,ay=e=>!!e&&typeof e==`object`&&e[ty]===Qv,oy=e=>!!e&&typeof e==`object`&&e[ty]===$v,sy=e=>!!e&&typeof e==`object`&&e[ty]===ey;function cy(e){if(e&&typeof e==`object`)switch(e[ty]){case Zv:case ey:return!0}return!1}function ly(e){if(e&&typeof e==`object`)switch(e[ty]){case Yv:case Zv:case $v:case ey:return!0}return!1}var uy=e=>(oy(e)||cy(e))&&!!e.anchor,dy=Symbol(`break visit`),fy=Symbol(`skip children`),py=Symbol(`remove node`);function my(e,t){let n=vy(t);ry(e)?hy(null,e.contents,n,Object.freeze([e]))===py&&(e.contents=null):hy(null,e,n,Object.freeze([]))}my.BREAK=dy,my.SKIP=fy,my.REMOVE=py;function hy(e,t,n,r){let i=yy(e,t,n,r);if(ly(i)||ay(i))return by(e,r,i),hy(e,i,n,r);if(typeof i!=`symbol`){if(cy(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=hy(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else{if(i===dy)return dy;i===py&&(t.items.splice(e,1),--e)}}}else if(ay(t)){r=Object.freeze(r.concat(t));let e=hy(`key`,t.key,n,r);if(e===dy)return dy;e===py&&(t.key=null);let i=hy(`value`,t.value,n,r);if(i===dy)return dy;i===py&&(t.value=null)}}return i}async function gy(e,t){let n=vy(t);ry(e)?await _y(null,e.contents,n,Object.freeze([e]))===py&&(e.contents=null):await _y(null,e,n,Object.freeze([]))}gy.BREAK=dy,gy.SKIP=fy,gy.REMOVE=py;async function _y(e,t,n,r){let i=await yy(e,t,n,r);if(ly(i)||ay(i))return by(e,r,i),_y(e,i,n,r);if(typeof i!=`symbol`){if(cy(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await _y(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else{if(i===dy)return dy;i===py&&(t.items.splice(e,1),--e)}}}else if(ay(t)){r=Object.freeze(r.concat(t));let e=await _y(`key`,t.key,n,r);if(e===dy)return dy;e===py&&(t.key=null);let i=await _y(`value`,t.value,n,r);if(i===dy)return dy;i===py&&(t.value=null)}}return i}function vy(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 yy(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(iy(t))return n.Map?.(e,t,r);if(sy(t))return n.Seq?.(e,t,r);if(ay(t))return n.Pair?.(e,t,r);if(oy(t))return n.Scalar?.(e,t,r);if(ny(t))return n.Alias?.(e,t,r)}function by(e,t,n){let r=t[t.length-1];if(cy(r))r.items[e]=n;else if(ay(r))e===`key`?r.key=n:r.value=n;else if(ry(r))r.contents=n;else{let e=ny(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var xy={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Sy=e=>e.replace(/[!,[\]{}]/g,e=>xy[e]),Cy=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+Sy(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&&ly(e.contents)){let t={};my(e.contents,(e,n)=>{ly(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(`
632
+ `)}};Cy.defaultYaml={explicit:!1,version:`1.2`},Cy.defaultTags={"!!":`tag:yaml.org,2002:`};function wy(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 Ty(e){let t=/* @__PURE__ */ new Set;return my(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Ey(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Dy(e,t){let n=[],r=/* @__PURE__ */ new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Ty(e);let a=Ey(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(oy(t.node)||cy(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 Oy(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=Oy(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=Oy(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=Oy(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=Oy(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function ky(e,t,n){if(Array.isArray(e))return e.map((e,t)=>ky(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!uy(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 Ay=class{constructor(e){Object.defineProperty(this,ty,{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(!ry(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=ky(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Oy(i,{"":o},``,o):o}},jy=class extends Ay{constructor(e){super(Yv),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=[],my(e,{Node:(e,t)=>{(ny(t)||uy(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||=(ky(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=My(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(wy(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 My(e,t,n){if(ny(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(cy(t)){let r=0;for(let i of t.items){let t=My(e,i,n);t>r&&(r=t)}return r}if(ay(t)){let r=My(e,t.key,n),i=My(e,t.value,n);return Math.max(r,i)}return 1}var Ny=e=>!e||typeof e!=`function`&&typeof e!=`object`,V=class extends Ay{constructor(e){super($v),this.value=e}toJSON(e,t){return t?.keep?this.value:ky(this.value,e,t)}toString(){return String(this.value)}};V.BLOCK_FOLDED=`BLOCK_FOLDED`,V.BLOCK_LITERAL=`BLOCK_LITERAL`,V.PLAIN=`PLAIN`,V.QUOTE_DOUBLE=`QUOTE_DOUBLE`,V.QUOTE_SINGLE=`QUOTE_SINGLE`;var Py=`tag:yaml.org,2002:`;function Fy(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 Iy(e,t,n){if(ry(e)&&(e=e.contents),ly(e))return e;if(ay(e)){let t=n.schema[Zv].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 jy(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Py+t.slice(2));let l=Fy(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new V(e);return c&&(c.node=t),t}l=e instanceof Map?o[Zv]:Symbol.iterator in Object(e)?o[ey]:o[Zv]}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 V(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Ly(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 Iy(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 Ry=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,zy=class extends Ay{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=>ly(t)||ay(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ry(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(cy(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Ly(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(cy(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&&oy(i)?i.value:i:cy(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!ay(t))return!1;let n=t.value;return n==null||e&&oy(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 cy(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(cy(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Ly(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},By=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Vy(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Hy=(e,t,n)=>e.endsWith(`
633
+ `)?Vy(n,t):n.includes(`
634
+ `)?`
635
+ `+Vy(n,t):(e.endsWith(` `)?``:` `)+n,Uy=`flow`,Wy=`block`,Gy=`quoted`;function Ky(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===Wy&&(h=qy(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===Gy&&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===`
636
+ `)n===Wy&&(h=qy(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
637
+ `&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
638
+ `&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===Gy){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=`
639
+ ${t}${e.slice(0,a)}`:(n===Gy&&u[i]&&(v+=`${e[i]}\\`),v+=`
640
+ ${t}${e.slice(i+1,a)}`)}return v}function qy(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!==`
641
+ `);r=t,i=t+1,a=e[i]}return r}var Jy=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Yy=e=>/^(%|---|\.\.\.)/m.test(e);function Xy(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]===`
642
+ `){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Zy(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Yy(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)+`
643
+
644
+ `;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
645
+ `,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:Ky(o,a,Gy,Jy(t,!1))}function Qy(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
646
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Zy(e,t);let n=t.indent||(Yy(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&
647
+ ${n}`)+`'`;return t.implicitKey?r:Ky(r,n,Uy,Jy(t,!1))}function $y(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Zy;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Qy:i&&!t?Zy:n?Qy:Zy}return r(e,t)}var eb;try{eb=/* @__PURE__ */ RegExp(`(^|(?<!
648
+ ))
649
+ +(?!
650
+ |$)`,`g`)}catch{eb=/\n+(?!\n|$)/g}function tb({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 $y(n,r);let l=r.indent||(r.forceBlockIndent||Yy(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===V.BLOCK_FOLDED?!1:t===V.BLOCK_LITERAL||!Xy(n,c,l.length);if(!n)return u?`|
651
+ `:`>
652
+ `;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
653
+ `&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
654
+ `);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
655
+ `&&(p=p.slice(0,-1)),p.replace(eb,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
656
+ `)_=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,`
657
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=Jy(r,!0);o!==`folded`&&t!==V.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=Ky(`${v}${e}${p}`,l,Wy,a);if(!i)return`>${y}
658
+ ${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}
659
+ ${l}${v}${n}${p}`}function nb(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(`
660
+ `)||u&&/[[\]{},]/.test(a))return $y(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
661
+ `)?$y(a,t):tb(e,t,n,r);if(!s&&!u&&i!==V.PLAIN&&a.includes(`
662
+ `))return tb(e,t,n,r);if(Yy(a)){if(c===``)return t.forceBlockIndent=!0,tb(e,t,n,r);if(s&&c===l)return $y(a,t)}let d=a.replace(/\n+/g,`$&
663
+ ${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 $y(a,t)}return s?d:Ky(d,c,Uy,Jy(t,!1))}function rb(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!==V.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=V.QUOTE_DOUBLE);let c=e=>{switch(e){case V.BLOCK_FOLDED:case V.BLOCK_LITERAL:return i||a?$y(o.value,t):tb(o,t,n,r);case V.QUOTE_DOUBLE:return Zy(o.value,t);case V.QUOTE_SINGLE:return Qy(o.value,t);case V.PLAIN:return nb(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 ib(e,t){let n=Object.assign({blockQuote:!0,commentString:By,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 ab(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(oy(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 ob(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(oy(e)||cy(e))&&e.anchor;a&&wy(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 sb(e,t,n,r){if(ay(e))return e.toString(t,n,r);if(ny(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=ly(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=ab(t.doc.schema.tags,a);let o=ob(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):oy(a)?rb(a,t,n,r):a.toString(t,n,r);return o?oy(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}
664
+ ${t.indent}${s}`:s}function cb({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=ly(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(cy(e)||!ly(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||cy(e)||(oy(e)?e.type===V.BLOCK_FOLDED||e.type===V.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=sb(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+=Hy(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Hy(g,n.indent,l(f))),g=`? ${g}
665
+ ${s}:`):(g=`${g}:`,f&&(g+=Hy(g,n.indent,l(f))));let _,v,y;ly(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&&oy(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&sy(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=sb(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
666
+ `:``,v){let e=l(v);S+=`
667
+ ${Vy(e,n.indent)}`}x===``&&!n.inFlow?S===`
668
+ `&&y&&(S=`
669
+
670
+ `):S+=`
671
+ ${n.indent}`}else if(!p&&cy(t)){let e=x[0],r=x.indexOf(`
672
+ `),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=`
673
+ ${n.indent}`)}}else(x===``||x[0]===`
674
+ `)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=Hy(g,n.indent,l(y)):h&&i&&i(),g}function lb(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var ub=`<<`,db={identify:e=>e===ub||typeof e==`symbol`&&e.description===ub,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new V(Symbol(ub)),{addToJSMap:pb}),stringify:()=>ub},fb=(e,t)=>(db.identify(t)||oy(t)&&(!t.type||t.type===V.PLAIN)&&db.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===db.tag&&e.default);function pb(e,t,n){let r=hb(e,n);if(sy(r))for(let n of r.items)mb(e,t,n);else if(Array.isArray(r))for(let n of r)mb(e,t,n);else mb(e,t,r)}function mb(e,t,n){let r=hb(e,n);if(!iy(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 hb(e,t){return e&&ny(t)?t.resolve(e.doc,e):t}function gb(e,t,{key:n,value:r}){if(ly(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(fb(e,n))pb(e,t,r);else{let i=ky(n,``,e);if(t instanceof Map)t.set(i,ky(r,i,e));else if(t instanceof Set)t.add(i);else{let a=_b(n,i,e),o=ky(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function _b(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(ly(e)&&n?.doc){let t=ib(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)+`..."`),lb(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 vb(e,t,n){return new yb(Iy(e,void 0,n),Iy(t,void 0,n))}var yb=class e{constructor(e,t=null){Object.defineProperty(this,ty,{value:Qv}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return ly(n)&&(n=n.clone(t)),ly(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return gb(t,t?.mapAsMap?/* @__PURE__ */ new Map:{},this)}toString(e,t,n){return e?.doc?cb(this,e,t,n):JSON.stringify(this)}};function bb(e,t,n){return(t.inFlow??e.flow?Sb:xb)(e,t,n)}function xb({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(ly(i))!d&&i.spaceBefore&&f.push(``),Cb(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(ay(i)){let e=ly(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),Cb(n,f,e.commentBefore,d))}d=!1;let s=sb(i,u,()=>o=null,()=>d=!0);o&&(s+=Hy(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?`
675
+ ${c}${t}`:`
676
+ `}}return e?(p+=`
677
+ `+Vy(l(e),c),s&&s()):d&&o&&o(),p}function Sb({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(ly(i))i.spaceBefore&&d.push(``),Cb(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(ay(i)){let e=ly(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),Cb(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=ly(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=sb(i,c,()=>a=null);l||=d.length>u||o.includes(`
678
+ `),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+=Hy(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?`
679
+ ${a}${i}${t}`:`
680
+ `;return`${e}
681
+ ${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function Cb({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=Vy(t(r),e);n.push(i.trimStart())}}function wb(e,t){let n=oy(t)?t.value:t;for(let r of e)if(ay(r)&&(r.key===t||r.key===n||oy(r.key)&&r.key.value===n))return r}var Tb=class extends zy{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Zv,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(vb(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=ay(e)?e:!e||typeof e!=`object`||!(`key`in e)?new yb(e,e?.value):new yb(e.key,e.value);let r=wb(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);oy(r.value)&&Ny(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=wb(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=wb(this.items,e)?.value;return(!t&&oy(n)?n.value:n)??void 0}has(e){return!!wb(this.items,e)}set(e,t){this.add(new yb(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)gb(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!ay(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})),bb(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},Eb={collection:`map`,default:!0,nodeClass:Tb,tag:`tag:yaml.org,2002:map`,resolve(e,t){return iy(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Tb.from(e,t,n)},Db=class extends zy{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(ey,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Ob(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=Ob(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&oy(r)?r.value:r}has(e){let t=Ob(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=Ob(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];oy(r)&&Ny(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(ky(e,String(r++),t));return n}toString(e,t,n){return e?bb(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(Iy(a,void 0,n))}}return i}};function Ob(e){let t=oy(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var kb={collection:`seq`,default:!0,nodeClass:Db,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return sy(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>Db.from(e,t,n)},Ab={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),rb(e,t,n,r)}},jb={identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new V(null),stringify:({source:e},t)=>typeof e==`string`&&jb.test.test(e)?e:t.options.nullStr},Mb={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new V(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&Mb.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function Nb({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 Pb={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:Nb},Fb={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():Nb(e)}},Ib={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 V(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:Nb},Lb=e=>typeof e==`bigint`||Number.isInteger(e),Rb=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function zb(e,t,n){let{value:r}=e;return Lb(r)&&r>=0?n+r.toString(t):Nb(e)}var Bb={identify:e=>Lb(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>Rb(e,2,8,n),stringify:e=>zb(e,8,`0o`)},Vb={identify:Lb,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Rb(e,0,10,n),stringify:Nb},Hb={identify:e=>Lb(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Rb(e,2,16,n),stringify:e=>zb(e,16,`0x`)},Ub=[Eb,kb,Ab,jb,Mb,Bb,Vb,Hb,Pb,Fb,Ib];function Wb(e){return typeof e==`bigint`||Number.isInteger(e)}var Gb=({value:e})=>JSON.stringify(e),Kb=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Gb},{identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Gb},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Gb},{identify:Wb,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})=>Wb(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:Gb}],qb=[Eb,kb].concat(Kb,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),Jb={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??=V.BLOCK_LITERAL,t!==V.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===V.BLOCK_LITERAL?`
682
+ `:` `)}return rb({comment:e,type:t,value:s},r,i,a)}};function Yb(e,t){if(sy(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!ay(r)){if(iy(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new yb(new V(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}
683
+ ${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}
684
+ ${t.comment}`:r.comment}r=e}e.items[n]=ay(r)?r:new yb(r)}}else t(`Expected a sequence for this tag`);return e}function Xb(e,t,n){let{replacer:r}=n,i=new Db(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(vb(o,s,n))}return i}var Zb={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Yb,createNode:Xb},Qb=class e extends Db{constructor(){super(),this.add=Tb.prototype.add.bind(this),this.delete=Tb.prototype.delete.bind(this),this.get=Tb.prototype.get.bind(this),this.has=Tb.prototype.has.bind(this),this.set=Tb.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(ay(e)?(r=ky(e.key,``,t),i=ky(e.value,r,t)):r=ky(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=Xb(e,t,n),i=new this;return i.items=r.items,i}};Qb.tag=`tag:yaml.org,2002:omap`;var $b={collection:`seq`,identify:e=>e instanceof Map,nodeClass:Qb,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Yb(e,t),r=[];for(let{key:e}of n.items)oy(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new Qb,n)},createNode:(e,t,n)=>Qb.from(e,t,n)};function ex({value:e,source:t},n){return t&&(e?tx:nx).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var tx={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 V(!0),stringify:ex},nx={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 V(!1),stringify:ex},rx={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:Nb},ix={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():Nb(e)}},ax={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 V(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:Nb},ox=e=>typeof e==`bigint`||Number.isInteger(e);function sx(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 cx(e,t,n){let{value:r}=e;if(ox(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return Nb(e)}var lx={identify:ox,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>sx(e,2,2,n),stringify:e=>cx(e,2,`0b`)},ux={identify:ox,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>sx(e,1,8,n),stringify:e=>cx(e,8,`0`)},dx={identify:ox,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>sx(e,0,10,n),stringify:Nb},fx={identify:ox,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>sx(e,2,16,n),stringify:e=>cx(e,16,`0x`)},px=class e extends Tb{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=ay(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new yb(e.key,null):new yb(e,null),wb(this.items,t.key)||this.items.push(t)}get(e,t){let n=wb(this.items,e);return!t&&ay(n)?oy(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=wb(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new yb(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(vb(e,null,n));return i}};px.tag=`tag:yaml.org,2002:set`;var mx={collection:`map`,identify:e=>e instanceof Set,nodeClass:px,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>px.from(e,t,n),resolve(e,t){if(iy(e)){if(e.hasAllNullValues(!0))return Object.assign(new px,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function hx(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 gx(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Nb(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 _x={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})=>hx(e,n),stringify:gx},vx={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=>hx(e,!1),stringify:gx},yx={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(yx.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=hx(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$/,``)??``},bx=[Eb,kb,Ab,jb,tx,nx,lx,ux,dx,fx,rx,ix,ax,Jb,db,$b,Zb,mx,_x,vx,yx],xx=/* @__PURE__ */ new Map([[`core`,Ub],[`failsafe`,[Eb,kb,Ab]],[`json`,qb],[`yaml11`,bx],[`yaml-1.1`,bx]]),Sx={binary:Jb,bool:Mb,float:Ib,floatExp:Fb,floatNaN:Pb,floatTime:vx,int:Vb,intHex:Hb,intOct:Bb,intTime:_x,map:Eb,merge:db,null:jb,omap:$b,pairs:Zb,seq:kb,set:mx,timestamp:yx},Cx={"tag:yaml.org,2002:binary":Jb,"tag:yaml.org,2002:merge":db,"tag:yaml.org,2002:omap":$b,"tag:yaml.org,2002:pairs":Zb,"tag:yaml.org,2002:set":mx,"tag:yaml.org,2002:timestamp":yx};function wx(e,t,n){let r=xx.get(t);if(r&&!e)return n&&!r.includes(db)?r.concat(db):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(xx.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(db)),i.reduce((e,t)=>{let n=typeof t==`string`?Sx[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(Sx).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 Tx=(e,t)=>e.key<t.key?-1:+(e.key>t.key),Ex=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?wx(e,`compat`):e?wx(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?Cx:{},this.tags=wx(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Zv,{value:Eb}),Object.defineProperty(this,$v,{value:Ab}),Object.defineProperty(this,ey,{value:kb}),this.sortMapEntries=typeof a==`function`?a:a===!0?Tx:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Dx(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=ib(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(Vy(t,``))}let o=!1,s=null;if(e.contents){if(ly(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(Vy(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=sb(e.contents,i,()=>s=null,t);s&&(c+=Hy(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(sb(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
685
+ `)?(n.push(`...`),n.push(Vy(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(Vy(a(t),``)))}return n.join(`
686
+ `)+`
687
+ `}var Ox=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ty,{value:Xv});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 Cy({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[ty]:{value:Xv}});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=ly(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){kx(this.contents)&&this.contents.add(e)}addIn(e,t){kx(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=Ty(this);e.anchor=!t||n.has(t)?Ey(t||`a`,n):t}return new jy(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}=Dy(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=Iy(e,l,p);return o&&cy(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new yb(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return kx(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ry(e)?this.contents!=null&&(this.contents=null,!0):kx(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return cy(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ry(e)?!t&&oy(this.contents)?this.contents.value:this.contents:cy(this.contents)?this.contents.getIn(e,t):void 0}has(e){return cy(this.contents)?this.contents.has(e):!1}hasIn(e){return Ry(e)?this.contents!==void 0:cy(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Ly(this.schema,[e],t):kx(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ry(e)?this.contents=t:this.contents==null?this.contents=Ly(this.schema,Array.from(e),t):kx(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 Cy({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 Cy({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 Ex(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=ky(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`?Oy(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 Dx(this,e)}};function kx(e){if(cy(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var Ax=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},jx=class extends Ax{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},Mx=class extends Ax{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},Nx=(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)+`…
688
+ `),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+=`:
689
+
690
+ ${o}
691
+ ${s}
692
+ `}};function Px(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 Fx(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
693
+ `))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(Fx(t.key)||Fx(t.value))return!0}return!1;default:return!0}}function Ix(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&Fx(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function Lx(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||oy(e)&&oy(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var Rx=`All mapping items must start at the same column`;function zx({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Tb)(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=Px(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`,Rx)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
694
+ `+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||Fx(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`,Rx);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&Ix(r.indent,u,i),n.atKey=!1,Lx(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=Px(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&&Ix(r.indent,f,i),s=c.range[2];let l=new yb(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+=`
695
+ `+_.comment:g.comment=_.comment);let e=new yb(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 Bx({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Db)(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=Px(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&&Ix(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function Vx(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 Hx=`Block collections are not allowed within flow collections`,Ux=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function Wx({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?Tb:Db))(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=Px(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+=`
696
+ `+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&Fx(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];ay(t)&&(t=t.value??t.key),t.comment?t.comment+=`
697
+ `+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],Ux(m)&&i(r.range,`BLOCK_IN_FLOW`,Hx)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);Ux(f)&&i(g.range,`BLOCK_IN_FLOW`,Hx),n.atKey=!1;let _=Px(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?Ux(m)&&i(v.range,`BLOCK_IN_FLOW`,Hx):_.comment&&(g.comment?g.comment+=`
698
+ `+_.comment:g.comment=_.comment);let y=new yb(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;Lx(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new Tb(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=Vx(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
699
+ `+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function Gx(e,t,n,r,i,a){let o=n.type===`block-map`?zx(e,t,n,r,a):n.type===`block-seq`?Bx(e,t,n,r,a):Wx(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function Kx(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===Tb.tagName&&s===`map`||o===Db.tagName&&s===`seq`)return Gx(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),Gx(e,t,n,i,o)}let l=Gx(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=ly(u)?u:new V(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function qx(e,t,n){let r=t.offset,i=Jx(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?V.BLOCK_FOLDED:V.BLOCK_LITERAL,o=t.source?Yx(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?`
700
+ `.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)+`
701
+ `;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===V.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
702
+ `):t.length>c||r[0]===` `?(f===` `?f=`
703
+ `:!p&&f===`
704
+ `&&(f=`
705
+
706
+ `),d+=f+t.slice(c)+r,f=`
707
+ `,p=!0):r===``?f===`
708
+ `?d+=`
709
+ `:f=`
710
+ `:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
711
+ `+o[e][0].slice(c);d[d.length-1]!==`
712
+ `&&(d+=`
713
+ `);break;default:d+=`
714
+ `}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function Jx({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 Yx(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 Xx(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=V.PLAIN,c=Zx(a,l);break;case`single-quoted-scalar`:s=V.QUOTE_SINGLE,c=Qx(a,l);break;case`double-quoted-scalar`:s=V.QUOTE_DOUBLE,c=eS(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=Vx(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Zx(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}`),$x(e)}function Qx(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),$x(e.slice(1,-1)).replace(/''/g,`'`)}function $x(e){let t,n;try{t=/* @__PURE__ */ RegExp(`(.*?)(?<![ ])[ ]*\r?
715
+ `,`sy`),n=/* @__PURE__ */ RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
716
+ `,`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===`
717
+ `?i+=a:a=`
718
+ `:(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 eS(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
719
+ `){if(i===`
720
+ `){let{fold:t,offset:i}=tS(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=nS[i];if(a)n+=a;else if(i===`
721
+ `)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
722
+ `)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+=rS(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!==`
723
+ `&&(a!==`\r`||e[r+2]!==`
724
+ `)&&(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 tS(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
725
+ `||r===`\r`)&&(r!==`\r`||e[t+2]===`
726
+ `);)r===`
727
+ `&&(n+=`
728
+ `),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var nS={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
729
+ `,r:`\r`,t:` `,v:`\v`,N:`…`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function rS(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 iS(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?qx(e,t,r):Xx(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[$v]:c?aS(e.schema,i,c,n,r):t.type===`scalar`?oS(e,i,t,r):e.schema[$v];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=oy(a)?a:new V(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new V(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 aS(e,t,n,r,i){if(n===`!`)return e[$v];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[$v])}function oS({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[$v];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[$v];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 sS(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 cS={composeNode:lS,composeEmptyNode:uS};function lS(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=dS(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=iS(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=Kx(cS,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??=uS(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&&(!oy(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 uS(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=iS(e,{type:`scalar`,offset:sS(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 dS({options:e},{offset:t,source:n,end:r},i){let a=new jy(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=Vx(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function fS(e,t,{offset:n,start:r,value:i,end:a},o){let s=new Ox(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=Px(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?lS(c,i,l,o):uS(c,l.end,r,null,l,o);let u=s.contents.range[2],d=Vx(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function pS(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 mS(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?`
730
+
731
+ `:`
732
+ `)+(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 hS=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=pS(e);r?this.warnings.push(new Mx(i,t,n)):this.errors.push(new jx(i,t,n))},this.directives=new Cy({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=mS(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
733
+ ${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(cy(i)&&!i.flow&&i.items.length>0){let e=i.items[0];ay(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}
734
+ ${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}
735
+ ${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:mS(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=pS(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=fS(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 jx(pS(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 jx(pS(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=Vx(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}
736
+ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new jx(pS(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 Ox(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}}},gS={};Vh(gS,{BOM:()=>jS,DOCUMENT:()=>MS,FLOW_END:()=>NS,SCALAR:()=>PS,createScalarToken:()=>vS,isCollection:()=>FS,isScalar:()=>IS,prettyToken:()=>LS,resolveAsScalar:()=>_S,setScalarValue:()=>yS,stringify:()=>CS,tokenType:()=>RS,visit:()=>kS});function _S(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 jx([i,i+1],t,r)};switch(e.type){case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return Xx(e,t,r);case`block-scalar`:return qx({options:{strict:t}},e,r)}}return null}function vS(e,t){let{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:a=-1,type:o=`PLAIN`}=t,s=rb({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:`
737
+ `}];switch(s[0]){case`|`:case`>`:{let e=s.indexOf(`
738
+ `),t=s.substring(0,e),n=s.substring(e+1)+`
739
+ `,i=[{type:`block-scalar-header`,offset:a,indent:r,source:t}];return xS(i,c)||i.push({type:`newline`,offset:-1,indent:r,source:`
740
+ `}),{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 yS(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=rb({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`>`:bS(e,c);break;case`"`:SS(e,c,`double-quoted-scalar`);break;case`'`:SS(e,c,`single-quoted-scalar`);break;default:SS(e,c,`scalar`)}}function bS(e,t){let n=t.indexOf(`
741
+ `),r=t.substring(0,n),i=t.substring(n+1)+`
742
+ `;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}];xS(a,`end`in e?e.end:void 0)||a.push({type:`newline`,offset:-1,indent:n,source:`
743
+ `});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 xS(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 SS(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:`
744
+ `};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 CS=e=>`type`in e?wS(e):TS(e);function wS(e){switch(e.type){case`block-scalar`:{let t=``;for(let n of e.props)t+=wS(n);return t+e.source}case`block-map`:case`block-seq`:{let t=``;for(let n of e.items)t+=TS(n);return t}case`flow-collection`:{let t=e.start.source;for(let n of e.items)t+=TS(n);for(let n of e.end)t+=n.source;return t}case`document`:{let t=TS(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 TS({start:e,key:t,sep:n,value:r}){let i=``;for(let t of e)i+=t.source;if(t&&(i+=wS(t)),n)for(let e of n)i+=e.source;return r&&(i+=wS(r)),i}var ES=Symbol(`break visit`),DS=Symbol(`skip children`),OS=Symbol(`remove item`);function kS(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),AS(Object.freeze([]),e,t)}kS.BREAK=ES,kS.SKIP=DS,kS.REMOVE=OS,kS.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},kS.parentCollection=(e,t)=>{let n=kS.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 AS(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=AS(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else{if(r===ES)return ES;r===OS&&(a.items.splice(t,1),--t)}}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}var jS=``,MS=``,NS=``,PS=``,FS=e=>!!e&&`items`in e,IS=e=>!!e&&(e.type===`scalar`||e.type===`single-quoted-scalar`||e.type===`double-quoted-scalar`||e.type===`block-scalar`);function LS(e){switch(e){case jS:return`<BOM>`;case MS:return`<DOC>`;case NS:return`<FLOW_END>`;case PS:return`<SCALAR>`;default:return JSON.stringify(e)}}function RS(e){switch(e){case jS:return`byte-order-mark`;case MS:return`doc-mode`;case NS:return`flow-error-end`;case PS:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
745
+ `:case`\r
746
+ `: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 zS(e){switch(e){case void 0:case` `:case`
747
+ `:case`\r`:case` `:return!0;default:return!1}}var BS=/* @__PURE__ */ new Set(`0123456789ABCDEFabcdef`),VS=/* @__PURE__ */ new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),HS=/* @__PURE__ */ new Set(`,[]{}`),US=/* @__PURE__ */ new Set(` ,[]{}
748
+ \r `),WS=e=>!e||US.has(e),GS=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===`
749
+ `||t===`\r`&&this.buffer[e+1]===`
750
+ `}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===`
751
+ `||!t&&!this.atEnd)return e+n+1}return t===`
752
+ `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&zS(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(`
753
+ `,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]===jS&&(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 MS,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===`...`)&&zS(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&&!zS(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===`:`)&&zS(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(WS),`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(`...`))&&zS(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield NS,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(WS),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||zS(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(`
754
+ `,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
755
+ `,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=>zS(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`
756
+ `:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
757
+ `)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(`
758
+ `,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===`
759
+ `;)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===`
760
+ `&&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield PS,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(zS(r)||e&&HS.has(r))break;t=n}else if(zS(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
761
+ `?(n+=1,r=`
762
+ `,i=this.buffer[n+1]):t=n),i===`#`||e&&HS.has(i))break;if(r===`
763
+ `){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&HS.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield PS,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(WS),e+=yield*this.pushSpaces(!0);continue e;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(zS(n)||t&&HS.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(;!zS(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(VS.has(t))t=this.buffer[++e];else if(t===`%`&&BS.has(this.buffer[e+1])&&BS.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===`
764
+ `?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
765
+ `?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)}},KS=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 qS(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function JS(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 YS(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 XS(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 ZS(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 QS(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 $S(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!qS(t.start,`explicit-key-ind`)&&!qS(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,YS(t.value)?t.value.end?QS(t.value.end,t.sep):t.value.end=t.sep:QS(t.start,t.sep),delete t.sep)}var eC=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 GS,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=RS(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})}else{if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let 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`&&$S(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&&JS(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`:JS(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=ZS(XS(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(`
766
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
767
+ `,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)){QS(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(qS(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(YS(t.key)&&!qS(t.sep,`newline`)){let e=ZS(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(qS(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=ZS(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]}):qS(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&&!qS(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)){QS(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||qS(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=ZS(XS(t));$S(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(`
768
+ `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
769
+ `,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=ZS(XS(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=ZS(XS(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 tC(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new KS||null,prettyErrors:t}}function nC(e,t={}){let{lineCounter:n,prettyErrors:r}=tC(t),i=new eC(n?.addNewLine),a=new hS(t),o=Array.from(a.compose(i.parse(e)));if(r&&n)for(let t of o)t.errors.forEach(Nx(e,n)),t.warnings.forEach(Nx(e,n));return o.length>0?o:Object.assign([],{empty:!0},a.streamInfo())}function rC(e,t={}){let{lineCounter:n,prettyErrors:r}=tC(t),i=new eC(n?.addNewLine),a=new hS(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 jx(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(Nx(e,n)),o.warnings.forEach(Nx(e,n))),o}function iC(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=rC(e,n);if(!i)return null;if(i.warnings.forEach(e=>lb(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 aC(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 ry(e)&&!r?e.toString(n):new Ox(e,r,n).toString(n)}var oC=Jv;function sC(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(cC(e,i))return Hv(qv(e.items),i,t,zv);if(ay(e))return Hv(e,i,t,zv);{let n=[];for(let e of Tv(i.start))if(Dv(e))n.push(e);else if(e.type!==`comma`)throw Error(`Unexpected token type in sequence item start: ${e.type}`);let r=t.transformNode(e,{tokens:n});return Kv(_v(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 Ov(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 Tv(r.end))if(e.type===`comment`)t.transformComment(e);else if(e.type===`flow-seq-end`)a=e;else throw Error(`Unexpected token type in flow seq end: ${e.type}`);if(!a)throw Error(`Expected flow-seq-end token`);return Gv(t.transformRange([r.start.offset,a.offset+a.source.length]),t.transformContentProperties(e,n.tokens),i)}function cC(e,t){return e.srcToken||!iy(e)?!1:e.items.length===1&&e.items[0].srcToken===t}function lC(e,t,n){return{type:`mapping`,position:e,leadingComments:[],...t,children:n}}function uC(e,t,n){return{type:`mappingItem`,position:e,leadingComments:[],children:[t,n]}}function dC(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 Hv(e,i,t,uC)});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 Ov(e.start,t))throw Error(`Unexpected token type in collection item start: ${n.type}`)}return lC(_v(i[0].position.start,qv(i).position.end),t.transformContentProperties(e,n.tokens),i)}function fC(e,t,n){return{type:`plain`,position:e,leadingComments:[],trailingComment:null,...t,value:n}}function pC(e,t,n){for(let r=t;r>=0;r--)if(n.test(e[r]))return r;return-1}function mC(e,t,n){if(e.range[0]===e.range[1]){let r=pC(t.text,e.range[0]-1,/\S/u)+1;return fC(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 Ov(r.end,t))throw Error(`Unexpected token type in plain scalar end: ${e.type}`);return fC(t.transformRange(e.range),t.transformContentProperties(e,n.tokens),e.source)}function hC(e){return{...e,type:`quoteDouble`}}function gC(e,t,n){return{type:`quoteValue`,position:e,...t,leadingComments:[],trailingComment:null,value:n}}function _C(e,t,n,r){for(let e of Ov(t.end,n))throw Error(`Unexpected token type in quote value end: ${e.type}`);return gC(n.transformRange(e.range),n.transformContentProperties(e,r.tokens),e.source)}function vC(e,t,n){let r=e.srcToken;if(!r||r.type!==`double-quoted-scalar`)throw Error(`Expected double-quoted scalar srcToken`);return hC(_C(e,r,t,n))}function yC(e){return{...e,type:`quoteSingle`}}function bC(e,t,n){let r=e.srcToken;if(!r||r.type!==`single-quoted-scalar`)throw Error(`Expected single-quoted scalar srcToken`);return yC(_C(e,r,t,n))}function xC(e,t,n){return{type:`sequence`,position:e,leadingComments:[],endComments:[],...t,children:n}}function SC(e,t){return{type:`sequenceItem`,position:e,leadingComments:[],trailingComment:null,endComments:[],children:t?[t]:[]}}function CC(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 Tv(i.start))if(Dv(e))a.push(e);else if(e.type===`seq-item-ind`)o=e;else throw Error(`Unexpected token type in sequence item start: ${e.type}`);let s=wC(e,t,{tokens:a});return SC(_v(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 Ov(e.start,t))throw Error(`Unexpected token type in collection item start: ${n.type}`)}return xC(_v(i[0].position.start,qv(i).position.end),t.transformContentProperties(e,n.tokens),i)}function wC(e,t,n){if(!ay(e))return EC(e,n)?(Ov(n.tokens,t),null):t.transformNode(e,n);let r=e.srcToken,i=Hv(e,r,t,uC);return lC(i.position,t.transformContentProperties(e.key,n.tokens),[i])}function TC(e,t,n){if(e==null)return null;if(ny(e))return kv(e,t,n);if(iy(e))return e.flow?Wv(e,t,n):dC(e,t,n);if(sy(e))return e.flow?sC(e,t,n):CC(e,t,n);if(oy(e)){switch(e.type){case`BLOCK_FOLDED`:return Pv(e,t,n);case`BLOCK_LITERAL`:return Iv(e,t,n);case`PLAIN`:return mC(e,t,n);case`QUOTE_DOUBLE`:return vC(e,t,n);case`QUOTE_SINGLE`:return bC(e,t,n)}throw Error(`Unexpected scalar type: ${e.type}`)}throw Error(`Unexpected unknown node type`)}function EC(e,t){return!e||e.range[0]===e.range[1]&&t.tokens.every(e=>e.type===`comment`)}var DC=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 _v(t,n)}transformNode(e,t){return TC(e,this,t)}transformComment(e){let t=yv(e,this);return this.comments.push(t),t}transformContentProperties(e,t){return Cv(e,t,this)}};function OC(e,t,n,r,i,a){return{type:`document`,position:e,trailingComment:a,directivesEndMarker:t,documentEndMarker:n,children:[r,i]}}function kC(e,t,n){return{type:`documentBody`,position:e,endComments:n,children:t?[t]:[]}}function AC(e,t,n){for(let r=t;r<e.length;r++)if(n.test(e[r]))return r;return null}function jC(e,t,n,r,i,a,o){let{documentTrailingComment:s,endComments:c,propTokens:l}=MC(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 Ov(l,o))throw Error(`Unexpected token type in empty document body: ${e.type}`);let{position:f,documentEndPoint:p}=NC(e,r,d,a,o);return{documentBody:kC(f,d,c),documentEndPoint:p,documentTrailingComment:s}}function MC(e,t,n,r,i){let a=[],o=[],s=[];for(let t of e)if(Dv(t))s.push(t);else throw Error(`Unexpected token type: ${t.type}`);for(let e of Ov(n,i))throw Error(`Unexpected token type: ${e.type}`);let c=r?i.transformOffset(r.offset):null;if(t)for(let e of Tv(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)}else throw Error(`Unexpected token type: ${e.type}`);if(o.length>1)throw Error(`Unexpected multiple document trailing comments at ${lv(o[1].position.start)}`);return{propTokens:s,endComments:a,documentTrailingComment:qv(o)||null}}function NC(e,t,n,r,i){let a=r?Math.max(0,r.offset-1):AC(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 PC(e,t,n,r){return{type:`documentHead`,position:e,endComments:n,trailingComment:r,children:t}}function FC(e,t,n){return{type:`directive`,position:e,leadingComments:[],trailingComment:null,name:t,parameters:n}}function IC(e,t){let n=e.source.trim().split(/[\t ]+/),r=n.shift().replace(/^%/,``);return FC(t.transformRange([e.offset,e.offset+e.source.length]),r,n)}function LC(e,t,n,r){let{directives:i,endCommentCandidates:a}=RC(e,r),o=[],s=null;if(t){for(let e of Tv(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=zC(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:PC(c,i,s?a:[],l),docStart:s,tokensBeforeBody:o}}function RC(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=IC(a,t);n.push(e),i=e,r=[]}return{directives:n,endCommentCandidates:r}}function zC(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 BC(e,t){let{documentHead:n,tokensBeforeBody:r,docStart:i}=LC(e.tokensBeforeBody,e.cstNode,e.node,t),{documentBody:a,documentEndPoint:o,documentTrailingComment:s}=jC(i,r,e.cstNode,e.node,e.tokensAfterBody,e.documentEnd,t);return OC(_v(n.position.start,o),!!i,!!e.documentEnd,n,a,s)}function VC(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 Tv(t))if(c.type===`document`){if(r.length>=e.length)throw Error(`Unexpected 'document' token at ${lv(n.transformOffset(c.offset))}`);o=s(c)}else if(c.type===`comment`)i.push(c);else if(c.type===`directive`)a.push(...i,c),i.length=0;else if(c.type===`doc-end`){if(!o||o.documentEnd)throw Error(`Unexpected 'doc-end' token at ${lv(n.transformOffset(c.offset))}`);o.tokensAfterBody=[...i],i.length=0,o.documentEnd=c}if(a.length>0){let[e]=a;throw Error(`Unexpected '${e.type}' token at ${lv(n.transformOffset(e.offset))}`)}return i.length>0&&(o||=s(null),i.length>0&&(o.tokensAfterBody.push(...i),i.length=0)),r.map(e=>BC(e,n))}function HC(e,t,n,r){let i=t(e);return t=>{r(i,t)&&n(e,i=t)}}function UC(e){if(e===null||!(`children`in e))return;let t=e.children;if(t.forEach(UC),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=HC(e.position,WC,GC,JC),r=HC(e.position,KC,qC,YC);`endComments`in e&&e.endComments.length!==0&&(n(e.endComments[0].position.start),r(qv(e.endComments).position.end));let i=t.filter(e=>e!==null);if(i.length!==0){let e=i[0],t=qv(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 WC(e){return e.start}function GC(e,t){e.start=t}function KC(e){return e.end}function qC(e,t){e.end=t}function JC(e,t){return t.offset<e.offset}function YC(e,t){return t.offset>e.offset}function XC(e,t){let n=new KS,r=new DC(e,n),i=new eC(n.addNewLine),a=new hS({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 sv(r,e[0]);o.push(t)}let c=VC(o,s,r),l=r.comments.sort((e,t)=>e.position.start.offset-t.position.end.offset),u=gv(r.transformRange([0,e.length]),c,l);return uv(u),UC(u),u}function ZC(e,t){let n=/* @__PURE__ */ SyntaxError(e+` (`+t.loc.start.line+`:`+t.loc.start.column+`)`);return Object.assign(n,t)}var QC=ZC,$C={uniqueKeys:!1};function ew(e){let t;try{t=XC(e,$C)}catch(e){throw e instanceof sv?QC(e.message,{loc:e.position,cause:e}):e}return delete t.comments,t}var tw={astFormat:`yaml`,parse:ew,hasPragma:l_,hasIgnorePragma:u_,locStart:n_,locEnd:r_},nw={yaml:nv},rw=oC.parse,iw=/* @__PURE__ */ c({default:()=>sw,languages:()=>zR,options:()=>LR,printers:()=>RR}),aw=Object.defineProperty,ow=(e,t)=>{for(var n in t)aw(e,n,{get:t[n],enumerable:!0})},sw={};ow(sw,{languages:()=>zR,options:()=>LR,printers:()=>RR});var cw=[{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}],lw={};ow(lw,{estree:()=>TR});function uw(e){return Array.isArray(e)&&e.length>0}var dw=uw,fw=()=>{};function H(e){let t=new Set(e);return e=>t.has(e?.type)}var pw=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);function mw(e){return this[e<0?this.length+e:e]}var hw=pw(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return mw});function gw(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function _w(e){let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),t}var vw=/* @__PURE__ */ new WeakMap;function yw(e){return gw(vw,e,_w)}function bw(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 xw(e){return e.rest?!0:hw(0,yw(e),-1)?.type===`RestElement`}var Sw=e=>e?.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`;function Cw({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 ww(e){return e.method&&e.kind===`init`||e.kind===`get`||e.kind===`set`}var Tw=e=>Number.isSafeInteger(e)&&e>=0;function Ew(e){return e.range?.[1]??e.end}function U(e){let t=e.range?.[0]??e.start,n=(e.declaration?.decorators??e.decorators)?.[0];return n?Math.min(U(n),t):t}var Dw=5,Ow=8,kw=8,Aw=e=>t=>t.label?W(t.label):U(t)+e,jw=e=>e.__contentEnd??Ew(e),Mw=[`ExpressionStatement`,`Directive`,`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`ReturnStatement`,`ThrowStatement`,`DoWhileStatement`],Nw=new Map([[`BreakStatement`,Aw(Dw)],[`ContinueStatement`,Aw(Ow)],[`DebuggerStatement`,e=>U(e)+kw],[`VariableDeclaration`,e=>W(hw(0,e.declarations,-1))],...Mw.map(e=>[e,jw])]),Pw=H(Mw),Fw=e=>{if(Pw(e)&&e.__contentEnd)return!0;let{type:t}=e;return t===`BreakStatement`||t===`ContinueStatement`||t===`DebuggerStatement`||t===`VariableDeclaration`?!0:t===`IfStatement`?Fw(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?Fw(e.body):!1};function W(e){let{type:t}=e;return t===`IfStatement`?W(e.alternate??e.consequent):t===`ForInStatement`||t===`ForOfStatement`||t===`ForStatement`||t===`LabeledStatement`||t===`WithStatement`||t===`WhileStatement`?W(e.body):Nw.get(t)?.(e)??Ew(e)}function Iw(e,t){let n=U(e);return Tw(n)&&n===U(t)}function Lw(e,t){let n=W(e);return Tw(n)&&n===W(t)}function Rw(e,t){return Iw(e,t)&&Lw(e,t)}function zw(e){return e.extra?.raw??e.raw}function Bw(e){return e.type===`BigIntLiteral`||e.type===`Literal`&&!!e.bigint}function Vw(e){return e.type===`BooleanLiteral`||e.type===`Literal`&&typeof e.value==`boolean`}function Hw(e){return e.type===`NumericLiteral`||e.type===`Literal`&&typeof e.value==`number`}function Uw(e){return e.type===`RegExpLiteral`||e.type===`Literal`&&!!e.regex}function Ww(e){return e?.type===`StringLiteral`||e?.type===`Literal`&&typeof e.value==`string`}var Gw=H([`TSAsExpression`,`TSSatisfiesExpression`,`AsExpression`,`AsConstExpression`,`SatisfiesExpression`]),Kw=H([`SatisfiesExpression`,`TSSatisfiesExpression`]),qw=H([`TSUnionType`,`UnionTypeAnnotation`]),Jw=H([`TSIntersectionType`,`IntersectionTypeAnnotation`]),Yw=H([`TupleTypeAnnotation`,`TSTupleType`]),Xw=H([`TSConditionalType`,`ConditionalTypeAnnotation`]),Zw=H([`TSTypeAliasDeclaration`,`TypeAlias`]),Qw=H([`ReturnStatement`,`ThrowStatement`]),$w=H([`ExportDefaultDeclaration`,`DeclareExportDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportAllDeclaration`]),eT=H([`ArrayExpression`]),tT=H([`ObjectExpression`]),nT=H([`Literal`,`BooleanLiteral`,`BigIntLiteral`,`DirectiveLiteral`,`NullLiteral`,`NumericLiteral`,`RegExpLiteral`,`StringLiteral`]),rT=H([`ObjectTypeAnnotation`,`TSTypeLiteral`,`TSMappedType`]),iT=H([`FunctionExpression`,`ArrowFunctionExpression`]),aT=H([`JSXElement`,`JSXFragment`]),oT=H([`BinaryExpression`,`LogicalExpression`,`NGPipeExpression`]),sT=H([`CallExpression`,`OptionalCallExpression`]),cT=H([`MemberExpression`,`OptionalMemberExpression`]),lT=H([`CallExpression`,`OptionalCallExpression`,`NewExpression`]),uT=H([`CallExpression`,`OptionalCallExpression`,`NewExpression`,`ImportExpression`]),dT=H([`ChainExpression`,`TSNonNullExpression`]),fT=H([`TSArrayType`,`ArrayTypeAnnotation`]),pT=H([`TSTypeParameterInstantiation`,`TypeParameterInstantiation`]);function mT(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||!Rw(t,n)?!1:Ww(t)?t.value===n.value&&zw(t)===zw(n):t.type===`Identifier`&&t.name===n.name}var hT=H([`File`,`TemplateElement`,`TSEmptyBodyFunctionExpression`,`ChainExpression`]),gT=(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&&!ww(t)&&t.value!==t.key||t?.type===`ImportSpecifier`&&mT(t)&&t.local===e&&t.local!==t.imported||t?.type===`ExportSpecifier`&&mT(t)&&t.exported===e&&t.local!==t.exported,_T=(e,[t])=>!(e.type!==`FunctionExpression`||t.type!==`MethodDefinition`||t.value!==e||yw(e).length!==0||e.returnType||dw(e.typeParameters)||!e.body),vT=(e,[t])=>t?.typeAnnotation===e&&Sw(t),yT=(e,[t,...n])=>vT(e,[t])||t?.typeName===e&&vT(t,n);function bT(e,t){return hT(e)||gT(e,t)||_T(e,t)?!1:e.type===`EmptyStatement`?Cw({node:e,parent:t[0]}):!(yT(e,t)||e.type===`TSTypeAnnotation`&&t[0].type===`TSPropertySignature`)}var xT=bT;function ST(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 CT(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=ST(e)}function wT(e,t){t.leading=!0,t.trailing=!1,CT(e,t)}function TT(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),CT(e,t)}function ET(e,t){t.leading=!1,t.trailing=!0,CT(e,t)}function DT(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 OT=DT(` `),kT=DT(`,; `),AT=DT(/[^\n\r]/);function jT(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 MT=jT,NT=e=>e===`
770
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function PT(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===`
771
+ `)return t-2;if(NT(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
772
+ `)return t+2;if(NT(i))return t+1}return t}var FT=PT;function IT(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?AT(e,t):t}var LT=IT;function RT(e,t){let n=null,r=t;for(;r!==n;)n=r,r=OT(e,r),r=MT(e,r),r=LT(e,r),r=FT(e,r);return r}var zT=RT;function BT(e,t){let n=zT(e,t);return n===!1?``:e.charAt(n)}var VT=BT;function HT(e,t,n={}){let r=OT(e,n.backwards?t-1:t,n);return r!==FT(e,r,n)}var UT=HT;function WT(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
773
+ `)return!0;return!1}var GT=WT,KT=/* @__PURE__ */ new WeakMap;function qT(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 JT(e){return gw(KT,e,qT)}function YT(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 XT(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 ZT=Symbol.for(`comments`),QT=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},$T=pw(`replaceAll`,function(){if(typeof this==`string`)return QT});function eE(e){return $T(0,e,/[^\n]/g,` `)}var tE=eE;function nE(e,t){for(let n of t){let t=U(n),r=W(n);e=e.slice(0,t)+tE(e.slice(t,r))+e.slice(r)}return e}var rE=/* @__PURE__ */ new WeakMap;function iE(e){let t=e[ZT];return gw(rE,t,t=>nE(e.originalText,t))}function aE(e,t){let n=W(e)-1;if(t.originalText[n]===`)`)return n}function oE(e,t){if(aE(e,t)===void 0)return;let n=iE(t),r=W(e.typeArguments??e.callee),i=n.indexOf(`(`,r);if(i!==-1)return i}function sE(e,t,n){let r=aE(e,n);if(r===void 0||W(t)>r)return!1;let i=oE(e,n);return i!==void 0&&U(t)>i}var cE=H([`Block`,`CommentBlock`,`MultiLine`]),lE=H([`Line`,`CommentLine`,`SingleLine`,`HashbangComment`,`HTMLOpen`,`HTMLClose`,`Hashbang`,`InterpreterDirective`]);function uE(e){return e?.type===`ObjectProperty`||e?.type===`Property`&&!ww(e)}function dE(e){return e.value.trim()===`prettier-ignore`&&!e.unignore}var fE=/* @__PURE__ */ new WeakMap;function pE(e){return gw(fE,e,e=>cE(e)&&e.value[0]===`*`&&/@(?:type|satisfies)\b/.test(e.value))}function mE({comment:e,enclosingNode:t,followingNode:n,options:r}){if((t?.type===`ForInStatement`||t?.type===`ForOfStatement`||t?.type===`ForStatement`)&&n&&n===t.body){let t=iE(r).lastIndexOf(`)`,U(n));if(U(e)>t)return wT(n,e),!0}return!1}var hE=(e,t)=>cE(e)&&!GT(t,U(e),W(e)),gE=(e,t)=>lE(e)||hE(e,t);function _E(e,t){e.type===`BlockStatement`?vE(e,t):wT(e,t)}function vE(e,t){let n=(e.body||e.properties).find(({type:e})=>e!==`EmptyStatement`);n?wT(n,t):TT(e,t)}function yE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){return n?.type!==`IfStatement`||!r?!1:VT(i,W(e))===`)`?(ET(t,e),!0):r===n.consequent?(wT(r,e),!0):t===n.consequent&&r===n.alternate&&bE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a})}function bE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){let o=iE(a).indexOf(`else`,W(n.consequent));return U(e)>=o?(wT(r,e),!0):t.type!==`BlockStatement`&&gE(e,i)&&!GT(i,W(t),U(e))?(ET(t,e),!0):(TT(n,e),!0)}function xE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return n?.type===`SwitchStatement`&&n.cases.length===0&&!r&&t===n.discriminant&&VT(i,W(e))===`}`&&(TT(n,e),!0)}function SE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return(n?.type===`WhileStatement`||n?.type===`WithStatement`)&&r?VT(i,W(e))===`)`?(ET(t,e),!0):n.body===r&&(wT(r,e),!0):!1}function CE(e,{comment:t,text:n,options:r}){if(qw(e)&&hE(t,n)&&!dE(t)){let n=iE(r).slice(W(t),U(e));return/^[ \t]*$/.test(n)}return!1}function wE(e,t){return wT(CE(e,t)?e.types[0]:e,t.comment),!0}function TE(e){return[HE,nD,ME,UE,AE,yE,SE,xE,kE,PE,mE,KE,qE,YE,XE,ZE,IE,WE,jE,sD,iD,uD,mD].some(t=>t(e))}function EE(e){return[HE,OE,UE,ME,XE,yE,SE,xE,kE,PE,mE,WE,GE,JE,YE,eD,aD,oD,cD,iD,fD,pD,lD,uD].some(t=>t(e))}function DE(e){return[HE,nD,yE,SE,xE,mE,IE,YE,eD,iD,zE,RE,tD,pD,uD,mD].some(t=>t(e))}function OE({comment:e,followingNode:t}){return t&&pE(e)?(wT(t,e),!0):!1}function kE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n?.type!==`TryStatement`&&n?.type!==`CatchClause`||!r?!1:n.type===`CatchClause`&&t?(ET(t,e),!0):r.type===`BlockStatement`?(vE(r,e),!0):r.type===`TryStatement`?(_E(r.finalizer,e),!0):r.type===`CatchClause`&&(_E(r.body,e),!0)}function AE({comment:e,enclosingNode:t,followingNode:n}){return cT(t)&&n?.type===`Identifier`?(wT(t,e),!0):!1}function jE({comment:e,enclosingNode:t,followingNode:n,options:r}){return!r.experimentalTernaries||!(t?.type===`ConditionalExpression`||Xw(t))?!1:n?.type===`ConditionalExpression`||Xw(n)?(TT(t,e),!0):!1}function ME({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i,options:a}){let o=t&&!GT(i,W(t),U(e));return(!t||!o)&&(n?.type===`ConditionalExpression`||Xw(n))&&r?a.experimentalTernaries&&n.alternate===r&&(!cE(e)||GT(a.originalText,U(e),W(e)))?(TT(n,e),!0):(wT(r,e),!0):!1}var NE=H([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function PE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){if(NE(n)){let{decorators:i}=n;if(dw(i)&&r?.type!==`Decorator`)return ET(hw(0,i,-1),e),!0;if(n.body&&r===n.body)return vE(n.body,e),!0;if(r){let{superClass:i}=n;if(i&&r===i&&t&&(t===n.id||t===n.typeParameters))return ET(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)?ET(t,e):TT(n,e,a),!0}}return!1}var FE=H([`ClassMethod`,`ClassProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`,`MethodDefinition`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`TSParameterProperty`]);function IE({placement:e,comment:t,precedingNode:n,enclosingNode:r,followingNode:i,text:a}){return r&&n&&VT(a,W(t))===`(`&&(r.type===`Property`||r.type===`TSDeclareMethod`||r.type===`TSAbstractMethodDefinition`)&&n.type===`Identifier`&&r.key===n&&VT(a,W(n))!==`:`?(ET(n,t),!0):FE(r)&&!i&&e===`remaining`?(ET(VT(a,W(t))===`(`?n:r,t),!0):n?.type===`Decorator`&&FE(r)&&(lE(t)||e===`ownLine`)?(ET(n,t),!0):!1}var LE=H([`FunctionDeclaration`,`FunctionExpression`,`ClassMethod`,`MethodDefinition`,`ObjectMethod`]);function RE({comment:e,precedingNode:t,enclosingNode:n,text:r}){return VT(r,W(e))===`(`&&t&&LE(n)?(ET(t,e),!0):!1}function zE({comment:e,enclosingNode:t,text:n}){if(t?.type!==`ArrowFunctionExpression`)return!1;let r=zT(n,W(e));return r!==!1&&n.slice(r,r+2)===`=>`&&(TT(t,e,`commentBeforeArrow`),!0)}function BE(e,t,n){if(U(t)>=W(e)||W(t)<=U(e))return!1;let r=iE(n);return r.slice(0,U(t)).trimEnd().endsWith(`(`)&&r.slice(W(t)).trimStart().startsWith(`)`)}var VE=H([`ComponentDeclaration`,`DeclareComponent`,`ComponentTypeAnnotation`]);function HE({comment:e,enclosingNode:t,options:n}){if(!t)return!1;if(uT(t)&&JT(t).length===0&&BE(t,e,n))return TT(t,e),!0;let r=hD(t)||VE(t)||t.type===`HookTypeAnnotation`?t:t.type===`MethodDefinition`||t.type===`TSAbstractMethodDefinition`||t.type===`Property`&&ww(t)?t.value:void 0;return r&&yw(r).length===0&&BE(r,e,n)?(TT(r,e),!0):!1}function UE({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`)&&(hD(n)||(n?.type===`TSAbstractMethodDefinition`||n?.type===`MethodDefinition`)&&n.value.type===`TSEmptyBodyFunctionExpression`)&&VT(i,W(e))===`)`||(t?.type===`ComponentParameter`||t?.type===`RestElement`)&&(n?.type===`ComponentDeclaration`||n?.type===`DeclareComponent`)&&VT(i,W(e))===`)`?(ET(t,e),!0):!cE(e)&&r?.type===`BlockStatement`&&LE(n)&&(n.type===`MethodDefinition`?n.value.body:n.body)===r&&zT(i,W(e))===U(r)?(vE(r,e),!0):!1}function WE({comment:e,enclosingNode:t}){return t?.type===`LabeledStatement`&&(wT(t,e),!0)}function GE({comment:e,precedingNode:t,enclosingNode:n,options:r}){return lT(n)&&n.callee===t&&n.arguments.length>0&&sE(n,e,r)?(wT(n.arguments[0],e),!0):!1}function KE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return qw(n)?(dE(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(ET(t,e),!0):!1):(qw(r)&&dE(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function qE({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return n&&n.type===`MatchOrPattern`?(dE(e)&&(r.prettierIgnore=!0,e.unignore=!0),t?(ET(t,e),!0):!1):(r&&r.type===`MatchOrPattern`&&dE(e)&&(r.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function JE({comment:e,enclosingNode:t}){return uE(t)?(wT(t,e),!0):!1}function YE({comment:e,enclosingNode:t,ast:n,isLastComment:r}){return n?.body?.length===0?(r?TT(n,e):wT(n,e),!0):t?.type===`Program`&&t.body.length===0&&!dw(t.directives)&&(r?TT(t,e):wT(t,e),!0)}function XE({comment:e,precedingNode:t,enclosingNode:n,text:r}){if(n?.type===`ImportSpecifier`||n?.type===`ExportSpecifier`)return wT(n,e),!0;let i=t?.type===`ImportSpecifier`&&n?.type===`ImportDeclaration`,a=t?.type===`ExportSpecifier`&&n?.type===`ExportNamedDeclaration`;return(i||a)&&UT(r,W(e))?(ET(t,e),!0):!1}function ZE({comment:e,enclosingNode:t}){return t?.type===`AssignmentPattern`&&(wT(t,e),!0)}var QE=H([`VariableDeclarator`,`AssignmentExpression`,`TypeAlias`,`TSTypeAliasDeclaration`]),$E=H([`ObjectExpression`,`ArrayExpression`,`TemplateLiteral`,`TaggedTemplateExpression`,`ObjectTypeAnnotation`,`TSTypeLiteral`]);function eD(e){let{comment:t,enclosingNode:n,followingNode:r,options:i,placement:a}=e;if(QE(n)&&r&&a===`endOfLine`&&($E(r)||cE(t)))return wE(r,e);if(Zw(n)&&r){let a=n.id,o=iE(i).indexOf(`=`,W(a));if(U(t)>=o)return wE(r,e)}return!1}function tD({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)&&VT(i,W(e))===`;`&&(ET(t,e),!0)}function nD({comment:e,enclosingNode:t,followingNode:n}){if(dE(e)&&t?.type===`TSMappedType`&&n===t.key)return t.prettierIgnore=!0,e.unignore=!0,!0}function rD(e,t,n){let r=iE(n).indexOf(`[`,U(e));return W(t)<r}function iD({comment:e,enclosingNode:t,options:n}){if(t?.type===`TSMappedType`&&rD(t,e,n))return TT(t,e),!0}function aD({comment:e,enclosingNode:t,followingNode:n}){return!t||t.type!==`SwitchCase`||t.test||!n||n!==t.consequent[0]?!1:(n.type===`BlockStatement`&&lE(e)?vE(n,e):TT(t,e),!0)}function oD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r}){return qw(t)&&(fT(n)&&!r||Jw(n)||qw(n))?(ET(hw(0,t.types,-1),e),!0):!1}function sD({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if((t?.type===`ObjectPattern`||t?.type===`ArrayPattern`)&&r?.type===`TSTypeAnnotation`)return n?ET(n,e):TT(t,e),!0}function cD({comment:e,precedingNode:t,enclosingNode:n,followingNode:r,text:i}){return!r&&n?.type===`UnaryExpression`&&(t?.type===`LogicalExpression`||t?.type===`BinaryExpression`)&&GT(i,U(n.argument),U(t.right))&&gE(e,i)&&!GT(i,U(t.right),U(e))?(ET(t.right,e),!0):!1}function lD({enclosingNode:e,followingNode:t,comment:n}){if(e&&(e.type===`TSPropertySignature`||e.type===`ObjectTypeProperty`)&&(qw(t)||Jw(t)))return wT(t,n),!0}function uD({enclosingNode:e,precedingNode:t,followingNode:n,comment:r,text:i}){if(Gw(e)&&t===e.expression&&!gE(r,i))return n?wT(n,r):ET(e,r),!0}function dD(e,t,n){let r=iE(n).lastIndexOf(`=>`,U(t.body));return W(e)<r}function fD({comment:e,enclosingNode:t,followingNode:n,precedingNode:r,options:i}){return t?.type!==`ArrowFunctionExpression`||!n||!r||dD(e,t,i)?!1:(_E(n,e),!0)}function pD({comment:e,enclosingNode:t,precedingNode:n,followingNode:r}){if(!r&&t&&n){if(t.type===`ExpressionStatement`&&t.expression===n)return ET(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 ET(r?hw(0,n.expressions,-1):n.right,e),!0}return!1}function mD(e){let{followingNode:t,comment:n}=e;return CE(t,e)?(wT(t.types[0],n),!0):!1}var hD=H([`ArrowFunctionExpression`,`FunctionExpression`,`FunctionDeclaration`,`ObjectMethod`,`ClassMethod`,`TSDeclareFunction`,`TSCallSignatureDeclaration`,`TSConstructSignatureDeclaration`,`TSMethodSignature`,`TSConstructorType`,`TSFunctionType`,`TSDeclareMethod`,`HookDeclaration`]),gD={endOfLine:EE,ownLine:TE,remaining:DE};function _D(e,{parser:t}){if(t===`flow`||t===`hermes`||t===`babel-flow`)return e=$T(0,e,/[\s(]/g,``),e===``||e===`/*`||e===`/*::`}var vD=_D,G={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},yD=(e,t)=>{if(typeof e==`function`&&(t=e,e=0),e||t)return(n,r,i)=>!(e&G.Leading&&!n.leading||e&G.Trailing&&!n.trailing||e&G.Dangling&&(n.leading||n.trailing)||e&G.Block&&!cE(n)||e&G.Line&&!lE(n)||e&G.First&&r!==0||e&G.Last&&r!==i.length-1||e&G.PrettierIgnore&&!dE(n)||t&&!t(n))};function K(e,t,n){if(!dw(e?.comments))return!1;let r=yD(t,n);return!r||e.comments.some(r)}function bD(e,t,n){if(!Array.isArray(e?.comments))return[];let r=yD(t,n);return r?e.comments.filter(r):e.comments}function xD(e){return e?.prettierIgnore||K(e,G.PrettierIgnore)}function SD(e){let{node:t}=e;return(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`)&&(e.key===`callee`&&sT(e.parent)||e.key===`tag`&&e.parent.type===`TaggedTemplateExpression`)}var CD=new Map([[`|>`],[`??`],[`||`],[`&&`],[`|`],[`^`],[`&`],[`==`,`===`,`!=`,`!==`],[`<`,`>`,`<=`,`>=`,`in`,`instanceof`],[`>>`,`<<`,`>>>`],[`+`,`-`],[`*`,`/`,`%`],[`**`]].flatMap((e,t)=>e.map(e=>[e,t])));function wD(e){return CD.get(e)}var TD={"==":!0,"!=":!0,"===":!0,"!==":!0},ED={"*":!0,"/":!0,"%":!0},DD={">>":!0,">>>":!0,"<<":!0};function OD(e,t){return!(wD(t)!==wD(e)||e===`**`||TD[e]&&TD[t]||t===`%`&&ED[e]||e===`%`&&ED[t]||t!==e&&ED[t]&&ED[e]||DD[e]&&DD[t])}function kD(e){return!!DD[e]||e===`|`||e===`^`||e===`&`}function AD(e){return e.type===`LogicalExpression`&&e.operator===`??`}function jD(e,t){switch(e.type){case`BinaryExpression`:case`LogicalExpression`:case`AssignmentExpression`:case`NGPipeExpression`:return jD(e.left,t);case`MemberExpression`:case`OptionalMemberExpression`:return jD(e.object,t);case`TaggedTemplateExpression`:return e.tag.type!==`FunctionExpression`&&jD(e.tag,t);case`CallExpression`:case`OptionalCallExpression`:return e.callee.type!==`FunctionExpression`&&jD(e.callee,t);case`ConditionalExpression`:return jD(e.test,t);case`UpdateExpression`:return!e.prefix&&jD(e.argument,t);case`BindExpression`:return e.object&&jD(e.object,t);case`SequenceExpression`:return jD(e.expressions[0],t);case`ChainExpression`:case`TSNonNullExpression`:case`TSSatisfiesExpression`:case`TSAsExpression`:case`AsExpression`:case`AsConstExpression`:case`SatisfiesExpression`:return jD(e.expression,t);default:return t(e)}}function MD(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 ND=e=>e.extra?.parenthesized,PD=H([`OptionalCallExpression`,`OptionalMemberExpression`]);function FD(e){let{node:t}=e,n=t;for(;n.type===`TSNonNullExpression`;)if(n=n.expression,ND(n))return!1;return PD(n)?ND(t)?!0:e.key!==`expression`||e.parent.type!==`TSNonNullExpression`:!1}function ID(e){return(e.node.type===`ChainExpression`||FD(e))&&MD(e)}function LD(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&&jD(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&&jD(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=>!Gw(e));if(t!==r&&t.type===`ExpressionStatement`)return!0}}return!1}function RD(e){return typeof e==`object`&&!!e}var zD=RD;function*BD(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>zD(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*VD(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of BD(r,t))yield e,n.push(e)}}function HD(e,{getVisitorKeys:t,predicate:n}){for(let r of VD(e,{getVisitorKeys:t}))if(n(r))return!0;return!1}var UD=null;function WD(e){if(UD!==null&&typeof UD.property){let e=UD;return UD=WD.prototype=null,e}return UD=WD.prototype=e??Object.create(null),new WD}var GD=10;for(let e=0;e<=GD;e++)WD();function KD(e){return WD(e)}function qD(e,t=`type`){KD(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 JD=qD,q=[[`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`]],YD=JD({ArrayExpression:q[0],AssignmentExpression:q[1],BinaryExpression:q[1],InterpreterDirective:[],Directive:q[2],DirectiveLiteral:[],BlockStatement:q[3],BreakStatement:q[4],CallExpression:q[5],CatchClause:[`param`,`body`],ConditionalExpression:q[6],ContinueStatement:q[4],DebuggerStatement:[],DoWhileStatement:q[7],EmptyStatement:[],ExpressionStatement:q[8],File:[`program`],ForInStatement:q[9],ForStatement:[`init`,`test`,`update`,`body`],FunctionDeclaration:q[10],FunctionExpression:q[10],Identifier:[`typeAnnotation`,`decorators`],IfStatement:q[6],LabeledStatement:[`label`,`body`],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:q[1],MemberExpression:q[11],NewExpression:q[5],Program:q[3],ObjectExpression:q[12],ObjectMethod:q[13],ObjectProperty:q[14],RestElement:[`argument`,`typeAnnotation`,`decorators`],ReturnStatement:q[15],SequenceExpression:q[16],ParenthesizedExpression:q[8],SwitchCase:[`test`,`consequent`],SwitchStatement:[`discriminant`,`cases`],ThisExpression:[],ThrowStatement:q[15],TryStatement:[`block`,`handler`,`finalizer`],UnaryExpression:q[15],UpdateExpression:q[15],VariableDeclaration:[`declarations`],VariableDeclarator:q[17],WhileStatement:q[7],WithStatement:[`object`,`body`],AssignmentPattern:[`left`,`right`,`decorators`,`typeAnnotation`],ArrayPattern:[`elements`,`typeAnnotation`,`decorators`],ArrowFunctionExpression:[`typeParameters`,`params`,`predicate`,`returnType`,`body`],ClassBody:q[18],ClassExpression:q[19],ClassDeclaration:q[19],ExportAllDeclaration:[`source`,`attributes`,`exported`],ExportDefaultDeclaration:[`declaration`],ExportNamedDeclaration:q[20],ExportSpecifier:[`local`,`exported`],ForOfStatement:q[9],ImportDeclaration:[`specifiers`,`source`,`attributes`],ImportDefaultSpecifier:q[21],ImportNamespaceSpecifier:q[21],ImportSpecifier:[`imported`,`local`],MetaProperty:[`meta`,`property`],ClassMethod:q[13],ObjectPattern:[`decorators`,`properties`,`typeAnnotation`],SpreadElement:q[15],Super:[],TaggedTemplateExpression:[`tag`,`typeArguments`,`quasi`],TemplateElement:[],TemplateLiteral:[`quasis`,`expressions`],YieldExpression:q[15],AwaitExpression:q[15],ImportExpression:[`source`,`options`],BigIntLiteral:[],ExportNamespaceSpecifier:q[22],OptionalMemberExpression:q[11],OptionalCallExpression:q[5],ClassProperty:q[23],ClassPrivateProperty:q[23],ClassPrivateMethod:q[13],PrivateName:q[24],StaticBlock:q[18],ImportAttribute:q[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:q[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:q[27],DeclareClass:[`id`,`typeParameters`,`extends`,`mixins`,`implements`,`body`],DeclareFunction:[`id`,`predicate`],DeclareInterface:q[28],DeclareModule:q[29],DeclareModuleExports:q[30],DeclareTypeAlias:q[31],DeclareOpaqueType:[`id`,`typeParameters`,`supertype`,`lowerBound`,`upperBound`],DeclareVariable:[`id`,`declarations`],DeclareExportDeclaration:q[20],DeclareExportAllDeclaration:[`source`,`attributes`],DeclaredPredicate:q[2],ExistsTypeAnnotation:[],FunctionTypeAnnotation:[`typeParameters`,`this`,`params`,`rest`,`returnType`],FunctionTypeParam:q[32],GenericTypeAnnotation:q[27],InferredPredicate:[],InterfaceExtends:q[27],InterfaceDeclaration:q[28],InterfaceTypeAnnotation:[`extends`,`body`],IntersectionTypeAnnotation:q[33],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:q[30],NumberLiteralTypeAnnotation:[],BigIntLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:[`properties`,`indexers`,`callProperties`,`internalSlots`],ObjectTypeInternalSlot:[`id`,`value`],ObjectTypeCallProperty:q[2],ObjectTypeIndexer:[`variance`,`id`,`key`,`value`],ObjectTypeProperty:[`key`,`value`,`variance`],ObjectTypeSpreadProperty:q[15],OpaqueType:[`id`,`typeParameters`,`supertype`,`impltype`,`lowerBound`,`upperBound`],QualifiedTypeIdentifier:q[34],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:q[35],TypeofTypeAnnotation:[`argument`,`typeArguments`],TypeAlias:q[31],TypeAnnotation:q[30],TypeCastExpression:q[36],TypeParameter:[`bound`,`default`,`variance`],TypeParameterDeclaration:q[37],TypeParameterInstantiation:q[37],UnionTypeAnnotation:q[33],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:q[29],EnumBooleanBody:q[38],EnumNumberBody:q[38],EnumStringBody:q[38],EnumSymbolBody:q[38],EnumBooleanMember:q[17],EnumNumberMember:q[17],EnumStringMember:q[17],EnumDefaultedMember:q[24],IndexedAccessType:q[39],OptionalIndexedAccessType:q[39],JSXAttribute:[`name`,`value`],JSXClosingElement:[`name`],JSXElement:[`openingElement`,`children`,`closingElement`],JSXEmptyExpression:[],JSXExpressionContainer:q[8],JSXSpreadChild:q[8],JSXIdentifier:[],JSXMemberExpression:q[11],JSXNamespacedName:[`namespace`,`name`],JSXOpeningElement:[`name`,`typeArguments`,`attributes`],JSXSpreadAttribute:q[15],JSXText:[],JSXFragment:[`openingFragment`,`children`,`closingFragment`],JSXOpeningFragment:[],JSXClosingFragment:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:[`object`,`callee`],ClassAccessorProperty:q[40],Decorator:q[8],DoExpression:q[18],ExportDefaultSpecifier:q[22],ModuleExpression:q[18],TopicReference:[],VoidPattern:[],TSParameterProperty:[`parameter`,`decorators`],TSDeclareFunction:q[41],TSDeclareMethod:q[42],TSQualifiedName:q[1],TSCallSignatureDeclaration:q[43],TSConstructSignatureDeclaration:q[43],TSPropertySignature:[`key`,`typeAnnotation`],TSMethodSignature:q[42],TSIndexSignature:[`parameters`,`typeAnnotation`],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:q[43],TSConstructorType:q[43],TSTypeReference:[`typeName`,`typeArguments`],TSTypePredicate:q[44],TSTypeQuery:[`exprName`,`typeArguments`],TSTypeLiteral:q[38],TSArrayType:q[26],TSTupleType:q[35],TSOptionalType:q[30],TSRestType:q[30],TSNamedTupleMember:[`label`,`elementType`],TSUnionType:q[33],TSIntersectionType:q[33],TSConditionalType:q[45],TSInferType:q[46],TSParenthesizedType:q[30],TSTypeOperator:q[30],TSIndexedAccessType:q[39],TSMappedType:[`key`,`constraint`,`nameType`,`typeAnnotation`],TSTemplateLiteralType:[`quasis`,`types`],TSLiteralType:q[47],TSClassImplements:q[48],TSInterfaceHeritage:q[48],TSInterfaceDeclaration:q[28],TSInterfaceBody:q[18],TSTypeAliasDeclaration:[`id`,`typeParameters`,`typeAnnotation`],TSInstantiationExpression:q[48],TSAsExpression:q[36],TSSatisfiesExpression:q[36],TSTypeAssertion:q[36],TSEnumBody:q[38],TSEnumDeclaration:q[29],TSEnumMember:[`id`,`initializer`],TSModuleDeclaration:q[29],TSModuleBlock:q[18],TSImportType:[`source`,`options`,`qualifier`,`typeArguments`],TSImportEqualsDeclaration:[`id`,`moduleReference`],TSExternalModuleReference:q[8],TSNonNullExpression:q[8],TSExportAssignment:q[8],TSNamespaceExportDeclaration:q[24],TSTypeAnnotation:q[30],TSTypeParameterInstantiation:q[37],TSTypeParameterDeclaration:q[37],TSTypeParameter:[`name`,`constraint`,`default`],ChainExpression:q[8],Literal:[],MethodDefinition:q[14],PrivateIdentifier:[],Property:q[25],PropertyDefinition:q[23],AccessorProperty:q[40],TSAbstractAccessorProperty:q[49],TSAbstractKeyword:[],TSAbstractMethodDefinition:q[25],TSAbstractPropertyDefinition:q[49],TSAsyncKeyword:[],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:[`id`,`typeParameters`,`params`,`returnType`],TSExportKeyword:[],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:q[8],AsExpression:q[36],BigIntTypeAnnotation:[],ComponentDeclaration:[`id`,`params`,`body`,`typeParameters`,`rendersType`],ComponentParameter:[`name`,`local`],ComponentTypeAnnotation:[`params`,`rest`,`typeParameters`,`rendersType`],ComponentTypeParameter:q[32],ConditionalTypeAnnotation:q[45],DeclareComponent:[`id`,`params`,`rest`,`typeParameters`,`rendersType`],DeclareEnum:q[29],DeclareHook:q[24],DeclareNamespace:q[29],EnumBigIntBody:q[38],EnumBigIntMember:q[17],EnumBody:q[38],HookDeclaration:q[41],HookTypeAnnotation:[`params`,`returnType`,`rest`,`typeParameters`],InferTypeAnnotation:q[46],KeyofTypeAnnotation:q[15],MatchArrayPattern:[`elements`,`rest`],MatchAsPattern:[`pattern`,`target`],MatchBindingPattern:q[24],MatchExpression:q[50],MatchExpressionCase:q[51],MatchIdentifierPattern:q[24],MatchInstanceObjectPattern:q[52],MatchInstancePattern:[`targetConstructor`,`properties`],MatchLiteralPattern:q[47],MatchMemberPattern:[`base`,`property`],MatchObjectPattern:q[52],MatchObjectPatternProperty:[`key`,`pattern`],MatchOrPattern:[`patterns`],MatchRestPattern:q[15],MatchStatement:q[50],MatchStatementCase:q[51],MatchUnaryPattern:q[15],MatchWildcardPattern:[],NeverTypeAnnotation:[],ObjectTypeMappedTypeProperty:[`keyTparam`,`propType`,`sourceType`,`variance`],QualifiedTypeofIdentifier:q[34],RecordDeclaration:[`id`,`typeParameters`,`implements`,`body`],RecordDeclarationBody:q[0],RecordDeclarationImplements:[`id`,`typeArguments`],RecordDeclarationProperty:[`key`,`typeAnnotation`,`defaultValue`],RecordDeclarationStaticProperty:[`key`,`typeAnnotation`,`value`],RecordExpression:[`recordConstructor`,`typeArguments`,`properties`],RecordExpressionProperties:q[12],SatisfiesExpression:q[36],TupleTypeLabeledElement:[`label`,`elementType`,`variance`],TupleTypeSpreadElement:[`label`,`typeAnnotation`],TypeOperator:q[30],TypePredicate:q[44],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],NGChainedExpression:q[16],NGEmptyExpression:[],NGPipeExpression:[`left`,`right`,`arguments`],NGMicrosyntax:q[18],NGMicrosyntaxAs:[`key`,`alias`],NGMicrosyntaxExpression:[`expression`,`alias`],NGMicrosyntaxKey:[],NGMicrosyntaxKeyedExpression:[`key`,`expression`],NGMicrosyntaxLet:q[25],NGRoot:q[53],JsExpressionRoot:q[53],JsonRoot:q[53],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:q[30],TSJSDocNonNullableType:q[30]});function XD(e,t){return t(e)||HD(e,{getVisitorKeys:YD,predicate:t})}function ZD(e){return e.type===`AssignmentExpression`||e.type===`BinaryExpression`||e.type===`LogicalExpression`||e.type===`NGPipeExpression`||e.type===`ConditionalExpression`||sT(e)||cT(e)||e.type===`SequenceExpression`||e.type===`TaggedTemplateExpression`||e.type===`BindExpression`||e.type===`UpdateExpression`&&!e.prefix||Gw(e)||dT(e)}function QD(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function $D(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 eO(e,t){return aT(t)?xD(t):K(t,G.Leading,t=>UT(e,W(t)))}function tO(e,t){if(eO(t.originalText,e)||K(e,G.Leading,e=>GT(t.originalText,U(e),W(e)))&&!aT(e))return!0;if(ZD(e)){let n=e,r;for(;r=QD(n);)if(n=r,eO(t.originalText,n))return!0}return!1}var nO=/* @__PURE__ */ new WeakMap;function rO(e,t){return gw(nO,e,e=>tO(e,t))}function iO(e){for(;dT(e);)e=e.expression;return e}function aO(e,t,n){let{node:r,key:i,parent:a}=e;switch(a.type){case`ReturnStatement`:case`ThrowStatement`:if(oO(e,t))return!1;break;case`ParenthesizedExpression`:return!1;case`ClassDeclaration`:case`ClassExpression`:if(i===`superClass`){let e=iO(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`&&dw(e.decorators))return!0}break;case`ExportDefaultDeclaration`:if(sO(e,t,n))return!0;break;case`Decorator`:if(i===`expression`&&!cO(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`))&&uO(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 oO(e,t){let{key:n,parent:r}=e;if(!(n===`argument`&&Qw(r)))return!1;let{node:i}=e;return!(i.type!==`SequenceExpression`&&i.type!==`AssignmentExpression`||!rO(i,t))}function sO(e,t,n){let{node:r,parent:i}=e;return r.type===`FunctionExpression`||r.type===`ClassExpression`?i.type===`ExportDefaultDeclaration`||!n(e,t):!ZD(r)||i.type!==`ExportDefaultDeclaration`&&n(e,t)?!1:e.call(()=>sO(e,t,n),...$D(r))}function cO(e){return e.type===`ChainExpression`&&(e=e.expression),lO(e)||sT(e)&&!e.optional&&lO(e.callee)}function lO(e){return e.type===`Identifier`?!0:cT(e)?!e.computed&&!e.optional&&e.property.type===`Identifier`&&lO(e.object):!1}function uO(e){return XD(e,e=>e.type===`ObjectTypeAnnotation`&&XD(e,e=>e.type===`FunctionTypeAnnotation`))}function dO(e,t){if(e.isRoot)return!1;let{node:n,key:r,parent:i}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&mO(n)&&hO(e))return!0;if(fO(n))return!1;if(n.type===`Identifier`)return LD(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&&jD(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`&&jD(t,e=>e===n))return!0}let a=aO(e,t,dO);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`&&pO(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!Gw(n);case`ConditionalExpression`:return Gw(n)||AD(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(!K(n))return!0;break;case`MemberExpression`:case`OptionalMemberExpression`:return r===`object`;case`AssignmentExpression`:case`AssignmentPattern`:return r===`left`&&(n.type===`TSTypeAssertion`||Gw(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=wD(e),o=i.operator,s=wD(o);return!!(s>a||r===`right`&&s===a||s===a&&!OD(o,e)||s<a&&e===`%`&&(o===`+`||o===`-`)||kD(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`&&Xw(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`&&Xw(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(qw(i)||Jw(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&&yw(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`&&cT(i)&&Hw(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(ID(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`&&cT(i);case`NGPipeExpression`:return!(i.type===`NGRoot`||i.type===`NGMicrosyntaxExpression`||i.type===`ObjectProperty`&&!n.extra?.parenthesized||eT(i)||r===`arguments`&&sT(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===`<`||!eT(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`&&!lT(i)&&!uE(i)&&!Qw(i)&&i.type!==`TypeCastExpression`&&i.type!==`VariableDeclarator`&&i.type!==`YieldExpression`&&i.type!==`MatchExpressionCase`&&(r!==`declaration`||i.type!==`ExportDefaultDeclaration`);case`TSInstantiationExpression`:return r===`object`&&cT(i);case`MatchOrPattern`:return i.type===`MatchAsPattern`}return!1}var fO=H(/* @__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 pO(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 mO(e){return tT(e)}function hO(e){let{parent:t,key:n}=e;switch(t.type){case`NGPipeExpression`:if(n===`arguments`&&e.isLast)return e.callParent(hO);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(hO);break;case`ConditionalExpression`:if(n===`alternate`)return e.callParent(hO);break;case`UnaryExpression`:if(t.prefix&&e.callParent(hO))return!0}return!1}var gO=dO,_O=`string`,vO=`array`,yO=`cursor`,bO=`indent`,xO=`align`,SO=`trim`,CO=`group`,wO=`fill`,TO=`if-break`,EO=`indent-if-break`,DO=`line-suffix`,OO=`line-suffix-boundary`,kO=`line`,AO=`label`,jO=`break-parent`,MO=/* @__PURE__ */ new Set([yO,bO,xO,SO,CO,wO,TO,EO,DO,OO,kO,AO,jO]);function NO(e){if(typeof e==`string`)return _O;if(Array.isArray(e))return vO;if(!e)return;let{type:t}=e;if(MO.has(t))return t}var PO=NO,FO=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function IO(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
774
+ Expected it to be 'string' or 'object'.`;if(PO(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=FO([...MO].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
775
+ Expected it to be ${r}.`}var LO=class extends Error{name=`InvalidDocError`;constructor(e){super(IO(e)),this.doc=e}},RO={};function zO(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===RO){n(i.pop());continue}n&&i.push(e,RO);let a=PO(e);if(!a)throw new LO(e);if(t?.(e)!==!1)switch(a){case vO:case wO:{let t=a===vO?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case TO:i.push(e.flatContents,e.breakContents);break;case CO: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 xO:case bO:case EO:case AO:case DO:i.push(e.contents);break;case _O:case yO:case SO:case OO:case kO:case jO:break;default:throw new LO(e)}}}var BO=zO;function VO(e,t){if(typeof e==`string`)return t(e);let n=/* @__PURE__ */ new Map;return r(e);function r(e){return gw(n,e,i)}function i(e){switch(PO(e)){case vO:return t(e.map(r));case wO:return t({...e,parts:e.parts.map(r)});case TO:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case CO:{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 xO:case bO:case EO:case AO:case DO:return t({...e,contents:r(e.contents)});case _O:case yO:case SO:case OO:case kO:case jO:return t(e);default:throw new LO(e)}}}function HO(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 BO(e,a),r}function UO(e){if(e.type===CO&&e.break||e.type===kO&&e.hard||e.type===jO)return!0}function WO(e){return HO(e,UO,!1)}function GO(e){if(e.length>0){let t=hw(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function KO(e){let t=/* @__PURE__ */ new Set,n=[];function r(e){if(e.type===jO&&GO(n),e.type===CO){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===CO&&n.pop().break&&GO(n)}BO(e,r,i,!0)}function qO(e){return e.type===kO&&!e.hard?e.soft?``:` `:e.type===TO?e.flatContents:e}function JO(e){return VO(e,qO)}function YO(e){switch(PO(e)){case wO:{let{parts:t}=e;if(t.every(e=>e===``))return``;if(t.length===1)return t[0];break}case CO:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===CO&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case xO:case bO:case EO:case DO:if(!e.contents)return``;break;case TO:if(!e.flatContents&&!e.breakContents)return``;break;case vO:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof hw(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 _O:case yO:case SO:case OO:case kO:case AO:case jO:break;default:throw new LO(e)}return e}function XO(e){return VO(e,e=>YO(e))}function ZO(e,t=yk){return VO(e,e=>typeof e==`string`?gk(t,e.split(`
776
+ `)):e)}function QO(e){if(e.type===kO)return!0}function $O(e){return HO(e,QO,!1)}function ek(e,t){return e.type===AO?{...e,contents:t(e.contents)}:t(e)}function tk(e){let t=!0;return BO(e,e=>{switch(PO(e)){case _O:if(e===``)break;case SO:case OO:case kO:case jO:return t=!1,!1}}),t}var nk=fw,rk=fw,ik=fw,ak=fw;function J(e){return nk(e),{type:bO,contents:e}}function ok(e,t){return ak(e),nk(t),{type:xO,contents:t,n:e}}function sk(e){return ok(-1/0,e)}function ck(e){return ok({type:`root`},e)}function lk(e){return ok(-1,e)}function uk(e,t,n){nk(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=J(r);r=ok(t%n,r),r=ok(-1/0,r)}return r}var dk={type:jO},fk={type:yO};function pk(e){return ik(e),{type:wO,parts:e}}function Y(e,t={}){return nk(e),rk(t.expandedStates,!0),{type:CO,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function mk(e,t){return Y(e[0],{...t,expandedStates:e})}function X(e,t=``,n={}){return nk(e),t!==``&&nk(t),{type:TO,breakContents:e,flatContents:t,groupId:n.groupId}}function hk(e,t){return nk(e),{type:EO,contents:e,groupId:t.groupId,negate:t.negate}}function gk(e,t){nk(e),rk(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function _k(e,t){return nk(t),e?{type:AO,label:e,contents:t}:t}var Z={type:kO},Q={type:kO,soft:!0},vk={type:kO,hard:!0},$=[vk,dk],yk=[{type:kO,hard:!0,literal:!0},dk];function bk(e){return nk(e),{type:DO,contents:e}}var xk={type:OO},Sk=`cr`,Ck=`crlf`,wk=`\r`,Tk=`\r
777
+ `,Ek=`
778
+ `;function Dk(e){return e===Sk?wk:e===Ck?Tk:Ek}var Ok=()=>/[#*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,kk=12288,Ak=65510,jk=[12288,12288,65281,65376,65504,65510],Mk=4352,Nk=262141,Pk=[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],Fk=(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},Ik=19968,[Lk,Rk]=zk(Pk);function zk(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(Ik>=i&&Ik<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var Bk=e=>e<kk||e>Ak?!1:Fk(jk,e),Vk=e=>e>=Lk&&e<=Rk?!0:e<Mk||e>Nk?!1:Fk(Pk,e),Hk=/^(?:[\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])$/,Uk=e=>Hk.test(e),Wk=/[^\x20-\x7F]/;function Gk(e){if(!e)return 0;if(!Wk.test(e))return e.length;let t=0;e=e.replace(Ok(),e=>(t+=Uk(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+=Bk(e)||Vk(e)?2:1)}return t}var Kk=Gk,qk={type:0},Jk={type:1},Yk={value:``,length:0,queue:[],get root(){return Yk}};function Xk(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 Zk(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?Jk:{type:2,width:t}:{type:3,string:t},Xk(e,r,n)}function Qk(e,t){return Xk(e,qk,t)}function $k(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 eA(e){let t=$k(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var tA=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}=eA(this.#t);return this.#t=e,this.#a(),t}finish(){return this.#a(),{text:this.#e.join(``),positions:this.#r}}},nA=Symbol(`MODE_BREAK`),rA=Symbol(`MODE_FLAT`),iA=Symbol(`DOC_FILL_PRINTED_LENGTH`);function aA(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=PO(u);switch(d){case _O:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=Kk(u));break;case vO:case wO:{let t=d===vO?u:u.parts,n=u[iA]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case bO:case xO:case EO:case AO:c.push({mode:e,doc:u.contents});break;case SO:{let{text:e,count:t}=eA(l);l=e,n+=t;break}case CO:{if(a&&u.break)return!1;let t=u.break?nA:e,n=u.expandedStates&&t===nA?hw(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case TO:{let t=(u.groupId?i[u.groupId]||rA:e)===nA?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case kO:if(e===nA||u.hard)return!0;u.soft||(s=!0);break;case DO:r=!0;break;case OO:if(r)return!1}}return!1}function oA(e,t){let n=Object.create(null),r=t.printWidth,i=Dk(t.endOfLine),a=0,o=[{indent:Yk,mode:nA,doc:e}],s=!1,c=[],l=new tA;for(KO(e);o.length>0;){let{indent:e,mode:u,doc:d}=o.pop();switch(PO(d)){case _O:{let e=i===`
779
+ `?d:$T(0,d,`
780
+ `,i);e&&(l.write(e),o.length>0&&(a+=Kk(e)));break}case vO:for(let t=d.length-1;t>=0;t--)o.push({indent:e,mode:u,doc:d[t]});break;case yO:l.markPosition();break;case bO:o.push({indent:Qk(e,t),mode:u,doc:d.contents});break;case xO:o.push({indent:Zk(e,d.n,t),mode:u,doc:d.contents});break;case SO:a-=l.trim();break;case CO:{let t=(function(){if(u===rA&&!s)return{indent:e,mode:d.break?nA:rA,doc:d.contents};s=!1;let t=r-a,i=c.length>0,l={indent:e,mode:rA,doc:d.contents};if(!d.break&&aA(l,o,t,i,n))return l;if(!d.expandedStates)return{indent:e,mode:nA,doc:d.contents};if(!d.break)for(let r=1;r<d.expandedStates.length-1;r++){let a={indent:e,mode:rA,doc:d.expandedStates[r]};if(aA(a,o,t,i,n))return a}return{indent:e,mode:nA,doc:hw(0,d.expandedStates,-1)}})();o.push(t),d.id&&(n[d.id]=t.mode);break}case wO:{let t=r-a,i=d[iA]??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:rA,doc:f},h={indent:e,mode:nA,doc:f},g=aA(m,[],t,c.length>0,n,!0);if(l===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:rA,doc:p},v={indent:e,mode:nA,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,[iA]:i+2}},x=aA({indent:e,mode:rA,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 TO:case EO:{let t=d.groupId?n[d.groupId]:u;if(t===nA){let t=d.type===TO?d.breakContents:d.negate?d.contents:J(d.contents);t&&o.push({indent:e,mode:u,doc:t})}if(t===rA){let t=d.type===TO?d.flatContents:d.negate?J(d.contents):d.contents;t&&o.push({indent:e,mode:u,doc:t})}break}case DO:c.push({indent:e,mode:u,doc:d.contents});break;case OO:c.length>0&&o.push({indent:e,mode:u,doc:vk});break;case kO:switch(u){case rA:if(!d.hard){d.soft||(l.write(` `),a+=1);break}s=!0;case nA: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 AO:o.push({indent:e,mode:u,doc:d.contents});break;case jO:break;default:throw new LO(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 sA=class extends Error{name=`ArgExpansionBailout`};function cA(e){return(e.type===`ObjectTypeProperty`||e.type===`ObjectTypeInternalSlot`)&&!e.static&&!e.method&&e.kind!==`get`&&e.kind!==`set`&&e.value.type===`FunctionTypeAnnotation`}function lA(e,t){let n=null,r=t;for(;r!==n;)n=r,r=kT(e,r),r=MT(e,r),r=OT(e,r);return r=LT(e,r),r=FT(e,r),r!==!1&&UT(e,r)}var uA=lA,dA=(e,{originalText:t})=>{let n=W(e);if(uA(t,n))return!0;let r=Ew(e);return r!==n&&uA(t,r)},fA=H([`AnyTypeAnnotation`,`ThisTypeAnnotation`,`NumberTypeAnnotation`,`VoidTypeAnnotation`,`BooleanTypeAnnotation`,`BigIntTypeAnnotation`,`SymbolTypeAnnotation`,`StringTypeAnnotation`,`NeverTypeAnnotation`,`UndefinedTypeAnnotation`,`UnknownTypeAnnotation`,`EmptyTypeAnnotation`,`MixedTypeAnnotation`]),pA=H([`TSThisType`,`NullLiteralTypeAnnotation`,`BooleanLiteralTypeAnnotation`,`StringLiteralTypeAnnotation`,`BigIntLiteralTypeAnnotation`,`NumberLiteralTypeAnnotation`,`TSLiteralType`,`TSTemplateLiteralType`]);function mA({type:e}){return e.startsWith(`TS`)&&e.endsWith(`Keyword`)}var hA=mA;function gA(e){return hA(e)||fA(e)||pA(e)||e.type===`GenericTypeAnnotation`&&!e.typeParameters||e.type===`TSTypeReference`&&!e.typeArguments}function _A(e){return(e.type===`TypeAnnotation`||e.type===`TSTypeAnnotation`)&&e.typeAnnotation.type===`FunctionTypeAnnotation`&&!e.static&&!Iw(e,e.typeAnnotation)}function vA(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;else if(e.type===`MemberExpression`&&!e.optional&&!e.computed&&e.property.type===`Identifier`&&e.property.name===r)e=e.object;else return!1}}function yA(e,t){return t.some(t=>vA(e,t))}var bA=/* @__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 xA(e){return yA(e,bA)}function SA(e){return e.type===`Identifier`&&(e.name===`beforeEach`||e.name===`beforeAll`||e.name===`afterEach`||e.name===`afterAll`)}function CA(e){return sT(e)&&e.callee.type===`Identifier`&&[`async`,`inject`,`fakeAsync`,`waitForAsync`].includes(e.callee.name)}function wA(e){return e.type===`FunctionExpression`||e.type===`ArrowFunctionExpression`&&e.body.type===`BlockStatement`}function TA(e,t){if(e?.type!==`CallExpression`||e.optional)return!1;let n=JT(e);if(n.length===1){if(CA(e)&&TA(t))return iT(n[0]);if(SA(e.callee))return CA(n[0])}else if((n.length===2||n.length===3)&&(n[0].type===`TemplateLiteral`||Ww(n[0]))&&xA(e.callee))return n[2]&&!Hw(n[2])?!1:(n.length===2?iT(n[1]):wA(n[1])&&yw(n[1]).length<=1)||CA(n[1]);return!1}function EA(e,t){let n=t-1;n=OT(e,n,{backwards:!0}),n=FT(e,n,{backwards:!0}),n=OT(e,n,{backwards:!0});let r=FT(e,n,{backwards:!0});return n!==r}var DA=EA,OA=()=>!0;function kA(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function AA(e,t){let n=e.node,r=[kA(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=` `;UT(a,s(n))&&(e=UT(a,o(n),{backwards:!0})?$:Z),r.push(e)}else r.push($);let c=FT(a,OT(a,s(n)));return c!==!1&&UT(a,c)&&r.push($),r}function jA(e,t,n){let r=e.node,i=kA(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||UT(o,s(r),{backwards:!0})?{doc:bk([$,DA(o,s(r))?$:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[bk([` `,i]),dk],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function MA(e,t,n={}){let{indent:r=!1,marker:i,filter:a=OA}=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=gk($,e.map(({node:n})=>o.has(n)?kA(e,t):``,`comments`).filter(Boolean));return r?J([$,s]):s}function NA(e,t,n){let r=t[Symbol.for(`printedComments`)],i=n?.filter??OA,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)?AA(e,t):``,`comments`).filter(Boolean)}function PA(e,t,n){let r=e.node?.comments,i=new Set(r?.filter(e=>e.trailing)),a=t[Symbol.for(`printedComments`)],o=n?.filter??OA,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=jA(e,t,l),s.has(n)&&c.push(l.doc))},`comments`),c}function FA(e,t,n){return{leading:NA(e,t,n),trailing:PA(e,t,n)}}function IA(e,t,n,r){let i=NA(e,n,r),a=PA(e,n,r);return i||a?ek(t,e=>[i,e,a]):t}function LA(e,t=`es5`){return e.trailingComma===`es5`&&t===`es5`||e.trailingComma===`all`&&(t===`all`||t===`es5`)}function RA(e){let{node:t}=e;return!t.optional||t.type===`Identifier`&&t===e.parent.key?``:sT(t)||cT(t)&&t.computed||t.type===`OptionalIndexedAccessType`?`?.`:`?`}function zA(e){return e.node.definite||e.match(void 0,(e,t)=>t===`id`&&e.type===`VariableDeclarator`&&e.definite)?`!`:``}var BA=H([`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`DeclareVariable`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`,`DeclareOpaqueType`,`DeclareTypeAlias`,`DeclareEnum`,`DeclareInterface`]),VA=e=>{let{node:t}=e;return BA(t)?e.parent.type!==`DeclareExportDeclaration`&&!t.implicitDeclare:t.declare};function HA(e){return VA(e)?`declare `:``}var UA=H([`TSAbstractMethodDefinition`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]);function WA({node:e}){return e.abstract||UA(e)?`abstract `:``}function GA(e){return e.accessibility?e.accessibility+` `:``}var KA=e=>e.type===`UnaryExpression`&&e.operator===`!`;function qA(e){return K(e)||!KA(e)?!1:(e=e.argument,e=KA(e)?e.argument:e,e.type===`LogicalExpression`)}function JA(e,t,n){let{node:r}=e,i=r.type===`WithStatement`?`object`:`test`,a=n(i);return qA(r[i])?a:Y([J([Q,a]),Q])}function YA(e,t,n){let{node:r}=e;return K(r,G.Dangling,n)?[J([Q,MA(e,t,{filter:n})]),K(r,G.Dangling|G.Line,n)?$:Q]:``}function XA(e,t=`es5`){return LA(e,t)?X(`,`):``}function ZA(e){return e.semi?`;`:``}var QA=e=>e.mark!==`commentBeforeArrow`;function $A(e,t,n,r,i){let a=e.node,o=yw(a),s=i&&a.typeParameters?n(`typeParameters`):``;if(o.length===0)return[s,`(`,YA(e,t,QA),`)`];let{parent:c}=e,l=TA(c),u=ej(a),d=[];if(bw(e,(e,r)=>{let i=r===o.length-1;i&&a.rest&&d.push(`...`),d.push(n()),!i&&(d.push(`,`),l||u?d.push(` `):dA(o[r],t)?d.push($,$):d.push(Z))}),r&&!rj(e)){if(WO(s)||WO(d))throw new sA;return Y([JO(s),`(`,JO(d),`)`])}let f=o.every(e=>!dw(e.decorators));return u&&f||l?[s,`(`,...d,`)`]:(cA(c)||_A(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&&gA(o[0].typeAnnotation)&&!a.rest?t.arrowParens===`always`||a.type===`HookTypeAnnotation`?[`(`,...d,`)`]:d:[s,`(`,J([Q,...d]),!xw(a)&&e.root.type!==`NGRoot`?XA(t,`all`):``,Q,`)`]}function ej(e){if(!e)return!1;let t=yw(e);if(t.length!==1)return!1;let[n]=t;return!K(n)&&(n.type===`ObjectPattern`||n.type===`ArrayPattern`||n.type===`Identifier`&&n.typeAnnotation&&(n.typeAnnotation.type===`TypeAnnotation`||n.typeAnnotation.type===`TSTypeAnnotation`)&&rT(n.typeAnnotation.typeAnnotation)||n.type===`FunctionTypeParam`&&rT(n.typeAnnotation)&&n!==e.rest||n.type===`AssignmentPattern`&&(n.left.type===`ObjectPattern`||n.left.type===`ArrayPattern`)&&(n.right.type===`Identifier`||tT(n.right)&&n.right.properties.length===0||eT(n.right)&&n.right.elements.length===0))}function tj(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function nj(e,t){let n=tj(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 yw(e).length===1&&(rT(n)||WO(t))}function rj(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 ij(e){let t=yw(e);return t.length>1&&t.some(e=>e.type===`TSParameterProperty`)}function aj(e,t){return(t===`params`||t===`this`||t===`rest`)&&ej(e)}var oj=/^[\$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]*$/,sj=e=>oj.test(e);function cj(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 lj=cj,uj=Object.freeze({character:`'`,codePoint:39}),dj=Object.freeze({character:`"`,codePoint:34}),fj=Object.freeze({preferred:uj,alternate:dj}),pj=Object.freeze({preferred:dj,alternate:uj});function mj(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?fj:pj,{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 hj=/\\(["'\\])|(["'])/g;function gj(e,t){let n=t===`"`?`'`:`"`;return t+$T(0,e,hj,(e,r,i)=>r?r===n?n:e:i===t?`\\`+i:i)+t}var _j=gj;function vj(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?`'`:mj(n,t.singleQuote),e.charAt(0)===r?e:_j(n,r)}var yj=vj,bj=e=>e.type===`TSEnumMember`,xj=e=>bj(e)?`id`:`key`,Sj=e=>e[xj(e)],Cj=e=>!bj(e)&&e.computed;function wj(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}var Tj=({parser:e})=>e===`typescript`||e===`babel-ts`||e===`oxc-ts`||e===`yuku-ts`;function Ej(e,t){let n=Sj(e);if(n.type===`Identifier`)return!0;if(!Hw(n)||Tj(t))return!1;let r=lj(zw(n));return String(n.value)===r&&wj(r)}function Dj(e,t){let{parser:n}=t;if(n===`json`||n===`jsonc`)return!1;let r=Sj(e);if(!Ww(r))return!1;let{value:i}=r;return yj(zw(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`)&&sj(i)||(n===`babel`||n===`acorn`||n===`oxc`||n===`yuku`||n===`espree`||n===`meriyah`||n===`__babel_estree`)&&e.type!==`ImportAttribute`&&wj(i)&&String(Number(i))===i)}var Oj=/* @__PURE__ */ new WeakMap;function kj(e,t){return gw(Oj,e.parent,()=>e.siblings.some(e=>!Cj(e)&&Ww(Sj(e))&&!Dj(e,t)))}function Aj(e,t){return(t.parser===`json`||t.parser===`jsonc`||t.quoteProps===`consistent`&&kj(e,t))&&Ej(e.node,t)}function jj(e,t){return(t.quoteProps===`as-needed`||t.quoteProps===`consistent`&&!kj(e,t))&&Dj(e.node,t)}function Mj(e,t,n){let{node:r}=e,i=xj(r);if(Cj(r))return[`[`,n(i),`]`];if(Aj(e,t)){let n=Sj(r),a=yj(JSON.stringify(n.type===`Identifier`?n.name:String(n.value)),t);return e.call(()=>IA(e,a,t),i)}if(jj(e,t)){let{value:n}=Sj(r),a=/^\d/.test(n)?lj(n):n;return e.call(()=>IA(e,a,t),i)}return n(i)}var Nj=H([`VoidTypeAnnotation`,`TSVoidKeyword`,`NullLiteralTypeAnnotation`,`TSNullKeyword`]),Pj=H([`ObjectTypeAnnotation`,`TSTypeLiteral`,`GenericTypeAnnotation`,`TSTypeReference`]);function Fj(e){return e.key===`elementTypes`&&Yw(e.parent)&&e.parent.elementTypes.length>1}function Ij(e){let{types:t}=e;if(t.some(e=>K(e)))return!1;let n=t.find(e=>Pj(e));return n?t.every(e=>e===n||Nj(e)):!1}function Lj(e){let{key:t,node:n,parent:r}=e;return!(Ij(n)||t===`types`&&qw(r)||t===`types`&&Jw(r)||Fj(e))}function Rj(e,t,n,r){let{node:i}=e;if(Ij(i))return gk(` | `,e.map(n,`types`));let a=Y(e.map(({isFirst:r})=>{let i=r?X(`| `):[Z,`| `],a=n();return K(e.node,G.Leading)?[i,ok(2,IA(e,a,t))]:[i,IA(e,ok(2,a),t)]},`types`));return Lj(e)&&(a=IA(e,a,t)),gO(e,t)?Y([J([Q,a]),Q]):Fj(e)?Y([J([X([`(`,Q]),a]),Q,X(`)`)]):r?.assignmentLayout===`break-after-operator`||!zj(e)?a:Y(J([Q,a]))}function zj(e){let{key:t,parent:n}=e;return!(t===`typeAnnotation`&&n.type===`TSTypeAssertion`||t===`elementTypes`&&Yw(n)||(t===`trueType`||t===`falseType`)&&Xw(n)||t===`params`&&pT(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`&&cA(e)))}function Bj(e){return gA(e)||rT(e)?!0:qw(e)?Ij(e):!1}var Vj=/* @__PURE__ */ new WeakSet;function Hj(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(Uj,n);(t===`=>`||t===`:`&&K(r,G.Leading))&&(i=!0),Vj.add(r)}return i?[` `,t(n)]:t(n)}var Uj=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 Wj(e,t,n){let r=Uj(e);return r?[r,` `,n(`typeAnnotation`)]:n(`typeAnnotation`)}var Gj=({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`&&ww(n));function Kj(e,t,n,r){if(Gj(e))return Jj(e,t,n);let{node:i}=e,a=!1;if(i.type===`FunctionExpression`&&r?.expandLastArg){let{parent:t}=e;sT(t)&&(JT(t).length>1||yw(i).every(e=>e.type===`Identifier`&&!e.typeAnnotation))&&(a=!0)}let o=$A(e,t,n,a),s=Zj(e,n),c=nj(i,s),l=i.type===`HookDeclaration`?`hook`:`function`;return[HA(e),i.async?`async `:``,l,i.generator?`*`:``,` `,i.id?n(`id`):``,n(`typeParameters`),Y([c?Y(o):o,s]),i.body?` `:``,n(`body`),i.declare||!i.body?ZA(t):``]}function qj(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(Mj(e,t,n),r.optional?`?`:``,r===a?Jj(e,t,n):n(`value`)),o}function Jj(e,t,n){let{node:r}=e,i=$A(e,t,n),a=Zj(e,n),o=ij(r),s=nj(r,a),c=[n(`typeParameters`),Y([o?Y(i,{shouldBreak:!0}):s?Y(i):i,a])];return r.body?c.push(` `,n(`body`)):c.push(ZA(t)),c}function Yj(e){let t=yw(e);return t.length===1&&!e.typeParameters&&!K(e,G.Dangling)&&t[0].type===`Identifier`&&!t[0].typeAnnotation&&!K(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function Xj(e,t){if(t.arrowParens===`always`)return!1;if(t.arrowParens===`avoid`){let{node:t}=e;return Yj(t)}return!1}function Zj(e,t){let{node:n}=e,r=[Hj(e,t,`returnType`)];return n.predicate&&r.push(t(`predicate`)),r}function Qj(e,t){if(t.semi)return!1;let{node:n}=e;if(n.type!==`ExpressionStatement`||tM(e,t)||rM(e,t)||nM(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(()=>$j(e,t),`expression`))}function $j(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(!Xj(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(aT(n))return!0}return gO(e,t)?!0:ZD(n)?e.call(()=>$j(e,t),...$D(n)):!1}var eM=({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 tM(e,t){return(t.parentParser===`markdown`||t.parentParser===`mdx`)&&eM(e)&&aT(e.node.expression)}function nM(e,t){return t.__isHtmlInlineEventHandler&&eM(e)}function rM(e,t){return(t.parser===`__vue_event_binding`||t.parser===`__vue_ts_event_binding`)&&eM(e)}function iM(e,t){if(!Qj(e,t))return!1;let n=hw(0,bD(e.node,G.Leading),-1);return!!(n&&pE(n))}var aM=H([`ClassDeclaration`,`ClassExpression`,`DeclareClass`,`DeclareInterface`,`InterfaceDeclaration`,`TSInterfaceDeclaration`]);function oM(e,t){let{key:n,parent:r}=e;if(n===`types`&&qw(r)||n===`argument`&&r.type===`JSXSpreadAttribute`||n===`expression`&&r.type===`JSXSpreadChild`||n===`superClass`&&(r.type===`ClassDeclaration`||r.type===`ClassExpression`)||(n===`id`||n===`typeParameters`)&&aM(r)||n===`patterns`&&r.type===`MatchOrPattern`||SD(e))return!0;let{node:i}=e;return xD(i)?!1:i.type===`ExpressionStatement`?iM(e,t):qw(i)?Lj(e):!!aT(i)}var sM=oM;function cM(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 lM=cM;function uM(e,t){let n=e.lastIndexOf(`
781
+ `);return n===-1?0:lM(e.slice(n+1).match(/^[\t ]*/)[0],t)}var dM=uM;function fM(e,t,n){if(CM(e)){let r=mM(e,t,n);if(r)return r}let r=vM(e,t,n);return[xk,"`",...e.map(({isLast:e,index:t})=>[n(),e?``:r[t]],`quasis`),"`"]}function pM(e,t,n){let r=n(`quasi`),{node:i}=e,a=``,o=bD(i.quasi,G.Leading)[0];return o&&(a=GT(t.originalText,W(i.typeArguments??i.tag),U(o))?Q:` `),_k(r.label&&{tagged:!0,...r.label},[n(`tag`),n(`typeArguments`),a,xk,r])}function mM(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=vM(e,t,n);t.__inJestEach=!1;let o=a.map(e=>oA(e,{...t,printWidth:1/0,endOfLine:`lf`}).formatted),s=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<r.quasis.length;e++){let t=hw(0,s,-1),n=o[e-1];t.cells.push(n),n.includes(`
782
+ `)&&(t.hasLineBreak=!0),r.quasis[e].value.raw.includes(`
783
+ `)&&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],Kk(n));return[xk,"`",J([$,gk($,u.map(e=>gk(` | `,e.cells.map((t,n)=>e.hasLineBreak?t:t+` `.repeat(l[n]-Kk(t))))))]),$,"`"]}}var hM=/* @__PURE__ */ new WeakMap;function gM(e,t){let{parent:n,index:r}=e;return gw(hM,n,e=>{let{tabWidth:n}=t,r=0;return e.quasis.map(e=>{let t=e.value.raw,i=t.includes(`
784
+ `)?dM(t,n):r;return r=i,{indentSize:i,previousQuasiText:t}})})[r]}function _M(e,t,n,r=!0){let{node:i,index:a}=e,o=n(),{quasis:s}=e.parent,c=W(s[a]),l=U(s[a+1]),u=GT(t.originalText,c,l);if(!u){let e=oA(o,{...t,printWidth:1/0}).formatted;e.includes(`
785
+ `)?u=!0:o=e}if(u&&(K(i)||i.type===`Identifier`||cT(iO(i))||i.type===`ConditionalExpression`||i.type===`SequenceExpression`||Gw(i)||oT(i))&&(o=[J([Q,o]),Q]),!r)return Y(["${",o,xk,`}`]);let{indentSize:d,previousQuasiText:f}=gM(e,t);return t.__inJestEach&&(d=Math.max(d,t.tabWidth)),o=d===0&&f.endsWith(`
786
+ `)?ok(-1/0,o):uk(o,d,t.tabWidth),Y(["${",o,xk,`}`])}function vM(e,t,n){return e.map(()=>_M(e,t,n),e.node.type===`TSTemplateLiteralType`?`types`:`expressions`)}function yM(e,t,n){return e.map(()=>_M(e,t,n,!1),`expressions`)}function bM(e,t){return VO(e,e=>typeof e==`string`?t?$T(0,e,/(\\*)`/g,"$1$1\\`"):xM(e):e)}function xM(e){return $T(0,e,/([\\`]|\$\{)/g,`\\$1`)}var SM=/^[fx]?(?:describe|it|test)$/;function CM({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`&&SM.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`&&SM.test(t.tag.object.object.name))}var wM=[(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 TM(e){let t=e=>e.type===`TemplateLiteral`,n=(e,t)=>uE(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`styles`&&t===`value`;return e.match(t,(e,t)=>eT(e)&&t===`elements`,n,...wM)||e.match(t,n,...wM)}function EM(e){return e.match(e=>e.type===`TemplateLiteral`,(e,t)=>uE(e)&&!e.computed&&e.key.type===`Identifier`&&e.key.name===`template`&&t===`value`,...wM)}function DM(e,t){return K(e,G.Block|G.Leading,({value:e})=>e===` ${t} `)}function OM({node:e,parent:t},n){return DM(e,n)||kM(t)&&DM(t,n)||t.type===`ExpressionStatement`&&DM(t,n)}function kM(e){return e.type===`AsConstExpression`||e.type===`TSAsExpression`&&e.typeAnnotation.type===`TSTypeReference`&&e.typeAnnotation.typeName.type===`Identifier`&&e.typeAnnotation.typeName.name===`const`}async function AM(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=jM(await e(a,{parser:`scss`}),yM(n,r,t));if(!o)throw Error(`Couldn't insert all the expressions`);return["`",J([$,o]),Q,"`"]}function jM(e,t){if(!dw(t))return e;let n=0,r=VO(XO(e),e=>typeof e!=`string`||!e.includes(`@prettier-placeholder`)?e:e.split(/@prettier-placeholder-(\d+)-id/).map((e,r)=>r%2==0?ZO(e):(n++,t[e])));return t.length===n?r:null}function MM(e){return e.match(void 0,(e,t)=>t===`quasi`&&e.type===`TaggedTemplateExpression`&&yA(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 NM(e){return e.type===`Identifier`&&e.name===`styled`}function PM(e){return/^[A-Z]/.test(e.object.name)&&e.property.name===`extend`}function FM({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 NM(t.object)||PM(t);case`CallExpression`:return NM(t.callee)||t.callee.type===`MemberExpression`&&(t.callee.object.type===`MemberExpression`&&(NM(t.callee.object.object)||PM(t.callee.object))||t.callee.object.type===`CallExpression`&&NM(t.callee.object.callee));case`Identifier`:return t.name===`css`;default:return!1}}function IM({parent:e,grandparent:t}){return t?.type===`JSXAttribute`&&e.type===`JSXExpressionContainer`&&t.name.type===`JSXIdentifier`&&t.name.name===`css`}var LM=e=>MM(e)||FM(e)||IM(e)||TM(e);async function RM(e,t,n,r){let{node:i}=n,a=i.quasis.length,o=yM(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(`
787
+ `),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?zM(u):await e(l,{parser:`graphql`}),h?(h=bM(h,!1),!r&&f&&s.push(``),s.push(h),!c&&p&&s.push(``)):!r&&!c&&f&&s.push(``),c||s.push(o[t])}return["`",J([$,gk($,s)]),$,"`"]}function zM(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:gk($,t)}function BM({node:e,parent:t}){return OM({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 VM=0;async function HM(e,t,n,r,i){let{node:a}=r,o=VM;VM=VM+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=yM(r,i,n),u=new RegExp(s(`(\\d+)`),`g`),d=0,f=VO(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=xM(r),i.__embeddedInHtml&&(r=$T(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?Y(["`",J([h,Y(f)]),h,"`"]):_k({hug:!1},Y(["`",p,d>1?J(Y(f)):Y(f),m,"`"]))}function UM(e){return OM(e,`HTML`)||e.match(e=>e.type===`TemplateLiteral`,(e,t)=>e.type===`TaggedTemplateExpression`&&e.tag.type===`Identifier`&&e.tag.name===`html`&&t===`quasi`)}var WM=HM.bind(void 0,`html`),GM=HM.bind(void 0,`angular`);async function KM(e,t,n){let{node:r}=n,i=$T(0,r.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(e,t)=>`\\`.repeat(t.length/2)+"`"),a=qM(i),o=a!==``;o&&(i=$T(0,i,RegExp(`^${a}`,`gm`),``));let s=bM(await e(i,{parser:`markdown`,__inJsTemplate:!0}),!0);return["`",o?J([Q,s]):[yk,sk(s)],Q,"`"]}function qM(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?``:t[1]}function JM({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 YM=[{test:LM,print:AM},{test:BM,print:RM},{test:UM,print:WM},{test:EM,print:GM},{test:JM,print:KM}].map(({test:e,print:t})=>({test:e,print:ZM(t)}));function XM(e){let{node:t}=e;if(t.type!==`TemplateLiteral`||QM(t))return;let n=YM.find(({test:t})=>t(e));if(n)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===``?"``":n.print}function ZM(e){return async(...t)=>{let n=await e(...t);return n&&_k({embed:!0,...n.label},n)}}function QM({quasis:e}){return e.some(({value:{cooked:e}})=>e===null)}var $M=XM;function eN(e,t){e.type===`ChainExpression`?rN(t):(e.type===`OptionalMemberExpression`||e.type===`OptionalCallExpression`)&&iN(t)}function tN(e){if(cT(e))return`object`;if(sT(e))return`callee`;if(dT(e))return`expression`}function nN(e){let t=tN(e);if(t)return e[t]}function rN(e){for(e=nN(e);e.type===`MemberExpression`||e.type===`CallExpression`||e.type===`TSNonNullExpression`;e=nN(e)){let t=tN(e),n=e[t];n.type===`ChainExpression`&&(e[t]=n.expression)}}function iN(e){for(e=nN(e);e.type===`MemberExpression`||e.type===`CallExpression`;e=nN(e))e.type=`Optional${e.type}`}function aN(e,t,n){let r=t[n];(Ww(r)||Hw(r))&&(e[n]=String(r.value)),r.type===`Identifier`&&(e[n]=r.name)}function oN(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&&aN(t,e,`key`),e.type===`TSEnumMember`&&aN(t,e,`id`)}function sN(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 cN=/* @__PURE__ */ new Set([`range`,`raw`,`comments`,`extra`,`start`,`end`,`loc`,`errors`,`tokens`,`trailingComma`,`docblock`,`__contentEnd`]),lN=e=>{for(let t of e.quasis)delete t.value};function uN(e,t,n){if(e.type===`Program`&&delete t.sourceType,eN(e,t),oN(e,t),sN(e,t),(Bw(e)||e.type===`BigIntLiteralTypeAnnotation`)&&`bigint`in e&&(t.bigint=e.bigint.toLowerCase()),e.type===`EmptyStatement`&&!Cw({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`&&lN(n);e.type===`JSXAttribute`&&e.name.name===`css`&&e.value.type===`JSXExpressionContainer`&&e.value.expression.type===`TemplateLiteral`&&lN(t.value.expression),e.type===`JSXAttribute`&&Ww(e.value)&&/["']|&quot;|&apos;/.test(e.value.value)&&(t.value.value=$T(0,e.value.value,/["']|&quot;|&apos;/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`:eT(r.value)&&lN(r.value.elements[0]);break;case`template`:r.value.type===`TemplateLiteral`&&lN(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`)&&lN(t.quasi),(e.type===`CallExpression`||e.type===`MemberExpression`)&&!e.optional&&delete t.optional,e.type===`TemplateLiteral`&&lN(t)}uN.ignoredProperties=cN;var dN=/\*\/$/,fN=/^\/\*\*?/,pN=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,mN=/(^|\s+)\/\/([^\n\r]*)/g,hN=/^(\r?\n)+/,gN=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,_N=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,vN=/(\r?\n|^) *\* ?/g,yN=[];function bN(e){let t=e.match(pN);return t?t[0].trimStart():``}function xN(e){let t=e.match(pN)?.[0];return t==null?e:e.slice(t.length)}function SN(e){e=$T(0,e.replace(fN,``).replace(dN,``),vN,`$1`);let t=``;for(;t!==e;)t=e,e=$T(0,e,gN,`
788
+ $1 $2
789
+ `);e=e.replace(hN,``).trimEnd();let n=Object.create(null),r=$T(0,e,_N,``).replace(hN,``).trimEnd(),i;for(;i=_N.exec(e);){let e=$T(0,i[2],mN,``);if(typeof n[i[1]]==`string`||Array.isArray(n[i[1]])){let t=n[i[1]];n[i[1]]=[...yN,...Array.isArray(t)?t:[t],e]}else n[i[1]]=e}return{comments:r,pragmas:n}}function CN({comments:e=``,pragmas:t={}}){let n=Object.keys(t),r=n.flatMap(e=>wN(e,t[e])).map(e=>` * ${e}
790
+ `).join(``);if(!e){if(n.length===0)return``;if(n.length===1&&!Array.isArray(t[n[0]])){let e=t[n[0]];return`/** ${wN(n[0],e)[0]} */`}}let i=e.split(`
791
+ `).map(e=>` * ${e}`).join(`
792
+ `)+`
793
+ `;return`/**
794
+ `+(e?i:``)+(e&&n.length>0?` *
795
+ `:``)+r+` */`}function wN(e,t){return[...yN,...Array.isArray(t)?t:[t]].map(t=>`@${e} ${t}`.trim())}var TN=`format`;function EN(e){if(!e.startsWith(`#!`))return``;let t=e.indexOf(`
796
+ `);return t===-1?e:e.slice(0,t)}var DN=EN;function ON(e){let t=DN(e);t&&(e=e.slice(t.length+1));let{pragmas:n,comments:r}=SN(bN(e));return{shebang:t,text:e,pragmas:n,comments:r}}function kN(e){let{shebang:t,text:n,pragmas:r,comments:i}=ON(e),a=xN(n),o=CN({pragmas:{[TN]:``,...r},comments:i.trimStart()});return(t?`${t}
797
+ `:``)+o+(a.startsWith(`
798
+ `)?`
799
+ `:`
800
+
801
+ `)+a}function AN(e){if(!cE(e)||!e.value.includes(`
802
+ `))return[];let t=[];for(let n of`*${e.value}*`.split(`
803
+ `)){if(n=n.trimStart(),!n.startsWith(`*`))return[];t.push(n)}return t}var jN=/* @__PURE__ */ new WeakMap;function MN(e){return gw(jN,e,AN)}function NN(e){return MN(e).length>0}function PN(e,t){let n=e.node;if(lE(n))return t.originalText.slice(U(n),W(n)).trimEnd();if(NN(n))return FN(n);if(cE(n))return[`/*`,ZO(n.value),`*/`];throw Error(`Not a comment: `+JSON.stringify(n))}function FN(e){let t=MN(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,` `,ck(yk)]:[a,$]}),`/`]}function IN(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var LN=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(hw(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=`[${IN([...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(`
804
+ `)){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(`
805
+ `).map(e=>e.slice(t)).join(`
806
+ `)}}(`
807
+ \r `);function RN(e){return e.type===`JSXText`&&(LN.hasNonWhitespaceCharacter(zw(e))||!/\n/.test(zw(e)))}function zN(e){let{node:t,parent:n}=e;if(!aT(t)||!aT(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`||RN(t)){a=t;break}}return a?.type===`JSXExpressionContainer`&&a.expression.type===`JSXEmptyExpression`&&xD(a.expression)}function BN(e){return xD(e.node)||zN(e)}var VN=BN,HN=class extends Error{name=`UnexpectedNodeError`;constructor(e,t,n=`type`){super(`Unexpected ${t} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}};function UN(e){return e.type===`CallExpression`&&!e.optional&&e.arguments.length===1&&e.callee.type===`Identifier`&&e.callee.name===`Boolean`}var WN=0;function GN(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=KN(e,t,n,!1,s);if(s)return l;if(c)return Y(l);if(o===`callee`&&lT(i)||i.type===`UnaryExpression`&&!K(r)||cT(i)&&!i.computed)return Y([J([Q,...l]),Q]);let u=Qw(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`&&!Qw(a)&&!lT(a)||i.type===`TemplateLiteral`||o===`argument`&&i.type===`UnaryExpression`||o===`arguments`&&UN(i),d=i.type===`AssignmentExpression`||i.type===`VariableDeclarator`||i.type===`ClassProperty`||i.type===`PropertyDefinition`||i.type===`TSAbstractPropertyDefinition`||i.type===`ClassPrivateProperty`||uE(i),f=oT(r.left)&&OD(r.operator,r.left.operator);if(u||qN(r)&&!f||!qN(r)&&d)return Y(l);if(l.length===0)return``;let p=aT(r.right),m=l.findIndex(e=>typeof e!=`string`&&!Array.isArray(e)&&e.type===CO),h=l.slice(0,m===-1?1:m+1),g=l.slice(h.length,p?-1:void 0),_=Symbol(`logicalChain-`+ ++WN),v=Y([...h,J(g)],{id:_});return p?Y([v,hk(hw(0,l,-1),{groupId:_})]):v}function KN(e,t,n,r,i){let{node:a}=e;if(!oT(a))return[Y(n())];let o=[];OD(a.operator,a.left.operator)?o=e.call(()=>KN(e,t,n,!0,i),`left`):o.push(Y(n(`left`)));let s=qN(a),c=a.right.type===`ChainExpression`?a.right.expression:a.right,l=(a.type===`NGPipeExpression`||a.operator===`|>`||YN(e,t))&&!eO(t.originalText,c),u=!K(c,G.Leading,pE)&&eO(t.originalText,c),d=a.type===`NGPipeExpression`?`|`:a.operator,f=a.type===`NGPipeExpression`&&a.arguments.length>0?Y(J([Q,`: `,gk([Z,`: `],e.map(()=>ok(2,Y(n())),`arguments`))])):``,p;if(s)p=[d,eO(t.originalText,c)?J([Z,n(`right`),f]):[` `,n(`right`),f]];else{let r=d===`|>`&&e.root.extra?.__isUsingHackPipeline?e.call(()=>KN(e,t,n,!0,i),`right`):n(`right`);if(t.experimentalOperatorPosition===`start`){let e=``;if(u)switch(PO(r)){case vO:e=r[0],r.shift();break;case AO: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=K(a.left,G.Trailing|G.Line);if((h||!(i&&a.type===`LogicalExpression`)&&m.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type)&&(p=Y(p,{shouldBreak:h})),t.experimentalOperatorPosition===`start`?o.push(s||u?` `:``,p):o.push(l?``:` `,p),r&&K(a)){let n=XO(IA(e,o,t));return n.type===wO?n.parts:Array.isArray(n)?n:[n]}return o}function qN(e){return e.type===`LogicalExpression`&&!!(tT(e.right)&&e.right.properties.length>0||eT(e.right)&&e.right.elements.length>0||aT(e.right))}var JN=e=>e.type===`BinaryExpression`&&e.operator===`|`;function YN(e,t){return(t.parser===`__vue_expression`||t.parser===`__vue_ts_expression`)&&JN(e.node)&&!e.hasAncestor(e=>!JN(e)&&e.type!==`JsExpressionRoot`)}function XN(e,t,n){let{node:r}=e;if(r.type.startsWith(`NG`))switch(r.type){case`NGRoot`:return n(`node`);case`NGPipeExpression`:return GN(e,t,n);case`NGChainedExpression`:return Y(gk([`;`,Z],e.map(()=>eP(e)?n():[`(`,n(),`)`],`expressions`)));case`NGEmptyExpression`:return``;case`NGMicrosyntax`:return e.map(()=>[e.isFirst?``:ZN(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=ZN(e)||QN(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 HN(r,`Angular`)}}function ZN({node:e,index:t}){return e.type===`NGMicrosyntaxKeyedExpression`&&e.key.name===`of`&&t===1}function QN(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 $N=H([`CallExpression`,`OptionalCallExpression`,`AssignmentExpression`]);function eP({node:e}){return XD(e,$N)}function tP(e,t,n){let{node:r}=e;return Y([gk(Z,e.map(n,`decorators`)),iP(r,t)?$:Z])}function nP(e,t,n){return aP(e.node)?[gk($,e.map(n,`declaration`,`decorators`)),$]:``}function rP(e,t,n){let{node:r,parent:i}=e,{decorators:a}=r;if(!dw(a)||aP(i)||VN(e))return``;let o=r.type===`ClassExpression`||r.type===`ClassDeclaration`||iP(r,t);return[e.key===`declaration`&&$w(i)?$:o?dk:``,gk(Z,e.map(n,`decorators`)),Z]}function iP(e,t){return e.decorators.some(e=>UT(t.originalText,W(e)))}function aP(e){if(e.type!==`ExportDefaultDeclaration`&&e.type!==`ExportNamedDeclaration`&&e.type!==`DeclareExportDeclaration`)return!1;let t=e.declaration?.decorators;return dw(t)&&Iw(e,t[0])}function oP(e){return e.type===`UnaryExpression`&&(e.operator===`+`||e.operator===`-`)&&Hw(e.argument)}function sP(e,t,n){let{node:r}=e,i=[],a=Yw(r)?`elementTypes`:`elements`,o=r[a];if(o.length===0&&!r.inexact)i.push(Y([`[`,YA(e,t),`]`]));else{let s=hw(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(!eT(e)&&!tT(e))return!1;let r=e?.type,i=n[t+1];if(i&&r!==i.type)return!1;let a=eT(e)?`elements`:`properties`;return e[a]&&e[a].length>1})||K(r,G.Dangling|G.Line),f=cP(r,t),p=c?l?`,`:LA(t)?f?X(`,`,``,{groupId:u}):X(`,`):``:``;i.push(Y([`[`,J([Q,f?dP(e,t,n,p):[uP(e,t,n,a,r.inexact),p],MA(e,t)]),Q,`]`],{shouldBreak:d,id:u}))}return i.push(RA(e),Hj(e,n)),i}function cP(e,t){return eT(e)&&e.elements.length>0&&e.elements.every(e=>e&&(Hw(e)||oP(e)&&!K(e.argument))&&!K(e,G.Trailing|G.Line,e=>!UT(t.originalText,U(e),{backwards:!0})))}function lP({node:e},{originalText:t}){let n=W(e);if(n===U(e))return!1;let{length:r}=t;for(;n<r&&t[n]!==`,`;)n=MT(t,LT(t,n+1));return uA(t,n)}function uP(e,t,n,r,i){let a=[];return e.each(({node:r,isLast:o})=>{a.push(r?Y(n()):``),(!o||i)&&a.push([`,`,Z,r&&lP(e,t)?Q:``])},r),i&&a.push(`...`),a}function dP(e,t,n,r){let i=[];return e.each(({isLast:a,next:o})=>{i.push([n(),a?r:`,`]),a||i.push(lP(e,t)?[$,$]:K(o,G.Leading|G.Line)?$:Z)},`elements`),pk(i)}function fP(e){return e.quasis.some(e=>e.value.raw.includes(`
808
+ `))}function pP(e,t){return(e.type===`TemplateLiteral`&&fP(e)||e.type===`TaggedTemplateExpression`&&fP(e.quasi))&&!UT(t,U(e),{backwards:!0})}var mP=/* @__PURE__ */ new WeakMap;function hP(e){return gw(mP,e,e=>e.type===`ConditionalExpression`&&!jD(e,e=>e.type===`ObjectExpression`))}var gP=e=>e.type===`SequenceExpression`;function _P(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=vP(e,t,n,r);if(i.length===0)i.push(f);else{let{leading:n,trailing:r}=FA(e,t);i.push([n,f]),o.unshift(r)}c&&(s||=d.returnType&&yw(d).length>0||d.typeParameters||yw(d).some(e=>e.type!==`Identifier`)),!c||d.body.type!==`ArrowFunctionExpression`?(a=n(`body`,r),l=d.body):e.call(u,`body`)})();let u=!eO(t.originalText,l)&&(gP(l)||yP(l,a,t)||!s&&hP(l)),d=e.key===`callee`&&uT(e.parent),f=Symbol(`arrow-chain`),p=bP(e,r,{signatureDocs:i,shouldBreak:s}),m=!1,h=!1,g=!1;return c&&(d||r.assignmentLayout)&&(h=!0,g=!K(e.node,G.Leading&G.Line),m=r.assignmentLayout===`chain-tail-arrow-chain`||d&&!u),a=xP(e,t,r,{bodyDoc:a,bodyComments:o,functionBody:l,shouldPutBodyOnSameLine:u}),Y([Y(h?J([g?Q:``,p]):p,{shouldBreak:m,id:f}),` =>`,c?hk(a,{groupId:f}):Y(a),c&&d?X(Q,``,{groupId:f}):``])}function vP(e,t,n,r){let{node:i}=e,a=[];if(i.async&&a.push(`async `),Xj(e,t))a.push(n([`params`,0]));else{let i=r.expandLastArg||r.expandFirstArg,o=Zj(e,n);if(i){if(WO(o))throw new sA;o=Y(JO(o))}a.push(Y([$A(e,t,n,i,!0),o]))}let o=MA(e,t,{marker:`commentBeforeArrow`});return o&&a.push(` `,o),a}function yP(e,t,n){return eT(e)||tT(e)||e.type===`ArrowFunctionExpression`||e.type===`DoExpression`||e.type===`BlockStatement`||aT(e)||t.label?.hug!==!1&&(t.label?.embed||pP(e,n.originalText))}function bP(e,t,{signatureDocs:n,shouldBreak:r}){if(n.length===1)return n[0];let{parent:i,key:a}=e;return a!==`callee`&&uT(i)||oT(i)?Y([n[0],` =>`,J([Z,gk([` =>`,Z],n.slice(1))])],{shouldBreak:r}):a===`callee`&&uT(i)||t.assignmentLayout?Y(gk([` =>`,Z],n),{shouldBreak:r}):Y(J(gk([` =>`,Z],n)),{shouldBreak:r})}function xP(e,t,n,{bodyDoc:r,bodyComments:i,functionBody:a,shouldPutBodyOnSameLine:o}){let{node:s,parent:c}=e,l=n.expandLastArg?XA(t,`all`):``,u=(n.expandLastArg||c.type===`JSXExpressionContainer`)&&!K(s)?Q:``;return o&&hP(a)?[` `,Y([X(``,`(`),J([Q,r]),X(``,`)`),l,u]),i]:o?[` `,r,i]:[J([Z,r,i]),l,u]}var SP=.25;function CP(e,t){let{printWidth:n}=t;if(K(e))return!1;let r=n*SP;if(e.type===`ThisExpression`||e.type===`Identifier`&&e.name.length<=r||oP(e)&&!K(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:Ww(e)?yj(zw(e),t).length<=r:e.type===`TemplateLiteral`?e.expressions.length===0&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes(`
809
+ `):e.type===`UnaryExpression`?CP(e.argument,{printWidth:n}):e.type===`CallExpression`&&e.arguments.length===0&&e.callee.type===`Identifier`?e.callee.name.length<=r-2:nT(e)}function wP(e){return cT(e)||e.type===`BindExpression`&&!!e.object}function TP(e){if(e.length<=1)return!1;let t=0;for(let n of e)if(iT(n)){if(t+=1,t>1)return!0}else if(n=iO(n),sT(n)){for(let e of JT(n))if(iT(e))return!0}return!1}function EP(e){let{node:t,parent:n,key:r}=e;return r===`callee`&&sT(t)&&sT(n)&&n.arguments.length>0&&t.arguments.length>n.arguments.length}var DP=/* @__PURE__ */ new Set([`!`,`-`,`+`,`~`]),OP=H([`Identifier`,`ThisExpression`,`Super`,`PrivateName`,`PrivateIdentifier`]);function kP(e,t=2){if(t<=0)return!1;let n=e=>kP(e,t-1);if(e=iO(e),Uw(e))return Kk(e.pattern??e.regex.pattern)<=5;if(nT(e)||OP(e)||e.type===`ArgumentPlaceholder`)return!0;if(e.type===`TemplateLiteral`)return e.quasis.every(e=>!e.value.raw.includes(`
810
+ `))&&e.expressions.every(n);if(tT(e))return e.properties.every(e=>!e.computed&&(e.shorthand||e.value&&n(e.value)));if(eT(e))return e.elements.every(e=>e===null||n(e));if(uT(e)){if(e.type===`ImportExpression`||kP(e.callee,t)){let r=JT(e);return r.length<=t&&r.every(n)}return!1}return cT(e)?kP(e.object,t)&&kP(e.property,t):e.type===`UnaryExpression`&&DP.has(e.operator)||e.type===`UpdateExpression`?kP(e.argument,t):!1}function AP(e,t,n){let{node:r}=e,i=JT(r);if(i.length===0)return Y([`(`,YA(e,t),`)`]);let a=i.length-1;if(FP(i)){let t=[`(`];return YT(e,(e,r)=>{t.push(n()),r!==a&&t.push(`, `)}),t.push(`)`),t}let o=!1,s=[];YT(e,({node:e},r)=>{let i=n();r===a||(dA(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`?XA(t,`all`):``;function l(){return Y([`(`,J([Z,...s]),c,Z,`)`],{shouldBreak:!0})}if(o||e.parent.type!==`Decorator`&&TP(i))return l();if(NP(i)){let e=s.slice(1);if(e.some(WO))return l();let t;try{t=n(XT(r,0),{expandFirstArg:!0})}catch(e){if(e instanceof sA)return l();throw e}return WO(t)?[dk,mk([[`(`,Y(t,{shouldBreak:!0}),`, `,...e,`)`],l()])]:mk([[`(`,t,`, `,...e,`)`],[`(`,Y(t,{shouldBreak:!0}),`, `,...e,`)`],l()])}if(MP(i,s,t)){let e=s.slice(0,-1);if(e.some(WO))return l();let t;try{t=n(XT(r,-1),{expandLastArg:!0})}catch(e){if(e instanceof sA)return l();throw e}return WO(t)?[dk,mk([[`(`,...e,Y(t,{shouldBreak:!0}),`)`],l()])]:mk([[`(`,...e,t,`)`],[`(`,...e,Y(t,{shouldBreak:!0}),`)`],l()])}let u=[`(`,J([Q,...s]),c,Q,`)`];return EP(e)?u:Y(u,{shouldBreak:s.some(WO)||o})}function jP(e,t=!1){if(tT(e)&&(e.properties.length>0||K(e))||eT(e)&&(e.elements.length>0||K(e))||(Gw(e)||e.type===`TSTypeAssertion`)&&jP(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`||aT(n)||tT(n)||eT(n)||n.type===`ArrowFunctionExpression`&&jP(n,!0)||!t&&(n.type===`ConditionalExpression`||sT(iO(n))))return!0}return!1}function MP(e,t,n){if(e.length===1){let e=hw(0,t,-1);if(e.label?.embed&&e.label?.hug!==!1)return!0}let r=hw(0,e,-1),i=hw(0,e,-2);return!K(r,G.Leading)&&!K(r,G.Trailing)&&jP(r)&&(!i||i.type!==r.type)&&(e.length!==2||i.type!==`ArrowFunctionExpression`||!eT(r))&&!(e.length>1&&cP(r,n))}function NP(e){if(e.length!==2)return!1;let[t,n]=e;return t.type===`ModuleExpression`&&LP(n)?!0:!K(t)&&(t.type===`FunctionExpression`||t.type===`ArrowFunctionExpression`&&t.body.type===`BlockStatement`)&&n.type!==`FunctionExpression`&&n.type!==`ArrowFunctionExpression`&&n.type!==`ConditionalExpression`&&PP(n)&&!jP(n)}function PP(e){if(e.type===`ParenthesizedExpression`)return PP(e.expression);if(Gw(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 gA(t)&&kP(e.expression,1)}return uT(e)&&JT(e).length>1?!1:oT(e)?kP(e.left,1)&&kP(e.right,1):Uw(e)||kP(e)}function FP(e){return e.length===2?IP(e,0):e.length===3&&e[0].type===`Identifier`&&IP(e,1)}function IP(e,t){let n=e[t],r=e[t+1];return n.type===`ArrowFunctionExpression`&&yw(n).length===0&&n.body.type===`BlockStatement`&&r.type===`ArrayExpression`&&e.every(e=>!K(e))}function LP(e){if(e.type!==`ObjectExpression`||e.properties.length!==1)return!1;let[t]=e.properties;return uE(t)?!t.computed&&(t.key.type===`Identifier`&&t.key.name===`type`||Ww(t.key)&&t.key.value===`type`)&&Ww(t.value)&&t.value.value===`module`:!1}var RP=AP;function zP(e,t,n){return[n(`object`),Y(J([Q,BP(e,t,n)]))]}function BP(e,t,n){return[`::`,n(`callee`)]}var VP=e=>sT(e)&&JT(e).length>0;function HP(e){let{node:t,ancestors:n}=e;for(let e of n){if(!(cT(e)&&e.object===t||e.type===`TSNonNullExpression`&&e.expression===t))return e.type===`NewExpression`&&e.callee===t;t=e}return!1}function UP(e,t,n){let r=n(`object`),i=WP(e,t,n),{node:a}=e,o=e.findAncestor(e=>!(cT(e)||e.type===`TSNonNullExpression`)),s=e.findAncestor(e=>!dT(e)),c=o.type===`BindExpression`||o.type===`AssignmentExpression`&&o.left.type!==`Identifier`||HP(e)||a.computed||a.object.type===`Identifier`&&a.property.type===`Identifier`&&!cT(s)||(s.type===`AssignmentExpression`||s.type===`VariableDeclarator`)&&(VP(iO(a.object))||r.label?.memberChain);return _k(r.label,[r,xk,c?i:Y(J([Q,i]))])}function WP(e,t,n){let r=n(`property`),{node:i}=e,a=RA(e);return i.computed?!i.property||Hw(i.property)?[a,`[`,r,`]`]:Y([a,`[`,J([Q,r]),Q,`]`]):[a,`.`,r]}function GP(e,t,n){let r=(e.parent.type===`ChainExpression`?e.grandparent:e.parent).type===`ExpressionStatement`,i=[];function a(e){let{originalText:n}=t,r=zT(n,W(e));return n.charAt(r)===`)`?r!==!1&&uA(n,r+1):dA(e,t)}function o(){let{node:r}=e;if(sT(r)&&(wP(r.callee)||sT(r.callee))&&!gO(e,t)){let s=a(r);i.unshift({node:r,hasTrailingEmptyLine:s,printed:[IA(e,[RA(e),n(`typeArguments`),RP(e,t,n)],t),s?$:``]}),e.call(o,`callee`)}else wP(r)&&!gO(e,t)?(i.unshift({node:r,printed:IA(e,cT(r)?WP(e,t,n):BP(e,t,n),t)}),e.call(o,`object`)):r.type===`ChainExpression`&&!gO(e,t)?e.call(o,`expression`):r.type===`TSNonNullExpression`&&!gO(e,t)?(i.unshift({node:r,printed:IA(e,`!`,t)}),e.call(o,`expression`)):i.unshift({node:r,printed:n()})}let{node:s}=e;i.unshift({node:s,printed:[RA(e),n(`typeArguments`),RP(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`||sT(i[u].node)||cT(i[u].node)&&i[u].node.computed&&Hw(i[u].node.property));++u)l.push(i[u]);if(!sT(i[0].node))for(;u+1<i.length&&wP(i[u].node)&&wP(i[u+1].node);++u)l.push(i[u]);c.push(l),l=[];let d=!1;for(;u<i.length;++u){if(d&&wP(i[u].node)){if(i[u].node.computed&&Hw(i[u].node.property)){l.push(i[u]);continue}c.push(l),l=[],d=!1}(sT(i[u].node)||i[u].node.type===`ImportExpression`)&&(d=!0),l.push(i[u]),K(i[u].node,G.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=hw(0,e[0],-1).node;return cT(n)&&n.property.type===`Identifier`&&(f(n.property.name)||t)}let h=c.length>=2&&!K(c[1][0].node)&&m(c);function g(e){return e.map(e=>e.printed)}function _(e){return e.length===0?``:J([$,gk($,e.map(g))])}let v=c.map(g),y=v,b=h?3:2,x=c.flat(),S=x.slice(1,-1).some(e=>K(e.node,G.Leading))||x.slice(0,-1).some(e=>K(e.node,G.Trailing))||c[b]&&K(c[b][0].node,G.Leading);if(c.length<=b&&!S&&c.every(e=>!hw(0,e,-1).hasTrailingEmptyLine))return EP(e)?y:Y(y);let C=hw(0,c[+!!h],-1).node,w=!sT(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(sT);function D(){let e=hw(0,hw(0,c,-1),-1).node,t=hw(0,v,-1);return sT(e)&&WO(t)&&E.slice(0,-1).some(e=>e.arguments.some(iT))}let O;return O=S||E.length>2&&E.some(e=>e.arguments.some(e=>!kP(e)))||v.slice(0,-1).some(WO)||D()?Y(T):[WO(y)||w?dk:``,mk([y,T])],_k({memberChain:!0},O)}var KP=GP;function qP(e,t,n){let{node:r}=e,i=r.type===`NewExpression`,a=RA(e),o=JT(r),s=r.type!==`TSImportType`&&r.typeArguments?[n(`typeArguments`),xk]:``,c=o.length===1&&pP(o[0],t.originalText);if(c||XP(e)||ZP(e)||TA(r,e.parent)){let t=[];if(YT(e,()=>{t.push(n())}),!(c&&t[0].label?.embed))return[JP(e,n),a,s,`(`,gk(`, `,t),`)`]}let l=r.type===`ImportExpression`||r.type===`TSImportType`||r.type===`TSExternalModuleReference`;if(!l&&!i&&wP(r.callee)&&!e.call(()=>gO(e,t),`callee`,...r.callee.type===`ChainExpression`?[`expression`]:[]))return KP(e,t,n);let u=[JP(e,n),a,s,RP(e,t,n)];return l||sT(r.callee)?Y(u):u}function JP(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`),xk]}var YP=[`require`,`require.resolve`,`require.resolve.paths`,`import.meta.resolve`];function XP(e){let{node:t}=e;if(!(t.type===`ImportExpression`||t.type===`TSImportType`||t.type===`TSExternalModuleReference`||t.type===`CallExpression`&&!t.optional&&yA(t.callee,YP)))return!1;let n=JT(t);return n.length===1&&Ww(n[0])&&!K(n[0])}function ZP(e){let{node:t}=e;if(t.type!==`CallExpression`||t.optional||t.callee.type!==`Identifier`)return!1;let n=JT(t);return t.callee.name===`require`?(n.length===1&&Ww(n[0])||n.length>1)&&!K(n[0]):t.callee.name===`define`&&e.parent.type===`ExpressionStatement`?n.length===1||n.length===2&&n[0].type===`ArrayExpression`||n.length===3&&Ww(n[0])&&n[1].type===`ArrayExpression`:!1}function QP(e,t,n,r,i,a){let o=tF(e,t,n,r,a),s=a?n(a,{assignmentLayout:o}):``;switch(o){case`break-after-operator`:return Y([Y(r),i,Y(J([Z,s]))]);case`never-break-after-operator`:return Y([Y(r),i,` `,s]);case`fluid`:{let e=Symbol(`assignment`);return Y([Y(r),i,Y(J(Z),{id:e}),xk,hk(s,{groupId:e})])}case`break-lhs`:return Y([r,i,` `,Y(s)]);case`chain`:return[Y(r),i,Z,s];case`chain-tail`:return[Y(r),i,J([Z,s])];case`chain-tail-arrow-chain`:return[Y(r),i,s];case`only-left`:return r}}function $P(e,t,n){let{node:r}=e;return QP(e,t,n,n(`left`),[` `,r.operator],`right`)}function eF(e,t,n){return QP(e,t,n,n(`id`),` =`,`init`)}function tF(e,t,n,r,i){let{node:a}=e,o=a[i];if(!o)return`only-left`;let s=!iF(o);if(e.match(iF,aF,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&&iF(o.right)||qw(o)&&!Ij(o)||eO(t.originalText,o)||K(o,G.Leading,NN))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=$O(r);if(rF(a)||cF(a)||lF(a)&&c)return`break-lhs`;let l=fF(a,r,t);return e.call(()=>nF(e,t,n,l),i)?`break-after-operator`:oF(a)?`break-lhs`:!c&&(l||o.type===`TemplateLiteral`||o.type===`TaggedTemplateExpression`||Vw(o)||Hw(o)||o.type===`ClassExpression`)?`never-break-after-operator`:`fluid`}function nF(e,t,n,r){let i=e.node;if(oT(i)&&!qN(i))return!0;switch(i.type){case`StringLiteralTypeAnnotation`:case`SequenceExpression`:return!0;case`TSConditionalType`:case`ConditionalTypeAnnotation`:if(!t.experimentalTernaries&&!hF(i))break;return!0;case`ConditionalExpression`:{if(!t.experimentalTernaries){let{test:e}=i;return oT(e)&&!qN(e)}let{consequent:e,alternate:n}=i;return e.type===`ConditionalExpression`||n.type===`ConditionalExpression`}case`ClassExpression`:return dw(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!!(Ww(a)||e.call(()=>dF(e,t,n),...o))}function rF(e){if(aF(e)){let t=e.left||e.id;return t.type===`ObjectPattern`&&t.properties.length>2&&t.properties.some(e=>uE(e)&&(!e.shorthand||e.value?.type===`AssignmentPattern`))}return!1}function iF(e){return e.type===`AssignmentExpression`}function aF(e){return iF(e)||e.type===`VariableDeclarator`}function oF(e){let t=sF(e);if(dw(t)){let n=e.type===`TSTypeAliasDeclaration`?`constraint`:`bound`;if(t.length>1&&t.some(e=>e[n]||e.default))return!0}return!1}function sF(e){if(Zw(e))return e.typeParameters?.params}function cF(e){if(e.type!==`VariableDeclarator`)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let n=uF(t.typeAnnotation);return dw(n)&&n.length>1&&n.some(e=>dw(uF(e))||e.type===`TSConditionalType`)}function lF(e){return e.type===`VariableDeclarator`&&e.init?.type===`ArrowFunctionExpression`}function uF(e){let t;switch(e.type){case`GenericTypeAnnotation`:t=e.typeParameters;break;case`TSTypeReference`:t=e.typeArguments}return t?.params}function dF(e,t,n,r=!1){let{node:i}=e,a=()=>dF(e,t,n,!0);if(dT(i))return e.call(a,`expression`);if(sT(i)){if(qP(e,t,n).label?.memberChain)return!1;let r=JT(i);return!(r.length===0||r.length===1&&CP(r[0],t))||pF(i,n)?!1:e.call(a,`callee`)}return cT(i)?e.call(a,`object`):r&&(i.type===`Identifier`||i.type===`ThisExpression`)}function fF(e,t,n){return uE(e)?(t=XO(t),typeof t==`string`&&Kk(t)<n.tabWidth+3):!1}function pF(e,t){let n=e.typeArguments?.params;if(dw(n)){if(n.length>1)return!0;if(n.length===1){let e=n[0];if(qw(e)||Jw(e)||e.type===`TSTypeLiteral`||e.type===`ObjectTypeAnnotation`)return!0}if(WO(t(`typeArguments`)))return!0}return!1}function mF(e){switch(e.type){case`FunctionTypeAnnotation`:case`GenericTypeAnnotation`:case`TSFunctionType`:return!!e.typeParameters;case`TSTypeReference`:return!!e.typeArguments;default:return!1}}function hF(e){return mF(e.checkType)||mF(e.extendsType)}function gF(e,t,n){let{node:r}=e,i=[`await`];if(r.argument){i.push(` `,n(`argument`));let{parent:t}=e;if(sT(t)&&t.callee===r||cT(t)&&t.object===r){i=[J([Q,...i]),Q];let t=e.findAncestor(e=>e.type===`AwaitExpression`||e.type===`BlockStatement`);if(t?.type!==`AwaitExpression`||!jD(t.argument,e=>e===r))return Y(i)}}return i}var _F=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}},vF=pw(`findLast`,function(){if(Array.isArray(this))return _F});function yF(e,t,n,r){let{node:i}=e,a=[],o=vF(0,i[r],e=>e.type!==`EmptyStatement`);return e.each(({node:e})=>{e.type!==`EmptyStatement`&&(a.push(n()),e!==o&&(a.push($),dA(e,t)&&a.push($)))},r),a}function bF(e,t,n){let r=xF(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(J([$,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 xF(e,t,n){let{node:r}=e,i=dw(r.directives),a=r.body.some(e=>e.type!==`EmptyStatement`),o=K(r,G.Dangling);if(!i&&!a&&!o)return``;let s=[];return i&&(s.push(yF(e,t,n,`directives`)),(a||o)&&(s.push($),dA(hw(0,r.directives,-1),t)&&s.push($))),a&&s.push(yF(e,t,n,`body`)),o&&s.push(MA(e,t)),s}function SF(e){let t=/* @__PURE__ */ new WeakMap;return n=>gw(t,n,()=>Symbol(e))}var CF=SF,wF=[`properties`,`indexers`,`callProperties`,`internalSlots`];function TF(e,t){let{node:n}=e;if(n.type===`ClassBody`||n.type===`TSInterfaceBody`)e.each(t,`body`);else if(n.type===`TSTypeLiteral`)e.each(t,`members`);else if(n.type===`RecordDeclarationBody`)e.each(t,`elements`);else if(n.type===`ObjectTypeAnnotation`){let n=wF.flatMap(t=>e.map(({node:e,index:n})=>({node:e,loc:U(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 EF(e){return e.type===`ObjectTypeAnnotation`?wF.some(t=>dw(e[t])):dw(e.type===`RecordDeclarationBody`?e.elements:e.body)}function DF(e,t,n){let{node:r}=e,i=[],a=r.type===`ObjectTypeAnnotation`,o=r.type===`RecordDeclarationBody`,s=!OF(e),c=s?Z:$,l=K(r,G.Dangling),[u,d]=a&&r.exact?[`{|`,`|}`]:`{}`,f=!0,p;if(TF(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(XA(t))}o&&r.type!==`MethodDefinition`&&i.push(`,`),!o&&!s&&(MF({node:r,next:l},t)||PF({node:r,next:l},t))&&i.push(`;`),u||(i.push(c),dA(r,t)&&i.push($))}),l&&i.push(MA(e,t)),r.type===`ObjectTypeAnnotation`&&r.inexact){f&&=!1;let e;e=K(r,G.Dangling)?[K(r,G.Line)||UT(t.originalText,W(hw(0,bD(r),-1)))?$:Z,`...`]:[p?Z:``,`...`],i.push(e)}if(s){let n=K(r,G.Dangling|G.Line)||t.objectWrap===`preserve`&&p&&GT(t.originalText,U(r),U(p)),a;if(i.length===0)a=u+d;else{let e=!t.bracketSpacing||f&&!n?Q:Z;a=[u,J([e,...i]),e,d]}return e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,aj)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,aj)?a:Y(a,{shouldBreak:n})}return[u,i.length>0?[J([$,i]),$]:``,d]}function OF(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 kF(e,t){let{parent:n}=e;return e.callParent(OF)?n.type===`ObjectTypeAnnotation`?`;`:ZA(t):n.type===`TSTypeLiteral`?e.isLast?t.semi?X(`;`):``:t.semi||PF({node:e.node,next:e.next},t)?`;`:X(``,`;`):``}var AF=H([`ClassProperty`,`PropertyDefinition`,`ClassPrivateProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractPropertyDefinition`,`TSAbstractAccessorProperty`]),jF=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 MF({node:e,next:t},n){if(n.semi||!AF(e))return!1;if(!e.value&&jF(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(AF(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 NF=H([`TSPropertySignature`]);function PF({node:e,next:t},n){return n.semi||!NF(e)?!1:jF(e)?!0:t&&t.type===`TSCallSignatureDeclaration`?!(e.type===`TSPropertySignature`&&e.typeAnnotation):!1}var FF=CF(`heritageGroup`),IF=H([`TSInterfaceDeclaration`,`DeclareInterface`,`InterfaceDeclaration`,`InterfaceTypeAnnotation`]);function LF(e,t,n){let r=RF(e,t,n),{node:i}=e;if(i.type===`ClassExpression`&&dw(i.decorators)){let i=rP(e,t,n);return gO(e,t)?[J([Q,i,r]),Q]:[i,r]}return r}function RF(e,t,n){let{node:r}=e,i=IF(r),a=r.type===`RecordDeclaration`,o=i?`interface`:a?`record`:`class`,s=[HA(e),WA(e),o],c=HF(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(()=>FA(e,t),i);l.push(r,n(i),J(a))}}if(r.superClass){let r=[WF(e,t,n),n(`superTypeArguments`)],i=e.call(()=>[`extends `,IA(e,r,t)],`superClass`);c?u.push(Z,Y(i)):u.push(` `,i)}else u.push(UF(e,t,n,`extends`));u.push(UF(e,t,n,`mixins`),UF(e,t,n,`implements`));let d;return c?(d=FF(r),s.push(Y([...l,J(u)],{id:d}))):s.push(...l,...u),!i&&c&&EF(r.body)?s.push(X($,` `,{groupId:d})):s.push(` `),s.push(n(`body`)),s}function zF(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 BF(e){let{node:t}=e;if(K(t.id,G.Trailing)||K(t.typeParameters,G.Trailing)||K(t.superClass)||zF(t))return!0;if(t.superClass)return e.parent.type!==`AssignmentExpression`&&!t.superTypeArguments&&cT(iO(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`)&&cT(n.expression)&&!n.typeArguments:!1}var VF=/* @__PURE__ */ new WeakMap;function HF(e){return gw(VF,e.node,()=>BF(e))}function UF(e,t,n,r){let{node:i}=e;if(!dw(i[r]))return``;let a=MA(e,t,{marker:r}),o=gk([`,`,Z],e.map(n,r));if(!zF(i)){let t=[`${r} `,a,o];return HF(e)?[Z,Y(t)]:[` `,t]}return[Z,a,a&&$,r,Y(J([Z,o]))]}function WF(e,t,n){let r=n(`superClass`),{parent:i}=e;return i.type===`AssignmentExpression`?Y(X([`(`,J([Q,r]),Q,`)`],r)):r}function GF(e,t,n){let{node:r}=e,i=[];return dw(r.decorators)&&i.push(tP(e,t,n)),i.push(GA(r)),r.static&&i.push(`static `),i.push(WA(e)),r.override&&i.push(`override `),i.push(qj(e,t,n)),i}function KF(e,t,n){let{node:r}=e,i=[];return dw(r.decorators)&&i.push(tP(e,t,n)),i.push(HA(e),GA(r)),r.static&&i.push(`static `),i.push(WA(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(Mj(e,t,n),RA(e),zA(e),Hj(e,n)),[QP(e,t,n,i,` =`,r.type===`TSAbstractPropertyDefinition`||r.type===`TSAbstractAccessorProperty`?void 0:`value`),ZA(t)]}function qF(e,t){let n=bD(e,G.Leading);if(n.length===0)return!1;let[r]=n,i=t.originalText,a=U(r);return GT(i,a,W(r))||UT(i,a,{backwards:!0})}function JF(e,t,n,r=`body`){return e.call(({node:r})=>{let i=n();if(r.type===`EmptyStatement`)return K(r,G.Leading)?[` `,i]:i;let a=r.type===`BlockStatement`;return qF(r,t)?a?[$,i]:J([$,i]):a||r.type===`IfStatement`&&e.parent.type===`IfStatement`&&e.key===`alternate`?[` `,i]:J([Z,i])},r)}var YF=(e,t,n)=>JF(e,t,n,`consequent`),XF=(e,t,n)=>JF(e,t,n,`alternate`);function ZF(e,t,n){return[Y([`do`,JF(e,t,n)]),e.node.body.type===`BlockStatement`?` `:$,`while (`,JA(e,t,n),`)`,ZA(t)]}var QF=H([`TSAsExpression`,`TSTypeAssertion`,`TSNonNullExpression`,`TSInstantiationExpression`,`TSSatisfiesExpression`]);function $F(e){return QF(e)?$F(e.expression):e}var eI=H([`FunctionExpression`,`ArrowFunctionExpression`]);function tI(e){return e.type===`MemberExpression`||e.type===`OptionalMemberExpression`||e.type===`Identifier`&&e.name!==`undefined`}function nI(e,t){if(rM(e,t)){let t=$F(e.node.expression);return eI(t)||tI(t)}return!(!t.semi||tM(e,t)||nM(e,t))}function rI(e,t,n){let r=[n(`expression`)];if(Qj(e,t)){if(iM(e,t)){let{node:n}=e,i=hw(0,bD(n,G.Leading),-1);return IA(e,[`;`,NA(e,t,{filter:e=>e===i}),...r],t,{filter:e=>e!==i})}r.unshift(`;`)}else nI(e,t)&&r.push(`;`);return r}function iI(e,t,n){let{node:r}=e,i=JF(e,t,n),a=MA(e,t),o=a?[a,Q]:``;return!r.init&&!r.test&&!r.update?[o,Y([`for (;;)`,i])]:[o,Y([`for (`,Y([J([Q,n(`init`),`;`,Z,n(`test`),`;`,r.update?[Z,n(`update`)]:``]),Q]),`)`,i])]}function aI(e,t,n){let{node:r}=e,i=r.type===`ForOfStatement`;return Y([`for`,i&&r.await?` await`:``,` (`,n(`left`),` `,i?`of`:`in`,` `,n(`right`),`)`,JF(e,t,n)])}function oI(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=gk([`,`,Z],r);return t.__isVueForBindingLeft?[`(`,J([Q,Y(i)]),Q,`)`]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(n,`program`,`body`,0,`typeParameters`,`params`);return gk([`,`,Z],t)}}var sI=(e,{originalText:t})=>DA(t,U(e));function cI(e){return lE(hw(0,bD(e,G.Dangling),-1))}function lI(e,t,n){let{node:r}=e,i=Y([`if (`,JA(e,t,n),`)`,YF(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=bD(r,G.Dangling);if(l.length>0){let[n]=l;sI(n,t)?s.push(o?[$,$]:$):UT(t.originalText,U(n),{backwards:!0})?s.push(o?$:``):s.push(` `),s.push(MA(e,t),cI(r)||UT(t.originalText,W(hw(0,l,-1)))?$:` `),c=!1}return s.push(c?` `:``,`else`,Y(XF(e,t,n))),s}function uI(e,t){let{node:n}=e;switch(n.type){case`RegExpLiteral`:return pI(n);case`BigIntLiteral`:return fI(n.extra.raw);case`NumericLiteral`:return lj(n.extra.raw);case`StringLiteral`:return ZO(yj(n.extra.raw,t));case`NullLiteral`:return`null`;case`BooleanLiteral`:return String(n.value);case`DirectiveLiteral`:return hI(n.extra.raw,t);case`Literal`:{if(n.regex)return pI(n.regex);if(n.bigint)return fI(n.raw);let{value:r}=n;return typeof r==`number`?lj(n.raw):typeof r==`string`?dI(e)?hI(n.raw,t):ZO(yj(n.raw,t)):String(r)}}}function dI(e){if(e.key!==`expression`)return;let{parent:t}=e;return t.type===`ExpressionStatement`&&typeof t.directive==`string`}function fI(e){return e.toLowerCase()}function pI({pattern:e,flags:t}){return t=[...t].sort().join(``),`/${e}/${t}`}var mI=`use strict`;function hI(e,t){let n=e.slice(1,-1);if(n===mI||!(n.includes(`"`)||n.includes(`'`))){let e=t.singleQuote?`'`:`"`;return e+n+e}return e}var gI=H([`ImportDeclaration`,`ExportDefaultDeclaration`,`ExportNamedDeclaration`,`ExportAllDeclaration`,`DeclareExportDeclaration`,`DeclareExportAllDeclaration`]),_I=H([`EnumBody`,`EnumBooleanBody`,`EnumNumberBody`,`EnumBigIntBody`,`EnumStringBody`,`EnumSymbolBody`]);function vI(e,t,n){let{node:r,parent:i}=e,a=_I(r),o=r.type===`TSEnumBody`||a,s=gI(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&&yI(r,u[0],t),f=[],p=e.map(({node:e})=>{let r=[...f,n()];return f=[`,`,Z],dA(e,t)&&f.push($),r},l);if(c){let n;if(K(r,G.Dangling)){let i=K(r,G.Line);n=[MA(e,t),i||UT(t.originalText,W(hw(0,bD(r),-1)))?$:Z,`...`]}else n=[`...`];p.push([...f,...n])}let m=!(c||hw(0,u,-1)?.type===`RestElement`),h;if(p.length===0)h=Y([`{`,YA(e,t),`}`,RA(e),Hj(e,n)]);else{let r=t.bracketSpacing?Z:Q;h=[`{`,J([r,...p]),m?XA(t):``,r,`}`,RA(e),Hj(e,n)]}return e.match(e=>e.type===`ObjectPattern`&&!dw(e.decorators),aj)||rT(r)&&(e.match(void 0,(e,t)=>t===`typeAnnotation`,(e,t)=>t===`typeAnnotation`,aj)||e.match(void 0,(e,t)=>e.type===`FunctionTypeParam`&&t===`typeAnnotation`,aj))||!d&&e.match(e=>e.type===`ObjectPattern`,e=>e.type===`AssignmentExpression`||e.type===`VariableDeclarator`)?h:Y(h,{shouldBreak:d})}function yI(e,t,n){let r=n.originalText,i=U(t),a=U(e);return gI(e)&&(a=iE(n).lastIndexOf(`{`,i)),GT(r,a,i)}function bI(e,t,n){let{node:r}=e;return[`import`,r.phase?` ${r.phase}`:``,EI(r),kI(e,t,n),OI(e,t,n),NI(e,t,n),ZA(t)]}var xI=e=>e.type===`ExportDefaultDeclaration`||e.type===`DeclareExportDeclaration`&&e.default;function SI(e,t,n){let{node:r}=e,i=[nP(e,t,n),HA(e),`export`,xI(r)?` default`:``],{declaration:a,exported:o}=r;return K(r,G.Dangling)&&(i.push(` `,MA(e,t)),cI(r)&&i.push($)),a?i.push(` `,n(`declaration`)):(i.push(DI(r)),r.type===`ExportAllDeclaration`||r.type===`DeclareExportAllDeclaration`?(i.push(` *`),o&&i.push(` as `,n(`exported`))):i.push(kI(e,t,n)),i.push(OI(e,t,n),NI(e,t,n))),i.push(wI(r,t)),i}var CI=H([`ClassDeclaration`,`ComponentDeclaration`,`FunctionDeclaration`,`TSInterfaceDeclaration`,`DeclareClass`,`DeclareComponent`,`DeclareFunction`,`DeclareHook`,`HookDeclaration`,`TSDeclareFunction`,`EnumDeclaration`]);function wI(e,t){return!e.declaration||xI(e)&&!CI(e.declaration)?ZA(t):``}function TI(e,t=!0){return e&&e!==`value`?`${t?` `:``}${e}${t?``:` `}`:``}function EI(e,t){return TI(e.importKind,t)}function DI(e){return TI(e.exportKind)}function OI(e,t,n){let{node:r}=e;return r.source?[AI(r,t)?` from`:``,` `,n(`source`)]:``}function kI(e,t,n){let{node:r}=e;if(!AI(r,t))return``;let i=[` `];if(dw(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 HN(r,`specifier`)},`specifiers`),i.push(gk(`, `,a)),o.length>0&&(a.length>0&&i.push(`, `),o.length>1||a.length>0||r.specifiers.some(e=>K(e))?i.push(Y([`{`,J([t.bracketSpacing?Z:Q,gk([`,`,Z],o)]),XA(t),t.bracketSpacing?Z:Q,`}`])):i.push([`{`,t.bracketSpacing?` `:``,...o,t.bracketSpacing?` `:``,`}`]))}else i.push(`{}`);return i}function AI(e,t){return e.type!==`ImportDeclaration`||dw(e.specifiers)||e.importKind===`type`?!0:iE(t).slice(U(e),U(e.source)).trimEnd().endsWith(`from`)}function jI(e,t){let n=iE(t).slice(W(e.source),e.attributes?.[0]?U(e.attributes[0]):W(e)).trimStart();return n.startsWith(`assert`)?`assert`:n.startsWith(`with`)||dw(e.attributes)?`with`:void 0}var MI=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`||Ww(i)&&i.value===`type`)&&Ww(a)&&!K(n)&&!K(i)&&!K(a)};function NI(e,t,n){let{node:r}=e;if(!r.source)return``;let i=jI(r,t);if(!i)return``;let a=vI(e,t,n);return MI(r)&&(a=JO(a)),[` ${i} `,a]}function PI(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&&!mT(r)&&(d=n(s)),[TI(i===`ImportSpecifier`?r.importKind:r.exportKind,!1),u,u&&d?` as `:``,d]}function FI(e,t,n){let{node:r}=e;return r.shorthand?n(`value`):QP(e,t,n,Mj(e,t,n),`:`,`value`)}function II(e,t){return[`...`,t(`argument`),Hj(e,t)]}function LI(e,t,n){let{node:r}=e,i=n();return rO(r,t)?[`(`,J([$,i]),$,`)`]:oT(r)||t.experimentalTernaries&&r.type===`ConditionalExpression`&&(r.consequent.type===`ConditionalExpression`||r.alternate.type===`ConditionalExpression`)?Y([X(`(`),J([Q,i]),Q,X(`)`)]):i}function RI(e,t,n){let{node:r}=e;return[r.type===`ThrowStatement`?`throw`:`return`,r.argument?[` `,e.call(()=>LI(e,t,n),`argument`)]:``,ZA(t)]}function zI(e,t){let{key:n,parent:r}=e;return!!(n===`argument`&&Qw(r)&&gO(e,t)||n===`body`&&r.type===`ArrowFunctionExpression`)}function BI(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(`,`,J([Z,n()]))},`expressions`),Y(t)}let i=gk([`,`,Z],e.map(n,`expressions`));return zI(e,t)?Y(X([J([Q,i]),Q],i)):Y(i)}function VI(e,t,n){return[Y([`switch (`,J([Q,n(`discriminant`)]),Q,`)`]),` {`,e.node.cases.length>0?J([$,gk($,e.map(({node:e,isLast:r})=>[n(),!r&&dA(e,t)?$:``],`cases`))]):MA(e,t,{indent:!0}),$,`}`]}function HI(e,t,n){let{node:r}=e,i=[];r.test?i.push(`case `,n(`test`),`:`):i.push(`default:`),K(r,G.Dangling)&&i.push(` `,MA(e,t));let a=r.consequent.filter(e=>e.type!==`EmptyStatement`);if(a.length>0){let r=yF(e,t,n,`consequent`);i.push(a.length===1&&a[0].type===`BlockStatement`?[` `,r]:J([$,r]))}return i}function UI(e,t){let n=0;for(let r in e){let i=e[r];if(zD(i)&&typeof i.type==`string`&&(n++,n+=UI(i,t-n)),n>t)return n}return n}function WI(e,t=5){return UI(e,t)<=t}function GI(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(aT(r))return!0;r.type===`ConditionalExpression`&&t.push(r)}}return!1}function KI(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?ok(2,s):s}var qI=/* @__PURE__ */ new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function JI(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);dT(i)&&i.expression===r||sT(i)&&i.callee===r||cT(i)&&i.object===r?r=i:i.type===`NewExpression`&&i.callee===r||Gw(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[qI.get(n.type)]===r}function YI(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&&(aT(r[s[0]])||aT(c)||aT(l)||GI(y))){d=!0,m=!0;let e=e=>[X(`(`),J([Q,e]),Q,X(`)`)],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?J(n(e)):ok(2,n(e)),i=[Z,`? `,c.type===r.type?X(``,`(`):``,e(a),c.type===r.type?X(``,`)`):``,Z,`: `,e(o)];u.push(f.type!==r.type||f[o]===r||p?i:t.useTabs?lk(J(i)):ok(Math.max(0,t.tabWidth-2),i))}let b=e=>f===v?Y(e):e,x=!d&&(cT(f)||f.type===`NGPipeExpression`&&f.left===r)&&!f.computed,S=JI(e),C=b([KI(e,t,n),m?u:J(u),i&&x&&!S?Q:``]);return p||S?Y([J([Q,C]),Q]):C}function XI(e,t){return(cT(t)||t.type===`NGPipeExpression`&&t.left===e)&&!t.computed}function ZI(e,t,n,r){return[...e.map(e=>bD(e)),bD(t),bD(n)].flat().some(e=>cE(e)&&GT(r.originalText,U(e),W(e)))}var QI=/* @__PURE__ */ new Map([[`AssignmentExpression`,`right`],[`VariableDeclarator`,`init`],[`ReturnStatement`,`argument`],[`ThrowStatement`,`argument`],[`UnaryExpression`,`argument`],[`YieldExpression`,`argument`],[`AwaitExpression`,`argument`]]);function $I(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);dT(i)&&i.expression===r||sT(i)&&i.callee===r||cT(i)&&i.object===r?r=i:i.type===`NewExpression`&&i.callee===r||Gw(i)&&i.expression===r?(n=e.getParentNode(t+1),r=i):n=i}return r!==t&&n[QI.get(n.type)]===r}var eL=e=>[X(`(`),J([Q,e]),Q,X(`)`)];function tL(e,t,n,r){if(!t.experimentalTernaries)return YI(e,t,n);let{node:i}=e,a=i.type===`ConditionalExpression`,o=Xw(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=Qw(p)&&!(_||v),D=a&&w.type===`JSXExpressionContainer`&&e.grandparent.type!==`JSXAttribute`,O=$I(e),k=XI(i,p),ee=o&&gO(e,t),te=b?t.useTabs?` `:` `.repeat(t.tabWidth-1):``,ne=ZI(f,u,d,t)||_||v,re=!y&&!m&&!o&&(D?u.type===`NullLiteral`||u.type===`Literal`&&u.value===null:CP(u,t)&&WI(i.test,3)),ie=y||g||o&&!m||m&&a&&WI(i.test,1)||re,ae=[];K(i.test,G.Dangling)&&e.call(()=>{ae.push(MA(e,t))},`test`),K(i,G.Dangling)&&ae.push(MA(e,t));let oe=Symbol(`test`),A=Symbol(`consequent`),se=Symbol(`test-and-consequent`),j=Y([a?[eL(n(`test`)),i.test.type===`ConditionalExpression`?dk:``]:[n(`checkType`),` `,`extends`,` `,Xw(i.extendsType)||i.extendsType.type===`TSMappedType`?n(`extendsType`):Y(eL(n(`extendsType`)))],` ?`],{id:oe}),ce=n(s),M=J([_||D&&(aT(u)||m||y)?$:Z,ce]),N=ie?Y([j,y?M:X(M,Y(M,{id:A}),{groupId:oe})],{id:se}):[j,M],P=n(c),le=re?X(P,lk(eL(P)),{groupId:se}):P,ue=[N,ae.length>0?[J([$,ae]),$]:v?$:re?X(Z,` `,{groupId:se}):Z,`:`,v||!b?` `:ie?X(te,X(y||re?` `:te,` `),{groupId:se}):X(te,` `),v?le:Y([J(le),D&&!re?Q:``]),k&&!O?Q:``,ne?dk:``];return T&&!ne?Y(J([Q,Y(ue)])):T||E?Y(J(ue)):O||o&&h?Y([J([Q,ue]),ee?Q:``]):p===w?Y(ue):ue}function nL(e,t,n){let{node:r}=e;return[`try `,n(`block`),r.handler?[` `,n(`handler`)]:``,r.finalizer?[` finally `,n(`finalizer`)]:``]}function rL(e,t,n){let{node:r}=e;if(r.param){let e=K(r.param,e=>!cE(e)||e.leading&&UT(t.originalText,W(e))||e.trailing&&UT(t.originalText,U(e),{backwards:!0})),i=n(`param`);return[`catch `,e?[`(`,J([Q,i]),Q,`) `]:[`(`,i,`) `],n(`body`)]}return[`catch `,n(`body`)]}function iL(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&&!K(r.declarations[0])?i[0]:J(i[0]),Y([HA(e),r.kind,s?[` `,s]:``,J(i.slice(1).map(e=>[`,`,o&&!a?$:Z,e])),a?``:ZA(t)])}function aL(e,t,n){let{node:r}=e;return Y([r.type===`WithStatement`?`with`:`while`,` (`,JA(e,t,n),`)`,JF(e,t,n)])}function oL(e,t,n,r){let{node:i}=e;if(nT(i))return uI(e,t);switch(i.type){case`JsExpressionRoot`:return n(`node`);case`JsonRoot`:return[MA(e,t),n(`node`),$];case`File`:return oI(e,t,n)??n(`program`);case`ExpressionStatement`:return rI(e,t,n);case`ChainExpression`:return n(`expression`);case`ParenthesizedExpression`:return!K(i.expression)&&(tT(i.expression)||eT(i.expression))?[`(`,n(`expression`),`)`]:Y([`(`,J([Q,n(`expression`)]),Q,`)`]);case`AssignmentExpression`:return $P(e,t,n);case`VariableDeclarator`:return eF(e,t,n);case`BinaryExpression`:case`LogicalExpression`:return GN(e,t,n);case`AssignmentPattern`:return[n(`left`),` = `,n(`right`)];case`OptionalMemberExpression`:case`MemberExpression`:return UP(e,t,n);case`MetaProperty`:return[n(`meta`),`.`,n(`property`)];case`BindExpression`:return zP(e,t,n);case`Identifier`:return[i.name,RA(e),zA(e),Hj(e,n)];case`V8IntrinsicIdentifier`:return[`%`,i.name];case`SpreadElement`:return II(e,n);case`RestElement`:return II(e,n);case`FunctionDeclaration`:case`FunctionExpression`:return Kj(e,t,n,r);case`ArrowFunctionExpression`:return _P(e,t,n,r);case`YieldExpression`:return[`yield${i.delegate?`*`:``}`,i.argument?[` `,n(`argument`)]:``];case`AwaitExpression`:return gF(e,t,n);case`ExportDefaultDeclaration`:case`ExportNamedDeclaration`:case`ExportAllDeclaration`:return SI(e,t,n);case`ImportDeclaration`:return bI(e,t,n);case`ImportSpecifier`:case`ExportSpecifier`:case`ImportNamespaceSpecifier`:case`ExportNamespaceSpecifier`:case`ImportDefaultSpecifier`:case`ExportDefaultSpecifier`:return PI(e,t,n);case`ImportAttribute`:return FI(e,t,n);case`Program`:case`BlockStatement`:case`StaticBlock`:return bF(e,t,n);case`ClassBody`:return DF(e,t,n);case`ThrowStatement`:return RI(e,t,n);case`ReturnStatement`:return RI(e,t,n);case`NewExpression`:case`ImportExpression`:case`OptionalCallExpression`:case`CallExpression`:return qP(e,t,n);case`ObjectExpression`:case`ObjectPattern`:return vI(e,t,n);case`Property`:return ww(i)?qj(e,t,n):FI(e,t,n);case`ObjectProperty`:return FI(e,t,n);case`ObjectMethod`:return qj(e,t,n);case`Decorator`:return[`@`,n(`expression`)];case`ArrayExpression`:case`ArrayPattern`:return sP(e,t,n);case`SequenceExpression`:return BI(e,t,n);case`ThisExpression`:return`this`;case`Super`:return`super`;case`Directive`:return[n(`value`),ZA(t)];case`UnaryExpression`:{let e=[i.operator];/[a-z]$/.test(i.operator)&&e.push(` `);let t=n(`argument`);return K(i.argument)?e.push(Y([`(`,J([Q,t]),Q,`)`])):e.push(t),e}case`UpdateExpression`:return[i.prefix?i.operator:``,n(`argument`),i.prefix?``:i.operator];case`ConditionalExpression`:return tL(e,t,n,r);case`VariableDeclaration`:return iL(e,t,n);case`IfStatement`:return lI(e,t,n);case`ForStatement`:return iI(e,t,n);case`WithStatement`:case`WhileStatement`:return aL(e,t,n);case`DoWhileStatement`:return ZF(e,t,n);case`ForInStatement`:case`ForOfStatement`:return aI(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`)]:``,ZA(t)];case`LabeledStatement`:return[n(`label`),`:${i.body.type===`EmptyStatement`&&!K(i.body,G.Leading)?``:` `}`,n(`body`)];case`TryStatement`:return nL(e,t,n);case`CatchClause`:return rL(e,t,n);case`SwitchStatement`:return VI(e,t,n);case`SwitchCase`:return HI(e,t,n);case`DebuggerStatement`:return[`debugger`,ZA(t)];case`ClassDeclaration`:case`ClassExpression`:return LF(e,t,n);case`ClassMethod`:case`ClassPrivateMethod`:case`MethodDefinition`:return GF(e,t,n);case`ClassProperty`:case`PropertyDefinition`:case`ClassPrivateProperty`:case`ClassAccessorProperty`:case`AccessorProperty`:return KF(e,t,n);case`TemplateElement`:return ZO(i.value.raw);case`TemplateLiteral`:return fM(e,t,n);case`TaggedTemplateExpression`:return pM(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(Cw(e))return`;`;default:throw new HN(i,`ESTree`)}}function sL(e){return[e(`elementType`),`[]`]}function cL(e,t,n){let{parent:r,node:i,key:a}=e,o=i.type===`AsConstExpression`?`const`:n(`typeAnnotation`),s=[n(`expression`),` `,Kw(i)?`satisfies`:`as`,` `,o];return a===`callee`&&lT(r)||a===`object`&&cT(r)?Y([J([Q,...s]),Q]):s}function lL(e,t,n){let{node:r}=e,i=[HA(e),r.async?`async `:``,`component`];r.id&&i.push(` `,n(`id`)),i.push(n(`typeParameters`));let a=$A(e,t,n);return r.rendersType?i.push(Y([a,` `,n(`rendersType`)])):i.push(Y([a])),r.body&&i.push(` `,n(`body`)),r.type===`DeclareComponent`&&i.push(ZA(t)),i}function uL(e,t,n){let{node:r}=e;return r.shorthand?n(`local`):[n(`name`),` as `,n(`local`)]}function dL(e,t,n){let{node:r}=e,i=[];return r.name&&i.push(n(`name`),r.optional?`?: `:`: `),i.push(n(`typeAnnotation`)),i}function fL(e,t,n){let{node:r}=e;return[r.explicitType?`of ${r.explicitType} `:``,vI(e,t,n)]}function pL(e,t,n){let{node:r}=e;return[r.type===`EnumSymbolBody`||r.explicitType?`of ${r.type.slice(4,-4).toLowerCase()} `:``,vI(e,t,n)]}function mL(e,t,n){let{node:r}=e,i=r.type===`TSEnumMember`,a=i?Mj(e,t,n):n(`id`),o=i?`initializer`:`init`;return r[o]?[a,` = `,n(o)]:a}function hL(e,t){let{node:n}=e;return[HA(e),n.const?`const `:``,`enum `,t(`id`),` `,t(`body`)]}function gL(e,t,n){let{node:r}=e,i=[WA(e)];(r.type===`TSConstructorType`||r.type===`TSConstructSignatureDeclaration`)&&i.push(`new `);let a=$A(e,t,n,!1,!0),o=[];return r.type===`FunctionTypeAnnotation`?o.push(_L(e)?` => `:`: `,n(`returnType`)):o.push(Hj(e,n,`returnType`)),nj(r,o)&&(a=Y(a)),i.push(a,o),[Y(i),r.type===`TSConstructSignatureDeclaration`||r.type===`TSCallSignatureDeclaration`?kF(e,t):``]}function _L(e){let{node:t,parent:n}=e;return t.type===`FunctionTypeAnnotation`&&(cA(n)||!((n.type===`ObjectTypeProperty`||n.type===`ObjectTypeInternalSlot`)&&!n.variance&&!n.optional&&Iw(n,t)||n.type===`ObjectTypeCallProperty`||e.getParentNode(2)?.type===`DeclareFunction`))}function vL(e,t,n){return[HA(e),`hook`,e.node.id?[` `,n(`id`)]:``,ZA(t)]}function yL(e){let{node:t}=e;return t.type===`HookTypeAnnotation`&&e.getParentNode(2)?.type===`DeclareHook`}function bL(e,t,n){let{node:r}=e,i=$A(e,t,n,!1,!0),a=[yL(e)?`: `:` => `,n(`returnType`)];return Y([yL(e)?``:`hook `,nj(r,a)?Y(i):i,a])}function xL(e,t,n){return[n(`objectType`),RA(e),`[`,n(`indexType`),`]`]}function SL(e,t,n){return[`infer `,n(`typeParameter`)]}function CL(e,t,n){let r=!1;return Y(e.map(({isFirst:e,previous:i,node:a,index:o})=>{let s=n();if(e)return s;let c=rT(a),l=rT(i);return l&&c?[` & `,r?J(s):s]:!l&&!c||eO(t.originalText,a)?t.experimentalOperatorPosition===`start`?J([Z,`& `,s]):J([` &`,Z,s]):(o>1&&(r=!0),[` & `,o>1?J(s):s])},`types`))}function wL(e){switch(e){case null:return``;case`PlusOptional`:return`+?`;case`MinusOptional`:return`-?`;case`Optional`:return`?`}}function TL(e,t,n){let{node:r}=e;return[Y([r.variance?n(`variance`):``,Y([`[`,J([Q,n(`keyTparam`),` in `,n(`sourceType`)]),Q,`]`]),wL(r.optional),`: `,n(`propType`)]),kF(e,t)]}function EL(e,t){return e===`+`||e===`-`?e+t:t}function DL(e,t,n){let{node:r}=e,i=!1;if(t.objectWrap===`preserve`){let e=iE(t),n=U(r)+1,a=n+e.slice(n).search(/\S/);GT(t.originalText,n,a)&&(i=!0)}let a=[],o=bD(r,G.Dangling);if(o.length>0){let n=hw(0,o,-1),r=MA(e,t);a.push(...r.slice(0,-1),Y([hw(0,r,-1),lE(n)||UT(t.originalText,W(n))?$:Z]))}return Y([`{`,J([t.bracketSpacing?Z:Q,...a,r.readonly?[EL(r.readonly,`readonly`),` `]:``,Y([`[`,J([Q,n(`key`),` in `,n(`constraint`),r.nameType?[` as `,n(`nameType`)]:``]),Q,`]`]),r.optional?EL(r.optional,`?`):``,r.typeAnnotation?`: `:``,n(`typeAnnotation`),t.semi?X(`;`):``]),t.bracketSpacing?Z:Q,`}`],{shouldBreak:i})}function OL(e,t,n){let{node:r}=e;return[Y([`match (`,J([Q,n(`argument`)]),Q,`)`]),` {`,r.cases.length>0?J([$,gk($,e.map(({node:e,isLast:r})=>[n(),!r&&dA(e,t)?$:``],`cases`))]):``,$,`}`]}function kL(e,t,n){let{node:r}=e,i=K(r,G.Dangling)?[` `,MA(e,t)]:[],a=r.type===`MatchStatementCase`?[` `,n(`body`)]:J([Z,n(`body`),`,`]);return[n(`pattern`),r.guard?Y([J([Z,`if (`,n(`guard`),`)`])]):``,Y([` =>`,i,a])]}function AL(e,t,n){let{node:r}=e;switch(r.type){case`MatchOrPattern`:return FL(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`)]:[`[`,J([Q,n(`property`)]),Q,`]`];return Y([n(`base`),e])}case`MatchBindingPattern`:return[r.kind,` `,n(`id`)];case`MatchObjectPattern`:case`MatchInstanceObjectPattern`:return jL(e,t,n);case`MatchInstancePattern`:return Y([n(`targetConstructor`),` `,n(`properties`)]);case`MatchArrayPattern`:{let t=e.map(n,`elements`);return r.rest&&t.push(n(`rest`)),Y([`[`,J([Q,gk([`,`,Z],t)]),r.rest?``:X(`,`),Q,`]`])}case`MatchObjectPatternProperty`:return r.shorthand?n(`pattern`):Y([n(`key`),`:`,J([Z,n(`pattern`)])]);case`MatchRestPattern`:{let e=[`...`];return r.argument&&e.push(n(`argument`)),e}}}function jL(e,t,n){let{node:r}=e,i=e.map(n,`properties`);return r.rest&&i.push(n(`rest`)),Y([`{`,J([Q,gk([`,`,Z],i)]),r.rest?``:X(`,`),Q,`}`])}var ML=H([`MatchWildcardPattern`,`MatchLiteralPattern`,`MatchUnaryPattern`,`MatchIdentifierPattern`]);function NL(e){let{patterns:t}=e;if(t.some(e=>K(e)))return!1;let n=t.find(e=>e.type===`MatchObjectPattern`);return n?t.every(e=>e===n||ML(e)):!1}function PL(e){return ML(e)||e.type===`MatchObjectPattern`?!0:e.type===`MatchOrPattern`&&NL(e)}function FL(e,t,n){let{node:r}=e,{parent:i}=e,a=i.type!==`MatchStatementCase`&&i.type!==`MatchExpressionCase`&&i.type!==`MatchArrayPattern`&&i.type!==`MatchObjectPatternProperty`&&!eO(t.originalText,r),o=PL(r),s=e.map(()=>{let r=n();return o||(r=ok(2,r)),IA(e,r,t)},`patterns`);if(o)return gk(` | `,s);let c=[X([`| `]),gk([Z,`| `],s)];return gO(e,t)?Y([J([X([Q]),c]),Q]):i.type===`MatchArrayPattern`&&i.elements.length>1?Y([J([X([`(`,Q]),c]),Q,X(`)`)]):Y(a?J(c):c)}function IL(e,t,n){let{node:r}=e,i=[HA(e),`opaque type `,n(`id`),n(`typeParameters`)];if(r.supertype&&i.push(`: `,n(`supertype`)),r.lowerBound||r.upperBound){let e=[];r.lowerBound&&e.push(J([Z,`super `,n(`lowerBound`)])),r.upperBound&&e.push(J([Z,`extends `,n(`upperBound`)])),i.push(Y(e))}return r.impltype&&i.push(` = `,n(`impltype`)),i.push(ZA(t)),i}function LL(e,t,n){let{node:r}=e;return[`...`,...r.type===`TupleTypeSpreadElement`&&r.label?[n(`label`),`: `]:[],n(`typeAnnotation`)]}function RL(e,t,n){let{node:r}=e;return[r.variance?n(`variance`):``,n(`label`),r.optional?`?`:``,`: `,n(`elementType`)]}function zL(e,t,n){let{node:r}=e;return[QP(e,t,n,[HA(e),`type `,n(`id`),n(`typeParameters`)],` =`,r.type===`TSTypeAliasDeclaration`?`typeAnnotation`:`right`),ZA(t)]}function BL(e,t,n){let{node:r}=e;return yw(r).length===1&&r.type.startsWith(`TS`)&&!r[n][0].constraint&&e.parent.type===`ArrowFunctionExpression`&&!(t.filepath&&/\.ts$/.test(t.filepath))}function VL(e,t,n,r){let{node:i}=e,a=i[r];if(!a)return``;if(!Array.isArray(a))return n(r);let o=TA(e.grandparent),s=e.match(e=>!(e[r].length===1&&rT(e[r][0])),void 0,(e,t)=>t===`typeAnnotation`,e=>e.type===`Identifier`,lF);if(a.length===0||!s&&(o||a.length===1&&(a[0].type===`NullableTypeAnnotation`||Bj(a[0])))&&!a.some(e=>{let n=bD(e,e=>e.leading||e.trailing);return n.length>0&&(n.some(e=>lE(e))||UT(t.originalText,W(hw(0,n,-1))))}))return[`<`,gk(`, `,e.map(n,r)),HL(e,t),`>`];let c=i.type===`TSTypeParameterInstantiation`?``:BL(e,t,r)?`,`:XA(t);return Y([`<`,J([Q,gk([`,`,Z],e.map(n,r))]),c,Q,`>`])}function HL(e,t){let{node:n}=e;if(!K(n,G.Dangling))return``;let r=!K(n,G.Line),i=MA(e,t,{indent:!r});return r?i:[i,$]}function UL(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(Hj(e,n,`bound`))),r.constraint){let e=Symbol(`constraint`);i.push(` extends`,Y(J(Z),{id:e}),xk,hk(n(`constraint`),{groupId:e}))}if(r.default){let e=Symbol(`default`);i.push(` =`,Y(J(Z),{id:e}),xk,hk(n(`default`),{groupId:e}))}return Y(i)}function WL(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 `,Hj(e,t)]:``]}function GL({node:e},t){return[`typeof `,t(e.type===`TSTypeQuery`?`exprName`:`argument`),t(`typeArguments`)]}function KL(e,t,n,r){let{node:i}=e;if(fA(i))return i.type.slice(0,-14).toLowerCase();switch(i.type){case`ComponentDeclaration`:case`DeclareComponent`:case`ComponentTypeAnnotation`:return lL(e,t,n);case`ComponentParameter`:return uL(e,t,n);case`ComponentTypeParameter`:return dL(e,t,n);case`HookDeclaration`:return Kj(e,t,n);case`DeclareHook`:return vL(e,t,n);case`HookTypeAnnotation`:return bL(e,t,n);case`DeclareFunction`:return[HA(e),`function `,n(`id`),n(`predicate`),ZA(t)];case`DeclareModule`:return[`declare module `,n(`id`),` `,n(`body`)];case`DeclareModuleExports`:return[`declare module.exports`,Hj(e,n),ZA(t)];case`DeclareNamespace`:return[`declare namespace `,n(`id`),` `,n(`body`)];case`DeclareVariable`:return Array.isArray(i.declarations)?iL(e,t,n):[HA(e),i.kind??`var`,` `,n(`id`),ZA(t)];case`DeclareExportDeclaration`:case`DeclareExportAllDeclaration`:return SI(e,t,n);case`DeclareOpaqueType`:case`OpaqueType`:return IL(e,t,n);case`DeclareTypeAlias`:case`TypeAlias`:return zL(e,t,n);case`IntersectionTypeAnnotation`:return CL(e,t,n);case`UnionTypeAnnotation`:return Rj(e,t,n,r);case`ConditionalTypeAnnotation`:return tL(e,t,n);case`InferTypeAnnotation`:return SL(e,t,n);case`FunctionTypeAnnotation`:return gL(e,t,n);case`TupleTypeAnnotation`:return sP(e,t,n);case`TupleTypeLabeledElement`:return RL(e,t,n);case`TupleTypeSpreadElement`:return LL(e,t,n);case`GenericTypeAnnotation`:return[n(`id`),VL(e,t,n,`typeParameters`)];case`IndexedAccessType`:case`OptionalIndexedAccessType`:return xL(e,t,n);case`TypeAnnotation`:return Wj(e,t,n);case`TypeParameter`:return UL(e,t,n);case`TypeofTypeAnnotation`:return GL(e,n);case`ExistsTypeAnnotation`:return`*`;case`ArrayTypeAnnotation`:return sL(n);case`DeclareEnum`:case`EnumDeclaration`:return hL(e,n);case`EnumBody`:return fL(e,t,n);case`EnumBooleanBody`:case`EnumNumberBody`:case`EnumBigIntBody`:case`EnumStringBody`:case`EnumSymbolBody`:return pL(e,t,n);case`EnumBooleanMember`:case`EnumNumberMember`:case`EnumBigIntMember`:case`EnumStringMember`:case`EnumDefaultedMember`:return mL(e,t,n);case`FunctionTypeParam`:{let t=i.name?n(`name`):e.parent.this===i?`this`:``;return[t,RA(e),t?`: `:``,n(`typeAnnotation`)]}case`DeclareClass`:case`DeclareInterface`:case`InterfaceDeclaration`:case`InterfaceTypeAnnotation`:case`RecordDeclaration`:return LF(e,t,n);case`ObjectTypeAnnotation`:case`RecordDeclarationBody`:return DF(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`),kF(e,t)];case`ObjectTypeMappedTypeProperty`:return TL(e,t,n);case`ObjectTypeIndexer`:return[i.static?`static `:``,i.variance?n(`variance`):``,`[`,n(`id`),i.id?`: `:``,n(`key`),`]: `,n(`value`),kF(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`):``,Mj(e,t,n),RA(e),ww(i)?``:`: `,n(`value`),kF(e,t)]}case`ObjectTypeInternalSlot`:return[i.static?`static `:``,`[[`,n(`id`),`]]`,RA(e),i.method?``:`: `,n(`value`),kF(e,t)];case`ObjectTypeSpreadProperty`:return II(e,n);case`QualifiedTypeofIdentifier`:case`QualifiedTypeIdentifier`:return[n(`qualification`),`.`,n(`id`)];case`NullLiteralTypeAnnotation`:return`null`;case`BooleanLiteralTypeAnnotation`:return String(i.value);case`StringLiteralTypeAnnotation`:return ZO(yj(zw(i),t));case`NumberLiteralTypeAnnotation`:return lj(zw(i));case`BigIntLiteralTypeAnnotation`:return fI(zw(i));case`TypeCastExpression`:return[`(`,n(`expression`),Hj(e,n),`)`];case`TypePredicate`:return WL(e,n);case`TypeOperator`:return[i.operator,` `,n(`typeAnnotation`)];case`TypeParameterDeclaration`:case`TypeParameterInstantiation`:return VL(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 cL(e,t,n);case`MatchExpression`:case`MatchStatement`:return OL(e,t,n);case`MatchExpressionCase`:case`MatchStatementCase`:return kL(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 AL(e,t,n);case`RecordExpression`:return[n(`recordConstructor`),n(`typeArguments`),` `,n(`properties`)];case`RecordExpressionProperties`:return vI(e,t,n);case`RecordDeclarationProperty`:case`RecordDeclarationStaticProperty`:{let r=i.type===`RecordDeclarationStaticProperty`,a=r?`value`:`defaultValue`;return[r?`static `:``,Mj(e,t,n),Hj(e,n),i[a]?[` = `,n(a)]:``]}}}function qL(e,t){let{node:n}=e,r=t.originalText.slice(U(n),W(n));return t.semi&&Fw(n)?r+=`;`:Qj(e,t)&&(r=`;${r}`),n.type===`ClassExpression`&&dw(n.decorators)?[J([Q,r]),Q]:r}var JL=e=>e===``||e===Z||e===$||e===Q;function YL(e,t,n){let{node:r}=e;if(r.type===`JSXElement`&&pR(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=>mR(e)?{type:`JSXText`,value:` `,raw:` `}:e);let o=r.children.some(aT),s=r.children.filter(e=>e.type===`JSXExpressionContainer`).length>1,c=r.type===`JSXElement`&&r.openingElement.attributes.length>1,l=WO(i)||o||c||s,u=e.parent.rootMarker===`mdx`,d=t.singleQuote?`{' '}`:`{" "}`,f=u?Z:X([d,Q],` `),p=XL(e,t,n,f,r.openingElement?.name?.name===`fbt`),m=r.children.some(e=>RN(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&&JL(hw(0,p,-1));)p.pop();for(;p.length>1&&JL(p[0])&&JL(p[1]);)p.shift(),p.shift();let h=[``];for(let[e,t]of p.entries()){if(t===f){if(e===1&&tk(p[e-1])){if(p.length===2){h.push([h.pop(),d]);continue}h.push([d,$],``);continue}if(e===p.length-1||p[e-1]===``&&p[e-2]===$){h.push([h.pop(),d]);continue}}e%2==0?h.push([h.pop(),t]):h.push(t,``),WO(t)&&(l=!0)}let g=m?pk(h):Y(h,{shouldBreak:!0});if(t.cursorNode?.type===`JSXText`&&r.children.includes(t.cursorNode)?g=[fk,g,fk]:t.nodeBeforeCursor?.type===`JSXText`&&r.children.includes(t.nodeBeforeCursor)?g=[fk,g]:t.nodeAfterCursor?.type===`JSXText`&&r.children.includes(t.nodeAfterCursor)&&(g=[g,fk]),u)return g;let _=Y([i,J([$,g]),$,a]);return l?_:mk([Y([i,...p,a]),_])}function XL(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=zw(e);if(RN(e)){let o=LN.split(n,!0);o[0]===``&&(o.shift(),/\n/.test(o[0])?c(QL(i,o[1],e,t)):c(r),o.shift());let l;if(hw(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(ZL(i,a,e,t)):/\n/.test(l)?c(QL(i,a,e,t)):c(r)}else/\n/.test(n)?n.match(/\n/g).length>1&&c($):c(r)}else if(s(n()),t&&RN(t)){let n=LN.trim(zw(t)),[r]=LN.split(n);c(ZL(i,r,e,t))}else c($)},`children`),o}function ZL(e,t,n,r){return e?``:n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?t.length===1?Q:$:Q}function QL(e,t,n,r){return e?$:t.length===1?n.type===`JSXElement`&&!n.closingElement||r?.type===`JSXElement`&&!r.closingElement?$:Q:$}var $L=H([`ArrayExpression`,`JSXAttribute`,`JSXElement`,`JSXExpressionContainer`,`JSXFragment`,`ExpressionStatement`,`NewExpression`,`CallExpression`,`OptionalCallExpression`,`ConditionalExpression`,`JsExpressionRoot`,`MatchExpressionCase`]);function eR(e,t,n){let{parent:r}=e;if($L(r))return t;let i=tR(e),a=gO(e,n);return Y([a?``:X(`(`),J([Q,t]),Q,a?``:X(`)`)],{shouldBreak:i})}function tR(e){return e.match(void 0,(e,t)=>t===`body`&&e.type===`ArrowFunctionExpression`,(e,t)=>t===`arguments`&&sT(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 nR(e,t,n){let{node:r}=e,i=[n(`name`)];if(r.value){let a;if(Ww(r.value)){let n=$T(0,$T(0,zw(r.value).slice(1,-1),`&apos;`,`'`),`&quot;`,`"`),i=mj(n,t.jsxSingleQuote);n=i===`"`?$T(0,n,`"`,`&quot;`):$T(0,n,`'`,`&apos;`),a=e.call(()=>IA(e,ZO(i+n+i),t),`value`)}else a=n(`value`);i.push(`=`,a)}return i}function rR(e,t,n){let{node:r}=e,i=(e,t)=>e.type===`JSXEmptyExpression`||!K(e)&&(eT(e)||tT(e)||e.type===`ArrowFunctionExpression`||e.type===`AwaitExpression`&&(i(e.argument,e)||e.argument.type===`JSXElement`)||sT(iO(e))||e.type===`FunctionExpression`||e.type===`TemplateLiteral`||e.type===`TaggedTemplateExpression`||e.type===`DoExpression`||aT(t)&&(e.type===`ConditionalExpression`||oT(e)));return i(r.expression,e.parent)?Y([`{`,n(`expression`),xk,`}`]):Y([`{`,J([Q,n(`expression`)]),Q,xk,`}`])}function iR(e,t,n){let{node:r}=e,i=K(r.name)||K(r.typeArguments);if(r.selfClosing&&r.attributes.length===0&&!i)return[`<`,n(`name`),n(`typeArguments`),` />`];if(r.attributes?.length===1&&Ww(r.attributes[0].value)&&!r.attributes[0].value.value.includes(`
811
+ `)&&!i&&!K(r.attributes[0]))return Y([`<`,n(`name`),n(`typeArguments`),` `,...e.map(n,`attributes`),r.selfClosing?` />`:`>`]);let a=r.attributes?.some(e=>Ww(e.value)&&e.value.value.includes(`
812
+ `)),o=t.singleAttributePerLine&&r.attributes.length>1?$:Z;return Y([`<`,n(`name`),n(`typeArguments`),J(e.map(({isFirst:e,previous:r})=>[e?o:dA(r,t)?[$,$]:o,n()],`attributes`)),...aR(r,t,i)],{shouldBreak:a})}function aR(e,t,n){return e.selfClosing?[Z,`/>`]:oR(e,t,n)?[`>`]:[Q,`>`]}function oR(e,t,n){let r=e.attributes.length>0&&K(hw(0,e.attributes,-1),G.Trailing);return e.attributes.length===0&&!n||(t.bracketSameLine||t.jsxBracketSameLine)&&(!n||e.attributes.length>0)&&!r}function sR(e,t,n){let{node:r}=e,i=[`</`],a=n(`name`);return K(r.name,G.Leading|G.Line)?i.push(J([$,a]),$):K(r.name,G.Leading|G.Block)?i.push(` `,a):i.push(a),i.push(`>`),i}function cR(e,t){let{node:n}=e,r=K(n),i=K(n,G.Line),a=n.type===`JSXOpeningFragment`;return[a?`<`:`</`,J([i?$:r&&!a?` `:``,MA(e,t)]),i?$:``,`>`]}function lR(e,t,n){return eR(e,IA(e,YL(e,t,n),t),t)}function uR(e,t){let{node:n}=e,r=K(n,G.Line);return[MA(e,t,{indent:r}),r?$:``]}function dR(e,t,n){let{node:r}=e;return[`{`,e.call(({node:r})=>{let i=[`...`,n()];return K(r)?[J([Q,IA(e,i,t)]),Q]:i},r.type===`JSXSpreadAttribute`?`argument`:`expression`),`}`]}function fR(e,t,n){let{node:r}=e;if(r.type.startsWith(`JSX`))switch(r.type){case`JSXAttribute`:return nR(e,t,n);case`JSXIdentifier`:return r.name;case`JSXNamespacedName`:return gk(`:`,[n(`namespace`),n(`name`)]);case`JSXMemberExpression`:return gk(`.`,[n(`object`),n(`property`)]);case`JSXSpreadAttribute`:case`JSXSpreadChild`:return dR(e,t,n);case`JSXExpressionContainer`:return rR(e,t,n);case`JSXFragment`:case`JSXElement`:return lR(e,t,n);case`JSXOpeningElement`:return iR(e,t,n);case`JSXClosingElement`:return sR(e,t,n);case`JSXOpeningFragment`:case`JSXClosingFragment`:return cR(e,t);case`JSXEmptyExpression`:return uR(e,t);case`JSXText`:throw Error(`JSXText should be handled by JSXElement`);default:throw new HN(r,`JSX`)}}function pR(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type===`JSXText`&&!RN(t)}function mR(e){return e.type===`JSXExpressionContainer`&&Ww(e.expression)&&e.expression.value===` `&&!K(e.expression)}function hR(e,t,n){let{node:r}=e,i=r.parameters.length>1?XA(t):``,a=Y([J([Q,gk([`, `,Q],e.map(n,`parameters`))]),i,Q]);return[e.key===`body`&&e.parent.type===`ClassBody`&&r.static?`static `:``,r.readonly?`readonly `:``,`[`,r.parameters?a:``,`]`,Hj(e,n),kF(e,t)]}function gR(e,t,n){let{node:r}=e;return[r.postfix?``:n,Hj(e,t),r.postfix?n:``]}function _R(e,t,n){let{node:r}=e,i=[],a=r.kind&&r.kind!==`method`?`${r.kind} `:``;i.push(GA(r),a,Mj(e,t,n),RA(e));let o=$A(e,t,n,!1,!0),s=Hj(e,n,`returnType`),c=nj(r,s);return i.push(c?Y(o):o),r.returnType&&i.push(Y(s)),[Y(i),kF(e,t)]}function vR(e,t,n){let{node:r}=e;return[HA(e),r.kind===`global`?``:`${r.kind} `,n(`id`),r.body?[` `,Y(n(`body`))]:ZA(t)]}function yR(e,t,n){let{node:r}=e,i=!(eT(r.expression)||tT(r.expression)),a=Y([`<`,J([Q,n(`typeAnnotation`)]),Q,`>`]),o=[X(`(`),J([Q,n(`expression`)]),Q,X(`)`)];return i?mk([[a,n(`expression`)],[a,Y(o,{shouldBreak:!0})],[a,n(`expression`)]]):Y([a,n(`expression`)])}function bR(e,t,n,r){let{node:i}=e;if(i.type.startsWith(`TS`)){if(hA(i))return i.type.slice(2,-7).toLowerCase();switch(i.type){case`TSThisType`:return`this`;case`TSTypeAssertion`:return yR(e,t,n);case`TSDeclareFunction`:return Kj(e,t,n);case`TSExportAssignment`:return[`export = `,n(`expression`),ZA(t)];case`TSModuleBlock`:return bF(e,t,n);case`TSInterfaceBody`:case`TSTypeLiteral`:return DF(e,t,n);case`TSTypeAliasDeclaration`:return zL(e,t,n);case`TSQualifiedName`:return[n(`left`),`.`,n(`right`)];case`TSAbstractMethodDefinition`:case`TSDeclareMethod`:return GF(e,t,n);case`TSAbstractAccessorProperty`:case`TSAbstractPropertyDefinition`:return KF(e,t,n);case`TSInterfaceHeritage`:case`TSClassImplements`:case`TSInstantiationExpression`:return[n(`expression`),n(`typeArguments`)];case`TSTemplateLiteralType`:return fM(e,t,n);case`TSNamedTupleMember`:return RL(e,t,n);case`TSRestType`:return LL(e,t,n);case`TSOptionalType`:return[n(`typeAnnotation`),`?`];case`TSInterfaceDeclaration`:return LF(e,t,n);case`TSTypeParameterDeclaration`:case`TSTypeParameterInstantiation`:return VL(e,t,n,`params`);case`TSTypeParameter`:return UL(e,t,n);case`TSAsExpression`:case`TSSatisfiesExpression`:return cL(e,t,n);case`TSArrayType`:return sL(n);case`TSPropertySignature`:return[i.readonly?`readonly `:``,Mj(e,t,n),RA(e),Hj(e,n),kF(e,t)];case`TSParameterProperty`:return[GA(i),i.static?`static `:``,i.override?`override `:``,i.readonly?`readonly `:``,n(`parameter`)];case`TSTypeQuery`:return GL(e,n);case`TSIndexSignature`:return hR(e,t,n);case`TSTypePredicate`:return WL(e,n);case`TSNonNullExpression`:return[n(`expression`),`!`];case`TSImportType`:return[qP(e,t,n),i.qualifier?[`.`,n(`qualifier`)]:``,VL(e,t,n,`typeArguments`)];case`TSLiteralType`:return n(`literal`);case`TSIndexedAccessType`:return xL(e,t,n);case`TSTypeOperator`:return[i.operator,` `,n(`typeAnnotation`)];case`TSMappedType`:return DL(e,t,n);case`TSMethodSignature`:return _R(e,t,n);case`TSNamespaceExportDeclaration`:return[`export as namespace `,n(`id`),ZA(t)];case`TSEnumDeclaration`:return hL(e,n);case`TSEnumBody`:return vI(e,t,n);case`TSEnumMember`:return mL(e,t,n);case`TSImportEqualsDeclaration`:return[`import `,EI(i,!1),n(`id`),` = `,n(`moduleReference`),ZA(t)];case`TSExternalModuleReference`:return qP(e,t,n);case`TSModuleDeclaration`:return vR(e,t,n);case`TSConditionalType`:return tL(e,t,n);case`TSInferType`:return SL(e,t,n);case`TSIntersectionType`:return CL(e,t,n);case`TSUnionType`:return Rj(e,t,n,r);case`TSFunctionType`:case`TSCallSignatureDeclaration`:case`TSConstructorType`:case`TSConstructSignatureDeclaration`:return gL(e,t,n);case`TSTupleType`:return sP(e,t,n);case`TSTypeReference`:return[n(`typeName`),VL(e,t,n,`typeArguments`)];case`TSTypeAnnotation`:return Wj(e,t,n);case`TSEmptyBodyFunctionExpression`:return Jj(e,t,n);case`TSJSDocAllType`:return`*`;case`TSJSDocUnknownType`:return`?`;case`TSJSDocNullableType`:return gR(e,n,`?`);case`TSJSDocNonNullableType`:return gR(e,n,`!`);default:throw new HN(i,`TypeScript`)}}}function xR(e,t,n,r){for(let i of[XN,fR,KL,bR,oL]){let a=i(e,t,n,r);if(a!==void 0)return a}}var SR=H([`ClassMethod`,`ClassPrivateMethod`,`ClassProperty`,`ClassAccessorProperty`,`AccessorProperty`,`TSAbstractAccessorProperty`,`PropertyDefinition`,`TSAbstractPropertyDefinition`,`ClassPrivateProperty`,`MethodDefinition`,`TSAbstractMethodDefinition`,`TSDeclareMethod`]);function CR(e,t,n,r){e.isRoot&&t.__onHtmlBindingRoot?.(e.node,t);let{node:i}=e,a=VN(e)?qL(e,t):xR(e,t,n,r);if(!a)return``;if(SR(i))return a;a=wR(e,t,a);let o=i.type!==`ClassExpression`&&dw(i.decorators)?rP(e,t,n):``,s=gO(e,t);return!o&&!s?a:ek(a,e=>[s?`(`:``,o?Y([o,e]):e,s?`)`:``])}function wR(e,t,n){let{node:r}=e;return(K(r,G.Leading)||K(r,G.Trailing))&&SD(e)?[J([Q,IA(e,n,t)]),Q]:n}var TR={features:{experimental_avoidAstMutation:!0,experimental_locForRangeFormat:{locStart:U,locEnd:Ew}},massageAstNode:uN,canAttachComment:xT,handleComments:gD,isGap:vD,willPrintOwnComments:sM,embed:$M,insertPragma:kN,printComment:PN,printPrettierIgnored:CR,print:CR,getVisitorKeys:YD,isBlockComment:cE,hasPrettierIgnore:VN},ER=[{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}],DR={};ow(DR,{estree:()=>TR,"estree-json":()=>PR});var OR=JD({JsonRoot:[`node`],ArrayExpression:[`elements`],ObjectExpression:[`properties`],ObjectProperty:[`key`,`value`],UnaryExpression:[`argument`],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:[`quasis`],TemplateElement:[]});function kR(e){return e.extra.raw}var AR=/* @__PURE__ */ new Set([`start`,`end`,`loc`,`comments`,`leadingComments`,`trailingComments`,`innerComments`,`errors`,`range`,`tokens`]);function jR(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=kR(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`});else if(n===`TemplateLiteral`){let t=e.quasis[0].value.cooked;return{type:`StringLiteral`,value:t,extra:{rawValue:t}}}}jR.ignoredProperties=AR;function MR(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[`[`,J([$,gk([`,`,$],t)]),$,`]`]}case`ObjectExpression`:return r.properties.length===0?`{}`:[`{`,J([$,gk([`,`,$],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 yj(kR(r),t);case`NumericLiteral`:{let t=kR(r);return NR(e)&&String(Number(t))===t?`"${t}"`:t}case`Identifier`:return NR(e)?JSON.stringify(r.name):r.name;case`TemplateLiteral`:return n([`quasis`,0]);case`TemplateElement`:return JSON.stringify(r.value.cooked);default:throw new HN(r,`JSON`)}}function NR(e){return e.key===`key`&&e.parent.type===`ObjectProperty`}var PR={massageAstNode:jR,print:MR,getVisitorKeys:OR},FR={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.`}},IR=`JavaScript`,LR={arrowParens:{category:IR,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:FR.bracketSameLine,objectWrap:FR.objectWrap,bracketSpacing:FR.bracketSpacing,jsxBracketSameLine:{category:IR,type:`boolean`,description:`Put > on the last line instead of at a new line.`,deprecated:`2.4.0`},semi:{category:IR,type:`boolean`,default:!0,description:`Print semicolons.`,oppositeDescription:`Do not print semicolons, except at the beginning of lines which may need them.`},experimentalOperatorPosition:{category:IR,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:IR,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:FR.singleQuote,jsxSingleQuote:{category:IR,type:`boolean`,default:!1,description:`Use single quotes in JSX.`},quoteProps:{category:IR,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:IR,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:FR.singleAttributePerLine},RR={...lw,...DR},zR=[...cw,...ER],BR=Object.defineProperty,VR=(e,t)=>{for(var n in t)BR(e,n,{get:t[n],enumerable:!0})};VR({},{__debug:()=>FG,check:()=>NG,doc:()=>qW,format:()=>MG,formatWithCursor:()=>jG,getSupportInfo:()=>PG,util:()=>QW,version:()=>ZW});var HR=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),UR=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},WR=HR(`replaceAll`,function(){if(typeof this==`string`)return UR}),GR=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);else 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;else{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}},KR=new class extends GR{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function qR(e,t,n){return KR.diff(e,t,n)}var JR=()=>{},YR=`cr`,XR=`crlf`,ZR=`lf`,QR=`\r`,$R=`\r
813
+ `,ez=`
814
+ `,tz=ez;function nz(e){let t=e.indexOf(QR);return t===-1?ZR:e.charAt(t+1)===ez?XR:YR}function rz(e){return e===YR?QR:e===XR?$R:tz}var iz=/* @__PURE__ */ new Map([[ez,/\n/g],[QR,/\r/g],[$R,/\r\n/g]]);function az(e,t){let n=iz.get(t);return e.match(n)?.length??0}var oz=/\r\n?/g;function sz(e){return WR(0,e,oz,ez)}var cz=Symbol.for(`comments`);function lz(e){return this[e<0?this.length+e:e]}var uz=HR(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return lz}),dz=`string`,fz=`array`,pz=`cursor`,mz=`indent`,hz=`align`,gz=`trim`,_z=`group`,vz=`fill`,yz=`if-break`,bz=`indent-if-break`,xz=`line-suffix`,Sz=`line-suffix-boundary`,Cz=`line`,wz=`label`,Tz=`break-parent`,Ez=/* @__PURE__ */ new Set([pz,mz,hz,gz,_z,vz,yz,bz,xz,Sz,Cz,wz,Tz]);function Dz(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
815
+ `);)t--;return t<e.length?e.slice(0,t):e}function Oz(e,t,n){if(!e.has(t)){let r=n(t);e.set(t,r)}return e.get(t)}function kz(e){if(typeof e==`string`)return dz;if(Array.isArray(e))return fz;if(!e)return;let{type:t}=e;if(Ez.has(t))return t}var Az=kz,jz=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function Mz(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
816
+ Expected it to be 'string' or 'object'.`;if(Az(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=jz([...Ez].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
817
+ Expected it to be ${r}.`}var Nz=class extends Error{name=`InvalidDocError`;constructor(e){super(Mz(e)),this.doc=e}},Pz={};function Fz(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Pz){n(i.pop());continue}n&&i.push(e,Pz);let a=Az(e);if(!a)throw new Nz(e);if(t?.(e)!==!1)switch(a){case fz:case vz:{let t=a===fz?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case yz:i.push(e.flatContents,e.breakContents);break;case _z: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 hz:case mz:case bz:case wz:case xz:i.push(e.contents);break;case dz:case pz:case gz:case Sz:case Cz:case Tz:break;default:throw new Nz(e)}}}var Iz=Fz;function Lz(e,t){if(typeof e==`string`)return t(e);let n=/* @__PURE__ */ new Map;return r(e);function r(e){return Oz(n,e,i)}function i(e){switch(Az(e)){case fz:return t(e.map(r));case vz:return t({...e,parts:e.parts.map(r)});case yz:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case _z:{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 hz:case mz:case bz:case wz:case xz:return t({...e,contents:r(e.contents)});case dz:case pz:case gz:case Sz:case Cz:case Tz:return t(e);default:throw new Nz(e)}}}function Rz(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 Iz(e,a),r}function zz(e){if(e.type===_z&&e.break||e.type===Cz&&e.hard||e.type===Tz)return!0}function Bz(e){return Rz(e,zz,!1)}function Vz(e){if(e.length>0){let t=uz(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function Hz(e){let t=/* @__PURE__ */ new Set,n=[];function r(e){if(e.type===Tz&&Vz(n),e.type===_z){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===_z&&n.pop().break&&Vz(n)}Iz(e,r,i,!0)}function Uz(e){return e.type===Cz&&!e.hard?e.soft?``:` `:e.type===yz?e.flatContents:e}function Wz(e){return Lz(e,Uz)}function Gz(e){for(e=[...e];e.length>=2&&uz(0,e,-2).type===Cz&&uz(0,e,-1).type===Tz;)e.length-=2;if(e.length>0){let t=Kz(uz(0,e,-1));e[e.length-1]=t}return e}function Kz(e){switch(Az(e)){case mz:case bz:case _z:case xz:case wz:{let t=Kz(e.contents);return{...e,contents:t}}case yz:return{...e,breakContents:Kz(e.breakContents),flatContents:Kz(e.flatContents)};case vz:return{...e,parts:Gz(e.parts)};case fz:return Gz(e);case dz:return Dz(e);case hz:case pz:case gz:case Sz:case Cz:case Tz:break;default:throw new Nz(e)}return e}function qz(e){return Kz(Yz(e))}function Jz(e){switch(Az(e)){case vz:{let{parts:t}=e;if(t.every(e=>e===``))return``;if(t.length===1)return t[0];break}case _z:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===_z&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case hz:case mz:case bz:case xz:if(!e.contents)return``;break;case yz:if(!e.flatContents&&!e.breakContents)return``;break;case fz:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof uz(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 dz:case pz:case gz:case Sz:case Cz:case wz:case Tz:break;default:throw new Nz(e)}return e}function Yz(e){return Lz(e,e=>Jz(e))}function Xz(e,t=wB){return Lz(e,e=>typeof e==`string`?_B(t,e.split(`
818
+ `)):e)}function Zz(e){if(e.type===Cz)return!0}function Qz(e){return Rz(e,Zz,!1)}function $z(e,t){return e.type===wz?{...e,contents:t(e.contents)}:t(e)}var eB=JR,tB=JR,nB=JR,rB=JR;function iB(e){return eB(e),{type:mz,contents:e}}function aB(e,t){return rB(e),eB(t),{type:hz,contents:t,n:e}}function oB(e){return aB(-1/0,e)}function sB(e){return aB({type:`root`},e)}function cB(e){return aB(-1,e)}function lB(e,t,n){eB(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=iB(r);r=aB(t%n,r),r=aB(-1/0,r)}return r}var uB={type:Tz},dB={type:pz};function fB(e){return nB(e),{type:vz,parts:e}}function pB(e,t={}){return eB(e),tB(t.expandedStates,!0),{type:_z,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function mB(e,t){return pB(e[0],{...t,expandedStates:e})}function hB(e,t=``,n={}){return eB(e),t!==``&&eB(t),{type:yz,breakContents:e,flatContents:t,groupId:n.groupId}}function gB(e,t){return eB(e),{type:bz,contents:e,groupId:t.groupId,negate:t.negate}}function _B(e,t){eB(e),tB(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function vB(e,t){return eB(t),e?{type:wz,label:e,contents:t}:t}var yB={type:Cz},bB={type:Cz,soft:!0},xB={type:Cz,hard:!0},SB=[xB,uB],CB={type:Cz,hard:!0,literal:!0},wB=[CB,uB];function TB(e){return eB(e),{type:xz,contents:e}}var EB={type:Sz},DB={type:gz};function OB(e){if(!e)return``;if(Array.isArray(e)){let t=[];for(let n of e)if(Array.isArray(n))t.push(...OB(n));else{let e=OB(n);e!==``&&t.push(e)}return t}return e.type===yz?{...e,breakContents:OB(e.breakContents),flatContents:OB(e.flatContents)}:e.type===_z?{...e,contents:OB(e.contents),expandedStates:e.expandedStates?.map(OB)}:e.type===vz?{type:`fill`,parts:e.parts.map(OB)}:e.contents?{...e,contents:OB(e.contents)}:e}function kB(e){let t=Object.create(null),n=/* @__PURE__ */ new Set;return r(OB(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===Cz){let r=n?.[t+1]?.type===Tz;return e.literal?r?`literalline`:`literallineWithoutBreakParent`:e.hard?r?`hardline`:`hardlineWithoutBreakParent`:e.soft?`softline`:`line`}if(e.type===Tz)return n?.[t-1]?.type===Cz&&n[t-1].hard?void 0:`breakParent`;if(e.type===gz)return`trim`;if(e.type===mz)return`indent(`+r(e.contents)+`)`;if(e.type===hz)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===yz)return`ifBreak(`+r(e.breakContents)+(e.flatContents?`, `+r(e.flatContents):``)+(e.groupId?(e.flatContents?``:`, ""`)+`, { groupId: ${i(e.groupId)} }`:``)+`)`;if(e.type===bz){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===_z){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===vz)return`fill([${e.parts.map(e=>r(e)).join(`, `)}])`;if(e.type===xz)return`lineSuffix(`+r(e.contents)+`)`;if(e.type===Sz)return`lineSuffixBoundary`;if(e.type===wz)return`label(${JSON.stringify(e.label)}, ${r(e.contents)})`;if(e.type===pz)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 AB=()=>/[#*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,jB=12288,MB=65510,NB=[12288,12288,65281,65376,65504,65510],PB=4352,FB=262141,IB=[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],LB=(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},RB=19968,[zB,BB]=VB(IB);function VB(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(RB>=i&&RB<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var HB=e=>e<jB||e>MB?!1:LB(NB,e),UB=e=>e>=zB&&e<=BB?!0:e<PB||e>FB?!1:LB(IB,e),WB=/^(?:[\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])$/,GB=e=>WB.test(e),KB=/[^\x20-\x7F]/;function qB(e){if(!e)return 0;if(!KB.test(e))return e.length;let t=0;e=e.replace(AB(),e=>(t+=GB(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+=HB(e)||UB(e)?2:1)}return t}var JB=qB,YB={type:0},XB={type:1},ZB={value:``,length:0,queue:[],get root(){return ZB}};function QB(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 $B(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?XB:{type:2,width:t}:{type:3,string:t},QB(e,r,n)}function eV(e,t){return QB(e,YB,t)}function tV(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 nV(e){let t=tV(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var rV=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}=nV(this.#t);return this.#t=e,this.#a(),t}finish(){return this.#a(),{text:this.#e.join(``),positions:this.#r}}},iV=Symbol(`MODE_BREAK`),aV=Symbol(`MODE_FLAT`),oV=Symbol(`DOC_FILL_PRINTED_LENGTH`);function sV(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=Az(u);switch(d){case dz:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=JB(u));break;case fz:case vz:{let t=d===fz?u:u.parts,n=u[oV]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case mz:case hz:case bz:case wz:c.push({mode:e,doc:u.contents});break;case gz:{let{text:e,count:t}=nV(l);l=e,n+=t;break}case _z:{if(a&&u.break)return!1;let t=u.break?iV:e,n=u.expandedStates&&t===iV?uz(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case yz:{let t=(u.groupId?i[u.groupId]||aV:e)===iV?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case Cz:if(e===iV||u.hard)return!0;u.soft||(s=!0);break;case xz:r=!0;break;case Sz:if(r)return!1}}return!1}function cV(e,t){let n=Object.create(null),r=t.printWidth,i=rz(t.endOfLine),a=0,o=[{indent:ZB,mode:iV,doc:e}],s=!1,c=[],l=new rV;for(Hz(e);o.length>0;){let{indent:e,mode:u,doc:d}=o.pop();switch(Az(d)){case dz:{let e=i===`
819
+ `?d:WR(0,d,`
820
+ `,i);e&&(l.write(e),o.length>0&&(a+=JB(e)));break}case fz:for(let t=d.length-1;t>=0;t--)o.push({indent:e,mode:u,doc:d[t]});break;case pz:l.markPosition();break;case mz:o.push({indent:eV(e,t),mode:u,doc:d.contents});break;case hz:o.push({indent:$B(e,d.n,t),mode:u,doc:d.contents});break;case gz:a-=l.trim();break;case _z:{let t=(function(){if(u===aV&&!s)return{indent:e,mode:d.break?iV:aV,doc:d.contents};s=!1;let t=r-a,i=c.length>0,l={indent:e,mode:aV,doc:d.contents};if(!d.break&&sV(l,o,t,i,n))return l;if(!d.expandedStates)return{indent:e,mode:iV,doc:d.contents};if(!d.break)for(let r=1;r<d.expandedStates.length-1;r++){let a={indent:e,mode:aV,doc:d.expandedStates[r]};if(sV(a,o,t,i,n))return a}return{indent:e,mode:iV,doc:uz(0,d.expandedStates,-1)}})();o.push(t),d.id&&(n[d.id]=t.mode);break}case vz:{let t=r-a,i=d[oV]??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:aV,doc:f},h={indent:e,mode:iV,doc:f},g=sV(m,[],t,c.length>0,n,!0);if(l===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:aV,doc:p},v={indent:e,mode:iV,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,[oV]:i+2}},x=sV({indent:e,mode:aV,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 yz:case bz:{let t=d.groupId?n[d.groupId]:u;if(t===iV){let t=d.type===yz?d.breakContents:d.negate?d.contents:iB(d.contents);t&&o.push({indent:e,mode:u,doc:t})}if(t===aV){let t=d.type===yz?d.flatContents:d.negate?iB(d.contents):d.contents;t&&o.push({indent:e,mode:u,doc:t})}break}case xz:c.push({indent:e,mode:u,doc:d.contents});break;case Sz:c.length>0&&o.push({indent:e,mode:u,doc:xB});break;case Cz:switch(u){case aV:if(!d.hard){d.soft||(l.write(` `),a+=1);break}s=!0;case iV: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 wz:o.push({indent:e,mode:u,doc:d.contents});break;case Tz:break;default:throw new Nz(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 lV(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 uV=lV,dV=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return uz(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:uz(0,this.stack,-2)}get node(){return uz(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=uz(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?uz(0,e,-2):null}getValue(){return uz(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=uz(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=uz(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 fV(e){return Array.isArray(e)&&e.length>0}var pV=fV;function mV(e){return typeof e==`object`&&!!e}var hV=mV;function gV(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 _V=gV(/\s/),vV=gV(` `),yV=gV(`,; `),bV=gV(/[^\n\r]/),xV=e=>e===`
821
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function SV(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===`
822
+ `)return t-2;if(xV(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
823
+ `)return t+2;if(xV(i))return t+1}return t}var CV=SV;function wV(e,t,n={}){let r=vV(e,n.backwards?t-1:t,n);return r!==CV(e,r,n)}var TV=wV;function*EV(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>hV(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*DV(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of EV(r,t))yield e,n.push(e)}}function OV(e,t){return EV(e,t).next().done}function kV(e,t,n){let{filter:r}=n;if(!r)return[];let i,a=(n.getChildren?.(e,n)??[...EV(e,{getVisitorKeys:n.getVisitorKeys})]).flatMap(a=>(i??=[e,...t],r(a,i)?[a]:AV(a,i,n))),{locStart:o,locEnd:s}=n;return a.sort((e,t)=>o(e)-o(t)||s(e)-s(t)),a}function AV(e,t,n){return Oz(n.cache,e,e=>kV(e,t,n))}var jV=AV;function MV(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 NV(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=MV(e)}function PV(e,t){t.leading=!0,t.trailing=!1,NV(e,t)}function FV(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),NV(e,t)}function IV(e,t){t.leading=!1,t.trailing=!0,NV(e,t)}var LV=/* @__PURE__ */ new WeakMap;function RV(e,t,n,r,i=[]){let{locStart:a,locEnd:o}=n,s=a(t),c=o(t),l=jV(e,i,{cache:LV,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 RV(r,t,n,r,[r,...i]);if(h<=s)u=r,f=e+1;else if(c<=m)d=r,p=e;else throw Error(`Comment location overlaps with node location`)}if(r?.type===`TemplateLiteral`){let{quasis:e}=r,i=GV(e,t,n);u&&GV(e,u,n)!==i&&(u=null),d&&GV(e,d,n)!==i&&(d=null)}return{enclosingNode:r,precedingNode:u,followingNode:d}}var zV=()=>!1;function BV(e,t){let{comments:n}=e;if(delete e.comments,!pV(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:a={}},originalText:o}=t,{ownLine:s=zV,endOfLine:c=zV,remaining:l=zV}=a,u=n.map((r,i)=>({...RV(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,_=HV(p,m,u,e)?`ownLine`:UV(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?PV(f,n):a?IV(a,n):FV(o||h,n));else if(_===`endOfLine`)c(...v)||(a?IV(a,n):f?PV(f,n):FV(o||h,n));else if(!l(...v)){if(a&&f){let e=r.length;e>0&&r[e-1].followingNode!==f&&WV(r,m),r.push(t)}else a?IV(a,n):f?PV(f,n):FV(o||h,n)}}if(WV(r,t),d)for(let e of n)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}var VV=e=>!/[\S\n\u2028\u2029]/.test(e);function HV(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||!VV(e.slice(s(r),c)))break;c=o(r)}return TV(e,c,{backwards:!0})}function UV(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||!VV(e.slice(c,o(r))))break;c=s(r)}return TV(e,c)}function WV(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?IV(r,n):PV(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 GV(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 KV(e,t){let n=t-1;n=vV(e,n,{backwards:!0}),n=CV(e,n,{backwards:!0}),n=vV(e,n,{backwards:!0});let r=CV(e,n,{backwards:!0});return n!==r}var qV=KV,JV=()=>!0;function YV(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function XV(e,t){let n=e.node,r=[YV(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=` `;TV(a,s(n))&&(e=TV(a,o(n),{backwards:!0})?SB:yB),r.push(e)}else r.push(SB);let c=CV(a,vV(a,s(n)));return c!==!1&&TV(a,c)&&r.push(SB),r}function ZV(e,t,n){let r=e.node,i=YV(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||TV(o,s(r),{backwards:!0})?{doc:TB([SB,qV(o,s(r))?SB:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[TB([` `,i]),uB],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function QV(e,t,n){let r=t[Symbol.for(`printedComments`)],i=n?.filter??JV,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)?XV(e,t):``,`comments`).filter(Boolean)}function $V(e,t,n){let r=e.node?.comments,i=new Set(r?.filter(e=>e.trailing)),a=t[Symbol.for(`printedComments`)],o=n?.filter??JV,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=ZV(e,t,l),s.has(n)&&c.push(l.doc))},`comments`),c}function eH(e,t,n,r){let i=QV(e,n,r),a=$V(e,n,r);return i||a?$z(t,e=>[i,e,a]):t}function tH(e){let{[cz]: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 nH=()=>JR,rH=class extends Error{name=`ConfigError`},iH=class extends Error{name=`UndefinedParserError`},aH=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),oH={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
824
+ (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).
825
+ 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.
826
+ 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 sH({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(e=>e.languages??[]),r=[];for(let i of lH(Object.assign({},...e.map(({options:e})=>e),oH)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(e=>!e.deprecated)),i.name===`parser`&&(i.choices=[...i.choices,...cH(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*cH(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&&aH(e.parsers,t)),a=e.name;i?.name&&(a+=` (plugin: ${i.name})`),yield{value:t,description:a}}}}function lH(e){let t=[];for(let[n,r]of Object.entries(e)){let e={name:n,...r};Array.isArray(e.default)&&(e.default=uz(0,e.default,-1).value),t.push(e)}return t}var uH=Array.prototype.toReversed??function(){return[...this].reverse()},dH=HR(`toReversed`,function(){if(Array.isArray(this))return uH});function fH(){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 pH=fH();function mH(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 hH(e){return e=mH(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function gH(e){e=mH(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 _H(e){return pH?gH(e):hH(e)}var vH=e=>String(e).split(/[/\\]/).pop(),yH=e=>String(e).startsWith(`file:`);function bH(e,t){if(!t)return;let n=vH(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function xH(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 SH=void 0;function CH(e,t){if(t){if(yH(t))try{t=_H(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function wH(e,t){let n=dH(0,e.plugins).flatMap(e=>e.languages??[]);return(xH(n,t.language)??bH(n,t.physicalFile)??bH(n,t.file)??CH(n,t.physicalFile)??CH(n,t.file)??SH?.(n,t.physicalFile))?.parsers[0]}var TH=wH,EH={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=>EH.value(e)).join(`, `)}]`;let t=Object.keys(e);return t.length===0?`{}`:`{ ${t.map(t=>`${EH.key(t)}: ${EH.value(e[t])}`).join(`, `)} }`},pair:({key:e,value:t})=>EH.value({[e]:t})},DH=new Proxy(String,{get:()=>DH}),OH=DH,kH=(e,t,{descriptor:n})=>{let r=[`${OH.yellow(typeof e==`string`?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${OH.blue(typeof t==`string`?n.key(t):n.pair(t))}`),r.join(`; `)+`.`},AH=Symbol.for(`vnopts.VALUE_NOT_EXIST`),jH=Symbol.for(`vnopts.VALUE_UNCHANGED`),MH=` `.repeat(2),NH=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),a=[];return r&&a.push(PH(e,t,r,n.descriptor)),i&&a.push([PH(e,t,i.title,n.descriptor)].concat(i.values.map(e=>FH(e,n.loggerPrintWidth))).join(`
827
+ `)),IH(a,n.loggerPrintWidth)};function PH(e,t,n,r){return[`Invalid ${OH.red(r.key(e))} value.`,`Expected ${OH.blue(n)},`,`but received ${t===AH?OH.gray(`nothing`):OH.red(r.value(t))}.`].join(` `)}function FH({text:e,list:t},n){let r=[];return e&&r.push(`- ${OH.blue(e)}`),t&&r.push([`- ${OH.blue(t.title)}:`].concat(t.values.map(e=>FH(e,n-MH.length).replace(/^|\n/g,`$&${MH}`))).join(`
828
+ `)),IH(r,n)}function IH(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,a]=e.map(e=>e.split(`
829
+ `,1)[0].length);return i>t&&i>a?r:n}var LH=[],RH=[];function zH(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;)RH[f]=e.charCodeAt(s+f),LH[f]=++f;for(;p<o;){for(c=t.charCodeAt(s+p),u=p++,l=p,f=0;f<a;f++)d=c===RH[f]?u:u+1,u=LH[f],l=LH[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++)LH[f]<e&&(e=LH[f]);if(e>r)return r}}return LH.length=a,RH.length=a,r!==void 0&&l>r?r:l}function BH(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?zH(e,n):zH(e,n,{maxDistance:c});if(r!==void 0&&l>r)continue;let u=l;if(c!==void 0&&l===c&&c===r&&(u=zH(e,n)),u<o&&(o=u,a=n,o===0))break}if(!(r!==void 0&&o>r))return a}var VH=(e,t,{descriptor:n,logger:r,schemas:i})=>{let a=[`Ignored unknown option ${OH.yellow(n.pair({key:e,value:t}))}.`],o=BH(e,Object.keys(i),{maxDistance:3});o&&a.push(`Did you mean ${OH.blue(n.key(o))}?`),r.warn(a.join(` `))},HH=[`default`,`expected`,`validate`,`deprecated`,`forward`,`redirect`,`overlap`,`preprocess`,`postprocess`];function UH(e,t){let n=new e(t),r=Object.create(n);for(let e of HH)e in t&&(r[e]=GH(t[e],n,WH.prototype[e].length));return r}var WH=class{static create(e){return UH(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 jH}};function GH(e,t,n){return typeof e==`function`?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var KH=class extends WH{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}},qH=class extends WH{expected(){return`anything`}validate(){return!0}},JH=class extends WH{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(YH))}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(YH))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function YH({from:e,to:t}){return{from:[e],to:t}}var XH=class extends WH{expected(){return`true or false`}validate(e){return typeof e==`boolean`}};function ZH(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 QH(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 $H(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function eU(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function tU(e){return e===Math.floor(e)}function nU(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 rU(e){return(...t)=>{let n=e(...t);return typeof n==`string`?Error(n):n}}function iU(e){return e===void 0?{}:e}function aU(e){if(typeof e==`string`)return{text:e};let{text:t,list:n}=e;return dU((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(aU)}}:{text:t}}function oU(e,t){return e===!0?!0:e===!1?{value:t}:e}function sU(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:`value`in e?[e]:e.length!==0&&e}function cU(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 lU(e,t){return e===void 0?[]:Array.isArray(e)?e.map(e=>cU(e,t)):[cU(e,t)]}function uU(e,t){let n=lU(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 dU(e,t){if(!e)throw Error(t)}var fU=class extends WH{constructor(e){super(e),this._choices=QH(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(nU).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}},pU=class extends WH{expected(){return`a number`}validate(e,t){return typeof e==`number`}},mU=class extends pU{expected(){return`an integer`}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&tU(e)}},hU=class extends WH{expected(){return`a string`}validate(e){return typeof e==`string`}},gU=EH,_U=VH,vU=NH,yU=kH,bU=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=gU,unknown:a=_U,invalid:o=vU,deprecated:s=yU,missing:c=()=>!1,required:l=()=>!1,preprocess:u=e=>e,postprocess:d=()=>jH}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:ZH(e,`name`),normalizeDefaultResult:iU,normalizeExpectedResult:aU,normalizeDeprecatedResult:sU,normalizeForwardResult:lU,normalizeRedirectResult:uU,normalizeValidateResult:oU},this._unknownHandler=a,this._invalidHandler=rU(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=$H()}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=iU(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!==jH&&(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=sU(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))}}}};lU(r.forward(a,this._utils),a).forEach(o);let c=uU(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,AH,this._utils)}_partitionOptionKeys(e){let[t,n]=eU(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=oU(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!==jH){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})}}}}},xU;function SU(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=EH;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 VH(e,t,{...n,schemas:i})},c=new bU(CU(t,{isCLI:r,FlagSchema:a}),{logger:n,unknown:s,descriptor:o}),l=n!==!1;l&&xU&&(c._hasDeprecationWarned=xU);let u=c.normalize(e);return l&&(xU=c._hasDeprecationWarned),u}function CU(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(qH.create({name:`_`}));for(let i of e)r.push(wU(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(KH.create({name:i.alias,sourceName:i.name}));return r}function wU(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,a={name:i},o,s={};switch(e.type){case`int`:o=mU,t&&(a.preprocess=Number);break;case`string`:o=hU;break;case`choice`:o=fU,a.choices=e.choices.map(t=>t?.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case`boolean`:o=XH;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=hU;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)?uz(0,t,-1):t),r)}return e.array?JH.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...s,valueSchema:o.create(a)}):o.create({...a,...s})}var TU=SU,EU=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}},DU=HR(`findLast`,function(){if(Array.isArray(this))return EU}),OU=Symbol.for(`PRETTIER_IS_FRONT_MATTER`),kU=[];function AU(e){return!!e?.[OU]}var jU=AU,MU=/* @__PURE__ */ new Set([`yaml`,`toml`]),NU=({node:e})=>jU(e)&&MU.has(e.language);async function PU(e,t,n,r){let{node:i}=n,{language:a}=i;if(!MU.has(a))return;let o=i.value.trim(),s;if(o){let t=a===`yaml`?a:TH(r,{language:a});if(!t)return;s=o?await e(o,{parser:t}):``}else s=o;return sB([i.startDelimiter,i.explicitLanguage??``,SB,s,s?SB:``,i.endDelimiter])}function FU(e,t){return NU({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var IU=FU;function LU({node:e}){return e.raw}var RU=LU,zU=/* @__PURE__ */ new Set([`tokens`,`comments`,`parent`,`enclosingNode`,`precedingNode`,`followingNode`]),BU=e=>Object.keys(e).filter(e=>!zU.has(e));function VU(e,t){let n=e?t=>e(t,zU):BU;return t?new Proxy(n,{apply:(e,t,n)=>jU(n[0])?kU:Reflect.apply(e,t,n)}):n}var HU=VU;function UU(e,t){if(!t)throw Error(`parserName is required.`);let n=DU(0,e,e=>e.parsers&&aH(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 rH(r)}function WU(e,t){if(!t)throw Error(`astFormat is required.`);let n=DU(0,e,e=>e.printers&&aH(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 rH(r)}function GU({plugins:e,parser:t}){return KU(UU(e,t),t)}function KU(e,t){let n=e.parsers[t];return typeof n==`function`?n():n}async function qU(e,t){let n=e.printers[t];return XU(typeof n==`function`?await n():n)}function JU(e){let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:a,...o}=e;t=$U(t);let s=t.experimental_frontMatterSupport;n=HU(n,s.massageAstNode||s.embed||s.print);let c=i;i&&s.massageAstNode&&(c=new Proxy(i,{apply(e,t,n){return IU(...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?HU(r.getVisitorKeys,s.massageAstNode||s.embed):n,e):Reflect.get(t,i,a)},apply:(e,t,n)=>s.embed&&NU(...n)?PU:Reflect.apply(e,t,n)})}let u=a;return s.print&&(u=new Proxy(a,{apply(e,t,n){let[r]=n;return jU(r.node)?RU(r):Reflect.apply(e,t,n)}})),{features:t,getVisitorKeys:n,embed:l,massageAstNode:c,print:u,...o}}var YU=/* @__PURE__ */ new WeakMap;function XU(e){return Oz(YU,e,JU)}var ZU=Object.fromEntries([`clean`,`embed`,`print`].map(e=>[e,!1]));function QU(e){return{...ZU,...e}}function $U(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:QU(e?.experimental_frontMatterSupport)}}var eW={astFormat:`estree`,printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function tW(e,t={}){let n={...e};if(!n.parser){if(!n.filepath)throw new iH(`No parser and no file path given, couldn't infer a parser.`);if(n.parser=TH(n,{physicalFile:n.filepath}),!n.parser)throw new iH(`No parser could be inferred for file "${n.filepath}".`)}let r=sH({plugins:e.plugins,showDeprecated:!0}).options,i={...eW,...Object.fromEntries(r.filter(e=>e.default!==void 0).map(e=>[e.name,e.default]))},a=UU(n.plugins,n.parser),o=await KU(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let s=a.printers?.[o.astFormat]?a:WU(n.plugins,o.astFormat),c=await qU(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`),TU(n,r,{passThrough:Object.keys(eW),...t})}var nW=tW,rW=/\r\n|[\n\r\u2028\u2029]/;function iW(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 aW(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}=iW(t,e.split(rW),n,o),u=t.start&&typeof t.start.column==`number`,d=String(c+o).length,f=a(e).split(rW,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=[`
830
+ `,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(`
831
+ `);return n.message&&!u&&(f=`${` `.repeat(d+1)}${n.message}
832
+ ${f}`),i.reset(f)}function oW(e,t,n={}){return aW(e,t,n)}async function sW(e,t){let n=await GU(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){cW(t,e)}return{text:r,ast:i}}function cW(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=oW(t,{start:r,end:i},{highlightCode:!0});e.message+=`
833
+ `+a,e.codeFrame=a}throw e}var lW=sW;async function uW(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 dW(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 dW(e,t,n,r){let i=await nW({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await lW(e,i);return qz(await r(a,i))}function fW(e,t,n,r){let{originalText:i,[cz]: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 pW=fW;async function mW(e,t){({ast:e}=await gW(e,t));let n=/* @__PURE__ */ new Map,r=new dV(e),i=nH(t),a=/* @__PURE__ */ new Map;await uW(r,s,t,mW,a);let o=await hW(r,t,s,void 0,a);if(tH(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[dB,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,dB]}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=hV(o)&&e===void 0;if(c&&n.has(o))return n.get(o);let l=hW(r,t,s,e,a);return c&&n.set(o,l),l}}function hW(e,t,n,r,i){let{node:a}=e,{printer:o}=t,s;switch(s=o.hasPrettierIgnore?.(e)?pW(e,t,n,r):i.has(a)?i.get(a):o.print(e,t,n,r),a){case t.cursorNode:s=$z(s,e=>[dB,e,dB]);break;case t.nodeBeforeCursor:s=$z(s,e=>[e,dB]);break;case t.nodeAfterCursor:s=$z(s,e=>[dB,e])}return o.printComment&&pV(a.comments)&&!o.willPrintOwnComments?.(e,t)&&(s=eH(e,s,t)),s}async function gW(e,t){let n=e.comments??[];t[cz]=n,t[Symbol.for(`printedComments`)]=/* @__PURE__ */ new Set,BV(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function _W(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 DV(e,{getVisitorKeys:a,filter:o}))c.push(t),s=t;if(OV(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 EV(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 vW=_W;function yW(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(!hV(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)!aH(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 bW=yW,xW=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},SW=HR(`findLastIndex`,function(){if(Array.isArray(this))return xW});function CW(e,t){return t=new Set(t),e.find(e=>OW.has(e.type)&&t.has(e))}function wW(e){let t=SW(0,e,e=>e.type!==`Program`&&e.type!==`File`);return t===-1?e:e.slice(0,t+1)}function TW(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 wW(s))if(n(e)>=c)o=e;else break;let l=r(o);for(let e of wW(a)){if(r(e)<=l)i=e;else break;if(i===o)break}return[i,o]}function EW(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=jV(e,d,{cache:LV,locStart:s,locEnd:c,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes});for(let e of f){let i=EW(e,t,n,r,d,a,o);if(i)return i}if(r(e,i[0]))return d}function DW(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 OW=/* @__PURE__ */ new Set([`JsonRoot`,`ObjectExpression`,`ArrayExpression`,`StringLiteral`,`NumericLiteral`,`BooleanLiteral`,`NullLiteral`,`UnaryExpression`,`TemplateLiteral`]),kW=/* @__PURE__ */ new Set([`OperationDefinition`,`FragmentDefinition`,`VariableDefinition`,`TypeExtensionDefinition`,`ObjectTypeDefinition`,`FieldDefinition`,`DirectiveDefinition`,`EnumTypeDefinition`,`EnumValueDefinition`,`InputValueDefinition`,`InputObjectTypeDefinition`,`SchemaDefinition`,`OperationTypeDefinition`,`InterfaceTypeDefinition`,`UnionTypeDefinition`,`ScalarTypeDefinition`]);function AW(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 DW(t.type,n?.type);case`json`:case`json5`:case`jsonc`:case`json-stringify`:return OW.has(t.type);case`graphql`:return kW.has(t.kind);case`vue`:return t.tag!==`root`}return!1}function jW(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=EW(n,r,t,(e,n)=>AW(t,e,n),[],`rangeStart`,s);if(!c)return;let l=o?c:EW(n,i,t,e=>AW(t,e),[],`rangeEnd`,s);if(!l)return;let u,d;if(n.type===`JsonRoot`){let e=CW(c,l);u=e,d=e}else[u,d]=TW(c,l,t);let{locStart:f,locEnd:p}=s;return[Math.min(f(u),f(d)),Math.max(p(u),p(d))]}var MW=``,NW=Symbol(`cursor`);async function PW(e,t,n=0){if(!e||e.trim().length===0)return{formatted:``,cursorOffset:-1,comments:[]};let{ast:r,text:i}=await lW(e,t);t.cursorOffset>=0&&(t={...t,...vW(r,t)});let a=await mW(r,t,n);n>0&&(a=lB([SB,a],n,t.tabWidth));let o=cV(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+rz(t.endOfLine)}let s=t[cz];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,NW);let u=qR(l,a.split(``)),d=r;for(let e of u)if(e.removed){if(e.value.includes(NW))break}else d+=e.count;return{formatted:o.formatted,cursorOffset:d,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function FW(e,t){let{ast:n,text:r}=await lW(e,t),[i,a]=jW(r,t,n)??[0,0],o=r.slice(i,a),s=Math.min(i,r.lastIndexOf(`
834
+ `,i)+1),c=r.slice(s,i).match(/^\s*/)[0],l=uV(c,t.tabWidth),u=await PW(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=rz(t.endOfLine);f>=0&&e===`\r
835
+ `&&(f+=az(p.slice(0,f),`
836
+ `)),p=WR(0,p,`
837
+ `,e)}return{formatted:p,cursorOffset:f,comments:u.comments}}function IW(e,t,n){return typeof t!=`number`||Number.isNaN(t)||t<0||t>e.length?n:t}function LW(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=IW(e,n,-1),r=IW(e,r,0),i=IW(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function RW(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a}=LW(e,t),o=e.charAt(0)===MW;if(o&&(e=e.slice(1),n--,r--,i--),a===`auto`&&(a=nz(e)),e.includes(`\r`)){let t=t=>az(e.slice(0,Math.max(t,0)),`\r
838
+ `);n-=t(n),r-=t(r),i-=t(i),e=sz(e)}return{hasBOM:o,text:e,options:LW(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a})}}async function zW(e,t){let n=await GU(t);return!n.hasPragma||n.hasPragma(e)}async function BW(e,t){return(await GU(t)).hasIgnorePragma?.(e)}async function VW(e,t){let{hasBOM:n,text:r,options:i}=RW(e,await nW(t));if(i.rangeStart>=i.rangeEnd&&r!==``||i.requirePragma&&!await zW(r,i)||i.checkIgnorePragma&&await BW(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd<r.length?a=await FW(r,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await zW(r,i)&&(r=i.printer.insertPragma(r)),a=await PW(r,i)),n&&(a.formatted=MW+a.formatted,a.cursorOffset>=0&&a.cursorOffset++),a}async function HW(e,t,n){let{text:r,options:i}=RW(e,await nW(t)),a=await lW(r,i);return n&&(n.preprocessForPrint&&(a.ast=await gW(a.ast,i)),n.massage&&(a.ast=bW(a.ast,i))),a}async function UW(e,t){return t=await nW(t),cV(await mW(e,t),t)}async function WW(e,t){let{formatted:n}=await VW(kB(e),{...t,parser:`__js_expression`});return n}async function GW(e,t){t=await nW(t);let{ast:n}=await lW(e,t);return t.cursorOffset>=0&&(t={...t,...vW(n,t)}),mW(n,t)}async function KW(e,t){return cV(e,await nW(t))}var qW={};VR(qW,{builders:()=>JW,printer:()=>YW,utils:()=>XW});var JW={join:_B,line:yB,softline:bB,hardline:SB,literalline:wB,group:pB,conditionalGroup:mB,fill:fB,lineSuffix:TB,lineSuffixBoundary:EB,cursor:dB,breakParent:uB,ifBreak:hB,trim:DB,indent:iB,indentIfBreak:gB,align:aB,addAlignmentToDoc:lB,markAsRoot:sB,dedentToRoot:oB,dedent:cB,hardlineWithoutBreakParent:xB,literallineWithoutBreakParent:CB,label:vB,concat:e=>e},YW={printDocToString:cV},XW={willBreak:Bz,traverseDoc:Iz,findInDoc:Rz,mapDoc:Lz,removeLines:Wz,stripTrailingHardline:qz,replaceEndOfLine:Xz,canBreak:Qz},ZW=`3.9.10`,QW={};VR(QW,{addDanglingComment:()=>FV,addLeadingComment:()=>PV,addTrailingComment:()=>IV,getAlignmentSize:()=>uV,getIndentSize:()=>cG,getMaxContinuousCount:()=>dG,getNextNonSpaceNonCommentCharacter:()=>pG,getNextNonSpaceNonCommentCharacterIndex:()=>wG,getPreferredQuote:()=>vG,getStringWidth:()=>JB,hasNewline:()=>TV,hasNewlineInRange:()=>bG,hasSpaces:()=>SG,isNextLineEmpty:()=>kG,isNextLineEmptyAfterIndex:()=>oG,isPreviousLineEmpty:()=>EG,makeString:()=>OG,skip:()=>gV,skipEverythingButNewLine:()=>bV,skipInlineComment:()=>eG,skipNewline:()=>CV,skipSpaces:()=>vV,skipToLineEnd:()=>yV,skipTrailingComment:()=>nG,skipWhitespace:()=>_V});function $W(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 eG=$W;function tG(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?bV(e,t):t}var nG=tG;function rG(e,t){let n=null,r=t;for(;r!==n;)n=r,r=vV(e,r),r=eG(e,r),r=nG(e,r),r=CV(e,r);return r}var iG=rG;function aG(e,t){let n=null,r=t;for(;r!==n;)n=r,r=yV(e,r),r=eG(e,r),r=vV(e,r);return r=nG(e,r),r=CV(e,r),r!==!1&&TV(e,r)}var oG=aG;function sG(e,t){let n=e.lastIndexOf(`
839
+ `);return n===-1?0:uV(e.slice(n+1).match(/^[\t ]*/)[0],t)}var cG=sG;function lG(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function uG(e,t){let n=e.matchAll(RegExp(`(?:${lG(t)})+`,`g`));return n.reduce||(n=[...n]),n.reduce((e,[t])=>Math.max(e,t.length),0)/t.length}var dG=uG;function fG(e,t){let n=iG(e,t);return n===!1?``:e.charAt(n)}var pG=fG,mG=Object.freeze({character:`'`,codePoint:39}),hG=Object.freeze({character:`"`,codePoint:34}),gG=Object.freeze({preferred:mG,alternate:hG}),_G=Object.freeze({preferred:hG,alternate:mG});function vG(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?gG:_G,{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 yG(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
840
+ `)return!0;return!1}var bG=yG;function xG(e,t,n={}){return vV(e,n.backwards?t-1:t,n)!==t}var SG=xG;function CG(e,t,n){return iG(e,n(t))}function wG(e,t){return arguments.length===2||typeof t==`number`?iG(e,t):CG(...arguments)}function TG(e,t,n){return qV(e,n(t))}function EG(e,t){return arguments.length===2||typeof t==`number`?qV(e,t):TG(...arguments)}function DG(e,t,n){return oG(e,n(t))}function OG(e,t,n){let r=t===`"`?`'`:`"`;return t+WR(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 kG(e,t){return arguments.length===2||typeof t==`number`?oG(e,t):DG(...arguments)}function AG(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 jG=AG(VW);async function MG(e,t){let{formatted:n}=await jG(e,{...t,cursorOffset:-1});return n}async function NG(e,t){return await MG(e,t)===e}var PG=AG(sH,0),FG={parse:AG(HW),formatAST:AG(UW),formatDoc:AG(WW),printToDoc:AG(GW),printDocToString:AG(KW)};Mt();var IG=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 MG(n,{parser:`yaml`,plugins:[zh,iw],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?[]:[xe.replace(P.create(N.create(0,0),e.positionAt(n.length)),r)]}catch{return[]}}};Mt();var LG=class{constructor(e){this.telemetry=e}async findLinks(e){try{let t=Xm.getYamlDocument(e),n=[];for(let r of t.documents)n.push(RG(e,r));let r=await Promise.all(n);return[].concat(...r)}catch(e){this.telemetry?.sendError(`yaml.documentLink.error`,e)}}};function RG(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=BG(t,i);if(a){let t=e.positionAt(a.offset);n.push({target:`${e.uri}#${t.line+1},${t.character+1}`,range:zG(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function zG(e,t){return P.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function BG(e,t){let n=HG(t);return n?VG(n,e.root):null}function VG(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?VG(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?VG(e,i):null}return null}function HG(e){return e===`#`?[]:e[0]!==`#`||e[1]!==`/`?null:e.substring(2).split(/\//).map(UG)}function UG(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}Mt();function WG(e,t){if(!e)return;let n=[],r=Xm.getYamlDocument(e);for(let t of r.documents)r.documents.length>1&&n.push(GG(e,t.root)),t.visit(t=>{if(t.type===`object`&&t.parent?.type===`array`&&n.push(GG(e,t)),t.type===`property`&&t.valueNode)switch(t.valueNode.type){case`array`:case`object`:n.push(GG(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(GG(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 GG(e,t){let n=e.positionAt(t.offset),r=e.positionAt(t.offset+t.length),i=e.getText(P.create(n,r)),a=i.length-i.trimRight().length;return a>0&&(r=e.positionAt(t.offset+t.length-a)),he.create(n.line,r.line,n.character,r.character)}var KG=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(`
841
+ `);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(`
842
+ `)}i.pop();for(let e=1;e<i.length;){if(/^[ \t]+$/.test(i[e])){if(i[e-1]===`
843
+ `||i[e-1]===``){i.splice(e-1,1);continue}return null}e++}let o=`>`;i[i.length-1]!==`
844
+ `&&i[i.length-1]!==``?o+=`-`:(i[i.length-2]===`
845
+ `||i[i.length-2]===``)&&i[i.length-3]!==`
846
+ `&&i[i.length-3]!==``?i.splice(i.length-2,2):o+=`+`,/ /.test(t.charAt(0))&&(o+=`${r.length}`);let s=i.flatMap(t=>t===`
847
+ `||t===``?[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
848
+ `}]:[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
849
+ `},{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 np(c)}writeLiteralBlockScalar(e){if(e.type!==`QUOTE_DOUBLE`&&e.type!==`QUOTE_SINGLE`)return null;let t=e.value;if(t.indexOf(`
850
+ `)<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(`
851
+ `),a=`|`;i[i.length-1]!==`
852
+ `&&i[i.length-1]!==``?a+=`-`:i[i.length-2]!==`
853
+ `&&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:`
854
+ `}]:[{type:`newline`,indent:0,offset:e.srcToken.offset,source:`
855
+ `},{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 np(s)}},qG=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)cp(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:`
856
+ `}),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:`
857
+ `},{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 ou.SKIP});return np(i)}};Mt();var JG=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=st.create(g(`Jump to schema location ({0})`,Wn.basename(e)),be.create(`JumpToSchema`,zr.JUMP_TO_SCHEMA,e));r.diagnostics=t.get(e),n.push(r)}return n}getTabToSpaceConverting(e,t){let n=[],r=new th(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=P.create(a.range.start,N.create(a.range.end.line,a.range.start.character+o))),n.push(st.create(g(`Convert Tab to Spaces`),XG(t.uri,[xe.replace(c,s)]),it.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(xe.replace(P.create(t,r-i,t,r),a)),i=0,a=``);break}o===` `&&i!==0?(e.push(xe.replace(P.create(t,r-i,t,r),a)),i=0,a=``):o===` `&&(a+=this.indentation,i++)}i!==0&&e.push(xe.replace(P.create(t,0,t,r.getLineLength(t)),a))}e.length>0&&n.push(st.create(g(`Convert all Tabs to Spaces`),XG(t.uri,e),it.QuickFix))}return n}getUnusedAnchorsDelete(e,t){let n=[],r=new th(t);for(let i of e)if(i.message.startsWith(`Unused anchor`)&&i.source===`YAML`){let e=P.create(i.range.start,i.range.end),a=r.getText(e),o=Gr(r.getLineContent(e.end.line),e.end.character);e.end.character=o;let s=st.create(g(`Delete unused anchor: {0}`,a),XG(t.uri,[xe.del(e)]),it.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(st.create(g(`Convert to boolean`),XG(t.uri,[xe.replace(r.range,i)]),it.QuickFix))}}return n}getConvertToBlockStyleActions(e,t){let n=[];for(let r of e)if(r.code===`flowMap`||r.code===`flowSeq`){let e=YG(t,r);if(Zl(e.internalNode)||$l(e.internalNode)){let i=Zl(e.internalNode)?`map`:`sequence`,a=new qG(this.indentation);n.push(st.create(g(`Convert to block style {0}`,i),XG(t.uri,[xe.replace(r.range,a.write(e))]),it.QuickFix))}}return n}getConvertStringToBlockStyleActions(e,t){let n=Xm.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=[];ou(e.internalDocument,(e,t)=>{z(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(`
858
+ `)>=0||t.value.length>this.lineWidth)&&n.push(t)});for(let e of n){let n=P.create(t.positionAt(e.range[0]),t.positionAt(e.range[1])),r=new KG(this.indentation,this.lineWidth),i=r.writeFoldedBlockScalar(e);i!==null&&a.push(st.create(g(`Convert string to folded block string`),XG(t.uri,[xe.replace(n,i)]),it.Refactor));let o=r.writeLiteralBlockScalar(e);o!==null&&a.push(st.create(g(`Convert string to literal block string`),XG(t.uri,[xe.replace(n,o)]),it.Refactor))}}return a}getKeyOrderActions(e,t){let n=[];for(let r of e)if(r?.code===`mapKeyOrder`){let e=YG(t,r);for(;e&&e.type!==`object`;)e=e.parent;if(e&&Zl(e.internalNode)){let r=structuredClone(e.internalNode),i=e=>{if(e){if(dp(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&&dp(e.key)&&dp(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:`
859
+ `}),!c&&s>-1&&o&&o.splice(s,1)}}let a=P.create(t.positionAt(e.offset),t.positionAt(e.offset+e.length));n.push(st.create(g(`Fix key order for this map`),XG(t.uri,[xe.replace(a,np(r.srcToken))]),it.QuickFix))}}return n}getPossibleQuickFixValues(e){if(typeof e.data==`object`){if(e.code===Hp.EnumValueMismatch&&`values`in e.data&&Array.isArray(e.data.values))return e.data.values;if(e.code===Hp.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`?mh(i):String(i);n.push(st.create(e,XG(t.uri,[xe.replace(r.range,e)]),it.QuickFix))}}return n}};function YG(e,t){let n=Xm.getYamlDocument(e),r=e.offsetAt(t.range.start),i=e.offsetAt(t.range.end),a=Zp(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 XG(e,t){let n={};return n[e]=t,{changes:n}}Mt();function ZG(e,t){let{position:n}=t,r=new th(e);if(t.ch===`
860
+ `){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(`
861
+ `,``);return a.trim().length!==0||a.length===i?void 0:a.length<i?[xe.insert(n,` `.repeat(i-a.length))]:[xe.del(P.create(N.create(n.line,0),N.create(n.line,a.length-i)))]}if(e.trimEnd().endsWith(`|`))return[xe.insert(n,` `.repeat(t.options.tabSize))];if(e.includes(` - `)&&!e.includes(`: `))return[xe.insert(n,`- `)];if(e.includes(` - `)&&e.includes(`: `))return[xe.insert(n,` `)]}}Mt();var QG=class{constructor(e,t){this.schemaService=e,this.telemetry=t}async getCodeLens(e){let t=[];try{let n=Xm.getYamlDocument(e);for(let[r,i]of n.documents.entries()){i.currentDocIndex=r;let n=await this.schemaService.getSchemaForResource(e.uri,i);if(!n?.schema)continue;let a=Nh(n.schema),o=i.root?.offset??i.internalDocument?.range?.[0]??0,s=e.positionAt(o);i.root?.length===0&&s.character>0&&(s={line:s.line+1,character:0});let c=P.create(s,s);for(let e of a){let n=ct.create(c);n.command={title:qp(e[1],e[0]),command:zr.JUMP_TO_SCHEMA,arguments:[e[0]]},t.push(n)}}}catch(e){this.telemetry?.sendError(`yaml.codeLens.error`,e)}return t}resolveCodeLens(e){return e}},$G=class{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}};function eK(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);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)):d%u===0&&(i.spacesDiff=d/u)}function tK(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 $G;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++,eK(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 nK(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];typeof e[c]==`object`?(Array.isArray(e[c])||(l=rK(e[c],a)),s+=nK(l,t,n,r,i+=1,a)):s+=`
862
+ `+o+`- `+n(e[c])}return s}{let a=Object.keys(e);if(a.length===0)return``;let s=i===0&&r.newLineFirst||i>0?`
863
+ `:``,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?``:`
864
+ `;if(i===0&&c&&!r.indentFirstObject){let a=nK(e[u],p,n,r,i+1,0);s+=m+t+u+f+a}else{let t=nK(e[u],p,n,r,i+1,0);s+=m+o+u+f+t}c=!1}return s}}return n(e)}function rK(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}Mt();const iK=ze.Class;var aK=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=Ke.create([],!1);if(!this.completionEnabled)return i;let a=this.yamlDocument.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0),o=new th(e);if(this.configuredIndentation)this.indentation=this.configuredIndentation;else{let e=tK(o,2,!0);this.indentation=e.insertSpaces?` `.repeat(e.tabSize):` `}Jr(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=Zp(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){_=P.create(t,N.create(t.line,p.length));let e=p.trim().length===0,n=p.match(/^\s*(-)\s*$/);if(u&&z(u)&&!e&&!n){let e=p.substring(0,t.character),n=e.match(/^[\s-]*([^:]+)?$/)||e.match(/:[ \t]((?!:[ \t]).*)$/);n?.[1]&&(_=P.create(N.create(t.line,t.character-n[1].length),N.create(t.line,p.length)))}}else if(u&&z(u)&&u.value===`null`){let t=e.positionAt(u.range[0]);t.character+=1;let n=e.positionAt(u.range[2]);n.character+=1,_=P.create(t,n)}else if(u&&z(u)&&u.value){let t=e.positionAt(u.range[0]);_=P.create(t,e.positionAt(u.range[1]))}else if(u&&z(u)&&u.value===null&&f===`-`)_=P.create(t,t),this.arrayPrefixIndentation=` `;else{let n=s-f.length;n>0&&c[n-1]===`"`&&n--,_=P.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=Wp(t),r=t.markdownDescription||t.description,a=i.items.find(e=>e.parent?.schema===t&&e.kind===iK);a&&a.parent.insertTexts.includes(e.insertText)||(a?a.parent.insertTexts.push(e.insertText):(a={...e,label:n,documentation:r,sortText:`_`+n,kind:iK},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(Rn(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=xe.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=xe.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(`
865
+ `)&&(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&&!ch(p)){let e={kind:ze.Text,label:g(`Inline schema`),insertText:`# yaml-language-server: $schema=`,insertTextFormat:Be.PlainText};i.items.push(e)}if(ch(p)||Gm(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:ze.Constant,label:e.name??e.uri,detail:e.description,insertText:e.uri,insertTextFormat:Be.PlainText,insertTextMode:Ue.asIs};i.items.push(t)}),i}if(!n||n.errors.length)return i;let m=null;if(!u){if(!l.internalDocument.contents||z(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(z(u)){if(u.value){if(Ql(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($l(l.internalDocument.contents)){let t=Wm(l.internalDocument.contents,n);typeof t==`number`&&(l.internalDocument.set(t,e),l.updateFromInternalDocument())}else t&&(Zl(t)||$l(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($l(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(Ql(n)){if(n.key===u)u=n;else if(tu(n.key)&&n.key.range){let r=l.getParent(n);if(d&&r&&Zl(r)&&Um(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&&(Zl(r)||$l(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($l(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(Zl(u)&&!d&&p.trim().length===0&&$l(n)){let e=o.getLineContent(t.line+1);(o.getLineCount()===t.line+1||e.trim().length===0)&&(u=n)}}else if(z(u)){let e=this.createTempObjNode(f,u,l);l.internalDocument.contents=e,l.updateFromInternalDocument(),m=e.items[0],u=e}else if(Zl(u))for(let e of u.items)tu(e.value)&&e.value.range&&e.value.range[0]===s+1&&(u=e.value);else if($l(u)&&p.charAt(t.character-1)!==`-`){let e=this.createTempObjNode(f,u,l);e.items=[],l.updateFromInternalDocument();for(let t of u.items)Zl(t)&&t.items.forEach(t=>{e.items.push(t)});u=e}}}let b=o.getLineContent(_.start.line).trim().length===0&&h&&(z(h)&&h.value===null||$l(h));if(u&&Zl(u)){let e=u.items;for(let t of e)(!m||m!==t)&&z(t.key)&&(v[t.key.value+``]=Ge.create(`__`));this.addPropertyCompletions(n,l,u,h,``,y,o,_,r,b),!n&&f.length>0&&c.charAt(s-f.length-1)!==`"`&&y.add({kind:ze.Property,label:f,insertText:this.getInsertTextForProperty(f,null,``),insertTextFormat:Be.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(`
866
+ `),a=e=>e.startsWith(`
867
+ `),o=e=>{let t=e.indexOf(`
868
+ `);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:Le.Markdown,value:[...a,"```yaml",n+i,"```"].join(`
869
+ `)},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&&$l(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=>z(e.key)&&e.key.range&&e.key.value===c&&z(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=z(r)&&r.value===null||Zl(r)&&r.items.length===0,b=e.schema.required?.length>0;(!this.parentSkeletonSelectedFirst||!v||!b)&&a.add({kind:ze.Property,label:c,insertText:h,insertTextFormat:Be.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:Be.Snippet,documentation:this.fromMarkup(u.markdownDescription)||u.description||``,parent:{schema:e.schema,indent:t}})}}}}if(g&&$l(g)&&Jp(e.schema)&&this.addSchemaValueCompletions(e.schema,i,a,{},l),e.schema.type===`object`&&e.schema.propertyNames&&e.schema.additionalProperties!==!1){let t=lm(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:ze.Property,label:t,insertText:`${t}: `,insertTextFormat:Be.PlainText,documentation:e});else{let n=t.title||`property`;a.add({kind:ze.Property,label:n,insertText:`\${1:${n}}: `,insertTextFormat:Be.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&&z(n)&&(n=t.getParent(n)),!n)this.addSchemaValueCompletions(e.schema,``,a,o,!1);else{if(Ql(n)){let e=n.value;if(e&&e.range&&r>e.range[0]+e.range[2])return;l=z(n.key)?n.key.value+``:null,n=t.getParent(n)}if(n&&(l!==null||$l(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}),$l(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`||Yp(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=Wp(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:Be.Snippet})}getInsertTextForProperty(e,t,n,r=this.indentation,i=!1){let a=this.getInsertTextForValue(e,``,`string`),o=a+`:`,s=t&&i&&In(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;In(e)&&(c=this.getInsertTextForSnippetValue(e,``,{newLineFirst:!0,indentFirstObject:!1,shouldIndentWithTab:!1},[],1),!c.startsWith(` `)&&!c.startsWith(`
870
+ `)&&(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),In(t.const)&&(c||=(c=this.getInsertTextForGuessedValue(t.const,``,e),c=this.evaluateTab1Symbol(c),` `+c),l++),In(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=mh(e)),i+=`${n}${a}: \${${r++}:${e}}\n`);break}case`array`:{let e=this.getInsertTextForArray(o.items,t,r++,n),s=e.insertText.split(`
871
+ `),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(`
872
+ `)}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++}:${mh(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`)),In(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(mh(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=mh(String(e),this.isSingleQuote)),this.getInsertTextForPlainText(e+t)}getInsertTemplateForValue(e,t,n,r){if(Array.isArray(e)){let r=`
873
+ `;for(let i of e)r+=`${t}- \${${n.index++}:${i}}\n`;return r}if(typeof e==`object`){let i=`
874
+ `;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&&!Yp(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)||In(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(In(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:Be.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:Be.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(In(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:Be.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:Be.Snippet,documentation:o})}}getLabelForValue(e){return e===null?`null`:Array.isArray(e)?JSON.stringify(e):typeof e==`string`?mh(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(In(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+`[
875
+ `,n=n+`
876
+ `+r+`]`,r+=this.indentation,o=`array`;l=e+r+a.bodyText.split(`
877
+ `).join(`
878
+ `+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:Be.Snippet,filterText:u})}}getInsertTextForSnippetValue(e,t,n,r,i){return nK(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:Be.Snippet,documentation:``})}addNullValueCompletion(e,t){t.add({kind:this.getSuggestionKind(`null`),label:`null`,insertText:`null`+e,insertTextFormat:Be.Snippet,documentation:``})}getLabelForSnippetValue(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,`$1`)}getCustomTagValueCompletions(e){for(let t of this.customTags??[]){let n=km(t);n&&this.addCustomTagValueCompletion(e,` `,n.tag)}}addCustomTagValueCompletion(e,t,n){e.add({kind:this.getSuggestionKind(`string`),label:n,insertText:n+t,insertTextFormat:Be.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 ze.Value;switch(e){case`string`:return ze.Value;case`object`:return ze.Module;case`property`:return ze.Property;default:return ze.Value}}getCurrentWord(e,t){let n=t-1,r=e.getText();for(;n>=0&&`
879
+ \r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:Le.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(Le.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(tu(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}},oK=class{constructor(e,t,n){this.schemaService=e,this.yamlSettings=t,this.connection=n,this.connection?.onRequest(wr.getSchema,e=>this.getSchemas(e)),this.connection?.onRequest(wr.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=Xm.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}};Mt();var sK=class{constructor(e){this.telemetry=e}getDefinition(e,t){try{let n=Xm.getYamlDocument(e),r=e.offsetAt(t.position),i=Zp(r,n);if(i){let[t]=i.getNodeFromPosition(r,new th(e));if(t&&Yl(t)){let n=t.resolve(i.internalDocument);if(n&&n.range){let t=P.create(e.positionAt(n.range[0]),e.positionAt(n.range[2])),r=P.create(e.positionAt(n.range[0]),e.positionAt(n.range[1]));return[ue.create(e.uri,t,r)]}}}}catch(e){this.telemetry?.sendError(`yaml.definition.error`,e)}}};Mt();function cK(e,t){let n=Xm.getYamlDocument(e);return t.map(e=>{let t=r(e),n;for(let e of t)n=dt.create(e,n);return n??dt.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)===`
880
+ `&&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=lK(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 lK(e){return e.endsWith(`\r
881
+ `)?e.substring(0,e.length-2):e.endsWith(`
882
+ `)?e.substring(0,e.length-1):e}Mt();var uK=on(),dK=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 uK.ResponseError(uK.ErrorCodes.InvalidParams,`Anchor name cannot contain '${a}'`);let o=[];return o.push(xe.replace(this.getNameRange(e,r),i)),ou(n.yamlDoc.internalDocument,(t,r)=>{Yl(r)&&r.srcToken&&r.resolve(n.yamlDoc.internalDocument)===n.anchorNode&&o.push(xe.replace(this.getNameRange(e,r.srcToken),i))}),{changes:{[e.uri]:o}}}catch(e){if(e instanceof uK.ResponseError)throw e;return this.telemetry?.sendError(`yaml.rename.error`,e),null}}findTarget(e,t){let n=Xm.getYamlDocument(e),r=e.offsetAt(t),i=Zp(r,n);if(!i)return null;let[a]=i.getNodeFromPosition(r,new th(e));if(!a)return this.findByToken(i,r);if(Yl(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((eu(a)||z(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 ou(e.internalDocument,(r,i)=>{if(Yl(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},ou.BREAK}if((eu(i)||z(i))&&i.anchor){let r=this.findAnchorToken(e,i);if(r&&this.isOffsetInsideToken(r,t))return n={anchorNode:i,token:r,yamlDoc:e},ou.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(Km(e))return this.getAnchorFromCollectionItem(e);if(up(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 P.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}},fK;(function(e){e[e.SchemaStore=1]=`SchemaStore`,e[e.SchemaAssociation=2]=`SchemaAssociation`,e[e.Settings=3]=`Settings`,e[e.SchemaDetectionDisabled=4]=`SchemaDetectionDisabled`})(fK||={});function pK(e){let t=new IK(e.schemaRequestService,e.workspaceContext,null,e.yamlSettings),n=new aK(t,e.clientCapabilities,Xm,e.telemetry),r=new hh(t,e.telemetry),i=new lh(e.telemetry),a=new Lh(t,e.telemetry),o=new IG,s=new JG(e.clientCapabilities),c=new QG(t,e.telemetry),l=new LG(e.telemetry),u=new sK(e.telemetry),d=new dK(e.telemetry);return new oK(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:ZG,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:WG,getSelectionRanges:cK,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 mK(e,t,n,r){let i=_K(e);if(!i||!i.group||!i.version||!i.kind)return;let a=hK(i,t,n);if(a)return a;if(i.group===`core`||i.group===`apiextensions.k8s.io`)return;let o=gK(i,r);if(o)return o}function hK(e,t,n){let{group:r,version:i,kind:a}=e,o=`${r.replace(`.k8s.io`,``).replace(`rbac.authorization`,`rbac`).toLowerCase()}.${i.toLowerCase()}.${a.toLowerCase()}`,s=`${r===`apiextensions.k8s.io`?`io.k8s.apiextensions-apiserver.pkg.apis`:`io.k8s.api`}.${o}`,c=(t.schema.oneOf||[]).map(e=>{if(typeof e!=`boolean`)return e._$ref||e.$ref}).find(e=>e?e.replace(`_definitions.json#/definitions/`,``).toLowerCase()===s:!1);if(c){let e=n.lastIndexOf(`/`),t=e===-1?null:n.substring(0,e+1);return t?t+c:void 0}}function gK(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 _K(e){if(e instanceof Jm)try{let t=e.root.internalNode.toJSON();if(!t)return;let n=t.apiVersion;if(!n)return;let r=n.split(`/`),[i,a]=r.length===1?[`core`,r[0]]:r;if(!i||!a)return;let o=t.kind;return o?{group:i,version:a,kind:o}:void 0}catch(e){console.error(`Error parsing YAML document:`,e);return}}Mt();const vK=new xl.default({allErrors:!0}),yK=new vl.default({allErrors:!0}),bK=new yl.default({allErrors:!0}),xK=new bl.default({allErrors:!0}),SK=KK(vK),CK=KK(yK),wK=KK(bK),TK=KK(xK),EK=/* @__PURE__ */ new Map,DK=/* @__PURE__ */ new Map,OK=/* @__PURE__ */ new Map([[`zh-cn`,`zh`],[`zh-tw`,`zh-TW`]]),kK=/* @__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 AK;(function(e){e[e.delete=0]=`delete`,e[e.add=1]=`add`,e[e.deleteAll=2]=`deleteAll`})(AK||={});var jK=class{constructor(e,t,n){this.folderUri=t,this.uris=n;try{let n=[],r=[];for(let t of e){let e=t,i=e.startsWith(`!`);if(i&&(e=e.substring(1)),e[0]===`/`&&(e=e.substring(1)),e.length>0){let t=`**/`+e;(i?r:n).push(t)}}this.isMatch=(0,Vl.default)(n,{noglobstar:!1}),this.isNegMatch=(0,Vl.default)(r,{noglobstar:!1}),t&&(t=zK(t),t.endsWith(`/`)||(t+=`/`),this.folderUri=t)}catch{this.isMatch=()=>!1,this.isNegMatch=()=>!1,this.uris=[]}}matchesPattern(e){return this.folderUri&&!e.startsWith(this.folderUri)?!1:this.isMatch(e)&&!this.isNegMatch(e)}getURIs(){return this.uris}},MK=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 NK(n)))}isFailureExpired(){return this.failedAt!==void 0&&Date.now()-this.failedAt>=5e3}getUnresolvedSchema(){return this.unresolvedSchema&&this.isFailureExpired()&&(this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.failedAt=void 0),this.unresolvedSchema||=this.service.loadSchema(this.uri).then(e=>(this.failedAt=e.errors?.length?Date.now():void 0,e)),this.unresolvedSchema}getResolvedSchema(){let e=this.getUnresolvedSchema();return this.resolvedSchema||=e.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.failedAt=void 0,this.dependencies={},this.anchors=void 0,e}},NK=class{constructor(e,t=[]){this.schema=e,this.errors=t}};function PK(e,t,n){return{message:e,code:t,relatedInformation:n?[{location:{uri:n,range:P.create(0,0,0,0)},message:e}]:void 0}}var FK=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 lm(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(Kr(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)}}},IK=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);else 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(Wn.isAbsolute(t))t=tr.file(t).toString(!0);else{let n=tr.parse(e);t=tr.file(Wn.resolve(Wn.parse(n.fsPath).dir,t)).toString(!0)}n.length>0&&(t+=`#`+n)}return t}resolveModelineSchema(e,t){let n=sh(t);if(n!==void 0)return n.trim().toLowerCase()===`none`?`none`:this.resolveSchemaRef(e,n)}resolveDollarSchema(e,t){let n=oh(t);if(n!==void 0)return this.resolveSchemaRef(e,n)}async getSchemaCandidatesForResource(e,t){let n=/* @__PURE__ */ new Set,r=[];for(let i of this.filePatternAssociations)if(i.matchesPattern(e)){for(let e of i.getURIs())if(!n.has(e)){let i=e;if(this.yamlSettings?.kubernetesCRDStoreEnabled&&jh(e)){let n=await this.getResolvedSchema(e);n&&(i=mK(t,n,e,this.yamlSettings.kubernetesCRDStoreUrl??`https://raw.githubusercontent.com/datreeio/CRDs-catalog/main`)??e)}r.push({uri:i,prioritySource:e}),n.add(e)}}return r}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=await this.getSchemaCandidatesForResource(e,t);return this.highestPrioritySchemas(i)}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=LK(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(PK(g(`Schema '{0}' is not valid: {1}`,i,`expected a JSON Schema object or boolean, got "${e}".`),Hp.SchemaResolveError,t)),new FK({},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 qK(e.$schema,c);a&&(e._schemaDraft=a);let o=JK(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){GK(o.errors,l);let e=[];for(let t of o.errors)e.push(`${t.instancePath} : ${t.message}`);r.push(PK(g(`Schema '{0}' is not valid: {1}`,i,`\n${e.join(`
883
+ `)}`),Hp.SchemaResolveError,t))}}let d=/* @__PURE__ */ new Map,f=/* @__PURE__ */ new WeakMap,p=e=>{e&&typeof e==`object`&&!f.has(e)&&f.set(e,{...e})},m=e=>{let t=d.get(e);return t||(t={fragments:/* @__PURE__ */ new Map},d.set(e,t)),t},h=(e,t)=>{let n=m(e);n.root||(n.root=t,p(t))},_=(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},v=(e,t)=>this.contextService?this.contextService.resolveRelativePath(t,e):VK(t),y=async(e,t)=>{let n=[{node:e,baseUri:t,sourceUri:t}],r=[],i=/* @__PURE__ */ new WeakMap,a=/* @__PURE__ */ new Set;for(;n.length;){let s=n.pop();if(!s)continue;let c=s.node;if(!c||typeof c!=`object`||a.has(c))continue;a.add(c);let l=s.baseUri;o(c,s.sourceUri);let u=c.$id||c.id;if(u){let e=v(l,u);c._baseUri=e;let t=e.indexOf(`#`);if(t!==-1&&t<e.length-1){let n=e.slice(t+1);m(l).fragments.set(n,{node:c})}else l=e,h(e,c)}c===e&&h(t,c),c.$anchor&&m(l).fragments.set(c.$anchor,{node:c}),c.$dynamicAnchor&&(c._baseUri=l,m(l).fragments.set(c.$dynamicAnchor,{node:c,dynamic:!0}));let d=[];i.set(c,d),this.collectSchemaNodes(e=>{d.push(e),n.push({node:e,baseUri:l,sourceUri:s.sourceUri})},c.not,c.if,c.then,c.else,c.contains,c.propertyNames,c.additionalProperties,c.items,c.additionalItems,c.prefixItems,this.schemaMapValues(c.properties),this.schemaMapValues(c.patternProperties),this.schemaMapValues(c.definitions),this.schemaMapValues(c.$defs),this.schemaMapValues(c.dependentSchemas),this.schemaMapValues(c.dependencies),c.allOf,c.anyOf,c.oneOf,c.schemaSequence),r.push(c)}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)}},b=a,x=e.uri??t;await y(b,x);let S=(e,t,n)=>{if(!t)return e;if(t[0]===`/`){let n=f.get(e)??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 m(n).fragments.get(t).node},C=(e,t,n,i,a=!1)=>{let c=S(t,i,n);if(typeof c==`boolean`)c||(e.not={});else 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)}else r.push(PK(g(`$ref '{0}' in '{1}' cannot be resolved.`,i,n),Hp.SchemaResolveError,n))},w=(e,t)=>{let n=v(e,t);if(!t.startsWith(`/`))return n;let r=d.get(e)?.root,i=r?.$id||r?.id;if(!i)return n;let a=v(e,i);return!a.startsWith(`http://`)&&!a.startsWith(`https://`)?n:v(a,t)},T=(e,t)=>{try{let n=tr.parse(e),r=tr.parse(t);if(n.scheme!==`file`||r.scheme!==`http`&&r.scheme!==`https`)return;let i=Wn.posix.basename(r.path);if(!i)return;let a=Wn.posix.dirname(n.path),o=Wn.posix.join(a,i);return n.with({path:o,query:r.query,fragment:r.fragment}).toString()}catch{return}},E=(e,t,n,i,a,o,s,c,l)=>{let u=(e,t,n,r,i,a,o,s,c)=>{i[n]=!0,C(e,t,n,r,!!c||!!s),(!s||!e._baseUri)&&(e._baseUri=n),e.url=n;let l=new Set(o);return l.add(n),D(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),h=await Promise.resolve(m.getUnresolvedSchema());if(h.errors?.some(e=>e.message.toLowerCase().includes(`unable to load schema from`))&&i+1<t.length)return f(t,i+1);if(h.errors.length){let e=h.errors[0],t=n?a+`#`+n:a;r.push(PK(g(`Problems loading reference '{0}': {1}`,t,e.message),e.code,a))}return await y(h.schema,a),await u(e,h.schema,a,n,o,m.dependencies,s,c,l)},p=w(i,t),m=d.get(p)?.root?void 0:T(a,p);return f(m&&m!==p?[m,p]:[p])},D=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;p(t);let l=[],u=(e,n,a,o,c,u,f)=>{let p=_(u,n);this.collectSchemaNodes(e=>s.push({node:e,baseUri:n,sourceUri:a,recursiveAnchorBase:c,inheritedDynamicScope:p}),this.schemaMapValues(e.definitions||e.$defs));let m=e=>{for(let t of Object.keys(e))if(!kK.has(t))return!0;return!1},h=e=>{let t={};for(let n of Object.keys(e))kK.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)},g=e=>{for(let t of Object.keys(e))kK.has(t)||delete e[t]},y=/* @__PURE__ */ new Set,b=(t,n,r)=>{if(!i.has(n))return!1;let a=d.get(n)?.root;return!a||typeof a!=`object`?!1:(y.has(t)||(C(e,a,n,r,!!c),y.add(t)),!0)};for(;e.$dynamicRef||e.$recursiveRef||e.$ref;){let u=typeof e.$dynamicRef==`string`,_=!u&&typeof e.$recursiveRef==`string`,x=e.$dynamicRef??e.$recursiveRef??e.$ref;if(typeof x!=`string`)break;e._$ref=x;let S=decodeURIComponent(x),w=S.split(`#`,2),T=w[0],D=w.length>1?w[1]:``,O=`${T?v(n,T):n}#${D}`;if(m(e)){if(o===Up.v4||o===Up.v7)g(e);else{if(f?.has(O))break;if(h(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:p,siblingRefCycleKeys:e})}}return}}if(delete e.$dynamicRef,delete e.$recursiveRef,delete e.$ref,_&&(S===`#`||S===``)){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(S)||(C(e,n,o,``,!1),y.add(S));continue}l.push(E(e,o,``,n,a,r,i,c,p));return}}else{if(u){let t=T.length>0?v(n,T):n,o=d.get(t)?.fragments,s=D.length>0&&o?.get(D)?.dynamic,u=s?p?.get(D)?.[0]:void 0,f=u?u._baseUri:t;if(u&&(f===n||i.has(f))){y.has(S)||(C(e,u,f,``,!1),y.add(S));continue}if(T.length>0||s){if(b(S,f,D))continue;l.push(E(e,f,D,n,a,r,i,c,p));return}}else if(T.length>0){if(b(S,v(n,T),D))continue;l.push(E(e,T,D,n,a,r,i,c,p));return}y.has(S)||(C(e,t,n,D,u&&!!p),y.add(S))}}this.collectSchemaNodes(t=>s.push({node:t,baseUri:e._baseUri||n,sourceUri:e._sourceUri||a,schemaDraft:o,recursiveAnchorBase:c,inheritedDynamicScope:p}),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 E(t,e[0],e[1],n,b._sourceUri??n,r,i,a,o);for(let e in b)e!==`required`&&Object.prototype.hasOwnProperty.call(b,e)&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=b[e]);b=t}}for(;s.length;){let e=s.pop(),t=e.node,n=t._baseUri||e.baseUri,r=t._sourceUri||e.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)},O=/* @__PURE__ */ new Set,k=b._baseUri||t;return k&&O.add(k),await D(b,b,t,n,O),new FK(b,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=await this.getSchemaCandidatesForResource(e,t),i=this.highestPrioritySchemas(r);return i.length>0?n(i):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 FK({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 FK(t,e.errors,e.warnings,e.schemaDraft):new FK(t,[],[],e.schemaDraft)}return e}addSchemaPriority(e,t){let n=VK(e),r=this.schemaPriorityMapping.get(n);r?(r.add(t),this.schemaPriorityMapping.set(n,r)):this.schemaPriorityMapping.set(n,(/* @__PURE__ */ new Set()).add(t))}highestPrioritySchemas(e){let t=0,n=/* @__PURE__ */ new Map;return e.forEach(e=>{(this.schemaPriorityMapping.get(e.prioritySource)||[0]).forEach(r=>{r>t&&(t=r);let i=n.get(r);i?(i=i.concat(e.uri),n.set(r,i)):n.set(r,[e.uri])})}),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=VK(e);return this.getOrAddSchemaHandle(n,t),this.schemaPriorityMapping.set(n,(/* @__PURE__ */ new Set()).add(fK.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=VK(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 MK(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 jK(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=zK(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,t){try{let n=[];t.charCodeAt(0)===65279&&(n.push(PK(g(`Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.`,LK(e)),Hp.SchemaResolveError,e)),t=t.trimStart());let r={},i=[];return r=Nl(t,i),i.length&&n.push(PK(g(`Unable to parse content from '{0}': Parse error at offset {1}.`,LK(e),i[0].offset),Hp.SchemaResolveError,e)),new NK(r,n)}catch(t){let{code:n}=t,r=RK(t),i=Hp.SchemaResolveError+(typeof n==`number`&&n<65536?n:0);return new NK({},[PK(r?g(`Unable to load schema from '{0}': {1}.`,LK(e),r):g(`Unable to load schema from '{0}'.`,LK(e)),i,e)])}}async loadYAMLSchema(e,t){try{try{return new NK(Ap(t),[])}catch(t){return new NK({},[PK(g(`Unable to parse content from '{0}': {1}.`,LK(e),t),Hp.SchemaResolveError,e)])}}catch(t){let n=t.toString(),r=t.toString().split(`Error: `);return r.length>1&&(n=r[1]),new NK({},[PK(n,Hp.SchemaResolveError,e)])}}async loadSchema(e){let t=this.requestService,n=!1;try{let t=Wn.extname(tr.parse(e).path);n=t===`.yaml`||t===`.yml`}catch{}let r;if(!t)r=new NK({},[PK(g(`Unable to load schema from '{0}'. No schema request service available`,LK(e)),Hp.SchemaResolveError,e)]);else{let t,i;try{t=await this.requestService(e)}catch(e){i=e}if(t)n?r=await this.loadYAMLSchema(e,t):(r=await this.loadJSONSchema(e,t),r.errors&&(r.schema===void 0||typeof r.schema==`number`)&&(r=await this.loadYAMLSchema(e,t)));else if(i){let{code:t}=i,n=RK(i),a=Hp.SchemaResolveError+(typeof t==`number`&&t<65536?t:0);r=new NK({},[PK(n?g(`Unable to load schema from '{0}': {1}.`,LK(e),n):g(`Unable to load schema from '{0}'.`,LK(e)),a,e)])}else r=new NK({},[PK(g(`Unable to load schema from '{0}': No content.`,LK(e)),Hp.SchemaResolveError,e)])}if(r.uri=e,this.schemaUriToNameAndDescription.has(e)){let{name:t,description:n,versions:i}=this.schemaUriToNameAndDescription.get(e);r.schema.title=t??r.schema.title,r.schema.description=n??r.schema.description,r.schema.versions=i??r.schema.versions}else if(r.errors&&r.errors.length>0){let n=r.errors[0],i=n.message;if(i.toLowerCase().indexOf(`parse`)!==-1){let n=await t(e),r=[],a=Nl(n,r);if(r.length&&a){let{offset:t}=r[0],{line:a,column:o}=BK(n,t);i=g(`Unable to parse content from '{0}': Parse error at line: {1} column: {2}`,LK(e),a,o)}}return new NK({},[PK(i,n.code,e)])}return r}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=VK(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=VK(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(VK),n=this.addFilePatternAssociation(e.pattern,e.folderUri,t);this.contributionAssociations.push(n)}}}getRegisteredSchemaIds(e){return Object.keys(this.registeredSchemasIds).filter(t=>{let n=tr.parse(t).scheme;return n!==`schemaservice`&&(!e||e(n))})}getResolvedSchema(e){let t=VK(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=VK(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 LK(e){try{let t=tr.parse(e);if(t.scheme===`file`)return t.fsPath}catch{}return e}function RK(e){let t=e,n=typeof t?.message==`string`?t.message:String(e??``),r=n.split(`Error: `);return r.length>1&&(n=r[r.length-1].trim()||r.slice(0,-1).join(`Error: `)),n=n.trim().replace(/[.\s]*\bError:?$/,``),n.endsWith(`.`)&&(n=n.slice(0,-1).trimEnd()),!n&&typeof t?.code==`string`&&t.code?t.code:n}function zK(e){try{return tr.parse(e).with({fragment:null,query:null}).toString(!0)}catch{return e}}function BK(e,t){let n=e.slice(0,t).split(/\r?\n/);return{line:n.length,column:n[n.length-1].length+1}}function VK(e){e.startsWith(`http://json-schema.org/`)&&(e=`https://json-schema.org/`+e.substring(23));try{return tr.parse(e).toString(!0)}catch{return e}}function HK(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),VK(t).replace(/\/+$/g,``)}function UK(e){if(e===HK(vK.defaultMeta()))return Up.v4;if(e===HK(yK.defaultMeta()))return Up.v7;if(e===HK(bK.defaultMeta()))return Up.v2019_09;if(e===HK(xK.defaultMeta()))return Up.v2020_12}function WK(e){if(!e)return;let t=e.trim().toLowerCase(),n=OK.get(t);return Sl[e]||Sl[t]||(n?Sl[n]:void 0)}function GK(e,t){(WK(t)||Sl.default.en)(e)}function KK(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 qK(e,t){if(!e)return;let n=HK(e||``),r=UK(n);if(r)return r;if(EK.has(n))return EK.get(n);let i=DK.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=UK(r.$schema);if(i)return i})();DK.set(n,a);try{let e=await a;return EK.set(n,e),e}finally{DK.delete(n)}}function JK(e){switch(e){case Up.v4:return SK;case Up.v7:return CK;case Up.v2019_09:return wK;case Up.v2020_12:return TK;default:return}}var YK=class{constructor(e,t){this.connection=e,this.languageService=t}registerHandlers(){this.connection.onRequest(Cr.type,e=>this.registerSchemaModificationNotificationHandler(e))}registerSchemaModificationNotificationHandler(e){e.action===AK.add?this.languageService.modifySchemaContent(e):e.action===AK.delete?this.languageService.deleteSchemaContent(e):e.action===AK.deleteAll&&this.languageService.deleteSchemasWhole(e)}},XK=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(jn.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`}]),t={yaml:e[0],http:{proxy:e[1]?.proxy??``,proxyStrictSSL:e[1]?.proxyStrictSSL??!1},yamlEditor:e[2],vscodeEditor:e[3]};await this.setConfiguration(t)}async setConfiguration(e){if((0,Gn.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}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)),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(wr.schemaStoreInitialized,{}),this.yamlSettings.clientDynamicRegisterSupport&&(e&&e.yaml&&e.yaml.format&&e.yaml.format.enable?this.yamlSettings.formatterRegistration||(this.yamlSettings.formatterRegistration=this.connection.client.register(jn.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,Gn.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:fK.SchemaStore,name:t.name,description:t.description,versions:t.versions});else{let e=i.filter(e=>![`.json`,`.jsonc`,`.json5`].includes(Wn.posix.extname(e)));e.length>0&&n.schemas.push({uri:t.url,fileMatch:e,priority:fK.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,fK.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,fK.SchemaAssociation)});else for(let t in this.yamlSettings.schemaAssociations){let n=this.yamlSettings.schemaAssociations[t];e=this.configureSchemas(t,n,null,e,fK.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&&(Tr(n)&&(n=Er(this.yamlSettings.workspaceFolders,this.yamlSettings.workspaceRoot,n)),e=this.configureSchemas(n,t.fileMatch,t.schema,e,fK.Settings))}),this.yamlSettings.schemaStoreSettings&&(e.schemas=e.schemas.concat(this.yamlSettings.schemaStoreSettings)),this.languageService.configure(e);let t=this.schemaSettings!==void 0&&!Pn(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(uK.CodeLensRefreshRequest.type).catch(e=>this.telemetry.sendError(`yaml.codeLens.refresh.error`,e))}configureSchemas(e,t,n,r,i){return e=Mh(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}),jh(e)&&(Array.isArray(t)?t.forEach(e=>{this.yamlSettings.specificValidatorPaths.push(e)}):this.yamlSettings.specificValidatorPaths.push(t)),r}},ZK=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,Yr(e,this.yamlSettings.specificValidatorPaths)),n=[];for(let e of t)e.severity===2&&(e.severity=1),n.push(e);let r=Xp(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}},QK=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 $K(e,t){e.registerCommand(zr.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=tr.parse(n[0].uri);e=t.with({path:t.path+e}).toString()}}else if(e.startsWith(`file://`)&&n.length===1&&tr.parse(n[0].uri).scheme!=`file`){let t=tr.parse(n[0].uri),r=tr.parse(e).path;e=t.with({path:r}).toString()}else if(!e.startsWith(`file`)&&!e.startsWith(`/`)&&!/^[a-z]:[\\/]/i.test(e)){let t=tr.parse(e);e=tr.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=tr.file(e).toString()),await t.window.showDocument({uri:e,external:!1,takeFocus:!0})||t.window.showErrorMessage(`Cannot open ${e}`)})}var eq=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=Dr(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=pK({schemaRequestService:this.schemaRequestService,workspaceContext:this.workspaceContext,connection:this.connection,yamlSettings:this.yamlSettings,telemetry:this.telemetry,clientCapabilities:e.capabilities}),e.rootUri&&(this.yamlSettings.workspaceRoot=tr.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(),$K(Br,this.connection),await this.setupl10nBundle(e),{serverInfo:{name:`yaml-language-server`,version:`1.25.0`},capabilities:{textDocumentSync:jn.TextDocumentSyncKind.Incremental,completionProvider:{resolveProvider:!1},hoverProvider:!0,documentSymbolProvider:!0,documentFormattingProvider:!this.yamlSettings.clientDynamicRegisterSupport,documentOnTypeFormattingProvider:{firstTriggerCharacter:`
884
+ `},documentRangeFormattingProvider:!1,definitionProvider:!0,renameProvider:{prepareProvider:!0},documentLinkProvider:{},foldingRangeProvider:!0,selectionRangeProvider:!0,codeActionProvider:!0,codeLensProvider:{resolveProvider:!1},executeCommandProvider:{commands:Object.keys(zr).map(e=>zr[e])},workspace:{workspaceFolders:{changeNotifications:!0,supported:!0}}}}}registerHandlers(){this.validationHandler=new ZK(this.connection,this.languageService,this.yamlSettings),this.settingsHandler=new XK(this.connection,this.languageService,this.yamlSettings,this.validationHandler,this.telemetry),this.languageHandler=new Xr(this.connection,this.languageService,this.yamlSettings,this.validationHandler),this.languageHandler.registerHandlers(),new Zr(this.connection,this.languageService,this.yamlSettings,this.settingsHandler).registerHandlers(),new YK(this.connection,this.languageService).registerHandlers(),new QK(this.connection,Br).registerHandlers()}start(){this.connection.listen()}},tq=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 jn.TextDocuments(Ip),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.locale=`en`}},nq;(function(e){e.type=new jn.RequestType(`fs/readFile`)})(nq||={}),self.onmessage=e=>{let t=new Mn.BrowserMessageReader(globalThis),n=new Mn.BrowserMessageWriter(globalThis),r=(0,Mn.createConnection)(t,n),i=new tq,a={readFile:e=>r.sendRequest(nq.type,e)},o=((e,t)=>Lr(e,t,i.workspaceFolders,i.workspaceRoot,i.useVSCodeContentRequest,a,!0)).bind(void 0,r),s=new Vn(r);h({contents:e.data.l10nBundle}),new eq(r,i,Rr,o,s).start()};