dom-testing-library
Advanced tools
Comparing version 3.16.1 to 3.16.2
@@ -81,2 +81,16 @@ "use strict"; | ||
}); | ||
test('can get input elements with type submit or button', () => { | ||
const { | ||
queryByText | ||
} = (0, _testUtils.render)(` | ||
<div> | ||
<input type="submit" value="Send data"/> | ||
<input type="button" value="Push me!"/> | ||
<input type="text" value="user data" /> | ||
</div> | ||
`); | ||
expect(queryByText('Send data')).toBeTruthy(); | ||
expect(queryByText('Push me!')).toBeTruthy(); | ||
expect(queryByText('user data')).toBeFalsy(); | ||
}); | ||
test('matches case with RegExp matcher', () => { | ||
@@ -83,0 +97,0 @@ const { |
@@ -94,2 +94,7 @@ 'use strict'; | ||
var window = node.ownerDocument.defaultView; | ||
if (node.matches('input[type=submit], input[type=button]')) { | ||
return node.value; | ||
} | ||
return Array.from(node.childNodes).filter(function (child) { | ||
@@ -96,0 +101,0 @@ return child.nodeType === window.Node.TEXT_NODE && Boolean(child.textContent); |
@@ -88,2 +88,7 @@ import _extends from '@babel/runtime/helpers/esm/extends'; | ||
var window = node.ownerDocument.defaultView; | ||
if (node.matches('input[type=submit], input[type=button]')) { | ||
return node.value; | ||
} | ||
return Array.from(node.childNodes).filter(function (child) { | ||
@@ -90,0 +95,0 @@ return child.nodeType === window.Node.TEXT_NODE && Boolean(child.textContent); |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.DomTestingLibrary={})}(this,function(e){"use strict";function t(e,t,n,r){if("string"!=typeof e)return!1;var a=r(e);return"string"==typeof n?a.toLowerCase().includes(n.toLowerCase()):"function"==typeof n?n(a,t):n.test(a)}function n(e,t,n,r){if("string"!=typeof e)return!1;var a=r(e);return"string"==typeof n?a===n:"function"==typeof n?n(a,t):n.test(a)}function r(e){var t=void 0===e?{}:e,n=t.trim,r=void 0===n||n,a=t.collapseWhitespace,o=void 0===a||a;return function(e){var t=e;return t=r?t.trim():t,t=o?t.replace(/\s+/g," "):t}}function a(e){var t=e.trim,n=e.collapseWhitespace,a=e.normalizer;if(a){if(void 0!==t||void 0!==n)throw new 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}return r({trim:t,collapseWhitespace:n})}function o(e){var t=e.ownerDocument.defaultView;return Array.from(e.childNodes).filter(function(e){return e.nodeType===t.Node.TEXT_NODE&&Boolean(e.textContent)}).map(function(e){return e.textContent}).join("")}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){return(c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&u(a,n.prototype),a}).apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return c(e,arguments,i(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)})(e)}var f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}var b={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},v=d(function(e){var t={};for(var n in b)b.hasOwnProperty(n)&&(t[b[n]]=n);var r=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in r)if(r.hasOwnProperty(a)){if(!("channels"in r[a]))throw new Error("missing channels property: "+a);if(!("labels"in r[a]))throw new Error("missing channel labels property: "+a);if(r[a].labels.length!==r[a].channels)throw new Error("channel and label counts mismatch: "+a);var o=r[a].channels,l=r[a].labels;delete r[a].channels,delete r[a].labels,Object.defineProperty(r[a],"channels",{value:o}),Object.defineProperty(r[a],"labels",{value:l})}r.rgb.hsl=function(e){var t,n,r=e[0]/255,a=e[1]/255,o=e[2]/255,l=Math.min(r,a,o),i=Math.max(r,a,o),u=i-l;return i===l?t=0:r===i?t=(a-o)/u:a===i?t=2+(o-r)/u:o===i&&(t=4+(r-a)/u),(t=Math.min(60*t,360))<0&&(t+=360),n=(l+i)/2,[t,100*(i===l?0:n<=.5?u/(i+l):u/(2-i-l)),100*n]},r.rgb.hsv=function(e){var t,n,r,a,o,l=e[0]/255,i=e[1]/255,u=e[2]/255,c=Math.max(l,i,u),s=c-Math.min(l,i,u),f=function(e){return(c-e)/6/s+.5};return 0===s?a=o=0:(o=s/c,t=f(l),n=f(i),r=f(u),l===c?a=r-n:i===c?a=1/3+t-r:u===c&&(a=2/3+n-t),a<0?a+=1:a>1&&(a-=1)),[360*a,100*o,100*c]},r.rgb.hwb=function(e){var t=e[0],n=e[1],a=e[2];return[r.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,a))),100*(a=1-1/255*Math.max(t,Math.max(n,a)))]},r.rgb.cmyk=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(1-t,1-n,1-r);return[100*((1-t-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*((1-r-a)/(1-a)||0),100*a]},r.rgb.keyword=function(e){var n=t[e];if(n)return n;var r,a,o,l=1/0;for(var i in b)if(b.hasOwnProperty(i)){var u=b[i],c=(a=e,o=u,Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)+Math.pow(a[2]-o[2],2));c<l&&(l=c,r=i)}return r},r.keyword.rgb=function(e){return b[e]},r.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},r.rgb.lab=function(e){var t=r.rgb.xyz(e),n=t[0],a=t[1],o=t[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},r.hsl.rgb=function(e){var t,n,r,a,o,l=e[0]/360,i=e[1]/100,u=e[2]/100;if(0===i)return[o=255*u,o,o];t=2*u-(n=u<.5?u*(1+i):u+i-u*i),a=[0,0,0];for(var c=0;c<3;c++)(r=l+1/3*-(c-1))<0&&r++,r>1&&r--,o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[c]=255*o;return a},r.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,a=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,a*=o<=1?o:2-o,[t,100*(0===r?2*a/(o+a):2*n/(r+n)),100*((r+n)/2)]},r.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,a=Math.floor(t)%6,o=t-Math.floor(t),l=255*r*(1-n),i=255*r*(1-n*o),u=255*r*(1-n*(1-o));switch(r*=255,a){case 0:return[r,u,l];case 1:return[i,r,l];case 2:return[l,r,u];case 3:return[l,i,r];case 4:return[u,l,r];case 5:return[r,l,i]}},r.hsv.hsl=function(e){var t,n,r=e[0],a=e[1]/100,o=e[2]/100,l=Math.max(o,.01),i=(2-a)*o;return n=a*l,[r,100*(n=(n/=(t=(2-a)*l)<=1?t:2-t)||0),100*(i/=2)]},r.hwb.rgb=function(e){var t,n,r,a,o,l,i,u=e[0]/360,c=e[1]/100,s=e[2]/100,f=c+s;switch(f>1&&(c/=f,s/=f),r=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(r=1-r),a=c+r*((n=1-s)-c),t){default:case 6:case 0:o=n,l=a,i=c;break;case 1:o=a,l=n,i=c;break;case 2:o=c,l=n,i=a;break;case 3:o=c,l=a,i=n;break;case 4:o=a,l=c,i=n;break;case 5:o=n,l=c,i=a}return[255*o,255*l,255*i]},r.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a))]},r.xyz.rgb=function(e){var t,n,r,a=e[0]/100,o=e[1]/100,l=e[2]/100;return n=-.9689*a+1.8758*o+.0415*l,r=.0557*a+-.204*o+1.057*l,t=(t=3.2406*a+-1.5372*o+-.4986*l)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},r.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},r.lab.xyz=function(e){var t,n,r,a=e[0];t=e[1]/500+(n=(a+16)/116),r=n-e[2]/200;var o=Math.pow(n,3),l=Math.pow(t,3),i=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,t=l>.008856?l:(t-16/116)/7.787,r=i>.008856?i:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},r.lab.lch=function(e){var t,n=e[0],r=e[1],a=e[2];return(t=360*Math.atan2(a,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+a*a),t]},r.lch.lab=function(e){var t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},r.rgb.ansi16=function(e){var t=e[0],n=e[1],a=e[2],o=1 in arguments?arguments[1]:r.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var l=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===o&&(l+=60),l},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},r.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},r.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},r.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map(function(e){return e+e}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},r.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.max(Math.max(n,r),a),l=Math.min(Math.min(n,r),a),i=o-l;return t=i<=0?0:o===n?(r-a)/i%6:o===r?2+(a-n)/i:4+(n-r)/i+4,t/=6,[360*(t%=1),100*i,100*(i<1?l/(1-i):0)]},r.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,a=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(a=(n-.5*r)/(1-r)),[e[0],100*r,100*a]},r.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},r.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var a,o=[0,0,0],l=t%1*6,i=l%1,u=1-i;switch(Math.floor(l)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=u,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=u,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=u}return a=(1-n)*r,[255*(n*o[0]+a),255*(n*o[1]+a),255*(n*o[2]+a)]},r.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},r.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},r.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},r.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=r.gray.hsv=function(e){return[0,0,e[0]]},r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});v.rgb,v.hsl,v.hsv,v.hwb,v.cmyk,v.xyz,v.lab,v.lch,v.hex,v.keyword,v.ansi16,v.ansi256,v.hcg,v.apple,v.gray;function y(e){var t=function(){for(var e={},t=Object.keys(v),n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var r=n.pop(),a=Object.keys(v[r]),o=a.length,l=0;l<o;l++){var i=a[l],u=t[i];-1===u.distance&&(u.distance=t[r].distance+1,u.parent=r,n.unshift(i))}return t}function h(e,t){return function(n){return t(e(n))}}function g(e,t){for(var n=[t[e].parent,e],r=v[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),r=h(v[t[a].parent][a],r),a=t[a].parent;return r.conversion=n,r}var m={};Object.keys(v).forEach(function(e){m[e]={},Object.defineProperty(m[e],"channels",{value:v[e].channels}),Object.defineProperty(m[e],"labels",{value:v[e].labels});var t=function(e){for(var t=y(e),n={},r=Object.keys(t),a=r.length,o=0;o<a;o++){var l=r[o];null!==t[l].parent&&(n[l]=g(l,t))}return n}(e);Object.keys(t).forEach(function(n){var r=t[n];m[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,a=0;a<r;a++)n[a]=Math.round(n[a]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),m[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)})});var w=m,E=d(function(e){var t=function(e,t){return function(){return"["+(e.apply(w,arguments)+t)+"m"}},n=function(e,t){return function(){var n=e.apply(w,arguments);return"["+(38+t)+";5;"+n+"m"}},r=function(e,t){return function(){var n=e.apply(w,arguments);return"["+(38+t)+";2;"+n[0]+";"+n[1]+";"+n[2]+"m"}};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){var e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.grey=a.color.gray;for(var o=Object.keys(a),l=0;l<o.length;l++){for(var i=o[l],u=a[i],c=Object.keys(u),s=0;s<c.length;s++){var f=c[s],p=u[f];a[f]={open:"["+p[0]+"m",close:"["+p[1]+"m"},u[f]=a[f],e.set(p[0],p[1])}Object.defineProperty(a,i,{value:u,enumerable:!1}),Object.defineProperty(a,"codes",{value:e,enumerable:!1})}var d=function(e){return e},b=function(e,t,n){return[e,t,n]};a.color.close="[39m",a.bgColor.close="[49m",a.color.ansi={ansi:t(d,0)},a.color.ansi256={ansi256:n(d,0)},a.color.ansi16m={rgb:r(b,0)},a.bgColor.ansi={ansi:t(d,10)},a.bgColor.ansi256={ansi256:n(d,10)},a.bgColor.ansi16m={rgb:r(b,10)};for(var v=Object.keys(w),y=0;y<v.length;y++){var h=v[y];if("object"==typeof w[h]){var g=w[h];"ansi16"===h&&(h="ansi"),"ansi16"in g&&(a.color.ansi[h]=t(g.ansi16,0),a.bgColor.ansi[h]=t(g.ansi16,10)),"ansi256"in g&&(a.color.ansi256[h]=n(g.ansi256,0),a.bgColor.ansi256[h]=n(g.ansi256,10)),"rgb"in g&&(a.color.ansi16m[h]=r(g.rgb,0),a.bgColor.ansi16m[h]=r(g.rgb,10))}}return a}})}),T=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.printIteratorEntries=function(e,t,n,r,a,o){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:": ",i="",u=e.next();if(!u.done){i+=t.spacingOuter;for(var c=n+t.indent;!u.done;){i+=c+o(u.value[0],t,c,r,a)+l+o(u.value[1],t,c,r,a),(u=e.next()).done?t.min||(i+=","):i+=","+t.spacingInner}i+=t.spacingOuter+n}return i},t.printIteratorValues=function(e,t,n,r,a,o){var l="",i=e.next();if(!i.done){l+=t.spacingOuter;for(var u=n+t.indent;!i.done;)l+=u+o(i.value,t,u,r,a),(i=e.next()).done?t.min||(l+=","):l+=","+t.spacingInner;l+=t.spacingOuter+n}return l},t.printListItems=function(e,t,n,r,a,o){var l="";if(e.length){l+=t.spacingOuter;for(var i=n+t.indent,u=0;u<e.length;u++)l+=i+o(e[u],t,i,r,a),u<e.length-1?l+=","+t.spacingInner:t.min||(l+=",");l+=t.spacingOuter+n}return l},t.printObjectProperties=function(e,t,a,o,l,i){var u="",c=Object.keys(e).sort(),s=n(e);if(s.length&&(c=c.filter(function(e){return!r(e)}).concat(s)),c.length){u+=t.spacingOuter;for(var f=a+t.indent,p=0;p<c.length;p++){var d=c[p];u+=f+i(d,t,f,o,l)+": "+i(e[d],t,f,o,l),p<c.length-1?u+=","+t.spacingInner:t.min||(u+=",")}u+=t.spacingOuter+a}return u};var n=Object.getOwnPropertySymbols||function(){return[]},r=function(e){return"symbol"==typeof e||"[object Symbol]"===toString.call(e)}});p(T);T.printIteratorEntries,T.printIteratorValues,T.printListItems,T.printObjectProperties;var A=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=void 0;var n=Symbol.for("jest.asymmetricMatcher"),r=t.serialize=function(e,t,n,r,a,o){var l=e.toString();return"ArrayContaining"===l||"ArrayNotContaining"===l?++r>t.maxDepth?"["+l+"]":l+" ["+(0,T.printListItems)(e.sample,t,n,r,a,o)+"]":"ObjectContaining"===l||"ObjectNotContaining"===l?++r>t.maxDepth?"["+l+"]":l+" {"+(0,T.printObjectProperties)(e.sample,t,n,r,a,o)+"}":"StringMatching"===l||"StringNotMatching"===l?l+" "+o(e.sample,t,n,r,a):"StringContaining"===l||"StringNotContaining"===l?l+" "+o(e.sample,t,n,r,a):e.toAsymmetricMatcher()},a=t.test=function(e){return e&&e.$$typeof===n};t.default={serialize:r,test:a}});p(A);A.test,A.serialize;var x=function(){var e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(e,"g")},M=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.test=void 0;var n=a(x),r=a(E);function a(e){return e&&e.__esModule?e:{default:e}}var o=t.test=function(e){return"string"==typeof e&&e.match((0,n.default)())},l=t.serialize=function(e,t,a,o,l,i){return i(e.replace((0,n.default)(),function(e){switch(e){case r.default.red.close:case r.default.green.close:case r.default.cyan.close:case r.default.gray.close:case r.default.white.close:case r.default.yellow.close:case r.default.bgRed.close:case r.default.bgGreen.close:case r.default.bgYellow.close:case r.default.inverse.close:case r.default.dim.close:case r.default.bold.close:case r.default.reset.open:case r.default.reset.close:return"</>";case r.default.red.open:return"<red>";case r.default.green.open:return"<green>";case r.default.cyan.open:return"<cyan>";case r.default.gray.open:return"<gray>";case r.default.white.open:return"<white>";case r.default.yellow.open:return"<yellow>";case r.default.bgRed.open:return"<bgRed>";case r.default.bgGreen.open:return"<bgGreen>";case r.default.bgYellow.open:return"<bgYellow>";case r.default.inverse.open:return"<inverse>";case r.default.dim.open:return"<dim>";case r.default.bold.open:return"<bold>";default:return""}}),t,a,o,l)};t.default={serialize:l,test:o}});p(M);M.serialize,M.test;var O=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.test=void 0;var n=["DOMStringMap","NamedNodeMap"],r=t.test=function(e){return e&&e.constructor&&-1!==n.indexOf(e.constructor.name)},a=t.serialize=function(e,t,n,r,a,o){return++r>t.maxDepth?"["+e.constructor.name+"]":e.constructor.name+" {"+(0,T.printObjectProperties)(function(e){var t={};if("NamedNodeMap"===e.constructor.name)for(var n=0;n<e.length;n++)t[e[n].name]=e[n].value;else t=Object.assign({},e);return t}(e),t,n,r,a,o)+"}"};t.default={serialize:a,test:r}});p(O);O.serialize,O.test;var I=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(/</g,"<").replace(/>/g,">")}});p(I);var B=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.printElementAsLeaf=t.printElement=t.printComment=t.printText=t.printChildren=t.printProps=void 0;var n,r=(n=I)&&n.__esModule?n:{default:n};t.printProps=function(e,t,n,r,a,o,l){var i=r+n.indent,u=n.colors;return e.map(function(e){var c=t[e],s=l(c,n,i,a,o);return"string"!=typeof c&&(-1!==s.indexOf("\n")&&(s=n.spacingOuter+i+s+n.spacingOuter+r),s="{"+s+"}"),n.spacingInner+r+u.prop.open+e+u.prop.close+"="+u.value.open+s+u.value.close}).join("")},t.printChildren=function(e,t,n,r,o,l){return e.map(function(e){return t.spacingOuter+n+("string"==typeof e?a(e,t):l(e,t,n,r,o))}).join("")};var a=t.printText=function(e,t){var n=t.colors.content;return n.open+(0,r.default)(e)+n.close};t.printComment=function(e,t){var n=t.colors.comment;return n.open+"\x3c!--"+(0,r.default)(e)+"--\x3e"+n.close},t.printElement=function(e,t,n,r,a){var o=r.colors.tag;return o.open+"<"+e+(t&&o.close+t+r.spacingOuter+a+o.open)+(n?">"+o.close+n+r.spacingOuter+a+o.open+"</"+e:(t&&!r.min?"":" ")+"/")+">"+o.close},t.printElementAsLeaf=function(e,t){var n=t.colors.tag;return n.open+"<"+e+n.close+" β¦"+n.open+" />"+n.close}});p(B);B.printElementAsLeaf,B.printElement,B.printComment,B.printText,B.printChildren,B.printProps;var _=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.test=void 0;var n=/^((HTML|SVG)\w*)?Element$/,r=t.test=function(e){return e&&e.constructor&&e.constructor.name&&(t=e.nodeType,r=e.constructor.name,1===t&&n.test(r)||3===t&&"Text"===r||8===t&&"Comment"===r||11===t&&"DocumentFragment"===r);var t,r},a=function(e){return e.name},o=function(e,t){return e[t.name]=t.value,e},l=t.serialize=function(e,t,n,r,l,i){if(3===e.nodeType)return(0,B.printText)(e.data,t);if(8===e.nodeType)return(0,B.printComment)(e.data,t);var u=11===e.nodeType?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?(0,B.printElementAsLeaf)(u,t):(0,B.printElement)(u,(0,B.printProps)(Array.prototype.map.call(e.attributes||[],a).sort(),Array.prototype.reduce.call(e.attributes||[],o,{}),t,n+t.indent,r,l,i),(0,B.printChildren)(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,l,i),t,n)};t.default={serialize:l,test:r}});p(_);_.serialize,_.test;var k=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=void 0;var n=function(e){return"Immutable."+e},r=function(e){return"["+e+"]"},a=function(e,t,a,o,l,i,u){return++o>t.maxDepth?r(n(u)):n(u)+" ["+(0,T.printIteratorValues)(e.values(),t,a,o,l,i)+"]"},o=t.serialize=function(e,t,o,l,i,u){return e["@@__IMMUTABLE_MAP__@@"]?function(e,t,a,o,l,i,u){return++o>t.maxDepth?r(n(u)):n(u)+" {"+(0,T.printIteratorEntries)(e.entries(),t,a,o,l,i)+"}"}(e,t,o,l,i,u,e["@@__IMMUTABLE_ORDERED__@@"]?"OrderedMap":"Map"):e["@@__IMMUTABLE_LIST__@@"]?a(e,t,o,l,i,u,"List"):e["@@__IMMUTABLE_SET__@@"]?a(e,t,o,l,i,u,e["@@__IMMUTABLE_ORDERED__@@"]?"OrderedSet":"Set"):e["@@__IMMUTABLE_STACK__@@"]?a(e,t,o,l,i,u,"Stack"):e["@@__IMMUTABLE_SEQ__@@"]?function(e,t,a,o,l,i){var u=n("Seq");return++o>t.maxDepth?r(u):e["@@__IMMUTABLE_KEYED__@@"]?u+" {"+(e._iter||e._object?(0,T.printIteratorEntries)(e.entries(),t,a,o,l,i):"β¦")+"}":u+" ["+(e._iter||e._array||e._collection||e._iterable?(0,T.printIteratorValues)(e.values(),t,a,o,l,i):"β¦")+"]"}(e,t,o,l,i,u):function(e,t,a,o,l,i){var u=n(e._name||"Record");return++o>t.maxDepth?r(u):u+" {"+(0,T.printIteratorEntries)(function(e){var t=0;return{next:function(){if(t<e._keys.length){var n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0}}}}(e),t,a,o,l,i)+"}"}(e,t,o,l,i,u)},l=t.test=function(e){return e&&(!0===e["@@__IMMUTABLE_ITERABLE__@@"]||!0===e["@@__IMMUTABLE_RECORD__@@"])};t.default={serialize:o,test:l}});p(k);k.test,k.serialize;var j=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=void 0;var n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Symbol.for("react.forward_ref"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(e)?e.forEach(function(e){i(e,t)}):null!=e&&!1!==e&&t.push(e),t},u=function(e){var t=e.type;if("string"==typeof t)return t;if("function"==typeof t)return t.displayName||t.name||"Unknown";if(t===r)return"React.Fragment";if("object"==typeof t&&null!==t){if(t.$$typeof===o)return"Context.Provider";if(t.$$typeof===l)return"Context.Consumer";if(t.$$typeof===a){var n=t.render.displayName||t.render.name||"";return""!==n?"ForwardRef("+n+")":"ForwardRef"}}return"UNDEFINED"},c=t.serialize=function(e,t,n,r,a,o){return++r>t.maxDepth?(0,B.printElementAsLeaf)(u(e),t):(0,B.printElement)(u(e),(0,B.printProps)(function(e){var t=e.props;return Object.keys(t).filter(function(e){return"children"!==e&&void 0!==t[e]}).sort()}(e),e.props,t,n+t.indent,r,a,o),(0,B.printChildren)(i(e.props.children),t,n+t.indent,r,a,o),t,n)},s=t.test=function(e){return e&&e.$$typeof===n};t.default={serialize:c,test:s}});p(j);j.test,j.serialize;var S=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=void 0;var n=Symbol.for("react.test.json"),r=t.serialize=function(e,t,n,r,a,o){return++r>t.maxDepth?(0,B.printElementAsLeaf)(e.type,t):(0,B.printElement)(e.type,e.props?(0,B.printProps)(function(e){var t=e.props;return t?Object.keys(t).filter(function(e){return void 0!==t[e]}).sort():[]}(e),e.props,t,n+t.indent,r,a,o):"",e.children?(0,B.printChildren)(e.children,t,n+t.indent,r,a,o):"",t,n)},a=t.test=function(e){return e&&e.$$typeof===n};t.default={serialize:r,test:a}});p(S);S.test,S.serialize;var D=p(d(function(e){var t=c(E),n=c(A),r=c(M),a=c(O),o=c(_),l=c(k),i=c(j),u=c(S);function c(e){return e&&e.__esModule?e:{default:e}}var f=Object.prototype.toString,p=Date.prototype.toISOString,d=Error.prototype.toString,b=RegExp.prototype.toString,v=Symbol.prototype.toString,y=function(e){return"function"==typeof e.constructor&&e.constructor.name||"Object"},h=function(e){return"undefined"!=typeof window&&e===window},g=/^Symbol\((.*)\)(.*)$/,m=/\n/gi,w=function(e){var t,n;function r(t,n){var r=e.call(this,t)||this;return r.stack=n,r.name=r.constructor.name,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(s(Error));function x(e,t){return t?"[Function "+(e.name||"anonymous")+"]":"[Function]"}function I(e){return v.call(e).replace(g,"Symbol($1)")}function B(e){return"["+d.call(e)+"]"}function D(e,t,n){if(!0===e||!1===e)return""+e;if(void 0===e)return"undefined";if(null===e)return"null";var r=typeof e;if("number"===r)return function(e){return Object.is(e,-0)?"-0":String(e)}(e);if("string"===r)return'"'+e.replace(/"|\\/g,"\\$&")+'"';if("function"===r)return x(e,t);if("symbol"===r)return I(e);var a=f.call(e);return"[object WeakMap]"===a?"WeakMap {}":"[object WeakSet]"===a?"WeakSet {}":"[object Function]"===a||"[object GeneratorFunction]"===a?x(e,t):"[object Symbol]"===a?I(e):"[object Date]"===a?isNaN(+e)?"Date { NaN }":p.call(e):"[object Error]"===a?B(e):"[object RegExp]"===a?n?b.call(e).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&"):b.call(e):e instanceof Error?B(e):null}function q(e,t,n,r,a,o){if(-1!==a.indexOf(e))return"[Circular]";(a=a.slice()).push(e);var l=++r>t.maxDepth,i=t.min;if(t.callToJSON&&!l&&e.toJSON&&"function"==typeof e.toJSON&&!o)return C(e.toJSON(),t,n,r,a,!0);var u=f.call(e);return"[object Arguments]"===u?l?"[Arguments]":(i?"":"Arguments ")+"["+(0,T.printListItems)(e,t,n,r,a,C)+"]":function(e){return"[object Array]"===e||"[object ArrayBuffer]"===e||"[object DataView]"===e||"[object Float32Array]"===e||"[object Float64Array]"===e||"[object Int8Array]"===e||"[object Int16Array]"===e||"[object Int32Array]"===e||"[object Uint8Array]"===e||"[object Uint8ClampedArray]"===e||"[object Uint16Array]"===e||"[object Uint32Array]"===e}(u)?l?"["+e.constructor.name+"]":(i?"":e.constructor.name+" ")+"["+(0,T.printListItems)(e,t,n,r,a,C)+"]":"[object Map]"===u?l?"[Map]":"Map {"+(0,T.printIteratorEntries)(e.entries(),t,n,r,a,C," => ")+"}":"[object Set]"===u?l?"[Set]":"Set {"+(0,T.printIteratorValues)(e.values(),t,n,r,a,C)+"}":l||h(e)?"["+y(e)+"]":(i?"":y(e)+" ")+"{"+(0,T.printObjectProperties)(e,t,n,r,a,C)+"}"}function P(e,t,n,r,a,o){var l;try{l=e.serialize?e.serialize(t,n,r,a,o,C):e.print(t,function(e){return C(e,n,r,a,o)},function(e){var t=r+n.indent;return t+e.replace(m,"\n"+t)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(e){throw new w(e.message,e.stack)}if("string"!=typeof l)throw new Error('pretty-format: Plugin must return type "string" but instead returned "'+typeof l+'".');return l}function z(e,t){for(var n=0;n<e.length;n++)try{if(e[n].test(t))return e[n]}catch(e){throw new w(e.message,e.stack)}return null}function C(e,t,n,r,a,o){var l=z(t.plugins,e);if(null!==l)return P(l,e,t,n,r,a);var i=D(e,t.printFunctionName,t.escapeRegex);return null!==i?i:q(e,t,n,r,a,o)}var N={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},L=Object.keys(N),R={callToJSON:!0,escapeRegex:!1,highlight:!1,indent:2,maxDepth:1/0,min:!1,plugins:[],printFunctionName:!0,theme:N};var V=function(e){return L.reduce(function(n,r){var a=e.theme&&void 0!==e.theme[r]?e.theme[r]:N[r],o=t.default[a];if(!o||"string"!=typeof o.close||"string"!=typeof o.open)throw new Error('pretty-format: Option "theme" has a key "'+r+'" whose value "'+a+'" is undefined in ansi-styles.');return n[r]=o,n},Object.create(null))},U=function(e){return e&&void 0!==e.printFunctionName?e.printFunctionName:R.printFunctionName},F=function(e){return e&&void 0!==e.escapeRegex?e.escapeRegex:R.escapeRegex},W=function(e){return{callToJSON:e&&void 0!==e.callToJSON?e.callToJSON:R.callToJSON,colors:e&&e.highlight?V(e):L.reduce(function(e,t){return e[t]={close:"",open:""},e},Object.create(null)),escapeRegex:F(e),indent:e&&e.min?"":(t=e&&void 0!==e.indent?e.indent:R.indent,new Array(t+1).join(" ")),maxDepth:e&&void 0!==e.maxDepth?e.maxDepth:R.maxDepth,min:e&&void 0!==e.min?e.min:R.min,plugins:e&&void 0!==e.plugins?e.plugins:R.plugins,printFunctionName:U(e),spacingInner:e&&e.min?" ":"\n",spacingOuter:e&&e.min?"":"\n"};var t};function $(e,t){if(t&&(function(e){if(Object.keys(e).forEach(function(e){if(!R.hasOwnProperty(e))throw new Error('pretty-format: Unknown option "'+e+'".')}),e.min&&void 0!==e.indent&&0!==e.indent)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(void 0!==e.theme){if(null===e.theme)throw new Error('pretty-format: Option "theme" must not be null.');if("object"!=typeof e.theme)throw new Error('pretty-format: Option "theme" must be of type "object" but instead received "'+typeof e.theme+'".')}}(t),t.plugins)){var n=z(t.plugins,e);if(null!==n)return P(n,e,W(t),"",0,[])}var r=D(e,U(t),F(t));return null!==r?r:q(e,W(t),"",0,[])}$.plugins={AsymmetricMatcher:n.default,ConvertAnsi:r.default,DOMCollection:a.default,DOMElement:o.default,Immutable:l.default,ReactElement:i.default,ReactTestComponent:u.default},e.exports=$})),q=D.plugins,P=q.DOMElement,z=q.DOMCollection;function C(e,t,n){e.documentElement&&(e=e.documentElement);var r=D(e,l({plugins:[P,z],printFunctionName:!1,highlight:!0},n));return void 0!==t&&e.outerHTML.length>t?r.slice(0,t)+"...":r}function N(e){var t="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node,n=e.ownerDocument&&e.ownerDocument.defaultView||void 0;return"undefined"!=typeof global&&global.Cypress||void 0!==n&&n.Cypress?"":t?C(e,7e3):C(e,7e3,{highlight:!1})}function L(e,t){return new Error([e,N(t)].filter(Boolean).join("\n\n"))}function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=e.apply(void 0,n);return 0===a.length?null:a[0]}function V(e,r,o,l){var i=void 0===l?{}:l,u=i.exact,c=void 0===u||u,s=i.collapseWhitespace,f=i.trim,p=i.normalizer,d=c?n:t,b=a({collapseWhitespace:s,trim:f,normalizer:p});return Array.from(r.querySelectorAll("["+e+"]")).filter(function(t){return d(t.getAttribute(e),t,o,b)})}function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[V].concat(t))}var F=Object.freeze({debugDOM:N,getElementError:L,firstResultOrNull:R,queryAllByAttribute:V,queryByAttribute:U}),W={testIdAttribute:"data-testid"};function $(e,r,o){var l=void 0===o?{}:o,i=l.exact,u=void 0===i||i,c=l.trim,s=l.collapseWhitespace,f=l.normalizer,p=u?n:t,d=a({collapseWhitespace:s,trim:c,normalizer:f});return Array.from(e.querySelectorAll("label")).filter(function(e){return p(e.textContent,e,r,d)})}function J(e,t,n){var r=void 0===n?{}:n,o=r.selector,l=void 0===o?"*":o,i=r.exact,u=void 0===i||i,c=a({collapseWhitespace:r.collapseWhitespace,trim:r.trim,normalizer:r.normalizer}),s=$(e,t,{exact:u,normalizer:c}).map(function(t){return t.control?t.control:t.getAttribute("for")?e.querySelector('[id="'+t.getAttribute("for")+'"]'):t.getAttribute("id")?e.querySelector('[aria-labelledby~="'+t.getAttribute("id")+'"]'):t.childNodes.length?t.querySelector(l):null}).filter(function(e){return null!==e}).concat(V("aria-label",e,t,{exact:u})),f=Y(e,t,{exact:u,normalizer:c}).filter(function(e){return"LABEL"!==e.tagName}).reduce(function(t,n){var r=n.getAttribute("id");if(!r)return t;var a=Array.from(e.querySelectorAll('[aria-labelledby~="'+r+'"]'));return t.concat(a)},[]);return Array.from(new Set([].concat(s,f)))}function G(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[J].concat(t))}function Y(e,r,l){var i=void 0===l?{}:l,u=i.selector,c=void 0===u?"*":u,s=i.exact,f=void 0===s||s,p=i.collapseWhitespace,d=i.trim,b=i.ignore,v=void 0===b?"script, style":b,y=i.normalizer,h=f?n:t,g=a({collapseWhitespace:p,trim:d,normalizer:y});return Array.from(e.querySelectorAll(c)).filter(function(e){return!v||!e.matches(v)}).filter(function(e){return h(o(e),e,r,g)})}function K(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Y].concat(t))}function H(e,r,l){var i=void 0===l?{}:l,u=i.exact,c=void 0===u||u,s=i.collapseWhitespace,f=i.trim,p=i.normalizer,d=c?n:t,b=a({collapseWhitespace:s,trim:f,normalizer:p});return Array.from(e.querySelectorAll("[title], svg > title")).filter(function(e){return d(e.getAttribute("title"),e,r,b)||d(o(e),e,r,b)})}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[H].concat(t))}function Z(e,r,l){var i=void 0===l?{}:l,u=i.exact,c=void 0===u||u,s=i.collapseWhitespace,f=i.trim,p=i.normalizer,d=c?n:t,b=a({collapseWhitespace:s,trim:f,normalizer:p});return Array.from(e.querySelectorAll("select")).filter(function(e){return Array.from(e.options).filter(function(e){return e.selected}).some(function(e){return d(o(e),e,r,b)})})}function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Z].concat(t))}function ee(){return W.testIdAttribute}var te=U.bind(null,"placeholder"),ne=V.bind(null,"placeholder"),re=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return U.apply(void 0,[ee()].concat(t))},ae=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return V.apply(void 0,[ee()].concat(t))},oe=U.bind(null,"value"),le=V.bind(null,"value"),ie=U.bind(null,"role"),ue=V.bind(null,"role");function ce(e,r,o){var l=void 0===o?{}:o,i=l.exact,u=void 0===i||i,c=l.collapseWhitespace,s=l.trim,f=l.normalizer,p=u?n:t,d=a({collapseWhitespace:c,trim:s,normalizer:f});return Array.from(e.querySelectorAll("img,input,area")).filter(function(e){return p(e.getAttribute("alt"),e,r,d)})}function se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[ce].concat(t))}function fe(e,r,l){var i=void 0===l?{}:l,u=i.exact,c=void 0===u||u,s=i.collapseWhitespace,f=i.trim,p=i.normalizer,d=c?n:t,b=a({collapseWhitespace:s,trim:f,normalizer:p});return Array.from(e.querySelectorAll("input,textarea,select")).filter(function(e){return"SELECT"===e.tagName?Array.from(e.options).filter(function(e){return e.selected}).some(function(e){return d(o(e),e,r,b)}):d(e.value,e,r,b)})}function pe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[fe].concat(t))}function de(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=ae.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element by: ["+ee()+'="'+t+'"]',e);return o}function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[de].concat(t))}function ve(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=H.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the title: "+t+".",e);return o}function ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[ve].concat(t))}function he(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=le.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the value: "+t+".",e);return o}function ge(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[he].concat(t))}function me(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=ne.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the placeholder text of: "+t,e);return o}function we(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[me].concat(t))}function Ee(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=J.apply(void 0,[e,t].concat(r));if(!o.length)throw $.apply(void 0,[e,t].concat(r)).length?L("Found a label with the text of: "+t+', however no form control was found associated to that label. Make sure you\'re using the "for" attribute or "aria-labelledby" attribute correctly.',e):L("Unable to find a label with the text of: "+t,e);return o}function Te(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Ee].concat(t))}function Ae(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=Y.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the text: "+t+". 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.",e);return o}function xe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Ae].concat(t))}function Me(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=ce.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the alt text: "+t,e);return o}function Oe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Me].concat(t))}function Ie(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=ue.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element by role="+t,e);return o}function Be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Ie].concat(t))}function _e(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=Z.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find a <select> element with the selected option's text: "+t,e);return o}function ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[_e].concat(t))}function je(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=fe.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the value: "+t+".",e);return o}function Se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[je].concat(t))}var De=Object.freeze({queryByPlaceholderText:te,queryAllByPlaceholderText:ne,getByPlaceholderText:we,getAllByPlaceholderText:me,queryByText:K,queryAllByText:Y,getByText:xe,getAllByText:Ae,queryByLabelText:G,queryAllByLabelText:J,getByLabelText:Te,getAllByLabelText:Ee,queryByAltText:se,queryAllByAltText:ce,getByAltText:Oe,getAllByAltText:Me,queryBySelectText:X,queryAllBySelectText:Z,getBySelectText:ke,getAllBySelectText:_e,queryByTestId:re,queryAllByTestId:ae,getByTestId:be,getAllByTestId:de,queryByTitle:Q,queryAllByTitle:H,getByTitle:ye,getAllByTitle:ve,queryByValue:oe,queryAllByValue:le,getByValue:ge,getAllByValue:he,queryByDisplayValue:pe,queryAllByDisplayValue:fe,getByDisplayValue:Se,getAllByDisplayValue:je,queryByRole:ie,queryAllByRole:ue,getAllByRole:Ie,getByRole:Be});function qe(e,t){return void 0===t&&(t=De),Object.keys(t).reduce(function(n,r){var a=t[r];return n[r]=a.bind(null,e),n},{})}var Pe=p(d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="undefined"!=typeof window?window:f,r=n.setTimeout,a=n.Date.now;t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=a();return new Promise(function(l,i){var u=function(e){a()-o>=t?i(e):r(c,n)};function c(){try{Promise.resolve(e()).then(function(){return l()}).catch(u)}catch(e){u(e)}}r(c,0)})},e.exports=t.default}));var ze=function(e){if("undefined"!=typeof window&&void 0!==window.MutationObserver)return window.MutationObserver;function t(e){this._watched=[],this._listener=e}function n(t){var n={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};for(var r in t)v(n,r)&&t[r]!==e&&(n[r]=t[r]);return n}function r(t,r){var a=u(t,r);return function(o){var l,s=o.length;r.charData&&3===t.nodeType&&t.nodeValue!==a.charData&&o.push(new n({type:"characterData",target:t,oldValue:a.charData})),r.attr&&a.attr&&i(o,t,a.attr,r.afilter),(r.kids||r.descendents)&&(l=function(t,r,a,o){var l;function u(e,r,a,l,u){for(var c,f,p,d=e.length-1,b=-~((d-u)/2);p=e.pop();)c=a[p.i],f=l[p.j],o.kids&&b&&Math.abs(p.i-p.j)>=d&&(t.push(n({type:"childList",target:r,addedNodes:[c],removedNodes:[c],nextSibling:c.nextSibling,previousSibling:c.previousSibling})),b--),o.attr&&f.attr&&i(t,c,f.attr,o.afilter),o.charData&&3===c.nodeType&&c.nodeValue!==f.charData&&t.push(n({type:"characterData",target:c,oldValue:f.charData})),o.descendents&&s(c,f)}function s(r,a){for(var f,d,v,y,h,g,m,w=r.childNodes,E=a.kids,T=w.length,A=E?E.length:0,x=0,M=0,O=0;M<T||O<A;)g=w[M],h=E[O],m=h&&h.node,g===m?(o.attr&&h.attr&&i(t,g,h.attr,o.afilter),o.charData&&h.charData!==e&&g.nodeValue!==h.charData&&t.push(n({type:"characterData",target:g,oldValue:h.charData})),d&&u(d,r,w,E,x),o.descendents&&(g.childNodes.length||h.kids&&h.kids.length)&&s(g,h),M++,O++):(l=!0,f||(f={},d=[]),g&&(f[v=p(g)]||(f[v]=!0,-1===(y=c(E,g,O))?o.kids&&(t.push(n({type:"childList",target:r,addedNodes:[g],nextSibling:g.nextSibling,previousSibling:g.previousSibling})),x++):d.push({i:M,j:y})),M++),m&&m!==w[M]&&(f[v=p(m)]||(f[v]=!0,-1===(y=b(w,m,M))?o.kids&&(t.push(n({type:"childList",target:a.node,removedNodes:[m],nextSibling:E[O+1],previousSibling:E[O-1]})),x--):d.push({i:y,j:O})),O++));d&&u(d,r,w,E,x)}return s(r,a),l}(o,t,a,r)),(l||o.length!==s)&&(a=u(t,r))}}t._period=30,t.prototype={observe:function(e,n){for(var a,o={attr:!!(n.attributes||n.attributeFilter||n.attributeOldValue),kids:!!n.childList,descendents:!!n.subtree,charData:!(!n.characterData&&!n.characterDataOldValue)},l=this._watched,i=0;i<l.length;i++)l[i].tar===e&&l.splice(i,1);n.attributeFilter&&(o.afilter=d(n.attributeFilter,function(e,t){return e[t]=!0,e},{})),l.push({tar:e,fn:r(e,o)}),this._timeout||(a=this,function e(){var n=a.takeRecords();n.length&&a._listener(n,a),a._timeout=setTimeout(e,t._period)}())},takeRecords:function(){for(var e=[],t=this._watched,n=0;n<t.length;n++)t[n].fn(e);return e},disconnect:function(){this._watched=[],clearTimeout(this._timeout),this._timeout=null}};var a=!1;if("undefined"!=typeof document){var o=document.createElement("i");o.style.top=0,a="null"!=o.attributes.style.value}var l=a?function(e,t){return t.value}:function(e,t){return"style"!==t.name?t.value:e.style.cssText};function i(e,t,r,a){for(var o,i={},u=t.attributes,c=u.length;c--;)s=(o=u[c]).name,a&&!v(a,s)||(l(t,o)!==r[s]&&e.push(n({type:"attributes",target:t,attributeName:s,oldValue:r[s],attributeNamespace:o.namespaceURI})),i[s]=!0);for(var s in r)i[s]||e.push(n({target:t,type:"attributes",attributeName:s,oldValue:r[s]}))}function u(e,t){var n=!0;return function e(r){var a={node:r};return!t.charData||3!==r.nodeType&&8!==r.nodeType?(t.attr&&n&&1===r.nodeType&&(a.attr=d(r.attributes,function(e,n){return t.afilter&&!t.afilter[n.name]||(e[n.name]=l(r,n)),e},{})),n&&(t.kids||t.charData||t.attr&&t.descendents)&&(a.kids=function(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r,e);return n}(r.childNodes,e)),n=t.descendents):a.charData=r.nodeValue,a}(e)}function c(e,t,n){return b(e,t,n,"node")}var s=1,f="mo_id";function p(e){try{return e.id||(e[f]=e[f]||s++)}catch(t){try{return e.nodeValue}catch(e){return s++}}}function d(e,t,n){for(var r=0;r<e.length;r++)n=t(n,e[r],r,e);return n}function b(e,t,n,r){for(;n<e.length;n++)if((r?e[n][r]:e[n])===t)return n;return-1}function v(t,n){return t[n]!==e}return t}(void 0);function Ce(e){return new("undefined"!=typeof window&&void 0!==window.MutationObserver?window.MutationObserver:ze)(e)}function Ne(){if("undefined"==typeof window)throw new Error("Could not find default container");return window.document}var Le={copy:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},cut:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},paste:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},compositionEnd:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0}},compositionStart:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0}},compositionUpdate:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!1}},keyDown:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},keyPress:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},keyUp:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},focus:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1}},blur:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1}},focusIn:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1}},focusOut:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1}},change:{EventType:"InputEvent",defaultInit:{bubbles:!0,cancelable:!0}},input:{EventType:"InputEvent",defaultInit:{bubbles:!0,cancelable:!0}},invalid:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!0}},submit:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!0}},click:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,button:0}},contextMenu:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},dblClick:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},drag:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},dragEnd:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1}},dragEnter:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},dragExit:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1}},dragLeave:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1}},dragOver:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},dragStart:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},drop:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseDown:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseEnter:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseLeave:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseMove:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseOut:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseOver:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseUp:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},select:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!1}},touchCancel:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!1}},touchEnd:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0}},touchMove:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0}},touchStart:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0}},scroll:{EventType:"UIEvent",defaultInit:{bubbles:!1,cancelable:!1}},wheel:{EventType:"WheelEvent",defaultInit:{bubbles:!0,cancelable:!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:"UIEvent",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}},transitionEnd:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!0}}},Re={doubleClick:"dblClick"};function Ve(e,t){return e.dispatchEvent(t)}Object.keys(Le).forEach(function(e){var t=Le[e],n=t.EventType,r=t.defaultInit,a=e.toLowerCase();Ve[e]=function(e,t){var o=l({},r,t),i=o.target,u=(i=void 0===i?{}:i).value,c=i.files,s=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(i,["value","files"]);Object.assign(e,s),void 0!==u&&function(e,t){var n=(Object.getOwnPropertyDescriptor(e,"value")||{}).set,r=Object.getPrototypeOf(e),a=(Object.getOwnPropertyDescriptor(r,"value")||{}).set;if(a&&n!==a)a.call(e,t);else{if(!n)throw new Error("The given element does not have a value setter");n.call(e,t)}}(e,u),void 0!==c&&Object.defineProperty(e,"files",{configurable:!0,enumerable:!0,writable:!0,value:c});var f=e.ownerDocument.defaultView;return Ve(e,new(f[n]||f.Event)(a,o))}}),Object.keys(Re).forEach(function(e){var t=Re[e];Ve[e]=function(){return Ve[t].apply(Ve,arguments)}}),e.bindElementToQueries=qe,e.within=qe,e.queries=De,e.queryHelpers=F,e.getDefaultNormalizer=r,e.configure=function(e){"function"==typeof e&&(e=e(W)),W=l({},W,e)},e.queryByPlaceholderText=te,e.queryAllByPlaceholderText=ne,e.getByPlaceholderText=we,e.getAllByPlaceholderText=me,e.queryByText=K,e.queryAllByText=Y,e.getByText=xe,e.getAllByText=Ae,e.queryByLabelText=G,e.queryAllByLabelText=J,e.getByLabelText=Te,e.getAllByLabelText=Ee,e.queryByAltText=se,e.queryAllByAltText=ce,e.getByAltText=Oe,e.getAllByAltText=Me,e.queryBySelectText=X,e.queryAllBySelectText=Z,e.getBySelectText=ke,e.getAllBySelectText=_e,e.queryByTestId=re,e.queryAllByTestId=ae,e.getByTestId=be,e.getAllByTestId=de,e.queryByTitle=Q,e.queryAllByTitle=H,e.getByTitle=ye,e.getAllByTitle=ve,e.queryByValue=oe,e.queryAllByValue=le,e.getByValue=ge,e.getAllByValue=he,e.queryByDisplayValue=pe,e.queryAllByDisplayValue=fe,e.getByDisplayValue=Se,e.getAllByDisplayValue=je,e.queryByRole=ie,e.queryAllByRole=ue,e.getAllByRole=Ie,e.getByRole=Be,e.wait=function(e,t){void 0===e&&(e=function(){});var n=void 0===t?{}:t,r=n.timeout,a=void 0===r?4500:r,o=n.interval;return Pe(e,a,void 0===o?50:o)},e.waitForElement=function(e,t){var n=void 0===t?{}:t,r=n.container,a=void 0===r?Ne():r,o=n.timeout,l=void 0===o?4500:o,i=n.mutationObserverOptions,u=void 0===i?{subtree:!0,childList:!0,attributes:!0,characterData:!0}:i;return new Promise(function(t,n){var r;"function"!=typeof e&&n("waitForElement requires a callback as the first parameter");var o=setTimeout(function(){c(r||new Error("Timed out in waitForElement."),null)},l),i=Ce(s);function c(e,r){clearTimeout(o),setImmediate(function(){return i.disconnect()}),e?n(e):t(r)}function s(){try{var t=e();t&&c(null,t)}catch(e){r=e}}i.observe(a,u),s()})},e.waitForDomChange=function(e){var t=void 0===e?{}:e,n=t.container,r=void 0===n?Ne():n,a=t.timeout,o=void 0===a?4500:a,l=t.mutationObserverOptions,i=void 0===l?{subtree:!0,childList:!0,attributes:!0,characterData:!0}:l;return new Promise(function(e,t){var n=setTimeout(function(){l(new Error("Timed out in waitForDomChange."),null)},o),a=Ce(function(e){l(null,e)});function l(r,o){clearTimeout(n),setImmediate(function(){return a.disconnect()}),r?t(r):e(o)}a.observe(r,i)})},e.getNodeText=o,e.fireEvent=Ve,e.getQueriesForElement=qe,e.debugDOM=N,e.getElementError=L,e.firstResultOrNull=R,e.queryAllByAttribute=V,e.queryByAttribute=U,e.prettyDOM=C,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.DomTestingLibrary={})}(this,function(e){"use strict";function t(e,t,n,r){if("string"!=typeof e)return!1;var a=r(e);return"string"==typeof n?a.toLowerCase().includes(n.toLowerCase()):"function"==typeof n?n(a,t):n.test(a)}function n(e,t,n,r){if("string"!=typeof e)return!1;var a=r(e);return"string"==typeof n?a===n:"function"==typeof n?n(a,t):n.test(a)}function r(e){var t=void 0===e?{}:e,n=t.trim,r=void 0===n||n,a=t.collapseWhitespace,o=void 0===a||a;return function(e){var t=e;return t=r?t.trim():t,t=o?t.replace(/\s+/g," "):t}}function a(e){var t=e.trim,n=e.collapseWhitespace,a=e.normalizer;if(a){if(void 0!==t||void 0!==n)throw new 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}return r({trim:t,collapseWhitespace:n})}function o(e){var t=e.ownerDocument.defaultView;return e.matches("input[type=submit], input[type=button]")?e.value:Array.from(e.childNodes).filter(function(e){return e.nodeType===t.Node.TEXT_NODE&&Boolean(e.textContent)}).map(function(e){return e.textContent}).join("")}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){return(c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&u(a,n.prototype),a}).apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return c(e,arguments,i(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)})(e)}var f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}var b={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},v=d(function(e){var t={};for(var n in b)b.hasOwnProperty(n)&&(t[b[n]]=n);var r=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in r)if(r.hasOwnProperty(a)){if(!("channels"in r[a]))throw new Error("missing channels property: "+a);if(!("labels"in r[a]))throw new Error("missing channel labels property: "+a);if(r[a].labels.length!==r[a].channels)throw new Error("channel and label counts mismatch: "+a);var o=r[a].channels,l=r[a].labels;delete r[a].channels,delete r[a].labels,Object.defineProperty(r[a],"channels",{value:o}),Object.defineProperty(r[a],"labels",{value:l})}r.rgb.hsl=function(e){var t,n,r=e[0]/255,a=e[1]/255,o=e[2]/255,l=Math.min(r,a,o),i=Math.max(r,a,o),u=i-l;return i===l?t=0:r===i?t=(a-o)/u:a===i?t=2+(o-r)/u:o===i&&(t=4+(r-a)/u),(t=Math.min(60*t,360))<0&&(t+=360),n=(l+i)/2,[t,100*(i===l?0:n<=.5?u/(i+l):u/(2-i-l)),100*n]},r.rgb.hsv=function(e){var t,n,r,a,o,l=e[0]/255,i=e[1]/255,u=e[2]/255,c=Math.max(l,i,u),s=c-Math.min(l,i,u),f=function(e){return(c-e)/6/s+.5};return 0===s?a=o=0:(o=s/c,t=f(l),n=f(i),r=f(u),l===c?a=r-n:i===c?a=1/3+t-r:u===c&&(a=2/3+n-t),a<0?a+=1:a>1&&(a-=1)),[360*a,100*o,100*c]},r.rgb.hwb=function(e){var t=e[0],n=e[1],a=e[2];return[r.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,a))),100*(a=1-1/255*Math.max(t,Math.max(n,a)))]},r.rgb.cmyk=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(1-t,1-n,1-r);return[100*((1-t-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*((1-r-a)/(1-a)||0),100*a]},r.rgb.keyword=function(e){var n=t[e];if(n)return n;var r,a,o,l=1/0;for(var i in b)if(b.hasOwnProperty(i)){var u=b[i],c=(a=e,o=u,Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)+Math.pow(a[2]-o[2],2));c<l&&(l=c,r=i)}return r},r.keyword.rgb=function(e){return b[e]},r.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},r.rgb.lab=function(e){var t=r.rgb.xyz(e),n=t[0],a=t[1],o=t[2];return a/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116)-16,500*(n-a),200*(a-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},r.hsl.rgb=function(e){var t,n,r,a,o,l=e[0]/360,i=e[1]/100,u=e[2]/100;if(0===i)return[o=255*u,o,o];t=2*u-(n=u<.5?u*(1+i):u+i-u*i),a=[0,0,0];for(var c=0;c<3;c++)(r=l+1/3*-(c-1))<0&&r++,r>1&&r--,o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[c]=255*o;return a},r.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,a=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,a*=o<=1?o:2-o,[t,100*(0===r?2*a/(o+a):2*n/(r+n)),100*((r+n)/2)]},r.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,a=Math.floor(t)%6,o=t-Math.floor(t),l=255*r*(1-n),i=255*r*(1-n*o),u=255*r*(1-n*(1-o));switch(r*=255,a){case 0:return[r,u,l];case 1:return[i,r,l];case 2:return[l,r,u];case 3:return[l,i,r];case 4:return[u,l,r];case 5:return[r,l,i]}},r.hsv.hsl=function(e){var t,n,r=e[0],a=e[1]/100,o=e[2]/100,l=Math.max(o,.01),i=(2-a)*o;return n=a*l,[r,100*(n=(n/=(t=(2-a)*l)<=1?t:2-t)||0),100*(i/=2)]},r.hwb.rgb=function(e){var t,n,r,a,o,l,i,u=e[0]/360,c=e[1]/100,s=e[2]/100,f=c+s;switch(f>1&&(c/=f,s/=f),r=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(r=1-r),a=c+r*((n=1-s)-c),t){default:case 6:case 0:o=n,l=a,i=c;break;case 1:o=a,l=n,i=c;break;case 2:o=c,l=n,i=a;break;case 3:o=c,l=a,i=n;break;case 4:o=a,l=c,i=n;break;case 5:o=n,l=c,i=a}return[255*o,255*l,255*i]},r.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a))]},r.xyz.rgb=function(e){var t,n,r,a=e[0]/100,o=e[1]/100,l=e[2]/100;return n=-.9689*a+1.8758*o+.0415*l,r=.0557*a+-.204*o+1.057*l,t=(t=3.2406*a+-1.5372*o+-.4986*l)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},r.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},r.lab.xyz=function(e){var t,n,r,a=e[0];t=e[1]/500+(n=(a+16)/116),r=n-e[2]/200;var o=Math.pow(n,3),l=Math.pow(t,3),i=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,t=l>.008856?l:(t-16/116)/7.787,r=i>.008856?i:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},r.lab.lch=function(e){var t,n=e[0],r=e[1],a=e[2];return(t=360*Math.atan2(a,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+a*a),t]},r.lch.lab=function(e){var t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},r.rgb.ansi16=function(e){var t=e[0],n=e[1],a=e[2],o=1 in arguments?arguments[1]:r.rgb.hsv(e)[2];if(0===(o=Math.round(o/50)))return 30;var l=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===o&&(l+=60),l},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},r.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},r.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},r.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map(function(e){return e+e}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},r.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.max(Math.max(n,r),a),l=Math.min(Math.min(n,r),a),i=o-l;return t=i<=0?0:o===n?(r-a)/i%6:o===r?2+(a-n)/i:4+(n-r)/i+4,t/=6,[360*(t%=1),100*i,100*(i<1?l/(1-i):0)]},r.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,a=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(a=(n-.5*r)/(1-r)),[e[0],100*r,100*a]},r.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},r.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var a,o=[0,0,0],l=t%1*6,i=l%1,u=1-i;switch(Math.floor(l)){case 0:o[0]=1,o[1]=i,o[2]=0;break;case 1:o[0]=u,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=i;break;case 3:o[0]=0,o[1]=u,o[2]=1;break;case 4:o[0]=i,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=u}return a=(1-n)*r,[255*(n*o[0]+a),255*(n*o[1]+a),255*(n*o[2]+a)]},r.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},r.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},r.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},r.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=r.gray.hsv=function(e){return[0,0,e[0]]},r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});v.rgb,v.hsl,v.hsv,v.hwb,v.cmyk,v.xyz,v.lab,v.lch,v.hex,v.keyword,v.ansi16,v.ansi256,v.hcg,v.apple,v.gray;function y(e){var t=function(){for(var e={},t=Object.keys(v),n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var r=n.pop(),a=Object.keys(v[r]),o=a.length,l=0;l<o;l++){var i=a[l],u=t[i];-1===u.distance&&(u.distance=t[r].distance+1,u.parent=r,n.unshift(i))}return t}function h(e,t){return function(n){return t(e(n))}}function g(e,t){for(var n=[t[e].parent,e],r=v[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),r=h(v[t[a].parent][a],r),a=t[a].parent;return r.conversion=n,r}var m={};Object.keys(v).forEach(function(e){m[e]={},Object.defineProperty(m[e],"channels",{value:v[e].channels}),Object.defineProperty(m[e],"labels",{value:v[e].labels});var t=function(e){for(var t=y(e),n={},r=Object.keys(t),a=r.length,o=0;o<a;o++){var l=r[o];null!==t[l].parent&&(n[l]=g(l,t))}return n}(e);Object.keys(t).forEach(function(n){var r=t[n];m[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,a=0;a<r;a++)n[a]=Math.round(n[a]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),m[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)})});var w=m,E=d(function(e){var t=function(e,t){return function(){return"["+(e.apply(w,arguments)+t)+"m"}},n=function(e,t){return function(){var n=e.apply(w,arguments);return"["+(38+t)+";5;"+n+"m"}},r=function(e,t){return function(){var n=e.apply(w,arguments);return"["+(38+t)+";2;"+n[0]+";"+n[1]+";"+n[2]+"m"}};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){var e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.grey=a.color.gray;for(var o=Object.keys(a),l=0;l<o.length;l++){for(var i=o[l],u=a[i],c=Object.keys(u),s=0;s<c.length;s++){var f=c[s],p=u[f];a[f]={open:"["+p[0]+"m",close:"["+p[1]+"m"},u[f]=a[f],e.set(p[0],p[1])}Object.defineProperty(a,i,{value:u,enumerable:!1}),Object.defineProperty(a,"codes",{value:e,enumerable:!1})}var d=function(e){return e},b=function(e,t,n){return[e,t,n]};a.color.close="[39m",a.bgColor.close="[49m",a.color.ansi={ansi:t(d,0)},a.color.ansi256={ansi256:n(d,0)},a.color.ansi16m={rgb:r(b,0)},a.bgColor.ansi={ansi:t(d,10)},a.bgColor.ansi256={ansi256:n(d,10)},a.bgColor.ansi16m={rgb:r(b,10)};for(var v=Object.keys(w),y=0;y<v.length;y++){var h=v[y];if("object"==typeof w[h]){var g=w[h];"ansi16"===h&&(h="ansi"),"ansi16"in g&&(a.color.ansi[h]=t(g.ansi16,0),a.bgColor.ansi[h]=t(g.ansi16,10)),"ansi256"in g&&(a.color.ansi256[h]=n(g.ansi256,0),a.bgColor.ansi256[h]=n(g.ansi256,10)),"rgb"in g&&(a.color.ansi16m[h]=r(g.rgb,0),a.bgColor.ansi16m[h]=r(g.rgb,10))}}return a}})}),T=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.printIteratorEntries=function(e,t,n,r,a,o){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:": ",i="",u=e.next();if(!u.done){i+=t.spacingOuter;for(var c=n+t.indent;!u.done;){i+=c+o(u.value[0],t,c,r,a)+l+o(u.value[1],t,c,r,a),(u=e.next()).done?t.min||(i+=","):i+=","+t.spacingInner}i+=t.spacingOuter+n}return i},t.printIteratorValues=function(e,t,n,r,a,o){var l="",i=e.next();if(!i.done){l+=t.spacingOuter;for(var u=n+t.indent;!i.done;)l+=u+o(i.value,t,u,r,a),(i=e.next()).done?t.min||(l+=","):l+=","+t.spacingInner;l+=t.spacingOuter+n}return l},t.printListItems=function(e,t,n,r,a,o){var l="";if(e.length){l+=t.spacingOuter;for(var i=n+t.indent,u=0;u<e.length;u++)l+=i+o(e[u],t,i,r,a),u<e.length-1?l+=","+t.spacingInner:t.min||(l+=",");l+=t.spacingOuter+n}return l},t.printObjectProperties=function(e,t,a,o,l,i){var u="",c=Object.keys(e).sort(),s=n(e);if(s.length&&(c=c.filter(function(e){return!r(e)}).concat(s)),c.length){u+=t.spacingOuter;for(var f=a+t.indent,p=0;p<c.length;p++){var d=c[p];u+=f+i(d,t,f,o,l)+": "+i(e[d],t,f,o,l),p<c.length-1?u+=","+t.spacingInner:t.min||(u+=",")}u+=t.spacingOuter+a}return u};var n=Object.getOwnPropertySymbols||function(){return[]},r=function(e){return"symbol"==typeof e||"[object Symbol]"===toString.call(e)}});p(T);T.printIteratorEntries,T.printIteratorValues,T.printListItems,T.printObjectProperties;var A=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=void 0;var n=Symbol.for("jest.asymmetricMatcher"),r=t.serialize=function(e,t,n,r,a,o){var l=e.toString();return"ArrayContaining"===l||"ArrayNotContaining"===l?++r>t.maxDepth?"["+l+"]":l+" ["+(0,T.printListItems)(e.sample,t,n,r,a,o)+"]":"ObjectContaining"===l||"ObjectNotContaining"===l?++r>t.maxDepth?"["+l+"]":l+" {"+(0,T.printObjectProperties)(e.sample,t,n,r,a,o)+"}":"StringMatching"===l||"StringNotMatching"===l?l+" "+o(e.sample,t,n,r,a):"StringContaining"===l||"StringNotContaining"===l?l+" "+o(e.sample,t,n,r,a):e.toAsymmetricMatcher()},a=t.test=function(e){return e&&e.$$typeof===n};t.default={serialize:r,test:a}});p(A);A.test,A.serialize;var x=function(){var e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");return new RegExp(e,"g")},M=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.test=void 0;var n=a(x),r=a(E);function a(e){return e&&e.__esModule?e:{default:e}}var o=t.test=function(e){return"string"==typeof e&&e.match((0,n.default)())},l=t.serialize=function(e,t,a,o,l,i){return i(e.replace((0,n.default)(),function(e){switch(e){case r.default.red.close:case r.default.green.close:case r.default.cyan.close:case r.default.gray.close:case r.default.white.close:case r.default.yellow.close:case r.default.bgRed.close:case r.default.bgGreen.close:case r.default.bgYellow.close:case r.default.inverse.close:case r.default.dim.close:case r.default.bold.close:case r.default.reset.open:case r.default.reset.close:return"</>";case r.default.red.open:return"<red>";case r.default.green.open:return"<green>";case r.default.cyan.open:return"<cyan>";case r.default.gray.open:return"<gray>";case r.default.white.open:return"<white>";case r.default.yellow.open:return"<yellow>";case r.default.bgRed.open:return"<bgRed>";case r.default.bgGreen.open:return"<bgGreen>";case r.default.bgYellow.open:return"<bgYellow>";case r.default.inverse.open:return"<inverse>";case r.default.dim.open:return"<dim>";case r.default.bold.open:return"<bold>";default:return""}}),t,a,o,l)};t.default={serialize:l,test:o}});p(M);M.serialize,M.test;var O=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.test=void 0;var n=["DOMStringMap","NamedNodeMap"],r=t.test=function(e){return e&&e.constructor&&-1!==n.indexOf(e.constructor.name)},a=t.serialize=function(e,t,n,r,a,o){return++r>t.maxDepth?"["+e.constructor.name+"]":e.constructor.name+" {"+(0,T.printObjectProperties)(function(e){var t={};if("NamedNodeMap"===e.constructor.name)for(var n=0;n<e.length;n++)t[e[n].name]=e[n].value;else t=Object.assign({},e);return t}(e),t,n,r,a,o)+"}"};t.default={serialize:a,test:r}});p(O);O.serialize,O.test;var I=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(/</g,"<").replace(/>/g,">")}});p(I);var B=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.printElementAsLeaf=t.printElement=t.printComment=t.printText=t.printChildren=t.printProps=void 0;var n,r=(n=I)&&n.__esModule?n:{default:n};t.printProps=function(e,t,n,r,a,o,l){var i=r+n.indent,u=n.colors;return e.map(function(e){var c=t[e],s=l(c,n,i,a,o);return"string"!=typeof c&&(-1!==s.indexOf("\n")&&(s=n.spacingOuter+i+s+n.spacingOuter+r),s="{"+s+"}"),n.spacingInner+r+u.prop.open+e+u.prop.close+"="+u.value.open+s+u.value.close}).join("")},t.printChildren=function(e,t,n,r,o,l){return e.map(function(e){return t.spacingOuter+n+("string"==typeof e?a(e,t):l(e,t,n,r,o))}).join("")};var a=t.printText=function(e,t){var n=t.colors.content;return n.open+(0,r.default)(e)+n.close};t.printComment=function(e,t){var n=t.colors.comment;return n.open+"\x3c!--"+(0,r.default)(e)+"--\x3e"+n.close},t.printElement=function(e,t,n,r,a){var o=r.colors.tag;return o.open+"<"+e+(t&&o.close+t+r.spacingOuter+a+o.open)+(n?">"+o.close+n+r.spacingOuter+a+o.open+"</"+e:(t&&!r.min?"":" ")+"/")+">"+o.close},t.printElementAsLeaf=function(e,t){var n=t.colors.tag;return n.open+"<"+e+n.close+" β¦"+n.open+" />"+n.close}});p(B);B.printElementAsLeaf,B.printElement,B.printComment,B.printText,B.printChildren,B.printProps;var _=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.serialize=t.test=void 0;var n=/^((HTML|SVG)\w*)?Element$/,r=t.test=function(e){return e&&e.constructor&&e.constructor.name&&(t=e.nodeType,r=e.constructor.name,1===t&&n.test(r)||3===t&&"Text"===r||8===t&&"Comment"===r||11===t&&"DocumentFragment"===r);var t,r},a=function(e){return e.name},o=function(e,t){return e[t.name]=t.value,e},l=t.serialize=function(e,t,n,r,l,i){if(3===e.nodeType)return(0,B.printText)(e.data,t);if(8===e.nodeType)return(0,B.printComment)(e.data,t);var u=11===e.nodeType?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?(0,B.printElementAsLeaf)(u,t):(0,B.printElement)(u,(0,B.printProps)(Array.prototype.map.call(e.attributes||[],a).sort(),Array.prototype.reduce.call(e.attributes||[],o,{}),t,n+t.indent,r,l,i),(0,B.printChildren)(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,l,i),t,n)};t.default={serialize:l,test:r}});p(_);_.serialize,_.test;var k=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=void 0;var n=function(e){return"Immutable."+e},r=function(e){return"["+e+"]"},a=function(e,t,a,o,l,i,u){return++o>t.maxDepth?r(n(u)):n(u)+" ["+(0,T.printIteratorValues)(e.values(),t,a,o,l,i)+"]"},o=t.serialize=function(e,t,o,l,i,u){return e["@@__IMMUTABLE_MAP__@@"]?function(e,t,a,o,l,i,u){return++o>t.maxDepth?r(n(u)):n(u)+" {"+(0,T.printIteratorEntries)(e.entries(),t,a,o,l,i)+"}"}(e,t,o,l,i,u,e["@@__IMMUTABLE_ORDERED__@@"]?"OrderedMap":"Map"):e["@@__IMMUTABLE_LIST__@@"]?a(e,t,o,l,i,u,"List"):e["@@__IMMUTABLE_SET__@@"]?a(e,t,o,l,i,u,e["@@__IMMUTABLE_ORDERED__@@"]?"OrderedSet":"Set"):e["@@__IMMUTABLE_STACK__@@"]?a(e,t,o,l,i,u,"Stack"):e["@@__IMMUTABLE_SEQ__@@"]?function(e,t,a,o,l,i){var u=n("Seq");return++o>t.maxDepth?r(u):e["@@__IMMUTABLE_KEYED__@@"]?u+" {"+(e._iter||e._object?(0,T.printIteratorEntries)(e.entries(),t,a,o,l,i):"β¦")+"}":u+" ["+(e._iter||e._array||e._collection||e._iterable?(0,T.printIteratorValues)(e.values(),t,a,o,l,i):"β¦")+"]"}(e,t,o,l,i,u):function(e,t,a,o,l,i){var u=n(e._name||"Record");return++o>t.maxDepth?r(u):u+" {"+(0,T.printIteratorEntries)(function(e){var t=0;return{next:function(){if(t<e._keys.length){var n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0}}}}(e),t,a,o,l,i)+"}"}(e,t,o,l,i,u)},l=t.test=function(e){return e&&(!0===e["@@__IMMUTABLE_ITERABLE__@@"]||!0===e["@@__IMMUTABLE_RECORD__@@"])};t.default={serialize:o,test:l}});p(k);k.test,k.serialize;var j=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=void 0;var n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Symbol.for("react.forward_ref"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(e)?e.forEach(function(e){i(e,t)}):null!=e&&!1!==e&&t.push(e),t},u=function(e){var t=e.type;if("string"==typeof t)return t;if("function"==typeof t)return t.displayName||t.name||"Unknown";if(t===r)return"React.Fragment";if("object"==typeof t&&null!==t){if(t.$$typeof===o)return"Context.Provider";if(t.$$typeof===l)return"Context.Consumer";if(t.$$typeof===a){var n=t.render.displayName||t.render.name||"";return""!==n?"ForwardRef("+n+")":"ForwardRef"}}return"UNDEFINED"},c=t.serialize=function(e,t,n,r,a,o){return++r>t.maxDepth?(0,B.printElementAsLeaf)(u(e),t):(0,B.printElement)(u(e),(0,B.printProps)(function(e){var t=e.props;return Object.keys(t).filter(function(e){return"children"!==e&&void 0!==t[e]}).sort()}(e),e.props,t,n+t.indent,r,a,o),(0,B.printChildren)(i(e.props.children),t,n+t.indent,r,a,o),t,n)},s=t.test=function(e){return e&&e.$$typeof===n};t.default={serialize:c,test:s}});p(j);j.test,j.serialize;var S=d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=void 0;var n=Symbol.for("react.test.json"),r=t.serialize=function(e,t,n,r,a,o){return++r>t.maxDepth?(0,B.printElementAsLeaf)(e.type,t):(0,B.printElement)(e.type,e.props?(0,B.printProps)(function(e){var t=e.props;return t?Object.keys(t).filter(function(e){return void 0!==t[e]}).sort():[]}(e),e.props,t,n+t.indent,r,a,o):"",e.children?(0,B.printChildren)(e.children,t,n+t.indent,r,a,o):"",t,n)},a=t.test=function(e){return e&&e.$$typeof===n};t.default={serialize:r,test:a}});p(S);S.test,S.serialize;var D=p(d(function(e){var t=c(E),n=c(A),r=c(M),a=c(O),o=c(_),l=c(k),i=c(j),u=c(S);function c(e){return e&&e.__esModule?e:{default:e}}var f=Object.prototype.toString,p=Date.prototype.toISOString,d=Error.prototype.toString,b=RegExp.prototype.toString,v=Symbol.prototype.toString,y=function(e){return"function"==typeof e.constructor&&e.constructor.name||"Object"},h=function(e){return"undefined"!=typeof window&&e===window},g=/^Symbol\((.*)\)(.*)$/,m=/\n/gi,w=function(e){var t,n;function r(t,n){var r=e.call(this,t)||this;return r.stack=n,r.name=r.constructor.name,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(s(Error));function x(e,t){return t?"[Function "+(e.name||"anonymous")+"]":"[Function]"}function I(e){return v.call(e).replace(g,"Symbol($1)")}function B(e){return"["+d.call(e)+"]"}function D(e,t,n){if(!0===e||!1===e)return""+e;if(void 0===e)return"undefined";if(null===e)return"null";var r=typeof e;if("number"===r)return function(e){return Object.is(e,-0)?"-0":String(e)}(e);if("string"===r)return'"'+e.replace(/"|\\/g,"\\$&")+'"';if("function"===r)return x(e,t);if("symbol"===r)return I(e);var a=f.call(e);return"[object WeakMap]"===a?"WeakMap {}":"[object WeakSet]"===a?"WeakSet {}":"[object Function]"===a||"[object GeneratorFunction]"===a?x(e,t):"[object Symbol]"===a?I(e):"[object Date]"===a?isNaN(+e)?"Date { NaN }":p.call(e):"[object Error]"===a?B(e):"[object RegExp]"===a?n?b.call(e).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&"):b.call(e):e instanceof Error?B(e):null}function q(e,t,n,r,a,o){if(-1!==a.indexOf(e))return"[Circular]";(a=a.slice()).push(e);var l=++r>t.maxDepth,i=t.min;if(t.callToJSON&&!l&&e.toJSON&&"function"==typeof e.toJSON&&!o)return C(e.toJSON(),t,n,r,a,!0);var u=f.call(e);return"[object Arguments]"===u?l?"[Arguments]":(i?"":"Arguments ")+"["+(0,T.printListItems)(e,t,n,r,a,C)+"]":function(e){return"[object Array]"===e||"[object ArrayBuffer]"===e||"[object DataView]"===e||"[object Float32Array]"===e||"[object Float64Array]"===e||"[object Int8Array]"===e||"[object Int16Array]"===e||"[object Int32Array]"===e||"[object Uint8Array]"===e||"[object Uint8ClampedArray]"===e||"[object Uint16Array]"===e||"[object Uint32Array]"===e}(u)?l?"["+e.constructor.name+"]":(i?"":e.constructor.name+" ")+"["+(0,T.printListItems)(e,t,n,r,a,C)+"]":"[object Map]"===u?l?"[Map]":"Map {"+(0,T.printIteratorEntries)(e.entries(),t,n,r,a,C," => ")+"}":"[object Set]"===u?l?"[Set]":"Set {"+(0,T.printIteratorValues)(e.values(),t,n,r,a,C)+"}":l||h(e)?"["+y(e)+"]":(i?"":y(e)+" ")+"{"+(0,T.printObjectProperties)(e,t,n,r,a,C)+"}"}function P(e,t,n,r,a,o){var l;try{l=e.serialize?e.serialize(t,n,r,a,o,C):e.print(t,function(e){return C(e,n,r,a,o)},function(e){var t=r+n.indent;return t+e.replace(m,"\n"+t)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(e){throw new w(e.message,e.stack)}if("string"!=typeof l)throw new Error('pretty-format: Plugin must return type "string" but instead returned "'+typeof l+'".');return l}function z(e,t){for(var n=0;n<e.length;n++)try{if(e[n].test(t))return e[n]}catch(e){throw new w(e.message,e.stack)}return null}function C(e,t,n,r,a,o){var l=z(t.plugins,e);if(null!==l)return P(l,e,t,n,r,a);var i=D(e,t.printFunctionName,t.escapeRegex);return null!==i?i:q(e,t,n,r,a,o)}var N={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},L=Object.keys(N),R={callToJSON:!0,escapeRegex:!1,highlight:!1,indent:2,maxDepth:1/0,min:!1,plugins:[],printFunctionName:!0,theme:N};var V=function(e){return L.reduce(function(n,r){var a=e.theme&&void 0!==e.theme[r]?e.theme[r]:N[r],o=t.default[a];if(!o||"string"!=typeof o.close||"string"!=typeof o.open)throw new Error('pretty-format: Option "theme" has a key "'+r+'" whose value "'+a+'" is undefined in ansi-styles.');return n[r]=o,n},Object.create(null))},U=function(e){return e&&void 0!==e.printFunctionName?e.printFunctionName:R.printFunctionName},F=function(e){return e&&void 0!==e.escapeRegex?e.escapeRegex:R.escapeRegex},W=function(e){return{callToJSON:e&&void 0!==e.callToJSON?e.callToJSON:R.callToJSON,colors:e&&e.highlight?V(e):L.reduce(function(e,t){return e[t]={close:"",open:""},e},Object.create(null)),escapeRegex:F(e),indent:e&&e.min?"":(t=e&&void 0!==e.indent?e.indent:R.indent,new Array(t+1).join(" ")),maxDepth:e&&void 0!==e.maxDepth?e.maxDepth:R.maxDepth,min:e&&void 0!==e.min?e.min:R.min,plugins:e&&void 0!==e.plugins?e.plugins:R.plugins,printFunctionName:U(e),spacingInner:e&&e.min?" ":"\n",spacingOuter:e&&e.min?"":"\n"};var t};function $(e,t){if(t&&(function(e){if(Object.keys(e).forEach(function(e){if(!R.hasOwnProperty(e))throw new Error('pretty-format: Unknown option "'+e+'".')}),e.min&&void 0!==e.indent&&0!==e.indent)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(void 0!==e.theme){if(null===e.theme)throw new Error('pretty-format: Option "theme" must not be null.');if("object"!=typeof e.theme)throw new Error('pretty-format: Option "theme" must be of type "object" but instead received "'+typeof e.theme+'".')}}(t),t.plugins)){var n=z(t.plugins,e);if(null!==n)return P(n,e,W(t),"",0,[])}var r=D(e,U(t),F(t));return null!==r?r:q(e,W(t),"",0,[])}$.plugins={AsymmetricMatcher:n.default,ConvertAnsi:r.default,DOMCollection:a.default,DOMElement:o.default,Immutable:l.default,ReactElement:i.default,ReactTestComponent:u.default},e.exports=$})),q=D.plugins,P=q.DOMElement,z=q.DOMCollection;function C(e,t,n){e.documentElement&&(e=e.documentElement);var r=D(e,l({plugins:[P,z],printFunctionName:!1,highlight:!0},n));return void 0!==t&&e.outerHTML.length>t?r.slice(0,t)+"...":r}function N(e){var t="undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node,n=e.ownerDocument&&e.ownerDocument.defaultView||void 0;return"undefined"!=typeof global&&global.Cypress||void 0!==n&&n.Cypress?"":t?C(e,7e3):C(e,7e3,{highlight:!1})}function L(e,t){return new Error([e,N(t)].filter(Boolean).join("\n\n"))}function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=e.apply(void 0,n);return 0===a.length?null:a[0]}function V(e,r,o,l){var i=void 0===l?{}:l,u=i.exact,c=void 0===u||u,s=i.collapseWhitespace,f=i.trim,p=i.normalizer,d=c?n:t,b=a({collapseWhitespace:s,trim:f,normalizer:p});return Array.from(r.querySelectorAll("["+e+"]")).filter(function(t){return d(t.getAttribute(e),t,o,b)})}function U(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[V].concat(t))}var F=Object.freeze({debugDOM:N,getElementError:L,firstResultOrNull:R,queryAllByAttribute:V,queryByAttribute:U}),W={testIdAttribute:"data-testid"};function $(e,r,o){var l=void 0===o?{}:o,i=l.exact,u=void 0===i||i,c=l.trim,s=l.collapseWhitespace,f=l.normalizer,p=u?n:t,d=a({collapseWhitespace:s,trim:c,normalizer:f});return Array.from(e.querySelectorAll("label")).filter(function(e){return p(e.textContent,e,r,d)})}function J(e,t,n){var r=void 0===n?{}:n,o=r.selector,l=void 0===o?"*":o,i=r.exact,u=void 0===i||i,c=a({collapseWhitespace:r.collapseWhitespace,trim:r.trim,normalizer:r.normalizer}),s=$(e,t,{exact:u,normalizer:c}).map(function(t){return t.control?t.control:t.getAttribute("for")?e.querySelector('[id="'+t.getAttribute("for")+'"]'):t.getAttribute("id")?e.querySelector('[aria-labelledby~="'+t.getAttribute("id")+'"]'):t.childNodes.length?t.querySelector(l):null}).filter(function(e){return null!==e}).concat(V("aria-label",e,t,{exact:u})),f=Y(e,t,{exact:u,normalizer:c}).filter(function(e){return"LABEL"!==e.tagName}).reduce(function(t,n){var r=n.getAttribute("id");if(!r)return t;var a=Array.from(e.querySelectorAll('[aria-labelledby~="'+r+'"]'));return t.concat(a)},[]);return Array.from(new Set([].concat(s,f)))}function G(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[J].concat(t))}function Y(e,r,l){var i=void 0===l?{}:l,u=i.selector,c=void 0===u?"*":u,s=i.exact,f=void 0===s||s,p=i.collapseWhitespace,d=i.trim,b=i.ignore,v=void 0===b?"script, style":b,y=i.normalizer,h=f?n:t,g=a({collapseWhitespace:p,trim:d,normalizer:y});return Array.from(e.querySelectorAll(c)).filter(function(e){return!v||!e.matches(v)}).filter(function(e){return h(o(e),e,r,g)})}function K(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Y].concat(t))}function H(e,r,l){var i=void 0===l?{}:l,u=i.exact,c=void 0===u||u,s=i.collapseWhitespace,f=i.trim,p=i.normalizer,d=c?n:t,b=a({collapseWhitespace:s,trim:f,normalizer:p});return Array.from(e.querySelectorAll("[title], svg > title")).filter(function(e){return d(e.getAttribute("title"),e,r,b)||d(o(e),e,r,b)})}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[H].concat(t))}function Z(e,r,l){var i=void 0===l?{}:l,u=i.exact,c=void 0===u||u,s=i.collapseWhitespace,f=i.trim,p=i.normalizer,d=c?n:t,b=a({collapseWhitespace:s,trim:f,normalizer:p});return Array.from(e.querySelectorAll("select")).filter(function(e){return Array.from(e.options).filter(function(e){return e.selected}).some(function(e){return d(o(e),e,r,b)})})}function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Z].concat(t))}function ee(){return W.testIdAttribute}var te=U.bind(null,"placeholder"),ne=V.bind(null,"placeholder"),re=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return U.apply(void 0,[ee()].concat(t))},ae=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return V.apply(void 0,[ee()].concat(t))},oe=U.bind(null,"value"),le=V.bind(null,"value"),ie=U.bind(null,"role"),ue=V.bind(null,"role");function ce(e,r,o){var l=void 0===o?{}:o,i=l.exact,u=void 0===i||i,c=l.collapseWhitespace,s=l.trim,f=l.normalizer,p=u?n:t,d=a({collapseWhitespace:c,trim:s,normalizer:f});return Array.from(e.querySelectorAll("img,input,area")).filter(function(e){return p(e.getAttribute("alt"),e,r,d)})}function se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[ce].concat(t))}function fe(e,r,l){var i=void 0===l?{}:l,u=i.exact,c=void 0===u||u,s=i.collapseWhitespace,f=i.trim,p=i.normalizer,d=c?n:t,b=a({collapseWhitespace:s,trim:f,normalizer:p});return Array.from(e.querySelectorAll("input,textarea,select")).filter(function(e){return"SELECT"===e.tagName?Array.from(e.options).filter(function(e){return e.selected}).some(function(e){return d(o(e),e,r,b)}):d(e.value,e,r,b)})}function pe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[fe].concat(t))}function de(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=ae.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element by: ["+ee()+'="'+t+'"]',e);return o}function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[de].concat(t))}function ve(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=H.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the title: "+t+".",e);return o}function ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[ve].concat(t))}function he(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=le.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the value: "+t+".",e);return o}function ge(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[he].concat(t))}function me(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=ne.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the placeholder text of: "+t,e);return o}function we(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[me].concat(t))}function Ee(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=J.apply(void 0,[e,t].concat(r));if(!o.length)throw $.apply(void 0,[e,t].concat(r)).length?L("Found a label with the text of: "+t+', however no form control was found associated to that label. Make sure you\'re using the "for" attribute or "aria-labelledby" attribute correctly.',e):L("Unable to find a label with the text of: "+t,e);return o}function Te(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Ee].concat(t))}function Ae(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=Y.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the text: "+t+". 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.",e);return o}function xe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Ae].concat(t))}function Me(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=ce.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the alt text: "+t,e);return o}function Oe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Me].concat(t))}function Ie(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=ue.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element by role="+t,e);return o}function Be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[Ie].concat(t))}function _e(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=Z.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find a <select> element with the selected option's text: "+t,e);return o}function ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[_e].concat(t))}function je(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=fe.apply(void 0,[e,t].concat(r));if(!o.length)throw L("Unable to find an element with the value: "+t+".",e);return o}function Se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R.apply(void 0,[je].concat(t))}var De=Object.freeze({queryByPlaceholderText:te,queryAllByPlaceholderText:ne,getByPlaceholderText:we,getAllByPlaceholderText:me,queryByText:K,queryAllByText:Y,getByText:xe,getAllByText:Ae,queryByLabelText:G,queryAllByLabelText:J,getByLabelText:Te,getAllByLabelText:Ee,queryByAltText:se,queryAllByAltText:ce,getByAltText:Oe,getAllByAltText:Me,queryBySelectText:X,queryAllBySelectText:Z,getBySelectText:ke,getAllBySelectText:_e,queryByTestId:re,queryAllByTestId:ae,getByTestId:be,getAllByTestId:de,queryByTitle:Q,queryAllByTitle:H,getByTitle:ye,getAllByTitle:ve,queryByValue:oe,queryAllByValue:le,getByValue:ge,getAllByValue:he,queryByDisplayValue:pe,queryAllByDisplayValue:fe,getByDisplayValue:Se,getAllByDisplayValue:je,queryByRole:ie,queryAllByRole:ue,getAllByRole:Ie,getByRole:Be});function qe(e,t){return void 0===t&&(t=De),Object.keys(t).reduce(function(n,r){var a=t[r];return n[r]=a.bind(null,e),n},{})}var Pe=p(d(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="undefined"!=typeof window?window:f,r=n.setTimeout,a=n.Date.now;t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=a();return new Promise(function(l,i){var u=function(e){a()-o>=t?i(e):r(c,n)};function c(){try{Promise.resolve(e()).then(function(){return l()}).catch(u)}catch(e){u(e)}}r(c,0)})},e.exports=t.default}));var ze=function(e){if("undefined"!=typeof window&&void 0!==window.MutationObserver)return window.MutationObserver;function t(e){this._watched=[],this._listener=e}function n(t){var n={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};for(var r in t)v(n,r)&&t[r]!==e&&(n[r]=t[r]);return n}function r(t,r){var a=u(t,r);return function(o){var l,s=o.length;r.charData&&3===t.nodeType&&t.nodeValue!==a.charData&&o.push(new n({type:"characterData",target:t,oldValue:a.charData})),r.attr&&a.attr&&i(o,t,a.attr,r.afilter),(r.kids||r.descendents)&&(l=function(t,r,a,o){var l;function u(e,r,a,l,u){for(var c,f,p,d=e.length-1,b=-~((d-u)/2);p=e.pop();)c=a[p.i],f=l[p.j],o.kids&&b&&Math.abs(p.i-p.j)>=d&&(t.push(n({type:"childList",target:r,addedNodes:[c],removedNodes:[c],nextSibling:c.nextSibling,previousSibling:c.previousSibling})),b--),o.attr&&f.attr&&i(t,c,f.attr,o.afilter),o.charData&&3===c.nodeType&&c.nodeValue!==f.charData&&t.push(n({type:"characterData",target:c,oldValue:f.charData})),o.descendents&&s(c,f)}function s(r,a){for(var f,d,v,y,h,g,m,w=r.childNodes,E=a.kids,T=w.length,A=E?E.length:0,x=0,M=0,O=0;M<T||O<A;)g=w[M],h=E[O],m=h&&h.node,g===m?(o.attr&&h.attr&&i(t,g,h.attr,o.afilter),o.charData&&h.charData!==e&&g.nodeValue!==h.charData&&t.push(n({type:"characterData",target:g,oldValue:h.charData})),d&&u(d,r,w,E,x),o.descendents&&(g.childNodes.length||h.kids&&h.kids.length)&&s(g,h),M++,O++):(l=!0,f||(f={},d=[]),g&&(f[v=p(g)]||(f[v]=!0,-1===(y=c(E,g,O))?o.kids&&(t.push(n({type:"childList",target:r,addedNodes:[g],nextSibling:g.nextSibling,previousSibling:g.previousSibling})),x++):d.push({i:M,j:y})),M++),m&&m!==w[M]&&(f[v=p(m)]||(f[v]=!0,-1===(y=b(w,m,M))?o.kids&&(t.push(n({type:"childList",target:a.node,removedNodes:[m],nextSibling:E[O+1],previousSibling:E[O-1]})),x--):d.push({i:y,j:O})),O++));d&&u(d,r,w,E,x)}return s(r,a),l}(o,t,a,r)),(l||o.length!==s)&&(a=u(t,r))}}t._period=30,t.prototype={observe:function(e,n){for(var a,o={attr:!!(n.attributes||n.attributeFilter||n.attributeOldValue),kids:!!n.childList,descendents:!!n.subtree,charData:!(!n.characterData&&!n.characterDataOldValue)},l=this._watched,i=0;i<l.length;i++)l[i].tar===e&&l.splice(i,1);n.attributeFilter&&(o.afilter=d(n.attributeFilter,function(e,t){return e[t]=!0,e},{})),l.push({tar:e,fn:r(e,o)}),this._timeout||(a=this,function e(){var n=a.takeRecords();n.length&&a._listener(n,a),a._timeout=setTimeout(e,t._period)}())},takeRecords:function(){for(var e=[],t=this._watched,n=0;n<t.length;n++)t[n].fn(e);return e},disconnect:function(){this._watched=[],clearTimeout(this._timeout),this._timeout=null}};var a=!1;if("undefined"!=typeof document){var o=document.createElement("i");o.style.top=0,a="null"!=o.attributes.style.value}var l=a?function(e,t){return t.value}:function(e,t){return"style"!==t.name?t.value:e.style.cssText};function i(e,t,r,a){for(var o,i={},u=t.attributes,c=u.length;c--;)s=(o=u[c]).name,a&&!v(a,s)||(l(t,o)!==r[s]&&e.push(n({type:"attributes",target:t,attributeName:s,oldValue:r[s],attributeNamespace:o.namespaceURI})),i[s]=!0);for(var s in r)i[s]||e.push(n({target:t,type:"attributes",attributeName:s,oldValue:r[s]}))}function u(e,t){var n=!0;return function e(r){var a={node:r};return!t.charData||3!==r.nodeType&&8!==r.nodeType?(t.attr&&n&&1===r.nodeType&&(a.attr=d(r.attributes,function(e,n){return t.afilter&&!t.afilter[n.name]||(e[n.name]=l(r,n)),e},{})),n&&(t.kids||t.charData||t.attr&&t.descendents)&&(a.kids=function(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r,e);return n}(r.childNodes,e)),n=t.descendents):a.charData=r.nodeValue,a}(e)}function c(e,t,n){return b(e,t,n,"node")}var s=1,f="mo_id";function p(e){try{return e.id||(e[f]=e[f]||s++)}catch(t){try{return e.nodeValue}catch(e){return s++}}}function d(e,t,n){for(var r=0;r<e.length;r++)n=t(n,e[r],r,e);return n}function b(e,t,n,r){for(;n<e.length;n++)if((r?e[n][r]:e[n])===t)return n;return-1}function v(t,n){return t[n]!==e}return t}(void 0);function Ce(e){return new("undefined"!=typeof window&&void 0!==window.MutationObserver?window.MutationObserver:ze)(e)}function Ne(){if("undefined"==typeof window)throw new Error("Could not find default container");return window.document}var Le={copy:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},cut:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},paste:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},compositionEnd:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0}},compositionStart:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!0}},compositionUpdate:{EventType:"CompositionEvent",defaultInit:{bubbles:!0,cancelable:!1}},keyDown:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},keyPress:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},keyUp:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0}},focus:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1}},blur:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1}},focusIn:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1}},focusOut:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1}},change:{EventType:"InputEvent",defaultInit:{bubbles:!0,cancelable:!0}},input:{EventType:"InputEvent",defaultInit:{bubbles:!0,cancelable:!0}},invalid:{EventType:"Event",defaultInit:{bubbles:!1,cancelable:!0}},submit:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!0}},click:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,button:0}},contextMenu:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},dblClick:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},drag:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},dragEnd:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1}},dragEnter:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},dragExit:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1}},dragLeave:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!1}},dragOver:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},dragStart:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},drop:{EventType:"DragEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseDown:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseEnter:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseLeave:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseMove:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseOut:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseOver:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},mouseUp:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0}},select:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!1}},touchCancel:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!1}},touchEnd:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0}},touchMove:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0}},touchStart:{EventType:"TouchEvent",defaultInit:{bubbles:!0,cancelable:!0}},scroll:{EventType:"UIEvent",defaultInit:{bubbles:!1,cancelable:!1}},wheel:{EventType:"WheelEvent",defaultInit:{bubbles:!0,cancelable:!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:"UIEvent",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}},transitionEnd:{EventType:"TransitionEvent",defaultInit:{bubbles:!0,cancelable:!0}}},Re={doubleClick:"dblClick"};function Ve(e,t){return e.dispatchEvent(t)}Object.keys(Le).forEach(function(e){var t=Le[e],n=t.EventType,r=t.defaultInit,a=e.toLowerCase();Ve[e]=function(e,t){var o=l({},r,t),i=o.target,u=(i=void 0===i?{}:i).value,c=i.files,s=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(i,["value","files"]);Object.assign(e,s),void 0!==u&&function(e,t){var n=(Object.getOwnPropertyDescriptor(e,"value")||{}).set,r=Object.getPrototypeOf(e),a=(Object.getOwnPropertyDescriptor(r,"value")||{}).set;if(a&&n!==a)a.call(e,t);else{if(!n)throw new Error("The given element does not have a value setter");n.call(e,t)}}(e,u),void 0!==c&&Object.defineProperty(e,"files",{configurable:!0,enumerable:!0,writable:!0,value:c});var f=e.ownerDocument.defaultView;return Ve(e,new(f[n]||f.Event)(a,o))}}),Object.keys(Re).forEach(function(e){var t=Re[e];Ve[e]=function(){return Ve[t].apply(Ve,arguments)}}),e.bindElementToQueries=qe,e.within=qe,e.queries=De,e.queryHelpers=F,e.getDefaultNormalizer=r,e.configure=function(e){"function"==typeof e&&(e=e(W)),W=l({},W,e)},e.queryByPlaceholderText=te,e.queryAllByPlaceholderText=ne,e.getByPlaceholderText=we,e.getAllByPlaceholderText=me,e.queryByText=K,e.queryAllByText=Y,e.getByText=xe,e.getAllByText=Ae,e.queryByLabelText=G,e.queryAllByLabelText=J,e.getByLabelText=Te,e.getAllByLabelText=Ee,e.queryByAltText=se,e.queryAllByAltText=ce,e.getByAltText=Oe,e.getAllByAltText=Me,e.queryBySelectText=X,e.queryAllBySelectText=Z,e.getBySelectText=ke,e.getAllBySelectText=_e,e.queryByTestId=re,e.queryAllByTestId=ae,e.getByTestId=be,e.getAllByTestId=de,e.queryByTitle=Q,e.queryAllByTitle=H,e.getByTitle=ye,e.getAllByTitle=ve,e.queryByValue=oe,e.queryAllByValue=le,e.getByValue=ge,e.getAllByValue=he,e.queryByDisplayValue=pe,e.queryAllByDisplayValue=fe,e.getByDisplayValue=Se,e.getAllByDisplayValue=je,e.queryByRole=ie,e.queryAllByRole=ue,e.getAllByRole=Ie,e.getByRole=Be,e.wait=function(e,t){void 0===e&&(e=function(){});var n=void 0===t?{}:t,r=n.timeout,a=void 0===r?4500:r,o=n.interval;return Pe(e,a,void 0===o?50:o)},e.waitForElement=function(e,t){var n=void 0===t?{}:t,r=n.container,a=void 0===r?Ne():r,o=n.timeout,l=void 0===o?4500:o,i=n.mutationObserverOptions,u=void 0===i?{subtree:!0,childList:!0,attributes:!0,characterData:!0}:i;return new Promise(function(t,n){var r;"function"!=typeof e&&n("waitForElement requires a callback as the first parameter");var o=setTimeout(function(){c(r||new Error("Timed out in waitForElement."),null)},l),i=Ce(s);function c(e,r){clearTimeout(o),setImmediate(function(){return i.disconnect()}),e?n(e):t(r)}function s(){try{var t=e();t&&c(null,t)}catch(e){r=e}}i.observe(a,u),s()})},e.waitForDomChange=function(e){var t=void 0===e?{}:e,n=t.container,r=void 0===n?Ne():n,a=t.timeout,o=void 0===a?4500:a,l=t.mutationObserverOptions,i=void 0===l?{subtree:!0,childList:!0,attributes:!0,characterData:!0}:l;return new Promise(function(e,t){var n=setTimeout(function(){l(new Error("Timed out in waitForDomChange."),null)},o),a=Ce(function(e){l(null,e)});function l(r,o){clearTimeout(n),setImmediate(function(){return a.disconnect()}),r?t(r):e(o)}a.observe(r,i)})},e.getNodeText=o,e.fireEvent=Ve,e.getQueriesForElement=qe,e.debugDOM=N,e.getElementError=L,e.firstResultOrNull=R,e.queryAllByAttribute=V,e.queryByAttribute=U,e.prettyDOM=C,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=dom-testing-library.umd.min.js.map |
@@ -10,3 +10,8 @@ "use strict"; | ||
const window = node.ownerDocument.defaultView; | ||
if (node.matches('input[type=submit], input[type=button]')) { | ||
return node.value; | ||
} | ||
return Array.from(node.childNodes).filter(child => child.nodeType === window.Node.TEXT_NODE && Boolean(child.textContent)).map(c => c.textContent).join(''); | ||
} |
{ | ||
"name": "dom-testing-library", | ||
"version": "3.16.1", | ||
"version": "3.16.2", | ||
"description": "Simple and complete DOM testing utilities that encourage good testing practices.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
1086
README.md
@@ -9,2 +9,5 @@ <div align="center"> | ||
<p>Simple and complete DOM testing utilities that encourage good testing practices.</p> | ||
[**Read the docs**](https://react-testing-library-docs.netlify.com/) | [Edit the docs](https://github.com/alexkrolick/react-testing-library-docs) | ||
</div> | ||
@@ -14,2 +17,3 @@ | ||
<!-- prettier-ignore-start --> | ||
@@ -37,2 +41,19 @@ [![Build Status][build-badge]][build] | ||
## Table of Contents | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
- [The Problem](#the-problem) | ||
- [This Solution](#this-solution) | ||
- [Example](#example) | ||
- [Installation](#installation) | ||
- [Implementations](#implementations) | ||
- [Other Solutions](#other-solutions) | ||
- [Guiding Principles](#guiding-principles) | ||
- [Contributors](#contributors) | ||
- [LICENSE](#license) | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
## The problem | ||
@@ -60,64 +81,2 @@ | ||
As part of this goal, the utilities this library provides facilitate querying | ||
the DOM in the same way the user would. Finding for elements by their label text | ||
(just like a user would), finding links and buttons from their text | ||
(like a user would), and more. It also exposes a recommended way to find | ||
elements by a `data-testid` as an "escape hatch" for elements where the text | ||
content and label do not make sense or is not practical. | ||
This library encourages your applications to be more accessible and allows you | ||
to get your tests closer to using your components the way a user will, which | ||
allows your tests to give you more confidence that your application will work | ||
when a real user uses it. | ||
**What this library is not**: | ||
1. A test runner or framework | ||
2. Specific to a testing framework (though we recommend Jest as our | ||
preference, the library works with any framework. See [Using Without Jest](#using-without-jest)) | ||
## Table of Contents | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
- [`getByLabelText`](#getbylabeltext) | ||
- [`getByPlaceholderText`](#getbyplaceholdertext) | ||
- [`getByText`](#getbytext) | ||
- [`getByAltText`](#getbyalttext) | ||
- [`getByTitle`](#getbytitle) | ||
- [`getByDisplayValue`](#getbydisplayvalue) | ||
- [`getByRole`](#getbyrole) | ||
- [`getByTestId`](#getbytestid) | ||
- [`wait`](#wait) | ||
- [`waitForElement`](#waitforelement) | ||
- [`waitForDomChange`](#waitfordomchange) | ||
- [`fireEvent`](#fireevent) | ||
- [`getNodeText`](#getnodetext) | ||
- [Custom Jest Matchers](#custom-jest-matchers) | ||
- [Custom Queries](#custom-queries) | ||
- [Using other assertion libraries](#using-other-assertion-libraries) | ||
- [`TextMatch`](#textmatch) | ||
- [Precision](#precision) | ||
- [Normalization](#normalization) | ||
- [TextMatch Examples](#textmatch-examples) | ||
- [`query` APIs](#query-apis) | ||
- [`queryAll` and `getAll` APIs](#queryall-and-getall-apis) | ||
- [`within` and `getQueriesForElement` APIs](#within-and-getqueriesforelement-apis) | ||
- [Debugging](#debugging) | ||
- [`prettyDOM`](#prettydom) | ||
- [Configuration](#configuration) | ||
- [Great companion](#great-companion) | ||
- [Implementations](#implementations) | ||
- [Using Without Jest](#using-without-jest) | ||
- [FAQ](#faq) | ||
- [Other Solutions](#other-solutions) | ||
- [Guiding Principles](#guiding-principles) | ||
- [Contributors](#contributors) | ||
- [LICENSE](#license) | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
## Installation | ||
@@ -132,866 +91,4 @@ | ||
## Usage | ||
> [**Docs**](https://react-testing-library-docs.netlify.com/docs/install) | ||
Note: | ||
- Each of the `get` APIs below have a matching [`getAll`](#queryall-and-getall-apis) API that returns all elements instead of just the first one, and [`query`](#query-apis)/[`queryAll`](#queryall-and-getall-apis) that return `null`/`[]` instead of throwing an error. | ||
- See [TextMatch](#textmatch) for details on the `exact`, `trim`, and `collapseWhitespace` options. | ||
```javascript | ||
// src/__tests__/example.js | ||
// query utilities: | ||
import { | ||
getByLabelText, | ||
getByText, | ||
getByTestId, | ||
queryByTestId, | ||
// Tip: all queries are also exposed on an object | ||
// called "queries" which you could import here as well | ||
wait, | ||
} from 'dom-testing-library' | ||
// adds special assertions like toHaveTextContent | ||
import 'jest-dom/extend-expect' | ||
function getExampleDOM() { | ||
// This is just a raw example of setting up some DOM | ||
// that we can interact with. Swap this with your UI | ||
// framework of choice π | ||
const div = document.createElement('div') | ||
div.innerHTML = ` | ||
<label for="username">Username</label> | ||
<input id="username" /> | ||
<button>Print Username</button> | ||
` | ||
const button = div.querySelector('button') | ||
const input = div.querySelector('input') | ||
button.addEventListener('click', () => { | ||
// let's pretend this is making a server request, so it's async | ||
// (you'd want to mock this imaginary request in your unit tests)... | ||
setTimeout(() => { | ||
const printedUsernameContainer = document.createElement('div') | ||
printedUsernameContainer.innerHTML = ` | ||
<div data-testid="printed-username">${input.value}</div> | ||
` | ||
div.appendChild(printedUsernameContainer) | ||
}, Math.floor(Math.random() * 200)) | ||
}) | ||
return div | ||
} | ||
test('examples of some things', async () => { | ||
const famousWomanInHistory = 'Ada Lovelace' | ||
const container = getExampleDOM() | ||
// Get form elements by their label text. | ||
// An error will be thrown if one cannot be found (accessibility FTW!) | ||
const input = getByLabelText(container, 'Username') | ||
input.value = famousWomanInHistory | ||
// Get elements by their text, just like a real user does. | ||
getByText(container, 'Print Username').click() | ||
await wait(() => | ||
expect(queryByTestId(container, 'printed-username')).toBeTruthy(), | ||
) | ||
// getByTestId and queryByTestId are an escape hatch to get elements | ||
// by a test id (could also attempt to get this element by it's text) | ||
expect(getByTestId(container, 'printed-username')).toHaveTextContent( | ||
famousWomanInHistory, | ||
) | ||
// jest snapshots work great with regular DOM nodes! | ||
expect(container).toMatchSnapshot() | ||
}) | ||
``` | ||
### `getByLabelText` | ||
```typescript | ||
getByLabelText( | ||
container: HTMLElement, | ||
text: TextMatch, | ||
options?: { | ||
selector?: string = '*', | ||
exact?: boolean = true, | ||
normalizer?: NormalizerFn, | ||
}): HTMLElement | ||
``` | ||
This will search for the label that matches the given [`TextMatch`](#textmatch), | ||
then find the element associated with that label. | ||
```javascript | ||
const inputNode = getByLabelText(container, 'Username') | ||
// this would find the input node for the following DOM structures: | ||
// The "for" attribute (NOTE: in JSX with React you'll write "htmlFor" rather than "for") | ||
// <label for="username-input">Username</label> | ||
// <input id="username-input" /> | ||
// | ||
// The aria-labelledby attribute with form elements | ||
// <label id="username-label">Username</label> | ||
// <input aria-labelledby="username-label" /> | ||
// | ||
// The aria-labelledby attribute with other elements | ||
// <section aria-labelledby="section-one-header"> | ||
// <h3 id="section-one-header">Section One</h3> | ||
// <p>some content...</p> | ||
// <section> | ||
// | ||
// Wrapper labels | ||
// <label>Username <input /></label> | ||
// | ||
// It will NOT find the input node for this: | ||
// <label><span>Username</span> <input /></label> | ||
// | ||
// For this case, you can provide a `selector` in the options: | ||
const inputNode = getByLabelText(container, 'username', {selector: 'input'}) | ||
// and that would work | ||
// Note that <input aria-label="username" /> will also work, but take | ||
// care because this is not a label that users can see on the page. So | ||
// the purpose of your input should be obvious for those users. | ||
``` | ||
> Note: This method will throw an error if it cannot find the node. If you don't | ||
> want this behavior (for example you wish to assert that it doesn't exist), | ||
> then use `queryByLabelText` instead. | ||
### `getByPlaceholderText` | ||
```typescript | ||
getByPlaceholderText( | ||
container: HTMLElement, | ||
text: TextMatch, | ||
options?: { | ||
exact?: boolean = true, | ||
normalizer?: NormalizerFn, | ||
}): HTMLElement | ||
``` | ||
This will search for all elements with a placeholder attribute and find one | ||
that matches the given [`TextMatch`](#textmatch). | ||
```javascript | ||
// <input placeholder="Username" /> | ||
const inputNode = getByPlaceholderText(container, 'Username') | ||
``` | ||
> NOTE: a placeholder is not a good substitute for a label so you should | ||
> generally use `getByLabelText` instead. | ||
### `getByText` | ||
```typescript | ||
getByText( | ||
container: HTMLElement, | ||
text: TextMatch, | ||
options?: { | ||
selector?: string = '*', | ||
exact?: boolean = true, | ||
ignore?: string|boolean = 'script, style', | ||
normalizer?: NormalizerFn, | ||
}): HTMLElement | ||
``` | ||
This will search for all elements that have a text node with `textContent` | ||
matching the given [`TextMatch`](#textmatch). | ||
```javascript | ||
// <a href="/about">About βΉοΈ</a> | ||
const aboutAnchorNode = getByText(container, /about/i) | ||
``` | ||
> NOTE: see [`getByLabelText`](#getbylabeltext) for more details on how and when to use the `selector` option | ||
The `ignore` option accepts a query selector. If the | ||
[`node.matches`](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches) | ||
returns true for that selector, the node will be ignored. This defaults to | ||
`'script'` because generally you don't want to select script tags, but if your | ||
content is in an inline script file, then the script tag could be returned. | ||
If you'd rather disable this behavior, set `ignore` to `false`. | ||
### `getByAltText` | ||
```typescript | ||
getByAltText( | ||
container: HTMLElement, | ||
text: TextMatch, | ||
options?: { | ||
exact?: boolean = true, | ||
normalizer?: NormalizerFn, | ||
}): HTMLElement | ||
``` | ||
This will return the element (normally an `<img>`) that has the given `alt` | ||
text. Note that it only supports elements which accept an `alt` attribute: | ||
[`<img>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img), | ||
[`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input), | ||
and [`<area>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area) | ||
(intentionally excluding [`<applet>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/applet) as it's deprecated). | ||
```javascript | ||
// <img alt="Incredibles 2 Poster" src="/incredibles-2.png" /> | ||
const incrediblesPosterImg = getByAltText(container, /incredibles.*poster$/i) | ||
``` | ||
### `getByTitle` | ||
```typescript | ||
getByTitle( | ||
container: HTMLElement, | ||
title: TextMatch, | ||
options?: { | ||
exact?: boolean = true, | ||
normalizer?: NormalizerFn, | ||
}): HTMLElement | ||
``` | ||
Returns the element that has the matching `title` attribute. | ||
```javascript | ||
// <span title="Delete" id="2" /> | ||
const deleteElement = getByTitle(container, 'Delete') | ||
``` | ||
Will also find a `title` element within an SVG. | ||
```javascript | ||
// <svg> <title>Close</title> <g> <path /> </g> </svg> | ||
const closeElement = getByTitle(container, 'Close') | ||
``` | ||
### `getByDisplayValue` | ||
```typescript | ||
getByDisplayValue( | ||
container: HTMLElement, | ||
value: TextMatch, | ||
options?: { | ||
exact?: boolean = true, | ||
normalizer?: NormalizerFn, | ||
}): HTMLElement | ||
``` | ||
Returns the `input`, `textarea`, or `select` element that has the matching display value. | ||
#### `input` | ||
```javascript | ||
// <input type="text" id="lastName" /> | ||
// document.getElementById('lastName').value = 'Norris' | ||
const lastNameInput = getByDisplayValue(container, 'Norris') | ||
``` | ||
#### `textarea` | ||
```javascript | ||
// <textarea id="messageTextArea"></textarea> | ||
// document.getElementById('messageTextArea').value = 'Hello World' | ||
const messageTextArea = getByDisplayValue(container, 'Hello World') | ||
``` | ||
#### `select` | ||
```javascript | ||
// <select id="state-select" data-testid="state"> | ||
// <option value="">State</option> | ||
// <option value="AL">Alabama</option> | ||
// <option selected value="AK" >Alaska</option> | ||
// <option value="AZ">Arizona</option> | ||
// </select> | ||
const selectElement = getByDisplayName(container, 'Alaska') | ||
``` | ||
In case of `select`, this will search for a `<select>` whose selected `<option>` matches the given [`TextMatch`](#textmatch). | ||
### `getByRole` | ||
```typescript | ||
getByRole( | ||
container: HTMLElement, | ||
text: TextMatch, | ||
options?: { | ||
exact?: boolean = true, | ||
normalizer?: NormalizerFn, | ||
}): HTMLElement | ||
``` | ||
A shortcut to `` container.querySelector(`[role="${yourRole}"]`) `` (and it | ||
also accepts a [`TextMatch`](#textmatch)). | ||
```javascript | ||
// <div role="dialog">...</div> | ||
const dialogContainer = getByRole(container, 'dialog') | ||
``` | ||
### `getByTestId` | ||
```typescript | ||
getByTestId( | ||
container: HTMLElement, | ||
text: TextMatch, | ||
options?: { | ||
exact?: boolean = true, | ||
normalizer?: NormalizerFn, | ||
}): HTMLElement | ||
``` | ||
A shortcut to `` container.querySelector(`[data-testid="${yourId}"]`) `` (and it | ||
also accepts a [`TextMatch`](#textmatch)). | ||
```javascript | ||
// <input data-testid="username-input" /> | ||
const usernameInputElement = getByTestId(container, 'username-input') | ||
``` | ||
> In the spirit of [the guiding principles](#guiding-principles), it is | ||
> recommended to use this only after the other queries don't work for your use | ||
> case. Using data-testid attributes do not resemble how your software is used | ||
> and should be avoided if possible. That said, they are _way_ better than | ||
> querying based on DOM structure or styling css class names. Learn more about | ||
> `data-testid`s from the blog post | ||
> ["Making your UI tests resilient to change"][data-testid-blog-post] | ||
#### Overriding `data-testid` | ||
The `...ByTestId` functions in `dom-testing-library` use the attribute `data-testid` | ||
by default, following the precedent set by | ||
[React Native Web](https://github.com/kentcdodds/react-testing-library/issues/1) | ||
which uses a `testID` prop to emit a `data-testid` attribute on the element, | ||
and we recommend you adopt that attribute where possible. | ||
But if you already have an existing codebase that uses a different attribute | ||
for this purpose, you can override this value via | ||
`configure({testIdAttribute: 'data-my-test-attribute'})`. | ||
### `wait` | ||
```typescript | ||
function wait( | ||
callback?: () => void, | ||
options?: { | ||
timeout?: number | ||
interval?: number | ||
}, | ||
): Promise<void> | ||
``` | ||
When in need to wait for non-deterministic periods of time you can use `wait`, | ||
to wait for your expectations to pass. The `wait` function is a small wrapper | ||
around the | ||
[`wait-for-expect`](https://github.com/TheBrainFamily/wait-for-expect) module. | ||
Here's a simple example: | ||
```javascript | ||
// ... | ||
// Wait until the callback does not throw an error. In this case, that means | ||
// it'll wait until we can get a form control with a label that matches "username". | ||
await wait(() => getByLabelText(container, 'username')) | ||
getByLabelText(container, 'username').value = 'chucknorris' | ||
// ... | ||
``` | ||
This can be useful if you have a unit test that mocks API calls and you need | ||
to wait for your mock promises to all resolve. | ||
The default `callback` is a no-op function (used like `await wait()`). This can | ||
be helpful if you only need to wait for one tick of the event loop (in the case | ||
of mocked API calls with promises that resolve immediately). | ||
The default `timeout` is `4500ms` which will keep you under | ||
[Jest's default timeout of `5000ms`](https://facebook.github.io/jest/docs/en/jest-object.html#jestsettimeouttimeout). | ||
The default `interval` is `50ms`. However it will run your callback immediately | ||
on the next tick of the event loop (in a `setTimeout`) before starting the | ||
intervals. | ||
### `waitForElement` | ||
```typescript | ||
function waitForElement<T>( | ||
callback: () => T, | ||
options?: { | ||
container?: HTMLElement | ||
timeout?: number | ||
mutationObserverOptions?: MutationObserverInit | ||
}, | ||
): Promise<T> | ||
``` | ||
When in need to wait for DOM elements to appear, disappear, or change you can use `waitForElement`. | ||
The `waitForElement` function is a small wrapper around the [`MutationObserver`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver). | ||
Here's a simple example: | ||
```javascript | ||
// ... | ||
// Wait until the callback does not throw an error and returns a truthy value. In this case, that means | ||
// it'll wait until we can get a form control with a label that matches "username". | ||
// The difference from `wait` is that rather than running your callback on | ||
// an interval, it's run as soon as there are DOM changes in the container | ||
// and returns the value returned by the callback. | ||
const usernameElement = await waitForElement( | ||
() => getByLabelText(container, 'username'), | ||
{container}, | ||
) | ||
usernameElement.value = 'chucknorris' | ||
// ... | ||
``` | ||
You can also wait for multiple elements at once: | ||
```javascript | ||
const [usernameElement, passwordElement] = await waitForElement( | ||
() => [ | ||
getByLabelText(container, 'username'), | ||
getByLabelText(container, 'password'), | ||
], | ||
{container}, | ||
) | ||
``` | ||
Using [`MutationObserver`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) is more efficient than polling the DOM at regular intervals with `wait`. This library sets up a [`'mutationobserver-shim'`](https://github.com/megawac/MutationObserver.js) on the global `window` object for cross-platform compatibility with older browsers and the [`jsdom`](https://github.com/jsdom/jsdom/issues/639) that is usually used in Node-based tests. | ||
The default `container` is the global `document`. Make sure the elements you wait for will be attached to it, or set a different `container`. | ||
The default `timeout` is `4500ms` which will keep you under | ||
[Jest's default timeout of `5000ms`](https://facebook.github.io/jest/docs/en/jest-object.html#jestsettimeouttimeout). | ||
<a name="mutationobserveroptions"></a>The default `mutationObserverOptions` is `{subtree: true, childList: true, attributes: true, characterData: true}` which will detect | ||
additions and removals of child elements (including text nodes) in the `container` and any of its descendants. It will also detect attribute changes. | ||
### `waitForDomChange` | ||
```typescript | ||
function waitForDomChange<T>(options?: { | ||
container?: HTMLElement | ||
timeout?: number | ||
mutationObserverOptions?: MutationObserverInit | ||
}): Promise<T> | ||
``` | ||
When in need to wait for the DOM to change you can use `waitForDomChange`. The `waitForDomChange` | ||
function is a small wrapper around the | ||
[`MutationObserver`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver). | ||
Here is an example where the promise will be resolved because the container is changed: | ||
```javascript | ||
const container = document.createElement('div') | ||
waitForDomChange({container}) | ||
.then(() => console.log('DOM changed!')) | ||
.catch(err => console.log(`Error you need to deal with: ${err}`)) | ||
container.append(document.createElement('p')) | ||
// if π was the only code affecting the container and it was not run, | ||
// waitForDomChange would throw an error | ||
``` | ||
The promise will resolve with a [`mutationsList`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/MutationObserver) which you can use to determine what kind of a change (or changes) affected the container | ||
```javascript | ||
const container = document.createElement('div') | ||
container.setAttribute('data-cool', 'true') | ||
waitForDomChange({container}).then(mutationsList => { | ||
const mutation = mutationsList[0] | ||
console.log( | ||
`was cool: ${mutation.oldValue}\ncurrently cool: ${ | ||
mutation.target.dataset.cool | ||
}`, | ||
) | ||
}) | ||
container.setAttribute('data-cool', 'false') | ||
/* | ||
logs: | ||
was cool: true | ||
currently cool: false | ||
*/ | ||
``` | ||
Using [`MutationObserver`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) is more efficient than polling the DOM at regular intervals with `wait`. This library sets up a [`'mutationobserver-shim'`](https://github.com/megawac/MutationObserver.js) on the global `window` object for cross-platform compatibility with older browsers and the [`jsdom`](https://github.com/jsdom/jsdom/issues/639) that is usually used in Node-based tests. | ||
The default `container` is the global `document`. Make sure the elements you wait for will be attached to it, or set a different `container`. | ||
The default `timeout` is `4500ms` which will keep you under | ||
[Jest's default timeout of `5000ms`](https://facebook.github.io/jest/docs/en/jest-object.html#jestsettimeouttimeout). | ||
<a name="mutationobserveroptions"></a>The default `mutationObserverOptions` is `{subtree: true, childList: true, attributes: true, characterData: true}` which will detect | ||
additions and removals of child elements (including text nodes) in the `container` and any of its descendants. It will also detect attribute changes. | ||
### `fireEvent` | ||
```typescript | ||
fireEvent(node: HTMLElement, event: Event) | ||
``` | ||
Fire DOM events. | ||
```javascript | ||
// <button>Submit</button> | ||
fireEvent( | ||
getByText(container, 'Submit'), | ||
new MouseEvent('click', { | ||
bubbles: true, | ||
cancelable: true, | ||
}), | ||
) | ||
``` | ||
#### `fireEvent[eventName]` | ||
```typescript | ||
fireEvent[eventName](node: HTMLElement, eventProperties: Object) | ||
``` | ||
Convenience methods for firing DOM events. Check out | ||
[src/events.js](https://github.com/kentcdodds/dom-testing-library/blob/master/src/events.js) | ||
for a full list as well as default `eventProperties`. | ||
```javascript | ||
// <button>Submit</button> | ||
const rightClick = {button: 2} | ||
fireEvent.click(getByText('Submit'), rightClick) | ||
// default `button` property for click events is set to `0` which is a left click. | ||
``` | ||
**target**: When an event is dispatched on an element, the event has the | ||
subjected element on a property called `target`. As a convenience, if you | ||
provide a `target` property in the `eventProperties` (second argument), then | ||
those properties will be assigned to the node which is receiving the event. | ||
This is particularly useful for a change event: | ||
```javascript | ||
fireEvent.change(getByLabelText(/username/i), {target: {value: 'a'}}) | ||
// note: attempting to manually set the files property of an HTMLInputElement | ||
// results in an error as the files property is read-only. | ||
// this feature works around that by using Object.defineProperty. | ||
fireEvent.change(getByLabelText(/picture/i), { | ||
target: { | ||
files: [new File(['(ββ‘_β‘)'], 'chucknorris.png', {type: 'image/png'})], | ||
}, | ||
}) | ||
``` | ||
**Keyboard events**: There are three event types related to keyboard input - `keyPress`, `keyDown`, and `keyUp`. When firing these you need to reference an element in the DOM and the key you want to fire. | ||
```javascript | ||
fireEvent.keyDown(domNode, {key: 'Enter', code: 13}) | ||
``` | ||
You can find out which key code to use at [https://keycode.info/](https://keycode.info/). | ||
### `getNodeText` | ||
```typescript | ||
getNodeText(node: HTMLElement) | ||
``` | ||
Returns the complete text content of a html element, removing any extra | ||
whitespace. The intention is to treat text in nodes exactly as how it is | ||
perceived by users in a browser, where any extra whitespace within words in the | ||
html code is not meaningful when the text is rendered. | ||
```javascript | ||
// <div> | ||
// Hello | ||
// World ! | ||
// </div> | ||
const text = getNodeText(container.querySelector('div')) // "Hello World !" | ||
``` | ||
This function is also used internally when querying nodes by their text content. | ||
This enables functions like `getByText` and `queryByText` to work as expected, | ||
finding elements in the DOM similarly to how users would do. | ||
## Custom Jest Matchers | ||
When using [jest][], it is convenient to import a set of custom matchers that | ||
make it easier to check several aspects of the state of a DOM element. For | ||
example, you can use the ones provided by | ||
[jest-dom](https://github.com/gnapse/jest-dom): | ||
```javascript | ||
import 'jest-dom/extend-expect' | ||
// <span data-testid="greetings">Hello World</span> | ||
expect(queryByTestId(container, 'greetings')).not.toHaveTextContent('Bye bye') | ||
// ... | ||
``` | ||
> Note: when using some of these matchers, you may need to make sure | ||
> you use a query function (like `queryByTestId`) rather than a get | ||
> function (like `getByTestId`). Otherwise the `get*` function could | ||
> throw an error before your assertion. | ||
Check out [jest-dom's documentation](https://github.com/gnapse/jest-dom#readme) | ||
for a full list of available matchers. | ||
## Custom Queries | ||
`dom-testing-library` exposes many of the helper functions that are used to implement the default queries. You can use the helpers to build custom queries. For example, the code below shows a way to override the default `testId` queries to use a different data-attribute. (Note: test files would import `test-utils.js` instead of using `dom-testing-library` directly). | ||
```js | ||
// test-utils.js | ||
const domTestingLib = require('dom-testing-library') | ||
const {queryHelpers} = domTestingLib | ||
export const queryByTestId = queryHelpers.queryByAttribute.bind( | ||
null, | ||
'data-test-id', | ||
) | ||
export const queryAllByTestId = queryHelpers.queryAllByAttribute.bind( | ||
null, | ||
'data-test-id', | ||
) | ||
export function getAllByTestId(container, id, ...rest) { | ||
const els = queryAllByTestId(container, id, ...rest) | ||
if (!els.length) { | ||
throw queryHelpers.getElementError( | ||
`Unable to find an element by: [data-test-id="${id}"]`, | ||
container, | ||
) | ||
} | ||
return els | ||
} | ||
export function getByTestId(...args) { | ||
return queryHelpers.firstResultOrNull(getAllByTestId, ...args) | ||
} | ||
// re-export with overrides | ||
module.exports = { | ||
...domTestingLib, | ||
getByTestId, | ||
getAllByTestId, | ||
queryByTestId, | ||
queryAllByTestId, | ||
} | ||
``` | ||
### Using other assertion libraries | ||
If you're not using jest, you may be able to find a similar set of custom | ||
assertions for your library of choice. Here's a list of alternatives to jest-dom | ||
for other popular assertion libraries: | ||
- [chai-dom](https://github.com/nathanboktae/chai-dom) | ||
If you're aware of some other alternatives, please [make a pull request][prs] | ||
and add it here! | ||
## `TextMatch` | ||
Several APIs accept a `TextMatch` which can be a `string`, `regex` or a | ||
`function` which returns `true` for a match and `false` for a mismatch. | ||
### Precision | ||
Some APIs accept an object as the final argument that can contain options that | ||
affect the precision of string matching: | ||
- `exact`: Defaults to `true`; matches full strings, case-sensitive. When false, | ||
matches substrings and is not case-sensitive. | ||
- `exact` has no effect on `regex` or `function` arguments. | ||
- In most cases using a regex instead of a string gives you more control over | ||
fuzzy matching and should be preferred over `{ exact: false }`. | ||
- `normalizer`: An optional function which overrides normalization behavior. | ||
See [`Normalization`](#normalization). | ||
### Normalization | ||
Before running any matching logic against text in the DOM, `dom-testing-library` | ||
automatically normalizes that text. By default, normalization consists of | ||
trimming whitespace from the start and end of text, and collapsing multiple | ||
adjacent whitespace characters into a single space. | ||
If you want to prevent that normalization, or provide alternative | ||
normalization (e.g. to remove Unicode control characters), you can provide a | ||
`normalizer` function in the options object. This function will be given | ||
a string and is expected to return a normalized version of that string. | ||
Note: Specifying a value for `normalizer` _replaces_ the built-in normalization, but | ||
you can call `getDefaultNormalizer` to obtain a built-in normalizer, either | ||
to adjust that normalization or to call it from your own normalizer. | ||
`getDefaultNormalizer` takes an options object which allows the selection of behaviour: | ||
- `trim`: Defaults to `true`. Trims leading and trailing whitespace | ||
- `collapseWhitespace`: Defaults to `true`. Collapses inner whitespace (newlines, tabs, repeated spaces) into a single space. | ||
#### Normalization Examples | ||
To perform a match against text without trimming: | ||
```javascript | ||
getByText(node, 'text', {normalizer: getDefaultNormalizer({trim: false})}) | ||
``` | ||
To override normalization to remove some Unicode characters whilst keeping some (but not all) of the built-in normalization behavior: | ||
```javascript | ||
getByText(node, 'text', { | ||
normalizer: str => | ||
getDefaultNormalizer({trim: false})(str).replace(/[\u200E-\u200F]*/g, ''), | ||
}) | ||
``` | ||
### TextMatch Examples | ||
```javascript | ||
// <div> | ||
// Hello World | ||
// </div> | ||
// WILL find the div: | ||
// Matching a string: | ||
getByText(container, 'Hello World') // full string match | ||
getByText(container, 'llo Worl', {exact: false}) // substring match | ||
getByText(container, 'hello world', {exact: false}) // ignore case | ||
// Matching a regex: | ||
getByText(container, /World/) // substring match | ||
getByText(container, /world/i) // substring match, ignore case | ||
getByText(container, /^hello world$/i) // full string match, ignore case | ||
getByText(container, /Hello W?oRlD/i) // advanced regex | ||
// Matching with a custom function: | ||
getByText(container, (content, element) => content.startsWith('Hello')) | ||
// WILL NOT find the div: | ||
getByText(container, 'Goodbye World') // full string does not match | ||
getByText(container, /hello world/) // case-sensitive regex with different case | ||
// function looking for a span when it's actually a div: | ||
getByText(container, (content, element) => { | ||
return element.tagName.toLowerCase() === 'span' && content.startsWith('Hello') | ||
}) | ||
``` | ||
## `query` APIs | ||
Each of the `get` APIs listed in [the 'Usage'](#usage) section above have a | ||
complimentary `query` API. The `get` APIs will throw errors if a proper node | ||
cannot be found. This is normally the desired effect. However, if you want to | ||
make an assertion that an element is _not_ present in the DOM, then you can use | ||
the `query` API instead: | ||
```javascript | ||
const submitButton = queryByText(container, 'submit') | ||
expect(submitButton).toBeNull() // it doesn't exist | ||
// or if you're using the custom matchers: | ||
expect(submitButton).not.toBeTruthy() | ||
``` | ||
## `queryAll` and `getAll` APIs | ||
Each of the `query` APIs have a corresponsing `queryAll` version that always returns an Array of matching nodes. `getAll` is the same but throws when the array has a length of 0. | ||
```javascript | ||
const submitButtons = queryAllByText(container, 'submit') | ||
expect(submitButtons).toHaveLength(3) // expect 3 elements | ||
expect(submitButtons[0]).toBeTruthy() | ||
``` | ||
## `within` and `getQueriesForElement` APIs | ||
`within` (an alias to `getQueriesForElement`) takes a DOM element and binds it to the raw query functions, allowing them | ||
to be used without specifying a container. It is the recommended approach for libraries built on this API | ||
and is in use in `react-testing-library` and `vue-testing-library`. | ||
Example: To get the text 'hello' only within a section called 'messages', you could do: | ||
```javascript | ||
import {within} from 'dom-testing-library' | ||
const {getByText} = within(document.getElementById('messages')) | ||
const helloMessage = getByText('hello') | ||
``` | ||
## Debugging | ||
When you use any `get` calls in your test cases, the current state of the `container` | ||
(DOM) gets printed on the console. For example: | ||
```javascript | ||
// <div>Hello world</div> | ||
getByText(container, 'Goodbye world') // will fail by throwing error | ||
``` | ||
The above test case will fail, however it prints the state of your DOM under test, | ||
so you will get to see: | ||
``` | ||
Unable to find an element with the text: Goodbye world. 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. | ||
Here is the state of your container: | ||
<div> | ||
<div> | ||
Hello World! | ||
</div> | ||
</div> | ||
``` | ||
Note: Since the DOM size can get really large, you can set the limit of DOM content | ||
to be printed via environment variable `DEBUG_PRINT_LIMIT`. The default value is | ||
`7000`. You will see `...` in the console, when the DOM content is stripped off, | ||
because of the length you have set or due to default size limit. Here's how you | ||
might increase this limit when running tests: | ||
``` | ||
DEBUG_PRINT_LIMIT=10000 npm test | ||
``` | ||
This works on macOS/linux, you'll need to do something else for windows. If you'd | ||
like a solution that works for both, see [`cross-env`](https://www.npmjs.com/package/cross-env) | ||
### `prettyDOM` | ||
This helper function can be used to print out readable representation of the DOM | ||
tree of a node. This can be helpful for instance when debugging tests. | ||
It is defined as: | ||
```typescript | ||
function prettyDOM(node: HTMLElement, maxLength?: number): string | ||
``` | ||
It receives the root node to print out, and an optional extra argument to limit | ||
the size of the resulting string, for cases when it becomes too large. | ||
This function is usually used alongside `console.log` to temporarily print out | ||
DOM trees during tests for debugging purposes: | ||
```javascript | ||
const div = document.createElement('div') | ||
div.innerHTML = '<div><h1>Hello World</h1></div>' | ||
console.log(prettyDOM(div)) | ||
// <div> | ||
// <h1>Hello World</h1> | ||
// </div> | ||
``` | ||
This function is what also powers [the automatic debugging output described above](#debugging). | ||
## Configuration | ||
The library can be configured via the `configure` function, which accepts: | ||
- a plain JS object; this will be merged into the existing configuration. e.g. `configure({testIdAttribute: 'not-data-testid'})` | ||
- a function; the function will be given the existing configuration, and should return a plain JS object which will be merged as above, e.g. | ||
`configure(existingConfig => ({something: [...existingConfig.something, 'extra value for the something array']}))` | ||
Configuration options: | ||
`testIdAttribute`: The attribute used by `getByTestId` and related queries. | ||
Defaults to `data-testid`. See [`getByTestId`](#getbytestid). | ||
## Great companion | ||
A helper library named [`user-event`](https://github.com/Gpx/user-event) has been written in companion with `dom-testing-library` which eases common interactions, such as typing, clicking etc. The `type`-interaction will allow to easily dispatch the appropriate keyboard events for inserting text, or dispatch these events for each character of the to be typed text. | ||
## Implementations | ||
@@ -1006,140 +103,5 @@ | ||
- [`pptr-testing-library`](https://github.com/patrickhulce/pptr-testing-library) | ||
- [`cypress-testing-library`](https://github.com/kentcdodds/cypress-testing-library) | ||
- [`vue-testing-library`](https://github.com/dfcook/vue-testing-library) | ||
## Using Without Jest | ||
If you're running your tests in the browser bundled with webpack (or similar) | ||
then `dom-testing-library` should work out of the box for you. However, most | ||
people using `dom-testing-library` are using it with | ||
[the Jest testing framework](https://jestjs.io/) with the `testEnvironment` | ||
set to [`jest-environment-jsdom`](https://www.npmjs.com/package/jest-environment-jsdom) | ||
(which is the default configuration with Jest). | ||
[jsdom](https://github.com/jsdom/jsdom) is a pure JavaScript implementation | ||
of the DOM and browser APIs that runs in node. If you're not using Jest and | ||
you would like to run your tests in Node, then you must install jsdom yourself. | ||
There's also a package called | ||
[jsdom-global](https://github.com/rstacruz/jsdom-global) which can be used | ||
to setup the global environment to simulate the browser APIs. | ||
First, install jsdom and jsdom-global. | ||
``` | ||
npm install --save-dev jsdom jsdom-global | ||
``` | ||
With mocha, the test command would look something like this: | ||
``` | ||
mocha --require jsdom-global/register | ||
``` | ||
> Note, depending on the version of Node you're running, you may also need to install | ||
> `@babel/polyfill` (if you're using babel 7) or `babel-polyfill` (for babel 6). | ||
## FAQ | ||
<details> | ||
<summary>Which get method should I use?</summary> | ||
Based on [the Guiding Principles](#guiding-principles), your test should | ||
resemble how your code (component, page, etc.) as much as possible. With this | ||
in mind, we recommend this order of priority: | ||
1. `getByLabelText`: Only really good for form fields, but this is the number 1 | ||
method a user finds those elements, so it should be your top preference. | ||
2. `getByPlaceholderText`: [A placeholder is not a substitute for a label](https://www.nngroup.com/articles/form-design-placeholders/). | ||
But if that's all you have, then it's better than alternatives. | ||
3. `getByText`: Not useful for forms, but this is the number 1 method a user | ||
finds other elements (like buttons to click), so it should be your top | ||
preference for non-form elements. | ||
4. `getByAltText`: If your element is one which supports `alt` text | ||
(`img`, `area`, and `input`), then you can use this to find that element. | ||
5. `getByTestId`: The user cannot see (or hear) these, so this is only | ||
recommended for cases where you can't match by text or it doesn't make sense | ||
(the text is dynamic). | ||
Other than that, you can also use the `container` to query the rendered | ||
component as well (using the regular | ||
[`querySelector` API](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector)). | ||
</details> | ||
<details> | ||
<summary>Can I write unit tests with this library?</summary> | ||
Definitely yes! You can write unit, integration, functional, and end-to-end | ||
tests with this library. | ||
</details> | ||
<details> | ||
<summary>What if my app is localized and I don't have access to the text in test?</summary> | ||
This is fairly common. Our first bit of advice is to try to get the default | ||
text used in your tests. That will make everything much easier (more than just | ||
using this utility). If that's not possible, then you're probably best | ||
to just stick with `data-testid`s (which is not too bad anyway). | ||
</details> | ||
<details> | ||
<summary>I really don't like data-testids, but none of the other queries make sense. Do I have to use a data-testid?</summary> | ||
Definitely not. That said, a common reason people don't like the `data-testid` | ||
attribute is they're concerned about shipping that to production. I'd suggest | ||
that you probably want some simple E2E tests that run in production on occasion | ||
to make certain that things are working smoothly. In that case the `data-testid` | ||
attributes will be very useful. Even if you don't run these in production, you | ||
may want to run some E2E tests that run on the same code you're about to ship to | ||
production. In that case, the `data-testid` attributes will be valuable there as | ||
well. | ||
All that said, if you really don't want to ship `data-testid` attributes, then you | ||
can use | ||
[this simple babel plugin](https://www.npmjs.com/package/babel-plugin-react-remove-properties) | ||
to remove them. | ||
If you don't want to use them at all, then you can simply use regular DOM | ||
methods and properties to query elements off your container. | ||
```javascript | ||
const firstLiInDiv = container.querySelector('div li') | ||
const allLisInDiv = container.querySelectorAll('div li') | ||
const rootElement = container.firstChild | ||
``` | ||
</details> | ||
<details> | ||
<summary>What if Iβm iterating over a list of items that I want to put the data-testid="item" attribute on. How do I distinguish them from each other?</summary> | ||
You can make your selector just choose the one you want by including :nth-child in the selector. | ||
```javascript | ||
const thirdLiInUl = container.querySelector('ul > li:nth-child(3)') | ||
``` | ||
Or you could include the index or an ID in your attribute: | ||
```javascript | ||
;`<li data-testid="item-${item.id}">{item.text}</li>` | ||
``` | ||
And then you could use the `getByTestId` utility: | ||
```javascript | ||
const items = [ | ||
/* your items */ | ||
] | ||
const container = render(/* however you render this stuff */) | ||
const thirdItem = getByTestId(container, `item-${items[2].id}`) | ||
``` | ||
</details> | ||
## Other Solutions | ||
@@ -1146,0 +108,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
10547
937288
181