@linzjs/step-ag-grid 17.7.0 → 17.8.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 (40) hide show
  1. package/dist/src/components/GridNoRowsOverlay.d.ts +3 -1
  2. package/dist/step-ag-grid.cjs.js +1096 -703
  3. package/dist/step-ag-grid.cjs.js.map +1 -1
  4. package/dist/step-ag-grid.esm.js +1098 -705
  5. package/dist/step-ag-grid.esm.js.map +1 -1
  6. package/package.json +47 -46
  7. package/src/components/Grid.tsx +21 -20
  8. package/src/components/GridNoRowsOverlay.tsx +27 -3
  9. package/src/stories/components/ActionButton.stories.tsx +3 -3
  10. package/src/stories/grid/GridDragRow.stories.tsx +3 -3
  11. package/src/stories/grid/GridFilterButtons.stories.tsx +3 -3
  12. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +3 -3
  13. package/src/stories/grid/GridNonEditableRow.stories.tsx +3 -3
  14. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +3 -3
  15. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +3 -3
  16. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +3 -3
  17. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +3 -3
  18. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +3 -3
  19. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +3 -3
  20. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +3 -3
  21. package/src/stories/grid/GridReadOnly.stories.tsx +7 -8
  22. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +3 -3
  23. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +3 -3
  24. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +3 -3
  25. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +3 -3
  26. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +3 -3
  27. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +3 -3
  28. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +3 -3
  29. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +3 -3
  30. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +3 -3
  31. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +3 -3
  32. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +3 -3
  33. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +3 -3
  34. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +3 -3
  35. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +3 -3
  36. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +3 -3
  37. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +3 -3
  38. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +3 -3
  39. package/src/stories/react-menu/ReactMenu.stories.tsx +3 -3
  40. package/dist/node_modules/@linzjs/lui/dist/assets/svg-content.d.ts +0 -7
@@ -1,14 +1,29 @@
1
1
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
- import { LuiMiniSpinner, LuiIcon, LuiButton, LuiCheckboxInput, LuiButtonGroup } from '@linzjs/lui';
2
+ import { LuiMiniSpinner, LuiStatusSpinner, LuiIcon, LuiButton, LuiCheckboxInput, LuiButtonGroup } from '@linzjs/lui';
3
3
  import { RowHighlightPosition } from 'ag-grid-community';
4
4
  import { AgGridReact } from 'ag-grid-react';
5
5
  import { negate, isEmpty, findIndex, defer as defer$1, debounce as debounce$1, xorBy, last, difference, omit, sortBy, delay, partition, pick, groupBy, fromPairs, toPairs, isEqual, compact, filter, sumBy, pull, remove, castArray, flatten } from 'lodash-es';
6
- import React, { createContext, useContext, useRef, useEffect, useCallback, useState, useMemo, useLayoutEffect, memo, forwardRef, useReducer, cloneElement, useImperativeHandle, Fragment } from 'react';
6
+ import React, { useRef, useEffect, useLayoutEffect, createContext, useContext, useCallback, useState, useMemo, memo, forwardRef, useReducer, cloneElement, useImperativeHandle, Fragment } from 'react';
7
7
  import { unstable_batchedUpdates, flushSync, createPortal } from 'react-dom';
8
8
  import * as testUtils from 'react-dom/test-utils';
9
9
  import 'react-dom/client';
10
10
  import require$$0 from 'util';
11
11
 
12
+ function _mergeNamespaces(n, m) {
13
+ m.forEach(function (e) {
14
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default' && !(k in n)) {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ });
24
+ return Object.freeze(n);
25
+ }
26
+
12
27
  /**
13
28
  * If loading is true this returns a loading spinner, otherwise it returns its children.
14
29
  */
@@ -18,6 +33,42 @@ const ComponentLoadingWrapper = (props) => {
18
33
 
19
34
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
20
35
 
36
+ (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+
46
+ (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
47
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
48
+ return new (P || (P = Promise))(function (resolve, reject) {
49
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
50
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
51
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
52
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
53
+ });
54
+ };
55
+
56
+ function useInterval(callback, delay) {
57
+ const savedCallback = useRef(callback);
58
+ useIsomorphicLayoutEffect$1(() => {
59
+ savedCallback.current = callback;
60
+ }, [callback]);
61
+ useEffect(() => {
62
+ if (!delay && delay !== 0) {
63
+ return;
64
+ }
65
+ const id = setInterval(() => savedCallback.current(), delay);
66
+ return () => clearInterval(id);
67
+ }, [delay]);
68
+ }
69
+
70
+ const useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
71
+
21
72
  const GridContext = createContext({
22
73
  gridReady: false,
23
74
  gridRenderState: () => null,
@@ -170,53 +221,6 @@ const GridUpdatingContext = createContext({
170
221
  updatedDep: 0,
171
222
  });
172
223
 
173
- /**
174
- * Cancels timeouts on scope being destroyed.
175
- *
176
- * This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
177
- * This could have been implemented using debounce if the callers function was wrapped in useCallback,
178
- * but there's no way to enforce that, so it would lead to bugs.
179
- */
180
- const useTimeoutHook = () => {
181
- const timeout = useRef();
182
- /**
183
- * Clear any pending timeouts.
184
- */
185
- const clearTimeouts = () => {
186
- if (timeout.current) {
187
- const tc = timeout.current;
188
- timeout.current = undefined;
189
- clearTimeout(tc);
190
- }
191
- };
192
- /**
193
- * Call this when your action has completed.
194
- */
195
- const invoke = useCallback((fn, waitTimeMs) => {
196
- clearTimeouts();
197
- timeout.current = setTimeout(fn, waitTimeMs);
198
- }, []);
199
- /**
200
- * Clear timeout on loss of scope.
201
- */
202
- useEffect(() => {
203
- return () => clearTimeouts();
204
- }, []);
205
- return invoke;
206
- };
207
- const useIntervalHook = ({ callback, timeoutMs }) => {
208
- const callbackRef = useRef(callback);
209
- callbackRef.current = callback;
210
- useEffect(() => {
211
- const interval = setInterval(() => {
212
- callbackRef.current && callbackRef.current();
213
- }, timeoutMs);
214
- return () => {
215
- clearInterval(interval);
216
- };
217
- }, [timeoutMs]);
218
- };
219
-
220
224
  const isNotEmpty = negate(isEmpty);
221
225
  const wait$1 = (timeoutMs) => new Promise((resolve) => {
222
226
  setTimeout(resolve, timeoutMs);
@@ -269,11 +273,21 @@ const sanitiseFileName = (filename) => {
269
273
  return valid.slice(0, -fileExt.length - 1).slice(0, 64) + "." + fileExt;
270
274
  };
271
275
 
272
- const GridNoRowsOverlay = (params) => {
273
- if (params.rowCount === 0)
274
- return jsx("span", { children: params.noRowsOverlayText ?? "There are currently no rows" });
275
- if (params.filteredRowCount === 0)
276
- return jsx("span", { children: "All rows have been filtered" });
276
+ const GridLoadingOverlayComponent = (props) => (jsx("div", { style: {
277
+ left: 0,
278
+ top: 0,
279
+ bottom: 0,
280
+ right: 0,
281
+ position: "absolute",
282
+ backgroundColor: "rgba(255,255,255,0.5)",
283
+ }, children: jsx("div", { style: { height: "100%", position: "relative" }, children: jsx("div", { style: { position: "absolute", left: 0, top: props.headerRowHeight, right: 0, bottom: 0 }, children: jsx(LuiStatusSpinner, {}) }) }) }));
284
+ const GridNoRowsOverlay = (props) => {
285
+ if (props.loading)
286
+ return jsx(GridLoadingOverlayComponent, { headerRowHeight: props.headerRowHeight });
287
+ if (props.rowCount === 0)
288
+ return jsx("div", { children: props.noRowsOverlayText ?? "There are currently no rows" });
289
+ if (props.filteredRowCount === 0)
290
+ return jsx("div", { children: "All rows have been filtered" });
277
291
  return jsx("span", {});
278
292
  };
279
293
 
@@ -2324,7 +2338,7 @@ const useGridContextMenu = ({ contextMenuSelectRow, contextMenu: ContextMenu, })
2324
2338
  /**
2325
2339
  * Wrapper for AgGrid to add commonly used functionality.
2326
2340
  */
2327
- const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, singleClickEdit = false, rowData, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined, ...params }) => {
2341
+ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, singleClickEdit = false, rowData, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : 40, ...params }) => {
2328
2342
  const { gridReady, gridRenderState, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, } = useContext(GridContext);
2329
2343
  const { checkUpdating, updatedDep, updatingCols } = useContext(GridUpdatingContext);
2330
2344
  const { prePopupOps } = useContext(GridContext);
@@ -2383,23 +2397,20 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2383
2397
  /**
2384
2398
  * Auto-size windows that had deferred auto-size
2385
2399
  */
2386
- useIntervalHook({
2387
- callback: () => {
2388
- // Check if window has been popped out and needs resize
2389
- const currentDocument = gridDivRef.current?.ownerDocument;
2390
- if (currentDocument !== lastOwnerDocumentRef.current) {
2391
- lastOwnerDocumentRef.current = currentDocument;
2392
- if (currentDocument) {
2393
- needsAutoSize.current = true;
2394
- }
2400
+ useInterval(() => {
2401
+ // Check if window has been popped out and needs resize
2402
+ const currentDocument = gridDivRef.current?.ownerDocument;
2403
+ if (currentDocument !== lastOwnerDocumentRef.current) {
2404
+ lastOwnerDocumentRef.current = currentDocument;
2405
+ if (currentDocument) {
2406
+ needsAutoSize.current = true;
2395
2407
  }
2396
- if (needsAutoSize.current) {
2397
- needsAutoSize.current = false;
2398
- setInitialContentSize();
2399
- }
2400
- },
2401
- timeoutMs: 200,
2402
- });
2408
+ }
2409
+ if (needsAutoSize.current) {
2410
+ needsAutoSize.current = false;
2411
+ setInitialContentSize();
2412
+ }
2413
+ }, 200);
2403
2414
  /**
2404
2415
  * On data load select the first row of the grid if required.
2405
2416
  */
@@ -2775,12 +2786,13 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2775
2786
  }, [params]);
2776
2787
  // This is setting a ref in the GridContext so won't be triggering an update loop
2777
2788
  setOnCellEditingComplete(params.onCellEditingComplete);
2789
+ const headerRowCount = columnDefs.some((c) => c.children) ? 2 : 1;
2778
2790
  return (jsxs("div", { "data-testid": dataTestId, className: clsx("Grid-container", theme, "theme-specific", staleGrid && "Grid-sortIsStale", gridReady && rowData && autoSized && "Grid-ready"), children: [gridContextMenu.component, jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsx(AgGridReact, { rowHeight: rowHeight, animateRows: params.animateRows, rowClassRules: params.rowClassRules, getRowId: (params) => `${params.data.id}`, suppressRowClickSelection: true, rowSelection: rowSelection, suppressBrowserResizeObserver: true, onGridSizeChanged: onGridSizeChanged, suppressColumnVirtualisation: suppressColumnVirtualization, suppressClickEdit: true, onColumnVisible: () => {
2779
2791
  setInitialContentSize();
2780
2792
  }, onRowDataUpdated: onRowDataChanged, onCellKeyDown: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, domLayout: params.domLayout, onColumnResized: onColumnResized, defaultColDef: { minWidth: 48, ...omit(params.defaultColDef, ["editable"]) }, columnDefs: columnDefsAdjusted, rowData: rowData, noRowsOverlayComponent: (event) => {
2781
2793
  let rowCount = 0;
2782
2794
  event.api.forEachNode(() => rowCount++);
2783
- return (jsx(GridNoRowsOverlay, { rowCount: rowCount, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
2795
+ return (jsx(GridNoRowsOverlay, { loading: !rowData, rowCount: rowCount, headerRowHeight: headerRowCount * rowHeight, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
2784
2796
  }, onModelUpdated: onModelUpdated, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: params.onRowDragEnd ? undefined : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection, onColumnMoved: params.onColumnMoved, alwaysShowVerticalScroll: params.alwaysShowVerticalScroll, isExternalFilterPresent: isExternalFilterPresent, doesExternalFilterPass: doesExternalFilterPass, maintainColumnOrder: true, preventDefaultOnContextMenu: true, onCellContextMenu: gridContextMenu.cellContextMenu, rowDragText: params.rowDragText, onRowDragMove: onRowDragMove, onRowDragEnd: onRowDragEnd, onRowDragLeave: onRowDragLeave }) })] }));
2785
2797
  };
2786
2798
 
@@ -3093,6 +3105,41 @@ const GridFilterQuick = ({ quickFilterPlaceholder, defaultValue }) => {
3093
3105
 
3094
3106
  const GridFilters = ({ children }) => (jsx("div", { className: "Grid-container-filters", children: children }));
3095
3107
 
3108
+ /**
3109
+ * Cancels timeouts on scope being destroyed.
3110
+ *
3111
+ * This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
3112
+ * This could have been implemented using debounce if the callers function was wrapped in useCallback,
3113
+ * but there's no way to enforce that, so it would lead to bugs.
3114
+ */
3115
+ const useTimeoutHook = () => {
3116
+ const timeout = useRef();
3117
+ /**
3118
+ * Clear any pending timeouts.
3119
+ */
3120
+ const clearTimeouts = () => {
3121
+ if (timeout.current) {
3122
+ const tc = timeout.current;
3123
+ timeout.current = undefined;
3124
+ clearTimeout(tc);
3125
+ }
3126
+ };
3127
+ /**
3128
+ * Call this when your action has completed.
3129
+ */
3130
+ const invoke = useCallback((fn, waitTimeMs) => {
3131
+ clearTimeouts();
3132
+ timeout.current = setTimeout(fn, waitTimeMs);
3133
+ }, []);
3134
+ /**
3135
+ * Clear timeout on loss of scope.
3136
+ */
3137
+ useEffect(() => {
3138
+ return () => clearTimeouts();
3139
+ }, []);
3140
+ return invoke;
3141
+ };
3142
+
3096
3143
  /**
3097
3144
  * Defers state change up to a minimum time since last state change.
3098
3145
  */
@@ -6451,31 +6498,6 @@ var ReactElement = {};
6451
6498
 
6452
6499
  var reactIs = {exports: {}};
6453
6500
 
6454
- var reactIs_production_min = {};
6455
-
6456
- /** @license React v17.0.2
6457
- * react-is.production.min.js
6458
- *
6459
- * Copyright (c) Facebook, Inc. and its affiliates.
6460
- *
6461
- * This source code is licensed under the MIT license found in the
6462
- * LICENSE file in the root directory of this source tree.
6463
- */
6464
-
6465
- var hasRequiredReactIs_production_min;
6466
-
6467
- function requireReactIs_production_min () {
6468
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
6469
- hasRequiredReactIs_production_min = 1;
6470
- var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
6471
- if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
6472
- function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
6473
- reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
6474
- reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
6475
- reactIs_production_min.typeOf=y;
6476
- return reactIs_production_min;
6477
- }
6478
-
6479
6501
  var reactIs_development = {};
6480
6502
 
6481
6503
  /** @license React v17.0.2
@@ -6707,6 +6729,31 @@ function requireReactIs_development () {
6707
6729
  return reactIs_development;
6708
6730
  }
6709
6731
 
6732
+ var reactIs_production_min = {};
6733
+
6734
+ /** @license React v17.0.2
6735
+ * react-is.production.min.js
6736
+ *
6737
+ * Copyright (c) Facebook, Inc. and its affiliates.
6738
+ *
6739
+ * This source code is licensed under the MIT license found in the
6740
+ * LICENSE file in the root directory of this source tree.
6741
+ */
6742
+
6743
+ var hasRequiredReactIs_production_min;
6744
+
6745
+ function requireReactIs_production_min () {
6746
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
6747
+ hasRequiredReactIs_production_min = 1;
6748
+ var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
6749
+ if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
6750
+ function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
6751
+ reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
6752
+ reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
6753
+ reactIs_production_min.typeOf=y;
6754
+ return reactIs_production_min;
6755
+ }
6756
+
6710
6757
  if (process.env.NODE_ENV === 'production') {
6711
6758
  reactIs.exports = requireReactIs_production_min();
6712
6759
  } else {
@@ -6963,7 +7010,7 @@ ReactTestComponent.default = _default$2j;
6963
7010
  Object.defineProperty(build$1, '__esModule', {
6964
7011
  value: true
6965
7012
  });
6966
- build$1.default = build$1.DEFAULT_OPTIONS = void 0;
7013
+ var default_1 = build$1.default = DEFAULT_OPTIONS_1 = build$1.DEFAULT_OPTIONS = void 0;
6967
7014
  var format_1 = build$1.format = format;
6968
7015
  var plugins_1 = build$1.plugins = void 0;
6969
7016
 
@@ -7382,7 +7429,7 @@ const DEFAULT_OPTIONS = {
7382
7429
  printFunctionName: true,
7383
7430
  theme: DEFAULT_THEME
7384
7431
  };
7385
- build$1.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
7432
+ var DEFAULT_OPTIONS_1 = build$1.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
7386
7433
 
7387
7434
  function validateOptions(options) {
7388
7435
  Object.keys(options).forEach(key => {
@@ -7457,7 +7504,7 @@ const getEscapeString = options =>
7457
7504
  ? options.escapeString
7458
7505
  : DEFAULT_OPTIONS.escapeString;
7459
7506
 
7460
- const getConfig$1 = options => {
7507
+ const getConfig$4 = options => {
7461
7508
  var _options$printBasicPr;
7462
7509
 
7463
7510
  return {
@@ -7524,7 +7571,7 @@ function format(val, options) {
7524
7571
  const plugin = findPlugin(options.plugins, val);
7525
7572
 
7526
7573
  if (plugin !== null) {
7527
- return printPlugin(plugin, val, getConfig$1(options), '', 0, []);
7574
+ return printPlugin(plugin, val, getConfig$4(options), '', 0, []);
7528
7575
  }
7529
7576
  }
7530
7577
  }
@@ -7540,7 +7587,7 @@ function format(val, options) {
7540
7587
  return basicResult;
7541
7588
  }
7542
7589
 
7543
- return printComplexValue(val, getConfig$1(options), '', 0, []);
7590
+ return printComplexValue(val, getConfig$4(options), '', 0, []);
7544
7591
  }
7545
7592
 
7546
7593
  const plugins = {
@@ -7554,7 +7601,15 @@ const plugins = {
7554
7601
  };
7555
7602
  plugins_1 = build$1.plugins = plugins;
7556
7603
  var _default$2i = format;
7557
- build$1.default = _default$2i;
7604
+ default_1 = build$1.default = _default$2i;
7605
+
7606
+ var index = /*#__PURE__*/_mergeNamespaces({
7607
+ __proto__: null,
7608
+ get DEFAULT_OPTIONS () { return DEFAULT_OPTIONS_1; },
7609
+ get default () { return default_1; },
7610
+ format: format_1,
7611
+ get plugins () { return plugins_1; }
7612
+ }, [build$1]);
7558
7613
 
7559
7614
  /**
7560
7615
  * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}
@@ -14435,10 +14490,10 @@ var test = {
14435
14490
  foo: {}
14436
14491
  };
14437
14492
 
14438
- var $Object = Object;
14493
+ var $Object$1 = Object;
14439
14494
 
14440
14495
  var hasProto$1 = function hasProto() {
14441
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
14496
+ return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object$1);
14442
14497
  };
14443
14498
 
14444
14499
  /* eslint no-invalid-this: 1 */
@@ -14502,9 +14557,9 @@ var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
14502
14557
 
14503
14558
  var undefined$1;
14504
14559
 
14505
- var $SyntaxError = SyntaxError;
14560
+ var $SyntaxError$1 = SyntaxError;
14506
14561
  var $Function = Function;
14507
- var $TypeError$1 = TypeError;
14562
+ var $TypeError$4 = TypeError;
14508
14563
 
14509
14564
  // eslint-disable-next-line consistent-return
14510
14565
  var getEvalledConstructor = function (expressionSyntax) {
@@ -14523,7 +14578,7 @@ if ($gOPD$2) {
14523
14578
  }
14524
14579
 
14525
14580
  var throwTypeError = function () {
14526
- throw new $TypeError$1();
14581
+ throw new $TypeError$4();
14527
14582
  };
14528
14583
  var ThrowTypeError = $gOPD$2
14529
14584
  ? (function () {
@@ -14610,10 +14665,10 @@ var INTRINSICS = {
14610
14665
  '%String%': String,
14611
14666
  '%StringIteratorPrototype%': hasSymbols$4 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1,
14612
14667
  '%Symbol%': hasSymbols$4 ? Symbol : undefined$1,
14613
- '%SyntaxError%': $SyntaxError,
14668
+ '%SyntaxError%': $SyntaxError$1,
14614
14669
  '%ThrowTypeError%': ThrowTypeError,
14615
14670
  '%TypedArray%': TypedArray,
14616
- '%TypeError%': $TypeError$1,
14671
+ '%TypeError%': $TypeError$4,
14617
14672
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
14618
14673
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
14619
14674
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
@@ -14728,9 +14783,9 @@ var stringToPath = function stringToPath(string) {
14728
14783
  var first = $strSlice(string, 0, 1);
14729
14784
  var last = $strSlice(string, -1);
14730
14785
  if (first === '%' && last !== '%') {
14731
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
14786
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
14732
14787
  } else if (last === '%' && first !== '%') {
14733
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
14788
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
14734
14789
  }
14735
14790
  var result = [];
14736
14791
  $replace$1(string, rePropName, function (match, number, quote, subString) {
@@ -14754,7 +14809,7 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
14754
14809
  value = doEval(intrinsicName);
14755
14810
  }
14756
14811
  if (typeof value === 'undefined' && !allowMissing) {
14757
- throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
14812
+ throw new $TypeError$4('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
14758
14813
  }
14759
14814
 
14760
14815
  return {
@@ -14764,19 +14819,19 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
14764
14819
  };
14765
14820
  }
14766
14821
 
14767
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
14822
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
14768
14823
  };
14769
14824
 
14770
14825
  var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14771
14826
  if (typeof name !== 'string' || name.length === 0) {
14772
- throw new $TypeError$1('intrinsic name must be a non-empty string');
14827
+ throw new $TypeError$4('intrinsic name must be a non-empty string');
14773
14828
  }
14774
14829
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
14775
- throw new $TypeError$1('"allowMissing" argument must be a boolean');
14830
+ throw new $TypeError$4('"allowMissing" argument must be a boolean');
14776
14831
  }
14777
14832
 
14778
14833
  if ($exec$1(/^%?[^%]*%?$/, name) === null) {
14779
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
14834
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
14780
14835
  }
14781
14836
  var parts = stringToPath(name);
14782
14837
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
@@ -14803,7 +14858,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14803
14858
  )
14804
14859
  && first !== last
14805
14860
  ) {
14806
- throw new $SyntaxError('property names with quotes must have matching quotes');
14861
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
14807
14862
  }
14808
14863
  if (part === 'constructor' || !isOwn) {
14809
14864
  skipFurtherCaching = true;
@@ -14817,7 +14872,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14817
14872
  } else if (value != null) {
14818
14873
  if (!(part in value)) {
14819
14874
  if (!allowMissing) {
14820
- throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
14875
+ throw new $TypeError$4('base intrinsic for ' + name + ' exists, but the property is not available.');
14821
14876
  }
14822
14877
  return void undefined$1;
14823
14878
  }
@@ -14850,14 +14905,14 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14850
14905
  return value;
14851
14906
  };
14852
14907
 
14853
- var GetIntrinsic$6 = getIntrinsic;
14908
+ var GetIntrinsic$7 = getIntrinsic;
14854
14909
 
14855
- var $defineProperty = GetIntrinsic$6('%Object.defineProperty%', true);
14910
+ var $defineProperty$1 = GetIntrinsic$7('%Object.defineProperty%', true);
14856
14911
 
14857
14912
  var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
14858
- if ($defineProperty) {
14913
+ if ($defineProperty$1) {
14859
14914
  try {
14860
- $defineProperty({}, 'a', { value: 1 });
14915
+ $defineProperty$1({}, 'a', { value: 1 });
14861
14916
  return true;
14862
14917
  } catch (e) {
14863
14918
  // IE 8 has a broken defineProperty
@@ -14873,7 +14928,7 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
14873
14928
  return null;
14874
14929
  }
14875
14930
  try {
14876
- return $defineProperty([], 'length', { value: 1 }).length !== 1;
14931
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
14877
14932
  } catch (e) {
14878
14933
  // In Firefox 4-22, defining length on an array throws an exception.
14879
14934
  return true;
@@ -14882,20 +14937,92 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
14882
14937
 
14883
14938
  var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
14884
14939
 
14940
+ var GetIntrinsic$6 = getIntrinsic;
14941
+
14942
+ var $gOPD$1 = GetIntrinsic$6('%Object.getOwnPropertyDescriptor%', true);
14943
+
14944
+ if ($gOPD$1) {
14945
+ try {
14946
+ $gOPD$1([], 'length');
14947
+ } catch (e) {
14948
+ // IE 8 has a broken gOPD
14949
+ $gOPD$1 = null;
14950
+ }
14951
+ }
14952
+
14953
+ var gopd$1 = $gOPD$1;
14954
+
14955
+ var hasPropertyDescriptors = hasPropertyDescriptors_1();
14956
+
14957
+ var GetIntrinsic$5 = getIntrinsic;
14958
+
14959
+ var $defineProperty = hasPropertyDescriptors && GetIntrinsic$5('%Object.defineProperty%', true);
14960
+
14961
+ var $SyntaxError = GetIntrinsic$5('%SyntaxError%');
14962
+ var $TypeError$3 = GetIntrinsic$5('%TypeError%');
14963
+
14964
+ var gopd = gopd$1;
14965
+
14966
+ /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
14967
+ var defineDataProperty$1 = function defineDataProperty(
14968
+ obj,
14969
+ property,
14970
+ value
14971
+ ) {
14972
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
14973
+ throw new $TypeError$3('`obj` must be an object or a function`');
14974
+ }
14975
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
14976
+ throw new $TypeError$3('`property` must be a string or a symbol`');
14977
+ }
14978
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
14979
+ throw new $TypeError$3('`nonEnumerable`, if provided, must be a boolean or null');
14980
+ }
14981
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
14982
+ throw new $TypeError$3('`nonWritable`, if provided, must be a boolean or null');
14983
+ }
14984
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
14985
+ throw new $TypeError$3('`nonConfigurable`, if provided, must be a boolean or null');
14986
+ }
14987
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
14988
+ throw new $TypeError$3('`loose`, if provided, must be a boolean');
14989
+ }
14990
+
14991
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
14992
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
14993
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
14994
+ var loose = arguments.length > 6 ? arguments[6] : false;
14995
+
14996
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
14997
+ var desc = !!gopd && gopd(obj, property);
14998
+
14999
+ if ($defineProperty) {
15000
+ $defineProperty(obj, property, {
15001
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
15002
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
15003
+ value: value,
15004
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
15005
+ });
15006
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
15007
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
15008
+ obj[property] = value; // eslint-disable-line no-param-reassign
15009
+ } else {
15010
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
15011
+ }
15012
+ };
15013
+
14885
15014
  var keys$2 = objectKeys$2;
14886
15015
  var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
14887
15016
 
14888
15017
  var toStr$7 = Object.prototype.toString;
14889
15018
  var concat = Array.prototype.concat;
14890
- var origDefineProperty = Object.defineProperty;
15019
+ var defineDataProperty = defineDataProperty$1;
14891
15020
 
14892
15021
  var isFunction = function (fn) {
14893
15022
  return typeof fn === 'function' && toStr$7.call(fn) === '[object Function]';
14894
15023
  };
14895
15024
 
14896
- var hasPropertyDescriptors = hasPropertyDescriptors_1();
14897
-
14898
- var supportsDescriptors$2 = origDefineProperty && hasPropertyDescriptors;
15025
+ var supportsDescriptors$2 = hasPropertyDescriptors_1();
14899
15026
 
14900
15027
  var defineProperty$1 = function (object, name, value, predicate) {
14901
15028
  if (name in object) {
@@ -14907,15 +15034,11 @@ var defineProperty$1 = function (object, name, value, predicate) {
14907
15034
  return;
14908
15035
  }
14909
15036
  }
15037
+
14910
15038
  if (supportsDescriptors$2) {
14911
- origDefineProperty(object, name, {
14912
- configurable: true,
14913
- enumerable: false,
14914
- value: value,
14915
- writable: true
14916
- });
15039
+ defineDataProperty(object, name, value, true);
14917
15040
  } else {
14918
- object[name] = value; // eslint-disable-line no-param-reassign
15041
+ defineDataProperty(object, name, value);
14919
15042
  }
14920
15043
  };
14921
15044
 
@@ -14934,7 +15057,7 @@ defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
14934
15057
 
14935
15058
  var defineProperties_1 = defineProperties$1;
14936
15059
 
14937
- var callBind$5 = {exports: {}};
15060
+ var callBind$6 = {exports: {}};
14938
15061
 
14939
15062
  (function (module) {
14940
15063
 
@@ -14983,20 +15106,20 @@ var callBind$5 = {exports: {}};
14983
15106
  } else {
14984
15107
  module.exports.apply = applyBind;
14985
15108
  }
14986
- } (callBind$5));
15109
+ } (callBind$6));
14987
15110
 
14988
- var callBindExports = callBind$5.exports;
15111
+ var callBindExports = callBind$6.exports;
14989
15112
 
14990
- var GetIntrinsic$5 = getIntrinsic;
15113
+ var GetIntrinsic$4 = getIntrinsic;
14991
15114
 
14992
- var callBind$4 = callBindExports;
15115
+ var callBind$5 = callBindExports;
14993
15116
 
14994
- var $indexOf$1 = callBind$4(GetIntrinsic$5('String.prototype.indexOf'));
15117
+ var $indexOf$1 = callBind$5(GetIntrinsic$4('String.prototype.indexOf'));
14995
15118
 
14996
- var callBound$c = function callBoundIntrinsic(name, allowMissing) {
14997
- var intrinsic = GetIntrinsic$5(name, !!allowMissing);
15119
+ var callBound$b = function callBoundIntrinsic(name, allowMissing) {
15120
+ var intrinsic = GetIntrinsic$4(name, !!allowMissing);
14998
15121
  if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
14999
- return callBind$4(intrinsic);
15122
+ return callBind$5(intrinsic);
15000
15123
  }
15001
15124
  return intrinsic;
15002
15125
  };
@@ -15004,10 +15127,10 @@ var callBound$c = function callBoundIntrinsic(name, allowMissing) {
15004
15127
  // modified from https://github.com/es-shims/es6-shim
15005
15128
  var objectKeys$1 = objectKeys$2;
15006
15129
  var hasSymbols$2 = shams$1();
15007
- var callBound$b = callBound$c;
15130
+ var callBound$a = callBound$b;
15008
15131
  var toObject = Object;
15009
- var $push = callBound$b('Array.prototype.push');
15010
- var $propIsEnumerable = callBound$b('Object.prototype.propertyIsEnumerable');
15132
+ var $push = callBound$a('Array.prototype.push');
15133
+ var $propIsEnumerable = callBound$a('Object.prototype.propertyIsEnumerable');
15011
15134
  var originalGetSymbols = hasSymbols$2 ? Object.getOwnPropertySymbols : null;
15012
15135
 
15013
15136
  // eslint-disable-next-line no-unused-vars
@@ -15100,12 +15223,12 @@ var polyfill$4 = function getPolyfill() {
15100
15223
  return Object.assign;
15101
15224
  };
15102
15225
 
15103
- var define$3 = defineProperties_1;
15226
+ var define$4 = defineProperties_1;
15104
15227
  var getPolyfill$5 = polyfill$4;
15105
15228
 
15106
15229
  var shim$5 = function shimAssign() {
15107
15230
  var polyfill = getPolyfill$5();
15108
- define$3(
15231
+ define$4(
15109
15232
  Object,
15110
15233
  { assign: polyfill },
15111
15234
  { assign: function () { return Object.assign !== polyfill; } }
@@ -15114,13 +15237,13 @@ var shim$5 = function shimAssign() {
15114
15237
  };
15115
15238
 
15116
15239
  var defineProperties = defineProperties_1;
15117
- var callBind$3 = callBindExports;
15240
+ var callBind$4 = callBindExports;
15118
15241
 
15119
15242
  var implementation$6 = implementation$8;
15120
15243
  var getPolyfill$4 = polyfill$4;
15121
15244
  var shim$4 = shim$5;
15122
15245
 
15123
- var polyfill$3 = callBind$3.apply(getPolyfill$4());
15246
+ var polyfill$3 = callBind$4.apply(getPolyfill$4());
15124
15247
  // eslint-disable-next-line no-unused-vars
15125
15248
  var bound = function assign(target, source1) {
15126
15249
  return polyfill$3(Object, arguments);
@@ -15134,27 +15257,25 @@ defineProperties(bound, {
15134
15257
 
15135
15258
  var object_assign = bound;
15136
15259
 
15137
- var implementation$5 = {exports: {}};
15138
-
15139
15260
  var functionsHaveNames = function functionsHaveNames() {
15140
15261
  return typeof function f() {}.name === 'string';
15141
15262
  };
15142
15263
 
15143
- var gOPD$4 = Object.getOwnPropertyDescriptor;
15144
- if (gOPD$4) {
15264
+ var gOPD$3 = Object.getOwnPropertyDescriptor;
15265
+ if (gOPD$3) {
15145
15266
  try {
15146
- gOPD$4([], 'length');
15267
+ gOPD$3([], 'length');
15147
15268
  } catch (e) {
15148
15269
  // IE 8 has a broken gOPD
15149
- gOPD$4 = null;
15270
+ gOPD$3 = null;
15150
15271
  }
15151
15272
  }
15152
15273
 
15153
15274
  functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
15154
- if (!functionsHaveNames() || !gOPD$4) {
15275
+ if (!functionsHaveNames() || !gOPD$3) {
15155
15276
  return false;
15156
15277
  }
15157
- var desc = gOPD$4(function () {}, 'name');
15278
+ var desc = gOPD$3(function () {}, 'name');
15158
15279
  return !!desc && !!desc.configurable;
15159
15280
  };
15160
15281
 
@@ -15166,60 +15287,72 @@ functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames()
15166
15287
 
15167
15288
  var functionsHaveNames_1 = functionsHaveNames;
15168
15289
 
15169
- (function (module) {
15170
-
15171
- var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
15290
+ var define$3 = defineDataProperty$1;
15291
+ var hasDescriptors = hasPropertyDescriptors_1();
15292
+ var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
15172
15293
 
15173
- var $Object = Object;
15174
- var $TypeError = TypeError;
15294
+ var $TypeError$2 = TypeError;
15175
15295
 
15176
- module.exports = function flags() {
15177
- if (this != null && this !== $Object(this)) {
15178
- throw new $TypeError('RegExp.prototype.flags getter called on non-object');
15179
- }
15180
- var result = '';
15181
- if (this.hasIndices) {
15182
- result += 'd';
15183
- }
15184
- if (this.global) {
15185
- result += 'g';
15186
- }
15187
- if (this.ignoreCase) {
15188
- result += 'i';
15189
- }
15190
- if (this.multiline) {
15191
- result += 'm';
15192
- }
15193
- if (this.dotAll) {
15194
- result += 's';
15195
- }
15196
- if (this.unicode) {
15197
- result += 'u';
15198
- }
15199
- if (this.unicodeSets) {
15200
- result += 'v';
15201
- }
15202
- if (this.sticky) {
15203
- result += 'y';
15296
+ var setFunctionName$1 = function setFunctionName(fn, name) {
15297
+ if (typeof fn !== 'function') {
15298
+ throw new $TypeError$2('`fn` is not a function');
15299
+ }
15300
+ var loose = arguments.length > 2 && !!arguments[2];
15301
+ if (!loose || functionsHaveConfigurableNames) {
15302
+ if (hasDescriptors) {
15303
+ define$3(fn, 'name', name, true, true);
15304
+ } else {
15305
+ define$3(fn, 'name', name);
15204
15306
  }
15205
- return result;
15206
- };
15307
+ }
15308
+ return fn;
15309
+ };
15207
15310
 
15208
- if (functionsHaveConfigurableNames && Object.defineProperty) {
15209
- Object.defineProperty(module.exports, 'name', { value: 'get flags' });
15210
- }
15211
- } (implementation$5));
15311
+ var setFunctionName = setFunctionName$1;
15212
15312
 
15213
- var implementationExports = implementation$5.exports;
15313
+ var $Object = Object;
15314
+ var $TypeError$1 = TypeError;
15214
15315
 
15215
- var implementation$4 = implementationExports;
15316
+ var implementation$5 = setFunctionName(function flags() {
15317
+ if (this != null && this !== $Object(this)) {
15318
+ throw new $TypeError$1('RegExp.prototype.flags getter called on non-object');
15319
+ }
15320
+ var result = '';
15321
+ if (this.hasIndices) {
15322
+ result += 'd';
15323
+ }
15324
+ if (this.global) {
15325
+ result += 'g';
15326
+ }
15327
+ if (this.ignoreCase) {
15328
+ result += 'i';
15329
+ }
15330
+ if (this.multiline) {
15331
+ result += 'm';
15332
+ }
15333
+ if (this.dotAll) {
15334
+ result += 's';
15335
+ }
15336
+ if (this.unicode) {
15337
+ result += 'u';
15338
+ }
15339
+ if (this.unicodeSets) {
15340
+ result += 'v';
15341
+ }
15342
+ if (this.sticky) {
15343
+ result += 'y';
15344
+ }
15345
+ return result;
15346
+ }, 'get flags', true);
15347
+
15348
+ var implementation$4 = implementation$5;
15216
15349
 
15217
15350
  var supportsDescriptors$1 = defineProperties_1.supportsDescriptors;
15218
- var $gOPD$1 = Object.getOwnPropertyDescriptor;
15351
+ var $gOPD = Object.getOwnPropertyDescriptor;
15219
15352
 
15220
15353
  var polyfill$2 = function getPolyfill() {
15221
15354
  if (supportsDescriptors$1 && (/a/mig).flags === 'gim') {
15222
- var descriptor = $gOPD$1(RegExp.prototype, 'flags');
15355
+ var descriptor = $gOPD(RegExp.prototype, 'flags');
15223
15356
  if (
15224
15357
  descriptor
15225
15358
  && typeof descriptor.get === 'function'
@@ -15249,7 +15382,7 @@ var polyfill$2 = function getPolyfill() {
15249
15382
 
15250
15383
  var supportsDescriptors = defineProperties_1.supportsDescriptors;
15251
15384
  var getPolyfill$3 = polyfill$2;
15252
- var gOPD$3 = Object.getOwnPropertyDescriptor;
15385
+ var gOPD$2 = Object.getOwnPropertyDescriptor;
15253
15386
  var defineProperty = Object.defineProperty;
15254
15387
  var TypeErr = TypeError;
15255
15388
  var getProto = Object.getPrototypeOf;
@@ -15261,7 +15394,7 @@ var shim$3 = function shimFlags() {
15261
15394
  }
15262
15395
  var polyfill = getPolyfill$3();
15263
15396
  var proto = getProto(regex);
15264
- var descriptor = gOPD$3(proto, 'flags');
15397
+ var descriptor = gOPD$2(proto, 'flags');
15265
15398
  if (!descriptor || descriptor.get !== polyfill) {
15266
15399
  defineProperty(proto, 'flags', {
15267
15400
  configurable: true,
@@ -15273,13 +15406,13 @@ var shim$3 = function shimFlags() {
15273
15406
  };
15274
15407
 
15275
15408
  var define$2 = defineProperties_1;
15276
- var callBind$2 = callBindExports;
15409
+ var callBind$3 = callBindExports;
15277
15410
 
15278
- var implementation$3 = implementationExports;
15411
+ var implementation$3 = implementation$5;
15279
15412
  var getPolyfill$2 = polyfill$2;
15280
15413
  var shim$2 = shim$3;
15281
15414
 
15282
- var flagsBound = callBind$2(getPolyfill$2());
15415
+ var flagsBound = callBind$3(getPolyfill$2());
15283
15416
 
15284
15417
  define$2(flagsBound, {
15285
15418
  getPolyfill: getPolyfill$2,
@@ -15320,7 +15453,7 @@ var booleanValueOf = Boolean.prototype.valueOf;
15320
15453
  var objectToString = Object.prototype.toString;
15321
15454
  var functionToString = Function.prototype.toString;
15322
15455
  var $match = String.prototype.match;
15323
- var $slice$2 = String.prototype.slice;
15456
+ var $slice$1 = String.prototype.slice;
15324
15457
  var $replace = String.prototype.replace;
15325
15458
  var $toUpperCase = String.prototype.toUpperCase;
15326
15459
  var $toLowerCase = String.prototype.toLowerCase;
@@ -15362,7 +15495,7 @@ function addNumericSeparator(num, str) {
15362
15495
  var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
15363
15496
  if (int !== num) {
15364
15497
  var intStr = String(int);
15365
- var dec = $slice$2.call(str, intStr.length + 1);
15498
+ var dec = $slice$1.call(str, intStr.length + 1);
15366
15499
  return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
15367
15500
  }
15368
15501
  }
@@ -15547,7 +15680,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
15547
15680
  var ys = arrObjKeys(obj, inspect);
15548
15681
  var isPlainObject = gPO$1 ? gPO$1(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
15549
15682
  var protoTag = obj instanceof Object ? '' : 'null prototype';
15550
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice$2.call(toStr$6(obj), 8, -1) : protoTag ? 'Object' : '';
15683
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice$1.call(toStr$6(obj), 8, -1) : protoTag ? 'Object' : '';
15551
15684
  var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
15552
15685
  var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
15553
15686
  if (ys.length === 0) { return tag + '{}'; }
@@ -15716,7 +15849,7 @@ function inspectString(str, opts) {
15716
15849
  if (str.length > opts.maxStringLength) {
15717
15850
  var remaining = str.length - opts.maxStringLength;
15718
15851
  var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
15719
- return inspectString($slice$2.call(str, 0, opts.maxStringLength), opts) + trailer;
15852
+ return inspectString($slice$1.call(str, 0, opts.maxStringLength), opts) + trailer;
15720
15853
  }
15721
15854
  // eslint-disable-next-line no-control-regex
15722
15855
  var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
@@ -15819,20 +15952,20 @@ function arrObjKeys(obj, inspect) {
15819
15952
  return xs;
15820
15953
  }
15821
15954
 
15822
- var GetIntrinsic$4 = getIntrinsic;
15823
- var callBound$a = callBound$c;
15955
+ var GetIntrinsic$3 = getIntrinsic;
15956
+ var callBound$9 = callBound$b;
15824
15957
  var inspect = objectInspect;
15825
15958
 
15826
- var $TypeError = GetIntrinsic$4('%TypeError%');
15827
- var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
15828
- var $Map$2 = GetIntrinsic$4('%Map%', true);
15959
+ var $TypeError = GetIntrinsic$3('%TypeError%');
15960
+ var $WeakMap$1 = GetIntrinsic$3('%WeakMap%', true);
15961
+ var $Map$2 = GetIntrinsic$3('%Map%', true);
15829
15962
 
15830
- var $weakMapGet = callBound$a('WeakMap.prototype.get', true);
15831
- var $weakMapSet = callBound$a('WeakMap.prototype.set', true);
15832
- var $weakMapHas = callBound$a('WeakMap.prototype.has', true);
15833
- var $mapGet$1 = callBound$a('Map.prototype.get', true);
15834
- var $mapSet = callBound$a('Map.prototype.set', true);
15835
- var $mapHas$5 = callBound$a('Map.prototype.has', true);
15963
+ var $weakMapGet = callBound$9('WeakMap.prototype.get', true);
15964
+ var $weakMapSet = callBound$9('WeakMap.prototype.set', true);
15965
+ var $weakMapHas = callBound$9('WeakMap.prototype.has', true);
15966
+ var $mapGet$1 = callBound$9('Map.prototype.get', true);
15967
+ var $mapSet = callBound$9('Map.prototype.set', true);
15968
+ var $mapHas$5 = callBound$9('Map.prototype.has', true);
15836
15969
 
15837
15970
  /*
15838
15971
  * This function traverses the list returning the node corresponding to the
@@ -15979,13 +16112,13 @@ var shim$1 = function shimObjectIs() {
15979
16112
  };
15980
16113
 
15981
16114
  var define = defineProperties_1;
15982
- var callBind$1 = callBindExports;
16115
+ var callBind$2 = callBindExports;
15983
16116
 
15984
16117
  var implementation = implementation$2;
15985
16118
  var getPolyfill = polyfill$1;
15986
16119
  var shim = shim$1;
15987
16120
 
15988
- var polyfill = callBind$1(getPolyfill(), Object);
16121
+ var polyfill = callBind$2(getPolyfill(), Object);
15989
16122
 
15990
16123
  define(polyfill, {
15991
16124
  getPolyfill: getPolyfill,
@@ -16001,16 +16134,16 @@ var shams = function hasToStringTagShams() {
16001
16134
  return hasSymbols$1() && !!Symbol.toStringTag;
16002
16135
  };
16003
16136
 
16004
- var hasToStringTag$8 = shams();
16005
- var callBound$9 = callBound$c;
16137
+ var hasToStringTag$7 = shams();
16138
+ var callBound$8 = callBound$b;
16006
16139
 
16007
- var $toString$4 = callBound$9('Object.prototype.toString');
16140
+ var $toString$3 = callBound$8('Object.prototype.toString');
16008
16141
 
16009
16142
  var isStandardArguments = function isArguments(value) {
16010
- if (hasToStringTag$8 && value && typeof value === 'object' && Symbol.toStringTag in value) {
16143
+ if (hasToStringTag$7 && value && typeof value === 'object' && Symbol.toStringTag in value) {
16011
16144
  return false;
16012
16145
  }
16013
- return $toString$4(value) === '[object Arguments]';
16146
+ return $toString$3(value) === '[object Arguments]';
16014
16147
  };
16015
16148
 
16016
16149
  var isLegacyArguments = function isArguments(value) {
@@ -16021,8 +16154,8 @@ var isLegacyArguments = function isArguments(value) {
16021
16154
  typeof value === 'object' &&
16022
16155
  typeof value.length === 'number' &&
16023
16156
  value.length >= 0 &&
16024
- $toString$4(value) !== '[object Array]' &&
16025
- $toString$4(value.callee) === '[object Function]';
16157
+ $toString$3(value) !== '[object Array]' &&
16158
+ $toString$3(value.callee) === '[object Function]';
16026
16159
  };
16027
16160
 
16028
16161
  var supportsStandardArguments = (function () {
@@ -16088,7 +16221,7 @@ var genClass = '[object GeneratorFunction]';
16088
16221
  var ddaClass = '[object HTMLAllCollection]'; // IE 11
16089
16222
  var ddaClass2 = '[object HTML document.all class]';
16090
16223
  var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
16091
- var hasToStringTag$7 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
16224
+ var hasToStringTag$6 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
16092
16225
 
16093
16226
  var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing
16094
16227
 
@@ -16132,7 +16265,7 @@ var isCallable$1 = reflectApply
16132
16265
  if (isDDA(value)) { return true; }
16133
16266
  if (!value) { return false; }
16134
16267
  if (typeof value !== 'function' && typeof value !== 'object') { return false; }
16135
- if (hasToStringTag$7) { return tryFunctionObject(value); }
16268
+ if (hasToStringTag$6) { return tryFunctionObject(value); }
16136
16269
  if (isES6ClassFn(value)) { return false; }
16137
16270
  var strClass = toStr$5.call(value);
16138
16271
  if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; }
@@ -16179,7 +16312,7 @@ var forEachObject = function forEachObject(object, iterator, receiver) {
16179
16312
  }
16180
16313
  };
16181
16314
 
16182
- var forEach$2 = function forEach(list, iterator, thisArg) {
16315
+ var forEach$1 = function forEach(list, iterator, thisArg) {
16183
16316
  if (!isCallable(iterator)) {
16184
16317
  throw new TypeError('iterator must be a function');
16185
16318
  }
@@ -16198,7 +16331,7 @@ var forEach$2 = function forEach(list, iterator, thisArg) {
16198
16331
  }
16199
16332
  };
16200
16333
 
16201
- var forEach_1 = forEach$2;
16334
+ var forEach_1 = forEach$1;
16202
16335
 
16203
16336
  var possibleNames = [
16204
16337
  'BigInt64Array',
@@ -16216,7 +16349,7 @@ var possibleNames = [
16216
16349
 
16217
16350
  var g$2 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16218
16351
 
16219
- var availableTypedArrays$2 = function availableTypedArrays() {
16352
+ var availableTypedArrays$1 = function availableTypedArrays() {
16220
16353
  var out = [];
16221
16354
  for (var i = 0; i < possibleNames.length; i++) {
16222
16355
  if (typeof g$2[possibleNames[i]] === 'function') {
@@ -16226,33 +16359,22 @@ var availableTypedArrays$2 = function availableTypedArrays() {
16226
16359
  return out;
16227
16360
  };
16228
16361
 
16229
- var GetIntrinsic$3 = getIntrinsic;
16230
-
16231
- var $gOPD = GetIntrinsic$3('%Object.getOwnPropertyDescriptor%', true);
16232
-
16233
- if ($gOPD) {
16234
- try {
16235
- $gOPD([], 'length');
16236
- } catch (e) {
16237
- // IE 8 has a broken gOPD
16238
- $gOPD = null;
16239
- }
16240
- }
16241
-
16242
- var gopd = $gOPD;
16243
-
16244
- var forEach$1 = forEach_1;
16245
- var availableTypedArrays$1 = availableTypedArrays$2;
16246
- var callBound$8 = callBound$c;
16362
+ var forEach = forEach_1;
16363
+ var availableTypedArrays = availableTypedArrays$1;
16364
+ var callBind$1 = callBindExports;
16365
+ var callBound$7 = callBound$b;
16366
+ var gOPD$1 = gopd$1;
16247
16367
 
16248
- var $toString$3 = callBound$8('Object.prototype.toString');
16249
- var hasToStringTag$6 = shams();
16250
- var gOPD$2 = gopd;
16368
+ var $toString$2 = callBound$7('Object.prototype.toString');
16369
+ var hasToStringTag$5 = shams();
16251
16370
 
16252
16371
  var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16253
- var typedArrays$1 = availableTypedArrays$1();
16372
+ var typedArrays = availableTypedArrays();
16373
+
16374
+ var $slice = callBound$7('String.prototype.slice');
16375
+ var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
16254
16376
 
16255
- var $indexOf = callBound$8('Array.prototype.indexOf', true) || function indexOf(array, value) {
16377
+ var $indexOf = callBound$7('Array.prototype.indexOf', true) || function indexOf(array, value) {
16256
16378
  for (var i = 0; i < array.length; i += 1) {
16257
16379
  if (array[i] === value) {
16258
16380
  return i;
@@ -16260,54 +16382,85 @@ var $indexOf = callBound$8('Array.prototype.indexOf', true) || function indexOf(
16260
16382
  }
16261
16383
  return -1;
16262
16384
  };
16263
- var $slice$1 = callBound$8('String.prototype.slice');
16264
- var toStrTags$1 = {};
16265
- var getPrototypeOf$1 = Object.getPrototypeOf; // require('getprototypeof');
16266
- if (hasToStringTag$6 && gOPD$2 && getPrototypeOf$1) {
16267
- forEach$1(typedArrays$1, function (typedArray) {
16385
+ var cache = { __proto__: null };
16386
+ if (hasToStringTag$5 && gOPD$1 && getPrototypeOf) {
16387
+ forEach(typedArrays, function (typedArray) {
16268
16388
  var arr = new g$1[typedArray]();
16269
16389
  if (Symbol.toStringTag in arr) {
16270
- var proto = getPrototypeOf$1(arr);
16271
- var descriptor = gOPD$2(proto, Symbol.toStringTag);
16390
+ var proto = getPrototypeOf(arr);
16391
+ var descriptor = gOPD$1(proto, Symbol.toStringTag);
16272
16392
  if (!descriptor) {
16273
- var superProto = getPrototypeOf$1(proto);
16274
- descriptor = gOPD$2(superProto, Symbol.toStringTag);
16393
+ var superProto = getPrototypeOf(proto);
16394
+ descriptor = gOPD$1(superProto, Symbol.toStringTag);
16275
16395
  }
16276
- toStrTags$1[typedArray] = descriptor.get;
16396
+ cache['$' + typedArray] = callBind$1(descriptor.get);
16277
16397
  }
16278
16398
  });
16399
+ } else {
16400
+ forEach(typedArrays, function (typedArray) {
16401
+ var arr = new g$1[typedArray]();
16402
+ cache['$' + typedArray] = callBind$1(arr.slice);
16403
+ });
16279
16404
  }
16280
16405
 
16281
- var tryTypedArrays$1 = function tryAllTypedArrays(value) {
16282
- var anyTrue = false;
16283
- forEach$1(toStrTags$1, function (getter, typedArray) {
16284
- if (!anyTrue) {
16406
+ var tryTypedArrays = function tryAllTypedArrays(value) {
16407
+ var found = false;
16408
+ forEach(cache, function (getter, typedArray) {
16409
+ if (!found) {
16285
16410
  try {
16286
- anyTrue = getter.call(value) === typedArray;
16411
+ if ('$' + getter(value) === typedArray) {
16412
+ found = $slice(typedArray, 1);
16413
+ }
16287
16414
  } catch (e) { /**/ }
16288
16415
  }
16289
16416
  });
16290
- return anyTrue;
16417
+ return found;
16291
16418
  };
16292
16419
 
16293
- var isTypedArray$2 = function isTypedArray(value) {
16420
+ var trySlices = function tryAllSlices(value) {
16421
+ var found = false;
16422
+ forEach(cache, function (getter, name) {
16423
+ if (!found) {
16424
+ try {
16425
+ getter(value);
16426
+ found = $slice(name, 1);
16427
+ } catch (e) { /**/ }
16428
+ }
16429
+ });
16430
+ return found;
16431
+ };
16432
+
16433
+ var whichTypedArray$2 = function whichTypedArray(value) {
16294
16434
  if (!value || typeof value !== 'object') { return false; }
16295
- if (!hasToStringTag$6 || !(Symbol.toStringTag in value)) {
16296
- var tag = $slice$1($toString$3(value), 8, -1);
16297
- return $indexOf(typedArrays$1, tag) > -1;
16435
+ if (!hasToStringTag$5) {
16436
+ var tag = $slice($toString$2(value), 8, -1);
16437
+ if ($indexOf(typedArrays, tag) > -1) {
16438
+ return tag;
16439
+ }
16440
+ if (tag !== 'Object') {
16441
+ return false;
16442
+ }
16443
+ // node < 0.6 hits here on real Typed Arrays
16444
+ return trySlices(value);
16298
16445
  }
16299
- if (!gOPD$2) { return false; }
16300
- return tryTypedArrays$1(value);
16446
+ if (!gOPD$1) { return null; } // unknown engine
16447
+ return tryTypedArrays(value);
16448
+ };
16449
+
16450
+ var whichTypedArray$1 = whichTypedArray$2;
16451
+
16452
+ var isTypedArray$1 = function isTypedArray(value) {
16453
+ return !!whichTypedArray$1(value);
16301
16454
  };
16302
16455
 
16303
16456
  var callBind = callBindExports;
16304
- var callBound$7 = callBound$c;
16457
+ var callBound$6 = callBound$b;
16305
16458
  var GetIntrinsic$2 = getIntrinsic;
16306
- var isTypedArray$1 = isTypedArray$2;
16459
+ var isTypedArray = isTypedArray$1;
16307
16460
 
16308
16461
  var $ArrayBuffer = GetIntrinsic$2('ArrayBuffer', true);
16309
16462
  var $Float32Array = GetIntrinsic$2('Float32Array', true);
16310
- var $byteLength$2 = callBound$7('ArrayBuffer.prototype.byteLength', true);
16463
+ var $byteLength$2 = callBound$6('ArrayBuffer.prototype.byteLength', true);
16311
16464
 
16312
16465
  // in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method
16313
16466
  var abSlice = $ArrayBuffer && !$byteLength$2 && new $ArrayBuffer().slice;
@@ -16333,7 +16486,7 @@ var isArrayBuffer$2 = $byteLength$2 || $abSlice
16333
16486
  // in node 0.8, ArrayBuffers have no prototype or own methods
16334
16487
  ? function IsArrayBuffer(obj) {
16335
16488
  try {
16336
- return (new $Float32Array(obj)).buffer === obj && !isTypedArray$1(obj);
16489
+ return (new $Float32Array(obj)).buffer === obj && !isTypedArray(obj);
16337
16490
  } catch (e) {
16338
16491
  return typeof obj === 'object' && e.name === 'RangeError';
16339
16492
  }
@@ -16354,25 +16507,25 @@ var tryDateObject = function tryDateGetDayCall(value) {
16354
16507
 
16355
16508
  var toStr$3 = Object.prototype.toString;
16356
16509
  var dateClass = '[object Date]';
16357
- var hasToStringTag$5 = shams();
16510
+ var hasToStringTag$4 = shams();
16358
16511
 
16359
16512
  var isDateObject = function isDateObject(value) {
16360
16513
  if (typeof value !== 'object' || value === null) {
16361
16514
  return false;
16362
16515
  }
16363
- return hasToStringTag$5 ? tryDateObject(value) : toStr$3.call(value) === dateClass;
16516
+ return hasToStringTag$4 ? tryDateObject(value) : toStr$3.call(value) === dateClass;
16364
16517
  };
16365
16518
 
16366
- var callBound$6 = callBound$c;
16367
- var hasToStringTag$4 = shams();
16519
+ var callBound$5 = callBound$b;
16520
+ var hasToStringTag$3 = shams();
16368
16521
  var has;
16369
16522
  var $exec;
16370
16523
  var isRegexMarker;
16371
16524
  var badStringifier;
16372
16525
 
16373
- if (hasToStringTag$4) {
16374
- has = callBound$6('Object.prototype.hasOwnProperty');
16375
- $exec = callBound$6('RegExp.prototype.exec');
16526
+ if (hasToStringTag$3) {
16527
+ has = callBound$5('Object.prototype.hasOwnProperty');
16528
+ $exec = callBound$5('RegExp.prototype.exec');
16376
16529
  isRegexMarker = {};
16377
16530
 
16378
16531
  var throwRegexMarker = function () {
@@ -16388,18 +16541,18 @@ if (hasToStringTag$4) {
16388
16541
  }
16389
16542
  }
16390
16543
 
16391
- var $toString$2 = callBound$6('Object.prototype.toString');
16392
- var gOPD$1 = Object.getOwnPropertyDescriptor;
16544
+ var $toString$1 = callBound$5('Object.prototype.toString');
16545
+ var gOPD = Object.getOwnPropertyDescriptor;
16393
16546
  var regexClass = '[object RegExp]';
16394
16547
 
16395
- var isRegex$1 = hasToStringTag$4
16548
+ var isRegex$1 = hasToStringTag$3
16396
16549
  // eslint-disable-next-line consistent-return
16397
16550
  ? function isRegex(value) {
16398
16551
  if (!value || typeof value !== 'object') {
16399
16552
  return false;
16400
16553
  }
16401
16554
 
16402
- var descriptor = gOPD$1(value, 'lastIndex');
16555
+ var descriptor = gOPD(value, 'lastIndex');
16403
16556
  var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
16404
16557
  if (!hasLastIndexDataProperty) {
16405
16558
  return false;
@@ -16417,12 +16570,12 @@ var isRegex$1 = hasToStringTag$4
16417
16570
  return false;
16418
16571
  }
16419
16572
 
16420
- return $toString$2(value) === regexClass;
16573
+ return $toString$1(value) === regexClass;
16421
16574
  };
16422
16575
 
16423
- var callBound$5 = callBound$c;
16576
+ var callBound$4 = callBound$b;
16424
16577
 
16425
- var $byteLength$1 = callBound$5('SharedArrayBuffer.prototype.byteLength', true);
16578
+ var $byteLength$1 = callBound$4('SharedArrayBuffer.prototype.byteLength', true);
16426
16579
 
16427
16580
  var isSharedArrayBuffer$1 = $byteLength$1
16428
16581
  ? function isSharedArrayBuffer(obj) {
@@ -16451,7 +16604,7 @@ var tryStringObject = function tryStringObject(value) {
16451
16604
  };
16452
16605
  var toStr$2 = Object.prototype.toString;
16453
16606
  var strClass = '[object String]';
16454
- var hasToStringTag$3 = shams();
16607
+ var hasToStringTag$2 = shams();
16455
16608
 
16456
16609
  var isString$1 = function isString(value) {
16457
16610
  if (typeof value === 'string') {
@@ -16460,7 +16613,7 @@ var isString$1 = function isString(value) {
16460
16613
  if (typeof value !== 'object') {
16461
16614
  return false;
16462
16615
  }
16463
- return hasToStringTag$3 ? tryStringObject(value) : toStr$2.call(value) === strClass;
16616
+ return hasToStringTag$2 ? tryStringObject(value) : toStr$2.call(value) === strClass;
16464
16617
  };
16465
16618
 
16466
16619
  var numToStr = Number.prototype.toString;
@@ -16474,7 +16627,7 @@ var tryNumberObject = function tryNumberObject(value) {
16474
16627
  };
16475
16628
  var toStr$1 = Object.prototype.toString;
16476
16629
  var numClass = '[object Number]';
16477
- var hasToStringTag$2 = shams();
16630
+ var hasToStringTag$1 = shams();
16478
16631
 
16479
16632
  var isNumberObject = function isNumberObject(value) {
16480
16633
  if (typeof value === 'number') {
@@ -16483,12 +16636,12 @@ var isNumberObject = function isNumberObject(value) {
16483
16636
  if (typeof value !== 'object') {
16484
16637
  return false;
16485
16638
  }
16486
- return hasToStringTag$2 ? tryNumberObject(value) : toStr$1.call(value) === numClass;
16639
+ return hasToStringTag$1 ? tryNumberObject(value) : toStr$1.call(value) === numClass;
16487
16640
  };
16488
16641
 
16489
- var callBound$4 = callBound$c;
16490
- var $boolToStr = callBound$4('Boolean.prototype.toString');
16491
- var $toString$1 = callBound$4('Object.prototype.toString');
16642
+ var callBound$3 = callBound$b;
16643
+ var $boolToStr = callBound$3('Boolean.prototype.toString');
16644
+ var $toString = callBound$3('Object.prototype.toString');
16492
16645
 
16493
16646
  var tryBooleanObject = function booleanBrandCheck(value) {
16494
16647
  try {
@@ -16499,7 +16652,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
16499
16652
  }
16500
16653
  };
16501
16654
  var boolClass = '[object Boolean]';
16502
- var hasToStringTag$1 = shams();
16655
+ var hasToStringTag = shams();
16503
16656
 
16504
16657
  var isBooleanObject = function isBoolean(value) {
16505
16658
  if (typeof value === 'boolean') {
@@ -16508,7 +16661,7 @@ var isBooleanObject = function isBoolean(value) {
16508
16661
  if (value === null || typeof value !== 'object') {
16509
16662
  return false;
16510
16663
  }
16511
- return hasToStringTag$1 && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString$1(value) === boolClass;
16664
+ return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
16512
16665
  };
16513
16666
 
16514
16667
  var isSymbol$1 = {exports: {}};
@@ -16754,14 +16907,14 @@ var isWeakmap = exported || function isWeakMap(x) {
16754
16907
  var isWeakset = {exports: {}};
16755
16908
 
16756
16909
  var GetIntrinsic$1 = getIntrinsic;
16757
- var callBound$3 = callBound$c;
16910
+ var callBound$2 = callBound$b;
16758
16911
 
16759
16912
  var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
16760
16913
 
16761
- var $setHas$1 = callBound$3('WeakSet.prototype.has', true);
16914
+ var $setHas$1 = callBound$2('WeakSet.prototype.has', true);
16762
16915
 
16763
16916
  if ($setHas$1) {
16764
- var $mapHas$1 = callBound$3('WeakMap.prototype.has', true);
16917
+ var $mapHas$1 = callBound$2('WeakMap.prototype.has', true);
16765
16918
 
16766
16919
  isWeakset.exports = function isWeakSet(x) {
16767
16920
  if (!x || typeof x !== 'object') {
@@ -16813,61 +16966,7 @@ var whichCollection$1 = function whichCollection(value) {
16813
16966
  return false;
16814
16967
  };
16815
16968
 
16816
- var forEach = forEach_1;
16817
- var availableTypedArrays = availableTypedArrays$2;
16818
- var callBound$2 = callBound$c;
16819
- var gOPD = gopd;
16820
-
16821
- var $toString = callBound$2('Object.prototype.toString');
16822
- var hasToStringTag = shams();
16823
-
16824
- var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16825
- var typedArrays = availableTypedArrays();
16826
-
16827
- var $slice = callBound$2('String.prototype.slice');
16828
- var toStrTags = {};
16829
- var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
16830
- if (hasToStringTag && gOPD && getPrototypeOf) {
16831
- forEach(typedArrays, function (typedArray) {
16832
- if (typeof g[typedArray] === 'function') {
16833
- var arr = new g[typedArray]();
16834
- if (Symbol.toStringTag in arr) {
16835
- var proto = getPrototypeOf(arr);
16836
- var descriptor = gOPD(proto, Symbol.toStringTag);
16837
- if (!descriptor) {
16838
- var superProto = getPrototypeOf(proto);
16839
- descriptor = gOPD(superProto, Symbol.toStringTag);
16840
- }
16841
- toStrTags[typedArray] = descriptor.get;
16842
- }
16843
- }
16844
- });
16845
- }
16846
-
16847
- var tryTypedArrays = function tryAllTypedArrays(value) {
16848
- var foundName = false;
16849
- forEach(toStrTags, function (getter, typedArray) {
16850
- if (!foundName) {
16851
- try {
16852
- var name = getter.call(value);
16853
- if (name === typedArray) {
16854
- foundName = name;
16855
- }
16856
- } catch (e) {}
16857
- }
16858
- });
16859
- return foundName;
16860
- };
16861
-
16862
- var isTypedArray = isTypedArray$2;
16863
-
16864
- var whichTypedArray$1 = function whichTypedArray(value) {
16865
- if (!isTypedArray(value)) { return false; }
16866
- if (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }
16867
- return tryTypedArrays(value);
16868
- };
16869
-
16870
- var callBound$1 = callBound$c;
16969
+ var callBound$1 = callBound$b;
16871
16970
  var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
16872
16971
 
16873
16972
  var isArrayBuffer$1 = isArrayBuffer$2;
@@ -16880,7 +16979,7 @@ var arrayBufferByteLength = function byteLength(ab) {
16880
16979
  }; // in node < 0.11, byteLength is an own nonconfigurable property
16881
16980
 
16882
16981
  var assign = object_assign;
16883
- var callBound = callBound$c;
16982
+ var callBound = callBound$b;
16884
16983
  var flags = regexp_prototype_flags;
16885
16984
  var GetIntrinsic = getIntrinsic;
16886
16985
  var getIterator = node;
@@ -16895,7 +16994,7 @@ var isSharedArrayBuffer = isSharedArrayBuffer$1;
16895
16994
  var objectKeys = objectKeys$2;
16896
16995
  var whichBoxedPrimitive = whichBoxedPrimitive$1;
16897
16996
  var whichCollection = whichCollection$1;
16898
- var whichTypedArray = whichTypedArray$1;
16997
+ var whichTypedArray = whichTypedArray$2;
16899
16998
  var byteLength = arrayBufferByteLength;
16900
16999
 
16901
17000
  var sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
@@ -18082,7 +18181,7 @@ function createDOMElementFilter(filterNode) {
18082
18181
  return {
18083
18182
  test: val => {
18084
18183
  var _val$constructor2;
18085
- return (val == null ? void 0 : (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
18184
+ return (val == null || (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
18086
18185
  },
18087
18186
  serialize: (node, config, indentation, depth, refs, printer) => {
18088
18187
  if (nodeIsText(node)) {
@@ -18178,7 +18277,7 @@ function getDocument$2() {
18178
18277
  }
18179
18278
  return window.document;
18180
18279
  }
18181
- function getWindowFromNode$1(node) {
18280
+ function getWindowFromNode$2(node) {
18182
18281
  if (node.defaultView) {
18183
18282
  // node is document
18184
18283
  return node.defaultView;
@@ -18216,8 +18315,8 @@ function checkContainerType$1(container) {
18216
18315
  const shouldHighlight = () => {
18217
18316
  let colors;
18218
18317
  try {
18219
- var _process, _process$env;
18220
- colors = JSON.parse((_process = process) == null ? void 0 : (_process$env = _process.env) == null ? void 0 : _process$env.COLORS);
18318
+ var _process;
18319
+ colors = JSON.parse((_process = process) == null || (_process = _process.env) == null ? void 0 : _process.COLORS);
18221
18320
  } catch (e) {
18222
18321
  // If this throws, process?.env?.COLORS wasn't parsable. Since we only
18223
18322
  // care about `true` or `false`, we can safely ignore the error.
@@ -18240,7 +18339,7 @@ const COMMENT_NODE = 8;
18240
18339
 
18241
18340
  // https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L50
18242
18341
  function filterCommentsAndDefaultIgnoreTagsTags(value) {
18243
- return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig().defaultIgnore));
18342
+ return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig$3().defaultIgnore));
18244
18343
  }
18245
18344
  function prettyDOM(dom, maxLength, options) {
18246
18345
  if (options === void 0) {
@@ -18344,7 +18443,7 @@ function configure(newConfig) {
18344
18443
  ...newConfig
18345
18444
  };
18346
18445
  }
18347
- function getConfig() {
18446
+ function getConfig$3() {
18348
18447
  return config;
18349
18448
  }
18350
18449
 
@@ -18681,12 +18780,12 @@ function prettyRoles(dom, _ref6) {
18681
18780
  const delimiterBar = '-'.repeat(50);
18682
18781
  const elementsString = elements.map(el => {
18683
18782
  const nameString = "Name \"" + computeAccessibleName(el, {
18684
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
18783
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18685
18784
  }) + "\":\n";
18686
18785
  const domString = prettyDOM(el.cloneNode(false));
18687
18786
  if (includeDescription) {
18688
18787
  const descriptionString = "Description \"" + computeAccessibleDescription(el, {
18689
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
18788
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18690
18789
  }) + "\":\n";
18691
18790
  return "" + nameString + descriptionString + domString;
18692
18791
  }
@@ -18695,6 +18794,14 @@ function prettyRoles(dom, _ref6) {
18695
18794
  return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;
18696
18795
  }).join('\n');
18697
18796
  }
18797
+ const logRoles = function (dom, _temp2) {
18798
+ let {
18799
+ hidden = false
18800
+ } = _temp2 === void 0 ? {} : _temp2;
18801
+ return console.log(prettyRoles(dom, {
18802
+ hidden
18803
+ }));
18804
+ };
18698
18805
 
18699
18806
  /**
18700
18807
  * @param {Element} element -
@@ -18890,7 +18997,7 @@ function getSuggestedQuery(element, variant, method) {
18890
18997
  variant = 'get';
18891
18998
  }
18892
18999
  // don't create suggestions for script and style elements
18893
- if (element.matches(getConfig().defaultIgnore)) {
19000
+ if (element.matches(getConfig$3().defaultIgnore)) {
18894
19001
  return undefined;
18895
19002
  }
18896
19003
 
@@ -18900,7 +19007,7 @@ function getSuggestedQuery(element, variant, method) {
18900
19007
  return makeSuggestion('Role', element, role, {
18901
19008
  variant,
18902
19009
  name: computeAccessibleName(element, {
18903
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19010
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18904
19011
  })
18905
19012
  });
18906
19013
  }
@@ -18939,7 +19046,7 @@ function getSuggestedQuery(element, variant, method) {
18939
19046
  variant
18940
19047
  });
18941
19048
  }
18942
- const testId = element.getAttribute(getConfig().testIdAttribute);
19049
+ const testId = element.getAttribute(getConfig$3().testIdAttribute);
18943
19050
  if (canSuggest('TestId', method, testId)) {
18944
19051
  return makeSuggestion('TestId', element, testId, {
18945
19052
  variant
@@ -18956,12 +19063,14 @@ function copyStackTrace(target, source) {
18956
19063
  function waitFor(callback, _ref) {
18957
19064
  let {
18958
19065
  container = getDocument$2(),
18959
- timeout = getConfig().asyncUtilTimeout,
18960
- showOriginalStackTrace = getConfig().showOriginalStackTrace,
19066
+ timeout = getConfig$3().asyncUtilTimeout,
19067
+ showOriginalStackTrace = getConfig$3().showOriginalStackTrace,
18961
19068
  stackTraceError,
18962
19069
  interval = 50,
18963
19070
  onTimeout = error => {
18964
- error.message = getConfig().getElementError(error.message, container).message;
19071
+ Object.defineProperty(error, 'message', {
19072
+ value: getConfig$3().getElementError(error.message, container).message
19073
+ });
18965
19074
  return error;
18966
19075
  },
18967
19076
  mutationObserverOptions = {
@@ -18983,7 +19092,7 @@ function waitFor(callback, _ref) {
18983
19092
  if (usingJestFakeTimers) {
18984
19093
  const {
18985
19094
  unstable_advanceTimersWrapper: advanceTimersWrapper
18986
- } = getConfig();
19095
+ } = getConfig$3();
18987
19096
  checkCallback();
18988
19097
  // this is a dangerous rule to disable because it could lead to an
18989
19098
  // infinite loop. However, eslint isn't smart enough to know that we're
@@ -19031,7 +19140,7 @@ function waitFor(callback, _ref) {
19031
19140
  intervalId = setInterval(checkRealTimersCallback, interval);
19032
19141
  const {
19033
19142
  MutationObserver
19034
- } = getWindowFromNode$1(container);
19143
+ } = getWindowFromNode$2(container);
19035
19144
  observer = new MutationObserver(checkRealTimersCallback);
19036
19145
  observer.observe(container, mutationObserverOptions);
19037
19146
  checkCallback();
@@ -19101,7 +19210,7 @@ function waitForWrapper(callback, options) {
19101
19210
  // create the error here so its stack trace is as close to the
19102
19211
  // calling code as possible
19103
19212
  const stackTraceError = new Error('STACK_TRACE_MESSAGE');
19104
- return getConfig().asyncWrapper(() => waitFor(callback, {
19213
+ return getConfig$3().asyncWrapper(() => waitFor(callback, {
19105
19214
  stackTraceError,
19106
19215
  ...options
19107
19216
  }));
@@ -19113,7 +19222,7 @@ eslint
19113
19222
  */
19114
19223
 
19115
19224
  function getElementError(message, container) {
19116
- return getConfig().getElementError(message, container);
19225
+ return getConfig$3().getElementError(message, container);
19117
19226
  }
19118
19227
  function getMultipleElementsFoundError(message, container) {
19119
19228
  return getElementError(message + "\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).", container);
@@ -19133,6 +19242,13 @@ function queryAllByAttribute(attribute, container, text, _temp) {
19133
19242
  });
19134
19243
  return Array.from(container.querySelectorAll("[" + attribute + "]")).filter(node => matcher(node.getAttribute(attribute), node, text, matchNormalizer));
19135
19244
  }
19245
+ function queryByAttribute(attribute, container, text, options) {
19246
+ const els = queryAllByAttribute(attribute, container, text, options);
19247
+ if (els.length > 1) {
19248
+ throw getMultipleElementsFoundError("Found multiple elements by [" + attribute + "=" + text + "]", container);
19249
+ }
19250
+ return els[0] || null;
19251
+ }
19136
19252
 
19137
19253
  // this accepts a query function and returns a function which throws an error
19138
19254
  // if more than one elements is returned, otherwise it returns the first
@@ -19151,7 +19267,7 @@ function makeSingleQuery(allQuery, getMultipleError) {
19151
19267
  };
19152
19268
  }
19153
19269
  function getSuggestionError(suggestion, container) {
19154
- return getConfig().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
19270
+ return getConfig$3().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
19155
19271
  }
19156
19272
 
19157
19273
  // this accepts a query function and returns a function which throws an error
@@ -19163,7 +19279,7 @@ function makeGetAllQuery(allQuery, getMissingError) {
19163
19279
  }
19164
19280
  const els = allQuery(container, ...args);
19165
19281
  if (!els.length) {
19166
- throw getConfig().getElementError(getMissingError(container, ...args), container);
19282
+ throw getConfig$3().getElementError(getMissingError(container, ...args), container);
19167
19283
  }
19168
19284
  return els;
19169
19285
  };
@@ -19187,7 +19303,7 @@ const wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => functi
19187
19303
  }
19188
19304
  const element = query(container, ...args);
19189
19305
  const [{
19190
- suggest = getConfig().throwSuggestions
19306
+ suggest = getConfig$3().throwSuggestions
19191
19307
  } = {}] = args.slice(-1);
19192
19308
  if (element && suggest) {
19193
19309
  const suggestion = getSuggestedQuery(element, variant);
@@ -19203,7 +19319,7 @@ const wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => functio
19203
19319
  }
19204
19320
  const els = query(container, ...args);
19205
19321
  const [{
19206
- suggest = getConfig().throwSuggestions
19322
+ suggest = getConfig$3().throwSuggestions
19207
19323
  } = {}] = args.slice(-1);
19208
19324
  if (els.length && suggest) {
19209
19325
  // get a unique list of all suggestion messages. We are only going to make a suggestion if
@@ -19237,6 +19353,20 @@ function buildQueries(queryAllBy, getMultipleError, getMissingError) {
19237
19353
  return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];
19238
19354
  }
19239
19355
 
19356
+ var queryHelpers = /*#__PURE__*/Object.freeze({
19357
+ __proto__: null,
19358
+ getElementError: getElementError,
19359
+ wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,
19360
+ wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion,
19361
+ getMultipleElementsFoundError: getMultipleElementsFoundError,
19362
+ queryAllByAttribute: queryAllByAttribute,
19363
+ queryByAttribute: queryByAttribute,
19364
+ makeSingleQuery: makeSingleQuery,
19365
+ makeGetAllQuery: makeGetAllQuery,
19366
+ makeFindQuery: makeFindQuery,
19367
+ buildQueries: buildQueries
19368
+ });
19369
+
19240
19370
  function queryAllLabels(container) {
19241
19371
  return Array.from(container.querySelectorAll('label,input')).map(node => {
19242
19372
  return {
@@ -19346,12 +19476,12 @@ const getAllByLabelText = function (container, text) {
19346
19476
  if (labels.length) {
19347
19477
  const tagNames = labels.map(label => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter(tagName => !!tagName);
19348
19478
  if (tagNames.length) {
19349
- throw getConfig().getElementError(tagNames.map(tagName => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join('\n\n'), container);
19479
+ throw getConfig$3().getElementError(tagNames.map(tagName => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join('\n\n'), container);
19350
19480
  } else {
19351
- throw getConfig().getElementError("Found a label with the text of: " + text + ", however no form control was found associated to that label. Make sure you're using the \"for\" attribute or \"aria-labelledby\" attribute correctly.", container);
19481
+ throw getConfig$3().getElementError("Found a label with the text of: " + text + ", however no form control was found associated to that label. Make sure you're using the \"for\" attribute or \"aria-labelledby\" attribute correctly.", container);
19352
19482
  }
19353
19483
  } else {
19354
- throw getConfig().getElementError("Unable to find a label with the text of: " + text, container);
19484
+ throw getConfig$3().getElementError("Unable to find a label with the text of: " + text, container);
19355
19485
  }
19356
19486
  }
19357
19487
  return els;
@@ -19393,7 +19523,7 @@ const queryAllByText = function (container, text, _temp) {
19393
19523
  exact = true,
19394
19524
  collapseWhitespace,
19395
19525
  trim,
19396
- ignore = getConfig().defaultIgnore,
19526
+ ignore = getConfig$3().defaultIgnore,
19397
19527
  normalizer
19398
19528
  } = _temp === void 0 ? {} : _temp;
19399
19529
  checkContainerType$1(container);
@@ -19505,7 +19635,7 @@ const [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = b
19505
19635
  /* eslint-disable complexity */
19506
19636
  const queryAllByRole = function (container, role, _temp) {
19507
19637
  let {
19508
- hidden = getConfig().defaultHidden,
19638
+ hidden = getConfig$3().defaultHidden,
19509
19639
  name,
19510
19640
  description,
19511
19641
  queryFallbacks = false,
@@ -19674,7 +19804,7 @@ const queryAllByRole = function (container, role, _temp) {
19674
19804
  return true;
19675
19805
  }
19676
19806
  return matches(computeAccessibleName(element, {
19677
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19807
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
19678
19808
  }), element, name, text => text);
19679
19809
  }).filter(element => {
19680
19810
  if (description === undefined) {
@@ -19682,7 +19812,7 @@ const queryAllByRole = function (container, role, _temp) {
19682
19812
  return true;
19683
19813
  }
19684
19814
  return matches(computeAccessibleDescription(element, {
19685
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19815
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
19686
19816
  }), element, description, text => text);
19687
19817
  }).filter(element => {
19688
19818
  return hidden === false ? isInaccessible(element, {
@@ -19725,11 +19855,11 @@ const getMultipleError$1 = function (c, role, _temp2) {
19725
19855
  };
19726
19856
  const getMissingError$1 = function (container, role, _temp3) {
19727
19857
  let {
19728
- hidden = getConfig().defaultHidden,
19858
+ hidden = getConfig$3().defaultHidden,
19729
19859
  name,
19730
19860
  description
19731
19861
  } = _temp3 === void 0 ? {} : _temp3;
19732
- if (getConfig()._disableExpensiveErrorDiagnostics) {
19862
+ if (getConfig$3()._disableExpensiveErrorDiagnostics) {
19733
19863
  return "Unable to find role=\"" + role + "\"" + getNameHint(name);
19734
19864
  }
19735
19865
  let roles = '';
@@ -19770,7 +19900,7 @@ const getMissingError$1 = function (container, role, _temp3) {
19770
19900
  const queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, 'queryAll');
19771
19901
  const [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1);
19772
19902
 
19773
- const getTestIdAttribute = () => getConfig().testIdAttribute;
19903
+ const getTestIdAttribute = () => getConfig$3().testIdAttribute;
19774
19904
  const queryAllByTestId = function () {
19775
19905
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19776
19906
  args[_key] = arguments[_key];
@@ -19859,6 +19989,47 @@ function getQueriesForElement(element, queries$1, initialValue) {
19859
19989
  }, initialValue);
19860
19990
  }
19861
19991
 
19992
+ const isRemoved = result => !result || Array.isArray(result) && !result.length;
19993
+
19994
+ // Check if the element is not present.
19995
+ // As the name implies, waitForElementToBeRemoved should check `present` --> `removed`
19996
+ function initialCheck(elements) {
19997
+ if (isRemoved(elements)) {
19998
+ throw new Error('The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.');
19999
+ }
20000
+ }
20001
+ async function waitForElementToBeRemoved(callback, options) {
20002
+ // created here so we get a nice stacktrace
20003
+ const timeoutError = new Error('Timed out in waitForElementToBeRemoved.');
20004
+ if (typeof callback !== 'function') {
20005
+ initialCheck(callback);
20006
+ const elements = Array.isArray(callback) ? callback : [callback];
20007
+ const getRemainingElements = elements.map(element => {
20008
+ let parent = element.parentElement;
20009
+ if (parent === null) return () => null;
20010
+ while (parent.parentElement) parent = parent.parentElement;
20011
+ return () => parent.contains(element) ? element : null;
20012
+ });
20013
+ callback = () => getRemainingElements.map(c => c()).filter(Boolean);
20014
+ }
20015
+ initialCheck(callback());
20016
+ return waitForWrapper(() => {
20017
+ let result;
20018
+ try {
20019
+ result = callback();
20020
+ } catch (error) {
20021
+ if (error.name === 'TestingLibraryElementError') {
20022
+ return undefined;
20023
+ }
20024
+ throw error;
20025
+ }
20026
+ if (!isRemoved(result)) {
20027
+ throw timeoutError;
20028
+ }
20029
+ return undefined;
20030
+ }, options);
20031
+ }
20032
+
19862
20033
  /*
19863
20034
  eslint
19864
20035
  require-await: "off"
@@ -20557,7 +20728,7 @@ const eventAliasMap$1 = {
20557
20728
  };
20558
20729
 
20559
20730
  function fireEvent(element, event) {
20560
- return getConfig().eventWrapper(() => {
20731
+ return getConfig$3().eventWrapper(() => {
20561
20732
  if (!event) {
20562
20733
  throw new Error("Unable to fire an event - please provide an event object.");
20563
20734
  }
@@ -20601,7 +20772,7 @@ function createEvent$1(eventName, node, init, _temp) {
20601
20772
  });
20602
20773
  }
20603
20774
  Object.assign(node, targetProperties);
20604
- const window = getWindowFromNode$1(node);
20775
+ const window = getWindowFromNode$2(node);
20605
20776
  const EventConstructor = window[EventType] || window.Event;
20606
20777
  let event;
20607
20778
  /* istanbul ignore else */
@@ -20725,7 +20896,7 @@ const initialValue = {
20725
20896
  debug,
20726
20897
  logTestingPlaygroundURL
20727
20898
  };
20728
- typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
20899
+ const screen = typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
20729
20900
  ? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {
20730
20901
  // `key` is for all intents and purposes the type of keyof `helpers`, which itself is the type of `initialValue` plus incoming properties from `queries`
20731
20902
  // if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary
@@ -20736,6 +20907,88 @@ typeof document !== 'undefined' && document.body // eslint-disable-line @typescr
20736
20907
  return helpers;
20737
20908
  }, initialValue);
20738
20909
 
20910
+ var named$1 = /*#__PURE__*/Object.freeze({
20911
+ __proto__: null,
20912
+ buildQueries: buildQueries,
20913
+ configure: configure,
20914
+ createEvent: createEvent$1,
20915
+ findAllByAltText: findAllByAltText,
20916
+ findAllByDisplayValue: findAllByDisplayValue,
20917
+ findAllByLabelText: findAllByLabelText,
20918
+ findAllByPlaceholderText: findAllByPlaceholderText,
20919
+ findAllByRole: findAllByRole,
20920
+ findAllByTestId: findAllByTestId,
20921
+ findAllByText: findAllByText,
20922
+ findAllByTitle: findAllByTitle,
20923
+ findByAltText: findByAltText,
20924
+ findByDisplayValue: findByDisplayValue,
20925
+ findByLabelText: findByLabelText,
20926
+ findByPlaceholderText: findByPlaceholderText,
20927
+ findByRole: findByRole,
20928
+ findByTestId: findByTestId,
20929
+ findByText: findByText,
20930
+ findByTitle: findByTitle,
20931
+ fireEvent: fireEvent,
20932
+ getAllByAltText: getAllByAltText,
20933
+ getAllByDisplayValue: getAllByDisplayValue,
20934
+ getAllByLabelText: getAllByLabelTextWithSuggestions,
20935
+ getAllByPlaceholderText: getAllByPlaceholderText,
20936
+ getAllByRole: getAllByRole,
20937
+ getAllByTestId: getAllByTestId,
20938
+ getAllByText: getAllByText,
20939
+ getAllByTitle: getAllByTitle,
20940
+ getByAltText: getByAltText,
20941
+ getByDisplayValue: getByDisplayValue,
20942
+ getByLabelText: getByLabelTextWithSuggestions,
20943
+ getByPlaceholderText: getByPlaceholderText,
20944
+ getByRole: getByRole,
20945
+ getByTestId: getByTestId,
20946
+ getByText: getByText,
20947
+ getByTitle: getByTitle,
20948
+ getConfig: getConfig$3,
20949
+ getDefaultNormalizer: getDefaultNormalizer,
20950
+ getElementError: getElementError,
20951
+ getMultipleElementsFoundError: getMultipleElementsFoundError,
20952
+ getNodeText: getNodeText,
20953
+ getQueriesForElement: getQueriesForElement,
20954
+ getRoles: getRoles,
20955
+ getSuggestedQuery: getSuggestedQuery,
20956
+ isInaccessible: isInaccessible,
20957
+ logDOM: logDOM,
20958
+ logRoles: logRoles,
20959
+ makeFindQuery: makeFindQuery,
20960
+ makeGetAllQuery: makeGetAllQuery,
20961
+ makeSingleQuery: makeSingleQuery,
20962
+ prettyDOM: prettyDOM,
20963
+ prettyFormat: index,
20964
+ queries: queries,
20965
+ queryAllByAltText: queryAllByAltTextWithSuggestions,
20966
+ queryAllByAttribute: queryAllByAttribute,
20967
+ queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,
20968
+ queryAllByLabelText: queryAllByLabelTextWithSuggestions,
20969
+ queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,
20970
+ queryAllByRole: queryAllByRoleWithSuggestions,
20971
+ queryAllByTestId: queryAllByTestIdWithSuggestions,
20972
+ queryAllByText: queryAllByTextWithSuggestions,
20973
+ queryAllByTitle: queryAllByTitleWithSuggestions,
20974
+ queryByAltText: queryByAltText,
20975
+ queryByAttribute: queryByAttribute,
20976
+ queryByDisplayValue: queryByDisplayValue,
20977
+ queryByLabelText: queryByLabelText,
20978
+ queryByPlaceholderText: queryByPlaceholderText,
20979
+ queryByRole: queryByRole,
20980
+ queryByTestId: queryByTestId,
20981
+ queryByText: queryByText,
20982
+ queryByTitle: queryByTitle,
20983
+ queryHelpers: queryHelpers,
20984
+ screen: screen,
20985
+ waitFor: waitForWrapper,
20986
+ waitForElementToBeRemoved: waitForElementToBeRemoved,
20987
+ within: getQueriesForElement,
20988
+ wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,
20989
+ wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion
20990
+ });
20991
+
20739
20992
  const domAct = testUtils.act;
20740
20993
  function getGlobalThis() {
20741
20994
  /* istanbul ignore else */
@@ -20959,15 +21212,15 @@ var helpers = {};
20959
21212
  Object.defineProperty(helpers, "__esModule", {
20960
21213
  value: true
20961
21214
  });
20962
- helpers.TEXT_NODE = void 0;
20963
- helpers.checkContainerType = checkContainerType;
20964
- helpers.getDocument = getDocument$1;
20965
- var getWindowFromNode_1 = helpers.getWindowFromNode = getWindowFromNode;
20966
- helpers.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;
21215
+ var TEXT_NODE_1 = helpers.TEXT_NODE = void 0;
21216
+ var checkContainerType_1 = helpers.checkContainerType = checkContainerType;
21217
+ var getDocument_1 = helpers.getDocument = getDocument$1;
21218
+ var getWindowFromNode_1 = helpers.getWindowFromNode = getWindowFromNode$1;
21219
+ var jestFakeTimersAreEnabled_1 = helpers.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;
20967
21220
  // Constant node.nodeType for text nodes, see:
20968
21221
  // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants
20969
21222
  const TEXT_NODE = 3;
20970
- helpers.TEXT_NODE = TEXT_NODE;
21223
+ TEXT_NODE_1 = helpers.TEXT_NODE = TEXT_NODE;
20971
21224
  function jestFakeTimersAreEnabled() {
20972
21225
  /* istanbul ignore else */
20973
21226
  // eslint-disable-next-line
@@ -20990,7 +21243,7 @@ function getDocument$1() {
20990
21243
  }
20991
21244
  return window.document;
20992
21245
  }
20993
- function getWindowFromNode(node) {
21246
+ function getWindowFromNode$1(node) {
20994
21247
  if (node.defaultView) {
20995
21248
  // node is document
20996
21249
  return node.defaultView;
@@ -21025,8 +21278,19 @@ function checkContainerType(container) {
21025
21278
  }
21026
21279
  }
21027
21280
 
21281
+ var named = /*#__PURE__*/_mergeNamespaces({
21282
+ __proto__: null,
21283
+ get TEXT_NODE () { return TEXT_NODE_1; },
21284
+ checkContainerType: checkContainerType_1,
21285
+ default: helpers,
21286
+ getDocument: getDocument_1,
21287
+ getWindowFromNode: getWindowFromNode_1,
21288
+ jestFakeTimersAreEnabled: jestFakeTimersAreEnabled_1
21289
+ }, [helpers]);
21290
+
21291
+ const { getWindowFromNode } = named;
21028
21292
  function getWindow(node) {
21029
- return getWindowFromNode_1(node);
21293
+ return getWindowFromNode(node);
21030
21294
  }
21031
21295
 
21032
21296
  // jsdom does not implement Blob.text()
@@ -21063,6 +21327,19 @@ function createFileList(window, files) {
21063
21327
  return list;
21064
21328
  }
21065
21329
 
21330
+ function _define_property$8(obj, key, value) {
21331
+ if (key in obj) {
21332
+ Object.defineProperty(obj, key, {
21333
+ value: value,
21334
+ enumerable: true,
21335
+ configurable: true,
21336
+ writable: true
21337
+ });
21338
+ } else {
21339
+ obj[key] = value;
21340
+ }
21341
+ return obj;
21342
+ }
21066
21343
  // DataTransfer is not implemented in jsdom.
21067
21344
  // DataTransfer with FileList is being created by the browser on certain events.
21068
21345
  class DataTransferItemStub {
@@ -21078,8 +21355,10 @@ class DataTransferItemStub {
21078
21355
  throw new Error('not implemented');
21079
21356
  }
21080
21357
  constructor(dataOrFile, type){
21081
- this.file = null;
21082
- this.data = undefined;
21358
+ _define_property$8(this, "kind", void 0);
21359
+ _define_property$8(this, "type", void 0);
21360
+ _define_property$8(this, "file", null);
21361
+ _define_property$8(this, "data", undefined);
21083
21362
  if (typeof dataOrFile === 'string') {
21084
21363
  this.kind = 'string';
21085
21364
  this.type = String(type);
@@ -21114,8 +21393,8 @@ function getTypeMatcher(type, exact) {
21114
21393
  function createDataTransferStub(window) {
21115
21394
  return new class DataTransferStub {
21116
21395
  getData(format) {
21117
- var ref;
21118
- const match = (ref = this.items.find(getTypeMatcher(format, true))) !== null && ref !== void 0 ? ref : this.items.find(getTypeMatcher(format, false));
21396
+ var _this_items_find;
21397
+ const match = (_this_items_find = this.items.find(getTypeMatcher(format, true))) !== null && _this_items_find !== void 0 ? _this_items_find : this.items.find(getTypeMatcher(format, false));
21119
21398
  let text = '';
21120
21399
  match === null || match === void 0 ? void 0 : match.getAsString((t)=>{
21121
21400
  text = t;
@@ -21152,10 +21431,10 @@ function createDataTransferStub(window) {
21152
21431
  }
21153
21432
  /* istanbul ignore next */ setDragImage() {}
21154
21433
  constructor(){
21155
- this.dropEffect = 'none';
21156
- this.effectAllowed = 'uninitialized';
21157
- this.items = new DataTransferItemListStub();
21158
- this.files = createFileList(window, []);
21434
+ _define_property$8(this, "dropEffect", 'none');
21435
+ _define_property$8(this, "effectAllowed", 'uninitialized');
21436
+ _define_property$8(this, "items", new DataTransferItemListStub());
21437
+ _define_property$8(this, "files", createFileList(window, []));
21159
21438
  }
21160
21439
  }();
21161
21440
  }
@@ -21183,13 +21462,26 @@ function getBlobFromDataTransferItem(window, item) {
21183
21462
  }
21184
21463
 
21185
21464
  // Clipboard is not available in jsdom
21465
+ function _define_property$7(obj, key, value) {
21466
+ if (key in obj) {
21467
+ Object.defineProperty(obj, key, {
21468
+ value: value,
21469
+ enumerable: true,
21470
+ configurable: true,
21471
+ writable: true
21472
+ });
21473
+ } else {
21474
+ obj[key] = value;
21475
+ }
21476
+ return obj;
21477
+ }
21186
21478
  // MDN lists string|Blob|Promise<Blob|string> as possible types in ClipboardItemData
21187
21479
  // lib.dom.d.ts lists only Promise<Blob|string>
21188
21480
  // https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem#syntax
21189
21481
  function createClipboardItem(window, ...blobs) {
21190
21482
  const dataMap = Object.fromEntries(blobs.map((b)=>[
21191
21483
  typeof b === 'string' ? 'text/plain' : b.type,
21192
- Promise.resolve(b),
21484
+ Promise.resolve(b)
21193
21485
  ]));
21194
21486
  // use real ClipboardItem if available
21195
21487
  /* istanbul ignore if */ if (typeof window.ClipboardItem !== 'undefined') {
@@ -21211,6 +21503,7 @@ function createClipboardItem(window, ...blobs) {
21211
21503
  });
21212
21504
  }
21213
21505
  constructor(d){
21506
+ _define_property$7(this, "data", void 0);
21214
21507
  this.data = d;
21215
21508
  }
21216
21509
  }(dataMap);
@@ -21241,15 +21534,14 @@ function createClipboardStub(window, control) {
21241
21534
  }
21242
21535
  constructor(...args){
21243
21536
  super(...args);
21244
- this.items = [];
21537
+ _define_property$7(this, "items", []);
21245
21538
  }
21246
21539
  }(), {
21247
21540
  [ClipboardStubControl]: control
21248
21541
  });
21249
21542
  }
21250
21543
  function isClipboardStub(clipboard) {
21251
- var ref;
21252
- return !!((ref = clipboard) === null || ref === void 0 ? void 0 : ref[ClipboardStubControl]);
21544
+ return !!(clipboard === null || clipboard === void 0 ? void 0 : clipboard[ClipboardStubControl]);
21253
21545
  }
21254
21546
  function attachClipboardStubToView(window) {
21255
21547
  if (isClipboardStub(window.navigator.clipboard)) {
@@ -21319,11 +21611,12 @@ async function writeDataTransferToClipboard(document, clipboardData) {
21319
21611
  throw new Error('The Clipboard API is unavailable.');
21320
21612
  }
21321
21613
  }
21322
- /* istanbul ignore else */ if (typeof globalThis.afterEach === 'function') {
21323
- globalThis.afterEach(()=>resetClipboardStubOnView(globalThis.window));
21614
+ const g = globalThis;
21615
+ /* istanbul ignore else */ if (typeof g.afterEach === 'function') {
21616
+ g.afterEach(()=>resetClipboardStubOnView(globalThis.window));
21324
21617
  }
21325
- /* istanbul ignore else */ if (typeof globalThis.afterAll === 'function') {
21326
- globalThis.afterAll(()=>detachClipboardStubFromView(globalThis.window));
21618
+ /* istanbul ignore else */ if (typeof g.afterAll === 'function') {
21619
+ g.afterAll(()=>detachClipboardStubFromView(globalThis.window));
21327
21620
  }
21328
21621
 
21329
21622
  //jsdom is not supporting isContentEditable
@@ -21374,8 +21667,8 @@ var maxLengthSupportedTypes;
21374
21667
  // can't use .maxLength property because of a jsdom bug:
21375
21668
  // https://github.com/jsdom/jsdom/issues/2927
21376
21669
  function getMaxLength(element) {
21377
- var ref;
21378
- const attr = (ref = element.getAttribute('maxlength')) !== null && ref !== void 0 ? ref : '';
21670
+ var _element_getAttribute;
21671
+ const attr = (_element_getAttribute = element.getAttribute('maxlength')) !== null && _element_getAttribute !== void 0 ? _element_getAttribute : '';
21379
21672
  return /^\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : undefined;
21380
21673
  }
21381
21674
  function supportsMaxLength(element) {
@@ -21390,7 +21683,7 @@ const FOCUSABLE_SELECTOR = [
21390
21683
  '[contenteditable=""]',
21391
21684
  '[contenteditable="true"]',
21392
21685
  'a[href]',
21393
- '[tabindex]:not([disabled])',
21686
+ '[tabindex]:not([disabled])'
21394
21687
  ].join(', ');
21395
21688
 
21396
21689
  function isFocusable(element) {
@@ -21436,16 +21729,16 @@ function readPrintableChar(text, pos, context) {
21436
21729
  };
21437
21730
  }
21438
21731
  function readTag(text, pos, startBracket, context) {
21439
- var ref, ref1;
21732
+ var _text_slice_match, _text_slice_match1;
21440
21733
  const releasePreviousModifier = text[pos] === '/' ? '/' : '';
21441
21734
  pos += releasePreviousModifier.length;
21442
21735
  const escapedDescriptor = startBracket === '{' && text[pos] === '\\';
21443
21736
  pos += Number(escapedDescriptor);
21444
- const descriptor = escapedDescriptor ? text[pos] : (ref = text.slice(pos).match(startBracket === '{' ? /^\w+|^[^}>/]/ : /^\w+/)) === null || ref === void 0 ? void 0 : ref[0];
21737
+ const descriptor = escapedDescriptor ? text[pos] : (_text_slice_match = text.slice(pos).match(startBracket === '{' ? /^\w+|^[^}>/]/ : /^\w+/)) === null || _text_slice_match === void 0 ? void 0 : _text_slice_match[0];
21445
21738
  assertDescriptor(descriptor, text, pos, context);
21446
21739
  pos += descriptor.length;
21447
- var ref2;
21448
- const repeatModifier = (ref2 = (ref1 = text.slice(pos).match(/^>\d+/)) === null || ref1 === void 0 ? void 0 : ref1[0]) !== null && ref2 !== void 0 ? ref2 : '';
21740
+ var _text_slice_match_;
21741
+ const repeatModifier = (_text_slice_match_ = (_text_slice_match1 = text.slice(pos).match(/^>\d+/)) === null || _text_slice_match1 === void 0 ? void 0 : _text_slice_match1[0]) !== null && _text_slice_match_ !== void 0 ? _text_slice_match_ : '';
21449
21742
  pos += repeatModifier.length;
21450
21743
  const releaseSelfModifier = text[pos] === '/' || !repeatModifier && text[pos] === '>' ? text[pos] : '';
21451
21744
  pos += releaseSelfModifier.length;
@@ -21455,7 +21748,7 @@ function readTag(text, pos, startBracket, context) {
21455
21748
  throw new Error(getErrorMessage([
21456
21749
  !repeatModifier && 'repeat modifier',
21457
21750
  !releaseSelfModifier && 'release modifier',
21458
- `"${expectedEndBracket}"`,
21751
+ `"${expectedEndBracket}"`
21459
21752
  ].filter(Boolean).join(' or '), text[pos], text, context));
21460
21753
  }
21461
21754
  pos += endBracket.length;
@@ -21522,14 +21815,14 @@ function isDisabled(element) {
21522
21815
  'select',
21523
21816
  'textarea',
21524
21817
  'optgroup',
21525
- 'option',
21818
+ 'option'
21526
21819
  ])) {
21527
21820
  if (el.hasAttribute('disabled')) {
21528
21821
  return true;
21529
21822
  }
21530
21823
  } else if (isElementType(el, 'fieldset')) {
21531
- var ref;
21532
- if (el.hasAttribute('disabled') && !((ref = el.querySelector(':scope > legend')) === null || ref === void 0 ? void 0 : ref.contains(element))) {
21824
+ var _el_querySelector;
21825
+ if (el.hasAttribute('disabled') && !((_el_querySelector = el.querySelector(':scope > legend')) === null || _el_querySelector === void 0 ? void 0 : _el_querySelector.contains(element))) {
21533
21826
  return true;
21534
21827
  }
21535
21828
  } else if (el.tagName.includes('-')) {
@@ -21554,8 +21847,8 @@ function getActiveElement(document) {
21554
21847
  }
21555
21848
  }
21556
21849
  function getActiveElementOrBody(document) {
21557
- var ref;
21558
- return (ref = getActiveElement(document)) !== null && ref !== void 0 ? ref : /* istanbul ignore next */ document.body;
21850
+ var _getActiveElement;
21851
+ return (_getActiveElement = getActiveElement(document)) !== null && _getActiveElement !== void 0 ? _getActiveElement : /* istanbul ignore next */ document.body;
21559
21852
  }
21560
21853
 
21561
21854
  function findClosest(element, callback) {
@@ -21601,8 +21894,8 @@ function isElement$1(node) {
21601
21894
  const contenteditable = getContentEditable(selection.focusNode);
21602
21895
  if (contenteditable) {
21603
21896
  if (!selection.isCollapsed) {
21604
- var ref;
21605
- const focusNode = ((ref = contenteditable.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
21897
+ var _contenteditable_firstChild;
21898
+ const focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === void 0 ? void 0 : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
21606
21899
  selection.setBaseAndExtent(focusNode, 0, focusNode, 0);
21607
21900
  }
21608
21901
  } else {
@@ -21611,8 +21904,9 @@ function isElement$1(node) {
21611
21904
  }
21612
21905
  }
21613
21906
 
21907
+ const { getConfig: getConfig$2 } = named$1;
21614
21908
  function wrapEvent(cb, _element) {
21615
- return getConfig().eventWrapper(cb);
21909
+ return getConfig$2().eventWrapper(cb);
21616
21910
  }
21617
21911
 
21618
21912
  /**
@@ -21625,10 +21919,7 @@ function wrapEvent(cb, _element) {
21625
21919
  } else if (target) {
21626
21920
  wrapEvent(()=>target.focus());
21627
21921
  } else {
21628
- wrapEvent(()=>{
21629
- var ref;
21630
- return (ref = activeElement) === null || ref === void 0 ? void 0 : ref.blur();
21631
- });
21922
+ wrapEvent(()=>activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur());
21632
21923
  }
21633
21924
  updateSelectionOnFocus(target !== null && target !== void 0 ? target : element.ownerDocument.body);
21634
21925
  }
@@ -21698,7 +21989,7 @@ function getInitialValue(element) {
21698
21989
  function setUISelectionRaw(element, selection) {
21699
21990
  element[UISelection] = selection;
21700
21991
  }
21701
- function setUISelection(element, { focusOffset: focusOffsetParam , anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {
21992
+ function setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {
21702
21993
  const valueLength = getUIValue(element).length;
21703
21994
  const sanitizeOffset = (o)=>Math.max(0, Math.min(valueLength, o));
21704
21995
  const anchorOffset = mode === 'replace' || element[UISelection] === undefined ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset;
@@ -21724,10 +22015,10 @@ function setUISelection(element, { focusOffset: focusOffsetParam , anchorOffset:
21724
22015
  }
21725
22016
  }
21726
22017
  function getUISelection(element) {
21727
- var _selectionStart, _selectionEnd, _UISelection;
21728
- const sel = (_UISelection = element[UISelection]) !== null && _UISelection !== void 0 ? _UISelection : {
21729
- anchorOffset: (_selectionStart = element.selectionStart) !== null && _selectionStart !== void 0 ? _selectionStart : 0,
21730
- focusOffset: (_selectionEnd = element.selectionEnd) !== null && _selectionEnd !== void 0 ? _selectionEnd : 0
22018
+ var _element_selectionStart, _element_selectionEnd, _element_UISelection;
22019
+ const sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== void 0 ? _element_UISelection : {
22020
+ anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : 0,
22021
+ focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : 0
21731
22022
  };
21732
22023
  return {
21733
22024
  ...sel,
@@ -21877,14 +22168,14 @@ function isTextNode(node) {
21877
22168
  }
21878
22169
  function walkNodes(node, direction, callback) {
21879
22170
  for(;;){
21880
- var ref;
22171
+ var _node_ownerDocument;
21881
22172
  const sibling = node[`${direction}Sibling`];
21882
22173
  if (sibling) {
21883
22174
  node = getDescendant(sibling, direction === 'next' ? 'first' : 'last');
21884
22175
  if (callback(node)) {
21885
22176
  return node;
21886
22177
  }
21887
- } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((ref = node.ownerDocument) === null || ref === void 0 ? void 0 : ref.body))) {
22178
+ } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.body))) {
21888
22179
  node = node.parentNode;
21889
22180
  } else {
21890
22181
  break;
@@ -21919,8 +22210,8 @@ function startTrackValue(element) {
21919
22210
  };
21920
22211
  }
21921
22212
  function trackOrSetValue(element, v) {
21922
- var ref, ref1;
21923
- (ref = element[TrackChanges]) === null || ref === void 0 ? void 0 : (ref1 = ref.tracked) === null || ref1 === void 0 ? void 0 : ref1.push(v);
22213
+ var _element_TrackChanges_tracked, _element_TrackChanges;
22214
+ (_element_TrackChanges = element[TrackChanges]) === null || _element_TrackChanges === void 0 ? void 0 : (_element_TrackChanges_tracked = _element_TrackChanges.tracked) === null || _element_TrackChanges_tracked === void 0 ? void 0 : _element_TrackChanges_tracked.push(v);
21924
22215
  if (!element[TrackChanges]) {
21925
22216
  setUIValueClean(element);
21926
22217
  setUISelection(element, {
@@ -21929,10 +22220,10 @@ function trackOrSetValue(element, v) {
21929
22220
  }
21930
22221
  }
21931
22222
  function commitValueAfterInput(element, cursorOffset) {
21932
- var ref;
22223
+ var _changes_tracked;
21933
22224
  const changes = element[TrackChanges];
21934
22225
  element[TrackChanges] = undefined;
21935
- if (!(changes === null || changes === void 0 ? void 0 : (ref = changes.tracked) === null || ref === void 0 ? void 0 : ref.length)) {
22226
+ if (!(changes === null || changes === void 0 ? void 0 : (_changes_tracked = changes.tracked) === null || _changes_tracked === void 0 ? void 0 : _changes_tracked.length)) {
21936
22227
  return;
21937
22228
  }
21938
22229
  const isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;
@@ -21976,16 +22267,16 @@ function getElement(node) {
21976
22267
  if (typeAndSelection.type === 'input') {
21977
22268
  return typeAndSelection.selection;
21978
22269
  } else if (typeAndSelection.type === 'contenteditable') {
21979
- var ref;
22270
+ var _typeAndSelection_selection;
21980
22271
  // Multi-range on contenteditable edits the first selection instead of the last
21981
- return (ref = typeAndSelection.selection) === null || ref === void 0 ? void 0 : ref.getRangeAt(0);
22272
+ return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === void 0 ? void 0 : _typeAndSelection_selection.getRangeAt(0);
21982
22273
  }
21983
22274
  }
21984
22275
 
21985
22276
  /**
21986
22277
  * Set the selection
21987
- */ function setSelection({ focusNode , focusOffset , anchorNode =focusNode , anchorOffset =focusOffset }) {
21988
- var ref, ref1;
22278
+ */ function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {
22279
+ var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;
21989
22280
  const typeAndSelection = getTargetTypeAndSelection(focusNode);
21990
22281
  if (typeAndSelection.type === 'input') {
21991
22282
  return setUISelection(focusNode, {
@@ -21993,7 +22284,7 @@ function getElement(node) {
21993
22284
  focusOffset
21994
22285
  });
21995
22286
  }
21996
- (ref1 = (ref = anchorNode.ownerDocument) === null || ref === void 0 ? void 0 : ref.getSelection()) === null || ref1 === void 0 ? void 0 : ref1.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
22287
+ (_anchorNode_ownerDocument = anchorNode.ownerDocument) === null || _anchorNode_ownerDocument === void 0 ? void 0 : (_anchorNode_ownerDocument_getSelection = _anchorNode_ownerDocument.getSelection()) === null || _anchorNode_ownerDocument_getSelection === void 0 ? void 0 : _anchorNode_ownerDocument_getSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
21997
22288
  }
21998
22289
 
21999
22290
  function isDateOrTime(element) {
@@ -22076,7 +22367,7 @@ function editInputElement(instance, element, inputRange, data, inputType) {
22076
22367
  }
22077
22368
  }
22078
22369
  }
22079
- const { newValue , newOffset , oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
22370
+ const { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
22080
22371
  if (newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset) {
22081
22372
  return;
22082
22373
  }
@@ -22104,7 +22395,7 @@ function editInputElement(instance, element, inputRange, data, inputType) {
22104
22395
  });
22105
22396
  }
22106
22397
  }
22107
- function calculateNewValue(inputData, node, { startOffset , endOffset }, inputType) {
22398
+ function calculateNewValue(inputData, node, { startOffset, endOffset }, inputType) {
22108
22399
  const value = getUIValue(node);
22109
22400
  const prologEnd = Math.max(0, startOffset === endOffset && inputType === 'deleteContentBackward' ? startOffset - 1 : startOffset);
22110
22401
  const prolog = value.substring(0, prologEnd);
@@ -22132,12 +22423,12 @@ function commitInput(instance, element, newOffset, inputInit) {
22132
22423
  commitValueAfterInput(element, newOffset);
22133
22424
  }
22134
22425
  function isValidNumberInput(value) {
22135
- var ref, ref1;
22426
+ var _value_match, _value_match1;
22136
22427
  // the browser allows some invalid input but not others
22137
22428
  // it allows up to two '-' at any place before any 'e' or one directly following 'e'
22138
22429
  // it allows one '.' at any place before e
22139
22430
  const valueParts = value.split('e', 2);
22140
- return !(/[^\d.\-e]/.test(value) || Number((ref = value.match(/-/g)) === null || ref === void 0 ? void 0 : ref.length) > 2 || Number((ref1 = value.match(/\./g)) === null || ref1 === void 0 ? void 0 : ref1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
22431
+ return !(/[^\d.\-e]/.test(value) || Number((_value_match = value.match(/-/g)) === null || _value_match === void 0 ? void 0 : _value_match.length) > 2 || Number((_value_match1 = value.match(/\./g)) === null || _value_match1 === void 0 ? void 0 : _value_match1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
22141
22432
  }
22142
22433
 
22143
22434
  behavior.cut = (event, target, instance)=>{
@@ -22162,7 +22453,7 @@ function getValueOrTextContent(element) {
22162
22453
  function isVisible(element) {
22163
22454
  const window = getWindow(element);
22164
22455
  for(let el = element; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement){
22165
- const { display , visibility } = window.getComputedStyle(el);
22456
+ const { display, visibility } = window.getComputedStyle(el);
22166
22457
  if (display === 'none') {
22167
22458
  return false;
22168
22459
  }
@@ -22256,12 +22547,12 @@ function getTabDestination(activeElement, shift) {
22256
22547
  focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset
22257
22548
  });
22258
22549
  } else {
22259
- const selection1 = node.ownerDocument.getSelection();
22260
- if (!(selection1 === null || selection1 === void 0 ? void 0 : selection1.focusNode)) {
22550
+ const selection = node.ownerDocument.getSelection();
22551
+ if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) {
22261
22552
  return;
22262
22553
  }
22263
- if (selection1.isCollapsed) {
22264
- const nextPosition = getNextCursorPosition(selection1.focusNode, selection1.focusOffset, direction);
22554
+ if (selection.isCollapsed) {
22555
+ const nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);
22265
22556
  if (nextPosition) {
22266
22557
  setSelection({
22267
22558
  focusNode: nextPosition.node,
@@ -22269,7 +22560,7 @@ function getTabDestination(activeElement, shift) {
22269
22560
  });
22270
22561
  }
22271
22562
  } else {
22272
- selection1[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();
22563
+ selection[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();
22273
22564
  }
22274
22565
  }
22275
22566
  }
@@ -22284,8 +22575,8 @@ function getTabDestination(activeElement, shift) {
22284
22575
  focusOffset: getUIValue(target).length
22285
22576
  });
22286
22577
  }
22287
- var ref;
22288
- const focusNode = (ref = getContentEditable(target)) !== null && ref !== void 0 ? ref : target.ownerDocument.body;
22578
+ var _getContentEditable;
22579
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
22289
22580
  setSelection({
22290
22581
  focusNode,
22291
22582
  anchorOffset: 0,
@@ -22296,8 +22587,8 @@ function isAllSelected(target) {
22296
22587
  if (hasOwnSelection(target)) {
22297
22588
  return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;
22298
22589
  }
22299
- var ref;
22300
- const focusNode = (ref = getContentEditable(target)) !== null && ref !== void 0 ? ref : target.ownerDocument.body;
22590
+ var _getContentEditable;
22591
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
22301
22592
  const selection = target.ownerDocument.getSelection();
22302
22593
  return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;
22303
22594
  }
@@ -22307,7 +22598,7 @@ function isAllSelected(target) {
22307
22598
  *
22308
22599
  * Handles input elements and contenteditable if it only contains a single text node.
22309
22600
  */ function setSelectionRange(element, anchorOffset, focusOffset) {
22310
- var ref;
22601
+ var _element_firstChild;
22311
22602
  if (hasOwnSelection(element)) {
22312
22603
  return setSelection({
22313
22604
  focusNode: element,
@@ -22315,7 +22606,7 @@ function isAllSelected(target) {
22315
22606
  focusOffset
22316
22607
  });
22317
22608
  }
22318
- /* istanbul ignore else */ if (isContentEditable(element) && ((ref = element.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3) {
22609
+ /* istanbul ignore else */ if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === void 0 ? void 0 : _element_firstChild.nodeType) === 3) {
22319
22610
  return setSelection({
22320
22611
  focusNode: element.firstChild,
22321
22612
  anchorOffset,
@@ -22344,9 +22635,9 @@ function walkRadio(instance, el, direction) {
22344
22635
  }
22345
22636
 
22346
22637
  behavior.keydown = (event, target, instance)=>{
22347
- var ref;
22348
- var ref1;
22349
- return (ref1 = (ref = keydownBehavior[event.key]) === null || ref === void 0 ? void 0 : ref.call(keydownBehavior, event, target, instance)) !== null && ref1 !== void 0 ? ref1 : combinationBehavior(event, target, instance);
22638
+ var _keydownBehavior_event_key;
22639
+ var _keydownBehavior_event_key1;
22640
+ return (_keydownBehavior_event_key1 = (_keydownBehavior_event_key = keydownBehavior[event.key]) === null || _keydownBehavior_event_key === void 0 ? void 0 : _keydownBehavior_event_key.call(keydownBehavior, event, target, instance)) !== null && _keydownBehavior_event_key1 !== void 0 ? _keydownBehavior_event_key1 : combinationBehavior(event, target, instance);
22350
22641
  };
22351
22642
  const keydownBehavior = {
22352
22643
  ArrowDown: (event, target, instance)=>{
@@ -22399,9 +22690,9 @@ const keydownBehavior = {
22399
22690
  'textarea'
22400
22691
  ]) || isContentEditable(target)) {
22401
22692
  return ()=>{
22402
- var ref;
22403
- var ref1;
22404
- const newPos = (ref1 = (ref = getValueOrTextContent(target)) === null || ref === void 0 ? void 0 : ref.length) !== null && ref1 !== void 0 ? ref1 : /* istanbul ignore next */ 0;
22693
+ var _getValueOrTextContent;
22694
+ var _getValueOrTextContent_length;
22695
+ const newPos = (_getValueOrTextContent_length = (_getValueOrTextContent = getValueOrTextContent(target)) === null || _getValueOrTextContent === void 0 ? void 0 : _getValueOrTextContent.length) !== null && _getValueOrTextContent_length !== void 0 ? _getValueOrTextContent_length : /* istanbul ignore next */ 0;
22405
22696
  setSelectionRange(target, newPos, newPos);
22406
22697
  };
22407
22698
  }
@@ -22484,7 +22775,7 @@ const ClickInputOnEnter = [
22484
22775
  'file',
22485
22776
  'image',
22486
22777
  'reset',
22487
- 'submit',
22778
+ 'submit'
22488
22779
  ];
22489
22780
  const SubmitSingleInputOnEnter = [
22490
22781
  'email',
@@ -22494,12 +22785,12 @@ const SubmitSingleInputOnEnter = [
22494
22785
  'tel',
22495
22786
  'text',
22496
22787
  'url',
22497
- 'week',
22788
+ 'week'
22498
22789
  ];
22499
22790
 
22500
22791
  behavior.keyup = (event, target, instance)=>{
22501
- var ref;
22502
- return (ref = keyupBehavior[event.key]) === null || ref === void 0 ? void 0 : ref.call(keyupBehavior, event, target, instance);
22792
+ var _keyupBehavior_event_key;
22793
+ return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === void 0 ? void 0 : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);
22503
22794
  };
22504
22795
  const keyupBehavior = {
22505
22796
  ' ': (event, target, instance)=>{
@@ -22512,8 +22803,8 @@ const keyupBehavior = {
22512
22803
  behavior.paste = (event, target, instance)=>{
22513
22804
  if (isEditable(target)) {
22514
22805
  return ()=>{
22515
- var ref;
22516
- const insertData = (ref = event.clipboardData) === null || ref === void 0 ? void 0 : ref.getData('text');
22806
+ var _event_clipboardData;
22807
+ const insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === void 0 ? void 0 : _event_clipboardData.getData('text');
22517
22808
  if (insertData) {
22518
22809
  input(instance, target, insertData, 'insertFromPaste');
22519
22810
  }
@@ -23292,7 +23583,7 @@ const eventInitializer = {
23292
23583
  initUIEvent,
23293
23584
  initUIEventModififiers,
23294
23585
  initMouseEvent,
23295
- initPointerEvent,
23586
+ initPointerEvent
23296
23587
  ],
23297
23588
  KeyboardEvent: [
23298
23589
  initUIEvent,
@@ -23301,58 +23592,58 @@ const eventInitializer = {
23301
23592
  ]
23302
23593
  };
23303
23594
  function createEvent(type, target, init) {
23304
- var ref;
23595
+ var _eventInitializer_EventType;
23305
23596
  const window = getWindow(target);
23306
- const { EventType , defaultInit } = eventMap[eventMapKeys[type]];
23597
+ const { EventType, defaultInit } = eventMap[eventMapKeys[type]];
23307
23598
  const event = new (getEventConstructors(window))[EventType](type, defaultInit);
23308
- (ref = eventInitializer[EventType]) === null || ref === void 0 ? void 0 : ref.forEach((f)=>f(event, init !== null && init !== void 0 ? init : {}));
23599
+ (_eventInitializer_EventType = eventInitializer[EventType]) === null || _eventInitializer_EventType === void 0 ? void 0 : _eventInitializer_EventType.forEach((f)=>f(event, init !== null && init !== void 0 ? init : {}));
23309
23600
  return event;
23310
23601
  }
23311
23602
  /* istanbul ignore next */ function getEventConstructors(window) {
23312
- var _Event;
23313
- /* eslint-disable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ const Event = (_Event = window.Event) !== null && _Event !== void 0 ? _Event : class Event {
23603
+ var _window_Event;
23604
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ const Event = (_window_Event = window.Event) !== null && _window_Event !== void 0 ? _window_Event : class Event {
23314
23605
  };
23315
- var _AnimationEvent;
23316
- const AnimationEvent = (_AnimationEvent = window.AnimationEvent) !== null && _AnimationEvent !== void 0 ? _AnimationEvent : class AnimationEvent extends Event {
23606
+ var _window_AnimationEvent;
23607
+ const AnimationEvent = (_window_AnimationEvent = window.AnimationEvent) !== null && _window_AnimationEvent !== void 0 ? _window_AnimationEvent : class AnimationEvent extends Event {
23317
23608
  };
23318
- var _ClipboardEvent;
23319
- const ClipboardEvent = (_ClipboardEvent = window.ClipboardEvent) !== null && _ClipboardEvent !== void 0 ? _ClipboardEvent : class ClipboardEvent extends Event {
23609
+ var _window_ClipboardEvent;
23610
+ const ClipboardEvent = (_window_ClipboardEvent = window.ClipboardEvent) !== null && _window_ClipboardEvent !== void 0 ? _window_ClipboardEvent : class ClipboardEvent extends Event {
23320
23611
  };
23321
- var _PopStateEvent;
23322
- const PopStateEvent = (_PopStateEvent = window.PopStateEvent) !== null && _PopStateEvent !== void 0 ? _PopStateEvent : class PopStateEvent extends Event {
23612
+ var _window_PopStateEvent;
23613
+ const PopStateEvent = (_window_PopStateEvent = window.PopStateEvent) !== null && _window_PopStateEvent !== void 0 ? _window_PopStateEvent : class PopStateEvent extends Event {
23323
23614
  };
23324
- var _ProgressEvent;
23325
- const ProgressEvent = (_ProgressEvent = window.ProgressEvent) !== null && _ProgressEvent !== void 0 ? _ProgressEvent : class ProgressEvent extends Event {
23615
+ var _window_ProgressEvent;
23616
+ const ProgressEvent = (_window_ProgressEvent = window.ProgressEvent) !== null && _window_ProgressEvent !== void 0 ? _window_ProgressEvent : class ProgressEvent extends Event {
23326
23617
  };
23327
- var _TransitionEvent;
23328
- const TransitionEvent = (_TransitionEvent = window.TransitionEvent) !== null && _TransitionEvent !== void 0 ? _TransitionEvent : class TransitionEvent extends Event {
23618
+ var _window_TransitionEvent;
23619
+ const TransitionEvent = (_window_TransitionEvent = window.TransitionEvent) !== null && _window_TransitionEvent !== void 0 ? _window_TransitionEvent : class TransitionEvent extends Event {
23329
23620
  };
23330
- var _UIEvent;
23331
- const UIEvent = (_UIEvent = window.UIEvent) !== null && _UIEvent !== void 0 ? _UIEvent : class UIEvent extends Event {
23621
+ var _window_UIEvent;
23622
+ const UIEvent = (_window_UIEvent = window.UIEvent) !== null && _window_UIEvent !== void 0 ? _window_UIEvent : class UIEvent extends Event {
23332
23623
  };
23333
- var _CompositionEvent;
23334
- const CompositionEvent = (_CompositionEvent = window.CompositionEvent) !== null && _CompositionEvent !== void 0 ? _CompositionEvent : class CompositionEvent extends UIEvent {
23624
+ var _window_CompositionEvent;
23625
+ const CompositionEvent = (_window_CompositionEvent = window.CompositionEvent) !== null && _window_CompositionEvent !== void 0 ? _window_CompositionEvent : class CompositionEvent extends UIEvent {
23335
23626
  };
23336
- var _FocusEvent;
23337
- const FocusEvent = (_FocusEvent = window.FocusEvent) !== null && _FocusEvent !== void 0 ? _FocusEvent : class FocusEvent extends UIEvent {
23627
+ var _window_FocusEvent;
23628
+ const FocusEvent = (_window_FocusEvent = window.FocusEvent) !== null && _window_FocusEvent !== void 0 ? _window_FocusEvent : class FocusEvent extends UIEvent {
23338
23629
  };
23339
- var _InputEvent;
23340
- const InputEvent = (_InputEvent = window.InputEvent) !== null && _InputEvent !== void 0 ? _InputEvent : class InputEvent extends UIEvent {
23630
+ var _window_InputEvent;
23631
+ const InputEvent = (_window_InputEvent = window.InputEvent) !== null && _window_InputEvent !== void 0 ? _window_InputEvent : class InputEvent extends UIEvent {
23341
23632
  };
23342
- var _KeyboardEvent;
23343
- const KeyboardEvent = (_KeyboardEvent = window.KeyboardEvent) !== null && _KeyboardEvent !== void 0 ? _KeyboardEvent : class KeyboardEvent extends UIEvent {
23633
+ var _window_KeyboardEvent;
23634
+ const KeyboardEvent = (_window_KeyboardEvent = window.KeyboardEvent) !== null && _window_KeyboardEvent !== void 0 ? _window_KeyboardEvent : class KeyboardEvent extends UIEvent {
23344
23635
  };
23345
- var _MouseEvent;
23346
- const MouseEvent = (_MouseEvent = window.MouseEvent) !== null && _MouseEvent !== void 0 ? _MouseEvent : class MouseEvent extends UIEvent {
23636
+ var _window_MouseEvent;
23637
+ const MouseEvent = (_window_MouseEvent = window.MouseEvent) !== null && _window_MouseEvent !== void 0 ? _window_MouseEvent : class MouseEvent extends UIEvent {
23347
23638
  };
23348
- var _DragEvent;
23349
- const DragEvent = (_DragEvent = window.DragEvent) !== null && _DragEvent !== void 0 ? _DragEvent : class DragEvent extends MouseEvent {
23639
+ var _window_DragEvent;
23640
+ const DragEvent = (_window_DragEvent = window.DragEvent) !== null && _window_DragEvent !== void 0 ? _window_DragEvent : class DragEvent extends MouseEvent {
23350
23641
  };
23351
- var _PointerEvent;
23352
- const PointerEvent = (_PointerEvent = window.PointerEvent) !== null && _PointerEvent !== void 0 ? _PointerEvent : class PointerEvent extends MouseEvent {
23642
+ var _window_PointerEvent;
23643
+ const PointerEvent = (_window_PointerEvent = window.PointerEvent) !== null && _window_PointerEvent !== void 0 ? _window_PointerEvent : class PointerEvent extends MouseEvent {
23353
23644
  };
23354
- var _TouchEvent;
23355
- const TouchEvent = (_TouchEvent = window.TouchEvent) !== null && _TouchEvent !== void 0 ? _TouchEvent : class TouchEvent extends UIEvent {
23645
+ var _window_TouchEvent;
23646
+ const TouchEvent = (_window_TouchEvent = window.TouchEvent) !== null && _window_TouchEvent !== void 0 ? _window_TouchEvent : class TouchEvent extends UIEvent {
23356
23647
  };
23357
23648
  /* eslint-enable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ return {
23358
23649
  Event,
@@ -23382,25 +23673,25 @@ function assignProps(obj, props) {
23382
23673
  function sanitizeNumber(n) {
23383
23674
  return Number(n !== null && n !== void 0 ? n : 0);
23384
23675
  }
23385
- function initClipboardEvent(event, { clipboardData }) {
23676
+ function initClipboardEvent(event, { clipboardData }) {
23386
23677
  assignProps(event, {
23387
23678
  clipboardData
23388
23679
  });
23389
23680
  }
23390
- function initInputEvent(event, { data , inputType , isComposing }) {
23681
+ function initInputEvent(event, { data, inputType, isComposing }) {
23391
23682
  assignProps(event, {
23392
23683
  data,
23393
23684
  isComposing: Boolean(isComposing),
23394
23685
  inputType: String(inputType)
23395
23686
  });
23396
23687
  }
23397
- function initUIEvent(event, { view , detail }) {
23688
+ function initUIEvent(event, { view, detail }) {
23398
23689
  assignProps(event, {
23399
23690
  view,
23400
23691
  detail: sanitizeNumber(detail !== null && detail !== void 0 ? detail : 0)
23401
23692
  });
23402
23693
  }
23403
- function initUIEventModififiers(event, { altKey , ctrlKey , metaKey , shiftKey , modifierAltGraph , modifierCapsLock , modifierFn , modifierFnLock , modifierNumLock , modifierScrollLock , modifierSymbol , modifierSymbolLock }) {
23694
+ function initUIEventModififiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {
23404
23695
  assignProps(event, {
23405
23696
  altKey: Boolean(altKey),
23406
23697
  ctrlKey: Boolean(ctrlKey),
@@ -23424,7 +23715,7 @@ function initUIEventModififiers(event, { altKey , ctrlKey , metaKey , shiftKey ,
23424
23715
  }
23425
23716
  });
23426
23717
  }
23427
- function initKeyboardEvent(event, { key , code , location , repeat , isComposing , charCode }) {
23718
+ function initKeyboardEvent(event, { key, code, location, repeat, isComposing, charCode }) {
23428
23719
  assignProps(event, {
23429
23720
  key: String(key),
23430
23721
  code: String(code),
@@ -23434,7 +23725,7 @@ function initKeyboardEvent(event, { key , code , location , repeat , isComposing
23434
23725
  charCode
23435
23726
  });
23436
23727
  }
23437
- function initMouseEvent(event, { x , y , screenX , screenY , clientX =x , clientY =y , button , buttons , relatedTarget }) {
23728
+ function initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget }) {
23438
23729
  assignProps(event, {
23439
23730
  screenX: sanitizeNumber(screenX),
23440
23731
  screenY: sanitizeNumber(screenY),
@@ -23447,7 +23738,7 @@ function initMouseEvent(event, { x , y , screenX , screenY , clientX =x , client
23447
23738
  relatedTarget
23448
23739
  });
23449
23740
  }
23450
- function initPointerEvent(event, { pointerId , width , height , pressure , tangentialPressure , tiltX , tiltY , twist , pointerType , isPrimary }) {
23741
+ function initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary }) {
23451
23742
  assignProps(event, {
23452
23743
  pointerId: sanitizeNumber(pointerId),
23453
23744
  width: sanitizeNumber(width),
@@ -23473,9 +23764,9 @@ function dispatchUIEvent(target, type, init, preventDefault = false) {
23473
23764
  return dispatchEvent.call(this, target, event, preventDefault);
23474
23765
  }
23475
23766
  function dispatchEvent(target, event, preventDefault = false) {
23476
- var ref;
23767
+ var _behavior_type;
23477
23768
  const type = event.type;
23478
- const behaviorImplementation = preventDefault ? ()=>{} : (ref = behavior[type]) === null || ref === void 0 ? void 0 : ref(event, target, this);
23769
+ const behaviorImplementation = preventDefault ? ()=>{} : (_behavior_type = behavior[type]) === null || _behavior_type === void 0 ? void 0 : _behavior_type.call(behavior, event, target, this);
23479
23770
  if (behaviorImplementation) {
23480
23771
  event.preventDefault();
23481
23772
  let defaultPrevented = false;
@@ -23509,7 +23800,7 @@ function prepareInterceptor(element, propName, interceptorImpl) {
23509
23800
  throw new Error(`Element ${element.tagName} does not implement "${String(propName)}".`);
23510
23801
  }
23511
23802
  function intercept(...args) {
23512
- const { applyNative =false , realArgs , then , } = interceptorImpl.call(this, ...args);
23803
+ const { applyNative = false, realArgs, then } = interceptorImpl.call(this, ...args);
23513
23804
  const realFunc = (!applyNative && objectDescriptor || prototypeDescriptor)[target];
23514
23805
  if (target === 'set') {
23515
23806
  realFunc.call(this, realArgs);
@@ -23655,11 +23946,23 @@ function wait(config) {
23655
23946
  }
23656
23947
  return Promise.all([
23657
23948
  new Promise((resolve)=>globalThis.setTimeout(()=>resolve(), delay)),
23658
- config.advanceTimers(delay),
23949
+ config.advanceTimers(delay)
23659
23950
  ]);
23660
23951
  }
23661
23952
 
23662
- var _pressed, _code, _code1;
23953
+ function _define_property$6(obj, key, value) {
23954
+ if (key in obj) {
23955
+ Object.defineProperty(obj, key, {
23956
+ value: value,
23957
+ enumerable: true,
23958
+ configurable: true,
23959
+ writable: true
23960
+ });
23961
+ } else {
23962
+ obj[key] = value;
23963
+ }
23964
+ return obj;
23965
+ }
23663
23966
  var DOM_KEY_LOCATION;
23664
23967
  (function(DOM_KEY_LOCATION) {
23665
23968
  DOM_KEY_LOCATION[DOM_KEY_LOCATION["STANDARD"] = 0] = "STANDARD";
@@ -23674,7 +23977,7 @@ const modifierKeys = [
23674
23977
  'Fn',
23675
23978
  'Meta',
23676
23979
  'Shift',
23677
- 'Symbol',
23980
+ 'Symbol'
23678
23981
  ];
23679
23982
  function isModifierKey(key) {
23680
23983
  return modifierKeys.includes(key);
@@ -23684,7 +23987,7 @@ const modifierLocks = [
23684
23987
  'FnLock',
23685
23988
  'NumLock',
23686
23989
  'ScrollLock',
23687
- 'SymbolLock',
23990
+ 'SymbolLock'
23688
23991
  ];
23689
23992
  function isModifierLock(key) {
23690
23993
  return modifierLocks.includes(key);
@@ -23697,12 +24000,14 @@ class KeyboardHost {
23697
24000
  return Object.values(this.pressed).map((p)=>p.keyDef);
23698
24001
  }
23699
24002
  /** Press a key */ async keydown(instance, keyDef) {
24003
+ var // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
24004
+ _this_pressed, _code, _this_pressed_code;
23700
24005
  const key = String(keyDef.key);
23701
24006
  const code = String(keyDef.code);
23702
24007
  const target = getActiveElementOrBody(instance.config.document);
23703
24008
  this.setKeydownTarget(target);
23704
- var ref;
23705
- (ref = (_pressed = this.pressed)[_code = code]) !== null && ref !== void 0 ? ref : _pressed[_code] = {
24009
+ var _;
24010
+ (_ = (_this_pressed = this.pressed)[_code = code]) !== null && _ !== void 0 ? _ : _this_pressed[_code] = {
23706
24011
  keyDef,
23707
24012
  unpreventedDefault: false
23708
24013
  };
@@ -23717,7 +24022,7 @@ class KeyboardHost {
23717
24022
  this.modifiers[key] = true;
23718
24023
  this.modifierLockStart[key] = true;
23719
24024
  }
23720
- (_code1 = this.pressed[code]).unpreventedDefault || (_code1.unpreventedDefault = unprevented);
24025
+ (_this_pressed_code = this.pressed[code]).unpreventedDefault || (_this_pressed_code.unpreventedDefault = unprevented);
23721
24026
  if (unprevented && this.hasKeyPress(key)) {
23722
24027
  instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), 'keypress', {
23723
24028
  key,
@@ -23757,7 +24062,8 @@ class KeyboardHost {
23757
24062
  return (key.length === 1 || key === 'Enter') && !this.modifiers.Control && !this.modifiers.Alt;
23758
24063
  }
23759
24064
  constructor(system){
23760
- this.modifiers = {
24065
+ _define_property$6(this, "system", void 0);
24066
+ _define_property$6(this, "modifiers", {
23761
24067
  Alt: false,
23762
24068
  AltGraph: false,
23763
24069
  CapsLock: false,
@@ -23770,11 +24076,11 @@ class KeyboardHost {
23770
24076
  Shift: false,
23771
24077
  Symbol: false,
23772
24078
  SymbolLock: false
23773
- };
23774
- this.pressed = {};
23775
- this.carryChar = '';
23776
- this.lastKeydownTarget = undefined;
23777
- this.modifierLockStart = {};
24079
+ });
24080
+ _define_property$6(this, "pressed", {});
24081
+ _define_property$6(this, "carryChar", '');
24082
+ _define_property$6(this, "lastKeydownTarget", undefined);
24083
+ _define_property$6(this, "modifierLockStart", {});
23778
24084
  this.system = system;
23779
24085
  }
23780
24086
  }
@@ -23957,9 +24263,22 @@ const defaultKeyMap = [
23957
24263
  {
23958
24264
  name: 'TouchC',
23959
24265
  pointerType: 'touch'
23960
- },
24266
+ }
23961
24267
  ];
23962
24268
 
24269
+ function _define_property$5(obj, key, value) {
24270
+ if (key in obj) {
24271
+ Object.defineProperty(obj, key, {
24272
+ value: value,
24273
+ enumerable: true,
24274
+ configurable: true,
24275
+ writable: true
24276
+ });
24277
+ } else {
24278
+ obj[key] = value;
24279
+ }
24280
+ return obj;
24281
+ }
23963
24282
  class Buttons {
23964
24283
  getButtons() {
23965
24284
  let v = 0;
@@ -23993,7 +24312,7 @@ class Buttons {
23993
24312
  return undefined;
23994
24313
  }
23995
24314
  constructor(){
23996
- this.pressed = {};
24315
+ _define_property$5(this, "pressed", {});
23997
24316
  }
23998
24317
  }
23999
24318
  const MouseButton = {
@@ -24024,6 +24343,19 @@ function getMouseEventButton(button) {
24024
24343
  return button;
24025
24344
  }
24026
24345
 
24346
+ function _define_property$4(obj, key, value) {
24347
+ if (key in obj) {
24348
+ Object.defineProperty(obj, key, {
24349
+ value: value,
24350
+ enumerable: true,
24351
+ configurable: true,
24352
+ writable: true
24353
+ });
24354
+ } else {
24355
+ obj[key] = value;
24356
+ }
24357
+ return obj;
24358
+ }
24027
24359
  class Device {
24028
24360
  get countPressed() {
24029
24361
  return this.pressedKeys.size;
@@ -24038,7 +24370,7 @@ class Device {
24038
24370
  return this.pressedKeys.delete(keyDef.name);
24039
24371
  }
24040
24372
  constructor(){
24041
- this.pressedKeys = new Set();
24373
+ _define_property$4(this, "pressedKeys", new Set());
24042
24374
  }
24043
24375
  }
24044
24376
 
@@ -24048,8 +24380,8 @@ function getTreeDiff(a, b) {
24048
24380
  treeA.push(el);
24049
24381
  }
24050
24382
  const treeB = [];
24051
- for(let el1 = b; el1; el1 = el1.parentElement){
24052
- treeB.push(el1);
24383
+ for(let el = b; el; el = el.parentElement){
24384
+ treeB.push(el);
24053
24385
  }
24054
24386
  let i = 0;
24055
24387
  for(;; i++){
@@ -24060,11 +24392,11 @@ function getTreeDiff(a, b) {
24060
24392
  return [
24061
24393
  treeA.slice(0, treeA.length - i),
24062
24394
  treeB.slice(0, treeB.length - i),
24063
- treeB.slice(treeB.length - i),
24395
+ treeB.slice(treeB.length - i)
24064
24396
  ];
24065
24397
  }
24066
24398
 
24067
- function resolveCaretPosition({ target , node , offset }) {
24399
+ function resolveCaretPosition({ target, node, offset }) {
24068
24400
  if (hasOwnSelection(target)) {
24069
24401
  return {
24070
24402
  node: target,
@@ -24118,7 +24450,7 @@ function findNodeAtTextOffset(node, offset, isRoot = true) {
24118
24450
  };
24119
24451
  }
24120
24452
 
24121
- function setSelectionPerMouseDown({ document , target , clickCount , node , offset }) {
24453
+ function setSelectionPerMouseDown({ document, target, clickCount, node, offset }) {
24122
24454
  if (hasNoSelection(target)) {
24123
24455
  return;
24124
24456
  }
@@ -24147,12 +24479,12 @@ function setSelectionPerMouseDown({ document , target , clickCount , node , offs
24147
24479
  end: end !== null && end !== void 0 ? end : text.length
24148
24480
  };
24149
24481
  } else {
24150
- const { node: startNode , offset: startOffset } = resolveCaretPosition({
24482
+ const { node: startNode, offset: startOffset } = resolveCaretPosition({
24151
24483
  target,
24152
24484
  node,
24153
24485
  offset: start
24154
24486
  });
24155
- const { node: endNode , offset: endOffset } = resolveCaretPosition({
24487
+ const { node: endNode, offset: endOffset } = resolveCaretPosition({
24156
24488
  target,
24157
24489
  node,
24158
24490
  offset: end
@@ -24181,17 +24513,17 @@ function getTextRange(text, pos, clickCount) {
24181
24513
  if (clickCount % 3 === 2) {
24182
24514
  return [
24183
24515
  textPos - text.substr(0, pos).match(/(\w+|\s+|\W)?$/)[0].length,
24184
- pos === undefined ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length,
24516
+ pos === undefined ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length
24185
24517
  ];
24186
24518
  }
24187
24519
  // triple click
24188
24520
  return [
24189
24521
  textPos - text.substr(0, pos).match(/[^\r\n]*$/)[0].length,
24190
- pos === undefined ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length,
24522
+ pos === undefined ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length
24191
24523
  ];
24192
24524
  }
24193
24525
 
24194
- function modifySelectionPerMouseMove(selectionRange, { document , target , node , offset }) {
24526
+ function modifySelectionPerMouseMove(selectionRange, { document, target, node, offset }) {
24195
24527
  const selectionFocus = resolveCaretPosition({
24196
24528
  target,
24197
24529
  node,
@@ -24225,10 +24557,23 @@ function modifySelectionPerMouseMove(selectionRange, { document , target , node
24225
24557
  }
24226
24558
 
24227
24559
  function isDifferentPointerPosition(positionA, positionB) {
24228
- var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
24229
- return positionA.target !== positionB.target || ((ref = positionA.coords) === null || ref === void 0 ? void 0 : ref.x) !== ((ref1 = positionB.coords) === null || ref1 === void 0 ? void 0 : ref1.y) || ((ref2 = positionA.coords) === null || ref2 === void 0 ? void 0 : ref2.y) !== ((ref3 = positionB.coords) === null || ref3 === void 0 ? void 0 : ref3.y) || ((ref4 = positionA.caret) === null || ref4 === void 0 ? void 0 : ref4.node) !== ((ref5 = positionB.caret) === null || ref5 === void 0 ? void 0 : ref5.node) || ((ref6 = positionA.caret) === null || ref6 === void 0 ? void 0 : ref6.offset) !== ((ref7 = positionB.caret) === null || ref7 === void 0 ? void 0 : ref7.offset);
24560
+ var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;
24561
+ return positionA.target !== positionB.target || ((_positionA_coords = positionA.coords) === null || _positionA_coords === void 0 ? void 0 : _positionA_coords.x) !== ((_positionB_coords = positionB.coords) === null || _positionB_coords === void 0 ? void 0 : _positionB_coords.y) || ((_positionA_coords1 = positionA.coords) === null || _positionA_coords1 === void 0 ? void 0 : _positionA_coords1.y) !== ((_positionB_coords1 = positionB.coords) === null || _positionB_coords1 === void 0 ? void 0 : _positionB_coords1.y) || ((_positionA_caret = positionA.caret) === null || _positionA_caret === void 0 ? void 0 : _positionA_caret.node) !== ((_positionB_caret = positionB.caret) === null || _positionB_caret === void 0 ? void 0 : _positionB_caret.node) || ((_positionA_caret1 = positionA.caret) === null || _positionA_caret1 === void 0 ? void 0 : _positionA_caret1.offset) !== ((_positionB_caret1 = positionB.caret) === null || _positionB_caret1 === void 0 ? void 0 : _positionB_caret1.offset);
24230
24562
  }
24231
24563
 
24564
+ function _define_property$3(obj, key, value) {
24565
+ if (key in obj) {
24566
+ Object.defineProperty(obj, key, {
24567
+ value: value,
24568
+ enumerable: true,
24569
+ configurable: true,
24570
+ writable: true
24571
+ });
24572
+ } else {
24573
+ obj[key] = value;
24574
+ }
24575
+ return obj;
24576
+ }
24232
24577
  /**
24233
24578
  * This object is the single "virtual" mouse that might be controlled by multiple different pointer devices.
24234
24579
  */ class Mouse {
@@ -24326,39 +24671,40 @@ function isDifferentPointerPosition(positionA, positionB) {
24326
24671
  return init;
24327
24672
  }
24328
24673
  getTarget(instance) {
24329
- var _target;
24330
- return (_target = this.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
24674
+ var _this_position_target;
24675
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
24331
24676
  }
24332
24677
  startSelecting(instance, clickCount) {
24333
- var ref, ref1;
24678
+ var _this_position_caret, _this_position_caret1;
24334
24679
  // TODO: support extending range (shift)
24335
24680
  this.selecting = setSelectionPerMouseDown({
24336
24681
  document: instance.config.document,
24337
24682
  target: this.getTarget(instance),
24338
- node: (ref = this.position.caret) === null || ref === void 0 ? void 0 : ref.node,
24339
- offset: (ref1 = this.position.caret) === null || ref1 === void 0 ? void 0 : ref1.offset,
24683
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
24684
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset,
24340
24685
  clickCount
24341
24686
  });
24342
24687
  }
24343
24688
  modifySelecting(instance) {
24344
- var ref, ref1;
24689
+ var _this_position_caret, _this_position_caret1;
24345
24690
  if (!this.selecting) {
24346
24691
  return;
24347
24692
  }
24348
24693
  modifySelectionPerMouseMove(this.selecting, {
24349
24694
  document: instance.config.document,
24350
24695
  target: this.getTarget(instance),
24351
- node: (ref = this.position.caret) === null || ref === void 0 ? void 0 : ref.node,
24352
- offset: (ref1 = this.position.caret) === null || ref1 === void 0 ? void 0 : ref1.offset
24696
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
24697
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset
24353
24698
  });
24354
24699
  }
24355
24700
  endSelecting() {
24356
24701
  this.selecting = undefined;
24357
24702
  }
24358
24703
  constructor(){
24359
- this.position = {};
24360
- this.buttons = new Buttons();
24361
- this.buttonDownTarget = {};
24704
+ _define_property$3(this, "position", {});
24705
+ _define_property$3(this, "buttons", new Buttons());
24706
+ _define_property$3(this, "selecting", void 0);
24707
+ _define_property$3(this, "buttonDownTarget", {});
24362
24708
  // According to spec the `detail` on click events should be the number
24363
24709
  // of *consecutive* clicks with a specific button.
24364
24710
  // On `mousedown` and `mouseup` it should be this number increased by one.
@@ -24369,7 +24715,7 @@ function isDifferentPointerPosition(positionA, positionB) {
24369
24715
  // If there is a delay while a button is pressed,
24370
24716
  // the `mouseup` and `click` are normal, but a following `mousedown` starts a new click count.
24371
24717
  // We'll follow the minimal implementation of Webkit.
24372
- this.clickCount = new class {
24718
+ _define_property$3(this, "clickCount", new class {
24373
24719
  incOnClick(button) {
24374
24720
  const current = this.down[button] === undefined ? undefined : Number(this.down[button]) + 1;
24375
24721
  this.count = this.count[button] === undefined ? {} : {
@@ -24378,13 +24724,13 @@ function isDifferentPointerPosition(positionA, positionB) {
24378
24724
  return current;
24379
24725
  }
24380
24726
  getOnDown(button) {
24381
- var _button;
24727
+ var _this_count_button;
24382
24728
  this.down = {
24383
- [button]: (_button = this.count[button]) !== null && _button !== void 0 ? _button : 0
24729
+ [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== void 0 ? _this_count_button : 0
24384
24730
  };
24385
- var _button1;
24731
+ var _this_count_button1;
24386
24732
  this.count = {
24387
- [button]: (_button1 = this.count[button]) !== null && _button1 !== void 0 ? _button1 : 0
24733
+ [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== void 0 ? _this_count_button1 : 0
24388
24734
  };
24389
24735
  return Number(this.count[button]) + 1;
24390
24736
  }
@@ -24395,16 +24741,16 @@ function isDifferentPointerPosition(positionA, positionB) {
24395
24741
  this.count = {};
24396
24742
  }
24397
24743
  constructor(){
24398
- this.down = {};
24399
- this.count = {};
24744
+ _define_property$3(this, "down", {});
24745
+ _define_property$3(this, "count", {});
24400
24746
  }
24401
- }();
24747
+ }());
24402
24748
  }
24403
24749
  }
24404
24750
 
24405
24751
  function hasPointerEvents(instance, element) {
24406
- var ref;
24407
- return ((ref = checkPointerEvents(instance, element)) === null || ref === void 0 ? void 0 : ref.pointerEvents) !== 'none';
24752
+ var _checkPointerEvents;
24753
+ return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === void 0 ? void 0 : _checkPointerEvents.pointerEvents) !== 'none';
24408
24754
  }
24409
24755
  function closestPointerEventsDeclaration(element) {
24410
24756
  const window = getWindow(element);
@@ -24444,7 +24790,7 @@ function assertPointerEvents(instance, element) {
24444
24790
  throw new Error([
24445
24791
  `Unable to perform pointer interaction as the element ${declaration.tree.length > 1 ? 'inherits' : 'has'} \`pointer-events: none\`:`,
24446
24792
  '',
24447
- printTree(declaration.tree),
24793
+ printTree(declaration.tree)
24448
24794
  ].join('\n'));
24449
24795
  }
24450
24796
  }
@@ -24456,17 +24802,17 @@ function printTree(tree) {
24456
24802
  el.hasAttribute('data-testid') && `(testId=${el.getAttribute('data-testid')})`,
24457
24803
  getLabelDescr(el),
24458
24804
  tree.length > 1 && i === 0 && ' <-- This element declared `pointer-events: none`',
24459
- tree.length > 1 && i === tree.length - 1 && ' <-- Asserted pointer events here',
24805
+ tree.length > 1 && i === tree.length - 1 && ' <-- Asserted pointer events here'
24460
24806
  ].filter(Boolean).join('')).join('\n');
24461
24807
  }
24462
24808
  function getLabelDescr(element) {
24463
- var ref;
24809
+ var _element_labels;
24464
24810
  let label;
24465
24811
  if (element.hasAttribute('aria-label')) {
24466
24812
  label = element.getAttribute('aria-label');
24467
24813
  } else if (element.hasAttribute('aria-labelledby')) {
24468
- var ref1, ref2;
24469
- label = (ref1 = element.ownerDocument.getElementById(element.getAttribute('aria-labelledby'))) === null || ref1 === void 0 ? void 0 : (ref2 = ref1.textContent) === null || ref2 === void 0 ? void 0 : ref2.trim();
24814
+ var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;
24815
+ label = (_element_ownerDocument_getElementById = element.ownerDocument.getElementById(element.getAttribute('aria-labelledby'))) === null || _element_ownerDocument_getElementById === void 0 ? void 0 : (_element_ownerDocument_getElementById_textContent = _element_ownerDocument_getElementById.textContent) === null || _element_ownerDocument_getElementById_textContent === void 0 ? void 0 : _element_ownerDocument_getElementById_textContent.trim();
24470
24816
  } else if (isElementType(element, [
24471
24817
  'button',
24472
24818
  'input',
@@ -24474,15 +24820,15 @@ function getLabelDescr(element) {
24474
24820
  'output',
24475
24821
  'progress',
24476
24822
  'select',
24477
- 'textarea',
24478
- ]) && ((ref = element.labels) === null || ref === void 0 ? void 0 : ref.length)) {
24823
+ 'textarea'
24824
+ ]) && ((_element_labels = element.labels) === null || _element_labels === void 0 ? void 0 : _element_labels.length)) {
24479
24825
  label = Array.from(element.labels).map((el)=>{
24480
- var ref;
24481
- return (ref = el.textContent) === null || ref === void 0 ? void 0 : ref.trim();
24826
+ var _el_textContent;
24827
+ return (_el_textContent = el.textContent) === null || _el_textContent === void 0 ? void 0 : _el_textContent.trim();
24482
24828
  }).join('|');
24483
24829
  } else if (isElementType(element, 'button')) {
24484
- var ref3;
24485
- label = (ref3 = element.textContent) === null || ref3 === void 0 ? void 0 : ref3.trim();
24830
+ var _element_textContent;
24831
+ label = (_element_textContent = element.textContent) === null || _element_textContent === void 0 ? void 0 : _element_textContent.trim();
24486
24832
  }
24487
24833
  label = label === null || label === void 0 ? void 0 : label.replace(/\n/g, ' ');
24488
24834
  if (Number(label === null || label === void 0 ? void 0 : label.length) > 30) {
@@ -24496,6 +24842,19 @@ function hasBitFlag(conf, flag) {
24496
24842
  return (conf & flag) > 0;
24497
24843
  }
24498
24844
 
24845
+ function _define_property$2(obj, key, value) {
24846
+ if (key in obj) {
24847
+ Object.defineProperty(obj, key, {
24848
+ value: value,
24849
+ enumerable: true,
24850
+ configurable: true,
24851
+ writable: true
24852
+ });
24853
+ } else {
24854
+ obj[key] = value;
24855
+ }
24856
+ return obj;
24857
+ }
24499
24858
  class Pointer {
24500
24859
  init(instance, position) {
24501
24860
  this.position = position;
@@ -24569,8 +24928,8 @@ class Pointer {
24569
24928
  this.isCancelled = true;
24570
24929
  }
24571
24930
  getTarget(instance) {
24572
- var _target;
24573
- return (_target = this.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
24931
+ var _this_position_target;
24932
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
24574
24933
  }
24575
24934
  getEventInit() {
24576
24935
  return {
@@ -24580,12 +24939,15 @@ class Pointer {
24580
24939
  isPrimary: this.isPrimary
24581
24940
  };
24582
24941
  }
24583
- constructor({ pointerId , pointerType , isPrimary }){
24584
- this.isMultitouch = false;
24585
- this.isCancelled = false;
24586
- this.isDown = false;
24587
- this.isPrevented = false;
24588
- this.position = {};
24942
+ constructor({ pointerId, pointerType, isPrimary }){
24943
+ _define_property$2(this, "pointerId", void 0);
24944
+ _define_property$2(this, "pointerType", void 0);
24945
+ _define_property$2(this, "isPrimary", void 0);
24946
+ _define_property$2(this, "isMultitouch", false);
24947
+ _define_property$2(this, "isCancelled", false);
24948
+ _define_property$2(this, "isDown", false);
24949
+ _define_property$2(this, "isPrevented", false);
24950
+ _define_property$2(this, "position", {});
24589
24951
  this.pointerId = pointerId;
24590
24952
  this.pointerType = pointerType;
24591
24953
  this.isPrimary = isPrimary;
@@ -24593,7 +24955,19 @@ class Pointer {
24593
24955
  }
24594
24956
  }
24595
24957
 
24596
- var _registry, _k;
24958
+ function _define_property$1(obj, key, value) {
24959
+ if (key in obj) {
24960
+ Object.defineProperty(obj, key, {
24961
+ value: value,
24962
+ enumerable: true,
24963
+ configurable: true,
24964
+ writable: true
24965
+ });
24966
+ } else {
24967
+ obj[key] = value;
24968
+ }
24969
+ return obj;
24970
+ }
24597
24971
  class PointerHost {
24598
24972
  isKeyPressed(keyDef) {
24599
24973
  return this.devices.get(keyDef.pointerType).isPressed(keyDef);
@@ -24653,10 +25027,10 @@ class PointerHost {
24653
25027
  this.mouse.down(instance, keyDef, pointer);
24654
25028
  }
24655
25029
  if (!pointer.isMultitouch) {
24656
- const mousemove1 = this.mouse.move(instance, pointer.position);
24657
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.leave();
24658
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.enter();
24659
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.move();
25030
+ const mousemove = this.mouse.move(instance, pointer.position);
25031
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.leave();
25032
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.enter();
25033
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.move();
24660
25034
  this.mouse.up(instance, keyDef, pointer);
24661
25035
  }
24662
25036
  }
@@ -24671,25 +25045,30 @@ class PointerHost {
24671
25045
  this.mouse.resetClickCount();
24672
25046
  }
24673
25047
  getMouseTarget(instance) {
24674
- var _target;
24675
- return (_target = this.mouse.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
25048
+ var _this_mouse_position_target;
25049
+ return (_this_mouse_position_target = this.mouse.position.target) !== null && _this_mouse_position_target !== void 0 ? _this_mouse_position_target : instance.config.document.body;
24676
25050
  }
24677
25051
  setMousePosition(position) {
24678
25052
  this.mouse.position = position;
24679
25053
  this.pointers.get('mouse').position = position;
24680
25054
  }
24681
25055
  constructor(system){
24682
- this.devices = new class {
25056
+ _define_property$1(this, "system", void 0);
25057
+ _define_property$1(this, "mouse", void 0);
25058
+ _define_property$1(this, "buttons", void 0);
25059
+ _define_property$1(this, "devices", new class {
24683
25060
  get(k) {
24684
- var ref;
24685
- (ref = (_registry = this.registry)[_k = k]) !== null && ref !== void 0 ? ref : _registry[_k] = new Device();
25061
+ var // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
25062
+ _this_registry, _k;
25063
+ var _;
25064
+ (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== void 0 ? _ : _this_registry[_k] = new Device();
24686
25065
  return this.registry[k];
24687
25066
  }
24688
25067
  constructor(){
24689
- this.registry = {};
25068
+ _define_property$1(this, "registry", {});
24690
25069
  }
24691
- }();
24692
- this.pointers = new class {
25070
+ }());
25071
+ _define_property$1(this, "pointers", new class {
24693
25072
  new(pointerName, keyDef) {
24694
25073
  const isPrimary = keyDef.pointerType !== 'touch' || !Object.values(this.registry).some((p)=>p.pointerType === 'touch' && !p.isCancelled);
24695
25074
  if (!isPrimary) {
@@ -24716,22 +25095,35 @@ class PointerHost {
24716
25095
  return pointerName in this.registry;
24717
25096
  }
24718
25097
  constructor(){
24719
- this.registry = {
25098
+ _define_property$1(this, "registry", {
24720
25099
  mouse: new Pointer({
24721
25100
  pointerId: 1,
24722
25101
  pointerType: 'mouse',
24723
25102
  isPrimary: true
24724
25103
  })
24725
- };
24726
- this.nextId = 2;
25104
+ });
25105
+ _define_property$1(this, "nextId", 2);
24727
25106
  }
24728
- }();
25107
+ }());
24729
25108
  this.system = system;
24730
25109
  this.buttons = new Buttons();
24731
25110
  this.mouse = new Mouse();
24732
25111
  }
24733
25112
  }
24734
25113
 
25114
+ function _define_property(obj, key, value) {
25115
+ if (key in obj) {
25116
+ Object.defineProperty(obj, key, {
25117
+ value: value,
25118
+ enumerable: true,
25119
+ configurable: true,
25120
+ writable: true
25121
+ });
25122
+ } else {
25123
+ obj[key] = value;
25124
+ }
25125
+ return obj;
25126
+ }
24735
25127
  /**
24736
25128
  * @internal Do not create/alter this by yourself as this type might be subject to changes.
24737
25129
  */ class System {
@@ -24752,8 +25144,8 @@ class PointerHost {
24752
25144
  };
24753
25145
  }
24754
25146
  constructor(){
24755
- this.keyboard = new KeyboardHost(this);
24756
- this.pointer = new PointerHost(this);
25147
+ _define_property(this, "keyboard", new KeyboardHost(this));
25148
+ _define_property(this, "pointer", new PointerHost(this));
24757
25149
  }
24758
25150
  }
24759
25151
 
@@ -24799,7 +25191,7 @@ async function unhover$1(element) {
24799
25191
  });
24800
25192
  }
24801
25193
 
24802
- async function tab$1({ shift } = {}) {
25194
+ async function tab$1({ shift } = {}) {
24803
25195
  return this.keyboard(shift === true ? '{Shift>}{Tab}{/Shift}' : shift === false ? '[/ShiftLeft][/ShiftRight]{Tab}' : '{Tab}');
24804
25196
  }
24805
25197
 
@@ -24815,18 +25207,18 @@ async function tab$1({ shift } = {}) {
24815
25207
  */ function parseKeyDef$1(keyboardMap, text) {
24816
25208
  const defs = [];
24817
25209
  do {
24818
- const { type , descriptor , consumedLength , releasePrevious , releaseSelf =true , repeat , } = readNextDescriptor(text, 'keyboard');
24819
- var ref;
24820
- const keyDef = (ref = keyboardMap.find((def)=>{
25210
+ const { type, descriptor, consumedLength, releasePrevious, releaseSelf = true, repeat } = readNextDescriptor(text, 'keyboard');
25211
+ var _keyboardMap_find;
25212
+ const keyDef = (_keyboardMap_find = keyboardMap.find((def)=>{
24821
25213
  if (type === '[') {
24822
- var ref;
24823
- return ((ref = def.code) === null || ref === void 0 ? void 0 : ref.toLowerCase()) === descriptor.toLowerCase();
25214
+ var _def_code;
25215
+ return ((_def_code = def.code) === null || _def_code === void 0 ? void 0 : _def_code.toLowerCase()) === descriptor.toLowerCase();
24824
25216
  } else if (type === '{') {
24825
- var ref1;
24826
- return ((ref1 = def.key) === null || ref1 === void 0 ? void 0 : ref1.toLowerCase()) === descriptor.toLowerCase();
25217
+ var _def_key;
25218
+ return ((_def_key = def.key) === null || _def_key === void 0 ? void 0 : _def_key.toLowerCase()) === descriptor.toLowerCase();
24827
25219
  }
24828
25220
  return def.key === descriptor;
24829
- })) !== null && ref !== void 0 ? ref : {
25221
+ })) !== null && _keyboardMap_find !== void 0 ? _keyboardMap_find : {
24830
25222
  key: 'Unknown',
24831
25223
  code: 'Unknown',
24832
25224
  [type === '[' ? 'code' : 'key']: descriptor
@@ -24849,8 +25241,8 @@ async function keyboard$1(text) {
24849
25241
  await keyboardAction(this, actions[i]);
24850
25242
  }
24851
25243
  }
24852
- async function keyboardAction(instance, { keyDef , releasePrevious , releaseSelf , repeat }) {
24853
- const { system } = instance;
25244
+ async function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {
25245
+ const { system } = instance;
24854
25246
  // Release the key automatically if it was pressed before.
24855
25247
  if (system.keyboard.isKeyPressed(keyDef)) {
24856
25248
  await system.keyboard.keyup(instance, keyDef);
@@ -24896,8 +25288,8 @@ function readSelectedValueFromInput(target) {
24896
25288
 
24897
25289
  async function copy$1() {
24898
25290
  const doc = this.config.document;
24899
- var _activeElement;
24900
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
25291
+ var _doc_activeElement;
25292
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
24901
25293
  const clipboardData = copySelection(target);
24902
25294
  if (clipboardData.items.length === 0) {
24903
25295
  return;
@@ -24912,8 +25304,8 @@ async function copy$1() {
24912
25304
 
24913
25305
  async function cut$1() {
24914
25306
  const doc = this.config.document;
24915
- var _activeElement;
24916
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
25307
+ var _doc_activeElement;
25308
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
24917
25309
  const clipboardData = copySelection(target);
24918
25310
  if (clipboardData.items.length === 0) {
24919
25311
  return;
@@ -24928,10 +25320,10 @@ async function cut$1() {
24928
25320
 
24929
25321
  async function paste$1(clipboardData) {
24930
25322
  const doc = this.config.document;
24931
- var _activeElement;
24932
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
24933
- var ref;
24934
- const dataTransfer = (ref = typeof clipboardData === 'string' ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && ref !== void 0 ? ref : await readDataTransferFromClipboard(doc).catch(()=>{
25323
+ var _doc_activeElement;
25324
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
25325
+ var _ref;
25326
+ const dataTransfer = (_ref = typeof clipboardData === 'string' ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== void 0 ? _ref : await readDataTransferFromClipboard(doc).catch(()=>{
24935
25327
  throw new Error('`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.');
24936
25328
  });
24937
25329
  this.dispatchUIEvent(target, 'paste', {
@@ -24947,7 +25339,7 @@ function getClipboardDataFromString(doc, text) {
24947
25339
  function parseKeyDef(pointerMap, keys) {
24948
25340
  const defs = [];
24949
25341
  do {
24950
- const { descriptor , consumedLength , releasePrevious , releaseSelf =true , } = readNextDescriptor(keys, 'pointer');
25342
+ const { descriptor, consumedLength, releasePrevious, releaseSelf = true } = readNextDescriptor(keys, 'pointer');
24951
25343
  const keyDef = pointerMap.find((p)=>p.name === descriptor);
24952
25344
  if (keyDef) {
24953
25345
  defs.push({
@@ -24962,7 +25354,7 @@ function parseKeyDef(pointerMap, keys) {
24962
25354
  }
24963
25355
 
24964
25356
  async function pointer$1(input) {
24965
- const { pointerMap } = this.config;
25357
+ const { pointerMap } = this.config;
24966
25358
  const actions = [];
24967
25359
  (Array.isArray(input) ? input : [
24968
25360
  input
@@ -24985,16 +25377,16 @@ async function pointer$1(input) {
24985
25377
  this.system.pointer.resetClickCount();
24986
25378
  }
24987
25379
  async function pointerAction(instance, action) {
24988
- var ref, ref1;
25380
+ var _previousPosition_caret, _previousPosition_caret1;
24989
25381
  const pointerName = 'pointerName' in action && action.pointerName ? action.pointerName : 'keyDef' in action ? instance.system.pointer.getPointerName(action.keyDef) : 'mouse';
24990
25382
  const previousPosition = instance.system.pointer.getPreviousPosition(pointerName);
24991
- var _target, _coords, _node, _offset;
25383
+ var _action_target, _action_coords, _action_node, _action_offset;
24992
25384
  const position = {
24993
- target: (_target = action.target) !== null && _target !== void 0 ? _target : getPrevTarget(instance, previousPosition),
24994
- coords: (_coords = action.coords) !== null && _coords !== void 0 ? _coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
25385
+ target: (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : getPrevTarget(instance, previousPosition),
25386
+ coords: (_action_coords = action.coords) !== null && _action_coords !== void 0 ? _action_coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
24995
25387
  caret: {
24996
- node: (_node = action.node) !== null && _node !== void 0 ? _node : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (ref = previousPosition.caret) === null || ref === void 0 ? void 0 : ref.node,
24997
- offset: (_offset = action.offset) !== null && _offset !== void 0 ? _offset : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (ref1 = previousPosition.caret) === null || ref1 === void 0 ? void 0 : ref1.offset
25388
+ node: (_action_node = action.node) !== null && _action_node !== void 0 ? _action_node : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret = previousPosition.caret) === null || _previousPosition_caret === void 0 ? void 0 : _previousPosition_caret.node,
25389
+ offset: (_action_offset = action.offset) !== null && _action_offset !== void 0 ? _action_offset : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret1 = previousPosition.caret) === null || _previousPosition_caret1 === void 0 ? void 0 : _previousPosition_caret1.offset
24998
25390
  }
24999
25391
  };
25000
25392
  if ('keyDef' in action) {
@@ -25016,15 +25408,15 @@ async function pointerAction(instance, action) {
25016
25408
  }
25017
25409
  }
25018
25410
  function hasCaretPosition(action) {
25019
- var _target, ref;
25020
- return !!((ref = (_target = action.target) !== null && _target !== void 0 ? _target : action.node) !== null && ref !== void 0 ? ref : action.offset !== undefined);
25411
+ var _action_target, _ref;
25412
+ return !!((_ref = (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : action.node) !== null && _ref !== void 0 ? _ref : action.offset !== undefined);
25021
25413
  }
25022
25414
  function getPrevTarget(instance, position) {
25023
25415
  if (!position) {
25024
25416
  throw new Error('This pointer has no previous position. Provide a target property!');
25025
25417
  }
25026
- var _target;
25027
- return (_target = position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
25418
+ var _position_target;
25419
+ return (_position_target = position.target) !== null && _position_target !== void 0 ? _position_target : instance.config.document.body;
25028
25420
  }
25029
25421
 
25030
25422
  async function clear$1(element) {
@@ -25042,6 +25434,7 @@ async function clear$1(element) {
25042
25434
  input(this, element, '', 'deleteContentBackward');
25043
25435
  }
25044
25436
 
25437
+ const { getConfig: getConfig$1 } = named$1;
25045
25438
  async function selectOptions$1(select, values) {
25046
25439
  return selectOptionsBase.call(this, true, select, values);
25047
25440
  }
@@ -25050,7 +25443,7 @@ async function deselectOptions$1(select, values) {
25050
25443
  }
25051
25444
  async function selectOptionsBase(newValue, select, values) {
25052
25445
  if (!newValue && !select.multiple) {
25053
- throw getConfig().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
25446
+ throw getConfig$1().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
25054
25447
  }
25055
25448
  const valArray = Array.isArray(values) ? values : [
25056
25449
  values
@@ -25064,7 +25457,7 @@ async function selectOptionsBase(newValue, select, values) {
25064
25457
  if (matchingOption) {
25065
25458
  return matchingOption;
25066
25459
  } else {
25067
- throw getConfig().getElementError(`Value "${String(val)}" not found in options`, select);
25460
+ throw getConfig$1().getElementError(`Value "${String(val)}" not found in options`, select);
25068
25461
  }
25069
25462
  }
25070
25463
  }).filter((option)=>!isDisabled(option));
@@ -25105,15 +25498,15 @@ async function selectOptionsBase(newValue, select, values) {
25105
25498
  await wait(this.config);
25106
25499
  }
25107
25500
  } else if (selectedOptions.length === 1) {
25108
- const withPointerEvents1 = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
25501
+ const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
25109
25502
  // the click to open the select options
25110
- if (withPointerEvents1) {
25503
+ if (withPointerEvents) {
25111
25504
  await this.click(select);
25112
25505
  } else {
25113
25506
  focusElement(select);
25114
25507
  }
25115
25508
  selectOption(selectedOptions[0]);
25116
- if (withPointerEvents1) {
25509
+ if (withPointerEvents) {
25117
25510
  // the browser triggers another click event on the select for the click on the option
25118
25511
  // this second click has no 'down' phase
25119
25512
  this.dispatchUIEvent(select, 'pointerover');
@@ -25126,19 +25519,19 @@ async function selectOptionsBase(newValue, select, values) {
25126
25519
  }
25127
25520
  await wait(this.config);
25128
25521
  } else {
25129
- throw getConfig().getElementError(`Cannot select multiple options on a non-multiple select`, select);
25522
+ throw getConfig$1().getElementError(`Cannot select multiple options on a non-multiple select`, select);
25130
25523
  }
25131
25524
  } else if (select.getAttribute('role') === 'listbox') {
25132
- for (const option1 of selectedOptions){
25133
- await this.click(option1);
25134
- await this.unhover(option1);
25525
+ for (const option of selectedOptions){
25526
+ await this.click(option);
25527
+ await this.unhover(option);
25135
25528
  }
25136
25529
  } else {
25137
- throw getConfig().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
25530
+ throw getConfig$1().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
25138
25531
  }
25139
25532
  }
25140
25533
 
25141
- async function type$1(element, text, { skipClick =this.config.skipClick , skipAutoClose =this.config.skipAutoClose , initialSelectionStart , initialSelectionEnd } = {}) {
25534
+ async function type$1(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {
25142
25535
  // TODO: properly type guard
25143
25536
  // we use this workaround for now to prevent changing behavior
25144
25537
  if (element.disabled) return;
@@ -25167,8 +25560,8 @@ function restoreProperty(obj, prop, descriptor) {
25167
25560
  }
25168
25561
  }
25169
25562
  function setFiles(el, files) {
25170
- var ref;
25171
- (ref = el[fakeFiles]) === null || ref === void 0 ? void 0 : ref.restore();
25563
+ var _el_fakeFiles;
25564
+ (_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === void 0 ? void 0 : _el_fakeFiles.restore();
25172
25565
  const typeDescr = Object.getOwnPropertyDescriptor(el, 'type');
25173
25566
  const valueDescr = Object.getOwnPropertyDescriptor(el, 'value');
25174
25567
  const filesDescr = Object.getOwnPropertyDescriptor(el, 'files');
@@ -25192,8 +25585,8 @@ function setFiles(el, files) {
25192
25585
  if (v === '') {
25193
25586
  restore();
25194
25587
  } else {
25195
- var ref;
25196
- valueDescr === null || valueDescr === void 0 ? void 0 : (ref = valueDescr.set) === null || ref === void 0 ? void 0 : ref.call(el, v);
25588
+ var _valueDescr_set;
25589
+ valueDescr === null || valueDescr === void 0 ? void 0 : (_valueDescr_set = valueDescr.set) === null || _valueDescr_set === void 0 ? void 0 : _valueDescr_set.call(el, v);
25197
25590
  }
25198
25591
  }
25199
25592
  },
@@ -25222,11 +25615,11 @@ async function upload$1(element, fileOrFiles) {
25222
25615
  fileOrFiles
25223
25616
  ]).filter((file)=>!this.config.applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? undefined : 1);
25224
25617
  const fileDialog = ()=>{
25225
- var ref;
25618
+ var _input_files;
25226
25619
  // do not fire an input event if the file selection does not change
25227
- if (files.length === ((ref = input.files) === null || ref === void 0 ? void 0 : ref.length) && files.every((f, i)=>{
25228
- var ref;
25229
- return f === ((ref = input.files) === null || ref === void 0 ? void 0 : ref.item(i));
25620
+ if (files.length === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.length) && files.every((f, i)=>{
25621
+ var _input_files;
25622
+ return f === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.item(i));
25230
25623
  })) {
25231
25624
  return;
25232
25625
  }
@@ -25258,26 +25651,26 @@ function isAcceptableFile(file, accept) {
25258
25651
  });
25259
25652
  }
25260
25653
 
25261
- var api = /*#__PURE__*/Object.freeze({
25262
- __proto__: null,
25263
- clear: clear$1,
25264
- click: click$1,
25265
- copy: copy$1,
25266
- cut: cut$1,
25267
- dblClick: dblClick$1,
25268
- deselectOptions: deselectOptions$1,
25269
- hover: hover$1,
25270
- keyboard: keyboard$1,
25271
- paste: paste$1,
25272
- pointer: pointer$1,
25273
- selectOptions: selectOptions$1,
25274
- tab: tab$1,
25275
- tripleClick: tripleClick$1,
25276
- type: type$1,
25277
- unhover: unhover$1,
25278
- upload: upload$1
25279
- });
25280
-
25654
+ const userEventApi = {
25655
+ click: click$1,
25656
+ dblClick: dblClick$1,
25657
+ tripleClick: tripleClick$1,
25658
+ hover: hover$1,
25659
+ unhover: unhover$1,
25660
+ tab: tab$1,
25661
+ keyboard: keyboard$1,
25662
+ copy: copy$1,
25663
+ cut: cut$1,
25664
+ paste: paste$1,
25665
+ pointer: pointer$1,
25666
+ clear: clear$1,
25667
+ deselectOptions: deselectOptions$1,
25668
+ selectOptions: selectOptions$1,
25669
+ type: type$1,
25670
+ upload: upload$1
25671
+ };
25672
+
25673
+ const { getConfig } = named$1;
25281
25674
  /**
25282
25675
  * Wrap an internal Promise
25283
25676
  */ function wrapAsync(implementation) {
@@ -25320,18 +25713,18 @@ function createConfig(options = {}, defaults = defaultOptionsSetup, node) {
25320
25713
  */ function setupMain(options = {}) {
25321
25714
  const config = createConfig(options);
25322
25715
  prepareDocument(config.document);
25323
- var _defaultView;
25324
- const view = (_defaultView = config.document.defaultView) !== null && _defaultView !== void 0 ? _defaultView : /* istanbul ignore next */ globalThis.window;
25716
+ var _config_document_defaultView;
25717
+ const view = (_config_document_defaultView = config.document.defaultView) !== null && _config_document_defaultView !== void 0 ? _config_document_defaultView : /* istanbul ignore next */ globalThis.window;
25325
25718
  attachClipboardStubToView(view);
25326
25719
  return createInstance(config).api;
25327
25720
  }
25328
25721
  /**
25329
25722
  * Setup in direct call per `userEvent.anyApi()`
25330
- */ function setupDirect({ keyboardState , pointerState , ...options } = {}, node) {
25723
+ */ function setupDirect({ keyboardState, pointerState, ...options } = {}, node) {
25331
25724
  const config = createConfig(options, defaultOptionsDirect, node);
25332
25725
  prepareDocument(config.document);
25333
- var ref;
25334
- const system = (ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && ref !== void 0 ? ref : new System();
25726
+ var _ref;
25727
+ const system = (_ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && _ref !== void 0 ? _ref : new System();
25335
25728
  return {
25336
25729
  api: createInstance(config, system).api,
25337
25730
  system
@@ -25366,22 +25759,22 @@ function createInstance(config, system = new System()) {
25366
25759
  dispatchUIEvent: dispatchUIEvent.bind(instance),
25367
25760
  system,
25368
25761
  levelRefs: {},
25369
- ...api
25762
+ ...userEventApi
25370
25763
  });
25371
25764
  return {
25372
25765
  instance,
25373
25766
  api: {
25374
- ...Object.fromEntries(Object.entries(api).map(([name, api])=>[
25767
+ ...Object.fromEntries(Object.entries(userEventApi).map(([name, api])=>[
25375
25768
  name,
25376
- wrapAndBindImpl(instance, api),
25769
+ wrapAndBindImpl(instance, api)
25377
25770
  ])),
25378
25771
  setup: setupSub.bind(instance)
25379
25772
  }
25380
25773
  };
25381
25774
  }
25382
25775
  function getDocument(options, node, defaults) {
25383
- var _document, ref;
25384
- return (ref = (_document = options.document) !== null && _document !== void 0 ? _document : node && getDocumentFromNode(node)) !== null && ref !== void 0 ? ref : defaults.document;
25776
+ var _options_document, _ref;
25777
+ return (_ref = (_options_document = options.document) !== null && _options_document !== void 0 ? _options_document : node && getDocumentFromNode(node)) !== null && _ref !== void 0 ? _ref : defaults.document;
25385
25778
  }
25386
25779
 
25387
25780
  function clear(element) {
@@ -25406,11 +25799,11 @@ function hover(element, options = {}) {
25406
25799
  return setupDirect(options).api.hover(element);
25407
25800
  }
25408
25801
  async function keyboard(text, options = {}) {
25409
- const { api , system } = setupDirect(options);
25802
+ const { api, system } = setupDirect(options);
25410
25803
  return api.keyboard(text).then(()=>system);
25411
25804
  }
25412
25805
  async function pointer(input, options = {}) {
25413
- const { api , system } = setupDirect(options);
25806
+ const { api, system } = setupDirect(options);
25414
25807
  return api.pointer(input).then(()=>system);
25415
25808
  }
25416
25809
  function paste(clipboardData, options) {
@@ -25426,7 +25819,7 @@ function type(element, text, options = {}) {
25426
25819
  return setupDirect(options, element).api.type(element, text, options);
25427
25820
  }
25428
25821
  function unhover(element, options = {}) {
25429
- const { api , system } = setupDirect(options);
25822
+ const { api, system } = setupDirect(options);
25430
25823
  system.pointer.setMousePosition({
25431
25824
  target: element
25432
25825
  });