@hortiview/shared-components 0.0.4723 → 0.0.4724
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/dist/_getTag-DyrzUAbj.js +494 -0
- package/dist/components/BaseView/BaseView.js +43 -297
- package/dist/components/BasicHeading/BasicHeading.js +24 -25
- package/dist/components/BasicHeading/BasicHeading.test.js +4 -4
- package/dist/components/BlockView/BlockView.js +14 -14
- package/dist/components/DeleteModal/DeleteModal.js +49 -4687
- package/dist/components/Disclaimer/Disclaimer.js +8 -10
- package/dist/components/EmptyView/EmptyView.js +8 -247
- package/dist/components/HashTabView/HashTabView.js +52 -1838
- package/dist/components/HeaderFilter/HeaderFilter.js +18 -7595
- package/dist/components/Iconify/Iconify.js +1 -1
- package/dist/components/ListArea/ListArea.js +316 -261
- package/dist/components/ListArea/ListArea.test.js +1 -1
- package/dist/components/ListArea/ListAreaService.js +34 -35
- package/dist/components/SearchBar/SearchBar.js +21 -2043
- package/package.json +1 -1
- package/dist/BlockView.module-ypKp14Lt.cjs +0 -1
- package/dist/HashTabView.module-B20c3S70.cjs +0 -1
- package/dist/HeaderFilter.module-DSCJz6-s.cjs +0 -1
- package/dist/_commonjsHelpers-DwTZ_eVU.cjs +0 -1
- package/dist/_getTag-DNUtgXkb.js +0 -136
- package/dist/_getTag-DSIzMwlx.cjs +0 -1
- package/dist/_stringToPath-B-GSTJ2e.cjs +0 -1
- package/dist/_stringToPath-BfzwTbL6.js +0 -54
- package/dist/baseView.module--VUY4h_X.cjs +0 -1
- package/dist/basicHeading.module-BbcVMp42.cjs +0 -1
- package/dist/component-DJvMx3oL.cjs +0 -148
- package/dist/component-Rx4bNsGO.js +0 -680
- package/dist/disclaimer.module-BfrBh-Rf.cjs +0 -1
- package/dist/index.es-80RhGkCD.cjs +0 -1
- package/dist/index.es-Ba9oZK_n.js +0 -769
- package/dist/index.es-C1ojb4Lq.js +0 -106
- package/dist/index.es-CEydmFbW.cjs +0 -23
- package/dist/index.es-CKdjg72r.cjs +0 -64
- package/dist/index.es-CNBieliG.js +0 -151
- package/dist/index.es-CPRODq-I.cjs +0 -127
- package/dist/index.es-CQ3ep412.js +0 -305
- package/dist/index.es-CSD_u-fK.cjs +0 -1
- package/dist/index.es-CVCp4d0C.js +0 -45
- package/dist/index.es-Cct4Uapb.js +0 -1776
- package/dist/index.es-Cj9DW-2T.js +0 -430
- package/dist/index.es-Cm4X20_S.js +0 -673
- package/dist/index.es-Cqx46S1V.cjs +0 -540
- package/dist/index.es-DiO-sp-V.cjs +0 -1
- package/dist/index.es-DyXn5zZ8.cjs +0 -1
- package/dist/index.es-InSNsV4f.js +0 -1067
- package/dist/index.es-J3ub0jmR.cjs +0 -1
- package/dist/index.es-L0ZCcbUf.js +0 -4939
- package/dist/index.es-gvcK6-6t.cjs +0 -1
- package/dist/listArea.module-CMO-yRdf.cjs +0 -1
- package/dist/magic-string.es-EQkD18No.cjs +0 -10
- package/dist/react.esm-CMNZXU0t.cjs +0 -93
- package/dist/searchBar.module-CFi8D8zn.cjs +0 -1
- package/dist/tslib.es6-CIXEwqhg.js +0 -72
- package/dist/tslib.es6-D1TYK0An.cjs +0 -1
- package/dist/useBreakpoint-PUopk3AO.cjs +0 -1
- package/dist/verticalDivider.module-Ciw9Fnt1.cjs +0 -1
- package/dist/vi.JYQecGiw-M1q0RI3O.cjs +0 -512
|
@@ -1,512 +0,0 @@
|
|
|
1
|
-
"use strict";const Bt=require("./_commonjsHelpers-DwTZ_eVU.cjs");function Le(e,t,n){const s=typeof e;if(!n.includes(s))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${s}"`)}function pr(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Ea(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function un(e){return Object.prototype.toString.apply(e).slice(8,-1)}function Sa(e,t){const n=typeof t=="function"?t:s=>t.add(s);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function vs(e){const t=new Set;return Ea(e)?[]:(Sa(e,t),Array.from(t))}const Es={forceWritable:!1};function Fr(e,t=Es){return Qn(e,new WeakMap,t)}function Qn(e,t,n=Es){let s,r;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(r=Array(s=e.length),t.set(e,r);s--;)r[s]=Qn(e[s],t,n);return r}if(Object.prototype.toString.call(e)==="[object Object]"){r=Object.create(Object.getPrototypeOf(e)),t.set(e,r);const o=vs(e);for(const i of o){const a=Object.getOwnPropertyDescriptor(e,i);if(!a)continue;const c=Qn(e[i],t,n);"get"in a?Object.defineProperty(r,i,{...a,get(){return c}}):Object.defineProperty(r,i,{...a,writable:n.forceWritable?!0:a.writable,value:c})}return r}return e}function Ta(e,t,n=void 0){const s=t.replace(/\[(\d+)\]/g,".$1").split(".");let r=e;for(const o of s)if(r=Object(r)[o],r===void 0)return n;return r}function Rr(){let e=null,t=null;const n=new Promise((s,r)=>{e=s,t=r});return n.resolve=e,n.reject=t,n}var Ze={},dr={exports:{}};dr.exports;(function(e){const n=(o=0)=>i=>`\x1B[${38+o};5;${i}m`,s=(o=0)=>(i,a,c)=>`\x1B[${38+o};2;${i};${a};${c}m`;function r(){const o=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.gray=i.color.blackBright,i.bgColor.bgGray=i.bgColor.bgBlackBright,i.color.grey=i.color.blackBright,i.bgColor.bgGrey=i.bgColor.bgBlackBright;for(const[a,c]of Object.entries(i)){for(const[l,h]of Object.entries(c))i[l]={open:`\x1B[${h[0]}m`,close:`\x1B[${h[1]}m`},c[l]=i[l],o.set(h[0],h[1]);Object.defineProperty(i,a,{value:c,enumerable:!1})}return Object.defineProperty(i,"codes",{value:o,enumerable:!1}),i.color.close="\x1B[39m",i.bgColor.close="\x1B[49m",i.color.ansi256=n(),i.color.ansi16m=s(),i.bgColor.ansi256=n(10),i.bgColor.ansi16m=s(10),Object.defineProperties(i,{rgbToAnsi256:{value:(a,c,l)=>a===c&&c===l?a<8?16:a>248?231:Math.round((a-8)/247*24)+232:16+36*Math.round(a/255*5)+6*Math.round(c/255*5)+Math.round(l/255*5),enumerable:!1},hexToRgb:{value:a=>{const c=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(a.toString(16));if(!c)return[0,0,0];let{colorString:l}=c.groups;l.length===3&&(l=l.split("").map(u=>u+u).join(""));const h=Number.parseInt(l,16);return[h>>16&255,h>>8&255,h&255]},enumerable:!1},hexToAnsi256:{value:a=>i.rgbToAnsi256(...i.hexToRgb(a)),enumerable:!1}}),i}Object.defineProperty(e,"exports",{enumerable:!0,get:r})})(dr);var xa=dr.exports,Ve={};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.printIteratorEntries=Aa;Ve.printIteratorValues=Ma;Ve.printListItems=Pa;Ve.printObjectProperties=$a;const Oa=(e,t)=>{const n=Object.keys(e),s=t!==null?n.sort(t):n;return Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r=>{Object.getOwnPropertyDescriptor(e,r).enumerable&&s.push(r)}),s};function Aa(e,t,n,s,r,o,i=": "){let a="",c=0,l=e.next();if(!l.done){a+=t.spacingOuter;const h=n+t.indent;for(;!l.done;){if(a+=h,c++===t.maxWidth){a+="…";break}const u=o(l.value[0],t,h,s,r),f=o(l.value[1],t,h,s,r);a+=u+i+f,l=e.next(),l.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+n}return a}function Ma(e,t,n,s,r,o){let i="",a=0,c=e.next();if(!c.done){i+=t.spacingOuter;const l=n+t.indent;for(;!c.done;){if(i+=l,a++===t.maxWidth){i+="…";break}i+=o(c.value,t,l,s,r),c=e.next(),c.done?t.min||(i+=","):i+=`,${t.spacingInner}`}i+=t.spacingOuter+n}return i}function Pa(e,t,n,s,r,o){let i="";if(e.length){i+=t.spacingOuter;const a=n+t.indent;for(let c=0;c<e.length;c++){if(i+=a,c===t.maxWidth){i+="…";break}c in e&&(i+=o(e[c],t,a,s,r)),c<e.length-1?i+=`,${t.spacingInner}`:t.min||(i+=",")}i+=t.spacingOuter+n}return i}function $a(e,t,n,s,r,o){let i="";const a=Oa(e,t.compareKeys);if(a.length){i+=t.spacingOuter;const c=n+t.indent;for(let l=0;l<a.length;l++){const h=a[l],u=o(h,t,c,s,r),f=o(e[h],t,c,s,r);i+=`${c+u}: ${f}`,l<a.length-1?i+=`,${t.spacingInner}`:t.min||(i+=",")}i+=t.spacingOuter+n}return i}var Ge={};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.test=Ge.serialize=Ge.default=void 0;var Dr=Ve,$n=globalThis["jest-symbol-do-not-touch"]||globalThis.Symbol;const _a=typeof $n=="function"&&$n.for?$n.for("jest.asymmetricMatcher"):1267621,Xt=" ",Ss=(e,t,n,s,r,o)=>{const i=e.toString();if(i==="ArrayContaining"||i==="ArrayNotContaining")return++s>t.maxDepth?`[${i}]`:`${i+Xt}[${(0,Dr.printListItems)(e.sample,t,n,s,r,o)}]`;if(i==="ObjectContaining"||i==="ObjectNotContaining")return++s>t.maxDepth?`[${i}]`:`${i+Xt}{${(0,Dr.printObjectProperties)(e.sample,t,n,s,r,o)}}`;if(i==="StringMatching"||i==="StringNotMatching"||i==="StringContaining"||i==="StringNotContaining")return i+Xt+o(e.sample,t,n,s,r);if(typeof e.toAsymmetricMatcher!="function")throw new Error(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()};Ge.serialize=Ss;const Ts=e=>e&&e.$$typeof===_a;Ge.test=Ts;const Ca={serialize:Ss,test:Ts};var Na=Ca;Ge.default=Na;var Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.test=Ye.serialize=Ye.default=void 0;var Br=Ve;const Ia=" ",xs=["DOMStringMap","NamedNodeMap"],ka=/^(HTML\w*Collection|NodeList)$/,ja=e=>xs.indexOf(e)!==-1||ka.test(e),Os=e=>e&&e.constructor&&!!e.constructor.name&&ja(e.constructor.name);Ye.test=Os;const Fa=e=>e.constructor.name==="NamedNodeMap",As=(e,t,n,s,r,o)=>{const i=e.constructor.name;return++s>t.maxDepth?`[${i}]`:(t.min?"":i+Ia)+(xs.indexOf(i)!==-1?`{${(0,Br.printObjectProperties)(Fa(e)?Array.from(e).reduce((a,c)=>(a[c.name]=c.value,a),{}):{...e},t,n,s,r,o)}}`:`[${(0,Br.printListItems)(Array.from(e),t,n,s,r,o)}]`)};Ye.serialize=As;const Ra={serialize:As,test:Os};var Da=Ra;Ye.default=Da;var Je={},Me={},mr={};Object.defineProperty(mr,"__esModule",{value:!0});mr.default=Ba;function Ba(e){return e.replace(/</g,"<").replace(/>/g,">")}Object.defineProperty(Me,"__esModule",{value:!0});Me.printText=Me.printProps=Me.printElementAsLeaf=Me.printElement=Me.printComment=Me.printChildren=void 0;var Ms=qa(mr);function qa(e){return e&&e.__esModule?e:{default:e}}const La=(e,t,n,s,r,o,i)=>{const a=s+n.indent,c=n.colors;return e.map(l=>{const h=t[l];let u=i(h,n,a,r,o);return typeof h!="string"&&(u.indexOf(`
|
|
2
|
-
`)!==-1&&(u=n.spacingOuter+a+u+n.spacingOuter+s),u=`{${u}}`),`${n.spacingInner+s+c.prop.open+l+c.prop.close}=${c.value.open}${u}${c.value.close}`}).join("")};Me.printProps=La;const za=(e,t,n,s,r,o)=>e.map(i=>t.spacingOuter+n+(typeof i=="string"?Ps(i,t):o(i,t,n,s,r))).join("");Me.printChildren=za;const Ps=(e,t)=>{const n=t.colors.content;return n.open+(0,Ms.default)(e)+n.close};Me.printText=Ps;const Wa=(e,t)=>{const n=t.colors.comment;return`${n.open}<!--${(0,Ms.default)(e)}-->${n.close}`};Me.printComment=Wa;const Va=(e,t,n,s,r)=>{const o=s.colors.tag;return`${o.open}<${e}${t&&o.close+t+s.spacingOuter+r+o.open}${n?`>${o.close}${n}${s.spacingOuter}${r}${o.open}</${e}`:`${t&&!s.min?"":" "}/`}>${o.close}`};Me.printElement=Va;const Ua=(e,t)=>{const n=t.colors.tag;return`${n.open}<${e}${n.close} …${n.open} />${n.close}`};Me.printElementAsLeaf=Ua;Object.defineProperty(Je,"__esModule",{value:!0});Je.test=Je.serialize=Je.default=void 0;var pt=Me;const Ka=1,$s=3,_s=8,Cs=11,Ga=/^((HTML|SVG)\w*)?Element$/,Ya=e=>{try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}},Ja=e=>{const t=e.constructor.name,{nodeType:n,tagName:s}=e,r=typeof s=="string"&&s.includes("-")||Ya(e);return n===Ka&&(Ga.test(t)||r)||n===$s&&t==="Text"||n===_s&&t==="Comment"||n===Cs&&t==="DocumentFragment"},Ns=e=>e?.constructor?.name&&Ja(e);Je.test=Ns;function Ha(e){return e.nodeType===$s}function Xa(e){return e.nodeType===_s}function _n(e){return e.nodeType===Cs}const Is=(e,t,n,s,r,o)=>{if(Ha(e))return(0,pt.printText)(e.data,t);if(Xa(e))return(0,pt.printComment)(e.data,t);const i=_n(e)?"DocumentFragment":e.tagName.toLowerCase();return++s>t.maxDepth?(0,pt.printElementAsLeaf)(i,t):(0,pt.printElement)(i,(0,pt.printProps)(_n(e)?[]:Array.from(e.attributes,a=>a.name).sort(),_n(e)?{}:Array.from(e.attributes).reduce((a,c)=>(a[c.name]=c.value,a),{}),t,n+t.indent,s,r,o),(0,pt.printChildren)(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,s,r,o),t,n)};Je.serialize=Is;const Qa={serialize:Is,test:Ns};var Za=Qa;Je.default=Za;var He={};Object.defineProperty(He,"__esModule",{value:!0});He.test=He.serialize=He.default=void 0;var qt=Ve;const ec="@@__IMMUTABLE_ITERABLE__@@",tc="@@__IMMUTABLE_LIST__@@",nc="@@__IMMUTABLE_KEYED__@@",rc="@@__IMMUTABLE_MAP__@@",qr="@@__IMMUTABLE_ORDERED__@@",oc="@@__IMMUTABLE_RECORD__@@",sc="@@__IMMUTABLE_SEQ__@@",ic="@@__IMMUTABLE_SET__@@",ac="@@__IMMUTABLE_STACK__@@",Et=e=>`Immutable.${e}`,yn=e=>`[${e}]`,Lt=" ",Lr="…",cc=(e,t,n,s,r,o,i)=>++s>t.maxDepth?yn(Et(i)):`${Et(i)+Lt}{${(0,qt.printIteratorEntries)(e.entries(),t,n,s,r,o)}}`;function uc(e){let t=0;return{next(){if(t<e._keys.length){const n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}const lc=(e,t,n,s,r,o)=>{const i=Et(e._name||"Record");return++s>t.maxDepth?yn(i):`${i+Lt}{${(0,qt.printIteratorEntries)(uc(e),t,n,s,r,o)}}`},fc=(e,t,n,s,r,o)=>{const i=Et("Seq");return++s>t.maxDepth?yn(i):e[nc]?`${i+Lt}{${e._iter||e._object?(0,qt.printIteratorEntries)(e.entries(),t,n,s,r,o):Lr}}`:`${i+Lt}[${e._iter||e._array||e._collection||e._iterable?(0,qt.printIteratorValues)(e.values(),t,n,s,r,o):Lr}]`},Cn=(e,t,n,s,r,o,i)=>++s>t.maxDepth?yn(Et(i)):`${Et(i)+Lt}[${(0,qt.printIteratorValues)(e.values(),t,n,s,r,o)}]`,ks=(e,t,n,s,r,o)=>e[rc]?cc(e,t,n,s,r,o,e[qr]?"OrderedMap":"Map"):e[tc]?Cn(e,t,n,s,r,o,"List"):e[ic]?Cn(e,t,n,s,r,o,e[qr]?"OrderedSet":"Set"):e[ac]?Cn(e,t,n,s,r,o,"Stack"):e[sc]?fc(e,t,n,s,r,o):lc(e,t,n,s,r,o);He.serialize=ks;const js=e=>e&&(e[ec]===!0||e[oc]===!0);He.test=js;const hc={serialize:ks,test:js};var pc=hc;He.default=pc;var Xe={},Zn={exports:{}},ie={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-is.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var zr;function dc(){if(zr)return ie;zr=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function E(g){if(typeof g=="object"&&g!==null){var M=g.$$typeof;switch(M){case e:switch(g=g.type,g){case n:case r:case s:case l:case h:return g;default:switch(g=g&&g.$$typeof,g){case a:case i:case c:case f:case u:case o:return g;default:return M}}case t:return M}}}return ie.ContextConsumer=i,ie.ContextProvider=o,ie.Element=e,ie.ForwardRef=c,ie.Fragment=n,ie.Lazy=f,ie.Memo=u,ie.Portal=t,ie.Profiler=r,ie.StrictMode=s,ie.Suspense=l,ie.SuspenseList=h,ie.isAsyncMode=function(){return!1},ie.isConcurrentMode=function(){return!1},ie.isContextConsumer=function(g){return E(g)===i},ie.isContextProvider=function(g){return E(g)===o},ie.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},ie.isForwardRef=function(g){return E(g)===c},ie.isFragment=function(g){return E(g)===n},ie.isLazy=function(g){return E(g)===f},ie.isMemo=function(g){return E(g)===u},ie.isPortal=function(g){return E(g)===t},ie.isProfiler=function(g){return E(g)===r},ie.isStrictMode=function(g){return E(g)===s},ie.isSuspense=function(g){return E(g)===l},ie.isSuspenseList=function(g){return E(g)===h},ie.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===r||g===s||g===l||g===h||g===b||typeof g=="object"&&g!==null&&(g.$$typeof===f||g.$$typeof===u||g.$$typeof===o||g.$$typeof===i||g.$$typeof===c||g.$$typeof===w||g.getModuleId!==void 0)},ie.typeOf=E,ie}var ae={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-is.development.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Wr;function mc(){return Wr||(Wr=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),w=!1,E=!1,g=!1,M=!1,P=!1,F;F=Symbol.for("react.module.reference");function I(D){return!!(typeof D=="string"||typeof D=="function"||D===n||D===r||P||D===s||D===l||D===h||M||D===b||w||E||g||typeof D=="object"&&D!==null&&(D.$$typeof===f||D.$$typeof===u||D.$$typeof===o||D.$$typeof===i||D.$$typeof===c||D.$$typeof===F||D.getModuleId!==void 0))}function k(D){if(typeof D=="object"&&D!==null){var pe=D.$$typeof;switch(pe){case e:var ue=D.type;switch(ue){case n:case r:case s:case l:case h:return ue;default:var de=ue&&ue.$$typeof;switch(de){case a:case i:case c:case f:case u:case o:return de;default:return pe}}case t:return pe}}}var U=i,B=o,G=e,se=c,V=n,Ee=f,be=u,Se=t,xe=r,$e=s,Oe=l,Pe=h,Ne=!1,p=!1;function T(D){return Ne||(Ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function x(D){return p||(p=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function $(D){return k(D)===i}function N(D){return k(D)===o}function R(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function _(D){return k(D)===c}function O(D){return k(D)===n}function L(D){return k(D)===f}function K(D){return k(D)===u}function J(D){return k(D)===t}function ne(D){return k(D)===r}function te(D){return k(D)===s}function H(D){return k(D)===l}function re(D){return k(D)===h}ae.ContextConsumer=U,ae.ContextProvider=B,ae.Element=G,ae.ForwardRef=se,ae.Fragment=V,ae.Lazy=Ee,ae.Memo=be,ae.Portal=Se,ae.Profiler=xe,ae.StrictMode=$e,ae.Suspense=Oe,ae.SuspenseList=Pe,ae.isAsyncMode=T,ae.isConcurrentMode=x,ae.isContextConsumer=$,ae.isContextProvider=N,ae.isElement=R,ae.isForwardRef=_,ae.isFragment=O,ae.isLazy=L,ae.isMemo=K,ae.isPortal=J,ae.isProfiler=ne,ae.isStrictMode=te,ae.isSuspense=H,ae.isSuspenseList=re,ae.isValidElementType=I,ae.typeOf=k}()),ae}process.env.NODE_ENV==="production"?Zn.exports=dc():Zn.exports=mc();var yc=Zn.exports;Object.defineProperty(Xe,"__esModule",{value:!0});Xe.test=Xe.serialize=Xe.default=void 0;var st=gc(yc),Qt=Me;function Fs(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Fs=function(s){return s?n:t})(e)}function gc(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Fs(t);if(n&&n.has(e))return n.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(s,o,i):s[o]=e[o]}return s.default=e,n&&n.set(e,s),s}const Rs=(e,t=[])=>(Array.isArray(e)?e.forEach(n=>{Rs(n,t)}):e!=null&&e!==!1&&t.push(e),t),Vr=e=>{const t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(st.isFragment(e))return"React.Fragment";if(st.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(st.isContextProvider(e))return"Context.Provider";if(st.isContextConsumer(e))return"Context.Consumer";if(st.isForwardRef(e)){if(t.displayName)return t.displayName;const n=t.render.displayName||t.render.name||"";return n!==""?`ForwardRef(${n})`:"ForwardRef"}if(st.isMemo(e)){const n=t.displayName||t.type.displayName||t.type.name||"";return n!==""?`Memo(${n})`:"Memo"}}return"UNDEFINED"},bc=e=>{const{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()},Ds=(e,t,n,s,r,o)=>++s>t.maxDepth?(0,Qt.printElementAsLeaf)(Vr(e),t):(0,Qt.printElement)(Vr(e),(0,Qt.printProps)(bc(e),e.props,t,n+t.indent,s,r,o),(0,Qt.printChildren)(Rs(e.props.children),t,n+t.indent,s,r,o),t,n);Xe.serialize=Ds;const Bs=e=>e!=null&&st.isElement(e);Xe.test=Bs;const wc={serialize:Ds,test:Bs};var vc=wc;Xe.default=vc;var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.test=Qe.serialize=Qe.default=void 0;var Zt=Me,Nn=globalThis["jest-symbol-do-not-touch"]||globalThis.Symbol;const Ec=typeof Nn=="function"&&Nn.for?Nn.for("react.test.json"):245830487,Sc=e=>{const{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]},qs=(e,t,n,s,r,o)=>++s>t.maxDepth?(0,Zt.printElementAsLeaf)(e.type,t):(0,Zt.printElement)(e.type,e.props?(0,Zt.printProps)(Sc(e),e.props,t,n+t.indent,s,r,o):"",e.children?(0,Zt.printChildren)(e.children,t,n+t.indent,s,r,o):"",t,n);Qe.serialize=qs;const Ls=e=>e&&e.$$typeof===Ec;Qe.test=Ls;const Tc={serialize:qs,test:Ls};var xc=Tc;Qe.default=xc;Object.defineProperty(Ze,"__esModule",{value:!0});Ze.default=Ze.DEFAULT_OPTIONS=void 0;var De=Ze.format=Qs,gn=Ze.plugins=void 0,Oc=ct(xa),_t=Ve,Ac=ct(Ge),Mc=ct(Ye),Pc=ct(Je),$c=ct(He),_c=ct(Xe),Cc=ct(Qe);function ct(e){return e&&e.__esModule?e:{default:e}}const zs=Object.prototype.toString,Nc=Date.prototype.toISOString,Ic=Error.prototype.toString,Ur=RegExp.prototype.toString,In=e=>typeof e.constructor=="function"&&e.constructor.name||"Object",kc=e=>typeof window<"u"&&e===window,jc=/^Symbol\((.*)\)(.*)$/,Fc=/\n/gi;class Ws extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}}function Rc(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}function Dc(e){return Object.is(e,-0)?"-0":String(e)}function Bc(e){return`${e}n`}function Kr(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Gr(e){return String(e).replace(jc,"Symbol($1)")}function Yr(e){return`[${Ic.call(e)}]`}function Vs(e,t,n,s){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";const r=typeof e;if(r==="number")return Dc(e);if(r==="bigint")return Bc(e);if(r==="string")return s?`"${e.replace(/"|\\/g,"\\$&")}"`:`"${e}"`;if(r==="function")return Kr(e,t);if(r==="symbol")return Gr(e);const o=zs.call(e);return o==="[object WeakMap]"?"WeakMap {}":o==="[object WeakSet]"?"WeakSet {}":o==="[object Function]"||o==="[object GeneratorFunction]"?Kr(e,t):o==="[object Symbol]"?Gr(e):o==="[object Date]"?isNaN(+e)?"Date { NaN }":Nc.call(e):o==="[object Error]"?Yr(e):o==="[object RegExp]"?n?Ur.call(e).replace(/[\\^$*+?.()|[\]{}]/g,"\\$&"):Ur.call(e):e instanceof Error?Yr(e):null}function Us(e,t,n,s,r,o){if(r.indexOf(e)!==-1)return"[Circular]";r=r.slice(),r.push(e);const i=++s>t.maxDepth,a=t.min;if(t.callToJSON&&!i&&e.toJSON&&typeof e.toJSON=="function"&&!o)return Ke(e.toJSON(),t,n,s,r,!0);const c=zs.call(e);return c==="[object Arguments]"?i?"[Arguments]":`${a?"":"Arguments "}[${(0,_t.printListItems)(e,t,n,s,r,Ke)}]`:Rc(c)?i?`[${e.constructor.name}]`:`${a||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${(0,_t.printListItems)(e,t,n,s,r,Ke)}]`:c==="[object Map]"?i?"[Map]":`Map {${(0,_t.printIteratorEntries)(e.entries(),t,n,s,r,Ke," => ")}}`:c==="[object Set]"?i?"[Set]":`Set {${(0,_t.printIteratorValues)(e.values(),t,n,s,r,Ke)}}`:i||kc(e)?`[${In(e)}]`:`${a||!t.printBasicPrototype&&In(e)==="Object"?"":`${In(e)} `}{${(0,_t.printObjectProperties)(e,t,n,s,r,Ke)}}`}function qc(e){return e.serialize!=null}function Ks(e,t,n,s,r,o){let i;try{i=qc(e)?e.serialize(t,n,s,r,o,Ke):e.print(t,a=>Ke(a,n,s,r,o),a=>{const c=s+n.indent;return c+a.replace(Fc,`
|
|
19
|
-
${c}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(a){throw new Ws(a.message,a.stack)}if(typeof i!="string")throw new Error(`pretty-format: Plugin must return type "string" but instead returned "${typeof i}".`);return i}function Gs(e,t){for(let n=0;n<e.length;n++)try{if(e[n].test(t))return e[n]}catch(s){throw new Ws(s.message,s.stack)}return null}function Ke(e,t,n,s,r,o){const i=Gs(t.plugins,e);if(i!==null)return Ks(i,e,t,n,s,r);const a=Vs(e,t.printFunctionName,t.escapeRegex,t.escapeString);return a!==null?a:Us(e,t,n,s,r,o)}const yr={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},Ys=Object.keys(yr),Lc=e=>e,Fe=Lc({callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,maxWidth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:yr});Ze.DEFAULT_OPTIONS=Fe;function zc(e){if(Object.keys(e).forEach(t=>{if(!Object.prototype.hasOwnProperty.call(Fe,t))throw new Error(`pretty-format: Unknown option "${t}".`)}),e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(e.theme!==void 0){if(e.theme===null)throw new Error('pretty-format: Option "theme" must not be null.');if(typeof e.theme!="object")throw new Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof e.theme}".`)}}const Wc=e=>Ys.reduce((t,n)=>{const s=e.theme&&e.theme[n]!==void 0?e.theme[n]:yr[n],r=s&&Oc.default[s];if(r&&typeof r.close=="string"&&typeof r.open=="string")t[n]=r;else throw new Error(`pretty-format: Option "theme" has a key "${n}" whose value "${s}" is undefined in ansi-styles.`);return t},Object.create(null)),Vc=()=>Ys.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null)),Js=e=>e?.printFunctionName??Fe.printFunctionName,Hs=e=>e?.escapeRegex??Fe.escapeRegex,Xs=e=>e?.escapeString??Fe.escapeString,Jr=e=>({callToJSON:e?.callToJSON??Fe.callToJSON,colors:e?.highlight?Wc(e):Vc(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:Fe.compareKeys,escapeRegex:Hs(e),escapeString:Xs(e),indent:e?.min?"":Uc(e?.indent??Fe.indent),maxDepth:e?.maxDepth??Fe.maxDepth,maxWidth:e?.maxWidth??Fe.maxWidth,min:e?.min??Fe.min,plugins:e?.plugins??Fe.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:Js(e),spacingInner:e?.min?" ":`
|
|
20
|
-
`,spacingOuter:e?.min?"":`
|
|
21
|
-
`});function Uc(e){return new Array(e+1).join(" ")}function Qs(e,t){if(t&&(zc(t),t.plugins)){const s=Gs(t.plugins,e);if(s!==null)return Ks(s,e,Jr(t),"",0,[])}const n=Vs(e,Js(t),Hs(t),Xs(t));return n!==null?n:Us(e,Jr(t),"",0,[])}const Kc={AsymmetricMatcher:Ac.default,DOMCollection:Mc.default,DOMElement:Pc.default,Immutable:$c.default,ReactElement:_c.default,ReactTestComponent:Cc.default};gn=Ze.plugins=Kc;var Gc=Qs;Ze.default=Gc;var er={exports:{}};const Yc={},Jc=Object.freeze(Object.defineProperty({__proto__:null,default:Yc},Symbol.toStringTag,{value:"Module"})),Zs=Bt.getAugmentedNamespace(Jc);(function(e,t){(function(n,s){s(t)})(Bt.commonjsGlobal,function(n){function s(d){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s=function(y){return typeof y}:s=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},s(d)}function r(d,y){return o(d)||i(d,y)||a(d,y)||l()}function o(d){if(Array.isArray(d))return d}function i(d,y){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(d)))){var A=[],q=!0,z=!1,Z=void 0;try{for(var oe=d[Symbol.iterator](),le;!(q=(le=oe.next()).done)&&(A.push(le.value),!(y&&A.length===y));q=!0);}catch(Te){z=!0,Z=Te}finally{try{!q&&oe.return!=null&&oe.return()}finally{if(z)throw Z}}return A}}function a(d,y){if(d){if(typeof d=="string")return c(d,y);var A=Object.prototype.toString.call(d).slice(8,-1);if(A==="Object"&&d.constructor&&(A=d.constructor.name),A==="Map"||A==="Set")return Array.from(d);if(A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return c(d,y)}}function c(d,y){(y==null||y>d.length)&&(y=d.length);for(var A=0,q=new Array(y);A<y;A++)q[A]=d[A];return q}function l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
22
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h={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"]},u={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},f="…";function b(d,y){var A=h[u[y]]||h[y];return A?"\x1B[".concat(A[0],"m").concat(String(d),"\x1B[").concat(A[1],"m"):String(d)}function w(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=d.showHidden,A=y===void 0?!1:y,q=d.depth,z=q===void 0?2:q,Z=d.colors,oe=Z===void 0?!1:Z,le=d.customInspect,Te=le===void 0?!0:le,ge=d.showProxy,je=ge===void 0?!1:ge,rt=d.maxArrayLength,Mn=rt===void 0?1/0:rt,Pt=d.breakLength,ht=Pt===void 0?1/0:Pt,$t=d.seen,ba=$t===void 0?[]:$t,kr=d.truncate,wa=kr===void 0?1/0:kr,jr=d.stylize,va=jr===void 0?String:jr,Pn={showHidden:!!A,depth:Number(z),colors:!!oe,customInspect:!!Te,showProxy:!!je,maxArrayLength:Number(Mn),breakLength:Number(ht),truncate:Number(wa),seen:ba,stylize:va};return Pn.colors&&(Pn.stylize=b),Pn}function E(d,y){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f;d=String(d);var q=A.length,z=d.length;return q>y&&z>q?A:z>y&&z>q?"".concat(d.slice(0,y-q)).concat(A):d}function g(d,y,A){var q=arguments.length>3&&arguments[3]!==void 0?arguments[3]:", ";A=A||y.inspect;var z=d.length;if(z===0)return"";for(var Z=y.truncate,oe="",le="",Te="",ge=0;ge<z;ge+=1){var je=ge+1===d.length,rt=ge+2===d.length;Te="".concat(f,"(").concat(d.length-ge,")");var Mn=d[ge];y.truncate=Z-oe.length-(je?0:q.length);var Pt=le||A(Mn,y)+(je?"":q),ht=oe.length+Pt.length,$t=ht+Te.length;if(je&&ht>Z&&oe.length+Te.length<=Z||!je&&!rt&&$t>Z||(le=je?"":A(d[ge+1],y)+(rt?"":q),!je&&rt&&$t>Z&&ht+le.length>Z))break;if(oe+=Pt,!je&&!rt&&ht+le.length>=Z){Te="".concat(f,"(").concat(d.length-ge-1,")");break}Te=""}return"".concat(oe).concat(Te)}function M(d){return d.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?d:JSON.stringify(d).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function P(d,y){var A=r(d,2),q=A[0],z=A[1];return y.truncate-=2,typeof q=="string"?q=M(q):typeof q!="number"&&(q="[".concat(y.inspect(q,y),"]")),y.truncate-=q.length,z=y.inspect(z,y),"".concat(q,": ").concat(z)}function F(d,y){var A=Object.keys(d).slice(d.length);if(!d.length&&!A.length)return"[]";y.truncate-=4;var q=g(d,y);y.truncate-=q.length;var z="";return A.length&&(z=g(A.map(function(Z){return[Z,d[Z]]}),y,P)),"[ ".concat(q).concat(z?", ".concat(z):""," ]")}var I=Function.prototype.toString,k=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/,U=512;function B(d){if(typeof d!="function")return null;var y="";if(typeof Function.prototype.name>"u"&&typeof d.name>"u"){var A=I.call(d);if(A.indexOf("(")>U)return y;var q=A.match(k);q&&(y=q[1])}else y=d.name;return y}var G=B,se=function(y){return typeof Buffer=="function"&&y instanceof Buffer?"Buffer":y[Symbol.toStringTag]?y[Symbol.toStringTag]:G(y.constructor)};function V(d,y){var A=se(d);y.truncate-=A.length+4;var q=Object.keys(d).slice(d.length);if(!d.length&&!q.length)return"".concat(A,"[]");for(var z="",Z=0;Z<d.length;Z++){var oe="".concat(y.stylize(E(d[Z],y.truncate),"number")).concat(Z===d.length-1?"":", ");if(y.truncate-=oe.length,d[Z]!==d.length&&y.truncate<=3){z+="".concat(f,"(").concat(d.length-d[Z]+1,")");break}z+=oe}var le="";return q.length&&(le=g(q.map(function(Te){return[Te,d[Te]]}),y,P)),"".concat(A,"[ ").concat(z).concat(le?", ".concat(le):""," ]")}function Ee(d,y){var A=d.toJSON();if(A===null)return"Invalid Date";var q=A.split("T"),z=q[0];return y.stylize("".concat(z,"T").concat(E(q[1],y.truncate-z.length-1)),"date")}function be(d,y){var A=G(d);return A?y.stylize("[Function ".concat(E(A,y.truncate-11),"]"),"special"):y.stylize("[Function]","special")}function Se(d,y){var A=r(d,2),q=A[0],z=A[1];return y.truncate-=4,q=y.inspect(q,y),y.truncate-=q.length,z=y.inspect(z,y),"".concat(q," => ").concat(z)}function xe(d){var y=[];return d.forEach(function(A,q){y.push([q,A])}),y}function $e(d,y){var A=d.size-1;return A<=0?"Map{}":(y.truncate-=7,"Map{ ".concat(g(xe(d),y,Se)," }"))}var Oe=Number.isNaN||function(d){return d!==d};function Pe(d,y){return Oe(d)?y.stylize("NaN","number"):d===1/0?y.stylize("Infinity","number"):d===-1/0?y.stylize("-Infinity","number"):d===0?y.stylize(1/d===1/0?"+0":"-0","number"):y.stylize(E(d,y.truncate),"number")}function Ne(d,y){var A=E(d.toString(),y.truncate-1);return A!==f&&(A+="n"),y.stylize(A,"bigint")}function p(d,y){var A=d.toString().split("/")[2],q=y.truncate-(2+A.length),z=d.source;return y.stylize("/".concat(E(z,q),"/").concat(A),"regexp")}function T(d){var y=[];return d.forEach(function(A){y.push(A)}),y}function x(d,y){return d.size===0?"Set{}":(y.truncate-=7,"Set{ ".concat(g(T(d),y)," }"))}var $=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),N={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},R=16,_=4;function O(d){return N[d]||"\\u".concat("0000".concat(d.charCodeAt(0).toString(R)).slice(-_))}function L(d,y){return $.test(d)&&(d=d.replace($,O)),y.stylize("'".concat(E(d,y.truncate-2),"'"),"string")}function K(d){return"description"in Symbol.prototype?d.description?"Symbol(".concat(d.description,")"):"Symbol()":d.toString()}var J=function(){return"Promise{…}"};try{var ne=process.binding("util"),te=ne.getPromiseDetails,H=ne.kPending,re=ne.kRejected;Array.isArray(te(Promise.resolve()))&&(J=function(y,A){var q=te(y),z=r(q,2),Z=z[0],oe=z[1];return Z===H?"Promise{<pending>}":"Promise".concat(Z===re?"!":"","{").concat(A.inspect(oe,A),"}")})}catch{}var D=J;function pe(d,y){var A=Object.getOwnPropertyNames(d),q=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(d):[];if(A.length===0&&q.length===0)return"{}";if(y.truncate-=4,y.seen=y.seen||[],y.seen.indexOf(d)>=0)return"[Circular]";y.seen.push(d);var z=g(A.map(function(le){return[le,d[le]]}),y,P),Z=g(q.map(function(le){return[le,d[le]]}),y,P);y.seen.pop();var oe="";return z&&Z&&(oe=", "),"{ ".concat(z).concat(oe).concat(Z," }")}var ue=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function de(d,y){var A="";return ue&&ue in d&&(A=d[ue]),A=A||G(d.constructor),(!A||A==="_class")&&(A="<Anonymous Class>"),y.truncate-=A.length,"".concat(A).concat(pe(d,y))}function Ie(d,y){return d.length===0?"Arguments[]":(y.truncate-=13,"Arguments[ ".concat(g(d,y)," ]"))}var An=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description"];function v(d,y){var A=Object.getOwnPropertyNames(d).filter(function(oe){return An.indexOf(oe)===-1}),q=d.name;y.truncate-=q.length;var z="";typeof d.message=="string"?z=E(d.message,y.truncate):A.unshift("message"),z=z?": ".concat(z):"",y.truncate-=z.length+5;var Z=g(A.map(function(oe){return[oe,d[oe]]}),y,P);return"".concat(q).concat(z).concat(Z?" { ".concat(Z," }"):"")}function S(d,y){var A=r(d,2),q=A[0],z=A[1];return y.truncate-=3,z?"".concat(y.stylize(q,"yellow"),"=").concat(y.stylize('"'.concat(z,'"'),"string")):"".concat(y.stylize(q,"yellow"))}function C(d,y){return g(d,y,j,`
|
|
23
|
-
`)}function j(d,y){var A=d.getAttributeNames(),q=d.tagName.toLowerCase(),z=y.stylize("<".concat(q),"special"),Z=y.stylize(">","special"),oe=y.stylize("</".concat(q,">"),"special");y.truncate-=q.length*2+5;var le="";A.length>0&&(le+=" ",le+=g(A.map(function(je){return[je,d.getAttribute(je)]}),y,S," ")),y.truncate-=le.length;var Te=y.truncate,ge=C(d.children,y);return ge&&ge.length>Te&&(ge="".concat(f,"(").concat(d.children.length,")")),"".concat(z).concat(le).concat(Z).concat(ge).concat(oe)}var m=typeof Symbol=="function"&&typeof Symbol.for=="function",X=m?Symbol.for("chai/inspect"):"@@chai/inspect",me=!1;try{var ye=Zs;me=ye.inspect?ye.inspect.custom:!1}catch{me=!1}function _e(){this.key="chai/loupe__"+Math.random()+Date.now()}_e.prototype={get:function(y){return y[this.key]},has:function(y){return this.key in y},set:function(y,A){Object.isExtensible(y)&&Object.defineProperty(y,this.key,{value:A,configurable:!0})}};var Y=new(typeof WeakMap=="function"?WeakMap:_e),W={},Q={undefined:function(y,A){return A.stylize("undefined","undefined")},null:function(y,A){return A.stylize(null,"null")},boolean:function(y,A){return A.stylize(y,"boolean")},Boolean:function(y,A){return A.stylize(y,"boolean")},number:Pe,Number:Pe,bigint:Ne,BigInt:Ne,string:L,String:L,function:be,Function:be,symbol:K,Symbol:K,Array:F,Date:Ee,Map:$e,Set:x,RegExp:p,Promise:D,WeakSet:function(y,A){return A.stylize("WeakSet{…}","special")},WeakMap:function(y,A){return A.stylize("WeakMap{…}","special")},Arguments:Ie,Int8Array:V,Uint8Array:V,Uint8ClampedArray:V,Int16Array:V,Uint16Array:V,Int32Array:V,Uint32Array:V,Float32Array:V,Float64Array:V,Generator:function(){return""},DataView:function(){return""},ArrayBuffer:function(){return""},Error:v,HTMLCollection:C,NodeList:C},ee=function(y,A,q){return X in y&&typeof y[X]=="function"?y[X](A):me&&me in y&&typeof y[me]=="function"?y[me](A.depth,A):"inspect"in y&&typeof y.inspect=="function"?y.inspect(A.depth,A):"constructor"in y&&Y.has(y.constructor)?Y.get(y.constructor)(y,A):W[q]?W[q](y,A):""},he=Object.prototype.toString;function we(d,y){y=w(y),y.inspect=we;var A=y,q=A.customInspect,z=d===null?"null":s(d);if(z==="object"&&(z=he.call(d).slice(8,-1)),Q[z])return Q[z](d,y);if(q&&d){var Z=ee(d,y,z);if(Z)return typeof Z=="string"?Z:we(Z,y)}var oe=d?Object.getPrototypeOf(d):!1;return oe===Object.prototype||oe===null?pe(d,y):d&&typeof HTMLElement=="function"&&d instanceof HTMLElement?j(d,y):"constructor"in d?d.constructor!==Object?de(d,y):pe(d,y):d===Object(d)?pe(d,y):y.stylize(String(d),z)}function Ue(d,y){return Y.has(d)?!1:(Y.set(d,y),!0)}function ft(d,y){return d in W?!1:(W[d]=y,!0)}var ke=X;n.custom=ke,n.default=we,n.inspect=we,n.registerConstructor=Ue,n.registerStringTag=ft,Object.defineProperty(n,"__esModule",{value:!0})})})(er,er.exports);var ei=er.exports;const{AsymmetricMatcher:Hc,DOMCollection:Xc,DOMElement:Qc,Immutable:Zc,ReactElement:eu,ReactTestComponent:tu}=gn,Hr=[tu,eu,Qc,Xc,Zc,Hc];function ze(e,t=10,{maxLength:n,...s}={}){const r=n??1e4;let o;try{o=De(e,{maxDepth:t,escapeString:!1,plugins:Hr,...s})}catch{o=De(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:Hr,...s})}return o.length>=r&&t>1?ze(e,Math.floor(t/2)):o}const nu=/%[sdjifoOcj%]/g;function ti(...e){if(typeof e[0]!="string"){const o=[];for(let i=0;i<e.length;i++)o.push(dt(e[i],{depth:0,colors:!1,compact:3}));return o.join(" ")}const t=e.length;let n=1;const s=e[0];let r=String(s).replace(nu,o=>{if(o==="%%")return"%";if(n>=t)return o;switch(o){case"%s":{const i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:typeof i=="number"&&i===0&&1/i<0?"-0":typeof i=="object"&&i!==null?dt(i,{depth:0,colors:!1,compact:3}):String(i)}case"%d":{const i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:Number(i).toString()}case"%i":{const i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:Number.parseInt(String(i)).toString()}case"%f":return Number.parseFloat(String(e[n++])).toString();case"%o":return dt(e[n++],{showHidden:!0,showProxy:!0});case"%O":return dt(e[n++]);case"%c":return n++,"";case"%j":try{return JSON.stringify(e[n++])}catch(i){const a=i.message;if(a.includes("circular structure")||a.includes("cyclic structures")||a.includes("cyclic object"))return"[Circular]";throw i}default:return o}});for(let o=e[n];n<t;o=e[++n])o===null||typeof o!="object"?r+=` ${o}`:r+=` ${dt(o)}`;return r}function dt(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),ei.inspect(e,t)}function ru(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);const n=dt(e,t),s=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate)if(s==="[object Function]"){const r=e;return!r.name||r.name===""?"[Function]":`[Function: ${r.name}]`}else{if(s==="[object Array]")return`[ Array(${e.length}) ]`;if(s==="[object Object]"){const r=Object.keys(e);return`{ Object (${r.length>2?`${r.splice(0,2).join(", ")}, ...`:r.join(", ")}) }`}else return n}return n}const Xr=Symbol("vitest:SAFE_TIMERS"),ou=Symbol("vitest:SAFE_COLORS"),su={bold:["\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"],dim:["\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"],italic:["\x1B[3m","\x1B[23m"],underline:["\x1B[4m","\x1B[24m"],inverse:["\x1B[7m","\x1B[27m"],hidden:["\x1B[8m","\x1B[28m"],strikethrough:["\x1B[9m","\x1B[29m"],black:["\x1B[30m","\x1B[39m"],red:["\x1B[31m","\x1B[39m"],green:["\x1B[32m","\x1B[39m"],yellow:["\x1B[33m","\x1B[39m"],blue:["\x1B[34m","\x1B[39m"],magenta:["\x1B[35m","\x1B[39m"],cyan:["\x1B[36m","\x1B[39m"],white:["\x1B[37m","\x1B[39m"],gray:["\x1B[90m","\x1B[39m"],bgBlack:["\x1B[40m","\x1B[49m"],bgRed:["\x1B[41m","\x1B[49m"],bgGreen:["\x1B[42m","\x1B[49m"],bgYellow:["\x1B[43m","\x1B[49m"],bgBlue:["\x1B[44m","\x1B[49m"],bgMagenta:["\x1B[45m","\x1B[49m"],bgCyan:["\x1B[46m","\x1B[49m"],bgWhite:["\x1B[47m","\x1B[49m"]},iu=Object.entries(su);function gr(e){return String(e)}gr.open="";gr.close="";const au=iu.reduce((e,[t])=>(e[t]=gr,e),{isColorSupported:!1});function br(){return globalThis[ou]||au}function bn(){const{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:s,setImmediate:r,clearImmediate:o}=globalThis[Xr]||globalThis,{nextTick:i}=globalThis[Xr]||globalThis.process||{nextTick:a=>a()};return{nextTick:i,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:s,setImmediate:r,clearImmediate:o}}function cu(e){const{message:t="error",stackTraceLimit:n=1}=e||{},s=Error.stackTraceLimit,r=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=a=>a.stack;const i=new Error(t).stack||"";return Error.prepareStackTrace=r,Error.stackTraceLimit=s,i}var ni;ni=/\r?\n|[\r\u2028\u2029]/y;RegExp(ni.source);var ri={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(ri.keyword);new Set(ri.strict);var oi={};Object.defineProperty(oi,"__esModule",{value:!0});var Qr=oi.default=hu;const jt="diff-sequences",Ae=0,zt=(e,t,n,s,r)=>{let o=0;for(;e<t&&n<s&&r(e,n);)e+=1,n+=1,o+=1;return o},Wt=(e,t,n,s,r)=>{let o=0;for(;e<=t&&n<=s&&r(t,s);)t-=1,s-=1,o+=1;return o},kn=(e,t,n,s,r,o,i)=>{let a=0,c=-e,l=o[a],h=l;o[a]+=zt(l+1,t,s+l-c+1,n,r);const u=e<i?e:i;for(a+=1,c+=2;a<=u;a+=1,c+=2){if(a!==e&&h<o[a])l=o[a];else if(l=h+1,t<=l)return a-1;h=o[a],o[a]=l+zt(l+1,t,s+l-c+1,n,r)}return i},Zr=(e,t,n,s,r,o,i)=>{let a=0,c=e,l=o[a],h=l;o[a]-=Wt(t,l-1,n,s+l-c-1,r);const u=e<i?e:i;for(a+=1,c-=2;a<=u;a+=1,c-=2){if(a!==e&&o[a]<h)l=o[a];else if(l=h-1,l<t)return a-1;h=o[a],o[a]=l-Wt(t,l-1,n,s+l-c-1,r)}return i},uu=(e,t,n,s,r,o,i,a,c,l,h)=>{const u=s-t,f=n-t,w=r-s-f,E=-w-(e-1),g=-w+(e-1);let M=Ae;const P=e<a?e:a;for(let F=0,I=-e;F<=P;F+=1,I+=2){const k=F===0||F!==e&&M<i[F],U=k?i[F]:M,B=k?U:U+1,G=u+B-I,se=zt(B+1,n,G+1,r,o),V=B+se;if(M=i[F],i[F]=V,E<=I&&I<=g){const Ee=(e-1-(I+w))/2;if(Ee<=l&&c[Ee]-1<=V){const be=u+U-(k?I+1:I-1),Se=Wt(t,U,s,be,o),xe=U-Se,$e=be-Se,Oe=xe+1,Pe=$e+1;h.nChangePreceding=e-1,e-1===Oe+Pe-t-s?(h.aEndPreceding=t,h.bEndPreceding=s):(h.aEndPreceding=Oe,h.bEndPreceding=Pe),h.nCommonPreceding=Se,Se!==0&&(h.aCommonPreceding=Oe,h.bCommonPreceding=Pe),h.nCommonFollowing=se,se!==0&&(h.aCommonFollowing=B+1,h.bCommonFollowing=G+1);const Ne=V+1,p=G+se+1;return h.nChangeFollowing=e-1,e-1===n+r-Ne-p?(h.aStartFollowing=n,h.bStartFollowing=r):(h.aStartFollowing=Ne,h.bStartFollowing=p),!0}}}return!1},lu=(e,t,n,s,r,o,i,a,c,l,h)=>{const u=r-n,f=n-t,w=r-s-f,E=w-e,g=w+e;let M=Ae;const P=e<l?e:l;for(let F=0,I=e;F<=P;F+=1,I-=2){const k=F===0||F!==e&&c[F]<M,U=k?c[F]:M,B=k?U:U-1,G=u+B-I,se=Wt(t,B-1,s,G-1,o),V=B-se;if(M=c[F],c[F]=V,E<=I&&I<=g){const Ee=(e+(I-w))/2;if(Ee<=a&&V-1<=i[Ee]){const be=G-se;if(h.nChangePreceding=e,e===V+be-t-s?(h.aEndPreceding=t,h.bEndPreceding=s):(h.aEndPreceding=V,h.bEndPreceding=be),h.nCommonPreceding=se,se!==0&&(h.aCommonPreceding=V,h.bCommonPreceding=be),h.nChangeFollowing=e-1,e===1)h.nCommonFollowing=0,h.aStartFollowing=n,h.bStartFollowing=r;else{const Se=u+U-(k?I-1:I+1),xe=zt(U,n,Se,r,o);h.nCommonFollowing=xe,xe!==0&&(h.aCommonFollowing=U,h.bCommonFollowing=Se);const $e=U+xe,Oe=Se+xe;e-1===n+r-$e-Oe?(h.aStartFollowing=n,h.bStartFollowing=r):(h.aStartFollowing=$e,h.bStartFollowing=Oe)}return!0}}}return!1},fu=(e,t,n,s,r,o,i,a,c)=>{const l=s-t,h=r-n,u=n-t,f=r-s,b=f-u;let w=u,E=u;if(i[0]=t-1,a[0]=n,b%2===0){const g=(e||b)/2,M=(u+f)/2;for(let P=1;P<=M;P+=1)if(w=kn(P,n,r,l,o,i,w),P<g)E=Zr(P,t,s,h,o,a,E);else if(lu(P,t,n,s,r,o,i,w,a,E,c))return}else{const g=((e||b)+1)/2,M=(u+f+1)/2;let P=1;for(w=kn(P,n,r,l,o,i,w),P+=1;P<=M;P+=1)if(E=Zr(P-1,t,s,h,o,a,E),P<g)w=kn(P,n,r,l,o,i,w);else if(uu(P,t,n,s,r,o,i,w,a,E,c))return}throw new Error(`${jt}: no overlap aStart=${t} aEnd=${n} bStart=${s} bEnd=${r}`)},tr=(e,t,n,s,r,o,i,a,c,l)=>{if(r-s<n-t){if(o=!o,o&&i.length===1){const{foundSubsequence:V,isCommon:Ee}=i[0];i[1]={foundSubsequence:(be,Se,xe)=>{V(be,xe,Se)},isCommon:(be,Se)=>Ee(Se,be)}}const G=t,se=n;t=s,n=r,s=G,r=se}const{foundSubsequence:h,isCommon:u}=i[o?1:0];fu(e,t,n,s,r,u,a,c,l);const{nChangePreceding:f,aEndPreceding:b,bEndPreceding:w,nCommonPreceding:E,aCommonPreceding:g,bCommonPreceding:M,nCommonFollowing:P,aCommonFollowing:F,bCommonFollowing:I,nChangeFollowing:k,aStartFollowing:U,bStartFollowing:B}=l;t<b&&s<w&&tr(f,t,b,s,w,o,i,a,c,l),E!==0&&h(E,g,M),P!==0&&h(P,F,I),U<n&&B<r&&tr(k,U,n,B,r,o,i,a,c,l)},eo=(e,t)=>{if(typeof t!="number")throw new TypeError(`${jt}: ${e} typeof ${typeof t} is not a number`);if(!Number.isSafeInteger(t))throw new RangeError(`${jt}: ${e} value ${t} is not a safe integer`);if(t<0)throw new RangeError(`${jt}: ${e} value ${t} is a negative integer`)},to=(e,t)=>{const n=typeof t;if(n!=="function")throw new TypeError(`${jt}: ${e} typeof ${n} is not a function`)};function hu(e,t,n,s){eo("aLength",e),eo("bLength",t),to("isCommon",n),to("foundSubsequence",s);const r=zt(0,e,0,t,n);if(r!==0&&s(r,0,0),e!==r||t!==r){const o=r,i=r,a=Wt(o,e-1,i,t-1,n),c=e-a,l=t-a,h=r+a;e!==h&&t!==h&&tr(0,o,c,i,l,!1,[{foundSubsequence:s,isCommon:n}],[Ae],[Ae],{aCommonFollowing:Ae,aCommonPreceding:Ae,aEndPreceding:Ae,aStartFollowing:Ae,bCommonFollowing:Ae,bCommonPreceding:Ae,bEndPreceding:Ae,bStartFollowing:Ae,nChangeFollowing:Ae,nChangePreceding:Ae,nCommonFollowing:Ae,nCommonPreceding:Ae}),a!==0&&s(a,c,l)}}function no(e){if(e===void 0)return"undefined";if(e===null)return"null";if(Array.isArray(e))return"array";if(typeof e=="boolean")return"boolean";if(typeof e=="function")return"function";if(typeof e=="number")return"number";if(typeof e=="string")return"string";if(typeof e=="bigint")return"bigint";if(typeof e=="object"){if(e!=null){if(e.constructor===RegExp)return"regexp";if(e.constructor===Map)return"map";if(e.constructor===Set)return"set";if(e.constructor===Date)return"date"}return"object"}else if(typeof e=="symbol")return"symbol";throw new Error(`value of unknown type: ${e}`)}const St=-1,Tt=1,rn=0;class Ct{0;1;constructor(t,n){this[0]=t,this[1]=n}}const si="Compared values have no visual difference.",pu="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function du(e,t){return e.replace(/\s+$/,n=>t(n))}function wr(e,t,n,s,r,o){return e.length!==0?n(`${s} ${du(e,r)}`):s!==" "?n(s):t&&o.length!==0?n(`${s} ${o}`):""}function ii(e,t,{aColor:n,aIndicator:s,changeLineTrailingSpaceColor:r,emptyFirstOrLastLinePlaceholder:o}){return wr(e,t,n,s,r,o)}function ai(e,t,{bColor:n,bIndicator:s,changeLineTrailingSpaceColor:r,emptyFirstOrLastLinePlaceholder:o}){return wr(e,t,n,s,r,o)}function ci(e,t,{commonColor:n,commonIndicator:s,commonLineTrailingSpaceColor:r,emptyFirstOrLastLinePlaceholder:o}){return wr(e,t,n,s,r,o)}function ro(e,t,n,s,{patchColor:r}){return r(`@@ -${e+1},${t-e} +${n+1},${s-n} @@`)}function mu(e,t){const n=e.length,s=t.contextLines,r=s+s;let o=n,i=!1,a=0,c=0;for(;c!==n;){const I=c;for(;c!==n&&e[c][0]===rn;)c+=1;if(I!==c)if(I===0)c>s&&(o-=c-s,i=!0);else if(c===n){const k=c-I;k>s&&(o-=k-s,i=!0)}else{const k=c-I;k>r&&(o-=k-r,a+=1)}for(;c!==n&&e[c][0]!==rn;)c+=1}const l=a!==0||i;a!==0?o+=a+1:i&&(o+=1);const h=o-1,u=[];let f=0;l&&u.push("");let b=0,w=0,E=0,g=0;const M=I=>{const k=u.length;u.push(ci(I,k===0||k===h,t)),E+=1,g+=1},P=I=>{const k=u.length;u.push(ii(I,k===0||k===h,t)),E+=1},F=I=>{const k=u.length;u.push(ai(I,k===0||k===h,t)),g+=1};for(c=0;c!==n;){let I=c;for(;c!==n&&e[c][0]===rn;)c+=1;if(I!==c)if(I===0){c>s&&(I=c-s,b=I,w=I,E=b,g=w);for(let k=I;k!==c;k+=1)M(e[k][1])}else if(c===n){const k=c-I>s?I+s:c;for(let U=I;U!==k;U+=1)M(e[U][1])}else{const k=c-I;if(k>r){const U=I+s;for(let G=I;G!==U;G+=1)M(e[G][1]);u[f]=ro(b,E,w,g,t),f=u.length,u.push("");const B=k-r;b=E+B,w=g+B,E=b,g=w;for(let G=c-s;G!==c;G+=1)M(e[G][1])}else for(let U=I;U!==c;U+=1)M(e[U][1])}for(;c!==n&&e[c][0]===St;)P(e[c][1]),c+=1;for(;c!==n&&e[c][0]===Tt;)F(e[c][1]),c+=1}return l&&(u[f]=ro(b,E,w,g,t)),u.join(`
|
|
24
|
-
`)}function yu(e,t){return e.map((n,s,r)=>{const o=n[1],i=s===0||s===r.length-1;switch(n[0]){case St:return ii(o,i,t);case Tt:return ai(o,i,t);default:return ci(o,i,t)}}).join(`
|
|
25
|
-
`)}const oo=e=>e,ui=5;function gu(){const e=br();return{aAnnotation:"Expected",aColor:e.green,aIndicator:"-",bAnnotation:"Received",bColor:e.red,bIndicator:"+",changeColor:e.inverse,changeLineTrailingSpaceColor:oo,commonColor:e.dim,commonIndicator:" ",commonLineTrailingSpaceColor:oo,compareKeys:void 0,contextLines:ui,emptyFirstOrLastLinePlaceholder:"",expand:!0,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:e.yellow}}function bu(e){return e&&typeof e=="function"?e:void 0}function wu(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:ui}function Kt(e={}){return{...gu(),...e,compareKeys:bu(e.compareKeys),contextLines:wu(e.contextLines)}}function gt(e){return e.length===1&&e[0].length===0}function vu(e){let t=0,n=0;return e.forEach(s=>{switch(s[0]){case St:t+=1;break;case Tt:n+=1;break}}),{a:t,b:n}}function Eu({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:s,bColor:r,bIndicator:o,includeChangeCounts:i,omitAnnotationLines:a},c){if(a)return"";let l="",h="";if(i){const b=String(c.a),w=String(c.b),E=s.length-e.length,g=" ".repeat(Math.max(0,E)),M=" ".repeat(Math.max(0,-E)),P=w.length-b.length,F=" ".repeat(Math.max(0,P)),I=" ".repeat(Math.max(0,-P));l=`${g} ${n} ${F}${b}`,h=`${M} ${o} ${I}${w}`}const u=`${n} ${e}${l}`,f=`${o} ${s}${h}`;return`${t(u)}
|
|
26
|
-
${r(f)}
|
|
27
|
-
|
|
28
|
-
`}function li(e,t){return Eu(t,vu(e))+(t.expand?yu(e,t):mu(e,t))}function vr(e,t,n){return li(fi(gt(e)?[]:e,gt(t)?[]:t),Kt(n))}function Su(e,t,n,s,r){if(gt(e)&>(n)&&(e=[],n=[]),gt(t)&>(s)&&(t=[],s=[]),e.length!==n.length||t.length!==s.length)return vr(e,t,r);const o=fi(n,s);let i=0,a=0;return o.forEach(c=>{switch(c[0]){case St:c[1]=e[i],i+=1;break;case Tt:c[1]=t[a],a+=1;break;default:c[1]=t[a],i+=1,a+=1}}),li(o,Kt(r))}function fi(e,t){const n=e.length,s=t.length,r=(h,u)=>e[h]===t[u],o=[];let i=0,a=0;const c=(h,u,f)=>{for(;i!==u;i+=1)o.push(new Ct(St,e[i]));for(;a!==f;a+=1)o.push(new Ct(Tt,t[a]));for(;h!==0;h-=1,i+=1,a+=1)o.push(new Ct(rn,t[a]))};for((Qr.default||Qr)(n,s,r,c);i!==n;i+=1)o.push(new Ct(St,e[i]));for(;a!==s;a+=1)o.push(new Ct(Tt,t[a]));return o}function nr(e,t){const{commonColor:n}=Kt(t);return n(e)}const{AsymmetricMatcher:Tu,DOMCollection:xu,DOMElement:Ou,Immutable:Au,ReactElement:Mu,ReactTestComponent:Pu}=gn,hi=[Pu,Mu,Ou,xu,Au,Tu],rr={plugins:hi},pi={callToJSON:!1,maxDepth:10,plugins:hi};function Vt(e,t,n){if(Object.is(e,t))return"";const s=no(e);let r=s,o=!1;if(s==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return null;r=e.getExpectedType(),o=r==="string"}if(r!==no(t)){const{aAnnotation:i,aColor:a,aIndicator:c,bAnnotation:l,bColor:h,bIndicator:u}=Kt(n),f=or(pi,n),b=De(e,f),w=De(t,f),E=`${a(`${c} ${i}:`)}
|
|
29
|
-
${b}`,g=`${h(`${u} ${l}:`)}
|
|
30
|
-
${w}`;return`${E}
|
|
31
|
-
|
|
32
|
-
${g}`}if(o)return null;switch(s){case"string":return vr(e.split(`
|
|
33
|
-
`),t.split(`
|
|
34
|
-
`),n);case"boolean":case"number":return $u(e,t,n);case"map":return jn(so(e),so(t),n);case"set":return jn(io(e),io(t),n);default:return jn(e,t,n)}}function $u(e,t,n){const s=De(e,rr),r=De(t,rr);return s===r?"":vr(s.split(`
|
|
35
|
-
`),r.split(`
|
|
36
|
-
`),n)}function so(e){return new Map(Array.from(e.entries()).sort())}function io(e){return new Set(Array.from(e.values()).sort())}function jn(e,t,n){let s,r=!1;try{const i=or(rr,n);s=ao(e,t,i,n)}catch{r=!0}const o=nr(si,n);if(s===void 0||s===o){const i=or(pi,n);s=ao(e,t,i,n),s!==o&&!r&&(s=`${nr(pu,n)}
|
|
37
|
-
|
|
38
|
-
${s}`)}return s}function or(e,t){const{compareKeys:n}=Kt(t);return{...e,compareKeys:n}}function ao(e,t,n,s){const r={...n,indent:0},o=De(e,r),i=De(t,r);if(o===i)return nr(si,s);{const a=De(e,n),c=De(t,n);return Su(a.split(`
|
|
39
|
-
`),c.split(`
|
|
40
|
-
`),o.split(`
|
|
41
|
-
`),i.split(`
|
|
42
|
-
`),s)}}const _u="@@__IMMUTABLE_RECORD__@@",Cu="@@__IMMUTABLE_ITERABLE__@@";function Nu(e){return e&&(e[Cu]||e[_u])}const Iu=Object.getPrototypeOf({});function co(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function Ft(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(typeof e=="function")return`Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(Nu(e))return Ft(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return"Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.asymmetricMatch=="function")return`${e.toString()} ${ti(e.sample)}`;if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=new Array(e.length);return t.set(e,n),e.forEach((s,r)=>{try{n[r]=Ft(s,t)}catch(o){n[r]=co(o)}}),n}else{const n=Object.create(null);t.set(e,n);let s=e;for(;s&&s!==Iu;)Object.getOwnPropertyNames(s).forEach(r=>{if(!(r in n))try{n[r]=Ft(e[r],t)}catch(o){delete n[r],n[r]=co(o)}}),s=Object.getPrototypeOf(s);return n}}function uo(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function ku(e,t){if(!e||typeof e!="object")return{message:e};if(e.stack&&(e.stackStr=String(e.stack)),e.name&&(e.nameStr=String(e.name)),e.showDiff||e.showDiff===void 0&&e.expected!==void 0&&e.actual!==void 0){const n=Fr(e.actual,{forceWritable:!0}),s=Fr(e.expected,{forceWritable:!0}),{replacedActual:r,replacedExpected:o}=di(n,s);e.diff=Vt(o,r,{...t,...e.diffOptions})}typeof e.expected!="string"&&(e.expected=ze(e.expected,10)),typeof e.actual!="string"&&(e.actual=ze(e.actual,10));try{typeof e.message=="string"&&(e.message=uo(e.message)),typeof e.cause=="object"&&typeof e.cause.message=="string"&&(e.cause.message=uo(e.cause.message))}catch{}try{return Ft(e)}catch(n){return Ft(new Error(`Failed to fully serialize error: ${n?.message}
|
|
43
|
-
Inner error message: ${e?.message}`))}}function lo(e){return un(e)==="Object"&&typeof e.asymmetricMatch=="function"}function fo(e,t){const n=un(e),s=un(t);return n===s&&(n==="Object"||n==="Array")}function di(e,t,n=new WeakSet,s=new WeakSet){return fo(e,t)?n.has(e)||s.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),s.add(t),vs(t).forEach(r=>{const o=t[r],i=e[r];if(lo(o))o.asymmetricMatch(i)&&(e[r]=o);else if(lo(i))i.asymmetricMatch(o)&&(t[r]=i);else if(fo(i,o)){const a=di(i,o,n,s);e[r]=a.replacedActual,t[r]=a.replacedExpected}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function mi(e,t){function n(r){const o=function(...i){return t.apply(r,i)};Object.assign(o,t),o.withContext=()=>o.bind(r),o.setContext=(i,a)=>{r[i]=a},o.mergeContext=i=>{Object.assign(r,i)};for(const i of e)Object.defineProperty(o,i,{get(){return n({...r,[i]:!0})}});return o}const s=n({});return s.fn=t,s}function yi(e){const t=[e.name];let n=e;for(;n?.suite||n?.file;)n=n.suite||n.file,n?.name&&t.unshift(n.name);return t}const ju=/^[A-Za-z]:\//;function Fu(e=""){return e&&e.replace(/\\/g,"/").replace(ju,t=>t.toUpperCase())}const Ru=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Du(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const Bu=function(...e){e=e.map(s=>Fu(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const r=s>=0?e[s]:Du();!r||r.length===0||(t=`${r}/${t}`,n=ho(r))}return t=qu(t,!n),n&&!ho(t)?`/${t}`:t.length>0?t:"."};function qu(e,t){let n="",s=0,r=-1,o=0,i=null;for(let a=0;a<=e.length;++a){if(a<e.length)i=e[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(r===a-1||o===1))if(o===2){if(n.length<2||s!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){const c=n.lastIndexOf("/");c===-1?(n="",s=0):(n=n.slice(0,c),s=n.length-1-n.lastIndexOf("/")),r=a,o=0;continue}else if(n.length>0){n="",s=0,r=a,o=0;continue}}t&&(n+=n.length>0?"/..":"..",s=2)}else n.length>0?n+=`/${e.slice(r+1,a)}`:n=e.slice(r+1,a),s=a-r-1;r=a,o=0}else i==="."&&o!==-1?++o:o=-1}return n}const ho=function(e){return Ru.test(e)};function Lu(e=""){return!e||!e.includes("\\")?e:e.replace(/\\/g,"/")}const zu=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Wu(){return typeof process<"u"?process.cwd().replace(/\\/g,"/"):"/"}const Vu=function(...e){e=e.map(s=>Lu(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const r=s>=0?e[s]:Wu();!r||r.length===0||(t=`${r}/${t}`,n=po(r))}return t=Uu(t,!n),n&&!po(t)?`/${t}`:t.length>0?t:"."};function Uu(e,t){let n="",s=0,r=-1,o=0,i=null;for(let a=0;a<=e.length;++a){if(a<e.length)i=e[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(r===a-1||o===1))if(o===2){if(n.length<2||s!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){const c=n.lastIndexOf("/");c===-1?(n="",s=0):(n=n.slice(0,c),s=n.length-1-n.lastIndexOf("/")),r=a,o=0;continue}else if(n.length>0){n="",s=0,r=a,o=0;continue}}t&&(n+=n.length>0?"/..":"..",s=2)}else n.length>0?n+=`/${e.slice(r+1,a)}`:n=e.slice(r+1,a),s=a-r-1;r=a,o=0}else i==="."&&o!==-1?++o:o=-1}return n}const po=function(e){return zu.test(e)},mo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ku=new Uint8Array(64),Gu=new Uint8Array(128);for(let e=0;e<mo.length;e++){const t=mo.charCodeAt(e);Ku[e]=t,Gu[t]=e}var yo;(function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"})(yo||(yo={}));const gi=/^\s*at .*(\S+:\d+|\(native\))/m,Yu=/^(eval@)?(\[native code])?$/;function bi(e){if(!e.includes(":"))return[e];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!n)return[e];let s=n[1];return(s.startsWith("http:")||s.startsWith("https:"))&&(s=new URL(s).pathname),s.startsWith("/@fs/")&&(s=s.slice(typeof process<"u"&&process.platform==="win32"?5:4)),[s,n[2]||void 0,n[3]||void 0]}function Ju(e){let t=e.trim();if(Yu.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;const n=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=t.match(n),r=s&&s[1]?s[1]:void 0,[o,i,a]=bi(t.replace(n,""));return!o||!i||!a?null:{file:o,method:r||"",line:Number.parseInt(i),column:Number.parseInt(a)}}function Hu(e){const t=e.trim();return gi.test(t)?Xu(t):Ju(t)}function Xu(e){let t=e.trim();if(!gi.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const s=n.match(/ (\(.+\)$)/);n=s?n.replace(s[0],""):n;const[r,o,i]=bi(s?s[1]:n);let a=s&&n||"",c=r&&["eval","<anonymous>"].includes(r)?void 0:r;return!c||!o||!i?null:(a.startsWith("async ")&&(a=a.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=Vu(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"")),{method:a,file:c,line:Number.parseInt(o),column:Number.parseInt(i)})}const Qu=new WeakMap,wi=new WeakMap,vi=new WeakMap;function Zu(e,t){Qu.set(e,t)}function el(e,t){wi.set(e,t)}function tl(e){return wi.get(e)}function nl(e,t){vi.set(e,t)}function rl(e){return vi.get(e)}class ol extends Error{constructor(t,n){super(t),this.message=t,this.taskId=n.id}code="VITEST_PENDING";taskId}const Rt={tasks:[],currentSuite:null};function sl(e){var t;(t=Rt.currentSuite)==null||t.tasks.push(e)}async function il(e,t){const n=Rt.currentSuite;Rt.currentSuite=e,await t(),Rt.currentSuite=n}function Ei(e,t,n=!1){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:s,clearTimeout:r}=bn();return(...o)=>Promise.race([e(...o),new Promise((i,a)=>{var c;const l=s(()=>{r(l),a(new Error(cl(n,t)))},t);(c=l.unref)==null||c.call(l)})])}function al(e,t){var n;const s=function(){throw new Error("done() callback is deprecated, use promise instead")};return s.task=e,s.skip=()=>{throw e.pending=!0,new ol("test is skipped; abort execution",e)},s.onTestFailed=r=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(r)},s.onTestFinished=r=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(r)},((n=t.extendTaskContext)==null?void 0:n.call(t,s))||s}function cl(e,t){return`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
44
|
-
If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`}function ul(e,t={}){const n=["auto"],s=Object.entries(e).map(([r,o])=>{const i={value:o};return Array.isArray(o)&&o.length>=2&&pr(o[1])&&Object.keys(o[1]).some(a=>n.includes(a))&&(Object.assign(i,o[1]),i.value=o[0]),i.prop=r,i.isFn=typeof i.value=="function",i});return Array.isArray(t.fixtures)?t.fixtures=t.fixtures.concat(s):t.fixtures=s,s.forEach(r=>{if(r.isFn){const o=xi(r.value);o.length&&(r.deps=t.fixtures.filter(({prop:i})=>i!==r.prop&&o.includes(i)))}}),t}const Fn=new Map,Rn=new Map;function Si(e,t){return n=>{const s=n||t;if(!s)return e({});const r=tl(s);if(!r?.length)return e(s);const o=xi(e),i=r.some(({auto:f})=>f);if(!o.length&&!i)return e(s);Fn.get(s)||Fn.set(s,new Map);const a=Fn.get(s);Rn.has(s)||Rn.set(s,[]);const c=Rn.get(s),l=r.filter(({prop:f,auto:b})=>b||o.includes(f)),h=Ti(l);if(!h.length)return e(s);async function u(){for(const f of h){if(a.has(f))continue;const b=f.isFn?await ll(f.value,s,c):f.value;s[f.prop]=b,a.set(f,b),c.unshift(()=>{a.delete(f)})}}return u().then(()=>e(s))}}async function ll(e,t,n){const s=Rr();let r=!1;const o=e(t,async i=>{r=!0,s.resolve(i);const a=Rr();n.push(async()=>{a.resolve(),await o}),await a}).catch(i=>{if(!r){s.reject(i);return}throw i});return s}function Ti(e,t=new Set,n=[]){return e.forEach(s=>{if(!n.includes(s)){if(!s.isFn||!s.deps){n.push(s);return}if(t.has(s))throw new Error(`Circular fixture dependency detected: ${s.prop} <- ${[...t].reverse().map(r=>r.prop).join(" <- ")}`);t.add(s),Ti(s.deps,t,n),n.push(s),t.clear()}}),n}function xi(e){const t=e.toString().match(/[^(]*\(([^)]*)/);if(!t)return[];const n=go(t[1]);if(!n.length)return[];const s=n[0];if(!(s.startsWith("{")&&s.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${s}".`);const r=s.slice(1,-1).replace(/\s/g,""),o=go(r).map(a=>a.replace(/\:.*|\=.*/g,"")),i=o.at(-1);if(i&&i.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${i}".`);return o}function go(e){const t=[],n=[];let s=0;for(let o=0;o<e.length;o++)if(e[o]==="{"||e[o]==="[")n.push(e[o]==="{"?"}":"]");else if(e[o]===n[n.length-1])n.pop();else if(!n.length&&e[o]===","){const i=e.substring(s,o).trim();i&&t.push(i),s=o+1}const r=e.substring(s).trim();return r&&t.push(r),t}let fl;function hl(){return fl}const kt=wl(),pl=Er(function(e,t,n){wn().test.fn.call(this,xt(e),t,n)}),dl=kt;let mt,ml;function yl(){return mt}function wn(){return Rt.currentSuite||ml}function gl(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function ln(e,t){let n={},s=()=>{};if(typeof t=="object"){if(typeof e=="object")throw new TypeError("Cannot use two objects as arguments. Please provide options and a function callback in that order.");n=t}else typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e);if(typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");s=e}else typeof t=="function"&&(s=t);return{options:n,handler:s}}function bl(e,t=()=>{},n,s,r,o){const i=[],a=[];let c;b();const l=function(g="",M={}){const P={id:"",name:g,suite:void 0,each:M.each,fails:M.fails,context:void 0,type:"custom",retry:M.retry??mt.config.retry,repeats:M.repeats,mode:M.only?"only":M.skip?"skip":M.todo?"todo":"run",meta:M.meta??Object.create(null)},F=M.handler;(M.concurrent||!M.sequential&&mt.config.sequence.concurrent)&&(P.concurrent=!0),s&&(P.shuffle=!0);const I=al(P,mt);return Object.defineProperty(P,"context",{value:I,enumerable:!1}),el(I,M.fixtures),F&&Zu(P,Ei(Si(F,I),M?.timeout??mt.config.testTimeout)),mt.config.includeTaskLocation,i.push(P),P},h=Er(function(g,M,P){let{options:F,handler:I}=ln(M,P);typeof o=="object"&&(F=Object.assign({},o,F)),F.concurrent=this.concurrent||!this.sequential&&F?.concurrent,F.sequential=this.sequential||!this.concurrent&&F?.sequential;const k=l(xt(g),{...this,...F,handler:I});k.type="test"}),u={type:"collector",name:e,mode:n,options:o,test:h,tasks:i,collect:E,task:l,clear:w,on:f};function f(g,...M){rl(c)[g].push(...M)}function b(g){typeof o=="number"&&(o={timeout:o}),c={id:"",type:"suite",name:e,mode:n,each:r,shuffle:s,tasks:[],meta:Object.create(null),projectName:""},nl(c,gl())}function w(){i.length=0,a.length=0,b()}async function E(g){a.length=0,t&&await il(u,()=>t(h));const M=[];for(const P of[...a,...i])M.push(P.type==="collector"?await P.collect(g):P);return c.file=g,c.tasks=M,M.forEach(P=>{P.suite=c,g&&(P.file=g)}),c}return sl(u),u}function wl(){function e(t,n,s={}){const r=this.only?"only":this.skip?"skip":this.todo?"todo":"run",o=wn();let{options:i,handler:a}=ln(n,s);return o?.options&&(i={...o.options,...i}),i.concurrent=this.concurrent||!this.sequential&&i?.concurrent,i.sequential=this.sequential||!this.concurrent&&i?.sequential,bl(xt(t),a,r,this.shuffle,this.each,i)}return e.each=function(t,...n){const s=this.withContext();return this.setContext("each",!0),Array.isArray(t)&&n.length&&(t=Oi(t,n)),(r,o,i)=>{const a=xt(r),c=t.every(Array.isArray),{options:l,handler:h}=ln(o,i);t.forEach((u,f)=>{const b=Array.isArray(u)?u:[u];c?s(fn(a,b,f),l,()=>h(...b)):s(fn(a,b,f),l,()=>h(u))}),this.setContext("each",void 0)}},e.skipIf=t=>t?kt.skip:kt,e.runIf=t=>t?kt:kt.skip,mi(["concurrent","sequential","shuffle","skip","only","todo"],e)}function vl(e,t){const n=e;n.each=function(r,...o){const i=this.withContext();return this.setContext("each",!0),Array.isArray(r)&&o.length&&(r=Oi(r,o)),(a,c,l)=>{const h=xt(a),u=r.every(Array.isArray),{options:f,handler:b}=ln(c,l);r.forEach((w,E)=>{const g=Array.isArray(w)?w:[w];u?i(fn(h,g,E),f,()=>b(...g)):i(fn(h,g,E),f,()=>b(w))}),this.setContext("each",void 0)}},n.skipIf=function(r){return r?this.skip:this},n.runIf=function(r){return r?this:this.skip},n.extend=function(r){const o=ul(r,t);return Er(function(a,c,l){wn().test.fn.call(this,xt(a),c,l)},o)};const s=mi(["concurrent","sequential","skip","only","todo","fails"],n);return t&&s.mergeContext(t),s}function Er(e,t){return vl(e,t)}function xt(e){return typeof e=="string"?e:e instanceof Function?e.name||"<anonymous>":String(e)}function fn(e,t,n){e.includes("%#")&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/__vitest_escaped_%__/g,"%%"));const s=e.split("%").length-1;let r=ti(e,...t.slice(0,s));return pr(t[0])&&(r=r.replace(/\$([$\w_.]+)/g,(o,i)=>{var a,c;return ru(Ta(t[0],i),{truncate:(c=(a=void 0)==null?void 0:a.chaiConfig)==null?void 0:c.truncateThreshold})})),r}function Oi(e,t){const n=e.join("").trim().replace(/ /g,"").split(`
|
|
45
|
-
`).map(r=>r.split("|"))[0],s=[];for(let r=0;r<Math.floor(t.length/n.length);r++){const o={};for(let i=0;i<n.length;i++)o[n[i]]=t[r*n.length+i];s.push(o)}return s}function El(){return yl().config.hookTimeout}function Sl(e,t){return wn().on("beforeEach",Ei(Si(e),t??El(),!0))}function Sr(){const e=globalThis.__vitest_worker__;if(!e){const t=`Vitest failed to access its internal state.
|
|
46
|
-
|
|
47
|
-
One of the following is possible:
|
|
48
|
-
- "vitest" is imported directly without running "vitest" command
|
|
49
|
-
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
50
|
-
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
51
|
-
`;throw new Error(t)}return e}function Tl(){const e=Sr();return e?.environment.name}var Dn={};/*!
|
|
52
|
-
* assertion-error
|
|
53
|
-
* Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
|
|
54
|
-
* MIT Licensed
|
|
55
|
-
*//*!
|
|
56
|
-
* Return a function that will copy properties from
|
|
57
|
-
* one object to another excluding any originally
|
|
58
|
-
* listed. Returned function will create a new `{}`.
|
|
59
|
-
*
|
|
60
|
-
* @param {String} excluded properties ...
|
|
61
|
-
* @return {Function}
|
|
62
|
-
*/function Ai(){var e=[].slice.call(arguments);function t(n,s){Object.keys(s).forEach(function(r){~e.indexOf(r)||(n[r]=s[r])})}return function(){for(var s=[].slice.call(arguments),r=0,o={};r<s.length;r++)t(o,s[r]);return o}}/*!
|
|
63
|
-
* Primary Exports
|
|
64
|
-
*/var Mi=at;function at(e,t,n){var s=Ai("name","message","stack","constructor","toJSON"),r=s(t||{});this.message=e||"Unspecified AssertionError",this.showDiff=!1;for(var o in r)this[o]=r[o];if(n=n||at,Error.captureStackTrace)Error.captureStackTrace(this,n);else try{throw new Error}catch(i){this.stack=i.stack}}/*!
|
|
65
|
-
* Inherit from Error.prototype
|
|
66
|
-
*/at.prototype=Object.create(Error.prototype);/*!
|
|
67
|
-
* Statically set name
|
|
68
|
-
*/at.prototype.name="AssertionError";/*!
|
|
69
|
-
* Ensure correct constructor
|
|
70
|
-
*/at.prototype.constructor=at;at.prototype.toJSON=function(e){var t=Ai("constructor","toJSON","stack"),n=t({name:this.name},this);return e!==!1&&this.stack&&(n.stack=this.stack),n};var ce={};function Pi(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}function $i(e){var t=e.replace(/([^\\])\[/g,"$1.["),n=t.match(/(\\\.|[^.]+?)+/g);return n.map(function(r){if(r==="constructor"||r==="__proto__"||r==="prototype")return{};var o=/^\[(\d+)\]$/,i=o.exec(r),a=null;return i?a={i:parseFloat(i[1])}:a={p:r.replace(/\\([.[\]])/g,"$1")},a})}function bo(e,t,n){var s=e,r=null;n=typeof n>"u"?t.length:n;for(var o=0;o<n;o++){var i=t[o];s&&(typeof i.p>"u"?s=s[i.i]:s=s[i.p],o===n-1&&(r=s))}return r}function xl(e,t,n){for(var s=e,r=n.length,o=null,i=0;i<r;i++){var a=null,c=null;if(o=n[i],i===r-1)a=typeof o.p>"u"?o.i:o.p,s[a]=t;else if(typeof o.p<"u"&&s[o.p])s=s[o.p];else if(typeof o.i<"u"&&s[o.i])s=s[o.i];else{var l=n[i+1];a=typeof o.p>"u"?o.i:o.p,c=typeof l.p>"u"?[]:{},s[a]=c,s=s[a]}}}function _i(e,t){var n=$i(t),s=n[n.length-1],r={parent:n.length>1?bo(e,n,n.length-1):e,name:s.p||s.i,value:bo(e,n)};return r.exists=Pi(r.parent,r.name),r}function Ol(e,t){var n=_i(e,t);return n.value}function Al(e,t,n){var s=$i(t);return xl(e,n,s),e}var Ml={hasProperty:Pi,getPathInfo:_i,getPathValue:Ol,setPathValue:Al};/*!
|
|
71
|
-
* Chai - flag utility
|
|
72
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
73
|
-
* MIT Licensed
|
|
74
|
-
*/var qe=function(t,n,s){var r=t.__flags||(t.__flags=Object.create(null));if(arguments.length===3)r[n]=s;else return r[n]};/*!
|
|
75
|
-
* Chai - test utility
|
|
76
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
77
|
-
* MIT Licensed
|
|
78
|
-
*//*!
|
|
79
|
-
* Module dependencies
|
|
80
|
-
*/var Pl=qe,$l=function(t,n){var s=Pl(t,"negate"),r=n[0];return s?!r:r},Ci={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(Bt.commonjsGlobal,function(){var n=typeof Promise=="function",s=typeof self=="object"?self:Bt.commonjsGlobal,r=typeof Symbol<"u",o=typeof Map<"u",i=typeof Set<"u",a=typeof WeakMap<"u",c=typeof WeakSet<"u",l=typeof DataView<"u",h=r&&typeof Symbol.iterator<"u",u=r&&typeof Symbol.toStringTag<"u",f=i&&typeof Set.prototype.entries=="function",b=o&&typeof Map.prototype.entries=="function",w=f&&Object.getPrototypeOf(new Set().entries()),E=b&&Object.getPrototypeOf(new Map().entries()),g=h&&typeof Array.prototype[Symbol.iterator]=="function",M=g&&Object.getPrototypeOf([][Symbol.iterator]()),P=h&&typeof String.prototype[Symbol.iterator]=="function",F=P&&Object.getPrototypeOf(""[Symbol.iterator]()),I=8,k=-1;function U(B){var G=typeof B;if(G!=="object")return G;if(B===null)return"null";if(B===s)return"global";if(Array.isArray(B)&&(u===!1||!(Symbol.toStringTag in B)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&B===window.location)return"Location";if(typeof window.document=="object"&&B===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&B===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&B===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&B instanceof window.HTMLElement){if(B.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(B.tagName==="TD")return"HTMLTableDataCellElement";if(B.tagName==="TH")return"HTMLTableHeaderCellElement"}}var se=u&&B[Symbol.toStringTag];if(typeof se=="string")return se;var V=Object.getPrototypeOf(B);return V===RegExp.prototype?"RegExp":V===Date.prototype?"Date":n&&V===Promise.prototype?"Promise":i&&V===Set.prototype?"Set":o&&V===Map.prototype?"Map":c&&V===WeakSet.prototype?"WeakSet":a&&V===WeakMap.prototype?"WeakMap":l&&V===DataView.prototype?"DataView":o&&V===E?"Map Iterator":i&&V===w?"Set Iterator":g&&V===M?"Array Iterator":P&&V===F?"String Iterator":V===null?"Object":Object.prototype.toString.call(B).slice(I,k)}return U})})(Ci);var vn=Ci.exports;/*!
|
|
81
|
-
* Chai - expectTypes utility
|
|
82
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
83
|
-
* MIT Licensed
|
|
84
|
-
*/var _l=Mi,Bn=qe,Cl=vn,Nl=function(t,n){var s=Bn(t,"message"),r=Bn(t,"ssfi");s=s?s+": ":"",t=Bn(t,"object"),n=n.map(function(a){return a.toLowerCase()}),n.sort();var o=n.map(function(a,c){var l=~["a","e","i","o","u"].indexOf(a.charAt(0))?"an":"a",h=n.length>1&&c===n.length-1?"or ":"";return h+l+" "+a}).join(", "),i=Cl(t).toLowerCase();if(!n.some(function(a){return i===a}))throw new _l(s+"object tested must be "+o+", but "+i+" given",void 0,r)};/*!
|
|
85
|
-
* Chai - getActual utility
|
|
86
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
87
|
-
* MIT Licensed
|
|
88
|
-
*/var Ni=function(t,n){return n.length>4?n[4]:t._obj},Il=Function.prototype.toString,kl=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/,jl=512;function Fl(e){if(typeof e!="function")return null;var t="";if(typeof Function.prototype.name>"u"&&typeof e.name>"u"){var n=Il.call(e);if(n.indexOf("(")>jl)return t;var s=n.match(kl);s&&(t=s[1])}else t=e.name;return t}var Ii=Fl,At={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null},Rl=ei,wo=At,Tr=Dl;function Dl(e,t,n,s){var r={colors:s,depth:typeof n>"u"?2:n,showHidden:t,truncate:wo.truncateThreshold?wo.truncateThreshold:1/0};return Rl.inspect(e,r)}/*!
|
|
89
|
-
* Chai - flag utility
|
|
90
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
91
|
-
* MIT Licensed
|
|
92
|
-
*//*!
|
|
93
|
-
* Module dependencies
|
|
94
|
-
*/var Bl=Tr,vo=At,ki=function(t){var n=Bl(t),s=Object.prototype.toString.call(t);if(vo.truncateThreshold&&n.length>=vo.truncateThreshold){if(s==="[object Function]")return!t.name||t.name===""?"[Function]":"[Function: "+t.name+"]";if(s==="[object Array]")return"[ Array("+t.length+") ]";if(s==="[object Object]"){var r=Object.keys(t),o=r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", ");return"{ Object ("+o+") }"}else return n}else return n};/*!
|
|
95
|
-
* Chai - message composition utility
|
|
96
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
97
|
-
* MIT Licensed
|
|
98
|
-
*//*!
|
|
99
|
-
* Module dependencies
|
|
100
|
-
*/var qn=qe,ql=Ni,Ln=ki,Ll=function(t,n){var s=qn(t,"negate"),r=qn(t,"object"),o=n[3],i=ql(t,n),a=s?n[2]:n[1],c=qn(t,"message");return typeof a=="function"&&(a=a()),a=a||"",a=a.replace(/#\{this\}/g,function(){return Ln(r)}).replace(/#\{act\}/g,function(){return Ln(i)}).replace(/#\{exp\}/g,function(){return Ln(o)}),c?c+": "+a:a};/*!
|
|
101
|
-
* Chai - transferFlags utility
|
|
102
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
103
|
-
* MIT Licensed
|
|
104
|
-
*/var ut=function(t,n,s){var r=t.__flags||(t.__flags=Object.create(null));n.__flags||(n.__flags=Object.create(null)),s=arguments.length===3?s:!0;for(var o in r)(s||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(n.__flags[o]=r[o])},xr={exports:{}};/*!
|
|
105
|
-
* deep-eql
|
|
106
|
-
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
|
|
107
|
-
* MIT Licensed
|
|
108
|
-
*/var Eo=vn;function ji(){this._key="chai/deep-eql__"+Math.random()+Date.now()}ji.prototype={get:function(t){return t[this._key]},set:function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:!0})}};var Or=typeof WeakMap=="function"?WeakMap:ji;/*!
|
|
109
|
-
* Check to see if the MemoizeMap has recorded a result of the two operands
|
|
110
|
-
*
|
|
111
|
-
* @param {Mixed} leftHandOperand
|
|
112
|
-
* @param {Mixed} rightHandOperand
|
|
113
|
-
* @param {MemoizeMap} memoizeMap
|
|
114
|
-
* @returns {Boolean|null} result
|
|
115
|
-
*/function So(e,t,n){if(!n||Ot(e)||Ot(t))return null;var s=n.get(e);if(s){var r=s.get(t);if(typeof r=="boolean")return r}return null}/*!
|
|
116
|
-
* Set the result of the equality into the MemoizeMap
|
|
117
|
-
*
|
|
118
|
-
* @param {Mixed} leftHandOperand
|
|
119
|
-
* @param {Mixed} rightHandOperand
|
|
120
|
-
* @param {MemoizeMap} memoizeMap
|
|
121
|
-
* @param {Boolean} result
|
|
122
|
-
*/function en(e,t,n,s){if(!(!n||Ot(e)||Ot(t))){var r=n.get(e);r?r.set(t,s):(r=new Or,r.set(t,s),n.set(e,r))}}/*!
|
|
123
|
-
* Primary Export
|
|
124
|
-
*/xr.exports=En;xr.exports.MemoizeMap=Or;function En(e,t,n){if(n&&n.comparator)return To(e,t,n);var s=Fi(e,t);return s!==null?s:To(e,t,n)}function Fi(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:Ot(e)||Ot(t)?!1:null}/*!
|
|
125
|
-
* The main logic of the `deepEqual` function.
|
|
126
|
-
*
|
|
127
|
-
* @param {Mixed} leftHandOperand
|
|
128
|
-
* @param {Mixed} rightHandOperand
|
|
129
|
-
* @param {Object} [options] (optional) Additional options
|
|
130
|
-
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
|
|
131
|
-
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
|
|
132
|
-
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
|
|
133
|
-
references to blow the stack.
|
|
134
|
-
* @return {Boolean} equal match
|
|
135
|
-
*/function To(e,t,n){n=n||{},n.memoize=n.memoize===!1?!1:n.memoize||new Or;var s=n&&n.comparator,r=So(e,t,n.memoize);if(r!==null)return r;var o=So(t,e,n.memoize);if(o!==null)return o;if(s){var i=s(e,t);if(i===!1||i===!0)return en(e,t,n.memoize,i),i;var a=Fi(e,t);if(a!==null)return a}var c=Eo(e);if(c!==Eo(t))return en(e,t,n.memoize,!1),!1;en(e,t,n.memoize,!0);var l=zl(e,t,c,n);return en(e,t,n.memoize,l),l}function zl(e,t,n,s){switch(n){case"String":case"Number":case"Boolean":case"Date":return En(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return Ri(e,t,["name","message","code"],s);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return it(e,t,s);case"RegExp":return Wl(e,t);case"Generator":return Vl(e,t,s);case"DataView":return it(new Uint8Array(e.buffer),new Uint8Array(t.buffer),s);case"ArrayBuffer":return it(new Uint8Array(e),new Uint8Array(t),s);case"Set":return xo(e,t,s);case"Map":return xo(e,t,s);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 Kl(e,t,s)}}/*!
|
|
136
|
-
* Compare two Regular Expressions for equality.
|
|
137
|
-
*
|
|
138
|
-
* @param {RegExp} leftHandOperand
|
|
139
|
-
* @param {RegExp} rightHandOperand
|
|
140
|
-
* @return {Boolean} result
|
|
141
|
-
*/function Wl(e,t){return e.toString()===t.toString()}/*!
|
|
142
|
-
* Compare two Sets/Maps for equality. Faster than other equality functions.
|
|
143
|
-
*
|
|
144
|
-
* @param {Set} leftHandOperand
|
|
145
|
-
* @param {Set} rightHandOperand
|
|
146
|
-
* @param {Object} [options] (Optional)
|
|
147
|
-
* @return {Boolean} result
|
|
148
|
-
*/function xo(e,t,n){if(e.size!==t.size)return!1;if(e.size===0)return!0;var s=[],r=[];return e.forEach(function(i,a){s.push([i,a])}),t.forEach(function(i,a){r.push([i,a])}),it(s.sort(),r.sort(),n)}/*!
|
|
149
|
-
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
|
|
150
|
-
*
|
|
151
|
-
* @param {Iterable} leftHandOperand
|
|
152
|
-
* @param {Iterable} rightHandOperand
|
|
153
|
-
* @param {Object} [options] (Optional)
|
|
154
|
-
* @return {Boolean} result
|
|
155
|
-
*/function it(e,t,n){var s=e.length;if(s!==t.length)return!1;if(s===0)return!0;for(var r=-1;++r<s;)if(En(e[r],t[r],n)===!1)return!1;return!0}/*!
|
|
156
|
-
* Simple equality for generator objects such as those returned by generator functions.
|
|
157
|
-
*
|
|
158
|
-
* @param {Iterable} leftHandOperand
|
|
159
|
-
* @param {Iterable} rightHandOperand
|
|
160
|
-
* @param {Object} [options] (Optional)
|
|
161
|
-
* @return {Boolean} result
|
|
162
|
-
*/function Vl(e,t,n){return it(sr(e),sr(t),n)}/*!
|
|
163
|
-
* Determine if the given object has an @@iterator function.
|
|
164
|
-
*
|
|
165
|
-
* @param {Object} target
|
|
166
|
-
* @return {Boolean} `true` if the object has an @@iterator function.
|
|
167
|
-
*/function Ul(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}/*!
|
|
168
|
-
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
|
|
169
|
-
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
|
|
170
|
-
*
|
|
171
|
-
* @param {Object} target
|
|
172
|
-
* @returns {Array} an array of entries from the @@iterator function
|
|
173
|
-
*/function Oo(e){if(Ul(e))try{return sr(e[Symbol.iterator]())}catch{return[]}return[]}/*!
|
|
174
|
-
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
|
|
175
|
-
*
|
|
176
|
-
* @param {Generator} target
|
|
177
|
-
* @returns {Array} an array of entries from the Generator.
|
|
178
|
-
*/function sr(e){for(var t=e.next(),n=[t.value];t.done===!1;)t=e.next(),n.push(t.value);return n}/*!
|
|
179
|
-
* Gets all own and inherited enumerable keys from a target.
|
|
180
|
-
*
|
|
181
|
-
* @param {Object} target
|
|
182
|
-
* @returns {Array} an array of own and inherited enumerable keys from the target.
|
|
183
|
-
*/function Ao(e){var t=[];for(var n in e)t.push(n);return t}function Mo(e){for(var t=[],n=Object.getOwnPropertySymbols(e),s=0;s<n.length;s+=1){var r=n[s];Object.getOwnPropertyDescriptor(e,r).enumerable&&t.push(r)}return t}/*!
|
|
184
|
-
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
|
|
185
|
-
* each key. If any value of the given key is not equal, the function will return false (early).
|
|
186
|
-
*
|
|
187
|
-
* @param {Mixed} leftHandOperand
|
|
188
|
-
* @param {Mixed} rightHandOperand
|
|
189
|
-
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
|
|
190
|
-
* @param {Object} [options] (Optional)
|
|
191
|
-
* @return {Boolean} result
|
|
192
|
-
*/function Ri(e,t,n,s){var r=n.length;if(r===0)return!0;for(var o=0;o<r;o+=1)if(En(e[n[o]],t[n[o]],s)===!1)return!1;return!0}/*!
|
|
193
|
-
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
|
|
194
|
-
* for each enumerable key in the object.
|
|
195
|
-
*
|
|
196
|
-
* @param {Mixed} leftHandOperand
|
|
197
|
-
* @param {Mixed} rightHandOperand
|
|
198
|
-
* @param {Object} [options] (Optional)
|
|
199
|
-
* @return {Boolean} result
|
|
200
|
-
*/function Kl(e,t,n){var s=Ao(e),r=Ao(t),o=Mo(e),i=Mo(t);if(s=s.concat(o),r=r.concat(i),s.length&&s.length===r.length)return it(Po(s).sort(),Po(r).sort())===!1?!1:Ri(e,t,s,n);var a=Oo(e),c=Oo(t);return a.length&&a.length===c.length?(a.sort(),c.sort(),it(a,c,n)):s.length===0&&a.length===0&&r.length===0&&c.length===0}/*!
|
|
201
|
-
* Returns true if the argument is a primitive.
|
|
202
|
-
*
|
|
203
|
-
* This intentionally returns true for all objects that can be compared by reference,
|
|
204
|
-
* including functions and symbols.
|
|
205
|
-
*
|
|
206
|
-
* @param {Mixed} value
|
|
207
|
-
* @return {Boolean} result
|
|
208
|
-
*/function Ot(e){return e===null||typeof e!="object"}function Po(e){return e.map(function(n){return typeof n=="symbol"?n.toString():n})}var Gl=xr.exports,Yl=At;/*!
|
|
209
|
-
* Chai - isProxyEnabled helper
|
|
210
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
211
|
-
* MIT Licensed
|
|
212
|
-
*/var Sn=function(){return Yl.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"};/*!
|
|
213
|
-
* Chai - addProperty utility
|
|
214
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
215
|
-
* MIT Licensed
|
|
216
|
-
*/var zn,$o;function Jl(){if($o)return zn;$o=1;var e=lt(),t=qe,n=Sn,s=ut;return zn=function(o,i,a){a=a===void 0?function(){}:a,Object.defineProperty(o,i,{get:function c(){!n()&&!t(this,"lockSsfi")&&t(this,"ssfi",c);var l=a.call(this);if(l!==void 0)return l;var h=new e.Assertion;return s(this,h),h},configurable:!0})},zn}var Hl=Object.getOwnPropertyDescriptor(function(){},"length");/*!
|
|
217
|
-
* Chai - addLengthGuard utility
|
|
218
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
219
|
-
* MIT Licensed
|
|
220
|
-
*/var Tn=function(t,n,s){return Hl.configurable&&Object.defineProperty(t,"length",{get:function(){throw Error(s?"Invalid Chai property: "+n+'.length. Due to a compatibility issue, "length" cannot directly follow "'+n+'". Use "'+n+'.lengthOf" instead.':"Invalid Chai property: "+n+'.length. See docs for proper usage of "'+n+'".')}}),t};/*!
|
|
221
|
-
* Chai - getProperties utility
|
|
222
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
223
|
-
* MIT Licensed
|
|
224
|
-
*/var Xl=function(t){var n=Object.getOwnPropertyNames(t);function s(o){n.indexOf(o)===-1&&n.push(o)}for(var r=Object.getPrototypeOf(t);r!==null;)Object.getOwnPropertyNames(r).forEach(s),r=Object.getPrototypeOf(r);return n},Ql=At,_o=qe,Zl=Xl,ef=Sn;/*!
|
|
225
|
-
* Chai - proxify utility
|
|
226
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
227
|
-
* MIT Licensed
|
|
228
|
-
*/var Co=["__flags","__methods","_obj","assert"],xn=function(t,n){return ef()?new Proxy(t,{get:function s(r,o){if(typeof o=="string"&&Ql.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(n)throw Error("Invalid Chai property: "+n+"."+o+'. See docs for proper usage of "'+n+'".');var i=null,a=4;throw Zl(r).forEach(function(c){if(!Object.prototype.hasOwnProperty(c)&&Co.indexOf(c)===-1){var l=tf(o,c,a);l<a&&(i=c,a=l)}}),Error(i!==null?"Invalid Chai property: "+o+'. Did you mean "'+i+'"?':"Invalid Chai property: "+o)}return Co.indexOf(o)===-1&&!_o(r,"lockSsfi")&&_o(r,"ssfi",s),Reflect.get(r,o)}}):t};function tf(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;for(var s=[],r=0;r<=e.length;r++)s[r]=Array(t.length+1).fill(0),s[r][0]=r;for(var o=0;o<t.length;o++)s[0][o]=o;for(var r=1;r<=e.length;r++)for(var i=e.charCodeAt(r-1),o=1;o<=t.length;o++){if(Math.abs(r-o)>=n){s[r][o]=n;continue}s[r][o]=Math.min(s[r-1][o]+1,s[r][o-1]+1,s[r-1][o-1]+(i===t.charCodeAt(o-1)?0:1))}return s[e.length][t.length]}/*!
|
|
229
|
-
* Chai - addMethod utility
|
|
230
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
231
|
-
* MIT Licensed
|
|
232
|
-
*/var Wn,No;function nf(){if(No)return Wn;No=1;var e=Tn,t=lt(),n=qe,s=xn,r=ut;return Wn=function(i,a,c){var l=function(){n(this,"lockSsfi")||n(this,"ssfi",l);var h=c.apply(this,arguments);if(h!==void 0)return h;var u=new t.Assertion;return r(this,u),u};e(l,a,!1),i[a]=s(l,a)},Wn}/*!
|
|
233
|
-
* Chai - overwriteProperty utility
|
|
234
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
235
|
-
* MIT Licensed
|
|
236
|
-
*/var Vn,Io;function rf(){if(Io)return Vn;Io=1;var e=lt(),t=qe,n=Sn,s=ut;return Vn=function(o,i,a){var c=Object.getOwnPropertyDescriptor(o,i),l=function(){};c&&typeof c.get=="function"&&(l=c.get),Object.defineProperty(o,i,{get:function h(){!n()&&!t(this,"lockSsfi")&&t(this,"ssfi",h);var u=t(this,"lockSsfi");t(this,"lockSsfi",!0);var f=a(l).call(this);if(t(this,"lockSsfi",u),f!==void 0)return f;var b=new e.Assertion;return s(this,b),b},configurable:!0})},Vn}/*!
|
|
237
|
-
* Chai - overwriteMethod utility
|
|
238
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
239
|
-
* MIT Licensed
|
|
240
|
-
*/var Un,ko;function of(){if(ko)return Un;ko=1;var e=Tn,t=lt(),n=qe,s=xn,r=ut;return Un=function(i,a,c){var l=i[a],h=function(){throw new Error(a+" is not a function")};l&&typeof l=="function"&&(h=l);var u=function(){n(this,"lockSsfi")||n(this,"ssfi",u);var f=n(this,"lockSsfi");n(this,"lockSsfi",!0);var b=c(h).apply(this,arguments);if(n(this,"lockSsfi",f),b!==void 0)return b;var w=new t.Assertion;return r(this,w),w};e(u,a,!1),i[a]=s(u,a)},Un}/*!
|
|
241
|
-
* Chai - addChainingMethod utility
|
|
242
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
243
|
-
* MIT Licensed
|
|
244
|
-
*/var Kn,jo;function sf(){if(jo)return Kn;jo=1;/*!
|
|
245
|
-
* Module dependencies
|
|
246
|
-
*/var e=Tn,t=lt(),n=qe,s=xn,r=ut;/*!
|
|
247
|
-
* Module variables
|
|
248
|
-
*/var o=typeof Object.setPrototypeOf=="function",i=function(){},a=Object.getOwnPropertyNames(i).filter(function(h){var u=Object.getOwnPropertyDescriptor(i,h);return typeof u!="object"?!0:!u.configurable}),c=Function.prototype.call,l=Function.prototype.apply;return Kn=function(u,f,b,w){typeof w!="function"&&(w=function(){});var E={method:b,chainingBehavior:w};u.__methods||(u.__methods={}),u.__methods[f]=E,Object.defineProperty(u,f,{get:function(){E.chainingBehavior.call(this);var M=function(){n(this,"lockSsfi")||n(this,"ssfi",M);var I=E.method.apply(this,arguments);if(I!==void 0)return I;var k=new t.Assertion;return r(this,k),k};if(e(M,f,!0),o){var P=Object.create(this);P.call=c,P.apply=l,Object.setPrototypeOf(M,P)}else{var F=Object.getOwnPropertyNames(u);F.forEach(function(I){if(a.indexOf(I)===-1){var k=Object.getOwnPropertyDescriptor(u,I);Object.defineProperty(M,I,k)}})}return r(this,M),s(M)},configurable:!0})},Kn}/*!
|
|
249
|
-
* Chai - overwriteChainableMethod utility
|
|
250
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
251
|
-
* MIT Licensed
|
|
252
|
-
*/var Gn,Fo;function af(){if(Fo)return Gn;Fo=1;var e=lt(),t=ut;return Gn=function(s,r,o,i){var a=s.__methods[r],c=a.chainingBehavior;a.chainingBehavior=function(){var u=i(c).call(this);if(u!==void 0)return u;var f=new e.Assertion;return t(this,f),f};var l=a.method;a.method=function(){var u=o(l).apply(this,arguments);if(u!==void 0)return u;var f=new e.Assertion;return t(this,f),f}},Gn}/*!
|
|
253
|
-
* Chai - compareByInspect utility
|
|
254
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
255
|
-
* MIT Licensed
|
|
256
|
-
*//*!
|
|
257
|
-
* Module dependencies
|
|
258
|
-
*/var Ro=Tr,cf=function(t,n){return Ro(t)<Ro(n)?-1:1};/*!
|
|
259
|
-
* Chai - getOwnEnumerablePropertySymbols utility
|
|
260
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
261
|
-
* MIT Licensed
|
|
262
|
-
*/var Di=function(t){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})};/*!
|
|
263
|
-
* Chai - getOwnEnumerableProperties utility
|
|
264
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
265
|
-
* MIT Licensed
|
|
266
|
-
*//*!
|
|
267
|
-
* Module dependencies
|
|
268
|
-
*/var uf=Di,lf=function(t){return Object.keys(t).concat(uf(t))},Yn=Ii;function ff(e,t){return t instanceof Error&&e===t}function hf(e,t){return t instanceof Error?e.constructor===t.constructor||e instanceof t.constructor:t.prototype instanceof Error||t===Error?e.constructor===t||e instanceof t:!1}function pf(e,t){var n=typeof e=="string"?e:e.message;return t instanceof RegExp?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:!1}function df(e){var t=e;if(e instanceof Error)t=Yn(e.constructor);else if(typeof e=="function"&&(t=Yn(e),t==="")){var n=Yn(new e);t=n||t}return t}function mf(e){var t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}var yf={compatibleInstance:ff,compatibleConstructor:hf,compatibleMessage:pf,getMessage:mf,getConstructorName:df};/*!
|
|
269
|
-
* Chai - isNaN utility
|
|
270
|
-
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
|
271
|
-
* MIT Licensed
|
|
272
|
-
*/function gf(e){return e!==e}var bf=Number.isNaN||gf,wf=vn,Do=qe;function vf(e){var t=wf(e),n=["Array","Object","function"];return n.indexOf(t)!==-1}var Ef=function(t,n){var s=Do(t,"operator"),r=Do(t,"negate"),o=n[3],i=r?n[2]:n[1];if(s)return s;if(typeof i=="function"&&(i=i()),i=i||"",!!i&&!/\shave\s/.test(i)){var a=vf(o);return/\snot\s/.test(i)?a?"notDeepStrictEqual":"notStrictEqual":a?"deepStrictEqual":"strictEqual"}};/*!
|
|
273
|
-
* chai
|
|
274
|
-
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
|
|
275
|
-
* MIT Licensed
|
|
276
|
-
*/var Bo;function Sf(){if(Bo)return ce;Bo=1;/*!
|
|
277
|
-
* Dependencies that are used for multiple exports are required here only once
|
|
278
|
-
*/var e=Ml;/*!
|
|
279
|
-
* test utility
|
|
280
|
-
*/ce.test=$l;/*!
|
|
281
|
-
* type utility
|
|
282
|
-
*/ce.type=vn;/*!
|
|
283
|
-
* expectTypes utility
|
|
284
|
-
*/ce.expectTypes=Nl;/*!
|
|
285
|
-
* message utility
|
|
286
|
-
*/ce.getMessage=Ll;/*!
|
|
287
|
-
* actual utility
|
|
288
|
-
*/ce.getActual=Ni;/*!
|
|
289
|
-
* Inspect util
|
|
290
|
-
*/ce.inspect=Tr;/*!
|
|
291
|
-
* Object Display util
|
|
292
|
-
*/ce.objDisplay=ki;/*!
|
|
293
|
-
* Flag utility
|
|
294
|
-
*/ce.flag=qe;/*!
|
|
295
|
-
* Flag transferring utility
|
|
296
|
-
*/ce.transferFlags=ut;/*!
|
|
297
|
-
* Deep equal utility
|
|
298
|
-
*/ce.eql=Gl;/*!
|
|
299
|
-
* Deep path info
|
|
300
|
-
*/ce.getPathInfo=e.getPathInfo;/*!
|
|
301
|
-
* Check if a property exists
|
|
302
|
-
*/ce.hasProperty=e.hasProperty;/*!
|
|
303
|
-
* Function name
|
|
304
|
-
*/ce.getName=Ii;/*!
|
|
305
|
-
* add Property
|
|
306
|
-
*/ce.addProperty=Jl();/*!
|
|
307
|
-
* add Method
|
|
308
|
-
*/ce.addMethod=nf();/*!
|
|
309
|
-
* overwrite Property
|
|
310
|
-
*/ce.overwriteProperty=rf();/*!
|
|
311
|
-
* overwrite Method
|
|
312
|
-
*/ce.overwriteMethod=of();/*!
|
|
313
|
-
* Add a chainable method
|
|
314
|
-
*/ce.addChainableMethod=sf();/*!
|
|
315
|
-
* Overwrite chainable method
|
|
316
|
-
*/ce.overwriteChainableMethod=af();/*!
|
|
317
|
-
* Compare by inspect method
|
|
318
|
-
*/ce.compareByInspect=cf;/*!
|
|
319
|
-
* Get own enumerable property symbols method
|
|
320
|
-
*/ce.getOwnEnumerablePropertySymbols=Di;/*!
|
|
321
|
-
* Get own enumerable properties method
|
|
322
|
-
*/ce.getOwnEnumerableProperties=lf;/*!
|
|
323
|
-
* Checks error against a given set of criteria
|
|
324
|
-
*/ce.checkError=yf;/*!
|
|
325
|
-
* Proxify util
|
|
326
|
-
*/ce.proxify=xn;/*!
|
|
327
|
-
* addLengthGuard util
|
|
328
|
-
*/ce.addLengthGuard=Tn;/*!
|
|
329
|
-
* isProxyEnabled helper
|
|
330
|
-
*/ce.isProxyEnabled=Sn;/*!
|
|
331
|
-
* isNaN method
|
|
332
|
-
*/ce.isNaN=bf;/*!
|
|
333
|
-
* getOperator method
|
|
334
|
-
*/return ce.getOperator=Ef,ce}/*!
|
|
335
|
-
* chai
|
|
336
|
-
* http://chaijs.com
|
|
337
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
338
|
-
* MIT Licensed
|
|
339
|
-
*/var ot=At,Tf=function(e,t){/*!
|
|
340
|
-
* Module dependencies.
|
|
341
|
-
*/var n=e.AssertionError,s=t.flag;/*!
|
|
342
|
-
* Module export.
|
|
343
|
-
*/e.Assertion=r;/*!
|
|
344
|
-
* Assertion Constructor
|
|
345
|
-
*
|
|
346
|
-
* Creates object for chaining.
|
|
347
|
-
*
|
|
348
|
-
* `Assertion` objects contain metadata in the form of flags. Three flags can
|
|
349
|
-
* be assigned during instantiation by passing arguments to this constructor:
|
|
350
|
-
*
|
|
351
|
-
* - `object`: This flag contains the target of the assertion. For example, in
|
|
352
|
-
* the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
|
|
353
|
-
* contain `numKittens` so that the `equal` assertion can reference it when
|
|
354
|
-
* needed.
|
|
355
|
-
*
|
|
356
|
-
* - `message`: This flag contains an optional custom error message to be
|
|
357
|
-
* prepended to the error message that's generated by the assertion when it
|
|
358
|
-
* fails.
|
|
359
|
-
*
|
|
360
|
-
* - `ssfi`: This flag stands for "start stack function indicator". It
|
|
361
|
-
* contains a function reference that serves as the starting point for
|
|
362
|
-
* removing frames from the stack trace of the error that's created by the
|
|
363
|
-
* assertion when it fails. The goal is to provide a cleaner stack trace to
|
|
364
|
-
* end users by removing Chai's internal functions. Note that it only works
|
|
365
|
-
* in environments that support `Error.captureStackTrace`, and only when
|
|
366
|
-
* `Chai.config.includeStack` hasn't been set to `false`.
|
|
367
|
-
*
|
|
368
|
-
* - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
|
|
369
|
-
* should retain its current value, even as assertions are chained off of
|
|
370
|
-
* this object. This is usually set to `true` when creating a new assertion
|
|
371
|
-
* from within another assertion. It's also temporarily set to `true` before
|
|
372
|
-
* an overwritten assertion gets called by the overwriting assertion.
|
|
373
|
-
*
|
|
374
|
-
* - `eql`: This flag contains the deepEqual function to be used by the assertion.
|
|
375
|
-
*
|
|
376
|
-
* @param {Mixed} obj target of the assertion
|
|
377
|
-
* @param {String} msg (optional) custom error message
|
|
378
|
-
* @param {Function} ssfi (optional) starting point for removing stack frames
|
|
379
|
-
* @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked
|
|
380
|
-
* @api private
|
|
381
|
-
*/function r(o,i,a,c){return s(this,"ssfi",a||r),s(this,"lockSsfi",c),s(this,"object",o),s(this,"message",i),s(this,"eql",ot.deepEqual||t.eql),t.proxify(this)}Object.defineProperty(r,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ot.includeStack},set:function(o){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ot.includeStack=o}}),Object.defineProperty(r,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ot.showDiff},set:function(o){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ot.showDiff=o}}),r.addProperty=function(o,i){t.addProperty(this.prototype,o,i)},r.addMethod=function(o,i){t.addMethod(this.prototype,o,i)},r.addChainableMethod=function(o,i,a){t.addChainableMethod(this.prototype,o,i,a)},r.overwriteProperty=function(o,i){t.overwriteProperty(this.prototype,o,i)},r.overwriteMethod=function(o,i){t.overwriteMethod(this.prototype,o,i)},r.overwriteChainableMethod=function(o,i,a){t.overwriteChainableMethod(this.prototype,o,i,a)},r.prototype.assert=function(o,i,a,c,l,h){var u=t.test(this,arguments);if(h!==!1&&(h=!0),c===void 0&&l===void 0&&(h=!1),ot.showDiff!==!0&&(h=!1),!u){i=t.getMessage(this,arguments);var f=t.getActual(this,arguments),b={actual:f,expected:c,showDiff:h},w=t.getOperator(this,arguments);throw w&&(b.operator=w),new n(i,b,ot.includeStack?this.assert:s(this,"ssfi"))}};/*!
|
|
382
|
-
* ### ._obj
|
|
383
|
-
*
|
|
384
|
-
* Quick reference to stored `actual` value for plugin developers.
|
|
385
|
-
*
|
|
386
|
-
* @api private
|
|
387
|
-
*/Object.defineProperty(r.prototype,"_obj",{get:function(){return s(this,"object")},set:function(o){s(this,"object",o)}})};/*!
|
|
388
|
-
* chai
|
|
389
|
-
* http://chaijs.com
|
|
390
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
391
|
-
* MIT Licensed
|
|
392
|
-
*/var xf=function(e,t){var n=e.Assertion,s=e.AssertionError,r=t.flag;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(p){n.addProperty(p)}),n.addProperty("not",function(){r(this,"negate",!0)}),n.addProperty("deep",function(){r(this,"deep",!0)}),n.addProperty("nested",function(){r(this,"nested",!0)}),n.addProperty("own",function(){r(this,"own",!0)}),n.addProperty("ordered",function(){r(this,"ordered",!0)}),n.addProperty("any",function(){r(this,"any",!0),r(this,"all",!1)}),n.addProperty("all",function(){r(this,"all",!0),r(this,"any",!1)});function o(p,T){T&&r(this,"message",T),p=p.toLowerCase();var x=r(this,"object"),$=~["a","e","i","o","u"].indexOf(p.charAt(0))?"an ":"a ";this.assert(p===t.type(x).toLowerCase(),"expected #{this} to be "+$+p,"expected #{this} not to be "+$+p)}n.addChainableMethod("an",o),n.addChainableMethod("a",o);function i(p,T){return t.isNaN(p)&&t.isNaN(T)||p===T}function a(){r(this,"contains",!0)}function c(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=t.type(x).toLowerCase(),N=r(this,"message"),R=r(this,"negate"),_=r(this,"ssfi"),O=r(this,"deep"),L=O?"deep ":"",K=O?r(this,"eql"):i;N=N?N+": ":"";var J=!1;switch($){case"string":J=x.indexOf(p)!==-1;break;case"weakset":if(O)throw new s(N+"unable to use .deep.include with WeakSet",void 0,_);J=x.has(p);break;case"map":x.forEach(function(re){J=J||K(re,p)});break;case"set":O?x.forEach(function(re){J=J||K(re,p)}):J=x.has(p);break;case"array":O?J=x.some(function(re){return K(re,p)}):J=x.indexOf(p)!==-1;break;default:if(p!==Object(p))throw new s(N+"the given combination of arguments ("+$+" and "+t.type(p).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 "+t.type(p).toLowerCase(),void 0,_);var ne=Object.keys(p),te=null,H=0;if(ne.forEach(function(re){var D=new n(x);if(t.transferFlags(this,D,!0),r(D,"lockSsfi",!0),!R||ne.length===1){D.property(re,p[re]);return}try{D.property(re,p[re])}catch(pe){if(!t.checkError.compatibleConstructor(pe,s))throw pe;te===null&&(te=pe),H++}},this),R&&ne.length>1&&H===ne.length)throw te;return}this.assert(J,"expected #{this} to "+L+"include "+t.inspect(p),"expected #{this} to not "+L+"include "+t.inspect(p))}n.addChainableMethod("include",c,a),n.addChainableMethod("contain",c,a),n.addChainableMethod("contains",c,a),n.addChainableMethod("includes",c,a),n.addProperty("ok",function(){this.assert(r(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),n.addProperty("true",function(){this.assert(r(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!r(this,"negate"))}),n.addProperty("false",function(){this.assert(r(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!r(this,"negate"))}),n.addProperty("null",function(){this.assert(r(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")}),n.addProperty("undefined",function(){this.assert(r(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")}),n.addProperty("NaN",function(){this.assert(t.isNaN(r(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function l(){var p=r(this,"object");this.assert(p!=null,"expected #{this} to exist","expected #{this} to not exist")}n.addProperty("exist",l),n.addProperty("exists",l),n.addProperty("empty",function(){var p=r(this,"object"),T=r(this,"ssfi"),x=r(this,"message"),$;switch(x=x?x+": ":"",t.type(p).toLowerCase()){case"array":case"string":$=p.length;break;case"map":case"set":$=p.size;break;case"weakmap":case"weakset":throw new s(x+".empty was passed a weak collection",void 0,T);case"function":var N=x+".empty was passed a function "+t.getName(p);throw new s(N.trim(),void 0,T);default:if(p!==Object(p))throw new s(x+".empty was passed non-string primitive "+t.inspect(p),void 0,T);$=Object.keys(p).length}this.assert($===0,"expected #{this} to be empty","expected #{this} not to be empty")});function h(){var p=r(this,"object"),T=t.type(p);this.assert(T==="Arguments","expected #{this} to be arguments but got "+T,"expected #{this} to not be arguments")}n.addProperty("arguments",h),n.addProperty("Arguments",h);function u(p,T){T&&r(this,"message",T);var x=r(this,"object");if(r(this,"deep")){var $=r(this,"lockSsfi");r(this,"lockSsfi",!0),this.eql(p),r(this,"lockSsfi",$)}else this.assert(p===x,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",p,this._obj,!0)}n.addMethod("equal",u),n.addMethod("equals",u),n.addMethod("eq",u);function f(p,T){T&&r(this,"message",T);var x=r(this,"eql");this.assert(x(p,r(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",p,this._obj,!0)}n.addMethod("eql",f),n.addMethod("eqls",f);function b(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"doLength"),N=r(this,"message"),R=N?N+": ":"",_=r(this,"ssfi"),O=t.type(x).toLowerCase(),L=t.type(p).toLowerCase(),K,J=!0;if($&&O!=="map"&&O!=="set"&&new n(x,N,_,!0).to.have.property("length"),!$&&O==="date"&&L!=="date")K=R+"the argument to above must be a date";else if(L!=="number"&&($||O==="number"))K=R+"the argument to above must be a number";else if(!$&&O!=="date"&&O!=="number"){var ne=O==="string"?"'"+x+"'":x;K=R+"expected "+ne+" to be a number or a date"}else J=!1;if(J)throw new s(K,void 0,_);if($){var te="length",H;O==="map"||O==="set"?(te="size",H=x.size):H=x.length,this.assert(H>p,"expected #{this} to have a "+te+" above #{exp} but got #{act}","expected #{this} to not have a "+te+" above #{exp}",p,H)}else this.assert(x>p,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",p)}n.addMethod("above",b),n.addMethod("gt",b),n.addMethod("greaterThan",b);function w(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"doLength"),N=r(this,"message"),R=N?N+": ":"",_=r(this,"ssfi"),O=t.type(x).toLowerCase(),L=t.type(p).toLowerCase(),K,J=!0;if($&&O!=="map"&&O!=="set"&&new n(x,N,_,!0).to.have.property("length"),!$&&O==="date"&&L!=="date")K=R+"the argument to least must be a date";else if(L!=="number"&&($||O==="number"))K=R+"the argument to least must be a number";else if(!$&&O!=="date"&&O!=="number"){var ne=O==="string"?"'"+x+"'":x;K=R+"expected "+ne+" to be a number or a date"}else J=!1;if(J)throw new s(K,void 0,_);if($){var te="length",H;O==="map"||O==="set"?(te="size",H=x.size):H=x.length,this.assert(H>=p,"expected #{this} to have a "+te+" at least #{exp} but got #{act}","expected #{this} to have a "+te+" below #{exp}",p,H)}else this.assert(x>=p,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",p)}n.addMethod("least",w),n.addMethod("gte",w),n.addMethod("greaterThanOrEqual",w);function E(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"doLength"),N=r(this,"message"),R=N?N+": ":"",_=r(this,"ssfi"),O=t.type(x).toLowerCase(),L=t.type(p).toLowerCase(),K,J=!0;if($&&O!=="map"&&O!=="set"&&new n(x,N,_,!0).to.have.property("length"),!$&&O==="date"&&L!=="date")K=R+"the argument to below must be a date";else if(L!=="number"&&($||O==="number"))K=R+"the argument to below must be a number";else if(!$&&O!=="date"&&O!=="number"){var ne=O==="string"?"'"+x+"'":x;K=R+"expected "+ne+" to be a number or a date"}else J=!1;if(J)throw new s(K,void 0,_);if($){var te="length",H;O==="map"||O==="set"?(te="size",H=x.size):H=x.length,this.assert(H<p,"expected #{this} to have a "+te+" below #{exp} but got #{act}","expected #{this} to not have a "+te+" below #{exp}",p,H)}else this.assert(x<p,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",p)}n.addMethod("below",E),n.addMethod("lt",E),n.addMethod("lessThan",E);function g(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"doLength"),N=r(this,"message"),R=N?N+": ":"",_=r(this,"ssfi"),O=t.type(x).toLowerCase(),L=t.type(p).toLowerCase(),K,J=!0;if($&&O!=="map"&&O!=="set"&&new n(x,N,_,!0).to.have.property("length"),!$&&O==="date"&&L!=="date")K=R+"the argument to most must be a date";else if(L!=="number"&&($||O==="number"))K=R+"the argument to most must be a number";else if(!$&&O!=="date"&&O!=="number"){var ne=O==="string"?"'"+x+"'":x;K=R+"expected "+ne+" to be a number or a date"}else J=!1;if(J)throw new s(K,void 0,_);if($){var te="length",H;O==="map"||O==="set"?(te="size",H=x.size):H=x.length,this.assert(H<=p,"expected #{this} to have a "+te+" at most #{exp} but got #{act}","expected #{this} to have a "+te+" above #{exp}",p,H)}else this.assert(x<=p,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",p)}n.addMethod("most",g),n.addMethod("lte",g),n.addMethod("lessThanOrEqual",g),n.addMethod("within",function(p,T,x){x&&r(this,"message",x);var $=r(this,"object"),N=r(this,"doLength"),R=r(this,"message"),_=R?R+": ":"",O=r(this,"ssfi"),L=t.type($).toLowerCase(),K=t.type(p).toLowerCase(),J=t.type(T).toLowerCase(),ne,te=!0,H=K==="date"&&J==="date"?p.toISOString()+".."+T.toISOString():p+".."+T;if(N&&L!=="map"&&L!=="set"&&new n($,R,O,!0).to.have.property("length"),!N&&L==="date"&&(K!=="date"||J!=="date"))ne=_+"the arguments to within must be dates";else if((K!=="number"||J!=="number")&&(N||L==="number"))ne=_+"the arguments to within must be numbers";else if(!N&&L!=="date"&&L!=="number"){var re=L==="string"?"'"+$+"'":$;ne=_+"expected "+re+" to be a number or a date"}else te=!1;if(te)throw new s(ne,void 0,O);if(N){var D="length",pe;L==="map"||L==="set"?(D="size",pe=$.size):pe=$.length,this.assert(pe>=p&&pe<=T,"expected #{this} to have a "+D+" within "+H,"expected #{this} to not have a "+D+" within "+H)}else this.assert($>=p&&$<=T,"expected #{this} to be within "+H,"expected #{this} to not be within "+H)});function M(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"ssfi"),N=r(this,"message");try{var R=x instanceof p}catch(O){throw O instanceof TypeError?(N=N?N+": ":"",new s(N+"The instanceof assertion needs a constructor but "+t.type(p)+" was given.",void 0,$)):O}var _=t.getName(p);_===null&&(_="an unnamed constructor"),this.assert(R,"expected #{this} to be an instance of "+_,"expected #{this} to not be an instance of "+_)}n.addMethod("instanceof",M),n.addMethod("instanceOf",M);function P(p,T,x){x&&r(this,"message",x);var $=r(this,"nested"),N=r(this,"own"),R=r(this,"message"),_=r(this,"object"),O=r(this,"ssfi"),L=typeof p;if(R=R?R+": ":"",$){if(L!=="string")throw new s(R+"the argument to property must be a string when using nested syntax",void 0,O)}else if(L!=="string"&&L!=="number"&&L!=="symbol")throw new s(R+"the argument to property must be a string, number, or symbol",void 0,O);if($&&N)throw new s(R+'The "nested" and "own" flags cannot be combined.',void 0,O);if(_==null)throw new s(R+"Target cannot be null or undefined.",void 0,O);var K=r(this,"deep"),J=r(this,"negate"),ne=$?t.getPathInfo(_,p):null,te=$?ne.value:_[p],H=K?r(this,"eql"):(pe,ue)=>pe===ue,re="";K&&(re+="deep "),N&&(re+="own "),$&&(re+="nested "),re+="property ";var D;N?D=Object.prototype.hasOwnProperty.call(_,p):$?D=ne.exists:D=t.hasProperty(_,p),(!J||arguments.length===1)&&this.assert(D,"expected #{this} to have "+re+t.inspect(p),"expected #{this} to not have "+re+t.inspect(p)),arguments.length>1&&this.assert(D&&H(T,te),"expected #{this} to have "+re+t.inspect(p)+" of #{exp}, but got #{act}","expected #{this} to not have "+re+t.inspect(p)+" of #{act}",T,te),r(this,"object",te)}n.addMethod("property",P);function F(p,T,x){r(this,"own",!0),P.apply(this,arguments)}n.addMethod("ownProperty",F),n.addMethod("haveOwnProperty",F);function I(p,T,x){typeof T=="string"&&(x=T,T=null),x&&r(this,"message",x);var $=r(this,"object"),N=Object.getOwnPropertyDescriptor(Object($),p),R=r(this,"eql");N&&T?this.assert(R(T,N),"expected the own property descriptor for "+t.inspect(p)+" on #{this} to match "+t.inspect(T)+", got "+t.inspect(N),"expected the own property descriptor for "+t.inspect(p)+" on #{this} to not match "+t.inspect(T),T,N,!0):this.assert(N,"expected #{this} to have an own property descriptor for "+t.inspect(p),"expected #{this} to not have an own property descriptor for "+t.inspect(p)),r(this,"object",N)}n.addMethod("ownPropertyDescriptor",I),n.addMethod("haveOwnPropertyDescriptor",I);function k(){r(this,"doLength",!0)}function U(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=t.type(x).toLowerCase(),N=r(this,"message"),R=r(this,"ssfi"),_="length",O;switch($){case"map":case"set":_="size",O=x.size;break;default:new n(x,N,R,!0).to.have.property("length"),O=x.length}this.assert(O==p,"expected #{this} to have a "+_+" of #{exp} but got #{act}","expected #{this} to not have a "+_+" of #{act}",p,O)}n.addChainableMethod("length",U,k),n.addChainableMethod("lengthOf",U,k);function B(p,T){T&&r(this,"message",T);var x=r(this,"object");this.assert(p.exec(x),"expected #{this} to match "+p,"expected #{this} not to match "+p)}n.addMethod("match",B),n.addMethod("matches",B),n.addMethod("string",function(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"message"),N=r(this,"ssfi");new n(x,$,N,!0).is.a("string"),this.assert(~x.indexOf(p),"expected #{this} to contain "+t.inspect(p),"expected #{this} to not contain "+t.inspect(p))});function G(p){var T=r(this,"object"),x=t.type(T),$=t.type(p),N=r(this,"ssfi"),R=r(this,"deep"),_,O="",L,K=!0,J=r(this,"message");J=J?J+": ":"";var ne=J+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(x==="Map"||x==="Set")O=R?"deeply ":"",L=[],T.forEach(function(de,Ie){L.push(Ie)}),$!=="Array"&&(p=Array.prototype.slice.call(arguments));else{switch(L=t.getOwnEnumerableProperties(T),$){case"Array":if(arguments.length>1)throw new s(ne,void 0,N);break;case"Object":if(arguments.length>1)throw new s(ne,void 0,N);p=Object.keys(p);break;default:p=Array.prototype.slice.call(arguments)}p=p.map(function(de){return typeof de=="symbol"?de:String(de)})}if(!p.length)throw new s(J+"keys required",void 0,N);var te=p.length,H=r(this,"any"),re=r(this,"all"),D=p,pe=R?r(this,"eql"):(de,Ie)=>de===Ie;if(!H&&!re&&(re=!0),H&&(K=D.some(function(de){return L.some(function(Ie){return pe(de,Ie)})})),re&&(K=D.every(function(de){return L.some(function(Ie){return pe(de,Ie)})}),r(this,"contains")||(K=K&&p.length==L.length)),te>1){p=p.map(function(de){return t.inspect(de)});var ue=p.pop();re&&(_=p.join(", ")+", and "+ue),H&&(_=p.join(", ")+", or "+ue)}else _=t.inspect(p[0]);_=(te>1?"keys ":"key ")+_,_=(r(this,"contains")?"contain ":"have ")+_,this.assert(K,"expected #{this} to "+O+_,"expected #{this} to not "+O+_,D.slice(0).sort(t.compareByInspect),L.sort(t.compareByInspect),!0)}n.addMethod("keys",G),n.addMethod("key",G);function se(p,T,x){x&&r(this,"message",x);var $=r(this,"object"),N=r(this,"ssfi"),R=r(this,"message"),_=r(this,"negate")||!1;new n($,R,N,!0).is.a("function"),(p instanceof RegExp||typeof p=="string")&&(T=p,p=null);var O;try{$()}catch(ue){O=ue}var L=p===void 0&&T===void 0,K=!!(p&&T),J=!1,ne=!1;if(L||!L&&!_){var te="an error";p instanceof Error?te="#{exp}":p&&(te=t.checkError.getConstructorName(p)),this.assert(O,"expected #{this} to throw "+te,"expected #{this} to not throw an error but #{act} was thrown",p&&p.toString(),O instanceof Error?O.toString():typeof O=="string"?O:O&&t.checkError.getConstructorName(O))}if(p&&O){if(p instanceof Error){var H=t.checkError.compatibleInstance(O,p);H===_&&(K&&_?J=!0:this.assert(_,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(O&&!_?" but #{act} was thrown":""),p.toString(),O.toString()))}var re=t.checkError.compatibleConstructor(O,p);re===_&&(K&&_?J=!0:this.assert(_,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(O?" but #{act} was thrown":""),p instanceof Error?p.toString():p&&t.checkError.getConstructorName(p),O instanceof Error?O.toString():O&&t.checkError.getConstructorName(O)))}if(O&&T!==void 0&&T!==null){var D="including";T instanceof RegExp&&(D="matching");var pe=t.checkError.compatibleMessage(O,T);pe===_&&(K&&_?ne=!0:this.assert(_,"expected #{this} to throw error "+D+" #{exp} but got #{act}","expected #{this} to throw error not "+D+" #{exp}",T,t.checkError.getMessage(O)))}J&&ne&&this.assert(_,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(O?" but #{act} was thrown":""),p instanceof Error?p.toString():p&&t.checkError.getConstructorName(p),O instanceof Error?O.toString():O&&t.checkError.getConstructorName(O)),r(this,"object",O)}n.addMethod("throw",se),n.addMethod("throws",se),n.addMethod("Throw",se);function V(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"itself"),N=typeof x=="function"&&!$?x.prototype[p]:x[p];this.assert(typeof N=="function","expected #{this} to respond to "+t.inspect(p),"expected #{this} to not respond to "+t.inspect(p))}n.addMethod("respondTo",V),n.addMethod("respondsTo",V),n.addProperty("itself",function(){r(this,"itself",!0)});function Ee(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=p(x);this.assert($,"expected #{this} to satisfy "+t.objDisplay(p),"expected #{this} to not satisfy"+t.objDisplay(p),!r(this,"negate"),$)}n.addMethod("satisfy",Ee),n.addMethod("satisfies",Ee);function be(p,T,x){x&&r(this,"message",x);var $=r(this,"object"),N=r(this,"message"),R=r(this,"ssfi");if(new n($,N,R,!0).is.a("number"),typeof p!="number"||typeof T!="number"){N=N?N+": ":"";var _=T===void 0?", and a delta is required":"";throw new s(N+"the arguments to closeTo or approximately must be numbers"+_,void 0,R)}this.assert(Math.abs($-p)<=T,"expected #{this} to be close to "+p+" +/- "+T,"expected #{this} not to be close to "+p+" +/- "+T)}n.addMethod("closeTo",be),n.addMethod("approximately",be);function Se(p,T,x,$,N){if(!$){if(p.length!==T.length)return!1;T=T.slice()}return p.every(function(R,_){if(N)return x?x(R,T[_]):R===T[_];if(!x){var O=T.indexOf(R);return O===-1?!1:($||T.splice(O,1),!0)}return T.some(function(L,K){return x(R,L)?($||T.splice(K,1),!0):!1})})}n.addMethod("members",function(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"message"),N=r(this,"ssfi");new n(x,$,N,!0).to.be.an("array"),new n(p,$,N,!0).to.be.an("array");var R=r(this,"contains"),_=r(this,"ordered"),O,L,K;R?(O=_?"an ordered superset":"a superset",L="expected #{this} to be "+O+" of #{exp}",K="expected #{this} to not be "+O+" of #{exp}"):(O=_?"ordered members":"members",L="expected #{this} to have the same "+O+" as #{exp}",K="expected #{this} to not have the same "+O+" as #{exp}");var J=r(this,"deep")?r(this,"eql"):void 0;this.assert(Se(p,x,J,R,_),L,K,p,x,!0)});function xe(p,T){T&&r(this,"message",T);var x=r(this,"object"),$=r(this,"message"),N=r(this,"ssfi"),R=r(this,"contains"),_=r(this,"deep"),O=r(this,"eql");new n(p,$,N,!0).to.be.an("array"),R?this.assert(p.some(function(L){return x.indexOf(L)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",p,x):_?this.assert(p.some(function(L){return O(x,L)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",p,x):this.assert(p.indexOf(x)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",p,x)}n.addMethod("oneOf",xe);function $e(p,T,x){x&&r(this,"message",x);var $=r(this,"object"),N=r(this,"message"),R=r(this,"ssfi");new n($,N,R,!0).is.a("function");var _;T?(new n(p,N,R,!0).to.have.property(T),_=p[T]):(new n(p,N,R,!0).is.a("function"),_=p()),$();var O=T==null?p():p[T],L=T==null?_:"."+T;r(this,"deltaMsgObj",L),r(this,"initialDeltaValue",_),r(this,"finalDeltaValue",O),r(this,"deltaBehavior","change"),r(this,"realDelta",O!==_),this.assert(_!==O,"expected "+L+" to change","expected "+L+" to not change")}n.addMethod("change",$e),n.addMethod("changes",$e);function Oe(p,T,x){x&&r(this,"message",x);var $=r(this,"object"),N=r(this,"message"),R=r(this,"ssfi");new n($,N,R,!0).is.a("function");var _;T?(new n(p,N,R,!0).to.have.property(T),_=p[T]):(new n(p,N,R,!0).is.a("function"),_=p()),new n(_,N,R,!0).is.a("number"),$();var O=T==null?p():p[T],L=T==null?_:"."+T;r(this,"deltaMsgObj",L),r(this,"initialDeltaValue",_),r(this,"finalDeltaValue",O),r(this,"deltaBehavior","increase"),r(this,"realDelta",O-_),this.assert(O-_>0,"expected "+L+" to increase","expected "+L+" to not increase")}n.addMethod("increase",Oe),n.addMethod("increases",Oe);function Pe(p,T,x){x&&r(this,"message",x);var $=r(this,"object"),N=r(this,"message"),R=r(this,"ssfi");new n($,N,R,!0).is.a("function");var _;T?(new n(p,N,R,!0).to.have.property(T),_=p[T]):(new n(p,N,R,!0).is.a("function"),_=p()),new n(_,N,R,!0).is.a("number"),$();var O=T==null?p():p[T],L=T==null?_:"."+T;r(this,"deltaMsgObj",L),r(this,"initialDeltaValue",_),r(this,"finalDeltaValue",O),r(this,"deltaBehavior","decrease"),r(this,"realDelta",_-O),this.assert(O-_<0,"expected "+L+" to decrease","expected "+L+" to not decrease")}n.addMethod("decrease",Pe),n.addMethod("decreases",Pe);function Ne(p,T){T&&r(this,"message",T);var x=r(this,"deltaMsgObj"),$=r(this,"initialDeltaValue"),N=r(this,"finalDeltaValue"),R=r(this,"deltaBehavior"),_=r(this,"realDelta"),O;R==="change"?O=Math.abs(N-$)===Math.abs(p):O=_===Math.abs(p),this.assert(O,"expected "+x+" to "+R+" by "+p,"expected "+x+" to not "+R+" by "+p)}n.addMethod("by",Ne),n.addProperty("extensible",function(){var p=r(this,"object"),T=p===Object(p)&&Object.isExtensible(p);this.assert(T,"expected #{this} to be extensible","expected #{this} to not be extensible")}),n.addProperty("sealed",function(){var p=r(this,"object"),T=p===Object(p)?Object.isSealed(p):!0;this.assert(T,"expected #{this} to be sealed","expected #{this} to not be sealed")}),n.addProperty("frozen",function(){var p=r(this,"object"),T=p===Object(p)?Object.isFrozen(p):!0;this.assert(T,"expected #{this} to be frozen","expected #{this} to not be frozen")}),n.addProperty("finite",function(p){var T=r(this,"object");this.assert(typeof T=="number"&&isFinite(T),"expected #{this} to be a finite number","expected #{this} to not be a finite number")})};/*!
|
|
393
|
-
* chai
|
|
394
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
395
|
-
* MIT Licensed
|
|
396
|
-
*/var Of=function(e,t){e.expect=function(n,s){return new e.Assertion(n,s)},e.expect.fail=function(n,s,r,o){throw arguments.length<2&&(r=n,n=void 0),r=r||"expect.fail()",new e.AssertionError(r,{actual:n,expected:s,operator:o},e.expect.fail)}};/*!
|
|
397
|
-
* chai
|
|
398
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
399
|
-
* MIT Licensed
|
|
400
|
-
*/var Af=function(e,t){var n=e.Assertion;function s(){function r(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new n(this.valueOf(),null,r):new n(this,null,r)}function o(a){Object.defineProperty(this,"should",{value:a,enumerable:!0,configurable:!0,writable:!0})}Object.defineProperty(Object.prototype,"should",{set:o,get:r,configurable:!0});var i={};return i.fail=function(a,c,l,h){throw arguments.length<2&&(l=a,a=void 0),l=l||"should.fail()",new e.AssertionError(l,{actual:a,expected:c,operator:h},i.fail)},i.equal=function(a,c,l){new n(a,l).to.equal(c)},i.Throw=function(a,c,l,h){new n(a,h).to.Throw(c,l)},i.exist=function(a,c){new n(a,c).to.exist},i.not={},i.not.equal=function(a,c,l){new n(a,l).to.not.equal(c)},i.not.Throw=function(a,c,l,h){new n(a,h).to.not.Throw(c,l)},i.not.exist=function(a,c){new n(a,c).to.not.exist},i.throw=i.Throw,i.not.throw=i.not.Throw,i}e.should=s,e.Should=s};/*!
|
|
401
|
-
* chai
|
|
402
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
403
|
-
* MIT Licensed
|
|
404
|
-
*/var Mf=function(e,t){/*!
|
|
405
|
-
* Chai dependencies.
|
|
406
|
-
*/var n=e.Assertion,s=t.flag;/*!
|
|
407
|
-
* Module export.
|
|
408
|
-
*/var r=e.assert=function(o,i){var a=new n(null,null,e.assert,!0);a.assert(o,i,"[ negation message unavailable ]")};r.fail=function(o,i,a,c){throw arguments.length<2&&(a=o,o=void 0),a=a||"assert.fail()",new e.AssertionError(a,{actual:o,expected:i,operator:c},r.fail)},r.isOk=function(o,i){new n(o,i,r.isOk,!0).is.ok},r.isNotOk=function(o,i){new n(o,i,r.isNotOk,!0).is.not.ok},r.equal=function(o,i,a){var c=new n(o,a,r.equal,!0);c.assert(i==s(c,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",i,o,!0)},r.notEqual=function(o,i,a){var c=new n(o,a,r.notEqual,!0);c.assert(i!=s(c,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",i,o,!0)},r.strictEqual=function(o,i,a){new n(o,a,r.strictEqual,!0).to.equal(i)},r.notStrictEqual=function(o,i,a){new n(o,a,r.notStrictEqual,!0).to.not.equal(i)},r.deepEqual=r.deepStrictEqual=function(o,i,a){new n(o,a,r.deepEqual,!0).to.eql(i)},r.notDeepEqual=function(o,i,a){new n(o,a,r.notDeepEqual,!0).to.not.eql(i)},r.isAbove=function(o,i,a){new n(o,a,r.isAbove,!0).to.be.above(i)},r.isAtLeast=function(o,i,a){new n(o,a,r.isAtLeast,!0).to.be.least(i)},r.isBelow=function(o,i,a){new n(o,a,r.isBelow,!0).to.be.below(i)},r.isAtMost=function(o,i,a){new n(o,a,r.isAtMost,!0).to.be.most(i)},r.isTrue=function(o,i){new n(o,i,r.isTrue,!0).is.true},r.isNotTrue=function(o,i){new n(o,i,r.isNotTrue,!0).to.not.equal(!0)},r.isFalse=function(o,i){new n(o,i,r.isFalse,!0).is.false},r.isNotFalse=function(o,i){new n(o,i,r.isNotFalse,!0).to.not.equal(!1)},r.isNull=function(o,i){new n(o,i,r.isNull,!0).to.equal(null)},r.isNotNull=function(o,i){new n(o,i,r.isNotNull,!0).to.not.equal(null)},r.isNaN=function(o,i){new n(o,i,r.isNaN,!0).to.be.NaN},r.isNotNaN=function(o,i){new n(o,i,r.isNotNaN,!0).not.to.be.NaN},r.exists=function(o,i){new n(o,i,r.exists,!0).to.exist},r.notExists=function(o,i){new n(o,i,r.notExists,!0).to.not.exist},r.isUndefined=function(o,i){new n(o,i,r.isUndefined,!0).to.equal(void 0)},r.isDefined=function(o,i){new n(o,i,r.isDefined,!0).to.not.equal(void 0)},r.isFunction=function(o,i){new n(o,i,r.isFunction,!0).to.be.a("function")},r.isNotFunction=function(o,i){new n(o,i,r.isNotFunction,!0).to.not.be.a("function")},r.isObject=function(o,i){new n(o,i,r.isObject,!0).to.be.a("object")},r.isNotObject=function(o,i){new n(o,i,r.isNotObject,!0).to.not.be.a("object")},r.isArray=function(o,i){new n(o,i,r.isArray,!0).to.be.an("array")},r.isNotArray=function(o,i){new n(o,i,r.isNotArray,!0).to.not.be.an("array")},r.isString=function(o,i){new n(o,i,r.isString,!0).to.be.a("string")},r.isNotString=function(o,i){new n(o,i,r.isNotString,!0).to.not.be.a("string")},r.isNumber=function(o,i){new n(o,i,r.isNumber,!0).to.be.a("number")},r.isNotNumber=function(o,i){new n(o,i,r.isNotNumber,!0).to.not.be.a("number")},r.isFinite=function(o,i){new n(o,i,r.isFinite,!0).to.be.finite},r.isBoolean=function(o,i){new n(o,i,r.isBoolean,!0).to.be.a("boolean")},r.isNotBoolean=function(o,i){new n(o,i,r.isNotBoolean,!0).to.not.be.a("boolean")},r.typeOf=function(o,i,a){new n(o,a,r.typeOf,!0).to.be.a(i)},r.notTypeOf=function(o,i,a){new n(o,a,r.notTypeOf,!0).to.not.be.a(i)},r.instanceOf=function(o,i,a){new n(o,a,r.instanceOf,!0).to.be.instanceOf(i)},r.notInstanceOf=function(o,i,a){new n(o,a,r.notInstanceOf,!0).to.not.be.instanceOf(i)},r.include=function(o,i,a){new n(o,a,r.include,!0).include(i)},r.notInclude=function(o,i,a){new n(o,a,r.notInclude,!0).not.include(i)},r.deepInclude=function(o,i,a){new n(o,a,r.deepInclude,!0).deep.include(i)},r.notDeepInclude=function(o,i,a){new n(o,a,r.notDeepInclude,!0).not.deep.include(i)},r.nestedInclude=function(o,i,a){new n(o,a,r.nestedInclude,!0).nested.include(i)},r.notNestedInclude=function(o,i,a){new n(o,a,r.notNestedInclude,!0).not.nested.include(i)},r.deepNestedInclude=function(o,i,a){new n(o,a,r.deepNestedInclude,!0).deep.nested.include(i)},r.notDeepNestedInclude=function(o,i,a){new n(o,a,r.notDeepNestedInclude,!0).not.deep.nested.include(i)},r.ownInclude=function(o,i,a){new n(o,a,r.ownInclude,!0).own.include(i)},r.notOwnInclude=function(o,i,a){new n(o,a,r.notOwnInclude,!0).not.own.include(i)},r.deepOwnInclude=function(o,i,a){new n(o,a,r.deepOwnInclude,!0).deep.own.include(i)},r.notDeepOwnInclude=function(o,i,a){new n(o,a,r.notDeepOwnInclude,!0).not.deep.own.include(i)},r.match=function(o,i,a){new n(o,a,r.match,!0).to.match(i)},r.notMatch=function(o,i,a){new n(o,a,r.notMatch,!0).to.not.match(i)},r.property=function(o,i,a){new n(o,a,r.property,!0).to.have.property(i)},r.notProperty=function(o,i,a){new n(o,a,r.notProperty,!0).to.not.have.property(i)},r.propertyVal=function(o,i,a,c){new n(o,c,r.propertyVal,!0).to.have.property(i,a)},r.notPropertyVal=function(o,i,a,c){new n(o,c,r.notPropertyVal,!0).to.not.have.property(i,a)},r.deepPropertyVal=function(o,i,a,c){new n(o,c,r.deepPropertyVal,!0).to.have.deep.property(i,a)},r.notDeepPropertyVal=function(o,i,a,c){new n(o,c,r.notDeepPropertyVal,!0).to.not.have.deep.property(i,a)},r.ownProperty=function(o,i,a){new n(o,a,r.ownProperty,!0).to.have.own.property(i)},r.notOwnProperty=function(o,i,a){new n(o,a,r.notOwnProperty,!0).to.not.have.own.property(i)},r.ownPropertyVal=function(o,i,a,c){new n(o,c,r.ownPropertyVal,!0).to.have.own.property(i,a)},r.notOwnPropertyVal=function(o,i,a,c){new n(o,c,r.notOwnPropertyVal,!0).to.not.have.own.property(i,a)},r.deepOwnPropertyVal=function(o,i,a,c){new n(o,c,r.deepOwnPropertyVal,!0).to.have.deep.own.property(i,a)},r.notDeepOwnPropertyVal=function(o,i,a,c){new n(o,c,r.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(i,a)},r.nestedProperty=function(o,i,a){new n(o,a,r.nestedProperty,!0).to.have.nested.property(i)},r.notNestedProperty=function(o,i,a){new n(o,a,r.notNestedProperty,!0).to.not.have.nested.property(i)},r.nestedPropertyVal=function(o,i,a,c){new n(o,c,r.nestedPropertyVal,!0).to.have.nested.property(i,a)},r.notNestedPropertyVal=function(o,i,a,c){new n(o,c,r.notNestedPropertyVal,!0).to.not.have.nested.property(i,a)},r.deepNestedPropertyVal=function(o,i,a,c){new n(o,c,r.deepNestedPropertyVal,!0).to.have.deep.nested.property(i,a)},r.notDeepNestedPropertyVal=function(o,i,a,c){new n(o,c,r.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(i,a)},r.lengthOf=function(o,i,a){new n(o,a,r.lengthOf,!0).to.have.lengthOf(i)},r.hasAnyKeys=function(o,i,a){new n(o,a,r.hasAnyKeys,!0).to.have.any.keys(i)},r.hasAllKeys=function(o,i,a){new n(o,a,r.hasAllKeys,!0).to.have.all.keys(i)},r.containsAllKeys=function(o,i,a){new n(o,a,r.containsAllKeys,!0).to.contain.all.keys(i)},r.doesNotHaveAnyKeys=function(o,i,a){new n(o,a,r.doesNotHaveAnyKeys,!0).to.not.have.any.keys(i)},r.doesNotHaveAllKeys=function(o,i,a){new n(o,a,r.doesNotHaveAllKeys,!0).to.not.have.all.keys(i)},r.hasAnyDeepKeys=function(o,i,a){new n(o,a,r.hasAnyDeepKeys,!0).to.have.any.deep.keys(i)},r.hasAllDeepKeys=function(o,i,a){new n(o,a,r.hasAllDeepKeys,!0).to.have.all.deep.keys(i)},r.containsAllDeepKeys=function(o,i,a){new n(o,a,r.containsAllDeepKeys,!0).to.contain.all.deep.keys(i)},r.doesNotHaveAnyDeepKeys=function(o,i,a){new n(o,a,r.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(i)},r.doesNotHaveAllDeepKeys=function(o,i,a){new n(o,a,r.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(i)},r.throws=function(o,i,a,c){(typeof i=="string"||i instanceof RegExp)&&(a=i,i=null);var l=new n(o,c,r.throws,!0).to.throw(i,a);return s(l,"object")},r.doesNotThrow=function(o,i,a,c){(typeof i=="string"||i instanceof RegExp)&&(a=i,i=null),new n(o,c,r.doesNotThrow,!0).to.not.throw(i,a)},r.operator=function(o,i,a,c){var l;switch(i){case"==":l=o==a;break;case"===":l=o===a;break;case">":l=o>a;break;case">=":l=o>=a;break;case"<":l=o<a;break;case"<=":l=o<=a;break;case"!=":l=o!=a;break;case"!==":l=o!==a;break;default:throw c=c&&c+": ",new e.AssertionError(c+'Invalid operator "'+i+'"',void 0,r.operator)}var h=new n(l,c,r.operator,!0);h.assert(s(h,"object")===!0,"expected "+t.inspect(o)+" to be "+i+" "+t.inspect(a),"expected "+t.inspect(o)+" to not be "+i+" "+t.inspect(a))},r.closeTo=function(o,i,a,c){new n(o,c,r.closeTo,!0).to.be.closeTo(i,a)},r.approximately=function(o,i,a,c){new n(o,c,r.approximately,!0).to.be.approximately(i,a)},r.sameMembers=function(o,i,a){new n(o,a,r.sameMembers,!0).to.have.same.members(i)},r.notSameMembers=function(o,i,a){new n(o,a,r.notSameMembers,!0).to.not.have.same.members(i)},r.sameDeepMembers=function(o,i,a){new n(o,a,r.sameDeepMembers,!0).to.have.same.deep.members(i)},r.notSameDeepMembers=function(o,i,a){new n(o,a,r.notSameDeepMembers,!0).to.not.have.same.deep.members(i)},r.sameOrderedMembers=function(o,i,a){new n(o,a,r.sameOrderedMembers,!0).to.have.same.ordered.members(i)},r.notSameOrderedMembers=function(o,i,a){new n(o,a,r.notSameOrderedMembers,!0).to.not.have.same.ordered.members(i)},r.sameDeepOrderedMembers=function(o,i,a){new n(o,a,r.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(i)},r.notSameDeepOrderedMembers=function(o,i,a){new n(o,a,r.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(i)},r.includeMembers=function(o,i,a){new n(o,a,r.includeMembers,!0).to.include.members(i)},r.notIncludeMembers=function(o,i,a){new n(o,a,r.notIncludeMembers,!0).to.not.include.members(i)},r.includeDeepMembers=function(o,i,a){new n(o,a,r.includeDeepMembers,!0).to.include.deep.members(i)},r.notIncludeDeepMembers=function(o,i,a){new n(o,a,r.notIncludeDeepMembers,!0).to.not.include.deep.members(i)},r.includeOrderedMembers=function(o,i,a){new n(o,a,r.includeOrderedMembers,!0).to.include.ordered.members(i)},r.notIncludeOrderedMembers=function(o,i,a){new n(o,a,r.notIncludeOrderedMembers,!0).to.not.include.ordered.members(i)},r.includeDeepOrderedMembers=function(o,i,a){new n(o,a,r.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(i)},r.notIncludeDeepOrderedMembers=function(o,i,a){new n(o,a,r.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(i)},r.oneOf=function(o,i,a){new n(o,a,r.oneOf,!0).to.be.oneOf(i)},r.changes=function(o,i,a,c){arguments.length===3&&typeof i=="function"&&(c=a,a=null),new n(o,c,r.changes,!0).to.change(i,a)},r.changesBy=function(o,i,a,c,l){if(arguments.length===4&&typeof i=="function"){var h=c;c=a,l=h}else arguments.length===3&&(c=a,a=null);new n(o,l,r.changesBy,!0).to.change(i,a).by(c)},r.doesNotChange=function(o,i,a,c){return arguments.length===3&&typeof i=="function"&&(c=a,a=null),new n(o,c,r.doesNotChange,!0).to.not.change(i,a)},r.changesButNotBy=function(o,i,a,c,l){if(arguments.length===4&&typeof i=="function"){var h=c;c=a,l=h}else arguments.length===3&&(c=a,a=null);new n(o,l,r.changesButNotBy,!0).to.change(i,a).but.not.by(c)},r.increases=function(o,i,a,c){return arguments.length===3&&typeof i=="function"&&(c=a,a=null),new n(o,c,r.increases,!0).to.increase(i,a)},r.increasesBy=function(o,i,a,c,l){if(arguments.length===4&&typeof i=="function"){var h=c;c=a,l=h}else arguments.length===3&&(c=a,a=null);new n(o,l,r.increasesBy,!0).to.increase(i,a).by(c)},r.doesNotIncrease=function(o,i,a,c){return arguments.length===3&&typeof i=="function"&&(c=a,a=null),new n(o,c,r.doesNotIncrease,!0).to.not.increase(i,a)},r.increasesButNotBy=function(o,i,a,c,l){if(arguments.length===4&&typeof i=="function"){var h=c;c=a,l=h}else arguments.length===3&&(c=a,a=null);new n(o,l,r.increasesButNotBy,!0).to.increase(i,a).but.not.by(c)},r.decreases=function(o,i,a,c){return arguments.length===3&&typeof i=="function"&&(c=a,a=null),new n(o,c,r.decreases,!0).to.decrease(i,a)},r.decreasesBy=function(o,i,a,c,l){if(arguments.length===4&&typeof i=="function"){var h=c;c=a,l=h}else arguments.length===3&&(c=a,a=null);new n(o,l,r.decreasesBy,!0).to.decrease(i,a).by(c)},r.doesNotDecrease=function(o,i,a,c){return arguments.length===3&&typeof i=="function"&&(c=a,a=null),new n(o,c,r.doesNotDecrease,!0).to.not.decrease(i,a)},r.doesNotDecreaseBy=function(o,i,a,c,l){if(arguments.length===4&&typeof i=="function"){var h=c;c=a,l=h}else arguments.length===3&&(c=a,a=null);return new n(o,l,r.doesNotDecreaseBy,!0).to.not.decrease(i,a).by(c)},r.decreasesButNotBy=function(o,i,a,c,l){if(arguments.length===4&&typeof i=="function"){var h=c;c=a,l=h}else arguments.length===3&&(c=a,a=null);new n(o,l,r.decreasesButNotBy,!0).to.decrease(i,a).but.not.by(c)};/*!
|
|
409
|
-
* ### .ifError(object)
|
|
410
|
-
*
|
|
411
|
-
* Asserts if value is not a false value, and throws if it is a true value.
|
|
412
|
-
* This is added to allow for chai to be a drop-in replacement for Node's
|
|
413
|
-
* assert class.
|
|
414
|
-
*
|
|
415
|
-
* var err = new Error('I am a custom error');
|
|
416
|
-
* assert.ifError(err); // Rethrows err!
|
|
417
|
-
*
|
|
418
|
-
* @name ifError
|
|
419
|
-
* @param {Object} object
|
|
420
|
-
* @namespace Assert
|
|
421
|
-
* @api public
|
|
422
|
-
*/r.ifError=function(o){if(o)throw o},r.isExtensible=function(o,i){new n(o,i,r.isExtensible,!0).to.be.extensible},r.isNotExtensible=function(o,i){new n(o,i,r.isNotExtensible,!0).to.not.be.extensible},r.isSealed=function(o,i){new n(o,i,r.isSealed,!0).to.be.sealed},r.isNotSealed=function(o,i){new n(o,i,r.isNotSealed,!0).to.not.be.sealed},r.isFrozen=function(o,i){new n(o,i,r.isFrozen,!0).to.be.frozen},r.isNotFrozen=function(o,i){new n(o,i,r.isNotFrozen,!0).to.not.be.frozen},r.isEmpty=function(o,i){new n(o,i,r.isEmpty,!0).to.be.empty},r.isNotEmpty=function(o,i){new n(o,i,r.isNotEmpty,!0).to.not.be.empty};/*!
|
|
423
|
-
* Aliases.
|
|
424
|
-
*/(function o(i,a){return r[a]=r[i],o})("isOk","ok")("isNotOk","notOk")("throws","throw")("throws","Throw")("isExtensible","extensible")("isNotExtensible","notExtensible")("isSealed","sealed")("isNotSealed","notSealed")("isFrozen","frozen")("isNotFrozen","notFrozen")("isEmpty","empty")("isNotEmpty","notEmpty")};/*!
|
|
425
|
-
* chai
|
|
426
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
427
|
-
* MIT Licensed
|
|
428
|
-
*/var qo;function lt(){return qo||(qo=1,function(e){var t=[];/*!
|
|
429
|
-
* Chai version
|
|
430
|
-
*/e.version="4.3.8";/*!
|
|
431
|
-
* Assertion Error
|
|
432
|
-
*/e.AssertionError=Mi;/*!
|
|
433
|
-
* Utils for plugins (not exported)
|
|
434
|
-
*/var n=Sf();e.use=function(l){return~t.indexOf(l)||(l(e,n),t.push(l)),e};/*!
|
|
435
|
-
* Utility Functions
|
|
436
|
-
*/e.util=n;/*!
|
|
437
|
-
* Configuration
|
|
438
|
-
*/var s=At;e.config=s;/*!
|
|
439
|
-
* Primary `Assertion` prototype
|
|
440
|
-
*/var r=Tf;e.use(r);/*!
|
|
441
|
-
* Core Assertions
|
|
442
|
-
*/var o=xf;e.use(o);/*!
|
|
443
|
-
* Expect interface
|
|
444
|
-
*/var i=Of;e.use(i);/*!
|
|
445
|
-
* Should interface
|
|
446
|
-
*/var a=Af;e.use(a);/*!
|
|
447
|
-
* Assert interface
|
|
448
|
-
*/var c=Mf;e.use(c)}(Dn)),Dn}var Pf=lt();const We=Bt.getDefaultExportFromCjs(Pf),Jn=We.expect;We.version;We.Assertion;We.AssertionError;const hn=We.util;We.config;const Gt=We.use;We.should;const $f=We.assert;We.core;var Ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function on(e,t){if(!e)throw new Error(t)}function bt(e,t){return typeof t===e}function Cf(e){return e instanceof Promise}function ir(e,t,n){Object.defineProperty(e,t,n)}function wt(e,t,n){Object.defineProperty(e,t,{value:n})}var Dt=Symbol.for("tinyspy:spy"),Nf=new Set,If=e=>{e.called=!1,e.callCount=0,e.calls=[],e.results=[],e.next=[]},kf=e=>(ir(e,Dt,{value:{reset:()=>If(e[Dt])}}),e[Dt]),ar=e=>e[Dt]||kf(e);function jf(e){on(bt("function",e)||bt("undefined",e),"cannot spy on a non-function value");let t=function(...s){let r=ar(t);r.called=!0,r.callCount++,r.calls.push(s);let o=r.next.shift();if(o){r.results.push(o);let[l,h]=o;if(l==="ok")return h;throw h}let i,a="ok";if(r.impl)try{new.target?i=Reflect.construct(r.impl,s,new.target):i=r.impl.apply(this,s),a="ok"}catch(l){throw i=l,a="error",r.results.push([a,l]),l}let c=[a,i];if(Cf(i)){let l=i.then(h=>c[1]=h).catch(h=>{throw c[0]="error",c[1]=h,h});Object.assign(l,i),i=l}return r.results.push(c),i};wt(t,"_isMockFunction",!0),wt(t,"length",e?e.length:0),wt(t,"name",e&&e.name||"spy");let n=ar(t);return n.reset(),n.impl=e,t}var Lo=(e,t)=>Object.getOwnPropertyDescriptor(e,t),zo=(e,t)=>{t!=null&&typeof t=="function"&&t.prototype!=null&&Object.setPrototypeOf(e.prototype,t.prototype)};function Bi(e,t,n){on(!bt("undefined",e),"spyOn could not find an object to spy upon"),on(bt("object",e)||bt("function",e),"cannot spyOn on a primitive value");let[s,r]=(()=>{if(!bt("object",t))return[t,"value"];if("getter"in t&&"setter"in t)throw new Error("cannot spy on both getter and setter");if("getter"in t)return[t.getter,"get"];if("setter"in t)return[t.setter,"set"];throw new Error("specify getter or setter to spy on")})(),o=Lo(e,s),i=Object.getPrototypeOf(e),a=i&&Lo(i,s),c=o||a;on(c||s in e,`${String(s)} does not exist`);let l=!1;r==="value"&&c&&!c.value&&c.get&&(r="get",l=!0,n=c.get());let h;c?h=c[r]:r!=="value"?h=()=>e[s]:h=e[s],n||(n=h);let u=jf(n);r==="value"&&zo(u,h);let f=E=>{let{value:g,...M}=c||{configurable:!0,writable:!0};r!=="value"&&delete M.writable,M[r]=E,ir(e,s,M)},b=()=>c?ir(e,s,c):f(h),w=u[Dt];return wt(w,"restore",b),wt(w,"getOriginal",()=>l?h():h),wt(w,"willCall",E=>(w.impl=E,u)),f(l?()=>(zo(u,n),u):u),Nf.add(u),u}const sn=new Set;function qi(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction}function Ff(e,t,n){const r=n?{[{get:"getter",set:"setter"}[n]]:t}:t,o=Bi(e,r);return Li(o)}let Rf=0;function Li(e){const t=e;let n,s=[],r=[];const o=ar(e),i={get calls(){return o.calls},get instances(){return s},get invocationCallOrder(){return r},get results(){return o.results.map(([f,b])=>({type:f==="error"?"throw":"return",value:b}))},get lastCall(){return o.calls[o.calls.length-1]}};let a=[],c=!1;function l(...f){return s.push(this),r.push(++Rf),(c?n:a.shift()||n||o.getOriginal()||(()=>{})).apply(this,f)}let h=t.name;t.getMockName=()=>h||"vi.fn()",t.mockName=f=>(h=f,t),t.mockClear=()=>(o.reset(),s=[],r=[],t),t.mockReset=()=>(t.mockClear(),n=()=>{},a=[],t),t.mockRestore=()=>(t.mockReset(),o.restore(),n=void 0,t),t.getMockImplementation=()=>n,t.mockImplementation=f=>(n=f,o.willCall(l),t),t.mockImplementationOnce=f=>(a.push(f),t);function u(f,b){const w=n;n=f,o.willCall(l),c=!0;const E=()=>{n=w,c=!1},g=b();return g instanceof Promise?g.then(()=>(E(),t)):(E(),t)}return t.withImplementation=u,t.mockReturnThis=()=>t.mockImplementation(function(){return this}),t.mockReturnValue=f=>t.mockImplementation(()=>f),t.mockReturnValueOnce=f=>t.mockImplementationOnce(()=>f),t.mockResolvedValue=f=>t.mockImplementation(()=>Promise.resolve(f)),t.mockResolvedValueOnce=f=>t.mockImplementationOnce(()=>Promise.resolve(f)),t.mockRejectedValue=f=>t.mockImplementation(()=>Promise.reject(f)),t.mockRejectedValueOnce=f=>t.mockImplementationOnce(()=>Promise.reject(f)),Object.defineProperty(t,"mock",{get:()=>i}),o.willCall(l),sn.add(t),t}function Df(e){const t=Li(Bi({spy:e||(()=>{})},"spy"));return e&&t.mockImplementation(e),t}const pn=Symbol.for("matchers-object"),Yt=Symbol.for("$$jest-matchers-object"),Jt=Symbol.for("expect-global"),Ar=Symbol.for("asymmetric-matchers-object");if(!Object.prototype.hasOwnProperty.call(globalThis,pn)){const e=new WeakMap,t=Object.create(null),n=[],s=Object.create(null);Object.defineProperty(globalThis,pn,{get:()=>e}),Object.defineProperty(globalThis,Yt,{configurable:!0,get:()=>({state:e.get(globalThis[Jt]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,Ar,{get:()=>s})}function vt(e){return globalThis[pn].get(e)}function Hn(e,t){const n=globalThis[pn],s=n.get(t)||{};Object.assign(s,e),n.set(t,s)}function zi(){const e=()=>br(),t=e().green,n=e().red,s=e().inverse,r=e().bold,o=e().dim;function i(u,f="received",b="expected",w={}){const{comment:E="",isDirectExpectCall:g=!1,isNot:M=!1,promise:P="",secondArgument:F="",expectedColor:I=t,receivedColor:k=n,secondArgumentColor:U=t}=w;let B="",G="expect";return!g&&f!==""&&(B+=o(`${G}(`)+k(f),G=")"),P!==""&&(B+=o(`${G}.`)+P,G=""),M&&(B+=`${o(`${G}.`)}not`,G=""),u.includes(".")?G+=u:(B+=o(`${G}.`)+u,G=""),b===""?G+="()":(B+=o(`${G}(`)+I(b),F&&(B+=o(", ")+U(F)),G=")"),E!==""&&(G+=` // ${E}`),G!==""&&(B+=o(G)),B}const a="·",c=u=>u.replace(/\s+$/gm,f=>a.repeat(f.length));return{EXPECTED_COLOR:t,RECEIVED_COLOR:n,INVERTED_COLOR:s,BOLD_WEIGHT:r,DIM_COLOR:o,matcherHint:i,printReceived:u=>n(c(ze(u))),printExpected:u=>t(c(ze(u)))}}function Bf(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${un(e)}"`);globalThis[Yt].customEqualityTesters.push(...e)}function Mr(){return globalThis[Yt].customEqualityTesters}function fe(e,t,n,s){return n=n||[],Wi(e,t,[],[],n,s?Vi:Lf)}function Wo(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&Be("Function",e.asymmetricMatch)}function qf(e,t){const n=Wo(e),s=Wo(t);if(!(n&&s)){if(n)return e.asymmetricMatch(t);if(s)return t.asymmetricMatch(e)}}function Wi(e,t,n,s,r,o){let i=!0;const a=qf(e,t);if(a!==void 0)return a;const c={equals:fe};for(let w=0;w<r.length;w++){const E=r[w].call(c,e,t,r);if(E!==void 0)return E}if(e instanceof Error&&t instanceof Error)return e.message===t.message;if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;const l=Object.prototype.toString.call(e);if(l!==Object.prototype.toString.call(t))return!1;switch(l){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e!=typeof t?!1:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case"[object Date]":{const w=+e,E=+t;return w===E||Number.isNaN(w)&&Number.isNaN(E)}case"[object RegExp]":return e.source===t.source&&e.flags===t.flags}if(typeof e!="object"||typeof t!="object")return!1;if(Uo(e)&&Uo(t))return e.isEqualNode(t);let h=n.length;for(;h--;){if(n[h]===e)return s[h]===t;if(s[h]===t)return!1}if(n.push(e),s.push(t),l==="[object Array]"&&e.length!==t.length)return!1;const u=Vo(e,o);let f,b=u.length;if(Vo(t,o).length!==b)return!1;for(;b--;)if(f=u[b],i=o(t,f)&&Wi(e[f],t[f],n,s,r,o),!i)return!1;return n.pop(),s.pop(),i}function Vo(e,t){const n=[];for(const s in e)t(e,s)&&n.push(s);return n.concat(Object.getOwnPropertySymbols(e).filter(s=>Object.getOwnPropertyDescriptor(e,s).enumerable))}function Lf(e,t){return Vi(e,t)&&e[t]!==void 0}function Vi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Be(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Uo(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}const zf="@@__IMMUTABLE_KEYED__@@",Wf="@@__IMMUTABLE_SET__@@",Ui="@@__IMMUTABLE_ORDERED__@@";function Vf(e){return!!(e&&e[zf]&&!e[Ui])}function Uf(e){return!!(e&&e[Wf]&&!e[Ui])}const Ki=Symbol.iterator;function Ko(e){return!!(e!=null&&e[Ki])}function Ce(e,t,n=[],s=[],r=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Ko(e)||!Ko(t))return;if(e.constructor!==t.constructor)return!1;let o=s.length;for(;o--;)if(s[o]===e)return r[o]===t;s.push(e),r.push(t);const i=[...n.filter(l=>l!==Ce),a];function a(l,h){return Ce(l,h,[...i],[...s],[...r])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(Be("Set",e)||Uf(e)){let l=!0;for(const h of e)if(!t.has(h)){let u=!1;for(const f of t)fe(h,f,i)===!0&&(u=!0);if(u===!1){l=!1;break}}return s.pop(),r.pop(),l}else if(Be("Map",e)||Vf(e)){let l=!0;for(const h of e)if(!t.has(h[0])||!fe(h[1],t.get(h[0]),i)){let u=!1;for(const f of t){const b=fe(h[0],f[0],i);let w=!1;b===!0&&(w=fe(h[1],f[1],i)),w===!0&&(u=!0)}if(u===!1){l=!1;break}}return s.pop(),r.pop(),l}}const c=t[Ki]();for(const l of e){const h=c.next();if(h.done||!fe(l,h.value,i))return!1}return c.next().done?(s.pop(),r.pop(),!0):!1}function Gi(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.prototype.hasOwnProperty.call(e,t)||Gi(Object.getPrototypeOf(e),t)}function Go(e){return pr(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}function Ht(e,t,n=[]){const s=n.filter(o=>o!==Ht),r=(o=new WeakMap)=>(i,a)=>{if(Go(a))return Object.keys(a).every(c=>{if(Go(a[c])){if(o.has(a[c]))return fe(i[c],a[c],s);o.set(a[c],!0)}const l=i!=null&&Gi(i,c)&&fe(i[c],a[c],[...s,r(o)]);return o.delete(a[c]),l})};return r()(e,t)}function Yo(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function Jo(e,t){let n=e,s=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{n=new DataView(e),s=new DataView(t)}catch{return}}if(n.byteLength!==s.byteLength)return!1;for(let r=0;r<n.byteLength;r++)if(n.getUint8(r)!==s.getUint8(r))return!1;return!0}function cr(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const s=Object.keys(e),r=Object.keys(t),o=n.filter(i=>i!==cr);return fe(e,t,o,!0)&&fe(s,r)}function Kf(e,t="#{this}",n="#{exp}"){const s=`expected ${t} to be ${n} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${s}
|
|
449
|
-
|
|
450
|
-
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
451
|
-
|
|
452
|
-
Expected: ${t}
|
|
453
|
-
Received: serializes to the same string
|
|
454
|
-
`:s}function Gf(e,t){return`${t} ${e}${t===1?"":"s"}`}let nt=class{constructor(t,n=!1){this.sample=t,this.inverse=n}$$typeof=Symbol.for("jest.asymmetricMatcher");getMatcherContext(t){return{...vt(t||globalThis[Jt]),equals:fe,isNot:this.inverse,customTesters:Mr(),utils:{...zi(),diff:Vt,stringify:ze,iterableEquality:Ce,subsetEquality:Ht}}}[Symbol.for("chai/inspect")](t){const n=ze(this,t.depth,{min:!0});return n.length<=t.truncate?n:`${this.toString()}{…}`}};class Ho extends nt{constructor(t,n=!1){if(!Be("String",t))throw new Error("Expected is not a string");super(t,n)}asymmetricMatch(t){const n=Be("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class Yf extends nt{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class Xo extends nt{constructor(t,n=!1){super(t,n)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,n){return t?Object.prototype.hasOwnProperty.call(t,n)?!0:this.hasProperty(this.getPrototype(t),n):!1}asymmetricMatch(t){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let n=!0;const s=this.getMatcherContext();for(const r in this.sample)if(!this.hasProperty(t,r)||!fe(this.sample[r],t[r],s.customTesters)){n=!1;break}return this.inverse?!n:n}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class Qo extends nt{constructor(t,n=!1){super(t,n)}asymmetricMatch(t){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);const n=this.getMatcherContext(),s=this.sample.length===0||Array.isArray(t)&&this.sample.every(r=>t.some(o=>fe(r,o,n.customTesters)));return this.inverse?!s:s}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class Jf extends nt{constructor(t){if(typeof t>"u")throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(t)}fnNameFor(t){if(t.name)return t.name;const s=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*\*?\s*([\w$]+)\s*\(/);return s?s[1]:"<anonymous>"}asymmetricMatch(t){return this.sample===String?typeof t=="string"||t instanceof String:this.sample===Number?typeof t=="number"||t instanceof Number:this.sample===Function?typeof t=="function"||t instanceof Function:this.sample===Boolean?typeof t=="boolean"||t instanceof Boolean:this.sample===BigInt?typeof t=="bigint"||t instanceof BigInt:this.sample===Symbol?typeof t=="symbol"||t instanceof Symbol:this.sample===Object?typeof t=="object":t instanceof this.sample}toString(){return"Any"}getExpectedType(){return this.sample===String?"string":this.sample===Number?"number":this.sample===Function?"function":this.sample===Object?"object":this.sample===Boolean?"boolean":this.fnNameFor(this.sample)}toAsymmetricMatcher(){return`Any<${this.fnNameFor(this.sample)}>`}}class Zo extends nt{constructor(t,n=!1){if(!Be("String",t)&&!Be("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n)}asymmetricMatch(t){const n=Be("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class es extends nt{precision;constructor(t,n=2,s=!1){if(!Be("Number",t))throw new Error("Expected is not a Number");if(!Be("Number",n))throw new Error("Precision is not a Number");super(t),this.inverse=s,this.precision=n}asymmetricMatch(t){if(!Be("Number",t))return!1;let n=!1;return t===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?n=!0:n=Math.abs(this.sample-t)<10**-this.precision/2,this.inverse?!n:n}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${Gf("digit",this.precision)})`].join(" ")}}const Hf=(e,t)=>{t.addMethod(e.expect,"anything",()=>new Yf),t.addMethod(e.expect,"any",n=>new Jf(n)),t.addMethod(e.expect,"stringContaining",n=>new Ho(n)),t.addMethod(e.expect,"objectContaining",n=>new Xo(n)),t.addMethod(e.expect,"arrayContaining",n=>new Qo(n)),t.addMethod(e.expect,"stringMatching",n=>new Zo(n)),t.addMethod(e.expect,"closeTo",(n,s)=>new es(n,s)),e.expect.not={stringContaining:n=>new Ho(n,!0),objectContaining:n=>new Xo(n,!0),arrayContaining:n=>new Qo(n,!0),stringMatching:n=>new Zo(n,!0),closeTo:(n,s)=>new es(n,s,!0)}};function ts(e,t){return e&&t instanceof Promise&&(t=t.finally(()=>{const n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1)}),e.promises||(e.promises=[]),e.promises.push(t)),t}function Yi(e,t){return function(...n){var s;const r=e.flag(this,"vitest-test");if(!(r?.context._local?r.context.expect.getState():vt(globalThis[Jt])).soft)return t.apply(this,n);if(!r)throw new Error("expect.soft() can only be used inside a test");try{return t.apply(this,n)}catch(i){r.result||(r.result={state:"fail"}),r.result.state="fail",(s=r.result).errors||(s.errors=[]),r.result.errors.push(ku(i))}}}const Xf=(e,t)=>{const{AssertionError:n}=e,s=()=>br(),r=Mr();function o(u,f){const b=w=>{const E=Yi(t,f);t.addMethod(e.Assertion.prototype,w,E),t.addMethod(globalThis[Yt].matchers,w,E)};Array.isArray(u)?u.forEach(w=>b(w)):b(u)}["throw","throws","Throw"].forEach(u=>{t.overwriteMethod(e.Assertion.prototype,u,f=>function(...b){const w=t.flag(this,"promise"),E=t.flag(this,"object"),g=t.flag(this,"negate");if(w==="rejects")t.flag(this,"object",()=>{throw E});else if(w==="resolves"&&typeof E!="function"){if(g)return;{const M=t.flag(this,"message")||"expected promise to throw an error, but it didn't",P={showDiff:!1};throw new n(M,P,t.flag(this,"ssfi"))}}f.apply(this,b)})}),o("withTest",function(u){return t.flag(this,"vitest-test",u),this}),o("toEqual",function(u){const f=t.flag(this,"object"),b=fe(f,u,[...r,Ce]);return this.assert(b,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",u,f)}),o("toStrictEqual",function(u){const f=t.flag(this,"object"),b=fe(f,u,[...r,Ce,Yo,cr,Jo],!0);return this.assert(b,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",u,f)}),o("toBe",function(u){const f=this._obj,b=Object.is(f,u);let w="";return b||(fe(f,u,[...r,Ce,Yo,cr,Jo],!0)?w="toStrictEqual":fe(f,u,[...r,Ce])&&(w="toEqual")),this.assert(b,Kf(w),"expected #{this} not to be #{exp} // Object.is equality",u,f)}),o("toMatchObject",function(u){const f=this._obj;return this.assert(fe(f,u,[...r,Ce,Ht]),"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",u,f)}),o("toMatch",function(u){const f=this._obj;return this.assert(typeof u=="string"?f.includes(u):f.match(u),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",u,f)}),o("toContain",function(u){const f=this._obj;if(typeof Node<"u"&&f instanceof Node){if(!(u instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof u}`);return this.assert(f.contains(u),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",u,f)}if(typeof DOMTokenList<"u"&&f instanceof DOMTokenList){Le(u,"class name",["string"]);const w=t.flag(this,"negate")?f.value.replace(u,"").trim():`${f.value} ${u}`;return this.assert(f.contains(u),`expected "${f.value}" to contain "${u}"`,`expected "${f.value}" not to contain "${u}"`,w,f.value)}return typeof f=="string"&&typeof u=="string"?this.assert(f.includes(u),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",u,f):(f!=null&&typeof f!="string"&&t.flag(this,"object",Array.from(f)),this.contain(u))}),o("toContainEqual",function(u){const f=t.flag(this,"object"),b=Array.from(f).findIndex(w=>fe(w,u,r));this.assert(b!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",u)}),o("toBeTruthy",function(){const u=t.flag(this,"object");this.assert(!!u,"expected #{this} to be truthy","expected #{this} to not be truthy",u,!1)}),o("toBeFalsy",function(){const u=t.flag(this,"object");this.assert(!u,"expected #{this} to be falsy","expected #{this} to not be falsy",u,!1)}),o("toBeGreaterThan",function(u){const f=this._obj;return Le(f,"actual",["number","bigint"]),Le(u,"expected",["number","bigint"]),this.assert(f>u,`expected ${f} to be greater than ${u}`,`expected ${f} to be not greater than ${u}`,f,u,!1)}),o("toBeGreaterThanOrEqual",function(u){const f=this._obj;return Le(f,"actual",["number","bigint"]),Le(u,"expected",["number","bigint"]),this.assert(f>=u,`expected ${f} to be greater than or equal to ${u}`,`expected ${f} to be not greater than or equal to ${u}`,f,u,!1)}),o("toBeLessThan",function(u){const f=this._obj;return Le(f,"actual",["number","bigint"]),Le(u,"expected",["number","bigint"]),this.assert(f<u,`expected ${f} to be less than ${u}`,`expected ${f} to be not less than ${u}`,f,u,!1)}),o("toBeLessThanOrEqual",function(u){const f=this._obj;return Le(f,"actual",["number","bigint"]),Le(u,"expected",["number","bigint"]),this.assert(f<=u,`expected ${f} to be less than or equal to ${u}`,`expected ${f} to be not less than or equal to ${u}`,f,u,!1)}),o("toBeNaN",function(){return this.be.NaN}),o("toBeUndefined",function(){return this.be.undefined}),o("toBeNull",function(){return this.be.null}),o("toBeDefined",function(){const u=t.flag(this,"negate");return t.flag(this,"negate",!1),u?this.be.undefined:this.not.be.undefined}),o("toBeTypeOf",function(u){const f=typeof this._obj,b=u===f;return this.assert(b,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",u,f)}),o("toBeInstanceOf",function(u){return this.instanceOf(u)}),o("toHaveLength",function(u){return this.have.length(u)}),o("toHaveProperty",function(...u){Array.isArray(u[0])&&(u[0]=u[0].map(I=>String(I).replace(/([.[\]])/g,"\\$1")).join("."));const f=this._obj,[b,w]=u,E=()=>Object.prototype.hasOwnProperty.call(f,b)?{value:f[b],exists:!0}:t.getPathInfo(f,b),{value:g,exists:M}=E(),P=M&&(u.length===1||fe(w,g,r)),F=u.length===1?"":` with value ${t.objDisplay(w)}`;return this.assert(P,`expected #{this} to have property "${b}"${F}`,`expected #{this} to not have property "${b}"${F}`,w,M?g:void 0)}),o("toBeCloseTo",function(u,f=2){const b=this._obj;let w=!1,E=0,g=0;return u===Number.POSITIVE_INFINITY&&b===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY&&b===Number.NEGATIVE_INFINITY?w=!0:(E=10**-f/2,g=Math.abs(b-u),w=g<E),this.assert(w,`expected #{this} to be close to #{exp}, received difference is ${g}, but expected ${E}`,`expected #{this} to not be close to #{exp}, received difference is ${g}, but expected ${E}`,u,b,!1)});const i=u=>{if(!qi(u._obj))throw new TypeError(`${t.inspect(u._obj)} is not a spy or a call to a spy!`)},a=u=>(i(u),u._obj),c=u=>{const f=u%10,b=u%100;return f===1&&b!==11?`${u}st`:f===2&&b!==12?`${u}nd`:f===3&&b!==13?`${u}rd`:`${u}th`},l=(u,f,b)=>(u.mock.calls&&(f+=s().gray(`
|
|
455
|
-
|
|
456
|
-
Received:
|
|
457
|
-
|
|
458
|
-
${u.mock.calls.map((w,E)=>{let g=s().bold(` ${c(E+1)} ${u.getMockName()} call:
|
|
459
|
-
|
|
460
|
-
`);return b?g+=Vt(b,w,{omitAnnotationLines:!0}):g+=ze(w).split(`
|
|
461
|
-
`).map(M=>` ${M}`).join(`
|
|
462
|
-
`),g+=`
|
|
463
|
-
`,g}).join(`
|
|
464
|
-
`)}`)),f+=s().gray(`
|
|
465
|
-
|
|
466
|
-
Number of calls: ${s().bold(u.mock.calls.length)}
|
|
467
|
-
`),f),h=(u,f,b)=>(f+=s().gray(`
|
|
468
|
-
|
|
469
|
-
Received:
|
|
470
|
-
|
|
471
|
-
${u.mock.results.map((w,E)=>{let g=s().bold(` ${c(E+1)} ${u.getMockName()} call return:
|
|
472
|
-
|
|
473
|
-
`);return b?g+=Vt(b,w.value,{omitAnnotationLines:!0}):g+=ze(w).split(`
|
|
474
|
-
`).map(M=>` ${M}`).join(`
|
|
475
|
-
`),g+=`
|
|
476
|
-
`,g}).join(`
|
|
477
|
-
`)}`),f+=s().gray(`
|
|
478
|
-
|
|
479
|
-
Number of calls: ${s().bold(u.mock.calls.length)}
|
|
480
|
-
`),f);o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(u){const f=a(this),b=f.getMockName(),w=f.mock.calls.length;return this.assert(w===u,`expected "${b}" to be called #{exp} times, but got ${w} times`,`expected "${b}" to not be called #{exp} times`,u,w,!1)}),o("toHaveBeenCalledOnce",function(){const u=a(this),f=u.getMockName(),b=u.mock.calls.length;return this.assert(b===1,`expected "${f}" to be called once, but got ${b} times`,`expected "${f}" to not be called once`,1,b,!1)}),o(["toHaveBeenCalled","toBeCalled"],function(){const u=a(this),f=u.getMockName(),b=u.mock.calls.length,w=b>0,E=t.flag(this,"negate");let g=t.getMessage(this,[w,`expected "${f}" to be called at least once`,`expected "${f}" to not be called at all, but actually been called ${b} times`,!0,w]);if(w&&E&&(g=l(u,g)),w&&E||!w&&!E)throw new n(g)}),o(["toHaveBeenCalledWith","toBeCalledWith"],function(...u){const f=a(this),b=f.getMockName(),w=f.mock.calls.some(M=>fe(M,u,[...r,Ce])),E=t.flag(this,"negate"),g=t.getMessage(this,[w,`expected "${b}" to be called with arguments: #{exp}`,`expected "${b}" to not be called with arguments: #{exp}`,u]);if(w&&E||!w&&!E)throw new n(l(f,g,u))}),o(["toHaveBeenNthCalledWith","nthCalledWith"],function(u,...f){const b=a(this),w=b.getMockName(),E=b.mock.calls[u-1];this.assert(fe(E,f,[...r,Ce]),`expected ${c(u)} "${w}" call to have been called with #{exp}`,`expected ${c(u)} "${w}" call to not have been called with #{exp}`,f,E)}),o(["toHaveBeenLastCalledWith","lastCalledWith"],function(...u){const f=a(this),b=f.getMockName(),w=f.mock.calls[f.mock.calls.length-1];this.assert(fe(w,u,[...r,Ce]),`expected last "${b}" call to have been called with #{exp}`,`expected last "${b}" call to not have been called with #{exp}`,u,w)}),o(["toThrow","toThrowError"],function(u){if(typeof u=="string"||typeof u>"u"||u instanceof RegExp)return this.throws(u);const f=this._obj,b=t.flag(this,"promise"),w=t.flag(this,"negate");let E=null;if(b==="rejects")E=f;else if(b==="resolves"&&typeof f!="function"){if(w)return;{const g=t.flag(this,"message")||"expected promise to throw an error, but it didn't",M={showDiff:!1};throw new n(g,M,t.flag(this,"ssfi"))}}else{let g=!1;try{f()}catch(M){g=!0,E=M}if(!g&&!w){const M=t.flag(this,"message")||"expected function to throw an error, but it didn't",P={showDiff:!1};throw new n(M,P,t.flag(this,"ssfi"))}}if(typeof u=="function"){const g=u.name||u.prototype.constructor.name;return this.assert(E&&E instanceof u,`expected error to be instance of ${g}`,`expected error not to be instance of ${g}`,u,E)}if(u instanceof Error)return this.assert(E&&u.message===E.message,`expected error to have message: ${u.message}`,`expected error not to have message: ${u.message}`,u.message,E&&E.message);if(typeof u=="object"&&"asymmetricMatch"in u&&typeof u.asymmetricMatch=="function"){const g=u;return this.assert(E&&g.asymmetricMatch(E),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",g,E)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof u}"`)}),o(["toHaveReturned","toReturn"],function(){const u=a(this),f=u.getMockName(),b=u.mock.calls.length>0&&u.mock.results.some(({type:w})=>w!=="throw");this.assert(b,`expected "${f}" to be successfully called at least once`,`expected "${f}" to not be successfully called`,b,!b,!1)}),o(["toHaveReturnedTimes","toReturnTimes"],function(u){const f=a(this),b=f.getMockName(),w=f.mock.results.reduce((E,{type:g})=>g==="throw"?E:++E,0);this.assert(w===u,`expected "${b}" to be successfully called ${u} times`,`expected "${b}" to not be successfully called ${u} times`,`expected number of returns: ${u}`,`received number of returns: ${w}`,!1)}),o(["toHaveReturnedWith","toReturnWith"],function(u){const f=a(this),b=f.getMockName(),w=f.mock.results.some(({type:M,value:P})=>M==="return"&&fe(u,P)),E=t.flag(this,"negate"),g=t.getMessage(this,[w,`expected "${b}" to return with: #{exp} at least once`,`expected "${b}" to not return with: #{exp}`,u]);if(w&&E||!w&&!E)throw new n(h(f,g,u))}),o(["toHaveLastReturnedWith","lastReturnedWith"],function(u){const f=a(this),b=f.getMockName(),{value:w}=f.mock.results[f.mock.results.length-1],E=fe(w,u);this.assert(E,`expected last "${b}" call to return #{exp}`,`expected last "${b}" call to not return #{exp}`,u,w)}),o(["toHaveNthReturnedWith","nthReturnedWith"],function(u,f){const b=a(this),w=b.getMockName(),E=t.flag(this,"negate"),{type:g,value:M}=b.mock.results[u-1],P=`${c(u)} call`;!E&&g==="throw"&&e.assert.fail(`expected ${P} to return #{exp}, but instead it threw an error`);const F=fe(M,f);this.assert(F,`expected ${P} "${w}" call to return #{exp}`,`expected ${P} "${w}" call to not return #{exp}`,f,M)}),o("toSatisfy",function(u,f){return this.be.satisfy(u,f)}),t.addProperty(e.Assertion.prototype,"resolves",function(){const f=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",f);const b=t.flag(this,"vitest-test"),w=t.flag(this,"object");if(typeof w?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof w}'.`);const E=new Proxy(this,{get:(g,M,P)=>{const F=Reflect.get(g,M,P);return typeof F!="function"?F instanceof e.Assertion?E:F:async(...I)=>{const k=w.then(U=>(t.flag(this,"object",U),F.call(this,...I)),U=>{const B=new n(`promise rejected "${t.inspect(U)}" instead of resolving`,{showDiff:!1});throw B.cause=U,B.stack=f.stack.replace(f.message,B.message),B});return ts(b,k)}}});return E}),t.addProperty(e.Assertion.prototype,"rejects",function(){const f=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",f);const b=t.flag(this,"vitest-test"),w=t.flag(this,"object"),E=typeof w=="function"?w():w;if(typeof E?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof E}'.`);const g=new Proxy(this,{get:(M,P,F)=>{const I=Reflect.get(M,P,F);return typeof I!="function"?I instanceof e.Assertion?g:I:async(...k)=>{const U=E.then(B=>{const G=new n(`promise resolved "${t.inspect(B)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:B});throw G.stack=f.stack.replace(f.message,G.message),G},B=>(t.flag(this,"object",B),I.call(this,...k)));return ts(b,U)}}});return g})};function Qf(e,t){const n=e._obj,s=hn.flag(e,"negate"),r=hn.flag(e,"promise")||"",o={...zi(),diff:Vt,stringify:ze,iterableEquality:Ce,subsetEquality:Ht};return{state:{...vt(t),customTesters:Mr(),isNot:s,utils:o,promise:r,equals:fe,suppressedErrors:[]},isNot:s,obj:n}}class ns extends Error{constructor(t,n,s){super(t),this.actual=n,this.expected=s}}function Zf(e,t){return(n,s)=>{Object.entries(t).forEach(([r,o])=>{function i(...h){const{state:u,isNot:f,obj:b}=Qf(this,e),w=o.call(u,b,...h);if(w&&typeof w=="object"&&w instanceof Promise)return w.then(({pass:F,message:I,actual:k,expected:U})=>{if(F&&f||!F&&!f)throw new ns(I(),k,U)});const{pass:E,message:g,actual:M,expected:P}=w;if(E&&f||!E&&!f)throw new ns(g(),M,P)}const a=Yi(s,i);s.addMethod(globalThis[Yt].matchers,r,a),s.addMethod(n.Assertion.prototype,r,a);class c extends nt{constructor(u=!1,...f){super(f,u)}asymmetricMatch(u){const{pass:f}=o.call(this.getMatcherContext(e),u,...this.sample);return this.inverse?!f:f}toString(){return`${this.inverse?"not.":""}${r}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(String).join(", ")}>`}}const l=(...h)=>new c(!1,...h);Object.defineProperty(e,r,{configurable:!0,enumerable:!0,value:l,writable:!0}),Object.defineProperty(e.not,r,{configurable:!0,enumerable:!0,value:(...h)=>new c(!0,...h),writable:!0}),Object.defineProperty(globalThis[Ar],r,{configurable:!0,enumerable:!0,value:l,writable:!0})})}}const eh=(e,t)=>{t.addMethod(e.expect,"extend",(n,s)=>{e.use(Zf(n,s))})};function th(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ji={exports:{}};/*
|
|
481
|
-
* @version 1.4.0
|
|
482
|
-
* @date 2015-10-26
|
|
483
|
-
* @stability 3 - Stable
|
|
484
|
-
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
485
|
-
* @license MIT License
|
|
486
|
-
*/var rs=function(e,t){var n,s,r=1,o=0,i=0,a=String.alphabet;function c(l,h,u){if(u){for(n=h;u=c(l,n),u<76&&u>65;)++n;return+l.slice(h-1,n)}return u=a&&a.indexOf(l.charAt(h)),u>-1?u+76:(u=l.charCodeAt(h)||0,u<45||u>127?u:u<46?65:u<48?u-1:u<58?u+18:u<65?u-11:u<91?u+11:u<97?u-37:u<123?u+5:u-63)}if((e+="")!=(t+="")){for(;r;)if(s=c(e,o++),r=c(t,i++),s<76&&r<76&&s>66&&r>66&&(s=c(e,o,o),r=c(t,i,o=n),i=n),s!=r)return s<r?-1:1}return 0};try{Ji.exports=rs}catch{String.naturalCompare=rs}var nh=Ji.exports,rh=th(nh);function Hi(e){return e!=null}function oh(e){return e===null||typeof e!="function"&&typeof e!="object"}function an(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function sh(e){let t=-1,n=null,s=0,r=0,o=null;for(;t<=e.length;){o=e[t],t++;const i=e[t];if((i==='"'||i==="'"||i==="`")&&o!=="\\"&&(n===i?n=null:n||(n=i)),n||(i==="("&&s++,i===")"&&r++),s&&r&&s===r)return t}return null}let ih=()=>"Promise{…}";try{const{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(ih=(s,r)=>{const[o,i]=e(s);return o===t?"Promise{<pending>}":`Promise${o===n?"!":""}{${r.inspect(i,r)}}`})}catch{}let os=!1;try{const e=require("util");os=e.inspect?e.inspect.custom:!1}catch{os=!1}const Pr=/\r?\n/;function ah(e,t,n){const s=e.split(Pr),r=/\r\n/.test(e)?2:1;let o=0;if(t>s.length)return e.length;for(let i=0;i<t-1;i++)o+=s[i].length+r;return o+n}function ch(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const n=e.split(Pr),s=/\r\n/.test(e)?2:1;let r=0,o=0;for(;o<n.length;o++){const i=n[o].length+s;if(r+i>=t)break;r+=i}return o+1}var Xi;Xi=/\r?\n|[\r\u2028\u2029]/y;RegExp(Xi.source);var Qi={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(Qi.keyword);new Set(Qi.strict);const uh=(e,t,n,s,r,o)=>{const i=e.getMockName(),a=i==="vi.fn()"?"":` ${i}`;let c="";if(e.mock.calls.length!==0){const l=n+t.indent;c=` {${t.spacingOuter}${l}"calls": ${o(e.mock.calls,t,l,s,r)}${t.min?", ":","}${t.spacingOuter}${l}"results": ${o(e.mock.results,t,l,s,r)}${t.min?"":","}${t.spacingOuter}${n}}`}return`[MockFunction${a}]${c}`},lh=e=>e&&!!e._isMockFunction,fh={serialize:uh,test:lh},{DOMCollection:hh,DOMElement:ph,Immutable:dh,ReactElement:mh,ReactTestComponent:yh,AsymmetricMatcher:gh}=gn;let ur=[yh,mh,ph,hh,dh,gh,fh];function bh(e){ur=[e].concat(ur)}function wh(){return ur}function vh(e,t){return`${e} ${t}`}function Eh(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function Sh(e,t){const n=t.updateSnapshot,s=Object.create(null);let r="",o=!1;if(e!=null)try{r=e,new Function("exports",r)(s)}catch{}return(n==="all"||n==="new")&&r&&(o=!0),{data:s,dirty:o}}function Th(e){return e.includes(`
|
|
487
|
-
`)?`
|
|
488
|
-
${e}
|
|
489
|
-
`:e}function ss(e){return e.length>2&&e.startsWith(`
|
|
490
|
-
`)&&e.endsWith(`
|
|
491
|
-
`)?e.slice(1,-1):e}const xh=!0,Oh=!1;function Ah(e,t=2,n={}){return $r(De(e,{escapeRegex:xh,indent:t,plugins:wh(),printFunctionName:Oh,...n}))}function Mh(e){return e.replace(/`|\\|\${/g,"\\$&")}function is(e){return`\`${Mh(e)}\``}function $r(e){return e.replace(/\r\n|\r/g,`
|
|
492
|
-
`)}async function Ph(e,t,n){const s=Object.keys(t).sort(rh).map(a=>`exports[${is(a)}] = ${is($r(t[a]))};`),r=`${e.getHeader()}
|
|
493
|
-
|
|
494
|
-
${s.join(`
|
|
495
|
-
|
|
496
|
-
`)}
|
|
497
|
-
`,o=await e.readSnapshotFile(n);o!=null&&o===r||await e.saveSnapshotFile(n,r)}function as(e){function t(){var r,o;const i=/^( +)}\s+$/m.exec(e||""),a=(r=i?.[1])==null?void 0:r.length;if(a)return a;const c=/^\n( +)"/.exec(e||"");return((o=c?.[1])==null?void 0:o.length)||0}const n=t();let s=e?.trim();return n&&(s=s?.replace(new RegExp(`^${" ".repeat(n)}`,"gm"),"").replace(/ +}$/,"}")),s}function lr(e=[],t=[]){const n=Array.from(e);return t.forEach((s,r)=>{const o=n[r];Array.isArray(e[r])?n[r]=lr(e[r],s):an(o)?n[r]=_r(e[r],s):n[r]=s}),n}function _r(e,t){if(an(e)&&an(t)){const n={...e};return Object.keys(t).forEach(s=>{an(t[s])&&!t[s].$$typeof?s in e?n[s]=_r(e[s],t[s]):Object.assign(n,{[s]:t[s]}):Array.isArray(t[s])?n[s]=lr(e[s],t[s]):Object.assign(n,{[s]:t[s]})}),n}else if(Array.isArray(e)&&Array.isArray(t))return lr(e,t);return e}const $h=44,cs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_h=new Uint8Array(64),Zi=new Uint8Array(128);for(let e=0;e<cs.length;e++){const t=cs.charCodeAt(e);_h[e]=t,Zi[t]=e}function Ch(e){const t=new Int32Array(5),n=[];let s=0;do{const r=Nh(e,s),o=[];let i=!0,a=0;t[0]=0;for(let c=s;c<r;c++){let l;c=Nt(e,c,t,0);const h=t[0];h<a&&(i=!1),a=h,us(e,c,r)?(c=Nt(e,c,t,1),c=Nt(e,c,t,2),c=Nt(e,c,t,3),us(e,c,r)?(c=Nt(e,c,t,4),l=[h,t[1],t[2],t[3],t[4]]):l=[h,t[1],t[2],t[3]]):l=[h],o.push(l)}i||Ih(o),n.push(o),s=r+1}while(s<=e.length);return n}function Nh(e,t){const n=e.indexOf(";",t);return n===-1?e.length:n}function Nt(e,t,n,s){let r=0,o=0,i=0;do{const c=e.charCodeAt(t++);i=Zi[c],r|=(i&31)<<o,o+=5}while(i&32);const a=r&1;return r>>>=1,a&&(r=-2147483648|-r),n[s]+=r,t}function us(e,t,n){return t>=n?!1:e.charCodeAt(t)!==$h}function Ih(e){e.sort(kh)}function kh(e,t){return e[0]-t[0]}const jh=/^[\w+.-]+:\/\//,Fh=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Rh=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var ve;(function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"})(ve||(ve={}));function Dh(e){return jh.test(e)}function Bh(e){return e.startsWith("//")}function ea(e){return e.startsWith("/")}function qh(e){return e.startsWith("file:")}function ls(e){return/^[.?#]/.test(e)}function tn(e){const t=Fh.exec(e);return ta(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function Lh(e){const t=Rh.exec(e),n=t[2];return ta("file:","",t[1]||"","",ea(n)?n:"/"+n,t[3]||"",t[4]||"")}function ta(e,t,n,s,r,o,i){return{scheme:e,user:t,host:n,port:s,path:r,query:o,hash:i,type:ve.Absolute}}function fs(e){if(Bh(e)){const n=tn("http:"+e);return n.scheme="",n.type=ve.SchemeRelative,n}if(ea(e)){const n=tn("http://foo.com"+e);return n.scheme="",n.host="",n.type=ve.AbsolutePath,n}if(qh(e))return Lh(e);if(Dh(e))return tn(e);const t=tn("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?ve.Query:e.startsWith("#")?ve.Hash:ve.RelativePath:ve.Empty,t}function zh(e){if(e.endsWith("/.."))return e;const t=e.lastIndexOf("/");return e.slice(0,t+1)}function Wh(e,t){na(t,t.type),e.path==="/"?e.path=t.path:e.path=zh(t.path)+e.path}function na(e,t){const n=t<=ve.RelativePath,s=e.path.split("/");let r=1,o=0,i=!1;for(let c=1;c<s.length;c++){const l=s[c];if(!l){i=!0;continue}if(i=!1,l!=="."){if(l===".."){o?(i=!0,o--,r--):n&&(s[r++]=l);continue}s[r++]=l,o++}}let a="";for(let c=1;c<r;c++)a+="/"+s[c];(!a||i&&!a.endsWith("/.."))&&(a+="/"),e.path=a}function Vh(e,t){if(!e&&!t)return"";const n=fs(e);let s=n.type;if(t&&s!==ve.Absolute){const o=fs(t),i=o.type;switch(s){case ve.Empty:n.hash=o.hash;case ve.Hash:n.query=o.query;case ve.Query:case ve.RelativePath:Wh(n,o);case ve.AbsolutePath:n.user=o.user,n.host=o.host,n.port=o.port;case ve.SchemeRelative:n.scheme=o.scheme}i>s&&(s=i)}na(n,s);const r=n.query+n.hash;switch(s){case ve.Hash:case ve.Query:return r;case ve.RelativePath:{const o=n.path.slice(1);return o?ls(t||e)&&!ls(o)?"./"+o+r:o+r:r||"."}case ve.AbsolutePath:return n.path+r;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+r}}function hs(e,t){return t&&!t.endsWith("/")&&(t+="/"),Vh(e,t)}function Uh(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}const et=0,Kh=1,Gh=2,Yh=3,Jh=4;function Hh(e,t){const n=ps(e,0);if(n===e.length)return e;t||(e=e.slice());for(let s=n;s<e.length;s=ps(e,s+1))e[s]=Qh(e[s],t);return e}function ps(e,t){for(let n=t;n<e.length;n++)if(!Xh(e[n]))return n;return e.length}function Xh(e){for(let t=1;t<e.length;t++)if(e[t][et]<e[t-1][et])return!1;return!0}function Qh(e,t){return t||(e=e.slice()),e.sort(Zh)}function Zh(e,t){return e[et]-t[et]}let dn=!1;function ep(e,t,n,s){for(;n<=s;){const r=n+(s-n>>1),o=e[r][et]-t;if(o===0)return dn=!0,r;o<0?n=r+1:s=r-1}return dn=!1,n-1}function tp(e,t,n){for(let s=n+1;s<e.length&&e[s][et]===t;n=s++);return n}function np(e,t,n){for(let s=n-1;s>=0&&e[s][et]===t;n=s--);return n}function rp(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function op(e,t,n,s){const{lastKey:r,lastNeedle:o,lastIndex:i}=n;let a=0,c=e.length-1;if(s===r){if(t===o)return dn=i!==-1&&e[i][et]===t,i;t>=o?a=i===-1?0:i:c=i}return n.lastKey=s,n.lastNeedle=t,n.lastIndex=ep(e,t,a,c)}const sp="`line` must be greater than 0 (lines start at line 1)",ip="`column` must be greater than or equal to 0 (columns start at column 0)",ds=-1,ap=1;let ms,ra;class cp{constructor(t,n){const s=typeof t=="string";if(!s&&t._decodedMemo)return t;const r=s?JSON.parse(t):t,{version:o,file:i,names:a,sourceRoot:c,sources:l,sourcesContent:h}=r;this.version=o,this.file=i,this.names=a||[],this.sourceRoot=c,this.sources=l,this.sourcesContent=h;const u=hs(c||"",Uh(n));this.resolvedSources=l.map(b=>hs(b||"",u));const{mappings:f}=r;typeof f=="string"?(this._encoded=f,this._decoded=void 0):(this._encoded=void 0,this._decoded=Hh(f,s)),this._decodedMemo=rp(),this._bySources=void 0,this._bySourceMemos=void 0}}ms=e=>e._decoded||(e._decoded=Ch(e._encoded)),ra=(e,{line:t,column:n,bias:s})=>{if(t--,t<0)throw new Error(sp);if(n<0)throw new Error(ip);const r=ms(e);if(t>=r.length)return nn(null,null,null,null);const o=r[t],i=up(o,e._decodedMemo,t,n,s||ap);if(i===-1)return nn(null,null,null,null);const a=o[i];if(a.length===1)return nn(null,null,null,null);const{names:c,resolvedSources:l}=e;return nn(l[a[Kh]],a[Gh]+1,a[Yh],a.length===5?c[a[Jh]]:null)};function nn(e,t,n,s){return{source:e,line:t,column:n,name:s}}function up(e,t,n,s,r){let o=op(e,s,t,n);return dn?o=(r===ds?tp:np)(e,s,o):r===ds&&o++,o===-1||o===e.length?-1:o}const oa=/^\s*at .*(\S+:\d+|\(native\))/m,lp=/^(eval@)?(\[native code])?$/,fp=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/vite-node/dist/","/vite-node/src/","/node_modules/chai/","/node_modules/tinypool/","/node_modules/tinyspy/","/deps/chai.js",/__vitest_browser__/];function sa(e){if(!e.includes(":"))return[e];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!n)return[e];let s=n[1];return(s.startsWith("http:")||s.startsWith("https:"))&&(s=new URL(s).pathname),s.startsWith("/@fs/")&&(s=s.slice(typeof process<"u"&&process.platform==="win32"?5:4)),[s,n[2]||void 0,n[3]||void 0]}function hp(e){let t=e.trim();if(lp.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;const n=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=t.match(n),r=s&&s[1]?s[1]:void 0,[o,i,a]=sa(t.replace(n,""));return!o||!i||!a?null:{file:o,method:r||"",line:Number.parseInt(i),column:Number.parseInt(a)}}function pp(e){let t=e.trim();if(!oa.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const s=n.match(/ (\(.+\)$)/);n=s?n.replace(s[0],""):n;const[r,o,i]=sa(s?s[1]:n);let a=s&&n||"",c=r&&["eval","<anonymous>"].includes(r)?void 0:r;return!c||!o||!i?null:(a.startsWith("async ")&&(a=a.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=Bu(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"")),{method:a,file:c,line:Number.parseInt(o),column:Number.parseInt(i)})}function dp(e,t={}){const{ignoreStackEntries:n=fp}=t;let s=oa.test(e)?yp(e):mp(e);return n.length&&(s=s.filter(r=>!n.some(o=>r.file.match(o)))),s.map(r=>{var o;const i=(o=t.getSourceMap)==null?void 0:o.call(t,r.file);if(!i||typeof i!="object"||!i.version)return r;const a=new cp(i),{line:c,column:l}=ra(a,r);return c!=null&&l!=null?{...r,line:c,column:l}:r})}function mp(e){return e.split(`
|
|
498
|
-
`).map(t=>hp(t)).filter(Hi)}function yp(e){return e.split(`
|
|
499
|
-
`).map(t=>pp(t)).filter(Hi)}function gp(e,t={}){if(!e||oh(e))return[];if(e.stacks)return e.stacks;const n=e.stack||e.stackStr||"";let s=dp(n,t);return t.frameFilter&&(s=s.filter(r=>t.frameFilter(e,r)!==!1)),e.stacks=s,s}async function bp(e,t){const n=(await Promise.resolve().then(()=>require("./magic-string.es-EQkD18No.cjs"))).default,s=new Set(t.map(r=>r.file));await Promise.all(Array.from(s).map(async r=>{const o=t.filter(l=>l.file===r),i=await e.readSnapshotFile(r),a=new n(i);for(const l of o){const h=ah(i,l.line,l.column);Tp(i,a,h,l.snapshot)}const c=a.toString();c!==i&&await e.saveSnapshotFile(r,c)}))}const wp=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\S\s]*\*\/\s*|\/\/.*\s+)*\s*({)/m;function vp(e,t,n,s){let r=e.slice(n);const o=wp.exec(r);if(!o)return!1;r=r.slice(o.index);let i=sh(r);if(i===null)return!1;i+=n+o.index;const a=n+o.index+o[0].length,c=Ep(e,a),l=`, ${ia(s,e,n)}`;return c===i?t.appendLeft(i,l):t.overwrite(c,i,l),!0}function Ep(e,t){let n=1,s=0;for(;n!==s&&t<e.length;){const r=e[t++];r==="{"?n++:r==="}"&&s++}return t}function ia(e,t,n){const s=ch(t,n),o=t.split(Pr)[s-1].match(/^\s*/)[0]||"",i=o.includes(" ")?`${o} `:`${o} `,a=e.trim().replace(/\\/g,"\\\\").split(/\n/g),c=a.length<=1,l="`";return c?`${l}${a.join(`
|
|
500
|
-
`).replace(/`/g,"\\`").replace(/\${/g,"\\${")}${l}`:`${l}
|
|
501
|
-
${a.map(h=>h?i+h:"").join(`
|
|
502
|
-
`).replace(/`/g,"\\`").replace(/\${/g,"\\${")}
|
|
503
|
-
${o}${l}`}const Sp=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\S\s]*\*\/\s*|\/\/.*\s+)*\s*[\w_$]*(['"`\)])/m;function Tp(e,t,n,s){const r=e.slice(n),o=Sp.exec(r),i=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(r);if(!o||o.index!==i?.index)return vp(e,t,n,s);const a=o[1],c=n+o.index+o[0].length,l=ia(s,e,n);if(a===")")return t.appendRight(c-1,l),!0;const u=new RegExp(`(?:^|[^\\\\])${a}`).exec(e.slice(c));if(!u)return!1;const f=c+u.index+u[0].length;return t.overwrite(c-1,f,l),!0}const xp=/^([^\S\n]*)\S/m;function ys(e){const t=e.match(xp);if(!t||!t[1])return e;const n=t[1],s=e.split(/\n/g);if(s.length<=2||s[0].trim()!==""||s[s.length-1].trim()!=="")return e;for(let r=1;r<s.length-1;r++)if(s[r]!==""){if(s[r].indexOf(n)!==0)return e;s[r]=s[r].substring(n.length)}return s[s.length-1]="",e=s.join(`
|
|
504
|
-
`),e}async function Op(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot)}))}class Cr{constructor(t,n,s,r){this.testFilePath=t,this.snapshotPath=n;const{data:o,dirty:i}=Sh(s,r);this._fileExists=s!=null,this._initialData=o,this._snapshotData=o,this._dirty=i,this._inlineSnapshots=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this._counters=new Map,this.expand=r.expand||!1,this.added=0,this.matched=0,this.unmatched=0,this._updateSnapshot=r.updateSnapshot,this.updated=0,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,...r.snapshotFormat},this._environment=r.snapshotEnvironment}_counters;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;added;expand;matched;unmatched;updated;static async create(t,n){const s=await n.snapshotEnvironment.resolvePath(t),r=await n.snapshotEnvironment.readSnapshotFile(s);return new Cr(t,s,r,n)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{Eh(n)===t&&this._uncheckedKeys.delete(n)})}_inferInlineSnapshotStack(t){const n=t.findIndex(r=>r.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];const s=t.findIndex(r=>r.method.includes("__INLINE_SNAPSHOT__"));return s!==-1?t[s+2]:null}_addSnapshot(t,n,s){if(this._dirty=!0,s.isInline){const r=gp(s.error||new Error("snapshot"),{ignoreStackEntries:[]}),o=this._inferInlineSnapshotStack(r);if(!o)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
505
|
-
${JSON.stringify(r)}`);o.column--,this._inlineSnapshots.push({snapshot:n,...o})}else s.rawSnapshot?this._rawSnapshots.push({...s.rawSnapshot,snapshot:n}):this._snapshotData[t]=n}clear(){this._snapshotData=this._initialData,this._counters=new Map,this.added=0,this.matched=0,this.unmatched=0,this.updated=0,this._dirty=!1}async save(){const t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,s=this._rawSnapshots.length,r=!t&&!n&&!s,o={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!r?(t&&(await Ph(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await bp(this._environment,this._inlineSnapshots),s&&await Op(this._environment,this._rawSnapshots),o.saved=!0):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),o.deleted=!0),o}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=!0,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear())}match({testName:t,received:n,key:s,inlineSnapshot:r,isInline:o,error:i,rawSnapshot:a}){this._counters.set(t,(this._counters.get(t)||0)+1);const c=Number(this._counters.get(t));s||(s=vh(t,c)),o&&this._snapshotData[s]!==void 0||this._uncheckedKeys.delete(s);let l=a&&typeof n=="string"?n:Ah(n,void 0,this._snapshotFormat);a||(l=Th(l)),a&&a.content&&a.content.match(/\r\n/)&&!l.match(/\r\n/)&&(a.content=$r(a.content));const h=o?r:a?a.content:this._snapshotData[s],u=as(h),f=u===as(l),b=h!==void 0,w=o||this._fileExists||a&&a.content!=null;return f&&!o&&!a&&(this._snapshotData[s]=l),b&&this._updateSnapshot==="all"||(!b||!w)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?f?this.matched++:(b?this.updated++:this.added++,this._addSnapshot(s,l,{error:i,isInline:o,rawSnapshot:a})):(this._addSnapshot(s,l,{error:i,isInline:o,rawSnapshot:a}),this.added++),{actual:"",count:c,expected:"",key:s,pass:!0}):f?(this.matched++,{actual:"",count:c,expected:"",key:s,pass:!0}):(this.unmatched++,{actual:ss(l),count:c,expected:u!==void 0?ss(u):void 0,key:s,pass:!1})}async pack(){const t={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),s=this.getUncheckedKeys();n&&this.removeUncheckedKeys();const r=await this.save();return t.fileDeleted=r.deleted,t.added=this.added,t.matched=this.matched,t.unmatched=this.unmatched,t.updated=this.updated,t.unchecked=r.deleted?0:n,t.uncheckedKeys=Array.from(s),t}}function gs(e,t,n,s){const r=new Error(e);return Object.defineProperty(r,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,"expected",{value:s,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,"diffOptions",{value:{expand:t}}),r}class Ap{constructor(t={}){this.options=t}filepath;name;snapshotState;snapshotStateMap=new Map;async startCurrentRun(t,n,s){var r;this.filepath=t,this.name=n,((r=this.snapshotState)==null?void 0:r.testFilePath)!==t&&(await this.finishCurrentRun(),this.getSnapshotState(t)||this.snapshotStateMap.set(t,await Cr.create(t,s)),this.snapshotState=this.getSnapshotState(t))}getSnapshotState(t){return this.snapshotStateMap.get(t)}clearTest(){this.filepath=void 0,this.name=void 0}skipTestSnapshots(t){var n;(n=this.snapshotState)==null||n.markSnapshotsAsCheckedForTest(t)}assert(t){var n,s,r,o;const{filepath:i=this.filepath,name:a=this.name,message:c,isInline:l=!1,properties:h,inlineSnapshot:u,error:f,errorMessage:b,rawSnapshot:w}=t;let{received:E}=t;if(!i)throw new Error("Snapshot cannot be used outside of test");if(typeof h=="object"){if(typeof E!="object"||!E)throw new Error("Received value must be an object when the matcher has properties");try{if(((s=(n=this.options).isEqual)==null?void 0:s.call(n,E,h))??!1)E=_r(E,h);else throw gs("Snapshot properties mismatched",(r=this.snapshotState)==null?void 0:r.expand,E,h)}catch(U){throw U.message=b||"Snapshot mismatched",U}}const g=[a,...c?[c]:[]].join(" > "),M=this.getSnapshotState(i),{actual:P,expected:F,key:I,pass:k}=M.match({testName:g,received:E,isInline:l,error:f,inlineSnapshot:u,rawSnapshot:w});if(!k)throw gs(`Snapshot \`${I||"unknown"}\` mismatched`,(o=this.snapshotState)==null?void 0:o.expand,P?.trim(),F?.trim())}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:n=this.filepath,rawSnapshot:s}=t;if(s.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");const r=this.getSnapshotState(n);t.filepath||(t.filepath=n),s.file=await r.environment.resolveRawPath(n,s.file),s.content=await r.environment.readSnapshotFile(s.file)||void 0}return this.assert(t)}async finishCurrentRun(){if(!this.snapshotState)return null;const t=await this.snapshotState.pack();return this.snapshotState=void 0,t}clear(){this.snapshotStateMap.clear()}}function Mp(e,t=" > "){return yi(e).join(t)}function aa(){return typeof process<"u"&&!!process.send}const Re=Date;let fr=null;class tt extends Re{constructor(t,n,s,r,o,i,a){super();let c;switch(arguments.length){case 0:fr!==null?c=new Re(fr.valueOf()):c=new Re;break;case 1:c=new Re(t);break;default:s=typeof s>"u"?1:s,r=r||0,o=o||0,i=i||0,a=a||0,c=new Re(t,n,s,r,o,i,a);break}return Object.setPrototypeOf(c,tt.prototype),c}}tt.UTC=Re.UTC;tt.now=function(){return new tt().valueOf()};tt.parse=function(e){return Re.parse(e)};tt.toString=function(){return Re.toString()};function Pp(e){const t=new Re(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=tt,fr=t.valueOf()}function $p(){globalThis.Date=Re}function _p(e,t=!1){const n=[/\/vitest\/dist\//,/\/vite-node\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.forEach((s,r)=>{n.some(o=>o.test(r))||e.invalidateModule(s)})}function Cp(){const{setTimeout:e}=bn();return new Promise(t=>e(t,0))}async function ca(){await Cp();const e=Sr(),t=[];let n=0;for(const s of e.moduleCache.values())s.promise&&!s.evaluated&&t.push(s.promise),s.resolving&&n++;!t.length&&!n||(await Promise.allSettled(t),await ca())}function Np(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ua={exports:{}};(function(e,t){(function(){(function(n){return typeof Np=="function"?e.exports=n:chai.use(n)})(function(n,s){var r=n.Assertion,o=r.prototype;r.addMethod("containSubset",function(a){var c=s.flag(this,"object"),l=n.config.showDiff;o.assert.call(this,i(a,c),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",a,c,l)}),n.assert.containSubset=function(a,c,l){new n.Assertion(a,l).to.be.containSubset(c)};function i(a,c){if(a===c)return!0;if(typeof c!=typeof a)return!1;if(typeof a!="object"||a===null)return a===c;if(a&&!c)return!1;if(Array.isArray(a)){if(typeof c.length!="number")return!1;var l=Array.prototype.slice.call(c);return a.every(function(h){return l.some(function(u){return i(h,u)})})}return a instanceof Date?c instanceof Date?a.getTime()===c.getTime():!1:Object.keys(a).every(function(h){var u=a[h],f=c[h];return typeof u=="object"&&u!==null&&f!==null?i(u,f):typeof u=="function"?u(f):f===u})}})}).call(Ut)})(ua);var Ip=ua.exports,kp=_f(Ip);const bs=Symbol.for("matchers-object"),jp=Symbol.for("$$jest-matchers-object"),Fp=Symbol.for("expect-global"),Rp=Symbol.for("asymmetric-matchers-object");if(!Object.prototype.hasOwnProperty.call(globalThis,bs)){const e=new WeakMap,t=Object.create(null),n=[],s=Object.create(null);Object.defineProperty(globalThis,bs,{get:()=>e}),Object.defineProperty(globalThis,jp,{configurable:!0,get:()=>({state:e.get(globalThis[Fp]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,Rp,{get:()=>s})}function Dp(e,t){return e&&t instanceof Promise&&(t=t.finally(()=>{const n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1)}),e.promises||(e.promises=[]),e.promises.push(t)),t}let Xn;function It(){return Xn||(Xn=new Ap({isEqual:(e,t)=>fe(e,t,[Ce,Ht])})),Xn}function ws(e,t){if(typeof e!="function"){if(!t)throw new Error(`expected must be a function, received ${typeof e}`);return e}try{e()}catch(n){return n}throw new Error("snapshot function didn't throw")}const Bp=(e,t)=>{const n=s=>{var r;return s?{filepath:(r=s.file)==null?void 0:r.filepath,name:yi(s).slice(1).join(" > ")}:{}};for(const s of["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,s,function(r,o){if(t.flag(this,"negate"))throw new Error(`${s} cannot be used with "not"`);const a=t.flag(this,"object"),c=t.flag(this,"vitest-test");typeof r=="string"&&typeof o>"u"&&(o=r,r=void 0);const l=t.flag(this,"message");It().assert({received:a,message:o,isInline:!1,properties:r,errorMessage:l,...n(c)})});t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(s,r){if(t.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');const i=t.flag(this,"object"),a=t.flag(this,"vitest-test"),c=t.flag(this,"message"),l=It().assertRaw({received:i,message:r,isInline:!1,rawSnapshot:{file:s},errorMessage:c,...n(a)});return Dp(a,l)}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",function(r,o,i){var a;if(t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');const l=t.flag(this,"vitest-test");if(l&&(l.each||((a=l.suite)==null?void 0:a.each)))throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");const u=t.flag(this,"object"),f=t.flag(this,"error");typeof r=="string"&&(i=o,o=r,r=void 0),o&&(o=ys(o));const b=t.flag(this,"message");It().assert({received:u,message:i,isInline:!0,properties:r,inlineSnapshot:o,error:f,errorMessage:b,...n(l)})}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",function(s){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');const o=t.flag(this,"object"),i=t.flag(this,"vitest-test"),a=t.flag(this,"promise"),c=t.flag(this,"message");It().assert({received:ws(o,a),message:s,errorMessage:c,...n(i)})}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",function(r,o){var i;if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');const c=t.flag(this,"vitest-test");if(c&&(c.each||((i=c.suite)==null?void 0:i.each)))throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");const h=t.flag(this,"object"),u=t.flag(this,"error"),f=t.flag(this,"promise"),b=t.flag(this,"message");r&&(r=ys(r)),It().assert({received:ws(h,f),message:o,inlineSnapshot:r,isInline:!0,error:u,errorMessage:b,...n(c)})}),t.addMethod(e.expect,"addSnapshotSerializer",bh)};Gt(eh);Gt(Xf);Gt(kp);Gt(Bp);Gt(Hf);function qp(e){var t;const n=(i,a)=>{const{assertionCalls:c}=vt(n);Hn({assertionCalls:c+1,soft:!1},n);const l=Jn(i,a),h=e||hl();return h?l.withTest(h):l};Object.assign(n,Jn),Object.assign(n,globalThis[Ar]),n.getState=()=>vt(n),n.setState=i=>Hn(i,n);const s=vt(globalThis[Jt])||{};Hn({...s,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,environment:Tl(),testPath:e?(t=e.suite.file)==null?void 0:t.filepath:s.testPath,currentTestName:e?Mp(e):s.currentTestName},n),n.extend=i=>Jn.extend(n,i),n.addEqualityTesters=i=>Bf(i),n.soft=(...i)=>{const a=n(...i);return n.setState({soft:!0}),a},n.unreachable=i=>{$f.fail(`expected${i?` "${i}" `:" "}not to be reached`)};function r(i){const a=()=>new Error(`expected number of assertions to be ${i}, but got ${n.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(a(),r),n.setState({expectedAssertionsNumber:i,expectedAssertionsNumberErrorGen:a})}function o(){const i=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(i,o),n.setState({isExpectingAssertions:!0,isExpectingAssertionsError:i})}return hn.addMethod(n,"assertions",r),hn.addMethod(n,"hasAssertions",o),n}const la=qp();Object.defineProperty(globalThis,Jt,{value:la,writable:!0,configurable:!0});var cn;typeof Ut<"u"?cn=Ut:typeof window<"u"?cn=window:cn=self;var Lp=cn;let hr;try{({}).__proto__,hr=!1}catch{hr=!0}var zp=hr,Wp=Function.call,Vp=zp,fa=["size","caller","callee","arguments"];Vp&&fa.push("__proto__");var Mt=function(t){return Object.getOwnPropertyNames(t).reduce(function(n,s){return fa.includes(s)||typeof t[s]!="function"||(n[s]=Wp.bind(t[s])),n},Object.create(null))},Up=Mt,On=Up(Array.prototype),Kp=On.every;function Gp(e,t){return e[t.id]===void 0&&(e[t.id]=0),e[t.id]<t.callCount}function Yp(e,t,n,s){var r=!0;return n!==s.length-1&&(r=t.calledBefore(s[n+1])),Gp(e,t)&&r?(e[t.id]+=1,!0):!1}function Jp(e){var t={},n=arguments.length>1?arguments:e;return Kp(n,Yp.bind(null,t))}var Hp=Jp,ha=function(t){if(!t)return"";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return""}},Xp=ha;function Qp(e){return e.constructor&&e.constructor.name||typeof e.constructor=="function"&&Xp(e.constructor)||null}var Zp=Qp,pa={};(function(e){e.wrap=function(t,n){var s=function(){return e.printWarning(n),t.apply(this,arguments)};return t.prototype&&(s.prototype=t.prototype),s},e.defaultMsg=function(t,n){return`${t}.${n} is deprecated and will be removed from the public API in a future version of ${t}.`},e.printWarning=function(t){typeof process=="object"&&process.emitWarning?process.emitWarning(t):console.info?console.info(t):console.log(t)}})(pa);var ed=function(t,n){var s=!0;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch{s=!1}return s},td=On.sort,nd=On.slice;function rd(e,t){var n=e.getCall(0),s=t.getCall(0),r=n&&n.callId||-1,o=s&&s.callId||-1;return r<o?-1:1}function od(e){return td(nd(e),rd)}var sd=od,id=Mt,ad=id(Function.prototype),cd=Mt,ud=cd(Map.prototype),ld=Mt,fd=ld(Object.prototype),hd=Mt,pd=hd(Set.prototype),dd=Mt,md=dd(String.prototype),yd={array:On,function:ad,map:ud,object:fd,set:pd,string:md},da={exports:{}};(function(e,t){(function(n,s){e.exports=s()})(Ut,function(){var n=typeof Promise=="function",s=typeof self=="object"?self:Ut,r=typeof Symbol<"u",o=typeof Map<"u",i=typeof Set<"u",a=typeof WeakMap<"u",c=typeof WeakSet<"u",l=typeof DataView<"u",h=r&&typeof Symbol.iterator<"u",u=r&&typeof Symbol.toStringTag<"u",f=i&&typeof Set.prototype.entries=="function",b=o&&typeof Map.prototype.entries=="function",w=f&&Object.getPrototypeOf(new Set().entries()),E=b&&Object.getPrototypeOf(new Map().entries()),g=h&&typeof Array.prototype[Symbol.iterator]=="function",M=g&&Object.getPrototypeOf([][Symbol.iterator]()),P=h&&typeof String.prototype[Symbol.iterator]=="function",F=P&&Object.getPrototypeOf(""[Symbol.iterator]()),I=8,k=-1;function U(B){var G=typeof B;if(G!=="object")return G;if(B===null)return"null";if(B===s)return"global";if(Array.isArray(B)&&(u===!1||!(Symbol.toStringTag in B)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&B===window.location)return"Location";if(typeof window.document=="object"&&B===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&B===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&B===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&B instanceof window.HTMLElement){if(B.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(B.tagName==="TD")return"HTMLTableDataCellElement";if(B.tagName==="TH")return"HTMLTableHeaderCellElement"}}var se=u&&B[Symbol.toStringTag];if(typeof se=="string")return se;var V=Object.getPrototypeOf(B);return V===RegExp.prototype?"RegExp":V===Date.prototype?"Date":n&&V===Promise.prototype?"Promise":i&&V===Set.prototype?"Set":o&&V===Map.prototype?"Map":c&&V===WeakSet.prototype?"WeakSet":a&&V===WeakMap.prototype?"WeakMap":l&&V===DataView.prototype?"DataView":o&&V===E?"Map Iterator":i&&V===w?"Set Iterator":g&&V===M?"Array Iterator":P&&V===F?"String Iterator":V===null?"Object":Object.prototype.toString.call(B).slice(I,k)}return U})})(da);var gd=da.exports,bd=gd,wd=function(t){return bd(t).toLowerCase()};function vd(e){return e&&e.toString?e.toString():String(e)}var Ed=vd,Sd={global:Lp,calledInOrder:Hp,className:Zp,deprecated:pa,every:ed,functionName:ha,orderByFirstCall:sd,prototypes:yd,typeOf:wd,valueToString:Ed};const ma=Sd.global;let yt;if(typeof __vitest_required__<"u")try{yt=__vitest_required__.timers}catch{}function Nr(e){const t=Math.pow(2,31)-1,n=1e12,s=function(){},r=function(){return[]},o=e.setTimeout(s,0),i=typeof o=="object",a=e.process&&typeof e.process.hrtime=="function",c=a&&typeof e.process.hrtime.bigint=="function",l=e.process&&typeof e.process.nextTick=="function",h=e.process&&e.__vitest_required__&&e.__vitest_required__.util.promisify,u=e.performance&&typeof e.performance.now=="function",f=e.Performance&&(typeof e.Performance).match(/^(function|object)$/),b=e.performance&&e.performance.constructor&&e.performance.constructor.prototype,w=e.hasOwnProperty("queueMicrotask"),E=e.requestAnimationFrame&&typeof e.requestAnimationFrame=="function",g=e.cancelAnimationFrame&&typeof e.cancelAnimationFrame=="function",M=e.requestIdleCallback&&typeof e.requestIdleCallback=="function",P=e.cancelIdleCallback&&typeof e.cancelIdleCallback=="function",F=e.setImmediate&&typeof e.setImmediate=="function",I=e.Intl&&typeof e.Intl=="object";e.clearTimeout(o);const k=e.Date,U=e.Intl;let B=n;function G(v){return Number.isFinite?Number.isFinite(v):isFinite(v)}let se=!1;function V(v,S){v.loopLimit&&S===v.loopLimit-1&&(se=!0)}function Ee(){se=!1}function be(v){if(!v)return 0;const S=v.split(":"),C=S.length;let j=C,m=0,X;if(C>3||!/^(\d\d:){0,2}\d\d?$/.test(v))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;j--;){if(X=parseInt(S[j],10),X>=60)throw new Error(`Invalid time ${v}`);m+=X*Math.pow(60,C-j-1)}return m*1e3}function Se(v){const C=v*1e6%1e6,j=C<0?C+1e6:C;return Math.floor(j)}function xe(v){if(!v)return 0;if(typeof v.getTime=="function")return v.getTime();if(typeof v=="number")return v;throw new TypeError("now should be milliseconds since UNIX epoch")}function $e(v,S,C){return C&&C.callAt>=v&&C.callAt<=S}function Oe(v,S){const C=new Error(`Aborting after running ${v.loopLimit} timers, assuming an infinite loop!`);if(!S.error)return C;const j=/target\.*[<|(|[].*?[>|\]|)]\s*/;let m=new RegExp(String(Object.keys(v).join("|")));i&&(m=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(v).join("|")})\\s+`));let X=-1;S.error.stack.split(`
|
|
506
|
-
`).some(function(ye,_e){return ye.match(j)?(X=_e,!0):ye.match(m)?(X=_e,!1):X>=0});const me=`${C}
|
|
507
|
-
${S.type||"Microtask"} - ${S.func.name||"anonymous"}
|
|
508
|
-
${S.error.stack.split(`
|
|
509
|
-
`).slice(X+1).join(`
|
|
510
|
-
`)}`;try{Object.defineProperty(C,"stack",{value:me})}catch{}return C}function Pe(v,S){let C;for(C in S)S.hasOwnProperty(C)&&(v[C]=S[C]);return S.now?v.now=function(){return v.clock.now}:delete v.now,S.toSource?v.toSource=function(){return S.toSource()}:delete v.toSource,v.toString=function(){return S.toString()},v.prototype=S.prototype,v.parse=S.parse,v.UTC=S.UTC,v.prototype.toUTCString=S.prototype.toUTCString,v.isFake=!0,v}function Ne(){function v(S,C,j,m,X,me,ye){if(!(this instanceof v))return new k(v.clock.now).toString();switch(arguments.length){case 0:return new k(v.clock.now);case 1:return new k(S);case 2:return new k(S,C);case 3:return new k(S,C,j);case 4:return new k(S,C,j,m);case 5:return new k(S,C,j,m,X);case 6:return new k(S,C,j,m,X,me);default:return new k(S,C,j,m,X,me,ye)}}return Pe(v,k)}function p(){const v={...U};return v.DateTimeFormat=function(...S){const C=new U.DateTimeFormat(...S),j={};return["formatRange","formatRangeToParts","resolvedOptions"].forEach(m=>{j[m]=C[m].bind(C)}),["format","formatToParts"].forEach(m=>{j[m]=function(X){return C[m](X||v.clock.now)}}),j},v.DateTimeFormat.prototype=Object.create(U.DateTimeFormat.prototype),v.DateTimeFormat.supportedLocalesOf=U.DateTimeFormat.supportedLocalesOf,v}function T(v,S){v.jobs||(v.jobs=[]),v.jobs.push(S)}function x(v){if(v.jobs){for(let S=0;S<v.jobs.length;S++){const C=v.jobs[S];if(C.func.apply(null,C.args),V(v,S),v.loopLimit&&S>v.loopLimit)throw Oe(v,C)}Ee(),v.jobs=[]}}function $(v,S){if(S.func===void 0)throw new Error("Callback must be provided to timer calls");if(i&&typeof S.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${S.func} of type ${typeof S.func}`);if(se&&(S.error=new Error),S.type=S.immediate?"Immediate":"Timeout",S.hasOwnProperty("delay")&&(typeof S.delay!="number"&&(S.delay=parseInt(S.delay,10)),G(S.delay)||(S.delay=0),S.delay=S.delay>t?1:S.delay,S.delay=Math.max(0,S.delay)),S.hasOwnProperty("interval")&&(S.type="Interval",S.interval=S.interval>t?1:S.interval),S.hasOwnProperty("animation")&&(S.type="AnimationFrame",S.animation=!0),S.hasOwnProperty("idleCallback")&&(S.type="IdleCallback",S.idleCallback=!0),v.timers||(v.timers={}),S.id=B++,S.createdAt=v.now,S.callAt=v.now+(parseInt(S.delay)||(v.duringTick?1:0)),v.timers[S.id]=S,i){const C={refed:!0,ref:function(){return this.refed=!0,C},unref:function(){return this.refed=!1,C},hasRef:function(){return this.refed},refresh:function(){return S.callAt=v.now+(parseInt(S.delay)||(v.duringTick?1:0)),v.timers[S.id]=S,C},[Symbol.toPrimitive]:function(){return S.id}};return C}return S.id}function N(v,S){if(v.callAt<S.callAt)return-1;if(v.callAt>S.callAt)return 1;if(v.immediate&&!S.immediate)return-1;if(!v.immediate&&S.immediate)return 1;if(v.createdAt<S.createdAt)return-1;if(v.createdAt>S.createdAt)return 1;if(v.id<S.id)return-1;if(v.id>S.id)return 1}function R(v,S,C){const j=v.timers;let m=null,X,me;for(X in j)j.hasOwnProperty(X)&&(me=$e(S,C,j[X]),me&&(!m||N(m,j[X])===1)&&(m=j[X]));return m}function _(v){const S=v.timers;let C=null,j;for(j in S)S.hasOwnProperty(j)&&(!C||N(C,S[j])===1)&&(C=S[j]);return C}function O(v){const S=v.timers;let C=null,j;for(j in S)S.hasOwnProperty(j)&&(!C||N(C,S[j])===-1)&&(C=S[j]);return C}function L(v,S){if(typeof S.interval=="number"?v.timers[S.id].callAt+=S.interval:delete v.timers[S.id],typeof S.func=="function")S.func.apply(null,S.args);else{const C=eval;(function(){C(S.func)})()}}function K(v){return v==="IdleCallback"||v==="AnimationFrame"?`cancel${v}`:`clear${v}`}function J(v){return v==="IdleCallback"||v==="AnimationFrame"?`request${v}`:`set${v}`}function ne(){let v=0;return function(S){!v++&&console.warn(S)}}const te=ne();function H(v,S,C){if(!S)return;v.timers||(v.timers={});const j=Number(S);if(Number.isNaN(j)||j<n){const m=K(C);if(v.shouldClearNativeTimers===!0){const X=v[`_${m}`];return typeof X=="function"?X(S):void 0}te(`FakeTimers: ${m} was invoked to clear a native timer instead of one created by this library.
|
|
511
|
-
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(v.timers.hasOwnProperty(j)){const m=v.timers[j];if(m.type===C||m.type==="Timeout"&&C==="Interval"||m.type==="Interval"&&C==="Timeout")delete v.timers[j];else{const X=K(C),me=J(m.type);throw new Error(`Cannot clear timer: timer created with ${me}() but cleared with ${X}()`)}}}function re(v,S){let C,j,m;const X="_hrtime",me="_nextTick";for(j=0,m=v.methods.length;j<m;j++){if(C=v.methods[j],C==="hrtime"&&e.process)e.process.hrtime=v[X];else if(C==="nextTick"&&e.process)e.process.nextTick=v[me];else if(C==="performance"){const ye=Object.getOwnPropertyDescriptor(v,`_${C}`);ye&&ye.get&&!ye.set?Object.defineProperty(e,C,ye):ye.configurable&&(e[C]=v[`_${C}`])}else if(e[C]&&e[C].hadOwnProperty)e[C]=v[`_${C}`];else try{delete e[C]}catch{}if(v.timersModuleMethods!==void 0)for(let ye=0;ye<v.timersModuleMethods.length;ye++){const _e=v.timersModuleMethods[ye];yt[_e.methodName]=_e.original}}return S.shouldAdvanceTime===!0&&e.clearInterval(v.attachedInterval),v.methods=[],v.timers?Object.keys(v.timers).map(function(_e){return v.timers[_e]}):[]}function D(v,S,C){if(C[S].hadOwnProperty=Object.prototype.hasOwnProperty.call(v,S),C[`_${S}`]=v[S],S==="Date"){const j=Pe(C[S],v[S]);v[S]=j}else if(S==="Intl")v[S]=C[S];else if(S==="performance"){const j=Object.getOwnPropertyDescriptor(v,S);if(j&&j.get&&!j.set){Object.defineProperty(C,`_${S}`,j);const m=Object.getOwnPropertyDescriptor(C,S);Object.defineProperty(v,S,m)}else v[S]=C[S]}else v[S]=function(){return C[S].apply(C,arguments)},Object.defineProperties(v[S],Object.getOwnPropertyDescriptors(C[S]));v[S].clock=C}function pe(v,S){v.tick(S)}const ue={setTimeout:e.setTimeout,clearTimeout:e.clearTimeout,setInterval:e.setInterval,clearInterval:e.clearInterval,Date:e.Date};F&&(ue.setImmediate=e.setImmediate,ue.clearImmediate=e.clearImmediate),a&&(ue.hrtime=e.process.hrtime),l&&(ue.nextTick=e.process.nextTick),u&&(ue.performance=e.performance),E&&(ue.requestAnimationFrame=e.requestAnimationFrame),w&&(ue.queueMicrotask=!0),g&&(ue.cancelAnimationFrame=e.cancelAnimationFrame),M&&(ue.requestIdleCallback=e.requestIdleCallback),P&&(ue.cancelIdleCallback=e.cancelIdleCallback),I&&(ue.Intl=e.Intl);const de=e.setImmediate||e.setTimeout;function Ie(v,S){v=Math.floor(xe(v)),S=S||1e3;let C=0;const j=[0,0];if(k===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");const m={now:v,Date:Ne(),loopLimit:S};m.Date.clock=m;function X(){return 16-(m.now-v)%16}function me(Y){const W=m.now-j[0]-v,Q=Math.floor(W/1e3),ee=(W-Q*1e3)*1e6+C-j[1];if(Array.isArray(Y)){if(Y[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");const he=Y[0];let we=ee-Y[1],Ue=Q-he;return we<0&&(we+=1e9,Ue-=1),[Ue,we]}return[Q,ee]}function ye(){const Y=me();return Y[0]*1e3+Y[1]/1e6}c&&(me.bigint=function(){const Y=me();return BigInt(Y[0])*BigInt(1e9)+BigInt(Y[1])}),I&&(m.Intl=p(),m.Intl.clock=m),m.requestIdleCallback=function(W,Q){let ee=0;m.countTimers()>0&&(ee=50);const he=$(m,{func:W,args:Array.prototype.slice.call(arguments,2),delay:typeof Q>"u"?ee:Math.min(Q,ee),idleCallback:!0});return Number(he)},m.cancelIdleCallback=function(W){return H(m,W,"IdleCallback")},m.setTimeout=function(W,Q){return $(m,{func:W,args:Array.prototype.slice.call(arguments,2),delay:Q})},typeof e.Promise<"u"&&h&&(m.setTimeout[h.custom]=function(W,Q){return new e.Promise(function(he){$(m,{func:he,args:[Q],delay:W})})}),m.clearTimeout=function(W){return H(m,W,"Timeout")},m.nextTick=function(W){return T(m,{func:W,args:Array.prototype.slice.call(arguments,1),error:se?new Error:null})},m.queueMicrotask=function(W){return m.nextTick(W)},m.setInterval=function(W,Q){return Q=parseInt(Q,10),$(m,{func:W,args:Array.prototype.slice.call(arguments,2),delay:Q,interval:Q})},m.clearInterval=function(W){return H(m,W,"Interval")},F&&(m.setImmediate=function(W){return $(m,{func:W,args:Array.prototype.slice.call(arguments,1),immediate:!0})},typeof e.Promise<"u"&&h&&(m.setImmediate[h.custom]=function(W){return new e.Promise(function(ee){$(m,{func:ee,args:[W],immediate:!0})})}),m.clearImmediate=function(W){return H(m,W,"Immediate")}),m.countTimers=function(){return Object.keys(m.timers||{}).length+(m.jobs||[]).length},m.requestAnimationFrame=function(W){const Q=$(m,{func:W,delay:X(),get args(){return[ye()]},animation:!0});return Number(Q)},m.cancelAnimationFrame=function(W){return H(m,W,"AnimationFrame")},m.runMicrotasks=function(){x(m)};function _e(Y,W,Q,ee){const he=typeof Y=="number"?Y:be(Y),we=Math.floor(he),Ue=Se(he);let ft=C+Ue,ke=m.now+we;if(he<0)throw new TypeError("Negative ticks are not supported");ft>=1e6&&(ke+=1,ft-=1e6),C=ft;let d=m.now,y=m.now,A,q,z,Z,oe,le;m.duringTick=!0,z=m.now,x(m),z!==m.now&&(d+=m.now-z,ke+=m.now-z);function Te(){for(A=R(m,d,ke);A&&d<=ke;){if(m.timers[A.id]){d=A.callAt,m.now=A.callAt,z=m.now;try{x(m),L(m,A)}catch(ge){q=q||ge}if(W){de(Z);return}oe()}le()}if(z=m.now,x(m),z!==m.now&&(d+=m.now-z,ke+=m.now-z),m.duringTick=!1,A=R(m,d,ke),A)try{m.tick(ke-m.now)}catch(ge){q=q||ge}else m.now=ke,C=ft;if(q)throw q;if(W)Q(m.now);else return m.now}return Z=W&&function(){try{oe(),le(),Te()}catch(ge){ee(ge)}},oe=function(){z!==m.now&&(d+=m.now-z,ke+=m.now-z,y+=m.now-z)},le=function(){A=R(m,y,ke),y=d},Te()}return m.tick=function(W){return _e(W,!1)},typeof e.Promise<"u"&&(m.tickAsync=function(W){return new e.Promise(function(Q,ee){de(function(){try{_e(W,!0,Q,ee)}catch(he){ee(he)}})})}),m.next=function(){x(m);const W=_(m);if(!W)return m.now;m.duringTick=!0;try{return m.now=W.callAt,L(m,W),x(m),m.now}finally{m.duringTick=!1}},typeof e.Promise<"u"&&(m.nextAsync=function(){return new e.Promise(function(W,Q){de(function(){try{const ee=_(m);if(!ee){W(m.now);return}let he;m.duringTick=!0,m.now=ee.callAt;try{L(m,ee)}catch(we){he=we}m.duringTick=!1,de(function(){he?Q(he):W(m.now)})}catch(ee){Q(ee)}})})}),m.runAll=function(){let W,Q;for(x(m),Q=0;Q<m.loopLimit;Q++){if(!m.timers||(W=Object.keys(m.timers).length,W===0))return Ee(),m.now;m.next(),V(m,Q)}const ee=_(m);throw Oe(m,ee)},m.runToFrame=function(){return m.tick(X())},typeof e.Promise<"u"&&(m.runAllAsync=function(){return new e.Promise(function(W,Q){let ee=0;function he(){de(function(){try{let we;if(ee<m.loopLimit){if(!m.timers){Ee(),W(m.now);return}if(we=Object.keys(m.timers).length,we===0){Ee(),W(m.now);return}m.next(),ee++,he(),V(m,ee);return}const Ue=_(m);Q(Oe(m,Ue))}catch(we){Q(we)}})}he()})}),m.runToLast=function(){const W=O(m);return W?m.tick(W.callAt-m.now):(x(m),m.now)},typeof e.Promise<"u"&&(m.runToLastAsync=function(){return new e.Promise(function(W,Q){de(function(){try{const ee=O(m);ee||W(m.now),W(m.tickAsync(ee.callAt-m.now))}catch(ee){Q(ee)}})})}),m.reset=function(){C=0,m.timers={},m.jobs=[],m.now=v},m.setSystemTime=function(W){const Q=xe(W),ee=Q-m.now;let he,we;j[0]=j[0]+ee,j[1]=j[1]+C,m.now=Q,C=0;for(he in m.timers)m.timers.hasOwnProperty(he)&&(we=m.timers[he],we.createdAt+=ee,we.callAt+=ee)},m.jump=function(W){const Q=typeof W=="number"?W:be(W),ee=Math.floor(Q);for(const he of Object.values(m.timers))m.now+ee>he.callAt&&(he.callAt=m.now+ee);m.tick(ee)},u&&(m.performance=Object.create(null),m.performance.now=ye),a&&(m.hrtime=me),m}function An(v){if(arguments.length>1||v instanceof Date||Array.isArray(v)||typeof v=="number")throw new TypeError(`FakeTimers.install called with ${String(v)} install requires an object parameter`);if(e.Date.isFake===!0)throw new TypeError("Can't install fake timers twice on the same global object.");if(v=typeof v<"u"?v:{},v.shouldAdvanceTime=v.shouldAdvanceTime||!1,v.advanceTimeDelta=v.advanceTimeDelta||20,v.shouldClearNativeTimers=v.shouldClearNativeTimers||!1,v.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");let S,C;const j=Ie(v.now,v.loopLimit);if(j.shouldClearNativeTimers=v.shouldClearNativeTimers,j.uninstall=function(){return re(j,v)},j.methods=v.toFake||[],j.methods.length===0&&(j.methods=Object.keys(ue).filter(function(m){return m!=="nextTick"&&m!=="queueMicrotask"})),v.shouldAdvanceTime===!0){const m=pe.bind(null,j,v.advanceTimeDelta),X=e.setInterval(m,v.advanceTimeDelta);j.attachedInterval=X}if(j.methods.includes("performance")){const m=(()=>{if(b)return e.performance.constructor.prototype;if(f)return e.Performance.prototype})();if(m)Object.getOwnPropertyNames(m).forEach(function(X){X!=="now"&&(j.performance[X]=X.indexOf("getEntries")===0?r:s)});else if((v.toFake||[]).includes("performance"))throw new ReferenceError("non-existent performance object cannot be faked")}for(e===ma&&yt&&(j.timersModuleMethods=[]),S=0,C=j.methods.length;S<C;S++){const m=j.methods[S];if(m==="hrtime"?e.process&&typeof e.process.hrtime=="function"&&D(e.process,m,j):m==="nextTick"?e.process&&typeof e.process.nextTick=="function"&&D(e.process,m,j):D(e,m,j),j.timersModuleMethods!==void 0&&yt[m]){const X=yt[m];j.timersModuleMethods.push({methodName:m,original:X}),yt[m]=e[m]}}return j}return{timers:ue,createClock:Ie,install:An,withGlobal:Nr}}const Ir=Nr(ma);Ir.timers;Ir.createClock;Ir.install;var Td=Nr;class xd{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Re.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=!1,this._fakingTime=!1,this._fakeTimers=Td(t),this._global=t}clearAllTimers(){this._fakingTime&&this._clock.reset()}dispose(){this.useRealTimers()}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll()}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync()}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast()}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync()}advanceTimersToNextTimer(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(this._clock.next(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}async advanceTimersToNextTimerAsync(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}advanceTimersByTime(t){this._checkFakeTimers()&&this._clock.tick(t)}async advanceTimersByTimeAsync(t){this._checkFakeTimers()&&await this._clock.tickAsync(t)}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks()}useRealTimers(){this._fakingDate&&($p(),this._fakingDate=!1),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=!1)}useFakeTimers(){var t,n,s;if(this._fakingDate)throw new Error('"setSystemTime" was called already and date was mocked. Reset timers using `vi.useRealTimers()` if you want to use fake timers again.');if(!this._fakingTime){const r=Object.keys(this._fakeTimers.timers).filter(i=>i!=="nextTick");if((n=(t=this._userConfig)==null?void 0:t.toFake)!=null&&n.includes("nextTick")&&aa())throw new Error("process.nextTick cannot be mocked inside child_process");const o=(((s=this._userConfig)==null?void 0:s.toFake)||r).filter(i=>{switch(i){case"setImmediate":case"clearImmediate":return i in this._global&&this._global[i];default:return!0}});this._clock=this._fakeTimers.install({now:Date.now(),...this._userConfig,toFake:o}),this._fakingTime=!0}}reset(){if(this._checkFakeTimers()){const{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t)}}setSystemTime(t){this._fakingTime?this._clock.setSystemTime(t):(Pp(t??this.getRealSystemTime()),this._fakingDate=!0)}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}configure(t){this._userConfig=t}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error('Timers are not mocked. Try calling "vi.useFakeTimers()" first.');return this._fakingTime}}function ya(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function Od(e,t={}){const{setTimeout:n,setInterval:s,clearTimeout:r,clearInterval:o}=bn(),{interval:i=50,timeout:a=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((l,h)=>{let u,f="idle",b,w;const E=P=>{b&&r(b),w&&o(w),l(P)},g=()=>{let P=u;P||(P=ya(new Error("Timed out in waitFor!"),c)),h(P)},M=()=>{if(mn.isFakeTimers()&&mn.advanceTimersByTime(i),f!=="pending")try{const P=e();if(P!==null&&typeof P=="object"&&typeof P.then=="function"){const F=P;f="pending",F.then(I=>{f="resolved",E(I)},I=>{f="rejected",u=I})}else return E(P),!0}catch(P){u=P}};M()!==!0&&(b=n(g,a),w=s(M,i))})}function Ad(e,t={}){const{setTimeout:n,setInterval:s,clearTimeout:r,clearInterval:o}=bn(),{interval:i=50,timeout:a=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((l,h)=>{let u="idle",f,b;const w=M=>{M||(M=ya(new Error("Timed out in waitUntil!"),c)),h(M)},E=M=>{if(M)return f&&r(f),b&&o(b),l(M),!0},g=()=>{if(mn.isFakeTimers()&&mn.advanceTimersByTime(i),u!=="pending")try{const M=e();if(M!==null&&typeof M=="object"&&typeof M.then=="function"){const P=M;u="pending",P.then(F=>{u="resolved",E(F)},F=>{u="rejected",w(F)})}else return E(M)}catch(M){w(M)}};g()!==!0&&(f=n(w,a),b=s(g,i))})}function Md(){const e=typeof __vitest_mocker__<"u"?__vitest_mocker__:new Proxy({},{get(l,h){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(h)}() is forbidden.`)}});let t=null,n=null;const s=Sr(),r=new xd({global:globalThis,config:s.config.fakeTimers}),o=new Map,i=new Map,a=()=>{const h=cu({stackTraceLimit:4}).split(`
|
|
512
|
-
`)[4],u=Hu(h);return u?.file||""},c={useFakeTimers(l){var h,u,f,b;if(aa()&&((h=l?.toFake)!=null&&h.includes("nextTick")||(b=(f=(u=s.config)==null?void 0:u.fakeTimers)==null?void 0:f.toFake)!=null&&b.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return l?r.configure({...s.config.fakeTimers,...l}):r.configure(s.config.fakeTimers),r.useFakeTimers(),c},isFakeTimers(){return r.isFakeTimers()},useRealTimers(){return r.useRealTimers(),t=null,c},runOnlyPendingTimers(){return r.runOnlyPendingTimers(),c},async runOnlyPendingTimersAsync(){return await r.runOnlyPendingTimersAsync(),c},runAllTimers(){return r.runAllTimers(),c},async runAllTimersAsync(){return await r.runAllTimersAsync(),c},runAllTicks(){return r.runAllTicks(),c},advanceTimersByTime(l){return r.advanceTimersByTime(l),c},async advanceTimersByTimeAsync(l){return await r.advanceTimersByTimeAsync(l),c},advanceTimersToNextTimer(){return r.advanceTimersToNextTimer(),c},async advanceTimersToNextTimerAsync(){return await r.advanceTimersToNextTimerAsync(),c},getTimerCount(){return r.getTimerCount()},setSystemTime(l){const h=l instanceof Date?l:new Date(l);return t=h,r.setSystemTime(h),c},getMockedSystemTime(){return t},getRealSystemTime(){return r.getRealSystemTime()},clearAllTimers(){return r.clearAllTimers(),c},spyOn:Ff,fn:Df,waitFor:Od,waitUntil:Ad,hoisted(l){return Le(l,'"vi.hoisted" factory',["function"]),l()},mock(l,h){const u=a();e.queueMock(l,u,h?()=>h(()=>e.importActual(l,u,e.getMockContext().callstack)):void 0,!0)},unmock(l){e.queueUnmock(l,a())},doMock(l,h){const u=a();e.queueMock(l,u,h?()=>h(()=>e.importActual(l,u,e.getMockContext().callstack)):void 0,!1)},doUnmock(l){e.queueUnmock(l,a())},async importActual(l){return e.importActual(l,a(),e.getMockContext().callstack)},async importMock(l){return e.importMock(l,a())},mocked(l,h={}){return l},isMockFunction(l){return qi(l)},clearAllMocks(){return sn.forEach(l=>l.mockClear()),c},resetAllMocks(){return sn.forEach(l=>l.mockReset()),c},restoreAllMocks(){return sn.forEach(l=>l.mockRestore()),c},stubGlobal(l,h){return o.has(l)||o.set(l,Object.getOwnPropertyDescriptor(globalThis,l)),Object.defineProperty(globalThis,l,{value:h,writable:!0,configurable:!0,enumerable:!0}),c},stubEnv(l,h){return i.has(l)||i.set(l,process.env[l]),process.env[l]=h,c},unstubAllGlobals(){return o.forEach((l,h)=>{l?Object.defineProperty(globalThis,h,l):Reflect.deleteProperty(globalThis,h)}),o.clear(),c},unstubAllEnvs(){return i.forEach((l,h)=>{l===void 0?delete process.env[h]:process.env[h]=l}),i.clear(),c},resetModules(){return _p(s.moduleCache),c},async dynamicImportSettled(){return ca()},setConfig(l){n||(n={...s.config}),Object.assign(s.config,l)},resetConfig(){n&&Object.assign(s.config,n)}};return c}const ga=Md(),mn=ga;exports.beforeEach=Sl;exports.describe=dl;exports.globalExpect=la;exports.require$$0=Zs;exports.test=pl;exports.vitest=ga;
|