twd-js 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,31 +36,35 @@ pnpm add twd-js
36
36
 
37
37
  ## Quick Start
38
38
 
39
- ### React (Standard)
40
-
41
- Add this to your entry file (e.g., `src/main.tsx`):
42
-
43
- ```tsx
44
- if (import.meta.env.DEV) {
45
- const testModules = import.meta.glob("./**/*.twd.test.ts");
46
- const { initTests, twd, TWDSidebar } = await import('twd-js');
47
- initTests(testModules, <TWDSidebar open={true} position="left" />, createRoot);
48
- twd.initRequestMocking().catch(console.error);
49
- }
50
- ```
51
-
52
- ### Vue / Angular / Other Frameworks (Bundled)
39
+ ### React / Vue / Angular / Other Frameworks (Bundled / recommended)
53
40
 
54
41
  TWD now supports any framework via its bundled version.
55
42
 
56
43
  ```ts
44
+ // Only load the test sidebar and tests in development mode
57
45
  if (import.meta.env.DEV) {
58
46
  const { initTWD } = await import('twd-js/bundled');
59
47
  const tests = import.meta.glob("./**/*.twd.test.ts");
60
- initTWD(tests);
48
+
49
+ // Initialize TWD with tests and optional configuration
50
+ // Request mocking is automatically initialized by default
51
+ initTWD(tests, {
52
+ open: true,
53
+ position: 'left',
54
+ serviceWorker: true, // Enable request mocking (default: true)
55
+ serviceWorkerUrl: '/mock-sw.js' // Custom service worker path (default: '/mock-sw.js')
56
+ });
61
57
  }
62
58
  ```
63
59
 
60
+ ### Set Up Mock Service Worker
61
+
62
+ If you plan to use API mocking, set up the mock service worker:
63
+
64
+ ```bash
65
+ npx twd-js init public
66
+ ```
67
+
64
68
  Check the [Framework Integration Guide](https://brikev.github.io/twd/frameworks) for more details.
65
69
 
66
70
  ## Writing Tests
@@ -51,7 +51,7 @@ function $e(t, e, n, r, s, i, _, l, u, a, p) {
51
51
  }
52
52
  function ze(t, e, n, r, s) {
53
53
  var i, _, l, u, a, p = n.length, o = p, f = 0;
54
- for (t.__k = new Array(s), i = 0; i < s; i++) (_ = e[i]) != null && typeof _ != "boolean" && typeof _ != "function" ? (typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" || _.constructor == String ? _ = t.__k[i] = B(null, _, null, null, null) : q(_) ? _ = t.__k[i] = B(L, { children: _ }, null, null, null) : _.constructor == null && _.__b > 0 ? _ = t.__k[i] = B(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : t.__k[i] = _, u = i + f, _.__ = t, _.__b = t.__b + 1, (a = _.__i = je(_, n, u, o)) != -1 && (o--, (l = n[a]) && (l.__u |= 2)), l == null || l.__v == null ? (a == -1 && (s > p ? f-- : s < p && f++), typeof _.type != "function" && (_.__u |= 4)) : a != u && (a == u - 1 ? f-- : a == u + 1 ? f++ : (a > u ? f-- : f++, _.__u |= 4))) : t.__k[i] = null;
54
+ for (t.__k = new Array(s), i = 0; i < s; i++) (_ = e[i]) != null && typeof _ != "boolean" && typeof _ != "function" ? (typeof _ == "string" || typeof _ == "number" || typeof _ == "bigint" || _.constructor == String ? _ = t.__k[i] = B(null, _, null, null, null) : q(_) ? _ = t.__k[i] = B(L, { children: _ }, null, null, null) : _.constructor == null && _.__b > 0 ? _ = t.__k[i] = B(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : t.__k[i] = _, u = i + f, _.__ = t, _.__b = t.__b + 1, l = null, (a = _.__i = je(_, n, u, o)) != -1 && (o--, (l = n[a]) && (l.__u |= 2)), l == null || l.__v == null ? (a == -1 && (s > p ? f-- : s < p && f++), typeof _.type != "function" && (_.__u |= 4)) : a != u && (a == u - 1 ? f-- : a == u + 1 ? f++ : (a > u ? f-- : f++, _.__u |= 4))) : t.__k[i] = null;
55
55
  if (o) for (i = 0; i < p; i++) (l = n[i]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = A(l)), Me(l, l));
56
56
  return r;
57
57
  }
@@ -757,7 +757,7 @@ class Pe {
757
757
  }
758
758
  }
759
759
  window.__testRunner = Pe;
760
- const mt = "1.3.3", yt = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
760
+ const mt = "1.3.4", yt = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
761
761
  rules: []
762
762
  }), window.__TWD_MOCK_STATE__) : {
763
763
  rules: []
@@ -1,6 +1,6 @@
1
- (function(W,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(W=typeof globalThis<"u"?globalThis:W||self,E(W.TWD={}))})(this,(function(W){"use strict";var E,h,le,C,ae,ce,ue,de,Y,G,X,M={},fe=[],Fe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,D=Array.isArray;function T(t,e){for(var n in e)t[n]=e[n];return t}function J(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function je(t,e,n){var r,s,i,_={};for(i in e)i=="key"?r=e[i]:i=="ref"?s=e[i]:_[i]=e[i];if(arguments.length>2&&(_.children=arguments.length>3?E.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)_[i]===void 0&&(_[i]=t.defaultProps[i]);return P(t,_,r,s,null)}function P(t,e,n,r,s){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++le,__i:-1,__u:0};return s==null&&h.vnode!=null&&h.vnode(i),i}function L(t){return t.children}function B(t,e){this.props=t,this.context=e}function A(t,e){if(e==null)return t.__?A(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?A(t):null}function pe(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return pe(t)}}function he(t){(!t.__d&&(t.__d=!0)&&C.push(t)&&!U.__r++||ae!=h.debounceRendering)&&((ae=h.debounceRendering)||ce)(U)}function U(){for(var t,e,n,r,s,i,_,l=1;C.length;)C.length>l&&C.sort(ue),t=C.shift(),l=C.length,t.__d&&(n=void 0,r=void 0,s=(r=(e=t).__v).__e,i=[],_=[],e.__P&&((n=T({},r)).__v=r.__v+1,h.vnode&&h.vnode(n),Q(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[s]:null,i,s??A(r),!!(32&r.__u),_),n.__v=r.__v,n.__.__k[n.__i]=n,be(i,n,_),r.__e=r.__=null,n.__e!=s&&pe(n)));U.__r=0}function ge(t,e,n,r,s,i,_,l,u,a,p){var o,f,d,b,x,k,m,g=r&&r.__k||fe,R=e.length;for(u=ze(n,e,g,u,R),o=0;o<R;o++)(d=n.__k[o])!=null&&(f=d.__i==-1?M:g[d.__i]||M,d.__i=o,k=Q(t,d,f,s,i,_,l,u,a,p),b=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&ee(f.ref,null,d),p.push(d.ref,d.__c||b,d)),x==null&&b!=null&&(x=b),(m=!!(4&d.__u))||f.__k===d.__k?u=me(d,u,t,m):typeof d.type=="function"&&k!==void 0?u=k:b&&(u=b.nextSibling),d.__u&=-7);return n.__e=x,u}function ze(t,e,n,r,s){var i,_,l,u,a,p=n.length,o=p,f=0;for(t.__k=new Array(s),i=0;i<s;i++)(_=e[i])!=null&&typeof _!="boolean"&&typeof _!="function"?(typeof _=="string"||typeof _=="number"||typeof _=="bigint"||_.constructor==String?_=t.__k[i]=P(null,_,null,null,null):D(_)?_=t.__k[i]=P(L,{children:_},null,null,null):_.constructor==null&&_.__b>0?_=t.__k[i]=P(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):t.__k[i]=_,u=i+f,_.__=t,_.__b=t.__b+1,(a=_.__i=Oe(_,n,u,o))!=-1&&(o--,(l=n[a])&&(l.__u|=2)),l==null||l.__v==null?(a==-1&&(s>p?f--:s<p&&f++),typeof _.type!="function"&&(_.__u|=4)):a!=u&&(a==u-1?f--:a==u+1?f++:(a>u?f--:f++,_.__u|=4))):t.__k[i]=null;if(o)for(i=0;i<p;i++)(l=n[i])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=A(l)),we(l,l));return r}function me(t,e,n,r){var s,i;if(typeof t.type=="function"){for(s=t.__k,i=0;s&&i<s.length;i++)s[i]&&(s[i].__=t,e=me(s[i],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=A(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Oe(t,e,n,r){var s,i,_,l=t.key,u=t.type,a=e[n],p=a!=null&&(2&a.__u)==0;if(a===null&&l==null||p&&l==a.key&&u==a.type)return n;if(r>(p?1:0)){for(s=n-1,i=n+1;s>=0||i<e.length;)if((a=e[_=s>=0?s--:i++])!=null&&(2&a.__u)==0&&l==a.key&&u==a.type)return _}return-1}function ye(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Fe.test(e)?n:n+"px"}function F(t,e,n,r,s){var i,_;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ye(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||ye(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(de,"$1")),_=e.toLowerCase(),e=_ in t||e=="onFocusOut"||e=="onFocusIn"?_.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n.u=r.u:(n.u=Y,t.addEventListener(e,i?X:G,i)):t.removeEventListener(e,i?X:G,i);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ve(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Y++;else if(e.t<n.u)return;return n(h.event?h.event(e):e)}}}function Q(t,e,n,r,s,i,_,l,u,a){var p,o,f,d,b,x,k,m,g,R,$,V,N,Ue,K,I,_e,S=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),i=[l=e.__e=n.__e]),(p=h.__b)&&p(e);e:if(typeof S=="function")try{if(m=e.props,g="prototype"in S&&S.prototype.render,R=(p=S.contextType)&&r[p.__c],$=p?R?R.props.value:p.__:r,n.__c?k=(o=e.__c=n.__c).__=o.__E:(g?e.__c=o=new S(m,$):(e.__c=o=new B(m,$),o.constructor=S,o.render=Ve),R&&R.sub(o),o.state||(o.state={}),o.__n=r,f=o.__d=!0,o.__h=[],o._sb=[]),g&&o.__s==null&&(o.__s=o.state),g&&S.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=T({},o.__s)),T(o.__s,S.getDerivedStateFromProps(m,o.__s))),d=o.props,b=o.state,o.__v=e,f)g&&S.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),g&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else{if(g&&S.getDerivedStateFromProps==null&&m!==d&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(m,$),e.__v==n.__v||!o.__e&&o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(m,o.__s,$)===!1){for(e.__v!=n.__v&&(o.props=m,o.state=o.__s,o.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(H){H&&(H.__=e)}),V=0;V<o._sb.length;V++)o.__h.push(o._sb[V]);o._sb=[],o.__h.length&&_.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(m,o.__s,$),g&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(d,b,x)})}if(o.context=$,o.props=m,o.__P=t,o.__e=!1,N=h.__r,Ue=0,g){for(o.state=o.__s,o.__d=!1,N&&N(e),p=o.render(o.props,o.state,o.context),K=0;K<o._sb.length;K++)o.__h.push(o._sb[K]);o._sb=[]}else do o.__d=!1,N&&N(e),p=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++Ue<25);o.state=o.__s,o.getChildContext!=null&&(r=T(T({},r),o.getChildContext())),g&&!f&&o.getSnapshotBeforeUpdate!=null&&(x=o.getSnapshotBeforeUpdate(d,b)),I=p,p!=null&&p.type===L&&p.key==null&&(I=ke(p.props.children)),l=ge(t,D(I)?I:[I],e,n,r,s,i,_,l,u,a),o.base=e.__e,e.__u&=-161,o.__h.length&&_.push(o),k&&(o.__E=o.__=null)}catch(H){if(e.__v=null,u||i!=null)if(H.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,e.__e=l}else{for(_e=i.length;_e--;)J(i[_e]);Z(e)}else e.__e=n.__e,e.__k=n.__k,H.then||Z(e);h.__e(H,e,n)}else i==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=qe(n.__e,e,n,r,s,i,_,u,a);return(p=h.diffed)&&p(e),128&e.__u?void 0:l}function Z(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Z)}function be(t,e,n){for(var r=0;r<n.length;r++)ee(n[r],n[++r],n[++r]);h.__c&&h.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(i){i.call(s)})}catch(i){h.__e(i,s.__v)}})}function ke(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:D(t)?t.map(ke):T({},t)}function qe(t,e,n,r,s,i,_,l,u){var a,p,o,f,d,b,x,k=n.props||M,m=e.props,g=e.type;if(g=="svg"?s="http://www.w3.org/2000/svg":g=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(a=0;a<i.length;a++)if((d=i[a])&&"setAttribute"in d==!!g&&(g?d.localName==g:d.nodeType==3)){t=d,i[a]=null;break}}if(t==null){if(g==null)return document.createTextNode(m);t=document.createElementNS(s,g,m.is&&m),l&&(h.__m&&h.__m(e,i),l=!1),i=null}if(g==null)k===m||l&&t.data==m||(t.data=m);else{if(i=i&&E.call(t.childNodes),!l&&i!=null)for(k={},a=0;a<t.attributes.length;a++)k[(d=t.attributes[a]).name]=d.value;for(a in k)if(d=k[a],a!="children"){if(a=="dangerouslySetInnerHTML")o=d;else if(!(a in m)){if(a=="value"&&"defaultValue"in m||a=="checked"&&"defaultChecked"in m)continue;F(t,a,null,d,s)}}for(a in m)d=m[a],a=="children"?f=d:a=="dangerouslySetInnerHTML"?p=d:a=="value"?b=d:a=="checked"?x=d:l&&typeof d!="function"||k[a]===d||F(t,a,d,k[a],s);if(p)l||o&&(p.__html==o.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(o&&(t.innerHTML=""),ge(e.type=="template"?t.content:t,D(f)?f:[f],e,n,r,g=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,_,i?i[0]:n.__k&&A(n,0),l,u),i!=null)for(a=i.length;a--;)J(i[a]);l||(a="value",g=="progress"&&b==null?t.removeAttribute("value"):b!=null&&(b!==t[a]||g=="progress"&&!b||g=="option"&&b!=k[a])&&F(t,a,b,k[a],s),a="checked",x!=null&&x!=t[a]&&F(t,a,x,k[a],s))}return t}function ee(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(s){h.__e(s,n)}}function we(t,e,n){var r,s;if(h.unmount&&h.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||ee(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){h.__e(i,e)}r.base=r.__P=null}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&we(r[s],e,n||typeof t.type!="function");n||J(t.__e),t.__c=t.__=t.__e=void 0}function Ve(t,e,n){return this.constructor(t,n)}function Ke(t,e,n){var r,s,i,_;e==document&&(e=document.documentElement),h.__&&h.__(t,e),s=(r=!1)?null:e.__k,i=[],_=[],Q(e,t=e.__k=je(L,null,[t]),s||M,M,e.namespaceURI,s?null:e.firstChild?E.call(e.childNodes):null,i,s?s.__e:e.firstChild,r,_),be(i,t,_)}E=fe.slice,h={__e:function(t,e,n,r){for(var s,i,_;e=e.__;)if((s=e.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(t)),_=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,r||{}),_=s.__d),_)return s.__E=s}catch(l){t=l}throw t}},le=0,B.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=T({},this.state),typeof t=="function"&&(t=t(T({},n),this.props)),t&&T(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),he(this))},B.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),he(this))},B.prototype.render=L,C=[],ce=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ue=function(t,e){return t.__v.__b-e.__v.__b},U.__r=0,de=/(PointerCapture)$|Capture$/i,Y=0,G=ve(!1),X=ve(!0);var Ye=0;function c(t,e,n,r,s,i){e||(e={});var _,l,u=e;if("ref"in u)for(l in u={},e)l=="ref"?_=e[l]:u[l]=e[l];var a={type:t,props:u,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ye,__i:-1,__u:0,__source:s,__self:i};if(typeof t=="function"&&(_=t.defaultProps))for(l in _)u[l]===void 0&&(u[l]=_[l]);return h.vnode&&h.vnode(a),a}const Ge=t=>{const{Component:e,createRoot:n}=t,r=document.createElement("div");r.setAttribute("id","twd-sidebar-root"),document.body.appendChild(r),n(r).render(e)},Xe=async(t,e,n)=>{for(const r in t)await t[r]();Ge({Component:e,createRoot:n})};var j,y,te,xe,ne=0,Se=[],v=h,Te=v.__b,Ee=v.__r,Re=v.diffed,Ce=v.__c,$e=v.unmount,We=v.__;function Ae(t,e){v.__h&&v.__h(y,t,ne||e),ne=0;var n=y.__H||(y.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function re(t){return ne=1,Je(Me,t)}function Je(t,e,n){var r=Ae(j++,2);if(r.t=t,!r.__c&&(r.__=[Me(void 0,e),function(l){var u=r.__N?r.__N[0]:r.__[0],a=r.t(u,l);u!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=y,!y.__f)){var s=function(l,u,a){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!i||i.call(this,l,u,a);var o=r.__c.props!==l;return p.forEach(function(f){if(f.__N){var d=f.__[0];f.__=f.__N,f.__N=void 0,d!==f.__[0]&&(o=!0)}}),i&&i.call(this,l,u,a)||o};y.__f=!0;var i=y.shouldComponentUpdate,_=y.componentWillUpdate;y.componentWillUpdate=function(l,u,a){if(this.__e){var p=i;i=void 0,s(l,u,a),i=p}_&&_.call(this,l,u,a)},y.shouldComponentUpdate=s}return r.__N||r.__}function Qe(t,e){var n=Ae(j++,3);!v.__s&&tt(n.__H,e)&&(n.__=t,n.u=e,y.__H.__h.push(n))}function Ze(){for(var t;t=Se.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(z),t.__H.__h.forEach(oe),t.__H.__h=[]}catch(e){t.__H.__h=[],v.__e(e,t.__v)}}v.__b=function(t){y=null,Te&&Te(t)},v.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),We&&We(t,e)},v.__r=function(t){Ee&&Ee(t),j=0;var e=(y=t.__c).__H;e&&(te===y?(e.__h=[],y.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(z),e.__h.forEach(oe),e.__h=[],j=0)),te=y},v.diffed=function(t){Re&&Re(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Se.push(e)!==1&&xe===v.requestAnimationFrame||((xe=v.requestAnimationFrame)||et)(Ze)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),te=y=null},v.__c=function(t,e){e.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(r){return!r.__||oe(r)})}catch(r){e.some(function(s){s.__h&&(s.__h=[])}),e=[],v.__e(r,n.__v)}}),Ce&&Ce(t,e)},v.unmount=function(t){$e&&$e(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{z(r)}catch(s){e=s}}),n.__H=void 0,e&&v.__e(e,n.__v))};var He=typeof requestAnimationFrame=="function";function et(t){var e,n=function(){clearTimeout(r),He&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);He&&(e=requestAnimationFrame(n))}function z(t){var e=y,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),y=e}function oe(t){var e=y;t.__c=t.__(),y=e}function tt(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Me(t,e){return typeof e=="function"?e(t):e}const nt=t=>{const e=new Map,n=[];for(const r of t)e.set(r.id,{...r,childrenNodes:[]});for(const r of e.values())r.parent?e.get(r.parent)?.childrenNodes?.push(r):n.push(r);return n},rt={animation:"spin 1s linear infinite"},ot=()=>c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#364153",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle-icon lucide-loader-circle",style:rt,"data-testid":"loader-icon",children:c("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),O=document.createElement("style");O&&!document.getElementById("loader-spin-keyframes")&&(O.id="loader-spin-keyframes",O.innerHTML=`
1
+ (function(W,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(W=typeof globalThis<"u"?globalThis:W||self,E(W.TWD={}))})(this,(function(W){"use strict";var E,h,le,C,ae,ce,ue,de,Y,G,X,M={},fe=[],Fe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,D=Array.isArray;function T(t,e){for(var n in e)t[n]=e[n];return t}function J(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function je(t,e,n){var r,s,i,_={};for(i in e)i=="key"?r=e[i]:i=="ref"?s=e[i]:_[i]=e[i];if(arguments.length>2&&(_.children=arguments.length>3?E.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)_[i]===void 0&&(_[i]=t.defaultProps[i]);return P(t,_,r,s,null)}function P(t,e,n,r,s){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++le,__i:-1,__u:0};return s==null&&h.vnode!=null&&h.vnode(i),i}function L(t){return t.children}function B(t,e){this.props=t,this.context=e}function A(t,e){if(e==null)return t.__?A(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?A(t):null}function pe(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return pe(t)}}function he(t){(!t.__d&&(t.__d=!0)&&C.push(t)&&!U.__r++||ae!=h.debounceRendering)&&((ae=h.debounceRendering)||ce)(U)}function U(){for(var t,e,n,r,s,i,_,l=1;C.length;)C.length>l&&C.sort(ue),t=C.shift(),l=C.length,t.__d&&(n=void 0,r=void 0,s=(r=(e=t).__v).__e,i=[],_=[],e.__P&&((n=T({},r)).__v=r.__v+1,h.vnode&&h.vnode(n),Q(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[s]:null,i,s??A(r),!!(32&r.__u),_),n.__v=r.__v,n.__.__k[n.__i]=n,be(i,n,_),r.__e=r.__=null,n.__e!=s&&pe(n)));U.__r=0}function ge(t,e,n,r,s,i,_,l,u,a,p){var o,f,d,b,x,k,m,g=r&&r.__k||fe,R=e.length;for(u=ze(n,e,g,u,R),o=0;o<R;o++)(d=n.__k[o])!=null&&(f=d.__i==-1?M:g[d.__i]||M,d.__i=o,k=Q(t,d,f,s,i,_,l,u,a,p),b=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&ee(f.ref,null,d),p.push(d.ref,d.__c||b,d)),x==null&&b!=null&&(x=b),(m=!!(4&d.__u))||f.__k===d.__k?u=me(d,u,t,m):typeof d.type=="function"&&k!==void 0?u=k:b&&(u=b.nextSibling),d.__u&=-7);return n.__e=x,u}function ze(t,e,n,r,s){var i,_,l,u,a,p=n.length,o=p,f=0;for(t.__k=new Array(s),i=0;i<s;i++)(_=e[i])!=null&&typeof _!="boolean"&&typeof _!="function"?(typeof _=="string"||typeof _=="number"||typeof _=="bigint"||_.constructor==String?_=t.__k[i]=P(null,_,null,null,null):D(_)?_=t.__k[i]=P(L,{children:_},null,null,null):_.constructor==null&&_.__b>0?_=t.__k[i]=P(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):t.__k[i]=_,u=i+f,_.__=t,_.__b=t.__b+1,l=null,(a=_.__i=Oe(_,n,u,o))!=-1&&(o--,(l=n[a])&&(l.__u|=2)),l==null||l.__v==null?(a==-1&&(s>p?f--:s<p&&f++),typeof _.type!="function"&&(_.__u|=4)):a!=u&&(a==u-1?f--:a==u+1?f++:(a>u?f--:f++,_.__u|=4))):t.__k[i]=null;if(o)for(i=0;i<p;i++)(l=n[i])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=A(l)),we(l,l));return r}function me(t,e,n,r){var s,i;if(typeof t.type=="function"){for(s=t.__k,i=0;s&&i<s.length;i++)s[i]&&(s[i].__=t,e=me(s[i],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=A(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Oe(t,e,n,r){var s,i,_,l=t.key,u=t.type,a=e[n],p=a!=null&&(2&a.__u)==0;if(a===null&&l==null||p&&l==a.key&&u==a.type)return n;if(r>(p?1:0)){for(s=n-1,i=n+1;s>=0||i<e.length;)if((a=e[_=s>=0?s--:i++])!=null&&(2&a.__u)==0&&l==a.key&&u==a.type)return _}return-1}function ye(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Fe.test(e)?n:n+"px"}function F(t,e,n,r,s){var i,_;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ye(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||ye(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(de,"$1")),_=e.toLowerCase(),e=_ in t||e=="onFocusOut"||e=="onFocusIn"?_.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n.u=r.u:(n.u=Y,t.addEventListener(e,i?X:G,i)):t.removeEventListener(e,i?X:G,i);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ve(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Y++;else if(e.t<n.u)return;return n(h.event?h.event(e):e)}}}function Q(t,e,n,r,s,i,_,l,u,a){var p,o,f,d,b,x,k,m,g,R,$,V,N,Ue,K,I,_e,S=e.type;if(e.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),i=[l=e.__e=n.__e]),(p=h.__b)&&p(e);e:if(typeof S=="function")try{if(m=e.props,g="prototype"in S&&S.prototype.render,R=(p=S.contextType)&&r[p.__c],$=p?R?R.props.value:p.__:r,n.__c?k=(o=e.__c=n.__c).__=o.__E:(g?e.__c=o=new S(m,$):(e.__c=o=new B(m,$),o.constructor=S,o.render=Ve),R&&R.sub(o),o.state||(o.state={}),o.__n=r,f=o.__d=!0,o.__h=[],o._sb=[]),g&&o.__s==null&&(o.__s=o.state),g&&S.getDerivedStateFromProps!=null&&(o.__s==o.state&&(o.__s=T({},o.__s)),T(o.__s,S.getDerivedStateFromProps(m,o.__s))),d=o.props,b=o.state,o.__v=e,f)g&&S.getDerivedStateFromProps==null&&o.componentWillMount!=null&&o.componentWillMount(),g&&o.componentDidMount!=null&&o.__h.push(o.componentDidMount);else{if(g&&S.getDerivedStateFromProps==null&&m!==d&&o.componentWillReceiveProps!=null&&o.componentWillReceiveProps(m,$),e.__v==n.__v||!o.__e&&o.shouldComponentUpdate!=null&&o.shouldComponentUpdate(m,o.__s,$)===!1){for(e.__v!=n.__v&&(o.props=m,o.state=o.__s,o.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(H){H&&(H.__=e)}),V=0;V<o._sb.length;V++)o.__h.push(o._sb[V]);o._sb=[],o.__h.length&&_.push(o);break e}o.componentWillUpdate!=null&&o.componentWillUpdate(m,o.__s,$),g&&o.componentDidUpdate!=null&&o.__h.push(function(){o.componentDidUpdate(d,b,x)})}if(o.context=$,o.props=m,o.__P=t,o.__e=!1,N=h.__r,Ue=0,g){for(o.state=o.__s,o.__d=!1,N&&N(e),p=o.render(o.props,o.state,o.context),K=0;K<o._sb.length;K++)o.__h.push(o._sb[K]);o._sb=[]}else do o.__d=!1,N&&N(e),p=o.render(o.props,o.state,o.context),o.state=o.__s;while(o.__d&&++Ue<25);o.state=o.__s,o.getChildContext!=null&&(r=T(T({},r),o.getChildContext())),g&&!f&&o.getSnapshotBeforeUpdate!=null&&(x=o.getSnapshotBeforeUpdate(d,b)),I=p,p!=null&&p.type===L&&p.key==null&&(I=ke(p.props.children)),l=ge(t,D(I)?I:[I],e,n,r,s,i,_,l,u,a),o.base=e.__e,e.__u&=-161,o.__h.length&&_.push(o),k&&(o.__E=o.__=null)}catch(H){if(e.__v=null,u||i!=null)if(H.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,e.__e=l}else{for(_e=i.length;_e--;)J(i[_e]);Z(e)}else e.__e=n.__e,e.__k=n.__k,H.then||Z(e);h.__e(H,e,n)}else i==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=qe(n.__e,e,n,r,s,i,_,u,a);return(p=h.diffed)&&p(e),128&e.__u?void 0:l}function Z(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(Z)}function be(t,e,n){for(var r=0;r<n.length;r++)ee(n[r],n[++r],n[++r]);h.__c&&h.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(i){i.call(s)})}catch(i){h.__e(i,s.__v)}})}function ke(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:D(t)?t.map(ke):T({},t)}function qe(t,e,n,r,s,i,_,l,u){var a,p,o,f,d,b,x,k=n.props||M,m=e.props,g=e.type;if(g=="svg"?s="http://www.w3.org/2000/svg":g=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(a=0;a<i.length;a++)if((d=i[a])&&"setAttribute"in d==!!g&&(g?d.localName==g:d.nodeType==3)){t=d,i[a]=null;break}}if(t==null){if(g==null)return document.createTextNode(m);t=document.createElementNS(s,g,m.is&&m),l&&(h.__m&&h.__m(e,i),l=!1),i=null}if(g==null)k===m||l&&t.data==m||(t.data=m);else{if(i=i&&E.call(t.childNodes),!l&&i!=null)for(k={},a=0;a<t.attributes.length;a++)k[(d=t.attributes[a]).name]=d.value;for(a in k)if(d=k[a],a!="children"){if(a=="dangerouslySetInnerHTML")o=d;else if(!(a in m)){if(a=="value"&&"defaultValue"in m||a=="checked"&&"defaultChecked"in m)continue;F(t,a,null,d,s)}}for(a in m)d=m[a],a=="children"?f=d:a=="dangerouslySetInnerHTML"?p=d:a=="value"?b=d:a=="checked"?x=d:l&&typeof d!="function"||k[a]===d||F(t,a,d,k[a],s);if(p)l||o&&(p.__html==o.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(o&&(t.innerHTML=""),ge(e.type=="template"?t.content:t,D(f)?f:[f],e,n,r,g=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,_,i?i[0]:n.__k&&A(n,0),l,u),i!=null)for(a=i.length;a--;)J(i[a]);l||(a="value",g=="progress"&&b==null?t.removeAttribute("value"):b!=null&&(b!==t[a]||g=="progress"&&!b||g=="option"&&b!=k[a])&&F(t,a,b,k[a],s),a="checked",x!=null&&x!=t[a]&&F(t,a,x,k[a],s))}return t}function ee(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(s){h.__e(s,n)}}function we(t,e,n){var r,s;if(h.unmount&&h.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||ee(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){h.__e(i,e)}r.base=r.__P=null}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&we(r[s],e,n||typeof t.type!="function");n||J(t.__e),t.__c=t.__=t.__e=void 0}function Ve(t,e,n){return this.constructor(t,n)}function Ke(t,e,n){var r,s,i,_;e==document&&(e=document.documentElement),h.__&&h.__(t,e),s=(r=!1)?null:e.__k,i=[],_=[],Q(e,t=e.__k=je(L,null,[t]),s||M,M,e.namespaceURI,s?null:e.firstChild?E.call(e.childNodes):null,i,s?s.__e:e.firstChild,r,_),be(i,t,_)}E=fe.slice,h={__e:function(t,e,n,r){for(var s,i,_;e=e.__;)if((s=e.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(t)),_=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,r||{}),_=s.__d),_)return s.__E=s}catch(l){t=l}throw t}},le=0,B.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=T({},this.state),typeof t=="function"&&(t=t(T({},n),this.props)),t&&T(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),he(this))},B.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),he(this))},B.prototype.render=L,C=[],ce=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ue=function(t,e){return t.__v.__b-e.__v.__b},U.__r=0,de=/(PointerCapture)$|Capture$/i,Y=0,G=ve(!1),X=ve(!0);var Ye=0;function c(t,e,n,r,s,i){e||(e={});var _,l,u=e;if("ref"in u)for(l in u={},e)l=="ref"?_=e[l]:u[l]=e[l];var a={type:t,props:u,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ye,__i:-1,__u:0,__source:s,__self:i};if(typeof t=="function"&&(_=t.defaultProps))for(l in _)u[l]===void 0&&(u[l]=_[l]);return h.vnode&&h.vnode(a),a}const Ge=t=>{const{Component:e,createRoot:n}=t,r=document.createElement("div");r.setAttribute("id","twd-sidebar-root"),document.body.appendChild(r),n(r).render(e)},Xe=async(t,e,n)=>{for(const r in t)await t[r]();Ge({Component:e,createRoot:n})};var j,y,te,xe,ne=0,Se=[],v=h,Te=v.__b,Ee=v.__r,Re=v.diffed,Ce=v.__c,$e=v.unmount,We=v.__;function Ae(t,e){v.__h&&v.__h(y,t,ne||e),ne=0;var n=y.__H||(y.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function re(t){return ne=1,Je(Me,t)}function Je(t,e,n){var r=Ae(j++,2);if(r.t=t,!r.__c&&(r.__=[Me(void 0,e),function(l){var u=r.__N?r.__N[0]:r.__[0],a=r.t(u,l);u!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=y,!y.__f)){var s=function(l,u,a){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(f){return!!f.__c});if(p.every(function(f){return!f.__N}))return!i||i.call(this,l,u,a);var o=r.__c.props!==l;return p.forEach(function(f){if(f.__N){var d=f.__[0];f.__=f.__N,f.__N=void 0,d!==f.__[0]&&(o=!0)}}),i&&i.call(this,l,u,a)||o};y.__f=!0;var i=y.shouldComponentUpdate,_=y.componentWillUpdate;y.componentWillUpdate=function(l,u,a){if(this.__e){var p=i;i=void 0,s(l,u,a),i=p}_&&_.call(this,l,u,a)},y.shouldComponentUpdate=s}return r.__N||r.__}function Qe(t,e){var n=Ae(j++,3);!v.__s&&tt(n.__H,e)&&(n.__=t,n.u=e,y.__H.__h.push(n))}function Ze(){for(var t;t=Se.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(z),t.__H.__h.forEach(oe),t.__H.__h=[]}catch(e){t.__H.__h=[],v.__e(e,t.__v)}}v.__b=function(t){y=null,Te&&Te(t)},v.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),We&&We(t,e)},v.__r=function(t){Ee&&Ee(t),j=0;var e=(y=t.__c).__H;e&&(te===y?(e.__h=[],y.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(z),e.__h.forEach(oe),e.__h=[],j=0)),te=y},v.diffed=function(t){Re&&Re(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Se.push(e)!==1&&xe===v.requestAnimationFrame||((xe=v.requestAnimationFrame)||et)(Ze)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),te=y=null},v.__c=function(t,e){e.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(r){return!r.__||oe(r)})}catch(r){e.some(function(s){s.__h&&(s.__h=[])}),e=[],v.__e(r,n.__v)}}),Ce&&Ce(t,e)},v.unmount=function(t){$e&&$e(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{z(r)}catch(s){e=s}}),n.__H=void 0,e&&v.__e(e,n.__v))};var He=typeof requestAnimationFrame=="function";function et(t){var e,n=function(){clearTimeout(r),He&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);He&&(e=requestAnimationFrame(n))}function z(t){var e=y,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),y=e}function oe(t){var e=y;t.__c=t.__(),y=e}function tt(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Me(t,e){return typeof e=="function"?e(t):e}const nt=t=>{const e=new Map,n=[];for(const r of t)e.set(r.id,{...r,childrenNodes:[]});for(const r of e.values())r.parent?e.get(r.parent)?.childrenNodes?.push(r):n.push(r);return n},rt={animation:"spin 1s linear infinite"},ot=()=>c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#364153",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle-icon lucide-loader-circle",style:rt,"data-testid":"loader-icon",children:c("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),O=document.createElement("style");O&&!document.getElementById("loader-spin-keyframes")&&(O.id="loader-spin-keyframes",O.innerHTML=`
2
2
  @keyframes spin {
3
3
  0% { transform: rotate(0deg); }
4
4
  100% { transform: rotate(360deg); }
5
5
  }
6
- `,document.head.appendChild(O));const q=({className:t,children:e,dataTestId:n})=>c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`lucide ${t}`,"data-testid":n,children:e}),it=()=>c(q,{className:"lucide-play-icon lucide-play",dataTestId:"play-icon",children:c("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}),Le=({id:t,name:e,skip:n,only:r})=>c(L,{children:[e," ",r&&c("span",{style:{color:"#2563eb"},"data-testid":`only-indicator-${t}`,children:[" ","(only)"]}),n&&c("span",{style:{color:"#6b7280"},"data-testid":`skip-indicator-${t}`,children:[" ","(skipped)"]})]}),st=t=>{switch(t.status){case"pass":return{item:{background:"#dcfce7"},container:{borderLeft:"3px solid #00c951"}};case"fail":return{item:{background:"#fee2e2"},container:{borderLeft:"3px solid #fb2c36"}};case"skip":return{item:{background:"#f3f4f6"}};case"running":return{item:{background:"#fef9c3"}};default:return{item:{background:"transparent"}}}},_t=t=>t.startsWith("Assertion passed")||t.startsWith("Event fired")?{color:"#0d542b",fontWeight:"700"}:t.startsWith("Test failed")?{color:"#fb2c36",fontWeight:"700"}:{},lt=({node:t,depth:e,id:n,runTest:r})=>{const s=st(t);return c("li",{style:{marginBottom:"4px",marginLeft:e*6,...s.container},"data-testid":`test-list-item-${n}`,children:[c("div",{style:{display:"flex",alignItems:"left",justifyContent:"space-between",padding:"4px 6px",borderRadius:"4px",...s.item},children:[c("span",{style:{fontWeight:"500",color:"#374151",maxWidth:"220px"},children:c(Le,{id:n,name:t.name,skip:t.skip,only:t.only})}),c("button",{onClick:()=>r(n),"aria-label":`Run ${t.name} test`,style:{background:"transparent",border:"1px solid #d1d5db",borderRadius:"4px",padding:"0",cursor:"pointer",verticalAlign:"middle",fontSize:"12px",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},disabled:t.status==="running","data-testid":`run-test-button-${n}`,children:t.status==="running"?c(ot,{}):c(it,{})})]}),t.logs&&t.logs.length>0&&c("ul",{style:{borderRadius:"4px",maxHeight:"260px",overflowY:"auto",padding:0,background:"#f3f4f6",listStyle:"none",marginTop:"4px",textAlign:"left"},children:t.logs.map((i,_)=>c("li",{style:{fontSize:"12px",padding:"4px 6px",borderBottom:"1px solid #d1d5db",color:"#374151",..._t(i)},children:i},_))})]},t.name)},at=()=>c(q,{className:"lucide-chevron-down-icon lucide-chevron-down",dataTestId:"chevron-down-icon",children:c("path",{d:"m6 9 6 6 6-6"})}),ct=()=>c(q,{className:"lucide-chevron-right-icon lucide-chevron-right",dataTestId:"chevron-right-icon",children:c("path",{d:"m9 18 6-6-6-6"})}),ut=({tests:t,runTest:e})=>{const[n,r]=re({}),s=l=>r(u=>({...u,[l]:!u[l]})),i=(l,u=0)=>{if(l.type==="test")return c(lt,{node:l,depth:u,id:l.id,runTest:()=>e(l.id)},l.id);const a=n[l.id];return c("li",{style:{marginLeft:u*12},children:[c("span",{style:{fontWeight:"bold",cursor:"pointer",color:"#374151",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px",gap:"6px"},"data-testid":`test-group-${l.name}`,tabIndex:0,role:"button","aria-expanded":!a,onClick:()=>s(l.id),children:[c(Le,{id:l.id,name:l.name,skip:l.skip,only:l.only}),a?c(ct,{}):c(at,{})]}),!a&&l.childrenNodes&&l.childrenNodes.length>0&&c("ul",{style:{listStyle:"none",padding:0,margin:0},children:l.childrenNodes.map(p=>i(p,u+1))})]},l.id)},_=nt(t);return c("ul",{style:{listStyle:"none",padding:0,margin:0},children:_.map(l=>i(l))})},dt={left:{left:0,borderTopRightRadius:"6px",borderBottomRightRadius:"6px",borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},right:{right:0,borderTopLeftRadius:"6px",borderBottomLeftRadius:"6px",borderTopRightRadius:"0",borderBottomRightRadius:"0"}},ft=({setOpen:t,position:e})=>c("button",{"aria-label":"Open TWD sidebar",style:{position:"fixed",top:"50%",transform:"translateY(-50%)",background:"#1A6EF4",color:"white",padding:"6px 10px",cursor:"pointer",fontSize:"12px",...dt[e]},onClick:()=>t(!0),children:"TWD"}),pt=({isOpen:t,position:e})=>{Qe(()=>{const n=document.documentElement;return t?e==="left"?n.style.marginLeft="280px":n.style.marginRight="280px":(n.style.marginRight="0",n.style.marginLeft="0"),()=>{n.style.marginRight="0",n.style.marginLeft="0"}},[t,e])},ie=typeof window<"u"?(window.__TWD_STATE__||(window.__TWD_STATE__={handlers:new Map,beforeEachHooks:new Map,afterEachHooks:new Map,stack:[]}),window.__TWD_STATE__):{handlers:new Map,beforeEachHooks:new Map,afterEachHooks:new Map,stack:[]},w=ie.handlers,Ne=ie.beforeEachHooks,Ie=ie.afterEachHooks,ht=t=>{const e=[],n=[];let r=t;for(;r;)Ne.has(r)&&e.unshift(...Ne.get(r)),Ie.has(r)&&n.push(...Ie.get(r)),r=w.get(r)?.parent;return{before:e,after:n}},se=t=>{const e=w.get(t);return e?e.only?!0:e.children?e.children.some(n=>se(n)):!1:!1},gt=t=>{let e=w.get(t);for(;e?.parent;){const n=w.get(e.parent);if(n?.only)return!0;e=n}return!1},De=t=>{let e=w.get(t);for(;e;){if(e.skip)return!0;if(!e.parent)break;e=w.get(e.parent)}return!1};class Pe{events;constructor(e){this.events=e}async runAll(){const e=Array.from(w.values()).filter(r=>!r.parent&&r.type==="suite"),n=Array.from(w.values()).some(r=>r.only);for(const r of e)await this.runSuite(r,n);return w}async runSingle(e){const n=w.get(e);if(!n||n.type!=="test")return;await this.runTest(n,!1)}async runSuite(e,n){if(De(e.id)&&!se(e.id)){this.events.onSkip?.(e);return}if(n&&!se(e.id))return;this.events.onSuiteStart?.(e);const s=(e.children||[]).map(i=>w.get(i));for(const i of s)i.type==="suite"?await this.runSuite(i,n):i.type==="test"&&await this.runTest(i,n);this.events.onSuiteEnd?.(e)}async runTest(e,n){if((De(e.id)||e.skip)&&!e.only){this.events.onSkip(e);return}const s=gt(e.id);if(n&&!e.only&&!s){this.events.onSkip(e);return}this.events.onStart?.(e);const i=ht(e.parent);try{for(const _ of i.before)await _();e.logs=[],await e.handler(),this.events.onPass(e)}catch(_){this.events.onFail(e,_)}finally{for(const _ of i.after)await _()}}}window.__testRunner=Pe;const mt="1.3.3",Be=(typeof window<"u"?(window.__TWD_MOCK_STATE__||(window.__TWD_MOCK_STATE__={rules:[]}),window.__TWD_MOCK_STATE__):{rules:[]}).rules,yt=async t=>{if("serviceWorker"in navigator){const e=t??"/mock-sw.js";await navigator.serviceWorker.register(`${e}?v=${mt}`),navigator.serviceWorker.controller||await new Promise(n=>{navigator.serviceWorker.addEventListener("controllerchange",n,{once:!0})}),navigator.serviceWorker.addEventListener("message",n=>{if(n.data?.type==="EXECUTED"){const{alias:r,request:s}=n.data,i=Be.find(_=>_.alias===r);i&&(i.executed=!0,i.request=s)}})}},vt=()=>Be,bt=()=>c(q,{className:"lucide-wifi-pen-icon lucide-wifi-pen",dataTestId:"wifi-pen-icon",children:[c("path",{d:"M2 8.82a15 15 0 0 1 20 0"}),c("path",{d:"M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"}),c("path",{d:"M5 12.859a10 10 0 0 1 10.5-2.222"}),c("path",{d:"M8.5 16.429a5 5 0 0 1 3-1.406"})]}),kt=()=>{const t=vt(),e=t.filter(r=>r.executed);return c("button",{onClick:()=>{console.group("🌐 TWD Mock Rules"),console.log("Total rules:",t.length),console.log("Triggered rules:",e.length),console.log("Rules details:"),console.log(t),console.groupEnd()},"aria-label":"View mock rules details in console",style:{background:"#f8fafc",border:"1px solid #cbd5e1",borderRadius:"6px",padding:"8px 12px",cursor:"pointer",fontSize:"12px",color:"#475569",display:"flex",alignItems:"center",gap:"8px",marginBottom:"10px",width:"100%",textAlign:"left",transition:"all 0.2s ease",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"},children:[c(bt,{}),c("span",{style:{flex:1},children:["Rules: ",e.length,"/",t.length," triggered"]}),c("span",{style:{fontSize:"10px",color:"#1E293B",fontWeight:"500"},children:"View rules in console"})]})},wt={left:{left:0,borderRight:"1px solid #e5e7eb"},right:{right:0,borderLeft:"1px solid #e5e7eb"}},xt='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',St=({open:t,position:e="left"})=>{const[n,r]=re(0),[s,i]=re(t);pt({isOpen:s,position:e});const _=new Pe({onStart:o=>{o.status="running",r(f=>f+1)},onPass:o=>{o.status="pass",r(f=>f+1)},onFail:(o,f)=>{o.status="fail",console.error("Test failed:",o.name,f),o.logs.push(`Test failed: ${f.message}`),r(d=>d+1)},onSkip:o=>{o.status="skip",r(f=>f+1)}}),l=async()=>{await _.runAll()},u=async o=>{const f=Array.from(w.values()).filter(d=>d.type==="test").find(d=>d.id===o);f&&await _.runSingle(f.id)},a=Array.from(w.values());if(!s)return c(ft,{position:e,setOpen:i});const p=a.filter(o=>o.type==="test").length;return c("div",{style:{fontFamily:xt,position:"fixed",top:0,bottom:0,width:"280px",background:"#f9fafb",fontSize:"14px",overflowY:"auto",boxShadow:"2px 0 6px rgba(0,0,0,0.1)",textAlign:"left",zIndex:1e3,...wt[e]},"data-testid":"twd-sidebar",children:[c("div",{style:{padding:"8px",background:"#f9fafb",position:"sticky",top:0,zIndex:1e3,borderBottom:"1px solid #e5e7eb"},children:[c("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"14px"},children:[c("button",{onClick:l,style:{background:"#1A6EF4",color:"white",padding:"4px 8px",borderRadius:"4px",border:"none",cursor:"pointer"},children:"Run All"}),c("button",{"aria-label":"Close sidebar",style:{background:"transparent",border:"none",cursor:"pointer",fontSize:"14px",paddingRight:"0",paddingLeft:"0"},onClick:()=>i(!1),children:"✖"})]}),c("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",color:"#6b7280",marginBottom:"10px"},children:[c("span",{style:{color:"#374151"},children:["Total: ",p]}),c("div",{style:{display:"flex",gap:"4px"},children:[c("span",{style:{color:"#00c951"},children:["✓ ",a.filter(o=>o.status==="pass").length]}),c("span",{style:{color:"#fb2c36"},children:["✗ ",a.filter(o=>o.status==="fail").length]})]})]}),c(kt,{})]}),c("div",{style:{padding:"8px"},children:c(ut,{tests:a.map(o=>({name:o.name,depth:o.depth,status:o.status,logs:o.logs,id:o.id,parent:o.parent,type:o.type,only:o.only,skip:o.skip})),runTest:u})})]})},Tt=t=>({render:e=>{Ke(e,t)}}),Et=(t,e)=>{const{open:n=!0,position:r="left",serviceWorker:s=!0,serviceWorkerUrl:i="/mock-sw.js"}=e||{};Xe(t,c(St,{open:n,position:r}),Tt),s&&yt(i).then(()=>{console.log("Request mocking initialized")}).catch(_=>{console.error("Error initializing request mocking:",_)})};W.initTWD=Et,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
6
+ `,document.head.appendChild(O));const q=({className:t,children:e,dataTestId:n})=>c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`lucide ${t}`,"data-testid":n,children:e}),it=()=>c(q,{className:"lucide-play-icon lucide-play",dataTestId:"play-icon",children:c("path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"})}),Le=({id:t,name:e,skip:n,only:r})=>c(L,{children:[e," ",r&&c("span",{style:{color:"#2563eb"},"data-testid":`only-indicator-${t}`,children:[" ","(only)"]}),n&&c("span",{style:{color:"#6b7280"},"data-testid":`skip-indicator-${t}`,children:[" ","(skipped)"]})]}),st=t=>{switch(t.status){case"pass":return{item:{background:"#dcfce7"},container:{borderLeft:"3px solid #00c951"}};case"fail":return{item:{background:"#fee2e2"},container:{borderLeft:"3px solid #fb2c36"}};case"skip":return{item:{background:"#f3f4f6"}};case"running":return{item:{background:"#fef9c3"}};default:return{item:{background:"transparent"}}}},_t=t=>t.startsWith("Assertion passed")||t.startsWith("Event fired")?{color:"#0d542b",fontWeight:"700"}:t.startsWith("Test failed")?{color:"#fb2c36",fontWeight:"700"}:{},lt=({node:t,depth:e,id:n,runTest:r})=>{const s=st(t);return c("li",{style:{marginBottom:"4px",marginLeft:e*6,...s.container},"data-testid":`test-list-item-${n}`,children:[c("div",{style:{display:"flex",alignItems:"left",justifyContent:"space-between",padding:"4px 6px",borderRadius:"4px",...s.item},children:[c("span",{style:{fontWeight:"500",color:"#374151",maxWidth:"220px"},children:c(Le,{id:n,name:t.name,skip:t.skip,only:t.only})}),c("button",{onClick:()=>r(n),"aria-label":`Run ${t.name} test`,style:{background:"transparent",border:"1px solid #d1d5db",borderRadius:"4px",padding:"0",cursor:"pointer",verticalAlign:"middle",fontSize:"12px",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},disabled:t.status==="running","data-testid":`run-test-button-${n}`,children:t.status==="running"?c(ot,{}):c(it,{})})]}),t.logs&&t.logs.length>0&&c("ul",{style:{borderRadius:"4px",maxHeight:"260px",overflowY:"auto",padding:0,background:"#f3f4f6",listStyle:"none",marginTop:"4px",textAlign:"left"},children:t.logs.map((i,_)=>c("li",{style:{fontSize:"12px",padding:"4px 6px",borderBottom:"1px solid #d1d5db",color:"#374151",..._t(i)},children:i},_))})]},t.name)},at=()=>c(q,{className:"lucide-chevron-down-icon lucide-chevron-down",dataTestId:"chevron-down-icon",children:c("path",{d:"m6 9 6 6 6-6"})}),ct=()=>c(q,{className:"lucide-chevron-right-icon lucide-chevron-right",dataTestId:"chevron-right-icon",children:c("path",{d:"m9 18 6-6-6-6"})}),ut=({tests:t,runTest:e})=>{const[n,r]=re({}),s=l=>r(u=>({...u,[l]:!u[l]})),i=(l,u=0)=>{if(l.type==="test")return c(lt,{node:l,depth:u,id:l.id,runTest:()=>e(l.id)},l.id);const a=n[l.id];return c("li",{style:{marginLeft:u*12},children:[c("span",{style:{fontWeight:"bold",cursor:"pointer",color:"#374151",display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px",gap:"6px"},"data-testid":`test-group-${l.name}`,tabIndex:0,role:"button","aria-expanded":!a,onClick:()=>s(l.id),children:[c(Le,{id:l.id,name:l.name,skip:l.skip,only:l.only}),a?c(ct,{}):c(at,{})]}),!a&&l.childrenNodes&&l.childrenNodes.length>0&&c("ul",{style:{listStyle:"none",padding:0,margin:0},children:l.childrenNodes.map(p=>i(p,u+1))})]},l.id)},_=nt(t);return c("ul",{style:{listStyle:"none",padding:0,margin:0},children:_.map(l=>i(l))})},dt={left:{left:0,borderTopRightRadius:"6px",borderBottomRightRadius:"6px",borderTopLeftRadius:"0",borderBottomLeftRadius:"0"},right:{right:0,borderTopLeftRadius:"6px",borderBottomLeftRadius:"6px",borderTopRightRadius:"0",borderBottomRightRadius:"0"}},ft=({setOpen:t,position:e})=>c("button",{"aria-label":"Open TWD sidebar",style:{position:"fixed",top:"50%",transform:"translateY(-50%)",background:"#1A6EF4",color:"white",padding:"6px 10px",cursor:"pointer",fontSize:"12px",...dt[e]},onClick:()=>t(!0),children:"TWD"}),pt=({isOpen:t,position:e})=>{Qe(()=>{const n=document.documentElement;return t?e==="left"?n.style.marginLeft="280px":n.style.marginRight="280px":(n.style.marginRight="0",n.style.marginLeft="0"),()=>{n.style.marginRight="0",n.style.marginLeft="0"}},[t,e])},ie=typeof window<"u"?(window.__TWD_STATE__||(window.__TWD_STATE__={handlers:new Map,beforeEachHooks:new Map,afterEachHooks:new Map,stack:[]}),window.__TWD_STATE__):{handlers:new Map,beforeEachHooks:new Map,afterEachHooks:new Map,stack:[]},w=ie.handlers,Ne=ie.beforeEachHooks,Ie=ie.afterEachHooks,ht=t=>{const e=[],n=[];let r=t;for(;r;)Ne.has(r)&&e.unshift(...Ne.get(r)),Ie.has(r)&&n.push(...Ie.get(r)),r=w.get(r)?.parent;return{before:e,after:n}},se=t=>{const e=w.get(t);return e?e.only?!0:e.children?e.children.some(n=>se(n)):!1:!1},gt=t=>{let e=w.get(t);for(;e?.parent;){const n=w.get(e.parent);if(n?.only)return!0;e=n}return!1},De=t=>{let e=w.get(t);for(;e;){if(e.skip)return!0;if(!e.parent)break;e=w.get(e.parent)}return!1};class Pe{events;constructor(e){this.events=e}async runAll(){const e=Array.from(w.values()).filter(r=>!r.parent&&r.type==="suite"),n=Array.from(w.values()).some(r=>r.only);for(const r of e)await this.runSuite(r,n);return w}async runSingle(e){const n=w.get(e);if(!n||n.type!=="test")return;await this.runTest(n,!1)}async runSuite(e,n){if(De(e.id)&&!se(e.id)){this.events.onSkip?.(e);return}if(n&&!se(e.id))return;this.events.onSuiteStart?.(e);const s=(e.children||[]).map(i=>w.get(i));for(const i of s)i.type==="suite"?await this.runSuite(i,n):i.type==="test"&&await this.runTest(i,n);this.events.onSuiteEnd?.(e)}async runTest(e,n){if((De(e.id)||e.skip)&&!e.only){this.events.onSkip(e);return}const s=gt(e.id);if(n&&!e.only&&!s){this.events.onSkip(e);return}this.events.onStart?.(e);const i=ht(e.parent);try{for(const _ of i.before)await _();e.logs=[],await e.handler(),this.events.onPass(e)}catch(_){this.events.onFail(e,_)}finally{for(const _ of i.after)await _()}}}window.__testRunner=Pe;const mt="1.3.4",Be=(typeof window<"u"?(window.__TWD_MOCK_STATE__||(window.__TWD_MOCK_STATE__={rules:[]}),window.__TWD_MOCK_STATE__):{rules:[]}).rules,yt=async t=>{if("serviceWorker"in navigator){const e=t??"/mock-sw.js";await navigator.serviceWorker.register(`${e}?v=${mt}`),navigator.serviceWorker.controller||await new Promise(n=>{navigator.serviceWorker.addEventListener("controllerchange",n,{once:!0})}),navigator.serviceWorker.addEventListener("message",n=>{if(n.data?.type==="EXECUTED"){const{alias:r,request:s}=n.data,i=Be.find(_=>_.alias===r);i&&(i.executed=!0,i.request=s)}})}},vt=()=>Be,bt=()=>c(q,{className:"lucide-wifi-pen-icon lucide-wifi-pen",dataTestId:"wifi-pen-icon",children:[c("path",{d:"M2 8.82a15 15 0 0 1 20 0"}),c("path",{d:"M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"}),c("path",{d:"M5 12.859a10 10 0 0 1 10.5-2.222"}),c("path",{d:"M8.5 16.429a5 5 0 0 1 3-1.406"})]}),kt=()=>{const t=vt(),e=t.filter(r=>r.executed);return c("button",{onClick:()=>{console.group("🌐 TWD Mock Rules"),console.log("Total rules:",t.length),console.log("Triggered rules:",e.length),console.log("Rules details:"),console.log(t),console.groupEnd()},"aria-label":"View mock rules details in console",style:{background:"#f8fafc",border:"1px solid #cbd5e1",borderRadius:"6px",padding:"8px 12px",cursor:"pointer",fontSize:"12px",color:"#475569",display:"flex",alignItems:"center",gap:"8px",marginBottom:"10px",width:"100%",textAlign:"left",transition:"all 0.2s ease",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)"},children:[c(bt,{}),c("span",{style:{flex:1},children:["Rules: ",e.length,"/",t.length," triggered"]}),c("span",{style:{fontSize:"10px",color:"#1E293B",fontWeight:"500"},children:"View rules in console"})]})},wt={left:{left:0,borderRight:"1px solid #e5e7eb"},right:{right:0,borderLeft:"1px solid #e5e7eb"}},xt='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',St=({open:t,position:e="left"})=>{const[n,r]=re(0),[s,i]=re(t);pt({isOpen:s,position:e});const _=new Pe({onStart:o=>{o.status="running",r(f=>f+1)},onPass:o=>{o.status="pass",r(f=>f+1)},onFail:(o,f)=>{o.status="fail",console.error("Test failed:",o.name,f),o.logs.push(`Test failed: ${f.message}`),r(d=>d+1)},onSkip:o=>{o.status="skip",r(f=>f+1)}}),l=async()=>{await _.runAll()},u=async o=>{const f=Array.from(w.values()).filter(d=>d.type==="test").find(d=>d.id===o);f&&await _.runSingle(f.id)},a=Array.from(w.values());if(!s)return c(ft,{position:e,setOpen:i});const p=a.filter(o=>o.type==="test").length;return c("div",{style:{fontFamily:xt,position:"fixed",top:0,bottom:0,width:"280px",background:"#f9fafb",fontSize:"14px",overflowY:"auto",boxShadow:"2px 0 6px rgba(0,0,0,0.1)",textAlign:"left",zIndex:1e3,...wt[e]},"data-testid":"twd-sidebar",children:[c("div",{style:{padding:"8px",background:"#f9fafb",position:"sticky",top:0,zIndex:1e3,borderBottom:"1px solid #e5e7eb"},children:[c("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"14px"},children:[c("button",{onClick:l,style:{background:"#1A6EF4",color:"white",padding:"4px 8px",borderRadius:"4px",border:"none",cursor:"pointer"},children:"Run All"}),c("button",{"aria-label":"Close sidebar",style:{background:"transparent",border:"none",cursor:"pointer",fontSize:"14px",paddingRight:"0",paddingLeft:"0"},onClick:()=>i(!1),children:"✖"})]}),c("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"14px",color:"#6b7280",marginBottom:"10px"},children:[c("span",{style:{color:"#374151"},children:["Total: ",p]}),c("div",{style:{display:"flex",gap:"4px"},children:[c("span",{style:{color:"#00c951"},children:["✓ ",a.filter(o=>o.status==="pass").length]}),c("span",{style:{color:"#fb2c36"},children:["✗ ",a.filter(o=>o.status==="fail").length]})]})]}),c(kt,{})]}),c("div",{style:{padding:"8px"},children:c(ut,{tests:a.map(o=>({name:o.name,depth:o.depth,status:o.status,logs:o.logs,id:o.id,parent:o.parent,type:o.type,only:o.only,skip:o.skip})),runTest:u})})]})},Tt=t=>({render:e=>{Ke(e,t)}}),Et=(t,e)=>{const{open:n=!0,position:r="left",serviceWorker:s=!0,serviceWorkerUrl:i="/mock-sw.js"}=e||{};Xe(t,c(St,{open:n,position:r}),Tt),s&&yt(i).then(()=>{console.log("Request mocking initialized")}).catch(_=>{console.error("Error initializing request mocking:",_)})};W.initTWD=Et,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
package/dist/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xo=require("./runner.cjs.js"),B=require("./jsx-runtime-CjngqUuo.js"),oi=require("react"),um=(e,t,r=2e3,n=50)=>new Promise((o,i)=>{const a=Date.now(),s=()=>{const l=t();if(l)return o(l);if(Date.now()-a>r)return i(new Error(`Timeout waiting for element ${e}`));setTimeout(s,n)};s()}),cm=(e,t,r=2e3,n=50)=>new Promise((o,i)=>{const a=Date.now(),s=()=>{const l=t();if(l&&l.length>0)return o(Array.from(l));if(Date.now()-a>r)return i(new Error(`Timeout waiting for elements ${e}`));setTimeout(s,n)};s()}),ii=e=>new Promise(t=>setTimeout(t,e)),Xi=(e,t,r,n)=>{if(!e&&!t)throw new Error(n);if(e&&t)throw new Error(n.replace("to be","to not be").replace("to have","to not have").replace("to contain","to not contain"));return r};function dm(e){if(!e.isConnected)return!1;let t=e;for(;t;){const r=getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1;t=t.parentElement}return!0}const fm={"have.text":{positive:{pass:e=>`Assertion passed: Text is exactly "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected text to be "${e[0]}", but got "${t}"`},negative:{pass:e=>`Assertion passed: Text is not exactly "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected text to not be "${e[0]}", but got "${t}"`}},"contain.text":{positive:{pass:e=>`Assertion passed: Text contains "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected text to contain "${e[0]}", but got "${t}"`},negative:{pass:e=>`Assertion passed: Text does not contain "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected text to not contain "${e[0]}", but got "${t}"`}},"be.empty":{positive:{pass:()=>"Assertion passed: Text is empty",fail:(e,t)=>`Assertion failed: Expected text to be empty, but got "${t}"`},negative:{pass:()=>"Assertion passed: Text is not empty",fail:(e,t)=>`Assertion failed: Expected text to not be empty, but got "${t}"`}},"have.attr":{positive:{pass:e=>`Assertion passed: Attribute "${e[0]}" is "${e[1]}"`,fail:(e,t)=>`Assertion failed: Expected attribute "${e[0]}" to be "${e[1]}", but got "${t}"`},negative:{pass:e=>`Assertion passed: Attribute "${e[0]}" is not "${e[1]}"`,fail:(e,t)=>`Assertion failed: Expected attribute "${e[0]}" to not be "${e[1]}", but got "${t}"`}},"have.value":{positive:{pass:e=>`Assertion passed: Value is "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected value to be "${e[0]}", but got "${t}"`},negative:{pass:e=>`Assertion passed: Value is not "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected value to not be "${e[0]}", but got "${t}"`}},"be.disabled":{positive:{pass:()=>"Assertion passed: Element is disabled",fail:()=>"Assertion failed: Expected element to be disabled"},negative:{pass:()=>"Assertion passed: Element is not disabled",fail:()=>"Assertion failed: Expected element to not be disabled"}},"be.enabled":{positive:{pass:()=>"Assertion passed: Element is enabled",fail:()=>"Assertion failed: Expected element to be enabled"},negative:{pass:()=>"Assertion passed: Element is not enabled",fail:()=>"Assertion failed: Expected element to not be enabled"}},"be.checked":{positive:{pass:()=>"Assertion passed: Element is checked",fail:()=>"Assertion failed: Expected element to be checked"},negative:{pass:()=>"Assertion passed: Element is not checked",fail:()=>"Assertion failed: Expected element to not be checked"}},"be.selected":{positive:{pass:()=>"Assertion passed: Element is selected",fail:()=>"Assertion failed: Expected element to be selected"},negative:{pass:()=>"Assertion passed: Element is not selected",fail:()=>"Assertion failed: Expected element to not be selected"}},"be.focused":{positive:{pass:()=>"Assertion passed: Element is focused",fail:()=>"Assertion failed: Expected element to be focused"},negative:{pass:()=>"Assertion passed: Element is not focused",fail:()=>"Assertion failed: Expected element to not be focused"}},"be.visible":{positive:{pass:()=>"Assertion passed: Element is visible",fail:()=>"Assertion failed: Expected element to be visible"},negative:{pass:()=>"Assertion passed: Element is not visible",fail:()=>"Assertion failed: Expected element to not be visible"}},"have.class":{positive:{pass:e=>`Assertion passed: Element has class "${e[0]}"`,fail:e=>`Assertion failed: Expected element to have class "${e[0]}"`},negative:{pass:e=>`Assertion passed: Element does not have class "${e[0]}"`,fail:e=>`Assertion failed: Expected element to not have class "${e[0]}"`}}},Di=(e,t,...r)=>{const n=t.startsWith("not."),o=n?t.slice(4):t,i=(e.textContent||"").trim(),a=fm[o];if(!a)throw new Error(`Unknown assertion: ${o}`);const s=n?"negative":"positive";let l,u;switch(o){case"have.text":l=i===r[0],u=i;break;case"contain.text":l=i.includes(r[0]),u=i;break;case"be.empty":l=i.length===0,u=i;break;case"have.attr":u=e.getAttribute(r[0]),l=u===r[1];break;case"have.value":u=e.value,l=u===r[0];break;case"be.disabled":l=e.disabled===!0;break;case"be.enabled":l=e.disabled===!1;break;case"be.checked":l=e.checked===!0;break;case"be.selected":l=e.selected===!0;break;case"be.focused":l=document.activeElement===e;break;case"be.visible":l=dm(e);break;case"have.class":l=e.classList.contains(r[0]);break;default:throw new Error(`Unknown assertion: ${o}`)}return Xi(l,n,a[s].pass(r),a[s].fail(r,u))},Re=e=>{const t=xo.handlers.size?Array.from(xo.handlers.values()).find(r=>r.status==="running"):null;t&&t.logs?.push(e)},Ca="1.3.3",pm=()=>typeof window<"u"?(window.__TWD_MOCK_STATE__||(window.__TWD_MOCK_STATE__={rules:[]}),window.__TWD_MOCK_STATE__):{rules:[]},mm=pm(),Xe=mm.rules,hm=100,bm=async e=>{if("serviceWorker"in navigator){const t=e??"/mock-sw.js";await navigator.serviceWorker.register(`${t}?v=${Ca}`),navigator.serviceWorker.controller||await new Promise(r=>{navigator.serviceWorker.addEventListener("controllerchange",r,{once:!0})}),navigator.serviceWorker.addEventListener("message",r=>{if(r.data?.type==="EXECUTED"){const{alias:n,request:o}=r.data,i=Xe.find(a=>a.alias===n);i&&(i.executed=!0,i.request=o)}})}},vm=async(e,t)=>{const r={alias:e,...t,executed:!1},n=Xe.findIndex(o=>o.alias===e);n!==-1?Xe[n]=r:Xe.push(r),navigator.serviceWorker.controller?.postMessage({type:"ADD_RULE",rule:r,version:Ca}),await ii(hm),await Promise.resolve()},ym=async e=>await Promise.all(e.map(r=>vd(r))),vd=async(e,t=10,r=100)=>{if(!Xe.find(o=>o.alias===e))throw new Error(`Rule ${e} not found`);for(let o=0;o<t;o++){const i=Xe.find(a=>a.alias===e&&a.executed);if(i)return Promise.resolve(i);o<t-1&&await new Promise(a=>setTimeout(a,r))}throw console.log(`Rule ${e} was not executed within ${t*r}ms`),new Error(`Rule ${e} was not executed within ${t*r}ms`)},yd=()=>Xe,gm=()=>{navigator.serviceWorker.controller?.postMessage({type:"CLEAR_RULES",version:Ca}),Xe.length=0},Rm=(e,t)=>{const r=e.startsWith("not.");switch(r?e.slice(4):e){case"eq":return Xi(window.location.href===t,r,`Assertion passed: URL is ${t}`,`Assertion failed: Expected URL to be ${t}, but got ${window.location.href}`);case"contain.url":return Xi(window.location.href.includes(t),r,`Assertion passed: URL contains ${t}`,`Assertion failed: Expected URL to contain ${t}, but got ${window.location.href}`);default:throw new Error(`Unknown assertion: ${e}`)}},wm=()=>({location:window.location,should:async(e,t,r=5)=>{let n="",o;for(let i=0;i<r;i++)try{n=Rm(e,t),Re(n);break}catch(a){await new Promise(s=>setTimeout(s,100)),o=a}if(o)throw o;return n}}),Em=100,xm=async(e,t)=>{if(Re(`visit("${e}")`),window.location.pathname===e||t){const r=`/__dummy_${Math.random().toString(36).slice(2)}`;window.history.pushState({},"",r),window.dispatchEvent(new PopStateEvent("popstate")),await ii(10)}window.history.pushState({},"",e),window.dispatchEvent(new PopStateEvent("popstate")),await ii(Em)},Cm={get:async e=>{const t=`body > div:not(#twd-sidebar-root) ${e}`;Re(`Searching get("${e}")`);const r=await um(e,()=>document.querySelector(t)),n={el:r,should:(o,...i)=>{const a=Di(r,o,...i);return Re(a),n}};return n},setInputValue:(e,t)=>{const{set:r}=Object.getOwnPropertyDescriptor(e.__proto__,"value");r.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},getAll:async e=>{const t=`body > div:not(#twd-sidebar-root) ${e}`;return Re(`Searching getAll("${e}")`),(await cm(e,()=>document.querySelectorAll(t))).map(n=>{const o={el:n,should:(i,...a)=>{const s=Di(n,i,...a);return Re(s),o}};return o})},visit:xm,url:wm,mockRequest:vm,waitForRequest:vd,waitForRequests:ym,initRequestMocking:bm,clearRequestMockRules:gm,getRequestMockRules:yd,should:(e,t,...r)=>{const n=Di(e,t,...r);Re(n)},wait:ii,mockComponent:B.mockComponent,clearComponentMocks:B.clearComponentMocks,notExists:async e=>{const t=`body > div:not(#twd-sidebar-root) ${e}`;if(Re(`Checking notExists("${e}")`),document.querySelector(t))throw new Error(`Element "${e}" exists in the DOM.`);Re(`Assertion passed: Element "${e}" does not exist in the DOM.`)}};var qa=Object.defineProperty,qm=(e,t,r)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>qa(e,"name",{value:t,configurable:!0}),_a=(e,t)=>{for(var r in t)qa(e,r,{get:t[r],enumerable:!0})},gd=(e,t,r)=>qm(e,typeof t!="symbol"?t+"":t,r),ai={};_a(ai,{addChainableMethod:()=>Ba,addLengthGuard:()=>jo,addMethod:()=>ja,addProperty:()=>ka,checkError:()=>fe,compareByInspect:()=>ui,eql:()=>Kd,events:()=>Ci,expectTypes:()=>Td,flag:()=>U,getActual:()=>Ei,getMessage:()=>Sa,getName:()=>qi,getOperator:()=>za,getOwnEnumerableProperties:()=>Ua,getOwnEnumerablePropertySymbols:()=>Fa,getPathInfo:()=>Ia,hasProperty:()=>xi,inspect:()=>H,isNaN:()=>ci,isNumeric:()=>ne,isProxyEnabled:()=>ko,isRegExp:()=>di,objDisplay:()=>st,overwriteChainableMethod:()=>La,overwriteMethod:()=>$a,overwriteProperty:()=>Da,proxify:()=>_t,test:()=>Pa,transferFlags:()=>Ee,type:()=>Q});var fe={};_a(fe,{compatibleConstructor:()=>Ed,compatibleInstance:()=>wd,compatibleMessage:()=>xd,getConstructorName:()=>Cd,getMessage:()=>qd});function wi(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}x(wi,"isErrorInstance");function Rd(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(Rd,"isRegExp");function wd(e,t){return wi(t)&&e===t}x(wd,"compatibleInstance");function Ed(e,t){return wi(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:!1}x(Ed,"compatibleConstructor");function xd(e,t){const r=typeof e=="string"?e:e.message;return Rd(t)?t.test(r):typeof t=="string"?r.indexOf(t)!==-1:!1}x(xd,"compatibleMessage");function Cd(e){let t=e;return wi(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}x(Cd,"getConstructorName");function qd(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}x(qd,"getMessage");function U(e,t,r){let n=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)n[t]=r;else return n[t]}x(U,"flag");function Pa(e,t){let r=U(e,"negate"),n=t[0];return r?!n:n}x(Pa,"test");function Q(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}x(Q,"type");var _m="captureStackTrace"in Error,_d=class Pd extends Error{constructor(t="Unspecified AssertionError",r,n){super(t),gd(this,"message"),this.message=t,_m&&Error.captureStackTrace(this,n||Pd);for(const o in r)o in this||(this[o]=r[o])}get name(){return"AssertionError"}get ok(){return!1}toJSON(t){return{...this,name:this.name,message:this.message,ok:!1,stack:t!==!1?this.stack:void 0}}};x(_d,"AssertionError");var G=_d;function Td(e,t){let r=U(e,"message"),n=U(e,"ssfi");r=r?r+": ":"",e=U(e,"object"),t=t.map(function(a){return a.toLowerCase()}),t.sort();let o=t.map(function(a,s){let l=~["a","e","i","o","u"].indexOf(a.charAt(0))?"an":"a";return(t.length>1&&s===t.length-1?"or ":"")+l+" "+a}).join(", "),i=Q(e).toLowerCase();if(!t.some(function(a){return i===a}))throw new G(r+"object tested must be "+o+", but "+i+" given",void 0,n)}x(Td,"expectTypes");function Ei(e,t){return t.length>4?t[4]:e._obj}x(Ei,"getActual");var _s={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},Pm={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},yt="…";function Sd(e,t){const r=_s[Pm[t]]||_s[t]||"";return r?`\x1B[${r[0]}m${String(e)}\x1B[${r[1]}m`:String(e)}x(Sd,"colorise");function Ad({showHidden:e=!1,depth:t=2,colors:r=!1,customInspect:n=!0,showProxy:o=!1,maxArrayLength:i=1/0,breakLength:a=1/0,seen:s=[],truncate:l=1/0,stylize:u=String}={},f){const c={showHidden:!!e,depth:Number(t),colors:!!r,customInspect:!!n,showProxy:!!o,maxArrayLength:Number(i),breakLength:Number(a),truncate:Number(l),seen:s,inspect:f,stylize:u};return c.colors&&(c.stylize=Sd),c}x(Ad,"normaliseOptions");function Md(e){return e>="\uD800"&&e<="\uDBFF"}x(Md,"isHighSurrogate");function Fe(e,t,r=yt){e=String(e);const n=r.length,o=e.length;if(n>t&&o>n)return r;if(o>t&&o>n){let i=t-n;return i>0&&Md(e[i-1])&&(i=i-1),`${e.slice(0,i)}${r}`}return e}x(Fe,"truncate");function he(e,t,r,n=", "){r=r||t.inspect;const o=e.length;if(o===0)return"";const i=t.truncate;let a="",s="",l="";for(let u=0;u<o;u+=1){const f=u+1===e.length,c=u+2===e.length;l=`${yt}(${e.length-u})`;const d=e[u];t.truncate=i-a.length-(f?0:n.length);const b=s||r(d,t)+(f?"":n),v=a.length+b.length,R=v+l.length;if(f&&v>i&&a.length+l.length<=i||!f&&!c&&R>i||(s=f?"":r(e[u+1],t)+(c?"":n),!f&&c&&R>i&&v+s.length>i))break;if(a+=b,!f&&!c&&v+s.length>=i){l=`${yt}(${e.length-u-1})`;break}l=""}return`${a}${l}`}x(he,"inspectList");function Od(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}x(Od,"quoteComplexKey");function gt([e,t],r){return r.truncate-=2,typeof e=="string"?e=Od(e):typeof e!="number"&&(e=`[${r.inspect(e,r)}]`),r.truncate-=e.length,t=r.inspect(t,r),`${e}: ${t}`}x(gt,"inspectProperty");function Id(e,t){const r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return"[]";t.truncate-=4;const n=he(e,t);t.truncate-=n.length;let o="";return r.length&&(o=he(r.map(i=>[i,e[i]]),t,gt)),`[ ${n}${o?`, ${o}`:""} ]`}x(Id,"inspectArray");var Tm=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function qe(e,t){const r=Tm(e);t.truncate-=r.length+4;const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return`${r}[]`;let o="";for(let a=0;a<e.length;a++){const s=`${t.stylize(Fe(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=s.length,e[a]!==e.length&&t.truncate<=3){o+=`${yt}(${e.length-e[a]+1})`;break}o+=s}let i="";return n.length&&(i=he(n.map(a=>[a,e[a]]),t,gt)),`${r}[ ${o}${i?`, ${i}`:""} ]`}x(qe,"inspectTypedArray");function Nd(e,t){const r=e.toJSON();if(r===null)return"Invalid Date";const n=r.split("T"),o=n[0];return t.stylize(`${o}T${Fe(n[1],t.truncate-o.length-1)}`,"date")}x(Nd,"inspectDate");function Ji(e,t){const r=e[Symbol.toStringTag]||"Function",n=e.name;return n?t.stylize(`[${r} ${Fe(n,t.truncate-11)}]`,"special"):t.stylize(`[${r}]`,"special")}x(Ji,"inspectFunction");function kd([e,t],r){return r.truncate-=4,e=r.inspect(e,r),r.truncate-=e.length,t=r.inspect(t,r),`${e} => ${t}`}x(kd,"inspectMapEntry");function jd(e){const t=[];return e.forEach((r,n)=>{t.push([n,r])}),t}x(jd,"mapToEntries");function Dd(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${he(jd(e),t,kd)} }`)}x(Dd,"inspectMap");var Sm=Number.isNaN||(e=>e!==e);function Qi(e,t){return Sm(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(Fe(String(e),t.truncate),"number")}x(Qi,"inspectNumber");function Zi(e,t){let r=Fe(e.toString(),t.truncate-1);return r!==yt&&(r+="n"),t.stylize(r,"bigint")}x(Zi,"inspectBigInt");function $d(e,t){const r=e.toString().split("/")[2],n=t.truncate-(2+r.length),o=e.source;return t.stylize(`/${Fe(o,n)}/${r}`,"regexp")}x($d,"inspectRegExp");function Bd(e){const t=[];return e.forEach(r=>{t.push(r)}),t}x(Bd,"arrayFromSet");function Ld(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${he(Bd(e),t)} }`)}x(Ld,"inspectSet");var Ps=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),Am={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Mm=16;function Fd(e){return Am[e]||`\\u${`0000${e.charCodeAt(0).toString(Mm)}`.slice(-4)}`}x(Fd,"escape");function ea(e,t){return Ps.test(e)&&(e=e.replace(Ps,Fd)),t.stylize(`'${Fe(e,t.truncate-2)}'`,"string")}x(ea,"inspectString");function ta(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}x(ta,"inspectSymbol");var Om=x(()=>"Promise{…}","getPromiseValue"),Im=Om;function Co(e,t){const r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(r.length===0&&n.length===0)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const o=he(r.map(s=>[s,e[s]]),t,gt),i=he(n.map(s=>[s,e[s]]),t,gt);t.seen.pop();let a="";return o&&i&&(a=", "),`{ ${o}${a}${i} }`}x(Co,"inspectObject");var $i=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function Ud(e,t){let r="";return $i&&$i in e&&(r=e[$i]),r=r||e.constructor.name,(!r||r==="_class")&&(r="<Anonymous Class>"),t.truncate-=r.length,`${r}${Co(e,t)}`}x(Ud,"inspectClass");function zd(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${he(e,t)} ]`)}x(zd,"inspectArguments");var Nm=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Vd(e,t){const r=Object.getOwnPropertyNames(e).filter(a=>Nm.indexOf(a)===-1),n=e.name;t.truncate-=n.length;let o="";if(typeof e.message=="string"?o=Fe(e.message,t.truncate):r.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const i=he(r.map(a=>[a,e[a]]),t,gt);return`${n}${o}${i?` { ${i} }`:""}`}x(Vd,"inspectObject");function Hd([e,t],r){return r.truncate-=3,t?`${r.stylize(String(e),"yellow")}=${r.stylize(`"${t}"`,"string")}`:`${r.stylize(String(e),"yellow")}`}x(Hd,"inspectAttribute");function si(e,t){return he(e,t,Wd,`
2
- `)}x(si,"inspectNodeCollection");function Wd(e,t){switch(e.nodeType){case 1:return Ta(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}x(Wd,"inspectNode");function Ta(e,t){const r=e.getAttributeNames(),n=e.tagName.toLowerCase(),o=t.stylize(`<${n}`,"special"),i=t.stylize(">","special"),a=t.stylize(`</${n}>`,"special");t.truncate-=n.length*2+5;let s="";r.length>0&&(s+=" ",s+=he(r.map(f=>[f,e.getAttribute(f)]),t,Hd," ")),t.truncate-=s.length;const l=t.truncate;let u=si(e.children,t);return u&&u.length>l&&(u=`${yt}(${e.children.length})`),`${o}${s}${i}${u}${a}`}x(Ta,"inspectHTML");var km=typeof Symbol=="function"&&typeof Symbol.for=="function",Bi=km?Symbol.for("chai/inspect"):"@@chai/inspect",Li=Symbol.for("nodejs.util.inspect.custom"),Ts=new WeakMap,Ss={},As={undefined:x((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:x((e,t)=>t.stylize("null","null"),"null"),boolean:x((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:x((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:Qi,Number:Qi,bigint:Zi,BigInt:Zi,string:ea,String:ea,function:Ji,Function:Ji,symbol:ta,Symbol:ta,Array:Id,Date:Nd,Map:Dd,Set:Ld,RegExp:$d,Promise:Im,WeakSet:x((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet"),WeakMap:x((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),Arguments:zd,Int8Array:qe,Uint8Array:qe,Uint8ClampedArray:qe,Int16Array:qe,Uint16Array:qe,Int32Array:qe,Uint32Array:qe,Float32Array:qe,Float64Array:qe,Generator:x(()=>"","Generator"),DataView:x(()=>"","DataView"),ArrayBuffer:x(()=>"","ArrayBuffer"),Error:Vd,HTMLCollection:si,NodeList:si},jm=x((e,t,r,n)=>Bi in e&&typeof e[Bi]=="function"?e[Bi](t):Li in e&&typeof e[Li]=="function"?e[Li](t.depth,t,n):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Ts.has(e.constructor)?Ts.get(e.constructor)(e,t):Ss[r]?Ss[r](e,t):"","inspectCustom"),Dm=Object.prototype.toString;function qo(e,t={}){const r=Ad(t,qo),{customInspect:n}=r;let o=e===null?"null":typeof e;if(o==="object"&&(o=Dm.call(e).slice(8,-1)),o in As)return As[o](e,r);if(n&&e){const a=jm(e,r,o,qo);if(a)return typeof a=="string"?a:qo(a,r)}const i=e?Object.getPrototypeOf(e):!1;return i===Object.prototype||i===null?Co(e,r):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Ta(e,r):"constructor"in e?e.constructor!==Object?Ud(e,r):Co(e,r):e===Object(e)?Co(e,r):r.stylize(String(e),o)}x(qo,"inspect");var ie={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function H(e,t,r,n){let o={colors:n,depth:typeof r>"u"?2:r,showHidden:t,truncate:ie.truncateThreshold?ie.truncateThreshold:1/0};return qo(e,o)}x(H,"inspect");function st(e){let t=H(e),r=Object.prototype.toString.call(e);if(ie.truncateThreshold&&t.length>=ie.truncateThreshold){if(r==="[object Function]")return!e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(r==="[object Array]")return"[ Array("+e.length+") ]";if(r==="[object Object]"){let n=Object.keys(e);return"{ Object ("+(n.length>2?n.splice(0,2).join(", ")+", ...":n.join(", "))+") }"}else return t}else return t}x(st,"objDisplay");function Sa(e,t){let r=U(e,"negate"),n=U(e,"object"),o=t[3],i=Ei(e,t),a=r?t[2]:t[1],s=U(e,"message");return typeof a=="function"&&(a=a()),a=a||"",a=a.replace(/#\{this\}/g,function(){return st(n)}).replace(/#\{act\}/g,function(){return st(i)}).replace(/#\{exp\}/g,function(){return st(o)}),s?s+": "+a:a}x(Sa,"getMessage");function Ee(e,t,r){let n=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),r=arguments.length===3?r:!0;for(let o in n)(r||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(t.__flags[o]=n[o])}x(Ee,"transferFlags");function ra(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}x(ra,"type");function Aa(){this._key="chai/deep-eql__"+Math.random()+Date.now()}x(Aa,"FakeMap");Aa.prototype={get:x(function(t){return t[this._key]},"get"),set:x(function(t,r){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:r,configurable:!0})},"set")};var Gd=typeof WeakMap=="function"?WeakMap:Aa;function na(e,t,r){if(!r||ut(e)||ut(t))return null;var n=r.get(e);if(n){var o=n.get(t);if(typeof o=="boolean")return o}return null}x(na,"memoizeCompare");function go(e,t,r,n){if(!(!r||ut(e)||ut(t))){var o=r.get(e);o?o.set(t,n):(o=new Gd,o.set(t,n),r.set(e,o))}}x(go,"memoizeSet");var Kd=No;function No(e,t,r){if(r&&r.comparator)return oa(e,t,r);var n=Ma(e,t);return n!==null?n:oa(e,t,r)}x(No,"deepEqual");function Ma(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:ut(e)||ut(t)?!1:null}x(Ma,"simpleEqual");function oa(e,t,r){r=r||{},r.memoize=r.memoize===!1?!1:r.memoize||new Gd;var n=r&&r.comparator,o=na(e,t,r.memoize);if(o!==null)return o;var i=na(t,e,r.memoize);if(i!==null)return i;if(n){var a=n(e,t);if(a===!1||a===!0)return go(e,t,r.memoize,a),a;var s=Ma(e,t);if(s!==null)return s}var l=ra(e);if(l!==ra(t))return go(e,t,r.memoize,!1),!1;go(e,t,r.memoize,!0);var u=Yd(e,t,l,r);return go(e,t,r.memoize,u),u}x(oa,"extensiveDeepEqual");function Yd(e,t,r,n){switch(r){case"String":case"Number":case"Boolean":case"Date":return No(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return Oa(e,t,["name","message","code"],n);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return Je(e,t,n);case"RegExp":return Xd(e,t);case"Generator":return Jd(e,t,n);case"DataView":return Je(new Uint8Array(e.buffer),new Uint8Array(t.buffer),n);case"ArrayBuffer":return Je(new Uint8Array(e),new Uint8Array(t),n);case"Set":return ia(e,t,n);case"Map":return ia(e,t,n);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return e.equals(t);case"Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return e.toString()===t.toString();default:return Zd(e,t,n)}}x(Yd,"extensiveDeepEqualByType");function Xd(e,t){return e.toString()===t.toString()}x(Xd,"regexpEqual");function ia(e,t,r){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var n=[],o=[];return e.forEach(x(function(a,s){n.push([a,s])},"gatherEntries")),t.forEach(x(function(a,s){o.push([a,s])},"gatherEntries")),Je(n.sort(),o.sort(),r)}x(ia,"entriesEqual");function Je(e,t,r){var n=e.length;if(n!==t.length)return!1;if(n===0)return!0;for(var o=-1;++o<n;)if(No(e[o],t[o],r)===!1)return!1;return!0}x(Je,"iterableEqual");function Jd(e,t,r){return Je(li(e),li(t),r)}x(Jd,"generatorEqual");function Qd(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}x(Qd,"hasIteratorFunction");function aa(e){if(Qd(e))try{return li(e[Symbol.iterator]())}catch{return[]}return[]}x(aa,"getIteratorEntries");function li(e){for(var t=e.next(),r=[t.value];t.done===!1;)t=e.next(),r.push(t.value);return r}x(li,"getGeneratorEntries");function sa(e){var t=[];for(var r in e)t.push(r);return t}x(sa,"getEnumerableKeys");function la(e){for(var t=[],r=Object.getOwnPropertySymbols(e),n=0;n<r.length;n+=1){var o=r[n];Object.getOwnPropertyDescriptor(e,o).enumerable&&t.push(o)}return t}x(la,"getEnumerableSymbols");function Oa(e,t,r,n){var o=r.length;if(o===0)return!0;for(var i=0;i<o;i+=1)if(No(e[r[i]],t[r[i]],n)===!1)return!1;return!0}x(Oa,"keysEqual");function Zd(e,t,r){var n=sa(e),o=sa(t),i=la(e),a=la(t);if(n=n.concat(i),o=o.concat(a),n.length&&n.length===o.length)return Je(ua(n).sort(),ua(o).sort())===!1?!1:Oa(e,t,n,r);var s=aa(e),l=aa(t);return s.length&&s.length===l.length?(s.sort(),l.sort(),Je(s,l,r)):n.length===0&&s.length===0&&o.length===0&&l.length===0}x(Zd,"objectEqual");function ut(e){return e===null||typeof e!="object"}x(ut,"isPrimitive");function ua(e){return e.map(x(function(r){return typeof r=="symbol"?r.toString():r},"mapSymbol"))}x(ua,"mapSymbols");function xi(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}x(xi,"hasProperty");function ef(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(n=>{if(n==="constructor"||n==="__proto__"||n==="prototype")return{};const i=/^\[(\d+)\]$/.exec(n);let a=null;return i?a={i:parseFloat(i[1])}:a={p:n.replace(/\\([.[\]])/g,"$1")},a})}x(ef,"parsePath");function ca(e,t,r){let n=e,o=null;r=typeof r>"u"?t.length:r;for(let i=0;i<r;i++){const a=t[i];n&&(typeof a.p>"u"?n=n[a.i]:n=n[a.p],i===r-1&&(o=n))}return o}x(ca,"internalGetPathValue");function Ia(e,t){const r=ef(t),n=r[r.length-1],o={parent:r.length>1?ca(e,r,r.length-1):e,name:n.p||n.i,value:ca(e,r)};return o.exists=xi(o.parent,o.name),o}x(Ia,"getPathInfo");var tf=class rf{constructor(t,r,n,o){return gd(this,"__flags",{}),U(this,"ssfi",n||rf),U(this,"lockSsfi",o),U(this,"object",t),U(this,"message",r),U(this,"eql",ie.deepEqual||Kd),_t(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ie.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ie.includeStack=t}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ie.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ie.showDiff=t}static addProperty(t,r){ka(this.prototype,t,r)}static addMethod(t,r){ja(this.prototype,t,r)}static addChainableMethod(t,r,n){Ba(this.prototype,t,r,n)}static overwriteProperty(t,r){Da(this.prototype,t,r)}static overwriteMethod(t,r){$a(this.prototype,t,r)}static overwriteChainableMethod(t,r,n){La(this.prototype,t,r,n)}assert(t,r,n,o,i,a){const s=Pa(this,arguments);if(a!==!1&&(a=!0),o===void 0&&i===void 0&&(a=!1),ie.showDiff!==!0&&(a=!1),!s){r=Sa(this,arguments);const u={actual:Ei(this,arguments),expected:o,showDiff:a},f=za(this,arguments);throw f&&(u.operator=f),new G(r,u,ie.includeStack?this.assert:U(this,"ssfi"))}}get _obj(){return U(this,"object")}set _obj(t){U(this,"object",t)}};x(tf,"Assertion");var h=tf,Ci=new EventTarget,nf=class extends Event{constructor(t,r,n){super(t),this.name=String(r),this.fn=n}};x(nf,"PluginEvent");var Na=nf;function ko(){return ie.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}x(ko,"isProxyEnabled");function ka(e,t,r){r=r===void 0?function(){}:r,Object.defineProperty(e,t,{get:x(function n(){!ko()&&!U(this,"lockSsfi")&&U(this,"ssfi",n);let o=r.call(this);if(o!==void 0)return o;let i=new h;return Ee(this,i),i},"propertyGetter"),configurable:!0}),Ci.dispatchEvent(new Na("addProperty",t,r))}x(ka,"addProperty");var $m=Object.getOwnPropertyDescriptor(function(){},"length");function jo(e,t,r){return $m.configurable&&Object.defineProperty(e,"length",{get:x(function(){throw Error(r?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}x(jo,"addLengthGuard");function of(e){let t=Object.getOwnPropertyNames(e);function r(o){t.indexOf(o)===-1&&t.push(o)}x(r,"addProperty");let n=Object.getPrototypeOf(e);for(;n!==null;)Object.getOwnPropertyNames(n).forEach(r),n=Object.getPrototypeOf(n);return t}x(of,"getProperties");var Ms=["__flags","__methods","_obj","assert"];function _t(e,t){return ko()?new Proxy(e,{get:x(function r(n,o){if(typeof o=="string"&&ie.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(n,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');let i=null,a=4;throw of(n).forEach(function(s){if(!Object.prototype.hasOwnProperty(s)&&Ms.indexOf(s)===-1){let l=af(o,s,a);l<a&&(i=s,a=l)}}),Error(i!==null?"Invalid Chai property: "+o+'. Did you mean "'+i+'"?':"Invalid Chai property: "+o)}return Ms.indexOf(o)===-1&&!U(n,"lockSsfi")&&U(n,"ssfi",r),Reflect.get(n,o)},"proxyGetter")}):e}x(_t,"proxify");function af(e,t,r){if(Math.abs(e.length-t.length)>=r)return r;let n=[];for(let o=0;o<=e.length;o++)n[o]=Array(t.length+1).fill(0),n[o][0]=o;for(let o=0;o<t.length;o++)n[0][o]=o;for(let o=1;o<=e.length;o++){let i=e.charCodeAt(o-1);for(let a=1;a<=t.length;a++){if(Math.abs(o-a)>=r){n[o][a]=r;continue}n[o][a]=Math.min(n[o-1][a]+1,n[o][a-1]+1,n[o-1][a-1]+(i===t.charCodeAt(a-1)?0:1))}}return n[e.length][t.length]}x(af,"stringDistanceCapped");function ja(e,t,r){let n=x(function(){U(this,"lockSsfi")||U(this,"ssfi",n);let o=r.apply(this,arguments);if(o!==void 0)return o;let i=new h;return Ee(this,i),i},"methodWrapper");jo(n,t,!1),e[t]=_t(n,t),Ci.dispatchEvent(new Na("addMethod",t,r))}x(ja,"addMethod");function Da(e,t,r){let n=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");n&&typeof n.get=="function"&&(o=n.get),Object.defineProperty(e,t,{get:x(function i(){!ko()&&!U(this,"lockSsfi")&&U(this,"ssfi",i);let a=U(this,"lockSsfi");U(this,"lockSsfi",!0);let s=r(o).call(this);if(U(this,"lockSsfi",a),s!==void 0)return s;let l=new h;return Ee(this,l),l},"overwritingPropertyGetter"),configurable:!0})}x(Da,"overwriteProperty");function $a(e,t,r){let n=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");n&&typeof n=="function"&&(o=n);let i=x(function(){U(this,"lockSsfi")||U(this,"ssfi",i);let a=U(this,"lockSsfi");U(this,"lockSsfi",!0);let s=r(o).apply(this,arguments);if(U(this,"lockSsfi",a),s!==void 0)return s;let l=new h;return Ee(this,l),l},"overwritingMethodWrapper");jo(i,t,!1),e[t]=_t(i,t)}x($a,"overwriteMethod");var Bm=typeof Object.setPrototypeOf=="function",Os=x(function(){},"testFn"),Lm=Object.getOwnPropertyNames(Os).filter(function(e){let t=Object.getOwnPropertyDescriptor(Os,e);return typeof t!="object"?!0:!t.configurable}),Fm=Function.prototype.call,Um=Function.prototype.apply,sf=class extends Na{constructor(t,r,n,o){super(t,r,n),this.chainingBehavior=o}};x(sf,"PluginAddChainableMethodEvent");var zm=sf;function Ba(e,t,r,n){typeof n!="function"&&(n=x(function(){},"chainingBehavior"));let o={method:r,chainingBehavior:n};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(function(){o.chainingBehavior.call(this);let a=x(function(){U(this,"lockSsfi")||U(this,"ssfi",a);let s=o.method.apply(this,arguments);if(s!==void 0)return s;let l=new h;return Ee(this,l),l},"chainableMethodWrapper");if(jo(a,t,!0),Bm){let s=Object.create(this);s.call=Fm,s.apply=Um,Object.setPrototypeOf(a,s)}else Object.getOwnPropertyNames(e).forEach(function(l){if(Lm.indexOf(l)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(a,l,u)});return Ee(this,a),_t(a)},"chainableMethodGetter"),configurable:!0}),Ci.dispatchEvent(new zm("addChainableMethod",t,r,n))}x(Ba,"addChainableMethod");function La(e,t,r,n){let o=e.__methods[t],i=o.chainingBehavior;o.chainingBehavior=x(function(){let l=n(i).call(this);if(l!==void 0)return l;let u=new h;return Ee(this,u),u},"overwritingChainableMethodGetter");let a=o.method;o.method=x(function(){let l=r(a).apply(this,arguments);if(l!==void 0)return l;let u=new h;return Ee(this,u),u},"overwritingChainableMethodWrapper")}x(La,"overwriteChainableMethod");function ui(e,t){return H(e)<H(t)?-1:1}x(ui,"compareByInspect");function Fa(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}x(Fa,"getOwnEnumerablePropertySymbols");function Ua(e){return Object.keys(e).concat(Fa(e))}x(Ua,"getOwnEnumerableProperties");var ci=Number.isNaN;function lf(e){let t=Q(e);return["Array","Object","Function"].indexOf(t)!==-1}x(lf,"isObjectType");function za(e,t){let r=U(e,"operator"),n=U(e,"negate"),o=t[3],i=n?t[2]:t[1];if(r)return r;if(typeof i=="function"&&(i=i()),i=i||"",!i||/\shave\s/.test(i))return;let a=lf(o);return/\snot\s/.test(i)?a?"notDeepStrictEqual":"notStrictEqual":a?"deepStrictEqual":"strictEqual"}x(za,"getOperator");function qi(e){return e.name}x(qi,"getName");function di(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(di,"isRegExp");function ne(e){return["Number","BigInt"].includes(Q(e))}x(ne,"isNumeric");var{flag:w}=ai;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){h.addProperty(e)});h.addProperty("not",function(){w(this,"negate",!0)});h.addProperty("deep",function(){w(this,"deep",!0)});h.addProperty("nested",function(){w(this,"nested",!0)});h.addProperty("own",function(){w(this,"own",!0)});h.addProperty("ordered",function(){w(this,"ordered",!0)});h.addProperty("any",function(){w(this,"any",!0),w(this,"all",!1)});h.addProperty("all",function(){w(this,"all",!0),w(this,"any",!1)});var Is={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Va(e,t){t&&w(this,"message",t),e=e.toLowerCase();let r=w(this,"object"),n=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";const o=Q(r).toLowerCase();Is.function.includes(e)?this.assert(Is[e].includes(o),"expected #{this} to be "+n+e,"expected #{this} not to be "+n+e):this.assert(e===o,"expected #{this} to be "+n+e,"expected #{this} not to be "+n+e)}x(Va,"an");h.addChainableMethod("an",Va);h.addChainableMethod("a",Va);function uf(e,t){return ci(e)&&ci(t)||e===t}x(uf,"SameValueZero");function Do(){w(this,"contains",!0)}x(Do,"includeChainingBehavior");function $o(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=Q(r).toLowerCase(),o=w(this,"message"),i=w(this,"negate"),a=w(this,"ssfi"),s=w(this,"deep"),l=s?"deep ":"",u=s?w(this,"eql"):uf;o=o?o+": ":"";let f=!1;switch(n){case"string":f=r.indexOf(e)!==-1;break;case"weakset":if(s)throw new G(o+"unable to use .deep.include with WeakSet",void 0,a);f=r.has(e);break;case"map":r.forEach(function(c){f=f||u(c,e)});break;case"set":s?r.forEach(function(c){f=f||u(c,e)}):f=r.has(e);break;case"array":s?f=r.some(function(c){return u(c,e)}):f=r.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new G(o+"the given combination of arguments ("+n+" and "+Q(e).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+Q(e).toLowerCase(),void 0,a);let c=Object.keys(e),d=null,b=0;if(c.forEach(function(v){let R=new h(r);if(Ee(this,R,!0),w(R,"lockSsfi",!0),!i||c.length===1){R.property(v,e[v]);return}try{R.property(v,e[v])}catch(S){if(!fe.compatibleConstructor(S,G))throw S;d===null&&(d=S),b++}},this),i&&c.length>1&&b===c.length)throw d;return}}this.assert(f,"expected #{this} to "+l+"include "+H(e),"expected #{this} to not "+l+"include "+H(e))}x($o,"include");h.addChainableMethod("include",$o,Do);h.addChainableMethod("contain",$o,Do);h.addChainableMethod("contains",$o,Do);h.addChainableMethod("includes",$o,Do);h.addProperty("ok",function(){this.assert(w(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")});h.addProperty("true",function(){this.assert(w(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!w(this,"negate"))});h.addProperty("numeric",function(){const e=w(this,"object");this.assert(["Number","BigInt"].includes(Q(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!w(this,"negate"))});h.addProperty("callable",function(){const e=w(this,"object"),t=w(this,"ssfi"),r=w(this,"message"),n=r?`${r}: `:"",o=w(this,"negate"),i=o?`${n}expected ${H(e)} not to be a callable function`:`${n}expected ${H(e)} to be a callable function`,a=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(Q(e));if(a&&o||!a&&!o)throw new G(i,void 0,t)});h.addProperty("false",function(){this.assert(w(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!w(this,"negate"))});h.addProperty("null",function(){this.assert(w(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")});h.addProperty("undefined",function(){this.assert(w(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")});h.addProperty("NaN",function(){this.assert(ci(w(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function Ha(){let e=w(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist")}x(Ha,"assertExist");h.addProperty("exist",Ha);h.addProperty("exists",Ha);h.addProperty("empty",function(){let e=w(this,"object"),t=w(this,"ssfi"),r=w(this,"message"),n;switch(r=r?r+": ":"",Q(e).toLowerCase()){case"array":case"string":n=e.length;break;case"map":case"set":n=e.size;break;case"weakmap":case"weakset":throw new G(r+".empty was passed a weak collection",void 0,t);case"function":{const o=r+".empty was passed a function "+qi(e);throw new G(o.trim(),void 0,t)}default:if(e!==Object(e))throw new G(r+".empty was passed non-string primitive "+H(e),void 0,t);n=Object.keys(e).length}this.assert(n===0,"expected #{this} to be empty","expected #{this} not to be empty")});function Wa(){let e=w(this,"object"),t=Q(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}x(Wa,"checkArguments");h.addProperty("arguments",Wa);h.addProperty("Arguments",Wa);function _i(e,t){t&&w(this,"message",t);let r=w(this,"object");if(w(this,"deep")){let n=w(this,"lockSsfi");w(this,"lockSsfi",!0),this.eql(e),w(this,"lockSsfi",n)}else this.assert(e===r,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}x(_i,"assertEqual");h.addMethod("equal",_i);h.addMethod("equals",_i);h.addMethod("eq",_i);function Ga(e,t){t&&w(this,"message",t);let r=w(this,"eql");this.assert(r(e,w(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}x(Ga,"assertEql");h.addMethod("eql",Ga);h.addMethod("eqls",Ga);function Pi(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"doLength"),o=w(this,"message"),i=o?o+": ":"",a=w(this,"ssfi"),s=Q(r).toLowerCase(),l=Q(e).toLowerCase();if(n&&s!=="map"&&s!=="set"&&new h(r,o,a,!0).to.have.property("length"),!n&&s==="date"&&l!=="date")throw new G(i+"the argument to above must be a date",void 0,a);if(!ne(e)&&(n||ne(r)))throw new G(i+"the argument to above must be a number",void 0,a);if(!n&&s!=="date"&&!ne(r)){let u=s==="string"?"'"+r+"'":r;throw new G(i+"expected "+u+" to be a number or a date",void 0,a)}if(n){let u="length",f;s==="map"||s==="set"?(u="size",f=r.size):f=r.length,this.assert(f>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,f)}else this.assert(r>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}x(Pi,"assertAbove");h.addMethod("above",Pi);h.addMethod("gt",Pi);h.addMethod("greaterThan",Pi);function Ti(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"doLength"),o=w(this,"message"),i=o?o+": ":"",a=w(this,"ssfi"),s=Q(r).toLowerCase(),l=Q(e).toLowerCase(),u,f=!0;if(n&&s!=="map"&&s!=="set"&&new h(r,o,a,!0).to.have.property("length"),!n&&s==="date"&&l!=="date")u=i+"the argument to least must be a date";else if(!ne(e)&&(n||ne(r)))u=i+"the argument to least must be a number";else if(!n&&s!=="date"&&!ne(r)){let c=s==="string"?"'"+r+"'":r;u=i+"expected "+c+" to be a number or a date"}else f=!1;if(f)throw new G(u,void 0,a);if(n){let c="length",d;s==="map"||s==="set"?(c="size",d=r.size):d=r.length,this.assert(d>=e,"expected #{this} to have a "+c+" at least #{exp} but got #{act}","expected #{this} to have a "+c+" below #{exp}",e,d)}else this.assert(r>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}x(Ti,"assertLeast");h.addMethod("least",Ti);h.addMethod("gte",Ti);h.addMethod("greaterThanOrEqual",Ti);function Si(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"doLength"),o=w(this,"message"),i=o?o+": ":"",a=w(this,"ssfi"),s=Q(r).toLowerCase(),l=Q(e).toLowerCase(),u,f=!0;if(n&&s!=="map"&&s!=="set"&&new h(r,o,a,!0).to.have.property("length"),!n&&s==="date"&&l!=="date")u=i+"the argument to below must be a date";else if(!ne(e)&&(n||ne(r)))u=i+"the argument to below must be a number";else if(!n&&s!=="date"&&!ne(r)){let c=s==="string"?"'"+r+"'":r;u=i+"expected "+c+" to be a number or a date"}else f=!1;if(f)throw new G(u,void 0,a);if(n){let c="length",d;s==="map"||s==="set"?(c="size",d=r.size):d=r.length,this.assert(d<e,"expected #{this} to have a "+c+" below #{exp} but got #{act}","expected #{this} to not have a "+c+" below #{exp}",e,d)}else this.assert(r<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}x(Si,"assertBelow");h.addMethod("below",Si);h.addMethod("lt",Si);h.addMethod("lessThan",Si);function Ai(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"doLength"),o=w(this,"message"),i=o?o+": ":"",a=w(this,"ssfi"),s=Q(r).toLowerCase(),l=Q(e).toLowerCase(),u,f=!0;if(n&&s!=="map"&&s!=="set"&&new h(r,o,a,!0).to.have.property("length"),!n&&s==="date"&&l!=="date")u=i+"the argument to most must be a date";else if(!ne(e)&&(n||ne(r)))u=i+"the argument to most must be a number";else if(!n&&s!=="date"&&!ne(r)){let c=s==="string"?"'"+r+"'":r;u=i+"expected "+c+" to be a number or a date"}else f=!1;if(f)throw new G(u,void 0,a);if(n){let c="length",d;s==="map"||s==="set"?(c="size",d=r.size):d=r.length,this.assert(d<=e,"expected #{this} to have a "+c+" at most #{exp} but got #{act}","expected #{this} to have a "+c+" above #{exp}",e,d)}else this.assert(r<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}x(Ai,"assertMost");h.addMethod("most",Ai);h.addMethod("lte",Ai);h.addMethod("lessThanOrEqual",Ai);h.addMethod("within",function(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"doLength"),i=w(this,"message"),a=i?i+": ":"",s=w(this,"ssfi"),l=Q(n).toLowerCase(),u=Q(e).toLowerCase(),f=Q(t).toLowerCase(),c,d=!0,b=u==="date"&&f==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&l!=="map"&&l!=="set"&&new h(n,i,s,!0).to.have.property("length"),!o&&l==="date"&&(u!=="date"||f!=="date"))c=a+"the arguments to within must be dates";else if((!ne(e)||!ne(t))&&(o||ne(n)))c=a+"the arguments to within must be numbers";else if(!o&&l!=="date"&&!ne(n)){let v=l==="string"?"'"+n+"'":n;c=a+"expected "+v+" to be a number or a date"}else d=!1;if(d)throw new G(c,void 0,s);if(o){let v="length",R;l==="map"||l==="set"?(v="size",R=n.size):R=n.length,this.assert(R>=e&&R<=t,"expected #{this} to have a "+v+" within "+b,"expected #{this} to not have a "+v+" within "+b)}else this.assert(n>=e&&n<=t,"expected #{this} to be within "+b,"expected #{this} to not be within "+b)});function Ka(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"ssfi"),o=w(this,"message"),i;try{i=r instanceof e}catch(s){throw s instanceof TypeError?(o=o?o+": ":"",new G(o+"The instanceof assertion needs a constructor but "+Q(e)+" was given.",void 0,n)):s}let a=qi(e);a==null&&(a="an unnamed constructor"),this.assert(i,"expected #{this} to be an instance of "+a,"expected #{this} to not be an instance of "+a)}x(Ka,"assertInstanceOf");h.addMethod("instanceof",Ka);h.addMethod("instanceOf",Ka);function Ya(e,t,r){r&&w(this,"message",r);let n=w(this,"nested"),o=w(this,"own"),i=w(this,"message"),a=w(this,"object"),s=w(this,"ssfi"),l=typeof e;if(i=i?i+": ":"",n){if(l!=="string")throw new G(i+"the argument to property must be a string when using nested syntax",void 0,s)}else if(l!=="string"&&l!=="number"&&l!=="symbol")throw new G(i+"the argument to property must be a string, number, or symbol",void 0,s);if(n&&o)throw new G(i+'The "nested" and "own" flags cannot be combined.',void 0,s);if(a==null)throw new G(i+"Target cannot be null or undefined.",void 0,s);let u=w(this,"deep"),f=w(this,"negate"),c=n?Ia(a,e):null,d=n?c.value:a[e],b=u?w(this,"eql"):(S,p)=>S===p,v="";u&&(v+="deep "),o&&(v+="own "),n&&(v+="nested "),v+="property ";let R;o?R=Object.prototype.hasOwnProperty.call(a,e):n?R=c.exists:R=xi(a,e),(!f||arguments.length===1)&&this.assert(R,"expected #{this} to have "+v+H(e),"expected #{this} to not have "+v+H(e)),arguments.length>1&&this.assert(R&&b(t,d),"expected #{this} to have "+v+H(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+v+H(e)+" of #{act}",t,d),w(this,"object",d)}x(Ya,"assertProperty");h.addMethod("property",Ya);function Xa(e,t,r){w(this,"own",!0),Ya.apply(this,arguments)}x(Xa,"assertOwnProperty");h.addMethod("ownProperty",Xa);h.addMethod("haveOwnProperty",Xa);function Ja(e,t,r){typeof t=="string"&&(r=t,t=null),r&&w(this,"message",r);let n=w(this,"object"),o=Object.getOwnPropertyDescriptor(Object(n),e),i=w(this,"eql");o&&t?this.assert(i(t,o),"expected the own property descriptor for "+H(e)+" on #{this} to match "+H(t)+", got "+H(o),"expected the own property descriptor for "+H(e)+" on #{this} to not match "+H(t),t,o,!0):this.assert(o,"expected #{this} to have an own property descriptor for "+H(e),"expected #{this} to not have an own property descriptor for "+H(e)),w(this,"object",o)}x(Ja,"assertOwnPropertyDescriptor");h.addMethod("ownPropertyDescriptor",Ja);h.addMethod("haveOwnPropertyDescriptor",Ja);function Qa(){w(this,"doLength",!0)}x(Qa,"assertLengthChain");function Za(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=Q(r).toLowerCase(),o=w(this,"message"),i=w(this,"ssfi"),a="length",s;switch(n){case"map":case"set":a="size",s=r.size;break;default:new h(r,o,i,!0).to.have.property("length"),s=r.length}this.assert(s==e,"expected #{this} to have a "+a+" of #{exp} but got #{act}","expected #{this} to not have a "+a+" of #{act}",e,s)}x(Za,"assertLength");h.addChainableMethod("length",Za,Qa);h.addChainableMethod("lengthOf",Za,Qa);function es(e,t){t&&w(this,"message",t);let r=w(this,"object");this.assert(e.exec(r),"expected #{this} to match "+e,"expected #{this} not to match "+e)}x(es,"assertMatch");h.addMethod("match",es);h.addMethod("matches",es);h.addMethod("string",function(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"message"),o=w(this,"ssfi");new h(r,n,o,!0).is.a("string"),this.assert(~r.indexOf(e),"expected #{this} to contain "+H(e),"expected #{this} to not contain "+H(e))});function ts(e){let t=w(this,"object"),r=Q(t),n=Q(e),o=w(this,"ssfi"),i=w(this,"deep"),a,s="",l,u=!0,f=w(this,"message");f=f?f+": ":"";let c=f+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(r==="Map"||r==="Set")s=i?"deeply ":"",l=[],t.forEach(function(p,q){l.push(q)}),n!=="Array"&&(e=Array.prototype.slice.call(arguments));else{switch(l=Ua(t),n){case"Array":if(arguments.length>1)throw new G(c,void 0,o);break;case"Object":if(arguments.length>1)throw new G(c,void 0,o);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(p){return typeof p=="symbol"?p:String(p)})}if(!e.length)throw new G(f+"keys required",void 0,o);let d=e.length,b=w(this,"any"),v=w(this,"all"),R=e,S=i?w(this,"eql"):(p,q)=>p===q;if(!b&&!v&&(v=!0),b&&(u=R.some(function(p){return l.some(function(q){return S(p,q)})})),v&&(u=R.every(function(p){return l.some(function(q){return S(p,q)})}),w(this,"contains")||(u=u&&e.length==l.length)),d>1){e=e.map(function(q){return H(q)});let p=e.pop();v&&(a=e.join(", ")+", and "+p),b&&(a=e.join(", ")+", or "+p)}else a=H(e[0]);a=(d>1?"keys ":"key ")+a,a=(w(this,"contains")?"contain ":"have ")+a,this.assert(u,"expected #{this} to "+s+a,"expected #{this} to not "+s+a,R.slice(0).sort(ui),l.sort(ui),!0)}x(ts,"assertKeys");h.addMethod("keys",ts);h.addMethod("key",ts);function Mi(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"ssfi"),i=w(this,"message"),a=w(this,"negate")||!1;new h(n,i,o,!0).is.a("function"),(di(e)||typeof e=="string")&&(t=e,e=null);let s,l=!1;try{n()}catch(b){l=!0,s=b}let u=e===void 0&&t===void 0,f=!!(e&&t),c=!1,d=!1;if(u||!u&&!a){let b="an error";e instanceof Error?b="#{exp}":e&&(b=fe.getConstructorName(e));let v=s;if(s instanceof Error)v=s.toString();else if(typeof s=="string")v=s;else if(s&&(typeof s=="object"||typeof s=="function"))try{v=fe.getConstructorName(s)}catch{}this.assert(l,"expected #{this} to throw "+b,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),v)}if(e&&s&&(e instanceof Error&&fe.compatibleInstance(s,e)===a&&(f&&a?c=!0:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s&&!a?" but #{act} was thrown":""),e.toString(),s.toString())),fe.compatibleConstructor(s,e)===a&&(f&&a?c=!0:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&fe.getConstructorName(e),s instanceof Error?s.toString():s&&fe.getConstructorName(s)))),s&&t!==void 0&&t!==null){let b="including";di(t)&&(b="matching"),fe.compatibleMessage(s,t)===a&&(f&&a?d=!0:this.assert(a,"expected #{this} to throw error "+b+" #{exp} but got #{act}","expected #{this} to throw error not "+b+" #{exp}",t,fe.getMessage(s)))}c&&d&&this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&fe.getConstructorName(e),s instanceof Error?s.toString():s&&fe.getConstructorName(s)),w(this,"object",s)}x(Mi,"assertThrows");h.addMethod("throw",Mi);h.addMethod("throws",Mi);h.addMethod("Throw",Mi);function rs(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"itself"),o=typeof r=="function"&&!n?r.prototype[e]:r[e];this.assert(typeof o=="function","expected #{this} to respond to "+H(e),"expected #{this} to not respond to "+H(e))}x(rs,"respondTo");h.addMethod("respondTo",rs);h.addMethod("respondsTo",rs);h.addProperty("itself",function(){w(this,"itself",!0)});function ns(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=e(r);this.assert(n,"expected #{this} to satisfy "+st(e),"expected #{this} to not satisfy"+st(e),!w(this,"negate"),n)}x(ns,"satisfy");h.addMethod("satisfy",ns);h.addMethod("satisfies",ns);function os(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"message"),i=w(this,"ssfi");new h(n,o,i,!0).is.numeric;let a="A `delta` value is required for `closeTo`";if(t==null)throw new G(o?`${o}: ${a}`:a,void 0,i);if(new h(t,o,i,!0).is.numeric,a="A `expected` value is required for `closeTo`",e==null)throw new G(o?`${o}: ${a}`:a,void 0,i);new h(e,o,i,!0).is.numeric;const s=x(u=>u<0n?-u:u,"abs"),l=x(u=>parseFloat(parseFloat(u).toPrecision(12)),"strip");this.assert(l(s(n-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t)}x(os,"closeTo");h.addMethod("closeTo",os);h.addMethod("approximately",os);function cf(e,t,r,n,o){let i=Array.from(t),a=Array.from(e);if(!n){if(a.length!==i.length)return!1;i=i.slice()}return a.every(function(s,l){if(o)return r?r(s,i[l]):s===i[l];if(!r){let u=i.indexOf(s);return u===-1?!1:(n||i.splice(u,1),!0)}return i.some(function(u,f){return r(s,u)?(n||i.splice(f,1),!0):!1})})}x(cf,"isSubsetOf");h.addMethod("members",function(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"message"),o=w(this,"ssfi");new h(r,n,o,!0).to.be.iterable,new h(e,n,o,!0).to.be.iterable;let i=w(this,"contains"),a=w(this,"ordered"),s,l,u;i?(s=a?"an ordered superset":"a superset",l="expected #{this} to be "+s+" of #{exp}",u="expected #{this} to not be "+s+" of #{exp}"):(s=a?"ordered members":"members",l="expected #{this} to have the same "+s+" as #{exp}",u="expected #{this} to not have the same "+s+" as #{exp}");let f=w(this,"deep")?w(this,"eql"):void 0;this.assert(cf(e,r,f,i,a),l,u,e,r,!0)});h.addProperty("iterable",function(e){e&&w(this,"message",e);let t=w(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t)});function df(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"message"),o=w(this,"ssfi"),i=w(this,"contains"),a=w(this,"deep"),s=w(this,"eql");new h(e,n,o,!0).to.be.an("array"),i?this.assert(e.some(function(l){return r.indexOf(l)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,r):a?this.assert(e.some(function(l){return s(r,l)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,r):this.assert(e.indexOf(r)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,r)}x(df,"oneOf");h.addMethod("oneOf",df);function is(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"message"),i=w(this,"ssfi");new h(n,o,i,!0).is.a("function");let a;t?(new h(e,o,i,!0).to.have.property(t),a=e[t]):(new h(e,o,i,!0).is.a("function"),a=e()),n();let s=t==null?e():e[t],l=t==null?a:"."+t;w(this,"deltaMsgObj",l),w(this,"initialDeltaValue",a),w(this,"finalDeltaValue",s),w(this,"deltaBehavior","change"),w(this,"realDelta",s!==a),this.assert(a!==s,"expected "+l+" to change","expected "+l+" to not change")}x(is,"assertChanges");h.addMethod("change",is);h.addMethod("changes",is);function as(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"message"),i=w(this,"ssfi");new h(n,o,i,!0).is.a("function");let a;t?(new h(e,o,i,!0).to.have.property(t),a=e[t]):(new h(e,o,i,!0).is.a("function"),a=e()),new h(a,o,i,!0).is.a("number"),n();let s=t==null?e():e[t],l=t==null?a:"."+t;w(this,"deltaMsgObj",l),w(this,"initialDeltaValue",a),w(this,"finalDeltaValue",s),w(this,"deltaBehavior","increase"),w(this,"realDelta",s-a),this.assert(s-a>0,"expected "+l+" to increase","expected "+l+" to not increase")}x(as,"assertIncreases");h.addMethod("increase",as);h.addMethod("increases",as);function ss(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"message"),i=w(this,"ssfi");new h(n,o,i,!0).is.a("function");let a;t?(new h(e,o,i,!0).to.have.property(t),a=e[t]):(new h(e,o,i,!0).is.a("function"),a=e()),new h(a,o,i,!0).is.a("number"),n();let s=t==null?e():e[t],l=t==null?a:"."+t;w(this,"deltaMsgObj",l),w(this,"initialDeltaValue",a),w(this,"finalDeltaValue",s),w(this,"deltaBehavior","decrease"),w(this,"realDelta",a-s),this.assert(s-a<0,"expected "+l+" to decrease","expected "+l+" to not decrease")}x(ss,"assertDecreases");h.addMethod("decrease",ss);h.addMethod("decreases",ss);function ff(e,t){t&&w(this,"message",t);let r=w(this,"deltaMsgObj"),n=w(this,"initialDeltaValue"),o=w(this,"finalDeltaValue"),i=w(this,"deltaBehavior"),a=w(this,"realDelta"),s;i==="change"?s=Math.abs(o-n)===Math.abs(e):s=a===Math.abs(e),this.assert(s,"expected "+r+" to "+i+" by "+e,"expected "+r+" to not "+i+" by "+e)}x(ff,"assertDelta");h.addMethod("by",ff);h.addProperty("extensible",function(){let e=w(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")});h.addProperty("sealed",function(){let e=w(this,"object"),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")});h.addProperty("frozen",function(){let e=w(this,"object"),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")});h.addProperty("finite",function(e){let t=w(this,"object");this.assert(typeof t=="number"&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number")});function fi(e,t){return e===t?!0:typeof t!=typeof e?!1:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(r){return t.some(function(n){return fi(r,n)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(r){let n=e[r],o=t[r];return typeof n=="object"&&n!==null&&o!==null?fi(n,o):typeof n=="function"?n(o):o===n}):!1}x(fi,"compareSubset");h.addMethod("containSubset",function(e){const t=U(this,"object"),r=ie.showDiff;this.assert(fi(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,r)});function Po(e,t){return new h(e,t)}x(Po,"expect");Po.fail=function(e,t,r,n){throw arguments.length<2&&(r=e,e=void 0),r=r||"expect.fail()",new G(r,{actual:e,expected:t,operator:n},Po.fail)};var pf={};_a(pf,{Should:()=>Hm,should:()=>Vm});function ls(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new h(this.valueOf(),null,e):new h(this,null,e)}x(e,"shouldGetter");function t(n){Object.defineProperty(this,"should",{value:n,enumerable:!0,configurable:!0,writable:!0})}x(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});let r={};return r.fail=function(n,o,i,a){throw arguments.length<2&&(i=n,n=void 0),i=i||"should.fail()",new G(i,{actual:n,expected:o,operator:a},r.fail)},r.equal=function(n,o,i){new h(n,i).to.equal(o)},r.Throw=function(n,o,i,a){new h(n,a).to.Throw(o,i)},r.exist=function(n,o){new h(n,o).to.exist},r.not={},r.not.equal=function(n,o,i){new h(n,i).to.not.equal(o)},r.not.Throw=function(n,o,i,a){new h(n,a).to.not.Throw(o,i)},r.not.exist=function(n,o){new h(n,o).to.not.exist},r.throw=r.Throw,r.not.throw=r.not.Throw,r}x(ls,"loadShould");var Vm=ls,Hm=ls;function m(e,t){new h(null,null,m,!0).assert(e,t,"[ negation message unavailable ]")}x(m,"assert");m.fail=function(e,t,r,n){throw arguments.length<2&&(r=e,e=void 0),r=r||"assert.fail()",new G(r,{actual:e,expected:t,operator:n},m.fail)};m.isOk=function(e,t){new h(e,t,m.isOk,!0).is.ok};m.isNotOk=function(e,t){new h(e,t,m.isNotOk,!0).is.not.ok};m.equal=function(e,t,r){let n=new h(e,r,m.equal,!0);n.assert(t==U(n,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)};m.notEqual=function(e,t,r){let n=new h(e,r,m.notEqual,!0);n.assert(t!=U(n,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)};m.strictEqual=function(e,t,r){new h(e,r,m.strictEqual,!0).to.equal(t)};m.notStrictEqual=function(e,t,r){new h(e,r,m.notStrictEqual,!0).to.not.equal(t)};m.deepEqual=m.deepStrictEqual=function(e,t,r){new h(e,r,m.deepEqual,!0).to.eql(t)};m.notDeepEqual=function(e,t,r){new h(e,r,m.notDeepEqual,!0).to.not.eql(t)};m.isAbove=function(e,t,r){new h(e,r,m.isAbove,!0).to.be.above(t)};m.isAtLeast=function(e,t,r){new h(e,r,m.isAtLeast,!0).to.be.least(t)};m.isBelow=function(e,t,r){new h(e,r,m.isBelow,!0).to.be.below(t)};m.isAtMost=function(e,t,r){new h(e,r,m.isAtMost,!0).to.be.most(t)};m.isTrue=function(e,t){new h(e,t,m.isTrue,!0).is.true};m.isNotTrue=function(e,t){new h(e,t,m.isNotTrue,!0).to.not.equal(!0)};m.isFalse=function(e,t){new h(e,t,m.isFalse,!0).is.false};m.isNotFalse=function(e,t){new h(e,t,m.isNotFalse,!0).to.not.equal(!1)};m.isNull=function(e,t){new h(e,t,m.isNull,!0).to.equal(null)};m.isNotNull=function(e,t){new h(e,t,m.isNotNull,!0).to.not.equal(null)};m.isNaN=function(e,t){new h(e,t,m.isNaN,!0).to.be.NaN};m.isNotNaN=function(e,t){new h(e,t,m.isNotNaN,!0).not.to.be.NaN};m.exists=function(e,t){new h(e,t,m.exists,!0).to.exist};m.notExists=function(e,t){new h(e,t,m.notExists,!0).to.not.exist};m.isUndefined=function(e,t){new h(e,t,m.isUndefined,!0).to.equal(void 0)};m.isDefined=function(e,t){new h(e,t,m.isDefined,!0).to.not.equal(void 0)};m.isCallable=function(e,t){new h(e,t,m.isCallable,!0).is.callable};m.isNotCallable=function(e,t){new h(e,t,m.isNotCallable,!0).is.not.callable};m.isObject=function(e,t){new h(e,t,m.isObject,!0).to.be.a("object")};m.isNotObject=function(e,t){new h(e,t,m.isNotObject,!0).to.not.be.a("object")};m.isArray=function(e,t){new h(e,t,m.isArray,!0).to.be.an("array")};m.isNotArray=function(e,t){new h(e,t,m.isNotArray,!0).to.not.be.an("array")};m.isString=function(e,t){new h(e,t,m.isString,!0).to.be.a("string")};m.isNotString=function(e,t){new h(e,t,m.isNotString,!0).to.not.be.a("string")};m.isNumber=function(e,t){new h(e,t,m.isNumber,!0).to.be.a("number")};m.isNotNumber=function(e,t){new h(e,t,m.isNotNumber,!0).to.not.be.a("number")};m.isNumeric=function(e,t){new h(e,t,m.isNumeric,!0).is.numeric};m.isNotNumeric=function(e,t){new h(e,t,m.isNotNumeric,!0).is.not.numeric};m.isFinite=function(e,t){new h(e,t,m.isFinite,!0).to.be.finite};m.isBoolean=function(e,t){new h(e,t,m.isBoolean,!0).to.be.a("boolean")};m.isNotBoolean=function(e,t){new h(e,t,m.isNotBoolean,!0).to.not.be.a("boolean")};m.typeOf=function(e,t,r){new h(e,r,m.typeOf,!0).to.be.a(t)};m.notTypeOf=function(e,t,r){new h(e,r,m.notTypeOf,!0).to.not.be.a(t)};m.instanceOf=function(e,t,r){new h(e,r,m.instanceOf,!0).to.be.instanceOf(t)};m.notInstanceOf=function(e,t,r){new h(e,r,m.notInstanceOf,!0).to.not.be.instanceOf(t)};m.include=function(e,t,r){new h(e,r,m.include,!0).include(t)};m.notInclude=function(e,t,r){new h(e,r,m.notInclude,!0).not.include(t)};m.deepInclude=function(e,t,r){new h(e,r,m.deepInclude,!0).deep.include(t)};m.notDeepInclude=function(e,t,r){new h(e,r,m.notDeepInclude,!0).not.deep.include(t)};m.nestedInclude=function(e,t,r){new h(e,r,m.nestedInclude,!0).nested.include(t)};m.notNestedInclude=function(e,t,r){new h(e,r,m.notNestedInclude,!0).not.nested.include(t)};m.deepNestedInclude=function(e,t,r){new h(e,r,m.deepNestedInclude,!0).deep.nested.include(t)};m.notDeepNestedInclude=function(e,t,r){new h(e,r,m.notDeepNestedInclude,!0).not.deep.nested.include(t)};m.ownInclude=function(e,t,r){new h(e,r,m.ownInclude,!0).own.include(t)};m.notOwnInclude=function(e,t,r){new h(e,r,m.notOwnInclude,!0).not.own.include(t)};m.deepOwnInclude=function(e,t,r){new h(e,r,m.deepOwnInclude,!0).deep.own.include(t)};m.notDeepOwnInclude=function(e,t,r){new h(e,r,m.notDeepOwnInclude,!0).not.deep.own.include(t)};m.match=function(e,t,r){new h(e,r,m.match,!0).to.match(t)};m.notMatch=function(e,t,r){new h(e,r,m.notMatch,!0).to.not.match(t)};m.property=function(e,t,r){new h(e,r,m.property,!0).to.have.property(t)};m.notProperty=function(e,t,r){new h(e,r,m.notProperty,!0).to.not.have.property(t)};m.propertyVal=function(e,t,r,n){new h(e,n,m.propertyVal,!0).to.have.property(t,r)};m.notPropertyVal=function(e,t,r,n){new h(e,n,m.notPropertyVal,!0).to.not.have.property(t,r)};m.deepPropertyVal=function(e,t,r,n){new h(e,n,m.deepPropertyVal,!0).to.have.deep.property(t,r)};m.notDeepPropertyVal=function(e,t,r,n){new h(e,n,m.notDeepPropertyVal,!0).to.not.have.deep.property(t,r)};m.ownProperty=function(e,t,r){new h(e,r,m.ownProperty,!0).to.have.own.property(t)};m.notOwnProperty=function(e,t,r){new h(e,r,m.notOwnProperty,!0).to.not.have.own.property(t)};m.ownPropertyVal=function(e,t,r,n){new h(e,n,m.ownPropertyVal,!0).to.have.own.property(t,r)};m.notOwnPropertyVal=function(e,t,r,n){new h(e,n,m.notOwnPropertyVal,!0).to.not.have.own.property(t,r)};m.deepOwnPropertyVal=function(e,t,r,n){new h(e,n,m.deepOwnPropertyVal,!0).to.have.deep.own.property(t,r)};m.notDeepOwnPropertyVal=function(e,t,r,n){new h(e,n,m.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,r)};m.nestedProperty=function(e,t,r){new h(e,r,m.nestedProperty,!0).to.have.nested.property(t)};m.notNestedProperty=function(e,t,r){new h(e,r,m.notNestedProperty,!0).to.not.have.nested.property(t)};m.nestedPropertyVal=function(e,t,r,n){new h(e,n,m.nestedPropertyVal,!0).to.have.nested.property(t,r)};m.notNestedPropertyVal=function(e,t,r,n){new h(e,n,m.notNestedPropertyVal,!0).to.not.have.nested.property(t,r)};m.deepNestedPropertyVal=function(e,t,r,n){new h(e,n,m.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,r)};m.notDeepNestedPropertyVal=function(e,t,r,n){new h(e,n,m.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,r)};m.lengthOf=function(e,t,r){new h(e,r,m.lengthOf,!0).to.have.lengthOf(t)};m.hasAnyKeys=function(e,t,r){new h(e,r,m.hasAnyKeys,!0).to.have.any.keys(t)};m.hasAllKeys=function(e,t,r){new h(e,r,m.hasAllKeys,!0).to.have.all.keys(t)};m.containsAllKeys=function(e,t,r){new h(e,r,m.containsAllKeys,!0).to.contain.all.keys(t)};m.doesNotHaveAnyKeys=function(e,t,r){new h(e,r,m.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)};m.doesNotHaveAllKeys=function(e,t,r){new h(e,r,m.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)};m.hasAnyDeepKeys=function(e,t,r){new h(e,r,m.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)};m.hasAllDeepKeys=function(e,t,r){new h(e,r,m.hasAllDeepKeys,!0).to.have.all.deep.keys(t)};m.containsAllDeepKeys=function(e,t,r){new h(e,r,m.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)};m.doesNotHaveAnyDeepKeys=function(e,t,r){new h(e,r,m.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)};m.doesNotHaveAllDeepKeys=function(e,t,r){new h(e,r,m.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)};m.throws=function(e,t,r,n){(typeof t=="string"||t instanceof RegExp)&&(r=t,t=null);let o=new h(e,n,m.throws,!0).to.throw(t,r);return U(o,"object")};m.doesNotThrow=function(e,t,r,n){(typeof t=="string"||t instanceof RegExp)&&(r=t,t=null),new h(e,n,m.doesNotThrow,!0).to.not.throw(t,r)};m.operator=function(e,t,r,n){let o;switch(t){case"==":o=e==r;break;case"===":o=e===r;break;case">":o=e>r;break;case">=":o=e>=r;break;case"<":o=e<r;break;case"<=":o=e<=r;break;case"!=":o=e!=r;break;case"!==":o=e!==r;break;default:throw n=n&&n+": ",new G(n+'Invalid operator "'+t+'"',void 0,m.operator)}let i=new h(o,n,m.operator,!0);i.assert(U(i,"object")===!0,"expected "+H(e)+" to be "+t+" "+H(r),"expected "+H(e)+" to not be "+t+" "+H(r))};m.closeTo=function(e,t,r,n){new h(e,n,m.closeTo,!0).to.be.closeTo(t,r)};m.approximately=function(e,t,r,n){new h(e,n,m.approximately,!0).to.be.approximately(t,r)};m.sameMembers=function(e,t,r){new h(e,r,m.sameMembers,!0).to.have.same.members(t)};m.notSameMembers=function(e,t,r){new h(e,r,m.notSameMembers,!0).to.not.have.same.members(t)};m.sameDeepMembers=function(e,t,r){new h(e,r,m.sameDeepMembers,!0).to.have.same.deep.members(t)};m.notSameDeepMembers=function(e,t,r){new h(e,r,m.notSameDeepMembers,!0).to.not.have.same.deep.members(t)};m.sameOrderedMembers=function(e,t,r){new h(e,r,m.sameOrderedMembers,!0).to.have.same.ordered.members(t)};m.notSameOrderedMembers=function(e,t,r){new h(e,r,m.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)};m.sameDeepOrderedMembers=function(e,t,r){new h(e,r,m.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)};m.notSameDeepOrderedMembers=function(e,t,r){new h(e,r,m.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)};m.includeMembers=function(e,t,r){new h(e,r,m.includeMembers,!0).to.include.members(t)};m.notIncludeMembers=function(e,t,r){new h(e,r,m.notIncludeMembers,!0).to.not.include.members(t)};m.includeDeepMembers=function(e,t,r){new h(e,r,m.includeDeepMembers,!0).to.include.deep.members(t)};m.notIncludeDeepMembers=function(e,t,r){new h(e,r,m.notIncludeDeepMembers,!0).to.not.include.deep.members(t)};m.includeOrderedMembers=function(e,t,r){new h(e,r,m.includeOrderedMembers,!0).to.include.ordered.members(t)};m.notIncludeOrderedMembers=function(e,t,r){new h(e,r,m.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)};m.includeDeepOrderedMembers=function(e,t,r){new h(e,r,m.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)};m.notIncludeDeepOrderedMembers=function(e,t,r){new h(e,r,m.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)};m.oneOf=function(e,t,r){new h(e,r,m.oneOf,!0).to.be.oneOf(t)};m.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${H(e)} to be an iterable`:`expected ${H(e)} to be an iterable`,new G(t,void 0,m.isIterable)};m.changes=function(e,t,r,n){arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.changes,!0).to.change(t,r)};m.changesBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.changesBy,!0).to.change(t,r).by(n)};m.doesNotChange=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.doesNotChange,!0).to.not.change(t,r)};m.changesButNotBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.changesButNotBy,!0).to.change(t,r).but.not.by(n)};m.increases=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.increases,!0).to.increase(t,r)};m.increasesBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.increasesBy,!0).to.increase(t,r).by(n)};m.doesNotIncrease=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.doesNotIncrease,!0).to.not.increase(t,r)};m.increasesButNotBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.increasesButNotBy,!0).to.increase(t,r).but.not.by(n)};m.decreases=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.decreases,!0).to.decrease(t,r)};m.decreasesBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.decreasesBy,!0).to.decrease(t,r).by(n)};m.doesNotDecrease=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.doesNotDecrease,!0).to.not.decrease(t,r)};m.doesNotDecreaseBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);return new h(e,o,m.doesNotDecreaseBy,!0).to.not.decrease(t,r).by(n)};m.decreasesButNotBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.decreasesButNotBy,!0).to.decrease(t,r).but.not.by(n)};m.ifError=function(e){if(e)throw e};m.isExtensible=function(e,t){new h(e,t,m.isExtensible,!0).to.be.extensible};m.isNotExtensible=function(e,t){new h(e,t,m.isNotExtensible,!0).to.not.be.extensible};m.isSealed=function(e,t){new h(e,t,m.isSealed,!0).to.be.sealed};m.isNotSealed=function(e,t){new h(e,t,m.isNotSealed,!0).to.not.be.sealed};m.isFrozen=function(e,t){new h(e,t,m.isFrozen,!0).to.be.frozen};m.isNotFrozen=function(e,t){new h(e,t,m.isNotFrozen,!0).to.not.be.frozen};m.isEmpty=function(e,t){new h(e,t,m.isEmpty,!0).to.be.empty};m.isNotEmpty=function(e,t){new h(e,t,m.isNotEmpty,!0).to.not.be.empty};m.containsSubset=function(e,t,r){new h(e,r).to.containSubset(t)};m.doesNotContainSubset=function(e,t,r){new h(e,r).to.not.containSubset(t)};var Wm=[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]];for(const[e,t]of Wm)m[t]=m[e];var Ns=[];function mf(e){const t={use:mf,AssertionError:G,util:ai,config:ie,expect:Po,assert:m,Assertion:h,...pf};return~Ns.indexOf(e)||(e(t,ai),Ns.push(e)),t}x(mf,"use");function Gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Km=e=>{const t=new Map,r=[];for(const n of e)t.set(n.id,{...n,childrenNodes:[]});for(const n of t.values())n.parent?t.get(n.parent)?.childrenNodes?.push(n):r.push(n);return r},Ym={animation:"spin 1s linear infinite"},Xm=()=>B.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#364153",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle-icon lucide-loader-circle",style:Ym,"data-testid":"loader-icon",children:B.jsxRuntimeExports.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),zo=document.createElement("style");zo&&!document.getElementById("loader-spin-keyframes")&&(zo.id="loader-spin-keyframes",zo.innerHTML=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xo=require("./runner.cjs.js"),B=require("./jsx-runtime-CjngqUuo.js"),oi=require("react"),um=(e,t,r=2e3,n=50)=>new Promise((o,i)=>{const a=Date.now(),s=()=>{const l=t();if(l)return o(l);if(Date.now()-a>r)return i(new Error(`Timeout waiting for element ${e}`));setTimeout(s,n)};s()}),cm=(e,t,r=2e3,n=50)=>new Promise((o,i)=>{const a=Date.now(),s=()=>{const l=t();if(l&&l.length>0)return o(Array.from(l));if(Date.now()-a>r)return i(new Error(`Timeout waiting for elements ${e}`));setTimeout(s,n)};s()}),ii=e=>new Promise(t=>setTimeout(t,e)),Xi=(e,t,r,n)=>{if(!e&&!t)throw new Error(n);if(e&&t)throw new Error(n.replace("to be","to not be").replace("to have","to not have").replace("to contain","to not contain"));return r};function dm(e){if(!e.isConnected)return!1;let t=e;for(;t;){const r=getComputedStyle(t);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1;t=t.parentElement}return!0}const fm={"have.text":{positive:{pass:e=>`Assertion passed: Text is exactly "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected text to be "${e[0]}", but got "${t}"`},negative:{pass:e=>`Assertion passed: Text is not exactly "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected text to not be "${e[0]}", but got "${t}"`}},"contain.text":{positive:{pass:e=>`Assertion passed: Text contains "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected text to contain "${e[0]}", but got "${t}"`},negative:{pass:e=>`Assertion passed: Text does not contain "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected text to not contain "${e[0]}", but got "${t}"`}},"be.empty":{positive:{pass:()=>"Assertion passed: Text is empty",fail:(e,t)=>`Assertion failed: Expected text to be empty, but got "${t}"`},negative:{pass:()=>"Assertion passed: Text is not empty",fail:(e,t)=>`Assertion failed: Expected text to not be empty, but got "${t}"`}},"have.attr":{positive:{pass:e=>`Assertion passed: Attribute "${e[0]}" is "${e[1]}"`,fail:(e,t)=>`Assertion failed: Expected attribute "${e[0]}" to be "${e[1]}", but got "${t}"`},negative:{pass:e=>`Assertion passed: Attribute "${e[0]}" is not "${e[1]}"`,fail:(e,t)=>`Assertion failed: Expected attribute "${e[0]}" to not be "${e[1]}", but got "${t}"`}},"have.value":{positive:{pass:e=>`Assertion passed: Value is "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected value to be "${e[0]}", but got "${t}"`},negative:{pass:e=>`Assertion passed: Value is not "${e[0]}"`,fail:(e,t)=>`Assertion failed: Expected value to not be "${e[0]}", but got "${t}"`}},"be.disabled":{positive:{pass:()=>"Assertion passed: Element is disabled",fail:()=>"Assertion failed: Expected element to be disabled"},negative:{pass:()=>"Assertion passed: Element is not disabled",fail:()=>"Assertion failed: Expected element to not be disabled"}},"be.enabled":{positive:{pass:()=>"Assertion passed: Element is enabled",fail:()=>"Assertion failed: Expected element to be enabled"},negative:{pass:()=>"Assertion passed: Element is not enabled",fail:()=>"Assertion failed: Expected element to not be enabled"}},"be.checked":{positive:{pass:()=>"Assertion passed: Element is checked",fail:()=>"Assertion failed: Expected element to be checked"},negative:{pass:()=>"Assertion passed: Element is not checked",fail:()=>"Assertion failed: Expected element to not be checked"}},"be.selected":{positive:{pass:()=>"Assertion passed: Element is selected",fail:()=>"Assertion failed: Expected element to be selected"},negative:{pass:()=>"Assertion passed: Element is not selected",fail:()=>"Assertion failed: Expected element to not be selected"}},"be.focused":{positive:{pass:()=>"Assertion passed: Element is focused",fail:()=>"Assertion failed: Expected element to be focused"},negative:{pass:()=>"Assertion passed: Element is not focused",fail:()=>"Assertion failed: Expected element to not be focused"}},"be.visible":{positive:{pass:()=>"Assertion passed: Element is visible",fail:()=>"Assertion failed: Expected element to be visible"},negative:{pass:()=>"Assertion passed: Element is not visible",fail:()=>"Assertion failed: Expected element to not be visible"}},"have.class":{positive:{pass:e=>`Assertion passed: Element has class "${e[0]}"`,fail:e=>`Assertion failed: Expected element to have class "${e[0]}"`},negative:{pass:e=>`Assertion passed: Element does not have class "${e[0]}"`,fail:e=>`Assertion failed: Expected element to not have class "${e[0]}"`}}},Di=(e,t,...r)=>{const n=t.startsWith("not."),o=n?t.slice(4):t,i=(e.textContent||"").trim(),a=fm[o];if(!a)throw new Error(`Unknown assertion: ${o}`);const s=n?"negative":"positive";let l,u;switch(o){case"have.text":l=i===r[0],u=i;break;case"contain.text":l=i.includes(r[0]),u=i;break;case"be.empty":l=i.length===0,u=i;break;case"have.attr":u=e.getAttribute(r[0]),l=u===r[1];break;case"have.value":u=e.value,l=u===r[0];break;case"be.disabled":l=e.disabled===!0;break;case"be.enabled":l=e.disabled===!1;break;case"be.checked":l=e.checked===!0;break;case"be.selected":l=e.selected===!0;break;case"be.focused":l=document.activeElement===e;break;case"be.visible":l=dm(e);break;case"have.class":l=e.classList.contains(r[0]);break;default:throw new Error(`Unknown assertion: ${o}`)}return Xi(l,n,a[s].pass(r),a[s].fail(r,u))},Re=e=>{const t=xo.handlers.size?Array.from(xo.handlers.values()).find(r=>r.status==="running"):null;t&&t.logs?.push(e)},Ca="1.3.4",pm=()=>typeof window<"u"?(window.__TWD_MOCK_STATE__||(window.__TWD_MOCK_STATE__={rules:[]}),window.__TWD_MOCK_STATE__):{rules:[]},mm=pm(),Xe=mm.rules,hm=100,bm=async e=>{if("serviceWorker"in navigator){const t=e??"/mock-sw.js";await navigator.serviceWorker.register(`${t}?v=${Ca}`),navigator.serviceWorker.controller||await new Promise(r=>{navigator.serviceWorker.addEventListener("controllerchange",r,{once:!0})}),navigator.serviceWorker.addEventListener("message",r=>{if(r.data?.type==="EXECUTED"){const{alias:n,request:o}=r.data,i=Xe.find(a=>a.alias===n);i&&(i.executed=!0,i.request=o)}})}},vm=async(e,t)=>{const r={alias:e,...t,executed:!1},n=Xe.findIndex(o=>o.alias===e);n!==-1?Xe[n]=r:Xe.push(r),navigator.serviceWorker.controller?.postMessage({type:"ADD_RULE",rule:r,version:Ca}),await ii(hm),await Promise.resolve()},ym=async e=>await Promise.all(e.map(r=>vd(r))),vd=async(e,t=10,r=100)=>{if(!Xe.find(o=>o.alias===e))throw new Error(`Rule ${e} not found`);for(let o=0;o<t;o++){const i=Xe.find(a=>a.alias===e&&a.executed);if(i)return Promise.resolve(i);o<t-1&&await new Promise(a=>setTimeout(a,r))}throw console.log(`Rule ${e} was not executed within ${t*r}ms`),new Error(`Rule ${e} was not executed within ${t*r}ms`)},yd=()=>Xe,gm=()=>{navigator.serviceWorker.controller?.postMessage({type:"CLEAR_RULES",version:Ca}),Xe.length=0},Rm=(e,t)=>{const r=e.startsWith("not.");switch(r?e.slice(4):e){case"eq":return Xi(window.location.href===t,r,`Assertion passed: URL is ${t}`,`Assertion failed: Expected URL to be ${t}, but got ${window.location.href}`);case"contain.url":return Xi(window.location.href.includes(t),r,`Assertion passed: URL contains ${t}`,`Assertion failed: Expected URL to contain ${t}, but got ${window.location.href}`);default:throw new Error(`Unknown assertion: ${e}`)}},wm=()=>({location:window.location,should:async(e,t,r=5)=>{let n="",o;for(let i=0;i<r;i++)try{n=Rm(e,t),Re(n);break}catch(a){await new Promise(s=>setTimeout(s,100)),o=a}if(o)throw o;return n}}),Em=100,xm=async(e,t)=>{if(Re(`visit("${e}")`),window.location.pathname===e||t){const r=`/__dummy_${Math.random().toString(36).slice(2)}`;window.history.pushState({},"",r),window.dispatchEvent(new PopStateEvent("popstate")),await ii(10)}window.history.pushState({},"",e),window.dispatchEvent(new PopStateEvent("popstate")),await ii(Em)},Cm={get:async e=>{const t=`body > div:not(#twd-sidebar-root) ${e}`;Re(`Searching get("${e}")`);const r=await um(e,()=>document.querySelector(t)),n={el:r,should:(o,...i)=>{const a=Di(r,o,...i);return Re(a),n}};return n},setInputValue:(e,t)=>{const{set:r}=Object.getOwnPropertyDescriptor(e.__proto__,"value");r.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0}))},getAll:async e=>{const t=`body > div:not(#twd-sidebar-root) ${e}`;return Re(`Searching getAll("${e}")`),(await cm(e,()=>document.querySelectorAll(t))).map(n=>{const o={el:n,should:(i,...a)=>{const s=Di(n,i,...a);return Re(s),o}};return o})},visit:xm,url:wm,mockRequest:vm,waitForRequest:vd,waitForRequests:ym,initRequestMocking:bm,clearRequestMockRules:gm,getRequestMockRules:yd,should:(e,t,...r)=>{const n=Di(e,t,...r);Re(n)},wait:ii,mockComponent:B.mockComponent,clearComponentMocks:B.clearComponentMocks,notExists:async e=>{const t=`body > div:not(#twd-sidebar-root) ${e}`;if(Re(`Checking notExists("${e}")`),document.querySelector(t))throw new Error(`Element "${e}" exists in the DOM.`);Re(`Assertion passed: Element "${e}" does not exist in the DOM.`)}};var qa=Object.defineProperty,qm=(e,t,r)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>qa(e,"name",{value:t,configurable:!0}),_a=(e,t)=>{for(var r in t)qa(e,r,{get:t[r],enumerable:!0})},gd=(e,t,r)=>qm(e,typeof t!="symbol"?t+"":t,r),ai={};_a(ai,{addChainableMethod:()=>Ba,addLengthGuard:()=>jo,addMethod:()=>ja,addProperty:()=>ka,checkError:()=>fe,compareByInspect:()=>ui,eql:()=>Kd,events:()=>Ci,expectTypes:()=>Td,flag:()=>U,getActual:()=>Ei,getMessage:()=>Sa,getName:()=>qi,getOperator:()=>za,getOwnEnumerableProperties:()=>Ua,getOwnEnumerablePropertySymbols:()=>Fa,getPathInfo:()=>Ia,hasProperty:()=>xi,inspect:()=>H,isNaN:()=>ci,isNumeric:()=>ne,isProxyEnabled:()=>ko,isRegExp:()=>di,objDisplay:()=>st,overwriteChainableMethod:()=>La,overwriteMethod:()=>$a,overwriteProperty:()=>Da,proxify:()=>_t,test:()=>Pa,transferFlags:()=>Ee,type:()=>Q});var fe={};_a(fe,{compatibleConstructor:()=>Ed,compatibleInstance:()=>wd,compatibleMessage:()=>xd,getConstructorName:()=>Cd,getMessage:()=>qd});function wi(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}x(wi,"isErrorInstance");function Rd(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(Rd,"isRegExp");function wd(e,t){return wi(t)&&e===t}x(wd,"compatibleInstance");function Ed(e,t){return wi(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:!1}x(Ed,"compatibleConstructor");function xd(e,t){const r=typeof e=="string"?e:e.message;return Rd(t)?t.test(r):typeof t=="string"?r.indexOf(t)!==-1:!1}x(xd,"compatibleMessage");function Cd(e){let t=e;return wi(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}x(Cd,"getConstructorName");function qd(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}x(qd,"getMessage");function U(e,t,r){let n=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)n[t]=r;else return n[t]}x(U,"flag");function Pa(e,t){let r=U(e,"negate"),n=t[0];return r?!n:n}x(Pa,"test");function Q(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}x(Q,"type");var _m="captureStackTrace"in Error,_d=class Pd extends Error{constructor(t="Unspecified AssertionError",r,n){super(t),gd(this,"message"),this.message=t,_m&&Error.captureStackTrace(this,n||Pd);for(const o in r)o in this||(this[o]=r[o])}get name(){return"AssertionError"}get ok(){return!1}toJSON(t){return{...this,name:this.name,message:this.message,ok:!1,stack:t!==!1?this.stack:void 0}}};x(_d,"AssertionError");var G=_d;function Td(e,t){let r=U(e,"message"),n=U(e,"ssfi");r=r?r+": ":"",e=U(e,"object"),t=t.map(function(a){return a.toLowerCase()}),t.sort();let o=t.map(function(a,s){let l=~["a","e","i","o","u"].indexOf(a.charAt(0))?"an":"a";return(t.length>1&&s===t.length-1?"or ":"")+l+" "+a}).join(", "),i=Q(e).toLowerCase();if(!t.some(function(a){return i===a}))throw new G(r+"object tested must be "+o+", but "+i+" given",void 0,n)}x(Td,"expectTypes");function Ei(e,t){return t.length>4?t[4]:e._obj}x(Ei,"getActual");var _s={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},Pm={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},yt="…";function Sd(e,t){const r=_s[Pm[t]]||_s[t]||"";return r?`\x1B[${r[0]}m${String(e)}\x1B[${r[1]}m`:String(e)}x(Sd,"colorise");function Ad({showHidden:e=!1,depth:t=2,colors:r=!1,customInspect:n=!0,showProxy:o=!1,maxArrayLength:i=1/0,breakLength:a=1/0,seen:s=[],truncate:l=1/0,stylize:u=String}={},f){const c={showHidden:!!e,depth:Number(t),colors:!!r,customInspect:!!n,showProxy:!!o,maxArrayLength:Number(i),breakLength:Number(a),truncate:Number(l),seen:s,inspect:f,stylize:u};return c.colors&&(c.stylize=Sd),c}x(Ad,"normaliseOptions");function Md(e){return e>="\uD800"&&e<="\uDBFF"}x(Md,"isHighSurrogate");function Fe(e,t,r=yt){e=String(e);const n=r.length,o=e.length;if(n>t&&o>n)return r;if(o>t&&o>n){let i=t-n;return i>0&&Md(e[i-1])&&(i=i-1),`${e.slice(0,i)}${r}`}return e}x(Fe,"truncate");function he(e,t,r,n=", "){r=r||t.inspect;const o=e.length;if(o===0)return"";const i=t.truncate;let a="",s="",l="";for(let u=0;u<o;u+=1){const f=u+1===e.length,c=u+2===e.length;l=`${yt}(${e.length-u})`;const d=e[u];t.truncate=i-a.length-(f?0:n.length);const b=s||r(d,t)+(f?"":n),v=a.length+b.length,R=v+l.length;if(f&&v>i&&a.length+l.length<=i||!f&&!c&&R>i||(s=f?"":r(e[u+1],t)+(c?"":n),!f&&c&&R>i&&v+s.length>i))break;if(a+=b,!f&&!c&&v+s.length>=i){l=`${yt}(${e.length-u-1})`;break}l=""}return`${a}${l}`}x(he,"inspectList");function Od(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}x(Od,"quoteComplexKey");function gt([e,t],r){return r.truncate-=2,typeof e=="string"?e=Od(e):typeof e!="number"&&(e=`[${r.inspect(e,r)}]`),r.truncate-=e.length,t=r.inspect(t,r),`${e}: ${t}`}x(gt,"inspectProperty");function Id(e,t){const r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return"[]";t.truncate-=4;const n=he(e,t);t.truncate-=n.length;let o="";return r.length&&(o=he(r.map(i=>[i,e[i]]),t,gt)),`[ ${n}${o?`, ${o}`:""} ]`}x(Id,"inspectArray");var Tm=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function qe(e,t){const r=Tm(e);t.truncate-=r.length+4;const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return`${r}[]`;let o="";for(let a=0;a<e.length;a++){const s=`${t.stylize(Fe(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=s.length,e[a]!==e.length&&t.truncate<=3){o+=`${yt}(${e.length-e[a]+1})`;break}o+=s}let i="";return n.length&&(i=he(n.map(a=>[a,e[a]]),t,gt)),`${r}[ ${o}${i?`, ${i}`:""} ]`}x(qe,"inspectTypedArray");function Nd(e,t){const r=e.toJSON();if(r===null)return"Invalid Date";const n=r.split("T"),o=n[0];return t.stylize(`${o}T${Fe(n[1],t.truncate-o.length-1)}`,"date")}x(Nd,"inspectDate");function Ji(e,t){const r=e[Symbol.toStringTag]||"Function",n=e.name;return n?t.stylize(`[${r} ${Fe(n,t.truncate-11)}]`,"special"):t.stylize(`[${r}]`,"special")}x(Ji,"inspectFunction");function kd([e,t],r){return r.truncate-=4,e=r.inspect(e,r),r.truncate-=e.length,t=r.inspect(t,r),`${e} => ${t}`}x(kd,"inspectMapEntry");function jd(e){const t=[];return e.forEach((r,n)=>{t.push([n,r])}),t}x(jd,"mapToEntries");function Dd(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${he(jd(e),t,kd)} }`)}x(Dd,"inspectMap");var Sm=Number.isNaN||(e=>e!==e);function Qi(e,t){return Sm(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(Fe(String(e),t.truncate),"number")}x(Qi,"inspectNumber");function Zi(e,t){let r=Fe(e.toString(),t.truncate-1);return r!==yt&&(r+="n"),t.stylize(r,"bigint")}x(Zi,"inspectBigInt");function $d(e,t){const r=e.toString().split("/")[2],n=t.truncate-(2+r.length),o=e.source;return t.stylize(`/${Fe(o,n)}/${r}`,"regexp")}x($d,"inspectRegExp");function Bd(e){const t=[];return e.forEach(r=>{t.push(r)}),t}x(Bd,"arrayFromSet");function Ld(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${he(Bd(e),t)} }`)}x(Ld,"inspectSet");var Ps=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),Am={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Mm=16;function Fd(e){return Am[e]||`\\u${`0000${e.charCodeAt(0).toString(Mm)}`.slice(-4)}`}x(Fd,"escape");function ea(e,t){return Ps.test(e)&&(e=e.replace(Ps,Fd)),t.stylize(`'${Fe(e,t.truncate-2)}'`,"string")}x(ea,"inspectString");function ta(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}x(ta,"inspectSymbol");var Om=x(()=>"Promise{…}","getPromiseValue"),Im=Om;function Co(e,t){const r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(r.length===0&&n.length===0)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const o=he(r.map(s=>[s,e[s]]),t,gt),i=he(n.map(s=>[s,e[s]]),t,gt);t.seen.pop();let a="";return o&&i&&(a=", "),`{ ${o}${a}${i} }`}x(Co,"inspectObject");var $i=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function Ud(e,t){let r="";return $i&&$i in e&&(r=e[$i]),r=r||e.constructor.name,(!r||r==="_class")&&(r="<Anonymous Class>"),t.truncate-=r.length,`${r}${Co(e,t)}`}x(Ud,"inspectClass");function zd(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${he(e,t)} ]`)}x(zd,"inspectArguments");var Nm=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Vd(e,t){const r=Object.getOwnPropertyNames(e).filter(a=>Nm.indexOf(a)===-1),n=e.name;t.truncate-=n.length;let o="";if(typeof e.message=="string"?o=Fe(e.message,t.truncate):r.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const i=he(r.map(a=>[a,e[a]]),t,gt);return`${n}${o}${i?` { ${i} }`:""}`}x(Vd,"inspectObject");function Hd([e,t],r){return r.truncate-=3,t?`${r.stylize(String(e),"yellow")}=${r.stylize(`"${t}"`,"string")}`:`${r.stylize(String(e),"yellow")}`}x(Hd,"inspectAttribute");function si(e,t){return he(e,t,Wd,`
2
+ `)}x(si,"inspectNodeCollection");function Wd(e,t){switch(e.nodeType){case 1:return Ta(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}x(Wd,"inspectNode");function Ta(e,t){const r=e.getAttributeNames(),n=e.tagName.toLowerCase(),o=t.stylize(`<${n}`,"special"),i=t.stylize(">","special"),a=t.stylize(`</${n}>`,"special");t.truncate-=n.length*2+5;let s="";r.length>0&&(s+=" ",s+=he(r.map(f=>[f,e.getAttribute(f)]),t,Hd," ")),t.truncate-=s.length;const l=t.truncate;let u=si(e.children,t);return u&&u.length>l&&(u=`${yt}(${e.children.length})`),`${o}${s}${i}${u}${a}`}x(Ta,"inspectHTML");var km=typeof Symbol=="function"&&typeof Symbol.for=="function",Bi=km?Symbol.for("chai/inspect"):"@@chai/inspect",Li=Symbol.for("nodejs.util.inspect.custom"),Ts=new WeakMap,Ss={},As={undefined:x((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:x((e,t)=>t.stylize("null","null"),"null"),boolean:x((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:x((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:Qi,Number:Qi,bigint:Zi,BigInt:Zi,string:ea,String:ea,function:Ji,Function:Ji,symbol:ta,Symbol:ta,Array:Id,Date:Nd,Map:Dd,Set:Ld,RegExp:$d,Promise:Im,WeakSet:x((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet"),WeakMap:x((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),Arguments:zd,Int8Array:qe,Uint8Array:qe,Uint8ClampedArray:qe,Int16Array:qe,Uint16Array:qe,Int32Array:qe,Uint32Array:qe,Float32Array:qe,Float64Array:qe,Generator:x(()=>"","Generator"),DataView:x(()=>"","DataView"),ArrayBuffer:x(()=>"","ArrayBuffer"),Error:Vd,HTMLCollection:si,NodeList:si},jm=x((e,t,r,n)=>Bi in e&&typeof e[Bi]=="function"?e[Bi](t):Li in e&&typeof e[Li]=="function"?e[Li](t.depth,t,n):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Ts.has(e.constructor)?Ts.get(e.constructor)(e,t):Ss[r]?Ss[r](e,t):"","inspectCustom"),Dm=Object.prototype.toString;function qo(e,t={}){const r=Ad(t,qo),{customInspect:n}=r;let o=e===null?"null":typeof e;if(o==="object"&&(o=Dm.call(e).slice(8,-1)),o in As)return As[o](e,r);if(n&&e){const a=jm(e,r,o,qo);if(a)return typeof a=="string"?a:qo(a,r)}const i=e?Object.getPrototypeOf(e):!1;return i===Object.prototype||i===null?Co(e,r):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Ta(e,r):"constructor"in e?e.constructor!==Object?Ud(e,r):Co(e,r):e===Object(e)?Co(e,r):r.stylize(String(e),o)}x(qo,"inspect");var ie={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function H(e,t,r,n){let o={colors:n,depth:typeof r>"u"?2:r,showHidden:t,truncate:ie.truncateThreshold?ie.truncateThreshold:1/0};return qo(e,o)}x(H,"inspect");function st(e){let t=H(e),r=Object.prototype.toString.call(e);if(ie.truncateThreshold&&t.length>=ie.truncateThreshold){if(r==="[object Function]")return!e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(r==="[object Array]")return"[ Array("+e.length+") ]";if(r==="[object Object]"){let n=Object.keys(e);return"{ Object ("+(n.length>2?n.splice(0,2).join(", ")+", ...":n.join(", "))+") }"}else return t}else return t}x(st,"objDisplay");function Sa(e,t){let r=U(e,"negate"),n=U(e,"object"),o=t[3],i=Ei(e,t),a=r?t[2]:t[1],s=U(e,"message");return typeof a=="function"&&(a=a()),a=a||"",a=a.replace(/#\{this\}/g,function(){return st(n)}).replace(/#\{act\}/g,function(){return st(i)}).replace(/#\{exp\}/g,function(){return st(o)}),s?s+": "+a:a}x(Sa,"getMessage");function Ee(e,t,r){let n=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),r=arguments.length===3?r:!0;for(let o in n)(r||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(t.__flags[o]=n[o])}x(Ee,"transferFlags");function ra(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}x(ra,"type");function Aa(){this._key="chai/deep-eql__"+Math.random()+Date.now()}x(Aa,"FakeMap");Aa.prototype={get:x(function(t){return t[this._key]},"get"),set:x(function(t,r){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:r,configurable:!0})},"set")};var Gd=typeof WeakMap=="function"?WeakMap:Aa;function na(e,t,r){if(!r||ut(e)||ut(t))return null;var n=r.get(e);if(n){var o=n.get(t);if(typeof o=="boolean")return o}return null}x(na,"memoizeCompare");function go(e,t,r,n){if(!(!r||ut(e)||ut(t))){var o=r.get(e);o?o.set(t,n):(o=new Gd,o.set(t,n),r.set(e,o))}}x(go,"memoizeSet");var Kd=No;function No(e,t,r){if(r&&r.comparator)return oa(e,t,r);var n=Ma(e,t);return n!==null?n:oa(e,t,r)}x(No,"deepEqual");function Ma(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:ut(e)||ut(t)?!1:null}x(Ma,"simpleEqual");function oa(e,t,r){r=r||{},r.memoize=r.memoize===!1?!1:r.memoize||new Gd;var n=r&&r.comparator,o=na(e,t,r.memoize);if(o!==null)return o;var i=na(t,e,r.memoize);if(i!==null)return i;if(n){var a=n(e,t);if(a===!1||a===!0)return go(e,t,r.memoize,a),a;var s=Ma(e,t);if(s!==null)return s}var l=ra(e);if(l!==ra(t))return go(e,t,r.memoize,!1),!1;go(e,t,r.memoize,!0);var u=Yd(e,t,l,r);return go(e,t,r.memoize,u),u}x(oa,"extensiveDeepEqual");function Yd(e,t,r,n){switch(r){case"String":case"Number":case"Boolean":case"Date":return No(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return Oa(e,t,["name","message","code"],n);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return Je(e,t,n);case"RegExp":return Xd(e,t);case"Generator":return Jd(e,t,n);case"DataView":return Je(new Uint8Array(e.buffer),new Uint8Array(t.buffer),n);case"ArrayBuffer":return Je(new Uint8Array(e),new Uint8Array(t),n);case"Set":return ia(e,t,n);case"Map":return ia(e,t,n);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return e.equals(t);case"Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return e.toString()===t.toString();default:return Zd(e,t,n)}}x(Yd,"extensiveDeepEqualByType");function Xd(e,t){return e.toString()===t.toString()}x(Xd,"regexpEqual");function ia(e,t,r){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var n=[],o=[];return e.forEach(x(function(a,s){n.push([a,s])},"gatherEntries")),t.forEach(x(function(a,s){o.push([a,s])},"gatherEntries")),Je(n.sort(),o.sort(),r)}x(ia,"entriesEqual");function Je(e,t,r){var n=e.length;if(n!==t.length)return!1;if(n===0)return!0;for(var o=-1;++o<n;)if(No(e[o],t[o],r)===!1)return!1;return!0}x(Je,"iterableEqual");function Jd(e,t,r){return Je(li(e),li(t),r)}x(Jd,"generatorEqual");function Qd(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}x(Qd,"hasIteratorFunction");function aa(e){if(Qd(e))try{return li(e[Symbol.iterator]())}catch{return[]}return[]}x(aa,"getIteratorEntries");function li(e){for(var t=e.next(),r=[t.value];t.done===!1;)t=e.next(),r.push(t.value);return r}x(li,"getGeneratorEntries");function sa(e){var t=[];for(var r in e)t.push(r);return t}x(sa,"getEnumerableKeys");function la(e){for(var t=[],r=Object.getOwnPropertySymbols(e),n=0;n<r.length;n+=1){var o=r[n];Object.getOwnPropertyDescriptor(e,o).enumerable&&t.push(o)}return t}x(la,"getEnumerableSymbols");function Oa(e,t,r,n){var o=r.length;if(o===0)return!0;for(var i=0;i<o;i+=1)if(No(e[r[i]],t[r[i]],n)===!1)return!1;return!0}x(Oa,"keysEqual");function Zd(e,t,r){var n=sa(e),o=sa(t),i=la(e),a=la(t);if(n=n.concat(i),o=o.concat(a),n.length&&n.length===o.length)return Je(ua(n).sort(),ua(o).sort())===!1?!1:Oa(e,t,n,r);var s=aa(e),l=aa(t);return s.length&&s.length===l.length?(s.sort(),l.sort(),Je(s,l,r)):n.length===0&&s.length===0&&o.length===0&&l.length===0}x(Zd,"objectEqual");function ut(e){return e===null||typeof e!="object"}x(ut,"isPrimitive");function ua(e){return e.map(x(function(r){return typeof r=="symbol"?r.toString():r},"mapSymbol"))}x(ua,"mapSymbols");function xi(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}x(xi,"hasProperty");function ef(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(n=>{if(n==="constructor"||n==="__proto__"||n==="prototype")return{};const i=/^\[(\d+)\]$/.exec(n);let a=null;return i?a={i:parseFloat(i[1])}:a={p:n.replace(/\\([.[\]])/g,"$1")},a})}x(ef,"parsePath");function ca(e,t,r){let n=e,o=null;r=typeof r>"u"?t.length:r;for(let i=0;i<r;i++){const a=t[i];n&&(typeof a.p>"u"?n=n[a.i]:n=n[a.p],i===r-1&&(o=n))}return o}x(ca,"internalGetPathValue");function Ia(e,t){const r=ef(t),n=r[r.length-1],o={parent:r.length>1?ca(e,r,r.length-1):e,name:n.p||n.i,value:ca(e,r)};return o.exists=xi(o.parent,o.name),o}x(Ia,"getPathInfo");var tf=class rf{constructor(t,r,n,o){return gd(this,"__flags",{}),U(this,"ssfi",n||rf),U(this,"lockSsfi",o),U(this,"object",t),U(this,"message",r),U(this,"eql",ie.deepEqual||Kd),_t(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ie.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ie.includeStack=t}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ie.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ie.showDiff=t}static addProperty(t,r){ka(this.prototype,t,r)}static addMethod(t,r){ja(this.prototype,t,r)}static addChainableMethod(t,r,n){Ba(this.prototype,t,r,n)}static overwriteProperty(t,r){Da(this.prototype,t,r)}static overwriteMethod(t,r){$a(this.prototype,t,r)}static overwriteChainableMethod(t,r,n){La(this.prototype,t,r,n)}assert(t,r,n,o,i,a){const s=Pa(this,arguments);if(a!==!1&&(a=!0),o===void 0&&i===void 0&&(a=!1),ie.showDiff!==!0&&(a=!1),!s){r=Sa(this,arguments);const u={actual:Ei(this,arguments),expected:o,showDiff:a},f=za(this,arguments);throw f&&(u.operator=f),new G(r,u,ie.includeStack?this.assert:U(this,"ssfi"))}}get _obj(){return U(this,"object")}set _obj(t){U(this,"object",t)}};x(tf,"Assertion");var h=tf,Ci=new EventTarget,nf=class extends Event{constructor(t,r,n){super(t),this.name=String(r),this.fn=n}};x(nf,"PluginEvent");var Na=nf;function ko(){return ie.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}x(ko,"isProxyEnabled");function ka(e,t,r){r=r===void 0?function(){}:r,Object.defineProperty(e,t,{get:x(function n(){!ko()&&!U(this,"lockSsfi")&&U(this,"ssfi",n);let o=r.call(this);if(o!==void 0)return o;let i=new h;return Ee(this,i),i},"propertyGetter"),configurable:!0}),Ci.dispatchEvent(new Na("addProperty",t,r))}x(ka,"addProperty");var $m=Object.getOwnPropertyDescriptor(function(){},"length");function jo(e,t,r){return $m.configurable&&Object.defineProperty(e,"length",{get:x(function(){throw Error(r?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}x(jo,"addLengthGuard");function of(e){let t=Object.getOwnPropertyNames(e);function r(o){t.indexOf(o)===-1&&t.push(o)}x(r,"addProperty");let n=Object.getPrototypeOf(e);for(;n!==null;)Object.getOwnPropertyNames(n).forEach(r),n=Object.getPrototypeOf(n);return t}x(of,"getProperties");var Ms=["__flags","__methods","_obj","assert"];function _t(e,t){return ko()?new Proxy(e,{get:x(function r(n,o){if(typeof o=="string"&&ie.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(n,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');let i=null,a=4;throw of(n).forEach(function(s){if(!Object.prototype.hasOwnProperty(s)&&Ms.indexOf(s)===-1){let l=af(o,s,a);l<a&&(i=s,a=l)}}),Error(i!==null?"Invalid Chai property: "+o+'. Did you mean "'+i+'"?':"Invalid Chai property: "+o)}return Ms.indexOf(o)===-1&&!U(n,"lockSsfi")&&U(n,"ssfi",r),Reflect.get(n,o)},"proxyGetter")}):e}x(_t,"proxify");function af(e,t,r){if(Math.abs(e.length-t.length)>=r)return r;let n=[];for(let o=0;o<=e.length;o++)n[o]=Array(t.length+1).fill(0),n[o][0]=o;for(let o=0;o<t.length;o++)n[0][o]=o;for(let o=1;o<=e.length;o++){let i=e.charCodeAt(o-1);for(let a=1;a<=t.length;a++){if(Math.abs(o-a)>=r){n[o][a]=r;continue}n[o][a]=Math.min(n[o-1][a]+1,n[o][a-1]+1,n[o-1][a-1]+(i===t.charCodeAt(a-1)?0:1))}}return n[e.length][t.length]}x(af,"stringDistanceCapped");function ja(e,t,r){let n=x(function(){U(this,"lockSsfi")||U(this,"ssfi",n);let o=r.apply(this,arguments);if(o!==void 0)return o;let i=new h;return Ee(this,i),i},"methodWrapper");jo(n,t,!1),e[t]=_t(n,t),Ci.dispatchEvent(new Na("addMethod",t,r))}x(ja,"addMethod");function Da(e,t,r){let n=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");n&&typeof n.get=="function"&&(o=n.get),Object.defineProperty(e,t,{get:x(function i(){!ko()&&!U(this,"lockSsfi")&&U(this,"ssfi",i);let a=U(this,"lockSsfi");U(this,"lockSsfi",!0);let s=r(o).call(this);if(U(this,"lockSsfi",a),s!==void 0)return s;let l=new h;return Ee(this,l),l},"overwritingPropertyGetter"),configurable:!0})}x(Da,"overwriteProperty");function $a(e,t,r){let n=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");n&&typeof n=="function"&&(o=n);let i=x(function(){U(this,"lockSsfi")||U(this,"ssfi",i);let a=U(this,"lockSsfi");U(this,"lockSsfi",!0);let s=r(o).apply(this,arguments);if(U(this,"lockSsfi",a),s!==void 0)return s;let l=new h;return Ee(this,l),l},"overwritingMethodWrapper");jo(i,t,!1),e[t]=_t(i,t)}x($a,"overwriteMethod");var Bm=typeof Object.setPrototypeOf=="function",Os=x(function(){},"testFn"),Lm=Object.getOwnPropertyNames(Os).filter(function(e){let t=Object.getOwnPropertyDescriptor(Os,e);return typeof t!="object"?!0:!t.configurable}),Fm=Function.prototype.call,Um=Function.prototype.apply,sf=class extends Na{constructor(t,r,n,o){super(t,r,n),this.chainingBehavior=o}};x(sf,"PluginAddChainableMethodEvent");var zm=sf;function Ba(e,t,r,n){typeof n!="function"&&(n=x(function(){},"chainingBehavior"));let o={method:r,chainingBehavior:n};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(function(){o.chainingBehavior.call(this);let a=x(function(){U(this,"lockSsfi")||U(this,"ssfi",a);let s=o.method.apply(this,arguments);if(s!==void 0)return s;let l=new h;return Ee(this,l),l},"chainableMethodWrapper");if(jo(a,t,!0),Bm){let s=Object.create(this);s.call=Fm,s.apply=Um,Object.setPrototypeOf(a,s)}else Object.getOwnPropertyNames(e).forEach(function(l){if(Lm.indexOf(l)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(a,l,u)});return Ee(this,a),_t(a)},"chainableMethodGetter"),configurable:!0}),Ci.dispatchEvent(new zm("addChainableMethod",t,r,n))}x(Ba,"addChainableMethod");function La(e,t,r,n){let o=e.__methods[t],i=o.chainingBehavior;o.chainingBehavior=x(function(){let l=n(i).call(this);if(l!==void 0)return l;let u=new h;return Ee(this,u),u},"overwritingChainableMethodGetter");let a=o.method;o.method=x(function(){let l=r(a).apply(this,arguments);if(l!==void 0)return l;let u=new h;return Ee(this,u),u},"overwritingChainableMethodWrapper")}x(La,"overwriteChainableMethod");function ui(e,t){return H(e)<H(t)?-1:1}x(ui,"compareByInspect");function Fa(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}x(Fa,"getOwnEnumerablePropertySymbols");function Ua(e){return Object.keys(e).concat(Fa(e))}x(Ua,"getOwnEnumerableProperties");var ci=Number.isNaN;function lf(e){let t=Q(e);return["Array","Object","Function"].indexOf(t)!==-1}x(lf,"isObjectType");function za(e,t){let r=U(e,"operator"),n=U(e,"negate"),o=t[3],i=n?t[2]:t[1];if(r)return r;if(typeof i=="function"&&(i=i()),i=i||"",!i||/\shave\s/.test(i))return;let a=lf(o);return/\snot\s/.test(i)?a?"notDeepStrictEqual":"notStrictEqual":a?"deepStrictEqual":"strictEqual"}x(za,"getOperator");function qi(e){return e.name}x(qi,"getName");function di(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(di,"isRegExp");function ne(e){return["Number","BigInt"].includes(Q(e))}x(ne,"isNumeric");var{flag:w}=ai;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){h.addProperty(e)});h.addProperty("not",function(){w(this,"negate",!0)});h.addProperty("deep",function(){w(this,"deep",!0)});h.addProperty("nested",function(){w(this,"nested",!0)});h.addProperty("own",function(){w(this,"own",!0)});h.addProperty("ordered",function(){w(this,"ordered",!0)});h.addProperty("any",function(){w(this,"any",!0),w(this,"all",!1)});h.addProperty("all",function(){w(this,"all",!0),w(this,"any",!1)});var Is={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Va(e,t){t&&w(this,"message",t),e=e.toLowerCase();let r=w(this,"object"),n=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";const o=Q(r).toLowerCase();Is.function.includes(e)?this.assert(Is[e].includes(o),"expected #{this} to be "+n+e,"expected #{this} not to be "+n+e):this.assert(e===o,"expected #{this} to be "+n+e,"expected #{this} not to be "+n+e)}x(Va,"an");h.addChainableMethod("an",Va);h.addChainableMethod("a",Va);function uf(e,t){return ci(e)&&ci(t)||e===t}x(uf,"SameValueZero");function Do(){w(this,"contains",!0)}x(Do,"includeChainingBehavior");function $o(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=Q(r).toLowerCase(),o=w(this,"message"),i=w(this,"negate"),a=w(this,"ssfi"),s=w(this,"deep"),l=s?"deep ":"",u=s?w(this,"eql"):uf;o=o?o+": ":"";let f=!1;switch(n){case"string":f=r.indexOf(e)!==-1;break;case"weakset":if(s)throw new G(o+"unable to use .deep.include with WeakSet",void 0,a);f=r.has(e);break;case"map":r.forEach(function(c){f=f||u(c,e)});break;case"set":s?r.forEach(function(c){f=f||u(c,e)}):f=r.has(e);break;case"array":s?f=r.some(function(c){return u(c,e)}):f=r.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new G(o+"the given combination of arguments ("+n+" and "+Q(e).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+Q(e).toLowerCase(),void 0,a);let c=Object.keys(e),d=null,b=0;if(c.forEach(function(v){let R=new h(r);if(Ee(this,R,!0),w(R,"lockSsfi",!0),!i||c.length===1){R.property(v,e[v]);return}try{R.property(v,e[v])}catch(S){if(!fe.compatibleConstructor(S,G))throw S;d===null&&(d=S),b++}},this),i&&c.length>1&&b===c.length)throw d;return}}this.assert(f,"expected #{this} to "+l+"include "+H(e),"expected #{this} to not "+l+"include "+H(e))}x($o,"include");h.addChainableMethod("include",$o,Do);h.addChainableMethod("contain",$o,Do);h.addChainableMethod("contains",$o,Do);h.addChainableMethod("includes",$o,Do);h.addProperty("ok",function(){this.assert(w(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")});h.addProperty("true",function(){this.assert(w(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!w(this,"negate"))});h.addProperty("numeric",function(){const e=w(this,"object");this.assert(["Number","BigInt"].includes(Q(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!w(this,"negate"))});h.addProperty("callable",function(){const e=w(this,"object"),t=w(this,"ssfi"),r=w(this,"message"),n=r?`${r}: `:"",o=w(this,"negate"),i=o?`${n}expected ${H(e)} not to be a callable function`:`${n}expected ${H(e)} to be a callable function`,a=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(Q(e));if(a&&o||!a&&!o)throw new G(i,void 0,t)});h.addProperty("false",function(){this.assert(w(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!w(this,"negate"))});h.addProperty("null",function(){this.assert(w(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")});h.addProperty("undefined",function(){this.assert(w(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")});h.addProperty("NaN",function(){this.assert(ci(w(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function Ha(){let e=w(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist")}x(Ha,"assertExist");h.addProperty("exist",Ha);h.addProperty("exists",Ha);h.addProperty("empty",function(){let e=w(this,"object"),t=w(this,"ssfi"),r=w(this,"message"),n;switch(r=r?r+": ":"",Q(e).toLowerCase()){case"array":case"string":n=e.length;break;case"map":case"set":n=e.size;break;case"weakmap":case"weakset":throw new G(r+".empty was passed a weak collection",void 0,t);case"function":{const o=r+".empty was passed a function "+qi(e);throw new G(o.trim(),void 0,t)}default:if(e!==Object(e))throw new G(r+".empty was passed non-string primitive "+H(e),void 0,t);n=Object.keys(e).length}this.assert(n===0,"expected #{this} to be empty","expected #{this} not to be empty")});function Wa(){let e=w(this,"object"),t=Q(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}x(Wa,"checkArguments");h.addProperty("arguments",Wa);h.addProperty("Arguments",Wa);function _i(e,t){t&&w(this,"message",t);let r=w(this,"object");if(w(this,"deep")){let n=w(this,"lockSsfi");w(this,"lockSsfi",!0),this.eql(e),w(this,"lockSsfi",n)}else this.assert(e===r,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}x(_i,"assertEqual");h.addMethod("equal",_i);h.addMethod("equals",_i);h.addMethod("eq",_i);function Ga(e,t){t&&w(this,"message",t);let r=w(this,"eql");this.assert(r(e,w(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}x(Ga,"assertEql");h.addMethod("eql",Ga);h.addMethod("eqls",Ga);function Pi(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"doLength"),o=w(this,"message"),i=o?o+": ":"",a=w(this,"ssfi"),s=Q(r).toLowerCase(),l=Q(e).toLowerCase();if(n&&s!=="map"&&s!=="set"&&new h(r,o,a,!0).to.have.property("length"),!n&&s==="date"&&l!=="date")throw new G(i+"the argument to above must be a date",void 0,a);if(!ne(e)&&(n||ne(r)))throw new G(i+"the argument to above must be a number",void 0,a);if(!n&&s!=="date"&&!ne(r)){let u=s==="string"?"'"+r+"'":r;throw new G(i+"expected "+u+" to be a number or a date",void 0,a)}if(n){let u="length",f;s==="map"||s==="set"?(u="size",f=r.size):f=r.length,this.assert(f>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,f)}else this.assert(r>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}x(Pi,"assertAbove");h.addMethod("above",Pi);h.addMethod("gt",Pi);h.addMethod("greaterThan",Pi);function Ti(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"doLength"),o=w(this,"message"),i=o?o+": ":"",a=w(this,"ssfi"),s=Q(r).toLowerCase(),l=Q(e).toLowerCase(),u,f=!0;if(n&&s!=="map"&&s!=="set"&&new h(r,o,a,!0).to.have.property("length"),!n&&s==="date"&&l!=="date")u=i+"the argument to least must be a date";else if(!ne(e)&&(n||ne(r)))u=i+"the argument to least must be a number";else if(!n&&s!=="date"&&!ne(r)){let c=s==="string"?"'"+r+"'":r;u=i+"expected "+c+" to be a number or a date"}else f=!1;if(f)throw new G(u,void 0,a);if(n){let c="length",d;s==="map"||s==="set"?(c="size",d=r.size):d=r.length,this.assert(d>=e,"expected #{this} to have a "+c+" at least #{exp} but got #{act}","expected #{this} to have a "+c+" below #{exp}",e,d)}else this.assert(r>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}x(Ti,"assertLeast");h.addMethod("least",Ti);h.addMethod("gte",Ti);h.addMethod("greaterThanOrEqual",Ti);function Si(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"doLength"),o=w(this,"message"),i=o?o+": ":"",a=w(this,"ssfi"),s=Q(r).toLowerCase(),l=Q(e).toLowerCase(),u,f=!0;if(n&&s!=="map"&&s!=="set"&&new h(r,o,a,!0).to.have.property("length"),!n&&s==="date"&&l!=="date")u=i+"the argument to below must be a date";else if(!ne(e)&&(n||ne(r)))u=i+"the argument to below must be a number";else if(!n&&s!=="date"&&!ne(r)){let c=s==="string"?"'"+r+"'":r;u=i+"expected "+c+" to be a number or a date"}else f=!1;if(f)throw new G(u,void 0,a);if(n){let c="length",d;s==="map"||s==="set"?(c="size",d=r.size):d=r.length,this.assert(d<e,"expected #{this} to have a "+c+" below #{exp} but got #{act}","expected #{this} to not have a "+c+" below #{exp}",e,d)}else this.assert(r<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}x(Si,"assertBelow");h.addMethod("below",Si);h.addMethod("lt",Si);h.addMethod("lessThan",Si);function Ai(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"doLength"),o=w(this,"message"),i=o?o+": ":"",a=w(this,"ssfi"),s=Q(r).toLowerCase(),l=Q(e).toLowerCase(),u,f=!0;if(n&&s!=="map"&&s!=="set"&&new h(r,o,a,!0).to.have.property("length"),!n&&s==="date"&&l!=="date")u=i+"the argument to most must be a date";else if(!ne(e)&&(n||ne(r)))u=i+"the argument to most must be a number";else if(!n&&s!=="date"&&!ne(r)){let c=s==="string"?"'"+r+"'":r;u=i+"expected "+c+" to be a number or a date"}else f=!1;if(f)throw new G(u,void 0,a);if(n){let c="length",d;s==="map"||s==="set"?(c="size",d=r.size):d=r.length,this.assert(d<=e,"expected #{this} to have a "+c+" at most #{exp} but got #{act}","expected #{this} to have a "+c+" above #{exp}",e,d)}else this.assert(r<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}x(Ai,"assertMost");h.addMethod("most",Ai);h.addMethod("lte",Ai);h.addMethod("lessThanOrEqual",Ai);h.addMethod("within",function(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"doLength"),i=w(this,"message"),a=i?i+": ":"",s=w(this,"ssfi"),l=Q(n).toLowerCase(),u=Q(e).toLowerCase(),f=Q(t).toLowerCase(),c,d=!0,b=u==="date"&&f==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&l!=="map"&&l!=="set"&&new h(n,i,s,!0).to.have.property("length"),!o&&l==="date"&&(u!=="date"||f!=="date"))c=a+"the arguments to within must be dates";else if((!ne(e)||!ne(t))&&(o||ne(n)))c=a+"the arguments to within must be numbers";else if(!o&&l!=="date"&&!ne(n)){let v=l==="string"?"'"+n+"'":n;c=a+"expected "+v+" to be a number or a date"}else d=!1;if(d)throw new G(c,void 0,s);if(o){let v="length",R;l==="map"||l==="set"?(v="size",R=n.size):R=n.length,this.assert(R>=e&&R<=t,"expected #{this} to have a "+v+" within "+b,"expected #{this} to not have a "+v+" within "+b)}else this.assert(n>=e&&n<=t,"expected #{this} to be within "+b,"expected #{this} to not be within "+b)});function Ka(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"ssfi"),o=w(this,"message"),i;try{i=r instanceof e}catch(s){throw s instanceof TypeError?(o=o?o+": ":"",new G(o+"The instanceof assertion needs a constructor but "+Q(e)+" was given.",void 0,n)):s}let a=qi(e);a==null&&(a="an unnamed constructor"),this.assert(i,"expected #{this} to be an instance of "+a,"expected #{this} to not be an instance of "+a)}x(Ka,"assertInstanceOf");h.addMethod("instanceof",Ka);h.addMethod("instanceOf",Ka);function Ya(e,t,r){r&&w(this,"message",r);let n=w(this,"nested"),o=w(this,"own"),i=w(this,"message"),a=w(this,"object"),s=w(this,"ssfi"),l=typeof e;if(i=i?i+": ":"",n){if(l!=="string")throw new G(i+"the argument to property must be a string when using nested syntax",void 0,s)}else if(l!=="string"&&l!=="number"&&l!=="symbol")throw new G(i+"the argument to property must be a string, number, or symbol",void 0,s);if(n&&o)throw new G(i+'The "nested" and "own" flags cannot be combined.',void 0,s);if(a==null)throw new G(i+"Target cannot be null or undefined.",void 0,s);let u=w(this,"deep"),f=w(this,"negate"),c=n?Ia(a,e):null,d=n?c.value:a[e],b=u?w(this,"eql"):(S,p)=>S===p,v="";u&&(v+="deep "),o&&(v+="own "),n&&(v+="nested "),v+="property ";let R;o?R=Object.prototype.hasOwnProperty.call(a,e):n?R=c.exists:R=xi(a,e),(!f||arguments.length===1)&&this.assert(R,"expected #{this} to have "+v+H(e),"expected #{this} to not have "+v+H(e)),arguments.length>1&&this.assert(R&&b(t,d),"expected #{this} to have "+v+H(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+v+H(e)+" of #{act}",t,d),w(this,"object",d)}x(Ya,"assertProperty");h.addMethod("property",Ya);function Xa(e,t,r){w(this,"own",!0),Ya.apply(this,arguments)}x(Xa,"assertOwnProperty");h.addMethod("ownProperty",Xa);h.addMethod("haveOwnProperty",Xa);function Ja(e,t,r){typeof t=="string"&&(r=t,t=null),r&&w(this,"message",r);let n=w(this,"object"),o=Object.getOwnPropertyDescriptor(Object(n),e),i=w(this,"eql");o&&t?this.assert(i(t,o),"expected the own property descriptor for "+H(e)+" on #{this} to match "+H(t)+", got "+H(o),"expected the own property descriptor for "+H(e)+" on #{this} to not match "+H(t),t,o,!0):this.assert(o,"expected #{this} to have an own property descriptor for "+H(e),"expected #{this} to not have an own property descriptor for "+H(e)),w(this,"object",o)}x(Ja,"assertOwnPropertyDescriptor");h.addMethod("ownPropertyDescriptor",Ja);h.addMethod("haveOwnPropertyDescriptor",Ja);function Qa(){w(this,"doLength",!0)}x(Qa,"assertLengthChain");function Za(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=Q(r).toLowerCase(),o=w(this,"message"),i=w(this,"ssfi"),a="length",s;switch(n){case"map":case"set":a="size",s=r.size;break;default:new h(r,o,i,!0).to.have.property("length"),s=r.length}this.assert(s==e,"expected #{this} to have a "+a+" of #{exp} but got #{act}","expected #{this} to not have a "+a+" of #{act}",e,s)}x(Za,"assertLength");h.addChainableMethod("length",Za,Qa);h.addChainableMethod("lengthOf",Za,Qa);function es(e,t){t&&w(this,"message",t);let r=w(this,"object");this.assert(e.exec(r),"expected #{this} to match "+e,"expected #{this} not to match "+e)}x(es,"assertMatch");h.addMethod("match",es);h.addMethod("matches",es);h.addMethod("string",function(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"message"),o=w(this,"ssfi");new h(r,n,o,!0).is.a("string"),this.assert(~r.indexOf(e),"expected #{this} to contain "+H(e),"expected #{this} to not contain "+H(e))});function ts(e){let t=w(this,"object"),r=Q(t),n=Q(e),o=w(this,"ssfi"),i=w(this,"deep"),a,s="",l,u=!0,f=w(this,"message");f=f?f+": ":"";let c=f+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(r==="Map"||r==="Set")s=i?"deeply ":"",l=[],t.forEach(function(p,q){l.push(q)}),n!=="Array"&&(e=Array.prototype.slice.call(arguments));else{switch(l=Ua(t),n){case"Array":if(arguments.length>1)throw new G(c,void 0,o);break;case"Object":if(arguments.length>1)throw new G(c,void 0,o);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(p){return typeof p=="symbol"?p:String(p)})}if(!e.length)throw new G(f+"keys required",void 0,o);let d=e.length,b=w(this,"any"),v=w(this,"all"),R=e,S=i?w(this,"eql"):(p,q)=>p===q;if(!b&&!v&&(v=!0),b&&(u=R.some(function(p){return l.some(function(q){return S(p,q)})})),v&&(u=R.every(function(p){return l.some(function(q){return S(p,q)})}),w(this,"contains")||(u=u&&e.length==l.length)),d>1){e=e.map(function(q){return H(q)});let p=e.pop();v&&(a=e.join(", ")+", and "+p),b&&(a=e.join(", ")+", or "+p)}else a=H(e[0]);a=(d>1?"keys ":"key ")+a,a=(w(this,"contains")?"contain ":"have ")+a,this.assert(u,"expected #{this} to "+s+a,"expected #{this} to not "+s+a,R.slice(0).sort(ui),l.sort(ui),!0)}x(ts,"assertKeys");h.addMethod("keys",ts);h.addMethod("key",ts);function Mi(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"ssfi"),i=w(this,"message"),a=w(this,"negate")||!1;new h(n,i,o,!0).is.a("function"),(di(e)||typeof e=="string")&&(t=e,e=null);let s,l=!1;try{n()}catch(b){l=!0,s=b}let u=e===void 0&&t===void 0,f=!!(e&&t),c=!1,d=!1;if(u||!u&&!a){let b="an error";e instanceof Error?b="#{exp}":e&&(b=fe.getConstructorName(e));let v=s;if(s instanceof Error)v=s.toString();else if(typeof s=="string")v=s;else if(s&&(typeof s=="object"||typeof s=="function"))try{v=fe.getConstructorName(s)}catch{}this.assert(l,"expected #{this} to throw "+b,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),v)}if(e&&s&&(e instanceof Error&&fe.compatibleInstance(s,e)===a&&(f&&a?c=!0:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s&&!a?" but #{act} was thrown":""),e.toString(),s.toString())),fe.compatibleConstructor(s,e)===a&&(f&&a?c=!0:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&fe.getConstructorName(e),s instanceof Error?s.toString():s&&fe.getConstructorName(s)))),s&&t!==void 0&&t!==null){let b="including";di(t)&&(b="matching"),fe.compatibleMessage(s,t)===a&&(f&&a?d=!0:this.assert(a,"expected #{this} to throw error "+b+" #{exp} but got #{act}","expected #{this} to throw error not "+b+" #{exp}",t,fe.getMessage(s)))}c&&d&&this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(s?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&fe.getConstructorName(e),s instanceof Error?s.toString():s&&fe.getConstructorName(s)),w(this,"object",s)}x(Mi,"assertThrows");h.addMethod("throw",Mi);h.addMethod("throws",Mi);h.addMethod("Throw",Mi);function rs(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"itself"),o=typeof r=="function"&&!n?r.prototype[e]:r[e];this.assert(typeof o=="function","expected #{this} to respond to "+H(e),"expected #{this} to not respond to "+H(e))}x(rs,"respondTo");h.addMethod("respondTo",rs);h.addMethod("respondsTo",rs);h.addProperty("itself",function(){w(this,"itself",!0)});function ns(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=e(r);this.assert(n,"expected #{this} to satisfy "+st(e),"expected #{this} to not satisfy"+st(e),!w(this,"negate"),n)}x(ns,"satisfy");h.addMethod("satisfy",ns);h.addMethod("satisfies",ns);function os(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"message"),i=w(this,"ssfi");new h(n,o,i,!0).is.numeric;let a="A `delta` value is required for `closeTo`";if(t==null)throw new G(o?`${o}: ${a}`:a,void 0,i);if(new h(t,o,i,!0).is.numeric,a="A `expected` value is required for `closeTo`",e==null)throw new G(o?`${o}: ${a}`:a,void 0,i);new h(e,o,i,!0).is.numeric;const s=x(u=>u<0?-u:u,"abs"),l=x(u=>parseFloat(parseFloat(u).toPrecision(12)),"strip");this.assert(l(s(n-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t)}x(os,"closeTo");h.addMethod("closeTo",os);h.addMethod("approximately",os);function cf(e,t,r,n,o){let i=Array.from(t),a=Array.from(e);if(!n){if(a.length!==i.length)return!1;i=i.slice()}return a.every(function(s,l){if(o)return r?r(s,i[l]):s===i[l];if(!r){let u=i.indexOf(s);return u===-1?!1:(n||i.splice(u,1),!0)}return i.some(function(u,f){return r(s,u)?(n||i.splice(f,1),!0):!1})})}x(cf,"isSubsetOf");h.addMethod("members",function(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"message"),o=w(this,"ssfi");new h(r,n,o,!0).to.be.iterable,new h(e,n,o,!0).to.be.iterable;let i=w(this,"contains"),a=w(this,"ordered"),s,l,u;i?(s=a?"an ordered superset":"a superset",l="expected #{this} to be "+s+" of #{exp}",u="expected #{this} to not be "+s+" of #{exp}"):(s=a?"ordered members":"members",l="expected #{this} to have the same "+s+" as #{exp}",u="expected #{this} to not have the same "+s+" as #{exp}");let f=w(this,"deep")?w(this,"eql"):void 0;this.assert(cf(e,r,f,i,a),l,u,e,r,!0)});h.addProperty("iterable",function(e){e&&w(this,"message",e);let t=w(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t)});function df(e,t){t&&w(this,"message",t);let r=w(this,"object"),n=w(this,"message"),o=w(this,"ssfi"),i=w(this,"contains"),a=w(this,"deep"),s=w(this,"eql");new h(e,n,o,!0).to.be.an("array"),i?this.assert(e.some(function(l){return r.indexOf(l)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,r):a?this.assert(e.some(function(l){return s(r,l)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,r):this.assert(e.indexOf(r)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,r)}x(df,"oneOf");h.addMethod("oneOf",df);function is(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"message"),i=w(this,"ssfi");new h(n,o,i,!0).is.a("function");let a;t?(new h(e,o,i,!0).to.have.property(t),a=e[t]):(new h(e,o,i,!0).is.a("function"),a=e()),n();let s=t==null?e():e[t],l=t==null?a:"."+t;w(this,"deltaMsgObj",l),w(this,"initialDeltaValue",a),w(this,"finalDeltaValue",s),w(this,"deltaBehavior","change"),w(this,"realDelta",s!==a),this.assert(a!==s,"expected "+l+" to change","expected "+l+" to not change")}x(is,"assertChanges");h.addMethod("change",is);h.addMethod("changes",is);function as(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"message"),i=w(this,"ssfi");new h(n,o,i,!0).is.a("function");let a;t?(new h(e,o,i,!0).to.have.property(t),a=e[t]):(new h(e,o,i,!0).is.a("function"),a=e()),new h(a,o,i,!0).is.a("number"),n();let s=t==null?e():e[t],l=t==null?a:"."+t;w(this,"deltaMsgObj",l),w(this,"initialDeltaValue",a),w(this,"finalDeltaValue",s),w(this,"deltaBehavior","increase"),w(this,"realDelta",s-a),this.assert(s-a>0,"expected "+l+" to increase","expected "+l+" to not increase")}x(as,"assertIncreases");h.addMethod("increase",as);h.addMethod("increases",as);function ss(e,t,r){r&&w(this,"message",r);let n=w(this,"object"),o=w(this,"message"),i=w(this,"ssfi");new h(n,o,i,!0).is.a("function");let a;t?(new h(e,o,i,!0).to.have.property(t),a=e[t]):(new h(e,o,i,!0).is.a("function"),a=e()),new h(a,o,i,!0).is.a("number"),n();let s=t==null?e():e[t],l=t==null?a:"."+t;w(this,"deltaMsgObj",l),w(this,"initialDeltaValue",a),w(this,"finalDeltaValue",s),w(this,"deltaBehavior","decrease"),w(this,"realDelta",a-s),this.assert(s-a<0,"expected "+l+" to decrease","expected "+l+" to not decrease")}x(ss,"assertDecreases");h.addMethod("decrease",ss);h.addMethod("decreases",ss);function ff(e,t){t&&w(this,"message",t);let r=w(this,"deltaMsgObj"),n=w(this,"initialDeltaValue"),o=w(this,"finalDeltaValue"),i=w(this,"deltaBehavior"),a=w(this,"realDelta"),s;i==="change"?s=Math.abs(o-n)===Math.abs(e):s=a===Math.abs(e),this.assert(s,"expected "+r+" to "+i+" by "+e,"expected "+r+" to not "+i+" by "+e)}x(ff,"assertDelta");h.addMethod("by",ff);h.addProperty("extensible",function(){let e=w(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")});h.addProperty("sealed",function(){let e=w(this,"object"),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")});h.addProperty("frozen",function(){let e=w(this,"object"),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")});h.addProperty("finite",function(e){let t=w(this,"object");this.assert(typeof t=="number"&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number")});function fi(e,t){return e===t?!0:typeof t!=typeof e?!1:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(r){return t.some(function(n){return fi(r,n)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(r){let n=e[r],o=t[r];return typeof n=="object"&&n!==null&&o!==null?fi(n,o):typeof n=="function"?n(o):o===n}):!1}x(fi,"compareSubset");h.addMethod("containSubset",function(e){const t=U(this,"object"),r=ie.showDiff;this.assert(fi(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,r)});function Po(e,t){return new h(e,t)}x(Po,"expect");Po.fail=function(e,t,r,n){throw arguments.length<2&&(r=e,e=void 0),r=r||"expect.fail()",new G(r,{actual:e,expected:t,operator:n},Po.fail)};var pf={};_a(pf,{Should:()=>Hm,should:()=>Vm});function ls(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new h(this.valueOf(),null,e):new h(this,null,e)}x(e,"shouldGetter");function t(n){Object.defineProperty(this,"should",{value:n,enumerable:!0,configurable:!0,writable:!0})}x(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});let r={};return r.fail=function(n,o,i,a){throw arguments.length<2&&(i=n,n=void 0),i=i||"should.fail()",new G(i,{actual:n,expected:o,operator:a},r.fail)},r.equal=function(n,o,i){new h(n,i).to.equal(o)},r.Throw=function(n,o,i,a){new h(n,a).to.Throw(o,i)},r.exist=function(n,o){new h(n,o).to.exist},r.not={},r.not.equal=function(n,o,i){new h(n,i).to.not.equal(o)},r.not.Throw=function(n,o,i,a){new h(n,a).to.not.Throw(o,i)},r.not.exist=function(n,o){new h(n,o).to.not.exist},r.throw=r.Throw,r.not.throw=r.not.Throw,r}x(ls,"loadShould");var Vm=ls,Hm=ls;function m(e,t){new h(null,null,m,!0).assert(e,t,"[ negation message unavailable ]")}x(m,"assert");m.fail=function(e,t,r,n){throw arguments.length<2&&(r=e,e=void 0),r=r||"assert.fail()",new G(r,{actual:e,expected:t,operator:n},m.fail)};m.isOk=function(e,t){new h(e,t,m.isOk,!0).is.ok};m.isNotOk=function(e,t){new h(e,t,m.isNotOk,!0).is.not.ok};m.equal=function(e,t,r){let n=new h(e,r,m.equal,!0);n.assert(t==U(n,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)};m.notEqual=function(e,t,r){let n=new h(e,r,m.notEqual,!0);n.assert(t!=U(n,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)};m.strictEqual=function(e,t,r){new h(e,r,m.strictEqual,!0).to.equal(t)};m.notStrictEqual=function(e,t,r){new h(e,r,m.notStrictEqual,!0).to.not.equal(t)};m.deepEqual=m.deepStrictEqual=function(e,t,r){new h(e,r,m.deepEqual,!0).to.eql(t)};m.notDeepEqual=function(e,t,r){new h(e,r,m.notDeepEqual,!0).to.not.eql(t)};m.isAbove=function(e,t,r){new h(e,r,m.isAbove,!0).to.be.above(t)};m.isAtLeast=function(e,t,r){new h(e,r,m.isAtLeast,!0).to.be.least(t)};m.isBelow=function(e,t,r){new h(e,r,m.isBelow,!0).to.be.below(t)};m.isAtMost=function(e,t,r){new h(e,r,m.isAtMost,!0).to.be.most(t)};m.isTrue=function(e,t){new h(e,t,m.isTrue,!0).is.true};m.isNotTrue=function(e,t){new h(e,t,m.isNotTrue,!0).to.not.equal(!0)};m.isFalse=function(e,t){new h(e,t,m.isFalse,!0).is.false};m.isNotFalse=function(e,t){new h(e,t,m.isNotFalse,!0).to.not.equal(!1)};m.isNull=function(e,t){new h(e,t,m.isNull,!0).to.equal(null)};m.isNotNull=function(e,t){new h(e,t,m.isNotNull,!0).to.not.equal(null)};m.isNaN=function(e,t){new h(e,t,m.isNaN,!0).to.be.NaN};m.isNotNaN=function(e,t){new h(e,t,m.isNotNaN,!0).not.to.be.NaN};m.exists=function(e,t){new h(e,t,m.exists,!0).to.exist};m.notExists=function(e,t){new h(e,t,m.notExists,!0).to.not.exist};m.isUndefined=function(e,t){new h(e,t,m.isUndefined,!0).to.equal(void 0)};m.isDefined=function(e,t){new h(e,t,m.isDefined,!0).to.not.equal(void 0)};m.isCallable=function(e,t){new h(e,t,m.isCallable,!0).is.callable};m.isNotCallable=function(e,t){new h(e,t,m.isNotCallable,!0).is.not.callable};m.isObject=function(e,t){new h(e,t,m.isObject,!0).to.be.a("object")};m.isNotObject=function(e,t){new h(e,t,m.isNotObject,!0).to.not.be.a("object")};m.isArray=function(e,t){new h(e,t,m.isArray,!0).to.be.an("array")};m.isNotArray=function(e,t){new h(e,t,m.isNotArray,!0).to.not.be.an("array")};m.isString=function(e,t){new h(e,t,m.isString,!0).to.be.a("string")};m.isNotString=function(e,t){new h(e,t,m.isNotString,!0).to.not.be.a("string")};m.isNumber=function(e,t){new h(e,t,m.isNumber,!0).to.be.a("number")};m.isNotNumber=function(e,t){new h(e,t,m.isNotNumber,!0).to.not.be.a("number")};m.isNumeric=function(e,t){new h(e,t,m.isNumeric,!0).is.numeric};m.isNotNumeric=function(e,t){new h(e,t,m.isNotNumeric,!0).is.not.numeric};m.isFinite=function(e,t){new h(e,t,m.isFinite,!0).to.be.finite};m.isBoolean=function(e,t){new h(e,t,m.isBoolean,!0).to.be.a("boolean")};m.isNotBoolean=function(e,t){new h(e,t,m.isNotBoolean,!0).to.not.be.a("boolean")};m.typeOf=function(e,t,r){new h(e,r,m.typeOf,!0).to.be.a(t)};m.notTypeOf=function(e,t,r){new h(e,r,m.notTypeOf,!0).to.not.be.a(t)};m.instanceOf=function(e,t,r){new h(e,r,m.instanceOf,!0).to.be.instanceOf(t)};m.notInstanceOf=function(e,t,r){new h(e,r,m.notInstanceOf,!0).to.not.be.instanceOf(t)};m.include=function(e,t,r){new h(e,r,m.include,!0).include(t)};m.notInclude=function(e,t,r){new h(e,r,m.notInclude,!0).not.include(t)};m.deepInclude=function(e,t,r){new h(e,r,m.deepInclude,!0).deep.include(t)};m.notDeepInclude=function(e,t,r){new h(e,r,m.notDeepInclude,!0).not.deep.include(t)};m.nestedInclude=function(e,t,r){new h(e,r,m.nestedInclude,!0).nested.include(t)};m.notNestedInclude=function(e,t,r){new h(e,r,m.notNestedInclude,!0).not.nested.include(t)};m.deepNestedInclude=function(e,t,r){new h(e,r,m.deepNestedInclude,!0).deep.nested.include(t)};m.notDeepNestedInclude=function(e,t,r){new h(e,r,m.notDeepNestedInclude,!0).not.deep.nested.include(t)};m.ownInclude=function(e,t,r){new h(e,r,m.ownInclude,!0).own.include(t)};m.notOwnInclude=function(e,t,r){new h(e,r,m.notOwnInclude,!0).not.own.include(t)};m.deepOwnInclude=function(e,t,r){new h(e,r,m.deepOwnInclude,!0).deep.own.include(t)};m.notDeepOwnInclude=function(e,t,r){new h(e,r,m.notDeepOwnInclude,!0).not.deep.own.include(t)};m.match=function(e,t,r){new h(e,r,m.match,!0).to.match(t)};m.notMatch=function(e,t,r){new h(e,r,m.notMatch,!0).to.not.match(t)};m.property=function(e,t,r){new h(e,r,m.property,!0).to.have.property(t)};m.notProperty=function(e,t,r){new h(e,r,m.notProperty,!0).to.not.have.property(t)};m.propertyVal=function(e,t,r,n){new h(e,n,m.propertyVal,!0).to.have.property(t,r)};m.notPropertyVal=function(e,t,r,n){new h(e,n,m.notPropertyVal,!0).to.not.have.property(t,r)};m.deepPropertyVal=function(e,t,r,n){new h(e,n,m.deepPropertyVal,!0).to.have.deep.property(t,r)};m.notDeepPropertyVal=function(e,t,r,n){new h(e,n,m.notDeepPropertyVal,!0).to.not.have.deep.property(t,r)};m.ownProperty=function(e,t,r){new h(e,r,m.ownProperty,!0).to.have.own.property(t)};m.notOwnProperty=function(e,t,r){new h(e,r,m.notOwnProperty,!0).to.not.have.own.property(t)};m.ownPropertyVal=function(e,t,r,n){new h(e,n,m.ownPropertyVal,!0).to.have.own.property(t,r)};m.notOwnPropertyVal=function(e,t,r,n){new h(e,n,m.notOwnPropertyVal,!0).to.not.have.own.property(t,r)};m.deepOwnPropertyVal=function(e,t,r,n){new h(e,n,m.deepOwnPropertyVal,!0).to.have.deep.own.property(t,r)};m.notDeepOwnPropertyVal=function(e,t,r,n){new h(e,n,m.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,r)};m.nestedProperty=function(e,t,r){new h(e,r,m.nestedProperty,!0).to.have.nested.property(t)};m.notNestedProperty=function(e,t,r){new h(e,r,m.notNestedProperty,!0).to.not.have.nested.property(t)};m.nestedPropertyVal=function(e,t,r,n){new h(e,n,m.nestedPropertyVal,!0).to.have.nested.property(t,r)};m.notNestedPropertyVal=function(e,t,r,n){new h(e,n,m.notNestedPropertyVal,!0).to.not.have.nested.property(t,r)};m.deepNestedPropertyVal=function(e,t,r,n){new h(e,n,m.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,r)};m.notDeepNestedPropertyVal=function(e,t,r,n){new h(e,n,m.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,r)};m.lengthOf=function(e,t,r){new h(e,r,m.lengthOf,!0).to.have.lengthOf(t)};m.hasAnyKeys=function(e,t,r){new h(e,r,m.hasAnyKeys,!0).to.have.any.keys(t)};m.hasAllKeys=function(e,t,r){new h(e,r,m.hasAllKeys,!0).to.have.all.keys(t)};m.containsAllKeys=function(e,t,r){new h(e,r,m.containsAllKeys,!0).to.contain.all.keys(t)};m.doesNotHaveAnyKeys=function(e,t,r){new h(e,r,m.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)};m.doesNotHaveAllKeys=function(e,t,r){new h(e,r,m.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)};m.hasAnyDeepKeys=function(e,t,r){new h(e,r,m.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)};m.hasAllDeepKeys=function(e,t,r){new h(e,r,m.hasAllDeepKeys,!0).to.have.all.deep.keys(t)};m.containsAllDeepKeys=function(e,t,r){new h(e,r,m.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)};m.doesNotHaveAnyDeepKeys=function(e,t,r){new h(e,r,m.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)};m.doesNotHaveAllDeepKeys=function(e,t,r){new h(e,r,m.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)};m.throws=function(e,t,r,n){(typeof t=="string"||t instanceof RegExp)&&(r=t,t=null);let o=new h(e,n,m.throws,!0).to.throw(t,r);return U(o,"object")};m.doesNotThrow=function(e,t,r,n){(typeof t=="string"||t instanceof RegExp)&&(r=t,t=null),new h(e,n,m.doesNotThrow,!0).to.not.throw(t,r)};m.operator=function(e,t,r,n){let o;switch(t){case"==":o=e==r;break;case"===":o=e===r;break;case">":o=e>r;break;case">=":o=e>=r;break;case"<":o=e<r;break;case"<=":o=e<=r;break;case"!=":o=e!=r;break;case"!==":o=e!==r;break;default:throw n=n&&n+": ",new G(n+'Invalid operator "'+t+'"',void 0,m.operator)}let i=new h(o,n,m.operator,!0);i.assert(U(i,"object")===!0,"expected "+H(e)+" to be "+t+" "+H(r),"expected "+H(e)+" to not be "+t+" "+H(r))};m.closeTo=function(e,t,r,n){new h(e,n,m.closeTo,!0).to.be.closeTo(t,r)};m.approximately=function(e,t,r,n){new h(e,n,m.approximately,!0).to.be.approximately(t,r)};m.sameMembers=function(e,t,r){new h(e,r,m.sameMembers,!0).to.have.same.members(t)};m.notSameMembers=function(e,t,r){new h(e,r,m.notSameMembers,!0).to.not.have.same.members(t)};m.sameDeepMembers=function(e,t,r){new h(e,r,m.sameDeepMembers,!0).to.have.same.deep.members(t)};m.notSameDeepMembers=function(e,t,r){new h(e,r,m.notSameDeepMembers,!0).to.not.have.same.deep.members(t)};m.sameOrderedMembers=function(e,t,r){new h(e,r,m.sameOrderedMembers,!0).to.have.same.ordered.members(t)};m.notSameOrderedMembers=function(e,t,r){new h(e,r,m.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)};m.sameDeepOrderedMembers=function(e,t,r){new h(e,r,m.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)};m.notSameDeepOrderedMembers=function(e,t,r){new h(e,r,m.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)};m.includeMembers=function(e,t,r){new h(e,r,m.includeMembers,!0).to.include.members(t)};m.notIncludeMembers=function(e,t,r){new h(e,r,m.notIncludeMembers,!0).to.not.include.members(t)};m.includeDeepMembers=function(e,t,r){new h(e,r,m.includeDeepMembers,!0).to.include.deep.members(t)};m.notIncludeDeepMembers=function(e,t,r){new h(e,r,m.notIncludeDeepMembers,!0).to.not.include.deep.members(t)};m.includeOrderedMembers=function(e,t,r){new h(e,r,m.includeOrderedMembers,!0).to.include.ordered.members(t)};m.notIncludeOrderedMembers=function(e,t,r){new h(e,r,m.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)};m.includeDeepOrderedMembers=function(e,t,r){new h(e,r,m.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)};m.notIncludeDeepOrderedMembers=function(e,t,r){new h(e,r,m.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)};m.oneOf=function(e,t,r){new h(e,r,m.oneOf,!0).to.be.oneOf(t)};m.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${H(e)} to be an iterable`:`expected ${H(e)} to be an iterable`,new G(t,void 0,m.isIterable)};m.changes=function(e,t,r,n){arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.changes,!0).to.change(t,r)};m.changesBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.changesBy,!0).to.change(t,r).by(n)};m.doesNotChange=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.doesNotChange,!0).to.not.change(t,r)};m.changesButNotBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.changesButNotBy,!0).to.change(t,r).but.not.by(n)};m.increases=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.increases,!0).to.increase(t,r)};m.increasesBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.increasesBy,!0).to.increase(t,r).by(n)};m.doesNotIncrease=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.doesNotIncrease,!0).to.not.increase(t,r)};m.increasesButNotBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.increasesButNotBy,!0).to.increase(t,r).but.not.by(n)};m.decreases=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.decreases,!0).to.decrease(t,r)};m.decreasesBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.decreasesBy,!0).to.decrease(t,r).by(n)};m.doesNotDecrease=function(e,t,r,n){return arguments.length===3&&typeof t=="function"&&(n=r,r=null),new h(e,n,m.doesNotDecrease,!0).to.not.decrease(t,r)};m.doesNotDecreaseBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);return new h(e,o,m.doesNotDecreaseBy,!0).to.not.decrease(t,r).by(n)};m.decreasesButNotBy=function(e,t,r,n,o){if(arguments.length===4&&typeof t=="function"){let i=n;n=r,o=i}else arguments.length===3&&(n=r,r=null);new h(e,o,m.decreasesButNotBy,!0).to.decrease(t,r).but.not.by(n)};m.ifError=function(e){if(e)throw e};m.isExtensible=function(e,t){new h(e,t,m.isExtensible,!0).to.be.extensible};m.isNotExtensible=function(e,t){new h(e,t,m.isNotExtensible,!0).to.not.be.extensible};m.isSealed=function(e,t){new h(e,t,m.isSealed,!0).to.be.sealed};m.isNotSealed=function(e,t){new h(e,t,m.isNotSealed,!0).to.not.be.sealed};m.isFrozen=function(e,t){new h(e,t,m.isFrozen,!0).to.be.frozen};m.isNotFrozen=function(e,t){new h(e,t,m.isNotFrozen,!0).to.not.be.frozen};m.isEmpty=function(e,t){new h(e,t,m.isEmpty,!0).to.be.empty};m.isNotEmpty=function(e,t){new h(e,t,m.isNotEmpty,!0).to.not.be.empty};m.containsSubset=function(e,t,r){new h(e,r).to.containSubset(t)};m.doesNotContainSubset=function(e,t,r){new h(e,r).to.not.containSubset(t)};var Wm=[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]];for(const[e,t]of Wm)m[t]=m[e];var Ns=[];function mf(e){const t={use:mf,AssertionError:G,util:ai,config:ie,expect:Po,assert:m,Assertion:h,...pf};return~Ns.indexOf(e)||(e(t,ai),Ns.push(e)),t}x(mf,"use");function Gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Km=e=>{const t=new Map,r=[];for(const n of e)t.set(n.id,{...n,childrenNodes:[]});for(const n of t.values())n.parent?t.get(n.parent)?.childrenNodes?.push(n):r.push(n);return r},Ym={animation:"spin 1s linear infinite"},Xm=()=>B.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#364153",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle-icon lucide-loader-circle",style:Ym,"data-testid":"loader-icon",children:B.jsxRuntimeExports.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),zo=document.createElement("style");zo&&!document.getElementById("loader-spin-keyframes")&&(zo.id="loader-spin-keyframes",zo.innerHTML=`
3
3
  @keyframes spin {
4
4
  0% { transform: rotate(0deg); }
5
5
  100% { transform: rotate(360deg); }
@@ -8,7 +8,7 @@
8
8
  `)!==-1&&(_=f.spacingOuter+R+_+f.spacingOuter+c),_="{"+_+"}"),f.spacingInner+c+S.prop.open+p+S.prop.close+"="+S.value.open+_+S.value.close}).join("")};ce.printProps=r;const n=(l,u,f,c,d,b)=>l.map(v=>u.spacingOuter+f+(typeof v=="string"?o(v,u):b(v,u,f,c,d))).join("");ce.printChildren=n;const o=(l,u)=>{const f=u.colors.content;return f.open+(0,e.default)(l)+f.close};ce.printText=o;const i=(l,u)=>{const f=u.colors.comment;return f.open+"<!--"+(0,e.default)(l)+"-->"+f.close};ce.printComment=i;const a=(l,u,f,c,d)=>{const b=c.colors.tag;return b.open+"<"+l+(u&&b.close+u+c.spacingOuter+d+b.open)+(f?">"+b.close+f+c.spacingOuter+d+b.open+"</"+l:(u&&!c.min?"":" ")+"/")+">"+b.close};ce.printElement=a;const s=(l,u)=>{const f=u.colors.tag;return f.open+"<"+l+f.close+" …"+f.open+" />"+f.close};return ce.printElementAsLeaf=s,ce}var Vs;function Ih(){if(Vs)return Oe;Vs=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.test=Oe.serialize=Oe.default=void 0;var e=ps();const t=1,r=3,n=8,o=11,i=/^((HTML|SVG)\w*)?Element$/,a=R=>{try{return typeof R.hasAttribute=="function"&&R.hasAttribute("is")}catch{return!1}},s=R=>{const S=R.constructor.name,{nodeType:p,tagName:q}=R,_=typeof q=="string"&&q.includes("-")||a(R);return p===t&&(i.test(S)||_)||p===r&&S==="Text"||p===n&&S==="Comment"||p===o&&S==="DocumentFragment"},l=R=>{var S;return(R==null||(S=R.constructor)===null||S===void 0?void 0:S.name)&&s(R)};Oe.test=l;function u(R){return R.nodeType===r}function f(R){return R.nodeType===n}function c(R){return R.nodeType===o}const d=(R,S,p,q,_,T)=>{if(u(R))return(0,e.printText)(R.data,S);if(f(R))return(0,e.printComment)(R.data,S);const P=c(R)?"DocumentFragment":R.tagName.toLowerCase();return++q>S.maxDepth?(0,e.printElementAsLeaf)(P,S):(0,e.printElement)(P,(0,e.printProps)(c(R)?[]:Array.from(R.attributes).map(y=>y.name).sort(),c(R)?{}:Array.from(R.attributes).reduce((y,g)=>(y[g.name]=g.value,y),{}),S,p+S.indent,q,_,T),(0,e.printChildren)(Array.prototype.slice.call(R.childNodes||R.children),S,p+S.indent,q,_,T),S,p)};Oe.serialize=d;var v={serialize:d,test:l};return Oe.default=v,Oe}var Ie={},Hs;function Nh(){if(Hs)return Ie;Hs=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.test=Ie.serialize=Ie.default=void 0;var e=Ii();const t="@@__IMMUTABLE_ITERABLE__@@",r="@@__IMMUTABLE_LIST__@@",n="@@__IMMUTABLE_KEYED__@@",o="@@__IMMUTABLE_MAP__@@",i="@@__IMMUTABLE_ORDERED__@@",a="@@__IMMUTABLE_RECORD__@@",s="@@__IMMUTABLE_SEQ__@@",l="@@__IMMUTABLE_SET__@@",u="@@__IMMUTABLE_STACK__@@",f=g=>"Immutable."+g,c=g=>"["+g+"]",d=" ",b="…",v=(g,E,M,N,j,D,A)=>++N>E.maxDepth?c(f(A)):f(A)+d+"{"+(0,e.printIteratorEntries)(g.entries(),E,M,N,j,D)+"}";function R(g){let E=0;return{next(){if(E<g._keys.length){const M=g._keys[E++];return{done:!1,value:[M,g.get(M)]}}return{done:!0,value:void 0}}}}const S=(g,E,M,N,j,D)=>{const A=f(g._name||"Record");return++N>E.maxDepth?c(A):A+d+"{"+(0,e.printIteratorEntries)(R(g),E,M,N,j,D)+"}"},p=(g,E,M,N,j,D)=>{const A=f("Seq");return++N>E.maxDepth?c(A):g[n]?A+d+"{"+(g._iter||g._object?(0,e.printIteratorEntries)(g.entries(),E,M,N,j,D):b)+"}":A+d+"["+(g._iter||g._array||g._collection||g._iterable?(0,e.printIteratorValues)(g.values(),E,M,N,j,D):b)+"]"},q=(g,E,M,N,j,D,A)=>++N>E.maxDepth?c(f(A)):f(A)+d+"["+(0,e.printIteratorValues)(g.values(),E,M,N,j,D)+"]",_=(g,E,M,N,j,D)=>g[o]?v(g,E,M,N,j,D,g[i]?"OrderedMap":"Map"):g[r]?q(g,E,M,N,j,D,"List"):g[l]?q(g,E,M,N,j,D,g[i]?"OrderedSet":"Set"):g[u]?q(g,E,M,N,j,D,"Stack"):g[s]?p(g,E,M,N,j,D):S(g,E,M,N,j,D);Ie.serialize=_;const T=g=>g&&(g[t]===!0||g[a]===!0);Ie.test=T;var y={serialize:_,test:T};return Ie.default=y,Ie}var Ne={},Wo={exports:{}},X={};var Ws;function kh(){if(Ws)return X;Ws=1;var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,a=60110,s=60112,l=60113,u=60120,f=60115,c=60116,d=60121,b=60122,v=60117,R=60129,S=60131;if(typeof Symbol=="function"&&Symbol.for){var p=Symbol.for;e=p("react.element"),t=p("react.portal"),r=p("react.fragment"),n=p("react.strict_mode"),o=p("react.profiler"),i=p("react.provider"),a=p("react.context"),s=p("react.forward_ref"),l=p("react.suspense"),u=p("react.suspense_list"),f=p("react.memo"),c=p("react.lazy"),d=p("react.block"),b=p("react.server.block"),v=p("react.fundamental"),R=p("react.debug_trace_mode"),S=p("react.legacy_hidden")}function q(A){if(typeof A=="object"&&A!==null){var k=A.$$typeof;switch(k){case e:switch(A=A.type,A){case r:case o:case n:case l:case u:return A;default:switch(A=A&&A.$$typeof,A){case a:case s:case c:case f:case i:return A;default:return k}}case t:return k}}}var _=i,T=e,P=s,y=r,g=c,E=f,M=t,N=o,j=n,D=l;return X.ContextConsumer=a,X.ContextProvider=_,X.Element=T,X.ForwardRef=P,X.Fragment=y,X.Lazy=g,X.Memo=E,X.Portal=M,X.Profiler=N,X.StrictMode=j,X.Suspense=D,X.isAsyncMode=function(){return!1},X.isConcurrentMode=function(){return!1},X.isContextConsumer=function(A){return q(A)===a},X.isContextProvider=function(A){return q(A)===i},X.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===e},X.isForwardRef=function(A){return q(A)===s},X.isFragment=function(A){return q(A)===r},X.isLazy=function(A){return q(A)===c},X.isMemo=function(A){return q(A)===f},X.isPortal=function(A){return q(A)===t},X.isProfiler=function(A){return q(A)===o},X.isStrictMode=function(A){return q(A)===n},X.isSuspense=function(A){return q(A)===l},X.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===r||A===o||A===R||A===n||A===l||A===u||A===S||typeof A=="object"&&A!==null&&(A.$$typeof===c||A.$$typeof===f||A.$$typeof===i||A.$$typeof===a||A.$$typeof===s||A.$$typeof===v||A.$$typeof===d||A[0]===b)},X.typeOf=q,X}var J={};var Gs;function jh(){return Gs||(Gs=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,r=60107,n=60108,o=60114,i=60109,a=60110,s=60112,l=60113,u=60120,f=60115,c=60116,d=60121,b=60122,v=60117,R=60129,S=60131;if(typeof Symbol=="function"&&Symbol.for){var p=Symbol.for;e=p("react.element"),t=p("react.portal"),r=p("react.fragment"),n=p("react.strict_mode"),o=p("react.profiler"),i=p("react.provider"),a=p("react.context"),s=p("react.forward_ref"),l=p("react.suspense"),u=p("react.suspense_list"),f=p("react.memo"),c=p("react.lazy"),d=p("react.block"),b=p("react.server.block"),v=p("react.fundamental"),p("react.scope"),p("react.opaque.id"),R=p("react.debug_trace_mode"),p("react.offscreen"),S=p("react.legacy_hidden")}var q=!1;function _(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===o||O===R||O===n||O===l||O===u||O===S||q||typeof O=="object"&&O!==null&&(O.$$typeof===c||O.$$typeof===f||O.$$typeof===i||O.$$typeof===a||O.$$typeof===s||O.$$typeof===v||O.$$typeof===d||O[0]===b))}function T(O){if(typeof O=="object"&&O!==null){var W=O.$$typeof;switch(W){case e:var V=O.type;switch(V){case r:case o:case n:case l:case u:return V;default:var re=V&&V.$$typeof;switch(re){case a:case s:case c:case f:case i:return re;default:return W}}case t:return W}}}var P=a,y=i,g=e,E=s,M=r,N=c,j=f,D=t,A=o,k=n,F=l,Z=!1,Y=!1;function le(O){return Z||(Z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ye(O){return Y||(Y=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function tt(O){return T(O)===a}function ze(O){return T(O)===i}function Ve(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function L(O){return T(O)===s}function He(O){return T(O)===r}function rt(O){return T(O)===c}function ge(O){return T(O)===f}function St(O){return T(O)===t}function At(O){return T(O)===o}function C(O){return T(O)===n}function $(O){return T(O)===l}J.ContextConsumer=P,J.ContextProvider=y,J.Element=g,J.ForwardRef=E,J.Fragment=M,J.Lazy=N,J.Memo=j,J.Portal=D,J.Profiler=A,J.StrictMode=k,J.Suspense=F,J.isAsyncMode=le,J.isConcurrentMode=ye,J.isContextConsumer=tt,J.isContextProvider=ze,J.isElement=Ve,J.isForwardRef=L,J.isFragment=He,J.isLazy=rt,J.isMemo=ge,J.isPortal=St,J.isProfiler=At,J.isStrictMode=C,J.isSuspense=$,J.isValidElementType=_,J.typeOf=T})()),J}var Ks;function Dh(){return Ks||(Ks=1,process.env.NODE_ENV==="production"?Wo.exports=kh():Wo.exports=jh()),Wo.exports}var Ys;function $h(){if(Ys)return Ne;Ys=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.test=Ne.serialize=Ne.default=void 0;var e=n(Dh()),t=ps();function r(c){if(typeof WeakMap!="function")return null;var d=new WeakMap,b=new WeakMap;return(r=function(v){return v?b:d})(c)}function n(c,d){if(c&&c.__esModule)return c;if(c===null||typeof c!="object"&&typeof c!="function")return{default:c};var b=r(d);if(b&&b.has(c))return b.get(c);var v={},R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in c)if(S!=="default"&&Object.prototype.hasOwnProperty.call(c,S)){var p=R?Object.getOwnPropertyDescriptor(c,S):null;p&&(p.get||p.set)?Object.defineProperty(v,S,p):v[S]=c[S]}return v.default=c,b&&b.set(c,v),v}const o=(c,d=[])=>(Array.isArray(c)?c.forEach(b=>{o(b,d)}):c!=null&&c!==!1&&d.push(c),d),i=c=>{const d=c.type;if(typeof d=="string")return d;if(typeof d=="function")return d.displayName||d.name||"Unknown";if(e.isFragment(c))return"React.Fragment";if(e.isSuspense(c))return"React.Suspense";if(typeof d=="object"&&d!==null){if(e.isContextProvider(c))return"Context.Provider";if(e.isContextConsumer(c))return"Context.Consumer";if(e.isForwardRef(c)){if(d.displayName)return d.displayName;const b=d.render.displayName||d.render.name||"";return b!==""?"ForwardRef("+b+")":"ForwardRef"}if(e.isMemo(c)){const b=d.displayName||d.type.displayName||d.type.name||"";return b!==""?"Memo("+b+")":"Memo"}}return"UNDEFINED"},a=c=>{const{props:d}=c;return Object.keys(d).filter(b=>b!=="children"&&d[b]!==void 0).sort()},s=(c,d,b,v,R,S)=>++v>d.maxDepth?(0,t.printElementAsLeaf)(i(c),d):(0,t.printElement)(i(c),(0,t.printProps)(a(c),c.props,d,b+d.indent,v,R,S),(0,t.printChildren)(o(c.props.children),d,b+d.indent,v,R,S),d,b);Ne.serialize=s;const l=c=>c!=null&&e.isElement(c);Ne.test=l;var f={serialize:s,test:l};return Ne.default=f,Ne}var ke={},Xs;function Bh(){if(Xs)return ke;Xs=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.test=ke.serialize=ke.default=void 0;var e=ps(),t=(function(){return typeof globalThis<"u"?globalThis:typeof t<"u"?t:typeof self<"u"?self:typeof window<"u"?window:Function("return this")()})(),r=t["jest-symbol-do-not-touch"]||t.Symbol;const n=typeof r=="function"&&r.for?r.for("react.test.json"):245830487,o=u=>{const{props:f}=u;return f?Object.keys(f).filter(c=>f[c]!==void 0).sort():[]},i=(u,f,c,d,b,v)=>++d>f.maxDepth?(0,e.printElementAsLeaf)(u.type,f):(0,e.printElement)(u.type,u.props?(0,e.printProps)(o(u),u.props,f,c+f.indent,d,b,v):"",u.children?(0,e.printChildren)(u.children,f,c+f.indent,d,b,v):"",f,c);ke.serialize=i;const a=u=>u&&u.$$typeof===n;ke.test=a;var l={serialize:i,test:a};return ke.default=l,ke}var Js;function Lh(){if(Js)return xe;Js=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.default=xe.DEFAULT_OPTIONS=void 0,xe.format=ge,xe.plugins=void 0;var e=u(Pf()),t=Ii(),r=u(Th()),n=u(Ah()),o=u(Mh()),i=u(Ih()),a=u(Nh()),s=u($h()),l=u(Bh());function u(C){return C&&C.__esModule?C:{default:C}}const f=Object.prototype.toString,c=Date.prototype.toISOString,d=Error.prototype.toString,b=RegExp.prototype.toString,v=C=>typeof C.constructor=="function"&&C.constructor.name||"Object",R=C=>typeof window<"u"&&C===window,S=/^Symbol\((.*)\)(.*)$/,p=/\n/gi;class q extends Error{constructor($,O){super($),this.stack=O,this.name=this.constructor.name}}function _(C){return C==="[object Array]"||C==="[object ArrayBuffer]"||C==="[object DataView]"||C==="[object Float32Array]"||C==="[object Float64Array]"||C==="[object Int8Array]"||C==="[object Int16Array]"||C==="[object Int32Array]"||C==="[object Uint8Array]"||C==="[object Uint8ClampedArray]"||C==="[object Uint16Array]"||C==="[object Uint32Array]"}function T(C){return Object.is(C,-0)?"-0":String(C)}function P(C){return`${C}n`}function y(C,$){return $?"[Function "+(C.name||"anonymous")+"]":"[Function]"}function g(C){return String(C).replace(S,"Symbol($1)")}function E(C){return"["+d.call(C)+"]"}function M(C,$,O,W){if(C===!0||C===!1)return""+C;if(C===void 0)return"undefined";if(C===null)return"null";const V=typeof C;if(V==="number")return T(C);if(V==="bigint")return P(C);if(V==="string")return W?'"'+C.replace(/"|\\/g,"\\$&")+'"':'"'+C+'"';if(V==="function")return y(C,$);if(V==="symbol")return g(C);const re=f.call(C);return re==="[object WeakMap]"?"WeakMap {}":re==="[object WeakSet]"?"WeakSet {}":re==="[object Function]"||re==="[object GeneratorFunction]"?y(C,$):re==="[object Symbol]"?g(C):re==="[object Date]"?isNaN(+C)?"Date { NaN }":c.call(C):re==="[object Error]"?E(C):re==="[object RegExp]"?O?b.call(C).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&"):b.call(C):C instanceof Error?E(C):null}function N(C,$,O,W,V,re){if(V.indexOf(C)!==-1)return"[Circular]";V=V.slice(),V.push(C);const oe=++W>$.maxDepth,ue=$.min;if($.callToJSON&&!oe&&C.toJSON&&typeof C.toJSON=="function"&&!re)return k(C.toJSON(),$,O,W,V,!0);const Te=f.call(C);return Te==="[object Arguments]"?oe?"[Arguments]":(ue?"":"Arguments ")+"["+(0,t.printListItems)(C,$,O,W,V,k)+"]":_(Te)?oe?"["+C.constructor.name+"]":(ue||!$.printBasicPrototype&&C.constructor.name==="Array"?"":C.constructor.name+" ")+"["+(0,t.printListItems)(C,$,O,W,V,k)+"]":Te==="[object Map]"?oe?"[Map]":"Map {"+(0,t.printIteratorEntries)(C.entries(),$,O,W,V,k," => ")+"}":Te==="[object Set]"?oe?"[Set]":"Set {"+(0,t.printIteratorValues)(C.values(),$,O,W,V,k)+"}":oe||R(C)?"["+v(C)+"]":(ue||!$.printBasicPrototype&&v(C)==="Object"?"":v(C)+" ")+"{"+(0,t.printObjectProperties)(C,$,O,W,V,k)+"}"}function j(C){return C.serialize!=null}function D(C,$,O,W,V,re){let oe;try{oe=j(C)?C.serialize($,O,W,V,re,k):C.print($,ue=>k(ue,O,W,V,re),ue=>{const Te=W+O.indent;return Te+ue.replace(p,`
9
9
  `+Te)},{edgeSpacing:O.spacingOuter,min:O.min,spacing:O.spacingInner},O.colors)}catch(ue){throw new q(ue.message,ue.stack)}if(typeof oe!="string")throw new Error(`pretty-format: Plugin must return type "string" but instead returned "${typeof oe}".`);return oe}function A(C,$){for(let O=0;O<C.length;O++)try{if(C[O].test($))return C[O]}catch(W){throw new q(W.message,W.stack)}return null}function k(C,$,O,W,V,re){const oe=A($.plugins,C);if(oe!==null)return D(oe,C,$,O,W,V);const ue=M(C,$.printFunctionName,$.escapeRegex,$.escapeString);return ue!==null?ue:N(C,$,O,W,V,re)}const F={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},Z=Object.keys(F),Y={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:F};xe.DEFAULT_OPTIONS=Y;function le(C){if(Object.keys(C).forEach($=>{if(!Y.hasOwnProperty($))throw new Error(`pretty-format: Unknown option "${$}".`)}),C.min&&C.indent!==void 0&&C.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(C.theme!==void 0){if(C.theme===null)throw new Error('pretty-format: Option "theme" must not be null.');if(typeof C.theme!="object")throw new Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof C.theme}".`)}}const ye=C=>Z.reduce(($,O)=>{const W=C.theme&&C.theme[O]!==void 0?C.theme[O]:F[O],V=W&&e.default[W];if(V&&typeof V.close=="string"&&typeof V.open=="string")$[O]=V;else throw new Error(`pretty-format: Option "theme" has a key "${O}" whose value "${W}" is undefined in ansi-styles.`);return $},Object.create(null)),tt=()=>Z.reduce((C,$)=>(C[$]={close:"",open:""},C),Object.create(null)),ze=C=>C&&C.printFunctionName!==void 0?C.printFunctionName:Y.printFunctionName,Ve=C=>C&&C.escapeRegex!==void 0?C.escapeRegex:Y.escapeRegex,L=C=>C&&C.escapeString!==void 0?C.escapeString:Y.escapeString,He=C=>{var $;return{callToJSON:C&&C.callToJSON!==void 0?C.callToJSON:Y.callToJSON,colors:C&&C.highlight?ye(C):tt(),compareKeys:C&&typeof C.compareKeys=="function"?C.compareKeys:Y.compareKeys,escapeRegex:Ve(C),escapeString:L(C),indent:C&&C.min?"":rt(C&&C.indent!==void 0?C.indent:Y.indent),maxDepth:C&&C.maxDepth!==void 0?C.maxDepth:Y.maxDepth,min:C&&C.min!==void 0?C.min:Y.min,plugins:C&&C.plugins!==void 0?C.plugins:Y.plugins,printBasicPrototype:($=C?.printBasicPrototype)!==null&&$!==void 0?$:!0,printFunctionName:ze(C),spacingInner:C&&C.min?" ":`
10
10
  `,spacingOuter:C&&C.min?"":`
11
- `}};function rt(C){return new Array(C+1).join(" ")}function ge(C,$){if($&&(le($),$.plugins)){const W=A($.plugins,C);if(W!==null)return D(W,C,He($),"",0,[])}const O=M(C,ze($),Ve($),L($));return O!==null?O:N(C,He($),"",0,[])}const St={AsymmetricMatcher:r.default,ConvertAnsi:n.default,DOMCollection:o.default,DOMElement:i.default,Immutable:a.default,ReactElement:s.default,ReactTestComponent:l.default};xe.plugins=St;var At=ge;return xe.default=At,xe}var Tf=Lh(),Fh=Object.prototype.toString;function Uh(e){return typeof e=="function"||Fh.call(e)==="[object Function]"}function zh(e){var t=Number(e);return isNaN(t)?0:t===0||!isFinite(t)?t:(t>0?1:-1)*Math.floor(Math.abs(t))}var Vh=Math.pow(2,53)-1;function Hh(e){var t=zh(e);return Math.min(Math.max(t,0),Vh)}function we(e,t){var r=Array,n=Object(e);if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");for(var o=Hh(n.length),i=Uh(r)?Object(new r(o)):new Array(o),a=0,s;a<o;)s=n[a],i[a]=s,a+=1;return i.length=o,i}function So(e){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},So(e)}function Wh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sf(n.key),n)}}function Kh(e,t,r){return t&&Gh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yh(e,t,r){return t=Sf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sf(e){var t=Xh(e,"string");return So(t)==="symbol"?t:String(t)}function Xh(e,t){if(So(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(So(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jh=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Wh(this,e),Yh(this,"items",void 0),this.items=t}return Kh(e,[{key:"add",value:function(r){return this.has(r)===!1&&this.items.push(r),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(r){var n=this.items.length;return this.items=this.items.filter(function(o){return o!==r}),n!==this.items.length}},{key:"forEach",value:function(r){var n=this;this.items.forEach(function(o){r(o,o,n)})}},{key:"has",value:function(r){return this.items.indexOf(r)!==-1}},{key:"size",get:function(){return this.items.length}}]),e})();const Qh=typeof Set>"u"?Set:Jh;function ae(e){var t;return(t=e.localName)!==null&&t!==void 0?t:e.tagName.toLowerCase()}var Zh={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},eb={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function tb(e,t){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(r){var n;return e.hasAttribute(r)&&!((n=eb[t])!==null&&n!==void 0&&n.has(r))})}function Af(e,t){return tb(e,t)}function rb(e){var t=ob(e);if(t===null||t==="presentation"){var r=nb(e);if(t!=="presentation"||Af(e,r||""))return r}return t}function nb(e){var t=Zh[ae(e)];if(t!==void 0)return t;switch(ae(e)){case"a":case"area":case"link":if(e.hasAttribute("href"))return"link";break;case"img":return e.getAttribute("alt")===""&&!Af(e,"img")?"presentation":"img";case"input":{var r=e,n=r.type;switch(n){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return n;case"range":return"slider";case"email":case"tel":case"text":case"url":return e.hasAttribute("list")?"combobox":"textbox";case"search":return e.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}}case"select":return e.hasAttribute("multiple")||e.size>1?"listbox":"combobox"}return null}function ob(e){var t=e.getAttribute("role");if(t!==null){var r=t.trim().split(" ")[0];if(r.length>0)return r}return null}function ee(e){return e!==null&&e.nodeType===e.ELEMENT_NODE}function Mf(e){return ee(e)&&ae(e)==="caption"}function ei(e){return ee(e)&&ae(e)==="input"}function ib(e){return ee(e)&&ae(e)==="optgroup"}function ab(e){return ee(e)&&ae(e)==="select"}function sb(e){return ee(e)&&ae(e)==="table"}function lb(e){return ee(e)&&ae(e)==="textarea"}function ub(e){var t=e.ownerDocument===null?e:e.ownerDocument,r=t.defaultView;if(r===null)throw new TypeError("no window available");return r}function cb(e){return ee(e)&&ae(e)==="fieldset"}function db(e){return ee(e)&&ae(e)==="legend"}function fb(e){return ee(e)&&ae(e)==="slot"}function pb(e){return ee(e)&&e.ownerSVGElement!==void 0}function mb(e){return ee(e)&&ae(e)==="svg"}function hb(e){return pb(e)&&ae(e)==="title"}function mi(e,t){if(ee(e)&&e.hasAttribute(t)){var r=e.getAttribute(t).split(" "),n=e.getRootNode?e.getRootNode():e.ownerDocument;return r.map(function(o){return n.getElementById(o)}).filter(function(o){return o!==null})}return[]}function De(e,t){return ee(e)?t.indexOf(rb(e))!==-1:!1}function bb(e){return e.trim().replace(/\s\s+/g," ")}function vb(e,t){if(!ee(e))return!1;if(e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true")return!0;var r=t(e);return r.getPropertyValue("display")==="none"||r.getPropertyValue("visibility")==="hidden"}function yb(e){return De(e,["button","combobox","listbox","textbox"])||Of(e,"range")}function Of(e,t){if(!ee(e))return!1;switch(t){case"range":return De(e,["meter","progressbar","scrollbar","slider","spinbutton"]);default:throw new TypeError("No knowledge about abstract role '".concat(t,"'. This is likely a bug :("))}}function Qs(e,t){var r=we(e.querySelectorAll(t));return mi(e,"aria-owns").forEach(function(n){r.push.apply(r,we(n.querySelectorAll(t)))}),r}function gb(e){return ab(e)?e.selectedOptions||Qs(e,"[selected]"):Qs(e,'[aria-selected="true"]')}function Rb(e){return De(e,["none","presentation"])}function wb(e){return Mf(e)}function Eb(e){return De(e,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function xb(e){return!1}function Cb(e){return ei(e)||lb(e)?e.value:e.textContent||""}function Zs(e){var t=e.getPropertyValue("content");return/^["'].*["']$/.test(t)?t.slice(1,-1):""}function If(e){var t=ae(e);return t==="button"||t==="input"&&e.getAttribute("type")!=="hidden"||t==="meter"||t==="output"||t==="progress"||t==="select"||t==="textarea"}function Nf(e){if(If(e))return e;var t=null;return e.childNodes.forEach(function(r){if(t===null&&ee(r)){var n=Nf(r);n!==null&&(t=n)}}),t}function qb(e){if(e.control!==void 0)return e.control;var t=e.getAttribute("for");return t!==null?e.ownerDocument.getElementById(t):Nf(e)}function _b(e){var t=e.labels;if(t===null)return t;if(t!==void 0)return we(t);if(!If(e))return null;var r=e.ownerDocument;return we(r.querySelectorAll("label")).filter(function(n){return qb(n)===e})}function Pb(e){var t=e.assignedNodes();return t.length===0?we(e.childNodes):t}function kf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new Qh,n=ub(e),o=t.compute,i=o===void 0?"name":o,a=t.computedStyleSupportsPseudoElements,s=a===void 0?t.getComputedStyle!==void 0:a,l=t.getComputedStyle,u=l===void 0?n.getComputedStyle.bind(n):l,f=t.hidden,c=f===void 0?!1:f;function d(p,q){var _="";if(ee(p)&&s){var T=u(p,"::before"),P=Zs(T);_="".concat(P," ").concat(_)}var y=fb(p)?Pb(p):we(p.childNodes).concat(mi(p,"aria-owns"));if(y.forEach(function(M){var N=S(M,{isEmbeddedInLabel:q.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),j=ee(M)?u(M).getPropertyValue("display"):"inline",D=j!=="inline"?" ":"";_+="".concat(D).concat(N).concat(D)}),ee(p)&&s){var g=u(p,"::after"),E=Zs(g);_="".concat(_," ").concat(E)}return _.trim()}function b(p,q){var _=p.getAttributeNode(q);return _!==null&&!r.has(_)&&_.value.trim()!==""?(r.add(_),_.value):null}function v(p){return ee(p)?b(p,"title"):null}function R(p){if(!ee(p))return null;if(cb(p)){r.add(p);for(var q=we(p.childNodes),_=0;_<q.length;_+=1){var T=q[_];if(db(T))return S(T,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(sb(p)){r.add(p);for(var P=we(p.childNodes),y=0;y<P.length;y+=1){var g=P[y];if(Mf(g))return S(g,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(mb(p)){r.add(p);for(var E=we(p.childNodes),M=0;M<E.length;M+=1){var N=E[M];if(hb(N))return N.textContent}return null}else if(ae(p)==="img"||ae(p)==="area"){var j=b(p,"alt");if(j!==null)return j}else if(ib(p)){var D=b(p,"label");if(D!==null)return D}if(ei(p)&&(p.type==="button"||p.type==="submit"||p.type==="reset")){var A=b(p,"value");if(A!==null)return A;if(p.type==="submit")return"Submit";if(p.type==="reset")return"Reset"}var k=_b(p);if(k!==null&&k.length!==0)return r.add(p),we(k).map(function(le){return S(le,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(le){return le.length>0}).join(" ");if(ei(p)&&p.type==="image"){var F=b(p,"alt");if(F!==null)return F;var Z=b(p,"title");return Z!==null?Z:"Submit Query"}if(De(p,["button"])){var Y=d(p,{isEmbeddedInLabel:!1});if(Y!=="")return Y}return null}function S(p,q){if(r.has(p))return"";if(!c&&vb(p,u)&&!q.isReferenced)return r.add(p),"";var _=ee(p)?p.getAttributeNode("aria-labelledby"):null,T=_!==null&&!r.has(_)?mi(p,"aria-labelledby"):[];if(i==="name"&&!q.isReferenced&&T.length>0)return r.add(_),T.map(function(j){return S(j,{isEmbeddedInLabel:q.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var P=q.recursion&&yb(p)&&i==="name";if(!P){var y=(ee(p)&&p.getAttribute("aria-label")||"").trim();if(y!==""&&i==="name")return r.add(p),y;if(!Rb(p)){var g=R(p);if(g!==null)return r.add(p),g}}if(De(p,["menu"]))return r.add(p),"";if(P||q.isEmbeddedInLabel||q.isReferenced){if(De(p,["combobox","listbox"])){r.add(p);var E=gb(p);return E.length===0?ei(p)?p.value:"":we(E).map(function(j){return S(j,{isEmbeddedInLabel:q.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(Of(p,"range"))return r.add(p),p.hasAttribute("aria-valuetext")?p.getAttribute("aria-valuetext"):p.hasAttribute("aria-valuenow")?p.getAttribute("aria-valuenow"):p.getAttribute("value")||"";if(De(p,["textbox"]))return r.add(p),Cb(p)}if(Eb(p)||ee(p)&&q.isReferenced||wb(p)||xb()){var M=d(p,{isEmbeddedInLabel:q.isEmbeddedInLabel});if(M!=="")return r.add(p),M}if(p.nodeType===p.TEXT_NODE)return r.add(p),p.textContent||"";if(q.recursion)return r.add(p),d(p,{isEmbeddedInLabel:q.isEmbeddedInLabel});var N=v(p);return N!==null?(r.add(p),N):(r.add(p),"")}return bb(S(e,{isEmbeddedInLabel:!1,isReferenced:i==="description",recursion:!1}))}function Ao(e){"@babel/helpers - typeof";return Ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ao(e)}function el(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?el(Object(r),!0).forEach(function(n){Tb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):el(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tb(e,t,r){return t=Sb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sb(e){var t=Ab(e,"string");return Ao(t)==="symbol"?t:String(t)}function Ab(e,t){if(Ao(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ao(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=mi(e,"aria-describedby").map(function(o){return kf(o,tl(tl({},t),{},{compute:"description"}))}).join(" ");if(r===""){var n=e.getAttribute("title");r=n===null?"":n}return r}function Mb(e){return De(e,["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])}function ms(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Mb(e)?"":kf(e,t)}var de={},Mt={},Go={},Ot={},rl;function Ob(){if(rl)return Ot;rl=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.default=void 0;function e(){var r=this,n=0,o={"@@iterator":function(){return o},next:function(){if(n<r.length){var a=r[n];return n=n+1,{done:!1,value:a}}else return{done:!0}}};return o}var t=e;return Ot.default=t,Ot}var nl;function Lo(){if(nl)return Go;nl=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.default=n;var e=t(Ob());function t(o){return o&&o.__esModule?o:{default:o}}function r(o){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},r(o)}function n(o,i){return typeof Symbol=="function"&&r(Symbol.iterator)==="symbol"&&Object.defineProperty(o,Symbol.iterator,{value:e.default.bind(i)}),o}return Go}var ol;function Ib(){if(ol)return Mt;ol=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.default=void 0;var e=t(Lo());function t(d){return d&&d.__esModule?d:{default:d}}function r(d,b){return i(d)||o(d,b)||s(d,b)||n()}function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11
+ `}};function rt(C){return new Array(C+1).join(" ")}function ge(C,$){if($&&(le($),$.plugins)){const W=A($.plugins,C);if(W!==null)return D(W,C,He($),"",0,[])}const O=M(C,ze($),Ve($),L($));return O!==null?O:N(C,He($),"",0,[])}const St={AsymmetricMatcher:r.default,ConvertAnsi:n.default,DOMCollection:o.default,DOMElement:i.default,Immutable:a.default,ReactElement:s.default,ReactTestComponent:l.default};xe.plugins=St;var At=ge;return xe.default=At,xe}var Tf=Lh(),Fh=Object.prototype.toString;function Uh(e){return typeof e=="function"||Fh.call(e)==="[object Function]"}function zh(e){var t=Number(e);return isNaN(t)?0:t===0||!isFinite(t)?t:(t>0?1:-1)*Math.floor(Math.abs(t))}var Vh=Math.pow(2,53)-1;function Hh(e){var t=zh(e);return Math.min(Math.max(t,0),Vh)}function we(e,t){var r=Array,n=Object(e);if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");for(var o=Hh(n.length),i=Uh(r)?Object(new r(o)):new Array(o),a=0,s;a<o;)s=n[a],i[a]=s,a+=1;return i.length=o,i}function So(e){"@babel/helpers - typeof";return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},So(e)}function Wh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Sf(n.key),n)}}function Kh(e,t,r){return t&&Gh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yh(e,t,r){return t=Sf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sf(e){var t=Xh(e,"string");return So(t)==="symbol"?t:String(t)}function Xh(e,t){if(So(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(So(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jh=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Wh(this,e),Yh(this,"items",void 0),this.items=t}return Kh(e,[{key:"add",value:function(r){return this.has(r)===!1&&this.items.push(r),this}},{key:"clear",value:function(){this.items=[]}},{key:"delete",value:function(r){var n=this.items.length;return this.items=this.items.filter(function(o){return o!==r}),n!==this.items.length}},{key:"forEach",value:function(r){var n=this;this.items.forEach(function(o){r(o,o,n)})}},{key:"has",value:function(r){return this.items.indexOf(r)!==-1}},{key:"size",get:function(){return this.items.length}}]),e})();const Qh=typeof Set>"u"?Set:Jh;function ae(e){var t;return(t=e.localName)!==null&&t!==void 0?t:e.tagName.toLowerCase()}var Zh={article:"article",aside:"complementary",button:"button",datalist:"listbox",dd:"definition",details:"group",dialog:"dialog",dt:"term",fieldset:"group",figure:"figure",form:"form",footer:"contentinfo",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",header:"banner",hr:"separator",html:"document",legend:"legend",li:"listitem",math:"math",main:"main",menu:"list",nav:"navigation",ol:"list",optgroup:"group",option:"option",output:"status",progress:"progressbar",section:"region",summary:"button",table:"table",tbody:"rowgroup",textarea:"textbox",tfoot:"rowgroup",td:"cell",th:"columnheader",thead:"rowgroup",tr:"row",ul:"list"},eb={caption:new Set(["aria-label","aria-labelledby"]),code:new Set(["aria-label","aria-labelledby"]),deletion:new Set(["aria-label","aria-labelledby"]),emphasis:new Set(["aria-label","aria-labelledby"]),generic:new Set(["aria-label","aria-labelledby","aria-roledescription"]),insertion:new Set(["aria-label","aria-labelledby"]),paragraph:new Set(["aria-label","aria-labelledby"]),presentation:new Set(["aria-label","aria-labelledby"]),strong:new Set(["aria-label","aria-labelledby"]),subscript:new Set(["aria-label","aria-labelledby"]),superscript:new Set(["aria-label","aria-labelledby"])};function tb(e,t){return["aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-flowto","aria-grabbed","aria-hidden","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"].some(function(r){var n;return e.hasAttribute(r)&&!((n=eb[t])!==null&&n!==void 0&&n.has(r))})}function Af(e,t){return tb(e,t)}function rb(e){var t=ob(e);if(t===null||t==="presentation"){var r=nb(e);if(t!=="presentation"||Af(e,r||""))return r}return t}function nb(e){var t=Zh[ae(e)];if(t!==void 0)return t;switch(ae(e)){case"a":case"area":case"link":if(e.hasAttribute("href"))return"link";break;case"img":return e.getAttribute("alt")===""&&!Af(e,"img")?"presentation":"img";case"input":{var r=e,n=r.type;switch(n){case"button":case"image":case"reset":case"submit":return"button";case"checkbox":case"radio":return n;case"range":return"slider";case"email":case"tel":case"text":case"url":return e.hasAttribute("list")?"combobox":"textbox";case"search":return e.hasAttribute("list")?"combobox":"searchbox";case"number":return"spinbutton";default:return null}}case"select":return e.hasAttribute("multiple")||e.size>1?"listbox":"combobox"}return null}function ob(e){var t=e.getAttribute("role");if(t!==null){var r=t.trim().split(" ")[0];if(r.length>0)return r}return null}function ee(e){return e!==null&&e.nodeType===e.ELEMENT_NODE}function Mf(e){return ee(e)&&ae(e)==="caption"}function ei(e){return ee(e)&&ae(e)==="input"}function ib(e){return ee(e)&&ae(e)==="optgroup"}function ab(e){return ee(e)&&ae(e)==="select"}function sb(e){return ee(e)&&ae(e)==="table"}function lb(e){return ee(e)&&ae(e)==="textarea"}function ub(e){var t=e.ownerDocument===null?e:e.ownerDocument,r=t.defaultView;if(r===null)throw new TypeError("no window available");return r}function cb(e){return ee(e)&&ae(e)==="fieldset"}function db(e){return ee(e)&&ae(e)==="legend"}function fb(e){return ee(e)&&ae(e)==="slot"}function pb(e){return ee(e)&&e.ownerSVGElement!==void 0}function mb(e){return ee(e)&&ae(e)==="svg"}function hb(e){return pb(e)&&ae(e)==="title"}function mi(e,t){if(ee(e)&&e.hasAttribute(t)){var r=e.getAttribute(t).split(" "),n=e.getRootNode?e.getRootNode():e.ownerDocument;return r.map(function(o){return n.getElementById(o)}).filter(function(o){return o!==null})}return[]}function De(e,t){return ee(e)?t.indexOf(rb(e))!==-1:!1}function bb(e){return e.trim().replace(/\s\s+/g," ")}function vb(e,t){if(!ee(e))return!1;if(e.hasAttribute("hidden")||e.getAttribute("aria-hidden")==="true")return!0;var r=t(e);return r.getPropertyValue("display")==="none"||r.getPropertyValue("visibility")==="hidden"}function yb(e){return De(e,["button","combobox","listbox","textbox"])||Of(e,"range")}function Of(e,t){if(!ee(e))return!1;if(t==="range")return De(e,["meter","progressbar","scrollbar","slider","spinbutton"]);throw new TypeError("No knowledge about abstract role '".concat(t,"'. This is likely a bug :("))}function Qs(e,t){var r=we(e.querySelectorAll(t));return mi(e,"aria-owns").forEach(function(n){r.push.apply(r,we(n.querySelectorAll(t)))}),r}function gb(e){return ab(e)?e.selectedOptions||Qs(e,"[selected]"):Qs(e,'[aria-selected="true"]')}function Rb(e){return De(e,["none","presentation"])}function wb(e){return Mf(e)}function Eb(e){return De(e,["button","cell","checkbox","columnheader","gridcell","heading","label","legend","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"])}function xb(e){return!1}function Cb(e){return ei(e)||lb(e)?e.value:e.textContent||""}function Zs(e){var t=e.getPropertyValue("content");return/^["'].*["']$/.test(t)?t.slice(1,-1):""}function If(e){var t=ae(e);return t==="button"||t==="input"&&e.getAttribute("type")!=="hidden"||t==="meter"||t==="output"||t==="progress"||t==="select"||t==="textarea"}function Nf(e){if(If(e))return e;var t=null;return e.childNodes.forEach(function(r){if(t===null&&ee(r)){var n=Nf(r);n!==null&&(t=n)}}),t}function qb(e){if(e.control!==void 0)return e.control;var t=e.getAttribute("for");return t!==null?e.ownerDocument.getElementById(t):Nf(e)}function _b(e){var t=e.labels;if(t===null)return t;if(t!==void 0)return we(t);if(!If(e))return null;var r=e.ownerDocument;return we(r.querySelectorAll("label")).filter(function(n){return qb(n)===e})}function Pb(e){var t=e.assignedNodes();return t.length===0?we(e.childNodes):t}function kf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new Qh,n=ub(e),o=t.compute,i=o===void 0?"name":o,a=t.computedStyleSupportsPseudoElements,s=a===void 0?t.getComputedStyle!==void 0:a,l=t.getComputedStyle,u=l===void 0?n.getComputedStyle.bind(n):l,f=t.hidden,c=f===void 0?!1:f;function d(p,q){var _="";if(ee(p)&&s){var T=u(p,"::before"),P=Zs(T);_="".concat(P," ").concat(_)}var y=fb(p)?Pb(p):we(p.childNodes).concat(mi(p,"aria-owns"));if(y.forEach(function(M){var N=S(M,{isEmbeddedInLabel:q.isEmbeddedInLabel,isReferenced:!1,recursion:!0}),j=ee(M)?u(M).getPropertyValue("display"):"inline",D=j!=="inline"?" ":"";_+="".concat(D).concat(N).concat(D)}),ee(p)&&s){var g=u(p,"::after"),E=Zs(g);_="".concat(_," ").concat(E)}return _.trim()}function b(p,q){var _=p.getAttributeNode(q);return _!==null&&!r.has(_)&&_.value.trim()!==""?(r.add(_),_.value):null}function v(p){return ee(p)?b(p,"title"):null}function R(p){if(!ee(p))return null;if(cb(p)){r.add(p);for(var q=we(p.childNodes),_=0;_<q.length;_+=1){var T=q[_];if(db(T))return S(T,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(sb(p)){r.add(p);for(var P=we(p.childNodes),y=0;y<P.length;y+=1){var g=P[y];if(Mf(g))return S(g,{isEmbeddedInLabel:!1,isReferenced:!1,recursion:!1})}}else if(mb(p)){r.add(p);for(var E=we(p.childNodes),M=0;M<E.length;M+=1){var N=E[M];if(hb(N))return N.textContent}return null}else if(ae(p)==="img"||ae(p)==="area"){var j=b(p,"alt");if(j!==null)return j}else if(ib(p)){var D=b(p,"label");if(D!==null)return D}if(ei(p)&&(p.type==="button"||p.type==="submit"||p.type==="reset")){var A=b(p,"value");if(A!==null)return A;if(p.type==="submit")return"Submit";if(p.type==="reset")return"Reset"}var k=_b(p);if(k!==null&&k.length!==0)return r.add(p),we(k).map(function(le){return S(le,{isEmbeddedInLabel:!0,isReferenced:!1,recursion:!0})}).filter(function(le){return le.length>0}).join(" ");if(ei(p)&&p.type==="image"){var F=b(p,"alt");if(F!==null)return F;var Z=b(p,"title");return Z!==null?Z:"Submit Query"}if(De(p,["button"])){var Y=d(p,{isEmbeddedInLabel:!1});if(Y!=="")return Y}return null}function S(p,q){if(r.has(p))return"";if(!c&&vb(p,u)&&!q.isReferenced)return r.add(p),"";var _=ee(p)?p.getAttributeNode("aria-labelledby"):null,T=_!==null&&!r.has(_)?mi(p,"aria-labelledby"):[];if(i==="name"&&!q.isReferenced&&T.length>0)return r.add(_),T.map(function(j){return S(j,{isEmbeddedInLabel:q.isEmbeddedInLabel,isReferenced:!0,recursion:!1})}).join(" ");var P=q.recursion&&yb(p)&&i==="name";if(!P){var y=(ee(p)&&p.getAttribute("aria-label")||"").trim();if(y!==""&&i==="name")return r.add(p),y;if(!Rb(p)){var g=R(p);if(g!==null)return r.add(p),g}}if(De(p,["menu"]))return r.add(p),"";if(P||q.isEmbeddedInLabel||q.isReferenced){if(De(p,["combobox","listbox"])){r.add(p);var E=gb(p);return E.length===0?ei(p)?p.value:"":we(E).map(function(j){return S(j,{isEmbeddedInLabel:q.isEmbeddedInLabel,isReferenced:!1,recursion:!0})}).join(" ")}if(Of(p,"range"))return r.add(p),p.hasAttribute("aria-valuetext")?p.getAttribute("aria-valuetext"):p.hasAttribute("aria-valuenow")?p.getAttribute("aria-valuenow"):p.getAttribute("value")||"";if(De(p,["textbox"]))return r.add(p),Cb(p)}if(Eb(p)||ee(p)&&q.isReferenced||wb(p)||xb()){var M=d(p,{isEmbeddedInLabel:q.isEmbeddedInLabel});if(M!=="")return r.add(p),M}if(p.nodeType===p.TEXT_NODE)return r.add(p),p.textContent||"";if(q.recursion)return r.add(p),d(p,{isEmbeddedInLabel:q.isEmbeddedInLabel});var N=v(p);return N!==null?(r.add(p),N):(r.add(p),"")}return bb(S(e,{isEmbeddedInLabel:!1,isReferenced:i==="description",recursion:!1}))}function Ao(e){"@babel/helpers - typeof";return Ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ao(e)}function el(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function tl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?el(Object(r),!0).forEach(function(n){Tb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):el(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tb(e,t,r){return t=Sb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sb(e){var t=Ab(e,"string");return Ao(t)==="symbol"?t:String(t)}function Ab(e,t){if(Ao(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ao(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=mi(e,"aria-describedby").map(function(o){return kf(o,tl(tl({},t),{},{compute:"description"}))}).join(" ");if(r===""){var n=e.getAttribute("title");r=n===null?"":n}return r}function Mb(e){return De(e,["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"])}function ms(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Mb(e)?"":kf(e,t)}var de={},Mt={},Go={},Ot={},rl;function Ob(){if(rl)return Ot;rl=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.default=void 0;function e(){var r=this,n=0,o={"@@iterator":function(){return o},next:function(){if(n<r.length){var a=r[n];return n=n+1,{done:!1,value:a}}else return{done:!0}}};return o}var t=e;return Ot.default=t,Ot}var nl;function Lo(){if(nl)return Go;nl=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.default=n;var e=t(Ob());function t(o){return o&&o.__esModule?o:{default:o}}function r(o){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},r(o)}function n(o,i){return typeof Symbol=="function"&&r(Symbol.iterator)==="symbol"&&Object.defineProperty(o,Symbol.iterator,{value:e.default.bind(i)}),o}return Go}var ol;function Ib(){if(ol)return Mt;ol=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.default=void 0;var e=t(Lo());function t(d){return d&&d.__esModule?d:{default:d}}function r(d,b){return i(d)||o(d,b)||s(d,b)||n()}function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
12
12
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(d,b){var v=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(v!=null){var R=[],S=!0,p=!1,q,_;try{for(v=v.call(d);!(S=(q=v.next()).done)&&(R.push(q.value),!(b&&R.length===b));S=!0);}catch(T){p=!0,_=T}finally{try{!S&&v.return!=null&&v.return()}finally{if(p)throw _}}return R}}function i(d){if(Array.isArray(d))return d}function a(d,b){var v=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(!v){if(Array.isArray(d)||(v=s(d))||b){v&&(d=v);var R=0,S=function(){};return{s:S,n:function(){return R>=d.length?{done:!0}:{done:!1,value:d[R++]}},e:function(P){throw P},f:S}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
13
13
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,q=!1,_;return{s:function(){v=v.call(d)},n:function(){var P=v.next();return p=P.done,P},e:function(P){q=!0,_=P},f:function(){try{!p&&v.return!=null&&v.return()}finally{if(q)throw _}}}}function s(d,b){if(d){if(typeof d=="string")return l(d,b);var v=Object.prototype.toString.call(d).slice(8,-1);if(v==="Object"&&d.constructor&&(v=d.constructor.name),v==="Map"||v==="Set")return Array.from(d);if(v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v))return l(d,b)}}function l(d,b){(b==null||b>d.length)&&(b=d.length);for(var v=0,R=new Array(b);v<b;v++)R[v]=d[v];return R}var u=[["aria-activedescendant",{type:"id"}],["aria-atomic",{type:"boolean"}],["aria-autocomplete",{type:"token",values:["inline","list","both","none"]}],["aria-braillelabel",{type:"string"}],["aria-brailleroledescription",{type:"string"}],["aria-busy",{type:"boolean"}],["aria-checked",{type:"tristate"}],["aria-colcount",{type:"integer"}],["aria-colindex",{type:"integer"}],["aria-colspan",{type:"integer"}],["aria-controls",{type:"idlist"}],["aria-current",{type:"token",values:["page","step","location","date","time",!0,!1]}],["aria-describedby",{type:"idlist"}],["aria-description",{type:"string"}],["aria-details",{type:"id"}],["aria-disabled",{type:"boolean"}],["aria-dropeffect",{type:"tokenlist",values:["copy","execute","link","move","none","popup"]}],["aria-errormessage",{type:"id"}],["aria-expanded",{type:"boolean",allowundefined:!0}],["aria-flowto",{type:"idlist"}],["aria-grabbed",{type:"boolean",allowundefined:!0}],["aria-haspopup",{type:"token",values:[!1,!0,"menu","listbox","tree","grid","dialog"]}],["aria-hidden",{type:"boolean",allowundefined:!0}],["aria-invalid",{type:"token",values:["grammar",!1,"spelling",!0]}],["aria-keyshortcuts",{type:"string"}],["aria-label",{type:"string"}],["aria-labelledby",{type:"idlist"}],["aria-level",{type:"integer"}],["aria-live",{type:"token",values:["assertive","off","polite"]}],["aria-modal",{type:"boolean"}],["aria-multiline",{type:"boolean"}],["aria-multiselectable",{type:"boolean"}],["aria-orientation",{type:"token",values:["vertical","undefined","horizontal"]}],["aria-owns",{type:"idlist"}],["aria-placeholder",{type:"string"}],["aria-posinset",{type:"integer"}],["aria-pressed",{type:"tristate"}],["aria-readonly",{type:"boolean"}],["aria-relevant",{type:"tokenlist",values:["additions","all","removals","text"]}],["aria-required",{type:"boolean"}],["aria-roledescription",{type:"string"}],["aria-rowcount",{type:"integer"}],["aria-rowindex",{type:"integer"}],["aria-rowspan",{type:"integer"}],["aria-selected",{type:"boolean",allowundefined:!0}],["aria-setsize",{type:"integer"}],["aria-sort",{type:"token",values:["ascending","descending","none","other"]}],["aria-valuemax",{type:"number"}],["aria-valuemin",{type:"number"}],["aria-valuenow",{type:"number"}],["aria-valuetext",{type:"string"}]],f={entries:function(){return u},forEach:function(b){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,R=a(u),S;try{for(R.s();!(S=R.n()).done;){var p=r(S.value,2),q=p[0],_=p[1];b.call(v,_,q,u)}}catch(T){R.e(T)}finally{R.f()}},get:function(b){var v=u.find(function(R){return R[0]===b});return v&&v[1]},has:function(b){return!!f.get(b)},keys:function(){return u.map(function(b){var v=r(b,1),R=v[0];return R})},values:function(){return u.map(function(b){var v=r(b,2),R=v[1];return R})}},c=(0,e.default)(f,f.entries());return Mt.default=c,Mt}var It={},il;function Nb(){if(il)return It;il=1,Object.defineProperty(It,"__esModule",{value:!0}),It.default=void 0;var e=t(Lo());function t(d){return d&&d.__esModule?d:{default:d}}function r(d,b){return i(d)||o(d,b)||s(d,b)||n()}function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
14
14
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(d,b){var v=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(v!=null){var R=[],S=!0,p=!1,q,_;try{for(v=v.call(d);!(S=(q=v.next()).done)&&(R.push(q.value),!(b&&R.length===b));S=!0);}catch(T){p=!0,_=T}finally{try{!S&&v.return!=null&&v.return()}finally{if(p)throw _}}return R}}function i(d){if(Array.isArray(d))return d}function a(d,b){var v=typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(!v){if(Array.isArray(d)||(v=s(d))||b){v&&(d=v);var R=0,S=function(){};return{s:S,n:function(){return R>=d.length?{done:!0}:{done:!1,value:d[R++]}},e:function(P){throw P},f:S}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
@@ -66,4 +66,4 @@ Unable to find an `+(n===!1?"accessible ":"")+'element with the role "'+t+'"'+l+
66
66
  `))}function jE(e){return e.reverse().map((t,r)=>["".padEnd(r),t.tagName,t.id&&`#${t.id}`,t.hasAttribute("data-testid")&&`(testId=${t.getAttribute("data-testid")})`,DE(t),e.length>1&&r===0&&" <-- This element declared `pointer-events: none`",e.length>1&&r===e.length-1&&" <-- Asserted pointer events here"].filter(Boolean).join("")).join(`
67
67
  `)}function DE(e){var t;let r;if(e.hasAttribute("aria-label"))r=e.getAttribute("aria-label");else if(e.hasAttribute("aria-labelledby")){var n,o;r=(o=e.ownerDocument.getElementById(e.getAttribute("aria-labelledby")))===null||o===void 0||(n=o.textContent)===null||n===void 0?void 0:n.trim()}else if(z(e,["button","input","meter","output","progress","select","textarea"])&&(!((t=e.labels)===null||t===void 0)&&t.length))r=Array.from(e.labels).map(a=>{var s;return(s=a.textContent)===null||s===void 0?void 0:s.trim()}).join("|");else if(z(e,"button")){var i;r=(i=e.textContent)===null||i===void 0?void 0:i.trim()}return r=r?.replace(/\n/g," "),Number(r?.length)>30&&(r=`${r?.substring(0,29)}…`),r?`(label=${r})`:""}function dd(e,t){return(e&t)>0}function je(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class $E{init(t){const r=this.getTarget(t),[,n]=_o(null,r),o=this.getEventInit();return Eo(t,r),t.dispatchUIEvent(r,"pointerover",o),n.forEach(i=>t.dispatchUIEvent(i,"pointerenter",o)),this}move(t,r){const n=this.position,o=this.getTarget(t);if(this.position=r,!Rp(n,r))return;const i=this.getTarget(t),a=this.getEventInit(-1),[s,l]=_o(o,i);return{leave:()=>{Ri(t,o)&&o!==i&&(t.dispatchUIEvent(o,"pointerout",a),s.forEach(u=>t.dispatchUIEvent(u,"pointerleave",a)))},enter:()=>{Eo(t,i),o!==i&&(t.dispatchUIEvent(i,"pointerover",a),l.forEach(u=>t.dispatchUIEvent(u,"pointerenter",a)))},move:()=>{t.dispatchUIEvent(i,"pointermove",a)}}}down(t,r=0){if(this.isDown)return;const n=this.getTarget(t);Eo(t,n),this.isDown=!0,this.isPrevented=!t.dispatchUIEvent(n,"pointerdown",this.getEventInit(r))}up(t,r=0){if(!this.isDown)return;const n=this.getTarget(t);Eo(t,n),this.isPrevented=!1,this.isDown=!1,t.dispatchUIEvent(n,"pointerup",this.getEventInit(r))}release(t){const r=this.getTarget(t),[n]=_o(r,null),o=this.getEventInit();Ri(t,r)&&(t.dispatchUIEvent(r,"pointerout",o),n.forEach(i=>t.dispatchUIEvent(i,"pointerleave",o))),this.isCancelled=!0}getTarget(t){var r;return(r=this.position.target)!==null&&r!==void 0?r:t.config.document.body}getEventInit(t){return{...this.position.coords,pointerId:this.pointerId,pointerType:this.pointerType,isPrimary:this.isPrimary,button:Ea(t),buttons:this.buttons.getButtons()}}constructor({pointerId:t,pointerType:r,isPrimary:n},o){je(this,"pointerId",void 0),je(this,"pointerType",void 0),je(this,"isPrimary",void 0),je(this,"buttons",void 0),je(this,"isMultitouch",!1),je(this,"isCancelled",!1),je(this,"isDown",!1),je(this,"isPrevented",!1),je(this,"position",{}),this.pointerId=t,this.pointerType=r,this.isPrimary=n,this.isMultitouch=!n,this.buttons=o}}function Ke(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class BE{isKeyPressed(t){return this.devices.get(t.pointerType).isPressed(t)}async press(t,r,n){this.devices.get(r.pointerType).addPressed(r),this.buttons.down(r);const o=this.getPointerName(r),i=r.pointerType==="touch"?this.pointers.new(o,r.pointerType,this.buttons):this.pointers.get(o);i.position=n,i.pointerType!=="touch"&&(this.mouse.position=n),i.pointerType==="touch"&&i.init(t),i.down(t,r.button),i.pointerType!=="touch"&&this.mouse.down(t,r,i.isPrevented)}async move(t,r,n){const o=this.pointers.get(r),i=o.move(t,n),a=o.pointerType==="touch"?void 0:this.mouse.move(t,n,o.isPrevented);i?.leave(),a?.leave(),i?.enter(),a?.enter(),i?.move(),a?.move()}async release(t,r,n){const o=this.devices.get(r.pointerType);o.removePressed(r),this.buttons.up(r);const i=this.pointers.get(this.getPointerName(r)),a=i.isPrevented;if(i.position=n,i.pointerType!=="touch"&&(this.mouse.position=n),o.countPressed===0&&i.up(t,r.button),i.pointerType==="touch"&&i.release(t),i.pointerType==="touch"&&!i.isMultitouch){const s=this.mouse.move(t,n,a);s?.leave(),s?.enter(),s?.move(),this.mouse.down(t,r,a)}if(!i.isMultitouch){const s=this.mouse.move(t,n,a);s?.leave(),s?.enter(),s?.move(),this.mouse.up(t,r,a)}}getPointerName(t){return t.pointerType==="touch"?t.name:t.pointerType}getPreviousPosition(t){return this.pointers.has(t)?this.pointers.get(t).position:void 0}resetClickCount(){this.mouse.resetClickCount()}getMouseTarget(t){var r;return(r=this.mouse.position.target)!==null&&r!==void 0?r:t.config.document.body}setMousePosition(t){this.mouse.position=t,this.pointers.get("mouse").position=t}constructor(t){Ke(this,"system",void 0),Ke(this,"mouse",void 0),Ke(this,"buttons",void 0),Ke(this,"devices",new class{get(r){var n,o,i;return(i=(n=this.registry)[o=r])!==null&&i!==void 0?i:n[o]=new AE}constructor(){Ke(this,"registry",{})}}),Ke(this,"pointers",new class{new(r,n,o){const i=n!=="touch"||!Object.values(this.registry).some(a=>a.pointerType==="touch"&&!a.isCancelled);return i||Object.values(this.registry).forEach(a=>{a.pointerType===n&&!a.isCancelled&&(a.isMultitouch=!0)}),this.registry[r]=new $E({pointerId:this.nextId++,pointerType:n,isPrimary:i},o),this.registry[r]}get(r){if(!this.has(r))throw new Error(`Trying to access pointer "${r}" which does not exist.`);return this.registry[r]}has(r){return r in this.registry}constructor(){Ke(this,"registry",{}),Ke(this,"nextId",1)}}),this.system=t,this.buttons=new yp,this.mouse=new NE,this.pointers.new("mouse","mouse",this.buttons)}}function fd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class Ep{getUIEventModifiers(){return{altKey:this.keyboard.modifiers.Alt,ctrlKey:this.keyboard.modifiers.Control,metaKey:this.keyboard.modifiers.Meta,shiftKey:this.keyboard.modifiers.Shift,modifierAltGraph:this.keyboard.modifiers.AltGraph,modifierCapsLock:this.keyboard.modifiers.CapsLock,modifierFn:this.keyboard.modifiers.Fn,modifierFnLock:this.keyboard.modifiers.FnLock,modifierNumLock:this.keyboard.modifiers.NumLock,modifierScrollLock:this.keyboard.modifiers.ScrollLock,modifierSymbol:this.keyboard.modifiers.Symbol,modifierSymbolLock:this.keyboard.modifiers.SymbolLock}}constructor(){fd(this,"keyboard",new qE(this)),fd(this,"pointer",new BE(this))}}async function LE(e){const t=[];return this.config.skipHover||t.push({target:e}),t.push({keys:"[MouseLeft]",target:e}),this.pointer(t)}async function FE(e){return this.pointer([{target:e},"[MouseLeft][MouseLeft]"])}async function UE(e){return this.pointer([{target:e},"[MouseLeft][MouseLeft][MouseLeft]"])}async function zE(e){return this.pointer({target:e})}async function VE(e){return Eo(this,this.system.pointer.getMouseTarget(this)),this.pointer({target:e.ownerDocument.body})}async function HE({shift:e}={}){return this.keyboard(e===!0?"{Shift>}{Tab}{/Shift}":e===!1?"[/ShiftLeft][/ShiftRight]{Tab}":"{Tab}")}var Cs=(function(e){return e["{"]="}",e["["]="]",e})(Cs||{});function xp(e,t){let r=0;const n=e[r]in Cs?e[r]:"";r+=n.length;const i=new RegExp(`^\\${n}{2}`).test(e)?"":n;return{type:i,...i===""?WE(e,r,t):GE(e,r,i,t)}}function WE(e,t,r){const n=e[t];return Cp(n,e,t,r),t+=n.length,{consumedLength:t,descriptor:n,releasePrevious:!1,releaseSelf:!0,repeat:1}}function GE(e,t,r,n){var o,i;const a=e[t]==="/"?"/":"";t+=a.length;const s=r==="{"&&e[t]==="\\";t+=Number(s);const l=s?e[t]:(o=e.slice(t).match(r==="{"?/^\w+|^[^}>/]/:/^\w+/))===null||o===void 0?void 0:o[0];Cp(l,e,t,n),t+=l.length;var u;const f=(u=(i=e.slice(t).match(/^>\d+/))===null||i===void 0?void 0:i[0])!==null&&u!==void 0?u:"";t+=f.length;const c=e[t]==="/"||!f&&e[t]===">"?e[t]:"";t+=c.length;const d=Cs[r],b=e[t]===d?d:"";if(!b)throw new Error(qp([!f&&"repeat modifier",!c&&"release modifier",`"${d}"`].filter(Boolean).join(" or "),e[t],e,n));return t+=b.length,{consumedLength:t,descriptor:l,releasePrevious:!!a,repeat:f?Math.max(Number(f.substr(1)),1):1,releaseSelf:KE(c,f)}}function Cp(e,t,r,n){if(!e)throw new Error(qp("key descriptor",t[r],t,n))}function KE(e,t){if(e)return e==="/";if(t)return!1}function qp(e,t,r,n){return`Expected ${e} but found "${t??""}" in "${r}"
68
68
  See ${n==="pointer"?"https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen":"https://testing-library.com/docs/user-event/keyboard"}
69
- for more information about how userEvent parses your input.`}function YE(e,t){const r=[];do{const{type:o,descriptor:i,consumedLength:a,releasePrevious:s,releaseSelf:l=!0,repeat:u}=xp(t,"keyboard");var n;const f=(n=e.find(c=>{if(o==="["){var d;return((d=c.code)===null||d===void 0?void 0:d.toLowerCase())===i.toLowerCase()}else if(o==="{"){var b;return((b=c.key)===null||b===void 0?void 0:b.toLowerCase())===i.toLowerCase()}return c.key===i}))!==null&&n!==void 0?n:{key:"Unknown",code:"Unknown",[o==="["?"code":"key"]:i};r.push({keyDef:f,releasePrevious:s,releaseSelf:l,repeat:u}),t=t.slice(a)}while(t);return r}async function XE(e){const t=YE(this.config.keyboardMap,e);for(let r=0;r<t.length;r++)await qt(this.config),await JE(this,t[r])}async function JE(e,{keyDef:t,releasePrevious:r,releaseSelf:n,repeat:o}){const{system:i}=e;if(i.keyboard.isKeyPressed(t)&&await i.keyboard.keyup(e,t),!r){for(let a=1;a<=o;a++)await i.keyboard.keydown(e,t),a<o&&await qt(e.config);n&&await i.keyboard.keyup(e,t)}}async function QE(e){for(const t of e.system.keyboard.getPressedKeys())await e.system.keyboard.keyup(e,t)}function _p(e){const t=_e(e)?{"text/plain":ZE(e)}:{"text/plain":String(e.ownerDocument.getSelection())},r=cs(ve(e));for(const n in t)t[n]&&r.setData(n,t[n]);return r}function ZE(e){const t=Oo(e);return Pe(e).substring(t.startOffset,t.endOffset)}async function ex(){const e=this.config.document;var t;const r=(t=e.activeElement)!==null&&t!==void 0?t:e.body,n=_p(r);if(n.items.length!==0)return this.dispatchUIEvent(r,"copy",{clipboardData:n})&&this.config.writeToClipboard&&await Rf(e,n),n}async function tx(){const e=this.config.document;var t;const r=(t=e.activeElement)!==null&&t!==void 0?t:e.body,n=_p(r);if(n.items.length!==0)return this.dispatchUIEvent(r,"cut",{clipboardData:n})&&this.config.writeToClipboard&&await Rf(r.ownerDocument,n),n}async function rx(e){const t=this.config.document;var r;const n=(r=t.activeElement)!==null&&r!==void 0?r:t.body;var o;const i=(o=typeof e=="string"?nx(t,e):e)!==null&&o!==void 0?o:await Eh(t).catch(()=>{throw new Error("`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.")});this.dispatchUIEvent(n,"paste",{clipboardData:i})}function nx(e,t){const r=cs(ve(e));return r.setData("text",t),r}function pd(e,t){const r=[];do{const{descriptor:n,consumedLength:o,releasePrevious:i,releaseSelf:a=!0}=xp(t,"pointer"),s=e.find(l=>l.name===n);s&&r.push({keyDef:s,releasePrevious:i,releaseSelf:a}),t=t.slice(o)}while(t);return r}async function ox(e){const{pointerMap:t}=this.config,r=[];(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="string"?r.push(...pd(t,n)):"keys"in n?r.push(...pd(t,n.keys).map(o=>({...n,...o}))):r.push(n)});for(let n=0;n<r.length;n++)await qt(this.config),await ix(this,r[n]);this.system.pointer.resetClickCount()}async function ix(e,t){var r,n;const o="pointerName"in t&&t.pointerName?t.pointerName:"keyDef"in t?e.system.pointer.getPointerName(t.keyDef):"mouse",i=e.system.pointer.getPreviousPosition(o);var a,s,l,u;const f={target:(a=t.target)!==null&&a!==void 0?a:ax(e,i),coords:(s=t.coords)!==null&&s!==void 0?s:i?.coords,caret:{node:(l=t.node)!==null&&l!==void 0?l:md(t)||i==null||(r=i.caret)===null||r===void 0?void 0:r.node,offset:(u=t.offset)!==null&&u!==void 0?u:md(t)||i==null||(n=i.caret)===null||n===void 0?void 0:n.offset}};"keyDef"in t?(e.system.pointer.isKeyPressed(t.keyDef)&&(wo(e,pe.Trigger),await e.system.pointer.release(e,t.keyDef,f)),t.releasePrevious||(wo(e,pe.Trigger),await e.system.pointer.press(e,t.keyDef,f),t.releaseSelf&&(wo(e,pe.Trigger),await e.system.pointer.release(e,t.keyDef,f)))):(wo(e,pe.Trigger),await e.system.pointer.move(e,o,f))}function md(e){var t,r;return!!((r=(t=e.target)!==null&&t!==void 0?t:e.node)!==null&&r!==void 0?r:e.offset!==void 0)}function ax(e,t){if(!t)throw new Error("This pointer has no previous position. Provide a target property!");var r;return(r=t.target)!==null&&r!==void 0?r:e.config.document.body}async function sx(e){if(!wt(e)||Le(e))throw new Error("clear()` is only supported on editable elements.");if(Qe(e),e.ownerDocument.activeElement!==e)throw new Error("The element to be cleared could not be focused.");if(dp(e),!rE(e))throw new Error("The element content to be cleared could not be selected.");Ct(this,e,"","deleteContentBackward")}async function lx(e,t){return Pp.call(this,!0,e,t)}async function ux(e,t){return Pp.call(this,!1,e,t)}async function Pp(e,t,r){if(!e&&!t.multiple)throw K().getElementError("Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.",t);const n=Array.isArray(r)?r:[r],o=Array.from(t.querySelectorAll('option, [role="option"]')),i=n.map(s=>{if(typeof s!="string"&&o.includes(s))return s;{const l=o.find(u=>u.value===s||u.innerHTML===s);if(l)return l;throw K().getElementError(`Value "${String(s)}" not found in options`,t)}}).filter(s=>!Le(s));if(Le(t)||!i.length)return;const a=s=>{s.selected=e,this.dispatchUIEvent(t,"input",{bubbles:!0,cancelable:!1,composed:!0}),this.dispatchUIEvent(t,"change")};if(z(t,"select"))if(t.multiple)for(const s of i){const l=this.config.pointerEventsCheck===0?!0:Ri(this,s);l&&(this.dispatchUIEvent(s,"pointerover"),this.dispatchUIEvent(t,"pointerenter"),this.dispatchUIEvent(s,"mouseover"),this.dispatchUIEvent(t,"mouseenter"),this.dispatchUIEvent(s,"pointermove"),this.dispatchUIEvent(s,"mousemove"),this.dispatchUIEvent(s,"pointerdown"),this.dispatchUIEvent(s,"mousedown")),Qe(t),l&&(this.dispatchUIEvent(s,"pointerup"),this.dispatchUIEvent(s,"mouseup")),a(s),l&&this.dispatchUIEvent(s,"click"),await qt(this.config)}else if(i.length===1){const s=this.config.pointerEventsCheck===0?!0:Ri(this,t);s?await this.click(t):Qe(t),a(i[0]),s&&(this.dispatchUIEvent(t,"pointerover"),this.dispatchUIEvent(t,"pointerenter"),this.dispatchUIEvent(t,"mouseover"),this.dispatchUIEvent(t,"mouseenter"),this.dispatchUIEvent(t,"pointerup"),this.dispatchUIEvent(t,"mouseup"),this.dispatchUIEvent(t,"click")),await qt(this.config)}else throw K().getElementError("Cannot select multiple options on a non-multiple select",t);else if(t.getAttribute("role")==="listbox")for(const s of i)await this.click(s),await this.unhover(s);else throw K().getElementError("Cannot select options on elements that are neither select nor listbox elements",t)}async function cx(e,t,{skipClick:r=this.config.skipClick,skipAutoClose:n=this.config.skipAutoClose,initialSelectionStart:o,initialSelectionEnd:i}={}){e.disabled||(r||await this.click(e),o!==void 0&&Ro(e,o,i??o),await this.keyboard(t),n||await QE(this))}const hd=Symbol("files and value properties are mocked");function Yi(e,t,r){r?Object.defineProperty(e,t,r):delete e[t]}function dx(e,t){var r;(r=e[hd])===null||r===void 0||r.restore();const n=Object.getOwnPropertyDescriptor(e,"type"),o=Object.getOwnPropertyDescriptor(e,"value"),i=Object.getOwnPropertyDescriptor(e,"files");function a(){Yi(e,"type",n),Yi(e,"value",o),Yi(e,"files",i)}e[hd]={restore:a},Object.defineProperties(e,{files:{configurable:!0,get:()=>t},value:{configurable:!0,get:()=>t.length?`C:\\fakepath\\${t[0].name}`:"",set(s){if(s==="")a();else{var l;o==null||(l=o.set)===null||l===void 0||l.call(e,s)}}},type:{configurable:!0,get:()=>"file",set(s){s!=="file"&&(a(),e.type=s)}}})}async function fx(e,t){const r=z(e,"label")?e.control:e;if(!r||!z(r,"input",{type:"file"}))throw new TypeError(`The ${r===e?"given":"associated"} ${r?.tagName} element does not accept file uploads`);if(Le(e))return;const n=(Array.isArray(t)?t:[t]).filter(i=>!this.config.applyAccept||px(i,r.accept)).slice(0,r.multiple?void 0:1),o=()=>{var i;n.length===((i=r.files)===null||i===void 0?void 0:i.length)&&n.every((a,s)=>{var l;return a===((l=r.files)===null||l===void 0?void 0:l.item(s))})||(dx(r,us(ve(e),n)),this.dispatchUIEvent(r,"input"),this.dispatchUIEvent(r,"change"))};r.addEventListener("fileDialog",o),await this.click(e),r.removeEventListener("fileDialog",o)}function Qo(e){return e.toLowerCase().replace(/(\.|\/)jpg\b/g,"$1jpeg")}function px(e,t){if(!t)return!0;const r=["audio/*","image/*","video/*"];return Qo(t).trim().split(/\s*,\s*/).some(n=>n.startsWith(".")?Qo(e.name).endsWith(n):r.includes(n)?Qo(e.type).startsWith(n.replace("*","")):Qo(e.type)===n)}const bd={click:LE,dblClick:FE,tripleClick:UE,hover:zE,unhover:VE,tab:HE,keyboard:XE,copy:ex,cut:tx,paste:rx,pointer:ox,clear:sx,deselectOptions:ux,selectOptions:lx,type:cx,upload:fx};function mx(e){return K().asyncWrapper(e)}const Tp={applyAccept:!0,autoModify:!0,delay:0,document:globalThis.document,keyboardMap:_E,pointerMap:PE,pointerEventsCheck:ni.EachApiCall,skipAutoClose:!1,skipClick:!1,skipHover:!1,writeToClipboard:!1,advanceTimers:()=>Promise.resolve()},hx={...Tp,writeToClipboard:!0};function Sp(e={},t=hx,r){const n=gx(e,r,t);return{...t,...e,document:n}}function bx(e={}){const t=Sp(e);vp(t.document),bp(ve(t.document).HTMLElement);var r;const n=(r=t.document.defaultView)!==null&&r!==void 0?r:globalThis.window;return gh(n),qs(t).api}function se({keyboardState:e,pointerState:t,...r}={},n){const o=Sp(r,Tp,n);vp(o.document),bp(ve(o.document).HTMLElement);var i;const a=(i=t??e)!==null&&i!==void 0?i:new Ep;return{api:qs(o,a).api,system:a}}function vx(e){return qs({...this.config,...e},this.system).api}function yx(e,t){function r(...n){return wo(e,pe.Call),mx(()=>t.apply(e,n).then(async o=>(await qt(e.config),o)))}return Object.defineProperty(r,"name",{get:()=>t.name}),r}function qs(e,t=new Ep){const r={};return Object.assign(r,{config:e,dispatchEvent:hp.bind(r),dispatchUIEvent:bE.bind(r),system:t,levelRefs:{},...bd}),{instance:r,api:{...Object.fromEntries(Object.entries(bd).map(([n,o])=>[n,yx(r,o)])),setup:vx.bind(r)}}}function gx(e,t,r){var n,o;return(o=(n=e.document)!==null&&n!==void 0?n:t&&wE(t))!==null&&o!==void 0?o:r.document}function Rx(e){return se().api.clear(e)}function wx(e,t={}){return se(t,e).api.click(e)}function Ex(e={}){return se(e).api.copy()}function xx(e={}){return se(e).api.cut()}function Cx(e,t={}){return se(t).api.dblClick(e)}function qx(e,t,r={}){return se(r).api.deselectOptions(e,t)}function _x(e,t={}){return se(t).api.hover(e)}async function Px(e,t={}){const{api:r,system:n}=se(t);return r.keyboard(e).then(()=>n)}async function Tx(e,t={}){const{api:r,system:n}=se(t);return r.pointer(e).then(()=>n)}function Sx(e,t){return se(t).api.paste(e)}function Ax(e,t,r={}){return se(r).api.selectOptions(e,t)}function Mx(e,t={}){return se(t).api.tripleClick(e)}function Ox(e,t,r={}){return se(r,e).api.type(e,t,r)}function Ix(e,t={}){const{api:r,system:n}=se(t);return n.pointer.setMousePosition({target:e}),r.unhover(e)}function Nx(e,t,r={}){return se(r).api.upload(e,t)}function kx(e={}){return se().api.tab(e)}const jx=Object.freeze(Object.defineProperty({__proto__:null,clear:Rx,click:wx,copy:Ex,cut:xx,dblClick:Cx,deselectOptions:qx,hover:_x,keyboard:Px,paste:Sx,pointer:Tx,selectOptions:Ax,tab:kx,tripleClick:Mx,type:Ox,unhover:Ix,upload:Nx},Symbol.toStringTag,{value:"Module"})),Dx={...jx,setup:bx};function $x(e,t,r){switch(t){case"type":return`Event fired: Typed "${r[1]}" into element`;case"selectOptions":return`Event fired: Selected option(s) ${JSON.stringify(r[1])}`;case"click":return"Event fired: Clicked element";case"dblClick":return"Event fired: Double-clicked element";case"tripleClick":return"Event fired: Triple-clicked element";default:return`Event fired: ${e}.${String(t)} executed`}}function Ap(e,t="userEvent"){return new Proxy(e,{get(r,n,o){const i=Reflect.get(r,n,o);return typeof i!="function"?i:n==="setup"?(...a)=>{const s=i(...a);return Ap(s,`${t}.instance`)}:async(...a)=>{const s=await i(...a);return Re($x(t,n,a)),s}}})}const Bx=Ap(Dx);function Lx(e,t,r){const n=String(t);if(/^(get|query|find)(All)?By/.test(n)){const o=r[0];return`query: ${n}("${o}")`}return n==="within"?`helper: within(<${(r[0]?.tagName||"unknown").toLowerCase()}>) called`:n==="prettyDOM"||n==="logDOM"?`debug: ${n} called`:["act","waitFor","waitForElementToBeRemoved"].includes(n)?`async utility: ${n} executed`:`method: ${e}.${n} executed`}const Fx=()=>document.querySelector("body > :not(#twd-sidebar-root):not(script):not(style)")??document.body,Ux=(e,t)=>{const r=Fx(),o=op(r)[e];if(typeof o=="function")return o(...t);const i=ji[e];return typeof i=="function"?i(...t):i},zx=(e,t)=>{const r=ji[e];return typeof r!="function"?r:r(...t)};function Mp(e,t="screen",r=!1){return new Proxy(e,{get(n,o,i){const a=Reflect.get(n,o,i);return typeof a!="function"?a:(...s)=>{const l=r?Ux(o,s):zx(o,s);return Re(Lx(t,o,s)),l}}})}const Vx=Mp(ji,"screen",!0),Hx=Mp(ji,"screen",!1);Hf({getElementError(e){return new Error(`${e}`)}});const Wx=Hf;ie.truncateThreshold=0;exports.TWDSidebar=dh;exports.configureScreenDom=Wx;exports.expect=Po;exports.initTests=ph;exports.screenDom=Vx;exports.screenDomGlobal=Hx;exports.twd=Cm;exports.userEvent=Bx;
69
+ for more information about how userEvent parses your input.`}function YE(e,t){const r=[];do{const{type:o,descriptor:i,consumedLength:a,releasePrevious:s,releaseSelf:l=!0,repeat:u}=xp(t,"keyboard");var n;const f=(n=e.find(c=>{if(o==="["){var d;return((d=c.code)===null||d===void 0?void 0:d.toLowerCase())===i.toLowerCase()}else if(o==="{"){var b;return((b=c.key)===null||b===void 0?void 0:b.toLowerCase())===i.toLowerCase()}return c.key===i}))!==null&&n!==void 0?n:{key:"Unknown",code:"Unknown",[o==="["?"code":"key"]:i};r.push({keyDef:f,releasePrevious:s,releaseSelf:l,repeat:u}),t=t.slice(a)}while(t);return r}async function XE(e){const t=YE(this.config.keyboardMap,e);for(let r=0;r<t.length;r++)await qt(this.config),await JE(this,t[r])}async function JE(e,{keyDef:t,releasePrevious:r,releaseSelf:n,repeat:o}){const{system:i}=e;if(i.keyboard.isKeyPressed(t)&&await i.keyboard.keyup(e,t),!r){for(let a=1;a<=o;a++)await i.keyboard.keydown(e,t),a<o&&await qt(e.config);n&&await i.keyboard.keyup(e,t)}}async function QE(e){for(const t of e.system.keyboard.getPressedKeys())await e.system.keyboard.keyup(e,t)}function _p(e){const t=_e(e)?{"text/plain":ZE(e)}:{"text/plain":String(e.ownerDocument.getSelection())},r=cs(ve(e));for(const n in t)t[n]&&r.setData(n,t[n]);return r}function ZE(e){const t=Oo(e);return Pe(e).substring(t.startOffset,t.endOffset)}async function ex(){const e=this.config.document;var t;const r=(t=e.activeElement)!==null&&t!==void 0?t:e.body,n=_p(r);if(n.items.length!==0)return this.dispatchUIEvent(r,"copy",{clipboardData:n})&&this.config.writeToClipboard&&await Rf(e,n),n}async function tx(){const e=this.config.document;var t;const r=(t=e.activeElement)!==null&&t!==void 0?t:e.body,n=_p(r);if(n.items.length!==0)return this.dispatchUIEvent(r,"cut",{clipboardData:n})&&this.config.writeToClipboard&&await Rf(r.ownerDocument,n),n}async function rx(e){const t=this.config.document;var r;const n=(r=t.activeElement)!==null&&r!==void 0?r:t.body;var o;const i=(o=typeof e=="string"?nx(t,e):e)!==null&&o!==void 0?o:await Eh(t).catch(()=>{throw new Error("`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.")});this.dispatchUIEvent(n,"paste",{clipboardData:i})}function nx(e,t){const r=cs(ve(e));return r.setData("text",t),r}function pd(e,t){const r=[];do{const{descriptor:n,consumedLength:o,releasePrevious:i,releaseSelf:a=!0}=xp(t,"pointer"),s=e.find(l=>l.name===n);s&&r.push({keyDef:s,releasePrevious:i,releaseSelf:a}),t=t.slice(o)}while(t);return r}async function ox(e){const{pointerMap:t}=this.config,r=[];(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="string"?r.push(...pd(t,n)):"keys"in n?r.push(...pd(t,n.keys).map(o=>({...n,...o}))):r.push(n)});for(let n=0;n<r.length;n++)await qt(this.config),await ix(this,r[n]);this.system.pointer.resetClickCount()}async function ix(e,t){var r,n;const o="pointerName"in t&&t.pointerName?t.pointerName:"keyDef"in t?e.system.pointer.getPointerName(t.keyDef):"mouse",i=e.system.pointer.getPreviousPosition(o);var a,s,l,u;const f={target:(a=t.target)!==null&&a!==void 0?a:ax(e,i),coords:(s=t.coords)!==null&&s!==void 0?s:i?.coords,caret:{node:(l=t.node)!==null&&l!==void 0?l:md(t)||i==null||(r=i.caret)===null||r===void 0?void 0:r.node,offset:(u=t.offset)!==null&&u!==void 0?u:md(t)||i==null||(n=i.caret)===null||n===void 0?void 0:n.offset}};"keyDef"in t?(e.system.pointer.isKeyPressed(t.keyDef)&&(wo(e,pe.Trigger),await e.system.pointer.release(e,t.keyDef,f)),t.releasePrevious||(wo(e,pe.Trigger),await e.system.pointer.press(e,t.keyDef,f),t.releaseSelf&&(wo(e,pe.Trigger),await e.system.pointer.release(e,t.keyDef,f)))):(wo(e,pe.Trigger),await e.system.pointer.move(e,o,f))}function md(e){var t,r;return!!((r=(t=e.target)!==null&&t!==void 0?t:e.node)!==null&&r!==void 0?r:e.offset!==void 0)}function ax(e,t){if(!t)throw new Error("This pointer has no previous position. Provide a target property!");var r;return(r=t.target)!==null&&r!==void 0?r:e.config.document.body}async function sx(e){if(!wt(e)||Le(e))throw new Error("clear()` is only supported on editable elements.");if(Qe(e),e.ownerDocument.activeElement!==e)throw new Error("The element to be cleared could not be focused.");if(dp(e),!rE(e))throw new Error("The element content to be cleared could not be selected.");Ct(this,e,"","deleteContentBackward")}async function lx(e,t){return Pp.call(this,!0,e,t)}async function ux(e,t){return Pp.call(this,!1,e,t)}async function Pp(e,t,r){if(!e&&!t.multiple)throw K().getElementError("Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.",t);const n=Array.isArray(r)?r:[r],o=Array.from(t.querySelectorAll('option, [role="option"]')),i=n.map(s=>{if(typeof s!="string"&&o.includes(s))return s;{const l=o.find(u=>u.value===s||u.innerHTML===s);if(l)return l;throw K().getElementError(`Value "${String(s)}" not found in options`,t)}}).filter(s=>!Le(s));if(Le(t)||!i.length)return;const a=s=>{s.selected=e,this.dispatchUIEvent(t,"input",{bubbles:!0,cancelable:!1,composed:!0}),this.dispatchUIEvent(t,"change")};if(z(t,"select"))if(t.multiple)for(const s of i){const l=this.config.pointerEventsCheck===0?!0:Ri(this,s);l&&(this.dispatchUIEvent(s,"pointerover"),this.dispatchUIEvent(t,"pointerenter"),this.dispatchUIEvent(s,"mouseover"),this.dispatchUIEvent(t,"mouseenter"),this.dispatchUIEvent(s,"pointermove"),this.dispatchUIEvent(s,"mousemove"),this.dispatchUIEvent(s,"pointerdown"),this.dispatchUIEvent(s,"mousedown")),Qe(t),l&&(this.dispatchUIEvent(s,"pointerup"),this.dispatchUIEvent(s,"mouseup")),a(s),l&&this.dispatchUIEvent(s,"click"),await qt(this.config)}else if(i.length===1){const s=this.config.pointerEventsCheck===0?!0:Ri(this,t);s?await this.click(t):Qe(t),a(i[0]),s&&(this.dispatchUIEvent(t,"pointerover"),this.dispatchUIEvent(t,"pointerenter"),this.dispatchUIEvent(t,"mouseover"),this.dispatchUIEvent(t,"mouseenter"),this.dispatchUIEvent(t,"pointerup"),this.dispatchUIEvent(t,"mouseup"),this.dispatchUIEvent(t,"click")),await qt(this.config)}else throw K().getElementError("Cannot select multiple options on a non-multiple select",t);else if(t.getAttribute("role")==="listbox")for(const s of i)await this.click(s),await this.unhover(s);else throw K().getElementError("Cannot select options on elements that are neither select nor listbox elements",t)}async function cx(e,t,{skipClick:r=this.config.skipClick,skipAutoClose:n=this.config.skipAutoClose,initialSelectionStart:o,initialSelectionEnd:i}={}){e.disabled||(r||await this.click(e),o!==void 0&&Ro(e,o,i??o),await this.keyboard(t),n||await QE(this))}const hd=Symbol("files and value properties are mocked");function Yi(e,t,r){r?Object.defineProperty(e,t,r):delete e[t]}function dx(e,t){var r;(r=e[hd])===null||r===void 0||r.restore();const n=Object.getOwnPropertyDescriptor(e,"type"),o=Object.getOwnPropertyDescriptor(e,"value"),i=Object.getOwnPropertyDescriptor(e,"files");function a(){Yi(e,"type",n),Yi(e,"value",o),Yi(e,"files",i)}e[hd]={restore:a},Object.defineProperties(e,{files:{configurable:!0,get:()=>t},value:{configurable:!0,get:()=>t.length?`C:\\fakepath\\${t[0].name}`:"",set(s){if(s==="")a();else{var l;o==null||(l=o.set)===null||l===void 0||l.call(e,s)}}},type:{configurable:!0,get:()=>"file",set(s){s!=="file"&&(a(),e.type=s)}}})}async function fx(e,t){const r=z(e,"label")?e.control:e;if(!r||!z(r,"input",{type:"file"}))throw new TypeError(`The ${r===e?"given":"associated"} ${r?.tagName} element does not accept file uploads`);if(Le(e))return;const n=(Array.isArray(t)?t:[t]).filter(i=>!this.config.applyAccept||px(i,r.accept)).slice(0,r.multiple?void 0:1),o=()=>{var i;n.length===((i=r.files)===null||i===void 0?void 0:i.length)&&n.every((a,s)=>{var l;return a===((l=r.files)===null||l===void 0?void 0:l.item(s))})||(dx(r,us(ve(e),n)),this.dispatchUIEvent(r,"input"),this.dispatchUIEvent(r,"change"))};r.addEventListener("fileDialog",o),await this.click(e),r.removeEventListener("fileDialog",o)}function Qo(e){return e.toLowerCase().replace(/(\.|\/)jpg\b/g,"$1jpeg")}function px(e,t){if(!t)return!0;const r=["audio/*","image/*","video/*"];return Qo(t).trim().split(/\s*,\s*/).some(n=>n.startsWith(".")?Qo(e.name).endsWith(n):r.includes(n)?Qo(e.type).startsWith(n.replace("*","")):Qo(e.type)===n)}const bd={click:LE,dblClick:FE,tripleClick:UE,hover:zE,unhover:VE,tab:HE,keyboard:XE,copy:ex,cut:tx,paste:rx,pointer:ox,clear:sx,deselectOptions:ux,selectOptions:lx,type:cx,upload:fx};function mx(e){return K().asyncWrapper(e)}const Tp={applyAccept:!0,autoModify:!0,delay:0,document:globalThis.document,keyboardMap:_E,pointerMap:PE,pointerEventsCheck:ni.EachApiCall,skipAutoClose:!1,skipClick:!1,skipHover:!1,writeToClipboard:!1,advanceTimers:()=>Promise.resolve()},hx={...Tp,writeToClipboard:!0};function Sp(e={},t=hx,r){const n=gx(e,r,t);return{...t,...e,document:n}}function bx(e={}){const t=Sp(e);vp(t.document),bp(ve(t.document).HTMLElement);var r;const n=(r=t.document.defaultView)!==null&&r!==void 0?r:globalThis.window;return gh(n),qs(t).api}function se({keyboardState:e,pointerState:t,...r}={},n){const o=Sp(r,Tp,n);vp(o.document),bp(ve(o.document).HTMLElement);var i;const a=(i=t??e)!==null&&i!==void 0?i:new Ep;return{api:qs(o,a).api,system:a}}function vx(e){return qs({...this.config,...e},this.system).api}function yx(e,t){function r(...n){return wo(e,pe.Call),mx(()=>t.apply(e,n).then(async o=>(await qt(e.config),o)))}return Object.defineProperty(r,"name",{get:()=>t.name}),r}function qs(e,t=new Ep){const r={};return Object.assign(r,{config:e,dispatchEvent:hp.bind(r),dispatchUIEvent:bE.bind(r),system:t,levelRefs:{},...bd}),{instance:r,api:{...Object.fromEntries(Object.entries(bd).map(([n,o])=>[n,yx(r,o)])),setup:vx.bind(r)}}}function gx(e,t,r){var n,o;return(o=(n=e.document)!==null&&n!==void 0?n:t&&wE(t))!==null&&o!==void 0?o:r.document}function Rx(e){return se().api.clear(e)}function wx(e,t={}){return se(t,e).api.click(e)}function Ex(e={}){return se(e).api.copy()}function xx(e={}){return se(e).api.cut()}function Cx(e,t={}){return se(t).api.dblClick(e)}function qx(e,t,r={}){return se(r).api.deselectOptions(e,t)}function _x(e,t={}){return se(t).api.hover(e)}async function Px(e,t={}){const{api:r,system:n}=se(t);return r.keyboard(e).then(()=>n)}async function Tx(e,t={}){const{api:r,system:n}=se(t);return r.pointer(e).then(()=>n)}function Sx(e,t){return se(t).api.paste(e)}function Ax(e,t,r={}){return se(r).api.selectOptions(e,t)}function Mx(e,t={}){return se(t).api.tripleClick(e)}function Ox(e,t,r={}){return se(r,e).api.type(e,t,r)}function Ix(e,t={}){const{api:r,system:n}=se(t);return n.pointer.setMousePosition({target:e}),r.unhover(e)}function Nx(e,t,r={}){return se(r).api.upload(e,t)}function kx(e={}){return se().api.tab(e)}const jx=Object.freeze(Object.defineProperty({__proto__:null,clear:Rx,click:wx,copy:Ex,cut:xx,dblClick:Cx,deselectOptions:qx,hover:_x,keyboard:Px,paste:Sx,pointer:Tx,selectOptions:Ax,tab:kx,tripleClick:Mx,type:Ox,unhover:Ix,upload:Nx},Symbol.toStringTag,{value:"Module"})),Dx={...jx,setup:bx};function $x(e,t,r){switch(t){case"type":return`Event fired: Typed "${r[1]}" into element`;case"selectOptions":return`Event fired: Selected option(s) ${JSON.stringify(r[1])}`;case"click":return"Event fired: Clicked element";case"dblClick":return"Event fired: Double-clicked element";case"tripleClick":return"Event fired: Triple-clicked element";default:return`Event fired: ${e}.${String(t)} executed`}}function Ap(e,t="userEvent"){return new Proxy(e,{get(r,n,o){const i=Reflect.get(r,n,o);return typeof i!="function"?i:n==="setup"?(...a)=>{const s=i(...a);return Ap(s,`${t}.instance`)}:async(...a)=>{const s=await i(...a);return Re($x(t,n,a)),s}}})}const Bx=Ap(Dx);function Lx(e,t,r){const n=String(t);if(/^(get|query|find)(All)?By/.test(n)){const o=r[0];return`query: ${n}("${o}")`}return n==="within"?`helper: within(<${(r[0]?.tagName||"unknown").toLowerCase()}>) called`:n==="prettyDOM"||n==="logDOM"?`debug: ${n} called`:["act","waitFor","waitForElementToBeRemoved"].includes(n)?`async utility: ${n} executed`:`method: ${e}.${n} executed`}const Fx=()=>document.querySelector("body > :not(#twd-sidebar-root):not(script):not(style):not(svg):not(path):not(noscript):not(link):not(meta):not(iframe):not(template)")??document.body,Ux=(e,t)=>{const r=Fx(),o=op(r)[e];if(typeof o=="function")return o(...t);const i=ji[e];return typeof i=="function"?i(...t):i},zx=(e,t)=>{const r=ji[e];return typeof r!="function"?r:r(...t)};function Mp(e,t="screen",r=!1){return new Proxy(e,{get(n,o,i){const a=Reflect.get(n,o,i);return typeof a!="function"?a:(...s)=>{const l=r?Ux(o,s):zx(o,s);return Re(Lx(t,o,s)),l}}})}const Vx=Mp(ji,"screen",!0),Hx=Mp(ji,"screen",!1);Hf({getElementError(e){return new Error(`${e}`)}});const Wx=Hf;ie.truncateThreshold=0;exports.TWDSidebar=dh;exports.configureScreenDom=Wx;exports.expect=Po;exports.initTests=ph;exports.screenDom=Vx;exports.screenDomGlobal=Hx;exports.twd=Cm;exports.userEvent=Bx;
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { handlers as ri, TestRunner as um } from "./runner.es.js";
2
- import { c as cm, m as dm, j as B } from "./jsx-runtime-DqUUEvWR.mjs";
2
+ import { c as cm, m as dm, j as B } from "./jsx-runtime-BGWd3k7q.mjs";
3
3
  import { useState as Yi, useEffect as fm } from "react";
4
4
  const pm = (e, t, r = 2e3, n = 50) => new Promise((o, i) => {
5
5
  const a = Date.now(), s = () => {
@@ -213,7 +213,7 @@ const bm = {
213
213
  }, we = (e) => {
214
214
  const t = ri.size ? Array.from(ri.values()).find((r) => r.status === "running") : null;
215
215
  t && t.logs?.push(e);
216
- }, xa = "1.3.3", vm = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
216
+ }, xa = "1.3.4", vm = () => typeof window < "u" ? (window.__TWD_MOCK_STATE__ || (window.__TWD_MOCK_STATE__ = {
217
217
  rules: []
218
218
  }), window.__TWD_MOCK_STATE__) : {
219
219
  rules: []
@@ -800,7 +800,7 @@ function Ta(e, t) {
800
800
  return u && u.length > l && (u = `${yt}(${e.children.length})`), `${o}${s}${i}${u}${a}`;
801
801
  }
802
802
  C(Ta, "inspectHTML");
803
- var $m = typeof Symbol == "function" && typeof Symbol.for == "function", $i = $m ? Symbol.for("chai/inspect") : "@@chai/inspect", Bi = Symbol.for("nodejs.util.inspect.custom"), Ts = /* @__PURE__ */ new WeakMap(), Ss = {}, As = {
803
+ var $m = typeof Symbol == "function" && typeof Symbol.for == "function", $i = $m ? /* @__PURE__ */ Symbol.for("chai/inspect") : "@@chai/inspect", Bi = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom"), Ts = /* @__PURE__ */ new WeakMap(), Ss = {}, As = {
804
804
  undefined: /* @__PURE__ */ C((e, t) => t.stylize("undefined", "undefined"), "undefined"),
805
805
  null: /* @__PURE__ */ C((e, t) => t.stylize("null", "null"), "null"),
806
806
  boolean: /* @__PURE__ */ C((e, t) => t.stylize(String(e), "boolean"), "boolean"),
@@ -2497,7 +2497,7 @@ function os(e, t, r) {
2497
2497
  i
2498
2498
  );
2499
2499
  new h(e, o, i, !0).is.numeric;
2500
- const s = /* @__PURE__ */ C((u) => u < 0n ? -u : u, "abs"), l = /* @__PURE__ */ C((u) => parseFloat(parseFloat(u).toPrecision(12)), "strip");
2500
+ const s = /* @__PURE__ */ C((u) => u < 0 ? -u : u, "abs"), l = /* @__PURE__ */ C((u) => parseFloat(parseFloat(u).toPrecision(12)), "strip");
2501
2501
  this.assert(
2502
2502
  l(s(n - e)) <= t,
2503
2503
  "expected #{this} to be close to " + e + " +/- " + t,
@@ -4113,7 +4113,7 @@ function gf(e, ...t) {
4113
4113
  }
4114
4114
  }(r);
4115
4115
  }
4116
- const wt = Symbol("Manage ClipboardSub");
4116
+ const wt = /* @__PURE__ */ Symbol("Manage ClipboardSub");
4117
4117
  function ks(e, t) {
4118
4118
  return Object.assign(new class extends e.EventTarget {
4119
4119
  async read() {
@@ -5775,12 +5775,9 @@ function gb(e) {
5775
5775
  function Of(e, t) {
5776
5776
  if (!ee(e))
5777
5777
  return !1;
5778
- switch (t) {
5779
- case "range":
5780
- return je(e, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
5781
- default:
5782
- throw new TypeError("No knowledge about abstract role '".concat(t, "'. This is likely a bug :("));
5783
- }
5778
+ if (t === "range")
5779
+ return je(e, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
5780
+ throw new TypeError("No knowledge about abstract role '".concat(t, "'. This is likely a bug :("));
5784
5781
  }
5785
5782
  function Qs(e, t) {
5786
5783
  var r = Re(e.querySelectorAll(t));
@@ -14245,7 +14242,7 @@ Ze.click = (e, t, r) => {
14245
14242
  MR(t), t.dispatchEvent(new (ve(t)).Event("fileDialog")), Qe(t);
14246
14243
  };
14247
14244
  };
14248
- const Ct = Symbol("Displayed value in UI"), $e = Symbol("Displayed selection in UI"), vi = Symbol("Initial value to compare on blur");
14245
+ const Ct = /* @__PURE__ */ Symbol("Displayed value in UI"), $e = /* @__PURE__ */ Symbol("Displayed selection in UI"), vi = /* @__PURE__ */ Symbol("Initial value to compare on blur");
14249
14246
  function OR(e) {
14250
14247
  return typeof e == "object" && Ct in e;
14251
14248
  }
@@ -14419,7 +14416,7 @@ function zR(e, t) {
14419
14416
  e = e[`${t}Child`];
14420
14417
  return e;
14421
14418
  }
14422
- const Mo = Symbol("Track programmatic changes for React workaround");
14419
+ const Mo = /* @__PURE__ */ Symbol("Track programmatic changes for React workaround");
14423
14420
  function VR(e) {
14424
14421
  return Object.getOwnPropertyNames(e).some((t) => t.startsWith("__react")) && ve(e).REACT_VERSION === 17;
14425
14422
  }
@@ -15327,7 +15324,7 @@ function at(e, t, r) {
15327
15324
  const n = mp(t, e, r);
15328
15325
  Et(() => e.dispatchEvent(n));
15329
15326
  }
15330
- const nd = Symbol("patched focus/blur methods");
15327
+ const nd = /* @__PURE__ */ Symbol("patched focus/blur methods");
15331
15328
  function bp(e) {
15332
15329
  if (e.prototype[nd])
15333
15330
  return;
@@ -15356,7 +15353,7 @@ function bp(e) {
15356
15353
  const s = od(this.ownerDocument);
15357
15354
  if (s === this)
15358
15355
  return;
15359
- const l = Symbol("focus call");
15356
+ const l = /* @__PURE__ */ Symbol("focus call");
15360
15357
  n = l, s && (r.call(s), at(s, "blur", {
15361
15358
  relatedTarget: this
15362
15359
  }), at(s, "focusout", {
@@ -15373,7 +15370,7 @@ function bp(e) {
15373
15370
  const a = od(this.ownerDocument);
15374
15371
  if (a !== this)
15375
15372
  return;
15376
- n = Symbol("blur call"), r.call(this), at(a, "blur", {
15373
+ n = /* @__PURE__ */ Symbol("blur call"), r.call(this), at(a, "blur", {
15377
15374
  relatedTarget: null
15378
15375
  }), at(a, "focusout", {
15379
15376
  relatedTarget: null
@@ -15384,7 +15381,7 @@ function od(e) {
15384
15381
  const t = jo(e);
15385
15382
  return t?.tagName === "BODY" ? null : t;
15386
15383
  }
15387
- const Gi = Symbol("Interceptor for programmatical calls");
15384
+ const Gi = /* @__PURE__ */ Symbol("Interceptor for programmatical calls");
15388
15385
  function ht(e, t, r) {
15389
15386
  const n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), o = Object.getOwnPropertyDescriptor(e, t), i = n?.set ? "set" : "value";
15390
15387
  if (typeof n?.[i] != "function" || n[i][Gi])
@@ -15454,7 +15451,7 @@ function RE(e) {
15454
15451
  };
15455
15452
  });
15456
15453
  }
15457
- const vt = Symbol("Node prepared with document state workarounds");
15454
+ const vt = /* @__PURE__ */ Symbol("Node prepared with document state workarounds");
15458
15455
  function vp(e) {
15459
15456
  e[vt] || (e.addEventListener("focus", (t) => {
15460
15457
  const r = t.target;
@@ -16160,7 +16157,7 @@ function DE(e) {
16160
16157
  };
16161
16158
  }
16162
16159
  }
16163
- const cd = Symbol("Last check for pointer-events");
16160
+ const cd = /* @__PURE__ */ Symbol("Last check for pointer-events");
16164
16161
  function Rp(e, t) {
16165
16162
  const r = t[cd];
16166
16163
  if (!(e.config.pointerEventsCheck !== ti.Never && (!r || dd(e.config.pointerEventsCheck, ti.EachApiCall) && r[pe.Call] !== Yo(e, pe.Call) || dd(e.config.pointerEventsCheck, ti.EachTrigger) && r[pe.Trigger] !== Yo(e, pe.Trigger))))
@@ -16715,7 +16712,7 @@ async function Pp(e, t, r) {
16715
16712
  async function dC(e, t, { skipClick: r = this.config.skipClick, skipAutoClose: n = this.config.skipAutoClose, initialSelectionStart: o, initialSelectionEnd: i } = {}) {
16716
16713
  e.disabled || (r || await this.click(e), o !== void 0 && wo(e, o, i ?? o), await this.keyboard(t), n || await ZE(this));
16717
16714
  }
16718
- const hd = Symbol("files and value properties are mocked");
16715
+ const hd = /* @__PURE__ */ Symbol("files and value properties are mocked");
16719
16716
  function Ki(e, t, r) {
16720
16717
  r ? Object.defineProperty(e, t, r) : delete e[t];
16721
16718
  }
@@ -17003,7 +17000,7 @@ function LC(e, t, r) {
17003
17000
  }
17004
17001
  return n === "within" ? `helper: within(<${(r[0]?.tagName || "unknown").toLowerCase()}>) called` : n === "prettyDOM" || n === "logDOM" ? `debug: ${n} called` : ["act", "waitFor", "waitForElementToBeRemoved"].includes(n) ? `async utility: ${n} executed` : `method: ${e}.${n} executed`;
17005
17002
  }
17006
- const FC = () => document.querySelector("body > :not(#twd-sidebar-root):not(script):not(style)") ?? document.body, UC = (e, t) => {
17003
+ const FC = () => document.querySelector("body > :not(#twd-sidebar-root):not(script):not(style):not(svg):not(path):not(noscript):not(link):not(meta):not(iframe):not(template)") ?? document.body, UC = (e, t) => {
17007
17004
  const r = FC(), o = op(r)[e];
17008
17005
  if (typeof o == "function")
17009
17006
  return o(...t);
@@ -11,7 +11,7 @@ var F;
11
11
  function re() {
12
12
  if (F) return _;
13
13
  F = 1;
14
- var o = Symbol.for("react.transitional.element"), l = Symbol.for("react.fragment");
14
+ var o = /* @__PURE__ */ Symbol.for("react.transitional.element"), l = /* @__PURE__ */ Symbol.for("react.fragment");
15
15
  function i(f, s, u) {
16
16
  var m = null;
17
17
  if (u !== void 0 && (m = "" + u), s.key !== void 0 && (m = "" + s.key), "key" in s) {
@@ -226,7 +226,7 @@ React keys must be passed directly to JSX without using spread:
226
226
  function y(e) {
227
227
  return typeof e == "object" && e !== null && e.$$typeof === j;
228
228
  }
229
- var R = ee, j = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), J = Symbol.for("react.consumer"), V = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), k = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
229
+ var R = ee, j = /* @__PURE__ */ Symbol.for("react.transitional.element"), W = /* @__PURE__ */ Symbol.for("react.portal"), v = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"), z = /* @__PURE__ */ Symbol.for("react.forward_ref"), G = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), B = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), H = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), k = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, x = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
230
230
  return null;
231
231
  };
232
232
  R = {
package/dist/mock-sw.js CHANGED
@@ -1,4 +1,4 @@
1
- const h=e=>{try{return new RegExp(e),!0}catch{return!1}},u=e=>{const s=e.split("?")[0];return/\.([a-zA-Z0-9]+)$/.test(s)};function f(e,s,n){return n.find(t=>{const o=t.method.toLowerCase()===e.toLowerCase();if(t.urlRegex&&h(t.url)){const a=new RegExp(t.url);return o&&a.test(s)}if(u(t.url))return o&&s.includes(t.url);const l=t.url===s||s.includes(t.url);return o&&l&&!u(s)})}function p(e,s,n){e.forEach(t=>t.postMessage({type:"EXECUTED",alias:s.alias,request:n}))}const y=(e,s,n)=>{const o=![204,205,304].includes(s),i=o?JSON.stringify(e):null;return new Response(i,{status:s,headers:o?n||{"Content-Type":"application/json"}:n||{}})},c="1.3.3";let r=[];const g=async e=>{const{method:s}=e.request,n=e.request.url,t=f(s,n,r);t&&(console.log("[TWD] Mock hit:",t.alias,s,n),e.respondWith((async()=>{let o=null;const i=e.request.headers.get("content-type")||"application/json";if(i.includes("application/json"))try{o=await e.request.clone().json()}catch{}else if(i.includes("form"))try{const l=await e.request.clone().formData();o={},l.forEach((a,d)=>{o[d]=a})}catch{}else if(i.includes("text"))try{o=await e.request.clone().text()}catch{}else if(i.includes("octet-stream"))try{o=await e.request.clone().arrayBuffer()}catch{}else if(i.includes("image"))try{o=await e.request.clone().blob()}catch{}else try{o=await e.request.clone().text()}catch{}return self.clients.matchAll().then(l=>{p(l,t,o)}),y(t.response,t.status??200,t.responseHeaders)})()))},m=e=>{e!==c&&console.warn(`[TWD] ⚠️ Version mismatch detected:
1
+ const h=e=>{try{return new RegExp(e),!0}catch{return!1}},u=e=>{const s=e.split("?")[0];return/\.([a-zA-Z0-9]+)$/.test(s)};function f(e,s,n){return n.find(t=>{const o=t.method.toLowerCase()===e.toLowerCase();if(t.urlRegex&&h(t.url)){const a=new RegExp(t.url);return o&&a.test(s)}if(u(t.url))return o&&s.includes(t.url);const l=t.url===s||s.includes(t.url);return o&&l&&!u(s)})}function p(e,s,n){e.forEach(t=>t.postMessage({type:"EXECUTED",alias:s.alias,request:n}))}const y=(e,s,n)=>{const o=![204,205,304].includes(s),i=o?JSON.stringify(e):null;return new Response(i,{status:s,headers:o?n||{"Content-Type":"application/json"}:n||{}})},c="1.3.4";let r=[];const g=async e=>{const{method:s}=e.request,n=e.request.url,t=f(s,n,r);t&&(console.log("[TWD] Mock hit:",t.alias,s,n),e.respondWith((async()=>{let o=null;const i=e.request.headers.get("content-type")||"application/json";if(i.includes("application/json"))try{o=await e.request.clone().json()}catch{}else if(i.includes("form"))try{const l=await e.request.clone().formData();o={},l.forEach((a,d)=>{o[d]=a})}catch{}else if(i.includes("text"))try{o=await e.request.clone().text()}catch{}else if(i.includes("octet-stream"))try{o=await e.request.clone().arrayBuffer()}catch{}else if(i.includes("image"))try{o=await e.request.clone().blob()}catch{}else try{o=await e.request.clone().text()}catch{}return self.clients.matchAll().then(l=>{p(l,t,o)}),y(t.response,t.status??200,t.responseHeaders)})()))},m=e=>{e!==c&&console.warn(`[TWD] ⚠️ Version mismatch detected:
2
2
  Client version: ${e}
3
3
  Service Worker version: ${c}
4
4
 
package/dist/ui.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { g as r, j as e } from "./jsx-runtime-DqUUEvWR.mjs";
1
+ import { g as r, j as e } from "./jsx-runtime-BGWd3k7q.mjs";
2
2
  function s({
3
3
  name: n,
4
4
  children: o
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twd-js",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Test While Developing (TWD) - in-browser testing",
5
5
  "license": "MIT",
6
6
  "author": "BRIKEV",
@@ -76,18 +76,18 @@
76
76
  "devDependencies": {
77
77
  "@preact/preset-vite": "^2.10.2",
78
78
  "@testing-library/jest-dom": "^6.9.1",
79
- "@testing-library/react": "^16.3.0",
79
+ "@testing-library/react": "^16.3.1",
80
80
  "@types/react": "^19.2.7",
81
81
  "@types/react-dom": "^19.2.3",
82
- "@vitejs/plugin-react": "^5.1.1",
83
- "@vitest/coverage-v8": "^4.0.15",
82
+ "@vitejs/plugin-react": "^5.1.2",
83
+ "@vitest/coverage-v8": "^4.0.16",
84
84
  "conventional-changelog": "^7.1.1",
85
- "jsdom": "^27.2.0",
85
+ "jsdom": "^27.4.0",
86
86
  "typescript": "^5.9.3",
87
- "vite": "^7.2.6",
87
+ "vite": "^7.3.0",
88
88
  "vite-plugin-dts": "^4.5.4",
89
89
  "vitepress": "^2.0.0-alpha.12",
90
- "vitest": "^4.0.15"
90
+ "vitest": "^4.0.16"
91
91
  },
92
92
  "keywords": [
93
93
  "testing",
@@ -103,7 +103,7 @@
103
103
  "@testing-library/dom": "^10.4.1",
104
104
  "@testing-library/user-event": "^14.6.1",
105
105
  "@types/chai": "^5.2.3",
106
- "chai": "^6.2.1",
107
- "preact": "^10.28.0"
106
+ "chai": "^6.2.2",
107
+ "preact": "^10.28.1"
108
108
  }
109
109
  }