@ctrl/dom 0.3.12 → 0.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 (85) hide show
  1. package/dist/aria/_chunks/aria-query.generated-B6BAyxT7.js +4 -0
  2. package/dist/aria/_chunks/aria-query.generated-DK1XMP7F.cjs +4 -0
  3. package/dist/aria/index.cjs +1 -1
  4. package/dist/aria/index.js +1 -1
  5. package/dist/aria/internal.cjs +1 -1
  6. package/dist/aria/internal.js +1 -1
  7. package/dist/aria/types/data/aria-query.generated.d.ts +1 -1
  8. package/dist/bridge/internal.js +1 -1
  9. package/dist/dom/_chunks/src-BISULkzm.js +50 -0
  10. package/dist/dom/index.js +1 -1
  11. package/dist/dom/internal.js +1 -1
  12. package/dist/dom/types/collections/iterator.d.ts +9 -0
  13. package/dist/dom/types/css/cascade.d.ts +2 -0
  14. package/dist/dom/types/css/data/properties.d.ts +1 -1
  15. package/dist/dom/types/css/declarations.d.ts +2 -0
  16. package/dist/dom/types/css/tokenizer.d.ts +8 -1
  17. package/dist/dom/types/css/values.d.ts +3 -3
  18. package/dist/dom/types/css/view.d.ts +0 -8
  19. package/dist/dom/types/events/Event.d.ts +13 -1
  20. package/dist/dom/types/events/handlers.d.ts +2 -0
  21. package/dist/dom/types/html/HTMLElement.d.ts +7 -5
  22. package/dist/dom/types/html/aria-reflection.d.ts +5 -0
  23. package/dist/dom/types/html/custom-elements.d.ts +0 -1
  24. package/dist/dom/types/html/elements.d.ts +0 -4
  25. package/dist/dom/types/html/forms/HTMLButtonElement.d.ts +2 -9
  26. package/dist/dom/types/html/forms/HTMLFieldSetElement.d.ts +0 -4
  27. package/dist/dom/types/html/forms/HTMLInputElement.d.ts +11 -30
  28. package/dist/dom/types/html/forms/HTMLOutputElement.d.ts +4 -13
  29. package/dist/dom/types/html/forms/HTMLSelectElement.d.ts +2 -3
  30. package/dist/dom/types/html/forms/HTMLTextAreaElement.d.ts +11 -11
  31. package/dist/dom/types/html/forms/collections.d.ts +5 -0
  32. package/dist/dom/types/html/forms/common.d.ts +7 -0
  33. package/dist/dom/types/html/forms/selection.d.ts +43 -0
  34. package/dist/dom/types/html/forms/validation.d.ts +7 -2
  35. package/dist/dom/types/html/shared.d.ts +4 -0
  36. package/dist/dom/types/html/svg-types.d.ts +1 -1
  37. package/dist/dom/types/internal.d.ts +2 -1
  38. package/dist/dom/types/nodes/Document.d.ts +1 -1
  39. package/dist/dom/types/nodes/Element.d.ts +16 -20
  40. package/dist/dom/types/nodes/Node.d.ts +1 -1
  41. package/dist/dom/types/nodes/attributes.d.ts +7 -0
  42. package/dist/dom/types/nodes/tags.d.ts +2 -0
  43. package/dist/dom/types/nodes/tree.d.ts +1 -1
  44. package/dist/dom/types/parser/entities-data.d.ts +3 -3
  45. package/dist/dom/types/parser/tokenizer.d.ts +1 -0
  46. package/dist/dom/types/parser/treebuilder.d.ts +7 -2
  47. package/dist/dom/types/selectors/compile.d.ts +7 -4
  48. package/dist/dom/types/selectors/parser.d.ts +0 -63
  49. package/dist/dom/types/serializer/index.d.ts +4 -1
  50. package/dist/dom/types/traversal/Range.d.ts +3 -0
  51. package/dist/dom/types/window/Window.d.ts +2 -2
  52. package/dist/dom/types/window/clock.d.ts +6 -2
  53. package/dist/dom/types/window/fallbacks.d.ts +0 -8
  54. package/dist/dom/types/window/hooks.d.ts +1 -2
  55. package/dist/dom/types/window/interfaces.d.ts +0 -2
  56. package/dist/dom/types/window/media.d.ts +1 -6
  57. package/dist/dom/types/window/xhr.d.ts +4 -0
  58. package/dist/jest-dom/_chunks/{matchers-DGsBvtWC.js → matchers-D7d49HIF.js} +7 -7
  59. package/dist/jest-dom/_chunks/{matchers-DJmRgUYG.cjs → matchers-lhGtjS66.cjs} +7 -7
  60. package/dist/jest-dom/index.cjs +1 -1
  61. package/dist/jest-dom/index.js +1 -1
  62. package/dist/jest-dom/jest-globals.cjs +1 -1
  63. package/dist/jest-dom/jest-globals.js +1 -1
  64. package/dist/jest-dom/matchers.cjs +1 -1
  65. package/dist/jest-dom/matchers.js +1 -1
  66. package/dist/jest-dom/vitest.cjs +1 -1
  67. package/dist/jest-dom/vitest.js +1 -1
  68. package/dist/testing-library/_chunks/aria-snapshot-diff-DKpjI9CA.cjs +16 -0
  69. package/dist/testing-library/_chunks/{aria-snapshot-diff-BSXxnyqJ.js → aria-snapshot-diff-DdhypD1z.js} +6 -6
  70. package/dist/testing-library/agent.cjs +2 -2
  71. package/dist/testing-library/agent.js +7 -7
  72. package/dist/testing-library/index.cjs +8 -8
  73. package/dist/testing-library/index.js +10 -10
  74. package/dist/user-event/index.cjs +15 -15
  75. package/dist/user-event/index.js +16 -16
  76. package/dist/user-event/types/clipboard/copy.d.ts +6 -0
  77. package/dist/user-event/types/ctrl-dom.d.ts +17 -16
  78. package/dist/user-event/types/event/eventMap.d.ts +99 -99
  79. package/dist/user-event/types/setup/dtl.d.ts +0 -6
  80. package/dist/user-event/types/system/index.d.ts +1 -0
  81. package/package.json +1 -1
  82. package/dist/aria/_chunks/aria-query.generated-BG-n1PE9.js +0 -4
  83. package/dist/aria/_chunks/aria-query.generated-BqD80bJk.cjs +0 -4
  84. package/dist/dom/_chunks/src-B3vkUXY6.js +0 -50
  85. package/dist/testing-library/_chunks/aria-snapshot-diff-B95LLutl.cjs +0 -16
@@ -1,6 +1,6 @@
1
1
  import { EventTarget } from "../events/EventTarget.js";
2
2
  import type { EventListenerOrEventListenerObject } from "../webidl.js";
3
- import { type MediaFeatureEnvironment } from "./hooks.js";
3
+ import type { MediaFeatureEnvironment } from "./hooks.js";
4
4
  import type { Window } from "./Window.js";
5
5
  import { $listenerTypesChanged, $matches, $media, $onchange, $window } from "../keys.js";
6
6
  export declare class MediaQueryList extends EventTarget {
@@ -25,8 +25,3 @@ export declare class MediaQueryList extends EventTarget {
25
25
  /** https://drafts.csswg.org/cssom-view/#evaluate-media-queries-and-report-changes */
26
26
  export declare function reportMediaQueryChanges(window: Window): void;
27
27
  export declare function mediaEnvironment(window: Window): MediaFeatureEnvironment;
28
- export declare function evaluateMediaQuery(query: string, window: Window): boolean;
29
- type Features = Record<string, string | number> | undefined;
30
- /** https://drafts.csswg.org/mediaqueries-5/#mq-list — true if any query in the list matches. */
31
- export declare function evaluateMediaQueryList(list: string, env: MediaFeatureEnvironment, features?: Features): boolean;
32
- export {};
@@ -4,6 +4,10 @@ import { Document } from "../nodes/Document.js";
4
4
  import type { Window } from "./Window.js";
5
5
  import { $xhr } from "../keys.js";
6
6
  type Task = NonNullable<ReturnType<Window["_closeable"]>>;
7
+ /**
8
+ * Fields are `declare`d: the constructor assigns each one (a class field would define it as
9
+ * `undefined` first).
10
+ */
7
11
  declare class XhrState {
8
12
  window: Window | null;
9
13
  state: number;
@@ -15,17 +15,17 @@ import{createRequire as e}from"node:module";import{prettyDOM as t,queries as n}f
15
15
  `)}}function toAppearBefore(e,t){return checkToAppear(this,`toAppearBefore`,4,e,t)}function toAppearAfter(e,t){return checkToAppear(this,`toAppearAfter`,2,e,t)}function toHaveTextContent(e,t,n={normalizeWhitespace:!0}){checkNode(e,toHaveTextContent,this);let r=n.normalizeWhitespace?normalize(e.textContent):e.textContent.replace(/ /g,` `),i=r!==``&&t===``;return{pass:!i&&matches(r,t),message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveTextContent`,`element`,``),i?`Checking with empty string will always match, use .toBeEmptyDOMElement() instead`:`Expected element ${e} have text content`,t,`Received`,r)}}}function printAttribute(e,t,n){return n===void 0?t:`${t}=${e(n)}`}function getAttributeComment(e,t,n){return n===void 0?`element.hasAttribute(${e(t)})`:`element.getAttribute(${e(t)}) === ${e(n)}`}function toHaveAttribute(e,t,n){checkHtmlElement(e,toHaveAttribute,this);let r=n!==void 0,i=e.hasAttribute(t),a=e.getAttribute(t);return{pass:r?i&&this.equals(a,n):i,message:()=>{let e=this.isNot?`not to`:`to`,o=i?printAttribute(this.utils.stringify,t,a):null,s=this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveAttribute`,`element`,this.utils.printExpected(t),{secondArgument:r?this.utils.printExpected(n):void 0,comment:getAttributeComment(this.utils.stringify,t,n)});return getMessage(this,s,`Expected the element ${e} have attribute`,printAttribute(this.utils.stringify,t,n),`Received`,o)}}}function getExpectedClassNamesAndOptions(e){let t=e.pop(),n,r;return typeof t==`object`&&!(t instanceof RegExp)?(n=e,r=t):(n=e.concat(t),r={exact:!1}),{expectedClassNames:n,options:r}}function splitClassNames(e){return e?e.split(/\s+/).filter(e=>e.length>0):[]}function isSubset$1(e,t){return e.every(e=>typeof e==`string`?t.includes(e):t.some(t=>e.test(t)))}__name(isSubset$1,`isSubset`);function toHaveClass(e,...t){checkHtmlElement(e,toHaveClass,this);let{expectedClassNames:n,options:r}=getExpectedClassNamesAndOptions(t),i=splitClassNames(e.getAttribute(`class`)),a=n.reduce((e,t)=>e.concat(typeof t==`string`||!t?splitClassNames(t):t),[]),o=a.some(e=>e instanceof RegExp);if(r.exact&&o)throw Error(`Exact option does not support RegExp expected class names`);return r.exact?{pass:isSubset$1(a,i)&&a.length===i.length,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveClass`,`element`,this.utils.printExpected(a.join(` `))),`Expected the element ${e} have EXACTLY defined classes`,a.join(` `),`Received`,i.join(` `))}}:a.length>0?{pass:isSubset$1(a,i),message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveClass`,`element`,this.utils.printExpected(a.join(` `))),`Expected the element ${e} have class`,a.join(` `),`Received`,i.join(` `))}}:{pass:this.isNot?i.length>0:!1,message:()=>this.isNot?getMessage(this,this.utils.matcherHint(`.not.toHaveClass`,`element`,``),`Expected the element to have classes`,`(none)`,`Received`,i.join(` `)):[this.utils.matcherHint(`.toHaveClass`,`element`),`At least one expected class must be provided.`].join(`
16
16
  `)}}function toHaveValue(e,t){if(checkHtmlElement(e,toHaveValue,this),e.tagName.toLowerCase()===`input`&&[`checkbox`,`radio`].includes(e.type))throw Error(`input with type=checkbox or type=radio cannot be used with .toHaveValue(). Use .toBeChecked() for type=checkbox or .toHaveFormValues() instead`);let n=getSingleElementValue(e),r=t!==void 0,i=t,a=n;return t==n&&t!==n&&(i=`${t} (${typeof t})`,a=`${n} (${typeof n})`),{pass:r?compareAsSet(n,t):!!n,message:()=>{let e=this.isNot?`not to`:`to`,n=this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveValue`,`element`,t);return getMessage(this,n,`Expected the element ${e} have value`,r?i:`(any)`,`Received`,a)}}}function getValues(e,t){if(e!==`select`)return[t.value];let n=[],r=t.options;for(let e=0;e<r.length;e++){let t=r[e];t.selected&&n.push(t.textContent)}return n}function toHaveDisplayValue(e,t){checkHtmlElement(e,toHaveDisplayValue,this);let n=e.tagName.toLowerCase();if(![`select`,`input`,`textarea`].includes(n))throw Error(`.toHaveDisplayValue() currently supports only input, textarea or select elements, try with another matcher instead.`);if(n===`input`&&[`radio`,`checkbox`].includes(e.type))throw Error(`.toHaveDisplayValue() currently does not support input[type="${e.type}"], try with another matcher instead.`);let r=getValues(n,e),i=t instanceof Array?t:[t],a=i.filter(e=>r.some(t=>e instanceof RegExp?e.test(t):this.equals(t,String(e)))).length,o=a===r.length,s=a===i.length;return{pass:o&&s,message:()=>getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveDisplayValue`,`element`,``),`Expected element ${this.isNot?`not `:``}to have display value`,t,`Received`,r)}}function getMultiElementValue(e){let t=[...new Set(e.map(e=>e.type))];if(t.length!==1)throw Error(`Multiple form elements with the same name must be of the same type`);switch(t[0]){case`radio`:{let t=e.find(e=>e.checked);return t?t.value:void 0}case`checkbox`:return e.filter(e=>e.checked).map(e=>e.value);default:return e.map(e=>e.value)}}function getFormValue(e){if(e!==void 0)switch(e.length){case 1:return getSingleElementValue(e[0]);default:return getMultiElementValue(e)}}function getPureName(e){return e.endsWith(`[]`)?e.slice(0,-2):e}function getAllFormValues(e){let t=/* @__PURE__ */ new Map;for(let n of e.querySelectorAll(`[name]`)){let e=n.getAttribute(`name`),r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}let n={};for(let r of Array.from(e.elements)){let e=r.name;n[getPureName(e)]=getFormValue(t.get(e))}return n}function toHaveFormValues(e,t){if(checkHtmlElement(e,toHaveFormValues,this),!e.elements)throw Error(`toHaveFormValues must be called on a form or a fieldset`);let n=getAllFormValues(e);return{pass:Object.entries(t).every(([e,t])=>compareAsSet(n[e],t)),message:()=>{let e=this.isNot?`not to`:`to`,r=`${this.isNot?`.not`:``}.toHaveFormValues`,i={};for(let e of Object.keys(n))Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=n[e]);return[this.utils.matcherHint(r,`element`,``),`Expected the element ${e} have form values`,this.utils.diff(t,i)].join(`
17
17
 
18
- `)}}}function getSelection(e){let t=e.ownerDocument.getSelection();if([`input`,`textarea`].includes(e.tagName.toLowerCase()))return[`radio`,`checkbox`].includes(e.type)?``:e.value.toString().substring(e.selectionStart,e.selectionEnd);if(t.anchorNode===null||t.focusNode===null)return``;let n=t.getRangeAt(0),r=e.ownerDocument.createRange();if(t.containsNode(e,!1))r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r);else if(!(e.contains(t.anchorNode)&&e.contains(t.focusNode))){let i=e===n.startContainer||e.contains(n.startContainer),a=e===n.endContainer||e.contains(n.endContainer);t.removeAllRanges(),(i||a)&&(r.selectNodeContents(e),i&&r.setStart(n.startContainer,n.startOffset),a&&r.setEnd(n.endContainer,n.endOffset),t.addRange(r))}let i=t.toString();return t.removeAllRanges(),t.addRange(n),i}function toHaveSelection(e,t){checkHtmlElement(e,toHaveSelection,this);let n=t!==void 0;if(n&&typeof t!=`string`)throw Error(`expected selection must be a string or undefined`);let r=getSelection(e);return{pass:n?compareAsSet(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`,i=this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveSelection`,`element`,t);return getMessage(this,i,`Expected the element ${e} have selection`,n?t:`(any)`,`Received`,r)}}}let T=null;function foreign(){return T??=e(import.meta.url)(`dom-accessibility-api`)}function computeAccessibleName(e){return e[o]===void 0?foreign().computeAccessibleName(e):r.computeAccessibleName(e)}function computeAccessibleDescription(e){return e[o]===void 0?foreign().computeAccessibleDescription(e):r.computeAccessibleDescription(e)}const E=[[`input`,[[`list`,`+`],[`type`,`=email`]],!1,[`combobox`]],[`input`,[[`list`,`+`],[`type`,`=search`]],!1,[`combobox`]],[`input`,[[`list`,`+`],[`type`,`=tel`]],!1,[`combobox`]],[`input`,[[`list`,`+`]],!0,[`combobox`]],[`input`,[[`list`,`+`],[`type`,`=url`]],!1,[`combobox`]],[`select`,[[`multiple`,`-`],[`size`,`-`]],!1,[`combobox`]],[`input`,[[`list`,`-`],[`type`,`=search`]],!1,[`searchbox`]],[`input`,[[`type`,`-`],[`list`,`-`]],!1,[`textbox`]],[`input`,[[`list`,`-`],[`type`,`=email`]],!1,[`textbox`]],[`input`,[[`list`,`-`],[`type`,`=tel`]],!1,[`textbox`]],[`input`,[[`list`,`-`]],!0,[`textbox`]],[`input`,[[`list`,`-`],[`type`,`=url`]],!1,[`textbox`]],[`input`,[[`type`,`=button`]],!1,[`button`]],[`input`,[[`type`,`=image`]],!1,[`button`]],[`input`,[[`type`,`=reset`]],!1,[`button`]],[`input`,[[`type`,`=submit`]],!1,[`button`]],[`input`,[[`type`,`=checkbox`]],!1,[`checkbox`]],[`th`,[[`scope`,`=col`]],!1,[`columnheader`]],[`th`,[[`scope`,`=colgroup`]],!1,[`columnheader`]],[`aside`,[[`aria-label`,`+`]],!1,[`complementary`]],[`aside`,[[`aria-labelledby`,`+`]],!1,[`complementary`]],[`form`,[[`aria-label`,`+`]],!1,[`form`]],[`form`,[[`aria-labelledby`,`+`]],!1,[`form`]],[`form`,[[`name`,`+`]],!1,[`form`]],[`img`,[[`alt`,`+`]],!1,[`img`]],[`img`,[[`alt`,`-`]],!1,[`img`]],[`a`,[[`href`,`+`]],!1,[`link`]],[`area`,[[`href`,`+`]],!1,[`link`]],[`select`,[[`size`,`+`]],!1,[`listbox`]],[`select`,[[`multiple`,`+`]],!1,[`listbox`]],[`img`,[[`alt`,`+`]],!1,[`presentation`]],[`input`,[[`type`,`=radio`]],!1,[`radio`]],[`section`,[[`aria-label`,`+`]],!1,[`region`]],[`section`,[[`aria-labelledby`,`+`]],!1,[`region`]],[`th`,[[`scope`,`=row`]],!1,[`rowheader`]],[`th`,[[`scope`,`=rowgroup`]],!1,[`rowheader`]],[`input`,[[`type`,`=range`]],!1,[`slider`]],[`input`,[[`type`,`=number`]],!1,[`spinbutton`]],[`article`,[],!1,[`article`]],[`header`,[],!1,[`banner`]],[`blockquote`,[],!1,[`blockquote`]],[`button`,[],!1,[`button`]],[`caption`,[],!1,[`caption`]],[`td`,[],!1,[`cell`]],[`code`,[],!1,[`code`]],[`th`,[],!1,[`columnheader`]],[`aside`,[],!1,[`complementary`]],[`footer`,[],!1,[`contentinfo`]],[`dd`,[],!1,[`definition`]],[`del`,[],!1,[`deletion`]],[`dialog`,[],!1,[`dialog`]],[`html`,[],!1,[`document`]],[`em`,[],!1,[`emphasis`]],[`figure`,[],!1,[`figure`]],[`a`,[],!1,[`generic`]],[`area`,[],!1,[`generic`]],[`aside`,[],!1,[`generic`]],[`b`,[],!1,[`generic`]],[`bdo`,[],!1,[`generic`]],[`body`,[],!1,[`generic`]],[`data`,[],!1,[`generic`]],[`div`,[],!1,[`generic`]],[`footer`,[],!1,[`generic`]],[`header`,[],!1,[`generic`]],[`hgroup`,[],!1,[`generic`]],[`i`,[],!1,[`generic`]],[`pre`,[],!1,[`generic`]],[`q`,[],!1,[`generic`]],[`samp`,[],!1,[`generic`]],[`section`,[],!1,[`generic`]],[`small`,[],!1,[`generic`]],[`span`,[],!1,[`generic`]],[`u`,[],!1,[`generic`]],[`td`,[],!1,[`gridcell`]],[`details`,[],!1,[`group`]],[`fieldset`,[],!1,[`group`]],[`optgroup`,[],!1,[`group`]],[`address`,[],!1,[`group`]],[`h1`,[],!1,[`heading`]],[`h2`,[],!1,[`heading`]],[`h3`,[],!1,[`heading`]],[`h4`,[],!1,[`heading`]],[`h5`,[],!1,[`heading`]],[`h6`,[],!1,[`heading`]],[`ins`,[],!1,[`insertion`]],[`menu`,[],!1,[`list`]],[`ol`,[],!1,[`list`]],[`ul`,[],!1,[`list`]],[`datalist`,[],!1,[`listbox`]],[`li`,[],!1,[`listitem`]],[`main`,[],!1,[`main`]],[`mark`,[],!1,[`mark`]],[`math`,[],!1,[`math`]],[`meter`,[],!1,[`meter`]],[`nav`,[],!1,[`navigation`]],[`option`,[],!1,[`option`]],[`p`,[],!1,[`paragraph`]],[`progress`,[],!1,[`progressbar`]],[`tr`,[],!1,[`row`]],[`tbody`,[],!1,[`rowgroup`]],[`tfoot`,[],!1,[`rowgroup`]],[`thead`,[],!1,[`rowgroup`]],[`hr`,[],!1,[`separator`]],[`output`,[],!1,[`status`]],[`strong`,[],!1,[`strong`]],[`sub`,[],!1,[`subscript`]],[`sup`,[],!1,[`superscript`]],[`table`,[],!1,[`table`]],[`dfn`,[],!1,[`term`]],[`dt`,[],!1,[`term`]],[`textarea`,[],!1,[`textbox`]],[`time`,[],!1,[`time`]]];function valueEquals(e,t,n,r){return n===r||(t===`type`||t===`scope`)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`&&n.toLowerCase()===r}function getImplicitAriaRoles(e){let t=e.localName;for(let n=0;n<E.length;n++){let[r,i,a,o]=E[n];if(r!==t||a&&e.type!==`text`)continue;let s=!0;for(let t=0;t<i.length&&s;t++){let[n,r]=i[t],a=e.getAttribute(n);s=r===`-`?a===null:r===`+`?a!==null:a!==null&&valueEquals(e,n,a,r.slice(1))}if(s)return[...o]}return[]}function getExplicitOrImplicitRoles(e){let t=e.getAttribute(`role`);return t===null?e[o]===void 0?getImplicitAriaRoles(e):i(e):t.split(` `).filter(Boolean)}function toHaveRole(e,t){checkHtmlElement(e,toHaveRole,this);let n=getExplicitOrImplicitRoles(e);return{pass:n.some(e=>e===t),message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveRole.name}`,`element`,``),`Expected element ${e} have role`,t,`Received`,n.join(`, `))}}}function toHaveAccessibleName(e,t){checkHtmlElement(e,toHaveAccessibleName,this);let n=computeAccessibleName(e),r=arguments.length===1,i=!1;return i=r?n!==``:t instanceof RegExp?t.test(n):this.equals(n,t),{pass:i,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveAccessibleName.name}`,`element`,``),`Expected element ${e} have accessible name`,t,`Received`,n)}}}function toHaveAccessibleDescription(e,t){checkHtmlElement(e,toHaveAccessibleDescription,this);let n=computeAccessibleDescription(e),r=arguments.length===1,i=!1;return i=r?n!==``:t instanceof RegExp?t.test(n):this.equals(n,t),{pass:i,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveAccessibleDescription.name}`,`element`,``),`Expected element ${e} have accessible description`,t,`Received`,n)}}}const D=`aria-invalid`,O=[`false`];function toHaveAccessibleErrorMessage(e,t){checkHtmlElement(e,toHaveAccessibleErrorMessage,this);let n=this.isNot?`not to`:`to`,r=this.isNot?`.not.toHaveAccessibleErrorMessage`:`.toHaveAccessibleErrorMessage`,i=e.getAttribute(`aria-errormessage`);if(i&&/\s+/.test(i))return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(r,`element`),"Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",``,`Received`,`aria-errormessage="${i}"`)};let a=e.getAttribute(D);if(!e.hasAttribute(D)||O.includes(a))return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(r,`element`),`Expected element to be marked as invalid with attribute`,`${D}="true"`,`Received`,e.hasAttribute(`aria-invalid`)?`${D}="${e.getAttribute(D)}`:null)};let o=normalize(e.ownerDocument.getElementById(i)?.textContent??``);return{pass:t===void 0?!!o:t instanceof RegExp?t.test(o):this.equals(o,t),message:()=>getMessage(this,this.utils.matcherHint(r,`element`),`Expected element ${n} have accessible error message`,t??``,`Received`,o)}}function textOfIdRefs(e,t){let n=(e.getAttribute(t)||``).split(/\s+/).filter(Boolean);if(n.length===0)return``;let r=e.ownerDocument;return normalize(n.map(e=>r.getElementById(e)).filter(Boolean).map(e=>e.textContent).join(` `))}function toHaveDescription(e,t){deprecate(`toHaveDescription`,`Please use toHaveAccessibleDescription.`),checkHtmlElement(e,toHaveDescription,this);let n=t!==void 0,r=textOfIdRefs(e,`aria-describedby`);return{pass:n?t instanceof RegExp?t.test(r):this.equals(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveDescription`,`element`,``),`Expected the element ${e} have description`,this.utils.printExpected(t),`Received`,this.utils.printReceived(r))}}}function toHaveErrorMessage(e,t){if(deprecate(`toHaveErrorMessage`,`Please use toHaveAccessibleErrorMessage.`),checkHtmlElement(e,toHaveErrorMessage,this),!e.hasAttribute(`aria-invalid`)||e.getAttribute(`aria-invalid`)===`false`){let t=this.isNot?`.not`:``;return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(`${t}.toHaveErrorMessage`,`element`,``),`Expected the element to have invalid state indicated by`,`aria-invalid="true"`,`Received`,e.hasAttribute(`aria-invalid`)?`aria-invalid="${e.getAttribute(`aria-invalid`)}"`:this.utils.printReceived(``))}}let n=t!==void 0,r=textOfIdRefs(e,`aria-errormessage`);return{pass:n?t instanceof RegExp?t.test(r):this.equals(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveErrorMessage`,`element`,``),`Expected the element ${e} have error message`,this.utils.printExpected(t),`Received`,this.utils.printReceived(r))}}}const k={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},A=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|grad|rad|turn)?$/i;function channel(e,t){if(e.toLowerCase()===`none`)return 0;let n=A.exec(e);if(n===null)return null;let r=Number(n[1]);return n[2]===void 0?r:n[2]===`%`?r/100*t:null}function hue(e){let t=A.exec(e);if(t===null)return e.toLowerCase()===`none`?0:null;let n=Number(t[1]);switch(t[2]?.toLowerCase()){case void 0:case`deg`:return n;case`grad`:return n*360/400;case`rad`:return n*180/Math.PI;case`turn`:return n*360;default:return null}}function args(e){let t=e.trim();if(t.includes(`,`)){let e=t.split(`,`).map(e=>e.trim());return e.some(e=>e===``||/\s/.test(e))?null:e}let n=t.indexOf(`/`),r=(n===-1?t:t.slice(0,n)).trim().split(/\s+/);return n!==-1&&r.push(t.slice(n+1).trim()),r}const clamp=(e,t,n)=>Math.min(n,Math.max(t,e));function hslToRgb(e,t,n){e=(e%360+360)%360,t=clamp(t,0,1),n=clamp(n,0,1);let f=r=>{let i=(r+e/30)%12,a=t*Math.min(n,1-n);return(n-a*Math.max(-1,Math.min(i-3,9-i,1)))*255};return[f(0),f(8),f(4)]}function key(e,t,n,r){return`${Math.round(clamp(e,0,255))},${Math.round(clamp(t,0,255))},${Math.round(clamp(n,0,255))},${Math.round(clamp(r,0,1)*1e3)}`}function canonicalColor(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();if(t===``)return null;if(t===`transparent`)return key(0,0,0,0);if(t.charCodeAt(0)===35){let e=t.slice(1);if(!/^[0-9a-f]+$/.test(e))return null;let n=e.length,d=(t,n)=>parseInt(e.slice(t,t+n),16)*(n===1?17:1);return n===3||n===4?key(d(0,1),d(1,1),d(2,1),n===4?d(3,1)/255:1):n===6||n===8?key(d(0,2),d(2,2),d(4,2),n===8?d(6,2)/255:1):null}let n=t.indexOf(`(`);if(n===-1){let e=k[t];return e===void 0?null:key(e>>16,e>>8&255,e&255,1)}if(!t.endsWith(`)`))return null;let r=t.slice(0,n),i=args(t.slice(n+1,-1));if(i===null||i.length!==3&&i.length!==4)return null;let a=i.length===4?channel(i[3],1):1;if(a===null)return null;if(r===`rgb`||r===`rgba`){let e=channel(i[0],255),t=channel(i[1],255),n=channel(i[2],255);return e===null||t===null||n===null?null:key(e,t,n,a)}if(r===`hsl`||r===`hsla`){let e=hue(i[0]),t=channel(i[1],1),n=channel(i[2],1);if(e===null||t===null||n===null)return null;let[r,o,s]=hslToRgb(e,i[1].endsWith(`%`)?t:t/100,i[2].endsWith(`%`)?n:n/100);return key(r,o,s,a)}return null}function sameColor(e,t){let n=canonicalColor(e);return n!==null&&n===canonicalColor(t)}function nodeNameIs(e,t,n){return e.prefix===null?(e.flags&c)===0?e.name===n:l(e.name)===t:!1}function isElementVisibleImpl(e){let t=null;for(let n=e;n!==null&&n.type===s;t=n,n=n.parent){if(u(n,`display`)===`none`)return!1;let e=u(n,`visibility`);if(e===`hidden`||e===`collapse`||u(n,`opacity`)===`0`||p(n,`hidden`)!==null||nodeNameIs(n,`details`,`DETAILS`)&&(t===null||!nodeNameIs(t,`summary`,`SUMMARY`))&&p(n,`open`)===null)return!1}return!0}function isStyleVisible(e){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r,opacity:i}=t(e);return n!==`none`&&r!==`hidden`&&r!==`collapse`&&i!==`0`&&i!==0}function isAttributeVisible(e,t){let n;return n=t?e.nodeName===`DETAILS`&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0:e.nodeName!==`DETAILS`||e.hasAttribute(`open`),!e.hasAttribute(`hidden`)&&n}function isElementVisible(e,t){return isStyleVisible(e)&&isAttributeVisible(e,t)&&(!e.parentElement||isElementVisible(e.parentElement,e))}function toBeVisible(e){checkHtmlElement(e,toBeVisible,this);let t=e.ownerDocument===e.getRootNode({composed:!0}),n=e[o],r=t&&(n!==void 0&&ee(n)===null?isElementVisibleImpl(n):isElementVisible(e));return{pass:r,message:()=>{let n=r?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeVisible`,`element`,``),``,`Received element ${n} visible${t?``:` (element is not in the document)`}:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
19
- `)}}}function getStyleDeclaration(e,t){let n=normalizedKey(t);if(n!==null){let e=j.get(n);if(e!==void 0)return{...e}}let r={},i=e.createElement(`div`);for(let e of Object.keys(t))i.style[e]=t[e],r[e]=i.style[e];return n!==null&&(j.size>=512&&j.clear(),j.set(n,{...r})),r}const j=/* @__PURE__ */ new Map;function normalizedKey(e){let t=``;for(let n of Object.keys(e)){let r=e[n],i=typeof r;if(i!==`string`&&i!==`number`)return null;t+=`${n}\u0000${i===`number`?`n`:`s`}${r}\u0001`}return t}function valueMatches(e,t){return e===t||sameColor(t,e)}function isSubset(e,t){let n=Object.entries(e);if(n.length===0)return!1;for(let[e,r]of n){let n=e.startsWith(`--`);if(!(valueMatches(t[e],r)||valueMatches(t.getPropertyValue(e),r))){if(!n){let n=e.toLowerCase();if(valueMatches(t[n],r)||valueMatches(t.getPropertyValue(n),r))continue}return!1}}return!0}function printoutStyles(e){return Object.keys(e).sort().map(t=>`${t}: ${e[t]};`).join(`
18
+ `)}}}function getSelection(e){let t=e.ownerDocument.getSelection();if([`input`,`textarea`].includes(e.tagName.toLowerCase()))return[`radio`,`checkbox`].includes(e.type)?``:e.value.toString().substring(e.selectionStart,e.selectionEnd);if(t.anchorNode===null||t.focusNode===null)return``;let n=t.getRangeAt(0),r=e.ownerDocument.createRange();if(t.containsNode(e,!1))r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r);else if(!(e.contains(t.anchorNode)&&e.contains(t.focusNode))){let i=e===n.startContainer||e.contains(n.startContainer),a=e===n.endContainer||e.contains(n.endContainer);t.removeAllRanges(),(i||a)&&(r.selectNodeContents(e),i&&r.setStart(n.startContainer,n.startOffset),a&&r.setEnd(n.endContainer,n.endOffset),t.addRange(r))}let i=t.toString();return t.removeAllRanges(),t.addRange(n),i}function toHaveSelection(e,t){checkHtmlElement(e,toHaveSelection,this);let n=t!==void 0;if(n&&typeof t!=`string`)throw Error(`expected selection must be a string or undefined`);let r=getSelection(e);return{pass:n?compareAsSet(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`,i=this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveSelection`,`element`,t);return getMessage(this,i,`Expected the element ${e} have selection`,n?t:`(any)`,`Received`,r)}}}let T=null;function foreign(){return T??=e(import.meta.url)(`dom-accessibility-api`)}function computeAccessibleName(e){return e[o]===void 0?foreign().computeAccessibleName(e):r.computeAccessibleName(e)}function computeAccessibleDescription(e){return e[o]===void 0?foreign().computeAccessibleDescription(e):r.computeAccessibleDescription(e)}const E=/* @__PURE__ */ `combobox input[list][type=email] input[list][type=search] input[list][type=tel] input[list]{text} input[list][type=url] select[!multiple][!size].searchbox input[!list][type=search].textbox input[!type][!list] input[!list][type=email] input[!list][type=tel] input[!list]{text} input[!list][type=url].button input[type=button] input[type=image] input[type=reset] input[type=submit].checkbox input[type=checkbox].columnheader th[scope=col] th[scope=colgroup].complementary aside[aria-label] aside[aria-labelledby].form form[aria-label] form[aria-labelledby] form[name].img img[alt] img[!alt].link a[href] area[href].listbox select[size] select[multiple].presentation img[alt].radio input[type=radio].region section[aria-label] section[aria-labelledby].rowheader th[scope=row] th[scope=rowgroup].slider input[type=range].spinbutton input[type=number].article article.banner header.blockquote blockquote.button button.caption caption.cell td.code code.columnheader th.complementary aside.contentinfo footer.definition dd.deletion del.dialog dialog.document html.emphasis em.figure figure.generic a area aside b bdo body data div footer header hgroup i pre q samp section small span u.gridcell td.group details fieldset optgroup address.heading h1 h2 h3 h4 h5 h6.insertion ins.list menu ol ul.listbox datalist.listitem li.main main.mark mark.math math.meter meter.navigation nav.option option.paragraph p.progressbar progress.row tr.rowgroup tbody tfoot thead.separator hr.status output.strong strong.subscript sub.superscript sup.table table.term dfn dt.textbox textarea.time time`.split(`.`);function valueEquals(e,t,n,r){return n===r||(t===`type`||t===`scope`)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`&&n.toLowerCase()===r}let D=null;function elementRoles(){if(D!==null)return D;D=[];for(let e of E){let[t,...n]=e.split(` `);for(let e of n){let n=e.endsWith(`{text}`),[r,...i]=(n?e.slice(0,-6):e).split(`[`),a=i.map(e=>{let t=e.indexOf(`=`);return e[0]===`!`?[e.slice(1,-1),`-`]:t===-1?[e.slice(0,-1),`+`]:[e.slice(0,t),e.slice(t,-1)]});D.push([r,a,n,[t]])}}return D}function getImplicitAriaRoles(e){let t=e.localName,n=elementRoles();for(let r=0;r<n.length;r++){let[i,a,o,s]=n[r];if(i!==t||o&&e.type!==`text`)continue;let c=!0;for(let t=0;t<a.length&&c;t++){let[n,r]=a[t],i=e.getAttribute(n);c=r===`-`?i===null:r===`+`?i!==null:i!==null&&valueEquals(e,n,i,r.slice(1))}if(c)return[...s]}return[]}function getExplicitOrImplicitRoles(e){let t=e.getAttribute(`role`);return t===null?e[o]===void 0?getImplicitAriaRoles(e):i(e):t.split(` `).filter(Boolean)}function toHaveRole(e,t){checkHtmlElement(e,toHaveRole,this);let n=getExplicitOrImplicitRoles(e);return{pass:n.some(e=>e===t),message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveRole.name}`,`element`,``),`Expected element ${e} have role`,t,`Received`,n.join(`, `))}}}function toHaveAccessibleName(e,t){checkHtmlElement(e,toHaveAccessibleName,this);let n=computeAccessibleName(e),r=arguments.length===1,i=!1;return i=r?n!==``:t instanceof RegExp?t.test(n):this.equals(n,t),{pass:i,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveAccessibleName.name}`,`element`,``),`Expected element ${e} have accessible name`,t,`Received`,n)}}}function toHaveAccessibleDescription(e,t){checkHtmlElement(e,toHaveAccessibleDescription,this);let n=computeAccessibleDescription(e),r=arguments.length===1,i=!1;return i=r?n!==``:t instanceof RegExp?t.test(n):this.equals(n,t),{pass:i,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveAccessibleDescription.name}`,`element`,``),`Expected element ${e} have accessible description`,t,`Received`,n)}}}const O=`aria-invalid`,k=[`false`];function toHaveAccessibleErrorMessage(e,t){checkHtmlElement(e,toHaveAccessibleErrorMessage,this);let n=this.isNot?`not to`:`to`,r=this.isNot?`.not.toHaveAccessibleErrorMessage`:`.toHaveAccessibleErrorMessage`,i=e.getAttribute(`aria-errormessage`);if(i&&/\s+/.test(i))return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(r,`element`),"Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",``,`Received`,`aria-errormessage="${i}"`)};let a=e.getAttribute(O);if(!e.hasAttribute(O)||k.includes(a))return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(r,`element`),`Expected element to be marked as invalid with attribute`,`${O}="true"`,`Received`,e.hasAttribute(`aria-invalid`)?`${O}="${e.getAttribute(O)}`:null)};let o=normalize(e.ownerDocument.getElementById(i)?.textContent??``);return{pass:t===void 0?!!o:t instanceof RegExp?t.test(o):this.equals(o,t),message:()=>getMessage(this,this.utils.matcherHint(r,`element`),`Expected element ${n} have accessible error message`,t??``,`Received`,o)}}function textOfIdRefs(e,t){let n=(e.getAttribute(t)||``).split(/\s+/).filter(Boolean);if(n.length===0)return``;let r=e.ownerDocument;return normalize(n.map(e=>r.getElementById(e)).filter(Boolean).map(e=>e.textContent).join(` `))}function toHaveDescription(e,t){deprecate(`toHaveDescription`,`Please use toHaveAccessibleDescription.`),checkHtmlElement(e,toHaveDescription,this);let n=t!==void 0,r=textOfIdRefs(e,`aria-describedby`);return{pass:n?t instanceof RegExp?t.test(r):this.equals(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveDescription`,`element`,``),`Expected the element ${e} have description`,this.utils.printExpected(t),`Received`,this.utils.printReceived(r))}}}function toHaveErrorMessage(e,t){if(deprecate(`toHaveErrorMessage`,`Please use toHaveAccessibleErrorMessage.`),checkHtmlElement(e,toHaveErrorMessage,this),!e.hasAttribute(`aria-invalid`)||e.getAttribute(`aria-invalid`)===`false`){let t=this.isNot?`.not`:``;return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(`${t}.toHaveErrorMessage`,`element`,``),`Expected the element to have invalid state indicated by`,`aria-invalid="true"`,`Received`,e.hasAttribute(`aria-invalid`)?`aria-invalid="${e.getAttribute(`aria-invalid`)}"`:this.utils.printReceived(``))}}let n=t!==void 0,r=textOfIdRefs(e,`aria-errormessage`);return{pass:n?t instanceof RegExp?t.test(r):this.equals(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveErrorMessage`,`element`,``),`Expected the element ${e} have error message`,this.utils.printExpected(t),`Received`,this.utils.printReceived(r))}}}const A={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},j=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|grad|rad|turn)?$/i;function channel(e,t){if(e.toLowerCase()===`none`)return 0;let n=j.exec(e);if(n===null)return null;let r=Number(n[1]);return n[2]===void 0?r:n[2]===`%`?r/100*t:null}function hue(e){let t=j.exec(e);if(t===null)return e.toLowerCase()===`none`?0:null;let n=Number(t[1]);switch(t[2]?.toLowerCase()){case void 0:case`deg`:return n;case`grad`:return n*360/400;case`rad`:return n*180/Math.PI;case`turn`:return n*360;default:return null}}function args(e){let t=e.trim();if(t.includes(`,`)){let e=t.split(`,`).map(e=>e.trim());return e.some(e=>e===``||/\s/.test(e))?null:e}let n=t.indexOf(`/`),r=(n===-1?t:t.slice(0,n)).trim().split(/\s+/);return n!==-1&&r.push(t.slice(n+1).trim()),r}const clamp=(e,t,n)=>Math.min(n,Math.max(t,e));function hslToRgb(e,t,n){e=(e%360+360)%360,t=clamp(t,0,1),n=clamp(n,0,1);let f=r=>{let i=(r+e/30)%12,a=t*Math.min(n,1-n);return(n-a*Math.max(-1,Math.min(i-3,9-i,1)))*255};return[f(0),f(8),f(4)]}function key(e,t,n,r){return`${Math.round(clamp(e,0,255))},${Math.round(clamp(t,0,255))},${Math.round(clamp(n,0,255))},${Math.round(clamp(r,0,1)*1e3)}`}function canonicalColor(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();if(t===``)return null;if(t===`transparent`)return key(0,0,0,0);if(t.charCodeAt(0)===35){let e=t.slice(1);if(!/^[0-9a-f]+$/.test(e))return null;let n=e.length,d=(t,n)=>parseInt(e.slice(t,t+n),16)*(n===1?17:1);return n===3||n===4?key(d(0,1),d(1,1),d(2,1),n===4?d(3,1)/255:1):n===6||n===8?key(d(0,2),d(2,2),d(4,2),n===8?d(6,2)/255:1):null}let n=t.indexOf(`(`);if(n===-1){let e=A[t];return e===void 0?null:key(e>>16,e>>8&255,e&255,1)}if(!t.endsWith(`)`))return null;let r=t.slice(0,n),i=args(t.slice(n+1,-1));if(i===null||i.length!==3&&i.length!==4)return null;let a=i.length===4?channel(i[3],1):1;if(a===null)return null;if(r===`rgb`||r===`rgba`){let e=channel(i[0],255),t=channel(i[1],255),n=channel(i[2],255);return e===null||t===null||n===null?null:key(e,t,n,a)}if(r===`hsl`||r===`hsla`){let e=hue(i[0]),t=channel(i[1],1),n=channel(i[2],1);if(e===null||t===null||n===null)return null;let[r,o,s]=hslToRgb(e,i[1].endsWith(`%`)?t:t/100,i[2].endsWith(`%`)?n:n/100);return key(r,o,s,a)}return null}function sameColor(e,t){let n=canonicalColor(e);return n!==null&&n===canonicalColor(t)}function nodeNameIs(e,t,n){return e.prefix===null?(e.flags&c)===0?e.name===n:l(e.name)===t:!1}function isElementVisibleImpl(e){let t=null;for(let n=e;n!==null&&n.type===s;t=n,n=n.parent){if(u(n,`display`)===`none`)return!1;let e=u(n,`visibility`);if(e===`hidden`||e===`collapse`||u(n,`opacity`)===`0`||p(n,`hidden`)!==null||nodeNameIs(n,`details`,`DETAILS`)&&(t===null||!nodeNameIs(t,`summary`,`SUMMARY`))&&p(n,`open`)===null)return!1}return!0}function isStyleVisible(e){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r,opacity:i}=t(e);return n!==`none`&&r!==`hidden`&&r!==`collapse`&&i!==`0`&&i!==0}function isAttributeVisible(e,t){let n;return n=t?e.nodeName===`DETAILS`&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0:e.nodeName!==`DETAILS`||e.hasAttribute(`open`),!e.hasAttribute(`hidden`)&&n}function isElementVisible(e,t){return isStyleVisible(e)&&isAttributeVisible(e,t)&&(!e.parentElement||isElementVisible(e.parentElement,e))}function toBeVisible(e){checkHtmlElement(e,toBeVisible,this);let t=e.ownerDocument===e.getRootNode({composed:!0}),n=e[o],r=t&&(n!==void 0&&ee(n)===null?isElementVisibleImpl(n):isElementVisible(e));return{pass:r,message:()=>{let n=r?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeVisible`,`element`,``),``,`Received element ${n} visible${t?``:` (element is not in the document)`}:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
19
+ `)}}}function getStyleDeclaration(e,t){let n=normalizedKey(t);if(n!==null){let e=M.get(n);if(e!==void 0)return{...e}}let r={},i=e.createElement(`div`);for(let e of Object.keys(t))i.style[e]=t[e],r[e]=i.style[e];return n!==null&&(M.size>=512&&M.clear(),M.set(n,{...r})),r}const M=/* @__PURE__ */ new Map;function normalizedKey(e){let t=``;for(let n of Object.keys(e)){let r=e[n],i=typeof r;if(i!==`string`&&i!==`number`)return null;t+=`${n}\u0000${i===`number`?`n`:`s`}${r}\u0001`}return t}function valueMatches(e,t){return e===t||sameColor(t,e)}function isSubset(e,t){let n=Object.entries(e);if(n.length===0)return!1;for(let[e,r]of n){let n=e.startsWith(`--`);if(!(valueMatches(t[e],r)||valueMatches(t.getPropertyValue(e),r))){if(!n){let n=e.toLowerCase();if(valueMatches(t[n],r)||valueMatches(t.getPropertyValue(n),r))continue}return!1}}return!0}function printoutStyles(e){return Object.keys(e).sort().map(t=>`${t}: ${e[t]};`).join(`
20
20
  `)}function expectedDiff(e,t,n){let r={};for(let e of Array.from(n))t[e]!==void 0&&(r[e]=n.getPropertyValue(e));return e(printoutStyles(t),printoutStyles(r)).replace(`${picoRed(`+ Received`)}\n`,``)}function toHaveStyle(e,t){checkHtmlElement(e,toHaveStyle,this);let n=typeof t==`object`?t:parseCSS(t,toHaveStyle,this),{getComputedStyle:r}=e.ownerDocument.defaultView,i=getStyleDeclaration(e.ownerDocument,n),a=r(e);return{pass:isSubset(i,a),message:()=>{let e=`${this.isNot?`.not`:``}.toHaveStyle`;return[this.utils.matcherHint(e,`element`,``),expectedDiff(this.utils.diff,i,a)].join(`
21
21
 
22
- `)}}}const M=a;let N=null;function checkedRoles(){return N??=M.keys().filter(e=>M.get(e)?.props[`aria-checked`]!==void 0)}function roleSupportsChecked(e){return e!==null&&checkedRoles().includes(e)}function supportedRolesSentence(){return toSentence(checkedRoles().map(e=>`role="${e}"`),{lastWordConnector:` or `})}function toBeChecked(e){checkHtmlElement(e,toBeChecked,this);let isValidInput=()=>e.tagName.toLowerCase()===`input`&&[`checkbox`,`radio`].includes(e.type),isValidAriaElement=()=>roleSupportsChecked(e.getAttribute(`role`))&&[`true`,`false`].includes(e.getAttribute(`aria-checked`));if(!isValidInput()&&!isValidAriaElement())return{pass:!1,message:()=>`only inputs with type="checkbox" or type="radio" or elements with ${supportedRolesSentence()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`};let isChecked=()=>isValidInput()?e.checked:e.getAttribute(`aria-checked`)===`true`;return{pass:isChecked(),message:()=>{let t=isChecked()?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeChecked`,`element`,``),``,`Received element ${t} checked:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
22
+ `)}}}const N=a;let P=null;function checkedRoles(){return P??=N.keys().filter(e=>N.get(e)?.props[`aria-checked`]!==void 0)}function roleSupportsChecked(e){return e!==null&&checkedRoles().includes(e)}function supportedRolesSentence(){return toSentence(checkedRoles().map(e=>`role="${e}"`),{lastWordConnector:` or `})}function toBeChecked(e){checkHtmlElement(e,toBeChecked,this);let isValidInput=()=>e.tagName.toLowerCase()===`input`&&[`checkbox`,`radio`].includes(e.type),isValidAriaElement=()=>roleSupportsChecked(e.getAttribute(`role`))&&[`true`,`false`].includes(e.getAttribute(`aria-checked`));if(!isValidInput()&&!isValidAriaElement())return{pass:!1,message:()=>`only inputs with type="checkbox" or type="radio" or elements with ${supportedRolesSentence()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`};let isChecked=()=>isValidInput()?e.checked:e.getAttribute(`aria-checked`)===`true`;return{pass:isChecked(),message:()=>{let t=isChecked()?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeChecked`,`element`,``),``,`Received element ${t} checked:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
23
23
  `)}}}function toBePartiallyChecked(e){checkHtmlElement(e,toBePartiallyChecked,this);let isValidInput=()=>e.tagName.toLowerCase()===`input`&&e.type===`checkbox`,isValidAriaElement=()=>e.getAttribute(`role`)===`checkbox`;if(!isValidInput()&&!isValidAriaElement())return{pass:!1,message:()=>`only inputs with type="checkbox" or elements with role="checkbox" and a valid aria-checked attribute can be used with .toBePartiallyChecked(). Use .toHaveValue() instead`};let isPartiallyChecked=()=>{let t=e.getAttribute(`aria-checked`)===`mixed`;return isValidInput()&&e.indeterminate||t};return{pass:isPartiallyChecked(),message:()=>{let t=isPartiallyChecked()?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePartiallyChecked`,`element`,``),``,`Received element ${t} partially checked:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
24
- `)}}}function isButtonLike(e){let t=(e.getAttribute(`role`)||``).split(` `).map(e=>e.trim());return e.tagName.toLowerCase()===`button`||e.tagName.toLowerCase()===`input`&&e.type===`button`||t.includes(`button`)}function toBePressed(e){checkHtmlElement(e,toBePressed,this);let t=isButtonLike(e),n=e.getAttribute(`aria-pressed`);return!t||n!==`true`&&n!==`false`?{pass:!1,message:()=>`Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()`}:{pass:t&&n===`true`,message:()=>{let e=this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePressed`,`element`,``);return getMessage(this,e,`Expected element to have`,`aria-pressed="${this.isNot?`false`:`true`}"`,`Received`,`aria-pressed="${n}"`)}}}function toBePartiallyPressed(e){checkHtmlElement(e,toBePartiallyPressed,this);let t=isButtonLike(e),n=e.getAttribute(`aria-pressed`);return!t||n!==`true`&&n!==`false`&&n!==`mixed`?{pass:!1,message:()=>`Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()`}:{pass:t&&n===`mixed`,message:()=>{let e=this.isNot?`not to`:`to`,t=this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePartiallyPressed`,`element`,``);return getMessage(this,t,`Expected element ${e} have`,`aria-pressed="mixed"`,`Received`,`aria-pressed="${n}"`)}}}const P=[`fieldset`,`input`,`select`,`optgroup`,`option`,`button`,`textarea`];function isFirstLegendChildOfFieldset(e,t){if(getTag(e)!==`legend`||getTag(t)!==`fieldset`)return!1;for(let n=t.firstElementChild;n!==null;n=n.nextElementSibling)if(getTag(n)===`legend`)return e.isSameNode(n);return!1}function isElementDisabledByParent(e,t){return isElementDisabled(t)&&!isFirstLegendChildOfFieldset(e,t)}function isCustomElement(e){return e.includes(`-`)}function canElementBeDisabled(e){let t=getTag(e);return P.includes(t)||isCustomElement(t)}function isElementDisabled(e){return canElementBeDisabled(e)&&e.hasAttribute(`disabled`)}function isAncestorDisabled(e){let t=e.parentElement;return!!t&&(isElementDisabledByParent(e,t)||isAncestorDisabled(t))}function isElementOrAncestorDisabled(e){let t=e[o];return t===void 0?canElementBeDisabled(e)&&(isElementDisabled(e)||isAncestorDisabled(e)):isElementOrAncestorDisabledImpl(t)}function tagOf(e){return e.prefix===null&&e.tag!==0&&(e.flags&c)!==0?e.name:(e.prefix===null?e.name:`${e.prefix}:${e.name}`).toLowerCase()}function isElementDisabledImpl(e,t){return(P.includes(t)||isCustomElement(t))&&p(e,`disabled`)!==null}function isElementOrAncestorDisabledImpl(e){let t=tagOf(e);if(!P.includes(t)&&!isCustomElement(t))return!1;if(p(e,`disabled`)!==null)return!0;let n=e,r=t;for(let t=e.parent;t!==null&&t.type===s;t=t.parent){let e=tagOf(t);if(isElementDisabledImpl(t,e)&&!isFirstLegendChildImpl(n,r,t,e))return!0;n=t,r=e}return!1}function isFirstLegendChildImpl(e,t,n,r){if(t!==`legend`||r!==`fieldset`)return!1;for(let t=n.first;t!==null;t=t.next)if(t.type===s&&tagOf(t)===`legend`)return t===e;return!1}function toBeDisabled(e){checkHtmlElement(e,toBeDisabled,this);let t=isElementOrAncestorDisabled(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeDisabled`,`element`,``),``,`Received element ${n} disabled:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
24
+ `)}}}function isButtonLike(e){let t=(e.getAttribute(`role`)||``).split(` `).map(e=>e.trim());return e.tagName.toLowerCase()===`button`||e.tagName.toLowerCase()===`input`&&e.type===`button`||t.includes(`button`)}function toBePressed(e){checkHtmlElement(e,toBePressed,this);let t=isButtonLike(e),n=e.getAttribute(`aria-pressed`);return!t||n!==`true`&&n!==`false`?{pass:!1,message:()=>`Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()`}:{pass:t&&n===`true`,message:()=>{let e=this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePressed`,`element`,``);return getMessage(this,e,`Expected element to have`,`aria-pressed="${this.isNot?`false`:`true`}"`,`Received`,`aria-pressed="${n}"`)}}}function toBePartiallyPressed(e){checkHtmlElement(e,toBePartiallyPressed,this);let t=isButtonLike(e),n=e.getAttribute(`aria-pressed`);return!t||n!==`true`&&n!==`false`&&n!==`mixed`?{pass:!1,message:()=>`Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()`}:{pass:t&&n===`mixed`,message:()=>{let e=this.isNot?`not to`:`to`,t=this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePartiallyPressed`,`element`,``);return getMessage(this,t,`Expected element ${e} have`,`aria-pressed="mixed"`,`Received`,`aria-pressed="${n}"`)}}}const F=[`fieldset`,`input`,`select`,`optgroup`,`option`,`button`,`textarea`];function isFirstLegendChildOfFieldset(e,t){if(getTag(e)!==`legend`||getTag(t)!==`fieldset`)return!1;for(let n=t.firstElementChild;n!==null;n=n.nextElementSibling)if(getTag(n)===`legend`)return e.isSameNode(n);return!1}function isElementDisabledByParent(e,t){return isElementDisabled(t)&&!isFirstLegendChildOfFieldset(e,t)}function isCustomElement(e){return e.includes(`-`)}function canElementBeDisabled(e){let t=getTag(e);return F.includes(t)||isCustomElement(t)}function isElementDisabled(e){return canElementBeDisabled(e)&&e.hasAttribute(`disabled`)}function isAncestorDisabled(e){let t=e.parentElement;return!!t&&(isElementDisabledByParent(e,t)||isAncestorDisabled(t))}function isElementOrAncestorDisabled(e){let t=e[o];return t===void 0?canElementBeDisabled(e)&&(isElementDisabled(e)||isAncestorDisabled(e)):isElementOrAncestorDisabledImpl(t)}function tagOf(e){return e.prefix===null&&e.tag!==0&&(e.flags&c)!==0?e.name:(e.prefix===null?e.name:`${e.prefix}:${e.name}`).toLowerCase()}function isElementDisabledImpl(e,t){return(F.includes(t)||isCustomElement(t))&&p(e,`disabled`)!==null}function isElementOrAncestorDisabledImpl(e){let t=tagOf(e);if(!F.includes(t)&&!isCustomElement(t))return!1;if(p(e,`disabled`)!==null)return!0;let n=e,r=t;for(let t=e.parent;t!==null&&t.type===s;t=t.parent){let e=tagOf(t);if(isElementDisabledImpl(t,e)&&!isFirstLegendChildImpl(n,r,t,e))return!0;n=t,r=e}return!1}function isFirstLegendChildImpl(e,t,n,r){if(t!==`legend`||r!==`fieldset`)return!1;for(let t=n.first;t!==null;t=t.next)if(t.type===s&&tagOf(t)===`legend`)return t===e;return!1}function toBeDisabled(e){checkHtmlElement(e,toBeDisabled,this);let t=isElementOrAncestorDisabled(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeDisabled`,`element`,``),``,`Received element ${n} disabled:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
25
25
  `)}}}function toBeEnabled(e){checkHtmlElement(e,toBeEnabled,this);let t=!isElementOrAncestorDisabled(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeEnabled`,`element`,``),``,`Received element ${n} enabled:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
26
- `)}}}const F=[`select`,`textarea`],I=[`input`,`select`,`textarea`],L=[`color`,`hidden`,`range`,`submit`,`image`,`reset`],te=[`checkbox`,`combobox`,`gridcell`,`listbox`,`radiogroup`,`spinbutton`,`textbox`,`tree`];function isRequiredOnFormTagsExceptInput(e){return F.includes(getTag(e))&&e.hasAttribute(`required`)}function isRequiredOnSupportedInput(e){return getTag(e)===`input`&&e.hasAttribute(`required`)&&(e.hasAttribute(`type`)&&!L.includes(e.getAttribute(`type`))||!e.hasAttribute(`type`))}function isElementRequiredByARIA(e){return e.hasAttribute(`aria-required`)&&e.getAttribute(`aria-required`)===`true`&&(I.includes(getTag(e))||e.hasAttribute(`role`)&&te.includes(e.getAttribute(`role`)))}function toBeRequired(e){checkHtmlElement(e,toBeRequired,this);let t=isRequiredOnFormTagsExceptInput(e)||isRequiredOnSupportedInput(e)||isElementRequiredByARIA(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeRequired`,`element`,``),``,`Received element ${n} required:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
27
- `)}}}const ne=[`form`,`input`,`select`,`textarea`];function isElementHavingAriaInvalid(e){return e.hasAttribute(`aria-invalid`)&&e.getAttribute(`aria-invalid`)!==`false`}function isElementInvalid(e){let t=isElementHavingAriaInvalid(e);return ne.includes(getTag(e))?t||!e.checkValidity():t}function toBeInvalid(e){checkHtmlElement(e,toBeInvalid,this);let t=isElementInvalid(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeInvalid`,`element`,``),``,`Received element ${n} currently invalid:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
26
+ `)}}}const I=[`select`,`textarea`],L=[`input`,`select`,`textarea`],te=[`color`,`hidden`,`range`,`submit`,`image`,`reset`],ne=[`checkbox`,`combobox`,`gridcell`,`listbox`,`radiogroup`,`spinbutton`,`textbox`,`tree`];function isRequiredOnFormTagsExceptInput(e){return I.includes(getTag(e))&&e.hasAttribute(`required`)}function isRequiredOnSupportedInput(e){return getTag(e)===`input`&&e.hasAttribute(`required`)&&(e.hasAttribute(`type`)&&!te.includes(e.getAttribute(`type`))||!e.hasAttribute(`type`))}function isElementRequiredByARIA(e){return e.hasAttribute(`aria-required`)&&e.getAttribute(`aria-required`)===`true`&&(L.includes(getTag(e))||e.hasAttribute(`role`)&&ne.includes(e.getAttribute(`role`)))}function toBeRequired(e){checkHtmlElement(e,toBeRequired,this);let t=isRequiredOnFormTagsExceptInput(e)||isRequiredOnSupportedInput(e)||isElementRequiredByARIA(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeRequired`,`element`,``),``,`Received element ${n} required:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
27
+ `)}}}const re=[`form`,`input`,`select`,`textarea`];function isElementHavingAriaInvalid(e){return e.hasAttribute(`aria-invalid`)&&e.getAttribute(`aria-invalid`)!==`false`}function isElementInvalid(e){let t=isElementHavingAriaInvalid(e);return re.includes(getTag(e))?t||!e.checkValidity():t}function toBeInvalid(e){checkHtmlElement(e,toBeInvalid,this);let t=isElementInvalid(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeInvalid`,`element`,``),``,`Received element ${n} currently invalid:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
28
28
  `)}}}function toBeValid(e){checkHtmlElement(e,toBeValid,this);let t=!isElementInvalid(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeValid`,`element`,``),``,`Received element ${n} currently valid:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
29
29
  `)}}}function toMatchAriaSnapshot(e,t){if(typeof e!=`object`||!e||e[o]===void 0)throw new NodeTypeError(e,toMatchAriaSnapshot,this);if(typeof t!=`string`)throw TypeError(`toMatchAriaSnapshot expects an aria snapshot template string, got ${t===null?`null`:typeof t}`);let n;try{n=h(e,t)}catch(e){throw e instanceof m&&Error.captureStackTrace&&Error.captureStackTrace(e,toMatchAriaSnapshot),e}let r=this.utils.matcherHint(`${this.isNot?`.not`:``}.toMatchAriaSnapshot`,`element`,`template`);return{pass:n.pass,message:()=>{if(this.isNot)return[r,``,`Expected the accessibility tree not to match the template:`,this.utils.EXPECTED_COLOR(n.expected()),``,`Received:`,this.utils.RECEIVED_COLOR(n.received())].join(`
30
30
  `);let e=n.diff(),t=0,i=0,a=[];for(let n=0;n<e.length;n++){let r=e[n];r.kind===`-`?(t++,a.push(this.utils.EXPECTED_COLOR(`- ${r.text}`))):r.kind===`+`?(i++,a.push(this.utils.RECEIVED_COLOR(`+ ${r.text}`))):a.push(` ${r.text}`)}return[r,``,`${this.utils.EXPECTED_COLOR(`- Expected - ${t}`)} (template)`,`${this.utils.RECEIVED_COLOR(`+ Received + ${i}`)} (closest part of the accessibility tree)`,``,...a,``,`Received accessibility tree:`,this.utils.RECEIVED_COLOR(n.received())].join(`
31
- `)}}}var re=/* @__PURE__ */ __exportAll({toAppearAfter:()=>toAppearAfter,toAppearBefore:()=>toAppearBefore,toBeChecked:()=>toBeChecked,toBeDisabled:()=>toBeDisabled,toBeEmpty:()=>toBeEmpty,toBeEmptyDOMElement:()=>toBeEmptyDOMElement,toBeEnabled:()=>toBeEnabled,toBeInTheDOM:()=>toBeInTheDOM,toBeInTheDocument:()=>toBeInTheDocument,toBeInvalid:()=>toBeInvalid,toBePartiallyChecked:()=>toBePartiallyChecked,toBePartiallyPressed:()=>toBePartiallyPressed,toBePressed:()=>toBePressed,toBeRequired:()=>toBeRequired,toBeValid:()=>toBeValid,toBeVisible:()=>toBeVisible,toContainAnyByAltText:()=>R,toContainAnyByDisplayValue:()=>B,toContainAnyByLabelText:()=>H,toContainAnyByPlaceholderText:()=>W,toContainAnyByRole:()=>K,toContainAnyByTestId:()=>J,toContainAnyByText:()=>X,toContainAnyByTitle:()=>Q,toContainElement:()=>toContainElement,toContainHTML:()=>toContainHTML,toContainOneByAltText:()=>z,toContainOneByDisplayValue:()=>V,toContainOneByLabelText:()=>U,toContainOneByPlaceholderText:()=>G,toContainOneByRole:()=>q,toContainOneByTestId:()=>Y,toContainOneByText:()=>Z,toContainOneByTitle:()=>$,toHaveAccessibleDescription:()=>toHaveAccessibleDescription,toHaveAccessibleErrorMessage:()=>toHaveAccessibleErrorMessage,toHaveAccessibleName:()=>toHaveAccessibleName,toHaveAttribute:()=>toHaveAttribute,toHaveClass:()=>toHaveClass,toHaveDescription:()=>toHaveDescription,toHaveDisplayValue:()=>toHaveDisplayValue,toHaveErrorMessage:()=>toHaveErrorMessage,toHaveFocus:()=>toHaveFocus,toHaveFormValues:()=>toHaveFormValues,toHaveRole:()=>toHaveRole,toHaveSelection:()=>toHaveSelection,toHaveStyle:()=>toHaveStyle,toHaveTextContent:()=>toHaveTextContent,toHaveValue:()=>toHaveValue,toMatchAriaSnapshot:()=>toMatchAriaSnapshot});const{toContainAnyByAltText:R,toContainOneByAltText:z,toContainAnyByDisplayValue:B,toContainOneByDisplayValue:V,toContainAnyByLabelText:H,toContainOneByLabelText:U,toContainAnyByPlaceholderText:W,toContainOneByPlaceholderText:G,toContainAnyByRole:K,toContainOneByRole:q,toContainAnyByTestId:J,toContainOneByTestId:Y,toContainAnyByText:X,toContainOneByText:Z,toContainAnyByTitle:Q,toContainOneByTitle:$}=C;export{toHaveAccessibleDescription as A,toHaveSelection as B,toBePartiallyChecked as C,toBeValid as D,toBeRequired as E,toHaveRole as F,toBeEmpty as G,toHaveValue as H,toHaveAttribute as I,toBeInTheDocument as J,toBeEmptyDOMElement as K,toHaveClass as L,toHaveAccessibleName as M,toHaveDescription as N,toBeVisible as O,toHaveErrorMessage as P,toHaveDisplayValue as R,toBeInvalid as S,toBePressed as T,toAppearAfter as U,toHaveTextContent as V,toAppearBefore as W,toContainHTML as X,toContainElement as Y,toHaveFocus as Z,$ as _,W as a,toBeDisabled as b,X as c,V as d,U as f,Z as g,Y as h,H as i,toHaveAccessibleErrorMessage as j,toHaveStyle as k,Q as l,q as m,R as n,K as o,G as p,toBeInTheDOM as q,B as r,J as s,re as t,z as u,toMatchAriaSnapshot as v,toBePartiallyPressed as w,toBeEnabled as x,toBeChecked as y,toHaveFormValues as z};
31
+ `)}}}var ie=/* @__PURE__ */ __exportAll({toAppearAfter:()=>toAppearAfter,toAppearBefore:()=>toAppearBefore,toBeChecked:()=>toBeChecked,toBeDisabled:()=>toBeDisabled,toBeEmpty:()=>toBeEmpty,toBeEmptyDOMElement:()=>toBeEmptyDOMElement,toBeEnabled:()=>toBeEnabled,toBeInTheDOM:()=>toBeInTheDOM,toBeInTheDocument:()=>toBeInTheDocument,toBeInvalid:()=>toBeInvalid,toBePartiallyChecked:()=>toBePartiallyChecked,toBePartiallyPressed:()=>toBePartiallyPressed,toBePressed:()=>toBePressed,toBeRequired:()=>toBeRequired,toBeValid:()=>toBeValid,toBeVisible:()=>toBeVisible,toContainAnyByAltText:()=>R,toContainAnyByDisplayValue:()=>B,toContainAnyByLabelText:()=>H,toContainAnyByPlaceholderText:()=>W,toContainAnyByRole:()=>K,toContainAnyByTestId:()=>J,toContainAnyByText:()=>X,toContainAnyByTitle:()=>Q,toContainElement:()=>toContainElement,toContainHTML:()=>toContainHTML,toContainOneByAltText:()=>z,toContainOneByDisplayValue:()=>V,toContainOneByLabelText:()=>U,toContainOneByPlaceholderText:()=>G,toContainOneByRole:()=>q,toContainOneByTestId:()=>Y,toContainOneByText:()=>Z,toContainOneByTitle:()=>$,toHaveAccessibleDescription:()=>toHaveAccessibleDescription,toHaveAccessibleErrorMessage:()=>toHaveAccessibleErrorMessage,toHaveAccessibleName:()=>toHaveAccessibleName,toHaveAttribute:()=>toHaveAttribute,toHaveClass:()=>toHaveClass,toHaveDescription:()=>toHaveDescription,toHaveDisplayValue:()=>toHaveDisplayValue,toHaveErrorMessage:()=>toHaveErrorMessage,toHaveFocus:()=>toHaveFocus,toHaveFormValues:()=>toHaveFormValues,toHaveRole:()=>toHaveRole,toHaveSelection:()=>toHaveSelection,toHaveStyle:()=>toHaveStyle,toHaveTextContent:()=>toHaveTextContent,toHaveValue:()=>toHaveValue,toMatchAriaSnapshot:()=>toMatchAriaSnapshot});const{toContainAnyByAltText:R,toContainOneByAltText:z,toContainAnyByDisplayValue:B,toContainOneByDisplayValue:V,toContainAnyByLabelText:H,toContainOneByLabelText:U,toContainAnyByPlaceholderText:W,toContainOneByPlaceholderText:G,toContainAnyByRole:K,toContainOneByRole:q,toContainAnyByTestId:J,toContainOneByTestId:Y,toContainAnyByText:X,toContainOneByText:Z,toContainAnyByTitle:Q,toContainOneByTitle:$}=C;export{toHaveAccessibleDescription as A,toHaveSelection as B,toBePartiallyChecked as C,toBeValid as D,toBeRequired as E,toHaveRole as F,toBeEmpty as G,toHaveValue as H,toHaveAttribute as I,toBeInTheDocument as J,toBeEmptyDOMElement as K,toHaveClass as L,toHaveAccessibleName as M,toHaveDescription as N,toBeVisible as O,toHaveErrorMessage as P,toHaveDisplayValue as R,toBeInvalid as S,toBePressed as T,toAppearAfter as U,toHaveTextContent as V,toAppearBefore as W,toContainHTML as X,toContainElement as Y,toHaveFocus as Z,$ as _,W as a,toBeDisabled as b,X as c,V as d,U as f,Z as g,Y as h,H as i,toHaveAccessibleErrorMessage as j,toHaveStyle as k,Q as l,q as m,R as n,K as o,G as p,toBeInTheDOM as q,B as r,J as s,ie as t,z as u,toMatchAriaSnapshot as v,toBePartiallyPressed as w,toBeEnabled as x,toBeChecked as y,toHaveFormValues as z};
@@ -15,17 +15,17 @@ var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0}),
15
15
  `)}}function toAppearBefore(e,t){return checkToAppear(this,`toAppearBefore`,4,e,t)}function toAppearAfter(e,t){return checkToAppear(this,`toAppearAfter`,2,e,t)}function toHaveTextContent(e,t,n={normalizeWhitespace:!0}){checkNode(e,toHaveTextContent,this);let r=n.normalizeWhitespace?normalize(e.textContent):e.textContent.replace(/ /g,` `),i=r!==``&&t===``;return{pass:!i&&matches(r,t),message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveTextContent`,`element`,``),i?`Checking with empty string will always match, use .toBeEmptyDOMElement() instead`:`Expected element ${e} have text content`,t,`Received`,r)}}}function printAttribute(e,t,n){return n===void 0?t:`${t}=${e(n)}`}function getAttributeComment(e,t,n){return n===void 0?`element.hasAttribute(${e(t)})`:`element.getAttribute(${e(t)}) === ${e(n)}`}function toHaveAttribute(e,t,n){checkHtmlElement(e,toHaveAttribute,this);let r=n!==void 0,i=e.hasAttribute(t),a=e.getAttribute(t);return{pass:r?i&&this.equals(a,n):i,message:()=>{let e=this.isNot?`not to`:`to`,o=i?printAttribute(this.utils.stringify,t,a):null,s=this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveAttribute`,`element`,this.utils.printExpected(t),{secondArgument:r?this.utils.printExpected(n):void 0,comment:getAttributeComment(this.utils.stringify,t,n)});return getMessage(this,s,`Expected the element ${e} have attribute`,printAttribute(this.utils.stringify,t,n),`Received`,o)}}}function getExpectedClassNamesAndOptions(e){let t=e.pop(),n,r;return typeof t==`object`&&!(t instanceof RegExp)?(n=e,r=t):(n=e.concat(t),r={exact:!1}),{expectedClassNames:n,options:r}}function splitClassNames(e){return e?e.split(/\s+/).filter(e=>e.length>0):[]}function isSubset$1(e,t){return e.every(e=>typeof e==`string`?t.includes(e):t.some(t=>e.test(t)))}__name(isSubset$1,`isSubset`);function toHaveClass(e,...t){checkHtmlElement(e,toHaveClass,this);let{expectedClassNames:n,options:r}=getExpectedClassNamesAndOptions(t),i=splitClassNames(e.getAttribute(`class`)),a=n.reduce((e,t)=>e.concat(typeof t==`string`||!t?splitClassNames(t):t),[]),o=a.some(e=>e instanceof RegExp);if(r.exact&&o)throw Error(`Exact option does not support RegExp expected class names`);return r.exact?{pass:isSubset$1(a,i)&&a.length===i.length,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveClass`,`element`,this.utils.printExpected(a.join(` `))),`Expected the element ${e} have EXACTLY defined classes`,a.join(` `),`Received`,i.join(` `))}}:a.length>0?{pass:isSubset$1(a,i),message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveClass`,`element`,this.utils.printExpected(a.join(` `))),`Expected the element ${e} have class`,a.join(` `),`Received`,i.join(` `))}}:{pass:this.isNot?i.length>0:!1,message:()=>this.isNot?getMessage(this,this.utils.matcherHint(`.not.toHaveClass`,`element`,``),`Expected the element to have classes`,`(none)`,`Received`,i.join(` `)):[this.utils.matcherHint(`.toHaveClass`,`element`),`At least one expected class must be provided.`].join(`
16
16
  `)}}function toHaveValue(e,t){if(checkHtmlElement(e,toHaveValue,this),e.tagName.toLowerCase()===`input`&&[`checkbox`,`radio`].includes(e.type))throw Error(`input with type=checkbox or type=radio cannot be used with .toHaveValue(). Use .toBeChecked() for type=checkbox or .toHaveFormValues() instead`);let n=getSingleElementValue(e),r=t!==void 0,i=t,a=n;return t==n&&t!==n&&(i=`${t} (${typeof t})`,a=`${n} (${typeof n})`),{pass:r?compareAsSet(n,t):!!n,message:()=>{let e=this.isNot?`not to`:`to`,n=this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveValue`,`element`,t);return getMessage(this,n,`Expected the element ${e} have value`,r?i:`(any)`,`Received`,a)}}}function getValues(e,t){if(e!==`select`)return[t.value];let n=[],r=t.options;for(let e=0;e<r.length;e++){let t=r[e];t.selected&&n.push(t.textContent)}return n}function toHaveDisplayValue(e,t){checkHtmlElement(e,toHaveDisplayValue,this);let n=e.tagName.toLowerCase();if(![`select`,`input`,`textarea`].includes(n))throw Error(`.toHaveDisplayValue() currently supports only input, textarea or select elements, try with another matcher instead.`);if(n===`input`&&[`radio`,`checkbox`].includes(e.type))throw Error(`.toHaveDisplayValue() currently does not support input[type="${e.type}"], try with another matcher instead.`);let r=getValues(n,e),i=t instanceof Array?t:[t],a=i.filter(e=>r.some(t=>e instanceof RegExp?e.test(t):this.equals(t,String(e)))).length,o=a===r.length,s=a===i.length;return{pass:o&&s,message:()=>getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveDisplayValue`,`element`,``),`Expected element ${this.isNot?`not `:``}to have display value`,t,`Received`,r)}}function getMultiElementValue(e){let t=[...new Set(e.map(e=>e.type))];if(t.length!==1)throw Error(`Multiple form elements with the same name must be of the same type`);switch(t[0]){case`radio`:{let t=e.find(e=>e.checked);return t?t.value:void 0}case`checkbox`:return e.filter(e=>e.checked).map(e=>e.value);default:return e.map(e=>e.value)}}function getFormValue(e){if(e!==void 0)switch(e.length){case 1:return getSingleElementValue(e[0]);default:return getMultiElementValue(e)}}function getPureName(e){return e.endsWith(`[]`)?e.slice(0,-2):e}function getAllFormValues(e){let t=/* @__PURE__ */ new Map;for(let n of e.querySelectorAll(`[name]`)){let e=n.getAttribute(`name`),r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}let n={};for(let r of Array.from(e.elements)){let e=r.name;n[getPureName(e)]=getFormValue(t.get(e))}return n}function toHaveFormValues(e,t){if(checkHtmlElement(e,toHaveFormValues,this),!e.elements)throw Error(`toHaveFormValues must be called on a form or a fieldset`);let n=getAllFormValues(e);return{pass:Object.entries(t).every(([e,t])=>compareAsSet(n[e],t)),message:()=>{let e=this.isNot?`not to`:`to`,r=`${this.isNot?`.not`:``}.toHaveFormValues`,i={};for(let e of Object.keys(n))Object.prototype.hasOwnProperty.call(t,e)&&(i[e]=n[e]);return[this.utils.matcherHint(r,`element`,``),`Expected the element ${e} have form values`,this.utils.diff(t,i)].join(`
17
17
 
18
- `)}}}function getSelection(e){let t=e.ownerDocument.getSelection();if([`input`,`textarea`].includes(e.tagName.toLowerCase()))return[`radio`,`checkbox`].includes(e.type)?``:e.value.toString().substring(e.selectionStart,e.selectionEnd);if(t.anchorNode===null||t.focusNode===null)return``;let n=t.getRangeAt(0),r=e.ownerDocument.createRange();if(t.containsNode(e,!1))r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r);else if(!(e.contains(t.anchorNode)&&e.contains(t.focusNode))){let i=e===n.startContainer||e.contains(n.startContainer),a=e===n.endContainer||e.contains(n.endContainer);t.removeAllRanges(),(i||a)&&(r.selectNodeContents(e),i&&r.setStart(n.startContainer,n.startOffset),a&&r.setEnd(n.endContainer,n.endOffset),t.addRange(r))}let i=t.toString();return t.removeAllRanges(),t.addRange(n),i}function toHaveSelection(e,t){checkHtmlElement(e,toHaveSelection,this);let n=t!==void 0;if(n&&typeof t!=`string`)throw Error(`expected selection must be a string or undefined`);let r=getSelection(e);return{pass:n?compareAsSet(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`,i=this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveSelection`,`element`,t);return getMessage(this,i,`Expected the element ${e} have selection`,n?t:`(any)`,`Received`,r)}}}let g=null;function foreign(){return g??=(0,n.createRequire)(require("url").pathToFileURL(__filename).href)(`dom-accessibility-api`)}function computeAccessibleName(e){return e[i.$impl]===void 0?foreign().computeAccessibleName(e):r.daa06.computeAccessibleName(e)}function computeAccessibleDescription(e){return e[i.$impl]===void 0?foreign().computeAccessibleDescription(e):r.daa06.computeAccessibleDescription(e)}const _=[[`input`,[[`list`,`+`],[`type`,`=email`]],!1,[`combobox`]],[`input`,[[`list`,`+`],[`type`,`=search`]],!1,[`combobox`]],[`input`,[[`list`,`+`],[`type`,`=tel`]],!1,[`combobox`]],[`input`,[[`list`,`+`]],!0,[`combobox`]],[`input`,[[`list`,`+`],[`type`,`=url`]],!1,[`combobox`]],[`select`,[[`multiple`,`-`],[`size`,`-`]],!1,[`combobox`]],[`input`,[[`list`,`-`],[`type`,`=search`]],!1,[`searchbox`]],[`input`,[[`type`,`-`],[`list`,`-`]],!1,[`textbox`]],[`input`,[[`list`,`-`],[`type`,`=email`]],!1,[`textbox`]],[`input`,[[`list`,`-`],[`type`,`=tel`]],!1,[`textbox`]],[`input`,[[`list`,`-`]],!0,[`textbox`]],[`input`,[[`list`,`-`],[`type`,`=url`]],!1,[`textbox`]],[`input`,[[`type`,`=button`]],!1,[`button`]],[`input`,[[`type`,`=image`]],!1,[`button`]],[`input`,[[`type`,`=reset`]],!1,[`button`]],[`input`,[[`type`,`=submit`]],!1,[`button`]],[`input`,[[`type`,`=checkbox`]],!1,[`checkbox`]],[`th`,[[`scope`,`=col`]],!1,[`columnheader`]],[`th`,[[`scope`,`=colgroup`]],!1,[`columnheader`]],[`aside`,[[`aria-label`,`+`]],!1,[`complementary`]],[`aside`,[[`aria-labelledby`,`+`]],!1,[`complementary`]],[`form`,[[`aria-label`,`+`]],!1,[`form`]],[`form`,[[`aria-labelledby`,`+`]],!1,[`form`]],[`form`,[[`name`,`+`]],!1,[`form`]],[`img`,[[`alt`,`+`]],!1,[`img`]],[`img`,[[`alt`,`-`]],!1,[`img`]],[`a`,[[`href`,`+`]],!1,[`link`]],[`area`,[[`href`,`+`]],!1,[`link`]],[`select`,[[`size`,`+`]],!1,[`listbox`]],[`select`,[[`multiple`,`+`]],!1,[`listbox`]],[`img`,[[`alt`,`+`]],!1,[`presentation`]],[`input`,[[`type`,`=radio`]],!1,[`radio`]],[`section`,[[`aria-label`,`+`]],!1,[`region`]],[`section`,[[`aria-labelledby`,`+`]],!1,[`region`]],[`th`,[[`scope`,`=row`]],!1,[`rowheader`]],[`th`,[[`scope`,`=rowgroup`]],!1,[`rowheader`]],[`input`,[[`type`,`=range`]],!1,[`slider`]],[`input`,[[`type`,`=number`]],!1,[`spinbutton`]],[`article`,[],!1,[`article`]],[`header`,[],!1,[`banner`]],[`blockquote`,[],!1,[`blockquote`]],[`button`,[],!1,[`button`]],[`caption`,[],!1,[`caption`]],[`td`,[],!1,[`cell`]],[`code`,[],!1,[`code`]],[`th`,[],!1,[`columnheader`]],[`aside`,[],!1,[`complementary`]],[`footer`,[],!1,[`contentinfo`]],[`dd`,[],!1,[`definition`]],[`del`,[],!1,[`deletion`]],[`dialog`,[],!1,[`dialog`]],[`html`,[],!1,[`document`]],[`em`,[],!1,[`emphasis`]],[`figure`,[],!1,[`figure`]],[`a`,[],!1,[`generic`]],[`area`,[],!1,[`generic`]],[`aside`,[],!1,[`generic`]],[`b`,[],!1,[`generic`]],[`bdo`,[],!1,[`generic`]],[`body`,[],!1,[`generic`]],[`data`,[],!1,[`generic`]],[`div`,[],!1,[`generic`]],[`footer`,[],!1,[`generic`]],[`header`,[],!1,[`generic`]],[`hgroup`,[],!1,[`generic`]],[`i`,[],!1,[`generic`]],[`pre`,[],!1,[`generic`]],[`q`,[],!1,[`generic`]],[`samp`,[],!1,[`generic`]],[`section`,[],!1,[`generic`]],[`small`,[],!1,[`generic`]],[`span`,[],!1,[`generic`]],[`u`,[],!1,[`generic`]],[`td`,[],!1,[`gridcell`]],[`details`,[],!1,[`group`]],[`fieldset`,[],!1,[`group`]],[`optgroup`,[],!1,[`group`]],[`address`,[],!1,[`group`]],[`h1`,[],!1,[`heading`]],[`h2`,[],!1,[`heading`]],[`h3`,[],!1,[`heading`]],[`h4`,[],!1,[`heading`]],[`h5`,[],!1,[`heading`]],[`h6`,[],!1,[`heading`]],[`ins`,[],!1,[`insertion`]],[`menu`,[],!1,[`list`]],[`ol`,[],!1,[`list`]],[`ul`,[],!1,[`list`]],[`datalist`,[],!1,[`listbox`]],[`li`,[],!1,[`listitem`]],[`main`,[],!1,[`main`]],[`mark`,[],!1,[`mark`]],[`math`,[],!1,[`math`]],[`meter`,[],!1,[`meter`]],[`nav`,[],!1,[`navigation`]],[`option`,[],!1,[`option`]],[`p`,[],!1,[`paragraph`]],[`progress`,[],!1,[`progressbar`]],[`tr`,[],!1,[`row`]],[`tbody`,[],!1,[`rowgroup`]],[`tfoot`,[],!1,[`rowgroup`]],[`thead`,[],!1,[`rowgroup`]],[`hr`,[],!1,[`separator`]],[`output`,[],!1,[`status`]],[`strong`,[],!1,[`strong`]],[`sub`,[],!1,[`subscript`]],[`sup`,[],!1,[`superscript`]],[`table`,[],!1,[`table`]],[`dfn`,[],!1,[`term`]],[`dt`,[],!1,[`term`]],[`textarea`,[],!1,[`textbox`]],[`time`,[],!1,[`time`]]];function valueEquals(e,t,n,r){return n===r||(t===`type`||t===`scope`)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`&&n.toLowerCase()===r}function getImplicitAriaRoles(e){let t=e.localName;for(let n=0;n<_.length;n++){let[r,i,a,o]=_[n];if(r!==t||a&&e.type!==`text`)continue;let s=!0;for(let t=0;t<i.length&&s;t++){let[n,r]=i[t],a=e.getAttribute(n);s=r===`-`?a===null:r===`+`?a!==null:a!==null&&valueEquals(e,n,a,r.slice(1))}if(s)return[...o]}return[]}function getExplicitOrImplicitRoles(e){let t=e.getAttribute(`role`);return t===null?e[i.$impl]===void 0?getImplicitAriaRoles(e):(0,r.getImplicitAriaRolesJestDom)(e):t.split(` `).filter(Boolean)}function toHaveRole(e,t){checkHtmlElement(e,toHaveRole,this);let n=getExplicitOrImplicitRoles(e);return{pass:n.some(e=>e===t),message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveRole.name}`,`element`,``),`Expected element ${e} have role`,t,`Received`,n.join(`, `))}}}function toHaveAccessibleName(e,t){checkHtmlElement(e,toHaveAccessibleName,this);let n=computeAccessibleName(e),r=arguments.length===1,i=!1;return i=r?n!==``:t instanceof RegExp?t.test(n):this.equals(n,t),{pass:i,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveAccessibleName.name}`,`element`,``),`Expected element ${e} have accessible name`,t,`Received`,n)}}}function toHaveAccessibleDescription(e,t){checkHtmlElement(e,toHaveAccessibleDescription,this);let n=computeAccessibleDescription(e),r=arguments.length===1,i=!1;return i=r?n!==``:t instanceof RegExp?t.test(n):this.equals(n,t),{pass:i,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveAccessibleDescription.name}`,`element`,``),`Expected element ${e} have accessible description`,t,`Received`,n)}}}const v=`aria-invalid`,y=[`false`];function toHaveAccessibleErrorMessage(e,t){checkHtmlElement(e,toHaveAccessibleErrorMessage,this);let n=this.isNot?`not to`:`to`,r=this.isNot?`.not.toHaveAccessibleErrorMessage`:`.toHaveAccessibleErrorMessage`,i=e.getAttribute(`aria-errormessage`);if(i&&/\s+/.test(i))return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(r,`element`),"Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",``,`Received`,`aria-errormessage="${i}"`)};let a=e.getAttribute(v);if(!e.hasAttribute(v)||y.includes(a))return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(r,`element`),`Expected element to be marked as invalid with attribute`,`${v}="true"`,`Received`,e.hasAttribute(`aria-invalid`)?`${v}="${e.getAttribute(v)}`:null)};let o=normalize(e.ownerDocument.getElementById(i)?.textContent??``);return{pass:t===void 0?!!o:t instanceof RegExp?t.test(o):this.equals(o,t),message:()=>getMessage(this,this.utils.matcherHint(r,`element`),`Expected element ${n} have accessible error message`,t??``,`Received`,o)}}function textOfIdRefs(e,t){let n=(e.getAttribute(t)||``).split(/\s+/).filter(Boolean);if(n.length===0)return``;let r=e.ownerDocument;return normalize(n.map(e=>r.getElementById(e)).filter(Boolean).map(e=>e.textContent).join(` `))}function toHaveDescription(e,t){deprecate(`toHaveDescription`,`Please use toHaveAccessibleDescription.`),checkHtmlElement(e,toHaveDescription,this);let n=t!==void 0,r=textOfIdRefs(e,`aria-describedby`);return{pass:n?t instanceof RegExp?t.test(r):this.equals(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveDescription`,`element`,``),`Expected the element ${e} have description`,this.utils.printExpected(t),`Received`,this.utils.printReceived(r))}}}function toHaveErrorMessage(e,t){if(deprecate(`toHaveErrorMessage`,`Please use toHaveAccessibleErrorMessage.`),checkHtmlElement(e,toHaveErrorMessage,this),!e.hasAttribute(`aria-invalid`)||e.getAttribute(`aria-invalid`)===`false`){let t=this.isNot?`.not`:``;return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(`${t}.toHaveErrorMessage`,`element`,``),`Expected the element to have invalid state indicated by`,`aria-invalid="true"`,`Received`,e.hasAttribute(`aria-invalid`)?`aria-invalid="${e.getAttribute(`aria-invalid`)}"`:this.utils.printReceived(``))}}let n=t!==void 0,r=textOfIdRefs(e,`aria-errormessage`);return{pass:n?t instanceof RegExp?t.test(r):this.equals(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveErrorMessage`,`element`,``),`Expected the element ${e} have error message`,this.utils.printExpected(t),`Received`,this.utils.printReceived(r))}}}const b={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},x=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|grad|rad|turn)?$/i;function channel(e,t){if(e.toLowerCase()===`none`)return 0;let n=x.exec(e);if(n===null)return null;let r=Number(n[1]);return n[2]===void 0?r:n[2]===`%`?r/100*t:null}function hue(e){let t=x.exec(e);if(t===null)return e.toLowerCase()===`none`?0:null;let n=Number(t[1]);switch(t[2]?.toLowerCase()){case void 0:case`deg`:return n;case`grad`:return n*360/400;case`rad`:return n*180/Math.PI;case`turn`:return n*360;default:return null}}function args(e){let t=e.trim();if(t.includes(`,`)){let e=t.split(`,`).map(e=>e.trim());return e.some(e=>e===``||/\s/.test(e))?null:e}let n=t.indexOf(`/`),r=(n===-1?t:t.slice(0,n)).trim().split(/\s+/);return n!==-1&&r.push(t.slice(n+1).trim()),r}const clamp=(e,t,n)=>Math.min(n,Math.max(t,e));function hslToRgb(e,t,n){e=(e%360+360)%360,t=clamp(t,0,1),n=clamp(n,0,1);let f=r=>{let i=(r+e/30)%12,a=t*Math.min(n,1-n);return(n-a*Math.max(-1,Math.min(i-3,9-i,1)))*255};return[f(0),f(8),f(4)]}function key(e,t,n,r){return`${Math.round(clamp(e,0,255))},${Math.round(clamp(t,0,255))},${Math.round(clamp(n,0,255))},${Math.round(clamp(r,0,1)*1e3)}`}function canonicalColor(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();if(t===``)return null;if(t===`transparent`)return key(0,0,0,0);if(t.charCodeAt(0)===35){let e=t.slice(1);if(!/^[0-9a-f]+$/.test(e))return null;let n=e.length,d=(t,n)=>parseInt(e.slice(t,t+n),16)*(n===1?17:1);return n===3||n===4?key(d(0,1),d(1,1),d(2,1),n===4?d(3,1)/255:1):n===6||n===8?key(d(0,2),d(2,2),d(4,2),n===8?d(6,2)/255:1):null}let n=t.indexOf(`(`);if(n===-1){let e=b[t];return e===void 0?null:key(e>>16,e>>8&255,e&255,1)}if(!t.endsWith(`)`))return null;let r=t.slice(0,n),i=args(t.slice(n+1,-1));if(i===null||i.length!==3&&i.length!==4)return null;let a=i.length===4?channel(i[3],1):1;if(a===null)return null;if(r===`rgb`||r===`rgba`){let e=channel(i[0],255),t=channel(i[1],255),n=channel(i[2],255);return e===null||t===null||n===null?null:key(e,t,n,a)}if(r===`hsl`||r===`hsla`){let e=hue(i[0]),t=channel(i[1],1),n=channel(i[2],1);if(e===null||t===null||n===null)return null;let[r,o,s]=hslToRgb(e,i[1].endsWith(`%`)?t:t/100,i[2].endsWith(`%`)?n:n/100);return key(r,o,s,a)}return null}function sameColor(e,t){let n=canonicalColor(e);return n!==null&&n===canonicalColor(t)}function nodeNameIs(e,t,n){return e.prefix===null?(e.flags&i.F_HTML)===0?e.name===n:(0,i.asciiLowercase)(e.name)===t:!1}function isElementVisibleImpl(e){let t=null;for(let n=e;n!==null&&n.type===i.ELEMENT_NODE;t=n,n=n.parent){if((0,i.computedValue)(n,`display`)===`none`)return!1;let e=(0,i.computedValue)(n,`visibility`);if(e===`hidden`||e===`collapse`||(0,i.computedValue)(n,`opacity`)===`0`||(0,i.getAttribute)(n,`hidden`)!==null||nodeNameIs(n,`details`,`DETAILS`)&&(t===null||!nodeNameIs(t,`summary`,`SUMMARY`))&&(0,i.getAttribute)(n,`open`)===null)return!1}return!0}function isStyleVisible(e){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r,opacity:i}=t(e);return n!==`none`&&r!==`hidden`&&r!==`collapse`&&i!==`0`&&i!==0}function isAttributeVisible(e,t){let n;return n=t?e.nodeName===`DETAILS`&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0:e.nodeName!==`DETAILS`||e.hasAttribute(`open`),!e.hasAttribute(`hidden`)&&n}function isElementVisible(e,t){return isStyleVisible(e)&&isAttributeVisible(e,t)&&(!e.parentElement||isElementVisible(e.parentElement,e))}function toBeVisible(e){checkHtmlElement(e,toBeVisible,this);let t=e.ownerDocument===e.getRootNode({composed:!0}),n=e[i.$impl],r=t&&(n!==void 0&&(0,i.getComputedStyleOverride)(n)===null?isElementVisibleImpl(n):isElementVisible(e));return{pass:r,message:()=>{let n=r?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeVisible`,`element`,``),``,`Received element ${n} visible${t?``:` (element is not in the document)`}:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
19
- `)}}}function getStyleDeclaration(e,t){let n=normalizedKey(t);if(n!==null){let e=S.get(n);if(e!==void 0)return{...e}}let r={},i=e.createElement(`div`);for(let e of Object.keys(t))i.style[e]=t[e],r[e]=i.style[e];return n!==null&&(S.size>=512&&S.clear(),S.set(n,{...r})),r}const S=/* @__PURE__ */ new Map;function normalizedKey(e){let t=``;for(let n of Object.keys(e)){let r=e[n],i=typeof r;if(i!==`string`&&i!==`number`)return null;t+=`${n}\u0000${i===`number`?`n`:`s`}${r}\u0001`}return t}function valueMatches(e,t){return e===t||sameColor(t,e)}function isSubset(e,t){let n=Object.entries(e);if(n.length===0)return!1;for(let[e,r]of n){let n=e.startsWith(`--`);if(!(valueMatches(t[e],r)||valueMatches(t.getPropertyValue(e),r))){if(!n){let n=e.toLowerCase();if(valueMatches(t[n],r)||valueMatches(t.getPropertyValue(n),r))continue}return!1}}return!0}function printoutStyles(e){return Object.keys(e).sort().map(t=>`${t}: ${e[t]};`).join(`
18
+ `)}}}function getSelection(e){let t=e.ownerDocument.getSelection();if([`input`,`textarea`].includes(e.tagName.toLowerCase()))return[`radio`,`checkbox`].includes(e.type)?``:e.value.toString().substring(e.selectionStart,e.selectionEnd);if(t.anchorNode===null||t.focusNode===null)return``;let n=t.getRangeAt(0),r=e.ownerDocument.createRange();if(t.containsNode(e,!1))r.selectNodeContents(e),t.removeAllRanges(),t.addRange(r);else if(!(e.contains(t.anchorNode)&&e.contains(t.focusNode))){let i=e===n.startContainer||e.contains(n.startContainer),a=e===n.endContainer||e.contains(n.endContainer);t.removeAllRanges(),(i||a)&&(r.selectNodeContents(e),i&&r.setStart(n.startContainer,n.startOffset),a&&r.setEnd(n.endContainer,n.endOffset),t.addRange(r))}let i=t.toString();return t.removeAllRanges(),t.addRange(n),i}function toHaveSelection(e,t){checkHtmlElement(e,toHaveSelection,this);let n=t!==void 0;if(n&&typeof t!=`string`)throw Error(`expected selection must be a string or undefined`);let r=getSelection(e);return{pass:n?compareAsSet(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`,i=this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveSelection`,`element`,t);return getMessage(this,i,`Expected the element ${e} have selection`,n?t:`(any)`,`Received`,r)}}}let g=null;function foreign(){return g??=(0,n.createRequire)(require("url").pathToFileURL(__filename).href)(`dom-accessibility-api`)}function computeAccessibleName(e){return e[i.$impl]===void 0?foreign().computeAccessibleName(e):r.daa06.computeAccessibleName(e)}function computeAccessibleDescription(e){return e[i.$impl]===void 0?foreign().computeAccessibleDescription(e):r.daa06.computeAccessibleDescription(e)}const _=/* @__PURE__ */ `combobox input[list][type=email] input[list][type=search] input[list][type=tel] input[list]{text} input[list][type=url] select[!multiple][!size].searchbox input[!list][type=search].textbox input[!type][!list] input[!list][type=email] input[!list][type=tel] input[!list]{text} input[!list][type=url].button input[type=button] input[type=image] input[type=reset] input[type=submit].checkbox input[type=checkbox].columnheader th[scope=col] th[scope=colgroup].complementary aside[aria-label] aside[aria-labelledby].form form[aria-label] form[aria-labelledby] form[name].img img[alt] img[!alt].link a[href] area[href].listbox select[size] select[multiple].presentation img[alt].radio input[type=radio].region section[aria-label] section[aria-labelledby].rowheader th[scope=row] th[scope=rowgroup].slider input[type=range].spinbutton input[type=number].article article.banner header.blockquote blockquote.button button.caption caption.cell td.code code.columnheader th.complementary aside.contentinfo footer.definition dd.deletion del.dialog dialog.document html.emphasis em.figure figure.generic a area aside b bdo body data div footer header hgroup i pre q samp section small span u.gridcell td.group details fieldset optgroup address.heading h1 h2 h3 h4 h5 h6.insertion ins.list menu ol ul.listbox datalist.listitem li.main main.mark mark.math math.meter meter.navigation nav.option option.paragraph p.progressbar progress.row tr.rowgroup tbody tfoot thead.separator hr.status output.strong strong.subscript sub.superscript sup.table table.term dfn dt.textbox textarea.time time`.split(`.`);function valueEquals(e,t,n,r){return n===r||(t===`type`||t===`scope`)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`&&n.toLowerCase()===r}let v=null;function elementRoles(){if(v!==null)return v;v=[];for(let e of _){let[t,...n]=e.split(` `);for(let e of n){let n=e.endsWith(`{text}`),[r,...i]=(n?e.slice(0,-6):e).split(`[`),a=i.map(e=>{let t=e.indexOf(`=`);return e[0]===`!`?[e.slice(1,-1),`-`]:t===-1?[e.slice(0,-1),`+`]:[e.slice(0,t),e.slice(t,-1)]});v.push([r,a,n,[t]])}}return v}function getImplicitAriaRoles(e){let t=e.localName,n=elementRoles();for(let r=0;r<n.length;r++){let[i,a,o,s]=n[r];if(i!==t||o&&e.type!==`text`)continue;let c=!0;for(let t=0;t<a.length&&c;t++){let[n,r]=a[t],i=e.getAttribute(n);c=r===`-`?i===null:r===`+`?i!==null:i!==null&&valueEquals(e,n,i,r.slice(1))}if(c)return[...s]}return[]}function getExplicitOrImplicitRoles(e){let t=e.getAttribute(`role`);return t===null?e[i.$impl]===void 0?getImplicitAriaRoles(e):(0,r.getImplicitAriaRolesJestDom)(e):t.split(` `).filter(Boolean)}function toHaveRole(e,t){checkHtmlElement(e,toHaveRole,this);let n=getExplicitOrImplicitRoles(e);return{pass:n.some(e=>e===t),message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveRole.name}`,`element`,``),`Expected element ${e} have role`,t,`Received`,n.join(`, `))}}}function toHaveAccessibleName(e,t){checkHtmlElement(e,toHaveAccessibleName,this);let n=computeAccessibleName(e),r=arguments.length===1,i=!1;return i=r?n!==``:t instanceof RegExp?t.test(n):this.equals(n,t),{pass:i,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveAccessibleName.name}`,`element`,``),`Expected element ${e} have accessible name`,t,`Received`,n)}}}function toHaveAccessibleDescription(e,t){checkHtmlElement(e,toHaveAccessibleDescription,this);let n=computeAccessibleDescription(e),r=arguments.length===1,i=!1;return i=r?n!==``:t instanceof RegExp?t.test(n):this.equals(n,t),{pass:i,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.${toHaveAccessibleDescription.name}`,`element`,``),`Expected element ${e} have accessible description`,t,`Received`,n)}}}const y=`aria-invalid`,b=[`false`];function toHaveAccessibleErrorMessage(e,t){checkHtmlElement(e,toHaveAccessibleErrorMessage,this);let n=this.isNot?`not to`:`to`,r=this.isNot?`.not.toHaveAccessibleErrorMessage`:`.toHaveAccessibleErrorMessage`,i=e.getAttribute(`aria-errormessage`);if(i&&/\s+/.test(i))return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(r,`element`),"Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",``,`Received`,`aria-errormessage="${i}"`)};let a=e.getAttribute(y);if(!e.hasAttribute(y)||b.includes(a))return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(r,`element`),`Expected element to be marked as invalid with attribute`,`${y}="true"`,`Received`,e.hasAttribute(`aria-invalid`)?`${y}="${e.getAttribute(y)}`:null)};let o=normalize(e.ownerDocument.getElementById(i)?.textContent??``);return{pass:t===void 0?!!o:t instanceof RegExp?t.test(o):this.equals(o,t),message:()=>getMessage(this,this.utils.matcherHint(r,`element`),`Expected element ${n} have accessible error message`,t??``,`Received`,o)}}function textOfIdRefs(e,t){let n=(e.getAttribute(t)||``).split(/\s+/).filter(Boolean);if(n.length===0)return``;let r=e.ownerDocument;return normalize(n.map(e=>r.getElementById(e)).filter(Boolean).map(e=>e.textContent).join(` `))}function toHaveDescription(e,t){deprecate(`toHaveDescription`,`Please use toHaveAccessibleDescription.`),checkHtmlElement(e,toHaveDescription,this);let n=t!==void 0,r=textOfIdRefs(e,`aria-describedby`);return{pass:n?t instanceof RegExp?t.test(r):this.equals(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveDescription`,`element`,``),`Expected the element ${e} have description`,this.utils.printExpected(t),`Received`,this.utils.printReceived(r))}}}function toHaveErrorMessage(e,t){if(deprecate(`toHaveErrorMessage`,`Please use toHaveAccessibleErrorMessage.`),checkHtmlElement(e,toHaveErrorMessage,this),!e.hasAttribute(`aria-invalid`)||e.getAttribute(`aria-invalid`)===`false`){let t=this.isNot?`.not`:``;return{pass:!1,message:()=>getMessage(this,this.utils.matcherHint(`${t}.toHaveErrorMessage`,`element`,``),`Expected the element to have invalid state indicated by`,`aria-invalid="true"`,`Received`,e.hasAttribute(`aria-invalid`)?`aria-invalid="${e.getAttribute(`aria-invalid`)}"`:this.utils.printReceived(``))}}let n=t!==void 0,r=textOfIdRefs(e,`aria-errormessage`);return{pass:n?t instanceof RegExp?t.test(r):this.equals(r,t):!!r,message:()=>{let e=this.isNot?`not to`:`to`;return getMessage(this,this.utils.matcherHint(`${this.isNot?`.not`:``}.toHaveErrorMessage`,`element`,``),`Expected the element ${e} have error message`,this.utils.printExpected(t),`Received`,this.utils.printReceived(r))}}}const x={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},S=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|grad|rad|turn)?$/i;function channel(e,t){if(e.toLowerCase()===`none`)return 0;let n=S.exec(e);if(n===null)return null;let r=Number(n[1]);return n[2]===void 0?r:n[2]===`%`?r/100*t:null}function hue(e){let t=S.exec(e);if(t===null)return e.toLowerCase()===`none`?0:null;let n=Number(t[1]);switch(t[2]?.toLowerCase()){case void 0:case`deg`:return n;case`grad`:return n*360/400;case`rad`:return n*180/Math.PI;case`turn`:return n*360;default:return null}}function args(e){let t=e.trim();if(t.includes(`,`)){let e=t.split(`,`).map(e=>e.trim());return e.some(e=>e===``||/\s/.test(e))?null:e}let n=t.indexOf(`/`),r=(n===-1?t:t.slice(0,n)).trim().split(/\s+/);return n!==-1&&r.push(t.slice(n+1).trim()),r}const clamp=(e,t,n)=>Math.min(n,Math.max(t,e));function hslToRgb(e,t,n){e=(e%360+360)%360,t=clamp(t,0,1),n=clamp(n,0,1);let f=r=>{let i=(r+e/30)%12,a=t*Math.min(n,1-n);return(n-a*Math.max(-1,Math.min(i-3,9-i,1)))*255};return[f(0),f(8),f(4)]}function key(e,t,n,r){return`${Math.round(clamp(e,0,255))},${Math.round(clamp(t,0,255))},${Math.round(clamp(n,0,255))},${Math.round(clamp(r,0,1)*1e3)}`}function canonicalColor(e){if(typeof e!=`string`)return null;let t=e.trim().toLowerCase();if(t===``)return null;if(t===`transparent`)return key(0,0,0,0);if(t.charCodeAt(0)===35){let e=t.slice(1);if(!/^[0-9a-f]+$/.test(e))return null;let n=e.length,d=(t,n)=>parseInt(e.slice(t,t+n),16)*(n===1?17:1);return n===3||n===4?key(d(0,1),d(1,1),d(2,1),n===4?d(3,1)/255:1):n===6||n===8?key(d(0,2),d(2,2),d(4,2),n===8?d(6,2)/255:1):null}let n=t.indexOf(`(`);if(n===-1){let e=x[t];return e===void 0?null:key(e>>16,e>>8&255,e&255,1)}if(!t.endsWith(`)`))return null;let r=t.slice(0,n),i=args(t.slice(n+1,-1));if(i===null||i.length!==3&&i.length!==4)return null;let a=i.length===4?channel(i[3],1):1;if(a===null)return null;if(r===`rgb`||r===`rgba`){let e=channel(i[0],255),t=channel(i[1],255),n=channel(i[2],255);return e===null||t===null||n===null?null:key(e,t,n,a)}if(r===`hsl`||r===`hsla`){let e=hue(i[0]),t=channel(i[1],1),n=channel(i[2],1);if(e===null||t===null||n===null)return null;let[r,o,s]=hslToRgb(e,i[1].endsWith(`%`)?t:t/100,i[2].endsWith(`%`)?n:n/100);return key(r,o,s,a)}return null}function sameColor(e,t){let n=canonicalColor(e);return n!==null&&n===canonicalColor(t)}function nodeNameIs(e,t,n){return e.prefix===null?(e.flags&i.F_HTML)===0?e.name===n:(0,i.asciiLowercase)(e.name)===t:!1}function isElementVisibleImpl(e){let t=null;for(let n=e;n!==null&&n.type===i.ELEMENT_NODE;t=n,n=n.parent){if((0,i.computedValue)(n,`display`)===`none`)return!1;let e=(0,i.computedValue)(n,`visibility`);if(e===`hidden`||e===`collapse`||(0,i.computedValue)(n,`opacity`)===`0`||(0,i.getAttribute)(n,`hidden`)!==null||nodeNameIs(n,`details`,`DETAILS`)&&(t===null||!nodeNameIs(t,`summary`,`SUMMARY`))&&(0,i.getAttribute)(n,`open`)===null)return!1}return!0}function isStyleVisible(e){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r,opacity:i}=t(e);return n!==`none`&&r!==`hidden`&&r!==`collapse`&&i!==`0`&&i!==0}function isAttributeVisible(e,t){let n;return n=t?e.nodeName===`DETAILS`&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0:e.nodeName!==`DETAILS`||e.hasAttribute(`open`),!e.hasAttribute(`hidden`)&&n}function isElementVisible(e,t){return isStyleVisible(e)&&isAttributeVisible(e,t)&&(!e.parentElement||isElementVisible(e.parentElement,e))}function toBeVisible(e){checkHtmlElement(e,toBeVisible,this);let t=e.ownerDocument===e.getRootNode({composed:!0}),n=e[i.$impl],r=t&&(n!==void 0&&(0,i.getComputedStyleOverride)(n)===null?isElementVisibleImpl(n):isElementVisible(e));return{pass:r,message:()=>{let n=r?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeVisible`,`element`,``),``,`Received element ${n} visible${t?``:` (element is not in the document)`}:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
19
+ `)}}}function getStyleDeclaration(e,t){let n=normalizedKey(t);if(n!==null){let e=C.get(n);if(e!==void 0)return{...e}}let r={},i=e.createElement(`div`);for(let e of Object.keys(t))i.style[e]=t[e],r[e]=i.style[e];return n!==null&&(C.size>=512&&C.clear(),C.set(n,{...r})),r}const C=/* @__PURE__ */ new Map;function normalizedKey(e){let t=``;for(let n of Object.keys(e)){let r=e[n],i=typeof r;if(i!==`string`&&i!==`number`)return null;t+=`${n}\u0000${i===`number`?`n`:`s`}${r}\u0001`}return t}function valueMatches(e,t){return e===t||sameColor(t,e)}function isSubset(e,t){let n=Object.entries(e);if(n.length===0)return!1;for(let[e,r]of n){let n=e.startsWith(`--`);if(!(valueMatches(t[e],r)||valueMatches(t.getPropertyValue(e),r))){if(!n){let n=e.toLowerCase();if(valueMatches(t[n],r)||valueMatches(t.getPropertyValue(n),r))continue}return!1}}return!0}function printoutStyles(e){return Object.keys(e).sort().map(t=>`${t}: ${e[t]};`).join(`
20
20
  `)}function expectedDiff(e,t,n){let r={};for(let e of Array.from(n))t[e]!==void 0&&(r[e]=n.getPropertyValue(e));return e(printoutStyles(t),printoutStyles(r)).replace(`${picoRed(`+ Received`)}\n`,``)}function toHaveStyle(e,t){checkHtmlElement(e,toHaveStyle,this);let n=typeof t==`object`?t:parseCSS(t,toHaveStyle,this),{getComputedStyle:r}=e.ownerDocument.defaultView,i=getStyleDeclaration(e.ownerDocument,n),a=r(e);return{pass:isSubset(i,a),message:()=>{let e=`${this.isNot?`.not`:``}.toHaveStyle`;return[this.utils.matcherHint(e,`element`,``),expectedDiff(this.utils.diff,i,a)].join(`
21
21
 
22
- `)}}}const C=r.roles;let w=null;function checkedRoles(){return w??=C.keys().filter(e=>C.get(e)?.props[`aria-checked`]!==void 0)}function roleSupportsChecked(e){return e!==null&&checkedRoles().includes(e)}function supportedRolesSentence(){return toSentence(checkedRoles().map(e=>`role="${e}"`),{lastWordConnector:` or `})}function toBeChecked(e){checkHtmlElement(e,toBeChecked,this);let isValidInput=()=>e.tagName.toLowerCase()===`input`&&[`checkbox`,`radio`].includes(e.type),isValidAriaElement=()=>roleSupportsChecked(e.getAttribute(`role`))&&[`true`,`false`].includes(e.getAttribute(`aria-checked`));if(!isValidInput()&&!isValidAriaElement())return{pass:!1,message:()=>`only inputs with type="checkbox" or type="radio" or elements with ${supportedRolesSentence()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`};let isChecked=()=>isValidInput()?e.checked:e.getAttribute(`aria-checked`)===`true`;return{pass:isChecked(),message:()=>{let t=isChecked()?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeChecked`,`element`,``),``,`Received element ${t} checked:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
22
+ `)}}}const w=r.roles;let T=null;function checkedRoles(){return T??=w.keys().filter(e=>w.get(e)?.props[`aria-checked`]!==void 0)}function roleSupportsChecked(e){return e!==null&&checkedRoles().includes(e)}function supportedRolesSentence(){return toSentence(checkedRoles().map(e=>`role="${e}"`),{lastWordConnector:` or `})}function toBeChecked(e){checkHtmlElement(e,toBeChecked,this);let isValidInput=()=>e.tagName.toLowerCase()===`input`&&[`checkbox`,`radio`].includes(e.type),isValidAriaElement=()=>roleSupportsChecked(e.getAttribute(`role`))&&[`true`,`false`].includes(e.getAttribute(`aria-checked`));if(!isValidInput()&&!isValidAriaElement())return{pass:!1,message:()=>`only inputs with type="checkbox" or type="radio" or elements with ${supportedRolesSentence()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`};let isChecked=()=>isValidInput()?e.checked:e.getAttribute(`aria-checked`)===`true`;return{pass:isChecked(),message:()=>{let t=isChecked()?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeChecked`,`element`,``),``,`Received element ${t} checked:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
23
23
  `)}}}function toBePartiallyChecked(e){checkHtmlElement(e,toBePartiallyChecked,this);let isValidInput=()=>e.tagName.toLowerCase()===`input`&&e.type===`checkbox`,isValidAriaElement=()=>e.getAttribute(`role`)===`checkbox`;if(!isValidInput()&&!isValidAriaElement())return{pass:!1,message:()=>`only inputs with type="checkbox" or elements with role="checkbox" and a valid aria-checked attribute can be used with .toBePartiallyChecked(). Use .toHaveValue() instead`};let isPartiallyChecked=()=>{let t=e.getAttribute(`aria-checked`)===`mixed`;return isValidInput()&&e.indeterminate||t};return{pass:isPartiallyChecked(),message:()=>{let t=isPartiallyChecked()?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePartiallyChecked`,`element`,``),``,`Received element ${t} partially checked:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
24
- `)}}}function isButtonLike(e){let t=(e.getAttribute(`role`)||``).split(` `).map(e=>e.trim());return e.tagName.toLowerCase()===`button`||e.tagName.toLowerCase()===`input`&&e.type===`button`||t.includes(`button`)}function toBePressed(e){checkHtmlElement(e,toBePressed,this);let t=isButtonLike(e),n=e.getAttribute(`aria-pressed`);return!t||n!==`true`&&n!==`false`?{pass:!1,message:()=>`Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()`}:{pass:t&&n===`true`,message:()=>{let e=this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePressed`,`element`,``);return getMessage(this,e,`Expected element to have`,`aria-pressed="${this.isNot?`false`:`true`}"`,`Received`,`aria-pressed="${n}"`)}}}function toBePartiallyPressed(e){checkHtmlElement(e,toBePartiallyPressed,this);let t=isButtonLike(e),n=e.getAttribute(`aria-pressed`);return!t||n!==`true`&&n!==`false`&&n!==`mixed`?{pass:!1,message:()=>`Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()`}:{pass:t&&n===`mixed`,message:()=>{let e=this.isNot?`not to`:`to`,t=this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePartiallyPressed`,`element`,``);return getMessage(this,t,`Expected element ${e} have`,`aria-pressed="mixed"`,`Received`,`aria-pressed="${n}"`)}}}const T=[`fieldset`,`input`,`select`,`optgroup`,`option`,`button`,`textarea`];function isFirstLegendChildOfFieldset(e,t){if(getTag(e)!==`legend`||getTag(t)!==`fieldset`)return!1;for(let n=t.firstElementChild;n!==null;n=n.nextElementSibling)if(getTag(n)===`legend`)return e.isSameNode(n);return!1}function isElementDisabledByParent(e,t){return isElementDisabled(t)&&!isFirstLegendChildOfFieldset(e,t)}function isCustomElement(e){return e.includes(`-`)}function canElementBeDisabled(e){let t=getTag(e);return T.includes(t)||isCustomElement(t)}function isElementDisabled(e){return canElementBeDisabled(e)&&e.hasAttribute(`disabled`)}function isAncestorDisabled(e){let t=e.parentElement;return!!t&&(isElementDisabledByParent(e,t)||isAncestorDisabled(t))}function isElementOrAncestorDisabled(e){let t=e[i.$impl];return t===void 0?canElementBeDisabled(e)&&(isElementDisabled(e)||isAncestorDisabled(e)):isElementOrAncestorDisabledImpl(t)}function tagOf(e){return e.prefix===null&&e.tag!==0&&(e.flags&i.F_HTML)!==0?e.name:(e.prefix===null?e.name:`${e.prefix}:${e.name}`).toLowerCase()}function isElementDisabledImpl(e,t){return(T.includes(t)||isCustomElement(t))&&(0,i.getAttribute)(e,`disabled`)!==null}function isElementOrAncestorDisabledImpl(e){let t=tagOf(e);if(!T.includes(t)&&!isCustomElement(t))return!1;if((0,i.getAttribute)(e,`disabled`)!==null)return!0;let n=e,r=t;for(let t=e.parent;t!==null&&t.type===i.ELEMENT_NODE;t=t.parent){let e=tagOf(t);if(isElementDisabledImpl(t,e)&&!isFirstLegendChildImpl(n,r,t,e))return!0;n=t,r=e}return!1}function isFirstLegendChildImpl(e,t,n,r){if(t!==`legend`||r!==`fieldset`)return!1;for(let t=n.first;t!==null;t=t.next)if(t.type===i.ELEMENT_NODE&&tagOf(t)===`legend`)return t===e;return!1}function toBeDisabled(e){checkHtmlElement(e,toBeDisabled,this);let t=isElementOrAncestorDisabled(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeDisabled`,`element`,``),``,`Received element ${n} disabled:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
24
+ `)}}}function isButtonLike(e){let t=(e.getAttribute(`role`)||``).split(` `).map(e=>e.trim());return e.tagName.toLowerCase()===`button`||e.tagName.toLowerCase()===`input`&&e.type===`button`||t.includes(`button`)}function toBePressed(e){checkHtmlElement(e,toBePressed,this);let t=isButtonLike(e),n=e.getAttribute(`aria-pressed`);return!t||n!==`true`&&n!==`false`?{pass:!1,message:()=>`Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()`}:{pass:t&&n===`true`,message:()=>{let e=this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePressed`,`element`,``);return getMessage(this,e,`Expected element to have`,`aria-pressed="${this.isNot?`false`:`true`}"`,`Received`,`aria-pressed="${n}"`)}}}function toBePartiallyPressed(e){checkHtmlElement(e,toBePartiallyPressed,this);let t=isButtonLike(e),n=e.getAttribute(`aria-pressed`);return!t||n!==`true`&&n!==`false`&&n!==`mixed`?{pass:!1,message:()=>`Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()`}:{pass:t&&n===`mixed`,message:()=>{let e=this.isNot?`not to`:`to`,t=this.utils.matcherHint(`${this.isNot?`.not`:``}.toBePartiallyPressed`,`element`,``);return getMessage(this,t,`Expected element ${e} have`,`aria-pressed="mixed"`,`Received`,`aria-pressed="${n}"`)}}}const E=[`fieldset`,`input`,`select`,`optgroup`,`option`,`button`,`textarea`];function isFirstLegendChildOfFieldset(e,t){if(getTag(e)!==`legend`||getTag(t)!==`fieldset`)return!1;for(let n=t.firstElementChild;n!==null;n=n.nextElementSibling)if(getTag(n)===`legend`)return e.isSameNode(n);return!1}function isElementDisabledByParent(e,t){return isElementDisabled(t)&&!isFirstLegendChildOfFieldset(e,t)}function isCustomElement(e){return e.includes(`-`)}function canElementBeDisabled(e){let t=getTag(e);return E.includes(t)||isCustomElement(t)}function isElementDisabled(e){return canElementBeDisabled(e)&&e.hasAttribute(`disabled`)}function isAncestorDisabled(e){let t=e.parentElement;return!!t&&(isElementDisabledByParent(e,t)||isAncestorDisabled(t))}function isElementOrAncestorDisabled(e){let t=e[i.$impl];return t===void 0?canElementBeDisabled(e)&&(isElementDisabled(e)||isAncestorDisabled(e)):isElementOrAncestorDisabledImpl(t)}function tagOf(e){return e.prefix===null&&e.tag!==0&&(e.flags&i.F_HTML)!==0?e.name:(e.prefix===null?e.name:`${e.prefix}:${e.name}`).toLowerCase()}function isElementDisabledImpl(e,t){return(E.includes(t)||isCustomElement(t))&&(0,i.getAttribute)(e,`disabled`)!==null}function isElementOrAncestorDisabledImpl(e){let t=tagOf(e);if(!E.includes(t)&&!isCustomElement(t))return!1;if((0,i.getAttribute)(e,`disabled`)!==null)return!0;let n=e,r=t;for(let t=e.parent;t!==null&&t.type===i.ELEMENT_NODE;t=t.parent){let e=tagOf(t);if(isElementDisabledImpl(t,e)&&!isFirstLegendChildImpl(n,r,t,e))return!0;n=t,r=e}return!1}function isFirstLegendChildImpl(e,t,n,r){if(t!==`legend`||r!==`fieldset`)return!1;for(let t=n.first;t!==null;t=t.next)if(t.type===i.ELEMENT_NODE&&tagOf(t)===`legend`)return t===e;return!1}function toBeDisabled(e){checkHtmlElement(e,toBeDisabled,this);let t=isElementOrAncestorDisabled(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeDisabled`,`element`,``),``,`Received element ${n} disabled:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
25
25
  `)}}}function toBeEnabled(e){checkHtmlElement(e,toBeEnabled,this);let t=!isElementOrAncestorDisabled(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeEnabled`,`element`,``),``,`Received element ${n} enabled:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
26
- `)}}}const E=[`select`,`textarea`],D=[`input`,`select`,`textarea`],O=[`color`,`hidden`,`range`,`submit`,`image`,`reset`],k=[`checkbox`,`combobox`,`gridcell`,`listbox`,`radiogroup`,`spinbutton`,`textbox`,`tree`];function isRequiredOnFormTagsExceptInput(e){return E.includes(getTag(e))&&e.hasAttribute(`required`)}function isRequiredOnSupportedInput(e){return getTag(e)===`input`&&e.hasAttribute(`required`)&&(e.hasAttribute(`type`)&&!O.includes(e.getAttribute(`type`))||!e.hasAttribute(`type`))}function isElementRequiredByARIA(e){return e.hasAttribute(`aria-required`)&&e.getAttribute(`aria-required`)===`true`&&(D.includes(getTag(e))||e.hasAttribute(`role`)&&k.includes(e.getAttribute(`role`)))}function toBeRequired(e){checkHtmlElement(e,toBeRequired,this);let t=isRequiredOnFormTagsExceptInput(e)||isRequiredOnSupportedInput(e)||isElementRequiredByARIA(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeRequired`,`element`,``),``,`Received element ${n} required:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
27
- `)}}}const A=[`form`,`input`,`select`,`textarea`];function isElementHavingAriaInvalid(e){return e.hasAttribute(`aria-invalid`)&&e.getAttribute(`aria-invalid`)!==`false`}function isElementInvalid(e){let t=isElementHavingAriaInvalid(e);return A.includes(getTag(e))?t||!e.checkValidity():t}function toBeInvalid(e){checkHtmlElement(e,toBeInvalid,this);let t=isElementInvalid(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeInvalid`,`element`,``),``,`Received element ${n} currently invalid:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
26
+ `)}}}const D=[`select`,`textarea`],O=[`input`,`select`,`textarea`],k=[`color`,`hidden`,`range`,`submit`,`image`,`reset`],A=[`checkbox`,`combobox`,`gridcell`,`listbox`,`radiogroup`,`spinbutton`,`textbox`,`tree`];function isRequiredOnFormTagsExceptInput(e){return D.includes(getTag(e))&&e.hasAttribute(`required`)}function isRequiredOnSupportedInput(e){return getTag(e)===`input`&&e.hasAttribute(`required`)&&(e.hasAttribute(`type`)&&!k.includes(e.getAttribute(`type`))||!e.hasAttribute(`type`))}function isElementRequiredByARIA(e){return e.hasAttribute(`aria-required`)&&e.getAttribute(`aria-required`)===`true`&&(O.includes(getTag(e))||e.hasAttribute(`role`)&&A.includes(e.getAttribute(`role`)))}function toBeRequired(e){checkHtmlElement(e,toBeRequired,this);let t=isRequiredOnFormTagsExceptInput(e)||isRequiredOnSupportedInput(e)||isElementRequiredByARIA(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeRequired`,`element`,``),``,`Received element ${n} required:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
27
+ `)}}}const j=[`form`,`input`,`select`,`textarea`];function isElementHavingAriaInvalid(e){return e.hasAttribute(`aria-invalid`)&&e.getAttribute(`aria-invalid`)!==`false`}function isElementInvalid(e){let t=isElementHavingAriaInvalid(e);return j.includes(getTag(e))?t||!e.checkValidity():t}function toBeInvalid(e){checkHtmlElement(e,toBeInvalid,this);let t=isElementInvalid(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeInvalid`,`element`,``),``,`Received element ${n} currently invalid:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
28
28
  `)}}}function toBeValid(e){checkHtmlElement(e,toBeValid,this);let t=!isElementInvalid(e);return{pass:t,message:()=>{let n=t?`is`:`is not`;return[this.utils.matcherHint(`${this.isNot?`.not`:``}.toBeValid`,`element`,``),``,`Received element ${n} currently valid:`,` ${this.utils.printReceived(e.cloneNode(!1))}`].join(`
29
29
  `)}}}function toMatchAriaSnapshot(e,t){if(typeof e!=`object`||!e||e[i.$impl]===void 0)throw new NodeTypeError(e,toMatchAriaSnapshot,this);if(typeof t!=`string`)throw TypeError(`toMatchAriaSnapshot expects an aria snapshot template string, got ${t===null?`null`:typeof t}`);let n;try{n=(0,a.matchAriaSnapshot)(e,t)}catch(e){throw e instanceof a.AriaTemplateError&&Error.captureStackTrace&&Error.captureStackTrace(e,toMatchAriaSnapshot),e}let r=this.utils.matcherHint(`${this.isNot?`.not`:``}.toMatchAriaSnapshot`,`element`,`template`);return{pass:n.pass,message:()=>{if(this.isNot)return[r,``,`Expected the accessibility tree not to match the template:`,this.utils.EXPECTED_COLOR(n.expected()),``,`Received:`,this.utils.RECEIVED_COLOR(n.received())].join(`
30
30
  `);let e=n.diff(),t=0,i=0,a=[];for(let n=0;n<e.length;n++){let r=e[n];r.kind===`-`?(t++,a.push(this.utils.EXPECTED_COLOR(`- ${r.text}`))):r.kind===`+`?(i++,a.push(this.utils.RECEIVED_COLOR(`+ ${r.text}`))):a.push(` ${r.text}`)}return[r,``,`${this.utils.EXPECTED_COLOR(`- Expected - ${t}`)} (template)`,`${this.utils.RECEIVED_COLOR(`+ Received + ${i}`)} (closest part of the accessibility tree)`,``,...a,``,`Received accessibility tree:`,this.utils.RECEIVED_COLOR(n.received())].join(`
31
- `)}}}var j=/* @__PURE__ */ __exportAll({toAppearAfter:()=>toAppearAfter,toAppearBefore:()=>toAppearBefore,toBeChecked:()=>toBeChecked,toBeDisabled:()=>toBeDisabled,toBeEmpty:()=>toBeEmpty,toBeEmptyDOMElement:()=>toBeEmptyDOMElement,toBeEnabled:()=>toBeEnabled,toBeInTheDOM:()=>toBeInTheDOM,toBeInTheDocument:()=>toBeInTheDocument,toBeInvalid:()=>toBeInvalid,toBePartiallyChecked:()=>toBePartiallyChecked,toBePartiallyPressed:()=>toBePartiallyPressed,toBePressed:()=>toBePressed,toBeRequired:()=>toBeRequired,toBeValid:()=>toBeValid,toBeVisible:()=>toBeVisible,toContainAnyByAltText:()=>M,toContainAnyByDisplayValue:()=>P,toContainAnyByLabelText:()=>I,toContainAnyByPlaceholderText:()=>R,toContainAnyByRole:()=>B,toContainAnyByTestId:()=>H,toContainAnyByText:()=>W,toContainAnyByTitle:()=>K,toContainElement:()=>toContainElement,toContainHTML:()=>toContainHTML,toContainOneByAltText:()=>N,toContainOneByDisplayValue:()=>F,toContainOneByLabelText:()=>L,toContainOneByPlaceholderText:()=>z,toContainOneByRole:()=>V,toContainOneByTestId:()=>U,toContainOneByText:()=>G,toContainOneByTitle:()=>q,toHaveAccessibleDescription:()=>toHaveAccessibleDescription,toHaveAccessibleErrorMessage:()=>toHaveAccessibleErrorMessage,toHaveAccessibleName:()=>toHaveAccessibleName,toHaveAttribute:()=>toHaveAttribute,toHaveClass:()=>toHaveClass,toHaveDescription:()=>toHaveDescription,toHaveDisplayValue:()=>toHaveDisplayValue,toHaveErrorMessage:()=>toHaveErrorMessage,toHaveFocus:()=>toHaveFocus,toHaveFormValues:()=>toHaveFormValues,toHaveRole:()=>toHaveRole,toHaveSelection:()=>toHaveSelection,toHaveStyle:()=>toHaveStyle,toHaveTextContent:()=>toHaveTextContent,toHaveValue:()=>toHaveValue,toMatchAriaSnapshot:()=>toMatchAriaSnapshot});const{toContainAnyByAltText:M,toContainOneByAltText:N,toContainAnyByDisplayValue:P,toContainOneByDisplayValue:F,toContainAnyByLabelText:I,toContainOneByLabelText:L,toContainAnyByPlaceholderText:R,toContainOneByPlaceholderText:z,toContainAnyByRole:B,toContainOneByRole:V,toContainAnyByTestId:H,toContainOneByTestId:U,toContainAnyByText:W,toContainOneByText:G,toContainAnyByTitle:K,toContainOneByTitle:q}=m;Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return toHaveAccessibleDescription}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return toHaveSelection}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return toBePartiallyChecked}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return toBeValid}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return toBeRequired}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return toHaveRole}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return toBeEmpty}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return toHaveValue}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return toHaveAttribute}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return toBeInTheDocument}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return toBeEmptyDOMElement}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return toHaveClass}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return toHaveAccessibleName}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return toHaveDescription}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return toBeVisible}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return toHaveErrorMessage}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return toHaveDisplayValue}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return toBeInvalid}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return toBePressed}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return toAppearAfter}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return toHaveTextContent}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return toAppearBefore}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return toContainHTML}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return toContainElement}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return toHaveFocus}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return toBeDisabled}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return toHaveAccessibleErrorMessage}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return toHaveStyle}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return toBeInTheDOM}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return toMatchAriaSnapshot}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return toBePartiallyPressed}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return toBeEnabled}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return toBeChecked}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return toHaveFormValues}});
31
+ `)}}}var M=/* @__PURE__ */ __exportAll({toAppearAfter:()=>toAppearAfter,toAppearBefore:()=>toAppearBefore,toBeChecked:()=>toBeChecked,toBeDisabled:()=>toBeDisabled,toBeEmpty:()=>toBeEmpty,toBeEmptyDOMElement:()=>toBeEmptyDOMElement,toBeEnabled:()=>toBeEnabled,toBeInTheDOM:()=>toBeInTheDOM,toBeInTheDocument:()=>toBeInTheDocument,toBeInvalid:()=>toBeInvalid,toBePartiallyChecked:()=>toBePartiallyChecked,toBePartiallyPressed:()=>toBePartiallyPressed,toBePressed:()=>toBePressed,toBeRequired:()=>toBeRequired,toBeValid:()=>toBeValid,toBeVisible:()=>toBeVisible,toContainAnyByAltText:()=>N,toContainAnyByDisplayValue:()=>F,toContainAnyByLabelText:()=>L,toContainAnyByPlaceholderText:()=>z,toContainAnyByRole:()=>V,toContainAnyByTestId:()=>U,toContainAnyByText:()=>G,toContainAnyByTitle:()=>q,toContainElement:()=>toContainElement,toContainHTML:()=>toContainHTML,toContainOneByAltText:()=>P,toContainOneByDisplayValue:()=>I,toContainOneByLabelText:()=>R,toContainOneByPlaceholderText:()=>B,toContainOneByRole:()=>H,toContainOneByTestId:()=>W,toContainOneByText:()=>K,toContainOneByTitle:()=>J,toHaveAccessibleDescription:()=>toHaveAccessibleDescription,toHaveAccessibleErrorMessage:()=>toHaveAccessibleErrorMessage,toHaveAccessibleName:()=>toHaveAccessibleName,toHaveAttribute:()=>toHaveAttribute,toHaveClass:()=>toHaveClass,toHaveDescription:()=>toHaveDescription,toHaveDisplayValue:()=>toHaveDisplayValue,toHaveErrorMessage:()=>toHaveErrorMessage,toHaveFocus:()=>toHaveFocus,toHaveFormValues:()=>toHaveFormValues,toHaveRole:()=>toHaveRole,toHaveSelection:()=>toHaveSelection,toHaveStyle:()=>toHaveStyle,toHaveTextContent:()=>toHaveTextContent,toHaveValue:()=>toHaveValue,toMatchAriaSnapshot:()=>toMatchAriaSnapshot});const{toContainAnyByAltText:N,toContainOneByAltText:P,toContainAnyByDisplayValue:F,toContainOneByDisplayValue:I,toContainAnyByLabelText:L,toContainOneByLabelText:R,toContainAnyByPlaceholderText:z,toContainOneByPlaceholderText:B,toContainAnyByRole:V,toContainOneByRole:H,toContainAnyByTestId:U,toContainOneByTestId:W,toContainAnyByText:G,toContainOneByText:K,toContainAnyByTitle:q,toContainOneByTitle:J}=m;Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return toHaveAccessibleDescription}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return toHaveSelection}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return toBePartiallyChecked}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return toBeValid}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return toBeRequired}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return toHaveRole}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return toBeEmpty}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return toHaveValue}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return toHaveAttribute}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return toBeInTheDocument}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return toBeEmptyDOMElement}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return toHaveClass}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return toHaveAccessibleName}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return toHaveDescription}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return toBeVisible}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return toHaveErrorMessage}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return toHaveDisplayValue}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return toBeInvalid}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return toBePressed}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return toAppearAfter}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return toHaveTextContent}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return toAppearBefore}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return toContainHTML}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return toContainElement}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return toHaveFocus}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return toBeDisabled}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return toHaveAccessibleErrorMessage}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return toHaveStyle}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return toBeInTheDOM}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return toMatchAriaSnapshot}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return toBePartiallyPressed}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return toBeEnabled}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return toBeChecked}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return toHaveFormValues}});
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/matchers-DJmRgUYG.cjs");expect.extend(e.t);
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/matchers-lhGtjS66.cjs");expect.extend(e.t);
@@ -1 +1 @@
1
- import{t as e}from"./_chunks/matchers-DGsBvtWC.js";expect.extend(e);export{};
1
+ import{t as e}from"./_chunks/matchers-D7d49HIF.js";expect.extend(e);export{};
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/matchers-DJmRgUYG.cjs");require("@jest/globals").expect.extend(e.t);
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/matchers-lhGtjS66.cjs");require("@jest/globals").expect.extend(e.t);
@@ -1 +1 @@
1
- import{t as e}from"./_chunks/matchers-DGsBvtWC.js";import{expect as t}from"@jest/globals";t.extend(e);export{};
1
+ import{t as e}from"./_chunks/matchers-D7d49HIF.js";import{expect as t}from"@jest/globals";t.extend(e);export{};
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/matchers-DJmRgUYG.cjs");exports.toAppearAfter=e.U,exports.toAppearBefore=e.W,exports.toBeChecked=e.y,exports.toBeDisabled=e.b,exports.toBeEmpty=e.G,exports.toBeEmptyDOMElement=e.K,exports.toBeEnabled=e.x,exports.toBeInTheDOM=e.q,exports.toBeInTheDocument=e.J,exports.toBeInvalid=e.S,exports.toBePartiallyChecked=e.C,exports.toBePartiallyPressed=e.w,exports.toBePressed=e.T,exports.toBeRequired=e.E,exports.toBeValid=e.D,exports.toBeVisible=e.O,exports.toContainAnyByAltText=e.n,exports.toContainAnyByDisplayValue=e.r,exports.toContainAnyByLabelText=e.i,exports.toContainAnyByPlaceholderText=e.a,exports.toContainAnyByRole=e.o,exports.toContainAnyByTestId=e.s,exports.toContainAnyByText=e.c,exports.toContainAnyByTitle=e.l,exports.toContainElement=e.Y,exports.toContainHTML=e.X,exports.toContainOneByAltText=e.u,exports.toContainOneByDisplayValue=e.d,exports.toContainOneByLabelText=e.f,exports.toContainOneByPlaceholderText=e.p,exports.toContainOneByRole=e.m,exports.toContainOneByTestId=e.h,exports.toContainOneByText=e.g,exports.toContainOneByTitle=e._,exports.toHaveAccessibleDescription=e.A,exports.toHaveAccessibleErrorMessage=e.j,exports.toHaveAccessibleName=e.M,exports.toHaveAttribute=e.I,exports.toHaveClass=e.L,exports.toHaveDescription=e.N,exports.toHaveDisplayValue=e.R,exports.toHaveErrorMessage=e.P,exports.toHaveFocus=e.Z,exports.toHaveFormValues=e.z,exports.toHaveRole=e.F,exports.toHaveSelection=e.B,exports.toHaveStyle=e.k,exports.toHaveTextContent=e.V,exports.toHaveValue=e.H,exports.toMatchAriaSnapshot=e.v;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/matchers-lhGtjS66.cjs");exports.toAppearAfter=e.U,exports.toAppearBefore=e.W,exports.toBeChecked=e.y,exports.toBeDisabled=e.b,exports.toBeEmpty=e.G,exports.toBeEmptyDOMElement=e.K,exports.toBeEnabled=e.x,exports.toBeInTheDOM=e.q,exports.toBeInTheDocument=e.J,exports.toBeInvalid=e.S,exports.toBePartiallyChecked=e.C,exports.toBePartiallyPressed=e.w,exports.toBePressed=e.T,exports.toBeRequired=e.E,exports.toBeValid=e.D,exports.toBeVisible=e.O,exports.toContainAnyByAltText=e.n,exports.toContainAnyByDisplayValue=e.r,exports.toContainAnyByLabelText=e.i,exports.toContainAnyByPlaceholderText=e.a,exports.toContainAnyByRole=e.o,exports.toContainAnyByTestId=e.s,exports.toContainAnyByText=e.c,exports.toContainAnyByTitle=e.l,exports.toContainElement=e.Y,exports.toContainHTML=e.X,exports.toContainOneByAltText=e.u,exports.toContainOneByDisplayValue=e.d,exports.toContainOneByLabelText=e.f,exports.toContainOneByPlaceholderText=e.p,exports.toContainOneByRole=e.m,exports.toContainOneByTestId=e.h,exports.toContainOneByText=e.g,exports.toContainOneByTitle=e._,exports.toHaveAccessibleDescription=e.A,exports.toHaveAccessibleErrorMessage=e.j,exports.toHaveAccessibleName=e.M,exports.toHaveAttribute=e.I,exports.toHaveClass=e.L,exports.toHaveDescription=e.N,exports.toHaveDisplayValue=e.R,exports.toHaveErrorMessage=e.P,exports.toHaveFocus=e.Z,exports.toHaveFormValues=e.z,exports.toHaveRole=e.F,exports.toHaveSelection=e.B,exports.toHaveStyle=e.k,exports.toHaveTextContent=e.V,exports.toHaveValue=e.H,exports.toMatchAriaSnapshot=e.v;
@@ -1 +1 @@
1
- export{U as toAppearAfter,W as toAppearBefore,y as toBeChecked,b as toBeDisabled,G as toBeEmpty,K as toBeEmptyDOMElement,x as toBeEnabled,q as toBeInTheDOM,J as toBeInTheDocument,S as toBeInvalid,C as toBePartiallyChecked,w as toBePartiallyPressed,T as toBePressed,E as toBeRequired,D as toBeValid,O as toBeVisible,n as toContainAnyByAltText,r as toContainAnyByDisplayValue,i as toContainAnyByLabelText,a as toContainAnyByPlaceholderText,o as toContainAnyByRole,s as toContainAnyByTestId,c as toContainAnyByText,l as toContainAnyByTitle,Y as toContainElement,X as toContainHTML,u as toContainOneByAltText,d as toContainOneByDisplayValue,f as toContainOneByLabelText,p as toContainOneByPlaceholderText,m as toContainOneByRole,h as toContainOneByTestId,g as toContainOneByText,_ as toContainOneByTitle,A as toHaveAccessibleDescription,j as toHaveAccessibleErrorMessage,M as toHaveAccessibleName,I as toHaveAttribute,L as toHaveClass,N as toHaveDescription,R as toHaveDisplayValue,P as toHaveErrorMessage,Z as toHaveFocus,z as toHaveFormValues,F as toHaveRole,B as toHaveSelection,k as toHaveStyle,V as toHaveTextContent,H as toHaveValue,v as toMatchAriaSnapshot}from"./_chunks/matchers-DGsBvtWC.js";
1
+ export{U as toAppearAfter,W as toAppearBefore,y as toBeChecked,b as toBeDisabled,G as toBeEmpty,K as toBeEmptyDOMElement,x as toBeEnabled,q as toBeInTheDOM,J as toBeInTheDocument,S as toBeInvalid,C as toBePartiallyChecked,w as toBePartiallyPressed,T as toBePressed,E as toBeRequired,D as toBeValid,O as toBeVisible,n as toContainAnyByAltText,r as toContainAnyByDisplayValue,i as toContainAnyByLabelText,a as toContainAnyByPlaceholderText,o as toContainAnyByRole,s as toContainAnyByTestId,c as toContainAnyByText,l as toContainAnyByTitle,Y as toContainElement,X as toContainHTML,u as toContainOneByAltText,d as toContainOneByDisplayValue,f as toContainOneByLabelText,p as toContainOneByPlaceholderText,m as toContainOneByRole,h as toContainOneByTestId,g as toContainOneByText,_ as toContainOneByTitle,A as toHaveAccessibleDescription,j as toHaveAccessibleErrorMessage,M as toHaveAccessibleName,I as toHaveAttribute,L as toHaveClass,N as toHaveDescription,R as toHaveDisplayValue,P as toHaveErrorMessage,Z as toHaveFocus,z as toHaveFormValues,F as toHaveRole,B as toHaveSelection,k as toHaveStyle,V as toHaveTextContent,H as toHaveValue,v as toMatchAriaSnapshot}from"./_chunks/matchers-D7d49HIF.js";
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/matchers-DJmRgUYG.cjs");require("vitest").expect.extend(e.t);
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/matchers-lhGtjS66.cjs");require("vitest").expect.extend(e.t);
@@ -1 +1 @@
1
- import{t as e}from"./_chunks/matchers-DGsBvtWC.js";import{expect as t}from"vitest";t.extend(e);export{};
1
+ import{t as e}from"./_chunks/matchers-D7d49HIF.js";import{expect as t}from"vitest";t.extend(e);export{};
@@ -0,0 +1,16 @@
1
+ var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0});let t=require("@ctrl/dom/internal"),n=require("@ctrl/dom/aria/internal"),r=require("node:module"),i=require("node:fs"),a=require("@ctrl/dom/aria");const o=new URL(`./`,require("url").pathToFileURL(__filename).href).pathname;let s=null;const c=process.env,l=process.argv,u=!(c.NO_COLOR||l.includes(`--no-color`))&&(!!c.FORCE_COLOR||l.includes(`--color`)||process.platform===`win32`||process.stdout?.isTTY&&c.TERM!==`dumb`||!!c.CI);function dim(e){return u?`\x1b[2m${e}\x1b[22m`:e}function getCodeFrame(e){s??=(0,r.createRequire)(require("url").pathToFileURL(__filename).href)(`@babel/code-frame`).codeFrameColumns;let t=e.indexOf(`(`)+1,n=e.indexOf(`)`),a=e.slice(t,n),o=a.split(`:`),[c,l,u]=[o[0],parseInt(o[1],10),parseInt(o[2],10)],d=``;try{d=(0,i.readFileSync)(c,`utf-8`)}catch{return``}let f=s(d,{start:{line:l,column:u-1}},{highlightCode:!0,linesBelow:0});return`${dim(a)}\n${f}\n`}function getUserCodeFrame(){return getCodeFrame((/* @__PURE__ */ Error()).stack.split(`
2
+ `).slice(1).find(e=>!e.includes(`node_modules/`)&&!e.includes(o)))}const d=Object.freeze({});function jestFakeTimersAreEnabled(){if(typeof jest<`u`&&jest!==null)return setTimeout._isMockFunction===!0||Object.hasOwn(setTimeout,`clock`);let e=setTimeout.clock;return e!=null&&typeof e.tick==`function`}function advanceFakeTimersByTime(e){if(typeof jest<`u`&&jest!==null){jest.advanceTimersByTime(e);return}let t=globalThis.vi;t!=null&&typeof t.advanceTimersByTime==`function`&&typeof t.isFakeTimers==`function`&&t.isFakeTimers()?t.advanceTimersByTime(e):setTimeout.clock.tick(e)}function getDocument(){if(typeof window>`u`)throw Error(`Could not find default container`);return window.document}function getWindowFromNode(e){if(e.defaultView)return e.defaultView;if(e.ownerDocument&&e.ownerDocument.defaultView)return e.ownerDocument.defaultView;if(e.window)return e.window;throw e.ownerDocument&&e.ownerDocument.defaultView===null?Error(`It looks like the window object is not available for the provided node.`):e.then instanceof Function?Error("It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?"):Array.isArray(e)?Error("It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?"):typeof e.debug==`function`&&typeof e.logTestingPlaygroundURL==`function`?Error("It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?"):Error(`The given node is not an Element, the node type is: ${typeof e}.`)}function checkContainerType(e){if(!e||typeof e.querySelector!=`function`||typeof e.querySelectorAll!=`function`)throw TypeError(`Expected container to be an Element, a Document or a DocumentFragment but got ${getTypeName(e)}.`)}function getTypeName(e){return typeof e==`object`?e===null?`null`:e.constructor.name:typeof e}function implOf(e){let n=e[t.$impl];if(n===void 0)throw TypeError(`@ctrl/dom/testing-library requires nodes created by @ctrl/dom.`);return n}function matchesSelector(e,n){return e.type===t.ELEMENT_NODE&&(0,t.matches)(e,n)}function envDebugFormat(){let e=typeof process<`u`?process.env?.CTRL_DOM_DEBUG:void 0;if(e===void 0||e===``)return null;let t=String(e).trim().toLowerCase();return t===`aria`?`aria`:t===`compact`||t===`html`?`compact`:null}function containerLabel(e){let n=e?.[t.$impl];return n===void 0?`the container`:n.type===9?`the document`:describeElement(n)}function agentErrorContext(e,t,n){return t===`aria`?`Accessibility snapshot of ${containerLabel(e)} (CTRL_DOM_DEBUG=aria):\n${ariaSnapshot(e,{maxLines:envMaxLines()??100})}`:`DOM of ${containerLabel(e)} without class/style/SVG internals (CTRL_DOM_DEBUG=compact):\n${n(e,void 0,{format:`compact`})}`}function agentElementSummary(e){return ariaSnapshot(e,{maxLines:12})}function envMaxLines(){let e=typeof process<`u`?process.env?.CTRL_DOM_DEBUG_LINES:void 0,t=e?Number(e):NaN;return t>0?t:void 0}function ariaSnapshot(e,t={}){let{header:n,lines:r,empty:i}=ariaSnapshotLines(e,t);return i===null?n+budgetLines(r,t.maxLines??envMaxLines()??200).join(`
3
+ `):n+i}(0,t.setFailureSnapshot)(e=>ariaSnapshot(e,{maxLines:2e3}));function buildTree(e,r){let i=rootImpl(e),a=new SnapshotContext(i,r),o=[],s=``;return!a.includeHidden&&i.type===t.ELEMENT_NODE&&(0,n.isInaccessibleImpl)(i)&&(s=`# hidden from the accessibility tree: ${hiddenReason(i)}\n`,a.includeHidden=!0,a.forceHidden=!0),i.type===t.ELEMENT_NODE&&i!==bodyOf(i)?a.visitElement(i,o,a.forceHidden):a.visitChildren(i,o,!1,!1),finishChildren(o,null),{root:i,ctx:a,children:o,header:s}}function ariaSnapshotTree(e,t={}){return buildTree(e,t).children}function ariaSnapshotLines(e,t={}){let{root:n,ctx:r,children:i,header:a}=buildTree(e,t),o=[];r.renderList(i,``,o);let s=o.length>0?null:r.sawHidden?`# no accessible content (hidden elements exist: pass { hidden: true })`:`# no accessible content`;return n===bodyOf(n)&&envDebugFormat()!==null&&recordBodySnapshot(n.doc,s??o.join(`
4
+ `)),{header:a,lines:o,empty:s}}function budgetLines(e,t){if(e.length<=t)return e;let n=e.length-t,r=e.slice(0,t);return r.push(`# … ${n} more line${n===1?``:`s`} (raise maxLines or CTRL_DOM_DEBUG_LINES)`),r}const f=Symbol.for(`ctrl-dom.agent.lastBodySnapshot`);function recordBodySnapshot(e,t){e!=null&&Object.defineProperty(e,f,{value:t,configurable:!0,writable:!0,enumerable:!1})}function lastBodySnapshot(e){return e?.[f]}function resetBodySnapshot(e){e!=null&&Object.hasOwn(e,f)&&delete e[f]}function rootImpl(e){let n=e??getDocument().body,r=n?.[t.$impl];if(r===void 0)throw TypeError(`Expected an element, document or fragment but got ${n===null?`null`:typeof n}`);if(r.type===t.DOCUMENT_NODE||r.tag===t.T.html&&r.ns===t.HTML_NS){let e=r.doc?.body;return e?e[t.$impl]:r}return r}function bodyOf(e){let n=e.doc?.body;return n?n[t.$impl]:null}function normalizeSpace(e){return e.replace(/[\t\n\f\r ]+/g,` `)}function truncate(e,t){return e.length>t?e.slice(0,Math.max(1,t-1))+`…`:e}function quote(e){return JSON.stringify(e)}const p=/^$|^[\s\-?:,[\]{}#&*!|>'"%@`]|[\s]$|:$|: | #|^(true|false|null|yes|no|on|off|~)$|^[-+]?(\d+\.?\d*|\.\d+)(e[-+]?\d+)?$/i;function yamlValue(e){return p.test(e)?quote(e):e}function nodeKey(e,t){let n=e.role;e.name!==``&&(n+=` `+quote(truncate(e.name,t)));for(let t=0;t<e.props.length;t++)n+=` `+e.props[t];return n}function describeElement(e){let n=e.name;if(e.id!==``)return`<${n} id="${e.id}">`;let r=(0,t.attr)(e,`data-testid`);return r===null?`<${n}>`:`<${n} data-testid="${r}">`}function hiddenReason(e){let t=hiddenChainReason(e);return t===``?(0,n.isVisibilityHidden)(e)?`visibility: hidden on ${describeElement(e)}`:``:t}function hiddenChainReason(e){for(let r=e;r!==null&&r.type===t.ELEMENT_NODE;r=r.parent){if(r.ns===t.HTML_NS&&(0,t.attr)(r,`hidden`)!==null)return`hidden attribute on ${describeElement(r)}`;if((0,t.ariaAttr)(r,`aria-hidden`)===`true`)return`aria-hidden="true" on ${describeElement(r)}`;if((0,n.isDisplayNone)(r))return`display: none on ${describeElement(r)}`}return``}const m=/* @__PURE__ */ new Set([``,`generic`,`none`,`presentation`]);function isSkippedTag(e){if(e.ns!==t.HTML_NS)return!1;switch(e.tag){case t.T.script:case t.T.style:case t.T.template:case t.T.noscript:case t.T.head:return!0}return!1}function nodeProps(e,t,r,i){let o=[];if((0,a.roleSupportsProp)(t,`aria-checked`)){let t=(0,n.ariaCheckedState)(e);t===!0?o.push(`[checked]`):t===`mixed`&&o.push(`[checked=mixed]`)}(0,n.isDisabledImpl)(e)&&o.push(`[disabled]`);let s=(0,n.computeAriaExpanded)(e);s===!0?o.push(`[expanded]`):s===!1&&o.push(`[expanded=false]`),r&&o.push(`[active]`);let c=t===`heading`?(0,n.computeHeadingLevel)(e):levelAttr(e);c!==void 0&&o.push(`[level=${c}]`);let l=(0,n.ariaPressedState)(e);l===!0?o.push(`[pressed]`):l===`mixed`?o.push(`[pressed=mixed]`):l===!1&&o.push(`[pressed=false]`),(0,n.computeAriaSelected)(e)===!0&&o.push(`[selected]`);let u=(0,n.computeAriaCurrent)(e);return u===!0?o.push(`[current]`):typeof u==`string`&&u!==``&&o.push(`[current=${u}]`),(0,n.computeAriaBusy)(e)&&o.push(`[busy]`),i&&o.push(`[hidden]`),o}function levelAttr(e){let n=(0,t.ariaAttr)(e,`aria-level`),r=n===null?NaN:Number(n);return r>0?r:void 0}const h=/* @__PURE__ */ new Set([`textbox`,`searchbox`,`combobox`,`spinbutton`,`slider`,`progressbar`,`meter`,`scrollbar`,`separator`]);function nodeValue(e,n){if(!h.has(n))return null;let r=(0,t.ariaAttr)(e,`aria-valuetext`);if(r!==null)return r;let i=(0,t.ariaAttr)(e,`aria-valuenow`);if(i!==null)return i;if(e.ns!==t.HTML_NS)return null;if(e.tag===t.T.input||e.tag===t.T.textarea){let t=String(e.node.value??``);return t===``?null:t}return null}var SnapshotContext=class{includeHidden;forceHidden=!1;sawHidden=!1;maxText;collapseAfter;urls;active;constructor(e,n){this.includeHidden=n.hidden===!0,this.maxText=n.maxTextLength??100,this.collapseAfter=n.collapseAfter??5,this.urls=n.urls===!0;let r=e.doc?.activeElement,i=r?r[t.$impl]??null:null;this.active=i!==null&&i===bodyOf(e)?null:i}visitChildren(e,n,r,i){for(let a=e.first;a!==null;a=a.next)a.type===t.TEXT_NODE?i||appendText(n,a.data):a.type===t.ELEMENT_NODE?this.visitElement(a,n,r):a.type===t.DOCUMENT_FRAGMENT_NODE&&this.visitChildren(a,n,r,i)}visitElement(e,r,i){if(isSkippedTag(e))return;let a=i;if(!a&&(0,n.isSubtreeInaccessibleImpl)(e)){if(this.sawHidden=!0,!this.includeHidden)return;a=!0}let o=a;if(!a&&(0,n.isVisibilityHidden)(e)){if(this.sawHidden=!0,!this.includeHidden){this.visitChildren(e,r,!1,!0);return}o=!0}let s=(0,n.tlRole)(e);if(m.has(s)){let t=!(0,n.isDisplayInline)(e);t&&appendBreak(r),this.visitChildren(e,r,a,!1),t&&appendBreak(r);return}let c={role:s,name:normalizeSpace((0,n.computeAccessibleNameImpl)(e,void 0,5)).trim(),props:nodeProps(e,s,e===this.active,o&&this.includeHidden),value:nodeValue(e,s),url:null,children:[],element:e};this.urls&&s===`link`&&(c.url=(0,t.attr)(e,`href`)),(e.ns!==t.HTML_NS||e.tag!==t.T.textarea)&&this.visitChildren(e,c.children,a,!1),finishChildren(c.children,c.name),r.push(c)}renderList(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];if(typeof i==`string`){n.push(`${t}- text: ${yamlValue(truncate(i,this.maxText))}`);continue}let a=1;for(;r+a<e.length&&typeof e[r+a]!=`string`&&e[r+a].role===i.role;)a++;if(a>this.collapseAfter+1){for(let i=0;i<this.collapseAfter;i++)this.renderNode(e[r+i],t,n);n.push(`${t}- ${i.role} … (+${a-this.collapseAfter} more)`),r+=a-1}else this.renderNode(i,t,n)}}renderNode(e,t,n){let r=nodeKey(e,this.maxText),i=e.children;if(e.url===null&&(i.length===0||i.length===1&&typeof i[0]==`string`&&e.value===null)){let a=e.value??(i.length===1?i[0]:null);n.push(a===null?`${t}- ${r}`:`${t}- ${r}: ${yamlValue(truncate(a,this.maxText))}`);return}n.push(e.value===null?`${t}- ${r}:`:`${t}- ${r}: ${yamlValue(truncate(e.value,this.maxText))}`);let a=t+` `;e.url!==null&&n.push(`${a}- /url: ${yamlValue(e.url)}`),this.renderList(i,a,n)}};function appendText(e,t){if(t===``)return;let n=e.length-1;n>=0&&typeof e[n]==`string`&&e[n]!==`\0`?e[n]=e[n]+t:e.push(t)}function appendBreak(e){let t=e.length-1;t>=0&&typeof e[t]==`string`&&e[t]!==`\0`&&e.push(`\0`)}function finishChildren(e,t){let n=0;for(let t=0;t<e.length;t++){let r=e[t];typeof r==`string`&&(r===`\0`||(r=normalizeSpace(r).trim(),r===``))||(e[n++]=r)}e.length=n,e.length>0&&typeof e[0]==`string`&&e[0]===t&&e.splice(0,1),n=0;for(let t=0;t<e.length;t++){let r=e[t];(typeof r!=`string`||!labels(e[t-1],r)&&!labels(e[t+1],r))&&(e[n++]=r)}e.length=n}const g=/* @__PURE__ */ new Set([`textbox`,`searchbox`,`combobox`,`listbox`,`checkbox`,`radio`,`switch`,`slider`,`spinbutton`,`meter`,`progressbar`]);function labels(e,t){return e!==void 0&&typeof e!=`string`&&e.name===t&&g.has(e.role)}let _=null;function loadPrettyFormat(e){if(_!==null)return _;try{return _=(0,r.createRequire)(require("url").pathToFileURL(__filename).href)(`pretty-format`)}catch(t){throw Error(`${e} needs pretty-format, which @ctrl/dom does not install: add pretty-format@27 to the project's devDependencies.`,{cause:t})}}const v=`The prettyFormat export`,y=Object.defineProperties({},{format:{enumerable:!0,get:()=>loadPrettyFormat(v).format},default:{enumerable:!0,get:()=>loadPrettyFormat(v).default},plugins:{enumerable:!0,get:()=>loadPrettyFormat(v).plugins},DEFAULT_OPTIONS:{enumerable:!0,get:()=>loadPrettyFormat(v).DEFAULT_OPTIONS}}),shouldHighlight=()=>{if(typeof process>`u`)return!1;let e;try{let t=process.env?.COLORS;t&&(e=JSON.parse(t))}catch{}return typeof e==`boolean`?e:process.versions!==void 0&&process.versions.node!==void 0};function filterCommentsAndDefaultIgnoreTagsTags(e){return e.nodeType!==t.COMMENT_NODE&&(e.nodeType!==t.ELEMENT_NODE||!e.matches(getConfig().defaultIgnore))}const b={open:``,close:``},x={comment:b,content:b,prop:b,tag:b,value:b},S={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],gray:[90,39],grey:[90,39],bgGray:[100,49],bgGrey:[100,49]};for(let[e,t]of[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`].entries()){let n=`bg${t[0].toUpperCase()}${t.slice(1)}`;S[t]=[30+e,39],S[`${t}Bright`]=[90+e,39],S[n]=[40+e,49],S[`${n}Bright`]=[100+e,49]}const C={comment:`gray`,content:`reset`,prop:`yellow`,tag:`cyan`,value:`green`};function highlightColors(e){let t={};for(let n of Object.keys(C)){let r=e!==void 0&&e[n]!==void 0?e[n]:C[n],i=typeof r==`string`&&Object.hasOwn(S,r)?S[r]:void 0;if(i===void 0)throw Error(`pretty-format: Option "theme" has a key "${n}" whose value "${r}" is undefined in ansi-styles.`);t[n]={open:`\u001b[${i[0]}m`,close:`\u001b[${i[1]}m`}}return t}const w=highlightColors(void 0),T=/* @__PURE__ */ new Set([`callToJSON`,`compareKeys`,`escapeRegex`,`escapeString`,`highlight`,`indent`,`maxDepth`,`min`,`plugins`,`printBasicPrototype`,`printFunctionName`,`theme`]),E=Symbol(`delegate`),D=/^((HTML|SVG)\w*)?Element$/,O=/* @__PURE__ */ new WeakMap;function isCustomElement(e){let{tagName:t}=e;return!!(typeof t==`string`&&t.includes(`-`)||typeof e.hasAttribute==`function`&&e.hasAttribute(`is`))}function pluginHandles(e){let n=e.node,r=n.constructor,i=r?.name;switch(e.type){case t.ELEMENT_NODE:{if(!i&&!isCustomElement(n))return!1;if(typeof r!=`function`)return D.test(i)||isCustomElement(n);let e=O.get(r);return e===void 0&&O.set(r,e=D.test(i)),e||isCustomElement(n)}case t.TEXT_NODE:return i===`Text`;case t.COMMENT_NODE:return i===`Comment`;case t.DOCUMENT_FRAGMENT_NODE:return i===`DocumentFragment`}return!1}function escapeHTML(e){return e.indexOf(`<`)===-1&&e.indexOf(`>`)===-1?e:e.replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function printString(e,t){return t.escapeString?`"`+e.replace(/"|\\/g,`\\$&`)+`"`:`"`+e+`"`}function keepChild(e,n){return n.filterNode===null?e.type===t.COMMENT_NODE?!1:e.type===t.ELEMENT_NODE?n.scriptStyleIgnore?e.name!==`script`&&e.name!==`style`:!matchesSelector(e,n.defaultIgnore):!0:!!n.filterNode(e.node)}function tagNameLower(e){return e.node.tagName.toLowerCase()}function printProps(e,t,n){let r=e.attrs;if(r===null||r.length===0)return``;let i=[],a=/* @__PURE__ */ new Map;for(let n=0;n<r.length;n++)t.compact&&isNoiseAttribute(e,r[n].name)||(i.push(r[n].name),a.set(r[n].name,r[n].value));i.sort();let o=``;for(let e=0;e<i.length;e++)o+=printProp(i[e],printString(a.get(i[e]),t),t,n);return o}function printProp(e,t,n,r){let i=n.colors;return n.spacingInner+r+i.prop.open+e+i.prop.close+`=`+i.value.open+t+i.value.close}function printText(e,t){return t.colors.content.open+escapeHTML(e)+t.colors.content.close}function printComment(e,t){return t.colors.comment.open+`<!--`+escapeHTML(e)+`-->`+t.colors.comment.close}function printElementAsLeaf(e,t){let n=t.colors.tag;return n.open+`<`+e+n.close+` …`+n.open+` />`+n.close}function isNoiseAttribute(e,n){return n===`class`||n===`style`||e.ns===t.SVG_NS&&n!==`role`&&n!==`id`&&!n.startsWith(`aria-`)&&!n.startsWith(`data-`)}function printChildren(e,n,r,i){if(n.compact&&e.ns===t.SVG_NS&&e.name===`svg`)return``;let a=``;for(let o=e.first;o!==null;o=o.next)keepChild(o,n)&&(n.compact&&o.type===t.TEXT_NODE&&o.data.trim()===``||(a+=n.spacingOuter+r+printNode(o,n,r,i)));return a}function printElement(e,t,n,r,i){let a=r.colors.tag;return a.open+`<`+e+(t&&a.close+t+r.spacingOuter+i+a.open)+(n?`>`+a.close+n+r.spacingOuter+i+a.open+`</`+e:(t&&!r.min?``:` `)+`/`)+`>`+a.close}function printNode(e,n,r,i){if(!pluginHandles(e))throw E;if(e.type===t.TEXT_NODE)return printText(n.compact&&e.data.length>200?e.data.slice(0,199)+`…`:e.data,n);if(e.type===t.COMMENT_NODE)return printComment(e.data,n);let a=e.type===t.DOCUMENT_FRAGMENT_NODE?`DocumentFragment`:tagNameLower(e);if(++i>n.maxDepth)return printElementAsLeaf(a,n);let o=r+n.indent;return printElement(a,e.type===t.DOCUMENT_FRAGMENT_NODE?``:printProps(e,n,o),printChildren(e,n,o,i),n,r)}function printForeignNode(e,n,r,i,a){if(!foreignHandles(e))throw E;if(e.nodeType===t.TEXT_NODE)return printText(e.data,n);if(e.nodeType===t.COMMENT_NODE)return printComment(e.data,n);let o=e.nodeType===t.DOCUMENT_FRAGMENT_NODE,s=o?`DocumentFragment`:e.tagName.toLowerCase();if(++a>n.maxDepth)return printElementAsLeaf(s,n);let c=i+n.indent,l=``;if(!o){let t=Array.from(e.attributes);t.sort((e,t)=>e.name<t.name?-1:+(e.name>t.name));for(let{name:e,value:r}of t)l+=printProp(e,printString(r,n),n,c)}let u=``,d=e.childNodes||e.children;for(let e=0;e<d.length;e++)r(d[e])&&(u+=n.spacingOuter+c+printForeignNode(d[e],n,r,c,a));return printElement(s,l,u,n,i)}function foreignHandles(e){let n=e?.constructor?.name;if(!n&&!isCustomElement(e))return!1;switch(e.nodeType){case t.ELEMENT_NODE:return D.test(n)||isCustomElement(e);case t.TEXT_NODE:return n===`Text`;case t.COMMENT_NODE:return n===`Comment`;case t.DOCUMENT_FRAGMENT_NODE:return n===`DocumentFragment`}return!1}function makePrintConfig(e,t){for(let t of Object.keys(e))if(!T.has(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.`);if(e.theme!==void 0){if(e.theme===null)throw Error(`pretty-format: Option "theme" must not be null.`);if(typeof e.theme!=`object`)throw Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof e.theme}".`)}if(e.plugins!==void 0)return null;let n=!!e.min,r=e.indent===void 0?2:e.indent,i=getConfig().defaultIgnore;return{colors:e.highlight?e.theme===void 0?w:highlightColors(e.theme):x,escapeString:e.escapeString===void 0||e.escapeString,indent:n?``:Array(r+1).join(` `),maxDepth:e.maxDepth===void 0?1/0:e.maxDepth,min:n,spacingInner:n?` `:`
5
+ `,spacingOuter:n?``:`
6
+ `,filterNode:t,scriptStyleIgnore:i===`script, style`,defaultIgnore:i,compact:!1}}function formatDOM(e,n,r,i=!1){let a={printFunctionName:!1,highlight:shouldHighlight(),...r},o=n??filterCommentsAndDefaultIgnoreTagsTags,s=makePrintConfig(a,n===void 0?null:n);if(s===null)return formatWithPrettyFormat(e,o,a,`The "plugins" option of prettyDOM`);s.compact=i;let c=e[t.$impl];try{return c===void 0?printForeignNode(e,s,o,``,0):printNode(c,s,``,0)}catch(e){if(e!==E)throw e}return formatWithPrettyFormat(e,o,a,`Printing a node other than an element, text, comment or fragment`)}function formatWithPrettyFormat(e,t,n,r=`pretty-format's own printing`){let i=loadPrettyFormat(r);return i.format(e,{plugins:[createDOMElementFilter(t),i.plugins.DOMCollection],...n})}function prettyDOM(e,t,n={}){e||=getDocument().body;let r=typeof t==`number`?t:void 0;if(typeof t!=`number`&&(t=typeof process<`u`&&process.env!==void 0&&process.env.DEBUG_PRINT_LIMIT||7e3),t===0)return``;e.documentElement&&(e=e.documentElement);let i=typeof e;if(i===`object`?i=e.constructor.name:e={},!(`outerHTML`in e))throw TypeError(`Expected an element or document but got ${i}`);let a=n.format??envDebugFormat();if(a!==null||`format`in n){let{format:i,hidden:o,maxLines:s,maxTextLength:c,collapseAfter:l,urls:u,...d}=n;if(a===`aria`){let t=ariaSnapshot(e,{hidden:o,maxLines:s,maxTextLength:c,collapseAfter:l,urls:u});return r!==void 0&&t.length>r?`${t.slice(0,r)}...`:t}if(n=d,a===`compact`){let{filterNode:r,...i}={highlight:!1,...n},a=formatDOM(e,r,i,!0);return a.length>t?`${a.slice(0,t)}...`:a}}let{filterNode:o,...s}=n,c=formatDOM(e,o,s);return t!==void 0&&outerHTMLLength(e)>t?`${c.slice(0,t)}...`:c}function outerHTMLLength(e){let n=e[t.$impl];return n!==void 0&&n.type===t.ELEMENT_NODE?(0,t.serializeNode)(n).length:e.outerHTML.length}const logDOM=(...e)=>{let t=getUserCodeFrame();console.log(t?`${prettyDOM(...e)}\n\n${t}`:prettyDOM(...e))};function createDOMElementFilter(e){let printPropsPF=(e,t,n,r,i,a,o)=>{let s=r+n.indent;return e.map(e=>{let c=t[e],l=o(c,n,s,i,a);return typeof c!=`string`&&(l.indexOf(`
7
+ `)!==-1&&(l=n.spacingOuter+s+l+n.spacingOuter+r),l=`{`+l+`}`),printProp(e,l,n,r)}).join(``)},printChildrenPF=(e,n,r,i,a,o)=>e.map(e=>{let s=typeof e==`string`?printText(e,n):o(e,n,r,i,a);return s===``&&typeof e==`object`&&e&&e.nodeType!==t.TEXT_NODE?``:n.spacingOuter+r+s}).join(``),testNode=e=>{let n=e.constructor.name,{nodeType:r}=e;return r===t.ELEMENT_NODE&&(D.test(n)||isCustomElement(e))||r===t.TEXT_NODE&&n===`Text`||r===t.COMMENT_NODE&&n===`Comment`||r===t.DOCUMENT_FRAGMENT_NODE&&n===`DocumentFragment`};return{test:e=>(e?.constructor?.name||isCustomElement(e))&&testNode(e),serialize:(n,r,i,a,o,s)=>{if(n.nodeType===t.TEXT_NODE)return printText(n.data,r);if(n.nodeType===t.COMMENT_NODE)return printComment(n.data,r);let c=n.nodeType===t.DOCUMENT_FRAGMENT_NODE,l=c?`DocumentFragment`:n.tagName.toLowerCase();return++a>r.maxDepth?printElementAsLeaf(l,r):printElement(l,printPropsPF(c?[]:Array.from(n.attributes).map(e=>e.name).sort(),c?{}:Array.from(n.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{}),r,i+r.indent,a,o,s),printChildrenPF(Array.prototype.slice.call(n.childNodes||n.children).filter(e),r,i+r.indent,a,o,s),r,i)}}}let k={testIdAttribute:`data-testid`,asyncUtilTimeout:1e3,asyncWrapper:e=>e(),unstable_advanceTimersWrapper:e=>e(),eventWrapper:e=>e(),defaultHidden:!1,defaultIgnore:`script, style`,showOriginalStackTrace:!1,throwSuggestions:!1,getElementError(e,t){let n=envDebugFormat();if(n!==null){let r=Error([e,agentErrorContext(t,n,prettyDOM)].filter(Boolean).join(`
8
+
9
+ `));return r.name=`TestingLibraryElementError`,r}if(A)return lazyElementError(e,t,k.defaultIgnore);let r=prettyDOM(t),i=Error([e,`Ignored nodes: comments, ${k.defaultIgnore}\n${r}`].filter(Boolean).join(`
10
+
11
+ `));return i.name=`TestingLibraryElementError`,i},_disableExpensiveErrorDiagnostics:!1,computedStyleSupportsPseudoElements:!1},A=!1;function lazyElementError(e,t,n){let r=/* @__PURE__ */ Error();r.name=`TestingLibraryElementError`;let settle=e=>(Object.defineProperty(r,"message",{value:e,writable:!0,enumerable:!1,configurable:!0}),e);return Object.defineProperty(r,"message",{get:()=>settle([e,`Ignored nodes: comments, ${n}\n${prettyDOM(t)}`].filter(Boolean).join(`
12
+
13
+ `)),set:settle,enumerable:!1,configurable:!0}),r}function runWithExpensiveErrorDiagnosticsDisabled(e,t=!1){let n=A;try{return k._disableExpensiveErrorDiagnostics=!0,A=t,e()}finally{k._disableExpensiveErrorDiagnostics=!1,A=n}}function configure(e){typeof e==`function`&&(e=e(k)),k={...k,...e}}function getConfig(){return k}function diffAriaSnapshots(e,t){let n=diffLines(e.split(`
14
+ `),t.split(`
15
+ `)),r=new Uint8Array(n.length),i=!1;for(let e=0;e<n.length;e++){if(n[e].kind===`=`)continue;i=!0,r[e]=1;let t=indentOf(n[e].text);for(let i=e-1;i>=0&&t>0;i--){if(n[i].kind!==`=`)continue;let e=indentOf(n[i].text);e<t&&(r[i]=1,t=e)}}if(!i)return`(no changes)`;let a=[],o=-1;for(let e=0;e<n.length;e++)r[e]!==0&&(o!==-1&&e!==o+1&&a.push(` …`),a.push(`${n[e].kind===`=`?` `:n[e].kind} ${n[e].text}`),o=e);return a.join(`
16
+ `)}function indentOf(e){let t=0;for(;t<e.length&&e.charCodeAt(t)===32;)t++;return t}function diffLines(e,t){let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;let r=e.length,i=t.length;for(;r>n&&i>n&&e[r-1]===t[i-1];)r--,i--;let a=[];for(let t=0;t<n;t++)a.push({kind:`=`,text:e[t]});let o=r-n,s=i-n;if(o*s>4e6){for(let t=n;t<r;t++)a.push({kind:`-`,text:e[t]});for(let e=n;e<i;e++)a.push({kind:`+`,text:t[e]})}else{let r=s+1,i=new Uint32Array((o+1)*r);for(let a=o-1;a>=0;a--)for(let o=s-1;o>=0;o--)i[a*r+o]=e[n+a]===t[n+o]?i[(a+1)*r+o+1]+1:Math.max(i[(a+1)*r+o],i[a*r+o+1]);let c=0,l=0;for(;c<o||l<s;)c<o&&l<s&&e[n+c]===t[n+l]?(a.push({kind:`=`,text:e[n+c]}),c++,l++):c<o&&(l===s||i[(c+1)*r+l]>=i[c*r+l+1])?(a.push({kind:`-`,text:e[n+c]}),c++):(a.push({kind:`+`,text:t[n+l]}),l++)}for(let t=r;t<e.length;t++)a.push({kind:`=`,text:e[t]});return a}Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return getWindowFromNode}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return agentElementSummary}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return advanceFakeTimersByTime}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return jestFakeTimersAreEnabled}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return __name}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return checkContainerType}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return yamlValue}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return matchesSelector}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return nodeKey}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return runWithExpensiveErrorDiagnosticsDisabled}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return resetBodySnapshot}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return ariaSnapshotTree}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return budgetLines}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return lastBodySnapshot}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return hiddenReason}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return getConfig}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return implOf}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return getDocument}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return ariaSnapshot}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return envMaxLines}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return diffLines}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return logDOM}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return describeElement}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return configure}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return prettyDOM}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return diffAriaSnapshots}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return ariaSnapshotLines}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return nodeProps}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return envDebugFormat}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return truncate}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return quote}});