@uselets/ui 1.3.0 → 1.4.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 (212) hide show
  1. package/README.md +91 -1
  2. package/dist/chart-DHS2QeM8.d.ts +80 -0
  3. package/dist/cli/uselets.mjs.map +1 -1
  4. package/dist/components/accordion.d.ts +4 -5
  5. package/dist/components/accordion.js.map +1 -1
  6. package/dist/components/alert-dialog.d.ts +12 -13
  7. package/dist/components/alert-dialog.js.map +1 -1
  8. package/dist/components/alert.d.ts +5 -7
  9. package/dist/components/alert.js.map +1 -1
  10. package/dist/components/anchor.d.ts +2 -4
  11. package/dist/components/anchor.js.map +1 -1
  12. package/dist/components/area-chart.d.ts +58 -0
  13. package/dist/components/area-chart.js +2 -0
  14. package/dist/components/area-chart.js.map +1 -0
  15. package/dist/components/avatar.d.ts +6 -7
  16. package/dist/components/avatar.js.map +1 -1
  17. package/dist/components/badge.d.ts +2 -4
  18. package/dist/components/badge.js.map +1 -1
  19. package/dist/components/bar-chart.d.ts +54 -0
  20. package/dist/components/bar-chart.js +2 -0
  21. package/dist/components/bar-chart.js.map +1 -0
  22. package/dist/components/breadcrumb.d.ts +7 -8
  23. package/dist/components/breadcrumb.js.map +1 -1
  24. package/dist/components/button-group.d.ts +4 -6
  25. package/dist/components/button-group.js.map +1 -1
  26. package/dist/components/button.d.ts +2 -4
  27. package/dist/components/button.js.map +1 -1
  28. package/dist/components/calendar.d.ts +2 -3
  29. package/dist/components/calendar.js.map +1 -1
  30. package/dist/components/card.d.ts +7 -8
  31. package/dist/components/card.js.map +1 -1
  32. package/dist/components/carousel.d.ts +6 -7
  33. package/dist/components/carousel.js.map +1 -1
  34. package/dist/components/carousel.spec.js +1 -1
  35. package/dist/components/carousel.spec.js.map +1 -1
  36. package/dist/components/center.d.ts +2 -4
  37. package/dist/components/center.js.map +1 -1
  38. package/dist/components/chart.d.ts +2 -263
  39. package/dist/components/chart.js +1 -1
  40. package/dist/components/chart.js.map +1 -1
  41. package/dist/components/checkbox.d.ts +2 -4
  42. package/dist/components/checkbox.js +1 -1
  43. package/dist/components/checkbox.js.map +1 -1
  44. package/dist/components/code.d.ts +1 -2
  45. package/dist/components/code.js.map +1 -1
  46. package/dist/components/collapsible.d.ts +3 -4
  47. package/dist/components/collapsible.js.map +1 -1
  48. package/dist/components/combobox.d.ts +15 -16
  49. package/dist/components/combobox.js.map +1 -1
  50. package/dist/components/command.d.ts +9 -10
  51. package/dist/components/command.js.map +1 -1
  52. package/dist/components/container.d.ts +2 -4
  53. package/dist/components/container.js.map +1 -1
  54. package/dist/components/data-table.d.ts +164 -0
  55. package/dist/components/data-table.js +2 -0
  56. package/dist/components/data-table.js.map +1 -0
  57. package/dist/components/date-range-picker.d.ts +11 -12
  58. package/dist/components/date-range-picker.js.map +1 -1
  59. package/dist/components/dialog.d.ts +11 -13
  60. package/dist/components/dialog.js.map +1 -1
  61. package/dist/components/donut-chart.d.ts +22 -0
  62. package/dist/components/donut-chart.js +2 -0
  63. package/dist/components/donut-chart.js.map +1 -0
  64. package/dist/components/drawer.d.ts +12 -14
  65. package/dist/components/drawer.js.map +1 -1
  66. package/dist/components/dropdown-menu.d.ts +15 -16
  67. package/dist/components/dropdown-menu.js.map +1 -1
  68. package/dist/components/dropzone.d.ts +1 -2
  69. package/dist/components/dropzone.js.map +1 -1
  70. package/dist/components/empty.d.ts +7 -9
  71. package/dist/components/empty.js.map +1 -1
  72. package/dist/components/field.d.ts +11 -13
  73. package/dist/components/field.js.map +1 -1
  74. package/dist/components/field.spec.js +1 -1
  75. package/dist/components/field.spec.js.map +1 -1
  76. package/dist/components/flex.d.ts +4 -6
  77. package/dist/components/flex.js.map +1 -1
  78. package/dist/components/grid.d.ts +2 -3
  79. package/dist/components/grid.js.map +1 -1
  80. package/dist/components/group.d.ts +6 -4
  81. package/dist/components/group.js +1 -1
  82. package/dist/components/group.js.map +1 -1
  83. package/dist/components/heading.d.ts +2 -4
  84. package/dist/components/heading.js.map +1 -1
  85. package/dist/components/hover-card.d.ts +3 -4
  86. package/dist/components/hover-card.js.map +1 -1
  87. package/dist/components/input-group.d.ts +8 -10
  88. package/dist/components/input-group.js.map +1 -1
  89. package/dist/components/input-otp.d.ts +4 -5
  90. package/dist/components/input-otp.js.map +1 -1
  91. package/dist/components/input.d.ts +1 -2
  92. package/dist/components/input.js.map +1 -1
  93. package/dist/components/kbd.d.ts +2 -3
  94. package/dist/components/kbd.js.map +1 -1
  95. package/dist/components/label.d.ts +1 -2
  96. package/dist/components/label.js.map +1 -1
  97. package/dist/components/list.d.ts +4 -6
  98. package/dist/components/list.js.map +1 -1
  99. package/dist/components/mask-input.d.ts +25 -0
  100. package/dist/components/mask-input.js +2 -0
  101. package/dist/components/mask-input.js.map +1 -0
  102. package/dist/components/native-select.d.ts +3 -4
  103. package/dist/components/native-select.js.map +1 -1
  104. package/dist/components/navigation-menu.d.ts +9 -11
  105. package/dist/components/navigation-menu.js.map +1 -1
  106. package/dist/components/pagination.d.ts +7 -8
  107. package/dist/components/pagination.js.map +1 -1
  108. package/dist/components/pie-chart.d.ts +58 -0
  109. package/dist/components/pie-chart.js +2 -0
  110. package/dist/components/pie-chart.js.map +1 -0
  111. package/dist/components/popover.d.ts +7 -8
  112. package/dist/components/popover.js.map +1 -1
  113. package/dist/components/progress.d.ts +1 -2
  114. package/dist/components/progress.js.map +1 -1
  115. package/dist/components/radio-group.d.ts +3 -5
  116. package/dist/components/radio-group.js.map +1 -1
  117. package/dist/components/resizable.d.ts +3 -4
  118. package/dist/components/resizable.js.map +1 -1
  119. package/dist/components/scroll-area.d.ts +2 -3
  120. package/dist/components/scroll-area.js.map +1 -1
  121. package/dist/components/select.d.ts +10 -11
  122. package/dist/components/select.js.map +1 -1
  123. package/dist/components/separator.d.ts +1 -2
  124. package/dist/components/separator.js.map +1 -1
  125. package/dist/components/sidebar.d.ts +24 -26
  126. package/dist/components/sidebar.js.map +1 -1
  127. package/dist/components/simple-grid.d.ts +1 -2
  128. package/dist/components/simple-grid.js.map +1 -1
  129. package/dist/components/skeleton.d.ts +1 -2
  130. package/dist/components/skeleton.js.map +1 -1
  131. package/dist/components/skeleton.spec.js +1 -1
  132. package/dist/components/skeleton.spec.js.map +1 -1
  133. package/dist/components/slider.d.ts +1 -2
  134. package/dist/components/slider.js.map +1 -1
  135. package/dist/components/sonner.d.ts +1 -2
  136. package/dist/components/sonner.js.map +1 -1
  137. package/dist/components/spinner.d.ts +2 -4
  138. package/dist/components/spinner.js.map +1 -1
  139. package/dist/components/stack.d.ts +6 -4
  140. package/dist/components/stack.js +1 -1
  141. package/dist/components/stack.js.map +1 -1
  142. package/dist/components/switch.d.ts +1 -2
  143. package/dist/components/switch.js.map +1 -1
  144. package/dist/components/table.d.ts +29 -11
  145. package/dist/components/table.js +1 -1
  146. package/dist/components/table.js.map +1 -1
  147. package/dist/components/tabs.d.ts +5 -7
  148. package/dist/components/tabs.js.map +1 -1
  149. package/dist/components/text.d.ts +2 -4
  150. package/dist/components/text.js.map +1 -1
  151. package/dist/components/textarea.d.ts +1 -2
  152. package/dist/components/textarea.js.map +1 -1
  153. package/dist/components/theme.d.ts +2 -3
  154. package/dist/components/theme.js.map +1 -1
  155. package/dist/components/timeline.d.ts +4 -5
  156. package/dist/components/timeline.js.map +1 -1
  157. package/dist/components/toggle-group.d.ts +2 -3
  158. package/dist/components/toggle-group.js.map +1 -1
  159. package/dist/components/toggle.d.ts +2 -4
  160. package/dist/components/toggle.js.map +1 -1
  161. package/dist/components/tooltip.d.ts +5 -6
  162. package/dist/components/tooltip.js.map +1 -1
  163. package/dist/components/unstyled-button.d.ts +1 -2
  164. package/dist/components/unstyled-button.js.map +1 -1
  165. package/dist/components/visibility.d.ts +2 -3
  166. package/dist/components/visibility.js.map +1 -1
  167. package/dist/{dist-QvsLCO1I.js → dist-C35vdEt2.js} +45 -25
  168. package/dist/dist-C35vdEt2.js.map +1 -0
  169. package/dist/hooks/use-breakpoint-value.js.map +1 -1
  170. package/dist/hooks/use-breakpoint-value.spec.js +1 -1
  171. package/dist/hooks/use-breakpoint-value.spec.js.map +1 -1
  172. package/dist/hooks/use-breakpoint.js.map +1 -1
  173. package/dist/hooks/use-breakpoint.spec.js +1 -1
  174. package/dist/hooks/use-breakpoint.spec.js.map +1 -1
  175. package/dist/hooks/use-disclosure.js.map +1 -1
  176. package/dist/hooks/use-disclosure.spec.js +1 -1
  177. package/dist/hooks/use-disclosure.spec.js.map +1 -1
  178. package/dist/hooks/use-document-visibility.js.map +1 -1
  179. package/dist/hooks/use-document-visibility.spec.js +1 -1
  180. package/dist/hooks/use-document-visibility.spec.js.map +1 -1
  181. package/dist/hooks/use-idle.js.map +1 -1
  182. package/dist/hooks/use-idle.spec.js +1 -1
  183. package/dist/hooks/use-idle.spec.js.map +1 -1
  184. package/dist/hooks/use-interval.js.map +1 -1
  185. package/dist/hooks/use-interval.spec.js +1 -1
  186. package/dist/hooks/use-interval.spec.js.map +1 -1
  187. package/dist/hooks/use-local-storage.js.map +1 -1
  188. package/dist/hooks/use-local-storage.spec.js +1 -1
  189. package/dist/hooks/use-local-storage.spec.js.map +1 -1
  190. package/dist/hooks/use-mask.d.ts +9 -0
  191. package/dist/hooks/use-mask.js +2 -0
  192. package/dist/hooks/use-mask.js.map +1 -0
  193. package/dist/hooks/use-mobile.js.map +1 -1
  194. package/dist/hooks/use-mobile.spec.js +1 -1
  195. package/dist/hooks/use-mobile.spec.js.map +1 -1
  196. package/dist/index.d.ts +10 -3
  197. package/dist/index.js +1 -1
  198. package/dist/lib/button.js.map +1 -1
  199. package/dist/lib/color.js.map +1 -1
  200. package/dist/lib/utils.js.map +1 -1
  201. package/dist/magic-string.es-C-uSEkg2.js.map +1 -1
  202. package/dist/postcss.config.js.map +1 -1
  203. package/dist/{react.esm-D_dNEsWM.js → react.esm-BagSCtI3.js} +11 -2
  204. package/dist/{react.esm-D_dNEsWM.js.map → react.esm-BagSCtI3.js.map} +1 -1
  205. package/dist/skills/uselets-ui/SKILL.md +1 -0
  206. package/dist/skills/uselets-ui/references/component-catalog.md +31 -4
  207. package/dist/skills/uselets-ui/references/package-guide.md +136 -1
  208. package/package.json +15 -13
  209. package/skills/uselets-ui/SKILL.md +1 -0
  210. package/skills/uselets-ui/references/component-catalog.md +31 -4
  211. package/skills/uselets-ui/references/package-guide.md +136 -1
  212. package/dist/dist-QvsLCO1I.js.map +0 -1
@@ -1,16 +1,36 @@
1
1
  import{n as e,t}from"./chunk-CHh1Zzun.js";var r={reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],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 i(e){return String(e)}i.open=``,i.close=``;function B(){let e=typeof process<`u`?process:void 0,t=e?.env||{},r=t.FORCE_TTY!==`false`,o=e?.argv||[];return!(`NO_COLOR`in t||o.includes(`--no-color`))&&(`FORCE_COLOR`in t||o.includes(`--color`)||e?.platform===`win32`||r&&t.TERM!==`dumb`||`CI`in t)||typeof window<`u`&&!!window.chrome}function C({force:e}={}){let t=e||B(),a=(e,t,r,o)=>{let s=``,c=0;do s+=e.substring(c,o)+r,c=o+t.length,o=e.indexOf(t,c);while(~o);return s+e.substring(c)},l=(e,t,r=e)=>{let n=o=>{let s=String(o),c=s.indexOf(t,e.length);return~c?e+a(s,t,r,c)+t:e+s+t};return n.open=e,n.close=t,n},o={isColorSupported:t},f=e=>`\x1B[${e}m`;for(let e in r){let s=r[e];o[e]=t?l(f(s[0]),f(s[1]),s[2]):i}return o}var o=C();function _mergeNamespaces(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(r){if(r!==`default`&&!(r in e)){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}})}),Object.freeze(e)}function getKeysOfEnumerableProperties(e,t){let r=Object.keys(e),o=t===null?r:r.sort(t);if(Object.getOwnPropertySymbols)for(let t of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,t).enumerable&&o.push(t);return o}function printIteratorEntries(e,t,r,o,s,c,u=`: `){let d=``,p=0,m=e.next();if(!m.done){d+=t.spacingOuter;let h=r+t.indent;for(;!m.done;){if(d+=h,p++===t.maxWidth){d+=`…`;break}let r=c(m.value[0],t,h,o,s),g=c(m.value[1],t,h,o,s);d+=r+u+g,m=e.next(),m.done?t.min||(d+=`,`):d+=`,${t.spacingInner}`}d+=t.spacingOuter+r}return d}function printIteratorValues(e,t,r,o,s,c){let u=``,d=0,p=e.next();if(!p.done){u+=t.spacingOuter;let m=r+t.indent;for(;!p.done;){if(u+=m,d++===t.maxWidth){u+=`…`;break}u+=c(p.value,t,m,o,s),p=e.next(),p.done?t.min||(u+=`,`):u+=`,${t.spacingInner}`}u+=t.spacingOuter+r}return u}function printListItems(e,t,r,o,s,c){let u=``;e=e instanceof ArrayBuffer?new DataView(e):e;let isDataView=e=>e instanceof DataView,d=isDataView(e)?e.byteLength:e.length;if(d>0){u+=t.spacingOuter;let p=r+t.indent;for(let r=0;r<d;r++){if(u+=p,r===t.maxWidth){u+=`…`;break}(isDataView(e)||r in e)&&(u+=c(isDataView(e)?e.getInt8(r):e[r],t,p,o,s)),r<d-1?u+=`,${t.spacingInner}`:t.min||(u+=`,`)}u+=t.spacingOuter+r}return u}function printObjectProperties(e,t,r,o,s,c){let u=``,d=getKeysOfEnumerableProperties(e,t.compareKeys);if(d.length>0){u+=t.spacingOuter;let p=r+t.indent;for(let r=0;r<d.length;r++){let m=d[r],h=c(m,t,p,o,s),g=c(e[m],t,p,o,s);u+=`${p+h}: ${g}`,r<d.length-1?u+=`,${t.spacingInner}`:t.min||(u+=`,`)}u+=t.spacingOuter+r}return u}const s=typeof Symbol==`function`&&Symbol.for?Symbol.for(`jest.asymmetricMatcher`):1267621,serialize$5=(e,t,r,o,s,c)=>{let u=e.toString();if(u===`ArrayContaining`||u===`ArrayNotContaining`)return++o>t.maxDepth?`[${u}]`:`${u+` `}[${printListItems(e.sample,t,r,o,s,c)}]`;if(u===`ObjectContaining`||u===`ObjectNotContaining`)return++o>t.maxDepth?`[${u}]`:`${u+` `}{${printObjectProperties(e.sample,t,r,o,s,c)}}`;if(u===`StringMatching`||u===`StringNotMatching`||u===`StringContaining`||u===`StringNotContaining`)return u+` `+c(e.sample,t,r,o,s);if(typeof e.toAsymmetricMatcher!=`function`)throw TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},test$5=e=>e&&e.$$typeof===s,c={serialize:serialize$5,test:test$5},u=new Set([`DOMStringMap`,`NamedNodeMap`]),d=/^(?:HTML\w*Collection|NodeList)$/;function testName(e){return u.has(e)||d.test(e)}const test$4=e=>e&&e.constructor&&!!e.constructor.name&&testName(e.constructor.name);function isNamedNodeMap(e){return e.constructor.name===`NamedNodeMap`}const serialize$4=(e,t,r,o,s,c)=>{let d=e.constructor.name;return++o>t.maxDepth?`[${d}]`:(t.min?``:d+` `)+(u.has(d)?`{${printObjectProperties(isNamedNodeMap(e)?[...e].reduce((e,t)=>(e[t.name]=t.value,e),{}):{...e},t,r,o,s,c)}}`:`[${printListItems([...e],t,r,o,s,c)}]`)},p={serialize:serialize$4,test:test$4};function escapeHTML(e){return e.replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`)}function printProps(e,t,r,o,s,c,u){let d=o+r.indent,p=r.colors;return e.map(e=>{let m=t[e];if(typeof m==`string`&&m[0]===`_`&&m.startsWith(`__vitest_`)&&m.match(/__vitest_\d+__/))return``;let h=u(m,r,d,s,c);return typeof m!=`string`&&(h.includes(`
2
- `)&&(h=r.spacingOuter+d+h+r.spacingOuter+o),h=`{${h}}`),`${r.spacingInner+o+p.prop.open+e+p.prop.close}=${p.value.open}${h}${p.value.close}`}).join(``)}function printChildren(e,t,r,o,s,c){return e.map(e=>t.spacingOuter+r+(typeof e==`string`?printText(e,t):c(e,t,r,o,s))).join(``)}function printShadowRoot(e,t,r,o,s,c){return t.printShadowRoot===!1?``:[`${t.spacingOuter+r}#shadow-root`,printChildren(e,t,r+t.indent,o,s,c)].join(``)}function printText(e,t){let r=t.colors.content;return r.open+escapeHTML(e)+r.close}function printComment(e,t){let r=t.colors.comment;return`${r.open}<!--${escapeHTML(e)}-->${r.close}`}function printElement(e,t,r,o,s){let c=o.colors.tag;return`${c.open}<${e}${t&&c.close+t+o.spacingOuter+s+c.open}${r?`>${c.close}${r}${o.spacingOuter}${s}${c.open}</${e}`:`${t&&!o.min?``:` `}/`}>${c.close}`}function printElementAsLeaf(e,t){let r=t.colors.tag;return`${r.open}<${e}${r.close} …${r.open} />${r.close}`}const m=/^(?:(?:HTML|SVG)\w*)?Element$/;function testHasAttribute(e){try{return typeof e.hasAttribute==`function`&&e.hasAttribute(`is`)}catch{return!1}}function testNode(e){let t=e.constructor.name,{nodeType:r,tagName:o}=e,s=typeof o==`string`&&o.includes(`-`)||testHasAttribute(e);return r===1&&(m.test(t)||s)||r===3&&t===`Text`||r===8&&t===`Comment`||r===11&&t===`DocumentFragment`}const test$3=e=>e?.constructor?.name&&testNode(e);function nodeIsText(e){return e.nodeType===3}function nodeIsComment(e){return e.nodeType===8}function nodeIsFragment(e){return e.nodeType===11}function filterChildren(e,t){let r=e.filter(e=>e.nodeType===3?(e.data||``).trim().length>0:!0);return t&&(r=r.filter(t)),r}function serializeDOM(e,t,r,o,s,c,u){if(nodeIsText(e))return printText(e.data,t);if(nodeIsComment(e))return printComment(e.data,t);let d=nodeIsFragment(e)?`DocumentFragment`:e.tagName.toLowerCase();if(++o>t.maxDepth)return printElementAsLeaf(d,t);let p=Array.prototype.slice.call(e.childNodes||e.children),m=nodeIsFragment(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),h=u?filterChildren(p,u):p,g=u?filterChildren(m,u):m;return printElement(d,printProps(nodeIsFragment(e)?[]:Array.from(e.attributes,e=>e.name).sort(),nodeIsFragment(e)?{}:[...e.attributes].reduce((e,t)=>(e[t.name]=t.value,e),{}),t,r+t.indent,o,s,c),(g.length>0?printShadowRoot(g,t,r+t.indent,o,s,c):``)+printChildren(h,t,r+t.indent,o,s,c),t,r)}const serialize$3=(e,t,r,o,s,c)=>serializeDOM(e,t,r,o,s,c);function createDOMElementFilter(e){return{test:test$3,serialize:(t,r,o,s,c,u)=>serializeDOM(t,r,o,s,c,u,e)}}const h={serialize:serialize$3,test:test$3},g=`@@__IMMUTABLE_ORDERED__@@`,getImmutableName=e=>`Immutable.${e}`,printAsLeaf=e=>`[${e}]`;function printImmutableEntries(e,t,r,o,s,c,u){return++o>t.maxDepth?printAsLeaf(getImmutableName(u)):`${getImmutableName(u)+` `}{${printIteratorEntries(e.entries(),t,r,o,s,c)}}`}function getRecordEntries(e){let t=0;return{next(){if(t<e._keys.length){let r=e._keys[t++];return{done:!1,value:[r,e.get(r)]}}return{done:!0,value:void 0}}}}function printImmutableRecord(e,t,r,o,s,c){let u=getImmutableName(e._name||`Record`);return++o>t.maxDepth?printAsLeaf(u):`${u+` `}{${printIteratorEntries(getRecordEntries(e),t,r,o,s,c)}}`}function printImmutableSeq(e,t,r,o,s,c){let u=getImmutableName(`Seq`);return++o>t.maxDepth?printAsLeaf(u):e[`@@__IMMUTABLE_KEYED__@@`]?`${u+` `}{${e._iter||e._object?printIteratorEntries(e.entries(),t,r,o,s,c):`…`}}`:`${u+` `}[${e._iter||e._array||e._collection||e._iterable?printIteratorValues(e.values(),t,r,o,s,c):`…`}]`}function printImmutableValues(e,t,r,o,s,c,u){return++o>t.maxDepth?printAsLeaf(getImmutableName(u)):`${getImmutableName(u)+` `}[${printIteratorValues(e.values(),t,r,o,s,c)}]`}const serialize$2=(e,t,r,o,s,c)=>e[`@@__IMMUTABLE_MAP__@@`]?printImmutableEntries(e,t,r,o,s,c,e[g]?`OrderedMap`:`Map`):e[`@@__IMMUTABLE_LIST__@@`]?printImmutableValues(e,t,r,o,s,c,`List`):e[`@@__IMMUTABLE_SET__@@`]?printImmutableValues(e,t,r,o,s,c,e[g]?`OrderedSet`:`Set`):e[`@@__IMMUTABLE_STACK__@@`]?printImmutableValues(e,t,r,o,s,c,`Stack`):e[`@@__IMMUTABLE_SEQ__@@`]?printImmutableSeq(e,t,r,o,s,c):printImmutableRecord(e,t,r,o,s,c),_={serialize:serialize$2,test:e(e=>e&&(e[`@@__IMMUTABLE_ITERABLE__@@`]===!0||e[`@@__IMMUTABLE_RECORD__@@`]===!0),`test$2`)};function getDefaultExportFromCjs$2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}e(getDefaultExportFromCjs$2,`getDefaultExportFromCjs`);var y={exports:{}},b={},x;function requireReactIs_production(){if(x)return b;x=1;var e=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),o=Symbol.for(`react.strict_mode`),s=Symbol.for(`react.profiler`),c=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),m=Symbol.for(`react.suspense_list`),h=Symbol.for(`react.memo`),g=Symbol.for(`react.lazy`),_=Symbol.for(`react.view_transition`),y=Symbol.for(`react.client.reference`);function typeOf(y){if(typeof y==`object`&&y){var b=y.$$typeof;switch(b){case e:switch(y=y.type,y){case r:case s:case o:case p:case m:case _:return y;default:switch(y&&=y.$$typeof,y){case u:case d:case g:case h:return y;case c:return y;default:return b}}case t:return b}}}return b.ContextConsumer=c,b.ContextProvider=u,b.Element=e,b.ForwardRef=d,b.Fragment=r,b.Lazy=g,b.Memo=h,b.Portal=t,b.Profiler=s,b.StrictMode=o,b.Suspense=p,b.SuspenseList=m,b.isContextConsumer=function(e){return typeOf(e)===c},b.isContextProvider=function(e){return typeOf(e)===u},b.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},b.isForwardRef=function(e){return typeOf(e)===d},b.isFragment=function(e){return typeOf(e)===r},b.isLazy=function(e){return typeOf(e)===g},b.isMemo=function(e){return typeOf(e)===h},b.isPortal=function(e){return typeOf(e)===t},b.isProfiler=function(e){return typeOf(e)===s},b.isStrictMode=function(e){return typeOf(e)===o},b.isSuspense=function(e){return typeOf(e)===p},b.isSuspenseList=function(e){return typeOf(e)===m},b.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===s||e===o||e===p||e===m||typeof e==`object`&&e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.getModuleId!==void 0))},b.typeOf=typeOf,b}var S;function requireReactIs$1(){return S?y.exports:(S=1,y.exports=requireReactIs_production(),y.exports)}var w=requireReactIs$1(),T=_mergeNamespaces({__proto__:null,default:getDefaultExportFromCjs$2(w)},[w]),E={exports:{}},D={},O;function requireReactIs_production_min(){if(O)return D;O=1;var e=Symbol.for(`react.element`),t=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),o=Symbol.for(`react.strict_mode`),s=Symbol.for(`react.profiler`),c=Symbol.for(`react.provider`),u=Symbol.for(`react.context`),d=Symbol.for(`react.server_context`),p=Symbol.for(`react.forward_ref`),m=Symbol.for(`react.suspense`),h=Symbol.for(`react.suspense_list`),g=Symbol.for(`react.memo`),_=Symbol.for(`react.lazy`),y=Symbol.for(`react.offscreen`),b=Symbol.for(`react.module.reference`);function v(y){if(typeof y==`object`&&y){var b=y.$$typeof;switch(b){case e:switch(y=y.type,y){case r:case s:case o:case m:case h:return y;default:switch(y&&=y.$$typeof,y){case d:case u:case p:case _:case g:case c:return y;default:return b}}case t:return b}}}return D.ContextConsumer=u,D.ContextProvider=c,D.Element=e,D.ForwardRef=p,D.Fragment=r,D.Lazy=_,D.Memo=g,D.Portal=t,D.Profiler=s,D.StrictMode=o,D.Suspense=m,D.SuspenseList=h,D.isAsyncMode=function(){return!1},D.isConcurrentMode=function(){return!1},D.isContextConsumer=function(e){return v(e)===u},D.isContextProvider=function(e){return v(e)===c},D.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},D.isForwardRef=function(e){return v(e)===p},D.isFragment=function(e){return v(e)===r},D.isLazy=function(e){return v(e)===_},D.isMemo=function(e){return v(e)===g},D.isPortal=function(e){return v(e)===t},D.isProfiler=function(e){return v(e)===s},D.isStrictMode=function(e){return v(e)===o},D.isSuspense=function(e){return v(e)===m},D.isSuspenseList=function(e){return v(e)===h},D.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===s||e===o||e===m||e===h||e===y||typeof e==`object`&&e&&(e.$$typeof===_||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.getModuleId!==void 0))},D.typeOf=v,D}var k;function requireReactIs(){return k?E.exports:(k=1,E.exports=requireReactIs_production_min(),E.exports)}var ee=requireReactIs(),te=_mergeNamespaces({__proto__:null,default:getDefaultExportFromCjs$2(ee)},[ee]);const A=Object.fromEntries([`isAsyncMode`,`isConcurrentMode`,`isContextConsumer`,`isContextProvider`,`isElement`,`isForwardRef`,`isFragment`,`isLazy`,`isMemo`,`isPortal`,`isProfiler`,`isStrictMode`,`isSuspense`,`isSuspenseList`,`isValidElementType`].map(e=>[e,t=>te[e](t)||T[e](t)]));function getChildren(e,t=[]){if(Array.isArray(e))for(let r of e)getChildren(r,t);else e!=null&&e!==!1&&e!==``&&t.push(e);return t}function getType$2(e){let t=e.type;if(typeof t==`string`)return t;if(typeof t==`function`)return t.displayName||t.name||`Unknown`;if(A.isFragment(e))return`React.Fragment`;if(A.isSuspense(e))return`React.Suspense`;if(typeof t==`object`&&t){if(A.isContextProvider(e))return`Context.Provider`;if(A.isContextConsumer(e))return`Context.Consumer`;if(A.isForwardRef(e)){if(t.displayName)return t.displayName;let e=t.render.displayName||t.render.name||``;return e===``?`ForwardRef`:`ForwardRef(${e})`}if(A.isMemo(e)){let e=t.displayName||t.type.displayName||t.type.name||``;return e===``?`Memo`:`Memo(${e})`}}return`UNDEFINED`}e(getType$2,`getType`);function getPropKeys$1(e){let{props:t}=e;return Object.keys(t).filter(e=>e!==`children`&&t[e]!==void 0).sort()}const ne={serialize:e((e,t,r,o,s,c)=>++o>t.maxDepth?printElementAsLeaf(getType$2(e),t):printElement(getType$2(e),printProps(getPropKeys$1(e),e.props,t,r+t.indent,o,s,c),printChildren(getChildren(e.props.children),t,r+t.indent,o,s,c),t,r),`serialize$1`),test:e(e=>e!=null&&A.isElement(e),`test$1`)},re=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.test.json`):245830487;function getPropKeys(e){let{props:t}=e;return t?Object.keys(t).filter(e=>t[e]!==void 0).sort():[]}const ie={serialize:e((e,t,r,o,s,c)=>++o>t.maxDepth?printElementAsLeaf(e.type,t):printElement(e.type,e.props?printProps(getPropKeys(e),e.props,t,r+t.indent,o,s,c):``,e.children?printChildren(e.children,t,r+t.indent,o,s,c):``,t,r),`serialize`),test:e(e=>e&&e.$$typeof===re,`test`)},ae=Object.prototype.toString,oe=Date.prototype.toISOString,se=Error.prototype.toString,ce=RegExp.prototype.toString;function getConstructorName$1(e){return typeof e.constructor==`function`&&e.constructor.name||`Object`}e(getConstructorName$1,`getConstructorName`);function isWindow(e){return typeof window<`u`&&e===window}const le=/^Symbol\((.*)\)(.*)$/,ue=/\n/g;var PrettyFormatPluginError=class extends Error{constructor(e,t){super(e),this.stack=t,this.name=this.constructor.name}};function isToStringedArrayType(e){return e===`[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]`}function printNumber(e){return Object.is(e,-0)?`-0`:String(e)}function printBigInt(e){return String(`${e}n`)}function printFunction(e,t){return t?`[Function ${e.name||`anonymous`}]`:`[Function]`}function printSymbol(e){return String(e).replace(le,`Symbol($1)`)}function printError(e){return`[${se.call(e)}]`}function printBasicValue(e,t,r,o){if(e===!0||e===!1)return`${e}`;if(e===void 0)return`undefined`;if(e===null)return`null`;let s=typeof e;if(s===`number`)return printNumber(e);if(s===`bigint`)return printBigInt(e);if(s===`string`)return o?`"${e.replaceAll(/"|\\/g,`\\$&`)}"`:`"${e}"`;if(s===`function`)return printFunction(e,t);if(s===`symbol`)return printSymbol(e);let c=ae.call(e);return c===`[object WeakMap]`?`WeakMap {}`:c===`[object WeakSet]`?`WeakSet {}`:c===`[object Function]`||c===`[object GeneratorFunction]`?printFunction(e,t):c===`[object Symbol]`?printSymbol(e):c===`[object Date]`?Number.isNaN(+e)?`Date { NaN }`:oe.call(e):c===`[object Error]`?printError(e):c===`[object RegExp]`?r?ce.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,`\\$&`):ce.call(e):e instanceof Error?printError(e):null}function printComplexValue(e,t,r,o,s,c){if(s.includes(e))return`[Circular]`;s=[...s],s.push(e);let u=++o>t.maxDepth,d=t.min;if(t.callToJSON&&!u&&e.toJSON&&typeof e.toJSON==`function`&&!c)return printer(e.toJSON(),t,r,o,s,!0);let p=ae.call(e);return p===`[object Arguments]`?u?`[Arguments]`:`${d?``:`Arguments `}[${printListItems(e,t,r,o,s,printer)}]`:isToStringedArrayType(p)?u?`[${e.constructor.name}]`:`${d||!t.printBasicPrototype&&e.constructor.name===`Array`?``:`${e.constructor.name} `}[${printListItems(e,t,r,o,s,printer)}]`:p===`[object Map]`?u?`[Map]`:`Map {${printIteratorEntries(e.entries(),t,r,o,s,printer,` => `)}}`:p===`[object Set]`?u?`[Set]`:`Set {${printIteratorValues(e.values(),t,r,o,s,printer)}}`:u||isWindow(e)?`[${getConstructorName$1(e)}]`:`${d||!t.printBasicPrototype&&getConstructorName$1(e)===`Object`?``:`${getConstructorName$1(e)} `}{${printObjectProperties(e,t,r,o,s,printer)}}`}const de={test:e=>e&&e instanceof Error,serialize(e,t,r,o,s,c){if(s.includes(e))return`[Circular]`;s=[...s,e];let u=++o>t.maxDepth,{message:d,cause:p,...m}=e,h={message:d,...p===void 0?{}:{cause:p},...e instanceof AggregateError?{errors:e.errors}:{},...m},g=e.name===`Error`?getConstructorName$1(e):e.name;return u?`[${g}]`:`${g} {${printIteratorEntries(Object.entries(h).values(),t,r,o,s,c)}}`}};function isNewPlugin(e){return e.serialize!=null}function printPlugin(e,t,r,o,s,c){let u;try{u=isNewPlugin(e)?e.serialize(t,r,o,s,c,printer):e.print(t,e=>printer(e,r,o,s,c),e=>{let t=o+r.indent;return t+e.replaceAll(ue,`\n${t}`)},{edgeSpacing:r.spacingOuter,min:r.min,spacing:r.spacingInner},r.colors)}catch(e){throw new PrettyFormatPluginError(e.message,e.stack)}if(typeof u!=`string`)throw TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof u}".`);return u}function findPlugin(e,t){for(let r of e)try{if(r.test(t))return r}catch(e){throw new PrettyFormatPluginError(e.message,e.stack)}return null}function printer(e,t,r,o,s,c){let u,d=findPlugin(t.plugins,e);if(d!==null)u=printPlugin(d,e,t,r,o,s);else{let d=printBasicValue(e,t.printFunctionName,t.escapeRegex,t.escapeString);u=d===null?printComplexValue(e,t,r,o,s,c):d}return t._outputLengthPerDepth[o]??=0,t._outputLengthPerDepth[o]+=u.length,t._outputLengthPerDepth[o]>t.maxOutputLength&&(t.maxDepth=0),u}const fe={comment:`gray`,content:`reset`,prop:`yellow`,tag:`cyan`,value:`green`},pe=Object.keys(fe),j={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,maxOutputLength:1e6,maxWidth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:fe};function validateOptions(e){for(let t of Object.keys(e))if(!Object.hasOwn(j,t))throw Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw Error(`pretty-format: Options "min" and "indent" cannot be used together.`)}function getColorsHighlight(){return pe.reduce((e,t)=>{let r=fe[t],s=r&&o[r];if(s&&typeof s.close==`string`&&typeof s.open==`string`)e[t]=s;else throw Error(`pretty-format: Option "theme" has a key "${t}" whose value "${r}" is undefined in ansi-styles.`);return e},Object.create(null))}function getColorsEmpty(){return pe.reduce((e,t)=>(e[t]={close:``,open:``},e),Object.create(null))}function getPrintFunctionName(e){return e?.printFunctionName??j.printFunctionName}function getEscapeRegex(e){return e?.escapeRegex??j.escapeRegex}function getEscapeString(e){return e?.escapeString??j.escapeString}function getConfig(e){return{callToJSON:e?.callToJSON??j.callToJSON,colors:e?.highlight?getColorsHighlight():getColorsEmpty(),compareKeys:typeof e?.compareKeys==`function`||e?.compareKeys===null?e.compareKeys:j.compareKeys,escapeRegex:getEscapeRegex(e),escapeString:getEscapeString(e),indent:e?.min?``:createIndent(e?.indent??j.indent),maxDepth:e?.maxDepth??j.maxDepth,maxWidth:e?.maxWidth??j.maxWidth,min:e?.min??j.min,plugins:e?.plugins??j.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:getPrintFunctionName(e),printShadowRoot:e?.printShadowRoot??!0,spacingInner:e?.min?` `:`
2
+ `)&&(h=r.spacingOuter+d+h+r.spacingOuter+o),h=`{${h}}`),`${r.spacingInner+o+p.prop.open+e+p.prop.close}=${p.value.open}${h}${p.value.close}`}).join(``)}function printChildren(e,t,r,o,s,c){return e.map(e=>t.spacingOuter+r+(typeof e==`string`?printText(e,t):c(e,t,r,o,s))).join(``)}function printShadowRoot(e,t,r,o,s,c){return t.printShadowRoot===!1?``:[`${t.spacingOuter+r}#shadow-root`,printChildren(e,t,r+t.indent,o,s,c)].join(``)}function printText(e,t){let r=t.colors.content;return r.open+escapeHTML(e)+r.close}function printComment(e,t){let r=t.colors.comment;return`${r.open}<!--${escapeHTML(e)}-->${r.close}`}function printElement(e,t,r,o,s){let c=o.colors.tag;return`${c.open}<${e}${t&&c.close+t+o.spacingOuter+s+c.open}${r?`>${c.close}${r}${o.spacingOuter}${s}${c.open}</${e}`:`${t&&!o.min?``:` `}/`}>${c.close}`}function printElementAsLeaf(e,t){let r=t.colors.tag;return`${r.open}<${e}${r.close} …${r.open} />${r.close}`}const m=/^(?:(?:HTML|SVG)\w*)?Element$/;function testHasAttribute(e){try{return typeof e.hasAttribute==`function`&&e.hasAttribute(`is`)}catch{return!1}}function testNode(e){let t=e.constructor.name,{nodeType:r,tagName:o}=e,s=typeof o==`string`&&o.includes(`-`)||testHasAttribute(e);return r===1&&(m.test(t)||s)||r===3&&t===`Text`||r===8&&t===`Comment`||r===11&&t===`DocumentFragment`}const test$3=e=>e?.constructor?.name&&testNode(e);function nodeIsText(e){return e.nodeType===3}function nodeIsComment(e){return e.nodeType===8}function nodeIsFragment(e){return e.nodeType===11}function filterChildren(e,t){let r=e.filter(e=>e.nodeType===3?(e.data||``).trim().length>0:!0);return t&&(r=r.filter(t)),r}function serializeDOM(e,t,r,o,s,c,u){if(nodeIsText(e))return printText(e.data,t);if(nodeIsComment(e))return printComment(e.data,t);let d=nodeIsFragment(e)?`DocumentFragment`:e.tagName.toLowerCase();if(++o>t.maxDepth)return printElementAsLeaf(d,t);let p=Array.prototype.slice.call(e.childNodes||e.children),m=nodeIsFragment(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),h=u?filterChildren(p,u):p,g=u?filterChildren(m,u):m;return printElement(d,printProps(nodeIsFragment(e)?[]:Array.from(e.attributes,e=>e.name).sort(),nodeIsFragment(e)?{}:[...e.attributes].reduce((e,t)=>(e[t.name]=t.value,e),{}),t,r+t.indent,o,s,c),(g.length>0?printShadowRoot(g,t,r+t.indent,o,s,c):``)+printChildren(h,t,r+t.indent,o,s,c),t,r)}const serialize$3=(e,t,r,o,s,c)=>serializeDOM(e,t,r,o,s,c);function createDOMElementFilter(e){return{test:test$3,serialize:(t,r,o,s,c,u)=>serializeDOM(t,r,o,s,c,u,e)}}const h={serialize:serialize$3,test:test$3},g=`@@__IMMUTABLE_ORDERED__@@`,getImmutableName=e=>`Immutable.${e}`,printAsLeaf=e=>`[${e}]`;function printImmutableEntries(e,t,r,o,s,c,u){return++o>t.maxDepth?printAsLeaf(getImmutableName(u)):`${getImmutableName(u)+` `}{${printIteratorEntries(e.entries(),t,r,o,s,c)}}`}function getRecordEntries(e){let t=0;return{next(){if(t<e._keys.length){let r=e._keys[t++];return{done:!1,value:[r,e.get(r)]}}return{done:!0,value:void 0}}}}function printImmutableRecord(e,t,r,o,s,c){let u=getImmutableName(e._name||`Record`);return++o>t.maxDepth?printAsLeaf(u):`${u+` `}{${printIteratorEntries(getRecordEntries(e),t,r,o,s,c)}}`}function printImmutableSeq(e,t,r,o,s,c){let u=getImmutableName(`Seq`);return++o>t.maxDepth?printAsLeaf(u):e[`@@__IMMUTABLE_KEYED__@@`]?`${u+` `}{${e._iter||e._object?printIteratorEntries(e.entries(),t,r,o,s,c):`…`}}`:`${u+` `}[${e._iter||e._array||e._collection||e._iterable?printIteratorValues(e.values(),t,r,o,s,c):`…`}]`}function printImmutableValues(e,t,r,o,s,c,u){return++o>t.maxDepth?printAsLeaf(getImmutableName(u)):`${getImmutableName(u)+` `}[${printIteratorValues(e.values(),t,r,o,s,c)}]`}const serialize$2=(e,t,r,o,s,c)=>e[`@@__IMMUTABLE_MAP__@@`]?printImmutableEntries(e,t,r,o,s,c,e[g]?`OrderedMap`:`Map`):e[`@@__IMMUTABLE_LIST__@@`]?printImmutableValues(e,t,r,o,s,c,`List`):e[`@@__IMMUTABLE_SET__@@`]?printImmutableValues(e,t,r,o,s,c,e[g]?`OrderedSet`:`Set`):e[`@@__IMMUTABLE_STACK__@@`]?printImmutableValues(e,t,r,o,s,c,`Stack`):e[`@@__IMMUTABLE_SEQ__@@`]?printImmutableSeq(e,t,r,o,s,c):printImmutableRecord(e,t,r,o,s,c),_={serialize:serialize$2,test:e(e=>e&&(e[`@@__IMMUTABLE_ITERABLE__@@`]===!0||e[`@@__IMMUTABLE_RECORD__@@`]===!0),`test$2`)};function getDefaultExportFromCjs$2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}e(getDefaultExportFromCjs$2,`getDefaultExportFromCjs`);var y={exports:{}},b={},x
3
+ /**
4
+ * @license React
5
+ * react-is.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ ;function requireReactIs_production(){if(x)return b;x=1;var e=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),o=Symbol.for(`react.strict_mode`),s=Symbol.for(`react.profiler`),c=Symbol.for(`react.consumer`),u=Symbol.for(`react.context`),d=Symbol.for(`react.forward_ref`),p=Symbol.for(`react.suspense`),m=Symbol.for(`react.suspense_list`),h=Symbol.for(`react.memo`),g=Symbol.for(`react.lazy`),_=Symbol.for(`react.view_transition`),y=Symbol.for(`react.client.reference`);function typeOf(y){if(typeof y==`object`&&y){var b=y.$$typeof;switch(b){case e:switch(y=y.type,y){case r:case s:case o:case p:case m:case _:return y;default:switch(y&&=y.$$typeof,y){case u:case d:case g:case h:return y;case c:return y;default:return b}}case t:return b}}}return b.ContextConsumer=c,b.ContextProvider=u,b.Element=e,b.ForwardRef=d,b.Fragment=r,b.Lazy=g,b.Memo=h,b.Portal=t,b.Profiler=s,b.StrictMode=o,b.Suspense=p,b.SuspenseList=m,b.isContextConsumer=function(e){return typeOf(e)===c},b.isContextProvider=function(e){return typeOf(e)===u},b.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},b.isForwardRef=function(e){return typeOf(e)===d},b.isFragment=function(e){return typeOf(e)===r},b.isLazy=function(e){return typeOf(e)===g},b.isMemo=function(e){return typeOf(e)===h},b.isPortal=function(e){return typeOf(e)===t},b.isProfiler=function(e){return typeOf(e)===s},b.isStrictMode=function(e){return typeOf(e)===o},b.isSuspense=function(e){return typeOf(e)===p},b.isSuspenseList=function(e){return typeOf(e)===m},b.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===s||e===o||e===p||e===m||typeof e==`object`&&e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===u||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.getModuleId!==void 0))},b.typeOf=typeOf,b}var S;function requireReactIs$1(){return S?y.exports:(S=1,y.exports=requireReactIs_production(),y.exports)}var w=requireReactIs$1(),T=_mergeNamespaces({__proto__:null,default:getDefaultExportFromCjs$2(w)},[w]),E={exports:{}},D={},O
13
+ /**
14
+ * @license React
15
+ * react-is.production.min.js
16
+ *
17
+ * Copyright (c) Facebook, Inc. and its affiliates.
18
+ *
19
+ * This source code is licensed under the MIT license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */
22
+ ;function requireReactIs_production_min(){if(O)return D;O=1;var e=Symbol.for(`react.element`),t=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),o=Symbol.for(`react.strict_mode`),s=Symbol.for(`react.profiler`),c=Symbol.for(`react.provider`),u=Symbol.for(`react.context`),d=Symbol.for(`react.server_context`),p=Symbol.for(`react.forward_ref`),m=Symbol.for(`react.suspense`),h=Symbol.for(`react.suspense_list`),g=Symbol.for(`react.memo`),_=Symbol.for(`react.lazy`),y=Symbol.for(`react.offscreen`),b=Symbol.for(`react.module.reference`);function v(y){if(typeof y==`object`&&y){var b=y.$$typeof;switch(b){case e:switch(y=y.type,y){case r:case s:case o:case m:case h:return y;default:switch(y&&=y.$$typeof,y){case d:case u:case p:case _:case g:case c:return y;default:return b}}case t:return b}}}return D.ContextConsumer=u,D.ContextProvider=c,D.Element=e,D.ForwardRef=p,D.Fragment=r,D.Lazy=_,D.Memo=g,D.Portal=t,D.Profiler=s,D.StrictMode=o,D.Suspense=m,D.SuspenseList=h,D.isAsyncMode=function(){return!1},D.isConcurrentMode=function(){return!1},D.isContextConsumer=function(e){return v(e)===u},D.isContextProvider=function(e){return v(e)===c},D.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},D.isForwardRef=function(e){return v(e)===p},D.isFragment=function(e){return v(e)===r},D.isLazy=function(e){return v(e)===_},D.isMemo=function(e){return v(e)===g},D.isPortal=function(e){return v(e)===t},D.isProfiler=function(e){return v(e)===s},D.isStrictMode=function(e){return v(e)===o},D.isSuspense=function(e){return v(e)===m},D.isSuspenseList=function(e){return v(e)===h},D.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===s||e===o||e===m||e===h||e===y||typeof e==`object`&&e&&(e.$$typeof===_||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===b||e.getModuleId!==void 0))},D.typeOf=v,D}var k;function requireReactIs(){return k?E.exports:(k=1,E.exports=requireReactIs_production_min(),E.exports)}var A=requireReactIs(),ee=_mergeNamespaces({__proto__:null,default:getDefaultExportFromCjs$2(A)},[A]);const j=Object.fromEntries([`isAsyncMode`,`isConcurrentMode`,`isContextConsumer`,`isContextProvider`,`isElement`,`isForwardRef`,`isFragment`,`isLazy`,`isMemo`,`isPortal`,`isProfiler`,`isStrictMode`,`isSuspense`,`isSuspenseList`,`isValidElementType`].map(e=>[e,t=>ee[e](t)||T[e](t)]));function getChildren(e,t=[]){if(Array.isArray(e))for(let r of e)getChildren(r,t);else e!=null&&e!==!1&&e!==``&&t.push(e);return t}function getType$2(e){let t=e.type;if(typeof t==`string`)return t;if(typeof t==`function`)return t.displayName||t.name||`Unknown`;if(j.isFragment(e))return`React.Fragment`;if(j.isSuspense(e))return`React.Suspense`;if(typeof t==`object`&&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;let e=t.render.displayName||t.render.name||``;return e===``?`ForwardRef`:`ForwardRef(${e})`}if(j.isMemo(e)){let e=t.displayName||t.type.displayName||t.type.name||``;return e===``?`Memo`:`Memo(${e})`}}return`UNDEFINED`}e(getType$2,`getType`);function getPropKeys$1(e){let{props:t}=e;return Object.keys(t).filter(e=>e!==`children`&&t[e]!==void 0).sort()}const te={serialize:e((e,t,r,o,s,c)=>++o>t.maxDepth?printElementAsLeaf(getType$2(e),t):printElement(getType$2(e),printProps(getPropKeys$1(e),e.props,t,r+t.indent,o,s,c),printChildren(getChildren(e.props.children),t,r+t.indent,o,s,c),t,r),`serialize$1`),test:e(e=>e!=null&&j.isElement(e),`test$1`)},ne=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.test.json`):245830487;function getPropKeys(e){let{props:t}=e;return t?Object.keys(t).filter(e=>t[e]!==void 0).sort():[]}const re={serialize:e((e,t,r,o,s,c)=>++o>t.maxDepth?printElementAsLeaf(e.type,t):printElement(e.type,e.props?printProps(getPropKeys(e),e.props,t,r+t.indent,o,s,c):``,e.children?printChildren(e.children,t,r+t.indent,o,s,c):``,t,r),`serialize`),test:e(e=>e&&e.$$typeof===ne,`test`)},ie=Object.prototype.toString,ae=Date.prototype.toISOString,oe=Error.prototype.toString,se=RegExp.prototype.toString;function getConstructorName$1(e){return typeof e.constructor==`function`&&e.constructor.name||`Object`}e(getConstructorName$1,`getConstructorName`);function isWindow(e){return typeof window<`u`&&e===window}const ce=/^Symbol\((.*)\)(.*)$/,le=/\n/g;var PrettyFormatPluginError=class extends Error{constructor(e,t){super(e),this.stack=t,this.name=this.constructor.name}};function isToStringedArrayType(e){return e===`[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]`}function printNumber(e){return Object.is(e,-0)?`-0`:String(e)}function printBigInt(e){return String(`${e}n`)}function printFunction(e,t){return t?`[Function ${e.name||`anonymous`}]`:`[Function]`}function printSymbol(e){return String(e).replace(ce,`Symbol($1)`)}function printError(e){return`[${oe.call(e)}]`}function printBasicValue(e,t,r,o){if(e===!0||e===!1)return`${e}`;if(e===void 0)return`undefined`;if(e===null)return`null`;let s=typeof e;if(s===`number`)return printNumber(e);if(s===`bigint`)return printBigInt(e);if(s===`string`)return o?`"${e.replaceAll(/"|\\/g,`\\$&`)}"`:`"${e}"`;if(s===`function`)return printFunction(e,t);if(s===`symbol`)return printSymbol(e);let c=ie.call(e);return c===`[object WeakMap]`?`WeakMap {}`:c===`[object WeakSet]`?`WeakSet {}`:c===`[object Function]`||c===`[object GeneratorFunction]`?printFunction(e,t):c===`[object Symbol]`?printSymbol(e):c===`[object Date]`?Number.isNaN(+e)?`Date { NaN }`:ae.call(e):c===`[object Error]`?printError(e):c===`[object RegExp]`?r?se.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,`\\$&`):se.call(e):e instanceof Error?printError(e):null}function printComplexValue(e,t,r,o,s,c){if(s.includes(e))return`[Circular]`;s=[...s],s.push(e);let u=++o>t.maxDepth,d=t.min;if(t.callToJSON&&!u&&e.toJSON&&typeof e.toJSON==`function`&&!c)return printer(e.toJSON(),t,r,o,s,!0);let p=ie.call(e);return p===`[object Arguments]`?u?`[Arguments]`:`${d?``:`Arguments `}[${printListItems(e,t,r,o,s,printer)}]`:isToStringedArrayType(p)?u?`[${e.constructor.name}]`:`${d||!t.printBasicPrototype&&e.constructor.name===`Array`?``:`${e.constructor.name} `}[${printListItems(e,t,r,o,s,printer)}]`:p===`[object Map]`?u?`[Map]`:`Map {${printIteratorEntries(e.entries(),t,r,o,s,printer,` => `)}}`:p===`[object Set]`?u?`[Set]`:`Set {${printIteratorValues(e.values(),t,r,o,s,printer)}}`:u||isWindow(e)?`[${getConstructorName$1(e)}]`:`${d||!t.printBasicPrototype&&getConstructorName$1(e)===`Object`?``:`${getConstructorName$1(e)} `}{${printObjectProperties(e,t,r,o,s,printer)}}`}const ue={test:e=>e&&e instanceof Error,serialize(e,t,r,o,s,c){if(s.includes(e))return`[Circular]`;s=[...s,e];let u=++o>t.maxDepth,{message:d,cause:p,...m}=e,h={message:d,...p===void 0?{}:{cause:p},...e instanceof AggregateError?{errors:e.errors}:{},...m},g=e.name===`Error`?getConstructorName$1(e):e.name;return u?`[${g}]`:`${g} {${printIteratorEntries(Object.entries(h).values(),t,r,o,s,c)}}`}};function isNewPlugin(e){return e.serialize!=null}function printPlugin(e,t,r,o,s,c){let u;try{u=isNewPlugin(e)?e.serialize(t,r,o,s,c,printer):e.print(t,e=>printer(e,r,o,s,c),e=>{let t=o+r.indent;return t+e.replaceAll(le,`\n${t}`)},{edgeSpacing:r.spacingOuter,min:r.min,spacing:r.spacingInner},r.colors)}catch(e){throw new PrettyFormatPluginError(e.message,e.stack)}if(typeof u!=`string`)throw TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof u}".`);return u}function findPlugin(e,t){for(let r of e)try{if(r.test(t))return r}catch(e){throw new PrettyFormatPluginError(e.message,e.stack)}return null}function printer(e,t,r,o,s,c){let u,d=findPlugin(t.plugins,e);if(d!==null)u=printPlugin(d,e,t,r,o,s);else{let d=printBasicValue(e,t.printFunctionName,t.escapeRegex,t.escapeString);u=d===null?printComplexValue(e,t,r,o,s,c):d}return t._outputLengthPerDepth[o]??=0,t._outputLengthPerDepth[o]+=u.length,t._outputLengthPerDepth[o]>t.maxOutputLength&&(t.maxDepth=0),u}const de={comment:`gray`,content:`reset`,prop:`yellow`,tag:`cyan`,value:`green`},fe=Object.keys(de),M={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,maxOutputLength:1e6,maxWidth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:de};function validateOptions(e){for(let t of Object.keys(e))if(!Object.hasOwn(M,t))throw Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw Error(`pretty-format: Options "min" and "indent" cannot be used together.`)}function getColorsHighlight(){return fe.reduce((e,t)=>{let r=de[t],s=r&&o[r];if(s&&typeof s.close==`string`&&typeof s.open==`string`)e[t]=s;else throw Error(`pretty-format: Option "theme" has a key "${t}" whose value "${r}" is undefined in ansi-styles.`);return e},Object.create(null))}function getColorsEmpty(){return fe.reduce((e,t)=>(e[t]={close:``,open:``},e),Object.create(null))}function getPrintFunctionName(e){return e?.printFunctionName??M.printFunctionName}function getEscapeRegex(e){return e?.escapeRegex??M.escapeRegex}function getEscapeString(e){return e?.escapeString??M.escapeString}function getConfig(e){return{callToJSON:e?.callToJSON??M.callToJSON,colors:e?.highlight?getColorsHighlight():getColorsEmpty(),compareKeys:typeof e?.compareKeys==`function`||e?.compareKeys===null?e.compareKeys:M.compareKeys,escapeRegex:getEscapeRegex(e),escapeString:getEscapeString(e),indent:e?.min?``:createIndent(e?.indent??M.indent),maxDepth:e?.maxDepth??M.maxDepth,maxWidth:e?.maxWidth??M.maxWidth,min:e?.min??M.min,plugins:e?.plugins??M.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:getPrintFunctionName(e),printShadowRoot:e?.printShadowRoot??!0,spacingInner:e?.min?` `:`
3
23
  `,spacingOuter:e?.min?``:`
4
- `,maxOutputLength:e?.maxOutputLength??j.maxOutputLength,_outputLengthPerDepth:[]}}function createIndent(e){return Array.from({length:e+1}).join(` `)}function format$1(e,t){if(t&&(validateOptions(t),t.plugins)){let r=findPlugin(t.plugins,e);if(r!==null)return printPlugin(r,e,getConfig(t),``,0,[])}let r=printBasicValue(e,getPrintFunctionName(t),getEscapeRegex(t),getEscapeString(t));return r===null?printComplexValue(e,getConfig(t),``,0,[]):r}e(format$1,`format`);const me={AsymmetricMatcher:c,DOMCollection:p,DOMElement:h,Immutable:_,ReactElement:ne,ReactTestComponent:ie,Error:de},he={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`]},ge={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`};function colorise$1(e,t){let r=he[ge[t]]||he[t]||``;return r?`\u001b[${r[0]}m${String(e)}\u001b[${r[1]}m`:String(e)}e(colorise$1,`colorise`);function normaliseOptions$1({showHidden:e=!1,depth:t=2,colors:r=!1,customInspect:o=!0,showProxy:s=!1,maxArrayLength:c=1/0,breakLength:u=1/0,seen:d=[],truncate:p=1/0,stylize:m=String}={},h){let g={showHidden:!!e,depth:Number(t),colors:!!r,customInspect:!!o,showProxy:!!s,maxArrayLength:Number(c),breakLength:Number(u),truncate:Number(p),seen:d,inspect:h,stylize:m};return g.colors&&(g.stylize=colorise$1),g}e(normaliseOptions$1,`normaliseOptions`);function isHighSurrogate$1(e){return e>=`\ud800`&&e<=`\udbff`}e(isHighSurrogate$1,`isHighSurrogate`);function truncate$1(e,t,r=`…`){e=String(e);let o=r.length,s=e.length;if(o>t&&s>o)return r;if(s>t&&s>o){let s=t-o;return s>0&&isHighSurrogate$1(e[s-1])&&--s,`${e.slice(0,s)}${r}`}return e}e(truncate$1,`truncate`);function inspectList$1(e,t,r,o=`, `){r||=t.inspect;let s=e.length;if(s===0)return``;let c=t.truncate,u=``,d=``,p=``;for(let m=0;m<s;m+=1){let s=m+1===e.length,h=m+2===e.length;p=`…(${e.length-m})`;let g=e[m];t.truncate=c-u.length-(s?0:o.length);let _=d||r(g,t)+(s?``:o),y=u.length+_.length,b=y+p.length;if(s&&y>c&&u.length+p.length<=c||!s&&!h&&b>c||(d=s?``:r(e[m+1],t)+(h?``:o),!s&&h&&b>c&&y+d.length>c))break;if(u+=_,!s&&!h&&y+d.length>=c){p=`…(${e.length-m-1})`;break}p=``}return`${u}${p}`}e(inspectList$1,`inspectList`);function quoteComplexKey$1(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`)}e(quoteComplexKey$1,`quoteComplexKey`);function inspectProperty$1([e,t],r){return r.truncate-=2,typeof e==`string`?e=quoteComplexKey$1(e):typeof e!=`number`&&(e=`[${r.inspect(e,r)}]`),r.truncate-=e.length,t=r.inspect(t,r),`${e}: ${t}`}e(inspectProperty$1,`inspectProperty`);function inspectArray$1(e,t){let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`[]`;t.truncate-=4;let o=inspectList$1(e,t);t.truncate-=o.length;let s=``;return r.length&&(s=inspectList$1(r.map(t=>[t,e[t]]),t,inspectProperty$1)),`[ ${o}${s?`, ${s}`:``} ]`}e(inspectArray$1,`inspectArray`);const _e=e(e=>typeof Buffer==`function`&&e instanceof Buffer?`Buffer`:e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,`getArrayName`);function inspectTypedArray$1(e,t){let r=_e(e);t.truncate-=r.length+4;let o=Object.keys(e).slice(e.length);if(!e.length&&!o.length)return`${r}[]`;let s=``;for(let r=0;r<e.length;r++){let o=`${t.stylize(truncate$1(e[r],t.truncate),`number`)}${r===e.length-1?``:`, `}`;if(t.truncate-=o.length,e[r]!==e.length&&t.truncate<=3){s+=`…(${e.length-e[r]+1})`;break}s+=o}let c=``;return o.length&&(c=inspectList$1(o.map(t=>[t,e[t]]),t,inspectProperty$1)),`${r}[ ${s}${c?`, ${c}`:``} ]`}e(inspectTypedArray$1,`inspectTypedArray`);function inspectDate$1(e,t){let r=e.toJSON();if(r===null)return`Invalid Date`;let o=r.split(`T`),s=o[0];return t.stylize(`${s}T${truncate$1(o[1],t.truncate-s.length-1)}`,`date`)}e(inspectDate$1,`inspectDate`);function inspectFunction$1(e,t){let r=e[Symbol.toStringTag]||`Function`,o=e.name;return o?t.stylize(`[${r} ${truncate$1(o,t.truncate-11)}]`,`special`):t.stylize(`[${r}]`,`special`)}e(inspectFunction$1,`inspectFunction`);function inspectMapEntry$1([e,t],r){return r.truncate-=4,e=r.inspect(e,r),r.truncate-=e.length,t=r.inspect(t,r),`${e} => ${t}`}e(inspectMapEntry$1,`inspectMapEntry`);function mapToEntries$1(e){let t=[];return e.forEach((e,r)=>{t.push([r,e])}),t}e(mapToEntries$1,`mapToEntries`);function inspectMap$1(e,t){return e.size===0?`Map{}`:(t.truncate-=7,`Map{ ${inspectList$1(mapToEntries$1(e),t,inspectMapEntry$1)} }`)}e(inspectMap$1,`inspectMap`);const ve=Number.isNaN||(e=>e!==e);function inspectNumber$1(e,t){return ve(e)?t.stylize(`NaN`,`number`):e===1/0?t.stylize(`Infinity`,`number`):e===-1/0?t.stylize(`-Infinity`,`number`):e===0?t.stylize(1/e==1/0?`+0`:`-0`,`number`):t.stylize(truncate$1(String(e),t.truncate),`number`)}e(inspectNumber$1,`inspectNumber`);function inspectBigInt$1(e,t){let r=truncate$1(e.toString(),t.truncate-1);return r!==`…`&&(r+=`n`),t.stylize(r,`bigint`)}e(inspectBigInt$1,`inspectBigInt`);function inspectRegExp$1(e,t){let r=e.toString().split(`/`)[2],o=t.truncate-(2+r.length),s=e.source;return t.stylize(`/${truncate$1(s,o)}/${r}`,`regexp`)}e(inspectRegExp$1,`inspectRegExp`);function arrayFromSet$1(e){let t=[];return e.forEach(e=>{t.push(e)}),t}e(arrayFromSet$1,`arrayFromSet`);function inspectSet$1(e,t){return e.size===0?`Set{}`:(t.truncate-=7,`Set{ ${inspectList$1(arrayFromSet$1(e),t)} }`)}e(inspectSet$1,`inspectSet`);const ye=RegExp(`['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]`,`g`),be={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,"'":`\\'`,"\\":`\\\\`};function escape$1(e){return be[e]||`\\u${`0000${e.charCodeAt(0).toString(16)}`.slice(-4)}`}e(escape$1,`escape`);function inspectString$1(e,t){return ye.test(e)&&(e=e.replace(ye,escape$1)),t.stylize(`'${truncate$1(e,t.truncate-2)}'`,`string`)}e(inspectString$1,`inspectString`);function inspectSymbol$1(e){return`description`in Symbol.prototype?e.description?`Symbol(${e.description})`:`Symbol()`:e.toString()}e(inspectSymbol$1,`inspectSymbol`);const getPromiseValue=()=>`Promise{…}`;function inspectObject$1(e,t){let r=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(r.length===0&&o.length===0)return`{}`;if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let s=inspectList$1(r.map(t=>[t,e[t]]),t,inspectProperty$1),c=inspectList$1(o.map(t=>[t,e[t]]),t,inspectProperty$1);t.seen.pop();let u=``;return s&&c&&(u=`, `),`{ ${s}${u}${c} }`}const xe=typeof Symbol<`u`&&Symbol.toStringTag?Symbol.toStringTag:!1;function inspectClass$1(e,t){let r=``;return xe&&xe in e&&(r=e[xe]),r||=e.constructor.name,(!r||r===`_class`)&&(r=`<Anonymous Class>`),t.truncate-=r.length,`${r}${inspectObject$1(e,t)}`}e(inspectClass$1,`inspectClass`);function inspectArguments$1(e,t){return e.length===0?`Arguments[]`:(t.truncate-=13,`Arguments[ ${inspectList$1(e,t)} ]`)}e(inspectArguments$1,`inspectArguments`);const Se=[`stack`,`line`,`column`,`name`,`message`,`fileName`,`lineNumber`,`columnNumber`,`number`,`description`,`cause`];function inspectObject$2(e,t){let r=Object.getOwnPropertyNames(e).filter(e=>Se.indexOf(e)===-1),o=e.name;t.truncate-=o.length;let s=``;if(typeof e.message==`string`?s=truncate$1(e.message,t.truncate):r.unshift(`message`),s=s?`: ${s}`:``,t.truncate-=s.length+5,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let c=inspectList$1(r.map(t=>[t,e[t]]),t,inspectProperty$1);return`${o}${s}${c?` { ${c} }`:``}`}e(inspectObject$2,`inspectObject`);function inspectAttribute$1([e,t],r){return r.truncate-=3,t?`${r.stylize(String(e),`yellow`)}=${r.stylize(`"${t}"`,`string`)}`:`${r.stylize(String(e),`yellow`)}`}e(inspectAttribute$1,`inspectAttribute`);function inspectNodeCollection$1(e,t){return inspectList$1(e,t,inspectNode$1,`
5
- `)}e(inspectNodeCollection$1,`inspectNodeCollection`);function inspectNode$1(e,t){switch(e.nodeType){case 1:return inspectHTML$1(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}e(inspectNode$1,`inspectNode`);function inspectHTML$1(e,t){let r=e.getAttributeNames(),o=e.tagName.toLowerCase(),s=t.stylize(`<${o}`,`special`),c=t.stylize(`>`,`special`),u=t.stylize(`</${o}>`,`special`);t.truncate-=o.length*2+5;let d=``;r.length>0&&(d+=` `,d+=inspectList$1(r.map(t=>[t,e.getAttribute(t)]),t,inspectAttribute$1,` `)),t.truncate-=d.length;let p=t.truncate,m=inspectNodeCollection$1(e.children,t);return m&&m.length>p&&(m=`…(${e.children.length})`),`${s}${d}${c}${m}${u}`}e(inspectHTML$1,`inspectHTML`);const Ce=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`chai/inspect`):`@@chai/inspect`,we=Symbol.for(`nodejs.util.inspect.custom`),Te=new WeakMap,Ee={},De={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:inspectNumber$1,Number:inspectNumber$1,bigint:inspectBigInt$1,BigInt:inspectBigInt$1,string:inspectString$1,String:inspectString$1,function:inspectFunction$1,Function:inspectFunction$1,symbol:inspectSymbol$1,Symbol:inspectSymbol$1,Array:inspectArray$1,Date:inspectDate$1,Map:inspectMap$1,Set:inspectSet$1,RegExp:inspectRegExp$1,Promise:getPromiseValue,WeakSet:(e,t)=>t.stylize(`WeakSet{…}`,`special`),WeakMap:(e,t)=>t.stylize(`WeakMap{…}`,`special`),Arguments:inspectArguments$1,Int8Array:inspectTypedArray$1,Uint8Array:inspectTypedArray$1,Uint8ClampedArray:inspectTypedArray$1,Int16Array:inspectTypedArray$1,Uint16Array:inspectTypedArray$1,Int32Array:inspectTypedArray$1,Uint32Array:inspectTypedArray$1,Float32Array:inspectTypedArray$1,Float64Array:inspectTypedArray$1,Generator:()=>``,DataView:()=>``,ArrayBuffer:()=>``,Error:inspectObject$2,HTMLCollection:inspectNodeCollection$1,NodeList:inspectNodeCollection$1},Oe=e((e,t,r,o)=>Ce in e&&typeof e[Ce]==`function`?e[Ce](t):we in e&&typeof e[we]==`function`?e[we](t.depth,t,o):`inspect`in e&&typeof e.inspect==`function`?e.inspect(t.depth,t):`constructor`in e&&Te.has(e.constructor)?Te.get(e.constructor)(e,t):Ee[r]?Ee[r](e,t):``,`inspectCustom`),ke=Object.prototype.toString;function inspect$1(e,t={}){let r=normaliseOptions$1(t,inspect$1),{customInspect:o}=r,s=e===null?`null`:typeof e;if(s===`object`&&(s=ke.call(e).slice(8,-1)),s in De)return De[s](e,r);if(o&&e){let t=Oe(e,r,s,inspect$1);if(t)return typeof t==`string`?t:inspect$1(t,r)}let c=e?Object.getPrototypeOf(e):!1;return c===Object.prototype||c===null?inspectObject$1(e,r):e&&typeof HTMLElement==`function`&&e instanceof HTMLElement?inspectHTML$1(e,r):`constructor`in e?e.constructor===Object?inspectObject$1(e,r):inspectClass$1(e,r):e===Object(e)?inspectObject$1(e,r):r.stylize(String(e),s)}const{AsymmetricMatcher:Ae,DOMCollection:je,DOMElement:Me,Immutable:Ne,ReactElement:Pe,ReactTestComponent:Fe}=me,Ie=[Fe,Pe,Me,je,Ne,Ae];function stringify(e,t=10,{maxLength:r,filterNode:o,...s}={}){let c=r??1e4,u,d=typeof o==`string`?createNodeFilterFromSelector(o):o,p=d?[Fe,Pe,createDOMElementFilter(d),je,Ne,Ae]:Ie;try{u=format$1(e,{maxDepth:t,escapeString:!1,plugins:p,...s})}catch{u=format$1(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:p,...s})}return u.length>=c&&t>1?stringify(e,Math.floor(Math.min(t,2**53-1)/2),{maxLength:r,filterNode:o,...s}):u}function createNodeFilterFromSelector(e){return t=>{if(t.nodeType===8)return!1;if(t.nodeType===1&&t.matches)try{return!t.matches(e)}catch{return!0}return!0}}const Le=/%[sdjifoOc%]/g;function baseFormat(e,t={}){let formatArg=(e,r)=>t.prettifyObject?stringify(e,void 0,{printBasicPrototype:!1,escapeString:!1}):inspect$2(e,r);if(typeof e[0]!=`string`){let t=[];for(let r=0;r<e.length;r++)t.push(formatArg(e[r],{depth:0,colors:!1}));return t.join(` `)}let r=e.length,o=1,s=e[0],c=String(s).replace(Le,t=>{if(t===`%%`)return`%`;if(o>=r)return t;switch(t){case`%s`:{let t=e[o++];return typeof t==`bigint`?`${t.toString()}n`:typeof t==`number`&&t===0&&1/t<0?`-0`:typeof t==`object`&&t?typeof t.toString==`function`&&t.toString!==Object.prototype.toString?t.toString():formatArg(t,{depth:0,colors:!1}):String(t)}case`%d`:{let t=e[o++];return typeof t==`bigint`?`${t.toString()}n`:typeof t==`symbol`?`NaN`:Number(t).toString()}case`%i`:{let t=e[o++];return typeof t==`bigint`?`${t.toString()}n`:Number.parseInt(String(t)).toString()}case`%f`:return Number.parseFloat(String(e[o++])).toString();case`%o`:return formatArg(e[o++],{showHidden:!0,showProxy:!0});case`%O`:return formatArg(e[o++]);case`%c`:return o++,``;case`%j`:try{return JSON.stringify(e[o++])}catch(e){let t=e.message;if(t.includes(`circular structure`)||t.includes(`cyclic structures`)||t.includes(`cyclic object`))return`[Circular]`;throw e}default:return t}});for(let t=e[o];o<r;t=e[++o])typeof t!=`object`||!t?c+=` ${typeof t==`symbol`?t.toString():t}`:c+=` ${formatArg(t)}`;return c}function format(...e){return baseFormat(e)}function inspect$2(e,t={}){return t.truncate===0&&(t.truncate=1/0),inspect$1(e,t)}e(inspect$2,`inspect`);function objDisplay$1(e,t={}){t.truncate===void 0&&(t.truncate=40);let r=inspect$2(e,t),o=Object.prototype.toString.call(e);if(t.truncate&&r.length>=t.truncate)if(o===`[object Function]`){let t=e;return t.name?`[Function: ${t.name}]`:`[Function]`}else if(o===`[object Array]`)return`[ Array(${e.length}) ]`;else if(o===`[object Object]`){let t=Object.keys(e);return`{ Object (${t.length>2?`${t.splice(0,2).join(`, `)}, ...`:t.join(`, `)}) }`}else return r;return r}e(objDisplay$1,`objDisplay`);function createSimpleStackTrace(e){let{message:t=`$$stack trace error`,stackTraceLimit:r=1}=e||{},o=Error.stackTraceLimit,s=Error.prepareStackTrace;Error.stackTraceLimit=r,Error.prepareStackTrace=e=>e.stack;let c=Error(t).stack||``;return Error.prepareStackTrace=s,Error.stackTraceLimit=o,c}function notNullish(e){return e!=null}function assertTypes(e,t,r){let o=typeof e;if(!r.includes(o))throw TypeError(`${t} value must be ${r.join(` or `)}, received "${o}"`)}function isPrimitive$1(e){return e===null||typeof e!=`function`&&typeof e!=`object`}e(isPrimitive$1,`isPrimitive`);function filterOutComments(e){let t=[],r=`none`;for(let o=0;o<e.length;++o)r===`singleline`?e[o]===`
6
- `&&(r=`none`):r===`multiline`?e[o-1]===`*`&&e[o]===`/`&&(r=`none`):r===`none`&&(e[o]===`/`&&e[o+1]===`/`?r=`singleline`:e[o]===`/`&&e[o+1]===`*`?(r=`multiline`,o+=2):t.push(e[o]));return t.join(``)}function toArray(e){return e??=[],Array.isArray(e)?e:[e]}function isObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function isFinalObj(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function getType$1(e){return Object.prototype.toString.apply(e).slice(8,-1)}e(getType$1,`getType`);function collectOwnProperties(e,t){let r=typeof t==`function`?t:e=>t.add(e);Object.getOwnPropertyNames(e).forEach(r),Object.getOwnPropertySymbols(e).forEach(r)}function getOwnProperties(e){let t=new Set;return isFinalObj(e)?[]:(collectOwnProperties(e,t),Array.from(t))}const Re={forceWritable:!1};function deepClone(e,t=Re){return clone(e,new WeakMap,t)}function clone(e,t,r=Re){let o,s;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(s=Array.from({length:o=e.length}),t.set(e,s);o--;)s[o]=clone(e[o],t,r);return s}if(Object.prototype.toString.call(e)===`[object Object]`){s=Object.create(Object.getPrototypeOf(e)),t.set(e,s);let o=getOwnProperties(e);for(let c of o){let o=Object.getOwnPropertyDescriptor(e,c);if(!o)continue;let u=clone(e[c],t,r);r.forceWritable?Object.defineProperty(s,c,{enumerable:o.enumerable,configurable:!0,writable:!0,value:u}):`get`in o?Object.defineProperty(s,c,{...o,get(){return u}}):Object.defineProperty(s,c,{...o,value:u})}return s}return e}function noop(){}function objectAttr(e,t,r=void 0){let o=t.replace(/\[(\d+)\]/g,`.$1`).split(`.`),s=e;for(let e of o)if(s=new Object(s)[e],s===void 0)return r;return s}function createDefer(){let e=null,t=null,r=new Promise((r,o)=>{e=r,t=o});return r.resolve=e,r.reject=t,r}function getCallLastIndex(e){let t=-1,r=null,o=0,s=0,c=null;for(;t<=e.length;){c=e[t],t++;let u=e[t];if((u===`"`||u===`'`||u==="`")&&c!==`\\`&&(r===u?r=null:r||=u),r||(u===`(`&&o++,u===`)`&&s++),o&&s&&o===s)return t}return null}function isNegativeNaN(e){if(!Number.isNaN(e))return!1;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31==1}function ordinal(e){let t=e%10,r=e%100;return t===1&&r!==11?`${e}st`:t===2&&r!==12?`${e}nd`:t===3&&r!==13?`${e}rd`:`${e}th`}function unique(e){return Array.from(new Set(e))}var Diff=class{0;1;constructor(e,t){this[0]=e,this[1]=t}};function diff_commonPrefix(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let r=0,o=Math.min(e.length,t.length),s=o,c=0;for(;r<s;)e.substring(c,s)===t.substring(c,s)?(r=s,c=r):o=s,s=Math.floor((o-r)/2+r);return s}function diff_commonSuffix(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let r=0,o=Math.min(e.length,t.length),s=o,c=0;for(;r<s;)e.substring(e.length-s,e.length-c)===t.substring(t.length-s,t.length-c)?(r=s,c=r):o=s,s=Math.floor((o-r)/2+r);return s}function diff_commonOverlap_(e,t){let r=e.length,o=t.length;if(r===0||o===0)return 0;r>o?e=e.substring(r-o):r<o&&(t=t.substring(0,r));let s=Math.min(r,o);if(e===t)return s;let c=0,u=1;for(;;){let r=e.substring(s-u),o=t.indexOf(r);if(o===-1)return c;u+=o,(o===0||e.substring(s-u)===t.substring(0,u))&&(c=u,u++)}}function diff_cleanupSemantic(e){let t=!1,r=[],o=0,s=null,c=0,u=0,d=0,p=0,m=0;for(;c<e.length;)e[c][0]===0?(r[o++]=c,u=p,d=m,p=0,m=0,s=e[c][1]):(e[c][0]===1?p+=e[c][1].length:m+=e[c][1].length,s&&s.length<=Math.max(u,d)&&s.length<=Math.max(p,m)&&(e.splice(r[o-1],0,new Diff(-1,s)),e[r[o-1]+1][0]=1,o--,o--,c=o>0?r[o-1]:-1,u=0,d=0,p=0,m=0,s=null,t=!0)),c++;for(t&&diff_cleanupMerge(e),diff_cleanupSemanticLossless(e),c=1;c<e.length;){if(e[c-1][0]===-1&&e[c][0]===1){let t=e[c-1][1],r=e[c][1],o=diff_commonOverlap_(t,r),s=diff_commonOverlap_(r,t);o>=s?(o>=t.length/2||o>=r.length/2)&&(e.splice(c,0,new Diff(0,r.substring(0,o))),e[c-1][1]=t.substring(0,t.length-o),e[c+1][1]=r.substring(o),c++):(s>=t.length/2||s>=r.length/2)&&(e.splice(c,0,new Diff(0,t.substring(0,s))),e[c-1][0]=1,e[c-1][1]=r.substring(0,r.length-s),e[c+1][0]=-1,e[c+1][1]=t.substring(s),c++),c++}c++}}const ze=/[^a-z0-9]/i,Be=/\s/,Ve=/[\r\n]/,He=/\n\r?\n$/,Ue=/^\r?\n\r?\n/;function diff_cleanupSemanticLossless(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===0&&e[t+1][0]===0){let r=e[t-1][1],o=e[t][1],s=e[t+1][1],c=diff_commonSuffix(r,o);if(c){let e=o.substring(o.length-c);r=r.substring(0,r.length-c),o=e+o.substring(0,o.length-c),s=e+s}let u=r,d=o,p=s,m=diff_cleanupSemanticScore_(r,o)+diff_cleanupSemanticScore_(o,s);for(;o.charAt(0)===s.charAt(0);){r+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);let e=diff_cleanupSemanticScore_(r,o)+diff_cleanupSemanticScore_(o,s);e>=m&&(m=e,u=r,d=o,p=s)}e[t-1][1]!==u&&(u?e[t-1][1]=u:(e.splice(t-1,1),t--),e[t][1]=d,p?e[t+1][1]=p:(e.splice(t+1,1),t--))}t++}}function diff_cleanupMerge(e){e.push(new Diff(0,``));let t=0,r=0,o=0,s=``,c=``,u;for(;t<e.length;)switch(e[t][0]){case 1:o++,c+=e[t][1],t++;break;case-1:r++,s+=e[t][1],t++;break;case 0:r+o>1?(r!==0&&o!==0&&(u=diff_commonPrefix(c,s),u!==0&&(t-r-o>0&&e[t-r-o-1][0]===0?e[t-r-o-1][1]+=c.substring(0,u):(e.splice(0,0,new Diff(0,c.substring(0,u))),t++),c=c.substring(u),s=s.substring(u)),u=diff_commonSuffix(c,s),u!==0&&(e[t][1]=c.substring(c.length-u)+e[t][1],c=c.substring(0,c.length-u),s=s.substring(0,s.length-u))),t-=r+o,e.splice(t,r+o),s.length&&(e.splice(t,0,new Diff(-1,s)),t++),c.length&&(e.splice(t,0,new Diff(1,c)),t++),t++):t!==0&&e[t-1][0]===0?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,o=0,r=0,s=``,c=``;break}e.at(-1)?.[1]===``&&e.pop();let d=!1;for(t=1;t<e.length-1;)e[t-1][0]===0&&e[t+1][0]===0&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&diff_cleanupMerge(e)}function diff_cleanupSemanticScore_(e,t){if(!e||!t)return 6;let r=e.charAt(e.length-1),o=t.charAt(0),s=r.match(ze),c=o.match(ze),u=s&&r.match(Be),d=c&&o.match(Be),p=u&&r.match(Ve),m=d&&o.match(Ve),h=p&&e.match(He),g=m&&t.match(Ue);return h||g?5:p||m?4:s&&!u&&d?3:u||d?2:s||c?1:0}const We=`Compared values have no visual difference.`;function getDefaultExportFromCjs$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}e(getDefaultExportFromCjs$1,`getDefaultExportFromCjs`);var Ge={},Ke;function requireBuild(){if(Ke)return Ge;Ke=1,Object.defineProperty(Ge,`__esModule`,{value:!0}),Ge.default=diffSequence;let e=`diff-sequences`,countCommonItemsF=(e,t,r,o,s)=>{let c=0;for(;e<t&&r<o&&s(e,r);)e+=1,r+=1,c+=1;return c},countCommonItemsR=(e,t,r,o,s)=>{let c=0;for(;e<=t&&r<=o&&s(t,o);)--t,--o,c+=1;return c},extendPathsF=(e,t,r,o,s,c,u)=>{let d=0,p=-e,m=c[d],h=m;c[d]+=countCommonItemsF(m+1,t,o+m-p+1,r,s);let g=e<u?e:u;for(d+=1,p+=2;d<=g;d+=1,p+=2){if(d!==e&&h<c[d])m=c[d];else if(m=h+1,t<=m)return d-1;h=c[d],c[d]=m+countCommonItemsF(m+1,t,o+m-p+1,r,s)}return u},extendPathsR=(e,t,r,o,s,c,u)=>{let d=0,p=e,m=c[d],h=m;c[d]-=countCommonItemsR(t,m-1,r,o+m-p-1,s);let g=e<u?e:u;for(d+=1,p-=2;d<=g;d+=1,p-=2){if(d!==e&&c[d]<h)m=c[d];else if(m=h-1,m<t)return d-1;h=c[d],c[d]=m-countCommonItemsR(t,m-1,r,o+m-p-1,s)}return u},extendOverlappablePathsF=(e,t,r,o,s,c,u,d,p,m,h)=>{let g=o-t,_=r-t,y=s-o-_,b=-y-(e-1),x=-y+(e-1),S=0,w=e<d?e:d;for(let d=0,_=-e;d<=w;d+=1,_+=2){let w=d===0||d!==e&&S<u[d],T=w?u[d]:S,E=w?T:T+1,D=g+E-_,O=countCommonItemsF(E+1,r,D+1,s,c),k=E+O;if(S=u[d],u[d]=k,b<=_&&_<=x){let u=(e-1-(_+y))/2;if(u<=m&&p[u]-1<=k){let u=g+T-(w?_+1:_-1),d=countCommonItemsR(t,T,o,u,c),p=T-d,m=u-d,y=p+1,b=m+1;h.nChangePreceding=e-1,e-1===y+b-t-o?(h.aEndPreceding=t,h.bEndPreceding=o):(h.aEndPreceding=y,h.bEndPreceding=b),h.nCommonPreceding=d,d!==0&&(h.aCommonPreceding=y,h.bCommonPreceding=b),h.nCommonFollowing=O,O!==0&&(h.aCommonFollowing=E+1,h.bCommonFollowing=D+1);let x=k+1,S=D+O+1;return h.nChangeFollowing=e-1,e-1===r+s-x-S?(h.aStartFollowing=r,h.bStartFollowing=s):(h.aStartFollowing=x,h.bStartFollowing=S),!0}}}return!1},extendOverlappablePathsR=(e,t,r,o,s,c,u,d,p,m,h)=>{let g=s-r,_=r-t,y=s-o-_,b=y-e,x=y+e,S=0,w=e<m?e:m;for(let m=0,_=e;m<=w;m+=1,_-=2){let w=m===0||m!==e&&p[m]<S,T=w?p[m]:S,E=w?T:T-1,D=g+E-_,O=countCommonItemsR(t,E-1,o,D-1,c),k=E-O;if(S=p[m],p[m]=k,b<=_&&_<=x){let p=(e+(_-y))/2;if(p<=d&&k-1<=u[p]){let u=D-O;if(h.nChangePreceding=e,e===k+u-t-o?(h.aEndPreceding=t,h.bEndPreceding=o):(h.aEndPreceding=k,h.bEndPreceding=u),h.nCommonPreceding=O,O!==0&&(h.aCommonPreceding=k,h.bCommonPreceding=u),h.nChangeFollowing=e-1,e===1)h.nCommonFollowing=0,h.aStartFollowing=r,h.bStartFollowing=s;else{let t=g+T-(w?_-1:_+1),o=countCommonItemsF(T,r,t,s,c);h.nCommonFollowing=o,o!==0&&(h.aCommonFollowing=T,h.bCommonFollowing=t);let u=T+o,d=t+o;e-1===r+s-u-d?(h.aStartFollowing=r,h.bStartFollowing=s):(h.aStartFollowing=u,h.bStartFollowing=d)}return!0}}}return!1},divide=(t,r,o,s,c,u,d,p,m)=>{let h=s-r,g=c-o,_=o-r,y=c-s,b=y-_,x=_,S=_;if(d[0]=r-1,p[0]=o,b%2==0){let e=(t||b)/2,w=(_+y)/2;for(let t=1;t<=w;t+=1)if(x=extendPathsF(t,o,c,h,u,d,x),t<e)S=extendPathsR(t,r,s,g,u,p,S);else if(extendOverlappablePathsR(t,r,o,s,c,u,d,x,p,S,m))return}else{let e=((t||b)+1)/2,w=(_+y+1)/2,T=1;for(x=extendPathsF(T,o,c,h,u,d,x),T+=1;T<=w;T+=1)if(S=extendPathsR(T-1,r,s,g,u,p,S),T<e)x=extendPathsF(T,o,c,h,u,d,x);else if(extendOverlappablePathsF(T,r,o,s,c,u,d,x,p,S,m))return}throw Error(`${e}: no overlap aStart=${r} aEnd=${o} bStart=${s} bEnd=${c}`)},findSubsequences=(e,t,r,o,s,c,u,d,p,m)=>{if(s-o<r-t){if(c=!c,c&&u.length===1){let{foundSubsequence:e,isCommon:t}=u[0];u[1]={foundSubsequence:(t,r,o)=>{e(t,o,r)},isCommon:(e,r)=>t(r,e)}}let e=t,d=r;t=o,r=s,o=e,s=d}let{foundSubsequence:h,isCommon:g}=u[+!!c];divide(e,t,r,o,s,g,d,p,m);let{nChangePreceding:_,aEndPreceding:y,bEndPreceding:b,nCommonPreceding:x,aCommonPreceding:S,bCommonPreceding:w,nCommonFollowing:T,aCommonFollowing:E,bCommonFollowing:D,nChangeFollowing:O,aStartFollowing:k,bStartFollowing:ee}=m;t<y&&o<b&&findSubsequences(_,t,y,o,b,c,u,d,p,m),x!==0&&h(x,S,w),T!==0&&h(T,E,D),k<r&&ee<s&&findSubsequences(O,k,r,ee,s,c,u,d,p,m)},validateLength=(t,r)=>{if(typeof r!=`number`)throw TypeError(`${e}: ${t} typeof ${typeof r} is not a number`);if(!Number.isSafeInteger(r))throw RangeError(`${e}: ${t} value ${r} is not a safe integer`);if(r<0)throw RangeError(`${e}: ${t} value ${r} is a negative integer`)},validateCallback=(t,r)=>{let o=typeof r;if(o!==`function`)throw TypeError(`${e}: ${t} typeof ${o} is not a function`)};function diffSequence(e,t,r,o){validateLength(`aLength`,e),validateLength(`bLength`,t),validateCallback(`isCommon`,r),validateCallback(`foundSubsequence`,o);let s=countCommonItemsF(0,e,0,t,r);if(s!==0&&o(s,0,0),e!==s||t!==s){let c=s,u=s,d=countCommonItemsR(c,e-1,u,t-1,r),p=e-d,m=t-d,h=s+d;e!==h&&t!==h&&findSubsequences(0,c,p,u,m,!1,[{foundSubsequence:o,isCommon:r}],[0],[0],{aCommonFollowing:0,aCommonPreceding:0,aEndPreceding:0,aStartFollowing:0,bCommonFollowing:0,bCommonPreceding:0,bEndPreceding:0,bStartFollowing:0,nChangeFollowing:0,nChangePreceding:0,nCommonFollowing:0,nCommonPreceding:0}),d!==0&&o(d,p,m)}}return Ge}var qe=getDefaultExportFromCjs$1(requireBuild());function formatTrailingSpaces(e,t){return e.replace(/\s+$/,e=>t(e))}function printDiffLine(e,t,r,o,s,c){return e.length===0?o===` `?t&&c.length!==0?r(`${o} ${c}`):``:r(o):r(`${o} ${formatTrailingSpaces(e,s)}`)}function printDeleteLine(e,t,{aColor:r,aIndicator:o,changeLineTrailingSpaceColor:s,emptyFirstOrLastLinePlaceholder:c}){return printDiffLine(e,t,r,o,s,c)}function printInsertLine(e,t,{bColor:r,bIndicator:o,changeLineTrailingSpaceColor:s,emptyFirstOrLastLinePlaceholder:c}){return printDiffLine(e,t,r,o,s,c)}function printCommonLine(e,t,{commonColor:r,commonIndicator:o,commonLineTrailingSpaceColor:s,emptyFirstOrLastLinePlaceholder:c}){return printDiffLine(e,t,r,o,s,c)}function createPatchMark(e,t,r,o,{patchColor:s}){return s(`@@ -${e+1},${t-e} +${r+1},${o-r} @@`)}function joinAlignedDiffsNoExpand(e,t){let r=e.length,o=t.contextLines,s=o+o,c=r,u=!1,d=0,p=0;for(;p!==r;){let t=p;for(;p!==r&&e[p][0]===0;)p+=1;if(t!==p)if(t===0)p>o&&(c-=p-o,u=!0);else if(p===r){let e=p-t;e>o&&(c-=e-o,u=!0)}else{let e=p-t;e>s&&(c-=e-s,d+=1)}for(;p!==r&&e[p][0]!==0;)p+=1}let m=d!==0||u;d===0?u&&(c+=1):c+=d+1;let h=c-1,g=[],_=0;m&&g.push(``);let y=0,b=0,x=0,S=0,pushCommonLine=e=>{let r=g.length;g.push(printCommonLine(e,r===0||r===h,t)),x+=1,S+=1},pushDeleteLine=e=>{let r=g.length;g.push(printDeleteLine(e,r===0||r===h,t)),x+=1},pushInsertLine=e=>{let r=g.length;g.push(printInsertLine(e,r===0||r===h,t)),S+=1};for(p=0;p!==r;){let c=p;for(;p!==r&&e[p][0]===0;)p+=1;if(c!==p)if(c===0){p>o&&(c=p-o,y=c,b=c,x=y,S=b);for(let t=c;t!==p;t+=1)pushCommonLine(e[t][1])}else if(p===r){let t=p-c>o?c+o:p;for(let r=c;r!==t;r+=1)pushCommonLine(e[r][1])}else{let r=p-c;if(r>s){let u=c+o;for(let t=c;t!==u;t+=1)pushCommonLine(e[t][1]);g[_]=createPatchMark(y,x,b,S,t),_=g.length,g.push(``);let d=r-s;y=x+d,b=S+d,x=y,S=b;for(let t=p-o;t!==p;t+=1)pushCommonLine(e[t][1])}else for(let t=c;t!==p;t+=1)pushCommonLine(e[t][1])}for(;p!==r&&e[p][0]===-1;)pushDeleteLine(e[p][1]),p+=1;for(;p!==r&&e[p][0]===1;)pushInsertLine(e[p][1]),p+=1}return m&&(g[_]=createPatchMark(y,x,b,S,t)),g.join(`
24
+ `,maxOutputLength:e?.maxOutputLength??M.maxOutputLength,_outputLengthPerDepth:[]}}function createIndent(e){return Array.from({length:e+1}).join(` `)}function format$1(e,t){if(t&&(validateOptions(t),t.plugins)){let r=findPlugin(t.plugins,e);if(r!==null)return printPlugin(r,e,getConfig(t),``,0,[])}let r=printBasicValue(e,getPrintFunctionName(t),getEscapeRegex(t),getEscapeString(t));return r===null?printComplexValue(e,getConfig(t),``,0,[]):r}e(format$1,`format`);const N={AsymmetricMatcher:c,DOMCollection:p,DOMElement:h,Immutable:_,ReactElement:te,ReactTestComponent:re,Error:ue},pe={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`]},me={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`};function colorise$1(e,t){let r=pe[me[t]]||pe[t]||``;return r?`\u001b[${r[0]}m${String(e)}\u001b[${r[1]}m`:String(e)}e(colorise$1,`colorise`);function normaliseOptions$1({showHidden:e=!1,depth:t=2,colors:r=!1,customInspect:o=!0,showProxy:s=!1,maxArrayLength:c=1/0,breakLength:u=1/0,seen:d=[],truncate:p=1/0,stylize:m=String}={},h){let g={showHidden:!!e,depth:Number(t),colors:!!r,customInspect:!!o,showProxy:!!s,maxArrayLength:Number(c),breakLength:Number(u),truncate:Number(p),seen:d,inspect:h,stylize:m};return g.colors&&(g.stylize=colorise$1),g}e(normaliseOptions$1,`normaliseOptions`);function isHighSurrogate$1(e){return e>=`\ud800`&&e<=`\udbff`}e(isHighSurrogate$1,`isHighSurrogate`);function truncate$1(e,t,r=`…`){e=String(e);let o=r.length,s=e.length;if(o>t&&s>o)return r;if(s>t&&s>o){let s=t-o;return s>0&&isHighSurrogate$1(e[s-1])&&--s,`${e.slice(0,s)}${r}`}return e}e(truncate$1,`truncate`);function inspectList$1(e,t,r,o=`, `){r||=t.inspect;let s=e.length;if(s===0)return``;let c=t.truncate,u=``,d=``,p=``;for(let m=0;m<s;m+=1){let s=m+1===e.length,h=m+2===e.length;p=`…(${e.length-m})`;let g=e[m];t.truncate=c-u.length-(s?0:o.length);let _=d||r(g,t)+(s?``:o),y=u.length+_.length,b=y+p.length;if(s&&y>c&&u.length+p.length<=c||!s&&!h&&b>c||(d=s?``:r(e[m+1],t)+(h?``:o),!s&&h&&b>c&&y+d.length>c))break;if(u+=_,!s&&!h&&y+d.length>=c){p=`…(${e.length-m-1})`;break}p=``}return`${u}${p}`}e(inspectList$1,`inspectList`);function quoteComplexKey$1(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`)}e(quoteComplexKey$1,`quoteComplexKey`);function inspectProperty$1([e,t],r){return r.truncate-=2,typeof e==`string`?e=quoteComplexKey$1(e):typeof e!=`number`&&(e=`[${r.inspect(e,r)}]`),r.truncate-=e.length,t=r.inspect(t,r),`${e}: ${t}`}e(inspectProperty$1,`inspectProperty`);function inspectArray$1(e,t){let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`[]`;t.truncate-=4;let o=inspectList$1(e,t);t.truncate-=o.length;let s=``;return r.length&&(s=inspectList$1(r.map(t=>[t,e[t]]),t,inspectProperty$1)),`[ ${o}${s?`, ${s}`:``} ]`}e(inspectArray$1,`inspectArray`);const he=e(e=>typeof Buffer==`function`&&e instanceof Buffer?`Buffer`:e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,`getArrayName`);function inspectTypedArray$1(e,t){let r=he(e);t.truncate-=r.length+4;let o=Object.keys(e).slice(e.length);if(!e.length&&!o.length)return`${r}[]`;let s=``;for(let r=0;r<e.length;r++){let o=`${t.stylize(truncate$1(e[r],t.truncate),`number`)}${r===e.length-1?``:`, `}`;if(t.truncate-=o.length,e[r]!==e.length&&t.truncate<=3){s+=`…(${e.length-e[r]+1})`;break}s+=o}let c=``;return o.length&&(c=inspectList$1(o.map(t=>[t,e[t]]),t,inspectProperty$1)),`${r}[ ${s}${c?`, ${c}`:``} ]`}e(inspectTypedArray$1,`inspectTypedArray`);function inspectDate$1(e,t){let r=e.toJSON();if(r===null)return`Invalid Date`;let o=r.split(`T`),s=o[0];return t.stylize(`${s}T${truncate$1(o[1],t.truncate-s.length-1)}`,`date`)}e(inspectDate$1,`inspectDate`);function inspectFunction$1(e,t){let r=e[Symbol.toStringTag]||`Function`,o=e.name;return o?t.stylize(`[${r} ${truncate$1(o,t.truncate-11)}]`,`special`):t.stylize(`[${r}]`,`special`)}e(inspectFunction$1,`inspectFunction`);function inspectMapEntry$1([e,t],r){return r.truncate-=4,e=r.inspect(e,r),r.truncate-=e.length,t=r.inspect(t,r),`${e} => ${t}`}e(inspectMapEntry$1,`inspectMapEntry`);function mapToEntries$1(e){let t=[];return e.forEach((e,r)=>{t.push([r,e])}),t}e(mapToEntries$1,`mapToEntries`);function inspectMap$1(e,t){return e.size===0?`Map{}`:(t.truncate-=7,`Map{ ${inspectList$1(mapToEntries$1(e),t,inspectMapEntry$1)} }`)}e(inspectMap$1,`inspectMap`);const ge=Number.isNaN||(e=>e!==e);function inspectNumber$1(e,t){return ge(e)?t.stylize(`NaN`,`number`):e===1/0?t.stylize(`Infinity`,`number`):e===-1/0?t.stylize(`-Infinity`,`number`):e===0?t.stylize(1/e==1/0?`+0`:`-0`,`number`):t.stylize(truncate$1(String(e),t.truncate),`number`)}e(inspectNumber$1,`inspectNumber`);function inspectBigInt$1(e,t){let r=truncate$1(e.toString(),t.truncate-1);return r!==`…`&&(r+=`n`),t.stylize(r,`bigint`)}e(inspectBigInt$1,`inspectBigInt`);function inspectRegExp$1(e,t){let r=e.toString().split(`/`)[2],o=t.truncate-(2+r.length),s=e.source;return t.stylize(`/${truncate$1(s,o)}/${r}`,`regexp`)}e(inspectRegExp$1,`inspectRegExp`);function arrayFromSet$1(e){let t=[];return e.forEach(e=>{t.push(e)}),t}e(arrayFromSet$1,`arrayFromSet`);function inspectSet$1(e,t){return e.size===0?`Set{}`:(t.truncate-=7,`Set{ ${inspectList$1(arrayFromSet$1(e),t)} }`)}e(inspectSet$1,`inspectSet`);const _e=RegExp(`['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]`,`g`),ve={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,"'":`\\'`,"\\":`\\\\`};function escape$1(e){return ve[e]||`\\u${`0000${e.charCodeAt(0).toString(16)}`.slice(-4)}`}e(escape$1,`escape`);function inspectString$1(e,t){return _e.test(e)&&(e=e.replace(_e,escape$1)),t.stylize(`'${truncate$1(e,t.truncate-2)}'`,`string`)}e(inspectString$1,`inspectString`);function inspectSymbol$1(e){return`description`in Symbol.prototype?e.description?`Symbol(${e.description})`:`Symbol()`:e.toString()}e(inspectSymbol$1,`inspectSymbol`);const getPromiseValue=()=>`Promise{…}`;function inspectObject$1(e,t){let r=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(r.length===0&&o.length===0)return`{}`;if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let s=inspectList$1(r.map(t=>[t,e[t]]),t,inspectProperty$1),c=inspectList$1(o.map(t=>[t,e[t]]),t,inspectProperty$1);t.seen.pop();let u=``;return s&&c&&(u=`, `),`{ ${s}${u}${c} }`}const ye=typeof Symbol<`u`&&Symbol.toStringTag?Symbol.toStringTag:!1;function inspectClass$1(e,t){let r=``;return ye&&ye in e&&(r=e[ye]),r||=e.constructor.name,(!r||r===`_class`)&&(r=`<Anonymous Class>`),t.truncate-=r.length,`${r}${inspectObject$1(e,t)}`}e(inspectClass$1,`inspectClass`);function inspectArguments$1(e,t){return e.length===0?`Arguments[]`:(t.truncate-=13,`Arguments[ ${inspectList$1(e,t)} ]`)}e(inspectArguments$1,`inspectArguments`);const be=[`stack`,`line`,`column`,`name`,`message`,`fileName`,`lineNumber`,`columnNumber`,`number`,`description`,`cause`];function inspectObject$2(e,t){let r=Object.getOwnPropertyNames(e).filter(e=>be.indexOf(e)===-1),o=e.name;t.truncate-=o.length;let s=``;if(typeof e.message==`string`?s=truncate$1(e.message,t.truncate):r.unshift(`message`),s=s?`: ${s}`:``,t.truncate-=s.length+5,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let c=inspectList$1(r.map(t=>[t,e[t]]),t,inspectProperty$1);return`${o}${s}${c?` { ${c} }`:``}`}e(inspectObject$2,`inspectObject`);function inspectAttribute$1([e,t],r){return r.truncate-=3,t?`${r.stylize(String(e),`yellow`)}=${r.stylize(`"${t}"`,`string`)}`:`${r.stylize(String(e),`yellow`)}`}e(inspectAttribute$1,`inspectAttribute`);function inspectNodeCollection$1(e,t){return inspectList$1(e,t,inspectNode$1,`
25
+ `)}e(inspectNodeCollection$1,`inspectNodeCollection`);function inspectNode$1(e,t){switch(e.nodeType){case 1:return inspectHTML$1(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}e(inspectNode$1,`inspectNode`);function inspectHTML$1(e,t){let r=e.getAttributeNames(),o=e.tagName.toLowerCase(),s=t.stylize(`<${o}`,`special`),c=t.stylize(`>`,`special`),u=t.stylize(`</${o}>`,`special`);t.truncate-=o.length*2+5;let d=``;r.length>0&&(d+=` `,d+=inspectList$1(r.map(t=>[t,e.getAttribute(t)]),t,inspectAttribute$1,` `)),t.truncate-=d.length;let p=t.truncate,m=inspectNodeCollection$1(e.children,t);return m&&m.length>p&&(m=`…(${e.children.length})`),`${s}${d}${c}${m}${u}`}e(inspectHTML$1,`inspectHTML`);const xe=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`chai/inspect`):`@@chai/inspect`,Se=Symbol.for(`nodejs.util.inspect.custom`),Ce=new WeakMap,we={},Te={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:inspectNumber$1,Number:inspectNumber$1,bigint:inspectBigInt$1,BigInt:inspectBigInt$1,string:inspectString$1,String:inspectString$1,function:inspectFunction$1,Function:inspectFunction$1,symbol:inspectSymbol$1,Symbol:inspectSymbol$1,Array:inspectArray$1,Date:inspectDate$1,Map:inspectMap$1,Set:inspectSet$1,RegExp:inspectRegExp$1,Promise:getPromiseValue,WeakSet:(e,t)=>t.stylize(`WeakSet{…}`,`special`),WeakMap:(e,t)=>t.stylize(`WeakMap{…}`,`special`),Arguments:inspectArguments$1,Int8Array:inspectTypedArray$1,Uint8Array:inspectTypedArray$1,Uint8ClampedArray:inspectTypedArray$1,Int16Array:inspectTypedArray$1,Uint16Array:inspectTypedArray$1,Int32Array:inspectTypedArray$1,Uint32Array:inspectTypedArray$1,Float32Array:inspectTypedArray$1,Float64Array:inspectTypedArray$1,Generator:()=>``,DataView:()=>``,ArrayBuffer:()=>``,Error:inspectObject$2,HTMLCollection:inspectNodeCollection$1,NodeList:inspectNodeCollection$1},Ee=e((e,t,r,o)=>xe in e&&typeof e[xe]==`function`?e[xe](t):Se in e&&typeof e[Se]==`function`?e[Se](t.depth,t,o):`inspect`in e&&typeof e.inspect==`function`?e.inspect(t.depth,t):`constructor`in e&&Ce.has(e.constructor)?Ce.get(e.constructor)(e,t):we[r]?we[r](e,t):``,`inspectCustom`),De=Object.prototype.toString;function inspect$1(e,t={}){let r=normaliseOptions$1(t,inspect$1),{customInspect:o}=r,s=e===null?`null`:typeof e;if(s===`object`&&(s=De.call(e).slice(8,-1)),s in Te)return Te[s](e,r);if(o&&e){let t=Ee(e,r,s,inspect$1);if(t)return typeof t==`string`?t:inspect$1(t,r)}let c=e?Object.getPrototypeOf(e):!1;return c===Object.prototype||c===null?inspectObject$1(e,r):e&&typeof HTMLElement==`function`&&e instanceof HTMLElement?inspectHTML$1(e,r):`constructor`in e?e.constructor===Object?inspectObject$1(e,r):inspectClass$1(e,r):e===Object(e)?inspectObject$1(e,r):r.stylize(String(e),s)}const{AsymmetricMatcher:Oe,DOMCollection:ke,DOMElement:Ae,Immutable:je,ReactElement:Me,ReactTestComponent:Ne}=N,Pe=[Ne,Me,Ae,ke,je,Oe];function stringify(e,t=10,{maxLength:r,filterNode:o,...s}={}){let c=r??1e4,u,d=typeof o==`string`?createNodeFilterFromSelector(o):o,p=d?[Ne,Me,createDOMElementFilter(d),ke,je,Oe]:Pe;try{u=format$1(e,{maxDepth:t,escapeString:!1,plugins:p,...s})}catch{u=format$1(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:p,...s})}return u.length>=c&&t>1?stringify(e,Math.floor(Math.min(t,2**53-1)/2),{maxLength:r,filterNode:o,...s}):u}function createNodeFilterFromSelector(e){return t=>{if(t.nodeType===8)return!1;if(t.nodeType===1&&t.matches)try{return!t.matches(e)}catch{return!0}return!0}}const Fe=/%[sdjifoOc%]/g;function baseFormat(e,t={}){let formatArg=(e,r)=>t.prettifyObject?stringify(e,void 0,{printBasicPrototype:!1,escapeString:!1}):inspect$2(e,r);if(typeof e[0]!=`string`){let t=[];for(let r=0;r<e.length;r++)t.push(formatArg(e[r],{depth:0,colors:!1}));return t.join(` `)}let r=e.length,o=1,s=e[0],c=String(s).replace(Fe,t=>{if(t===`%%`)return`%`;if(o>=r)return t;switch(t){case`%s`:{let t=e[o++];return typeof t==`bigint`?`${t.toString()}n`:typeof t==`number`&&t===0&&1/t<0?`-0`:typeof t==`object`&&t?typeof t.toString==`function`&&t.toString!==Object.prototype.toString?t.toString():formatArg(t,{depth:0,colors:!1}):String(t)}case`%d`:{let t=e[o++];return typeof t==`bigint`?`${t.toString()}n`:typeof t==`symbol`?`NaN`:Number(t).toString()}case`%i`:{let t=e[o++];return typeof t==`bigint`?`${t.toString()}n`:Number.parseInt(String(t)).toString()}case`%f`:return Number.parseFloat(String(e[o++])).toString();case`%o`:return formatArg(e[o++],{showHidden:!0,showProxy:!0});case`%O`:return formatArg(e[o++]);case`%c`:return o++,``;case`%j`:try{return JSON.stringify(e[o++])}catch(e){let t=e.message;if(t.includes(`circular structure`)||t.includes(`cyclic structures`)||t.includes(`cyclic object`))return`[Circular]`;throw e}default:return t}});for(let t=e[o];o<r;t=e[++o])typeof t!=`object`||!t?c+=` ${typeof t==`symbol`?t.toString():t}`:c+=` ${formatArg(t)}`;return c}function format(...e){return baseFormat(e)}function inspect$2(e,t={}){return t.truncate===0&&(t.truncate=1/0),inspect$1(e,t)}e(inspect$2,`inspect`);function objDisplay$1(e,t={}){t.truncate===void 0&&(t.truncate=40);let r=inspect$2(e,t),o=Object.prototype.toString.call(e);if(t.truncate&&r.length>=t.truncate)if(o===`[object Function]`){let t=e;return t.name?`[Function: ${t.name}]`:`[Function]`}else if(o===`[object Array]`)return`[ Array(${e.length}) ]`;else if(o===`[object Object]`){let t=Object.keys(e);return`{ Object (${t.length>2?`${t.splice(0,2).join(`, `)}, ...`:t.join(`, `)}) }`}else return r;return r}e(objDisplay$1,`objDisplay`);function createSimpleStackTrace(e){let{message:t=`$$stack trace error`,stackTraceLimit:r=1}=e||{},o=Error.stackTraceLimit,s=Error.prepareStackTrace;Error.stackTraceLimit=r,Error.prepareStackTrace=e=>e.stack;let c=Error(t).stack||``;return Error.prepareStackTrace=s,Error.stackTraceLimit=o,c}function notNullish(e){return e!=null}function assertTypes(e,t,r){let o=typeof e;if(!r.includes(o))throw TypeError(`${t} value must be ${r.join(` or `)}, received "${o}"`)}function isPrimitive$1(e){return e===null||typeof e!=`function`&&typeof e!=`object`}e(isPrimitive$1,`isPrimitive`);function filterOutComments(e){let t=[],r=`none`;for(let o=0;o<e.length;++o)r===`singleline`?e[o]===`
26
+ `&&(r=`none`):r===`multiline`?e[o-1]===`*`&&e[o]===`/`&&(r=`none`):r===`none`&&(e[o]===`/`&&e[o+1]===`/`?r=`singleline`:e[o]===`/`&&e[o+1]===`*`?(r=`multiline`,o+=2):t.push(e[o]));return t.join(``)}function toArray(e){return e??=[],Array.isArray(e)?e:[e]}function isObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function isFinalObj(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function getType$1(e){return Object.prototype.toString.apply(e).slice(8,-1)}e(getType$1,`getType`);function collectOwnProperties(e,t){let r=typeof t==`function`?t:e=>t.add(e);Object.getOwnPropertyNames(e).forEach(r),Object.getOwnPropertySymbols(e).forEach(r)}function getOwnProperties(e){let t=new Set;return isFinalObj(e)?[]:(collectOwnProperties(e,t),Array.from(t))}const Ie={forceWritable:!1};function deepClone(e,t=Ie){return clone(e,new WeakMap,t)}function clone(e,t,r=Ie){let o,s;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(s=Array.from({length:o=e.length}),t.set(e,s);o--;)s[o]=clone(e[o],t,r);return s}if(Object.prototype.toString.call(e)===`[object Object]`){s=Object.create(Object.getPrototypeOf(e)),t.set(e,s);let o=getOwnProperties(e);for(let c of o){let o=Object.getOwnPropertyDescriptor(e,c);if(!o)continue;let u=clone(e[c],t,r);r.forceWritable?Object.defineProperty(s,c,{enumerable:o.enumerable,configurable:!0,writable:!0,value:u}):`get`in o?Object.defineProperty(s,c,{...o,get(){return u}}):Object.defineProperty(s,c,{...o,value:u})}return s}return e}function noop(){}function objectAttr(e,t,r=void 0){let o=t.replace(/\[(\d+)\]/g,`.$1`).split(`.`),s=e;for(let e of o)if(s=new Object(s)[e],s===void 0)return r;return s}function createDefer(){let e=null,t=null,r=new Promise((r,o)=>{e=r,t=o});return r.resolve=e,r.reject=t,r}function getCallLastIndex(e){let t=-1,r=null,o=0,s=0,c=null;for(;t<=e.length;){c=e[t],t++;let u=e[t];if((u===`"`||u===`'`||u==="`")&&c!==`\\`&&(r===u?r=null:r||=u),r||(u===`(`&&o++,u===`)`&&s++),o&&s&&o===s)return t}return null}function isNegativeNaN(e){if(!Number.isNaN(e))return!1;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31==1}function ordinal(e){let t=e%10,r=e%100;return t===1&&r!==11?`${e}st`:t===2&&r!==12?`${e}nd`:t===3&&r!==13?`${e}rd`:`${e}th`}function unique(e){return Array.from(new Set(e))}var Diff=class{0;1;constructor(e,t){this[0]=e,this[1]=t}};function diff_commonPrefix(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let r=0,o=Math.min(e.length,t.length),s=o,c=0;for(;r<s;)e.substring(c,s)===t.substring(c,s)?(r=s,c=r):o=s,s=Math.floor((o-r)/2+r);return s}function diff_commonSuffix(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let r=0,o=Math.min(e.length,t.length),s=o,c=0;for(;r<s;)e.substring(e.length-s,e.length-c)===t.substring(t.length-s,t.length-c)?(r=s,c=r):o=s,s=Math.floor((o-r)/2+r);return s}function diff_commonOverlap_(e,t){let r=e.length,o=t.length;if(r===0||o===0)return 0;r>o?e=e.substring(r-o):r<o&&(t=t.substring(0,r));let s=Math.min(r,o);if(e===t)return s;let c=0,u=1;for(;;){let r=e.substring(s-u),o=t.indexOf(r);if(o===-1)return c;u+=o,(o===0||e.substring(s-u)===t.substring(0,u))&&(c=u,u++)}}function diff_cleanupSemantic(e){let t=!1,r=[],o=0,s=null,c=0,u=0,d=0,p=0,m=0;for(;c<e.length;)e[c][0]===0?(r[o++]=c,u=p,d=m,p=0,m=0,s=e[c][1]):(e[c][0]===1?p+=e[c][1].length:m+=e[c][1].length,s&&s.length<=Math.max(u,d)&&s.length<=Math.max(p,m)&&(e.splice(r[o-1],0,new Diff(-1,s)),e[r[o-1]+1][0]=1,o--,o--,c=o>0?r[o-1]:-1,u=0,d=0,p=0,m=0,s=null,t=!0)),c++;for(t&&diff_cleanupMerge(e),diff_cleanupSemanticLossless(e),c=1;c<e.length;){if(e[c-1][0]===-1&&e[c][0]===1){let t=e[c-1][1],r=e[c][1],o=diff_commonOverlap_(t,r),s=diff_commonOverlap_(r,t);o>=s?(o>=t.length/2||o>=r.length/2)&&(e.splice(c,0,new Diff(0,r.substring(0,o))),e[c-1][1]=t.substring(0,t.length-o),e[c+1][1]=r.substring(o),c++):(s>=t.length/2||s>=r.length/2)&&(e.splice(c,0,new Diff(0,t.substring(0,s))),e[c-1][0]=1,e[c-1][1]=r.substring(0,r.length-s),e[c+1][0]=-1,e[c+1][1]=t.substring(s),c++),c++}c++}}const Le=/[^a-z0-9]/i,Re=/\s/,ze=/[\r\n]/,Be=/\n\r?\n$/,Ve=/^\r?\n\r?\n/;function diff_cleanupSemanticLossless(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===0&&e[t+1][0]===0){let r=e[t-1][1],o=e[t][1],s=e[t+1][1],c=diff_commonSuffix(r,o);if(c){let e=o.substring(o.length-c);r=r.substring(0,r.length-c),o=e+o.substring(0,o.length-c),s=e+s}let u=r,d=o,p=s,m=diff_cleanupSemanticScore_(r,o)+diff_cleanupSemanticScore_(o,s);for(;o.charAt(0)===s.charAt(0);){r+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);let e=diff_cleanupSemanticScore_(r,o)+diff_cleanupSemanticScore_(o,s);e>=m&&(m=e,u=r,d=o,p=s)}e[t-1][1]!==u&&(u?e[t-1][1]=u:(e.splice(t-1,1),t--),e[t][1]=d,p?e[t+1][1]=p:(e.splice(t+1,1),t--))}t++}}function diff_cleanupMerge(e){e.push(new Diff(0,``));let t=0,r=0,o=0,s=``,c=``,u;for(;t<e.length;)switch(e[t][0]){case 1:o++,c+=e[t][1],t++;break;case-1:r++,s+=e[t][1],t++;break;case 0:r+o>1?(r!==0&&o!==0&&(u=diff_commonPrefix(c,s),u!==0&&(t-r-o>0&&e[t-r-o-1][0]===0?e[t-r-o-1][1]+=c.substring(0,u):(e.splice(0,0,new Diff(0,c.substring(0,u))),t++),c=c.substring(u),s=s.substring(u)),u=diff_commonSuffix(c,s),u!==0&&(e[t][1]=c.substring(c.length-u)+e[t][1],c=c.substring(0,c.length-u),s=s.substring(0,s.length-u))),t-=r+o,e.splice(t,r+o),s.length&&(e.splice(t,0,new Diff(-1,s)),t++),c.length&&(e.splice(t,0,new Diff(1,c)),t++),t++):t!==0&&e[t-1][0]===0?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,o=0,r=0,s=``,c=``;break}e.at(-1)?.[1]===``&&e.pop();let d=!1;for(t=1;t<e.length-1;)e[t-1][0]===0&&e[t+1][0]===0&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&diff_cleanupMerge(e)}function diff_cleanupSemanticScore_(e,t){if(!e||!t)return 6;let r=e.charAt(e.length-1),o=t.charAt(0),s=r.match(Le),c=o.match(Le),u=s&&r.match(Re),d=c&&o.match(Re),p=u&&r.match(ze),m=d&&o.match(ze),h=p&&e.match(Be),g=m&&t.match(Ve);return h||g?5:p||m?4:s&&!u&&d?3:u||d?2:s||c?1:0}const He=`Compared values have no visual difference.`;function getDefaultExportFromCjs$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}e(getDefaultExportFromCjs$1,`getDefaultExportFromCjs`);var P={},Ue;function requireBuild(){if(Ue)return P;Ue=1,Object.defineProperty(P,`__esModule`,{value:!0}),P.default=diffSequence;let e=`diff-sequences`,countCommonItemsF=(e,t,r,o,s)=>{let c=0;for(;e<t&&r<o&&s(e,r);)e+=1,r+=1,c+=1;return c},countCommonItemsR=(e,t,r,o,s)=>{let c=0;for(;e<=t&&r<=o&&s(t,o);)--t,--o,c+=1;return c},extendPathsF=(e,t,r,o,s,c,u)=>{let d=0,p=-e,m=c[d],h=m;c[d]+=countCommonItemsF(m+1,t,o+m-p+1,r,s);let g=e<u?e:u;for(d+=1,p+=2;d<=g;d+=1,p+=2){if(d!==e&&h<c[d])m=c[d];else if(m=h+1,t<=m)return d-1;h=c[d],c[d]=m+countCommonItemsF(m+1,t,o+m-p+1,r,s)}return u},extendPathsR=(e,t,r,o,s,c,u)=>{let d=0,p=e,m=c[d],h=m;c[d]-=countCommonItemsR(t,m-1,r,o+m-p-1,s);let g=e<u?e:u;for(d+=1,p-=2;d<=g;d+=1,p-=2){if(d!==e&&c[d]<h)m=c[d];else if(m=h-1,m<t)return d-1;h=c[d],c[d]=m-countCommonItemsR(t,m-1,r,o+m-p-1,s)}return u},extendOverlappablePathsF=(e,t,r,o,s,c,u,d,p,m,h)=>{let g=o-t,_=r-t,y=s-o-_,b=-y-(e-1),x=-y+(e-1),S=0,w=e<d?e:d;for(let d=0,_=-e;d<=w;d+=1,_+=2){let w=d===0||d!==e&&S<u[d],T=w?u[d]:S,E=w?T:T+1,D=g+E-_,O=countCommonItemsF(E+1,r,D+1,s,c),k=E+O;if(S=u[d],u[d]=k,b<=_&&_<=x){let u=(e-1-(_+y))/2;if(u<=m&&p[u]-1<=k){let u=g+T-(w?_+1:_-1),d=countCommonItemsR(t,T,o,u,c),p=T-d,m=u-d,y=p+1,b=m+1;h.nChangePreceding=e-1,e-1===y+b-t-o?(h.aEndPreceding=t,h.bEndPreceding=o):(h.aEndPreceding=y,h.bEndPreceding=b),h.nCommonPreceding=d,d!==0&&(h.aCommonPreceding=y,h.bCommonPreceding=b),h.nCommonFollowing=O,O!==0&&(h.aCommonFollowing=E+1,h.bCommonFollowing=D+1);let x=k+1,S=D+O+1;return h.nChangeFollowing=e-1,e-1===r+s-x-S?(h.aStartFollowing=r,h.bStartFollowing=s):(h.aStartFollowing=x,h.bStartFollowing=S),!0}}}return!1},extendOverlappablePathsR=(e,t,r,o,s,c,u,d,p,m,h)=>{let g=s-r,_=r-t,y=s-o-_,b=y-e,x=y+e,S=0,w=e<m?e:m;for(let m=0,_=e;m<=w;m+=1,_-=2){let w=m===0||m!==e&&p[m]<S,T=w?p[m]:S,E=w?T:T-1,D=g+E-_,O=countCommonItemsR(t,E-1,o,D-1,c),k=E-O;if(S=p[m],p[m]=k,b<=_&&_<=x){let p=(e+(_-y))/2;if(p<=d&&k-1<=u[p]){let u=D-O;if(h.nChangePreceding=e,e===k+u-t-o?(h.aEndPreceding=t,h.bEndPreceding=o):(h.aEndPreceding=k,h.bEndPreceding=u),h.nCommonPreceding=O,O!==0&&(h.aCommonPreceding=k,h.bCommonPreceding=u),h.nChangeFollowing=e-1,e===1)h.nCommonFollowing=0,h.aStartFollowing=r,h.bStartFollowing=s;else{let t=g+T-(w?_-1:_+1),o=countCommonItemsF(T,r,t,s,c);h.nCommonFollowing=o,o!==0&&(h.aCommonFollowing=T,h.bCommonFollowing=t);let u=T+o,d=t+o;e-1===r+s-u-d?(h.aStartFollowing=r,h.bStartFollowing=s):(h.aStartFollowing=u,h.bStartFollowing=d)}return!0}}}return!1},divide=(t,r,o,s,c,u,d,p,m)=>{let h=s-r,g=c-o,_=o-r,y=c-s,b=y-_,x=_,S=_;if(d[0]=r-1,p[0]=o,b%2==0){let e=(t||b)/2,w=(_+y)/2;for(let t=1;t<=w;t+=1)if(x=extendPathsF(t,o,c,h,u,d,x),t<e)S=extendPathsR(t,r,s,g,u,p,S);else if(extendOverlappablePathsR(t,r,o,s,c,u,d,x,p,S,m))return}else{let e=((t||b)+1)/2,w=(_+y+1)/2,T=1;for(x=extendPathsF(T,o,c,h,u,d,x),T+=1;T<=w;T+=1)if(S=extendPathsR(T-1,r,s,g,u,p,S),T<e)x=extendPathsF(T,o,c,h,u,d,x);else if(extendOverlappablePathsF(T,r,o,s,c,u,d,x,p,S,m))return}throw Error(`${e}: no overlap aStart=${r} aEnd=${o} bStart=${s} bEnd=${c}`)},findSubsequences=(e,t,r,o,s,c,u,d,p,m)=>{if(s-o<r-t){if(c=!c,c&&u.length===1){let{foundSubsequence:e,isCommon:t}=u[0];u[1]={foundSubsequence:(t,r,o)=>{e(t,o,r)},isCommon:(e,r)=>t(r,e)}}let e=t,d=r;t=o,r=s,o=e,s=d}let{foundSubsequence:h,isCommon:g}=u[+!!c];divide(e,t,r,o,s,g,d,p,m);let{nChangePreceding:_,aEndPreceding:y,bEndPreceding:b,nCommonPreceding:x,aCommonPreceding:S,bCommonPreceding:w,nCommonFollowing:T,aCommonFollowing:E,bCommonFollowing:D,nChangeFollowing:O,aStartFollowing:k,bStartFollowing:A}=m;t<y&&o<b&&findSubsequences(_,t,y,o,b,c,u,d,p,m),x!==0&&h(x,S,w),T!==0&&h(T,E,D),k<r&&A<s&&findSubsequences(O,k,r,A,s,c,u,d,p,m)},validateLength=(t,r)=>{if(typeof r!=`number`)throw TypeError(`${e}: ${t} typeof ${typeof r} is not a number`);if(!Number.isSafeInteger(r))throw RangeError(`${e}: ${t} value ${r} is not a safe integer`);if(r<0)throw RangeError(`${e}: ${t} value ${r} is a negative integer`)},validateCallback=(t,r)=>{let o=typeof r;if(o!==`function`)throw TypeError(`${e}: ${t} typeof ${o} is not a function`)};function diffSequence(e,t,r,o){validateLength(`aLength`,e),validateLength(`bLength`,t),validateCallback(`isCommon`,r),validateCallback(`foundSubsequence`,o);let s=countCommonItemsF(0,e,0,t,r);if(s!==0&&o(s,0,0),e!==s||t!==s){let c=s,u=s,d=countCommonItemsR(c,e-1,u,t-1,r),p=e-d,m=t-d,h=s+d;e!==h&&t!==h&&findSubsequences(0,c,p,u,m,!1,[{foundSubsequence:o,isCommon:r}],[0],[0],{aCommonFollowing:0,aCommonPreceding:0,aEndPreceding:0,aStartFollowing:0,bCommonFollowing:0,bCommonPreceding:0,bEndPreceding:0,bStartFollowing:0,nChangeFollowing:0,nChangePreceding:0,nCommonFollowing:0,nCommonPreceding:0}),d!==0&&o(d,p,m)}}return P}var We=getDefaultExportFromCjs$1(requireBuild());function formatTrailingSpaces(e,t){return e.replace(/\s+$/,e=>t(e))}function printDiffLine(e,t,r,o,s,c){return e.length===0?o===` `?t&&c.length!==0?r(`${o} ${c}`):``:r(o):r(`${o} ${formatTrailingSpaces(e,s)}`)}function printDeleteLine(e,t,{aColor:r,aIndicator:o,changeLineTrailingSpaceColor:s,emptyFirstOrLastLinePlaceholder:c}){return printDiffLine(e,t,r,o,s,c)}function printInsertLine(e,t,{bColor:r,bIndicator:o,changeLineTrailingSpaceColor:s,emptyFirstOrLastLinePlaceholder:c}){return printDiffLine(e,t,r,o,s,c)}function printCommonLine(e,t,{commonColor:r,commonIndicator:o,commonLineTrailingSpaceColor:s,emptyFirstOrLastLinePlaceholder:c}){return printDiffLine(e,t,r,o,s,c)}function createPatchMark(e,t,r,o,{patchColor:s}){return s(`@@ -${e+1},${t-e} +${r+1},${o-r} @@`)}function joinAlignedDiffsNoExpand(e,t){let r=e.length,o=t.contextLines,s=o+o,c=r,u=!1,d=0,p=0;for(;p!==r;){let t=p;for(;p!==r&&e[p][0]===0;)p+=1;if(t!==p)if(t===0)p>o&&(c-=p-o,u=!0);else if(p===r){let e=p-t;e>o&&(c-=e-o,u=!0)}else{let e=p-t;e>s&&(c-=e-s,d+=1)}for(;p!==r&&e[p][0]!==0;)p+=1}let m=d!==0||u;d===0?u&&(c+=1):c+=d+1;let h=c-1,g=[],_=0;m&&g.push(``);let y=0,b=0,x=0,S=0,pushCommonLine=e=>{let r=g.length;g.push(printCommonLine(e,r===0||r===h,t)),x+=1,S+=1},pushDeleteLine=e=>{let r=g.length;g.push(printDeleteLine(e,r===0||r===h,t)),x+=1},pushInsertLine=e=>{let r=g.length;g.push(printInsertLine(e,r===0||r===h,t)),S+=1};for(p=0;p!==r;){let c=p;for(;p!==r&&e[p][0]===0;)p+=1;if(c!==p)if(c===0){p>o&&(c=p-o,y=c,b=c,x=y,S=b);for(let t=c;t!==p;t+=1)pushCommonLine(e[t][1])}else if(p===r){let t=p-c>o?c+o:p;for(let r=c;r!==t;r+=1)pushCommonLine(e[r][1])}else{let r=p-c;if(r>s){let u=c+o;for(let t=c;t!==u;t+=1)pushCommonLine(e[t][1]);g[_]=createPatchMark(y,x,b,S,t),_=g.length,g.push(``);let d=r-s;y=x+d,b=S+d,x=y,S=b;for(let t=p-o;t!==p;t+=1)pushCommonLine(e[t][1])}else for(let t=c;t!==p;t+=1)pushCommonLine(e[t][1])}for(;p!==r&&e[p][0]===-1;)pushDeleteLine(e[p][1]),p+=1;for(;p!==r&&e[p][0]===1;)pushInsertLine(e[p][1]),p+=1}return m&&(g[_]=createPatchMark(y,x,b,S,t)),g.join(`
7
27
  `)}function joinAlignedDiffsExpand(e,t){return e.map((e,r,o)=>{let s=e[1],c=r===0||r===o.length-1;switch(e[0]){case-1:return printDeleteLine(s,c,t);case 1:return printInsertLine(s,c,t);default:return printCommonLine(s,c,t)}}).join(`
8
- `)}const noColor=e=>e;function getDefaultOptions(){return{aAnnotation:`Expected`,aColor:o.green,aIndicator:`-`,bAnnotation:`Received`,bColor:o.red,bIndicator:`+`,changeColor:o.inverse,changeLineTrailingSpaceColor:noColor,commonColor:o.dim,commonIndicator:` `,commonLineTrailingSpaceColor:noColor,compareKeys:void 0,contextLines:5,emptyFirstOrLastLinePlaceholder:``,expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:o.yellow,printBasicPrototype:!1,truncateThreshold:0,truncateAnnotation:`... Diff result is truncated`,truncateAnnotationColor:noColor}}function getCompareKeys(e){return e&&typeof e==`function`?e:void 0}function getContextLines(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:5}function normalizeDiffOptions(e={}){return{...getDefaultOptions(),...e,compareKeys:getCompareKeys(e.compareKeys),contextLines:getContextLines(e.contextLines)}}function isEmptyString(e){return e.length===1&&e[0].length===0}function countChanges(e){let t=0,r=0;return e.forEach(e=>{switch(e[0]){case-1:t+=1;break;case 1:r+=1;break}}),{a:t,b:r}}function printAnnotation({aAnnotation:e,aColor:t,aIndicator:r,bAnnotation:o,bColor:s,bIndicator:c,includeChangeCounts:u,omitAnnotationLines:d},p){if(d)return``;let m=``,h=``;if(u){let t=String(p.a),s=String(p.b),u=o.length-e.length,d=` `.repeat(Math.max(0,u)),g=` `.repeat(Math.max(0,-u)),_=s.length-t.length,y=` `.repeat(Math.max(0,_)),b=` `.repeat(Math.max(0,-_));m=`${d} ${r} ${y}${t}`,h=`${g} ${c} ${b}${s}`}let g=`${r} ${e}${m}`,_=`${c} ${o}${h}`;return`${t(g)}\n${s(_)}\n\n`}function printDiffLines(e,t,r){return printAnnotation(r,countChanges(e))+(r.expand?joinAlignedDiffsExpand(e,r):joinAlignedDiffsNoExpand(e,r))+(t?r.truncateAnnotationColor(`\n${r.truncateAnnotation}`):``)}function diffLinesUnified(e,t,r){let o=normalizeDiffOptions(r),[s,c]=diffLinesRaw(isEmptyString(e)?[]:e,isEmptyString(t)?[]:t,o);return printDiffLines(s,c,o)}function diffLinesUnified2(e,t,r,o,s){if(isEmptyString(e)&&isEmptyString(r)&&(e=[],r=[]),isEmptyString(t)&&isEmptyString(o)&&(t=[],o=[]),e.length!==r.length||t.length!==o.length)return diffLinesUnified(e,t,s);let[c,u]=diffLinesRaw(r,o,s),d=0,p=0;return c.forEach(r=>{switch(r[0]){case-1:r[1]=e[d],d+=1;break;case 1:r[1]=t[p],p+=1;break;default:r[1]=t[p],d+=1,p+=1}}),printDiffLines(c,u,normalizeDiffOptions(s))}function diffLinesRaw(e,t,r){let o=r?.truncateThreshold??!1,s=Math.max(Math.floor(r?.truncateThreshold??0),0),c=o?Math.min(e.length,s):e.length,u=o?Math.min(t.length,s):t.length,d=c!==e.length||u!==t.length,isCommon=(r,o)=>e[r]===t[o],p=[],m=0,h=0,foundSubsequence=(r,o,s)=>{for(;m!==o;m+=1)p.push(new Diff(-1,e[m]));for(;h!==s;h+=1)p.push(new Diff(1,t[h]));for(;r!==0;--r,m+=1,h+=1)p.push(new Diff(0,t[h]))};for(qe(c,u,isCommon,foundSubsequence);m!==c;m+=1)p.push(new Diff(-1,e[m]));for(;h!==u;h+=1)p.push(new Diff(1,t[h]));return[p,d]}function getType(e){if(e===void 0)return`undefined`;if(e===null)return`null`;if(Array.isArray(e))return`array`;if(typeof e==`boolean`)return`boolean`;if(typeof e==`function`)return`function`;if(typeof e==`number`)return`number`;if(typeof e==`string`)return`string`;if(typeof e==`bigint`)return`bigint`;if(typeof e==`object`){if(e!=null){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`}else if(typeof e==`symbol`)return`symbol`;throw Error(`value of unknown type: ${e}`)}function getNewLineSymbol(e){return e.includes(`\r
28
+ `)}const noColor=e=>e;function getDefaultOptions(){return{aAnnotation:`Expected`,aColor:o.green,aIndicator:`-`,bAnnotation:`Received`,bColor:o.red,bIndicator:`+`,changeColor:o.inverse,changeLineTrailingSpaceColor:noColor,commonColor:o.dim,commonIndicator:` `,commonLineTrailingSpaceColor:noColor,compareKeys:void 0,contextLines:5,emptyFirstOrLastLinePlaceholder:``,expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:o.yellow,printBasicPrototype:!1,truncateThreshold:0,truncateAnnotation:`... Diff result is truncated`,truncateAnnotationColor:noColor}}function getCompareKeys(e){return e&&typeof e==`function`?e:void 0}function getContextLines(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:5}function normalizeDiffOptions(e={}){return{...getDefaultOptions(),...e,compareKeys:getCompareKeys(e.compareKeys),contextLines:getContextLines(e.contextLines)}}function isEmptyString(e){return e.length===1&&e[0].length===0}function countChanges(e){let t=0,r=0;return e.forEach(e=>{switch(e[0]){case-1:t+=1;break;case 1:r+=1;break}}),{a:t,b:r}}function printAnnotation({aAnnotation:e,aColor:t,aIndicator:r,bAnnotation:o,bColor:s,bIndicator:c,includeChangeCounts:u,omitAnnotationLines:d},p){if(d)return``;let m=``,h=``;if(u){let t=String(p.a),s=String(p.b),u=o.length-e.length,d=` `.repeat(Math.max(0,u)),g=` `.repeat(Math.max(0,-u)),_=s.length-t.length,y=` `.repeat(Math.max(0,_)),b=` `.repeat(Math.max(0,-_));m=`${d} ${r} ${y}${t}`,h=`${g} ${c} ${b}${s}`}let g=`${r} ${e}${m}`,_=`${c} ${o}${h}`;return`${t(g)}\n${s(_)}\n\n`}function printDiffLines(e,t,r){return printAnnotation(r,countChanges(e))+(r.expand?joinAlignedDiffsExpand(e,r):joinAlignedDiffsNoExpand(e,r))+(t?r.truncateAnnotationColor(`\n${r.truncateAnnotation}`):``)}function diffLinesUnified(e,t,r){let o=normalizeDiffOptions(r),[s,c]=diffLinesRaw(isEmptyString(e)?[]:e,isEmptyString(t)?[]:t,o);return printDiffLines(s,c,o)}function diffLinesUnified2(e,t,r,o,s){if(isEmptyString(e)&&isEmptyString(r)&&(e=[],r=[]),isEmptyString(t)&&isEmptyString(o)&&(t=[],o=[]),e.length!==r.length||t.length!==o.length)return diffLinesUnified(e,t,s);let[c,u]=diffLinesRaw(r,o,s),d=0,p=0;return c.forEach(r=>{switch(r[0]){case-1:r[1]=e[d],d+=1;break;case 1:r[1]=t[p],p+=1;break;default:r[1]=t[p],d+=1,p+=1}}),printDiffLines(c,u,normalizeDiffOptions(s))}function diffLinesRaw(e,t,r){let o=r?.truncateThreshold??!1,s=Math.max(Math.floor(r?.truncateThreshold??0),0),c=o?Math.min(e.length,s):e.length,u=o?Math.min(t.length,s):t.length,d=c!==e.length||u!==t.length,isCommon=(r,o)=>e[r]===t[o],p=[],m=0,h=0,foundSubsequence=(r,o,s)=>{for(;m!==o;m+=1)p.push(new Diff(-1,e[m]));for(;h!==s;h+=1)p.push(new Diff(1,t[h]));for(;r!==0;--r,m+=1,h+=1)p.push(new Diff(0,t[h]))};for(We(c,u,isCommon,foundSubsequence);m!==c;m+=1)p.push(new Diff(-1,e[m]));for(;h!==u;h+=1)p.push(new Diff(1,t[h]));return[p,d]}function getType(e){if(e===void 0)return`undefined`;if(e===null)return`null`;if(Array.isArray(e))return`array`;if(typeof e==`boolean`)return`boolean`;if(typeof e==`function`)return`function`;if(typeof e==`number`)return`number`;if(typeof e==`string`)return`string`;if(typeof e==`bigint`)return`bigint`;if(typeof e==`object`){if(e!=null){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`}else if(typeof e==`symbol`)return`symbol`;throw Error(`value of unknown type: ${e}`)}function getNewLineSymbol(e){return e.includes(`\r
9
29
  `)?`\r
10
30
  `:`
11
31
  `}function diffStrings(e,t,r){let o=r?.truncateThreshold??!1,s=Math.max(Math.floor(r?.truncateThreshold??0),0),c=e.length,u=t.length;if(o){let r=e.includes(`
12
32
  `),o=t.includes(`
13
- `),d=getNewLineSymbol(e),p=getNewLineSymbol(t),m=r?`${e.split(d,s).join(d)}\n`:e,h=o?`${t.split(p,s).join(p)}\n`:t;c=m.length,u=h.length}let d=c!==e.length||u!==t.length,isCommon=(r,o)=>e[r]===t[o],p=0,m=0,h=[],foundSubsequence=(r,o,s)=>{p!==o&&h.push(new Diff(-1,e.slice(p,o))),m!==s&&h.push(new Diff(1,t.slice(m,s))),p=o+r,m=s+r,h.push(new Diff(0,t.slice(s,m)))};return qe(c,u,isCommon,foundSubsequence),p!==c&&h.push(new Diff(-1,e.slice(p))),m!==u&&h.push(new Diff(1,t.slice(m))),[h,d]}function concatenateRelevantDiffs(e,t,r){return t.reduce((t,o)=>t+(o[0]===0?o[1]:o[0]===e&&o[1].length!==0?r(o[1]):``),``)}var ChangeBuffer=class{op;line;lines;changeColor;constructor(e,t){this.op=e,this.line=[],this.lines=[],this.changeColor=t}pushSubstring(e){this.pushDiff(new Diff(this.op,e))}pushLine(){this.lines.push(this.line.length===1?this.line[0][0]===this.op?this.line[0]:new Diff(this.op,this.line[0][1]):new Diff(this.op,concatenateRelevantDiffs(this.op,this.line,this.changeColor))),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(e){this.line.push(e)}align(e){let t=e[1];if(t.includes(`
33
+ `),d=getNewLineSymbol(e),p=getNewLineSymbol(t),m=r?`${e.split(d,s).join(d)}\n`:e,h=o?`${t.split(p,s).join(p)}\n`:t;c=m.length,u=h.length}let d=c!==e.length||u!==t.length,isCommon=(r,o)=>e[r]===t[o],p=0,m=0,h=[],foundSubsequence=(r,o,s)=>{p!==o&&h.push(new Diff(-1,e.slice(p,o))),m!==s&&h.push(new Diff(1,t.slice(m,s))),p=o+r,m=s+r,h.push(new Diff(0,t.slice(s,m)))};return We(c,u,isCommon,foundSubsequence),p!==c&&h.push(new Diff(-1,e.slice(p))),m!==u&&h.push(new Diff(1,t.slice(m))),[h,d]}function concatenateRelevantDiffs(e,t,r){return t.reduce((t,o)=>t+(o[0]===0?o[1]:o[0]===e&&o[1].length!==0?r(o[1]):``),``)}var ChangeBuffer=class{op;line;lines;changeColor;constructor(e,t){this.op=e,this.line=[],this.lines=[],this.changeColor=t}pushSubstring(e){this.pushDiff(new Diff(this.op,e))}pushLine(){this.lines.push(this.line.length===1?this.line[0][0]===this.op?this.line[0]:new Diff(this.op,this.line[0][1]):new Diff(this.op,concatenateRelevantDiffs(this.op,this.line,this.changeColor))),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(e){this.line.push(e)}align(e){let t=e[1];if(t.includes(`
14
34
  `)){let e=t.split(`
15
35
  `),r=e.length-1;e.forEach((e,t)=>{t<r?(this.pushSubstring(e),this.pushLine()):e.length!==0&&this.pushSubstring(e)})}else this.pushDiff(e)}moveLinesTo(e){this.isLineEmpty()||this.pushLine(),e.push(...this.lines),this.lines.length=0}},CommonBuffer=class{deleteBuffer;insertBuffer;lines;constructor(e,t){this.deleteBuffer=e,this.insertBuffer=t,this.lines=[]}pushDiffCommonLine(e){this.lines.push(e)}pushDiffChangeLines(e){let t=e[1].length===0;(!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){let t=e[0],r=e[1];if(r.includes(`
16
36
  `)){let e=r.split(`
@@ -19,35 +39,35 @@ import{n as e,t}from"./chunk-CHh1Zzun.js";var r={reset:[0,0],bold:[1,22,`\x1B[22
19
39
  `)||t.includes(`
20
40
  `),[s,c]=diffStringsRaw(o?`${e}\n`:e,o?`${t}\n`:t,!0,r);if(hasCommonDiff(s,o)){let e=normalizeDiffOptions(r);return printDiffLines(getAlignedDiffs(s,e.changeColor),c,e)}}return diffLinesUnified(e.split(`
21
41
  `),t.split(`
22
- `),r)}function diffStringsRaw(e,t,r,o){let[s,c]=diffStrings(e,t,o);return r&&diff_cleanupSemantic(s),[s,c]}function getCommonMessage(e,t){let{commonColor:r}=normalizeDiffOptions(t);return r(e)}const{AsymmetricMatcher:Je,DOMCollection:Ye,DOMElement:Xe,Immutable:Ze,ReactElement:Qe,ReactTestComponent:$e}=me,et=[$e,Qe,Xe,Ye,Ze,Je,me.Error],tt={maxDepth:20,plugins:et},nt={callToJSON:!1,maxDepth:8,plugins:et};function diff(e,t,r){if(Object.is(e,t))return``;let o=getType(e),s=o,c=!1;if(o===`object`&&typeof e.asymmetricMatch==`function`){if(e.$$typeof!==Symbol.for(`jest.asymmetricMatcher`)||typeof e.getExpectedType!=`function`)return;s=e.getExpectedType(),c=s===`string`}if(s!==getType(t)){let{aAnnotation:o,aColor:s,aIndicator:c,bAnnotation:u,bColor:d,bIndicator:p}=normalizeDiffOptions(r),m=getFormatOptions(nt,r),h=format$1(e,m),g=format$1(t,m),_=1e5;function truncate(e){return e.length<=_?e:`${e.slice(0,_)}...`}return h=truncate(h),g=truncate(g),`${`${s(`${c} ${o}:`)}\n${h}`}\n\n${`${d(`${p} ${u}:`)}\n${g}`}`}if(!c)switch(o){case`string`:return diffLinesUnified(e.split(`
42
+ `),r)}function diffStringsRaw(e,t,r,o){let[s,c]=diffStrings(e,t,o);return r&&diff_cleanupSemantic(s),[s,c]}function getCommonMessage(e,t){let{commonColor:r}=normalizeDiffOptions(t);return r(e)}const{AsymmetricMatcher:Ge,DOMCollection:Ke,DOMElement:qe,Immutable:Je,ReactElement:Ye,ReactTestComponent:Xe}=N,Ze=[Xe,Ye,qe,Ke,Je,Ge,N.Error],Qe={maxDepth:20,plugins:Ze},$e={callToJSON:!1,maxDepth:8,plugins:Ze},DEFAULT_MEMORIZE=(e,t)=>t;function diff(e,t,r,o=DEFAULT_MEMORIZE){if(Object.is(e,t))return``;let s=getType(e),c=s,u=!1;if(s===`object`&&typeof e.asymmetricMatch==`function`){if(e.$$typeof!==Symbol.for(`jest.asymmetricMatcher`)||typeof e.getExpectedType!=`function`)return;c=e.getExpectedType(),u=c===`string`}if(c!==getType(t)){let{aAnnotation:s,aColor:c,aIndicator:u,bAnnotation:d,bColor:p,bIndicator:m}=normalizeDiffOptions(r),h=getFormatOptions($e,r),g=format$1(e,h),_=format$1(t,h),y=1e5;function truncate(e){return e.length<=y?e:`${e.slice(0,y)}...`}return g=o(`expected`,truncate(g)),_=o(`actual`,truncate(_)),`${`${c(`${u} ${s}:`)}\n${g}`}\n\n${`${p(`${m} ${d}:`)}\n${_}`}`}if(!u)switch(s){case`string`:return diffLinesUnified(e.split(`
23
43
  `),t.split(`
24
- `),r);case`boolean`:case`number`:return comparePrimitive(e,t,r);case`map`:return compareObjects(sortMap(e),sortMap(t),r);case`set`:return compareObjects(sortSet(e),sortSet(t),r);default:return compareObjects(e,t,r)}}function comparePrimitive(e,t,r){let o=format$1(e,tt),s=format$1(t,tt);return o===s?``:diffLinesUnified(o.split(`
25
- `),s.split(`
26
- `),r)}function sortMap(e){return new Map(Array.from(e.entries()).sort())}function sortSet(e){return new Set(Array.from(e.values()).sort())}function compareObjects(e,t,r){let o,s=!1;try{o=getObjectsDifference(e,t,getFormatOptions(tt,r),r)}catch{s=!0}let c=getCommonMessage(We,r);return(o===void 0||o===c)&&(o=getObjectsDifference(e,t,getFormatOptions(nt,r),r),o!==c&&!s&&(o=`${getCommonMessage("Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",r)}\n\n${o}`)),o}function getFormatOptions(e,t){let{compareKeys:r,printBasicPrototype:o,maxDepth:s}=normalizeDiffOptions(t);return{...e,compareKeys:r,printBasicPrototype:o,maxDepth:s??e.maxDepth}}function getObjectsDifference(e,t,r,o){let s={...r,indent:0},c=format$1(e,s),u=format$1(t,s);if(c===u)return getCommonMessage(We,o);{let s=format$1(e,r),d=format$1(t,r);return diffLinesUnified2(s.split(`
27
- `),d.split(`
44
+ `),r);case`boolean`:case`number`:return comparePrimitive(e,t,r,o);case`map`:return compareObjects(sortMap(e),sortMap(t),r,o);case`set`:return compareObjects(sortSet(e),sortSet(t),r,o);default:return compareObjects(e,t,r,o)}}function createMemorize(e){return(t,r)=>(e[t]=r,r)}function comparePrimitive(e,t,r,o=DEFAULT_MEMORIZE){let s=o(`expected`,format$1(e,Qe)),c=o(`actual`,format$1(t,Qe));return s===c?``:diffLinesUnified(s.split(`
28
45
  `),c.split(`
46
+ `),r)}function sortMap(e){return new Map(Array.from(e.entries()).sort())}function sortSet(e){return new Set(Array.from(e.values()).sort())}function compareObjects(e,t,r,o=DEFAULT_MEMORIZE){let s,c=!1;try{s=getObjectsDifference(e,t,getFormatOptions(Qe,r),r,o)}catch{c=!0}let u=getCommonMessage(He,r);return(s===void 0||s===u)&&(s=getObjectsDifference(e,t,getFormatOptions($e,r),r,o),s!==u&&!c&&(s=`${getCommonMessage("Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",r)}\n\n${s}`)),s}function getDefaultFormatOptions(e){return getFormatOptions(Qe,e)}function getFormatOptions(e,t){let{compareKeys:r,printBasicPrototype:o,maxDepth:s}=normalizeDiffOptions(t);return{...e,compareKeys:r,printBasicPrototype:o,maxDepth:s??e.maxDepth}}function getObjectsDifference(e,t,r,o,s=DEFAULT_MEMORIZE){let c={...r,indent:0},u=format$1(e,c),d=format$1(t,c);if(u===d)return getCommonMessage(He,o);{let c=s(`expected`,format$1(e,r)),p=s(`actual`,format$1(t,r));return diffLinesUnified2(c.split(`
47
+ `),p.split(`
29
48
  `),u.split(`
30
- `),o)}}const rt=2e4;function isAsymmetricMatcher(e){return getType$1(e)===`Object`&&typeof e.asymmetricMatch==`function`}function isReplaceable(e,t){let r=getType$1(e);return r===getType$1(t)&&(r===`Object`||r===`Array`)}function printDiffOrStringify(e,t,r){let{aAnnotation:o,bAnnotation:s}=normalizeDiffOptions(r);if(typeof t==`string`&&typeof e==`string`&&t.length>0&&e.length>0&&t.length<=rt&&e.length<=rt&&t!==e){if(t.includes(`
49
+ `),d.split(`
50
+ `),o)}}const et=2e4;function isAsymmetricMatcher(e){return getType$1(e)===`Object`&&typeof e.asymmetricMatch==`function`}function isReplaceable(e,t){let r=getType$1(e);return r===getType$1(t)&&(r===`Object`||r===`Array`)}function printDiffOrStringify(e,t,r,o){let{aAnnotation:s,bAnnotation:c}=normalizeDiffOptions(r);if(typeof t==`string`&&typeof e==`string`&&t.length>0&&e.length>0&&t.length<=et&&e.length<=et&&t!==e){if(t.includes(`
31
51
  `)||e.includes(`
32
- `))return diffStringsUnified(t,e,r);let[c]=diffStringsRaw(t,e,!0),u=c.some(e=>e[0]===0),d=getLabelPrinter(o,s);return`${d(o)+printExpected$1(getCommonAndChangedSubstrings(c,-1,u))}\n${d(s)+printReceived$1(getCommonAndChangedSubstrings(c,1,u))}`}let c=deepClone(t,{forceWritable:!0}),{replacedExpected:u,replacedActual:d}=replaceAsymmetricMatcher(deepClone(e,{forceWritable:!0}),c);return diff(u,d,r)}function replaceAsymmetricMatcher(e,t,r=new WeakSet,o=new WeakSet){return e instanceof Error&&t instanceof Error&&e.cause!==void 0&&t.cause===void 0?(delete e.cause,{replacedActual:e,replacedExpected:t}):!isReplaceable(e,t)||r.has(e)||o.has(t)?{replacedActual:e,replacedExpected:t}:(r.add(e),o.add(t),getOwnProperties(t).forEach(s=>{let c=t[s],u=e[s];if(isAsymmetricMatcher(c)){if(c.asymmetricMatch(u))t[s]=u;else if(`sample`in c&&c.sample!==void 0&&isReplaceable(u,c.sample)){let d=replaceAsymmetricMatcher(u,c.sample,r,o);e[s]=d.replacedActual,t[s]=d.replacedExpected}}else if(isAsymmetricMatcher(u)){if(u.asymmetricMatch(c))e[s]=c;else if(`sample`in u&&u.sample!==void 0&&isReplaceable(u.sample,c)){let d=replaceAsymmetricMatcher(u.sample,c,r,o);e[s]=d.replacedActual,t[s]=d.replacedExpected}}else if(isReplaceable(u,c)){let d=replaceAsymmetricMatcher(u,c,r,o);e[s]=d.replacedActual,t[s]=d.replacedExpected}}),{replacedActual:e,replacedExpected:t})}function getLabelPrinter(...e){let t=e.reduce((e,t)=>t.length>e?t.length:e,0);return e=>`${e}: ${` `.repeat(t-e.length)}`}function replaceTrailingSpaces$1(e){return e.replace(/\s+$/gm,e=>`·`.repeat(e.length))}e(replaceTrailingSpaces$1,`replaceTrailingSpaces`);function printReceived$1(e){return o.red(replaceTrailingSpaces$1(stringify(e)))}e(printReceived$1,`printReceived`);function printExpected$1(e){return o.green(replaceTrailingSpaces$1(stringify(e)))}e(printExpected$1,`printExpected`);function getCommonAndChangedSubstrings(e,t,r){return e.reduce((e,s)=>e+(s[0]===0?s[1]:s[0]===t?r?o.inverse(s[1]):s[1]:``),``)}function isImmutable(e){return e&&(e[`@@__IMMUTABLE_ITERABLE__@@`]||e[`@@__IMMUTABLE_RECORD__@@`])}const it=Object.getPrototypeOf({});function getUnserializableMessage(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e==`string`?`<unserializable>: ${e}`:`<unserializable>`}function serializeValue(e,t=new WeakMap){if(!e||typeof e==`string`)return e;if(e instanceof Error&&`toJSON`in e&&typeof e.toJSON==`function`){let r=e.toJSON();return r&&r!==e&&typeof r==`object`&&(typeof e.message==`string`&&safe(()=>r.message??=normalizeErrorMessage(e.message)),typeof e.stack==`string`&&safe(()=>r.stack??=e.stack),typeof e.name==`string`&&safe(()=>r.name??=e.name),e.cause!=null&&safe(()=>r.cause??=serializeValue(e.cause,t))),serializeValue(r,t)}if(typeof e==`function`)return`Function<${e.name||`anonymous`}>`;if(typeof e==`symbol`)return e.toString();if(typeof e!=`object`)return e;if(typeof Buffer<`u`&&e instanceof Buffer)return`<Buffer(${e.length}) ...>`;if(typeof Uint8Array<`u`&&e instanceof Uint8Array)return`<Uint8Array(${e.length}) ...>`;if(isImmutable(e))return serializeValue(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype===`AsyncFunction`)return`Promise`;if(typeof Element<`u`&&e instanceof Element)return e.tagName;if(typeof e.toJSON==`function`)return serializeValue(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let r=Array(e.length);return t.set(e,r),e.forEach((e,o)=>{try{r[o]=serializeValue(e,t)}catch(e){r[o]=getUnserializableMessage(e)}}),r}else{let r=Object.create(null);t.set(e,r);let o=e;for(;o&&o!==it;)Object.getOwnPropertyNames(o).forEach(o=>{if(!(o in r))try{r[o]=serializeValue(e[o],t)}catch(e){delete r[o],r[o]=getUnserializableMessage(e)}}),o=Object.getPrototypeOf(o);return e instanceof Error&&safe(()=>r.message=normalizeErrorMessage(e.message)),r}}function safe(e){try{return e()}catch{}}function normalizeErrorMessage(e){return e.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,`$1`).replace(/__(vite_ssr_import|vi_import)_\d+__\./g,``).replace(/getByTestId('__vitest_\d+__')/g,`page`)}function processError(e,t,r=new WeakSet){if(!e||typeof e!=`object`)return{message:String(e)};let o=e;(o.showDiff||o.showDiff===void 0&&o.expected!==void 0&&o.actual!==void 0)&&(o.diff=printDiffOrStringify(o.actual,o.expected,{...t,...o.diffOptions})),`expected`in o&&typeof o.expected!=`string`&&(o.expected=stringify(o.expected,10)),`actual`in o&&typeof o.actual!=`string`&&(o.actual=stringify(o.actual,10));try{!r.has(o)&&typeof o.cause==`object`&&(r.add(o),o.cause=processError(o.cause,t,r))}catch{}try{return serializeValue(o)}catch(e){return serializeValue(Error(`Failed to fully serialize error: ${e?.message}\nInner error message: ${o?.message}`))}}const at=Symbol(`vitest:SAFE_TIMERS`);function getSafeTimers(){let{setTimeout:e,setInterval:t,clearInterval:r,clearTimeout:o,setImmediate:s,clearImmediate:c,queueMicrotask:u}=globalThis[at]||globalThis,{nextTick:d}=globalThis[at]||globalThis.process||{};return{nextTick:d,setTimeout:e,setInterval:t,clearInterval:r,clearTimeout:o,setImmediate:s,clearImmediate:c,queueMicrotask:u}}function delay(e,t=setTimeout){return new Promise(r=>t(r,e))}const ot=/^[A-Za-z]:\//;function normalizeWindowsPath(e=``){return e&&e.replace(/\\/g,`/`).replace(ot,e=>e.toUpperCase())}const st=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function cwd(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const resolve=function(...e){e=e.map(e=>normalizeWindowsPath(e));let t=``,r=!1;for(let o=e.length-1;o>=-1&&!r;o--){let s=o>=0?e[o]:cwd();!s||s.length===0||(t=`${s}/${t}`,r=isAbsolute(s))}return t=normalizeString(t,!r),r&&!isAbsolute(t)?`/${t}`:t.length>0?t:`.`};function normalizeString(e,t){let r=``,o=0,s=-1,c=0,u=null;for(let d=0;d<=e.length;++d){if(d<e.length)u=e[d];else if(u===`/`)break;else u=`/`;if(u===`/`){if(!(s===d-1||c===1))if(c===2){if(r.length<2||o!==2||r[r.length-1]!==`.`||r[r.length-2]!==`.`){if(r.length>2){let e=r.lastIndexOf(`/`);e===-1?(r=``,o=0):(r=r.slice(0,e),o=r.length-1-r.lastIndexOf(`/`)),s=d,c=0;continue}else if(r.length>0){r=``,o=0,s=d,c=0;continue}}t&&(r+=r.length>0?`/..`:`..`,o=2)}else r.length>0?r+=`/${e.slice(s+1,d)}`:r=e.slice(s+1,d),o=d-s-1;s=d,c=0}else u===`.`&&c!==-1?++c:c=-1}return r}const isAbsolute=function(e){return st.test(e)};var ct=44,lt=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,ut=new Uint8Array(64),dt=new Uint8Array(128);for(let e=0;e<lt.length;e++){let t=lt.charCodeAt(e);ut[e]=t,dt[t]=e}function decodeInteger(e,t){let r=0,o=0,s=0;do s=dt[e.next()],r|=(s&31)<<o,o+=5;while(s&32);let c=r&1;return r>>>=1,c&&(r=-2147483648|-r),t+r}function hasMoreVlq(e,t){return e.pos>=t?!1:e.peek()!==ct}var StringReader=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){let{buffer:t,pos:r}=this,o=t.indexOf(e,r);return o===-1?t.length:o}};function decode(e){let{length:t}=e,r=new StringReader(e),o=[],s=0,c=0,u=0,d=0,p=0;do{let e=r.indexOf(`;`),t=[],m=!0,h=0;for(s=0;r.pos<e;){let o;s=decodeInteger(r,s),s<h&&(m=!1),h=s,hasMoreVlq(r,e)?(c=decodeInteger(r,c),u=decodeInteger(r,u),d=decodeInteger(r,d),hasMoreVlq(r,e)?(p=decodeInteger(r,p),o=[s,c,u,d,p]):o=[s,c,u,d]):o=[s],t.push(o),r.pos++}m||sort(t),o.push(t),r.pos=e+1}while(r.pos<=t);return o}function sort(e){e.sort(sortComparator)}function sortComparator(e,t){return e[0]-t[0]}var M=0,ft=1,pt=2,mt=3,ht=4,gt=!1;function binarySearch(e,t,r,o){for(;r<=o;){let s=r+(o-r>>1),c=e[s][M]-t;if(c===0)return gt=!0,s;c<0?r=s+1:o=s-1}return gt=!1,r-1}function upperBound(e,t,r){for(let o=r+1;o<e.length&&e[o][M]===t;r=o++);return r}function lowerBound(e,t,r){for(let o=r-1;o>=0&&e[o][M]===t;r=o--);return r}function memoizedBinarySearch(e,t,r,o){let{lastKey:s,lastNeedle:c,lastIndex:u}=r,d=0,p=e.length-1;if(o===s){if(t===c)return gt=u!==-1&&e[u][M]===t,u;t>=c?d=u===-1?0:u:p=u}return r.lastKey=o,r.lastNeedle=t,r.lastIndex=binarySearch(e,t,d,p)}var _t="`line` must be greater than 0 (lines start at line 1)",vt="`column` must be greater than or equal to 0 (columns start at column 0)",yt=-1,bt=1;function cast(e){return e}function decodedMappings(e){var t;return(t=cast(e))._decoded||(t._decoded=decode(cast(e)._encoded))}function originalPositionFor(e,t){let{line:r,column:o,bias:s}=t;if(r--,r<0)throw Error(_t);if(o<0)throw Error(vt);let c=decodedMappings(e);if(r>=c.length)return OMapping(null,null,null,null);let u=c[r],d=traceSegmentInternal(u,cast(e)._decodedMemo,r,o,s||bt);if(d===-1)return OMapping(null,null,null,null);let p=u[d];if(p.length===1)return OMapping(null,null,null,null);let{names:m,resolvedSources:h}=e;return OMapping(h[p[ft]],p[pt]+1,p[mt],p.length===5?m[p[ht]]:null)}function OMapping(e,t,r,o){return{source:e,line:t,column:r,name:o}}function traceSegmentInternal(e,t,r,o,s){let c=memoizedBinarySearch(e,o,t,r);return gt?c=(s===yt?upperBound:lowerBound)(e,o,c):s===yt&&c++,c===-1||c===e.length?-1:c}const xt=/^\s*at .*(?:\S:\d+|\(native\))/m,St=/^(?:eval@)?(?:\[native code\])?$/,Ct=[`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__/,`/@id/__x00__vitest/browser`,/\/deps\/vitest_/],wt=Date.now().toString().length,Tt=RegExp(`vitest=\\d{${wt}}`);function extractLocation(e){if(!e.includes(`:`))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,``));if(!t)return[e];let r=t[1];if(r.startsWith(`async `)&&(r=r.slice(6)),r.startsWith(`http:`)||r.startsWith(`https:`)){let e=new URL(r);e.searchParams.delete(`import`),e.searchParams.delete(`browserv`),r=e.pathname+e.hash+e.search}if(r.startsWith(`/@fs/`)){let e=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(e?5:4)}return r.includes(`vitest=`)&&(r=r.replace(Tt,``).replace(/[?&]$/,``)),[r,t[2]||void 0,t[3]||void 0]}function parseSingleFFOrSafariStack(e){let t=e.trim();if(St.test(t)||(t.includes(` > eval`)&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!t.includes(`@`)))return null;let r=-1,o=``,s;for(let e=0;e<t.length;e++)if(t[e]===`@`){let c=t.slice(e+1);if(c.includes(`:`)&&c.length>=3){r=e,o=c,s=e>0?t.slice(0,e):void 0;break}}if(r===-1||!o.includes(`:`)||o.length<3)return null;let[c,u,d]=extractLocation(o);return!c||!u||!d?null:{file:c,method:s||``,line:Number.parseInt(u),column:Number.parseInt(d)}}function parseSingleStack(e){let t=e.trim();return xt.test(t)?parseSingleV8Stack(t):parseSingleFFOrSafariStack(t)}function parseSingleV8Stack(e){let t=e.trim();if(!xt.test(t))return null;t.includes(`(eval `)&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let r=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),o=r.match(/ (\(.+\)$)/);r=o?r.replace(o[0],``):r;let[s,c,u]=extractLocation(o?o[1]:r),d=o&&r||``,p=s&&[`eval`,`<anonymous>`].includes(s)?void 0:s;return!p||!c||!u?null:(d.startsWith(`async `)&&(d=d.slice(6)),p.startsWith(`file://`)&&(p=p.slice(7)),p=p.startsWith(`node:`)||p.startsWith(`internal:`)?p:resolve(p),d&&=d.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,`$1`).replace(/__(vite_ssr_import|vi_import)_\d+__\./g,``).replace(/(Object\.)?__vite_ssr_export_default__\s?/g,``),{method:d,file:p,line:Number.parseInt(c),column:Number.parseInt(u)})}function parseStacktrace(e,t={}){let{ignoreStackEntries:r=Ct}=t,o=xt.test(e)?parseV8Stacktrace(e):parseFFOrSafariStackTrace(e),s=o.findLastIndex(e=>e.method.includes(`__VITEST_HELPER__`));return s>=0&&(o=o.slice(s+1)),o.map(e=>{t.getUrlId&&(e.file=t.getUrlId(e.file));let o=t.getSourceMap?.(e.file);if(!o||typeof o!=`object`||!o.version)return shouldFilter(r,e.file)?null:e;let s=getOriginalPosition(new DecodedMap(o,e.file),e);if(!s)return e;let{line:c,column:u,source:d,name:p}=s,m=d||e.file;return m.match(/\/\w:\//)&&(m=m.slice(1)),shouldFilter(r,m)?null:c!=null&&u!=null?{line:c,column:u,file:m,method:p||e.method}:e}).filter(e=>e!=null)}function shouldFilter(e,t){return e.some(e=>t.match(e))}function parseFFOrSafariStackTrace(e){return e.split(`
52
+ `))return diffStringsUnified(t,e,r);let[o]=diffStringsRaw(t,e,!0),u=o.some(e=>e[0]===0),d=getLabelPrinter(s,c);return`${d(s)+printExpected$1(getCommonAndChangedSubstrings(o,-1,u))}\n${d(c)+printReceived$1(getCommonAndChangedSubstrings(o,1,u))}`}let u=deepClone(t,{forceWritable:!0}),{replacedExpected:d,replacedActual:p}=replaceAsymmetricMatcher(deepClone(e,{forceWritable:!0}),u);return diff(d,p,r,o?createMemorize(o):DEFAULT_MEMORIZE)}function replaceAsymmetricMatcher(e,t,r=new WeakSet,o=new WeakSet){return e instanceof Error&&t instanceof Error&&e.cause!==void 0&&t.cause===void 0?(delete e.cause,{replacedActual:e,replacedExpected:t}):!isReplaceable(e,t)||r.has(e)||o.has(t)?{replacedActual:e,replacedExpected:t}:(r.add(e),o.add(t),getOwnProperties(t).forEach(s=>{let c=t[s],u=e[s];if(isAsymmetricMatcher(c)){if(c.asymmetricMatch(u))t[s]=u;else if(`sample`in c&&c.sample!==void 0&&isReplaceable(u,c.sample)){let d=replaceAsymmetricMatcher(u,c.sample,r,o);e[s]=d.replacedActual,t[s]=d.replacedExpected}}else if(isAsymmetricMatcher(u)){if(u.asymmetricMatch(c))e[s]=c;else if(`sample`in u&&u.sample!==void 0&&isReplaceable(u.sample,c)){let d=replaceAsymmetricMatcher(u.sample,c,r,o);e[s]=d.replacedActual,t[s]=d.replacedExpected}}else if(isReplaceable(u,c)){let d=replaceAsymmetricMatcher(u,c,r,o);e[s]=d.replacedActual,t[s]=d.replacedExpected}}),{replacedActual:e,replacedExpected:t})}function getLabelPrinter(...e){let t=e.reduce((e,t)=>t.length>e?t.length:e,0);return e=>`${e}: ${` `.repeat(t-e.length)}`}function replaceTrailingSpaces$1(e){return e.replace(/\s+$/gm,e=>`·`.repeat(e.length))}e(replaceTrailingSpaces$1,`replaceTrailingSpaces`);function printReceived$1(e){return o.red(replaceTrailingSpaces$1(stringify(e)))}e(printReceived$1,`printReceived`);function printExpected$1(e){return o.green(replaceTrailingSpaces$1(stringify(e)))}e(printExpected$1,`printExpected`);function getCommonAndChangedSubstrings(e,t,r){return e.reduce((e,s)=>e+(s[0]===0?s[1]:s[0]===t?r?o.inverse(s[1]):s[1]:``),``)}function isImmutable(e){return e&&(e[`@@__IMMUTABLE_ITERABLE__@@`]||e[`@@__IMMUTABLE_RECORD__@@`])}const tt=Object.getPrototypeOf({});function getUnserializableMessage(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e==`string`?`<unserializable>: ${e}`:`<unserializable>`}function serializeValue(e,t=new WeakMap){if(!e||typeof e==`string`)return e;if(e instanceof Error&&`toJSON`in e&&typeof e.toJSON==`function`){let r=e.toJSON();return r&&r!==e&&typeof r==`object`&&(typeof e.message==`string`&&safe(()=>r.message??=normalizeErrorMessage(e.message)),typeof e.stack==`string`&&safe(()=>r.stack??=e.stack),typeof e.name==`string`&&safe(()=>r.name??=e.name),e.cause!=null&&safe(()=>r.cause??=serializeValue(e.cause,t))),serializeValue(r,t)}if(typeof e==`function`)return`Function<${e.name||`anonymous`}>`;if(typeof e==`symbol`)return e.toString();if(typeof e!=`object`)return e;if(typeof Buffer<`u`&&e instanceof Buffer)return`<Buffer(${e.length}) ...>`;if(typeof Uint8Array<`u`&&e instanceof Uint8Array)return`<Uint8Array(${e.length}) ...>`;if(isImmutable(e))return serializeValue(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype===`AsyncFunction`)return`Promise`;if(typeof Element<`u`&&e instanceof Element)return e.tagName;if(typeof e.toJSON==`function`)return serializeValue(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let r=Array(e.length);return t.set(e,r),e.forEach((e,o)=>{try{r[o]=serializeValue(e,t)}catch(e){r[o]=getUnserializableMessage(e)}}),r}else{let r=Object.create(null);t.set(e,r);let o=e;for(;o&&o!==tt;)Object.getOwnPropertyNames(o).forEach(o=>{if(!(o in r))try{r[o]=serializeValue(e[o],t)}catch(e){delete r[o],r[o]=getUnserializableMessage(e)}}),o=Object.getPrototypeOf(o);return e instanceof Error&&safe(()=>r.message=normalizeErrorMessage(e.message)),r}}function safe(e){try{return e()}catch{}}function normalizeErrorMessage(e){return e.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,`$1`).replace(/__(vite_ssr_import|vi_import)_\d+__\./g,``).replace(/getByTestId('__vitest_\d+__')/g,`page`)}function processError(e,t,r=new WeakSet){if(!e||typeof e!=`object`)return{message:String(e)};let o=e;if(o.showDiff||o.showDiff===void 0&&o.expected!==void 0&&o.actual!==void 0){let e={...t,...o.diffOptions};o.diff=printDiffOrStringify(o.actual,o.expected,e,o),o.expected=prettifyValue(o.expected,e),o.actual=prettifyValue(o.actual,e)}try{!r.has(o)&&typeof o.cause==`object`&&(r.add(o),o.cause=processError(o.cause,t,r))}catch{}try{return serializeValue(o)}catch(e){return serializeValue(Error(`Failed to fully serialize error: ${e?.message}\nInner error message: ${o?.message}`))}}function prettifyValue(e,t){return typeof e==`string`?e:format$1(e,getDefaultFormatOptions(t))}const nt=Symbol(`vitest:SAFE_TIMERS`);function getSafeTimers(){let{setTimeout:e,setInterval:t,clearInterval:r,clearTimeout:o,setImmediate:s,clearImmediate:c,queueMicrotask:u}=globalThis[nt]||globalThis,{nextTick:d}=globalThis[nt]||globalThis.process||{};return{nextTick:d,setTimeout:e,setInterval:t,clearInterval:r,clearTimeout:o,setImmediate:s,clearImmediate:c,queueMicrotask:u}}function delay(e,t=setTimeout){return new Promise(r=>t(r,e))}const rt=/^[A-Za-z]:\//;function normalizeWindowsPath(e=``){return e&&e.replace(/\\/g,`/`).replace(rt,e=>e.toUpperCase())}const it=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function cwd(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const resolve=function(...e){e=e.map(e=>normalizeWindowsPath(e));let t=``,r=!1;for(let o=e.length-1;o>=-1&&!r;o--){let s=o>=0?e[o]:cwd();!s||s.length===0||(t=`${s}/${t}`,r=isAbsolute(s))}return t=normalizeString(t,!r),r&&!isAbsolute(t)?`/${t}`:t.length>0?t:`.`};function normalizeString(e,t){let r=``,o=0,s=-1,c=0,u=null;for(let d=0;d<=e.length;++d){if(d<e.length)u=e[d];else if(u===`/`)break;else u=`/`;if(u===`/`){if(!(s===d-1||c===1))if(c===2){if(r.length<2||o!==2||r[r.length-1]!==`.`||r[r.length-2]!==`.`){if(r.length>2){let e=r.lastIndexOf(`/`);e===-1?(r=``,o=0):(r=r.slice(0,e),o=r.length-1-r.lastIndexOf(`/`)),s=d,c=0;continue}else if(r.length>0){r=``,o=0,s=d,c=0;continue}}t&&(r+=r.length>0?`/..`:`..`,o=2)}else r.length>0?r+=`/${e.slice(s+1,d)}`:r=e.slice(s+1,d),o=d-s-1;s=d,c=0}else u===`.`&&c!==-1?++c:c=-1}return r}const isAbsolute=function(e){return it.test(e)};var at=44,ot=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,st=new Uint8Array(64),ct=new Uint8Array(128);for(let e=0;e<ot.length;e++){let t=ot.charCodeAt(e);st[e]=t,ct[t]=e}function decodeInteger(e,t){let r=0,o=0,s=0;do s=ct[e.next()],r|=(s&31)<<o,o+=5;while(s&32);let c=r&1;return r>>>=1,c&&(r=-2147483648|-r),t+r}function hasMoreVlq(e,t){return e.pos>=t?!1:e.peek()!==at}var StringReader=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){let{buffer:t,pos:r}=this,o=t.indexOf(e,r);return o===-1?t.length:o}};function decode(e){let{length:t}=e,r=new StringReader(e),o=[],s=0,c=0,u=0,d=0,p=0;do{let e=r.indexOf(`;`),t=[],m=!0,h=0;for(s=0;r.pos<e;){let o;s=decodeInteger(r,s),s<h&&(m=!1),h=s,hasMoreVlq(r,e)?(c=decodeInteger(r,c),u=decodeInteger(r,u),d=decodeInteger(r,d),hasMoreVlq(r,e)?(p=decodeInteger(r,p),o=[s,c,u,d,p]):o=[s,c,u,d]):o=[s],t.push(o),r.pos++}m||sort(t),o.push(t),r.pos=e+1}while(r.pos<=t);return o}function sort(e){e.sort(sortComparator)}function sortComparator(e,t){return e[0]-t[0]}var lt=0,ut=1,dt=2,ft=3,pt=4,mt=!1;function binarySearch(e,t,r,o){for(;r<=o;){let s=r+(o-r>>1),c=e[s][lt]-t;if(c===0)return mt=!0,s;c<0?r=s+1:o=s-1}return mt=!1,r-1}function upperBound(e,t,r){for(let o=r+1;o<e.length&&e[o][lt]===t;r=o++);return r}function lowerBound(e,t,r){for(let o=r-1;o>=0&&e[o][lt]===t;r=o--);return r}function memoizedBinarySearch(e,t,r,o){let{lastKey:s,lastNeedle:c,lastIndex:u}=r,d=0,p=e.length-1;if(o===s){if(t===c)return mt=u!==-1&&e[u][lt]===t,u;t>=c?d=u===-1?0:u:p=u}return r.lastKey=o,r.lastNeedle=t,r.lastIndex=binarySearch(e,t,d,p)}var ht="`line` must be greater than 0 (lines start at line 1)",gt="`column` must be greater than or equal to 0 (columns start at column 0)",_t=-1,vt=1;function cast(e){return e}function decodedMappings(e){var t;return(t=cast(e))._decoded||(t._decoded=decode(cast(e)._encoded))}function originalPositionFor(e,t){let{line:r,column:o,bias:s}=t;if(r--,r<0)throw Error(ht);if(o<0)throw Error(gt);let c=decodedMappings(e);if(r>=c.length)return OMapping(null,null,null,null);let u=c[r],d=traceSegmentInternal(u,cast(e)._decodedMemo,r,o,s||vt);if(d===-1)return OMapping(null,null,null,null);let p=u[d];if(p.length===1)return OMapping(null,null,null,null);let{names:m,resolvedSources:h}=e;return OMapping(h[p[ut]],p[dt]+1,p[ft],p.length===5?m[p[pt]]:null)}function OMapping(e,t,r,o){return{source:e,line:t,column:r,name:o}}function traceSegmentInternal(e,t,r,o,s){let c=memoizedBinarySearch(e,o,t,r);return mt?c=(s===_t?upperBound:lowerBound)(e,o,c):s===_t&&c++,c===-1||c===e.length?-1:c}const yt=/^\s*at .*(?:\S:\d+|\(native\))/m,bt=/^(?:eval@)?(?:\[native code\])?$/,xt=[`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__/,`/@id/__x00__vitest/browser`,/\/deps\/vitest_/],St=Date.now().toString().length,Ct=RegExp(`vitest=\\d{${St}}`);function extractLocation(e){if(!e.includes(`:`))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,``));if(!t)return[e];let r=t[1];if(r.startsWith(`async `)&&(r=r.slice(6)),r.startsWith(`http:`)||r.startsWith(`https:`)){let e=new URL(r);e.searchParams.delete(`import`),e.searchParams.delete(`browserv`),r=e.pathname+e.hash+e.search}if(r.startsWith(`/@fs/`)){let e=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(e?5:4)}return r.includes(`vitest=`)&&(r=r.replace(Ct,``).replace(/[?&]$/,``)),[r,t[2]||void 0,t[3]||void 0]}function parseSingleFFOrSafariStack(e){let t=e.trim();if(bt.test(t)||(t.includes(` > eval`)&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!t.includes(`@`)))return null;let r=-1,o=``,s;for(let e=0;e<t.length;e++)if(t[e]===`@`){let c=t.slice(e+1);if(c.includes(`:`)&&c.length>=3){r=e,o=c,s=e>0?t.slice(0,e):void 0;break}}if(r===-1||!o.includes(`:`)||o.length<3)return null;let[c,u,d]=extractLocation(o);return!c||!u||!d?null:{file:c,method:s||``,line:Number.parseInt(u),column:Number.parseInt(d)}}function parseSingleStack(e){let t=e.trim();return yt.test(t)?parseSingleV8Stack(t):parseSingleFFOrSafariStack(t)}function parseSingleV8Stack(e){let t=e.trim();if(!yt.test(t))return null;t.includes(`(eval `)&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let r=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),o=r.match(/ (\(.+\)$)/);r=o?r.replace(o[0],``):r;let[s,c,u]=extractLocation(o?o[1]:r),d=o&&r||``,p=s&&[`eval`,`<anonymous>`].includes(s)?void 0:s;return!p||!c||!u?null:(d.startsWith(`async `)&&(d=d.slice(6)),p.startsWith(`file://`)&&(p=p.slice(7)),p=p.startsWith(`node:`)||p.startsWith(`internal:`)?p:resolve(p),d&&=d.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,`$1`).replace(/__(vite_ssr_import|vi_import)_\d+__\./g,``).replace(/(Object\.)?__vite_ssr_export_default__\s?/g,``),{method:d,file:p,line:Number.parseInt(c),column:Number.parseInt(u)})}function parseStacktrace(e,t={}){let{ignoreStackEntries:r=xt}=t,o=yt.test(e)?parseV8Stacktrace(e):parseFFOrSafariStackTrace(e),s=o.findLastIndex(e=>e.method.includes(`__VITEST_HELPER__`));return s>=0&&(o=o.slice(s+1)),o.map(e=>{t.getUrlId&&(e.file=t.getUrlId(e.file));let o=t.getSourceMap?.(e.file);if(!o||typeof o!=`object`||!o.version)return shouldFilter(r,e.file)?null:e;let s=getOriginalPosition(new DecodedMap(o,e.file),e);if(!s)return e;let{line:c,column:u,source:d,name:p}=s,m=d||e.file;return m.match(/\/\w:\//)&&(m=m.slice(1)),shouldFilter(r,m)?null:c!=null&&u!=null?{line:c,column:u,file:m,method:p||e.method}:e}).filter(e=>e!=null)}function shouldFilter(e,t){return e.some(e=>t.match(e))}function parseFFOrSafariStackTrace(e){return e.split(`
33
53
  `).map(e=>parseSingleFFOrSafariStack(e)).filter(notNullish)}function parseV8Stacktrace(e){return e.split(`
34
- `).map(e=>parseSingleV8Stack(e)).filter(notNullish)}function parseErrorStacktrace(e,t={}){if(!e||isPrimitive$1(e))return[];if(`stacks`in e&&e.stacks)return e.stacks;let r=e.stack||``,o=typeof r==`string`?parseStacktrace(r,t):[];if(!o.length){let r=e;r.fileName!=null&&r.lineNumber!=null&&r.columnNumber!=null&&(o=parseStacktrace(`${r.fileName}:${r.lineNumber}:${r.columnNumber}`,t)),r.sourceURL!=null&&r.line!=null&&r._column!=null&&(o=parseStacktrace(`${r.sourceURL}:${r.line}:${r.column}`,t))}return t.frameFilter&&(o=o.filter(r=>t.frameFilter(e,r)!==!1)),e.stacks=o,o}var DecodedMap=class{_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(e,t){this.map=e;let{mappings:r,names:o,sources:s}=e;this.version=e.version,this.names=o||[],this._encoded=r||``,this._decodedMemo=memoizedState(),this.url=t,this.resolvedSources=(s||[]).map(e=>resolve(t,`..`,e||``))}};function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function getOriginalPosition(e,t){let r=originalPositionFor(e,t);return r.column==null?null:r}var PendingError=class extends Error{code=`VITEST_PENDING`;taskId;constructor(e,t,r){super(e),this.message=e,this.note=r,this.taskId=t.id}},FixtureDependencyError=class extends Error{name=`FixtureDependencyError`},FixtureAccessError=class extends Error{name=`FixtureAccessError`},FixtureParseError=class extends Error{name=`FixtureParseError`};const Et=new WeakMap,Dt=new WeakMap,Ot=new WeakMap;function setFn(e,t){Et.set(e,t)}function setTestFixture(e,t){Dt.set(e,t)}function getTestFixtures(e){return Dt.get(e)}function setHooks(e,t){Ot.set(e,t)}function getHooks(e){return Ot.get(e)}const kt=Symbol.for(`VITEST_FIXTURE_STACK_TRACE`);var At=class TestFixtures{_suiteContexts;_overrides=new WeakMap;_registrations;static _definitions=[];static _builtinFixtures=[`task`,`signal`,`onTestFailed`,`onTestFinished`,`skip`,`annotate`];static _fixtureOptionKeys=[`auto`,`injected`,`scope`];static _fixtureScopes=[`test`,`file`,`worker`];static _workerContextSuite={type:`worker`};static clearDefinitions(){TestFixtures._definitions.length=0}static getWorkerContexts(){return TestFixtures._definitions.map(e=>e.getWorkerContext())}static getFileContexts(e){return TestFixtures._definitions.map(t=>t.getFileContext(e))}static isFixtureOptions(e){return isObject(e)&&Object.keys(e).some(e=>TestFixtures._fixtureOptionKeys.includes(e))}constructor(e){this._registrations=e??new Map,this._suiteContexts=new WeakMap,TestFixtures._definitions.push(this)}extend(e,t){let{suite:r}=getCurrentSuite(),o=!r||r.file===r;return new TestFixtures(this.parseUserFixtures(e,t,o))}get(e){let t=e;for(;t;){let e=this._overrides.get(t);if(e)return e;if(t===t.file)break;t=t.suite||t.file}return this._registrations}override(e,t){let{suite:r,file:o}=getCurrentSuite(),s=r||o,c=!r||r.file===r,u=new Map(this.get(s)),d=this.parseUserFixtures(e,t,c,u);c?this._registrations=d:this._overrides.set(s,d)}getFileContext(e){return this._suiteContexts.has(e)||this._suiteContexts.set(e,Object.create(null)),this._suiteContexts.get(e)}getWorkerContext(){return this._suiteContexts.has(TestFixtures._workerContextSuite)||this._suiteContexts.set(TestFixtures._workerContextSuite,Object.create(null)),this._suiteContexts.get(TestFixtures._workerContextSuite)}parseUserFixtures(e,t,r,o=new Map(this._registrations)){let s=[];Object.entries(t).forEach(([t,c])=>{let u,d,p;Array.isArray(c)&&c.length>=2&&TestFixtures.isFixtureOptions(c[1])?(p=c[1],u={auto:p.auto??!1,scope:p.scope??`test`,injected:p.injected??!1},d=u.injected?e.injectValue?.(t)??c[0]:c[0]):d=c;let m=o.get(t);m&&u?(m.scope!==u.scope&&s.push(new FixtureDependencyError(`The "${t}" fixture was already registered with a "${u.scope}" scope.`)),m.auto!==u.auto&&s.push(new FixtureDependencyError(`The "${t}" fixture was already registered as { auto: ${u.auto} }.`))):m?u={auto:m.auto,scope:m.scope,injected:m.injected}:u||={auto:!1,injected:!1,scope:`test`},u.scope&&!TestFixtures._fixtureScopes.includes(u.scope)&&s.push(new FixtureDependencyError(`The "${t}" fixture has unknown scope "${u.scope}".`)),!r&&u.scope!==`test`&&s.push(new FixtureDependencyError(`The "${t}" fixture cannot be defined with a ${u.scope} scope${!p?.scope&&m?.scope?` (inherited from the base fixture)`:``} inside the describe block. Define it at the top level of the file instead.`));let h=isFixtureFunction(d)?getUsedProps(d):new Set,g={name:t,value:d,auto:u.auto??!1,injected:u.injected??!1,scope:u.scope??`test`,deps:h,parent:m};isFixtureFunction(d)&&Object.assign(d,{[kt]:Error(`STACK_TRACE_ERROR`)}),o.set(t,g),g.scope===`worker`&&(e.pool===`vmThreads`||e.pool===`vmForks`)&&(g.scope=`file`)});for(let e of o.values())for(let t of e.deps){if(TestFixtures._builtinFixtures.includes(t))continue;let r=o.get(t);if(!r){s.push(new FixtureDependencyError(`The "${e.name}" fixture depends on unknown fixture "${t}".`));continue}if(t===e.name&&!e.parent){s.push(new FixtureDependencyError(`The "${e.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(TestFixtures._fixtureScopes.indexOf(e.scope)>TestFixtures._fixtureScopes.indexOf(r.scope)){s.push(new FixtureDependencyError(`The ${e.scope} "${e.name}" fixture cannot depend on a ${r.scope} fixture "${r.name}".`));continue}}if(s.length===1)throw s[0];if(s.length>1)throw AggregateError(s,`Cannot resolve user fixtures. See errors for more information.`);return o}};const N=new WeakMap,jt=new WeakMap;function withFixtures(e,t){let r=getCurrentSuite(),o=t?.suite||r.suite||r.file;return async r=>{let s=r||t?.context;if(!s)return t?.suiteHook&&validateSuiteHook(e,t.suiteHook,t.stackTraceError),e({});let c=t?.fixtures||getTestFixtures(s);if(!c)return e(s);let u=c.get(o);if(!u.size)return e(s);let d=[],p=getUsedProps(e);for(let e of u.values())(isAutoFixture(e,t)||p.has(e.name))&&d.push(e);if(!d.length)return e(s);N.has(s)||N.set(s,[]);let m=N.get(s),h=resolveDeps(d,u);if(!h.length)return e(s);if(t?.suiteHook){let e=h.filter(e=>e.scope===`test`);if(e.length>0){let r=e.map(e=>`"${e.name}"`).join(`, `),o=new FixtureDependencyError(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${r}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${{aroundAll:`aroundEach`,beforeAll:`beforeEach`,afterAll:`afterEach`}[t.suiteHook]} hook.`);throw t.stackTraceError?.stack&&(o.stack=o.message+t.stackTraceError.stack.replace(t.stackTraceError.message,``)),o}}jt.has(s)||jt.set(s,new WeakSet);let g=jt.get(s);for(let e of h)if(e.scope===`test`){if(g.has(e))continue;g.add(e);let t=await resolveTestFixtureValue(e,s,m);s[e.name]=t,m.push(()=>{g.delete(e)})}else{let t=await resolveScopeFixtureValue(c,o,e);s[e.name]=t}return e(s)}}function isAutoFixture(e,t){return!(!e.auto||t?.suiteHook&&e.scope===`test`)}function isFixtureFunction(e){return typeof e==`function`}function resolveTestFixtureValue(e,t,r){return isFixtureFunction(e.value)?resolveFixtureFunction(e.value,e.name,t,r):e.value}const Mt=new WeakMap;async function resolveScopeFixtureValue(e,t,r){let o=e.getWorkerContext(),s=e.getFileContext(t.file),c=r.scope===`worker`?o:s;if(!isFixtureFunction(r.value))return c[r.name]=r.value,r.value;if(r.name in c)return c[r.name];if(Mt.has(r))return Mt.get(r);N.has(c)||N.set(c,[]);let u=N.get(c),d=resolveFixtureFunction(r.value,r.name,r.scope===`file`?{...o,...s}:c,u).then(e=>(c[r.name]=e,Mt.delete(r),e));return Mt.set(r,d),d}async function resolveFixtureFunction(e,t,r,o){let s=createDefer(),c=kt in e&&e[kt]instanceof Error?e[kt]:void 0,u=!1,d=e(r,async e=>{u=!0,s.resolve(e);let t=createDefer();o.push(async()=>{t.resolve(),await d}),await t}).then(()=>{if(!u){let e=Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);c?.stack&&(e.stack=e.message+c.stack.replace(c.message,``)),s.reject(e)}}).catch(e=>{if(!u){s.reject(e);return}throw e});return s}function resolveDeps(e,t,r=new Set,o=[]){return e.forEach(e=>{if(!o.includes(e)){if(!isFixtureFunction(e.value)||!e.deps){o.push(e);return}if(r.has(e))if(e.parent)e=e.parent;else throw Error(`Circular fixture dependency detected: ${e.name} <- ${[...r].reverse().map(e=>e.name).join(` <- `)}`);r.add(e),resolveDeps([...e.deps].map(r=>r===e.name?e.parent:t.get(r)).filter(e=>!!e),t,r,o),o.push(e),r.clear()}}),o}function validateSuiteHook(e,t,r){let o=getUsedProps(e,{sourceError:r,suiteHook:t});if(o.size){let e=new FixtureAccessError(`The ${t} hook uses fixtures "${[...o].join(`", "`)}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?\nIf you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw r&&(e.stack=r.stack?.replace(r.message,e.message)),e}}const Nt=Symbol(`$vitest:fixture-props`),Pt=Symbol(`$vitest:fixture-prop-names`);function configureProps(e,t){Object.defineProperty(e,Nt,{value:t,enumerable:!1})}function memoProps(e,t){return e[Pt]=t,t}function getUsedProps(e,{sourceError:t,suiteHook:r}={}){if(Pt in e)return e[Pt];let{index:o=0,original:s=e}=Nt in e?e[Nt]:{},c=filterOutComments(s.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(c)&&(c=c.split(/__async\((?:this|null),/)[1]);let u=c.match(/[^(]*\(([^)]*)/);if(!u)return memoProps(e,new Set);let d=splitByComma(u[1]);if(!d.length)return memoProps(e,new Set);let p=d[o];if(!p)return memoProps(e,new Set);if(!(p[0]===`{`&&p.endsWith(`}`))){let e=ordinal(o+1),s=new FixtureParseError(`The ${e} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${p}".${r?` If you used internal "suite" task as the ${e} argument previously, access it in the ${ordinal(o+2)} argument instead.`:``}`);throw t&&(s.stack=t.stack?.replace(t.message,s.message)),s}let m=splitByComma(p.slice(1,-1).replace(/\s/g,``)).map(e=>e.replace(/:.*|=.*/g,``)),h=m.at(-1);if(h&&h.startsWith(`...`)){let e=new FixtureParseError(`Rest parameters are not supported in fixtures, received "${h}".`);throw t&&(e.stack=t.stack?.replace(t.message,e.message)),e}return memoProps(e,new Set(m))}function splitByComma(e){let t=[],r=[],o=0;for(let s=0;s<e.length;s++)if(e[s]===`{`||e[s]===`[`)r.push(e[s]===`{`?`}`:`]`);else if(e[s]===r.at(-1))r.pop();else if(!r.length&&e[s]===`,`){let r=e.substring(o,s).trim();r&&t.push(r),o=s+1}let s=e.substring(o).trim();return s&&t.push(s),t}const Ft=Symbol(`kChainableContext`);function getChainableContext(e){return e?.[Ft]}function createChainable(e,t,r){function create(r){let chain=function(...e){return t.apply(r,e)};Object.assign(chain,t),Object.defineProperty(chain,Ft,{value:{withContext:()=>chain.bind(r),getFixtures:()=>r.fixtures,setContext:(e,t)=>{r[e]=t},mergeContext:e=>{Object.assign(r,e)}},enumerable:!1});for(let t of e)Object.defineProperty(chain,t,{get(){return create({...r,[t]:!0})}});return chain}let o=create(r??{});return Object.defineProperty(o,`fn`,{value:t,enumerable:!1}),o}function getDefaultHookTimeout(){return getRunner().config.hookTimeout}const It=Symbol.for(`VITEST_CLEANUP_TIMEOUT`),Lt=Symbol.for(`VITEST_CLEANUP_STACK_TRACE`),Rt=Symbol.for(`VITEST_AROUND_TIMEOUT`),zt=Symbol.for(`VITEST_AROUND_STACK_TRACE`);function beforeAll(e,t=getDefaultHookTimeout()){assertTypes(e,`"beforeAll" callback`,[`function`]);let r=Error(`STACK_TRACE_ERROR`),o=getChainableContext(this);return getCurrentSuite().on(`beforeAll`,Object.assign(withTimeout(withSuiteFixtures(`beforeAll`,e,o,r),t,!0,r),{[It]:t,[Lt]:r}))}function afterAll(e,t){assertTypes(e,`"afterAll" callback`,[`function`]);let r=getChainableContext(this),o=Error(`STACK_TRACE_ERROR`);return getCurrentSuite().on(`afterAll`,withTimeout(withSuiteFixtures(`afterAll`,e,r,o),t??getDefaultHookTimeout(),!0,o))}function beforeEach(e,t=getDefaultHookTimeout()){assertTypes(e,`"beforeEach" callback`,[`function`]);let r=Error(`STACK_TRACE_ERROR`),wrapper=(t,r)=>withFixtures(e,{suite:r})(t);return getCurrentSuite().on(`beforeEach`,Object.assign(withTimeout(wrapper,t??getDefaultHookTimeout(),!0,r,abortIfTimeout),{[It]:t,[Lt]:r}))}function afterEach(e,t){assertTypes(e,`"afterEach" callback`,[`function`]);let wrapper=(t,r)=>withFixtures(e,{suite:r})(t);return getCurrentSuite().on(`afterEach`,withTimeout(wrapper,t??getDefaultHookTimeout(),!0,Error(`STACK_TRACE_ERROR`),abortIfTimeout))}function aroundAll(e,t){assertTypes(e,`"aroundAll" callback`,[`function`]);let r=Error(`STACK_TRACE_ERROR`),o=t??getDefaultHookTimeout(),s=getChainableContext(this);return getCurrentSuite().on(`aroundAll`,Object.assign(withSuiteFixtures(`aroundAll`,e,s,r,1),{[Rt]:o,[zt]:r}))}function aroundEach(e,t){assertTypes(e,`"aroundEach" callback`,[`function`]);let r=Error(`STACK_TRACE_ERROR`),o=t??getDefaultHookTimeout(),wrapper=(t,r,o)=>{let innerFn=r=>e(t,r,o);return configureProps(innerFn,{index:1,original:e}),withFixtures(innerFn,{suite:o})(r)};return getCurrentSuite().on(`aroundEach`,Object.assign(wrapper,{[Rt]:o,[zt]:r}))}function withSuiteFixtures(e,t,r,o,s=0){return(...c)=>{let u=c.at(-1),d=c.slice(0,-1),wrapper=e=>t(...d,e,u);configureProps(wrapper,{index:s,original:t});let p=r?.getFixtures(),m=p?.getFileContext(u.file);return withFixtures(wrapper,{suiteHook:e,fixtures:p,context:m,stackTraceError:o})()}}function findTestFileStackTrace(e,t){let r=t.split(`
54
+ `).map(e=>parseSingleV8Stack(e)).filter(notNullish)}function parseErrorStacktrace(e,t={}){if(!e||isPrimitive$1(e))return[];if(`stacks`in e&&e.stacks)return e.stacks;let r=e.stack||``,o=typeof r==`string`?parseStacktrace(r,t):[];if(!o.length){let r=e;r.fileName!=null&&r.lineNumber!=null&&r.columnNumber!=null&&(o=parseStacktrace(`${r.fileName}:${r.lineNumber}:${r.columnNumber}`,t)),r.sourceURL!=null&&r.line!=null&&r._column!=null&&(o=parseStacktrace(`${r.sourceURL}:${r.line}:${r.column}`,t))}return t.frameFilter&&(o=o.filter(r=>t.frameFilter(e,r)!==!1)),e.stacks=o,o}var DecodedMap=class{_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(e,t){this.map=e;let{mappings:r,names:o,sources:s}=e;this.version=e.version,this.names=o||[],this._encoded=r||``,this._decodedMemo=memoizedState(),this.url=t,this.resolvedSources=(s||[]).map(e=>resolve(t,`..`,e||``))}};function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function getOriginalPosition(e,t){let r=originalPositionFor(e,t);return r.column==null?null:r}var PendingError=class extends Error{code=`VITEST_PENDING`;taskId;constructor(e,t,r){super(e),this.message=e,this.note=r,this.taskId=t.id}},FixtureDependencyError=class extends Error{name=`FixtureDependencyError`},FixtureAccessError=class extends Error{name=`FixtureAccessError`},FixtureParseError=class extends Error{name=`FixtureParseError`};const wt=new WeakMap,Tt=new WeakMap,Et=new WeakMap;function setFn(e,t){wt.set(e,t)}function setTestFixture(e,t){Tt.set(e,t)}function getTestFixtures(e){return Tt.get(e)}function setHooks(e,t){Et.set(e,t)}function getHooks(e){return Et.get(e)}const Dt=Symbol.for(`VITEST_FIXTURE_STACK_TRACE`);var Ot=class TestFixtures{_suiteContexts;_overrides=new WeakMap;_registrations;static _definitions=[];static _builtinFixtures=[`task`,`signal`,`onTestFailed`,`onTestFinished`,`skip`,`annotate`];static _fixtureOptionKeys=[`auto`,`injected`,`scope`];static _fixtureScopes=[`test`,`file`,`worker`];static _workerContextSuite={type:`worker`};static clearDefinitions(){TestFixtures._definitions.length=0}static getWorkerContexts(){return TestFixtures._definitions.map(e=>e.getWorkerContext())}static getFileContexts(e){return TestFixtures._definitions.map(t=>t.getFileContext(e))}static isFixtureOptions(e){return isObject(e)&&Object.keys(e).some(e=>TestFixtures._fixtureOptionKeys.includes(e))}constructor(e){this._registrations=e??new Map,this._suiteContexts=new WeakMap,TestFixtures._definitions.push(this)}extend(e,t){let{suite:r}=getCurrentSuite(),o=!r||r.file===r;return new TestFixtures(this.parseUserFixtures(e,t,o))}get(e){let t=e;for(;t;){let e=this._overrides.get(t);if(e)return e;if(t===t.file)break;t=t.suite||t.file}return this._registrations}override(e,t){let{suite:r,file:o}=getCurrentSuite(),s=r||o,c=!r||r.file===r,u=new Map(this.get(s)),d=this.parseUserFixtures(e,t,c,u);c?this._registrations=d:this._overrides.set(s,d)}getFileContext(e){return this._suiteContexts.has(e)||this._suiteContexts.set(e,Object.create(null)),this._suiteContexts.get(e)}getWorkerContext(){return this._suiteContexts.has(TestFixtures._workerContextSuite)||this._suiteContexts.set(TestFixtures._workerContextSuite,Object.create(null)),this._suiteContexts.get(TestFixtures._workerContextSuite)}parseUserFixtures(e,t,r,o=new Map(this._registrations)){let s=[];Object.entries(t).forEach(([t,c])=>{let u,d,p;Array.isArray(c)&&c.length>=2&&TestFixtures.isFixtureOptions(c[1])?(p=c[1],u={auto:p.auto??!1,scope:p.scope??`test`,injected:p.injected??!1},d=u.injected?e.injectValue?.(t)??c[0]:c[0]):d=c;let m=o.get(t);m&&u?(m.scope!==u.scope&&s.push(new FixtureDependencyError(`The "${t}" fixture was already registered with a "${u.scope}" scope.`)),m.auto!==u.auto&&s.push(new FixtureDependencyError(`The "${t}" fixture was already registered as { auto: ${u.auto} }.`))):m?u={auto:m.auto,scope:m.scope,injected:m.injected}:u||={auto:!1,injected:!1,scope:`test`},u.scope&&!TestFixtures._fixtureScopes.includes(u.scope)&&s.push(new FixtureDependencyError(`The "${t}" fixture has unknown scope "${u.scope}".`)),!r&&u.scope!==`test`&&s.push(new FixtureDependencyError(`The "${t}" fixture cannot be defined with a ${u.scope} scope${!p?.scope&&m?.scope?` (inherited from the base fixture)`:``} inside the describe block. Define it at the top level of the file instead.`));let h=isFixtureFunction(d)?getUsedProps(d):new Set,g={name:t,value:d,auto:u.auto??!1,injected:u.injected??!1,scope:u.scope??`test`,deps:h,parent:m};isFixtureFunction(d)&&Object.assign(d,{[Dt]:Error(`STACK_TRACE_ERROR`)}),o.set(t,g),g.scope===`worker`&&(e.pool===`vmThreads`||e.pool===`vmForks`)&&(g.scope=`file`)});for(let e of o.values())for(let t of e.deps){if(TestFixtures._builtinFixtures.includes(t))continue;let r=o.get(t);if(!r){s.push(new FixtureDependencyError(`The "${e.name}" fixture depends on unknown fixture "${t}".`));continue}if(t===e.name&&!e.parent){s.push(new FixtureDependencyError(`The "${e.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(TestFixtures._fixtureScopes.indexOf(e.scope)>TestFixtures._fixtureScopes.indexOf(r.scope)){s.push(new FixtureDependencyError(`The ${e.scope} "${e.name}" fixture cannot depend on a ${r.scope} fixture "${r.name}".`));continue}}if(s.length===1)throw s[0];if(s.length>1)throw AggregateError(s,`Cannot resolve user fixtures. See errors for more information.`);return o}};const F=new WeakMap,kt=new WeakMap;function withFixtures(e,t){let r=getCurrentSuite(),o=t?.suite||r.suite||r.file;return async r=>{let s=r||t?.context;if(!s)return t?.suiteHook&&validateSuiteHook(e,t.suiteHook,t.stackTraceError),e({});let c=t?.fixtures||getTestFixtures(s);if(!c)return e(s);let u=c.get(o);if(!u.size)return e(s);let d=[],p=getUsedProps(e);for(let e of u.values())(isAutoFixture(e,t)||p.has(e.name))&&d.push(e);if(!d.length)return e(s);F.has(s)||F.set(s,[]);let m=F.get(s),h=resolveDeps(d,u);if(!h.length)return e(s);if(t?.suiteHook){let e=h.filter(e=>e.scope===`test`);if(e.length>0){let r=e.map(e=>`"${e.name}"`).join(`, `),o=new FixtureDependencyError(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${r}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${{aroundAll:`aroundEach`,beforeAll:`beforeEach`,afterAll:`afterEach`}[t.suiteHook]} hook.`);throw t.stackTraceError?.stack&&(o.stack=o.message+t.stackTraceError.stack.replace(t.stackTraceError.message,``)),o}}kt.has(s)||kt.set(s,new WeakSet);let g=kt.get(s);for(let e of h)if(e.scope===`test`){if(g.has(e))continue;g.add(e);let t=await resolveTestFixtureValue(e,s,m);s[e.name]=t,m.push(()=>{g.delete(e)})}else{let t=await resolveScopeFixtureValue(c,o,e);s[e.name]=t}return e(s)}}function isAutoFixture(e,t){return!(!e.auto||t?.suiteHook&&e.scope===`test`)}function isFixtureFunction(e){return typeof e==`function`}function resolveTestFixtureValue(e,t,r){return isFixtureFunction(e.value)?resolveFixtureFunction(e.value,e.name,t,r):e.value}const At=new WeakMap;async function resolveScopeFixtureValue(e,t,r){let o=e.getWorkerContext(),s=e.getFileContext(t.file),c=r.scope===`worker`?o:s;if(!isFixtureFunction(r.value))return c[r.name]=r.value,r.value;if(r.name in c)return c[r.name];if(At.has(r))return At.get(r);F.has(c)||F.set(c,[]);let u=F.get(c),d=resolveFixtureFunction(r.value,r.name,r.scope===`file`?{...o,...s}:c,u).then(e=>(c[r.name]=e,At.delete(r),e));return At.set(r,d),d}async function resolveFixtureFunction(e,t,r,o){let s=createDefer(),c=Dt in e&&e[Dt]instanceof Error?e[Dt]:void 0,u=!1,d=e(r,async e=>{u=!0,s.resolve(e);let t=createDefer();o.push(async()=>{t.resolve(),await d}),await t}).then(()=>{if(!u){let e=Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);c?.stack&&(e.stack=e.message+c.stack.replace(c.message,``)),s.reject(e)}}).catch(e=>{if(!u){s.reject(e);return}throw e});return s}function resolveDeps(e,t,r=new Set,o=[]){return e.forEach(e=>{if(!o.includes(e)){if(!isFixtureFunction(e.value)||!e.deps){o.push(e);return}if(r.has(e))if(e.parent)e=e.parent;else throw Error(`Circular fixture dependency detected: ${e.name} <- ${[...r].reverse().map(e=>e.name).join(` <- `)}`);r.add(e),resolveDeps([...e.deps].map(r=>r===e.name?e.parent:t.get(r)).filter(e=>!!e),t,r,o),o.push(e),r.clear()}}),o}function validateSuiteHook(e,t,r){let o=getUsedProps(e,{sourceError:r,suiteHook:t});if(o.size){let e=new FixtureAccessError(`The ${t} hook uses fixtures "${[...o].join(`", "`)}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?\nIf you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw r&&(e.stack=r.stack?.replace(r.message,e.message)),e}}const jt=Symbol(`$vitest:fixture-props`),Mt=Symbol(`$vitest:fixture-prop-names`);function configureProps(e,t){Object.defineProperty(e,jt,{value:t,enumerable:!1})}function memoProps(e,t){return e[Mt]=t,t}function getUsedProps(e,{sourceError:t,suiteHook:r}={}){if(Mt in e)return e[Mt];let{index:o=0,original:s=e}=jt in e?e[jt]:{},c=filterOutComments(s.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(c)&&(c=c.split(/__async\((?:this|null),/)[1]);let u=c.match(/[^(]*\(([^)]*)/);if(!u)return memoProps(e,new Set);let d=splitByComma(u[1]);if(!d.length)return memoProps(e,new Set);let p=d[o];if(!p)return memoProps(e,new Set);if(!(p[0]===`{`&&p.endsWith(`}`))){let e=ordinal(o+1),s=new FixtureParseError(`The ${e} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${p}".${r?` If you used internal "suite" task as the ${e} argument previously, access it in the ${ordinal(o+2)} argument instead.`:``}`);throw t&&(s.stack=t.stack?.replace(t.message,s.message)),s}let m=splitByComma(p.slice(1,-1).replace(/\s/g,``)).map(e=>e.replace(/:.*|=.*/g,``)),h=m.at(-1);if(h&&h.startsWith(`...`)){let e=new FixtureParseError(`Rest parameters are not supported in fixtures, received "${h}".`);throw t&&(e.stack=t.stack?.replace(t.message,e.message)),e}return memoProps(e,new Set(m))}function splitByComma(e){let t=[],r=[],o=0;for(let s=0;s<e.length;s++)if(e[s]===`{`||e[s]===`[`)r.push(e[s]===`{`?`}`:`]`);else if(e[s]===r.at(-1))r.pop();else if(!r.length&&e[s]===`,`){let r=e.substring(o,s).trim();r&&t.push(r),o=s+1}let s=e.substring(o).trim();return s&&t.push(s),t}const Nt=Symbol(`kChainableContext`);function getChainableContext(e){return e?.[Nt]}function createChainable(e,t,r){function create(r){let chain=function(...e){return t.apply(r,e)};Object.assign(chain,t),Object.defineProperty(chain,Nt,{value:{withContext:()=>chain.bind(r),getFixtures:()=>r.fixtures,setContext:(e,t)=>{r[e]=t},mergeContext:e=>{Object.assign(r,e)}},enumerable:!1});for(let t of e)Object.defineProperty(chain,t,{get(){return create({...r,[t]:!0})}});return chain}let o=create(r??{});return Object.defineProperty(o,`fn`,{value:t,enumerable:!1}),o}function getDefaultHookTimeout(){return getRunner().config.hookTimeout}const Pt=Symbol.for(`VITEST_CLEANUP_TIMEOUT`),Ft=Symbol.for(`VITEST_CLEANUP_STACK_TRACE`),It=Symbol.for(`VITEST_AROUND_TIMEOUT`),Lt=Symbol.for(`VITEST_AROUND_STACK_TRACE`);function beforeAll(e,t=getDefaultHookTimeout()){assertTypes(e,`"beforeAll" callback`,[`function`]);let r=Error(`STACK_TRACE_ERROR`),o=getChainableContext(this);return getCurrentSuite().on(`beforeAll`,Object.assign(withTimeout(withSuiteFixtures(`beforeAll`,e,o,r),t,!0,r),{[Pt]:t,[Ft]:r}))}function afterAll(e,t){assertTypes(e,`"afterAll" callback`,[`function`]);let r=getChainableContext(this),o=Error(`STACK_TRACE_ERROR`);return getCurrentSuite().on(`afterAll`,withTimeout(withSuiteFixtures(`afterAll`,e,r,o),t??getDefaultHookTimeout(),!0,o))}function beforeEach(e,t=getDefaultHookTimeout()){assertTypes(e,`"beforeEach" callback`,[`function`]);let r=Error(`STACK_TRACE_ERROR`),wrapper=(t,r)=>withFixtures(e,{suite:r})(t);return getCurrentSuite().on(`beforeEach`,Object.assign(withTimeout(wrapper,t??getDefaultHookTimeout(),!0,r,abortIfTimeout),{[Pt]:t,[Ft]:r}))}function afterEach(e,t){assertTypes(e,`"afterEach" callback`,[`function`]);let wrapper=(t,r)=>withFixtures(e,{suite:r})(t);return getCurrentSuite().on(`afterEach`,withTimeout(wrapper,t??getDefaultHookTimeout(),!0,Error(`STACK_TRACE_ERROR`),abortIfTimeout))}function aroundAll(e,t){assertTypes(e,`"aroundAll" callback`,[`function`]);let r=Error(`STACK_TRACE_ERROR`),o=t??getDefaultHookTimeout(),s=getChainableContext(this);return getCurrentSuite().on(`aroundAll`,Object.assign(withSuiteFixtures(`aroundAll`,e,s,r,1),{[It]:o,[Lt]:r}))}function aroundEach(e,t){assertTypes(e,`"aroundEach" callback`,[`function`]);let r=Error(`STACK_TRACE_ERROR`),o=t??getDefaultHookTimeout(),wrapper=(t,r,o)=>{let innerFn=r=>e(t,r,o);return configureProps(innerFn,{index:1,original:e}),withFixtures(innerFn,{suite:o})(r)};return getCurrentSuite().on(`aroundEach`,Object.assign(wrapper,{[It]:o,[Lt]:r}))}function withSuiteFixtures(e,t,r,o,s=0){return(...c)=>{let u=c.at(-1),d=c.slice(0,-1),wrapper=e=>t(...d,e,u);configureProps(wrapper,{index:s,original:t});let p=r?.getFixtures(),m=p?.getFileContext(u.file);return withFixtures(wrapper,{suiteHook:e,fixtures:p,context:m,stackTraceError:o})()}}function findTestFileStackTrace(e,t){let r=t.split(`
35
55
  `).slice(1);for(let t of r){let r=parseSingleStack(t);if(r&&r.file===e)return r}}function validateTags(e,t){if(!e.strictTags)return;let r=new Set(e.tags.map(e=>e.name));for(let o of t)if(!r.has(o))throw createNoTagsError(e.tags,o)}function createNoTagsError(e,t,r=`tag`){throw e.length?Error(`The ${r} "${t}" is not defined in the configuration. Available tags are:\n${e.map(e=>`- ${e.name}${e.description?`: ${e.description}`:``}`).join(`
36
- `)}`):Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${r} for this test. See: https://vitest.dev/guide/test-tags`)}function getNames(e){let t=[e.name],r=e;for(;r?.suite;)r=r.suite,r?.name&&t.unshift(r.name);return r!==e.file&&t.unshift(e.file.name),t}function createTaskName(e,t=` > `){return e.filter(e=>e!==void 0).join(t)}const P=createSuite();createTest(function(e,t,r){getCurrentSuite().test.fn.call(this,formatName(e),t,r)});function assert$3(e,t){if(!e)throw Error(`Vitest failed to find ${t}. One of the following is possible:
56
+ `)}`):Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${r} for this test. See: https://vitest.dev/guide/test-tags`)}function getNames(e){let t=[e.name],r=e;for(;r?.suite;)r=r.suite,r?.name&&t.unshift(r.name);return r!==e.file&&t.unshift(e.file.name),t}function createTaskName(e,t=` > `){return e.filter(e=>e!==void 0).join(t)}const I=createSuite();createTest(function(e,t,r){getCurrentSuite().test.fn.call(this,formatName(e),t,r)});function assert$3(e,t){if(!e)throw Error(`Vitest failed to find ${t}. One of the following is possible:
37
57
  - "vitest" is imported directly without running "vitest" command
38
58
  - "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
39
59
  - "vitest" is imported inside Vite / Vitest config file
40
60
  - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
41
- `)}e(assert$3,`assert`);function getRunner(){assert$3(void 0,`the runner`)}function getCurrentSuite(){let e=F.currentSuite||void 0;return assert$3(e,`the current suite`),e}function createSuiteHooks(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const Bt=1/0;function parseArguments(e,t){if(typeof t==`object`&&t)throw TypeError(`Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.`);let r={},o;if(typeof t==`number`?r={timeout:t}:typeof e==`object`&&(r=e),typeof e==`function`){if(typeof t==`function`)throw TypeError(`Cannot use two functions as arguments. Please use the second argument for options.`);o=e}else typeof t==`function`&&(o=t);return{options:r,handler:o}}function createSuiteCollector(e,t=()=>{},r,o,s){let c=[],u;initSuite(!0);let task=function(e=``,t={}){let r=F.currentSuite?.suite,o=unique([...(r??F.currentSuite?.file)?.tags||[],...toArray(t.tags)]),u=o.map(e=>{let t=(void 0).config.tags?.find(t=>t.name===e);if(!t&&(void 0).config.strictTags)throw createNoTagsError((void 0).config.tags,e);return t}).filter(e=>e!=null).sort((e,t)=>(t.priority??Bt)-(e.priority??Bt)).reduce((e,t)=>{let{name:r,description:o,priority:s,meta:c,...u}=t;return Object.assign(e,u),c&&(e.meta=Object.assign(e.meta??Object.create(null),c)),e},{}),d=t.meta;t={...u,...t};let p=t.timeout??(void 0).config.testTimeout,m=r?.meta,h=u.meta,g=Object.create(null);h&&Object.assign(g,h),m&&Object.assign(g,m),d&&Object.assign(g,d);let _={id:``,name:e,fullName:createTaskName([r?.fullName??F.currentSuite?.file?.fullName,e]),fullTestName:createTaskName([r?.fullTestName,e]),suite:r,each:t.each,fails:t.fails,context:void 0,type:`test`,file:r?.file??F.currentSuite?.file,timeout:p,retry:t.retry??(void 0).config.retry,repeats:t.repeats,mode:t.only?`only`:t.skip?`skip`:t.todo?`todo`:`run`,meta:g,annotations:[],artifacts:[],tags:o},y=t.handler;_.mode===`run`&&!y&&(_.mode=`todo`),(t.concurrent||!t.sequential&&(void 0).config.sequence.concurrent)&&(_.concurrent=!0),_.shuffle=s?.shuffle;let b=createTestContext(_,void 0);Object.defineProperty(_,`context`,{value:b,enumerable:!1}),setTestFixture(b,t.fixtures??new At);let x=Error.stackTraceLimit;Error.stackTraceLimit=10;let S=Error(`STACK_TRACE_ERROR`);if(Error.stackTraceLimit=x,y&&setFn(_,withTimeout(withCancel(withAwaitAsyncAssertions(withFixtures(y,{context:b}),_),_.context.signal),p,!1,S,(e,t)=>abortIfTimeout([b],t))),(void 0).config.includeTaskLocation){let e=S.stack,t=findTestFileStackTrace(void 0,e);t&&(_.location={line:t.line,column:t.column})}return c.push(_),_},d=createTest(function(e,t,r){let{options:o,handler:c}=parseArguments(t,r);typeof s==`object`&&(o=Object.assign({},s,o));let u=this.concurrent??(!this.sequential&&o?.concurrent);o.concurrent!=null&&u!=null&&(o.concurrent=u);let d=this.sequential??(!this.concurrent&&o?.sequential);o.sequential!=null&&d!=null&&(o.sequential=d);let p=task(formatName(e),{...this,...o,handler:c});p.type=`test`}),p={type:`collector`,name:e,mode:r,suite:u,options:s,test:d,file:u.file,tasks:c,collect,task,clear,on:addHook};function addHook(e,...t){getHooks(u)[e].push(...t)}function initSuite(t){typeof s==`number`&&(s={timeout:s});let c=F.currentSuite?.suite,d=c??F.currentSuite?.file,p=toArray(s?.tags);validateTags((void 0).config,p),u={id:``,type:`suite`,name:e,fullName:createTaskName([c?.fullName??F.currentSuite?.file?.fullName,e]),fullTestName:createTaskName([c?.fullTestName,e]),suite:c,mode:r,each:o,file:c?.file??F.currentSuite?.file,shuffle:s?.shuffle,tasks:[],meta:s?.meta??Object.create(null),concurrent:s?.concurrent,tags:unique([...d?.tags||[],...p])},setHooks(u,createSuiteHooks())}function clear(){c.length=0,initSuite(!1)}async function collect(e){if(!e)throw TypeError(`File is required to collect tasks.`);t&&await runWithSuite(p,()=>t(d));let r=[];for(let t of c)r.push(t.type===`collector`?await t.collect(e):t);return u.tasks=r,u}return collectTask(p),p}function withAwaitAsyncAssertions(e,t){return(async(...r)=>{let o=await e(...r);if(t.promises){let e=(await Promise.allSettled(t.promises)).map(e=>e.status===`rejected`?e.reason:void 0).filter(Boolean);if(e.length)throw e}return o})}function createSuite(){function suiteFn(e,t,r){let o=F.currentSuite||void 0,{options:s,handler:c}=parseArguments(t,r),u=s.concurrent||this.concurrent||s.sequential===!1,d=s.sequential||this.sequential||s.concurrent===!1,{meta:p,...m}=o?.options||{};s={...m,...s};let h=this.shuffle??s.shuffle??o?.options?.shuffle??(void 0)?.config.sequence.shuffle;h!=null&&(s.shuffle=h);let g=this.only??s.only?`only`:this.skip??s.skip?`skip`:this.todo??s.todo?`todo`:`run`;g===`run`&&!c&&(g=`todo`);let _=u||s.concurrent&&!d,y=d||s.sequential&&!u;return _!=null&&(s.concurrent=_&&!y),y!=null&&(s.sequential=y&&!_),p&&(s.meta=Object.assign(Object.create(null),p,s.meta)),createSuiteCollector(formatName(e),c,g,this.each,s)}return suiteFn.each=function(e,...t){let r=getChainableContext(this),o=r.withContext();return r.setContext(`each`,!0),Array.isArray(e)&&t.length&&(e=formatTemplateString(e,t)),(t,s,c)=>{let u=formatName(t),d=e.every(Array.isArray),{options:p,handler:m}=parseArguments(s,c),h=typeof s==`function`;e.forEach((e,t)=>{let r=Array.isArray(e)?e:[e];h?d?o(formatTitle(u,r,t),m?()=>m(...r):void 0,p.timeout):o(formatTitle(u,r,t),m?()=>m(e):void 0,p.timeout):d?o(formatTitle(u,r,t),p,m?()=>m(...r):void 0):o(formatTitle(u,r,t),p,m?()=>m(e):void 0)}),r.setContext(`each`,void 0)}},suiteFn.for=function(e,...t){return Array.isArray(e)&&t.length&&(e=formatTemplateString(e,t)),(t,r,o)=>{let s=formatName(t),{options:c,handler:u}=parseArguments(r,o);e.forEach((e,t)=>{P(formatTitle(s,toArray(e),t),c,u?()=>u(e):void 0)})}},suiteFn.skipIf=e=>e?P.skip:P,suiteFn.runIf=e=>e?P:P.skip,createChainable([`concurrent`,`sequential`,`shuffle`,`skip`,`only`,`todo`],suiteFn)}function createTaskCollector(e){let t=e;t.each=function(e,...t){let r=getChainableContext(this),o=r.withContext();return r.setContext(`each`,!0),Array.isArray(e)&&t.length&&(e=formatTemplateString(e,t)),(t,s,c)=>{let u=formatName(t),d=e.every(Array.isArray),{options:p,handler:m}=parseArguments(s,c),h=typeof s==`function`;e.forEach((e,t)=>{let r=Array.isArray(e)?e:[e];h?d?o(formatTitle(u,r,t),m?()=>m(...r):void 0,p.timeout):o(formatTitle(u,r,t),m?()=>m(e):void 0,p.timeout):d?o(formatTitle(u,r,t),p,m?()=>m(...r):void 0):o(formatTitle(u,r,t),p,m?()=>m(e):void 0)}),r.setContext(`each`,void 0)}},t.for=function(e,...t){let r=getChainableContext(this).withContext();return Array.isArray(e)&&t.length&&(e=formatTemplateString(e,t)),(t,o,s)=>{let c=formatName(t),{options:u,handler:d}=parseArguments(o,s);e.forEach((e,t)=>{let o=d?t=>d(e,t):void 0;o&&configureProps(o,{index:1,original:d}),r(formatTitle(c,toArray(e),t),u,o)})}},t.skipIf=function(e){return e?this.skip:this},t.runIf=function(e){return e?this:this.skip};function parseBuilderFixtures(e,t,r){if(typeof e!=`string`)return e;let o=e,s,c;if(r===void 0?typeof t==`object`&&t&&!Array.isArray(t)&&At.isFixtureOptions(t)?(s=t,c={}):(s=void 0,c=t):(s=t,c=r),typeof c==`function`){let e=c,fixture=async(t,r)=>{let o,onCleanup=e=>{if(o!==void 0)throw Error(`onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.`);o=e};await r(await e(t,{onCleanup})),o&&await o()};return configureProps(fixture,{original:e}),s?{[o]:[fixture,s]}:{[o]:fixture}}return s?{[o]:[c,s]}:{[o]:c}}return t.override=function(e,t,r){let o=parseBuilderFixtures(e,t,r);return getChainableContext(this).getFixtures().override(void 0,o),this},t.scoped=function(e){return console.warn(`test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead.`),this.override(e)},t.extend=function(t,r,o){let s=parseBuilderFixtures(t,r,o),c=getChainableContext(this).getFixtures().extend(void 0,s),u=createTest(function(t,r,o){e.call(this,formatName(t),r,o)});return getChainableContext(u).mergeContext({fixtures:c}),u},t.describe=P,t.suite=P,t.beforeEach=beforeEach,t.afterEach=afterEach,t.beforeAll=beforeAll,t.afterAll=afterAll,t.aroundEach=aroundEach,t.aroundAll=aroundAll,createChainable([`concurrent`,`sequential`,`skip`,`only`,`todo`,`fails`],t,{fixtures:new At})}function createTest(e){return createTaskCollector(e)}function formatName(e){return typeof e==`string`?e:typeof e==`function`?e.name||`<anonymous>`:String(e)}function formatTitle(e,t,r){(e.includes(`%#`)||e.includes(`%$`))&&(e=e.replace(/%%/g,`__vitest_escaped_%__`).replace(/%#/g,`${r}`).replace(/%\$/g,`${r+1}`).replace(/__vitest_escaped_%__/g,`%%`));let o=e.split(`%`).length-1;e.includes(`%f`)&&(e.match(/%f/g)||[]).forEach((r,o)=>{if(isNegativeNaN(t[o])||Object.is(t[o],-0)){let t=0;e=e.replace(/%f/g,e=>(t++,t===o+1?`-%f`:e))}});let s=isObject(t[0]);function formatAttribute(e){return e.replace(/\$([$\w.]+)/g,(e,r)=>{let o=/^\d+$/.test(r);if(!s&&!o)return`$${r}`;let c=o?objectAttr(t,r):void 0;return objDisplay$1(s?objectAttr(t[0],r,c):c,{truncate:(void 0)?.config?.chaiConfig?.truncateThreshold})})}let c=``,u=0;return handleRegexMatch(e,Le,e=>{u<o?c+=format(e[0],t[u++]):c+=e[0]},e=>{c+=formatAttribute(e)}),c}function handleRegexMatch(e,t,r,o){let s=0;for(let c of e.matchAll(t))s<c.index&&o(e.slice(s,c.index)),r(c),s=c.index+c[0].length;s<e.length&&o(e.slice(s))}function formatTemplateString(e,t){let r=e.join(``).trim().replace(/ /g,``).split(`
42
- `).map(e=>e.split(`|`))[0],o=[];for(let e=0;e<Math.floor(t.length/r.length);e++){let s={};for(let o=0;o<r.length;o++)s[r[o]]=t[e*r.length+o];o.push(s)}return o}const Vt=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,F={tasks:[],currentSuite:null};function collectTask(e){F.currentSuite?.tasks.push(e)}async function runWithSuite(e,t){let r=F.currentSuite;F.currentSuite=e,await t(),F.currentSuite=r}function withTimeout(e,t,r=!1,o,s){if(t<=0||t===1/0)return e;let{setTimeout:c,clearTimeout:u}=getSafeTimers();return(function runWithTimeout(...d){let p=Vt(),m=getRunner();return m._currentTaskStartTime=p,m._currentTaskTimeout=t,new Promise((h,g)=>{let _=c(()=>{u(_),rejectTimeoutError()},t);_.unref?.();function rejectTimeoutError(){let e=makeTimeoutError(r,t,o);s?.(d,e),g(e)}function resolve(e){if(m._currentTaskStartTime=void 0,m._currentTaskTimeout=void 0,u(_),Vt()-p>=t){rejectTimeoutError();return}h(e)}function reject(e){m._currentTaskStartTime=void 0,m._currentTaskTimeout=void 0,u(_),g(e)}try{let t=e(...d);typeof t==`object`&&t&&typeof t.then==`function`?t.then(resolve,reject):resolve(t)}catch(e){reject(e)}})})}function withCancel(e,t){return(function runWithCancel(...r){return new Promise((o,s)=>{t.addEventListener(`abort`,()=>s(t.reason));try{let t=e(...r);typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,s):o(t)}catch(e){s(e)}})})}const Ht=new WeakMap;function abortIfTimeout([e],t){e&&abortContextSignal(e,t)}function abortContextSignal(e,t){Ht.get(e)?.abort(t)}function createTestContext(e,t){let context=function(){throw Error(`done() callback is deprecated, use promise instead`)},r=Ht.get(context);return r||(r=new AbortController,Ht.set(context,r)),context.signal=r.signal,context.task=e,context.skip=(t,r)=>{if(t!==!1)throw e.result??={state:`skip`},e.result.pending=!0,new PendingError(`test is skipped; abort execution`,e,typeof t==`string`?t:r)},context.annotate=((r,o,s)=>{if(e.result&&e.result.state!==`run`)throw Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let c={message:r,type:typeof o==`object`||o===void 0?`notice`:o},u=typeof o==`object`?o:s;return u&&(c.attachment=u,manageArtifactAttachment(c.attachment)),recordAsyncOperation(e,recordArtifact(e,{type:`internal:annotation`,annotation:c}).then(async({annotation:r})=>{if(!t.onTestAnnotate)throw Error(`Test runner doesn't support test annotations.`);await finishSendTasksUpdate(t);let o=await t.onTestAnnotate(e,r);return e.annotations.push(o),o}))}),context.onTestFailed=(o,s)=>{e.onFailed||=[],e.onFailed.push(withTimeout(o,s??t.config.hookTimeout,!0,Error(`STACK_TRACE_ERROR`),(e,t)=>r.abort(t)))},context.onTestFinished=(o,s)=>{e.onFinished||=[],e.onFinished.push(withTimeout(o,s??t.config.hookTimeout,!0,Error(`STACK_TRACE_ERROR`),(e,t)=>r.abort(t)))},t.extendTaskContext?.(context)||context}function makeTimeoutError(e,t,r){let 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`}".`,s=Error(o);return r?.stack&&(s.stack=r.stack.replace(s.message,r.message)),s}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Date.now;const{clearTimeout:Ut,setTimeout:Wt}=getSafeTimers(),Gt=new Map,Kt=[],I=[];function sendTasksUpdate(e){if(Gt.size){let t=Array.from(Gt).map(([e,t])=>[e,t[0],t[1]]),r=e.onTaskUpdate?.(t,Kt);r&&(I.push(r),r.then(()=>I.splice(I.indexOf(r),1),()=>{})),Kt.length=0,Gt.clear()}}async function finishSendTasksUpdate(e){sendTasksUpdate(e),await Promise.all(I)}async function recordArtifact(e,t){let r=getRunner(),o=findTestFileStackTrace(e.file.filepath,Error(`STACK_TRACE`).stack);if(o&&(t.location={file:o.file,line:o.line,column:o.column},t.type===`internal:annotation`&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(let e of t.attachments)manageArtifactAttachment(e);if(t.type===`internal:annotation`)return t;if(!r.onTestArtifactRecord)throw Error(`Test runner doesn't support test artifacts.`);await finishSendTasksUpdate(r);let s=await r.onTestArtifactRecord(e,t);return e.artifacts.push(s),s}const L=[];for(let e=65;e<91;e++)L.push(String.fromCharCode(e));for(let e=97;e<123;e++)L.push(String.fromCharCode(e));for(let e=0;e<10;e++)L.push(e.toString(10));L.push(`+`,`/`);function encodeUint8Array(e){let t=``,r=e.byteLength;for(let o=0;o<r;o+=3)if(r===o+1){let r=(e[o]&252)>>2,s=(e[o]&3)<<4;t+=L[r],t+=L[s],t+=`==`}else if(r===o+2){let r=(e[o]&252)>>2,s=(e[o]&3)<<4|(e[o+1]&240)>>4,c=(e[o+1]&15)<<2;t+=L[r],t+=L[s],t+=L[c],t+=`=`}else{let r=(e[o]&252)>>2,s=(e[o]&3)<<4|(e[o+1]&240)>>4,c=(e[o+1]&15)<<2|(e[o+2]&192)>>6,u=e[o+2]&63;t+=L[r],t+=L[s],t+=L[c],t+=L[u]}return t}function recordAsyncOperation(e,t){return t=t.finally(()=>{if(!e.promises)return;let r=e.promises.indexOf(t);r!==-1&&e.promises.splice(r,1)}),e.promises||=[],e.promises.push(t),t}function manageArtifactAttachment(e){if(e.body==null&&!e.path)throw TypeError(`Test attachment requires "body" or "path" to be set. Both are missing.`);if(e.body&&e.path)throw TypeError(`Test attachment requires only one of "body" or "path" to be set. Both are specified.`);if(e.path&&e.bodyEncoding)throw TypeError(`Test attachment with "path" should not have "bodyEncoding" specified.`);e.body instanceof Uint8Array&&(e.body=encodeUint8Array(e.body)),e.body!=null&&(e.bodyEncoding??=`base64`)}function getWorkerState(){let e=globalThis.__vitest_worker__;if(!e)throw Error(`Vitest failed to access its internal state.
61
+ `)}e(assert$3,`assert`);function getRunner(){assert$3(void 0,`the runner`)}function getCurrentSuite(){let e=L.currentSuite||void 0;return assert$3(e,`the current suite`),e}function createSuiteHooks(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const Rt=1/0;function parseArguments(e,t){if(typeof t==`object`&&t)throw TypeError(`Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.`);let r={},o;if(typeof t==`number`?r={timeout:t}:typeof e==`object`&&(r=e),typeof e==`function`){if(typeof t==`function`)throw TypeError(`Cannot use two functions as arguments. Please use the second argument for options.`);o=e}else typeof t==`function`&&(o=t);return{options:r,handler:o}}function createSuiteCollector(e,t=()=>{},r,o,s){let c=[],u;initSuite(!0);let task=function(e=``,t={}){let r=L.currentSuite?.suite,o=unique([...(r??L.currentSuite?.file)?.tags||[],...toArray(t.tags)]),u=o.map(e=>{let t=(void 0).config.tags?.find(t=>t.name===e);if(!t&&(void 0).config.strictTags)throw createNoTagsError((void 0).config.tags,e);return t}).filter(e=>e!=null).sort((e,t)=>(t.priority??Rt)-(e.priority??Rt)).reduce((e,t)=>{let{name:r,description:o,priority:s,meta:c,...u}=t;return Object.assign(e,u),c&&(e.meta=Object.assign(e.meta??Object.create(null),c)),e},{}),d=t.meta;t={...u,...t};let p=t.timeout??(void 0).config.testTimeout,m=r?.meta,h=u.meta,g=Object.create(null);h&&Object.assign(g,h),m&&Object.assign(g,m),d&&Object.assign(g,d);let _={id:``,name:e,fullName:createTaskName([r?.fullName??L.currentSuite?.file?.fullName,e]),fullTestName:createTaskName([r?.fullTestName,e]),suite:r,each:t.each,fails:t.fails,context:void 0,type:`test`,file:r?.file??L.currentSuite?.file,timeout:p,retry:t.retry??(void 0).config.retry,repeats:t.repeats,mode:t.only?`only`:t.skip?`skip`:t.todo?`todo`:`run`,meta:g,annotations:[],artifacts:[],tags:o},y=t.handler;_.mode===`run`&&!y&&(_.mode=`todo`),(t.concurrent??(!t.sequential&&(void 0).config.sequence.concurrent))&&(_.concurrent=!0),_.shuffle=s?.shuffle;let b=createTestContext(_,void 0);Object.defineProperty(_,`context`,{value:b,enumerable:!1}),setTestFixture(b,t.fixtures??new Ot);let x=Error.stackTraceLimit;Error.stackTraceLimit=10;let S=Error(`STACK_TRACE_ERROR`);if(Error.stackTraceLimit=x,y&&setFn(_,withTimeout(withCancel(withAwaitAsyncAssertions(withFixtures(y,{context:b}),_),_.context.signal),p,!1,S,(e,t)=>abortIfTimeout([b],t))),(void 0).config.includeTaskLocation){let e=S.stack,t=findTestFileStackTrace(void 0,e);t&&(_.location={line:t.line,column:t.column})}return c.push(_),_},d=createTest(function(e,t,r){let{options:o,handler:c}=parseArguments(t,r);typeof s==`object`&&(o=Object.assign({},s,o));let u=this.concurrent??(!this.sequential&&o?.concurrent);o.concurrent!=null&&u!=null&&(o.concurrent=u);let d=this.sequential??(!this.concurrent&&o?.sequential);o.sequential!=null&&d!=null&&(o.sequential=d);let p=task(formatName(e),{...this,...o,handler:c});p.type=`test`}),p={type:`collector`,name:e,mode:r,suite:u,options:s,test:d,file:u.file,tasks:c,collect,task,clear,on:addHook};function addHook(e,...t){getHooks(u)[e].push(...t)}function initSuite(t){typeof s==`number`&&(s={timeout:s});let c=L.currentSuite?.suite,d=c??L.currentSuite?.file,p=toArray(s?.tags);validateTags((void 0).config,p),u={id:``,type:`suite`,name:e,fullName:createTaskName([c?.fullName??L.currentSuite?.file?.fullName,e]),fullTestName:createTaskName([c?.fullTestName,e]),suite:c,mode:r,each:o,file:c?.file??L.currentSuite?.file,shuffle:s?.shuffle,tasks:[],meta:s?.meta??Object.create(null),concurrent:s?.concurrent,tags:unique([...d?.tags||[],...p])},setHooks(u,createSuiteHooks())}function clear(){c.length=0,initSuite(!1)}async function collect(e){if(!e)throw TypeError(`File is required to collect tasks.`);t&&await runWithSuite(p,()=>t(d));let r=[];for(let t of c)r.push(t.type===`collector`?await t.collect(e):t);return u.tasks=r,u}return collectTask(p),p}function withAwaitAsyncAssertions(e,t){return(async(...r)=>{let o=await e(...r);if(t.promises){let e=(await Promise.allSettled(t.promises)).map(e=>e.status===`rejected`?e.reason:void 0).filter(Boolean);if(e.length)throw e}return o})}function createSuite(){function suiteFn(e,t,r){let o=L.currentSuite||void 0,{options:s,handler:c}=parseArguments(t,r),u=s.concurrent||this.concurrent||s.sequential===!1,d=s.sequential||this.sequential||s.concurrent===!1,{meta:p,...m}=o?.options||{};s={...m,...s};let h=this.shuffle??s.shuffle??o?.options?.shuffle??(void 0)?.config.sequence.shuffle;h!=null&&(s.shuffle=h);let g=this.only??s.only?`only`:this.skip??s.skip?`skip`:this.todo??s.todo?`todo`:`run`;g===`run`&&!c&&(g=`todo`);let _=u||s.concurrent&&!d,y=d||s.sequential&&!u;return _!=null&&(s.concurrent=_&&!y),y!=null&&(s.sequential=y&&!_),p&&(s.meta=Object.assign(Object.create(null),p,s.meta)),createSuiteCollector(formatName(e),c,g,this.each,s)}return suiteFn.each=function(e,...t){let r=getChainableContext(this),o=r.withContext();return r.setContext(`each`,!0),Array.isArray(e)&&t.length&&(e=formatTemplateString(e,t)),(t,s,c)=>{let u=formatName(t),d=e.every(Array.isArray),{options:p,handler:m}=parseArguments(s,c),h=typeof s==`function`;e.forEach((e,t)=>{let r=Array.isArray(e)?e:[e];h?d?o(formatTitle(u,r,t),m?()=>m(...r):void 0,p.timeout):o(formatTitle(u,r,t),m?()=>m(e):void 0,p.timeout):d?o(formatTitle(u,r,t),p,m?()=>m(...r):void 0):o(formatTitle(u,r,t),p,m?()=>m(e):void 0)}),r.setContext(`each`,void 0)}},suiteFn.for=function(e,...t){return Array.isArray(e)&&t.length&&(e=formatTemplateString(e,t)),(t,r,o)=>{let s=formatName(t),{options:c,handler:u}=parseArguments(r,o);e.forEach((e,t)=>{I(formatTitle(s,toArray(e),t),c,u?()=>u(e):void 0)})}},suiteFn.skipIf=e=>e?I.skip:I,suiteFn.runIf=e=>e?I:I.skip,createChainable([`concurrent`,`sequential`,`shuffle`,`skip`,`only`,`todo`],suiteFn)}function createTaskCollector(e){let t=e;t.each=function(e,...t){let r=getChainableContext(this),o=r.withContext();return r.setContext(`each`,!0),Array.isArray(e)&&t.length&&(e=formatTemplateString(e,t)),(t,s,c)=>{let u=formatName(t),d=e.every(Array.isArray),{options:p,handler:m}=parseArguments(s,c),h=typeof s==`function`;e.forEach((e,t)=>{let r=Array.isArray(e)?e:[e];h?d?o(formatTitle(u,r,t),m?()=>m(...r):void 0,p.timeout):o(formatTitle(u,r,t),m?()=>m(e):void 0,p.timeout):d?o(formatTitle(u,r,t),p,m?()=>m(...r):void 0):o(formatTitle(u,r,t),p,m?()=>m(e):void 0)}),r.setContext(`each`,void 0)}},t.for=function(e,...t){let r=getChainableContext(this).withContext();return Array.isArray(e)&&t.length&&(e=formatTemplateString(e,t)),(t,o,s)=>{let c=formatName(t),{options:u,handler:d}=parseArguments(o,s);e.forEach((e,t)=>{let o=d?t=>d(e,t):void 0;o&&configureProps(o,{index:1,original:d}),r(formatTitle(c,toArray(e),t),u,o)})}},t.skipIf=function(e){return e?this.skip:this},t.runIf=function(e){return e?this:this.skip};function parseBuilderFixtures(e,t,r){if(typeof e!=`string`)return e;let o=e,s,c;if(r===void 0?typeof t==`object`&&t&&!Array.isArray(t)&&Ot.isFixtureOptions(t)?(s=t,c={}):(s=void 0,c=t):(s=t,c=r),typeof c==`function`){let e=c,fixture=async(t,r)=>{let o,onCleanup=e=>{if(o!==void 0)throw Error(`onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.`);o=e};await r(await e(t,{onCleanup})),o&&await o()};return configureProps(fixture,{original:e}),s?{[o]:[fixture,s]}:{[o]:fixture}}return s?{[o]:[c,s]}:{[o]:c}}return t.override=function(e,t,r){let o=parseBuilderFixtures(e,t,r);return getChainableContext(this).getFixtures().override(void 0,o),this},t.scoped=function(e){return console.warn(`test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead.`),this.override(e)},t.extend=function(t,r,o){let s=parseBuilderFixtures(t,r,o),c=getChainableContext(this).getFixtures().extend(void 0,s),u=createTest(function(t,r,o){e.call(this,formatName(t),r,o)});return getChainableContext(u).mergeContext({fixtures:c}),u},t.describe=I,t.suite=I,t.beforeEach=beforeEach,t.afterEach=afterEach,t.beforeAll=beforeAll,t.afterAll=afterAll,t.aroundEach=aroundEach,t.aroundAll=aroundAll,createChainable([`concurrent`,`sequential`,`skip`,`only`,`todo`,`fails`],t,{fixtures:new Ot})}function createTest(e){return createTaskCollector(e)}function formatName(e){return typeof e==`string`?e:typeof e==`function`?e.name||`<anonymous>`:String(e)}function formatTitle(e,t,r){(e.includes(`%#`)||e.includes(`%$`))&&(e=e.replace(/%%/g,`__vitest_escaped_%__`).replace(/%#/g,`${r}`).replace(/%\$/g,`${r+1}`).replace(/__vitest_escaped_%__/g,`%%`));let o=e.split(`%`).length-1;e.includes(`%f`)&&(e.match(/%f/g)||[]).forEach((r,o)=>{if(isNegativeNaN(t[o])||Object.is(t[o],-0)){let t=0;e=e.replace(/%f/g,e=>(t++,t===o+1?`-%f`:e))}});let s=isObject(t[0]);function formatAttribute(e){return e.replace(/\$([$\w.]+)/g,(e,r)=>{let o=/^\d+$/.test(r);if(!s&&!o)return`$${r}`;let c=o?objectAttr(t,r):void 0;return objDisplay$1(s?objectAttr(t[0],r,c):c,{truncate:(void 0)?.config?.chaiConfig?.truncateThreshold})})}let c=``,u=0;return handleRegexMatch(e,Fe,e=>{u<o?c+=format(e[0],t[u++]):c+=e[0]},e=>{c+=formatAttribute(e)}),c}function handleRegexMatch(e,t,r,o){let s=0;for(let c of e.matchAll(t))s<c.index&&o(e.slice(s,c.index)),r(c),s=c.index+c[0].length;s<e.length&&o(e.slice(s))}function formatTemplateString(e,t){let r=e.join(``).trim().replace(/ /g,``).split(`
62
+ `).map(e=>e.split(`|`))[0],o=[];for(let e=0;e<Math.floor(t.length/r.length);e++){let s={};for(let o=0;o<r.length;o++)s[r[o]]=t[e*r.length+o];o.push(s)}return o}const zt=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,L={tasks:[],currentSuite:null};function collectTask(e){L.currentSuite?.tasks.push(e)}async function runWithSuite(e,t){let r=L.currentSuite;L.currentSuite=e,await t(),L.currentSuite=r}function withTimeout(e,t,r=!1,o,s){if(t<=0||t===1/0)return e;let{setTimeout:c,clearTimeout:u}=getSafeTimers();return(function runWithTimeout(...d){let p=zt(),m=getRunner();return m._currentTaskStartTime=p,m._currentTaskTimeout=t,new Promise((h,g)=>{let _=c(()=>{u(_),rejectTimeoutError()},t);_.unref?.();function rejectTimeoutError(){let e=makeTimeoutError(r,t,o);s?.(d,e),g(e)}function resolve(e){if(m._currentTaskStartTime=void 0,m._currentTaskTimeout=void 0,u(_),zt()-p>=t){rejectTimeoutError();return}h(e)}function reject(e){m._currentTaskStartTime=void 0,m._currentTaskTimeout=void 0,u(_),g(e)}try{let t=e(...d);typeof t==`object`&&t&&typeof t.then==`function`?t.then(resolve,reject):resolve(t)}catch(e){reject(e)}})})}function withCancel(e,t){return(function runWithCancel(...r){return new Promise((o,s)=>{t.addEventListener(`abort`,()=>s(t.reason));try{let t=e(...r);typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,s):o(t)}catch(e){s(e)}})})}const Bt=new WeakMap;function abortIfTimeout([e],t){e&&abortContextSignal(e,t)}function abortContextSignal(e,t){Bt.get(e)?.abort(t)}function createTestContext(e,t){let context=function(){throw Error(`done() callback is deprecated, use promise instead`)},r=Bt.get(context);return r||(r=new AbortController,Bt.set(context,r)),context.signal=r.signal,context.task=e,context.skip=(t,r)=>{if(t!==!1)throw e.result??={state:`skip`},e.result.pending=!0,new PendingError(`test is skipped; abort execution`,e,typeof t==`string`?t:r)},context.annotate=((r,o,s)=>{if(e.result&&e.result.state!==`run`)throw Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let c={message:r,type:typeof o==`object`||o===void 0?`notice`:o},u=typeof o==`object`?o:s;return u&&(c.attachment=u,manageArtifactAttachment(c.attachment)),recordAsyncOperation(e,recordArtifact(e,{type:`internal:annotation`,annotation:c}).then(async({annotation:r})=>{if(!t.onTestAnnotate)throw Error(`Test runner doesn't support test annotations.`);await finishSendTasksUpdate(t);let o=await t.onTestAnnotate(e,r);return e.annotations.push(o),o}))}),context.onTestFailed=(o,s)=>{e.onFailed||=[],e.onFailed.push(withTimeout(o,s??t.config.hookTimeout,!0,Error(`STACK_TRACE_ERROR`),(e,t)=>r.abort(t)))},context.onTestFinished=(o,s)=>{e.onFinished||=[],e.onFinished.push(withTimeout(o,s??t.config.hookTimeout,!0,Error(`STACK_TRACE_ERROR`),(e,t)=>r.abort(t)))},t.extendTaskContext?.(context)||context}function makeTimeoutError(e,t,r){let 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`}".`,s=Error(o);return r?.stack&&(s.stack=r.stack.replace(s.message,r.message)),s}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Date.now;const{clearTimeout:Vt,setTimeout:Ht}=getSafeTimers(),Ut=new Map,Wt=[],R=[];function sendTasksUpdate(e){if(Ut.size){let t=Array.from(Ut).map(([e,t])=>[e,t[0],t[1]]),r=e.onTaskUpdate?.(t,Wt);r&&(R.push(r),r.then(()=>R.splice(R.indexOf(r),1),()=>{})),Wt.length=0,Ut.clear()}}async function finishSendTasksUpdate(e){sendTasksUpdate(e),await Promise.all(R)}async function recordArtifact(e,t){let r=getRunner(),o=findTestFileStackTrace(e.file.filepath,Error(`STACK_TRACE`).stack);if(o&&(t.location={file:o.file,line:o.line,column:o.column},t.type===`internal:annotation`&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(let e of t.attachments)manageArtifactAttachment(e);if(t.type===`internal:annotation`)return t;if(!r.onTestArtifactRecord)throw Error(`Test runner doesn't support test artifacts.`);await finishSendTasksUpdate(r);let s=await r.onTestArtifactRecord(e,t);return e.artifacts.push(s),s}const z=[];for(let e=65;e<91;e++)z.push(String.fromCharCode(e));for(let e=97;e<123;e++)z.push(String.fromCharCode(e));for(let e=0;e<10;e++)z.push(e.toString(10));z.push(`+`,`/`);function encodeUint8Array(e){let t=``,r=e.byteLength;for(let o=0;o<r;o+=3)if(r===o+1){let r=(e[o]&252)>>2,s=(e[o]&3)<<4;t+=z[r],t+=z[s],t+=`==`}else if(r===o+2){let r=(e[o]&252)>>2,s=(e[o]&3)<<4|(e[o+1]&240)>>4,c=(e[o+1]&15)<<2;t+=z[r],t+=z[s],t+=z[c],t+=`=`}else{let r=(e[o]&252)>>2,s=(e[o]&3)<<4|(e[o+1]&240)>>4,c=(e[o+1]&15)<<2|(e[o+2]&192)>>6,u=e[o+2]&63;t+=z[r],t+=z[s],t+=z[c],t+=z[u]}return t}function recordAsyncOperation(e,t){return t=t.finally(()=>{if(!e.promises)return;let r=e.promises.indexOf(t);r!==-1&&e.promises.splice(r,1)}),e.promises||=[],e.promises.push(t),t}function manageArtifactAttachment(e){if(e.body==null&&!e.path)throw TypeError(`Test attachment requires "body" or "path" to be set. Both are missing.`);if(e.body&&e.path)throw TypeError(`Test attachment requires only one of "body" or "path" to be set. Both are specified.`);if(e.path&&e.bodyEncoding)throw TypeError(`Test attachment with "path" should not have "bodyEncoding" specified.`);e.body instanceof Uint8Array&&(e.body=encodeUint8Array(e.body)),e.body!=null&&(e.bodyEncoding??=`base64`)}function getWorkerState(){let e=globalThis.__vitest_worker__;if(!e)throw Error(`Vitest failed to access its internal state.
43
63
 
44
64
  One of the following is possible:
45
65
  - "vitest" is imported directly without running "vitest" command
46
66
  - "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
47
67
  - "vitest" is imported inside Vite / Vitest config file
48
68
  - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
49
- `);return e}function isChildProcess(){return typeof process<`u`&&!!process.send}function resetModules(e,t=!1){let r=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((e,t)=>{r.some(e=>e.test(t))||(e.promise=void 0,e.exports=void 0,e.evaluated=!1,e.importers.clear())})}function waitNextTick(){let{setTimeout:e}=getSafeTimers();return new Promise(t=>e(t,0))}async function waitForImportsToResolve(){await waitNextTick();let e=getWorkerState(),t=[],r=e.resolvingModules.size;for(let[r,o]of e.evaluatedModules.idToModuleMap)o.promise&&!o.evaluated&&t.push(o.promise);!t.length&&!r||(await Promise.allSettled(t),await waitForImportsToResolve())}function isMockFunction(e){return typeof e==`function`&&`_isMockFunction`in e&&e._isMockFunction===!0}const qt=new Set,Jt=new Set,Yt=new WeakMap;function createMockInstance(e={}){let{originalImplementation:t,restore:r,mockImplementation:o,resetToMockImplementation:s,resetToMockName:c}=e;r&&qt.add(r);let u=getDefaultConfig(t),d=getDefaultState(),p=createMock({config:u,state:d,...e}),m=(o||t)?.length??0;return Object.defineProperty(p,`length`,{writable:!0,enumerable:!1,value:m,configurable:!0}),c&&(u.mockName=p.name||`vi.fn()`),Yt.set(p,u),Jt.add(p),p._isMockFunction=!0,p.getMockImplementation=()=>u.onceMockImplementations[0]||u.mockImplementation,Object.defineProperty(p,`mock`,{configurable:!1,enumerable:!0,writable:!1,value:d}),p.mockImplementation=function mockImplementation(e){return u.mockImplementation=e,p},p.mockImplementationOnce=function mockImplementationOnce(e){return u.onceMockImplementations.push(e),p},p.withImplementation=function withImplementation(e,t){let r=u.mockImplementation,o=u.onceMockImplementations,reset=()=>{u.mockImplementation=r,u.onceMockImplementations=o};u.mockImplementation=e,u.onceMockImplementations=[];let s=t();return typeof s==`object`&&typeof s?.then==`function`?s.then(()=>(reset(),p)):(reset(),p)},p.mockReturnThis=function mockReturnThis(){return p.mockImplementation(function(){return this})},p.mockReturnValue=function mockReturnValue(e){return p.mockImplementation(function(){return new.target&&throwConstructorError(`mockReturnValue`),e})},p.mockReturnValueOnce=function mockReturnValueOnce(e){return p.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockReturnValueOnce`),e})},p.mockThrow=function mockThrow(e){return p.mockImplementation(function(){throw e})},p.mockThrowOnce=function mockThrowOnce(e){return p.mockImplementationOnce(function(){throw e})},p.mockResolvedValue=function mockResolvedValue(e){return p.mockImplementation(function(){return new.target&&throwConstructorError(`mockResolvedValue`),Promise.resolve(e)})},p.mockResolvedValueOnce=function mockResolvedValueOnce(e){return p.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockResolvedValueOnce`),Promise.resolve(e)})},p.mockRejectedValue=function mockRejectedValue(e){return p.mockImplementation(function(){return new.target&&throwConstructorError(`mockRejectedValue`),Promise.reject(e)})},p.mockRejectedValueOnce=function mockRejectedValueOnce(e){return p.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockRejectedValueOnce`),Promise.reject(e)})},p.mockClear=function mockClear(){return d.calls=[],d.contexts=[],d.instances=[],d.invocationCallOrder=[],d.results=[],d.settledResults=[],p},p.mockReset=function mockReset(){return p.mockClear(),u.mockImplementation=s?o:void 0,u.mockName=c&&p.name||`vi.fn()`,u.onceMockImplementations=[],p},p.mockRestore=function mockRestore(){return p.mockReset(),r?.()},p.mockName=function mockName(e){return typeof e==`string`&&(u.mockName=e),p},p.getMockName=function getMockName(){return u.mockName||`vi.fn()`},Symbol.dispose&&(p[Symbol.dispose]=()=>p.mockRestore()),o&&p.mockImplementation(o),p}function fn(e){return e!=null&&isMockFunction(e)?e:createMockInstance({mockImplementation:e,resetToMockImplementation:!0})}function spyOn(e,t,r){assert$2(e!=null,`The vi.spyOn() function could not find an object to spy upon. The first argument must be defined.`),assert$2(typeof e==`object`||typeof e==`function`,`Vitest cannot spy on a primitive value.`);let[o,s]=getDescriptor(e,t)||[];assert$2(s||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let c=r||`value`,u=!1;c===`value`&&s&&s.value==null&&s.get&&(c=`get`,u=!0);let d;s?(d=s[c],d==null&&c===`value`&&(d=e[t])):d=c===`value`?e[t]:()=>e[t];let p=u&&d?d():d,m=typeof p;if(assert$2(m===`function`||c!==`value`&&d==null,`vi.spyOn() can only spy on a function. Received ${m}.`),isMockFunction(p))return p;let reassign=r=>{let{value:o,...u}=s||{configurable:!0,writable:!0};c!==`value`&&delete u.writable,u[c]=r,Object.defineProperty(e,t,u)},restore=()=>{o===e?s&&!d?Object.defineProperty(e,t,s):reassign(d):Reflect.deleteProperty(e,t)},h=createMockInstance({restore,originalImplementation:p,resetToMockName:!0});try{reassign(u?()=>h:h)}catch(r){throw r instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]===`Module`&&(r.message.includes(`Cannot redefine property`)||r.message.includes(`Cannot replace module namespace`)||r.message.includes(`can't redefine non-configurable property`))?TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:r}):r}return h}function getDescriptor(e,t){let r=Object.getOwnPropertyDescriptor(e,t);if(r)return[e,r];let o=Object.getPrototypeOf(e);for(;o!==null;){let e=Object.getOwnPropertyDescriptor(o,t);if(e)return[o,e];o=Object.getPrototypeOf(o)}}function assert$2(e,t){if(!e)throw Error(t)}e(assert$2,`assert`);let Xt=1;function createMock({state:e,config:t,name:r,prototypeState:o,prototypeConfig:s,keepMembersImplementation:c,mockImplementation:u,prototypeMembers:d=[]}){let p=t.mockOriginal,m=u,h=r||p?.name||`Mock`,g={[h]:(function(...r){registerCalls(r,e,o),registerInvocationOrder(Xt++,e,o);let u={type:`incomplete`,value:void 0},m={type:`incomplete`,value:void 0};registerResult(u,e,o),registerSettledResult(m,e,o);let y=new.target?void 0:this,[b,x]=registerInstance(y,e,o),[S,w]=registerContext(y,e,o),T=t.onceMockImplementations.shift()||t.mockImplementation||s?.onceMockImplementations.shift()||s?.mockImplementation||p||function(){},E,D,O=!1;try{if(new.target){E=Reflect.construct(T,r,new.target);for(let e of d){let t=E[e];if(t!==_.prototype[e])continue;let r=isMockFunction(t),o=r?t.mock:void 0,s=r?Yt.get(t):void 0;E[e]=createMockInstance({originalImplementation:c?s?.mockOriginal:void 0,prototypeState:o,prototypeConfig:s,keepMembersImplementation:c})}}else E=T.apply(this,r)}catch(e){throw D=e,O=!0,e instanceof TypeError&&e.message.includes(`is not a constructor`)&&console.warn(`[vitest] The ${g[h].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),e}finally{O?(u.type=`throw`,u.value=D,m.type=`rejected`,m.value=D):(u.type=`return`,u.value=E,new.target&&(e.contexts[S-1]=E,e.instances[b-1]=E,w!=null&&o&&(o.contexts[w-1]=E),x!=null&&o&&(o.instances[x-1]=E)),E instanceof Promise?E.then(e=>{m.type=`fulfilled`,m.value=e},e=>{m.type=`rejected`,m.value=e}):(m.type=`fulfilled`,m.value=E))}return E})},_=g[h],y=p||m;return y&&copyOriginalStaticProperties(_,y),_}function registerCalls(e,t,r){t.calls.push(e),r?.calls.push(e)}function registerInvocationOrder(e,t,r){t.invocationCallOrder.push(e),r?.invocationCallOrder.push(e)}function registerResult(e,t,r){t.results.push(e),r?.results.push(e)}function registerSettledResult(e,t,r){t.settledResults.push(e),r?.settledResults.push(e)}function registerInstance(e,t,r){return[t.instances.push(e),r?.instances.push(e)]}function registerContext(e,t,r){return[t.contexts.push(e),r?.contexts.push(e)]}function copyOriginalStaticProperties(e,t){let{properties:r,descriptors:o}=getAllProperties(t);for(let t of r){let r=o[t];getDescriptor(e,t)||Object.defineProperty(e,t,r)}}const Zt=new Set([`length`,`name`,`prototype`,Symbol.for(`nodejs.util.promisify.custom`)]);function getAllProperties(e){let t=new Set,r={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){let o=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let s of o)r[s]||Zt.has(s)||(t.add(s),r[s]=Object.getOwnPropertyDescriptor(e,s));e=Object.getPrototypeOf(e)}return{properties:t,descriptors:r}}function getDefaultConfig(e){return{mockImplementation:void 0,mockOriginal:e,mockName:`vi.fn()`,onceMockImplementations:[]}}function getDefaultState(){let e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}function restoreAllMocks(){for(let e of qt)e();qt.clear()}function clearAllMocks(){Jt.forEach(e=>e.mockClear())}function resetAllMocks(){Jt.forEach(e=>e.mockReset())}function throwConstructorError(e){throw TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}var Qt=Object.defineProperty,__defNormalProp=(e,t,r)=>t in e?Qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__name=(e,t)=>Qt(e,`name`,{value:t,configurable:!0}),__export=(e,t)=>{for(var r in t)Qt(e,r,{get:t[r],enumerable:!0})},__publicField=(e,t,r)=>__defNormalProp(e,typeof t==`symbol`?t:t+``,r),R={};__export(R,{addChainableMethod:()=>addChainableMethod,addLengthGuard:()=>addLengthGuard,addMethod:()=>addMethod,addProperty:()=>addProperty,checkError:()=>z,compareByInspect:()=>compareByInspect,eql:()=>Cn,events:()=>Tn,expectTypes:()=>expectTypes,flag:()=>flag,getActual:()=>getActual,getMessage:()=>getMessage2,getName:()=>getName,getOperator:()=>getOperator,getOwnEnumerableProperties:()=>getOwnEnumerableProperties,getOwnEnumerablePropertySymbols:()=>getOwnEnumerablePropertySymbols,getPathInfo:()=>getPathInfo,hasProperty:()=>hasProperty,inspect:()=>inspect2,isNaN:()=>Ln,isNumeric:()=>isNumeric,isProxyEnabled:()=>isProxyEnabled,isRegExp:()=>isRegExp2,objDisplay:()=>objDisplay,overwriteChainableMethod:()=>overwriteChainableMethod,overwriteMethod:()=>overwriteMethod,overwriteProperty:()=>overwriteProperty,proxify:()=>proxify,test:()=>test$1,transferFlags:()=>transferFlags,type:()=>type});var z={};__export(z,{compatibleConstructor:()=>compatibleConstructor,compatibleInstance:()=>compatibleInstance,compatibleMessage:()=>compatibleMessage,getConstructorName:()=>getConstructorName,getMessage:()=>getMessage});function isErrorInstance(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}__name(isErrorInstance,`isErrorInstance`);function isRegExp(e){return Object.prototype.toString.call(e)===`[object RegExp]`}__name(isRegExp,`isRegExp`);function compatibleInstance(e,t){return isErrorInstance(t)&&e===t}__name(compatibleInstance,`compatibleInstance`);function compatibleConstructor(e,t){return isErrorInstance(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t==`object`||typeof t==`function`)&&t.prototype?e.constructor===t||e instanceof t:!1}__name(compatibleConstructor,`compatibleConstructor`);function compatibleMessage(e,t){let r=typeof e==`string`?e:e.message;return isRegExp(t)?t.test(r):typeof t==`string`?r.indexOf(t)!==-1:!1}__name(compatibleMessage,`compatibleMessage`);function getConstructorName(e){let t=e;return isErrorInstance(e)?t=e.constructor.name:typeof e==`function`&&(t=e.name,t===``&&(t=new e().name||t)),t}__name(getConstructorName,`getConstructorName`);function getMessage(e){let t=``;return e&&e.message?t=e.message:typeof e==`string`&&(t=e),t}__name(getMessage,`getMessage`);function flag(e,t,r){let o=e.__flags||=Object.create(null);if(arguments.length===3)o[t]=r;else return o[t]}__name(flag,`flag`);function test$1(e,t){let r=flag(e,`negate`),o=t[0];return r?!o:o}e(test$1,`test`),__name(test$1,`test`);function type(e){if(e===void 0)return`undefined`;if(e===null)return`null`;let t=e[Symbol.toStringTag];return typeof t==`string`?t:Object.prototype.toString.call(e).slice(8,-1)}__name(type,`type`);var $t=`captureStackTrace`in Error,en=class _AssertionError extends Error{constructor(e=`Unspecified AssertionError`,t,r){super(e),__publicField(this,`message`),this.message=e,$t&&Error.captureStackTrace(this,r||_AssertionError);for(let e in t)e in this||(this[e]=t[e])}get name(){return`AssertionError`}get ok(){return!1}toJSON(e){return{...this,name:this.name,message:this.message,ok:!1,stack:e===!1?void 0:this.stack}}};__name(en,`AssertionError`);var V=en;function expectTypes(e,t){let r=flag(e,`message`),o=flag(e,`ssfi`);r=r?r+`: `:``,e=flag(e,`object`),t=t.map(function(e){return e.toLowerCase()}),t.sort();let s=t.map(function(e,r){let o=~[`a`,`e`,`i`,`o`,`u`].indexOf(e.charAt(0))?`an`:`a`;return(t.length>1&&r===t.length-1?`or `:``)+o+` `+e}).join(`, `),c=type(e).toLowerCase();if(!t.some(function(e){return c===e}))throw new V(r+`object tested must be `+s+`, but `+c+` given`,void 0,o)}__name(expectTypes,`expectTypes`);function getActual(e,t){return t.length>4?t[4]:e._obj}__name(getActual,`getActual`);var tn={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`]},nn={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`},H=`…`;function colorise(e,t){let r=tn[nn[t]]||tn[t]||``;return r?`\x1B[${r[0]}m${String(e)}\x1B[${r[1]}m`:String(e)}__name(colorise,`colorise`);function normaliseOptions({showHidden:e=!1,depth:t=2,colors:r=!1,customInspect:o=!0,showProxy:s=!1,maxArrayLength:c=1/0,breakLength:u=1/0,seen:d=[],truncate:p=1/0,stylize:m=String}={},h){let g={showHidden:!!e,depth:Number(t),colors:!!r,customInspect:!!o,showProxy:!!s,maxArrayLength:Number(c),breakLength:Number(u),truncate:Number(p),seen:d,inspect:h,stylize:m};return g.colors&&(g.stylize=colorise),g}__name(normaliseOptions,`normaliseOptions`);function isHighSurrogate(e){return e>=`\ud800`&&e<=`\udbff`}__name(isHighSurrogate,`isHighSurrogate`);function truncate(e,t,r=H){e=String(e);let o=r.length,s=e.length;if(o>t&&s>o)return r;if(s>t&&s>o){let s=t-o;return s>0&&isHighSurrogate(e[s-1])&&--s,`${e.slice(0,s)}${r}`}return e}__name(truncate,`truncate`);function inspectList(e,t,r,o=`, `){r||=t.inspect;let s=e.length;if(s===0)return``;let c=t.truncate,u=``,d=``,p=``;for(let m=0;m<s;m+=1){let s=m+1===e.length,h=m+2===e.length;p=`${H}(${e.length-m})`;let g=e[m];t.truncate=c-u.length-(s?0:o.length);let _=d||r(g,t)+(s?``:o),y=u.length+_.length,b=y+p.length;if(s&&y>c&&u.length+p.length<=c||!s&&!h&&b>c||(d=s?``:r(e[m+1],t)+(h?``:o),!s&&h&&b>c&&y+d.length>c))break;if(u+=_,!s&&!h&&y+d.length>=c){p=`${H}(${e.length-m-1})`;break}p=``}return`${u}${p}`}__name(inspectList,`inspectList`);function quoteComplexKey(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`)}__name(quoteComplexKey,`quoteComplexKey`);function inspectProperty([e,t],r){return r.truncate-=2,typeof e==`string`?e=quoteComplexKey(e):typeof e!=`number`&&(e=`[${r.inspect(e,r)}]`),r.truncate-=e.length,t=r.inspect(t,r),`${e}: ${t}`}__name(inspectProperty,`inspectProperty`);function inspectArray(e,t){let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`[]`;t.truncate-=4;let o=inspectList(e,t);t.truncate-=o.length;let s=``;return r.length&&(s=inspectList(r.map(t=>[t,e[t]]),t,inspectProperty)),`[ ${o}${s?`, ${s}`:``} ]`}__name(inspectArray,`inspectArray`);var rn=__name(e=>typeof Buffer==`function`&&e instanceof Buffer?`Buffer`:e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,`getArrayName`);function inspectTypedArray(e,t){let r=rn(e);t.truncate-=r.length+4;let o=Object.keys(e).slice(e.length);if(!e.length&&!o.length)return`${r}[]`;let s=``;for(let r=0;r<e.length;r++){let o=`${t.stylize(truncate(e[r],t.truncate),`number`)}${r===e.length-1?``:`, `}`;if(t.truncate-=o.length,e[r]!==e.length&&t.truncate<=3){s+=`${H}(${e.length-e[r]+1})`;break}s+=o}let c=``;return o.length&&(c=inspectList(o.map(t=>[t,e[t]]),t,inspectProperty)),`${r}[ ${s}${c?`, ${c}`:``} ]`}__name(inspectTypedArray,`inspectTypedArray`);function inspectDate(e,t){let r=e.toJSON();if(r===null)return`Invalid Date`;let o=r.split(`T`),s=o[0];return t.stylize(`${s}T${truncate(o[1],t.truncate-s.length-1)}`,`date`)}__name(inspectDate,`inspectDate`);function inspectFunction(e,t){let r=e[Symbol.toStringTag]||`Function`,o=e.name;return o?t.stylize(`[${r} ${truncate(o,t.truncate-11)}]`,`special`):t.stylize(`[${r}]`,`special`)}__name(inspectFunction,`inspectFunction`);function inspectMapEntry([e,t],r){return r.truncate-=4,e=r.inspect(e,r),r.truncate-=e.length,t=r.inspect(t,r),`${e} => ${t}`}__name(inspectMapEntry,`inspectMapEntry`);function mapToEntries(e){let t=[];return e.forEach((e,r)=>{t.push([r,e])}),t}__name(mapToEntries,`mapToEntries`);function inspectMap(e,t){return e.size===0?`Map{}`:(t.truncate-=7,`Map{ ${inspectList(mapToEntries(e),t,inspectMapEntry)} }`)}__name(inspectMap,`inspectMap`);var on=Number.isNaN||(e=>e!==e);function inspectNumber(e,t){return on(e)?t.stylize(`NaN`,`number`):e===1/0?t.stylize(`Infinity`,`number`):e===-1/0?t.stylize(`-Infinity`,`number`):e===0?t.stylize(1/e==1/0?`+0`:`-0`,`number`):t.stylize(truncate(String(e),t.truncate),`number`)}__name(inspectNumber,`inspectNumber`);function inspectBigInt(e,t){let r=truncate(e.toString(),t.truncate-1);return r!==H&&(r+=`n`),t.stylize(r,`bigint`)}__name(inspectBigInt,`inspectBigInt`);function inspectRegExp(e,t){let r=e.toString().split(`/`)[2],o=t.truncate-(2+r.length),s=e.source;return t.stylize(`/${truncate(s,o)}/${r}`,`regexp`)}__name(inspectRegExp,`inspectRegExp`);function arrayFromSet(e){let t=[];return e.forEach(e=>{t.push(e)}),t}__name(arrayFromSet,`arrayFromSet`);function inspectSet(e,t){return e.size===0?`Set{}`:(t.truncate-=7,`Set{ ${inspectList(arrayFromSet(e),t)} }`)}__name(inspectSet,`inspectSet`);var sn=RegExp(`['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]`,`g`),cn={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,"'":`\\'`,"\\":`\\\\`},ln=16,un=4;function escape(e){return cn[e]||`\\u${`0000${e.charCodeAt(0).toString(ln)}`.slice(-un)}`}__name(escape,`escape`);function inspectString(e,t){return sn.test(e)&&(e=e.replace(sn,escape)),t.stylize(`'${truncate(e,t.truncate-2)}'`,`string`)}__name(inspectString,`inspectString`);function inspectSymbol(e){return`description`in Symbol.prototype?e.description?`Symbol(${e.description})`:`Symbol()`:e.toString()}__name(inspectSymbol,`inspectSymbol`);var dn=__name(()=>`Promise{…}`,`getPromiseValue`);function inspectObject(e,t){let r=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(r.length===0&&o.length===0)return`{}`;if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let s=inspectList(r.map(t=>[t,e[t]]),t,inspectProperty),c=inspectList(o.map(t=>[t,e[t]]),t,inspectProperty);t.seen.pop();let u=``;return s&&c&&(u=`, `),`{ ${s}${u}${c} }`}__name(inspectObject,`inspectObject`);var pn=typeof Symbol<`u`&&Symbol.toStringTag?Symbol.toStringTag:!1;function inspectClass(e,t){let r=``;return pn&&pn in e&&(r=e[pn]),r||=e.constructor.name,(!r||r===`_class`)&&(r=`<Anonymous Class>`),t.truncate-=r.length,`${r}${inspectObject(e,t)}`}__name(inspectClass,`inspectClass`);function inspectArguments(e,t){return e.length===0?`Arguments[]`:(t.truncate-=13,`Arguments[ ${inspectList(e,t)} ]`)}__name(inspectArguments,`inspectArguments`);var mn=[`stack`,`line`,`column`,`name`,`message`,`fileName`,`lineNumber`,`columnNumber`,`number`,`description`,`cause`];function inspectObject2(e,t){let r=Object.getOwnPropertyNames(e).filter(e=>mn.indexOf(e)===-1),o=e.name;t.truncate-=o.length;let s=``;if(typeof e.message==`string`?s=truncate(e.message,t.truncate):r.unshift(`message`),s=s?`: ${s}`:``,t.truncate-=s.length+5,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let c=inspectList(r.map(t=>[t,e[t]]),t,inspectProperty);return`${o}${s}${c?` { ${c} }`:``}`}__name(inspectObject2,`inspectObject`);function inspectAttribute([e,t],r){return r.truncate-=3,t?`${r.stylize(String(e),`yellow`)}=${r.stylize(`"${t}"`,`string`)}`:`${r.stylize(String(e),`yellow`)}`}__name(inspectAttribute,`inspectAttribute`);function inspectNodeCollection(e,t){return inspectList(e,t,inspectNode,`
50
- `)}__name(inspectNodeCollection,`inspectNodeCollection`);function inspectNode(e,t){switch(e.nodeType){case 1:return inspectHTML(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}__name(inspectNode,`inspectNode`);function inspectHTML(e,t){let r=e.getAttributeNames(),o=e.tagName.toLowerCase(),s=t.stylize(`<${o}`,`special`),c=t.stylize(`>`,`special`),u=t.stylize(`</${o}>`,`special`);t.truncate-=o.length*2+5;let d=``;r.length>0&&(d+=` `,d+=inspectList(r.map(t=>[t,e.getAttribute(t)]),t,inspectAttribute,` `)),t.truncate-=d.length;let p=t.truncate,m=inspectNodeCollection(e.children,t);return m&&m.length>p&&(m=`${H}(${e.children.length})`),`${s}${d}${c}${m}${u}`}__name(inspectHTML,`inspectHTML`);var hn=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`chai/inspect`):`@@chai/inspect`,gn=Symbol.for(`nodejs.util.inspect.custom`),_n=new WeakMap,vn={},yn={undefined:__name((e,t)=>t.stylize(`undefined`,`undefined`),`undefined`),null:__name((e,t)=>t.stylize(`null`,`null`),`null`),boolean:__name((e,t)=>t.stylize(String(e),`boolean`),`boolean`),Boolean:__name((e,t)=>t.stylize(String(e),`boolean`),`Boolean`),number:inspectNumber,Number:inspectNumber,bigint:inspectBigInt,BigInt:inspectBigInt,string:inspectString,String:inspectString,function:inspectFunction,Function:inspectFunction,symbol:inspectSymbol,Symbol:inspectSymbol,Array:inspectArray,Date:inspectDate,Map:inspectMap,Set:inspectSet,RegExp:inspectRegExp,Promise:dn,WeakSet:__name((e,t)=>t.stylize(`WeakSet{…}`,`special`),`WeakSet`),WeakMap:__name((e,t)=>t.stylize(`WeakMap{…}`,`special`),`WeakMap`),Arguments:inspectArguments,Int8Array:inspectTypedArray,Uint8Array:inspectTypedArray,Uint8ClampedArray:inspectTypedArray,Int16Array:inspectTypedArray,Uint16Array:inspectTypedArray,Int32Array:inspectTypedArray,Uint32Array:inspectTypedArray,Float32Array:inspectTypedArray,Float64Array:inspectTypedArray,Generator:__name(()=>``,`Generator`),DataView:__name(()=>``,`DataView`),ArrayBuffer:__name(()=>``,`ArrayBuffer`),Error:inspectObject2,HTMLCollection:inspectNodeCollection,NodeList:inspectNodeCollection},bn=__name((e,t,r,o)=>hn in e&&typeof e[hn]==`function`?e[hn](t):gn in e&&typeof e[gn]==`function`?e[gn](t.depth,t,o):`inspect`in e&&typeof e.inspect==`function`?e.inspect(t.depth,t):`constructor`in e&&_n.has(e.constructor)?_n.get(e.constructor)(e,t):vn[r]?vn[r](e,t):``,`inspectCustom`),xn=Object.prototype.toString;function inspect(e,t={}){let r=normaliseOptions(t,inspect),{customInspect:o}=r,s=e===null?`null`:typeof e;if(s===`object`&&(s=xn.call(e).slice(8,-1)),s in yn)return yn[s](e,r);if(o&&e){let t=bn(e,r,s,inspect);if(t)return typeof t==`string`?t:inspect(t,r)}let c=e?Object.getPrototypeOf(e):!1;return c===Object.prototype||c===null?inspectObject(e,r):e&&typeof HTMLElement==`function`&&e instanceof HTMLElement?inspectHTML(e,r):`constructor`in e?e.constructor===Object?inspectObject(e,r):inspectClass(e,r):e===Object(e)?inspectObject(e,r):r.stylize(String(e),s)}__name(inspect,`inspect`);var U={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:[`then`,`catch`,`inspect`,`toJSON`],deepEqual:null};function inspect2(e,t,r,o){return inspect(e,{colors:o,depth:r===void 0?2:r,showHidden:t,truncate:U.truncateThreshold?U.truncateThreshold:1/0})}__name(inspect2,`inspect`);function objDisplay(e){let t=inspect2(e),r=Object.prototype.toString.call(e);if(U.truncateThreshold&&t.length>=U.truncateThreshold){if(r===`[object Function]`)return!e.name||e.name===``?`[Function]`:`[Function: `+e.name+`]`;if(r===`[object Array]`)return`[ Array(`+e.length+`) ]`;if(r===`[object Object]`){let t=Object.keys(e);return`{ Object (`+(t.length>2?t.splice(0,2).join(`, `)+`, ...`:t.join(`, `))+`) }`}else return t}else return t}__name(objDisplay,`objDisplay`);function getMessage2(e,t){let r=flag(e,`negate`),o=flag(e,`object`),s=t[3],c=getActual(e,t),u=r?t[2]:t[1],d=flag(e,`message`);return typeof u==`function`&&(u=u()),u||=``,u=u.replace(/#\{this\}/g,function(){return objDisplay(o)}).replace(/#\{act\}/g,function(){return objDisplay(c)}).replace(/#\{exp\}/g,function(){return objDisplay(s)}),d?d+`: `+u:u}__name(getMessage2,`getMessage`);function transferFlags(e,t,r){let o=e.__flags||=Object.create(null);t.__flags||=Object.create(null),r=arguments.length===3?r:!0;for(let e in o)(r||e!==`object`&&e!==`ssfi`&&e!==`lockSsfi`&&e!=`message`)&&(t.__flags[e]=o[e])}__name(transferFlags,`transferFlags`);function type2(e){if(e===void 0)return`undefined`;if(e===null)return`null`;let t=e[Symbol.toStringTag];return typeof t==`string`?t:Object.prototype.toString.call(e).slice(8,-1)}__name(type2,`type`);function FakeMap(){this._key=`chai/deep-eql__`+Math.random()+Date.now()}__name(FakeMap,`FakeMap`),FakeMap.prototype={get:__name(function get(e){return e[this._key]},`get`),set:__name(function set(e,t){Object.isExtensible(e)&&Object.defineProperty(e,this._key,{value:t,configurable:!0})},`set`)};var Sn=typeof WeakMap==`function`?WeakMap:FakeMap;function memoizeCompare(e,t,r){if(!r||isPrimitive(e)||isPrimitive(t))return null;var o=r.get(e);if(o){var s=o.get(t);if(typeof s==`boolean`)return s}return null}__name(memoizeCompare,`memoizeCompare`);function memoizeSet(e,t,r,o){if(!(!r||isPrimitive(e)||isPrimitive(t))){var s=r.get(e);s?s.set(t,o):(s=new Sn,s.set(t,o),r.set(e,s))}}__name(memoizeSet,`memoizeSet`);var Cn=deepEqual;function deepEqual(e,t,r){if(r&&r.comparator)return extensiveDeepEqual(e,t,r);var o=simpleEqual(e,t);return o===null?extensiveDeepEqual(e,t,r):o}__name(deepEqual,`deepEqual`);function simpleEqual(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t?!0:isPrimitive(e)||isPrimitive(t)?!1:null}__name(simpleEqual,`simpleEqual`);function extensiveDeepEqual(e,t,r){r||={},r.memoize=r.memoize===!1?!1:r.memoize||new Sn;var o=r&&r.comparator,s=memoizeCompare(e,t,r.memoize);if(s!==null)return s;var c=memoizeCompare(t,e,r.memoize);if(c!==null)return c;if(o){var u=o(e,t);if(u===!1||u===!0)return memoizeSet(e,t,r.memoize,u),u;var d=simpleEqual(e,t);if(d!==null)return d}var p=type2(e);if(p!==type2(t))return memoizeSet(e,t,r.memoize,!1),!1;memoizeSet(e,t,r.memoize,!0);var m=extensiveDeepEqualByType(e,t,p,r);return memoizeSet(e,t,r.memoize,m),m}__name(extensiveDeepEqual,`extensiveDeepEqual`);function extensiveDeepEqualByType(e,t,r,o){switch(r){case`String`:case`Number`:case`Boolean`:case`Date`:return deepEqual(e.valueOf(),t.valueOf());case`Promise`:case`Symbol`:case`function`:case`WeakMap`:case`WeakSet`:return e===t;case`Error`:return keysEqual(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 iterableEqual(e,t,o);case`RegExp`:return regexpEqual(e,t);case`Generator`:return generatorEqual(e,t,o);case`DataView`:return iterableEqual(new Uint8Array(e.buffer),new Uint8Array(t.buffer),o);case`ArrayBuffer`:return iterableEqual(new Uint8Array(e),new Uint8Array(t),o);case`Set`:return entriesEqual(e,t,o);case`Map`:return entriesEqual(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 objectEqual(e,t,o)}}__name(extensiveDeepEqualByType,`extensiveDeepEqualByType`);function regexpEqual(e,t){return e.toString()===t.toString()}__name(regexpEqual,`regexpEqual`);function entriesEqual(e,t,r){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var o=[],s=[];return e.forEach(__name(function gatherEntries(e,t){o.push([e,t])},`gatherEntries`)),t.forEach(__name(function gatherEntries(e,t){s.push([e,t])},`gatherEntries`)),iterableEqual(o.sort(),s.sort(),r)}__name(entriesEqual,`entriesEqual`);function iterableEqual(e,t,r){var o=e.length;if(o!==t.length)return!1;if(o===0)return!0;for(var s=-1;++s<o;)if(deepEqual(e[s],t[s],r)===!1)return!1;return!0}__name(iterableEqual,`iterableEqual`);function generatorEqual(e,t,r){return iterableEqual(getGeneratorEntries(e),getGeneratorEntries(t),r)}__name(generatorEqual,`generatorEqual`);function hasIteratorFunction(e){return typeof Symbol<`u`&&typeof e==`object`&&Symbol.iterator!==void 0&&typeof e[Symbol.iterator]==`function`}__name(hasIteratorFunction,`hasIteratorFunction`);function getIteratorEntries(e){if(hasIteratorFunction(e))try{return getGeneratorEntries(e[Symbol.iterator]())}catch{return[]}return[]}__name(getIteratorEntries,`getIteratorEntries`);function getGeneratorEntries(e){for(var t=e.next(),r=[t.value];t.done===!1;)t=e.next(),r.push(t.value);return r}__name(getGeneratorEntries,`getGeneratorEntries`);function getEnumerableKeys(e){var t=[];for(var r in e)t.push(r);return t}__name(getEnumerableKeys,`getEnumerableKeys`);function getEnumerableSymbols(e){for(var t=[],r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o+=1){var s=r[o];Object.getOwnPropertyDescriptor(e,s).enumerable&&t.push(s)}return t}__name(getEnumerableSymbols,`getEnumerableSymbols`);function keysEqual(e,t,r,o){var s=r.length;if(s===0)return!0;for(var c=0;c<s;c+=1)if(deepEqual(e[r[c]],t[r[c]],o)===!1)return!1;return!0}__name(keysEqual,`keysEqual`);function objectEqual(e,t,r){var o=getEnumerableKeys(e),s=getEnumerableKeys(t),c=getEnumerableSymbols(e),u=getEnumerableSymbols(t);if(o=o.concat(c),s=s.concat(u),o.length&&o.length===s.length)return iterableEqual(mapSymbols(o).sort(),mapSymbols(s).sort())===!1?!1:keysEqual(e,t,o,r);var d=getIteratorEntries(e),p=getIteratorEntries(t);return d.length&&d.length===p.length?(d.sort(),p.sort(),iterableEqual(d,p,r)):o.length===0&&d.length===0&&s.length===0&&p.length===0}__name(objectEqual,`objectEqual`);function isPrimitive(e){return typeof e!=`object`||!e}__name(isPrimitive,`isPrimitive`);function mapSymbols(e){return e.map(__name(function mapSymbol(e){return typeof e==`symbol`?e.toString():e},`mapSymbol`))}__name(mapSymbols,`mapSymbols`);function hasProperty(e,t){return e==null?!1:t in Object(e)}__name(hasProperty,`hasProperty`);function parsePath(e){return e.replace(/([^\\])\[/g,`$1.[`).match(/(\\\.|[^.]+?)+/g).map(e=>{if(e===`constructor`||e===`__proto__`||e===`prototype`)return{};let t=/^\[(\d+)\]$/.exec(e),r=null;return r=t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.[\]])/g,`$1`)},r})}__name(parsePath,`parsePath`);function internalGetPathValue(e,t,r){let o=e,s=null;r=r===void 0?t.length:r;for(let e=0;e<r;e++){let c=t[e];o&&(o=c.p===void 0?o[c.i]:o[c.p],e===r-1&&(s=o))}return s}__name(internalGetPathValue,`internalGetPathValue`);function getPathInfo(e,t){let r=parsePath(t),o=r[r.length-1],s={parent:r.length>1?internalGetPathValue(e,r,r.length-1):e,name:o.p||o.i,value:internalGetPathValue(e,r)};return s.exists=hasProperty(s.parent,s.name),s}__name(getPathInfo,`getPathInfo`);var wn=class _Assertion{constructor(e,t,r,o){return __publicField(this,`__flags`,{}),flag(this,`ssfi`,r||_Assertion),flag(this,`lockSsfi`,o),flag(this,`object`,e),flag(this,`message`,t),flag(this,`eql`,U.deepEqual||Cn),proxify(this)}static get includeStack(){return console.warn(`Assertion.includeStack is deprecated, use chai.config.includeStack instead.`),U.includeStack}static set includeStack(e){console.warn(`Assertion.includeStack is deprecated, use chai.config.includeStack instead.`),U.includeStack=e}static get showDiff(){return console.warn(`Assertion.showDiff is deprecated, use chai.config.showDiff instead.`),U.showDiff}static set showDiff(e){console.warn(`Assertion.showDiff is deprecated, use chai.config.showDiff instead.`),U.showDiff=e}static addProperty(e,t){addProperty(this.prototype,e,t)}static addMethod(e,t){addMethod(this.prototype,e,t)}static addChainableMethod(e,t,r){addChainableMethod(this.prototype,e,t,r)}static overwriteProperty(e,t){overwriteProperty(this.prototype,e,t)}static overwriteMethod(e,t){overwriteMethod(this.prototype,e,t)}static overwriteChainableMethod(e,t,r){overwriteChainableMethod(this.prototype,e,t,r)}assert(e,t,r,o,s,c){let u=test$1(this,arguments);if(!1!==c&&(c=!0),o===void 0&&s===void 0&&(c=!1),!0!==U.showDiff&&(c=!1),!u){t=getMessage2(this,arguments);let e={actual:getActual(this,arguments),expected:o,showDiff:c},r=getOperator(this,arguments);throw r&&(e.operator=r),new V(t,e,U.includeStack?this.assert:flag(this,`ssfi`))}}get _obj(){return flag(this,`object`)}set _obj(e){flag(this,`object`,e)}};__name(wn,`Assertion`);var W=wn,Tn=new EventTarget,En=class _PluginEvent extends Event{constructor(e,t,r){super(e),this.name=String(t),this.fn=r}};__name(En,`PluginEvent`);var Dn=En;function isProxyEnabled(){return U.useProxy&&typeof Proxy<`u`&&typeof Reflect<`u`}__name(isProxyEnabled,`isProxyEnabled`);function addProperty(e,t,r){r=r===void 0?function(){}:r,Object.defineProperty(e,t,{get:__name(function propertyGetter(){!isProxyEnabled()&&!flag(this,`lockSsfi`)&&flag(this,`ssfi`,propertyGetter);let e=r.call(this);if(e!==void 0)return e;let t=new W;return transferFlags(this,t),t},`propertyGetter`),configurable:!0}),Tn.dispatchEvent(new Dn(`addProperty`,t,r))}__name(addProperty,`addProperty`);var On=Object.getOwnPropertyDescriptor(function(){},`length`);function addLengthGuard(e,t,r){return On.configurable&&Object.defineProperty(e,`length`,{get:__name(function(){throw Error(r?`Invalid Chai property: `+t+`.length. Due to a compatibility issue, "length" cannot directly follow "`+t+`". Use "`+t+`.lengthOf" instead.`:`Invalid Chai property: `+t+`.length. See docs for proper usage of "`+t+`".`)},`get`)}),e}__name(addLengthGuard,`addLengthGuard`);function getProperties(e){let t=Object.getOwnPropertyNames(e);function addProperty2(e){t.indexOf(e)===-1&&t.push(e)}__name(addProperty2,`addProperty`);let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(addProperty2),r=Object.getPrototypeOf(r);return t}__name(getProperties,`getProperties`);var kn=[`__flags`,`__methods`,`_obj`,`assert`];function proxify(e,t){return isProxyEnabled()?new Proxy(e,{get:__name(function proxyGetter(e,r){if(typeof r==`string`&&U.proxyExcludedKeys.indexOf(r)===-1&&!Reflect.has(e,r)){if(t)throw Error(`Invalid Chai property: `+t+`.`+r+`. See docs for proper usage of "`+t+`".`);let o=null,s=4;throw getProperties(e).forEach(function(e){if(!Object.prototype.hasOwnProperty(e)&&kn.indexOf(e)===-1){let t=stringDistanceCapped(r,e,s);t<s&&(o=e,s=t)}}),Error(o===null?`Invalid Chai property: `+r:`Invalid Chai property: `+r+`. Did you mean "`+o+`"?`)}return kn.indexOf(r)===-1&&!flag(e,`lockSsfi`)&&flag(e,`ssfi`,proxyGetter),Reflect.get(e,r)},`proxyGetter`)}):e}__name(proxify,`proxify`);function stringDistanceCapped(e,t,r){if(Math.abs(e.length-t.length)>=r)return r;let o=[];for(let r=0;r<=e.length;r++)o[r]=Array(t.length+1).fill(0),o[r][0]=r;for(let e=0;e<t.length;e++)o[0][e]=e;for(let s=1;s<=e.length;s++){let c=e.charCodeAt(s-1);for(let e=1;e<=t.length;e++){if(Math.abs(s-e)>=r){o[s][e]=r;continue}o[s][e]=Math.min(o[s-1][e]+1,o[s][e-1]+1,o[s-1][e-1]+(c===t.charCodeAt(e-1)?0:1))}}return o[e.length][t.length]}__name(stringDistanceCapped,`stringDistanceCapped`);function addMethod(e,t,r){let o=__name(function(){flag(this,`lockSsfi`)||flag(this,`ssfi`,o);let e=r.apply(this,arguments);if(e!==void 0)return e;let t=new W;return transferFlags(this,t),t},`methodWrapper`);addLengthGuard(o,t,!1),e[t]=proxify(o,t),Tn.dispatchEvent(new Dn(`addMethod`,t,r))}__name(addMethod,`addMethod`);function overwriteProperty(e,t,r){let o=Object.getOwnPropertyDescriptor(e,t),s=__name(function(){},`_super`);o&&typeof o.get==`function`&&(s=o.get),Object.defineProperty(e,t,{get:__name(function overwritingPropertyGetter(){!isProxyEnabled()&&!flag(this,`lockSsfi`)&&flag(this,`ssfi`,overwritingPropertyGetter);let e=flag(this,`lockSsfi`);flag(this,`lockSsfi`,!0);let t=r(s).call(this);if(flag(this,`lockSsfi`,e),t!==void 0)return t;let o=new W;return transferFlags(this,o),o},`overwritingPropertyGetter`),configurable:!0})}__name(overwriteProperty,`overwriteProperty`);function overwriteMethod(e,t,r){let o=e[t],s=__name(function(){throw Error(t+` is not a function`)},`_super`);o&&typeof o==`function`&&(s=o);let c=__name(function(){flag(this,`lockSsfi`)||flag(this,`ssfi`,c);let e=flag(this,`lockSsfi`);flag(this,`lockSsfi`,!0);let t=r(s).apply(this,arguments);if(flag(this,`lockSsfi`,e),t!==void 0)return t;let o=new W;return transferFlags(this,o),o},`overwritingMethodWrapper`);addLengthGuard(c,t,!1),e[t]=proxify(c,t)}__name(overwriteMethod,`overwriteMethod`);var An=typeof Object.setPrototypeOf==`function`,jn=__name(function(){},`testFn`),Mn=Object.getOwnPropertyNames(jn).filter(function(e){let t=Object.getOwnPropertyDescriptor(jn,e);return typeof t==`object`?!t.configurable:!0}),Nn=Function.prototype.call,Pn=Function.prototype.apply,Fn=class _PluginAddChainableMethodEvent extends Dn{constructor(e,t,r,o){super(e,t,r),this.chainingBehavior=o}};__name(Fn,`PluginAddChainableMethodEvent`);var In=Fn;function addChainableMethod(e,t,r,o){typeof o!=`function`&&(o=__name(function(){},`chainingBehavior`));let s={method:r,chainingBehavior:o};e.__methods||={},e.__methods[t]=s,Object.defineProperty(e,t,{get:__name(function chainableMethodGetter(){s.chainingBehavior.call(this);let r=__name(function(){flag(this,`lockSsfi`)||flag(this,`ssfi`,r);let e=s.method.apply(this,arguments);if(e!==void 0)return e;let t=new W;return transferFlags(this,t),t},`chainableMethodWrapper`);if(addLengthGuard(r,t,!0),An){let e=Object.create(this);e.call=Nn,e.apply=Pn,Object.setPrototypeOf(r,e)}else Object.getOwnPropertyNames(e).forEach(function(t){Mn.indexOf(t)===-1&&Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))});return transferFlags(this,r),proxify(r)},`chainableMethodGetter`),configurable:!0}),Tn.dispatchEvent(new In(`addChainableMethod`,t,r,o))}__name(addChainableMethod,`addChainableMethod`);function overwriteChainableMethod(e,t,r,o){let s=e.__methods[t],c=s.chainingBehavior;s.chainingBehavior=__name(function overwritingChainableMethodGetter(){let e=o(c).call(this);if(e!==void 0)return e;let t=new W;return transferFlags(this,t),t},`overwritingChainableMethodGetter`);let u=s.method;s.method=__name(function overwritingChainableMethodWrapper(){let e=r(u).apply(this,arguments);if(e!==void 0)return e;let t=new W;return transferFlags(this,t),t},`overwritingChainableMethodWrapper`)}__name(overwriteChainableMethod,`overwriteChainableMethod`);function compareByInspect(e,t){return inspect2(e)<inspect2(t)?-1:1}__name(compareByInspect,`compareByInspect`);function getOwnEnumerablePropertySymbols(e){return typeof Object.getOwnPropertySymbols==`function`?Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}):[]}__name(getOwnEnumerablePropertySymbols,`getOwnEnumerablePropertySymbols`);function getOwnEnumerableProperties(e){return Object.keys(e).concat(getOwnEnumerablePropertySymbols(e))}__name(getOwnEnumerableProperties,`getOwnEnumerableProperties`);var Ln=Number.isNaN;function isObjectType(e){let t=type(e);return[`Array`,`Object`,`Function`].indexOf(t)!==-1}__name(isObjectType,`isObjectType`);function getOperator(e,t){let r=flag(e,`operator`),o=flag(e,`negate`),s=t[3],c=o?t[2]:t[1];if(r)return r;if(typeof c==`function`&&(c=c()),c||=``,!c||/\shave\s/.test(c))return;let u=isObjectType(s);return/\snot\s/.test(c)?u?`notDeepStrictEqual`:`notStrictEqual`:u?`deepStrictEqual`:`strictEqual`}__name(getOperator,`getOperator`);function getName(e){return e.name}__name(getName,`getName`);function isRegExp2(e){return Object.prototype.toString.call(e)===`[object RegExp]`}__name(isRegExp2,`isRegExp`);function isNumeric(e){return[`Number`,`BigInt`].includes(type(e))}__name(isNumeric,`isNumeric`);var{flag:G}=R;[`to`,`be`,`been`,`is`,`and`,`has`,`have`,`with`,`that`,`which`,`at`,`of`,`same`,`but`,`does`,`still`,`also`].forEach(function(e){W.addProperty(e)}),W.addProperty(`not`,function(){G(this,`negate`,!0)}),W.addProperty(`deep`,function(){G(this,`deep`,!0)}),W.addProperty(`nested`,function(){G(this,`nested`,!0)}),W.addProperty(`own`,function(){G(this,`own`,!0)}),W.addProperty(`ordered`,function(){G(this,`ordered`,!0)}),W.addProperty(`any`,function(){G(this,`any`,!0),G(this,`all`,!1)}),W.addProperty(`all`,function(){G(this,`all`,!0),G(this,`any`,!1)});var Rn={function:[`function`,`asyncfunction`,`generatorfunction`,`asyncgeneratorfunction`],asyncfunction:[`asyncfunction`,`asyncgeneratorfunction`],generatorfunction:[`generatorfunction`,`asyncgeneratorfunction`],asyncgeneratorfunction:[`asyncgeneratorfunction`]};function an(e,t){t&&G(this,`message`,t),e=e.toLowerCase();let r=G(this,`object`),o=~[`a`,`e`,`i`,`o`,`u`].indexOf(e.charAt(0))?`an `:`a `,s=type(r).toLowerCase();Rn.function.includes(e)?this.assert(Rn[e].includes(s),`expected #{this} to be `+o+e,`expected #{this} not to be `+o+e):this.assert(e===s,`expected #{this} to be `+o+e,`expected #{this} not to be `+o+e)}__name(an,`an`),W.addChainableMethod(`an`,an),W.addChainableMethod(`a`,an);function SameValueZero(e,t){return Ln(e)&&Ln(t)||e===t}__name(SameValueZero,`SameValueZero`);function includeChainingBehavior(){G(this,`contains`,!0)}__name(includeChainingBehavior,`includeChainingBehavior`);function include(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=type(r).toLowerCase(),s=G(this,`message`),c=G(this,`negate`),u=G(this,`ssfi`),d=G(this,`deep`),p=d?`deep `:``,m=d?G(this,`eql`):SameValueZero;s=s?s+`: `:``;let h=!1;switch(o){case`string`:h=r.indexOf(e)!==-1;break;case`weakset`:if(d)throw new V(s+`unable to use .deep.include with WeakSet`,void 0,u);h=r.has(e);break;case`map`:r.forEach(function(t){h||=m(t,e)});break;case`set`:d?r.forEach(function(t){h||=m(t,e)}):h=r.has(e);break;case`array`:h=d?r.some(function(t){return m(t,e)}):r.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new V(s+`the given combination of arguments (`+o+` and `+type(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 `+type(e).toLowerCase(),void 0,u);let t=Object.keys(e),d=null,p=0;if(t.forEach(function(o){let s=new W(r);if(transferFlags(this,s,!0),G(s,`lockSsfi`,!0),!c||t.length===1){s.property(o,e[o]);return}try{s.property(o,e[o])}catch(e){if(!z.compatibleConstructor(e,V))throw e;d===null&&(d=e),p++}},this),c&&t.length>1&&p===t.length)throw d;return}}this.assert(h,`expected #{this} to `+p+`include `+inspect2(e),`expected #{this} to not `+p+`include `+inspect2(e))}__name(include,`include`),W.addChainableMethod(`include`,include,includeChainingBehavior),W.addChainableMethod(`contain`,include,includeChainingBehavior),W.addChainableMethod(`contains`,include,includeChainingBehavior),W.addChainableMethod(`includes`,include,includeChainingBehavior),W.addProperty(`ok`,function(){this.assert(G(this,`object`),`expected #{this} to be truthy`,`expected #{this} to be falsy`)}),W.addProperty(`true`,function(){this.assert(!0===G(this,`object`),`expected #{this} to be true`,`expected #{this} to be false`,!G(this,`negate`))}),W.addProperty(`numeric`,function(){let e=G(this,`object`);this.assert([`Number`,`BigInt`].includes(type(e)),`expected #{this} to be numeric`,`expected #{this} to not be numeric`,!G(this,`negate`))}),W.addProperty(`callable`,function(){let e=G(this,`object`),t=G(this,`ssfi`),r=G(this,`message`),o=r?`${r}: `:``,s=G(this,`negate`),c=s?`${o}expected ${inspect2(e)} not to be a callable function`:`${o}expected ${inspect2(e)} to be a callable function`,u=[`Function`,`AsyncFunction`,`GeneratorFunction`,`AsyncGeneratorFunction`].includes(type(e));if(u&&s||!u&&!s)throw new V(c,void 0,t)}),W.addProperty(`false`,function(){this.assert(!1===G(this,`object`),`expected #{this} to be false`,`expected #{this} to be true`,!!G(this,`negate`))}),W.addProperty(`null`,function(){this.assert(G(this,`object`)===null,`expected #{this} to be null`,`expected #{this} not to be null`)}),W.addProperty(`undefined`,function(){this.assert(G(this,`object`)===void 0,`expected #{this} to be undefined`,`expected #{this} not to be undefined`)}),W.addProperty(`NaN`,function(){this.assert(Ln(G(this,`object`)),`expected #{this} to be NaN`,`expected #{this} not to be NaN`)});function assertExist(){let e=G(this,`object`);this.assert(e!=null,`expected #{this} to exist`,`expected #{this} to not exist`)}__name(assertExist,`assertExist`),W.addProperty(`exist`,assertExist),W.addProperty(`exists`,assertExist),W.addProperty(`empty`,function(){let e=G(this,`object`),t=G(this,`ssfi`),r=G(this,`message`),o;switch(r=r?r+`: `:``,type(e).toLowerCase()){case`array`:case`string`:o=e.length;break;case`map`:case`set`:o=e.size;break;case`weakmap`:case`weakset`:throw new V(r+`.empty was passed a weak collection`,void 0,t);case`function`:throw new V((r+`.empty was passed a function `+getName(e)).trim(),void 0,t);default:if(e!==Object(e))throw new V(r+`.empty was passed non-string primitive `+inspect2(e),void 0,t);o=Object.keys(e).length}this.assert(o===0,`expected #{this} to be empty`,`expected #{this} not to be empty`)});function checkArguments(){let e=type(G(this,`object`));this.assert(e===`Arguments`,`expected #{this} to be arguments but got `+e,`expected #{this} to not be arguments`)}__name(checkArguments,`checkArguments`),W.addProperty(`arguments`,checkArguments),W.addProperty(`Arguments`,checkArguments);function assertEqual(e,t){t&&G(this,`message`,t);let r=G(this,`object`);if(G(this,`deep`)){let t=G(this,`lockSsfi`);G(this,`lockSsfi`,!0),this.eql(e),G(this,`lockSsfi`,t)}else this.assert(e===r,`expected #{this} to equal #{exp}`,`expected #{this} to not equal #{exp}`,e,this._obj,!0)}__name(assertEqual,`assertEqual`),W.addMethod(`equal`,assertEqual),W.addMethod(`equals`,assertEqual),W.addMethod(`eq`,assertEqual);function assertEql(e,t){t&&G(this,`message`,t);let r=G(this,`eql`);this.assert(r(e,G(this,`object`)),`expected #{this} to deeply equal #{exp}`,`expected #{this} to not deeply equal #{exp}`,e,this._obj,!0)}__name(assertEql,`assertEql`),W.addMethod(`eql`,assertEql),W.addMethod(`eqls`,assertEql);function assertAbove(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=G(this,`doLength`),s=G(this,`message`),c=s?s+`: `:``,u=G(this,`ssfi`),d=type(r).toLowerCase(),p=type(e).toLowerCase();if(o&&d!==`map`&&d!==`set`&&new W(r,s,u,!0).to.have.property(`length`),!o&&d===`date`&&p!==`date`)throw new V(c+`the argument to above must be a date`,void 0,u);if(!isNumeric(e)&&(o||isNumeric(r)))throw new V(c+`the argument to above must be a number`,void 0,u);if(!o&&d!==`date`&&!isNumeric(r)){let e=d===`string`?`'`+r+`'`:r;throw new V(c+`expected `+e+` to be a number or a date`,void 0,u)}if(o){let t=`length`,o;d===`map`||d===`set`?(t=`size`,o=r.size):o=r.length,this.assert(o>e,`expected #{this} to have a `+t+` above #{exp} but got #{act}`,`expected #{this} to not have a `+t+` above #{exp}`,e,o)}else this.assert(r>e,`expected #{this} to be above #{exp}`,`expected #{this} to be at most #{exp}`,e)}__name(assertAbove,`assertAbove`),W.addMethod(`above`,assertAbove),W.addMethod(`gt`,assertAbove),W.addMethod(`greaterThan`,assertAbove);function assertLeast(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=G(this,`doLength`),s=G(this,`message`),c=s?s+`: `:``,u=G(this,`ssfi`),d=type(r).toLowerCase(),p=type(e).toLowerCase(),m,h=!0;if(o&&d!==`map`&&d!==`set`&&new W(r,s,u,!0).to.have.property(`length`),!o&&d===`date`&&p!==`date`)m=c+`the argument to least must be a date`;else if(!isNumeric(e)&&(o||isNumeric(r)))m=c+`the argument to least must be a number`;else if(!o&&d!==`date`&&!isNumeric(r)){let e=d===`string`?`'`+r+`'`:r;m=c+`expected `+e+` to be a number or a date`}else h=!1;if(h)throw new V(m,void 0,u);if(o){let t=`length`,o;d===`map`||d===`set`?(t=`size`,o=r.size):o=r.length,this.assert(o>=e,`expected #{this} to have a `+t+` at least #{exp} but got #{act}`,`expected #{this} to have a `+t+` below #{exp}`,e,o)}else this.assert(r>=e,`expected #{this} to be at least #{exp}`,`expected #{this} to be below #{exp}`,e)}__name(assertLeast,`assertLeast`),W.addMethod(`least`,assertLeast),W.addMethod(`gte`,assertLeast),W.addMethod(`greaterThanOrEqual`,assertLeast);function assertBelow(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=G(this,`doLength`),s=G(this,`message`),c=s?s+`: `:``,u=G(this,`ssfi`),d=type(r).toLowerCase(),p=type(e).toLowerCase(),m,h=!0;if(o&&d!==`map`&&d!==`set`&&new W(r,s,u,!0).to.have.property(`length`),!o&&d===`date`&&p!==`date`)m=c+`the argument to below must be a date`;else if(!isNumeric(e)&&(o||isNumeric(r)))m=c+`the argument to below must be a number`;else if(!o&&d!==`date`&&!isNumeric(r)){let e=d===`string`?`'`+r+`'`:r;m=c+`expected `+e+` to be a number or a date`}else h=!1;if(h)throw new V(m,void 0,u);if(o){let t=`length`,o;d===`map`||d===`set`?(t=`size`,o=r.size):o=r.length,this.assert(o<e,`expected #{this} to have a `+t+` below #{exp} but got #{act}`,`expected #{this} to not have a `+t+` below #{exp}`,e,o)}else this.assert(r<e,`expected #{this} to be below #{exp}`,`expected #{this} to be at least #{exp}`,e)}__name(assertBelow,`assertBelow`),W.addMethod(`below`,assertBelow),W.addMethod(`lt`,assertBelow),W.addMethod(`lessThan`,assertBelow);function assertMost(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=G(this,`doLength`),s=G(this,`message`),c=s?s+`: `:``,u=G(this,`ssfi`),d=type(r).toLowerCase(),p=type(e).toLowerCase(),m,h=!0;if(o&&d!==`map`&&d!==`set`&&new W(r,s,u,!0).to.have.property(`length`),!o&&d===`date`&&p!==`date`)m=c+`the argument to most must be a date`;else if(!isNumeric(e)&&(o||isNumeric(r)))m=c+`the argument to most must be a number`;else if(!o&&d!==`date`&&!isNumeric(r)){let e=d===`string`?`'`+r+`'`:r;m=c+`expected `+e+` to be a number or a date`}else h=!1;if(h)throw new V(m,void 0,u);if(o){let t=`length`,o;d===`map`||d===`set`?(t=`size`,o=r.size):o=r.length,this.assert(o<=e,`expected #{this} to have a `+t+` at most #{exp} but got #{act}`,`expected #{this} to have a `+t+` above #{exp}`,e,o)}else this.assert(r<=e,`expected #{this} to be at most #{exp}`,`expected #{this} to be above #{exp}`,e)}__name(assertMost,`assertMost`),W.addMethod(`most`,assertMost),W.addMethod(`lte`,assertMost),W.addMethod(`lessThanOrEqual`,assertMost),W.addMethod(`within`,function(e,t,r){r&&G(this,`message`,r);let o=G(this,`object`),s=G(this,`doLength`),c=G(this,`message`),u=c?c+`: `:``,d=G(this,`ssfi`),p=type(o).toLowerCase(),m=type(e).toLowerCase(),h=type(t).toLowerCase(),g,_=!0,y=m===`date`&&h===`date`?e.toISOString()+`..`+t.toISOString():e+`..`+t;if(s&&p!==`map`&&p!==`set`&&new W(o,c,d,!0).to.have.property(`length`),!s&&p===`date`&&(m!==`date`||h!==`date`))g=u+`the arguments to within must be dates`;else if((!isNumeric(e)||!isNumeric(t))&&(s||isNumeric(o)))g=u+`the arguments to within must be numbers`;else if(!s&&p!==`date`&&!isNumeric(o)){let e=p===`string`?`'`+o+`'`:o;g=u+`expected `+e+` to be a number or a date`}else _=!1;if(_)throw new V(g,void 0,d);if(s){let r=`length`,s;p===`map`||p===`set`?(r=`size`,s=o.size):s=o.length,this.assert(s>=e&&s<=t,`expected #{this} to have a `+r+` within `+y,`expected #{this} to not have a `+r+` within `+y)}else this.assert(o>=e&&o<=t,`expected #{this} to be within `+y,`expected #{this} to not be within `+y)});function assertInstanceOf(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=G(this,`ssfi`),s=G(this,`message`),c;try{c=r instanceof e}catch(t){throw t instanceof TypeError?(s=s?s+`: `:``,new V(s+`The instanceof assertion needs a constructor but `+type(e)+` was given.`,void 0,o)):t}let u=getName(e);u??=`an unnamed constructor`,this.assert(c,`expected #{this} to be an instance of `+u,`expected #{this} to not be an instance of `+u)}__name(assertInstanceOf,`assertInstanceOf`),W.addMethod(`instanceof`,assertInstanceOf),W.addMethod(`instanceOf`,assertInstanceOf);function assertProperty(e,t,r){r&&G(this,`message`,r);let o=G(this,`nested`),s=G(this,`own`),c=G(this,`message`),u=G(this,`object`),d=G(this,`ssfi`),p=typeof e;if(c=c?c+`: `:``,o){if(p!==`string`)throw new V(c+`the argument to property must be a string when using nested syntax`,void 0,d)}else if(p!==`string`&&p!==`number`&&p!==`symbol`)throw new V(c+`the argument to property must be a string, number, or symbol`,void 0,d);if(o&&s)throw new V(c+`The "nested" and "own" flags cannot be combined.`,void 0,d);if(u==null)throw new V(c+`Target cannot be null or undefined.`,void 0,d);let m=G(this,`deep`),h=G(this,`negate`),g=o?getPathInfo(u,e):null,_=o?g.value:u[e],y=m?G(this,`eql`):(e,t)=>e===t,b=``;m&&(b+=`deep `),s&&(b+=`own `),o&&(b+=`nested `),b+=`property `;let x;x=s?Object.prototype.hasOwnProperty.call(u,e):o?g.exists:hasProperty(u,e),(!h||arguments.length===1)&&this.assert(x,`expected #{this} to have `+b+inspect2(e),`expected #{this} to not have `+b+inspect2(e)),arguments.length>1&&this.assert(x&&y(t,_),`expected #{this} to have `+b+inspect2(e)+` of #{exp}, but got #{act}`,`expected #{this} to not have `+b+inspect2(e)+` of #{act}`,t,_),G(this,`object`,_)}__name(assertProperty,`assertProperty`),W.addMethod(`property`,assertProperty);function assertOwnProperty(e,t,r){G(this,`own`,!0),assertProperty.apply(this,arguments)}__name(assertOwnProperty,`assertOwnProperty`),W.addMethod(`ownProperty`,assertOwnProperty),W.addMethod(`haveOwnProperty`,assertOwnProperty);function assertOwnPropertyDescriptor(e,t,r){typeof t==`string`&&(r=t,t=null),r&&G(this,`message`,r);let o=G(this,`object`),s=Object.getOwnPropertyDescriptor(Object(o),e),c=G(this,`eql`);s&&t?this.assert(c(t,s),`expected the own property descriptor for `+inspect2(e)+` on #{this} to match `+inspect2(t)+`, got `+inspect2(s),`expected the own property descriptor for `+inspect2(e)+` on #{this} to not match `+inspect2(t),t,s,!0):this.assert(s,`expected #{this} to have an own property descriptor for `+inspect2(e),`expected #{this} to not have an own property descriptor for `+inspect2(e)),G(this,`object`,s)}__name(assertOwnPropertyDescriptor,`assertOwnPropertyDescriptor`),W.addMethod(`ownPropertyDescriptor`,assertOwnPropertyDescriptor),W.addMethod(`haveOwnPropertyDescriptor`,assertOwnPropertyDescriptor);function assertLengthChain(){G(this,`doLength`,!0)}__name(assertLengthChain,`assertLengthChain`);function assertLength(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=type(r).toLowerCase(),s=G(this,`message`),c=G(this,`ssfi`),u=`length`,d;switch(o){case`map`:case`set`:u=`size`,d=r.size;break;default:new W(r,s,c,!0).to.have.property(`length`),d=r.length}this.assert(d==e,`expected #{this} to have a `+u+` of #{exp} but got #{act}`,`expected #{this} to not have a `+u+` of #{act}`,e,d)}__name(assertLength,`assertLength`),W.addChainableMethod(`length`,assertLength,assertLengthChain),W.addChainableMethod(`lengthOf`,assertLength,assertLengthChain);function assertMatch(e,t){t&&G(this,`message`,t);let r=G(this,`object`);this.assert(e.exec(r),`expected #{this} to match `+e,`expected #{this} not to match `+e)}__name(assertMatch,`assertMatch`),W.addMethod(`match`,assertMatch),W.addMethod(`matches`,assertMatch),W.addMethod(`string`,function(e,t){t&&G(this,`message`,t);let r=G(this,`object`);new W(r,G(this,`message`),G(this,`ssfi`),!0).is.a(`string`),this.assert(~r.indexOf(e),`expected #{this} to contain `+inspect2(e),`expected #{this} to not contain `+inspect2(e))});function assertKeys(e){let t=G(this,`object`),r=type(t),o=type(e),s=G(this,`ssfi`),c=G(this,`deep`),u,d=``,p,m=!0,h=G(this,`message`);h=h?h+`: `:``;let g=h+`when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments`;if(r===`Map`||r===`Set`)d=c?`deeply `:``,p=[],t.forEach(function(e,t){p.push(t)}),o!==`Array`&&(e=Array.prototype.slice.call(arguments));else{switch(p=getOwnEnumerableProperties(t),o){case`Array`:if(arguments.length>1)throw new V(g,void 0,s);break;case`Object`:if(arguments.length>1)throw new V(g,void 0,s);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(e){return typeof e==`symbol`?e:String(e)})}if(!e.length)throw new V(h+`keys required`,void 0,s);let _=e.length,y=G(this,`any`),b=G(this,`all`),x=e,S=c?G(this,`eql`):(e,t)=>e===t;if(!y&&!b&&(b=!0),y&&(m=x.some(function(e){return p.some(function(t){return S(e,t)})})),b&&(m=x.every(function(e){return p.some(function(t){return S(e,t)})}),G(this,`contains`)||(m&&=e.length==p.length)),_>1){e=e.map(function(e){return inspect2(e)});let t=e.pop();b&&(u=e.join(`, `)+`, and `+t),y&&(u=e.join(`, `)+`, or `+t)}else u=inspect2(e[0]);u=(_>1?`keys `:`key `)+u,u=(G(this,`contains`)?`contain `:`have `)+u,this.assert(m,`expected #{this} to `+d+u,`expected #{this} to not `+d+u,x.slice(0).sort(compareByInspect),p.sort(compareByInspect),!0)}__name(assertKeys,`assertKeys`),W.addMethod(`keys`,assertKeys),W.addMethod(`key`,assertKeys);function assertThrows(e,t,r){r&&G(this,`message`,r);let o=G(this,`object`),s=G(this,`ssfi`),c=G(this,`message`),u=G(this,`negate`)||!1;new W(o,c,s,!0).is.a(`function`),(isRegExp2(e)||typeof e==`string`)&&(t=e,e=null);let d,p=!1;try{o()}catch(e){p=!0,d=e}let m=e===void 0&&t===void 0,h=!!(e&&t),g=!1,_=!1;if(m||!m&&!u){let t=`an error`;e instanceof Error?t=`#{exp}`:e&&(t=z.getConstructorName(e));let r=d;if(d instanceof Error)r=d.toString();else if(typeof d==`string`)r=d;else if(d&&(typeof d==`object`||typeof d==`function`))try{r=z.getConstructorName(d)}catch{}this.assert(p,`expected #{this} to throw `+t,`expected #{this} to not throw an error but #{act} was thrown`,e&&e.toString(),r)}if(e&&d&&(e instanceof Error&&z.compatibleInstance(d,e)===u&&(h&&u?g=!0:this.assert(u,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(d&&!u?` but #{act} was thrown`:``),e.toString(),d.toString())),z.compatibleConstructor(d,e)===u&&(h&&u?g=!0:this.assert(u,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(d?` but #{act} was thrown`:``),e instanceof Error?e.toString():e&&z.getConstructorName(e),d instanceof Error?d.toString():d&&z.getConstructorName(d)))),d&&t!=null){let e=`including`;isRegExp2(t)&&(e=`matching`),z.compatibleMessage(d,t)===u&&(h&&u?_=!0:this.assert(u,`expected #{this} to throw error `+e+` #{exp} but got #{act}`,`expected #{this} to throw error not `+e+` #{exp}`,t,z.getMessage(d)))}g&&_&&this.assert(u,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(d?` but #{act} was thrown`:``),e instanceof Error?e.toString():e&&z.getConstructorName(e),d instanceof Error?d.toString():d&&z.getConstructorName(d)),G(this,`object`,d)}__name(assertThrows,`assertThrows`),W.addMethod(`throw`,assertThrows),W.addMethod(`throws`,assertThrows),W.addMethod(`Throw`,assertThrows);function respondTo(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=G(this,`itself`),s=typeof r==`function`&&!o?r.prototype[e]:r[e];this.assert(typeof s==`function`,`expected #{this} to respond to `+inspect2(e),`expected #{this} to not respond to `+inspect2(e))}__name(respondTo,`respondTo`),W.addMethod(`respondTo`,respondTo),W.addMethod(`respondsTo`,respondTo),W.addProperty(`itself`,function(){G(this,`itself`,!0)});function satisfy(e,t){t&&G(this,`message`,t);let r=e(G(this,`object`));this.assert(r,`expected #{this} to satisfy `+objDisplay(e),`expected #{this} to not satisfy`+objDisplay(e),!G(this,`negate`),r)}__name(satisfy,`satisfy`),W.addMethod(`satisfy`,satisfy),W.addMethod(`satisfies`,satisfy);function closeTo(e,t,r){r&&G(this,`message`,r);let o=G(this,`object`),s=G(this,`message`),c=G(this,`ssfi`);new W(o,s,c,!0).is.numeric;let u="A `delta` value is required for `closeTo`";if(t==null||(new W(t,s,c,!0).is.numeric,u="A `expected` value is required for `closeTo`",e==null))throw new V(s?`${s}: ${u}`:u,void 0,c);new W(e,s,c,!0).is.numeric;let d=__name(e=>e<0?-e:e,`abs`),p=__name(e=>parseFloat(parseFloat(e).toPrecision(12)),`strip`);this.assert(p(d(o-e))<=t,`expected #{this} to be close to `+e+` +/- `+t,`expected #{this} not to be close to `+e+` +/- `+t)}__name(closeTo,`closeTo`),W.addMethod(`closeTo`,closeTo),W.addMethod(`approximately`,closeTo);function isSubsetOf(e,t,r,o,s){let c=Array.from(t),u=Array.from(e);if(!o){if(u.length!==c.length)return!1;c=c.slice()}return u.every(function(e,t){if(s)return r?r(e,c[t]):e===c[t];if(!r){let t=c.indexOf(e);return t===-1?!1:(o||c.splice(t,1),!0)}return c.some(function(t,s){return r(e,t)?(o||c.splice(s,1),!0):!1})})}__name(isSubsetOf,`isSubsetOf`),W.addMethod(`members`,function(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=G(this,`message`),s=G(this,`ssfi`);new W(r,o,s,!0).to.be.iterable,new W(e,o,s,!0).to.be.iterable;let c=G(this,`contains`),u=G(this,`ordered`),d,p,m;c?(d=u?`an ordered superset`:`a superset`,p=`expected #{this} to be `+d+` of #{exp}`,m=`expected #{this} to not be `+d+` of #{exp}`):(d=u?`ordered members`:`members`,p=`expected #{this} to have the same `+d+` as #{exp}`,m=`expected #{this} to not have the same `+d+` as #{exp}`);let h=G(this,`deep`)?G(this,`eql`):void 0;this.assert(isSubsetOf(e,r,h,c,u),p,m,e,r,!0)}),W.addProperty(`iterable`,function(e){e&&G(this,`message`,e);let t=G(this,`object`);this.assert(t!=null&&t[Symbol.iterator],`expected #{this} to be an iterable`,`expected #{this} to not be an iterable`,t)});function oneOf(e,t){t&&G(this,`message`,t);let r=G(this,`object`),o=G(this,`message`),s=G(this,`ssfi`),c=G(this,`contains`),u=G(this,`deep`),d=G(this,`eql`);new W(e,o,s,!0).to.be.an(`array`),c?this.assert(e.some(function(e){return r.indexOf(e)>-1}),`expected #{this} to contain one of #{exp}`,`expected #{this} to not contain one of #{exp}`,e,r):u?this.assert(e.some(function(e){return d(r,e)}),`expected #{this} to deeply equal one of #{exp}`,`expected #{this} to deeply equal one of #{exp}`,e,r):this.assert(e.indexOf(r)>-1,`expected #{this} to be one of #{exp}`,`expected #{this} to not be one of #{exp}`,e,r)}__name(oneOf,`oneOf`),W.addMethod(`oneOf`,oneOf);function assertChanges(e,t,r){r&&G(this,`message`,r);let o=G(this,`object`),s=G(this,`message`),c=G(this,`ssfi`);new W(o,s,c,!0).is.a(`function`);let u;t?(new W(e,s,c,!0).to.have.property(t),u=e[t]):(new W(e,s,c,!0).is.a(`function`),u=e()),o();let d=t==null?e():e[t],p=t==null?u:`.`+t;G(this,`deltaMsgObj`,p),G(this,`initialDeltaValue`,u),G(this,`finalDeltaValue`,d),G(this,`deltaBehavior`,`change`),G(this,`realDelta`,d!==u),this.assert(u!==d,`expected `+p+` to change`,`expected `+p+` to not change`)}__name(assertChanges,`assertChanges`),W.addMethod(`change`,assertChanges),W.addMethod(`changes`,assertChanges);function assertIncreases(e,t,r){r&&G(this,`message`,r);let o=G(this,`object`),s=G(this,`message`),c=G(this,`ssfi`);new W(o,s,c,!0).is.a(`function`);let u;t?(new W(e,s,c,!0).to.have.property(t),u=e[t]):(new W(e,s,c,!0).is.a(`function`),u=e()),new W(u,s,c,!0).is.a(`number`),o();let d=t==null?e():e[t],p=t==null?u:`.`+t;G(this,`deltaMsgObj`,p),G(this,`initialDeltaValue`,u),G(this,`finalDeltaValue`,d),G(this,`deltaBehavior`,`increase`),G(this,`realDelta`,d-u),this.assert(d-u>0,`expected `+p+` to increase`,`expected `+p+` to not increase`)}__name(assertIncreases,`assertIncreases`),W.addMethod(`increase`,assertIncreases),W.addMethod(`increases`,assertIncreases);function assertDecreases(e,t,r){r&&G(this,`message`,r);let o=G(this,`object`),s=G(this,`message`),c=G(this,`ssfi`);new W(o,s,c,!0).is.a(`function`);let u;t?(new W(e,s,c,!0).to.have.property(t),u=e[t]):(new W(e,s,c,!0).is.a(`function`),u=e()),new W(u,s,c,!0).is.a(`number`),o();let d=t==null?e():e[t],p=t==null?u:`.`+t;G(this,`deltaMsgObj`,p),G(this,`initialDeltaValue`,u),G(this,`finalDeltaValue`,d),G(this,`deltaBehavior`,`decrease`),G(this,`realDelta`,u-d),this.assert(d-u<0,`expected `+p+` to decrease`,`expected `+p+` to not decrease`)}__name(assertDecreases,`assertDecreases`),W.addMethod(`decrease`,assertDecreases),W.addMethod(`decreases`,assertDecreases);function assertDelta(e,t){t&&G(this,`message`,t);let r=G(this,`deltaMsgObj`),o=G(this,`initialDeltaValue`),s=G(this,`finalDeltaValue`),c=G(this,`deltaBehavior`),u=G(this,`realDelta`),d;d=c===`change`?Math.abs(s-o)===Math.abs(e):u===Math.abs(e),this.assert(d,`expected `+r+` to `+c+` by `+e,`expected `+r+` to not `+c+` by `+e)}__name(assertDelta,`assertDelta`),W.addMethod(`by`,assertDelta),W.addProperty(`extensible`,function(){let e=G(this,`object`),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,`expected #{this} to be extensible`,`expected #{this} to not be extensible`)}),W.addProperty(`sealed`,function(){let e=G(this,`object`),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,`expected #{this} to be sealed`,`expected #{this} to not be sealed`)}),W.addProperty(`frozen`,function(){let e=G(this,`object`),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,`expected #{this} to be frozen`,`expected #{this} to not be frozen`)}),W.addProperty(`finite`,function(e){let t=G(this,`object`);this.assert(typeof t==`number`&&isFinite(t),`expected #{this} to be a finite number`,`expected #{this} to not be a finite number`)});function compareSubset(e,t){return e===t?!0:typeof t==typeof e?typeof e!=`object`||!e?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(e){return t.some(function(t){return compareSubset(e,t)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(r){let o=e[r],s=t[r];return typeof o==`object`&&o&&s!==null?compareSubset(o,s):typeof o==`function`?o(s):s===o}):!1:!1}__name(compareSubset,`compareSubset`),W.addMethod(`containSubset`,function(e){let t=flag(this,`object`),r=U.showDiff;this.assert(compareSubset(e,t),`expected #{act} to contain subset #{exp}`,`expected #{act} to not contain subset #{exp}`,e,t,r)});function expect(e,t){return new W(e,t)}__name(expect,`expect`),expect.fail=function(e,t,r,o){throw arguments.length<2&&(r=e,e=void 0),r||=`expect.fail()`,new V(r,{actual:e,expected:t,operator:o},expect.fail)};var zn={};__export(zn,{Should:()=>Vn,should:()=>Bn});function loadShould(){function shouldGetter(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol==`function`&&this instanceof Symbol||typeof BigInt==`function`&&this instanceof BigInt?new W(this.valueOf(),null,shouldGetter):new W(this,null,shouldGetter)}__name(shouldGetter,`shouldGetter`);function shouldSetter(e){Object.defineProperty(this,`should`,{value:e,enumerable:!0,configurable:!0,writable:!0})}__name(shouldSetter,`shouldSetter`),Object.defineProperty(Object.prototype,`should`,{set:shouldSetter,get:shouldGetter,configurable:!0});let e={};return e.fail=function(t,r,o,s){throw arguments.length<2&&(o=t,t=void 0),o||=`should.fail()`,new V(o,{actual:t,expected:r,operator:s},e.fail)},e.equal=function(e,t,r){new W(e,r).to.equal(t)},e.Throw=function(e,t,r,o){new W(e,o).to.Throw(t,r)},e.exist=function(e,t){new W(e,t).to.exist},e.not={},e.not.equal=function(e,t,r){new W(e,r).to.not.equal(t)},e.not.Throw=function(e,t,r,o){new W(e,o).to.not.Throw(t,r)},e.not.exist=function(e,t){new W(e,t).to.not.exist},e.throw=e.Throw,e.not.throw=e.not.Throw,e}__name(loadShould,`loadShould`);var Bn=loadShould,Vn=loadShould;function assert$1(e,t){new W(null,null,assert$1,!0).assert(e,t,`[ negation message unavailable ]`)}e(assert$1,`assert`),__name(assert$1,`assert`),assert$1.fail=function(e,t,r,o){throw arguments.length<2&&(r=e,e=void 0),r||=`assert.fail()`,new V(r,{actual:e,expected:t,operator:o},assert$1.fail)},assert$1.isOk=function(e,t){new W(e,t,assert$1.isOk,!0).is.ok},assert$1.isNotOk=function(e,t){new W(e,t,assert$1.isNotOk,!0).is.not.ok},assert$1.equal=function(e,t,r){let o=new W(e,r,assert$1.equal,!0);o.assert(t==flag(o,`object`),`expected #{this} to equal #{exp}`,`expected #{this} to not equal #{act}`,t,e,!0)},assert$1.notEqual=function(e,t,r){let o=new W(e,r,assert$1.notEqual,!0);o.assert(t!=flag(o,`object`),`expected #{this} to not equal #{exp}`,`expected #{this} to equal #{act}`,t,e,!0)},assert$1.strictEqual=function(e,t,r){new W(e,r,assert$1.strictEqual,!0).to.equal(t)},assert$1.notStrictEqual=function(e,t,r){new W(e,r,assert$1.notStrictEqual,!0).to.not.equal(t)},assert$1.deepEqual=assert$1.deepStrictEqual=function(e,t,r){new W(e,r,assert$1.deepEqual,!0).to.eql(t)},assert$1.notDeepEqual=function(e,t,r){new W(e,r,assert$1.notDeepEqual,!0).to.not.eql(t)},assert$1.isAbove=function(e,t,r){new W(e,r,assert$1.isAbove,!0).to.be.above(t)},assert$1.isAtLeast=function(e,t,r){new W(e,r,assert$1.isAtLeast,!0).to.be.least(t)},assert$1.isBelow=function(e,t,r){new W(e,r,assert$1.isBelow,!0).to.be.below(t)},assert$1.isAtMost=function(e,t,r){new W(e,r,assert$1.isAtMost,!0).to.be.most(t)},assert$1.isTrue=function(e,t){new W(e,t,assert$1.isTrue,!0).is.true},assert$1.isNotTrue=function(e,t){new W(e,t,assert$1.isNotTrue,!0).to.not.equal(!0)},assert$1.isFalse=function(e,t){new W(e,t,assert$1.isFalse,!0).is.false},assert$1.isNotFalse=function(e,t){new W(e,t,assert$1.isNotFalse,!0).to.not.equal(!1)},assert$1.isNull=function(e,t){new W(e,t,assert$1.isNull,!0).to.equal(null)},assert$1.isNotNull=function(e,t){new W(e,t,assert$1.isNotNull,!0).to.not.equal(null)},assert$1.isNaN=function(e,t){new W(e,t,assert$1.isNaN,!0).to.be.NaN},assert$1.isNotNaN=function(e,t){new W(e,t,assert$1.isNotNaN,!0).not.to.be.NaN},assert$1.exists=function(e,t){new W(e,t,assert$1.exists,!0).to.exist},assert$1.notExists=function(e,t){new W(e,t,assert$1.notExists,!0).to.not.exist},assert$1.isUndefined=function(e,t){new W(e,t,assert$1.isUndefined,!0).to.equal(void 0)},assert$1.isDefined=function(e,t){new W(e,t,assert$1.isDefined,!0).to.not.equal(void 0)},assert$1.isCallable=function(e,t){new W(e,t,assert$1.isCallable,!0).is.callable},assert$1.isNotCallable=function(e,t){new W(e,t,assert$1.isNotCallable,!0).is.not.callable},assert$1.isObject=function(e,t){new W(e,t,assert$1.isObject,!0).to.be.a(`object`)},assert$1.isNotObject=function(e,t){new W(e,t,assert$1.isNotObject,!0).to.not.be.a(`object`)},assert$1.isArray=function(e,t){new W(e,t,assert$1.isArray,!0).to.be.an(`array`)},assert$1.isNotArray=function(e,t){new W(e,t,assert$1.isNotArray,!0).to.not.be.an(`array`)},assert$1.isString=function(e,t){new W(e,t,assert$1.isString,!0).to.be.a(`string`)},assert$1.isNotString=function(e,t){new W(e,t,assert$1.isNotString,!0).to.not.be.a(`string`)},assert$1.isNumber=function(e,t){new W(e,t,assert$1.isNumber,!0).to.be.a(`number`)},assert$1.isNotNumber=function(e,t){new W(e,t,assert$1.isNotNumber,!0).to.not.be.a(`number`)},assert$1.isNumeric=function(e,t){new W(e,t,assert$1.isNumeric,!0).is.numeric},assert$1.isNotNumeric=function(e,t){new W(e,t,assert$1.isNotNumeric,!0).is.not.numeric},assert$1.isFinite=function(e,t){new W(e,t,assert$1.isFinite,!0).to.be.finite},assert$1.isBoolean=function(e,t){new W(e,t,assert$1.isBoolean,!0).to.be.a(`boolean`)},assert$1.isNotBoolean=function(e,t){new W(e,t,assert$1.isNotBoolean,!0).to.not.be.a(`boolean`)},assert$1.typeOf=function(e,t,r){new W(e,r,assert$1.typeOf,!0).to.be.a(t)},assert$1.notTypeOf=function(e,t,r){new W(e,r,assert$1.notTypeOf,!0).to.not.be.a(t)},assert$1.instanceOf=function(e,t,r){new W(e,r,assert$1.instanceOf,!0).to.be.instanceOf(t)},assert$1.notInstanceOf=function(e,t,r){new W(e,r,assert$1.notInstanceOf,!0).to.not.be.instanceOf(t)},assert$1.include=function(e,t,r){new W(e,r,assert$1.include,!0).include(t)},assert$1.notInclude=function(e,t,r){new W(e,r,assert$1.notInclude,!0).not.include(t)},assert$1.deepInclude=function(e,t,r){new W(e,r,assert$1.deepInclude,!0).deep.include(t)},assert$1.notDeepInclude=function(e,t,r){new W(e,r,assert$1.notDeepInclude,!0).not.deep.include(t)},assert$1.nestedInclude=function(e,t,r){new W(e,r,assert$1.nestedInclude,!0).nested.include(t)},assert$1.notNestedInclude=function(e,t,r){new W(e,r,assert$1.notNestedInclude,!0).not.nested.include(t)},assert$1.deepNestedInclude=function(e,t,r){new W(e,r,assert$1.deepNestedInclude,!0).deep.nested.include(t)},assert$1.notDeepNestedInclude=function(e,t,r){new W(e,r,assert$1.notDeepNestedInclude,!0).not.deep.nested.include(t)},assert$1.ownInclude=function(e,t,r){new W(e,r,assert$1.ownInclude,!0).own.include(t)},assert$1.notOwnInclude=function(e,t,r){new W(e,r,assert$1.notOwnInclude,!0).not.own.include(t)},assert$1.deepOwnInclude=function(e,t,r){new W(e,r,assert$1.deepOwnInclude,!0).deep.own.include(t)},assert$1.notDeepOwnInclude=function(e,t,r){new W(e,r,assert$1.notDeepOwnInclude,!0).not.deep.own.include(t)},assert$1.match=function(e,t,r){new W(e,r,assert$1.match,!0).to.match(t)},assert$1.notMatch=function(e,t,r){new W(e,r,assert$1.notMatch,!0).to.not.match(t)},assert$1.property=function(e,t,r){new W(e,r,assert$1.property,!0).to.have.property(t)},assert$1.notProperty=function(e,t,r){new W(e,r,assert$1.notProperty,!0).to.not.have.property(t)},assert$1.propertyVal=function(e,t,r,o){new W(e,o,assert$1.propertyVal,!0).to.have.property(t,r)},assert$1.notPropertyVal=function(e,t,r,o){new W(e,o,assert$1.notPropertyVal,!0).to.not.have.property(t,r)},assert$1.deepPropertyVal=function(e,t,r,o){new W(e,o,assert$1.deepPropertyVal,!0).to.have.deep.property(t,r)},assert$1.notDeepPropertyVal=function(e,t,r,o){new W(e,o,assert$1.notDeepPropertyVal,!0).to.not.have.deep.property(t,r)},assert$1.ownProperty=function(e,t,r){new W(e,r,assert$1.ownProperty,!0).to.have.own.property(t)},assert$1.notOwnProperty=function(e,t,r){new W(e,r,assert$1.notOwnProperty,!0).to.not.have.own.property(t)},assert$1.ownPropertyVal=function(e,t,r,o){new W(e,o,assert$1.ownPropertyVal,!0).to.have.own.property(t,r)},assert$1.notOwnPropertyVal=function(e,t,r,o){new W(e,o,assert$1.notOwnPropertyVal,!0).to.not.have.own.property(t,r)},assert$1.deepOwnPropertyVal=function(e,t,r,o){new W(e,o,assert$1.deepOwnPropertyVal,!0).to.have.deep.own.property(t,r)},assert$1.notDeepOwnPropertyVal=function(e,t,r,o){new W(e,o,assert$1.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,r)},assert$1.nestedProperty=function(e,t,r){new W(e,r,assert$1.nestedProperty,!0).to.have.nested.property(t)},assert$1.notNestedProperty=function(e,t,r){new W(e,r,assert$1.notNestedProperty,!0).to.not.have.nested.property(t)},assert$1.nestedPropertyVal=function(e,t,r,o){new W(e,o,assert$1.nestedPropertyVal,!0).to.have.nested.property(t,r)},assert$1.notNestedPropertyVal=function(e,t,r,o){new W(e,o,assert$1.notNestedPropertyVal,!0).to.not.have.nested.property(t,r)},assert$1.deepNestedPropertyVal=function(e,t,r,o){new W(e,o,assert$1.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,r)},assert$1.notDeepNestedPropertyVal=function(e,t,r,o){new W(e,o,assert$1.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,r)},assert$1.lengthOf=function(e,t,r){new W(e,r,assert$1.lengthOf,!0).to.have.lengthOf(t)},assert$1.hasAnyKeys=function(e,t,r){new W(e,r,assert$1.hasAnyKeys,!0).to.have.any.keys(t)},assert$1.hasAllKeys=function(e,t,r){new W(e,r,assert$1.hasAllKeys,!0).to.have.all.keys(t)},assert$1.containsAllKeys=function(e,t,r){new W(e,r,assert$1.containsAllKeys,!0).to.contain.all.keys(t)},assert$1.doesNotHaveAnyKeys=function(e,t,r){new W(e,r,assert$1.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)},assert$1.doesNotHaveAllKeys=function(e,t,r){new W(e,r,assert$1.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)},assert$1.hasAnyDeepKeys=function(e,t,r){new W(e,r,assert$1.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)},assert$1.hasAllDeepKeys=function(e,t,r){new W(e,r,assert$1.hasAllDeepKeys,!0).to.have.all.deep.keys(t)},assert$1.containsAllDeepKeys=function(e,t,r){new W(e,r,assert$1.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)},assert$1.doesNotHaveAnyDeepKeys=function(e,t,r){new W(e,r,assert$1.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)},assert$1.doesNotHaveAllDeepKeys=function(e,t,r){new W(e,r,assert$1.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)},assert$1.throws=function(e,t,r,o){return(typeof t==`string`||t instanceof RegExp)&&(r=t,t=null),flag(new W(e,o,assert$1.throws,!0).to.throw(t,r),`object`)},assert$1.doesNotThrow=function(e,t,r,o){(typeof t==`string`||t instanceof RegExp)&&(r=t,t=null),new W(e,o,assert$1.doesNotThrow,!0).to.not.throw(t,r)},assert$1.operator=function(e,t,r,o){let s;switch(t){case`==`:s=e==r;break;case`===`:s=e===r;break;case`>`:s=e>r;break;case`>=`:s=e>=r;break;case`<`:s=e<r;break;case`<=`:s=e<=r;break;case`!=`:s=e!=r;break;case`!==`:s=e!==r;break;default:throw o&&=o+`: `,new V(o+`Invalid operator "`+t+`"`,void 0,assert$1.operator)}let c=new W(s,o,assert$1.operator,!0);c.assert(!0===flag(c,`object`),`expected `+inspect2(e)+` to be `+t+` `+inspect2(r),`expected `+inspect2(e)+` to not be `+t+` `+inspect2(r))},assert$1.closeTo=function(e,t,r,o){new W(e,o,assert$1.closeTo,!0).to.be.closeTo(t,r)},assert$1.approximately=function(e,t,r,o){new W(e,o,assert$1.approximately,!0).to.be.approximately(t,r)},assert$1.sameMembers=function(e,t,r){new W(e,r,assert$1.sameMembers,!0).to.have.same.members(t)},assert$1.notSameMembers=function(e,t,r){new W(e,r,assert$1.notSameMembers,!0).to.not.have.same.members(t)},assert$1.sameDeepMembers=function(e,t,r){new W(e,r,assert$1.sameDeepMembers,!0).to.have.same.deep.members(t)},assert$1.notSameDeepMembers=function(e,t,r){new W(e,r,assert$1.notSameDeepMembers,!0).to.not.have.same.deep.members(t)},assert$1.sameOrderedMembers=function(e,t,r){new W(e,r,assert$1.sameOrderedMembers,!0).to.have.same.ordered.members(t)},assert$1.notSameOrderedMembers=function(e,t,r){new W(e,r,assert$1.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)},assert$1.sameDeepOrderedMembers=function(e,t,r){new W(e,r,assert$1.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)},assert$1.notSameDeepOrderedMembers=function(e,t,r){new W(e,r,assert$1.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)},assert$1.includeMembers=function(e,t,r){new W(e,r,assert$1.includeMembers,!0).to.include.members(t)},assert$1.notIncludeMembers=function(e,t,r){new W(e,r,assert$1.notIncludeMembers,!0).to.not.include.members(t)},assert$1.includeDeepMembers=function(e,t,r){new W(e,r,assert$1.includeDeepMembers,!0).to.include.deep.members(t)},assert$1.notIncludeDeepMembers=function(e,t,r){new W(e,r,assert$1.notIncludeDeepMembers,!0).to.not.include.deep.members(t)},assert$1.includeOrderedMembers=function(e,t,r){new W(e,r,assert$1.includeOrderedMembers,!0).to.include.ordered.members(t)},assert$1.notIncludeOrderedMembers=function(e,t,r){new W(e,r,assert$1.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)},assert$1.includeDeepOrderedMembers=function(e,t,r){new W(e,r,assert$1.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)},assert$1.notIncludeDeepOrderedMembers=function(e,t,r){new W(e,r,assert$1.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)},assert$1.oneOf=function(e,t,r){new W(e,r,assert$1.oneOf,!0).to.be.oneOf(t)},assert$1.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${inspect2(e)} to be an iterable`:`expected ${inspect2(e)} to be an iterable`,new V(t,void 0,assert$1.isIterable)},assert$1.changes=function(e,t,r,o){arguments.length===3&&typeof t==`function`&&(o=r,r=null),new W(e,o,assert$1.changes,!0).to.change(t,r)},assert$1.changesBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new W(e,s,assert$1.changesBy,!0).to.change(t,r).by(o)},assert$1.doesNotChange=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new W(e,o,assert$1.doesNotChange,!0).to.not.change(t,r)},assert$1.changesButNotBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new W(e,s,assert$1.changesButNotBy,!0).to.change(t,r).but.not.by(o)},assert$1.increases=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new W(e,o,assert$1.increases,!0).to.increase(t,r)},assert$1.increasesBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new W(e,s,assert$1.increasesBy,!0).to.increase(t,r).by(o)},assert$1.doesNotIncrease=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new W(e,o,assert$1.doesNotIncrease,!0).to.not.increase(t,r)},assert$1.increasesButNotBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new W(e,s,assert$1.increasesButNotBy,!0).to.increase(t,r).but.not.by(o)},assert$1.decreases=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new W(e,o,assert$1.decreases,!0).to.decrease(t,r)},assert$1.decreasesBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new W(e,s,assert$1.decreasesBy,!0).to.decrease(t,r).by(o)},assert$1.doesNotDecrease=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new W(e,o,assert$1.doesNotDecrease,!0).to.not.decrease(t,r)},assert$1.doesNotDecreaseBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);return new W(e,s,assert$1.doesNotDecreaseBy,!0).to.not.decrease(t,r).by(o)},assert$1.decreasesButNotBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new W(e,s,assert$1.decreasesButNotBy,!0).to.decrease(t,r).but.not.by(o)},assert$1.ifError=function(e){if(e)throw e},assert$1.isExtensible=function(e,t){new W(e,t,assert$1.isExtensible,!0).to.be.extensible},assert$1.isNotExtensible=function(e,t){new W(e,t,assert$1.isNotExtensible,!0).to.not.be.extensible},assert$1.isSealed=function(e,t){new W(e,t,assert$1.isSealed,!0).to.be.sealed},assert$1.isNotSealed=function(e,t){new W(e,t,assert$1.isNotSealed,!0).to.not.be.sealed},assert$1.isFrozen=function(e,t){new W(e,t,assert$1.isFrozen,!0).to.be.frozen},assert$1.isNotFrozen=function(e,t){new W(e,t,assert$1.isNotFrozen,!0).to.not.be.frozen},assert$1.isEmpty=function(e,t){new W(e,t,assert$1.isEmpty,!0).to.be.empty},assert$1.isNotEmpty=function(e,t){new W(e,t,assert$1.isNotEmpty,!0).to.not.be.empty},assert$1.containsSubset=function(e,t,r){new W(e,r).to.containSubset(t)},assert$1.doesNotContainSubset=function(e,t,r){new W(e,r).to.not.containSubset(t)};for(let[e,t]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`]])assert$1[t]=assert$1[e];var Hn=[];function use(e){let t={use,AssertionError:V,util:R,config:U,expect,assert:assert$1,Assertion:W,...zn};return~Hn.indexOf(e)||(e(t,R),Hn.push(e)),t}__name(use,`use`);const ChaiStyleAssertions=(e,t)=>{function defProperty(r,o){t.addProperty(e.Assertion.prototype,r,function(){let t=e.Assertion.prototype[o];if(!t)throw Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return t.call(this)})}function defPropertyWithArgs(r,o,...s){t.addProperty(e.Assertion.prototype,r,function(){let t=e.Assertion.prototype[o];if(!t)throw Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return t.call(this,...s)})}function defMethod(r,o){t.addMethod(e.Assertion.prototype,r,function(...t){let r=e.Assertion.prototype[o];if(!r)throw Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return r.call(this,...t)})}defProperty(`called`,`toHaveBeenCalled`),defProperty(`calledOnce`,`toHaveBeenCalledOnce`),defPropertyWithArgs(`calledTwice`,`toHaveBeenCalledTimes`,2),defPropertyWithArgs(`calledThrice`,`toHaveBeenCalledTimes`,3),defMethod(`callCount`,`toHaveBeenCalledTimes`),defMethod(`calledWith`,`toHaveBeenCalledWith`),defMethod(`calledOnceWith`,`toHaveBeenCalledExactlyOnceWith`),defMethod(`lastCalledWith`,`toHaveBeenLastCalledWith`),defMethod(`nthCalledWith`,`toHaveBeenNthCalledWith`),defMethod(`returned`,`toHaveReturned`),defMethod(`returnedWith`,`toHaveReturnedWith`),defMethod(`returnedTimes`,`toHaveReturnedTimes`),defMethod(`lastReturnedWith`,`toHaveLastReturnedWith`),defMethod(`nthReturnedWith`,`toHaveNthReturnedWith`),defMethod(`calledBefore`,`toHaveBeenCalledBefore`),defMethod(`calledAfter`,`toHaveBeenCalledAfter`)},K=Symbol.for(`matchers-object`),q=Symbol.for(`$$jest-matchers-object`),Un=Symbol.for(`expect-global`),Wn=Symbol.for(`asymmetric-matchers-object`),Gn={toSatisfy(e,t,r){let{printReceived:o,printExpected:s,matcherHint:c}=this.utils,u=t(e);return{pass:u,message:()=>u?`\
69
+ `);return e}function isChildProcess(){return typeof process<`u`&&!!process.send}function resetModules(e,t=!1){let r=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((e,t)=>{r.some(e=>e.test(t))||(e.promise=void 0,e.exports=void 0,e.evaluated=!1,e.importers.clear())})}function waitNextTick(){let{setTimeout:e}=getSafeTimers();return new Promise(t=>e(t,0))}async function waitForImportsToResolve(){await waitNextTick();let e=getWorkerState(),t=[],r=e.resolvingModules.size;for(let[r,o]of e.evaluatedModules.idToModuleMap)o.promise&&!o.evaluated&&t.push(o.promise);!t.length&&!r||(await Promise.allSettled(t),await waitForImportsToResolve())}function isMockFunction(e){return typeof e==`function`&&`_isMockFunction`in e&&e._isMockFunction===!0}const Gt=new Set,Kt=new Set,qt=new WeakMap;function createMockInstance(e={}){let{originalImplementation:t,restore:r,mockImplementation:o,resetToMockImplementation:s,resetToMockName:c}=e;r&&Gt.add(r);let u=getDefaultConfig(t),d=getDefaultState(),p=createMock({config:u,state:d,...e}),m=(o||t)?.length??0;return Object.defineProperty(p,`length`,{writable:!0,enumerable:!1,value:m,configurable:!0}),c&&(u.mockName=p.name||`vi.fn()`),qt.set(p,u),Kt.add(p),p._isMockFunction=!0,p.getMockImplementation=()=>u.onceMockImplementations[0]||u.mockImplementation,Object.defineProperty(p,`mock`,{configurable:!1,enumerable:!0,writable:!1,value:d}),p.mockImplementation=function mockImplementation(e){return u.mockImplementation=e,p},p.mockImplementationOnce=function mockImplementationOnce(e){return u.onceMockImplementations.push(e),p},p.withImplementation=function withImplementation(e,t){let r=u.mockImplementation,o=u.onceMockImplementations,reset=()=>{u.mockImplementation=r,u.onceMockImplementations=o};u.mockImplementation=e,u.onceMockImplementations=[];let s=t();return typeof s==`object`&&typeof s?.then==`function`?s.then(()=>(reset(),p)):(reset(),p)},p.mockReturnThis=function mockReturnThis(){return p.mockImplementation(function(){return this})},p.mockReturnValue=function mockReturnValue(e){return p.mockImplementation(function(){return new.target&&throwConstructorError(`mockReturnValue`),e})},p.mockReturnValueOnce=function mockReturnValueOnce(e){return p.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockReturnValueOnce`),e})},p.mockThrow=function mockThrow(e){return p.mockImplementation(function(){throw e})},p.mockThrowOnce=function mockThrowOnce(e){return p.mockImplementationOnce(function(){throw e})},p.mockResolvedValue=function mockResolvedValue(e){return p.mockImplementation(function(){return new.target&&throwConstructorError(`mockResolvedValue`),Promise.resolve(e)})},p.mockResolvedValueOnce=function mockResolvedValueOnce(e){return p.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockResolvedValueOnce`),Promise.resolve(e)})},p.mockRejectedValue=function mockRejectedValue(e){return p.mockImplementation(function(){return new.target&&throwConstructorError(`mockRejectedValue`),Promise.reject(e)})},p.mockRejectedValueOnce=function mockRejectedValueOnce(e){return p.mockImplementationOnce(function(){return new.target&&throwConstructorError(`mockRejectedValueOnce`),Promise.reject(e)})},p.mockClear=function mockClear(){return d.calls=[],d.contexts=[],d.instances=[],d.invocationCallOrder=[],d.results=[],d.settledResults=[],p},p.mockReset=function mockReset(){return p.mockClear(),u.mockImplementation=s?o:void 0,u.mockName=c&&p.name||`vi.fn()`,u.onceMockImplementations=[],p},p.mockRestore=function mockRestore(){return p.mockReset(),r?.()},p.mockName=function mockName(e){return typeof e==`string`&&(u.mockName=e),p},p.getMockName=function getMockName(){return u.mockName||`vi.fn()`},Symbol.dispose&&(p[Symbol.dispose]=()=>p.mockRestore()),o&&p.mockImplementation(o),p}function fn(e){return e!=null&&isMockFunction(e)?e:createMockInstance({mockImplementation:e,resetToMockImplementation:!0})}function spyOn(e,t,r){assert$2(e!=null,`The vi.spyOn() function could not find an object to spy upon. The first argument must be defined.`),assert$2(typeof e==`object`||typeof e==`function`,`Vitest cannot spy on a primitive value.`);let[o,s]=getDescriptor(e,t)||[];assert$2(s||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let c=r||`value`,u=!1;c===`value`&&s&&s.value==null&&s.get&&(c=`get`,u=!0);let d;s?(d=s[c],d==null&&c===`value`&&(d=e[t])):d=c===`value`?e[t]:()=>e[t];let p=u&&d?d():d,m=typeof p;if(assert$2(m===`function`||c!==`value`&&d==null,`vi.spyOn() can only spy on a function. Received ${m}.`),isMockFunction(p))return p;let reassign=r=>{let{value:o,...u}=s||{configurable:!0,writable:!0};c!==`value`&&delete u.writable,u[c]=r,Object.defineProperty(e,t,u)},restore=()=>{o===e?s&&!d?Object.defineProperty(e,t,s):reassign(d):Reflect.deleteProperty(e,t)},h=createMockInstance({restore,originalImplementation:p,resetToMockName:!0});try{reassign(u?()=>h:h)}catch(r){throw r instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]===`Module`&&(r.message.includes(`Cannot redefine property`)||r.message.includes(`Cannot replace module namespace`)||r.message.includes(`can't redefine non-configurable property`))?TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:r}):r}return h}function getDescriptor(e,t){let r=Object.getOwnPropertyDescriptor(e,t);if(r)return[e,r];let o=Object.getPrototypeOf(e);for(;o!==null;){let e=Object.getOwnPropertyDescriptor(o,t);if(e)return[o,e];o=Object.getPrototypeOf(o)}}function assert$2(e,t){if(!e)throw Error(t)}e(assert$2,`assert`);let Jt=1;function createMock({state:e,config:t,name:r,prototypeState:o,prototypeConfig:s,keepMembersImplementation:c,mockImplementation:u,prototypeMembers:d=[]}){let p=t.mockOriginal,m=u,h=r||p?.name||`Mock`,g={[h]:(function(...r){registerCalls(r,e,o),registerInvocationOrder(Jt++,e,o);let u={type:`incomplete`,value:void 0},m={type:`incomplete`,value:void 0};registerResult(u,e,o),registerSettledResult(m,e,o);let y=new.target?void 0:this,[b,x]=registerInstance(y,e,o),[S,w]=registerContext(y,e,o),T=t.onceMockImplementations.shift()||t.mockImplementation||s?.onceMockImplementations.shift()||s?.mockImplementation||p||function(){},E,D,O=!1;try{if(new.target){E=Reflect.construct(T,r,new.target);for(let e of d){let t=E[e];if(t!==_.prototype[e])continue;let r=isMockFunction(t),o=r?t.mock:void 0,s=r?qt.get(t):void 0;E[e]=createMockInstance({originalImplementation:c?s?.mockOriginal:void 0,prototypeState:o,prototypeConfig:s,keepMembersImplementation:c})}}else E=T.apply(this,r)}catch(e){throw D=e,O=!0,e instanceof TypeError&&e.message.includes(`is not a constructor`)&&console.warn(`[vitest] The ${g[h].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),e}finally{O?(u.type=`throw`,u.value=D,m.type=`rejected`,m.value=D):(u.type=`return`,u.value=E,new.target&&(e.contexts[S-1]=E,e.instances[b-1]=E,w!=null&&o&&(o.contexts[w-1]=E),x!=null&&o&&(o.instances[x-1]=E)),E instanceof Promise?E.then(e=>{m.type=`fulfilled`,m.value=e},e=>{m.type=`rejected`,m.value=e}):(m.type=`fulfilled`,m.value=E))}return E})},_=g[h],y=p||m;return y&&copyOriginalStaticProperties(_,y),_}function registerCalls(e,t,r){t.calls.push(e),r?.calls.push(e)}function registerInvocationOrder(e,t,r){t.invocationCallOrder.push(e),r?.invocationCallOrder.push(e)}function registerResult(e,t,r){t.results.push(e),r?.results.push(e)}function registerSettledResult(e,t,r){t.settledResults.push(e),r?.settledResults.push(e)}function registerInstance(e,t,r){return[t.instances.push(e),r?.instances.push(e)]}function registerContext(e,t,r){return[t.contexts.push(e),r?.contexts.push(e)]}function copyOriginalStaticProperties(e,t){let{properties:r,descriptors:o}=getAllProperties(t);for(let t of r){let r=o[t];getDescriptor(e,t)||Object.defineProperty(e,t,r)}}const Yt=new Set([`length`,`name`,`prototype`,Symbol.for(`nodejs.util.promisify.custom`)]);function getAllProperties(e){let t=new Set,r={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){let o=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let s of o)r[s]||Yt.has(s)||(t.add(s),r[s]=Object.getOwnPropertyDescriptor(e,s));e=Object.getPrototypeOf(e)}return{properties:t,descriptors:r}}function getDefaultConfig(e){return{mockImplementation:void 0,mockOriginal:e,mockName:`vi.fn()`,onceMockImplementations:[]}}function getDefaultState(){let e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}function restoreAllMocks(){for(let e of Gt)e();Gt.clear()}function clearAllMocks(){Kt.forEach(e=>e.mockClear())}function resetAllMocks(){Kt.forEach(e=>e.mockReset())}function throwConstructorError(e){throw TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}var Xt=Object.defineProperty,__defNormalProp=(e,t,r)=>t in e?Xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__name=(e,t)=>Xt(e,`name`,{value:t,configurable:!0}),__export=(e,t)=>{for(var r in t)Xt(e,r,{get:t[r],enumerable:!0})},__publicField=(e,t,r)=>__defNormalProp(e,typeof t==`symbol`?t:t+``,r),V={};__export(V,{addChainableMethod:()=>addChainableMethod,addLengthGuard:()=>addLengthGuard,addMethod:()=>addMethod,addProperty:()=>addProperty,checkError:()=>H,compareByInspect:()=>compareByInspect,eql:()=>xn,events:()=>Cn,expectTypes:()=>expectTypes,flag:()=>flag,getActual:()=>getActual,getMessage:()=>getMessage2,getName:()=>getName,getOperator:()=>getOperator,getOwnEnumerableProperties:()=>getOwnEnumerableProperties,getOwnEnumerablePropertySymbols:()=>getOwnEnumerablePropertySymbols,getPathInfo:()=>getPathInfo,hasProperty:()=>hasProperty,inspect:()=>inspect2,isNaN:()=>Fn,isNumeric:()=>isNumeric,isProxyEnabled:()=>isProxyEnabled,isRegExp:()=>isRegExp2,objDisplay:()=>objDisplay,overwriteChainableMethod:()=>overwriteChainableMethod,overwriteMethod:()=>overwriteMethod,overwriteProperty:()=>overwriteProperty,proxify:()=>proxify,test:()=>test$1,transferFlags:()=>transferFlags,type:()=>type});var H={};__export(H,{compatibleConstructor:()=>compatibleConstructor,compatibleInstance:()=>compatibleInstance,compatibleMessage:()=>compatibleMessage,getConstructorName:()=>getConstructorName,getMessage:()=>getMessage});function isErrorInstance(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}__name(isErrorInstance,`isErrorInstance`);function isRegExp(e){return Object.prototype.toString.call(e)===`[object RegExp]`}__name(isRegExp,`isRegExp`);function compatibleInstance(e,t){return isErrorInstance(t)&&e===t}__name(compatibleInstance,`compatibleInstance`);function compatibleConstructor(e,t){return isErrorInstance(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t==`object`||typeof t==`function`)&&t.prototype?e.constructor===t||e instanceof t:!1}__name(compatibleConstructor,`compatibleConstructor`);function compatibleMessage(e,t){let r=typeof e==`string`?e:e.message;return isRegExp(t)?t.test(r):typeof t==`string`?r.indexOf(t)!==-1:!1}__name(compatibleMessage,`compatibleMessage`);function getConstructorName(e){let t=e;return isErrorInstance(e)?t=e.constructor.name:typeof e==`function`&&(t=e.name,t===``&&(t=new e().name||t)),t}__name(getConstructorName,`getConstructorName`);function getMessage(e){let t=``;return e&&e.message?t=e.message:typeof e==`string`&&(t=e),t}__name(getMessage,`getMessage`);function flag(e,t,r){let o=e.__flags||=Object.create(null);if(arguments.length===3)o[t]=r;else return o[t]}__name(flag,`flag`);function test$1(e,t){let r=flag(e,`negate`),o=t[0];return r?!o:o}e(test$1,`test`),__name(test$1,`test`);function type(e){if(e===void 0)return`undefined`;if(e===null)return`null`;let t=e[Symbol.toStringTag];return typeof t==`string`?t:Object.prototype.toString.call(e).slice(8,-1)}__name(type,`type`);var Zt=`captureStackTrace`in Error,Qt=class _AssertionError extends Error{constructor(e=`Unspecified AssertionError`,t,r){super(e),__publicField(this,`message`),this.message=e,Zt&&Error.captureStackTrace(this,r||_AssertionError);for(let e in t)e in this||(this[e]=t[e])}get name(){return`AssertionError`}get ok(){return!1}toJSON(e){return{...this,name:this.name,message:this.message,ok:!1,stack:e===!1?void 0:this.stack}}};__name(Qt,`AssertionError`);var U=Qt;function expectTypes(e,t){let r=flag(e,`message`),o=flag(e,`ssfi`);r=r?r+`: `:``,e=flag(e,`object`),t=t.map(function(e){return e.toLowerCase()}),t.sort();let s=t.map(function(e,r){let o=~[`a`,`e`,`i`,`o`,`u`].indexOf(e.charAt(0))?`an`:`a`;return(t.length>1&&r===t.length-1?`or `:``)+o+` `+e}).join(`, `),c=type(e).toLowerCase();if(!t.some(function(e){return c===e}))throw new U(r+`object tested must be `+s+`, but `+c+` given`,void 0,o)}__name(expectTypes,`expectTypes`);function getActual(e,t){return t.length>4?t[4]:e._obj}__name(getActual,`getActual`);var $t={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`]},en={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`},W=`…`;function colorise(e,t){let r=$t[en[t]]||$t[t]||``;return r?`\x1B[${r[0]}m${String(e)}\x1B[${r[1]}m`:String(e)}__name(colorise,`colorise`);function normaliseOptions({showHidden:e=!1,depth:t=2,colors:r=!1,customInspect:o=!0,showProxy:s=!1,maxArrayLength:c=1/0,breakLength:u=1/0,seen:d=[],truncate:p=1/0,stylize:m=String}={},h){let g={showHidden:!!e,depth:Number(t),colors:!!r,customInspect:!!o,showProxy:!!s,maxArrayLength:Number(c),breakLength:Number(u),truncate:Number(p),seen:d,inspect:h,stylize:m};return g.colors&&(g.stylize=colorise),g}__name(normaliseOptions,`normaliseOptions`);function isHighSurrogate(e){return e>=`\ud800`&&e<=`\udbff`}__name(isHighSurrogate,`isHighSurrogate`);function truncate(e,t,r=W){e=String(e);let o=r.length,s=e.length;if(o>t&&s>o)return r;if(s>t&&s>o){let s=t-o;return s>0&&isHighSurrogate(e[s-1])&&--s,`${e.slice(0,s)}${r}`}return e}__name(truncate,`truncate`);function inspectList(e,t,r,o=`, `){r||=t.inspect;let s=e.length;if(s===0)return``;let c=t.truncate,u=``,d=``,p=``;for(let m=0;m<s;m+=1){let s=m+1===e.length,h=m+2===e.length;p=`${W}(${e.length-m})`;let g=e[m];t.truncate=c-u.length-(s?0:o.length);let _=d||r(g,t)+(s?``:o),y=u.length+_.length,b=y+p.length;if(s&&y>c&&u.length+p.length<=c||!s&&!h&&b>c||(d=s?``:r(e[m+1],t)+(h?``:o),!s&&h&&b>c&&y+d.length>c))break;if(u+=_,!s&&!h&&y+d.length>=c){p=`${W}(${e.length-m-1})`;break}p=``}return`${u}${p}`}__name(inspectList,`inspectList`);function quoteComplexKey(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`)}__name(quoteComplexKey,`quoteComplexKey`);function inspectProperty([e,t],r){return r.truncate-=2,typeof e==`string`?e=quoteComplexKey(e):typeof e!=`number`&&(e=`[${r.inspect(e,r)}]`),r.truncate-=e.length,t=r.inspect(t,r),`${e}: ${t}`}__name(inspectProperty,`inspectProperty`);function inspectArray(e,t){let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`[]`;t.truncate-=4;let o=inspectList(e,t);t.truncate-=o.length;let s=``;return r.length&&(s=inspectList(r.map(t=>[t,e[t]]),t,inspectProperty)),`[ ${o}${s?`, ${s}`:``} ]`}__name(inspectArray,`inspectArray`);var tn=__name(e=>typeof Buffer==`function`&&e instanceof Buffer?`Buffer`:e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,`getArrayName`);function inspectTypedArray(e,t){let r=tn(e);t.truncate-=r.length+4;let o=Object.keys(e).slice(e.length);if(!e.length&&!o.length)return`${r}[]`;let s=``;for(let r=0;r<e.length;r++){let o=`${t.stylize(truncate(e[r],t.truncate),`number`)}${r===e.length-1?``:`, `}`;if(t.truncate-=o.length,e[r]!==e.length&&t.truncate<=3){s+=`${W}(${e.length-e[r]+1})`;break}s+=o}let c=``;return o.length&&(c=inspectList(o.map(t=>[t,e[t]]),t,inspectProperty)),`${r}[ ${s}${c?`, ${c}`:``} ]`}__name(inspectTypedArray,`inspectTypedArray`);function inspectDate(e,t){let r=e.toJSON();if(r===null)return`Invalid Date`;let o=r.split(`T`),s=o[0];return t.stylize(`${s}T${truncate(o[1],t.truncate-s.length-1)}`,`date`)}__name(inspectDate,`inspectDate`);function inspectFunction(e,t){let r=e[Symbol.toStringTag]||`Function`,o=e.name;return o?t.stylize(`[${r} ${truncate(o,t.truncate-11)}]`,`special`):t.stylize(`[${r}]`,`special`)}__name(inspectFunction,`inspectFunction`);function inspectMapEntry([e,t],r){return r.truncate-=4,e=r.inspect(e,r),r.truncate-=e.length,t=r.inspect(t,r),`${e} => ${t}`}__name(inspectMapEntry,`inspectMapEntry`);function mapToEntries(e){let t=[];return e.forEach((e,r)=>{t.push([r,e])}),t}__name(mapToEntries,`mapToEntries`);function inspectMap(e,t){return e.size===0?`Map{}`:(t.truncate-=7,`Map{ ${inspectList(mapToEntries(e),t,inspectMapEntry)} }`)}__name(inspectMap,`inspectMap`);var nn=Number.isNaN||(e=>e!==e);function inspectNumber(e,t){return nn(e)?t.stylize(`NaN`,`number`):e===1/0?t.stylize(`Infinity`,`number`):e===-1/0?t.stylize(`-Infinity`,`number`):e===0?t.stylize(1/e==1/0?`+0`:`-0`,`number`):t.stylize(truncate(String(e),t.truncate),`number`)}__name(inspectNumber,`inspectNumber`);function inspectBigInt(e,t){let r=truncate(e.toString(),t.truncate-1);return r!==W&&(r+=`n`),t.stylize(r,`bigint`)}__name(inspectBigInt,`inspectBigInt`);function inspectRegExp(e,t){let r=e.toString().split(`/`)[2],o=t.truncate-(2+r.length),s=e.source;return t.stylize(`/${truncate(s,o)}/${r}`,`regexp`)}__name(inspectRegExp,`inspectRegExp`);function arrayFromSet(e){let t=[];return e.forEach(e=>{t.push(e)}),t}__name(arrayFromSet,`arrayFromSet`);function inspectSet(e,t){return e.size===0?`Set{}`:(t.truncate-=7,`Set{ ${inspectList(arrayFromSet(e),t)} }`)}__name(inspectSet,`inspectSet`);var rn=RegExp(`['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]`,`g`),on={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,"'":`\\'`,"\\":`\\\\`},sn=16,cn=4;function escape(e){return on[e]||`\\u${`0000${e.charCodeAt(0).toString(sn)}`.slice(-cn)}`}__name(escape,`escape`);function inspectString(e,t){return rn.test(e)&&(e=e.replace(rn,escape)),t.stylize(`'${truncate(e,t.truncate-2)}'`,`string`)}__name(inspectString,`inspectString`);function inspectSymbol(e){return`description`in Symbol.prototype?e.description?`Symbol(${e.description})`:`Symbol()`:e.toString()}__name(inspectSymbol,`inspectSymbol`);var ln=__name(()=>`Promise{…}`,`getPromiseValue`);function inspectObject(e,t){let r=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(r.length===0&&o.length===0)return`{}`;if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let s=inspectList(r.map(t=>[t,e[t]]),t,inspectProperty),c=inspectList(o.map(t=>[t,e[t]]),t,inspectProperty);t.seen.pop();let u=``;return s&&c&&(u=`, `),`{ ${s}${u}${c} }`}__name(inspectObject,`inspectObject`);var un=typeof Symbol<`u`&&Symbol.toStringTag?Symbol.toStringTag:!1;function inspectClass(e,t){let r=``;return un&&un in e&&(r=e[un]),r||=e.constructor.name,(!r||r===`_class`)&&(r=`<Anonymous Class>`),t.truncate-=r.length,`${r}${inspectObject(e,t)}`}__name(inspectClass,`inspectClass`);function inspectArguments(e,t){return e.length===0?`Arguments[]`:(t.truncate-=13,`Arguments[ ${inspectList(e,t)} ]`)}__name(inspectArguments,`inspectArguments`);var dn=[`stack`,`line`,`column`,`name`,`message`,`fileName`,`lineNumber`,`columnNumber`,`number`,`description`,`cause`];function inspectObject2(e,t){let r=Object.getOwnPropertyNames(e).filter(e=>dn.indexOf(e)===-1),o=e.name;t.truncate-=o.length;let s=``;if(typeof e.message==`string`?s=truncate(e.message,t.truncate):r.unshift(`message`),s=s?`: ${s}`:``,t.truncate-=s.length+5,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let c=inspectList(r.map(t=>[t,e[t]]),t,inspectProperty);return`${o}${s}${c?` { ${c} }`:``}`}__name(inspectObject2,`inspectObject`);function inspectAttribute([e,t],r){return r.truncate-=3,t?`${r.stylize(String(e),`yellow`)}=${r.stylize(`"${t}"`,`string`)}`:`${r.stylize(String(e),`yellow`)}`}__name(inspectAttribute,`inspectAttribute`);function inspectNodeCollection(e,t){return inspectList(e,t,inspectNode,`
70
+ `)}__name(inspectNodeCollection,`inspectNodeCollection`);function inspectNode(e,t){switch(e.nodeType){case 1:return inspectHTML(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}__name(inspectNode,`inspectNode`);function inspectHTML(e,t){let r=e.getAttributeNames(),o=e.tagName.toLowerCase(),s=t.stylize(`<${o}`,`special`),c=t.stylize(`>`,`special`),u=t.stylize(`</${o}>`,`special`);t.truncate-=o.length*2+5;let d=``;r.length>0&&(d+=` `,d+=inspectList(r.map(t=>[t,e.getAttribute(t)]),t,inspectAttribute,` `)),t.truncate-=d.length;let p=t.truncate,m=inspectNodeCollection(e.children,t);return m&&m.length>p&&(m=`${W}(${e.children.length})`),`${s}${d}${c}${m}${u}`}__name(inspectHTML,`inspectHTML`);var pn=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`chai/inspect`):`@@chai/inspect`,mn=Symbol.for(`nodejs.util.inspect.custom`),hn=new WeakMap,gn={},_n={undefined:__name((e,t)=>t.stylize(`undefined`,`undefined`),`undefined`),null:__name((e,t)=>t.stylize(`null`,`null`),`null`),boolean:__name((e,t)=>t.stylize(String(e),`boolean`),`boolean`),Boolean:__name((e,t)=>t.stylize(String(e),`boolean`),`Boolean`),number:inspectNumber,Number:inspectNumber,bigint:inspectBigInt,BigInt:inspectBigInt,string:inspectString,String:inspectString,function:inspectFunction,Function:inspectFunction,symbol:inspectSymbol,Symbol:inspectSymbol,Array:inspectArray,Date:inspectDate,Map:inspectMap,Set:inspectSet,RegExp:inspectRegExp,Promise:ln,WeakSet:__name((e,t)=>t.stylize(`WeakSet{…}`,`special`),`WeakSet`),WeakMap:__name((e,t)=>t.stylize(`WeakMap{…}`,`special`),`WeakMap`),Arguments:inspectArguments,Int8Array:inspectTypedArray,Uint8Array:inspectTypedArray,Uint8ClampedArray:inspectTypedArray,Int16Array:inspectTypedArray,Uint16Array:inspectTypedArray,Int32Array:inspectTypedArray,Uint32Array:inspectTypedArray,Float32Array:inspectTypedArray,Float64Array:inspectTypedArray,Generator:__name(()=>``,`Generator`),DataView:__name(()=>``,`DataView`),ArrayBuffer:__name(()=>``,`ArrayBuffer`),Error:inspectObject2,HTMLCollection:inspectNodeCollection,NodeList:inspectNodeCollection},vn=__name((e,t,r,o)=>pn in e&&typeof e[pn]==`function`?e[pn](t):mn in e&&typeof e[mn]==`function`?e[mn](t.depth,t,o):`inspect`in e&&typeof e.inspect==`function`?e.inspect(t.depth,t):`constructor`in e&&hn.has(e.constructor)?hn.get(e.constructor)(e,t):gn[r]?gn[r](e,t):``,`inspectCustom`),yn=Object.prototype.toString;function inspect(e,t={}){let r=normaliseOptions(t,inspect),{customInspect:o}=r,s=e===null?`null`:typeof e;if(s===`object`&&(s=yn.call(e).slice(8,-1)),s in _n)return _n[s](e,r);if(o&&e){let t=vn(e,r,s,inspect);if(t)return typeof t==`string`?t:inspect(t,r)}let c=e?Object.getPrototypeOf(e):!1;return c===Object.prototype||c===null?inspectObject(e,r):e&&typeof HTMLElement==`function`&&e instanceof HTMLElement?inspectHTML(e,r):`constructor`in e?e.constructor===Object?inspectObject(e,r):inspectClass(e,r):e===Object(e)?inspectObject(e,r):r.stylize(String(e),s)}__name(inspect,`inspect`);var G={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:[`then`,`catch`,`inspect`,`toJSON`],deepEqual:null};function inspect2(e,t,r,o){return inspect(e,{colors:o,depth:r===void 0?2:r,showHidden:t,truncate:G.truncateThreshold?G.truncateThreshold:1/0})}__name(inspect2,`inspect`);function objDisplay(e){let t=inspect2(e),r=Object.prototype.toString.call(e);if(G.truncateThreshold&&t.length>=G.truncateThreshold){if(r===`[object Function]`)return!e.name||e.name===``?`[Function]`:`[Function: `+e.name+`]`;if(r===`[object Array]`)return`[ Array(`+e.length+`) ]`;if(r===`[object Object]`){let t=Object.keys(e);return`{ Object (`+(t.length>2?t.splice(0,2).join(`, `)+`, ...`:t.join(`, `))+`) }`}else return t}else return t}__name(objDisplay,`objDisplay`);function getMessage2(e,t){let r=flag(e,`negate`),o=flag(e,`object`),s=t[3],c=getActual(e,t),u=r?t[2]:t[1],d=flag(e,`message`);return typeof u==`function`&&(u=u()),u||=``,u=u.replace(/#\{this\}/g,function(){return objDisplay(o)}).replace(/#\{act\}/g,function(){return objDisplay(c)}).replace(/#\{exp\}/g,function(){return objDisplay(s)}),d?d+`: `+u:u}__name(getMessage2,`getMessage`);function transferFlags(e,t,r){let o=e.__flags||=Object.create(null);t.__flags||=Object.create(null),r=arguments.length===3?r:!0;for(let e in o)(r||e!==`object`&&e!==`ssfi`&&e!==`lockSsfi`&&e!=`message`)&&(t.__flags[e]=o[e])}__name(transferFlags,`transferFlags`);function type2(e){if(e===void 0)return`undefined`;if(e===null)return`null`;let t=e[Symbol.toStringTag];return typeof t==`string`?t:Object.prototype.toString.call(e).slice(8,-1)}__name(type2,`type`);function FakeMap(){this._key=`chai/deep-eql__`+Math.random()+Date.now()}__name(FakeMap,`FakeMap`),FakeMap.prototype={get:__name(function get(e){return e[this._key]},`get`),set:__name(function set(e,t){Object.isExtensible(e)&&Object.defineProperty(e,this._key,{value:t,configurable:!0})},`set`)};var bn=typeof WeakMap==`function`?WeakMap:FakeMap;function memoizeCompare(e,t,r){if(!r||isPrimitive(e)||isPrimitive(t))return null;var o=r.get(e);if(o){var s=o.get(t);if(typeof s==`boolean`)return s}return null}__name(memoizeCompare,`memoizeCompare`);function memoizeSet(e,t,r,o){if(!(!r||isPrimitive(e)||isPrimitive(t))){var s=r.get(e);s?s.set(t,o):(s=new bn,s.set(t,o),r.set(e,s))}}__name(memoizeSet,`memoizeSet`);var xn=deepEqual;function deepEqual(e,t,r){if(r&&r.comparator)return extensiveDeepEqual(e,t,r);var o=simpleEqual(e,t);return o===null?extensiveDeepEqual(e,t,r):o}__name(deepEqual,`deepEqual`);function simpleEqual(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t?!0:isPrimitive(e)||isPrimitive(t)?!1:null}__name(simpleEqual,`simpleEqual`);function extensiveDeepEqual(e,t,r){r||={},r.memoize=r.memoize===!1?!1:r.memoize||new bn;var o=r&&r.comparator,s=memoizeCompare(e,t,r.memoize);if(s!==null)return s;var c=memoizeCompare(t,e,r.memoize);if(c!==null)return c;if(o){var u=o(e,t);if(u===!1||u===!0)return memoizeSet(e,t,r.memoize,u),u;var d=simpleEqual(e,t);if(d!==null)return d}var p=type2(e);if(p!==type2(t))return memoizeSet(e,t,r.memoize,!1),!1;memoizeSet(e,t,r.memoize,!0);var m=extensiveDeepEqualByType(e,t,p,r);return memoizeSet(e,t,r.memoize,m),m}__name(extensiveDeepEqual,`extensiveDeepEqual`);function extensiveDeepEqualByType(e,t,r,o){switch(r){case`String`:case`Number`:case`Boolean`:case`Date`:return deepEqual(e.valueOf(),t.valueOf());case`Promise`:case`Symbol`:case`function`:case`WeakMap`:case`WeakSet`:return e===t;case`Error`:return keysEqual(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 iterableEqual(e,t,o);case`RegExp`:return regexpEqual(e,t);case`Generator`:return generatorEqual(e,t,o);case`DataView`:return iterableEqual(new Uint8Array(e.buffer),new Uint8Array(t.buffer),o);case`ArrayBuffer`:return iterableEqual(new Uint8Array(e),new Uint8Array(t),o);case`Set`:return entriesEqual(e,t,o);case`Map`:return entriesEqual(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 objectEqual(e,t,o)}}__name(extensiveDeepEqualByType,`extensiveDeepEqualByType`);function regexpEqual(e,t){return e.toString()===t.toString()}__name(regexpEqual,`regexpEqual`);function entriesEqual(e,t,r){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var o=[],s=[];return e.forEach(__name(function gatherEntries(e,t){o.push([e,t])},`gatherEntries`)),t.forEach(__name(function gatherEntries(e,t){s.push([e,t])},`gatherEntries`)),iterableEqual(o.sort(),s.sort(),r)}__name(entriesEqual,`entriesEqual`);function iterableEqual(e,t,r){var o=e.length;if(o!==t.length)return!1;if(o===0)return!0;for(var s=-1;++s<o;)if(deepEqual(e[s],t[s],r)===!1)return!1;return!0}__name(iterableEqual,`iterableEqual`);function generatorEqual(e,t,r){return iterableEqual(getGeneratorEntries(e),getGeneratorEntries(t),r)}__name(generatorEqual,`generatorEqual`);function hasIteratorFunction(e){return typeof Symbol<`u`&&typeof e==`object`&&Symbol.iterator!==void 0&&typeof e[Symbol.iterator]==`function`}__name(hasIteratorFunction,`hasIteratorFunction`);function getIteratorEntries(e){if(hasIteratorFunction(e))try{return getGeneratorEntries(e[Symbol.iterator]())}catch{return[]}return[]}__name(getIteratorEntries,`getIteratorEntries`);function getGeneratorEntries(e){for(var t=e.next(),r=[t.value];t.done===!1;)t=e.next(),r.push(t.value);return r}__name(getGeneratorEntries,`getGeneratorEntries`);function getEnumerableKeys(e){var t=[];for(var r in e)t.push(r);return t}__name(getEnumerableKeys,`getEnumerableKeys`);function getEnumerableSymbols(e){for(var t=[],r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o+=1){var s=r[o];Object.getOwnPropertyDescriptor(e,s).enumerable&&t.push(s)}return t}__name(getEnumerableSymbols,`getEnumerableSymbols`);function keysEqual(e,t,r,o){var s=r.length;if(s===0)return!0;for(var c=0;c<s;c+=1)if(deepEqual(e[r[c]],t[r[c]],o)===!1)return!1;return!0}__name(keysEqual,`keysEqual`);function objectEqual(e,t,r){var o=getEnumerableKeys(e),s=getEnumerableKeys(t),c=getEnumerableSymbols(e),u=getEnumerableSymbols(t);if(o=o.concat(c),s=s.concat(u),o.length&&o.length===s.length)return iterableEqual(mapSymbols(o).sort(),mapSymbols(s).sort())===!1?!1:keysEqual(e,t,o,r);var d=getIteratorEntries(e),p=getIteratorEntries(t);return d.length&&d.length===p.length?(d.sort(),p.sort(),iterableEqual(d,p,r)):o.length===0&&d.length===0&&s.length===0&&p.length===0}__name(objectEqual,`objectEqual`);function isPrimitive(e){return typeof e!=`object`||!e}__name(isPrimitive,`isPrimitive`);function mapSymbols(e){return e.map(__name(function mapSymbol(e){return typeof e==`symbol`?e.toString():e},`mapSymbol`))}__name(mapSymbols,`mapSymbols`);function hasProperty(e,t){return e==null?!1:t in Object(e)}__name(hasProperty,`hasProperty`);function parsePath(e){return e.replace(/([^\\])\[/g,`$1.[`).match(/(\\\.|[^.]+?)+/g).map(e=>{if(e===`constructor`||e===`__proto__`||e===`prototype`)return{};let t=/^\[(\d+)\]$/.exec(e),r=null;return r=t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.[\]])/g,`$1`)},r})}__name(parsePath,`parsePath`);function internalGetPathValue(e,t,r){let o=e,s=null;r=r===void 0?t.length:r;for(let e=0;e<r;e++){let c=t[e];o&&(o=c.p===void 0?o[c.i]:o[c.p],e===r-1&&(s=o))}return s}__name(internalGetPathValue,`internalGetPathValue`);function getPathInfo(e,t){let r=parsePath(t),o=r[r.length-1],s={parent:r.length>1?internalGetPathValue(e,r,r.length-1):e,name:o.p||o.i,value:internalGetPathValue(e,r)};return s.exists=hasProperty(s.parent,s.name),s}__name(getPathInfo,`getPathInfo`);var Sn=class _Assertion{constructor(e,t,r,o){return __publicField(this,`__flags`,{}),flag(this,`ssfi`,r||_Assertion),flag(this,`lockSsfi`,o),flag(this,`object`,e),flag(this,`message`,t),flag(this,`eql`,G.deepEqual||xn),proxify(this)}static get includeStack(){return console.warn(`Assertion.includeStack is deprecated, use chai.config.includeStack instead.`),G.includeStack}static set includeStack(e){console.warn(`Assertion.includeStack is deprecated, use chai.config.includeStack instead.`),G.includeStack=e}static get showDiff(){return console.warn(`Assertion.showDiff is deprecated, use chai.config.showDiff instead.`),G.showDiff}static set showDiff(e){console.warn(`Assertion.showDiff is deprecated, use chai.config.showDiff instead.`),G.showDiff=e}static addProperty(e,t){addProperty(this.prototype,e,t)}static addMethod(e,t){addMethod(this.prototype,e,t)}static addChainableMethod(e,t,r){addChainableMethod(this.prototype,e,t,r)}static overwriteProperty(e,t){overwriteProperty(this.prototype,e,t)}static overwriteMethod(e,t){overwriteMethod(this.prototype,e,t)}static overwriteChainableMethod(e,t,r){overwriteChainableMethod(this.prototype,e,t,r)}assert(e,t,r,o,s,c){let u=test$1(this,arguments);if(!1!==c&&(c=!0),o===void 0&&s===void 0&&(c=!1),!0!==G.showDiff&&(c=!1),!u){t=getMessage2(this,arguments);let e={actual:getActual(this,arguments),expected:o,showDiff:c},r=getOperator(this,arguments);throw r&&(e.operator=r),new U(t,e,G.includeStack?this.assert:flag(this,`ssfi`))}}get _obj(){return flag(this,`object`)}set _obj(e){flag(this,`object`,e)}};__name(Sn,`Assertion`);var K=Sn,Cn=new EventTarget,wn=class _PluginEvent extends Event{constructor(e,t,r){super(e),this.name=String(t),this.fn=r}};__name(wn,`PluginEvent`);var Tn=wn;function isProxyEnabled(){return G.useProxy&&typeof Proxy<`u`&&typeof Reflect<`u`}__name(isProxyEnabled,`isProxyEnabled`);function addProperty(e,t,r){r=r===void 0?function(){}:r,Object.defineProperty(e,t,{get:__name(function propertyGetter(){!isProxyEnabled()&&!flag(this,`lockSsfi`)&&flag(this,`ssfi`,propertyGetter);let e=r.call(this);if(e!==void 0)return e;let t=new K;return transferFlags(this,t),t},`propertyGetter`),configurable:!0}),Cn.dispatchEvent(new Tn(`addProperty`,t,r))}__name(addProperty,`addProperty`);var En=Object.getOwnPropertyDescriptor(function(){},`length`);function addLengthGuard(e,t,r){return En.configurable&&Object.defineProperty(e,`length`,{get:__name(function(){throw Error(r?`Invalid Chai property: `+t+`.length. Due to a compatibility issue, "length" cannot directly follow "`+t+`". Use "`+t+`.lengthOf" instead.`:`Invalid Chai property: `+t+`.length. See docs for proper usage of "`+t+`".`)},`get`)}),e}__name(addLengthGuard,`addLengthGuard`);function getProperties(e){let t=Object.getOwnPropertyNames(e);function addProperty2(e){t.indexOf(e)===-1&&t.push(e)}__name(addProperty2,`addProperty`);let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(addProperty2),r=Object.getPrototypeOf(r);return t}__name(getProperties,`getProperties`);var Dn=[`__flags`,`__methods`,`_obj`,`assert`];function proxify(e,t){return isProxyEnabled()?new Proxy(e,{get:__name(function proxyGetter(e,r){if(typeof r==`string`&&G.proxyExcludedKeys.indexOf(r)===-1&&!Reflect.has(e,r)){if(t)throw Error(`Invalid Chai property: `+t+`.`+r+`. See docs for proper usage of "`+t+`".`);let o=null,s=4;throw getProperties(e).forEach(function(e){if(!Object.prototype.hasOwnProperty(e)&&Dn.indexOf(e)===-1){let t=stringDistanceCapped(r,e,s);t<s&&(o=e,s=t)}}),Error(o===null?`Invalid Chai property: `+r:`Invalid Chai property: `+r+`. Did you mean "`+o+`"?`)}return Dn.indexOf(r)===-1&&!flag(e,`lockSsfi`)&&flag(e,`ssfi`,proxyGetter),Reflect.get(e,r)},`proxyGetter`)}):e}__name(proxify,`proxify`);function stringDistanceCapped(e,t,r){if(Math.abs(e.length-t.length)>=r)return r;let o=[];for(let r=0;r<=e.length;r++)o[r]=Array(t.length+1).fill(0),o[r][0]=r;for(let e=0;e<t.length;e++)o[0][e]=e;for(let s=1;s<=e.length;s++){let c=e.charCodeAt(s-1);for(let e=1;e<=t.length;e++){if(Math.abs(s-e)>=r){o[s][e]=r;continue}o[s][e]=Math.min(o[s-1][e]+1,o[s][e-1]+1,o[s-1][e-1]+(c===t.charCodeAt(e-1)?0:1))}}return o[e.length][t.length]}__name(stringDistanceCapped,`stringDistanceCapped`);function addMethod(e,t,r){let o=__name(function(){flag(this,`lockSsfi`)||flag(this,`ssfi`,o);let e=r.apply(this,arguments);if(e!==void 0)return e;let t=new K;return transferFlags(this,t),t},`methodWrapper`);addLengthGuard(o,t,!1),e[t]=proxify(o,t),Cn.dispatchEvent(new Tn(`addMethod`,t,r))}__name(addMethod,`addMethod`);function overwriteProperty(e,t,r){let o=Object.getOwnPropertyDescriptor(e,t),s=__name(function(){},`_super`);o&&typeof o.get==`function`&&(s=o.get),Object.defineProperty(e,t,{get:__name(function overwritingPropertyGetter(){!isProxyEnabled()&&!flag(this,`lockSsfi`)&&flag(this,`ssfi`,overwritingPropertyGetter);let e=flag(this,`lockSsfi`);flag(this,`lockSsfi`,!0);let t=r(s).call(this);if(flag(this,`lockSsfi`,e),t!==void 0)return t;let o=new K;return transferFlags(this,o),o},`overwritingPropertyGetter`),configurable:!0})}__name(overwriteProperty,`overwriteProperty`);function overwriteMethod(e,t,r){let o=e[t],s=__name(function(){throw Error(t+` is not a function`)},`_super`);o&&typeof o==`function`&&(s=o);let c=__name(function(){flag(this,`lockSsfi`)||flag(this,`ssfi`,c);let e=flag(this,`lockSsfi`);flag(this,`lockSsfi`,!0);let t=r(s).apply(this,arguments);if(flag(this,`lockSsfi`,e),t!==void 0)return t;let o=new K;return transferFlags(this,o),o},`overwritingMethodWrapper`);addLengthGuard(c,t,!1),e[t]=proxify(c,t)}__name(overwriteMethod,`overwriteMethod`);var On=typeof Object.setPrototypeOf==`function`,kn=__name(function(){},`testFn`),An=Object.getOwnPropertyNames(kn).filter(function(e){let t=Object.getOwnPropertyDescriptor(kn,e);return typeof t==`object`?!t.configurable:!0}),jn=Function.prototype.call,Mn=Function.prototype.apply,Nn=class _PluginAddChainableMethodEvent extends Tn{constructor(e,t,r,o){super(e,t,r),this.chainingBehavior=o}};__name(Nn,`PluginAddChainableMethodEvent`);var Pn=Nn;function addChainableMethod(e,t,r,o){typeof o!=`function`&&(o=__name(function(){},`chainingBehavior`));let s={method:r,chainingBehavior:o};e.__methods||={},e.__methods[t]=s,Object.defineProperty(e,t,{get:__name(function chainableMethodGetter(){s.chainingBehavior.call(this);let r=__name(function(){flag(this,`lockSsfi`)||flag(this,`ssfi`,r);let e=s.method.apply(this,arguments);if(e!==void 0)return e;let t=new K;return transferFlags(this,t),t},`chainableMethodWrapper`);if(addLengthGuard(r,t,!0),On){let e=Object.create(this);e.call=jn,e.apply=Mn,Object.setPrototypeOf(r,e)}else Object.getOwnPropertyNames(e).forEach(function(t){An.indexOf(t)===-1&&Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))});return transferFlags(this,r),proxify(r)},`chainableMethodGetter`),configurable:!0}),Cn.dispatchEvent(new Pn(`addChainableMethod`,t,r,o))}__name(addChainableMethod,`addChainableMethod`);function overwriteChainableMethod(e,t,r,o){let s=e.__methods[t],c=s.chainingBehavior;s.chainingBehavior=__name(function overwritingChainableMethodGetter(){let e=o(c).call(this);if(e!==void 0)return e;let t=new K;return transferFlags(this,t),t},`overwritingChainableMethodGetter`);let u=s.method;s.method=__name(function overwritingChainableMethodWrapper(){let e=r(u).apply(this,arguments);if(e!==void 0)return e;let t=new K;return transferFlags(this,t),t},`overwritingChainableMethodWrapper`)}__name(overwriteChainableMethod,`overwriteChainableMethod`);function compareByInspect(e,t){return inspect2(e)<inspect2(t)?-1:1}__name(compareByInspect,`compareByInspect`);function getOwnEnumerablePropertySymbols(e){return typeof Object.getOwnPropertySymbols==`function`?Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}):[]}__name(getOwnEnumerablePropertySymbols,`getOwnEnumerablePropertySymbols`);function getOwnEnumerableProperties(e){return Object.keys(e).concat(getOwnEnumerablePropertySymbols(e))}__name(getOwnEnumerableProperties,`getOwnEnumerableProperties`);var Fn=Number.isNaN;function isObjectType(e){let t=type(e);return[`Array`,`Object`,`Function`].indexOf(t)!==-1}__name(isObjectType,`isObjectType`);function getOperator(e,t){let r=flag(e,`operator`),o=flag(e,`negate`),s=t[3],c=o?t[2]:t[1];if(r)return r;if(typeof c==`function`&&(c=c()),c||=``,!c||/\shave\s/.test(c))return;let u=isObjectType(s);return/\snot\s/.test(c)?u?`notDeepStrictEqual`:`notStrictEqual`:u?`deepStrictEqual`:`strictEqual`}__name(getOperator,`getOperator`);function getName(e){return e.name}__name(getName,`getName`);function isRegExp2(e){return Object.prototype.toString.call(e)===`[object RegExp]`}__name(isRegExp2,`isRegExp`);function isNumeric(e){return[`Number`,`BigInt`].includes(type(e))}__name(isNumeric,`isNumeric`);var{flag:q}=V;[`to`,`be`,`been`,`is`,`and`,`has`,`have`,`with`,`that`,`which`,`at`,`of`,`same`,`but`,`does`,`still`,`also`].forEach(function(e){K.addProperty(e)}),K.addProperty(`not`,function(){q(this,`negate`,!0)}),K.addProperty(`deep`,function(){q(this,`deep`,!0)}),K.addProperty(`nested`,function(){q(this,`nested`,!0)}),K.addProperty(`own`,function(){q(this,`own`,!0)}),K.addProperty(`ordered`,function(){q(this,`ordered`,!0)}),K.addProperty(`any`,function(){q(this,`any`,!0),q(this,`all`,!1)}),K.addProperty(`all`,function(){q(this,`all`,!0),q(this,`any`,!1)});var In={function:[`function`,`asyncfunction`,`generatorfunction`,`asyncgeneratorfunction`],asyncfunction:[`asyncfunction`,`asyncgeneratorfunction`],generatorfunction:[`generatorfunction`,`asyncgeneratorfunction`],asyncgeneratorfunction:[`asyncgeneratorfunction`]};function an(e,t){t&&q(this,`message`,t),e=e.toLowerCase();let r=q(this,`object`),o=~[`a`,`e`,`i`,`o`,`u`].indexOf(e.charAt(0))?`an `:`a `,s=type(r).toLowerCase();In.function.includes(e)?this.assert(In[e].includes(s),`expected #{this} to be `+o+e,`expected #{this} not to be `+o+e):this.assert(e===s,`expected #{this} to be `+o+e,`expected #{this} not to be `+o+e)}__name(an,`an`),K.addChainableMethod(`an`,an),K.addChainableMethod(`a`,an);function SameValueZero(e,t){return Fn(e)&&Fn(t)||e===t}__name(SameValueZero,`SameValueZero`);function includeChainingBehavior(){q(this,`contains`,!0)}__name(includeChainingBehavior,`includeChainingBehavior`);function include(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=type(r).toLowerCase(),s=q(this,`message`),c=q(this,`negate`),u=q(this,`ssfi`),d=q(this,`deep`),p=d?`deep `:``,m=d?q(this,`eql`):SameValueZero;s=s?s+`: `:``;let h=!1;switch(o){case`string`:h=r.indexOf(e)!==-1;break;case`weakset`:if(d)throw new U(s+`unable to use .deep.include with WeakSet`,void 0,u);h=r.has(e);break;case`map`:r.forEach(function(t){h||=m(t,e)});break;case`set`:d?r.forEach(function(t){h||=m(t,e)}):h=r.has(e);break;case`array`:h=d?r.some(function(t){return m(t,e)}):r.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new U(s+`the given combination of arguments (`+o+` and `+type(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 `+type(e).toLowerCase(),void 0,u);let t=Object.keys(e),d=null,p=0;if(t.forEach(function(o){let s=new K(r);if(transferFlags(this,s,!0),q(s,`lockSsfi`,!0),!c||t.length===1){s.property(o,e[o]);return}try{s.property(o,e[o])}catch(e){if(!H.compatibleConstructor(e,U))throw e;d===null&&(d=e),p++}},this),c&&t.length>1&&p===t.length)throw d;return}}this.assert(h,`expected #{this} to `+p+`include `+inspect2(e),`expected #{this} to not `+p+`include `+inspect2(e))}__name(include,`include`),K.addChainableMethod(`include`,include,includeChainingBehavior),K.addChainableMethod(`contain`,include,includeChainingBehavior),K.addChainableMethod(`contains`,include,includeChainingBehavior),K.addChainableMethod(`includes`,include,includeChainingBehavior),K.addProperty(`ok`,function(){this.assert(q(this,`object`),`expected #{this} to be truthy`,`expected #{this} to be falsy`)}),K.addProperty(`true`,function(){this.assert(!0===q(this,`object`),`expected #{this} to be true`,`expected #{this} to be false`,!q(this,`negate`))}),K.addProperty(`numeric`,function(){let e=q(this,`object`);this.assert([`Number`,`BigInt`].includes(type(e)),`expected #{this} to be numeric`,`expected #{this} to not be numeric`,!q(this,`negate`))}),K.addProperty(`callable`,function(){let e=q(this,`object`),t=q(this,`ssfi`),r=q(this,`message`),o=r?`${r}: `:``,s=q(this,`negate`),c=s?`${o}expected ${inspect2(e)} not to be a callable function`:`${o}expected ${inspect2(e)} to be a callable function`,u=[`Function`,`AsyncFunction`,`GeneratorFunction`,`AsyncGeneratorFunction`].includes(type(e));if(u&&s||!u&&!s)throw new U(c,void 0,t)}),K.addProperty(`false`,function(){this.assert(!1===q(this,`object`),`expected #{this} to be false`,`expected #{this} to be true`,!!q(this,`negate`))}),K.addProperty(`null`,function(){this.assert(q(this,`object`)===null,`expected #{this} to be null`,`expected #{this} not to be null`)}),K.addProperty(`undefined`,function(){this.assert(q(this,`object`)===void 0,`expected #{this} to be undefined`,`expected #{this} not to be undefined`)}),K.addProperty(`NaN`,function(){this.assert(Fn(q(this,`object`)),`expected #{this} to be NaN`,`expected #{this} not to be NaN`)});function assertExist(){let e=q(this,`object`);this.assert(e!=null,`expected #{this} to exist`,`expected #{this} to not exist`)}__name(assertExist,`assertExist`),K.addProperty(`exist`,assertExist),K.addProperty(`exists`,assertExist),K.addProperty(`empty`,function(){let e=q(this,`object`),t=q(this,`ssfi`),r=q(this,`message`),o;switch(r=r?r+`: `:``,type(e).toLowerCase()){case`array`:case`string`:o=e.length;break;case`map`:case`set`:o=e.size;break;case`weakmap`:case`weakset`:throw new U(r+`.empty was passed a weak collection`,void 0,t);case`function`:throw new U((r+`.empty was passed a function `+getName(e)).trim(),void 0,t);default:if(e!==Object(e))throw new U(r+`.empty was passed non-string primitive `+inspect2(e),void 0,t);o=Object.keys(e).length}this.assert(o===0,`expected #{this} to be empty`,`expected #{this} not to be empty`)});function checkArguments(){let e=type(q(this,`object`));this.assert(e===`Arguments`,`expected #{this} to be arguments but got `+e,`expected #{this} to not be arguments`)}__name(checkArguments,`checkArguments`),K.addProperty(`arguments`,checkArguments),K.addProperty(`Arguments`,checkArguments);function assertEqual(e,t){t&&q(this,`message`,t);let r=q(this,`object`);if(q(this,`deep`)){let t=q(this,`lockSsfi`);q(this,`lockSsfi`,!0),this.eql(e),q(this,`lockSsfi`,t)}else this.assert(e===r,`expected #{this} to equal #{exp}`,`expected #{this} to not equal #{exp}`,e,this._obj,!0)}__name(assertEqual,`assertEqual`),K.addMethod(`equal`,assertEqual),K.addMethod(`equals`,assertEqual),K.addMethod(`eq`,assertEqual);function assertEql(e,t){t&&q(this,`message`,t);let r=q(this,`eql`);this.assert(r(e,q(this,`object`)),`expected #{this} to deeply equal #{exp}`,`expected #{this} to not deeply equal #{exp}`,e,this._obj,!0)}__name(assertEql,`assertEql`),K.addMethod(`eql`,assertEql),K.addMethod(`eqls`,assertEql);function assertAbove(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=q(this,`doLength`),s=q(this,`message`),c=s?s+`: `:``,u=q(this,`ssfi`),d=type(r).toLowerCase(),p=type(e).toLowerCase();if(o&&d!==`map`&&d!==`set`&&new K(r,s,u,!0).to.have.property(`length`),!o&&d===`date`&&p!==`date`)throw new U(c+`the argument to above must be a date`,void 0,u);if(!isNumeric(e)&&(o||isNumeric(r)))throw new U(c+`the argument to above must be a number`,void 0,u);if(!o&&d!==`date`&&!isNumeric(r)){let e=d===`string`?`'`+r+`'`:r;throw new U(c+`expected `+e+` to be a number or a date`,void 0,u)}if(o){let t=`length`,o;d===`map`||d===`set`?(t=`size`,o=r.size):o=r.length,this.assert(o>e,`expected #{this} to have a `+t+` above #{exp} but got #{act}`,`expected #{this} to not have a `+t+` above #{exp}`,e,o)}else this.assert(r>e,`expected #{this} to be above #{exp}`,`expected #{this} to be at most #{exp}`,e)}__name(assertAbove,`assertAbove`),K.addMethod(`above`,assertAbove),K.addMethod(`gt`,assertAbove),K.addMethod(`greaterThan`,assertAbove);function assertLeast(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=q(this,`doLength`),s=q(this,`message`),c=s?s+`: `:``,u=q(this,`ssfi`),d=type(r).toLowerCase(),p=type(e).toLowerCase(),m,h=!0;if(o&&d!==`map`&&d!==`set`&&new K(r,s,u,!0).to.have.property(`length`),!o&&d===`date`&&p!==`date`)m=c+`the argument to least must be a date`;else if(!isNumeric(e)&&(o||isNumeric(r)))m=c+`the argument to least must be a number`;else if(!o&&d!==`date`&&!isNumeric(r)){let e=d===`string`?`'`+r+`'`:r;m=c+`expected `+e+` to be a number or a date`}else h=!1;if(h)throw new U(m,void 0,u);if(o){let t=`length`,o;d===`map`||d===`set`?(t=`size`,o=r.size):o=r.length,this.assert(o>=e,`expected #{this} to have a `+t+` at least #{exp} but got #{act}`,`expected #{this} to have a `+t+` below #{exp}`,e,o)}else this.assert(r>=e,`expected #{this} to be at least #{exp}`,`expected #{this} to be below #{exp}`,e)}__name(assertLeast,`assertLeast`),K.addMethod(`least`,assertLeast),K.addMethod(`gte`,assertLeast),K.addMethod(`greaterThanOrEqual`,assertLeast);function assertBelow(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=q(this,`doLength`),s=q(this,`message`),c=s?s+`: `:``,u=q(this,`ssfi`),d=type(r).toLowerCase(),p=type(e).toLowerCase(),m,h=!0;if(o&&d!==`map`&&d!==`set`&&new K(r,s,u,!0).to.have.property(`length`),!o&&d===`date`&&p!==`date`)m=c+`the argument to below must be a date`;else if(!isNumeric(e)&&(o||isNumeric(r)))m=c+`the argument to below must be a number`;else if(!o&&d!==`date`&&!isNumeric(r)){let e=d===`string`?`'`+r+`'`:r;m=c+`expected `+e+` to be a number or a date`}else h=!1;if(h)throw new U(m,void 0,u);if(o){let t=`length`,o;d===`map`||d===`set`?(t=`size`,o=r.size):o=r.length,this.assert(o<e,`expected #{this} to have a `+t+` below #{exp} but got #{act}`,`expected #{this} to not have a `+t+` below #{exp}`,e,o)}else this.assert(r<e,`expected #{this} to be below #{exp}`,`expected #{this} to be at least #{exp}`,e)}__name(assertBelow,`assertBelow`),K.addMethod(`below`,assertBelow),K.addMethod(`lt`,assertBelow),K.addMethod(`lessThan`,assertBelow);function assertMost(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=q(this,`doLength`),s=q(this,`message`),c=s?s+`: `:``,u=q(this,`ssfi`),d=type(r).toLowerCase(),p=type(e).toLowerCase(),m,h=!0;if(o&&d!==`map`&&d!==`set`&&new K(r,s,u,!0).to.have.property(`length`),!o&&d===`date`&&p!==`date`)m=c+`the argument to most must be a date`;else if(!isNumeric(e)&&(o||isNumeric(r)))m=c+`the argument to most must be a number`;else if(!o&&d!==`date`&&!isNumeric(r)){let e=d===`string`?`'`+r+`'`:r;m=c+`expected `+e+` to be a number or a date`}else h=!1;if(h)throw new U(m,void 0,u);if(o){let t=`length`,o;d===`map`||d===`set`?(t=`size`,o=r.size):o=r.length,this.assert(o<=e,`expected #{this} to have a `+t+` at most #{exp} but got #{act}`,`expected #{this} to have a `+t+` above #{exp}`,e,o)}else this.assert(r<=e,`expected #{this} to be at most #{exp}`,`expected #{this} to be above #{exp}`,e)}__name(assertMost,`assertMost`),K.addMethod(`most`,assertMost),K.addMethod(`lte`,assertMost),K.addMethod(`lessThanOrEqual`,assertMost),K.addMethod(`within`,function(e,t,r){r&&q(this,`message`,r);let o=q(this,`object`),s=q(this,`doLength`),c=q(this,`message`),u=c?c+`: `:``,d=q(this,`ssfi`),p=type(o).toLowerCase(),m=type(e).toLowerCase(),h=type(t).toLowerCase(),g,_=!0,y=m===`date`&&h===`date`?e.toISOString()+`..`+t.toISOString():e+`..`+t;if(s&&p!==`map`&&p!==`set`&&new K(o,c,d,!0).to.have.property(`length`),!s&&p===`date`&&(m!==`date`||h!==`date`))g=u+`the arguments to within must be dates`;else if((!isNumeric(e)||!isNumeric(t))&&(s||isNumeric(o)))g=u+`the arguments to within must be numbers`;else if(!s&&p!==`date`&&!isNumeric(o)){let e=p===`string`?`'`+o+`'`:o;g=u+`expected `+e+` to be a number or a date`}else _=!1;if(_)throw new U(g,void 0,d);if(s){let r=`length`,s;p===`map`||p===`set`?(r=`size`,s=o.size):s=o.length,this.assert(s>=e&&s<=t,`expected #{this} to have a `+r+` within `+y,`expected #{this} to not have a `+r+` within `+y)}else this.assert(o>=e&&o<=t,`expected #{this} to be within `+y,`expected #{this} to not be within `+y)});function assertInstanceOf(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=q(this,`ssfi`),s=q(this,`message`),c;try{c=r instanceof e}catch(t){throw t instanceof TypeError?(s=s?s+`: `:``,new U(s+`The instanceof assertion needs a constructor but `+type(e)+` was given.`,void 0,o)):t}let u=getName(e);u??=`an unnamed constructor`,this.assert(c,`expected #{this} to be an instance of `+u,`expected #{this} to not be an instance of `+u)}__name(assertInstanceOf,`assertInstanceOf`),K.addMethod(`instanceof`,assertInstanceOf),K.addMethod(`instanceOf`,assertInstanceOf);function assertProperty(e,t,r){r&&q(this,`message`,r);let o=q(this,`nested`),s=q(this,`own`),c=q(this,`message`),u=q(this,`object`),d=q(this,`ssfi`),p=typeof e;if(c=c?c+`: `:``,o){if(p!==`string`)throw new U(c+`the argument to property must be a string when using nested syntax`,void 0,d)}else if(p!==`string`&&p!==`number`&&p!==`symbol`)throw new U(c+`the argument to property must be a string, number, or symbol`,void 0,d);if(o&&s)throw new U(c+`The "nested" and "own" flags cannot be combined.`,void 0,d);if(u==null)throw new U(c+`Target cannot be null or undefined.`,void 0,d);let m=q(this,`deep`),h=q(this,`negate`),g=o?getPathInfo(u,e):null,_=o?g.value:u[e],y=m?q(this,`eql`):(e,t)=>e===t,b=``;m&&(b+=`deep `),s&&(b+=`own `),o&&(b+=`nested `),b+=`property `;let x;x=s?Object.prototype.hasOwnProperty.call(u,e):o?g.exists:hasProperty(u,e),(!h||arguments.length===1)&&this.assert(x,`expected #{this} to have `+b+inspect2(e),`expected #{this} to not have `+b+inspect2(e)),arguments.length>1&&this.assert(x&&y(t,_),`expected #{this} to have `+b+inspect2(e)+` of #{exp}, but got #{act}`,`expected #{this} to not have `+b+inspect2(e)+` of #{act}`,t,_),q(this,`object`,_)}__name(assertProperty,`assertProperty`),K.addMethod(`property`,assertProperty);function assertOwnProperty(e,t,r){q(this,`own`,!0),assertProperty.apply(this,arguments)}__name(assertOwnProperty,`assertOwnProperty`),K.addMethod(`ownProperty`,assertOwnProperty),K.addMethod(`haveOwnProperty`,assertOwnProperty);function assertOwnPropertyDescriptor(e,t,r){typeof t==`string`&&(r=t,t=null),r&&q(this,`message`,r);let o=q(this,`object`),s=Object.getOwnPropertyDescriptor(Object(o),e),c=q(this,`eql`);s&&t?this.assert(c(t,s),`expected the own property descriptor for `+inspect2(e)+` on #{this} to match `+inspect2(t)+`, got `+inspect2(s),`expected the own property descriptor for `+inspect2(e)+` on #{this} to not match `+inspect2(t),t,s,!0):this.assert(s,`expected #{this} to have an own property descriptor for `+inspect2(e),`expected #{this} to not have an own property descriptor for `+inspect2(e)),q(this,`object`,s)}__name(assertOwnPropertyDescriptor,`assertOwnPropertyDescriptor`),K.addMethod(`ownPropertyDescriptor`,assertOwnPropertyDescriptor),K.addMethod(`haveOwnPropertyDescriptor`,assertOwnPropertyDescriptor);function assertLengthChain(){q(this,`doLength`,!0)}__name(assertLengthChain,`assertLengthChain`);function assertLength(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=type(r).toLowerCase(),s=q(this,`message`),c=q(this,`ssfi`),u=`length`,d;switch(o){case`map`:case`set`:u=`size`,d=r.size;break;default:new K(r,s,c,!0).to.have.property(`length`),d=r.length}this.assert(d==e,`expected #{this} to have a `+u+` of #{exp} but got #{act}`,`expected #{this} to not have a `+u+` of #{act}`,e,d)}__name(assertLength,`assertLength`),K.addChainableMethod(`length`,assertLength,assertLengthChain),K.addChainableMethod(`lengthOf`,assertLength,assertLengthChain);function assertMatch(e,t){t&&q(this,`message`,t);let r=q(this,`object`);this.assert(e.exec(r),`expected #{this} to match `+e,`expected #{this} not to match `+e)}__name(assertMatch,`assertMatch`),K.addMethod(`match`,assertMatch),K.addMethod(`matches`,assertMatch),K.addMethod(`string`,function(e,t){t&&q(this,`message`,t);let r=q(this,`object`);new K(r,q(this,`message`),q(this,`ssfi`),!0).is.a(`string`),this.assert(~r.indexOf(e),`expected #{this} to contain `+inspect2(e),`expected #{this} to not contain `+inspect2(e))});function assertKeys(e){let t=q(this,`object`),r=type(t),o=type(e),s=q(this,`ssfi`),c=q(this,`deep`),u,d=``,p,m=!0,h=q(this,`message`);h=h?h+`: `:``;let g=h+`when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments`;if(r===`Map`||r===`Set`)d=c?`deeply `:``,p=[],t.forEach(function(e,t){p.push(t)}),o!==`Array`&&(e=Array.prototype.slice.call(arguments));else{switch(p=getOwnEnumerableProperties(t),o){case`Array`:if(arguments.length>1)throw new U(g,void 0,s);break;case`Object`:if(arguments.length>1)throw new U(g,void 0,s);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(e){return typeof e==`symbol`?e:String(e)})}if(!e.length)throw new U(h+`keys required`,void 0,s);let _=e.length,y=q(this,`any`),b=q(this,`all`),x=e,S=c?q(this,`eql`):(e,t)=>e===t;if(!y&&!b&&(b=!0),y&&(m=x.some(function(e){return p.some(function(t){return S(e,t)})})),b&&(m=x.every(function(e){return p.some(function(t){return S(e,t)})}),q(this,`contains`)||(m&&=e.length==p.length)),_>1){e=e.map(function(e){return inspect2(e)});let t=e.pop();b&&(u=e.join(`, `)+`, and `+t),y&&(u=e.join(`, `)+`, or `+t)}else u=inspect2(e[0]);u=(_>1?`keys `:`key `)+u,u=(q(this,`contains`)?`contain `:`have `)+u,this.assert(m,`expected #{this} to `+d+u,`expected #{this} to not `+d+u,x.slice(0).sort(compareByInspect),p.sort(compareByInspect),!0)}__name(assertKeys,`assertKeys`),K.addMethod(`keys`,assertKeys),K.addMethod(`key`,assertKeys);function assertThrows(e,t,r){r&&q(this,`message`,r);let o=q(this,`object`),s=q(this,`ssfi`),c=q(this,`message`),u=q(this,`negate`)||!1;new K(o,c,s,!0).is.a(`function`),(isRegExp2(e)||typeof e==`string`)&&(t=e,e=null);let d,p=!1;try{o()}catch(e){p=!0,d=e}let m=e===void 0&&t===void 0,h=!!(e&&t),g=!1,_=!1;if(m||!m&&!u){let t=`an error`;e instanceof Error?t=`#{exp}`:e&&(t=H.getConstructorName(e));let r=d;if(d instanceof Error)r=d.toString();else if(typeof d==`string`)r=d;else if(d&&(typeof d==`object`||typeof d==`function`))try{r=H.getConstructorName(d)}catch{}this.assert(p,`expected #{this} to throw `+t,`expected #{this} to not throw an error but #{act} was thrown`,e&&e.toString(),r)}if(e&&d&&(e instanceof Error&&H.compatibleInstance(d,e)===u&&(h&&u?g=!0:this.assert(u,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(d&&!u?` but #{act} was thrown`:``),e.toString(),d.toString())),H.compatibleConstructor(d,e)===u&&(h&&u?g=!0:this.assert(u,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(d?` but #{act} was thrown`:``),e instanceof Error?e.toString():e&&H.getConstructorName(e),d instanceof Error?d.toString():d&&H.getConstructorName(d)))),d&&t!=null){let e=`including`;isRegExp2(t)&&(e=`matching`),H.compatibleMessage(d,t)===u&&(h&&u?_=!0:this.assert(u,`expected #{this} to throw error `+e+` #{exp} but got #{act}`,`expected #{this} to throw error not `+e+` #{exp}`,t,H.getMessage(d)))}g&&_&&this.assert(u,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(d?` but #{act} was thrown`:``),e instanceof Error?e.toString():e&&H.getConstructorName(e),d instanceof Error?d.toString():d&&H.getConstructorName(d)),q(this,`object`,d)}__name(assertThrows,`assertThrows`),K.addMethod(`throw`,assertThrows),K.addMethod(`throws`,assertThrows),K.addMethod(`Throw`,assertThrows);function respondTo(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=q(this,`itself`),s=typeof r==`function`&&!o?r.prototype[e]:r[e];this.assert(typeof s==`function`,`expected #{this} to respond to `+inspect2(e),`expected #{this} to not respond to `+inspect2(e))}__name(respondTo,`respondTo`),K.addMethod(`respondTo`,respondTo),K.addMethod(`respondsTo`,respondTo),K.addProperty(`itself`,function(){q(this,`itself`,!0)});function satisfy(e,t){t&&q(this,`message`,t);let r=e(q(this,`object`));this.assert(r,`expected #{this} to satisfy `+objDisplay(e),`expected #{this} to not satisfy`+objDisplay(e),!q(this,`negate`),r)}__name(satisfy,`satisfy`),K.addMethod(`satisfy`,satisfy),K.addMethod(`satisfies`,satisfy);function closeTo(e,t,r){r&&q(this,`message`,r);let o=q(this,`object`),s=q(this,`message`),c=q(this,`ssfi`);new K(o,s,c,!0).is.numeric;let u="A `delta` value is required for `closeTo`";if(t==null||(new K(t,s,c,!0).is.numeric,u="A `expected` value is required for `closeTo`",e==null))throw new U(s?`${s}: ${u}`:u,void 0,c);new K(e,s,c,!0).is.numeric;let d=__name(e=>e<0?-e:e,`abs`),p=__name(e=>parseFloat(parseFloat(e).toPrecision(12)),`strip`);this.assert(p(d(o-e))<=t,`expected #{this} to be close to `+e+` +/- `+t,`expected #{this} not to be close to `+e+` +/- `+t)}__name(closeTo,`closeTo`),K.addMethod(`closeTo`,closeTo),K.addMethod(`approximately`,closeTo);function isSubsetOf(e,t,r,o,s){let c=Array.from(t),u=Array.from(e);if(!o){if(u.length!==c.length)return!1;c=c.slice()}return u.every(function(e,t){if(s)return r?r(e,c[t]):e===c[t];if(!r){let t=c.indexOf(e);return t===-1?!1:(o||c.splice(t,1),!0)}return c.some(function(t,s){return r(e,t)?(o||c.splice(s,1),!0):!1})})}__name(isSubsetOf,`isSubsetOf`),K.addMethod(`members`,function(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=q(this,`message`),s=q(this,`ssfi`);new K(r,o,s,!0).to.be.iterable,new K(e,o,s,!0).to.be.iterable;let c=q(this,`contains`),u=q(this,`ordered`),d,p,m;c?(d=u?`an ordered superset`:`a superset`,p=`expected #{this} to be `+d+` of #{exp}`,m=`expected #{this} to not be `+d+` of #{exp}`):(d=u?`ordered members`:`members`,p=`expected #{this} to have the same `+d+` as #{exp}`,m=`expected #{this} to not have the same `+d+` as #{exp}`);let h=q(this,`deep`)?q(this,`eql`):void 0;this.assert(isSubsetOf(e,r,h,c,u),p,m,e,r,!0)}),K.addProperty(`iterable`,function(e){e&&q(this,`message`,e);let t=q(this,`object`);this.assert(t!=null&&t[Symbol.iterator],`expected #{this} to be an iterable`,`expected #{this} to not be an iterable`,t)});function oneOf(e,t){t&&q(this,`message`,t);let r=q(this,`object`),o=q(this,`message`),s=q(this,`ssfi`),c=q(this,`contains`),u=q(this,`deep`),d=q(this,`eql`);new K(e,o,s,!0).to.be.an(`array`),c?this.assert(e.some(function(e){return r.indexOf(e)>-1}),`expected #{this} to contain one of #{exp}`,`expected #{this} to not contain one of #{exp}`,e,r):u?this.assert(e.some(function(e){return d(r,e)}),`expected #{this} to deeply equal one of #{exp}`,`expected #{this} to deeply equal one of #{exp}`,e,r):this.assert(e.indexOf(r)>-1,`expected #{this} to be one of #{exp}`,`expected #{this} to not be one of #{exp}`,e,r)}__name(oneOf,`oneOf`),K.addMethod(`oneOf`,oneOf);function assertChanges(e,t,r){r&&q(this,`message`,r);let o=q(this,`object`),s=q(this,`message`),c=q(this,`ssfi`);new K(o,s,c,!0).is.a(`function`);let u;t?(new K(e,s,c,!0).to.have.property(t),u=e[t]):(new K(e,s,c,!0).is.a(`function`),u=e()),o();let d=t==null?e():e[t],p=t==null?u:`.`+t;q(this,`deltaMsgObj`,p),q(this,`initialDeltaValue`,u),q(this,`finalDeltaValue`,d),q(this,`deltaBehavior`,`change`),q(this,`realDelta`,d!==u),this.assert(u!==d,`expected `+p+` to change`,`expected `+p+` to not change`)}__name(assertChanges,`assertChanges`),K.addMethod(`change`,assertChanges),K.addMethod(`changes`,assertChanges);function assertIncreases(e,t,r){r&&q(this,`message`,r);let o=q(this,`object`),s=q(this,`message`),c=q(this,`ssfi`);new K(o,s,c,!0).is.a(`function`);let u;t?(new K(e,s,c,!0).to.have.property(t),u=e[t]):(new K(e,s,c,!0).is.a(`function`),u=e()),new K(u,s,c,!0).is.a(`number`),o();let d=t==null?e():e[t],p=t==null?u:`.`+t;q(this,`deltaMsgObj`,p),q(this,`initialDeltaValue`,u),q(this,`finalDeltaValue`,d),q(this,`deltaBehavior`,`increase`),q(this,`realDelta`,d-u),this.assert(d-u>0,`expected `+p+` to increase`,`expected `+p+` to not increase`)}__name(assertIncreases,`assertIncreases`),K.addMethod(`increase`,assertIncreases),K.addMethod(`increases`,assertIncreases);function assertDecreases(e,t,r){r&&q(this,`message`,r);let o=q(this,`object`),s=q(this,`message`),c=q(this,`ssfi`);new K(o,s,c,!0).is.a(`function`);let u;t?(new K(e,s,c,!0).to.have.property(t),u=e[t]):(new K(e,s,c,!0).is.a(`function`),u=e()),new K(u,s,c,!0).is.a(`number`),o();let d=t==null?e():e[t],p=t==null?u:`.`+t;q(this,`deltaMsgObj`,p),q(this,`initialDeltaValue`,u),q(this,`finalDeltaValue`,d),q(this,`deltaBehavior`,`decrease`),q(this,`realDelta`,u-d),this.assert(d-u<0,`expected `+p+` to decrease`,`expected `+p+` to not decrease`)}__name(assertDecreases,`assertDecreases`),K.addMethod(`decrease`,assertDecreases),K.addMethod(`decreases`,assertDecreases);function assertDelta(e,t){t&&q(this,`message`,t);let r=q(this,`deltaMsgObj`),o=q(this,`initialDeltaValue`),s=q(this,`finalDeltaValue`),c=q(this,`deltaBehavior`),u=q(this,`realDelta`),d;d=c===`change`?Math.abs(s-o)===Math.abs(e):u===Math.abs(e),this.assert(d,`expected `+r+` to `+c+` by `+e,`expected `+r+` to not `+c+` by `+e)}__name(assertDelta,`assertDelta`),K.addMethod(`by`,assertDelta),K.addProperty(`extensible`,function(){let e=q(this,`object`),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,`expected #{this} to be extensible`,`expected #{this} to not be extensible`)}),K.addProperty(`sealed`,function(){let e=q(this,`object`),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,`expected #{this} to be sealed`,`expected #{this} to not be sealed`)}),K.addProperty(`frozen`,function(){let e=q(this,`object`),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,`expected #{this} to be frozen`,`expected #{this} to not be frozen`)}),K.addProperty(`finite`,function(e){let t=q(this,`object`);this.assert(typeof t==`number`&&isFinite(t),`expected #{this} to be a finite number`,`expected #{this} to not be a finite number`)});function compareSubset(e,t){return e===t?!0:typeof t==typeof e?typeof e!=`object`||!e?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(e){return t.some(function(t){return compareSubset(e,t)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(r){let o=e[r],s=t[r];return typeof o==`object`&&o&&s!==null?compareSubset(o,s):typeof o==`function`?o(s):s===o}):!1:!1}__name(compareSubset,`compareSubset`),K.addMethod(`containSubset`,function(e){let t=flag(this,`object`),r=G.showDiff;this.assert(compareSubset(e,t),`expected #{act} to contain subset #{exp}`,`expected #{act} to not contain subset #{exp}`,e,t,r)});function expect(e,t){return new K(e,t)}__name(expect,`expect`),expect.fail=function(e,t,r,o){throw arguments.length<2&&(r=e,e=void 0),r||=`expect.fail()`,new U(r,{actual:e,expected:t,operator:o},expect.fail)};var Ln={};__export(Ln,{Should:()=>zn,should:()=>Rn});function loadShould(){function shouldGetter(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol==`function`&&this instanceof Symbol||typeof BigInt==`function`&&this instanceof BigInt?new K(this.valueOf(),null,shouldGetter):new K(this,null,shouldGetter)}__name(shouldGetter,`shouldGetter`);function shouldSetter(e){Object.defineProperty(this,`should`,{value:e,enumerable:!0,configurable:!0,writable:!0})}__name(shouldSetter,`shouldSetter`),Object.defineProperty(Object.prototype,`should`,{set:shouldSetter,get:shouldGetter,configurable:!0});let e={};return e.fail=function(t,r,o,s){throw arguments.length<2&&(o=t,t=void 0),o||=`should.fail()`,new U(o,{actual:t,expected:r,operator:s},e.fail)},e.equal=function(e,t,r){new K(e,r).to.equal(t)},e.Throw=function(e,t,r,o){new K(e,o).to.Throw(t,r)},e.exist=function(e,t){new K(e,t).to.exist},e.not={},e.not.equal=function(e,t,r){new K(e,r).to.not.equal(t)},e.not.Throw=function(e,t,r,o){new K(e,o).to.not.Throw(t,r)},e.not.exist=function(e,t){new K(e,t).to.not.exist},e.throw=e.Throw,e.not.throw=e.not.Throw,e}__name(loadShould,`loadShould`);var Rn=loadShould,zn=loadShould;function assert$1(e,t){new K(null,null,assert$1,!0).assert(e,t,`[ negation message unavailable ]`)}e(assert$1,`assert`),__name(assert$1,`assert`),assert$1.fail=function(e,t,r,o){throw arguments.length<2&&(r=e,e=void 0),r||=`assert.fail()`,new U(r,{actual:e,expected:t,operator:o},assert$1.fail)},assert$1.isOk=function(e,t){new K(e,t,assert$1.isOk,!0).is.ok},assert$1.isNotOk=function(e,t){new K(e,t,assert$1.isNotOk,!0).is.not.ok},assert$1.equal=function(e,t,r){let o=new K(e,r,assert$1.equal,!0);o.assert(t==flag(o,`object`),`expected #{this} to equal #{exp}`,`expected #{this} to not equal #{act}`,t,e,!0)},assert$1.notEqual=function(e,t,r){let o=new K(e,r,assert$1.notEqual,!0);o.assert(t!=flag(o,`object`),`expected #{this} to not equal #{exp}`,`expected #{this} to equal #{act}`,t,e,!0)},assert$1.strictEqual=function(e,t,r){new K(e,r,assert$1.strictEqual,!0).to.equal(t)},assert$1.notStrictEqual=function(e,t,r){new K(e,r,assert$1.notStrictEqual,!0).to.not.equal(t)},assert$1.deepEqual=assert$1.deepStrictEqual=function(e,t,r){new K(e,r,assert$1.deepEqual,!0).to.eql(t)},assert$1.notDeepEqual=function(e,t,r){new K(e,r,assert$1.notDeepEqual,!0).to.not.eql(t)},assert$1.isAbove=function(e,t,r){new K(e,r,assert$1.isAbove,!0).to.be.above(t)},assert$1.isAtLeast=function(e,t,r){new K(e,r,assert$1.isAtLeast,!0).to.be.least(t)},assert$1.isBelow=function(e,t,r){new K(e,r,assert$1.isBelow,!0).to.be.below(t)},assert$1.isAtMost=function(e,t,r){new K(e,r,assert$1.isAtMost,!0).to.be.most(t)},assert$1.isTrue=function(e,t){new K(e,t,assert$1.isTrue,!0).is.true},assert$1.isNotTrue=function(e,t){new K(e,t,assert$1.isNotTrue,!0).to.not.equal(!0)},assert$1.isFalse=function(e,t){new K(e,t,assert$1.isFalse,!0).is.false},assert$1.isNotFalse=function(e,t){new K(e,t,assert$1.isNotFalse,!0).to.not.equal(!1)},assert$1.isNull=function(e,t){new K(e,t,assert$1.isNull,!0).to.equal(null)},assert$1.isNotNull=function(e,t){new K(e,t,assert$1.isNotNull,!0).to.not.equal(null)},assert$1.isNaN=function(e,t){new K(e,t,assert$1.isNaN,!0).to.be.NaN},assert$1.isNotNaN=function(e,t){new K(e,t,assert$1.isNotNaN,!0).not.to.be.NaN},assert$1.exists=function(e,t){new K(e,t,assert$1.exists,!0).to.exist},assert$1.notExists=function(e,t){new K(e,t,assert$1.notExists,!0).to.not.exist},assert$1.isUndefined=function(e,t){new K(e,t,assert$1.isUndefined,!0).to.equal(void 0)},assert$1.isDefined=function(e,t){new K(e,t,assert$1.isDefined,!0).to.not.equal(void 0)},assert$1.isCallable=function(e,t){new K(e,t,assert$1.isCallable,!0).is.callable},assert$1.isNotCallable=function(e,t){new K(e,t,assert$1.isNotCallable,!0).is.not.callable},assert$1.isObject=function(e,t){new K(e,t,assert$1.isObject,!0).to.be.a(`object`)},assert$1.isNotObject=function(e,t){new K(e,t,assert$1.isNotObject,!0).to.not.be.a(`object`)},assert$1.isArray=function(e,t){new K(e,t,assert$1.isArray,!0).to.be.an(`array`)},assert$1.isNotArray=function(e,t){new K(e,t,assert$1.isNotArray,!0).to.not.be.an(`array`)},assert$1.isString=function(e,t){new K(e,t,assert$1.isString,!0).to.be.a(`string`)},assert$1.isNotString=function(e,t){new K(e,t,assert$1.isNotString,!0).to.not.be.a(`string`)},assert$1.isNumber=function(e,t){new K(e,t,assert$1.isNumber,!0).to.be.a(`number`)},assert$1.isNotNumber=function(e,t){new K(e,t,assert$1.isNotNumber,!0).to.not.be.a(`number`)},assert$1.isNumeric=function(e,t){new K(e,t,assert$1.isNumeric,!0).is.numeric},assert$1.isNotNumeric=function(e,t){new K(e,t,assert$1.isNotNumeric,!0).is.not.numeric},assert$1.isFinite=function(e,t){new K(e,t,assert$1.isFinite,!0).to.be.finite},assert$1.isBoolean=function(e,t){new K(e,t,assert$1.isBoolean,!0).to.be.a(`boolean`)},assert$1.isNotBoolean=function(e,t){new K(e,t,assert$1.isNotBoolean,!0).to.not.be.a(`boolean`)},assert$1.typeOf=function(e,t,r){new K(e,r,assert$1.typeOf,!0).to.be.a(t)},assert$1.notTypeOf=function(e,t,r){new K(e,r,assert$1.notTypeOf,!0).to.not.be.a(t)},assert$1.instanceOf=function(e,t,r){new K(e,r,assert$1.instanceOf,!0).to.be.instanceOf(t)},assert$1.notInstanceOf=function(e,t,r){new K(e,r,assert$1.notInstanceOf,!0).to.not.be.instanceOf(t)},assert$1.include=function(e,t,r){new K(e,r,assert$1.include,!0).include(t)},assert$1.notInclude=function(e,t,r){new K(e,r,assert$1.notInclude,!0).not.include(t)},assert$1.deepInclude=function(e,t,r){new K(e,r,assert$1.deepInclude,!0).deep.include(t)},assert$1.notDeepInclude=function(e,t,r){new K(e,r,assert$1.notDeepInclude,!0).not.deep.include(t)},assert$1.nestedInclude=function(e,t,r){new K(e,r,assert$1.nestedInclude,!0).nested.include(t)},assert$1.notNestedInclude=function(e,t,r){new K(e,r,assert$1.notNestedInclude,!0).not.nested.include(t)},assert$1.deepNestedInclude=function(e,t,r){new K(e,r,assert$1.deepNestedInclude,!0).deep.nested.include(t)},assert$1.notDeepNestedInclude=function(e,t,r){new K(e,r,assert$1.notDeepNestedInclude,!0).not.deep.nested.include(t)},assert$1.ownInclude=function(e,t,r){new K(e,r,assert$1.ownInclude,!0).own.include(t)},assert$1.notOwnInclude=function(e,t,r){new K(e,r,assert$1.notOwnInclude,!0).not.own.include(t)},assert$1.deepOwnInclude=function(e,t,r){new K(e,r,assert$1.deepOwnInclude,!0).deep.own.include(t)},assert$1.notDeepOwnInclude=function(e,t,r){new K(e,r,assert$1.notDeepOwnInclude,!0).not.deep.own.include(t)},assert$1.match=function(e,t,r){new K(e,r,assert$1.match,!0).to.match(t)},assert$1.notMatch=function(e,t,r){new K(e,r,assert$1.notMatch,!0).to.not.match(t)},assert$1.property=function(e,t,r){new K(e,r,assert$1.property,!0).to.have.property(t)},assert$1.notProperty=function(e,t,r){new K(e,r,assert$1.notProperty,!0).to.not.have.property(t)},assert$1.propertyVal=function(e,t,r,o){new K(e,o,assert$1.propertyVal,!0).to.have.property(t,r)},assert$1.notPropertyVal=function(e,t,r,o){new K(e,o,assert$1.notPropertyVal,!0).to.not.have.property(t,r)},assert$1.deepPropertyVal=function(e,t,r,o){new K(e,o,assert$1.deepPropertyVal,!0).to.have.deep.property(t,r)},assert$1.notDeepPropertyVal=function(e,t,r,o){new K(e,o,assert$1.notDeepPropertyVal,!0).to.not.have.deep.property(t,r)},assert$1.ownProperty=function(e,t,r){new K(e,r,assert$1.ownProperty,!0).to.have.own.property(t)},assert$1.notOwnProperty=function(e,t,r){new K(e,r,assert$1.notOwnProperty,!0).to.not.have.own.property(t)},assert$1.ownPropertyVal=function(e,t,r,o){new K(e,o,assert$1.ownPropertyVal,!0).to.have.own.property(t,r)},assert$1.notOwnPropertyVal=function(e,t,r,o){new K(e,o,assert$1.notOwnPropertyVal,!0).to.not.have.own.property(t,r)},assert$1.deepOwnPropertyVal=function(e,t,r,o){new K(e,o,assert$1.deepOwnPropertyVal,!0).to.have.deep.own.property(t,r)},assert$1.notDeepOwnPropertyVal=function(e,t,r,o){new K(e,o,assert$1.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,r)},assert$1.nestedProperty=function(e,t,r){new K(e,r,assert$1.nestedProperty,!0).to.have.nested.property(t)},assert$1.notNestedProperty=function(e,t,r){new K(e,r,assert$1.notNestedProperty,!0).to.not.have.nested.property(t)},assert$1.nestedPropertyVal=function(e,t,r,o){new K(e,o,assert$1.nestedPropertyVal,!0).to.have.nested.property(t,r)},assert$1.notNestedPropertyVal=function(e,t,r,o){new K(e,o,assert$1.notNestedPropertyVal,!0).to.not.have.nested.property(t,r)},assert$1.deepNestedPropertyVal=function(e,t,r,o){new K(e,o,assert$1.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,r)},assert$1.notDeepNestedPropertyVal=function(e,t,r,o){new K(e,o,assert$1.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,r)},assert$1.lengthOf=function(e,t,r){new K(e,r,assert$1.lengthOf,!0).to.have.lengthOf(t)},assert$1.hasAnyKeys=function(e,t,r){new K(e,r,assert$1.hasAnyKeys,!0).to.have.any.keys(t)},assert$1.hasAllKeys=function(e,t,r){new K(e,r,assert$1.hasAllKeys,!0).to.have.all.keys(t)},assert$1.containsAllKeys=function(e,t,r){new K(e,r,assert$1.containsAllKeys,!0).to.contain.all.keys(t)},assert$1.doesNotHaveAnyKeys=function(e,t,r){new K(e,r,assert$1.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)},assert$1.doesNotHaveAllKeys=function(e,t,r){new K(e,r,assert$1.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)},assert$1.hasAnyDeepKeys=function(e,t,r){new K(e,r,assert$1.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)},assert$1.hasAllDeepKeys=function(e,t,r){new K(e,r,assert$1.hasAllDeepKeys,!0).to.have.all.deep.keys(t)},assert$1.containsAllDeepKeys=function(e,t,r){new K(e,r,assert$1.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)},assert$1.doesNotHaveAnyDeepKeys=function(e,t,r){new K(e,r,assert$1.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)},assert$1.doesNotHaveAllDeepKeys=function(e,t,r){new K(e,r,assert$1.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)},assert$1.throws=function(e,t,r,o){return(typeof t==`string`||t instanceof RegExp)&&(r=t,t=null),flag(new K(e,o,assert$1.throws,!0).to.throw(t,r),`object`)},assert$1.doesNotThrow=function(e,t,r,o){(typeof t==`string`||t instanceof RegExp)&&(r=t,t=null),new K(e,o,assert$1.doesNotThrow,!0).to.not.throw(t,r)},assert$1.operator=function(e,t,r,o){let s;switch(t){case`==`:s=e==r;break;case`===`:s=e===r;break;case`>`:s=e>r;break;case`>=`:s=e>=r;break;case`<`:s=e<r;break;case`<=`:s=e<=r;break;case`!=`:s=e!=r;break;case`!==`:s=e!==r;break;default:throw o&&=o+`: `,new U(o+`Invalid operator "`+t+`"`,void 0,assert$1.operator)}let c=new K(s,o,assert$1.operator,!0);c.assert(!0===flag(c,`object`),`expected `+inspect2(e)+` to be `+t+` `+inspect2(r),`expected `+inspect2(e)+` to not be `+t+` `+inspect2(r))},assert$1.closeTo=function(e,t,r,o){new K(e,o,assert$1.closeTo,!0).to.be.closeTo(t,r)},assert$1.approximately=function(e,t,r,o){new K(e,o,assert$1.approximately,!0).to.be.approximately(t,r)},assert$1.sameMembers=function(e,t,r){new K(e,r,assert$1.sameMembers,!0).to.have.same.members(t)},assert$1.notSameMembers=function(e,t,r){new K(e,r,assert$1.notSameMembers,!0).to.not.have.same.members(t)},assert$1.sameDeepMembers=function(e,t,r){new K(e,r,assert$1.sameDeepMembers,!0).to.have.same.deep.members(t)},assert$1.notSameDeepMembers=function(e,t,r){new K(e,r,assert$1.notSameDeepMembers,!0).to.not.have.same.deep.members(t)},assert$1.sameOrderedMembers=function(e,t,r){new K(e,r,assert$1.sameOrderedMembers,!0).to.have.same.ordered.members(t)},assert$1.notSameOrderedMembers=function(e,t,r){new K(e,r,assert$1.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)},assert$1.sameDeepOrderedMembers=function(e,t,r){new K(e,r,assert$1.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)},assert$1.notSameDeepOrderedMembers=function(e,t,r){new K(e,r,assert$1.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)},assert$1.includeMembers=function(e,t,r){new K(e,r,assert$1.includeMembers,!0).to.include.members(t)},assert$1.notIncludeMembers=function(e,t,r){new K(e,r,assert$1.notIncludeMembers,!0).to.not.include.members(t)},assert$1.includeDeepMembers=function(e,t,r){new K(e,r,assert$1.includeDeepMembers,!0).to.include.deep.members(t)},assert$1.notIncludeDeepMembers=function(e,t,r){new K(e,r,assert$1.notIncludeDeepMembers,!0).to.not.include.deep.members(t)},assert$1.includeOrderedMembers=function(e,t,r){new K(e,r,assert$1.includeOrderedMembers,!0).to.include.ordered.members(t)},assert$1.notIncludeOrderedMembers=function(e,t,r){new K(e,r,assert$1.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)},assert$1.includeDeepOrderedMembers=function(e,t,r){new K(e,r,assert$1.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)},assert$1.notIncludeDeepOrderedMembers=function(e,t,r){new K(e,r,assert$1.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)},assert$1.oneOf=function(e,t,r){new K(e,r,assert$1.oneOf,!0).to.be.oneOf(t)},assert$1.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${inspect2(e)} to be an iterable`:`expected ${inspect2(e)} to be an iterable`,new U(t,void 0,assert$1.isIterable)},assert$1.changes=function(e,t,r,o){arguments.length===3&&typeof t==`function`&&(o=r,r=null),new K(e,o,assert$1.changes,!0).to.change(t,r)},assert$1.changesBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new K(e,s,assert$1.changesBy,!0).to.change(t,r).by(o)},assert$1.doesNotChange=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new K(e,o,assert$1.doesNotChange,!0).to.not.change(t,r)},assert$1.changesButNotBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new K(e,s,assert$1.changesButNotBy,!0).to.change(t,r).but.not.by(o)},assert$1.increases=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new K(e,o,assert$1.increases,!0).to.increase(t,r)},assert$1.increasesBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new K(e,s,assert$1.increasesBy,!0).to.increase(t,r).by(o)},assert$1.doesNotIncrease=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new K(e,o,assert$1.doesNotIncrease,!0).to.not.increase(t,r)},assert$1.increasesButNotBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new K(e,s,assert$1.increasesButNotBy,!0).to.increase(t,r).but.not.by(o)},assert$1.decreases=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new K(e,o,assert$1.decreases,!0).to.decrease(t,r)},assert$1.decreasesBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new K(e,s,assert$1.decreasesBy,!0).to.decrease(t,r).by(o)},assert$1.doesNotDecrease=function(e,t,r,o){return arguments.length===3&&typeof t==`function`&&(o=r,r=null),new K(e,o,assert$1.doesNotDecrease,!0).to.not.decrease(t,r)},assert$1.doesNotDecreaseBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);return new K(e,s,assert$1.doesNotDecreaseBy,!0).to.not.decrease(t,r).by(o)},assert$1.decreasesButNotBy=function(e,t,r,o,s){if(arguments.length===4&&typeof t==`function`){let e=o;o=r,s=e}else arguments.length===3&&(o=r,r=null);new K(e,s,assert$1.decreasesButNotBy,!0).to.decrease(t,r).but.not.by(o)},assert$1.ifError=function(e){if(e)throw e},assert$1.isExtensible=function(e,t){new K(e,t,assert$1.isExtensible,!0).to.be.extensible},assert$1.isNotExtensible=function(e,t){new K(e,t,assert$1.isNotExtensible,!0).to.not.be.extensible},assert$1.isSealed=function(e,t){new K(e,t,assert$1.isSealed,!0).to.be.sealed},assert$1.isNotSealed=function(e,t){new K(e,t,assert$1.isNotSealed,!0).to.not.be.sealed},assert$1.isFrozen=function(e,t){new K(e,t,assert$1.isFrozen,!0).to.be.frozen},assert$1.isNotFrozen=function(e,t){new K(e,t,assert$1.isNotFrozen,!0).to.not.be.frozen},assert$1.isEmpty=function(e,t){new K(e,t,assert$1.isEmpty,!0).to.be.empty},assert$1.isNotEmpty=function(e,t){new K(e,t,assert$1.isNotEmpty,!0).to.not.be.empty},assert$1.containsSubset=function(e,t,r){new K(e,r).to.containSubset(t)},assert$1.doesNotContainSubset=function(e,t,r){new K(e,r).to.not.containSubset(t)};for(let[e,t]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`]])assert$1[t]=assert$1[e];var Bn=[];function use(e){let t={use,AssertionError:U,util:V,config:G,expect,assert:assert$1,Assertion:K,...Ln};return~Bn.indexOf(e)||(e(t,V),Bn.push(e)),t}__name(use,`use`);const ChaiStyleAssertions=(e,t)=>{function defProperty(r,o){t.addProperty(e.Assertion.prototype,r,function(){let t=e.Assertion.prototype[o];if(!t)throw Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return t.call(this)})}function defPropertyWithArgs(r,o,...s){t.addProperty(e.Assertion.prototype,r,function(){let t=e.Assertion.prototype[o];if(!t)throw Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return t.call(this,...s)})}function defMethod(r,o){t.addMethod(e.Assertion.prototype,r,function(...t){let r=e.Assertion.prototype[o];if(!r)throw Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return r.call(this,...t)})}defProperty(`called`,`toHaveBeenCalled`),defProperty(`calledOnce`,`toHaveBeenCalledOnce`),defPropertyWithArgs(`calledTwice`,`toHaveBeenCalledTimes`,2),defPropertyWithArgs(`calledThrice`,`toHaveBeenCalledTimes`,3),defMethod(`callCount`,`toHaveBeenCalledTimes`),defMethod(`calledWith`,`toHaveBeenCalledWith`),defMethod(`calledOnceWith`,`toHaveBeenCalledExactlyOnceWith`),defMethod(`lastCalledWith`,`toHaveBeenLastCalledWith`),defMethod(`nthCalledWith`,`toHaveBeenNthCalledWith`),defMethod(`returned`,`toHaveReturned`),defMethod(`returnedWith`,`toHaveReturnedWith`),defMethod(`returnedTimes`,`toHaveReturnedTimes`),defMethod(`lastReturnedWith`,`toHaveLastReturnedWith`),defMethod(`nthReturnedWith`,`toHaveNthReturnedWith`),defMethod(`calledBefore`,`toHaveBeenCalledBefore`),defMethod(`calledAfter`,`toHaveBeenCalledAfter`)},Vn=Symbol.for(`matchers-object`),J=Symbol.for(`$$jest-matchers-object`),Hn=Symbol.for(`expect-global`),Un=Symbol.for(`asymmetric-matchers-object`),Wn={toSatisfy(e,t,r){let{printReceived:o,printExpected:s,matcherHint:c}=this.utils,u=t(e);return{pass:u,message:()=>u?`\
51
71
  ${c(`.not.toSatisfy`,`received`,``)}
52
72
 
53
73
  Expected value to not satisfy:
@@ -73,8 +93,8 @@ Expected value to be one of:
73
93
  ${c(t)}
74
94
 
75
95
  Received:
76
- ${s(e)}`}}},Kn=o.green,qn=o.red,Jn=o.inverse,Yn=o.bold,J=o.dim;function matcherHint(e,t=`received`,r=`expected`,o={}){let{comment:s=``,isDirectExpectCall:c=!1,isNot:u=!1,promise:d=``,secondArgument:p=``,expectedColor:m=Kn,receivedColor:h=qn,secondArgumentColor:g=Kn}=o,_=``,y=`expect`;return!c&&t!==``&&(_+=J(`${y}(`)+h(t),y=`)`),d!==``&&(_+=J(`${y}.`)+d,y=``),u&&(_+=`${J(`${y}.`)}not`,y=``),e.includes(`.`)?y+=e:(_+=J(`${y}.`)+e,y=``),r===``?y+=`()`:(_+=J(`${y}(`)+m(r),p&&(_+=J(`, `)+g(p)),y=`)`),s!==``&&(y+=` // ${s}`),y!==``&&(_+=J(y)),_}function replaceTrailingSpaces(e){return e.replace(/\s+$/gm,e=>`·`.repeat(e.length))}function printReceived(e){return qn(replaceTrailingSpaces(stringify(e)))}function printExpected(e){return Kn(replaceTrailingSpaces(stringify(e)))}function getMatcherUtils(){return{EXPECTED_COLOR:Kn,RECEIVED_COLOR:qn,INVERTED_COLOR:Jn,BOLD_WEIGHT:Yn,DIM_COLOR:J,diff,matcherHint,printReceived,printExpected,printDiffOrStringify,printWithType}}function printWithType(e,t,r){let o=getType$1(t);return(o!==`null`&&o!==`undefined`?`${e} has type: ${o}\n`:``)+`${e} has value: ${r(t)}`}function addCustomEqualityTesters(e){if(!Array.isArray(e))throw TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${getType$1(e)}"`);globalThis[q].customEqualityTesters.push(...e)}function getCustomEqualityTesters(){return globalThis[q].customEqualityTesters}function equals(e,t,r,o){return r||=[],eq(e,t,[],[],r,o?hasKey:hasDefinedKey)}Function.prototype.toString;function isAsymmetric(e){return!!e&&typeof e==`object`&&`asymmetricMatch`in e&&isA(`Function`,e.asymmetricMatch)}function asymmetricMatch(e,t,r){let o=isAsymmetric(e),s=isAsymmetric(t);if(!(o&&s)){if(o)return e.asymmetricMatch(t,r);if(s)return t.asymmetricMatch(e,r)}}function isError(e){if(typeof Error.isError==`function`)return Error.isError(e);switch(Object.prototype.toString.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:return!0;default:return e instanceof Error}}function eq(e,t,r,o,s,c){let u=!0,d=asymmetricMatch(e,t,s);if(d!==void 0)return d;let p={equals};for(let r=0;r<s.length;r++){let o=s[r].call(p,e,t,s);if(o!==void 0)return o}if(typeof URL==`function`&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;let m=Object.prototype.toString.call(e);if(m!==Object.prototype.toString.call(t))return!1;switch(m){case`[object Boolean]`:case`[object String]`:case`[object Number]`:return typeof e==typeof t?typeof e!=`object`&&typeof t!=`object`?Object.is(e,t):Object.is(e.valueOf(),t.valueOf()):!1;case`[object Date]`:{let r=+e,o=+t;return r===o||Number.isNaN(r)&&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(typeof e!=`object`||typeof t!=`object`)return!1;if(isDomNode(e)&&isDomNode(t))return e.isEqualNode(t);let h=r.length;for(;h--;)if(r[h]===e)return o[h]===t;else if(o[h]===t)return!1;if(r.push(e),o.push(t),m===`[object Array]`&&e.length!==t.length)return!1;if(isError(e)&&isError(t))try{return isErrorEqual(e,t,r,o,s,c)}finally{r.pop(),o.pop()}let g=keys(e,c),_,y=g.length;if(keys(t,c).length!==y)return!1;for(;y--;)if(_=g[y],u=c(t,_)&&eq(e[_],t[_],r,o,s,c),!u)return!1;return r.pop(),o.pop(),u}function isErrorEqual(e,t,r,o,s,c){let u=Object.prototype.toString.call(e)===Object.prototype.toString.call(t)&&e.name===t.name&&e.message===t.message;return t.cause!==void 0&&(u&&=eq(e.cause,t.cause,r,o,s,c)),e instanceof AggregateError&&t instanceof AggregateError&&(u&&=eq(e.errors,t.errors,r,o,s,c)),u&&=eq({...e},{...t},r,o,s,c),u}function keys(e,t){let r=[];for(let o in e)t(e,o)&&r.push(o);return r.concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable))}function hasDefinedKey(e,t){return hasKey(e,t)&&e[t]!==void 0}function hasKey(e,t){return Object.hasOwn(e,t)}function isA(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function isDomNode(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`&&`nodeName`in e&&typeof e.nodeName==`string`&&`isEqualNode`in e&&typeof e.isEqualNode==`function`}const Xn=`@@__IMMUTABLE_KEYED__@@`,Zn=`@@__IMMUTABLE_SET__@@`,Y=`@@__IMMUTABLE_ORDERED__@@`;function isImmutableUnorderedKeyed(e){return!!(e&&e[Xn]&&!e[Y])}function isImmutableUnorderedSet(e){return!!(e&&e[Zn]&&!e[Y])}function isObjectLiteral(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function isImmutableList(e){return!!(e&&isObjectLiteral(e)&&e[`@@__IMMUTABLE_LIST__@@`])}function isImmutableOrderedKeyed(e){return!!(e&&isObjectLiteral(e)&&e[Xn]&&e[Y])}function isImmutableOrderedSet(e){return!!(e&&isObjectLiteral(e)&&e[Zn]&&e[Y])}function isImmutableRecord(e){return!!(e&&isObjectLiteral(e)&&e[`@@__IMMUTABLE_RECORD__@@`])}const Qn=Symbol.iterator;function hasIterator(e){return!!(e!=null&&e[Qn])}function iterableEquality(e,t,r=[],o=[],s=[]){if(typeof e!=`object`||typeof t!=`object`||Array.isArray(e)||Array.isArray(t)||!hasIterator(e)||!hasIterator(t))return;if(e.constructor!==t.constructor)return!1;let c=o.length;for(;c--;)if(o[c]===e)return s[c]===t;o.push(e),s.push(t);let u=[...r.filter(e=>e!==iterableEquality),iterableEqualityWithStack];function iterableEqualityWithStack(e,t){return iterableEquality(e,t,[...r],[...o],[...s])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(isA(`Set`,e)||isImmutableUnorderedSet(e)){let r=!0;for(let o of e)if(!t.has(o)){let e=!1;for(let r of t)equals(o,r,u)===!0&&(e=!0);if(e===!1){r=!1;break}}return o.pop(),s.pop(),r}else if(isA(`Map`,e)||isImmutableUnorderedKeyed(e)){let r=!0;for(let o of e)if(!t.has(o[0])||!equals(o[1],t.get(o[0]),u)){let e=!1;for(let r of t){let t=equals(o[0],r[0],u),s=!1;t===!0&&(s=equals(o[1],r[1],u)),s===!0&&(e=!0)}if(e===!1){r=!1;break}}return o.pop(),s.pop(),r}}let d=t[Qn]();for(let t of e){let e=d.next();if(e.done||!equals(t,e.value,u))return!1}return!d.next().done||!isImmutableList(e)&&!isImmutableOrderedKeyed(e)&&!isImmutableOrderedSet(e)&&!isImmutableRecord(e)&&!equals(Object.entries(e),Object.entries(t),u)?!1:(o.pop(),s.pop(),!0)}function hasPropertyInObject(e,t){return!e||typeof e!=`object`||e===Object.prototype?!1:Object.hasOwn(e,t)||hasPropertyInObject(Object.getPrototypeOf(e),t)}function isObjectWithKeys(e){return isObject(e)&&!isError(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}function subsetEquality(e,t,r=[]){let o=r.filter(e=>e!==subsetEquality),subsetEqualityWithContext=(e=new WeakMap)=>(t,r)=>{if(isObjectWithKeys(r))return Object.keys(r).every(s=>{if(r[s]!=null&&typeof r[s]==`object`){if(e.has(r[s]))return equals(t[s],r[s],o);e.set(r[s],!0)}let c=t!=null&&hasPropertyInObject(t,s)&&equals(t[s],r[s],[...o,subsetEqualityWithContext(e)]);return e.delete(r[s]),c})};return subsetEqualityWithContext()(e,t)}function typeEquality(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function arrayBufferEquality(e,t){let r=e,o=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{r=new DataView(e),o=new DataView(t)}catch{return}}if(r.byteLength!==o.byteLength)return!1;for(let e=0;e<r.byteLength;e++)if(r.getUint8(e)!==o.getUint8(e))return!1;return!0}function sparseArrayEquality(e,t,r=[]){if(!Array.isArray(e)||!Array.isArray(t))return;let o=Object.keys(e),s=Object.keys(t);return equals(e,t,r.filter(e=>e!==sparseArrayEquality),!0)&&equals(o,s)}function generateToBeMessage(e,t=`#{this}`,r=`#{exp}`){let o=`expected ${t} to be ${r} // 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}function pluralize(e,t){return`${t} ${e}${t===1?``:`s`}`}function getObjectKeys(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}function getObjectSubset(e,t,r){let o=0,getObjectSubsetWithContext=(e=new WeakMap)=>(t,s)=>{if(Array.isArray(t)){if(Array.isArray(s)&&s.length===t.length)return s.map((r,o)=>getObjectSubsetWithContext(e)(t[o],r))}else if(t instanceof Date)return t;else if(isObject(t)&&isObject(s)){if(equals(t,s,[...r,iterableEquality,subsetEquality]))return s;let c={};e.set(t,c),typeof t.constructor==`function`&&typeof t.constructor.name==`string`&&Object.defineProperty(c,`constructor`,{enumerable:!1,value:t.constructor});for(let r of getObjectKeys(t))hasPropertyInObject(s,r)?c[r]=e.has(t[r])?e.get(t[r]):getObjectSubsetWithContext(e)(t[r],s[r]):e.has(t[r])||(o+=1,isObject(t[r])&&(o+=getObjectKeys(t[r]).length),getObjectSubsetWithContext(e)(t[r],s[r]));if(getObjectKeys(c).length>0)return c}return t};return{subset:getObjectSubsetWithContext()(e,t),stripped:o}}function isStandardSchema(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&e[`~standard`]&&typeof e[`~standard`].validate==`function`}if(!Object.hasOwn(globalThis,K)){let e=new WeakMap,t=Object.create(null),r=[],o=Object.create(null);Object.defineProperty(globalThis,K,{get:()=>e}),Object.defineProperty(globalThis,q,{configurable:!0,get:()=>({state:e.get(globalThis[Un]),matchers:t,customEqualityTesters:r})}),Object.defineProperty(globalThis,Wn,{get:()=>o})}function getState(e){return globalThis[K].get(e)}function setState(e,t){let r=globalThis[K],o=r.get(t)||{},s=Object.defineProperties(o,{...Object.getOwnPropertyDescriptors(o),...Object.getOwnPropertyDescriptors(e)});r.set(t,s)}var AsymmetricMatcher$1=class{static{e(this,`AsymmetricMatcher`)}$$typeof=Symbol.for(`jest.asymmetricMatcher`);constructor(e,t=!1){this.sample=e,this.inverse=t}getMatcherContext(e){return{...getState(e||globalThis[Un]),equals,isNot:this.inverse,customTesters:getCustomEqualityTesters(),utils:{...getMatcherUtils(),diff,stringify,iterableEquality,subsetEquality}}}};AsymmetricMatcher$1.prototype[Symbol.for(`chai/inspect`)]=function(e){let t=stringify(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};var StringContaining=class extends AsymmetricMatcher$1{constructor(e,t=!1){if(!isA(`String`,e))throw Error(`Expected is not a string`);super(e,t)}asymmetricMatch(e){let t=isA(`String`,e)&&e.includes(this.sample);return this.inverse?!t:t}toString(){return`String${this.inverse?`Not`:``}Containing`}getExpectedType(){return`string`}},Anything=class extends AsymmetricMatcher$1{asymmetricMatch(e){return e!=null}toString(){return`Anything`}toAsymmetricMatcher(){return`Anything`}},ObjectContaining=class extends AsymmetricMatcher$1{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)?!0:this.hasProperty(this.getPrototype(e),t):!1}getProperties(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}asymmetricMatch(e,t){if(typeof this.sample!=`object`)throw TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=!0,o=this.getProperties(this.sample);for(let s of o){if(!this.hasProperty(e,s)){r=!1;break}let o=this.sample[s],c=e[s];if(!equals(o,c,t)){r=!1;break}}return this.inverse?!r:r}toString(){return`Object${this.inverse?`Not`:``}Containing`}getExpectedType(){return`object`}},ArrayContaining=class extends AsymmetricMatcher$1{constructor(e,t=!1){super(e,t)}asymmetricMatch(e,t){if(!Array.isArray(this.sample))throw TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let r=this.sample.length===0||Array.isArray(e)&&this.sample.every(r=>e.some(e=>equals(r,e,t)));return this.inverse?!r:r}toString(){return`Array${this.inverse?`Not`:``}Containing`}getExpectedType(){return`array`}},Any=class extends AsymmetricMatcher$1{constructor(e){if(e===void 0)throw 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;let 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?typeof e==`string`||e instanceof String:this.sample===Number?typeof e==`number`||e instanceof Number:this.sample===Function?typeof e==`function`||typeof e==`function`:this.sample===Boolean?typeof e==`boolean`||e instanceof Boolean:this.sample===BigInt?typeof e==`bigint`||e instanceof BigInt:this.sample===Symbol?typeof e==`symbol`||e instanceof Symbol:this.sample===Object?typeof e==`object`: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)}>`}},StringMatching=class extends AsymmetricMatcher$1{constructor(e,t=!1){if(!isA(`String`,e)&&!isA(`RegExp`,e))throw Error(`Expected is not a String or a RegExp`);super(new RegExp(e),t)}asymmetricMatch(e){let t=isA(`String`,e)&&this.sample.test(e);return this.inverse?!t:t}toString(){return`String${this.inverse?`Not`:``}Matching`}getExpectedType(){return`string`}},CloseTo=class extends AsymmetricMatcher$1{precision;constructor(e,t=2,r=!1){if(!isA(`Number`,e))throw Error(`Expected is not a Number`);if(!isA(`Number`,t))throw Error(`Precision is not a Number`);super(e),this.inverse=r,this.precision=t}asymmetricMatch(e){if(!isA(`Number`,e))return!1;let t=!1;return t=e===1/0&&this.sample===1/0||e===-1/0&&this.sample===-1/0?!0: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,`(${pluralize(`digit`,this.precision)})`].join(` `)}},SchemaMatching=class extends AsymmetricMatcher$1{result;constructor(e,t=!1){if(!isStandardSchema(e))throw TypeError(`SchemaMatching expected to receive a Standard Schema.`);super(e,t)}asymmetricMatch(e){let t=this.sample[`~standard`].validate(e);if(t instanceof Promise)throw TypeError(`Async schema validation is not supported in asymmetric matchers.`);this.result=t;let r=!this.result.issues||this.result.issues.length===0;return this.inverse?!r:r}toString(){return`Schema${this.inverse?`Not`:``}Matching`}getExpectedType(){return`object`}toAsymmetricMatcher(){let{utils:e}=this.getMatcherContext();return(this.result?.issues||[]).length>0?`${this.toString()} ${e.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}};const JestAsymmetricMatchers=(e,t)=>{t.addMethod(e.expect,`anything`,()=>new Anything),t.addMethod(e.expect,`any`,e=>new Any(e)),t.addMethod(e.expect,`stringContaining`,e=>new StringContaining(e)),t.addMethod(e.expect,`objectContaining`,e=>new ObjectContaining(e)),t.addMethod(e.expect,`arrayContaining`,e=>new ArrayContaining(e)),t.addMethod(e.expect,`stringMatching`,e=>new StringMatching(e)),t.addMethod(e.expect,`closeTo`,(e,t)=>new CloseTo(e,t)),t.addMethod(e.expect,`schemaMatching`,e=>new SchemaMatching(e)),e.expect.not={stringContaining:e=>new StringContaining(e,!0),objectContaining:e=>new ObjectContaining(e,!0),arrayContaining:e=>new ArrayContaining(e,!0),stringMatching:e=>new StringMatching(e,!0),closeTo:(e,t)=>new CloseTo(e,t,!0),schemaMatching:e=>new SchemaMatching(e,!0)}};function createAssertionMessage(e,t,r){let o=e.flag(t,`soft`)?`.soft`:``,s=e.flag(t,`negate`)?`not.`:``,c=`${e.flag(t,`_name`)}(${r?`expected`:``})`,u=e.flag(t,`promise`);return`expect${o}(actual)${u?`.${u}`:``}.${s}${c}`}function recordAsyncExpect(e,t,r,o,s){let c=e;if(c&&t instanceof Promise){t=t.finally(()=>{if(!c.promises)return;let e=c.promises.indexOf(t);e!==-1&&c.promises.splice(e,1)}),c.promises||=[],s&&(t=t.then(noop,e=>{handleTestError(c,e)})),c.promises.push(t);let e=!1;return c.onFinished??=[],c.onFinished.push(()=>{if(!e){let e=(globalThis.__vitest_worker__?.onFilterStackTrace||(e=>e||``))(o.stack);console.warn([`Promise returned by \`${r}\` was not awaited. `,`Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in the next Vitest major. `,`Please remember to await the assertion.
77
- `,e].join(``))}}),{then(r,o){return e=!0,t.then(r,o)},catch(r){return e=!0,t.catch(r)},finally(r){return e=!0,t.finally(r)},[Symbol.toStringTag]:`Promise`}}return t}function handleTestError(e,t){e.result||={state:`fail`},e.result.state=`fail`,e.result.errors||=[],e.result.errors.push(processError(t))}function wrapAssertion(e,t,r){return function(...o){if(t!==`withTest`&&e.flag(this,`_name`,t),!e.flag(this,`soft`))try{return r.apply(this,o)}finally{}let s=e.flag(this,`vitest-test`);if(!s)throw Error(`expect.soft() can only be used inside a test`);try{let e=r.apply(this,o);return e&&typeof e==`object`&&typeof e.then==`function`?e.then(noop,e=>{handleTestError(s,e)}):e}catch(e){handleTestError(s,e)}}}const JestChaiExpect=(e,t)=>{let{AssertionError:r}=e,o=getCustomEqualityTesters();function def(r,o){let addMethod=r=>{let s=wrapAssertion(t,r,o);t.addMethod(e.Assertion.prototype,r,s),t.addMethod(globalThis[q].matchers,r,s)};Array.isArray(r)?r.forEach(e=>addMethod(e)):addMethod(r)}[`throw`,`throws`,`Throw`].forEach(o=>{t.overwriteMethod(e.Assertion.prototype,o,e=>function(...o){let s=t.flag(this,`promise`),c=t.flag(this,`object`),u=t.flag(this,`negate`);if(s===`rejects`)t.flag(this,`object`,()=>{throw c});else if(s===`resolves`&&typeof c!=`function`){if(u)return;throw new r(t.flag(this,`message`)||`expected promise to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}e.apply(this,o)})}),def(`withTest`,function(e){return t.flag(this,`vitest-test`,e),this}),def(`toEqual`,function(e){let r=t.flag(this,`object`),s=equals(r,e,[...o,iterableEquality]);return this.assert(s,`expected #{this} to deeply equal #{exp}`,`expected #{this} to not deeply equal #{exp}`,e,r)}),def(`toStrictEqual`,function(e){let r=t.flag(this,`object`),s=equals(r,e,[...o,iterableEquality,typeEquality,sparseArrayEquality,arrayBufferEquality],!0);return this.assert(s,`expected #{this} to strictly equal #{exp}`,`expected #{this} to not strictly equal #{exp}`,e,r)}),def(`toBe`,function(e){let t=this._obj,r=Object.is(t,e),s=``;return r||(equals(t,e,[...o,iterableEquality,typeEquality,sparseArrayEquality,arrayBufferEquality],!0)?s=`toStrictEqual`:equals(t,e,[...o,iterableEquality])&&(s=`toEqual`)),this.assert(r,generateToBeMessage(s),`expected #{this} not to be #{exp} // Object.is equality`,e,t)}),def(`toMatchObject`,function(e){let s=this._obj,c=equals(s,e,[...o,iterableEquality,subsetEquality]),u=t.flag(this,`negate`),{subset:d,stripped:p}=getObjectSubset(s,e,o);if(c&&u||!c&&!u){let o=t.getMessage(this,[c,`expected #{this} to match object #{exp}`,`expected #{this} to not match object #{exp}`,e,d,!1]);throw new r(p===0?o:`${o}\n(${p} matching ${p===1?`property`:`properties`} omitted from actual)`,{showDiff:!0,expected:e,actual:d})}}),def(`toMatch`,function(e){let t=this._obj;if(typeof t!=`string`)throw TypeError(`.toMatch() expects to receive a string, but got ${typeof t}`);return this.assert(typeof e==`string`?t.includes(e):t.match(e),`expected #{this} to match #{exp}`,`expected #{this} not to match #{exp}`,e,t)}),def(`toContain`,function(e){let r=this._obj;if(typeof Node<`u`&&r instanceof Node){if(!(e instanceof Node))throw TypeError(`toContain() expected a DOM node as the argument, but got ${typeof e}`);return this.assert(r.contains(e),`expected #{this} to contain element #{exp}`,`expected #{this} not to contain element #{exp}`,e,r)}if(typeof DOMTokenList<`u`&&r instanceof DOMTokenList){assertTypes(e,`class name`,[`string`]);let o=t.flag(this,`negate`)?r.value.replace(e,``).trim():`${r.value} ${e}`;return this.assert(r.contains(e),`expected "${r.value}" to contain "${e}"`,`expected "${r.value}" not to contain "${e}"`,o,r.value)}return typeof r==`string`&&typeof e==`string`?this.assert(r.includes(e),`expected #{this} to contain #{exp}`,`expected #{this} not to contain #{exp}`,e,r):(r!=null&&typeof r!=`string`&&t.flag(this,`object`,Array.from(r)),this.contain(e))}),def(`toContainEqual`,function(e){let r=t.flag(this,`object`),s=Array.from(r).findIndex(t=>equals(t,e,o));this.assert(s!==-1,`expected #{this} to deep equally contain #{exp}`,`expected #{this} to not deep equally contain #{exp}`,e)}),def(`toBeTruthy`,function(){let e=t.flag(this,`object`);this.assert(!!e,`expected #{this} to be truthy`,`expected #{this} to not be truthy`,!0,e)}),def(`toBeFalsy`,function(){let e=t.flag(this,`object`);this.assert(!e,`expected #{this} to be falsy`,`expected #{this} to not be falsy`,!1,e)}),def(`toBeGreaterThan`,function(e){let t=this._obj;return assertTypes(t,`actual`,[`number`,`bigint`]),assertTypes(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)}),def(`toBeGreaterThanOrEqual`,function(e){let t=this._obj;return assertTypes(t,`actual`,[`number`,`bigint`]),assertTypes(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)}),def(`toBeLessThan`,function(e){let t=this._obj;return assertTypes(t,`actual`,[`number`,`bigint`]),assertTypes(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)}),def(`toBeLessThanOrEqual`,function(e){let t=this._obj;return assertTypes(t,`actual`,[`number`,`bigint`]),assertTypes(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)}),def(`toBeNaN`,function(){let e=t.flag(this,`object`);this.assert(Number.isNaN(e),`expected #{this} to be NaN`,`expected #{this} not to be NaN`,NaN,e)}),def(`toBeUndefined`,function(){let e=t.flag(this,`object`);this.assert(e===void 0,`expected #{this} to be undefined`,`expected #{this} not to be undefined`,void 0,e)}),def(`toBeNull`,function(){let e=t.flag(this,`object`);this.assert(e===null,`expected #{this} to be null`,`expected #{this} not to be null`,null,e)}),def(`toBeNullable`,function(){let e=t.flag(this,`object`);this.assert(e==null,`expected #{this} to be nullish`,`expected #{this} not to be nullish`,null,e)}),def(`toBeDefined`,function(){let e=t.flag(this,`object`);this.assert(e!==void 0,`expected #{this} to be defined`,`expected #{this} to be undefined`,e)}),def(`toBeTypeOf`,function(e){let t=typeof this._obj,r=e===t;return this.assert(r,`expected #{this} to be type of #{exp}`,`expected #{this} not to be type of #{exp}`,e,t)}),def(`toBeInstanceOf`,function(e){return this.instanceOf(e)}),def(`toHaveLength`,function(e){return this.have.length(e)}),def(`toHaveProperty`,function(...e){Array.isArray(e[0])&&(e[0]=e[0].map(e=>String(e).replace(/([.[\]])/g,`\\$1`)).join(`.`));let r=this._obj,[s,c]=e,getValue=()=>Object.hasOwn(r,s)?{value:r[s],exists:!0}:t.getPathInfo(r,s),{value:u,exists:d}=getValue(),p=d&&(e.length===1||equals(c,u,o)),m=e.length===1?``:` with value ${t.objDisplay(c)}`;return this.assert(p,`expected #{this} to have property "${s}"${m}`,`expected #{this} to not have property "${s}"${m}`,c,d?u:void 0)}),def(`toBeCloseTo`,function(e,t=2){let r=this._obj,o=!1,s=0,c=0;return e===1/0&&r===1/0||e===-1/0&&r===-1/0?o=!0:(s=10**-t/2,c=Math.abs(r-e),o=c<s),this.assert(o,`expected #{this} to be close to #{exp}, received difference is ${c}, but expected ${s}`,`expected #{this} to not be close to #{exp}, received difference is ${c}, but expected ${s}`,e,r,!1)});function assertIsMock(e){if(!isMockFunction(e._obj))throw TypeError(`${t.inspect(e._obj)} is not a spy or a call to a spy!`)}function getSpy(e){return assertIsMock(e),e._obj}def([`toHaveBeenCalledTimes`,`toBeCalledTimes`],function(e){let t=getSpy(this),r=t.getMockName(),o=t.mock.calls.length;return this.assert(o===e,`expected "${r}" to be called #{exp} times, but got ${o} times`,`expected "${r}" to not be called #{exp} times`,e,o,!1)}),def(`toHaveBeenCalledOnce`,function(){let e=getSpy(this),t=e.getMockName(),r=e.mock.calls.length;return this.assert(r===1,`expected "${t}" to be called once, but got ${r} times`,`expected "${t}" to not be called once`,1,r,!1)}),def([`toHaveBeenCalled`,`toBeCalled`],function(){let e=getSpy(this),o=e.getMockName(),s=e.mock.calls.length,c=s>0,u=t.flag(this,`negate`),d=t.getMessage(this,[c,`expected "${o}" to be called at least once`,`expected "${o}" to not be called at all, but actually been called ${s} times`,!0,c]);if(c&&u&&(d=formatCalls(e,d)),c&&u||!c&&!u)throw new r(d)});function equalsArgumentArray(e,t){return e.length===t.length&&e.every((e,r)=>equals(e,t[r],[...o,iterableEquality]))}def([`toHaveBeenCalledWith`,`toBeCalledWith`],function(...e){let o=getSpy(this),s=o.getMockName(),c=o.mock.calls.some(t=>equalsArgumentArray(t,e)),u=t.flag(this,`negate`),d=t.getMessage(this,[c,`expected "${s}" to be called with arguments: #{exp}`,`expected "${s}" to not be called with arguments: #{exp}`,e]);if(c&&u||!c&&!u)throw new r(formatCalls(o,d,e))}),def(`toHaveBeenCalledExactlyOnceWith`,function(...e){let o=getSpy(this),s=o.getMockName(),c=o.mock.calls.length,u=o.mock.calls.some(t=>equalsArgumentArray(t,e))&&c===1,d=t.flag(this,`negate`),p=t.getMessage(this,[u,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,e]);if(u&&d||!u&&!d)throw new r(formatCalls(o,p,e))}),def(`toHaveBeenNthCalledWith`,function(e,...t){let r=getSpy(this),o=r.getMockName(),s=r.mock.calls[e-1],c=r.mock.calls.length,u=e<=c;this.assert(s&&equalsArgumentArray(s,t),`expected ${ordinal(e)} "${o}" call to have been called with #{exp}${u?``:`, but called only ${c} times`}`,`expected ${ordinal(e)} "${o}" call to not have been called with #{exp}`,t,s,u)}),def(`toHaveBeenLastCalledWith`,function(...e){let t=getSpy(this),r=t.getMockName(),o=t.mock.calls.at(-1);this.assert(o&&equalsArgumentArray(o,e),`expected last "${r}" call to have been called with #{exp}`,`expected last "${r}" call to not have been called with #{exp}`,e,o)});function isSpyCalledBeforeAnotherSpy(e,t,r){let o=e.mock.invocationCallOrder,s=t.mock.invocationCallOrder;return o.length===0?!r:s.length===0?!1:o[0]<s[0]}def([`toHaveBeenCalledBefore`],function(e,r=!0){let o=getSpy(this);if(!isMockFunction(e))throw TypeError(`${t.inspect(e)} is not a spy or a call to a spy`);this.assert(isSpyCalledBeforeAnotherSpy(o,e,r),`expected "${o.getMockName()}" to have been called before "${e.getMockName()}"`,`expected "${o.getMockName()}" to not have been called before "${e.getMockName()}"`,e,o)}),def([`toHaveBeenCalledAfter`],function(e,r=!0){let o=getSpy(this);if(!isMockFunction(e))throw TypeError(`${t.inspect(e)} is not a spy or a call to a spy`);this.assert(isSpyCalledBeforeAnotherSpy(e,o,r),`expected "${o.getMockName()}" to have been called after "${e.getMockName()}"`,`expected "${o.getMockName()}" to not have been called after "${e.getMockName()}"`,e,o)}),def([`toThrow`,`toThrowError`],function(e){if(typeof e==`string`||e===void 0||e instanceof RegExp)return this.throws(e===``?/^$/:e);let s=this._obj,c=t.flag(this,`promise`),u=t.flag(this,`negate`),d=null;if(c===`rejects`)d=s;else if(c===`resolves`&&typeof s!=`function`){if(u)return;throw new r(t.flag(this,`message`)||`expected promise to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}else{let e=!1;try{s()}catch(t){e=!0,d=t}if(!e&&!u)throw new r(t.flag(this,`message`)||`expected function to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}if(typeof e==`function`){let t=e.name||e.prototype.constructor.name;return this.assert(d&&d instanceof e,`expected error to be instance of ${t}`,`expected error not to be instance of ${t}`,e,d)}if(isError(e)){let t=equals(d,e,[...o,iterableEquality]);return this.assert(t,`expected a thrown error to be #{exp}`,`expected a thrown error not to be #{exp}`,e,d)}if(typeof e==`object`&&`asymmetricMatch`in e&&typeof e.asymmetricMatch==`function`){let t=e;return this.assert(d&&t.asymmetricMatch(d),`expected error to match asymmetric matcher`,`expected error not to match asymmetric matcher`,t,d)}let p=equals(d,e,[...o,iterableEquality]);return this.assert(p,`expected a thrown value to equal #{exp}`,`expected a thrown value not to equal #{exp}`,e,d)}),[{name:`toHaveResolved`,condition:e=>e.mock.settledResults.length>0&&e.mock.settledResults.some(({type:e})=>e===`fulfilled`),action:`resolved`},{name:[`toHaveReturned`,`toReturn`],condition:e=>e.mock.calls.length>0&&e.mock.results.some(({type:e})=>e!==`throw`),action:`called`}].forEach(({name:e,condition:t,action:r})=>{def(e,function(){let e=getSpy(this),o=e.getMockName(),s=t(e);this.assert(s,`expected "${o}" to be successfully ${r} at least once`,`expected "${o}" to not be successfully ${r}`,s,!s,!1)})}),[{name:`toHaveResolvedTimes`,condition:(e,t)=>e.mock.settledResults.reduce((e,{type:t})=>t===`fulfilled`?++e:e,0)===t,action:`resolved`},{name:[`toHaveReturnedTimes`,`toReturnTimes`],condition:(e,t)=>e.mock.results.reduce((e,{type:t})=>t===`throw`?e:++e,0)===t,action:`called`}].forEach(({name:e,condition:t,action:r})=>{def(e,function(e){let o=getSpy(this),s=o.getMockName(),c=t(o,e);this.assert(c,`expected "${s}" to be successfully ${r} ${e} times`,`expected "${s}" to not be successfully ${r} ${e} times`,`expected resolved times: ${e}`,`received resolved times: ${c}`,!1)})}),[{name:`toHaveResolvedWith`,condition:(e,t)=>e.mock.settledResults.some(({type:e,value:r})=>e===`fulfilled`&&equals(t,r)),action:`resolve`},{name:[`toHaveReturnedWith`,`toReturnWith`],condition:(e,t)=>e.mock.results.some(({type:e,value:r})=>e===`return`&&equals(t,r)),action:`return`}].forEach(({name:e,condition:o,action:s})=>{def(e,function(e){let c=getSpy(this),u=o(c,e),d=t.flag(this,`negate`);if(u&&d||!u&&!d){let o=c.getMockName(),d=t.getMessage(this,[u,`expected "${o}" to ${s} with: #{exp} at least once`,`expected "${o}" to not ${s} with: #{exp}`,e]);throw new r(formatReturns(c,s===`return`?c.mock.results:c.mock.settledResults,d,e))}})}),[{name:`toHaveLastResolvedWith`,condition:(e,t)=>{let r=e.mock.settledResults.at(-1);return!!(r&&r.type===`fulfilled`&&equals(r.value,t))},action:`resolve`},{name:`toHaveLastReturnedWith`,condition:(e,t)=>{let r=e.mock.results.at(-1);return!!(r&&r.type===`return`&&equals(r.value,t))},action:`return`}].forEach(({name:e,condition:t,action:r})=>{def(e,function(e){let o=getSpy(this),s=(r===`return`?o.mock.results:o.mock.settledResults).at(-1),c=o.getMockName();this.assert(t(o,e),`expected last "${c}" call to ${r} #{exp}`,`expected last "${c}" call to not ${r} #{exp}`,e,s?.value)})}),[{name:`toHaveNthResolvedWith`,condition:(e,t,r)=>{let o=e.mock.settledResults[t-1];return o&&o.type===`fulfilled`&&equals(o.value,r)},action:`resolve`},{name:`toHaveNthReturnedWith`,condition:(e,t,r)=>{let o=e.mock.results[t-1];return o&&o.type===`return`&&equals(o.value,r)},action:`return`}].forEach(({name:e,condition:t,action:r})=>{def(e,function(e,o){let s=getSpy(this),c=s.getMockName(),u=(r===`return`?s.mock.results:s.mock.settledResults)[e-1],d=`${ordinal(e)} call`;this.assert(t(s,e,o),`expected ${d} "${c}" call to ${r} #{exp}`,`expected ${d} "${c}" call to not ${r} #{exp}`,o,u?.value)})}),def(`withContext`,function(e){for(let r in e)t.flag(this,r,e[r]);return this}),t.addProperty(e.Assertion.prototype,`resolves`,function __VITEST_RESOLVES__(){let o=Error(`resolves`);t.flag(this,`promise`,`resolves`),t.flag(this,`error`,o);let s=t.flag(this,`vitest-test`),c=t.flag(this,`object`);if(t.flag(this,`poll`))throw SyntaxError(`expect.poll() is not supported in combination with .resolves`);if(typeof c?.then!=`function`)throw TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof c}'.`);let u=new Proxy(this,{get:(d,p,m)=>{let h=Reflect.get(d,p,m);return typeof h==`function`?(...e)=>(t.flag(this,`_name`,p),recordAsyncExpect(s,Promise.resolve(c).then(r=>(t.flag(this,`object`,r),h.call(this,...e)),e=>{let o=new r(`promise rejected "${t.inspect(e)}" instead of resolving`,{showDiff:!1});throw o.cause=e,o}).catch(e=>{throw isError(e)&&o.stack&&(e.stack=o.stack.replace(o.message,e.message)),e}),createAssertionMessage(t,this,!!e.length),o,t.flag(this,`soft`))):h instanceof e.Assertion?u:h}});return u}),t.addProperty(e.Assertion.prototype,`rejects`,function __VITEST_REJECTS__(){let o=Error(`rejects`);t.flag(this,`promise`,`rejects`),t.flag(this,`error`,o);let s=t.flag(this,`vitest-test`),c=t.flag(this,`object`),u=typeof c==`function`?c():c;if(t.flag(this,`poll`))throw SyntaxError(`expect.poll() is not supported in combination with .rejects`);if(typeof u?.then!=`function`)throw TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof u}'.`);let d=new Proxy(this,{get:(c,p,m)=>{let h=Reflect.get(c,p,m);return typeof h==`function`?(...e)=>(t.flag(this,`_name`,p),recordAsyncExpect(s,Promise.resolve(u).then(e=>{throw new r(`promise resolved "${t.inspect(e)}" instead of rejecting`,{showDiff:!0,expected:Error(`rejected promise`),actual:e})},r=>(t.flag(this,`object`,r),h.call(this,...e))).catch(e=>{throw isError(e)&&o.stack&&(e.stack=o.stack.replace(o.message,e.message)),e}),createAssertionMessage(t,this,!!e.length),o,t.flag(this,`soft`))):h instanceof e.Assertion?d:h}});return d})};function formatCalls(e,t,r){return e.mock.calls.length&&(t+=o.gray(`\n\nReceived:\n\n${e.mock.calls.map((t,s)=>{let c=o.bold(` ${ordinal(s+1)} ${e.getMockName()} call:\n\n`);return r?c+=diff(r,t,{omitAnnotationLines:!0}):c+=stringify(t).split(`
96
+ ${s(e)}`}}},Gn=o.green,Kn=o.red,qn=o.inverse,Jn=o.bold,Y=o.dim;function matcherHint(e,t=`received`,r=`expected`,o={}){let{comment:s=``,isDirectExpectCall:c=!1,isNot:u=!1,promise:d=``,secondArgument:p=``,expectedColor:m=Gn,receivedColor:h=Kn,secondArgumentColor:g=Gn}=o,_=``,y=`expect`;return!c&&t!==``&&(_+=Y(`${y}(`)+h(t),y=`)`),d!==``&&(_+=Y(`${y}.`)+d,y=``),u&&(_+=`${Y(`${y}.`)}not`,y=``),e.includes(`.`)?y+=e:(_+=Y(`${y}.`)+e,y=``),r===``?y+=`()`:(_+=Y(`${y}(`)+m(r),p&&(_+=Y(`, `)+g(p)),y=`)`),s!==``&&(y+=` // ${s}`),y!==``&&(_+=Y(y)),_}function replaceTrailingSpaces(e){return e.replace(/\s+$/gm,e=>`·`.repeat(e.length))}function printReceived(e){return Kn(replaceTrailingSpaces(stringify(e)))}function printExpected(e){return Gn(replaceTrailingSpaces(stringify(e)))}function getMatcherUtils(){return{EXPECTED_COLOR:Gn,RECEIVED_COLOR:Kn,INVERTED_COLOR:qn,BOLD_WEIGHT:Jn,DIM_COLOR:Y,diff,matcherHint,printReceived,printExpected,printDiffOrStringify,printWithType}}function printWithType(e,t,r){let o=getType$1(t);return(o!==`null`&&o!==`undefined`?`${e} has type: ${o}\n`:``)+`${e} has value: ${r(t)}`}function addCustomEqualityTesters(e){if(!Array.isArray(e))throw TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${getType$1(e)}"`);globalThis[J].customEqualityTesters.push(...e)}function getCustomEqualityTesters(){return globalThis[J].customEqualityTesters}function equals(e,t,r,o){return r||=[],eq(e,t,[],[],r,o?hasKey:hasDefinedKey)}Function.prototype.toString;function isAsymmetric(e){return!!e&&typeof e==`object`&&`asymmetricMatch`in e&&isA(`Function`,e.asymmetricMatch)}function asymmetricMatch(e,t,r){let o=isAsymmetric(e),s=isAsymmetric(t);if(!(o&&s)){if(o)return e.asymmetricMatch(t,r);if(s)return t.asymmetricMatch(e,r)}}function isError(e){if(typeof Error.isError==`function`)return Error.isError(e);switch(Object.prototype.toString.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:return!0;default:return e instanceof Error}}function eq(e,t,r,o,s,c){let u=!0,d=asymmetricMatch(e,t,s);if(d!==void 0)return d;let p={equals};for(let r=0;r<s.length;r++){let o=s[r].call(p,e,t,s);if(o!==void 0)return o}if(typeof URL==`function`&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;let m=Object.prototype.toString.call(e);if(m!==Object.prototype.toString.call(t))return!1;switch(m){case`[object Boolean]`:case`[object String]`:case`[object Number]`:return typeof e==typeof t?typeof e!=`object`&&typeof t!=`object`?Object.is(e,t):Object.is(e.valueOf(),t.valueOf()):!1;case`[object Date]`:{let r=+e,o=+t;return r===o||Number.isNaN(r)&&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(typeof e!=`object`||typeof t!=`object`)return!1;if(isDomNode(e)&&isDomNode(t))return e.isEqualNode(t);let h=r.length;for(;h--;)if(r[h]===e)return o[h]===t;else if(o[h]===t)return!1;if(r.push(e),o.push(t),m===`[object Array]`&&e.length!==t.length)return!1;if(isError(e)&&isError(t))try{return isErrorEqual(e,t,r,o,s,c)}finally{r.pop(),o.pop()}let g=keys(e,c),_,y=g.length;if(keys(t,c).length!==y)return!1;for(;y--;)if(_=g[y],u=c(t,_)&&eq(e[_],t[_],r,o,s,c),!u)return!1;return r.pop(),o.pop(),u}function isErrorEqual(e,t,r,o,s,c){let u=Object.prototype.toString.call(e)===Object.prototype.toString.call(t)&&e.name===t.name&&e.message===t.message;return t.cause!==void 0&&(u&&=eq(e.cause,t.cause,r,o,s,c)),e instanceof AggregateError&&t instanceof AggregateError&&(u&&=eq(e.errors,t.errors,r,o,s,c)),u&&=eq({...e},{...t},r,o,s,c),u}function keys(e,t){let r=[];for(let o in e)t(e,o)&&r.push(o);return r.concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable))}function hasDefinedKey(e,t){return hasKey(e,t)&&e[t]!==void 0}function hasKey(e,t){return Object.hasOwn(e,t)}function isA(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function isDomNode(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`&&`nodeName`in e&&typeof e.nodeName==`string`&&`isEqualNode`in e&&typeof e.isEqualNode==`function`}const Yn=`@@__IMMUTABLE_KEYED__@@`,Xn=`@@__IMMUTABLE_SET__@@`,Zn=`@@__IMMUTABLE_ORDERED__@@`;function isImmutableUnorderedKeyed(e){return!!(e&&e[Yn]&&!e[Zn])}function isImmutableUnorderedSet(e){return!!(e&&e[Xn]&&!e[Zn])}function isObjectLiteral(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function isImmutableList(e){return!!(e&&isObjectLiteral(e)&&e[`@@__IMMUTABLE_LIST__@@`])}function isImmutableOrderedKeyed(e){return!!(e&&isObjectLiteral(e)&&e[Yn]&&e[Zn])}function isImmutableOrderedSet(e){return!!(e&&isObjectLiteral(e)&&e[Xn]&&e[Zn])}function isImmutableRecord(e){return!!(e&&isObjectLiteral(e)&&e[`@@__IMMUTABLE_RECORD__@@`])}const Qn=Symbol.iterator;function hasIterator(e){return!!(e!=null&&e[Qn])}function iterableEquality(e,t,r=[],o=[],s=[]){if(typeof e!=`object`||typeof t!=`object`||Array.isArray(e)||Array.isArray(t)||!hasIterator(e)||!hasIterator(t))return;if(e.constructor!==t.constructor)return!1;let c=o.length;for(;c--;)if(o[c]===e)return s[c]===t;o.push(e),s.push(t);let u=[...r.filter(e=>e!==iterableEquality),iterableEqualityWithStack];function iterableEqualityWithStack(e,t){return iterableEquality(e,t,[...r],[...o],[...s])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(isA(`Set`,e)||isImmutableUnorderedSet(e)){let r=!0;for(let o of e)if(!t.has(o)){let e=!1;for(let r of t)equals(o,r,u)===!0&&(e=!0);if(e===!1){r=!1;break}}return o.pop(),s.pop(),r}else if(isA(`Map`,e)||isImmutableUnorderedKeyed(e)){let r=!0;for(let o of e)if(!t.has(o[0])||!equals(o[1],t.get(o[0]),u)){let e=!1;for(let r of t){let t=equals(o[0],r[0],u),s=!1;t===!0&&(s=equals(o[1],r[1],u)),s===!0&&(e=!0)}if(e===!1){r=!1;break}}return o.pop(),s.pop(),r}}let d=t[Qn]();for(let t of e){let e=d.next();if(e.done||!equals(t,e.value,u))return!1}return!d.next().done||!isImmutableList(e)&&!isImmutableOrderedKeyed(e)&&!isImmutableOrderedSet(e)&&!isImmutableRecord(e)&&!equals(Object.entries(e),Object.entries(t),u)?!1:(o.pop(),s.pop(),!0)}function hasPropertyInObject(e,t){return!e||typeof e!=`object`||e===Object.prototype?!1:Object.hasOwn(e,t)||hasPropertyInObject(Object.getPrototypeOf(e),t)}function isObjectWithKeys(e){return isObject(e)&&!isError(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}function subsetEquality(e,t,r=[]){let o=r.filter(e=>e!==subsetEquality),subsetEqualityWithContext=(e=new WeakMap)=>(t,r)=>{if(isObjectWithKeys(r))return Object.keys(r).every(s=>{if(r[s]!=null&&typeof r[s]==`object`){if(e.has(r[s]))return equals(t[s],r[s],o);e.set(r[s],!0)}let c=t!=null&&hasPropertyInObject(t,s)&&equals(t[s],r[s],[...o,subsetEqualityWithContext(e)]);return e.delete(r[s]),c})};return subsetEqualityWithContext()(e,t)}function typeEquality(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function arrayBufferEquality(e,t){let r=e,o=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{r=new DataView(e),o=new DataView(t)}catch{return}}if(r.byteLength!==o.byteLength)return!1;for(let e=0;e<r.byteLength;e++)if(r.getUint8(e)!==o.getUint8(e))return!1;return!0}function sparseArrayEquality(e,t,r=[]){if(!Array.isArray(e)||!Array.isArray(t))return;let o=Object.keys(e),s=Object.keys(t);return equals(e,t,r.filter(e=>e!==sparseArrayEquality),!0)&&equals(o,s)}function generateToBeMessage(e,t=`#{this}`,r=`#{exp}`){let o=`expected ${t} to be ${r} // 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}function pluralize(e,t){return`${t} ${e}${t===1?``:`s`}`}function getObjectKeys(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}function getObjectSubset(e,t,r){let o=0,getObjectSubsetWithContext=(e=new WeakMap)=>(t,s)=>{if(Array.isArray(t)){if(Array.isArray(s)&&s.length===t.length)return s.map((r,o)=>getObjectSubsetWithContext(e)(t[o],r))}else if(t instanceof Date)return t;else if(isObject(t)&&isObject(s)){if(equals(t,s,[...r,iterableEquality,subsetEquality]))return s;let c={};e.set(t,c),typeof t.constructor==`function`&&typeof t.constructor.name==`string`&&Object.defineProperty(c,`constructor`,{enumerable:!1,value:t.constructor});for(let r of getObjectKeys(t))hasPropertyInObject(s,r)?c[r]=e.has(t[r])?e.get(t[r]):getObjectSubsetWithContext(e)(t[r],s[r]):e.has(t[r])||(o+=1,isObject(t[r])&&(o+=getObjectKeys(t[r]).length),getObjectSubsetWithContext(e)(t[r],s[r]));if(getObjectKeys(c).length>0)return c}return t};return{subset:getObjectSubsetWithContext()(e,t),stripped:o}}function isStandardSchema(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&e[`~standard`]&&typeof e[`~standard`].validate==`function`}if(!Object.hasOwn(globalThis,Vn)){let e=new WeakMap,t=Object.create(null),r=[],o=Object.create(null);Object.defineProperty(globalThis,Vn,{get:()=>e}),Object.defineProperty(globalThis,J,{configurable:!0,get:()=>({state:e.get(globalThis[Hn]),matchers:t,customEqualityTesters:r})}),Object.defineProperty(globalThis,Un,{get:()=>o})}function getState(e){return globalThis[Vn].get(e)}function setState(e,t){let r=globalThis[Vn],o=r.get(t)||{},s=Object.defineProperties(o,{...Object.getOwnPropertyDescriptors(o),...Object.getOwnPropertyDescriptors(e)});r.set(t,s)}var AsymmetricMatcher$1=class{static{e(this,`AsymmetricMatcher`)}$$typeof=Symbol.for(`jest.asymmetricMatcher`);constructor(e,t=!1){this.sample=e,this.inverse=t}getMatcherContext(e){return{...getState(e||globalThis[Hn]),equals,isNot:this.inverse,customTesters:getCustomEqualityTesters(),utils:{...getMatcherUtils(),diff,stringify,iterableEquality,subsetEquality}}}};AsymmetricMatcher$1.prototype[Symbol.for(`chai/inspect`)]=function(e){let t=stringify(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};var StringContaining=class extends AsymmetricMatcher$1{constructor(e,t=!1){if(!isA(`String`,e))throw Error(`Expected is not a string`);super(e,t)}asymmetricMatch(e){let t=isA(`String`,e)&&e.includes(this.sample);return this.inverse?!t:t}toString(){return`String${this.inverse?`Not`:``}Containing`}getExpectedType(){return`string`}},Anything=class extends AsymmetricMatcher$1{asymmetricMatch(e){return e!=null}toString(){return`Anything`}toAsymmetricMatcher(){return`Anything`}},ObjectContaining=class extends AsymmetricMatcher$1{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)?!0:this.hasProperty(this.getPrototype(e),t):!1}getProperties(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}asymmetricMatch(e,t){if(typeof this.sample!=`object`)throw TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=!0,o=this.getProperties(this.sample);for(let s of o){if(!this.hasProperty(e,s)){r=!1;break}let o=this.sample[s],c=e[s];if(!equals(o,c,t)){r=!1;break}}return this.inverse?!r:r}toString(){return`Object${this.inverse?`Not`:``}Containing`}getExpectedType(){return`object`}},ArrayContaining=class extends AsymmetricMatcher$1{constructor(e,t=!1){super(e,t)}asymmetricMatch(e,t){if(!Array.isArray(this.sample))throw TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let r=this.sample.length===0||Array.isArray(e)&&this.sample.every(r=>e.some(e=>equals(r,e,t)));return this.inverse?!r:r}toString(){return`Array${this.inverse?`Not`:``}Containing`}getExpectedType(){return`array`}},Any=class extends AsymmetricMatcher$1{constructor(e){if(e===void 0)throw 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;let 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?typeof e==`string`||e instanceof String:this.sample===Number?typeof e==`number`||e instanceof Number:this.sample===Function?typeof e==`function`||typeof e==`function`:this.sample===Boolean?typeof e==`boolean`||e instanceof Boolean:this.sample===BigInt?typeof e==`bigint`||e instanceof BigInt:this.sample===Symbol?typeof e==`symbol`||e instanceof Symbol:this.sample===Object?typeof e==`object`: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)}>`}},StringMatching=class extends AsymmetricMatcher$1{constructor(e,t=!1){if(!isA(`String`,e)&&!isA(`RegExp`,e))throw Error(`Expected is not a String or a RegExp`);super(new RegExp(e),t)}asymmetricMatch(e){let t=isA(`String`,e)&&this.sample.test(e);return this.inverse?!t:t}toString(){return`String${this.inverse?`Not`:``}Matching`}getExpectedType(){return`string`}},CloseTo=class extends AsymmetricMatcher$1{precision;constructor(e,t=2,r=!1){if(!isA(`Number`,e))throw Error(`Expected is not a Number`);if(!isA(`Number`,t))throw Error(`Precision is not a Number`);super(e),this.inverse=r,this.precision=t}asymmetricMatch(e){if(!isA(`Number`,e))return!1;let t=!1;return t=e===1/0&&this.sample===1/0||e===-1/0&&this.sample===-1/0?!0: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,`(${pluralize(`digit`,this.precision)})`].join(` `)}},SchemaMatching=class extends AsymmetricMatcher$1{result;constructor(e,t=!1){if(!isStandardSchema(e))throw TypeError(`SchemaMatching expected to receive a Standard Schema.`);super(e,t)}asymmetricMatch(e){let t=this.sample[`~standard`].validate(e);if(t instanceof Promise)throw TypeError(`Async schema validation is not supported in asymmetric matchers.`);this.result=t;let r=!this.result.issues||this.result.issues.length===0;return this.inverse?!r:r}toString(){return`Schema${this.inverse?`Not`:``}Matching`}getExpectedType(){return`object`}toAsymmetricMatcher(){let{utils:e}=this.getMatcherContext();return(this.result?.issues||[]).length>0?`${this.toString()} ${e.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}};const JestAsymmetricMatchers=(e,t)=>{t.addMethod(e.expect,`anything`,()=>new Anything),t.addMethod(e.expect,`any`,e=>new Any(e)),t.addMethod(e.expect,`stringContaining`,e=>new StringContaining(e)),t.addMethod(e.expect,`objectContaining`,e=>new ObjectContaining(e)),t.addMethod(e.expect,`arrayContaining`,e=>new ArrayContaining(e)),t.addMethod(e.expect,`stringMatching`,e=>new StringMatching(e)),t.addMethod(e.expect,`closeTo`,(e,t)=>new CloseTo(e,t)),t.addMethod(e.expect,`schemaMatching`,e=>new SchemaMatching(e)),e.expect.not={stringContaining:e=>new StringContaining(e,!0),objectContaining:e=>new ObjectContaining(e,!0),arrayContaining:e=>new ArrayContaining(e,!0),stringMatching:e=>new StringMatching(e,!0),closeTo:(e,t)=>new CloseTo(e,t,!0),schemaMatching:e=>new SchemaMatching(e,!0)}};function createAssertionMessage(e,t,r){let o=e.flag(t,`soft`)?`.soft`:``,s=e.flag(t,`negate`)?`not.`:``,c=`${e.flag(t,`_name`)}(${r?`expected`:``})`,u=e.flag(t,`promise`);return`expect${o}(actual)${u?`.${u}`:``}.${s}${c}`}function recordAsyncExpect(e,t,r,o,s){let c=e;if(c&&t instanceof Promise){t=t.finally(()=>{if(!c.promises)return;let e=c.promises.indexOf(t);e!==-1&&c.promises.splice(e,1)}),c.promises||=[],s&&(t=t.then(noop,e=>{handleTestError(c,e)})),c.promises.push(t);let e=!1;return c.onFinished??=[],c.onFinished.push(()=>{if(!e){let e=(globalThis.__vitest_worker__?.onFilterStackTrace||(e=>e||``))(o.stack);console.warn([`Promise returned by \`${r}\` was not awaited. `,`Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in the next Vitest major. `,`Please remember to await the assertion.
97
+ `,e].join(``))}}),{then(r,o){return e=!0,t.then(r,o)},catch(r){return e=!0,t.catch(r)},finally(r){return e=!0,t.finally(r)},[Symbol.toStringTag]:`Promise`}}return t}function handleTestError(e,t){e.result||={state:`fail`},e.result.state=`fail`,e.result.errors||=[],e.result.errors.push(processError(t))}function wrapAssertion(e,t,r){return function(...o){if(t!==`withTest`&&e.flag(this,`_name`,t),!e.flag(this,`soft`))try{return r.apply(this,o)}finally{}let s=e.flag(this,`vitest-test`);if(!s)throw Error(`expect.soft() can only be used inside a test`);try{let e=r.apply(this,o);return e&&typeof e==`object`&&typeof e.then==`function`?e.then(noop,e=>{handleTestError(s,e)}):e}catch(e){handleTestError(s,e)}}}const JestChaiExpect=(e,t)=>{let{AssertionError:r}=e,o=getCustomEqualityTesters();function def(r,o){let addMethod=r=>{let s=wrapAssertion(t,r,o);t.addMethod(e.Assertion.prototype,r,s),t.addMethod(globalThis[J].matchers,r,s)};Array.isArray(r)?r.forEach(e=>addMethod(e)):addMethod(r)}[`throw`,`throws`,`Throw`].forEach(o=>{t.overwriteMethod(e.Assertion.prototype,o,e=>function(...o){let s=t.flag(this,`promise`),c=t.flag(this,`object`),u=t.flag(this,`negate`);if(s===`rejects`)t.flag(this,`object`,()=>{throw c});else if(s===`resolves`&&typeof c!=`function`){if(u)return;throw new r(t.flag(this,`message`)||`expected promise to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}e.apply(this,o)})}),def(`withTest`,function(e){return t.flag(this,`vitest-test`,e),this}),def(`toEqual`,function(e){let r=t.flag(this,`object`),s=equals(r,e,[...o,iterableEquality]);return this.assert(s,`expected #{this} to deeply equal #{exp}`,`expected #{this} to not deeply equal #{exp}`,e,r)}),def(`toStrictEqual`,function(e){let r=t.flag(this,`object`),s=equals(r,e,[...o,iterableEquality,typeEquality,sparseArrayEquality,arrayBufferEquality],!0);return this.assert(s,`expected #{this} to strictly equal #{exp}`,`expected #{this} to not strictly equal #{exp}`,e,r)}),def(`toBe`,function(e){let t=this._obj,r=Object.is(t,e),s=``;return r||(equals(t,e,[...o,iterableEquality,typeEquality,sparseArrayEquality,arrayBufferEquality],!0)?s=`toStrictEqual`:equals(t,e,[...o,iterableEquality])&&(s=`toEqual`)),this.assert(r,generateToBeMessage(s),`expected #{this} not to be #{exp} // Object.is equality`,e,t)}),def(`toMatchObject`,function(e){let s=this._obj,c=equals(s,e,[...o,iterableEquality,subsetEquality]),u=t.flag(this,`negate`),{subset:d,stripped:p}=getObjectSubset(s,e,o);if(c&&u||!c&&!u){let o=t.getMessage(this,[c,`expected #{this} to match object #{exp}`,`expected #{this} to not match object #{exp}`,e,d,!1]);throw new r(p===0?o:`${o}\n(${p} matching ${p===1?`property`:`properties`} omitted from actual)`,{showDiff:!0,expected:e,actual:d})}}),def(`toMatch`,function(e){let t=this._obj;if(typeof t!=`string`)throw TypeError(`.toMatch() expects to receive a string, but got ${typeof t}`);return this.assert(typeof e==`string`?t.includes(e):t.match(e),`expected #{this} to match #{exp}`,`expected #{this} not to match #{exp}`,e,t)}),def(`toContain`,function(e){let r=this._obj;if(typeof Node<`u`&&r instanceof Node){if(!(e instanceof Node))throw TypeError(`toContain() expected a DOM node as the argument, but got ${typeof e}`);return this.assert(r.contains(e),`expected #{this} to contain element #{exp}`,`expected #{this} not to contain element #{exp}`,e,r)}if(typeof DOMTokenList<`u`&&r instanceof DOMTokenList){assertTypes(e,`class name`,[`string`]);let o=t.flag(this,`negate`)?r.value.replace(e,``).trim():`${r.value} ${e}`;return this.assert(r.contains(e),`expected "${r.value}" to contain "${e}"`,`expected "${r.value}" not to contain "${e}"`,o,r.value)}return typeof r==`string`&&typeof e==`string`?this.assert(r.includes(e),`expected #{this} to contain #{exp}`,`expected #{this} not to contain #{exp}`,e,r):(r!=null&&typeof r!=`string`&&t.flag(this,`object`,Array.from(r)),this.contain(e))}),def(`toContainEqual`,function(e){let r=t.flag(this,`object`),s=Array.from(r).findIndex(t=>equals(t,e,o));this.assert(s!==-1,`expected #{this} to deep equally contain #{exp}`,`expected #{this} to not deep equally contain #{exp}`,e)}),def(`toBeTruthy`,function(){let e=t.flag(this,`object`);this.assert(!!e,`expected #{this} to be truthy`,`expected #{this} to not be truthy`,!0,e)}),def(`toBeFalsy`,function(){let e=t.flag(this,`object`);this.assert(!e,`expected #{this} to be falsy`,`expected #{this} to not be falsy`,!1,e)}),def(`toBeGreaterThan`,function(e){let t=this._obj;return assertTypes(t,`actual`,[`number`,`bigint`]),assertTypes(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)}),def(`toBeGreaterThanOrEqual`,function(e){let t=this._obj;return assertTypes(t,`actual`,[`number`,`bigint`]),assertTypes(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)}),def(`toBeLessThan`,function(e){let t=this._obj;return assertTypes(t,`actual`,[`number`,`bigint`]),assertTypes(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)}),def(`toBeLessThanOrEqual`,function(e){let t=this._obj;return assertTypes(t,`actual`,[`number`,`bigint`]),assertTypes(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)}),def(`toBeNaN`,function(){let e=t.flag(this,`object`);this.assert(Number.isNaN(e),`expected #{this} to be NaN`,`expected #{this} not to be NaN`,NaN,e)}),def(`toBeUndefined`,function(){let e=t.flag(this,`object`);this.assert(e===void 0,`expected #{this} to be undefined`,`expected #{this} not to be undefined`,void 0,e)}),def(`toBeNull`,function(){let e=t.flag(this,`object`);this.assert(e===null,`expected #{this} to be null`,`expected #{this} not to be null`,null,e)}),def(`toBeNullable`,function(){let e=t.flag(this,`object`);this.assert(e==null,`expected #{this} to be nullish`,`expected #{this} not to be nullish`,null,e)}),def(`toBeDefined`,function(){let e=t.flag(this,`object`);this.assert(e!==void 0,`expected #{this} to be defined`,`expected #{this} to be undefined`,e)}),def(`toBeTypeOf`,function(e){let t=typeof this._obj,r=e===t;return this.assert(r,`expected #{this} to be type of #{exp}`,`expected #{this} not to be type of #{exp}`,e,t)}),def(`toBeInstanceOf`,function(e){return this.instanceOf(e)}),def(`toHaveLength`,function(e){return this.have.length(e)}),def(`toHaveProperty`,function(...e){Array.isArray(e[0])&&(e[0]=e[0].map(e=>String(e).replace(/([.[\]])/g,`\\$1`)).join(`.`));let r=this._obj,[s,c]=e,getValue=()=>Object.hasOwn(r,s)?{value:r[s],exists:!0}:t.getPathInfo(r,s),{value:u,exists:d}=getValue(),p=d&&(e.length===1||equals(c,u,o)),m=e.length===1?``:` with value ${t.objDisplay(c)}`;return this.assert(p,`expected #{this} to have property "${s}"${m}`,`expected #{this} to not have property "${s}"${m}`,c,d?u:void 0)}),def(`toBeCloseTo`,function(e,t=2){let r=this._obj,o=!1,s=0,c=0;return e===1/0&&r===1/0||e===-1/0&&r===-1/0?o=!0:(s=10**-t/2,c=Math.abs(r-e),o=c<s),this.assert(o,`expected #{this} to be close to #{exp}, received difference is ${c}, but expected ${s}`,`expected #{this} to not be close to #{exp}, received difference is ${c}, but expected ${s}`,e,r,!1)});function assertIsMock(e){if(!isMockFunction(e._obj))throw TypeError(`${t.inspect(e._obj)} is not a spy or a call to a spy!`)}function getSpy(e){return assertIsMock(e),e._obj}def([`toHaveBeenCalledTimes`,`toBeCalledTimes`],function(e){let t=getSpy(this),r=t.getMockName(),o=t.mock.calls.length;return this.assert(o===e,`expected "${r}" to be called #{exp} times, but got ${o} times`,`expected "${r}" to not be called #{exp} times`,e,o,!1)}),def(`toHaveBeenCalledOnce`,function(){let e=getSpy(this),t=e.getMockName(),r=e.mock.calls.length;return this.assert(r===1,`expected "${t}" to be called once, but got ${r} times`,`expected "${t}" to not be called once`,1,r,!1)}),def([`toHaveBeenCalled`,`toBeCalled`],function(){let e=getSpy(this),o=e.getMockName(),s=e.mock.calls.length,c=s>0,u=t.flag(this,`negate`),d=t.getMessage(this,[c,`expected "${o}" to be called at least once`,`expected "${o}" to not be called at all, but actually been called ${s} times`,!0,c]);if(c&&u&&(d=formatCalls(e,d)),c&&u||!c&&!u)throw new r(d)});function equalsArgumentArray(e,t){return e.length===t.length&&e.every((e,r)=>equals(e,t[r],[...o,iterableEquality]))}def([`toHaveBeenCalledWith`,`toBeCalledWith`],function(...e){let o=getSpy(this),s=o.getMockName(),c=o.mock.calls.some(t=>equalsArgumentArray(t,e)),u=t.flag(this,`negate`),d=t.getMessage(this,[c,`expected "${s}" to be called with arguments: #{exp}`,`expected "${s}" to not be called with arguments: #{exp}`,e]);if(c&&u||!c&&!u)throw new r(formatCalls(o,d,e))}),def(`toHaveBeenCalledExactlyOnceWith`,function(...e){let o=getSpy(this),s=o.getMockName(),c=o.mock.calls.length,u=o.mock.calls.some(t=>equalsArgumentArray(t,e))&&c===1,d=t.flag(this,`negate`),p=t.getMessage(this,[u,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,e]);if(u&&d||!u&&!d)throw new r(formatCalls(o,p,e))}),def(`toHaveBeenNthCalledWith`,function(e,...t){let r=getSpy(this),o=r.getMockName(),s=r.mock.calls[e-1],c=r.mock.calls.length,u=e<=c;this.assert(s&&equalsArgumentArray(s,t),`expected ${ordinal(e)} "${o}" call to have been called with #{exp}${u?``:`, but called only ${c} times`}`,`expected ${ordinal(e)} "${o}" call to not have been called with #{exp}`,t,s,u)}),def(`toHaveBeenLastCalledWith`,function(...e){let t=getSpy(this),r=t.getMockName(),o=t.mock.calls.at(-1);this.assert(o&&equalsArgumentArray(o,e),`expected last "${r}" call to have been called with #{exp}`,`expected last "${r}" call to not have been called with #{exp}`,e,o)});function isSpyCalledBeforeAnotherSpy(e,t,r){let o=e.mock.invocationCallOrder,s=t.mock.invocationCallOrder;return o.length===0?!r:s.length===0?!1:o[0]<s[0]}def([`toHaveBeenCalledBefore`],function(e,r=!0){let o=getSpy(this);if(!isMockFunction(e))throw TypeError(`${t.inspect(e)} is not a spy or a call to a spy`);this.assert(isSpyCalledBeforeAnotherSpy(o,e,r),`expected "${o.getMockName()}" to have been called before "${e.getMockName()}"`,`expected "${o.getMockName()}" to not have been called before "${e.getMockName()}"`,e,o)}),def([`toHaveBeenCalledAfter`],function(e,r=!0){let o=getSpy(this);if(!isMockFunction(e))throw TypeError(`${t.inspect(e)} is not a spy or a call to a spy`);this.assert(isSpyCalledBeforeAnotherSpy(e,o,r),`expected "${o.getMockName()}" to have been called after "${e.getMockName()}"`,`expected "${o.getMockName()}" to not have been called after "${e.getMockName()}"`,e,o)}),def([`toThrow`,`toThrowError`],function(e){if(typeof e==`string`||e===void 0||e instanceof RegExp)return this.throws(e===``?/^$/:e);let s=this._obj,c=t.flag(this,`promise`),u=t.flag(this,`negate`),d=null;if(c===`rejects`)d=s;else if(c===`resolves`&&typeof s!=`function`){if(u)return;throw new r(t.flag(this,`message`)||`expected promise to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}else{let e=!1;try{s()}catch(t){e=!0,d=t}if(!e&&!u)throw new r(t.flag(this,`message`)||`expected function to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}if(typeof e==`function`){let t=e.name||e.prototype.constructor.name;return this.assert(d&&d instanceof e,`expected error to be instance of ${t}`,`expected error not to be instance of ${t}`,e,d)}if(isError(e)){let t=equals(d,e,[...o,iterableEquality]);return this.assert(t,`expected a thrown error to be #{exp}`,`expected a thrown error not to be #{exp}`,e,d)}if(typeof e==`object`&&`asymmetricMatch`in e&&typeof e.asymmetricMatch==`function`){let t=e;return this.assert(d&&t.asymmetricMatch(d),`expected error to match asymmetric matcher`,`expected error not to match asymmetric matcher`,t,d)}let p=equals(d,e,[...o,iterableEquality]);return this.assert(p,`expected a thrown value to equal #{exp}`,`expected a thrown value not to equal #{exp}`,e,d)}),[{name:`toHaveResolved`,condition:e=>e.mock.settledResults.length>0&&e.mock.settledResults.some(({type:e})=>e===`fulfilled`),action:`resolved`},{name:[`toHaveReturned`,`toReturn`],condition:e=>e.mock.calls.length>0&&e.mock.results.some(({type:e})=>e!==`throw`),action:`called`}].forEach(({name:e,condition:t,action:r})=>{def(e,function(){let e=getSpy(this),o=e.getMockName(),s=t(e);this.assert(s,`expected "${o}" to be successfully ${r} at least once`,`expected "${o}" to not be successfully ${r}`,s,!s,!1)})}),[{name:`toHaveResolvedTimes`,condition:(e,t)=>e.mock.settledResults.reduce((e,{type:t})=>t===`fulfilled`?++e:e,0)===t,action:`resolved`},{name:[`toHaveReturnedTimes`,`toReturnTimes`],condition:(e,t)=>e.mock.results.reduce((e,{type:t})=>t===`throw`?e:++e,0)===t,action:`called`}].forEach(({name:e,condition:t,action:r})=>{def(e,function(e){let o=getSpy(this),s=o.getMockName(),c=t(o,e);this.assert(c,`expected "${s}" to be successfully ${r} ${e} times`,`expected "${s}" to not be successfully ${r} ${e} times`,`expected resolved times: ${e}`,`received resolved times: ${c}`,!1)})}),[{name:`toHaveResolvedWith`,condition:(e,t)=>e.mock.settledResults.some(({type:e,value:r})=>e===`fulfilled`&&equals(t,r)),action:`resolve`},{name:[`toHaveReturnedWith`,`toReturnWith`],condition:(e,t)=>e.mock.results.some(({type:e,value:r})=>e===`return`&&equals(t,r)),action:`return`}].forEach(({name:e,condition:o,action:s})=>{def(e,function(e){let c=getSpy(this),u=o(c,e),d=t.flag(this,`negate`);if(u&&d||!u&&!d){let o=c.getMockName(),d=t.getMessage(this,[u,`expected "${o}" to ${s} with: #{exp} at least once`,`expected "${o}" to not ${s} with: #{exp}`,e]);throw new r(formatReturns(c,s===`return`?c.mock.results:c.mock.settledResults,d,e))}})}),[{name:`toHaveLastResolvedWith`,condition:(e,t)=>{let r=e.mock.settledResults.at(-1);return!!(r&&r.type===`fulfilled`&&equals(r.value,t))},action:`resolve`},{name:`toHaveLastReturnedWith`,condition:(e,t)=>{let r=e.mock.results.at(-1);return!!(r&&r.type===`return`&&equals(r.value,t))},action:`return`}].forEach(({name:e,condition:t,action:r})=>{def(e,function(e){let o=getSpy(this),s=(r===`return`?o.mock.results:o.mock.settledResults).at(-1),c=o.getMockName();this.assert(t(o,e),`expected last "${c}" call to ${r} #{exp}`,`expected last "${c}" call to not ${r} #{exp}`,e,s?.value)})}),[{name:`toHaveNthResolvedWith`,condition:(e,t,r)=>{let o=e.mock.settledResults[t-1];return o&&o.type===`fulfilled`&&equals(o.value,r)},action:`resolve`},{name:`toHaveNthReturnedWith`,condition:(e,t,r)=>{let o=e.mock.results[t-1];return o&&o.type===`return`&&equals(o.value,r)},action:`return`}].forEach(({name:e,condition:t,action:r})=>{def(e,function(e,o){let s=getSpy(this),c=s.getMockName(),u=(r===`return`?s.mock.results:s.mock.settledResults)[e-1],d=`${ordinal(e)} call`;this.assert(t(s,e,o),`expected ${d} "${c}" call to ${r} #{exp}`,`expected ${d} "${c}" call to not ${r} #{exp}`,o,u?.value)})}),def(`withContext`,function(e){for(let r in e)t.flag(this,r,e[r]);return this}),t.addProperty(e.Assertion.prototype,`resolves`,function __VITEST_RESOLVES__(){let o=Error(`resolves`);t.flag(this,`promise`,`resolves`),t.flag(this,`error`,o);let s=t.flag(this,`vitest-test`),c=t.flag(this,`object`);if(t.flag(this,`poll`))throw SyntaxError(`expect.poll() is not supported in combination with .resolves`);if(typeof c?.then!=`function`)throw TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof c}'.`);let u=new Proxy(this,{get:(d,p,m)=>{let h=Reflect.get(d,p,m);return typeof h==`function`?(...e)=>(t.flag(this,`_name`,p),recordAsyncExpect(s,Promise.resolve(c).then(r=>(t.flag(this,`object`,r),h.call(this,...e)),e=>{let o=new r(`promise rejected "${t.inspect(e)}" instead of resolving`,{showDiff:!1});throw o.cause=e,o}).catch(e=>{throw isError(e)&&o.stack&&(e.stack=o.stack.replace(o.message,e.message)),e}),createAssertionMessage(t,this,!!e.length),o,t.flag(this,`soft`))):h instanceof e.Assertion?u:h}});return u}),t.addProperty(e.Assertion.prototype,`rejects`,function __VITEST_REJECTS__(){let o=Error(`rejects`);t.flag(this,`promise`,`rejects`),t.flag(this,`error`,o);let s=t.flag(this,`vitest-test`),c=t.flag(this,`object`),u=typeof c==`function`?c():c;if(t.flag(this,`poll`))throw SyntaxError(`expect.poll() is not supported in combination with .rejects`);if(typeof u?.then!=`function`)throw TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof u}'.`);let d=new Proxy(this,{get:(c,p,m)=>{let h=Reflect.get(c,p,m);return typeof h==`function`?(...e)=>(t.flag(this,`_name`,p),recordAsyncExpect(s,Promise.resolve(u).then(e=>{throw new r(`promise resolved "${t.inspect(e)}" instead of rejecting`,{showDiff:!0,expected:Error(`rejected promise`),actual:e})},r=>(t.flag(this,`object`,r),h.call(this,...e))).catch(e=>{throw isError(e)&&o.stack&&(e.stack=o.stack.replace(o.message,e.message)),e}),createAssertionMessage(t,this,!!e.length),o,t.flag(this,`soft`))):h instanceof e.Assertion?d:h}});return d})};function formatCalls(e,t,r){return e.mock.calls.length&&(t+=o.gray(`\n\nReceived:\n\n${e.mock.calls.map((t,s)=>{let c=o.bold(` ${ordinal(s+1)} ${e.getMockName()} call:\n\n`);return r?c+=diff(r,t,{omitAnnotationLines:!0}):c+=stringify(t).split(`
78
98
  `).map(e=>` ${e}`).join(`
79
99
  `),c+=`
80
100
  `,c}).join(`
@@ -82,7 +102,7 @@ ${s(e)}`}}},Kn=o.green,qn=o.red,Jn=o.inverse,Yn=o.bold,J=o.dim;function matcherH
82
102
  `).map(e=>` ${e}`).join(`
83
103
  `),c+=`
84
104
  `,c}).join(`
85
- `)}`)),r+=o.gray(`\n\nNumber of calls: ${o.bold(e.mock.calls.length)}\n`),r}function getMatcherState(e,t){let r=e._obj,o=R.flag(e,`negate`),s=R.flag(e,`promise`)||``,c=R.flag(e,`message`),u={...getMatcherUtils(),diff,stringify,iterableEquality,subsetEquality},d=R.flag(e,`vitest-test`),p=d?.fullTestName??``;d?.type!==`test`&&(d=void 0);let m={...getState(t),currentTestName:p,customTesters:getCustomEqualityTesters(),isNot:o,utils:u,promise:s,equals,suppressedErrors:[],soft:R.flag(e,`soft`),poll:R.flag(e,`poll`),assertion:e};return Object.assign(m,{task:d}),{state:m,isNot:o,obj:r,customMessage:c}}var JestExtendError=class extends Error{constructor(e,t,r,o){super(e),this.actual=t,this.expected=r,this.__vitest_error_context__=o}};function JestExtendPlugin(e,t,r){return(o,s)=>{Object.entries(r).forEach(([r,o])=>{function __VITEST_EXTEND_ASSERTION__(...e){let{state:s,isNot:c,obj:u,customMessage:d}=getMatcherState(this,t),p=o.call(s,u,...e);if(p&&typeof p==`object`&&typeof p.then==`function`)return p.then(({pass:e,message:t,actual:o,expected:s,meta:u})=>{if(e&&c||!e&&!c)throw new JestExtendError((d?`${d}: `:``)+t(),o,s,{assertionName:r,meta:u})});let{pass:m,message:h,actual:g,expected:_,meta:y}=p;if(m&&c||!m&&!c)throw new JestExtendError((d?`${d}: `:``)+h(),g,_,{assertionName:r,meta:y})}let c=wrapAssertion(s,r,__VITEST_EXTEND_ASSERTION__);if(s.addMethod(globalThis[q].matchers,r,c),s.addMethod(e.Assertion.prototype,r,c),o.__vitest_poll_takeover__){let t=e.Assertion.prototype[r];Object.defineProperty(t,`__vitest_poll_takeover__`,{value:!0})}class CustomMatcher extends AsymmetricMatcher$1{constructor(e=!1,...t){super(t,e)}asymmetricMatch(e){let{pass:r}=o.call(this.getMatcherContext(t),e,...this.sample);return this.inverse?!r:r}toString(){return`${this.inverse?`not.`:``}${r}`}getExpectedType(){return`any`}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(e=>stringify(e)).join(`, `)}>`}}let customMatcher=(...e)=>new CustomMatcher(!1,...e);Object.defineProperty(t,r,{configurable:!0,enumerable:!0,value:customMatcher,writable:!0}),Object.defineProperty(t.not,r,{configurable:!0,enumerable:!0,value:(...e)=>new CustomMatcher(!0,...e),writable:!0}),Object.defineProperty(globalThis[Wn],r,{configurable:!0,enumerable:!0,value:customMatcher,writable:!0})})}}const JestExtend=(e,t)=>{t.addMethod(e.expect,`extend`,(t,r)=>{use(JestExtendPlugin(e,t,r))})},$n=/\r?\n/;function positionToOffset(e,t,r){let o=e.split($n),s=/\r\n/.test(e)?2:1,c=0;if(t>o.length)return e.length;for(let e=0;e<t-1;e++)c+=o[e].length+s;return c+r}function offsetToLineNumber(e,t){if(t>e.length)throw Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let r=e.split($n),o=/\r\n/.test(e)?2:1,s=0,c=0;for(;c<r.length;c++){let e=r[c].length+o;if(s+e>=t)break;s+=e}return c+1}var er=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};const X=Date;let tr=null;var Z=class MockDate extends X{constructor(e,t,r,o,s,c,u){super();let d;switch(arguments.length){case 0:d=tr===null?new X:new X(tr.valueOf());break;case 1:d=new X(e);break;default:r=r===void 0?1:r,o||=0,s||=0,c||=0,u||=0,d=new X(e,t,r,o,s,c,u);break}return Object.setPrototypeOf(d,MockDate.prototype),d}};Z.UTC=X.UTC,Z.now=function(){return new Z().valueOf()},Z.parse=function(e){return X.parse(e)},Z.toString=function(){return X.toString()};function mockDate(e){let t=new X(e.valueOf());if(Number.isNaN(t.getTime()))throw TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=Z,tr=t.valueOf()}function resetDate(){globalThis.Date=X}const{get:nr}=Reflect;function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var rr={exports:{}},ir;function requireNaturalCompare(){if(ir)return rr.exports;ir=1;
105
+ `)}`)),r+=o.gray(`\n\nNumber of calls: ${o.bold(e.mock.calls.length)}\n`),r}function getMatcherState(e,t){let r=e._obj,o=V.flag(e,`negate`),s=V.flag(e,`promise`)||``,c=V.flag(e,`message`),u={...getMatcherUtils(),diff,stringify,iterableEquality,subsetEquality},d=V.flag(e,`vitest-test`),p=d?.fullTestName??``;d?.type!==`test`&&(d=void 0);let m={...getState(t),currentTestName:p,customTesters:getCustomEqualityTesters(),isNot:o,utils:u,promise:s,equals,suppressedErrors:[],soft:V.flag(e,`soft`),poll:V.flag(e,`poll`),assertion:e};return Object.assign(m,{task:d}),{state:m,isNot:o,obj:r,customMessage:c}}var JestExtendError=class extends Error{constructor(e,t,r,o){super(e),this.actual=t,this.expected=r,this.__vitest_error_context__=o}};function JestExtendPlugin(e,t,r){return(o,s)=>{Object.entries(r).forEach(([r,o])=>{function __VITEST_EXTEND_ASSERTION__(...e){let{state:s,isNot:c,obj:u,customMessage:d}=getMatcherState(this,t),p=o.call(s,u,...e);if(p&&typeof p==`object`&&typeof p.then==`function`)return p.then(({pass:e,message:t,actual:o,expected:s,meta:u})=>{if(e&&c||!e&&!c)throw new JestExtendError((d?`${d}: `:``)+t(),o,s,{assertionName:r,meta:u})});let{pass:m,message:h,actual:g,expected:_,meta:y}=p;if(m&&c||!m&&!c)throw new JestExtendError((d?`${d}: `:``)+h(),g,_,{assertionName:r,meta:y})}let c=wrapAssertion(s,r,__VITEST_EXTEND_ASSERTION__);if(s.addMethod(globalThis[J].matchers,r,c),s.addMethod(e.Assertion.prototype,r,c),o.__vitest_poll_takeover__){let t=e.Assertion.prototype[r];Object.defineProperty(t,`__vitest_poll_takeover__`,{value:!0})}class CustomMatcher extends AsymmetricMatcher$1{constructor(e=!1,...t){super(t,e)}asymmetricMatch(e){let{pass:r}=o.call(this.getMatcherContext(t),e,...this.sample);return this.inverse?!r:r}toString(){return`${this.inverse?`not.`:``}${r}`}getExpectedType(){return`any`}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(e=>stringify(e)).join(`, `)}>`}}let customMatcher=(...e)=>new CustomMatcher(!1,...e);Object.defineProperty(t,r,{configurable:!0,enumerable:!0,value:customMatcher,writable:!0}),Object.defineProperty(t.not,r,{configurable:!0,enumerable:!0,value:(...e)=>new CustomMatcher(!0,...e),writable:!0}),Object.defineProperty(globalThis[Un],r,{configurable:!0,enumerable:!0,value:customMatcher,writable:!0})})}}const JestExtend=(e,t)=>{t.addMethod(e.expect,`extend`,(t,r)=>{use(JestExtendPlugin(e,t,r))})},$n=/\r?\n/;function positionToOffset(e,t,r){let o=e.split($n),s=/\r\n/.test(e)?2:1,c=0;if(t>o.length)return e.length;for(let e=0;e<t-1;e++)c+=o[e].length+s;return c+r}function offsetToLineNumber(e,t){if(t>e.length)throw Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let r=e.split($n),o=/\r\n/.test(e)?2:1,s=0,c=0;for(;c<r.length;c++){let e=r[c].length+o;if(s+e>=t)break;s+=e}return c+1}var er=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};const X=Date;let tr=null;var Z=class MockDate extends X{constructor(e,t,r,o,s,c,u){super();let d;switch(arguments.length){case 0:d=tr===null?new X:new X(tr.valueOf());break;case 1:d=new X(e);break;default:r=r===void 0?1:r,o||=0,s||=0,c||=0,u||=0,d=new X(e,t,r,o,s,c,u);break}return Object.setPrototypeOf(d,MockDate.prototype),d}};Z.UTC=X.UTC,Z.now=function(){return new Z().valueOf()},Z.parse=function(e){return X.parse(e)},Z.toString=function(){return X.toString()};function mockDate(e){let t=new X(e.valueOf());if(Number.isNaN(t.getTime()))throw TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=Z,tr=t.valueOf()}function resetDate(){globalThis.Date=X}const{get:nr}=Reflect;function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var rr={exports:{}},ir;function requireNaturalCompare(){if(ir)return rr.exports;ir=1;
86
106
  /*
87
107
  * @version 1.4.0
88
108
  * @date 2015-10-26
@@ -90,7 +110,7 @@ ${s(e)}`}}},Kn=o.green,qn=o.red,Jn=o.inverse,Yn=o.bold,J=o.dim;function matcherH
90
110
  * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
91
111
  * @license MIT License
92
112
  */
93
- var naturalCompare=function(e,t){var r,o,s=1,c=0,u=0,d=String.alphabet;function getCode(e,t,o){if(o){for(r=t;o=getCode(e,r),o<76&&o>65;)++r;return+e.slice(t-1,r)}return o=d&&d.indexOf(e.charAt(t)),o>-1?o+76:(o=e.charCodeAt(t)||0,o<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(;s;)if(o=getCode(e,c++),s=getCode(t,u++),o<76&&s<76&&o>66&&s>66&&(o=getCode(e,c,c),s=getCode(t,u,c=r),u=r),o!=s)return o<s?-1:1}return 0};try{rr.exports=naturalCompare}catch{String.naturalCompare=naturalCompare}return rr.exports}var ar=getDefaultExportFromCjs(requireNaturalCompare());const serialize$1=(e,t,r,o,s,c)=>{let u=e.getMockName(),d=u===`vi.fn()`?``:` ${u}`,p=``;if(e.mock.calls.length!==0){let u=r+t.indent;p=` {${t.spacingOuter}${u}"calls": ${c(e.mock.calls,t,u,o,s)}${t.min?`, `:`,`}${t.spacingOuter}${u}"results": ${c(e.mock.results,t,u,o,s)}${t.min?``:`,`}${t.spacingOuter}${r}}`}return`[MockFunction${d}]${p}`},test=e=>e&&!!e._isMockFunction,or={serialize:serialize$1,test},{DOMCollection:sr,DOMElement:cr,Immutable:lr,ReactElement:ur,ReactTestComponent:dr,AsymmetricMatcher:fr}=me;let pr=[dr,ur,cr,sr,lr,fr,or];function addSerializer(e){pr=[e].concat(pr)}function getSerializers(){return pr}function testNameToKey(e,t){return`${e} ${t}`}function keyToTestName(e){if(!/ \d+$/.test(e))throw Error(`Snapshot keys must end with a number.`);return e.replace(/ \d+$/,``)}function getSnapshotData(e,t){let r=t.updateSnapshot,o=Object.create(null),s=``,c=!1;if(e!=null)try{s=e,Function(`exports`,s)(o)}catch{}return(r===`all`||r===`new`)&&s&&(c=!0),{data:o,dirty:c}}function addExtraLineBreaks(e){return e.includes(`
113
+ var naturalCompare=function(e,t){var r,o,s=1,c=0,u=0,d=String.alphabet;function getCode(e,t,o){if(o){for(r=t;o=getCode(e,r),o<76&&o>65;)++r;return+e.slice(t-1,r)}return o=d&&d.indexOf(e.charAt(t)),o>-1?o+76:(o=e.charCodeAt(t)||0,o<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(;s;)if(o=getCode(e,c++),s=getCode(t,u++),o<76&&s<76&&o>66&&s>66&&(o=getCode(e,c,c),s=getCode(t,u,c=r),u=r),o!=s)return o<s?-1:1}return 0};try{rr.exports=naturalCompare}catch{String.naturalCompare=naturalCompare}return rr.exports}var ar=getDefaultExportFromCjs(requireNaturalCompare());const serialize$1=(e,t,r,o,s,c)=>{let u=e.getMockName(),d=u===`vi.fn()`?``:` ${u}`,p=``;if(e.mock.calls.length!==0){let u=r+t.indent;p=` {${t.spacingOuter}${u}"calls": ${c(e.mock.calls,t,u,o,s)}${t.min?`, `:`,`}${t.spacingOuter}${u}"results": ${c(e.mock.results,t,u,o,s)}${t.min?``:`,`}${t.spacingOuter}${r}}`}return`[MockFunction${d}]${p}`},test=e=>e&&!!e._isMockFunction,or={serialize:serialize$1,test},{DOMCollection:sr,DOMElement:cr,Immutable:lr,ReactElement:ur,ReactTestComponent:dr,AsymmetricMatcher:fr}=N;let pr=[dr,ur,cr,sr,lr,fr,or];function addSerializer(e){pr=[e].concat(pr)}function getSerializers(){return pr}function testNameToKey(e,t){return`${e} ${t}`}function keyToTestName(e){if(!/ \d+$/.test(e))throw Error(`Snapshot keys must end with a number.`);return e.replace(/ \d+$/,``)}function getSnapshotData(e,t){let r=t.updateSnapshot,o=Object.create(null),s=``,c=!1;if(e!=null)try{s=e,Function(`exports`,s)(o)}catch{}return(r===`all`||r===`new`)&&s&&(c=!0),{data:o,dirty:c}}function addExtraLineBreaks(e){return e.includes(`
94
114
  `)?`\n${e}\n`:e}function removeExtraLineBreaks(e){return e.length>2&&e[0]===`
95
115
  `&&e.endsWith(`
96
116
  `)?e.slice(1,-1):e}function serialize(e,t=2,r={}){return normalizeNewlines(format$1(e,{escapeRegex:!0,indent:t,plugins:getSerializers(),printFunctionName:!1,...r}))}function escapeBacktickString(e){return e.replace(/`|\\|\$\{/g,`\\$&`)}function printBacktickString(e){return`\`${escapeBacktickString(e)}\``}function normalizeNewlines(e){return e.replace(/\r\n|\r/g,`
@@ -105,5 +125,5 @@ var naturalCompare=function(e,t){var r,o,s=1,c=0,u=0,d=String.alphabet;function
105
125
  `).slice(c+1).join(`
106
126
  `)}`;try{Object.defineProperty(r,`stack`,{value:u})}catch{}return r}function createDate(){class ClockDate extends _{constructor(e,t,r,o,s,c,u){arguments.length===0?super(ClockDate.clock.now):super(...arguments),Object.defineProperty(this,`constructor`,{value:_,enumerable:!1})}static[Symbol.hasInstance](e){return e instanceof _}}return ClockDate.isFake=!0,_.now&&(ClockDate.now=function now(){return ClockDate.clock.now}),_.toSource&&(ClockDate.toSource=function toSource(){return _.toSource()}),ClockDate.toString=function toString(){return _.toString()},new Proxy(ClockDate,{apply(){if(this instanceof ClockDate)throw 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 _(ClockDate.clock.now).toString()}})}function createIntl(){let e={};return Object.getOwnPropertyNames(y).forEach(t=>e[t]=y[t]),e.DateTimeFormat=function(...t){let r=new y.DateTimeFormat(...t),o={};return[`formatRange`,`formatRangeToParts`,`resolvedOptions`].forEach(e=>{o[e]=r[e].bind(r)}),[`format`,`formatToParts`].forEach(t=>{o[t]=function(o){return r[t](o||e.clock.now)}}),o},e.DateTimeFormat.prototype=Object.create(y.DateTimeFormat.prototype),e.DateTimeFormat.supportedLocalesOf=y.DateTimeFormat.supportedLocalesOf,e}function enqueueJob(e,t){e.jobs||=[],e.jobs.push(t)}function runJobs(e){if(e.jobs){for(let t=0;t<e.jobs.length;t++){let r=e.jobs[t];if(r.func.apply(null,r.args),checkIsNearInfiniteLimit(e,t),e.loopLimit&&t>e.loopLimit)throw getInfiniteLoopError(e,r)}resetIsNearInfiniteLimit(),e.jobs=[]}}function addTimer(e,t){if(t.func===void 0)throw Error(`Callback must be provided to timer calls`);if(p&&typeof t.func!=`function`)throw TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${t.func} of type ${typeof t.func}`);if(x&&(t.error=Error()),t.type=t.immediate?`Immediate`:`Timeout`,t.hasOwnProperty(`delay`)&&(typeof t.delay!=`number`&&(t.delay=parseInt(t.delay,10)),isNumberFinite(t.delay)||(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||={},t.id=b++,t.createdAt=e.now,t.callAt=e.now+(parseInt(t.delay)||+!!e.duringTick),e.timers[t.id]=t,p){let r={refed:!0,ref:function(){return this.refed=!0,r},unref:function(){return this.refed=!1,r},hasRef:function(){return this.refed},refresh:function(){return t.callAt=e.now+(parseInt(t.delay)||+!!e.duringTick),e.timers[t.id]=t,r},[Symbol.toPrimitive]:function(){return t.id}};return r}return t.id}function compareTimers(e,t){if(e.callAt<t.callAt)return-1;if(e.callAt>t.callAt)return 1;if(e.immediate&&!t.immediate)return-1;if(!e.immediate&&t.immediate)return 1;if(e.createdAt<t.createdAt)return-1;if(e.createdAt>t.createdAt)return 1;if(e.id<t.id)return-1;if(e.id>t.id)return 1}function firstTimerInRange(e,t,r){let o=e.timers,s=null,c,u;for(c in o)o.hasOwnProperty(c)&&(u=inRange(t,r,o[c]),u&&(!s||compareTimers(s,o[c])===1)&&(s=o[c]));return s}function firstTimer(e){let t=e.timers,r=null,o;for(o in t)t.hasOwnProperty(o)&&(!r||compareTimers(r,t[o])===1)&&(r=t[o]);return r}function lastTimer(e){let t=e.timers,r=null,o;for(o in t)t.hasOwnProperty(o)&&(!r||compareTimers(r,t[o])===-1)&&(r=t[o]);return r}function callTimer(e,t){if(typeof t.interval==`number`?e.timers[t.id].callAt+=t.interval:delete e.timers[t.id],typeof t.func==`function`)t.func.apply(null,t.args);else{let e=eval;(function(){e(t.func)})()}}function getClearHandler(e){return e===`IdleCallback`||e===`AnimationFrame`?`cancel${e}`:`clear${e}`}function getScheduleHandler(e){return e===`IdleCallback`||e===`AnimationFrame`?`request${e}`:`set${e}`}function createWarnOnce(){let e=0;return function(t){!e++&&console.warn(t)}}let S=createWarnOnce();function clearTimer(e,t,r){if(!t)return;e.timers||={};let o=Number(t);if(Number.isNaN(o)||o<c){let o=getClearHandler(r);if(e.shouldClearNativeTimers===!0){let r=e[`_${o}`];return typeof r==`function`?r(t):void 0}S(`FakeTimers: ${o} was invoked to clear a native timer instead of one created by this library.
107
127
  To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(e.timers.hasOwnProperty(o)){let t=e.timers[o];if(t.type===r||t.type===`Timeout`&&r===`Interval`||t.type===`Interval`&&r===`Timeout`)delete e.timers[o];else{let e=getClearHandler(r),o=getScheduleHandler(t.type);throw Error(`Cannot clear timer: timer created with ${o}() but cleared with ${e}()`)}}}function uninstall(e){let s,c,u;for(c=0,u=e.methods.length;c<u;c++){if(s=e.methods[c],s===`hrtime`&&o.process)o.process.hrtime=e._hrtime;else if(s===`nextTick`&&o.process)o.process.nextTick=e._nextTick;else if(s===`performance`){let t=Object.getOwnPropertyDescriptor(e,`_${s}`);t&&t.get&&!t.set?Object.defineProperty(o,s,t):t.configurable&&(o[s]=e[`_${s}`])}else if(o[s]&&o[s].hadOwnProperty)o[s]=e[`_${s}`];else try{delete o[s]}catch{}if(e.timersModuleMethods!==void 0)for(let r=0;r<e.timersModuleMethods.length;r++){let o=e.timersModuleMethods[r];t[o.methodName]=o.original}if(e.timersPromisesModuleMethods!==void 0)for(let t=0;t<e.timersPromisesModuleMethods.length;t++){let o=e.timersPromisesModuleMethods[t];r[o.methodName]=o.original}}e.setTickMode(`manual`),e.methods=[];for(let[t,r]of e.abortListenerMap.entries())r.removeEventListener(`abort`,t),e.abortListenerMap.delete(t);return e.timers?Object.keys(e.timers).map(function mapper(t){return e.timers[t]}):[]}function hijackMethod(e,t,r){if(r[t].hadOwnProperty=Object.prototype.hasOwnProperty.call(e,t),r[`_${t}`]=e[t],t===`Date`)e[t]=r[t];else if(t===`Intl`)e[t]=r[t];else if(t===`performance`){let o=Object.getOwnPropertyDescriptor(e,t);o&&o.get&&!o.set?(Object.defineProperty(r,`_${t}`,o),Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))):e[t]=r[t]}else e[t]=function(){return r[t].apply(r,arguments)},Object.defineProperties(e[t],Object.getOwnPropertyDescriptors(r[t]));e[t].clock=r}function doIntervalTick(e,t){e.tick(t)}let w={setTimeout:o.setTimeout,clearTimeout:o.clearTimeout,setInterval:o.setInterval,clearInterval:o.clearInterval,Date:o.Date};u.setImmediate&&(w.setImmediate=o.setImmediate),u.clearImmediate&&(w.clearImmediate=o.clearImmediate),u.hrtime&&(w.hrtime=o.process.hrtime),u.nextTick&&(w.nextTick=o.process.nextTick),u.performance&&(w.performance=o.performance),u.requestAnimationFrame&&(w.requestAnimationFrame=o.requestAnimationFrame),u.queueMicrotask&&(w.queueMicrotask=o.queueMicrotask),u.cancelAnimationFrame&&(w.cancelAnimationFrame=o.cancelAnimationFrame),u.requestIdleCallback&&(w.requestIdleCallback=o.requestIdleCallback),u.cancelIdleCallback&&(w.cancelIdleCallback=o.cancelIdleCallback),u.Intl&&(w.Intl=y);let T=o.setImmediate||o.setTimeout,E=o.clearInterval,D=o.setInterval;function createClock(e,t){e=Math.floor(getEpoch(e)),t||=1e3;let r=0,s=[0,0],c={now:e,Date:createDate(),loopLimit:t,tickMode:{mode:`manual`,counter:0,delta:void 0}};c.Date.clock=c;function getTimeToNextFrame(){return 16-(c.now-e)%16}function hrtime(t){let o=c.now-s[0]-e,u=Math.floor(o/1e3),d=(o-u*1e3)*1e6+r-s[1];if(Array.isArray(t)){if(t[1]>1e9)throw TypeError(`Number of nanoseconds can't exceed a billion`);let e=t[0],r=d-t[1],o=u-e;return r<0&&(r+=1e9,--o),[o,r]}return[u,d]}function fakePerformanceNow(){let e=hrtime();return e[0]*1e3+e[1]/1e6}u.hrtimeBigint&&(hrtime.bigint=function(){let e=hrtime();return BigInt(e[0])*BigInt(1e9)+BigInt(e[1])}),u.Intl&&(c.Intl=createIntl(),c.Intl.clock=c),c.setTickMode=function(e){let{mode:t,delta:r}=e,{mode:o,delta:s}=c.tickMode;t===o&&r===s||(o===`interval`&&E(c.attachedInterval),c.tickMode={counter:c.tickMode.counter+1,mode:t,delta:r},t===`nextAsync`?advanceUntilModeChanges():t===`interval`&&createIntervalTick(c,r||20))};async function advanceUntilModeChanges(){async function newMacrotask(){let e=new MessageChannel;await new Promise(t=>{e.port1.onmessage=()=>{t(),e.port1.close()},e.port2.postMessage(void 0)}),e.port1.close(),e.port2.close(),await new Promise(e=>{T(e)})}let{counter:e}=c.tickMode;for(;c.tickMode.counter===e;){if(await newMacrotask(),c.tickMode.counter!==e)return;c.next()}}function pauseAutoTickUntilFinished(e){return c.tickMode.mode===`nextAsync`?(c.setTickMode({mode:`manual`}),e.finally(()=>{c.setTickMode({mode:`nextAsync`})})):e}c.requestIdleCallback=function requestIdleCallback(e,t){let r=0;c.countTimers()>0&&(r=50);let o=addTimer(c,{func:e,args:Array.prototype.slice.call(arguments,2),delay:t===void 0?r:Math.min(t,r),idleCallback:!0});return Number(o)},c.cancelIdleCallback=function cancelIdleCallback(e){return clearTimer(c,e,`IdleCallback`)},c.setTimeout=function setTimeout(e,t){return addTimer(c,{func:e,args:Array.prototype.slice.call(arguments,2),delay:t})},o.Promise!==void 0&&m&&(c.setTimeout[m.custom]=function promisifiedSetTimeout(e,t){return new o.Promise(function setTimeoutExecutor(r){addTimer(c,{func:r,args:[t],delay:e})})}),c.clearTimeout=function clearTimeout(e){return clearTimer(c,e,`Timeout`)},c.nextTick=function nextTick(e){return enqueueJob(c,{func:e,args:Array.prototype.slice.call(arguments,1),error:x?Error():null})},c.queueMicrotask=function queueMicrotask(e){return c.nextTick(e)},c.setInterval=function setInterval(e,t){return t=parseInt(t,10),addTimer(c,{func:e,args:Array.prototype.slice.call(arguments,2),delay:t,interval:t})},c.clearInterval=function clearInterval(e){return clearTimer(c,e,`Interval`)},u.setImmediate&&(c.setImmediate=function setImmediate(e){return addTimer(c,{func:e,args:Array.prototype.slice.call(arguments,1),immediate:!0})},o.Promise!==void 0&&m&&(c.setImmediate[m.custom]=function promisifiedSetImmediate(e){return new o.Promise(function setImmediateExecutor(t){addTimer(c,{func:t,args:[e],immediate:!0})})}),c.clearImmediate=function clearImmediate(e){return clearTimer(c,e,`Immediate`)}),c.countTimers=function countTimers(){return Object.keys(c.timers||{}).length+(c.jobs||[]).length},c.requestAnimationFrame=function requestAnimationFrame(e){let t=addTimer(c,{func:e,delay:getTimeToNextFrame(),get args(){return[fakePerformanceNow()]},animation:!0});return Number(t)},c.cancelAnimationFrame=function cancelAnimationFrame(e){return clearTimer(c,e,`AnimationFrame`)},c.runMicrotasks=function runMicrotasks(){runJobs(c)};function doTick(e,t,o,s){let u=typeof e==`number`?e:parseTime(e),d=Math.floor(u),p=nanoRemainder(u),m=r+p,h=c.now+d;if(u<0)throw TypeError(`Negative ticks are not supported`);m>=1e6&&(h+=1,m-=1e6),r=m;let g=c.now,_=c.now,y,b,x,S,compensationCheck,postTimerCall;c.duringTick=!0,x=c.now,runJobs(c),x!==c.now&&(g+=c.now-x,h+=c.now-x);function doTickInner(){for(y=firstTimerInRange(c,g,h);y&&g<=h;){if(c.timers[y.id]){g=y.callAt,c.now=y.callAt,x=c.now;try{runJobs(c),callTimer(c,y)}catch(e){b||=e}if(t){T(S);return}compensationCheck()}postTimerCall()}if(x=c.now,runJobs(c),x!==c.now&&(g+=c.now-x,h+=c.now-x),c.duringTick=!1,y=firstTimerInRange(c,g,h),y)try{c.tick(h-c.now)}catch(e){b||=e}else c.now=h,r=m;if(b)throw b;if(t)o(c.now);else return c.now}return S=t&&function(){try{compensationCheck(),postTimerCall(),doTickInner()}catch(e){s(e)}},compensationCheck=function(){x!==c.now&&(g+=c.now-x,h+=c.now-x,_+=c.now-x)},postTimerCall=function(){y=firstTimerInRange(c,_,h),_=g},doTickInner()}return c.tick=function tick(e){return doTick(e,!1)},o.Promise!==void 0&&(c.tickAsync=function tickAsync(e){return pauseAutoTickUntilFinished(new o.Promise(function(t,r){T(function(){try{doTick(e,!0,t,r)}catch(e){r(e)}})}))}),c.next=function next(){runJobs(c);let e=firstTimer(c);if(!e)return c.now;c.duringTick=!0;try{return c.now=e.callAt,callTimer(c,e),runJobs(c),c.now}finally{c.duringTick=!1}},o.Promise!==void 0&&(c.nextAsync=function nextAsync(){return pauseAutoTickUntilFinished(new o.Promise(function(e,t){T(function(){try{let r=firstTimer(c);if(!r){e(c.now);return}let o;c.duringTick=!0,c.now=r.callAt;try{callTimer(c,r)}catch(e){o=e}c.duringTick=!1,T(function(){o?t(o):e(c.now)})}catch(e){t(e)}})}))}),c.runAll=function runAll(){let e,t;for(runJobs(c),t=0;t<c.loopLimit;t++){if(!c.timers||(e=Object.keys(c.timers).length,e===0))return resetIsNearInfiniteLimit(),c.now;c.next(),checkIsNearInfiniteLimit(c,t)}throw getInfiniteLoopError(c,firstTimer(c))},c.runToFrame=function runToFrame(){return c.tick(getTimeToNextFrame())},o.Promise!==void 0&&(c.runAllAsync=function runAllAsync(){return pauseAutoTickUntilFinished(new o.Promise(function(e,t){let r=0;function doRun(){T(function(){try{runJobs(c);let o;if(r<c.loopLimit){if(!c.timers){resetIsNearInfiniteLimit(),e(c.now);return}if(o=Object.keys(c.timers).length,o===0){resetIsNearInfiniteLimit(),e(c.now);return}c.next(),r++,doRun(),checkIsNearInfiniteLimit(c,r);return}t(getInfiniteLoopError(c,firstTimer(c)))}catch(e){t(e)}})}doRun()}))}),c.runToLast=function runToLast(){let e=lastTimer(c);return e?c.tick(e.callAt-c.now):(runJobs(c),c.now)},o.Promise!==void 0&&(c.runToLastAsync=function runToLastAsync(){return pauseAutoTickUntilFinished(new o.Promise(function(e,t){T(function(){try{let t=lastTimer(c);t||(runJobs(c),e(c.now)),e(c.tickAsync(t.callAt-c.now))}catch(e){t(e)}})}))}),c.reset=function reset(){r=0,c.timers={},c.jobs=[],c.now=e},c.setSystemTime=function setSystemTime(e){let t=getEpoch(e),o=t-c.now,u,d;for(u in s[0]+=o,s[1]+=r,c.now=t,r=0,c.timers)c.timers.hasOwnProperty(u)&&(d=c.timers[u],d.createdAt+=o,d.callAt+=o)},c.jump=function jump(e){let t=typeof e==`number`?e:parseTime(e),r=Math.floor(t);for(let e of Object.values(c.timers))c.now+r>e.callAt&&(e.callAt=c.now+r);c.tick(r)},u.performance&&(c.performance=Object.create(null),c.performance.now=fakePerformanceNow),u.hrtime&&(c.hrtime=hrtime),c}function createIntervalTick(e,t){e.attachedInterval=D(doIntervalTick.bind(null,e,t),t)}function install(s){if(arguments.length>1||s instanceof Date||Array.isArray(s)||typeof s==`number`)throw TypeError(`FakeTimers.install called with ${String(s)} install requires an object parameter`);if(o.Date.isFake===!0)throw TypeError(`Can't install fake timers twice on the same global object.`);if(s=s===void 0?{}:s,s.shouldAdvanceTime=s.shouldAdvanceTime||!1,s.advanceTimeDelta=s.advanceTimeDelta||20,s.shouldClearNativeTimers=s.shouldClearNativeTimers||!1,s.target)throw TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function handleMissingTimer(e){if(!s.ignoreMissingTimers)throw ReferenceError(`non-existent timers and/or objects cannot be faked: '${e}'`)}let c,d,p=createClock(s.now,s.loopLimit);if(p.shouldClearNativeTimers=s.shouldClearNativeTimers,p.uninstall=function(){return uninstall(p)},p.abortListenerMap=new Map,p.methods=s.toFake||[],p.methods.length===0&&(p.methods=Object.keys(w)),s.shouldAdvanceTime===!0&&p.setTickMode({mode:`interval`,delta:s.advanceTimeDelta}),p.methods.includes(`performance`)){let e=(()=>{if(g)return o.performance.constructor.prototype;if(h)return o.Performance.prototype})();if(e)Object.getOwnPropertyNames(e).forEach(function(e){e!==`now`&&(p.performance[e]=e.indexOf(`getEntries`)===0?NOOP_ARRAY:NOOP)}),p.performance.mark=e=>new FakePerformanceEntry(e,`mark`,0,0),p.performance.measure=e=>new FakePerformanceEntry(e,`measure`,0,100),p.performance.timeOrigin=getEpoch(s.now);else if((s.toFake||[]).includes(`performance`))return handleMissingTimer(`performance`)}for(o===e&&t&&(p.timersModuleMethods=[]),o===e&&r&&(p.timersPromisesModuleMethods=[]),c=0,d=p.methods.length;c<d;c++){let e=p.methods[c];if(!u[e]){handleMissingTimer(e);continue}if(e===`hrtime`?o.process&&typeof o.process.hrtime==`function`&&hijackMethod(o.process,e,p):e===`nextTick`?o.process&&typeof o.process.nextTick==`function`&&hijackMethod(o.process,e,p):hijackMethod(o,e,p),p.timersModuleMethods!==void 0&&t[e]){let r=t[e];p.timersModuleMethods.push({methodName:e,original:r}),t[e]=o[e]}p.timersPromisesModuleMethods!==void 0&&(e===`setTimeout`?(p.timersPromisesModuleMethods.push({methodName:`setTimeout`,original:r.setTimeout}),r.setTimeout=(e,t,r={})=>new Promise((o,s)=>{let abort=()=>{r.signal.removeEventListener(`abort`,abort),p.abortListenerMap.delete(abort),p.clearTimeout(c),s(r.signal.reason)},c=p.setTimeout(()=>{r.signal&&(r.signal.removeEventListener(`abort`,abort),p.abortListenerMap.delete(abort)),o(t)},e);r.signal&&(r.signal.aborted?abort():(r.signal.addEventListener(`abort`,abort),p.abortListenerMap.set(abort,r.signal)))})):e===`setImmediate`?(p.timersPromisesModuleMethods.push({methodName:`setImmediate`,original:r.setImmediate}),r.setImmediate=(e,t={})=>new Promise((r,o)=>{let abort=()=>{t.signal.removeEventListener(`abort`,abort),p.abortListenerMap.delete(abort),p.clearImmediate(s),o(t.signal.reason)},s=p.setImmediate(()=>{t.signal&&(t.signal.removeEventListener(`abort`,abort),p.abortListenerMap.delete(abort)),r(e)});t.signal&&(t.signal.aborted?abort():(t.signal.addEventListener(`abort`,abort),p.abortListenerMap.set(abort,t.signal)))})):e===`setInterval`&&(p.timersPromisesModuleMethods.push({methodName:`setInterval`,original:r.setInterval}),r.setInterval=(e,t,r={})=>({[Symbol.asyncIterator]:()=>{let createResolvable=()=>{let e,t,r=new Promise((r,o)=>{e=r,t=o});return r.resolve=e,r.reject=t,r},o=!1,s=!1,c,u=0,d=[],m=p.setInterval(()=>{d.length>0?d.shift().resolve():u++},e),abort=()=>{r.signal.removeEventListener(`abort`,abort),p.abortListenerMap.delete(abort),p.clearInterval(m),o=!0;for(let e of d)e.resolve()};return r.signal&&(r.signal.aborted?o=!0:(r.signal.addEventListener(`abort`,abort),p.abortListenerMap.set(abort,r.signal))),{next:async()=>{if(r.signal?.aborted&&!s)throw s=!0,r.signal.reason;if(o)return{done:!0,value:void 0};if(u>0)return u--,{done:!1,value:t};let e=createResolvable();if(d.push(e),await e,c&&d.length===0&&c.resolve(),r.signal?.aborted&&!s)throw s=!0,r.signal.reason;return o?{done:!0,value:void 0}:{done:!1,value:t}},return:async()=>o?{done:!0,value:void 0}:(d.length>0&&(c=createResolvable(),await c),p.clearInterval(m),o=!0,r.signal&&(r.signal.removeEventListener(`abort`,abort),p.abortListenerMap.delete(abort)),{done:!0,value:void 0})}}})))}return p}return{timers:w,createClock,install,withGlobal}}let o=withGlobal(e);return Q.timers=o.timers,Q.createClock=o.createClock,Q.install=o.install,Q.withGlobal=withGlobal,Q}var li=requireFakeTimersSrc(),FakeTimers=class{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=X.now;constructor({global:e,config:t}){this._userConfig=t,this._fakingDate=null,this._fakingTime=!1,this._fakeTimers=li.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),this._clock.countTimers()!==0);t--);}async advanceTimersToNextTimerAsync(e=1){if(this._checkFakeTimers())for(let t=e;t>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);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&&=(resetDate(),null),this._fakingTime&&=(this._clock.uninstall(),!1)}useFakeTimers(){let e=this._fakingDate||Date.now();this._fakingDate&&=(resetDate(),null),this._fakingTime&&this._clock.uninstall();let t=Object.keys(this._fakeTimers.timers).filter(e=>e!==`nextTick`&&e!==`queueMicrotask`);if(this._userConfig?.toFake?.includes(`nextTick`)&&isChildProcess())throw 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()){let{now:e}=this._clock;this._clock.reset(),this._clock.setSystemTime(e)}}setSystemTime(e){let t=e===void 0||e instanceof Date?e:new Date(e);this._fakingTime?this._clock.setSystemTime(t):(this._fakingDate=t??new Date(this.getRealSystemTime()),mockDate(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}setTimerTickMode(e,t){if(this._checkFakeTimers())if(e===`manual`)this._clock.setTickMode({mode:`manual`});else if(e===`nextTimerAsync`)this._clock.setTickMode({mode:`nextAsync`});else if(e===`interval`)this._clock.setTickMode({mode:`interval`,delta:t});else throw Error(`Invalid tick mode: ${e}`)}configure(e){this._userConfig=e}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw 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 copyStackTrace$1(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function waitFor(e,t={}){let{setTimeout:r,setInterval:o,clearTimeout:s,clearInterval:c}=getSafeTimers(),{interval:u=50,timeout:d=1e3}=typeof t==`number`?{timeout:t}:t,p=Error(`STACK_TRACE_ERROR`);return new Promise((t,m)=>{let h,g=`idle`,_,y,onResolve=e=>{_&&s(_),y&&c(y),t(e)},handleTimeout=()=>{y&&c(y);let e=h;e||=copyStackTrace$1(Error(`Timed out in waitFor!`),p),m(e)},checkCallback=()=>{if($.isFakeTimers()&&$.advanceTimersByTime(u),g!==`pending`)try{let t=e();if(typeof t==`object`&&t&&typeof t.then==`function`){let e=t;g=`pending`,e.then(e=>{g=`resolved`,onResolve(e)},e=>{g=`rejected`,h=e})}else return onResolve(t),!0}catch(e){h=e}};checkCallback()!==!0&&(_=r(handleTimeout,d),y=o(checkCallback,u))})}function waitUntil(e,t={}){let{setTimeout:r,setInterval:o,clearTimeout:s,clearInterval:c}=getSafeTimers(),{interval:u=50,timeout:d=1e3}=typeof t==`number`?{timeout:t}:t,p=Error(`STACK_TRACE_ERROR`);return new Promise((t,m)=>{let h=`idle`,g,_,onReject=e=>{_&&c(_),e||=copyStackTrace$1(Error(`Timed out in waitUntil!`),p),m(e)},onResolve=e=>{if(e)return g&&s(g),_&&c(_),t(e),!0},checkCallback=()=>{if($.isFakeTimers()&&$.advanceTimersByTime(u),h!==`pending`)try{let t=e();if(typeof t==`object`&&t&&typeof t.then==`function`){let e=t;h=`pending`,e.then(e=>{h=`resolved`,onResolve(e)},e=>{h=`rejected`,onReject(e)})}else return onResolve(t)}catch(e){onReject(e)}};checkCallback()!==!0&&(g=r(onReject,d),_=o(checkCallback,u))})}function createVitest(){let e=null,state=()=>getWorkerState(),t,timers=()=>t||=new FakeTimers({global:globalThis,config:state().config.fakeTimers}),r=new Map,o=new Map,s=[`PROD`,`DEV`,`SSR`],c={useFakeTimers(e){if(isChildProcess()&&(e?.toFake?.includes(`nextTick`)||state().config?.fakeTimers?.toFake?.includes(`nextTick`)))throw Error(`vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.`);return e?timers().configure({...state().config.fakeTimers,...e}):timers().configure(state().config.fakeTimers),timers().useFakeTimers(),c},isFakeTimers(){return timers().isFakeTimers()},useRealTimers(){return timers().useRealTimers(),c},runOnlyPendingTimers(){return timers().runOnlyPendingTimers(),c},async runOnlyPendingTimersAsync(){return await timers().runOnlyPendingTimersAsync(),c},runAllTimers(){return timers().runAllTimers(),c},async runAllTimersAsync(){return await timers().runAllTimersAsync(),c},runAllTicks(){return timers().runAllTicks(),c},advanceTimersByTime(e){return timers().advanceTimersByTime(e),c},async advanceTimersByTimeAsync(e){return await timers().advanceTimersByTimeAsync(e),c},advanceTimersToNextTimer(){return timers().advanceTimersToNextTimer(),c},async advanceTimersToNextTimerAsync(){return await timers().advanceTimersToNextTimerAsync(),c},advanceTimersToNextFrame(){return timers().advanceTimersToNextFrame(),c},getTimerCount(){return timers().getTimerCount()},setSystemTime(e){return timers().setSystemTime(e),c},getMockedSystemTime(){return timers().getMockedSystemTime()},getRealSystemTime(){return timers().getRealSystemTime()},clearAllTimers(){return timers().clearAllTimers(),c},setTimerTickMode(e,t){return timers().setTimerTickMode(e,t),c},spyOn,fn,waitFor,waitUntil,defineHelper:e=>function __VITEST_HELPER__(...t){let r=e.apply(this,t);return r&&typeof r==`object`&&typeof r.then==`function`?(async function __VITEST_HELPER__(){return await r})():r},hoisted(e){return assertTypes(e,`"vi.hoisted" factory`,[`function`]),e()},mock(e,t){if(typeof e!=`string`)throw TypeError(`vi.mock() expects a string path, but received a ${typeof e}`);let r=getImporter(`mock`);_mocker().queueMock(e,r,typeof t==`function`?()=>t(()=>_mocker().importActual(e,r,_mocker().getMockContext().callstack)):t)},unmock(e){if(typeof e!=`string`)throw TypeError(`vi.unmock() expects a string path, but received a ${typeof e}`);_mocker().queueUnmock(e,getImporter(`unmock`))},doMock(e,t){if(typeof e!=`string`)throw TypeError(`vi.doMock() expects a string path, but received a ${typeof e}`);let r=getImporter(`doMock`);_mocker().queueMock(e,r,typeof t==`function`?()=>t(()=>_mocker().importActual(e,r,_mocker().getMockContext().callstack)):t);let o={};return Symbol.dispose&&(o[Symbol.dispose]=()=>{_mocker().queueUnmock(e,r)}),o},doUnmock(e){if(typeof e!=`string`)throw TypeError(`vi.doUnmock() expects a string path, but received a ${typeof e}`);let t=getImporter(`doUnmock`);_mocker().queueUnmock(e,t)},async importActual(e){let t=getImporter(`importActual`);return _mocker().importActual(e,t,_mocker().getMockContext().callstack)},async importMock(e){let t=getImporter(`importMock`);return _mocker().importMock(e,t)},mockObject(e,t){return _mocker().mockObject({value:e},void 0,t?.spy?`autospy`:`automock`).value},mocked(e,t={}){return e},isMockFunction(e){return isMockFunction(e)},clearAllMocks(){return clearAllMocks(),c},resetAllMocks(){return resetAllMocks(),c},restoreAllMocks(){return restoreAllMocks(),c},stubGlobal(e,t){return r.has(e)||r.set(e,Object.getOwnPropertyDescriptor(globalThis,e)),Object.defineProperty(globalThis,e,{value:t,writable:!0,configurable:!0,enumerable:!0}),c},stubEnv(e,t){let r=state().metaEnv;return o.has(e)||o.set(e,r[e]),s.includes(e)?r[e]=t?`1`:``:t===void 0?delete r[e]:r[e]=String(t),c},unstubAllGlobals(){return r.forEach((e,t)=>{e?Object.defineProperty(globalThis,t,e):Reflect.deleteProperty(globalThis,t)}),r.clear(),c},unstubAllEnvs(){let e=state().metaEnv;return o.forEach((t,r)=>{t===void 0?delete e[r]:e[r]=t}),o.clear(),c},resetModules(){return resetModules(state().evaluatedModules),c},async dynamicImportSettled(){return waitForImportsToResolve()},setConfig(t){e||={...state().config},Object.assign(state().config,t)},resetConfig(){e&&Object.assign(state().config,e)}};return c}const $=createVitest();function _mocker(){return typeof __vitest_mocker__<`u`?__vitest_mocker__:new Proxy({},{get(e,t){throw Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}function getImporter(e){let t=createSimpleStackTrace({stackTraceLimit:5}).split(`
108
- `);return parseSingleStack(t[t.findLastIndex(t=>t.includes(` at Object.${e}`)||t.includes(`${e}@`)||t.includes(` at ${e} (`))+1])?.file||``}const ui=[`matchSnapshot`,`toMatchSnapshot`,`toMatchInlineSnapshot`,`toThrowErrorMatchingSnapshot`,`toThrowErrorMatchingInlineSnapshot`,`throws`,`Throw`,`throw`,`toThrow`,`toThrowError`];function throwWithCause(e,t){throw e.cause??=Error(`Matcher did not succeed in time.`),copyStackTrace(e,t)}function createExpectPoll(e){return function poll(t,r={}){let o=getWorkerState().config.expect?.poll??{},{interval:s=o.interval??50,timeout:c=o.timeout??1e3,message:u}=r,d=e(null,u).withContext({poll:!0});t=t.bind(d),R.flag(d,`_poll.fn`,t),R.flag(d,`_poll.timeout`,c),R.flag(d,`_poll.interval`,s);let p=R.flag(d,`vitest-test`);if(!p)throw Error(`expect.poll() must be called inside a test`);let m=new Proxy(d,{get(e,r,o){let u=Reflect.get(e,r,o);if(typeof u!=`function`)return u instanceof W?m:u;if(r===`assert`)return u;if(typeof r==`string`&&ui.includes(r))throw SyntaxError(`expect.poll() is not supported in combination with .${r}(). Use vi.waitFor() if your assertion condition is unstable.`);return function __VITEST_POLL_CHAIN__(...e){let o=Error(`STACK_TRACE_ERROR`),promise=async()=>{R.flag(d,`_name`,r),R.flag(d,`error`,o);let p=R.flag(d,`_poll.onSettled`);if(Object.getOwnPropertyDescriptor(u,`__vitest_poll_takeover__`)?.value)try{let t=await u.call(d,...e);return await p?.({assertion:d,status:`pass`}),t}catch(e){await p?.({assertion:d,status:`fail`}),throwWithCause(e,o)}let{setTimeout:m,clearTimeout:h}=getSafeTimers(),g=`fn`,_=!1,y=m(()=>{_=!0},c);try{for(;;){let r=_;r&&R.flag(d,`_isLastPollAttempt`,!0);try{g=`fn`;let r=await t();R.flag(d,`object`,r),g=`assertion`;let o=await u.call(d,...e);return await p?.({assertion:d,status:`pass`}),o}catch(e){(r||g===`assertion`&&R.flag(d,`_poll.assert_once`))&&(await p?.({assertion:d,status:`fail`}),throwWithCause(e,o)),await delay(s,m),$.isFakeTimers()&&$.advanceTimersByTime(s)}}}finally{h(y)}},m=!1;p.onFinished??=[],p.onFinished.push(()=>{if(!m){let e=R.flag(d,`negate`)?`not.`:``,t=`expect.${R.flag(d,`_poll.element`)?`element(locator)`:`poll(assertion)`}.${e}${String(r)}()`;throw copyStackTrace(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)}});let h;return{then(e,t){return m=!0,(h||=promise()).then(e,t)},catch(e){return m=!0,(h||=promise()).catch(e)},finally(e){return m=!0,(h||=promise()).finally(e)},[Symbol.toStringTag]:`Promise`}}}});return m}}function copyStackTrace(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}let di;function getSnapshotClient(){return di||=new SnapshotClient({isEqual:(e,t)=>equals(e,t,[iterableEquality,subsetEquality])}),di}function getError(e,t){if(typeof e!=`function`){if(!t)throw Error(`expected must be a function, received ${typeof e}`);return e}try{e()}catch(e){return e}throw Error(`snapshot function didn't throw`)}function getTestNames(e){return{filepath:e.file.filepath,name:getNames(e).slice(1).join(` > `),testId:e.id}}function getAssertionName(e){let t=R.flag(e,`_name`);if(!t)throw Error(`Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.`);return t}function getTest(e){let t=R.flag(e,`vitest-test`);if(!t)throw Error(`'${getAssertionName(e)}' cannot be used without test context`);return t}function validateAssertion(e){if(R.flag(e,`negate`))throw Error(`${getAssertionName(e)} cannot be used with "not"`)}const SnapshotPlugin=(e,t)=>{for(let r of[`matchSnapshot`,`toMatchSnapshot`])t.addMethod(e.Assertion.prototype,r,wrapAssertion(t,r,function(r,o){return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:t.flag(this,`object`),...normalizeArguments(r,o)}),e.util.flag(this,`message`))}));t.addMethod(e.Assertion.prototype,`toMatchFileSnapshot`,function(r,o){t.flag(this,`_name`,`toMatchFileSnapshot`),validateAssertion(this);let s=toMatchFileSnapshotImpl({assertion:this,received:t.flag(this,`object`),filepath:r,hint:o}).then(t=>assertMatchResult(t,e.util.flag(this,`message`)));return recordAsyncExpect(getTest(this),s,createAssertionMessage(t,this,!0),Error(`resolves`),t.flag(this,`soft`))}),t.addMethod(e.Assertion.prototype,`toMatchInlineSnapshot`,wrapAssertion(t,`toMatchInlineSnapshot`,function __INLINE_SNAPSHOT_OFFSET_3__(r,o,s){return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:t.flag(this,`object`),isInline:!0,...normalizeInlineArguments(r,o,s)}),e.util.flag(this,`message`))})),t.addMethod(e.Assertion.prototype,`toThrowErrorMatchingSnapshot`,wrapAssertion(t,`toThrowErrorMatchingSnapshot`,function(r,o){validateAssertion(this);let s=t.flag(this,`object`),c=t.flag(this,`promise`);return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:getError(s,c),...normalizeArguments(r,o)}),e.util.flag(this,`message`))})),t.addMethod(e.Assertion.prototype,`toThrowErrorMatchingInlineSnapshot`,wrapAssertion(t,`toThrowErrorMatchingInlineSnapshot`,function __INLINE_SNAPSHOT_OFFSET_3__(r,o){validateAssertion(this);let s=t.flag(this,`object`),c=t.flag(this,`promise`);return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:getError(s,c),isInline:!0,...normalizeInlineArguments(void 0,r,o)}),e.util.flag(this,`message`))})),t.addMethod(e.expect,`addSnapshotSerializer`,addSerializer)};function normalizeArguments(e,t){return typeof e==`string`?{hint:e}:{properties:e,hint:t}}function normalizeInlineArguments(e,t,r){let o;return typeof e==`string`?(o=stripSnapshotIndentation(e),{inlineSnapshot:o,hint:t}):(t&&(o=stripSnapshotIndentation(t)),{properties:e,inlineSnapshot:o,hint:r})}function toMatchSnapshotImpl(e){let{assertion:t}=e;validateAssertion(t);let r=getAssertionName(t),o=getTest(t);return getSnapshotClient().match({received:e.received,properties:e.properties,message:e.hint,isInline:e.isInline,inlineSnapshot:e.inlineSnapshot,assertionName:r,error:R.flag(t,`error`),...getTestNames(o)})}async function toMatchFileSnapshotImpl(e){let{assertion:t}=e;validateAssertion(t);let r=getTestNames(getTest(t)),o=getSnapshotClient().getSnapshotState(r.filepath),s=await o.environment.resolveRawPath(r.filepath,e.filepath),c=await o.environment.readSnapshotFile(s);return getSnapshotClient().match({received:e.received,message:e.hint,rawSnapshot:{file:s,content:c??void 0},...r})}function assertMatchResult(e,t){if(!e.pass){let r=(t?`${t}: `:``)+e.message();throw Object.assign(Error(r),{actual:e.actual,expected:e.expected,diffOptions:{expand:getWorkerState().config.snapshotOptions.expand}})}}use(JestExtend),use(JestChaiExpect),use(ChaiStyleAssertions),use(SnapshotPlugin),use(JestAsymmetricMatchers);function createExpect(t){let r=e(((e,o)=>{let{assertionCalls:s}=getState(r);setState({assertionCalls:s+1},r);let c=expect(e,o),u=t||void 0;return u?c.withTest(u):c}),`expect`);Object.assign(r,expect),Object.assign(r,globalThis[Wn]),r.getState=()=>getState(r),r.setState=e=>setState(e,r);let o=getState(globalThis[Un])||{};setState({...o,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return getWorkerState().filepath},currentTestName:t?t.fullTestName??``:o.currentTestName},r),r.assert=assert$1,r.extend=e=>expect.extend(r,e),r.addEqualityTesters=e=>addCustomEqualityTesters(e),r.soft=(...e)=>r(...e).withContext({soft:!0}),r.poll=createExpectPoll(r),r.unreachable=e=>{assert$1.fail(`expected${e?` "${e}" `:` `}not to be reached`)};function assertions(e){let errorGen=()=>Error(`expected number of assertions to be ${e}, but got ${r.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(errorGen(),assertions),r.setState({expectedAssertionsNumber:e,expectedAssertionsNumberErrorGen:errorGen})}function hasAssertions(){let e=Error(`expected any number of assertion, but got none`);Error.captureStackTrace&&Error.captureStackTrace(e,hasAssertions),r.setState({isExpectingAssertions:!0,isExpectingAssertionsError:e})}return R.addMethod(r,`assertions`,assertions),R.addMethod(r,`hasAssertions`,hasAssertions),r.extend(Gn),r}const fi=createExpect();Object.defineProperty(globalThis,Un,{value:fi,writable:!0,configurable:!0});let pi=`sourceMa`;pi+=`ppingURL`,typeof process<`u`&&process.platform,async function(){}.constructor,new TextDecoder,typeof Buffer==`function`&&Buffer.from;var mi=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,hi=new Uint8Array(64),gi=new Uint8Array(128);for(let e=0;e<mi.length;e++){let t=mi.charCodeAt(e);hi[e]=t,gi[t]=e}RegExp(`//# ${pi}=data:application/json;base64,(.+)`),Error.prepareStackTrace;const _i=`vite-module-runner:import-meta-resolve/v1/`;`${JSON.stringify(_i)}${JSON.stringify(_i)}`,`${_i}`,new Proxy({},{get(e,t){throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(t)}" instead.`)}});var vi=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),yi=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),bi=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),xi=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Si=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||(`get`in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,s)}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]})),r=e&&e.__exportStar||function(e,r){for(var o in e)o!==`default`&&!Object.prototype.hasOwnProperty.call(r,o)&&t(r,e,o)};Object.defineProperty(e,`__esModule`,{value:!0}),e.expectTypeOf=void 0,r(vi(),e),r(yi(),e),r(bi(),e),r(xi(),e);let fn=()=>!0,expectTypeOf=t=>{let r=[`parameters`,`returns`,`resolves`,`not`,`items`,`constructorParameters`,`thisParameter`,`instance`,`guards`,`asserts`,`branded`],o={toBeAny:fn,toBeUnknown:fn,toBeNever:fn,toBeFunction:fn,toBeObject:fn,toBeArray:fn,toBeString:fn,toBeNumber:fn,toBeBoolean:fn,toBeVoid:fn,toBeSymbol:fn,toBeNull:fn,toBeUndefined:fn,toBeNullable:fn,toBeBigInt:fn,toMatchTypeOf:fn,toEqualTypeOf:fn,toBeConstructibleWith:fn,toMatchObjectType:fn,toExtend:fn,map:e.expectTypeOf,toBeCallableWith:e.expectTypeOf,extract:e.expectTypeOf,exclude:e.expectTypeOf,pick:e.expectTypeOf,omit:e.expectTypeOf,toHaveProperty:e.expectTypeOf,parameter:e.expectTypeOf};return r.forEach(t=>Object.defineProperty(o,t,{get:()=>(0,e.expectTypeOf)({})})),o};e.expectTypeOf=expectTypeOf}))();export{$ as n,Si as t};
109
- //# sourceMappingURL=dist-QvsLCO1I.js.map
128
+ `);return parseSingleStack(t[t.findLastIndex(t=>t.includes(` at Object.${e}`)||t.includes(`${e}@`)||t.includes(` at ${e} (`))+1])?.file||``}const ui=[`matchSnapshot`,`toMatchSnapshot`,`toMatchInlineSnapshot`,`toThrowErrorMatchingSnapshot`,`toThrowErrorMatchingInlineSnapshot`,`throws`,`Throw`,`throw`,`toThrow`,`toThrowError`];function throwWithCause(e,t){throw e.cause??=Error(`Matcher did not succeed in time.`),copyStackTrace(e,t)}function createExpectPoll(e){return function poll(t,r={}){let o=getWorkerState().config.expect?.poll??{},{interval:s=o.interval??50,timeout:c=o.timeout??1e3,message:u}=r,d=e(null,u).withContext({poll:!0});t=t.bind(d),V.flag(d,`_poll.fn`,t),V.flag(d,`_poll.timeout`,c),V.flag(d,`_poll.interval`,s);let p=V.flag(d,`vitest-test`);if(!p)throw Error(`expect.poll() must be called inside a test`);let m=new Proxy(d,{get(e,r,o){let u=Reflect.get(e,r,o);if(typeof u!=`function`)return u instanceof K?m:u;if(r===`assert`)return u;if(typeof r==`string`&&ui.includes(r))throw SyntaxError(`expect.poll() is not supported in combination with .${r}(). Use vi.waitFor() if your assertion condition is unstable.`);return function __VITEST_POLL_CHAIN__(...e){let o=Error(`STACK_TRACE_ERROR`),promise=async()=>{V.flag(d,`_name`,r),V.flag(d,`error`,o);let p=V.flag(d,`_poll.onSettled`);if(Object.getOwnPropertyDescriptor(u,`__vitest_poll_takeover__`)?.value)try{let t=await u.call(d,...e);return await p?.({assertion:d,status:`pass`}),t}catch(e){await p?.({assertion:d,status:`fail`}),throwWithCause(e,o)}let{setTimeout:m,clearTimeout:h}=getSafeTimers(),g=`fn`,_=!1,y=m(()=>{_=!0},c);try{for(;;){let r=_;r&&V.flag(d,`_isLastPollAttempt`,!0);try{g=`fn`;let r=await t();V.flag(d,`object`,r),g=`assertion`;let o=await u.call(d,...e);return await p?.({assertion:d,status:`pass`}),o}catch(e){(r||g===`assertion`&&V.flag(d,`_poll.assert_once`))&&(await p?.({assertion:d,status:`fail`}),throwWithCause(e,o)),await delay(s,m),$.isFakeTimers()&&$.advanceTimersByTime(s)}}}finally{h(y)}},m=!1;p.onFinished??=[],p.onFinished.push(()=>{if(!m){let e=V.flag(d,`negate`)?`not.`:``,t=`expect.${V.flag(d,`_poll.element`)?`element(locator)`:`poll(assertion)`}.${e}${String(r)}()`;throw copyStackTrace(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)}});let h;return{then(e,t){return m=!0,(h||=promise()).then(e,t)},catch(e){return m=!0,(h||=promise()).catch(e)},finally(e){return m=!0,(h||=promise()).finally(e)},[Symbol.toStringTag]:`Promise`}}}});return m}}function copyStackTrace(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}let di;function getSnapshotClient(){return di||=new SnapshotClient({isEqual:(e,t)=>equals(e,t,[iterableEquality,subsetEquality])}),di}function getError(e,t){if(typeof e!=`function`){if(!t)throw Error(`expected must be a function, received ${typeof e}`);return e}try{e()}catch(e){return e}throw Error(`snapshot function didn't throw`)}function getTestNames(e){return{filepath:e.file.filepath,name:getNames(e).slice(1).join(` > `),testId:e.id}}function getAssertionName(e){let t=V.flag(e,`_name`);if(!t)throw Error(`Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.`);return t}function getTest(e){let t=V.flag(e,`vitest-test`);if(!t)throw Error(`'${getAssertionName(e)}' cannot be used without test context`);return t}function validateAssertion(e){if(V.flag(e,`negate`))throw Error(`${getAssertionName(e)} cannot be used with "not"`)}const SnapshotPlugin=(e,t)=>{for(let r of[`matchSnapshot`,`toMatchSnapshot`])t.addMethod(e.Assertion.prototype,r,wrapAssertion(t,r,function(r,o){return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:t.flag(this,`object`),...normalizeArguments(r,o)}),e.util.flag(this,`message`))}));t.addMethod(e.Assertion.prototype,`toMatchFileSnapshot`,function(r,o){t.flag(this,`_name`,`toMatchFileSnapshot`),validateAssertion(this);let s=toMatchFileSnapshotImpl({assertion:this,received:t.flag(this,`object`),filepath:r,hint:o}).then(t=>assertMatchResult(t,e.util.flag(this,`message`)));return recordAsyncExpect(getTest(this),s,createAssertionMessage(t,this,!0),Error(`resolves`),t.flag(this,`soft`))}),t.addMethod(e.Assertion.prototype,`toMatchInlineSnapshot`,wrapAssertion(t,`toMatchInlineSnapshot`,function __INLINE_SNAPSHOT_OFFSET_3__(r,o,s){return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:t.flag(this,`object`),isInline:!0,...normalizeInlineArguments(r,o,s)}),e.util.flag(this,`message`))})),t.addMethod(e.Assertion.prototype,`toThrowErrorMatchingSnapshot`,wrapAssertion(t,`toThrowErrorMatchingSnapshot`,function(r,o){validateAssertion(this);let s=t.flag(this,`object`),c=t.flag(this,`promise`);return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:getError(s,c),...normalizeArguments(r,o)}),e.util.flag(this,`message`))})),t.addMethod(e.Assertion.prototype,`toThrowErrorMatchingInlineSnapshot`,wrapAssertion(t,`toThrowErrorMatchingInlineSnapshot`,function __INLINE_SNAPSHOT_OFFSET_3__(r,o){validateAssertion(this);let s=t.flag(this,`object`),c=t.flag(this,`promise`);return assertMatchResult(toMatchSnapshotImpl({assertion:this,received:getError(s,c),isInline:!0,...normalizeInlineArguments(void 0,r,o)}),e.util.flag(this,`message`))})),t.addMethod(e.expect,`addSnapshotSerializer`,addSerializer)};function normalizeArguments(e,t){return typeof e==`string`?{hint:e}:{properties:e,hint:t}}function normalizeInlineArguments(e,t,r){let o;return typeof e==`string`?(o=stripSnapshotIndentation(e),{inlineSnapshot:o,hint:t}):(t&&(o=stripSnapshotIndentation(t)),{properties:e,inlineSnapshot:o,hint:r})}function toMatchSnapshotImpl(e){let{assertion:t}=e;validateAssertion(t);let r=getAssertionName(t),o=getTest(t);return getSnapshotClient().match({received:e.received,properties:e.properties,message:e.hint,isInline:e.isInline,inlineSnapshot:e.inlineSnapshot,assertionName:r,error:V.flag(t,`error`),...getTestNames(o)})}async function toMatchFileSnapshotImpl(e){let{assertion:t}=e;validateAssertion(t);let r=getTestNames(getTest(t)),o=getSnapshotClient().getSnapshotState(r.filepath),s=await o.environment.resolveRawPath(r.filepath,e.filepath),c=await o.environment.readSnapshotFile(s);return getSnapshotClient().match({received:e.received,message:e.hint,rawSnapshot:{file:s,content:c??void 0},...r})}function assertMatchResult(e,t){if(!e.pass){let r=(t?`${t}: `:``)+e.message();throw Object.assign(Error(r),{actual:e.actual,expected:e.expected,diffOptions:{expand:getWorkerState().config.snapshotOptions.expand}})}}use(JestExtend),use(JestChaiExpect),use(ChaiStyleAssertions),use(SnapshotPlugin),use(JestAsymmetricMatchers);function createExpect(t){let r=e(((e,o)=>{let{assertionCalls:s}=getState(r);setState({assertionCalls:s+1},r);let c=expect(e,o),u=t||void 0;return u?c.withTest(u):c}),`expect`);Object.assign(r,expect),Object.assign(r,globalThis[Un]),r.getState=()=>getState(r),r.setState=e=>setState(e,r);let o=getState(globalThis[Hn])||{};setState({...o,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return getWorkerState().filepath},currentTestName:t?t.fullTestName??``:o.currentTestName},r),r.assert=assert$1,r.extend=e=>expect.extend(r,e),r.addEqualityTesters=e=>addCustomEqualityTesters(e),r.soft=(...e)=>r(...e).withContext({soft:!0}),r.poll=createExpectPoll(r),r.unreachable=e=>{assert$1.fail(`expected${e?` "${e}" `:` `}not to be reached`)};function assertions(e){let errorGen=()=>Error(`expected number of assertions to be ${e}, but got ${r.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(errorGen(),assertions),r.setState({expectedAssertionsNumber:e,expectedAssertionsNumberErrorGen:errorGen})}function hasAssertions(){let e=Error(`expected any number of assertion, but got none`);Error.captureStackTrace&&Error.captureStackTrace(e,hasAssertions),r.setState({isExpectingAssertions:!0,isExpectingAssertionsError:e})}return V.addMethod(r,`assertions`,assertions),V.addMethod(r,`hasAssertions`,hasAssertions),r.extend(Wn),r}const fi=createExpect();Object.defineProperty(globalThis,Hn,{value:fi,writable:!0,configurable:!0});let pi=`sourceMa`;pi+=`ppingURL`,typeof process<`u`&&process.platform,async function(){}.constructor,new TextDecoder,typeof Buffer==`function`&&Buffer.from;var mi=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,hi=new Uint8Array(64),gi=new Uint8Array(128);for(let e=0;e<mi.length;e++){let t=mi.charCodeAt(e);hi[e]=t,gi[t]=e}RegExp(`//# ${pi}=data:application/json;base64,(.+)`),Error.prepareStackTrace;const _i=`vite-module-runner:import-meta-resolve/v1/`;`${JSON.stringify(_i)}${JSON.stringify(_i)}`,`${_i}`,new Proxy({},{get(e,t){throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(t)}" instead.`)}});var vi=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),yi=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),bi=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),xi=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),Si=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||(`get`in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,s)}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]})),r=e&&e.__exportStar||function(e,r){for(var o in e)o!==`default`&&!Object.prototype.hasOwnProperty.call(r,o)&&t(r,e,o)};Object.defineProperty(e,`__esModule`,{value:!0}),e.expectTypeOf=void 0,r(vi(),e),r(yi(),e),r(bi(),e),r(xi(),e);let fn=()=>!0,expectTypeOf=t=>{let r=[`parameters`,`returns`,`resolves`,`not`,`items`,`constructorParameters`,`thisParameter`,`instance`,`guards`,`asserts`,`branded`],o={toBeAny:fn,toBeUnknown:fn,toBeNever:fn,toBeFunction:fn,toBeObject:fn,toBeArray:fn,toBeString:fn,toBeNumber:fn,toBeBoolean:fn,toBeVoid:fn,toBeSymbol:fn,toBeNull:fn,toBeUndefined:fn,toBeNullable:fn,toBeBigInt:fn,toMatchTypeOf:fn,toEqualTypeOf:fn,toBeConstructibleWith:fn,toMatchObjectType:fn,toExtend:fn,map:e.expectTypeOf,toBeCallableWith:e.expectTypeOf,extract:e.expectTypeOf,exclude:e.expectTypeOf,pick:e.expectTypeOf,omit:e.expectTypeOf,toHaveProperty:e.expectTypeOf,parameter:e.expectTypeOf};return r.forEach(t=>Object.defineProperty(o,t,{get:()=>(0,e.expectTypeOf)({})})),o};e.expectTypeOf=expectTypeOf}))();export{$ as n,Si as t};
129
+ //# sourceMappingURL=dist-C35vdEt2.js.map