@scrippsproduct/networks-ui-library 1.1.8 → 1.1.10-alpha.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 (121) hide show
  1. package/dist/{Form.module-Cd8qH2rj.mjs → Form.module-CarfWK5T.mjs} +1 -1
  2. package/dist/ResultsTable.module-wcNUQEKe.mjs +14 -0
  3. package/dist/_commonjsHelpers-DaMA6jEr.mjs +8 -0
  4. package/dist/assets/ResultsTable.css +1 -1
  5. package/dist/assets/ScheduleLayout.css +1 -1
  6. package/dist/{chevron-left-DRvpaLmK.mjs → chevron-left-D0UjbrKw.mjs} +1 -1
  7. package/dist/{chevron-right-C8yCnmfx.mjs → chevron-right-0ZF3LruR.mjs} +1 -1
  8. package/dist/components/ActionButton/ActionButton.test.js +209 -0
  9. package/dist/components/AdBlock/AdBlock.test.js +286 -0
  10. package/dist/components/AdjustableTwoColumnGrid/AdjustableTwoColumnGrid.test.js +295 -0
  11. package/dist/components/AirDateFormatter/AirDateFormatter.test.js +192 -0
  12. package/dist/components/AnchorTag/AnchorTag.test.js +463 -0
  13. package/dist/components/BCVideoPlayer/BCVideoPlayer.test.js +295 -0
  14. package/dist/components/BasicGridModule/BasicGridModule.js +41 -37
  15. package/dist/components/BasicGridModule/BasicGridModule.test.js +227 -0
  16. package/dist/components/Button/Button.test.js +434 -0
  17. package/dist/components/Carousel/Carousel.js +2 -2
  18. package/dist/components/Carousel/Carousel.test.js +705 -0
  19. package/dist/components/CarouselSlide/CarouselSlide.test.js +378 -0
  20. package/dist/components/CarouselSlide/slide-layouts/TwoColumn/TwoColumnSlide.js +1 -1
  21. package/dist/components/CastInfoLayout/CastInfoLayout.test.js +294 -0
  22. package/dist/components/ChannelSearch/ChannelSearch.test.js +565 -0
  23. package/dist/components/ChoicesItem/ChoicesItem.test.js +428 -0
  24. package/dist/components/Concat/Concat.js +1 -1
  25. package/dist/components/Concat/Concat.test.js +115 -0
  26. package/dist/components/CtaBlock/CtaBlock.js +1 -1
  27. package/dist/components/CtaBlock/CtaBlock.test.js +226 -0
  28. package/dist/components/CustomDataList/CustomDataList.js +4 -4
  29. package/dist/components/CustomSelect/CustomSelect.js +86 -86
  30. package/dist/components/CustomSelect/CustomSelect.test.js +313 -0
  31. package/dist/components/DateNavigation/DateNavigation.js +10 -10
  32. package/dist/components/DateNavigation/DateNavigation.test.js +370 -0
  33. package/dist/components/DatePicker/DatePicker.js +1 -1
  34. package/dist/components/DeviceAndPlatformLists/DeviceAndPlatformLists.test.js +288 -0
  35. package/dist/components/DrawerNavigation/DrawerNavigation.test.js +316 -0
  36. package/dist/components/EqualSizeFlexRow/EqualSizeFlexRow.test.js +337 -0
  37. package/dist/components/EqualSizeGrid/EqualSizeGrid.test.js +358 -0
  38. package/dist/components/ErrorHandler/ErrorHandler.js +2 -2
  39. package/dist/components/ErrorHandler/ErrorHandler.test.js +158 -0
  40. package/dist/components/FeaturedList/FeaturedList.test.js +353 -0
  41. package/dist/components/Figure/Figure.js +1 -1
  42. package/dist/components/Figure/Figure.test.js +198 -0
  43. package/dist/components/FindUs/FindUs.test.js +499 -0
  44. package/dist/components/FooterNavigation/FooterNavigation.test.js +310 -0
  45. package/dist/components/GenericList/GenericList.js +1 -1
  46. package/dist/components/GenericList/GenericList.test.js +288 -0
  47. package/dist/components/GetAirdateWrapper/GetAirdateWrapper.test.js +689 -0
  48. package/dist/components/GradientButton/GradientButton.d.ts +1 -1
  49. package/dist/components/GradientButton/GradientButton.js +33 -31
  50. package/dist/components/GradientButton/GradientButton.test.js +457 -0
  51. package/dist/components/GridList/GridList.test.js +371 -0
  52. package/dist/components/ImageCard/ImageCard.test.js +668 -0
  53. package/dist/components/ImageCard/ImageCardCore.js +28 -28
  54. package/dist/components/ImageCard/ImageCardCore.test.js +577 -0
  55. package/dist/components/ImageReplacementAnchor/ImageReplacementAnchor.test.js +379 -0
  56. package/dist/components/InfoPanel/InfoPanel.js +1 -1
  57. package/dist/components/InlineNavigation/InlineNavigation.test.js +149 -0
  58. package/dist/components/Input/Input.js +1 -1
  59. package/dist/components/Input/Input.test.js +263 -0
  60. package/dist/components/InstructionsList/InstructionsList.js +11 -11
  61. package/dist/components/InstructionsList/InstructionsList.test.js +181 -0
  62. package/dist/components/LogoListItem/LogoListItem.test.js +303 -0
  63. package/dist/components/LogoNavigation/LogoNavigation.test.js +352 -0
  64. package/dist/components/ModalContainer/ModalContainer.js +2 -2
  65. package/dist/components/NavList/NavList.test.js +332 -0
  66. package/dist/components/Overlay/Overlay.js +24 -23
  67. package/dist/components/Overlay/Overlay.test.js +198 -0
  68. package/dist/components/PageHero/PageHero.test.js +241 -0
  69. package/dist/components/PageHero/page-hero-layouts/IONShow/IONShowHero.js +1 -1
  70. package/dist/components/ProgramAirdate/ProgramAirdate.js +1 -1
  71. package/dist/components/ProgramAirdate/ProgramAirdate.test.js +414 -0
  72. package/dist/components/PromotionBlock/PromotionBlock.test.js +208 -0
  73. package/dist/components/PromotionsRowBlock/PromotionsRowBlock.test.js +221 -0
  74. package/dist/components/PromotionsRowModule/PromotionsRowModule.test.js +349 -0
  75. package/dist/components/RescanInstructions/RescanInstructions.test.js +218 -0
  76. package/dist/components/ResponsiveImage/ResponsiveImage.test.js +264 -0
  77. package/dist/components/ResultsTable/ResultsTable.js +9 -2
  78. package/dist/components/ResultsTable/ResultsTable.test.js +402 -0
  79. package/dist/components/ResultsTableBody/ResultsTableBody.js +1 -1
  80. package/dist/components/ResultsTableBody/ResultsTableBody.test.js +445 -0
  81. package/dist/components/ResultsTableHeader/ResultsTableHeader.js +37 -15
  82. package/dist/components/ResultsTableHeader/ResultsTableHeader.test.js +275 -0
  83. package/dist/components/ScheduleLayout/ScheduleContext.js +654 -626
  84. package/dist/components/ScheduleLayout/ScheduleLayout.js +1 -1
  85. package/dist/components/ScheduleLayout/useScheduleContext.js +5 -10
  86. package/dist/components/ScheduleList/ScheduleList.js +1 -1
  87. package/dist/components/SectionedContent/SectionedContent.js +1 -1
  88. package/dist/components/SectionedContent/SectionedContent.test.js +341 -0
  89. package/dist/components/Select/Select.js +24 -24
  90. package/dist/components/Select/Select.test.js +367 -0
  91. package/dist/components/ShowAboutContent/ShowAboutContent.js +1 -1
  92. package/dist/components/ShowAboutContent/ShowAboutContent.test.js +535 -0
  93. package/dist/components/ShowAboutLayout/ShowAboutLayout.test.js +570 -0
  94. package/dist/components/SocialLinks/SocialLinks.js +1 -1
  95. package/dist/components/StringList/StringList.js +1 -1
  96. package/dist/components/StringList/StringList.test.js +311 -0
  97. package/dist/components/TabContent/TabContent.js +1 -1
  98. package/dist/components/TabContent/TabContent.test.js +274 -0
  99. package/dist/components/TabNavigation/TabNavigation.js +21 -21
  100. package/dist/components/TabNavigation/TabNavigation.test.js +535 -0
  101. package/dist/components/TabbedContent/TabbedContent.test.js +654 -0
  102. package/dist/components/TextArea/TextArea.js +1 -1
  103. package/dist/components/UpcomingList/UpcomingList.test.js +471 -0
  104. package/dist/{index-VjANCDXC.mjs → index-06PEPfBQ.mjs} +1 -1
  105. package/dist/index-BUN4jQ3m.mjs +3098 -0
  106. package/dist/index-BVxBrkZB.mjs +3 -0
  107. package/dist/{index-DC2JJV3a.mjs → index-D3kkcgee.mjs} +1 -1
  108. package/dist/{index-C-kn9Zhn.mjs → index-DzfYkULW.mjs} +2 -1
  109. package/dist/magic-string.es-uPKorP4O.mjs +663 -0
  110. package/dist/matchers-35e4d3bd-BBPNTlen.mjs +2404 -0
  111. package/dist/react.esm-DLSrfVwM.mjs +23410 -0
  112. package/dist/test/setupTests.d.ts +1 -0
  113. package/dist/test/setupTests.js +55 -0
  114. package/dist/{triangle-PcCcGXjr.mjs → triangle-C4z906Wf.mjs} +1 -1
  115. package/dist/useScheduleContext-D7FdzNxe.mjs +17 -0
  116. package/dist/utils/analytics.js +1 -1
  117. package/dist/utils/getOnNowProgram.js +10 -10
  118. package/dist/{x-C-QzJ-qD.mjs → x-Ck9Vk5Fo.mjs} +1 -1
  119. package/package.json +4 -1
  120. package/dist/ResultsTable.module-1zxhXaem.mjs +0 -14
  121. package/dist/_commonjsHelpers-C6fGbg64.mjs +0 -6
@@ -0,0 +1,2404 @@
1
+ var It = Object.defineProperty;
2
+ var Ht = (e, t, n) => t in e ? It(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var P = (e, t, n) => Ht(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { g as pe, c as ve } from "./_commonjsHelpers-DaMA6jEr.mjs";
5
+ import { l as he } from "./react.esm-DLSrfVwM.mjs";
6
+ var J, ye;
7
+ function Tt() {
8
+ return ye || (ye = 1, J = (e) => {
9
+ const t = e.match(/^[ \t]*(?=\S)/gm);
10
+ return t ? t.reduce((n, r) => Math.min(n, r.length), 1 / 0) : 0;
11
+ }), J;
12
+ }
13
+ var Z, Ee;
14
+ function Dt() {
15
+ if (Ee) return Z;
16
+ Ee = 1;
17
+ const e = Tt();
18
+ return Z = (t) => {
19
+ const n = e(t);
20
+ if (n === 0)
21
+ return t;
22
+ const r = new RegExp(`^[ \\t]{${n}}`, "gm");
23
+ return t.replace(r, "");
24
+ }, Z;
25
+ }
26
+ var ee, we;
27
+ function Bt() {
28
+ return we || (we = 1, ee = (e, t = 1, n) => {
29
+ if (n = {
30
+ indent: " ",
31
+ includeEmptyLines: !1,
32
+ ...n
33
+ }, typeof e != "string")
34
+ throw new TypeError(
35
+ `Expected \`input\` to be a \`string\`, got \`${typeof e}\``
36
+ );
37
+ if (typeof t != "number")
38
+ throw new TypeError(
39
+ `Expected \`count\` to be a \`number\`, got \`${typeof t}\``
40
+ );
41
+ if (typeof n.indent != "string")
42
+ throw new TypeError(
43
+ `Expected \`options.indent\` to be a \`string\`, got \`${typeof n.indent}\``
44
+ );
45
+ if (t === 0)
46
+ return e;
47
+ const r = n.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
48
+ return e.replace(r, n.indent.repeat(t));
49
+ }), ee;
50
+ }
51
+ var te, xe;
52
+ function Pt() {
53
+ if (xe) return te;
54
+ xe = 1;
55
+ const e = Dt(), t = Bt();
56
+ return te = (n, r = 0, i) => t(e(n), r, i), te;
57
+ }
58
+ var kt = Pt();
59
+ const Ne = /* @__PURE__ */ pe(kt);
60
+ class Mt extends Error {
61
+ constructor(n, r, i, s, o) {
62
+ super(`${n}:${i}:${s}: ${r}`);
63
+ P(this, "reason");
64
+ P(this, "filename");
65
+ P(this, "line");
66
+ P(this, "column");
67
+ P(this, "source");
68
+ this.reason = r, this.filename = n, this.line = i, this.column = s, this.source = o;
69
+ }
70
+ }
71
+ class Lt {
72
+ constructor(t, n, r) {
73
+ P(this, "start");
74
+ P(this, "end");
75
+ P(this, "source");
76
+ this.start = t, this.end = n, this.source = r;
77
+ }
78
+ }
79
+ var N;
80
+ (function(e) {
81
+ e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.container = "container", e.charset = "charset", e.document = "document", e.customMedia = "custom-media", e.fontFace = "font-face", e.host = "host", e.import = "import", e.keyframes = "keyframes", e.keyframe = "keyframe", e.layer = "layer", e.media = "media", e.namespace = "namespace", e.page = "page", e.startingStyle = "starting-style", e.supports = "supports";
82
+ })(N || (N = {}));
83
+ const Se = (e, t, n) => {
84
+ let r = n, i = 1e4;
85
+ do {
86
+ const s = t.map((c) => e.indexOf(c, r));
87
+ s.push(e.indexOf("\\", r));
88
+ const o = s.filter((c) => c !== -1);
89
+ if (o.length === 0) return -1;
90
+ const f = Math.min(...o);
91
+ if (e[f] !== "\\") return f;
92
+ r = f + 2, i--;
93
+ } while (i > 0);
94
+ throw new Error("Too many escaping");
95
+ }, re = (e, t, n) => {
96
+ let r = n, i = 1e4;
97
+ do {
98
+ const s = t.map((c) => e.indexOf(c, r));
99
+ s.push(e.indexOf("(", r)), s.push(e.indexOf('"', r)), s.push(e.indexOf("'", r)), s.push(e.indexOf("\\", r));
100
+ const o = s.filter((c) => c !== -1);
101
+ if (o.length === 0) return -1;
102
+ const f = Math.min(...o);
103
+ switch (e[f]) {
104
+ case "\\":
105
+ r = f + 2;
106
+ break;
107
+ case "(":
108
+ {
109
+ const c = re(e, [")"], f + 1);
110
+ if (c === -1) return -1;
111
+ r = c + 1;
112
+ }
113
+ break;
114
+ case '"':
115
+ {
116
+ const c = Se(e, ['"'], f + 1);
117
+ if (c === -1) return -1;
118
+ r = c + 1;
119
+ }
120
+ break;
121
+ case "'":
122
+ {
123
+ const c = Se(e, ["'"], f + 1);
124
+ if (c === -1) return -1;
125
+ r = c + 1;
126
+ }
127
+ break;
128
+ default:
129
+ return f;
130
+ }
131
+ i--;
132
+ } while (i > 0);
133
+ throw new Error("Too many escaping");
134
+ }, ne = /\/\*[^]*?(?:\*\/|$)/g;
135
+ function R(e) {
136
+ return e ? e.trim() : "";
137
+ }
138
+ function ie(e, t) {
139
+ const n = e && typeof e.type == "string", r = n ? e : t;
140
+ for (const i in e) {
141
+ const s = e[i];
142
+ Array.isArray(s) ? s.forEach((o) => {
143
+ ie(o, r);
144
+ }) : s && typeof s == "object" && ie(s, r);
145
+ }
146
+ return n && Object.defineProperty(e, "parent", { configurable: !0, writable: !0, enumerable: !1, value: t || null }), e;
147
+ }
148
+ const Vt = (e, t) => {
149
+ t = t || {};
150
+ let n = 1, r = 1;
151
+ function i() {
152
+ const l = { line: n, column: r };
153
+ return (u) => (u.position = new Lt(l, { line: n, column: r }, (t == null ? void 0 : t.source) || ""), V(), u);
154
+ }
155
+ const s = [];
156
+ function o(l) {
157
+ const u = new Mt((t == null ? void 0 : t.source) || "", l, n, r, e);
158
+ if (!(t != null && t.silent)) throw u;
159
+ s.push(u);
160
+ }
161
+ function f() {
162
+ const l = /^{\s*/.exec(e);
163
+ return !!l && (h(l), !0);
164
+ }
165
+ function c() {
166
+ const l = /^}/.exec(e);
167
+ return !!l && (h(l), !0);
168
+ }
169
+ function b() {
170
+ let l;
171
+ const u = [];
172
+ for (V(), y(u); e.length && e.charAt(0) !== "}" && (l = I() || D(), l); ) u.push(l), y(u);
173
+ return u;
174
+ }
175
+ function h(l) {
176
+ const u = l[0];
177
+ return (function(d) {
178
+ const p = d.match(/\n/g);
179
+ p && (n += p.length);
180
+ const g = d.lastIndexOf(`
181
+ `);
182
+ r = ~g ? d.length - g : r + d.length;
183
+ })(u), e = e.slice(u.length), l;
184
+ }
185
+ function V() {
186
+ const l = /^\s*/.exec(e);
187
+ l && h(l);
188
+ }
189
+ function y(l) {
190
+ l = l || [];
191
+ let u = H();
192
+ for (; u; ) l.push(u), u = H();
193
+ return l;
194
+ }
195
+ function H() {
196
+ const l = i();
197
+ if (e.charAt(0) !== "/" || e.charAt(1) !== "*") return;
198
+ const u = /^\/\*[^]*?\*\//.exec(e);
199
+ return u ? (h(u), l({ type: N.comment, comment: u[0].slice(2, -2) })) : o("End of comment missing");
200
+ }
201
+ function U() {
202
+ const l = /^([^{]+)/.exec(e);
203
+ if (l)
204
+ return h(l), ((u, d) => {
205
+ const p = [];
206
+ let g = 0;
207
+ for (; g < u.length; ) {
208
+ const x = re(u, d, g);
209
+ if (x === -1) return p.push(u.substring(g)), p;
210
+ p.push(u.substring(g, x)), g = x + 1;
211
+ }
212
+ return p;
213
+ })(R(l[0]).replace(ne, ""), [","]).map((u) => R(u));
214
+ }
215
+ function M() {
216
+ const l = i(), u = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);
217
+ if (!u) return;
218
+ h(u);
219
+ const d = R(u[0]), p = /^:\s*/.exec(e);
220
+ if (!p) return o("property missing ':'");
221
+ h(p);
222
+ let g = "";
223
+ const x = re(e, [";", "}"]);
224
+ x !== -1 && (g = e.substring(0, x), h([g]), g = R(g).replace(ne, ""));
225
+ const B = l({ type: N.declaration, property: d.replace(ne, ""), value: g }), j = /^[;\s]*/.exec(e);
226
+ return j && h(j), B;
227
+ }
228
+ function O() {
229
+ const l = [];
230
+ if (!f()) return o("missing '{'");
231
+ y(l);
232
+ let u = M();
233
+ for (; u; ) l.push(u), y(l), u = M();
234
+ return c() ? l : o("missing '}'");
235
+ }
236
+ function a() {
237
+ const l = [], u = i();
238
+ let d = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
239
+ for (; d; ) {
240
+ const p = h(d);
241
+ l.push(p[1]);
242
+ const g = /^,\s*/.exec(e);
243
+ g && h(g), d = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
244
+ }
245
+ if (l.length) return u({ type: N.keyframe, values: l, declarations: O() || [] });
246
+ }
247
+ const w = $("import"), E = $("charset"), T = $("namespace");
248
+ function $(l) {
249
+ const u = new RegExp("^@" + l + `\\s*((?::?[^;'"]|"(?:\\\\"|[^"])*?"|'(?:\\\\'|[^'])*?')+)(?:;|$)`);
250
+ return () => {
251
+ const d = i(), p = u.exec(e);
252
+ if (!p) return;
253
+ const g = h(p), x = { type: l };
254
+ return x[l] = g[1].trim(), d(x);
255
+ };
256
+ }
257
+ function I() {
258
+ if (e[0] === "@") return (function() {
259
+ const l = i(), u = /^@([-\w]+)?keyframes\s*/.exec(e);
260
+ if (!u) return;
261
+ const d = h(u)[1], p = /^([-\w]+)\s*/.exec(e);
262
+ if (!p) return o("@keyframes missing name");
263
+ const g = h(p)[1];
264
+ if (!f()) return o("@keyframes missing '{'");
265
+ let x = y(), B = a();
266
+ for (; B; ) x.push(B), x = x.concat(y()), B = a();
267
+ return c() ? l({ type: N.keyframes, name: g, vendor: d, keyframes: x }) : o("@keyframes missing '}'");
268
+ })() || (function() {
269
+ const l = i(), u = /^@media *([^{]+)/.exec(e);
270
+ if (!u) return;
271
+ const d = R(h(u)[1]);
272
+ if (!f()) return o("@media missing '{'");
273
+ const p = y().concat(b());
274
+ return c() ? l({ type: N.media, media: d, rules: p }) : o("@media missing '}'");
275
+ })() || (function() {
276
+ const l = i(), u = /^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);
277
+ if (!u) return;
278
+ const d = h(u);
279
+ return l({ type: N.customMedia, name: R(d[1]), media: R(d[2]) });
280
+ })() || (function() {
281
+ const l = i(), u = /^@supports *([^{]+)/.exec(e);
282
+ if (!u) return;
283
+ const d = R(h(u)[1]);
284
+ if (!f()) return o("@supports missing '{'");
285
+ const p = y().concat(b());
286
+ return c() ? l({ type: N.supports, supports: d, rules: p }) : o("@supports missing '}'");
287
+ })() || w() || E() || T() || (function() {
288
+ const l = i(), u = /^@([-\w]+)?document *([^{]+)/.exec(e);
289
+ if (!u) return;
290
+ const d = h(u), p = R(d[1]), g = R(d[2]);
291
+ if (!f()) return o("@document missing '{'");
292
+ const x = y().concat(b());
293
+ return c() ? l({ type: N.document, document: g, vendor: p, rules: x }) : o("@document missing '}'");
294
+ })() || (function() {
295
+ const l = i(), u = /^@page */.exec(e);
296
+ if (!u) return;
297
+ h(u);
298
+ const d = U() || [];
299
+ if (!f()) return o("@page missing '{'");
300
+ let p = y(), g = M();
301
+ for (; g; ) p.push(g), p = p.concat(y()), g = M();
302
+ return c() ? l({ type: N.page, selectors: d, declarations: p }) : o("@page missing '}'");
303
+ })() || (function() {
304
+ const l = i(), u = /^@host\s*/.exec(e);
305
+ if (!u) return;
306
+ if (h(u), !f()) return o("@host missing '{'");
307
+ const d = y().concat(b());
308
+ return c() ? l({ type: N.host, rules: d }) : o("@host missing '}'");
309
+ })() || (function() {
310
+ const l = i(), u = /^@font-face\s*/.exec(e);
311
+ if (!u) return;
312
+ if (h(u), !f()) return o("@font-face missing '{'");
313
+ let d = y(), p = M();
314
+ for (; p; ) d.push(p), d = d.concat(y()), p = M();
315
+ return c() ? l({ type: N.fontFace, declarations: d }) : o("@font-face missing '}'");
316
+ })() || (function() {
317
+ const l = i(), u = /^@container *([^{]+)/.exec(e);
318
+ if (!u) return;
319
+ const d = R(h(u)[1]);
320
+ if (!f()) return o("@container missing '{'");
321
+ const p = y().concat(b());
322
+ return c() ? l({ type: N.container, container: d, rules: p }) : o("@container missing '}'");
323
+ })() || (function() {
324
+ const l = i(), u = /^@starting-style\s*/.exec(e);
325
+ if (!u) return;
326
+ if (h(u), !f()) return o("@starting-style missing '{'");
327
+ const d = y().concat(b());
328
+ return c() ? l({ type: N.startingStyle, rules: d }) : o("@starting-style missing '}'");
329
+ })() || (function() {
330
+ const l = i(), u = /^@layer *([^{;@]+)/.exec(e);
331
+ if (!u) return;
332
+ const d = R(h(u)[1]);
333
+ if (!f()) {
334
+ const g = /^[;\s]*/.exec(e);
335
+ return g && h(g), l({ type: N.layer, layer: d });
336
+ }
337
+ const p = y().concat(b());
338
+ return c() ? l({ type: N.layer, layer: d, rules: p }) : o("@layer missing '}'");
339
+ })();
340
+ }
341
+ function D() {
342
+ const l = i(), u = U();
343
+ return u ? (y(), l({ type: N.rule, selectors: u, declarations: O() || [] })) : o("selector missing");
344
+ }
345
+ return ie((function() {
346
+ const l = b();
347
+ return { type: N.stylesheet, stylesheet: { source: t == null ? void 0 : t.source, rules: l, parsingErrors: s } };
348
+ })());
349
+ };
350
+ var jt = Object.prototype.toString;
351
+ function _t(e) {
352
+ return typeof e == "function" || jt.call(e) === "[object Function]";
353
+ }
354
+ function qt(e) {
355
+ var t = Number(e);
356
+ return isNaN(t) ? 0 : t === 0 || !isFinite(t) ? t : (t > 0 ? 1 : -1) * Math.floor(Math.abs(t));
357
+ }
358
+ var Ft = Math.pow(2, 53) - 1;
359
+ function Ut(e) {
360
+ var t = qt(e);
361
+ return Math.min(Math.max(t, 0), Ft);
362
+ }
363
+ function C(e, t) {
364
+ var n = Array, r = Object(e);
365
+ if (e == null)
366
+ throw new TypeError("Array.from requires an array-like object - not null or undefined");
367
+ for (var i = Ut(r.length), s = _t(n) ? Object(new n(i)) : new Array(i), o = 0, f; o < i; )
368
+ f = r[o], s[o] = f, o += 1;
369
+ return s.length = i, s;
370
+ }
371
+ function q(e) {
372
+ "@babel/helpers - typeof";
373
+ return q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
374
+ return typeof t;
375
+ } : function(t) {
376
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
377
+ }, q(e);
378
+ }
379
+ function Gt(e, t) {
380
+ if (!(e instanceof t))
381
+ throw new TypeError("Cannot call a class as a function");
382
+ }
383
+ function zt(e, t) {
384
+ for (var n = 0; n < t.length; n++) {
385
+ var r = t[n];
386
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Ve(r.key), r);
387
+ }
388
+ }
389
+ function Wt(e, t, n) {
390
+ return t && zt(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
391
+ }
392
+ function Yt(e, t, n) {
393
+ return t = Ve(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
394
+ }
395
+ function Ve(e) {
396
+ var t = Kt(e, "string");
397
+ return q(t) === "symbol" ? t : String(t);
398
+ }
399
+ function Kt(e, t) {
400
+ if (q(e) !== "object" || e === null) return e;
401
+ var n = e[Symbol.toPrimitive];
402
+ if (n !== void 0) {
403
+ var r = n.call(e, t);
404
+ if (q(r) !== "object") return r;
405
+ throw new TypeError("@@toPrimitive must return a primitive value.");
406
+ }
407
+ return (t === "string" ? String : Number)(e);
408
+ }
409
+ var Xt = /* @__PURE__ */ (function() {
410
+ function e() {
411
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
412
+ Gt(this, e), Yt(this, "items", void 0), this.items = t;
413
+ }
414
+ return Wt(e, [{
415
+ key: "add",
416
+ value: function(n) {
417
+ return this.has(n) === !1 && this.items.push(n), this;
418
+ }
419
+ }, {
420
+ key: "clear",
421
+ value: function() {
422
+ this.items = [];
423
+ }
424
+ }, {
425
+ key: "delete",
426
+ value: function(n) {
427
+ var r = this.items.length;
428
+ return this.items = this.items.filter(function(i) {
429
+ return i !== n;
430
+ }), r !== this.items.length;
431
+ }
432
+ }, {
433
+ key: "forEach",
434
+ value: function(n) {
435
+ var r = this;
436
+ this.items.forEach(function(i) {
437
+ n(i, i, r);
438
+ });
439
+ }
440
+ }, {
441
+ key: "has",
442
+ value: function(n) {
443
+ return this.items.indexOf(n) !== -1;
444
+ }
445
+ }, {
446
+ key: "size",
447
+ get: function() {
448
+ return this.items.length;
449
+ }
450
+ }]), e;
451
+ })();
452
+ const Qt = typeof Set > "u" ? Set : Xt;
453
+ function A(e) {
454
+ var t;
455
+ return (
456
+ // eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
457
+ (t = e.localName) !== null && t !== void 0 ? t : (
458
+ // eslint-disable-next-line no-restricted-properties -- required for the fallback
459
+ e.tagName.toLowerCase()
460
+ )
461
+ );
462
+ }
463
+ var Jt = {
464
+ article: "article",
465
+ aside: "complementary",
466
+ button: "button",
467
+ datalist: "listbox",
468
+ dd: "definition",
469
+ details: "group",
470
+ dialog: "dialog",
471
+ dt: "term",
472
+ fieldset: "group",
473
+ figure: "figure",
474
+ // WARNING: Only with an accessible name
475
+ form: "form",
476
+ footer: "contentinfo",
477
+ h1: "heading",
478
+ h2: "heading",
479
+ h3: "heading",
480
+ h4: "heading",
481
+ h5: "heading",
482
+ h6: "heading",
483
+ header: "banner",
484
+ hr: "separator",
485
+ html: "document",
486
+ legend: "legend",
487
+ li: "listitem",
488
+ math: "math",
489
+ main: "main",
490
+ menu: "list",
491
+ nav: "navigation",
492
+ ol: "list",
493
+ optgroup: "group",
494
+ // WARNING: Only in certain context
495
+ option: "option",
496
+ output: "status",
497
+ progress: "progressbar",
498
+ // WARNING: Only with an accessible name
499
+ section: "region",
500
+ summary: "button",
501
+ table: "table",
502
+ tbody: "rowgroup",
503
+ textarea: "textbox",
504
+ tfoot: "rowgroup",
505
+ // WARNING: Only in certain context
506
+ td: "cell",
507
+ th: "columnheader",
508
+ thead: "rowgroup",
509
+ tr: "row",
510
+ ul: "list"
511
+ }, Zt = {
512
+ caption: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
513
+ code: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
514
+ deletion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
515
+ emphasis: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
516
+ generic: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
517
+ insertion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
518
+ none: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
519
+ paragraph: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
520
+ presentation: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
521
+ strong: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
522
+ subscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
523
+ superscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"])
524
+ };
525
+ function en(e, t) {
526
+ return [
527
+ "aria-atomic",
528
+ "aria-busy",
529
+ "aria-controls",
530
+ "aria-current",
531
+ "aria-description",
532
+ "aria-describedby",
533
+ "aria-details",
534
+ // "disabled",
535
+ "aria-dropeffect",
536
+ // "errormessage",
537
+ "aria-flowto",
538
+ "aria-grabbed",
539
+ // "haspopup",
540
+ "aria-hidden",
541
+ // "invalid",
542
+ "aria-keyshortcuts",
543
+ "aria-label",
544
+ "aria-labelledby",
545
+ "aria-live",
546
+ "aria-owns",
547
+ "aria-relevant",
548
+ "aria-roledescription"
549
+ ].some(function(n) {
550
+ var r;
551
+ return e.hasAttribute(n) && !((r = Zt[t]) !== null && r !== void 0 && r.has(n));
552
+ });
553
+ }
554
+ function je(e, t) {
555
+ return en(e, t);
556
+ }
557
+ function tn(e) {
558
+ var t = rn(e);
559
+ if (t === null || se.indexOf(t) !== -1) {
560
+ var n = nn(e);
561
+ if (se.indexOf(t || "") === -1 || je(e, n || ""))
562
+ return n;
563
+ }
564
+ return t;
565
+ }
566
+ function nn(e) {
567
+ var t = Jt[A(e)];
568
+ if (t !== void 0)
569
+ return t;
570
+ switch (A(e)) {
571
+ case "a":
572
+ case "area":
573
+ case "link":
574
+ if (e.hasAttribute("href"))
575
+ return "link";
576
+ break;
577
+ case "img":
578
+ return e.getAttribute("alt") === "" && !je(e, "img") ? "presentation" : "img";
579
+ case "input": {
580
+ var n = e, r = n.type;
581
+ switch (r) {
582
+ case "button":
583
+ case "image":
584
+ case "reset":
585
+ case "submit":
586
+ return "button";
587
+ case "checkbox":
588
+ case "radio":
589
+ return r;
590
+ case "range":
591
+ return "slider";
592
+ case "email":
593
+ case "tel":
594
+ case "text":
595
+ case "url":
596
+ return e.hasAttribute("list") ? "combobox" : "textbox";
597
+ case "search":
598
+ return e.hasAttribute("list") ? "combobox" : "searchbox";
599
+ case "number":
600
+ return "spinbutton";
601
+ default:
602
+ return null;
603
+ }
604
+ }
605
+ case "select":
606
+ return e.hasAttribute("multiple") || e.size > 1 ? "listbox" : "combobox";
607
+ }
608
+ return null;
609
+ }
610
+ function rn(e) {
611
+ var t = e.getAttribute("role");
612
+ if (t !== null) {
613
+ var n = t.trim().split(" ")[0];
614
+ if (n.length > 0)
615
+ return n;
616
+ }
617
+ return null;
618
+ }
619
+ var se = ["presentation", "none"];
620
+ function v(e) {
621
+ return e !== null && e.nodeType === e.ELEMENT_NODE;
622
+ }
623
+ function _e(e) {
624
+ return v(e) && A(e) === "caption";
625
+ }
626
+ function z(e) {
627
+ return v(e) && A(e) === "input";
628
+ }
629
+ function sn(e) {
630
+ return v(e) && A(e) === "optgroup";
631
+ }
632
+ function on(e) {
633
+ return v(e) && A(e) === "select";
634
+ }
635
+ function an(e) {
636
+ return v(e) && A(e) === "table";
637
+ }
638
+ function un(e) {
639
+ return v(e) && A(e) === "textarea";
640
+ }
641
+ function cn(e) {
642
+ var t = e.ownerDocument === null ? e : e.ownerDocument, n = t.defaultView;
643
+ if (n === null)
644
+ throw new TypeError("no window available");
645
+ return n;
646
+ }
647
+ function ln(e) {
648
+ return v(e) && A(e) === "fieldset";
649
+ }
650
+ function fn(e) {
651
+ return v(e) && A(e) === "legend";
652
+ }
653
+ function dn(e) {
654
+ return v(e) && A(e) === "slot";
655
+ }
656
+ function pn(e) {
657
+ return v(e) && e.ownerSVGElement !== void 0;
658
+ }
659
+ function hn(e) {
660
+ return v(e) && A(e) === "svg";
661
+ }
662
+ function gn(e) {
663
+ return pn(e) && A(e) === "title";
664
+ }
665
+ function Y(e, t) {
666
+ if (v(e) && e.hasAttribute(t)) {
667
+ var n = e.getAttribute(t).split(" "), r = e.getRootNode ? e.getRootNode() : e.ownerDocument;
668
+ return n.map(function(i) {
669
+ return r.getElementById(i);
670
+ }).filter(
671
+ function(i) {
672
+ return i !== null;
673
+ }
674
+ // TODO: why does this not narrow?
675
+ );
676
+ }
677
+ return [];
678
+ }
679
+ function k(e, t) {
680
+ return v(e) ? t.indexOf(tn(e)) !== -1 : !1;
681
+ }
682
+ function mn(e) {
683
+ return e.trim().replace(/\s\s+/g, " ");
684
+ }
685
+ function bn(e, t) {
686
+ if (!v(e))
687
+ return !1;
688
+ if (e.hasAttribute("hidden") || e.getAttribute("aria-hidden") === "true")
689
+ return !0;
690
+ var n = t(e);
691
+ return n.getPropertyValue("display") === "none" || n.getPropertyValue("visibility") === "hidden";
692
+ }
693
+ function vn(e) {
694
+ return k(e, ["button", "combobox", "listbox", "textbox"]) || qe(e, "range");
695
+ }
696
+ function qe(e, t) {
697
+ if (!v(e))
698
+ return !1;
699
+ switch (t) {
700
+ case "range":
701
+ return k(e, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
702
+ default:
703
+ throw new TypeError("No knowledge about abstract role '".concat(t, "'. This is likely a bug :("));
704
+ }
705
+ }
706
+ function Ae(e, t) {
707
+ var n = C(e.querySelectorAll(t));
708
+ return Y(e, "aria-owns").forEach(function(r) {
709
+ n.push.apply(n, C(r.querySelectorAll(t)));
710
+ }), n;
711
+ }
712
+ function yn(e) {
713
+ return on(e) ? e.selectedOptions || Ae(e, "[selected]") : Ae(e, '[aria-selected="true"]');
714
+ }
715
+ function En(e) {
716
+ return k(e, se);
717
+ }
718
+ function wn(e) {
719
+ return _e(e);
720
+ }
721
+ function xn(e) {
722
+ return k(e, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
723
+ }
724
+ function Nn(e) {
725
+ return !1;
726
+ }
727
+ function Sn(e) {
728
+ return z(e) || un(e) ? e.value : e.textContent || "";
729
+ }
730
+ function Re(e) {
731
+ var t = e.getPropertyValue("content");
732
+ return /^["'].*["']$/.test(t) ? t.slice(1, -1) : "";
733
+ }
734
+ function Fe(e) {
735
+ var t = A(e);
736
+ return t === "button" || t === "input" && e.getAttribute("type") !== "hidden" || t === "meter" || t === "output" || t === "progress" || t === "select" || t === "textarea";
737
+ }
738
+ function Ue(e) {
739
+ if (Fe(e))
740
+ return e;
741
+ var t = null;
742
+ return e.childNodes.forEach(function(n) {
743
+ if (t === null && v(n)) {
744
+ var r = Ue(n);
745
+ r !== null && (t = r);
746
+ }
747
+ }), t;
748
+ }
749
+ function An(e) {
750
+ if (e.control !== void 0)
751
+ return e.control;
752
+ var t = e.getAttribute("for");
753
+ return t !== null ? e.ownerDocument.getElementById(t) : Ue(e);
754
+ }
755
+ function Rn(e) {
756
+ var t = e.labels;
757
+ if (t === null)
758
+ return t;
759
+ if (t !== void 0)
760
+ return C(t);
761
+ if (!Fe(e))
762
+ return null;
763
+ var n = e.ownerDocument;
764
+ return C(n.querySelectorAll("label")).filter(function(r) {
765
+ return An(r) === e;
766
+ });
767
+ }
768
+ function $n(e) {
769
+ var t = e.assignedNodes();
770
+ return t.length === 0 ? C(e.childNodes) : t;
771
+ }
772
+ function Ge(e) {
773
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = new Qt(), r = cn(e), i = t.compute, s = i === void 0 ? "name" : i, o = t.computedStyleSupportsPseudoElements, f = o === void 0 ? t.getComputedStyle !== void 0 : o, c = t.getComputedStyle, b = c === void 0 ? r.getComputedStyle.bind(r) : c, h = t.hidden, V = h === void 0 ? !1 : h;
774
+ function y(a, w) {
775
+ var E = "";
776
+ if (v(a) && f) {
777
+ var T = b(a, "::before"), $ = Re(T);
778
+ E = "".concat($, " ").concat(E);
779
+ }
780
+ var I = dn(a) ? $n(a) : C(a.childNodes).concat(Y(a, "aria-owns"));
781
+ if (I.forEach(function(u) {
782
+ var d = O(u, {
783
+ isEmbeddedInLabel: w.isEmbeddedInLabel,
784
+ isReferenced: !1,
785
+ recursion: !0
786
+ }), p = v(u) ? b(u).getPropertyValue("display") : "inline", g = p !== "inline" ? " " : "";
787
+ E += "".concat(g).concat(d).concat(g);
788
+ }), v(a) && f) {
789
+ var D = b(a, "::after"), l = Re(D);
790
+ E = "".concat(E, " ").concat(l);
791
+ }
792
+ return E.trim();
793
+ }
794
+ function H(a, w) {
795
+ var E = a.getAttributeNode(w);
796
+ return E !== null && !n.has(E) && E.value.trim() !== "" ? (n.add(E), E.value) : null;
797
+ }
798
+ function U(a) {
799
+ return v(a) ? H(a, "title") : null;
800
+ }
801
+ function M(a) {
802
+ if (!v(a))
803
+ return null;
804
+ if (ln(a)) {
805
+ n.add(a);
806
+ for (var w = C(a.childNodes), E = 0; E < w.length; E += 1) {
807
+ var T = w[E];
808
+ if (fn(T))
809
+ return O(T, {
810
+ isEmbeddedInLabel: !1,
811
+ isReferenced: !1,
812
+ recursion: !1
813
+ });
814
+ }
815
+ } else if (an(a)) {
816
+ n.add(a);
817
+ for (var $ = C(a.childNodes), I = 0; I < $.length; I += 1) {
818
+ var D = $[I];
819
+ if (_e(D))
820
+ return O(D, {
821
+ isEmbeddedInLabel: !1,
822
+ isReferenced: !1,
823
+ recursion: !1
824
+ });
825
+ }
826
+ } else if (hn(a)) {
827
+ n.add(a);
828
+ for (var l = C(a.childNodes), u = 0; u < l.length; u += 1) {
829
+ var d = l[u];
830
+ if (gn(d))
831
+ return d.textContent;
832
+ }
833
+ return null;
834
+ } else if (A(a) === "img" || A(a) === "area") {
835
+ var p = H(a, "alt");
836
+ if (p !== null)
837
+ return p;
838
+ } else if (sn(a)) {
839
+ var g = H(a, "label");
840
+ if (g !== null)
841
+ return g;
842
+ }
843
+ if (z(a) && (a.type === "button" || a.type === "submit" || a.type === "reset")) {
844
+ var x = H(a, "value");
845
+ if (x !== null)
846
+ return x;
847
+ if (a.type === "submit")
848
+ return "Submit";
849
+ if (a.type === "reset")
850
+ return "Reset";
851
+ }
852
+ var B = Rn(a);
853
+ if (B !== null && B.length !== 0)
854
+ return n.add(a), C(B).map(function(Q) {
855
+ return O(Q, {
856
+ isEmbeddedInLabel: !0,
857
+ isReferenced: !1,
858
+ recursion: !0
859
+ });
860
+ }).filter(function(Q) {
861
+ return Q.length > 0;
862
+ }).join(" ");
863
+ if (z(a) && a.type === "image") {
864
+ var j = H(a, "alt");
865
+ if (j !== null)
866
+ return j;
867
+ var me = H(a, "title");
868
+ return me !== null ? me : "Submit Query";
869
+ }
870
+ if (k(a, ["button"])) {
871
+ var be = y(a, {
872
+ isEmbeddedInLabel: !1
873
+ });
874
+ if (be !== "")
875
+ return be;
876
+ }
877
+ return null;
878
+ }
879
+ function O(a, w) {
880
+ if (n.has(a))
881
+ return "";
882
+ if (!V && bn(a, b) && !w.isReferenced)
883
+ return n.add(a), "";
884
+ var E = v(a) ? a.getAttributeNode("aria-labelledby") : null, T = E !== null && !n.has(E) ? Y(a, "aria-labelledby") : [];
885
+ if (s === "name" && !w.isReferenced && T.length > 0)
886
+ return n.add(E), T.map(function(p) {
887
+ return O(p, {
888
+ isEmbeddedInLabel: w.isEmbeddedInLabel,
889
+ isReferenced: !0,
890
+ // this isn't recursion as specified, otherwise we would skip
891
+ // `aria-label` in
892
+ // <input id="myself" aria-label="foo" aria-labelledby="myself"
893
+ recursion: !1
894
+ });
895
+ }).join(" ");
896
+ var $ = w.recursion && vn(a) && s === "name";
897
+ if (!$) {
898
+ var I = (v(a) && a.getAttribute("aria-label") || "").trim();
899
+ if (I !== "" && s === "name")
900
+ return n.add(a), I;
901
+ if (!En(a)) {
902
+ var D = M(a);
903
+ if (D !== null)
904
+ return n.add(a), D;
905
+ }
906
+ }
907
+ if (k(a, ["menu"]))
908
+ return n.add(a), "";
909
+ if ($ || w.isEmbeddedInLabel || w.isReferenced) {
910
+ if (k(a, ["combobox", "listbox"])) {
911
+ n.add(a);
912
+ var l = yn(a);
913
+ return l.length === 0 ? z(a) ? a.value : "" : C(l).map(function(p) {
914
+ return O(p, {
915
+ isEmbeddedInLabel: w.isEmbeddedInLabel,
916
+ isReferenced: !1,
917
+ recursion: !0
918
+ });
919
+ }).join(" ");
920
+ }
921
+ if (qe(a, "range"))
922
+ return n.add(a), a.hasAttribute("aria-valuetext") ? a.getAttribute("aria-valuetext") : a.hasAttribute("aria-valuenow") ? a.getAttribute("aria-valuenow") : a.getAttribute("value") || "";
923
+ if (k(a, ["textbox"]))
924
+ return n.add(a), Sn(a);
925
+ }
926
+ if (xn(a) || v(a) && w.isReferenced || wn(a) || Nn()) {
927
+ var u = y(a, {
928
+ isEmbeddedInLabel: w.isEmbeddedInLabel
929
+ });
930
+ if (u !== "")
931
+ return n.add(a), u;
932
+ }
933
+ if (a.nodeType === a.TEXT_NODE)
934
+ return n.add(a), a.textContent || "";
935
+ if (w.recursion)
936
+ return n.add(a), y(a, {
937
+ isEmbeddedInLabel: w.isEmbeddedInLabel
938
+ });
939
+ var d = U(a);
940
+ return d !== null ? (n.add(a), d) : (n.add(a), "");
941
+ }
942
+ return mn(O(e, {
943
+ isEmbeddedInLabel: !1,
944
+ // by spec computeAccessibleDescription starts with the referenced elements as roots
945
+ isReferenced: s === "description",
946
+ recursion: !1
947
+ }));
948
+ }
949
+ function F(e) {
950
+ "@babel/helpers - typeof";
951
+ return F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
952
+ return typeof t;
953
+ } : function(t) {
954
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
955
+ }, F(e);
956
+ }
957
+ function $e(e, t) {
958
+ var n = Object.keys(e);
959
+ if (Object.getOwnPropertySymbols) {
960
+ var r = Object.getOwnPropertySymbols(e);
961
+ t && (r = r.filter(function(i) {
962
+ return Object.getOwnPropertyDescriptor(e, i).enumerable;
963
+ })), n.push.apply(n, r);
964
+ }
965
+ return n;
966
+ }
967
+ function Ce(e) {
968
+ for (var t = 1; t < arguments.length; t++) {
969
+ var n = arguments[t] != null ? arguments[t] : {};
970
+ t % 2 ? $e(Object(n), !0).forEach(function(r) {
971
+ Cn(e, r, n[r]);
972
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $e(Object(n)).forEach(function(r) {
973
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
974
+ });
975
+ }
976
+ return e;
977
+ }
978
+ function Cn(e, t, n) {
979
+ return t = On(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
980
+ }
981
+ function On(e) {
982
+ var t = In(e, "string");
983
+ return F(t) === "symbol" ? t : String(t);
984
+ }
985
+ function In(e, t) {
986
+ if (F(e) !== "object" || e === null) return e;
987
+ var n = e[Symbol.toPrimitive];
988
+ if (n !== void 0) {
989
+ var r = n.call(e, t);
990
+ if (F(r) !== "object") return r;
991
+ throw new TypeError("@@toPrimitive must return a primitive value.");
992
+ }
993
+ return (t === "string" ? String : Number)(e);
994
+ }
995
+ function Hn(e) {
996
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = Y(e, "aria-describedby").map(function(s) {
997
+ return Ge(s, Ce(Ce({}, t), {}, {
998
+ compute: "description"
999
+ }));
1000
+ }).join(" ");
1001
+ if (n === "") {
1002
+ var r = e.getAttribute("aria-description");
1003
+ n = r === null ? "" : r;
1004
+ }
1005
+ if (n === "") {
1006
+ var i = e.getAttribute("title");
1007
+ n = i === null ? "" : i;
1008
+ }
1009
+ return n;
1010
+ }
1011
+ function Tn(e) {
1012
+ return k(e, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
1013
+ }
1014
+ function Dn(e) {
1015
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1016
+ return Tn(e) ? "" : Ge(e, t);
1017
+ }
1018
+ var G = { exports: {} }, Oe;
1019
+ function Bn() {
1020
+ if (Oe) return G.exports;
1021
+ Oe = 1;
1022
+ var e = String, t = function() {
1023
+ return { isColorSupported: !1, reset: e, bold: e, dim: e, italic: e, underline: e, inverse: e, hidden: e, strikethrough: e, black: e, red: e, green: e, yellow: e, blue: e, magenta: e, cyan: e, white: e, gray: e, bgBlack: e, bgRed: e, bgGreen: e, bgYellow: e, bgBlue: e, bgMagenta: e, bgCyan: e, bgWhite: e, blackBright: e, redBright: e, greenBright: e, yellowBright: e, blueBright: e, magentaBright: e, cyanBright: e, whiteBright: e, bgBlackBright: e, bgRedBright: e, bgGreenBright: e, bgYellowBright: e, bgBlueBright: e, bgMagentaBright: e, bgCyanBright: e, bgWhiteBright: e };
1024
+ };
1025
+ return G.exports = t(), G.exports.createColors = t, G.exports;
1026
+ }
1027
+ var Pn = /* @__PURE__ */ Bn();
1028
+ const kn = /* @__PURE__ */ pe(Pn);
1029
+ var W = { exports: {} };
1030
+ /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
1031
+ var Mn = W.exports, Ie;
1032
+ function Ln() {
1033
+ return Ie || (Ie = 1, (function(e, t) {
1034
+ (function(n, r) {
1035
+ e.exports = r(n);
1036
+ })(typeof ve < "u" ? ve : Mn, function(n) {
1037
+ if (n.CSS && n.CSS.escape)
1038
+ return n.CSS.escape;
1039
+ var r = function(i) {
1040
+ if (arguments.length == 0)
1041
+ throw new TypeError("`CSS.escape` requires an argument.");
1042
+ for (var s = String(i), o = s.length, f = -1, c, b = "", h = s.charCodeAt(0); ++f < o; ) {
1043
+ if (c = s.charCodeAt(f), c == 0) {
1044
+ b += "�";
1045
+ continue;
1046
+ }
1047
+ if (
1048
+ // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
1049
+ // U+007F, […]
1050
+ c >= 1 && c <= 31 || c == 127 || // If the character is the first character and is in the range [0-9]
1051
+ // (U+0030 to U+0039), […]
1052
+ f == 0 && c >= 48 && c <= 57 || // If the character is the second character and is in the range [0-9]
1053
+ // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
1054
+ f == 1 && c >= 48 && c <= 57 && h == 45
1055
+ ) {
1056
+ b += "\\" + c.toString(16) + " ";
1057
+ continue;
1058
+ }
1059
+ if (
1060
+ // If the character is the first character and is a `-` (U+002D), and
1061
+ // there is no second character, […]
1062
+ f == 0 && o == 1 && c == 45
1063
+ ) {
1064
+ b += "\\" + s.charAt(f);
1065
+ continue;
1066
+ }
1067
+ if (c >= 128 || c == 45 || c == 95 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) {
1068
+ b += s.charAt(f);
1069
+ continue;
1070
+ }
1071
+ b += "\\" + s.charAt(f);
1072
+ }
1073
+ return b;
1074
+ };
1075
+ return n.CSS || (n.CSS = {}), n.CSS.escape = r, r;
1076
+ });
1077
+ })(W)), W.exports;
1078
+ }
1079
+ var Vn = Ln();
1080
+ const jn = /* @__PURE__ */ pe(Vn);
1081
+ class ze extends Error {
1082
+ constructor(t, n, r, i) {
1083
+ super(), Error.captureStackTrace && Error.captureStackTrace(this, r);
1084
+ let s = "";
1085
+ try {
1086
+ s = i.utils.printWithType(
1087
+ "Received",
1088
+ n,
1089
+ i.utils.printReceived
1090
+ );
1091
+ } catch {
1092
+ }
1093
+ this.message = [
1094
+ i.utils.matcherHint(
1095
+ `${i.isNot ? ".not" : ""}.${r.name}`,
1096
+ "received",
1097
+ ""
1098
+ ),
1099
+ "",
1100
+ // eslint-disable-next-line new-cap
1101
+ `${i.utils.RECEIVED_COLOR(
1102
+ "received"
1103
+ )} value must ${t}.`,
1104
+ s
1105
+ ].join(`
1106
+ `);
1107
+ }
1108
+ }
1109
+ class He extends ze {
1110
+ constructor(...t) {
1111
+ super("be an HTMLElement or an SVGElement", ...t);
1112
+ }
1113
+ }
1114
+ class Te extends ze {
1115
+ constructor(...t) {
1116
+ super("be a Node", ...t);
1117
+ }
1118
+ }
1119
+ function We(e, t, ...n) {
1120
+ if (!e || !e.ownerDocument || !e.ownerDocument.defaultView)
1121
+ throw new t(e, ...n);
1122
+ }
1123
+ function _n(e, ...t) {
1124
+ We(e, Te, ...t);
1125
+ const n = e.ownerDocument.defaultView;
1126
+ if (!(e instanceof n.Node))
1127
+ throw new Te(e, ...t);
1128
+ }
1129
+ function m(e, ...t) {
1130
+ We(e, He, ...t);
1131
+ const n = e.ownerDocument.defaultView;
1132
+ if (!(e instanceof n.HTMLElement) && !(e instanceof n.SVGElement))
1133
+ throw new He(e, ...t);
1134
+ }
1135
+ class qn extends Error {
1136
+ constructor(t, n, r) {
1137
+ super(), Error.captureStackTrace && Error.captureStackTrace(this, n), this.message = [
1138
+ t.message,
1139
+ "",
1140
+ // eslint-disable-next-line new-cap
1141
+ r.utils.RECEIVED_COLOR("Failing css:"),
1142
+ // eslint-disable-next-line new-cap
1143
+ r.utils.RECEIVED_COLOR(`${t.css}`)
1144
+ ].join(`
1145
+ `);
1146
+ }
1147
+ }
1148
+ function Fn(e, ...t) {
1149
+ const n = Vt(`selector { ${e} }`, { silent: !0 }).stylesheet;
1150
+ if (n.parsingErrors && n.parsingErrors.length > 0) {
1151
+ const { reason: i, line: s } = n.parsingErrors[0];
1152
+ throw new qn(
1153
+ {
1154
+ css: e,
1155
+ message: `Syntax error parsing expected css: ${i} on line: ${s}`
1156
+ },
1157
+ ...t
1158
+ );
1159
+ }
1160
+ return n.rules[0].declarations.filter((i) => i.type === "declaration").reduce(
1161
+ (i, { property: s, value: o }) => Object.assign(i, { [s]: o }),
1162
+ {}
1163
+ );
1164
+ }
1165
+ function De(e, t) {
1166
+ return typeof t == "string" ? t : e.utils.stringify(t);
1167
+ }
1168
+ function S(e, t, n, r, i, s) {
1169
+ return [
1170
+ `${t}
1171
+ `,
1172
+ // eslint-disable-next-line new-cap
1173
+ `${n}:
1174
+ ${e.utils.EXPECTED_COLOR(
1175
+ Ne(De(e, r), 2)
1176
+ )}`,
1177
+ // eslint-disable-next-line new-cap
1178
+ `${i}:
1179
+ ${e.utils.RECEIVED_COLOR(
1180
+ Ne(De(e, s), 2)
1181
+ )}`
1182
+ ].join(`
1183
+ `);
1184
+ }
1185
+ function Un(e, t) {
1186
+ return t instanceof RegExp ? t.test(e) : e.includes(String(t));
1187
+ }
1188
+ function K(e, t) {
1189
+ console.warn(
1190
+ `Warning: ${e} has been deprecated and will be removed in future updates.`,
1191
+ t
1192
+ );
1193
+ }
1194
+ function X(e) {
1195
+ return e.replace(/\s+/g, " ").trim();
1196
+ }
1197
+ function L(e) {
1198
+ return e.tagName && e.tagName.toLowerCase();
1199
+ }
1200
+ function Gn({ multiple: e, options: t }) {
1201
+ const n = [...t].filter((r) => r.selected);
1202
+ if (e)
1203
+ return [...n].map((r) => r.value);
1204
+ if (n.length !== 0)
1205
+ return n[0].value;
1206
+ }
1207
+ function zn(e) {
1208
+ switch (e.type) {
1209
+ case "number":
1210
+ return e.value === "" ? null : Number(e.value);
1211
+ case "checkbox":
1212
+ return e.checked;
1213
+ default:
1214
+ return e.value;
1215
+ }
1216
+ }
1217
+ const Wn = ["meter", "progressbar", "slider", "spinbutton"];
1218
+ function Yn(e) {
1219
+ if (Wn.includes(e.getAttribute("role")))
1220
+ return Number(e.getAttribute("aria-valuenow"));
1221
+ }
1222
+ function Ye(e) {
1223
+ if (e)
1224
+ switch (e.tagName.toLowerCase()) {
1225
+ case "input":
1226
+ return zn(e);
1227
+ case "select":
1228
+ return Gn(e);
1229
+ default:
1230
+ return e.value ?? Yn(e);
1231
+ }
1232
+ }
1233
+ function Kn(e, { wordConnector: t = ", ", lastWordConnector: n = " and " } = {}) {
1234
+ return [e.slice(0, -1).join(t), e[e.length - 1]].join(
1235
+ e.length > 1 ? n : ""
1236
+ );
1237
+ }
1238
+ function ge(e, t) {
1239
+ return Array.isArray(e) && Array.isArray(t) ? [...new Set(e)].every((n) => new Set(t).has(n)) : e === t;
1240
+ }
1241
+ function oe(e, t) {
1242
+ return K(
1243
+ "toBeInTheDOM",
1244
+ "Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container."
1245
+ ), e && m(e, oe, this), t && m(t, oe, this), {
1246
+ pass: t ? t.contains(e) : !!e,
1247
+ message: () => [
1248
+ this.utils.matcherHint(
1249
+ `${this.isNot ? ".not" : ""}.toBeInTheDOM`,
1250
+ "element",
1251
+ ""
1252
+ ),
1253
+ "",
1254
+ "Received:",
1255
+ ` ${this.utils.printReceived(
1256
+ e && e.cloneNode(!1)
1257
+ )}`
1258
+ ].join(`
1259
+ `)
1260
+ };
1261
+ }
1262
+ function Ke(e) {
1263
+ (e !== null || !this.isNot) && m(e, Ke, this);
1264
+ const t = e === null ? !1 : e.ownerDocument === e.getRootNode({ composed: !0 }), n = () => `expected document not to contain element, found ${this.utils.stringify(
1265
+ e.cloneNode(!0)
1266
+ )} instead`, r = () => "element could not be found in the document";
1267
+ return {
1268
+ pass: t,
1269
+ message: () => [
1270
+ this.utils.matcherHint(
1271
+ `${this.isNot ? ".not" : ""}.toBeInTheDocument`,
1272
+ "element",
1273
+ ""
1274
+ ),
1275
+ "",
1276
+ // eslint-disable-next-line new-cap
1277
+ this.utils.RECEIVED_COLOR(this.isNot ? n() : r())
1278
+ ].join(`
1279
+ `)
1280
+ };
1281
+ }
1282
+ function Xe(e) {
1283
+ return K(
1284
+ "toBeEmpty",
1285
+ "Please use instead toBeEmptyDOMElement for finding empty nodes in the DOM."
1286
+ ), m(e, Xe, this), {
1287
+ pass: e.innerHTML === "",
1288
+ message: () => [
1289
+ this.utils.matcherHint(
1290
+ `${this.isNot ? ".not" : ""}.toBeEmpty`,
1291
+ "element",
1292
+ ""
1293
+ ),
1294
+ "",
1295
+ "Received:",
1296
+ ` ${this.utils.printReceived(e.innerHTML)}`
1297
+ ].join(`
1298
+ `)
1299
+ };
1300
+ }
1301
+ function Qe(e) {
1302
+ return m(e, Qe, this), {
1303
+ pass: Xn(e),
1304
+ message: () => [
1305
+ this.utils.matcherHint(
1306
+ `${this.isNot ? ".not" : ""}.toBeEmptyDOMElement`,
1307
+ "element",
1308
+ ""
1309
+ ),
1310
+ "",
1311
+ "Received:",
1312
+ ` ${this.utils.printReceived(e.innerHTML)}`
1313
+ ].join(`
1314
+ `)
1315
+ };
1316
+ }
1317
+ function Xn(e) {
1318
+ return [...e.childNodes].filter((n) => n.nodeType !== 8).length === 0;
1319
+ }
1320
+ function ae(e, t) {
1321
+ return m(e, ae, this), t !== null && m(t, ae, this), {
1322
+ pass: e.contains(t),
1323
+ message: () => [
1324
+ this.utils.matcherHint(
1325
+ `${this.isNot ? ".not" : ""}.toContainElement`,
1326
+ "element",
1327
+ "element"
1328
+ ),
1329
+ "",
1330
+ // eslint-disable-next-line new-cap
1331
+ this.utils.RECEIVED_COLOR(`${this.utils.stringify(
1332
+ e.cloneNode(!1)
1333
+ )} ${this.isNot ? "contains:" : "does not contain:"} ${this.utils.stringify(t && t.cloneNode(!1))}
1334
+ `)
1335
+ ].join(`
1336
+ `)
1337
+ };
1338
+ }
1339
+ function Qn(e, t) {
1340
+ const n = e.ownerDocument.createElement("div");
1341
+ return n.innerHTML = t, n.innerHTML;
1342
+ }
1343
+ function Je(e, t) {
1344
+ if (m(e, Je, this), typeof t != "string")
1345
+ throw new Error(`.toContainHTML() expects a string value, got ${t}`);
1346
+ return {
1347
+ pass: e.outerHTML.includes(Qn(e, t)),
1348
+ message: () => [
1349
+ this.utils.matcherHint(
1350
+ `${this.isNot ? ".not" : ""}.toContainHTML`,
1351
+ "element",
1352
+ ""
1353
+ ),
1354
+ "Expected:",
1355
+ // eslint-disable-next-line new-cap
1356
+ ` ${this.utils.EXPECTED_COLOR(t)}`,
1357
+ "Received:",
1358
+ ` ${this.utils.printReceived(e.cloneNode(!0))}`
1359
+ ].join(`
1360
+ `)
1361
+ };
1362
+ }
1363
+ function Ze(e, t, n = { normalizeWhitespace: !0 }) {
1364
+ _n(e, Ze, this);
1365
+ const r = n.normalizeWhitespace ? X(e.textContent) : e.textContent.replace(/\u00a0/g, " "), i = r !== "" && t === "";
1366
+ return {
1367
+ pass: !i && Un(r, t),
1368
+ message: () => {
1369
+ const s = this.isNot ? "not to" : "to";
1370
+ return S(
1371
+ this,
1372
+ this.utils.matcherHint(
1373
+ `${this.isNot ? ".not" : ""}.toHaveTextContent`,
1374
+ "element",
1375
+ ""
1376
+ ),
1377
+ i ? "Checking with empty string will always match, use .toBeEmptyDOMElement() instead" : `Expected element ${s} have text content`,
1378
+ t,
1379
+ "Received",
1380
+ r
1381
+ );
1382
+ }
1383
+ };
1384
+ }
1385
+ function ue(e, t) {
1386
+ m(e, ue, this);
1387
+ const n = Hn(e), r = arguments.length === 1;
1388
+ let i = !1;
1389
+ return r ? i = n !== "" : i = t instanceof RegExp ? t.test(n) : this.equals(
1390
+ n,
1391
+ t
1392
+ ), {
1393
+ pass: i,
1394
+ message: () => {
1395
+ const s = this.isNot ? "not to" : "to";
1396
+ return S(
1397
+ this,
1398
+ this.utils.matcherHint(
1399
+ `${this.isNot ? ".not" : ""}.${ue.name}`,
1400
+ "element",
1401
+ ""
1402
+ ),
1403
+ `Expected element ${s} have accessible description`,
1404
+ t,
1405
+ "Received",
1406
+ n
1407
+ );
1408
+ }
1409
+ };
1410
+ }
1411
+ const _ = "aria-invalid", Jn = ["false"];
1412
+ function et(e, t) {
1413
+ var b;
1414
+ m(e, et, this);
1415
+ const n = this.isNot ? "not to" : "to", r = this.isNot ? ".not.toHaveAccessibleErrorMessage" : ".toHaveAccessibleErrorMessage", i = e.getAttribute("aria-errormessage");
1416
+ if (!!i && /\s+/.test(i))
1417
+ return {
1418
+ pass: !1,
1419
+ message: () => S(
1420
+ this,
1421
+ this.utils.matcherHint(r, "element"),
1422
+ "Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",
1423
+ "",
1424
+ "Received",
1425
+ `aria-errormessage="${i}"`
1426
+ )
1427
+ };
1428
+ const o = e.getAttribute(_);
1429
+ if (!e.hasAttribute(_) || Jn.includes(o))
1430
+ return {
1431
+ pass: !1,
1432
+ message: () => S(
1433
+ this,
1434
+ this.utils.matcherHint(r, "element"),
1435
+ "Expected element to be marked as invalid with attribute",
1436
+ `${_}="${String(!0)}"`,
1437
+ "Received",
1438
+ e.hasAttribute("aria-invalid") ? `${_}="${e.getAttribute(_)}` : null
1439
+ )
1440
+ };
1441
+ const c = X(
1442
+ ((b = e.ownerDocument.getElementById(i)) == null ? void 0 : b.textContent) ?? ""
1443
+ );
1444
+ return {
1445
+ pass: t === void 0 ? !!c : t instanceof RegExp ? t.test(c) : this.equals(c, t),
1446
+ message: () => S(
1447
+ this,
1448
+ this.utils.matcherHint(r, "element"),
1449
+ `Expected element ${n} have accessible error message`,
1450
+ t ?? "",
1451
+ "Received",
1452
+ c
1453
+ )
1454
+ };
1455
+ }
1456
+ const Zn = nr(he.elementRoles);
1457
+ function ce(e, t) {
1458
+ m(e, ce, this);
1459
+ const n = er(e);
1460
+ return {
1461
+ pass: n.some((i) => i === t),
1462
+ message: () => {
1463
+ const i = this.isNot ? "not to" : "to";
1464
+ return S(
1465
+ this,
1466
+ this.utils.matcherHint(
1467
+ `${this.isNot ? ".not" : ""}.${ce.name}`,
1468
+ "element",
1469
+ ""
1470
+ ),
1471
+ `Expected element ${i} have role`,
1472
+ t,
1473
+ "Received",
1474
+ n.join(", ")
1475
+ );
1476
+ }
1477
+ };
1478
+ }
1479
+ function er(e) {
1480
+ return e.hasAttribute("role") ? e.getAttribute("role").split(" ").filter(Boolean) : tr(e);
1481
+ }
1482
+ function tr(e) {
1483
+ for (const { match: t, roles: n } of Zn)
1484
+ if (t(e))
1485
+ return [...n];
1486
+ return [];
1487
+ }
1488
+ function nr(e) {
1489
+ function t({ name: o, attributes: f }) {
1490
+ return `${o}${f.map(({ name: c, value: b, constraints: h = [] }) => h.indexOf("undefined") !== -1 ? `:not([${c}])` : b ? `[${c}="${b}"]` : `[${c}]`).join("")}`;
1491
+ }
1492
+ function n({ attributes: o = [] }) {
1493
+ return o.length;
1494
+ }
1495
+ function r({ specificity: o }, { specificity: f }) {
1496
+ return f - o;
1497
+ }
1498
+ function i(o) {
1499
+ let { attributes: f = [] } = o;
1500
+ const c = f.findIndex(
1501
+ (h) => h.value && h.name === "type" && h.value === "text"
1502
+ );
1503
+ c >= 0 && (f = [
1504
+ ...f.slice(0, c),
1505
+ ...f.slice(c + 1)
1506
+ ]);
1507
+ const b = t({ ...o, attributes: f });
1508
+ return (h) => c >= 0 && h.type !== "text" ? !1 : h.matches(b);
1509
+ }
1510
+ let s = [];
1511
+ for (const [o, f] of e.entries())
1512
+ s = [
1513
+ ...s,
1514
+ {
1515
+ match: i(o),
1516
+ roles: Array.from(f),
1517
+ specificity: n(o)
1518
+ }
1519
+ ];
1520
+ return s.sort(r);
1521
+ }
1522
+ function le(e, t) {
1523
+ m(e, le, this);
1524
+ const n = Dn(e), r = arguments.length === 1;
1525
+ let i = !1;
1526
+ return r ? i = n !== "" : i = t instanceof RegExp ? t.test(n) : this.equals(n, t), {
1527
+ pass: i,
1528
+ message: () => {
1529
+ const s = this.isNot ? "not to" : "to";
1530
+ return S(
1531
+ this,
1532
+ this.utils.matcherHint(
1533
+ `${this.isNot ? ".not" : ""}.${le.name}`,
1534
+ "element",
1535
+ ""
1536
+ ),
1537
+ `Expected element ${s} have accessible name`,
1538
+ t,
1539
+ "Received",
1540
+ n
1541
+ );
1542
+ }
1543
+ };
1544
+ }
1545
+ function Be(e, t, n) {
1546
+ return n === void 0 ? t : `${t}=${e(n)}`;
1547
+ }
1548
+ function rr(e, t, n) {
1549
+ return n === void 0 ? `element.hasAttribute(${e(t)})` : `element.getAttribute(${e(t)}) === ${e(n)}`;
1550
+ }
1551
+ function tt(e, t, n) {
1552
+ m(e, tt, this);
1553
+ const r = n !== void 0, i = e.hasAttribute(t), s = e.getAttribute(t);
1554
+ return {
1555
+ pass: r ? i && this.equals(s, n) : i,
1556
+ message: () => {
1557
+ const o = this.isNot ? "not to" : "to", f = i ? Be(this.utils.stringify, t, s) : null, c = this.utils.matcherHint(
1558
+ `${this.isNot ? ".not" : ""}.toHaveAttribute`,
1559
+ "element",
1560
+ this.utils.printExpected(t),
1561
+ {
1562
+ secondArgument: r ? this.utils.printExpected(n) : void 0,
1563
+ comment: rr(
1564
+ this.utils.stringify,
1565
+ t,
1566
+ n
1567
+ )
1568
+ }
1569
+ );
1570
+ return S(
1571
+ this,
1572
+ c,
1573
+ `Expected the element ${o} have attribute`,
1574
+ Be(this.utils.stringify, t, n),
1575
+ "Received",
1576
+ f
1577
+ );
1578
+ }
1579
+ };
1580
+ }
1581
+ function ir(e) {
1582
+ const t = e.pop();
1583
+ let n, r;
1584
+ return typeof t == "object" && !(t instanceof RegExp) ? (n = e, r = t) : (n = e.concat(t), r = { exact: !1 }), { expectedClassNames: n, options: r };
1585
+ }
1586
+ function Pe(e) {
1587
+ return e ? e.split(/\s+/).filter((t) => t.length > 0) : [];
1588
+ }
1589
+ function ke(e, t) {
1590
+ return e.every(
1591
+ (n) => typeof n == "string" ? t.includes(n) : t.some((r) => n.test(r))
1592
+ );
1593
+ }
1594
+ function nt(e, ...t) {
1595
+ m(e, nt, this);
1596
+ const { expectedClassNames: n, options: r } = ir(t), i = Pe(e.getAttribute("class")), s = n.reduce(
1597
+ (f, c) => f.concat(
1598
+ typeof c == "string" || !c ? Pe(c) : c
1599
+ ),
1600
+ []
1601
+ ), o = s.some((f) => f instanceof RegExp);
1602
+ if (r.exact && o)
1603
+ throw new Error("Exact option does not support RegExp expected class names");
1604
+ return r.exact ? {
1605
+ pass: ke(s, i) && s.length === i.length,
1606
+ message: () => {
1607
+ const f = this.isNot ? "not to" : "to";
1608
+ return S(
1609
+ this,
1610
+ this.utils.matcherHint(
1611
+ `${this.isNot ? ".not" : ""}.toHaveClass`,
1612
+ "element",
1613
+ this.utils.printExpected(s.join(" "))
1614
+ ),
1615
+ `Expected the element ${f} have EXACTLY defined classes`,
1616
+ s.join(" "),
1617
+ "Received",
1618
+ i.join(" ")
1619
+ );
1620
+ }
1621
+ } : s.length > 0 ? {
1622
+ pass: ke(s, i),
1623
+ message: () => {
1624
+ const f = this.isNot ? "not to" : "to";
1625
+ return S(
1626
+ this,
1627
+ this.utils.matcherHint(
1628
+ `${this.isNot ? ".not" : ""}.toHaveClass`,
1629
+ "element",
1630
+ this.utils.printExpected(s.join(" "))
1631
+ ),
1632
+ `Expected the element ${f} have class`,
1633
+ s.join(" "),
1634
+ "Received",
1635
+ i.join(" ")
1636
+ );
1637
+ }
1638
+ } : {
1639
+ pass: this.isNot ? i.length > 0 : !1,
1640
+ message: () => this.isNot ? S(
1641
+ this,
1642
+ this.utils.matcherHint(".not.toHaveClass", "element", ""),
1643
+ "Expected the element to have classes",
1644
+ "(none)",
1645
+ "Received",
1646
+ i.join(" ")
1647
+ ) : [
1648
+ this.utils.matcherHint(".toHaveClass", "element"),
1649
+ "At least one expected class must be provided."
1650
+ ].join(`
1651
+ `)
1652
+ };
1653
+ }
1654
+ function sr(e, t) {
1655
+ const n = {}, r = e.createElement("div");
1656
+ return Object.keys(t).forEach((i) => {
1657
+ r.style[i] = t[i], n[i] = r.style[i];
1658
+ }), n;
1659
+ }
1660
+ function or(e, t) {
1661
+ return !!Object.keys(e).length && Object.entries(e).every(([n, r]) => {
1662
+ const i = n.startsWith("--"), s = [n];
1663
+ return i || s.push(n.toLowerCase()), s.some(
1664
+ (o) => t[o] === r || t.getPropertyValue(o) === r
1665
+ );
1666
+ });
1667
+ }
1668
+ function Me(e) {
1669
+ return Object.keys(e).sort().map((t) => `${t}: ${e[t]};`).join(`
1670
+ `);
1671
+ }
1672
+ function ar(e, t, n) {
1673
+ const r = Array.from(n).filter((s) => t[s] !== void 0).reduce(
1674
+ (s, o) => Object.assign(s, { [o]: n.getPropertyValue(o) }),
1675
+ {}
1676
+ );
1677
+ return e(Me(t), Me(r)).replace(`${kn.red("+ Received")}
1678
+ `, "");
1679
+ }
1680
+ function fe(e, t) {
1681
+ m(e, fe, this);
1682
+ const n = typeof t == "object" ? t : Fn(t, fe, this), { getComputedStyle: r } = e.ownerDocument.defaultView, i = sr(e.ownerDocument, n), s = r(e);
1683
+ return {
1684
+ pass: or(i, s),
1685
+ message: () => {
1686
+ const o = `${this.isNot ? ".not" : ""}.toHaveStyle`;
1687
+ return [
1688
+ this.utils.matcherHint(o, "element", ""),
1689
+ ar(this.utils.diff, i, s)
1690
+ ].join(`
1691
+
1692
+ `);
1693
+ }
1694
+ };
1695
+ }
1696
+ function rt(e) {
1697
+ return m(e, rt, this), {
1698
+ pass: e.ownerDocument.activeElement === e,
1699
+ message: () => [
1700
+ this.utils.matcherHint(
1701
+ `${this.isNot ? ".not" : ""}.toHaveFocus`,
1702
+ "element",
1703
+ ""
1704
+ ),
1705
+ "",
1706
+ ...this.isNot ? [
1707
+ "Received element is focused:",
1708
+ ` ${this.utils.printReceived(e)}`
1709
+ ] : [
1710
+ "Expected element with focus:",
1711
+ ` ${this.utils.printExpected(e)}`,
1712
+ "Received element with focus:",
1713
+ ` ${this.utils.printReceived(
1714
+ e.ownerDocument.activeElement
1715
+ )}`
1716
+ ]
1717
+ ].join(`
1718
+ `)
1719
+ };
1720
+ }
1721
+ function ur(e) {
1722
+ const t = [...new Set(e.map((n) => n.type))];
1723
+ if (t.length !== 1)
1724
+ throw new Error(
1725
+ "Multiple form elements with the same name must be of the same type"
1726
+ );
1727
+ switch (t[0]) {
1728
+ case "radio": {
1729
+ const n = e.find((r) => r.checked);
1730
+ return n ? n.value : void 0;
1731
+ }
1732
+ case "checkbox":
1733
+ return e.filter((n) => n.checked).map((n) => n.value);
1734
+ default:
1735
+ return e.map((n) => n.value);
1736
+ }
1737
+ }
1738
+ function cr(e, t) {
1739
+ const n = [...e.querySelectorAll(`[name="${jn(t)}"]`)];
1740
+ if (n.length !== 0)
1741
+ switch (n.length) {
1742
+ case 1:
1743
+ return Ye(n[0]);
1744
+ default:
1745
+ return ur(n);
1746
+ }
1747
+ }
1748
+ function lr(e) {
1749
+ return /\[\]$/.test(e) ? e.slice(0, -2) : e;
1750
+ }
1751
+ function fr(e) {
1752
+ return Array.from(e.elements).map((n) => n.name).reduce(
1753
+ (n, r) => ({
1754
+ ...n,
1755
+ [lr(r)]: cr(e, r)
1756
+ }),
1757
+ {}
1758
+ );
1759
+ }
1760
+ function it(e, t) {
1761
+ if (m(e, it, this), !e.elements)
1762
+ throw new Error("toHaveFormValues must be called on a form or a fieldset");
1763
+ const n = fr(e);
1764
+ return {
1765
+ pass: Object.entries(t).every(
1766
+ ([r, i]) => ge(n[r], i)
1767
+ ),
1768
+ message: () => {
1769
+ const r = this.isNot ? "not to" : "to", i = `${this.isNot ? ".not" : ""}.toHaveFormValues`, s = Object.keys(n).filter((o) => t.hasOwnProperty(o)).reduce((o, f) => ({ ...o, [f]: n[f] }), {});
1770
+ return [
1771
+ this.utils.matcherHint(i, "element", ""),
1772
+ `Expected the element ${r} have form values`,
1773
+ this.utils.diff(t, s)
1774
+ ].join(`
1775
+
1776
+ `);
1777
+ }
1778
+ };
1779
+ }
1780
+ function dr(e) {
1781
+ const { getComputedStyle: t } = e.ownerDocument.defaultView, { display: n, visibility: r, opacity: i } = t(e);
1782
+ return n !== "none" && r !== "hidden" && r !== "collapse" && i !== "0" && i !== 0;
1783
+ }
1784
+ function pr(e, t) {
1785
+ let n;
1786
+ return t ? n = e.nodeName === "DETAILS" && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0 : n = e.nodeName === "DETAILS" ? e.hasAttribute("open") : !0, !e.hasAttribute("hidden") && n;
1787
+ }
1788
+ function st(e, t) {
1789
+ return dr(e) && pr(e, t) && (!e.parentElement || st(e.parentElement, e));
1790
+ }
1791
+ function ot(e) {
1792
+ m(e, ot, this);
1793
+ const t = e.ownerDocument === e.getRootNode({ composed: !0 }), n = t && st(e);
1794
+ return {
1795
+ pass: n,
1796
+ message: () => {
1797
+ const r = n ? "is" : "is not";
1798
+ return [
1799
+ this.utils.matcherHint(
1800
+ `${this.isNot ? ".not" : ""}.toBeVisible`,
1801
+ "element",
1802
+ ""
1803
+ ),
1804
+ "",
1805
+ `Received element ${r} visible${t ? "" : " (element is not in the document)"}:`,
1806
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1807
+ ].join(`
1808
+ `);
1809
+ }
1810
+ };
1811
+ }
1812
+ const hr = [
1813
+ "fieldset",
1814
+ "input",
1815
+ "select",
1816
+ "optgroup",
1817
+ "option",
1818
+ "button",
1819
+ "textarea"
1820
+ ];
1821
+ function gr(e, t) {
1822
+ return L(e) === "legend" && L(t) === "fieldset" && e.isSameNode(
1823
+ Array.from(t.children).find((n) => L(n) === "legend")
1824
+ );
1825
+ }
1826
+ function mr(e, t) {
1827
+ return ut(t) && !gr(e, t);
1828
+ }
1829
+ function br(e) {
1830
+ return e.includes("-");
1831
+ }
1832
+ function at(e) {
1833
+ const t = L(e);
1834
+ return hr.includes(t) || br(t);
1835
+ }
1836
+ function ut(e) {
1837
+ return at(e) && e.hasAttribute("disabled");
1838
+ }
1839
+ function ct(e) {
1840
+ const t = e.parentElement;
1841
+ return !!t && (mr(e, t) || ct(t));
1842
+ }
1843
+ function lt(e) {
1844
+ return at(e) && (ut(e) || ct(e));
1845
+ }
1846
+ function ft(e) {
1847
+ m(e, ft, this);
1848
+ const t = lt(e);
1849
+ return {
1850
+ pass: t,
1851
+ message: () => {
1852
+ const n = t ? "is" : "is not";
1853
+ return [
1854
+ this.utils.matcherHint(
1855
+ `${this.isNot ? ".not" : ""}.toBeDisabled`,
1856
+ "element",
1857
+ ""
1858
+ ),
1859
+ "",
1860
+ `Received element ${n} disabled:`,
1861
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1862
+ ].join(`
1863
+ `);
1864
+ }
1865
+ };
1866
+ }
1867
+ function dt(e) {
1868
+ m(e, dt, this);
1869
+ const t = !lt(e);
1870
+ return {
1871
+ pass: t,
1872
+ message: () => {
1873
+ const n = t ? "is" : "is not";
1874
+ return [
1875
+ this.utils.matcherHint(
1876
+ `${this.isNot ? ".not" : ""}.toBeEnabled`,
1877
+ "element",
1878
+ ""
1879
+ ),
1880
+ "",
1881
+ `Received element ${n} enabled:`,
1882
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1883
+ ].join(`
1884
+ `);
1885
+ }
1886
+ };
1887
+ }
1888
+ const vr = ["select", "textarea"], yr = ["input", "select", "textarea"], Er = [
1889
+ "color",
1890
+ "hidden",
1891
+ "range",
1892
+ "submit",
1893
+ "image",
1894
+ "reset"
1895
+ ], wr = [
1896
+ "checkbox",
1897
+ "combobox",
1898
+ "gridcell",
1899
+ "listbox",
1900
+ "radiogroup",
1901
+ "spinbutton",
1902
+ "textbox",
1903
+ "tree"
1904
+ ];
1905
+ function xr(e) {
1906
+ return vr.includes(L(e)) && e.hasAttribute("required");
1907
+ }
1908
+ function Nr(e) {
1909
+ return L(e) === "input" && e.hasAttribute("required") && (e.hasAttribute("type") && !Er.includes(e.getAttribute("type")) || !e.hasAttribute("type"));
1910
+ }
1911
+ function Sr(e) {
1912
+ return e.hasAttribute("aria-required") && e.getAttribute("aria-required") === "true" && (yr.includes(L(e)) || e.hasAttribute("role") && wr.includes(e.getAttribute("role")));
1913
+ }
1914
+ function pt(e) {
1915
+ m(e, pt, this);
1916
+ const t = xr(e) || Nr(e) || Sr(e);
1917
+ return {
1918
+ pass: t,
1919
+ message: () => {
1920
+ const n = t ? "is" : "is not";
1921
+ return [
1922
+ this.utils.matcherHint(
1923
+ `${this.isNot ? ".not" : ""}.toBeRequired`,
1924
+ "element",
1925
+ ""
1926
+ ),
1927
+ "",
1928
+ `Received element ${n} required:`,
1929
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1930
+ ].join(`
1931
+ `);
1932
+ }
1933
+ };
1934
+ }
1935
+ const Ar = ["form", "input", "select", "textarea"];
1936
+ function Rr(e) {
1937
+ return e.hasAttribute("aria-invalid") && e.getAttribute("aria-invalid") !== "false";
1938
+ }
1939
+ function $r(e) {
1940
+ return Ar.includes(L(e));
1941
+ }
1942
+ function ht(e) {
1943
+ const t = Rr(e);
1944
+ return $r(e) ? t || !e.checkValidity() : t;
1945
+ }
1946
+ function gt(e) {
1947
+ m(e, gt, this);
1948
+ const t = ht(e);
1949
+ return {
1950
+ pass: t,
1951
+ message: () => {
1952
+ const n = t ? "is" : "is not";
1953
+ return [
1954
+ this.utils.matcherHint(
1955
+ `${this.isNot ? ".not" : ""}.toBeInvalid`,
1956
+ "element",
1957
+ ""
1958
+ ),
1959
+ "",
1960
+ `Received element ${n} currently invalid:`,
1961
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1962
+ ].join(`
1963
+ `);
1964
+ }
1965
+ };
1966
+ }
1967
+ function mt(e) {
1968
+ m(e, mt, this);
1969
+ const t = !ht(e);
1970
+ return {
1971
+ pass: t,
1972
+ message: () => {
1973
+ const n = t ? "is" : "is not";
1974
+ return [
1975
+ this.utils.matcherHint(
1976
+ `${this.isNot ? ".not" : ""}.toBeValid`,
1977
+ "element",
1978
+ ""
1979
+ ),
1980
+ "",
1981
+ `Received element ${n} currently valid:`,
1982
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1983
+ ].join(`
1984
+ `);
1985
+ }
1986
+ };
1987
+ }
1988
+ function bt(e, t) {
1989
+ if (m(e, bt, this), e.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(e.type))
1990
+ throw new Error(
1991
+ "input with type=checkbox or type=radio cannot be used with .toHaveValue(). Use .toBeChecked() for type=checkbox or .toHaveFormValues() instead"
1992
+ );
1993
+ const n = Ye(e), r = t !== void 0;
1994
+ let i = t, s = n;
1995
+ return t == n && t !== n && (i = `${t} (${typeof t})`, s = `${n} (${typeof n})`), {
1996
+ pass: r ? ge(n, t) : !!n,
1997
+ message: () => {
1998
+ const o = this.isNot ? "not to" : "to", f = this.utils.matcherHint(
1999
+ `${this.isNot ? ".not" : ""}.toHaveValue`,
2000
+ "element",
2001
+ t
2002
+ );
2003
+ return S(
2004
+ this,
2005
+ f,
2006
+ `Expected the element ${o} have value`,
2007
+ r ? i : "(any)",
2008
+ "Received",
2009
+ s
2010
+ );
2011
+ }
2012
+ };
2013
+ }
2014
+ function vt(e, t) {
2015
+ m(e, vt, this);
2016
+ const n = e.tagName.toLowerCase();
2017
+ if (!["select", "input", "textarea"].includes(n))
2018
+ throw new Error(
2019
+ ".toHaveDisplayValue() currently supports only input, textarea or select elements, try with another matcher instead."
2020
+ );
2021
+ if (n === "input" && ["radio", "checkbox"].includes(e.type))
2022
+ throw new Error(
2023
+ `.toHaveDisplayValue() currently does not support input[type="${e.type}"], try with another matcher instead.`
2024
+ );
2025
+ const r = Cr(n, e), i = Or(t), s = i.filter(
2026
+ (c) => r.some(
2027
+ (b) => c instanceof RegExp ? c.test(b) : this.equals(b, String(c))
2028
+ )
2029
+ ).length, o = s === r.length, f = s === i.length;
2030
+ return {
2031
+ pass: o && f,
2032
+ message: () => S(
2033
+ this,
2034
+ this.utils.matcherHint(
2035
+ `${this.isNot ? ".not" : ""}.toHaveDisplayValue`,
2036
+ "element",
2037
+ ""
2038
+ ),
2039
+ `Expected element ${this.isNot ? "not " : ""}to have display value`,
2040
+ t,
2041
+ "Received",
2042
+ r
2043
+ )
2044
+ };
2045
+ }
2046
+ function Cr(e, t) {
2047
+ return e === "select" ? Array.from(t).filter((n) => n.selected).map((n) => n.textContent) : [t.value];
2048
+ }
2049
+ function Or(e) {
2050
+ return e instanceof Array ? e : [e];
2051
+ }
2052
+ function yt(e) {
2053
+ m(e, yt, this);
2054
+ const t = () => e.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(e.type), n = () => Et(e.getAttribute("role")) && ["true", "false"].includes(e.getAttribute("aria-checked"));
2055
+ if (!t() && !n())
2056
+ return {
2057
+ pass: !1,
2058
+ message: () => `only inputs with type="checkbox" or type="radio" or elements with ${Ir()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`
2059
+ };
2060
+ const r = () => t() ? e.checked : e.getAttribute("aria-checked") === "true";
2061
+ return {
2062
+ pass: r(),
2063
+ message: () => {
2064
+ const i = r() ? "is" : "is not";
2065
+ return [
2066
+ this.utils.matcherHint(
2067
+ `${this.isNot ? ".not" : ""}.toBeChecked`,
2068
+ "element",
2069
+ ""
2070
+ ),
2071
+ "",
2072
+ `Received element ${i} checked:`,
2073
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2074
+ ].join(`
2075
+ `);
2076
+ }
2077
+ };
2078
+ }
2079
+ function Ir() {
2080
+ return Kn(
2081
+ Hr().map((e) => `role="${e}"`),
2082
+ { lastWordConnector: " or " }
2083
+ );
2084
+ }
2085
+ function Hr() {
2086
+ return he.roles.keys().filter(Et);
2087
+ }
2088
+ function Et(e) {
2089
+ var t;
2090
+ return ((t = he.roles.get(e)) == null ? void 0 : t.props["aria-checked"]) !== void 0;
2091
+ }
2092
+ function wt(e) {
2093
+ m(e, wt, this);
2094
+ const t = () => e.tagName.toLowerCase() === "input" && e.type === "checkbox", n = () => e.getAttribute("role") === "checkbox";
2095
+ if (!t() && !n())
2096
+ return {
2097
+ pass: !1,
2098
+ 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'
2099
+ };
2100
+ const r = () => {
2101
+ const i = e.getAttribute("aria-checked") === "mixed";
2102
+ return t() && e.indeterminate || i;
2103
+ };
2104
+ return {
2105
+ pass: r(),
2106
+ message: () => {
2107
+ const i = r() ? "is" : "is not";
2108
+ return [
2109
+ this.utils.matcherHint(
2110
+ `${this.isNot ? ".not" : ""}.toBePartiallyChecked`,
2111
+ "element",
2112
+ ""
2113
+ ),
2114
+ "",
2115
+ `Received element ${i} partially checked:`,
2116
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2117
+ ].join(`
2118
+ `);
2119
+ }
2120
+ };
2121
+ }
2122
+ function xt(e, t) {
2123
+ K(
2124
+ "toHaveDescription",
2125
+ "Please use toHaveAccessibleDescription."
2126
+ ), m(e, xt, this);
2127
+ const n = t !== void 0, i = (e.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean);
2128
+ let s = "";
2129
+ if (i.length > 0) {
2130
+ const o = e.ownerDocument, f = i.map((c) => o.getElementById(c)).filter(Boolean);
2131
+ s = X(f.map((c) => c.textContent).join(" "));
2132
+ }
2133
+ return {
2134
+ pass: n ? t instanceof RegExp ? t.test(s) : this.equals(s, t) : !!s,
2135
+ message: () => {
2136
+ const o = this.isNot ? "not to" : "to";
2137
+ return S(
2138
+ this,
2139
+ this.utils.matcherHint(
2140
+ `${this.isNot ? ".not" : ""}.toHaveDescription`,
2141
+ "element",
2142
+ ""
2143
+ ),
2144
+ `Expected the element ${o} have description`,
2145
+ this.utils.printExpected(t),
2146
+ "Received",
2147
+ this.utils.printReceived(s)
2148
+ );
2149
+ }
2150
+ };
2151
+ }
2152
+ function Nt(e, t) {
2153
+ if (K("toHaveErrorMessage", "Please use toHaveAccessibleErrorMessage."), m(e, Nt, this), !e.hasAttribute("aria-invalid") || e.getAttribute("aria-invalid") === "false") {
2154
+ const o = this.isNot ? ".not" : "";
2155
+ return {
2156
+ pass: !1,
2157
+ message: () => S(
2158
+ this,
2159
+ this.utils.matcherHint(`${o}.toHaveErrorMessage`, "element", ""),
2160
+ "Expected the element to have invalid state indicated by",
2161
+ 'aria-invalid="true"',
2162
+ "Received",
2163
+ e.hasAttribute("aria-invalid") ? `aria-invalid="${e.getAttribute("aria-invalid")}"` : this.utils.printReceived("")
2164
+ )
2165
+ };
2166
+ }
2167
+ const n = t !== void 0, i = (e.getAttribute("aria-errormessage") || "").split(/\s+/).filter(Boolean);
2168
+ let s = "";
2169
+ if (i.length > 0) {
2170
+ const o = e.ownerDocument, f = i.map((c) => o.getElementById(c)).filter(Boolean);
2171
+ s = X(
2172
+ f.map((c) => c.textContent).join(" ")
2173
+ );
2174
+ }
2175
+ return {
2176
+ pass: n ? t instanceof RegExp ? t.test(s) : this.equals(s, t) : !!s,
2177
+ message: () => {
2178
+ const o = this.isNot ? "not to" : "to";
2179
+ return S(
2180
+ this,
2181
+ this.utils.matcherHint(
2182
+ `${this.isNot ? ".not" : ""}.toHaveErrorMessage`,
2183
+ "element",
2184
+ ""
2185
+ ),
2186
+ `Expected the element ${o} have error message`,
2187
+ this.utils.printExpected(t),
2188
+ "Received",
2189
+ this.utils.printReceived(s)
2190
+ );
2191
+ }
2192
+ };
2193
+ }
2194
+ function Tr(e) {
2195
+ const t = e.ownerDocument.getSelection();
2196
+ if (["input", "textarea"].includes(e.tagName.toLowerCase()))
2197
+ return ["radio", "checkbox"].includes(e.type) ? "" : e.value.toString().substring(e.selectionStart, e.selectionEnd);
2198
+ if (t.anchorNode === null || t.focusNode === null)
2199
+ return "";
2200
+ const n = t.getRangeAt(0), r = e.ownerDocument.createRange();
2201
+ if (t.containsNode(e, !1))
2202
+ r.selectNodeContents(e), t.removeAllRanges(), t.addRange(r);
2203
+ else if (!(e.contains(t.anchorNode) && e.contains(t.focusNode))) {
2204
+ const s = e === n.startContainer || e.contains(n.startContainer), o = e === n.endContainer || e.contains(n.endContainer);
2205
+ t.removeAllRanges(), (s || o) && (r.selectNodeContents(e), s && r.setStart(
2206
+ n.startContainer,
2207
+ n.startOffset
2208
+ ), o && r.setEnd(
2209
+ n.endContainer,
2210
+ n.endOffset
2211
+ ), t.addRange(r));
2212
+ }
2213
+ const i = t.toString();
2214
+ return t.removeAllRanges(), t.addRange(n), i;
2215
+ }
2216
+ function St(e, t) {
2217
+ m(e, St, this);
2218
+ const n = t !== void 0;
2219
+ if (n && typeof t != "string")
2220
+ throw new Error("expected selection must be a string or undefined");
2221
+ const r = Tr(e);
2222
+ return {
2223
+ pass: n ? ge(r, t) : !!r,
2224
+ message: () => {
2225
+ const i = this.isNot ? "not to" : "to", s = this.utils.matcherHint(
2226
+ `${this.isNot ? ".not" : ""}.toHaveSelection`,
2227
+ "element",
2228
+ t
2229
+ );
2230
+ return S(
2231
+ this,
2232
+ s,
2233
+ `Expected the element ${i} have selection`,
2234
+ n ? t : "(any)",
2235
+ "Received",
2236
+ r
2237
+ );
2238
+ }
2239
+ };
2240
+ }
2241
+ function At(e) {
2242
+ m(e, At, this);
2243
+ const t = (e.getAttribute("role") || "").split(" ").map((o) => o.trim()), n = e.tagName.toLowerCase() === "button" || e.tagName.toLowerCase() === "input" && e.type === "button" || t.includes("button"), r = e.getAttribute("aria-pressed");
2244
+ return !n || !(r === "true" || r === "false") ? {
2245
+ pass: !1,
2246
+ message: () => 'Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()'
2247
+ } : {
2248
+ pass: n && r === "true",
2249
+ message: () => {
2250
+ const o = this.utils.matcherHint(
2251
+ `${this.isNot ? ".not" : ""}.toBePressed`,
2252
+ "element",
2253
+ ""
2254
+ );
2255
+ return S(
2256
+ this,
2257
+ o,
2258
+ "Expected element to have",
2259
+ `aria-pressed="${this.isNot ? "false" : "true"}"`,
2260
+ "Received",
2261
+ `aria-pressed="${r}"`
2262
+ );
2263
+ }
2264
+ };
2265
+ }
2266
+ function Rt(e) {
2267
+ m(e, Rt, this);
2268
+ const t = (e.getAttribute("role") || "").split(" ").map((o) => o.trim()), n = e.tagName.toLowerCase() === "button" || e.tagName.toLowerCase() === "input" && e.type === "button" || t.includes("button"), r = e.getAttribute("aria-pressed");
2269
+ return !n || !(r === "true" || r === "false" || r === "mixed") ? {
2270
+ pass: !1,
2271
+ message: () => 'Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()'
2272
+ } : {
2273
+ pass: n && r === "mixed",
2274
+ message: () => {
2275
+ const o = this.isNot ? "not to" : "to", f = this.utils.matcherHint(
2276
+ `${this.isNot ? ".not" : ""}.toBePartiallyPressed`,
2277
+ "element",
2278
+ ""
2279
+ );
2280
+ return S(
2281
+ this,
2282
+ f,
2283
+ `Expected element ${o} have`,
2284
+ 'aria-pressed="mixed"',
2285
+ "Received",
2286
+ `aria-pressed="${r}"`
2287
+ );
2288
+ }
2289
+ };
2290
+ }
2291
+ const Dr = 1, $t = 2, Ct = 4, Br = 8, Pr = 16, kr = 32, Le = {
2292
+ [Dr]: "Node.DOCUMENT_POSITION_DISCONNECTED",
2293
+ [$t]: "Node.DOCUMENT_POSITION_PRECEDING",
2294
+ [Ct]: "Node.DOCUMENT_POSITION_FOLLOWING",
2295
+ [Br]: "Node.DOCUMENT_POSITION_CONTAINS",
2296
+ [Pr]: "Node.DOCUMENT_POSITION_CONTAINED_BY",
2297
+ [kr]: "Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"
2298
+ };
2299
+ function Mr(e) {
2300
+ return e in Le ? `${Le[e]} (${e})` : `Unknown document position (${e})`;
2301
+ }
2302
+ function Ot(e, t) {
2303
+ return function(n, r) {
2304
+ m(n, de, this), m(r, de, this);
2305
+ const i = n.compareDocumentPosition(r);
2306
+ return {
2307
+ pass: i === t,
2308
+ message: () => [
2309
+ this.utils.matcherHint(
2310
+ `${this.isNot ? ".not" : ""}.${e}`,
2311
+ "element",
2312
+ "secondElement"
2313
+ ),
2314
+ "",
2315
+ `Received: ${Mr(i)}`
2316
+ ].join(`
2317
+ `)
2318
+ };
2319
+ };
2320
+ }
2321
+ function de(e, t) {
2322
+ return Ot("toAppearBefore", Ct).apply(
2323
+ this,
2324
+ [e, t]
2325
+ );
2326
+ }
2327
+ function Lr(e, t) {
2328
+ return Ot("toAppearAfter", $t).apply(
2329
+ this,
2330
+ [e, t]
2331
+ );
2332
+ }
2333
+ var qr = /* @__PURE__ */ Object.freeze({
2334
+ __proto__: null,
2335
+ toAppearAfter: Lr,
2336
+ toAppearBefore: de,
2337
+ toBeChecked: yt,
2338
+ toBeDisabled: ft,
2339
+ toBeEmpty: Xe,
2340
+ toBeEmptyDOMElement: Qe,
2341
+ toBeEnabled: dt,
2342
+ toBeInTheDOM: oe,
2343
+ toBeInTheDocument: Ke,
2344
+ toBeInvalid: gt,
2345
+ toBePartiallyChecked: wt,
2346
+ toBePartiallyPressed: Rt,
2347
+ toBePressed: At,
2348
+ toBeRequired: pt,
2349
+ toBeValid: mt,
2350
+ toBeVisible: ot,
2351
+ toContainElement: ae,
2352
+ toContainHTML: Je,
2353
+ toHaveAccessibleDescription: ue,
2354
+ toHaveAccessibleErrorMessage: et,
2355
+ toHaveAccessibleName: le,
2356
+ toHaveAttribute: tt,
2357
+ toHaveClass: nt,
2358
+ toHaveDescription: xt,
2359
+ toHaveDisplayValue: vt,
2360
+ toHaveErrorMessage: Nt,
2361
+ toHaveFocus: rt,
2362
+ toHaveFormValues: it,
2363
+ toHaveRole: ce,
2364
+ toHaveSelection: St,
2365
+ toHaveStyle: fe,
2366
+ toHaveTextContent: Ze,
2367
+ toHaveValue: bt
2368
+ });
2369
+ export {
2370
+ Nt as A,
2371
+ rt as B,
2372
+ it as C,
2373
+ ce as D,
2374
+ St as E,
2375
+ fe as F,
2376
+ Ze as G,
2377
+ bt as H,
2378
+ de as a,
2379
+ yt as b,
2380
+ ft as c,
2381
+ Xe as d,
2382
+ qr as e,
2383
+ Qe as f,
2384
+ dt as g,
2385
+ oe as h,
2386
+ Ke as i,
2387
+ gt as j,
2388
+ wt as k,
2389
+ Rt as l,
2390
+ At as m,
2391
+ pt as n,
2392
+ mt as o,
2393
+ ot as p,
2394
+ ae as q,
2395
+ Je as r,
2396
+ ue as s,
2397
+ Lr as t,
2398
+ et as u,
2399
+ le as v,
2400
+ tt as w,
2401
+ nt as x,
2402
+ xt as y,
2403
+ vt as z
2404
+ };