{"version":3,"file":"index.mjs","names":["isInvalid"],"sources":["../../../../../../../../../../node_modules/@vitest/snapshot/dist/index.js"],"sourcesContent":["import { parseErrorStacktrace } from '@vitest/utils/source-map';\nimport { isObject, getCallLastIndex } from '@vitest/utils/helpers';\nimport { positionToOffset, offsetToLineNumber, lineSplitRE } from '@vitest/utils/offset';\nimport { plugins, format } from '@vitest/pretty-format';\n\nfunction getDefaultExportFromCjs(x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, \"default\") ? x[\"default\"] : x;\n}\n\nvar naturalCompare$1 = {exports: {}};\n\nvar hasRequiredNaturalCompare;\n\nfunction requireNaturalCompare () {\n\tif (hasRequiredNaturalCompare) return naturalCompare$1.exports;\n\thasRequiredNaturalCompare = 1;\n\t/*\n\t * @version    1.4.0\n\t * @date       2015-10-26\n\t * @stability  3 - Stable\n\t * @author     Lauri Rooden (https://github.com/litejs/natural-compare-lite)\n\t * @license    MIT License\n\t */\n\n\n\tvar naturalCompare = function(a, b) {\n\t\tvar i, codeA\n\t\t, codeB = 1\n\t\t, posA = 0\n\t\t, posB = 0\n\t\t, alphabet = String.alphabet;\n\n\t\tfunction getCode(str, pos, code) {\n\t\t\tif (code) {\n\t\t\t\tfor (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;\n\t\t\t\treturn +str.slice(pos - 1, i)\n\t\t\t}\n\t\t\tcode = alphabet && alphabet.indexOf(str.charAt(pos));\n\t\t\treturn code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code\n\t\t\t\t: code < 46 ? 65               // -\n\t\t\t\t: code < 48 ? code - 1\n\t\t\t\t: code < 58 ? code + 18        // 0-9\n\t\t\t\t: code < 65 ? code - 11\n\t\t\t\t: code < 91 ? code + 11        // A-Z\n\t\t\t\t: code < 97 ? code - 37\n\t\t\t\t: code < 123 ? code + 5        // a-z\n\t\t\t\t: code - 63\n\t\t}\n\n\n\t\tif ((a+=\"\") != (b+=\"\")) for (;codeB;) {\n\t\t\tcodeA = getCode(a, posA++);\n\t\t\tcodeB = getCode(b, posB++);\n\n\t\t\tif (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {\n\t\t\t\tcodeA = getCode(a, posA, posA);\n\t\t\t\tcodeB = getCode(b, posB, posA = i);\n\t\t\t\tposB = i;\n\t\t\t}\n\n\t\t\tif (codeA != codeB) return (codeA < codeB) ? -1 : 1\n\t\t}\n\t\treturn 0\n\t};\n\n\ttry {\n\t\tnaturalCompare$1.exports = naturalCompare;\n\t} catch (e) {\n\t\tString.naturalCompare = naturalCompare;\n\t}\n\treturn naturalCompare$1.exports;\n}\n\nvar naturalCompareExports = requireNaturalCompare();\nvar naturalCompare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareExports);\n\nconst serialize$1 = (val, config, indentation, depth, refs, printer) => {\n\t// Serialize a non-default name, even if config.printFunctionName is false.\n\tconst name = val.getMockName();\n\tconst nameString = name === \"vi.fn()\" ? \"\" : ` ${name}`;\n\tlet callsString = \"\";\n\tif (val.mock.calls.length !== 0) {\n\t\tconst indentationNext = indentation + config.indent;\n\t\tcallsString = ` {${config.spacingOuter}${indentationNext}\"calls\": ${printer(val.mock.calls, config, indentationNext, depth, refs)}${config.min ? \", \" : \",\"}${config.spacingOuter}${indentationNext}\"results\": ${printer(val.mock.results, config, indentationNext, depth, refs)}${config.min ? \"\" : \",\"}${config.spacingOuter}${indentation}}`;\n\t}\n\treturn `[MockFunction${nameString}]${callsString}`;\n};\nconst test = (val) => val && !!val._isMockFunction;\nconst plugin = {\n\tserialize: serialize$1,\n\ttest\n};\n\nconst { DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent, AsymmetricMatcher } = plugins;\nlet PLUGINS = [\n\tReactTestComponent,\n\tReactElement,\n\tDOMElement,\n\tDOMCollection,\n\tImmutable,\n\tAsymmetricMatcher,\n\tplugin\n];\nfunction addSerializer(plugin) {\n\tPLUGINS = [plugin].concat(PLUGINS);\n}\nfunction getSerializers() {\n\treturn PLUGINS;\n}\n\n// TODO: rewrite and clean up\nfunction testNameToKey(testName, count) {\n\treturn `${testName} ${count}`;\n}\nfunction keyToTestName(key) {\n\tif (!/ \\d+$/.test(key)) {\n\t\tthrow new Error(\"Snapshot keys must end with a number.\");\n\t}\n\treturn key.replace(/ \\d+$/, \"\");\n}\nfunction getSnapshotData(content, options) {\n\tconst update = options.updateSnapshot;\n\tconst data = Object.create(null);\n\tlet snapshotContents = \"\";\n\tlet dirty = false;\n\tif (content != null) {\n\t\ttry {\n\t\t\tsnapshotContents = content;\n\t\t\t// eslint-disable-next-line no-new-func\n\t\t\tconst populate = new Function(\"exports\", snapshotContents);\n\t\t\tpopulate(data);\n\t\t} catch {}\n\t}\n\t// const validationResult = validateSnapshotVersion(snapshotContents)\n\tconst isInvalid = snapshotContents;\n\t// if (update === 'none' && isInvalid)\n\t//   throw validationResult\n\tif ((update === \"all\" || update === \"new\") && isInvalid) {\n\t\tdirty = true;\n\t}\n\treturn {\n\t\tdata,\n\t\tdirty\n\t};\n}\n// Add extra line breaks at beginning and end of multiline snapshot\n// to make the content easier to read.\nfunction addExtraLineBreaks(string) {\n\treturn string.includes(\"\\n\") ? `\\n${string}\\n` : string;\n}\n// Remove extra line breaks at beginning and end of multiline snapshot.\n// Instead of trim, which can remove additional newlines or spaces\n// at beginning or end of the content from a custom serializer.\nfunction removeExtraLineBreaks(string) {\n\treturn string.length > 2 && string[0] === \"\\n\" && string.endsWith(\"\\n\") ? string.slice(1, -1) : string;\n}\n// export const removeLinesBeforeExternalMatcherTrap = (stack: string): string => {\n//   const lines = stack.split('\\n')\n//   for (let i = 0; i < lines.length; i += 1) {\n//     // It's a function name specified in `packages/expect/src/index.ts`\n//     // for external custom matchers.\n//     if (lines[i].includes('__EXTERNAL_MATCHER_TRAP__'))\n//       return lines.slice(i + 1).join('\\n')\n//   }\n//   return stack\n// }\nconst escapeRegex = true;\nconst printFunctionName = false;\nfunction serialize(val, indent = 2, formatOverrides = {}) {\n\treturn normalizeNewlines(format(val, {\n\t\tescapeRegex,\n\t\tindent,\n\t\tplugins: getSerializers(),\n\t\tprintFunctionName,\n\t\t...formatOverrides\n\t}));\n}\nfunction escapeBacktickString(str) {\n\treturn str.replace(/`|\\\\|\\$\\{/g, \"\\\\$&\");\n}\nfunction printBacktickString(str) {\n\treturn `\\`${escapeBacktickString(str)}\\``;\n}\nfunction normalizeNewlines(string) {\n\treturn string.replace(/\\r\\n|\\r/g, \"\\n\");\n}\nasync function saveSnapshotFile(environment, snapshotData, snapshotPath) {\n\tconst snapshots = Object.keys(snapshotData).sort(naturalCompare).map((key) => `exports[${printBacktickString(key)}] = ${printBacktickString(normalizeNewlines(snapshotData[key]))};`);\n\tconst content = `${environment.getHeader()}\\n\\n${snapshots.join(\"\\n\\n\")}\\n`;\n\tconst oldContent = await environment.readSnapshotFile(snapshotPath);\n\tconst skipWriting = oldContent != null && oldContent === content;\n\tif (skipWriting) {\n\t\treturn;\n\t}\n\tawait environment.saveSnapshotFile(snapshotPath, content);\n}\nfunction deepMergeArray(target = [], source = []) {\n\tconst mergedOutput = Array.from(target);\n\tsource.forEach((sourceElement, index) => {\n\t\tconst targetElement = mergedOutput[index];\n\t\tif (Array.isArray(target[index])) {\n\t\t\tmergedOutput[index] = deepMergeArray(target[index], sourceElement);\n\t\t} else if (isObject(targetElement)) {\n\t\t\tmergedOutput[index] = deepMergeSnapshot(target[index], sourceElement);\n\t\t} else {\n\t\t\t// Source does not exist in target or target is primitive and cannot be deep merged\n\t\t\tmergedOutput[index] = sourceElement;\n\t\t}\n\t});\n\treturn mergedOutput;\n}\n/**\n* Deep merge, but considers asymmetric matchers. Unlike base util's deep merge,\n* will merge any object-like instance.\n* Compatible with Jest's snapshot matcher. Should not be used outside of snapshot.\n*\n* @example\n* ```ts\n* toMatchSnapshot({\n*   name: expect.stringContaining('text')\n* })\n* ```\n*/\nfunction deepMergeSnapshot(target, source) {\n\tif (isObject(target) && isObject(source)) {\n\t\tconst mergedOutput = { ...target };\n\t\tObject.keys(source).forEach((key) => {\n\t\t\tif (isObject(source[key]) && !source[key].$$typeof) {\n\t\t\t\tif (!(key in target)) {\n\t\t\t\t\tObject.assign(mergedOutput, { [key]: source[key] });\n\t\t\t\t} else {\n\t\t\t\t\tmergedOutput[key] = deepMergeSnapshot(target[key], source[key]);\n\t\t\t\t}\n\t\t\t} else if (Array.isArray(source[key])) {\n\t\t\t\tmergedOutput[key] = deepMergeArray(target[key], source[key]);\n\t\t\t} else {\n\t\t\t\tObject.assign(mergedOutput, { [key]: source[key] });\n\t\t\t}\n\t\t});\n\t\treturn mergedOutput;\n\t} else if (Array.isArray(target) && Array.isArray(source)) {\n\t\treturn deepMergeArray(target, source);\n\t}\n\treturn target;\n}\nclass DefaultMap extends Map {\n\tconstructor(defaultFn, entries) {\n\t\tsuper(entries);\n\t\tthis.defaultFn = defaultFn;\n\t}\n\tget(key) {\n\t\tif (!this.has(key)) {\n\t\t\tthis.set(key, this.defaultFn(key));\n\t\t}\n\t\treturn super.get(key);\n\t}\n}\nclass CounterMap extends DefaultMap {\n\tconstructor() {\n\t\tsuper(() => 0);\n\t}\n\t// compat for jest-image-snapshot https://github.com/vitest-dev/vitest/issues/7322\n\t// `valueOf` and `Snapshot.added` setter allows\n\t//   snapshotState.added = snapshotState.added + 1\n\t// to function as\n\t//   snapshotState.added.total_ = snapshotState.added.total() + 1\n\t_total;\n\tvalueOf() {\n\t\treturn this._total = this.total();\n\t}\n\tincrement(key) {\n\t\tif (typeof this._total !== \"undefined\") {\n\t\t\tthis._total++;\n\t\t}\n\t\tthis.set(key, this.get(key) + 1);\n\t}\n\ttotal() {\n\t\tif (typeof this._total !== \"undefined\") {\n\t\t\treturn this._total;\n\t\t}\n\t\tlet total = 0;\n\t\tfor (const x of this.values()) {\n\t\t\ttotal += x;\n\t\t}\n\t\treturn total;\n\t}\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction memo(fn) {\n\tconst cache = new Map();\n\treturn (arg) => {\n\t\tif (!cache.has(arg)) {\n\t\t\tcache.set(arg, fn(arg));\n\t\t}\n\t\treturn cache.get(arg);\n\t};\n}\n\nasync function saveInlineSnapshots(environment, snapshots) {\n\tconst MagicString = (await import('magic-string')).default;\n\tconst files = new Set(snapshots.map((i) => i.file));\n\tawait Promise.all(Array.from(files).map(async (file) => {\n\t\tconst snaps = snapshots.filter((i) => i.file === file);\n\t\tconst code = await environment.readSnapshotFile(file);\n\t\tif (code == null) {\n\t\t\tthrow new Error(`cannot read ${file} when saving inline snapshot`);\n\t\t}\n\t\tconst s = new MagicString(code);\n\t\tfor (const snap of snaps) {\n\t\t\tconst index = positionToOffset(code, snap.line, snap.column);\n\t\t\treplaceInlineSnap(code, s, index, snap.snapshot, snap.assertionName);\n\t\t}\n\t\tconst transformed = s.toString();\n\t\tif (transformed !== code) {\n\t\t\tawait environment.saveSnapshotFile(file, transformed);\n\t\t}\n\t}));\n}\nconst defaultStartObjectRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\\s*\\(\\s*(?:\\/\\*[\\s\\S]*\\*\\/\\s*|\\/\\/.*(?:[\\n\\r\\u2028\\u2029]\\s*|[\\t\\v\\f \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\uFEFF]))*\\{/;\nfunction escapeRegExp(s) {\n\treturn s.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\nconst buildStartObjectRegex = memo((assertionName) => {\n\tconst replaced = defaultStartObjectRegex.source.replace(\"toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot\", escapeRegExp(assertionName));\n\treturn new RegExp(replaced);\n});\nfunction replaceObjectSnap(code, s, index, newSnap, assertionName) {\n\tlet _code = code.slice(index);\n\tconst regex = assertionName ? buildStartObjectRegex(assertionName) : defaultStartObjectRegex;\n\tconst startMatch = regex.exec(_code);\n\tif (!startMatch) {\n\t\treturn false;\n\t}\n\t_code = _code.slice(startMatch.index);\n\tlet callEnd = getCallLastIndex(_code);\n\tif (callEnd === null) {\n\t\treturn false;\n\t}\n\tcallEnd += index + startMatch.index;\n\tconst shapeStart = index + startMatch.index + startMatch[0].length;\n\tconst shapeEnd = getObjectShapeEndIndex(code, shapeStart);\n\tconst snap = `, ${prepareSnapString(newSnap, code, index)}`;\n\tif (shapeEnd === callEnd) {\n\t\t// toMatchInlineSnapshot({ foo: expect.any(String) })\n\t\ts.appendLeft(callEnd, snap);\n\t} else {\n\t\t// toMatchInlineSnapshot({ foo: expect.any(String) }, ``)\n\t\ts.overwrite(shapeEnd, callEnd, snap);\n\t}\n\treturn true;\n}\nfunction getObjectShapeEndIndex(code, index) {\n\tlet startBraces = 1;\n\tlet endBraces = 0;\n\twhile (startBraces !== endBraces && index < code.length) {\n\t\tconst s = code[index++];\n\t\tif (s === \"{\") {\n\t\t\tstartBraces++;\n\t\t} else if (s === \"}\") {\n\t\t\tendBraces++;\n\t\t}\n\t}\n\treturn index;\n}\nfunction prepareSnapString(snap, source, index) {\n\tconst lineNumber = offsetToLineNumber(source, index);\n\tconst line = source.split(lineSplitRE)[lineNumber - 1];\n\tconst indent = line.match(/^\\s*/)[0] || \"\";\n\tconst indentNext = indent.includes(\"\t\") ? `${indent}\\t` : `${indent}  `;\n\tconst lines = snap.trim().replace(/\\\\/g, \"\\\\\\\\\").split(/\\n/g);\n\tconst isOneline = lines.length <= 1;\n\tconst quote = \"`\";\n\tif (isOneline) {\n\t\treturn `${quote}${lines.join(\"\\n\").replace(/`/g, \"\\\\`\").replace(/\\$\\{/g, \"\\\\${\")}${quote}`;\n\t}\n\treturn `${quote}\\n${lines.map((i) => i ? indentNext + i : \"\").join(\"\\n\").replace(/`/g, \"\\\\`\").replace(/\\$\\{/g, \"\\\\${\")}\\n${indent}${quote}`;\n}\nconst defaultMethodNames = [\"toMatchInlineSnapshot\", \"toThrowErrorMatchingInlineSnapshot\"];\n// on webkit, the line number is at the end of the method, not at the start\nfunction getCodeStartingAtIndex(code, index, methodNames) {\n\tfor (const name of methodNames) {\n\t\tconst adjusted = index - name.length;\n\t\tif (adjusted >= 0 && code.slice(adjusted, index) === name) {\n\t\t\treturn {\n\t\t\t\tcode: code.slice(adjusted),\n\t\t\t\tindex: adjusted\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tcode: code.slice(index),\n\t\tindex\n\t};\n}\nconst defaultStartRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\\s*\\(\\s*(?:\\/\\*[\\s\\S]*\\*\\/\\s*|\\/\\/.*(?:[\\n\\r\\u2028\\u2029]\\s*|[\\t\\v\\f \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\uFEFF]))*[\\w$]*(['\"`)])/;\nconst buildStartRegex = memo((assertionName) => {\n\tconst replaced = defaultStartRegex.source.replace(\"toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot\", escapeRegExp(assertionName));\n\treturn new RegExp(replaced);\n});\nfunction replaceInlineSnap(code, s, currentIndex, newSnap, assertionName) {\n\tconst methodNames = assertionName ? [assertionName] : defaultMethodNames;\n\tconst { code: codeStartingAtIndex, index } = getCodeStartingAtIndex(code, currentIndex, methodNames);\n\tconst startRegex = assertionName ? buildStartRegex(assertionName) : defaultStartRegex;\n\tconst startMatch = startRegex.exec(codeStartingAtIndex);\n\tconst keywordRegex = assertionName ? new RegExp(escapeRegExp(assertionName)) : /toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/;\n\tconst firstKeywordMatch = keywordRegex.exec(codeStartingAtIndex);\n\tif (!startMatch || startMatch.index !== firstKeywordMatch?.index) {\n\t\treturn replaceObjectSnap(code, s, index, newSnap, assertionName);\n\t}\n\tconst quote = startMatch[1];\n\tconst startIndex = index + startMatch.index + startMatch[0].length;\n\tconst snapString = prepareSnapString(newSnap, code, index);\n\tif (quote === \")\") {\n\t\ts.appendRight(startIndex - 1, snapString);\n\t\treturn true;\n\t}\n\tconst quoteEndRE = new RegExp(`(?:^|[^\\\\\\\\])${quote}`);\n\tconst endMatch = quoteEndRE.exec(code.slice(startIndex));\n\tif (!endMatch) {\n\t\treturn false;\n\t}\n\tconst endIndex = startIndex + endMatch.index + endMatch[0].length;\n\ts.overwrite(startIndex - 1, endIndex, snapString);\n\treturn true;\n}\nconst INDENTATION_REGEX = /^([^\\S\\n]*)\\S/m;\nfunction stripSnapshotIndentation(inlineSnapshot) {\n\t// Find indentation if exists.\n\tconst match = inlineSnapshot.match(INDENTATION_REGEX);\n\tif (!match || !match[1]) {\n\t\t// No indentation.\n\t\treturn inlineSnapshot;\n\t}\n\tconst indentation = match[1];\n\tconst lines = inlineSnapshot.split(/\\n/g);\n\tif (lines.length <= 2) {\n\t\t// Must be at least 3 lines.\n\t\treturn inlineSnapshot;\n\t}\n\tif (lines[0].trim() !== \"\" || lines.at(-1)?.trim() !== \"\") {\n\t\t// If not blank first and last lines, abort.\n\t\treturn inlineSnapshot;\n\t}\n\tfor (let i = 1; i < lines.length - 1; i++) {\n\t\tif (lines[i] !== \"\") {\n\t\t\tif (lines[i].indexOf(indentation) !== 0) {\n\t\t\t\t// All lines except first and last should either be blank or have the same\n\t\t\t\t// indent as the first line (or more). If this isn't the case we don't\n\t\t\t\t// want to touch the snapshot at all.\n\t\t\t\treturn inlineSnapshot;\n\t\t\t}\n\t\t\tlines[i] = lines[i].substring(indentation.length);\n\t\t}\n\t}\n\t// Last line is a special case because it won't have the same indent as others\n\t// but may still have been given some indent to line up.\n\tlines[lines.length - 1] = \"\";\n\t// Return inline snapshot, now at indent 0.\n\tinlineSnapshot = lines.join(\"\\n\");\n\treturn inlineSnapshot;\n}\n\nasync function saveRawSnapshots(environment, snapshots) {\n\tawait Promise.all(snapshots.map(async (snap) => {\n\t\tif (!snap.readonly) {\n\t\t\tawait environment.saveSnapshotFile(snap.file, snap.snapshot);\n\t\t}\n\t}));\n}\n\nfunction isSameStackPosition(x, y) {\n\treturn x.file === y.file && x.column === y.column && x.line === y.line;\n}\nclass SnapshotState {\n\t_counters = new CounterMap();\n\t_dirty;\n\t_updateSnapshot;\n\t_snapshotData;\n\t_initialData;\n\t_inlineSnapshots;\n\t_inlineSnapshotStacks;\n\t_testIdToKeys = new DefaultMap(() => []);\n\t_rawSnapshots;\n\t_uncheckedKeys;\n\t_snapshotFormat;\n\t_environment;\n\t_fileExists;\n\texpand;\n\t// getter/setter for jest-image-snapshot compat\n\t// https://github.com/vitest-dev/vitest/issues/7322\n\t_added = new CounterMap();\n\t_matched = new CounterMap();\n\t_unmatched = new CounterMap();\n\t_updated = new CounterMap();\n\tget added() {\n\t\treturn this._added;\n\t}\n\tset added(value) {\n\t\tthis._added._total = value;\n\t}\n\tget matched() {\n\t\treturn this._matched;\n\t}\n\tset matched(value) {\n\t\tthis._matched._total = value;\n\t}\n\tget unmatched() {\n\t\treturn this._unmatched;\n\t}\n\tset unmatched(value) {\n\t\tthis._unmatched._total = value;\n\t}\n\tget updated() {\n\t\treturn this._updated;\n\t}\n\tset updated(value) {\n\t\tthis._updated._total = value;\n\t}\n\tconstructor(testFilePath, snapshotPath, snapshotContent, options) {\n\t\tthis.testFilePath = testFilePath;\n\t\tthis.snapshotPath = snapshotPath;\n\t\tconst { data, dirty } = getSnapshotData(snapshotContent, options);\n\t\tthis._fileExists = snapshotContent != null;\n\t\tthis._initialData = { ...data };\n\t\tthis._snapshotData = { ...data };\n\t\tthis._dirty = dirty;\n\t\tthis._inlineSnapshots = [];\n\t\tthis._inlineSnapshotStacks = [];\n\t\tthis._rawSnapshots = [];\n\t\tthis._uncheckedKeys = new Set(Object.keys(this._snapshotData));\n\t\tthis.expand = options.expand || false;\n\t\tthis._updateSnapshot = options.updateSnapshot;\n\t\tthis._snapshotFormat = {\n\t\t\tprintBasicPrototype: false,\n\t\t\tescapeString: false,\n\t\t\tmaxOutputLength: 2 ** 27,\n\t\t\t...options.snapshotFormat\n\t\t};\n\t\tthis._environment = options.snapshotEnvironment;\n\t}\n\tstatic async create(testFilePath, options) {\n\t\tconst snapshotPath = await options.snapshotEnvironment.resolvePath(testFilePath);\n\t\tconst content = await options.snapshotEnvironment.readSnapshotFile(snapshotPath);\n\t\treturn new SnapshotState(testFilePath, snapshotPath, content, options);\n\t}\n\tget snapshotUpdateState() {\n\t\treturn this._updateSnapshot;\n\t}\n\tget environment() {\n\t\treturn this._environment;\n\t}\n\tmarkSnapshotsAsCheckedForTest(testName) {\n\t\tthis._uncheckedKeys.forEach((uncheckedKey) => {\n\t\t\t// skip snapshots with following keys\n\t\t\t//   testName n\n\t\t\t//   testName > xxx n (this is for toMatchSnapshot(\"xxx\") API)\n\t\t\tif (/ \\d+$| > /.test(uncheckedKey.slice(testName.length))) {\n\t\t\t\tthis._uncheckedKeys.delete(uncheckedKey);\n\t\t\t}\n\t\t});\n\t}\n\tclearTest(testId) {\n\t\t// clear inline\n\t\tthis._inlineSnapshots = this._inlineSnapshots.filter((s) => s.testId !== testId);\n\t\tthis._inlineSnapshotStacks = this._inlineSnapshotStacks.filter((s) => s.testId !== testId);\n\t\t// clear file\n\t\tfor (const key of this._testIdToKeys.get(testId)) {\n\t\t\tconst name = keyToTestName(key);\n\t\t\tconst count = this._counters.get(name);\n\t\t\tif (count > 0) {\n\t\t\t\tif (key in this._snapshotData || key in this._initialData) {\n\t\t\t\t\tthis._snapshotData[key] = this._initialData[key];\n\t\t\t\t}\n\t\t\t\tthis._counters.set(name, count - 1);\n\t\t\t}\n\t\t}\n\t\tthis._testIdToKeys.delete(testId);\n\t\t// clear stats\n\t\tthis.added.delete(testId);\n\t\tthis.updated.delete(testId);\n\t\tthis.matched.delete(testId);\n\t\tthis.unmatched.delete(testId);\n\t}\n\t_inferInlineSnapshotStack(stacks) {\n\t\t// if called inside resolves/rejects, stacktrace is different\n\t\tconst promiseIndex = stacks.findIndex((i) => i.method.match(/__VITEST_(RESOLVES|REJECTS)__/));\n\t\tif (promiseIndex !== -1) {\n\t\t\treturn stacks[promiseIndex + 3];\n\t\t}\n\t\t// support poll + inline snapshot\n\t\tconst pollChainIndex = stacks.findIndex((i) => i.method.match(/__VITEST_POLL_CHAIN__/));\n\t\tif (pollChainIndex !== -1) {\n\t\t\treturn stacks[pollChainIndex + 1];\n\t\t}\n\t\t// inline snapshot function can be named __INLINE_SNAPSHOT_OFFSET_<n>__\n\t\t// to specify a custom stack offset\n\t\tfor (let i = 0; i < stacks.length; i++) {\n\t\t\tconst match = stacks[i].method.match(/__INLINE_SNAPSHOT_OFFSET_(\\d+)__/);\n\t\t\tif (match) {\n\t\t\t\treturn stacks[i + Number(match[1])] ?? null;\n\t\t\t}\n\t\t}\n\t\t// custom matcher registered via expect.extend() — the wrapper function\n\t\t// in jest-extend.ts is named __VITEST_EXTEND_ASSERTION__\n\t\tconst customMatcherIndex = stacks.findIndex((i) => i.method.includes(\"__VITEST_EXTEND_ASSERTION__\"));\n\t\tif (customMatcherIndex !== -1) {\n\t\t\treturn stacks[customMatcherIndex + 3] ?? null;\n\t\t}\n\t\t// inline snapshot function is called __INLINE_SNAPSHOT__\n\t\t// in integrations/snapshot/chai.ts\n\t\tconst stackIndex = stacks.findIndex((i) => i.method.includes(\"__INLINE_SNAPSHOT__\"));\n\t\treturn stackIndex !== -1 ? stacks[stackIndex + 2] : null;\n\t}\n\t_addSnapshot(key, receivedSerialized, options) {\n\t\tthis._dirty = true;\n\t\tif (options.stack) {\n\t\t\tthis._inlineSnapshots.push({\n\t\t\t\t...options.stack,\n\t\t\t\tsnapshot: receivedSerialized,\n\t\t\t\ttestId: options.testId,\n\t\t\t\tassertionName: options.assertionName\n\t\t\t});\n\t\t} else if (options.rawSnapshot) {\n\t\t\tthis._rawSnapshots.push({\n\t\t\t\t...options.rawSnapshot,\n\t\t\t\tsnapshot: receivedSerialized\n\t\t\t});\n\t\t} else {\n\t\t\tthis._snapshotData[key] = receivedSerialized;\n\t\t}\n\t}\n\t_resolveKey(testId, testName, key) {\n\t\tthis._counters.increment(testName);\n\t\tconst count = this._counters.get(testName);\n\t\tif (!key) {\n\t\t\tkey = testNameToKey(testName, count);\n\t\t}\n\t\tthis._testIdToKeys.get(testId).push(key);\n\t\treturn {\n\t\t\tkey,\n\t\t\tcount\n\t\t};\n\t}\n\t_resolveInlineStack(options) {\n\t\tconst { testId, snapshot, assertionName, error } = options;\n\t\tconst stacks = parseErrorStacktrace(error, { ignoreStackEntries: [] });\n\t\tconst _stack = this._inferInlineSnapshotStack(stacks);\n\t\tif (!_stack) {\n\t\t\tconst message = stacks.map((s) => `  ${s.file}:${s.line}:${s.column}${s.method ? ` (${s.method})` : \"\"}`).join(\"\\n\");\n\t\t\tthrow new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.\\n${message}`);\n\t\t}\n\t\tconst stack = this.environment.processStackTrace?.(_stack) || _stack;\n\t\t// removing 1 column, because source map points to the wrong\n\t\t// location for js files, but `column-1` points to the same in both js/ts\n\t\t// https://github.com/vitejs/vite/issues/8657\n\t\tstack.column--;\n\t\t// reject multiple inline snapshots at the same location if snapshot is different\n\t\tconst snapshotsWithSameStack = this._inlineSnapshotStacks.filter((s) => isSameStackPosition(s, stack));\n\t\tif (snapshotsWithSameStack.length > 0) {\n\t\t\t// ensure only one snapshot will be written at the same location\n\t\t\tthis._inlineSnapshots = this._inlineSnapshots.filter((s) => !isSameStackPosition(s, stack));\n\t\t\tconst differentSnapshot = snapshotsWithSameStack.find((s) => s.snapshot !== snapshot);\n\t\t\tif (differentSnapshot) {\n\t\t\t\tthrow Object.assign(new Error(`${assertionName} with different snapshots cannot be called at the same location`), {\n\t\t\t\t\tactual: snapshot,\n\t\t\t\t\texpected: differentSnapshot.snapshot\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tthis._inlineSnapshotStacks.push({\n\t\t\t...stack,\n\t\t\ttestId,\n\t\t\tsnapshot\n\t\t});\n\t\treturn stack;\n\t}\n\t_reconcile(opts) {\n\t\t// These are the conditions on when to write snapshots:\n\t\t//  * There's no snapshot file in a non-CI environment.\n\t\t//  * There is a snapshot file and we decided to update the snapshot.\n\t\t//  * There is a snapshot file, but it doesn't have this snapshot.\n\t\t// These are the conditions on when not to write snapshots:\n\t\t//  * The update flag is set to 'none'.\n\t\t//  * There's no snapshot file or a file without this snapshot on a CI environment.\n\t\tif (opts.hasSnapshot && this._updateSnapshot === \"all\" || (!opts.hasSnapshot || !opts.snapshotIsPersisted) && (this._updateSnapshot === \"new\" || this._updateSnapshot === \"all\")) {\n\t\t\tif (this._updateSnapshot === \"all\") {\n\t\t\t\tif (!opts.pass) {\n\t\t\t\t\tif (opts.hasSnapshot) {\n\t\t\t\t\t\tthis.updated.increment(opts.testId);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.added.increment(opts.testId);\n\t\t\t\t\t}\n\t\t\t\t\tthis._addSnapshot(opts.key, opts.addValue, {\n\t\t\t\t\t\tstack: opts.stack,\n\t\t\t\t\t\ttestId: opts.testId,\n\t\t\t\t\t\trawSnapshot: opts.rawSnapshot,\n\t\t\t\t\t\tassertionName: opts.assertionName\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.matched.increment(opts.testId);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._addSnapshot(opts.key, opts.addValue, {\n\t\t\t\t\tstack: opts.stack,\n\t\t\t\t\ttestId: opts.testId,\n\t\t\t\t\trawSnapshot: opts.rawSnapshot,\n\t\t\t\t\tassertionName: opts.assertionName\n\t\t\t\t});\n\t\t\t\tthis.added.increment(opts.testId);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tactual: \"\",\n\t\t\t\tcount: opts.count,\n\t\t\t\texpected: \"\",\n\t\t\t\tkey: opts.key,\n\t\t\t\tpass: true\n\t\t\t};\n\t\t} else {\n\t\t\tif (!opts.pass) {\n\t\t\t\tthis.unmatched.increment(opts.testId);\n\t\t\t\treturn {\n\t\t\t\t\tactual: opts.actualDisplay,\n\t\t\t\t\tcount: opts.count,\n\t\t\t\t\texpected: opts.expectedDisplay,\n\t\t\t\t\tkey: opts.key,\n\t\t\t\t\tpass: false\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tthis.matched.increment(opts.testId);\n\t\t\t\treturn {\n\t\t\t\t\tactual: \"\",\n\t\t\t\t\tcount: opts.count,\n\t\t\t\t\texpected: \"\",\n\t\t\t\t\tkey: opts.key,\n\t\t\t\t\tpass: true\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\tasync save() {\n\t\tconst hasExternalSnapshots = Object.keys(this._snapshotData).length;\n\t\tconst hasInlineSnapshots = this._inlineSnapshots.length;\n\t\tconst hasRawSnapshots = this._rawSnapshots.length;\n\t\tconst isEmpty = !hasExternalSnapshots && !hasInlineSnapshots && !hasRawSnapshots;\n\t\tconst status = {\n\t\t\tdeleted: false,\n\t\t\tsaved: false\n\t\t};\n\t\tif ((this._dirty || this._uncheckedKeys.size) && !isEmpty) {\n\t\t\tif (hasExternalSnapshots) {\n\t\t\t\tawait saveSnapshotFile(this._environment, this._snapshotData, this.snapshotPath);\n\t\t\t\tthis._fileExists = true;\n\t\t\t}\n\t\t\tif (hasInlineSnapshots) {\n\t\t\t\tawait saveInlineSnapshots(this._environment, this._inlineSnapshots);\n\t\t\t}\n\t\t\tif (hasRawSnapshots) {\n\t\t\t\tawait saveRawSnapshots(this._environment, this._rawSnapshots);\n\t\t\t}\n\t\t\tstatus.saved = true;\n\t\t} else if (!hasExternalSnapshots && this._fileExists) {\n\t\t\tif (this._updateSnapshot === \"all\") {\n\t\t\t\tawait this._environment.removeSnapshotFile(this.snapshotPath);\n\t\t\t\tthis._fileExists = false;\n\t\t\t}\n\t\t\tstatus.deleted = true;\n\t\t}\n\t\treturn status;\n\t}\n\tgetUncheckedCount() {\n\t\treturn this._uncheckedKeys.size || 0;\n\t}\n\tgetUncheckedKeys() {\n\t\treturn Array.from(this._uncheckedKeys);\n\t}\n\tremoveUncheckedKeys() {\n\t\tif (this._updateSnapshot === \"all\" && this._uncheckedKeys.size) {\n\t\t\tthis._dirty = true;\n\t\t\tthis._uncheckedKeys.forEach((key) => delete this._snapshotData[key]);\n\t\t\tthis._uncheckedKeys.clear();\n\t\t}\n\t}\n\tprobeExpectedSnapshot(options) {\n\t\tconst count = this._counters.get(options.testName) + 1;\n\t\tconst key = testNameToKey(options.testName, count);\n\t\treturn {\n\t\t\tkey,\n\t\t\tcount,\n\t\t\tdata: options?.isInline ? options.inlineSnapshot : this._snapshotData[key],\n\t\t\tmarkAsChecked: () => {\n\t\t\t\tthis._counters.increment(options.testName);\n\t\t\t\tthis._testIdToKeys.get(options.testId).push(key);\n\t\t\t\tthis._uncheckedKeys.delete(key);\n\t\t\t}\n\t\t};\n\t}\n\tmatch({ testId, testName, received, key, inlineSnapshot, isInline, error, rawSnapshot, assertionName }) {\n\t\tconst resolved = this._resolveKey(testId, testName, key);\n\t\tkey = resolved.key;\n\t\tconst count = resolved.count;\n\t\t// Do not mark the snapshot as \"checked\" if the snapshot is inline and\n\t\t// there's an external snapshot. This way the external snapshot can be\n\t\t// removed with `--updateSnapshot`.\n\t\tif (!(isInline && this._snapshotData[key] !== undefined)) {\n\t\t\tthis._uncheckedKeys.delete(key);\n\t\t}\n\t\tlet receivedSerialized = rawSnapshot && typeof received === \"string\" ? received : serialize(received, undefined, this._snapshotFormat);\n\t\tif (!rawSnapshot) {\n\t\t\treceivedSerialized = addExtraLineBreaks(receivedSerialized);\n\t\t}\n\t\tif (rawSnapshot) {\n\t\t\t// normalize EOL when snapshot contains CRLF but received is LF\n\t\t\tif (rawSnapshot.content && rawSnapshot.content.match(/\\r\\n/) && !receivedSerialized.match(/\\r\\n/)) {\n\t\t\t\trawSnapshot.content = normalizeNewlines(rawSnapshot.content);\n\t\t\t}\n\t\t}\n\t\tconst expected = isInline ? inlineSnapshot : rawSnapshot ? rawSnapshot.content : this._snapshotData[key];\n\t\tconst expectedTrimmed = rawSnapshot ? expected : expected?.trim();\n\t\tconst pass = expectedTrimmed === (rawSnapshot ? receivedSerialized : receivedSerialized.trim());\n\t\tconst hasSnapshot = expected !== undefined;\n\t\tconst snapshotIsPersisted = isInline || this._fileExists || rawSnapshot && rawSnapshot.content != null;\n\t\tif (pass && !isInline && !rawSnapshot) {\n\t\t\t// When the file is re-saved (because other snapshots changed), the JS\n\t\t\t// round-trip can lose proper escaping. Refresh in-memory data with the\n\t\t\t// freshly serialized string so the file is written correctly.\n\t\t\t// _reconcile does not write _snapshotData on pass, so this is the only\n\t\t\t// place it gets refreshed. Domain snapshots skip this because the stored\n\t\t\t// value may contain match patterns that differ from the received output.\n\t\t\tthis._snapshotData[key] = receivedSerialized;\n\t\t}\n\t\tconst stack = isInline ? this._resolveInlineStack({\n\t\t\ttestId,\n\t\t\tsnapshot: receivedSerialized,\n\t\t\tassertionName: assertionName || \"toMatchInlineSnapshot\",\n\t\t\terror: error || new Error(\"snapshot\")\n\t\t}) : undefined;\n\t\treturn this._reconcile({\n\t\t\ttestId,\n\t\t\tkey,\n\t\t\tcount,\n\t\t\tpass,\n\t\t\thasSnapshot,\n\t\t\tsnapshotIsPersisted: !!snapshotIsPersisted,\n\t\t\taddValue: receivedSerialized,\n\t\t\tactualDisplay: rawSnapshot ? receivedSerialized : removeExtraLineBreaks(receivedSerialized),\n\t\t\texpectedDisplay: expectedTrimmed !== undefined ? rawSnapshot ? expectedTrimmed : removeExtraLineBreaks(expectedTrimmed) : undefined,\n\t\t\tstack,\n\t\t\trawSnapshot,\n\t\t\tassertionName\n\t\t});\n\t}\n\tprocessDomainSnapshot({ testId, received, expectedSnapshot, matchResult, isInline, error, assertionName }) {\n\t\tconst stack = isInline ? this._resolveInlineStack({\n\t\t\ttestId,\n\t\t\tsnapshot: received,\n\t\t\tassertionName,\n\t\t\terror: error || new Error(\"STACK_TRACE_ERROR\")\n\t\t}) : undefined;\n\t\tconst actualResolved = matchResult?.resolved ?? received;\n\t\tconst expectedResolved = matchResult?.expected ?? expectedSnapshot.data;\n\t\treturn this._reconcile({\n\t\t\ttestId,\n\t\t\tkey: expectedSnapshot.key,\n\t\t\tcount: expectedSnapshot.count,\n\t\t\tpass: matchResult?.pass ?? false,\n\t\t\thasSnapshot: !!expectedSnapshot.data,\n\t\t\tsnapshotIsPersisted: isInline ? true : this._fileExists,\n\t\t\taddValue: actualResolved,\n\t\t\tactualDisplay: removeExtraLineBreaks(actualResolved),\n\t\t\texpectedDisplay: expectedResolved !== undefined ? removeExtraLineBreaks(expectedResolved) : undefined,\n\t\t\tstack,\n\t\t\tassertionName\n\t\t});\n\t}\n\tasync pack() {\n\t\tconst snapshot = {\n\t\t\tfilepath: this.testFilePath,\n\t\t\tadded: 0,\n\t\t\tfileDeleted: false,\n\t\t\tmatched: 0,\n\t\t\tunchecked: 0,\n\t\t\tuncheckedKeys: [],\n\t\t\tunmatched: 0,\n\t\t\tupdated: 0\n\t\t};\n\t\tconst uncheckedCount = this.getUncheckedCount();\n\t\tconst uncheckedKeys = this.getUncheckedKeys();\n\t\tif (uncheckedCount) {\n\t\t\tthis.removeUncheckedKeys();\n\t\t}\n\t\tconst status = await this.save();\n\t\tsnapshot.fileDeleted = status.deleted;\n\t\tsnapshot.added = this.added.total();\n\t\tsnapshot.matched = this.matched.total();\n\t\tsnapshot.unmatched = this.unmatched.total();\n\t\tsnapshot.updated = this.updated.total();\n\t\tsnapshot.unchecked = !status.deleted ? uncheckedCount : 0;\n\t\tsnapshot.uncheckedKeys = Array.from(uncheckedKeys);\n\t\treturn snapshot;\n\t}\n}\n\nfunction createMismatchError(message, expand, actual, expected) {\n\tconst error = new Error(message);\n\tObject.defineProperty(error, \"actual\", {\n\t\tvalue: actual,\n\t\tenumerable: true,\n\t\tconfigurable: true,\n\t\twritable: true\n\t});\n\tObject.defineProperty(error, \"expected\", {\n\t\tvalue: expected,\n\t\tenumerable: true,\n\t\tconfigurable: true,\n\t\twritable: true\n\t});\n\tObject.defineProperty(error, \"diffOptions\", { value: { expand } });\n\treturn error;\n}\nclass SnapshotClient {\n\tsnapshotStateMap = new Map();\n\tconstructor(options = {}) {\n\t\tthis.options = options;\n\t}\n\tasync setup(filepath, options) {\n\t\tif (this.snapshotStateMap.has(filepath)) {\n\t\t\treturn;\n\t\t}\n\t\tthis.snapshotStateMap.set(filepath, await SnapshotState.create(filepath, options));\n\t}\n\tasync finish(filepath) {\n\t\tconst state = this.getSnapshotState(filepath);\n\t\tconst result = await state.pack();\n\t\tthis.snapshotStateMap.delete(filepath);\n\t\treturn result;\n\t}\n\tskipTest(filepath, testName) {\n\t\tconst state = this.getSnapshotState(filepath);\n\t\tstate.markSnapshotsAsCheckedForTest(testName);\n\t}\n\tclearTest(filepath, testId) {\n\t\tconst state = this.getSnapshotState(filepath);\n\t\tstate.clearTest(testId);\n\t}\n\tgetSnapshotState(filepath) {\n\t\tconst state = this.snapshotStateMap.get(filepath);\n\t\tif (!state) {\n\t\t\tthrow new Error(`The snapshot state for '${filepath}' is not found. Did you call 'SnapshotClient.setup()'?`);\n\t\t}\n\t\treturn state;\n\t}\n\tmatch(options) {\n\t\tconst { filepath, name, testId = name, message, isInline = false, properties, inlineSnapshot, error, errorMessage, rawSnapshot, assertionName } = options;\n\t\tlet { received } = options;\n\t\tif (!filepath) {\n\t\t\tthrow new Error(\"Snapshot cannot be used outside of test\");\n\t\t}\n\t\tconst snapshotState = this.getSnapshotState(filepath);\n\t\tconst testName = [name, ...message ? [message] : []].join(\" > \");\n\t\t// Probe first so we can mark as checked even on early return\n\t\tconst expectedSnapshot = snapshotState.probeExpectedSnapshot({\n\t\t\ttestName,\n\t\t\ttestId,\n\t\t\tisInline,\n\t\t\tinlineSnapshot\n\t\t});\n\t\tif (typeof properties === \"object\") {\n\t\t\tif (typeof received !== \"object\" || !received) {\n\t\t\t\texpectedSnapshot.markAsChecked();\n\t\t\t\tthrow new Error(\"Received value must be an object when the matcher has properties\");\n\t\t\t}\n\t\t\tlet propertiesPass;\n\t\t\ttry {\n\t\t\t\tpropertiesPass = this.options.isEqual?.(received, properties) ?? false;\n\t\t\t} catch (err) {\n\t\t\t\texpectedSnapshot.markAsChecked();\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tif (!propertiesPass) {\n\t\t\t\texpectedSnapshot.markAsChecked();\n\t\t\t\treturn {\n\t\t\t\t\tpass: false,\n\t\t\t\t\tmessage: () => errorMessage || \"Snapshot properties mismatched\",\n\t\t\t\t\tactual: received,\n\t\t\t\t\texpected: properties\n\t\t\t\t};\n\t\t\t}\n\t\t\treceived = deepMergeSnapshot(received, properties);\n\t\t}\n\t\tconst { actual, expected, key, pass } = snapshotState.match({\n\t\t\ttestId,\n\t\t\ttestName,\n\t\t\treceived,\n\t\t\tisInline,\n\t\t\terror,\n\t\t\tinlineSnapshot,\n\t\t\trawSnapshot,\n\t\t\tassertionName\n\t\t});\n\t\treturn {\n\t\t\tpass,\n\t\t\tmessage: () => `Snapshot \\`${key || \"unknown\"}\\` mismatched`,\n\t\t\tactual: rawSnapshot ? actual : actual?.trim(),\n\t\t\texpected: rawSnapshot ? expected : expected?.trim()\n\t\t};\n\t}\n\tassert(options) {\n\t\tconst result = this.match(options);\n\t\tif (!result.pass) {\n\t\t\tconst snapshotState = this.getSnapshotState(options.filepath);\n\t\t\tthrow createMismatchError(result.message(), snapshotState.expand, result.actual, result.expected);\n\t\t}\n\t}\n\tmatchDomain(options) {\n\t\tconst { received, filepath, name, testId = name, message, adapter, isInline = false, inlineSnapshot, error } = options;\n\t\tif (!filepath) {\n\t\t\tthrow new Error(\"Snapshot cannot be used outside of test\");\n\t\t}\n\t\tconst captured = adapter.capture(received);\n\t\tconst rendered = adapter.render(captured);\n\t\tconst snapshotState = this.getSnapshotState(filepath);\n\t\tconst testName = [name, ...message ? [message] : []].join(\" > \");\n\t\tconst expectedSnapshot = snapshotState.probeExpectedSnapshot({\n\t\t\ttestName,\n\t\t\ttestId,\n\t\t\tisInline,\n\t\t\tinlineSnapshot\n\t\t});\n\t\texpectedSnapshot.markAsChecked();\n\t\tconst matchResult = expectedSnapshot.data ? adapter.match(captured, adapter.parseExpected(expectedSnapshot.data)) : undefined;\n\t\tconst { actual, expected, key, pass } = snapshotState.processDomainSnapshot({\n\t\t\ttestId,\n\t\t\treceived: rendered,\n\t\t\texpectedSnapshot,\n\t\t\tmatchResult,\n\t\t\tisInline,\n\t\t\terror,\n\t\t\tassertionName: options.assertionName\n\t\t});\n\t\treturn {\n\t\t\tpass,\n\t\t\tmessage: () => `Snapshot \\`${key}\\` mismatched`,\n\t\t\tactual: actual?.trim(),\n\t\t\texpected: expected?.trim()\n\t\t};\n\t}\n\tasync pollMatchDomain(options) {\n\t\tconst { poll, filepath, name, testId = name, message, adapter, isInline = false, inlineSnapshot, error, timeout = 1e3, interval = 50 } = options;\n\t\tif (!filepath) {\n\t\t\tthrow new Error(\"Snapshot cannot be used outside of test\");\n\t\t}\n\t\tconst snapshotState = this.getSnapshotState(filepath);\n\t\tconst testName = [name, ...message ? [message] : []].join(\" > \");\n\t\tconst expectedSnapshot = snapshotState.probeExpectedSnapshot({\n\t\t\ttestName,\n\t\t\ttestId,\n\t\t\tisInline,\n\t\t\tinlineSnapshot\n\t\t});\n\t\tconst reference = expectedSnapshot.data && snapshotState.snapshotUpdateState !== \"all\" ? adapter.parseExpected(expectedSnapshot.data) : undefined;\n\t\tconst timedOut = timeout > 0 ? new Promise((r) => setTimeout(r, timeout)) : undefined;\n\t\tconst stableResult = await getStableSnapshot({\n\t\t\tadapter,\n\t\t\tpoll,\n\t\t\tinterval,\n\t\t\ttimedOut,\n\t\t\tmatch: reference ? (captured) => adapter.match(captured, reference).pass : undefined\n\t\t});\n\t\texpectedSnapshot.markAsChecked();\n\t\tif (!stableResult?.rendered) {\n\t\t\t// the original caller `expect.poll` later manipulates error via `throwWithCause`,\n\t\t\t// so here we can directly throw `lastPollError` if exists.\n\t\t\tif (stableResult?.lastPollError) {\n\t\t\t\tthrow stableResult.lastPollError;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tpass: false,\n\t\t\t\tmessage: () => `poll() did not produce a stable snapshot within the timeout`\n\t\t\t};\n\t\t}\n\t\t// TODO: should `all` mode ignore parse error?\n\t\t// Sielently hiding the error and creating snaphsot full scratch isn't good either.\n\t\t// Users can fix or purge the broken snapshot manually and that decision affects how domain snapshot gets updated.\n\t\tconst matchResult = expectedSnapshot.data ? adapter.match(stableResult.captured, adapter.parseExpected(expectedSnapshot.data)) : undefined;\n\t\tconst { actual, expected, key, pass } = snapshotState.processDomainSnapshot({\n\t\t\ttestId,\n\t\t\treceived: stableResult.rendered,\n\t\t\texpectedSnapshot,\n\t\t\tmatchResult,\n\t\t\tisInline,\n\t\t\terror,\n\t\t\tassertionName: options.assertionName\n\t\t});\n\t\treturn {\n\t\t\tpass,\n\t\t\tmessage: () => `Snapshot \\`${key}\\` mismatched`,\n\t\t\tactual: actual?.trim(),\n\t\t\texpected: expected?.trim()\n\t\t};\n\t}\n\tasync assertRaw(options) {\n\t\tif (!options.rawSnapshot) {\n\t\t\tthrow new Error(\"Raw snapshot is required\");\n\t\t}\n\t\tconst { filepath, rawSnapshot } = options;\n\t\tif (rawSnapshot.content == null) {\n\t\t\tif (!filepath) {\n\t\t\t\tthrow new Error(\"Snapshot cannot be used outside of test\");\n\t\t\t}\n\t\t\tconst snapshotState = this.getSnapshotState(filepath);\n\t\t\t// save the filepath, so it don't lose even if the await make it out-of-context\n\t\t\toptions.filepath ||= filepath;\n\t\t\t// resolve and read the raw snapshot file\n\t\t\trawSnapshot.file = await snapshotState.environment.resolveRawPath(filepath, rawSnapshot.file);\n\t\t\trawSnapshot.content = await snapshotState.environment.readSnapshotFile(rawSnapshot.file) ?? undefined;\n\t\t}\n\t\treturn this.assert(options);\n\t}\n\tclear() {\n\t\tthis.snapshotStateMap.clear();\n\t}\n}\n/**\n* Polls repeatedly until the value reaches a stable state.\n*\n* Compares consecutive rendered outputs from the current session —\n* when two consecutive polls produce the same rendered string,\n* the value is considered stable.\n*\n* Every `await` (poll call, interval delay) races against `timedOut`\n* so that hanging polls and delays are interrupted.\n*/\nasync function getStableSnapshot({ adapter, poll, interval, timedOut, match }) {\n\tlet lastRendered;\n\tlet lastPollError;\n\tlet lastStable;\n\twhile (true) {\n\t\ttry {\n\t\t\tconst pollResult = await raceWith(Promise.resolve(poll()), timedOut);\n\t\t\tif (!pollResult.ok) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst captured = adapter.capture(pollResult.value);\n\t\t\tconst rendered = adapter.render(captured);\n\t\t\tif (lastRendered !== undefined && rendered === lastRendered) {\n\t\t\t\tlastStable = {\n\t\t\t\t\tcaptured,\n\t\t\t\t\trendered\n\t\t\t\t};\n\t\t\t\tif (!match || match(captured)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlastRendered = rendered;\n\t\t\t\tlastStable = undefined;\n\t\t\t}\n\t\t} catch (pollError) {\n\t\t\t// poll() threw — reset stability baseline and retry\n\t\t\tlastRendered = undefined;\n\t\t\tlastStable = undefined;\n\t\t\tlastPollError = pollError;\n\t\t}\n\t\tconst delayed = await raceWith(new Promise((r) => setTimeout(r, interval)), timedOut);\n\t\tif (!delayed.ok) {\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn {\n\t\t...lastStable,\n\t\tlastPollError\n\t};\n}\n/** Type-safe `Promise.race` — tells you which promise won. */\nfunction raceWith(promise, other) {\n\tconst left = promise.then((value) => ({\n\t\tok: true,\n\t\tvalue\n\t}));\n\tif (!other) {\n\t\treturn left;\n\t}\n\treturn Promise.race([left, other.then((value) => ({\n\t\tok: false,\n\t\tvalue\n\t}))]);\n}\n\nexport { SnapshotClient, SnapshotState, addSerializer, getSerializers, stripSnapshotIndentation };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;AAKA,SAAS,wBAAwB,GAAG;CACnC,OAAO,KAAK,EAAE,cAAc,OAAO,UAAU,eAAe,KAAK,GAAG,SAAS,IAAI,EAAE,aAAa;AACjG;AAEA,IAAI,mBAAmB,EAAC,SAAS,CAAC,EAAC;AAEnC,IAAI;AAEJ,SAAS,wBAAyB;CACjC,IAAI,2BAA2B,OAAO,iBAAiB;CACvD,4BAA4B;;;;;;;;CAU5B,IAAI,iBAAiB,SAAS,GAAG,GAAG;EACnC,IAAI,GAAG,O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