@linzjs/step-ag-grid 17.7.0 → 17.9.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 (44) hide show
  1. package/dist/src/components/Grid.d.ts +1 -0
  2. package/dist/src/components/GridNoRowsOverlay.d.ts +3 -1
  3. package/dist/src/contexts/GridContext.d.ts +1 -0
  4. package/dist/step-ag-grid.cjs.js +1115 -706
  5. package/dist/step-ag-grid.cjs.js.map +1 -1
  6. package/dist/step-ag-grid.esm.js +1117 -708
  7. package/dist/step-ag-grid.esm.js.map +1 -1
  8. package/package.json +47 -46
  9. package/src/components/Grid.tsx +42 -22
  10. package/src/components/GridNoRowsOverlay.tsx +27 -3
  11. package/src/contexts/GridContext.tsx +4 -0
  12. package/src/contexts/GridContextProvider.tsx +5 -0
  13. package/src/stories/components/ActionButton.stories.tsx +3 -3
  14. package/src/stories/grid/GridDragRow.stories.tsx +3 -3
  15. package/src/stories/grid/GridFilterButtons.stories.tsx +3 -3
  16. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +3 -3
  17. package/src/stories/grid/GridNonEditableRow.stories.tsx +3 -3
  18. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +3 -3
  19. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +3 -3
  20. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +3 -3
  21. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +3 -3
  22. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +3 -3
  23. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +3 -3
  24. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +3 -3
  25. package/src/stories/grid/GridReadOnly.stories.tsx +26 -8
  26. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +3 -3
  27. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +3 -3
  28. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +3 -3
  29. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +3 -3
  30. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +3 -3
  31. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +3 -3
  32. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +3 -3
  33. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +3 -3
  34. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +3 -3
  35. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +3 -3
  36. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +3 -3
  37. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +3 -3
  38. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +3 -3
  39. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +3 -3
  40. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +3 -3
  41. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +3 -3
  42. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +3 -3
  43. package/src/stories/react-menu/ReactMenu.stories.tsx +3 -3
  44. 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,
@@ -152,6 +203,9 @@ const GridContext = createContext({
152
203
  setOnCellEditingComplete: () => {
153
204
  console.error("no context provider for setOnCellEditingComplete");
154
205
  },
206
+ showNoRowsOverlay: () => {
207
+ console.error("no context provider for showLoadingOverlay");
208
+ },
155
209
  });
156
210
  const useGridContext = () => useContext(GridContext);
157
211
 
@@ -170,53 +224,6 @@ const GridUpdatingContext = createContext({
170
224
  updatedDep: 0,
171
225
  });
172
226
 
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
227
  const isNotEmpty = negate(isEmpty);
221
228
  const wait$1 = (timeoutMs) => new Promise((resolve) => {
222
229
  setTimeout(resolve, timeoutMs);
@@ -269,11 +276,21 @@ const sanitiseFileName = (filename) => {
269
276
  return valid.slice(0, -fileExt.length - 1).slice(0, 64) + "." + fileExt;
270
277
  };
271
278
 
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" });
279
+ const GridLoadingOverlayComponent = (props) => (jsx("div", { style: {
280
+ left: 0,
281
+ top: 0,
282
+ bottom: 0,
283
+ right: 0,
284
+ position: "absolute",
285
+ backgroundColor: "rgba(255,255,255,0.5)",
286
+ }, 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, {}) }) }) }));
287
+ const GridNoRowsOverlay = (props) => {
288
+ if (props.loading)
289
+ return jsx(GridLoadingOverlayComponent, { headerRowHeight: props.headerRowHeight });
290
+ if (props.rowCount === 0)
291
+ return jsx("div", { children: props.noRowsOverlayText ?? "There are currently no rows" });
292
+ if (props.filteredRowCount === 0)
293
+ return jsx("div", { children: "All rows have been filtered" });
277
294
  return jsx("span", {});
278
295
  };
279
296
 
@@ -2324,10 +2341,9 @@ const useGridContextMenu = ({ contextMenuSelectRow, contextMenu: ContextMenu, })
2324
2341
  /**
2325
2342
  * Wrapper for AgGrid to add commonly used functionality.
2326
2343
  */
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 }) => {
2328
- const { gridReady, gridRenderState, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, } = useContext(GridContext);
2344
+ 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 }) => {
2345
+ const { gridReady, gridRenderState, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, showNoRowsOverlay, prePopupOps, stopEditing, } = useContext(GridContext);
2329
2346
  const { checkUpdating, updatedDep, updatingCols } = useContext(GridUpdatingContext);
2330
- const { prePopupOps } = useContext(GridContext);
2331
2347
  const gridDivRef = useRef(null);
2332
2348
  const lastSelectedIds = useRef([]);
2333
2349
  const [staleGrid, setStaleGrid] = useState(false);
@@ -2383,23 +2399,20 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2383
2399
  /**
2384
2400
  * Auto-size windows that had deferred auto-size
2385
2401
  */
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
- }
2395
- }
2396
- if (needsAutoSize.current) {
2397
- needsAutoSize.current = false;
2398
- setInitialContentSize();
2402
+ useInterval(() => {
2403
+ // Check if window has been popped out and needs resize
2404
+ const currentDocument = gridDivRef.current?.ownerDocument;
2405
+ if (currentDocument !== lastOwnerDocumentRef.current) {
2406
+ lastOwnerDocumentRef.current = currentDocument;
2407
+ if (currentDocument) {
2408
+ needsAutoSize.current = true;
2399
2409
  }
2400
- },
2401
- timeoutMs: 200,
2402
- });
2410
+ }
2411
+ if (needsAutoSize.current) {
2412
+ needsAutoSize.current = false;
2413
+ setInitialContentSize();
2414
+ }
2415
+ }, 200);
2403
2416
  /**
2404
2417
  * On data load select the first row of the grid if required.
2405
2418
  */
@@ -2497,7 +2510,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2497
2510
  const columnDefs = useMemo(() => {
2498
2511
  const adjustColDefs = params.columnDefs.map((colDef) => {
2499
2512
  const colDefEditable = colDef.editable;
2500
- const editable = combineEditables(params.readOnly !== true, params.defaultColDef?.editable, colDefEditable);
2513
+ const editable = combineEditables(params.loading !== true && params.readOnly !== true, params.defaultColDef?.editable, colDefEditable);
2501
2514
  return {
2502
2515
  ...colDef,
2503
2516
  editable,
@@ -2544,6 +2557,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2544
2557
  params.columnDefs,
2545
2558
  params.selectable,
2546
2559
  params.onRowDragEnd,
2560
+ params.loading,
2547
2561
  params.readOnly,
2548
2562
  params.defaultColDef?.editable,
2549
2563
  selectColumnPinned,
@@ -2707,6 +2721,15 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2707
2721
  });
2708
2722
  }
2709
2723
  }, [autoSizeColumns, getColDef, sizeColumns, updatedDep, updatingCols]);
2724
+ const prevLoading = useRef(false);
2725
+ useEffect(() => {
2726
+ const newLoading = !rowData || params.loading === true;
2727
+ if (newLoading && !prevLoading.current) {
2728
+ stopEditing();
2729
+ showNoRowsOverlay();
2730
+ }
2731
+ prevLoading.current = newLoading;
2732
+ }, [params.loading, rowData, showNoRowsOverlay, stopEditing]);
2710
2733
  /**
2711
2734
  * Resize columns to fit if required on window/container resize
2712
2735
  */
@@ -2775,12 +2798,13 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2775
2798
  }, [params]);
2776
2799
  // This is setting a ref in the GridContext so won't be triggering an update loop
2777
2800
  setOnCellEditingComplete(params.onCellEditingComplete);
2801
+ const headerRowCount = columnDefs.some((c) => c.children) ? 2 : 1;
2778
2802
  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
2803
  setInitialContentSize();
2780
2804
  }, 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
2805
  let rowCount = 0;
2782
2806
  event.api.forEachNode(() => rowCount++);
2783
- return (jsx(GridNoRowsOverlay, { rowCount: rowCount, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
2807
+ return (jsx(GridNoRowsOverlay, { loading: !rowData || params.loading === true, rowCount: rowCount, headerRowHeight: headerRowCount * rowHeight, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
2784
2808
  }, 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
2809
  };
2786
2810
 
@@ -3093,6 +3117,41 @@ const GridFilterQuick = ({ quickFilterPlaceholder, defaultValue }) => {
3093
3117
 
3094
3118
  const GridFilters = ({ children }) => (jsx("div", { className: "Grid-container-filters", children: children }));
3095
3119
 
3120
+ /**
3121
+ * Cancels timeouts on scope being destroyed.
3122
+ *
3123
+ * This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
3124
+ * This could have been implemented using debounce if the callers function was wrapped in useCallback,
3125
+ * but there's no way to enforce that, so it would lead to bugs.
3126
+ */
3127
+ const useTimeoutHook = () => {
3128
+ const timeout = useRef();
3129
+ /**
3130
+ * Clear any pending timeouts.
3131
+ */
3132
+ const clearTimeouts = () => {
3133
+ if (timeout.current) {
3134
+ const tc = timeout.current;
3135
+ timeout.current = undefined;
3136
+ clearTimeout(tc);
3137
+ }
3138
+ };
3139
+ /**
3140
+ * Call this when your action has completed.
3141
+ */
3142
+ const invoke = useCallback((fn, waitTimeMs) => {
3143
+ clearTimeouts();
3144
+ timeout.current = setTimeout(fn, waitTimeMs);
3145
+ }, []);
3146
+ /**
3147
+ * Clear timeout on loss of scope.
3148
+ */
3149
+ useEffect(() => {
3150
+ return () => clearTimeouts();
3151
+ }, []);
3152
+ return invoke;
3153
+ };
3154
+
3096
3155
  /**
3097
3156
  * Defers state change up to a minimum time since last state change.
3098
3157
  */
@@ -4978,6 +5037,9 @@ const GridContextProvider = (props) => {
4978
5037
  const isExternalFilterPresent = () => !isEmpty(externalFilters.current);
4979
5038
  const doesExternalFilterPass = (node) => externalFilters.current.every((filter) => filter(node.data, node));
4980
5039
  const getColDef = useCallback((colId) => (!!colId && gridApi?.getColumnDef(colId)) || undefined, [gridApi]);
5040
+ const showNoRowsOverlay = useCallback(() => {
5041
+ gridApi?.showNoRowsOverlay();
5042
+ }, [gridApi]);
4981
5043
  /**
4982
5044
  * Apply column visibility
4983
5045
  */
@@ -5063,6 +5125,7 @@ const GridContextProvider = (props) => {
5063
5125
  doesExternalFilterPass,
5064
5126
  downloadCsv,
5065
5127
  setOnCellEditingComplete,
5128
+ showNoRowsOverlay,
5066
5129
  }, children: props.children }));
5067
5130
  };
5068
5131
  /**
@@ -6451,31 +6514,6 @@ var ReactElement = {};
6451
6514
 
6452
6515
  var reactIs = {exports: {}};
6453
6516
 
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
6517
  var reactIs_development = {};
6480
6518
 
6481
6519
  /** @license React v17.0.2
@@ -6707,6 +6745,31 @@ function requireReactIs_development () {
6707
6745
  return reactIs_development;
6708
6746
  }
6709
6747
 
6748
+ var reactIs_production_min = {};
6749
+
6750
+ /** @license React v17.0.2
6751
+ * react-is.production.min.js
6752
+ *
6753
+ * Copyright (c) Facebook, Inc. and its affiliates.
6754
+ *
6755
+ * This source code is licensed under the MIT license found in the
6756
+ * LICENSE file in the root directory of this source tree.
6757
+ */
6758
+
6759
+ var hasRequiredReactIs_production_min;
6760
+
6761
+ function requireReactIs_production_min () {
6762
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
6763
+ hasRequiredReactIs_production_min = 1;
6764
+ 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;
6765
+ 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");}
6766
+ 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;
6767
+ 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};
6768
+ 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};
6769
+ reactIs_production_min.typeOf=y;
6770
+ return reactIs_production_min;
6771
+ }
6772
+
6710
6773
  if (process.env.NODE_ENV === 'production') {
6711
6774
  reactIs.exports = requireReactIs_production_min();
6712
6775
  } else {
@@ -6963,7 +7026,7 @@ ReactTestComponent.default = _default$2j;
6963
7026
  Object.defineProperty(build$1, '__esModule', {
6964
7027
  value: true
6965
7028
  });
6966
- build$1.default = build$1.DEFAULT_OPTIONS = void 0;
7029
+ var default_1 = build$1.default = DEFAULT_OPTIONS_1 = build$1.DEFAULT_OPTIONS = void 0;
6967
7030
  var format_1 = build$1.format = format;
6968
7031
  var plugins_1 = build$1.plugins = void 0;
6969
7032
 
@@ -7382,7 +7445,7 @@ const DEFAULT_OPTIONS = {
7382
7445
  printFunctionName: true,
7383
7446
  theme: DEFAULT_THEME
7384
7447
  };
7385
- build$1.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
7448
+ var DEFAULT_OPTIONS_1 = build$1.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
7386
7449
 
7387
7450
  function validateOptions(options) {
7388
7451
  Object.keys(options).forEach(key => {
@@ -7457,7 +7520,7 @@ const getEscapeString = options =>
7457
7520
  ? options.escapeString
7458
7521
  : DEFAULT_OPTIONS.escapeString;
7459
7522
 
7460
- const getConfig$1 = options => {
7523
+ const getConfig$4 = options => {
7461
7524
  var _options$printBasicPr;
7462
7525
 
7463
7526
  return {
@@ -7524,7 +7587,7 @@ function format(val, options) {
7524
7587
  const plugin = findPlugin(options.plugins, val);
7525
7588
 
7526
7589
  if (plugin !== null) {
7527
- return printPlugin(plugin, val, getConfig$1(options), '', 0, []);
7590
+ return printPlugin(plugin, val, getConfig$4(options), '', 0, []);
7528
7591
  }
7529
7592
  }
7530
7593
  }
@@ -7540,7 +7603,7 @@ function format(val, options) {
7540
7603
  return basicResult;
7541
7604
  }
7542
7605
 
7543
- return printComplexValue(val, getConfig$1(options), '', 0, []);
7606
+ return printComplexValue(val, getConfig$4(options), '', 0, []);
7544
7607
  }
7545
7608
 
7546
7609
  const plugins = {
@@ -7554,7 +7617,15 @@ const plugins = {
7554
7617
  };
7555
7618
  plugins_1 = build$1.plugins = plugins;
7556
7619
  var _default$2i = format;
7557
- build$1.default = _default$2i;
7620
+ default_1 = build$1.default = _default$2i;
7621
+
7622
+ var index = /*#__PURE__*/_mergeNamespaces({
7623
+ __proto__: null,
7624
+ get DEFAULT_OPTIONS () { return DEFAULT_OPTIONS_1; },
7625
+ get default () { return default_1; },
7626
+ format: format_1,
7627
+ get plugins () { return plugins_1; }
7628
+ }, [build$1]);
7558
7629
 
7559
7630
  /**
7560
7631
  * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}
@@ -14435,10 +14506,10 @@ var test = {
14435
14506
  foo: {}
14436
14507
  };
14437
14508
 
14438
- var $Object = Object;
14509
+ var $Object$1 = Object;
14439
14510
 
14440
14511
  var hasProto$1 = function hasProto() {
14441
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
14512
+ return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object$1);
14442
14513
  };
14443
14514
 
14444
14515
  /* eslint no-invalid-this: 1 */
@@ -14502,9 +14573,9 @@ var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
14502
14573
 
14503
14574
  var undefined$1;
14504
14575
 
14505
- var $SyntaxError = SyntaxError;
14576
+ var $SyntaxError$1 = SyntaxError;
14506
14577
  var $Function = Function;
14507
- var $TypeError$1 = TypeError;
14578
+ var $TypeError$4 = TypeError;
14508
14579
 
14509
14580
  // eslint-disable-next-line consistent-return
14510
14581
  var getEvalledConstructor = function (expressionSyntax) {
@@ -14523,7 +14594,7 @@ if ($gOPD$2) {
14523
14594
  }
14524
14595
 
14525
14596
  var throwTypeError = function () {
14526
- throw new $TypeError$1();
14597
+ throw new $TypeError$4();
14527
14598
  };
14528
14599
  var ThrowTypeError = $gOPD$2
14529
14600
  ? (function () {
@@ -14610,10 +14681,10 @@ var INTRINSICS = {
14610
14681
  '%String%': String,
14611
14682
  '%StringIteratorPrototype%': hasSymbols$4 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1,
14612
14683
  '%Symbol%': hasSymbols$4 ? Symbol : undefined$1,
14613
- '%SyntaxError%': $SyntaxError,
14684
+ '%SyntaxError%': $SyntaxError$1,
14614
14685
  '%ThrowTypeError%': ThrowTypeError,
14615
14686
  '%TypedArray%': TypedArray,
14616
- '%TypeError%': $TypeError$1,
14687
+ '%TypeError%': $TypeError$4,
14617
14688
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
14618
14689
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
14619
14690
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
@@ -14728,9 +14799,9 @@ var stringToPath = function stringToPath(string) {
14728
14799
  var first = $strSlice(string, 0, 1);
14729
14800
  var last = $strSlice(string, -1);
14730
14801
  if (first === '%' && last !== '%') {
14731
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
14802
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
14732
14803
  } else if (last === '%' && first !== '%') {
14733
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
14804
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
14734
14805
  }
14735
14806
  var result = [];
14736
14807
  $replace$1(string, rePropName, function (match, number, quote, subString) {
@@ -14754,7 +14825,7 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
14754
14825
  value = doEval(intrinsicName);
14755
14826
  }
14756
14827
  if (typeof value === 'undefined' && !allowMissing) {
14757
- throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
14828
+ throw new $TypeError$4('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
14758
14829
  }
14759
14830
 
14760
14831
  return {
@@ -14764,19 +14835,19 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
14764
14835
  };
14765
14836
  }
14766
14837
 
14767
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
14838
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
14768
14839
  };
14769
14840
 
14770
14841
  var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14771
14842
  if (typeof name !== 'string' || name.length === 0) {
14772
- throw new $TypeError$1('intrinsic name must be a non-empty string');
14843
+ throw new $TypeError$4('intrinsic name must be a non-empty string');
14773
14844
  }
14774
14845
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
14775
- throw new $TypeError$1('"allowMissing" argument must be a boolean');
14846
+ throw new $TypeError$4('"allowMissing" argument must be a boolean');
14776
14847
  }
14777
14848
 
14778
14849
  if ($exec$1(/^%?[^%]*%?$/, name) === null) {
14779
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
14850
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
14780
14851
  }
14781
14852
  var parts = stringToPath(name);
14782
14853
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
@@ -14803,7 +14874,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14803
14874
  )
14804
14875
  && first !== last
14805
14876
  ) {
14806
- throw new $SyntaxError('property names with quotes must have matching quotes');
14877
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
14807
14878
  }
14808
14879
  if (part === 'constructor' || !isOwn) {
14809
14880
  skipFurtherCaching = true;
@@ -14817,7 +14888,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14817
14888
  } else if (value != null) {
14818
14889
  if (!(part in value)) {
14819
14890
  if (!allowMissing) {
14820
- throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
14891
+ throw new $TypeError$4('base intrinsic for ' + name + ' exists, but the property is not available.');
14821
14892
  }
14822
14893
  return void undefined$1;
14823
14894
  }
@@ -14850,14 +14921,14 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14850
14921
  return value;
14851
14922
  };
14852
14923
 
14853
- var GetIntrinsic$6 = getIntrinsic;
14924
+ var GetIntrinsic$7 = getIntrinsic;
14854
14925
 
14855
- var $defineProperty = GetIntrinsic$6('%Object.defineProperty%', true);
14926
+ var $defineProperty$1 = GetIntrinsic$7('%Object.defineProperty%', true);
14856
14927
 
14857
14928
  var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
14858
- if ($defineProperty) {
14929
+ if ($defineProperty$1) {
14859
14930
  try {
14860
- $defineProperty({}, 'a', { value: 1 });
14931
+ $defineProperty$1({}, 'a', { value: 1 });
14861
14932
  return true;
14862
14933
  } catch (e) {
14863
14934
  // IE 8 has a broken defineProperty
@@ -14873,7 +14944,7 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
14873
14944
  return null;
14874
14945
  }
14875
14946
  try {
14876
- return $defineProperty([], 'length', { value: 1 }).length !== 1;
14947
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
14877
14948
  } catch (e) {
14878
14949
  // In Firefox 4-22, defining length on an array throws an exception.
14879
14950
  return true;
@@ -14882,20 +14953,92 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
14882
14953
 
14883
14954
  var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
14884
14955
 
14956
+ var GetIntrinsic$6 = getIntrinsic;
14957
+
14958
+ var $gOPD$1 = GetIntrinsic$6('%Object.getOwnPropertyDescriptor%', true);
14959
+
14960
+ if ($gOPD$1) {
14961
+ try {
14962
+ $gOPD$1([], 'length');
14963
+ } catch (e) {
14964
+ // IE 8 has a broken gOPD
14965
+ $gOPD$1 = null;
14966
+ }
14967
+ }
14968
+
14969
+ var gopd$1 = $gOPD$1;
14970
+
14971
+ var hasPropertyDescriptors = hasPropertyDescriptors_1();
14972
+
14973
+ var GetIntrinsic$5 = getIntrinsic;
14974
+
14975
+ var $defineProperty = hasPropertyDescriptors && GetIntrinsic$5('%Object.defineProperty%', true);
14976
+
14977
+ var $SyntaxError = GetIntrinsic$5('%SyntaxError%');
14978
+ var $TypeError$3 = GetIntrinsic$5('%TypeError%');
14979
+
14980
+ var gopd = gopd$1;
14981
+
14982
+ /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
14983
+ var defineDataProperty$1 = function defineDataProperty(
14984
+ obj,
14985
+ property,
14986
+ value
14987
+ ) {
14988
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
14989
+ throw new $TypeError$3('`obj` must be an object or a function`');
14990
+ }
14991
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
14992
+ throw new $TypeError$3('`property` must be a string or a symbol`');
14993
+ }
14994
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
14995
+ throw new $TypeError$3('`nonEnumerable`, if provided, must be a boolean or null');
14996
+ }
14997
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
14998
+ throw new $TypeError$3('`nonWritable`, if provided, must be a boolean or null');
14999
+ }
15000
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
15001
+ throw new $TypeError$3('`nonConfigurable`, if provided, must be a boolean or null');
15002
+ }
15003
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
15004
+ throw new $TypeError$3('`loose`, if provided, must be a boolean');
15005
+ }
15006
+
15007
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
15008
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
15009
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
15010
+ var loose = arguments.length > 6 ? arguments[6] : false;
15011
+
15012
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
15013
+ var desc = !!gopd && gopd(obj, property);
15014
+
15015
+ if ($defineProperty) {
15016
+ $defineProperty(obj, property, {
15017
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
15018
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
15019
+ value: value,
15020
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
15021
+ });
15022
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
15023
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
15024
+ obj[property] = value; // eslint-disable-line no-param-reassign
15025
+ } else {
15026
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
15027
+ }
15028
+ };
15029
+
14885
15030
  var keys$2 = objectKeys$2;
14886
15031
  var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
14887
15032
 
14888
15033
  var toStr$7 = Object.prototype.toString;
14889
15034
  var concat = Array.prototype.concat;
14890
- var origDefineProperty = Object.defineProperty;
15035
+ var defineDataProperty = defineDataProperty$1;
14891
15036
 
14892
15037
  var isFunction = function (fn) {
14893
15038
  return typeof fn === 'function' && toStr$7.call(fn) === '[object Function]';
14894
15039
  };
14895
15040
 
14896
- var hasPropertyDescriptors = hasPropertyDescriptors_1();
14897
-
14898
- var supportsDescriptors$2 = origDefineProperty && hasPropertyDescriptors;
15041
+ var supportsDescriptors$2 = hasPropertyDescriptors_1();
14899
15042
 
14900
15043
  var defineProperty$1 = function (object, name, value, predicate) {
14901
15044
  if (name in object) {
@@ -14907,15 +15050,11 @@ var defineProperty$1 = function (object, name, value, predicate) {
14907
15050
  return;
14908
15051
  }
14909
15052
  }
15053
+
14910
15054
  if (supportsDescriptors$2) {
14911
- origDefineProperty(object, name, {
14912
- configurable: true,
14913
- enumerable: false,
14914
- value: value,
14915
- writable: true
14916
- });
15055
+ defineDataProperty(object, name, value, true);
14917
15056
  } else {
14918
- object[name] = value; // eslint-disable-line no-param-reassign
15057
+ defineDataProperty(object, name, value);
14919
15058
  }
14920
15059
  };
14921
15060
 
@@ -14934,7 +15073,7 @@ defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
14934
15073
 
14935
15074
  var defineProperties_1 = defineProperties$1;
14936
15075
 
14937
- var callBind$5 = {exports: {}};
15076
+ var callBind$6 = {exports: {}};
14938
15077
 
14939
15078
  (function (module) {
14940
15079
 
@@ -14983,20 +15122,20 @@ var callBind$5 = {exports: {}};
14983
15122
  } else {
14984
15123
  module.exports.apply = applyBind;
14985
15124
  }
14986
- } (callBind$5));
15125
+ } (callBind$6));
14987
15126
 
14988
- var callBindExports = callBind$5.exports;
15127
+ var callBindExports = callBind$6.exports;
14989
15128
 
14990
- var GetIntrinsic$5 = getIntrinsic;
15129
+ var GetIntrinsic$4 = getIntrinsic;
14991
15130
 
14992
- var callBind$4 = callBindExports;
15131
+ var callBind$5 = callBindExports;
14993
15132
 
14994
- var $indexOf$1 = callBind$4(GetIntrinsic$5('String.prototype.indexOf'));
15133
+ var $indexOf$1 = callBind$5(GetIntrinsic$4('String.prototype.indexOf'));
14995
15134
 
14996
- var callBound$c = function callBoundIntrinsic(name, allowMissing) {
14997
- var intrinsic = GetIntrinsic$5(name, !!allowMissing);
15135
+ var callBound$b = function callBoundIntrinsic(name, allowMissing) {
15136
+ var intrinsic = GetIntrinsic$4(name, !!allowMissing);
14998
15137
  if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
14999
- return callBind$4(intrinsic);
15138
+ return callBind$5(intrinsic);
15000
15139
  }
15001
15140
  return intrinsic;
15002
15141
  };
@@ -15004,10 +15143,10 @@ var callBound$c = function callBoundIntrinsic(name, allowMissing) {
15004
15143
  // modified from https://github.com/es-shims/es6-shim
15005
15144
  var objectKeys$1 = objectKeys$2;
15006
15145
  var hasSymbols$2 = shams$1();
15007
- var callBound$b = callBound$c;
15146
+ var callBound$a = callBound$b;
15008
15147
  var toObject = Object;
15009
- var $push = callBound$b('Array.prototype.push');
15010
- var $propIsEnumerable = callBound$b('Object.prototype.propertyIsEnumerable');
15148
+ var $push = callBound$a('Array.prototype.push');
15149
+ var $propIsEnumerable = callBound$a('Object.prototype.propertyIsEnumerable');
15011
15150
  var originalGetSymbols = hasSymbols$2 ? Object.getOwnPropertySymbols : null;
15012
15151
 
15013
15152
  // eslint-disable-next-line no-unused-vars
@@ -15100,12 +15239,12 @@ var polyfill$4 = function getPolyfill() {
15100
15239
  return Object.assign;
15101
15240
  };
15102
15241
 
15103
- var define$3 = defineProperties_1;
15242
+ var define$4 = defineProperties_1;
15104
15243
  var getPolyfill$5 = polyfill$4;
15105
15244
 
15106
15245
  var shim$5 = function shimAssign() {
15107
15246
  var polyfill = getPolyfill$5();
15108
- define$3(
15247
+ define$4(
15109
15248
  Object,
15110
15249
  { assign: polyfill },
15111
15250
  { assign: function () { return Object.assign !== polyfill; } }
@@ -15114,13 +15253,13 @@ var shim$5 = function shimAssign() {
15114
15253
  };
15115
15254
 
15116
15255
  var defineProperties = defineProperties_1;
15117
- var callBind$3 = callBindExports;
15256
+ var callBind$4 = callBindExports;
15118
15257
 
15119
15258
  var implementation$6 = implementation$8;
15120
15259
  var getPolyfill$4 = polyfill$4;
15121
15260
  var shim$4 = shim$5;
15122
15261
 
15123
- var polyfill$3 = callBind$3.apply(getPolyfill$4());
15262
+ var polyfill$3 = callBind$4.apply(getPolyfill$4());
15124
15263
  // eslint-disable-next-line no-unused-vars
15125
15264
  var bound = function assign(target, source1) {
15126
15265
  return polyfill$3(Object, arguments);
@@ -15134,27 +15273,25 @@ defineProperties(bound, {
15134
15273
 
15135
15274
  var object_assign = bound;
15136
15275
 
15137
- var implementation$5 = {exports: {}};
15138
-
15139
15276
  var functionsHaveNames = function functionsHaveNames() {
15140
15277
  return typeof function f() {}.name === 'string';
15141
15278
  };
15142
15279
 
15143
- var gOPD$4 = Object.getOwnPropertyDescriptor;
15144
- if (gOPD$4) {
15280
+ var gOPD$3 = Object.getOwnPropertyDescriptor;
15281
+ if (gOPD$3) {
15145
15282
  try {
15146
- gOPD$4([], 'length');
15283
+ gOPD$3([], 'length');
15147
15284
  } catch (e) {
15148
15285
  // IE 8 has a broken gOPD
15149
- gOPD$4 = null;
15286
+ gOPD$3 = null;
15150
15287
  }
15151
15288
  }
15152
15289
 
15153
15290
  functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
15154
- if (!functionsHaveNames() || !gOPD$4) {
15291
+ if (!functionsHaveNames() || !gOPD$3) {
15155
15292
  return false;
15156
15293
  }
15157
- var desc = gOPD$4(function () {}, 'name');
15294
+ var desc = gOPD$3(function () {}, 'name');
15158
15295
  return !!desc && !!desc.configurable;
15159
15296
  };
15160
15297
 
@@ -15166,60 +15303,72 @@ functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames()
15166
15303
 
15167
15304
  var functionsHaveNames_1 = functionsHaveNames;
15168
15305
 
15169
- (function (module) {
15170
-
15171
- var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
15306
+ var define$3 = defineDataProperty$1;
15307
+ var hasDescriptors = hasPropertyDescriptors_1();
15308
+ var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
15172
15309
 
15173
- var $Object = Object;
15174
- var $TypeError = TypeError;
15310
+ var $TypeError$2 = TypeError;
15175
15311
 
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';
15312
+ var setFunctionName$1 = function setFunctionName(fn, name) {
15313
+ if (typeof fn !== 'function') {
15314
+ throw new $TypeError$2('`fn` is not a function');
15315
+ }
15316
+ var loose = arguments.length > 2 && !!arguments[2];
15317
+ if (!loose || functionsHaveConfigurableNames) {
15318
+ if (hasDescriptors) {
15319
+ define$3(fn, 'name', name, true, true);
15320
+ } else {
15321
+ define$3(fn, 'name', name);
15204
15322
  }
15205
- return result;
15206
- };
15323
+ }
15324
+ return fn;
15325
+ };
15207
15326
 
15208
- if (functionsHaveConfigurableNames && Object.defineProperty) {
15209
- Object.defineProperty(module.exports, 'name', { value: 'get flags' });
15210
- }
15211
- } (implementation$5));
15327
+ var setFunctionName = setFunctionName$1;
15212
15328
 
15213
- var implementationExports = implementation$5.exports;
15329
+ var $Object = Object;
15330
+ var $TypeError$1 = TypeError;
15214
15331
 
15215
- var implementation$4 = implementationExports;
15332
+ var implementation$5 = setFunctionName(function flags() {
15333
+ if (this != null && this !== $Object(this)) {
15334
+ throw new $TypeError$1('RegExp.prototype.flags getter called on non-object');
15335
+ }
15336
+ var result = '';
15337
+ if (this.hasIndices) {
15338
+ result += 'd';
15339
+ }
15340
+ if (this.global) {
15341
+ result += 'g';
15342
+ }
15343
+ if (this.ignoreCase) {
15344
+ result += 'i';
15345
+ }
15346
+ if (this.multiline) {
15347
+ result += 'm';
15348
+ }
15349
+ if (this.dotAll) {
15350
+ result += 's';
15351
+ }
15352
+ if (this.unicode) {
15353
+ result += 'u';
15354
+ }
15355
+ if (this.unicodeSets) {
15356
+ result += 'v';
15357
+ }
15358
+ if (this.sticky) {
15359
+ result += 'y';
15360
+ }
15361
+ return result;
15362
+ }, 'get flags', true);
15363
+
15364
+ var implementation$4 = implementation$5;
15216
15365
 
15217
15366
  var supportsDescriptors$1 = defineProperties_1.supportsDescriptors;
15218
- var $gOPD$1 = Object.getOwnPropertyDescriptor;
15367
+ var $gOPD = Object.getOwnPropertyDescriptor;
15219
15368
 
15220
15369
  var polyfill$2 = function getPolyfill() {
15221
15370
  if (supportsDescriptors$1 && (/a/mig).flags === 'gim') {
15222
- var descriptor = $gOPD$1(RegExp.prototype, 'flags');
15371
+ var descriptor = $gOPD(RegExp.prototype, 'flags');
15223
15372
  if (
15224
15373
  descriptor
15225
15374
  && typeof descriptor.get === 'function'
@@ -15249,7 +15398,7 @@ var polyfill$2 = function getPolyfill() {
15249
15398
 
15250
15399
  var supportsDescriptors = defineProperties_1.supportsDescriptors;
15251
15400
  var getPolyfill$3 = polyfill$2;
15252
- var gOPD$3 = Object.getOwnPropertyDescriptor;
15401
+ var gOPD$2 = Object.getOwnPropertyDescriptor;
15253
15402
  var defineProperty = Object.defineProperty;
15254
15403
  var TypeErr = TypeError;
15255
15404
  var getProto = Object.getPrototypeOf;
@@ -15261,7 +15410,7 @@ var shim$3 = function shimFlags() {
15261
15410
  }
15262
15411
  var polyfill = getPolyfill$3();
15263
15412
  var proto = getProto(regex);
15264
- var descriptor = gOPD$3(proto, 'flags');
15413
+ var descriptor = gOPD$2(proto, 'flags');
15265
15414
  if (!descriptor || descriptor.get !== polyfill) {
15266
15415
  defineProperty(proto, 'flags', {
15267
15416
  configurable: true,
@@ -15273,13 +15422,13 @@ var shim$3 = function shimFlags() {
15273
15422
  };
15274
15423
 
15275
15424
  var define$2 = defineProperties_1;
15276
- var callBind$2 = callBindExports;
15425
+ var callBind$3 = callBindExports;
15277
15426
 
15278
- var implementation$3 = implementationExports;
15427
+ var implementation$3 = implementation$5;
15279
15428
  var getPolyfill$2 = polyfill$2;
15280
15429
  var shim$2 = shim$3;
15281
15430
 
15282
- var flagsBound = callBind$2(getPolyfill$2());
15431
+ var flagsBound = callBind$3(getPolyfill$2());
15283
15432
 
15284
15433
  define$2(flagsBound, {
15285
15434
  getPolyfill: getPolyfill$2,
@@ -15320,7 +15469,7 @@ var booleanValueOf = Boolean.prototype.valueOf;
15320
15469
  var objectToString = Object.prototype.toString;
15321
15470
  var functionToString = Function.prototype.toString;
15322
15471
  var $match = String.prototype.match;
15323
- var $slice$2 = String.prototype.slice;
15472
+ var $slice$1 = String.prototype.slice;
15324
15473
  var $replace = String.prototype.replace;
15325
15474
  var $toUpperCase = String.prototype.toUpperCase;
15326
15475
  var $toLowerCase = String.prototype.toLowerCase;
@@ -15362,7 +15511,7 @@ function addNumericSeparator(num, str) {
15362
15511
  var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
15363
15512
  if (int !== num) {
15364
15513
  var intStr = String(int);
15365
- var dec = $slice$2.call(str, intStr.length + 1);
15514
+ var dec = $slice$1.call(str, intStr.length + 1);
15366
15515
  return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
15367
15516
  }
15368
15517
  }
@@ -15547,7 +15696,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
15547
15696
  var ys = arrObjKeys(obj, inspect);
15548
15697
  var isPlainObject = gPO$1 ? gPO$1(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
15549
15698
  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' : '';
15699
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice$1.call(toStr$6(obj), 8, -1) : protoTag ? 'Object' : '';
15551
15700
  var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
15552
15701
  var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
15553
15702
  if (ys.length === 0) { return tag + '{}'; }
@@ -15716,7 +15865,7 @@ function inspectString(str, opts) {
15716
15865
  if (str.length > opts.maxStringLength) {
15717
15866
  var remaining = str.length - opts.maxStringLength;
15718
15867
  var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
15719
- return inspectString($slice$2.call(str, 0, opts.maxStringLength), opts) + trailer;
15868
+ return inspectString($slice$1.call(str, 0, opts.maxStringLength), opts) + trailer;
15720
15869
  }
15721
15870
  // eslint-disable-next-line no-control-regex
15722
15871
  var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
@@ -15819,20 +15968,20 @@ function arrObjKeys(obj, inspect) {
15819
15968
  return xs;
15820
15969
  }
15821
15970
 
15822
- var GetIntrinsic$4 = getIntrinsic;
15823
- var callBound$a = callBound$c;
15971
+ var GetIntrinsic$3 = getIntrinsic;
15972
+ var callBound$9 = callBound$b;
15824
15973
  var inspect = objectInspect;
15825
15974
 
15826
- var $TypeError = GetIntrinsic$4('%TypeError%');
15827
- var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
15828
- var $Map$2 = GetIntrinsic$4('%Map%', true);
15975
+ var $TypeError = GetIntrinsic$3('%TypeError%');
15976
+ var $WeakMap$1 = GetIntrinsic$3('%WeakMap%', true);
15977
+ var $Map$2 = GetIntrinsic$3('%Map%', true);
15829
15978
 
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);
15979
+ var $weakMapGet = callBound$9('WeakMap.prototype.get', true);
15980
+ var $weakMapSet = callBound$9('WeakMap.prototype.set', true);
15981
+ var $weakMapHas = callBound$9('WeakMap.prototype.has', true);
15982
+ var $mapGet$1 = callBound$9('Map.prototype.get', true);
15983
+ var $mapSet = callBound$9('Map.prototype.set', true);
15984
+ var $mapHas$5 = callBound$9('Map.prototype.has', true);
15836
15985
 
15837
15986
  /*
15838
15987
  * This function traverses the list returning the node corresponding to the
@@ -15979,13 +16128,13 @@ var shim$1 = function shimObjectIs() {
15979
16128
  };
15980
16129
 
15981
16130
  var define = defineProperties_1;
15982
- var callBind$1 = callBindExports;
16131
+ var callBind$2 = callBindExports;
15983
16132
 
15984
16133
  var implementation = implementation$2;
15985
16134
  var getPolyfill = polyfill$1;
15986
16135
  var shim = shim$1;
15987
16136
 
15988
- var polyfill = callBind$1(getPolyfill(), Object);
16137
+ var polyfill = callBind$2(getPolyfill(), Object);
15989
16138
 
15990
16139
  define(polyfill, {
15991
16140
  getPolyfill: getPolyfill,
@@ -16001,16 +16150,16 @@ var shams = function hasToStringTagShams() {
16001
16150
  return hasSymbols$1() && !!Symbol.toStringTag;
16002
16151
  };
16003
16152
 
16004
- var hasToStringTag$8 = shams();
16005
- var callBound$9 = callBound$c;
16153
+ var hasToStringTag$7 = shams();
16154
+ var callBound$8 = callBound$b;
16006
16155
 
16007
- var $toString$4 = callBound$9('Object.prototype.toString');
16156
+ var $toString$3 = callBound$8('Object.prototype.toString');
16008
16157
 
16009
16158
  var isStandardArguments = function isArguments(value) {
16010
- if (hasToStringTag$8 && value && typeof value === 'object' && Symbol.toStringTag in value) {
16159
+ if (hasToStringTag$7 && value && typeof value === 'object' && Symbol.toStringTag in value) {
16011
16160
  return false;
16012
16161
  }
16013
- return $toString$4(value) === '[object Arguments]';
16162
+ return $toString$3(value) === '[object Arguments]';
16014
16163
  };
16015
16164
 
16016
16165
  var isLegacyArguments = function isArguments(value) {
@@ -16021,8 +16170,8 @@ var isLegacyArguments = function isArguments(value) {
16021
16170
  typeof value === 'object' &&
16022
16171
  typeof value.length === 'number' &&
16023
16172
  value.length >= 0 &&
16024
- $toString$4(value) !== '[object Array]' &&
16025
- $toString$4(value.callee) === '[object Function]';
16173
+ $toString$3(value) !== '[object Array]' &&
16174
+ $toString$3(value.callee) === '[object Function]';
16026
16175
  };
16027
16176
 
16028
16177
  var supportsStandardArguments = (function () {
@@ -16088,7 +16237,7 @@ var genClass = '[object GeneratorFunction]';
16088
16237
  var ddaClass = '[object HTMLAllCollection]'; // IE 11
16089
16238
  var ddaClass2 = '[object HTML document.all class]';
16090
16239
  var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
16091
- var hasToStringTag$7 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
16240
+ var hasToStringTag$6 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
16092
16241
 
16093
16242
  var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing
16094
16243
 
@@ -16132,7 +16281,7 @@ var isCallable$1 = reflectApply
16132
16281
  if (isDDA(value)) { return true; }
16133
16282
  if (!value) { return false; }
16134
16283
  if (typeof value !== 'function' && typeof value !== 'object') { return false; }
16135
- if (hasToStringTag$7) { return tryFunctionObject(value); }
16284
+ if (hasToStringTag$6) { return tryFunctionObject(value); }
16136
16285
  if (isES6ClassFn(value)) { return false; }
16137
16286
  var strClass = toStr$5.call(value);
16138
16287
  if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; }
@@ -16179,7 +16328,7 @@ var forEachObject = function forEachObject(object, iterator, receiver) {
16179
16328
  }
16180
16329
  };
16181
16330
 
16182
- var forEach$2 = function forEach(list, iterator, thisArg) {
16331
+ var forEach$1 = function forEach(list, iterator, thisArg) {
16183
16332
  if (!isCallable(iterator)) {
16184
16333
  throw new TypeError('iterator must be a function');
16185
16334
  }
@@ -16198,7 +16347,7 @@ var forEach$2 = function forEach(list, iterator, thisArg) {
16198
16347
  }
16199
16348
  };
16200
16349
 
16201
- var forEach_1 = forEach$2;
16350
+ var forEach_1 = forEach$1;
16202
16351
 
16203
16352
  var possibleNames = [
16204
16353
  'BigInt64Array',
@@ -16216,7 +16365,7 @@ var possibleNames = [
16216
16365
 
16217
16366
  var g$2 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16218
16367
 
16219
- var availableTypedArrays$2 = function availableTypedArrays() {
16368
+ var availableTypedArrays$1 = function availableTypedArrays() {
16220
16369
  var out = [];
16221
16370
  for (var i = 0; i < possibleNames.length; i++) {
16222
16371
  if (typeof g$2[possibleNames[i]] === 'function') {
@@ -16226,33 +16375,22 @@ var availableTypedArrays$2 = function availableTypedArrays() {
16226
16375
  return out;
16227
16376
  };
16228
16377
 
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;
16378
+ var forEach = forEach_1;
16379
+ var availableTypedArrays = availableTypedArrays$1;
16380
+ var callBind$1 = callBindExports;
16381
+ var callBound$7 = callBound$b;
16382
+ var gOPD$1 = gopd$1;
16247
16383
 
16248
- var $toString$3 = callBound$8('Object.prototype.toString');
16249
- var hasToStringTag$6 = shams();
16250
- var gOPD$2 = gopd;
16384
+ var $toString$2 = callBound$7('Object.prototype.toString');
16385
+ var hasToStringTag$5 = shams();
16251
16386
 
16252
16387
  var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16253
- var typedArrays$1 = availableTypedArrays$1();
16388
+ var typedArrays = availableTypedArrays();
16254
16389
 
16255
- var $indexOf = callBound$8('Array.prototype.indexOf', true) || function indexOf(array, value) {
16390
+ var $slice = callBound$7('String.prototype.slice');
16391
+ var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
16392
+
16393
+ var $indexOf = callBound$7('Array.prototype.indexOf', true) || function indexOf(array, value) {
16256
16394
  for (var i = 0; i < array.length; i += 1) {
16257
16395
  if (array[i] === value) {
16258
16396
  return i;
@@ -16260,54 +16398,85 @@ var $indexOf = callBound$8('Array.prototype.indexOf', true) || function indexOf(
16260
16398
  }
16261
16399
  return -1;
16262
16400
  };
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) {
16401
+ var cache = { __proto__: null };
16402
+ if (hasToStringTag$5 && gOPD$1 && getPrototypeOf) {
16403
+ forEach(typedArrays, function (typedArray) {
16268
16404
  var arr = new g$1[typedArray]();
16269
16405
  if (Symbol.toStringTag in arr) {
16270
- var proto = getPrototypeOf$1(arr);
16271
- var descriptor = gOPD$2(proto, Symbol.toStringTag);
16406
+ var proto = getPrototypeOf(arr);
16407
+ var descriptor = gOPD$1(proto, Symbol.toStringTag);
16272
16408
  if (!descriptor) {
16273
- var superProto = getPrototypeOf$1(proto);
16274
- descriptor = gOPD$2(superProto, Symbol.toStringTag);
16409
+ var superProto = getPrototypeOf(proto);
16410
+ descriptor = gOPD$1(superProto, Symbol.toStringTag);
16275
16411
  }
16276
- toStrTags$1[typedArray] = descriptor.get;
16412
+ cache['$' + typedArray] = callBind$1(descriptor.get);
16277
16413
  }
16278
16414
  });
16415
+ } else {
16416
+ forEach(typedArrays, function (typedArray) {
16417
+ var arr = new g$1[typedArray]();
16418
+ cache['$' + typedArray] = callBind$1(arr.slice);
16419
+ });
16279
16420
  }
16280
16421
 
16281
- var tryTypedArrays$1 = function tryAllTypedArrays(value) {
16282
- var anyTrue = false;
16283
- forEach$1(toStrTags$1, function (getter, typedArray) {
16284
- if (!anyTrue) {
16422
+ var tryTypedArrays = function tryAllTypedArrays(value) {
16423
+ var found = false;
16424
+ forEach(cache, function (getter, typedArray) {
16425
+ if (!found) {
16426
+ try {
16427
+ if ('$' + getter(value) === typedArray) {
16428
+ found = $slice(typedArray, 1);
16429
+ }
16430
+ } catch (e) { /**/ }
16431
+ }
16432
+ });
16433
+ return found;
16434
+ };
16435
+
16436
+ var trySlices = function tryAllSlices(value) {
16437
+ var found = false;
16438
+ forEach(cache, function (getter, name) {
16439
+ if (!found) {
16285
16440
  try {
16286
- anyTrue = getter.call(value) === typedArray;
16441
+ getter(value);
16442
+ found = $slice(name, 1);
16287
16443
  } catch (e) { /**/ }
16288
16444
  }
16289
16445
  });
16290
- return anyTrue;
16446
+ return found;
16291
16447
  };
16292
16448
 
16293
- var isTypedArray$2 = function isTypedArray(value) {
16449
+ var whichTypedArray$2 = function whichTypedArray(value) {
16294
16450
  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;
16451
+ if (!hasToStringTag$5) {
16452
+ var tag = $slice($toString$2(value), 8, -1);
16453
+ if ($indexOf(typedArrays, tag) > -1) {
16454
+ return tag;
16455
+ }
16456
+ if (tag !== 'Object') {
16457
+ return false;
16458
+ }
16459
+ // node < 0.6 hits here on real Typed Arrays
16460
+ return trySlices(value);
16298
16461
  }
16299
- if (!gOPD$2) { return false; }
16300
- return tryTypedArrays$1(value);
16462
+ if (!gOPD$1) { return null; } // unknown engine
16463
+ return tryTypedArrays(value);
16464
+ };
16465
+
16466
+ var whichTypedArray$1 = whichTypedArray$2;
16467
+
16468
+ var isTypedArray$1 = function isTypedArray(value) {
16469
+ return !!whichTypedArray$1(value);
16301
16470
  };
16302
16471
 
16303
16472
  var callBind = callBindExports;
16304
- var callBound$7 = callBound$c;
16473
+ var callBound$6 = callBound$b;
16305
16474
  var GetIntrinsic$2 = getIntrinsic;
16306
- var isTypedArray$1 = isTypedArray$2;
16475
+ var isTypedArray = isTypedArray$1;
16307
16476
 
16308
16477
  var $ArrayBuffer = GetIntrinsic$2('ArrayBuffer', true);
16309
16478
  var $Float32Array = GetIntrinsic$2('Float32Array', true);
16310
- var $byteLength$2 = callBound$7('ArrayBuffer.prototype.byteLength', true);
16479
+ var $byteLength$2 = callBound$6('ArrayBuffer.prototype.byteLength', true);
16311
16480
 
16312
16481
  // in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method
16313
16482
  var abSlice = $ArrayBuffer && !$byteLength$2 && new $ArrayBuffer().slice;
@@ -16333,7 +16502,7 @@ var isArrayBuffer$2 = $byteLength$2 || $abSlice
16333
16502
  // in node 0.8, ArrayBuffers have no prototype or own methods
16334
16503
  ? function IsArrayBuffer(obj) {
16335
16504
  try {
16336
- return (new $Float32Array(obj)).buffer === obj && !isTypedArray$1(obj);
16505
+ return (new $Float32Array(obj)).buffer === obj && !isTypedArray(obj);
16337
16506
  } catch (e) {
16338
16507
  return typeof obj === 'object' && e.name === 'RangeError';
16339
16508
  }
@@ -16354,25 +16523,25 @@ var tryDateObject = function tryDateGetDayCall(value) {
16354
16523
 
16355
16524
  var toStr$3 = Object.prototype.toString;
16356
16525
  var dateClass = '[object Date]';
16357
- var hasToStringTag$5 = shams();
16526
+ var hasToStringTag$4 = shams();
16358
16527
 
16359
16528
  var isDateObject = function isDateObject(value) {
16360
16529
  if (typeof value !== 'object' || value === null) {
16361
16530
  return false;
16362
16531
  }
16363
- return hasToStringTag$5 ? tryDateObject(value) : toStr$3.call(value) === dateClass;
16532
+ return hasToStringTag$4 ? tryDateObject(value) : toStr$3.call(value) === dateClass;
16364
16533
  };
16365
16534
 
16366
- var callBound$6 = callBound$c;
16367
- var hasToStringTag$4 = shams();
16535
+ var callBound$5 = callBound$b;
16536
+ var hasToStringTag$3 = shams();
16368
16537
  var has;
16369
16538
  var $exec;
16370
16539
  var isRegexMarker;
16371
16540
  var badStringifier;
16372
16541
 
16373
- if (hasToStringTag$4) {
16374
- has = callBound$6('Object.prototype.hasOwnProperty');
16375
- $exec = callBound$6('RegExp.prototype.exec');
16542
+ if (hasToStringTag$3) {
16543
+ has = callBound$5('Object.prototype.hasOwnProperty');
16544
+ $exec = callBound$5('RegExp.prototype.exec');
16376
16545
  isRegexMarker = {};
16377
16546
 
16378
16547
  var throwRegexMarker = function () {
@@ -16388,18 +16557,18 @@ if (hasToStringTag$4) {
16388
16557
  }
16389
16558
  }
16390
16559
 
16391
- var $toString$2 = callBound$6('Object.prototype.toString');
16392
- var gOPD$1 = Object.getOwnPropertyDescriptor;
16560
+ var $toString$1 = callBound$5('Object.prototype.toString');
16561
+ var gOPD = Object.getOwnPropertyDescriptor;
16393
16562
  var regexClass = '[object RegExp]';
16394
16563
 
16395
- var isRegex$1 = hasToStringTag$4
16564
+ var isRegex$1 = hasToStringTag$3
16396
16565
  // eslint-disable-next-line consistent-return
16397
16566
  ? function isRegex(value) {
16398
16567
  if (!value || typeof value !== 'object') {
16399
16568
  return false;
16400
16569
  }
16401
16570
 
16402
- var descriptor = gOPD$1(value, 'lastIndex');
16571
+ var descriptor = gOPD(value, 'lastIndex');
16403
16572
  var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
16404
16573
  if (!hasLastIndexDataProperty) {
16405
16574
  return false;
@@ -16417,12 +16586,12 @@ var isRegex$1 = hasToStringTag$4
16417
16586
  return false;
16418
16587
  }
16419
16588
 
16420
- return $toString$2(value) === regexClass;
16589
+ return $toString$1(value) === regexClass;
16421
16590
  };
16422
16591
 
16423
- var callBound$5 = callBound$c;
16592
+ var callBound$4 = callBound$b;
16424
16593
 
16425
- var $byteLength$1 = callBound$5('SharedArrayBuffer.prototype.byteLength', true);
16594
+ var $byteLength$1 = callBound$4('SharedArrayBuffer.prototype.byteLength', true);
16426
16595
 
16427
16596
  var isSharedArrayBuffer$1 = $byteLength$1
16428
16597
  ? function isSharedArrayBuffer(obj) {
@@ -16451,7 +16620,7 @@ var tryStringObject = function tryStringObject(value) {
16451
16620
  };
16452
16621
  var toStr$2 = Object.prototype.toString;
16453
16622
  var strClass = '[object String]';
16454
- var hasToStringTag$3 = shams();
16623
+ var hasToStringTag$2 = shams();
16455
16624
 
16456
16625
  var isString$1 = function isString(value) {
16457
16626
  if (typeof value === 'string') {
@@ -16460,7 +16629,7 @@ var isString$1 = function isString(value) {
16460
16629
  if (typeof value !== 'object') {
16461
16630
  return false;
16462
16631
  }
16463
- return hasToStringTag$3 ? tryStringObject(value) : toStr$2.call(value) === strClass;
16632
+ return hasToStringTag$2 ? tryStringObject(value) : toStr$2.call(value) === strClass;
16464
16633
  };
16465
16634
 
16466
16635
  var numToStr = Number.prototype.toString;
@@ -16474,7 +16643,7 @@ var tryNumberObject = function tryNumberObject(value) {
16474
16643
  };
16475
16644
  var toStr$1 = Object.prototype.toString;
16476
16645
  var numClass = '[object Number]';
16477
- var hasToStringTag$2 = shams();
16646
+ var hasToStringTag$1 = shams();
16478
16647
 
16479
16648
  var isNumberObject = function isNumberObject(value) {
16480
16649
  if (typeof value === 'number') {
@@ -16483,12 +16652,12 @@ var isNumberObject = function isNumberObject(value) {
16483
16652
  if (typeof value !== 'object') {
16484
16653
  return false;
16485
16654
  }
16486
- return hasToStringTag$2 ? tryNumberObject(value) : toStr$1.call(value) === numClass;
16655
+ return hasToStringTag$1 ? tryNumberObject(value) : toStr$1.call(value) === numClass;
16487
16656
  };
16488
16657
 
16489
- var callBound$4 = callBound$c;
16490
- var $boolToStr = callBound$4('Boolean.prototype.toString');
16491
- var $toString$1 = callBound$4('Object.prototype.toString');
16658
+ var callBound$3 = callBound$b;
16659
+ var $boolToStr = callBound$3('Boolean.prototype.toString');
16660
+ var $toString = callBound$3('Object.prototype.toString');
16492
16661
 
16493
16662
  var tryBooleanObject = function booleanBrandCheck(value) {
16494
16663
  try {
@@ -16499,7 +16668,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
16499
16668
  }
16500
16669
  };
16501
16670
  var boolClass = '[object Boolean]';
16502
- var hasToStringTag$1 = shams();
16671
+ var hasToStringTag = shams();
16503
16672
 
16504
16673
  var isBooleanObject = function isBoolean(value) {
16505
16674
  if (typeof value === 'boolean') {
@@ -16508,7 +16677,7 @@ var isBooleanObject = function isBoolean(value) {
16508
16677
  if (value === null || typeof value !== 'object') {
16509
16678
  return false;
16510
16679
  }
16511
- return hasToStringTag$1 && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString$1(value) === boolClass;
16680
+ return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
16512
16681
  };
16513
16682
 
16514
16683
  var isSymbol$1 = {exports: {}};
@@ -16754,14 +16923,14 @@ var isWeakmap = exported || function isWeakMap(x) {
16754
16923
  var isWeakset = {exports: {}};
16755
16924
 
16756
16925
  var GetIntrinsic$1 = getIntrinsic;
16757
- var callBound$3 = callBound$c;
16926
+ var callBound$2 = callBound$b;
16758
16927
 
16759
16928
  var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
16760
16929
 
16761
- var $setHas$1 = callBound$3('WeakSet.prototype.has', true);
16930
+ var $setHas$1 = callBound$2('WeakSet.prototype.has', true);
16762
16931
 
16763
16932
  if ($setHas$1) {
16764
- var $mapHas$1 = callBound$3('WeakMap.prototype.has', true);
16933
+ var $mapHas$1 = callBound$2('WeakMap.prototype.has', true);
16765
16934
 
16766
16935
  isWeakset.exports = function isWeakSet(x) {
16767
16936
  if (!x || typeof x !== 'object') {
@@ -16813,61 +16982,7 @@ var whichCollection$1 = function whichCollection(value) {
16813
16982
  return false;
16814
16983
  };
16815
16984
 
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;
16985
+ var callBound$1 = callBound$b;
16871
16986
  var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
16872
16987
 
16873
16988
  var isArrayBuffer$1 = isArrayBuffer$2;
@@ -16880,7 +16995,7 @@ var arrayBufferByteLength = function byteLength(ab) {
16880
16995
  }; // in node < 0.11, byteLength is an own nonconfigurable property
16881
16996
 
16882
16997
  var assign = object_assign;
16883
- var callBound = callBound$c;
16998
+ var callBound = callBound$b;
16884
16999
  var flags = regexp_prototype_flags;
16885
17000
  var GetIntrinsic = getIntrinsic;
16886
17001
  var getIterator = node;
@@ -16895,7 +17010,7 @@ var isSharedArrayBuffer = isSharedArrayBuffer$1;
16895
17010
  var objectKeys = objectKeys$2;
16896
17011
  var whichBoxedPrimitive = whichBoxedPrimitive$1;
16897
17012
  var whichCollection = whichCollection$1;
16898
- var whichTypedArray = whichTypedArray$1;
17013
+ var whichTypedArray = whichTypedArray$2;
16899
17014
  var byteLength = arrayBufferByteLength;
16900
17015
 
16901
17016
  var sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
@@ -18082,7 +18197,7 @@ function createDOMElementFilter(filterNode) {
18082
18197
  return {
18083
18198
  test: val => {
18084
18199
  var _val$constructor2;
18085
- return (val == null ? void 0 : (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
18200
+ return (val == null || (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
18086
18201
  },
18087
18202
  serialize: (node, config, indentation, depth, refs, printer) => {
18088
18203
  if (nodeIsText(node)) {
@@ -18178,7 +18293,7 @@ function getDocument$2() {
18178
18293
  }
18179
18294
  return window.document;
18180
18295
  }
18181
- function getWindowFromNode$1(node) {
18296
+ function getWindowFromNode$2(node) {
18182
18297
  if (node.defaultView) {
18183
18298
  // node is document
18184
18299
  return node.defaultView;
@@ -18216,8 +18331,8 @@ function checkContainerType$1(container) {
18216
18331
  const shouldHighlight = () => {
18217
18332
  let colors;
18218
18333
  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);
18334
+ var _process;
18335
+ colors = JSON.parse((_process = process) == null || (_process = _process.env) == null ? void 0 : _process.COLORS);
18221
18336
  } catch (e) {
18222
18337
  // If this throws, process?.env?.COLORS wasn't parsable. Since we only
18223
18338
  // care about `true` or `false`, we can safely ignore the error.
@@ -18240,7 +18355,7 @@ const COMMENT_NODE = 8;
18240
18355
 
18241
18356
  // https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L50
18242
18357
  function filterCommentsAndDefaultIgnoreTagsTags(value) {
18243
- return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig().defaultIgnore));
18358
+ return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig$3().defaultIgnore));
18244
18359
  }
18245
18360
  function prettyDOM(dom, maxLength, options) {
18246
18361
  if (options === void 0) {
@@ -18344,7 +18459,7 @@ function configure(newConfig) {
18344
18459
  ...newConfig
18345
18460
  };
18346
18461
  }
18347
- function getConfig() {
18462
+ function getConfig$3() {
18348
18463
  return config;
18349
18464
  }
18350
18465
 
@@ -18681,12 +18796,12 @@ function prettyRoles(dom, _ref6) {
18681
18796
  const delimiterBar = '-'.repeat(50);
18682
18797
  const elementsString = elements.map(el => {
18683
18798
  const nameString = "Name \"" + computeAccessibleName(el, {
18684
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
18799
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18685
18800
  }) + "\":\n";
18686
18801
  const domString = prettyDOM(el.cloneNode(false));
18687
18802
  if (includeDescription) {
18688
18803
  const descriptionString = "Description \"" + computeAccessibleDescription(el, {
18689
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
18804
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18690
18805
  }) + "\":\n";
18691
18806
  return "" + nameString + descriptionString + domString;
18692
18807
  }
@@ -18695,6 +18810,14 @@ function prettyRoles(dom, _ref6) {
18695
18810
  return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;
18696
18811
  }).join('\n');
18697
18812
  }
18813
+ const logRoles = function (dom, _temp2) {
18814
+ let {
18815
+ hidden = false
18816
+ } = _temp2 === void 0 ? {} : _temp2;
18817
+ return console.log(prettyRoles(dom, {
18818
+ hidden
18819
+ }));
18820
+ };
18698
18821
 
18699
18822
  /**
18700
18823
  * @param {Element} element -
@@ -18890,7 +19013,7 @@ function getSuggestedQuery(element, variant, method) {
18890
19013
  variant = 'get';
18891
19014
  }
18892
19015
  // don't create suggestions for script and style elements
18893
- if (element.matches(getConfig().defaultIgnore)) {
19016
+ if (element.matches(getConfig$3().defaultIgnore)) {
18894
19017
  return undefined;
18895
19018
  }
18896
19019
 
@@ -18900,7 +19023,7 @@ function getSuggestedQuery(element, variant, method) {
18900
19023
  return makeSuggestion('Role', element, role, {
18901
19024
  variant,
18902
19025
  name: computeAccessibleName(element, {
18903
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19026
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18904
19027
  })
18905
19028
  });
18906
19029
  }
@@ -18939,7 +19062,7 @@ function getSuggestedQuery(element, variant, method) {
18939
19062
  variant
18940
19063
  });
18941
19064
  }
18942
- const testId = element.getAttribute(getConfig().testIdAttribute);
19065
+ const testId = element.getAttribute(getConfig$3().testIdAttribute);
18943
19066
  if (canSuggest('TestId', method, testId)) {
18944
19067
  return makeSuggestion('TestId', element, testId, {
18945
19068
  variant
@@ -18956,12 +19079,14 @@ function copyStackTrace(target, source) {
18956
19079
  function waitFor(callback, _ref) {
18957
19080
  let {
18958
19081
  container = getDocument$2(),
18959
- timeout = getConfig().asyncUtilTimeout,
18960
- showOriginalStackTrace = getConfig().showOriginalStackTrace,
19082
+ timeout = getConfig$3().asyncUtilTimeout,
19083
+ showOriginalStackTrace = getConfig$3().showOriginalStackTrace,
18961
19084
  stackTraceError,
18962
19085
  interval = 50,
18963
19086
  onTimeout = error => {
18964
- error.message = getConfig().getElementError(error.message, container).message;
19087
+ Object.defineProperty(error, 'message', {
19088
+ value: getConfig$3().getElementError(error.message, container).message
19089
+ });
18965
19090
  return error;
18966
19091
  },
18967
19092
  mutationObserverOptions = {
@@ -18983,7 +19108,7 @@ function waitFor(callback, _ref) {
18983
19108
  if (usingJestFakeTimers) {
18984
19109
  const {
18985
19110
  unstable_advanceTimersWrapper: advanceTimersWrapper
18986
- } = getConfig();
19111
+ } = getConfig$3();
18987
19112
  checkCallback();
18988
19113
  // this is a dangerous rule to disable because it could lead to an
18989
19114
  // infinite loop. However, eslint isn't smart enough to know that we're
@@ -19031,7 +19156,7 @@ function waitFor(callback, _ref) {
19031
19156
  intervalId = setInterval(checkRealTimersCallback, interval);
19032
19157
  const {
19033
19158
  MutationObserver
19034
- } = getWindowFromNode$1(container);
19159
+ } = getWindowFromNode$2(container);
19035
19160
  observer = new MutationObserver(checkRealTimersCallback);
19036
19161
  observer.observe(container, mutationObserverOptions);
19037
19162
  checkCallback();
@@ -19101,7 +19226,7 @@ function waitForWrapper(callback, options) {
19101
19226
  // create the error here so its stack trace is as close to the
19102
19227
  // calling code as possible
19103
19228
  const stackTraceError = new Error('STACK_TRACE_MESSAGE');
19104
- return getConfig().asyncWrapper(() => waitFor(callback, {
19229
+ return getConfig$3().asyncWrapper(() => waitFor(callback, {
19105
19230
  stackTraceError,
19106
19231
  ...options
19107
19232
  }));
@@ -19113,7 +19238,7 @@ eslint
19113
19238
  */
19114
19239
 
19115
19240
  function getElementError(message, container) {
19116
- return getConfig().getElementError(message, container);
19241
+ return getConfig$3().getElementError(message, container);
19117
19242
  }
19118
19243
  function getMultipleElementsFoundError(message, container) {
19119
19244
  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 +19258,13 @@ function queryAllByAttribute(attribute, container, text, _temp) {
19133
19258
  });
19134
19259
  return Array.from(container.querySelectorAll("[" + attribute + "]")).filter(node => matcher(node.getAttribute(attribute), node, text, matchNormalizer));
19135
19260
  }
19261
+ function queryByAttribute(attribute, container, text, options) {
19262
+ const els = queryAllByAttribute(attribute, container, text, options);
19263
+ if (els.length > 1) {
19264
+ throw getMultipleElementsFoundError("Found multiple elements by [" + attribute + "=" + text + "]", container);
19265
+ }
19266
+ return els[0] || null;
19267
+ }
19136
19268
 
19137
19269
  // this accepts a query function and returns a function which throws an error
19138
19270
  // if more than one elements is returned, otherwise it returns the first
@@ -19151,7 +19283,7 @@ function makeSingleQuery(allQuery, getMultipleError) {
19151
19283
  };
19152
19284
  }
19153
19285
  function getSuggestionError(suggestion, container) {
19154
- return getConfig().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
19286
+ return getConfig$3().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
19155
19287
  }
19156
19288
 
19157
19289
  // this accepts a query function and returns a function which throws an error
@@ -19163,7 +19295,7 @@ function makeGetAllQuery(allQuery, getMissingError) {
19163
19295
  }
19164
19296
  const els = allQuery(container, ...args);
19165
19297
  if (!els.length) {
19166
- throw getConfig().getElementError(getMissingError(container, ...args), container);
19298
+ throw getConfig$3().getElementError(getMissingError(container, ...args), container);
19167
19299
  }
19168
19300
  return els;
19169
19301
  };
@@ -19187,7 +19319,7 @@ const wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => functi
19187
19319
  }
19188
19320
  const element = query(container, ...args);
19189
19321
  const [{
19190
- suggest = getConfig().throwSuggestions
19322
+ suggest = getConfig$3().throwSuggestions
19191
19323
  } = {}] = args.slice(-1);
19192
19324
  if (element && suggest) {
19193
19325
  const suggestion = getSuggestedQuery(element, variant);
@@ -19203,7 +19335,7 @@ const wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => functio
19203
19335
  }
19204
19336
  const els = query(container, ...args);
19205
19337
  const [{
19206
- suggest = getConfig().throwSuggestions
19338
+ suggest = getConfig$3().throwSuggestions
19207
19339
  } = {}] = args.slice(-1);
19208
19340
  if (els.length && suggest) {
19209
19341
  // get a unique list of all suggestion messages. We are only going to make a suggestion if
@@ -19237,6 +19369,20 @@ function buildQueries(queryAllBy, getMultipleError, getMissingError) {
19237
19369
  return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];
19238
19370
  }
19239
19371
 
19372
+ var queryHelpers = /*#__PURE__*/Object.freeze({
19373
+ __proto__: null,
19374
+ getElementError: getElementError,
19375
+ wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,
19376
+ wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion,
19377
+ getMultipleElementsFoundError: getMultipleElementsFoundError,
19378
+ queryAllByAttribute: queryAllByAttribute,
19379
+ queryByAttribute: queryByAttribute,
19380
+ makeSingleQuery: makeSingleQuery,
19381
+ makeGetAllQuery: makeGetAllQuery,
19382
+ makeFindQuery: makeFindQuery,
19383
+ buildQueries: buildQueries
19384
+ });
19385
+
19240
19386
  function queryAllLabels(container) {
19241
19387
  return Array.from(container.querySelectorAll('label,input')).map(node => {
19242
19388
  return {
@@ -19346,12 +19492,12 @@ const getAllByLabelText = function (container, text) {
19346
19492
  if (labels.length) {
19347
19493
  const tagNames = labels.map(label => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter(tagName => !!tagName);
19348
19494
  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);
19495
+ 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
19496
  } 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);
19497
+ 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
19498
  }
19353
19499
  } else {
19354
- throw getConfig().getElementError("Unable to find a label with the text of: " + text, container);
19500
+ throw getConfig$3().getElementError("Unable to find a label with the text of: " + text, container);
19355
19501
  }
19356
19502
  }
19357
19503
  return els;
@@ -19393,7 +19539,7 @@ const queryAllByText = function (container, text, _temp) {
19393
19539
  exact = true,
19394
19540
  collapseWhitespace,
19395
19541
  trim,
19396
- ignore = getConfig().defaultIgnore,
19542
+ ignore = getConfig$3().defaultIgnore,
19397
19543
  normalizer
19398
19544
  } = _temp === void 0 ? {} : _temp;
19399
19545
  checkContainerType$1(container);
@@ -19505,7 +19651,7 @@ const [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = b
19505
19651
  /* eslint-disable complexity */
19506
19652
  const queryAllByRole = function (container, role, _temp) {
19507
19653
  let {
19508
- hidden = getConfig().defaultHidden,
19654
+ hidden = getConfig$3().defaultHidden,
19509
19655
  name,
19510
19656
  description,
19511
19657
  queryFallbacks = false,
@@ -19674,7 +19820,7 @@ const queryAllByRole = function (container, role, _temp) {
19674
19820
  return true;
19675
19821
  }
19676
19822
  return matches(computeAccessibleName(element, {
19677
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19823
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
19678
19824
  }), element, name, text => text);
19679
19825
  }).filter(element => {
19680
19826
  if (description === undefined) {
@@ -19682,7 +19828,7 @@ const queryAllByRole = function (container, role, _temp) {
19682
19828
  return true;
19683
19829
  }
19684
19830
  return matches(computeAccessibleDescription(element, {
19685
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19831
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
19686
19832
  }), element, description, text => text);
19687
19833
  }).filter(element => {
19688
19834
  return hidden === false ? isInaccessible(element, {
@@ -19725,11 +19871,11 @@ const getMultipleError$1 = function (c, role, _temp2) {
19725
19871
  };
19726
19872
  const getMissingError$1 = function (container, role, _temp3) {
19727
19873
  let {
19728
- hidden = getConfig().defaultHidden,
19874
+ hidden = getConfig$3().defaultHidden,
19729
19875
  name,
19730
19876
  description
19731
19877
  } = _temp3 === void 0 ? {} : _temp3;
19732
- if (getConfig()._disableExpensiveErrorDiagnostics) {
19878
+ if (getConfig$3()._disableExpensiveErrorDiagnostics) {
19733
19879
  return "Unable to find role=\"" + role + "\"" + getNameHint(name);
19734
19880
  }
19735
19881
  let roles = '';
@@ -19770,7 +19916,7 @@ const getMissingError$1 = function (container, role, _temp3) {
19770
19916
  const queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, 'queryAll');
19771
19917
  const [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1);
19772
19918
 
19773
- const getTestIdAttribute = () => getConfig().testIdAttribute;
19919
+ const getTestIdAttribute = () => getConfig$3().testIdAttribute;
19774
19920
  const queryAllByTestId = function () {
19775
19921
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19776
19922
  args[_key] = arguments[_key];
@@ -19859,6 +20005,47 @@ function getQueriesForElement(element, queries$1, initialValue) {
19859
20005
  }, initialValue);
19860
20006
  }
19861
20007
 
20008
+ const isRemoved = result => !result || Array.isArray(result) && !result.length;
20009
+
20010
+ // Check if the element is not present.
20011
+ // As the name implies, waitForElementToBeRemoved should check `present` --> `removed`
20012
+ function initialCheck(elements) {
20013
+ if (isRemoved(elements)) {
20014
+ throw new Error('The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.');
20015
+ }
20016
+ }
20017
+ async function waitForElementToBeRemoved(callback, options) {
20018
+ // created here so we get a nice stacktrace
20019
+ const timeoutError = new Error('Timed out in waitForElementToBeRemoved.');
20020
+ if (typeof callback !== 'function') {
20021
+ initialCheck(callback);
20022
+ const elements = Array.isArray(callback) ? callback : [callback];
20023
+ const getRemainingElements = elements.map(element => {
20024
+ let parent = element.parentElement;
20025
+ if (parent === null) return () => null;
20026
+ while (parent.parentElement) parent = parent.parentElement;
20027
+ return () => parent.contains(element) ? element : null;
20028
+ });
20029
+ callback = () => getRemainingElements.map(c => c()).filter(Boolean);
20030
+ }
20031
+ initialCheck(callback());
20032
+ return waitForWrapper(() => {
20033
+ let result;
20034
+ try {
20035
+ result = callback();
20036
+ } catch (error) {
20037
+ if (error.name === 'TestingLibraryElementError') {
20038
+ return undefined;
20039
+ }
20040
+ throw error;
20041
+ }
20042
+ if (!isRemoved(result)) {
20043
+ throw timeoutError;
20044
+ }
20045
+ return undefined;
20046
+ }, options);
20047
+ }
20048
+
19862
20049
  /*
19863
20050
  eslint
19864
20051
  require-await: "off"
@@ -20557,7 +20744,7 @@ const eventAliasMap$1 = {
20557
20744
  };
20558
20745
 
20559
20746
  function fireEvent(element, event) {
20560
- return getConfig().eventWrapper(() => {
20747
+ return getConfig$3().eventWrapper(() => {
20561
20748
  if (!event) {
20562
20749
  throw new Error("Unable to fire an event - please provide an event object.");
20563
20750
  }
@@ -20601,7 +20788,7 @@ function createEvent$1(eventName, node, init, _temp) {
20601
20788
  });
20602
20789
  }
20603
20790
  Object.assign(node, targetProperties);
20604
- const window = getWindowFromNode$1(node);
20791
+ const window = getWindowFromNode$2(node);
20605
20792
  const EventConstructor = window[EventType] || window.Event;
20606
20793
  let event;
20607
20794
  /* istanbul ignore else */
@@ -20725,7 +20912,7 @@ const initialValue = {
20725
20912
  debug,
20726
20913
  logTestingPlaygroundURL
20727
20914
  };
20728
- typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
20915
+ const screen = typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
20729
20916
  ? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {
20730
20917
  // `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
20918
  // if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary
@@ -20736,6 +20923,88 @@ typeof document !== 'undefined' && document.body // eslint-disable-line @typescr
20736
20923
  return helpers;
20737
20924
  }, initialValue);
20738
20925
 
20926
+ var named$1 = /*#__PURE__*/Object.freeze({
20927
+ __proto__: null,
20928
+ buildQueries: buildQueries,
20929
+ configure: configure,
20930
+ createEvent: createEvent$1,
20931
+ findAllByAltText: findAllByAltText,
20932
+ findAllByDisplayValue: findAllByDisplayValue,
20933
+ findAllByLabelText: findAllByLabelText,
20934
+ findAllByPlaceholderText: findAllByPlaceholderText,
20935
+ findAllByRole: findAllByRole,
20936
+ findAllByTestId: findAllByTestId,
20937
+ findAllByText: findAllByText,
20938
+ findAllByTitle: findAllByTitle,
20939
+ findByAltText: findByAltText,
20940
+ findByDisplayValue: findByDisplayValue,
20941
+ findByLabelText: findByLabelText,
20942
+ findByPlaceholderText: findByPlaceholderText,
20943
+ findByRole: findByRole,
20944
+ findByTestId: findByTestId,
20945
+ findByText: findByText,
20946
+ findByTitle: findByTitle,
20947
+ fireEvent: fireEvent,
20948
+ getAllByAltText: getAllByAltText,
20949
+ getAllByDisplayValue: getAllByDisplayValue,
20950
+ getAllByLabelText: getAllByLabelTextWithSuggestions,
20951
+ getAllByPlaceholderText: getAllByPlaceholderText,
20952
+ getAllByRole: getAllByRole,
20953
+ getAllByTestId: getAllByTestId,
20954
+ getAllByText: getAllByText,
20955
+ getAllByTitle: getAllByTitle,
20956
+ getByAltText: getByAltText,
20957
+ getByDisplayValue: getByDisplayValue,
20958
+ getByLabelText: getByLabelTextWithSuggestions,
20959
+ getByPlaceholderText: getByPlaceholderText,
20960
+ getByRole: getByRole,
20961
+ getByTestId: getByTestId,
20962
+ getByText: getByText,
20963
+ getByTitle: getByTitle,
20964
+ getConfig: getConfig$3,
20965
+ getDefaultNormalizer: getDefaultNormalizer,
20966
+ getElementError: getElementError,
20967
+ getMultipleElementsFoundError: getMultipleElementsFoundError,
20968
+ getNodeText: getNodeText,
20969
+ getQueriesForElement: getQueriesForElement,
20970
+ getRoles: getRoles,
20971
+ getSuggestedQuery: getSuggestedQuery,
20972
+ isInaccessible: isInaccessible,
20973
+ logDOM: logDOM,
20974
+ logRoles: logRoles,
20975
+ makeFindQuery: makeFindQuery,
20976
+ makeGetAllQuery: makeGetAllQuery,
20977
+ makeSingleQuery: makeSingleQuery,
20978
+ prettyDOM: prettyDOM,
20979
+ prettyFormat: index,
20980
+ queries: queries,
20981
+ queryAllByAltText: queryAllByAltTextWithSuggestions,
20982
+ queryAllByAttribute: queryAllByAttribute,
20983
+ queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,
20984
+ queryAllByLabelText: queryAllByLabelTextWithSuggestions,
20985
+ queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,
20986
+ queryAllByRole: queryAllByRoleWithSuggestions,
20987
+ queryAllByTestId: queryAllByTestIdWithSuggestions,
20988
+ queryAllByText: queryAllByTextWithSuggestions,
20989
+ queryAllByTitle: queryAllByTitleWithSuggestions,
20990
+ queryByAltText: queryByAltText,
20991
+ queryByAttribute: queryByAttribute,
20992
+ queryByDisplayValue: queryByDisplayValue,
20993
+ queryByLabelText: queryByLabelText,
20994
+ queryByPlaceholderText: queryByPlaceholderText,
20995
+ queryByRole: queryByRole,
20996
+ queryByTestId: queryByTestId,
20997
+ queryByText: queryByText,
20998
+ queryByTitle: queryByTitle,
20999
+ queryHelpers: queryHelpers,
21000
+ screen: screen,
21001
+ waitFor: waitForWrapper,
21002
+ waitForElementToBeRemoved: waitForElementToBeRemoved,
21003
+ within: getQueriesForElement,
21004
+ wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,
21005
+ wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion
21006
+ });
21007
+
20739
21008
  const domAct = testUtils.act;
20740
21009
  function getGlobalThis() {
20741
21010
  /* istanbul ignore else */
@@ -20959,15 +21228,15 @@ var helpers = {};
20959
21228
  Object.defineProperty(helpers, "__esModule", {
20960
21229
  value: true
20961
21230
  });
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;
21231
+ var TEXT_NODE_1 = helpers.TEXT_NODE = void 0;
21232
+ var checkContainerType_1 = helpers.checkContainerType = checkContainerType;
21233
+ var getDocument_1 = helpers.getDocument = getDocument$1;
21234
+ var getWindowFromNode_1 = helpers.getWindowFromNode = getWindowFromNode$1;
21235
+ var jestFakeTimersAreEnabled_1 = helpers.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;
20967
21236
  // Constant node.nodeType for text nodes, see:
20968
21237
  // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants
20969
21238
  const TEXT_NODE = 3;
20970
- helpers.TEXT_NODE = TEXT_NODE;
21239
+ TEXT_NODE_1 = helpers.TEXT_NODE = TEXT_NODE;
20971
21240
  function jestFakeTimersAreEnabled() {
20972
21241
  /* istanbul ignore else */
20973
21242
  // eslint-disable-next-line
@@ -20990,7 +21259,7 @@ function getDocument$1() {
20990
21259
  }
20991
21260
  return window.document;
20992
21261
  }
20993
- function getWindowFromNode(node) {
21262
+ function getWindowFromNode$1(node) {
20994
21263
  if (node.defaultView) {
20995
21264
  // node is document
20996
21265
  return node.defaultView;
@@ -21025,8 +21294,19 @@ function checkContainerType(container) {
21025
21294
  }
21026
21295
  }
21027
21296
 
21297
+ var named = /*#__PURE__*/_mergeNamespaces({
21298
+ __proto__: null,
21299
+ get TEXT_NODE () { return TEXT_NODE_1; },
21300
+ checkContainerType: checkContainerType_1,
21301
+ default: helpers,
21302
+ getDocument: getDocument_1,
21303
+ getWindowFromNode: getWindowFromNode_1,
21304
+ jestFakeTimersAreEnabled: jestFakeTimersAreEnabled_1
21305
+ }, [helpers]);
21306
+
21307
+ const { getWindowFromNode } = named;
21028
21308
  function getWindow(node) {
21029
- return getWindowFromNode_1(node);
21309
+ return getWindowFromNode(node);
21030
21310
  }
21031
21311
 
21032
21312
  // jsdom does not implement Blob.text()
@@ -21063,6 +21343,19 @@ function createFileList(window, files) {
21063
21343
  return list;
21064
21344
  }
21065
21345
 
21346
+ function _define_property$8(obj, key, value) {
21347
+ if (key in obj) {
21348
+ Object.defineProperty(obj, key, {
21349
+ value: value,
21350
+ enumerable: true,
21351
+ configurable: true,
21352
+ writable: true
21353
+ });
21354
+ } else {
21355
+ obj[key] = value;
21356
+ }
21357
+ return obj;
21358
+ }
21066
21359
  // DataTransfer is not implemented in jsdom.
21067
21360
  // DataTransfer with FileList is being created by the browser on certain events.
21068
21361
  class DataTransferItemStub {
@@ -21078,8 +21371,10 @@ class DataTransferItemStub {
21078
21371
  throw new Error('not implemented');
21079
21372
  }
21080
21373
  constructor(dataOrFile, type){
21081
- this.file = null;
21082
- this.data = undefined;
21374
+ _define_property$8(this, "kind", void 0);
21375
+ _define_property$8(this, "type", void 0);
21376
+ _define_property$8(this, "file", null);
21377
+ _define_property$8(this, "data", undefined);
21083
21378
  if (typeof dataOrFile === 'string') {
21084
21379
  this.kind = 'string';
21085
21380
  this.type = String(type);
@@ -21114,8 +21409,8 @@ function getTypeMatcher(type, exact) {
21114
21409
  function createDataTransferStub(window) {
21115
21410
  return new class DataTransferStub {
21116
21411
  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));
21412
+ var _this_items_find;
21413
+ 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
21414
  let text = '';
21120
21415
  match === null || match === void 0 ? void 0 : match.getAsString((t)=>{
21121
21416
  text = t;
@@ -21152,10 +21447,10 @@ function createDataTransferStub(window) {
21152
21447
  }
21153
21448
  /* istanbul ignore next */ setDragImage() {}
21154
21449
  constructor(){
21155
- this.dropEffect = 'none';
21156
- this.effectAllowed = 'uninitialized';
21157
- this.items = new DataTransferItemListStub();
21158
- this.files = createFileList(window, []);
21450
+ _define_property$8(this, "dropEffect", 'none');
21451
+ _define_property$8(this, "effectAllowed", 'uninitialized');
21452
+ _define_property$8(this, "items", new DataTransferItemListStub());
21453
+ _define_property$8(this, "files", createFileList(window, []));
21159
21454
  }
21160
21455
  }();
21161
21456
  }
@@ -21183,13 +21478,26 @@ function getBlobFromDataTransferItem(window, item) {
21183
21478
  }
21184
21479
 
21185
21480
  // Clipboard is not available in jsdom
21481
+ function _define_property$7(obj, key, value) {
21482
+ if (key in obj) {
21483
+ Object.defineProperty(obj, key, {
21484
+ value: value,
21485
+ enumerable: true,
21486
+ configurable: true,
21487
+ writable: true
21488
+ });
21489
+ } else {
21490
+ obj[key] = value;
21491
+ }
21492
+ return obj;
21493
+ }
21186
21494
  // MDN lists string|Blob|Promise<Blob|string> as possible types in ClipboardItemData
21187
21495
  // lib.dom.d.ts lists only Promise<Blob|string>
21188
21496
  // https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem#syntax
21189
21497
  function createClipboardItem(window, ...blobs) {
21190
21498
  const dataMap = Object.fromEntries(blobs.map((b)=>[
21191
21499
  typeof b === 'string' ? 'text/plain' : b.type,
21192
- Promise.resolve(b),
21500
+ Promise.resolve(b)
21193
21501
  ]));
21194
21502
  // use real ClipboardItem if available
21195
21503
  /* istanbul ignore if */ if (typeof window.ClipboardItem !== 'undefined') {
@@ -21211,6 +21519,7 @@ function createClipboardItem(window, ...blobs) {
21211
21519
  });
21212
21520
  }
21213
21521
  constructor(d){
21522
+ _define_property$7(this, "data", void 0);
21214
21523
  this.data = d;
21215
21524
  }
21216
21525
  }(dataMap);
@@ -21241,15 +21550,14 @@ function createClipboardStub(window, control) {
21241
21550
  }
21242
21551
  constructor(...args){
21243
21552
  super(...args);
21244
- this.items = [];
21553
+ _define_property$7(this, "items", []);
21245
21554
  }
21246
21555
  }(), {
21247
21556
  [ClipboardStubControl]: control
21248
21557
  });
21249
21558
  }
21250
21559
  function isClipboardStub(clipboard) {
21251
- var ref;
21252
- return !!((ref = clipboard) === null || ref === void 0 ? void 0 : ref[ClipboardStubControl]);
21560
+ return !!(clipboard === null || clipboard === void 0 ? void 0 : clipboard[ClipboardStubControl]);
21253
21561
  }
21254
21562
  function attachClipboardStubToView(window) {
21255
21563
  if (isClipboardStub(window.navigator.clipboard)) {
@@ -21319,11 +21627,12 @@ async function writeDataTransferToClipboard(document, clipboardData) {
21319
21627
  throw new Error('The Clipboard API is unavailable.');
21320
21628
  }
21321
21629
  }
21322
- /* istanbul ignore else */ if (typeof globalThis.afterEach === 'function') {
21323
- globalThis.afterEach(()=>resetClipboardStubOnView(globalThis.window));
21630
+ const g = globalThis;
21631
+ /* istanbul ignore else */ if (typeof g.afterEach === 'function') {
21632
+ g.afterEach(()=>resetClipboardStubOnView(globalThis.window));
21324
21633
  }
21325
- /* istanbul ignore else */ if (typeof globalThis.afterAll === 'function') {
21326
- globalThis.afterAll(()=>detachClipboardStubFromView(globalThis.window));
21634
+ /* istanbul ignore else */ if (typeof g.afterAll === 'function') {
21635
+ g.afterAll(()=>detachClipboardStubFromView(globalThis.window));
21327
21636
  }
21328
21637
 
21329
21638
  //jsdom is not supporting isContentEditable
@@ -21374,8 +21683,8 @@ var maxLengthSupportedTypes;
21374
21683
  // can't use .maxLength property because of a jsdom bug:
21375
21684
  // https://github.com/jsdom/jsdom/issues/2927
21376
21685
  function getMaxLength(element) {
21377
- var ref;
21378
- const attr = (ref = element.getAttribute('maxlength')) !== null && ref !== void 0 ? ref : '';
21686
+ var _element_getAttribute;
21687
+ const attr = (_element_getAttribute = element.getAttribute('maxlength')) !== null && _element_getAttribute !== void 0 ? _element_getAttribute : '';
21379
21688
  return /^\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : undefined;
21380
21689
  }
21381
21690
  function supportsMaxLength(element) {
@@ -21390,7 +21699,7 @@ const FOCUSABLE_SELECTOR = [
21390
21699
  '[contenteditable=""]',
21391
21700
  '[contenteditable="true"]',
21392
21701
  'a[href]',
21393
- '[tabindex]:not([disabled])',
21702
+ '[tabindex]:not([disabled])'
21394
21703
  ].join(', ');
21395
21704
 
21396
21705
  function isFocusable(element) {
@@ -21436,16 +21745,16 @@ function readPrintableChar(text, pos, context) {
21436
21745
  };
21437
21746
  }
21438
21747
  function readTag(text, pos, startBracket, context) {
21439
- var ref, ref1;
21748
+ var _text_slice_match, _text_slice_match1;
21440
21749
  const releasePreviousModifier = text[pos] === '/' ? '/' : '';
21441
21750
  pos += releasePreviousModifier.length;
21442
21751
  const escapedDescriptor = startBracket === '{' && text[pos] === '\\';
21443
21752
  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];
21753
+ 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
21754
  assertDescriptor(descriptor, text, pos, context);
21446
21755
  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 : '';
21756
+ var _text_slice_match_;
21757
+ 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
21758
  pos += repeatModifier.length;
21450
21759
  const releaseSelfModifier = text[pos] === '/' || !repeatModifier && text[pos] === '>' ? text[pos] : '';
21451
21760
  pos += releaseSelfModifier.length;
@@ -21455,7 +21764,7 @@ function readTag(text, pos, startBracket, context) {
21455
21764
  throw new Error(getErrorMessage([
21456
21765
  !repeatModifier && 'repeat modifier',
21457
21766
  !releaseSelfModifier && 'release modifier',
21458
- `"${expectedEndBracket}"`,
21767
+ `"${expectedEndBracket}"`
21459
21768
  ].filter(Boolean).join(' or '), text[pos], text, context));
21460
21769
  }
21461
21770
  pos += endBracket.length;
@@ -21522,14 +21831,14 @@ function isDisabled(element) {
21522
21831
  'select',
21523
21832
  'textarea',
21524
21833
  'optgroup',
21525
- 'option',
21834
+ 'option'
21526
21835
  ])) {
21527
21836
  if (el.hasAttribute('disabled')) {
21528
21837
  return true;
21529
21838
  }
21530
21839
  } 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))) {
21840
+ var _el_querySelector;
21841
+ if (el.hasAttribute('disabled') && !((_el_querySelector = el.querySelector(':scope > legend')) === null || _el_querySelector === void 0 ? void 0 : _el_querySelector.contains(element))) {
21533
21842
  return true;
21534
21843
  }
21535
21844
  } else if (el.tagName.includes('-')) {
@@ -21554,8 +21863,8 @@ function getActiveElement(document) {
21554
21863
  }
21555
21864
  }
21556
21865
  function getActiveElementOrBody(document) {
21557
- var ref;
21558
- return (ref = getActiveElement(document)) !== null && ref !== void 0 ? ref : /* istanbul ignore next */ document.body;
21866
+ var _getActiveElement;
21867
+ return (_getActiveElement = getActiveElement(document)) !== null && _getActiveElement !== void 0 ? _getActiveElement : /* istanbul ignore next */ document.body;
21559
21868
  }
21560
21869
 
21561
21870
  function findClosest(element, callback) {
@@ -21601,8 +21910,8 @@ function isElement$1(node) {
21601
21910
  const contenteditable = getContentEditable(selection.focusNode);
21602
21911
  if (contenteditable) {
21603
21912
  if (!selection.isCollapsed) {
21604
- var ref;
21605
- const focusNode = ((ref = contenteditable.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
21913
+ var _contenteditable_firstChild;
21914
+ const focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === void 0 ? void 0 : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
21606
21915
  selection.setBaseAndExtent(focusNode, 0, focusNode, 0);
21607
21916
  }
21608
21917
  } else {
@@ -21611,8 +21920,9 @@ function isElement$1(node) {
21611
21920
  }
21612
21921
  }
21613
21922
 
21923
+ const { getConfig: getConfig$2 } = named$1;
21614
21924
  function wrapEvent(cb, _element) {
21615
- return getConfig().eventWrapper(cb);
21925
+ return getConfig$2().eventWrapper(cb);
21616
21926
  }
21617
21927
 
21618
21928
  /**
@@ -21625,10 +21935,7 @@ function wrapEvent(cb, _element) {
21625
21935
  } else if (target) {
21626
21936
  wrapEvent(()=>target.focus());
21627
21937
  } else {
21628
- wrapEvent(()=>{
21629
- var ref;
21630
- return (ref = activeElement) === null || ref === void 0 ? void 0 : ref.blur();
21631
- });
21938
+ wrapEvent(()=>activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur());
21632
21939
  }
21633
21940
  updateSelectionOnFocus(target !== null && target !== void 0 ? target : element.ownerDocument.body);
21634
21941
  }
@@ -21698,7 +22005,7 @@ function getInitialValue(element) {
21698
22005
  function setUISelectionRaw(element, selection) {
21699
22006
  element[UISelection] = selection;
21700
22007
  }
21701
- function setUISelection(element, { focusOffset: focusOffsetParam , anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {
22008
+ function setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {
21702
22009
  const valueLength = getUIValue(element).length;
21703
22010
  const sanitizeOffset = (o)=>Math.max(0, Math.min(valueLength, o));
21704
22011
  const anchorOffset = mode === 'replace' || element[UISelection] === undefined ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset;
@@ -21724,10 +22031,10 @@ function setUISelection(element, { focusOffset: focusOffsetParam , anchorOffset:
21724
22031
  }
21725
22032
  }
21726
22033
  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
22034
+ var _element_selectionStart, _element_selectionEnd, _element_UISelection;
22035
+ const sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== void 0 ? _element_UISelection : {
22036
+ anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : 0,
22037
+ focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : 0
21731
22038
  };
21732
22039
  return {
21733
22040
  ...sel,
@@ -21877,14 +22184,14 @@ function isTextNode(node) {
21877
22184
  }
21878
22185
  function walkNodes(node, direction, callback) {
21879
22186
  for(;;){
21880
- var ref;
22187
+ var _node_ownerDocument;
21881
22188
  const sibling = node[`${direction}Sibling`];
21882
22189
  if (sibling) {
21883
22190
  node = getDescendant(sibling, direction === 'next' ? 'first' : 'last');
21884
22191
  if (callback(node)) {
21885
22192
  return node;
21886
22193
  }
21887
- } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((ref = node.ownerDocument) === null || ref === void 0 ? void 0 : ref.body))) {
22194
+ } 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
22195
  node = node.parentNode;
21889
22196
  } else {
21890
22197
  break;
@@ -21919,8 +22226,8 @@ function startTrackValue(element) {
21919
22226
  };
21920
22227
  }
21921
22228
  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);
22229
+ var _element_TrackChanges_tracked, _element_TrackChanges;
22230
+ (_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
22231
  if (!element[TrackChanges]) {
21925
22232
  setUIValueClean(element);
21926
22233
  setUISelection(element, {
@@ -21929,10 +22236,10 @@ function trackOrSetValue(element, v) {
21929
22236
  }
21930
22237
  }
21931
22238
  function commitValueAfterInput(element, cursorOffset) {
21932
- var ref;
22239
+ var _changes_tracked;
21933
22240
  const changes = element[TrackChanges];
21934
22241
  element[TrackChanges] = undefined;
21935
- if (!(changes === null || changes === void 0 ? void 0 : (ref = changes.tracked) === null || ref === void 0 ? void 0 : ref.length)) {
22242
+ if (!(changes === null || changes === void 0 ? void 0 : (_changes_tracked = changes.tracked) === null || _changes_tracked === void 0 ? void 0 : _changes_tracked.length)) {
21936
22243
  return;
21937
22244
  }
21938
22245
  const isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;
@@ -21976,16 +22283,16 @@ function getElement(node) {
21976
22283
  if (typeAndSelection.type === 'input') {
21977
22284
  return typeAndSelection.selection;
21978
22285
  } else if (typeAndSelection.type === 'contenteditable') {
21979
- var ref;
22286
+ var _typeAndSelection_selection;
21980
22287
  // 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);
22288
+ return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === void 0 ? void 0 : _typeAndSelection_selection.getRangeAt(0);
21982
22289
  }
21983
22290
  }
21984
22291
 
21985
22292
  /**
21986
22293
  * Set the selection
21987
- */ function setSelection({ focusNode , focusOffset , anchorNode =focusNode , anchorOffset =focusOffset }) {
21988
- var ref, ref1;
22294
+ */ function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {
22295
+ var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;
21989
22296
  const typeAndSelection = getTargetTypeAndSelection(focusNode);
21990
22297
  if (typeAndSelection.type === 'input') {
21991
22298
  return setUISelection(focusNode, {
@@ -21993,7 +22300,7 @@ function getElement(node) {
21993
22300
  focusOffset
21994
22301
  });
21995
22302
  }
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);
22303
+ (_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
22304
  }
21998
22305
 
21999
22306
  function isDateOrTime(element) {
@@ -22076,7 +22383,7 @@ function editInputElement(instance, element, inputRange, data, inputType) {
22076
22383
  }
22077
22384
  }
22078
22385
  }
22079
- const { newValue , newOffset , oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
22386
+ const { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
22080
22387
  if (newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset) {
22081
22388
  return;
22082
22389
  }
@@ -22104,7 +22411,7 @@ function editInputElement(instance, element, inputRange, data, inputType) {
22104
22411
  });
22105
22412
  }
22106
22413
  }
22107
- function calculateNewValue(inputData, node, { startOffset , endOffset }, inputType) {
22414
+ function calculateNewValue(inputData, node, { startOffset, endOffset }, inputType) {
22108
22415
  const value = getUIValue(node);
22109
22416
  const prologEnd = Math.max(0, startOffset === endOffset && inputType === 'deleteContentBackward' ? startOffset - 1 : startOffset);
22110
22417
  const prolog = value.substring(0, prologEnd);
@@ -22132,12 +22439,12 @@ function commitInput(instance, element, newOffset, inputInit) {
22132
22439
  commitValueAfterInput(element, newOffset);
22133
22440
  }
22134
22441
  function isValidNumberInput(value) {
22135
- var ref, ref1;
22442
+ var _value_match, _value_match1;
22136
22443
  // the browser allows some invalid input but not others
22137
22444
  // it allows up to two '-' at any place before any 'e' or one directly following 'e'
22138
22445
  // it allows one '.' at any place before e
22139
22446
  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]));
22447
+ 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
22448
  }
22142
22449
 
22143
22450
  behavior.cut = (event, target, instance)=>{
@@ -22162,7 +22469,7 @@ function getValueOrTextContent(element) {
22162
22469
  function isVisible(element) {
22163
22470
  const window = getWindow(element);
22164
22471
  for(let el = element; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement){
22165
- const { display , visibility } = window.getComputedStyle(el);
22472
+ const { display, visibility } = window.getComputedStyle(el);
22166
22473
  if (display === 'none') {
22167
22474
  return false;
22168
22475
  }
@@ -22256,12 +22563,12 @@ function getTabDestination(activeElement, shift) {
22256
22563
  focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset
22257
22564
  });
22258
22565
  } else {
22259
- const selection1 = node.ownerDocument.getSelection();
22260
- if (!(selection1 === null || selection1 === void 0 ? void 0 : selection1.focusNode)) {
22566
+ const selection = node.ownerDocument.getSelection();
22567
+ if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) {
22261
22568
  return;
22262
22569
  }
22263
- if (selection1.isCollapsed) {
22264
- const nextPosition = getNextCursorPosition(selection1.focusNode, selection1.focusOffset, direction);
22570
+ if (selection.isCollapsed) {
22571
+ const nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);
22265
22572
  if (nextPosition) {
22266
22573
  setSelection({
22267
22574
  focusNode: nextPosition.node,
@@ -22269,7 +22576,7 @@ function getTabDestination(activeElement, shift) {
22269
22576
  });
22270
22577
  }
22271
22578
  } else {
22272
- selection1[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();
22579
+ selection[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();
22273
22580
  }
22274
22581
  }
22275
22582
  }
@@ -22284,8 +22591,8 @@ function getTabDestination(activeElement, shift) {
22284
22591
  focusOffset: getUIValue(target).length
22285
22592
  });
22286
22593
  }
22287
- var ref;
22288
- const focusNode = (ref = getContentEditable(target)) !== null && ref !== void 0 ? ref : target.ownerDocument.body;
22594
+ var _getContentEditable;
22595
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
22289
22596
  setSelection({
22290
22597
  focusNode,
22291
22598
  anchorOffset: 0,
@@ -22296,8 +22603,8 @@ function isAllSelected(target) {
22296
22603
  if (hasOwnSelection(target)) {
22297
22604
  return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;
22298
22605
  }
22299
- var ref;
22300
- const focusNode = (ref = getContentEditable(target)) !== null && ref !== void 0 ? ref : target.ownerDocument.body;
22606
+ var _getContentEditable;
22607
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
22301
22608
  const selection = target.ownerDocument.getSelection();
22302
22609
  return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;
22303
22610
  }
@@ -22307,7 +22614,7 @@ function isAllSelected(target) {
22307
22614
  *
22308
22615
  * Handles input elements and contenteditable if it only contains a single text node.
22309
22616
  */ function setSelectionRange(element, anchorOffset, focusOffset) {
22310
- var ref;
22617
+ var _element_firstChild;
22311
22618
  if (hasOwnSelection(element)) {
22312
22619
  return setSelection({
22313
22620
  focusNode: element,
@@ -22315,7 +22622,7 @@ function isAllSelected(target) {
22315
22622
  focusOffset
22316
22623
  });
22317
22624
  }
22318
- /* istanbul ignore else */ if (isContentEditable(element) && ((ref = element.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3) {
22625
+ /* istanbul ignore else */ if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === void 0 ? void 0 : _element_firstChild.nodeType) === 3) {
22319
22626
  return setSelection({
22320
22627
  focusNode: element.firstChild,
22321
22628
  anchorOffset,
@@ -22344,9 +22651,9 @@ function walkRadio(instance, el, direction) {
22344
22651
  }
22345
22652
 
22346
22653
  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);
22654
+ var _keydownBehavior_event_key;
22655
+ var _keydownBehavior_event_key1;
22656
+ 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
22657
  };
22351
22658
  const keydownBehavior = {
22352
22659
  ArrowDown: (event, target, instance)=>{
@@ -22399,9 +22706,9 @@ const keydownBehavior = {
22399
22706
  'textarea'
22400
22707
  ]) || isContentEditable(target)) {
22401
22708
  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;
22709
+ var _getValueOrTextContent;
22710
+ var _getValueOrTextContent_length;
22711
+ 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
22712
  setSelectionRange(target, newPos, newPos);
22406
22713
  };
22407
22714
  }
@@ -22484,7 +22791,7 @@ const ClickInputOnEnter = [
22484
22791
  'file',
22485
22792
  'image',
22486
22793
  'reset',
22487
- 'submit',
22794
+ 'submit'
22488
22795
  ];
22489
22796
  const SubmitSingleInputOnEnter = [
22490
22797
  'email',
@@ -22494,12 +22801,12 @@ const SubmitSingleInputOnEnter = [
22494
22801
  'tel',
22495
22802
  'text',
22496
22803
  'url',
22497
- 'week',
22804
+ 'week'
22498
22805
  ];
22499
22806
 
22500
22807
  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);
22808
+ var _keyupBehavior_event_key;
22809
+ return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === void 0 ? void 0 : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);
22503
22810
  };
22504
22811
  const keyupBehavior = {
22505
22812
  ' ': (event, target, instance)=>{
@@ -22512,8 +22819,8 @@ const keyupBehavior = {
22512
22819
  behavior.paste = (event, target, instance)=>{
22513
22820
  if (isEditable(target)) {
22514
22821
  return ()=>{
22515
- var ref;
22516
- const insertData = (ref = event.clipboardData) === null || ref === void 0 ? void 0 : ref.getData('text');
22822
+ var _event_clipboardData;
22823
+ const insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === void 0 ? void 0 : _event_clipboardData.getData('text');
22517
22824
  if (insertData) {
22518
22825
  input(instance, target, insertData, 'insertFromPaste');
22519
22826
  }
@@ -23292,7 +23599,7 @@ const eventInitializer = {
23292
23599
  initUIEvent,
23293
23600
  initUIEventModififiers,
23294
23601
  initMouseEvent,
23295
- initPointerEvent,
23602
+ initPointerEvent
23296
23603
  ],
23297
23604
  KeyboardEvent: [
23298
23605
  initUIEvent,
@@ -23301,58 +23608,58 @@ const eventInitializer = {
23301
23608
  ]
23302
23609
  };
23303
23610
  function createEvent(type, target, init) {
23304
- var ref;
23611
+ var _eventInitializer_EventType;
23305
23612
  const window = getWindow(target);
23306
- const { EventType , defaultInit } = eventMap[eventMapKeys[type]];
23613
+ const { EventType, defaultInit } = eventMap[eventMapKeys[type]];
23307
23614
  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 : {}));
23615
+ (_eventInitializer_EventType = eventInitializer[EventType]) === null || _eventInitializer_EventType === void 0 ? void 0 : _eventInitializer_EventType.forEach((f)=>f(event, init !== null && init !== void 0 ? init : {}));
23309
23616
  return event;
23310
23617
  }
23311
23618
  /* 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 {
23619
+ var _window_Event;
23620
+ /* 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
23621
  };
23315
- var _AnimationEvent;
23316
- const AnimationEvent = (_AnimationEvent = window.AnimationEvent) !== null && _AnimationEvent !== void 0 ? _AnimationEvent : class AnimationEvent extends Event {
23622
+ var _window_AnimationEvent;
23623
+ const AnimationEvent = (_window_AnimationEvent = window.AnimationEvent) !== null && _window_AnimationEvent !== void 0 ? _window_AnimationEvent : class AnimationEvent extends Event {
23317
23624
  };
23318
- var _ClipboardEvent;
23319
- const ClipboardEvent = (_ClipboardEvent = window.ClipboardEvent) !== null && _ClipboardEvent !== void 0 ? _ClipboardEvent : class ClipboardEvent extends Event {
23625
+ var _window_ClipboardEvent;
23626
+ const ClipboardEvent = (_window_ClipboardEvent = window.ClipboardEvent) !== null && _window_ClipboardEvent !== void 0 ? _window_ClipboardEvent : class ClipboardEvent extends Event {
23320
23627
  };
23321
- var _PopStateEvent;
23322
- const PopStateEvent = (_PopStateEvent = window.PopStateEvent) !== null && _PopStateEvent !== void 0 ? _PopStateEvent : class PopStateEvent extends Event {
23628
+ var _window_PopStateEvent;
23629
+ const PopStateEvent = (_window_PopStateEvent = window.PopStateEvent) !== null && _window_PopStateEvent !== void 0 ? _window_PopStateEvent : class PopStateEvent extends Event {
23323
23630
  };
23324
- var _ProgressEvent;
23325
- const ProgressEvent = (_ProgressEvent = window.ProgressEvent) !== null && _ProgressEvent !== void 0 ? _ProgressEvent : class ProgressEvent extends Event {
23631
+ var _window_ProgressEvent;
23632
+ const ProgressEvent = (_window_ProgressEvent = window.ProgressEvent) !== null && _window_ProgressEvent !== void 0 ? _window_ProgressEvent : class ProgressEvent extends Event {
23326
23633
  };
23327
- var _TransitionEvent;
23328
- const TransitionEvent = (_TransitionEvent = window.TransitionEvent) !== null && _TransitionEvent !== void 0 ? _TransitionEvent : class TransitionEvent extends Event {
23634
+ var _window_TransitionEvent;
23635
+ const TransitionEvent = (_window_TransitionEvent = window.TransitionEvent) !== null && _window_TransitionEvent !== void 0 ? _window_TransitionEvent : class TransitionEvent extends Event {
23329
23636
  };
23330
- var _UIEvent;
23331
- const UIEvent = (_UIEvent = window.UIEvent) !== null && _UIEvent !== void 0 ? _UIEvent : class UIEvent extends Event {
23637
+ var _window_UIEvent;
23638
+ const UIEvent = (_window_UIEvent = window.UIEvent) !== null && _window_UIEvent !== void 0 ? _window_UIEvent : class UIEvent extends Event {
23332
23639
  };
23333
- var _CompositionEvent;
23334
- const CompositionEvent = (_CompositionEvent = window.CompositionEvent) !== null && _CompositionEvent !== void 0 ? _CompositionEvent : class CompositionEvent extends UIEvent {
23640
+ var _window_CompositionEvent;
23641
+ const CompositionEvent = (_window_CompositionEvent = window.CompositionEvent) !== null && _window_CompositionEvent !== void 0 ? _window_CompositionEvent : class CompositionEvent extends UIEvent {
23335
23642
  };
23336
- var _FocusEvent;
23337
- const FocusEvent = (_FocusEvent = window.FocusEvent) !== null && _FocusEvent !== void 0 ? _FocusEvent : class FocusEvent extends UIEvent {
23643
+ var _window_FocusEvent;
23644
+ const FocusEvent = (_window_FocusEvent = window.FocusEvent) !== null && _window_FocusEvent !== void 0 ? _window_FocusEvent : class FocusEvent extends UIEvent {
23338
23645
  };
23339
- var _InputEvent;
23340
- const InputEvent = (_InputEvent = window.InputEvent) !== null && _InputEvent !== void 0 ? _InputEvent : class InputEvent extends UIEvent {
23646
+ var _window_InputEvent;
23647
+ const InputEvent = (_window_InputEvent = window.InputEvent) !== null && _window_InputEvent !== void 0 ? _window_InputEvent : class InputEvent extends UIEvent {
23341
23648
  };
23342
- var _KeyboardEvent;
23343
- const KeyboardEvent = (_KeyboardEvent = window.KeyboardEvent) !== null && _KeyboardEvent !== void 0 ? _KeyboardEvent : class KeyboardEvent extends UIEvent {
23649
+ var _window_KeyboardEvent;
23650
+ const KeyboardEvent = (_window_KeyboardEvent = window.KeyboardEvent) !== null && _window_KeyboardEvent !== void 0 ? _window_KeyboardEvent : class KeyboardEvent extends UIEvent {
23344
23651
  };
23345
- var _MouseEvent;
23346
- const MouseEvent = (_MouseEvent = window.MouseEvent) !== null && _MouseEvent !== void 0 ? _MouseEvent : class MouseEvent extends UIEvent {
23652
+ var _window_MouseEvent;
23653
+ const MouseEvent = (_window_MouseEvent = window.MouseEvent) !== null && _window_MouseEvent !== void 0 ? _window_MouseEvent : class MouseEvent extends UIEvent {
23347
23654
  };
23348
- var _DragEvent;
23349
- const DragEvent = (_DragEvent = window.DragEvent) !== null && _DragEvent !== void 0 ? _DragEvent : class DragEvent extends MouseEvent {
23655
+ var _window_DragEvent;
23656
+ const DragEvent = (_window_DragEvent = window.DragEvent) !== null && _window_DragEvent !== void 0 ? _window_DragEvent : class DragEvent extends MouseEvent {
23350
23657
  };
23351
- var _PointerEvent;
23352
- const PointerEvent = (_PointerEvent = window.PointerEvent) !== null && _PointerEvent !== void 0 ? _PointerEvent : class PointerEvent extends MouseEvent {
23658
+ var _window_PointerEvent;
23659
+ const PointerEvent = (_window_PointerEvent = window.PointerEvent) !== null && _window_PointerEvent !== void 0 ? _window_PointerEvent : class PointerEvent extends MouseEvent {
23353
23660
  };
23354
- var _TouchEvent;
23355
- const TouchEvent = (_TouchEvent = window.TouchEvent) !== null && _TouchEvent !== void 0 ? _TouchEvent : class TouchEvent extends UIEvent {
23661
+ var _window_TouchEvent;
23662
+ const TouchEvent = (_window_TouchEvent = window.TouchEvent) !== null && _window_TouchEvent !== void 0 ? _window_TouchEvent : class TouchEvent extends UIEvent {
23356
23663
  };
23357
23664
  /* eslint-enable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ return {
23358
23665
  Event,
@@ -23382,25 +23689,25 @@ function assignProps(obj, props) {
23382
23689
  function sanitizeNumber(n) {
23383
23690
  return Number(n !== null && n !== void 0 ? n : 0);
23384
23691
  }
23385
- function initClipboardEvent(event, { clipboardData }) {
23692
+ function initClipboardEvent(event, { clipboardData }) {
23386
23693
  assignProps(event, {
23387
23694
  clipboardData
23388
23695
  });
23389
23696
  }
23390
- function initInputEvent(event, { data , inputType , isComposing }) {
23697
+ function initInputEvent(event, { data, inputType, isComposing }) {
23391
23698
  assignProps(event, {
23392
23699
  data,
23393
23700
  isComposing: Boolean(isComposing),
23394
23701
  inputType: String(inputType)
23395
23702
  });
23396
23703
  }
23397
- function initUIEvent(event, { view , detail }) {
23704
+ function initUIEvent(event, { view, detail }) {
23398
23705
  assignProps(event, {
23399
23706
  view,
23400
23707
  detail: sanitizeNumber(detail !== null && detail !== void 0 ? detail : 0)
23401
23708
  });
23402
23709
  }
23403
- function initUIEventModififiers(event, { altKey , ctrlKey , metaKey , shiftKey , modifierAltGraph , modifierCapsLock , modifierFn , modifierFnLock , modifierNumLock , modifierScrollLock , modifierSymbol , modifierSymbolLock }) {
23710
+ function initUIEventModififiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {
23404
23711
  assignProps(event, {
23405
23712
  altKey: Boolean(altKey),
23406
23713
  ctrlKey: Boolean(ctrlKey),
@@ -23424,7 +23731,7 @@ function initUIEventModififiers(event, { altKey , ctrlKey , metaKey , shiftKey ,
23424
23731
  }
23425
23732
  });
23426
23733
  }
23427
- function initKeyboardEvent(event, { key , code , location , repeat , isComposing , charCode }) {
23734
+ function initKeyboardEvent(event, { key, code, location, repeat, isComposing, charCode }) {
23428
23735
  assignProps(event, {
23429
23736
  key: String(key),
23430
23737
  code: String(code),
@@ -23434,7 +23741,7 @@ function initKeyboardEvent(event, { key , code , location , repeat , isComposing
23434
23741
  charCode
23435
23742
  });
23436
23743
  }
23437
- function initMouseEvent(event, { x , y , screenX , screenY , clientX =x , clientY =y , button , buttons , relatedTarget }) {
23744
+ function initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget }) {
23438
23745
  assignProps(event, {
23439
23746
  screenX: sanitizeNumber(screenX),
23440
23747
  screenY: sanitizeNumber(screenY),
@@ -23447,7 +23754,7 @@ function initMouseEvent(event, { x , y , screenX , screenY , clientX =x , client
23447
23754
  relatedTarget
23448
23755
  });
23449
23756
  }
23450
- function initPointerEvent(event, { pointerId , width , height , pressure , tangentialPressure , tiltX , tiltY , twist , pointerType , isPrimary }) {
23757
+ function initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary }) {
23451
23758
  assignProps(event, {
23452
23759
  pointerId: sanitizeNumber(pointerId),
23453
23760
  width: sanitizeNumber(width),
@@ -23473,9 +23780,9 @@ function dispatchUIEvent(target, type, init, preventDefault = false) {
23473
23780
  return dispatchEvent.call(this, target, event, preventDefault);
23474
23781
  }
23475
23782
  function dispatchEvent(target, event, preventDefault = false) {
23476
- var ref;
23783
+ var _behavior_type;
23477
23784
  const type = event.type;
23478
- const behaviorImplementation = preventDefault ? ()=>{} : (ref = behavior[type]) === null || ref === void 0 ? void 0 : ref(event, target, this);
23785
+ const behaviorImplementation = preventDefault ? ()=>{} : (_behavior_type = behavior[type]) === null || _behavior_type === void 0 ? void 0 : _behavior_type.call(behavior, event, target, this);
23479
23786
  if (behaviorImplementation) {
23480
23787
  event.preventDefault();
23481
23788
  let defaultPrevented = false;
@@ -23509,7 +23816,7 @@ function prepareInterceptor(element, propName, interceptorImpl) {
23509
23816
  throw new Error(`Element ${element.tagName} does not implement "${String(propName)}".`);
23510
23817
  }
23511
23818
  function intercept(...args) {
23512
- const { applyNative =false , realArgs , then , } = interceptorImpl.call(this, ...args);
23819
+ const { applyNative = false, realArgs, then } = interceptorImpl.call(this, ...args);
23513
23820
  const realFunc = (!applyNative && objectDescriptor || prototypeDescriptor)[target];
23514
23821
  if (target === 'set') {
23515
23822
  realFunc.call(this, realArgs);
@@ -23655,11 +23962,23 @@ function wait(config) {
23655
23962
  }
23656
23963
  return Promise.all([
23657
23964
  new Promise((resolve)=>globalThis.setTimeout(()=>resolve(), delay)),
23658
- config.advanceTimers(delay),
23965
+ config.advanceTimers(delay)
23659
23966
  ]);
23660
23967
  }
23661
23968
 
23662
- var _pressed, _code, _code1;
23969
+ function _define_property$6(obj, key, value) {
23970
+ if (key in obj) {
23971
+ Object.defineProperty(obj, key, {
23972
+ value: value,
23973
+ enumerable: true,
23974
+ configurable: true,
23975
+ writable: true
23976
+ });
23977
+ } else {
23978
+ obj[key] = value;
23979
+ }
23980
+ return obj;
23981
+ }
23663
23982
  var DOM_KEY_LOCATION;
23664
23983
  (function(DOM_KEY_LOCATION) {
23665
23984
  DOM_KEY_LOCATION[DOM_KEY_LOCATION["STANDARD"] = 0] = "STANDARD";
@@ -23674,7 +23993,7 @@ const modifierKeys = [
23674
23993
  'Fn',
23675
23994
  'Meta',
23676
23995
  'Shift',
23677
- 'Symbol',
23996
+ 'Symbol'
23678
23997
  ];
23679
23998
  function isModifierKey(key) {
23680
23999
  return modifierKeys.includes(key);
@@ -23684,7 +24003,7 @@ const modifierLocks = [
23684
24003
  'FnLock',
23685
24004
  'NumLock',
23686
24005
  'ScrollLock',
23687
- 'SymbolLock',
24006
+ 'SymbolLock'
23688
24007
  ];
23689
24008
  function isModifierLock(key) {
23690
24009
  return modifierLocks.includes(key);
@@ -23697,12 +24016,14 @@ class KeyboardHost {
23697
24016
  return Object.values(this.pressed).map((p)=>p.keyDef);
23698
24017
  }
23699
24018
  /** Press a key */ async keydown(instance, keyDef) {
24019
+ var // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
24020
+ _this_pressed, _code, _this_pressed_code;
23700
24021
  const key = String(keyDef.key);
23701
24022
  const code = String(keyDef.code);
23702
24023
  const target = getActiveElementOrBody(instance.config.document);
23703
24024
  this.setKeydownTarget(target);
23704
- var ref;
23705
- (ref = (_pressed = this.pressed)[_code = code]) !== null && ref !== void 0 ? ref : _pressed[_code] = {
24025
+ var _;
24026
+ (_ = (_this_pressed = this.pressed)[_code = code]) !== null && _ !== void 0 ? _ : _this_pressed[_code] = {
23706
24027
  keyDef,
23707
24028
  unpreventedDefault: false
23708
24029
  };
@@ -23717,7 +24038,7 @@ class KeyboardHost {
23717
24038
  this.modifiers[key] = true;
23718
24039
  this.modifierLockStart[key] = true;
23719
24040
  }
23720
- (_code1 = this.pressed[code]).unpreventedDefault || (_code1.unpreventedDefault = unprevented);
24041
+ (_this_pressed_code = this.pressed[code]).unpreventedDefault || (_this_pressed_code.unpreventedDefault = unprevented);
23721
24042
  if (unprevented && this.hasKeyPress(key)) {
23722
24043
  instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), 'keypress', {
23723
24044
  key,
@@ -23757,7 +24078,8 @@ class KeyboardHost {
23757
24078
  return (key.length === 1 || key === 'Enter') && !this.modifiers.Control && !this.modifiers.Alt;
23758
24079
  }
23759
24080
  constructor(system){
23760
- this.modifiers = {
24081
+ _define_property$6(this, "system", void 0);
24082
+ _define_property$6(this, "modifiers", {
23761
24083
  Alt: false,
23762
24084
  AltGraph: false,
23763
24085
  CapsLock: false,
@@ -23770,11 +24092,11 @@ class KeyboardHost {
23770
24092
  Shift: false,
23771
24093
  Symbol: false,
23772
24094
  SymbolLock: false
23773
- };
23774
- this.pressed = {};
23775
- this.carryChar = '';
23776
- this.lastKeydownTarget = undefined;
23777
- this.modifierLockStart = {};
24095
+ });
24096
+ _define_property$6(this, "pressed", {});
24097
+ _define_property$6(this, "carryChar", '');
24098
+ _define_property$6(this, "lastKeydownTarget", undefined);
24099
+ _define_property$6(this, "modifierLockStart", {});
23778
24100
  this.system = system;
23779
24101
  }
23780
24102
  }
@@ -23957,9 +24279,22 @@ const defaultKeyMap = [
23957
24279
  {
23958
24280
  name: 'TouchC',
23959
24281
  pointerType: 'touch'
23960
- },
24282
+ }
23961
24283
  ];
23962
24284
 
24285
+ function _define_property$5(obj, key, value) {
24286
+ if (key in obj) {
24287
+ Object.defineProperty(obj, key, {
24288
+ value: value,
24289
+ enumerable: true,
24290
+ configurable: true,
24291
+ writable: true
24292
+ });
24293
+ } else {
24294
+ obj[key] = value;
24295
+ }
24296
+ return obj;
24297
+ }
23963
24298
  class Buttons {
23964
24299
  getButtons() {
23965
24300
  let v = 0;
@@ -23993,7 +24328,7 @@ class Buttons {
23993
24328
  return undefined;
23994
24329
  }
23995
24330
  constructor(){
23996
- this.pressed = {};
24331
+ _define_property$5(this, "pressed", {});
23997
24332
  }
23998
24333
  }
23999
24334
  const MouseButton = {
@@ -24024,6 +24359,19 @@ function getMouseEventButton(button) {
24024
24359
  return button;
24025
24360
  }
24026
24361
 
24362
+ function _define_property$4(obj, key, value) {
24363
+ if (key in obj) {
24364
+ Object.defineProperty(obj, key, {
24365
+ value: value,
24366
+ enumerable: true,
24367
+ configurable: true,
24368
+ writable: true
24369
+ });
24370
+ } else {
24371
+ obj[key] = value;
24372
+ }
24373
+ return obj;
24374
+ }
24027
24375
  class Device {
24028
24376
  get countPressed() {
24029
24377
  return this.pressedKeys.size;
@@ -24038,7 +24386,7 @@ class Device {
24038
24386
  return this.pressedKeys.delete(keyDef.name);
24039
24387
  }
24040
24388
  constructor(){
24041
- this.pressedKeys = new Set();
24389
+ _define_property$4(this, "pressedKeys", new Set());
24042
24390
  }
24043
24391
  }
24044
24392
 
@@ -24048,8 +24396,8 @@ function getTreeDiff(a, b) {
24048
24396
  treeA.push(el);
24049
24397
  }
24050
24398
  const treeB = [];
24051
- for(let el1 = b; el1; el1 = el1.parentElement){
24052
- treeB.push(el1);
24399
+ for(let el = b; el; el = el.parentElement){
24400
+ treeB.push(el);
24053
24401
  }
24054
24402
  let i = 0;
24055
24403
  for(;; i++){
@@ -24060,11 +24408,11 @@ function getTreeDiff(a, b) {
24060
24408
  return [
24061
24409
  treeA.slice(0, treeA.length - i),
24062
24410
  treeB.slice(0, treeB.length - i),
24063
- treeB.slice(treeB.length - i),
24411
+ treeB.slice(treeB.length - i)
24064
24412
  ];
24065
24413
  }
24066
24414
 
24067
- function resolveCaretPosition({ target , node , offset }) {
24415
+ function resolveCaretPosition({ target, node, offset }) {
24068
24416
  if (hasOwnSelection(target)) {
24069
24417
  return {
24070
24418
  node: target,
@@ -24118,7 +24466,7 @@ function findNodeAtTextOffset(node, offset, isRoot = true) {
24118
24466
  };
24119
24467
  }
24120
24468
 
24121
- function setSelectionPerMouseDown({ document , target , clickCount , node , offset }) {
24469
+ function setSelectionPerMouseDown({ document, target, clickCount, node, offset }) {
24122
24470
  if (hasNoSelection(target)) {
24123
24471
  return;
24124
24472
  }
@@ -24147,12 +24495,12 @@ function setSelectionPerMouseDown({ document , target , clickCount , node , offs
24147
24495
  end: end !== null && end !== void 0 ? end : text.length
24148
24496
  };
24149
24497
  } else {
24150
- const { node: startNode , offset: startOffset } = resolveCaretPosition({
24498
+ const { node: startNode, offset: startOffset } = resolveCaretPosition({
24151
24499
  target,
24152
24500
  node,
24153
24501
  offset: start
24154
24502
  });
24155
- const { node: endNode , offset: endOffset } = resolveCaretPosition({
24503
+ const { node: endNode, offset: endOffset } = resolveCaretPosition({
24156
24504
  target,
24157
24505
  node,
24158
24506
  offset: end
@@ -24181,17 +24529,17 @@ function getTextRange(text, pos, clickCount) {
24181
24529
  if (clickCount % 3 === 2) {
24182
24530
  return [
24183
24531
  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,
24532
+ pos === undefined ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length
24185
24533
  ];
24186
24534
  }
24187
24535
  // triple click
24188
24536
  return [
24189
24537
  textPos - text.substr(0, pos).match(/[^\r\n]*$/)[0].length,
24190
- pos === undefined ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length,
24538
+ pos === undefined ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length
24191
24539
  ];
24192
24540
  }
24193
24541
 
24194
- function modifySelectionPerMouseMove(selectionRange, { document , target , node , offset }) {
24542
+ function modifySelectionPerMouseMove(selectionRange, { document, target, node, offset }) {
24195
24543
  const selectionFocus = resolveCaretPosition({
24196
24544
  target,
24197
24545
  node,
@@ -24225,10 +24573,23 @@ function modifySelectionPerMouseMove(selectionRange, { document , target , node
24225
24573
  }
24226
24574
 
24227
24575
  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);
24576
+ var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;
24577
+ 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
24578
  }
24231
24579
 
24580
+ function _define_property$3(obj, key, value) {
24581
+ if (key in obj) {
24582
+ Object.defineProperty(obj, key, {
24583
+ value: value,
24584
+ enumerable: true,
24585
+ configurable: true,
24586
+ writable: true
24587
+ });
24588
+ } else {
24589
+ obj[key] = value;
24590
+ }
24591
+ return obj;
24592
+ }
24232
24593
  /**
24233
24594
  * This object is the single "virtual" mouse that might be controlled by multiple different pointer devices.
24234
24595
  */ class Mouse {
@@ -24326,39 +24687,40 @@ function isDifferentPointerPosition(positionA, positionB) {
24326
24687
  return init;
24327
24688
  }
24328
24689
  getTarget(instance) {
24329
- var _target;
24330
- return (_target = this.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
24690
+ var _this_position_target;
24691
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
24331
24692
  }
24332
24693
  startSelecting(instance, clickCount) {
24333
- var ref, ref1;
24694
+ var _this_position_caret, _this_position_caret1;
24334
24695
  // TODO: support extending range (shift)
24335
24696
  this.selecting = setSelectionPerMouseDown({
24336
24697
  document: instance.config.document,
24337
24698
  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,
24699
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
24700
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset,
24340
24701
  clickCount
24341
24702
  });
24342
24703
  }
24343
24704
  modifySelecting(instance) {
24344
- var ref, ref1;
24705
+ var _this_position_caret, _this_position_caret1;
24345
24706
  if (!this.selecting) {
24346
24707
  return;
24347
24708
  }
24348
24709
  modifySelectionPerMouseMove(this.selecting, {
24349
24710
  document: instance.config.document,
24350
24711
  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
24712
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
24713
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset
24353
24714
  });
24354
24715
  }
24355
24716
  endSelecting() {
24356
24717
  this.selecting = undefined;
24357
24718
  }
24358
24719
  constructor(){
24359
- this.position = {};
24360
- this.buttons = new Buttons();
24361
- this.buttonDownTarget = {};
24720
+ _define_property$3(this, "position", {});
24721
+ _define_property$3(this, "buttons", new Buttons());
24722
+ _define_property$3(this, "selecting", void 0);
24723
+ _define_property$3(this, "buttonDownTarget", {});
24362
24724
  // According to spec the `detail` on click events should be the number
24363
24725
  // of *consecutive* clicks with a specific button.
24364
24726
  // On `mousedown` and `mouseup` it should be this number increased by one.
@@ -24369,7 +24731,7 @@ function isDifferentPointerPosition(positionA, positionB) {
24369
24731
  // If there is a delay while a button is pressed,
24370
24732
  // the `mouseup` and `click` are normal, but a following `mousedown` starts a new click count.
24371
24733
  // We'll follow the minimal implementation of Webkit.
24372
- this.clickCount = new class {
24734
+ _define_property$3(this, "clickCount", new class {
24373
24735
  incOnClick(button) {
24374
24736
  const current = this.down[button] === undefined ? undefined : Number(this.down[button]) + 1;
24375
24737
  this.count = this.count[button] === undefined ? {} : {
@@ -24378,13 +24740,13 @@ function isDifferentPointerPosition(positionA, positionB) {
24378
24740
  return current;
24379
24741
  }
24380
24742
  getOnDown(button) {
24381
- var _button;
24743
+ var _this_count_button;
24382
24744
  this.down = {
24383
- [button]: (_button = this.count[button]) !== null && _button !== void 0 ? _button : 0
24745
+ [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== void 0 ? _this_count_button : 0
24384
24746
  };
24385
- var _button1;
24747
+ var _this_count_button1;
24386
24748
  this.count = {
24387
- [button]: (_button1 = this.count[button]) !== null && _button1 !== void 0 ? _button1 : 0
24749
+ [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== void 0 ? _this_count_button1 : 0
24388
24750
  };
24389
24751
  return Number(this.count[button]) + 1;
24390
24752
  }
@@ -24395,16 +24757,16 @@ function isDifferentPointerPosition(positionA, positionB) {
24395
24757
  this.count = {};
24396
24758
  }
24397
24759
  constructor(){
24398
- this.down = {};
24399
- this.count = {};
24760
+ _define_property$3(this, "down", {});
24761
+ _define_property$3(this, "count", {});
24400
24762
  }
24401
- }();
24763
+ }());
24402
24764
  }
24403
24765
  }
24404
24766
 
24405
24767
  function hasPointerEvents(instance, element) {
24406
- var ref;
24407
- return ((ref = checkPointerEvents(instance, element)) === null || ref === void 0 ? void 0 : ref.pointerEvents) !== 'none';
24768
+ var _checkPointerEvents;
24769
+ return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === void 0 ? void 0 : _checkPointerEvents.pointerEvents) !== 'none';
24408
24770
  }
24409
24771
  function closestPointerEventsDeclaration(element) {
24410
24772
  const window = getWindow(element);
@@ -24444,7 +24806,7 @@ function assertPointerEvents(instance, element) {
24444
24806
  throw new Error([
24445
24807
  `Unable to perform pointer interaction as the element ${declaration.tree.length > 1 ? 'inherits' : 'has'} \`pointer-events: none\`:`,
24446
24808
  '',
24447
- printTree(declaration.tree),
24809
+ printTree(declaration.tree)
24448
24810
  ].join('\n'));
24449
24811
  }
24450
24812
  }
@@ -24456,17 +24818,17 @@ function printTree(tree) {
24456
24818
  el.hasAttribute('data-testid') && `(testId=${el.getAttribute('data-testid')})`,
24457
24819
  getLabelDescr(el),
24458
24820
  tree.length > 1 && i === 0 && ' <-- This element declared `pointer-events: none`',
24459
- tree.length > 1 && i === tree.length - 1 && ' <-- Asserted pointer events here',
24821
+ tree.length > 1 && i === tree.length - 1 && ' <-- Asserted pointer events here'
24460
24822
  ].filter(Boolean).join('')).join('\n');
24461
24823
  }
24462
24824
  function getLabelDescr(element) {
24463
- var ref;
24825
+ var _element_labels;
24464
24826
  let label;
24465
24827
  if (element.hasAttribute('aria-label')) {
24466
24828
  label = element.getAttribute('aria-label');
24467
24829
  } 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();
24830
+ var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;
24831
+ 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
24832
  } else if (isElementType(element, [
24471
24833
  'button',
24472
24834
  'input',
@@ -24474,15 +24836,15 @@ function getLabelDescr(element) {
24474
24836
  'output',
24475
24837
  'progress',
24476
24838
  'select',
24477
- 'textarea',
24478
- ]) && ((ref = element.labels) === null || ref === void 0 ? void 0 : ref.length)) {
24839
+ 'textarea'
24840
+ ]) && ((_element_labels = element.labels) === null || _element_labels === void 0 ? void 0 : _element_labels.length)) {
24479
24841
  label = Array.from(element.labels).map((el)=>{
24480
- var ref;
24481
- return (ref = el.textContent) === null || ref === void 0 ? void 0 : ref.trim();
24842
+ var _el_textContent;
24843
+ return (_el_textContent = el.textContent) === null || _el_textContent === void 0 ? void 0 : _el_textContent.trim();
24482
24844
  }).join('|');
24483
24845
  } else if (isElementType(element, 'button')) {
24484
- var ref3;
24485
- label = (ref3 = element.textContent) === null || ref3 === void 0 ? void 0 : ref3.trim();
24846
+ var _element_textContent;
24847
+ label = (_element_textContent = element.textContent) === null || _element_textContent === void 0 ? void 0 : _element_textContent.trim();
24486
24848
  }
24487
24849
  label = label === null || label === void 0 ? void 0 : label.replace(/\n/g, ' ');
24488
24850
  if (Number(label === null || label === void 0 ? void 0 : label.length) > 30) {
@@ -24496,6 +24858,19 @@ function hasBitFlag(conf, flag) {
24496
24858
  return (conf & flag) > 0;
24497
24859
  }
24498
24860
 
24861
+ function _define_property$2(obj, key, value) {
24862
+ if (key in obj) {
24863
+ Object.defineProperty(obj, key, {
24864
+ value: value,
24865
+ enumerable: true,
24866
+ configurable: true,
24867
+ writable: true
24868
+ });
24869
+ } else {
24870
+ obj[key] = value;
24871
+ }
24872
+ return obj;
24873
+ }
24499
24874
  class Pointer {
24500
24875
  init(instance, position) {
24501
24876
  this.position = position;
@@ -24569,8 +24944,8 @@ class Pointer {
24569
24944
  this.isCancelled = true;
24570
24945
  }
24571
24946
  getTarget(instance) {
24572
- var _target;
24573
- return (_target = this.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
24947
+ var _this_position_target;
24948
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
24574
24949
  }
24575
24950
  getEventInit() {
24576
24951
  return {
@@ -24580,12 +24955,15 @@ class Pointer {
24580
24955
  isPrimary: this.isPrimary
24581
24956
  };
24582
24957
  }
24583
- constructor({ pointerId , pointerType , isPrimary }){
24584
- this.isMultitouch = false;
24585
- this.isCancelled = false;
24586
- this.isDown = false;
24587
- this.isPrevented = false;
24588
- this.position = {};
24958
+ constructor({ pointerId, pointerType, isPrimary }){
24959
+ _define_property$2(this, "pointerId", void 0);
24960
+ _define_property$2(this, "pointerType", void 0);
24961
+ _define_property$2(this, "isPrimary", void 0);
24962
+ _define_property$2(this, "isMultitouch", false);
24963
+ _define_property$2(this, "isCancelled", false);
24964
+ _define_property$2(this, "isDown", false);
24965
+ _define_property$2(this, "isPrevented", false);
24966
+ _define_property$2(this, "position", {});
24589
24967
  this.pointerId = pointerId;
24590
24968
  this.pointerType = pointerType;
24591
24969
  this.isPrimary = isPrimary;
@@ -24593,7 +24971,19 @@ class Pointer {
24593
24971
  }
24594
24972
  }
24595
24973
 
24596
- var _registry, _k;
24974
+ function _define_property$1(obj, key, value) {
24975
+ if (key in obj) {
24976
+ Object.defineProperty(obj, key, {
24977
+ value: value,
24978
+ enumerable: true,
24979
+ configurable: true,
24980
+ writable: true
24981
+ });
24982
+ } else {
24983
+ obj[key] = value;
24984
+ }
24985
+ return obj;
24986
+ }
24597
24987
  class PointerHost {
24598
24988
  isKeyPressed(keyDef) {
24599
24989
  return this.devices.get(keyDef.pointerType).isPressed(keyDef);
@@ -24653,10 +25043,10 @@ class PointerHost {
24653
25043
  this.mouse.down(instance, keyDef, pointer);
24654
25044
  }
24655
25045
  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();
25046
+ const mousemove = this.mouse.move(instance, pointer.position);
25047
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.leave();
25048
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.enter();
25049
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.move();
24660
25050
  this.mouse.up(instance, keyDef, pointer);
24661
25051
  }
24662
25052
  }
@@ -24671,25 +25061,30 @@ class PointerHost {
24671
25061
  this.mouse.resetClickCount();
24672
25062
  }
24673
25063
  getMouseTarget(instance) {
24674
- var _target;
24675
- return (_target = this.mouse.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
25064
+ var _this_mouse_position_target;
25065
+ 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
25066
  }
24677
25067
  setMousePosition(position) {
24678
25068
  this.mouse.position = position;
24679
25069
  this.pointers.get('mouse').position = position;
24680
25070
  }
24681
25071
  constructor(system){
24682
- this.devices = new class {
25072
+ _define_property$1(this, "system", void 0);
25073
+ _define_property$1(this, "mouse", void 0);
25074
+ _define_property$1(this, "buttons", void 0);
25075
+ _define_property$1(this, "devices", new class {
24683
25076
  get(k) {
24684
- var ref;
24685
- (ref = (_registry = this.registry)[_k = k]) !== null && ref !== void 0 ? ref : _registry[_k] = new Device();
25077
+ var // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
25078
+ _this_registry, _k;
25079
+ var _;
25080
+ (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== void 0 ? _ : _this_registry[_k] = new Device();
24686
25081
  return this.registry[k];
24687
25082
  }
24688
25083
  constructor(){
24689
- this.registry = {};
25084
+ _define_property$1(this, "registry", {});
24690
25085
  }
24691
- }();
24692
- this.pointers = new class {
25086
+ }());
25087
+ _define_property$1(this, "pointers", new class {
24693
25088
  new(pointerName, keyDef) {
24694
25089
  const isPrimary = keyDef.pointerType !== 'touch' || !Object.values(this.registry).some((p)=>p.pointerType === 'touch' && !p.isCancelled);
24695
25090
  if (!isPrimary) {
@@ -24716,22 +25111,35 @@ class PointerHost {
24716
25111
  return pointerName in this.registry;
24717
25112
  }
24718
25113
  constructor(){
24719
- this.registry = {
25114
+ _define_property$1(this, "registry", {
24720
25115
  mouse: new Pointer({
24721
25116
  pointerId: 1,
24722
25117
  pointerType: 'mouse',
24723
25118
  isPrimary: true
24724
25119
  })
24725
- };
24726
- this.nextId = 2;
25120
+ });
25121
+ _define_property$1(this, "nextId", 2);
24727
25122
  }
24728
- }();
25123
+ }());
24729
25124
  this.system = system;
24730
25125
  this.buttons = new Buttons();
24731
25126
  this.mouse = new Mouse();
24732
25127
  }
24733
25128
  }
24734
25129
 
25130
+ function _define_property(obj, key, value) {
25131
+ if (key in obj) {
25132
+ Object.defineProperty(obj, key, {
25133
+ value: value,
25134
+ enumerable: true,
25135
+ configurable: true,
25136
+ writable: true
25137
+ });
25138
+ } else {
25139
+ obj[key] = value;
25140
+ }
25141
+ return obj;
25142
+ }
24735
25143
  /**
24736
25144
  * @internal Do not create/alter this by yourself as this type might be subject to changes.
24737
25145
  */ class System {
@@ -24752,8 +25160,8 @@ class PointerHost {
24752
25160
  };
24753
25161
  }
24754
25162
  constructor(){
24755
- this.keyboard = new KeyboardHost(this);
24756
- this.pointer = new PointerHost(this);
25163
+ _define_property(this, "keyboard", new KeyboardHost(this));
25164
+ _define_property(this, "pointer", new PointerHost(this));
24757
25165
  }
24758
25166
  }
24759
25167
 
@@ -24799,7 +25207,7 @@ async function unhover$1(element) {
24799
25207
  });
24800
25208
  }
24801
25209
 
24802
- async function tab$1({ shift } = {}) {
25210
+ async function tab$1({ shift } = {}) {
24803
25211
  return this.keyboard(shift === true ? '{Shift>}{Tab}{/Shift}' : shift === false ? '[/ShiftLeft][/ShiftRight]{Tab}' : '{Tab}');
24804
25212
  }
24805
25213
 
@@ -24815,18 +25223,18 @@ async function tab$1({ shift } = {}) {
24815
25223
  */ function parseKeyDef$1(keyboardMap, text) {
24816
25224
  const defs = [];
24817
25225
  do {
24818
- const { type , descriptor , consumedLength , releasePrevious , releaseSelf =true , repeat , } = readNextDescriptor(text, 'keyboard');
24819
- var ref;
24820
- const keyDef = (ref = keyboardMap.find((def)=>{
25226
+ const { type, descriptor, consumedLength, releasePrevious, releaseSelf = true, repeat } = readNextDescriptor(text, 'keyboard');
25227
+ var _keyboardMap_find;
25228
+ const keyDef = (_keyboardMap_find = keyboardMap.find((def)=>{
24821
25229
  if (type === '[') {
24822
- var ref;
24823
- return ((ref = def.code) === null || ref === void 0 ? void 0 : ref.toLowerCase()) === descriptor.toLowerCase();
25230
+ var _def_code;
25231
+ return ((_def_code = def.code) === null || _def_code === void 0 ? void 0 : _def_code.toLowerCase()) === descriptor.toLowerCase();
24824
25232
  } else if (type === '{') {
24825
- var ref1;
24826
- return ((ref1 = def.key) === null || ref1 === void 0 ? void 0 : ref1.toLowerCase()) === descriptor.toLowerCase();
25233
+ var _def_key;
25234
+ return ((_def_key = def.key) === null || _def_key === void 0 ? void 0 : _def_key.toLowerCase()) === descriptor.toLowerCase();
24827
25235
  }
24828
25236
  return def.key === descriptor;
24829
- })) !== null && ref !== void 0 ? ref : {
25237
+ })) !== null && _keyboardMap_find !== void 0 ? _keyboardMap_find : {
24830
25238
  key: 'Unknown',
24831
25239
  code: 'Unknown',
24832
25240
  [type === '[' ? 'code' : 'key']: descriptor
@@ -24849,8 +25257,8 @@ async function keyboard$1(text) {
24849
25257
  await keyboardAction(this, actions[i]);
24850
25258
  }
24851
25259
  }
24852
- async function keyboardAction(instance, { keyDef , releasePrevious , releaseSelf , repeat }) {
24853
- const { system } = instance;
25260
+ async function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {
25261
+ const { system } = instance;
24854
25262
  // Release the key automatically if it was pressed before.
24855
25263
  if (system.keyboard.isKeyPressed(keyDef)) {
24856
25264
  await system.keyboard.keyup(instance, keyDef);
@@ -24896,8 +25304,8 @@ function readSelectedValueFromInput(target) {
24896
25304
 
24897
25305
  async function copy$1() {
24898
25306
  const doc = this.config.document;
24899
- var _activeElement;
24900
- 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;
24901
25309
  const clipboardData = copySelection(target);
24902
25310
  if (clipboardData.items.length === 0) {
24903
25311
  return;
@@ -24912,8 +25320,8 @@ async function copy$1() {
24912
25320
 
24913
25321
  async function cut$1() {
24914
25322
  const doc = this.config.document;
24915
- var _activeElement;
24916
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
25323
+ var _doc_activeElement;
25324
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
24917
25325
  const clipboardData = copySelection(target);
24918
25326
  if (clipboardData.items.length === 0) {
24919
25327
  return;
@@ -24928,10 +25336,10 @@ async function cut$1() {
24928
25336
 
24929
25337
  async function paste$1(clipboardData) {
24930
25338
  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(()=>{
25339
+ var _doc_activeElement;
25340
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
25341
+ var _ref;
25342
+ const dataTransfer = (_ref = typeof clipboardData === 'string' ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== void 0 ? _ref : await readDataTransferFromClipboard(doc).catch(()=>{
24935
25343
  throw new Error('`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.');
24936
25344
  });
24937
25345
  this.dispatchUIEvent(target, 'paste', {
@@ -24947,7 +25355,7 @@ function getClipboardDataFromString(doc, text) {
24947
25355
  function parseKeyDef(pointerMap, keys) {
24948
25356
  const defs = [];
24949
25357
  do {
24950
- const { descriptor , consumedLength , releasePrevious , releaseSelf =true , } = readNextDescriptor(keys, 'pointer');
25358
+ const { descriptor, consumedLength, releasePrevious, releaseSelf = true } = readNextDescriptor(keys, 'pointer');
24951
25359
  const keyDef = pointerMap.find((p)=>p.name === descriptor);
24952
25360
  if (keyDef) {
24953
25361
  defs.push({
@@ -24962,7 +25370,7 @@ function parseKeyDef(pointerMap, keys) {
24962
25370
  }
24963
25371
 
24964
25372
  async function pointer$1(input) {
24965
- const { pointerMap } = this.config;
25373
+ const { pointerMap } = this.config;
24966
25374
  const actions = [];
24967
25375
  (Array.isArray(input) ? input : [
24968
25376
  input
@@ -24985,16 +25393,16 @@ async function pointer$1(input) {
24985
25393
  this.system.pointer.resetClickCount();
24986
25394
  }
24987
25395
  async function pointerAction(instance, action) {
24988
- var ref, ref1;
25396
+ var _previousPosition_caret, _previousPosition_caret1;
24989
25397
  const pointerName = 'pointerName' in action && action.pointerName ? action.pointerName : 'keyDef' in action ? instance.system.pointer.getPointerName(action.keyDef) : 'mouse';
24990
25398
  const previousPosition = instance.system.pointer.getPreviousPosition(pointerName);
24991
- var _target, _coords, _node, _offset;
25399
+ var _action_target, _action_coords, _action_node, _action_offset;
24992
25400
  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,
25401
+ target: (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : getPrevTarget(instance, previousPosition),
25402
+ coords: (_action_coords = action.coords) !== null && _action_coords !== void 0 ? _action_coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
24995
25403
  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
25404
+ 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,
25405
+ 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
25406
  }
24999
25407
  };
25000
25408
  if ('keyDef' in action) {
@@ -25016,15 +25424,15 @@ async function pointerAction(instance, action) {
25016
25424
  }
25017
25425
  }
25018
25426
  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);
25427
+ var _action_target, _ref;
25428
+ return !!((_ref = (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : action.node) !== null && _ref !== void 0 ? _ref : action.offset !== undefined);
25021
25429
  }
25022
25430
  function getPrevTarget(instance, position) {
25023
25431
  if (!position) {
25024
25432
  throw new Error('This pointer has no previous position. Provide a target property!');
25025
25433
  }
25026
- var _target;
25027
- return (_target = position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
25434
+ var _position_target;
25435
+ return (_position_target = position.target) !== null && _position_target !== void 0 ? _position_target : instance.config.document.body;
25028
25436
  }
25029
25437
 
25030
25438
  async function clear$1(element) {
@@ -25042,6 +25450,7 @@ async function clear$1(element) {
25042
25450
  input(this, element, '', 'deleteContentBackward');
25043
25451
  }
25044
25452
 
25453
+ const { getConfig: getConfig$1 } = named$1;
25045
25454
  async function selectOptions$1(select, values) {
25046
25455
  return selectOptionsBase.call(this, true, select, values);
25047
25456
  }
@@ -25050,7 +25459,7 @@ async function deselectOptions$1(select, values) {
25050
25459
  }
25051
25460
  async function selectOptionsBase(newValue, select, values) {
25052
25461
  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);
25462
+ throw getConfig$1().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
25054
25463
  }
25055
25464
  const valArray = Array.isArray(values) ? values : [
25056
25465
  values
@@ -25064,7 +25473,7 @@ async function selectOptionsBase(newValue, select, values) {
25064
25473
  if (matchingOption) {
25065
25474
  return matchingOption;
25066
25475
  } else {
25067
- throw getConfig().getElementError(`Value "${String(val)}" not found in options`, select);
25476
+ throw getConfig$1().getElementError(`Value "${String(val)}" not found in options`, select);
25068
25477
  }
25069
25478
  }
25070
25479
  }).filter((option)=>!isDisabled(option));
@@ -25105,15 +25514,15 @@ async function selectOptionsBase(newValue, select, values) {
25105
25514
  await wait(this.config);
25106
25515
  }
25107
25516
  } else if (selectedOptions.length === 1) {
25108
- const withPointerEvents1 = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
25517
+ const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
25109
25518
  // the click to open the select options
25110
- if (withPointerEvents1) {
25519
+ if (withPointerEvents) {
25111
25520
  await this.click(select);
25112
25521
  } else {
25113
25522
  focusElement(select);
25114
25523
  }
25115
25524
  selectOption(selectedOptions[0]);
25116
- if (withPointerEvents1) {
25525
+ if (withPointerEvents) {
25117
25526
  // the browser triggers another click event on the select for the click on the option
25118
25527
  // this second click has no 'down' phase
25119
25528
  this.dispatchUIEvent(select, 'pointerover');
@@ -25126,19 +25535,19 @@ async function selectOptionsBase(newValue, select, values) {
25126
25535
  }
25127
25536
  await wait(this.config);
25128
25537
  } else {
25129
- throw getConfig().getElementError(`Cannot select multiple options on a non-multiple select`, select);
25538
+ throw getConfig$1().getElementError(`Cannot select multiple options on a non-multiple select`, select);
25130
25539
  }
25131
25540
  } else if (select.getAttribute('role') === 'listbox') {
25132
- for (const option1 of selectedOptions){
25133
- await this.click(option1);
25134
- await this.unhover(option1);
25541
+ for (const option of selectedOptions){
25542
+ await this.click(option);
25543
+ await this.unhover(option);
25135
25544
  }
25136
25545
  } else {
25137
- throw getConfig().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
25546
+ throw getConfig$1().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
25138
25547
  }
25139
25548
  }
25140
25549
 
25141
- async function type$1(element, text, { skipClick =this.config.skipClick , skipAutoClose =this.config.skipAutoClose , initialSelectionStart , initialSelectionEnd } = {}) {
25550
+ async function type$1(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {
25142
25551
  // TODO: properly type guard
25143
25552
  // we use this workaround for now to prevent changing behavior
25144
25553
  if (element.disabled) return;
@@ -25167,8 +25576,8 @@ function restoreProperty(obj, prop, descriptor) {
25167
25576
  }
25168
25577
  }
25169
25578
  function setFiles(el, files) {
25170
- var ref;
25171
- (ref = el[fakeFiles]) === null || ref === void 0 ? void 0 : ref.restore();
25579
+ var _el_fakeFiles;
25580
+ (_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === void 0 ? void 0 : _el_fakeFiles.restore();
25172
25581
  const typeDescr = Object.getOwnPropertyDescriptor(el, 'type');
25173
25582
  const valueDescr = Object.getOwnPropertyDescriptor(el, 'value');
25174
25583
  const filesDescr = Object.getOwnPropertyDescriptor(el, 'files');
@@ -25192,8 +25601,8 @@ function setFiles(el, files) {
25192
25601
  if (v === '') {
25193
25602
  restore();
25194
25603
  } 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);
25604
+ var _valueDescr_set;
25605
+ valueDescr === null || valueDescr === void 0 ? void 0 : (_valueDescr_set = valueDescr.set) === null || _valueDescr_set === void 0 ? void 0 : _valueDescr_set.call(el, v);
25197
25606
  }
25198
25607
  }
25199
25608
  },
@@ -25222,11 +25631,11 @@ async function upload$1(element, fileOrFiles) {
25222
25631
  fileOrFiles
25223
25632
  ]).filter((file)=>!this.config.applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? undefined : 1);
25224
25633
  const fileDialog = ()=>{
25225
- var ref;
25634
+ var _input_files;
25226
25635
  // 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));
25636
+ if (files.length === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.length) && files.every((f, i)=>{
25637
+ var _input_files;
25638
+ return f === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.item(i));
25230
25639
  })) {
25231
25640
  return;
25232
25641
  }
@@ -25258,26 +25667,26 @@ function isAcceptableFile(file, accept) {
25258
25667
  });
25259
25668
  }
25260
25669
 
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
-
25670
+ const userEventApi = {
25671
+ click: click$1,
25672
+ dblClick: dblClick$1,
25673
+ tripleClick: tripleClick$1,
25674
+ hover: hover$1,
25675
+ unhover: unhover$1,
25676
+ tab: tab$1,
25677
+ keyboard: keyboard$1,
25678
+ copy: copy$1,
25679
+ cut: cut$1,
25680
+ paste: paste$1,
25681
+ pointer: pointer$1,
25682
+ clear: clear$1,
25683
+ deselectOptions: deselectOptions$1,
25684
+ selectOptions: selectOptions$1,
25685
+ type: type$1,
25686
+ upload: upload$1
25687
+ };
25688
+
25689
+ const { getConfig } = named$1;
25281
25690
  /**
25282
25691
  * Wrap an internal Promise
25283
25692
  */ function wrapAsync(implementation) {
@@ -25320,18 +25729,18 @@ function createConfig(options = {}, defaults = defaultOptionsSetup, node) {
25320
25729
  */ function setupMain(options = {}) {
25321
25730
  const config = createConfig(options);
25322
25731
  prepareDocument(config.document);
25323
- var _defaultView;
25324
- const view = (_defaultView = config.document.defaultView) !== null && _defaultView !== void 0 ? _defaultView : /* istanbul ignore next */ globalThis.window;
25732
+ var _config_document_defaultView;
25733
+ const view = (_config_document_defaultView = config.document.defaultView) !== null && _config_document_defaultView !== void 0 ? _config_document_defaultView : /* istanbul ignore next */ globalThis.window;
25325
25734
  attachClipboardStubToView(view);
25326
25735
  return createInstance(config).api;
25327
25736
  }
25328
25737
  /**
25329
25738
  * Setup in direct call per `userEvent.anyApi()`
25330
- */ function setupDirect({ keyboardState , pointerState , ...options } = {}, node) {
25739
+ */ function setupDirect({ keyboardState, pointerState, ...options } = {}, node) {
25331
25740
  const config = createConfig(options, defaultOptionsDirect, node);
25332
25741
  prepareDocument(config.document);
25333
- var ref;
25334
- const system = (ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && ref !== void 0 ? ref : new System();
25742
+ var _ref;
25743
+ const system = (_ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && _ref !== void 0 ? _ref : new System();
25335
25744
  return {
25336
25745
  api: createInstance(config, system).api,
25337
25746
  system
@@ -25366,22 +25775,22 @@ function createInstance(config, system = new System()) {
25366
25775
  dispatchUIEvent: dispatchUIEvent.bind(instance),
25367
25776
  system,
25368
25777
  levelRefs: {},
25369
- ...api
25778
+ ...userEventApi
25370
25779
  });
25371
25780
  return {
25372
25781
  instance,
25373
25782
  api: {
25374
- ...Object.fromEntries(Object.entries(api).map(([name, api])=>[
25783
+ ...Object.fromEntries(Object.entries(userEventApi).map(([name, api])=>[
25375
25784
  name,
25376
- wrapAndBindImpl(instance, api),
25785
+ wrapAndBindImpl(instance, api)
25377
25786
  ])),
25378
25787
  setup: setupSub.bind(instance)
25379
25788
  }
25380
25789
  };
25381
25790
  }
25382
25791
  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;
25792
+ var _options_document, _ref;
25793
+ return (_ref = (_options_document = options.document) !== null && _options_document !== void 0 ? _options_document : node && getDocumentFromNode(node)) !== null && _ref !== void 0 ? _ref : defaults.document;
25385
25794
  }
25386
25795
 
25387
25796
  function clear(element) {
@@ -25406,11 +25815,11 @@ function hover(element, options = {}) {
25406
25815
  return setupDirect(options).api.hover(element);
25407
25816
  }
25408
25817
  async function keyboard(text, options = {}) {
25409
- const { api , system } = setupDirect(options);
25818
+ const { api, system } = setupDirect(options);
25410
25819
  return api.keyboard(text).then(()=>system);
25411
25820
  }
25412
25821
  async function pointer(input, options = {}) {
25413
- const { api , system } = setupDirect(options);
25822
+ const { api, system } = setupDirect(options);
25414
25823
  return api.pointer(input).then(()=>system);
25415
25824
  }
25416
25825
  function paste(clipboardData, options) {
@@ -25426,7 +25835,7 @@ function type(element, text, options = {}) {
25426
25835
  return setupDirect(options, element).api.type(element, text, options);
25427
25836
  }
25428
25837
  function unhover(element, options = {}) {
25429
- const { api , system } = setupDirect(options);
25838
+ const { api, system } = setupDirect(options);
25430
25839
  system.pointer.setMousePosition({
25431
25840
  target: element
25432
25841
  });