@ncino/web-components 4.3.0-preview.3 → 4.3.0-preview.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/.pnpm/{@vitest_expect@3.2.3 → @vitest_expect@3.2.4}/node_modules/@vitest/expect/dist/index.js +10 -10
- package/dist/node_modules/.pnpm/{@vitest_runner@3.2.3 → @vitest_runner@3.2.4}/node_modules/@vitest/runner/dist/chunk-hooks.js +3 -3
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +27 -0
- package/dist/node_modules/.pnpm/@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/{@vitest_utils@3.2.3 → @vitest_utils@3.2.4}/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +1 -1
- package/dist/node_modules/.pnpm/{@vitest_utils@3.2.3 → @vitest_utils@3.2.4}/node_modules/@vitest/utils/dist/diff.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +2 -0
- package/dist/node_modules/.pnpm/{@vitest_utils@3.2.3 → @vitest_utils@3.2.4}/node_modules/@vitest/utils/dist/helpers.js +1 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js +1 -1
- package/dist/node_modules/.pnpm/loupe@3.1.4/node_modules/loupe/lib/html.js +2 -0
- package/dist/node_modules/.pnpm/loupe@3.1.4/node_modules/loupe/lib/index.js +1 -0
- package/dist/node_modules/.pnpm/{vitest@3.2.3_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.3_@vitest_ui@3._a591a0367320796449cdd25961131eb5 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e}/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +1 -1
- package/dist/node_modules/.pnpm/{vitest@3.2.3_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.3_@vitest_ui@3._a591a0367320796449cdd25961131eb5 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e}/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +1 -1
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.3/node_modules/@vitest/snapshot/dist/index.js +0 -27
- package/dist/node_modules/.pnpm/@vitest_spy@3.2.3/node_modules/@vitest/spy/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.3/node_modules/@vitest/utils/dist/error.js +0 -2
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.3/node_modules/@vitest/utils/dist/index.js +0 -1
- package/dist/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/html.js +0 -2
- package/dist/node_modules/.pnpm/loupe@3.1.3/node_modules/loupe/lib/index.js +0 -1
- /package/dist/node_modules/.pnpm/{@vitest_browser@3.2.3_msw@2.7.3_@types_node@24.0.1_typescript@5.8.3__playwright@1.52.0__43e5121a65d82cd327038d090e2dfb2c → @vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.3_typescript@5.8.3__playwright@1.52.0__92bd82dd7be5b309a69282d0a95f92e4}/node_modules/@vitest/browser/context.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_pretty-format@3.2.3 → @vitest_pretty-format@3.2.4}/node_modules/@vitest/pretty-format/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_utils@3.2.3 → @vitest_utils@3.2.4}/node_modules/@vitest/utils/dist/source-map.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/arguments.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/array.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/bigint.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/class.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/date.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/error.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/function.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/helpers.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/map.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/number.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/object.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/promise.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/regexp.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/set.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/string.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/symbol.js +0 -0
- /package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/typedarray.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.3_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.3_@vitest_ui@3._a591a0367320796449cdd25961131eb5 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.3_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.3_@vitest_ui@3._a591a0367320796449cdd25961131eb5 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e}/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Tt=Object.defineProperty;var Nt=(e,t,r)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var H=(e,t,r)=>Nt(e,typeof t!="symbol"?t+"":t,r);import{diff as S,printDiffOrStringify as Ot}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.js";import E from"../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js";import{isMockFunction as V}from"../../../../../@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.js";import{processError as jt}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js";import{use as Mt,util as R}from"../../../../../chai@5.2.0/node_modules/chai/chai.js";import{getType as ft,noop as Ct,isObject as q,assertTypes as T}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js";import{s as j}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js";const k=Symbol.for("matchers-object"),B=Symbol.for("$$jest-matchers-object"),ht=Symbol.for("expect-global"),pt=Symbol.for("asymmetric-matchers-object"),fe={toSatisfy(e,t,r){const{printReceived:c,printExpected:a,matcherHint:h}=this.utils,u=t(e);return{pass:u,message:()=>u?`${h(".not.toSatisfy","received","")}
|
|
2
2
|
|
|
3
3
|
Expected value to not satisfy:
|
|
4
4
|
${r||a(t)}
|
|
@@ -20,39 +20,39 @@ Expected value to be one of:
|
|
|
20
20
|
${h(t)}
|
|
21
21
|
|
|
22
22
|
Received:
|
|
23
|
-
${a(e)}`}}},D=E.green,J=E.red,
|
|
24
|
-
`:"",h=`${e} has value: ${r(t)}`;return a+h}function
|
|
23
|
+
${a(e)}`}}},D=E.green,J=E.red,_t=E.inverse,At=E.bold,O=E.dim;function It(e,t="received",r="expected",c={}){const{comment:a="",isDirectExpectCall:h=!1,isNot:u=!1,promise:d="",secondArgument:m="",expectedColor:n=D,receivedColor:o=J,secondArgumentColor:s=D}=c;let i="",l="expect";return!h&&t!==""&&(i+=O(`${l}(`)+o(t),l=")"),d!==""&&(i+=O(`${l}.`)+d,l=""),u&&(i+=`${O(`${l}.`)}not`,l=""),e.includes(".")?l+=e:(i+=O(`${l}.`)+e,l=""),r===""?l+="()":(i+=O(`${l}(`)+n(r),m&&(i+=O(", ")+s(m)),l=")"),a!==""&&(l+=` // ${a}`),l!==""&&(i+=O(l)),i}const St="·";function dt(e){return e.replace(/\s+$/gm,t=>St.repeat(t.length))}function Bt(e){return J(dt(j(e)))}function Pt(e){return D(dt(j(e)))}function mt(){return{EXPECTED_COLOR:D,RECEIVED_COLOR:J,INVERTED_COLOR:_t,BOLD_WEIGHT:At,DIM_COLOR:O,diff:S,matcherHint:It,printReceived:Bt,printExpected:Pt,printDiffOrStringify:Ot,printWithType:Rt}}function Rt(e,t,r){const c=ft(t),a=c!=="null"&&c!=="undefined"?`${e} has type: ${c}
|
|
24
|
+
`:"",h=`${e} has value: ${r(t)}`;return a+h}function he(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${ft(e)}"`);globalThis[B].customEqualityTesters.push(...e)}function G(){return globalThis[B].customEqualityTesters}function g(e,t,r,c){return r=r||[],A(e,t,[],[],r,c?gt:Dt)}function K(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&v("Function",e.asymmetricMatch)}function qt(e,t){const r=K(e),c=K(t);if(!(r&&c)){if(r)return e.asymmetricMatch(t);if(c)return t.asymmetricMatch(e)}}function A(e,t,r,c,a,h){let u=!0;const d=qt(e,t);if(d!==void 0)return d;const m={equals:g};for(let f=0;f<a.length;f++){const p=a[f].call(m,e,t,a);if(p!==void 0)return p}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 n=Object.prototype.toString.call(e);if(n!==Object.prototype.toString.call(t))return!1;switch(n){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 f=+e,p=+t;return f===p||Number.isNaN(f)&&Number.isNaN(p)}case"[object RegExp]":return e.source===t.source&&e.flags===t.flags;case"[object Temporal.Instant]":case"[object Temporal.ZonedDateTime]":case"[object Temporal.PlainDateTime]":case"[object Temporal.PlainDate]":case"[object Temporal.PlainTime]":case"[object Temporal.PlainYearMonth]":case"[object Temporal.PlainMonthDay]":return e.equals(t);case"[object Temporal.Duration]":return e.toString()===t.toString()}if(typeof e!="object"||typeof t!="object")return!1;if(Z(e)&&Z(t))return e.isEqualNode(t);let o=r.length;for(;o--;){if(r[o]===e)return c[o]===t;if(c[o]===t)return!1}if(r.push(e),c.push(t),n==="[object Array]"&&e.length!==t.length)return!1;if(e instanceof Error&&t instanceof Error)try{return kt(e,t,r,c,a,h)}finally{r.pop(),c.pop()}const s=X(e,h);let i,l=s.length;if(X(t,h).length!==l)return!1;for(;l--;)if(i=s[l],u=h(t,i)&&A(e[i],t[i],r,c,a,h),!u)return!1;return r.pop(),c.pop(),u}function kt(e,t,r,c,a,h){let u=Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&u&&(u=A(e.cause,t.cause,r,c,a,h)),e instanceof AggregateError&&t instanceof AggregateError&&u&&(u=A(e.errors,t.errors,r,c,a,h)),u&&(u=A({...e},{...t},r,c,a,h)),u}function X(e,t){const r=[];for(const c in e)t(e,c)&&r.push(c);return r.concat(Object.getOwnPropertySymbols(e).filter(c=>Object.getOwnPropertyDescriptor(e,c).enumerable))}function Dt(e,t){return gt(e,t)&&e[t]!==void 0}function gt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function v(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Z(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 yt="@@__IMMUTABLE_KEYED__@@",bt="@@__IMMUTABLE_SET__@@",Lt="@@__IMMUTABLE_LIST__@@",L="@@__IMMUTABLE_ORDERED__@@",Wt="@@__IMMUTABLE_RECORD__@@";function Ht(e){return!!(e&&e[yt]&&!e[L])}function Vt(e){return!!(e&&e[bt]&&!e[L])}function W(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Ft(e){return!!(e&&W(e)&&e[Lt])}function Yt(e){return!!(e&&W(e)&&e[yt]&&e[L])}function Ut(e){return!!(e&&W(e)&&e[bt]&&e[L])}function Jt(e){return!!(e&&W(e)&&e[Wt])}const $t=Symbol.iterator;function Q(e){return!!(e!=null&&e[$t])}function x(e,t,r=[],c=[],a=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Q(e)||!Q(t))return;if(e.constructor!==t.constructor)return!1;let h=c.length;for(;h--;)if(c[h]===e)return a[h]===t;c.push(e),a.push(t);const u=[...r.filter(n=>n!==x),d];function d(n,o){return x(n,o,[...r],[...c],[...a])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(v("Set",e)||Vt(e)){let n=!0;for(const o of e)if(!t.has(o)){let s=!1;for(const i of t)g(o,i,u)===!0&&(s=!0);if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}else if(v("Map",e)||Ht(e)){let n=!0;for(const o of e)if(!t.has(o[0])||!g(o[1],t.get(o[0]),u)){let s=!1;for(const i of t){const l=g(o[0],i[0],u);let f=!1;l===!0&&(f=g(o[1],i[1],u)),f===!0&&(s=!0)}if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}}const m=t[$t]();for(const n of e){const o=m.next();if(o.done||!g(n,o.value,u))return!1}if(!m.next().done)return!1;if(!Ft(e)&&!Yt(e)&&!Ut(e)&&!Jt(e)){const n=Object.entries(e),o=Object.entries(t);if(!g(n,o,u))return!1}return c.pop(),a.pop(),!0}function z(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.prototype.hasOwnProperty.call(e,t)||z(Object.getPrototypeOf(e),t)}function Gt(e){return q(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}function P(e,t,r=[]){const c=r.filter(h=>h!==P),a=(h=new WeakMap)=>(u,d)=>{if(Gt(d))return Object.keys(d).every(m=>{if(d[m]!=null&&typeof d[m]=="object"){if(h.has(d[m]))return g(u[m],d[m],c);h.set(d[m],!0)}const n=u!=null&&z(u,m)&&g(u[m],d[m],[...c,a(h)]);return h.delete(d[m]),n})};return a()(e,t)}function tt(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function et(e,t){let r=e,c=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{r=new DataView(e),c=new DataView(t)}catch{return}}if(r.byteLength!==c.byteLength)return!1;for(let a=0;a<r.byteLength;a++)if(r.getUint8(a)!==c.getUint8(a))return!1;return!0}function U(e,t,r=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const c=Object.keys(e),a=Object.keys(t),h=r.filter(u=>u!==U);return g(e,t,h,!0)&&g(c,a)}function zt(e,t="#{this}",r="#{exp}"){const c=`expected ${t} to be ${r} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${c}
|
|
25
25
|
|
|
26
26
|
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
27
27
|
|
|
28
28
|
Expected: ${t}
|
|
29
29
|
Received: serializes to the same string
|
|
30
|
-
`:c}function
|
|
31
|
-
`,m].join(""))}}),{then(u,d){return h=!0,t.then(u,d)},catch(u){return t.catch(u)},finally(u){return t.finally(u)},[Symbol.toStringTag]:"Promise"}}return t}function
|
|
32
|
-
(${f} matching ${f===1?"property":"properties"} omitted from actual)`;throw new r(y,{showDiff:!0,expected:n,actual:l})}}),a("toMatch",function(n){const o=this._obj;if(typeof o!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof o}`);return this.assert(typeof n=="string"?o.includes(n):o.match(n),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",n,o)}),a("toContain",function(n){const o=this._obj;if(typeof Node<"u"&&o instanceof Node){if(!(n instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof n}`);return this.assert(o.contains(n),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",n,o)}if(typeof DOMTokenList<"u"&&o instanceof DOMTokenList){N(n,"class name",["string"]);const i=t.flag(this,"negate")?o.value.replace(n,"").trim():`${o.value} ${n}`;return this.assert(o.contains(n),`expected "${o.value}" to contain "${n}"`,`expected "${o.value}" not to contain "${n}"`,i,o.value)}return typeof o=="string"&&typeof n=="string"?this.assert(o.includes(n),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",n,o):(o!=null&&typeof o!="string"&&t.flag(this,"object",Array.from(o)),this.contain(n))}),a("toContainEqual",function(n){const o=t.flag(this,"object"),s=Array.from(o).findIndex(i=>g(i,n,c));this.assert(s!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",n)}),a("toBeTruthy",function(){const n=t.flag(this,"object");this.assert(!!n,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,n)}),a("toBeFalsy",function(){const n=t.flag(this,"object");this.assert(!n,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,n)}),a("toBeGreaterThan",function(n){const o=this._obj;return N(o,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(o>n,`expected ${o} to be greater than ${n}`,`expected ${o} to be not greater than ${n}`,n,o,!1)}),a("toBeGreaterThanOrEqual",function(n){const o=this._obj;return N(o,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(o>=n,`expected ${o} to be greater than or equal to ${n}`,`expected ${o} to be not greater than or equal to ${n}`,n,o,!1)}),a("toBeLessThan",function(n){const o=this._obj;return N(o,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(o<n,`expected ${o} to be less than ${n}`,`expected ${o} to be not less than ${n}`,n,o,!1)}),a("toBeLessThanOrEqual",function(n){const o=this._obj;return N(o,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(o<=n,`expected ${o} to be less than or equal to ${n}`,`expected ${o} to be not less than or equal to ${n}`,n,o,!1)}),a("toBeNaN",function(){const n=t.flag(this,"object");this.assert(Number.isNaN(n),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,n)}),a("toBeUndefined",function(){const n=t.flag(this,"object");this.assert(n===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,n)}),a("toBeNull",function(){const n=t.flag(this,"object");this.assert(n===null,"expected #{this} to be null","expected #{this} not to be null",null,n)}),a("toBeDefined",function(){const n=t.flag(this,"object");this.assert(typeof n<"u","expected #{this} to be defined","expected #{this} to be undefined",n)}),a("toBeTypeOf",function(n){const o=typeof this._obj,s=n===o;return this.assert(s,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",n,o)}),a("toBeInstanceOf",function(n){return this.instanceOf(n)}),a("toHaveLength",function(n){return this.have.length(n)}),a("toHaveProperty",function(...n){Array.isArray(n[0])&&(n[0]=n[0].map($=>String($).replace(/([.[\]])/g,"\\$1")).join("."));const o=this._obj,[s,i]=n,l=()=>Object.prototype.hasOwnProperty.call(o,s)?{value:o[s],exists:!0}:t.getPathInfo(o,s),{value:f,exists:p}=l(),y=p&&(n.length===1||g(i,f,c)),b=n.length===1?"":` with value ${t.objDisplay(i)}`;return this.assert(y,`expected #{this} to have property "${s}"${b}`,`expected #{this} to not have property "${s}"${b}`,i,p?f:void 0)}),a("toBeCloseTo",function(n,o=2){const s=this._obj;let i=!1,l=0,f=0;return n===Number.POSITIVE_INFINITY&&s===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&s===Number.NEGATIVE_INFINITY?i=!0:(l=10**-o/2,f=Math.abs(s-n),i=f<l),this.assert(i,`expected #{this} to be close to #{exp}, received difference is ${f}, but expected ${l}`,`expected #{this} to not be close to #{exp}, received difference is ${f}, but expected ${l}`,n,s,!1)});function h(n){if(!V(n._obj))throw new TypeError(`${t.inspect(n._obj)} is not a spy or a call to a spy!`)}function u(n){return h(n),n._obj}a(["toHaveBeenCalledTimes","toBeCalledTimes"],function(n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length;return this.assert(i===n,`expected "${s}" to be called #{exp} times, but got ${i} times`,`expected "${s}" to not be called #{exp} times`,n,i,!1)}),a("toHaveBeenCalledOnce",function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length;return this.assert(s===1,`expected "${o}" to be called once, but got ${s} times`,`expected "${o}" to not be called once`,1,s,!1)}),a(["toHaveBeenCalled","toBeCalled"],function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length,i=s>0,l=t.flag(this,"negate");let f=t.getMessage(this,[i,`expected "${o}" to be called at least once`,`expected "${o}" to not be called at all, but actually been called ${s} times`,!0,i]);if(i&&l&&(f=Y(n,f)),i&&l||!i&&!l)throw new r(f)});function d(n,o){return n.length===o.length&&n.every((s,i)=>g(s,o[i],[...c,w]))}a(["toHaveBeenCalledWith","toBeCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.some(p=>d(p,n)),l=t.flag(this,"negate"),f=t.getMessage(this,[i,`expected "${s}" to be called with arguments: #{exp}`,`expected "${s}" to not be called with arguments: #{exp}`,n]);if(i&&l||!i&&!l)throw new r(Y(o,f,n))}),a("toHaveBeenCalledExactlyOnceWith",function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length,f=o.mock.calls.some(b=>d(b,n))&&i===1,p=t.flag(this,"negate"),y=t.getMessage(this,[f,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,n]);if(f&&p||!f&&!p)throw new r(Y(o,y,n))}),a(["toHaveBeenNthCalledWith","nthCalledWith"],function(n,...o){const s=u(this),i=s.getMockName(),l=s.mock.calls[n-1],f=s.mock.calls.length,p=n<=f;this.assert(l&&d(l,o),`expected ${I(n)} "${i}" call to have been called with #{exp}${p?"":`, but called only ${f} times`}`,`expected ${I(n)} "${i}" call to not have been called with #{exp}`,o,l,p)}),a(["toHaveBeenLastCalledWith","lastCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls[o.mock.calls.length-1];this.assert(i&&d(i,n),`expected last "${s}" call to have been called with #{exp}`,`expected last "${s}" call to not have been called with #{exp}`,n,i)});function m(n,o,s){const i=n.mock.invocationCallOrder,l=o.mock.invocationCallOrder;return i.length===0?!s:l.length===0?!1:i[0]<l[0]}a(["toHaveBeenCalledBefore"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(s,n,o),`expected "${s.getMockName()}" to have been called before "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called before "${n.getMockName()}"`,n,s)}),a(["toHaveBeenCalledAfter"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(n,s,o),`expected "${s.getMockName()}" to have been called after "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called after "${n.getMockName()}"`,n,s)}),a(["toThrow","toThrowError"],function(n){if(typeof n=="string"||typeof n>"u"||n instanceof RegExp)return this.throws(n===""?/^$/:n);const o=this._obj,s=t.flag(this,"promise"),i=t.flag(this,"negate");let l=null;if(s==="rejects")l=o;else if(s==="resolves"&&typeof o!="function"){if(i)return;{const f=t.flag(this,"message")||"expected promise to throw an error, but it didn't",p={showDiff:!1};throw new r(f,p,t.flag(this,"ssfi"))}}else{let f=!1;try{o()}catch(p){f=!0,l=p}if(!f&&!i){const p=t.flag(this,"message")||"expected function to throw an error, but it didn't",y={showDiff:!1};throw new r(p,y,t.flag(this,"ssfi"))}}if(typeof n=="function"){const f=n.name||n.prototype.constructor.name;return this.assert(l&&l instanceof n,`expected error to be instance of ${f}`,`expected error not to be instance of ${f}`,n,l)}if(n instanceof Error){const f=g(l,n,[...c,w]);return this.assert(f,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",n,l)}if(typeof n=="object"&&"asymmetricMatch"in n&&typeof n.asymmetricMatch=="function"){const f=n;return this.assert(l&&f.asymmetricMatch(l),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",f,l)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof n}"`)}),[{name:"toHaveResolved",condition:n=>n.mock.settledResults.length>0&&n.mock.settledResults.some(({type:o})=>o==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:n=>n.mock.calls.length>0&&n.mock.results.some(({type:o})=>o!=="throw"),action:"called"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(){const i=u(this),l=i.getMockName(),f=o(i);this.assert(f,`expected "${l}" to be successfully ${s} at least once`,`expected "${l}" to not be successfully ${s}`,f,!f,!1)})}),[{name:"toHaveResolvedTimes",condition:(n,o)=>n.mock.settledResults.reduce((s,{type:i})=>i==="fulfilled"?++s:s,0)===o,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(n,o)=>n.mock.results.reduce((s,{type:i})=>i==="throw"?s:++s,0)===o,action:"called"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=l.getMockName(),p=o(l,i);this.assert(p,`expected "${f}" to be successfully ${s} ${i} times`,`expected "${f}" to not be successfully ${s} ${i} times`,`expected resolved times: ${i}`,`received resolved times: ${p}`,!1)})}),[{name:"toHaveResolvedWith",condition:(n,o)=>n.mock.settledResults.some(({type:s,value:i})=>s==="fulfilled"&&g(o,i)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(n,o)=>n.mock.results.some(({type:s,value:i})=>s==="return"&&g(o,i)),action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=o(l,i),p=t.flag(this,"negate");if(f&&p||!f&&!p){const y=l.getMockName(),b=t.getMessage(this,[f,`expected "${y}" to ${s} with: #{exp} at least once`,`expected "${y}" to not ${s} with: #{exp}`,i]),$=s==="return"?l.mock.results:l.mock.settledResults;throw new r(Xt(l,$,b,i))}})}),[{name:"toHaveLastResolvedWith",condition:(n,o)=>{const s=n.mock.settledResults[n.mock.settledResults.length-1];return s&&s.type==="fulfilled"&&g(s.value,o)},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(n,o)=>{const s=n.mock.results[n.mock.results.length-1];return s&&s.type==="return"&&g(s.value,o)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=s==="return"?l.mock.results:l.mock.settledResults,p=f[f.length-1],y=l.getMockName();this.assert(o(l,i),`expected last "${y}" call to ${s} #{exp}`,`expected last "${y}" call to not ${s} #{exp}`,i,p==null?void 0:p.value)})}),[{name:"toHaveNthResolvedWith",condition:(n,o,s)=>{const i=n.mock.settledResults[o-1];return i&&i.type==="fulfilled"&&g(i.value,s)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(n,o,s)=>{const i=n.mock.results[o-1];return i&&i.type==="return"&&g(i.value,s)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i,l){const f=u(this),p=f.getMockName(),b=(s==="return"?f.mock.results:f.mock.settledResults)[i-1],$=`${I(i)} call`;this.assert(o(f,i,l),`expected ${$} "${p}" call to ${s} #{exp}`,`expected ${$} "${p}" call to not ${s} #{exp}`,l,b==null?void 0:b.value)})}),a("withContext",function(n){for(const o in n)t.flag(this,o,n[o]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const o=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof(i==null?void 0:i.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof i}'.`);const l=new Proxy(this,{get:(f,p,y)=>{const b=Reflect.get(f,p,y);return typeof b!="function"?b instanceof e.Assertion?l:b:(...$)=>{t.flag(this,"_name",p);const C=i.then(T=>(t.flag(this,"object",T),b.call(this,...$)),T=>{const x=new r(`promise rejected "${t.inspect(T)}" instead of resolving`,{showDiff:!1});throw x.cause=T,x.stack=o.stack.replace(o.message,x.message),x});return ct(s,C,at(t,this,!!$.length),o)}}});return l}),t.addProperty(e.Assertion.prototype,"rejects",function(){const o=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object"),l=typeof i=="function"?i():i;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof(l==null?void 0:l.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof l}'.`);const f=new Proxy(this,{get:(p,y,b)=>{const $=Reflect.get(p,y,b);return typeof $!="function"?$ instanceof e.Assertion?f:$:(...C)=>{t.flag(this,"_name",y);const T=l.then(x=>{const _=new r(`promise resolved "${t.inspect(x)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:x});throw _.stack=o.stack.replace(o.message,_.message),_},x=>(t.flag(this,"object",x),$.call(this,...C)));return ct(s,T,at(t,this,!!C.length),o)}}});return f})};function I(e){const t=e%10,r=e%100;return t===1&&r!==11?`${e}st`:t===2&&r!==12?`${e}nd`:t===3&&r!==13?`${e}rd`:`${e}th`}function Y(e,t,r){return e.mock.calls.length&&(t+=E.gray(`
|
|
30
|
+
`:c}function Kt(e,t){return`${t} ${e}${t===1?"":"s"}`}function F(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var r;return(r=Object.getOwnPropertyDescriptor(e,t))===null||r===void 0?void 0:r.enumerable})]}function Xt(e,t,r){let c=0;const a=(h=new WeakMap)=>(u,d)=>{if(Array.isArray(u)){if(Array.isArray(d)&&d.length===u.length)return d.map((m,n)=>a(h)(u[n],m))}else{if(u instanceof Date)return u;if(q(u)&&q(d)){if(g(u,d,[...r,x,P]))return d;const m={};h.set(u,m),typeof u.constructor=="function"&&typeof u.constructor.name=="string"&&Object.defineProperty(m,"constructor",{enumerable:!1,value:u.constructor});for(const n of F(u))z(d,n)?m[n]=h.has(u[n])?h.get(u[n]):a(h)(u[n],d[n]):h.has(u[n])||(c+=1,q(u[n])&&(c+=F(u[n]).length),a(h)(u[n],d[n]));if(F(m).length>0)return m}}return u};return{subset:a()(e,t),stripped:c}}if(!Object.prototype.hasOwnProperty.call(globalThis,k)){const e=new WeakMap,t=Object.create(null),r=[],c=Object.create(null);Object.defineProperty(globalThis,k,{get:()=>e}),Object.defineProperty(globalThis,B,{configurable:!0,get:()=>({state:e.get(globalThis[ht]),matchers:t,customEqualityTesters:r})}),Object.defineProperty(globalThis,pt,{get:()=>c})}function Et(e){return globalThis[k].get(e)}function pe(e,t){const r=globalThis[k],c=r.get(t)||{},a=Object.defineProperties(c,{...Object.getOwnPropertyDescriptors(c),...Object.getOwnPropertyDescriptors(e)});r.set(t,a)}class N{constructor(t,r=!1){H(this,"$$typeof",Symbol.for("jest.asymmetricMatcher"));this.sample=t,this.inverse=r}getMatcherContext(t){return{...Et(t||globalThis[ht]),equals:g,isNot:this.inverse,customTesters:G(),utils:{...mt(),diff:S,stringify:j,iterableEquality:x,subsetEquality:P}}}}N.prototype[Symbol.for("chai/inspect")]=function(e){const t=j(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class nt extends N{constructor(t,r=!1){if(!v("String",t))throw new Error("Expected is not a string");super(t,r)}asymmetricMatch(t){const r=v("String",t)&&t.includes(this.sample);return this.inverse?!r:r}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class Zt extends N{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class ot extends N{constructor(t,r=!1){super(t,r)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,r){return t?Object.prototype.hasOwnProperty.call(t,r)?!0:this.hasProperty(this.getPrototype(t),r):!1}asymmetricMatch(t){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=!0;const c=this.getMatcherContext();for(const a in this.sample)if(!this.hasProperty(t,a)||!g(this.sample[a],t[a],c.customTesters)){r=!1;break}return this.inverse?!r:r}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class rt extends N{constructor(t,r=!1){super(t,r)}asymmetricMatch(t){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);const r=this.getMatcherContext(),c=this.sample.length===0||Array.isArray(t)&&this.sample.every(a=>t.some(h=>g(a,h,r.customTesters)));return this.inverse?!c:c}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class Qt extends N{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 c=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return c?c[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"||typeof t=="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 st extends N{constructor(t,r=!1){if(!v("String",t)&&!v("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),r)}asymmetricMatch(t){const r=v("String",t)&&this.sample.test(t);return this.inverse?!r:r}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class it extends N{constructor(r,c=2,a=!1){if(!v("Number",r))throw new Error("Expected is not a Number");if(!v("Number",c))throw new Error("Precision is not a Number");super(r);H(this,"precision");this.inverse=a,this.precision=c}asymmetricMatch(r){if(!v("Number",r))return!1;let c=!1;return r===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||r===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?c=!0:c=Math.abs(this.sample-r)<10**-this.precision/2,this.inverse?!c:c}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${Kt("digit",this.precision)})`].join(" ")}}const de=(e,t)=>{t.addMethod(e.expect,"anything",()=>new Zt),t.addMethod(e.expect,"any",r=>new Qt(r)),t.addMethod(e.expect,"stringContaining",r=>new nt(r)),t.addMethod(e.expect,"objectContaining",r=>new ot(r)),t.addMethod(e.expect,"arrayContaining",r=>new rt(r)),t.addMethod(e.expect,"stringMatching",r=>new st(r)),t.addMethod(e.expect,"closeTo",(r,c)=>new it(r,c)),e.expect.not={stringContaining:r=>new nt(r,!0),objectContaining:r=>new ot(r,!0),arrayContaining:r=>new rt(r,!0),stringMatching:r=>new st(r,!0),closeTo:(r,c)=>new it(r,c,!0)}};function at(e,t,r){const c=e.flag(t,"negate")?"not.":"",a=`${e.flag(t,"_name")}(${r?"expected":""})`,h=e.flag(t,"promise");return`expect(actual)${h?`.${h}`:""}.${c}${a}`}function ct(e,t,r,c){const a=e;if(a&&t instanceof Promise){t=t.finally(()=>{if(!a.promises)return;const u=a.promises.indexOf(t);u!==-1&&a.promises.splice(u,1)}),a.promises||(a.promises=[]),a.promises.push(t);let h=!1;return a.onFinished??(a.onFinished=[]),a.onFinished.push(()=>{if(!h){var u;const m=(((u=globalThis.__vitest_worker__)===null||u===void 0?void 0:u.onFilterStackTrace)||(n=>n||""))(c.stack);console.warn([`Promise returned by \`${r}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
|
|
31
|
+
`,m].join(""))}}),{then(u,d){return h=!0,t.then(u,d)},catch(u){return t.catch(u)},finally(u){return t.finally(u)},[Symbol.toStringTag]:"Promise"}}return t}function lt(e,t){var r;e.result||(e.result={state:"fail"}),e.result.state="fail",(r=e.result).errors||(r.errors=[]),e.result.errors.push(jt(t))}function wt(e,t,r){return function(...c){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))return r.apply(this,c);const a=e.flag(this,"vitest-test");if(!a)throw new Error("expect.soft() can only be used inside a test");try{const h=r.apply(this,c);return h&&typeof h=="object"&&typeof h.then=="function"?h.then(Ct,u=>{lt(a,u)}):h}catch(h){lt(a,h)}}}const me=(e,t)=>{const{AssertionError:r}=e,c=G();function a(n,o){const s=i=>{const l=wt(t,i,o);t.addMethod(e.Assertion.prototype,i,l),t.addMethod(globalThis[B].matchers,i,l)};Array.isArray(n)?n.forEach(i=>s(i)):s(n)}["throw","throws","Throw"].forEach(n=>{t.overwriteMethod(e.Assertion.prototype,n,o=>function(...s){const i=t.flag(this,"promise"),l=t.flag(this,"object"),f=t.flag(this,"negate");if(i==="rejects")t.flag(this,"object",()=>{throw l});else if(i==="resolves"&&typeof l!="function"){if(f)return;{const p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new r(p,y,t.flag(this,"ssfi"))}}o.apply(this,s)})}),a("withTest",function(n){return t.flag(this,"vitest-test",n),this}),a("toEqual",function(n){const o=t.flag(this,"object"),s=g(o,n,[...c,x]);return this.assert(s,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",n,o)}),a("toStrictEqual",function(n){const o=t.flag(this,"object"),s=g(o,n,[...c,x,tt,U,et],!0);return this.assert(s,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",n,o)}),a("toBe",function(n){const o=this._obj,s=Object.is(o,n);let i="";return s||(g(o,n,[...c,x,tt,U,et],!0)?i="toStrictEqual":g(o,n,[...c,x])&&(i="toEqual")),this.assert(s,zt(i),"expected #{this} not to be #{exp} // Object.is equality",n,o)}),a("toMatchObject",function(n){const o=this._obj,s=g(o,n,[...c,x,P]),i=t.flag(this,"negate"),{subset:l,stripped:f}=Xt(o,n,c);if(s&&i||!s&&!i){const p=t.getMessage(this,[s,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",n,l,!1]),y=f===0?p:`${p}
|
|
32
|
+
(${f} matching ${f===1?"property":"properties"} omitted from actual)`;throw new r(y,{showDiff:!0,expected:n,actual:l})}}),a("toMatch",function(n){const o=this._obj;if(typeof o!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof o}`);return this.assert(typeof n=="string"?o.includes(n):o.match(n),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",n,o)}),a("toContain",function(n){const o=this._obj;if(typeof Node<"u"&&o instanceof Node){if(!(n instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof n}`);return this.assert(o.contains(n),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",n,o)}if(typeof DOMTokenList<"u"&&o instanceof DOMTokenList){T(n,"class name",["string"]);const i=t.flag(this,"negate")?o.value.replace(n,"").trim():`${o.value} ${n}`;return this.assert(o.contains(n),`expected "${o.value}" to contain "${n}"`,`expected "${o.value}" not to contain "${n}"`,i,o.value)}return typeof o=="string"&&typeof n=="string"?this.assert(o.includes(n),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",n,o):(o!=null&&typeof o!="string"&&t.flag(this,"object",Array.from(o)),this.contain(n))}),a("toContainEqual",function(n){const o=t.flag(this,"object"),s=Array.from(o).findIndex(i=>g(i,n,c));this.assert(s!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",n)}),a("toBeTruthy",function(){const n=t.flag(this,"object");this.assert(!!n,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,n)}),a("toBeFalsy",function(){const n=t.flag(this,"object");this.assert(!n,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,n)}),a("toBeGreaterThan",function(n){const o=this._obj;return T(o,"actual",["number","bigint"]),T(n,"expected",["number","bigint"]),this.assert(o>n,`expected ${o} to be greater than ${n}`,`expected ${o} to be not greater than ${n}`,n,o,!1)}),a("toBeGreaterThanOrEqual",function(n){const o=this._obj;return T(o,"actual",["number","bigint"]),T(n,"expected",["number","bigint"]),this.assert(o>=n,`expected ${o} to be greater than or equal to ${n}`,`expected ${o} to be not greater than or equal to ${n}`,n,o,!1)}),a("toBeLessThan",function(n){const o=this._obj;return T(o,"actual",["number","bigint"]),T(n,"expected",["number","bigint"]),this.assert(o<n,`expected ${o} to be less than ${n}`,`expected ${o} to be not less than ${n}`,n,o,!1)}),a("toBeLessThanOrEqual",function(n){const o=this._obj;return T(o,"actual",["number","bigint"]),T(n,"expected",["number","bigint"]),this.assert(o<=n,`expected ${o} to be less than or equal to ${n}`,`expected ${o} to be not less than or equal to ${n}`,n,o,!1)}),a("toBeNaN",function(){const n=t.flag(this,"object");this.assert(Number.isNaN(n),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,n)}),a("toBeUndefined",function(){const n=t.flag(this,"object");this.assert(n===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,n)}),a("toBeNull",function(){const n=t.flag(this,"object");this.assert(n===null,"expected #{this} to be null","expected #{this} not to be null",null,n)}),a("toBeDefined",function(){const n=t.flag(this,"object");this.assert(typeof n<"u","expected #{this} to be defined","expected #{this} to be undefined",n)}),a("toBeTypeOf",function(n){const o=typeof this._obj,s=n===o;return this.assert(s,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",n,o)}),a("toBeInstanceOf",function(n){return this.instanceOf(n)}),a("toHaveLength",function(n){return this.have.length(n)}),a("toHaveProperty",function(...n){Array.isArray(n[0])&&(n[0]=n[0].map($=>String($).replace(/([.[\]])/g,"\\$1")).join("."));const o=this._obj,[s,i]=n,l=()=>Object.prototype.hasOwnProperty.call(o,s)?{value:o[s],exists:!0}:t.getPathInfo(o,s),{value:f,exists:p}=l(),y=p&&(n.length===1||g(i,f,c)),b=n.length===1?"":` with value ${t.objDisplay(i)}`;return this.assert(y,`expected #{this} to have property "${s}"${b}`,`expected #{this} to not have property "${s}"${b}`,i,p?f:void 0)}),a("toBeCloseTo",function(n,o=2){const s=this._obj;let i=!1,l=0,f=0;return n===Number.POSITIVE_INFINITY&&s===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&s===Number.NEGATIVE_INFINITY?i=!0:(l=10**-o/2,f=Math.abs(s-n),i=f<l),this.assert(i,`expected #{this} to be close to #{exp}, received difference is ${f}, but expected ${l}`,`expected #{this} to not be close to #{exp}, received difference is ${f}, but expected ${l}`,n,s,!1)});function h(n){if(!V(n._obj))throw new TypeError(`${t.inspect(n._obj)} is not a spy or a call to a spy!`)}function u(n){return h(n),n._obj}a(["toHaveBeenCalledTimes","toBeCalledTimes"],function(n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length;return this.assert(i===n,`expected "${s}" to be called #{exp} times, but got ${i} times`,`expected "${s}" to not be called #{exp} times`,n,i,!1)}),a("toHaveBeenCalledOnce",function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length;return this.assert(s===1,`expected "${o}" to be called once, but got ${s} times`,`expected "${o}" to not be called once`,1,s,!1)}),a(["toHaveBeenCalled","toBeCalled"],function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length,i=s>0,l=t.flag(this,"negate");let f=t.getMessage(this,[i,`expected "${o}" to be called at least once`,`expected "${o}" to not be called at all, but actually been called ${s} times`,!0,i]);if(i&&l&&(f=Y(n,f)),i&&l||!i&&!l)throw new r(f)});function d(n,o){return n.length===o.length&&n.every((s,i)=>g(s,o[i],[...c,x]))}a(["toHaveBeenCalledWith","toBeCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.some(p=>d(p,n)),l=t.flag(this,"negate"),f=t.getMessage(this,[i,`expected "${s}" to be called with arguments: #{exp}`,`expected "${s}" to not be called with arguments: #{exp}`,n]);if(i&&l||!i&&!l)throw new r(Y(o,f,n))}),a("toHaveBeenCalledExactlyOnceWith",function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length,f=o.mock.calls.some(b=>d(b,n))&&i===1,p=t.flag(this,"negate"),y=t.getMessage(this,[f,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,n]);if(f&&p||!f&&!p)throw new r(Y(o,y,n))}),a(["toHaveBeenNthCalledWith","nthCalledWith"],function(n,...o){const s=u(this),i=s.getMockName(),l=s.mock.calls[n-1],f=s.mock.calls.length,p=n<=f;this.assert(l&&d(l,o),`expected ${I(n)} "${i}" call to have been called with #{exp}${p?"":`, but called only ${f} times`}`,`expected ${I(n)} "${i}" call to not have been called with #{exp}`,o,l,p)}),a(["toHaveBeenLastCalledWith","lastCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls[o.mock.calls.length-1];this.assert(i&&d(i,n),`expected last "${s}" call to have been called with #{exp}`,`expected last "${s}" call to not have been called with #{exp}`,n,i)});function m(n,o,s){const i=n.mock.invocationCallOrder,l=o.mock.invocationCallOrder;return i.length===0?!s:l.length===0?!1:i[0]<l[0]}a(["toHaveBeenCalledBefore"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(s,n,o),`expected "${s.getMockName()}" to have been called before "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called before "${n.getMockName()}"`,n,s)}),a(["toHaveBeenCalledAfter"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(n,s,o),`expected "${s.getMockName()}" to have been called after "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called after "${n.getMockName()}"`,n,s)}),a(["toThrow","toThrowError"],function(n){if(typeof n=="string"||typeof n>"u"||n instanceof RegExp)return this.throws(n===""?/^$/:n);const o=this._obj,s=t.flag(this,"promise"),i=t.flag(this,"negate");let l=null;if(s==="rejects")l=o;else if(s==="resolves"&&typeof o!="function"){if(i)return;{const f=t.flag(this,"message")||"expected promise to throw an error, but it didn't",p={showDiff:!1};throw new r(f,p,t.flag(this,"ssfi"))}}else{let f=!1;try{o()}catch(p){f=!0,l=p}if(!f&&!i){const p=t.flag(this,"message")||"expected function to throw an error, but it didn't",y={showDiff:!1};throw new r(p,y,t.flag(this,"ssfi"))}}if(typeof n=="function"){const f=n.name||n.prototype.constructor.name;return this.assert(l&&l instanceof n,`expected error to be instance of ${f}`,`expected error not to be instance of ${f}`,n,l)}if(n instanceof Error){const f=g(l,n,[...c,x]);return this.assert(f,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",n,l)}if(typeof n=="object"&&"asymmetricMatch"in n&&typeof n.asymmetricMatch=="function"){const f=n;return this.assert(l&&f.asymmetricMatch(l),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",f,l)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof n}"`)}),[{name:"toHaveResolved",condition:n=>n.mock.settledResults.length>0&&n.mock.settledResults.some(({type:o})=>o==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:n=>n.mock.calls.length>0&&n.mock.results.some(({type:o})=>o!=="throw"),action:"called"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(){const i=u(this),l=i.getMockName(),f=o(i);this.assert(f,`expected "${l}" to be successfully ${s} at least once`,`expected "${l}" to not be successfully ${s}`,f,!f,!1)})}),[{name:"toHaveResolvedTimes",condition:(n,o)=>n.mock.settledResults.reduce((s,{type:i})=>i==="fulfilled"?++s:s,0)===o,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(n,o)=>n.mock.results.reduce((s,{type:i})=>i==="throw"?s:++s,0)===o,action:"called"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=l.getMockName(),p=o(l,i);this.assert(p,`expected "${f}" to be successfully ${s} ${i} times`,`expected "${f}" to not be successfully ${s} ${i} times`,`expected resolved times: ${i}`,`received resolved times: ${p}`,!1)})}),[{name:"toHaveResolvedWith",condition:(n,o)=>n.mock.settledResults.some(({type:s,value:i})=>s==="fulfilled"&&g(o,i)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(n,o)=>n.mock.results.some(({type:s,value:i})=>s==="return"&&g(o,i)),action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=o(l,i),p=t.flag(this,"negate");if(f&&p||!f&&!p){const y=l.getMockName(),b=t.getMessage(this,[f,`expected "${y}" to ${s} with: #{exp} at least once`,`expected "${y}" to not ${s} with: #{exp}`,i]),$=s==="return"?l.mock.results:l.mock.settledResults;throw new r(te(l,$,b,i))}})}),[{name:"toHaveLastResolvedWith",condition:(n,o)=>{const s=n.mock.settledResults[n.mock.settledResults.length-1];return s&&s.type==="fulfilled"&&g(s.value,o)},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(n,o)=>{const s=n.mock.results[n.mock.results.length-1];return s&&s.type==="return"&&g(s.value,o)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),f=s==="return"?l.mock.results:l.mock.settledResults,p=f[f.length-1],y=l.getMockName();this.assert(o(l,i),`expected last "${y}" call to ${s} #{exp}`,`expected last "${y}" call to not ${s} #{exp}`,i,p==null?void 0:p.value)})}),[{name:"toHaveNthResolvedWith",condition:(n,o,s)=>{const i=n.mock.settledResults[o-1];return i&&i.type==="fulfilled"&&g(i.value,s)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(n,o,s)=>{const i=n.mock.results[o-1];return i&&i.type==="return"&&g(i.value,s)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i,l){const f=u(this),p=f.getMockName(),b=(s==="return"?f.mock.results:f.mock.settledResults)[i-1],$=`${I(i)} call`;this.assert(o(f,i,l),`expected ${$} "${p}" call to ${s} #{exp}`,`expected ${$} "${p}" call to not ${s} #{exp}`,l,b==null?void 0:b.value)})}),a("withContext",function(n){for(const o in n)t.flag(this,o,n[o]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const o=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof(i==null?void 0:i.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof i}'.`);const l=new Proxy(this,{get:(f,p,y)=>{const b=Reflect.get(f,p,y);return typeof b!="function"?b instanceof e.Assertion?l:b:(...$)=>{t.flag(this,"_name",p);const C=i.then(M=>(t.flag(this,"object",M),b.call(this,...$)),M=>{const w=new r(`promise rejected "${t.inspect(M)}" instead of resolving`,{showDiff:!1});throw w.cause=M,w.stack=o.stack.replace(o.message,w.message),w});return ct(s,C,at(t,this,!!$.length),o)}}});return l}),t.addProperty(e.Assertion.prototype,"rejects",function(){const o=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object"),l=typeof i=="function"?i():i;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof(l==null?void 0:l.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof l}'.`);const f=new Proxy(this,{get:(p,y,b)=>{const $=Reflect.get(p,y,b);return typeof $!="function"?$ instanceof e.Assertion?f:$:(...C)=>{t.flag(this,"_name",y);const M=l.then(w=>{const _=new r(`promise resolved "${t.inspect(w)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:w});throw _.stack=o.stack.replace(o.message,_.message),_},w=>(t.flag(this,"object",w),$.call(this,...C)));return ct(s,M,at(t,this,!!C.length),o)}}});return f})};function I(e){const t=e%10,r=e%100;return t===1&&r!==11?`${e}st`:t===2&&r!==12?`${e}nd`:t===3&&r!==13?`${e}rd`:`${e}th`}function Y(e,t,r){return e.mock.calls.length&&(t+=E.gray(`
|
|
33
33
|
|
|
34
34
|
Received:
|
|
35
35
|
|
|
36
36
|
${e.mock.calls.map((c,a)=>{let h=E.bold(` ${I(a+1)} ${e.getMockName()} call:
|
|
37
37
|
|
|
38
|
-
`);return r?h+=S(r,c,{omitAnnotationLines:!0}):h+=
|
|
38
|
+
`);return r?h+=S(r,c,{omitAnnotationLines:!0}):h+=j(c).split(`
|
|
39
39
|
`).map(u=>` ${u}`).join(`
|
|
40
40
|
`),h+=`
|
|
41
41
|
`,h}).join(`
|
|
42
42
|
`)}`)),t+=E.gray(`
|
|
43
43
|
|
|
44
44
|
Number of calls: ${E.bold(e.mock.calls.length)}
|
|
45
|
-
`),t}function
|
|
45
|
+
`),t}function te(e,t,r,c){return t.length&&(r+=E.gray(`
|
|
46
46
|
|
|
47
47
|
Received:
|
|
48
48
|
|
|
49
49
|
${t.map((a,h)=>{let u=E.bold(` ${I(h+1)} ${e.getMockName()} call return:
|
|
50
50
|
|
|
51
|
-
`);return c?u+=S(c,a.value,{omitAnnotationLines:!0}):u+=
|
|
51
|
+
`);return c?u+=S(c,a.value,{omitAnnotationLines:!0}):u+=j(a).split(`
|
|
52
52
|
`).map(d=>` ${d}`).join(`
|
|
53
53
|
`),u+=`
|
|
54
54
|
`,u}).join(`
|
|
55
55
|
`)}`)),r+=E.gray(`
|
|
56
56
|
|
|
57
57
|
Number of calls: ${E.bold(e.mock.calls.length)}
|
|
58
|
-
`),r}function
|
|
58
|
+
`),r}function ee(e,t){const r=e._obj,c=R.flag(e,"negate"),a=R.flag(e,"promise")||"",h={...mt(),diff:S,stringify:j,iterableEquality:x,subsetEquality:P};return{state:{...Et(t),customTesters:G(),isNot:c,utils:h,promise:a,equals:g,suppressedErrors:[],soft:R.flag(e,"soft"),poll:R.flag(e,"poll")},isNot:c,obj:r}}class ut extends Error{constructor(t,r,c){super(t),this.actual=r,this.expected=c}}function ne(e,t,r){return(c,a)=>{Object.entries(r).forEach(([h,u])=>{function d(...s){const{state:i,isNot:l,obj:f}=ee(this,t),p=u.call(i,f,...s);if(p&&typeof p=="object"&&typeof p.then=="function")return p.then(({pass:w,message:_,actual:xt,expected:vt})=>{if(w&&l||!w&&!l)throw new ut(_(),xt,vt)});const{pass:y,message:b,actual:$,expected:C}=p;if(y&&l||!y&&!l)throw new ut(b(),$,C)}const m=wt(a,h,d);a.addMethod(globalThis[B].matchers,h,m),a.addMethod(e.Assertion.prototype,h,m);class n extends N{constructor(i=!1,...l){super(l,i)}asymmetricMatch(i){const{pass:l}=u.call(this.getMatcherContext(t),i,...this.sample);return this.inverse?!l:l}toString(){return`${this.inverse?"not.":""}${h}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(i=>j(i)).join(", ")}>`}}const o=(...s)=>new n(!1,...s);Object.defineProperty(t,h,{configurable:!0,enumerable:!0,value:o,writable:!0}),Object.defineProperty(t.not,h,{configurable:!0,enumerable:!0,value:(...s)=>new n(!0,...s),writable:!0}),Object.defineProperty(globalThis[pt],h,{configurable:!0,enumerable:!0,value:o,writable:!0})})}}const ge=(e,t)=>{t.addMethod(e.expect,"extend",(r,c)=>{Mt(ne(e,r,c))})};export{pt as ASYMMETRIC_MATCHERS_OBJECT,Qt as Any,Zt as Anything,rt as ArrayContaining,N as AsymmetricMatcher,ht as GLOBAL_EXPECT,B as JEST_MATCHERS_OBJECT,de as JestAsymmetricMatchers,me as JestChaiExpect,ge as JestExtend,k as MATCHERS_OBJECT,ot as ObjectContaining,nt as StringContaining,st as StringMatching,he as addCustomEqualityTesters,et as arrayBufferEquality,fe as customMatchers,g as equals,zt as generateToBeMessage,F as getObjectKeys,Xt as getObjectSubset,Et as getState,v as isA,K as isAsymmetric,Ht as isImmutableUnorderedKeyed,Vt as isImmutableUnorderedSet,x as iterableEquality,Kt as pluralize,pe as setState,U as sparseArrayEquality,P as subsetEquality,tt as typeEquality};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var le=Object.defineProperty;var fe=(t,e,r)=>e in t?le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var q=(t,e,r)=>fe(t,typeof e!="symbol"?e+"":e,r);import{getSafeTimers as Q}from"../../../../../@vitest_utils@3.2.3/node_modules/@vitest/utils/dist/index.js";import{parseSingleStack as Z}from"../../../../../@vitest_utils@3.2.3/node_modules/@vitest/utils/dist/source-map.js";import{stripLiteral as he}from"../../../../../strip-literal@3.0.0/node_modules/strip-literal/dist/index.js";import{isNegativeNaN as de,isObject as O,objectAttr as X,toArray as ee,createDefer as B}from"../../../../../@vitest_utils@3.2.3/node_modules/@vitest/utils/dist/helpers.js";import{f as pe,o as ge}from"../../../../../@vitest_utils@3.2.3/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js";class me extends Error{constructor(r,i,n){super(r);q(this,"code","VITEST_PENDING");q(this,"taskId");this.message=r,this.note=n,this.taskId=i.id}}const ye=new WeakMap,te=new WeakMap,ne=new WeakMap;function ve(t,e){ye.set(t,e)}function we(t,e){te.set(t,e)}function Te(t){return te.get(t)}function ke(t,e){ne.set(t,e)}function be(t){return ne.get(t)}function Ce(t,e){const r=e.reduce((s,o)=>(s[o.prop]=o,s),{}),i={};t.forEach(s=>{const o=r[s.prop]||{...s};i[o.prop]=o});for(const s in i){var n;const o=i[s];o.deps=(n=o.deps)===null||n===void 0?void 0:n.map(c=>i[c.prop])}return Object.values(i)}function re(t,e,r){const i=["auto","injected","scope"],n=Object.entries(t).map(([s,o])=>{const c={value:o};if(Array.isArray(o)&&o.length>=2&&O(o[1])&&Object.keys(o[1]).some(a=>i.includes(a))){var u;Object.assign(c,o[1]);const a=o[0];c.value=c.injected?((u=r.injectValue)===null||u===void 0?void 0:u.call(r,s))??a:a}return c.scope=c.scope||"test",c.scope==="worker"&&!r.getWorkerContext&&(c.scope="file"),c.prop=s,c.isFn=typeof c.value=="function",c});return Array.isArray(e.fixtures)?e.fixtures=e.fixtures.concat(n):e.fixtures=n,n.forEach(s=>{if(s.isFn){const c=ie(s.value);if(c.length&&(s.deps=e.fixtures.filter(({prop:u})=>u!==s.prop&&c.includes(u))),s.scope!=="test"){var o;(o=s.deps)===null||o===void 0||o.forEach(u=>{if(u.isFn&&!(s.scope==="worker"&&u.scope==="worker")&&!(s.scope==="file"&&u.scope!=="test"))throw new SyntaxError(`cannot use the ${u.scope} fixture "${u.prop}" inside the ${s.scope} fixture "${s.prop}"`)})}}}),e}const M=new Map,A=new Map;function _e(t,e,r){return i=>{const n=i||r;if(!n)return e({});const s=Te(n);if(!(s!=null&&s.length))return e(n);const o=ie(e),c=s.some(({auto:h})=>h);if(!o.length&&!c)return e(n);M.get(n)||M.set(n,new Map);const u=M.get(n);A.has(n)||A.set(n,[]);const a=A.get(n),l=s.filter(({prop:h,auto:m})=>m||o.includes(h)),p=oe(l);if(!p.length)return e(n);async function d(){for(const h of p){if(u.has(h))continue;const m=await Ee(t,h,n,a);n[h.prop]=m,u.set(h,m),h.scope==="test"&&a.unshift(()=>{u.delete(h)})}}return d().then(()=>e(n))}}const R=new WeakMap;function Ee(t,e,r,i){var n;const s=Xe(r.task.file),o=(n=t.getWorkerContext)===null||n===void 0?void 0:n.call(t);if(!e.isFn){var c;if(s[c=e.prop]??(s[c]=e.value),o){var u;o[u=e.prop]??(o[u]=e.value)}return e.value}if(e.scope==="test")return H(e.value,r,i);if(R.has(e))return R.get(e);let a;if(e.scope==="worker"){if(!o)throw new TypeError("[@vitest/runner] The worker context is not available in the current test runner. Please, provide the `getWorkerContext` method when initiating the runner.");a=o}else a=s;if(e.prop in a)return a[e.prop];A.has(a)||A.set(a,[]);const l=A.get(a),p=H(e.value,a,l).then(d=>(a[e.prop]=d,R.delete(e),d));return R.set(e,p),p}async function H(t,e,r){const i=B();let n=!1;const s=t(e,async o=>{n=!0,i.resolve(o);const c=B();r.push(async()=>{c.resolve(),await s}),await c}).catch(o=>{if(!n){i.reject(o);return}throw o});return i}function oe(t,e=new Set,r=[]){return t.forEach(i=>{if(!r.includes(i)){if(!i.isFn||!i.deps){r.push(i);return}if(e.has(i))throw new Error(`Circular fixture dependency detected: ${i.prop} <- ${[...e].reverse().map(n=>n.prop).join(" <- ")}`);e.add(i),oe(i.deps,e,r),r.push(i),e.clear()}}),r}function ie(t){let e=he(t.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(e)&&(e=e.split(/__async\((?:this|null),/)[1]);const r=e.match(/[^(]*\(([^)]*)/);if(!r)return[];const i=z(r[1]);if(!i.length)return[];let n=i[0];if("__VITEST_FIXTURE_INDEX__"in t&&(n=i[t.__VITEST_FIXTURE_INDEX__],!n))return[];if(!(n.startsWith("{")&&n.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${n}".`);const s=n.slice(1,-1).replace(/\s/g,""),o=z(s).map(u=>u.replace(/:.*|=.*/g,"")),c=o.at(-1);if(c&&c.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${c}".`);return o}function z(t){const e=[],r=[];let i=0;for(let s=0;s<t.length;s++)if(t[s]==="{"||t[s]==="[")r.push(t[s]==="{"?"}":"]");else if(t[s]===r[r.length-1])r.pop();else if(!r.length&&t[s]===","){const o=t.substring(i,s).trim();o&&e.push(o),i=s+1}const n=t.substring(i).trim();return n&&e.push(n),e}function se(t,e){function r(n){const s=function(...o){return e.apply(n,o)};Object.assign(s,e),s.withContext=()=>s.bind(n),s.setContext=(o,c)=>{n[o]=c},s.mergeContext=o=>{Object.assign(n,o)};for(const o of t)Object.defineProperty(s,o,{get(){return r({...n,[o]:!0})}});return s}const i=r({});return i.fn=e,i}const F=Re();U(function(t,e,r){N().test.fn.call(this,_(t),e,r)});let b,ce,Ae;function ae(t,e){if(!t)throw new Error(`Vitest failed to find ${e}. This is a bug in Vitest. Please, open an issue with reproduction.`)}function Se(){return Ae}function Fe(){return ae(b,"the runner"),b}function N(){const t=E.currentSuite||ce;return ae(t,"the current suite"),t}function je(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function S(t,e){let r={},i=()=>{};if(typeof e=="object"){if(typeof t=="object")throw new TypeError("Cannot use two objects as arguments. Please provide options and a function callback in that order.");console.warn("Using an object as a third argument is deprecated. Vitest 4 will throw an error if the third argument is not a timeout number. Please use the second argument for options. See more at https://vitest.dev/guide/migration"),r=e}else typeof e=="number"?r={timeout:e}:typeof t=="object"&&(r=t);if(typeof t=="function"){if(typeof e=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");i=t}else typeof e=="function"&&(i=e);return{options:r,handler:i}}function xe(t,e=()=>{},r,i,n,s){const o=[];let c;h();const u=function(y="",f={}){var g;const w=(f==null?void 0:f.timeout)??b.config.testTimeout,k={id:"",name:y,suite:(g=E.currentSuite)===null||g===void 0?void 0:g.suite,each:f.each,fails:f.fails,context:void 0,type:"test",file:void 0,timeout:w,retry:f.retry??b.config.retry,repeats:f.repeats,mode:f.only?"only":f.skip?"skip":f.todo?"todo":"run",meta:f.meta??Object.create(null),annotations:[]},j=f.handler;(f.concurrent||!f.sequential&&b.config.sequence.concurrent)&&(k.concurrent=!0),k.shuffle=n==null?void 0:n.shuffle;const x=Ue(k,b);Object.defineProperty(k,"context",{value:x,enumerable:!1}),we(x,f.fixtures);const ue=Error.stackTraceLimit;Error.stackTraceLimit=15;const K=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ue,j&&ve(k,V(Ie(_e(b,j,x),k),w,!1,K,(L,I)=>Ve([x],I))),b.config.includeTaskLocation){const L=K.stack,I=$e(L);I&&(k.location=I)}return o.push(k),k},a=U(function(y,f,g){let{options:w,handler:k}=S(f,g);typeof n=="object"&&(w=Object.assign({},n,w)),w.concurrent=this.concurrent||!this.sequential&&(w==null?void 0:w.concurrent),w.sequential=this.sequential||!this.concurrent&&(w==null?void 0:w.sequential);const j=u(_(y),{...this,...w,handler:k});j.type="test"});let l=s;const p={type:"collector",name:t,mode:r,suite:c,options:n,test:a,tasks:o,collect:v,task:u,clear:m,on:d,fixtures(){return l},scoped(y){const f=re(y,{fixtures:l},b);f.fixtures&&(l=f.fixtures)}};function d(y,...f){be(c)[y].push(...f)}function h(y){var f;typeof n=="number"&&(n={timeout:n}),c={id:"",type:"suite",name:t,suite:(f=E.currentSuite)===null||f===void 0?void 0:f.suite,mode:r,each:i,file:void 0,shuffle:n==null?void 0:n.shuffle,tasks:[],meta:Object.create(null),concurrent:n==null?void 0:n.concurrent},ke(c,je())}function m(){o.length=0,h()}async function v(y){if(!y)throw new TypeError("File is required to collect tasks.");e&&await Ne(p,()=>e(a));const f=[];for(const g of o)f.push(g.type==="collector"?await g.collect(y):g);return c.file=y,c.tasks=f,f.forEach(g=>{g.file=y}),c}return We(p),p}function Ie(t,e){return async(...r)=>{const i=await t(...r);if(e.promises){const s=(await Promise.allSettled(e.promises)).map(o=>o.status==="rejected"?o.reason:void 0).filter(Boolean);if(s.length)throw s}return i}}function Re(){function t(e,r,i){var n;const s=this.only?"only":this.skip?"skip":this.todo?"todo":"run",o=E.currentSuite||ce;let{options:c,handler:u}=S(r,i);const a=c.concurrent||this.concurrent||c.sequential===!1,l=c.sequential||this.sequential||c.concurrent===!1;c={...o==null?void 0:o.options,...c,shuffle:this.shuffle??c.shuffle??(o==null||(n=o.options)===null||n===void 0?void 0:n.shuffle)??void 0};const p=a||c.concurrent&&!l,d=l||c.sequential&&!a;return c.concurrent=p&&!d,c.sequential=d&&!p,xe(_(e),u,s,this.each,c,o==null?void 0:o.fixtures())}return t.each=function(e,...r){const i=this.withContext();return this.setContext("each",!0),Array.isArray(e)&&r.length&&(e=$(e,r)),(n,s,o)=>{const c=_(n),u=e.every(Array.isArray),{options:a,handler:l}=S(s,o),p=typeof s=="function"&&typeof o=="object";e.forEach((d,h)=>{const m=Array.isArray(d)?d:[d];p?u?i(C(c,m,h),()=>l(...m),a):i(C(c,m,h),()=>l(d),a):u?i(C(c,m,h),a,()=>l(...m)):i(C(c,m,h),a,()=>l(d))}),this.setContext("each",void 0)}},t.for=function(e,...r){return Array.isArray(e)&&r.length&&(e=$(e,r)),(i,n,s)=>{const o=_(i),{options:c,handler:u}=S(n,s);e.forEach((a,l)=>{F(C(o,ee(a),l),c,()=>u(a))})}},t.skipIf=e=>e?F.skip:F,t.runIf=e=>e?F:F.skip,se(["concurrent","sequential","shuffle","skip","only","todo"],t)}function Pe(t,e){const r=t;r.each=function(n,...s){const o=this.withContext();return this.setContext("each",!0),Array.isArray(n)&&s.length&&(n=$(n,s)),(c,u,a)=>{const l=_(c),p=n.every(Array.isArray),{options:d,handler:h}=S(u,a),m=typeof u=="function"&&typeof a=="object";n.forEach((v,y)=>{const f=Array.isArray(v)?v:[v];m?p?o(C(l,f,y),()=>h(...f),d):o(C(l,f,y),()=>h(v),d):p?o(C(l,f,y),d,()=>h(...f)):o(C(l,f,y),d,()=>h(v))}),this.setContext("each",void 0)}},r.for=function(n,...s){const o=this.withContext();return Array.isArray(n)&&s.length&&(n=$(n,s)),(c,u,a)=>{const l=_(c),{options:p,handler:d}=S(u,a);n.forEach((h,m)=>{const v=y=>d(h,y);v.__VITEST_FIXTURE_INDEX__=1,v.toString=()=>d.toString(),o(C(l,ee(h),m),p,v)})}},r.skipIf=function(n){return n?this.skip:this},r.runIf=function(n){return n?this:this.skip},r.scoped=function(n){N().scoped(n)},r.extend=function(n){const s=re(n,e||{},b);return U(function(c,u,a){const l=N(),p=l.fixtures(),d={...this};p&&(d.fixtures=Ce(d.fixtures||[],p)),l.test.fn.call(d,_(c),u,a)},s)};const i=se(["concurrent","sequential","skip","only","todo","fails"],r);return e&&i.mergeContext(e),i}function U(t,e){return Pe(t,e)}function _(t){return typeof t=="string"?t:typeof t=="function"?t.name||"<anonymous>":String(t)}function C(t,e,r){(t.includes("%#")||t.includes("%$"))&&(t=t.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${r}`).replace(/%\$/g,`${r+1}`).replace(/__vitest_escaped_%__/g,"%%"));const i=t.split("%").length-1;t.includes("%f")&&(t.match(/%f/g)||[]).forEach((c,u)=>{if(de(e[u])||Object.is(e[u],-0)){let a=0;t=t.replace(/%f/g,l=>(a++,a===u+1?"-%f":l))}});let n=pe(t,...e.slice(0,i));const s=O(e[0]);return n=n.replace(/\$([$\w.]+)/g,(o,c)=>{const u=/^\d+$/.test(c);if(!s&&!u)return`$${c}`;const a=u?X(e,c):void 0,l=s?X(e[0],c,a):a;return ge(l,{truncate:void 0})}),n}function $(t,e){const r=t.join("").trim().replace(/ /g,"").split(`
|
|
1
|
+
var le=Object.defineProperty;var fe=(t,e,r)=>e in t?le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var q=(t,e,r)=>fe(t,typeof e!="symbol"?e+"":e,r);import{getSafeTimers as Q}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js";import{parseSingleStack as Z}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js";import{stripLiteral as he}from"../../../../../strip-literal@3.0.0/node_modules/strip-literal/dist/index.js";import{isNegativeNaN as de,isObject as O,objectAttr as X,toArray as ee,createDefer as B}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js";import{f as pe,o as ge}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js";class me extends Error{constructor(r,i,n){super(r);q(this,"code","VITEST_PENDING");q(this,"taskId");this.message=r,this.note=n,this.taskId=i.id}}const ve=new WeakMap,te=new WeakMap,ne=new WeakMap;function ye(t,e){ve.set(t,e)}function we(t,e){te.set(t,e)}function Te(t){return te.get(t)}function ke(t,e){ne.set(t,e)}function be(t){return ne.get(t)}function Ce(t,e){const r=e.reduce((s,o)=>(s[o.prop]=o,s),{}),i={};t.forEach(s=>{const o=r[s.prop]||{...s};i[o.prop]=o});for(const s in i){var n;const o=i[s];o.deps=(n=o.deps)===null||n===void 0?void 0:n.map(c=>i[c.prop])}return Object.values(i)}function re(t,e,r){const i=["auto","injected","scope"],n=Object.entries(t).map(([s,o])=>{const c={value:o};if(Array.isArray(o)&&o.length>=2&&O(o[1])&&Object.keys(o[1]).some(a=>i.includes(a))){var u;Object.assign(c,o[1]);const a=o[0];c.value=c.injected?((u=r.injectValue)===null||u===void 0?void 0:u.call(r,s))??a:a}return c.scope=c.scope||"test",c.scope==="worker"&&!r.getWorkerContext&&(c.scope="file"),c.prop=s,c.isFn=typeof c.value=="function",c});return Array.isArray(e.fixtures)?e.fixtures=e.fixtures.concat(n):e.fixtures=n,n.forEach(s=>{if(s.isFn){const c=ie(s.value);if(c.length&&(s.deps=e.fixtures.filter(({prop:u})=>u!==s.prop&&c.includes(u))),s.scope!=="test"){var o;(o=s.deps)===null||o===void 0||o.forEach(u=>{if(u.isFn&&!(s.scope==="worker"&&u.scope==="worker")&&!(s.scope==="file"&&u.scope!=="test"))throw new SyntaxError(`cannot use the ${u.scope} fixture "${u.prop}" inside the ${s.scope} fixture "${s.prop}"`)})}}}),e}const M=new Map,S=new Map;function _e(t,e,r){return i=>{const n=i||r;if(!n)return e({});const s=Te(n);if(!(s!=null&&s.length))return e(n);const o=ie(e),c=s.some(({auto:h})=>h);if(!o.length&&!c)return e(n);M.get(n)||M.set(n,new Map);const u=M.get(n);S.has(n)||S.set(n,[]);const a=S.get(n),l=s.filter(({prop:h,auto:m})=>m||o.includes(h)),p=oe(l);if(!p.length)return e(n);async function d(){for(const h of p){if(u.has(h))continue;const m=await Ee(t,h,n,a);n[h.prop]=m,u.set(h,m),h.scope==="test"&&a.unshift(()=>{u.delete(h)})}}return d().then(()=>e(n))}}const R=new WeakMap;function Ee(t,e,r,i){var n;const s=Xe(r.task.file),o=(n=t.getWorkerContext)===null||n===void 0?void 0:n.call(t);if(!e.isFn){var c;if(s[c=e.prop]??(s[c]=e.value),o){var u;o[u=e.prop]??(o[u]=e.value)}return e.value}if(e.scope==="test")return H(e.value,r,i);if(R.has(e))return R.get(e);let a;if(e.scope==="worker"){if(!o)throw new TypeError("[@vitest/runner] The worker context is not available in the current test runner. Please, provide the `getWorkerContext` method when initiating the runner.");a=o}else a=s;if(e.prop in a)return a[e.prop];S.has(a)||S.set(a,[]);const l=S.get(a),p=H(e.value,a,l).then(d=>(a[e.prop]=d,R.delete(e),d));return R.set(e,p),p}async function H(t,e,r){const i=B();let n=!1;const s=t(e,async o=>{n=!0,i.resolve(o);const c=B();r.push(async()=>{c.resolve(),await s}),await c}).catch(o=>{if(!n){i.reject(o);return}throw o});return i}function oe(t,e=new Set,r=[]){return t.forEach(i=>{if(!r.includes(i)){if(!i.isFn||!i.deps){r.push(i);return}if(e.has(i))throw new Error(`Circular fixture dependency detected: ${i.prop} <- ${[...e].reverse().map(n=>n.prop).join(" <- ")}`);e.add(i),oe(i.deps,e,r),r.push(i),e.clear()}}),r}function ie(t){let e=he(t.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(e)&&(e=e.split(/__async\((?:this|null),/)[1]);const r=e.match(/[^(]*\(([^)]*)/);if(!r)return[];const i=z(r[1]);if(!i.length)return[];let n=i[0];if("__VITEST_FIXTURE_INDEX__"in t&&(n=i[t.__VITEST_FIXTURE_INDEX__],!n))return[];if(!(n.startsWith("{")&&n.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${n}".`);const s=n.slice(1,-1).replace(/\s/g,""),o=z(s).map(u=>u.replace(/:.*|=.*/g,"")),c=o.at(-1);if(c&&c.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${c}".`);return o}function z(t){const e=[],r=[];let i=0;for(let s=0;s<t.length;s++)if(t[s]==="{"||t[s]==="[")r.push(t[s]==="{"?"}":"]");else if(t[s]===r[r.length-1])r.pop();else if(!r.length&&t[s]===","){const o=t.substring(i,s).trim();o&&e.push(o),i=s+1}const n=t.substring(i).trim();return n&&e.push(n),e}function se(t,e){function r(n){const s=function(...o){return e.apply(n,o)};Object.assign(s,e),s.withContext=()=>s.bind(n),s.setContext=(o,c)=>{n[o]=c},s.mergeContext=o=>{Object.assign(n,o)};for(const o of t)Object.defineProperty(s,o,{get(){return r({...n,[o]:!0})}});return s}const i=r({});return i.fn=e,i}const F=Re();U(function(t,e,r){N().test.fn.call(this,_(t),e,r)});let b,ce,Ae;function ae(t,e){if(!t)throw new Error(`Vitest failed to find ${e}. This is a bug in Vitest. Please, open an issue with reproduction.`)}function Se(){return Ae}function Fe(){return ae(b,"the runner"),b}function N(){const t=E.currentSuite||ce;return ae(t,"the current suite"),t}function je(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function A(t,e){let r={},i=()=>{};if(typeof e=="object"){if(typeof t=="object")throw new TypeError("Cannot use two objects as arguments. Please provide options and a function callback in that order.");console.warn("Using an object as a third argument is deprecated. Vitest 4 will throw an error if the third argument is not a timeout number. Please use the second argument for options. See more at https://vitest.dev/guide/migration"),r=e}else typeof e=="number"?r={timeout:e}:typeof t=="object"&&(r=t);if(typeof t=="function"){if(typeof e=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");i=t}else typeof e=="function"&&(i=e);return{options:r,handler:i}}function xe(t,e=()=>{},r,i,n,s){const o=[];let c;h();const u=function(v="",f={}){var g;const w=(f==null?void 0:f.timeout)??b.config.testTimeout,k={id:"",name:v,suite:(g=E.currentSuite)===null||g===void 0?void 0:g.suite,each:f.each,fails:f.fails,context:void 0,type:"test",file:void 0,timeout:w,retry:f.retry??b.config.retry,repeats:f.repeats,mode:f.only?"only":f.skip?"skip":f.todo?"todo":"run",meta:f.meta??Object.create(null),annotations:[]},j=f.handler;(f.concurrent||!f.sequential&&b.config.sequence.concurrent)&&(k.concurrent=!0),k.shuffle=n==null?void 0:n.shuffle;const x=Ue(k,b);Object.defineProperty(k,"context",{value:x,enumerable:!1}),we(x,f.fixtures);const ue=Error.stackTraceLimit;Error.stackTraceLimit=15;const K=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ue,j&&ye(k,V(Ie(_e(b,j,x),k),w,!1,K,(L,I)=>Ve([x],I))),b.config.includeTaskLocation){const L=K.stack,I=$e(L);I&&(k.location=I)}return o.push(k),k},a=U(function(v,f,g){let{options:w,handler:k}=A(f,g);typeof n=="object"&&(w=Object.assign({},n,w)),w.concurrent=this.concurrent||!this.sequential&&(w==null?void 0:w.concurrent),w.sequential=this.sequential||!this.concurrent&&(w==null?void 0:w.sequential);const j=u(_(v),{...this,...w,handler:k});j.type="test"});let l=s;const p={type:"collector",name:t,mode:r,suite:c,options:n,test:a,tasks:o,collect:y,task:u,clear:m,on:d,fixtures(){return l},scoped(v){const f=re(v,{fixtures:l},b);f.fixtures&&(l=f.fixtures)}};function d(v,...f){be(c)[v].push(...f)}function h(v){var f;typeof n=="number"&&(n={timeout:n}),c={id:"",type:"suite",name:t,suite:(f=E.currentSuite)===null||f===void 0?void 0:f.suite,mode:r,each:i,file:void 0,shuffle:n==null?void 0:n.shuffle,tasks:[],meta:Object.create(null),concurrent:n==null?void 0:n.concurrent},ke(c,je())}function m(){o.length=0,h()}async function y(v){if(!v)throw new TypeError("File is required to collect tasks.");e&&await Ne(p,()=>e(a));const f=[];for(const g of o)f.push(g.type==="collector"?await g.collect(v):g);return c.file=v,c.tasks=f,f.forEach(g=>{g.file=v}),c}return We(p),p}function Ie(t,e){return async(...r)=>{const i=await t(...r);if(e.promises){const s=(await Promise.allSettled(e.promises)).map(o=>o.status==="rejected"?o.reason:void 0).filter(Boolean);if(s.length)throw s}return i}}function Re(){function t(e,r,i){var n;const s=this.only?"only":this.skip?"skip":this.todo?"todo":"run",o=E.currentSuite||ce;let{options:c,handler:u}=A(r,i);const a=c.concurrent||this.concurrent||c.sequential===!1,l=c.sequential||this.sequential||c.concurrent===!1;c={...o==null?void 0:o.options,...c,shuffle:this.shuffle??c.shuffle??(o==null||(n=o.options)===null||n===void 0?void 0:n.shuffle)??void 0};const p=a||c.concurrent&&!l,d=l||c.sequential&&!a;return c.concurrent=p&&!d,c.sequential=d&&!p,xe(_(e),u,s,this.each,c,o==null?void 0:o.fixtures())}return t.each=function(e,...r){const i=this.withContext();return this.setContext("each",!0),Array.isArray(e)&&r.length&&(e=$(e,r)),(n,s,o)=>{const c=_(n),u=e.every(Array.isArray),{options:a,handler:l}=A(s,o),p=typeof s=="function"&&typeof o=="object";e.forEach((d,h)=>{const m=Array.isArray(d)?d:[d];p?u?i(C(c,m,h),()=>l(...m),a):i(C(c,m,h),()=>l(d),a):u?i(C(c,m,h),a,()=>l(...m)):i(C(c,m,h),a,()=>l(d))}),this.setContext("each",void 0)}},t.for=function(e,...r){return Array.isArray(e)&&r.length&&(e=$(e,r)),(i,n,s)=>{const o=_(i),{options:c,handler:u}=A(n,s);e.forEach((a,l)=>{F(C(o,ee(a),l),c,()=>u(a))})}},t.skipIf=e=>e?F.skip:F,t.runIf=e=>e?F:F.skip,se(["concurrent","sequential","shuffle","skip","only","todo"],t)}function Pe(t,e){const r=t;r.each=function(n,...s){const o=this.withContext();return this.setContext("each",!0),Array.isArray(n)&&s.length&&(n=$(n,s)),(c,u,a)=>{const l=_(c),p=n.every(Array.isArray),{options:d,handler:h}=A(u,a),m=typeof u=="function"&&typeof a=="object";n.forEach((y,v)=>{const f=Array.isArray(y)?y:[y];m?p?o(C(l,f,v),()=>h(...f),d):o(C(l,f,v),()=>h(y),d):p?o(C(l,f,v),d,()=>h(...f)):o(C(l,f,v),d,()=>h(y))}),this.setContext("each",void 0)}},r.for=function(n,...s){const o=this.withContext();return Array.isArray(n)&&s.length&&(n=$(n,s)),(c,u,a)=>{const l=_(c),{options:p,handler:d}=A(u,a);n.forEach((h,m)=>{const y=v=>d(h,v);y.__VITEST_FIXTURE_INDEX__=1,y.toString=()=>d.toString(),o(C(l,ee(h),m),p,y)})}},r.skipIf=function(n){return n?this.skip:this},r.runIf=function(n){return n?this:this.skip},r.scoped=function(n){N().scoped(n)},r.extend=function(n){const s=re(n,e||{},b),o=t;return U(function(c,u,a){const p=N().fixtures(),d={...this};p&&(d.fixtures=Ce(d.fixtures||[],p));const{handler:h,options:m}=A(u,a),y=m.timeout??void 0;o.call(d,_(c),h,y)},s)};const i=se(["concurrent","sequential","skip","only","todo","fails"],r);return e&&i.mergeContext(e),i}function U(t,e){return Pe(t,e)}function _(t){return typeof t=="string"?t:typeof t=="function"?t.name||"<anonymous>":String(t)}function C(t,e,r){(t.includes("%#")||t.includes("%$"))&&(t=t.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${r}`).replace(/%\$/g,`${r+1}`).replace(/__vitest_escaped_%__/g,"%%"));const i=t.split("%").length-1;t.includes("%f")&&(t.match(/%f/g)||[]).forEach((c,u)=>{if(de(e[u])||Object.is(e[u],-0)){let a=0;t=t.replace(/%f/g,l=>(a++,a===u+1?"-%f":l))}});let n=pe(t,...e.slice(0,i));const s=O(e[0]);return n=n.replace(/\$([$\w.]+)/g,(o,c)=>{const u=/^\d+$/.test(c);if(!s&&!u)return`$${c}`;const a=u?X(e,c):void 0,l=s?X(e[0],c,a):a;return ge(l,{truncate:void 0})}),n}function $(t,e){const r=t.join("").trim().replace(/ /g,"").split(`
|
|
2
2
|
`).map(n=>n.split("|"))[0],i=[];for(let n=0;n<Math.floor(e.length/r.length);n++){const s={};for(let o=0;o<r.length;o++)s[r[o]]=e[n*r.length+o];i.push(s)}return i}function $e(t){const e=Se(),r=t.split(`
|
|
3
|
-
`).slice(1);for(const i of r){const n=Z(i);if(n&&n.file===e)return{line:n.line,column:n.column}}}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;function Ze(t){const e=[t.name];let r=t;for(;r!=null&&r.suite;)r=r.suite,r!=null&&r.name&&e.unshift(r.name);return r!==t.file&&e.unshift(t.file.name),e}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;Q();const W=new Map,G=[],P=[];function qe(t){if(W.size){var e;const r=Array.from(W).map(([n,s])=>[n,s[0],s[1]]),i=(e=t.onTaskUpdate)===null||e===void 0?void 0:e.call(t,r,G);i&&(P.push(i),i.then(()=>P.splice(P.indexOf(i),1),()=>{})),G.length=0,W.clear()}}async function Me(t){qe(t),await Promise.all(P)}const Y=Date.now,E={currentSuite:null};function We(t){var e;(e=E.currentSuite)===null||e===void 0||e.tasks.push(t)}async function Ne(t,e){const r=E.currentSuite;E.currentSuite=t,await e(),E.currentSuite=r}function V(t,e,r=!1,i,n){if(e<=0||e===Number.POSITIVE_INFINITY)return t;const{setTimeout:s,clearTimeout:o}=Q();return function(...u){const a=Y(),l=Fe();return l._currentTaskStartTime=a,l._currentTaskTimeout=e,new Promise((p,d)=>{var h;const m=s(()=>{o(m),
|
|
3
|
+
`).slice(1);for(const i of r){const n=Z(i);if(n&&n.file===e)return{line:n.line,column:n.column}}}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;function Ze(t){const e=[t.name];let r=t;for(;r!=null&&r.suite;)r=r.suite,r!=null&&r.name&&e.unshift(r.name);return r!==t.file&&e.unshift(t.file.name),e}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;Q();const W=new Map,G=[],P=[];function qe(t){if(W.size){var e;const r=Array.from(W).map(([n,s])=>[n,s[0],s[1]]),i=(e=t.onTaskUpdate)===null||e===void 0?void 0:e.call(t,r,G);i&&(P.push(i),i.then(()=>P.splice(P.indexOf(i),1),()=>{})),G.length=0,W.clear()}}async function Me(t){qe(t),await Promise.all(P)}const Y=Date.now,E={currentSuite:null};function We(t){var e;(e=E.currentSuite)===null||e===void 0||e.tasks.push(t)}async function Ne(t,e){const r=E.currentSuite;E.currentSuite=t,await e(),E.currentSuite=r}function V(t,e,r=!1,i,n){if(e<=0||e===Number.POSITIVE_INFINITY)return t;const{setTimeout:s,clearTimeout:o}=Q();return function(...u){const a=Y(),l=Fe();return l._currentTaskStartTime=a,l._currentTaskTimeout=e,new Promise((p,d)=>{var h;const m=s(()=>{o(m),y()},e);(h=m.unref)===null||h===void 0||h.call(m);function y(){const g=Ke(r,e,i);n==null||n(u,g),d(g)}function v(g){if(l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,o(m),Y()-a>=e){y();return}p(g)}function f(g){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,o(m),d(g)}try{const g=t(...u);typeof g=="object"&&g!=null&&typeof g.then=="function"?g.then(v,f):v(g)}catch(g){f(g)}})}}const D=new WeakMap;function Ve([t],e){t&&De(t,e)}function De(t,e){const r=D.get(t);r==null||r.abort(e)}function Ue(t,e){var r;const i=function(){throw new Error("done() callback is deprecated, use promise instead")};let n=D.get(i);n||(n=new AbortController,D.set(i,n)),i.signal=n.signal,i.task=t,i.skip=(o,c)=>{if(o!==!1)throw t.result??(t.result={state:"skip"}),t.result.pending=!0,new me("test is skipped; abort execution",t,typeof o=="string"?o:c)};async function s(o,c,u,a){const l={message:o,type:u||"notice"};if(a){if(!a.body&&!a.path)throw new TypeError("Test attachment requires body or path to be set. Both are missing.");if(a.body&&a.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');l.attachment=a,a.body instanceof Uint8Array&&(a.body=Be(a.body))}if(c&&(l.location=c),!e.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Me(e);const p=await e.onTestAnnotate(t,l);return t.annotations.push(p),p}return i.annotate=(o,c,u)=>{if(t.result&&t.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${t.name}" finished running with the "${t.result.state}" state already.`);let a;const l=new Error("STACK_TRACE").stack,p=l.includes("STACK_TRACE")?2:1,d=l.split(`
|
|
4
4
|
`)[p],h=Z(d);return h&&(a={file:h.file,line:h.line,column:h.column}),typeof c=="object"?J(t,s(o,a,void 0,c)):J(t,s(o,a,c,u))},i.onTestFailed=(o,c)=>{t.onFailed||(t.onFailed=[]),t.onFailed.push(V(o,c??e.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(u,a)=>n.abort(a)))},i.onTestFinished=(o,c)=>{t.onFinished||(t.onFinished=[]),t.onFinished.push(V(o,c??e.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(u,a)=>n.abort(a)))},((r=e.extendTaskContext)===null||r===void 0?void 0:r.call(e,i))||i}function Ke(t,e,r){const i=`${t?"Hook":"Test"} timed out in ${e}ms.
|
|
5
|
-
If this is a long-running ${t?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${t?"hookTimeout":"testTimeout"}".`,n=new Error(i);return r!=null&&r.stack&&(n.stack=r.stack.replace(n.message,r.message)),n}const Le=new WeakMap;function Xe(t){const e=Le.get(t);if(!e)throw new Error(`Cannot find file context for ${t.name}`);return e}const T=[];for(let t=65;t<91;t++)T.push(String.fromCharCode(t));for(let t=97;t<123;t++)T.push(String.fromCharCode(t));for(let t=0;t<10;t++)T.push(t.toString(10));function Be(t){let e="";const r=t.byteLength;for(let i=0;i<r;i+=3)if(r===i+1){const n=(t[i]&252)>>2,s=(t[i]&3)<<4;e+=T[n],e+=T[s],e+="=="}else if(r===i+2){const n=(t[i]&252)>>2,s=(t[i]&3)<<4|(t[i+1]&240)>>4,o=(t[i+1]&15)<<2;e+=T[n],e+=T[s],e+=T[o],e+="="}else{const n=(t[i]&252)>>2,s=(t[i]&3)<<4|(t[i+1]&240)>>4,o=(t[i+1]&15)<<2|(t[i+2]&192)>>6,c=t[i+2]&63;e+=T[n],e+=T[s],e+=T[o],e+=T[c]}return e}function J(t,e){return e=e.finally(()=>{if(!t.promises)return;const r=t.promises.indexOf(e);r!==-1&&t.promises.splice(r,1)}),t.promises||(t.promises=[]),t.promises.push(e),e}export{Ze as E,be as f,ke as h,Pe as j,N as l,F as n,se as r,
|
|
5
|
+
If this is a long-running ${t?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${t?"hookTimeout":"testTimeout"}".`,n=new Error(i);return r!=null&&r.stack&&(n.stack=r.stack.replace(n.message,r.message)),n}const Le=new WeakMap;function Xe(t){const e=Le.get(t);if(!e)throw new Error(`Cannot find file context for ${t.name}`);return e}const T=[];for(let t=65;t<91;t++)T.push(String.fromCharCode(t));for(let t=97;t<123;t++)T.push(String.fromCharCode(t));for(let t=0;t<10;t++)T.push(t.toString(10));function Be(t){let e="";const r=t.byteLength;for(let i=0;i<r;i+=3)if(r===i+1){const n=(t[i]&252)>>2,s=(t[i]&3)<<4;e+=T[n],e+=T[s],e+="=="}else if(r===i+2){const n=(t[i]&252)>>2,s=(t[i]&3)<<4|(t[i+1]&240)>>4,o=(t[i+1]&15)<<2;e+=T[n],e+=T[s],e+=T[o],e+="="}else{const n=(t[i]&252)>>2,s=(t[i]&3)<<4|(t[i+1]&240)>>4,o=(t[i+1]&15)<<2|(t[i+2]&192)>>6,c=t[i+2]&63;e+=T[n],e+=T[s],e+=T[o],e+=T[c]}return e}function J(t,e){return e=e.finally(()=>{if(!t.promises)return;const r=t.promises.indexOf(e);r!==-1&&t.promises.splice(r,1)}),t.promises||(t.promises=[]),t.promises.push(e),e}export{Ze as E,be as f,ke as h,Pe as j,N as l,F as n,se as r,ye as s};
|
package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.js","_virtual/sourcemap-codec.umd.js","node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js","_virtual/sourcemap-codec.umd2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var $e=Object.defineProperty;var ke=(t,e,n)=>e in t?$e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var y=(t,e,n)=>ke(t,typeof e!="symbol"?e+"":e,n);import{__vitePreload as Ne}from"../../../../../../../_virtual/preload-helper.js";import{format as Pe,plugins as Re}from"../../../../../@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js";import{r as Ce}from"../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js";const Te=44,ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Oe=new Uint8Array(64),ge=new Uint8Array(128);for(let t=0;t<ee.length;t++){const e=ee.charCodeAt(t);Oe[t]=e,ge[e]=t}function F(t,e){let n=0,s=0,i=0;do{const a=t.next();i=ge[a],n|=(i&31)<<s,s+=5}while(i&32);const r=n&1;return n>>>=1,r&&(n=-2147483648|-n),e+n}function te(t,e){return t.pos>=e?!1:t.peek()!==Te}class Ae{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:n,pos:s}=this,i=n.indexOf(e,s);return i===-1?n.length:i}}function Me(t){const{length:e}=t,n=new Ae(t),s=[];let i=0,r=0,a=0,l=0,o=0;do{const c=n.indexOf(";"),d=[];let p=!0,u=0;for(i=0;n.pos<c;){let S;i=F(n,i),i<u&&(p=!1),u=i,te(n,c)?(r=F(n,r),a=F(n,a),l=F(n,l),te(n,c)?(o=F(n,o),S=[i,r,a,l,o]):S=[i,r,a,l]):S=[i],d.push(S),n.pos++}p||Fe(d),s.push(d),n.pos=c+1}while(n.pos<=e);return s}function Fe(t){t.sort(Le)}function Le(t,e){return t[0]-e[0]}const Be=/^[\w+.-]+:\/\//,De=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Je=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var v;(function(t){t[t.Empty=1]="Empty",t[t.Hash=2]="Hash",t[t.Query=3]="Query",t[t.RelativePath=4]="RelativePath",t[t.AbsolutePath=5]="AbsolutePath",t[t.SchemeRelative=6]="SchemeRelative",t[t.Absolute=7]="Absolute"})(v||(v={}));function Xe(t){return Be.test(t)}function je(t){return t.startsWith("//")}function Se(t){return t.startsWith("/")}function We(t){return t.startsWith("file:")}function ne(t){return/^[.?#]/.test(t)}function B(t){const e=De.exec(t);return _e(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}function Ke(t){const e=Je.exec(t),n=e[2];return _e("file:","",e[1]||"","",Se(n)?n:"/"+n,e[3]||"",e[4]||"")}function _e(t,e,n,s,i,r,a){return{scheme:t,user:e,host:n,port:s,path:i,query:r,hash:a,type:v.Absolute}}function se(t){if(je(t)){const n=B("http:"+t);return n.scheme="",n.type=v.SchemeRelative,n}if(Se(t)){const n=B("http://foo.com"+t);return n.scheme="",n.host="",n.type=v.AbsolutePath,n}if(We(t))return Ke(t);if(Xe(t))return B(t);const e=B("http://foo.com/"+t);return e.scheme="",e.host="",e.type=t?t.startsWith("?")?v.Query:t.startsWith("#")?v.Hash:v.RelativePath:v.Empty,e}function Ue(t){if(t.endsWith("/.."))return t;const e=t.lastIndexOf("/");return t.slice(0,e+1)}function qe(t,e){ye(e,e.type),t.path==="/"?t.path=e.path:t.path=Ue(e.path)+t.path}function ye(t,e){const n=e<=v.RelativePath,s=t.path.split("/");let i=1,r=0,a=!1;for(let o=1;o<s.length;o++){const c=s[o];if(!c){a=!0;continue}if(a=!1,c!=="."){if(c===".."){r?(a=!0,r--,i--):n&&(s[i++]=c);continue}s[i++]=c,r++}}let l="";for(let o=1;o<i;o++)l+="/"+s[o];(!l||a&&!l.endsWith("/.."))&&(l+="/"),t.path=l}function ze(t,e){if(!t&&!e)return"";const n=se(t);let s=n.type;if(e&&s!==v.Absolute){const r=se(e),a=r.type;switch(s){case v.Empty:n.hash=r.hash;case v.Hash:n.query=r.query;case v.Query:case v.RelativePath:qe(n,r);case v.AbsolutePath:n.user=r.user,n.host=r.host,n.port=r.port;case v.SchemeRelative:n.scheme=r.scheme}a>s&&(s=a)}ye(n,s);const i=n.query+n.hash;switch(s){case v.Hash:case v.Query:return i;case v.RelativePath:{const r=n.path.slice(1);return r?ne(e||t)&&!ne(r)?"./"+r+i:r+i:i||"."}case v.AbsolutePath:return n.path+i;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+i}}function ie(t,e){return e&&!e.endsWith("/")&&(e+="/"),ze(t,e)}function He(t){if(!t)return"";const e=t.lastIndexOf("/");return t.slice(0,e+1)}const C=0,Ge=1,Ve=2,Qe=3,Ze=4;function Ye(t,e){const n=re(t,0);if(n===t.length)return t;e||(t=t.slice());for(let s=n;s<t.length;s=re(t,s+1))t[s]=tt(t[s],e);return t}function re(t,e){for(let n=e;n<t.length;n++)if(!et(t[n]))return n;return t.length}function et(t){for(let e=1;e<t.length;e++)if(t[e][C]<t[e-1][C])return!1;return!0}function tt(t,e){return e||(t=t.slice()),t.sort(nt)}function nt(t,e){return t[C]-e[C]}let X=!1;function st(t,e,n,s){for(;n<=s;){const i=n+(s-n>>1),r=t[i][C]-e;if(r===0)return X=!0,i;r<0?n=i+1:s=i-1}return X=!1,n-1}function it(t,e,n){for(let s=n+1;s<t.length&&t[s][C]===e;n=s++);return n}function rt(t,e,n){for(let s=n-1;s>=0&&t[s][C]===e;n=s--);return n}function at(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function ot(t,e,n,s){const{lastKey:i,lastNeedle:r,lastIndex:a}=n;let l=0,o=t.length-1;if(s===i){if(e===r)return X=a!==-1&&t[a][C]===e,a;e>=r?l=a===-1?0:a:o=a}return n.lastKey=s,n.lastNeedle=e,n.lastIndex=st(t,e,l,o)}const lt="`line` must be greater than 0 (lines start at line 1)",ct="`column` must be greater than or equal to 0 (columns start at column 0)",ae=-1,ut=1;class ht{constructor(e,n){const s=typeof e=="string";if(!s&&e._decodedMemo)return e;const i=s?JSON.parse(e):e,{version:r,file:a,names:l,sourceRoot:o,sources:c,sourcesContent:d}=i;this.version=r,this.file=a,this.names=l||[],this.sourceRoot=o,this.sources=c,this.sourcesContent=d,this.ignoreList=i.ignoreList||i.x_google_ignoreList||void 0;const p=ie(o||"",He(n));this.resolvedSources=c.map(S=>ie(S||"",p));const{mappings:u}=i;typeof u=="string"?(this._encoded=u,this._decoded=void 0):(this._encoded=void 0,this._decoded=Ye(u,s)),this._decodedMemo=at(),this._bySources=void 0,this._bySourceMemos=void 0}}function dt(t){var e;return(e=t)._decoded||(e._decoded=Me(t._encoded))}function ft(t,e){let{line:n,column:s,bias:i}=e;if(n--,n<0)throw new Error(lt);if(s<0)throw new Error(ct);const r=dt(t);if(n>=r.length)return D(null,null,null,null);const a=r[n],l=pt(a,t._decodedMemo,n,s,i||ut);if(l===-1)return D(null,null,null,null);const o=a[l];if(o.length===1)return D(null,null,null,null);const{names:c,resolvedSources:d}=t;return D(d[o[Ge]],o[Ve]+1,o[Qe],o.length===5?c[o[Ze]]:null)}function D(t,e,n,s){return{source:t,line:e,column:n,name:s}}function pt(t,e,n,s,i){let r=ot(t,s,e,n);return X?r=(i===ae?it:rt)(t,s,r):i===ae&&r++,r===-1||r===t.length?-1:r}function ve(t){return t!=null}function mt(t){return t===null||typeof t!="function"&&typeof t!="object"}function J(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}function gt(t){let e=-1,n=null,s=0,i=0,r=null;for(;e<=t.length;){r=t[e],e++;const a=t[e];if((a==='"'||a==="'"||a==="`")&&r!=="\\"&&(n===a?n=null:n||(n=a)),n||(a==="("&&s++,a===")"&&i++),s&&i&&s===i)return e}return null}const xe=/^\s*at .*(?:\S:\d+|\(native\))/m,St=/^(?:eval@)?(?:\[native code\])?$/,_t=["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/chunk-","/deps/@vitest","/deps/loupe","/deps/chai",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,/\/deps\/vitest_/];function we(t){if(!t.includes(":"))return[t];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/^\(|\)$/g,""));if(!n)return[t];let s=n[1];if(s.startsWith("async ")&&(s=s.slice(6)),s.startsWith("http:")||s.startsWith("https:")){const i=new URL(s);i.searchParams.delete("import"),i.searchParams.delete("browserv"),s=i.pathname+i.hash+i.search}if(s.startsWith("/@fs/")){const i=/^\/@fs\/[a-zA-Z]:\//.test(s);s=s.slice(i?5:4)}return[s,n[2]||void 0,n[3]||void 0]}function yt(t){let e=t.trim();if(St.test(e)||(e.includes(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!e.includes("@")&&!e.includes(":")))return null;const n=/((.*".+"[^@]*)?[^@]*)(@)/,s=e.match(n),i=s&&s[1]?s[1]:void 0,[r,a,l]=we(e.replace(n,""));return!r||!a||!l?null:{file:r,method:i||"",line:Number.parseInt(a),column:Number.parseInt(l)}}function vt(t){let e=t.trim();if(!xe.test(e))return null;e.includes("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const s=n.match(/ (\(.+\)$)/);n=s?n.replace(s[0],""):n;const[i,r,a]=we(s?s[1]:n);let l=s&&n||"",o=i&&["eval","<anonymous>"].includes(i)?void 0:i;return!o||!r||!a?null:(l.startsWith("async ")&&(l=l.slice(6)),o.startsWith("file://")&&(o=o.slice(7)),o=o.startsWith("node:")||o.startsWith("internal:")?o:Ce(o),l&&(l=l.replace(/__vite_ssr_import_\d+__\./g,"")),{method:l,file:o,line:Number.parseInt(r),column:Number.parseInt(a)})}function j(t,e={}){const{ignoreStackEntries:n=_t}=e;return(xe.test(t)?wt(t):xt(t)).map(i=>{var r;e.getUrlId&&(i.file=e.getUrlId(i.file));const a=(r=e.getSourceMap)===null||r===void 0?void 0:r.call(e,i.file);if(!a||typeof a!="object"||!a.version)return oe(n,i.file)?null:i;const l=new ht(a),{line:o,column:c,source:d,name:p}=ft(l,i);let u=i.file;if(d){const S=i.file.startsWith("file://")?i.file:`file://${i.file}`,I=a.sourceRoot?new URL(a.sourceRoot,S):S;u=new URL(d,I).pathname,u.match(/\/\w:\//)&&(u=u.slice(1))}return oe(n,u)?null:o!=null&&c!=null?{line:o,column:c,file:u,method:p||i.method}:i}).filter(i=>i!=null)}function oe(t,e){return t.some(n=>e.match(n))}function xt(t){return t.split(`
|
|
3
|
+
`).map(e=>yt(e)).filter(ve)}function wt(t){return t.split(`
|
|
4
|
+
`).map(e=>vt(e)).filter(ve)}function It(t,e={}){if(!t||mt(t))return[];if(t.stacks)return t.stacks;const n=t.stack||"";let s=typeof n=="string"?j(n,e):[];if(!s.length){const i=t;i.fileName!=null&&i.lineNumber!=null&&i.columnNumber!=null&&(s=j(`${i.fileName}:${i.lineNumber}:${i.columnNumber}`,e)),i.sourceURL!=null&&i.line!=null&&i._column!=null&&(s=j(`${i.sourceURL}:${i.line}:${i.column}`,e))}return e.frameFilter&&(s=s.filter(i=>e.frameFilter(t,i)!==!1)),t.stacks=s,s}let Et=()=>"Promise{…}";try{const{getPromiseDetails:t,kPending:e,kRejected:n}=process.binding("util");Array.isArray(t(Promise.resolve()))&&(Et=(s,i)=>{const[r,a]=t(s);return r===e?"Promise{<pending>}":`Promise${r===n?"!":""}{${i.inspect(a,i)}}`})}catch{}function bt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var W,le;function $t(){if(le)return W;le=1;var t,e,n,s,i,r,a,l,o,c,d,p,u,S,I,b,$,E,k;return u=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,p=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,t=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,I=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,d=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,b=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,k=/[\t\v\f\ufeff\p{Zs}]+/yu,l=/\r?\n|[\r\u2028\u2029]/y,o=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,S=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,e=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,s=/(['"])(?:(?!\1)[^])*(\1)?/y,i=/[^<>{}]+/y,E=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,$=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,r=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,a=/^(?:return|throw|yield)$/,c=RegExp(l.source),W=function*(_,{jsx:T=!1}={}){var w,P,O,f,m,Z,h,R,Y,N,A,g,M,x;for({length:Z}=_,f=0,m="",x=[{tag:"JS"}],w=[],A=0,g=!1;f<Z;){switch(R=x[x.length-1],R.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(_[f]==="/"&&(E.test(m)||r.test(m))&&(u.lastIndex=f,h=u.exec(_))){f=u.lastIndex,m=h[0],g=!0,yield{type:"RegularExpressionLiteral",value:h[0],closed:h[1]!==void 0&&h[1]!=="\\"};continue}if(p.lastIndex=f,h=p.exec(_)){switch(M=h[0],Y=p.lastIndex,N=M,M){case"(":m==="?NonExpressionParenKeyword"&&x.push({tag:"JSNonExpressionParen",nesting:A}),A++,g=!1;break;case")":A--,g=!0,R.tag==="JSNonExpressionParen"&&A===R.nesting&&(x.pop(),N="?NonExpressionParenEnd",g=!1);break;case"{":p.lastIndex=0,O=!$.test(m)&&(E.test(m)||r.test(m)),w.push(O),g=!1;break;case"}":switch(R.tag){case"InterpolationInTemplate":if(w.length===R.nesting){b.lastIndex=f,h=b.exec(_),f=b.lastIndex,m=h[0],h[1]==="${"?(m="?InterpolationInTemplate",g=!1,yield{type:"TemplateMiddle",value:h[0]}):(x.pop(),g=!0,yield{type:"TemplateTail",value:h[0],closed:h[1]==="`"});continue}break;case"InterpolationInJSX":if(w.length===R.nesting){x.pop(),f+=1,m="}",yield{type:"JSXPunctuator",value:"}"};continue}}g=w.pop(),N=g?"?ExpressionBraceEnd":"}";break;case"]":g=!0;break;case"++":case"--":N=g?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(T&&(E.test(m)||r.test(m))){x.push({tag:"JSXTag"}),f+=1,m="<",yield{type:"JSXPunctuator",value:M};continue}g=!1;break;default:g=!1}f=Y,m=N,yield{type:"Punctuator",value:M};continue}if(t.lastIndex=f,h=t.exec(_)){switch(f=t.lastIndex,N=h[0],h[0]){case"for":case"if":case"while":case"with":m!=="."&&m!=="?."&&(N="?NonExpressionParenKeyword")}m=N,g=!r.test(h[0]),yield{type:h[1]==="#"?"PrivateIdentifier":"IdentifierName",value:h[0]};continue}if(I.lastIndex=f,h=I.exec(_)){f=I.lastIndex,m=h[0],g=!0,yield{type:"StringLiteral",value:h[0],closed:h[2]!==void 0};continue}if(d.lastIndex=f,h=d.exec(_)){f=d.lastIndex,m=h[0],g=!0,yield{type:"NumericLiteral",value:h[0]};continue}if(b.lastIndex=f,h=b.exec(_)){f=b.lastIndex,m=h[0],h[1]==="${"?(m="?InterpolationInTemplate",x.push({tag:"InterpolationInTemplate",nesting:w.length}),g=!1,yield{type:"TemplateHead",value:h[0]}):(g=!0,yield{type:"NoSubstitutionTemplate",value:h[0],closed:h[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(n.lastIndex=f,h=n.exec(_)){switch(f=n.lastIndex,N=h[0],h[0]){case"<":x.push({tag:"JSXTag"});break;case">":x.pop(),m==="/"||R.tag==="JSXTagEnd"?(N="?JSX",g=!0):x.push({tag:"JSXChildren"});break;case"{":x.push({tag:"InterpolationInJSX",nesting:w.length}),N="?InterpolationInJSX",g=!1;break;case"/":m==="<"&&(x.pop(),x[x.length-1].tag==="JSXChildren"&&x.pop(),x.push({tag:"JSXTagEnd"}))}m=N,yield{type:"JSXPunctuator",value:h[0]};continue}if(e.lastIndex=f,h=e.exec(_)){f=e.lastIndex,m=h[0],yield{type:"JSXIdentifier",value:h[0]};continue}if(s.lastIndex=f,h=s.exec(_)){f=s.lastIndex,m=h[0],yield{type:"JSXString",value:h[0],closed:h[2]!==void 0};continue}break;case"JSXChildren":if(i.lastIndex=f,h=i.exec(_)){f=i.lastIndex,m=h[0],yield{type:"JSXText",value:h[0]};continue}switch(_[f]){case"<":x.push({tag:"JSXTag"}),f++,m="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":x.push({tag:"InterpolationInJSX",nesting:w.length}),f++,m="?InterpolationInJSX",g=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(k.lastIndex=f,h=k.exec(_)){f=k.lastIndex,yield{type:"WhiteSpace",value:h[0]};continue}if(l.lastIndex=f,h=l.exec(_)){f=l.lastIndex,g=!1,a.test(m)&&(m="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:h[0]};continue}if(o.lastIndex=f,h=o.exec(_)){f=o.lastIndex,c.test(h[0])&&(g=!1,a.test(m)&&(m="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:h[0],closed:h[1]!==void 0};continue}if(S.lastIndex=f,h=S.exec(_)){f=S.lastIndex,g=!1,yield{type:"SingleLineComment",value:h[0]};continue}P=String.fromCodePoint(_.codePointAt(f)),f+=P.length,m=P,g=!1,yield{type:R.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:P}}},W}$t();var Ie={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(Ie.keyword);new Set(Ie.strict);var kt={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[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],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},Nt=Object.entries(kt);function z(t){return String(t)}z.open="";z.close="";function Pt(t=!1){let e=typeof process<"u"?process:void 0,n=(e==null?void 0:e.env)||{},s=(e==null?void 0:e.argv)||[];return!("NO_COLOR"in n||s.includes("--no-color"))&&("FORCE_COLOR"in n||s.includes("--color")||(e==null?void 0:e.platform)==="win32"||t&&n.TERM!=="dumb"||"CI"in n)||typeof window<"u"&&!!window.chrome}function Rt(t=!1){let e=Pt(t),n=(a,l,o,c)=>{let d="",p=0;do d+=a.substring(p,c)+o,p=c+l.length,c=a.indexOf(l,p);while(~c);return d+a.substring(p)},s=(a,l,o=a)=>{let c=d=>{let p=String(d),u=p.indexOf(l,a.length);return~u?a+n(p,l,o,u)+l:a+p+l};return c.open=a,c.close=l,c},i={isColorSupported:e},r=a=>`\x1B[${a}m`;for(let[a,l]of Nt)i[a]=e?s(r(l[0]),r(l[1]),l[2]):z;return i}Rt();const H=/\r?\n/;function Ct(t,e,n){const s=t.split(H),i=/\r\n/.test(t)?2:1;let r=0;if(e>s.length)return t.length;for(let a=0;a<e-1;a++)r+=s[a].length+i;return r+n}function Tt(t,e){if(e>t.length)throw new Error(`offset is longer than source length! offset ${e} > length ${t.length}`);const n=t.split(H),s=/\r\n/.test(t)?2:1;let i=0,r=0;for(;r<n.length;r++){const a=n[r].length+s;if(i+a>=e)break;i+=a}return r+1}async function Ot(t,e){const n=(await Ne(async()=>{const{default:i}=await import("../../../../../magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.js");return{default:i}},__vite__mapDeps([0,1,2,3]))).default,s=new Set(e.map(i=>i.file));await Promise.all(Array.from(s).map(async i=>{const r=e.filter(c=>c.file===i),a=await t.readSnapshotFile(i),l=new n(a);for(const c of r){const d=Ct(a,c.line,c.column);Dt(a,l,d,c.snapshot)}const o=l.toString();o!==a&&await t.saveSnapshotFile(i,o)}))}const At=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Mt(t,e,n,s){let i=t.slice(n);const r=At.exec(i);if(!r)return!1;i=i.slice(r.index);let a=gt(i);if(a===null)return!1;a+=n+r.index;const l=n+r.index+r[0].length,o=Ft(t,l),c=`, ${Ee(s,t,n)}`;return o===a?e.appendLeft(a,c):e.overwrite(o,a,c),!0}function Ft(t,e){let n=1,s=0;for(;n!==s&&e<t.length;){const i=t[e++];i==="{"?n++:i==="}"&&s++}return e}function Ee(t,e,n){const s=Tt(e,n),r=e.split(H)[s-1].match(/^\s*/)[0]||"",a=r.includes(" ")?`${r} `:`${r} `,l=t.trim().replace(/\\/g,"\\\\").split(/\n/g),o=l.length<=1,c="`";return o?`${c}${l.join(`
|
|
5
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${c}`:`${c}
|
|
6
|
+
${l.map(d=>d?a+d:"").join(`
|
|
7
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
8
|
+
${r}${c}`}const ce="toMatchInlineSnapshot",ue="toThrowErrorMatchingInlineSnapshot";function Lt(t,e){const n=e-ce.length;if(t.slice(n,e)===ce)return{code:t.slice(n),index:n};const s=e-ue.length;return t.slice(e-s,e)===ue?{code:t.slice(e-s),index:e-s}:{code:t.slice(e),index:e}}const Bt=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;function Dt(t,e,n,s){const{code:i,index:r}=Lt(t,n),a=Bt.exec(i),l=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(i);if(!a||a.index!==(l==null?void 0:l.index))return Mt(t,e,r,s);const o=a[1],c=r+a.index+a[0].length,d=Ee(s,t,r);if(o===")")return e.appendRight(c-1,d),!0;const u=new RegExp(`(?:^|[^\\\\])${o}`).exec(t.slice(c));if(!u)return!1;const S=c+u.index+u[0].length;return e.overwrite(c-1,S,d),!0}const Jt=/^([^\S\n]*)\S/m;function mn(t){const e=t.match(Jt);if(!e||!e[1])return t;const n=e[1],s=t.split(/\n/g);if(s.length<=2||s[0].trim()!==""||s[s.length-1].trim()!=="")return t;for(let i=1;i<s.length-1;i++)if(s[i]!==""){if(s[i].indexOf(n)!==0)return t;s[i]=s[i].substring(n.length)}return s[s.length-1]="",t=s.join(`
|
|
9
|
+
`),t}async function Xt(t,e){await Promise.all(e.map(async n=>{n.readonly||await t.saveSnapshotFile(n.file,n.snapshot)}))}var K={exports:{}},he;function jt(){if(he)return K.exports;he=1;/*
|
|
10
|
+
* @version 1.4.0
|
|
11
|
+
* @date 2015-10-26
|
|
12
|
+
* @stability 3 - Stable
|
|
13
|
+
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
14
|
+
* @license MIT License
|
|
15
|
+
*/var t=function(e,n){var s,i,r=1,a=0,l=0,o=String.alphabet;function c(d,p,u){if(u){for(s=p;u=c(d,s),u<76&&u>65;)++s;return+d.slice(p-1,s)}return u=o&&o.indexOf(d.charAt(p)),u>-1?u+76:(u=d.charCodeAt(p)||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+="")!=(n+="")){for(;r;)if(i=c(e,a++),r=c(n,l++),i<76&&r<76&&i>66&&r>66&&(i=c(e,a,a),r=c(n,l,a=s),l=s),i!=r)return i<r?-1:1}return 0};try{K.exports=t}catch{String.naturalCompare=t}return K.exports}var Wt=jt(),Kt=bt(Wt);const Ut=(t,e,n,s,i,r)=>{const a=t.getMockName(),l=a==="vi.fn()"?"":` ${a}`;let o="";if(t.mock.calls.length!==0){const c=n+e.indent;o=` {${e.spacingOuter}${c}"calls": ${r(t.mock.calls,e,c,s,i)}${e.min?", ":","}${e.spacingOuter}${c}"results": ${r(t.mock.results,e,c,s,i)}${e.min?"":","}${e.spacingOuter}${n}}`}return`[MockFunction${l}]${o}`},qt=t=>t&&!!t._isMockFunction,zt={serialize:Ut,test:qt},{DOMCollection:Ht,DOMElement:Gt,Immutable:Vt,ReactElement:Qt,ReactTestComponent:Zt,AsymmetricMatcher:Yt}=Re;let U=[Zt,Qt,Gt,Ht,Vt,Yt,zt];function gn(t){U=[t].concat(U)}function en(){return U}function tn(t,e){return`${t} ${e}`}function nn(t){if(!/ \d+$/.test(t))throw new Error("Snapshot keys must end with a number.");return t.replace(/ \d+$/,"")}function sn(t,e){const n=e.updateSnapshot,s=Object.create(null);let i="",r=!1;if(t!=null)try{i=t,new Function("exports",i)(s)}catch{}return(n==="all"||n==="new")&&i&&(r=!0),{data:s,dirty:r}}function rn(t){return t.includes(`
|
|
16
|
+
`)?`
|
|
17
|
+
${t}
|
|
18
|
+
`:t}function de(t){return t.length>2&&t.startsWith(`
|
|
19
|
+
`)&&t.endsWith(`
|
|
20
|
+
`)?t.slice(1,-1):t}const an=!0,on=!1;function ln(t,e=2,n={}){return G(Pe(t,{escapeRegex:an,indent:e,plugins:en(),printFunctionName:on,...n}))}function cn(t){return t.replace(/`|\\|\$\{/g,"\\$&")}function fe(t){return`\`${cn(t)}\``}function G(t){return t.replace(/\r\n|\r/g,`
|
|
21
|
+
`)}async function un(t,e,n){const s=Object.keys(e).sort(Kt).map(l=>`exports[${fe(l)}] = ${fe(G(e[l]))};`),i=`${t.getHeader()}
|
|
22
|
+
|
|
23
|
+
${s.join(`
|
|
24
|
+
|
|
25
|
+
`)}
|
|
26
|
+
`,r=await t.readSnapshotFile(n);r!=null&&r===i||await t.saveSnapshotFile(n,i)}function q(t=[],e=[]){const n=Array.from(t);return e.forEach((s,i)=>{const r=n[i];Array.isArray(t[i])?n[i]=q(t[i],s):J(r)?n[i]=V(t[i],s):n[i]=s}),n}function V(t,e){if(J(t)&&J(e)){const n={...t};return Object.keys(e).forEach(s=>{J(e[s])&&!e[s].$$typeof?s in t?n[s]=V(t[s],e[s]):Object.assign(n,{[s]:e[s]}):Array.isArray(e[s])?n[s]=q(t[s],e[s]):Object.assign(n,{[s]:e[s]})}),n}else if(Array.isArray(t)&&Array.isArray(e))return q(t,e);return t}class be extends Map{constructor(e,n){super(n),this.defaultFn=e}get(e){return this.has(e)||this.set(e,this.defaultFn(e)),super.get(e)}}class L extends be{constructor(){super(()=>0);y(this,"_total")}valueOf(){return this._total=this.total()}increment(n){typeof this._total<"u"&&this._total++,this.set(n,this.get(n)+1)}total(){if(typeof this._total<"u")return this._total;let n=0;for(const s of this.values())n+=s;return n}}function pe(t,e){return t.file===e.file&&t.column===e.column&&t.line===e.line}class Q{constructor(e,n,s,i){y(this,"_counters",new L);y(this,"_dirty");y(this,"_updateSnapshot");y(this,"_snapshotData");y(this,"_initialData");y(this,"_inlineSnapshots");y(this,"_inlineSnapshotStacks");y(this,"_testIdToKeys",new be(()=>[]));y(this,"_rawSnapshots");y(this,"_uncheckedKeys");y(this,"_snapshotFormat");y(this,"_environment");y(this,"_fileExists");y(this,"expand");y(this,"_added",new L);y(this,"_matched",new L);y(this,"_unmatched",new L);y(this,"_updated",new L);this.testFilePath=e,this.snapshotPath=n;const{data:r,dirty:a}=sn(s,i);this._fileExists=s!=null,this._initialData={...r},this._snapshotData={...r},this._dirty=a,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=i.expand||!1,this._updateSnapshot=i.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,...i.snapshotFormat},this._environment=i.snapshotEnvironment}get added(){return this._added}set added(e){this._added._total=e}get matched(){return this._matched}set matched(e){this._matched._total=e}get unmatched(){return this._unmatched}set unmatched(e){this._unmatched._total=e}get updated(){return this._updated}set updated(e){this._updated._total=e}static async create(e,n){const s=await n.snapshotEnvironment.resolvePath(e),i=await n.snapshotEnvironment.readSnapshotFile(s);return new Q(e,s,i,n)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(e){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(e.length))&&this._uncheckedKeys.delete(n)})}clearTest(e){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==e),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==e);for(const n of this._testIdToKeys.get(e)){const s=nn(n),i=this._counters.get(s);i>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(s,i-1))}this._testIdToKeys.delete(e),this.added.delete(e),this.updated.delete(e),this.matched.delete(e),this.unmatched.delete(e)}_inferInlineSnapshotStack(e){const n=e.findIndex(i=>i.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return e[n+3];const s=e.findIndex(i=>i.method.includes("__INLINE_SNAPSHOT__"));return s!==-1?e[s+2]:null}_addSnapshot(e,n,s){this._dirty=!0,s.stack?this._inlineSnapshots.push({snapshot:n,testId:s.testId,...s.stack}):s.rawSnapshot?this._rawSnapshots.push({...s.rawSnapshot,snapshot:n}):this._snapshotData[e]=n}async save(){const e=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,s=this._rawSnapshots.length,i=!e&&!n&&!s,r={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!i?(e&&(await un(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await Ot(this._environment,this._inlineSnapshots),s&&await Xt(this._environment,this._rawSnapshots),r.saved=!0):!e&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),r.deleted=!0),r}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(e=>delete this._snapshotData[e]),this._uncheckedKeys.clear())}match({testId:e,testName:n,received:s,key:i,inlineSnapshot:r,isInline:a,error:l,rawSnapshot:o}){this._counters.increment(n);const c=this._counters.get(n);i||(i=tn(n,c)),this._testIdToKeys.get(e).push(i),a&&this._snapshotData[i]!==void 0||this._uncheckedKeys.delete(i);let d=o&&typeof s=="string"?s:ln(s,void 0,this._snapshotFormat);o||(d=rn(d)),o&&o.content&&o.content.match(/\r\n/)&&!d.match(/\r\n/)&&(o.content=G(o.content));const p=a?r:o?o.content:this._snapshotData[i],u=o?p:p==null?void 0:p.trim(),S=u===(o?d:d.trim()),I=p!==void 0,b=a||this._fileExists||o&&o.content!=null;S&&!a&&!o&&(this._snapshotData[i]=d);let $;if(a){var E,k;const _=It(l||new Error("snapshot"),{ignoreStackEntries:[]}),T=this._inferInlineSnapshotStack(_);if(!T)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
27
|
+
${JSON.stringify(_)}`);$=((E=(k=this.environment).processStackTrace)===null||E===void 0?void 0:E.call(k,T))||T,$.column--;const w=this._inlineSnapshotStacks.filter(P=>pe(P,$));if(w.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(O=>!pe(O,$));const P=w.find(O=>O.snapshot!==d);if(P)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:d,expected:P.snapshot})}this._inlineSnapshotStacks.push({...$,testId:e,snapshot:d})}return I&&this._updateSnapshot==="all"||(!I||!b)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?S?this.matched.increment(e):(I?this.updated.increment(e):this.added.increment(e),this._addSnapshot(i,d,{stack:$,testId:e,rawSnapshot:o})):(this._addSnapshot(i,d,{stack:$,testId:e,rawSnapshot:o}),this.added.increment(e)),{actual:"",count:c,expected:"",key:i,pass:!0}):S?(this.matched.increment(e),{actual:"",count:c,expected:"",key:i,pass:!0}):(this.unmatched.increment(e),{actual:o?d:de(d),count:c,expected:u!==void 0?o?u:de(u):void 0,key:i,pass:!1})}async pack(){const e={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 i=await this.save();return e.fileDeleted=i.deleted,e.added=this.added.total(),e.matched=this.matched.total(),e.unmatched=this.unmatched.total(),e.updated=this.updated.total(),e.unchecked=i.deleted?0:n,e.uncheckedKeys=Array.from(s),e}}function me(t,e,n,s){const i=new Error(t);return Object.defineProperty(i,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"expected",{value:s,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"diffOptions",{value:{expand:e}}),i}class Sn{constructor(e={}){y(this,"snapshotStateMap",new Map);this.options=e}async setup(e,n){this.snapshotStateMap.has(e)||this.snapshotStateMap.set(e,await Q.create(e,n))}async finish(e){const s=await this.getSnapshotState(e).pack();return this.snapshotStateMap.delete(e),s}skipTest(e,n){this.getSnapshotState(e).markSnapshotsAsCheckedForTest(n)}clearTest(e,n){this.getSnapshotState(e).clearTest(n)}getSnapshotState(e){const n=this.snapshotStateMap.get(e);if(!n)throw new Error(`The snapshot state for '${e}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}assert(e){const{filepath:n,name:s,testId:i=s,message:r,isInline:a=!1,properties:l,inlineSnapshot:o,error:c,errorMessage:d,rawSnapshot:p}=e;let{received:u}=e;if(!n)throw new Error("Snapshot cannot be used outside of test");const S=this.getSnapshotState(n);if(typeof l=="object"){if(typeof u!="object"||!u)throw new Error("Received value must be an object when the matcher has properties");try{var I,b;if(((I=(b=this.options).isEqual)===null||I===void 0?void 0:I.call(b,u,l))??!1)u=V(u,l);else throw me("Snapshot properties mismatched",S.expand,u,l)}catch(w){throw w.message=d||"Snapshot mismatched",w}}const $=[s,...r?[r]:[]].join(" > "),{actual:E,expected:k,key:_,pass:T}=S.match({testId:i,testName:$,received:u,isInline:a,error:c,inlineSnapshot:o,rawSnapshot:p});if(!T)throw me(`Snapshot \`${_||"unknown"}\` mismatched`,S.expand,p?E:E==null?void 0:E.trim(),p?k:k==null?void 0:k.trim())}async assertRaw(e){if(!e.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:n,rawSnapshot:s}=e;if(s.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");const i=this.getSnapshotState(n);e.filepath||(e.filepath=n),s.file=await i.environment.resolveRawPath(n,s.file),s.content=await i.environment.readSnapshotFile(s.file)??void 0}return this.assert(e)}clear(){this.snapshotStateMap.clear()}}export{Sn as SnapshotClient,Q as SnapshotState,gn as addSerializer,en as getSerializers,mn as stripSnapshotIndentation};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{internalSpyOn as y,getInternalState as I}from"../../../../../tinyspy@4.0.3/node_modules/tinyspy/dist/index.js";const b=new Set;function w(r){return typeof r=="function"&&"_isMockFunction"in r&&r._isMockFunction}function v(r,e,o){const i=o?{[{get:"getter",set:"setter"}[o]]:e}:e;let l;const s=S(r,e),m=s&&s[o||"value"];w(m)&&(l=m.mock._state());try{const n=y(r,i),u=h(n);return l&&u.mock._state(l),u}catch(n){throw n instanceof TypeError&&Symbol.toStringTag&&r[Symbol.toStringTag]==="Module"&&(n.message.includes("Cannot redefine property")||n.message.includes("Cannot replace module namespace")||n.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(i)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:n}):n}}let C=0;function h(r){const e=r;let o,c=[],i=!1,l=[],s=[],m=[];const n=I(r),u={get calls(){return n.calls},get contexts(){return s},get instances(){return l},get invocationCallOrder(){return m},get results(){return n.results.map(([t,a])=>({type:t==="error"?"throw":"return",value:a}))},get settledResults(){return n.resolves.map(([t,a])=>({type:t==="error"?"rejected":"fulfilled",value:a}))},get lastCall(){return n.calls[n.calls.length-1]},_state(t){return t&&(o=t.implementation,c=t.onceImplementations,i=t.implementationChangedTemporarily),{implementation:o,onceImplementations:c,implementationChangedTemporarily:i}}};function f(...t){return l.push(this),s.push(this),m.push(++C),(i?o:c.shift()||o||n.getOriginal()||(()=>{})).apply(this,t)}let k=e.name;e.getMockName=()=>k||"vi.fn()",e.mockName=t=>(k=t,e),e.mockClear=()=>(n.reset(),l=[],s=[],m=[],e),e.mockReset=()=>(e.mockClear(),o=void 0,c=[],e),e.mockRestore=()=>(e.mockReset(),n.restore(),e),Symbol.dispose&&(e[Symbol.dispose]=()=>e.mockRestore()),e.getMockImplementation=()=>i?o:c.at(0)||o,e.mockImplementation=t=>(o=t,n.willCall(f),e),e.mockImplementationOnce=t=>(c.push(t),e);function O(t,a){const g=o;o=t,n.willCall(f),i=!0;const d=()=>{o=g,i=!1},p=a();return typeof p=="object"&&p&&typeof p.then=="function"?p.then(()=>(d(),e)):(d(),e)}return e.withImplementation=O,e.mockReturnThis=()=>e.mockImplementation(function(){return this}),e.mockReturnValue=t=>e.mockImplementation(()=>t),e.mockReturnValueOnce=t=>e.mockImplementationOnce(()=>t),e.mockResolvedValue=t=>e.mockImplementation(()=>Promise.resolve(t)),e.mockResolvedValueOnce=t=>e.mockImplementationOnce(()=>Promise.resolve(t)),e.mockRejectedValue=t=>e.mockImplementation(()=>Promise.reject(t)),e.mockRejectedValueOnce=t=>e.mockImplementationOnce(()=>Promise.reject(t)),Object.defineProperty(e,"mock",{get:()=>u}),n.willCall(f),b.add(e),e}function j(r){const e=h(y({spy:r||function(){}},"spy"));return r&&e.mockImplementation(r),e}function S(r,e){const o=Object.getOwnPropertyDescriptor(r,e);if(o)return o;let c=Object.getPrototypeOf(r);for(;c!==null;){const i=Object.getOwnPropertyDescriptor(c,e);if(i)return i;c=Object.getPrototypeOf(c)}}export{j as fn,w as isMockFunction,b as mocks,v as spyOn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{format as l,plugins as a}from"../../../../../@vitest_pretty-format@3.2.
|
|
1
|
+
import{format as l,plugins as a}from"../../../../../@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js";import{inspect as p}from"../../../../../loupe@3.1.4/node_modules/loupe/lib/index.js";const{AsymmetricMatcher:y,DOMCollection:m,DOMElement:g,Immutable:S,ReactElement:b,ReactTestComponent:d}=a,f=[d,b,g,m,S,y];function h(t,c=10,{maxLength:r,...u}={}){const i=r??1e4;let n;try{n=l(t,{maxDepth:c,escapeString:!1,plugins:f,...u})}catch{n=l(t,{callToJSON:!1,maxDepth:c,escapeString:!1,plugins:f,...u})}return n.length>=i&&c>1?h(t,Math.floor(Math.min(c,Number.MAX_SAFE_INTEGER)/2),{maxLength:r,...u}):n}const j=/%[sdjifoOc%]/g;function $(...t){if(typeof t[0]!="string"){const n=[];for(let e=0;e<t.length;e++)n.push(o(t[e],{depth:0,colors:!1}));return n.join(" ")}const c=t.length;let r=1;const u=t[0];let i=String(u).replace(j,n=>{if(n==="%%")return"%";if(r>=c)return n;switch(n){case"%s":{const e=t[r++];return typeof e=="bigint"?`${e.toString()}n`:typeof e=="number"&&e===0&&1/e<0?"-0":typeof e=="object"&&e!==null?typeof e.toString=="function"&&e.toString!==Object.prototype.toString?e.toString():o(e,{depth:0,colors:!1}):String(e)}case"%d":{const e=t[r++];return typeof e=="bigint"?`${e.toString()}n`:Number(e).toString()}case"%i":{const e=t[r++];return typeof e=="bigint"?`${e.toString()}n`:Number.parseInt(String(e)).toString()}case"%f":return Number.parseFloat(String(t[r++])).toString();case"%o":return o(t[r++],{showHidden:!0,showProxy:!0});case"%O":return o(t[r++]);case"%c":return r++,"";case"%j":try{return JSON.stringify(t[r++])}catch(e){const s=e.message;if(s.includes("circular structure")||s.includes("cyclic structures")||s.includes("cyclic object"))return"[Circular]";throw e}default:return n}});for(let n=t[r];r<c;n=t[++r])n===null||typeof n!="object"?i+=` ${n}`:i+=` ${o(n)}`;return i}function o(t,c={}){return c.truncate===0&&(c.truncate=Number.POSITIVE_INFINITY),p(t,c)}function E(t,c={}){typeof c.truncate>"u"&&(c.truncate=40);const r=o(t,c),u=Object.prototype.toString.call(t);if(c.truncate&&r.length>=c.truncate)if(u==="[object Function]"){const i=t;return i.name?`[Function: ${i.name}]`:"[Function]"}else{if(u==="[object Array]")return`[ Array(${t.length}) ]`;if(u==="[object Object]"){const i=Object.keys(t);return`{ Object (${i.length>2?`${i.splice(0,2).join(", ")}, ...`:i.join(", ")}) }`}else return r}return r}function I(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{$ as f,I as g,o as i,E as o,h as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Qn=Object.defineProperty;var Zn=(n,e,t)=>e in n?Qn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var K=(n,e,t)=>Zn(n,typeof e!="symbol"?e+"":e,t);import{format as Q,plugins as Bn}from"../../../../../@vitest_pretty-format@3.2.3/node_modules/@vitest/pretty-format/dist/index.js";import Y from"../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js";import{s as Rn,g as vn}from"./chunk-_commonjsHelpers.js";import{deepClone as wn,getOwnProperties as xn,getType as sn}from"./helpers.js";import"../../../../../loupe@3.1.3/node_modules/loupe/lib/index.js";const j=-1,O=1,M=0;class A{constructor(e,t){K(this,0);K(this,1);this[0]=e,this[1]=t}}function dn(n,e){if(!n||!e||n.charAt(0)!==e.charAt(0))return 0;let t=0,r=Math.min(n.length,e.length),o=r,l=0;for(;t<o;)n.substring(l,o)===e.substring(l,o)?(t=o,l=t):r=o,o=Math.floor((r-t)/2+t);return o}function kn(n,e){if(!n||!e||n.charAt(n.length-1)!==e.charAt(e.length-1))return 0;let t=0,r=Math.min(n.length,e.length),o=r,l=0;for(;t<o;)n.substring(n.length-o,n.length-l)===e.substring(e.length-o,e.length-l)?(t=o,l=t):r=o,o=Math.floor((r-t)/2+t);return o}function Cn(n,e){const t=n.length,r=e.length;if(t===0||r===0)return 0;t>r?n=n.substring(t-r):t<r&&(e=e.substring(0,t));const o=Math.min(t,r);if(n===e)return o;let l=0,s=1;for(;;){const b=n.substring(o-s),u=e.indexOf(b);if(u===-1)return l;s+=u,(u===0||n.substring(o-s)===e.substring(0,s))&&(l=s,s++)}}function ne(n){let e=!1;const t=[];let r=0,o=null,l=0,s=0,b=0,u=0,F=0;for(;l<n.length;)n[l][0]===M?(t[r++]=l,s=u,b=F,u=0,F=0,o=n[l][1]):(n[l][0]===O?u+=n[l][1].length:F+=n[l][1].length,o&&o.length<=Math.max(s,b)&&o.length<=Math.max(u,F)&&(n.splice(t[r-1],0,new A(j,o)),n[t[r-1]+1][0]=O,r--,r--,l=r>0?t[r-1]:-1,s=0,b=0,u=0,F=0,o=null,e=!0)),l++;for(e&&Nn(n),re(n),l=1;l<n.length;){if(n[l-1][0]===j&&n[l][0]===O){const y=n[l-1][1],C=n[l][1],D=Cn(y,C),c=Cn(C,y);D>=c?(D>=y.length/2||D>=C.length/2)&&(n.splice(l,0,new A(M,C.substring(0,D))),n[l-1][1]=y.substring(0,y.length-D),n[l+1][1]=C.substring(D),l++):(c>=y.length/2||c>=C.length/2)&&(n.splice(l,0,new A(M,y.substring(0,c))),n[l-1][0]=O,n[l-1][1]=C.substring(0,C.length-c),n[l+1][0]=j,n[l+1][1]=y.substring(c),l++),l++}l++}}const bn=/[^a-z0-9]/i,yn=/\s/,$n=/[\r\n]/,ee=/\n\r?\n$/,te=/^\r?\n\r?\n/;function re(n){let e=1;for(;e<n.length-1;){if(n[e-1][0]===M&&n[e+1][0]===M){let t=n[e-1][1],r=n[e][1],o=n[e+1][1];const l=kn(t,r);if(l){const y=r.substring(r.length-l);t=t.substring(0,t.length-l),r=y+r.substring(0,r.length-l),o=y+o}let s=t,b=r,u=o,F=en(t,r)+en(r,o);for(;r.charAt(0)===o.charAt(0);){t+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);const y=en(t,r)+en(r,o);y>=F&&(F=y,s=t,b=r,u=o)}n[e-1][1]!==s&&(s?n[e-1][1]=s:(n.splice(e-1,1),e--),n[e][1]=b,u?n[e+1][1]=u:(n.splice(e+1,1),e--))}e++}}function Nn(n){n.push(new A(M,""));let e=0,t=0,r=0,o="",l="",s;for(;e<n.length;)switch(n[e][0]){case O:r++,l+=n[e][1],e++;break;case j:t++,o+=n[e][1],e++;break;case M:t+r>1?(t!==0&&r!==0&&(s=dn(l,o),s!==0&&(e-t-r>0&&n[e-t-r-1][0]===M?n[e-t-r-1][1]+=l.substring(0,s):(n.splice(0,0,new A(M,l.substring(0,s))),e++),l=l.substring(s),o=o.substring(s)),s=kn(l,o),s!==0&&(n[e][1]=l.substring(l.length-s)+n[e][1],l=l.substring(0,l.length-s),o=o.substring(0,o.length-s))),e-=t+r,n.splice(e,t+r),o.length&&(n.splice(e,0,new A(j,o)),e++),l.length&&(n.splice(e,0,new A(O,l)),e++),e++):e!==0&&n[e-1][0]===M?(n[e-1][1]+=n[e][1],n.splice(e,1)):e++,r=0,t=0,o="",l="";break}n[n.length-1][1]===""&&n.pop();let b=!1;for(e=1;e<n.length-1;)n[e-1][0]===M&&n[e+1][0]===M&&(n[e][1].substring(n[e][1].length-n[e-1][1].length)===n[e-1][1]?(n[e][1]=n[e-1][1]+n[e][1].substring(0,n[e][1].length-n[e-1][1].length),n[e+1][1]=n[e-1][1]+n[e+1][1],n.splice(e-1,1),b=!0):n[e][1].substring(0,n[e+1][1].length)===n[e+1][1]&&(n[e-1][1]+=n[e+1][1],n[e][1]=n[e][1].substring(n[e+1][1].length)+n[e+1][1],n.splice(e+1,1),b=!0)),e++;b&&Nn(n)}function en(n,e){if(!n||!e)return 6;const t=n.charAt(n.length-1),r=e.charAt(0),o=t.match(bn),l=r.match(bn),s=o&&t.match(yn),b=l&&r.match(yn),u=s&&t.match($n),F=b&&r.match($n),y=u&&n.match(ee),C=F&&e.match(te);return y||C?5:u||F?4:o&&!s&&b?3:s||b?2:o||l?1:0}const qn="Compared values have no visual difference.",oe="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";var tn={},Fn;function le(){if(Fn)return tn;Fn=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.default=D;const n="diff-sequences",e=0,t=(c,i,h,a,f)=>{let p=0;for(;c<i&&h<a&&f(c,h);)c+=1,h+=1,p+=1;return p},r=(c,i,h,a,f)=>{let p=0;for(;c<=i&&h<=a&&f(i,a);)i-=1,a-=1,p+=1;return p},o=(c,i,h,a,f,p,L)=>{let g=0,w=-c,$=p[g],m=$;p[g]+=t($+1,i,a+$-w+1,h,f);const P=c<L?c:L;for(g+=1,w+=2;g<=P;g+=1,w+=2){if(g!==c&&m<p[g])$=p[g];else if($=m+1,i<=$)return g-1;m=p[g],p[g]=$+t($+1,i,a+$-w+1,h,f)}return L},l=(c,i,h,a,f,p,L)=>{let g=0,w=c,$=p[g],m=$;p[g]-=r(i,$-1,h,a+$-w-1,f);const P=c<L?c:L;for(g+=1,w-=2;g<=P;g+=1,w-=2){if(g!==c&&p[g]<m)$=p[g];else if($=m-1,$<i)return g-1;m=p[g],p[g]=$-r(i,$-1,h,a+$-w-1,f)}return L},s=(c,i,h,a,f,p,L,g,w,$,m)=>{const P=a-i,z=h-i,E=f-a-z,R=-E-(c-1),H=-E+(c-1);let k=e;const _=c<g?c:g;for(let T=0,S=-c;T<=_;T+=1,S+=2){const X=T===0||T!==c&&k<L[T],B=X?L[T]:k,q=X?B:B+1,J=P+q-S,U=t(q+1,h,J+1,f,p),G=q+U;if(k=L[T],L[T]=G,R<=S&&S<=H){const Z=(c-1-(S+E))/2;if(Z<=$&&w[Z]-1<=G){const I=P+B-(X?S+1:S-1),N=r(i,B,a,I,p),V=B-N,nn=I-N,x=V+1,on=nn+1;m.nChangePreceding=c-1,c-1===x+on-i-a?(m.aEndPreceding=i,m.bEndPreceding=a):(m.aEndPreceding=x,m.bEndPreceding=on),m.nCommonPreceding=N,N!==0&&(m.aCommonPreceding=x,m.bCommonPreceding=on),m.nCommonFollowing=U,U!==0&&(m.aCommonFollowing=q+1,m.bCommonFollowing=J+1);const mn=G+1,pn=J+U+1;return m.nChangeFollowing=c-1,c-1===h+f-mn-pn?(m.aStartFollowing=h,m.bStartFollowing=f):(m.aStartFollowing=mn,m.bStartFollowing=pn),!0}}}return!1},b=(c,i,h,a,f,p,L,g,w,$,m)=>{const P=f-h,z=h-i,E=f-a-z,R=E-c,H=E+c;let k=e;const _=c<$?c:$;for(let T=0,S=c;T<=_;T+=1,S-=2){const X=T===0||T!==c&&w[T]<k,B=X?w[T]:k,q=X?B:B-1,J=P+q-S,U=r(i,q-1,a,J-1,p),G=q-U;if(k=w[T],w[T]=G,R<=S&&S<=H){const Z=(c+(S-E))/2;if(Z<=g&&G-1<=L[Z]){const I=J-U;if(m.nChangePreceding=c,c===G+I-i-a?(m.aEndPreceding=i,m.bEndPreceding=a):(m.aEndPreceding=G,m.bEndPreceding=I),m.nCommonPreceding=U,U!==0&&(m.aCommonPreceding=G,m.bCommonPreceding=I),m.nChangeFollowing=c-1,c===1)m.nCommonFollowing=0,m.aStartFollowing=h,m.bStartFollowing=f;else{const N=P+B-(X?S-1:S+1),V=t(B,h,N,f,p);m.nCommonFollowing=V,V!==0&&(m.aCommonFollowing=B,m.bCommonFollowing=N);const nn=B+V,x=N+V;c-1===h+f-nn-x?(m.aStartFollowing=h,m.bStartFollowing=f):(m.aStartFollowing=nn,m.bStartFollowing=x)}return!0}}}return!1},u=(c,i,h,a,f,p,L,g,w)=>{const $=a-i,m=f-h,P=h-i,z=f-a,W=z-P;let E=P,R=P;if(L[0]=i-1,g[0]=h,W%2===0){const H=(c||W)/2,k=(P+z)/2;for(let _=1;_<=k;_+=1)if(E=o(_,h,f,$,p,L,E),_<H)R=l(_,i,a,m,p,g,R);else if(b(_,i,h,a,f,p,L,E,g,R,w))return}else{const H=((c||W)+1)/2,k=(P+z+1)/2;let _=1;for(E=o(_,h,f,$,p,L,E),_+=1;_<=k;_+=1)if(R=l(_-1,i,a,m,p,g,R),_<H)E=o(_,h,f,$,p,L,E);else if(s(_,i,h,a,f,p,L,E,g,R,w))return}throw new Error(`${n}: no overlap aStart=${i} aEnd=${h} bStart=${a} bEnd=${f}`)},F=(c,i,h,a,f,p,L,g,w,$)=>{if(f-a<h-i){if(p=!p,p&&L.length===1){const{foundSubsequence:G,isCommon:Z}=L[0];L[1]={foundSubsequence:(I,N,V)=>{G(I,V,N)},isCommon:(I,N)=>Z(N,I)}}const J=i,U=h;i=a,h=f,a=J,f=U}const{foundSubsequence:m,isCommon:P}=L[p?1:0];u(c,i,h,a,f,P,g,w,$);const{nChangePreceding:z,aEndPreceding:W,bEndPreceding:E,nCommonPreceding:R,aCommonPreceding:H,bCommonPreceding:k,nCommonFollowing:_,aCommonFollowing:T,bCommonFollowing:S,nChangeFollowing:X,aStartFollowing:B,bStartFollowing:q}=$;i<W&&a<E&&F(z,i,W,a,E,p,L,g,w,$),R!==0&&m(R,H,k),_!==0&&m(_,T,S),B<h&&q<f&&F(X,B,h,q,f,p,L,g,w,$)},y=(c,i)=>{if(typeof i!="number")throw new TypeError(`${n}: ${c} typeof ${typeof i} is not a number`);if(!Number.isSafeInteger(i))throw new RangeError(`${n}: ${c} value ${i} is not a safe integer`);if(i<0)throw new RangeError(`${n}: ${c} value ${i} is a negative integer`)},C=(c,i)=>{const h=typeof i;if(h!=="function")throw new TypeError(`${n}: ${c} typeof ${h} is not a function`)};function D(c,i,h,a){y("aLength",c),y("bLength",i),C("isCommon",h),C("foundSubsequence",a);const f=t(0,c,0,i,h);if(f!==0&&a(f,0,0),c!==f||i!==f){const p=f,L=f,g=r(p,c-1,L,i-1,h),w=c-g,$=i-g,m=f+g;c!==m&&i!==m&&F(0,p,w,L,$,!1,[{foundSubsequence:a,isCommon:h}],[e],[e],{aCommonFollowing:e,aCommonPreceding:e,aEndPreceding:e,aStartFollowing:e,bCommonFollowing:e,bCommonPreceding:e,bEndPreceding:e,bStartFollowing:e,nChangeFollowing:e,nChangePreceding:e,nCommonFollowing:e,nCommonPreceding:e}),g!==0&&a(g,w,$)}}return tn}var ce=le(),Un=vn(ce);function ie(n,e){return n.replace(/\s+$/,t=>e(t))}function an(n,e,t,r,o,l){return n.length!==0?t(`${r} ${ie(n,o)}`):r!==" "?t(r):e&&l.length!==0?t(`${r} ${l}`):""}function Gn(n,e,{aColor:t,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return an(n,e,t,r,o,l)}function zn(n,e,{bColor:t,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return an(n,e,t,r,o,l)}function Hn(n,e,{commonColor:t,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return an(n,e,t,r,o,l)}function Ln(n,e,t,r,{patchColor:o}){return o(`@@ -${n+1},${e-n} +${t+1},${r-t} @@`)}function se(n,e){const t=n.length,r=e.contextLines,o=r+r;let l=t,s=!1,b=0,u=0;for(;u!==t;){const g=u;for(;u!==t&&n[u][0]===M;)u+=1;if(g!==u)if(g===0)u>r&&(l-=u-r,s=!0);else if(u===t){const w=u-g;w>r&&(l-=w-r,s=!0)}else{const w=u-g;w>o&&(l-=w-o,b+=1)}for(;u!==t&&n[u][0]!==M;)u+=1}const F=b!==0||s;b!==0?l+=b+1:s&&(l+=1);const y=l-1,C=[];let D=0;F&&C.push("");let c=0,i=0,h=0,a=0;const f=g=>{const w=C.length;C.push(Hn(g,w===0||w===y,e)),h+=1,a+=1},p=g=>{const w=C.length;C.push(Gn(g,w===0||w===y,e)),h+=1},L=g=>{const w=C.length;C.push(zn(g,w===0||w===y,e)),a+=1};for(u=0;u!==t;){let g=u;for(;u!==t&&n[u][0]===M;)u+=1;if(g!==u)if(g===0){u>r&&(g=u-r,c=g,i=g,h=c,a=i);for(let w=g;w!==u;w+=1)f(n[w][1])}else if(u===t){const w=u-g>r?g+r:u;for(let $=g;$!==w;$+=1)f(n[$][1])}else{const w=u-g;if(w>o){const $=g+r;for(let P=g;P!==$;P+=1)f(n[P][1]);C[D]=Ln(c,h,i,a,e),D=C.length,C.push("");const m=w-o;c=h+m,i=a+m,h=c,a=i;for(let P=u-r;P!==u;P+=1)f(n[P][1])}else for(let $=g;$!==u;$+=1)f(n[$][1])}for(;u!==t&&n[u][0]===j;)p(n[u][1]),u+=1;for(;u!==t&&n[u][0]===O;)L(n[u][1]),u+=1}return F&&(C[D]=Ln(c,h,i,a,e)),C.join(`
|
|
1
|
+
var Qn=Object.defineProperty;var Zn=(n,e,t)=>e in n?Qn(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var K=(n,e,t)=>Zn(n,typeof e!="symbol"?e+"":e,t);import{format as Q,plugins as Bn}from"../../../../../@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js";import Y from"../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js";import{g as vn,s as Rn}from"./chunk-_commonjsHelpers.js";import{deepClone as wn,getOwnProperties as xn,getType as sn}from"./helpers.js";import"../../../../../loupe@3.1.4/node_modules/loupe/lib/promise.js";const j=-1,O=1,M=0;class A{constructor(e,t){K(this,0);K(this,1);this[0]=e,this[1]=t}}function dn(n,e){if(!n||!e||n.charAt(0)!==e.charAt(0))return 0;let t=0,r=Math.min(n.length,e.length),o=r,l=0;for(;t<o;)n.substring(l,o)===e.substring(l,o)?(t=o,l=t):r=o,o=Math.floor((r-t)/2+t);return o}function kn(n,e){if(!n||!e||n.charAt(n.length-1)!==e.charAt(e.length-1))return 0;let t=0,r=Math.min(n.length,e.length),o=r,l=0;for(;t<o;)n.substring(n.length-o,n.length-l)===e.substring(e.length-o,e.length-l)?(t=o,l=t):r=o,o=Math.floor((r-t)/2+t);return o}function Cn(n,e){const t=n.length,r=e.length;if(t===0||r===0)return 0;t>r?n=n.substring(t-r):t<r&&(e=e.substring(0,t));const o=Math.min(t,r);if(n===e)return o;let l=0,s=1;for(;;){const b=n.substring(o-s),u=e.indexOf(b);if(u===-1)return l;s+=u,(u===0||n.substring(o-s)===e.substring(0,s))&&(l=s,s++)}}function ne(n){let e=!1;const t=[];let r=0,o=null,l=0,s=0,b=0,u=0,F=0;for(;l<n.length;)n[l][0]===M?(t[r++]=l,s=u,b=F,u=0,F=0,o=n[l][1]):(n[l][0]===O?u+=n[l][1].length:F+=n[l][1].length,o&&o.length<=Math.max(s,b)&&o.length<=Math.max(u,F)&&(n.splice(t[r-1],0,new A(j,o)),n[t[r-1]+1][0]=O,r--,r--,l=r>0?t[r-1]:-1,s=0,b=0,u=0,F=0,o=null,e=!0)),l++;for(e&&Nn(n),re(n),l=1;l<n.length;){if(n[l-1][0]===j&&n[l][0]===O){const y=n[l-1][1],C=n[l][1],D=Cn(y,C),c=Cn(C,y);D>=c?(D>=y.length/2||D>=C.length/2)&&(n.splice(l,0,new A(M,C.substring(0,D))),n[l-1][1]=y.substring(0,y.length-D),n[l+1][1]=C.substring(D),l++):(c>=y.length/2||c>=C.length/2)&&(n.splice(l,0,new A(M,y.substring(0,c))),n[l-1][0]=O,n[l-1][1]=C.substring(0,C.length-c),n[l+1][0]=j,n[l+1][1]=y.substring(c),l++),l++}l++}}const bn=/[^a-z0-9]/i,yn=/\s/,$n=/[\r\n]/,ee=/\n\r?\n$/,te=/^\r?\n\r?\n/;function re(n){let e=1;for(;e<n.length-1;){if(n[e-1][0]===M&&n[e+1][0]===M){let t=n[e-1][1],r=n[e][1],o=n[e+1][1];const l=kn(t,r);if(l){const y=r.substring(r.length-l);t=t.substring(0,t.length-l),r=y+r.substring(0,r.length-l),o=y+o}let s=t,b=r,u=o,F=en(t,r)+en(r,o);for(;r.charAt(0)===o.charAt(0);){t+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);const y=en(t,r)+en(r,o);y>=F&&(F=y,s=t,b=r,u=o)}n[e-1][1]!==s&&(s?n[e-1][1]=s:(n.splice(e-1,1),e--),n[e][1]=b,u?n[e+1][1]=u:(n.splice(e+1,1),e--))}e++}}function Nn(n){n.push(new A(M,""));let e=0,t=0,r=0,o="",l="",s;for(;e<n.length;)switch(n[e][0]){case O:r++,l+=n[e][1],e++;break;case j:t++,o+=n[e][1],e++;break;case M:t+r>1?(t!==0&&r!==0&&(s=dn(l,o),s!==0&&(e-t-r>0&&n[e-t-r-1][0]===M?n[e-t-r-1][1]+=l.substring(0,s):(n.splice(0,0,new A(M,l.substring(0,s))),e++),l=l.substring(s),o=o.substring(s)),s=kn(l,o),s!==0&&(n[e][1]=l.substring(l.length-s)+n[e][1],l=l.substring(0,l.length-s),o=o.substring(0,o.length-s))),e-=t+r,n.splice(e,t+r),o.length&&(n.splice(e,0,new A(j,o)),e++),l.length&&(n.splice(e,0,new A(O,l)),e++),e++):e!==0&&n[e-1][0]===M?(n[e-1][1]+=n[e][1],n.splice(e,1)):e++,r=0,t=0,o="",l="";break}n[n.length-1][1]===""&&n.pop();let b=!1;for(e=1;e<n.length-1;)n[e-1][0]===M&&n[e+1][0]===M&&(n[e][1].substring(n[e][1].length-n[e-1][1].length)===n[e-1][1]?(n[e][1]=n[e-1][1]+n[e][1].substring(0,n[e][1].length-n[e-1][1].length),n[e+1][1]=n[e-1][1]+n[e+1][1],n.splice(e-1,1),b=!0):n[e][1].substring(0,n[e+1][1].length)===n[e+1][1]&&(n[e-1][1]+=n[e+1][1],n[e][1]=n[e][1].substring(n[e+1][1].length)+n[e+1][1],n.splice(e+1,1),b=!0)),e++;b&&Nn(n)}function en(n,e){if(!n||!e)return 6;const t=n.charAt(n.length-1),r=e.charAt(0),o=t.match(bn),l=r.match(bn),s=o&&t.match(yn),b=l&&r.match(yn),u=s&&t.match($n),F=b&&r.match($n),y=u&&n.match(ee),C=F&&e.match(te);return y||C?5:u||F?4:o&&!s&&b?3:s||b?2:o||l?1:0}const qn="Compared values have no visual difference.",oe="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";var tn={},Fn;function le(){if(Fn)return tn;Fn=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.default=D;const n="diff-sequences",e=0,t=(c,i,h,a,f)=>{let p=0;for(;c<i&&h<a&&f(c,h);)c+=1,h+=1,p+=1;return p},r=(c,i,h,a,f)=>{let p=0;for(;c<=i&&h<=a&&f(i,a);)i-=1,a-=1,p+=1;return p},o=(c,i,h,a,f,p,L)=>{let g=0,w=-c,$=p[g],m=$;p[g]+=t($+1,i,a+$-w+1,h,f);const P=c<L?c:L;for(g+=1,w+=2;g<=P;g+=1,w+=2){if(g!==c&&m<p[g])$=p[g];else if($=m+1,i<=$)return g-1;m=p[g],p[g]=$+t($+1,i,a+$-w+1,h,f)}return L},l=(c,i,h,a,f,p,L)=>{let g=0,w=c,$=p[g],m=$;p[g]-=r(i,$-1,h,a+$-w-1,f);const P=c<L?c:L;for(g+=1,w-=2;g<=P;g+=1,w-=2){if(g!==c&&p[g]<m)$=p[g];else if($=m-1,$<i)return g-1;m=p[g],p[g]=$-r(i,$-1,h,a+$-w-1,f)}return L},s=(c,i,h,a,f,p,L,g,w,$,m)=>{const P=a-i,z=h-i,E=f-a-z,R=-E-(c-1),H=-E+(c-1);let k=e;const _=c<g?c:g;for(let T=0,S=-c;T<=_;T+=1,S+=2){const X=T===0||T!==c&&k<L[T],B=X?L[T]:k,q=X?B:B+1,J=P+q-S,U=t(q+1,h,J+1,f,p),G=q+U;if(k=L[T],L[T]=G,R<=S&&S<=H){const Z=(c-1-(S+E))/2;if(Z<=$&&w[Z]-1<=G){const I=P+B-(X?S+1:S-1),N=r(i,B,a,I,p),V=B-N,nn=I-N,x=V+1,on=nn+1;m.nChangePreceding=c-1,c-1===x+on-i-a?(m.aEndPreceding=i,m.bEndPreceding=a):(m.aEndPreceding=x,m.bEndPreceding=on),m.nCommonPreceding=N,N!==0&&(m.aCommonPreceding=x,m.bCommonPreceding=on),m.nCommonFollowing=U,U!==0&&(m.aCommonFollowing=q+1,m.bCommonFollowing=J+1);const mn=G+1,pn=J+U+1;return m.nChangeFollowing=c-1,c-1===h+f-mn-pn?(m.aStartFollowing=h,m.bStartFollowing=f):(m.aStartFollowing=mn,m.bStartFollowing=pn),!0}}}return!1},b=(c,i,h,a,f,p,L,g,w,$,m)=>{const P=f-h,z=h-i,E=f-a-z,R=E-c,H=E+c;let k=e;const _=c<$?c:$;for(let T=0,S=c;T<=_;T+=1,S-=2){const X=T===0||T!==c&&w[T]<k,B=X?w[T]:k,q=X?B:B-1,J=P+q-S,U=r(i,q-1,a,J-1,p),G=q-U;if(k=w[T],w[T]=G,R<=S&&S<=H){const Z=(c+(S-E))/2;if(Z<=g&&G-1<=L[Z]){const I=J-U;if(m.nChangePreceding=c,c===G+I-i-a?(m.aEndPreceding=i,m.bEndPreceding=a):(m.aEndPreceding=G,m.bEndPreceding=I),m.nCommonPreceding=U,U!==0&&(m.aCommonPreceding=G,m.bCommonPreceding=I),m.nChangeFollowing=c-1,c===1)m.nCommonFollowing=0,m.aStartFollowing=h,m.bStartFollowing=f;else{const N=P+B-(X?S-1:S+1),V=t(B,h,N,f,p);m.nCommonFollowing=V,V!==0&&(m.aCommonFollowing=B,m.bCommonFollowing=N);const nn=B+V,x=N+V;c-1===h+f-nn-x?(m.aStartFollowing=h,m.bStartFollowing=f):(m.aStartFollowing=nn,m.bStartFollowing=x)}return!0}}}return!1},u=(c,i,h,a,f,p,L,g,w)=>{const $=a-i,m=f-h,P=h-i,z=f-a,W=z-P;let E=P,R=P;if(L[0]=i-1,g[0]=h,W%2===0){const H=(c||W)/2,k=(P+z)/2;for(let _=1;_<=k;_+=1)if(E=o(_,h,f,$,p,L,E),_<H)R=l(_,i,a,m,p,g,R);else if(b(_,i,h,a,f,p,L,E,g,R,w))return}else{const H=((c||W)+1)/2,k=(P+z+1)/2;let _=1;for(E=o(_,h,f,$,p,L,E),_+=1;_<=k;_+=1)if(R=l(_-1,i,a,m,p,g,R),_<H)E=o(_,h,f,$,p,L,E);else if(s(_,i,h,a,f,p,L,E,g,R,w))return}throw new Error(`${n}: no overlap aStart=${i} aEnd=${h} bStart=${a} bEnd=${f}`)},F=(c,i,h,a,f,p,L,g,w,$)=>{if(f-a<h-i){if(p=!p,p&&L.length===1){const{foundSubsequence:G,isCommon:Z}=L[0];L[1]={foundSubsequence:(I,N,V)=>{G(I,V,N)},isCommon:(I,N)=>Z(N,I)}}const J=i,U=h;i=a,h=f,a=J,f=U}const{foundSubsequence:m,isCommon:P}=L[p?1:0];u(c,i,h,a,f,P,g,w,$);const{nChangePreceding:z,aEndPreceding:W,bEndPreceding:E,nCommonPreceding:R,aCommonPreceding:H,bCommonPreceding:k,nCommonFollowing:_,aCommonFollowing:T,bCommonFollowing:S,nChangeFollowing:X,aStartFollowing:B,bStartFollowing:q}=$;i<W&&a<E&&F(z,i,W,a,E,p,L,g,w,$),R!==0&&m(R,H,k),_!==0&&m(_,T,S),B<h&&q<f&&F(X,B,h,q,f,p,L,g,w,$)},y=(c,i)=>{if(typeof i!="number")throw new TypeError(`${n}: ${c} typeof ${typeof i} is not a number`);if(!Number.isSafeInteger(i))throw new RangeError(`${n}: ${c} value ${i} is not a safe integer`);if(i<0)throw new RangeError(`${n}: ${c} value ${i} is a negative integer`)},C=(c,i)=>{const h=typeof i;if(h!=="function")throw new TypeError(`${n}: ${c} typeof ${h} is not a function`)};function D(c,i,h,a){y("aLength",c),y("bLength",i),C("isCommon",h),C("foundSubsequence",a);const f=t(0,c,0,i,h);if(f!==0&&a(f,0,0),c!==f||i!==f){const p=f,L=f,g=r(p,c-1,L,i-1,h),w=c-g,$=i-g,m=f+g;c!==m&&i!==m&&F(0,p,w,L,$,!1,[{foundSubsequence:a,isCommon:h}],[e],[e],{aCommonFollowing:e,aCommonPreceding:e,aEndPreceding:e,aStartFollowing:e,bCommonFollowing:e,bCommonPreceding:e,bEndPreceding:e,bStartFollowing:e,nChangeFollowing:e,nChangePreceding:e,nCommonFollowing:e,nCommonPreceding:e}),g!==0&&a(g,w,$)}}return tn}var ce=le(),Un=vn(ce);function ie(n,e){return n.replace(/\s+$/,t=>e(t))}function an(n,e,t,r,o,l){return n.length!==0?t(`${r} ${ie(n,o)}`):r!==" "?t(r):e&&l.length!==0?t(`${r} ${l}`):""}function Gn(n,e,{aColor:t,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return an(n,e,t,r,o,l)}function zn(n,e,{bColor:t,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return an(n,e,t,r,o,l)}function Hn(n,e,{commonColor:t,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return an(n,e,t,r,o,l)}function Ln(n,e,t,r,{patchColor:o}){return o(`@@ -${n+1},${e-n} +${t+1},${r-t} @@`)}function se(n,e){const t=n.length,r=e.contextLines,o=r+r;let l=t,s=!1,b=0,u=0;for(;u!==t;){const g=u;for(;u!==t&&n[u][0]===M;)u+=1;if(g!==u)if(g===0)u>r&&(l-=u-r,s=!0);else if(u===t){const w=u-g;w>r&&(l-=w-r,s=!0)}else{const w=u-g;w>o&&(l-=w-o,b+=1)}for(;u!==t&&n[u][0]!==M;)u+=1}const F=b!==0||s;b!==0?l+=b+1:s&&(l+=1);const y=l-1,C=[];let D=0;F&&C.push("");let c=0,i=0,h=0,a=0;const f=g=>{const w=C.length;C.push(Hn(g,w===0||w===y,e)),h+=1,a+=1},p=g=>{const w=C.length;C.push(Gn(g,w===0||w===y,e)),h+=1},L=g=>{const w=C.length;C.push(zn(g,w===0||w===y,e)),a+=1};for(u=0;u!==t;){let g=u;for(;u!==t&&n[u][0]===M;)u+=1;if(g!==u)if(g===0){u>r&&(g=u-r,c=g,i=g,h=c,a=i);for(let w=g;w!==u;w+=1)f(n[w][1])}else if(u===t){const w=u-g>r?g+r:u;for(let $=g;$!==w;$+=1)f(n[$][1])}else{const w=u-g;if(w>o){const $=g+r;for(let P=g;P!==$;P+=1)f(n[P][1]);C[D]=Ln(c,h,i,a,e),D=C.length,C.push("");const m=w-o;c=h+m,i=a+m,h=c,a=i;for(let P=u-r;P!==u;P+=1)f(n[P][1])}else for(let $=g;$!==u;$+=1)f(n[$][1])}for(;u!==t&&n[u][0]===j;)p(n[u][1]),u+=1;for(;u!==t&&n[u][0]===O;)L(n[u][1]),u+=1}return F&&(C[D]=Ln(c,h,i,a,e)),C.join(`
|
|
2
2
|
`)}function ue(n,e){return n.map((t,r,o)=>{const l=t[1],s=r===0||r===o.length-1;switch(t[0]){case j:return Gn(l,s,e);case O:return zn(l,s,e);default:return Hn(l,s,e)}}).join(`
|
|
3
3
|
`)}const ln=n=>n,In=5,he=0;function ge(){return{aAnnotation:"Expected",aColor:Y.green,aIndicator:"-",bAnnotation:"Received",bColor:Y.red,bIndicator:"+",changeColor:Y.inverse,changeLineTrailingSpaceColor:ln,commonColor:Y.dim,commonIndicator:" ",commonLineTrailingSpaceColor:ln,compareKeys:void 0,contextLines:In,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:Y.yellow,printBasicPrototype:!1,truncateThreshold:he,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:ln}}function ae(n){return n&&typeof n=="function"?n:void 0}function fe(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>=0?n:In}function v(n={}){return{...ge(),...n,compareKeys:ae(n.compareKeys),contextLines:fe(n.contextLines)}}function d(n){return n.length===1&&n[0].length===0}function me(n){let e=0,t=0;return n.forEach(r=>{switch(r[0]){case j:e+=1;break;case O:t+=1;break}}),{a:e,b:t}}function pe({aAnnotation:n,aColor:e,aIndicator:t,bAnnotation:r,bColor:o,bIndicator:l,includeChangeCounts:s,omitAnnotationLines:b},u){if(b)return"";let F="",y="";if(s){const c=String(u.a),i=String(u.b),h=r.length-n.length,a=" ".repeat(Math.max(0,h)),f=" ".repeat(Math.max(0,-h)),p=i.length-c.length,L=" ".repeat(Math.max(0,p)),g=" ".repeat(Math.max(0,-p));F=`${a} ${t} ${L}${c}`,y=`${f} ${l} ${g}${i}`}const C=`${t} ${n}${F}`,D=`${l} ${r}${y}`;return`${e(C)}
|
|
4
4
|
${o(D)}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{printDiffOrStringify as a}from"./diff.js";import{s as c,f as p}from"./chunk-_commonjsHelpers.js";import"../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js";import"../../../../../loupe@3.1.4/node_modules/loupe/lib/promise.js";const m="@@__IMMUTABLE_RECORD__@@",y="@@__IMMUTABLE_ITERABLE__@@";function g(e){return e&&(e[y]||e[m])}const d=Object.getPrototypeOf({});function u(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function o(e,n=new WeakMap){if(!e||typeof e=="string")return e;if(e instanceof Error&&"toJSON"in e&&typeof e.toJSON=="function"){const r=e.toJSON();return r&&r!==e&&typeof r=="object"&&(typeof e.message=="string"&&f(()=>r.message??(r.message=e.message)),typeof e.stack=="string"&&f(()=>r.stack??(r.stack=e.stack)),typeof e.name=="string"&&f(()=>r.name??(r.name=e.name)),e.cause!=null&&f(()=>r.cause??(r.cause=o(e.cause,n)))),o(r,n)}if(typeof e=="function")return`Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return`<Buffer(${e.length}) ...>`;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return`<Uint8Array(${e.length}) ...>`;if(g(e))return o(e.toJSON(),n);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()} ${p(e.sample)}`;if(typeof e.toJSON=="function")return o(e.toJSON(),n);if(n.has(e))return n.get(e);if(Array.isArray(e)){const r=new Array(e.length);return n.set(e,r),e.forEach((t,i)=>{try{r[i]=o(t,n)}catch(s){r[i]=u(s)}}),r}else{const r=Object.create(null);n.set(e,r);let t=e;for(;t&&t!==d;)Object.getOwnPropertyNames(t).forEach(i=>{if(!(i in r))try{r[i]=o(e[i],n)}catch(s){delete r[i],r[i]=u(s)}}),t=Object.getPrototypeOf(t);return r}}function f(e){try{return e()}catch{}}function O(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function _(e,n,r=new WeakSet){if(!e||typeof e!="object")return{message:String(e)};const t=e;(t.showDiff||t.showDiff===void 0&&t.expected!==void 0&&t.actual!==void 0)&&(t.diff=a(t.actual,t.expected,{...n,...t.diffOptions})),"expected"in t&&typeof t.expected!="string"&&(t.expected=c(t.expected,10)),"actual"in t&&typeof t.actual!="string"&&(t.actual=c(t.actual,10));try{typeof t.message=="string"&&(t.message=O(t.message))}catch{}try{!r.has(t)&&typeof t.cause=="object"&&(r.add(t),t.cause=_(t.cause,n,r))}catch{}try{return o(t)}catch(i){return o(new Error(`Failed to fully serialize error: ${i==null?void 0:i.message}
|
|
2
|
+
Inner error message: ${t==null?void 0:t.message}`))}}export{_ as processError,o as serializeError,o as serializeValue};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function b(e){const{message:r="$$stack trace error",stackTraceLimit:n=1}=e||{},c=Error.stackTraceLimit,t=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=i=>i.stack;const o=new Error(r).stack||"";return Error.prepareStackTrace=t,Error.stackTraceLimit=c,o}function O(e,r,n){const c=typeof e;if(!n.includes(c))throw new TypeError(`${r} value must be ${n.join(" or ")}, received "${c}"`)}function g(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function d(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function p(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function j(e){return Object.prototype.toString.apply(e).slice(8,-1)}function l(e,r){const n=typeof r=="function"?r:c=>r.add(c);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function y(e){const r=new Set;return p(e)?[]:(l(e,r),Array.from(r))}const a={forceWritable:!1};function w(e,r=a){return f(e,new WeakMap,r)}function f(e,r,n=a){let c,t;if(r.has(e))return r.get(e);if(Array.isArray(e)){for(t=Array.from({length:c=e.length}),r.set(e,t);c--;)t[c]=f(e[c],r,n);return t}if(Object.prototype.toString.call(e)==="[object Object]"){t=Object.create(Object.getPrototypeOf(e)),r.set(e,t);const s=y(e);for(const o of s){const i=Object.getOwnPropertyDescriptor(e,o);if(!i)continue;const u=f(e[o],r,n);n.forceWritable?Object.defineProperty(t,o,{enumerable:i.enumerable,configurable:!0,writable:!0,value:u}):"get"in i?Object.defineProperty(t,o,{...i,get(){return u}}):Object.defineProperty(t,o,{...i,value:u})}return t}return e}function k(e,r,n=void 0){const c=r.replace(/\[(\d+)\]/g,".$1").split(".");let t=e;for(const s of c)if(t=new Object(t)[s],t===void 0)return n;return t}function
|
|
1
|
+
function b(e){const{message:r="$$stack trace error",stackTraceLimit:n=1}=e||{},c=Error.stackTraceLimit,t=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=i=>i.stack;const o=new Error(r).stack||"";return Error.prepareStackTrace=t,Error.stackTraceLimit=c,o}function O(e,r,n){const c=typeof e;if(!n.includes(c))throw new TypeError(`${r} value must be ${n.join(" or ")}, received "${c}"`)}function g(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function d(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function p(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function j(e){return Object.prototype.toString.apply(e).slice(8,-1)}function l(e,r){const n=typeof r=="function"?r:c=>r.add(c);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function y(e){const r=new Set;return p(e)?[]:(l(e,r),Array.from(r))}const a={forceWritable:!1};function w(e,r=a){return f(e,new WeakMap,r)}function f(e,r,n=a){let c,t;if(r.has(e))return r.get(e);if(Array.isArray(e)){for(t=Array.from({length:c=e.length}),r.set(e,t);c--;)t[c]=f(e[c],r,n);return t}if(Object.prototype.toString.call(e)==="[object Object]"){t=Object.create(Object.getPrototypeOf(e)),r.set(e,t);const s=y(e);for(const o of s){const i=Object.getOwnPropertyDescriptor(e,o);if(!i)continue;const u=f(e[o],r,n);n.forceWritable?Object.defineProperty(t,o,{enumerable:i.enumerable,configurable:!0,writable:!0,value:u}):"get"in i?Object.defineProperty(t,o,{...i,get(){return u}}):Object.defineProperty(t,o,{...i,value:u})}return t}return e}function k(){}function m(e,r,n=void 0){const c=r.replace(/\[(\d+)\]/g,".$1").split(".");let t=e;for(const s of c)if(t=new Object(t)[s],t===void 0)return n;return t}function T(){let e=null,r=null;const n=new Promise((c,t)=>{e=c,r=t});return n.resolve=e,n.reject=r,n}function A(e){if(!Number.isNaN(e))return!1;const r=new Float64Array(1);return r[0]=e,new Uint32Array(r.buffer)[1]>>>31===1}export{O as assertTypes,f as clone,T as createDefer,b as createSimpleStackTrace,w as deepClone,y as getOwnProperties,j as getType,A as isNegativeNaN,d as isObject,k as noop,m as objectAttr,g as toArray};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js";import"../../../../../loupe@3.1.4/node_modules/loupe/lib/promise.js";var P,D;function F(){if(D)return P;D=1;var f,p,I,x,y,c,g,d,S,_,v,m,J,X,k,u,L,w,E;return J=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,m=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,f=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,k=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,v=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,u=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,E=/[\t\v\f\ufeff\p{Zs}]+/yu,d=/\r?\n|[\r\u2028\u2029]/y,S=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,X=/\/\/.*/y,I=/[<>.:={}]|\/(?![\/*])/y,p=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,x=/(['"])(?:(?!\1)[^])*(\1)?/y,y=/[^<>{}]+/y,w=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,L=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,c=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,g=/^(?:return|throw|yield)$/,_=RegExp(d.source),P=function*(s,{jsx:q=!1}={}){var o,b,N,t,n,C,e,r,$,l,T,a,h,i;for({length:C}=s,t=0,n="",i=[{tag:"JS"}],o=[],T=0,a=!1;t<C;){switch(r=i[i.length-1],r.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(s[t]==="/"&&(w.test(n)||c.test(n))&&(J.lastIndex=t,e=J.exec(s))){t=J.lastIndex,n=e[0],a=!0,yield{type:"RegularExpressionLiteral",value:e[0],closed:e[1]!==void 0&&e[1]!=="\\"};continue}if(m.lastIndex=t,e=m.exec(s)){switch(h=e[0],$=m.lastIndex,l=h,h){case"(":n==="?NonExpressionParenKeyword"&&i.push({tag:"JSNonExpressionParen",nesting:T}),T++,a=!1;break;case")":T--,a=!0,r.tag==="JSNonExpressionParen"&&T===r.nesting&&(i.pop(),l="?NonExpressionParenEnd",a=!1);break;case"{":m.lastIndex=0,N=!L.test(n)&&(w.test(n)||c.test(n)),o.push(N),a=!1;break;case"}":switch(r.tag){case"InterpolationInTemplate":if(o.length===r.nesting){u.lastIndex=t,e=u.exec(s),t=u.lastIndex,n=e[0],e[1]==="${"?(n="?InterpolationInTemplate",a=!1,yield{type:"TemplateMiddle",value:e[0]}):(i.pop(),a=!0,yield{type:"TemplateTail",value:e[0],closed:e[1]==="`"});continue}break;case"InterpolationInJSX":if(o.length===r.nesting){i.pop(),t+=1,n="}",yield{type:"JSXPunctuator",value:"}"};continue}}a=o.pop(),l=a?"?ExpressionBraceEnd":"}";break;case"]":a=!0;break;case"++":case"--":l=a?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(q&&(w.test(n)||c.test(n))){i.push({tag:"JSXTag"}),t+=1,n="<",yield{type:"JSXPunctuator",value:h};continue}a=!1;break;default:a=!1}t=$,n=l,yield{type:"Punctuator",value:h};continue}if(f.lastIndex=t,e=f.exec(s)){switch(t=f.lastIndex,l=e[0],e[0]){case"for":case"if":case"while":case"with":n!=="."&&n!=="?."&&(l="?NonExpressionParenKeyword")}n=l,a=!c.test(e[0]),yield{type:e[1]==="#"?"PrivateIdentifier":"IdentifierName",value:e[0]};continue}if(k.lastIndex=t,e=k.exec(s)){t=k.lastIndex,n=e[0],a=!0,yield{type:"StringLiteral",value:e[0],closed:e[2]!==void 0};continue}if(v.lastIndex=t,e=v.exec(s)){t=v.lastIndex,n=e[0],a=!0,yield{type:"NumericLiteral",value:e[0]};continue}if(u.lastIndex=t,e=u.exec(s)){t=u.lastIndex,n=e[0],e[1]==="${"?(n="?InterpolationInTemplate",i.push({tag:"InterpolationInTemplate",nesting:o.length}),a=!1,yield{type:"TemplateHead",value:e[0]}):(a=!0,yield{type:"NoSubstitutionTemplate",value:e[0],closed:e[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(I.lastIndex=t,e=I.exec(s)){switch(t=I.lastIndex,l=e[0],e[0]){case"<":i.push({tag:"JSXTag"});break;case">":i.pop(),n==="/"||r.tag==="JSXTagEnd"?(l="?JSX",a=!0):i.push({tag:"JSXChildren"});break;case"{":i.push({tag:"InterpolationInJSX",nesting:o.length}),l="?InterpolationInJSX",a=!1;break;case"/":n==="<"&&(i.pop(),i[i.length-1].tag==="JSXChildren"&&i.pop(),i.push({tag:"JSXTagEnd"}))}n=l,yield{type:"JSXPunctuator",value:e[0]};continue}if(p.lastIndex=t,e=p.exec(s)){t=p.lastIndex,n=e[0],yield{type:"JSXIdentifier",value:e[0]};continue}if(x.lastIndex=t,e=x.exec(s)){t=x.lastIndex,n=e[0],yield{type:"JSXString",value:e[0],closed:e[2]!==void 0};continue}break;case"JSXChildren":if(y.lastIndex=t,e=y.exec(s)){t=y.lastIndex,n=e[0],yield{type:"JSXText",value:e[0]};continue}switch(s[t]){case"<":i.push({tag:"JSXTag"}),t++,n="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":i.push({tag:"InterpolationInJSX",nesting:o.length}),t++,n="?InterpolationInJSX",a=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(E.lastIndex=t,e=E.exec(s)){t=E.lastIndex,yield{type:"WhiteSpace",value:e[0]};continue}if(d.lastIndex=t,e=d.exec(s)){t=d.lastIndex,a=!1,g.test(n)&&(n="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:e[0]};continue}if(S.lastIndex=t,e=S.exec(s)){t=S.lastIndex,_.test(e[0])&&(a=!1,g.test(n)&&(n="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:e[0],closed:e[1]!==void 0};continue}if(X.lastIndex=t,e=X.exec(s)){t=X.lastIndex,a=!1,yield{type:"SingleLineComment",value:e[0]};continue}b=String.fromCodePoint(s.codePointAt(t)),t+=b.length,n=b,a=!1,yield{type:r.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:b}}},P}F();var M={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(M.keyword);new Set(M.strict);const A=Symbol("vitest:SAFE_TIMERS");function H(){const{setTimeout:f,setInterval:p,clearInterval:I,clearTimeout:x,setImmediate:y,clearImmediate:c,queueMicrotask:g}=globalThis[A]||globalThis,{nextTick:d}=globalThis[A]||globalThis.process||{nextTick:S=>S()};return{nextTick:d,setTimeout:f,setInterval:p,clearInterval:I,clearTimeout:x,setImmediate:y,clearImmediate:c,queueMicrotask:g}}export{H as getSafeTimers};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__require as s}from"../../../has-symbols@1.0
|
|
1
|
+
import{__require as s}from"../../../has-symbols@1.1.0/node_modules/has-symbols/shams.js";var r,a;function u(){if(a)return r;a=1;var e=s();return r=function(){return e()&&!!Symbol.toStringTag},r}export{u as __require};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{inspectList as l,truncator as h}from"./helpers.js";function f([e,t],r){return r.truncate-=3,t?`${r.stylize(String(e),"yellow")}=${r.stylize(`"${t}"`,"string")}`:`${r.stylize(String(e),"yellow")}`}function d(e,t){return l(e,t,y,`
|
|
2
|
+
`)}function y(e,t){switch(e.nodeType){case 1:return z(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function z(e,t){const r=e.getAttributeNames(),a=e.tagName.toLowerCase(),u=t.stylize(`<${a}`,"special"),s=t.stylize(">","special"),$=t.stylize(`</${a}>`,"special");t.truncate-=a.length*2+5;let c="";r.length>0&&(c+=" ",c+=l(r.map(i=>[i,e.getAttribute(i)]),t,f," ")),t.truncate-=c.length;const g=t.truncate;let n=d(e.children,t);return n&&n.length>g&&(n=`${h}(${e.children.length})`),`${u}${c}${s}${n}${$}`}export{z as default,f as inspectAttribute,y as inspectNode,d as inspectNodeCollection};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import j from"./array.js";import o from"./typedarray.js";import O from"./date.js";import m from"./function.js";import I from"./map.js";import y from"./number.js";import u from"./bigint.js";import z from"./regexp.js";import T from"./set.js";import a from"./string.js";import b from"./symbol.js";import h from"./promise.js";import k from"./class.js";import c from"./object.js";import C from"./arguments.js";import E from"./error.js";import L,{inspectNodeCollection as l}from"./html.js";import{normaliseOptions as W}from"./helpers.js";const B=typeof Symbol=="function"&&typeof Symbol.for=="function",p=B?Symbol.for("chai/inspect"):"@@chai/inspect",s=Symbol.for("nodejs.util.inspect.custom"),g=new WeakMap,S={},d={undefined:(t,r)=>r.stylize("undefined","undefined"),null:(t,r)=>r.stylize("null","null"),boolean:(t,r)=>r.stylize(String(t),"boolean"),Boolean:(t,r)=>r.stylize(String(t),"boolean"),number:y,Number:y,bigint:u,BigInt:u,string:a,String:a,function:m,Function:m,symbol:b,Symbol:b,Array:j,Date:O,Map:I,Set:T,RegExp:z,Promise:h,WeakSet:(t,r)=>r.stylize("WeakSet{…}","special"),WeakMap:(t,r)=>r.stylize("WeakMap{…}","special"),Arguments:C,Int8Array:o,Uint8Array:o,Uint8ClampedArray:o,Int16Array:o,Uint16Array:o,Int32Array:o,Uint32Array:o,Float32Array:o,Float64Array:o,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:E,HTMLCollection:l,NodeList:l},F=(t,r,n)=>p in t&&typeof t[p]=="function"?t[p](r):s in t&&typeof t[s]=="function"?t[s](r.depth,r):"inspect"in t&&typeof t.inspect=="function"?t.inspect(r.depth,r):"constructor"in t&&g.has(t.constructor)?g.get(t.constructor)(t,r):S[n]?S[n](t,r):"",H=Object.prototype.toString;function A(t,r={}){const n=W(r,A),{customInspect:M}=n;let i=t===null?"null":typeof t;if(i==="object"&&(i=H.call(t).slice(8,-1)),i in d)return d[i](t,n);if(M&&t){const e=F(t,n,i);if(e)return typeof e=="string"?e:A(e,n)}const f=t?Object.getPrototypeOf(t):!1;return f===Object.prototype||f===null?c(t,n):t&&typeof HTMLElement=="function"&&t instanceof HTMLElement?L(t,n):"constructor"in t?t.constructor!==Object?k(t,n):c(t,n):t===Object(t)?c(t,n):n.stylize(String(t),i)}export{A as default,A as inspect};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{getSafeTimers as a}from"../../../../../@vitest_utils@3.2.
|
|
1
|
+
import{getSafeTimers as a}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js";const u="__vitest_worker__";function o(){const t=globalThis[u];if(!t){const e=`Vitest failed to access its internal state.
|
|
2
2
|
|
|
3
3
|
One of the following is possible:
|
|
4
4
|
- "vitest" is imported directly without running "vitest" command
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var $t=Object.defineProperty;var Bt=(s,r,c)=>r in s?$t(s,r,{enumerable:!0,configurable:!0,writable:!0,value:c}):s[r]=c;var te=(s,r,c)=>Bt(s,typeof r!="symbol"?r+"":r,c);import{ASYMMETRIC_MATCHERS_OBJECT as Ht,getState as Pe,setState as Oe,addCustomEqualityTesters as Gt,customMatchers as Wt,GLOBAL_EXPECT as Ct,JestExtend as Ut,JestChaiExpect as Jt,JestAsymmetricMatchers as Kt,equals as Vt,iterableEquality as zt,subsetEquality as Qt}from"../../../../../@vitest_expect@3.2.
|
|
1
|
+
var $t=Object.defineProperty;var Bt=(s,r,c)=>r in s?$t(s,r,{enumerable:!0,configurable:!0,writable:!0,value:c}):s[r]=c;var te=(s,r,c)=>Bt(s,typeof r!="symbol"?r+"":r,c);import{ASYMMETRIC_MATCHERS_OBJECT as Ht,getState as Pe,setState as Oe,addCustomEqualityTesters as Gt,customMatchers as Wt,GLOBAL_EXPECT as Ct,JestExtend as Ut,JestChaiExpect as Jt,JestAsymmetricMatchers as Kt,equals as Vt,iterableEquality as zt,subsetEquality as Qt}from"../../../../../@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.js";import{E as Xt}from"../../../../../@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js";import{getSafeTimers as Ze}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/index.js";import{parseSingleStack as Yt}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/source-map.js";import{expect as xe,assert as Zt,util as Y,Assertion as er,use as he}from"../../../../../chai@5.2.0/node_modules/chai/chai.js";import{a as tr,g as et,w as rr,r as nr,i as Ft}from"./utils.XdZDrNZV.js";import{g as ir,c as Ye}from"./_commonjsHelpers.BFTU3MAI.js";import{stripSnapshotIndentation as st,addSerializer as or,SnapshotClient as sr}from"../../../../../@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js";import{fn as ar,spyOn as cr,mocks as Ce,isMockFunction as ur}from"../../../../../@vitest_spy@3.2.4/node_modules/@vitest/spy/dist/index.js";import{R as fr,r as lr,m as mr}from"./date.Bq6ZW5rf.js";import{assertTypes as dr,createSimpleStackTrace as pr}from"../../../../../@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/helpers.js";var oe={};const hr=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function yr(s){return function(c,m={}){var A;const t=((A=et().config.expect)==null?void 0:A.poll)??{},{interval:p=t.interval??50,timeout:l=t.timeout??1e3,message:o}=m,h=s(null,o).withContext({poll:!0});c=c.bind(h);const d=Y.flag(h,"vitest-test");if(!d)throw new Error("expect.poll() must be called inside a test");const I=new Proxy(h,{get(O,j,G){const x=Reflect.get(O,j,G);if(typeof x!="function")return x instanceof er?I:x;if(j==="assert")return x;if(typeof j=="string"&&hr.includes(j))throw new SyntaxError(`expect.poll() is not supported in combination with .${j}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...M){const C=new Error("STACK_TRACE_ERROR"),N=()=>new Promise((q,P)=>{let B,Q,R;const{setTimeout:ye,clearTimeout:re}=Ze(),ue=async()=>{try{Y.flag(h,"_name",j);const Z=await c();Y.flag(h,"object",Z),q(await x.call(h,...M)),re(B),re(Q)}catch(Z){R=Z,Y.flag(h,"_isLastPollAttempt")||(B=ye(ue,p))}};Q=ye(()=>{re(B),Y.flag(h,"_isLastPollAttempt",!0);const Z=fe=>{P(at(new Error("Matcher did not succeed in time.",{cause:fe}),C))};ue().then(()=>Z(R)).catch(fe=>Z(fe))},l),ue()});let J=!1;d.onFinished??(d.onFinished=[]),d.onFinished.push(()=>{if(!J){const q=Y.flag(h,"negate")?"not.":"",B=`expect.${Y.flag(h,"_poll.element")?"element(locator)":"poll(assertion)"}.${q}${String(j)}()`,Q=new Error(`${B} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
|
|
2
2
|
|
|
3
3
|
await ${B}
|
|
4
4
|
`);throw at(Q,C)}});let K;return{then(q,P){return J=!0,(K||(K=N())).then(q,P)},catch(q){return(K||(K=N())).catch(q)},finally(q){return(K||(K=N())).finally(q)},[Symbol.toStringTag]:"Promise"}}}});return I}}function at(s,r){return r.stack!==void 0&&(s.stack=r.stack.replace(r.message,s.message)),s}function Tr(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var we={exports:{}},wr=we.exports,ct;function vr(){return ct||(ct=1,function(s,r){(function(){(function(c){return typeof Tr=="function"?s.exports=c:chai.use(c)})(function(c,m){var f=c.Assertion,t=f.prototype;f.addMethod("containSubset",function(l){var o=m.flag(this,"object"),h=c.config.showDiff;t.assert.call(this,p(l,o),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",l,o,h)}),c.assert.containSubset=function(l,o,h){new c.Assertion(l,h).to.be.containSubset(o)};function p(l,o){if(l===o)return!0;if(typeof o!=typeof l)return!1;if(typeof l!="object"||l===null)return l===o;if(l&&!o)return!1;if(Array.isArray(l)){if(typeof o.length!="number")return!1;var h=Array.prototype.slice.call(o);return l.every(function(d){return h.some(function(I){return p(d,I)})})}return l instanceof Date?o instanceof Date?l.getTime()===o.getTime():!1:Object.keys(l).every(function(d){var I=l[d],A=o[d];return typeof I=="object"&&I!==null&&A!==null?p(I,A):typeof I=="function"?I(A):A===I})}})}).call(wr)}(we)),we.exports}var gr=vr(),kr=ir(gr);function br(s,r,c){const m=s.flag(r,"negate")?"not.":"",f=`${s.flag(r,"_name")}(expected)`,t=s.flag(r,"promise");return`expect(actual)${t?`.${t}`:""}.${m}${f}`}function Ir(s,r,c,m){const f=s;if(f&&r instanceof Promise){r=r.finally(()=>{if(!f.promises)return;const p=f.promises.indexOf(r);p!==-1&&f.promises.splice(p,1)}),f.promises||(f.promises=[]),f.promises.push(r);let t=!1;return f.onFinished??(f.onFinished=[]),f.onFinished.push(()=>{var p;if(!t){const o=(((p=globalThis.__vitest_worker__)==null?void 0:p.onFilterStackTrace)||(h=>h||""))(m.stack);console.warn([`Promise returned by \`${c}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{page as n}from"../node_modules/.pnpm/@vitest_browser@3.2.
|
|
1
|
+
import{page as n}from"../node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.3_typescript@5.8.3__playwright@1.52.0__92bd82dd7be5b309a69282d0a95f92e4/node_modules/@vitest/browser/context.js";import a from"../_virtual/axe.js";import{a as o}from"../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js";const p="Supercalifragilisticexpialidocious".repeat(10);async function u(e){return(await a.run(e)).violations}async function x(e){const t=await u(e);o(t,`Expected no axe core violations, but got ${t.length}`).toHaveLength(0)}function h(){return n.viewport(320,256)}function g(e){let t;if(e.scrollWidth!==0?t=e:e.shadowRoot?t=e.shadowRoot.firstElementChild:t=e.firstElementChild,t){const r=t.scrollWidth>t.clientWidth;return o(r).toBe(!1)}return o(!0).toBe(!1)}function w(e,t,r){var l;let i=e.querySelector(":focus-visible");if(i||(i=(l=e.shadowRoot)==null?void 0:l.querySelector(":focus-visible")),i){const s=getComputedStyle(i).getPropertyValue(t);return o(s).toContain(r)}return o(!0).toBe(!1)}export{w as expectComponentFocusStyle,g as expectComponentNotToHaveHorizontalScrollbar,x as expectNoAxeViolations,h as resizeWindowForReflowTest,u as runAxeAndGetViolations,p as superLongStringForReflowTest};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncino/web-components",
|
|
3
3
|
"author": "nCino",
|
|
4
|
-
"version": "4.3.0-preview.
|
|
4
|
+
"version": "4.3.0-preview.4",
|
|
5
5
|
"license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"conventional-changelog-conventionalcommits": "^9.0.0",
|
|
107
107
|
"custom-element-jet-brains-integration": "^1.7.0",
|
|
108
108
|
"custom-elements-manifest": "^2.1.0",
|
|
109
|
-
"eslint": "^9.
|
|
109
|
+
"eslint": "^9.29.0",
|
|
110
110
|
"eslint-config-standard": "^17.1.0",
|
|
111
111
|
"eslint-plugin-import": "^2.31.0",
|
|
112
112
|
"eslint-plugin-json": "^4.0.1",
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@ncino/web-components",
|
|
4
|
-
"version": "4.3.0-preview.
|
|
4
|
+
"version": "4.3.0-preview.3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.3/node_modules/@vitest/snapshot/dist/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.js","_virtual/sourcemap-codec.umd.js","node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js","_virtual/sourcemap-codec.umd2.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var ke=Object.defineProperty;var Ne=(t,e,n)=>e in t?ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var y=(t,e,n)=>Ne(t,typeof e!="symbol"?e+"":e,n);import{__vitePreload as Pe}from"../../../../../../../_virtual/preload-helper.js";import{format as Re,plugins as Ce}from"../../../../../@vitest_pretty-format@3.2.3/node_modules/@vitest/pretty-format/dist/index.js";import{r as Te}from"../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js";const Oe=44,ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae=new Uint8Array(64),Se=new Uint8Array(128);for(let t=0;t<ee.length;t++){const e=ee.charCodeAt(t);Ae[t]=e,Se[e]=t}function F(t,e){let n=0,s=0,i=0;do{const a=t.next();i=Se[a],n|=(i&31)<<s,s+=5}while(i&32);const r=n&1;return n>>>=1,r&&(n=-2147483648|-n),e+n}function te(t,e){return t.pos>=e?!1:t.peek()!==Oe}class Me{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:n,pos:s}=this,i=n.indexOf(e,s);return i===-1?n.length:i}}function Fe(t){const{length:e}=t,n=new Me(t),s=[];let i=0,r=0,a=0,l=0,o=0;do{const c=n.indexOf(";"),d=[];let p=!0,u=0;for(i=0;n.pos<c;){let S;i=F(n,i),i<u&&(p=!1),u=i,te(n,c)?(r=F(n,r),a=F(n,a),l=F(n,l),te(n,c)?(o=F(n,o),S=[i,r,a,l,o]):S=[i,r,a,l]):S=[i],d.push(S),n.pos++}p||Le(d),s.push(d),n.pos=c+1}while(n.pos<=e);return s}function Le(t){t.sort(Be)}function Be(t,e){return t[0]-e[0]}const De=/^[\w+.-]+:\/\//,Je=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Xe=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var v;(function(t){t[t.Empty=1]="Empty",t[t.Hash=2]="Hash",t[t.Query=3]="Query",t[t.RelativePath=4]="RelativePath",t[t.AbsolutePath=5]="AbsolutePath",t[t.SchemeRelative=6]="SchemeRelative",t[t.Absolute=7]="Absolute"})(v||(v={}));function je(t){return De.test(t)}function We(t){return t.startsWith("//")}function _e(t){return t.startsWith("/")}function Ke(t){return t.startsWith("file:")}function ne(t){return/^[.?#]/.test(t)}function B(t){const e=Je.exec(t);return ye(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}function Ue(t){const e=Xe.exec(t),n=e[2];return ye("file:","",e[1]||"","",_e(n)?n:"/"+n,e[3]||"",e[4]||"")}function ye(t,e,n,s,i,r,a){return{scheme:t,user:e,host:n,port:s,path:i,query:r,hash:a,type:v.Absolute}}function se(t){if(We(t)){const n=B("http:"+t);return n.scheme="",n.type=v.SchemeRelative,n}if(_e(t)){const n=B("http://foo.com"+t);return n.scheme="",n.host="",n.type=v.AbsolutePath,n}if(Ke(t))return Ue(t);if(je(t))return B(t);const e=B("http://foo.com/"+t);return e.scheme="",e.host="",e.type=t?t.startsWith("?")?v.Query:t.startsWith("#")?v.Hash:v.RelativePath:v.Empty,e}function qe(t){if(t.endsWith("/.."))return t;const e=t.lastIndexOf("/");return t.slice(0,e+1)}function ze(t,e){ve(e,e.type),t.path==="/"?t.path=e.path:t.path=qe(e.path)+t.path}function ve(t,e){const n=e<=v.RelativePath,s=t.path.split("/");let i=1,r=0,a=!1;for(let o=1;o<s.length;o++){const c=s[o];if(!c){a=!0;continue}if(a=!1,c!=="."){if(c===".."){r?(a=!0,r--,i--):n&&(s[i++]=c);continue}s[i++]=c,r++}}let l="";for(let o=1;o<i;o++)l+="/"+s[o];(!l||a&&!l.endsWith("/.."))&&(l+="/"),t.path=l}function He(t,e){if(!t&&!e)return"";const n=se(t);let s=n.type;if(e&&s!==v.Absolute){const r=se(e),a=r.type;switch(s){case v.Empty:n.hash=r.hash;case v.Hash:n.query=r.query;case v.Query:case v.RelativePath:ze(n,r);case v.AbsolutePath:n.user=r.user,n.host=r.host,n.port=r.port;case v.SchemeRelative:n.scheme=r.scheme}a>s&&(s=a)}ve(n,s);const i=n.query+n.hash;switch(s){case v.Hash:case v.Query:return i;case v.RelativePath:{const r=n.path.slice(1);return r?ne(e||t)&&!ne(r)?"./"+r+i:r+i:i||"."}case v.AbsolutePath:return n.path+i;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+i}}function ie(t,e){return e&&!e.endsWith("/")&&(e+="/"),He(t,e)}function Ge(t){if(!t)return"";const e=t.lastIndexOf("/");return t.slice(0,e+1)}const C=0,Ve=1,Qe=2,Ze=3,Ye=4;function et(t,e){const n=re(t,0);if(n===t.length)return t;e||(t=t.slice());for(let s=n;s<t.length;s=re(t,s+1))t[s]=nt(t[s],e);return t}function re(t,e){for(let n=e;n<t.length;n++)if(!tt(t[n]))return n;return t.length}function tt(t){for(let e=1;e<t.length;e++)if(t[e][C]<t[e-1][C])return!1;return!0}function nt(t,e){return e||(t=t.slice()),t.sort(st)}function st(t,e){return t[C]-e[C]}let X=!1;function it(t,e,n,s){for(;n<=s;){const i=n+(s-n>>1),r=t[i][C]-e;if(r===0)return X=!0,i;r<0?n=i+1:s=i-1}return X=!1,n-1}function rt(t,e,n){for(let s=n+1;s<t.length&&t[s][C]===e;n=s++);return n}function at(t,e,n){for(let s=n-1;s>=0&&t[s][C]===e;n=s--);return n}function ot(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function lt(t,e,n,s){const{lastKey:i,lastNeedle:r,lastIndex:a}=n;let l=0,o=t.length-1;if(s===i){if(e===r)return X=a!==-1&&t[a][C]===e,a;e>=r?l=a===-1?0:a:o=a}return n.lastKey=s,n.lastNeedle=e,n.lastIndex=it(t,e,l,o)}const ct="`line` must be greater than 0 (lines start at line 1)",ut="`column` must be greater than or equal to 0 (columns start at column 0)",ae=-1,ht=1;class dt{constructor(e,n){const s=typeof e=="string";if(!s&&e._decodedMemo)return e;const i=s?JSON.parse(e):e,{version:r,file:a,names:l,sourceRoot:o,sources:c,sourcesContent:d}=i;this.version=r,this.file=a,this.names=l||[],this.sourceRoot=o,this.sources=c,this.sourcesContent=d,this.ignoreList=i.ignoreList||i.x_google_ignoreList||void 0;const p=ie(o||"",Ge(n));this.resolvedSources=c.map(S=>ie(S||"",p));const{mappings:u}=i;typeof u=="string"?(this._encoded=u,this._decoded=void 0):(this._encoded=void 0,this._decoded=et(u,s)),this._decodedMemo=ot(),this._bySources=void 0,this._bySourceMemos=void 0}}function ft(t){var e;return(e=t)._decoded||(e._decoded=Fe(t._encoded))}function pt(t,e){let{line:n,column:s,bias:i}=e;if(n--,n<0)throw new Error(ct);if(s<0)throw new Error(ut);const r=ft(t);if(n>=r.length)return D(null,null,null,null);const a=r[n],l=mt(a,t._decodedMemo,n,s,i||ht);if(l===-1)return D(null,null,null,null);const o=a[l];if(o.length===1)return D(null,null,null,null);const{names:c,resolvedSources:d}=t;return D(d[o[Ve]],o[Qe]+1,o[Ze],o.length===5?c[o[Ye]]:null)}function D(t,e,n,s){return{source:t,line:e,column:n,name:s}}function mt(t,e,n,s,i){let r=lt(t,s,e,n);return X?r=(i===ae?rt:at)(t,s,r):i===ae&&r++,r===-1||r===t.length?-1:r}function xe(t){return t!=null}function gt(t){return t===null||typeof t!="function"&&typeof t!="object"}function J(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}function St(t){let e=-1,n=null,s=0,i=0,r=null;for(;e<=t.length;){r=t[e],e++;const a=t[e];if((a==='"'||a==="'"||a==="`")&&r!=="\\"&&(n===a?n=null:n||(n=a)),n||(a==="("&&s++,a===")"&&i++),s&&i&&s===i)return e}return null}const we=/^\s*at .*(?:\S:\d+|\(native\))/m,_t=/^(?:eval@)?(?:\[native code\])?$/,yt=["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/chunk-","/deps/@vitest","/deps/loupe","/deps/chai",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,/\/deps\/vitest_/];function Ie(t){if(!t.includes(":"))return[t];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/^\(|\)$/g,""));if(!n)return[t];let s=n[1];if(s.startsWith("async ")&&(s=s.slice(6)),s.startsWith("http:")||s.startsWith("https:")){const i=new URL(s);i.searchParams.delete("import"),i.searchParams.delete("browserv"),s=i.pathname+i.hash+i.search}if(s.startsWith("/@fs/")){const i=/^\/@fs\/[a-zA-Z]:\//.test(s);s=s.slice(i?5:4)}return[s,n[2]||void 0,n[3]||void 0]}function vt(t){let e=t.trim();if(_t.test(e)||(e.includes(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!e.includes("@")&&!e.includes(":")))return null;const n=/((.*".+"[^@]*)?[^@]*)(@)/,s=e.match(n),i=s&&s[1]?s[1]:void 0,[r,a,l]=Ie(e.replace(n,""));return!r||!a||!l?null:{file:r,method:i||"",line:Number.parseInt(a),column:Number.parseInt(l)}}function xt(t){let e=t.trim();if(!we.test(e))return null;e.includes("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const s=n.match(/ (\(.+\)$)/);n=s?n.replace(s[0],""):n;const[i,r,a]=Ie(s?s[1]:n);let l=s&&n||"",o=i&&["eval","<anonymous>"].includes(i)?void 0:i;return!o||!r||!a?null:(l.startsWith("async ")&&(l=l.slice(6)),o.startsWith("file://")&&(o=o.slice(7)),o=o.startsWith("node:")||o.startsWith("internal:")?o:Te(o),l&&(l=l.replace(/__vite_ssr_import_\d+__\./g,"")),{method:l,file:o,line:Number.parseInt(r),column:Number.parseInt(a)})}function j(t,e={}){const{ignoreStackEntries:n=yt}=e;return(we.test(t)?It(t):wt(t)).map(i=>{var r;e.getUrlId&&(i.file=e.getUrlId(i.file));const a=(r=e.getSourceMap)===null||r===void 0?void 0:r.call(e,i.file);if(!a||typeof a!="object"||!a.version)return oe(n,i.file)?null:i;const l=new dt(a),{line:o,column:c,source:d,name:p}=pt(l,i);let u=i.file;if(d){const S=i.file.startsWith("file://")?i.file:`file://${i.file}`,I=a.sourceRoot?new URL(a.sourceRoot,S):S;u=new URL(d,I).pathname,u.match(/\/\w:\//)&&(u=u.slice(1))}return oe(n,u)?null:o!=null&&c!=null?{line:o,column:c,file:u,method:p||i.method}:i}).filter(i=>i!=null)}function oe(t,e){return t.some(n=>e.match(n))}function wt(t){return t.split(`
|
|
3
|
-
`).map(e=>vt(e)).filter(xe)}function It(t){return t.split(`
|
|
4
|
-
`).map(e=>xt(e)).filter(xe)}function Et(t,e={}){if(!t||gt(t))return[];if(t.stacks)return t.stacks;const n=t.stack||"";let s=typeof n=="string"?j(n,e):[];if(!s.length){const i=t;i.fileName!=null&&i.lineNumber!=null&&i.columnNumber!=null&&(s=j(`${i.fileName}:${i.lineNumber}:${i.columnNumber}`,e)),i.sourceURL!=null&&i.line!=null&&i._column!=null&&(s=j(`${i.sourceURL}:${i.line}:${i.column}`,e))}return e.frameFilter&&(s=s.filter(i=>e.frameFilter(t,i)!==!1)),t.stacks=s,s}let bt=()=>"Promise{…}";try{const{getPromiseDetails:t,kPending:e,kRejected:n}=process.binding("util");Array.isArray(t(Promise.resolve()))&&(bt=(s,i)=>{const[r,a]=t(s);return r===e?"Promise{<pending>}":`Promise${r===n?"!":""}{${i.inspect(a,i)}}`})}catch{}let le=!1;try{const t=require("util");le=t.inspect?t.inspect.custom:!1}catch{le=!1}function $t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var W,ce;function kt(){if(ce)return W;ce=1;var t,e,n,s,i,r,a,l,o,c,d,p,u,S,I,b,$,E,k;return u=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,p=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,t=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,I=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,d=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,b=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,k=/[\t\v\f\ufeff\p{Zs}]+/yu,l=/\r?\n|[\r\u2028\u2029]/y,o=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,S=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,e=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,s=/(['"])(?:(?!\1)[^])*(\1)?/y,i=/[^<>{}]+/y,E=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,$=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,r=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,a=/^(?:return|throw|yield)$/,c=RegExp(l.source),W=function*(_,{jsx:T=!1}={}){var w,P,O,f,m,Z,h,R,Y,N,A,g,M,x;for({length:Z}=_,f=0,m="",x=[{tag:"JS"}],w=[],A=0,g=!1;f<Z;){switch(R=x[x.length-1],R.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(_[f]==="/"&&(E.test(m)||r.test(m))&&(u.lastIndex=f,h=u.exec(_))){f=u.lastIndex,m=h[0],g=!0,yield{type:"RegularExpressionLiteral",value:h[0],closed:h[1]!==void 0&&h[1]!=="\\"};continue}if(p.lastIndex=f,h=p.exec(_)){switch(M=h[0],Y=p.lastIndex,N=M,M){case"(":m==="?NonExpressionParenKeyword"&&x.push({tag:"JSNonExpressionParen",nesting:A}),A++,g=!1;break;case")":A--,g=!0,R.tag==="JSNonExpressionParen"&&A===R.nesting&&(x.pop(),N="?NonExpressionParenEnd",g=!1);break;case"{":p.lastIndex=0,O=!$.test(m)&&(E.test(m)||r.test(m)),w.push(O),g=!1;break;case"}":switch(R.tag){case"InterpolationInTemplate":if(w.length===R.nesting){b.lastIndex=f,h=b.exec(_),f=b.lastIndex,m=h[0],h[1]==="${"?(m="?InterpolationInTemplate",g=!1,yield{type:"TemplateMiddle",value:h[0]}):(x.pop(),g=!0,yield{type:"TemplateTail",value:h[0],closed:h[1]==="`"});continue}break;case"InterpolationInJSX":if(w.length===R.nesting){x.pop(),f+=1,m="}",yield{type:"JSXPunctuator",value:"}"};continue}}g=w.pop(),N=g?"?ExpressionBraceEnd":"}";break;case"]":g=!0;break;case"++":case"--":N=g?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(T&&(E.test(m)||r.test(m))){x.push({tag:"JSXTag"}),f+=1,m="<",yield{type:"JSXPunctuator",value:M};continue}g=!1;break;default:g=!1}f=Y,m=N,yield{type:"Punctuator",value:M};continue}if(t.lastIndex=f,h=t.exec(_)){switch(f=t.lastIndex,N=h[0],h[0]){case"for":case"if":case"while":case"with":m!=="."&&m!=="?."&&(N="?NonExpressionParenKeyword")}m=N,g=!r.test(h[0]),yield{type:h[1]==="#"?"PrivateIdentifier":"IdentifierName",value:h[0]};continue}if(I.lastIndex=f,h=I.exec(_)){f=I.lastIndex,m=h[0],g=!0,yield{type:"StringLiteral",value:h[0],closed:h[2]!==void 0};continue}if(d.lastIndex=f,h=d.exec(_)){f=d.lastIndex,m=h[0],g=!0,yield{type:"NumericLiteral",value:h[0]};continue}if(b.lastIndex=f,h=b.exec(_)){f=b.lastIndex,m=h[0],h[1]==="${"?(m="?InterpolationInTemplate",x.push({tag:"InterpolationInTemplate",nesting:w.length}),g=!1,yield{type:"TemplateHead",value:h[0]}):(g=!0,yield{type:"NoSubstitutionTemplate",value:h[0],closed:h[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(n.lastIndex=f,h=n.exec(_)){switch(f=n.lastIndex,N=h[0],h[0]){case"<":x.push({tag:"JSXTag"});break;case">":x.pop(),m==="/"||R.tag==="JSXTagEnd"?(N="?JSX",g=!0):x.push({tag:"JSXChildren"});break;case"{":x.push({tag:"InterpolationInJSX",nesting:w.length}),N="?InterpolationInJSX",g=!1;break;case"/":m==="<"&&(x.pop(),x[x.length-1].tag==="JSXChildren"&&x.pop(),x.push({tag:"JSXTagEnd"}))}m=N,yield{type:"JSXPunctuator",value:h[0]};continue}if(e.lastIndex=f,h=e.exec(_)){f=e.lastIndex,m=h[0],yield{type:"JSXIdentifier",value:h[0]};continue}if(s.lastIndex=f,h=s.exec(_)){f=s.lastIndex,m=h[0],yield{type:"JSXString",value:h[0],closed:h[2]!==void 0};continue}break;case"JSXChildren":if(i.lastIndex=f,h=i.exec(_)){f=i.lastIndex,m=h[0],yield{type:"JSXText",value:h[0]};continue}switch(_[f]){case"<":x.push({tag:"JSXTag"}),f++,m="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":x.push({tag:"InterpolationInJSX",nesting:w.length}),f++,m="?InterpolationInJSX",g=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(k.lastIndex=f,h=k.exec(_)){f=k.lastIndex,yield{type:"WhiteSpace",value:h[0]};continue}if(l.lastIndex=f,h=l.exec(_)){f=l.lastIndex,g=!1,a.test(m)&&(m="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:h[0]};continue}if(o.lastIndex=f,h=o.exec(_)){f=o.lastIndex,c.test(h[0])&&(g=!1,a.test(m)&&(m="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:h[0],closed:h[1]!==void 0};continue}if(S.lastIndex=f,h=S.exec(_)){f=S.lastIndex,g=!1,yield{type:"SingleLineComment",value:h[0]};continue}P=String.fromCodePoint(_.codePointAt(f)),f+=P.length,m=P,g=!1,yield{type:R.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:P}}},W}kt();var Ee={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(Ee.keyword);new Set(Ee.strict);var Nt={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[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],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},Pt=Object.entries(Nt);function z(t){return String(t)}z.open="";z.close="";function Rt(t=!1){let e=typeof process<"u"?process:void 0,n=(e==null?void 0:e.env)||{},s=(e==null?void 0:e.argv)||[];return!("NO_COLOR"in n||s.includes("--no-color"))&&("FORCE_COLOR"in n||s.includes("--color")||(e==null?void 0:e.platform)==="win32"||t&&n.TERM!=="dumb"||"CI"in n)||typeof window<"u"&&!!window.chrome}function Ct(t=!1){let e=Rt(t),n=(a,l,o,c)=>{let d="",p=0;do d+=a.substring(p,c)+o,p=c+l.length,c=a.indexOf(l,p);while(~c);return d+a.substring(p)},s=(a,l,o=a)=>{let c=d=>{let p=String(d),u=p.indexOf(l,a.length);return~u?a+n(p,l,o,u)+l:a+p+l};return c.open=a,c.close=l,c},i={isColorSupported:e},r=a=>`\x1B[${a}m`;for(let[a,l]of Pt)i[a]=e?s(r(l[0]),r(l[1]),l[2]):z;return i}Ct();const H=/\r?\n/;function Tt(t,e,n){const s=t.split(H),i=/\r\n/.test(t)?2:1;let r=0;if(e>s.length)return t.length;for(let a=0;a<e-1;a++)r+=s[a].length+i;return r+n}function Ot(t,e){if(e>t.length)throw new Error(`offset is longer than source length! offset ${e} > length ${t.length}`);const n=t.split(H),s=/\r\n/.test(t)?2:1;let i=0,r=0;for(;r<n.length;r++){const a=n[r].length+s;if(i+a>=e)break;i+=a}return r+1}async function At(t,e){const n=(await Pe(async()=>{const{default:i}=await import("../../../../../magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.js");return{default:i}},__vite__mapDeps([0,1,2,3]))).default,s=new Set(e.map(i=>i.file));await Promise.all(Array.from(s).map(async i=>{const r=e.filter(c=>c.file===i),a=await t.readSnapshotFile(i),l=new n(a);for(const c of r){const d=Tt(a,c.line,c.column);Jt(a,l,d,c.snapshot)}const o=l.toString();o!==a&&await t.saveSnapshotFile(i,o)}))}const Mt=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Ft(t,e,n,s){let i=t.slice(n);const r=Mt.exec(i);if(!r)return!1;i=i.slice(r.index);let a=St(i);if(a===null)return!1;a+=n+r.index;const l=n+r.index+r[0].length,o=Lt(t,l),c=`, ${be(s,t,n)}`;return o===a?e.appendLeft(a,c):e.overwrite(o,a,c),!0}function Lt(t,e){let n=1,s=0;for(;n!==s&&e<t.length;){const i=t[e++];i==="{"?n++:i==="}"&&s++}return e}function be(t,e,n){const s=Ot(e,n),r=e.split(H)[s-1].match(/^\s*/)[0]||"",a=r.includes(" ")?`${r} `:`${r} `,l=t.trim().replace(/\\/g,"\\\\").split(/\n/g),o=l.length<=1,c="`";return o?`${c}${l.join(`
|
|
5
|
-
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${c}`:`${c}
|
|
6
|
-
${l.map(d=>d?a+d:"").join(`
|
|
7
|
-
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
8
|
-
${r}${c}`}const ue="toMatchInlineSnapshot",he="toThrowErrorMatchingInlineSnapshot";function Bt(t,e){const n=e-ue.length;if(t.slice(n,e)===ue)return{code:t.slice(n),index:n};const s=e-he.length;return t.slice(e-s,e)===he?{code:t.slice(e-s),index:e-s}:{code:t.slice(e),index:e}}const Dt=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;function Jt(t,e,n,s){const{code:i,index:r}=Bt(t,n),a=Dt.exec(i),l=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(i);if(!a||a.index!==(l==null?void 0:l.index))return Ft(t,e,r,s);const o=a[1],c=r+a.index+a[0].length,d=be(s,t,r);if(o===")")return e.appendRight(c-1,d),!0;const u=new RegExp(`(?:^|[^\\\\])${o}`).exec(t.slice(c));if(!u)return!1;const S=c+u.index+u[0].length;return e.overwrite(c-1,S,d),!0}const Xt=/^([^\S\n]*)\S/m;function gn(t){const e=t.match(Xt);if(!e||!e[1])return t;const n=e[1],s=t.split(/\n/g);if(s.length<=2||s[0].trim()!==""||s[s.length-1].trim()!=="")return t;for(let i=1;i<s.length-1;i++)if(s[i]!==""){if(s[i].indexOf(n)!==0)return t;s[i]=s[i].substring(n.length)}return s[s.length-1]="",t=s.join(`
|
|
9
|
-
`),t}async function jt(t,e){await Promise.all(e.map(async n=>{n.readonly||await t.saveSnapshotFile(n.file,n.snapshot)}))}var K={exports:{}},de;function Wt(){if(de)return K.exports;de=1;/*
|
|
10
|
-
* @version 1.4.0
|
|
11
|
-
* @date 2015-10-26
|
|
12
|
-
* @stability 3 - Stable
|
|
13
|
-
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
14
|
-
* @license MIT License
|
|
15
|
-
*/var t=function(e,n){var s,i,r=1,a=0,l=0,o=String.alphabet;function c(d,p,u){if(u){for(s=p;u=c(d,s),u<76&&u>65;)++s;return+d.slice(p-1,s)}return u=o&&o.indexOf(d.charAt(p)),u>-1?u+76:(u=d.charCodeAt(p)||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+="")!=(n+="")){for(;r;)if(i=c(e,a++),r=c(n,l++),i<76&&r<76&&i>66&&r>66&&(i=c(e,a,a),r=c(n,l,a=s),l=s),i!=r)return i<r?-1:1}return 0};try{K.exports=t}catch{String.naturalCompare=t}return K.exports}var Kt=Wt(),Ut=$t(Kt);const qt=(t,e,n,s,i,r)=>{const a=t.getMockName(),l=a==="vi.fn()"?"":` ${a}`;let o="";if(t.mock.calls.length!==0){const c=n+e.indent;o=` {${e.spacingOuter}${c}"calls": ${r(t.mock.calls,e,c,s,i)}${e.min?", ":","}${e.spacingOuter}${c}"results": ${r(t.mock.results,e,c,s,i)}${e.min?"":","}${e.spacingOuter}${n}}`}return`[MockFunction${l}]${o}`},zt=t=>t&&!!t._isMockFunction,Ht={serialize:qt,test:zt},{DOMCollection:Gt,DOMElement:Vt,Immutable:Qt,ReactElement:Zt,ReactTestComponent:Yt,AsymmetricMatcher:en}=Ce;let U=[Yt,Zt,Vt,Gt,Qt,en,Ht];function Sn(t){U=[t].concat(U)}function tn(){return U}function nn(t,e){return`${t} ${e}`}function sn(t){if(!/ \d+$/.test(t))throw new Error("Snapshot keys must end with a number.");return t.replace(/ \d+$/,"")}function rn(t,e){const n=e.updateSnapshot,s=Object.create(null);let i="",r=!1;if(t!=null)try{i=t,new Function("exports",i)(s)}catch{}return(n==="all"||n==="new")&&i&&(r=!0),{data:s,dirty:r}}function an(t){return t.includes(`
|
|
16
|
-
`)?`
|
|
17
|
-
${t}
|
|
18
|
-
`:t}function fe(t){return t.length>2&&t.startsWith(`
|
|
19
|
-
`)&&t.endsWith(`
|
|
20
|
-
`)?t.slice(1,-1):t}const on=!0,ln=!1;function cn(t,e=2,n={}){return G(Re(t,{escapeRegex:on,indent:e,plugins:tn(),printFunctionName:ln,...n}))}function un(t){return t.replace(/`|\\|\$\{/g,"\\$&")}function pe(t){return`\`${un(t)}\``}function G(t){return t.replace(/\r\n|\r/g,`
|
|
21
|
-
`)}async function hn(t,e,n){const s=Object.keys(e).sort(Ut).map(l=>`exports[${pe(l)}] = ${pe(G(e[l]))};`),i=`${t.getHeader()}
|
|
22
|
-
|
|
23
|
-
${s.join(`
|
|
24
|
-
|
|
25
|
-
`)}
|
|
26
|
-
`,r=await t.readSnapshotFile(n);r!=null&&r===i||await t.saveSnapshotFile(n,i)}function q(t=[],e=[]){const n=Array.from(t);return e.forEach((s,i)=>{const r=n[i];Array.isArray(t[i])?n[i]=q(t[i],s):J(r)?n[i]=V(t[i],s):n[i]=s}),n}function V(t,e){if(J(t)&&J(e)){const n={...t};return Object.keys(e).forEach(s=>{J(e[s])&&!e[s].$$typeof?s in t?n[s]=V(t[s],e[s]):Object.assign(n,{[s]:e[s]}):Array.isArray(e[s])?n[s]=q(t[s],e[s]):Object.assign(n,{[s]:e[s]})}),n}else if(Array.isArray(t)&&Array.isArray(e))return q(t,e);return t}class $e extends Map{constructor(e,n){super(n),this.defaultFn=e}get(e){return this.has(e)||this.set(e,this.defaultFn(e)),super.get(e)}}class L extends $e{constructor(){super(()=>0);y(this,"_total")}valueOf(){return this._total=this.total()}increment(n){typeof this._total<"u"&&this._total++,this.set(n,this.get(n)+1)}total(){if(typeof this._total<"u")return this._total;let n=0;for(const s of this.values())n+=s;return n}}function me(t,e){return t.file===e.file&&t.column===e.column&&t.line===e.line}class Q{constructor(e,n,s,i){y(this,"_counters",new L);y(this,"_dirty");y(this,"_updateSnapshot");y(this,"_snapshotData");y(this,"_initialData");y(this,"_inlineSnapshots");y(this,"_inlineSnapshotStacks");y(this,"_testIdToKeys",new $e(()=>[]));y(this,"_rawSnapshots");y(this,"_uncheckedKeys");y(this,"_snapshotFormat");y(this,"_environment");y(this,"_fileExists");y(this,"expand");y(this,"_added",new L);y(this,"_matched",new L);y(this,"_unmatched",new L);y(this,"_updated",new L);this.testFilePath=e,this.snapshotPath=n;const{data:r,dirty:a}=rn(s,i);this._fileExists=s!=null,this._initialData={...r},this._snapshotData={...r},this._dirty=a,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=i.expand||!1,this._updateSnapshot=i.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,...i.snapshotFormat},this._environment=i.snapshotEnvironment}get added(){return this._added}set added(e){this._added._total=e}get matched(){return this._matched}set matched(e){this._matched._total=e}get unmatched(){return this._unmatched}set unmatched(e){this._unmatched._total=e}get updated(){return this._updated}set updated(e){this._updated._total=e}static async create(e,n){const s=await n.snapshotEnvironment.resolvePath(e),i=await n.snapshotEnvironment.readSnapshotFile(s);return new Q(e,s,i,n)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(e){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(e.length))&&this._uncheckedKeys.delete(n)})}clearTest(e){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==e),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==e);for(const n of this._testIdToKeys.get(e)){const s=sn(n),i=this._counters.get(s);i>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(s,i-1))}this._testIdToKeys.delete(e),this.added.delete(e),this.updated.delete(e),this.matched.delete(e),this.unmatched.delete(e)}_inferInlineSnapshotStack(e){const n=e.findIndex(i=>i.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return e[n+3];const s=e.findIndex(i=>i.method.includes("__INLINE_SNAPSHOT__"));return s!==-1?e[s+2]:null}_addSnapshot(e,n,s){this._dirty=!0,s.stack?this._inlineSnapshots.push({snapshot:n,testId:s.testId,...s.stack}):s.rawSnapshot?this._rawSnapshots.push({...s.rawSnapshot,snapshot:n}):this._snapshotData[e]=n}async save(){const e=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,s=this._rawSnapshots.length,i=!e&&!n&&!s,r={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!i?(e&&(await hn(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await At(this._environment,this._inlineSnapshots),s&&await jt(this._environment,this._rawSnapshots),r.saved=!0):!e&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),r.deleted=!0),r}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(e=>delete this._snapshotData[e]),this._uncheckedKeys.clear())}match({testId:e,testName:n,received:s,key:i,inlineSnapshot:r,isInline:a,error:l,rawSnapshot:o}){this._counters.increment(n);const c=this._counters.get(n);i||(i=nn(n,c)),this._testIdToKeys.get(e).push(i),a&&this._snapshotData[i]!==void 0||this._uncheckedKeys.delete(i);let d=o&&typeof s=="string"?s:cn(s,void 0,this._snapshotFormat);o||(d=an(d)),o&&o.content&&o.content.match(/\r\n/)&&!d.match(/\r\n/)&&(o.content=G(o.content));const p=a?r:o?o.content:this._snapshotData[i],u=o?p:p==null?void 0:p.trim(),S=u===(o?d:d.trim()),I=p!==void 0,b=a||this._fileExists||o&&o.content!=null;S&&!a&&!o&&(this._snapshotData[i]=d);let $;if(a){var E,k;const _=Et(l||new Error("snapshot"),{ignoreStackEntries:[]}),T=this._inferInlineSnapshotStack(_);if(!T)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
27
|
-
${JSON.stringify(_)}`);$=((E=(k=this.environment).processStackTrace)===null||E===void 0?void 0:E.call(k,T))||T,$.column--;const w=this._inlineSnapshotStacks.filter(P=>me(P,$));if(w.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(O=>!me(O,$));const P=w.find(O=>O.snapshot!==d);if(P)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:d,expected:P.snapshot})}this._inlineSnapshotStacks.push({...$,testId:e,snapshot:d})}return I&&this._updateSnapshot==="all"||(!I||!b)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?S?this.matched.increment(e):(I?this.updated.increment(e):this.added.increment(e),this._addSnapshot(i,d,{stack:$,testId:e,rawSnapshot:o})):(this._addSnapshot(i,d,{stack:$,testId:e,rawSnapshot:o}),this.added.increment(e)),{actual:"",count:c,expected:"",key:i,pass:!0}):S?(this.matched.increment(e),{actual:"",count:c,expected:"",key:i,pass:!0}):(this.unmatched.increment(e),{actual:o?d:fe(d),count:c,expected:u!==void 0?o?u:fe(u):void 0,key:i,pass:!1})}async pack(){const e={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 i=await this.save();return e.fileDeleted=i.deleted,e.added=this.added.total(),e.matched=this.matched.total(),e.unmatched=this.unmatched.total(),e.updated=this.updated.total(),e.unchecked=i.deleted?0:n,e.uncheckedKeys=Array.from(s),e}}function ge(t,e,n,s){const i=new Error(t);return Object.defineProperty(i,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"expected",{value:s,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"diffOptions",{value:{expand:e}}),i}class _n{constructor(e={}){y(this,"snapshotStateMap",new Map);this.options=e}async setup(e,n){this.snapshotStateMap.has(e)||this.snapshotStateMap.set(e,await Q.create(e,n))}async finish(e){const s=await this.getSnapshotState(e).pack();return this.snapshotStateMap.delete(e),s}skipTest(e,n){this.getSnapshotState(e).markSnapshotsAsCheckedForTest(n)}clearTest(e,n){this.getSnapshotState(e).clearTest(n)}getSnapshotState(e){const n=this.snapshotStateMap.get(e);if(!n)throw new Error(`The snapshot state for '${e}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}assert(e){const{filepath:n,name:s,testId:i=s,message:r,isInline:a=!1,properties:l,inlineSnapshot:o,error:c,errorMessage:d,rawSnapshot:p}=e;let{received:u}=e;if(!n)throw new Error("Snapshot cannot be used outside of test");const S=this.getSnapshotState(n);if(typeof l=="object"){if(typeof u!="object"||!u)throw new Error("Received value must be an object when the matcher has properties");try{var I,b;if(((I=(b=this.options).isEqual)===null||I===void 0?void 0:I.call(b,u,l))??!1)u=V(u,l);else throw ge("Snapshot properties mismatched",S.expand,u,l)}catch(w){throw w.message=d||"Snapshot mismatched",w}}const $=[s,...r?[r]:[]].join(" > "),{actual:E,expected:k,key:_,pass:T}=S.match({testId:i,testName:$,received:u,isInline:a,error:c,inlineSnapshot:o,rawSnapshot:p});if(!T)throw ge(`Snapshot \`${_||"unknown"}\` mismatched`,S.expand,p?E:E==null?void 0:E.trim(),p?k:k==null?void 0:k.trim())}async assertRaw(e){if(!e.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:n,rawSnapshot:s}=e;if(s.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");const i=this.getSnapshotState(n);e.filepath||(e.filepath=n),s.file=await i.environment.resolveRawPath(n,s.file),s.content=await i.environment.readSnapshotFile(s.file)??void 0}return this.assert(e)}clear(){this.snapshotStateMap.clear()}}export{_n as SnapshotClient,Q as SnapshotState,Sn as addSerializer,tn as getSerializers,gn as stripSnapshotIndentation};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{internalSpyOn as d,getInternalState as I}from"../../../../../tinyspy@4.0.3/node_modules/tinyspy/dist/index.js";const R=new Set;function j(o){return typeof o=="function"&&"_isMockFunction"in o&&o._isMockFunction}function P(o,e,n){const l=n?{[{get:"getter",set:"setter"}[n]]:e}:e;let i;const s=b(o,e),m=s&&s[n||"value"];j(m)&&(i=m.mock._state());const r=d(o,l),u=O(r);return i&&u.mock._state(i),u}let C=0;function O(o){const e=o;let n,c=[],l=!1,i=[],s=[],m=[];const r=I(o),u={get calls(){return r.calls},get contexts(){return s},get instances(){return i},get invocationCallOrder(){return m},get results(){return r.results.map(([t,a])=>({type:t==="error"?"throw":"return",value:a}))},get settledResults(){return r.resolves.map(([t,a])=>({type:t==="error"?"rejected":"fulfilled",value:a}))},get lastCall(){return r.calls[r.calls.length-1]},_state(t){return t&&(n=t.implementation,c=t.onceImplementations,l=t.implementationChangedTemporarily),{implementation:n,onceImplementations:c,implementationChangedTemporarily:l}}};function k(...t){return i.push(this),s.push(this),m.push(++C),(l?n:c.shift()||n||r.getOriginal()||(()=>{})).apply(this,t)}let g=e.name;e.getMockName=()=>g||"vi.fn()",e.mockName=t=>(g=t,e),e.mockClear=()=>(r.reset(),i=[],s=[],m=[],e),e.mockReset=()=>(e.mockClear(),n=void 0,c=[],e),e.mockRestore=()=>(e.mockReset(),r.restore(),e),Symbol.dispose&&(e[Symbol.dispose]=()=>e.mockRestore()),e.getMockImplementation=()=>l?n:c.at(0)||n,e.mockImplementation=t=>(n=t,r.willCall(k),e),e.mockImplementationOnce=t=>(c.push(t),e);function h(t,a){const f=n;n=t,r.willCall(k),l=!0;const y=()=>{n=f,l=!1},p=a();return typeof p=="object"&&p&&typeof p.then=="function"?p.then(()=>(y(),e)):(y(),e)}return e.withImplementation=h,e.mockReturnThis=()=>e.mockImplementation(function(){return this}),e.mockReturnValue=t=>e.mockImplementation(()=>t),e.mockReturnValueOnce=t=>e.mockImplementationOnce(()=>t),e.mockResolvedValue=t=>e.mockImplementation(()=>Promise.resolve(t)),e.mockResolvedValueOnce=t=>e.mockImplementationOnce(()=>Promise.resolve(t)),e.mockRejectedValue=t=>e.mockImplementation(()=>Promise.reject(t)),e.mockRejectedValueOnce=t=>e.mockImplementationOnce(()=>Promise.reject(t)),Object.defineProperty(e,"mock",{get:()=>u}),r.willCall(k),R.add(e),e}function v(o){const e=O(d({spy:o||function(){}},"spy"));return o&&e.mockImplementation(o),e}function b(o,e){const n=Object.getOwnPropertyDescriptor(o,e);if(n)return n;let c=Object.getPrototypeOf(o);for(;c!==null;){const l=Object.getOwnPropertyDescriptor(c,e);if(l)return l;c=Object.getPrototypeOf(c)}}export{v as fn,j as isMockFunction,R as mocks,P as spyOn};
|
package/dist/node_modules/.pnpm/@vitest_utils@3.2.3/node_modules/@vitest/utils/dist/error.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{printDiffOrStringify as a}from"./diff.js";import{s as c,f as p}from"./chunk-_commonjsHelpers.js";import"../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js";import"../../../../../loupe@3.1.3/node_modules/loupe/lib/index.js";const m="@@__IMMUTABLE_RECORD__@@",g="@@__IMMUTABLE_ITERABLE__@@";function y(t){return t&&(t[g]||t[m])}const d=Object.getPrototypeOf({});function u(t){return t instanceof Error?`<unserializable>: ${t.message}`:typeof t=="string"?`<unserializable>: ${t}`:"<unserializable>"}function o(t,n=new WeakMap){if(!t||typeof t=="string")return t;if(t instanceof Error&&"toJSON"in t&&typeof t.toJSON=="function"){const r=t.toJSON();return r&&r!==t&&typeof r=="object"&&(typeof t.message=="string"&&s(()=>r.message??(r.message=t.message)),typeof t.stack=="string"&&s(()=>r.stack??(r.stack=t.stack)),typeof t.name=="string"&&s(()=>r.name??(r.name=t.name)),t.cause!=null&&s(()=>r.cause??(r.cause=o(t.cause,n)))),o(r,n)}if(typeof t=="function")return`Function<${t.name||"anonymous"}>`;if(typeof t=="symbol")return t.toString();if(typeof t!="object")return t;if(y(t))return o(t.toJSON(),n);if(t instanceof Promise||t.constructor&&t.constructor.prototype==="AsyncFunction")return"Promise";if(typeof Element<"u"&&t instanceof Element)return t.tagName;if(typeof t.asymmetricMatch=="function")return`${t.toString()} ${p(t.sample)}`;if(typeof t.toJSON=="function")return o(t.toJSON(),n);if(n.has(t))return n.get(t);if(Array.isArray(t)){const r=new Array(t.length);return n.set(t,r),t.forEach((e,i)=>{try{r[i]=o(e,n)}catch(f){r[i]=u(f)}}),r}else{const r=Object.create(null);n.set(t,r);let e=t;for(;e&&e!==d;)Object.getOwnPropertyNames(e).forEach(i=>{if(!(i in r))try{r[i]=o(t[i],n)}catch(f){delete r[i],r[i]=u(f)}}),e=Object.getPrototypeOf(e);return r}}function s(t){try{return t()}catch{}}function O(t){return t.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function _(t,n,r=new WeakSet){if(!t||typeof t!="object")return{message:String(t)};const e=t;(e.showDiff||e.showDiff===void 0&&e.expected!==void 0&&e.actual!==void 0)&&(e.diff=a(e.actual,e.expected,{...n,...e.diffOptions})),"expected"in e&&typeof e.expected!="string"&&(e.expected=c(e.expected,10)),"actual"in e&&typeof e.actual!="string"&&(e.actual=c(e.actual,10));try{typeof e.message=="string"&&(e.message=O(e.message))}catch{}try{!r.has(e)&&typeof e.cause=="object"&&(r.add(e),e.cause=_(e.cause,n,r))}catch{}try{return o(e)}catch(i){return o(new Error(`Failed to fully serialize error: ${i==null?void 0:i.message}
|
|
2
|
-
Inner error message: ${e==null?void 0:e.message}`))}}export{_ as processError,o as serializeError,o as serializeValue};
|
package/dist/node_modules/.pnpm/@vitest_utils@3.2.3/node_modules/@vitest/utils/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../../../../tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.js";import"../../../../../loupe@3.1.3/node_modules/loupe/lib/index.js";var P,D;function F(){if(D)return P;D=1;var f,p,I,x,y,c,g,d,S,_,v,m,J,X,k,u,L,w,E;return J=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,m=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,f=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,k=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,v=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,u=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,E=/[\t\v\f\ufeff\p{Zs}]+/yu,d=/\r?\n|[\r\u2028\u2029]/y,S=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,X=/\/\/.*/y,I=/[<>.:={}]|\/(?![\/*])/y,p=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,x=/(['"])(?:(?!\1)[^])*(\1)?/y,y=/[^<>{}]+/y,w=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,L=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,c=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,g=/^(?:return|throw|yield)$/,_=RegExp(d.source),P=function*(s,{jsx:q=!1}={}){var o,b,N,t,n,C,e,r,$,l,T,a,h,i;for({length:C}=s,t=0,n="",i=[{tag:"JS"}],o=[],T=0,a=!1;t<C;){switch(r=i[i.length-1],r.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(s[t]==="/"&&(w.test(n)||c.test(n))&&(J.lastIndex=t,e=J.exec(s))){t=J.lastIndex,n=e[0],a=!0,yield{type:"RegularExpressionLiteral",value:e[0],closed:e[1]!==void 0&&e[1]!=="\\"};continue}if(m.lastIndex=t,e=m.exec(s)){switch(h=e[0],$=m.lastIndex,l=h,h){case"(":n==="?NonExpressionParenKeyword"&&i.push({tag:"JSNonExpressionParen",nesting:T}),T++,a=!1;break;case")":T--,a=!0,r.tag==="JSNonExpressionParen"&&T===r.nesting&&(i.pop(),l="?NonExpressionParenEnd",a=!1);break;case"{":m.lastIndex=0,N=!L.test(n)&&(w.test(n)||c.test(n)),o.push(N),a=!1;break;case"}":switch(r.tag){case"InterpolationInTemplate":if(o.length===r.nesting){u.lastIndex=t,e=u.exec(s),t=u.lastIndex,n=e[0],e[1]==="${"?(n="?InterpolationInTemplate",a=!1,yield{type:"TemplateMiddle",value:e[0]}):(i.pop(),a=!0,yield{type:"TemplateTail",value:e[0],closed:e[1]==="`"});continue}break;case"InterpolationInJSX":if(o.length===r.nesting){i.pop(),t+=1,n="}",yield{type:"JSXPunctuator",value:"}"};continue}}a=o.pop(),l=a?"?ExpressionBraceEnd":"}";break;case"]":a=!0;break;case"++":case"--":l=a?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(q&&(w.test(n)||c.test(n))){i.push({tag:"JSXTag"}),t+=1,n="<",yield{type:"JSXPunctuator",value:h};continue}a=!1;break;default:a=!1}t=$,n=l,yield{type:"Punctuator",value:h};continue}if(f.lastIndex=t,e=f.exec(s)){switch(t=f.lastIndex,l=e[0],e[0]){case"for":case"if":case"while":case"with":n!=="."&&n!=="?."&&(l="?NonExpressionParenKeyword")}n=l,a=!c.test(e[0]),yield{type:e[1]==="#"?"PrivateIdentifier":"IdentifierName",value:e[0]};continue}if(k.lastIndex=t,e=k.exec(s)){t=k.lastIndex,n=e[0],a=!0,yield{type:"StringLiteral",value:e[0],closed:e[2]!==void 0};continue}if(v.lastIndex=t,e=v.exec(s)){t=v.lastIndex,n=e[0],a=!0,yield{type:"NumericLiteral",value:e[0]};continue}if(u.lastIndex=t,e=u.exec(s)){t=u.lastIndex,n=e[0],e[1]==="${"?(n="?InterpolationInTemplate",i.push({tag:"InterpolationInTemplate",nesting:o.length}),a=!1,yield{type:"TemplateHead",value:e[0]}):(a=!0,yield{type:"NoSubstitutionTemplate",value:e[0],closed:e[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(I.lastIndex=t,e=I.exec(s)){switch(t=I.lastIndex,l=e[0],e[0]){case"<":i.push({tag:"JSXTag"});break;case">":i.pop(),n==="/"||r.tag==="JSXTagEnd"?(l="?JSX",a=!0):i.push({tag:"JSXChildren"});break;case"{":i.push({tag:"InterpolationInJSX",nesting:o.length}),l="?InterpolationInJSX",a=!1;break;case"/":n==="<"&&(i.pop(),i[i.length-1].tag==="JSXChildren"&&i.pop(),i.push({tag:"JSXTagEnd"}))}n=l,yield{type:"JSXPunctuator",value:e[0]};continue}if(p.lastIndex=t,e=p.exec(s)){t=p.lastIndex,n=e[0],yield{type:"JSXIdentifier",value:e[0]};continue}if(x.lastIndex=t,e=x.exec(s)){t=x.lastIndex,n=e[0],yield{type:"JSXString",value:e[0],closed:e[2]!==void 0};continue}break;case"JSXChildren":if(y.lastIndex=t,e=y.exec(s)){t=y.lastIndex,n=e[0],yield{type:"JSXText",value:e[0]};continue}switch(s[t]){case"<":i.push({tag:"JSXTag"}),t++,n="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":i.push({tag:"InterpolationInJSX",nesting:o.length}),t++,n="?InterpolationInJSX",a=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(E.lastIndex=t,e=E.exec(s)){t=E.lastIndex,yield{type:"WhiteSpace",value:e[0]};continue}if(d.lastIndex=t,e=d.exec(s)){t=d.lastIndex,a=!1,g.test(n)&&(n="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:e[0]};continue}if(S.lastIndex=t,e=S.exec(s)){t=S.lastIndex,_.test(e[0])&&(a=!1,g.test(n)&&(n="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:e[0],closed:e[1]!==void 0};continue}if(X.lastIndex=t,e=X.exec(s)){t=X.lastIndex,a=!1,yield{type:"SingleLineComment",value:e[0]};continue}b=String.fromCodePoint(s.codePointAt(t)),t+=b.length,n=b,a=!1,yield{type:r.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:b}}},P}F();var M={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(M.keyword);new Set(M.strict);const A=Symbol("vitest:SAFE_TIMERS");function H(){const{setTimeout:f,setInterval:p,clearInterval:I,clearTimeout:x,setImmediate:y,clearImmediate:c,queueMicrotask:g}=globalThis[A]||globalThis,{nextTick:d}=globalThis[A]||globalThis.process||{nextTick:S=>S()};return{nextTick:d,setTimeout:f,setInterval:p,clearInterval:I,clearTimeout:x,setImmediate:y,clearImmediate:c,queueMicrotask:g}}export{H as getSafeTimers};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{inspectList as a,truncator as h}from"./helpers.js";function f([e,t],r){return r.truncate-=3,t?`${r.stylize(String(e),"yellow")}=${r.stylize(`"${t}"`,"string")}`:`${r.stylize(String(e),"yellow")}`}function y(e,t){return a(e,t,d,`
|
|
2
|
-
`)}function d(e,t){const r=e.getAttributeNames(),i=e.tagName.toLowerCase(),s=t.stylize(`<${i}`,"special"),u=t.stylize(">","special"),$=t.stylize(`</${i}>`,"special");t.truncate-=i.length*2+5;let n="";r.length>0&&(n+=" ",n+=a(r.map(l=>[l,e.getAttribute(l)]),t,f," ")),t.truncate-=n.length;const g=t.truncate;let c=y(e.children,t);return c&&c.length>g&&(c=`${h}(${e.children.length})`),`${s}${n}${u}${c}${$}`}export{d as default,f as inspectAttribute,y as inspectHTMLCollection};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import I from"./array.js";import o from"./typedarray.js";import O from"./date.js";import m from"./function.js";import j from"./map.js";import y from"./number.js";import a from"./bigint.js";import T from"./regexp.js";import h from"./set.js";import l from"./string.js";import u from"./symbol.js";import z from"./promise.js";import L from"./class.js";import s from"./object.js";import k from"./arguments.js";import C from"./error.js";import E,{inspectHTMLCollection as b}from"./html.js";import{normaliseOptions as H}from"./helpers.js";const U=typeof Symbol=="function"&&typeof Symbol.for=="function",p=U?Symbol.for("chai/inspect"):"@@chai/inspect";let e=!1;try{const t=require("util");e=t.inspect?t.inspect.custom:!1}catch{e=!1}const g=new WeakMap,S={},d={undefined:(t,r)=>r.stylize("undefined","undefined"),null:(t,r)=>r.stylize("null","null"),boolean:(t,r)=>r.stylize(String(t),"boolean"),Boolean:(t,r)=>r.stylize(String(t),"boolean"),number:y,Number:y,bigint:a,BigInt:a,string:l,String:l,function:m,Function:m,symbol:u,Symbol:u,Array:I,Date:O,Map:j,Set:h,RegExp:T,Promise:z,WeakSet:(t,r)=>r.stylize("WeakSet{…}","special"),WeakMap:(t,r)=>r.stylize("WeakMap{…}","special"),Arguments:k,Int8Array:o,Uint8Array:o,Uint8ClampedArray:o,Int16Array:o,Uint16Array:o,Int32Array:o,Uint32Array:o,Float32Array:o,Float64Array:o,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:C,HTMLCollection:b,NodeList:b},W=(t,r,n)=>p in t&&typeof t[p]=="function"?t[p](r):e&&e in t&&typeof t[e]=="function"?t[e](r.depth,r):"inspect"in t&&typeof t.inspect=="function"?t.inspect(r.depth,r):"constructor"in t&&g.has(t.constructor)?g.get(t.constructor)(t,r):S[n]?S[n](t,r):"",B=Object.prototype.toString;function A(t,r={}){const n=H(r,A),{customInspect:M}=n;let i=t===null?"null":typeof t;if(i==="object"&&(i=B.call(t).slice(8,-1)),i in d)return d[i](t,n);if(M&&t){const c=W(t,n,i);if(c)return typeof c=="string"?c:A(c,n)}const f=t?Object.getPrototypeOf(t):!1;return f===Object.prototype||f===null?s(t,n):t&&typeof HTMLElement=="function"&&t instanceof HTMLElement?E(t,n):"constructor"in t?t.constructor!==Object?L(t,n):s(t,n):t===Object(t)?s(t,n):n.stylize(String(t),i)}export{A as default,A as inspect};
|
|
File without changes
|
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/arguments.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/array.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/bigint.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/class.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/error.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/function.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/helpers.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/number.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/object.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/promise.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/regexp.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/string.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/symbol.js
RENAMED
|
File without changes
|
/package/dist/node_modules/.pnpm/{loupe@3.1.3 → loupe@3.1.4}/node_modules/loupe/lib/typedarray.js
RENAMED
|
File without changes
|