@uselets/ui 1.11.0 → 1.13.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.
- package/README.md +4 -1
- package/dist/{chart-lqgodZYQ.d.ts → chart-CVe5-EWS.d.ts} +9 -39
- package/dist/components/accordion.d.ts +4 -19
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +12 -53
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +4 -18
- package/dist/components/anchor.d.ts +2 -9
- package/dist/components/area-chart.d.ts +2 -26
- package/dist/components/area-chart.js.map +1 -1
- package/dist/components/avatar.d.ts +6 -26
- package/dist/components/badge.d.ts +4 -12
- package/dist/components/bar-chart.d.ts +2 -24
- package/dist/components/bar-chart.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +7 -31
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.d.ts +3 -16
- package/dist/components/button.d.ts +4 -15
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.d.ts +2 -19
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/card.d.ts +7 -30
- package/dist/components/carousel.d.ts +6 -37
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/carousel.spec.d.ts +1 -1
- package/dist/components/carousel.spec.js +93 -1
- package/dist/components/carousel.spec.js.map +1 -1
- package/dist/components/center.d.ts +2 -8
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.d.ts +3 -12
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/code.d.ts +1 -5
- package/dist/components/collapsible.d.ts +3 -10
- package/dist/components/combobox.d.ts +15 -80
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +9 -43
- package/dist/components/command.js.map +1 -1
- package/dist/components/container.d.ts +2 -7
- package/dist/components/data-table.d.ts +8 -61
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +11 -75
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.d.ts +12 -49
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/donut-chart.d.ts +1 -10
- package/dist/components/donut-chart.js.map +1 -1
- package/dist/components/drawer.d.ts +13 -49
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +15 -66
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropzone.d.ts +1 -5
- package/dist/components/dropzone.js.map +1 -1
- package/dist/components/empty.d.ts +6 -26
- package/dist/components/field.d.ts +11 -48
- package/dist/components/field.js.map +1 -1
- package/dist/components/field.spec.d.ts +1 -1
- package/dist/components/field.spec.js +1 -1
- package/dist/components/field.spec.js.map +1 -1
- package/dist/components/flex.d.ts +5 -14
- package/dist/components/grid.d.ts +2 -18
- package/dist/components/group.d.ts +4 -12
- package/dist/components/heading.d.ts +2 -8
- package/dist/components/hover-card.d.ts +3 -13
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/input-group.d.ts +8 -32
- package/dist/components/input-otp.d.ts +4 -19
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.d.ts +1 -7
- package/dist/components/kbd.d.ts +2 -9
- package/dist/components/label.d.ts +1 -5
- package/dist/components/list.d.ts +5 -22
- package/dist/components/list.js.map +1 -1
- package/dist/components/marker.d.ts +18 -0
- package/dist/components/marker.js +2 -0
- package/dist/components/marker.js.map +1 -0
- package/dist/components/mask-input.d.ts +1 -11
- package/dist/components/native-select.d.ts +3 -14
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +8 -36
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.d.ts +7 -33
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/pie-chart.d.ts +2 -24
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +7 -28
- package/dist/components/progress.d.ts +8 -8
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +4 -17
- package/dist/components/radio-group.js +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.d.ts +3 -13
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/ring-progress.d.ts +17 -0
- package/dist/components/ring-progress.js +2 -0
- package/dist/components/ring-progress.js.map +1 -0
- package/dist/components/scroll-area.d.ts +2 -11
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.d.ts +10 -46
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +1 -7
- package/dist/components/sidebar.d.ts +24 -118
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/simple-grid.d.ts +1 -10
- package/dist/components/skeleton.d.ts +1 -7
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/skeleton.spec.d.ts +1 -1
- package/dist/components/skeleton.spec.js +1 -1
- package/dist/components/skeleton.spec.js.map +1 -1
- package/dist/components/slider.d.ts +1 -10
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.d.ts +0 -1
- package/dist/components/spinner.d.ts +2 -7
- package/dist/components/stack.d.ts +4 -11
- package/dist/components/switch.d.ts +1 -10
- package/dist/components/switch.js +1 -1
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +10 -43
- package/dist/components/tabs.d.ts +5 -21
- package/dist/components/text.d.ts +2 -8
- package/dist/components/textarea.d.ts +1 -6
- package/dist/components/theme.d.ts +1 -7
- package/dist/components/theme.js.map +1 -1
- package/dist/components/timeline.d.ts +5 -6
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/toggle-group.d.ts +2 -19
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.d.ts +4 -11
- package/dist/components/tooltip.d.ts +5 -28
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unstyled-button.d.ts +1 -7
- package/dist/components/visibility.d.ts +2 -9
- package/dist/hooks/use-breakpoint-value.d.ts +0 -1
- package/dist/hooks/use-breakpoint-value.spec.d.ts +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js +1 -1
- package/dist/hooks/use-breakpoint-value.spec.js.map +1 -1
- package/dist/hooks/use-breakpoint.d.ts +0 -1
- package/dist/hooks/use-breakpoint.spec.d.ts +1 -1
- package/dist/hooks/use-breakpoint.spec.js +1 -1
- package/dist/hooks/use-disclosure.d.ts +0 -1
- package/dist/hooks/use-disclosure.spec.d.ts +1 -1
- package/dist/hooks/use-disclosure.spec.js +1 -1
- package/dist/hooks/use-document-visibility.d.ts +0 -1
- package/dist/hooks/use-document-visibility.spec.d.ts +1 -1
- package/dist/hooks/use-document-visibility.spec.js +1 -1
- package/dist/hooks/use-hotkeys.d.ts +1 -1
- package/dist/hooks/use-hotkeys.js +1 -1
- package/dist/hooks/use-hotkeys.spec.d.ts +1 -1
- package/dist/hooks/use-hotkeys.spec.js +1 -1
- package/dist/hooks/use-idle.d.ts +0 -1
- package/dist/hooks/use-idle.spec.d.ts +1 -1
- package/dist/hooks/use-idle.spec.js +1 -1
- package/dist/hooks/use-interval.d.ts +10 -8
- package/dist/hooks/use-interval.spec.d.ts +1 -1
- package/dist/hooks/use-interval.spec.js +1 -1
- package/dist/hooks/use-local-storage.d.ts +0 -1
- package/dist/hooks/use-local-storage.spec.d.ts +1 -1
- package/dist/hooks/use-local-storage.spec.js +1 -1
- package/dist/hooks/use-mask.d.ts +0 -1
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.spec.d.ts +1 -1
- package/dist/hooks/use-mobile.spec.js +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.js +1 -1
- package/dist/lib/badge.d.ts +0 -1
- package/dist/lib/button.d.ts +0 -1
- package/dist/lib/color.d.ts +1 -2
- package/dist/lib/compose-refs.d.ts +0 -1
- package/dist/lib/progress.d.ts +19 -0
- package/dist/lib/progress.js +2 -0
- package/dist/lib/progress.js.map +1 -0
- package/dist/lib/utils.d.ts +0 -1
- package/dist/{magic-string.es-DbBO8R0S.js → magic-string.es-oADFB1hu.js} +2 -2
- package/dist/{magic-string.es-DbBO8R0S.js.map → magic-string.es-oADFB1hu.js.map} +1 -1
- package/dist/{react.esm-D88qr0ij.js → react.esm-D5AipFQb.js} +5 -5
- package/dist/{react.esm-D88qr0ij.js.map → react.esm-D5AipFQb.js.map} +1 -1
- package/dist/skills/uselets-ui/references/component-catalog.md +9 -2
- package/dist/{use-hotkeys-BOfOFxb5.js → use-hotkeys-C0d5t4yo.js} +2 -2
- package/dist/{use-hotkeys-BOfOFxb5.js.map → use-hotkeys-C0d5t4yo.js.map} +1 -1
- package/dist/{use-hotkeys-Cl1cV6e8.d.ts → use-hotkeys-DloZH-B4.d.ts} +1 -2
- package/dist/utils-Cj3IZeiu.js +37 -0
- package/dist/utils-Cj3IZeiu.js.map +1 -0
- package/package.json +16 -16
- package/skills/uselets-ui/references/component-catalog.md +9 -2
- package/dist/dist-B-hwiqYg.js +0 -129
- package/dist/dist-B-hwiqYg.js.map +0 -1
|
@@ -11,7 +11,7 @@ import{n as t,r,t as i}from"./rolldown-runtime-Bdj-bS2b.js";import*as a from"rea
|
|
|
11
11
|
var r=60103,i=60106,a=60107,o=60108,c=60114,l=60109,u=60110,d=60112,p=60113,m=60120,h=60115,g=60116,_=60121,v=60122,b=60117,x=60129,S=60131;if(typeof Symbol==`function`&&Symbol.for){var C=Symbol.for;r=C(`react.element`),i=C(`react.portal`),a=C(`react.fragment`),o=C(`react.strict_mode`),c=C(`react.profiler`),l=C(`react.provider`),u=C(`react.context`),d=C(`react.forward_ref`),p=C(`react.suspense`),m=C(`react.suspense_list`),h=C(`react.memo`),g=C(`react.lazy`),_=C(`react.block`),v=C(`react.server.block`),b=C(`react.fundamental`),x=C(`react.debug_trace_mode`),S=C(`react.legacy_hidden`)}function y(t){if(typeof t==`object`&&t){var _=t.$$typeof;switch(_){case r:switch(t=t.type,t){case a:case c:case o:case p:case m:return t;default:switch(t&&=t.$$typeof,t){case u:case d:case g:case h:case l:return t;default:return _}}case i:return _}}}var w=l,T=r,E=d,D=a,O=g,k=h,A=i,j=c,M=o,N=p;t.ContextConsumer=u,t.ContextProvider=w,t.Element=T,t.ForwardRef=E,t.Fragment=D,t.Lazy=O,t.Memo=k,t.Portal=A,t.Profiler=j,t.StrictMode=M,t.Suspense=N,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(t){return y(t)===u},t.isContextProvider=function(t){return y(t)===l},t.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===r},t.isForwardRef=function(t){return y(t)===d},t.isFragment=function(t){return y(t)===a},t.isLazy=function(t){return y(t)===g},t.isMemo=function(t){return y(t)===h},t.isPortal=function(t){return y(t)===i},t.isProfiler=function(t){return y(t)===c},t.isStrictMode=function(t){return y(t)===o},t.isSuspense=function(t){return y(t)===p},t.isValidElementType=function(t){return!!(typeof t==`string`||typeof t==`function`||t===a||t===c||t===x||t===o||t===p||t===m||t===S||typeof t==`object`&&t&&(t.$$typeof===g||t.$$typeof===h||t.$$typeof===l||t.$$typeof===u||t.$$typeof===d||t.$$typeof===b||t.$$typeof===_||t[0]===v))},t.typeOf=y})),C=i(((t,r)=>{r.exports=S()})),w=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var r=_interopRequireWildcard(C()),i=v();function _getRequireWildcardCache(t){if(typeof WeakMap!=`function`)return null;var r=new WeakMap,i=new WeakMap;return(_getRequireWildcardCache=function(t){return t?i:r})(t)}function _interopRequireWildcard(t,r){if(!r&&t&&t.__esModule)return t;if(t===null||typeof t!=`object`&&typeof t!=`function`)return{default:t};var i=_getRequireWildcardCache(r);if(i&&i.has(t))return i.get(t);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in t)if(c!=="default"&&Object.prototype.hasOwnProperty.call(t,c)){var l=o?Object.getOwnPropertyDescriptor(t,c):null;l&&(l.get||l.set)?Object.defineProperty(a,c,l):a[c]=t[c]}return a.default=t,i&&i.set(t,a),a}let getChildren=(t,r=[])=>(Array.isArray(t)?t.forEach(t=>{getChildren(t,r)}):t!=null&&t!==!1&&r.push(t),r),getType=t=>{let i=t.type;if(typeof i==`string`)return i;if(typeof i==`function`)return i.displayName||i.name||`Unknown`;if(r.isFragment(t))return`React.Fragment`;if(r.isSuspense(t))return`React.Suspense`;if(typeof i==`object`&&i){if(r.isContextProvider(t))return`Context.Provider`;if(r.isContextConsumer(t))return`Context.Consumer`;if(r.isForwardRef(t)){if(i.displayName)return i.displayName;let t=i.render.displayName||i.render.name||``;return t===``?`ForwardRef`:`ForwardRef(`+t+`)`}if(r.isMemo(t)){let t=i.displayName||i.type.displayName||i.type.name||``;return t===``?`Memo`:`Memo(`+t+`)`}}return`UNDEFINED`},getPropKeys=t=>{let{props:r}=t;return Object.keys(r).filter(t=>t!==`children`&&r[t]!==void 0).sort()},serialize=(t,r,a,o,c,l)=>++o>r.maxDepth?(0,i.printElementAsLeaf)(getType(t),r):(0,i.printElement)(getType(t),(0,i.printProps)(getPropKeys(t),t.props,r,a+r.indent,o,c,l),(0,i.printChildren)(getChildren(t.props.children),r,a+r.indent,o,c,l),r,a);t.serialize=serialize;let test=t=>t!=null&&r.isElement(t);t.test=test,t.default={serialize,test}})),T=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var r=v(),i=(function(){return typeof globalThis<`u`?globalThis:i===void 0?typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)():i})(),a=i[`jest-symbol-do-not-touch`]||i.Symbol;let o=typeof a==`function`&&a.for?a.for(`react.test.json`):245830487,getPropKeys=t=>{let{props:r}=t;return r?Object.keys(r).filter(t=>r[t]!==void 0).sort():[]},serialize=(t,i,a,o,c,l)=>++o>i.maxDepth?(0,r.printElementAsLeaf)(t.type,i):(0,r.printElement)(t.type,t.props?(0,r.printProps)(getPropKeys(t),t.props,i,a+i.indent,o,c,l):``,t.children?(0,r.printChildren)(t.children,i,a+i.indent,o,c,l):``,i,a);t.serialize=serialize;let test=t=>t&&t.$$typeof===o;t.test=test,t.default={serialize,test}})),E=r(i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.DEFAULT_OPTIONS=void 0,t.format=format,t.plugins=void 0;var r=_interopRequireDefault(u()),i=d(),a=_interopRequireDefault(p()),o=_interopRequireDefault(h()),c=_interopRequireDefault(g()),l=_interopRequireDefault(b()),m=_interopRequireDefault(x()),_=_interopRequireDefault(w()),v=_interopRequireDefault(T());function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}let S=Object.prototype.toString,C=Date.prototype.toISOString,E=Error.prototype.toString,D=RegExp.prototype.toString,getConstructorName=t=>typeof t.constructor==`function`&&t.constructor.name||`Object`,isWindow=t=>typeof window<`u`&&t===window,O=/^Symbol\((.*)\)(.*)$/,k=/\n/gi;var PrettyFormatPluginError=class extends Error{constructor(t,r){super(t),this.stack=r,this.name=this.constructor.name}};function isToStringedArrayType(t){return t===`[object Array]`||t===`[object ArrayBuffer]`||t===`[object DataView]`||t===`[object Float32Array]`||t===`[object Float64Array]`||t===`[object Int8Array]`||t===`[object Int16Array]`||t===`[object Int32Array]`||t===`[object Uint8Array]`||t===`[object Uint8ClampedArray]`||t===`[object Uint16Array]`||t===`[object Uint32Array]`}function printNumber(t){return Object.is(t,-0)?`-0`:String(t)}function printBigInt(t){return String(`${t}n`)}function printFunction(t,r){return r?`[Function `+(t.name||`anonymous`)+`]`:`[Function]`}function printSymbol(t){return String(t).replace(O,`Symbol($1)`)}function printError(t){return`[`+E.call(t)+`]`}function printBasicValue(t,r,i,a){if(t===!0||t===!1)return``+t;if(t===void 0)return`undefined`;if(t===null)return`null`;let o=typeof t;if(o===`number`)return printNumber(t);if(o===`bigint`)return printBigInt(t);if(o===`string`)return a?`"`+t.replace(/"|\\/g,`\\$&`)+`"`:`"`+t+`"`;if(o===`function`)return printFunction(t,r);if(o===`symbol`)return printSymbol(t);let c=S.call(t);return c===`[object WeakMap]`?`WeakMap {}`:c===`[object WeakSet]`?`WeakSet {}`:c===`[object Function]`||c===`[object GeneratorFunction]`?printFunction(t,r):c===`[object Symbol]`?printSymbol(t):c===`[object Date]`?isNaN(+t)?`Date { NaN }`:C.call(t):c===`[object Error]`?printError(t):c===`[object RegExp]`?i?D.call(t).replace(/[\\^$*+?.()|[\]{}]/g,`\\$&`):D.call(t):t instanceof Error?printError(t):null}function printComplexValue(t,r,a,o,c,l){if(c.indexOf(t)!==-1)return`[Circular]`;c=c.slice(),c.push(t);let u=++o>r.maxDepth,d=r.min;if(r.callToJSON&&!u&&t.toJSON&&typeof t.toJSON==`function`&&!l)return printer(t.toJSON(),r,a,o,c,!0);let p=S.call(t);return p===`[object Arguments]`?u?`[Arguments]`:(d?``:`Arguments `)+`[`+(0,i.printListItems)(t,r,a,o,c,printer)+`]`:isToStringedArrayType(p)?u?`[`+t.constructor.name+`]`:(d||!r.printBasicPrototype&&t.constructor.name===`Array`?``:t.constructor.name+` `)+`[`+(0,i.printListItems)(t,r,a,o,c,printer)+`]`:p===`[object Map]`?u?`[Map]`:`Map {`+(0,i.printIteratorEntries)(t.entries(),r,a,o,c,printer,` => `)+`}`:p===`[object Set]`?u?`[Set]`:`Set {`+(0,i.printIteratorValues)(t.values(),r,a,o,c,printer)+`}`:u||isWindow(t)?`[`+getConstructorName(t)+`]`:(d||!r.printBasicPrototype&&getConstructorName(t)===`Object`?``:getConstructorName(t)+` `)+`{`+(0,i.printObjectProperties)(t,r,a,o,c,printer)+`}`}function isNewPlugin(t){return t.serialize!=null}function printPlugin(t,r,i,a,o,c){let l;try{l=isNewPlugin(t)?t.serialize(r,i,a,o,c,printer):t.print(r,t=>printer(t,i,a,o,c),t=>{let r=a+i.indent;return r+t.replace(k,`
|
|
12
12
|
`+r)},{edgeSpacing:i.spacingOuter,min:i.min,spacing:i.spacingInner},i.colors)}catch(t){throw new PrettyFormatPluginError(t.message,t.stack)}if(typeof l!=`string`)throw Error(`pretty-format: Plugin must return type "string" but instead returned "${typeof l}".`);return l}function findPlugin(t,r){for(let i=0;i<t.length;i++)try{if(t[i].test(r))return t[i]}catch(t){throw new PrettyFormatPluginError(t.message,t.stack)}return null}function printer(t,r,i,a,o,c){let l=findPlugin(r.plugins,t);if(l!==null)return printPlugin(l,t,r,i,a,o);let u=printBasicValue(t,r.printFunctionName,r.escapeRegex,r.escapeString);return u===null?printComplexValue(t,r,i,a,o,c):u}let A={comment:`gray`,content:`reset`,prop:`yellow`,tag:`cyan`,value:`green`},j=Object.keys(A),M={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:A};t.DEFAULT_OPTIONS=M;function validateOptions(t){if(Object.keys(t).forEach(t=>{if(!M.hasOwnProperty(t))throw Error(`pretty-format: Unknown option "${t}".`)}),t.min&&t.indent!==void 0&&t.indent!==0)throw Error(`pretty-format: Options "min" and "indent" cannot be used together.`);if(t.theme!==void 0){if(t.theme===null)throw Error(`pretty-format: Option "theme" must not be null.`);if(typeof t.theme!=`object`)throw Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof t.theme}".`)}}let getColorsHighlight=t=>j.reduce((i,a)=>{let o=t.theme&&t.theme[a]!==void 0?t.theme[a]:A[a],c=o&&r.default[o];if(c&&typeof c.close==`string`&&typeof c.open==`string`)i[a]=c;else throw Error(`pretty-format: Option "theme" has a key "${a}" whose value "${o}" is undefined in ansi-styles.`);return i},Object.create(null)),getColorsEmpty=()=>j.reduce((t,r)=>(t[r]={close:``,open:``},t),Object.create(null)),getPrintFunctionName=t=>t&&t.printFunctionName!==void 0?t.printFunctionName:M.printFunctionName,getEscapeRegex=t=>t&&t.escapeRegex!==void 0?t.escapeRegex:M.escapeRegex,getEscapeString=t=>t&&t.escapeString!==void 0?t.escapeString:M.escapeString,getConfig=t=>({callToJSON:t&&t.callToJSON!==void 0?t.callToJSON:M.callToJSON,colors:t&&t.highlight?getColorsHighlight(t):getColorsEmpty(),compareKeys:t&&typeof t.compareKeys==`function`?t.compareKeys:M.compareKeys,escapeRegex:getEscapeRegex(t),escapeString:getEscapeString(t),indent:t&&t.min?``:createIndent(t&&t.indent!==void 0?t.indent:M.indent),maxDepth:t&&t.maxDepth!==void 0?t.maxDepth:M.maxDepth,min:t&&t.min!==void 0?t.min:M.min,plugins:t&&t.plugins!==void 0?t.plugins:M.plugins,printBasicPrototype:t?.printBasicPrototype??!0,printFunctionName:getPrintFunctionName(t),spacingInner:t&&t.min?` `:`
|
|
13
13
|
`,spacingOuter:t&&t.min?``:`
|
|
14
|
-
`});function createIndent(t){return Array(t+1).join(` `)}function format(t,r){if(r&&(validateOptions(r),r.plugins)){let i=findPlugin(r.plugins,t);if(i!==null)return printPlugin(i,t,getConfig(r),``,0,[])}let i=printBasicValue(t,getPrintFunctionName(r),getEscapeRegex(r),getEscapeString(r));return i===null?printComplexValue(t,getConfig(r),``,0,[]):i}t.plugins={AsymmetricMatcher:a.default,ConvertAnsi:o.default,DOMCollection:c.default,DOMElement:l.default,Immutable:m.default,ReactElement:_.default,ReactTestComponent:v.default},t.default=format}))()),D=Object.prototype.toString;function isCallable(t){return typeof t==`function`||D.call(t)===`[object Function]`}function toInteger(t){var r=Number(t);return isNaN(r)?0:r===0||!isFinite(r)?r:(r>0?1:-1)*Math.floor(Math.abs(r))}var O=2**53-1;function toLength(t){var r=toInteger(t);return Math.min(Math.max(r,0),O)}function arrayFrom(t,r){var i=Array,a=Object(t);if(t==null)throw TypeError(`Array.from requires an array-like object - not null or undefined`);if(r!==void 0&&!isCallable(r))throw TypeError(`Array.from: when provided, the second argument must be a function`);for(var o=toLength(a.length),c=isCallable(i)?Object(new i(o)):Array(o),l=0,u;l<o;)u=a[l],r?c[l]=r(u,l):c[l]=u,l+=1;return c.length=o,c}function _typeof$1(t){"@babel/helpers - typeof";return _typeof$1=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(t){return typeof t}:function(t){return t&&typeof Symbol==`function`&&t.constructor===Symbol&&t!==Symbol.prototype?`symbol`:typeof t},_typeof$1(t)}t(_typeof$1,`_typeof`);function _classCallCheck(t,r){if(!(t instanceof r))throw TypeError(`Cannot call a class as a function`)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,`value`in a&&(a.writable=!0),Object.defineProperty(t,_toPropertyKey$1(a.key),a)}}function _createClass(t,r,i){return r&&_defineProperties(t.prototype,r),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _defineProperty$1(t,r,i){return r=_toPropertyKey$1(r),r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}t(_defineProperty$1,`_defineProperty`);function _toPropertyKey$1(t){var r=_toPrimitive$1(t,`string`);return _typeof$1(r)===`symbol`?r:String(r)}t(_toPropertyKey$1,`_toPropertyKey`);function _toPrimitive$1(t,r){if(_typeof$1(t)!==`object`||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r||`default`);if(_typeof$1(a)!==`object`)return a;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(r===`string`?String:Number)(t)}t(_toPrimitive$1,`_toPrimitive`);var k=typeof Set>`u`?Set:function(){function SetLike(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];_classCallCheck(this,SetLike),_defineProperty$1(this,`items`,void 0),this.items=t}return _createClass(SetLike,[{key:`add`,value:function add(t){return this.has(t)===!1&&this.items.push(t),this}},{key:`clear`,value:function clear(){this.items=[]}},{key:`delete`,value:function _delete(t){var r=this.items.length;return this.items=this.items.filter(function(r){return r!==t}),r!==this.items.length}},{key:`forEach`,value:function forEach(t){var r=this;this.items.forEach(function(i){t(i,i,r)})}},{key:`has`,value:function has(t){return this.items.indexOf(t)!==-1}},{key:`size`,get:function get(){return this.items.length}}]),SetLike}();function getLocalName(t){return t.localName??t.tagName.toLowerCase()}var A={article:`article`,aside:`complementary`,button:`button`,datalist:`listbox`,dd:`definition`,details:`group`,dialog:`dialog`,dt:`term`,fieldset:`group`,figure:`figure`,form:`form`,footer:`contentinfo`,h1:`heading`,h2:`heading`,h3:`heading`,h4:`heading`,h5:`heading`,h6:`heading`,header:`banner`,hr:`separator`,html:`document`,legend:`legend`,li:`listitem`,math:`math`,main:`main`,menu:`list`,nav:`navigation`,ol:`list`,optgroup:`group`,option:`option`,output:`status`,progress:`progressbar`,section:`region`,summary:`button`,table:`table`,tbody:`rowgroup`,textarea:`textbox`,tfoot:`rowgroup`,td:`cell`,th:`columnheader`,thead:`rowgroup`,tr:`row`,ul:`list`},j={caption:new Set([`aria-label`,`aria-labelledby`]),code:new Set([`aria-label`,`aria-labelledby`]),deletion:new Set([`aria-label`,`aria-labelledby`]),emphasis:new Set([`aria-label`,`aria-labelledby`]),generic:new Set([`aria-label`,`aria-labelledby`,`aria-roledescription`]),insertion:new Set([`aria-label`,`aria-labelledby`]),paragraph:new Set([`aria-label`,`aria-labelledby`]),presentation:new Set([`aria-label`,`aria-labelledby`]),strong:new Set([`aria-label`,`aria-labelledby`]),subscript:new Set([`aria-label`,`aria-labelledby`]),superscript:new Set([`aria-label`,`aria-labelledby`])};function hasGlobalAriaAttributes(t,r){return[`aria-atomic`,`aria-busy`,`aria-controls`,`aria-current`,`aria-describedby`,`aria-details`,`aria-dropeffect`,`aria-flowto`,`aria-grabbed`,`aria-hidden`,`aria-keyshortcuts`,`aria-label`,`aria-labelledby`,`aria-live`,`aria-owns`,`aria-relevant`,`aria-roledescription`].some(function(i){var a;return t.hasAttribute(i)&&!((a=j[r])!=null&&a.has(i))})}function ignorePresentationalRole(t,r){return hasGlobalAriaAttributes(t,r)}function getRole(t){var r=getExplicitRole(t);if(r===null||r===`presentation`){var i=getImplicitRole(t);if(r!==`presentation`||ignorePresentationalRole(t,i||``))return i}return r}function getImplicitRole(t){var r=A[getLocalName(t)];if(r!==void 0)return r;switch(getLocalName(t)){case`a`:case`area`:case`link`:if(t.hasAttribute(`href`))return`link`;break;case`img`:return t.getAttribute(`alt`)===``&&!ignorePresentationalRole(t,`img`)?`presentation`:`img`;case`input`:var i=t.type;switch(i){case`button`:case`image`:case`reset`:case`submit`:return`button`;case`checkbox`:case`radio`:return i;case`range`:return`slider`;case`email`:case`tel`:case`text`:case`url`:return t.hasAttribute(`list`)?`combobox`:`textbox`;case`search`:return t.hasAttribute(`list`)?`combobox`:`searchbox`;case`number`:return`spinbutton`;default:return null}case`select`:return t.hasAttribute(`multiple`)||t.size>1?`listbox`:`combobox`}return null}function getExplicitRole(t){var r=t.getAttribute(`role`);if(r!==null){var i=r.trim().split(` `)[0];if(i.length>0)return i}return null}function isElement(t){return t!==null&&t.nodeType===t.ELEMENT_NODE}function isHTMLTableCaptionElement(t){return isElement(t)&&getLocalName(t)===`caption`}function isHTMLInputElement(t){return isElement(t)&&getLocalName(t)===`input`}function isHTMLOptGroupElement(t){return isElement(t)&&getLocalName(t)===`optgroup`}function isHTMLSelectElement(t){return isElement(t)&&getLocalName(t)===`select`}function isHTMLTableElement(t){return isElement(t)&&getLocalName(t)===`table`}function isHTMLTextAreaElement(t){return isElement(t)&&getLocalName(t)===`textarea`}function safeWindow(t){var r=(t.ownerDocument===null?t:t.ownerDocument).defaultView;if(r===null)throw TypeError(`no window available`);return r}function isHTMLFieldSetElement(t){return isElement(t)&&getLocalName(t)===`fieldset`}function isHTMLLegendElement(t){return isElement(t)&&getLocalName(t)===`legend`}function isHTMLSlotElement(t){return isElement(t)&&getLocalName(t)===`slot`}function isSVGElement(t){return isElement(t)&&t.ownerSVGElement!==void 0}function isSVGSVGElement(t){return isElement(t)&&getLocalName(t)===`svg`}function isSVGTitleElement(t){return isSVGElement(t)&&getLocalName(t)===`title`}function queryIdRefs(t,r){if(isElement(t)&&t.hasAttribute(r)){var i=t.getAttribute(r).split(` `),a=t.getRootNode?t.getRootNode():t.ownerDocument;return i.map(function(t){return a.getElementById(t)}).filter(function(t){return t!==null})}return[]}function hasAnyConcreteRoles(t,r){return isElement(t)?r.indexOf(getRole(t))!==-1:!1}function asFlatString(t){return t.trim().replace(/\s\s+/g,` `)}function isHidden(t,r){if(!isElement(t))return!1;if(t.hasAttribute(`hidden`)||t.getAttribute(`aria-hidden`)===`true`)return!0;var i=r(t);return i.getPropertyValue(`display`)===`none`||i.getPropertyValue(`visibility`)===`hidden`}function isControl(t){return hasAnyConcreteRoles(t,[`button`,`combobox`,`listbox`,`textbox`])||hasAbstractRole(t,`range`)}function hasAbstractRole(t,r){if(!isElement(t))return!1;switch(r){case`range`:return hasAnyConcreteRoles(t,[`meter`,`progressbar`,`scrollbar`,`slider`,`spinbutton`]);default:throw TypeError(`No knowledge about abstract role '${r}'. This is likely a bug :(`)}}function querySelectorAllSubtree(t,r){var i=arrayFrom(t.querySelectorAll(r));return queryIdRefs(t,`aria-owns`).forEach(function(t){i.push.apply(i,arrayFrom(t.querySelectorAll(r)))}),i}function querySelectedOptions(t){return isHTMLSelectElement(t)?t.selectedOptions||querySelectorAllSubtree(t,`[selected]`):querySelectorAllSubtree(t,`[aria-selected="true"]`)}function isMarkedPresentational(t){return hasAnyConcreteRoles(t,[`none`,`presentation`])}function isNativeHostLanguageTextAlternativeElement(t){return isHTMLTableCaptionElement(t)}function allowsNameFromContent(t){return hasAnyConcreteRoles(t,[`button`,`cell`,`checkbox`,`columnheader`,`gridcell`,`heading`,`label`,`legend`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`row`,`rowheader`,`switch`,`tab`,`tooltip`,`treeitem`])}function isDescendantOfNativeHostLanguageTextAlternativeElement(t){return!1}function getValueOfTextbox(t){return isHTMLInputElement(t)||isHTMLTextAreaElement(t)?t.value:t.textContent||``}function getTextualContent(t){var r=t.getPropertyValue(`content`);return/^["'].*["']$/.test(r)?r.slice(1,-1):``}function isLabelableElement(t){var r=getLocalName(t);return r===`button`||r===`input`&&t.getAttribute(`type`)!==`hidden`||r===`meter`||r===`output`||r===`progress`||r===`select`||r===`textarea`}function findLabelableElement(t){if(isLabelableElement(t))return t;var r=null;return t.childNodes.forEach(function(t){if(r===null&&isElement(t)){var i=findLabelableElement(t);i!==null&&(r=i)}}),r}function getControlOfLabel(t){if(t.control!==void 0)return t.control;var r=t.getAttribute(`for`);return r===null?findLabelableElement(t):t.ownerDocument.getElementById(r)}function getLabels$1(t){var r=t.labels;if(r===null)return r;if(r!==void 0)return arrayFrom(r);if(!isLabelableElement(t))return null;var i=t.ownerDocument;return arrayFrom(i.querySelectorAll(`label`)).filter(function(r){return getControlOfLabel(r)===t})}t(getLabels$1,`getLabels`);function getSlotContents(t){var r=t.assignedNodes();return r.length===0?arrayFrom(t.childNodes):r}function computeTextAlternative(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=new k,a=safeWindow(t),o=r.compute,c=o===void 0?`name`:o,l=r.computedStyleSupportsPseudoElements,u=l===void 0?r.getComputedStyle!==void 0:l,d=r.getComputedStyle,p=d===void 0?a.getComputedStyle.bind(a):d,m=r.hidden,h=m===void 0?!1:m;function computeMiscTextAlternative(t,r){var i=``;if(isElement(t)&&u&&(i=`${getTextualContent(p(t,`::before`))} ${i}`),(isHTMLSlotElement(t)?getSlotContents(t):arrayFrom(t.childNodes).concat(queryIdRefs(t,`aria-owns`))).forEach(function(t){var a=computeTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),o=(isElement(t)?p(t).getPropertyValue(`display`):`inline`)===`inline`?``:` `;i+=`${o}${a}${o}`}),isElement(t)&&u){var a=getTextualContent(p(t,`::after`));i=`${i} ${a}`}return i.trim()}function useAttribute(t,r){var a=t.getAttributeNode(r);return a!==null&&!i.has(a)&&a.value.trim()!==``?(i.add(a),a.value):null}function computeTooltipAttributeValue(t){return isElement(t)?useAttribute(t,`title`):null}function computeElementTextAlternative(t){if(!isElement(t))return null;if(isHTMLFieldSetElement(t)){i.add(t);for(var r=arrayFrom(t.childNodes),a=0;a<r.length;a+=1){var o=r[a];if(isHTMLLegendElement(o))return computeTextAlternative(o,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(isHTMLTableElement(t)){i.add(t);for(var c=arrayFrom(t.childNodes),l=0;l<c.length;l+=1){var u=c[l];if(isHTMLTableCaptionElement(u))return computeTextAlternative(u,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(isSVGSVGElement(t)){i.add(t);for(var d=arrayFrom(t.childNodes),p=0;p<d.length;p+=1){var m=d[p];if(isSVGTitleElement(m))return m.textContent}return null}else if(getLocalName(t)===`img`||getLocalName(t)===`area`){var h=useAttribute(t,`alt`);if(h!==null)return h}else if(isHTMLOptGroupElement(t)){var g=useAttribute(t,`label`);if(g!==null)return g}if(isHTMLInputElement(t)&&(t.type===`button`||t.type===`submit`||t.type===`reset`)){var _=useAttribute(t,`value`);if(_!==null)return _;if(t.type===`submit`)return`Submit`;if(t.type===`reset`)return`Reset`}var v=getLabels$1(t);if(v!==null&&v.length!==0)return i.add(t),arrayFrom(v).map(function(t){return computeTextAlternative(t,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(t){return t.length>0}).join(` `);if(isHTMLInputElement(t)&&t.type===`image`){var b=useAttribute(t,`alt`);if(b!==null)return b;var x=useAttribute(t,`title`);return x===null?`Submit Query`:x}if(hasAnyConcreteRoles(t,[`button`])){var S=computeMiscTextAlternative(t,{isEmbeddedInLabel:!1,isReferenced:!1});if(S!==``)return S}return null}function computeTextAlternative(t,r){if(i.has(t))return``;if(!h&&isHidden(t,p)&&!r.isReferenced)return i.add(t),``;var a=isElement(t)?t.getAttributeNode(`aria-labelledby`):null,o=a!==null&&!i.has(a)?queryIdRefs(t,`aria-labelledby`):[];if(c===`name`&&!r.isReferenced&&o.length>0)return i.add(a),o.map(function(t){return computeTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(` `);var l=r.recursion&&isControl(t)&&c===`name`;if(!l){var u=(isElement(t)&&t.getAttribute(`aria-label`)||``).trim();if(u!==``&&c===`name`)return i.add(t),u;if(!isMarkedPresentational(t)){var d=computeElementTextAlternative(t);if(d!==null)return i.add(t),d}}if(hasAnyConcreteRoles(t,[`menu`]))return i.add(t),``;if(l||r.isEmbeddedInLabel||r.isReferenced){if(hasAnyConcreteRoles(t,[`combobox`,`listbox`])){i.add(t);var m=querySelectedOptions(t);return m.length===0?isHTMLInputElement(t)?t.value:``:arrayFrom(m).map(function(t){return computeTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(` `)}if(hasAbstractRole(t,`range`))return i.add(t),t.hasAttribute(`aria-valuetext`)?t.getAttribute(`aria-valuetext`):t.hasAttribute(`aria-valuenow`)?t.getAttribute(`aria-valuenow`):t.getAttribute(`value`)||``;if(hasAnyConcreteRoles(t,[`textbox`]))return i.add(t),getValueOfTextbox(t)}if(allowsNameFromContent(t)||isElement(t)&&r.isReferenced||isNativeHostLanguageTextAlternativeElement(t)||isDescendantOfNativeHostLanguageTextAlternativeElement(t)){var g=computeMiscTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!1});if(g!==``)return i.add(t),g}if(t.nodeType===t.TEXT_NODE)return i.add(t),t.textContent||``;if(r.recursion)return i.add(t),computeMiscTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!1});var _=computeTooltipAttributeValue(t);return _===null?(i.add(t),``):(i.add(t),_)}return asFlatString(computeTextAlternative(t,{isEmbeddedInLabel:!1,isReferenced:c===`description`,recursion:!1}))}function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(t){return typeof t}:function(t){return t&&typeof Symbol==`function`&&t.constructor===Symbol&&t!==Symbol.prototype?`symbol`:typeof t},_typeof(t)}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?ownKeys(Object(i),!0).forEach(function(r){_defineProperty(t,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))})}return t}function _defineProperty(t,r,i){return r=_toPropertyKey(r),r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function _toPropertyKey(t){var r=_toPrimitive(t,`string`);return _typeof(r)===`symbol`?r:String(r)}function _toPrimitive(t,r){if(_typeof(t)!==`object`||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r||`default`);if(_typeof(a)!==`object`)return a;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(r===`string`?String:Number)(t)}function computeAccessibleDescription(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=queryIdRefs(t,`aria-describedby`).map(function(t){return computeTextAlternative(t,_objectSpread(_objectSpread({},r),{},{compute:`description`}))}).join(` `);if(i===``){var a=t.getAttribute(`title`);i=a===null?``:a}return i}function prohibitsNaming(t){return hasAnyConcreteRoles(t,[`caption`,`code`,`deletion`,`emphasis`,`generic`,`insertion`,`paragraph`,`presentation`,`strong`,`subscript`,`superscript`])}function computeAccessibleName(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return prohibitsNaming(t)?``:computeTextAlternative(t,r)}var M=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;function iteratorProxy(){var t=this,r=0,i={"@@iterator":function iterator(){return i},next:function next(){if(r<t.length){var i=t[r];return r+=1,{done:!1,value:i}}else return{done:!0}}};return i}t.default=iteratorProxy})),N=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=iterationDecorator;var r=_interopRequireDefault(M());function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(t){return typeof t}:function(t){return t&&typeof Symbol==`function`&&t.constructor===Symbol&&t!==Symbol.prototype?`symbol`:typeof t},_typeof(t)}function iterationDecorator(t,i){return typeof Symbol==`function`&&_typeof(Symbol.iterator)===`symbol`&&Object.defineProperty(t,Symbol.iterator,{value:r.default.bind(i)}),t}})),P=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_interopRequireDefault(N());function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}function _nonIterableRest(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
14
|
+
`});function createIndent(t){return Array(t+1).join(` `)}function format(t,r){if(r&&(validateOptions(r),r.plugins)){let i=findPlugin(r.plugins,t);if(i!==null)return printPlugin(i,t,getConfig(r),``,0,[])}let i=printBasicValue(t,getPrintFunctionName(r),getEscapeRegex(r),getEscapeString(r));return i===null?printComplexValue(t,getConfig(r),``,0,[]):i}t.plugins={AsymmetricMatcher:a.default,ConvertAnsi:o.default,DOMCollection:c.default,DOMElement:l.default,Immutable:m.default,ReactElement:_.default,ReactTestComponent:v.default},t.default=format}))()),D=Object.prototype.toString;function isCallable(t){return typeof t==`function`||D.call(t)===`[object Function]`}function toInteger(t){var r=Number(t);return isNaN(r)?0:r===0||!isFinite(r)?r:(r>0?1:-1)*Math.floor(Math.abs(r))}var O=2**53-1;function toLength(t){var r=toInteger(t);return Math.min(Math.max(r,0),O)}function arrayFrom(t,r){var i=Array,a=Object(t);if(t==null)throw TypeError(`Array.from requires an array-like object - not null or undefined`);if(r!==void 0&&!isCallable(r))throw TypeError(`Array.from: when provided, the second argument must be a function`);for(var o=toLength(a.length),c=isCallable(i)?Object(new i(o)):Array(o),l=0,u;l<o;)u=a[l],r?c[l]=r(u,l):c[l]=u,l+=1;return c.length=o,c}function _typeof$1(t){"@babel/helpers - typeof";return _typeof$1=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(t){return typeof t}:function(t){return t&&typeof Symbol==`function`&&t.constructor===Symbol&&t!==Symbol.prototype?`symbol`:typeof t},_typeof$1(t)}t(_typeof$1,`_typeof`);function _classCallCheck(t,r){if(!(t instanceof r))throw TypeError(`Cannot call a class as a function`)}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,`value`in a&&(a.writable=!0),Object.defineProperty(t,_toPropertyKey$1(a.key),a)}}function _createClass(t,r,i){return r&&_defineProperties(t.prototype,r),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _defineProperty$1(t,r,i){return r=_toPropertyKey$1(r),r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}t(_defineProperty$1,`_defineProperty`);function _toPropertyKey$1(t){var r=_toPrimitive$1(t,`string`);return _typeof$1(r)===`symbol`?r:String(r)}t(_toPropertyKey$1,`_toPropertyKey`);function _toPrimitive$1(t,r){if(_typeof$1(t)!==`object`||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r||`default`);if(_typeof$1(a)!==`object`)return a;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(r===`string`?String:Number)(t)}t(_toPrimitive$1,`_toPrimitive`);var k=typeof Set>`u`?Set:function(){function SetLike(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];_classCallCheck(this,SetLike),_defineProperty$1(this,`items`,void 0),this.items=t}return _createClass(SetLike,[{key:`add`,value:function add(t){return this.has(t)===!1&&this.items.push(t),this}},{key:`clear`,value:function clear(){this.items=[]}},{key:`delete`,value:function _delete(t){var r=this.items.length;return this.items=this.items.filter(function(r){return r!==t}),r!==this.items.length}},{key:`forEach`,value:function forEach(t){var r=this;this.items.forEach(function(i){t(i,i,r)})}},{key:`has`,value:function has(t){return this.items.indexOf(t)!==-1}},{key:`size`,get:function get(){return this.items.length}}]),SetLike}();function getLocalName(t){return t.localName??t.tagName.toLowerCase()}var A={article:`article`,aside:`complementary`,button:`button`,datalist:`listbox`,dd:`definition`,details:`group`,dialog:`dialog`,dt:`term`,fieldset:`group`,figure:`figure`,form:`form`,footer:`contentinfo`,h1:`heading`,h2:`heading`,h3:`heading`,h4:`heading`,h5:`heading`,h6:`heading`,header:`banner`,hr:`separator`,html:`document`,legend:`legend`,li:`listitem`,math:`math`,main:`main`,menu:`list`,nav:`navigation`,ol:`list`,optgroup:`group`,option:`option`,output:`status`,progress:`progressbar`,section:`region`,summary:`button`,table:`table`,tbody:`rowgroup`,textarea:`textbox`,tfoot:`rowgroup`,td:`cell`,th:`columnheader`,thead:`rowgroup`,tr:`row`,ul:`list`},j={caption:new Set([`aria-label`,`aria-labelledby`]),code:new Set([`aria-label`,`aria-labelledby`]),deletion:new Set([`aria-label`,`aria-labelledby`]),emphasis:new Set([`aria-label`,`aria-labelledby`]),generic:new Set([`aria-label`,`aria-labelledby`,`aria-roledescription`]),insertion:new Set([`aria-label`,`aria-labelledby`]),paragraph:new Set([`aria-label`,`aria-labelledby`]),presentation:new Set([`aria-label`,`aria-labelledby`]),strong:new Set([`aria-label`,`aria-labelledby`]),subscript:new Set([`aria-label`,`aria-labelledby`]),superscript:new Set([`aria-label`,`aria-labelledby`])};function hasGlobalAriaAttributes(t,r){return[`aria-atomic`,`aria-busy`,`aria-controls`,`aria-current`,`aria-describedby`,`aria-details`,`aria-dropeffect`,`aria-flowto`,`aria-grabbed`,`aria-hidden`,`aria-keyshortcuts`,`aria-label`,`aria-labelledby`,`aria-live`,`aria-owns`,`aria-relevant`,`aria-roledescription`].some(function(i){var a;return t.hasAttribute(i)&&!((a=j[r])!=null&&a.has(i))})}function ignorePresentationalRole(t,r){return hasGlobalAriaAttributes(t,r)}function getRole(t){var r=getExplicitRole(t);if(r===null||r===`presentation`){var i=getImplicitRole(t);if(r!==`presentation`||ignorePresentationalRole(t,i||``))return i}return r}function getImplicitRole(t){var r=A[getLocalName(t)];if(r!==void 0)return r;switch(getLocalName(t)){case`a`:case`area`:case`link`:if(t.hasAttribute(`href`))return`link`;break;case`img`:return t.getAttribute(`alt`)===``&&!ignorePresentationalRole(t,`img`)?`presentation`:`img`;case`input`:var i=t.type;switch(i){case`button`:case`image`:case`reset`:case`submit`:return`button`;case`checkbox`:case`radio`:return i;case`range`:return`slider`;case`email`:case`tel`:case`text`:case`url`:return t.hasAttribute(`list`)?`combobox`:`textbox`;case`search`:return t.hasAttribute(`list`)?`combobox`:`searchbox`;case`number`:return`spinbutton`;default:return null}case`select`:return t.hasAttribute(`multiple`)||t.size>1?`listbox`:`combobox`}return null}function getExplicitRole(t){var r=t.getAttribute(`role`);if(r!==null){var i=r.trim().split(` `)[0];if(i.length>0)return i}return null}function isElement(t){return t!==null&&t.nodeType===t.ELEMENT_NODE}function isHTMLTableCaptionElement(t){return isElement(t)&&getLocalName(t)===`caption`}function isHTMLInputElement(t){return isElement(t)&&getLocalName(t)===`input`}function isHTMLOptGroupElement(t){return isElement(t)&&getLocalName(t)===`optgroup`}function isHTMLSelectElement(t){return isElement(t)&&getLocalName(t)===`select`}function isHTMLTableElement(t){return isElement(t)&&getLocalName(t)===`table`}function isHTMLTextAreaElement(t){return isElement(t)&&getLocalName(t)===`textarea`}function safeWindow(t){var r=(t.ownerDocument===null?t:t.ownerDocument).defaultView;if(r===null)throw TypeError(`no window available`);return r}function isHTMLFieldSetElement(t){return isElement(t)&&getLocalName(t)===`fieldset`}function isHTMLLegendElement(t){return isElement(t)&&getLocalName(t)===`legend`}function isHTMLSlotElement(t){return isElement(t)&&getLocalName(t)===`slot`}function isSVGElement(t){return isElement(t)&&t.ownerSVGElement!==void 0}function isSVGSVGElement(t){return isElement(t)&&getLocalName(t)===`svg`}function isSVGTitleElement(t){return isSVGElement(t)&&getLocalName(t)===`title`}function queryIdRefs(t,r){if(isElement(t)&&t.hasAttribute(r)){var i=t.getAttribute(r).split(` `),a=t.getRootNode?t.getRootNode():t.ownerDocument;return i.map(function(t){return a.getElementById(t)}).filter(function(t){return t!==null})}return[]}function hasAnyConcreteRoles(t,r){return isElement(t)?r.indexOf(getRole(t))!==-1:!1}function asFlatString(t){return t.trim().replace(/\s\s+/g,` `)}function isHidden(t,r){if(!isElement(t))return!1;if(t.hasAttribute(`hidden`)||t.getAttribute(`aria-hidden`)===`true`)return!0;var i=r(t);return i.getPropertyValue(`display`)===`none`||i.getPropertyValue(`visibility`)===`hidden`}function isControl(t){return hasAnyConcreteRoles(t,[`button`,`combobox`,`listbox`,`textbox`])||hasAbstractRole(t,`range`)}function hasAbstractRole(t,r){if(!isElement(t))return!1;switch(r){case`range`:return hasAnyConcreteRoles(t,[`meter`,`progressbar`,`scrollbar`,`slider`,`spinbutton`]);default:throw TypeError(`No knowledge about abstract role '${r}'. This is likely a bug :(`)}}function querySelectorAllSubtree(t,r){var i=arrayFrom(t.querySelectorAll(r));return queryIdRefs(t,`aria-owns`).forEach(function(t){i.push.apply(i,arrayFrom(t.querySelectorAll(r)))}),i}function querySelectedOptions(t){return isHTMLSelectElement(t)?t.selectedOptions||querySelectorAllSubtree(t,`[selected]`):querySelectorAllSubtree(t,`[aria-selected="true"]`)}function isMarkedPresentational(t){return hasAnyConcreteRoles(t,[`none`,`presentation`])}function isNativeHostLanguageTextAlternativeElement(t){return isHTMLTableCaptionElement(t)}function allowsNameFromContent(t){return hasAnyConcreteRoles(t,[`button`,`cell`,`checkbox`,`columnheader`,`gridcell`,`heading`,`label`,`legend`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`row`,`rowheader`,`switch`,`tab`,`tooltip`,`treeitem`])}function isDescendantOfNativeHostLanguageTextAlternativeElement(t){return!1}function getValueOfTextbox(t){return isHTMLInputElement(t)||isHTMLTextAreaElement(t)?t.value:t.textContent||``}function getTextualContent(t){var r=t.getPropertyValue(`content`);return/^["'].*["']$/.test(r)?r.slice(1,-1):``}function isLabelableElement(t){var r=getLocalName(t);return r===`button`||r===`input`&&t.getAttribute(`type`)!==`hidden`||r===`meter`||r===`output`||r===`progress`||r===`select`||r===`textarea`}function findLabelableElement(t){if(isLabelableElement(t))return t;var r=null;return t.childNodes.forEach(function(t){if(r===null&&isElement(t)){var i=findLabelableElement(t);i!==null&&(r=i)}}),r}function getControlOfLabel(t){if(t.control!==void 0)return t.control;var r=t.getAttribute(`for`);return r===null?findLabelableElement(t):t.ownerDocument.getElementById(r)}function getLabels$1(t){var r=t.labels;if(r===null)return r;if(r!==void 0)return arrayFrom(r);if(!isLabelableElement(t))return null;var i=t.ownerDocument;return arrayFrom(i.querySelectorAll(`label`)).filter(function(r){return getControlOfLabel(r)===t})}t(getLabels$1,`getLabels`);function getSlotContents(t){var r=t.assignedNodes();return r.length===0?arrayFrom(t.childNodes):r}function computeTextAlternative(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=new k,a=safeWindow(t),o=r.compute,c=o===void 0?`name`:o,l=r.computedStyleSupportsPseudoElements,u=l===void 0?r.getComputedStyle!==void 0:l,d=r.getComputedStyle,p=d===void 0?a.getComputedStyle.bind(a):d,m=r.hidden,h=m!==void 0&&m;function computeMiscTextAlternative(t,r){var i=``;if(isElement(t)&&u&&(i=`${getTextualContent(p(t,`::before`))} ${i}`),(isHTMLSlotElement(t)?getSlotContents(t):arrayFrom(t.childNodes).concat(queryIdRefs(t,`aria-owns`))).forEach(function(t){var a=computeTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),o=(isElement(t)?p(t).getPropertyValue(`display`):`inline`)===`inline`?``:` `;i+=`${o}${a}${o}`}),isElement(t)&&u){var a=getTextualContent(p(t,`::after`));i=`${i} ${a}`}return i.trim()}function useAttribute(t,r){var a=t.getAttributeNode(r);return a!==null&&!i.has(a)&&a.value.trim()!==``?(i.add(a),a.value):null}function computeTooltipAttributeValue(t){return isElement(t)?useAttribute(t,`title`):null}function computeElementTextAlternative(t){if(!isElement(t))return null;if(isHTMLFieldSetElement(t)){i.add(t);for(var r=arrayFrom(t.childNodes),a=0;a<r.length;a+=1){var o=r[a];if(isHTMLLegendElement(o))return computeTextAlternative(o,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(isHTMLTableElement(t)){i.add(t);for(var c=arrayFrom(t.childNodes),l=0;l<c.length;l+=1){var u=c[l];if(isHTMLTableCaptionElement(u))return computeTextAlternative(u,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(isSVGSVGElement(t)){i.add(t);for(var d=arrayFrom(t.childNodes),p=0;p<d.length;p+=1){var m=d[p];if(isSVGTitleElement(m))return m.textContent}return null}else if(getLocalName(t)===`img`||getLocalName(t)===`area`){var h=useAttribute(t,`alt`);if(h!==null)return h}else if(isHTMLOptGroupElement(t)){var g=useAttribute(t,`label`);if(g!==null)return g}if(isHTMLInputElement(t)&&(t.type===`button`||t.type===`submit`||t.type===`reset`)){var _=useAttribute(t,`value`);if(_!==null)return _;if(t.type===`submit`)return`Submit`;if(t.type===`reset`)return`Reset`}var v=getLabels$1(t);if(v!==null&&v.length!==0)return i.add(t),arrayFrom(v).map(function(t){return computeTextAlternative(t,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(t){return t.length>0}).join(` `);if(isHTMLInputElement(t)&&t.type===`image`){var b=useAttribute(t,`alt`);if(b!==null)return b;var x=useAttribute(t,`title`);return x===null?`Submit Query`:x}if(hasAnyConcreteRoles(t,[`button`])){var S=computeMiscTextAlternative(t,{isEmbeddedInLabel:!1,isReferenced:!1});if(S!==``)return S}return null}function computeTextAlternative(t,r){if(i.has(t))return``;if(!h&&isHidden(t,p)&&!r.isReferenced)return i.add(t),``;var a=isElement(t)?t.getAttributeNode(`aria-labelledby`):null,o=a!==null&&!i.has(a)?queryIdRefs(t,`aria-labelledby`):[];if(c===`name`&&!r.isReferenced&&o.length>0)return i.add(a),o.map(function(t){return computeTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(` `);var l=r.recursion&&isControl(t)&&c===`name`;if(!l){var u=(isElement(t)&&t.getAttribute(`aria-label`)||``).trim();if(u!==``&&c===`name`)return i.add(t),u;if(!isMarkedPresentational(t)){var d=computeElementTextAlternative(t);if(d!==null)return i.add(t),d}}if(hasAnyConcreteRoles(t,[`menu`]))return i.add(t),``;if(l||r.isEmbeddedInLabel||r.isReferenced){if(hasAnyConcreteRoles(t,[`combobox`,`listbox`])){i.add(t);var m=querySelectedOptions(t);return m.length===0?isHTMLInputElement(t)?t.value:``:arrayFrom(m).map(function(t){return computeTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(` `)}if(hasAbstractRole(t,`range`))return i.add(t),t.hasAttribute(`aria-valuetext`)?t.getAttribute(`aria-valuetext`):t.hasAttribute(`aria-valuenow`)?t.getAttribute(`aria-valuenow`):t.getAttribute(`value`)||``;if(hasAnyConcreteRoles(t,[`textbox`]))return i.add(t),getValueOfTextbox(t)}if(allowsNameFromContent(t)||isElement(t)&&r.isReferenced||isNativeHostLanguageTextAlternativeElement(t)||isDescendantOfNativeHostLanguageTextAlternativeElement(t)){var g=computeMiscTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!1});if(g!==``)return i.add(t),g}if(t.nodeType===t.TEXT_NODE)return i.add(t),t.textContent||``;if(r.recursion)return i.add(t),computeMiscTextAlternative(t,{isEmbeddedInLabel:r.isEmbeddedInLabel,isReferenced:!1});var _=computeTooltipAttributeValue(t);return _===null?(i.add(t),``):(i.add(t),_)}return asFlatString(computeTextAlternative(t,{isEmbeddedInLabel:!1,isReferenced:c===`description`,recursion:!1}))}function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(t){return typeof t}:function(t){return t&&typeof Symbol==`function`&&t.constructor===Symbol&&t!==Symbol.prototype?`symbol`:typeof t},_typeof(t)}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),i.push.apply(i,a)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]==null?{}:arguments[r];r%2?ownKeys(Object(i),!0).forEach(function(r){_defineProperty(t,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))})}return t}function _defineProperty(t,r,i){return r=_toPropertyKey(r),r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function _toPropertyKey(t){var r=_toPrimitive(t,`string`);return _typeof(r)===`symbol`?r:String(r)}function _toPrimitive(t,r){if(_typeof(t)!==`object`||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var a=i.call(t,r||`default`);if(_typeof(a)!==`object`)return a;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(r===`string`?String:Number)(t)}function computeAccessibleDescription(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=queryIdRefs(t,`aria-describedby`).map(function(t){return computeTextAlternative(t,_objectSpread(_objectSpread({},r),{},{compute:`description`}))}).join(` `);if(i===``){var a=t.getAttribute(`title`);i=a===null?``:a}return i}function prohibitsNaming(t){return hasAnyConcreteRoles(t,[`caption`,`code`,`deletion`,`emphasis`,`generic`,`insertion`,`paragraph`,`presentation`,`strong`,`subscript`,`superscript`])}function computeAccessibleName(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return prohibitsNaming(t)?``:computeTextAlternative(t,r)}var M=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;function iteratorProxy(){var t=this,r=0,i={"@@iterator":function iterator(){return i},next:function next(){if(r<t.length){var i=t[r];return r+=1,{done:!1,value:i}}else return{done:!0}}};return i}t.default=iteratorProxy})),N=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=iterationDecorator;var r=_interopRequireDefault(M());function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){"@babel/helpers - typeof";return _typeof=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(t){return typeof t}:function(t){return t&&typeof Symbol==`function`&&t.constructor===Symbol&&t!==Symbol.prototype?`symbol`:typeof t},_typeof(t)}function iterationDecorator(t,i){return typeof Symbol==`function`&&_typeof(Symbol.iterator)===`symbol`&&Object.defineProperty(t,Symbol.iterator,{value:r.default.bind(i)}),t}})),P=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_interopRequireDefault(N());function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}function _nonIterableRest(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
15
15
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit(t,r){var i=t==null?null:typeof Symbol<`u`&&t[Symbol.iterator]||t[`@@iterator`];if(i!=null){var a=[],o=!0,c=!1,l,u;try{for(i=i.call(t);!(o=(l=i.next()).done)&&(a.push(l.value),!(r&&a.length===r));o=!0);}catch(t){c=!0,u=t}finally{try{!o&&i.return!=null&&i.return()}finally{if(c)throw u}}return a}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _createForOfIteratorHelper(t,r){var i=typeof Symbol<`u`&&t[Symbol.iterator]||t[`@@iterator`];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==`number`){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
16
16
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,l=!1,u;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();return c=t.done,t},e:function e(t){l=!0,u=t},f:function f(){try{!c&&i.return!=null&&i.return()}finally{if(l)throw u}}}}function _unsupportedIterableToArray(t,r){if(t){if(typeof t==`string`)return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i===`Object`&&t.constructor&&(i=t.constructor.name),i===`Map`||i===`Set`)return Array.from(t);if(i===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}}function _arrayLikeToArray(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=Array(r);i<r;i++)a[i]=t[i];return a}var i=[[`aria-activedescendant`,{type:`id`}],[`aria-atomic`,{type:`boolean`}],[`aria-autocomplete`,{type:`token`,values:[`inline`,`list`,`both`,`none`]}],[`aria-braillelabel`,{type:`string`}],[`aria-brailleroledescription`,{type:`string`}],[`aria-busy`,{type:`boolean`}],[`aria-checked`,{type:`tristate`}],[`aria-colcount`,{type:`integer`}],[`aria-colindex`,{type:`integer`}],[`aria-colspan`,{type:`integer`}],[`aria-controls`,{type:`idlist`}],[`aria-current`,{type:`token`,values:[`page`,`step`,`location`,`date`,`time`,!0,!1]}],[`aria-describedby`,{type:`idlist`}],[`aria-description`,{type:`string`}],[`aria-details`,{type:`id`}],[`aria-disabled`,{type:`boolean`}],[`aria-dropeffect`,{type:`tokenlist`,values:[`copy`,`execute`,`link`,`move`,`none`,`popup`]}],[`aria-errormessage`,{type:`id`}],[`aria-expanded`,{type:`boolean`,allowundefined:!0}],[`aria-flowto`,{type:`idlist`}],[`aria-grabbed`,{type:`boolean`,allowundefined:!0}],[`aria-haspopup`,{type:`token`,values:[!1,!0,`menu`,`listbox`,`tree`,`grid`,`dialog`]}],[`aria-hidden`,{type:`boolean`,allowundefined:!0}],[`aria-invalid`,{type:`token`,values:[`grammar`,!1,`spelling`,!0]}],[`aria-keyshortcuts`,{type:`string`}],[`aria-label`,{type:`string`}],[`aria-labelledby`,{type:`idlist`}],[`aria-level`,{type:`integer`}],[`aria-live`,{type:`token`,values:[`assertive`,`off`,`polite`]}],[`aria-modal`,{type:`boolean`}],[`aria-multiline`,{type:`boolean`}],[`aria-multiselectable`,{type:`boolean`}],[`aria-orientation`,{type:`token`,values:[`vertical`,`undefined`,`horizontal`]}],[`aria-owns`,{type:`idlist`}],[`aria-placeholder`,{type:`string`}],[`aria-posinset`,{type:`integer`}],[`aria-pressed`,{type:`tristate`}],[`aria-readonly`,{type:`boolean`}],[`aria-relevant`,{type:`tokenlist`,values:[`additions`,`all`,`removals`,`text`]}],[`aria-required`,{type:`boolean`}],[`aria-roledescription`,{type:`string`}],[`aria-rowcount`,{type:`integer`}],[`aria-rowindex`,{type:`integer`}],[`aria-rowspan`,{type:`integer`}],[`aria-selected`,{type:`boolean`,allowundefined:!0}],[`aria-setsize`,{type:`integer`}],[`aria-sort`,{type:`token`,values:[`ascending`,`descending`,`none`,`other`]}],[`aria-valuemax`,{type:`number`}],[`aria-valuemin`,{type:`number`}],[`aria-valuenow`,{type:`number`}],[`aria-valuetext`,{type:`string`}]],a={entries:function entries(){return i},forEach:function forEach(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=_createForOfIteratorHelper(i),o;try{for(a.s();!(o=a.n()).done;){var c=_slicedToArray(o.value,2),l=c[0],u=c[1];t.call(r,u,l,i)}}catch(t){a.e(t)}finally{a.f()}},get:function get(t){var r=i.find(function(r){return r[0]===t});return r&&r[1]},has:function has(t){return!!a.get(t)},keys:function keys(){return i.map(function(t){return _slicedToArray(t,1)[0]})},values:function values(){return i.map(function(t){return _slicedToArray(t,2)[1]})}};t.default=(0,r.default)(a,a.entries())})),I=i((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_interopRequireDefault(N());function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _slicedToArray(t,r){return _arrayWithHoles(t)||_iterableToArrayLimit(t,r)||_unsupportedIterableToArray(t,r)||_nonIterableRest()}function _nonIterableRest(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17
17
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _iterableToArrayLimit(t,r){var i=t==null?null:typeof Symbol<`u`&&t[Symbol.iterator]||t[`@@iterator`];if(i!=null){var a=[],o=!0,c=!1,l,u;try{for(i=i.call(t);!(o=(l=i.next()).done)&&(a.push(l.value),!(r&&a.length===r));o=!0);}catch(t){c=!0,u=t}finally{try{!o&&i.return!=null&&i.return()}finally{if(c)throw u}}return a}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _createForOfIteratorHelper(t,r){var i=typeof Symbol<`u`&&t[Symbol.iterator]||t[`@@iterator`];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==`number`){i&&(t=i);var a=0,o=function F(){};return{s:o,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:o}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
@@ -30,7 +30,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
30
30
|
`+t:prettyDOM(...arguments))};let X={testIdAttribute:`data-testid`,asyncUtilTimeout:1e3,asyncWrapper:t=>t(),unstable_advanceTimersWrapper:t=>t(),eventWrapper:t=>t(),defaultHidden:!1,defaultIgnore:`script, style`,showOriginalStackTrace:!1,throwSuggestions:!1,getElementError(t,r){let i=prettyDOM(r),a=Error([t,`Ignored nodes: comments, `+X.defaultIgnore+`
|
|
31
31
|
`+i].filter(Boolean).join(`
|
|
32
32
|
|
|
33
|
-
`));return a.name=`TestingLibraryElementError`,a},_disableExpensiveErrorDiagnostics:!1,computedStyleSupportsPseudoElements:!1};function runWithExpensiveErrorDiagnosticsDisabled(t){try{return X._disableExpensiveErrorDiagnostics=!0,t()}finally{X._disableExpensiveErrorDiagnostics=!1}}function configure(t){typeof t==`function`&&(t=t(X)),X={...X,...t}}function getConfig$1(){return X}t(getConfig$1,`getConfig`);const Pn=[`button`,`meter`,`output`,`progress`,`select`,`textarea`,`input`];function getTextContent(t){return Pn.includes(t.nodeName.toLowerCase())?``:t.nodeType===3?t.textContent:Array.from(t.childNodes).map(t=>getTextContent(t)).join(``)}function getLabelContent(t){let r;return r=t.tagName.toLowerCase()===`label`?getTextContent(t):t.value||t.textContent,r}function getRealLabels(t){if(t.labels!==void 0)return t.labels??[];if(!isLabelable(t))return[];let r=t.ownerDocument.querySelectorAll(`label`);return Array.from(r).filter(r=>r.control===t)}function isLabelable(t){return/BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(t.tagName)||t.tagName===`INPUT`&&t.getAttribute(`type`)!==`hidden`}function getLabels(t,r,i){let{selector:a=`*`}=i===void 0?{}:i,o=r.getAttribute(`aria-labelledby`),c=o?o.split(` `):[];return c.length?c.map(r=>{let i=t.querySelector(`[id="`+r+`"]`);return i?{content:getLabelContent(i),formControl:null}:{content:``,formControl:null}}):Array.from(getRealLabels(r)).map(t=>({content:getLabelContent(t),formControl:Array.from(t.querySelectorAll(`button, input, meter, output, progress, select, textarea`)).filter(t=>t.matches(a))[0]}))}function assertNotNullOrUndefined(t){if(t==null)throw Error(`It looks like `+t+` was passed instead of a matcher. Did you do something like getByText(`+t+`)?`)}function fuzzyMatches(t,r,i,a){if(typeof t!=`string`)return!1;assertNotNullOrUndefined(i);let o=a(t);return typeof i==`string`||typeof i==`number`?o.toLowerCase().includes(i.toString().toLowerCase()):typeof i==`function`?i(o,r):matchRegExp(i,o)}function matches(t,r,i,a){if(typeof t!=`string`)return!1;assertNotNullOrUndefined(i);let o=a(t);return i instanceof Function?i(o,r):i instanceof RegExp?matchRegExp(i,o):o===String(i)}function getDefaultNormalizer(t){let{trim:r=!0,collapseWhitespace:i=!0}=t===void 0?{}:t;return t=>{let a=t;return a=r?a.trim():a,a=i?a.replace(/\s+/g,` `):a,a}}function makeNormalizer(t){let{trim:r,collapseWhitespace:i,normalizer:a}=t;if(!a)return getDefaultNormalizer({trim:r,collapseWhitespace:i});if(r!==void 0||i!==void 0)throw Error(`trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer`);return a}function matchRegExp(t,r){let i=t.test(r);return t.global&&t.lastIndex!==0&&(console.warn(`To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.`),t.lastIndex=0),i}function getNodeText(t){return t.matches(`input[type=submit], input[type=button], input[type=reset]`)?t.value:Array.from(t.childNodes).filter(t=>t.nodeType===3&&!!t.textContent).map(t=>t.textContent).join(``)}const Fn=buildElementRoleList(q.elementRoles);function isSubtreeInaccessible(t){return t.hidden===!0||t.getAttribute(`aria-hidden`)===`true`||t.ownerDocument.defaultView.getComputedStyle(t).display===`none`}function isInaccessible(t,r){r===void 0&&(r={});let{isSubtreeInaccessible:i=isSubtreeInaccessible}=r;if(t.ownerDocument.defaultView.getComputedStyle(t).visibility===`hidden`)return!0;let a=t;for(;a;){if(i(a))return!0;a=a.parentElement}return!1}function getImplicitAriaRoles(t){for(let{match:r,roles:i}of Fn)if(r(t))return[...i];return[]}function buildElementRoleList(t){function makeElementSelector(t){let{name:r,attributes:i}=t;return``+r+i.map(t=>{let{name:r,value:i,constraints:a=[]}=t,o=a.indexOf(`undefined`)!==-1,c=a.indexOf(`set`)!==-1;return i===void 0?o?`:not([`+r+`])`:c?`[`+r+`]:not([`+r+`=""])`:`[`+r+`]`:`[`+r+`="`+i+`"]`}).join(``)}function getSelectorSpecificity(t){let{attributes:r=[]}=t;return r.length}function bySelectorSpecificity(t,r){let{specificity:i}=t,{specificity:a}=r;return a-i}function match(t){let{attributes:r=[]}=t,i=r.findIndex(t=>t.value&&t.name===`type`&&t.value===`text`);i>=0&&(r=[...r.slice(0,i),...r.slice(i+1)]);let a=makeElementSelector({...t,attributes:r});return t=>i>=0&&t.type!==`text`?!1:t.matches(a)}let r=[];for(let[i,a]of t.entries())r=[...r,{match:match(i),roles:Array.from(a),specificity:getSelectorSpecificity(i)}];return r.sort(bySelectorSpecificity)}function getRoles(t,r){let{hidden:i=!1}=r===void 0?{}:r;function flattenDOM(t){return[t,...Array.from(t.children).reduce((t,r)=>[...t,...flattenDOM(r)],[])]}return flattenDOM(t).filter(t=>i
|
|
33
|
+
`));return a.name=`TestingLibraryElementError`,a},_disableExpensiveErrorDiagnostics:!1,computedStyleSupportsPseudoElements:!1};function runWithExpensiveErrorDiagnosticsDisabled(t){try{return X._disableExpensiveErrorDiagnostics=!0,t()}finally{X._disableExpensiveErrorDiagnostics=!1}}function configure(t){typeof t==`function`&&(t=t(X)),X={...X,...t}}function getConfig$1(){return X}t(getConfig$1,`getConfig`);const Pn=[`button`,`meter`,`output`,`progress`,`select`,`textarea`,`input`];function getTextContent(t){return Pn.includes(t.nodeName.toLowerCase())?``:t.nodeType===3?t.textContent:Array.from(t.childNodes).map(t=>getTextContent(t)).join(``)}function getLabelContent(t){let r;return r=t.tagName.toLowerCase()===`label`?getTextContent(t):t.value||t.textContent,r}function getRealLabels(t){if(t.labels!==void 0)return t.labels??[];if(!isLabelable(t))return[];let r=t.ownerDocument.querySelectorAll(`label`);return Array.from(r).filter(r=>r.control===t)}function isLabelable(t){return/BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(t.tagName)||t.tagName===`INPUT`&&t.getAttribute(`type`)!==`hidden`}function getLabels(t,r,i){let{selector:a=`*`}=i===void 0?{}:i,o=r.getAttribute(`aria-labelledby`),c=o?o.split(` `):[];return c.length?c.map(r=>{let i=t.querySelector(`[id="`+r+`"]`);return i?{content:getLabelContent(i),formControl:null}:{content:``,formControl:null}}):Array.from(getRealLabels(r)).map(t=>({content:getLabelContent(t),formControl:Array.from(t.querySelectorAll(`button, input, meter, output, progress, select, textarea`)).filter(t=>t.matches(a))[0]}))}function assertNotNullOrUndefined(t){if(t==null)throw Error(`It looks like `+t+` was passed instead of a matcher. Did you do something like getByText(`+t+`)?`)}function fuzzyMatches(t,r,i,a){if(typeof t!=`string`)return!1;assertNotNullOrUndefined(i);let o=a(t);return typeof i==`string`||typeof i==`number`?o.toLowerCase().includes(i.toString().toLowerCase()):typeof i==`function`?i(o,r):matchRegExp(i,o)}function matches(t,r,i,a){if(typeof t!=`string`)return!1;assertNotNullOrUndefined(i);let o=a(t);return i instanceof Function?i(o,r):i instanceof RegExp?matchRegExp(i,o):o===String(i)}function getDefaultNormalizer(t){let{trim:r=!0,collapseWhitespace:i=!0}=t===void 0?{}:t;return t=>{let a=t;return a=r?a.trim():a,a=i?a.replace(/\s+/g,` `):a,a}}function makeNormalizer(t){let{trim:r,collapseWhitespace:i,normalizer:a}=t;if(!a)return getDefaultNormalizer({trim:r,collapseWhitespace:i});if(r!==void 0||i!==void 0)throw Error(`trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer`);return a}function matchRegExp(t,r){let i=t.test(r);return t.global&&t.lastIndex!==0&&(console.warn(`To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.`),t.lastIndex=0),i}function getNodeText(t){return t.matches(`input[type=submit], input[type=button], input[type=reset]`)?t.value:Array.from(t.childNodes).filter(t=>t.nodeType===3&&!!t.textContent).map(t=>t.textContent).join(``)}const Fn=buildElementRoleList(q.elementRoles);function isSubtreeInaccessible(t){return t.hidden===!0||t.getAttribute(`aria-hidden`)===`true`||t.ownerDocument.defaultView.getComputedStyle(t).display===`none`}function isInaccessible(t,r){r===void 0&&(r={});let{isSubtreeInaccessible:i=isSubtreeInaccessible}=r;if(t.ownerDocument.defaultView.getComputedStyle(t).visibility===`hidden`)return!0;let a=t;for(;a;){if(i(a))return!0;a=a.parentElement}return!1}function getImplicitAriaRoles(t){for(let{match:r,roles:i}of Fn)if(r(t))return[...i];return[]}function buildElementRoleList(t){function makeElementSelector(t){let{name:r,attributes:i}=t;return``+r+i.map(t=>{let{name:r,value:i,constraints:a=[]}=t,o=a.indexOf(`undefined`)!==-1,c=a.indexOf(`set`)!==-1;return i===void 0?o?`:not([`+r+`])`:c?`[`+r+`]:not([`+r+`=""])`:`[`+r+`]`:`[`+r+`="`+i+`"]`}).join(``)}function getSelectorSpecificity(t){let{attributes:r=[]}=t;return r.length}function bySelectorSpecificity(t,r){let{specificity:i}=t,{specificity:a}=r;return a-i}function match(t){let{attributes:r=[]}=t,i=r.findIndex(t=>t.value&&t.name===`type`&&t.value===`text`);i>=0&&(r=[...r.slice(0,i),...r.slice(i+1)]);let a=makeElementSelector({...t,attributes:r});return t=>i>=0&&t.type!==`text`?!1:t.matches(a)}let r=[];for(let[i,a]of t.entries())r=[...r,{match:match(i),roles:Array.from(a),specificity:getSelectorSpecificity(i)}];return r.sort(bySelectorSpecificity)}function getRoles(t,r){let{hidden:i=!1}=r===void 0?{}:r;function flattenDOM(t){return[t,...Array.from(t.children).reduce((t,r)=>[...t,...flattenDOM(r)],[])]}return flattenDOM(t).filter(t=>i!==!1||isInaccessible(t)===!1).reduce((t,r)=>{let i=[];return i=r.hasAttribute(`role`)?r.getAttribute(`role`).split(` `).slice(0,1):getImplicitAriaRoles(r),i.reduce((t,i)=>Array.isArray(t[i])?{...t,[i]:[...t[i],r]}:{...t,[i]:[r]},t)},{})}function prettyRoles(t,r){let{hidden:i,includeDescription:a}=r,o=getRoles(t,{hidden:i});return Object.entries(o).filter(t=>{let[r]=t;return r!==`generic`}).map(t=>{let[r,i]=t,o=`-`.repeat(50),c=i.map(t=>{let r=`Name "`+computeAccessibleName(t,{computedStyleSupportsPseudoElements:getConfig$1().computedStyleSupportsPseudoElements})+`":
|
|
34
34
|
`,i=prettyDOM(t.cloneNode(!1));if(a){let a=`Description "`+computeAccessibleDescription(t,{computedStyleSupportsPseudoElements:getConfig$1().computedStyleSupportsPseudoElements})+`":
|
|
35
35
|
`;return``+r+a+i}return``+r+i}).join(`
|
|
36
36
|
|
|
@@ -51,7 +51,7 @@ Here are the matching elements:
|
|
|
51
51
|
`+t.toString()+`
|
|
52
52
|
`,r)}function makeGetAllQuery(t,r){return function(i){var a=[...arguments].slice(1);let o=t(i,...a);if(!o.length)throw getConfig$1().getElementError(r(i,...a),i);return o}}function makeFindQuery(t){return(r,i,a,o)=>waitForWrapper(()=>t(r,i,a),{container:r,...o})}const wrapSingleQueryWithSuggestion=(t,r,i)=>function(a){var o=[...arguments].slice(1);let c=t(a,...o),[{suggest:l=getConfig$1().throwSuggestions}={}]=o.slice(-1);if(c&&l){let t=getSuggestedQuery(c,i);if(t&&!r.endsWith(t.queryName))throw getSuggestionError(t.toString(),a)}return c},wrapAllByQueryWithSuggestion=(t,r,i)=>function(a){var o=[...arguments].slice(1);let c=t(a,...o),[{suggest:l=getConfig$1().throwSuggestions}={}]=o.slice(-1);if(c.length&&l){let t=[...new Set(c.map(t=>getSuggestedQuery(t,i)?.toString()))];if(t.length===1&&!r.endsWith(getSuggestedQuery(c[0],i).queryName))throw getSuggestionError(t[0],a)}return c};function buildQueries(t,r,i){let a=wrapSingleQueryWithSuggestion(makeSingleQuery(t,r),t.name,`query`),o=makeGetAllQuery(t,i),c=makeSingleQuery(o,r),l=wrapSingleQueryWithSuggestion(c,t.name,`get`);return[a,wrapAllByQueryWithSuggestion(o,t.name.replace(`query`,`get`),`getAll`),l,makeFindQuery(wrapAllByQueryWithSuggestion(o,t.name,`findAll`)),makeFindQuery(wrapSingleQueryWithSuggestion(c,t.name,`find`))]}function queryAllLabels(t){return Array.from(t.querySelectorAll(`label,input`)).map(t=>({node:t,textToMatch:getLabelContent(t)})).filter(t=>{let{textToMatch:r}=t;return r!==null})}const queryAllLabelsByText=function(t,r,i){let{exact:a=!0,trim:o,collapseWhitespace:c,normalizer:l}=i===void 0?{}:i,u=a?matches:fuzzyMatches,d=makeNormalizer({collapseWhitespace:c,trim:o,normalizer:l});return queryAllLabels(t).filter(t=>{let{node:i,textToMatch:a}=t;return u(a,i,r,d)}).map(t=>{let{node:r}=t;return r})},queryAllByLabelText=function(t,r,i){let{selector:a=`*`,exact:o=!0,collapseWhitespace:c,trim:l,normalizer:u}=i===void 0?{}:i;checkContainerType(t);let d=o?matches:fuzzyMatches,p=makeNormalizer({collapseWhitespace:c,trim:l,normalizer:u}),m=Array.from(t.querySelectorAll(`*`)).filter(t=>getRealLabels(t).length||t.hasAttribute(`aria-labelledby`)).reduce((i,o)=>{let c=getLabels(t,o,{selector:a});c.filter(t=>!!t.formControl).forEach(t=>{d(t.content,t.formControl,r,p)&&t.formControl&&i.push(t.formControl)});let l=c.filter(t=>!!t.content).map(t=>t.content);return d(l.join(` `),o,r,p)&&i.push(o),l.length>1&&l.forEach((t,a)=>{d(t,o,r,p)&&i.push(o);let c=[...l];c.splice(a,1),c.length>1&&d(c.join(` `),o,r,p)&&i.push(o)}),i},[]).concat(queryAllByAttribute(`aria-label`,t,r,{exact:o,normalizer:p}));return Array.from(new Set(m)).filter(t=>t.matches(a))},getAllByLabelText=function(t,r){var i=[...arguments].slice(2);let a=queryAllByLabelText(t,r,...i);if(!a.length){let a=queryAllLabelsByText(t,r,...i);if(a.length){let i=a.map(r=>getTagNameOfElementAssociatedWithLabelViaFor(t,r)).filter(t=>!!t);throw i.length?getConfig$1().getElementError(i.map(t=>`Found a label with the text of: `+r+`, however the element associated with this label (<`+t+` />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <`+t+` />, you can use aria-label or aria-labelledby instead.`).join(`
|
|
53
53
|
|
|
54
|
-
`),t):getConfig$1().getElementError(`Found a label with the text of: `+r+`, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.`,t)}else throw getConfig$1().getElementError(`Unable to find a label with the text of: `+r,t)}return a};function getTagNameOfElementAssociatedWithLabelViaFor(t,r){let i=r.getAttribute(`for`);if(!i)return null;let a=t.querySelector(`[id="`+i+`"]`);return a?a.tagName.toLowerCase():null}const getMultipleError$7=(t,r)=>`Found multiple elements with the text of: `+r,Ln=wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText,getMultipleError$7),queryAllByLabelText.name,`query`),Rn=makeSingleQuery(getAllByLabelText,getMultipleError$7),zn=makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText,getAllByLabelText.name,`findAll`)),Bn=makeFindQuery(wrapSingleQueryWithSuggestion(Rn,getAllByLabelText.name,`find`)),Vn=wrapAllByQueryWithSuggestion(getAllByLabelText,getAllByLabelText.name,`getAll`),Hn=wrapSingleQueryWithSuggestion(Rn,getAllByLabelText.name,`get`),Un=wrapAllByQueryWithSuggestion(queryAllByLabelText,queryAllByLabelText.name,`queryAll`),queryAllByPlaceholderText=function(){var t=[...arguments];return checkContainerType(t[0]),queryAllByAttribute(`placeholder`,...t)},getMultipleError$6=(t,r)=>`Found multiple elements with the placeholder text of: `+r,getMissingError$6=(t,r)=>`Unable to find an element with the placeholder text of: `+r,Wn=wrapAllByQueryWithSuggestion(queryAllByPlaceholderText,queryAllByPlaceholderText.name,`queryAll`),[Gn,Kn,qn,Jn,Yn]=buildQueries(queryAllByPlaceholderText,getMultipleError$6,getMissingError$6),queryAllByText=function(t,r,i){let{selector:a=`*`,exact:o=!0,collapseWhitespace:c,trim:l,ignore:u=getConfig$1().defaultIgnore,normalizer:d}=i===void 0?{}:i;checkContainerType(t);let p=o?matches:fuzzyMatches,m=makeNormalizer({collapseWhitespace:c,trim:l,normalizer:d}),h=[];return typeof t.matches==`function`&&t.matches(a)&&(h=[t]),[...h,...Array.from(t.querySelectorAll(a))].filter(t=>!u||!t.matches(u)).filter(t=>p(getNodeText(t),t,r,m))},getMultipleError$5=(t,r)=>`Found multiple elements with the text: `+r,getMissingError$5=function(t,r,i){i===void 0&&(i={});let{collapseWhitespace:a,trim:o,normalizer:c,selector:l}=i,u=makeNormalizer({collapseWhitespace:a,trim:o,normalizer:c})(r.toString()),d=u!==r.toString(),p=(l??`*`)!==`*`;return`Unable to find an element with the text: `+(d?u+` (normalized from '`+r+`')`:r)+(p?`, which matches selector '`+l+`'`:``)+`. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.`},Xn=wrapAllByQueryWithSuggestion(queryAllByText,queryAllByText.name,`queryAll`),[Zn,Qn,$n,er,tr]=buildQueries(queryAllByText,getMultipleError$5,getMissingError$5),queryAllByDisplayValue=function(t,r,i){let{exact:a=!0,collapseWhitespace:o,trim:c,normalizer:l}=i===void 0?{}:i;checkContainerType(t);let u=a?matches:fuzzyMatches,d=makeNormalizer({collapseWhitespace:o,trim:c,normalizer:l});return Array.from(t.querySelectorAll(`input,textarea,select`)).filter(t=>t.tagName===`SELECT`?Array.from(t.options).filter(t=>t.selected).some(t=>u(getNodeText(t),t,r,d)):u(t.value,t,r,d))},getMultipleError$4=(t,r)=>`Found multiple elements with the display value: `+r+`.`,getMissingError$4=(t,r)=>`Unable to find an element with the display value: `+r+`.`,nr=wrapAllByQueryWithSuggestion(queryAllByDisplayValue,queryAllByDisplayValue.name,`queryAll`),[rr,ir,ar,or,sr]=buildQueries(queryAllByDisplayValue,getMultipleError$4,getMissingError$4),cr=/^(img|input|area|.+-.+)$/i,queryAllByAltText=function(t,r,i){return i===void 0&&(i={}),checkContainerType(t),queryAllByAttribute(`alt`,t,r,i).filter(t=>cr.test(t.tagName))},getMultipleError$3=(t,r)=>`Found multiple elements with the alt text: `+r,getMissingError$3=(t,r)=>`Unable to find an element with the alt text: `+r,lr=wrapAllByQueryWithSuggestion(queryAllByAltText,queryAllByAltText.name,`queryAll`),[ur,dr,fr,pr,mr]=buildQueries(queryAllByAltText,getMultipleError$3,getMissingError$3),isSvgTitle=t=>t.tagName.toLowerCase()===`title`&&t.parentElement?.tagName.toLowerCase()===`svg`,queryAllByTitle=function(t,r,i){let{exact:a=!0,collapseWhitespace:o,trim:c,normalizer:l}=i===void 0?{}:i;checkContainerType(t);let u=a?matches:fuzzyMatches,d=makeNormalizer({collapseWhitespace:o,trim:c,normalizer:l});return Array.from(t.querySelectorAll(`[title], svg > title`)).filter(t=>u(t.getAttribute(`title`),t,r,d)||isSvgTitle(t)&&u(getNodeText(t),t,r,d))},getMultipleError$2=(t,r)=>`Found multiple elements with the title: `+r+`.`,getMissingError$2=(t,r)=>`Unable to find an element with the title: `+r+`.`,hr=wrapAllByQueryWithSuggestion(queryAllByTitle,queryAllByTitle.name,`queryAll`),[gr,_r,vr,yr,br]=buildQueries(queryAllByTitle,getMultipleError$2,getMissingError$2),queryAllByRole=function(t,r,i){let{hidden:a=getConfig$1().defaultHidden,name:o,description:c,queryFallbacks:l=!1,selected:u,busy:d,checked:p,pressed:m,current:h,level:g,expanded:_,value:{now:v,min:b,max:x,text:S}={}}=i===void 0?{}:i;if(checkContainerType(t),u!==void 0&&q.roles.get(r)?.props[`aria-selected`]===void 0)throw Error(`"aria-selected" is not supported on role "`+r+`".`);if(d!==void 0&&q.roles.get(r)?.props[`aria-busy`]===void 0)throw Error(`"aria-busy" is not supported on role "`+r+`".`);if(p!==void 0&&q.roles.get(r)?.props[`aria-checked`]===void 0)throw Error(`"aria-checked" is not supported on role "`+r+`".`);if(m!==void 0&&q.roles.get(r)?.props[`aria-pressed`]===void 0)throw Error(`"aria-pressed" is not supported on role "`+r+`".`);if(h!==void 0&&q.roles.get(r)?.props[`aria-current`]===void 0)throw Error(`"aria-current" is not supported on role "`+r+`".`);if(g!==void 0&&r!==`heading`)throw Error(`Role "`+r+`" cannot have "level" property.`);if(v!==void 0&&q.roles.get(r)?.props[`aria-valuenow`]===void 0)throw Error(`"aria-valuenow" is not supported on role "`+r+`".`);if(x!==void 0&&q.roles.get(r)?.props[`aria-valuemax`]===void 0)throw Error(`"aria-valuemax" is not supported on role "`+r+`".`);if(b!==void 0&&q.roles.get(r)?.props[`aria-valuemin`]===void 0)throw Error(`"aria-valuemin" is not supported on role "`+r+`".`);if(S!==void 0&&q.roles.get(r)?.props[`aria-valuetext`]===void 0)throw Error(`"aria-valuetext" is not supported on role "`+r+`".`);if(_!==void 0&&q.roles.get(r)?.props[`aria-expanded`]===void 0)throw Error(`"aria-expanded" is not supported on role "`+r+`".`);let C=new WeakMap;function cachedIsSubtreeInaccessible(t){return C.has(t)||C.set(t,isSubtreeInaccessible(t)),C.get(t)}return Array.from(t.querySelectorAll(makeRoleSelector(r))).filter(t=>{if(t.hasAttribute(`role`)){let i=t.getAttribute(`role`);if(l)return i.split(` `).filter(Boolean).some(t=>t===r);let[a]=i.split(` `);return a===r}return getImplicitAriaRoles(t).some(t=>t===r)}).filter(t=>{if(u!==void 0)return u===computeAriaSelected(t);if(d!==void 0)return d===computeAriaBusy(t);if(p!==void 0)return p===computeAriaChecked(t);if(m!==void 0)return m===computeAriaPressed(t);if(h!==void 0)return h===computeAriaCurrent(t);if(_!==void 0)return _===computeAriaExpanded(t);if(g!==void 0)return g===computeHeadingLevel(t);if(v!==void 0||x!==void 0||b!==void 0||S!==void 0){let r=!0;return v!==void 0&&(r&&=v===computeAriaValueNow(t)),x!==void 0&&(r&&=x===computeAriaValueMax(t)),b!==void 0&&(r&&=b===computeAriaValueMin(t)),S!==void 0&&(r&&=matches(computeAriaValueText(t)??null,t,S,t=>t)),r}return!0}).filter(t=>o===void 0
|
|
54
|
+
`),t):getConfig$1().getElementError(`Found a label with the text of: `+r+`, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.`,t)}else throw getConfig$1().getElementError(`Unable to find a label with the text of: `+r,t)}return a};function getTagNameOfElementAssociatedWithLabelViaFor(t,r){let i=r.getAttribute(`for`);if(!i)return null;let a=t.querySelector(`[id="`+i+`"]`);return a?a.tagName.toLowerCase():null}const getMultipleError$7=(t,r)=>`Found multiple elements with the text of: `+r,Ln=wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText,getMultipleError$7),queryAllByLabelText.name,`query`),Rn=makeSingleQuery(getAllByLabelText,getMultipleError$7),zn=makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText,getAllByLabelText.name,`findAll`)),Bn=makeFindQuery(wrapSingleQueryWithSuggestion(Rn,getAllByLabelText.name,`find`)),Vn=wrapAllByQueryWithSuggestion(getAllByLabelText,getAllByLabelText.name,`getAll`),Hn=wrapSingleQueryWithSuggestion(Rn,getAllByLabelText.name,`get`),Un=wrapAllByQueryWithSuggestion(queryAllByLabelText,queryAllByLabelText.name,`queryAll`),queryAllByPlaceholderText=function(){var t=[...arguments];return checkContainerType(t[0]),queryAllByAttribute(`placeholder`,...t)},getMultipleError$6=(t,r)=>`Found multiple elements with the placeholder text of: `+r,getMissingError$6=(t,r)=>`Unable to find an element with the placeholder text of: `+r,Wn=wrapAllByQueryWithSuggestion(queryAllByPlaceholderText,queryAllByPlaceholderText.name,`queryAll`),[Gn,Kn,qn,Jn,Yn]=buildQueries(queryAllByPlaceholderText,getMultipleError$6,getMissingError$6),queryAllByText=function(t,r,i){let{selector:a=`*`,exact:o=!0,collapseWhitespace:c,trim:l,ignore:u=getConfig$1().defaultIgnore,normalizer:d}=i===void 0?{}:i;checkContainerType(t);let p=o?matches:fuzzyMatches,m=makeNormalizer({collapseWhitespace:c,trim:l,normalizer:d}),h=[];return typeof t.matches==`function`&&t.matches(a)&&(h=[t]),[...h,...Array.from(t.querySelectorAll(a))].filter(t=>!u||!t.matches(u)).filter(t=>p(getNodeText(t),t,r,m))},getMultipleError$5=(t,r)=>`Found multiple elements with the text: `+r,getMissingError$5=function(t,r,i){i===void 0&&(i={});let{collapseWhitespace:a,trim:o,normalizer:c,selector:l}=i,u=makeNormalizer({collapseWhitespace:a,trim:o,normalizer:c})(r.toString()),d=u!==r.toString(),p=(l??`*`)!==`*`;return`Unable to find an element with the text: `+(d?u+` (normalized from '`+r+`')`:r)+(p?`, which matches selector '`+l+`'`:``)+`. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.`},Xn=wrapAllByQueryWithSuggestion(queryAllByText,queryAllByText.name,`queryAll`),[Zn,Qn,$n,er,tr]=buildQueries(queryAllByText,getMultipleError$5,getMissingError$5),queryAllByDisplayValue=function(t,r,i){let{exact:a=!0,collapseWhitespace:o,trim:c,normalizer:l}=i===void 0?{}:i;checkContainerType(t);let u=a?matches:fuzzyMatches,d=makeNormalizer({collapseWhitespace:o,trim:c,normalizer:l});return Array.from(t.querySelectorAll(`input,textarea,select`)).filter(t=>t.tagName===`SELECT`?Array.from(t.options).filter(t=>t.selected).some(t=>u(getNodeText(t),t,r,d)):u(t.value,t,r,d))},getMultipleError$4=(t,r)=>`Found multiple elements with the display value: `+r+`.`,getMissingError$4=(t,r)=>`Unable to find an element with the display value: `+r+`.`,nr=wrapAllByQueryWithSuggestion(queryAllByDisplayValue,queryAllByDisplayValue.name,`queryAll`),[rr,ir,ar,or,sr]=buildQueries(queryAllByDisplayValue,getMultipleError$4,getMissingError$4),cr=/^(img|input|area|.+-.+)$/i,queryAllByAltText=function(t,r,i){return i===void 0&&(i={}),checkContainerType(t),queryAllByAttribute(`alt`,t,r,i).filter(t=>cr.test(t.tagName))},getMultipleError$3=(t,r)=>`Found multiple elements with the alt text: `+r,getMissingError$3=(t,r)=>`Unable to find an element with the alt text: `+r,lr=wrapAllByQueryWithSuggestion(queryAllByAltText,queryAllByAltText.name,`queryAll`),[ur,dr,fr,pr,mr]=buildQueries(queryAllByAltText,getMultipleError$3,getMissingError$3),isSvgTitle=t=>t.tagName.toLowerCase()===`title`&&t.parentElement?.tagName.toLowerCase()===`svg`,queryAllByTitle=function(t,r,i){let{exact:a=!0,collapseWhitespace:o,trim:c,normalizer:l}=i===void 0?{}:i;checkContainerType(t);let u=a?matches:fuzzyMatches,d=makeNormalizer({collapseWhitespace:o,trim:c,normalizer:l});return Array.from(t.querySelectorAll(`[title], svg > title`)).filter(t=>u(t.getAttribute(`title`),t,r,d)||isSvgTitle(t)&&u(getNodeText(t),t,r,d))},getMultipleError$2=(t,r)=>`Found multiple elements with the title: `+r+`.`,getMissingError$2=(t,r)=>`Unable to find an element with the title: `+r+`.`,hr=wrapAllByQueryWithSuggestion(queryAllByTitle,queryAllByTitle.name,`queryAll`),[gr,_r,vr,yr,br]=buildQueries(queryAllByTitle,getMultipleError$2,getMissingError$2),queryAllByRole=function(t,r,i){let{hidden:a=getConfig$1().defaultHidden,name:o,description:c,queryFallbacks:l=!1,selected:u,busy:d,checked:p,pressed:m,current:h,level:g,expanded:_,value:{now:v,min:b,max:x,text:S}={}}=i===void 0?{}:i;if(checkContainerType(t),u!==void 0&&q.roles.get(r)?.props[`aria-selected`]===void 0)throw Error(`"aria-selected" is not supported on role "`+r+`".`);if(d!==void 0&&q.roles.get(r)?.props[`aria-busy`]===void 0)throw Error(`"aria-busy" is not supported on role "`+r+`".`);if(p!==void 0&&q.roles.get(r)?.props[`aria-checked`]===void 0)throw Error(`"aria-checked" is not supported on role "`+r+`".`);if(m!==void 0&&q.roles.get(r)?.props[`aria-pressed`]===void 0)throw Error(`"aria-pressed" is not supported on role "`+r+`".`);if(h!==void 0&&q.roles.get(r)?.props[`aria-current`]===void 0)throw Error(`"aria-current" is not supported on role "`+r+`".`);if(g!==void 0&&r!==`heading`)throw Error(`Role "`+r+`" cannot have "level" property.`);if(v!==void 0&&q.roles.get(r)?.props[`aria-valuenow`]===void 0)throw Error(`"aria-valuenow" is not supported on role "`+r+`".`);if(x!==void 0&&q.roles.get(r)?.props[`aria-valuemax`]===void 0)throw Error(`"aria-valuemax" is not supported on role "`+r+`".`);if(b!==void 0&&q.roles.get(r)?.props[`aria-valuemin`]===void 0)throw Error(`"aria-valuemin" is not supported on role "`+r+`".`);if(S!==void 0&&q.roles.get(r)?.props[`aria-valuetext`]===void 0)throw Error(`"aria-valuetext" is not supported on role "`+r+`".`);if(_!==void 0&&q.roles.get(r)?.props[`aria-expanded`]===void 0)throw Error(`"aria-expanded" is not supported on role "`+r+`".`);let C=new WeakMap;function cachedIsSubtreeInaccessible(t){return C.has(t)||C.set(t,isSubtreeInaccessible(t)),C.get(t)}return Array.from(t.querySelectorAll(makeRoleSelector(r))).filter(t=>{if(t.hasAttribute(`role`)){let i=t.getAttribute(`role`);if(l)return i.split(` `).filter(Boolean).some(t=>t===r);let[a]=i.split(` `);return a===r}return getImplicitAriaRoles(t).some(t=>t===r)}).filter(t=>{if(u!==void 0)return u===computeAriaSelected(t);if(d!==void 0)return d===computeAriaBusy(t);if(p!==void 0)return p===computeAriaChecked(t);if(m!==void 0)return m===computeAriaPressed(t);if(h!==void 0)return h===computeAriaCurrent(t);if(_!==void 0)return _===computeAriaExpanded(t);if(g!==void 0)return g===computeHeadingLevel(t);if(v!==void 0||x!==void 0||b!==void 0||S!==void 0){let r=!0;return v!==void 0&&(r&&=v===computeAriaValueNow(t)),x!==void 0&&(r&&=x===computeAriaValueMax(t)),b!==void 0&&(r&&=b===computeAriaValueMin(t)),S!==void 0&&(r&&=matches(computeAriaValueText(t)??null,t,S,t=>t)),r}return!0}).filter(t=>o===void 0||matches(computeAccessibleName(t,{computedStyleSupportsPseudoElements:getConfig$1().computedStyleSupportsPseudoElements}),t,o,t=>t)).filter(t=>c===void 0||matches(computeAccessibleDescription(t,{computedStyleSupportsPseudoElements:getConfig$1().computedStyleSupportsPseudoElements}),t,c,t=>t)).filter(t=>a!==!1||isInaccessible(t,{isSubtreeInaccessible:cachedIsSubtreeInaccessible})===!1)};function makeRoleSelector(t){let r=`*[role~="`+t+`"]`,i=q.roleElements.get(t)??new Set,a=new Set(Array.from(i).map(t=>{let{name:r}=t;return r}));return[r].concat(Array.from(a)).join(`,`)}const getNameHint=t=>{let r=``;return r=t===void 0?``:typeof t==`string`?` and name "`+t+`"`:" and name `"+t+"`",r},getMultipleError$1=function(t,r,i){let{name:a}=i===void 0?{}:i;return`Found multiple elements with the role "`+r+`"`+getNameHint(a)},getMissingError$1=function(t,r,i){let{hidden:a=getConfig$1().defaultHidden,name:o,description:c}=i===void 0?{}:i;if(getConfig$1()._disableExpensiveErrorDiagnostics)return`Unable to find role="`+r+`"`+getNameHint(o);let l=``;Array.from(t.children).forEach(t=>{l+=prettyRoles(t,{hidden:a,includeDescription:c!==void 0})});let u;u=l.length===0?a===!1?"There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole":`There are no available roles.`:(`
|
|
55
55
|
Here are the `+(a===!1?`accessible`:`available`)+` roles:
|
|
56
56
|
|
|
57
57
|
`+l.replace(/\n/g,`
|
|
@@ -61,8 +61,8 @@ Here are the `+(a===!1?`accessible`:`available`)+` roles:
|
|
|
61
61
|
`).trim();let d=``;d=o===void 0?``:typeof o==`string`?` and name "`+o+`"`:" and name `"+o+"`";let p=``;return p=c===void 0?``:typeof c==`string`?` and description "`+c+`"`:" and description `"+c+"`",(`
|
|
62
62
|
Unable to find an `+(a===!1?`accessible `:``)+`element with the role "`+r+`"`+d+p+`
|
|
63
63
|
|
|
64
|
-
`+u).trim()},xr=wrapAllByQueryWithSuggestion(queryAllByRole,queryAllByRole.name,`queryAll`),[Sr,Cr,wr,Tr,Er]=buildQueries(queryAllByRole,getMultipleError$1,getMissingError$1),getTestIdAttribute=()=>getConfig$1().testIdAttribute,queryAllByTestId=function(){var t=[...arguments];return checkContainerType(t[0]),queryAllByAttribute(getTestIdAttribute(),...t)},getMultipleError=(t,r)=>`Found multiple elements by: [`+getTestIdAttribute()+`="`+r+`"]`,getMissingError=(t,r)=>`Unable to find an element by: [`+getTestIdAttribute()+`="`+r+`"]`,Dr=wrapAllByQueryWithSuggestion(queryAllByTestId,queryAllByTestId.name,`queryAll`),[Or,kr,Ar,jr,Mr]=buildQueries(queryAllByTestId,getMultipleError,getMissingError);var Z=Object.freeze({__proto__:null,queryAllByLabelText:Un,queryByLabelText:Ln,getAllByLabelText:Vn,getByLabelText:Hn,findAllByLabelText:zn,findByLabelText:Bn,queryByPlaceholderText:Gn,queryAllByPlaceholderText:Wn,getByPlaceholderText:qn,getAllByPlaceholderText:Kn,findAllByPlaceholderText:Jn,findByPlaceholderText:Yn,queryByText:Zn,queryAllByText:Xn,getByText:$n,getAllByText:Qn,findAllByText:er,findByText:tr,queryByDisplayValue:rr,queryAllByDisplayValue:nr,getByDisplayValue:ar,getAllByDisplayValue:ir,findAllByDisplayValue:or,findByDisplayValue:sr,queryByAltText:ur,queryAllByAltText:lr,getByAltText:fr,getAllByAltText:dr,findAllByAltText:pr,findByAltText:mr,queryByTitle:gr,queryAllByTitle:hr,getByTitle:vr,getAllByTitle:_r,findAllByTitle:yr,findByTitle:br,queryByRole:Sr,queryAllByRole:xr,getAllByRole:Cr,getByRole:wr,findAllByRole:Tr,findByRole:Er,queryByTestId:Or,queryAllByTestId:Dr,getByTestId:Ar,getAllByTestId:kr,findAllByTestId:jr,findByTestId:Mr});function getQueriesForElement(t,r,i){return r===void 0&&(r=Z),i===void 0&&(i={}),Object.keys(r).reduce((i,a)=>(i[a]=r[a].bind(null,t),i),i)}const Nr={copy:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},cut:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},paste:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionEnd:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionStart:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionUpdate:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},keyDown:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyPress:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyUp:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},focus:{EventType:`FocusEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},blur:{EventType:`FocusEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},focusIn:{EventType:`FocusEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},focusOut:{EventType:`FocusEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},change:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!1}},input:{EventType:`InputEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},invalid:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!0}},submit:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!0}},reset:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!0}},click:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,button:0,composed:!0}},contextMenu:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dblClick:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drag:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragEnd:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragEnter:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragExit:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragLeave:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragOver:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragStart:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drop:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseDown:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseEnter:{EventType:`MouseEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseLeave:{EventType:`MouseEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseMove:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOut:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOver:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseUp:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},select:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!1}},touchCancel:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},touchEnd:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchMove:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchStart:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},resize:{EventType:`UIEvent`,defaultInit:{bubbles:!1,cancelable:!1}},scroll:{EventType:`UIEvent`,defaultInit:{bubbles:!1,cancelable:!1}},wheel:{EventType:`WheelEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},abort:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},canPlay:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},canPlayThrough:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},durationChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},emptied:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},encrypted:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},ended:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadedData:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadedMetadata:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadStart:{EventType:`ProgressEvent`,defaultInit:{bubbles:!1,cancelable:!1}},pause:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},play:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},playing:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},progress:{EventType:`ProgressEvent`,defaultInit:{bubbles:!1,cancelable:!1}},rateChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},seeked:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},seeking:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},stalled:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},suspend:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},timeUpdate:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},volumeChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},waiting:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},load:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},error:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},animationStart:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},animationEnd:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},animationIteration:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionCancel:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionEnd:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}},transitionRun:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionStart:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},pointerOver:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerEnter:{EventType:`PointerEvent`,defaultInit:{bubbles:!1,cancelable:!1}},pointerDown:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerMove:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerUp:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerCancel:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},pointerOut:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerLeave:{EventType:`PointerEvent`,defaultInit:{bubbles:!1,cancelable:!1}},gotPointerCapture:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},lostPointerCapture:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},popState:{EventType:`PopStateEvent`,defaultInit:{bubbles:!0,cancelable:!1}},offline:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},online:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},pageHide:{EventType:`PageTransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}},pageShow:{EventType:`PageTransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}}},Pr={doubleClick:`dblClick`};function fireEvent$1(t,r){return getConfig$1().eventWrapper(()=>{if(!r)throw Error(`Unable to fire an event - please provide an event object.`);if(!t)throw Error(`Unable to fire a "`+r.type+`" event - please provide a DOM element.`);return t.dispatchEvent(r)})}t(fireEvent$1,`fireEvent`);function createEvent(t,r,i,a){let{EventType:o=`Event`,defaultInit:c={}}=a===void 0?{}:a;if(!r)throw Error(`Unable to fire a "`+t+`" event - please provide a DOM element.`);let l={...c,...i},{target:{value:u,files:d,...p}={}}=l;u!==void 0&&setNativeValue(r,u),d!==void 0&&Object.defineProperty(r,"files",{configurable:!0,enumerable:!0,writable:!0,value:d}),Object.assign(r,p);let m=getWindowFromNode(r),h=m[o]||m.Event,g;if(typeof h==`function`)g=new h(t,l);else{g=m.document.createEvent(o);let{bubbles:r,cancelable:i,detail:a,...c}=l;g.initEvent(t,r,i,a),Object.keys(c).forEach(t=>{g[t]=c[t]})}return[`dataTransfer`,`clipboardData`].forEach(t=>{let r=l[t];typeof r==`object`&&(typeof m.DataTransfer==`function`?Object.defineProperty(g,t,{value:Object.getOwnPropertyNames(r).reduce((t,i)=>(Object.defineProperty(t,i,{value:r[i]}),t),new m.DataTransfer)}):Object.defineProperty(g,t,{value:r}))}),g}Object.keys(Nr).forEach(t=>{let{EventType:r,defaultInit:i}=Nr[t],a=t.toLowerCase();createEvent[t]=(t,o)=>createEvent(a,t,o,{EventType:r,defaultInit:i}),fireEvent$1[t]=(r,i)=>fireEvent$1(r,createEvent[t](r,i))});function setNativeValue(t,r){let{set:i}=Object.getOwnPropertyDescriptor(t,`value`)||{},{set:a}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),`value`)||{};if(a&&i!==a)a.call(t,r);else if(i)i.call(t,r);else throw Error(`The given element does not have a value setter`)}Object.keys(Pr).forEach(t=>{let r=Pr[t];fireEvent$1[t]=function(){return fireEvent$1[r](...arguments)}});function unindent(t){return t.replace(/[ \t]*[\n][ \t]*/g,`
|
|
64
|
+
`+u).trim()},xr=wrapAllByQueryWithSuggestion(queryAllByRole,queryAllByRole.name,`queryAll`),[Sr,Cr,wr,Tr,Er]=buildQueries(queryAllByRole,getMultipleError$1,getMissingError$1),getTestIdAttribute=()=>getConfig$1().testIdAttribute,queryAllByTestId=function(){var t=[...arguments];return checkContainerType(t[0]),queryAllByAttribute(getTestIdAttribute(),...t)},getMultipleError=(t,r)=>`Found multiple elements by: [`+getTestIdAttribute()+`="`+r+`"]`,getMissingError=(t,r)=>`Unable to find an element by: [`+getTestIdAttribute()+`="`+r+`"]`,Dr=wrapAllByQueryWithSuggestion(queryAllByTestId,queryAllByTestId.name,`queryAll`),[Or,kr,Ar,jr,Mr]=buildQueries(queryAllByTestId,getMultipleError,getMissingError);var Z=Object.freeze({__proto__:null,queryAllByLabelText:Un,queryByLabelText:Ln,getAllByLabelText:Vn,getByLabelText:Hn,findAllByLabelText:zn,findByLabelText:Bn,queryByPlaceholderText:Gn,queryAllByPlaceholderText:Wn,getByPlaceholderText:qn,getAllByPlaceholderText:Kn,findAllByPlaceholderText:Jn,findByPlaceholderText:Yn,queryByText:Zn,queryAllByText:Xn,getByText:$n,getAllByText:Qn,findAllByText:er,findByText:tr,queryByDisplayValue:rr,queryAllByDisplayValue:nr,getByDisplayValue:ar,getAllByDisplayValue:ir,findAllByDisplayValue:or,findByDisplayValue:sr,queryByAltText:ur,queryAllByAltText:lr,getByAltText:fr,getAllByAltText:dr,findAllByAltText:pr,findByAltText:mr,queryByTitle:gr,queryAllByTitle:hr,getByTitle:vr,getAllByTitle:_r,findAllByTitle:yr,findByTitle:br,queryByRole:Sr,queryAllByRole:xr,getAllByRole:Cr,getByRole:wr,findAllByRole:Tr,findByRole:Er,queryByTestId:Or,queryAllByTestId:Dr,getByTestId:Ar,getAllByTestId:kr,findAllByTestId:jr,findByTestId:Mr});function getQueriesForElement(t,r,i){return r===void 0&&(r=Z),i===void 0&&(i={}),Object.keys(r).reduce((i,a)=>(i[a]=r[a].bind(null,t),i),i)}const Nr={copy:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},cut:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},paste:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionEnd:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionStart:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionUpdate:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},keyDown:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyPress:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyUp:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},focus:{EventType:`FocusEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},blur:{EventType:`FocusEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},focusIn:{EventType:`FocusEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},focusOut:{EventType:`FocusEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},change:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!1}},input:{EventType:`InputEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},invalid:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!0}},submit:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!0}},reset:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!0}},click:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,button:0,composed:!0}},contextMenu:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dblClick:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drag:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragEnd:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragEnter:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragExit:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragLeave:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragOver:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragStart:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drop:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseDown:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseEnter:{EventType:`MouseEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseLeave:{EventType:`MouseEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseMove:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOut:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOver:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseUp:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},select:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!1}},touchCancel:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},touchEnd:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchMove:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchStart:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},resize:{EventType:`UIEvent`,defaultInit:{bubbles:!1,cancelable:!1}},scroll:{EventType:`UIEvent`,defaultInit:{bubbles:!1,cancelable:!1}},wheel:{EventType:`WheelEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},abort:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},canPlay:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},canPlayThrough:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},durationChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},emptied:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},encrypted:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},ended:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadedData:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadedMetadata:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadStart:{EventType:`ProgressEvent`,defaultInit:{bubbles:!1,cancelable:!1}},pause:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},play:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},playing:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},progress:{EventType:`ProgressEvent`,defaultInit:{bubbles:!1,cancelable:!1}},rateChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},seeked:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},seeking:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},stalled:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},suspend:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},timeUpdate:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},volumeChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},waiting:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},load:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},error:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},animationStart:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},animationEnd:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},animationIteration:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionCancel:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionEnd:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}},transitionRun:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionStart:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},pointerOver:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerEnter:{EventType:`PointerEvent`,defaultInit:{bubbles:!1,cancelable:!1}},pointerDown:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerMove:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerUp:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerCancel:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},pointerOut:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerLeave:{EventType:`PointerEvent`,defaultInit:{bubbles:!1,cancelable:!1}},gotPointerCapture:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},lostPointerCapture:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},popState:{EventType:`PopStateEvent`,defaultInit:{bubbles:!0,cancelable:!1}},offline:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},online:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},pageHide:{EventType:`PageTransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}},pageShow:{EventType:`PageTransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}}},Pr={doubleClick:`dblClick`};function fireEvent$1(t,r){return getConfig$1().eventWrapper(()=>{if(!r)throw Error(`Unable to fire an event - please provide an event object.`);if(!t)throw Error(`Unable to fire a "`+r.type+`" event - please provide a DOM element.`);return t.dispatchEvent(r)})}t(fireEvent$1,`fireEvent`);function createEvent(t,r,i,a){let{EventType:o=`Event`,defaultInit:c={}}=a===void 0?{}:a;if(!r)throw Error(`Unable to fire a "`+t+`" event - please provide a DOM element.`);let l={...c,...i},{target:{value:u,files:d,...p}={}}=l;u!==void 0&&setNativeValue(r,u),d!==void 0&&Object.defineProperty(r,"files",{configurable:!0,enumerable:!0,writable:!0,value:d}),Object.assign(r,p);let m=getWindowFromNode(r),h=m[o]||m.Event,g;if(typeof h==`function`)g=new h(t,l);else{g=m.document.createEvent(o);let{bubbles:r,cancelable:i,detail:a,...c}=l;g.initEvent(t,r,i,a),Object.keys(c).forEach(t=>{g[t]=c[t]})}return[`dataTransfer`,`clipboardData`].forEach(t=>{let r=l[t];typeof r==`object`&&(typeof m.DataTransfer==`function`?Object.defineProperty(g,t,{value:Object.getOwnPropertyNames(r).reduce((t,i)=>(Object.defineProperty(t,i,{value:r[i]}),t),new m.DataTransfer)}):Object.defineProperty(g,t,{value:r}))}),g}Object.keys(Nr).forEach(t=>{let{EventType:r,defaultInit:i}=Nr[t],a=t.toLowerCase();createEvent[t]=(t,o)=>createEvent(a,t,o,{EventType:r,defaultInit:i}),fireEvent$1[t]=(r,i)=>fireEvent$1(r,createEvent[t](r,i))});function setNativeValue(t,r){let{set:i}=Object.getOwnPropertyDescriptor(t,`value`)||{},a=Object.getPrototypeOf(t),{set:o}=Object.getOwnPropertyDescriptor(a,`value`)||{};if(o&&i!==o)o.call(t,r);else if(i)i.call(t,r);else throw Error(`The given element does not have a value setter`)}Object.keys(Pr).forEach(t=>{let r=Pr[t];fireEvent$1[t]=function(){return fireEvent$1[r](...arguments)}});function unindent(t){return t.replace(/[ \t]*[\n][ \t]*/g,`
|
|
65
65
|
`)}function encode(t){return An.default.compressToEncodedURIComponent(unindent(t))}function getPlaygroundUrl(t){return`https://testing-playground.com/#markup=`+encode(t)}const debug=(t,r,i)=>Array.isArray(t)?t.forEach(t=>logDOM(t,r,i)):logDOM(t,r,i),logTestingPlaygroundURL=function(t){if(t===void 0&&(t=getDocument().body),!t||!(`innerHTML`in t)){console.log(`The element you're providing isn't a valid DOM element.`);return}if(!t.innerHTML){console.log(`The provided element doesn't have any children.`);return}let r=getPlaygroundUrl(t.innerHTML);return console.log(`Open this URL in your browser
|
|
66
66
|
|
|
67
67
|
`+r),r},Fr={debug,logTestingPlaygroundURL},Ir=typeof document<`u`&&document.body?getQueriesForElement(document.body,Z,Fr):Object.keys(Z).reduce((t,r)=>(t[r]=()=>{throw TypeError(`For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error`)},t),Fr),Lr=typeof a.act==`function`?a.act:o.act;function getGlobalThis(){if(typeof globalThis<`u`)return globalThis;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)}function setIsReactActEnvironment(t){getGlobalThis().IS_REACT_ACT_ENVIRONMENT=t}function getIsReactActEnvironment(){return getGlobalThis().IS_REACT_ACT_ENVIRONMENT}function withGlobalActEnvironment(t){return r=>{let i=getIsReactActEnvironment();setIsReactActEnvironment(!0);try{let a=!1,o=t(()=>{let t=r();return typeof t==`object`&&t&&typeof t.then==`function`&&(a=!0),t});if(a){let t=o;return{then:(r,a)=>{t.then(t=>{setIsReactActEnvironment(i),r(t)},t=>{setIsReactActEnvironment(i),a(t)})}}}else return setIsReactActEnvironment(i),o}catch(t){throw setIsReactActEnvironment(i),t}}}const Q=withGlobalActEnvironment(Lr),fireEvent=(...t)=>fireEvent$1(...t);Object.keys(fireEvent$1).forEach(t=>{fireEvent[t]=(...r)=>fireEvent$1[t](...r)});const Rr=fireEvent.mouseEnter,zr=fireEvent.mouseLeave;fireEvent.mouseEnter=(...t)=>(Rr(...t),fireEvent.mouseOver(...t)),fireEvent.mouseLeave=(...t)=>(zr(...t),fireEvent.mouseOut(...t));const Br=fireEvent.pointerEnter,Vr=fireEvent.pointerLeave;fireEvent.pointerEnter=(...t)=>(Br(...t),fireEvent.pointerOver(...t)),fireEvent.pointerLeave=(...t)=>(Vr(...t),fireEvent.pointerOut(...t));const Hr=fireEvent.select;fireEvent.select=(t,r)=>{Hr(t,r),t.focus(),fireEvent.keyUp(t,r)};const Ur=fireEvent.blur,Wr=fireEvent.focus;fireEvent.blur=(...t)=>(fireEvent.focusOut(...t),Ur(...t)),fireEvent.focus=(...t)=>(fireEvent.focusIn(...t),Wr(...t));let Gr={reactStrictMode:!1};function getConfig(){return{...getConfig$1(),...Gr}}function jestFakeTimersAreEnabled(){return typeof jest<`u`&&jest!==null?setTimeout._isMockFunction===!0||Object.prototype.hasOwnProperty.call(setTimeout,`clock`):!1}configure({unstable_advanceTimersWrapper:t=>Q(t),asyncWrapper:async t=>{let r=getIsReactActEnvironment();setIsReactActEnvironment(!1);try{let r=await t();return await new Promise(t=>{setTimeout(()=>{t()},0),jestFakeTimersAreEnabled()&&jest.advanceTimersByTime(0)}),r}finally{setIsReactActEnvironment(r)}},eventWrapper:t=>{let r;return Q(()=>{r=t()}),r}});const Kr=new Set,$=[];function strictModeIfNeeded(t,r){return r??getConfig().reactStrictMode?a.createElement(a.StrictMode,null,t):t}function wrapUiIfNeeded(t,r){return r?a.createElement(r,null,t):t}function createConcurrentRoot(t,{hydrate:r,onCaughtError:i,onRecoverableError:a,ui:o,wrapper:c,reactStrictMode:u}){let d;return r?Q(()=>{d=l.hydrateRoot(t,strictModeIfNeeded(wrapUiIfNeeded(o,c),u),{onCaughtError:i,onRecoverableError:a})}):d=l.createRoot(t,{onCaughtError:i,onRecoverableError:a}),{hydrate(){if(!r)throw Error("Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.")},render(t){d.render(t)},unmount(){d.unmount()}}}function createLegacyRoot(t){return{hydrate(r){c.hydrate(r,t)},render(r){c.render(r,t)},unmount(){c.unmountComponentAtNode(t)}}}function renderRoot(t,{baseElement:r,container:i,hydrate:a,queries:o,root:c,wrapper:l,reactStrictMode:u}){return Q(()=>{a?c.hydrate(strictModeIfNeeded(wrapUiIfNeeded(t,l),u),i):c.render(strictModeIfNeeded(wrapUiIfNeeded(t,l),u),i)}),{container:i,baseElement:r,debug:(t=r,i,a)=>Array.isArray(t)?t.forEach(t=>console.log(prettyDOM(t,i,a))):console.log(prettyDOM(t,i,a)),unmount:()=>{Q(()=>{c.unmount()})},rerender:t=>{renderRoot(t,{container:i,baseElement:r,root:c,wrapper:l,reactStrictMode:u})},asFragment:()=>{if(typeof document.createRange==`function`)return document.createRange().createContextualFragment(i.innerHTML);{let t=document.createElement(`template`);return t.innerHTML=i.innerHTML,t.content}},...getQueriesForElement(r,o)}}function render(t,{container:r,baseElement:i=r,legacyRoot:a=!1,onCaughtError:o,onUncaughtError:l,onRecoverableError:u,queries:d,hydrate:p=!1,wrapper:m,reactStrictMode:h}={}){if(l!==void 0)throw Error("onUncaughtError is not supported. The `render` call will already throw on uncaught errors.");if(a&&typeof c.render!=`function`){let t=Error("`legacyRoot: true` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.");throw Error.captureStackTrace(t,render),t}i||=document.body,r||=i.appendChild(document.createElement(`div`));let g;return Kr.has(r)?$.forEach(t=>{t.container===r&&(g=t.root)}):(g=(a?createLegacyRoot:createConcurrentRoot)(r,{hydrate:p,onCaughtError:o,onRecoverableError:u,ui:t,wrapper:m,reactStrictMode:h}),$.push({container:r,root:g}),Kr.add(r)),renderRoot(t,{container:r,baseElement:i,queries:d,hydrate:p,wrapper:m,root:g,reactStrictMode:h})}function cleanup(){$.forEach(({root:t,container:r})=>{Q(()=>{t.unmount()}),r.parentNode===document.body&&document.body.removeChild(r)}),$.length=0,Kr.clear()}function renderHook(t,r={}){let{initialProps:i,...o}=r;if(o.legacyRoot&&typeof c.render!=`function`){let t=Error("`legacyRoot: true` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.");throw Error.captureStackTrace(t,renderHook),t}let l=a.createRef();function TestComponent({renderCallbackProps:r}){let i=t(r);return a.useEffect(()=>{l.current=i}),null}let{rerender:u,unmount:d}=render(a.createElement(TestComponent,{renderCallbackProps:i}),o);function rerender(t){return u(a.createElement(TestComponent,{renderCallbackProps:t}))}return{result:l,rerender,unmount:d}}if((typeof process>`u`||!process.env?.RTL_SKIP_AUTO_CLEANUP)&&(typeof afterEach==`function`?afterEach(()=>{cleanup()}):typeof teardown==`function`&&teardown(()=>{cleanup()}),typeof beforeAll==`function`&&typeof afterAll==`function`)){let t=getIsReactActEnvironment();beforeAll(()=>{t=getIsReactActEnvironment(),setIsReactActEnvironment(!0)}),afterAll(()=>{setIsReactActEnvironment(t)})}export{Ir as a,renderHook as i,fireEvent as n,render as r,Q as t};
|
|
68
|
-
//# sourceMappingURL=react.esm-
|
|
68
|
+
//# sourceMappingURL=react.esm-D5AipFQb.js.map
|