@toolbox-web/grid 1.24.1 → 1.25.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 (422) hide show
  1. package/all.d.ts +0 -1
  2. package/all.js +2 -2
  3. package/all.js.map +1 -1
  4. package/index.d.ts +0 -1
  5. package/index.js +1 -1
  6. package/index.js.map +1 -1
  7. package/lib/core/constants.d.ts +0 -1
  8. package/lib/core/grid.d.ts +145 -33
  9. package/lib/core/internal/aggregators.d.ts +0 -1
  10. package/lib/core/internal/aria.d.ts +8 -1
  11. package/lib/core/internal/columns.d.ts +3 -4
  12. package/lib/core/internal/config-manager.d.ts +2 -54
  13. package/lib/core/internal/dom-builder.d.ts +0 -1
  14. package/lib/core/internal/event-delegation.d.ts +3 -4
  15. package/lib/core/internal/feature-hook.d.ts +0 -1
  16. package/lib/core/internal/focus-manager.d.ts +49 -0
  17. package/lib/core/internal/header.d.ts +2 -3
  18. package/lib/core/internal/idle-scheduler.d.ts +0 -1
  19. package/lib/core/internal/inference.d.ts +0 -1
  20. package/lib/core/internal/keyboard.d.ts +3 -4
  21. package/lib/core/internal/loading.d.ts +0 -1
  22. package/lib/core/internal/render-scheduler.d.ts +3 -66
  23. package/lib/core/internal/resize.d.ts +2 -3
  24. package/lib/core/internal/row-animation.d.ts +0 -1
  25. package/lib/core/internal/row-manager.d.ts +31 -0
  26. package/lib/core/internal/rows.d.ts +4 -5
  27. package/lib/core/internal/sanitize.d.ts +0 -1
  28. package/lib/core/internal/shell.d.ts +7 -25
  29. package/lib/core/internal/sorting.d.ts +3 -4
  30. package/lib/core/internal/style-injector.d.ts +0 -1
  31. package/lib/core/internal/touch-scroll.d.ts +31 -12
  32. package/lib/core/internal/utils.d.ts +8 -1
  33. package/lib/core/internal/validate-config.d.ts +4 -5
  34. package/lib/core/internal/virtualization-manager.d.ts +48 -0
  35. package/lib/core/internal/virtualization.d.ts +0 -1
  36. package/lib/core/plugin/base-plugin.d.ts +2 -3
  37. package/lib/core/plugin/expander-column.d.ts +0 -1
  38. package/lib/core/plugin/index.d.ts +0 -1
  39. package/lib/core/plugin/plugin-manager.d.ts +2 -1
  40. package/lib/core/plugin/types.d.ts +7 -2
  41. package/lib/core/styles/index.d.ts +0 -1
  42. package/lib/core/types.d.ts +364 -54
  43. package/lib/features/clipboard.d.ts +0 -1
  44. package/lib/features/column-virtualization.d.ts +0 -1
  45. package/lib/features/context-menu.d.ts +0 -1
  46. package/lib/features/editing.d.ts +0 -1
  47. package/lib/features/export.d.ts +0 -1
  48. package/lib/features/filtering.d.ts +0 -1
  49. package/lib/features/grouping-columns.d.ts +0 -1
  50. package/lib/features/grouping-rows.d.ts +0 -1
  51. package/lib/features/master-detail.d.ts +0 -1
  52. package/lib/features/multi-sort.d.ts +1 -2
  53. package/lib/features/multi-sort.js.map +1 -1
  54. package/lib/features/pinned-columns.d.ts +0 -1
  55. package/lib/features/pinned-rows.d.ts +0 -1
  56. package/lib/features/pivot.d.ts +0 -1
  57. package/lib/features/print.d.ts +0 -1
  58. package/lib/features/registry.d.ts +0 -1
  59. package/lib/features/reorder-columns.d.ts +1 -2
  60. package/lib/features/reorder-columns.js.map +1 -1
  61. package/lib/features/reorder-rows.d.ts +1 -2
  62. package/lib/features/reorder-rows.js.map +1 -1
  63. package/lib/features/responsive.d.ts +0 -1
  64. package/lib/features/selection.d.ts +0 -1
  65. package/lib/features/server-side.d.ts +0 -1
  66. package/lib/features/tree.d.ts +0 -1
  67. package/lib/features/undo-redo.d.ts +0 -1
  68. package/lib/features/visibility.d.ts +0 -1
  69. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +0 -1
  70. package/lib/plugins/clipboard/copy.d.ts +0 -1
  71. package/lib/plugins/clipboard/index.d.ts +0 -1
  72. package/lib/plugins/clipboard/index.js +1 -1
  73. package/lib/plugins/clipboard/index.js.map +1 -1
  74. package/lib/plugins/clipboard/paste.d.ts +0 -1
  75. package/lib/plugins/clipboard/types.d.ts +6 -1
  76. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +0 -1
  77. package/lib/plugins/column-virtualization/column-virtualization.d.ts +0 -1
  78. package/lib/plugins/column-virtualization/index.d.ts +0 -1
  79. package/lib/plugins/column-virtualization/index.js +1 -1
  80. package/lib/plugins/column-virtualization/index.js.map +1 -1
  81. package/lib/plugins/column-virtualization/types.d.ts +0 -1
  82. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +16 -1
  83. package/lib/plugins/context-menu/index.d.ts +1 -2
  84. package/lib/plugins/context-menu/index.js +1 -1
  85. package/lib/plugins/context-menu/index.js.map +1 -1
  86. package/lib/plugins/context-menu/menu.d.ts +14 -1
  87. package/lib/plugins/context-menu/types.d.ts +13 -3
  88. package/lib/plugins/editing/EditingPlugin.d.ts +4 -6
  89. package/lib/plugins/editing/editors.d.ts +0 -1
  90. package/lib/plugins/editing/index.d.ts +0 -1
  91. package/lib/plugins/editing/index.js +1 -1
  92. package/lib/plugins/editing/index.js.map +1 -1
  93. package/lib/plugins/editing/internal/cell-validation.d.ts +0 -1
  94. package/lib/plugins/editing/internal/dirty-tracking-manager.d.ts +0 -1
  95. package/lib/plugins/editing/internal/dirty-tracking.d.ts +2 -2
  96. package/lib/plugins/editing/internal/editor-injection.d.ts +3 -4
  97. package/lib/plugins/editing/internal/helpers.d.ts +0 -1
  98. package/lib/plugins/editing/types.d.ts +15 -14
  99. package/lib/plugins/export/ExportPlugin.d.ts +0 -1
  100. package/lib/plugins/export/csv.d.ts +0 -1
  101. package/lib/plugins/export/excel.d.ts +0 -1
  102. package/lib/plugins/export/index.d.ts +0 -1
  103. package/lib/plugins/export/index.js +1 -1
  104. package/lib/plugins/export/index.js.map +1 -1
  105. package/lib/plugins/export/types.d.ts +4 -1
  106. package/lib/plugins/filtering/FilteringPlugin.d.ts +0 -1
  107. package/lib/plugins/filtering/filter-model.d.ts +0 -1
  108. package/lib/plugins/filtering/filter-panel-date.d.ts +0 -1
  109. package/lib/plugins/filtering/filter-panel-default.d.ts +0 -1
  110. package/lib/plugins/filtering/filter-panel-number.d.ts +0 -1
  111. package/lib/plugins/filtering/index.d.ts +0 -1
  112. package/lib/plugins/filtering/index.js +1 -1
  113. package/lib/plugins/filtering/index.js.map +1 -1
  114. package/lib/plugins/filtering/types.d.ts +4 -1
  115. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +0 -1
  116. package/lib/plugins/grouping-columns/grouping-columns.d.ts +2 -3
  117. package/lib/plugins/grouping-columns/index.d.ts +1 -2
  118. package/lib/plugins/grouping-columns/index.js +1 -1
  119. package/lib/plugins/grouping-columns/index.js.map +1 -1
  120. package/lib/plugins/grouping-columns/types.d.ts +33 -7
  121. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +0 -1
  122. package/lib/plugins/grouping-rows/grouping-rows.d.ts +0 -1
  123. package/lib/plugins/grouping-rows/index.d.ts +0 -1
  124. package/lib/plugins/grouping-rows/index.js +1 -1
  125. package/lib/plugins/grouping-rows/index.js.map +1 -1
  126. package/lib/plugins/grouping-rows/types.d.ts +4 -1
  127. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +0 -1
  128. package/lib/plugins/master-detail/index.d.ts +0 -1
  129. package/lib/plugins/master-detail/index.js +1 -1
  130. package/lib/plugins/master-detail/index.js.map +1 -1
  131. package/lib/plugins/master-detail/master-detail.d.ts +0 -1
  132. package/lib/plugins/master-detail/types.d.ts +4 -1
  133. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +3 -3
  134. package/lib/plugins/multi-sort/index.d.ts +1 -2
  135. package/lib/plugins/multi-sort/index.js +1 -1
  136. package/lib/plugins/multi-sort/index.js.map +1 -1
  137. package/lib/plugins/multi-sort/multi-sort.d.ts +0 -1
  138. package/lib/plugins/multi-sort/types.d.ts +5 -1
  139. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +0 -1
  140. package/lib/plugins/pinned-columns/index.d.ts +0 -1
  141. package/lib/plugins/pinned-columns/index.js +1 -1
  142. package/lib/plugins/pinned-columns/index.js.map +1 -1
  143. package/lib/plugins/pinned-columns/pinned-columns.d.ts +0 -1
  144. package/lib/plugins/pinned-columns/types.d.ts +0 -1
  145. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +0 -1
  146. package/lib/plugins/pinned-rows/index.d.ts +0 -1
  147. package/lib/plugins/pinned-rows/index.js +1 -1
  148. package/lib/plugins/pinned-rows/index.js.map +1 -1
  149. package/lib/plugins/pinned-rows/pinned-rows.d.ts +0 -1
  150. package/lib/plugins/pinned-rows/types.d.ts +0 -1
  151. package/lib/plugins/pivot/PivotPlugin.d.ts +0 -1
  152. package/lib/plugins/pivot/index.d.ts +0 -1
  153. package/lib/plugins/pivot/index.js +1 -1
  154. package/lib/plugins/pivot/index.js.map +1 -1
  155. package/lib/plugins/pivot/pivot-engine.d.ts +0 -1
  156. package/lib/plugins/pivot/pivot-model.d.ts +0 -1
  157. package/lib/plugins/pivot/pivot-panel.d.ts +0 -1
  158. package/lib/plugins/pivot/pivot-rows.d.ts +0 -1
  159. package/lib/plugins/pivot/types.d.ts +0 -1
  160. package/lib/plugins/print/PrintPlugin.d.ts +0 -1
  161. package/lib/plugins/print/index.d.ts +0 -1
  162. package/lib/plugins/print/index.js +1 -1
  163. package/lib/plugins/print/index.js.map +1 -1
  164. package/lib/plugins/print/print-isolated.d.ts +0 -1
  165. package/lib/plugins/print/types.d.ts +6 -1
  166. package/lib/plugins/reorder-columns/ReorderPlugin.d.ts +5 -5
  167. package/lib/plugins/reorder-columns/column-drag.d.ts +3 -2
  168. package/lib/plugins/reorder-columns/index.d.ts +0 -1
  169. package/lib/plugins/reorder-columns/index.js +1 -1
  170. package/lib/plugins/reorder-columns/index.js.map +1 -1
  171. package/lib/plugins/reorder-columns/types.d.ts +4 -1
  172. package/lib/plugins/reorder-rows/RowReorderPlugin.d.ts +3 -3
  173. package/lib/plugins/reorder-rows/index.d.ts +0 -1
  174. package/lib/plugins/reorder-rows/index.js +1 -1
  175. package/lib/plugins/reorder-rows/index.js.map +1 -1
  176. package/lib/plugins/reorder-rows/types.d.ts +4 -1
  177. package/lib/plugins/responsive/ResponsivePlugin.d.ts +0 -1
  178. package/lib/plugins/responsive/index.d.ts +0 -1
  179. package/lib/plugins/responsive/index.js +1 -1
  180. package/lib/plugins/responsive/index.js.map +1 -1
  181. package/lib/plugins/responsive/types.d.ts +4 -1
  182. package/lib/plugins/selection/SelectionPlugin.d.ts +1 -3
  183. package/lib/plugins/selection/index.d.ts +0 -1
  184. package/lib/plugins/selection/index.js +1 -1
  185. package/lib/plugins/selection/index.js.map +1 -1
  186. package/lib/plugins/selection/range-selection.d.ts +0 -1
  187. package/lib/plugins/selection/row-selection.d.ts +0 -1
  188. package/lib/plugins/selection/types.d.ts +4 -1
  189. package/lib/plugins/server-side/ServerSidePlugin.d.ts +0 -1
  190. package/lib/plugins/server-side/cache.d.ts +0 -1
  191. package/lib/plugins/server-side/datasource.d.ts +0 -1
  192. package/lib/plugins/server-side/index.d.ts +0 -1
  193. package/lib/plugins/server-side/index.js +1 -1
  194. package/lib/plugins/server-side/index.js.map +1 -1
  195. package/lib/plugins/server-side/types.d.ts +0 -1
  196. package/lib/plugins/shared/data-collection.d.ts +0 -1
  197. package/lib/plugins/tree/TreePlugin.d.ts +0 -1
  198. package/lib/plugins/tree/index.d.ts +0 -1
  199. package/lib/plugins/tree/index.js +1 -1
  200. package/lib/plugins/tree/index.js.map +1 -1
  201. package/lib/plugins/tree/tree-data.d.ts +0 -1
  202. package/lib/plugins/tree/tree-detect.d.ts +0 -1
  203. package/lib/plugins/tree/types.d.ts +4 -1
  204. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +1 -2
  205. package/lib/plugins/undo-redo/history.d.ts +0 -1
  206. package/lib/plugins/undo-redo/index.d.ts +0 -1
  207. package/lib/plugins/undo-redo/index.js +1 -1
  208. package/lib/plugins/undo-redo/index.js.map +1 -1
  209. package/lib/plugins/undo-redo/types.d.ts +6 -1
  210. package/lib/plugins/visibility/VisibilityPlugin.d.ts +0 -1
  211. package/lib/plugins/visibility/index.d.ts +0 -1
  212. package/lib/plugins/visibility/index.js +1 -1
  213. package/lib/plugins/visibility/index.js.map +1 -1
  214. package/lib/plugins/visibility/types.d.ts +0 -1
  215. package/lib/plugins/visibility/visibility.d.ts +0 -1
  216. package/package.json +1 -1
  217. package/public.d.ts +31 -12
  218. package/umd/grid.all.umd.js +1 -1
  219. package/umd/grid.all.umd.js.map +1 -1
  220. package/umd/grid.umd.js +1 -1
  221. package/umd/grid.umd.js.map +1 -1
  222. package/umd/plugins/clipboard.umd.js +1 -1
  223. package/umd/plugins/clipboard.umd.js.map +1 -1
  224. package/umd/plugins/column-virtualization.umd.js +1 -1
  225. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  226. package/umd/plugins/context-menu.umd.js +1 -1
  227. package/umd/plugins/context-menu.umd.js.map +1 -1
  228. package/umd/plugins/editing.umd.js +1 -1
  229. package/umd/plugins/editing.umd.js.map +1 -1
  230. package/umd/plugins/filtering.umd.js +1 -1
  231. package/umd/plugins/filtering.umd.js.map +1 -1
  232. package/umd/plugins/grouping-columns.umd.js +1 -1
  233. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  234. package/umd/plugins/master-detail.umd.js +1 -1
  235. package/umd/plugins/master-detail.umd.js.map +1 -1
  236. package/umd/plugins/multi-sort.umd.js +1 -1
  237. package/umd/plugins/multi-sort.umd.js.map +1 -1
  238. package/umd/plugins/pinned-columns.umd.js +1 -1
  239. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  240. package/umd/plugins/pinned-rows.umd.js +1 -1
  241. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  242. package/umd/plugins/print.umd.js +1 -1
  243. package/umd/plugins/print.umd.js.map +1 -1
  244. package/umd/plugins/reorder-columns.umd.js +1 -1
  245. package/umd/plugins/reorder-columns.umd.js.map +1 -1
  246. package/umd/plugins/reorder-rows.umd.js +1 -1
  247. package/umd/plugins/reorder-rows.umd.js.map +1 -1
  248. package/umd/plugins/responsive.umd.js +1 -1
  249. package/umd/plugins/responsive.umd.js.map +1 -1
  250. package/umd/plugins/selection.umd.js +1 -1
  251. package/umd/plugins/selection.umd.js.map +1 -1
  252. package/umd/plugins/server-side.umd.js.map +1 -1
  253. package/umd/plugins/tree.umd.js +1 -1
  254. package/umd/plugins/tree.umd.js.map +1 -1
  255. package/umd/plugins/undo-redo.umd.js.map +1 -1
  256. package/umd/plugins/visibility.umd.js +1 -1
  257. package/umd/plugins/visibility.umd.js.map +1 -1
  258. package/all.d.ts.map +0 -1
  259. package/index.d.ts.map +0 -1
  260. package/lib/core/constants.d.ts.map +0 -1
  261. package/lib/core/grid.d.ts.map +0 -1
  262. package/lib/core/internal/aggregators.d.ts.map +0 -1
  263. package/lib/core/internal/aria.d.ts.map +0 -1
  264. package/lib/core/internal/columns.d.ts.map +0 -1
  265. package/lib/core/internal/config-manager.d.ts.map +0 -1
  266. package/lib/core/internal/dom-builder.d.ts.map +0 -1
  267. package/lib/core/internal/event-delegation.d.ts.map +0 -1
  268. package/lib/core/internal/feature-hook.d.ts.map +0 -1
  269. package/lib/core/internal/header.d.ts.map +0 -1
  270. package/lib/core/internal/idle-scheduler.d.ts.map +0 -1
  271. package/lib/core/internal/inference.d.ts.map +0 -1
  272. package/lib/core/internal/keyboard.d.ts.map +0 -1
  273. package/lib/core/internal/loading.d.ts.map +0 -1
  274. package/lib/core/internal/render-scheduler.d.ts.map +0 -1
  275. package/lib/core/internal/resize.d.ts.map +0 -1
  276. package/lib/core/internal/row-animation.d.ts.map +0 -1
  277. package/lib/core/internal/rows.d.ts.map +0 -1
  278. package/lib/core/internal/sanitize.d.ts.map +0 -1
  279. package/lib/core/internal/shell.d.ts.map +0 -1
  280. package/lib/core/internal/sorting.d.ts.map +0 -1
  281. package/lib/core/internal/style-injector.d.ts.map +0 -1
  282. package/lib/core/internal/touch-scroll.d.ts.map +0 -1
  283. package/lib/core/internal/utils.d.ts.map +0 -1
  284. package/lib/core/internal/validate-config.d.ts.map +0 -1
  285. package/lib/core/internal/virtualization.d.ts.map +0 -1
  286. package/lib/core/plugin/base-plugin.d.ts.map +0 -1
  287. package/lib/core/plugin/expander-column.d.ts.map +0 -1
  288. package/lib/core/plugin/index.d.ts.map +0 -1
  289. package/lib/core/plugin/plugin-manager.d.ts.map +0 -1
  290. package/lib/core/plugin/types.d.ts.map +0 -1
  291. package/lib/core/styles/index.d.ts.map +0 -1
  292. package/lib/core/types.d.ts.map +0 -1
  293. package/lib/features/clipboard.d.ts.map +0 -1
  294. package/lib/features/column-virtualization.d.ts.map +0 -1
  295. package/lib/features/context-menu.d.ts.map +0 -1
  296. package/lib/features/editing.d.ts.map +0 -1
  297. package/lib/features/export.d.ts.map +0 -1
  298. package/lib/features/filtering.d.ts.map +0 -1
  299. package/lib/features/grouping-columns.d.ts.map +0 -1
  300. package/lib/features/grouping-rows.d.ts.map +0 -1
  301. package/lib/features/magic-string.es-CkyDP9Ir.mjs.map +0 -1
  302. package/lib/features/master-detail.d.ts.map +0 -1
  303. package/lib/features/multi-sort.d.ts.map +0 -1
  304. package/lib/features/pinned-columns.d.ts.map +0 -1
  305. package/lib/features/pinned-rows.d.ts.map +0 -1
  306. package/lib/features/pivot.d.ts.map +0 -1
  307. package/lib/features/print.d.ts.map +0 -1
  308. package/lib/features/registry.d.ts.map +0 -1
  309. package/lib/features/registry.spec.js +0 -5
  310. package/lib/features/registry.spec.js.map +0 -1
  311. package/lib/features/reorder-columns.d.ts.map +0 -1
  312. package/lib/features/reorder-rows.d.ts.map +0 -1
  313. package/lib/features/responsive.d.ts.map +0 -1
  314. package/lib/features/selection.d.ts.map +0 -1
  315. package/lib/features/server-side.d.ts.map +0 -1
  316. package/lib/features/tree.d.ts.map +0 -1
  317. package/lib/features/undo-redo.d.ts.map +0 -1
  318. package/lib/features/visibility.d.ts.map +0 -1
  319. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +0 -1
  320. package/lib/plugins/clipboard/copy.d.ts.map +0 -1
  321. package/lib/plugins/clipboard/index.d.ts.map +0 -1
  322. package/lib/plugins/clipboard/paste.d.ts.map +0 -1
  323. package/lib/plugins/clipboard/types.d.ts.map +0 -1
  324. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +0 -1
  325. package/lib/plugins/column-virtualization/column-virtualization.d.ts.map +0 -1
  326. package/lib/plugins/column-virtualization/index.d.ts.map +0 -1
  327. package/lib/plugins/column-virtualization/types.d.ts.map +0 -1
  328. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +0 -1
  329. package/lib/plugins/context-menu/index.d.ts.map +0 -1
  330. package/lib/plugins/context-menu/menu.d.ts.map +0 -1
  331. package/lib/plugins/context-menu/types.d.ts.map +0 -1
  332. package/lib/plugins/editing/EditingPlugin.d.ts.map +0 -1
  333. package/lib/plugins/editing/editors.d.ts.map +0 -1
  334. package/lib/plugins/editing/index.d.ts.map +0 -1
  335. package/lib/plugins/editing/internal/cell-validation.d.ts.map +0 -1
  336. package/lib/plugins/editing/internal/dirty-tracking-manager.d.ts.map +0 -1
  337. package/lib/plugins/editing/internal/dirty-tracking.d.ts.map +0 -1
  338. package/lib/plugins/editing/internal/editor-injection.d.ts.map +0 -1
  339. package/lib/plugins/editing/internal/helpers.d.ts.map +0 -1
  340. package/lib/plugins/editing/types.d.ts.map +0 -1
  341. package/lib/plugins/export/ExportPlugin.d.ts.map +0 -1
  342. package/lib/plugins/export/csv.d.ts.map +0 -1
  343. package/lib/plugins/export/excel.d.ts.map +0 -1
  344. package/lib/plugins/export/index.d.ts.map +0 -1
  345. package/lib/plugins/export/types.d.ts.map +0 -1
  346. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +0 -1
  347. package/lib/plugins/filtering/filter-model.d.ts.map +0 -1
  348. package/lib/plugins/filtering/filter-panel-date.d.ts.map +0 -1
  349. package/lib/plugins/filtering/filter-panel-default.d.ts.map +0 -1
  350. package/lib/plugins/filtering/filter-panel-number.d.ts.map +0 -1
  351. package/lib/plugins/filtering/index.d.ts.map +0 -1
  352. package/lib/plugins/filtering/types.d.ts.map +0 -1
  353. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +0 -1
  354. package/lib/plugins/grouping-columns/grouping-columns.d.ts.map +0 -1
  355. package/lib/plugins/grouping-columns/index.d.ts.map +0 -1
  356. package/lib/plugins/grouping-columns/types.d.ts.map +0 -1
  357. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +0 -1
  358. package/lib/plugins/grouping-rows/grouping-rows.d.ts.map +0 -1
  359. package/lib/plugins/grouping-rows/index.d.ts.map +0 -1
  360. package/lib/plugins/grouping-rows/types.d.ts.map +0 -1
  361. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +0 -1
  362. package/lib/plugins/master-detail/index.d.ts.map +0 -1
  363. package/lib/plugins/master-detail/master-detail.d.ts.map +0 -1
  364. package/lib/plugins/master-detail/types.d.ts.map +0 -1
  365. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +0 -1
  366. package/lib/plugins/multi-sort/index.d.ts.map +0 -1
  367. package/lib/plugins/multi-sort/multi-sort.d.ts.map +0 -1
  368. package/lib/plugins/multi-sort/types.d.ts.map +0 -1
  369. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +0 -1
  370. package/lib/plugins/pinned-columns/index.d.ts.map +0 -1
  371. package/lib/plugins/pinned-columns/pinned-columns.d.ts.map +0 -1
  372. package/lib/plugins/pinned-columns/types.d.ts.map +0 -1
  373. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +0 -1
  374. package/lib/plugins/pinned-rows/index.d.ts.map +0 -1
  375. package/lib/plugins/pinned-rows/pinned-rows.d.ts.map +0 -1
  376. package/lib/plugins/pinned-rows/types.d.ts.map +0 -1
  377. package/lib/plugins/pivot/PivotPlugin.d.ts.map +0 -1
  378. package/lib/plugins/pivot/index.d.ts.map +0 -1
  379. package/lib/plugins/pivot/pivot-engine.d.ts.map +0 -1
  380. package/lib/plugins/pivot/pivot-model.d.ts.map +0 -1
  381. package/lib/plugins/pivot/pivot-panel.d.ts.map +0 -1
  382. package/lib/plugins/pivot/pivot-rows.d.ts.map +0 -1
  383. package/lib/plugins/pivot/types.d.ts.map +0 -1
  384. package/lib/plugins/print/PrintPlugin.d.ts.map +0 -1
  385. package/lib/plugins/print/index.d.ts.map +0 -1
  386. package/lib/plugins/print/print-isolated.d.ts.map +0 -1
  387. package/lib/plugins/print/types.d.ts.map +0 -1
  388. package/lib/plugins/reorder-columns/ReorderPlugin.d.ts.map +0 -1
  389. package/lib/plugins/reorder-columns/column-drag.d.ts.map +0 -1
  390. package/lib/plugins/reorder-columns/index.d.ts.map +0 -1
  391. package/lib/plugins/reorder-columns/types.d.ts.map +0 -1
  392. package/lib/plugins/reorder-rows/RowReorderPlugin.d.ts.map +0 -1
  393. package/lib/plugins/reorder-rows/index.d.ts.map +0 -1
  394. package/lib/plugins/reorder-rows/types.d.ts.map +0 -1
  395. package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +0 -1
  396. package/lib/plugins/responsive/index.d.ts.map +0 -1
  397. package/lib/plugins/responsive/types.d.ts.map +0 -1
  398. package/lib/plugins/selection/SelectionPlugin.d.ts.map +0 -1
  399. package/lib/plugins/selection/index.d.ts.map +0 -1
  400. package/lib/plugins/selection/range-selection.d.ts.map +0 -1
  401. package/lib/plugins/selection/row-selection.d.ts.map +0 -1
  402. package/lib/plugins/selection/types.d.ts.map +0 -1
  403. package/lib/plugins/server-side/ServerSidePlugin.d.ts.map +0 -1
  404. package/lib/plugins/server-side/cache.d.ts.map +0 -1
  405. package/lib/plugins/server-side/datasource.d.ts.map +0 -1
  406. package/lib/plugins/server-side/index.d.ts.map +0 -1
  407. package/lib/plugins/server-side/types.d.ts.map +0 -1
  408. package/lib/plugins/shared/data-collection.d.ts.map +0 -1
  409. package/lib/plugins/tree/TreePlugin.d.ts.map +0 -1
  410. package/lib/plugins/tree/index.d.ts.map +0 -1
  411. package/lib/plugins/tree/tree-data.d.ts.map +0 -1
  412. package/lib/plugins/tree/tree-detect.d.ts.map +0 -1
  413. package/lib/plugins/tree/types.d.ts.map +0 -1
  414. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +0 -1
  415. package/lib/plugins/undo-redo/history.d.ts.map +0 -1
  416. package/lib/plugins/undo-redo/index.d.ts.map +0 -1
  417. package/lib/plugins/undo-redo/types.d.ts.map +0 -1
  418. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +0 -1
  419. package/lib/plugins/visibility/index.d.ts.map +0 -1
  420. package/lib/plugins/visibility/types.d.ts.map +0 -1
  421. package/lib/plugins/visibility/visibility.d.ts.map +0 -1
  422. package/public.d.ts.map +0 -1
@@ -1,5 +0,0 @@
1
- import{registerFeature as e,isFeatureRegistered as t,getFeatureFactory as n,getRegisteredFeatures as o,createPluginFromFeature as r,createPluginsFromFeatures as i,clearFeatureRegistry as s}from"@toolbox-web/grid/features/registry";var a={reset:[0,0],bold:[1,22,""],dim:[2,22,""],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function c(e){return String(e)}c.open="",c.close="";var l=function(){let e=function(){let e="undefined"!=typeof process?process:void 0,t=(null==e?void 0:e.env)||{},n="false"!==t.FORCE_TTY,o=(null==e?void 0:e.argv)||[];return!("NO_COLOR"in t||o.includes("--no-color"))&&("FORCE_COLOR"in t||o.includes("--color")||"win32"===(null==e?void 0:e.platform)||n&&"dumb"!==t.TERM||"CI"in t)||"undefined"!=typeof window&&!!window.chrome}(),t=(e,t,n=e)=>{let o=o=>{let r=String(o),i=r.indexOf(t,e.length);return~i?e+((e,t,n,o)=>{let r="",i=0;do{r+=e.substring(i,o)+n,i=o+t.length,o=e.indexOf(t,i)}while(~o);return r+e.substring(i)})(r,t,n,i)+t:e+r+t};return o.open=e,o.close=t,o},n={isColorSupported:e},o=e=>`[${e}m`;for(let r in a){let i=a[r];n[r]=e?t(o(i[0]),o(i[1]),i[2]):c}return n}();function u(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function f(e,t,n,o,r,i,s=": "){let a="",c=0,l=e.next();if(!l.done){a+=t.spacingOuter;const u=n+t.indent;for(;!l.done;){if(a+=u,c++===t.maxWidth){a+="…";break}a+=i(l.value[0],t,u,o,r)+s+i(l.value[1],t,u,o,r),l=e.next(),l.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+n}return a}function h(e,t,n,o,r,i){let s="",a=0,c=e.next();if(!c.done){s+=t.spacingOuter;const l=n+t.indent;for(;!c.done;){if(s+=l,a++===t.maxWidth){s+="…";break}s+=i(c.value,t,l,o,r),c=e.next(),c.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+n}return s}function p(e,t,n,o,r,i){let s="";const a=e=>e instanceof DataView,c=a(e=e instanceof ArrayBuffer?new DataView(e):e)?e.byteLength:e.length;if(c>0){s+=t.spacingOuter;const l=n+t.indent;for(let n=0;n<c;n++){if(s+=l,n===t.maxWidth){s+="…";break}(a(e)||n in e)&&(s+=i(a(e)?e.getInt8(n):e[n],t,l,o,r)),n<c-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}function d(e,t,n,o,r,i){let s="";const a=function(e,t){const n=Object.keys(e),o=null===t?n:n.sort(t);if(Object.getOwnPropertySymbols)for(const r of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,r).enumerable&&o.push(r);return o}(e,t.compareKeys);if(a.length>0){s+=t.spacingOuter;const c=n+t.indent;for(let n=0;n<a.length;n++){const l=a[n];s+=`${c+i(l,t,c,o,r)}: ${i(e[l],t,c,o,r)}`,n<a.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}const m="function"==typeof Symbol&&Symbol.for?/* @__PURE__ */Symbol.for("jest.asymmetricMatcher"):1267621,g=" ",y={serialize:(e,t,n,o,r,i)=>{const s=e.toString();if("ArrayContaining"===s||"ArrayNotContaining"===s)return++o>t.maxDepth?`[${s}]`:`${s+g}[${p(e.sample,t,n,o,r,i)}]`;if("ObjectContaining"===s||"ObjectNotContaining"===s)return++o>t.maxDepth?`[${s}]`:`${s+g}{${d(e.sample,t,n,o,r,i)}}`;if("StringMatching"===s||"StringNotMatching"===s)return s+g+i(e.sample,t,n,o,r);if("StringContaining"===s||"StringNotContaining"===s)return s+g+i(e.sample,t,n,o,r);if("function"!=typeof e.toAsymmetricMatcher)throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},test:e=>e&&e.$$typeof===m},b=/* @__PURE__ */new Set(["DOMStringMap","NamedNodeMap"]),w=/^(?:HTML\w*Collection|NodeList)$/;const v={serialize:(e,t,n,o,r,i)=>{const s=e.constructor.name;return++o>t.maxDepth?`[${s}]`:(t.min?"":s+" ")+(b.has(s)?`{${d(function(e){return"NamedNodeMap"===e.constructor.name}(e)?[...e].reduce((e,t)=>(e[t.name]=t.value,e),{}):{...e},t,n,o,r,i)}}`:`[${p([...e],t,n,o,r,i)}]`)},test:e=>{return e&&e.constructor&&!!e.constructor.name&&(t=e.constructor.name,b.has(t)||w.test(t));var t}};function x(e){return e.replaceAll("<","&lt;").replaceAll(">","&gt;")}function S(e,t,n,o,r,i,s){const a=o+n.indent,c=n.colors;return e.map(e=>{const l=t[e];let u=s(l,n,a,r,i);return"string"!=typeof l&&(u.includes("\n")&&(u=n.spacingOuter+a+u+n.spacingOuter+o),u=`{${u}}`),`${n.spacingInner+o+c.prop.open+e+c.prop.close}=${c.value.open}${u}${c.value.close}`}).join("")}function k(e,t,n,o,r,i){return e.map(e=>t.spacingOuter+n+("string"==typeof e?T(e,t):i(e,t,n,o,r))).join("")}function T(e,t){const n=t.colors.content;return n.open+x(e)+n.close}function $(e,t,n,o,r){const i=o.colors.tag;return`${i.open}<${e}${t&&i.close+t+o.spacingOuter+r+i.open}${n?`>${i.close}${n}${o.spacingOuter}${r}${i.open}</${e}`:(t&&!o.min?"":" ")+"/"}>${i.close}`}function O(e,t){const n=t.colors.tag;return`${n.open}<${e}${n.close} …${n.open} />${n.close}`}const E=/^(?:(?:HTML|SVG)\w*)?Element$/;function j(e){return 11===e.nodeType}const _={serialize:(e,t,n,o,r,i)=>{if(function(e){return 3===e.nodeType}(e))return T(e.data,t);if(function(e){return 8===e.nodeType}(e))return function(e,t){const n=t.colors.comment;return`${n.open}\x3c!--${x(e)}--\x3e${n.close}`}(e.data,t);const s=j(e)?"DocumentFragment":e.tagName.toLowerCase();return++o>t.maxDepth?O(s,t):$(s,S(j(e)?[]:Array.from(e.attributes,e=>e.name).sort(),j(e)?{}:[...e.attributes].reduce((e,t)=>(e[t.name]=t.value,e),{}),t,n+t.indent,o,r,i),(j(e)||!e.shadowRoot?"":function(e,t,n,o,r,i){return!1===t.printShadowRoot?"":[`${t.spacingOuter+n}#shadow-root`,k(e,t,n+t.indent,o,r,i)].join("")}(Array.prototype.slice.call(e.shadowRoot.children),t,n+t.indent,o,r,i))+k(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,o,r,i),t,n)},test:e=>e?.constructor?.name&&function(e){const t=e.constructor.name,{nodeType:n,tagName:o}=e,r="string"==typeof o&&o.includes("-")||function(e){try{return"function"==typeof e.hasAttribute&&e.hasAttribute("is")}catch{return!1}}(e);return 1===n&&(E.test(t)||r)||3===n&&"Text"===t||8===n&&"Comment"===t||11===n&&"DocumentFragment"===t}(e)},M="@@__IMMUTABLE_ORDERED__@@",A=e=>`Immutable.${e}`,N=e=>`[${e}]`,I=" ";function P(e,t,n,o,r,i,s){return++o>t.maxDepth?N(A(s)):`${A(s)+I}[${h(e.values(),t,n,o,r,i)}]`}const C={serialize:(e,t,n,o,r,i)=>e["@@__IMMUTABLE_MAP__@@"]?function(e,t,n,o,r,i,s){return++o>t.maxDepth?N(A(s)):`${A(s)+I}{${f(e.entries(),t,n,o,r,i)}}`}(e,t,n,o,r,i,e[M]?"OrderedMap":"Map"):e["@@__IMMUTABLE_LIST__@@"]?P(e,t,n,o,r,i,"List"):e["@@__IMMUTABLE_SET__@@"]?P(e,t,n,o,r,i,e[M]?"OrderedSet":"Set"):e["@@__IMMUTABLE_STACK__@@"]?P(e,t,n,o,r,i,"Stack"):e["@@__IMMUTABLE_SEQ__@@"]?function(e,t,n,o,r,i){const s=A("Seq");return++o>t.maxDepth?N(s):e["@@__IMMUTABLE_KEYED__@@"]?`${s+I}{${e._iter||e._object?f(e.entries(),t,n,o,r,i):"…"}}`:`${s+I}[${e._iter||e._array||e._collection||e._iterable?h(e.values(),t,n,o,r,i):"…"}]`}(e,t,n,o,r,i):function(e,t,n,o,r,i){const s=A(e._name||"Record");return++o>t.maxDepth?N(s):`${s+I}{${f(function(e){let t=0;return{next(){if(t<e._keys.length){const n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}(e),t,n,o,r,i)}}`}(e,t,n,o,r,i),test:e=>e&&(!0===e["@@__IMMUTABLE_ITERABLE__@@"]||!0===e["@@__IMMUTABLE_RECORD__@@"])};function F(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var D,R,L={exports:{}},B={};var q,z,W=(R||(R=1,L.exports=function(){if(D)return B;D=1;var e=/* @__PURE__ */Symbol.for("react.transitional.element"),t=/* @__PURE__ */Symbol.for("react.portal"),n=/* @__PURE__ */Symbol.for("react.fragment"),o=/* @__PURE__ */Symbol.for("react.strict_mode"),r=/* @__PURE__ */Symbol.for("react.profiler"),i=/* @__PURE__ */Symbol.for("react.consumer"),s=/* @__PURE__ */Symbol.for("react.context"),a=/* @__PURE__ */Symbol.for("react.forward_ref"),c=/* @__PURE__ */Symbol.for("react.suspense"),l=/* @__PURE__ */Symbol.for("react.suspense_list"),u=/* @__PURE__ */Symbol.for("react.memo"),f=/* @__PURE__ */Symbol.for("react.lazy"),h=/* @__PURE__ */Symbol.for("react.view_transition"),p=/* @__PURE__ */Symbol.for("react.client.reference");function d(p){if("object"==typeof p&&null!==p){var d=p.$$typeof;switch(d){case e:switch(p=p.type){case n:case r:case o:case c:case l:case h:return p;default:switch(p=p&&p.$$typeof){case s:case a:case f:case u:case i:return p;default:return d}}case t:return d}}}return B.ContextConsumer=i,B.ContextProvider=s,B.Element=e,B.ForwardRef=a,B.Fragment=n,B.Lazy=f,B.Memo=u,B.Portal=t,B.Profiler=r,B.StrictMode=o,B.Suspense=c,B.SuspenseList=l,B.isContextConsumer=function(e){return d(e)===i},B.isContextProvider=function(e){return d(e)===s},B.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},B.isForwardRef=function(e){return d(e)===a},B.isFragment=function(e){return d(e)===n},B.isLazy=function(e){return d(e)===f},B.isMemo=function(e){return d(e)===u},B.isPortal=function(e){return d(e)===t},B.isProfiler=function(e){return d(e)===r},B.isStrictMode=function(e){return d(e)===o},B.isSuspense=function(e){return d(e)===c},B.isSuspenseList=function(e){return d(e)===l},B.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===r||e===o||e===c||e===l||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===u||e.$$typeof===s||e.$$typeof===i||e.$$typeof===a||e.$$typeof===p||void 0!==e.getModuleId)},B.typeOf=d,B}()),L.exports),V=/* @__PURE__ */u({__proto__:null,default:/* @__PURE__ */F(W)},[W]),U={exports:{}},K={};var H=(z||(z=1,U.exports=function(){if(q)return K;q=1;var e,t=/* @__PURE__ */Symbol.for("react.element"),n=/* @__PURE__ */Symbol.for("react.portal"),o=/* @__PURE__ */Symbol.for("react.fragment"),r=/* @__PURE__ */Symbol.for("react.strict_mode"),i=/* @__PURE__ */Symbol.for("react.profiler"),s=/* @__PURE__ */Symbol.for("react.provider"),a=/* @__PURE__ */Symbol.for("react.context"),c=/* @__PURE__ */Symbol.for("react.server_context"),l=/* @__PURE__ */Symbol.for("react.forward_ref"),u=/* @__PURE__ */Symbol.for("react.suspense"),f=/* @__PURE__ */Symbol.for("react.suspense_list"),h=/* @__PURE__ */Symbol.for("react.memo"),p=/* @__PURE__ */Symbol.for("react.lazy"),d=/* @__PURE__ */Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:switch(e=e.type){case o:case i:case r:case u:case f:return e;default:switch(e=e&&e.$$typeof){case c:case a:case l:case p:case h:case s:return e;default:return d}}case n:return d}}}return e=/* @__PURE__ */Symbol.for("react.module.reference"),K.ContextConsumer=a,K.ContextProvider=s,K.Element=t,K.ForwardRef=l,K.Fragment=o,K.Lazy=p,K.Memo=h,K.Portal=n,K.Profiler=i,K.StrictMode=r,K.Suspense=u,K.SuspenseList=f,K.isAsyncMode=function(){return!1},K.isConcurrentMode=function(){return!1},K.isContextConsumer=function(e){return m(e)===a},K.isContextProvider=function(e){return m(e)===s},K.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},K.isForwardRef=function(e){return m(e)===l},K.isFragment=function(e){return m(e)===o},K.isLazy=function(e){return m(e)===p},K.isMemo=function(e){return m(e)===h},K.isPortal=function(e){return m(e)===n},K.isProfiler=function(e){return m(e)===i},K.isStrictMode=function(e){return m(e)===r},K.isSuspense=function(e){return m(e)===u},K.isSuspenseList=function(e){return m(e)===f},K.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===i||t===r||t===u||t===f||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===h||t.$$typeof===s||t.$$typeof===a||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},K.typeOf=m,K}()),U.exports),G=/* @__PURE__ */u({__proto__:null,default:/* @__PURE__ */F(H)},[H]);const J=Object.fromEntries(["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"].map(e=>[e,t=>G[e](t)||V[e](t)]));function Y(e,t=[]){if(Array.isArray(e))for(const n of e)Y(n,t);else null!=e&&!1!==e&&""!==e&&t.push(e);return t}function Z(e){const t=e.type;if("string"==typeof t)return t;if("function"==typeof t)return t.displayName||t.name||"Unknown";if(J.isFragment(e))return"React.Fragment";if(J.isSuspense(e))return"React.Suspense";if("object"==typeof t&&null!==t){if(J.isContextProvider(e))return"Context.Provider";if(J.isContextConsumer(e))return"Context.Consumer";if(J.isForwardRef(e)){if(t.displayName)return t.displayName;const e=t.render.displayName||t.render.name||"";return""===e?"ForwardRef":`ForwardRef(${e})`}if(J.isMemo(e)){const e=t.displayName||t.type.displayName||t.type.name||"";return""===e?"Memo":`Memo(${e})`}}return"UNDEFINED"}const X={serialize:(e,t,n,o,r,i)=>++o>t.maxDepth?O(Z(e),t):$(Z(e),S(function(e){const{props:t}=e;return Object.keys(t).filter(e=>"children"!==e&&void 0!==t[e]).sort()}(e),e.props,t,n+t.indent,o,r,i),k(Y(e.props.children),t,n+t.indent,o,r,i),t,n),test:e=>null!=e&&J.isElement(e)},Q="function"==typeof Symbol&&Symbol.for?/* @__PURE__ */Symbol.for("react.test.json"):245830487;const ee={serialize:(e,t,n,o,r,i)=>++o>t.maxDepth?O(e.type,t):$(e.type,e.props?S(function(e){const{props:t}=e;return t?Object.keys(t).filter(e=>void 0!==t[e]).sort():[]}(e),e.props,t,n+t.indent,o,r,i):"",e.children?k(e.children,t,n+t.indent,o,r,i):"",t,n),test:e=>e&&e.$$typeof===Q},te=Object.prototype.toString,ne=Date.prototype.toISOString,oe=Error.prototype.toString,re=RegExp.prototype.toString;function ie(e){return"function"==typeof e.constructor&&e.constructor.name||"Object"}const se=/^Symbol\((.*)\)(.*)$/,ae=/\n/g;class ce extends Error{constructor(e,t){super(e),this.stack=t,this.name=this.constructor.name}}function le(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function ue(e){return String(e).replace(se,"Symbol($1)")}function fe(e){return`[${oe.call(e)}]`}function he(e,t,n,o){if(!0===e||!1===e)return`${e}`;if(void 0===e)return"undefined";if(null===e)return"null";const r=typeof e;if("number"===r)return function(e){return Object.is(e,-0)?"-0":String(e)}(e);if("bigint"===r)return function(e){return String(`${e}n`)}(e);if("string"===r)return o?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if("function"===r)return le(e,t);if("symbol"===r)return ue(e);const i=te.call(e);return"[object WeakMap]"===i?"WeakMap {}":"[object WeakSet]"===i?"WeakSet {}":"[object Function]"===i||"[object GeneratorFunction]"===i?le(e,t):"[object Symbol]"===i?ue(e):"[object Date]"===i?Number.isNaN(+e)?"Date { NaN }":ne.call(e):"[object Error]"===i?fe(e):"[object RegExp]"===i?n?re.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):re.call(e):e instanceof Error?fe(e):null}function pe(e,t,n,o,r,i){if(r.includes(e))return"[Circular]";(r=[...r]).push(e);const s=++o>t.maxDepth,a=t.min;if(t.callToJSON&&!s&&e.toJSON&&"function"==typeof e.toJSON&&!i)return ye(e.toJSON(),t,n,o,r,!0);const c=te.call(e);return"[object Arguments]"===c?s?"[Arguments]":`${a?"":"Arguments "}[${p(e,t,n,o,r,ye)}]`:function(e){return"[object Array]"===e||"[object ArrayBuffer]"===e||"[object DataView]"===e||"[object Float32Array]"===e||"[object Float64Array]"===e||"[object Int8Array]"===e||"[object Int16Array]"===e||"[object Int32Array]"===e||"[object Uint8Array]"===e||"[object Uint8ClampedArray]"===e||"[object Uint16Array]"===e||"[object Uint32Array]"===e}(c)?s?`[${e.constructor.name}]`:`${a?"":t.printBasicPrototype||"Array"!==e.constructor.name?`${e.constructor.name} `:""}[${p(e,t,n,o,r,ye)}]`:"[object Map]"===c?s?"[Map]":`Map {${f(e.entries(),t,n,o,r,ye," => ")}}`:"[object Set]"===c?s?"[Set]":`Set {${h(e.values(),t,n,o,r,ye)}}`:s||function(e){return"undefined"!=typeof window&&e===window}(e)?`[${ie(e)}]`:`${a?"":t.printBasicPrototype||"Object"!==ie(e)?`${ie(e)} `:""}{${d(e,t,n,o,r,ye)}}`}const de={test:e=>e&&e instanceof Error,serialize(e,t,n,o,r,i){if(r.includes(e))return"[Circular]";r=[...r,e];const s=++o>t.maxDepth,{message:a,cause:c,...l}=e,u={message:a,...void 0!==c?{cause:c}:{},...e instanceof AggregateError?{errors:e.errors}:{},...l},h="Error"!==e.name?e.name:ie(e);return s?`[${h}]`:`${h} {${f(Object.entries(u).values(),t,n,o,r,i)}}`}};function me(e,t,n,o,r,i){let s;try{s=function(e){return null!=e.serialize}(e)?e.serialize(t,n,o,r,i,ye):e.print(t,e=>ye(e,n,o,r,i),e=>{const t=o+n.indent;return t+e.replaceAll(ae,`\n${t}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(a){throw new ce(a.message,a.stack)}if("string"!=typeof s)throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof s}".`);return s}function ge(e,t){for(const o of e)try{if(o.test(t))return o}catch(n){throw new ce(n.message,n.stack)}return null}function ye(e,t,n,o,r,i){const s=ge(t.plugins,e);if(null!==s)return me(s,e,t,n,o,r);const a=he(e,t.printFunctionName,t.escapeRegex,t.escapeString);return null!==a?a:pe(e,t,n,o,r,i)}const be={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},we=Object.keys(be),ve={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:be};function xe(e){return e?.printFunctionName??ve.printFunctionName}function Se(e){return e?.escapeRegex??ve.escapeRegex}function ke(e){return e?.escapeString??ve.escapeString}function Te(e){return{callToJSON:e?.callToJSON??ve.callToJSON,colors:e?.highlight?we.reduce((e,t)=>{const n=be[t],o=n&&l[n];if(!o||"string"!=typeof o.close||"string"!=typeof o.open)throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e[t]=o,e},/* @__PURE__ */Object.create(null)):we.reduce((e,t)=>(e[t]={close:"",open:""},e),/* @__PURE__ */Object.create(null)),compareKeys:"function"==typeof e?.compareKeys||null===e?.compareKeys?e.compareKeys:ve.compareKeys,escapeRegex:Se(e),escapeString:ke(e),indent:e?.min?"":(t=e?.indent??ve.indent,Array.from({length:t+1}).join(" ")),maxDepth:e?.maxDepth??ve.maxDepth,maxWidth:e?.maxWidth??ve.maxWidth,min:e?.min??ve.min,plugins:e?.plugins??ve.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:xe(e),printShadowRoot:e?.printShadowRoot??!0,spacingInner:e?.min?" ":"\n",spacingOuter:e?.min?"":"\n"};var t}function $e(e,t){if(t&&(function(e){for(const t of Object.keys(e))if(!Object.hasOwn(ve,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&void 0!==e.indent&&0!==e.indent)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}(t),t.plugins)){const n=ge(t.plugins,e);if(null!==n)return me(n,e,Te(t),"",0,[])}const n=he(e,xe(t),Se(t),ke(t));return null!==n?n:pe(e,Te(t),"",0,[])}const Oe={AsymmetricMatcher:y,DOMCollection:v,DOMElement:_,Immutable:C,ReactElement:X,ReactTestComponent:ee,Error:de},Ee={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},je={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},_e="…";function Me(e,t){const n=Ee[je[t]]||Ee[t]||"";return n?`[${n[0]}m${String(e)}[${n[1]}m`:String(e)}function Ae(e,t,n=_e){e=String(e);const o=n.length,r=e.length;if(o>t&&r>o)return n;if(r>t&&r>o){let r=t-o;return r>0&&((i=e[r-1])>="\ud800"&&i<="\udbff")&&(r-=1),`${e.slice(0,r)}${n}`}var i;return e}function Ne(e,t,n,o=", "){n=n||t.inspect;const r=e.length;if(0===r)return"";const i=t.truncate;let s="",a="",c="";for(let l=0;l<r;l+=1){const r=l+1===e.length,u=l+2===e.length;c=`${_e}(${e.length-l})`;const f=e[l];t.truncate=i-s.length-(r?0:o.length);const h=a||n(f,t)+(r?"":o),p=s.length+h.length,d=p+c.length;if(r&&p>i&&s.length+c.length<=i)break;if(!r&&!u&&d>i)break;if(a=r?"":n(e[l+1],t)+(u?"":o),!r&&u&&d>i&&p+a.length>i)break;if(s+=h,!r&&!u&&p+a.length>=i){c=`${_e}(${e.length-l-1})`;break}c=""}return`${s}${c}`}function Ie([e,t],n){return n.truncate-=2,"string"==typeof e?e=function(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}(e):"number"!=typeof e&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,`${e}: ${t=n.inspect(t,n)}`}function Pe(e,t){const n=(e=>"function"==typeof Buffer&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name)(e);t.truncate-=n.length+4;const o=Object.keys(e).slice(e.length);if(!e.length&&!o.length)return`${n}[]`;let r="";for(let s=0;s<e.length;s++){const n=`${t.stylize(Ae(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=n.length,e[s]!==e.length&&t.truncate<=3){r+=`${_e}(${e.length-e[s]+1})`;break}r+=n}let i="";return o.length&&(i=Ne(o.map(t=>[t,e[t]]),t,Ie)),`${n}[ ${r}${i?`, ${i}`:""} ]`}function Ce(e,t){const n=e[Symbol.toStringTag]||"Function",o=e.name;return o?t.stylize(`[${n} ${Ae(o,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function Fe([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,`${e} => ${t=n.inspect(t,n)}`}const De=Number.isNaN||(e=>e!=e);function Re(e,t){return De(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):0===e?t.stylize(1/e==1/0?"+0":"-0","number"):t.stylize(Ae(String(e),t.truncate),"number")}function Le(e,t){let n=Ae(e.toString(),t.truncate-1);return n!==_e&&(n+="n"),t.stylize(n,"bigint")}const Be=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),qe={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"};function ze(e){return qe[e]||`\\u${`0000${e.charCodeAt(0).toString(16)}`.slice(-4)}`}function We(e,t){return Be.test(e)&&(e=e.replace(Be,ze)),t.stylize(`'${Ae(e,t.truncate-2)}'`,"string")}function Ve(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}function Ue(e,t){const n=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(0===n.length&&0===o.length)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const r=Ne(n.map(t=>[t,e[t]]),t,Ie),i=Ne(o.map(t=>[t,e[t]]),t,Ie);t.seen.pop();let s="";return r&&i&&(s=", "),`{ ${r}${s}${i} }`}const Ke=!("undefined"==typeof Symbol||!Symbol.toStringTag)&&Symbol.toStringTag;const He=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Ge([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function Je(e,t){return Ne(e,t,Ye,"\n")}function Ye(e,t){switch(e.nodeType){case 1:return Ze(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function Ze(e,t){const n=e.getAttributeNames(),o=e.tagName.toLowerCase(),r=t.stylize(`<${o}`,"special"),i=t.stylize(">","special"),s=t.stylize(`</${o}>`,"special");t.truncate-=2*o.length+5;let a="";n.length>0&&(a+=" ",a+=Ne(n.map(t=>[t,e.getAttribute(t)]),t,Ge," ")),t.truncate-=a.length;const c=t.truncate;let l=Je(e.children,t);return l&&l.length>c&&(l=`${_e}(${e.children.length})`),`${r}${a}${i}${l}${s}`}const Xe="function"==typeof Symbol&&"function"==typeof Symbol.for?/* @__PURE__ */Symbol.for("chai/inspect"):"@@chai/inspect",Qe=/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom"),et=/* @__PURE__ */new WeakMap,tt={},nt={undefined:(e,t)=>t.stylize("undefined","undefined"),null:(e,t)=>t.stylize("null","null"),boolean:(e,t)=>t.stylize(String(e),"boolean"),Boolean:(e,t)=>t.stylize(String(e),"boolean"),number:Re,Number:Re,bigint:Le,BigInt:Le,string:We,String:We,function:Ce,Function:Ce,symbol:Ve,Symbol:Ve,Array:function(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const o=Ne(e,t);t.truncate-=o.length;let r="";return n.length&&(r=Ne(n.map(t=>[t,e[t]]),t,Ie)),`[ ${o}${r?`, ${r}`:""} ]`},Date:function(e,t){const n=e.toJSON();if(null===n)return"Invalid Date";const o=n.split("T"),r=o[0];return t.stylize(`${r}T${Ae(o[1],t.truncate-r.length-1)}`,"date")},Map:function(e,t){return 0===e.size?"Map{}":(t.truncate-=7,`Map{ ${Ne(function(e){const t=[];return e.forEach((e,n)=>{t.push([n,e])}),t}(e),t,Fe)} }`)},Set:function(e,t){return 0===e.size?"Set{}":(t.truncate-=7,`Set{ ${Ne(function(e){const t=[];return e.forEach(e=>{t.push(e)}),t}(e),t)} }`)},RegExp:function(e,t){const n=e.toString().split("/")[2],o=t.truncate-(2+n.length),r=e.source;return t.stylize(`/${Ae(r,o)}/${n}`,"regexp")},Promise:()=>"Promise{…}",WeakSet:(e,t)=>t.stylize("WeakSet{…}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{…}","special"),Arguments:function(e,t){return 0===e.length?"Arguments[]":(t.truncate-=13,`Arguments[ ${Ne(e,t)} ]`)},Int8Array:Pe,Uint8Array:Pe,Uint8ClampedArray:Pe,Int16Array:Pe,Uint16Array:Pe,Int32Array:Pe,Uint32Array:Pe,Float32Array:Pe,Float64Array:Pe,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:function(e,t){const n=Object.getOwnPropertyNames(e).filter(e=>-1===He.indexOf(e)),o=e.name;t.truncate-=o.length;let r="";if("string"==typeof e.message?r=Ae(e.message,t.truncate):n.unshift("message"),r=r?`: ${r}`:"",t.truncate-=r.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const i=Ne(n.map(t=>[t,e[t]]),t,Ie);return`${o}${r}${i?` { ${i} }`:""}`},HTMLCollection:Je,NodeList:Je},ot=Object.prototype.toString;function rt(e,t={}){const n=function({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:o=!0,showProxy:r=!1,maxArrayLength:i=1/0,breakLength:s=1/0,seen:a=[],truncate:c=1/0,stylize:l=String}={},u){const f={showHidden:Boolean(e),depth:Number(t),colors:Boolean(n),customInspect:Boolean(o),showProxy:Boolean(r),maxArrayLength:Number(i),breakLength:Number(s),truncate:Number(c),seen:a,inspect:u,stylize:l};return f.colors&&(f.stylize=Me),f}(t,rt),{customInspect:o}=n;let r=null===e?"null":typeof e;if("object"===r&&(r=ot.call(e).slice(8,-1)),r in nt)return nt[r](e,n);if(o&&e){const t=((e,t,n,o)=>Xe in e&&"function"==typeof e[Xe]?e[Xe](t):Qe in e&&"function"==typeof e[Qe]?e[Qe](t.depth,t,o):"inspect"in e&&"function"==typeof e.inspect?e.inspect(t.depth,t):"constructor"in e&&et.has(e.constructor)?et.get(e.constructor)(e,t):tt[n]?tt[n](e,t):"")(e,n,r,rt);if(t)return"string"==typeof t?t:rt(t,n)}const i=!!e&&Object.getPrototypeOf(e);return i===Object.prototype||null===i?Ue(e,n):e&&"function"==typeof HTMLElement&&e instanceof HTMLElement?Ze(e,n):"constructor"in e?e.constructor!==Object?function(e,t){let n="";return Ke&&Ke in e&&(n=e[Ke]),n=n||e.constructor.name,n&&"_class"!==n||(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Ue(e,t)}`}(e,n):Ue(e,n):e===Object(e)?Ue(e,n):n.stylize(String(e),r)}const{AsymmetricMatcher:it,DOMCollection:st,DOMElement:at,Immutable:ct,ReactElement:lt,ReactTestComponent:ut}=Oe,ft=[ut,lt,at,st,ct,it];function ht(e,t=10,{maxLength:n,...o}={}){const r=n??1e4;let i;try{i=$e(e,{maxDepth:t,escapeString:!1,plugins:ft,...o})}catch{i=$e(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:ft,...o})}return i.length>=r&&t>1?ht(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,...o}):i}const pt=/%[sdjifoOc%]/g;function dt(...e){return function(e,t={}){const n=(e,n)=>t.prettifyObject?ht(e,void 0,{printBasicPrototype:!1,escapeString:!1}):mt(e,n);if("string"!=typeof e[0]){const t=[];for(let o=0;o<e.length;o++)t.push(n(e[o],{depth:0,colors:!1}));return t.join(" ")}const o=e.length;let r=1;const i=e[0];let s=String(i).replace(pt,t=>{if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":{const t=e[r++];return"bigint"==typeof t?`${t.toString()}n`:"number"==typeof t&&0===t&&1/t<0?"-0":"object"==typeof t&&null!==t?"function"==typeof t.toString&&t.toString!==Object.prototype.toString?t.toString():n(t,{depth:0,colors:!1}):String(t)}case"%d":{const t=e[r++];return"bigint"==typeof t?`${t.toString()}n`:Number(t).toString()}case"%i":{const t=e[r++];return"bigint"==typeof t?`${t.toString()}n`:Number.parseInt(String(t)).toString()}case"%f":return Number.parseFloat(String(e[r++])).toString();case"%o":return n(e[r++],{showHidden:!0,showProxy:!0});case"%O":return n(e[r++]);case"%c":return r++,"";case"%j":try{return JSON.stringify(e[r++])}catch(i){const e=i.message;if(e.includes("circular structure")||e.includes("cyclic structures")||e.includes("cyclic object"))return"[Circular]";throw i}default:return t}});for(let a=e[r];r<o;a=e[++r])s+=null===a||"object"!=typeof a?` ${a}`:` ${n(a)}`;return s}(e)}function mt(e,t={}){return 0===t.truncate&&(t.truncate=Number.POSITIVE_INFINITY),rt(e,t)}function gt(e,t,n){const o=typeof e;if(!n.includes(o))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${o}"`)}function yt(e){return null==e&&(e=[]),Array.isArray(e)?e:[e]}function bt(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function wt(e){return Object.prototype.toString.apply(e).slice(8,-1)}function vt(e){const t=/* @__PURE__ */new Set;return function(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}(e)?[]:(function(e,t){const n="function"==typeof t?t:e=>t.add(e);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}(e,t),Array.from(t))}const xt={forceWritable:!1};function St(e,t=xt){return kt(e,/* @__PURE__ */new WeakMap,t)}function kt(e,t,n=xt){let o,r;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(r=Array.from({length:o=e.length}),t.set(e,r);o--;)r[o]=kt(e[o],t,n);return r}if("[object Object]"===Object.prototype.toString.call(e)){r=Object.create(Object.getPrototypeOf(e)),t.set(e,r);const o=vt(e);for(const i of o){const o=Object.getOwnPropertyDescriptor(e,i);if(!o)continue;const s=kt(e[i],t,n);n.forceWritable?Object.defineProperty(r,i,{enumerable:o.enumerable,configurable:!0,writable:!0,value:s}):"get"in o?Object.defineProperty(r,i,{...o,get:()=>s}):Object.defineProperty(r,i,{...o,value:s})}return r}return e}function Tt(){}function $t(e,t,n=void 0){const o=t.replace(/\[(\d+)\]/g,".$1").split(".");let r=e;for(const i of o)if(r=new Object(r)[i],void 0===r)return n;return r}function Ot(){let e=null,t=null;const n=new Promise((n,o)=>{e=n,t=o});return n.resolve=e,n.reject=t,n}function Et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const jt=-1;class _t{0;1;constructor(e,t){this[0]=e,this[1]=t}}function Mt(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,o=Math.min(e.length,t.length),r=o,i=0;for(;n<r;)e.substring(i,r)===t.substring(i,r)?(n=r,i=n):o=r,r=Math.floor((o-n)/2+n);return r}function At(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,o=Math.min(e.length,t.length),r=o,i=0;for(;n<r;)e.substring(e.length-r,e.length-i)===t.substring(t.length-r,t.length-i)?(n=r,i=n):o=r,r=Math.floor((o-n)/2+n);return r}function Nt(e,t){const n=e.length,o=t.length;if(0===n||0===o)return 0;n>o?e=e.substring(n-o):n<o&&(t=t.substring(0,n));const r=Math.min(n,o);if(e===t)return r;let i=0,s=1;for(;;){const n=e.substring(r-s),o=t.indexOf(n);if(-1===o)return i;s+=o,0!==o&&e.substring(r-s)!==t.substring(0,s)||(i=s,s++)}}function It(e){let t=!1;const n=[];let o=0,r=null,i=0,s=0,a=0,c=0,l=0;for(;i<e.length;)0===e[i][0]?(n[o++]=i,s=c,a=l,c=0,l=0,r=e[i][1]):(1===e[i][0]?c+=e[i][1].length:l+=e[i][1].length,r&&r.length<=Math.max(s,a)&&r.length<=Math.max(c,l)&&(e.splice(n[o-1],0,new _t(jt,r)),e[n[o-1]+1][0]=1,o--,o--,i=o>0?n[o-1]:-1,s=0,a=0,c=0,l=0,r=null,t=!0)),i++;for(t&&Lt(e),function(e){let t=1;for(;t<e.length-1;){if(0===e[t-1][0]&&0===e[t+1][0]){let n=e[t-1][1],o=e[t][1],r=e[t+1][1];const i=At(n,o);if(i){const e=o.substring(o.length-i);n=n.substring(0,n.length-i),o=e+o.substring(0,o.length-i),r=e+r}let s=n,a=o,c=r,l=Bt(n,o)+Bt(o,r);for(;o.charAt(0)===r.charAt(0);){n+=o.charAt(0),o=o.substring(1)+r.charAt(0),r=r.substring(1);const e=Bt(n,o)+Bt(o,r);e>=l&&(l=e,s=n,a=o,c=r)}e[t-1][1]!==s&&(s?e[t-1][1]=s:(e.splice(t-1,1),t--),e[t][1]=a,c?e[t+1][1]=c:(e.splice(t+1,1),t--))}t++}}(e),i=1;i<e.length;){if(e[i-1][0]===jt&&1===e[i][0]){const t=e[i-1][1],n=e[i][1],o=Nt(t,n),r=Nt(n,t);o>=r?(o>=t.length/2||o>=n.length/2)&&(e.splice(i,0,new _t(0,n.substring(0,o))),e[i-1][1]=t.substring(0,t.length-o),e[i+1][1]=n.substring(o),i++):(r>=t.length/2||r>=n.length/2)&&(e.splice(i,0,new _t(0,t.substring(0,r))),e[i-1][0]=1,e[i-1][1]=n.substring(0,n.length-r),e[i+1][0]=jt,e[i+1][1]=t.substring(r),i++),i++}i++}}const Pt=/[^a-z0-9]/i,Ct=/\s/,Ft=/[\r\n]/,Dt=/\n\r?\n$/,Rt=/^\r?\n\r?\n/;function Lt(e){var t;e.push(new _t(0,""));let n,o=0,r=0,i=0,s="",a="";for(;o<e.length;)switch(e[o][0]){case 1:i++,a+=e[o][1],o++;break;case jt:r++,s+=e[o][1],o++;break;case 0:r+i>1?(0!==r&&0!==i&&(n=Mt(a,s),0!==n&&(o-r-i>0&&0===e[o-r-i-1][0]?e[o-r-i-1][1]+=a.substring(0,n):(e.splice(0,0,new _t(0,a.substring(0,n))),o++),a=a.substring(n),s=s.substring(n)),n=At(a,s),0!==n&&(e[o][1]=a.substring(a.length-n)+e[o][1],a=a.substring(0,a.length-n),s=s.substring(0,s.length-n))),o-=r+i,e.splice(o,r+i),s.length&&(e.splice(o,0,new _t(jt,s)),o++),a.length&&(e.splice(o,0,new _t(1,a)),o++),o++):0!==o&&0===e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,i=0,r=0,s="",a=""}""===(null===(t=e.at(-1))||void 0===t?void 0:t[1])&&e.pop();let c=!1;for(o=1;o<e.length-1;)0===e[o-1][0]&&0===e[o+1][0]&&(e[o][1].substring(e[o][1].length-e[o-1][1].length)===e[o-1][1]?(e[o][1]=e[o-1][1]+e[o][1].substring(0,e[o][1].length-e[o-1][1].length),e[o+1][1]=e[o-1][1]+e[o+1][1],e.splice(o-1,1),c=!0):e[o][1].substring(0,e[o+1][1].length)===e[o+1][1]&&(e[o-1][1]+=e[o+1][1],e[o][1]=e[o][1].substring(e[o+1][1].length)+e[o+1][1],e.splice(o+1,1),c=!0)),o++;c&&Lt(e)}function Bt(e,t){if(!e||!t)return 6;const n=e.charAt(e.length-1),o=t.charAt(0),r=n.match(Pt),i=o.match(Pt),s=r&&n.match(Ct),a=i&&o.match(Ct),c=s&&n.match(Ft),l=a&&o.match(Ft),u=c&&e.match(Dt),f=l&&t.match(Rt);return u||f?5:c||l?4:r&&!s&&a?3:s||a?2:r||i?1:0}const qt="Compared values have no visual difference.";var zt,Wt={};function Vt(){if(zt)return Wt;zt=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.default=function(e,r,i,s){l("aLength",e),l("bLength",r),u("isCommon",i),u("foundSubsequence",s);const a=n(0,e,0,r,i);0!==a&&s(a,0,0);if(e!==a||r!==a){const n=a,l=a,u=o(n,e-1,l,r-1,i),f=e-u,h=r-u,p=a+u;if(e!==p&&r!==p){c(0,n,f,l,h,!1,[{foundSubsequence:s,isCommon:i}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t})}0!==u&&s(u,f,h)}};const e="diff-sequences",t=0,n=(e,t,n,o,r)=>{let i=0;for(;e<t&&n<o&&r(e,n);)e+=1,n+=1,i+=1;return i},o=(e,t,n,o,r)=>{let i=0;for(;e<=t&&n<=o&&r(t,o);)t-=1,o-=1,i+=1;return i},r=(e,t,o,r,i,s,a)=>{let c=0,l=-e,u=s[c],f=u;s[c]+=n(u+1,t,r+u-l+1,o,i);const h=e<a?e:a;for(c+=1,l+=2;c<=h;c+=1,l+=2){if(c!==e&&f<s[c])u=s[c];else if(u=f+1,t<=u)return c-1;f=s[c],s[c]=u+n(u+1,t,r+u-l+1,o,i)}return a},i=(e,t,n,r,i,s,a)=>{let c=0,l=e,u=s[c],f=u;s[c]-=o(t,u-1,n,r+u-l-1,i);const h=e<a?e:a;for(c+=1,l-=2;c<=h;c+=1,l-=2){if(c!==e&&s[c]<f)u=s[c];else if(u=f-1,u<t)return c-1;f=s[c],s[c]=u-o(t,u-1,n,r+u-l-1,i)}return a},s=(e,r,i,s,a,c,l,u,f,h,p)=>{const d=s-r,m=a-s-(i-r),g=-m-(e-1),y=e-1-m;let b=t;const w=e<u?e:u;for(let t=0,v=-e;t<=w;t+=1,v+=2){const u=0===t||t!==e&&b<l[t],w=u?l[t]:b,x=u?w:w+1,S=d+x-v,k=n(x+1,i,S+1,a,c),T=x+k;if(b=l[t],l[t]=T,g<=v&&v<=y){const t=(e-1-(v+m))/2;if(t<=h&&f[t]-1<=T){const t=d+w-(u?v+1:v-1),n=o(r,w,s,t,c),l=w-n+1,f=t-n+1;p.nChangePreceding=e-1,e-1===l+f-r-s?(p.aEndPreceding=r,p.bEndPreceding=s):(p.aEndPreceding=l,p.bEndPreceding=f),p.nCommonPreceding=n,0!==n&&(p.aCommonPreceding=l,p.bCommonPreceding=f),p.nCommonFollowing=k,0!==k&&(p.aCommonFollowing=x+1,p.bCommonFollowing=S+1);const h=T+1,m=S+k+1;return p.nChangeFollowing=e-1,e-1===i+a-h-m?(p.aStartFollowing=i,p.bStartFollowing=a):(p.aStartFollowing=h,p.bStartFollowing=m),!0}}}return!1},a=(e,r,i,s,a,c,l,u,f,h,p)=>{const d=a-i,m=a-s-(i-r),g=m-e,y=m+e;let b=t;const w=e<h?e:h;for(let t=0,v=e;t<=w;t+=1,v-=2){const h=0===t||t!==e&&f[t]<b,w=h?f[t]:b,x=h?w:w-1,S=d+x-v,k=o(r,x-1,s,S-1,c),T=x-k;if(b=f[t],f[t]=T,g<=v&&v<=y){const t=(e+(v-m))/2;if(t<=u&&T-1<=l[t]){const t=S-k;if(p.nChangePreceding=e,e===T+t-r-s?(p.aEndPreceding=r,p.bEndPreceding=s):(p.aEndPreceding=T,p.bEndPreceding=t),p.nCommonPreceding=k,0!==k&&(p.aCommonPreceding=T,p.bCommonPreceding=t),p.nChangeFollowing=e-1,1===e)p.nCommonFollowing=0,p.aStartFollowing=i,p.bStartFollowing=a;else{const t=d+w-(h?v-1:v+1),o=n(w,i,t,a,c);p.nCommonFollowing=o,0!==o&&(p.aCommonFollowing=w,p.bCommonFollowing=t);const r=w+o,s=t+o;e-1===i+a-r-s?(p.aStartFollowing=i,p.bStartFollowing=a):(p.aStartFollowing=r,p.bStartFollowing=s)}return!0}}}return!1},c=(t,n,o,l,u,f,h,p,d,m)=>{if(u-l<o-n){if((f=!f)&&1===h.length){const{foundSubsequence:e,isCommon:t}=h[0];h[1]={foundSubsequence:(t,n,o)=>{e(t,o,n)},isCommon:(e,n)=>t(n,e)}}const e=n,t=o;n=l,o=u,l=e,u=t}const{foundSubsequence:g,isCommon:y}=h[f?1:0];((t,n,o,c,l,u,f,h,p)=>{const d=c-n,m=l-o,g=o-n,y=l-c,b=y-g;let w=g,v=g;if(f[0]=n-1,h[0]=o,b%2==0){const e=(t||b)/2,s=(g+y)/2;for(let t=1;t<=s;t+=1)if(w=r(t,o,l,d,u,f,w),t<e)v=i(t,n,c,m,u,h,v);else if(a(t,n,o,c,l,u,f,w,h,v,p))return}else{const e=((t||b)+1)/2,a=(g+y+1)/2;let x=1;for(w=r(x,o,l,d,u,f,w),x+=1;x<=a;x+=1)if(v=i(x-1,n,c,m,u,h,v),x<e)w=r(x,o,l,d,u,f,w);else if(s(x,n,o,c,l,u,f,w,h,v,p))return}throw new Error(`${e}: no overlap aStart=${n} aEnd=${o} bStart=${c} bEnd=${l}`)})(t,n,o,l,u,y,p,d,m);const{nChangePreceding:b,aEndPreceding:w,bEndPreceding:v,nCommonPreceding:x,aCommonPreceding:S,bCommonPreceding:k,nCommonFollowing:T,aCommonFollowing:$,bCommonFollowing:O,nChangeFollowing:E,aStartFollowing:j,bStartFollowing:_}=m;n<w&&l<v&&c(b,n,w,l,v,f,h,p,d,m),0!==x&&g(x,S,k),0!==T&&g(T,$,O),j<o&&_<u&&c(E,j,o,_,u,f,h,p,d,m)},l=(t,n)=>{if("number"!=typeof n)throw new TypeError(`${e}: ${t} typeof ${typeof n} is not a number`);if(!Number.isSafeInteger(n))throw new RangeError(`${e}: ${t} value ${n} is not a safe integer`);if(n<0)throw new RangeError(`${e}: ${t} value ${n} is a negative integer`)},u=(t,n)=>{const o=typeof n;if("function"!==o)throw new TypeError(`${e}: ${t} typeof ${o} is not a function`)};return Wt}var Ut=/* @__PURE__ */Et(/* @__PURE__ */Vt());function Kt(e,t,n,o,r,i){return 0!==e.length?n(`${o} ${function(e,t){return e.replace(/\s+$/,e=>t(e))}(e,r)}`):" "!==o?n(o):t&&0!==i.length?n(`${o} ${i}`):""}function Ht(e,t,{aColor:n,aIndicator:o,changeLineTrailingSpaceColor:r,emptyFirstOrLastLinePlaceholder:i}){return Kt(e,t,n,o,r,i)}function Gt(e,t,{bColor:n,bIndicator:o,changeLineTrailingSpaceColor:r,emptyFirstOrLastLinePlaceholder:i}){return Kt(e,t,n,o,r,i)}function Jt(e,t,{commonColor:n,commonIndicator:o,commonLineTrailingSpaceColor:r,emptyFirstOrLastLinePlaceholder:i}){return Kt(e,t,n,o,r,i)}function Yt(e,t,n,o,{patchColor:r}){return r(`@@ -${e+1},${t-e} +${n+1},${o-n} @@`)}const Zt=e=>e;function Xt(e={}){return{aAnnotation:"Expected",aColor:l.green,aIndicator:"-",bAnnotation:"Received",bColor:l.red,bIndicator:"+",changeColor:l.inverse,changeLineTrailingSpaceColor:Zt,commonColor:l.dim,commonIndicator:" ",commonLineTrailingSpaceColor:Zt,compareKeys:void 0,contextLines:5,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:l.yellow,printBasicPrototype:!1,truncateThreshold:0,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:Zt,...e,compareKeys:(n=e.compareKeys,n&&"function"==typeof n?n:void 0),contextLines:(t=e.contextLines,"number"==typeof t&&Number.isSafeInteger(t)&&t>=0?t:5)};var t,n}function Qt(e){return 1===e.length&&0===e[0].length}function en(e,t,n){return function({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:o,bColor:r,bIndicator:i,includeChangeCounts:s,omitAnnotationLines:a},c){if(a)return"";let l="",u="";if(s){const t=String(c.a),r=String(c.b),s=o.length-e.length,a=" ".repeat(Math.max(0,s)),f=" ".repeat(Math.max(0,-s)),h=r.length-t.length;l=`${a} ${n} ${" ".repeat(Math.max(0,h))}${t}`,u=`${f} ${i} ${" ".repeat(Math.max(0,-h))}${r}`}const f=`${i} ${o}${u}`;return`${t(`${n} ${e}${l}`)}\n${r(f)}\n\n`}(n,function(e){let t=0,n=0;return e.forEach(e=>{switch(e[0]){case jt:t+=1;break;case 1:n+=1}}),{a:t,b:n}}(e))+(n.expand?function(e,t){return e.map((e,n,o)=>{const r=e[1],i=0===n||n===o.length-1;switch(e[0]){case jt:return Ht(r,i,t);case 1:return Gt(r,i,t);default:return Jt(r,i,t)}}).join("\n")}(e,n):function(e,t){const n=e.length,o=t.contextLines,r=o+o;let i=n,s=!1,a=0,c=0;for(;c!==n;){const t=c;for(;c!==n&&0===e[c][0];)c+=1;if(t!==c)if(0===t)c>o&&(i-=c-o,s=!0);else if(c===n){const e=c-t;e>o&&(i-=e-o,s=!0)}else{const e=c-t;e>r&&(i-=e-r,a+=1)}for(;c!==n&&0!==e[c][0];)c+=1}const l=0!==a||s;0!==a?i+=a+1:s&&(i+=1);const u=i-1,f=[];let h=0;l&&f.push("");let p=0,d=0,m=0,g=0;const y=e=>{const n=f.length;f.push(Jt(e,0===n||n===u,t)),m+=1,g+=1},b=e=>{const n=f.length;f.push(Ht(e,0===n||n===u,t)),m+=1},w=e=>{const n=f.length;f.push(Gt(e,0===n||n===u,t)),g+=1};for(c=0;c!==n;){let i=c;for(;c!==n&&0===e[c][0];)c+=1;if(i!==c)if(0===i){c>o&&(i=c-o,p=i,d=i,m=p,g=d);for(let t=i;t!==c;t+=1)y(e[t][1])}else if(c===n){const t=c-i>o?i+o:c;for(let n=i;n!==t;n+=1)y(e[n][1])}else{const n=c-i;if(n>r){const s=i+o;for(let t=i;t!==s;t+=1)y(e[t][1]);f[h]=Yt(p,m,d,g,t),h=f.length,f.push("");const a=n-r;p=m+a,d=g+a,m=p,g=d;for(let t=c-o;t!==c;t+=1)y(e[t][1])}else for(let t=i;t!==c;t+=1)y(e[t][1])}for(;c!==n&&e[c][0]===jt;)b(e[c][1]),c+=1;for(;c!==n&&1===e[c][0];)w(e[c][1]),c+=1}return l&&(f[h]=Yt(p,m,d,g,t)),f.join("\n")}(e,n))+(t?n.truncateAnnotationColor(`\n${n.truncateAnnotation}`):"")}function tn(e,t,n){const o=Xt(n),[r,i]=nn(Qt(e)?[]:e,Qt(t)?[]:t,o);return en(r,i,o)}function nn(e,t,n){const o=(null==n?void 0:n.truncateThreshold)??!1,r=Math.max(Math.floor((null==n?void 0:n.truncateThreshold)??0),0),i=o?Math.min(e.length,r):e.length,s=o?Math.min(t.length,r):t.length,a=i!==e.length||s!==t.length,c=[];let l=0,u=0;for(Ut(i,s,(n,o)=>e[n]===t[o],(n,o,r)=>{for(;l!==o;l+=1)c.push(new _t(jt,e[l]));for(;u!==r;u+=1)c.push(new _t(1,t[u]));for(;0!==n;n-=1,l+=1,u+=1)c.push(new _t(0,t[u]))});l!==i;l+=1)c.push(new _t(jt,e[l]));for(;u!==s;u+=1)c.push(new _t(1,t[u]));return[c,a]}function on(e){if(void 0===e)return"undefined";if(null===e)return"null";if(Array.isArray(e))return"array";if("boolean"==typeof e)return"boolean";if("function"==typeof e)return"function";if("number"==typeof e)return"number";if("string"==typeof e)return"string";if("bigint"==typeof e)return"bigint";if("object"==typeof e){if(null!=e){if(e.constructor===RegExp)return"regexp";if(e.constructor===Map)return"map";if(e.constructor===Set)return"set";if(e.constructor===Date)return"date"}return"object"}if("symbol"==typeof e)return"symbol";throw new Error(`value of unknown type: ${e}`)}function rn(e){return e.includes("\r\n")?"\r\n":"\n"}class sn{op;line;lines;changeColor;constructor(e,t){this.op=e,this.line=[],this.lines=[],this.changeColor=t}pushSubstring(e){this.pushDiff(new _t(this.op,e))}pushLine(){var e,t,n;this.lines.push(1!==this.line.length?new _t(this.op,(e=this.op,t=this.line,n=this.changeColor,t.reduce((t,o)=>t+(0===o[0]?o[1]:o[0]===e&&0!==o[1].length?n(o[1]):""),""))):this.line[0][0]===this.op?this.line[0]:new _t(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return 0===this.line.length}pushDiff(e){this.line.push(e)}align(e){const t=e[1];if(t.includes("\n")){const e=t.split("\n"),n=e.length-1;e.forEach((e,t)=>{t<n?(this.pushSubstring(e),this.pushLine()):0!==e.length&&this.pushSubstring(e)})}else this.pushDiff(e)}moveLinesTo(e){this.isLineEmpty()||this.pushLine(),e.push(...this.lines),this.lines.length=0}}class an{deleteBuffer;insertBuffer;lines;constructor(e,t){this.deleteBuffer=e,this.insertBuffer=t,this.lines=[]}pushDiffCommonLine(e){this.lines.push(e)}pushDiffChangeLines(e){const t=0===e[1].length;t&&!this.deleteBuffer.isLineEmpty()||this.deleteBuffer.pushDiff(e),t&&!this.insertBuffer.isLineEmpty()||this.insertBuffer.pushDiff(e)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(e){const t=e[0],n=e[1];if(n.includes("\n")){const e=n.split("\n"),o=e.length-1;e.forEach((e,n)=>{if(0===n){const n=new _t(t,e);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(n)):(this.pushDiffChangeLines(n),this.flushChangeLines())}else n<o?this.pushDiffCommonLine(new _t(t,e)):0!==e.length&&this.pushDiffChangeLines(new _t(t,e))})}else this.pushDiffChangeLines(e)}getLines(){return this.flushChangeLines(),this.lines}}function cn(e,t,n){if(e!==t&&0!==e.length&&0!==t.length){const o=e.includes("\n")||t.includes("\n"),[r,i]=ln(o?`${e}\n`:e,o?`${t}\n`:t,!0,n);if(function(e,t){if(t){const t=e.length-1;return e.some((e,n)=>0===e[0]&&(n!==t||"\n"!==e[1]))}return e.some(e=>0===e[0])}(r,o)){const e=Xt(n),t=function(e,t){const n=new sn(jt,t),o=new sn(1,t),r=new an(n,o);return e.forEach(e=>{switch(e[0]){case jt:n.align(e);break;case 1:o.align(e);break;default:r.align(e)}}),r.getLines()}(r,e.changeColor);return en(t,i,e)}}return tn(e.split("\n"),t.split("\n"),n)}function ln(e,t,n,o){const[r,i]=function(e,t,n){const o=(null==n?void 0:n.truncateThreshold)??!1,r=Math.max(Math.floor((null==n?void 0:n.truncateThreshold)??0),0);let i=e.length,s=t.length;if(o){const n=e.includes("\n"),o=t.includes("\n"),a=rn(e),c=rn(t),l=n?`${e.split(a,r).join(a)}\n`:e,u=o?`${t.split(c,r).join(c)}\n`:t;i=l.length,s=u.length}const a=i!==e.length||s!==t.length;let c=0,l=0;const u=[];return Ut(i,s,(n,o)=>e[n]===t[o],(n,o,r)=>{c!==o&&u.push(new _t(jt,e.slice(c,o))),l!==r&&u.push(new _t(1,t.slice(l,r))),c=o+n,l=r+n,u.push(new _t(0,t.slice(r,l)))}),c!==i&&u.push(new _t(jt,e.slice(c))),l!==s&&u.push(new _t(1,t.slice(l))),[u,a]}(e,t,o);return It(r),[r,i]}function un(e,t){const{commonColor:n}=Xt(t);return n(e)}const{AsymmetricMatcher:fn,DOMCollection:hn,DOMElement:pn,Immutable:dn,ReactElement:mn,ReactTestComponent:gn}=Oe,yn=[gn,mn,pn,hn,dn,fn,Oe.Error],bn={maxDepth:20,plugins:yn},wn={callToJSON:!1,maxDepth:8,plugins:yn};function vn(e,t,n){if(Object.is(e,t))return"";const o=on(e);let r=o,i=!1;if("object"===o&&"function"==typeof e.asymmetricMatch){if(e.$$typeof!==/* @__PURE__ */Symbol.for("jest.asymmetricMatcher"))return;if("function"!=typeof e.getExpectedType)return;r=e.getExpectedType(),i="string"===r}if(r!==on(t)){let o=function(e){return e.length<=p?e:`${e.slice(0,p)}...`};const{aAnnotation:r,aColor:i,aIndicator:s,bAnnotation:a,bColor:c,bIndicator:l}=Xt(n),u=Tn(wn,n);let f=$e(e,u),h=$e(t,u);const p=1e5;f=o(f),h=o(h);return`${`${i(`${s} ${r}:`)} \n${f}`}\n\n${`${c(`${l} ${a}:`)} \n${h}`}`}if(!i)switch(o){case"string":return tn(e.split("\n"),t.split("\n"),n);case"boolean":case"number":return function(e,t,n){const o=$e(e,bn),r=$e(t,bn);return o===r?"":tn(o.split("\n"),r.split("\n"),n)}(e,t,n);case"map":return kn(xn(e),xn(t),n);case"set":return kn(Sn(e),Sn(t),n);default:return kn(e,t,n)}}function xn(e){return new Map(Array.from(e.entries()).sort())}function Sn(e){return new Set(Array.from(e.values()).sort())}function kn(e,t,n){let o,r=!1;try{o=$n(e,t,Tn(bn,n),n)}catch{r=!0}const i=un(qt,n);if(void 0===o||o===i){o=$n(e,t,Tn(wn,n),n),o===i||r||(o=`${un("Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",n)}\n\n${o}`)}return o}function Tn(e,t){const{compareKeys:n,printBasicPrototype:o,maxDepth:r}=Xt(t);return{...e,compareKeys:n,printBasicPrototype:o,maxDepth:r??e.maxDepth}}function $n(e,t,n,o){const r={...n,indent:0},i=$e(e,r),s=$e(t,r);if(i===s)return un(qt,o);{const r=$e(e,n),a=$e(t,n);return function(e,t,n,o,r){if(Qt(e)&&Qt(n)&&(e=[],n=[]),Qt(t)&&Qt(o)&&(t=[],o=[]),e.length!==n.length||t.length!==o.length)return tn(e,t,r);const[i,s]=nn(n,o,r);let a=0,c=0;return i.forEach(n=>{switch(n[0]){case jt:n[1]=e[a],a+=1;break;case 1:n[1]=t[c],c+=1;break;default:n[1]=t[c],a+=1,c+=1}}),en(i,s,Xt(r))}(r.split("\n"),a.split("\n"),i.split("\n"),s.split("\n"),o)}}function On(e){return"Object"===wt(e)&&"function"==typeof e.asymmetricMatch}function En(e,t){const n=wt(e);return n===wt(t)&&("Object"===n||"Array"===n)}function jn(e,t,n){const{aAnnotation:o,bAnnotation:r}=Xt(n);if("string"==typeof t&&"string"==typeof e&&t.length>0&&e.length>0&&t.length<=2e4&&e.length<=2e4&&t!==e){if(t.includes("\n")||e.includes("\n"))return cn(t,e,n);const[a]=ln(t,e),c=a.some(e=>0===e[0]),u=function(...e){const t=e.reduce((e,t)=>t.length>e?t.length:e,0);return e=>`${e}: ${" ".repeat(t-e.length)}`}(o,r);return`${u(o)+(s=Nn(a,jt,c),l.green(An(ht(s))))}\n${u(r)+(i=Nn(a,1,c),l.red(An(ht(i))))}`}var i,s;const a=St(t,{forceWritable:!0}),c=St(e,{forceWritable:!0}),{replacedExpected:u,replacedActual:f}=_n(c,a);return vn(u,f,n)}function _n(e,t,n=/* @__PURE__ */new WeakSet,o=/* @__PURE__ */new WeakSet){return e instanceof Error&&t instanceof Error&&void 0!==e.cause&&void 0===t.cause?(delete e.cause,{replacedActual:e,replacedExpected:t}):En(e,t)?(n.has(e)||o.has(t)||(n.add(e),o.add(t),vt(t).forEach(r=>{const i=t[r],s=e[r];if(On(i)){if(i.asymmetricMatch(s))t[r]=s;else if("sample"in i&&void 0!==i.sample&&En(s,i.sample)){const a=_n(s,i.sample,n,o);e[r]=a.replacedActual,t[r]=a.replacedExpected}}else if(On(s)){if(s.asymmetricMatch(i))e[r]=i;else if("sample"in s&&void 0!==s.sample&&En(s.sample,i)){const a=_n(s.sample,i,n,o);e[r]=a.replacedActual,t[r]=a.replacedExpected}}else if(En(s,i)){const a=_n(s,i,n,o);e[r]=a.replacedActual,t[r]=a.replacedExpected}})),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}const Mn="·";function An(e){return e.replace(/\s+$/gm,e=>Mn.repeat(e.length))}function Nn(e,t,n){return e.reduce((e,o)=>e+(0===o[0]?o[1]:o[0]===t?n?l.inverse(o[1]):o[1]:""),"")}function In(e){return"function"==typeof e&&"_isMockFunction"in e&&!0===e._isMockFunction}const Pn=/* @__PURE__ */new Set,Cn=/* @__PURE__ */new Set,Fn=/* @__PURE__ */new WeakMap;function Dn(e={}){var t;const{originalImplementation:n,restore:o,mockImplementation:r,resetToMockImplementation:i,resetToMockName:s}=e;o&&Pn.add(o);const a={mockImplementation:void 0,mockOriginal:n,mockName:"vi.fn()",onceMockImplementations:[]};const c=function(){const e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}(),l=function({state:e,config:t,name:n,prototypeState:o,prototypeConfig:r,keepMembersImplementation:i,mockImplementation:s,prototypeMembers:a=[]}){const c=t.mockOriginal,l=s,u=n||(null==c?void 0:c.name)||"Mock",f={[u]:function(...n){!function(e,t,n){t.calls.push(e),null==n||n.calls.push(e)}(n,e,o),function(e,t,n){t.invocationCallOrder.push(e),null==n||n.invocationCallOrder.push(e)}(zn++,e,o);const s={type:"incomplete",value:void 0},l={type:"incomplete",value:void 0};!function(e,t,n){t.results.push(e),null==n||n.results.push(e)}(s,e,o),function(e,t,n){t.settledResults.push(e),null==n||n.settledResults.push(e)}(l,e,o);const p=new.target?void 0:this,[d,m]=function(e,t,n){const o=t.instances.push(e),r=null==n?void 0:n.instances.push(e);return[o,r]}(p,e,o),[g,y]=function(e,t,n){const o=t.contexts.push(e),r=null==n?void 0:n.contexts.push(e);return[o,r]}(p,e,o),b=t.onceMockImplementations.shift()||t.mockImplementation||(null==r?void 0:r.onceMockImplementations.shift())||(null==r?void 0:r.mockImplementation)||c||function(){};let w,v,x=!1;try{if(new.target){w=Reflect.construct(b,n,new.target);for(const e of a){const t=w[e];if(t!==h.prototype[e])continue;const n=In(t),o=n?t.mock:void 0,r=n?Fn.get(t):void 0;w[e]=Dn({originalImplementation:i?null==r?void 0:r.mockOriginal:void 0,prototypeState:o,prototypeConfig:r,keepMembersImplementation:i})}}else w=b.apply(this,n)}catch(S){throw v=S,x=!0,S instanceof TypeError&&S.message.includes("is not a constructor")&&console.warn(`[vitest] The ${f[u].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),S}finally{x?(s.type="throw",s.value=v,l.type="rejected",l.value=v):(s.type="return",s.value=w,new.target&&(e.contexts[g-1]=w,e.instances[d-1]=w,null!=y&&o&&(o.contexts[y-1]=w),null!=m&&o&&(o.instances[m-1]=w)),w instanceof Promise?w.then(e=>{l.type="fulfilled",l.value=e},e=>{l.type="rejected",l.value=e}):(l.type="fulfilled",l.value=w))}return w}},h=f[u],p=c||l;p&&function(e,t){const{properties:n,descriptors:o}=function(e){const t=/* @__PURE__ */new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){const o=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of o)n[r]||Wn.has(r)||(t.add(r),n[r]=Object.getOwnPropertyDescriptor(e,r));e=Object.getPrototypeOf(e)}return{properties:t,descriptors:n}}(t);for(const r of n){const t=o[r];Bn(e,r)||Object.defineProperty(e,r,t)}}(h,p);return h}({config:a,state:c,...e}),u=(null===(t=r||n)||void 0===t?void 0:t.length)??0;return Object.defineProperty(l,"length",{writable:!0,enumerable:!1,value:u,configurable:!0}),s&&(a.mockName=l.name||"vi.fn()"),Fn.set(l,a),Cn.add(l),l._isMockFunction=!0,l.getMockImplementation=()=>a.onceMockImplementations[0]||a.mockImplementation,Object.defineProperty(l,"mock",{configurable:!1,enumerable:!0,writable:!1,value:c}),l.mockImplementation=function(e){return a.mockImplementation=e,l},l.mockImplementationOnce=function(e){return a.onceMockImplementations.push(e),l},l.withImplementation=function(e,t){const n=a.mockImplementation,o=a.onceMockImplementations,r=()=>{a.mockImplementation=n,a.onceMockImplementations=o};a.mockImplementation=e,a.onceMockImplementations=[];const i=t();return"object"==typeof i&&"function"==typeof(null==i?void 0:i.then)?i.then(()=>(r(),l)):(r(),l)},l.mockReturnThis=function(){return l.mockImplementation(function(){return this})},l.mockReturnValue=function(e){return l.mockImplementation(()=>e)},l.mockReturnValueOnce=function(e){return l.mockImplementationOnce(()=>e)},l.mockResolvedValue=function(e){return l.mockImplementation(()=>Promise.resolve(e))},l.mockResolvedValueOnce=function(e){return l.mockImplementationOnce(()=>Promise.resolve(e))},l.mockRejectedValue=function(e){return l.mockImplementation(()=>Promise.reject(e))},l.mockRejectedValueOnce=function(e){return l.mockImplementationOnce(()=>Promise.reject(e))},l.mockClear=function(){return c.calls=[],c.contexts=[],c.instances=[],c.invocationCallOrder=[],c.results=[],c.settledResults=[],l},l.mockReset=function(){return l.mockClear(),a.mockImplementation=i?r:void 0,a.mockName=s&&l.name||"vi.fn()",a.onceMockImplementations=[],l},l.mockRestore=function(){return l.mockReset(),null==o?void 0:o()},l.mockName=function(e){return"string"==typeof e&&(a.mockName=e),l},l.getMockName=function(){return a.mockName||"vi.fn()"},Symbol.dispose&&(l[Symbol.dispose]=()=>l.mockRestore()),r&&l.mockImplementation(r),l}function Rn(e){return null!=e&&In(e)?e:Dn({mockImplementation:e,resetToMockImplementation:!0})}function Ln(e,t,n){qn(null!=e,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),qn("object"==typeof e||"function"==typeof e,"Vitest cannot spy on a primitive value.");const[o,r]=Bn(e,t)||[];qn(r||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let i,s=n||"value",a=!1;"value"===s&&r&&null==r.value&&r.get&&(s="get",a=!0),i=r?r[s]:"value"!==s?()=>e[t]:e[t];const c=a&&i?i():i,l=typeof c;if(qn("function"===l||"value"!==s&&null==i,`vi.spyOn() can only spy on a function. Received ${l}.`),In(c))return c;const u=n=>{const{value:o,...i}=r||{configurable:!0,writable:!0};"value"!==s&&delete i.writable,i[s]=n,Object.defineProperty(e,t,i)},f=Dn({restore:()=>{o!==e?Reflect.deleteProperty(e,t):r&&!i?Object.defineProperty(e,t,r):u(i)},originalImplementation:c,resetToMockName:!0});try{u(a?()=>f:f)}catch(h){if(h instanceof TypeError&&Symbol.toStringTag&&"Module"===e[Symbol.toStringTag]&&(h.message.includes("Cannot redefine property")||h.message.includes("Cannot replace module namespace")||h.message.includes("can't redefine non-configurable property")))throw new TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:h});throw h}return f}function Bn(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n)return[e,n];let o=Object.getPrototypeOf(e);for(;null!==o;){const e=Object.getOwnPropertyDescriptor(o,t);if(e)return[o,e];o=Object.getPrototypeOf(o)}}function qn(e,t){if(!e)throw new Error(t)}let zn=1;const Wn=/* @__PURE__ */new Set(["length","name","prototype",
2
- /* @__PURE__ */Symbol.for("nodejs.util.promisify.custom")]);const Vn=Object.getPrototypeOf({});function Un(e){return e instanceof Error?`<unserializable>: ${e.message}`:"string"==typeof e?`<unserializable>: ${e}`:"<unserializable>"}function Kn(e,t=/* @__PURE__ */new WeakMap){if(!e||"string"==typeof e)return e;if(e instanceof Error&&"toJSON"in e&&"function"==typeof e.toJSON){const n=e.toJSON();return n&&n!==e&&"object"==typeof n&&("string"==typeof e.message&&Hn(()=>n.message??(n.message=Gn(e.message))),"string"==typeof e.stack&&Hn(()=>n.stack??(n.stack=e.stack)),"string"==typeof e.name&&Hn(()=>n.name??(n.name=e.name)),null!=e.cause&&Hn(()=>n.cause??(n.cause=Kn(e.cause,t)))),Kn(n,t)}if("function"==typeof e)return`Function<${e.name||"anonymous"}>`;if("symbol"==typeof e)return e.toString();if("object"!=typeof e)return e;if("undefined"!=typeof Buffer&&e instanceof Buffer)return`<Buffer(${e.length}) ...>`;if("undefined"!=typeof Uint8Array&&e instanceof Uint8Array)return`<Uint8Array(${e.length}) ...>`;if((n=e)&&(n["@@__IMMUTABLE_ITERABLE__@@"]||n["@@__IMMUTABLE_RECORD__@@"]))return Kn(e.toJSON(),t);var n;if(e instanceof Promise||e.constructor&&"AsyncFunction"===e.constructor.prototype)return"Promise";if("undefined"!=typeof Element&&e instanceof Element)return e.tagName;if("function"==typeof e.toJSON)return Kn(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=new Array(e.length);return t.set(e,n),e.forEach((e,o)=>{try{n[o]=Kn(e,t)}catch(r){n[o]=Un(r)}}),n}{const n=/* @__PURE__ */Object.create(null);t.set(e,n);let o=e;for(;o&&o!==Vn;)Object.getOwnPropertyNames(o).forEach(o=>{if(!(o in n))try{n[o]=Kn(e[o],t)}catch(r){delete n[o],n[o]=Un(r)}}),o=Object.getPrototypeOf(o);return e instanceof Error&&Hn(()=>e.message=Gn(e.message)),n}}function Hn(e){try{return e()}catch{}}function Gn(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function Jn(e,t,n=/* @__PURE__ */new WeakSet){if(!e||"object"!=typeof e)return{message:String(e)};const o=e;(o.showDiff||void 0===o.showDiff&&void 0!==o.expected&&void 0!==o.actual)&&(o.diff=jn(o.actual,o.expected,{...t,...o.diffOptions})),"expected"in o&&"string"!=typeof o.expected&&(o.expected=ht(o.expected,10)),"actual"in o&&"string"!=typeof o.actual&&(o.actual=ht(o.actual,10));try{n.has(o)||"object"!=typeof o.cause||(n.add(o),o.cause=Jn(o.cause,t,n))}catch{}try{return Kn(o)}catch(r){return Kn(new Error(`Failed to fully serialize error: ${null==r?void 0:r.message}\nInner error message: ${null==o?void 0:o.message}`))}}var Yn=Object.defineProperty,Zn=(e,t)=>Yn(e,"name",{value:t,configurable:!0}),Xn=(e,t)=>{for(var n in t)Yn(e,n,{get:t[n],enumerable:!0})},Qn=(e,t,n)=>((e,t,n)=>t in e?Yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),eo={};Xn(eo,{addChainableMethod:()=>pi,addLengthGuard:()=>Xr,addMethod:()=>oi,addProperty:()=>Yr,checkError:()=>to,compareByInspect:()=>mi,eql:()=>Sr,events:()=>Kr,expectTypes:()=>go,flag:()=>lo,getActual:()=>yo,getMessage:()=>mr,getName:()=>xi,getOperator:()=>vi,getOwnEnumerableProperties:()=>yi,getOwnEnumerablePropertySymbols:()=>gi,getPathInfo:()=>Wr,hasProperty:()=>Br,inspect:()=>pr,isNaN:()=>bi,isNumeric:()=>ki,isProxyEnabled:()=>Jr,isRegExp:()=>Si,objDisplay:()=>dr,overwriteChainableMethod:()=>di,overwriteMethod:()=>ii,overwriteProperty:()=>ri,proxify:()=>ti,test:()=>uo,transferFlags:()=>gr,type:()=>fo});var to={};function no(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}function oo(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function ro(e,t){return no(t)&&e===t}function io(e,t){return no(t)?e.constructor===t.constructor||e instanceof t.constructor:!("object"!=typeof t&&"function"!=typeof t||!t.prototype)&&(e.constructor===t||e instanceof t)}function so(e,t){const n="string"==typeof e?e:e.message;return oo(t)?t.test(n):"string"==typeof t&&-1!==n.indexOf(t)}function ao(e){let t=e;if(no(e))t=e.constructor.name;else if("function"==typeof e&&(t=e.name,""===t)){t=(new e).name||t}return t}function co(e){let t="";return e&&e.message?t=e.message:"string"==typeof e&&(t=e),t}function lo(e,t,n){let o=e.__flags||(e.__flags=/* @__PURE__ */Object.create(null));if(3!==arguments.length)return o[t];o[t]=n}function uo(e,t){let n=lo(e,"negate"),o=t[0];return n?!o:o}function fo(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=e[Symbol.toStringTag];if("string"==typeof t)return t;return Object.prototype.toString.call(e).slice(8,-1)}Xn(to,{compatibleConstructor:()=>io,compatibleInstance:()=>ro,compatibleMessage:()=>so,getConstructorName:()=>ao,getMessage:()=>co}),Zn(no,"isErrorInstance"),Zn(oo,"isRegExp"),Zn(ro,"compatibleInstance"),Zn(io,"compatibleConstructor"),Zn(so,"compatibleMessage"),Zn(ao,"getConstructorName"),Zn(co,"getMessage"),Zn(lo,"flag"),Zn(uo,"test"),Zn(fo,"type");var ho="captureStackTrace"in Error,po=class e extends Error{constructor(t="Unspecified AssertionError",n,o){super(t),Qn(this,"message"),this.message=t,ho&&Error.captureStackTrace(this,o||e);for(const e in n)e in this||(this[e]=n[e])}get name(){return"AssertionError"}get ok(){return!1}toJSON(e){return{...this,name:this.name,message:this.message,ok:!1,stack:!1!==e?this.stack:void 0}}};Zn(po,"AssertionError");var mo=po;function go(e,t){let n=lo(e,"message"),o=lo(e,"ssfi");n=n?n+": ":"",e=lo(e,"object"),(t=t.map(function(e){return e.toLowerCase()})).sort();let r=t.map(function(e,n){let o=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an":"a";return(t.length>1&&n===t.length-1?"or ":"")+o+" "+e}).join(", "),i=fo(e).toLowerCase();if(!t.some(function(e){return i===e}))throw new mo(n+"object tested must be "+r+", but "+i+" given",void 0,o)}function yo(e,t){return t.length>4?t[4]:e._obj}Zn(go,"expectTypes"),Zn(yo,"getActual");var bo={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},wo={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},vo="…";function xo(e,t){const n=bo[wo[t]]||bo[t]||"";return n?`[${n[0]}m${String(e)}[${n[1]}m`:String(e)}function So({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:o=!0,showProxy:r=!1,maxArrayLength:i=1/0,breakLength:s=1/0,seen:a=[],truncate:c=1/0,stylize:l=String}={},u){const f={showHidden:Boolean(e),depth:Number(t),colors:Boolean(n),customInspect:Boolean(o),showProxy:Boolean(r),maxArrayLength:Number(i),breakLength:Number(s),truncate:Number(c),seen:a,inspect:u,stylize:l};return f.colors&&(f.stylize=xo),f}function ko(e){return e>="\ud800"&&e<="\udbff"}function To(e,t,n=vo){e=String(e);const o=n.length,r=e.length;if(o>t&&r>o)return n;if(r>t&&r>o){let r=t-o;return r>0&&ko(e[r-1])&&(r-=1),`${e.slice(0,r)}${n}`}return e}function $o(e,t,n,o=", "){n=n||t.inspect;const r=e.length;if(0===r)return"";const i=t.truncate;let s="",a="",c="";for(let l=0;l<r;l+=1){const r=l+1===e.length,u=l+2===e.length;c=`${vo}(${e.length-l})`;const f=e[l];t.truncate=i-s.length-(r?0:o.length);const h=a||n(f,t)+(r?"":o),p=s.length+h.length,d=p+c.length;if(r&&p>i&&s.length+c.length<=i)break;if(!r&&!u&&d>i)break;if(a=r?"":n(e[l+1],t)+(u?"":o),!r&&u&&d>i&&p+a.length>i)break;if(s+=h,!r&&!u&&p+a.length>=i){c=`${vo}(${e.length-l-1})`;break}c=""}return`${s}${c}`}function Oo(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function Eo([e,t],n){return n.truncate-=2,"string"==typeof e?e=Oo(e):"number"!=typeof e&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,`${e}: ${t=n.inspect(t,n)}`}function jo(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const o=$o(e,t);t.truncate-=o.length;let r="";return n.length&&(r=$o(n.map(t=>[t,e[t]]),t,Eo)),`[ ${o}${r?`, ${r}`:""} ]`}Zn(xo,"colorise"),Zn(So,"normaliseOptions"),Zn(ko,"isHighSurrogate"),Zn(To,"truncate"),Zn($o,"inspectList"),Zn(Oo,"quoteComplexKey"),Zn(Eo,"inspectProperty"),Zn(jo,"inspectArray");var _o=/* @__PURE__ */Zn(e=>"function"==typeof Buffer&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function Mo(e,t){const n=_o(e);t.truncate-=n.length+4;const o=Object.keys(e).slice(e.length);if(!e.length&&!o.length)return`${n}[]`;let r="";for(let s=0;s<e.length;s++){const n=`${t.stylize(To(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=n.length,e[s]!==e.length&&t.truncate<=3){r+=`${vo}(${e.length-e[s]+1})`;break}r+=n}let i="";return o.length&&(i=$o(o.map(t=>[t,e[t]]),t,Eo)),`${n}[ ${r}${i?`, ${i}`:""} ]`}function Ao(e,t){const n=e.toJSON();if(null===n)return"Invalid Date";const o=n.split("T"),r=o[0];return t.stylize(`${r}T${To(o[1],t.truncate-r.length-1)}`,"date")}function No(e,t){const n=e[Symbol.toStringTag]||"Function",o=e.name;return o?t.stylize(`[${n} ${To(o,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function Io([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,`${e} => ${t=n.inspect(t,n)}`}function Po(e){const t=[];return e.forEach((e,n)=>{t.push([n,e])}),t}function Co(e,t){return 0===e.size?"Map{}":(t.truncate-=7,`Map{ ${$o(Po(e),t,Io)} }`)}Zn(Mo,"inspectTypedArray"),Zn(Ao,"inspectDate"),Zn(No,"inspectFunction"),Zn(Io,"inspectMapEntry"),Zn(Po,"mapToEntries"),Zn(Co,"inspectMap");var Fo=Number.isNaN||(e=>e!=e);function Do(e,t){return Fo(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):0===e?t.stylize(1/e==1/0?"+0":"-0","number"):t.stylize(To(String(e),t.truncate),"number")}function Ro(e,t){let n=To(e.toString(),t.truncate-1);return n!==vo&&(n+="n"),t.stylize(n,"bigint")}function Lo(e,t){const n=e.toString().split("/")[2],o=t.truncate-(2+n.length),r=e.source;return t.stylize(`/${To(r,o)}/${n}`,"regexp")}function Bo(e){const t=[];return e.forEach(e=>{t.push(e)}),t}function qo(e,t){return 0===e.size?"Set{}":(t.truncate-=7,`Set{ ${$o(Bo(e),t)} }`)}Zn(Do,"inspectNumber"),Zn(Ro,"inspectBigInt"),Zn(Lo,"inspectRegExp"),Zn(Bo,"arrayFromSet"),Zn(qo,"inspectSet");var zo=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),Wo={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"};function Vo(e){return Wo[e]||`\\u${`0000${e.charCodeAt(0).toString(16)}`.slice(-4)}`}function Uo(e,t){return zo.test(e)&&(e=e.replace(zo,Vo)),t.stylize(`'${To(e,t.truncate-2)}'`,"string")}function Ko(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}Zn(Vo,"escape"),Zn(Uo,"inspectString"),Zn(Ko,"inspectSymbol");var Ho=/* @__PURE__ */Zn(()=>"Promise{…}","getPromiseValue");function Go(e,t){const n=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(0===n.length&&0===o.length)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const r=$o(n.map(t=>[t,e[t]]),t,Eo),i=$o(o.map(t=>[t,e[t]]),t,Eo);t.seen.pop();let s="";return r&&i&&(s=", "),`{ ${r}${s}${i} }`}Zn(Go,"inspectObject");var Jo=!("undefined"==typeof Symbol||!Symbol.toStringTag)&&Symbol.toStringTag;function Yo(e,t){let n="";return Jo&&Jo in e&&(n=e[Jo]),n=n||e.constructor.name,n&&"_class"!==n||(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Go(e,t)}`}function Zo(e,t){return 0===e.length?"Arguments[]":(t.truncate-=13,`Arguments[ ${$o(e,t)} ]`)}Zn(Yo,"inspectClass"),Zn(Zo,"inspectArguments");var Xo=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Qo(e,t){const n=Object.getOwnPropertyNames(e).filter(e=>-1===Xo.indexOf(e)),o=e.name;t.truncate-=o.length;let r="";if("string"==typeof e.message?r=To(e.message,t.truncate):n.unshift("message"),r=r?`: ${r}`:"",t.truncate-=r.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const i=$o(n.map(t=>[t,e[t]]),t,Eo);return`${o}${r}${i?` { ${i} }`:""}`}function er([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function tr(e,t){return $o(e,t,nr,"\n")}function nr(e,t){switch(e.nodeType){case 1:return or(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function or(e,t){const n=e.getAttributeNames(),o=e.tagName.toLowerCase(),r=t.stylize(`<${o}`,"special"),i=t.stylize(">","special"),s=t.stylize(`</${o}>`,"special");t.truncate-=2*o.length+5;let a="";n.length>0&&(a+=" ",a+=$o(n.map(t=>[t,e.getAttribute(t)]),t,er," ")),t.truncate-=a.length;const c=t.truncate;let l=tr(e.children,t);return l&&l.length>c&&(l=`${vo}(${e.children.length})`),`${r}${a}${i}${l}${s}`}Zn(Qo,"inspectObject"),Zn(er,"inspectAttribute"),Zn(tr,"inspectNodeCollection"),Zn(nr,"inspectNode"),Zn(or,"inspectHTML");var rr="function"==typeof Symbol&&"function"==typeof Symbol.for?/* @__PURE__ */Symbol.for("chai/inspect"):"@@chai/inspect",ir=/* @__PURE__ */Symbol.for("nodejs.util.inspect.custom"),sr=/* @__PURE__ */new WeakMap,ar={},cr={undefined:/* @__PURE__ */Zn((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:/* @__PURE__ */Zn((e,t)=>t.stylize("null","null"),"null"),boolean:/* @__PURE__ */Zn((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:/* @__PURE__ */Zn((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:Do,Number:Do,bigint:Ro,BigInt:Ro,string:Uo,String:Uo,function:No,Function:No,symbol:Ko,Symbol:Ko,Array:jo,Date:Ao,Map:Co,Set:qo,RegExp:Lo,Promise:Ho,WeakSet:/* @__PURE__ */Zn((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet"),WeakMap:/* @__PURE__ */Zn((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),Arguments:Zo,Int8Array:Mo,Uint8Array:Mo,Uint8ClampedArray:Mo,Int16Array:Mo,Uint16Array:Mo,Int32Array:Mo,Uint32Array:Mo,Float32Array:Mo,Float64Array:Mo,Generator:/* @__PURE__ */Zn(()=>"","Generator"),DataView:/* @__PURE__ */Zn(()=>"","DataView"),ArrayBuffer:/* @__PURE__ */Zn(()=>"","ArrayBuffer"),Error:Qo,HTMLCollection:tr,NodeList:tr},lr=/* @__PURE__ */Zn((e,t,n,o)=>rr in e&&"function"==typeof e[rr]?e[rr](t):ir in e&&"function"==typeof e[ir]?e[ir](t.depth,t,o):"inspect"in e&&"function"==typeof e.inspect?e.inspect(t.depth,t):"constructor"in e&&sr.has(e.constructor)?sr.get(e.constructor)(e,t):ar[n]?ar[n](e,t):"","inspectCustom"),ur=Object.prototype.toString;function fr(e,t={}){const n=So(t,fr),{customInspect:o}=n;let r=null===e?"null":typeof e;if("object"===r&&(r=ur.call(e).slice(8,-1)),r in cr)return cr[r](e,n);if(o&&e){const t=lr(e,n,r,fr);if(t)return"string"==typeof t?t:fr(t,n)}const i=!!e&&Object.getPrototypeOf(e);return i===Object.prototype||null===i?Go(e,n):e&&"function"==typeof HTMLElement&&e instanceof HTMLElement?or(e,n):"constructor"in e?e.constructor!==Object?Yo(e,n):Go(e,n):e===Object(e)?Go(e,n):n.stylize(String(e),r)}Zn(fr,"inspect");var hr={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function pr(e,t,n,o){return fr(e,{colors:o,depth:void 0===n?2:n,showHidden:t,truncate:hr.truncateThreshold?hr.truncateThreshold:1/0})}function dr(e){let t=pr(e),n=Object.prototype.toString.call(e);if(hr.truncateThreshold&&t.length>=hr.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"===n){let t=Object.keys(e);return"{ Object ("+(t.length>2?t.splice(0,2).join(", ")+", ...":t.join(", "))+") }"}return t}return t}function mr(e,t){let n=lo(e,"negate"),o=lo(e,"object"),r=t[3],i=yo(e,t),s=n?t[2]:t[1],a=lo(e,"message");return"function"==typeof s&&(s=s()),s=s||"",s=s.replace(/#\{this\}/g,function(){return dr(o)}).replace(/#\{act\}/g,function(){return dr(i)}).replace(/#\{exp\}/g,function(){return dr(r)}),a?a+": "+s:s}function gr(e,t,n){let o=e.__flags||(e.__flags=/* @__PURE__ */Object.create(null));t.__flags||(t.__flags=/* @__PURE__ */Object.create(null)),n=3!==arguments.length||n;for(let r in o)(n||"object"!==r&&"ssfi"!==r&&"lockSsfi"!==r&&"message"!=r)&&(t.__flags[r]=o[r])}function yr(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=e[Symbol.toStringTag];if("string"==typeof t)return t;return Object.prototype.toString.call(e).slice(8,-1)}function br(){this._key="chai/deep-eql__"+Math.random()+Date.now()}Zn(pr,"inspect"),Zn(dr,"objDisplay"),Zn(mr,"getMessage"),Zn(gr,"transferFlags"),Zn(yr,"type"),Zn(br,"FakeMap"),br.prototype={get:/* @__PURE__ */Zn(function(e){return e[this._key]},"get"),set:/* @__PURE__ */Zn(function(e,t){Object.isExtensible(e)&&Object.defineProperty(e,this._key,{value:t,configurable:!0})},"set")};var wr="function"==typeof WeakMap?WeakMap:br;function vr(e,t,n){if(!n||Rr(e)||Rr(t))return null;var o=n.get(e);if(o){var r=o.get(t);if("boolean"==typeof r)return r}return null}function xr(e,t,n,o){if(n&&!Rr(e)&&!Rr(t)){var r=n.get(e);r?r.set(t,o):((r=new wr).set(t,o),n.set(e,r))}}Zn(vr,"memoizeCompare"),Zn(xr,"memoizeSet");var Sr=kr;function kr(e,t,n){if(n&&n.comparator)return $r(e,t,n);var o=Tr(e,t);return null!==o?o:$r(e,t,n)}function Tr(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t||!Rr(e)&&!Rr(t)&&null}function $r(e,t,n){(n=n||{}).memoize=!1!==n.memoize&&(n.memoize||new wr);var o=n&&n.comparator,r=vr(e,t,n.memoize);if(null!==r)return r;var i=vr(t,e,n.memoize);if(null!==i)return i;if(o){var s=o(e,t);if(!1===s||!0===s)return xr(e,t,n.memoize,s),s;var a=Tr(e,t);if(null!==a)return a}var c=yr(e);if(c!==yr(t))return xr(e,t,n.memoize,!1),!1;xr(e,t,n.memoize,!0);var l=Or(e,t,c,n);return xr(e,t,n.memoize,l),l}function Or(e,t,n,o){switch(n){case"String":case"Number":case"Boolean":case"Date":return kr(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return Fr(e,t,["name","message","code"],o);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return _r(e,t,o);case"RegExp":return Er(e,t);case"Generator":return Mr(e,t,o);case"DataView":return _r(new Uint8Array(e.buffer),new Uint8Array(t.buffer),o);case"ArrayBuffer":return _r(new Uint8Array(e),new Uint8Array(t),o);case"Set":case"Map":return jr(e,t,o);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return e.equals(t);case"Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return e.toString()===t.toString();default:return Dr(e,t,o)}}function Er(e,t){return e.toString()===t.toString()}function jr(e,t,n){try{if(e.size!==t.size)return!1;if(0===e.size)return!0}catch(i){return!1}var o=[],r=[];return e.forEach(/* @__PURE__ */Zn(function(e,t){o.push([e,t])},"gatherEntries")),t.forEach(/* @__PURE__ */Zn(function(e,t){r.push([e,t])},"gatherEntries")),_r(o.sort(),r.sort(),n)}function _r(e,t,n){var o=e.length;if(o!==t.length)return!1;if(0===o)return!0;for(var r=-1;++r<o;)if(!1===kr(e[r],t[r],n))return!1;return!0}function Mr(e,t,n){return _r(Ir(e),Ir(t),n)}function Ar(e){return"undefined"!=typeof Symbol&&"object"==typeof e&&void 0!==Symbol.iterator&&"function"==typeof e[Symbol.iterator]}function Nr(e){if(Ar(e))try{return Ir(e[Symbol.iterator]())}catch(t){return[]}return[]}function Ir(e){for(var t=e.next(),n=[t.value];!1===t.done;)t=e.next(),n.push(t.value);return n}function Pr(e){var t=[];for(var n in e)t.push(n);return t}function Cr(e){for(var t=[],n=Object.getOwnPropertySymbols(e),o=0;o<n.length;o+=1){var r=n[o];Object.getOwnPropertyDescriptor(e,r).enumerable&&t.push(r)}return t}function Fr(e,t,n,o){var r=n.length;if(0===r)return!0;for(var i=0;i<r;i+=1)if(!1===kr(e[n[i]],t[n[i]],o))return!1;return!0}function Dr(e,t,n){var o=Pr(e),r=Pr(t),i=Cr(e),s=Cr(t);if(o=o.concat(i),r=r.concat(s),o.length&&o.length===r.length)return!1!==_r(Lr(o).sort(),Lr(r).sort())&&Fr(e,t,o,n);var a=Nr(e),c=Nr(t);return a.length&&a.length===c.length?(a.sort(),c.sort(),_r(a,c,n)):0===o.length&&0===a.length&&0===r.length&&0===c.length}function Rr(e){return null===e||"object"!=typeof e}function Lr(e){return e.map(/* @__PURE__ */Zn(function(e){return"symbol"==typeof e?e.toString():e},"mapSymbol"))}function Br(e,t){return null!=e&&t in Object(e)}function qr(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(e=>{if("constructor"===e||"__proto__"===e||"prototype"===e)return{};const t=/^\[(\d+)\]$/.exec(e);let n=null;return n=t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.[\]])/g,"$1")},n})}function zr(e,t,n){let o=e,r=null;n=void 0===n?t.length:n;for(let i=0;i<n;i++){const e=t[i];o&&(o=void 0===e.p?o[e.i]:o[e.p],i===n-1&&(r=o))}return r}function Wr(e,t){const n=qr(t),o=n[n.length-1],r={parent:n.length>1?zr(e,n,n.length-1):e,name:o.p||o.i,value:zr(e,n)};return r.exists=Br(r.parent,r.name),r}Zn(kr,"deepEqual"),Zn(Tr,"simpleEqual"),Zn($r,"extensiveDeepEqual"),Zn(Or,"extensiveDeepEqualByType"),Zn(Er,"regexpEqual"),Zn(jr,"entriesEqual"),Zn(_r,"iterableEqual"),Zn(Mr,"generatorEqual"),Zn(Ar,"hasIteratorFunction"),Zn(Nr,"getIteratorEntries"),Zn(Ir,"getGeneratorEntries"),Zn(Pr,"getEnumerableKeys"),Zn(Cr,"getEnumerableSymbols"),Zn(Fr,"keysEqual"),Zn(Dr,"objectEqual"),Zn(Rr,"isPrimitive"),Zn(Lr,"mapSymbols"),Zn(Br,"hasProperty"),Zn(qr,"parsePath"),Zn(zr,"internalGetPathValue"),Zn(Wr,"getPathInfo");var Vr=class e{constructor(t,n,o,r){return Qn(this,"__flags",{}),lo(this,"ssfi",o||e),lo(this,"lockSsfi",r),lo(this,"object",t),lo(this,"message",n),lo(this,"eql",hr.deepEqual||Sr),ti(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),hr.includeStack}static set includeStack(e){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),hr.includeStack=e}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),hr.showDiff}static set showDiff(e){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),hr.showDiff=e}static addProperty(e,t){Yr(this.prototype,e,t)}static addMethod(e,t){oi(this.prototype,e,t)}static addChainableMethod(e,t,n){pi(this.prototype,e,t,n)}static overwriteProperty(e,t){ri(this.prototype,e,t)}static overwriteMethod(e,t){ii(this.prototype,e,t)}static overwriteChainableMethod(e,t,n){di(this.prototype,e,t,n)}assert(e,t,n,o,r,i){const s=uo(this,arguments);if(!1!==i&&(i=!0),void 0===o&&void 0===r&&(i=!1),!0!==hr.showDiff&&(i=!1),!s){t=mr(this,arguments);const e={actual:yo(this,arguments),expected:o,showDiff:i},n=vi(this,arguments);throw n&&(e.operator=n),new mo(t,e,hr.includeStack?this.assert:lo(this,"ssfi"))}}get _obj(){return lo(this,"object")}set _obj(e){lo(this,"object",e)}};Zn(Vr,"Assertion");var Ur=Vr,Kr=new EventTarget,Hr=class extends Event{constructor(e,t,n){super(e),this.name=String(t),this.fn=n}};Zn(Hr,"PluginEvent");var Gr=Hr;function Jr(){return hr.useProxy&&"undefined"!=typeof Proxy&&"undefined"!=typeof Reflect}function Yr(e,t,n){n=void 0===n?function(){}:n,Object.defineProperty(e,t,{get:/* @__PURE__ */Zn(function e(){Jr()||lo(this,"lockSsfi")||lo(this,"ssfi",e);let t=n.call(this);if(void 0!==t)return t;let o=new Ur;return gr(this,o),o},"propertyGetter"),configurable:!0}),Kr.dispatchEvent(new Gr("addProperty",t,n))}Zn(Jr,"isProxyEnabled"),Zn(Yr,"addProperty");var Zr=Object.getOwnPropertyDescriptor(function(){},"length");function Xr(e,t,n){return Zr.configurable?(Object.defineProperty(e,"length",{get:/* @__PURE__ */Zn(function(){if(n)throw Error("Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.');throw Error("Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e):e}function Qr(e){let t=Object.getOwnPropertyNames(e);function n(e){-1===t.indexOf(e)&&t.push(e)}Zn(n,"addProperty");let o=Object.getPrototypeOf(e);for(;null!==o;)Object.getOwnPropertyNames(o).forEach(n),o=Object.getPrototypeOf(o);return t}Zn(Xr,"addLengthGuard"),Zn(Qr,"getProperties");var ei=["__flags","__methods","_obj","assert"];function ti(e,t){return Jr()?new Proxy(e,{get:/* @__PURE__ */Zn(function e(n,o){if("string"==typeof o&&-1===hr.proxyExcludedKeys.indexOf(o)&&!Reflect.has(n,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');let e=null,r=4;throw Qr(n).forEach(function(t){if(!Object.prototype.hasOwnProperty(t)&&-1===ei.indexOf(t)){let n=ni(o,t,r);n<r&&(e=t,r=n)}}),null!==e?Error("Invalid Chai property: "+o+'. Did you mean "'+e+'"?'):Error("Invalid Chai property: "+o)}return-1!==ei.indexOf(o)||lo(n,"lockSsfi")||lo(n,"ssfi",e),Reflect.get(n,o)},"proxyGetter")}):e}function ni(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let o=[];for(let r=0;r<=e.length;r++)o[r]=Array(t.length+1).fill(0),o[r][0]=r;for(let r=0;r<t.length;r++)o[0][r]=r;for(let r=1;r<=e.length;r++){let i=e.charCodeAt(r-1);for(let e=1;e<=t.length;e++)Math.abs(r-e)>=n?o[r][e]=n:o[r][e]=Math.min(o[r-1][e]+1,o[r][e-1]+1,o[r-1][e-1]+(i===t.charCodeAt(e-1)?0:1))}return o[e.length][t.length]}function oi(e,t,n){let o=/* @__PURE__ */Zn(function(){lo(this,"lockSsfi")||lo(this,"ssfi",o);let e=n.apply(this,arguments);if(void 0!==e)return e;let t=new Ur;return gr(this,t),t},"methodWrapper");Xr(o,t,!1),e[t]=ti(o,t),Kr.dispatchEvent(new Gr("addMethod",t,n))}function ri(e,t,n){let o=Object.getOwnPropertyDescriptor(e,t),r=/* @__PURE__ */Zn(function(){},"_super");o&&"function"==typeof o.get&&(r=o.get),Object.defineProperty(e,t,{get:/* @__PURE__ */Zn(function e(){Jr()||lo(this,"lockSsfi")||lo(this,"ssfi",e);let t=lo(this,"lockSsfi");lo(this,"lockSsfi",!0);let o=n(r).call(this);if(lo(this,"lockSsfi",t),void 0!==o)return o;let i=new Ur;return gr(this,i),i},"overwritingPropertyGetter"),configurable:!0})}function ii(e,t,n){let o=e[t],r=/* @__PURE__ */Zn(function(){throw new Error(t+" is not a function")},"_super");o&&"function"==typeof o&&(r=o);let i=/* @__PURE__ */Zn(function(){lo(this,"lockSsfi")||lo(this,"ssfi",i);let e=lo(this,"lockSsfi");lo(this,"lockSsfi",!0);let t=n(r).apply(this,arguments);if(lo(this,"lockSsfi",e),void 0!==t)return t;let o=new Ur;return gr(this,o),o},"overwritingMethodWrapper");Xr(i,t,!1),e[t]=ti(i,t)}Zn(ti,"proxify"),Zn(ni,"stringDistanceCapped"),Zn(oi,"addMethod"),Zn(ri,"overwriteProperty"),Zn(ii,"overwriteMethod");var si="function"==typeof Object.setPrototypeOf,ai=/* @__PURE__ */Zn(function(){},"testFn"),ci=Object.getOwnPropertyNames(ai).filter(function(e){let t=Object.getOwnPropertyDescriptor(ai,e);return"object"!=typeof t||!t.configurable}),li=Function.prototype.call,ui=Function.prototype.apply,fi=class extends Gr{constructor(e,t,n,o){super(e,t,n),this.chainingBehavior=o}};Zn(fi,"PluginAddChainableMethodEvent");var hi=fi;function pi(e,t,n,o){"function"!=typeof o&&(o=/* @__PURE__ */Zn(function(){},"chainingBehavior"));let r={method:n,chainingBehavior:o};e.__methods||(e.__methods={}),e.__methods[t]=r,Object.defineProperty(e,t,{get:/* @__PURE__ */Zn(function(){r.chainingBehavior.call(this);let n=/* @__PURE__ */Zn(function(){lo(this,"lockSsfi")||lo(this,"ssfi",n);let e=r.method.apply(this,arguments);if(void 0!==e)return e;let t=new Ur;return gr(this,t),t},"chainableMethodWrapper");if(Xr(n,t,!0),si){let e=Object.create(this);e.call=li,e.apply=ui,Object.setPrototypeOf(n,e)}else{Object.getOwnPropertyNames(e).forEach(function(t){if(-1!==ci.indexOf(t))return;let o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o)})}return gr(this,n),ti(n)},"chainableMethodGetter"),configurable:!0}),Kr.dispatchEvent(new hi("addChainableMethod",t,n,o))}function di(e,t,n,o){let r=e.__methods[t],i=r.chainingBehavior;r.chainingBehavior=/* @__PURE__ */Zn(function(){let e=o(i).call(this);if(void 0!==e)return e;let t=new Ur;return gr(this,t),t},"overwritingChainableMethodGetter");let s=r.method;r.method=/* @__PURE__ */Zn(function(){let e=n(s).apply(this,arguments);if(void 0!==e)return e;let t=new Ur;return gr(this,t),t},"overwritingChainableMethodWrapper")}function mi(e,t){return pr(e)<pr(t)?-1:1}function gi(e){return"function"!=typeof Object.getOwnPropertySymbols?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}function yi(e){return Object.keys(e).concat(gi(e))}Zn(pi,"addChainableMethod"),Zn(di,"overwriteChainableMethod"),Zn(mi,"compareByInspect"),Zn(gi,"getOwnEnumerablePropertySymbols"),Zn(yi,"getOwnEnumerableProperties");var bi=Number.isNaN;function wi(e){let t=fo(e);return-1!==["Array","Object","Function"].indexOf(t)}function vi(e,t){let n=lo(e,"operator"),o=lo(e,"negate"),r=t[3],i=o?t[2]:t[1];if(n)return n;if("function"==typeof i&&(i=i()),i=i||"",!i)return;if(/\shave\s/.test(i))return;let s=wi(r);return/\snot\s/.test(i)?s?"notDeepStrictEqual":"notStrictEqual":s?"deepStrictEqual":"strictEqual"}function xi(e){return e.name}function Si(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function ki(e){return["Number","BigInt"].includes(fo(e))}Zn(wi,"isObjectType"),Zn(vi,"getOperator"),Zn(xi,"getName"),Zn(Si,"isRegExp"),Zn(ki,"isNumeric");var{flag:Ti}=eo;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){Ur.addProperty(e)}),Ur.addProperty("not",function(){Ti(this,"negate",!0)}),Ur.addProperty("deep",function(){Ti(this,"deep",!0)}),Ur.addProperty("nested",function(){Ti(this,"nested",!0)}),Ur.addProperty("own",function(){Ti(this,"own",!0)}),Ur.addProperty("ordered",function(){Ti(this,"ordered",!0)}),Ur.addProperty("any",function(){Ti(this,"any",!0),Ti(this,"all",!1)}),Ur.addProperty("all",function(){Ti(this,"all",!0),Ti(this,"any",!1)});var $i={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Oi(e,t){t&&Ti(this,"message",t),e=e.toLowerCase();let n=Ti(this,"object"),o=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";const r=fo(n).toLowerCase();$i.function.includes(e)?this.assert($i[e].includes(r),"expected #{this} to be "+o+e,"expected #{this} not to be "+o+e):this.assert(e===r,"expected #{this} to be "+o+e,"expected #{this} not to be "+o+e)}function Ei(e,t){return bi(e)&&bi(t)||e===t}function ji(){Ti(this,"contains",!0)}function _i(e,t){t&&Ti(this,"message",t);let n=Ti(this,"object"),o=fo(n).toLowerCase(),r=Ti(this,"message"),i=Ti(this,"negate"),s=Ti(this,"ssfi"),a=Ti(this,"deep"),c=a?"deep ":"",l=a?Ti(this,"eql"):Ei;r=r?r+": ":"";let u=!1;switch(o){case"string":u=-1!==n.indexOf(e);break;case"weakset":if(a)throw new mo(r+"unable to use .deep.include with WeakSet",void 0,s);u=n.has(e);break;case"map":n.forEach(function(t){u=u||l(t,e)});break;case"set":a?n.forEach(function(t){u=u||l(t,e)}):u=n.has(e);break;case"array":u=a?n.some(function(t){return l(t,e)}):-1!==n.indexOf(e);break;default:{if(e!==Object(e))throw new mo(r+"the given combination of arguments ("+o+" and "+fo(e).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+fo(e).toLowerCase(),void 0,s);let t=Object.keys(e),a=null,c=0;if(t.forEach(function(o){let r=new Ur(n);if(gr(this,r,!0),Ti(r,"lockSsfi",!0),i&&1!==t.length)try{r.property(o,e[o])}catch(s){if(!to.compatibleConstructor(s,mo))throw s;null===a&&(a=s),c++}else r.property(o,e[o])},this),i&&t.length>1&&c===t.length)throw a;return}}this.assert(u,"expected #{this} to "+c+"include "+pr(e),"expected #{this} to not "+c+"include "+pr(e))}function Mi(){let e=Ti(this,"object");this.assert(null!=e,"expected #{this} to exist","expected #{this} to not exist")}function Ai(){let e=fo(Ti(this,"object"));this.assert("Arguments"===e,"expected #{this} to be arguments but got "+e,"expected #{this} to not be arguments")}function Ni(e,t){t&&Ti(this,"message",t);let n=Ti(this,"object");if(Ti(this,"deep")){let t=Ti(this,"lockSsfi");Ti(this,"lockSsfi",!0),this.eql(e),Ti(this,"lockSsfi",t)}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}function Ii(e,t){t&&Ti(this,"message",t);let n=Ti(this,"eql");this.assert(n(e,Ti(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}function Pi(e,t){t&&Ti(this,"message",t);let n=Ti(this,"object"),o=Ti(this,"doLength"),r=Ti(this,"message"),i=r?r+": ":"",s=Ti(this,"ssfi"),a=fo(n).toLowerCase(),c=fo(e).toLowerCase();if(o&&"map"!==a&&"set"!==a&&new Ur(n,r,s,!0).to.have.property("length"),!o&&"date"===a&&"date"!==c)throw new mo(i+"the argument to above must be a date",void 0,s);if(!ki(e)&&(o||ki(n)))throw new mo(i+"the argument to above must be a number",void 0,s);if(!o&&"date"!==a&&!ki(n)){throw new mo(i+"expected "+("string"===a?"'"+n+"'":n)+" to be a number or a date",void 0,s)}if(o){let t,o="length";"map"===a||"set"===a?(o="size",t=n.size):t=n.length,this.assert(t>e,"expected #{this} to have a "+o+" above #{exp} but got #{act}","expected #{this} to not have a "+o+" above #{exp}",e,t)}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}function Ci(e,t){t&&Ti(this,"message",t);let n,o=Ti(this,"object"),r=Ti(this,"doLength"),i=Ti(this,"message"),s=i?i+": ":"",a=Ti(this,"ssfi"),c=fo(o).toLowerCase(),l=fo(e).toLowerCase(),u=!0;if(r&&"map"!==c&&"set"!==c&&new Ur(o,i,a,!0).to.have.property("length"),r||"date"!==c||"date"===l)if(ki(e)||!r&&!ki(o))if(r||"date"===c||ki(o))u=!1;else{n=s+"expected "+("string"===c?"'"+o+"'":o)+" to be a number or a date"}else n=s+"the argument to least must be a number";else n=s+"the argument to least must be a date";if(u)throw new mo(n,void 0,a);if(r){let t,n="length";"map"===c||"set"===c?(n="size",t=o.size):t=o.length,this.assert(t>=e,"expected #{this} to have a "+n+" at least #{exp} but got #{act}","expected #{this} to have a "+n+" below #{exp}",e,t)}else this.assert(o>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}function Fi(e,t){t&&Ti(this,"message",t);let n,o=Ti(this,"object"),r=Ti(this,"doLength"),i=Ti(this,"message"),s=i?i+": ":"",a=Ti(this,"ssfi"),c=fo(o).toLowerCase(),l=fo(e).toLowerCase(),u=!0;if(r&&"map"!==c&&"set"!==c&&new Ur(o,i,a,!0).to.have.property("length"),r||"date"!==c||"date"===l)if(ki(e)||!r&&!ki(o))if(r||"date"===c||ki(o))u=!1;else{n=s+"expected "+("string"===c?"'"+o+"'":o)+" to be a number or a date"}else n=s+"the argument to below must be a number";else n=s+"the argument to below must be a date";if(u)throw new mo(n,void 0,a);if(r){let t,n="length";"map"===c||"set"===c?(n="size",t=o.size):t=o.length,this.assert(t<e,"expected #{this} to have a "+n+" below #{exp} but got #{act}","expected #{this} to not have a "+n+" below #{exp}",e,t)}else this.assert(o<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}function Di(e,t){t&&Ti(this,"message",t);let n,o=Ti(this,"object"),r=Ti(this,"doLength"),i=Ti(this,"message"),s=i?i+": ":"",a=Ti(this,"ssfi"),c=fo(o).toLowerCase(),l=fo(e).toLowerCase(),u=!0;if(r&&"map"!==c&&"set"!==c&&new Ur(o,i,a,!0).to.have.property("length"),r||"date"!==c||"date"===l)if(ki(e)||!r&&!ki(o))if(r||"date"===c||ki(o))u=!1;else{n=s+"expected "+("string"===c?"'"+o+"'":o)+" to be a number or a date"}else n=s+"the argument to most must be a number";else n=s+"the argument to most must be a date";if(u)throw new mo(n,void 0,a);if(r){let t,n="length";"map"===c||"set"===c?(n="size",t=o.size):t=o.length,this.assert(t<=e,"expected #{this} to have a "+n+" at most #{exp} but got #{act}","expected #{this} to have a "+n+" above #{exp}",e,t)}else this.assert(o<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}function Ri(e,t){t&&Ti(this,"message",t);let n,o=Ti(this,"object"),r=Ti(this,"ssfi"),i=Ti(this,"message");try{n=o instanceof e}catch(a){if(a instanceof TypeError)throw i=i?i+": ":"",new mo(i+"The instanceof assertion needs a constructor but "+fo(e)+" was given.",void 0,r);throw a}let s=xi(e);null==s&&(s="an unnamed constructor"),this.assert(n,"expected #{this} to be an instance of "+s,"expected #{this} to not be an instance of "+s)}function Li(e,t,n){n&&Ti(this,"message",n);let o=Ti(this,"nested"),r=Ti(this,"own"),i=Ti(this,"message"),s=Ti(this,"object"),a=Ti(this,"ssfi"),c=typeof e;if(i=i?i+": ":"",o){if("string"!==c)throw new mo(i+"the argument to property must be a string when using nested syntax",void 0,a)}else if("string"!==c&&"number"!==c&&"symbol"!==c)throw new mo(i+"the argument to property must be a string, number, or symbol",void 0,a);if(o&&r)throw new mo(i+'The "nested" and "own" flags cannot be combined.',void 0,a);if(null==s)throw new mo(i+"Target cannot be null or undefined.",void 0,a);let l,u=Ti(this,"deep"),f=Ti(this,"negate"),h=o?Wr(s,e):null,p=o?h.value:s[e],d=u?Ti(this,"eql"):(e,t)=>e===t,m="";u&&(m+="deep "),r&&(m+="own "),o&&(m+="nested "),m+="property ",l=r?Object.prototype.hasOwnProperty.call(s,e):o?h.exists:Br(s,e),f&&1!==arguments.length||this.assert(l,"expected #{this} to have "+m+pr(e),"expected #{this} to not have "+m+pr(e)),arguments.length>1&&this.assert(l&&d(t,p),"expected #{this} to have "+m+pr(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+pr(e)+" of #{act}",t,p),Ti(this,"object",p)}function Bi(e,t,n){Ti(this,"own",!0),Li.apply(this,arguments)}function qi(e,t,n){"string"==typeof t&&(n=t,t=null),n&&Ti(this,"message",n);let o=Ti(this,"object"),r=Object.getOwnPropertyDescriptor(Object(o),e),i=Ti(this,"eql");r&&t?this.assert(i(t,r),"expected the own property descriptor for "+pr(e)+" on #{this} to match "+pr(t)+", got "+pr(r),"expected the own property descriptor for "+pr(e)+" on #{this} to not match "+pr(t),t,r,!0):this.assert(r,"expected #{this} to have an own property descriptor for "+pr(e),"expected #{this} to not have an own property descriptor for "+pr(e)),Ti(this,"object",r)}function zi(){Ti(this,"doLength",!0)}function Wi(e,t){t&&Ti(this,"message",t);let n,o=Ti(this,"object"),r=fo(o).toLowerCase(),i=Ti(this,"message"),s=Ti(this,"ssfi"),a="length";switch(r){case"map":case"set":a="size",n=o.size;break;default:new Ur(o,i,s,!0).to.have.property("length"),n=o.length}this.assert(n==e,"expected #{this} to have a "+a+" of #{exp} but got #{act}","expected #{this} to not have a "+a+" of #{act}",e,n)}function Vi(e,t){t&&Ti(this,"message",t);let n=Ti(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e)}function Ui(e){let t,n,o=Ti(this,"object"),r=fo(o),i=fo(e),s=Ti(this,"ssfi"),a=Ti(this,"deep"),c="",l=!0,u=Ti(this,"message");u=u?u+": ":"";let f=u+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if("Map"===r||"Set"===r)c=a?"deeply ":"",n=[],o.forEach(function(e,t){n.push(t)}),"Array"!==i&&(e=Array.prototype.slice.call(arguments));else{switch(n=yi(o),i){case"Array":if(arguments.length>1)throw new mo(f,void 0,s);break;case"Object":if(arguments.length>1)throw new mo(f,void 0,s);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(e){return"symbol"==typeof e?e:String(e)})}if(!e.length)throw new mo(u+"keys required",void 0,s);let h=e.length,p=Ti(this,"any"),d=Ti(this,"all"),m=e,g=a?Ti(this,"eql"):(e,t)=>e===t;if(p||d||(d=!0),p&&(l=m.some(function(e){return n.some(function(t){return g(e,t)})})),d&&(l=m.every(function(e){return n.some(function(t){return g(e,t)})}),Ti(this,"contains")||(l=l&&e.length==n.length)),h>1){let n=(e=e.map(function(e){return pr(e)})).pop();d&&(t=e.join(", ")+", and "+n),p&&(t=e.join(", ")+", or "+n)}else t=pr(e[0]);t=(h>1?"keys ":"key ")+t,t=(Ti(this,"contains")?"contain ":"have ")+t,this.assert(l,"expected #{this} to "+c+t,"expected #{this} to not "+c+t,m.slice(0).sort(mi),n.sort(mi),!0)}function Ki(e,t,n){n&&Ti(this,"message",n);let o,r=Ti(this,"object"),i=Ti(this,"ssfi"),s=Ti(this,"message"),a=Ti(this,"negate")||!1;new Ur(r,s,i,!0).is.a("function"),(Si(e)||"string"==typeof e)&&(t=e,e=null);let c=!1;try{r()}catch(p){c=!0,o=p}let l=void 0===e&&void 0===t,u=Boolean(e&&t),f=!1,h=!1;if(l||!l&&!a){let t="an error";e instanceof Error?t="#{exp}":e&&(t=to.getConstructorName(e));let n=o;if(o instanceof Error)n=o.toString();else if("string"==typeof o)n=o;else if(o&&("object"==typeof o||"function"==typeof o))try{n=to.getConstructorName(o)}catch(d){}this.assert(c,"expected #{this} to throw "+t,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),n)}if(e&&o){if(e instanceof Error){to.compatibleInstance(o,e)===a&&(u&&a?f=!0:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(o&&!a?" but #{act} was thrown":""),e.toString(),o.toString()))}to.compatibleConstructor(o,e)===a&&(u&&a?f=!0:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(o?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&to.getConstructorName(e),o instanceof Error?o.toString():o&&to.getConstructorName(o)))}if(o&&null!=t){let e="including";Si(t)&&(e="matching"),to.compatibleMessage(o,t)===a&&(u&&a?h=!0:this.assert(a,"expected #{this} to throw error "+e+" #{exp} but got #{act}","expected #{this} to throw error not "+e+" #{exp}",t,to.getMessage(o)))}f&&h&&this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(o?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&to.getConstructorName(e),o instanceof Error?o.toString():o&&to.getConstructorName(o)),Ti(this,"object",o)}function Hi(e,t){t&&Ti(this,"message",t);let n=Ti(this,"object"),o=Ti(this,"itself"),r="function"!=typeof n||o?n[e]:n.prototype[e];this.assert("function"==typeof r,"expected #{this} to respond to "+pr(e),"expected #{this} to not respond to "+pr(e))}function Gi(e,t){t&&Ti(this,"message",t);let n=e(Ti(this,"object"));this.assert(n,"expected #{this} to satisfy "+dr(e),"expected #{this} to not satisfy"+dr(e),!Ti(this,"negate"),n)}function Ji(e,t,n){n&&Ti(this,"message",n);let o=Ti(this,"object"),r=Ti(this,"message"),i=Ti(this,"ssfi");new Ur(o,r,i,!0).is.numeric;let s="A `delta` value is required for `closeTo`";if(null==t)throw new mo(r?`${r}: ${s}`:s,void 0,i);if(new Ur(t,r,i,!0).is.numeric,s="A `expected` value is required for `closeTo`",null==e)throw new mo(r?`${r}: ${s}`:s,void 0,i);new Ur(e,r,i,!0).is.numeric;const a=/* @__PURE__ */Zn(e=>e<0n?-e:e,"abs"),c=/* @__PURE__ */Zn(e=>parseFloat(parseFloat(e).toPrecision(12)),"strip");this.assert(c(a(o-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t)}function Yi(e,t,n,o,r){let i=Array.from(t),s=Array.from(e);if(!o){if(s.length!==i.length)return!1;i=i.slice()}return s.every(function(e,t){if(r)return n?n(e,i[t]):e===i[t];if(!n){let t=i.indexOf(e);return-1!==t&&(o||i.splice(t,1),!0)}return i.some(function(t,r){return!!n(e,t)&&(o||i.splice(r,1),!0)})})}function Zi(e,t){t&&Ti(this,"message",t);let n=Ti(this,"object"),o=Ti(this,"message"),r=Ti(this,"ssfi"),i=Ti(this,"contains"),s=Ti(this,"deep"),a=Ti(this,"eql");new Ur(e,o,r,!0).to.be.an("array"),i?this.assert(e.some(function(e){return n.indexOf(e)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):s?this.assert(e.some(function(e){return a(n,e)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}function Xi(e,t,n){n&&Ti(this,"message",n);let o,r=Ti(this,"object"),i=Ti(this,"message"),s=Ti(this,"ssfi");new Ur(r,i,s,!0).is.a("function"),t?(new Ur(e,i,s,!0).to.have.property(t),o=e[t]):(new Ur(e,i,s,!0).is.a("function"),o=e()),r();let a=null==t?e():e[t],c=null==t?o:"."+t;Ti(this,"deltaMsgObj",c),Ti(this,"initialDeltaValue",o),Ti(this,"finalDeltaValue",a),Ti(this,"deltaBehavior","change"),Ti(this,"realDelta",a!==o),this.assert(o!==a,"expected "+c+" to change","expected "+c+" to not change")}function Qi(e,t,n){n&&Ti(this,"message",n);let o,r=Ti(this,"object"),i=Ti(this,"message"),s=Ti(this,"ssfi");new Ur(r,i,s,!0).is.a("function"),t?(new Ur(e,i,s,!0).to.have.property(t),o=e[t]):(new Ur(e,i,s,!0).is.a("function"),o=e()),new Ur(o,i,s,!0).is.a("number"),r();let a=null==t?e():e[t],c=null==t?o:"."+t;Ti(this,"deltaMsgObj",c),Ti(this,"initialDeltaValue",o),Ti(this,"finalDeltaValue",a),Ti(this,"deltaBehavior","increase"),Ti(this,"realDelta",a-o),this.assert(a-o>0,"expected "+c+" to increase","expected "+c+" to not increase")}function es(e,t,n){n&&Ti(this,"message",n);let o,r=Ti(this,"object"),i=Ti(this,"message"),s=Ti(this,"ssfi");new Ur(r,i,s,!0).is.a("function"),t?(new Ur(e,i,s,!0).to.have.property(t),o=e[t]):(new Ur(e,i,s,!0).is.a("function"),o=e()),new Ur(o,i,s,!0).is.a("number"),r();let a=null==t?e():e[t],c=null==t?o:"."+t;Ti(this,"deltaMsgObj",c),Ti(this,"initialDeltaValue",o),Ti(this,"finalDeltaValue",a),Ti(this,"deltaBehavior","decrease"),Ti(this,"realDelta",o-a),this.assert(a-o<0,"expected "+c+" to decrease","expected "+c+" to not decrease")}function ts(e,t){t&&Ti(this,"message",t);let n,o=Ti(this,"deltaMsgObj"),r=Ti(this,"initialDeltaValue"),i=Ti(this,"finalDeltaValue"),s=Ti(this,"deltaBehavior"),a=Ti(this,"realDelta");n="change"===s?Math.abs(i-r)===Math.abs(e):a===Math.abs(e),this.assert(n,"expected "+o+" to "+s+" by "+e,"expected "+o+" to not "+s+" by "+e)}function ns(e,t){return e===t||typeof t==typeof e&&("object"!=typeof e||null===e?e===t:!!t&&(Array.isArray(e)?!!Array.isArray(t)&&e.every(function(e){return t.some(function(t){return ns(e,t)})}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Object.keys(e).every(function(n){let o=e[n],r=t[n];return"object"==typeof o&&null!==o&&null!==r?ns(o,r):"function"==typeof o?o(r):r===o})))}function os(e,t){return new Ur(e,t)}Zn(Oi,"an"),Ur.addChainableMethod("an",Oi),Ur.addChainableMethod("a",Oi),Zn(Ei,"SameValueZero"),Zn(ji,"includeChainingBehavior"),Zn(_i,"include"),Ur.addChainableMethod("include",_i,ji),Ur.addChainableMethod("contain",_i,ji),Ur.addChainableMethod("contains",_i,ji),Ur.addChainableMethod("includes",_i,ji),Ur.addProperty("ok",function(){this.assert(Ti(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),Ur.addProperty("true",function(){this.assert(!0===Ti(this,"object"),"expected #{this} to be true","expected #{this} to be false",!Ti(this,"negate"))}),Ur.addProperty("numeric",function(){const e=Ti(this,"object");this.assert(["Number","BigInt"].includes(fo(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!Ti(this,"negate"))}),Ur.addProperty("callable",function(){const e=Ti(this,"object"),t=Ti(this,"ssfi"),n=Ti(this,"message"),o=n?`${n}: `:"",r=Ti(this,"negate"),i=r?`${o}expected ${pr(e)} not to be a callable function`:`${o}expected ${pr(e)} to be a callable function`,s=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(fo(e));if(s&&r||!s&&!r)throw new mo(i,void 0,t)}),Ur.addProperty("false",function(){this.assert(!1===Ti(this,"object"),"expected #{this} to be false","expected #{this} to be true",!!Ti(this,"negate"))}),Ur.addProperty("null",function(){this.assert(null===Ti(this,"object"),"expected #{this} to be null","expected #{this} not to be null")}),Ur.addProperty("undefined",function(){this.assert(void 0===Ti(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")}),Ur.addProperty("NaN",function(){this.assert(bi(Ti(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")}),Zn(Mi,"assertExist"),Ur.addProperty("exist",Mi),Ur.addProperty("exists",Mi),Ur.addProperty("empty",function(){let e,t=Ti(this,"object"),n=Ti(this,"ssfi"),o=Ti(this,"message");switch(o=o?o+": ":"",fo(t).toLowerCase()){case"array":case"string":e=t.length;break;case"map":case"set":e=t.size;break;case"weakmap":case"weakset":throw new mo(o+".empty was passed a weak collection",void 0,n);case"function":{const e=o+".empty was passed a function "+xi(t);throw new mo(e.trim(),void 0,n)}default:if(t!==Object(t))throw new mo(o+".empty was passed non-string primitive "+pr(t),void 0,n);e=Object.keys(t).length}this.assert(0===e,"expected #{this} to be empty","expected #{this} not to be empty")}),Zn(Ai,"checkArguments"),Ur.addProperty("arguments",Ai),Ur.addProperty("Arguments",Ai),Zn(Ni,"assertEqual"),Ur.addMethod("equal",Ni),Ur.addMethod("equals",Ni),Ur.addMethod("eq",Ni),Zn(Ii,"assertEql"),Ur.addMethod("eql",Ii),Ur.addMethod("eqls",Ii),Zn(Pi,"assertAbove"),Ur.addMethod("above",Pi),Ur.addMethod("gt",Pi),Ur.addMethod("greaterThan",Pi),Zn(Ci,"assertLeast"),Ur.addMethod("least",Ci),Ur.addMethod("gte",Ci),Ur.addMethod("greaterThanOrEqual",Ci),Zn(Fi,"assertBelow"),Ur.addMethod("below",Fi),Ur.addMethod("lt",Fi),Ur.addMethod("lessThan",Fi),Zn(Di,"assertMost"),Ur.addMethod("most",Di),Ur.addMethod("lte",Di),Ur.addMethod("lessThanOrEqual",Di),Ur.addMethod("within",function(e,t,n){n&&Ti(this,"message",n);let o,r=Ti(this,"object"),i=Ti(this,"doLength"),s=Ti(this,"message"),a=s?s+": ":"",c=Ti(this,"ssfi"),l=fo(r).toLowerCase(),u=fo(e).toLowerCase(),f=fo(t).toLowerCase(),h=!0,p="date"===u&&"date"===f?e.toISOString()+".."+t.toISOString():e+".."+t;if(i&&"map"!==l&&"set"!==l&&new Ur(r,s,c,!0).to.have.property("length"),i||"date"!==l||"date"===u&&"date"===f)if(ki(e)&&ki(t)||!i&&!ki(r))if(i||"date"===l||ki(r))h=!1;else{o=a+"expected "+("string"===l?"'"+r+"'":r)+" to be a number or a date"}else o=a+"the arguments to within must be numbers";else o=a+"the arguments to within must be dates";if(h)throw new mo(o,void 0,c);if(i){let n,o="length";"map"===l||"set"===l?(o="size",n=r.size):n=r.length,this.assert(n>=e&&n<=t,"expected #{this} to have a "+o+" within "+p,"expected #{this} to not have a "+o+" within "+p)}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+p,"expected #{this} to not be within "+p)}),Zn(Ri,"assertInstanceOf"),Ur.addMethod("instanceof",Ri),Ur.addMethod("instanceOf",Ri),Zn(Li,"assertProperty"),Ur.addMethod("property",Li),Zn(Bi,"assertOwnProperty"),Ur.addMethod("ownProperty",Bi),Ur.addMethod("haveOwnProperty",Bi),Zn(qi,"assertOwnPropertyDescriptor"),Ur.addMethod("ownPropertyDescriptor",qi),Ur.addMethod("haveOwnPropertyDescriptor",qi),Zn(zi,"assertLengthChain"),Zn(Wi,"assertLength"),Ur.addChainableMethod("length",Wi,zi),Ur.addChainableMethod("lengthOf",Wi,zi),Zn(Vi,"assertMatch"),Ur.addMethod("match",Vi),Ur.addMethod("matches",Vi),Ur.addMethod("string",function(e,t){t&&Ti(this,"message",t);let n=Ti(this,"object"),o=Ti(this,"message"),r=Ti(this,"ssfi");new Ur(n,o,r,!0).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+pr(e),"expected #{this} to not contain "+pr(e))}),Zn(Ui,"assertKeys"),Ur.addMethod("keys",Ui),Ur.addMethod("key",Ui),Zn(Ki,"assertThrows"),Ur.addMethod("throw",Ki),Ur.addMethod("throws",Ki),Ur.addMethod("Throw",Ki),Zn(Hi,"respondTo"),Ur.addMethod("respondTo",Hi),Ur.addMethod("respondsTo",Hi),Ur.addProperty("itself",function(){Ti(this,"itself",!0)}),Zn(Gi,"satisfy"),Ur.addMethod("satisfy",Gi),Ur.addMethod("satisfies",Gi),Zn(Ji,"closeTo"),Ur.addMethod("closeTo",Ji),Ur.addMethod("approximately",Ji),Zn(Yi,"isSubsetOf"),Ur.addMethod("members",function(e,t){t&&Ti(this,"message",t);let n=Ti(this,"object"),o=Ti(this,"message"),r=Ti(this,"ssfi");new Ur(n,o,r,!0).to.be.iterable,new Ur(e,o,r,!0).to.be.iterable;let i,s,a,c=Ti(this,"contains"),l=Ti(this,"ordered");c?(i=l?"an ordered superset":"a superset",s="expected #{this} to be "+i+" of #{exp}",a="expected #{this} to not be "+i+" of #{exp}"):(i=l?"ordered members":"members",s="expected #{this} to have the same "+i+" as #{exp}",a="expected #{this} to not have the same "+i+" as #{exp}");let u=Ti(this,"deep")?Ti(this,"eql"):void 0;this.assert(Yi(e,n,u,c,l),s,a,e,n,!0)}),Ur.addProperty("iterable",function(e){e&&Ti(this,"message",e);let t=Ti(this,"object");this.assert(null!=t&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t)}),Zn(Zi,"oneOf"),Ur.addMethod("oneOf",Zi),Zn(Xi,"assertChanges"),Ur.addMethod("change",Xi),Ur.addMethod("changes",Xi),Zn(Qi,"assertIncreases"),Ur.addMethod("increase",Qi),Ur.addMethod("increases",Qi),Zn(es,"assertDecreases"),Ur.addMethod("decrease",es),Ur.addMethod("decreases",es),Zn(ts,"assertDelta"),Ur.addMethod("by",ts),Ur.addProperty("extensible",function(){let e=Ti(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")}),Ur.addProperty("sealed",function(){let e=Ti(this,"object"),t=e!==Object(e)||Object.isSealed(e);this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")}),Ur.addProperty("frozen",function(){let e=Ti(this,"object"),t=e!==Object(e)||Object.isFrozen(e);this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")}),Ur.addProperty("finite",function(e){let t=Ti(this,"object");this.assert("number"==typeof t&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number")}),Zn(ns,"compareSubset"),Ur.addMethod("containSubset",function(e){const t=lo(this,"object"),n=hr.showDiff;this.assert(ns(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n)}),Zn(os,"expect"),os.fail=function(e,t,n,o){throw arguments.length<2&&(n=e,e=void 0),new mo(n=n||"expect.fail()",{actual:e,expected:t,operator:o},os.fail)};var rs={};function is(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||"function"==typeof Symbol&&this instanceof Symbol||"function"==typeof BigInt&&this instanceof BigInt?new Ur(this.valueOf(),null,e):new Ur(this,null,e)}function t(e){Object.defineProperty(this,"should",{value:e,enumerable:!0,configurable:!0,writable:!0})}Zn(e,"shouldGetter"),Zn(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});let n={fail:function(e,t,o,r){throw arguments.length<2&&(o=e,e=void 0),new mo(o=o||"should.fail()",{actual:e,expected:t,operator:r},n.fail)},equal:function(e,t,n){new Ur(e,n).to.equal(t)},Throw:function(e,t,n,o){new Ur(e,o).to.Throw(t,n)},exist:function(e,t){new Ur(e,t).to.exist},not:{}};return n.not.equal=function(e,t,n){new Ur(e,n).to.not.equal(t)},n.not.Throw=function(e,t,n,o){new Ur(e,o).to.not.Throw(t,n)},n.not.exist=function(e,t){new Ur(e,t).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}Xn(rs,{Should:()=>as,should:()=>ss}),Zn(is,"loadShould");var ss=is,as=is;function cs(e,t){new Ur(null,null,cs,!0).assert(e,t,"[ negation message unavailable ]")}Zn(cs,"assert"),cs.fail=function(e,t,n,o){throw arguments.length<2&&(n=e,e=void 0),new mo(n=n||"assert.fail()",{actual:e,expected:t,operator:o},cs.fail)},cs.isOk=function(e,t){new Ur(e,t,cs.isOk,!0).is.ok},cs.isNotOk=function(e,t){new Ur(e,t,cs.isNotOk,!0).is.not.ok},cs.equal=function(e,t,n){let o=new Ur(e,n,cs.equal,!0);o.assert(t==lo(o,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)},cs.notEqual=function(e,t,n){let o=new Ur(e,n,cs.notEqual,!0);o.assert(t!=lo(o,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)},cs.strictEqual=function(e,t,n){new Ur(e,n,cs.strictEqual,!0).to.equal(t)},cs.notStrictEqual=function(e,t,n){new Ur(e,n,cs.notStrictEqual,!0).to.not.equal(t)},cs.deepEqual=cs.deepStrictEqual=function(e,t,n){new Ur(e,n,cs.deepEqual,!0).to.eql(t)},cs.notDeepEqual=function(e,t,n){new Ur(e,n,cs.notDeepEqual,!0).to.not.eql(t)},cs.isAbove=function(e,t,n){new Ur(e,n,cs.isAbove,!0).to.be.above(t)},cs.isAtLeast=function(e,t,n){new Ur(e,n,cs.isAtLeast,!0).to.be.least(t)},cs.isBelow=function(e,t,n){new Ur(e,n,cs.isBelow,!0).to.be.below(t)},cs.isAtMost=function(e,t,n){new Ur(e,n,cs.isAtMost,!0).to.be.most(t)},cs.isTrue=function(e,t){new Ur(e,t,cs.isTrue,!0).is.true},cs.isNotTrue=function(e,t){new Ur(e,t,cs.isNotTrue,!0).to.not.equal(!0)},cs.isFalse=function(e,t){new Ur(e,t,cs.isFalse,!0).is.false},cs.isNotFalse=function(e,t){new Ur(e,t,cs.isNotFalse,!0).to.not.equal(!1)},cs.isNull=function(e,t){new Ur(e,t,cs.isNull,!0).to.equal(null)},cs.isNotNull=function(e,t){new Ur(e,t,cs.isNotNull,!0).to.not.equal(null)},cs.isNaN=function(e,t){new Ur(e,t,cs.isNaN,!0).to.be.NaN},cs.isNotNaN=function(e,t){new Ur(e,t,cs.isNotNaN,!0).not.to.be.NaN},cs.exists=function(e,t){new Ur(e,t,cs.exists,!0).to.exist},cs.notExists=function(e,t){new Ur(e,t,cs.notExists,!0).to.not.exist},cs.isUndefined=function(e,t){new Ur(e,t,cs.isUndefined,!0).to.equal(void 0)},cs.isDefined=function(e,t){new Ur(e,t,cs.isDefined,!0).to.not.equal(void 0)},cs.isCallable=function(e,t){new Ur(e,t,cs.isCallable,!0).is.callable},cs.isNotCallable=function(e,t){new Ur(e,t,cs.isNotCallable,!0).is.not.callable},cs.isObject=function(e,t){new Ur(e,t,cs.isObject,!0).to.be.a("object")},cs.isNotObject=function(e,t){new Ur(e,t,cs.isNotObject,!0).to.not.be.a("object")},cs.isArray=function(e,t){new Ur(e,t,cs.isArray,!0).to.be.an("array")},cs.isNotArray=function(e,t){new Ur(e,t,cs.isNotArray,!0).to.not.be.an("array")},cs.isString=function(e,t){new Ur(e,t,cs.isString,!0).to.be.a("string")},cs.isNotString=function(e,t){new Ur(e,t,cs.isNotString,!0).to.not.be.a("string")},cs.isNumber=function(e,t){new Ur(e,t,cs.isNumber,!0).to.be.a("number")},cs.isNotNumber=function(e,t){new Ur(e,t,cs.isNotNumber,!0).to.not.be.a("number")},cs.isNumeric=function(e,t){new Ur(e,t,cs.isNumeric,!0).is.numeric},cs.isNotNumeric=function(e,t){new Ur(e,t,cs.isNotNumeric,!0).is.not.numeric},cs.isFinite=function(e,t){new Ur(e,t,cs.isFinite,!0).to.be.finite},cs.isBoolean=function(e,t){new Ur(e,t,cs.isBoolean,!0).to.be.a("boolean")},cs.isNotBoolean=function(e,t){new Ur(e,t,cs.isNotBoolean,!0).to.not.be.a("boolean")},cs.typeOf=function(e,t,n){new Ur(e,n,cs.typeOf,!0).to.be.a(t)},cs.notTypeOf=function(e,t,n){new Ur(e,n,cs.notTypeOf,!0).to.not.be.a(t)},cs.instanceOf=function(e,t,n){new Ur(e,n,cs.instanceOf,!0).to.be.instanceOf(t)},cs.notInstanceOf=function(e,t,n){new Ur(e,n,cs.notInstanceOf,!0).to.not.be.instanceOf(t)},cs.include=function(e,t,n){new Ur(e,n,cs.include,!0).include(t)},cs.notInclude=function(e,t,n){new Ur(e,n,cs.notInclude,!0).not.include(t)},cs.deepInclude=function(e,t,n){new Ur(e,n,cs.deepInclude,!0).deep.include(t)},cs.notDeepInclude=function(e,t,n){new Ur(e,n,cs.notDeepInclude,!0).not.deep.include(t)},cs.nestedInclude=function(e,t,n){new Ur(e,n,cs.nestedInclude,!0).nested.include(t)},cs.notNestedInclude=function(e,t,n){new Ur(e,n,cs.notNestedInclude,!0).not.nested.include(t)},cs.deepNestedInclude=function(e,t,n){new Ur(e,n,cs.deepNestedInclude,!0).deep.nested.include(t)},cs.notDeepNestedInclude=function(e,t,n){new Ur(e,n,cs.notDeepNestedInclude,!0).not.deep.nested.include(t)},cs.ownInclude=function(e,t,n){new Ur(e,n,cs.ownInclude,!0).own.include(t)},cs.notOwnInclude=function(e,t,n){new Ur(e,n,cs.notOwnInclude,!0).not.own.include(t)},cs.deepOwnInclude=function(e,t,n){new Ur(e,n,cs.deepOwnInclude,!0).deep.own.include(t)},cs.notDeepOwnInclude=function(e,t,n){new Ur(e,n,cs.notDeepOwnInclude,!0).not.deep.own.include(t)},cs.match=function(e,t,n){new Ur(e,n,cs.match,!0).to.match(t)},cs.notMatch=function(e,t,n){new Ur(e,n,cs.notMatch,!0).to.not.match(t)},cs.property=function(e,t,n){new Ur(e,n,cs.property,!0).to.have.property(t)},cs.notProperty=function(e,t,n){new Ur(e,n,cs.notProperty,!0).to.not.have.property(t)},cs.propertyVal=function(e,t,n,o){new Ur(e,o,cs.propertyVal,!0).to.have.property(t,n)},cs.notPropertyVal=function(e,t,n,o){new Ur(e,o,cs.notPropertyVal,!0).to.not.have.property(t,n)},cs.deepPropertyVal=function(e,t,n,o){new Ur(e,o,cs.deepPropertyVal,!0).to.have.deep.property(t,n)},cs.notDeepPropertyVal=function(e,t,n,o){new Ur(e,o,cs.notDeepPropertyVal,!0).to.not.have.deep.property(t,n)},cs.ownProperty=function(e,t,n){new Ur(e,n,cs.ownProperty,!0).to.have.own.property(t)},cs.notOwnProperty=function(e,t,n){new Ur(e,n,cs.notOwnProperty,!0).to.not.have.own.property(t)},cs.ownPropertyVal=function(e,t,n,o){new Ur(e,o,cs.ownPropertyVal,!0).to.have.own.property(t,n)},cs.notOwnPropertyVal=function(e,t,n,o){new Ur(e,o,cs.notOwnPropertyVal,!0).to.not.have.own.property(t,n)},cs.deepOwnPropertyVal=function(e,t,n,o){new Ur(e,o,cs.deepOwnPropertyVal,!0).to.have.deep.own.property(t,n)},cs.notDeepOwnPropertyVal=function(e,t,n,o){new Ur(e,o,cs.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,n)},cs.nestedProperty=function(e,t,n){new Ur(e,n,cs.nestedProperty,!0).to.have.nested.property(t)},cs.notNestedProperty=function(e,t,n){new Ur(e,n,cs.notNestedProperty,!0).to.not.have.nested.property(t)},cs.nestedPropertyVal=function(e,t,n,o){new Ur(e,o,cs.nestedPropertyVal,!0).to.have.nested.property(t,n)},cs.notNestedPropertyVal=function(e,t,n,o){new Ur(e,o,cs.notNestedPropertyVal,!0).to.not.have.nested.property(t,n)},cs.deepNestedPropertyVal=function(e,t,n,o){new Ur(e,o,cs.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,n)},cs.notDeepNestedPropertyVal=function(e,t,n,o){new Ur(e,o,cs.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,n)},cs.lengthOf=function(e,t,n){new Ur(e,n,cs.lengthOf,!0).to.have.lengthOf(t)},cs.hasAnyKeys=function(e,t,n){new Ur(e,n,cs.hasAnyKeys,!0).to.have.any.keys(t)},cs.hasAllKeys=function(e,t,n){new Ur(e,n,cs.hasAllKeys,!0).to.have.all.keys(t)},cs.containsAllKeys=function(e,t,n){new Ur(e,n,cs.containsAllKeys,!0).to.contain.all.keys(t)},cs.doesNotHaveAnyKeys=function(e,t,n){new Ur(e,n,cs.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)},cs.doesNotHaveAllKeys=function(e,t,n){new Ur(e,n,cs.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)},cs.hasAnyDeepKeys=function(e,t,n){new Ur(e,n,cs.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)},cs.hasAllDeepKeys=function(e,t,n){new Ur(e,n,cs.hasAllDeepKeys,!0).to.have.all.deep.keys(t)},cs.containsAllDeepKeys=function(e,t,n){new Ur(e,n,cs.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)},cs.doesNotHaveAnyDeepKeys=function(e,t,n){new Ur(e,n,cs.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)},cs.doesNotHaveAllDeepKeys=function(e,t,n){new Ur(e,n,cs.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)},cs.throws=function(e,t,n,o){return("string"==typeof t||t instanceof RegExp)&&(n=t,t=null),lo(new Ur(e,o,cs.throws,!0).to.throw(t,n),"object")},cs.doesNotThrow=function(e,t,n,o){("string"==typeof t||t instanceof RegExp)&&(n=t,t=null),new Ur(e,o,cs.doesNotThrow,!0).to.not.throw(t,n)},cs.operator=function(e,t,n,o){let r;switch(t){case"==":r=e==n;break;case"===":r=e===n;break;case">":r=e>n;break;case">=":r=e>=n;break;case"<":r=e<n;break;case"<=":r=e<=n;break;case"!=":r=e!=n;break;case"!==":r=e!==n;break;default:throw new mo((o=o?o+": ":o)+'Invalid operator "'+t+'"',void 0,cs.operator)}let i=new Ur(r,o,cs.operator,!0);i.assert(!0===lo(i,"object"),"expected "+pr(e)+" to be "+t+" "+pr(n),"expected "+pr(e)+" to not be "+t+" "+pr(n))},cs.closeTo=function(e,t,n,o){new Ur(e,o,cs.closeTo,!0).to.be.closeTo(t,n)},cs.approximately=function(e,t,n,o){new Ur(e,o,cs.approximately,!0).to.be.approximately(t,n)},cs.sameMembers=function(e,t,n){new Ur(e,n,cs.sameMembers,!0).to.have.same.members(t)},cs.notSameMembers=function(e,t,n){new Ur(e,n,cs.notSameMembers,!0).to.not.have.same.members(t)},cs.sameDeepMembers=function(e,t,n){new Ur(e,n,cs.sameDeepMembers,!0).to.have.same.deep.members(t)},cs.notSameDeepMembers=function(e,t,n){new Ur(e,n,cs.notSameDeepMembers,!0).to.not.have.same.deep.members(t)},cs.sameOrderedMembers=function(e,t,n){new Ur(e,n,cs.sameOrderedMembers,!0).to.have.same.ordered.members(t)},cs.notSameOrderedMembers=function(e,t,n){new Ur(e,n,cs.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)},cs.sameDeepOrderedMembers=function(e,t,n){new Ur(e,n,cs.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)},cs.notSameDeepOrderedMembers=function(e,t,n){new Ur(e,n,cs.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)},cs.includeMembers=function(e,t,n){new Ur(e,n,cs.includeMembers,!0).to.include.members(t)},cs.notIncludeMembers=function(e,t,n){new Ur(e,n,cs.notIncludeMembers,!0).to.not.include.members(t)},cs.includeDeepMembers=function(e,t,n){new Ur(e,n,cs.includeDeepMembers,!0).to.include.deep.members(t)},cs.notIncludeDeepMembers=function(e,t,n){new Ur(e,n,cs.notIncludeDeepMembers,!0).to.not.include.deep.members(t)},cs.includeOrderedMembers=function(e,t,n){new Ur(e,n,cs.includeOrderedMembers,!0).to.include.ordered.members(t)},cs.notIncludeOrderedMembers=function(e,t,n){new Ur(e,n,cs.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)},cs.includeDeepOrderedMembers=function(e,t,n){new Ur(e,n,cs.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)},cs.notIncludeDeepOrderedMembers=function(e,t,n){new Ur(e,n,cs.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)},cs.oneOf=function(e,t,n){new Ur(e,n,cs.oneOf,!0).to.be.oneOf(t)},cs.isIterable=function(e,t){if(null==e||!e[Symbol.iterator])throw t=t?`${t} expected ${pr(e)} to be an iterable`:`expected ${pr(e)} to be an iterable`,new mo(t,void 0,cs.isIterable)},cs.changes=function(e,t,n,o){3===arguments.length&&"function"==typeof t&&(o=n,n=null),new Ur(e,o,cs.changes,!0).to.change(t,n)},cs.changesBy=function(e,t,n,o,r){if(4===arguments.length&&"function"==typeof t){let e=o;o=n,r=e}else 3===arguments.length&&(o=n,n=null);new Ur(e,r,cs.changesBy,!0).to.change(t,n).by(o)},cs.doesNotChange=function(e,t,n,o){return 3===arguments.length&&"function"==typeof t&&(o=n,n=null),new Ur(e,o,cs.doesNotChange,!0).to.not.change(t,n)},cs.changesButNotBy=function(e,t,n,o,r){if(4===arguments.length&&"function"==typeof t){let e=o;o=n,r=e}else 3===arguments.length&&(o=n,n=null);new Ur(e,r,cs.changesButNotBy,!0).to.change(t,n).but.not.by(o)},cs.increases=function(e,t,n,o){return 3===arguments.length&&"function"==typeof t&&(o=n,n=null),new Ur(e,o,cs.increases,!0).to.increase(t,n)},cs.increasesBy=function(e,t,n,o,r){if(4===arguments.length&&"function"==typeof t){let e=o;o=n,r=e}else 3===arguments.length&&(o=n,n=null);new Ur(e,r,cs.increasesBy,!0).to.increase(t,n).by(o)},cs.doesNotIncrease=function(e,t,n,o){return 3===arguments.length&&"function"==typeof t&&(o=n,n=null),new Ur(e,o,cs.doesNotIncrease,!0).to.not.increase(t,n)},cs.increasesButNotBy=function(e,t,n,o,r){if(4===arguments.length&&"function"==typeof t){let e=o;o=n,r=e}else 3===arguments.length&&(o=n,n=null);new Ur(e,r,cs.increasesButNotBy,!0).to.increase(t,n).but.not.by(o)},cs.decreases=function(e,t,n,o){return 3===arguments.length&&"function"==typeof t&&(o=n,n=null),new Ur(e,o,cs.decreases,!0).to.decrease(t,n)},cs.decreasesBy=function(e,t,n,o,r){if(4===arguments.length&&"function"==typeof t){let e=o;o=n,r=e}else 3===arguments.length&&(o=n,n=null);new Ur(e,r,cs.decreasesBy,!0).to.decrease(t,n).by(o)},cs.doesNotDecrease=function(e,t,n,o){return 3===arguments.length&&"function"==typeof t&&(o=n,n=null),new Ur(e,o,cs.doesNotDecrease,!0).to.not.decrease(t,n)},cs.doesNotDecreaseBy=function(e,t,n,o,r){if(4===arguments.length&&"function"==typeof t){let e=o;o=n,r=e}else 3===arguments.length&&(o=n,n=null);return new Ur(e,r,cs.doesNotDecreaseBy,!0).to.not.decrease(t,n).by(o)},cs.decreasesButNotBy=function(e,t,n,o,r){if(4===arguments.length&&"function"==typeof t){let e=o;o=n,r=e}else 3===arguments.length&&(o=n,n=null);new Ur(e,r,cs.decreasesButNotBy,!0).to.decrease(t,n).but.not.by(o)},cs.ifError=function(e){if(e)throw e},cs.isExtensible=function(e,t){new Ur(e,t,cs.isExtensible,!0).to.be.extensible},cs.isNotExtensible=function(e,t){new Ur(e,t,cs.isNotExtensible,!0).to.not.be.extensible},cs.isSealed=function(e,t){new Ur(e,t,cs.isSealed,!0).to.be.sealed},cs.isNotSealed=function(e,t){new Ur(e,t,cs.isNotSealed,!0).to.not.be.sealed},cs.isFrozen=function(e,t){new Ur(e,t,cs.isFrozen,!0).to.be.frozen},cs.isNotFrozen=function(e,t){new Ur(e,t,cs.isNotFrozen,!0).to.not.be.frozen},cs.isEmpty=function(e,t){new Ur(e,t,cs.isEmpty,!0).to.be.empty},cs.isNotEmpty=function(e,t){new Ur(e,t,cs.isNotEmpty,!0).to.not.be.empty},cs.containsSubset=function(e,t,n){new Ur(e,n).to.containSubset(t)},cs.doesNotContainSubset=function(e,t,n){new Ur(e,n).to.not.containSubset(t)};for(const[hf,pf]of[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]])cs[pf]=cs[hf];var ls=[];function us(e){const t={use:us,AssertionError:mo,util:eo,config:hr,expect:os,assert:cs,Assertion:Ur,...rs};return~ls.indexOf(e)||(e(t,eo),ls.push(e)),t}Zn(us,"use");const fs=/* @__PURE__ */Symbol.for("matchers-object"),hs=/* @__PURE__ */Symbol.for("$$jest-matchers-object"),ps=/* @__PURE__ */Symbol.for("expect-global"),ds=/* @__PURE__ */Symbol.for("asymmetric-matchers-object"),ms={toSatisfy(e,t,n){const{printReceived:o,printExpected:r,matcherHint:i}=this.utils,s=t(e);return{pass:s,message:()=>s?`${i(".not.toSatisfy","received","")}\n\nExpected value to not satisfy:\n${n||r(t)}\nReceived:\n${o(e)}`:`${i(".toSatisfy","received","")}\n\nExpected value to satisfy:\n${n||r(t)}\n\nReceived:\n${o(e)}`}},toBeOneOf(e,t){const{equals:n,customTesters:o}=this,{printReceived:r,printExpected:i,matcherHint:s}=this.utils;let a;if(Array.isArray(t))a=0===t.length||t.some(t=>n(t,e,o));else{if(!(t instanceof Set))throw new TypeError(`You must provide an array or set to ${s(".toBeOneOf")}, not '${typeof t}'.`);a=0===t.size||t.has(e)||[...t].some(t=>n(t,e,o))}return{pass:a,message:()=>a?`${s(".not.toBeOneOf","received","")}\n\nExpected value to not be one of:\n${i(t)}\nReceived:\n${r(e)}`:`${s(".toBeOneOf","received","")}\n\nExpected value to be one of:\n${i(t)}\n\nReceived:\n${r(e)}`}}},gs=l.green,ys=l.red,bs=l.inverse,ws=l.bold,vs=l.dim;function xs(e,t="received",n="expected",o={}){const{comment:r="",isDirectExpectCall:i=!1,isNot:s=!1,promise:a="",secondArgument:c="",expectedColor:l=gs,receivedColor:u=ys,secondArgumentColor:f=gs}=o;let h="",p="expect";return i||""===t||(h+=vs(`${p}(`)+u(t),p=")"),""!==a&&(h+=vs(`${p}.`)+a,p=""),s&&(h+=`${vs(`${p}.`)}not`,p=""),e.includes(".")?p+=e:(h+=vs(`${p}.`)+e,p=""),""===n?p+="()":(h+=vs(`${p}(`)+l(n),c&&(h+=vs(", ")+f(c)),p=")"),""!==r&&(p+=` // ${r}`),""!==p&&(h+=vs(p)),h}function Ss(e){return e.replace(/\s+$/gm,e=>"·".repeat(e.length))}function ks(e){return ys(Ss(ht(e)))}function Ts(e){return gs(Ss(ht(e)))}function $s(){return{EXPECTED_COLOR:gs,RECEIVED_COLOR:ys,INVERTED_COLOR:bs,BOLD_WEIGHT:ws,DIM_COLOR:vs,diff:vn,matcherHint:xs,printReceived:ks,printExpected:Ts,printDiffOrStringify:jn,printWithType:Os}}function Os(e,t,n){const o=wt(t);return("null"!==o&&"undefined"!==o?`${e} has type: ${o}\n`:"")+`${e} has value: ${n(t)}`}function Es(){return globalThis[hs].customEqualityTesters}function js(e,t,n,o){return Ms(e,t,[],[],n=n||[],o?Is:Ns)}function _s(e){return!!e&&"object"==typeof e&&"asymmetricMatch"in e&&Ps("Function",e.asymmetricMatch)}function Ms(e,t,n,o,r,i){let s=!0;const a=function(e,t,n){const o=_s(e),r=_s(t);if(!o||!r)return o?e.asymmetricMatch(t,n):r?t.asymmetricMatch(e,n):void 0}(e,t,r);if(void 0!==a)return a;const c={equals:js};for(let d=0;d<r.length;d++){const n=r[d].call(c,e,t,r);if(void 0!==n)return n}if("function"==typeof URL&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(null===e||null===t)return e===t;const l=Object.prototype.toString.call(e);if(l!==Object.prototype.toString.call(t))return!1;switch(l){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e==typeof t&&("object"!=typeof e&&"object"!=typeof t?Object.is(e,t):Object.is(e.valueOf(),t.valueOf()));case"[object Date]":{const n=+e,o=+t;return n===o||Number.isNaN(n)&&Number.isNaN(o)}case"[object RegExp]":return e.source===t.source&&e.flags===t.flags;case"[object Temporal.Instant]":case"[object Temporal.ZonedDateTime]":case"[object Temporal.PlainDateTime]":case"[object Temporal.PlainDate]":case"[object Temporal.PlainTime]":case"[object Temporal.PlainYearMonth]":case"[object Temporal.PlainMonthDay]":return e.equals(t);case"[object Temporal.Duration]":return e.toString()===t.toString()}if("object"!=typeof e||"object"!=typeof t)return!1;if(Cs(e)&&Cs(t))return e.isEqualNode(t);let u=n.length;for(;u--;){if(n[u]===e)return o[u]===t;if(o[u]===t)return!1}if(n.push(e),o.push(t),"[object Array]"===l&&e.length!==t.length)return!1;if(e instanceof Error&&t instanceof Error)try{return function(e,t,n,o,r,i){let s=Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&e.name===t.name&&e.message===t.message;void 0!==t.cause&&s&&(s=Ms(e.cause,t.cause,n,o,r,i));e instanceof AggregateError&&t instanceof AggregateError&&s&&(s=Ms(e.errors,t.errors,n,o,r,i));return s&&(s=Ms({...e},{...t},n,o,r,i)),s}(e,t,n,o,r,i)}finally{n.pop(),o.pop()}const f=As(e,i);let h,p=f.length;if(As(t,i).length!==p)return!1;for(;p--;)if(h=f[p],s=i(t,h)&&Ms(e[h],t[h],n,o,r,i),!s)return!1;return n.pop(),o.pop(),s}function As(e,t){const n=[];for(const o in e)t(e,o)&&n.push(o);return n.concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable))}function Ns(e,t){return Is(e,t)&&void 0!==e[t]}function Is(e,t){return Object.hasOwn(e,t)}function Ps(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Cs(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&"number"==typeof e.nodeType&&"nodeName"in e&&"string"==typeof e.nodeName&&"isEqualNode"in e&&"function"==typeof e.isEqualNode}const Fs="@@__IMMUTABLE_KEYED__@@",Ds="@@__IMMUTABLE_SET__@@",Rs="@@__IMMUTABLE_ORDERED__@@";function Ls(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}const Bs=Symbol.iterator;function qs(e){return!(null==e||!e[Bs])}function zs(e,t,n=[],o=[],r=[]){if("object"!=typeof e||"object"!=typeof t||Array.isArray(e)||Array.isArray(t)||!qs(e)||!qs(t))return;if(e.constructor!==t.constructor)return!1;let i=o.length;for(;i--;)if(o[i]===e)return r[i]===t;o.push(e),r.push(t);const s=[...n.filter(e=>e!==zs),function(e,t){return zs(e,t,[...n],[...o],[...r])}];if(void 0!==e.size){if(e.size!==t.size)return!1;if(Ps("Set",e)||(c=e)&&c[Ds]&&!c[Rs]){let n=!0;for(const o of e)if(!t.has(o)){let e=!1;for(const n of t){!0===js(o,n,s)&&(e=!0)}if(!1===e){n=!1;break}}return o.pop(),r.pop(),n}if(Ps("Map",e)||(a=e)&&a[Fs]&&!a[Rs]){let n=!0;for(const o of e)if(!t.has(o[0])||!js(o[1],t.get(o[0]),s)){let e=!1;for(const n of t){let t=!1;!0===js(o[0],n[0],s)&&(t=js(o[1],n[1],s)),!0===t&&(e=!0)}if(!1===e){n=!1;break}}return o.pop(),r.pop(),n}}var a,c;const l=t[Bs]();for(const f of e){const e=l.next();if(e.done||!js(f,e.value,s))return!1}if(!l.next().done)return!1;if(!(u=e,Boolean(u&&Ls(u)&&u["@@__IMMUTABLE_LIST__@@"])||function(e){return Boolean(e&&Ls(e)&&e[Fs]&&e[Rs])}(e)||function(e){return Boolean(e&&Ls(e)&&e[Ds]&&e[Rs])}(e)||function(e){return Boolean(e&&Ls(e)&&e["@@__IMMUTABLE_RECORD__@@"])}(e))){if(!js(Object.entries(e),Object.entries(t),s))return!1}var u;return o.pop(),r.pop(),!0}function Ws(e,t){return!(!e||"object"!=typeof e||e===Object.prototype)&&(Object.hasOwn(e,t)||Ws(Object.getPrototypeOf(e),t))}function Vs(e,t,n=[]){const o=n.filter(e=>e!==Vs),r=(e=/* @__PURE__ */new WeakMap)=>(t,n)=>{var i;if(!(!bt(i=n)||i instanceof Error||Array.isArray(i)||i instanceof Date))return Object.keys(n).every(i=>{if(null!=n[i]&&"object"==typeof n[i]){if(e.has(n[i]))return js(t[i],n[i],o);e.set(n[i],!0)}const s=null!=t&&Ws(t,i)&&js(t[i],n[i],[...o,r(e)]);return e.delete(n[i]),s})};return r()(e,t)}function Us(e,t){if(null!=e&&null!=t&&e.constructor!==t.constructor)return!1}function Ks(e,t){let n=e,o=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer&&t instanceof ArrayBuffer))return;try{n=new DataView(e),o=new DataView(t)}catch{return}}if(n.byteLength!==o.byteLength)return!1;for(let r=0;r<n.byteLength;r++)if(n.getUint8(r)!==o.getUint8(r))return!1;return!0}function Hs(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const o=Object.keys(e),r=Object.keys(t);return js(e,t,n.filter(e=>e!==Hs),!0)&&js(o,r)}function Gs(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var n;return null===(n=Object.getOwnPropertyDescriptor(e,t))||void 0===n?void 0:n.enumerable})]}if(!Object.hasOwn(globalThis,fs)){const e=/* @__PURE__ */new WeakMap,t=/* @__PURE__ */Object.create(null),n=[],o=/* @__PURE__ */Object.create(null);Object.defineProperty(globalThis,fs,{get:()=>e}),Object.defineProperty(globalThis,hs,{configurable:!0,get:()=>({state:e.get(globalThis[ps]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,ds,{get:()=>o})}function Js(e){return globalThis[fs].get(e)}function Ys(e,t){const n=globalThis[fs],o=n.get(t)||{},r=Object.defineProperties(o,{...Object.getOwnPropertyDescriptors(o),...Object.getOwnPropertyDescriptors(e)});n.set(t,r)}let Zs=class{$$typeof=/* @__PURE__ */Symbol.for("jest.asymmetricMatcher");constructor(e,t=!1){this.sample=e,this.inverse=t}getMatcherContext(e){return{...Js(e||globalThis[ps]),equals:js,isNot:this.inverse,customTesters:Es(),utils:{...$s(),diff:vn,stringify:ht,iterableEquality:zs,subsetEquality:Vs}}}};Zs.prototype[/* @__PURE__ */Symbol.for("chai/inspect")]=function(e){const t=ht(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class Xs extends Zs{constructor(e,t=!1){if(!Ps("String",e))throw new Error("Expected is not a string");super(e,t)}asymmetricMatch(e){const t=Ps("String",e)&&e.includes(this.sample);return this.inverse?!t:t}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class Qs extends Zs{asymmetricMatch(e){return null!=e}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class ea extends Zs{constructor(e,t=!1){super(e,t)}getPrototype(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.constructor.prototype===e?null:e.constructor.prototype}hasProperty(e,t){return!!e&&(!!Object.hasOwn(e,t)||this.hasProperty(this.getPrototype(e),t))}getProperties(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var n;return null===(n=Object.getOwnPropertyDescriptor(e,t))||void 0===n?void 0:n.enumerable})]}asymmetricMatch(e,t){if("object"!=typeof this.sample)throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let n=!0;const o=this.getProperties(this.sample);for(const s of o){var r,i;if(!this.hasProperty(e,s)){n=!1;break}if(!js((null===(r=Object.getOwnPropertyDescriptor(this.sample,s))||void 0===r?void 0:r.value)??this.sample[s],(null===(i=Object.getOwnPropertyDescriptor(e,s))||void 0===i?void 0:i.value)??e[s],t)){n=!1;break}}return this.inverse?!n:n}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class ta extends Zs{constructor(e,t=!1){super(e,t)}asymmetricMatch(e,t){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);const n=0===this.sample.length||Array.isArray(e)&&this.sample.every(n=>e.some(e=>js(n,e,t)));return this.inverse?!n:n}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class na extends Zs{constructor(e){if(void 0===e)throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(e)}fnNameFor(e){if(e.name)return e.name;const t=Function.prototype.toString.call(e).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return t?t[1]:"<anonymous>"}asymmetricMatch(e){return this.sample===String?"string"==typeof e||e instanceof String:this.sample===Number?"number"==typeof e||e instanceof Number:this.sample===Function?"function"==typeof e||"function"==typeof e:this.sample===Boolean?"boolean"==typeof e||e instanceof Boolean:this.sample===BigInt?"bigint"==typeof e||e instanceof BigInt:this.sample===Symbol?"symbol"==typeof e||e instanceof Symbol:this.sample===Object?"object"==typeof e:e instanceof this.sample}toString(){return"Any"}getExpectedType(){return this.sample===String?"string":this.sample===Number?"number":this.sample===Function?"function":this.sample===Object?"object":this.sample===Boolean?"boolean":this.fnNameFor(this.sample)}toAsymmetricMatcher(){return`Any<${this.fnNameFor(this.sample)}>`}}class oa extends Zs{constructor(e,t=!1){if(!Ps("String",e)&&!Ps("RegExp",e))throw new Error("Expected is not a String or a RegExp");super(new RegExp(e),t)}asymmetricMatch(e){const t=Ps("String",e)&&this.sample.test(e);return this.inverse?!t:t}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class ra extends Zs{precision;constructor(e,t=2,n=!1){if(!Ps("Number",e))throw new Error("Expected is not a Number");if(!Ps("Number",t))throw new Error("Precision is not a Number");super(e),this.inverse=n,this.precision=t}asymmetricMatch(e){if(!Ps("Number",e))return!1;let t=!1;return t=e===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||(e===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY||Math.abs(this.sample-e)<10**-this.precision/2),this.inverse?!t:t}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${e="digit",t=this.precision,`${t} ${e}${1===t?"":"s"}`})`].join(" ");var e,t}}class ia extends Zs{result;constructor(e,t=!1){if(!(n=e)||"object"!=typeof n&&"function"!=typeof n||!n["~standard"]||"function"!=typeof n["~standard"].validate)throw new TypeError("SchemaMatching expected to receive a Standard Schema.");var n;super(e,t)}asymmetricMatch(e){const t=this.sample["~standard"].validate(e);if(t instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=t;const n=!this.result.issues||0===this.result.issues.length;return this.inverse?!n:n}toString(){return`Schema${this.inverse?"Not":""}Matching`}getExpectedType(){return"object"}toAsymmetricMatcher(){var e;const{utils:t}=this.getMatcherContext();return((null===(e=this.result)||void 0===e?void 0:e.issues)||[]).length>0?`${this.toString()} ${t.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}}function sa(e,t,n){const o=e.flag(t,"negate")?"not.":"",r=`${e.flag(t,"_name")}(${n?"expected":""})`,i=e.flag(t,"promise");return`expect(actual)${i?`.${i}`:""}.${o}${r}`}function aa(e,t,n,o){const r=e;if(r&&t instanceof Promise){t=t.finally(()=>{if(!r.promises)return;const e=r.promises.indexOf(t);-1!==e&&r.promises.splice(e,1)}),r.promises||(r.promises=[]),r.promises.push(t);let e=!1;return r.onFinished??(r.onFinished=[]),r.onFinished.push(()=>{if(!e){var t;const e=((null===(t=globalThis.__vitest_worker__)||void 0===t?void 0:t.onFilterStackTrace)||(e=>e||""))(o.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ","Please remember to await the assertion.\n",e].join(""))}}),{then:(n,o)=>(e=!0,t.then(n,o)),catch:e=>t.catch(e),finally:e=>t.finally(e),[Symbol.toStringTag]:"Promise"}}return t}function ca(e,t){var n;e.result||(e.result={state:"fail"}),e.result.state="fail",(n=e.result).errors||(n.errors=[]),e.result.errors.push(Jn(t))}function la(e,t,n){return function(...o){if("withTest"!==t&&e.flag(this,"_name",t),!e.flag(this,"soft"))return n.apply(this,o);const r=e.flag(this,"vitest-test");if(!r)throw new Error("expect.soft() can only be used inside a test");try{const e=n.apply(this,o);return e&&"object"==typeof e&&"function"==typeof e.then?e.then(Tt,e=>{ca(r,e)}):e}catch(i){ca(r,i)}}}function ua(e){const t=e%10,n=e%100;return 1===t&&11!==n?`${e}st`:2===t&&12!==n?`${e}nd`:3===t&&13!==n?`${e}rd`:`${e}th`}function fa(e,t,n){return e.mock.calls.length&&(t+=l.gray(`\n\nReceived: \n\n${e.mock.calls.map((t,o)=>{let r=l.bold(` ${ua(o+1)} ${e.getMockName()} call:\n\n`);return r+=n?vn(n,t,{omitAnnotationLines:!0}):ht(t).split("\n").map(e=>` ${e}`).join("\n"),r+="\n",r}).join("\n")}`)),t+=l.gray(`\n\nNumber of calls: ${l.bold(e.mock.calls.length)}\n`)}class ha extends Error{constructor(e,t,n){super(e),this.actual=t,this.expected=n}}function pa(e,t,n){return(o,r)=>{Object.entries(n).forEach(([n,o])=>{const i=la(r,n,function(...e){const{state:n,isNot:r,obj:i,customMessage:s}=function(e,t){const n=e._obj,o=eo.flag(e,"negate"),r=eo.flag(e,"promise")||"",i=eo.flag(e,"message"),s={...$s(),diff:vn,stringify:ht,iterableEquality:zs,subsetEquality:Vs};let a=eo.flag(e,"vitest-test");const c=(null==a?void 0:a.fullTestName)??"";return"test"!==(null==a?void 0:a.type)&&(a=void 0),{state:{...Js(t),task:a,currentTestName:c,customTesters:Es(),isNot:o,utils:s,promise:r,equals:js,suppressedErrors:[],soft:eo.flag(e,"soft"),poll:eo.flag(e,"poll")},isNot:o,obj:n,customMessage:i}}(this,t),a=o.call(n,i,...e);if(a&&"object"==typeof a&&"function"==typeof a.then){return a.then(({pass:e,message:t,actual:n,expected:o})=>{if(e&&r||!e&&!r){const e=null!=s?s:t();throw new ha(e,n,o)}})}const{pass:c,message:l,actual:u,expected:f}=a;if(c&&r||!c&&!r){const e=null!=s?s:l();throw new ha(e,u,f)}});r.addMethod(globalThis[hs].matchers,n,i),r.addMethod(e.Assertion.prototype,n,i);class s extends Zs{constructor(e=!1,...t){super(t,e)}asymmetricMatch(e){const{pass:n}=o.call(this.getMatcherContext(t),e,...this.sample);return this.inverse?!n:n}toString(){return`${this.inverse?"not.":""}${n}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(e=>ht(e)).join(", ")}>`}}const a=(...e)=>new s(!1,...e);Object.defineProperty(t,n,{configurable:!0,enumerable:!0,value:a,writable:!0}),Object.defineProperty(t.not,n,{configurable:!0,enumerable:!0,value:(...e)=>new s(!0,...e),writable:!0}),Object.defineProperty(globalThis[ds],n,{configurable:!0,enumerable:!0,value:a,writable:!0})})}}const da=/* @__PURE__ */Symbol("vitest:SAFE_TIMERS");function ma(){const{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:o,setImmediate:r,clearImmediate:i,queueMicrotask:s}=globalThis[da]||globalThis,{nextTick:a}=globalThis[da]||globalThis.process||{};return{nextTick:a,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:o,setImmediate:r,clearImmediate:i,queueMicrotask:s}}function ga(e,t=setTimeout){return new Promise(n=>t(n,e))}const ya=/^[A-Za-z]:\//;const ba=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function wa(){return"undefined"!=typeof process&&"function"==typeof process.cwd?process.cwd().replace(/\\/g,"/"):"/"}const va=function(...e){let t="",n=!1;for(let o=(e=e.map(e=>function(e=""){return e?e.replace(/\\/g,"/").replace(ya,e=>e.toUpperCase()):e}(e))).length-1;o>=-1&&!n;o--){const r=o>=0?e[o]:wa();r&&0!==r.length&&(t=`${r}/${t}`,n=xa(r))}return t=function(e,t){let n="",o=0,r=-1,i=0,s=null;for(let a=0;a<=e.length;++a){if(a<e.length)s=e[a];else{if("/"===s)break;s="/"}if("/"===s){if(r===a-1||1===i);else if(2===i){if(n.length<2||2!==o||"."!==n[n.length-1]||"."!==n[n.length-2]){if(n.length>2){const e=n.lastIndexOf("/");-1===e?(n="",o=0):(n=n.slice(0,e),o=n.length-1-n.lastIndexOf("/")),r=a,i=0;continue}if(n.length>0){n="",o=0,r=a,i=0;continue}}t&&(n+=n.length>0?"/..":"..",o=2)}else n.length>0?n+=`/${e.slice(r+1,a)}`:n=e.slice(r+1,a),o=a-r-1;r=a,i=0}else"."===s&&-1!==i?++i:i=-1}return n}(t,!n),n&&!xa(t)?`/${t}`:t.length>0?t:"."};const xa=function(e){return ba.test(e)};var Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ka=new Uint8Array(64),Ta=new Uint8Array(128);for(let hf=0;hf<64;hf++){const e=Sa.charCodeAt(hf);ka[hf]=e,Ta[e]=hf}const $a=/^\s*at .*(?:\S:\d+|\(native\))/m,Oa=/^(?:eval@)?(?:\[native code\])?$/;function Ea(e){if(!e.includes(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!t)return[e];let n=t[1];if(n.startsWith("async ")&&(n=n.slice(6)),n.startsWith("http:")||n.startsWith("https:")){const e=new URL(n);e.searchParams.delete("import"),e.searchParams.delete("browserv"),n=e.pathname+e.hash+e.search}if(n.startsWith("/@fs/")){const e=/^\/@fs\/[a-zA-Z]:\//.test(n);n=n.slice(e?5:4)}return[n,t[2]||void 0,t[3]||void 0]}function ja(e){const t=e.trim();return $a.test(t)?function(e){let t=e.trim();if(!$a.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const o=n.match(/ (\(.+\)$)/);n=o?n.replace(o[0],""):n;const[r,i,s]=Ea(o?o[1]:n);let a=o&&n||"",c=r&&["eval","<anonymous>"].includes(r)?void 0:r;if(!c||!i||!s)return null;a.startsWith("async ")&&(a=a.slice(6));c.startsWith("file://")&&(c=c.slice(7));c=c.startsWith("node:")||c.startsWith("internal:")?c:va(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,""));return{method:a,file:c,line:Number.parseInt(i),column:Number.parseInt(s)}}(t):function(e){let t=e.trim();if(Oa.test(t))return null;if(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@"))return null;let n,o=-1,r="";for(let c=0;c<t.length;c++)if("@"===t[c]){const e=t.slice(c+1);if(e.includes(":")&&e.length>=3){o=c,r=e,n=c>0?t.slice(0,c):void 0;break}}if(-1===o||!r.includes(":")||r.length<3)return null;const[i,s,a]=Ea(r);return i&&s&&a?{file:i,method:n||"",line:Number.parseInt(s),column:Number.parseInt(a)}:null}(t)}const _a=/^[A-Za-z]:\//;const Ma=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Aa(){return"undefined"!=typeof process&&"function"==typeof process.cwd?process.cwd().replace(/\\/g,"/"):"/"}const Na=function(...e){let t="",n=!1;for(let o=(e=e.map(e=>function(e=""){return e?e.replace(/\\/g,"/").replace(_a,e=>e.toUpperCase()):e}(e))).length-1;o>=-1&&!n;o--){const r=o>=0?e[o]:Aa();r&&0!==r.length&&(t=`${r}/${t}`,n=Ia(r))}return t=function(e,t){let n="",o=0,r=-1,i=0,s=null;for(let a=0;a<=e.length;++a){if(a<e.length)s=e[a];else{if("/"===s)break;s="/"}if("/"===s){if(r===a-1||1===i);else if(2===i){if(n.length<2||2!==o||"."!==n[n.length-1]||"."!==n[n.length-2]){if(n.length>2){const e=n.lastIndexOf("/");-1===e?(n="",o=0):(n=n.slice(0,e),o=n.length-1-n.lastIndexOf("/")),r=a,i=0;continue}if(n.length>0){n="",o=0,r=a,i=0;continue}}t&&(n+=n.length>0?"/..":"..",o=2)}else n.length>0?n+=`/${e.slice(r+1,a)}`:n=e.slice(r+1,a),o=a-r-1;r=a,i=0}else"."===s&&-1!==i?++i:i=-1}return n}(t,!n),n&&!Ia(t)?`/${t}`:t.length>0?t:"."};const Ia=function(e){return Ma.test(e)};function Pa(e,t){const n=function n(o){const r=function(...e){return t.apply(o,e)};Object.assign(r,t),r.withContext=()=>r.bind(o),r.setContext=(e,t)=>{o[e]=t},r.mergeContext=e=>{Object.assign(o,e)};for(const t of e)Object.defineProperty(r,t,{get:()=>n({...o,[t]:!0})});return r}({});return n.fn=t,n}function Ca(e,t){const n=t.split("\n").slice(1);for(const o of n){const t=ja(o);if(t&&t.file===e)return t}}function Fa(e){const t=[e.name];let n=e;for(;null==n?void 0:n.suite;)n=n.suite,(null==n?void 0:n.name)&&t.unshift(n.name);return n!==e.file&&t.unshift(e.file.name),t}function Da(e,t=" > "){return e.filter(e=>void 0!==e).join(t)}class Ra extends Error{code="VITEST_PENDING";taskId;constructor(e,t,n){super(e),this.message=e,this.note=n,this.taskId=t.id}}const La=/* @__PURE__ */new WeakMap,Ba=/* @__PURE__ */new WeakMap,qa=/* @__PURE__ */new WeakMap;function za(e,t,n){const o=["auto","injected","scope"],r=Object.entries(e).map(([e,t])=>{const r={value:t};if(Array.isArray(t)&&t.length>=2&&bt(t[1])&&Object.keys(t[1]).some(e=>o.includes(e))){var i;Object.assign(r,t[1]);const o=t[0];r.value=r.injected?(null===(i=n.injectValue)||void 0===i?void 0:i.call(n,e))??o:o}return r.scope=r.scope||"test","worker"!==r.scope||n.getWorkerContext||(r.scope="file"),r.prop=e,r.isFn="function"==typeof r.value,r});return Array.isArray(t.fixtures)?t.fixtures=t.fixtures.concat(r):t.fixtures=r,r.forEach(e=>{if(e.isFn){const o=Ya(e.value);var n;if(o.length&&(e.deps=t.fixtures.filter(({prop:t})=>t!==e.prop&&o.includes(t))),"test"!==e.scope)null===(n=e.deps)||void 0===n||n.forEach(t=>{if(t.isFn&&!("worker"===e.scope&&"worker"===t.scope||"file"===e.scope&&"test"!==t.scope))throw new SyntaxError(`cannot use the ${t.scope} fixture "${t.prop}" inside the ${e.scope} fixture "${e.prop}"`)})}}),t}const Wa=/* @__PURE__ */new Map,Va=/* @__PURE__ */new Map;function Ua(e,t,n){return o=>{const r=o||n;if(!r)return t({});const i=(s=r,Ba.get(s));var s;if(!(null==i?void 0:i.length))return t(r);const a=Ya(t),c=i.some(({auto:e})=>e);if(!a.length&&!c)return t(r);Wa.get(r)||Wa.set(r,/* @__PURE__ */new Map);const l=Wa.get(r);Va.has(r)||Va.set(r,[]);const u=Va.get(r),f=Ja(i.filter(({prop:e,auto:t})=>t||a.includes(e)));if(!f.length)return t(r);return async function(){for(const t of f){if(l.has(t))continue;const n=await Ha(e,t,r,u);r[t.prop]=n,l.set(t,n),"test"===t.scope&&u.unshift(()=>{l.delete(t)})}}().then(()=>t(r))}}const Ka=/* @__PURE__ */new WeakMap;function Ha(e,t,n,o){var r;const i=function(e){const t=Oc.get(e);if(!t)throw new Error(`Cannot find file context for ${e.name}`);return t}(n.task.file),s=null===(r=e.getWorkerContext)||void 0===r?void 0:r.call(e);if(!t.isFn){var a,c;if(i[a=t.prop]??(i[a]=t.value),s)s[c=t.prop]??(s[c]=t.value);return t.value}if("test"===t.scope)return Ga(t.value,n,o);if(Ka.has(t))return Ka.get(t);let l;if("worker"===t.scope){if(!s)throw new TypeError("[@vitest/runner] The worker context is not available in the current test runner. Please, provide the `getWorkerContext` method when initiating the runner.");l=s}else l=i;if(t.prop in l)return l[t.prop];Va.has(l)||Va.set(l,[]);const u=Va.get(l),f=Ga(t.value,l,u).then(e=>(l[t.prop]=e,Ka.delete(t),e));return Ka.set(t,f),f}async function Ga(e,t,n){const o=Ot();let r=!1;const i=e(t,async e=>{r=!0,o.resolve(e);const t=Ot();n.push(async()=>{t.resolve(),await i}),await t}).catch(e=>{if(r)throw e;o.reject(e)});return o}function Ja(e,t=/* @__PURE__ */new Set,n=[]){return e.forEach(e=>{if(!n.includes(e))if(e.isFn&&e.deps){if(t.has(e))throw new Error(`Circular fixture dependency detected: ${e.prop} <- ${[...t].reverse().map(e=>e.prop).join(" <- ")}`);t.add(e),Ja(e.deps,t,n),n.push(e),t.clear()}else n.push(e)}),n}function Ya(e){let t=function(e){const t=[];let n="none";for(let o=0;o<e.length;++o)"singleline"===n?"\n"===e[o]&&(n="none"):"multiline"===n?"*"===e[o-1]&&"/"===e[o]&&(n="none"):"none"===n&&("/"===e[o]&&"/"===e[o+1]?n="singleline":"/"===e[o]&&"*"===e[o+1]?(n="multiline",o+=2):t.push(e[o]));return t.join("")}(e.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(t)&&(t=t.split(/__async\((?:this|null),/)[1]);const n=t.match(/[^(]*\(([^)]*)/);if(!n)return[];const o=Za(n[1]);if(!o.length)return[];let r=o[0];if("__VITEST_FIXTURE_INDEX__"in e&&(r=o[e.__VITEST_FIXTURE_INDEX__],!r))return[];if("{"!==r[0]||!r.endsWith("}"))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${r}".`);const i=Za(r.slice(1,-1).replace(/\s/g,"")).map(e=>e.replace(/:.*|=.*/g,"")),s=i.at(-1);if(s&&s.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${s}".`);return i}function Za(e){const t=[],n=[];let o=0;for(let i=0;i<e.length;i++)if("{"===e[i]||"["===e[i])n.push("{"===e[i]?"}":"]");else if(e[i]===n.at(-1))n.pop();else if(!n.length&&","===e[i]){const n=e.substring(o,i).trim();n&&t.push(n),o=i+1}const r=e.substring(o).trim();return r&&t.push(r),t}function Xa(){return pc().config.hookTimeout}const Qa=/* @__PURE__ */Symbol.for("VITEST_CLEANUP_TIMEOUT"),ec=/* @__PURE__ */Symbol.for("VITEST_CLEANUP_STACK_TRACE");function tc(e,t=Xa()){gt(e,'"beforeAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR");return dc().on("beforeAll",Object.assign(kc(e,t,!0,n),{[Qa]:t,[ec]:n}))}function nc(e,t){return gt(e,'"afterAll" callback',["function"]),dc().on("afterAll",kc(e,t??Xa(),!0,new Error("STACK_TRACE_ERROR")))}function oc(e,t=Xa()){gt(e,'"beforeEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),o=pc();return dc().on("beforeEach",Object.assign(kc(Ua(o,e),t??Xa(),!0,n,$c),{[Qa]:t,[ec]:n}))}function rc(e,t){gt(e,'"afterEach" callback',["function"]);const n=pc();return dc().on("afterEach",kc(Ua(n,e),t??Xa(),!0,new Error("STACK_TRACE_ERROR"),$c))}const ic=function(){function e(e,t,n){var o;let r=this.only?"only":this.skip?"skip":this.todo?"todo":"run";const i=Sc.currentSuite||uc;let{options:s,handler:a}=mc(t,n);"run"!==r||a||(r="todo");const c=s.concurrent||this.concurrent||!1===s.sequential,l=s.sequential||this.sequential||!1===s.concurrent;s={...null==i?void 0:i.options,...s,shuffle:this.shuffle??s.shuffle??(null==i||null===(o=i.options)||void 0===o?void 0:o.shuffle)??void 0};const u=c||s.concurrent&&!l,f=l||s.sequential&&!c;return s.concurrent=u&&!f,s.sequential=f&&!u,function(e,t=()=>{},n,o,r,i){const s=[];let a;p();const c=function(e="",t={}){var n,o,i;const a=(null==t?void 0:t.timeout)??lc.config.testTimeout,c=null===(n=Sc.currentSuite)||void 0===n?void 0:n.suite,l={id:"",name:e,fullName:Da([(null==c?void 0:c.fullName)??(null===(o=Sc.currentSuite)||void 0===o||null===(o=o.file)||void 0===o?void 0:o.fullName),e]),fullTestName:Da([null==c?void 0:c.fullTestName,e]),suite:c,each:t.each,fails:t.fails,context:void 0,type:"test",file:(null==c?void 0:c.file)??(null===(i=Sc.currentSuite)||void 0===i?void 0:i.file),timeout:a,retry:t.retry??lc.config.retry,repeats:t.repeats,mode:t.only?"only":t.skip?"skip":t.todo?"todo":"run",meta:t.meta??/* @__PURE__ */Object.create(null),annotations:[],artifacts:[]},u=t.handler;"run"!==l.mode||u||(l.mode="todo"),(t.concurrent||!t.sequential&&lc.config.sequence.concurrent)&&(l.concurrent=!0),l.shuffle=null==r?void 0:r.shuffle;const f=function(e,t){var n;const o=function(){throw new Error("done() callback is deprecated, use promise instead")};let r=Tc.get(o);r||(r=new AbortController,Tc.set(o,r));return o.signal=r.signal,o.task=e,o.skip=(t,n)=>{if(!1!==t)throw e.result??(e.result={state:"skip"}),e.result.pending=!0,new Ra("test is skipped; abort execution",e,"string"==typeof t?t:n)},o.annotate=(n,o,r)=>{if(e.result&&"run"!==e.result.state)throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const i={message:n,type:"object"==typeof o||void 0===o?"notice":o},s="object"==typeof o?o:r;return s&&(i.attachment=s,Nc(i.attachment)),function(e,t){t=t.finally(()=>{if(!e.promises)return;const n=e.promises.indexOf(t);-1!==n&&e.promises.splice(n,1)}),e.promises||(e.promises=[]);return e.promises.push(t),t}(e,async function(e,t){const n=pc();if(e.result&&"run"!==e.result.state)throw new Error(`Cannot record a test artifact outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const o=Ca(e.file.filepath,new Error("STACK_TRACE").stack);o&&(t.location={file:o.file,line:o.line,column:o.column},"internal:annotation"===t.type&&(t.annotation.location=t.location));if(Array.isArray(t.attachments))for(const i of t.attachments)Nc(i);if("internal:annotation"===t.type)return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await Mc(n);const r=await n.onTestArtifactRecord(e,t);return e.artifacts.push(r),r}(e,{type:"internal:annotation",annotation:i}).then(async({annotation:n})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Mc(t);const o=await t.onTestAnnotate(e,n);return e.annotations.push(o),o}))},o.onTestFailed=(n,o)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(kc(n,o??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(e,t)=>r.abort(t)))},o.onTestFinished=(n,o)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(kc(n,o??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(e,t)=>r.abort(t)))},(null===(n=t.extendTaskContext)||void 0===n?void 0:n.call(t,o))||o}(l,lc);var h,p;Object.defineProperty(l,"context",{value:f,enumerable:!1}),h=f,p=t.fixtures,Ba.set(h,p);const d=Error.stackTraceLimit;Error.stackTraceLimit=15;const m=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=d,u&&function(e,t){La.set(e,t)}(l,kc(function(e,t){return async(...n)=>{const o=await e(...n);if(t.promises){const e=(await Promise.allSettled(t.promises)).map(e=>"rejected"===e.status?e.reason:void 0).filter(Boolean);if(e.length)throw e}return o}}(Ua(lc,u,f),l),a,!1,m,(e,t)=>$c([f],t))),lc.config.includeTaskLocation){const e=m.stack,t=Ca(fc,e);t&&(l.location={line:t.line,column:t.column})}return s.push(l),l},l=yc(function(e,t,n){let{options:o,handler:i}=mc(t,n);"object"==typeof r&&(o=Object.assign({},r,o)),o.concurrent=this.concurrent||!this.sequential&&(null==o?void 0:o.concurrent),o.sequential=this.sequential||!this.concurrent&&(null==o?void 0:o.sequential);c(bc(e),{...this,...o,handler:i}).type="test"});let u=i;const f={type:"collector",name:e,mode:n,suite:a,options:r,test:l,tasks:s,collect:m,task:c,clear:d,on:h,fixtures:()=>u,scoped(e){const t=za(e,{fixtures:u},lc);t.fixtures&&(u=t.fixtures)}};function h(e,...t){var n;(n=a,qa.get(n))[e].push(...t)}function p(t){var i,s,c;"number"==typeof r&&(r={timeout:r});const l=null===(i=Sc.currentSuite)||void 0===i?void 0:i.suite;var u,f;a={id:"",type:"suite",name:e,fullName:Da([(null==l?void 0:l.fullName)??(null===(s=Sc.currentSuite)||void 0===s||null===(s=s.file)||void 0===s?void 0:s.fullName),e]),fullTestName:Da([null==l?void 0:l.fullTestName,e]),suite:l,mode:n,each:o,file:(null==l?void 0:l.file)??(null===(c=Sc.currentSuite)||void 0===c?void 0:c.file),shuffle:null==r?void 0:r.shuffle,tasks:[],meta:/* @__PURE__ */Object.create(null),concurrent:null==r?void 0:r.concurrent},u=a,f={beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]},qa.set(u,f)}function d(){s.length=0,p()}async function m(e){if(!e)throw new TypeError("File is required to collect tasks.");t&&await async function(e,t){const n=Sc.currentSuite;Sc.currentSuite=e,await t(),Sc.currentSuite=n}(f,()=>t(l));const n=[];for(const t of s)n.push("collector"===t.type?await t.collect(e):t);return a.tasks=n,a}return function(e){var t;null===(t=Sc.currentSuite)||void 0===t||t.tasks.push(e)}(f),f}(bc(e),a,r,this.each,s,null==i?void 0:i.fixtures())}return e.each=function(e,...t){const n=this.withContext();return this.setContext("each",!0),Array.isArray(e)&&t.length&&(e=vc(e,t)),(t,o,r)=>{const i=bc(t),s=e.every(Array.isArray),{options:a,handler:c}=mc(o,r),l="function"==typeof o;e.forEach((e,t)=>{const o=Array.isArray(e)?e:[e];l?n(wc(i,o,t),s?c?()=>c(...o):void 0:c?()=>c(e):void 0,a.timeout):n(wc(i,o,t),a,s?c?()=>c(...o):void 0:c?()=>c(e):void 0)}),this.setContext("each",void 0)}},e.for=function(e,...t){return Array.isArray(e)&&t.length&&(e=vc(e,t)),(t,n,o)=>{const r=bc(t),{options:i,handler:s}=mc(n,o);e.forEach((e,t)=>{ic(wc(r,yt(e),t),i,s?()=>s(e):void 0)})}},e.skipIf=e=>e?ic.skip:ic,e.runIf=e=>e?ic:ic.skip,Pa(["concurrent","sequential","shuffle","skip","only","todo"],e)}(),sc=yc(function(e,t,n){dc().test.fn.call(this,bc(e),t,n)}),ac=ic,cc=sc;let lc,uc,fc;function hc(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:\n- "vitest" is imported directly without running "vitest" command\n- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)\n- "vitest" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n`)}function pc(){return hc(lc,"the runner"),lc}function dc(){const e=Sc.currentSuite||uc;return hc(e,"the current suite"),e}function mc(e,t){if(null!=t&&"object"==typeof t)throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n,o={};if("number"==typeof t?o={timeout:t}:"object"==typeof e&&(o=e),"function"==typeof e){if("function"==typeof t)throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");n=e}else"function"==typeof t&&(n=t);return{options:o,handler:n}}function gc(e,t){const n=e;n.each=function(e,...t){const n=this.withContext();return this.setContext("each",!0),Array.isArray(e)&&t.length&&(e=vc(e,t)),(t,o,r)=>{const i=bc(t),s=e.every(Array.isArray),{options:a,handler:c}=mc(o,r),l="function"==typeof o;e.forEach((e,t)=>{const o=Array.isArray(e)?e:[e];l?n(wc(i,o,t),s?c?()=>c(...o):void 0:c?()=>c(e):void 0,a.timeout):n(wc(i,o,t),a,s?c?()=>c(...o):void 0:c?()=>c(e):void 0)}),this.setContext("each",void 0)}},n.for=function(e,...t){const n=this.withContext();return Array.isArray(e)&&t.length&&(e=vc(e,t)),(t,o,r)=>{const i=bc(t),{options:s,handler:a}=mc(o,r);e.forEach((e,t)=>{const o=a?t=>a(e,t):void 0;o&&(o.__VITEST_FIXTURE_INDEX__=1,o.toString=()=>a.toString()),n(wc(i,yt(e),t),s,o)})}},n.skipIf=function(e){return e?this.skip:this},n.runIf=function(e){return e?this:this.skip},n.scoped=function(e){dc().scoped(e)},n.extend=function(n){const o=za(n,t||{},lc),r=e;return yc(function(e,t,n){const o=dc().fixtures(),i={...this};o&&(i.fixtures=function(e,t){const n=t.reduce((e,t)=>(e[t.prop]=t,e),{}),o={};e.forEach(e=>{const t=n[e.prop]||{...e};o[t.prop]=t});for(const i in o){var r;const e=o[i];e.deps=null===(r=e.deps)||void 0===r?void 0:r.map(e=>o[e.prop])}return Object.values(o)}(i.fixtures||[],o)),r.call(i,bc(e),t,n)},o)},n.beforeEach=oc,n.afterEach=rc,n.beforeAll=tc,n.afterAll=nc;const o=Pa(["concurrent","sequential","skip","only","todo","fails"],n);return t&&o.mergeContext(t),o}function yc(e,t){return gc(e,t)}function bc(e){return"string"==typeof e?e:"function"==typeof e?e.name||"<anonymous>":String(e)}function wc(e,t,n){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,"%%"));const o=e.split("%").length-1;if(e.includes("%f")){(e.match(/%f/g)||[]).forEach((n,o)=>{if(function(e){if(!Number.isNaN(e))return!1;const t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31==1}(t[o])||Object.is(t[o],-0)){let t=0;e=e.replace(/%f/g,e=>(t++,t===o+1?"-%f":e))}})}const r=bt(t[0]);function i(e){return e.replace(/\$([$\w.]+)/g,(e,n)=>{const o=/^\d+$/.test(n);if(!r&&!o)return`$${n}`;const i=o?$t(t,n):void 0;return function(e,t={}){void 0===t.truncate&&(t.truncate=40);const n=mt(e,t),o=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate){if("[object Function]"===o){const t=e;return t.name?`[Function: ${t.name}]`:"[Function]"}if("[object Array]"===o)return`[ Array(${e.length}) ]`;if("[object Object]"===o){const t=Object.keys(e);return`{ Object (${t.length>2?`${t.splice(0,2).join(", ")}, ...`:t.join(", ")}) }`}return n}return n}(r?$t(t[0],n,i):i,{truncate:void 0})})}let s="",a=0;return function(e,t,n,o){let r=0;for(const i of e.matchAll(t))r<i.index&&o(e.slice(r,i.index)),n(i),r=i.index+i[0].length;r<e.length&&o(e.slice(r))}(e,pt,e=>{s+=a<o?dt(e[0],t[a++]):e[0]},e=>{s+=i(e)}),s}function vc(e,t){const n=e.join("").trim().replace(/ /g,"").split("\n").map(e=>e.split("|"))[0],o=[];for(let r=0;r<Math.floor(t.length/n.length);r++){const e={};for(let o=0;o<n.length;o++)e[n[o]]=t[r*n.length+o];o.push(e)}return o}const xc=Date.now,Sc={currentSuite:null};function kc(e,t,n=!1,o,r){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:i,clearTimeout:s}=ma();return function(...a){const c=xc(),l=pc();return l._currentTaskStartTime=c,l._currentTaskTimeout=t,new Promise((u,f)=>{var h;const p=i(()=>{s(p),d()},t);function d(){const e=function(e,t,n){const o=`${e?"Hook":"Test"} timed out in ${t}ms.\nIf this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,r=new Error(o);(null==n?void 0:n.stack)&&(r.stack=n.stack.replace(r.message,n.message));return r}(n,t,o);null==r||r(a,e),f(e)}function m(e){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,s(p),xc()-c>=t?d():u(e)}function g(e){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,s(p),f(e)}null===(h=p.unref)||void 0===h||h.call(p);try{const t=e(...a);"object"==typeof t&&null!=t&&"function"==typeof t.then?t.then(m,g):m(t)}catch(y){g(y)}})}}const Tc=/* @__PURE__ */new WeakMap;function $c([e],t){e&&function(e,t){const n=Tc.get(e);null==n||n.abort(t)}(e,t)}const Oc=/* @__PURE__ */new WeakMap;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,ma();const Ec=/* @__PURE__ */new Map,jc=[],_c=[];async function Mc(e){!function(e){if(Ec.size){var t;const n=Array.from(Ec).map(([e,t])=>[e,t[0],t[1]]),o=null===(t=e.onTaskUpdate)||void 0===t?void 0:t.call(e,n,jc);o&&(_c.push(o),o.then(()=>_c.splice(_c.indexOf(o),1),()=>{})),jc.length=0,Ec.clear()}}(e),await Promise.all(_c)}const Ac=[];for(let hf=65;hf<91;hf++)Ac.push(String.fromCharCode(hf));for(let hf=97;hf<123;hf++)Ac.push(String.fromCharCode(hf));for(let hf=0;hf<10;hf++)Ac.push(hf.toString(10));function Nc(e){if(null==e.body&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');e.body instanceof Uint8Array&&(e.body=function(e){let t="";const n=e.byteLength;for(let o=0;o<n;o+=3)if(n===o+1){const n=(252&e[o])>>2,r=(3&e[o])<<4;t+=Ac[n],t+=Ac[r],t+="=="}else if(n===o+2){const n=(252&e[o])>>2,r=(3&e[o])<<4|(240&e[o+1])>>4,i=(15&e[o+1])<<2;t+=Ac[n],t+=Ac[r],t+=Ac[i],t+="="}else{const n=(252&e[o])>>2,r=(3&e[o])<<4|(240&e[o+1])>>4,i=(15&e[o+1])<<2|(192&e[o+2])>>6,s=63&e[o+2];t+=Ac[n],t+=Ac[r],t+=Ac[i],t+=Ac[s]}return t}(e.body))}Ac.push("+","/");function Ic(){const e=globalThis.__vitest_worker__;if(!e)throw new Error('Vitest failed to access its internal state.\n\nOne of the following is possible:\n- "vitest" is imported directly without running "vitest" command\n- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)\n- "vitest" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n');return e}function Pc(){return"undefined"!=typeof process&&!!process.send}async function Cc(){await function(){const{setTimeout:e}=ma();return new Promise(t=>e(t,0))}();const e=Ic(),t=[],n=e.resolvingModules.size;for(const[o,r]of e.evaluatedModules.idToModuleMap)r.promise&&!r.evaluated&&t.push(r.promise);(t.length||n)&&(await Promise.allSettled(t),await Cc())}var Fc=",".charCodeAt(0),Dc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rc=new Uint8Array(64),Lc=new Uint8Array(128);for(let hf=0;hf<64;hf++){const e=Dc.charCodeAt(hf);Rc[hf]=e,Lc[e]=hf}function Bc(e,t){let n=0,o=0,r=0;do{const t=e.next();r=Lc[t],n|=(31&r)<<o,o+=5}while(32&r);const i=1&n;return n>>>=1,i&&(n=-2147483648|-n),t+n}function qc(e,t){return!(e.pos>=t)&&e.peek()!==Fc}var zc=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,o=t.indexOf(e,n);return-1===o?t.length:o}};function Wc(e){e.sort(Vc)}function Vc(e,t){return e[0]-t[0]}var Uc=!1;function Kc(e,t,n){for(let o=n+1;o<e.length&&e[o][0]===t;n=o++);return n}function Hc(e,t,n){for(let o=n-1;o>=0&&e[o][0]===t;n=o--);return n}function Gc(e,t,n,o){const{lastKey:r,lastNeedle:i,lastIndex:s}=n;let a=0,c=e.length-1;if(o===r){if(t===i)return Uc=-1!==s&&e[s][0]===t,s;t>=i?a=-1===s?0:s:c=s}return n.lastKey=o,n.lastNeedle=t,n.lastIndex=function(e,t,n,o){for(;n<=o;){const r=n+(o-n>>1),i=e[r][0]-t;if(0===i)return Uc=!0,r;i<0?n=r+1:o=r-1}return Uc=!1,n-1}(e,t,a,c)}function Jc(e){var t;return(t=e)._decoded||(t._decoded=function(e){const{length:t}=e,n=new zc(e),o=[];let r=0,i=0,s=0,a=0,c=0;do{const e=n.indexOf(";"),t=[];let l=!0,u=0;for(r=0;n.pos<e;){let o;r=Bc(n,r),r<u&&(l=!1),u=r,qc(n,e)?(i=Bc(n,i),s=Bc(n,s),a=Bc(n,a),qc(n,e)?(c=Bc(n,c),o=[r,i,s,a,c]):o=[r,i,s,a]):o=[r],t.push(o),n.pos++}l||Wc(t),o.push(t),n.pos=e+1}while(n.pos<=t);return o}(e._encoded))}function Yc(e,t){let{line:n,column:o,bias:r}=t;if(n--,n<0)throw new Error("`line` must be greater than 0 (lines start at line 1)");if(o<0)throw new Error("`column` must be greater than or equal to 0 (columns start at column 0)");const i=Jc(e);if(n>=i.length)return Zc(null,null,null,null);const s=i[n],a=function(e,t,n,o,r){let i=Gc(e,o,t,n);Uc?i=(-1===r?Kc:Hc)(e,o,i):-1===r&&i++;return-1===i||i===e.length?-1:i}(s,e._decodedMemo,n,o,r||1);if(-1===a)return Zc(null,null,null,null);const c=s[a];if(1===c.length)return Zc(null,null,null,null);const{names:l,resolvedSources:u}=e;return Zc(u[c[1]],c[2]+1,c[3],5===c.length?l[c[4]]:null)}function Zc(e,t,n,o){return{source:e,line:t,column:n,name:o}}function Xc(e){return null!=e}function Qc(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}const el=/^\s*at .*(?:\S:\d+|\(native\))/m,tl=/^(?:eval@)?(?:\[native code\])?$/,nl=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,/\/deps\/vitest_/];function ol(e){if(!e.includes(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!t)return[e];let n=t[1];if(n.startsWith("async ")&&(n=n.slice(6)),n.startsWith("http:")||n.startsWith("https:")){const e=new URL(n);e.searchParams.delete("import"),e.searchParams.delete("browserv"),n=e.pathname+e.hash+e.search}if(n.startsWith("/@fs/")){const e=/^\/@fs\/[a-zA-Z]:\//.test(n);n=n.slice(e?5:4)}return[n,t[2]||void 0,t[3]||void 0]}function rl(e,t={}){const{ignoreStackEntries:n=nl}=t,o=el.test(e)?function(e){return e.split("\n").map(e=>function(e){let t=e.trim();if(!el.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const o=n.match(/ (\(.+\)$)/);n=o?n.replace(o[0],""):n;const[r,i,s]=ol(o?o[1]:n);let a=o&&n||"",c=r&&["eval","<anonymous>"].includes(r)?void 0:r;return c&&i&&s?(a.startsWith("async ")&&(a=a.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=c.startsWith("node:")||c.startsWith("internal:")?c:Na(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:a,file:c,line:Number.parseInt(i),column:Number.parseInt(s)}):null}(e)).filter(Xc)}(e):function(e){return e.split("\n").map(e=>function(e){let t=e.trim();if(tl.test(t))return null;if(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@"))return null;let n,o=-1,r="";for(let c=0;c<t.length;c++)if("@"===t[c]){const e=t.slice(c+1);if(e.includes(":")&&e.length>=3){o=c,r=e,n=c>0?t.slice(0,c):void 0;break}}if(-1===o||!r.includes(":")||r.length<3)return null;const[i,s,a]=ol(r);return i&&s&&a?{file:i,method:n||"",line:Number.parseInt(s),column:Number.parseInt(a)}:null}(e)).filter(Xc)}(e);return o.map(e=>{var o;t.getUrlId&&(e.file=t.getUrlId(e.file));const r=null===(o=t.getSourceMap)||void 0===o?void 0:o.call(t,e.file);if(!r||"object"!=typeof r||!r.version)return il(n,e.file)?null:e;const i=function(e,t){const n=Yc(e,t);if(null==n.column)return null;return n}(new sl(r,e.file),e);if(!i)return e;const{line:s,column:a,source:c,name:l}=i;let u=c||e.file;return u.match(/\/\w:\//)&&(u=u.slice(1)),il(n,u)?null:null!=s&&null!=a?{line:s,column:a,file:u,method:l||e.method}:e}).filter(e=>null!=e)}function il(e,t){return e.some(e=>t.match(e))}class sl{_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(e,t){this.map=e;const{mappings:n,names:o,sources:r}=e;this.version=e.version,this.names=o||[],this._encoded=n||"",this._decodedMemo={lastKey:-1,lastNeedle:-1,lastIndex:-1},this.url=t,this.resolvedSources=(r||[]).map(e=>Na(e||"",t))}}const al=/\r?\n/;function cl(e,t,n){const o=e.split(al),r=/\r\n/.test(e)?2:1;let i=0;if(t>o.length)return e.length;for(let s=0;s<t-1;s++)i+=o[s].length+r;return i+n}const ll=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function ul(e,t,n){const o=function(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const n=e.split(al),o=/\r\n/.test(e)?2:1;let r=0,i=0;for(;i<n.length;i++){const e=n[i].length+o;if(r+e>=t)break;r+=e}return i+1}(t,n),r=t.split(al)[o-1].match(/^\s*/)[0]||"",i=r.includes("\t")?`${r}\t`:`${r} `,s=e.trim().replace(/\\/g,"\\\\").split(/\n/g),a="`";return s.length<=1?`${a}${s.join("\n").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${a}`:`${a}\n${s.map(e=>e?i+e:"").join("\n").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}\n${r}${a}`}const fl="toMatchInlineSnapshot",hl="toThrowErrorMatchingInlineSnapshot";const pl=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;function dl(e,t,n,o){const{code:r,index:i}=function(e,t){const n=t-fl.length;if(e.slice(n,t)===fl)return{code:e.slice(n),index:n};const o=t-hl.length;return e.slice(t-o,t)===hl?{code:e.slice(t-o),index:t-o}:{code:e.slice(t),index:t}}(e,n),s=pl.exec(r),a=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(r);if(!s||s.index!==(null==a?void 0:a.index))return function(e,t,n,o){let r=e.slice(n);const i=ll.exec(r);if(!i)return!1;r=r.slice(i.index);let s=function(e){let t=-1,n=null,o=0,r=0,i=null;for(;t<=e.length;){i=e[t],t++;const s=e[t];if(('"'===s||"'"===s||"`"===s)&&"\\"!==i&&(n===s?n=null:n||(n=s)),n||("("===s&&o++,")"===s&&r++),o&&r&&o===r)return t}return null}(r);if(null===s)return!1;s+=n+i.index;const a=function(e,t){let n=1,o=0;for(;n!==o&&t<e.length;){const r=e[t++];"{"===r?n++:"}"===r&&o++}return t}(e,n+i.index+i[0].length),c=`, ${ul(o,e,n)}`;return a===s?t.appendLeft(s,c):t.overwrite(a,s,c),!0}(e,t,i,o);const c=s[1],l=i+s.index+s[0].length,u=ul(o,e,i);if(")"===c)return t.appendRight(l-1,u),!0;const f=new RegExp(`(?:^|[^\\\\])${c}`).exec(e.slice(l));if(!f)return!1;const h=l+f.index+f[0].length;return t.overwrite(l-1,h,u),!0}const ml=/^([^\S\n]*)\S/m;function gl(e){var t;const n=e.match(ml);if(!n||!n[1])return e;const o=n[1],r=e.split(/\n/g);if(r.length<=2)return e;if(""!==r[0].trim()||""!==(null===(t=r.at(-1))||void 0===t?void 0:t.trim()))return e;for(let i=1;i<r.length-1;i++)if(""!==r[i]){if(0!==r[i].indexOf(o))return e;r[i]=r[i].substring(o.length)}return r[r.length-1]="",e=r.join("\n")}function yl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bl,wl={exports:{}};var vl=/* @__PURE__ */yl(function(){if(bl)return wl.exports;bl=1;var e=function(e,t){var n,o,r=1,i=0,s=0,a=String.alphabet;function c(e,t,o){if(o){for(n=t;(o=c(e,n))<76&&o>65;)++n;return+e.slice(t-1,n)}return(o=a&&a.indexOf(e.charAt(t)))>-1?o+76:(o=e.charCodeAt(t)||0)<45||o>127?o:o<46?65:o<48?o-1:o<58?o+18:o<65?o-11:o<91?o+11:o<97?o-37:o<123?o+5:o-63}if((e+="")!=(t+=""))for(;r;)if(o=c(e,i++),r=c(t,s++),o<76&&r<76&&o>66&&r>66&&(o=c(e,i,i),r=c(t,s,i=n),s=n),o!=r)return o<r?-1:1;return 0};try{wl.exports=e}catch(t){String.naturalCompare=e}return wl.exports}());const xl={serialize:(e,t,n,o,r,i)=>{const s=e.getMockName(),a="vi.fn()"===s?"":` ${s}`;let c="";if(0!==e.mock.calls.length){const s=n+t.indent;c=` {${t.spacingOuter}${s}"calls": ${i(e.mock.calls,t,s,o,r)}${t.min?", ":","}${t.spacingOuter}${s}"results": ${i(e.mock.results,t,s,o,r)}${t.min?"":","}${t.spacingOuter}${n}}`}return`[MockFunction${a}]${c}`},test:e=>e&&!!e._isMockFunction},{DOMCollection:Sl,DOMElement:kl,Immutable:Tl,ReactElement:$l,ReactTestComponent:Ol,AsymmetricMatcher:El}=Oe;let jl=[Ol,$l,kl,Sl,Tl,El,xl];function _l(e){jl=[e].concat(jl)}function Ml(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function Al(e){return e.length>2&&"\n"===e[0]&&e.endsWith("\n")?e.slice(1,-1):e}function Nl(e){return`\`${function(e){return e.replace(/`|\\|\$\{/g,"\\$&")}(e)}\``}function Il(e){return e.replace(/\r\n|\r/g,"\n")}function Pl(e=[],t=[]){const n=Array.from(e);return t.forEach((t,o)=>{const r=n[o];Array.isArray(e[o])?n[o]=Pl(e[o],t):Qc(r)?n[o]=Cl(e[o],t):n[o]=t}),n}function Cl(e,t){if(Qc(e)&&Qc(t)){const n={...e};return Object.keys(t).forEach(o=>{Qc(t[o])&&!t[o].$$typeof?o in e?n[o]=Cl(e[o],t[o]):Object.assign(n,{[o]:t[o]}):Array.isArray(t[o])?n[o]=Pl(e[o],t[o]):Object.assign(n,{[o]:t[o]})}),n}return Array.isArray(e)&&Array.isArray(t)?Pl(e,t):e}class Fl extends Map{constructor(e,t){super(t),this.defaultFn=e}get(e){return this.has(e)||this.set(e,this.defaultFn(e)),super.get(e)}}class Dl extends Fl{constructor(){super(()=>0)}_total;valueOf(){return this._total=this.total()}increment(e){void 0!==this._total&&this._total++,this.set(e,this.get(e)+1)}total(){if(void 0!==this._total)return this._total;let e=0;for(const t of this.values())e+=t;return e}}function Rl(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}class Ll{_counters=new Dl;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new Fl(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new Dl;_matched=new Dl;_unmatched=new Dl;_updated=new Dl;get added(){return this._added}set added(e){this._added._total=e}get matched(){return this._matched}set matched(e){this._matched._total=e}get unmatched(){return this._unmatched}set unmatched(e){this._unmatched._total=e}get updated(){return this._updated}set updated(e){this._updated._total=e}constructor(e,t,n,o){this.testFilePath=e,this.snapshotPath=t;const{data:r,dirty:i}=function(e,t){const n=t.updateSnapshot,o=/* @__PURE__ */Object.create(null);let r="",i=!1;if(null!=e)try{r=e,new Function("exports",r)(o)}catch{}return"all"!==n&&"new"!==n||!r||(i=!0),{data:o,dirty:i}}(n,o);this._fileExists=null!=n,this._initialData={...r},this._snapshotData={...r},this._dirty=i,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=o.expand||!1,this._updateSnapshot=o.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,...o.snapshotFormat},this._environment=o.snapshotEnvironment}static async create(e,t){const n=await t.snapshotEnvironment.resolvePath(e),o=await t.snapshotEnvironment.readSnapshotFile(n);return new Ll(e,n,o,t)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(e){this._uncheckedKeys.forEach(t=>{/ \d+$| > /.test(t.slice(e.length))&&this._uncheckedKeys.delete(t)})}clearTest(e){this._inlineSnapshots=this._inlineSnapshots.filter(t=>t.testId!==e),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(t=>t.testId!==e);for(const t of this._testIdToKeys.get(e)){const e=Ml(t),n=this._counters.get(e);n>0&&((t in this._snapshotData||t in this._initialData)&&(this._snapshotData[t]=this._initialData[t]),this._counters.set(e,n-1))}this._testIdToKeys.delete(e),this.added.delete(e),this.updated.delete(e),this.matched.delete(e),this.unmatched.delete(e)}_inferInlineSnapshotStack(e){const t=e.findIndex(e=>e.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(-1!==t)return e[t+3];const n=e.findIndex(e=>e.method.includes("__INLINE_SNAPSHOT__"));return-1!==n?e[n+2]:null}_addSnapshot(e,t,n){this._dirty=!0,n.stack?this._inlineSnapshots.push({snapshot:t,testId:n.testId,...n.stack}):n.rawSnapshot?this._rawSnapshots.push({...n.rawSnapshot,snapshot:t}):this._snapshotData[e]=t}async save(){const e=Object.keys(this._snapshotData).length,t=this._inlineSnapshots.length,n=this._rawSnapshots.length,o=!e&&!t&&!n,r={deleted:!1,saved:!1};return!this._dirty&&!this._uncheckedKeys.size||o?!e&&this._fileExists&&("all"===this._updateSnapshot&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),r.deleted=!0):(e&&(await async function(e,t,n){const o=Object.keys(t).sort(vl).map(e=>`exports[${Nl(e)}] = ${Nl(Il(t[e]))};`),r=`${e.getHeader()}\n\n${o.join("\n\n")}\n`,i=await e.readSnapshotFile(n);null!=i&&i===r||await e.saveSnapshotFile(n,r)}(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),t&&await async function(e,t){const n=(await import("./magic-string.es-CkyDP9Ir.mjs")).default,o=new Set(t.map(e=>e.file));await Promise.all(Array.from(o).map(async o=>{const r=t.filter(e=>e.file===o),i=await e.readSnapshotFile(o),s=new n(i);for(const e of r)dl(i,s,cl(i,e.line,e.column),e.snapshot);const a=s.toString();a!==i&&await e.saveSnapshotFile(o,a)}))}(this._environment,this._inlineSnapshots),n&&await async function(e,t){await Promise.all(t.map(async t=>{t.readonly||await e.saveSnapshotFile(t.file,t.snapshot)}))}(this._environment,this._rawSnapshots),r.saved=!0),r}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){"all"===this._updateSnapshot&&this._uncheckedKeys.size&&(this._dirty=!0,this._uncheckedKeys.forEach(e=>delete this._snapshotData[e]),this._uncheckedKeys.clear())}match({testId:e,testName:t,received:n,key:o,inlineSnapshot:r,isInline:i,error:s,rawSnapshot:a}){this._counters.increment(t);const c=this._counters.get(t);o||(o=function(e,t){return`${e} ${t}`}(t,c)),this._testIdToKeys.get(e).push(o),i&&void 0!==this._snapshotData[o]||this._uncheckedKeys.delete(o);let l=a&&"string"==typeof n?n:function(e,t=2,n={}){return Il($e(e,{escapeRegex:!0,indent:t,plugins:jl,printFunctionName:!1,...n}))}(n,void 0,this._snapshotFormat);var u;a||(l=(u=l).includes("\n")?`\n${u}\n`:u),a&&a.content&&a.content.match(/\r\n/)&&!l.match(/\r\n/)&&(a.content=Il(a.content));const f=i?r:a?a.content:this._snapshotData[o],h=a?f:null==f?void 0:f.trim(),p=h===(a?l:l.trim()),d=void 0!==f,m=i||this._fileExists||a&&null!=a.content;let g;if(!p||i||a||(this._snapshotData[o]=l),i){var y,b;const t=function(e,t={}){if(!e||null===(n=e)||"function"!=typeof n&&"object"!=typeof n)return[];var n;if("stacks"in e&&e.stacks)return e.stacks;const o=e.stack||"";let r="string"==typeof o?rl(o,t):[];if(!r.length){const n=e;null!=n.fileName&&null!=n.lineNumber&&null!=n.columnNumber&&(r=rl(`${n.fileName}:${n.lineNumber}:${n.columnNumber}`,t)),null!=n.sourceURL&&null!=n.line&&null!=n._column&&(r=rl(`${n.sourceURL}:${n.line}:${n.column}`,t))}return t.frameFilter&&(r=r.filter(n=>!1!==t.frameFilter(e,n))),e.stacks=r,r}(s||new Error("snapshot"),{ignoreStackEntries:[]}),n=this._inferInlineSnapshotStack(t);if(!n)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.\n${JSON.stringify(t)}`);g=(null===(y=(b=this.environment).processStackTrace)||void 0===y?void 0:y.call(b,n))||n,g.column--;const o=this._inlineSnapshotStacks.filter(e=>Rl(e,g));if(o.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(e=>!Rl(e,g));const e=o.find(e=>e.snapshot!==l);if(e)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:l,expected:e.snapshot})}this._inlineSnapshotStacks.push({...g,testId:e,snapshot:l})}return d&&"all"===this._updateSnapshot||!(d&&m||"new"!==this._updateSnapshot&&"all"!==this._updateSnapshot)?("all"===this._updateSnapshot?p?this.matched.increment(e):(d?this.updated.increment(e):this.added.increment(e),this._addSnapshot(o,l,{stack:g,testId:e,rawSnapshot:a})):(this._addSnapshot(o,l,{stack:g,testId:e,rawSnapshot:a}),this.added.increment(e)),{actual:"",count:c,expected:"",key:o,pass:!0}):p?(this.matched.increment(e),{actual:"",count:c,expected:"",key:o,pass:!0}):(this.unmatched.increment(e),{actual:a?l:Al(l),count:c,expected:void 0!==h?a?h:Al(h):void 0,key:o,pass:!1})}async pack(){const e={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},t=this.getUncheckedCount(),n=this.getUncheckedKeys();t&&this.removeUncheckedKeys();const o=await this.save();return e.fileDeleted=o.deleted,e.added=this.added.total(),e.matched=this.matched.total(),e.unmatched=this.unmatched.total(),e.updated=this.updated.total(),e.unchecked=o.deleted?0:t,e.uncheckedKeys=Array.from(n),e}}function Bl(e,t,n,o){const r=new Error(e);return Object.defineProperty(r,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,"expected",{value:o,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,"diffOptions",{value:{expand:t}}),r}class ql{snapshotStateMap=/* @__PURE__ */new Map;constructor(e={}){this.options=e}async setup(e,t){this.snapshotStateMap.has(e)||this.snapshotStateMap.set(e,await Ll.create(e,t))}async finish(e){const t=this.getSnapshotState(e),n=await t.pack();return this.snapshotStateMap.delete(e),n}skipTest(e,t){this.getSnapshotState(e).markSnapshotsAsCheckedForTest(t)}clearTest(e,t){this.getSnapshotState(e).clearTest(t)}getSnapshotState(e){const t=this.snapshotStateMap.get(e);if(!t)throw new Error(`The snapshot state for '${e}' is not found. Did you call 'SnapshotClient.setup()'?`);return t}assert(e){const{filepath:t,name:n,testId:o=n,message:r,isInline:i=!1,properties:s,inlineSnapshot:a,error:c,errorMessage:l,rawSnapshot:u}=e;let{received:f}=e;if(!t)throw new Error("Snapshot cannot be used outside of test");const h=this.getSnapshotState(t);if("object"==typeof s){if("object"!=typeof f||!f)throw new Error("Received value must be an object when the matcher has properties");try{var p,d;if(!((null===(p=(d=this.options).isEqual)||void 0===p?void 0:p.call(d,f,s))??!1))throw Bl("Snapshot properties mismatched",h.expand,f,s);f=Cl(f,s)}catch(v){throw v.message=l||"Snapshot mismatched",v}}const m=[n,...r?[r]:[]].join(" > "),{actual:g,expected:y,key:b,pass:w}=h.match({testId:o,testName:m,received:f,isInline:i,error:c,inlineSnapshot:a,rawSnapshot:u});if(!w)throw Bl(`Snapshot \`${b||"unknown"}\` mismatched`,h.expand,u?g:null==g?void 0:g.trim(),u?y:null==y?void 0:y.trim())}async assertRaw(e){if(!e.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:t,rawSnapshot:n}=e;if(null==n.content){if(!t)throw new Error("Snapshot cannot be used outside of test");const o=this.getSnapshotState(t);e.filepath||(e.filepath=t),n.file=await o.environment.resolveRawPath(t,n.file),n.content=await o.environment.readSnapshotFile(n.file)??void 0}return this.assert(e)}clear(){this.snapshotStateMap.clear()}}var zl="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const Wl=Date;let Vl=null;class Ul extends Wl{constructor(e,t,n,o,r,i,s){let a;switch(super(),arguments.length){case 0:a=null!==Vl?new Wl(Vl.valueOf()):new Wl;break;case 1:a=new Wl(e);break;default:a=new Wl(e,t,n=void 0===n?1:n,o=o||0,r=r||0,i=i||0,s=s||0)}return Object.setPrototypeOf(a,Ul.prototype),a}}function Kl(){globalThis.Date=Wl}Ul.UTC=Wl.UTC,Ul.now=function(){return(new Ul).valueOf()},Ul.parse=function(e){return Wl.parse(e)},Ul.toString=function(){return Wl.toString()};const Hl=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function Gl(e,t){throw null==e.cause&&(e.cause=/* @__PURE__ */new Error("Matcher did not succeed in time.")),Jl(e,t)}function Jl(e,t){return void 0!==t.stack&&(e.stack=t.stack.replace(t.message,e.message)),e}let Yl;function Zl(){return Yl||(Yl=new ql({isEqual:(e,t)=>js(e,t,[zs,Vs])})),Yl}function Xl(e,t){if("function"!=typeof e){if(!t)throw new Error("expected must be a function, received "+typeof e);return e}try{e()}catch(n){return n}throw new Error("snapshot function didn't throw")}function Ql(e){return{filepath:e.file.filepath,name:Fa(e).slice(1).join(" > "),testId:e.id}}us((e,t)=>{t.addMethod(e.expect,"extend",(t,n)=>{us(pa(e,t,n))})}),us((e,t)=>{const{AssertionError:n}=e,o=Es();function r(n,o){const r=n=>{const r=la(t,n,o);t.addMethod(e.Assertion.prototype,n,r),t.addMethod(globalThis[hs].matchers,n,r)};Array.isArray(n)?n.forEach(e=>r(e)):r(n)}function i(e){return function(e){if(!In(e._obj))throw new TypeError(`${t.inspect(e._obj)} is not a spy or a call to a spy!`)}(e),e._obj}function s(e,t){return e.length===t.length&&e.every((e,n)=>js(e,t[n],[...o,zs]))}function a(e,t,n){const o=e.mock.invocationCallOrder,r=t.mock.invocationCallOrder;return 0===o.length?!n:0!==r.length&&o[0]<r[0]}["throw","throws","Throw"].forEach(o=>{t.overwriteMethod(e.Assertion.prototype,o,e=>function(...o){const r=t.flag(this,"promise"),i=t.flag(this,"object"),s=t.flag(this,"negate");if("rejects"===r)t.flag(this,"object",()=>{throw i});else if("resolves"===r&&"function"!=typeof i){if(s)return;{const e=t.flag(this,"message")||"expected promise to throw an error, but it didn't";throw new n(e,{showDiff:!1},t.flag(this,"ssfi"))}}e.apply(this,o)})}),r("withTest",function(e){return t.flag(this,"vitest-test",e),this}),r("toEqual",function(e){const n=t.flag(this,"object"),r=js(n,e,[...o,zs]);return this.assert(r,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,n)}),r("toStrictEqual",function(e){const n=t.flag(this,"object"),r=js(n,e,[...o,zs,Us,Hs,Ks],!0);return this.assert(r,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",e,n)}),r("toBe",function(e){const t=this._obj,n=Object.is(t,e);let r="";if(!n){if(js(t,e,[...o,zs,Us,Hs,Ks],!0))r="toStrictEqual";else{js(t,e,[...o,zs])&&(r="toEqual")}}return this.assert(n,function(e,t="#{this}",n="#{exp}"){const o=`expected ${t} to be ${n} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${o}\n\nIf it should pass with deep equality, replace "toBe" with "${e}"\n\nExpected: ${t}\nReceived: serializes to the same string\n`:o}(r),"expected #{this} not to be #{exp} // Object.is equality",e,t)}),r("toMatchObject",function(e){const r=this._obj,i=js(r,e,[...o,zs,Vs]),s=t.flag(this,"negate"),{subset:a,stripped:c}=function(e,t,n){let o=0;const r=(e=/* @__PURE__ */new WeakMap)=>(t,i)=>{if(Array.isArray(t)){if(Array.isArray(i)&&i.length===t.length)return i.map((n,o)=>r(e)(t[o],n))}else{if(t instanceof Date)return t;if(bt(t)&&bt(i)){if(js(t,i,[...n,zs,Vs]))return i;const s={};e.set(t,s),"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&Object.defineProperty(s,"constructor",{enumerable:!1,value:t.constructor});for(const n of Gs(t))Ws(i,n)?s[n]=e.has(t[n])?e.get(t[n]):r(e)(t[n],i[n]):e.has(t[n])||(o+=1,bt(t[n])&&(o+=Gs(t[n]).length),r(e)(t[n],i[n]));if(Gs(s).length>0)return s}}return t};return{subset:r()(e,t),stripped:o}}(r,e,o);if(i&&s||!i&&!s){const o=t.getMessage(this,[i,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",e,a,!1]);throw new n(0===c?o:`${o}\n(${c} matching ${1===c?"property":"properties"} omitted from actual)`,{showDiff:!0,expected:e,actual:a})}}),r("toMatch",function(e){const t=this._obj;if("string"!=typeof t)throw new TypeError(".toMatch() expects to receive a string, but got "+typeof t);return this.assert("string"==typeof e?t.includes(e):t.match(e),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",e,t)}),r("toContain",function(e){const n=this._obj;if("undefined"!=typeof Node&&n instanceof Node){if(!(e instanceof Node))throw new TypeError("toContain() expected a DOM node as the argument, but got "+typeof e);return this.assert(n.contains(e),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",e,n)}if("undefined"!=typeof DOMTokenList&&n instanceof DOMTokenList){gt(e,"class name",["string"]);const o=t.flag(this,"negate")?n.value.replace(e,"").trim():`${n.value} ${e}`;return this.assert(n.contains(e),`expected "${n.value}" to contain "${e}"`,`expected "${n.value}" not to contain "${e}"`,o,n.value)}return"string"==typeof n&&"string"==typeof e?this.assert(n.includes(e),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",e,n):(null!=n&&"string"!=typeof n&&t.flag(this,"object",Array.from(n)),this.contain(e))}),r("toContainEqual",function(e){const n=t.flag(this,"object"),r=Array.from(n).findIndex(t=>js(t,e,o));this.assert(-1!==r,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",e)}),r("toBeTruthy",function(){const e=t.flag(this,"object");this.assert(Boolean(e),"expected #{this} to be truthy","expected #{this} to not be truthy",!0,e)}),r("toBeFalsy",function(){const e=t.flag(this,"object");this.assert(!e,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,e)}),r("toBeGreaterThan",function(e){const t=this._obj;return gt(t,"actual",["number","bigint"]),gt(e,"expected",["number","bigint"]),this.assert(t>e,`expected ${t} to be greater than ${e}`,`expected ${t} to be not greater than ${e}`,e,t,!1)}),r("toBeGreaterThanOrEqual",function(e){const t=this._obj;return gt(t,"actual",["number","bigint"]),gt(e,"expected",["number","bigint"]),this.assert(t>=e,`expected ${t} to be greater than or equal to ${e}`,`expected ${t} to be not greater than or equal to ${e}`,e,t,!1)}),r("toBeLessThan",function(e){const t=this._obj;return gt(t,"actual",["number","bigint"]),gt(e,"expected",["number","bigint"]),this.assert(t<e,`expected ${t} to be less than ${e}`,`expected ${t} to be not less than ${e}`,e,t,!1)}),r("toBeLessThanOrEqual",function(e){const t=this._obj;return gt(t,"actual",["number","bigint"]),gt(e,"expected",["number","bigint"]),this.assert(t<=e,`expected ${t} to be less than or equal to ${e}`,`expected ${t} to be not less than or equal to ${e}`,e,t,!1)}),r("toBeNaN",function(){const e=t.flag(this,"object");this.assert(Number.isNaN(e),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,e)}),r("toBeUndefined",function(){const e=t.flag(this,"object");this.assert(void 0===e,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,e)}),r("toBeNull",function(){const e=t.flag(this,"object");this.assert(null===e,"expected #{this} to be null","expected #{this} not to be null",null,e)}),r("toBeNullable",function(){const e=t.flag(this,"object");this.assert(null==e,"expected #{this} to be nullish","expected #{this} not to be nullish",null,e)}),r("toBeDefined",function(){const e=t.flag(this,"object");this.assert(void 0!==e,"expected #{this} to be defined","expected #{this} to be undefined",e)}),r("toBeTypeOf",function(e){const t=typeof this._obj,n=e===t;return this.assert(n,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",e,t)}),r("toBeInstanceOf",function(e){return this.instanceOf(e)}),r("toHaveLength",function(e){return this.have.length(e)}),r("toHaveProperty",function(...e){Array.isArray(e[0])&&(e[0]=e[0].map(e=>String(e).replace(/([.[\]])/g,"\\$1")).join("."));const n=this._obj,[r,i]=e,{value:s,exists:a}=Object.hasOwn(n,r)?{value:n[r],exists:!0}:t.getPathInfo(n,r),c=a&&(1===e.length||js(i,s,o)),l=1===e.length?"":` with value ${t.objDisplay(i)}`;return this.assert(c,`expected #{this} to have property "${r}"${l}`,`expected #{this} to not have property "${r}"${l}`,i,a?s:void 0)}),r("toBeCloseTo",function(e,t=2){const n=this._obj;let o=!1,r=0,i=0;return e===Number.POSITIVE_INFINITY&&n===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY&&n===Number.NEGATIVE_INFINITY?o=!0:(r=10**-t/2,i=Math.abs(n-e),o=i<r),this.assert(o,`expected #{this} to be close to #{exp}, received difference is ${i}, but expected ${r}`,`expected #{this} to not be close to #{exp}, received difference is ${i}, but expected ${r}`,e,n,!1)}),r(["toHaveBeenCalledTimes","toBeCalledTimes"],function(e){const t=i(this),n=t.getMockName(),o=t.mock.calls.length;return this.assert(o===e,`expected "${n}" to be called #{exp} times, but got ${o} times`,`expected "${n}" to not be called #{exp} times`,e,o,!1)}),r("toHaveBeenCalledOnce",function(){const e=i(this),t=e.getMockName(),n=e.mock.calls.length;return this.assert(1===n,`expected "${t}" to be called once, but got ${n} times`,`expected "${t}" to not be called once`,1,n,!1)}),r(["toHaveBeenCalled","toBeCalled"],function(){const e=i(this),o=e.getMockName(),r=e.mock.calls.length,s=r>0,a=t.flag(this,"negate");let c=t.getMessage(this,[s,`expected "${o}" to be called at least once`,`expected "${o}" to not be called at all, but actually been called ${r} times`,!0,s]);if(s&&a&&(c=fa(e,c)),s&&a||!s&&!a)throw new n(c)}),r(["toHaveBeenCalledWith","toBeCalledWith"],function(...e){const o=i(this),r=o.getMockName(),a=o.mock.calls.some(t=>s(t,e)),c=t.flag(this,"negate"),l=t.getMessage(this,[a,`expected "${r}" to be called with arguments: #{exp}`,`expected "${r}" to not be called with arguments: #{exp}`,e]);if(a&&c||!a&&!c)throw new n(fa(o,l,e))}),r("toHaveBeenCalledExactlyOnceWith",function(...e){const o=i(this),r=o.getMockName(),a=o.mock.calls.length,c=o.mock.calls.some(t=>s(t,e))&&1===a,l=t.flag(this,"negate"),u=t.getMessage(this,[c,`expected "${r}" to be called once with arguments: #{exp}`,`expected "${r}" to not be called once with arguments: #{exp}`,e]);if(c&&l||!c&&!l)throw new n(fa(o,u,e))}),r(["toHaveBeenNthCalledWith","nthCalledWith"],function(e,...t){const n=i(this),o=n.getMockName(),r=n.mock.calls[e-1],a=n.mock.calls.length,c=e<=a;this.assert(r&&s(r,t),`expected ${ua(e)} "${o}" call to have been called with #{exp}${c?"":`, but called only ${a} times`}`,`expected ${ua(e)} "${o}" call to not have been called with #{exp}`,t,r,c)}),r(["toHaveBeenLastCalledWith","lastCalledWith"],function(...e){const t=i(this),n=t.getMockName(),o=t.mock.calls.at(-1);this.assert(o&&s(o,e),`expected last "${n}" call to have been called with #{exp}`,`expected last "${n}" call to not have been called with #{exp}`,e,o)}),r(["toHaveBeenCalledBefore"],function(e,n=!0){const o=i(this);if(!In(e))throw new TypeError(`${t.inspect(e)} is not a spy or a call to a spy`);this.assert(a(o,e,n),`expected "${o.getMockName()}" to have been called before "${e.getMockName()}"`,`expected "${o.getMockName()}" to not have been called before "${e.getMockName()}"`,e,o)}),r(["toHaveBeenCalledAfter"],function(e,n=!0){const o=i(this);if(!In(e))throw new TypeError(`${t.inspect(e)} is not a spy or a call to a spy`);this.assert(a(e,o,n),`expected "${o.getMockName()}" to have been called after "${e.getMockName()}"`,`expected "${o.getMockName()}" to not have been called after "${e.getMockName()}"`,e,o)}),r(["toThrow","toThrowError"],function(e){if("string"==typeof e||void 0===e||e instanceof RegExp)return this.throws(""===e?/^$/:e);const r=this._obj,i=t.flag(this,"promise"),s=t.flag(this,"negate");let a=null;if("rejects"===i)a=r;else{if("resolves"===i&&"function"!=typeof r){if(s)return;{const e=t.flag(this,"message")||"expected promise to throw an error, but it didn't";throw new n(e,{showDiff:!1},t.flag(this,"ssfi"))}}{let e=!1;try{r()}catch(c){e=!0,a=c}if(!e&&!s){const e=t.flag(this,"message")||"expected function to throw an error, but it didn't";throw new n(e,{showDiff:!1},t.flag(this,"ssfi"))}}}if("function"==typeof e){const t=e.name||e.prototype.constructor.name;return this.assert(a&&a instanceof e,`expected error to be instance of ${t}`,`expected error not to be instance of ${t}`,e,a)}if(e instanceof Error){const t=js(a,e,[...o,zs]);return this.assert(t,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",e,a)}if("object"==typeof e&&"asymmetricMatch"in e&&"function"==typeof e.asymmetricMatch){const t=e;return this.assert(a&&t.asymmetricMatch(a),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",t,a)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof e}"`)}),[{name:"toHaveResolved",condition:e=>e.mock.settledResults.length>0&&e.mock.settledResults.some(({type:e})=>"fulfilled"===e),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:e=>e.mock.calls.length>0&&e.mock.results.some(({type:e})=>"throw"!==e),action:"called"}].forEach(({name:e,condition:t,action:n})=>{r(e,function(){const e=i(this),o=e.getMockName(),r=t(e);this.assert(r,`expected "${o}" to be successfully ${n} at least once`,`expected "${o}" to not be successfully ${n}`,r,!r,!1)})}),[{name:"toHaveResolvedTimes",condition:(e,t)=>e.mock.settledResults.reduce((e,{type:t})=>"fulfilled"===t?++e:e,0)===t,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(e,t)=>e.mock.results.reduce((e,{type:t})=>"throw"===t?e:++e,0)===t,action:"called"}].forEach(({name:e,condition:t,action:n})=>{r(e,function(e){const o=i(this),r=o.getMockName(),s=t(o,e);this.assert(s,`expected "${r}" to be successfully ${n} ${e} times`,`expected "${r}" to not be successfully ${n} ${e} times`,`expected resolved times: ${e}`,`received resolved times: ${s}`,!1)})}),[{name:"toHaveResolvedWith",condition:(e,t)=>e.mock.settledResults.some(({type:e,value:n})=>"fulfilled"===e&&js(t,n)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(e,t)=>e.mock.results.some(({type:e,value:n})=>"return"===e&&js(t,n)),action:"return"}].forEach(({name:e,condition:o,action:s})=>{r(e,function(e){const r=i(this),a=o(r,e),c=t.flag(this,"negate");if(a&&c||!a&&!c){const o=r.getMockName(),i=t.getMessage(this,[a,`expected "${o}" to ${s} with: #{exp} at least once`,`expected "${o}" to not ${s} with: #{exp}`,e]),c="return"===s?r.mock.results:r.mock.settledResults;throw new n(function(e,t,n,o){t.length&&(n+=l.gray(`\n\nReceived: \n\n${t.map((t,n)=>{let r=l.bold(` ${ua(n+1)} ${e.getMockName()} call return:\n\n`);return r+=o?vn(o,t.value,{omitAnnotationLines:!0}):ht(t).split("\n").map(e=>` ${e}`).join("\n"),r+="\n",r}).join("\n")}`));return n+=l.gray(`\n\nNumber of calls: ${l.bold(e.mock.calls.length)}\n`),n}(r,c,i,e))}})}),[{name:"toHaveLastResolvedWith",condition:(e,t)=>{const n=e.mock.settledResults.at(-1);return Boolean(n&&"fulfilled"===n.type&&js(n.value,t))},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(e,t)=>{const n=e.mock.results.at(-1);return Boolean(n&&"return"===n.type&&js(n.value,t))},action:"return"}].forEach(({name:e,condition:t,action:n})=>{r(e,function(e){const o=i(this),r=("return"===n?o.mock.results:o.mock.settledResults).at(-1),s=o.getMockName();this.assert(t(o,e),`expected last "${s}" call to ${n} #{exp}`,`expected last "${s}" call to not ${n} #{exp}`,e,null==r?void 0:r.value)})}),[{name:"toHaveNthResolvedWith",condition:(e,t,n)=>{const o=e.mock.settledResults[t-1];return o&&"fulfilled"===o.type&&js(o.value,n)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(e,t,n)=>{const o=e.mock.results[t-1];return o&&"return"===o.type&&js(o.value,n)},action:"return"}].forEach(({name:e,condition:t,action:n})=>{r(e,function(e,o){const r=i(this),s=r.getMockName(),a=("return"===n?r.mock.results:r.mock.settledResults)[e-1],c=`${ua(e)} call`;this.assert(t(r,e,o),`expected ${c} "${s}" call to ${n} #{exp}`,`expected ${c} "${s}" call to not ${n} #{exp}`,o,null==a?void 0:a.value)})}),r("withContext",function(e){for(const n in e)t.flag(this,n,e[n]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const o=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",o);const r=t.flag(this,"vitest-test"),i=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if("function"!=typeof(null==i?void 0:i.then))throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof i}'.`);const s=new Proxy(this,{get:(a,c,l)=>{const u=Reflect.get(a,c,l);return"function"!=typeof u?u instanceof e.Assertion?s:u:(...e)=>{t.flag(this,"_name",c);const s=i.then(n=>(t.flag(this,"object",n),u.call(this,...e)),e=>{const r=new n(`promise rejected "${t.inspect(e)}" instead of resolving`,{showDiff:!1});throw r.cause=e,r.stack=o.stack.replace(o.message,r.message),r});return aa(r,s,sa(t,this,!!e.length),o)}}});return s}),t.addProperty(e.Assertion.prototype,"rejects",function(){const o=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",o);const r=t.flag(this,"vitest-test"),i=t.flag(this,"object"),s="function"==typeof i?i():i;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if("function"!=typeof(null==s?void 0:s.then))throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof s}'.`);const a=new Proxy(this,{get:(i,c,l)=>{const u=Reflect.get(i,c,l);return"function"!=typeof u?u instanceof e.Assertion?a:u:(...e)=>{t.flag(this,"_name",c);const i=s.then(e=>{const r=new n(`promise resolved "${t.inspect(e)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:e});throw r.stack=o.stack.replace(o.message,r.message),r},n=>(t.flag(this,"object",n),u.call(this,...e)));return aa(r,i,sa(t,this,!!e.length),o)}}});return a})}),us((e,t)=>{function n(e,n){const o=t.flag(n,"vitest-test");if(!o)throw new Error(`'${e}' cannot be used without test context`);return o}for(const o of["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,o,function(e,r){if(t.flag(this,"_name",o),t.flag(this,"negate"))throw new Error(`${o} cannot be used with "not"`);const i=t.flag(this,"object"),s=n(o,this);"string"==typeof e&&void 0===r&&(r=e,e=void 0);const a=t.flag(this,"message");Zl().assert({received:i,message:r,isInline:!1,properties:e,errorMessage:a,...Ql(s)})});t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(e,o){if(t.flag(this,"_name","toMatchFileSnapshot"),t.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');const r=/* @__PURE__ */new Error("resolves"),i=t.flag(this,"object"),s=n("toMatchFileSnapshot",this),a=t.flag(this,"message");return function(e,t,n,o){const r=e;if(r&&t instanceof Promise){t=t.finally(()=>{if(!r.promises)return;const e=r.promises.indexOf(t);-1!==e&&r.promises.splice(e,1)}),r.promises||(r.promises=[]),r.promises.push(t);let e=!1;return r.onFinished??=[],r.onFinished.push(()=>{if(!e){const e=(globalThis.__vitest_worker__?.onFilterStackTrace||(e=>e||""))(o.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ","Please remember to await the assertion.\n",e].join(""))}}),{then:(n,o)=>(e=!0,t.then(n,o)),catch:e=>t.catch(e),finally:e=>t.finally(e),[Symbol.toStringTag]:"Promise"}}return t}(s,Zl().assertRaw({received:i,message:o,isInline:!1,rawSnapshot:{file:e},errorMessage:a,...Ql(s)}),function(e,t){const n=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(expected)`,r=e.flag(t,"promise");return`expect(actual)${r?`.${r}`:""}.${n}${o}`}(t,this),r)}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",function(e,o,r){if(t.flag(this,"_name","toMatchInlineSnapshot"),t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');const i=n("toMatchInlineSnapshot",this);if(i.each||i.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");const s=t.flag(this,"object"),a=t.flag(this,"error");"string"==typeof e&&(r=o,o=e,e=void 0),o&&(o=gl(o));const c=t.flag(this,"message");Zl().assert({received:s,message:r,isInline:!0,properties:e,inlineSnapshot:o,error:a,errorMessage:c,...Ql(i)})}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",function(e){if(t.flag(this,"_name","toThrowErrorMatchingSnapshot"),t.flag(this,"negate"))throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');const o=t.flag(this,"object"),r=n("toThrowErrorMatchingSnapshot",this),i=t.flag(this,"promise"),s=t.flag(this,"message");Zl().assert({received:Xl(o,i),message:e,errorMessage:s,...Ql(r)})}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",function(e,o){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');const r=n("toThrowErrorMatchingInlineSnapshot",this);if(r.each||r.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");const i=t.flag(this,"object"),s=t.flag(this,"error"),a=t.flag(this,"promise"),c=t.flag(this,"message");e&&(e=gl(e)),Zl().assert({received:Xl(i,a),message:o,inlineSnapshot:e,isInline:!0,error:s,errorMessage:c,...Ql(r)})}),t.addMethod(e.expect,"addSnapshotSerializer",_l)}),us((e,t)=>{t.addMethod(e.expect,"anything",()=>new Qs),t.addMethod(e.expect,"any",e=>new na(e)),t.addMethod(e.expect,"stringContaining",e=>new Xs(e)),t.addMethod(e.expect,"objectContaining",e=>new ea(e)),t.addMethod(e.expect,"arrayContaining",e=>new ta(e)),t.addMethod(e.expect,"stringMatching",e=>new oa(e)),t.addMethod(e.expect,"closeTo",(e,t)=>new ra(e,t)),t.addMethod(e.expect,"schemaMatching",e=>new ia(e)),e.expect.not={stringContaining:e=>new Xs(e,!0),objectContaining:e=>new ea(e,!0),arrayContaining:e=>new ta(e,!0),stringMatching:e=>new oa(e,!0),closeTo:(e,t)=>new ra(e,t,!0),schemaMatching:e=>new ia(e,!0)}});const eu=function(){const e=(t,n)=>{const{assertionCalls:o}=Js(e);Ys({assertionCalls:o+1},e);return os(t,n)};Object.assign(e,os),Object.assign(e,globalThis[ds]),e.getState=()=>Js(e),e.setState=t=>Ys(t,e);const t=Js(globalThis[ps])||{};var n;return Ys({...t,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return Ic().filepath},currentTestName:t.currentTestName},e),e.assert=cs,e.extend=t=>os.extend(e,t),e.addEqualityTesters=e=>function(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${wt(e)}"`);globalThis[hs].customEqualityTesters.push(...e)}(e),e.soft=(...t)=>e(...t).withContext({soft:!0}),e.poll=(n=e,function(e,t={}){const o=Ic().config.expect?.poll??{},{interval:r=o.interval??50,timeout:i=o.timeout??1e3,message:s}=t,a=n(null,s).withContext({poll:!0});e=e.bind(a);const c=eo.flag(a,"vitest-test");if(!c)throw new Error("expect.poll() must be called inside a test");const l=new Proxy(a,{get(t,n,o){const s=Reflect.get(t,n,o);if("function"!=typeof s)return s instanceof Ur?l:s;if("assert"===n)return s;if("string"==typeof n&&Hl.includes(n))throw new SyntaxError(`expect.poll() is not supported in combination with .${n}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...t){const o=/* @__PURE__ */new Error("STACK_TRACE_ERROR"),l=async()=>{const{setTimeout:c,clearTimeout:l}=ma();let u="fn",f=!1;const h=c(()=>{f=!0},i);eo.flag(a,"_name",n);try{for(;;){const n=f;n&&eo.flag(a,"_isLastPollAttempt",!0);try{u="fn";const n=await e();return eo.flag(a,"object",n),u="assertion",await s.call(a,...t)}catch(p){(n||"assertion"===u&&eo.flag(a,"_poll.assert_once"))&&Gl(p,o),await ga(r,c)}}}finally{l(h)}};let u,f=!1;return c.onFinished??=[],c.onFinished.push(()=>{if(!f){const e=eo.flag(a,"negate")?"not.":"",t=`expect.${eo.flag(a,"_poll.element")?"element(locator)":"poll(assertion)"}.${e}${String(n)}()`;throw Jl(/* @__PURE__ */new Error(`${t} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:\n\nawait ${t}\n`),o)}}),{then:(e,t)=>(f=!0,(u||=l()).then(e,t)),catch:e=>(u||=l()).catch(e),finally:e=>(u||=l()).finally(e),[Symbol.toStringTag]:"Promise"}}}});return l}),e.unreachable=e=>{cs.fail(`expected${e?` "${e}" `:" "}not to be reached`)},eo.addMethod(e,"assertions",function t(n){const o=()=>/* @__PURE__ */new Error(`expected number of assertions to be ${n}, but got ${e.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(o(),t),e.setState({expectedAssertionsNumber:n,expectedAssertionsNumberErrorGen:o})}),eo.addMethod(e,"hasAssertions",function t(){const n=/* @__PURE__ */new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(n,t),e.setState({isExpectingAssertions:!0,isExpectingAssertionsError:n})}),e.extend(ms),e}();Object.defineProperty(globalThis,ps,{value:eu,writable:!0,configurable:!0});var tu,nu,ou,ru,iu,su,au,cu,lu,uu,fu,hu,pu={};function du(){if(su)return iu;su=1;var e=Function.call,t=function(){if(ru)return ou;let e;ru=1;try{e=!1}catch(t){e=!0}return ou=e}(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),iu=function(t){return Object.getOwnPropertyNames(t).reduce(function(o,r){return n.includes(r)||"function"!=typeof t[r]||(o[r]=e.bind(t[r])),o},
3
- /* @__PURE__ */Object.create(null))}}function mu(){if(cu)return au;cu=1;var e=du();return au=e(Array.prototype)}function gu(){if(uu)return lu;uu=1;var e=mu().every;function t(e,t,n,o){var r=!0;return n!==o.length-1&&(r=t.calledBefore(o[n+1])),!(!function(e,t){return void 0===e[t.id]&&(e[t.id]=0),e[t.id]<t.callCount}(e,t)||!r)&&(e[t.id]+=1,!0)}return lu=function(n){return e(arguments.length>1?arguments:n,t.bind(null,{}))},lu}function yu(){if(hu)return fu;return hu=1,fu=function(e){return e.constructor&&e.constructor.name||null}}var bu,wu,vu,xu,Su,ku,Tu,$u,Ou,Eu,ju,_u,Mu,Au,Nu,Iu,Pu,Cu,Fu,Du={};function Ru(){if(Tu)return ku;Tu=1;var e=mu().sort,t=mu().slice;function n(e,t){var n=e.getCall(0),o=t.getCall(0);return(n&&n.callId||-1)<(o&&o.callId||-1)?-1:1}return ku=function(o){return e(t(o),n)}}function Lu(){if(Ou)return $u;Ou=1;var e=du();return $u=e(Function.prototype)}function Bu(){if(ju)return Eu;ju=1;var e=du();return Eu=e(Map.prototype)}function qu(){if(Mu)return _u;Mu=1;var e=du();return _u=e(Object.prototype)}function zu(){if(Nu)return Au;Nu=1;var e=du();return Au=e(Set.prototype)}function Wu(){if(Pu)return Iu;Pu=1;var e=du();return Iu=e(String.prototype)}var Vu,Uu,Ku,Hu,Gu,Ju,Yu,Zu,Xu={exports:{}};function Qu(){return Vu?Xu.exports:(Vu=1,Xu.exports=function(){var e="function"==typeof Promise,t="object"==typeof self?self:zl,n="undefined"!=typeof Symbol,o="undefined"!=typeof Map,r="undefined"!=typeof Set,i="undefined"!=typeof WeakMap,s="undefined"!=typeof WeakSet,a="undefined"!=typeof DataView,c=n&&void 0!==Symbol.iterator,l=n&&void 0!==Symbol.toStringTag,u=r&&"function"==typeof Set.prototype.entries,f=o&&"function"==typeof Map.prototype.entries,h=u&&Object.getPrototypeOf(/* @__PURE__ */(new Set).entries()),p=f&&Object.getPrototypeOf(/* @__PURE__ */(new Map).entries()),d=c&&"function"==typeof Array.prototype[Symbol.iterator],m=d&&Object.getPrototypeOf([][Symbol.iterator]()),g=c&&"function"==typeof String.prototype[Symbol.iterator],y=g&&Object.getPrototypeOf(""[Symbol.iterator]()),b=8,w=-1;function v(n){var c=typeof n;if("object"!==c)return c;if(null===n)return"null";if(n===t)return"global";if(Array.isArray(n)&&(!1===l||!(Symbol.toStringTag in n)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&n===window.location)return"Location";if("object"==typeof window.document&&n===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&n===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&n===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&n instanceof window.HTMLElement){if("BLOCKQUOTE"===n.tagName)return"HTMLQuoteElement";if("TD"===n.tagName)return"HTMLTableDataCellElement";if("TH"===n.tagName)return"HTMLTableHeaderCellElement"}}var u=l&&n[Symbol.toStringTag];if("string"==typeof u)return u;var f=Object.getPrototypeOf(n);return f===RegExp.prototype?"RegExp":f===Date.prototype?"Date":e&&f===Promise.prototype?"Promise":r&&f===Set.prototype?"Set":o&&f===Map.prototype?"Map":s&&f===WeakSet.prototype?"WeakSet":i&&f===WeakMap.prototype?"WeakMap":a&&f===DataView.prototype?"DataView":o&&f===p?"Map Iterator":r&&f===h?"Set Iterator":d&&f===m?"Array Iterator":g&&f===y?"String Iterator":null===f?"Object":Object.prototype.toString.call(n).slice(b,w)}return v}())}function ef(){if(Ku)return Uu;Ku=1;var e=Qu();return Uu=function(t){return e(t).toLowerCase()}}function tf(){if(Gu)return Hu;return Gu=1,Hu=function(e){return e&&e.toString?e.toString():String(e)}}var nf=function(){if(Zu)return pu;Zu=1;const e=function(){return Yu||(Yu=1,Ju={global:nu?tu:(nu=1,t=void 0!==zl?zl:"undefined"!=typeof window?window:self,tu=t),calledInOrder:gu(),className:yu(),deprecated:(bu||(bu=1,(e=Du).wrap=function(t,n){var o=function(){return e.printWarning(n),t.apply(this,arguments)};return t.prototype&&(o.prototype=t.prototype),o},e.defaultMsg=function(e,t){return`${e}.${t} is deprecated and will be removed from the public API in a future version of ${e}.`},e.printWarning=function(e){"object"==typeof process&&process.emitWarning?process.emitWarning(e):console.info?console.info(e):console.log(e)}),Du),every:(vu||(vu=1,wu=function(e,t){var n=!0;try{e.forEach(function(){if(!t.apply(this,arguments))throw new Error})}catch(o){n=!1}return n}),wu),functionName:Su?xu:(Su=1,xu=function(e){if(!e)return"";try{return e.displayName||e.name||(String(e).match(/function ([^\s(]+)/)||[])[1]}catch(t){return""}}),orderByFirstCall:Ru(),prototypes:Fu?Cu:(Fu=1,Cu={array:mu(),function:Lu(),map:Bu(),object:qu(),set:zu(),string:Wu()}),typeOf:ef(),valueToString:tf()}),Ju;var e,t}().global;let t,n;if("undefined"!=typeof __vitest_required__){try{t=__vitest_required__.timers}catch(i){}try{n=__vitest_required__.timersPromises}catch(i){}}function o(r){const s=Math.pow(2,31)-1,a=1e12,c=function(){},l=function(){return[]},u={};let f,h=!1;r.setTimeout&&(u.setTimeout=!0,f=r.setTimeout(c,0),h="object"==typeof f),u.clearTimeout=Boolean(r.clearTimeout),u.setInterval=Boolean(r.setInterval),u.clearInterval=Boolean(r.clearInterval),u.hrtime=r.process&&"function"==typeof r.process.hrtime,u.hrtimeBigint=u.hrtime&&"function"==typeof r.process.hrtime.bigint,u.nextTick=r.process&&"function"==typeof r.process.nextTick;const p=r.process&&r.__vitest_required__&&r.__vitest_required__.util.promisify;u.performance=r.performance&&"function"==typeof r.performance.now;const d=r.Performance&&(typeof r.Performance).match(/^(function|object)$/),m=r.performance&&r.performance.constructor&&r.performance.constructor.prototype;u.queueMicrotask=r.hasOwnProperty("queueMicrotask"),u.requestAnimationFrame=r.requestAnimationFrame&&"function"==typeof r.requestAnimationFrame,u.cancelAnimationFrame=r.cancelAnimationFrame&&"function"==typeof r.cancelAnimationFrame,u.requestIdleCallback=r.requestIdleCallback&&"function"==typeof r.requestIdleCallback,u.cancelIdleCallbackPresent=r.cancelIdleCallback&&"function"==typeof r.cancelIdleCallback,u.setImmediate=r.setImmediate&&"function"==typeof r.setImmediate,u.clearImmediate=r.clearImmediate&&"function"==typeof r.clearImmediate,u.Intl=r.Intl&&"object"==typeof r.Intl,r.clearTimeout&&r.clearTimeout(f);const g=r.Date,y=u.Intl?Object.defineProperties(
4
- /* @__PURE__ */Object.create(null),Object.getOwnPropertyDescriptors(r.Intl)):void 0;let b=a;if(void 0===g)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");u.Date=!0;class w{constructor(e,t,n,o){this.name=e,this.entryType=t,this.startTime=n,this.duration=o}toJSON(){return JSON.stringify({...this})}}let v=!1;function x(e,t){e.loopLimit&&t===e.loopLimit-1&&(v=!0)}function S(){v=!1}function k(e){if(!e)return 0;const t=e.split(":"),n=t.length;let o,r=n,i=0;if(n>3||!/^(\d\d:){0,2}\d\d?$/.test(e))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;r--;){if(o=parseInt(t[r],10),o>=60)throw new Error(`Invalid time ${e}`);i+=o*Math.pow(60,n-r-1)}return 1e3*i}function T(e){if(!e)return 0;if("function"==typeof e.getTime)return e.getTime();if("number"==typeof e)return e;throw new TypeError("now should be milliseconds since UNIX epoch")}function $(e,t,n){return n&&n.callAt>=e&&n.callAt<=t}function O(e,t){const n=new Error(`Aborting after running ${e.loopLimit} timers, assuming an infinite loop!`);if(!t.error)return n;const o=/target\.*[<|(|[].*?[>|\]|)]\s*/;let r=new RegExp(String(Object.keys(e).join("|")));h&&(r=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(e).join("|")})\\s+`));let s=-1;t.error.stack.split("\n").some(function(e,t){if(e.match(o))return s=t,!0;return e.match(r)?(s=t,!1):s>=0});const a=`${n}\n${t.type||"Microtask"} - ${t.func.name||"anonymous"}\n${t.error.stack.split("\n").slice(s+1).join("\n")}`;try{Object.defineProperty(n,"stack",{value:a})}catch(i){}return n}function E(){class e extends g{constructor(t,n,o,r,i,s,a){0===arguments.length?super(e.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:g,enumerable:!1})}static[Symbol.hasInstance](e){return e instanceof g}}e.isFake=!0,g.now&&(e.now=function(){return e.clock.now}),g.toSource&&(e.toSource=function(){return g.toSource()}),e.toString=function(){return g.toString()};return new Proxy(e,{apply(){if(this instanceof e)throw new TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new g(e.clock.now).toString()}})}function j(e){if(e.jobs){for(let t=0;t<e.jobs.length;t++){const n=e.jobs[t];if(n.func.apply(null,n.args),x(e,t),e.loopLimit&&t>e.loopLimit)throw O(e,n)}S(),e.jobs=[]}}function _(e,t){if(void 0===t.func)throw new Error("Callback must be provided to timer calls");if(h&&"function"!=typeof t.func)throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${t.func} of type ${typeof t.func}`);var n;if(v&&(t.error=new Error),t.type=t.immediate?"Immediate":"Timeout",t.hasOwnProperty("delay")&&("number"!=typeof t.delay&&(t.delay=parseInt(t.delay,10)),n=t.delay,(Number.isFinite?Number.isFinite(n):isFinite(n))||(t.delay=0),t.delay=t.delay>s?1:t.delay,t.delay=Math.max(0,t.delay)),t.hasOwnProperty("interval")&&(t.type="Interval",t.interval=t.interval>s?1:t.interval),t.hasOwnProperty("animation")&&(t.type="AnimationFrame",t.animation=!0),t.hasOwnProperty("idleCallback")&&(t.type="IdleCallback",t.idleCallback=!0),e.timers||(e.timers={}),t.id=b++,t.createdAt=e.now,t.callAt=e.now+(parseInt(t.delay)||(e.duringTick?1:0)),e.timers[t.id]=t,h){const n={refed:!0,ref:function(){return this.refed=!0,n},unref:function(){return this.refed=!1,n},hasRef:function(){return this.refed},refresh:function(){return t.callAt=e.now+(parseInt(t.delay)||(e.duringTick?1:0)),e.timers[t.id]=t,n},[Symbol.toPrimitive]:function(){return t.id}};return n}return t.id}function M(e,t){return e.callAt<t.callAt?-1:e.callAt>t.callAt?1:e.immediate&&!t.immediate?-1:!e.immediate&&t.immediate?1:e.createdAt<t.createdAt?-1:e.createdAt>t.createdAt?1:e.id<t.id?-1:e.id>t.id?1:void 0}function A(e,t,n){const o=e.timers;let r,i,s=null;for(r in o)o.hasOwnProperty(r)&&(i=$(t,n,o[r]),!i||s&&1!==M(s,o[r])||(s=o[r]));return s}function N(e){const t=e.timers;let n,o=null;for(n in t)t.hasOwnProperty(n)&&(o&&1!==M(o,t[n])||(o=t[n]));return o}function I(e){const t=e.timers;let n,o=null;for(n in t)t.hasOwnProperty(n)&&(o&&-1!==M(o,t[n])||(o=t[n]));return o}function P(e,t){if("number"==typeof t.interval?e.timers[t.id].callAt+=t.interval:delete e.timers[t.id],"function"==typeof t.func)t.func.apply(null,t.args);else{(0,eval)(t.func)}}function C(e){return"IdleCallback"===e||"AnimationFrame"===e?`cancel${e}`:`clear${e}`}const F=function(){let e=0;return function(t){!e++&&console.warn(t)}}();function D(e,t,n){if(!t)return;e.timers||(e.timers={});const o=Number(t);if(Number.isNaN(o)||o<a){const o=C(n);if(!0===e.shouldClearNativeTimers){const n=e[`_${o}`];return"function"==typeof n?n(t):void 0}F(`FakeTimers: ${o} was invoked to clear a native timer instead of one created by this library.\nTo automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(e.timers.hasOwnProperty(o)){const t=e.timers[o];if(!(t.type===n||"Timeout"===t.type&&"Interval"===n||"Interval"===t.type&&"Timeout"===n)){const e=C(n),o=function(e){return"IdleCallback"===e||"AnimationFrame"===e?`request${e}`:`set${e}`}(t.type);throw new Error(`Cannot clear timer: timer created with ${o}() but cleared with ${e}()`)}delete e.timers[o]}}function R(e,t,n){if(n[t].hadOwnProperty=Object.prototype.hasOwnProperty.call(e,t),n[`_${t}`]=e[t],"Date"===t)e[t]=n[t];else if("Intl"===t)e[t]=n[t];else if("performance"===t){const o=Object.getOwnPropertyDescriptor(e,t);if(o&&o.get&&!o.set){Object.defineProperty(n,`_${t}`,o);const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r)}else e[t]=n[t]}else e[t]=function(){return n[t].apply(n,arguments)},Object.defineProperties(e[t],Object.getOwnPropertyDescriptors(n[t]));e[t].clock=n}function L(e,t){e.tick(t)}const B={setTimeout:r.setTimeout,clearTimeout:r.clearTimeout,setInterval:r.setInterval,clearInterval:r.clearInterval,Date:r.Date};u.setImmediate&&(B.setImmediate=r.setImmediate),u.clearImmediate&&(B.clearImmediate=r.clearImmediate),u.hrtime&&(B.hrtime=r.process.hrtime),u.nextTick&&(B.nextTick=r.process.nextTick),u.performance&&(B.performance=r.performance),u.requestAnimationFrame&&(B.requestAnimationFrame=r.requestAnimationFrame),u.queueMicrotask&&(B.queueMicrotask=r.queueMicrotask),u.cancelAnimationFrame&&(B.cancelAnimationFrame=r.cancelAnimationFrame),u.requestIdleCallback&&(B.requestIdleCallback=r.requestIdleCallback),u.cancelIdleCallback&&(B.cancelIdleCallback=r.cancelIdleCallback),u.Intl&&(B.Intl=y);const q=r.setImmediate||r.setTimeout;function z(e,t){e=Math.floor(T(e)),t=t||1e3;let n=0;const o=[0,0],s={now:e,Date:E(),loopLimit:t};function a(){return 16-(s.now-e)%16}function c(t){const r=s.now-o[0]-e,i=Math.floor(r/1e3),a=1e6*(r-1e3*i)+n-o[1];if(Array.isArray(t)){if(t[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");const e=t[0];let n=a-t[1],o=i-e;return n<0&&(n+=1e9,o-=1),[o,n]}return[i,a]}function l(){const e=c();return 1e3*e[0]+e[1]/1e6}function f(e,t,o,r){const a="number"==typeof e?e:k(e),c=Math.floor(a),l=function(e){const t=1e6,n=1e6*e%t,o=n<0?n+t:n;return Math.floor(o)}(a);let u=n+l,f=s.now+c;if(a<0)throw new TypeError("Negative ticks are not supported");u>=1e6&&(f+=1,u-=1e6),n=u;let h,p,d,m,g,y,b=s.now,w=s.now;function v(){for(h=A(s,b,f);h&&b<=f;){if(s.timers[h.id]){b=h.callAt,s.now=h.callAt,d=s.now;try{j(s),P(s,h)}catch(i){p=p||i}if(t)return void q(m);g()}y()}if(d=s.now,j(s),d!==s.now&&(b+=s.now-d,f+=s.now-d),s.duringTick=!1,h=A(s,b,f),h)try{s.tick(f-s.now)}catch(i){p=p||i}else s.now=f,n=u;if(p)throw p;if(!t)return s.now;o(s.now)}return s.duringTick=!0,d=s.now,j(s),d!==s.now&&(b+=s.now-d,f+=s.now-d),m=t&&function(){try{g(),y(),v()}catch(i){r(i)}},g=function(){d!==s.now&&(b+=s.now-d,f+=s.now-d,w+=s.now-d)},y=function(){h=A(s,w,f),w=b},v()}return s.Date.clock=s,u.hrtimeBigint&&(c.bigint=function(){const e=c();return BigInt(e[0])*BigInt(1e9)+BigInt(e[1])}),u.Intl&&(s.Intl=function(){const e={};return Object.getOwnPropertyNames(y).forEach(t=>e[t]=y[t]),e.DateTimeFormat=function(...t){const n=new y.DateTimeFormat(...t),o={};return["formatRange","formatRangeToParts","resolvedOptions"].forEach(e=>{o[e]=n[e].bind(n)}),["format","formatToParts"].forEach(t=>{o[t]=function(o){return n[t](o||e.clock.now)}}),o},e.DateTimeFormat.prototype=Object.create(y.DateTimeFormat.prototype),e.DateTimeFormat.supportedLocalesOf=y.DateTimeFormat.supportedLocalesOf,e}(),s.Intl.clock=s),s.requestIdleCallback=function(e,t){let n=0;s.countTimers()>0&&(n=50);const o=_(s,{func:e,args:Array.prototype.slice.call(arguments,2),delay:void 0===t?n:Math.min(t,n),idleCallback:!0});return Number(o)},s.cancelIdleCallback=function(e){return D(s,e,"IdleCallback")},s.setTimeout=function(e,t){return _(s,{func:e,args:Array.prototype.slice.call(arguments,2),delay:t})},void 0!==r.Promise&&p&&(s.setTimeout[p.custom]=function(e,t){return new r.Promise(function(n){_(s,{func:n,args:[t],delay:e})})}),s.clearTimeout=function(e){return D(s,e,"Timeout")},s.nextTick=function(e){return function(e,t){e.jobs||(e.jobs=[]),e.jobs.push(t)}(s,{func:e,args:Array.prototype.slice.call(arguments,1),error:v?new Error:null})},s.queueMicrotask=function(e){return s.nextTick(e)},s.setInterval=function(e,t){return t=parseInt(t,10),_(s,{func:e,args:Array.prototype.slice.call(arguments,2),delay:t,interval:t})},s.clearInterval=function(e){return D(s,e,"Interval")},u.setImmediate&&(s.setImmediate=function(e){return _(s,{func:e,args:Array.prototype.slice.call(arguments,1),immediate:!0})},void 0!==r.Promise&&p&&(s.setImmediate[p.custom]=function(e){return new r.Promise(function(t){_(s,{func:t,args:[e],immediate:!0})})}),s.clearImmediate=function(e){return D(s,e,"Immediate")}),s.countTimers=function(){return Object.keys(s.timers||{}).length+(s.jobs||[]).length},s.requestAnimationFrame=function(e){const t=_(s,{func:e,delay:a(),get args(){return[l()]},animation:!0});return Number(t)},s.cancelAnimationFrame=function(e){return D(s,e,"AnimationFrame")},s.runMicrotasks=function(){j(s)},s.tick=function(e){return f(e,!1)},void 0!==r.Promise&&(s.tickAsync=function(e){return new r.Promise(function(t,n){q(function(){try{f(e,!0,t,n)}catch(i){n(i)}})})}),s.next=function(){j(s);const e=N(s);if(!e)return s.now;s.duringTick=!0;try{return s.now=e.callAt,P(s,e),j(s),s.now}finally{s.duringTick=!1}},void 0!==r.Promise&&(s.nextAsync=function(){return new r.Promise(function(e,t){q(function(){try{const n=N(s);if(!n)return void e(s.now);let o;s.duringTick=!0,s.now=n.callAt;try{P(s,n)}catch(i){o=i}s.duringTick=!1,q(function(){o?t(o):e(s.now)})}catch(i){t(i)}})})}),s.runAll=function(){let e,t;for(j(s),t=0;t<s.loopLimit;t++){if(!s.timers)return S(),s.now;if(e=Object.keys(s.timers).length,0===e)return S(),s.now;s.next(),x(s,t)}const n=N(s);throw O(s,n)},s.runToFrame=function(){return s.tick(a())},void 0!==r.Promise&&(s.runAllAsync=function(){return new r.Promise(function(e,t){let n=0;!function o(){q(function(){try{let r;if(j(s),n<s.loopLimit)return s.timers?(r=Object.keys(s.timers).length,0===r?(S(),void e(s.now)):(s.next(),n++,o(),void x(s,n))):(S(),void e(s.now));const i=N(s);t(O(s,i))}catch(i){t(i)}})}()})}),s.runToLast=function(){const e=I(s);return e?s.tick(e.callAt-s.now):(j(s),s.now)},void 0!==r.Promise&&(s.runToLastAsync=function(){return new r.Promise(function(e,t){q(function(){try{const t=I(s);t||(j(s),e(s.now)),e(s.tickAsync(t.callAt-s.now))}catch(i){t(i)}})})}),s.reset=function(){n=0,s.timers={},s.jobs=[],s.now=e},s.setSystemTime=function(e){const t=T(e),r=t-s.now;let i,a;for(i in o[0]=o[0]+r,o[1]=o[1]+n,s.now=t,n=0,s.timers)s.timers.hasOwnProperty(i)&&(a=s.timers[i],a.createdAt+=r,a.callAt+=r)},s.jump=function(e){const t="number"==typeof e?e:k(e),n=Math.floor(t);for(const o of Object.values(s.timers))s.now+n>o.callAt&&(o.callAt=s.now+n);s.tick(n)},u.performance&&(s.performance=/* @__PURE__ */Object.create(null),s.performance.now=l),u.hrtime&&(s.hrtime=c),s}return{timers:B,createClock:z,install:function(o){if(arguments.length>1||o instanceof Date||Array.isArray(o)||"number"==typeof o)throw new TypeError(`FakeTimers.install called with ${String(o)} install requires an object parameter`);if(!0===r.Date.isFake)throw new TypeError("Can't install fake timers twice on the same global object.");if((o=void 0!==o?o:{}).shouldAdvanceTime=o.shouldAdvanceTime||!1,o.advanceTimeDelta=o.advanceTimeDelta||20,o.shouldClearNativeTimers=o.shouldClearNativeTimers||!1,o.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function i(e){if(!o.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${e}'`)}let s,a;const f=z(o.now,o.loopLimit);if(f.shouldClearNativeTimers=o.shouldClearNativeTimers,f.uninstall=function(){return function(e,o){let i,s,a;for(s=0,a=e.methods.length;s<a;s++){if(i=e.methods[s],"hrtime"===i&&r.process)r.process.hrtime=e._hrtime;else if("nextTick"===i&&r.process)r.process.nextTick=e._nextTick;else if("performance"===i){const t=Object.getOwnPropertyDescriptor(e,`_${i}`);t&&t.get&&!t.set?Object.defineProperty(r,i,t):t.configurable&&(r[i]=e[`_${i}`])}else if(r[i]&&r[i].hadOwnProperty)r[i]=e[`_${i}`];else try{delete r[i]}catch(c){}if(void 0!==e.timersModuleMethods)for(let n=0;n<e.timersModuleMethods.length;n++){const o=e.timersModuleMethods[n];t[o.methodName]=o.original}if(void 0!==e.timersPromisesModuleMethods)for(let t=0;t<e.timersPromisesModuleMethods.length;t++){const o=e.timersPromisesModuleMethods[t];n[o.methodName]=o.original}}!0===o.shouldAdvanceTime&&r.clearInterval(e.attachedInterval),e.methods=[];for(const[t,n]of e.abortListenerMap.entries())n.removeEventListener("abort",t),e.abortListenerMap.delete(t);return e.timers?Object.keys(e.timers).map(function(t){return e.timers[t]}):[]}(f,o)},f.abortListenerMap=/* @__PURE__ */new Map,f.methods=o.toFake||[],0===f.methods.length&&(f.methods=Object.keys(B)),!0===o.shouldAdvanceTime){const e=L.bind(null,f,o.advanceTimeDelta),t=r.setInterval(e,o.advanceTimeDelta);f.attachedInterval=t}if(f.methods.includes("performance")){const e=m?r.performance.constructor.prototype:d?r.Performance.prototype:void 0;if(e)Object.getOwnPropertyNames(e).forEach(function(e){"now"!==e&&(f.performance[e]=0===e.indexOf("getEntries")?l:c)}),f.performance.mark=e=>new w(e,"mark",0,0),f.performance.measure=e=>new w(e,"measure",0,100),f.performance.timeOrigin=T(o.now);else if((o.toFake||[]).includes("performance"))return i("performance")}for(r===e&&t&&(f.timersModuleMethods=[]),r===e&&n&&(f.timersPromisesModuleMethods=[]),s=0,a=f.methods.length;s<a;s++){const e=f.methods[s];if(u[e]){if("hrtime"===e?r.process&&"function"==typeof r.process.hrtime&&R(r.process,e,f):"nextTick"===e?r.process&&"function"==typeof r.process.nextTick&&R(r.process,e,f):R(r,e,f),void 0!==f.timersModuleMethods&&t[e]){const n=t[e];f.timersModuleMethods.push({methodName:e,original:n}),t[e]=r[e]}void 0!==f.timersPromisesModuleMethods&&("setTimeout"===e?(f.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(e,t,n={})=>new Promise((o,r)=>{const i=()=>{n.signal.removeEventListener("abort",i),f.abortListenerMap.delete(i),f.clearTimeout(s),r(n.signal.reason)},s=f.setTimeout(()=>{n.signal&&(n.signal.removeEventListener("abort",i),f.abortListenerMap.delete(i)),o(t)},e);n.signal&&(n.signal.aborted?i():(n.signal.addEventListener("abort",i),f.abortListenerMap.set(i,n.signal)))})):"setImmediate"===e?(f.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(e,t={})=>new Promise((n,o)=>{const r=()=>{t.signal.removeEventListener("abort",r),f.abortListenerMap.delete(r),f.clearImmediate(i),o(t.signal.reason)},i=f.setImmediate(()=>{t.signal&&(t.signal.removeEventListener("abort",r),f.abortListenerMap.delete(r)),n(e)});t.signal&&(t.signal.aborted?r():(t.signal.addEventListener("abort",r),f.abortListenerMap.set(r,t.signal)))})):"setInterval"===e&&(f.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(e,t,n={})=>({[Symbol.asyncIterator]:()=>{const o=()=>{let e,t;const n=new Promise((n,o)=>{e=n,t=o});return n.resolve=e,n.reject=t,n};let r,i=!1,s=!1,a=0;const c=[],l=f.setInterval(()=>{c.length>0?c.shift().resolve():a++},e),u=()=>{n.signal.removeEventListener("abort",u),f.abortListenerMap.delete(u),f.clearInterval(l),i=!0;for(const e of c)e.resolve()};return n.signal&&(n.signal.aborted?i=!0:(n.signal.addEventListener("abort",u),f.abortListenerMap.set(u,n.signal))),{next:async()=>{if(n.signal?.aborted&&!s)throw s=!0,n.signal.reason;if(i)return{done:!0,value:void 0};if(a>0)return a--,{done:!1,value:t};const e=o();if(c.push(e),await e,r&&0===c.length&&r.resolve(),n.signal?.aborted&&!s)throw s=!0,n.signal.reason;return i?{done:!0,value:void 0}:{done:!1,value:t}},return:async()=>(i||(c.length>0&&(r=o(),await r),f.clearInterval(l),i=!0,n.signal&&(n.signal.removeEventListener("abort",u),f.abortListenerMap.delete(u))),{done:!0,value:void 0})}}})))}else i(e)}return f},withGlobal:o}}const r=o(e);return pu.timers=r.timers,pu.createClock=r.createClock,pu.install=r.install,pu.withGlobal=o,pu}();class of{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Wl.now;constructor({global:e,config:t}){this._userConfig=t,this._fakingDate=null,this._fakingTime=!1,this._fakeTimers=nf.withGlobal(e),this._global=e}clearAllTimers(){this._fakingTime&&this._clock.reset()}dispose(){this.useRealTimers()}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll()}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync()}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast()}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync()}advanceTimersToNextTimer(e=1){if(this._checkFakeTimers())for(let t=e;t>0&&(this._clock.next(),this._clock.tick(0),0!==this._clock.countTimers());t--);}async advanceTimersToNextTimerAsync(e=1){if(this._checkFakeTimers())for(let t=e;t>0&&(await this._clock.nextAsync(),this._clock.tick(0),0!==this._clock.countTimers());t--);}advanceTimersByTime(e){this._checkFakeTimers()&&this._clock.tick(e)}async advanceTimersByTimeAsync(e){this._checkFakeTimers()&&await this._clock.tickAsync(e)}advanceTimersToNextFrame(){this._checkFakeTimers()&&this._clock.runToFrame()}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks()}useRealTimers(){this._fakingDate&&(Kl(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=!1)}useFakeTimers(){const e=this._fakingDate||Date.now();this._fakingDate&&(Kl(),this._fakingDate=null),this._fakingTime&&this._clock.uninstall();const t=Object.keys(this._fakeTimers.timers).filter(e=>"nextTick"!==e&&"queueMicrotask"!==e);if(this._userConfig?.toFake?.includes("nextTick")&&Pc())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:e,...this._userConfig,toFake:this._userConfig?.toFake||t,ignoreMissingTimers:!0}),this._fakingTime=!0}reset(){if(this._checkFakeTimers()){const{now:e}=this._clock;this._clock.reset(),this._clock.setSystemTime(e)}}setSystemTime(e){const t=void 0===e||e instanceof Date?e:new Date(e);this._fakingTime?this._clock.setSystemTime(t):(this._fakingDate=t??new Date(this.getRealSystemTime()),function(e){const t=new Wl(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=Ul,Vl=t.valueOf()}(this._fakingDate))}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}configure(e){this._userConfig=e}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}}function rf(e,t){return void 0!==t.stack&&(e.stack=t.stack.replace(t.message,e.message)),e}function sf(e,t={}){const{setTimeout:n,setInterval:o,clearTimeout:r,clearInterval:i}=ma(),{interval:s=50,timeout:a=1e3}="number"==typeof t?{timeout:t}:t,c=/* @__PURE__ */new Error("STACK_TRACE_ERROR");return new Promise((t,l)=>{let u,f,h,p="idle";const d=e=>{f&&r(f),h&&i(h),t(e)},m=()=>{if(cf.isFakeTimers()&&cf.advanceTimersByTime(s),"pending"!==p)try{const t=e();if(null===t||"object"!=typeof t||"function"!=typeof t.then)return d(t),!0;p="pending",t.then(e=>{p="resolved",d(e)},e=>{p="rejected",u=e})}catch(t){u=t}};!0!==m()&&(f=n(()=>{h&&i(h);let e=u;e||(e=rf(/* @__PURE__ */new Error("Timed out in waitFor!"),c)),l(e)},a),h=o(m,s))})}function af(e,t={}){const{setTimeout:n,setInterval:o,clearTimeout:r,clearInterval:i}=ma(),{interval:s=50,timeout:a=1e3}="number"==typeof t?{timeout:t}:t,c=/* @__PURE__ */new Error("STACK_TRACE_ERROR");return new Promise((t,l)=>{let u,f,h="idle";const p=e=>{f&&i(f),e||(e=rf(/* @__PURE__ */new Error("Timed out in waitUntil!"),c)),l(e)},d=e=>{if(e)return u&&r(u),f&&i(f),t(e),!0},m=()=>{if(cf.isFakeTimers()&&cf.advanceTimersByTime(s),"pending"!==h)try{const t=e();if(null===t||"object"!=typeof t||"function"!=typeof t.then)return d(t);h="pending",t.then(e=>{h="resolved",d(e)},e=>{h="rejected",p(e)})}catch(t){p(t)}};!0!==m()&&(u=n(p,a),f=o(m,s))})}const cf=function(){let e=null;const t=()=>Ic();let n;const o=()=>n||=new of({global:globalThis,config:t().config.fakeTimers}),r=/* @__PURE__ */new Map,i=/* @__PURE__ */new Map,s=["PROD","DEV","SSR"],a={useFakeTimers(e){if(Pc()&&(e?.toFake?.includes("nextTick")||t().config?.fakeTimers?.toFake?.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return e?o().configure({...t().config.fakeTimers,...e}):o().configure(t().config.fakeTimers),o().useFakeTimers(),a},isFakeTimers:()=>o().isFakeTimers(),useRealTimers:()=>(o().useRealTimers(),a),runOnlyPendingTimers:()=>(o().runOnlyPendingTimers(),a),runOnlyPendingTimersAsync:async()=>(await o().runOnlyPendingTimersAsync(),a),runAllTimers:()=>(o().runAllTimers(),a),runAllTimersAsync:async()=>(await o().runAllTimersAsync(),a),runAllTicks:()=>(o().runAllTicks(),a),advanceTimersByTime:e=>(o().advanceTimersByTime(e),a),advanceTimersByTimeAsync:async e=>(await o().advanceTimersByTimeAsync(e),a),advanceTimersToNextTimer:()=>(o().advanceTimersToNextTimer(),a),advanceTimersToNextTimerAsync:async()=>(await o().advanceTimersToNextTimerAsync(),a),advanceTimersToNextFrame:()=>(o().advanceTimersToNextFrame(),a),getTimerCount:()=>o().getTimerCount(),setSystemTime:e=>(o().setSystemTime(e),a),getMockedSystemTime:()=>o().getMockedSystemTime(),getRealSystemTime:()=>o().getRealSystemTime(),clearAllTimers:()=>(o().clearAllTimers(),a),spyOn:Ln,fn:Rn,waitFor:sf,waitUntil:af,hoisted:e=>(gt(e,'"vi.hoisted" factory',["function"]),e()),mock(e,t){if("string"!=typeof e)throw new TypeError("vi.mock() expects a string path, but received a "+typeof e);const n=uf("mock");lf().queueMock(e,n,"function"==typeof t?()=>t(()=>lf().importActual(e,n,lf().getMockContext().callstack)):t)},unmock(e){if("string"!=typeof e)throw new TypeError("vi.unmock() expects a string path, but received a "+typeof e);lf().queueUnmock(e,uf("unmock"))},doMock(e,t){if("string"!=typeof e)throw new TypeError("vi.doMock() expects a string path, but received a "+typeof e);const n=uf("doMock");lf().queueMock(e,n,"function"==typeof t?()=>t(()=>lf().importActual(e,n,lf().getMockContext().callstack)):t)},doUnmock(e){if("string"!=typeof e)throw new TypeError("vi.doUnmock() expects a string path, but received a "+typeof e);const t=uf("doUnmock");lf().queueUnmock(e,t)},async importActual(e){const t=uf("importActual");return lf().importActual(e,t,lf().getMockContext().callstack)},async importMock(e){const t=uf("importMock");return lf().importMock(e,t)},mockObject:(e,t)=>lf().mockObject({value:e},void 0,t?.spy?"autospy":"automock").value,mocked:(e,t={})=>e,isMockFunction:e=>In(e),clearAllMocks:()=>(Cn.forEach(e=>e.mockClear()),a),resetAllMocks:()=>(Cn.forEach(e=>e.mockReset()),a),restoreAllMocks:()=>(function(){for(const e of Pn)e();Pn.clear()}(),a),stubGlobal:(e,t)=>(r.has(e)||r.set(e,Object.getOwnPropertyDescriptor(globalThis,e)),Object.defineProperty(globalThis,e,{value:t,writable:!0,configurable:!0,enumerable:!0}),a),stubEnv(e,n){const o=t().metaEnv;return i.has(e)||i.set(e,o[e]),s.includes(e)?o[e]=n?"1":"":void 0===n?delete o[e]:o[e]=String(n),a},unstubAllGlobals:()=>(r.forEach((e,t)=>{e?Object.defineProperty(globalThis,t,e):Reflect.deleteProperty(globalThis,t)}),r.clear(),a),unstubAllEnvs(){const e=t().metaEnv;return i.forEach((t,n)=>{void 0===t?delete e[n]:e[n]=t}),i.clear(),a},resetModules:()=>(function(e,t=!1){const n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((e,t)=>{n.some(e=>e.test(t))||(e.promise=void 0,e.exports=void 0,e.evaluated=!1,e.importers.clear())})}(t().evaluatedModules),a),dynamicImportSettled:async()=>Cc(),setConfig(n){e||(e={...t().config}),Object.assign(t().config,n)},resetConfig(){e&&Object.assign(t().config,e)}};return a}();function lf(){return"undefined"!=typeof __vitest_mocker__?__vitest_mocker__:new Proxy({},{get(e,t){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}function uf(e){const t=function(e){const{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},o=Error.stackTraceLimit,r=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=e=>e.stack;const i=new Error(t).stack||"";return Error.prepareStackTrace=r,Error.stackTraceLimit=o,i}({stackTraceLimit:5}).split("\n");return ja(t[t.findLastIndex(t=>t.includes(` at Object.${e}`)||t.includes(`${e}@`)||t.includes(` at ${e} (`))+1])?.file||""}function ff(e,t){return{pluginName:e,_config:t}}ac("Feature Registry",()=>{oc(()=>{s()}),rc(()=>{s()}),ac("registerFeature",()=>{cc("registers a feature factory",()=>{e("selection",()=>ff("selection")),eu(t("selection")).toBe(!0)}),cc("getFeatureFactory returns the registered factory",()=>{const t=()=>ff("selection");e("selection",t),eu(n("selection")).toBe(t)}),cc("isFeatureRegistered returns false for unregistered features",()=>{eu(t("nonexistent")).toBe(!1)}),cc("getFeatureFactory returns undefined for unregistered features",()=>{eu(n("nonexistent")).toBeUndefined()}),cc("getRegisteredFeatures returns all names",()=>{e("selection",()=>ff("selection")),e("editing",()=>ff("editing")),eu(o()).toEqual(eu.arrayContaining(["selection","editing"])),eu(o()).toHaveLength(2)})}),ac("createPluginFromFeature",()=>{cc("creates a plugin from registered feature",()=>{e("selection",e=>ff("selection",e));const t=r("selection","range");eu(t).toBeDefined(),eu(t._config).toBe("range")}),cc("returns undefined for unregistered feature",()=>{const e=r("nonexistent",!0);eu(e).toBeUndefined()}),cc("passes config to factory",()=>{const t=cf.fn(e=>ff("editing",e));e("editing",t),r("editing",{editOn:"click"}),eu(t).toHaveBeenCalledWith({editOn:"click"})})}),ac("createPluginsFromFeatures",()=>{cc("creates plugins for enabled features",()=>{e("selection",e=>ff("selection",e)),e("editing",e=>ff("editing",e));const t=i({selection:"range",editing:!0});eu(t).toHaveLength(2)}),cc("skips false-valued features",()=>{e("selection",e=>ff("selection",e)),e("editing",e=>ff("editing",e));const t=i({selection:"range",editing:!1});eu(t).toHaveLength(1)}),cc("skips undefined-valued features",()=>{e("selection",e=>ff("selection",e));const t=i({selection:void 0});eu(t).toHaveLength(0)}),cc("orders selection before other plugins",()=>{e("clipboard",()=>ff("clipboard")),e("selection",()=>ff("selection"));const t=i({clipboard:!0,selection:!0});eu(t[0].pluginName).toBe("selection"),eu(t[1].pluginName).toBe("clipboard")}),cc("orders editing before dependent plugins",()=>{e("undoRedo",()=>ff("undoRedo")),e("editing",()=>ff("editing"));const t=i({undoRedo:!0,editing:!0});eu(t[0].pluginName).toBe("editing"),eu(t[1].pluginName).toBe("undoRedo")}),cc("resolves deprecated alias: sorting → multiSort",()=>{e("multiSort",e=>ff("multiSort",e));const t=i({sorting:"single"});eu(t).toHaveLength(1),eu(t[0]._config).toBe("single")}),cc("resolves deprecated alias: reorder → reorderColumns",()=>{e("reorderColumns",e=>ff("reorderColumns",e));const t=i({reorder:!0});eu(t).toHaveLength(1),eu(t[0].pluginName).toBe("reorderColumns")}),cc("resolves deprecated alias: rowReorder → reorderRows",()=>{e("reorderRows",e=>ff("reorderRows",e));const t=i({rowReorder:!0});eu(t).toHaveLength(1),eu(t[0].pluginName).toBe("reorderRows")}),cc("primary takes precedence over deprecated alias",()=>{e("multiSort",e=>ff("multiSort",e));const t=i({sorting:"single",multiSort:{mode:"multi"}});eu(t).toHaveLength(1),eu(t[0]._config).toEqual({mode:"multi"})}),cc("returns empty array for empty features",()=>{const e=i({});eu(e).toHaveLength(0)})}),ac("clearFeatureRegistry",()=>{cc("clears all registered features",()=>{e("selection",()=>ff("selection")),eu(o()).toHaveLength(1),s(),eu(o()).toHaveLength(0),eu(t("selection")).toBe(!1)})})});
5
- //# sourceMappingURL=registry.spec.js.map