{
  "version": 3,
  "sources": ["../../rrweb-snapshot/dist/rrweb-snapshot.js", "../../rrdom/dist/rrdom.js", "../../utils/dist/utils.js", "../src/utils.ts", "../../types/dist/types.js", "../src/record/mutation.ts", "../src/record/error-handler.ts", "../src/record/observer.ts", "../src/record/cross-origin-iframe-mirror.ts", "../src/record/iframe-manager.ts", "../src/record/shadow-dom-manager.ts", "../../../node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js", "../src/record/observers/canvas/serialize-args.ts", "../src/record/observers/canvas/2d.ts", "../src/record/observers/canvas/canvas.ts", "../src/record/observers/canvas/webgl.ts", "../src/record/observers/canvas/canvas-manager.ts", "../src/record/stylesheet-manager.ts", "../src/record/processed-node-manager.ts", "../src/record/index.ts", "../../../node_modules/mitt/dist/mitt.mjs", "../src/replay/smoothscroll.ts", "../src/replay/timer.ts", "../../../node_modules/@xstate/fsm/es/index.js", "../src/replay/machine.ts", "../src/replay/styles/inject-style.ts", "../src/replay/canvas/deserialize-args.ts", "../src/replay/canvas/webgl.ts", "../src/replay/canvas/2d.ts", "../src/replay/canvas/index.ts", "../src/replay/media/index.ts", "../src/replay/dialog/index.ts", "../src/replay/index.ts", "../src/index.ts"],
  "sourcesContent": ["// \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, \"default\") ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n// ../types/dist/types.js\nvar NodeType = /* @__PURE__ */ function(NodeType) {\n\tNodeType[NodeType[\"Document\"] = 0] = \"Document\";\n\tNodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n\tNodeType[NodeType[\"Element\"] = 2] = \"Element\";\n\tNodeType[NodeType[\"Text\"] = 3] = \"Text\";\n\tNodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n\tNodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n\treturn NodeType;\n}({});\n// ../utils/dist/utils.js\nvar testableAccessors = {\n\tNode: [\n\t\t\"childNodes\",\n\t\t\"parentNode\",\n\t\t\"parentElement\",\n\t\t\"textContent\",\n\t\t\"ownerDocument\",\n\t\t\"firstChild\",\n\t\t\"lastChild\",\n\t\t\"nextSibling\",\n\t\t\"previousSibling\"\n\t],\n\tShadowRoot: [\"host\", \"styleSheets\"],\n\tElement: [\n\t\t\"shadowRoot\",\n\t\t\"querySelector\",\n\t\t\"querySelectorAll\"\n\t],\n\tMutationObserver: []\n};\nvar testableMethods = {\n\tNode: [\"contains\", \"getRootNode\"],\n\tShadowRoot: [\"getSelection\"],\n\tElement: [],\n\tMutationObserver: [\"constructor\"]\n};\nvar untaintedBasePrototype = {};\nvar untaintedBaseIframeCleanup = {};\nvar mutationObserverUsers = 0;\nfunction angularZoneUnpatchedAlternative(key) {\n\tconst angularUnpatchedVersionSymbol = globalThis?.Zone?.__symbol__?.(key);\n\tif (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) return globalThis[angularUnpatchedVersionSymbol];\n\telse return;\n}\nfunction getUntaintedPrototype(key) {\n\tif (untaintedBasePrototype[key]) return untaintedBasePrototype[key];\n\tconst defaultObj = angularZoneUnpatchedAlternative(key) || globalThis[key];\n\tconst defaultPrototype = defaultObj.prototype;\n\tconst accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;\n\tconst isUntaintedAccessors = Boolean(accessorNames && accessorNames.every((accessor) => Boolean(Object.getOwnPropertyDescriptor(defaultPrototype, accessor)?.get?.toString().includes(\"[native code]\"))));\n\tconst methodNames = key in testableMethods ? testableMethods[key] : void 0;\n\tconst isUntaintedMethods = Boolean(methodNames && methodNames.every((method) => typeof defaultPrototype[method] === \"function\" && defaultPrototype[method]?.toString().includes(\"[native code]\")));\n\tif (isUntaintedAccessors && isUntaintedMethods) {\n\t\tuntaintedBasePrototype[key] = defaultObj.prototype;\n\t\treturn defaultObj.prototype;\n\t}\n\ttry {\n\t\tconst iframeEl = document.createElement(\"iframe\");\n\t\tiframeEl.style.display = \"none\";\n\t\tdocument.body.appendChild(iframeEl);\n\t\tconst win = iframeEl.contentWindow;\n\t\tif (!win) return defaultObj.prototype;\n\t\tconst untaintedObject = win[key].prototype;\n\t\tif (!untaintedObject) {\n\t\t\tiframeEl.remove();\n\t\t\treturn defaultPrototype;\n\t\t}\n\t\tconst ua = navigator.userAgent;\n\t\tif (ua.includes(\"Safari\") && !ua.includes(\"Chrome\")) {\n\t\t\tiframeEl.classList.add(\"rr-block\");\n\t\t\tiframeEl.setAttribute(\"__rrwebUntaintedMutationObserver\", \"\");\n\t\t\tuntaintedBaseIframeCleanup[key] = () => iframeEl.remove();\n\t\t} else iframeEl.remove();\n\t\treturn untaintedBasePrototype[key] = untaintedObject;\n\t} catch {\n\t\treturn defaultPrototype;\n\t}\n}\nvar untaintedAccessorCache = {};\nfunction getUntaintedAccessor(key, instance, accessor) {\n\tconst cached = untaintedAccessorCache[key]?.[accessor];\n\tif (cached) return cached.call(instance);\n\tconst untaintedPrototype = getUntaintedPrototype(key);\n\tconst untaintedAccessor = Object.getOwnPropertyDescriptor(untaintedPrototype, accessor)?.get;\n\tif (!untaintedAccessor) return instance[accessor];\n\t(untaintedAccessorCache[key] ||= {})[accessor] = untaintedAccessor;\n\treturn untaintedAccessor.call(instance);\n}\nvar untaintedMethodCache = {};\nfunction getUntaintedMethod(key, instance, method) {\n\tconst cacheKey = `${key}.${String(method)}`;\n\tif (untaintedMethodCache[cacheKey]) return untaintedMethodCache[cacheKey].bind(instance);\n\tconst untaintedMethod = getUntaintedPrototype(key)[method];\n\tif (typeof untaintedMethod !== \"function\") return instance[method];\n\tuntaintedMethodCache[cacheKey] = untaintedMethod;\n\treturn untaintedMethod.bind(instance);\n}\nfunction ownerDocument(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"ownerDocument\");\n}\nfunction childNodes(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"childNodes\");\n}\nfunction parentNode(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"parentNode\");\n}\nfunction parentElement(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"parentElement\");\n}\nfunction textContent(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"textContent\");\n}\nfunction firstChild(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"firstChild\");\n}\nfunction lastChild(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"lastChild\");\n}\nfunction nextSibling(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"nextSibling\");\n}\nfunction previousSibling(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"previousSibling\");\n}\nfunction contains(n, other) {\n\treturn getUntaintedMethod(\"Node\", n, \"contains\")(other);\n}\nfunction getRootNode(n) {\n\treturn getUntaintedMethod(\"Node\", n, \"getRootNode\")();\n}\nfunction host(n) {\n\tif (!n || !(\"host\" in n)) return null;\n\treturn getUntaintedAccessor(\"ShadowRoot\", n, \"host\");\n}\nfunction styleSheets(n) {\n\treturn n.styleSheets;\n}\nfunction shadowRoot(n) {\n\tif (!n || !(\"shadowRoot\" in n)) return null;\n\treturn getUntaintedAccessor(\"Element\", n, \"shadowRoot\");\n}\nfunction querySelector(n, selectors) {\n\treturn getUntaintedAccessor(\"Element\", n, \"querySelector\")(selectors);\n}\nfunction querySelectorAll(n, selectors) {\n\treturn getUntaintedAccessor(\"Element\", n, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor() {\n\tconst prototype = getUntaintedPrototype(\"MutationObserver\");\n\tmutationObserverUsers++;\n\tlet stopCalled = false;\n\treturn [prototype.constructor, () => {\n\t\tif (stopCalled) return;\n\t\tstopCalled = true;\n\t\tif (--mutationObserverUsers !== 0) return;\n\t\tconst cleanup = untaintedBaseIframeCleanup[\"MutationObserver\"];\n\t\tif (!cleanup) return;\n\t\ttry {\n\t\t\tcleanup();\n\t\t} finally {\n\t\t\tdelete untaintedBasePrototype[\"MutationObserver\"];\n\t\t\tdelete untaintedBaseIframeCleanup[\"MutationObserver\"];\n\t\t}\n\t}];\n}\nvar nowTimestamp = Date.now;\nif (!/*@__PURE__*/ /[1-9][0-9]{12}/.test(Date.now().toString())) nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\nfunction patch(source, name, replacement) {\n\ttry {\n\t\tif (!(name in source)) return () => {};\n\t\tconst original = source[name];\n\t\tconst wrapped = replacement(original);\n\t\tif (typeof wrapped === \"function\") {\n\t\t\twrapped.prototype = wrapped.prototype || {};\n\t\t\tObject.defineProperties(wrapped, { __rrweb_original__: {\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: original\n\t\t\t} });\n\t\t}\n\t\tsource[name] = wrapped;\n\t\treturn () => {\n\t\t\tsource[name] = original;\n\t\t};\n\t} catch {\n\t\treturn () => {};\n\t}\n}\nvar src_default = {\n\townerDocument,\n\tchildNodes,\n\tparentNode,\n\tparentElement,\n\ttextContent,\n\tfirstChild,\n\tlastChild,\n\tnextSibling,\n\tpreviousSibling,\n\tcontains,\n\tgetRootNode,\n\thost,\n\tstyleSheets,\n\tshadowRoot,\n\tquerySelector,\n\tquerySelectorAll,\n\tnowTimestamp,\n\tmutationObserverCtor,\n\tpatch\n};\n// src/utils.ts\nfunction isElement(n) {\n\treturn n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n\tconst hostEl = n && \"host\" in n && \"mode\" in n && src_default.host(n) || null;\n\treturn Boolean(hostEl && \"shadowRoot\" in hostEl && src_default.shadowRoot(hostEl) === n);\n}\n/**\n* To fix the issue https://github.com/rrweb-io/rrweb/issues/933.\n* Some websites use polyfilled shadow dom and this function is used to detect this situation.\n*/\nfunction isNativeShadowDom(shadowRoot) {\n\treturn Object.prototype.toString.call(shadowRoot) === \"[object ShadowRoot]\";\n}\n/**\n* Browsers sometimes destructively modify the css rules they receive.\n* This function tries to rectify the modifications the browser made to make it more cross platform compatible.\n* @param cssText - output of `CSSStyleRule.cssText`\n* @returns `cssText` with browser inconsistencies fixed.\n*/\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n\t/**\n\t* Chrome outputs `-webkit-background-clip` as `background-clip` in `CSSStyleRule.cssText`.\n\t* But then Chrome ignores `background-clip` as css input.\n\t* Re-introduce `-webkit-background-clip` to fix this issue.\n\t*/\n\tif (cssText.includes(\" background-clip: text;\") && !cssText.includes(\" -webkit-background-clip: text;\")) cssText = cssText.replace(/\\sbackground-clip:\\s*text;/g, \" -webkit-background-clip: text; background-clip: text;\");\n\treturn cssText;\n}\n/**\n* Browsers sometimes incorrectly escape `@import` on `.cssText` statements.\n* This function tries to correct the escaping.\n* more info: https://bugs.chromium.org/p/chromium/issues/detail?id=1472259\n* @param cssImportRule\n* @returns `cssText` with browser inconsistencies fixed, or null if not applicable.\n*/\nfunction escapeImportStatement(rule) {\n\tconst { cssText } = rule;\n\tif (cssText.split(\"\\\"\").length < 3) return cssText;\n\tconst statement = [\"@import\", `url(${JSON.stringify(rule.href)})`];\n\tif (rule.layerName === \"\") statement.push(`layer`);\n\telse if (rule.layerName) statement.push(`layer(${rule.layerName})`);\n\tif (rule.supportsText) statement.push(`supports(${rule.supportsText})`);\n\tif (rule.media.length) statement.push(rule.media.mediaText);\n\treturn statement.join(\" \") + \";\";\n}\nfunction stringifyStylesheet(s) {\n\ttry {\n\t\tconst rules = s.rules || s.cssRules;\n\t\tif (!rules) return null;\n\t\tlet sheetHref = s.href;\n\t\tif (!sheetHref && s.ownerNode) sheetHref = s.ownerNode.baseURI;\n\t\treturn fixBrowserCompatibilityIssuesInCSS(Array.from(rules, (rule) => stringifyRule(rule, sheetHref)).join(\"\"));\n\t} catch (error) {\n\t\treturn null;\n\t}\n}\nfunction stringifyRule(rule, sheetHref) {\n\tif (isCSSImportRule(rule)) {\n\t\tlet importStringified;\n\t\ttry {\n\t\t\timportStringified = stringifyStylesheet(rule.styleSheet) || escapeImportStatement(rule);\n\t\t} catch (error) {\n\t\t\timportStringified = rule.cssText;\n\t\t}\n\t\tif (rule.styleSheet.href) return absolutifyURLs(importStringified, rule.styleSheet.href);\n\t\treturn importStringified;\n\t} else {\n\t\tlet ruleStringified = rule.cssText;\n\t\tif (isCSSStyleRule(rule) && rule.selectorText.includes(\":\")) ruleStringified = fixSafariColons(ruleStringified);\n\t\tif (sheetHref) return absolutifyURLs(ruleStringified, sheetHref);\n\t\treturn ruleStringified;\n\t}\n}\nfunction fixSafariColons(cssStringified) {\n\treturn cssStringified.replace(/(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm, \"$1\\\\$2\");\n}\nfunction isCSSImportRule(rule) {\n\treturn \"styleSheet\" in rule;\n}\nfunction isCSSStyleRule(rule) {\n\treturn \"selectorText\" in rule;\n}\nvar Mirror = class {\n\tidNodeMap = /* @__PURE__ */ new Map();\n\tnodeMetaMap = /* @__PURE__ */ new WeakMap();\n\tgetId(n) {\n\t\tif (!n) return -1;\n\t\treturn this.getMeta(n)?.id ?? -1;\n\t}\n\tgetNode(id) {\n\t\treturn this.idNodeMap.get(id) || null;\n\t}\n\tgetIds() {\n\t\treturn Array.from(this.idNodeMap.keys());\n\t}\n\tgetMeta(n) {\n\t\treturn this.nodeMetaMap.get(n) || null;\n\t}\n\tremoveNodeFromMap(n) {\n\t\tconst id = this.getId(n);\n\t\tthis.idNodeMap.delete(id);\n\t\tif (n.childNodes) n.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\n\t\tconst shadowRoot = src_default.shadowRoot(n);\n\t\tif (shadowRoot) this.removeNodeFromMap(shadowRoot);\n\t}\n\thas(id) {\n\t\treturn this.idNodeMap.has(id);\n\t}\n\thasNode(node) {\n\t\treturn this.nodeMetaMap.has(node);\n\t}\n\tadd(n, meta) {\n\t\tconst id = meta.id;\n\t\tthis.idNodeMap.set(id, n);\n\t\tthis.nodeMetaMap.set(n, meta);\n\t}\n\treplace(id, n) {\n\t\tconst oldNode = this.getNode(id);\n\t\tif (oldNode) {\n\t\t\tconst meta = this.nodeMetaMap.get(oldNode);\n\t\t\tif (meta) this.nodeMetaMap.set(n, meta);\n\t\t}\n\t\tthis.idNodeMap.set(id, n);\n\t}\n\treset() {\n\t\tthis.idNodeMap = /* @__PURE__ */ new Map();\n\t\tthis.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n\t}\n};\nfunction createMirror() {\n\treturn new Mirror();\n}\nfunction maskInputValue({ element, maskInputOptions, tagName, type, value, maskInputFn }) {\n\tlet text = value || \"\";\n\tconst actualType = type && toLowerCase(type);\n\tif (maskInputOptions[tagName.toLowerCase()] || actualType && maskInputOptions[actualType]) {\n\t\tif (maskInputFn) text = maskInputFn(text, element);\n\t\telse text = \"*\".repeat(text.length);\n\t}\n\treturn text;\n}\nfunction toLowerCase(str) {\n\treturn str.toLowerCase();\n}\nvar ORIGINAL_ATTRIBUTE_NAME = \"__rrweb_original__\";\nfunction is2DCanvasBlank(canvas) {\n\tconst ctx = canvas.getContext(\"2d\");\n\tif (!ctx) return true;\n\tconst chunkSize = 50;\n\tfor (let x = 0; x < canvas.width; x += chunkSize) for (let y = 0; y < canvas.height; y += chunkSize) {\n\t\tconst getImageData = ctx.getImageData;\n\t\tconst originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;\n\t\tif (new Uint32Array(originalGetImageData.call(ctx, x, y, Math.min(chunkSize, canvas.width - x), Math.min(chunkSize, canvas.height - y)).data.buffer).some((pixel) => pixel !== 0)) return false;\n\t}\n\treturn true;\n}\nfunction isNodeMetaEqual(a, b) {\n\tif (!a || !b || a.type !== b.type) return false;\n\tif (a.type === NodeType.Document) return a.compatMode === b.compatMode;\n\telse if (a.type === NodeType.DocumentType) return a.name === b.name && a.publicId === b.publicId && a.systemId === b.systemId;\n\telse if (a.type === NodeType.Comment || a.type === NodeType.Text || a.type === NodeType.CDATA) return a.textContent === b.textContent;\n\telse if (a.type === NodeType.Element) return a.tagName === b.tagName && JSON.stringify(a.attributes) === JSON.stringify(b.attributes) && a.isSVG === b.isSVG && a.needBlock === b.needBlock;\n\treturn false;\n}\n/**\n* Get the type of an input element.\n* This takes care of the case where a password input is changed to a text input.\n* In this case, we continue to consider this of type password, in order to avoid leaking sensitive data\n* where passwords should be masked.\n*/\nfunction getInputType(element) {\n\tconst type = element.type;\n\treturn element.hasAttribute(\"data-rr-is-password\") ? \"password\" : type ? toLowerCase(type) : null;\n}\n/**\n* Extracts the file extension from an a path, considering search parameters and fragments.\n* @param path - Path to file\n* @param baseURL - [optional] Base URL of the page, used to resolve relative paths. Defaults to current page URL.\n*/\nfunction extractFileExtension(path, baseURL) {\n\tlet url;\n\ttry {\n\t\turl = new URL(path, baseURL ?? window.location.href);\n\t} catch (err) {\n\t\treturn null;\n\t}\n\treturn url.pathname.match(/\\.([0-9a-z]+)(?:$)/i)?.[1] ?? null;\n}\nfunction extractOrigin(url) {\n\tlet origin = \"\";\n\tif (url.indexOf(\"//\") > -1) origin = url.split(\"/\").slice(0, 3).join(\"/\");\n\telse origin = url.split(\"/\")[0];\n\torigin = origin.split(\"?\")[0];\n\treturn origin;\n}\nvar URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nvar URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nvar URL_WWW_MATCH = /^www\\..*/i;\nvar DATA_URI = /^(data:)([^,]*),(.*)/i;\nvar BLOB_URI = /^blob:/i;\nfunction absolutifyURLs(cssText, href) {\n\treturn (cssText || \"\").replace(URL_IN_CSS_REF, (origin, quote1, path1, quote2, path2, path3) => {\n\t\tconst filePath = path1 || path2 || path3;\n\t\tconst maybeQuote = quote1 || quote2 || \"\";\n\t\tif (!filePath) return origin;\n\t\tif (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) return `url(${maybeQuote}${filePath}${maybeQuote})`;\n\t\tif (DATA_URI.test(filePath) || BLOB_URI.test(filePath)) return `url(${maybeQuote}${filePath}${maybeQuote})`;\n\t\tif (filePath[0] === \"#\") return `url(${maybeQuote}${filePath}${maybeQuote})`;\n\t\tif (filePath[0] === \"/\") return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n\t\tconst filePathNoHash = filePath.split(\"#\")[0];\n\t\tconst maybeHash = filePath.substring(filePathNoHash.length);\n\t\tconst stack = href.split(\"#\")[0].split(\"/\");\n\t\tconst parts = filePathNoHash.split(\"/\");\n\t\tstack.pop();\n\t\tfor (const part of parts) if (part === \".\") continue;\n\t\telse if (part === \"..\") stack.pop();\n\t\telse stack.push(part);\n\t\treturn `url(${maybeQuote}${stack.join(\"/\")}${maybeHash}${maybeQuote})`;\n\t});\n}\nvar cssNormalizeBase = \"(?:/\\\\*[^*]*\\\\*/)|[\\\\s;]\";\nvar cssNormalizeRe = new RegExp(`${cssNormalizeBase}|\\\\b(0)px?`, \"g\");\nvar cssNormalizeReNoPx = new RegExp(cssNormalizeBase, \"g\");\n/**\n* Intention is to normalize by remove spaces, semicolons and CSS comments\n* so that we can compare css as authored vs. output of stringifyStylesheet\n*/\nfunction normalizeCssString(cssText, _testNoPxNorm = false) {\n\treturn _testNoPxNorm ? cssText.replace(cssNormalizeReNoPx, \"\") : cssText.replace(cssNormalizeRe, \"$1\");\n}\n/**\n* Maps the output of stringifyStylesheet to individual text nodes of a <style> element\n* which occurs when javascript is used to append to the style element\n* and may also occur when browsers opt to break up large text nodes\n* performance needs to be considered, see e.g. #1603\n*/\nfunction splitCssText(cssText, style, _testNoPxNorm = false) {\n\tconst childNodes = Array.from(style.childNodes);\n\tconst splits = [];\n\tlet iterCount = 0;\n\tif (childNodes.length > 1 && cssText && typeof cssText === \"string\") {\n\t\tlet cssTextNorm = normalizeCssString(cssText, _testNoPxNorm);\n\t\tconst normFactor = cssTextNorm.length / cssText.length;\n\t\tfor (let i = 1; i < childNodes.length; i++) if (childNodes[i].textContent && typeof childNodes[i].textContent === \"string\") {\n\t\t\tconst textContentNorm = normalizeCssString(childNodes[i].textContent, _testNoPxNorm);\n\t\t\tconst jLimit = 100;\n\t\t\tlet j = 3;\n\t\t\tfor (; j < textContentNorm.length; j++) {\n\t\t\t\tif (textContentNorm[j].match(/[a-zA-Z0-9]/) || textContentNorm.indexOf(textContentNorm.substring(0, j), 1) !== -1) continue;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (; j < textContentNorm.length; j++) {\n\t\t\t\tlet startSubstring = textContentNorm.substring(0, j);\n\t\t\t\tlet cssNormSplits = cssTextNorm.split(startSubstring);\n\t\t\t\tlet splitNorm = -1;\n\t\t\t\tif (cssNormSplits.length === 2) splitNorm = cssNormSplits[0].length;\n\t\t\t\telse if (cssNormSplits.length > 2 && cssNormSplits[0] === \"\" && childNodes[i - 1].textContent !== \"\") splitNorm = cssTextNorm.indexOf(startSubstring, 1);\n\t\t\t\telse if (cssNormSplits.length === 1) {\n\t\t\t\t\tstartSubstring = startSubstring.substring(0, startSubstring.length - 1);\n\t\t\t\t\tcssNormSplits = cssTextNorm.split(startSubstring);\n\t\t\t\t\tif (cssNormSplits.length <= 1) {\n\t\t\t\t\t\tsplits.push(cssText);\n\t\t\t\t\t\treturn splits;\n\t\t\t\t\t}\n\t\t\t\t\tj = 101;\n\t\t\t\t} else if (j === textContentNorm.length - 1) splitNorm = cssTextNorm.indexOf(startSubstring);\n\t\t\t\tif (cssNormSplits.length >= 2 && j > jLimit) {\n\t\t\t\t\tconst prevTextContent = childNodes[i - 1].textContent;\n\t\t\t\t\tif (prevTextContent && typeof prevTextContent === \"string\") {\n\t\t\t\t\t\tconst prevMinLength = normalizeCssString(prevTextContent).length;\n\t\t\t\t\t\tsplitNorm = cssTextNorm.indexOf(startSubstring, prevMinLength);\n\t\t\t\t\t}\n\t\t\t\t\tif (splitNorm === -1) splitNorm = cssNormSplits[0].length;\n\t\t\t\t}\n\t\t\t\tif (splitNorm !== -1) {\n\t\t\t\t\tlet k = Math.floor(splitNorm / normFactor);\n\t\t\t\t\tfor (; k > 0 && k < cssText.length;) {\n\t\t\t\t\t\titerCount += 1;\n\t\t\t\t\t\tif (iterCount > 50 * childNodes.length) {\n\t\t\t\t\t\t\tsplits.push(cssText);\n\t\t\t\t\t\t\treturn splits;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst normPart = normalizeCssString(cssText.substring(0, k), _testNoPxNorm);\n\t\t\t\t\t\tif (normPart.length === splitNorm) {\n\t\t\t\t\t\t\tsplits.push(cssText.substring(0, k));\n\t\t\t\t\t\t\tcssText = cssText.substring(k);\n\t\t\t\t\t\t\tcssTextNorm = cssTextNorm.substring(splitNorm);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (normPart.length < splitNorm) k += Math.max(1, Math.floor((splitNorm - normPart.length) / normFactor));\n\t\t\t\t\t\telse k -= Math.max(1, Math.floor((normPart.length - splitNorm) * normFactor));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tsplits.push(cssText);\n\treturn splits;\n}\nfunction markCssSplits(cssText, style) {\n\treturn splitCssText(cssText, style).join(\"/* rr_split */\");\n}\n// src/snapshot.ts\nvar _id = 1;\nvar tagNameRegex = /* @__PURE__ */ new RegExp(\"[^a-z0-9-_:]\");\nvar IGNORED_NODE = -2;\nfunction genId() {\n\treturn _id++;\n}\nfunction getValidTagName(element) {\n\tif (element instanceof HTMLFormElement) return \"form\";\n\tconst processedTagName = toLowerCase(element.tagName);\n\tif (tagNameRegex.test(processedTagName)) return \"div\";\n\treturn processedTagName;\n}\nvar canvasService;\nvar canvasCtx;\nvar SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nvar SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n\tif (attributeValue.trim() === \"\") return attributeValue;\n\tlet pos = 0;\n\tfunction collectCharacters(regEx) {\n\t\tlet chars;\n\t\tconst match = regEx.exec(attributeValue.substring(pos));\n\t\tif (match) {\n\t\t\tchars = match[0];\n\t\t\tpos += chars.length;\n\t\t\treturn chars;\n\t\t}\n\t\treturn \"\";\n\t}\n\tconst output = [];\n\twhile (true) {\n\t\tcollectCharacters(SRCSET_COMMAS_OR_SPACES);\n\t\tif (pos >= attributeValue.length) break;\n\t\tlet url = collectCharacters(SRCSET_NOT_SPACES);\n\t\tif (url.slice(-1) === \",\") {\n\t\t\turl = absoluteToDoc(doc, url.substring(0, url.length - 1));\n\t\t\toutput.push(url);\n\t\t} else {\n\t\t\tlet descriptorsStr = \"\";\n\t\t\turl = absoluteToDoc(doc, url);\n\t\t\tlet inParens = false;\n\t\t\twhile (true) {\n\t\t\t\tconst c = attributeValue.charAt(pos);\n\t\t\t\tif (c === \"\") {\n\t\t\t\t\toutput.push((url + descriptorsStr).trim());\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (!inParens) {\n\t\t\t\t\tif (c === \",\") {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\toutput.push((url + descriptorsStr).trim());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (c === \"(\") inParens = true;\n\t\t\t\t} else if (c === \")\") inParens = false;\n\t\t\t\tdescriptorsStr += c;\n\t\t\t\tpos += 1;\n\t\t\t}\n\t\t}\n\t}\n\treturn output.join(\", \");\n}\nvar cachedDocument = /* @__PURE__ */ new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n\tif (!attributeValue || attributeValue.trim() === \"\") return attributeValue;\n\treturn getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n\treturn Boolean(el.tagName === \"svg\" || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n\tlet a = cachedDocument.get(doc);\n\tif (!a) {\n\t\ta = doc.createElement(\"a\");\n\t\tcachedDocument.set(doc, a);\n\t}\n\tif (!customHref) customHref = \"\";\n\telse if (customHref.startsWith(\"blob:\") || customHref.startsWith(\"data:\")) return customHref;\n\ta.setAttribute(\"href\", customHref);\n\treturn a.href;\n}\nfunction transformAttribute(doc, tagName, name, value) {\n\tif (!value) return value;\n\tif (name === \"src\" || name === \"href\" && !(tagName === \"use\" && value[0] === \"#\")) return absoluteToDoc(doc, value);\n\telse if (name === \"xlink:href\" && value[0] !== \"#\") return absoluteToDoc(doc, value);\n\telse if (name === \"background\" && [\n\t\t\"table\",\n\t\t\"td\",\n\t\t\"th\"\n\t].includes(tagName)) return absoluteToDoc(doc, value);\n\telse if (name === \"srcset\") return getAbsoluteSrcsetString(doc, value);\n\telse if (name === \"style\") return absolutifyURLs(value, getHref(doc));\n\telse if (tagName === \"object\" && name === \"data\") return absoluteToDoc(doc, value);\n\treturn value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n\treturn [\"video\", \"audio\"].includes(tagName) && toLowerCase(name) === \"autoplay\";\n}\nfunction _isBlockedElement(element, blockClass, blockSelector) {\n\ttry {\n\t\tif (typeof blockClass === \"string\") {\n\t\t\tif (element.classList.contains(blockClass)) return true;\n\t\t} else for (let eIndex = element.classList.length; eIndex--;) {\n\t\t\tconst className = element.classList[eIndex];\n\t\t\tif (blockClass.test(className)) return true;\n\t\t}\n\t\tif (blockSelector) return element.matches(blockSelector);\n\t} catch (e) {}\n\treturn false;\n}\nfunction classMatchesRegex(node, regex, checkAncestors) {\n\tif (!node) return false;\n\tif (node.nodeType !== node.ELEMENT_NODE) {\n\t\tif (!checkAncestors) return false;\n\t\treturn classMatchesRegex(src_default.parentNode(node), regex, checkAncestors);\n\t}\n\tfor (let eIndex = node.classList.length; eIndex--;) {\n\t\tconst className = node.classList[eIndex];\n\t\tif (regex.test(className)) return true;\n\t}\n\tif (!checkAncestors) return false;\n\treturn classMatchesRegex(src_default.parentNode(node), regex, checkAncestors);\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, checkAncestors) {\n\tlet el;\n\tif (isElement(node)) {\n\t\tel = node;\n\t\tif (!src_default.childNodes(el).length) return false;\n\t} else if (src_default.parentElement(node) === null) return false;\n\telse el = src_default.parentElement(node);\n\ttry {\n\t\tif (typeof maskTextClass === \"string\") {\n\t\t\tif (checkAncestors) {\n\t\t\t\tif (el.closest(`.${maskTextClass}`)) return true;\n\t\t\t} else if (el.classList.contains(maskTextClass)) return true;\n\t\t} else if (classMatchesRegex(el, maskTextClass, checkAncestors)) return true;\n\t\tif (maskTextSelector) {\n\t\t\tif (checkAncestors) {\n\t\t\t\tif (el.closest(maskTextSelector)) return true;\n\t\t\t} else if (el.matches(maskTextSelector)) return true;\n\t\t}\n\t} catch (e) {}\n\treturn false;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n\tconst win = iframeEl.contentWindow;\n\tif (!win) return;\n\tlet fired = false;\n\tlet readyState;\n\ttry {\n\t\treadyState = win.document.readyState;\n\t} catch (error) {\n\t\treturn;\n\t}\n\tif (readyState !== \"complete\") {\n\t\tconst timer = setTimeout(() => {\n\t\t\tif (!fired) {\n\t\t\t\tlistener();\n\t\t\t\tfired = true;\n\t\t\t}\n\t\t}, iframeLoadTimeout);\n\t\tiframeEl.addEventListener(\"load\", () => {\n\t\t\tclearTimeout(timer);\n\t\t\tfired = true;\n\t\t\tlistener();\n\t\t});\n\t\treturn;\n\t}\n\tconst blankUrl = \"about:blank\";\n\tif (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === \"\") {\n\t\tsetTimeout(listener, 0);\n\t\treturn iframeEl.addEventListener(\"load\", listener);\n\t}\n\tiframeEl.addEventListener(\"load\", listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n\tlet fired = false;\n\tlet styleSheetLoaded;\n\ttry {\n\t\tstyleSheetLoaded = link.sheet;\n\t} catch (error) {\n\t\treturn;\n\t}\n\tif (styleSheetLoaded) return;\n\tconst timer = setTimeout(() => {\n\t\tif (!fired) {\n\t\t\tlistener();\n\t\t\tfired = true;\n\t\t}\n\t}, styleSheetLoadTimeout);\n\tlink.addEventListener(\"load\", () => {\n\t\tclearTimeout(timer);\n\t\tfired = true;\n\t\tlistener();\n\t});\n}\nfunction serializeNode(n, options) {\n\tconst { doc, mirror, blockClass, blockSelector, needsMask, inlineStylesheet, maskInputOptions = {}, maskTextFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, cssCaptured = false } = options;\n\tconst rootId = getRootId(doc, mirror);\n\tswitch (n.nodeType) {\n\t\tcase n.DOCUMENT_NODE: if (n.compatMode !== \"CSS1Compat\") return {\n\t\t\ttype: NodeType.Document,\n\t\t\tchildNodes: [],\n\t\t\tcompatMode: n.compatMode\n\t\t};\n\t\telse return {\n\t\t\ttype: NodeType.Document,\n\t\t\tchildNodes: []\n\t\t};\n\t\tcase n.DOCUMENT_TYPE_NODE: return {\n\t\t\ttype: NodeType.DocumentType,\n\t\t\tname: n.name,\n\t\t\tpublicId: n.publicId,\n\t\t\tsystemId: n.systemId,\n\t\t\trootId\n\t\t};\n\t\tcase n.ELEMENT_NODE: return serializeElementNode(n, {\n\t\t\tdoc,\n\t\t\tblockClass,\n\t\t\tblockSelector,\n\t\t\tinlineStylesheet,\n\t\t\tmaskInputOptions,\n\t\t\tmaskInputFn,\n\t\t\tdataURLOptions,\n\t\t\tinlineImages,\n\t\t\trecordCanvas,\n\t\t\tkeepIframeSrcFn,\n\t\t\tnewlyAddedElement,\n\t\t\trootId\n\t\t});\n\t\tcase n.TEXT_NODE: return serializeTextNode(n, {\n\t\t\tdoc,\n\t\t\tneedsMask,\n\t\t\tmaskTextFn,\n\t\t\trootId,\n\t\t\tcssCaptured\n\t\t});\n\t\tcase n.CDATA_SECTION_NODE: return {\n\t\t\ttype: NodeType.CDATA,\n\t\t\ttextContent: \"\",\n\t\t\trootId\n\t\t};\n\t\tcase n.COMMENT_NODE: return {\n\t\t\ttype: NodeType.Comment,\n\t\t\ttextContent: src_default.textContent(n) || \"\",\n\t\t\trootId\n\t\t};\n\t\tdefault: return false;\n\t}\n}\nfunction getRootId(doc, mirror) {\n\tif (!mirror.hasNode(doc)) return void 0;\n\tconst docId = mirror.getId(doc);\n\treturn docId === 1 ? void 0 : docId;\n}\nfunction serializeTextNode(n, options) {\n\tconst { needsMask, maskTextFn, rootId, cssCaptured } = options;\n\tconst parent = src_default.parentNode(n);\n\tconst parentTagName = parent && parent.tagName;\n\tlet textContent = \"\";\n\tconst isStyle = parentTagName === \"STYLE\" ? true : void 0;\n\tconst isScript = parentTagName === \"SCRIPT\" ? true : void 0;\n\tif (isScript) textContent = \"SCRIPT_PLACEHOLDER\";\n\telse if (!cssCaptured) {\n\t\ttextContent = src_default.textContent(n);\n\t\tif (isStyle && textContent) textContent = absolutifyURLs(textContent, getHref(options.doc));\n\t}\n\tif (!isStyle && !isScript && textContent && needsMask) textContent = maskTextFn ? maskTextFn(textContent, src_default.parentElement(n)) : textContent.replace(/[\\S]/g, \"*\");\n\treturn {\n\t\ttype: NodeType.Text,\n\t\ttextContent: textContent || \"\",\n\t\trootId\n\t};\n}\nfunction serializeElementNode(n, options) {\n\tconst { doc, blockClass, blockSelector, inlineStylesheet, maskInputOptions = {}, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, rootId } = options;\n\tconst needBlock = _isBlockedElement(n, blockClass, blockSelector);\n\tconst tagName = getValidTagName(n);\n\tlet attributes = {};\n\tconst len = n.attributes.length;\n\tfor (let i = 0; i < len; i++) {\n\t\tconst attr = n.attributes[i];\n\t\tif (!ignoreAttribute(tagName, attr.name, attr.value)) attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value);\n\t}\n\tif (tagName === \"link\" && inlineStylesheet) {\n\t\tconst stylesheet = Array.from(doc.styleSheets).find((s) => {\n\t\t\treturn s.href === n.href;\n\t\t});\n\t\tlet cssText = null;\n\t\tif (stylesheet) cssText = stringifyStylesheet(stylesheet);\n\t\tif (cssText) {\n\t\t\tdelete attributes.rel;\n\t\t\tdelete attributes.href;\n\t\t\tattributes._cssText = cssText;\n\t\t}\n\t}\n\tif (tagName === \"style\" && n.sheet) {\n\t\tlet cssText = stringifyStylesheet(n.sheet);\n\t\tif (cssText) {\n\t\t\tif (n.childNodes.length > 1) cssText = markCssSplits(cssText, n);\n\t\t\tattributes._cssText = cssText;\n\t\t}\n\t}\n\tif ([\n\t\t\"input\",\n\t\t\"textarea\",\n\t\t\"select\"\n\t].includes(tagName)) {\n\t\tconst value = n.value;\n\t\tconst checked = n.checked;\n\t\tif (attributes.type !== \"radio\" && attributes.type !== \"checkbox\" && attributes.type !== \"submit\" && attributes.type !== \"button\" && value) attributes.value = maskInputValue({\n\t\t\telement: n,\n\t\t\ttype: getInputType(n),\n\t\t\ttagName,\n\t\t\tvalue,\n\t\t\tmaskInputOptions,\n\t\t\tmaskInputFn\n\t\t});\n\t\telse if (checked) attributes.checked = checked;\n\t}\n\tif (tagName === \"option\") {\n\t\tif (n.selected && !maskInputOptions[\"select\"]) attributes.selected = true;\n\t\telse delete attributes.selected;\n\t}\n\tif (tagName === \"dialog\" && n.open) attributes.rr_open_mode = n.matches(\"dialog:modal\") ? \"modal\" : \"non-modal\";\n\tif (tagName === \"canvas\" && recordCanvas) {\n\t\tif (n.__context === \"2d\") {\n\t\t\tif (!is2DCanvasBlank(n)) attributes.rr_dataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n\t\t} else if (!(\"__context\" in n)) {\n\t\t\tconst canvasDataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n\t\t\tconst blankCanvas = doc.createElement(\"canvas\");\n\t\t\tblankCanvas.width = n.width;\n\t\t\tblankCanvas.height = n.height;\n\t\t\tif (canvasDataURL !== blankCanvas.toDataURL(dataURLOptions.type, dataURLOptions.quality)) attributes.rr_dataURL = canvasDataURL;\n\t\t}\n\t}\n\tif (tagName === \"img\" && inlineImages) {\n\t\tif (!canvasService) {\n\t\t\tcanvasService = doc.createElement(\"canvas\");\n\t\t\tcanvasCtx = canvasService.getContext(\"2d\");\n\t\t}\n\t\tconst image = n;\n\t\tconst imageSrc = image.currentSrc || image.getAttribute(\"src\") || \"<unknown-src>\";\n\t\tconst priorCrossOrigin = image.crossOrigin;\n\t\tconst recordInlineImage = () => {\n\t\t\timage.removeEventListener(\"load\", recordInlineImage);\n\t\t\ttry {\n\t\t\t\tcanvasService.width = image.naturalWidth;\n\t\t\t\tcanvasService.height = image.naturalHeight;\n\t\t\t\tcanvasCtx.drawImage(image, 0, 0);\n\t\t\t\tattributes.rr_dataURL = canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n\t\t\t} catch (err) {\n\t\t\t\tif (image.crossOrigin !== \"anonymous\") {\n\t\t\t\t\timage.crossOrigin = \"anonymous\";\n\t\t\t\t\tif (image.complete && image.naturalWidth !== 0) recordInlineImage();\n\t\t\t\t\telse image.addEventListener(\"load\", recordInlineImage);\n\t\t\t\t\treturn;\n\t\t\t\t} else console.warn(`Cannot inline img src=${imageSrc}! Error: ${err}`);\n\t\t\t}\n\t\t\tif (image.crossOrigin === \"anonymous\") priorCrossOrigin ? attributes.crossOrigin = priorCrossOrigin : image.removeAttribute(\"crossorigin\");\n\t\t};\n\t\tif (image.complete && image.naturalWidth !== 0) recordInlineImage();\n\t\telse image.addEventListener(\"load\", recordInlineImage);\n\t}\n\tif ([\"audio\", \"video\"].includes(tagName)) {\n\t\tconst mediaAttributes = attributes;\n\t\tmediaAttributes.rr_mediaState = n.paused ? \"paused\" : \"played\";\n\t\tmediaAttributes.rr_mediaCurrentTime = n.currentTime;\n\t\tmediaAttributes.rr_mediaPlaybackRate = n.playbackRate;\n\t\tmediaAttributes.rr_mediaMuted = n.muted;\n\t\tmediaAttributes.rr_mediaLoop = n.loop;\n\t\tmediaAttributes.rr_mediaVolume = n.volume;\n\t}\n\tif (!newlyAddedElement) {\n\t\tif (n.scrollLeft) attributes.rr_scrollLeft = n.scrollLeft;\n\t\tif (n.scrollTop) attributes.rr_scrollTop = n.scrollTop;\n\t}\n\tif (needBlock) {\n\t\tconst { width, height } = n.getBoundingClientRect();\n\t\tattributes = {\n\t\t\tclass: attributes.class,\n\t\t\trr_width: `${width}px`,\n\t\t\trr_height: `${height}px`\n\t\t};\n\t}\n\tif (tagName === \"iframe\" && !keepIframeSrcFn(attributes.src)) {\n\t\tif (!n.contentDocument) attributes.rr_src = attributes.src;\n\t\tdelete attributes.src;\n\t}\n\tlet isCustomElement;\n\ttry {\n\t\tif (customElements.get(tagName)) isCustomElement = true;\n\t} catch (e) {}\n\treturn {\n\t\ttype: NodeType.Element,\n\t\ttagName,\n\t\tattributes,\n\t\tchildNodes: [],\n\t\tisSVG: isSVGElement(n) || void 0,\n\t\tneedBlock,\n\t\trootId,\n\t\tisCustom: isCustomElement\n\t};\n}\nfunction lowerIfExists(maybeAttr) {\n\tif (maybeAttr === void 0 || maybeAttr === null) return \"\";\n\telse return maybeAttr.toLowerCase();\n}\nfunction slimDOMDefaults(_slimDOMOptions) {\n\tif (_slimDOMOptions === true || _slimDOMOptions === \"all\") return {\n\t\tscript: true,\n\t\tcomment: true,\n\t\theadFavicon: true,\n\t\theadWhitespace: true,\n\t\theadMetaSocial: true,\n\t\theadMetaRobots: true,\n\t\theadMetaHttpEquiv: true,\n\t\theadMetaVerification: true,\n\t\theadMetaAuthorship: _slimDOMOptions === \"all\",\n\t\theadMetaDescKeywords: _slimDOMOptions === \"all\",\n\t\theadTitleMutations: _slimDOMOptions === \"all\"\n\t};\n\telse if (_slimDOMOptions) return _slimDOMOptions;\n\treturn {};\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n\tif (slimDOMOptions.comment && sn.type === NodeType.Comment) return true;\n\telse if (sn.type === NodeType.Element) {\n\t\tif (slimDOMOptions.script && (sn.tagName === \"script\" || sn.tagName === \"link\" && (sn.attributes.rel === \"preload\" && sn.attributes.as === \"script\" || sn.attributes.rel === \"modulepreload\") || sn.tagName === \"link\" && sn.attributes.rel === \"prefetch\" && typeof sn.attributes.href === \"string\" && extractFileExtension(sn.attributes.href) === \"js\")) return true;\n\t\telse if (slimDOMOptions.headFavicon && (sn.tagName === \"link\" && sn.attributes.rel === \"shortcut icon\" || sn.tagName === \"meta\" && (lowerIfExists(sn.attributes.name).match(/^msapplication-tile(image|color)$/) || lowerIfExists(sn.attributes.name) === \"application-name\" || lowerIfExists(sn.attributes.rel) === \"icon\" || lowerIfExists(sn.attributes.rel) === \"apple-touch-icon\" || lowerIfExists(sn.attributes.rel) === \"shortcut icon\"))) return true;\n\t\telse if (sn.tagName === \"meta\") {\n\t\t\tif (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) return true;\n\t\t\telse if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === \"pinterest\")) return true;\n\t\t\telse if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === \"robots\" || lowerIfExists(sn.attributes.name) === \"googlebot\" || lowerIfExists(sn.attributes.name) === \"bingbot\")) return true;\n\t\t\telse if (slimDOMOptions.headMetaHttpEquiv && sn.attributes[\"http-equiv\"] !== void 0) return true;\n\t\t\telse if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === \"author\" || lowerIfExists(sn.attributes.name) === \"generator\" || lowerIfExists(sn.attributes.name) === \"framework\" || lowerIfExists(sn.attributes.name) === \"publisher\" || lowerIfExists(sn.attributes.name) === \"progid\" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) return true;\n\t\t\telse if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === \"google-site-verification\" || lowerIfExists(sn.attributes.name) === \"yandex-verification\" || lowerIfExists(sn.attributes.name) === \"csrf-token\" || lowerIfExists(sn.attributes.name) === \"p:domain_verify\" || lowerIfExists(sn.attributes.name) === \"verify-v1\" || lowerIfExists(sn.attributes.name) === \"verification\" || lowerIfExists(sn.attributes.name) === \"shopify-checkout-api-token\")) return true;\n\t\t}\n\t}\n\treturn false;\n}\nfunction serializeNodeWithId(n, options) {\n\tconst { doc, mirror, blockClass, blockSelector, maskTextClass, maskTextSelector, skipChild = false, inlineStylesheet = true, maskInputOptions = {}, maskTextFn, maskInputFn, slimDOMOptions, dataURLOptions = {}, inlineImages = false, recordCanvas = false, onSerialize, onIframeLoad, iframeLoadTimeout = 5e3, onStylesheetLoad, stylesheetLoadTimeout = 5e3, keepIframeSrcFn = () => false, newlyAddedElement = false, cssCaptured = false } = options;\n\tlet { needsMask } = options;\n\tlet { preserveWhiteSpace = true } = options;\n\tif (!needsMask) needsMask = needMaskingText(n, maskTextClass, maskTextSelector, needsMask === void 0);\n\tconst _serializedNode = serializeNode(n, {\n\t\tdoc,\n\t\tmirror,\n\t\tblockClass,\n\t\tblockSelector,\n\t\tneedsMask,\n\t\tinlineStylesheet,\n\t\tmaskInputOptions,\n\t\tmaskTextFn,\n\t\tmaskInputFn,\n\t\tdataURLOptions,\n\t\tinlineImages,\n\t\trecordCanvas,\n\t\tkeepIframeSrcFn,\n\t\tnewlyAddedElement,\n\t\tcssCaptured\n\t});\n\tif (!_serializedNode) {\n\t\tconsole.warn(n, \"not serialized\");\n\t\treturn null;\n\t}\n\tlet id;\n\tif (mirror.hasNode(n)) id = mirror.getId(n);\n\telse if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType.Text && !_serializedNode.textContent.replace(/^\\s+|\\s+$/gm, \"\").length) id = -2;\n\telse id = genId();\n\tconst serializedNode = Object.assign(_serializedNode, { id });\n\tmirror.add(n, serializedNode);\n\tif (id === -2) return null;\n\tif (onSerialize) onSerialize(n);\n\tlet recordChild = !skipChild;\n\tif (serializedNode.type === NodeType.Element) {\n\t\trecordChild = recordChild && !serializedNode.needBlock;\n\t\tdelete serializedNode.needBlock;\n\t\tconst shadowRootEl = src_default.shadowRoot(n);\n\t\tif (shadowRootEl && isNativeShadowDom(shadowRootEl)) serializedNode.isShadowHost = true;\n\t}\n\tif ((serializedNode.type === NodeType.Document || serializedNode.type === NodeType.Element) && recordChild) {\n\t\tif (slimDOMOptions.headWhitespace && serializedNode.type === NodeType.Element && serializedNode.tagName === \"head\") preserveWhiteSpace = false;\n\t\tconst bypassOptions = {\n\t\t\tdoc,\n\t\t\tmirror,\n\t\t\tblockClass,\n\t\t\tblockSelector,\n\t\t\tneedsMask,\n\t\t\tmaskTextClass,\n\t\t\tmaskTextSelector,\n\t\t\tskipChild,\n\t\t\tinlineStylesheet,\n\t\t\tmaskInputOptions,\n\t\t\tmaskTextFn,\n\t\t\tmaskInputFn,\n\t\t\tslimDOMOptions,\n\t\t\tdataURLOptions,\n\t\t\tinlineImages,\n\t\t\trecordCanvas,\n\t\t\tpreserveWhiteSpace,\n\t\t\tonSerialize,\n\t\t\tonIframeLoad,\n\t\t\tiframeLoadTimeout,\n\t\t\tonStylesheetLoad,\n\t\t\tstylesheetLoadTimeout,\n\t\t\tkeepIframeSrcFn,\n\t\t\tcssCaptured: false\n\t\t};\n\t\tif (serializedNode.type === NodeType.Element && serializedNode.tagName === \"textarea\" && serializedNode.attributes.value !== void 0) {} else {\n\t\t\tif (serializedNode.type === NodeType.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === \"string\") bypassOptions.cssCaptured = true;\n\t\t\tfor (const childN of Array.from(src_default.childNodes(n))) {\n\t\t\t\tconst serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n\t\t\t\tif (serializedChildNode) serializedNode.childNodes.push(serializedChildNode);\n\t\t\t}\n\t\t}\n\t\tlet shadowRootEl = null;\n\t\tif (isElement(n) && (shadowRootEl = src_default.shadowRoot(n))) for (const childN of Array.from(src_default.childNodes(shadowRootEl))) {\n\t\t\tconst serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n\t\t\tif (serializedChildNode) {\n\t\t\t\tisNativeShadowDom(shadowRootEl) && (serializedChildNode.isShadow = true);\n\t\t\t\tserializedNode.childNodes.push(serializedChildNode);\n\t\t\t}\n\t\t}\n\t}\n\tconst parent = src_default.parentNode(n);\n\tif (parent && isShadowRoot(parent) && isNativeShadowDom(parent)) serializedNode.isShadow = true;\n\tif (serializedNode.type === NodeType.Element && serializedNode.tagName === \"iframe\" && !_isBlockedElement(n, blockClass, blockSelector)) onceIframeLoaded(n, () => {\n\t\tconst iframeDoc = n.contentDocument;\n\t\tif (iframeDoc && onIframeLoad) {\n\t\t\tconst serializedIframeNode = serializeNodeWithId(iframeDoc, {\n\t\t\t\tdoc: iframeDoc,\n\t\t\t\tmirror,\n\t\t\t\tblockClass,\n\t\t\t\tblockSelector,\n\t\t\t\tneedsMask,\n\t\t\t\tmaskTextClass,\n\t\t\t\tmaskTextSelector,\n\t\t\t\tskipChild: false,\n\t\t\t\tinlineStylesheet,\n\t\t\t\tmaskInputOptions,\n\t\t\t\tmaskTextFn,\n\t\t\t\tmaskInputFn,\n\t\t\t\tslimDOMOptions,\n\t\t\t\tdataURLOptions,\n\t\t\t\tinlineImages,\n\t\t\t\trecordCanvas,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t\tonSerialize,\n\t\t\t\tonIframeLoad,\n\t\t\t\tiframeLoadTimeout,\n\t\t\t\tonStylesheetLoad,\n\t\t\t\tstylesheetLoadTimeout,\n\t\t\t\tkeepIframeSrcFn\n\t\t\t});\n\t\t\tif (serializedIframeNode) onIframeLoad(n, serializedIframeNode);\n\t\t}\n\t}, iframeLoadTimeout);\n\tif (serializedNode.type === NodeType.Element && serializedNode.tagName === \"link\" && typeof serializedNode.attributes.rel === \"string\" && (serializedNode.attributes.rel === \"stylesheet\" || serializedNode.attributes.rel === \"preload\" && typeof serializedNode.attributes.href === \"string\" && extractFileExtension(serializedNode.attributes.href) === \"css\")) onceStylesheetLoaded(n, () => {\n\t\tif (onStylesheetLoad) {\n\t\t\tconst serializedLinkNode = serializeNodeWithId(n, {\n\t\t\t\tdoc,\n\t\t\t\tmirror,\n\t\t\t\tblockClass,\n\t\t\t\tblockSelector,\n\t\t\t\tneedsMask,\n\t\t\t\tmaskTextClass,\n\t\t\t\tmaskTextSelector,\n\t\t\t\tskipChild: false,\n\t\t\t\tinlineStylesheet,\n\t\t\t\tmaskInputOptions,\n\t\t\t\tmaskTextFn,\n\t\t\t\tmaskInputFn,\n\t\t\t\tslimDOMOptions,\n\t\t\t\tdataURLOptions,\n\t\t\t\tinlineImages,\n\t\t\t\trecordCanvas,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t\tonSerialize,\n\t\t\t\tonIframeLoad,\n\t\t\t\tiframeLoadTimeout,\n\t\t\t\tonStylesheetLoad,\n\t\t\t\tstylesheetLoadTimeout,\n\t\t\t\tkeepIframeSrcFn\n\t\t\t});\n\t\t\tif (serializedLinkNode) onStylesheetLoad(n, serializedLinkNode);\n\t\t}\n\t}, stylesheetLoadTimeout);\n\treturn serializedNode;\n}\nfunction snapshot(n, options) {\n\tconst { mirror = new Mirror(), blockClass = \"rr-block\", blockSelector = null, maskTextClass = \"rr-mask\", maskTextSelector = null, inlineStylesheet = true, inlineImages = false, recordCanvas = false, maskAllInputs = false, maskTextFn, maskInputFn, slimDOM = false, dataURLOptions, preserveWhiteSpace, onSerialize, onIframeLoad, iframeLoadTimeout, onStylesheetLoad, stylesheetLoadTimeout, keepIframeSrcFn = () => false } = options || {};\n\treturn serializeNodeWithId(n, {\n\t\tdoc: n,\n\t\tmirror,\n\t\tblockClass,\n\t\tblockSelector,\n\t\tmaskTextClass,\n\t\tmaskTextSelector,\n\t\tskipChild: false,\n\t\tinlineStylesheet,\n\t\tmaskInputOptions: maskAllInputs === true ? {\n\t\t\tcolor: true,\n\t\t\tdate: true,\n\t\t\t\"datetime-local\": true,\n\t\t\temail: true,\n\t\t\tmonth: true,\n\t\t\tnumber: true,\n\t\t\trange: true,\n\t\t\tsearch: true,\n\t\t\ttel: true,\n\t\t\ttext: true,\n\t\t\ttime: true,\n\t\t\turl: true,\n\t\t\tweek: true,\n\t\t\ttextarea: true,\n\t\t\tselect: true,\n\t\t\tpassword: true\n\t\t} : maskAllInputs === false ? { password: true } : maskAllInputs,\n\t\tmaskTextFn,\n\t\tmaskInputFn,\n\t\tslimDOMOptions: slimDOMDefaults(slimDOM),\n\t\tdataURLOptions,\n\t\tinlineImages,\n\t\trecordCanvas,\n\t\tpreserveWhiteSpace,\n\t\tonSerialize,\n\t\tonIframeLoad,\n\t\tiframeLoadTimeout,\n\t\tonStylesheetLoad,\n\t\tstylesheetLoadTimeout,\n\t\tkeepIframeSrcFn,\n\t\tnewlyAddedElement: false\n\t});\n}\nfunction visitSnapshot(node, onVisit) {\n\tfunction walk(current) {\n\t\tonVisit(current);\n\t\tif (current.type === NodeType.Document || current.type === NodeType.Element) current.childNodes.forEach(walk);\n\t}\n\twalk(node);\n}\nfunction cleanupSnapshot() {\n\t_id = 1;\n}\n// src/css.ts\nvar MEDIA_SELECTOR_GLOBAL = new RegExp(/(max|min)-device-(width|height)/.source, \"g\");\nvar mediaSelectorPlugin = {\n\tpostcssPlugin: \"postcss-custom-selectors\",\n\tprepare() {\n\t\treturn {\n\t\t\tpostcssPlugin: \"postcss-custom-selectors\",\n\t\t\tAtRule: function(atrule) {\n\t\t\t\tif (atrule.params.match(MEDIA_SELECTOR_GLOBAL)) atrule.params = atrule.params.replace(MEDIA_SELECTOR_GLOBAL, \"$1-$2\");\n\t\t\t}\n\t\t};\n\t}\n};\nvar pseudoClassPlugin = {\n\tpostcssPlugin: \"postcss-hover-classes\",\n\tprepare: function() {\n\t\tconst fixed = [];\n\t\treturn { Rule: function(rule) {\n\t\t\tif (fixed.indexOf(rule) !== -1) return;\n\t\t\tfixed.push(rule);\n\t\t\trule.selectors.forEach(function(selector) {\n\t\t\t\tif (selector.includes(\":hover\")) rule.selector += \",\\n\" + selector.replace(/:hover/g, \".\\\\:hover\");\n\t\t\t});\n\t\t} };\n\t}\n};\n// ../../node_modules/picocolors/picocolors.browser.js\nvar require_picocolors_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar x = String;\n\tvar create = function() {\n\t\treturn {\n\t\t\tisColorSupported: false,\n\t\t\treset: x,\n\t\t\tbold: x,\n\t\t\tdim: x,\n\t\t\titalic: x,\n\t\t\tunderline: x,\n\t\t\tinverse: x,\n\t\t\thidden: x,\n\t\t\tstrikethrough: x,\n\t\t\tblack: x,\n\t\t\tred: x,\n\t\t\tgreen: x,\n\t\t\tyellow: x,\n\t\t\tblue: x,\n\t\t\tmagenta: x,\n\t\t\tcyan: x,\n\t\t\twhite: x,\n\t\t\tgray: x,\n\t\t\tbgBlack: x,\n\t\t\tbgRed: x,\n\t\t\tbgGreen: x,\n\t\t\tbgYellow: x,\n\t\t\tbgBlue: x,\n\t\t\tbgMagenta: x,\n\t\t\tbgCyan: x,\n\t\t\tbgWhite: x,\n\t\t\tblackBright: x,\n\t\t\tredBright: x,\n\t\t\tgreenBright: x,\n\t\t\tyellowBright: x,\n\t\t\tblueBright: x,\n\t\t\tmagentaBright: x,\n\t\t\tcyanBright: x,\n\t\t\twhiteBright: x,\n\t\t\tbgBlackBright: x,\n\t\t\tbgRedBright: x,\n\t\t\tbgGreenBright: x,\n\t\t\tbgYellowBright: x,\n\t\t\tbgBlueBright: x,\n\t\t\tbgMagentaBright: x,\n\t\t\tbgCyanBright: x,\n\t\t\tbgWhiteBright: x\n\t\t};\n\t};\n\tmodule.exports = create();\n\tmodule.exports.createColors = create;\n}));\n// __vite-browser-external\nvar require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {};\n}));\n// ../../node_modules/postcss/lib/css-syntax-error.js\nvar require_css_syntax_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar pico = require_picocolors_browser();\n\tvar terminalHighlight = require___vite_browser_external();\n\tvar CssSyntaxError = class CssSyntaxError extends Error {\n\t\tconstructor(message, line, column, source, file, plugin) {\n\t\t\tsuper(message);\n\t\t\tthis.name = \"CssSyntaxError\";\n\t\t\tthis.reason = message;\n\t\t\tif (file) this.file = file;\n\t\t\tif (source) this.source = source;\n\t\t\tif (plugin) this.plugin = plugin;\n\t\t\tif (typeof line !== \"undefined\" && typeof column !== \"undefined\") {\n\t\t\t\tif (typeof line === \"number\") {\n\t\t\t\t\tthis.line = line;\n\t\t\t\t\tthis.column = column;\n\t\t\t\t} else {\n\t\t\t\t\tthis.line = line.line;\n\t\t\t\t\tthis.column = line.column;\n\t\t\t\t\tthis.endLine = column.line;\n\t\t\t\t\tthis.endColumn = column.column;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setMessage();\n\t\t\tif (Error.captureStackTrace) Error.captureStackTrace(this, CssSyntaxError);\n\t\t}\n\t\tsetMessage() {\n\t\t\tthis.message = this.plugin ? this.plugin + \": \" : \"\";\n\t\t\tthis.message += this.file ? this.file : \"<css input>\";\n\t\t\tif (typeof this.line !== \"undefined\") this.message += \":\" + this.line + \":\" + this.column;\n\t\t\tthis.message += \": \" + this.reason;\n\t\t}\n\t\tshowSourceCode(color) {\n\t\t\tif (!this.source) return \"\";\n\t\t\tlet css = this.source;\n\t\t\tif (color == null) color = pico.isColorSupported;\n\t\t\tlet aside = (text) => text;\n\t\t\tlet mark = (text) => text;\n\t\t\tlet highlight = (text) => text;\n\t\t\tif (color) {\n\t\t\t\tlet { bold, gray, red } = pico.createColors(true);\n\t\t\t\tmark = (text) => bold(red(text));\n\t\t\t\taside = (text) => gray(text);\n\t\t\t\tif (terminalHighlight) highlight = (text) => terminalHighlight(text);\n\t\t\t}\n\t\t\tlet lines = css.split(/\\r?\\n/);\n\t\t\tlet start = Math.max(this.line - 3, 0);\n\t\t\tlet end = Math.min(this.line + 2, lines.length);\n\t\t\tlet maxWidth = String(end).length;\n\t\t\treturn lines.slice(start, end).map((line, index) => {\n\t\t\t\tlet number = start + 1 + index;\n\t\t\t\tlet gutter = \" \" + (\" \" + number).slice(-maxWidth) + \" | \";\n\t\t\t\tif (number === this.line) {\n\t\t\t\t\tif (line.length > 160) {\n\t\t\t\t\t\tlet padding = 20;\n\t\t\t\t\t\tlet subLineStart = Math.max(0, this.column - padding);\n\t\t\t\t\t\tlet subLineEnd = Math.max(this.column + padding, this.endColumn + padding);\n\t\t\t\t\t\tlet subLine = line.slice(subLineStart, subLineEnd);\n\t\t\t\t\t\tlet spacing = aside(gutter.replace(/\\d/g, \" \")) + line.slice(0, Math.min(this.column - 1, 19)).replace(/[^\\t]/g, \" \");\n\t\t\t\t\t\treturn mark(\">\") + aside(gutter) + highlight(subLine) + \"\\n \" + spacing + mark(\"^\");\n\t\t\t\t\t}\n\t\t\t\t\tlet spacing = aside(gutter.replace(/\\d/g, \" \")) + line.slice(0, this.column - 1).replace(/[^\\t]/g, \" \");\n\t\t\t\t\treturn mark(\">\") + aside(gutter) + highlight(line) + \"\\n \" + spacing + mark(\"^\");\n\t\t\t\t}\n\t\t\t\treturn \" \" + aside(gutter) + highlight(line);\n\t\t\t}).join(\"\\n\");\n\t\t}\n\t\ttoString() {\n\t\t\tlet code = this.showSourceCode();\n\t\t\tif (code) code = \"\\n\\n\" + code + \"\\n\";\n\t\t\treturn this.name + \": \" + this.message + code;\n\t\t}\n\t};\n\tmodule.exports = CssSyntaxError;\n\tCssSyntaxError.default = CssSyntaxError;\n}));\n// ../../node_modules/postcss/lib/stringifier.js\nvar require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar AT_NAME_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/;\n\tvar DEFAULT_RAW = {\n\t\tafter: \"\\n\",\n\t\tbeforeClose: \"\\n\",\n\t\tbeforeComment: \"\\n\",\n\t\tbeforeDecl: \"\\n\",\n\t\tbeforeOpen: \" \",\n\t\tbeforeRule: \"\\n\",\n\t\tcolon: \": \",\n\t\tcommentLeft: \" \",\n\t\tcommentRight: \" \",\n\t\temptyBody: \"\",\n\t\tindent: \"    \",\n\t\tsemicolon: false\n\t};\n\tfunction capitalize(str) {\n\t\treturn str[0].toUpperCase() + str.slice(1);\n\t}\n\tfunction atruleStart(str, node) {\n\t\tlet name = \"@\" + node.name;\n\t\tlet params = node.params ? str.rawValue(node, \"params\") : \"\";\n\t\tlet afterName = node.raws.afterName;\n\t\tif (typeof afterName === \"undefined\") afterName = params ? \" \" : \"\";\n\t\telse if (afterName === \"\" && params && !AT_NAME_END.test(params[0])) afterName = \" \";\n\t\treturn name + afterName + params;\n\t}\n\tfunction isCustomProperty(node) {\n\t\tif (!node.prop.startsWith(\"--\")) return false;\n\t\tlet before = node.raws.before;\n\t\treturn typeof before === \"undefined\" || !/[^\\s;]$/.test(before);\n\t}\n\tfunction pushBody(str, stack, node) {\n\t\tlet nodes = node.nodes;\n\t\tlet last = nodes.length - 1;\n\t\twhile (last > 0) {\n\t\t\tif (nodes[last].type !== \"comment\") break;\n\t\t\tlast -= 1;\n\t\t}\n\t\tlet semicolon = str.raw(node, \"semicolon\");\n\t\tlet isDocument = node.type === \"document\";\n\t\tfor (let i = nodes.length - 1; i >= 0; i--) {\n\t\t\tlet child = nodes[i];\n\t\t\tlet childSemicolon = last !== i || semicolon;\n\t\t\tif (!childSemicolon && i < nodes.length - 1 && (child.type === \"atrule\" && !child.nodes || child.type === \"decl\" && isCustomProperty(child))) childSemicolon = true;\n\t\t\tstack.push({\n\t\t\t\tdocument: isDocument,\n\t\t\t\tnode: child,\n\t\t\t\tsemicolon: childSemicolon\n\t\t\t});\n\t\t}\n\t}\n\tfunction pushBlock(str, stack, node, start) {\n\t\tlet between = str.raw(node, \"between\", \"beforeOpen\");\n\t\tstr.builder(start + between + \"{\", node, \"start\");\n\t\tlet hasNodes = node.nodes && node.nodes.length;\n\t\tlet close = () => {\n\t\t\tlet after = hasNodes ? str.raw(node, \"after\") : str.raw(node, \"after\", \"emptyBody\");\n\t\t\tif (after) str.builder(after);\n\t\t\tstr.builder(\"}\", node, \"end\");\n\t\t\tif (node.type === \"rule\" && node.raws.ownSemicolon) str.builder(node.raws.ownSemicolon, node, \"end\");\n\t\t};\n\t\tif (hasNodes) {\n\t\t\tstack.push(close);\n\t\t\tpushBody(str, stack, node);\n\t\t} else close();\n\t}\n\tvar Stringifier = class Stringifier {\n\t\tconstructor(builder) {\n\t\t\tthis.builder = builder;\n\t\t}\n\t\tatrule(node, semicolon) {\n\t\t\tlet start = atruleStart(this, node);\n\t\t\tif (node.nodes) this.block(node, start);\n\t\t\telse {\n\t\t\t\tlet end = (node.raws.between || \"\") + (semicolon ? \";\" : \"\");\n\t\t\t\tthis.builder(start + end, node);\n\t\t\t}\n\t\t}\n\t\tbeforeAfter(node, detect) {\n\t\t\tlet value;\n\t\t\tif (node.type === \"decl\") value = this.raw(node, null, \"beforeDecl\");\n\t\t\telse if (node.type === \"comment\") value = this.raw(node, null, \"beforeComment\");\n\t\t\telse if (detect === \"before\") value = this.raw(node, null, \"beforeRule\");\n\t\t\telse value = this.raw(node, null, \"beforeClose\");\n\t\t\tlet buf = node.parent;\n\t\t\tlet depth = 0;\n\t\t\twhile (buf && buf.type !== \"root\") {\n\t\t\t\tdepth += 1;\n\t\t\t\tbuf = buf.parent;\n\t\t\t}\n\t\t\tif (value.includes(\"\\n\")) {\n\t\t\t\tlet indent = this.raw(node, null, \"indent\");\n\t\t\t\tif (indent.length) for (let step = 0; step < depth; step++) value += indent;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tblock(node, start) {\n\t\t\tlet between = this.raw(node, \"between\", \"beforeOpen\");\n\t\t\tthis.builder(start + between + \"{\", node, \"start\");\n\t\t\tlet after;\n\t\t\tif (node.nodes && node.nodes.length) {\n\t\t\t\tthis.body(node);\n\t\t\t\tafter = this.raw(node, \"after\");\n\t\t\t} else after = this.raw(node, \"after\", \"emptyBody\");\n\t\t\tif (after) this.builder(after);\n\t\t\tthis.builder(\"}\", node, \"end\");\n\t\t}\n\t\tbody(node) {\n\t\t\tlet proto = Stringifier.prototype;\n\t\t\tlet expandable = [\n\t\t\t\t\"atrule\",\n\t\t\t\t\"block\",\n\t\t\t\t\"body\",\n\t\t\t\t\"rule\",\n\t\t\t\t\"stringify\"\n\t\t\t].every((method) => this[method] === proto[method]);\n\t\t\tlet stack = [];\n\t\t\tpushBody(this, stack, node);\n\t\t\twhile (stack.length > 0) {\n\t\t\t\tlet entry = stack.pop();\n\t\t\t\tif (typeof entry === \"function\") {\n\t\t\t\t\tentry();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlet child = entry.node;\n\t\t\t\tlet before = this.raw(child, \"before\");\n\t\t\t\tif (before) this.builder(before);\n\t\t\t\tif (expandable && child.type === \"rule\") pushBlock(this, stack, child, this.rawValue(child, \"selector\"));\n\t\t\t\telse if (expandable && child.type === \"atrule\" && child.nodes) pushBlock(this, stack, child, atruleStart(this, child));\n\t\t\t\telse this.stringify(child, entry.semicolon);\n\t\t\t}\n\t\t}\n\t\tcomment(node) {\n\t\t\tlet left = this.raw(node, \"left\", \"commentLeft\");\n\t\t\tlet right = this.raw(node, \"right\", \"commentRight\");\n\t\t\tthis.builder(\"/*\" + left + node.text + right + \"*/\", node);\n\t\t}\n\t\tdecl(node, semicolon) {\n\t\t\tlet raws = node.raws;\n\t\t\tlet between = this.raw(node, \"between\", \"colon\");\n\t\t\tlet string = node.prop + between + this.rawValue(node, \"value\");\n\t\t\tif (node.important) string += raws.important || \" !important\";\n\t\t\tif (semicolon) string += \";\";\n\t\t\tthis.builder(string, node);\n\t\t}\n\t\tdocument(node) {\n\t\t\tthis.body(node);\n\t\t}\n\t\traw(node, own, detect) {\n\t\t\tlet value;\n\t\t\tif (!detect) detect = own;\n\t\t\tif (own) {\n\t\t\t\tvalue = node.raws[own];\n\t\t\t\tif (typeof value !== \"undefined\") return value;\n\t\t\t}\n\t\t\tlet parent = node.parent;\n\t\t\tif (detect === \"before\") {\n\t\t\t\tif (!parent || parent.type === \"root\" && parent.first === node) return \"\";\n\t\t\t\tif (parent && parent.type === \"document\") return \"\";\n\t\t\t}\n\t\t\tif (!parent) return DEFAULT_RAW[detect];\n\t\t\tlet root = node.root();\n\t\t\tlet cache = root.rawCache || (root.rawCache = {});\n\t\t\tif (typeof cache[detect] !== \"undefined\") return cache[detect];\n\t\t\tif (detect === \"before\" || detect === \"after\") return this.beforeAfter(node, detect);\n\t\t\telse {\n\t\t\t\tlet method = \"raw\" + capitalize(detect);\n\t\t\t\tif (this[method]) value = this[method](root, node);\n\t\t\t\telse root.walk((i) => {\n\t\t\t\t\tvalue = i.raws[own];\n\t\t\t\t\tif (typeof value !== \"undefined\") return false;\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (typeof value === \"undefined\") value = DEFAULT_RAW[detect];\n\t\t\tcache[detect] = value;\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeClose(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.nodes && i.nodes.length > 0) {\n\t\t\t\t\tif (typeof i.raws.after !== \"undefined\") {\n\t\t\t\t\t\tvalue = i.raws.after;\n\t\t\t\t\t\tif (value.includes(\"\\n\")) value = value.replace(/[^\\n]+$/, \"\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (value) value = value.replace(/\\S/g, \"\");\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeComment(root, node) {\n\t\t\tlet value;\n\t\t\troot.walkComments((i) => {\n\t\t\t\tif (typeof i.raws.before !== \"undefined\") {\n\t\t\t\t\tvalue = i.raws.before;\n\t\t\t\t\tif (value.includes(\"\\n\")) value = value.replace(/[^\\n]+$/, \"\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (typeof value === \"undefined\") value = this.raw(node, null, \"beforeDecl\");\n\t\t\telse if (value) value = value.replace(/\\S/g, \"\");\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeDecl(root, node) {\n\t\t\tlet value;\n\t\t\troot.walkDecls((i) => {\n\t\t\t\tif (typeof i.raws.before !== \"undefined\") {\n\t\t\t\t\tvalue = i.raws.before;\n\t\t\t\t\tif (value.includes(\"\\n\")) value = value.replace(/[^\\n]+$/, \"\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (typeof value === \"undefined\") value = this.raw(node, null, \"beforeRule\");\n\t\t\telse if (value) value = value.replace(/\\S/g, \"\");\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeOpen(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.type !== \"decl\") {\n\t\t\t\t\tvalue = i.raws.between;\n\t\t\t\t\tif (typeof value !== \"undefined\") return false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeRule(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.nodes && (i.parent !== root || root.first !== i)) {\n\t\t\t\t\tif (typeof i.raws.before !== \"undefined\") {\n\t\t\t\t\t\tvalue = i.raws.before;\n\t\t\t\t\t\tif (value.includes(\"\\n\")) value = value.replace(/[^\\n]+$/, \"\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (value) value = value.replace(/\\S/g, \"\");\n\t\t\treturn value;\n\t\t}\n\t\trawColon(root) {\n\t\t\tlet value;\n\t\t\troot.walkDecls((i) => {\n\t\t\t\tif (typeof i.raws.between !== \"undefined\") {\n\t\t\t\t\tvalue = i.raws.between.replace(/[^\\s:]/g, \"\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawEmptyBody(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.nodes && i.nodes.length === 0) {\n\t\t\t\t\tvalue = i.raws.after;\n\t\t\t\t\tif (typeof value !== \"undefined\") return false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawIndent(root) {\n\t\t\tif (root.raws.indent) return root.raws.indent;\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tlet p = i.parent;\n\t\t\t\tif (p && p !== root && p.parent && p.parent === root) {\n\t\t\t\t\tif (typeof i.raws.before !== \"undefined\") {\n\t\t\t\t\t\tlet parts = i.raws.before.split(\"\\n\");\n\t\t\t\t\t\tvalue = parts[parts.length - 1];\n\t\t\t\t\t\tvalue = value.replace(/\\S/g, \"\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawSemicolon(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.nodes && i.nodes.length && i.last.type === \"decl\") {\n\t\t\t\t\tvalue = i.raws.semicolon;\n\t\t\t\t\tif (typeof value !== \"undefined\") return false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawValue(node, prop) {\n\t\t\tlet value = node[prop];\n\t\t\tlet raw = node.raws[prop];\n\t\t\tif (raw && raw.value === value) return raw.raw;\n\t\t\treturn value;\n\t\t}\n\t\troot(node) {\n\t\t\tif (!(node.parent && node.parent.type === \"document\") && node.source && node.source.input.hasBOM) this.builder(\"﻿\", node, \"start\");\n\t\t\tthis.body(node);\n\t\t\tif (node.raws.after) this.builder(node.raws.after);\n\t\t}\n\t\trule(node) {\n\t\t\tthis.block(node, this.rawValue(node, \"selector\"));\n\t\t\tif (node.raws.ownSemicolon) this.builder(node.raws.ownSemicolon, node, \"end\");\n\t\t}\n\t\tstringify(node, semicolon) {\n\t\t\t/* c8 ignore start */\n\t\t\tif (!this[node.type]) throw new Error(\"Unknown AST node type \" + node.type + \". Maybe you need to change PostCSS stringifier.\");\n\t\t\t/* c8 ignore stop */\n\t\t\tthis[node.type](node, semicolon);\n\t\t}\n\t};\n\tmodule.exports = Stringifier;\n\tStringifier.default = Stringifier;\n}));\n// ../../node_modules/postcss/lib/stringify.js\nvar require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Stringifier = require_stringifier();\n\tvar STYLE_TAG = /(<)(\\/?style\\b)/gi;\n\tvar COMMENT_OPEN = /(<)(!--)/g;\n\tfunction escapeHTMLInCSS(str) {\n\t\tif (!str.includes(\"<\")) return str;\n\t\treturn str.replace(STYLE_TAG, \"\\\\3c $2\").replace(COMMENT_OPEN, \"\\\\3c $2\");\n\t}\n\tfunction cutEscaped(chunks, css, escaped) {\n\t\tlet parts = [];\n\t\tlet at = 0;\n\t\tlet into = 0;\n\t\tfor (let i = 0; i < chunks.length; i += 3) {\n\t\t\tlet from = into;\n\t\t\tlet end = at + chunks[i].length;\n\t\t\twhile (at < end) if (css[at] === escaped[into]) {\n\t\t\t\tat += 1;\n\t\t\t\tinto += 1;\n\t\t\t} else {\n\t\t\t\tat += 1;\n\t\t\t\tinto += 4;\n\t\t\t}\n\t\t\tparts.push(escaped.slice(from, into));\n\t\t}\n\t\treturn parts;\n\t}\n\tvar SafeStringifier = class extends Stringifier {\n\t\tescapeHTML(print) {\n\t\t\tlet builder = this.builder;\n\t\t\tlet chunks, css;\n\t\t\tthis.builder = (str, child, type) => {\n\t\t\t\tif (chunks) {\n\t\t\t\t\tcss += str;\n\t\t\t\t\tchunks.push(str, child, type);\n\t\t\t\t} else if (str.includes(\"<\")) {\n\t\t\t\t\tcss = str;\n\t\t\t\t\tchunks = [\n\t\t\t\t\t\tstr,\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\ttype\n\t\t\t\t\t];\n\t\t\t\t} else builder(str, child, type);\n\t\t\t};\n\t\t\tprint();\n\t\t\tthis.builder = builder;\n\t\t\tif (!chunks) return;\n\t\t\tlet escaped = escapeHTMLInCSS(css);\n\t\t\tif (escaped === css) for (let i = 0; i < chunks.length; i += 3) builder(chunks[i], chunks[i + 1], chunks[i + 2]);\n\t\t\telse {\n\t\t\t\tlet parts = cutEscaped(chunks, css, escaped);\n\t\t\t\tfor (let i = 0; i < chunks.length; i += 3) builder(parts[i / 3], chunks[i + 1], chunks[i + 2]);\n\t\t\t}\n\t\t}\n\t\troot(node) {\n\t\t\tif (node.parent && node.parent.type === \"document\") {\n\t\t\t\tthis.escapeHTML(() => this.body(node));\n\t\t\t\tif (node.raws.after) this.builder(node.raws.after);\n\t\t\t} else this.escapeHTML(() => super.root(node));\n\t\t}\n\t};\n\tfunction stringify(node, builder) {\n\t\tlet str = new SafeStringifier(builder);\n\t\tif (node.type === \"root\" || node.type === \"document\") str.stringify(node);\n\t\telse str.escapeHTML(() => str.stringify(node));\n\t}\n\tmodule.exports = stringify;\n\tstringify.default = stringify;\n}));\n// ../../node_modules/postcss/lib/symbols.js\nvar require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports.isClean = Symbol(\"isClean\");\n\tmodule.exports.my = Symbol(\"my\");\n}));\n// ../../node_modules/postcss/lib/node.js\nvar require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar CssSyntaxError = require_css_syntax_error();\n\tvar Stringifier = require_stringifier();\n\tvar stringify = require_stringify();\n\tvar { isClean, my } = require_symbols();\n\tfunction cloneNode(obj, parent) {\n\t\tlet cloned = new obj.constructor();\n\t\tlet stack = [[\n\t\t\tobj,\n\t\t\tcloned,\n\t\t\tparent\n\t\t]];\n\t\twhile (stack.length > 0) {\n\t\t\tlet [source, target, targetParent] = stack.pop();\n\t\t\tfor (let i in source) {\n\t\t\t\tif (!Object.prototype.hasOwnProperty.call(source, i))\n /* c8 ignore next 2 */\n\t\t\t\tcontinue;\n\t\t\t\tif (i === \"proxyCache\") continue;\n\t\t\t\tlet value = source[i];\n\t\t\t\tlet type = typeof value;\n\t\t\t\tif (i === \"parent\" && type === \"object\") {\n\t\t\t\t\tif (targetParent) target[i] = targetParent;\n\t\t\t\t} else if (i === \"source\") target[i] = value;\n\t\t\t\telse if (Array.isArray(value)) {\n\t\t\t\t\tlet children = [];\n\t\t\t\t\ttarget[i] = children;\n\t\t\t\t\tfor (let j of value) {\n\t\t\t\t\t\tlet childClone = new j.constructor();\n\t\t\t\t\t\tchildren.push(childClone);\n\t\t\t\t\t\tstack.push([\n\t\t\t\t\t\t\tj,\n\t\t\t\t\t\t\tchildClone,\n\t\t\t\t\t\t\ttarget\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (type === \"object\" && value !== null) {\n\t\t\t\t\t\tlet valueClone = new value.constructor();\n\t\t\t\t\t\tstack.push([\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\tvalueClone,\n\t\t\t\t\t\t\tvoid 0\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tvalue = valueClone;\n\t\t\t\t\t}\n\t\t\t\t\ttarget[i] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cloned;\n\t}\n\tfunction sourceOffset(inputCSS, position) {\n\t\tif (position && typeof position.offset !== \"undefined\") return position.offset;\n\t\tlet column = 1;\n\t\tlet line = 1;\n\t\tlet offset = 0;\n\t\tfor (let i = 0; i < inputCSS.length; i++) {\n\t\t\tif (line === position.line && column === position.column) {\n\t\t\t\toffset = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (inputCSS[i] === \"\\n\") {\n\t\t\t\tcolumn = 1;\n\t\t\t\tline += 1;\n\t\t\t} else column += 1;\n\t\t}\n\t\treturn offset;\n\t}\n\tvar Node = class Node {\n\t\tget proxyOf() {\n\t\t\treturn this;\n\t\t}\n\t\tconstructor(defaults = {}) {\n\t\t\tthis.raws = {};\n\t\t\tthis[isClean] = false;\n\t\t\tthis[my] = true;\n\t\t\tfor (let name of Object.keys(defaults)) {\n\t\t\t\tif (name === \"__proto__\") continue;\n\t\t\t\tif (name === \"nodes\") {\n\t\t\t\t\tthis.nodes = [];\n\t\t\t\t\tfor (let node of defaults[name]) if (typeof node.clone === \"function\" && node.parent) this.append(node.clone());\n\t\t\t\t\telse this.append(node);\n\t\t\t\t} else this[name] = defaults[name];\n\t\t\t}\n\t\t}\n\t\taddToError(error) {\n\t\t\terror.postcssNode = this;\n\t\t\tif (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n\t\t\t\tlet s = this.source;\n\t\t\t\terror.stack = error.stack.replace(/\\n\\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`);\n\t\t\t}\n\t\t\treturn error;\n\t\t}\n\t\tafter(add) {\n\t\t\tthis.parent.insertAfter(this, add);\n\t\t\treturn this;\n\t\t}\n\t\tassign(overrides = {}) {\n\t\t\tfor (let name in overrides) this[name] = overrides[name];\n\t\t\treturn this;\n\t\t}\n\t\tbefore(add) {\n\t\t\tthis.parent.insertBefore(this, add);\n\t\t\treturn this;\n\t\t}\n\t\tcleanRaws(keepBetween) {\n\t\t\tdelete this.raws.before;\n\t\t\tdelete this.raws.after;\n\t\t\tif (!keepBetween) delete this.raws.between;\n\t\t}\n\t\tclone(overrides = {}) {\n\t\t\tlet cloned = cloneNode(this);\n\t\t\tfor (let name in overrides) cloned[name] = overrides[name];\n\t\t\treturn cloned;\n\t\t}\n\t\tcloneAfter(overrides = {}) {\n\t\t\tlet cloned = this.clone(overrides);\n\t\t\tthis.parent.insertAfter(this, cloned);\n\t\t\treturn cloned;\n\t\t}\n\t\tcloneBefore(overrides = {}) {\n\t\t\tlet cloned = this.clone(overrides);\n\t\t\tthis.parent.insertBefore(this, cloned);\n\t\t\treturn cloned;\n\t\t}\n\t\terror(message, opts = {}) {\n\t\t\tif (this.source) {\n\t\t\t\tlet { end, start } = this.rangeBy(opts);\n\t\t\t\treturn this.source.input.error(message, {\n\t\t\t\t\tcolumn: start.column,\n\t\t\t\t\tline: start.line\n\t\t\t\t}, {\n\t\t\t\t\tcolumn: end.column,\n\t\t\t\t\tline: end.line\n\t\t\t\t}, opts);\n\t\t\t}\n\t\t\treturn new CssSyntaxError(message);\n\t\t}\n\t\tgetProxyProcessor() {\n\t\t\treturn {\n\t\t\t\tget(node, prop) {\n\t\t\t\t\tif (prop === \"proxyOf\") return node;\n\t\t\t\t\telse if (prop === \"root\") return () => node.root().toProxy();\n\t\t\t\t\telse return node[prop];\n\t\t\t\t},\n\t\t\t\tset(node, prop, value) {\n\t\t\t\t\tif (node[prop] === value) return true;\n\t\t\t\t\tnode[prop] = value;\n\t\t\t\t\tif (prop === \"prop\" || prop === \"value\" || prop === \"name\" || prop === \"params\" || prop === \"important\" || \n\t\t\t\t\t/* c8 ignore next */\n\t\t\t\t\tprop === \"text\") node.markDirty();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t/* c8 ignore next 3 */\n\t\tmarkClean() {\n\t\t\tthis[isClean] = true;\n\t\t}\n\t\tmarkDirty() {\n\t\t\tif (this[isClean]) {\n\t\t\t\tthis[isClean] = false;\n\t\t\t\tlet next = this;\n\t\t\t\twhile (next = next.parent) next[isClean] = false;\n\t\t\t}\n\t\t}\n\t\tnext() {\n\t\t\tif (!this.parent) return void 0;\n\t\t\tlet index = this.parent.index(this);\n\t\t\treturn this.parent.nodes[index + 1];\n\t\t}\n\t\tpositionBy(opts = {}) {\n\t\t\tlet inputString = \"document\" in this.source.input ? this.source.input.document : this.source.input.css;\n\t\t\tlet pos = {\n\t\t\t\tcolumn: this.source.start.column,\n\t\t\t\tline: this.source.start.line,\n\t\t\t\toffset: sourceOffset(inputString, this.source.start)\n\t\t\t};\n\t\t\tif (opts.index) pos = this.positionInside(opts.index);\n\t\t\telse if (opts.word) {\n\t\t\t\tlet index = inputString.slice(sourceOffset(inputString, this.source.start), this.rangeBy().end.offset).indexOf(opts.word);\n\t\t\t\tif (index !== -1) pos = this.positionInside(index);\n\t\t\t}\n\t\t\treturn pos;\n\t\t}\n\t\tpositionInside(index) {\n\t\t\tlet column = this.source.start.column;\n\t\t\tlet line = this.source.start.line;\n\t\t\tlet inputString = \"document\" in this.source.input ? this.source.input.document : this.source.input.css;\n\t\t\tlet offset = sourceOffset(inputString, this.source.start);\n\t\t\tlet end = offset + index;\n\t\t\tfor (let i = offset; i < end; i++) if (inputString[i] === \"\\n\") {\n\t\t\t\tcolumn = 1;\n\t\t\t\tline += 1;\n\t\t\t} else column += 1;\n\t\t\treturn {\n\t\t\t\tcolumn,\n\t\t\t\tline,\n\t\t\t\toffset: end\n\t\t\t};\n\t\t}\n\t\tprev() {\n\t\t\tif (!this.parent) return void 0;\n\t\t\tlet index = this.parent.index(this);\n\t\t\treturn this.parent.nodes[index - 1];\n\t\t}\n\t\trangeBy(opts = {}) {\n\t\t\tlet inputString = \"document\" in this.source.input ? this.source.input.document : this.source.input.css;\n\t\t\tlet start = {\n\t\t\t\tcolumn: this.source.start.column,\n\t\t\t\tline: this.source.start.line,\n\t\t\t\toffset: sourceOffset(inputString, this.source.start)\n\t\t\t};\n\t\t\tlet end = this.source.end ? {\n\t\t\t\tcolumn: this.source.end.column + 1,\n\t\t\t\tline: this.source.end.line,\n\t\t\t\toffset: typeof this.source.end.offset === \"number\" ? this.source.end.offset : sourceOffset(inputString, this.source.end) + 1\n\t\t\t} : {\n\t\t\t\tcolumn: start.column + 1,\n\t\t\t\tline: start.line,\n\t\t\t\toffset: start.offset + 1\n\t\t\t};\n\t\t\tif (opts.word) {\n\t\t\t\tlet index = inputString.slice(sourceOffset(inputString, this.source.start), end.offset).indexOf(opts.word);\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\tstart = this.positionInside(index);\n\t\t\t\t\tend = this.positionInside(index + opts.word.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (opts.start) start = {\n\t\t\t\t\tcolumn: opts.start.column,\n\t\t\t\t\tline: opts.start.line,\n\t\t\t\t\toffset: sourceOffset(inputString, opts.start)\n\t\t\t\t};\n\t\t\t\telse if (typeof opts.index === \"number\") start = this.positionInside(opts.index);\n\t\t\t\tif (opts.end) end = {\n\t\t\t\t\tcolumn: opts.end.column,\n\t\t\t\t\tline: opts.end.line,\n\t\t\t\t\toffset: sourceOffset(inputString, opts.end)\n\t\t\t\t};\n\t\t\t\telse if (typeof opts.endIndex === \"number\") end = this.positionInside(opts.endIndex);\n\t\t\t\telse if (typeof opts.index === \"number\") end = this.positionInside(opts.index + 1);\n\t\t\t}\n\t\t\tif (end.line < start.line || end.line === start.line && end.column <= start.column) end = {\n\t\t\t\tcolumn: start.column + 1,\n\t\t\t\tline: start.line,\n\t\t\t\toffset: start.offset + 1\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tend,\n\t\t\t\tstart\n\t\t\t};\n\t\t}\n\t\traw(prop, defaultType) {\n\t\t\treturn new Stringifier().raw(this, prop, defaultType);\n\t\t}\n\t\tremove() {\n\t\t\tif (this.parent) this.parent.removeChild(this);\n\t\t\tthis.parent = void 0;\n\t\t\treturn this;\n\t\t}\n\t\treplaceWith(...nodes) {\n\t\t\tif (this.parent) {\n\t\t\t\tlet bookmark = this;\n\t\t\t\tlet foundSelf = false;\n\t\t\t\tfor (let node of nodes) if (node === this) foundSelf = true;\n\t\t\t\telse if (foundSelf) {\n\t\t\t\t\tthis.parent.insertAfter(bookmark, node);\n\t\t\t\t\tbookmark = node;\n\t\t\t\t} else this.parent.insertBefore(bookmark, node);\n\t\t\t\tif (!foundSelf) this.remove();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\troot() {\n\t\t\tlet result = this;\n\t\t\twhile (result.parent && result.parent.type !== \"document\") result = result.parent;\n\t\t\treturn result;\n\t\t}\n\t\ttoJSON(_, inputs) {\n\t\t\tlet emitInputs = inputs == null;\n\t\t\tinputs = inputs || /* @__PURE__ */ new Map();\n\t\t\tlet holderOfRoot = [];\n\t\t\tlet queue = [[\n\t\t\t\tthis,\n\t\t\t\tholderOfRoot,\n\t\t\t\t0\n\t\t\t]];\n\t\t\tfor (let step = 0; step < queue.length; step++) {\n\t\t\t\tlet [node, holder, key] = queue[step];\n\t\t\t\tlet fixed = {};\n\t\t\t\tholder[key] = fixed;\n\t\t\t\tfor (let name in node) {\n\t\t\t\t\tif (!Object.prototype.hasOwnProperty.call(node, name))\n /* c8 ignore next 2 */\n\t\t\t\t\tcontinue;\n\t\t\t\t\tif (name === \"parent\" || name === \"proxyCache\") continue;\n\t\t\t\t\tlet value = node[name];\n\t\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\t\tlet fixedArray = [];\n\t\t\t\t\t\tfixed[name] = fixedArray;\n\t\t\t\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\t\t\t\tlet item = value[i];\n\t\t\t\t\t\t\tif (typeof item === \"object\" && item.toJSON) {\n\t\t\t\t\t\t\t\tif (item.toJSON === Node.prototype.toJSON) queue.push([\n\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\tfixedArray,\n\t\t\t\t\t\t\t\t\ti\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\telse fixedArray[i] = item.toJSON(null, inputs);\n\t\t\t\t\t\t\t} else fixedArray[i] = item;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (typeof value === \"object\" && value.toJSON) {\n\t\t\t\t\t\tif (value.toJSON === Node.prototype.toJSON) queue.push([\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\tfixed,\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t]);\n\t\t\t\t\t\telse fixed[name] = value.toJSON(null, inputs);\n\t\t\t\t\t} else if (name === \"source\") {\n\t\t\t\t\t\tif (value == null) continue;\n\t\t\t\t\t\tlet inputId = inputs.get(value.input);\n\t\t\t\t\t\tif (inputId == null) {\n\t\t\t\t\t\t\tinputId = inputs.size;\n\t\t\t\t\t\t\tinputs.set(value.input, inputId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfixed[name] = {\n\t\t\t\t\t\t\tend: value.end,\n\t\t\t\t\t\t\tinputId,\n\t\t\t\t\t\t\tstart: value.start\n\t\t\t\t\t\t};\n\t\t\t\t\t} else fixed[name] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet fixed = holderOfRoot[0];\n\t\t\tif (emitInputs) fixed.inputs = [...inputs.keys()].map((input) => input.toJSON());\n\t\t\treturn fixed;\n\t\t}\n\t\ttoProxy() {\n\t\t\tif (!this.proxyCache) this.proxyCache = new Proxy(this, this.getProxyProcessor());\n\t\t\treturn this.proxyCache;\n\t\t}\n\t\ttoString(stringifier = stringify) {\n\t\t\tif (stringifier.stringify) stringifier = stringifier.stringify;\n\t\t\tlet result = \"\";\n\t\t\tstringifier(this, (i) => {\n\t\t\t\tresult += i;\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\twarn(result, text, opts = {}) {\n\t\t\tlet data = { node: this };\n\t\t\tfor (let i in opts) data[i] = opts[i];\n\t\t\treturn result.warn(text, data);\n\t\t}\n\t};\n\tmodule.exports = Node;\n\tNode.default = Node;\n}));\n// ../../node_modules/postcss/lib/comment.js\nvar require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Node = require_node();\n\tvar Comment = class extends Node {\n\t\tconstructor(defaults) {\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"comment\";\n\t\t}\n\t};\n\tmodule.exports = Comment;\n\tComment.default = Comment;\n}));\n// ../../node_modules/postcss/lib/declaration.js\nvar require_declaration = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Node = require_node();\n\tvar Declaration = class extends Node {\n\t\tget variable() {\n\t\t\treturn this.prop.startsWith(\"--\") || this.prop[0] === \"$\";\n\t\t}\n\t\tconstructor(defaults) {\n\t\t\tif (defaults && typeof defaults.value !== \"undefined\" && typeof defaults.value !== \"string\") defaults = {\n\t\t\t\t...defaults,\n\t\t\t\tvalue: String(defaults.value)\n\t\t\t};\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"decl\";\n\t\t}\n\t};\n\tmodule.exports = Declaration;\n\tDeclaration.default = Declaration;\n}));\n// ../../node_modules/postcss/lib/container.js\nvar require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Comment = require_comment();\n\tvar Declaration = require_declaration();\n\tvar Node = require_node();\n\tvar { isClean, my } = require_symbols();\n\tvar AtRule;\n\tvar parse;\n\tvar Root;\n\tvar Rule;\n\tfunction cleanSource(nodes) {\n\t\tlet stack = nodes.slice();\n\t\twhile (stack.length > 0) {\n\t\t\tlet node = stack.pop();\n\t\t\tdelete node.source;\n\t\t\tif (node.nodes) {\n\t\t\t\tnode.nodes = node.nodes.slice();\n\t\t\t\tfor (let i of node.nodes) stack.push(i);\n\t\t\t}\n\t\t}\n\t\treturn nodes.slice();\n\t}\n\tfunction markTreeDirty(node) {\n\t\tlet stack = [node];\n\t\twhile (stack.length > 0) {\n\t\t\tlet next = stack.pop();\n\t\t\tnext[isClean] = false;\n\t\t\tif (next.proxyOf.nodes) for (let i of next.proxyOf.nodes) stack.push(i);\n\t\t}\n\t}\n\tvar Container = class Container extends Node {\n\t\tget first() {\n\t\t\tif (!this.proxyOf.nodes) return void 0;\n\t\t\treturn this.proxyOf.nodes[0];\n\t\t}\n\t\tget last() {\n\t\t\tif (!this.proxyOf.nodes) return void 0;\n\t\t\treturn this.proxyOf.nodes[this.proxyOf.nodes.length - 1];\n\t\t}\n\t\tappend(...children) {\n\t\t\tfor (let child of children) {\n\t\t\t\tlet nodes = this.normalize(child, this.last);\n\t\t\t\tfor (let node of nodes) this.proxyOf.nodes.push(node);\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tcleanRaws(keepBetween) {\n\t\t\tlet stack = [this];\n\t\t\twhile (stack.length > 0) {\n\t\t\t\tlet node = stack.pop();\n\t\t\t\tif (node !== this && node.cleanRaws !== Container.prototype.cleanRaws) {\n\t\t\t\t\tnode.cleanRaws(keepBetween);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tNode.prototype.cleanRaws.call(node, keepBetween);\n\t\t\t\tif (node.nodes) for (let child of node.nodes) stack.push(child);\n\t\t\t}\n\t\t}\n\t\teach(callback) {\n\t\t\tif (!this.proxyOf.nodes) return void 0;\n\t\t\tlet iterator = this.getIterator();\n\t\t\tlet index, result;\n\t\t\twhile (this.indexes[iterator] < this.proxyOf.nodes.length) {\n\t\t\t\tindex = this.indexes[iterator];\n\t\t\t\tresult = callback(this.proxyOf.nodes[index], index);\n\t\t\t\tif (result === false) break;\n\t\t\t\tthis.indexes[iterator] += 1;\n\t\t\t}\n\t\t\tdelete this.indexes[iterator];\n\t\t\treturn result;\n\t\t}\n\t\tevery(condition) {\n\t\t\treturn this.nodes.every(condition);\n\t\t}\n\t\tgetIterator() {\n\t\t\tif (!this.lastEach) this.lastEach = 0;\n\t\t\tif (!this.indexes) this.indexes = {};\n\t\t\tthis.lastEach += 1;\n\t\t\tlet iterator = this.lastEach;\n\t\t\tthis.indexes[iterator] = 0;\n\t\t\treturn iterator;\n\t\t}\n\t\tgetProxyProcessor() {\n\t\t\treturn {\n\t\t\t\tget(node, prop) {\n\t\t\t\t\tif (prop === \"proxyOf\") return node;\n\t\t\t\t\telse if (!node[prop]) return node[prop];\n\t\t\t\t\telse if (prop === \"each\" || typeof prop === \"string\" && prop.startsWith(\"walk\")) return (...args) => {\n\t\t\t\t\t\treturn node[prop](...args.map((i) => {\n\t\t\t\t\t\t\tif (typeof i === \"function\") return (child, index) => i(child.toProxy(), index);\n\t\t\t\t\t\t\telse return i;\n\t\t\t\t\t\t}));\n\t\t\t\t\t};\n\t\t\t\t\telse if (prop === \"every\" || prop === \"some\") return (cb) => {\n\t\t\t\t\t\treturn node[prop]((child, ...other) => cb(child.toProxy(), ...other));\n\t\t\t\t\t};\n\t\t\t\t\telse if (prop === \"root\") return () => node.root().toProxy();\n\t\t\t\t\telse if (prop === \"nodes\") return node.nodes.map((i) => i.toProxy());\n\t\t\t\t\telse if (prop === \"first\" || prop === \"last\") return node[prop].toProxy();\n\t\t\t\t\telse return node[prop];\n\t\t\t\t},\n\t\t\t\tset(node, prop, value) {\n\t\t\t\t\tif (node[prop] === value) return true;\n\t\t\t\t\tnode[prop] = value;\n\t\t\t\t\tif (prop === \"name\" || prop === \"params\" || prop === \"selector\") node.markDirty();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tindex(child) {\n\t\t\tif (typeof child === \"number\") return child;\n\t\t\tif (child.proxyOf) child = child.proxyOf;\n\t\t\treturn this.proxyOf.nodes.indexOf(child);\n\t\t}\n\t\tinsertAfter(exist, add) {\n\t\t\tlet existIndex = this.index(exist);\n\t\t\tlet nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();\n\t\t\texistIndex = this.index(exist);\n\t\t\tfor (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node);\n\t\t\tlet index;\n\t\t\tfor (let id in this.indexes) {\n\t\t\t\tindex = this.indexes[id];\n\t\t\t\tif (existIndex < index) this.indexes[id] = index + nodes.length;\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tinsertBefore(exist, add) {\n\t\t\tlet existIndex = this.index(exist);\n\t\t\tlet type = existIndex === 0 ? \"prepend\" : false;\n\t\t\tlet nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();\n\t\t\texistIndex = this.index(exist);\n\t\t\tfor (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node);\n\t\t\tlet index;\n\t\t\tfor (let id in this.indexes) {\n\t\t\t\tindex = this.indexes[id];\n\t\t\t\tif (existIndex <= index) this.indexes[id] = index + nodes.length;\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tnormalize(nodes, sample) {\n\t\t\tif (typeof nodes === \"string\") nodes = cleanSource(parse(nodes).nodes);\n\t\t\telse if (typeof nodes === \"undefined\") nodes = [];\n\t\t\telse if (Array.isArray(nodes)) {\n\t\t\t\tnodes = nodes.slice(0);\n\t\t\t\tfor (let i of nodes) if (i.parent) i.parent.removeChild(i, \"ignore\");\n\t\t\t} else if (nodes.type === \"root\" && this.type !== \"document\") {\n\t\t\t\tnodes = nodes.nodes.slice(0);\n\t\t\t\tfor (let i of nodes) if (i.parent) i.parent.removeChild(i, \"ignore\");\n\t\t\t} else if (nodes.type) nodes = [nodes];\n\t\t\telse if (nodes.prop) {\n\t\t\t\tif (typeof nodes.value === \"undefined\") throw new Error(\"Value field is missed in node creation\");\n\t\t\t\telse if (typeof nodes.value !== \"string\") nodes.value = String(nodes.value);\n\t\t\t\tnodes = [new Declaration(nodes)];\n\t\t\t} else if (nodes.selector || nodes.selectors) nodes = [new Rule(nodes)];\n\t\t\telse if (nodes.name) nodes = [new AtRule(nodes)];\n\t\t\telse if (nodes.text) nodes = [new Comment(nodes)];\n\t\t\telse throw new Error(\"Unknown node type in node creation\");\n\t\t\treturn nodes.map((i) => {\n\t\t\t\t/* c8 ignore next */\n\t\t\t\tif (!i[my]) Container.rebuild(i);\n\t\t\t\ti = i.proxyOf;\n\t\t\t\tif (i.parent) i.parent.removeChild(i);\n\t\t\t\tif (i[isClean]) markTreeDirty(i);\n\t\t\t\tif (!i.raws) i.raws = {};\n\t\t\t\tif (typeof i.raws.before === \"undefined\") {\n\t\t\t\t\tif (sample && typeof sample.raws.before !== \"undefined\") i.raws.before = sample.raws.before.replace(/\\S/g, \"\");\n\t\t\t\t}\n\t\t\t\ti.parent = this.proxyOf;\n\t\t\t\treturn i;\n\t\t\t});\n\t\t}\n\t\tprepend(...children) {\n\t\t\tchildren = children.reverse();\n\t\t\tfor (let child of children) {\n\t\t\t\tlet nodes = this.normalize(child, this.first, \"prepend\").reverse();\n\t\t\t\tfor (let node of nodes) this.proxyOf.nodes.unshift(node);\n\t\t\t\tfor (let id in this.indexes) this.indexes[id] = this.indexes[id] + nodes.length;\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tpush(child) {\n\t\t\tchild.parent = this;\n\t\t\tthis.proxyOf.nodes.push(child);\n\t\t\treturn this;\n\t\t}\n\t\tremoveAll() {\n\t\t\tfor (let node of this.proxyOf.nodes) node.parent = void 0;\n\t\t\tthis.proxyOf.nodes = [];\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tremoveChild(child) {\n\t\t\tchild = this.index(child);\n\t\t\tthis.proxyOf.nodes[child].parent = void 0;\n\t\t\tthis.proxyOf.nodes.splice(child, 1);\n\t\t\tlet index;\n\t\t\tfor (let id in this.indexes) {\n\t\t\t\tindex = this.indexes[id];\n\t\t\t\tif (index >= child) this.indexes[id] = index - 1;\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\treplaceValues(pattern, opts, callback) {\n\t\t\tif (!callback) {\n\t\t\t\tcallback = opts;\n\t\t\t\topts = {};\n\t\t\t}\n\t\t\tthis.walkDecls((decl) => {\n\t\t\t\tif (opts.props && !opts.props.includes(decl.prop)) return;\n\t\t\t\tif (opts.fast && !decl.value.includes(opts.fast)) return;\n\t\t\t\tdecl.value = decl.value.replace(pattern, callback);\n\t\t\t});\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tsome(condition) {\n\t\t\treturn this.nodes.some(condition);\n\t\t}\n\t\twalk(callback) {\n\t\t\tif (!this.proxyOf.nodes) return void 0;\n\t\t\tlet stack = [{\n\t\t\t\titerator: this.getIterator(),\n\t\t\t\tnode: this.proxyOf\n\t\t\t}];\n\t\t\twhile (stack.length > 0) {\n\t\t\t\tlet { iterator, node } = stack[stack.length - 1];\n\t\t\t\tlet index = node.indexes[iterator];\n\t\t\t\tif (index >= node.proxyOf.nodes.length) {\n\t\t\t\t\tdelete node.indexes[iterator];\n\t\t\t\t\tstack.pop();\n\t\t\t\t\tlet parent = stack[stack.length - 1];\n\t\t\t\t\tif (parent) parent.node.indexes[parent.iterator] += 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlet child = node.proxyOf.nodes[index];\n\t\t\t\tlet result;\n\t\t\t\ttry {\n\t\t\t\t\tresult = callback(child, index);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow child.addToError(e);\n\t\t\t\t}\n\t\t\t\tif (result === false) {\n\t\t\t\t\tfor (let opened of stack) delete opened.node.indexes[opened.iterator];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (child.walk && child.proxyOf.nodes) stack.push({\n\t\t\t\t\titerator: child.getIterator(),\n\t\t\t\t\tnode: child\n\t\t\t\t});\n\t\t\t\telse node.indexes[iterator] += 1;\n\t\t\t}\n\t\t}\n\t\twalkAtRules(name, callback) {\n\t\t\tif (!callback) {\n\t\t\t\tcallback = name;\n\t\t\t\treturn this.walk((child, i) => {\n\t\t\t\t\tif (child.type === \"atrule\") return callback(child, i);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (name instanceof RegExp) return this.walk((child, i) => {\n\t\t\t\tif (child.type === \"atrule\" && name.test(child.name)) return callback(child, i);\n\t\t\t});\n\t\t\treturn this.walk((child, i) => {\n\t\t\t\tif (child.type === \"atrule\" && child.name === name) return callback(child, i);\n\t\t\t});\n\t\t}\n\t\twalkComments(callback) {\n\t\t\treturn this.walk((child, i) => {\n\t\t\t\tif (child.type === \"comment\") return callback(child, i);\n\t\t\t});\n\t\t}\n\t\twalkDecls(prop, callback) {\n\t\t\tif (!callback) {\n\t\t\t\tcallback = prop;\n\t\t\t\treturn this.walk((child, i) => {\n\t\t\t\t\tif (child.type === \"decl\") return callback(child, i);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (prop instanceof RegExp) return this.walk((child, i) => {\n\t\t\t\tif (child.type === \"decl\" && prop.test(child.prop)) return callback(child, i);\n\t\t\t});\n\t\t\treturn this.walk((child, i) => {\n\t\t\t\tif (child.type === \"decl\" && child.prop === prop) return callback(child, i);\n\t\t\t});\n\t\t}\n\t\twalkRules(selector, callback) {\n\t\t\tif (!callback) {\n\t\t\t\tcallback = selector;\n\t\t\t\treturn this.walk((child, i) => {\n\t\t\t\t\tif (child.type === \"rule\") return callback(child, i);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (selector instanceof RegExp) return this.walk((child, i) => {\n\t\t\t\tif (child.type === \"rule\" && selector.test(child.selector)) return callback(child, i);\n\t\t\t});\n\t\t\treturn this.walk((child, i) => {\n\t\t\t\tif (child.type === \"rule\" && child.selector === selector) return callback(child, i);\n\t\t\t});\n\t\t}\n\t};\n\tContainer.registerParse = (dependant) => {\n\t\tparse = dependant;\n\t};\n\tContainer.registerRule = (dependant) => {\n\t\tRule = dependant;\n\t};\n\tContainer.registerAtRule = (dependant) => {\n\t\tAtRule = dependant;\n\t};\n\tContainer.registerRoot = (dependant) => {\n\t\tRoot = dependant;\n\t};\n\tmodule.exports = Container;\n\tContainer.default = Container;\n\t/* c8 ignore start */\n\tContainer.rebuild = (node) => {\n\t\tlet stack = [node];\n\t\twhile (stack.length > 0) {\n\t\t\tlet next = stack.pop();\n\t\t\tif (next.type === \"atrule\") Object.setPrototypeOf(next, AtRule.prototype);\n\t\t\telse if (next.type === \"rule\") Object.setPrototypeOf(next, Rule.prototype);\n\t\t\telse if (next.type === \"decl\") Object.setPrototypeOf(next, Declaration.prototype);\n\t\t\telse if (next.type === \"comment\") Object.setPrototypeOf(next, Comment.prototype);\n\t\t\telse if (next.type === \"root\") Object.setPrototypeOf(next, Root.prototype);\n\t\t\tnext[my] = true;\n\t\t\tif (next.nodes) for (let child of next.nodes) stack.push(child);\n\t\t}\n\t};\n}));\n/* c8 ignore stop */\n// ../../node_modules/postcss/lib/at-rule.js\nvar require_at_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar AtRule = class extends Container {\n\t\tconstructor(defaults) {\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"atrule\";\n\t\t}\n\t\tappend(...children) {\n\t\t\tif (!this.proxyOf.nodes) this.nodes = [];\n\t\t\treturn super.append(...children);\n\t\t}\n\t\tprepend(...children) {\n\t\t\tif (!this.proxyOf.nodes) this.nodes = [];\n\t\t\treturn super.prepend(...children);\n\t\t}\n\t};\n\tmodule.exports = AtRule;\n\tAtRule.default = AtRule;\n\tContainer.registerAtRule(AtRule);\n}));\n// ../../node_modules/postcss/lib/document.js\nvar require_document = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar LazyResult;\n\tvar Processor;\n\tvar Document = class extends Container {\n\t\tconstructor(defaults) {\n\t\t\tsuper({\n\t\t\t\ttype: \"document\",\n\t\t\t\t...defaults\n\t\t\t});\n\t\t\tif (!this.nodes) this.nodes = [];\n\t\t}\n\t\ttoResult(opts = {}) {\n\t\t\treturn new LazyResult(new Processor(), this, opts).stringify();\n\t\t}\n\t};\n\tDocument.registerLazyResult = (dependant) => {\n\t\tLazyResult = dependant;\n\t};\n\tDocument.registerProcessor = (dependant) => {\n\t\tProcessor = dependant;\n\t};\n\tmodule.exports = Document;\n\tDocument.default = Document;\n}));\n// ../../node_modules/postcss/node_modules/nanoid/non-secure/index.cjs\nvar require_non_secure = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\n\tvar customAlphabet = (alphabet, defaultSize = 21) => {\n\t\treturn (size = defaultSize) => {\n\t\t\tlet id = \"\";\n\t\t\tlet i = size | 0;\n\t\t\twhile (i-- > 0) id += alphabet[Math.random() * alphabet.length | 0];\n\t\t\treturn id;\n\t\t};\n\t};\n\tvar nanoid = (size = 21) => {\n\t\tlet id = \"\";\n\t\tlet i = size | 0;\n\t\twhile (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];\n\t\treturn id;\n\t};\n\tmodule.exports = {\n\t\tnanoid,\n\t\tcustomAlphabet\n\t};\n}));\n// ../../node_modules/postcss/lib/previous-map.js\nvar require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar { existsSync, readFileSync, realpathSync } = require___vite_browser_external();\n\tvar { dirname, isAbsolute, join, relative, sep } = require___vite_browser_external();\n\tvar { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();\n\tfunction realPath(path) {\n\t\ttry {\n\t\t\treturn realpathSync(path);\n\t\t} catch {\n\t\t\treturn path;\n\t\t}\n\t}\n\tfunction fromBase64(str) {\n\t\tif (Buffer) return Buffer.from(str, \"base64\").toString();\n\t\telse\n /* c8 ignore next 2 */\n\t\treturn window.atob(str);\n\t}\n\tvar PreviousMap = class {\n\t\tconstructor(css, opts) {\n\t\t\tif (opts.map === false) return;\n\t\t\tif (opts.unsafeMap) this.unsafeMap = true;\n\t\t\tthis.loadAnnotation(css);\n\t\t\tthis.inline = this.startWith(this.annotation, \"data:\");\n\t\t\tlet prev = opts.map ? opts.map.prev : void 0;\n\t\t\tlet text = this.loadMap(opts.from, prev);\n\t\t\tif (!this.mapFile && opts.from) this.mapFile = opts.from;\n\t\t\tif (this.mapFile) this.root = dirname(this.mapFile);\n\t\t\tif (text) this.text = text;\n\t\t}\n\t\tconsumer() {\n\t\t\tif (!this.consumerCache) this.consumerCache = new SourceMapConsumer(this.json || this.text);\n\t\t\treturn this.consumerCache;\n\t\t}\n\t\tdecodeInline(text) {\n\t\t\tlet baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/;\n\t\t\tlet baseUri = /^data:application\\/json;base64,/;\n\t\t\tlet uriMatch = text.match(/^data:application\\/json;charset=utf-?8,/) || text.match(/^data:application\\/json,/);\n\t\t\tif (uriMatch) return decodeURIComponent(text.substr(uriMatch[0].length));\n\t\t\tlet baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);\n\t\t\tif (baseUriMatch) return fromBase64(text.substr(baseUriMatch[0].length));\n\t\t\tlet encoding = text.slice(22);\n\t\t\tencoding = encoding.slice(0, encoding.indexOf(\",\"));\n\t\t\tthrow new Error(\"Unsupported source map encoding \" + encoding);\n\t\t}\n\t\tgetAnnotationURL(sourceMapString) {\n\t\t\treturn sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, \"\").trim();\n\t\t}\n\t\tisMap(map) {\n\t\t\tif (typeof map !== \"object\") return false;\n\t\t\treturn typeof map.mappings === \"string\" || typeof map._mappings === \"string\" || Array.isArray(map.sections);\n\t\t}\n\t\tloadAnnotation(css) {\n\t\t\tlet comments = css.match(/\\/\\*\\s*# sourceMappingURL=/g);\n\t\t\tif (!comments) return;\n\t\t\tlet start = css.lastIndexOf(comments.pop());\n\t\t\tlet end = css.indexOf(\"*/\", start);\n\t\t\tif (start > -1 && end > -1) this.annotation = this.getAnnotationURL(css.substring(start, end));\n\t\t}\n\t\tloadFile(path, cssFile, trusted) {\n\t\t\tif (!trusted && !this.unsafeMap) {\n\t\t\t\tif (!/\\.map$/i.test(path)) return void 0;\n\t\t\t\tif (!cssFile) return void 0;\n\t\t\t\tlet rel = relative(realPath(dirname(cssFile)), realPath(path));\n\t\t\t\tif (rel === \"..\" || rel.startsWith(\"..\" + sep) || isAbsolute(rel)) return;\n\t\t\t}\n\t\t\tthis.root = dirname(path);\n\t\t\tif (existsSync(path)) {\n\t\t\t\tthis.mapFile = path;\n\t\t\t\treturn readFileSync(path, \"utf-8\").toString().trim();\n\t\t\t}\n\t\t}\n\t\tloadMap(file, prev) {\n\t\t\tif (prev === false) return false;\n\t\t\tif (prev) {\n\t\t\t\tif (typeof prev === \"string\") return prev;\n\t\t\t\telse if (typeof prev === \"function\") {\n\t\t\t\t\tlet prevPath = prev(file);\n\t\t\t\t\tif (prevPath) {\n\t\t\t\t\t\tlet map = this.loadFile(prevPath, file, true);\n\t\t\t\t\t\tif (!map) throw new Error(\"Unable to load previous source map: \" + prevPath.toString());\n\t\t\t\t\t\treturn map;\n\t\t\t\t\t}\n\t\t\t\t} else if (prev instanceof SourceMapConsumer) return SourceMapGenerator.fromSourceMap(prev).toString();\n\t\t\t\telse if (prev instanceof SourceMapGenerator) return prev.toString();\n\t\t\t\telse if (this.isMap(prev)) return JSON.stringify(prev);\n\t\t\t\telse throw new Error(\"Unsupported previous source map format: \" + prev.toString());\n\t\t\t} else if (this.inline) return this.decodeInline(this.annotation);\n\t\t\telse if (this.annotation) {\n\t\t\t\tlet map = this.annotation;\n\t\t\t\tif (file) map = join(dirname(file), map);\n\t\t\t\tlet unknown = this.loadFile(map, file, false);\n\t\t\t\tif (unknown) try {\n\t\t\t\t\t/* c8 ignore next 4 */\n\t\t\t\t\tthis.json = JSON.parse(unknown.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n\t\t\t\t} catch {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn unknown;\n\t\t\t}\n\t\t}\n\t\tstartWith(string, start) {\n\t\t\tif (!string) return false;\n\t\t\treturn string.substr(0, start.length) === start;\n\t\t}\n\t\twithContent() {\n\t\t\treturn !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);\n\t\t}\n\t};\n\tmodule.exports = PreviousMap;\n\tPreviousMap.default = PreviousMap;\n}));\n// ../../node_modules/postcss/lib/input.js\nvar require_input = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar { nanoid } = require_non_secure();\n\tvar { isAbsolute, resolve } = require___vite_browser_external();\n\tvar { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();\n\tvar { fileURLToPath, pathToFileURL } = require___vite_browser_external();\n\tvar CssSyntaxError = require_css_syntax_error();\n\tvar PreviousMap = require_previous_map();\n\tvar terminalHighlight = require___vite_browser_external();\n\tvar lineToIndexCache = Symbol(\"lineToIndexCache\");\n\tvar sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);\n\tvar pathAvailable = Boolean(resolve && isAbsolute);\n\tfunction getLineToIndex(input) {\n\t\tif (input[lineToIndexCache]) return input[lineToIndexCache];\n\t\tlet lines = input.css.split(\"\\n\");\n\t\tlet lineToIndex = new Array(lines.length);\n\t\tlet prevIndex = 0;\n\t\tfor (let i = 0, l = lines.length; i < l; i++) {\n\t\t\tlineToIndex[i] = prevIndex;\n\t\t\tprevIndex += lines[i].length + 1;\n\t\t}\n\t\tinput[lineToIndexCache] = lineToIndex;\n\t\treturn lineToIndex;\n\t}\n\tvar Input = class {\n\t\tget from() {\n\t\t\treturn this.file || this.id;\n\t\t}\n\t\tconstructor(css, opts = {}) {\n\t\t\tif (css === null || typeof css === \"undefined\" || typeof css === \"object\" && !css.toString) throw new Error(`PostCSS received ${css} instead of CSS string`);\n\t\t\tthis.css = css.toString();\n\t\t\tif (this.css[0] === \"﻿\" || this.css[0] === \"￾\") {\n\t\t\t\tthis.hasBOM = true;\n\t\t\t\tthis.css = this.css.slice(1);\n\t\t\t} else this.hasBOM = false;\n\t\t\tthis.document = this.css;\n\t\t\tif (opts.document) this.document = opts.document.toString();\n\t\t\tif (opts.from) {\n\t\t\t\tif (!pathAvailable || /^\\w+:\\/\\//.test(opts.from) || isAbsolute(opts.from)) this.file = opts.from;\n\t\t\t\telse this.file = resolve(opts.from);\n\t\t\t}\n\t\t\tif (pathAvailable && sourceMapAvailable) {\n\t\t\t\tlet map = new PreviousMap(this.css, opts);\n\t\t\t\tif (map.text) {\n\t\t\t\t\tthis.map = map;\n\t\t\t\t\tlet file = map.consumer().file;\n\t\t\t\t\tif (!this.file && file) this.file = this.mapResolve(file);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.file) this.id = \"<input css \" + nanoid(6) + \">\";\n\t\t\tif (this.map) this.map.file = this.from;\n\t\t}\n\t\terror(message, line, column, opts = {}) {\n\t\t\tlet endColumn, endLine, endOffset, offset, result;\n\t\t\tif (line && typeof line === \"object\") {\n\t\t\t\tlet start = line;\n\t\t\t\tlet end = column;\n\t\t\t\tif (typeof start.offset === \"number\") {\n\t\t\t\t\toffset = start.offset;\n\t\t\t\t\tlet pos = this.fromOffset(offset);\n\t\t\t\t\tline = pos.line;\n\t\t\t\t\tcolumn = pos.col;\n\t\t\t\t} else {\n\t\t\t\t\tline = start.line;\n\t\t\t\t\tcolumn = start.column;\n\t\t\t\t\toffset = this.fromLineAndColumn(line, column);\n\t\t\t\t}\n\t\t\t\tif (typeof end.offset === \"number\") {\n\t\t\t\t\tendOffset = end.offset;\n\t\t\t\t\tlet pos = this.fromOffset(endOffset);\n\t\t\t\t\tendLine = pos.line;\n\t\t\t\t\tendColumn = pos.col;\n\t\t\t\t} else {\n\t\t\t\t\tendLine = end.line;\n\t\t\t\t\tendColumn = end.column;\n\t\t\t\t\tendOffset = this.fromLineAndColumn(end.line, end.column);\n\t\t\t\t}\n\t\t\t} else if (!column) {\n\t\t\t\toffset = line;\n\t\t\t\tlet pos = this.fromOffset(offset);\n\t\t\t\tline = pos.line;\n\t\t\t\tcolumn = pos.col;\n\t\t\t} else offset = this.fromLineAndColumn(line, column);\n\t\t\tlet origin = this.origin(line, column, endLine, endColumn);\n\t\t\tif (origin) result = new CssSyntaxError(message, origin.endLine === void 0 ? origin.line : {\n\t\t\t\tcolumn: origin.column,\n\t\t\t\tline: origin.line\n\t\t\t}, origin.endLine === void 0 ? origin.column : {\n\t\t\t\tcolumn: origin.endColumn,\n\t\t\t\tline: origin.endLine\n\t\t\t}, origin.source, origin.file, opts.plugin);\n\t\t\telse result = new CssSyntaxError(message, endLine === void 0 ? line : {\n\t\t\t\tcolumn,\n\t\t\t\tline\n\t\t\t}, endLine === void 0 ? column : {\n\t\t\t\tcolumn: endColumn,\n\t\t\t\tline: endLine\n\t\t\t}, this.css, this.file, opts.plugin);\n\t\t\tresult.input = {\n\t\t\t\tcolumn,\n\t\t\t\tendColumn,\n\t\t\t\tendLine,\n\t\t\t\tendOffset,\n\t\t\t\tline,\n\t\t\t\toffset,\n\t\t\t\tsource: this.css\n\t\t\t};\n\t\t\tif (this.file) {\n\t\t\t\tif (pathToFileURL) result.input.url = pathToFileURL(this.file).toString();\n\t\t\t\tresult.input.file = this.file;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\tfromLineAndColumn(line, column) {\n\t\t\treturn getLineToIndex(this)[line - 1] + column - 1;\n\t\t}\n\t\tfromOffset(offset) {\n\t\t\tlet lineToIndex = getLineToIndex(this);\n\t\t\tlet lastLine = lineToIndex[lineToIndex.length - 1];\n\t\t\tlet min = 0;\n\t\t\tif (offset >= lastLine) min = lineToIndex.length - 1;\n\t\t\telse {\n\t\t\t\tlet max = lineToIndex.length - 2;\n\t\t\t\tlet mid;\n\t\t\t\twhile (min < max) {\n\t\t\t\t\tmid = min + (max - min >> 1);\n\t\t\t\t\tif (offset < lineToIndex[mid]) max = mid - 1;\n\t\t\t\t\telse if (offset >= lineToIndex[mid + 1]) min = mid + 1;\n\t\t\t\t\telse {\n\t\t\t\t\t\tmin = mid;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcol: offset - lineToIndex[min] + 1,\n\t\t\t\tline: min + 1\n\t\t\t};\n\t\t}\n\t\tmapResolve(file) {\n\t\t\tif (/^\\w+:\\/\\//.test(file)) return file;\n\t\t\treturn resolve(this.map.consumer().sourceRoot || this.map.root || \".\", file);\n\t\t}\n\t\torigin(line, column, endLine, endColumn) {\n\t\t\tif (!this.map) return false;\n\t\t\tlet consumer = this.map.consumer();\n\t\t\tlet from = consumer.originalPositionFor({\n\t\t\t\tcolumn: column - 1,\n\t\t\t\tline\n\t\t\t});\n\t\t\tif (!from.source) return false;\n\t\t\tlet to;\n\t\t\tif (typeof endLine === \"number\") {\n\t\t\t\tlet toPosition = consumer.originalPositionFor({\n\t\t\t\t\tcolumn: endColumn - 1,\n\t\t\t\t\tline: endLine\n\t\t\t\t});\n\t\t\t\tif (toPosition.source) to = toPosition;\n\t\t\t}\n\t\t\tlet fromUrl;\n\t\t\tif (isAbsolute(from.source)) fromUrl = pathToFileURL(from.source);\n\t\t\telse fromUrl = new URL(from.source, pathToFileURL(this.map.mapFile || resolve(\".\") + \"/\"));\n\t\t\tlet result = {\n\t\t\t\tcolumn: from.column + 1,\n\t\t\t\tendColumn: to && to.column + 1,\n\t\t\t\tendLine: to && to.line,\n\t\t\t\tline: from.line,\n\t\t\t\turl: fromUrl.toString()\n\t\t\t};\n\t\t\tif (fromUrl.protocol === \"file:\") {\n\t\t\t\tif (fileURLToPath) result.file = fileURLToPath(fromUrl);\n\t\t\t\telse\n /* c8 ignore next 2 */\n\t\t\t\tthrow new Error(`file: protocol is not available in this PostCSS build`);\n\t\t\t}\n\t\t\tlet source = consumer.sourceContentFor(from.source);\n\t\t\tif (source) result.source = source;\n\t\t\treturn result;\n\t\t}\n\t\ttoJSON() {\n\t\t\tlet json = {};\n\t\t\tfor (let name of [\n\t\t\t\t\"hasBOM\",\n\t\t\t\t\"css\",\n\t\t\t\t\"file\",\n\t\t\t\t\"id\"\n\t\t\t]) if (this[name] != null) json[name] = this[name];\n\t\t\tif (this.map) {\n\t\t\t\tjson.map = { ...this.map };\n\t\t\t\tif (json.map.consumerCache) json.map.consumerCache = void 0;\n\t\t\t}\n\t\t\treturn json;\n\t\t}\n\t};\n\tmodule.exports = Input;\n\tInput.default = Input;\n\tif (terminalHighlight && terminalHighlight.registerInput) terminalHighlight.registerInput(Input);\n}));\n// ../../node_modules/postcss/lib/root.js\nvar require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar LazyResult;\n\tvar Processor;\n\tvar Root = class extends Container {\n\t\tconstructor(defaults) {\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"root\";\n\t\t\tif (!this.nodes) this.nodes = [];\n\t\t}\n\t\tnormalize(child, sample, type) {\n\t\t\tlet keepBefore = /* @__PURE__ */ new Set();\n\t\t\tfor (let node of Array.isArray(child) ? child : [child]) if (node && typeof node === \"object\" && !node.parent && node.raws && typeof node.raws.before !== \"undefined\") keepBefore.add(node.raws);\n\t\t\tlet nodes = super.normalize(child);\n\t\t\tif (sample) {\n\t\t\t\tif (type === \"prepend\") {\n\t\t\t\t\tif (this.nodes.length > 1) sample.raws.before = this.nodes[1].raws.before;\n\t\t\t\t\telse delete sample.raws.before;\n\t\t\t\t} else if (this.first !== sample) {\n\t\t\t\t\tfor (let node of nodes) if (!keepBefore.has(node.raws)) node.raws.before = sample.raws.before;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nodes;\n\t\t}\n\t\tremoveChild(child, ignore) {\n\t\t\tlet index = this.index(child);\n\t\t\tif (!ignore && index === 0 && this.nodes.length > 1) this.nodes[1].raws.before = this.nodes[index].raws.before;\n\t\t\treturn super.removeChild(child);\n\t\t}\n\t\ttoResult(opts = {}) {\n\t\t\treturn new LazyResult(new Processor(), this, opts).stringify();\n\t\t}\n\t};\n\tRoot.registerLazyResult = (dependant) => {\n\t\tLazyResult = dependant;\n\t};\n\tRoot.registerProcessor = (dependant) => {\n\t\tProcessor = dependant;\n\t};\n\tmodule.exports = Root;\n\tRoot.default = Root;\n\tContainer.registerRoot(Root);\n}));\n// ../../node_modules/postcss/lib/list.js\nvar require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar list = {\n\t\tcomma(string) {\n\t\t\treturn list.split(string, [\",\"], true);\n\t\t},\n\t\tspace(string) {\n\t\t\treturn list.split(string, [\n\t\t\t\t\" \",\n\t\t\t\t\"\\n\",\n\t\t\t\t\"\t\"\n\t\t\t]);\n\t\t},\n\t\tsplit(string, separators, last) {\n\t\t\tif (typeof string !== \"string\") return [];\n\t\t\tlet array = [];\n\t\t\tlet current = \"\";\n\t\t\tlet split = false;\n\t\t\tlet func = 0;\n\t\t\tlet inQuote = false;\n\t\t\tlet prevQuote = \"\";\n\t\t\tlet escape = false;\n\t\t\tlet inComment = false;\n\t\t\tfor (let i = 0; i < string.length; i++) {\n\t\t\t\tlet letter = string[i];\n\t\t\t\tif (inComment) {\n\t\t\t\t\tcurrent += letter;\n\t\t\t\t\tif (letter === \"*\" && string[i + 1] === \"/\") {\n\t\t\t\t\t\tcurrent += \"/\";\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\tinComment = false;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (escape) escape = false;\n\t\t\t\telse if (letter === \"\\\\\") escape = true;\n\t\t\t\telse if (inQuote) {\n\t\t\t\t\tif (letter === prevQuote) inQuote = false;\n\t\t\t\t} else if (letter === \"\\\"\" || letter === \"'\") {\n\t\t\t\t\tinQuote = true;\n\t\t\t\t\tprevQuote = letter;\n\t\t\t\t} else if (letter === \"/\" && string[i + 1] === \"*\") {\n\t\t\t\t\tcurrent += \"/*\";\n\t\t\t\t\ti += 1;\n\t\t\t\t\tinComment = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (letter === \"(\") func += 1;\n\t\t\t\telse if (letter === \")\") {\n\t\t\t\t\tif (func > 0) func -= 1;\n\t\t\t\t} else if (func === 0) {\n\t\t\t\t\tif (separators.includes(letter)) split = true;\n\t\t\t\t}\n\t\t\t\tif (split) {\n\t\t\t\t\tlet value = current.trim();\n\t\t\t\t\tif (last || value !== \"\") array.push(value);\n\t\t\t\t\tcurrent = \"\";\n\t\t\t\t\tsplit = false;\n\t\t\t\t} else current += letter;\n\t\t\t}\n\t\t\tlet value = current.trim();\n\t\t\tif (last || value !== \"\") array.push(value);\n\t\t\treturn array;\n\t\t}\n\t};\n\tmodule.exports = list;\n\tlist.default = list;\n}));\n// ../../node_modules/postcss/lib/rule.js\nvar require_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar list = require_list();\n\tvar Rule = class extends Container {\n\t\tget selectors() {\n\t\t\treturn list.comma(this.selector);\n\t\t}\n\t\tset selectors(values) {\n\t\t\tlet match = this.selector ? this.selector.match(/,\\s*/) : null;\n\t\t\tlet sep = match ? match[0] : \",\" + this.raw(\"between\", \"beforeOpen\");\n\t\t\tthis.selector = values.join(sep);\n\t\t}\n\t\tconstructor(defaults) {\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"rule\";\n\t\t\tif (!this.nodes) this.nodes = [];\n\t\t}\n\t};\n\tmodule.exports = Rule;\n\tRule.default = Rule;\n\tContainer.registerRule(Rule);\n}));\n// ../../node_modules/postcss/lib/fromJSON.js\nvar require_fromJSON = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar AtRule = require_at_rule();\n\tvar Comment = require_comment();\n\tvar Declaration = require_declaration();\n\tvar Input = require_input();\n\tvar PreviousMap = require_previous_map();\n\tvar Root = require_root();\n\tvar Rule = require_rule();\n\tfunction hydrateInputs(json, inputs) {\n\t\tif (!json.inputs) return inputs;\n\t\treturn json.inputs.map((input) => {\n\t\t\tlet inputHydrated = {\n\t\t\t\t...input,\n\t\t\t\t__proto__: Input.prototype\n\t\t\t};\n\t\t\tif (inputHydrated.map) inputHydrated.map = {\n\t\t\t\t...inputHydrated.map,\n\t\t\t\t__proto__: PreviousMap.prototype\n\t\t\t};\n\t\t\treturn inputHydrated;\n\t\t});\n\t}\n\tfunction constructNode(json, inputs, children) {\n\t\tlet defaults = { ...json };\n\t\tdelete defaults.inputs;\n\t\tdelete defaults.nodes;\n\t\tif (defaults.source) {\n\t\t\tlet { inputId, ...source } = defaults.source;\n\t\t\tdefaults.source = source;\n\t\t\tif (inputId != null) defaults.source.input = inputs[inputId];\n\t\t}\n\t\tlet node;\n\t\tif (defaults.type === \"root\") node = new Root(defaults);\n\t\telse if (defaults.type === \"decl\") node = new Declaration(defaults);\n\t\telse if (defaults.type === \"rule\") node = new Rule(defaults);\n\t\telse if (defaults.type === \"comment\") node = new Comment(defaults);\n\t\telse if (defaults.type === \"atrule\") node = new AtRule(defaults);\n\t\telse throw new Error(\"Unknown node type: \" + json.type);\n\t\tif (children) {\n\t\t\tnode.nodes = children;\n\t\t\tfor (let child of children) child.parent = node;\n\t\t}\n\t\treturn node;\n\t}\n\tfunction fromJSON(json, inputs) {\n\t\tif (Array.isArray(json)) return json.map((n) => fromJSON(n));\n\t\tlet result;\n\t\tlet stack = [{\n\t\t\tchildIndex: 0,\n\t\t\tchildren: [],\n\t\t\tinputs: hydrateInputs(json, inputs),\n\t\t\tjson\n\t\t}];\n\t\twhile (stack.length > 0) {\n\t\t\tlet frame = stack[stack.length - 1];\n\t\t\tlet jsonNodes = frame.json.nodes;\n\t\t\tif (jsonNodes && frame.childIndex < jsonNodes.length) {\n\t\t\t\tlet childJson = jsonNodes[frame.childIndex];\n\t\t\t\tframe.childIndex += 1;\n\t\t\t\tstack.push({\n\t\t\t\t\tchildIndex: 0,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\tinputs: hydrateInputs(childJson, frame.inputs),\n\t\t\t\t\tjson: childJson\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstack.pop();\n\t\t\tlet node = constructNode(frame.json, frame.inputs, jsonNodes ? frame.children : void 0);\n\t\t\tif (stack.length > 0) stack[stack.length - 1].children.push(node);\n\t\t\telse result = node;\n\t\t}\n\t\treturn result;\n\t}\n\tmodule.exports = fromJSON;\n\tfromJSON.default = fromJSON;\n}));\n// ../../node_modules/postcss/lib/map-generator.js\nvar require_map_generator = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar { dirname, relative, resolve, sep } = require___vite_browser_external();\n\tvar { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();\n\tvar { pathToFileURL } = require___vite_browser_external();\n\tvar Input = require_input();\n\tvar sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);\n\tvar pathAvailable = Boolean(dirname && resolve && relative && sep);\n\tvar MapGenerator = class {\n\t\tconstructor(stringify, root, opts, cssString) {\n\t\t\tthis.stringify = stringify;\n\t\t\tthis.mapOpts = opts.map || {};\n\t\t\tthis.root = root;\n\t\t\tthis.opts = opts;\n\t\t\tthis.css = cssString;\n\t\t\tthis.originalCSS = cssString;\n\t\t\tthis.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;\n\t\t\tthis.memoizedFileURLs = /* @__PURE__ */ new Map();\n\t\t\tthis.memoizedPaths = /* @__PURE__ */ new Map();\n\t\t\tthis.memoizedURLs = /* @__PURE__ */ new Map();\n\t\t}\n\t\taddAnnotation() {\n\t\t\tlet content;\n\t\t\tif (this.isInline()) content = \"data:application/json;base64,\" + this.toBase64(this.map.toString());\n\t\t\telse if (typeof this.mapOpts.annotation === \"string\") content = this.mapOpts.annotation;\n\t\t\telse if (typeof this.mapOpts.annotation === \"function\") content = this.mapOpts.annotation(this.opts.to, this.root);\n\t\t\telse content = this.outputFile() + \".map\";\n\t\t\tlet eol = \"\\n\";\n\t\t\tif (this.css.includes(\"\\r\\n\")) eol = \"\\r\\n\";\n\t\t\tthis.css += eol + \"/*# sourceMappingURL=\" + content + \" */\";\n\t\t}\n\t\tapplyPrevMaps() {\n\t\t\tfor (let prev of this.previous()) {\n\t\t\t\tlet from = this.toUrl(this.path(prev.file));\n\t\t\t\tlet root = prev.root || dirname(prev.file);\n\t\t\t\tlet map;\n\t\t\t\tif (this.mapOpts.sourcesContent === false) {\n\t\t\t\t\tmap = new SourceMapConsumer(prev.text);\n\t\t\t\t\tif (map.sourcesContent) map.sourcesContent = null;\n\t\t\t\t} else map = prev.consumer();\n\t\t\t\tthis.map.applySourceMap(map, from, this.toUrl(this.path(root)));\n\t\t\t}\n\t\t}\n\t\tclearAnnotation() {\n\t\t\tif (this.mapOpts.annotation === false) return;\n\t\t\tif (this.root) {\n\t\t\t\tlet node;\n\t\t\t\tfor (let i = this.root.nodes.length - 1; i >= 0; i--) {\n\t\t\t\t\tnode = this.root.nodes[i];\n\t\t\t\t\tif (node.type !== \"comment\") continue;\n\t\t\t\t\tif (node.text.startsWith(\"# sourceMappingURL=\")) this.root.removeChild(i);\n\t\t\t\t}\n\t\t\t} else if (this.css) {\n\t\t\t\tlet annotation = \"/*# sourceMappingURL=\";\n\t\t\t\tlet css = \"\";\n\t\t\t\tlet cursor = 0;\n\t\t\t\tlet startIndex;\n\t\t\t\twhile ((startIndex = this.css.indexOf(annotation, cursor)) !== -1) {\n\t\t\t\t\tlet endIndex = this.css.indexOf(\"*/\", startIndex + 21);\n\t\t\t\t\tif (endIndex === -1) break;\n\t\t\t\t\twhile (startIndex > cursor && this.css[startIndex - 1] === \"\\n\") startIndex--;\n\t\t\t\t\tcss += this.css.slice(cursor, startIndex);\n\t\t\t\t\tcursor = endIndex + 2;\n\t\t\t\t}\n\t\t\t\tif (cursor > 0) this.css = css + this.css.slice(cursor);\n\t\t\t}\n\t\t}\n\t\tgenerate() {\n\t\t\tthis.clearAnnotation();\n\t\t\tif (pathAvailable && sourceMapAvailable && this.isMap()) return this.generateMap();\n\t\t\telse {\n\t\t\t\tlet result = \"\";\n\t\t\t\tthis.stringify(this.root, (i) => {\n\t\t\t\t\tresult += i;\n\t\t\t\t});\n\t\t\t\treturn [result];\n\t\t\t}\n\t\t}\n\t\tgenerateMap() {\n\t\t\tif (this.root) this.generateString();\n\t\t\telse if (this.previous().length === 1) {\n\t\t\t\tlet prev = this.previous()[0].consumer();\n\t\t\t\tprev.file = this.outputFile();\n\t\t\t\tthis.map = SourceMapGenerator.fromSourceMap(prev, { ignoreInvalidMapping: true });\n\t\t\t} else {\n\t\t\t\tthis.map = new SourceMapGenerator({\n\t\t\t\t\tfile: this.outputFile(),\n\t\t\t\t\tignoreInvalidMapping: true\n\t\t\t\t});\n\t\t\t\tthis.map.addMapping({\n\t\t\t\t\tgenerated: {\n\t\t\t\t\t\tcolumn: 0,\n\t\t\t\t\t\tline: 1\n\t\t\t\t\t},\n\t\t\t\t\toriginal: {\n\t\t\t\t\t\tcolumn: 0,\n\t\t\t\t\t\tline: 1\n\t\t\t\t\t},\n\t\t\t\t\tsource: this.opts.from ? this.toUrl(this.path(this.opts.from)) : \"<no source>\"\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (this.isSourcesContent()) this.setSourcesContent();\n\t\t\tif (this.root && this.previous().length > 0) this.applyPrevMaps();\n\t\t\tif (this.isAnnotation()) this.addAnnotation();\n\t\t\tif (this.isInline()) return [this.css];\n\t\t\telse return [this.css, this.map];\n\t\t}\n\t\tgenerateString() {\n\t\t\tthis.css = \"\";\n\t\t\tthis.map = new SourceMapGenerator({\n\t\t\t\tfile: this.outputFile(),\n\t\t\t\tignoreInvalidMapping: true\n\t\t\t});\n\t\t\tlet line = 1;\n\t\t\tlet column = 1;\n\t\t\tlet noSource = \"<no source>\";\n\t\t\tlet mapping = {\n\t\t\t\tgenerated: {\n\t\t\t\t\tcolumn: 0,\n\t\t\t\t\tline: 0\n\t\t\t\t},\n\t\t\t\toriginal: {\n\t\t\t\t\tcolumn: 0,\n\t\t\t\t\tline: 0\n\t\t\t\t},\n\t\t\t\tsource: \"\"\n\t\t\t};\n\t\t\tlet last, lines;\n\t\t\tthis.stringify(this.root, (str, node, type) => {\n\t\t\t\tthis.css += str;\n\t\t\t\tif (node && type !== \"end\") {\n\t\t\t\t\tmapping.generated.line = line;\n\t\t\t\t\tmapping.generated.column = column - 1;\n\t\t\t\t\tif (node.source && node.source.start) {\n\t\t\t\t\t\tmapping.source = this.sourcePath(node);\n\t\t\t\t\t\tmapping.original.line = node.source.start.line;\n\t\t\t\t\t\tmapping.original.column = node.source.start.column - 1;\n\t\t\t\t\t\tthis.map.addMapping(mapping);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmapping.source = noSource;\n\t\t\t\t\t\tmapping.original.line = 1;\n\t\t\t\t\t\tmapping.original.column = 0;\n\t\t\t\t\t\tthis.map.addMapping(mapping);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlines = str.match(/\\n/g);\n\t\t\t\tif (lines) {\n\t\t\t\t\tline += lines.length;\n\t\t\t\t\tlast = str.lastIndexOf(\"\\n\");\n\t\t\t\t\tcolumn = str.length - last;\n\t\t\t\t} else column += str.length;\n\t\t\t\tif (node && type !== \"start\") {\n\t\t\t\t\tlet p = node.parent || { raws: {} };\n\t\t\t\t\tif (!(node.type === \"decl\" || node.type === \"atrule\" && !node.nodes) || node !== p.last || p.raws.semicolon) {\n\t\t\t\t\t\tif (node.source && node.source.end) {\n\t\t\t\t\t\t\tmapping.source = this.sourcePath(node);\n\t\t\t\t\t\t\tmapping.original.line = node.source.end.line;\n\t\t\t\t\t\t\tmapping.original.column = node.source.end.column - 1;\n\t\t\t\t\t\t\tmapping.generated.line = line;\n\t\t\t\t\t\t\tmapping.generated.column = column - 2;\n\t\t\t\t\t\t\tthis.map.addMapping(mapping);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmapping.source = noSource;\n\t\t\t\t\t\t\tmapping.original.line = 1;\n\t\t\t\t\t\t\tmapping.original.column = 0;\n\t\t\t\t\t\t\tmapping.generated.line = line;\n\t\t\t\t\t\t\tmapping.generated.column = column - 1;\n\t\t\t\t\t\t\tthis.map.addMapping(mapping);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tisAnnotation() {\n\t\t\tif (this.isInline()) return true;\n\t\t\tif (typeof this.mapOpts.annotation !== \"undefined\") return this.mapOpts.annotation;\n\t\t\tif (this.previous().length) return this.previous().some((i) => i.annotation);\n\t\t\treturn true;\n\t\t}\n\t\tisInline() {\n\t\t\tif (typeof this.mapOpts.inline !== \"undefined\") return this.mapOpts.inline;\n\t\t\tlet annotation = this.mapOpts.annotation;\n\t\t\tif (typeof annotation !== \"undefined\" && annotation !== true) return false;\n\t\t\tif (this.previous().length) return this.previous().some((i) => i.inline);\n\t\t\treturn true;\n\t\t}\n\t\tisMap() {\n\t\t\tif (typeof this.opts.map !== \"undefined\") return !!this.opts.map;\n\t\t\treturn this.previous().length > 0;\n\t\t}\n\t\tisSourcesContent() {\n\t\t\tif (typeof this.mapOpts.sourcesContent !== \"undefined\") return this.mapOpts.sourcesContent;\n\t\t\tif (this.previous().length) return this.previous().some((i) => i.withContent());\n\t\t\treturn true;\n\t\t}\n\t\toutputFile() {\n\t\t\tif (this.opts.to) return this.path(this.opts.to);\n\t\t\telse if (this.opts.from) return this.path(this.opts.from);\n\t\t\telse return \"to.css\";\n\t\t}\n\t\tpath(file) {\n\t\t\tif (this.mapOpts.absolute) return file;\n\t\t\tif (file.charCodeAt(0) === 60) return file;\n\t\t\tif (/^\\w+:\\/\\//.test(file)) return file;\n\t\t\tlet cached = this.memoizedPaths.get(file);\n\t\t\tif (cached) return cached;\n\t\t\tlet from = this.opts.to ? dirname(this.opts.to) : \".\";\n\t\t\tif (typeof this.mapOpts.annotation === \"string\") from = dirname(resolve(from, this.mapOpts.annotation));\n\t\t\tlet path = relative(from, file);\n\t\t\tthis.memoizedPaths.set(file, path);\n\t\t\treturn path;\n\t\t}\n\t\tprevious() {\n\t\t\tif (!this.previousMaps) {\n\t\t\t\tthis.previousMaps = [];\n\t\t\t\tif (this.root) this.root.walk((node) => {\n\t\t\t\t\tif (node.source && node.source.input.map) {\n\t\t\t\t\t\tlet map = node.source.input.map;\n\t\t\t\t\t\tif (!this.previousMaps.includes(map)) this.previousMaps.push(map);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tlet input = new Input(this.originalCSS, this.opts);\n\t\t\t\t\tif (input.map) this.previousMaps.push(input.map);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.previousMaps;\n\t\t}\n\t\tsetSourcesContent() {\n\t\t\tlet already = {};\n\t\t\tif (this.root) this.root.walk((node) => {\n\t\t\t\tif (node.source) {\n\t\t\t\t\tlet from = node.source.input.from;\n\t\t\t\t\tif (from && !already[from]) {\n\t\t\t\t\t\talready[from] = true;\n\t\t\t\t\t\tlet fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));\n\t\t\t\t\t\tthis.map.setSourceContent(fromUrl, node.source.input.css);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\telse if (this.css) {\n\t\t\t\tlet from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : \"<no source>\";\n\t\t\t\tthis.map.setSourceContent(from, this.css);\n\t\t\t}\n\t\t}\n\t\tsourcePath(node) {\n\t\t\tif (this.mapOpts.from) return this.toUrl(this.mapOpts.from);\n\t\t\telse if (this.usesFileUrls) return this.toFileUrl(node.source.input.from);\n\t\t\telse return this.toUrl(this.path(node.source.input.from));\n\t\t}\n\t\ttoBase64(str) {\n\t\t\tif (Buffer) return Buffer.from(str).toString(\"base64\");\n\t\t\telse return window.btoa(unescape(encodeURIComponent(str)));\n\t\t}\n\t\ttoFileUrl(path) {\n\t\t\tlet cached = this.memoizedFileURLs.get(path);\n\t\t\tif (cached) return cached;\n\t\t\tif (pathToFileURL) {\n\t\t\t\tlet fileURL = pathToFileURL(path).toString();\n\t\t\t\tthis.memoizedFileURLs.set(path, fileURL);\n\t\t\t\treturn fileURL;\n\t\t\t} else throw new Error(\"`map.absolute` option is not available in this PostCSS build\");\n\t\t}\n\t\ttoUrl(path) {\n\t\t\tlet cached = this.memoizedURLs.get(path);\n\t\t\tif (cached) return cached;\n\t\t\tif (sep === \"\\\\\") path = path.replace(/\\\\/g, \"/\");\n\t\t\tlet url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);\n\t\t\tthis.memoizedURLs.set(path, url);\n\t\t\treturn url;\n\t\t}\n\t};\n\tmodule.exports = MapGenerator;\n}));\n// ../../node_modules/postcss/lib/tokenize.js\nvar require_tokenize = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar SINGLE_QUOTE = \"'\".charCodeAt(0);\n\tvar DOUBLE_QUOTE = \"\\\"\".charCodeAt(0);\n\tvar BACKSLASH = \"\\\\\".charCodeAt(0);\n\tvar SLASH = \"/\".charCodeAt(0);\n\tvar NEWLINE = \"\\n\".charCodeAt(0);\n\tvar SPACE = \" \".charCodeAt(0);\n\tvar FEED = \"\\f\".charCodeAt(0);\n\tvar TAB = \"\t\".charCodeAt(0);\n\tvar CR = \"\\r\".charCodeAt(0);\n\tvar OPEN_SQUARE = \"[\".charCodeAt(0);\n\tvar CLOSE_SQUARE = \"]\".charCodeAt(0);\n\tvar OPEN_PARENTHESES = \"(\".charCodeAt(0);\n\tvar CLOSE_PARENTHESES = \")\".charCodeAt(0);\n\tvar OPEN_CURLY = \"{\".charCodeAt(0);\n\tvar CLOSE_CURLY = \"}\".charCodeAt(0);\n\tvar SEMICOLON = \";\".charCodeAt(0);\n\tvar ASTERISK = \"*\".charCodeAt(0);\n\tvar COLON = \":\".charCodeAt(0);\n\tvar AT = \"@\".charCodeAt(0);\n\tvar RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g;\n\tvar RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g;\n\tvar RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/;\n\tvar RE_HEX_ESCAPE = /[\\da-f]/i;\n\tmodule.exports = function tokenizer(input, options = {}) {\n\t\tlet css = input.css.valueOf();\n\t\tlet ignore = options.ignoreErrors;\n\t\tlet code, content, escape, next, quote;\n\t\tlet currentToken, escaped, escapePos, n, prev;\n\t\tlet length = css.length;\n\t\tlet pos = 0;\n\t\tlet buffer = [];\n\t\tlet returned = [];\n\t\tlet lastBadParen = -1;\n\t\tfunction position() {\n\t\t\treturn pos;\n\t\t}\n\t\tfunction unclosed(what) {\n\t\t\tthrow input.error(\"Unclosed \" + what, pos);\n\t\t}\n\t\tfunction endOfFile() {\n\t\t\treturn returned.length === 0 && pos >= length;\n\t\t}\n\t\tfunction nextToken(opts) {\n\t\t\tif (returned.length) return returned.pop();\n\t\t\tif (pos >= length) return;\n\t\t\tlet ignoreUnclosed = opts ? opts.ignoreUnclosed : false;\n\t\t\tcode = css.charCodeAt(pos);\n\t\t\tswitch (code) {\n\t\t\t\tcase NEWLINE:\n\t\t\t\tcase SPACE:\n\t\t\t\tcase TAB:\n\t\t\t\tcase CR:\n\t\t\t\tcase FEED:\n\t\t\t\t\tnext = pos;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tnext += 1;\n\t\t\t\t\t\tcode = css.charCodeAt(next);\n\t\t\t\t\t} while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);\n\t\t\t\t\tcurrentToken = [\"space\", css.slice(pos, next)];\n\t\t\t\t\tpos = next - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase OPEN_SQUARE:\n\t\t\t\tcase CLOSE_SQUARE:\n\t\t\t\tcase OPEN_CURLY:\n\t\t\t\tcase CLOSE_CURLY:\n\t\t\t\tcase COLON:\n\t\t\t\tcase SEMICOLON:\n\t\t\t\tcase CLOSE_PARENTHESES: {\n\t\t\t\t\tlet controlChar = String.fromCharCode(code);\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\tcontrolChar,\n\t\t\t\t\t\tcontrolChar,\n\t\t\t\t\t\tpos\n\t\t\t\t\t];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase OPEN_PARENTHESES:\n\t\t\t\t\tprev = buffer.length ? buffer.pop()[1] : \"\";\n\t\t\t\t\tn = css.charCodeAt(pos + 1);\n\t\t\t\t\tif (prev === \"url\" && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) {\n\t\t\t\t\t\tnext = pos;\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tescaped = false;\n\t\t\t\t\t\t\tnext = css.indexOf(\")\", next + 1);\n\t\t\t\t\t\t\tif (next === -1) {\n\t\t\t\t\t\t\t\tif (ignore || ignoreUnclosed) {\n\t\t\t\t\t\t\t\t\tnext = pos;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else unclosed(\"bracket\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tescapePos = next;\n\t\t\t\t\t\t\twhile (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n\t\t\t\t\t\t\t\tescapePos -= 1;\n\t\t\t\t\t\t\t\tescaped = !escaped;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (escaped);\n\t\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\t\"brackets\",\n\t\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\t\tpos,\n\t\t\t\t\t\t\tnext\n\t\t\t\t\t\t];\n\t\t\t\t\t\tpos = next;\n\t\t\t\t\t} else if (pos <= lastBadParen) currentToken = [\n\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\tpos\n\t\t\t\t\t];\n\t\t\t\t\telse {\n\t\t\t\t\t\tnext = css.indexOf(\")\", pos + 1);\n\t\t\t\t\t\tcontent = css.slice(pos, next + 1);\n\t\t\t\t\t\tif (next === -1 || RE_BAD_BRACKET.test(content)) {\n\t\t\t\t\t\t\tlastBadParen = next === -1 ? length : next;\n\t\t\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\t\t\tpos\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\t\t\"brackets\",\n\t\t\t\t\t\t\t\tcontent,\n\t\t\t\t\t\t\t\tpos,\n\t\t\t\t\t\t\t\tnext\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\tpos = next;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SINGLE_QUOTE:\n\t\t\t\tcase DOUBLE_QUOTE:\n\t\t\t\t\tquote = code === SINGLE_QUOTE ? \"'\" : \"\\\"\";\n\t\t\t\t\tnext = pos;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tescaped = false;\n\t\t\t\t\t\tnext = css.indexOf(quote, next + 1);\n\t\t\t\t\t\tif (next === -1) {\n\t\t\t\t\t\t\tif (ignore || ignoreUnclosed) {\n\t\t\t\t\t\t\t\tnext = pos + 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else unclosed(\"string\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tescapePos = next;\n\t\t\t\t\t\twhile (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n\t\t\t\t\t\t\tescapePos -= 1;\n\t\t\t\t\t\t\tescaped = !escaped;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (escaped);\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"string\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tpos = next;\n\t\t\t\t\tbreak;\n\t\t\t\tcase AT:\n\t\t\t\t\tRE_AT_END.lastIndex = pos + 1;\n\t\t\t\t\tRE_AT_END.test(css);\n\t\t\t\t\tif (RE_AT_END.lastIndex === 0) next = css.length - 1;\n\t\t\t\t\telse next = RE_AT_END.lastIndex - 2;\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"at-word\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tpos = next;\n\t\t\t\t\tbreak;\n\t\t\t\tcase BACKSLASH:\n\t\t\t\t\tnext = pos;\n\t\t\t\t\tescape = true;\n\t\t\t\t\twhile (css.charCodeAt(next + 1) === BACKSLASH) {\n\t\t\t\t\t\tnext += 1;\n\t\t\t\t\t\tescape = !escape;\n\t\t\t\t\t}\n\t\t\t\t\tcode = css.charCodeAt(next + 1);\n\t\t\t\t\tif (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) {\n\t\t\t\t\t\tnext += 1;\n\t\t\t\t\t\tif (RE_HEX_ESCAPE.test(css.charAt(next))) {\n\t\t\t\t\t\t\twhile (RE_HEX_ESCAPE.test(css.charAt(next + 1))) next += 1;\n\t\t\t\t\t\t\tif (css.charCodeAt(next + 1) === SPACE) next += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"word\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tpos = next;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n\t\t\t\t\tnext = css.indexOf(\"*/\", pos + 2) + 1;\n\t\t\t\t\tif (next === 0) {\n\t\t\t\t\t\tif (ignore || ignoreUnclosed) next = css.length;\n\t\t\t\t\t\telse unclosed(\"comment\");\n\t\t\t\t\t}\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"comment\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tpos = next;\n\t\t\t\t} else {\n\t\t\t\t\tRE_WORD_END.lastIndex = pos + 1;\n\t\t\t\t\tRE_WORD_END.test(css);\n\t\t\t\t\tif (RE_WORD_END.lastIndex === 0) next = css.length - 1;\n\t\t\t\t\telse next = RE_WORD_END.lastIndex - 2;\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"word\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tbuffer.push(currentToken);\n\t\t\t\t\tpos = next;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos++;\n\t\t\treturn currentToken;\n\t\t}\n\t\tfunction back(token) {\n\t\t\treturned.push(token);\n\t\t}\n\t\treturn {\n\t\t\tback,\n\t\t\tendOfFile,\n\t\t\tnextToken,\n\t\t\tposition\n\t\t};\n\t};\n}));\n// ../../node_modules/postcss/lib/parser.js\nvar require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar AtRule = require_at_rule();\n\tvar Comment = require_comment();\n\tvar Declaration = require_declaration();\n\tvar Root = require_root();\n\tvar Rule = require_rule();\n\tvar tokenizer = require_tokenize();\n\tvar SAFE_COMMENT_NEIGHBOR = {\n\t\tempty: true,\n\t\tspace: true\n\t};\n\tfunction findLastWithPosition(tokens) {\n\t\tfor (let i = tokens.length - 1; i >= 0; i--) {\n\t\t\tlet token = tokens[i];\n\t\t\tlet pos = token[3] || token[2];\n\t\t\tif (pos) return pos;\n\t\t}\n\t}\n\tfunction tokensToString(tokens, from, to) {\n\t\tlet result = \"\";\n\t\tfor (let i = from; i < to; i++) result += tokens[i][1];\n\t\treturn result;\n\t}\n\tvar Parser = class {\n\t\tconstructor(input) {\n\t\t\tthis.input = input;\n\t\t\tthis.root = new Root();\n\t\t\tthis.current = this.root;\n\t\t\tthis.spaces = \"\";\n\t\t\tthis.semicolon = false;\n\t\t\tthis.createTokenizer();\n\t\t\tthis.root.source = {\n\t\t\t\tinput,\n\t\t\t\tstart: {\n\t\t\t\t\tcolumn: 1,\n\t\t\t\t\tline: 1,\n\t\t\t\t\toffset: 0\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tatrule(token) {\n\t\t\tlet node = new AtRule();\n\t\t\tnode.name = token[1].slice(1);\n\t\t\tif (node.name === \"\") this.unnamedAtrule(node, token);\n\t\t\tthis.init(node, token[2]);\n\t\t\tlet type;\n\t\t\tlet prev;\n\t\t\tlet shift;\n\t\t\tlet last = false;\n\t\t\tlet open = false;\n\t\t\tlet params = [];\n\t\t\tlet brackets = [];\n\t\t\twhile (!this.tokenizer.endOfFile()) {\n\t\t\t\ttoken = this.tokenizer.nextToken();\n\t\t\t\ttype = token[0];\n\t\t\t\tif (type === \"(\" || type === \"[\") brackets.push(type === \"(\" ? \")\" : \"]\");\n\t\t\t\telse if (type === \"{\" && brackets.length > 0) brackets.push(\"}\");\n\t\t\t\telse if (type === brackets[brackets.length - 1]) brackets.pop();\n\t\t\t\tif (brackets.length === 0) {\n\t\t\t\t\tif (type === \";\") {\n\t\t\t\t\t\tnode.source.end = this.getPosition(token[2]);\n\t\t\t\t\t\tnode.source.end.offset++;\n\t\t\t\t\t\tthis.semicolon = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (type === \"{\") {\n\t\t\t\t\t\topen = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (type === \"}\") {\n\t\t\t\t\t\tif (params.length > 0) {\n\t\t\t\t\t\t\tshift = params.length - 1;\n\t\t\t\t\t\t\tprev = params[shift];\n\t\t\t\t\t\t\twhile (prev && prev[0] === \"space\") prev = params[--shift];\n\t\t\t\t\t\t\tif (prev) {\n\t\t\t\t\t\t\t\tnode.source.end = this.getPosition(prev[3] || prev[2]);\n\t\t\t\t\t\t\t\tnode.source.end.offset++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.end(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else params.push(token);\n\t\t\t\t} else params.push(token);\n\t\t\t\tif (this.tokenizer.endOfFile()) {\n\t\t\t\t\tlast = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode.raws.between = this.spacesAndCommentsFromEnd(params);\n\t\t\tif (params.length) {\n\t\t\t\tnode.raws.afterName = this.spacesAndCommentsFromStart(params);\n\t\t\t\tthis.raw(node, \"params\", params);\n\t\t\t\tif (last) {\n\t\t\t\t\ttoken = params[params.length - 1];\n\t\t\t\t\tnode.source.end = this.getPosition(token[3] || token[2]);\n\t\t\t\t\tnode.source.end.offset++;\n\t\t\t\t\tthis.spaces = node.raws.between;\n\t\t\t\t\tnode.raws.between = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.raws.afterName = \"\";\n\t\t\t\tnode.params = \"\";\n\t\t\t}\n\t\t\tif (open) {\n\t\t\t\tnode.nodes = [];\n\t\t\t\tthis.current = node;\n\t\t\t}\n\t\t}\n\t\tcheckMissedSemicolon(tokens) {\n\t\t\tlet colon = this.colon(tokens);\n\t\t\tif (colon === false) return;\n\t\t\tlet founded = 0;\n\t\t\tlet token;\n\t\t\tfor (let j = colon - 1; j >= 0; j--) {\n\t\t\t\ttoken = tokens[j];\n\t\t\t\tif (token[0] !== \"space\") {\n\t\t\t\t\tfounded += 1;\n\t\t\t\t\tif (founded === 2) break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow this.input.error(\"Missed semicolon\", token[0] === \"word\" ? token[3] + 1 : token[2]);\n\t\t}\n\t\tcolon(tokens) {\n\t\t\tlet brackets = 0;\n\t\t\tlet prev, token, type;\n\t\t\tfor (let [i, element] of tokens.entries()) {\n\t\t\t\ttoken = element;\n\t\t\t\ttype = token[0];\n\t\t\t\tif (type === \"(\") brackets += 1;\n\t\t\t\tif (type === \")\") brackets -= 1;\n\t\t\t\tif (brackets === 0 && type === \":\") {\n\t\t\t\t\tif (!prev) this.doubleColon(token);\n\t\t\t\t\telse if (prev[0] === \"word\" && prev[1] === \"progid\") continue;\n\t\t\t\t\telse return i;\n\t\t\t\t}\n\t\t\t\tprev = token;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tcomment(token) {\n\t\t\tlet node = new Comment();\n\t\t\tthis.init(node, token[2]);\n\t\t\tnode.source.end = this.getPosition(token[3] || token[2]);\n\t\t\tnode.source.end.offset++;\n\t\t\tlet text = token[1].slice(2, -2);\n\t\t\tif (!text.trim()) {\n\t\t\t\tnode.text = \"\";\n\t\t\t\tnode.raws.left = text;\n\t\t\t\tnode.raws.right = \"\";\n\t\t\t} else {\n\t\t\t\tlet match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/);\n\t\t\t\tnode.text = match[2];\n\t\t\t\tnode.raws.left = match[1];\n\t\t\t\tnode.raws.right = match[3];\n\t\t\t}\n\t\t}\n\t\tcreateTokenizer() {\n\t\t\tthis.tokenizer = tokenizer(this.input);\n\t\t}\n\t\tdecl(tokens, customProperty) {\n\t\t\tlet node = new Declaration();\n\t\t\tthis.init(node, tokens[0][2]);\n\t\t\tlet last = tokens[tokens.length - 1];\n\t\t\tif (last[0] === \";\") {\n\t\t\t\tthis.semicolon = true;\n\t\t\t\ttokens.pop();\n\t\t\t}\n\t\t\tnode.source.end = this.getPosition(last[3] || last[2] || findLastWithPosition(tokens));\n\t\t\tnode.source.end.offset++;\n\t\t\tlet start = 0;\n\t\t\twhile (tokens[start][0] !== \"word\") {\n\t\t\t\tif (start === tokens.length - 1) this.unknownWord([tokens[start]]);\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tnode.raws.before += tokensToString(tokens, 0, start);\n\t\t\tnode.source.start = this.getPosition(tokens[start][2]);\n\t\t\tlet propStart = start;\n\t\t\twhile (start < tokens.length) {\n\t\t\t\tlet type = tokens[start][0];\n\t\t\t\tif (type === \":\" || type === \"space\" || type === \"comment\") break;\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tnode.prop = tokensToString(tokens, propStart, start);\n\t\t\tlet betweenStart = start;\n\t\t\tlet token;\n\t\t\twhile (start < tokens.length) {\n\t\t\t\ttoken = tokens[start];\n\t\t\t\tstart++;\n\t\t\t\tif (token[0] === \":\") break;\n\t\t\t\tif (token[0] === \"word\" && /\\w/.test(token[1])) this.unknownWord([token]);\n\t\t\t}\n\t\t\tnode.raws.between = tokensToString(tokens, betweenStart, start);\n\t\t\tif (node.prop[0] === \"_\" || node.prop[0] === \"*\") {\n\t\t\t\tnode.raws.before += node.prop[0];\n\t\t\t\tnode.prop = node.prop.slice(1);\n\t\t\t}\n\t\t\tlet firstSpacesStart = start;\n\t\t\twhile (start < tokens.length) {\n\t\t\t\tlet next = tokens[start][0];\n\t\t\t\tif (next !== \"space\" && next !== \"comment\") break;\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tlet firstSpaces = tokens.slice(firstSpacesStart, start);\n\t\t\ttokens = tokens.slice(start);\n\t\t\tthis.precheckMissedSemicolon(tokens);\n\t\t\tfor (let i = tokens.length - 1; i >= 0; i--) {\n\t\t\t\ttoken = tokens[i];\n\t\t\t\tif (token[1].toLowerCase() === \"!important\") {\n\t\t\t\t\tnode.important = true;\n\t\t\t\t\tlet string = this.stringFrom(tokens, i);\n\t\t\t\t\tstring = this.spacesFromEnd(tokens) + string;\n\t\t\t\t\tif (string !== \" !important\") node.raws.important = string;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (token[1].toLowerCase() === \"important\") {\n\t\t\t\t\tlet cache = tokens.slice(0);\n\t\t\t\t\tlet str = \"\";\n\t\t\t\t\tfor (let j = i; j > 0; j--) {\n\t\t\t\t\t\tlet type = cache[j][0];\n\t\t\t\t\t\tif (str.trim().startsWith(\"!\") && type !== \"space\") break;\n\t\t\t\t\t\tstr = cache.pop()[1] + str;\n\t\t\t\t\t}\n\t\t\t\t\tif (str.trim().startsWith(\"!\")) {\n\t\t\t\t\t\tnode.important = true;\n\t\t\t\t\t\tnode.raws.important = str;\n\t\t\t\t\t\ttokens = cache;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (token[0] !== \"space\" && token[0] !== \"comment\") break;\n\t\t\t}\n\t\t\tif (tokens.some((i) => i[0] !== \"space\" && i[0] !== \"comment\")) {\n\t\t\t\tnode.raws.between += firstSpaces.map((i) => i[1]).join(\"\");\n\t\t\t\tfirstSpaces = [];\n\t\t\t}\n\t\t\tthis.raw(node, \"value\", firstSpaces.concat(tokens), customProperty);\n\t\t\tif (node.value.includes(\":\") && !customProperty) this.checkMissedSemicolon(tokens);\n\t\t}\n\t\tdoubleColon(token) {\n\t\t\tthrow this.input.error(\"Double colon\", { offset: token[2] }, { offset: token[2] + token[1].length });\n\t\t}\n\t\temptyRule(token) {\n\t\t\tlet node = new Rule();\n\t\t\tthis.init(node, token[2]);\n\t\t\tnode.selector = \"\";\n\t\t\tnode.raws.between = \"\";\n\t\t\tthis.current = node;\n\t\t}\n\t\tend(token) {\n\t\t\tif (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon;\n\t\t\tthis.semicolon = false;\n\t\t\tthis.current.raws.after = (this.current.raws.after || \"\") + this.spaces;\n\t\t\tthis.spaces = \"\";\n\t\t\tif (this.current.parent) {\n\t\t\t\tthis.current.source.end = this.getPosition(token[2]);\n\t\t\t\tthis.current.source.end.offset++;\n\t\t\t\tthis.current = this.current.parent;\n\t\t\t} else this.unexpectedClose(token);\n\t\t}\n\t\tendFile() {\n\t\t\tif (this.current.parent) this.unclosedBlock();\n\t\t\tif (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon;\n\t\t\tthis.current.raws.after = (this.current.raws.after || \"\") + this.spaces;\n\t\t\tthis.root.source.end = this.getPosition(this.tokenizer.position());\n\t\t}\n\t\tfreeSemicolon(token) {\n\t\t\tthis.spaces += token[1];\n\t\t\tif (this.current.nodes) {\n\t\t\t\tlet prev = this.current.nodes[this.current.nodes.length - 1];\n\t\t\t\tif (prev && prev.type === \"rule\" && !prev.raws.ownSemicolon) {\n\t\t\t\t\tprev.raws.ownSemicolon = this.spaces;\n\t\t\t\t\tthis.spaces = \"\";\n\t\t\t\t\tprev.source.end = this.getPosition(token[2]);\n\t\t\t\t\tprev.source.end.offset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgetPosition(offset) {\n\t\t\tlet pos = this.input.fromOffset(offset);\n\t\t\treturn {\n\t\t\t\tcolumn: pos.col,\n\t\t\t\tline: pos.line,\n\t\t\t\toffset\n\t\t\t};\n\t\t}\n\t\tinit(node, offset) {\n\t\t\tthis.current.push(node);\n\t\t\tnode.source = {\n\t\t\t\tinput: this.input,\n\t\t\t\tstart: this.getPosition(offset)\n\t\t\t};\n\t\t\tnode.raws.before = this.spaces;\n\t\t\tthis.spaces = \"\";\n\t\t\tif (node.type !== \"comment\") this.semicolon = false;\n\t\t}\n\t\tother(start) {\n\t\t\tlet end = false;\n\t\t\tlet type = null;\n\t\t\tlet colon = false;\n\t\t\tlet bracket = null;\n\t\t\tlet brackets = [];\n\t\t\tlet customProperty = start[1].startsWith(\"--\");\n\t\t\tlet tokens = [];\n\t\t\tlet token = start;\n\t\t\twhile (token) {\n\t\t\t\ttype = token[0];\n\t\t\t\ttokens.push(token);\n\t\t\t\tif (type === \"(\" || type === \"[\") {\n\t\t\t\t\tif (!bracket) bracket = token;\n\t\t\t\t\tbrackets.push(type === \"(\" ? \")\" : \"]\");\n\t\t\t\t} else if (customProperty && colon && type === \"{\") {\n\t\t\t\t\tif (!bracket) bracket = token;\n\t\t\t\t\tbrackets.push(\"}\");\n\t\t\t\t} else if (brackets.length === 0) {\n\t\t\t\t\tif (type === \";\") {\n\t\t\t\t\t\tif (colon) {\n\t\t\t\t\t\t\tthis.decl(tokens, customProperty);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} else break;\n\t\t\t\t\t} else if (type === \"{\") {\n\t\t\t\t\t\tthis.rule(tokens);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if (type === \"}\") {\n\t\t\t\t\t\tthis.tokenizer.back(tokens.pop());\n\t\t\t\t\t\tend = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (type === \":\") colon = true;\n\t\t\t\t} else if (type === brackets[brackets.length - 1]) {\n\t\t\t\t\tbrackets.pop();\n\t\t\t\t\tif (brackets.length === 0) bracket = null;\n\t\t\t\t}\n\t\t\t\ttoken = this.tokenizer.nextToken();\n\t\t\t}\n\t\t\tif (this.tokenizer.endOfFile()) end = true;\n\t\t\tif (brackets.length > 0) this.unclosedBracket(bracket);\n\t\t\tif (end && colon) {\n\t\t\t\tif (!customProperty) while (tokens.length) {\n\t\t\t\t\ttoken = tokens[tokens.length - 1][0];\n\t\t\t\t\tif (token !== \"space\" && token !== \"comment\") break;\n\t\t\t\t\tthis.tokenizer.back(tokens.pop());\n\t\t\t\t}\n\t\t\t\tthis.decl(tokens, customProperty);\n\t\t\t} else this.unknownWord(tokens);\n\t\t}\n\t\tparse() {\n\t\t\tlet token;\n\t\t\twhile (!this.tokenizer.endOfFile()) {\n\t\t\t\ttoken = this.tokenizer.nextToken();\n\t\t\t\tswitch (token[0]) {\n\t\t\t\t\tcase \"space\":\n\t\t\t\t\t\tthis.spaces += token[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \";\":\n\t\t\t\t\t\tthis.freeSemicolon(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"}\":\n\t\t\t\t\t\tthis.end(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"comment\":\n\t\t\t\t\t\tthis.comment(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"at-word\":\n\t\t\t\t\t\tthis.atrule(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"{\":\n\t\t\t\t\t\tthis.emptyRule(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: this.other(token);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.endFile();\n\t\t}\n\t\tprecheckMissedSemicolon() {}\n\t\traw(node, prop, tokens, customProperty) {\n\t\t\tlet token, type;\n\t\t\tlet length = tokens.length;\n\t\t\tlet value = \"\";\n\t\t\tlet last = \"\";\n\t\t\tlet clean = true;\n\t\t\tlet next, prev;\n\t\t\tfor (let i = 0; i < length; i += 1) {\n\t\t\t\ttoken = tokens[i];\n\t\t\t\ttype = token[0];\n\t\t\t\tif (type === \"space\" && i === length - 1 && !customProperty) clean = false;\n\t\t\t\telse if (type === \"comment\") {\n\t\t\t\t\tprev = tokens[i - 1] ? tokens[i - 1][0] : \"empty\";\n\t\t\t\t\tnext = tokens[i + 1] ? tokens[i + 1][0] : \"empty\";\n\t\t\t\t\tif (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n\t\t\t\t\t\tif (last === \",\") clean = false;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvalue += token[1];\n\t\t\t\t\t\t\tlast = token[1].slice(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else clean = false;\n\t\t\t\t} else {\n\t\t\t\t\tvalue += token[1];\n\t\t\t\t\tlast = token[1].slice(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!clean) {\n\t\t\t\tlet raw = tokens.reduce((all, i) => all + i[1], \"\");\n\t\t\t\tnode.raws[prop] = {\n\t\t\t\t\traw,\n\t\t\t\t\tvalue\n\t\t\t\t};\n\t\t\t}\n\t\t\tnode[prop] = value;\n\t\t}\n\t\trule(tokens) {\n\t\t\ttokens.pop();\n\t\t\tlet node = new Rule();\n\t\t\tthis.init(node, tokens[0][2]);\n\t\t\tnode.raws.between = this.spacesAndCommentsFromEnd(tokens);\n\t\t\tthis.raw(node, \"selector\", tokens);\n\t\t\tthis.current = node;\n\t\t}\n\t\tspacesAndCommentsFromEnd(tokens) {\n\t\t\tlet lastTokenType;\n\t\t\tlet spaces = \"\";\n\t\t\twhile (tokens.length) {\n\t\t\t\tlastTokenType = tokens[tokens.length - 1][0];\n\t\t\t\tif (lastTokenType !== \"space\" && lastTokenType !== \"comment\") break;\n\t\t\t\tspaces = tokens.pop()[1] + spaces;\n\t\t\t}\n\t\t\treturn spaces;\n\t\t}\n\t\tspacesAndCommentsFromStart(tokens) {\n\t\t\tlet next;\n\t\t\tlet spaces = \"\";\n\t\t\twhile (tokens.length) {\n\t\t\t\tnext = tokens[0][0];\n\t\t\t\tif (next !== \"space\" && next !== \"comment\") break;\n\t\t\t\tspaces += tokens.shift()[1];\n\t\t\t}\n\t\t\treturn spaces;\n\t\t}\n\t\tspacesFromEnd(tokens) {\n\t\t\tlet lastTokenType;\n\t\t\tlet spaces = \"\";\n\t\t\twhile (tokens.length) {\n\t\t\t\tlastTokenType = tokens[tokens.length - 1][0];\n\t\t\t\tif (lastTokenType !== \"space\") break;\n\t\t\t\tspaces = tokens.pop()[1] + spaces;\n\t\t\t}\n\t\t\treturn spaces;\n\t\t}\n\t\tstringFrom(tokens, from) {\n\t\t\tlet result = \"\";\n\t\t\tfor (let i = from; i < tokens.length; i++) result += tokens[i][1];\n\t\t\ttokens.splice(from, tokens.length - from);\n\t\t\treturn result;\n\t\t}\n\t\tunclosedBlock() {\n\t\t\tlet pos = this.current.source.start;\n\t\t\tthrow this.input.error(\"Unclosed block\", pos.line, pos.column);\n\t\t}\n\t\tunclosedBracket(bracket) {\n\t\t\tthrow this.input.error(\"Unclosed bracket\", { offset: bracket[2] }, { offset: bracket[2] + 1 });\n\t\t}\n\t\tunexpectedClose(token) {\n\t\t\tthrow this.input.error(\"Unexpected }\", { offset: token[2] }, { offset: token[2] + 1 });\n\t\t}\n\t\tunknownWord(tokens) {\n\t\t\tthrow this.input.error(\"Unknown word \" + tokens[0][1], { offset: tokens[0][2] }, { offset: tokens[0][2] + tokens[0][1].length });\n\t\t}\n\t\tunnamedAtrule(node, token) {\n\t\t\tthrow this.input.error(\"At-rule without name\", { offset: token[2] }, { offset: token[2] + token[1].length });\n\t\t}\n\t};\n\tmodule.exports = Parser;\n}));\n// ../../node_modules/postcss/lib/parse.js\nvar require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar Input = require_input();\n\tvar Parser = require_parser();\n\tfunction parse(css, opts) {\n\t\tlet parser = new Parser(new Input(css, opts));\n\t\ttry {\n\t\t\tparser.parse();\n\t\t} catch (e) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (e.name === \"CssSyntaxError\" && opts && opts.from) {\n\t\t\t\t\tif (/\\.scss$/i.test(opts.from)) e.message += \"\\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser\";\n\t\t\t\t\telse if (/\\.sass/i.test(opts.from)) e.message += \"\\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser\";\n\t\t\t\t\telse if (/\\.less$/i.test(opts.from)) e.message += \"\\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t\treturn parser.root;\n\t}\n\tmodule.exports = parse;\n\tparse.default = parse;\n\tContainer.registerParse(parse);\n}));\n// ../../node_modules/postcss/lib/warning.js\nvar require_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar { my } = require_symbols();\n\tvar Warning = class {\n\t\tconstructor(text, opts = {}) {\n\t\t\tthis.type = \"warning\";\n\t\t\tthis.text = text;\n\t\t\tif (opts.node && opts.node.source) {\n\t\t\t\tif (!opts.node[my]) Container.rebuild(opts.node);\n\t\t\t\tlet range = opts.node.rangeBy(opts);\n\t\t\t\tthis.line = range.start.line;\n\t\t\t\tthis.column = range.start.column;\n\t\t\t\tthis.endLine = range.end.line;\n\t\t\t\tthis.endColumn = range.end.column;\n\t\t\t}\n\t\t\tfor (let opt in opts) this[opt] = opts[opt];\n\t\t}\n\t\ttoString() {\n\t\t\tif (this.node) return this.node.error(this.text, {\n\t\t\t\tindex: this.index,\n\t\t\t\tplugin: this.plugin,\n\t\t\t\tstart: this.start,\n\t\t\t\tword: this.word\n\t\t\t}).message;\n\t\t\tif (this.plugin) return this.plugin + \": \" + this.text;\n\t\t\treturn this.text;\n\t\t}\n\t};\n\tmodule.exports = Warning;\n\tWarning.default = Warning;\n}));\n// ../../node_modules/postcss/lib/result.js\nvar require_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Warning = require_warning();\n\tvar Result = class {\n\t\tget content() {\n\t\t\treturn this.css;\n\t\t}\n\t\tconstructor(processor, root, opts) {\n\t\t\tthis.processor = processor;\n\t\t\tthis.messages = [];\n\t\t\tthis.root = root;\n\t\t\tthis.opts = opts;\n\t\t\tthis.css = \"\";\n\t\t\tthis.map = void 0;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.css;\n\t\t}\n\t\twarn(text, opts = {}) {\n\t\t\tif (!opts.plugin) {\n\t\t\t\tif (this.lastPlugin && this.lastPlugin.postcssPlugin) opts.plugin = this.lastPlugin.postcssPlugin;\n\t\t\t}\n\t\t\tlet warning = new Warning(text, opts);\n\t\t\tthis.messages.push(warning);\n\t\t\treturn warning;\n\t\t}\n\t\twarnings() {\n\t\t\treturn this.messages.filter((i) => i.type === \"warning\");\n\t\t}\n\t};\n\tmodule.exports = Result;\n\tResult.default = Result;\n}));\n// ../../node_modules/postcss/lib/warn-once.js\nvar require_warn_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar printed = {};\n\tmodule.exports = function warnOnce(message) {\n\t\tif (printed[message]) return;\n\t\tprinted[message] = true;\n\t\tif (typeof console !== \"undefined\" && console.warn) console.warn(message);\n\t};\n}));\n// ../../node_modules/postcss/lib/lazy-result.js\nvar require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar Document = require_document();\n\tvar MapGenerator = require_map_generator();\n\tvar parse = require_parse();\n\tvar Result = require_result();\n\tvar Root = require_root();\n\tvar stringify = require_stringify();\n\tvar { isClean, my } = require_symbols();\n\tvar warnOnce = require_warn_once();\n\tvar TYPE_TO_CLASS_NAME = {\n\t\tatrule: \"AtRule\",\n\t\tcomment: \"Comment\",\n\t\tdecl: \"Declaration\",\n\t\tdocument: \"Document\",\n\t\troot: \"Root\",\n\t\trule: \"Rule\"\n\t};\n\tvar PLUGIN_PROPS = {\n\t\tAtRule: true,\n\t\tAtRuleExit: true,\n\t\tComment: true,\n\t\tCommentExit: true,\n\t\tDeclaration: true,\n\t\tDeclarationExit: true,\n\t\tDocument: true,\n\t\tDocumentExit: true,\n\t\tOnce: true,\n\t\tOnceExit: true,\n\t\tpostcssPlugin: true,\n\t\tprepare: true,\n\t\tRoot: true,\n\t\tRootExit: true,\n\t\tRule: true,\n\t\tRuleExit: true\n\t};\n\tvar NOT_VISITORS = {\n\t\tOnce: true,\n\t\tpostcssPlugin: true,\n\t\tprepare: true\n\t};\n\tvar CHILDREN = 0;\n\tfunction isPromise(obj) {\n\t\treturn typeof obj === \"object\" && typeof obj.then === \"function\";\n\t}\n\tfunction getEvents(node) {\n\t\tlet key = false;\n\t\tlet type = TYPE_TO_CLASS_NAME[node.type];\n\t\tif (node.type === \"decl\") key = node.prop.toLowerCase();\n\t\telse if (node.type === \"atrule\") key = node.name.toLowerCase();\n\t\tif (key && node.append) return [\n\t\t\ttype,\n\t\t\ttype + \"-\" + key,\n\t\t\tCHILDREN,\n\t\t\ttype + \"Exit\",\n\t\t\ttype + \"Exit-\" + key\n\t\t];\n\t\telse if (key) return [\n\t\t\ttype,\n\t\t\ttype + \"-\" + key,\n\t\t\ttype + \"Exit\",\n\t\t\ttype + \"Exit-\" + key\n\t\t];\n\t\telse if (node.append) return [\n\t\t\ttype,\n\t\t\tCHILDREN,\n\t\t\ttype + \"Exit\"\n\t\t];\n\t\telse return [type, type + \"Exit\"];\n\t}\n\tfunction toStack(node) {\n\t\tlet events;\n\t\tif (node.type === \"document\") events = [\n\t\t\t\"Document\",\n\t\t\tCHILDREN,\n\t\t\t\"DocumentExit\"\n\t\t];\n\t\telse if (node.type === \"root\") events = [\n\t\t\t\"Root\",\n\t\t\tCHILDREN,\n\t\t\t\"RootExit\"\n\t\t];\n\t\telse events = getEvents(node);\n\t\treturn {\n\t\t\teventIndex: 0,\n\t\t\tevents,\n\t\t\titerator: 0,\n\t\t\tnode,\n\t\t\tvisitorIndex: 0,\n\t\t\tvisitors: []\n\t\t};\n\t}\n\tfunction cleanMarks(node) {\n\t\tlet stack = [node];\n\t\twhile (stack.length > 0) {\n\t\t\tlet next = stack.pop();\n\t\t\tnext[isClean] = false;\n\t\t\tif (next.nodes) for (let i of next.nodes) stack.push(i);\n\t\t}\n\t\treturn node;\n\t}\n\tvar postcss = {};\n\tvar LazyResult = class LazyResult {\n\t\tget content() {\n\t\t\treturn this.stringify().content;\n\t\t}\n\t\tget css() {\n\t\t\treturn this.stringify().css;\n\t\t}\n\t\tget map() {\n\t\t\treturn this.stringify().map;\n\t\t}\n\t\tget messages() {\n\t\t\treturn this.sync().messages;\n\t\t}\n\t\tget opts() {\n\t\t\treturn this.result.opts;\n\t\t}\n\t\tget processor() {\n\t\t\treturn this.result.processor;\n\t\t}\n\t\tget root() {\n\t\t\treturn this.sync().root;\n\t\t}\n\t\tget [Symbol.toStringTag]() {\n\t\t\treturn \"LazyResult\";\n\t\t}\n\t\tconstructor(processor, css, opts) {\n\t\t\tthis.stringified = false;\n\t\t\tthis.processed = false;\n\t\t\tlet root;\n\t\t\tif (typeof css === \"object\" && css !== null && (css.type === \"root\" || css.type === \"document\")) root = cleanMarks(css);\n\t\t\telse if (css instanceof LazyResult || css instanceof Result) {\n\t\t\t\troot = cleanMarks(css.root);\n\t\t\t\tif (css.map) {\n\t\t\t\t\tif (typeof opts.map === \"undefined\") opts.map = {};\n\t\t\t\t\tif (!opts.map.inline) opts.map.inline = false;\n\t\t\t\t\topts.map.prev = css.map;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlet parser = parse;\n\t\t\t\tif (opts.syntax) parser = opts.syntax.parse;\n\t\t\t\tif (opts.parser) parser = opts.parser;\n\t\t\t\tif (parser.parse) parser = parser.parse;\n\t\t\t\ttry {\n\t\t\t\t\troot = parser(css, opts);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.processed = true;\n\t\t\t\t\tthis.error = error;\n\t\t\t\t}\n\t\t\t\tif (root && !root[my])\n /* c8 ignore next 2 */\n\t\t\t\tContainer.rebuild(root);\n\t\t\t}\n\t\t\tthis.result = new Result(processor, root, opts);\n\t\t\tthis.helpers = {\n\t\t\t\t...postcss,\n\t\t\t\tpostcss,\n\t\t\t\tresult: this.result\n\t\t\t};\n\t\t\tthis.plugins = this.processor.plugins.map((plugin) => {\n\t\t\t\tif (typeof plugin === \"object\" && plugin.prepare) return {\n\t\t\t\t\t...plugin,\n\t\t\t\t\t...plugin.prepare(this.result)\n\t\t\t\t};\n\t\t\t\telse return plugin;\n\t\t\t});\n\t\t}\n\t\tasync() {\n\t\t\tif (this.error) return Promise.reject(this.error);\n\t\t\tif (this.processed) return Promise.resolve(this.result);\n\t\t\tif (!this.processing) this.processing = this.runAsync();\n\t\t\treturn this.processing;\n\t\t}\n\t\tcatch(onRejected) {\n\t\t\treturn this.async().catch(onRejected);\n\t\t}\n\t\tfinally(onFinally) {\n\t\t\treturn this.async().finally(onFinally);\n\t\t}\n\t\tgetAsyncError() {\n\t\t\tthrow new Error(\"Use process(css).then(cb) to work with async plugins\");\n\t\t}\n\t\thandleError(error, node) {\n\t\t\tlet plugin = this.result.lastPlugin;\n\t\t\ttry {\n\t\t\t\tif (node) node.addToError(error);\n\t\t\t\tthis.error = error;\n\t\t\t\tif (error.name === \"CssSyntaxError\" && !error.plugin) {\n\t\t\t\t\terror.plugin = plugin.postcssPlugin;\n\t\t\t\t\terror.setMessage();\n\t\t\t\t} else if (plugin.postcssVersion) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\t\t\tlet pluginName = plugin.postcssPlugin;\n\t\t\t\t\t\tlet pluginVer = plugin.postcssVersion;\n\t\t\t\t\t\tlet runtimeVer = this.result.processor.version;\n\t\t\t\t\t\tlet a = pluginVer.split(\".\");\n\t\t\t\t\t\tlet b = runtimeVer.split(\".\");\n\t\t\t\t\t\tif (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) console.error(\"Unknown error from PostCSS plugin. Your current PostCSS version is \" + runtimeVer + \", but \" + pluginName + \" uses \" + pluginVer + \". Perhaps this is the source of the error below.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t/* c8 ignore next 3 */\n\t\t\t\tif (console && console.error) console.error(err);\n\t\t\t}\n\t\t\treturn error;\n\t\t}\n\t\tprepareVisitors() {\n\t\t\tthis.listeners = {};\n\t\t\tlet add = (plugin, type, cb) => {\n\t\t\t\tif (!this.listeners[type]) this.listeners[type] = [];\n\t\t\t\tthis.listeners[type].push([plugin, cb]);\n\t\t\t};\n\t\t\tfor (let plugin of this.plugins) if (typeof plugin === \"object\") for (let event in plugin) {\n\t\t\t\tif (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) throw new Error(`Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);\n\t\t\t\tif (!NOT_VISITORS[event]) {\n\t\t\t\t\tif (typeof plugin[event] === \"object\") for (let filter in plugin[event]) if (filter === \"*\") add(plugin, event, plugin[event][filter]);\n\t\t\t\t\telse add(plugin, event + \"-\" + filter.toLowerCase(), plugin[event][filter]);\n\t\t\t\t\telse if (typeof plugin[event] === \"function\") add(plugin, event, plugin[event]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.hasListener = Object.keys(this.listeners).length > 0;\n\t\t}\n\t\tasync runAsync() {\n\t\t\tthis.plugin = 0;\n\t\t\tfor (let i = 0; i < this.plugins.length; i++) {\n\t\t\t\tlet plugin = this.plugins[i];\n\t\t\t\tlet promise = this.runOnRoot(plugin);\n\t\t\t\tif (isPromise(promise)) try {\n\t\t\t\t\tawait promise;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow this.handleError(error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.prepareVisitors();\n\t\t\tif (this.hasListener) {\n\t\t\t\tlet root = this.result.root;\n\t\t\t\twhile (!root[isClean]) {\n\t\t\t\t\troot[isClean] = true;\n\t\t\t\t\tlet stack = [toStack(root)];\n\t\t\t\t\twhile (stack.length > 0) {\n\t\t\t\t\t\tlet promise = this.visitTick(stack);\n\t\t\t\t\t\tif (isPromise(promise)) try {\n\t\t\t\t\t\t\tawait promise;\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tlet node = stack[stack.length - 1].node;\n\t\t\t\t\t\t\tthrow this.handleError(e, node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.listeners.OnceExit) for (let [plugin, visitor] of this.listeners.OnceExit) {\n\t\t\t\t\tthis.result.lastPlugin = plugin;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (root.type === \"document\") {\n\t\t\t\t\t\t\tlet roots = root.nodes.map((subRoot) => visitor(subRoot, this.helpers));\n\t\t\t\t\t\t\tawait Promise.all(roots);\n\t\t\t\t\t\t} else await visitor(root, this.helpers);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tthrow this.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.processed = true;\n\t\t\treturn this.stringify();\n\t\t}\n\t\trunOnRoot(plugin) {\n\t\t\tthis.result.lastPlugin = plugin;\n\t\t\ttry {\n\t\t\t\tif (typeof plugin === \"object\" && plugin.Once) {\n\t\t\t\t\tif (this.result.root.type === \"document\") {\n\t\t\t\t\t\tlet roots = this.result.root.nodes.map((root) => plugin.Once(root, this.helpers));\n\t\t\t\t\t\tif (isPromise(roots[0])) return Promise.all(roots);\n\t\t\t\t\t\treturn roots;\n\t\t\t\t\t}\n\t\t\t\t\treturn plugin.Once(this.result.root, this.helpers);\n\t\t\t\t} else if (typeof plugin === \"function\") return plugin(this.result.root, this.result);\n\t\t\t} catch (error) {\n\t\t\t\tthrow this.handleError(error);\n\t\t\t}\n\t\t}\n\t\tstringify() {\n\t\t\tif (this.error) throw this.error;\n\t\t\tif (this.stringified) return this.result;\n\t\t\tthis.stringified = true;\n\t\t\tthis.sync();\n\t\t\tlet opts = this.result.opts;\n\t\t\tlet str = stringify;\n\t\t\tif (opts.syntax) str = opts.syntax.stringify;\n\t\t\tif (opts.stringifier) str = opts.stringifier;\n\t\t\tif (str.stringify) str = str.stringify;\n\t\t\tlet rootSource = this.result.root.source;\n\t\t\tif (opts.map === void 0 && !(rootSource && rootSource.input && rootSource.input.map)) {\n\t\t\t\tlet result = \"\";\n\t\t\t\tstr(this.result.root, (i) => {\n\t\t\t\t\tresult += i;\n\t\t\t\t});\n\t\t\t\tthis.result.css = result;\n\t\t\t\treturn this.result;\n\t\t\t}\n\t\t\tlet data = new MapGenerator(str, this.result.root, this.result.opts).generate();\n\t\t\tthis.result.css = data[0];\n\t\t\tthis.result.map = data[1];\n\t\t\treturn this.result;\n\t\t}\n\t\tsync() {\n\t\t\tif (this.error) throw this.error;\n\t\t\tif (this.processed) return this.result;\n\t\t\tthis.processed = true;\n\t\t\tif (this.processing) throw this.getAsyncError();\n\t\t\tfor (let plugin of this.plugins) if (isPromise(this.runOnRoot(plugin))) throw this.getAsyncError();\n\t\t\tthis.prepareVisitors();\n\t\t\tif (this.hasListener) {\n\t\t\t\tlet root = this.result.root;\n\t\t\t\twhile (!root[isClean]) {\n\t\t\t\t\troot[isClean] = true;\n\t\t\t\t\tthis.walkSync(root);\n\t\t\t\t}\n\t\t\t\tif (this.listeners.OnceExit) {\n\t\t\t\t\tif (root.type === \"document\") for (let subRoot of root.nodes) this.visitSync(this.listeners.OnceExit, subRoot);\n\t\t\t\t\telse this.visitSync(this.listeners.OnceExit, root);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.result;\n\t\t}\n\t\tthen(onFulfilled, onRejected) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!(\"from\" in this.opts)) warnOnce(\"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.\");\n\t\t\t}\n\t\t\treturn this.async().then(onFulfilled, onRejected);\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.css;\n\t\t}\n\t\tvisitSync(visitors, node) {\n\t\t\tfor (let [plugin, visitor] of visitors) {\n\t\t\t\tthis.result.lastPlugin = plugin;\n\t\t\t\tlet promise;\n\t\t\t\ttry {\n\t\t\t\t\tpromise = visitor(node, this.helpers);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow this.handleError(e, node.proxyOf);\n\t\t\t\t}\n\t\t\t\tif (node.type !== \"root\" && node.type !== \"document\" && !node.parent) return true;\n\t\t\t\tif (isPromise(promise)) throw this.getAsyncError();\n\t\t\t}\n\t\t}\n\t\tvisitTick(stack) {\n\t\t\tlet visit = stack[stack.length - 1];\n\t\t\tlet { node, visitors } = visit;\n\t\t\tif (node.type !== \"root\" && node.type !== \"document\" && !node.parent) {\n\t\t\t\tstack.pop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n\t\t\t\tlet [plugin, visitor] = visitors[visit.visitorIndex];\n\t\t\t\tvisit.visitorIndex += 1;\n\t\t\t\tif (visit.visitorIndex === visitors.length) {\n\t\t\t\t\tvisit.visitors = [];\n\t\t\t\t\tvisit.visitorIndex = 0;\n\t\t\t\t}\n\t\t\t\tthis.result.lastPlugin = plugin;\n\t\t\t\ttry {\n\t\t\t\t\treturn visitor(node.toProxy(), this.helpers);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow this.handleError(e, node);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (visit.iterator !== 0) {\n\t\t\t\tlet iterator = visit.iterator;\n\t\t\t\tif (visit.descending) {\n\t\t\t\t\tvisit.descending = false;\n\t\t\t\t\tnode.indexes[iterator] += 1;\n\t\t\t\t}\n\t\t\t\tlet child;\n\t\t\t\twhile (child = node.nodes[node.indexes[iterator]]) {\n\t\t\t\t\tif (!child[isClean]) {\n\t\t\t\t\t\tchild[isClean] = true;\n\t\t\t\t\t\tvisit.descending = true;\n\t\t\t\t\t\tstack.push(toStack(child));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnode.indexes[iterator] += 1;\n\t\t\t\t}\n\t\t\t\tvisit.iterator = 0;\n\t\t\t\tdelete node.indexes[iterator];\n\t\t\t}\n\t\t\tlet events = visit.events;\n\t\t\twhile (visit.eventIndex < events.length) {\n\t\t\t\tlet event = events[visit.eventIndex];\n\t\t\t\tvisit.eventIndex += 1;\n\t\t\t\tif (event === CHILDREN) {\n\t\t\t\t\tif (node.nodes && node.nodes.length) {\n\t\t\t\t\t\tnode[isClean] = true;\n\t\t\t\t\t\tvisit.iterator = node.getIterator();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t} else if (this.listeners[event]) {\n\t\t\t\t\tvisit.visitors = this.listeners[event];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstack.pop();\n\t\t}\n\t\twalkSync(node) {\n\t\t\tnode[isClean] = true;\n\t\t\tlet stack = [{\n\t\t\t\teventIndex: 0,\n\t\t\t\tevents: getEvents(node),\n\t\t\t\titerator: 0,\n\t\t\t\tnode\n\t\t\t}];\n\t\t\twhile (stack.length > 0) {\n\t\t\t\tlet visit = stack[stack.length - 1];\n\t\t\t\tlet visitNode = visit.node;\n\t\t\t\tif (visit.iterator !== 0) {\n\t\t\t\t\tlet iterator = visit.iterator;\n\t\t\t\t\tif (visit.descending) {\n\t\t\t\t\t\tvisit.descending = false;\n\t\t\t\t\t\tvisitNode.indexes[iterator] += 1;\n\t\t\t\t\t}\n\t\t\t\t\tlet child;\n\t\t\t\t\tlet descended = false;\n\t\t\t\t\twhile (child = visitNode.nodes[visitNode.indexes[iterator]]) {\n\t\t\t\t\t\tif (!child[isClean]) {\n\t\t\t\t\t\t\tchild[isClean] = true;\n\t\t\t\t\t\t\tvisit.descending = true;\n\t\t\t\t\t\t\tstack.push({\n\t\t\t\t\t\t\t\teventIndex: 0,\n\t\t\t\t\t\t\t\tevents: getEvents(child),\n\t\t\t\t\t\t\t\titerator: 0,\n\t\t\t\t\t\t\t\tnode: child\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tdescended = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvisitNode.indexes[iterator] += 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (descended) continue;\n\t\t\t\t\tvisit.iterator = 0;\n\t\t\t\t\tdelete visitNode.indexes[iterator];\n\t\t\t\t}\n\t\t\t\tif (visit.eventIndex < visit.events.length) {\n\t\t\t\t\tlet event = visit.events[visit.eventIndex];\n\t\t\t\t\tvisit.eventIndex += 1;\n\t\t\t\t\tif (event === CHILDREN) {\n\t\t\t\t\t\tif (visitNode.nodes && visitNode.nodes.length) visit.iterator = visitNode.getIterator();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet visitors = this.listeners[event];\n\t\t\t\t\t\tif (visitors) {\n\t\t\t\t\t\t\tif (this.visitSync(visitors, visitNode.toProxy())) stack.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstack.pop();\n\t\t\t}\n\t\t}\n\t\twarnings() {\n\t\t\treturn this.sync().warnings();\n\t\t}\n\t};\n\tLazyResult.registerPostcss = (dependant) => {\n\t\tpostcss = dependant;\n\t};\n\tmodule.exports = LazyResult;\n\tLazyResult.default = LazyResult;\n\tRoot.registerLazyResult(LazyResult);\n\tDocument.registerLazyResult(LazyResult);\n}));\n// ../../node_modules/postcss/lib/no-work-result.js\nvar require_no_work_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar MapGenerator = require_map_generator();\n\tvar parse = require_parse();\n\tvar Result = require_result();\n\tvar stringify = require_stringify();\n\tvar warnOnce = require_warn_once();\n\tvar NoWorkResult = class {\n\t\tget content() {\n\t\t\treturn this.result.css;\n\t\t}\n\t\tget css() {\n\t\t\treturn this.result.css;\n\t\t}\n\t\tget map() {\n\t\t\treturn this.result.map;\n\t\t}\n\t\tget messages() {\n\t\t\treturn [];\n\t\t}\n\t\tget opts() {\n\t\t\treturn this.result.opts;\n\t\t}\n\t\tget processor() {\n\t\t\treturn this.result.processor;\n\t\t}\n\t\tget root() {\n\t\t\tif (this._root) return this._root;\n\t\t\tlet root;\n\t\t\tlet parser = parse;\n\t\t\ttry {\n\t\t\t\troot = parser(this._css, this._opts);\n\t\t\t} catch (error) {\n\t\t\t\tthis.error = error;\n\t\t\t}\n\t\t\tif (this.error) throw this.error;\n\t\t\telse {\n\t\t\t\tthis._root = root;\n\t\t\t\treturn root;\n\t\t\t}\n\t\t}\n\t\tget [Symbol.toStringTag]() {\n\t\t\treturn \"NoWorkResult\";\n\t\t}\n\t\tconstructor(processor, css, opts) {\n\t\t\tcss = css.toString();\n\t\t\tthis.stringified = false;\n\t\t\tthis._processor = processor;\n\t\t\tthis._css = css;\n\t\t\tthis._opts = opts;\n\t\t\tthis._map = void 0;\n\t\t\tlet str = stringify;\n\t\t\tthis.result = new Result(this._processor, void 0, this._opts);\n\t\t\tthis.result.css = css;\n\t\t\tlet self = this;\n\t\t\tObject.defineProperty(this.result, \"root\", { get() {\n\t\t\t\treturn self.root;\n\t\t\t} });\n\t\t\tlet map = new MapGenerator(str, void 0, this._opts, css);\n\t\t\tif (map.isMap()) {\n\t\t\t\tlet [generatedCSS, generatedMap] = map.generate();\n\t\t\t\tif (generatedCSS) this.result.css = generatedCSS;\n\t\t\t\tif (generatedMap) this.result.map = generatedMap;\n\t\t\t} else {\n\t\t\t\tmap.clearAnnotation();\n\t\t\t\tthis.result.css = map.css;\n\t\t\t}\n\t\t}\n\t\tasync() {\n\t\t\tif (this.error) return Promise.reject(this.error);\n\t\t\treturn Promise.resolve(this.result);\n\t\t}\n\t\tcatch(onRejected) {\n\t\t\treturn this.async().catch(onRejected);\n\t\t}\n\t\tfinally(onFinally) {\n\t\t\treturn this.async().finally(onFinally);\n\t\t}\n\t\tsync() {\n\t\t\tif (this.error) throw this.error;\n\t\t\treturn this.result;\n\t\t}\n\t\tthen(onFulfilled, onRejected) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!(\"from\" in this._opts)) warnOnce(\"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.\");\n\t\t\t}\n\t\t\treturn this.async().then(onFulfilled, onRejected);\n\t\t}\n\t\ttoString() {\n\t\t\treturn this._css;\n\t\t}\n\t\twarnings() {\n\t\t\treturn [];\n\t\t}\n\t};\n\tmodule.exports = NoWorkResult;\n\tNoWorkResult.default = NoWorkResult;\n}));\n// ../../node_modules/postcss/lib/processor.js\nvar require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Document = require_document();\n\tvar LazyResult = require_lazy_result();\n\tvar NoWorkResult = require_no_work_result();\n\tvar Root = require_root();\n\tvar Processor = class {\n\t\tconstructor(plugins = []) {\n\t\t\tthis.version = \"8.5.32\";\n\t\t\tthis.plugins = this.normalize(plugins);\n\t\t}\n\t\tnormalize(plugins) {\n\t\t\tlet normalized = [];\n\t\t\tfor (let i of plugins) {\n\t\t\t\tif (i.postcss === true) i = i();\n\t\t\t\telse if (i.postcss) i = i.postcss;\n\t\t\t\tif (typeof i === \"object\" && Array.isArray(i.plugins)) normalized = normalized.concat(i.plugins);\n\t\t\t\telse if (typeof i === \"object\" && i.postcssPlugin) normalized.push(i);\n\t\t\t\telse if (typeof i === \"function\") normalized.push(i);\n\t\t\t\telse if (typeof i === \"object\" && (i.parse || i.stringify)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(\"PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.\");\n\t\t\t\t} else throw new Error(i + \" is not a PostCSS plugin\");\n\t\t\t}\n\t\t\treturn normalized;\n\t\t}\n\t\tprocess(css, opts = {}) {\n\t\t\tif (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) return new NoWorkResult(this, css, opts);\n\t\t\telse return new LazyResult(this, css, opts);\n\t\t}\n\t\tuse(plugin) {\n\t\t\tthis.plugins = this.plugins.concat(this.normalize([plugin]));\n\t\t\treturn this;\n\t\t}\n\t};\n\tmodule.exports = Processor;\n\tProcessor.default = Processor;\n\tRoot.registerProcessor(Processor);\n\tDocument.registerProcessor(Processor);\n}));\n// ../../node_modules/postcss/lib/postcss.mjs\nvar import_postcss = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar AtRule = require_at_rule();\n\tvar Comment = require_comment();\n\tvar Container = require_container();\n\tvar CssSyntaxError = require_css_syntax_error();\n\tvar Declaration = require_declaration();\n\tvar Document = require_document();\n\tvar fromJSON = require_fromJSON();\n\tvar Input = require_input();\n\tvar LazyResult = require_lazy_result();\n\tvar list = require_list();\n\tvar Node = require_node();\n\tvar parse = require_parse();\n\tvar Processor = require_processor();\n\tvar Result = require_result();\n\tvar Root = require_root();\n\tvar Rule = require_rule();\n\tvar stringify = require_stringify();\n\tvar Warning = require_warning();\n\tfunction postcss(...plugins) {\n\t\tif (plugins.length === 1 && Array.isArray(plugins[0])) plugins = plugins[0];\n\t\treturn new Processor(plugins);\n\t}\n\tpostcss.plugin = function plugin(name, initializer) {\n\t\tlet warningPrinted = false;\n\t\tfunction creator(...args) {\n\t\t\tif (console && console.warn && !warningPrinted) {\n\t\t\t\twarningPrinted = true;\n\t\t\t\tconsole.warn(name + \": postcss.plugin was deprecated. Migration guide:\\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration\");\n\t\t\t\tif (process.env.LANG && process.env.LANG.startsWith(\"zh\"))\n /* c8 ignore next 7 */\n\t\t\t\tconsole.warn(name + \": 里面 postcss.plugin 被弃用. 迁移指南:\\nhttps://www.w3ctech.com/topic/2226\");\n\t\t\t}\n\t\t\tlet transformer = initializer(...args);\n\t\t\ttransformer.postcssPlugin = name;\n\t\t\ttransformer.postcssVersion = new Processor().version;\n\t\t\treturn transformer;\n\t\t}\n\t\tlet cache;\n\t\tObject.defineProperty(creator, \"postcss\", { get() {\n\t\t\tif (!cache) cache = creator();\n\t\t\treturn cache;\n\t\t} });\n\t\tcreator.process = function(css, processOpts, pluginOpts) {\n\t\t\treturn postcss([creator(pluginOpts)]).process(css, processOpts);\n\t\t};\n\t\treturn creator;\n\t};\n\tpostcss.stringify = stringify;\n\tpostcss.parse = parse;\n\tpostcss.fromJSON = fromJSON;\n\tpostcss.list = list;\n\tpostcss.comment = (defaults) => new Comment(defaults);\n\tpostcss.atRule = (defaults) => new AtRule(defaults);\n\tpostcss.decl = (defaults) => new Declaration(defaults);\n\tpostcss.rule = (defaults) => new Rule(defaults);\n\tpostcss.root = (defaults) => new Root(defaults);\n\tpostcss.document = (defaults) => new Document(defaults);\n\tpostcss.CssSyntaxError = CssSyntaxError;\n\tpostcss.Declaration = Declaration;\n\tpostcss.Container = Container;\n\tpostcss.Processor = Processor;\n\tpostcss.Document = Document;\n\tpostcss.Comment = Comment;\n\tpostcss.Warning = Warning;\n\tpostcss.AtRule = AtRule;\n\tpostcss.Result = Result;\n\tpostcss.Input = Input;\n\tpostcss.Rule = Rule;\n\tpostcss.Root = Root;\n\tpostcss.Node = Node;\n\tLazyResult.registerPostcss(postcss);\n\tmodule.exports = postcss;\n\tpostcss.default = postcss;\n})))(), 1);\nvar postcss_default = import_postcss.default;\nimport_postcss.default.stringify;\nimport_postcss.default.fromJSON;\nimport_postcss.default.plugin;\nimport_postcss.default.parse;\nimport_postcss.default.list;\nimport_postcss.default.document;\nimport_postcss.default.comment;\nimport_postcss.default.atRule;\nimport_postcss.default.rule;\nimport_postcss.default.decl;\nimport_postcss.default.root;\nimport_postcss.default.CssSyntaxError;\nimport_postcss.default.Declaration;\nimport_postcss.default.Container;\nimport_postcss.default.Processor;\nimport_postcss.default.Document;\nimport_postcss.default.Comment;\nimport_postcss.default.Warning;\nimport_postcss.default.AtRule;\nimport_postcss.default.Result;\nimport_postcss.default.Input;\nimport_postcss.default.Rule;\nimport_postcss.default.Root;\nimport_postcss.default.Node;\n// src/rebuild.ts\nvar tagMap = {\n\tscript: \"noscript\",\n\taltglyph: \"altGlyph\",\n\taltglyphdef: \"altGlyphDef\",\n\taltglyphitem: \"altGlyphItem\",\n\tanimatecolor: \"animateColor\",\n\tanimatemotion: \"animateMotion\",\n\tanimatetransform: \"animateTransform\",\n\tclippath: \"clipPath\",\n\tfeblend: \"feBlend\",\n\tfecolormatrix: \"feColorMatrix\",\n\tfecomponenttransfer: \"feComponentTransfer\",\n\tfecomposite: \"feComposite\",\n\tfeconvolvematrix: \"feConvolveMatrix\",\n\tfediffuselighting: \"feDiffuseLighting\",\n\tfedisplacementmap: \"feDisplacementMap\",\n\tfedistantlight: \"feDistantLight\",\n\tfedropshadow: \"feDropShadow\",\n\tfeflood: \"feFlood\",\n\tfefunca: \"feFuncA\",\n\tfefuncb: \"feFuncB\",\n\tfefuncg: \"feFuncG\",\n\tfefuncr: \"feFuncR\",\n\tfegaussianblur: \"feGaussianBlur\",\n\tfeimage: \"feImage\",\n\tfemerge: \"feMerge\",\n\tfemergenode: \"feMergeNode\",\n\tfemorphology: \"feMorphology\",\n\tfeoffset: \"feOffset\",\n\tfepointlight: \"fePointLight\",\n\tfespecularlighting: \"feSpecularLighting\",\n\tfespotlight: \"feSpotLight\",\n\tfetile: \"feTile\",\n\tfeturbulence: \"feTurbulence\",\n\tforeignobject: \"foreignObject\",\n\tglyphref: \"glyphRef\",\n\tlineargradient: \"linearGradient\",\n\tradialgradient: \"radialGradient\"\n};\nfunction getTagName(n) {\n\tlet tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;\n\tif (tagName === \"link\" && n.attributes._cssText) tagName = \"style\";\n\treturn tagName;\n}\nfunction adaptCssForReplay(cssText, cache) {\n\tconst cachedStyle = cache?.stylesWithHoverClass.get(cssText);\n\tif (cachedStyle) return cachedStyle;\n\tlet result = cssText;\n\ttry {\n\t\tresult = postcss_default([mediaSelectorPlugin, pseudoClassPlugin]).process(cssText).css;\n\t} catch (error) {\n\t\tconsole.warn(\"Failed to adapt css for replay\", error);\n\t}\n\tcache?.stylesWithHoverClass.set(cssText, result);\n\treturn result;\n}\nfunction createCache() {\n\treturn { stylesWithHoverClass: /* @__PURE__ */ new Map() };\n}\nvar REBUILD_TARGET_ERROR = \"rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.\";\nvar SANDBOXED_IFRAME_ROOT_ERROR = \"rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.\";\nvar sandboxedRebuildDocuments = /* @__PURE__ */ new WeakSet();\nfunction isSupportedSandboxedIframe(frameElement) {\n\tif (!frameElement || frameElement.tagName !== \"IFRAME\") return false;\n\tif (!(\"sandbox\" in frameElement)) return false;\n\tconst sandboxTokens = Array.from(frameElement.sandbox);\n\treturn sandboxTokens.length === 1 && sandboxTokens[0] === \"allow-same-origin\";\n}\nfunction assertRebuildTargetAllowed(options) {\n\tif (options.UNSAFE_allowUnprotectedRebuild) return;\n\tconst win = options.doc.defaultView;\n\tif (!win) return;\n\tif (sandboxedRebuildDocuments.has(options.doc) && isSupportedSandboxedIframe(win.frameElement)) return;\n\tthrow new Error(REBUILD_TARGET_ERROR);\n}\n/**\n* undo splitCssText/markCssSplits\n* (would move to utils.ts but uses `adaptCssForReplay`)\n*/\nfunction applyCssSplits(n, cssText, hackCss, cache) {\n\tconst childTextNodes = [];\n\tfor (const scn of n.childNodes) if (scn.type === NodeType.Text) childTextNodes.push(scn);\n\tconst cssTextSplits = cssText.split(\"/* rr_split */\");\n\twhile (cssTextSplits.length > 1 && cssTextSplits.length > childTextNodes.length) cssTextSplits.splice(-2, 2, cssTextSplits.slice(-2).join(\"\"));\n\tlet adaptedCss = \"\";\n\tif (hackCss) adaptedCss = adaptCssForReplay(cssTextSplits.join(\"\"), cache);\n\tlet startIndex = 0;\n\tlet errorOffset = -1;\n\tfor (let i = 0; i < childTextNodes.length; i++) {\n\t\tif (i === cssTextSplits.length) break;\n\t\tconst childTextNode = childTextNodes[i];\n\t\tlet cssTextSection = cssTextSplits[i];\n\t\tconst nextTextSection = i < cssTextSplits.length - 1 ? cssTextSplits[i + 1] : null;\n\t\tif (hackCss && nextTextSection) {\n\t\t\tlet endIndex = startIndex;\n\t\t\tlet endSearch = nextTextSection.length;\n\t\t\tendSearch = Math.min(endSearch, 30);\n\t\t\tlet found = false;\n\t\t\tfor (; endSearch > 2; endSearch--) {\n\t\t\t\tconst searchBit = nextTextSection.substring(0, endSearch);\n\t\t\t\tconst searchIndex = adaptedCss.substring(startIndex).indexOf(searchBit);\n\t\t\t\tfound = searchIndex !== -1;\n\t\t\t\tif (found) {\n\t\t\t\t\tendIndex += searchIndex;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) endIndex += cssTextSection.length;\n\t\t\tcssTextSection = adaptedCss.substring(startIndex, endIndex);\n\t\t\tstartIndex = endIndex;\n\t\t} else if (hackCss) cssTextSection = adaptedCss.substring(startIndex);\n\t\tif (errorOffset !== -1) cssTextSection = cssTextSection.substring(errorOffset);\n\t\tif (nextTextSection && (errorOffset !== -1 || cssTextSection.endsWith(\"0p\") && nextTextSection.startsWith(\"x\"))) {\n\t\t\terrorOffset = nextTextSection.indexOf(\"}\");\n\t\t\tif (errorOffset !== -1) {\n\t\t\t\terrorOffset += 1;\n\t\t\t\tcssTextSection += nextTextSection.substring(0, errorOffset);\n\t\t\t}\n\t\t}\n\t\tchildTextNode.textContent = cssTextSection;\n\t}\n}\n/**\n* Normally a <style> element has a single textNode containing the rules.\n* During serialization, we bypass this (`styleEl.sheet`) to get the rules the\n* browser sees and serialize this to a special _cssText attribute, blanking\n* out any text nodes. This function reverses that and also handles cases where\n* there were no textNode children present (dynamic css/or a <link> element) as\n* well as multiple textNodes, which need to be repopulated (based on presence of\n* a special `rr_split` marker in case they are modified by subsequent mutations.\n*/\nfunction buildStyleNode(n, styleEl, cssText, options) {\n\tconst { doc, hackCss, cache } = options;\n\tif (n.childNodes.length) applyCssSplits(n, cssText, hackCss, cache);\n\telse {\n\t\tif (hackCss) cssText = adaptCssForReplay(cssText, cache);\n\t\t/**\n\t\t<link> element or dynamic <style> are serialized without any child nodes\n\t\twe create the text node without an ID or presence in mirror as it can't\n\t\t*/\n\t\tstyleEl.appendChild(doc.createTextNode(cssText));\n\t}\n}\nfunction buildNode(n, options) {\n\tconst { doc, hackCss, cache } = options;\n\tswitch (n.type) {\n\t\tcase NodeType.Document: return doc.implementation.createDocument(null, \"\", null);\n\t\tcase NodeType.DocumentType: return doc.implementation.createDocumentType(n.name || \"html\", n.publicId, n.systemId);\n\t\tcase NodeType.Element: {\n\t\t\tconst tagName = getTagName(n);\n\t\t\tlet node;\n\t\t\tif (n.isSVG) node = doc.createElementNS(\"http://www.w3.org/2000/svg\", tagName);\n\t\t\telse {\n\t\t\t\tif (n.isCustom && doc.defaultView?.customElements && !doc.defaultView.customElements.get(n.tagName)) doc.defaultView.customElements.define(n.tagName, class extends doc.defaultView.HTMLElement {});\n\t\t\t\tnode = doc.createElement(tagName);\n\t\t\t}\n\t\t\t/**\n\t\t\t* Attribute names start with `rr_` are internal attributes added by rrweb.\n\t\t\t* They often overwrite other attributes on the element.\n\t\t\t* We need to parse them last so they can overwrite conflicting attributes.\n\t\t\t*/\n\t\t\tconst specialAttributes = {};\n\t\t\tfor (const name in n.attributes) {\n\t\t\t\tif (!Object.prototype.hasOwnProperty.call(n.attributes, name)) continue;\n\t\t\t\tlet value = n.attributes[name];\n\t\t\t\tif (tagName === \"option\" && name === \"selected\" && value === false) continue;\n\t\t\t\tif (value === null) continue;\n\t\t\t\t/**\n\t\t\t\t* Boolean attributes are considered to be true if they're present on the element at all.\n\t\t\t\t* We should set value to the empty string (\"\") or the attribute's name, with no leading or trailing whitespace.\n\t\t\t\t* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute#parameters\n\t\t\t\t*/\n\t\t\t\tif (value === true) value = \"\";\n\t\t\t\tif (name.startsWith(\"rr_\")) {\n\t\t\t\t\tspecialAttributes[name] = value;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (typeof value !== \"string\") {} else if (tagName === \"style\" && name === \"_cssText\") {\n\t\t\t\t\tbuildStyleNode(n, node, value, options);\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (tagName === \"textarea\" && name === \"value\") {\n\t\t\t\t\tnode.appendChild(doc.createTextNode(value));\n\t\t\t\t\tn.childNodes = [];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tif (n.isSVG && name === \"xlink:href\") node.setAttributeNS(\"http://www.w3.org/1999/xlink\", name, value.toString());\n\t\t\t\t\telse if (name === \"onload\" || name === \"onclick\" || name.substring(0, 7) === \"onmouse\") node.setAttribute(\"_\" + name, value.toString());\n\t\t\t\t\telse if (tagName === \"meta\" && n.attributes[\"http-equiv\"] === \"Content-Security-Policy\" && name === \"content\") {\n\t\t\t\t\t\tnode.setAttribute(\"csp-content\", value.toString());\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (tagName === \"link\" && (n.attributes.rel === \"preload\" && n.attributes.as === \"script\" || n.attributes.rel === \"modulepreload\")) {} else if (tagName === \"link\" && n.attributes.rel === \"prefetch\" && typeof n.attributes.href === \"string\" && extractFileExtension(n.attributes.href) === \"js\") {} else if (tagName === \"img\" && n.attributes.srcset && n.attributes.rr_dataURL) node.setAttribute(\"rrweb-original-srcset\", n.attributes.srcset);\n\t\t\t\t\telse node.setAttribute(name, value.toString());\n\t\t\t\t} catch (error) {}\n\t\t\t}\n\t\t\tfor (const name in specialAttributes) {\n\t\t\t\tconst value = specialAttributes[name];\n\t\t\t\tif (tagName === \"canvas\" && name === \"rr_dataURL\") {\n\t\t\t\t\tconst image = doc.createElement(\"img\");\n\t\t\t\t\timage.onload = () => {\n\t\t\t\t\t\tconst ctx = node.getContext(\"2d\");\n\t\t\t\t\t\tif (ctx) ctx.drawImage(image, 0, 0, image.width, image.height);\n\t\t\t\t\t};\n\t\t\t\t\timage.src = value.toString();\n\t\t\t\t\tif (node.RRNodeType) node.rr_dataURL = value.toString();\n\t\t\t\t} else if (tagName === \"img\" && name === \"rr_dataURL\") {\n\t\t\t\t\tconst image = node;\n\t\t\t\t\tif (!image.currentSrc.startsWith(\"data:\")) {\n\t\t\t\t\t\timage.setAttribute(\"rrweb-original-src\", n.attributes.src);\n\t\t\t\t\t\timage.src = value.toString();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (name === \"rr_width\") node.style.setProperty(\"width\", value.toString());\n\t\t\t\telse if (name === \"rr_height\") node.style.setProperty(\"height\", value.toString());\n\t\t\t\telse if (name === \"rr_mediaCurrentTime\" && typeof value === \"number\") node.currentTime = value;\n\t\t\t\telse if (name === \"rr_mediaState\") switch (value) {\n\t\t\t\t\tcase \"played\":\n\t\t\t\t\t\tnode.play().catch((e) => console.warn(\"media playback error\", e));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"paused\": node.pause();\n\t\t\t\t}\n\t\t\t\telse if (name === \"rr_mediaPlaybackRate\" && typeof value === \"number\") node.playbackRate = value;\n\t\t\t\telse if (name === \"rr_mediaMuted\" && typeof value === \"boolean\") node.muted = value;\n\t\t\t\telse if (name === \"rr_mediaLoop\" && typeof value === \"boolean\") node.loop = value;\n\t\t\t\telse if (name === \"rr_mediaVolume\" && typeof value === \"number\") node.volume = value;\n\t\t\t\telse if (name === \"rr_open_mode\") node.setAttribute(\"rr_open_mode\", value);\n\t\t\t}\n\t\t\tif (n.isShadowHost) {\n\t\t\t\t/**\n\t\t\t\t* Since node is newly rebuilt, it should be a normal element\n\t\t\t\t* without shadowRoot.\n\t\t\t\t* But if there are some weird situations that has defined\n\t\t\t\t* custom element in the scope before we rebuild node, it may\n\t\t\t\t* register the shadowRoot earlier.\n\t\t\t\t* The logic in the 'else' block is just a try-my-best solution\n\t\t\t\t* for the corner case, please let we know if it is wrong and\n\t\t\t\t* we can remove it.\n\t\t\t\t*/\n\t\t\t\tif (!node.shadowRoot) node.attachShadow({ mode: \"open\" });\n\t\t\t\telse while (node.shadowRoot.firstChild) node.shadowRoot.removeChild(node.shadowRoot.firstChild);\n\t\t\t}\n\t\t\tif (tagName === \"input\" || tagName === \"textarea\") node.setAttribute(\"autocomplete\", \"off\");\n\t\t\treturn node;\n\t\t}\n\t\tcase NodeType.Text:\n\t\t\tif (n.isStyle && hackCss) return doc.createTextNode(adaptCssForReplay(n.textContent, cache));\n\t\t\treturn doc.createTextNode(n.textContent);\n\t\tcase NodeType.CDATA: return doc.createCDATASection(n.textContent);\n\t\tcase NodeType.Comment: return doc.createComment(n.textContent);\n\t\tdefault: return null;\n\t}\n}\nfunction buildNodeWithSN(n, options) {\n\tconst { doc, mirror, skipChild = false, hackCss = true, afterAppend, cache } = options;\n\t/**\n\t* Add a check to see if the node is already in the mirror. If it is, we can skip the whole process.\n\t* This situation (duplicated nodes) can happen when recorder has some unfixed bugs and the same node is recorded twice. Or something goes wrong when saving or transferring event data.\n\t* Duplicated node creation may cause unexpected errors in replayer. This check tries best effort to prevent the errors.\n\t*/\n\tif (mirror.has(n.id)) {\n\t\tconst nodeInMirror = mirror.getNode(n.id);\n\t\tif (isNodeMetaEqual(mirror.getMeta(nodeInMirror), n)) return mirror.getNode(n.id);\n\t}\n\tlet node = buildNode(n, {\n\t\tdoc,\n\t\thackCss,\n\t\tcache\n\t});\n\tif (!node) return null;\n\tif (n.rootId && mirror.getNode(n.rootId) !== doc) mirror.replace(n.rootId, doc);\n\tif (n.type === NodeType.Document) {\n\t\tdoc.close();\n\t\tdoc.open();\n\t\tif (n.compatMode === \"BackCompat\" && n.childNodes && n.childNodes[0].type !== NodeType.DocumentType) {\n\t\t\tif (n.childNodes[0].type === NodeType.Element && \"xmlns\" in n.childNodes[0].attributes && n.childNodes[0].attributes.xmlns === \"http://www.w3.org/1999/xhtml\") doc.write(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"\\\">\");\n\t\t\telse doc.write(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD HTML 4.0 Transitional//EN\\\" \\\"\\\">\");\n\t\t}\n\t\tnode = doc;\n\t}\n\tmirror.add(node, n);\n\tif ((n.type === NodeType.Document || n.type === NodeType.Element) && !skipChild) for (const childN of n.childNodes) {\n\t\tconst childNode = buildNodeWithSN(childN, {\n\t\t\tdoc,\n\t\t\tmirror,\n\t\t\tskipChild: false,\n\t\t\thackCss,\n\t\t\tafterAppend,\n\t\t\tcache\n\t\t});\n\t\tif (!childNode) {\n\t\t\tconsole.warn(\"Failed to rebuild\", childN);\n\t\t\tcontinue;\n\t\t}\n\t\tif (childN.isShadow && isElement(node) && node.shadowRoot) node.shadowRoot.appendChild(childNode);\n\t\telse if (n.type === NodeType.Document && childN.type == NodeType.Element) {\n\t\t\tconst htmlElement = childNode;\n\t\t\tlet body = null;\n\t\t\thtmlElement.childNodes.forEach((child) => {\n\t\t\t\tif (child.nodeName === \"BODY\") body = child;\n\t\t\t});\n\t\t\tif (body) {\n\t\t\t\thtmlElement.removeChild(body);\n\t\t\t\tnode.appendChild(childNode);\n\t\t\t\thtmlElement.appendChild(body);\n\t\t\t} else node.appendChild(childNode);\n\t\t} else node.appendChild(childNode);\n\t\tif (afterAppend) afterAppend(childNode, childN.id);\n\t}\n\treturn node;\n}\nfunction visit(mirror, onVisit) {\n\tfunction walk(node) {\n\t\tonVisit(node);\n\t}\n\tfor (const id of mirror.getIds()) if (mirror.has(id)) walk(mirror.getNode(id));\n}\nfunction handleScroll(node, mirror) {\n\tconst n = mirror.getMeta(node);\n\tif (n?.type !== NodeType.Element) return;\n\tconst el = node;\n\tfor (const name in n.attributes) {\n\t\tif (!(Object.prototype.hasOwnProperty.call(n.attributes, name) && name.startsWith(\"rr_\"))) continue;\n\t\tconst value = n.attributes[name];\n\t\tif (name === \"rr_scrollLeft\") el.scrollLeft = value;\n\t\tif (name === \"rr_scrollTop\") el.scrollTop = value;\n\t}\n}\nfunction rebuild(n, options) {\n\tassertRebuildTargetAllowed(options);\n\tconst { doc, onVisit, hackCss = true, afterAppend, cache, mirror = new Mirror() } = options;\n\tconst node = buildNodeWithSN(n, {\n\t\tdoc,\n\t\tmirror,\n\t\tskipChild: false,\n\t\thackCss,\n\t\tafterAppend,\n\t\tcache\n\t});\n\tvisit(mirror, (visitedNode) => {\n\t\tif (onVisit) onVisit(visitedNode);\n\t\thandleScroll(visitedNode, mirror);\n\t});\n\treturn node;\n}\n/**\n* Create and append an iframe configured for protected snapshot rebuilds.\n*\n* The `root` option must be connected to a document. The returned iframe is\n* appended to `root`, tracked as an allowed rebuild target, and forced to use\n* exactly `sandbox=\"allow-same-origin\"`. A caller-provided `sandbox` attribute\n* is ignored so replay data cannot weaken or expand the sandbox policy.\n*\n* Use this helper, or `rebuildIntoSandboxedIframe()`, when preparing a target\n* for untrusted replay data.\n*/\nfunction createSandboxedIframe(options) {\n\tif (!options.root.isConnected) throw new Error(SANDBOXED_IFRAME_ROOT_ERROR);\n\tconst iframe = options.root.ownerDocument.createElement(\"iframe\");\n\tfor (const [name, value] of Object.entries(options.iframeAttributes || {})) {\n\t\tif (name === \"sandbox\") continue;\n\t\tiframe.setAttribute(name, value);\n\t}\n\tiframe.setAttribute(\"sandbox\", \"allow-same-origin\");\n\toptions.root.appendChild(iframe);\n\tconst doc = iframe.contentDocument;\n\tif (!doc || !iframe.contentWindow) {\n\t\tiframe.parentNode?.removeChild(iframe);\n\t\tthrow new Error(SANDBOXED_IFRAME_ROOT_ERROR);\n\t}\n\tsandboxedRebuildDocuments.add(doc);\n\treturn iframe;\n}\n/**\n* Rebuild a serialized snapshot into a newly created sandboxed iframe.\n*\n* This is the preferred helper for untrusted replay data. It creates an iframe\n* with `sandbox` forced to exactly `allow-same-origin`, rebuilds into that\n* iframe's document, and returns both the iframe and rebuilt root node. If the\n* rebuild fails, the newly appended iframe is removed before the error is\n* rethrown.\n*/\nfunction rebuildIntoSandboxedIframe(n, options) {\n\tconst iframe = createSandboxedIframe(options);\n\tconst doc = iframe.contentDocument;\n\tlet node;\n\ttry {\n\t\tnode = rebuild(n, {\n\t\t\t...options,\n\t\t\tdoc\n\t\t});\n\t} catch (error) {\n\t\tiframe.parentNode?.removeChild(iframe);\n\t\tthrow error;\n\t}\n\treturn {\n\t\tiframe,\n\t\tnode\n\t};\n}\nexport { IGNORED_NODE, Mirror, absolutifyURLs, adaptCssForReplay, buildNodeWithSN, classMatchesRegex, cleanupSnapshot, createCache, createMirror, createSandboxedIframe, escapeImportStatement, extractFileExtension, fixSafariColons, genId, getInputType, ignoreAttribute, is2DCanvasBlank, isCSSImportRule, isCSSStyleRule, isElement, isNativeShadowDom, isNodeMetaEqual, isShadowRoot, markCssSplits, maskInputValue, needMaskingText, normalizeCssString, rebuild, rebuildIntoSandboxedIframe, serializeNodeWithId, slimDOMDefaults, snapshot, splitCssText, stringifyRule, stringifyStylesheet, toLowerCase, transformAttribute, visitSnapshot };\n\n//# sourceMappingURL=rrweb-snapshot.js.map", "// ../rrweb-snapshot/dist/rrweb-snapshot.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, \"default\") ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\nvar testableAccessors = {\n\tNode: [\n\t\t\"childNodes\",\n\t\t\"parentNode\",\n\t\t\"parentElement\",\n\t\t\"textContent\",\n\t\t\"ownerDocument\",\n\t\t\"firstChild\",\n\t\t\"lastChild\",\n\t\t\"nextSibling\",\n\t\t\"previousSibling\"\n\t],\n\tShadowRoot: [\"host\", \"styleSheets\"],\n\tElement: [\n\t\t\"shadowRoot\",\n\t\t\"querySelector\",\n\t\t\"querySelectorAll\"\n\t],\n\tMutationObserver: []\n};\nvar testableMethods = {\n\tNode: [\"contains\", \"getRootNode\"],\n\tShadowRoot: [\"getSelection\"],\n\tElement: [],\n\tMutationObserver: [\"constructor\"]\n};\nvar untaintedBasePrototype = {};\nvar untaintedBaseIframeCleanup = {};\nvar mutationObserverUsers = 0;\nfunction angularZoneUnpatchedAlternative(key) {\n\tconst angularUnpatchedVersionSymbol = globalThis?.Zone?.__symbol__?.(key);\n\tif (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) return globalThis[angularUnpatchedVersionSymbol];\n\telse return;\n}\nfunction getUntaintedPrototype(key) {\n\tif (untaintedBasePrototype[key]) return untaintedBasePrototype[key];\n\tconst defaultObj = angularZoneUnpatchedAlternative(key) || globalThis[key];\n\tconst defaultPrototype = defaultObj.prototype;\n\tconst accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;\n\tconst isUntaintedAccessors = Boolean(accessorNames && accessorNames.every((accessor) => Boolean(Object.getOwnPropertyDescriptor(defaultPrototype, accessor)?.get?.toString().includes(\"[native code]\"))));\n\tconst methodNames = key in testableMethods ? testableMethods[key] : void 0;\n\tconst isUntaintedMethods = Boolean(methodNames && methodNames.every((method) => typeof defaultPrototype[method] === \"function\" && defaultPrototype[method]?.toString().includes(\"[native code]\")));\n\tif (isUntaintedAccessors && isUntaintedMethods) {\n\t\tuntaintedBasePrototype[key] = defaultObj.prototype;\n\t\treturn defaultObj.prototype;\n\t}\n\ttry {\n\t\tconst iframeEl = document.createElement(\"iframe\");\n\t\tiframeEl.style.display = \"none\";\n\t\tdocument.body.appendChild(iframeEl);\n\t\tconst win = iframeEl.contentWindow;\n\t\tif (!win) return defaultObj.prototype;\n\t\tconst untaintedObject = win[key].prototype;\n\t\tif (!untaintedObject) {\n\t\t\tiframeEl.remove();\n\t\t\treturn defaultPrototype;\n\t\t}\n\t\tconst ua = navigator.userAgent;\n\t\tif (ua.includes(\"Safari\") && !ua.includes(\"Chrome\")) {\n\t\t\tiframeEl.classList.add(\"rr-block\");\n\t\t\tiframeEl.setAttribute(\"__rrwebUntaintedMutationObserver\", \"\");\n\t\t\tuntaintedBaseIframeCleanup[key] = () => iframeEl.remove();\n\t\t} else iframeEl.remove();\n\t\treturn untaintedBasePrototype[key] = untaintedObject;\n\t} catch {\n\t\treturn defaultPrototype;\n\t}\n}\nvar untaintedAccessorCache = {};\nfunction getUntaintedAccessor(key, instance, accessor) {\n\tconst cached = untaintedAccessorCache[key]?.[accessor];\n\tif (cached) return cached.call(instance);\n\tconst untaintedPrototype = getUntaintedPrototype(key);\n\tconst untaintedAccessor = Object.getOwnPropertyDescriptor(untaintedPrototype, accessor)?.get;\n\tif (!untaintedAccessor) return instance[accessor];\n\t(untaintedAccessorCache[key] ||= {})[accessor] = untaintedAccessor;\n\treturn untaintedAccessor.call(instance);\n}\nvar untaintedMethodCache = {};\nfunction getUntaintedMethod(key, instance, method) {\n\tconst cacheKey = `${key}.${String(method)}`;\n\tif (untaintedMethodCache[cacheKey]) return untaintedMethodCache[cacheKey].bind(instance);\n\tconst untaintedMethod = getUntaintedPrototype(key)[method];\n\tif (typeof untaintedMethod !== \"function\") return instance[method];\n\tuntaintedMethodCache[cacheKey] = untaintedMethod;\n\treturn untaintedMethod.bind(instance);\n}\nfunction ownerDocument(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"ownerDocument\");\n}\nfunction childNodes(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"childNodes\");\n}\nfunction parentNode(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"parentNode\");\n}\nfunction parentElement(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"parentElement\");\n}\nfunction textContent(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"textContent\");\n}\nfunction firstChild(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"firstChild\");\n}\nfunction lastChild(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"lastChild\");\n}\nfunction nextSibling(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"nextSibling\");\n}\nfunction previousSibling(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"previousSibling\");\n}\nfunction contains(n, other) {\n\treturn getUntaintedMethod(\"Node\", n, \"contains\")(other);\n}\nfunction getRootNode(n) {\n\treturn getUntaintedMethod(\"Node\", n, \"getRootNode\")();\n}\nfunction host(n) {\n\tif (!n || !(\"host\" in n)) return null;\n\treturn getUntaintedAccessor(\"ShadowRoot\", n, \"host\");\n}\nfunction styleSheets(n) {\n\treturn n.styleSheets;\n}\nfunction shadowRoot(n) {\n\tif (!n || !(\"shadowRoot\" in n)) return null;\n\treturn getUntaintedAccessor(\"Element\", n, \"shadowRoot\");\n}\nfunction querySelector(n, selectors) {\n\treturn getUntaintedAccessor(\"Element\", n, \"querySelector\")(selectors);\n}\nfunction querySelectorAll(n, selectors) {\n\treturn getUntaintedAccessor(\"Element\", n, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor() {\n\tconst prototype = getUntaintedPrototype(\"MutationObserver\");\n\tmutationObserverUsers++;\n\tlet stopCalled = false;\n\treturn [prototype.constructor, () => {\n\t\tif (stopCalled) return;\n\t\tstopCalled = true;\n\t\tif (--mutationObserverUsers !== 0) return;\n\t\tconst cleanup = untaintedBaseIframeCleanup[\"MutationObserver\"];\n\t\tif (!cleanup) return;\n\t\ttry {\n\t\t\tcleanup();\n\t\t} finally {\n\t\t\tdelete untaintedBasePrototype[\"MutationObserver\"];\n\t\t\tdelete untaintedBaseIframeCleanup[\"MutationObserver\"];\n\t\t}\n\t}];\n}\nvar nowTimestamp = Date.now;\nif (!/*@__PURE__*/ /[1-9][0-9]{12}/.test(Date.now().toString())) nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\nfunction patch(source, name, replacement) {\n\ttry {\n\t\tif (!(name in source)) return () => {};\n\t\tconst original = source[name];\n\t\tconst wrapped = replacement(original);\n\t\tif (typeof wrapped === \"function\") {\n\t\t\twrapped.prototype = wrapped.prototype || {};\n\t\t\tObject.defineProperties(wrapped, { __rrweb_original__: {\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: original\n\t\t\t} });\n\t\t}\n\t\tsource[name] = wrapped;\n\t\treturn () => {\n\t\t\tsource[name] = original;\n\t\t};\n\t} catch {\n\t\treturn () => {};\n\t}\n}\nvar src_default = {\n\townerDocument,\n\tchildNodes,\n\tparentNode,\n\tparentElement,\n\ttextContent,\n\tfirstChild,\n\tlastChild,\n\tnextSibling,\n\tpreviousSibling,\n\tcontains,\n\tgetRootNode,\n\thost,\n\tstyleSheets,\n\tshadowRoot,\n\tquerySelector,\n\tquerySelectorAll,\n\tnowTimestamp,\n\tmutationObserverCtor,\n\tpatch\n};\nvar Mirror$1 = class {\n\tidNodeMap = /* @__PURE__ */ new Map();\n\tnodeMetaMap = /* @__PURE__ */ new WeakMap();\n\tgetId(n) {\n\t\tif (!n) return -1;\n\t\treturn this.getMeta(n)?.id ?? -1;\n\t}\n\tgetNode(id) {\n\t\treturn this.idNodeMap.get(id) || null;\n\t}\n\tgetIds() {\n\t\treturn Array.from(this.idNodeMap.keys());\n\t}\n\tgetMeta(n) {\n\t\treturn this.nodeMetaMap.get(n) || null;\n\t}\n\tremoveNodeFromMap(n) {\n\t\tconst id = this.getId(n);\n\t\tthis.idNodeMap.delete(id);\n\t\tif (n.childNodes) n.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\n\t\tconst shadowRoot = src_default.shadowRoot(n);\n\t\tif (shadowRoot) this.removeNodeFromMap(shadowRoot);\n\t}\n\thas(id) {\n\t\treturn this.idNodeMap.has(id);\n\t}\n\thasNode(node) {\n\t\treturn this.nodeMetaMap.has(node);\n\t}\n\tadd(n, meta) {\n\t\tconst id = meta.id;\n\t\tthis.idNodeMap.set(id, n);\n\t\tthis.nodeMetaMap.set(n, meta);\n\t}\n\treplace(id, n) {\n\t\tconst oldNode = this.getNode(id);\n\t\tif (oldNode) {\n\t\t\tconst meta = this.nodeMetaMap.get(oldNode);\n\t\t\tif (meta) this.nodeMetaMap.set(n, meta);\n\t\t}\n\t\tthis.idNodeMap.set(id, n);\n\t}\n\treset() {\n\t\tthis.idNodeMap = /* @__PURE__ */ new Map();\n\t\tthis.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n\t}\n};\nfunction createMirror$1() {\n\treturn new Mirror$1();\n}\nvar cssNormalizeBase = \"(?:/\\\\*[^*]*\\\\*/)|[\\\\s;]\";\nnew RegExp(`${cssNormalizeBase}|\\\\b(0)px?`, \"g\");\nnew RegExp(cssNormalizeBase, \"g\");\nnew RegExp(/(max|min)-device-(width|height)/.source, \"g\");\nvar require_picocolors_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar x = String;\n\tvar create = function() {\n\t\treturn {\n\t\t\tisColorSupported: false,\n\t\t\treset: x,\n\t\t\tbold: x,\n\t\t\tdim: x,\n\t\t\titalic: x,\n\t\t\tunderline: x,\n\t\t\tinverse: x,\n\t\t\thidden: x,\n\t\t\tstrikethrough: x,\n\t\t\tblack: x,\n\t\t\tred: x,\n\t\t\tgreen: x,\n\t\t\tyellow: x,\n\t\t\tblue: x,\n\t\t\tmagenta: x,\n\t\t\tcyan: x,\n\t\t\twhite: x,\n\t\t\tgray: x,\n\t\t\tbgBlack: x,\n\t\t\tbgRed: x,\n\t\t\tbgGreen: x,\n\t\t\tbgYellow: x,\n\t\t\tbgBlue: x,\n\t\t\tbgMagenta: x,\n\t\t\tbgCyan: x,\n\t\t\tbgWhite: x,\n\t\t\tblackBright: x,\n\t\t\tredBright: x,\n\t\t\tgreenBright: x,\n\t\t\tyellowBright: x,\n\t\t\tblueBright: x,\n\t\t\tmagentaBright: x,\n\t\t\tcyanBright: x,\n\t\t\twhiteBright: x,\n\t\t\tbgBlackBright: x,\n\t\t\tbgRedBright: x,\n\t\t\tbgGreenBright: x,\n\t\t\tbgYellowBright: x,\n\t\t\tbgBlueBright: x,\n\t\t\tbgMagentaBright: x,\n\t\t\tbgCyanBright: x,\n\t\t\tbgWhiteBright: x\n\t\t};\n\t};\n\tmodule.exports = create();\n\tmodule.exports.createColors = create;\n}));\nvar require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {};\n}));\nvar require_css_syntax_error = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar pico = require_picocolors_browser();\n\tvar terminalHighlight = require___vite_browser_external();\n\tvar CssSyntaxError = class CssSyntaxError extends Error {\n\t\tconstructor(message, line, column, source, file, plugin) {\n\t\t\tsuper(message);\n\t\t\tthis.name = \"CssSyntaxError\";\n\t\t\tthis.reason = message;\n\t\t\tif (file) this.file = file;\n\t\t\tif (source) this.source = source;\n\t\t\tif (plugin) this.plugin = plugin;\n\t\t\tif (typeof line !== \"undefined\" && typeof column !== \"undefined\") {\n\t\t\t\tif (typeof line === \"number\") {\n\t\t\t\t\tthis.line = line;\n\t\t\t\t\tthis.column = column;\n\t\t\t\t} else {\n\t\t\t\t\tthis.line = line.line;\n\t\t\t\t\tthis.column = line.column;\n\t\t\t\t\tthis.endLine = column.line;\n\t\t\t\t\tthis.endColumn = column.column;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setMessage();\n\t\t\tif (Error.captureStackTrace) Error.captureStackTrace(this, CssSyntaxError);\n\t\t}\n\t\tsetMessage() {\n\t\t\tthis.message = this.plugin ? this.plugin + \": \" : \"\";\n\t\t\tthis.message += this.file ? this.file : \"<css input>\";\n\t\t\tif (typeof this.line !== \"undefined\") this.message += \":\" + this.line + \":\" + this.column;\n\t\t\tthis.message += \": \" + this.reason;\n\t\t}\n\t\tshowSourceCode(color) {\n\t\t\tif (!this.source) return \"\";\n\t\t\tlet css = this.source;\n\t\t\tif (color == null) color = pico.isColorSupported;\n\t\t\tlet aside = (text) => text;\n\t\t\tlet mark = (text) => text;\n\t\t\tlet highlight = (text) => text;\n\t\t\tif (color) {\n\t\t\t\tlet { bold, gray, red } = pico.createColors(true);\n\t\t\t\tmark = (text) => bold(red(text));\n\t\t\t\taside = (text) => gray(text);\n\t\t\t\tif (terminalHighlight) highlight = (text) => terminalHighlight(text);\n\t\t\t}\n\t\t\tlet lines = css.split(/\\r?\\n/);\n\t\t\tlet start = Math.max(this.line - 3, 0);\n\t\t\tlet end = Math.min(this.line + 2, lines.length);\n\t\t\tlet maxWidth = String(end).length;\n\t\t\treturn lines.slice(start, end).map((line, index) => {\n\t\t\t\tlet number = start + 1 + index;\n\t\t\t\tlet gutter = \" \" + (\" \" + number).slice(-maxWidth) + \" | \";\n\t\t\t\tif (number === this.line) {\n\t\t\t\t\tif (line.length > 160) {\n\t\t\t\t\t\tlet padding = 20;\n\t\t\t\t\t\tlet subLineStart = Math.max(0, this.column - padding);\n\t\t\t\t\t\tlet subLineEnd = Math.max(this.column + padding, this.endColumn + padding);\n\t\t\t\t\t\tlet subLine = line.slice(subLineStart, subLineEnd);\n\t\t\t\t\t\tlet spacing = aside(gutter.replace(/\\d/g, \" \")) + line.slice(0, Math.min(this.column - 1, 19)).replace(/[^\\t]/g, \" \");\n\t\t\t\t\t\treturn mark(\">\") + aside(gutter) + highlight(subLine) + \"\\n \" + spacing + mark(\"^\");\n\t\t\t\t\t}\n\t\t\t\t\tlet spacing = aside(gutter.replace(/\\d/g, \" \")) + line.slice(0, this.column - 1).replace(/[^\\t]/g, \" \");\n\t\t\t\t\treturn mark(\">\") + aside(gutter) + highlight(line) + \"\\n \" + spacing + mark(\"^\");\n\t\t\t\t}\n\t\t\t\treturn \" \" + aside(gutter) + highlight(line);\n\t\t\t}).join(\"\\n\");\n\t\t}\n\t\ttoString() {\n\t\t\tlet code = this.showSourceCode();\n\t\t\tif (code) code = \"\\n\\n\" + code + \"\\n\";\n\t\t\treturn this.name + \": \" + this.message + code;\n\t\t}\n\t};\n\tmodule.exports = CssSyntaxError;\n\tCssSyntaxError.default = CssSyntaxError;\n}));\nvar require_stringifier = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar AT_NAME_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/;\n\tvar DEFAULT_RAW = {\n\t\tafter: \"\\n\",\n\t\tbeforeClose: \"\\n\",\n\t\tbeforeComment: \"\\n\",\n\t\tbeforeDecl: \"\\n\",\n\t\tbeforeOpen: \" \",\n\t\tbeforeRule: \"\\n\",\n\t\tcolon: \": \",\n\t\tcommentLeft: \" \",\n\t\tcommentRight: \" \",\n\t\temptyBody: \"\",\n\t\tindent: \"    \",\n\t\tsemicolon: false\n\t};\n\tfunction capitalize(str) {\n\t\treturn str[0].toUpperCase() + str.slice(1);\n\t}\n\tfunction atruleStart(str, node) {\n\t\tlet name = \"@\" + node.name;\n\t\tlet params = node.params ? str.rawValue(node, \"params\") : \"\";\n\t\tlet afterName = node.raws.afterName;\n\t\tif (typeof afterName === \"undefined\") afterName = params ? \" \" : \"\";\n\t\telse if (afterName === \"\" && params && !AT_NAME_END.test(params[0])) afterName = \" \";\n\t\treturn name + afterName + params;\n\t}\n\tfunction isCustomProperty(node) {\n\t\tif (!node.prop.startsWith(\"--\")) return false;\n\t\tlet before = node.raws.before;\n\t\treturn typeof before === \"undefined\" || !/[^\\s;]$/.test(before);\n\t}\n\tfunction pushBody(str, stack, node) {\n\t\tlet nodes = node.nodes;\n\t\tlet last = nodes.length - 1;\n\t\twhile (last > 0) {\n\t\t\tif (nodes[last].type !== \"comment\") break;\n\t\t\tlast -= 1;\n\t\t}\n\t\tlet semicolon = str.raw(node, \"semicolon\");\n\t\tlet isDocument = node.type === \"document\";\n\t\tfor (let i = nodes.length - 1; i >= 0; i--) {\n\t\t\tlet child = nodes[i];\n\t\t\tlet childSemicolon = last !== i || semicolon;\n\t\t\tif (!childSemicolon && i < nodes.length - 1 && (child.type === \"atrule\" && !child.nodes || child.type === \"decl\" && isCustomProperty(child))) childSemicolon = true;\n\t\t\tstack.push({\n\t\t\t\tdocument: isDocument,\n\t\t\t\tnode: child,\n\t\t\t\tsemicolon: childSemicolon\n\t\t\t});\n\t\t}\n\t}\n\tfunction pushBlock(str, stack, node, start) {\n\t\tlet between = str.raw(node, \"between\", \"beforeOpen\");\n\t\tstr.builder(start + between + \"{\", node, \"start\");\n\t\tlet hasNodes = node.nodes && node.nodes.length;\n\t\tlet close = () => {\n\t\t\tlet after = hasNodes ? str.raw(node, \"after\") : str.raw(node, \"after\", \"emptyBody\");\n\t\t\tif (after) str.builder(after);\n\t\t\tstr.builder(\"}\", node, \"end\");\n\t\t\tif (node.type === \"rule\" && node.raws.ownSemicolon) str.builder(node.raws.ownSemicolon, node, \"end\");\n\t\t};\n\t\tif (hasNodes) {\n\t\t\tstack.push(close);\n\t\t\tpushBody(str, stack, node);\n\t\t} else close();\n\t}\n\tvar Stringifier = class Stringifier {\n\t\tconstructor(builder) {\n\t\t\tthis.builder = builder;\n\t\t}\n\t\tatrule(node, semicolon) {\n\t\t\tlet start = atruleStart(this, node);\n\t\t\tif (node.nodes) this.block(node, start);\n\t\t\telse {\n\t\t\t\tlet end = (node.raws.between || \"\") + (semicolon ? \";\" : \"\");\n\t\t\t\tthis.builder(start + end, node);\n\t\t\t}\n\t\t}\n\t\tbeforeAfter(node, detect) {\n\t\t\tlet value;\n\t\t\tif (node.type === \"decl\") value = this.raw(node, null, \"beforeDecl\");\n\t\t\telse if (node.type === \"comment\") value = this.raw(node, null, \"beforeComment\");\n\t\t\telse if (detect === \"before\") value = this.raw(node, null, \"beforeRule\");\n\t\t\telse value = this.raw(node, null, \"beforeClose\");\n\t\t\tlet buf = node.parent;\n\t\t\tlet depth = 0;\n\t\t\twhile (buf && buf.type !== \"root\") {\n\t\t\t\tdepth += 1;\n\t\t\t\tbuf = buf.parent;\n\t\t\t}\n\t\t\tif (value.includes(\"\\n\")) {\n\t\t\t\tlet indent = this.raw(node, null, \"indent\");\n\t\t\t\tif (indent.length) for (let step = 0; step < depth; step++) value += indent;\n\t\t\t}\n\t\t\treturn value;\n\t\t}\n\t\tblock(node, start) {\n\t\t\tlet between = this.raw(node, \"between\", \"beforeOpen\");\n\t\t\tthis.builder(start + between + \"{\", node, \"start\");\n\t\t\tlet after;\n\t\t\tif (node.nodes && node.nodes.length) {\n\t\t\t\tthis.body(node);\n\t\t\t\tafter = this.raw(node, \"after\");\n\t\t\t} else after = this.raw(node, \"after\", \"emptyBody\");\n\t\t\tif (after) this.builder(after);\n\t\t\tthis.builder(\"}\", node, \"end\");\n\t\t}\n\t\tbody(node) {\n\t\t\tlet proto = Stringifier.prototype;\n\t\t\tlet expandable = [\n\t\t\t\t\"atrule\",\n\t\t\t\t\"block\",\n\t\t\t\t\"body\",\n\t\t\t\t\"rule\",\n\t\t\t\t\"stringify\"\n\t\t\t].every((method) => this[method] === proto[method]);\n\t\t\tlet stack = [];\n\t\t\tpushBody(this, stack, node);\n\t\t\twhile (stack.length > 0) {\n\t\t\t\tlet entry = stack.pop();\n\t\t\t\tif (typeof entry === \"function\") {\n\t\t\t\t\tentry();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlet child = entry.node;\n\t\t\t\tlet before = this.raw(child, \"before\");\n\t\t\t\tif (before) this.builder(before);\n\t\t\t\tif (expandable && child.type === \"rule\") pushBlock(this, stack, child, this.rawValue(child, \"selector\"));\n\t\t\t\telse if (expandable && child.type === \"atrule\" && child.nodes) pushBlock(this, stack, child, atruleStart(this, child));\n\t\t\t\telse this.stringify(child, entry.semicolon);\n\t\t\t}\n\t\t}\n\t\tcomment(node) {\n\t\t\tlet left = this.raw(node, \"left\", \"commentLeft\");\n\t\t\tlet right = this.raw(node, \"right\", \"commentRight\");\n\t\t\tthis.builder(\"/*\" + left + node.text + right + \"*/\", node);\n\t\t}\n\t\tdecl(node, semicolon) {\n\t\t\tlet raws = node.raws;\n\t\t\tlet between = this.raw(node, \"between\", \"colon\");\n\t\t\tlet string = node.prop + between + this.rawValue(node, \"value\");\n\t\t\tif (node.important) string += raws.important || \" !important\";\n\t\t\tif (semicolon) string += \";\";\n\t\t\tthis.builder(string, node);\n\t\t}\n\t\tdocument(node) {\n\t\t\tthis.body(node);\n\t\t}\n\t\traw(node, own, detect) {\n\t\t\tlet value;\n\t\t\tif (!detect) detect = own;\n\t\t\tif (own) {\n\t\t\t\tvalue = node.raws[own];\n\t\t\t\tif (typeof value !== \"undefined\") return value;\n\t\t\t}\n\t\t\tlet parent = node.parent;\n\t\t\tif (detect === \"before\") {\n\t\t\t\tif (!parent || parent.type === \"root\" && parent.first === node) return \"\";\n\t\t\t\tif (parent && parent.type === \"document\") return \"\";\n\t\t\t}\n\t\t\tif (!parent) return DEFAULT_RAW[detect];\n\t\t\tlet root = node.root();\n\t\t\tlet cache = root.rawCache || (root.rawCache = {});\n\t\t\tif (typeof cache[detect] !== \"undefined\") return cache[detect];\n\t\t\tif (detect === \"before\" || detect === \"after\") return this.beforeAfter(node, detect);\n\t\t\telse {\n\t\t\t\tlet method = \"raw\" + capitalize(detect);\n\t\t\t\tif (this[method]) value = this[method](root, node);\n\t\t\t\telse root.walk((i) => {\n\t\t\t\t\tvalue = i.raws[own];\n\t\t\t\t\tif (typeof value !== \"undefined\") return false;\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (typeof value === \"undefined\") value = DEFAULT_RAW[detect];\n\t\t\tcache[detect] = value;\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeClose(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.nodes && i.nodes.length > 0) {\n\t\t\t\t\tif (typeof i.raws.after !== \"undefined\") {\n\t\t\t\t\t\tvalue = i.raws.after;\n\t\t\t\t\t\tif (value.includes(\"\\n\")) value = value.replace(/[^\\n]+$/, \"\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (value) value = value.replace(/\\S/g, \"\");\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeComment(root, node) {\n\t\t\tlet value;\n\t\t\troot.walkComments((i) => {\n\t\t\t\tif (typeof i.raws.before !== \"undefined\") {\n\t\t\t\t\tvalue = i.raws.before;\n\t\t\t\t\tif (value.includes(\"\\n\")) value = value.replace(/[^\\n]+$/, \"\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (typeof value === \"undefined\") value = this.raw(node, null, \"beforeDecl\");\n\t\t\telse if (value) value = value.replace(/\\S/g, \"\");\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeDecl(root, node) {\n\t\t\tlet value;\n\t\t\troot.walkDecls((i) => {\n\t\t\t\tif (typeof i.raws.before !== \"undefined\") {\n\t\t\t\t\tvalue = i.raws.before;\n\t\t\t\t\tif (value.includes(\"\\n\")) value = value.replace(/[^\\n]+$/, \"\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (typeof value === \"undefined\") value = this.raw(node, null, \"beforeRule\");\n\t\t\telse if (value) value = value.replace(/\\S/g, \"\");\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeOpen(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.type !== \"decl\") {\n\t\t\t\t\tvalue = i.raws.between;\n\t\t\t\t\tif (typeof value !== \"undefined\") return false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawBeforeRule(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.nodes && (i.parent !== root || root.first !== i)) {\n\t\t\t\t\tif (typeof i.raws.before !== \"undefined\") {\n\t\t\t\t\t\tvalue = i.raws.before;\n\t\t\t\t\t\tif (value.includes(\"\\n\")) value = value.replace(/[^\\n]+$/, \"\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (value) value = value.replace(/\\S/g, \"\");\n\t\t\treturn value;\n\t\t}\n\t\trawColon(root) {\n\t\t\tlet value;\n\t\t\troot.walkDecls((i) => {\n\t\t\t\tif (typeof i.raws.between !== \"undefined\") {\n\t\t\t\t\tvalue = i.raws.between.replace(/[^\\s:]/g, \"\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawEmptyBody(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.nodes && i.nodes.length === 0) {\n\t\t\t\t\tvalue = i.raws.after;\n\t\t\t\t\tif (typeof value !== \"undefined\") return false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawIndent(root) {\n\t\t\tif (root.raws.indent) return root.raws.indent;\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tlet p = i.parent;\n\t\t\t\tif (p && p !== root && p.parent && p.parent === root) {\n\t\t\t\t\tif (typeof i.raws.before !== \"undefined\") {\n\t\t\t\t\t\tlet parts = i.raws.before.split(\"\\n\");\n\t\t\t\t\t\tvalue = parts[parts.length - 1];\n\t\t\t\t\t\tvalue = value.replace(/\\S/g, \"\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawSemicolon(root) {\n\t\t\tlet value;\n\t\t\troot.walk((i) => {\n\t\t\t\tif (i.nodes && i.nodes.length && i.last.type === \"decl\") {\n\t\t\t\t\tvalue = i.raws.semicolon;\n\t\t\t\t\tif (typeof value !== \"undefined\") return false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t\trawValue(node, prop) {\n\t\t\tlet value = node[prop];\n\t\t\tlet raw = node.raws[prop];\n\t\t\tif (raw && raw.value === value) return raw.raw;\n\t\t\treturn value;\n\t\t}\n\t\troot(node) {\n\t\t\tif (!(node.parent && node.parent.type === \"document\") && node.source && node.source.input.hasBOM) this.builder(\"﻿\", node, \"start\");\n\t\t\tthis.body(node);\n\t\t\tif (node.raws.after) this.builder(node.raws.after);\n\t\t}\n\t\trule(node) {\n\t\t\tthis.block(node, this.rawValue(node, \"selector\"));\n\t\t\tif (node.raws.ownSemicolon) this.builder(node.raws.ownSemicolon, node, \"end\");\n\t\t}\n\t\tstringify(node, semicolon) {\n\t\t\t/* c8 ignore start */\n\t\t\tif (!this[node.type]) throw new Error(\"Unknown AST node type \" + node.type + \". Maybe you need to change PostCSS stringifier.\");\n\t\t\t/* c8 ignore stop */\n\t\t\tthis[node.type](node, semicolon);\n\t\t}\n\t};\n\tmodule.exports = Stringifier;\n\tStringifier.default = Stringifier;\n}));\nvar require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Stringifier = require_stringifier();\n\tvar STYLE_TAG = /(<)(\\/?style\\b)/gi;\n\tvar COMMENT_OPEN = /(<)(!--)/g;\n\tfunction escapeHTMLInCSS(str) {\n\t\tif (!str.includes(\"<\")) return str;\n\t\treturn str.replace(STYLE_TAG, \"\\\\3c $2\").replace(COMMENT_OPEN, \"\\\\3c $2\");\n\t}\n\tfunction cutEscaped(chunks, css, escaped) {\n\t\tlet parts = [];\n\t\tlet at = 0;\n\t\tlet into = 0;\n\t\tfor (let i = 0; i < chunks.length; i += 3) {\n\t\t\tlet from = into;\n\t\t\tlet end = at + chunks[i].length;\n\t\t\twhile (at < end) if (css[at] === escaped[into]) {\n\t\t\t\tat += 1;\n\t\t\t\tinto += 1;\n\t\t\t} else {\n\t\t\t\tat += 1;\n\t\t\t\tinto += 4;\n\t\t\t}\n\t\t\tparts.push(escaped.slice(from, into));\n\t\t}\n\t\treturn parts;\n\t}\n\tvar SafeStringifier = class extends Stringifier {\n\t\tescapeHTML(print) {\n\t\t\tlet builder = this.builder;\n\t\t\tlet chunks, css;\n\t\t\tthis.builder = (str, child, type) => {\n\t\t\t\tif (chunks) {\n\t\t\t\t\tcss += str;\n\t\t\t\t\tchunks.push(str, child, type);\n\t\t\t\t} else if (str.includes(\"<\")) {\n\t\t\t\t\tcss = str;\n\t\t\t\t\tchunks = [\n\t\t\t\t\t\tstr,\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\ttype\n\t\t\t\t\t];\n\t\t\t\t} else builder(str, child, type);\n\t\t\t};\n\t\t\tprint();\n\t\t\tthis.builder = builder;\n\t\t\tif (!chunks) return;\n\t\t\tlet escaped = escapeHTMLInCSS(css);\n\t\t\tif (escaped === css) for (let i = 0; i < chunks.length; i += 3) builder(chunks[i], chunks[i + 1], chunks[i + 2]);\n\t\t\telse {\n\t\t\t\tlet parts = cutEscaped(chunks, css, escaped);\n\t\t\t\tfor (let i = 0; i < chunks.length; i += 3) builder(parts[i / 3], chunks[i + 1], chunks[i + 2]);\n\t\t\t}\n\t\t}\n\t\troot(node) {\n\t\t\tif (node.parent && node.parent.type === \"document\") {\n\t\t\t\tthis.escapeHTML(() => this.body(node));\n\t\t\t\tif (node.raws.after) this.builder(node.raws.after);\n\t\t\t} else this.escapeHTML(() => super.root(node));\n\t\t}\n\t};\n\tfunction stringify(node, builder) {\n\t\tlet str = new SafeStringifier(builder);\n\t\tif (node.type === \"root\" || node.type === \"document\") str.stringify(node);\n\t\telse str.escapeHTML(() => str.stringify(node));\n\t}\n\tmodule.exports = stringify;\n\tstringify.default = stringify;\n}));\nvar require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports.isClean = Symbol(\"isClean\");\n\tmodule.exports.my = Symbol(\"my\");\n}));\nvar require_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar CssSyntaxError = require_css_syntax_error();\n\tvar Stringifier = require_stringifier();\n\tvar stringify = require_stringify();\n\tvar { isClean, my } = require_symbols();\n\tfunction cloneNode(obj, parent) {\n\t\tlet cloned = new obj.constructor();\n\t\tlet stack = [[\n\t\t\tobj,\n\t\t\tcloned,\n\t\t\tparent\n\t\t]];\n\t\twhile (stack.length > 0) {\n\t\t\tlet [source, target, targetParent] = stack.pop();\n\t\t\tfor (let i in source) {\n\t\t\t\tif (!Object.prototype.hasOwnProperty.call(source, i))\n /* c8 ignore next 2 */\n\t\t\t\tcontinue;\n\t\t\t\tif (i === \"proxyCache\") continue;\n\t\t\t\tlet value = source[i];\n\t\t\t\tlet type = typeof value;\n\t\t\t\tif (i === \"parent\" && type === \"object\") {\n\t\t\t\t\tif (targetParent) target[i] = targetParent;\n\t\t\t\t} else if (i === \"source\") target[i] = value;\n\t\t\t\telse if (Array.isArray(value)) {\n\t\t\t\t\tlet children = [];\n\t\t\t\t\ttarget[i] = children;\n\t\t\t\t\tfor (let j of value) {\n\t\t\t\t\t\tlet childClone = new j.constructor();\n\t\t\t\t\t\tchildren.push(childClone);\n\t\t\t\t\t\tstack.push([\n\t\t\t\t\t\t\tj,\n\t\t\t\t\t\t\tchildClone,\n\t\t\t\t\t\t\ttarget\n\t\t\t\t\t\t]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (type === \"object\" && value !== null) {\n\t\t\t\t\t\tlet valueClone = new value.constructor();\n\t\t\t\t\t\tstack.push([\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\tvalueClone,\n\t\t\t\t\t\t\tvoid 0\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tvalue = valueClone;\n\t\t\t\t\t}\n\t\t\t\t\ttarget[i] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cloned;\n\t}\n\tfunction sourceOffset(inputCSS, position) {\n\t\tif (position && typeof position.offset !== \"undefined\") return position.offset;\n\t\tlet column = 1;\n\t\tlet line = 1;\n\t\tlet offset = 0;\n\t\tfor (let i = 0; i < inputCSS.length; i++) {\n\t\t\tif (line === position.line && column === position.column) {\n\t\t\t\toffset = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (inputCSS[i] === \"\\n\") {\n\t\t\t\tcolumn = 1;\n\t\t\t\tline += 1;\n\t\t\t} else column += 1;\n\t\t}\n\t\treturn offset;\n\t}\n\tvar Node = class Node {\n\t\tget proxyOf() {\n\t\t\treturn this;\n\t\t}\n\t\tconstructor(defaults = {}) {\n\t\t\tthis.raws = {};\n\t\t\tthis[isClean] = false;\n\t\t\tthis[my] = true;\n\t\t\tfor (let name of Object.keys(defaults)) {\n\t\t\t\tif (name === \"__proto__\") continue;\n\t\t\t\tif (name === \"nodes\") {\n\t\t\t\t\tthis.nodes = [];\n\t\t\t\t\tfor (let node of defaults[name]) if (typeof node.clone === \"function\" && node.parent) this.append(node.clone());\n\t\t\t\t\telse this.append(node);\n\t\t\t\t} else this[name] = defaults[name];\n\t\t\t}\n\t\t}\n\t\taddToError(error) {\n\t\t\terror.postcssNode = this;\n\t\t\tif (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n\t\t\t\tlet s = this.source;\n\t\t\t\terror.stack = error.stack.replace(/\\n\\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&`);\n\t\t\t}\n\t\t\treturn error;\n\t\t}\n\t\tafter(add) {\n\t\t\tthis.parent.insertAfter(this, add);\n\t\t\treturn this;\n\t\t}\n\t\tassign(overrides = {}) {\n\t\t\tfor (let name in overrides) this[name] = overrides[name];\n\t\t\treturn this;\n\t\t}\n\t\tbefore(add) {\n\t\t\tthis.parent.insertBefore(this, add);\n\t\t\treturn this;\n\t\t}\n\t\tcleanRaws(keepBetween) {\n\t\t\tdelete this.raws.before;\n\t\t\tdelete this.raws.after;\n\t\t\tif (!keepBetween) delete this.raws.between;\n\t\t}\n\t\tclone(overrides = {}) {\n\t\t\tlet cloned = cloneNode(this);\n\t\t\tfor (let name in overrides) cloned[name] = overrides[name];\n\t\t\treturn cloned;\n\t\t}\n\t\tcloneAfter(overrides = {}) {\n\t\t\tlet cloned = this.clone(overrides);\n\t\t\tthis.parent.insertAfter(this, cloned);\n\t\t\treturn cloned;\n\t\t}\n\t\tcloneBefore(overrides = {}) {\n\t\t\tlet cloned = this.clone(overrides);\n\t\t\tthis.parent.insertBefore(this, cloned);\n\t\t\treturn cloned;\n\t\t}\n\t\terror(message, opts = {}) {\n\t\t\tif (this.source) {\n\t\t\t\tlet { end, start } = this.rangeBy(opts);\n\t\t\t\treturn this.source.input.error(message, {\n\t\t\t\t\tcolumn: start.column,\n\t\t\t\t\tline: start.line\n\t\t\t\t}, {\n\t\t\t\t\tcolumn: end.column,\n\t\t\t\t\tline: end.line\n\t\t\t\t}, opts);\n\t\t\t}\n\t\t\treturn new CssSyntaxError(message);\n\t\t}\n\t\tgetProxyProcessor() {\n\t\t\treturn {\n\t\t\t\tget(node, prop) {\n\t\t\t\t\tif (prop === \"proxyOf\") return node;\n\t\t\t\t\telse if (prop === \"root\") return () => node.root().toProxy();\n\t\t\t\t\telse return node[prop];\n\t\t\t\t},\n\t\t\t\tset(node, prop, value) {\n\t\t\t\t\tif (node[prop] === value) return true;\n\t\t\t\t\tnode[prop] = value;\n\t\t\t\t\tif (prop === \"prop\" || prop === \"value\" || prop === \"name\" || prop === \"params\" || prop === \"important\" || \n\t\t\t\t\t/* c8 ignore next */\n\t\t\t\t\tprop === \"text\") node.markDirty();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\t/* c8 ignore next 3 */\n\t\tmarkClean() {\n\t\t\tthis[isClean] = true;\n\t\t}\n\t\tmarkDirty() {\n\t\t\tif (this[isClean]) {\n\t\t\t\tthis[isClean] = false;\n\t\t\t\tlet next = this;\n\t\t\t\twhile (next = next.parent) next[isClean] = false;\n\t\t\t}\n\t\t}\n\t\tnext() {\n\t\t\tif (!this.parent) return void 0;\n\t\t\tlet index = this.parent.index(this);\n\t\t\treturn this.parent.nodes[index + 1];\n\t\t}\n\t\tpositionBy(opts = {}) {\n\t\t\tlet inputString = \"document\" in this.source.input ? this.source.input.document : this.source.input.css;\n\t\t\tlet pos = {\n\t\t\t\tcolumn: this.source.start.column,\n\t\t\t\tline: this.source.start.line,\n\t\t\t\toffset: sourceOffset(inputString, this.source.start)\n\t\t\t};\n\t\t\tif (opts.index) pos = this.positionInside(opts.index);\n\t\t\telse if (opts.word) {\n\t\t\t\tlet index = inputString.slice(sourceOffset(inputString, this.source.start), this.rangeBy().end.offset).indexOf(opts.word);\n\t\t\t\tif (index !== -1) pos = this.positionInside(index);\n\t\t\t}\n\t\t\treturn pos;\n\t\t}\n\t\tpositionInside(index) {\n\t\t\tlet column = this.source.start.column;\n\t\t\tlet line = this.source.start.line;\n\t\t\tlet inputString = \"document\" in this.source.input ? this.source.input.document : this.source.input.css;\n\t\t\tlet offset = sourceOffset(inputString, this.source.start);\n\t\t\tlet end = offset + index;\n\t\t\tfor (let i = offset; i < end; i++) if (inputString[i] === \"\\n\") {\n\t\t\t\tcolumn = 1;\n\t\t\t\tline += 1;\n\t\t\t} else column += 1;\n\t\t\treturn {\n\t\t\t\tcolumn,\n\t\t\t\tline,\n\t\t\t\toffset: end\n\t\t\t};\n\t\t}\n\t\tprev() {\n\t\t\tif (!this.parent) return void 0;\n\t\t\tlet index = this.parent.index(this);\n\t\t\treturn this.parent.nodes[index - 1];\n\t\t}\n\t\trangeBy(opts = {}) {\n\t\t\tlet inputString = \"document\" in this.source.input ? this.source.input.document : this.source.input.css;\n\t\t\tlet start = {\n\t\t\t\tcolumn: this.source.start.column,\n\t\t\t\tline: this.source.start.line,\n\t\t\t\toffset: sourceOffset(inputString, this.source.start)\n\t\t\t};\n\t\t\tlet end = this.source.end ? {\n\t\t\t\tcolumn: this.source.end.column + 1,\n\t\t\t\tline: this.source.end.line,\n\t\t\t\toffset: typeof this.source.end.offset === \"number\" ? this.source.end.offset : sourceOffset(inputString, this.source.end) + 1\n\t\t\t} : {\n\t\t\t\tcolumn: start.column + 1,\n\t\t\t\tline: start.line,\n\t\t\t\toffset: start.offset + 1\n\t\t\t};\n\t\t\tif (opts.word) {\n\t\t\t\tlet index = inputString.slice(sourceOffset(inputString, this.source.start), end.offset).indexOf(opts.word);\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\tstart = this.positionInside(index);\n\t\t\t\t\tend = this.positionInside(index + opts.word.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (opts.start) start = {\n\t\t\t\t\tcolumn: opts.start.column,\n\t\t\t\t\tline: opts.start.line,\n\t\t\t\t\toffset: sourceOffset(inputString, opts.start)\n\t\t\t\t};\n\t\t\t\telse if (typeof opts.index === \"number\") start = this.positionInside(opts.index);\n\t\t\t\tif (opts.end) end = {\n\t\t\t\t\tcolumn: opts.end.column,\n\t\t\t\t\tline: opts.end.line,\n\t\t\t\t\toffset: sourceOffset(inputString, opts.end)\n\t\t\t\t};\n\t\t\t\telse if (typeof opts.endIndex === \"number\") end = this.positionInside(opts.endIndex);\n\t\t\t\telse if (typeof opts.index === \"number\") end = this.positionInside(opts.index + 1);\n\t\t\t}\n\t\t\tif (end.line < start.line || end.line === start.line && end.column <= start.column) end = {\n\t\t\t\tcolumn: start.column + 1,\n\t\t\t\tline: start.line,\n\t\t\t\toffset: start.offset + 1\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tend,\n\t\t\t\tstart\n\t\t\t};\n\t\t}\n\t\traw(prop, defaultType) {\n\t\t\treturn new Stringifier().raw(this, prop, defaultType);\n\t\t}\n\t\tremove() {\n\t\t\tif (this.parent) this.parent.removeChild(this);\n\t\t\tthis.parent = void 0;\n\t\t\treturn this;\n\t\t}\n\t\treplaceWith(...nodes) {\n\t\t\tif (this.parent) {\n\t\t\t\tlet bookmark = this;\n\t\t\t\tlet foundSelf = false;\n\t\t\t\tfor (let node of nodes) if (node === this) foundSelf = true;\n\t\t\t\telse if (foundSelf) {\n\t\t\t\t\tthis.parent.insertAfter(bookmark, node);\n\t\t\t\t\tbookmark = node;\n\t\t\t\t} else this.parent.insertBefore(bookmark, node);\n\t\t\t\tif (!foundSelf) this.remove();\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\troot() {\n\t\t\tlet result = this;\n\t\t\twhile (result.parent && result.parent.type !== \"document\") result = result.parent;\n\t\t\treturn result;\n\t\t}\n\t\ttoJSON(_, inputs) {\n\t\t\tlet emitInputs = inputs == null;\n\t\t\tinputs = inputs || /* @__PURE__ */ new Map();\n\t\t\tlet holderOfRoot = [];\n\t\t\tlet queue = [[\n\t\t\t\tthis,\n\t\t\t\tholderOfRoot,\n\t\t\t\t0\n\t\t\t]];\n\t\t\tfor (let step = 0; step < queue.length; step++) {\n\t\t\t\tlet [node, holder, key] = queue[step];\n\t\t\t\tlet fixed = {};\n\t\t\t\tholder[key] = fixed;\n\t\t\t\tfor (let name in node) {\n\t\t\t\t\tif (!Object.prototype.hasOwnProperty.call(node, name))\n /* c8 ignore next 2 */\n\t\t\t\t\tcontinue;\n\t\t\t\t\tif (name === \"parent\" || name === \"proxyCache\") continue;\n\t\t\t\t\tlet value = node[name];\n\t\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\t\tlet fixedArray = [];\n\t\t\t\t\t\tfixed[name] = fixedArray;\n\t\t\t\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\t\t\t\tlet item = value[i];\n\t\t\t\t\t\t\tif (typeof item === \"object\" && item.toJSON) {\n\t\t\t\t\t\t\t\tif (item.toJSON === Node.prototype.toJSON) queue.push([\n\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\tfixedArray,\n\t\t\t\t\t\t\t\t\ti\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\telse fixedArray[i] = item.toJSON(null, inputs);\n\t\t\t\t\t\t\t} else fixedArray[i] = item;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (typeof value === \"object\" && value.toJSON) {\n\t\t\t\t\t\tif (value.toJSON === Node.prototype.toJSON) queue.push([\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\tfixed,\n\t\t\t\t\t\t\tname\n\t\t\t\t\t\t]);\n\t\t\t\t\t\telse fixed[name] = value.toJSON(null, inputs);\n\t\t\t\t\t} else if (name === \"source\") {\n\t\t\t\t\t\tif (value == null) continue;\n\t\t\t\t\t\tlet inputId = inputs.get(value.input);\n\t\t\t\t\t\tif (inputId == null) {\n\t\t\t\t\t\t\tinputId = inputs.size;\n\t\t\t\t\t\t\tinputs.set(value.input, inputId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfixed[name] = {\n\t\t\t\t\t\t\tend: value.end,\n\t\t\t\t\t\t\tinputId,\n\t\t\t\t\t\t\tstart: value.start\n\t\t\t\t\t\t};\n\t\t\t\t\t} else fixed[name] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet fixed = holderOfRoot[0];\n\t\t\tif (emitInputs) fixed.inputs = [...inputs.keys()].map((input) => input.toJSON());\n\t\t\treturn fixed;\n\t\t}\n\t\ttoProxy() {\n\t\t\tif (!this.proxyCache) this.proxyCache = new Proxy(this, this.getProxyProcessor());\n\t\t\treturn this.proxyCache;\n\t\t}\n\t\ttoString(stringifier = stringify) {\n\t\t\tif (stringifier.stringify) stringifier = stringifier.stringify;\n\t\t\tlet result = \"\";\n\t\t\tstringifier(this, (i) => {\n\t\t\t\tresult += i;\n\t\t\t});\n\t\t\treturn result;\n\t\t}\n\t\twarn(result, text, opts = {}) {\n\t\t\tlet data = { node: this };\n\t\t\tfor (let i in opts) data[i] = opts[i];\n\t\t\treturn result.warn(text, data);\n\t\t}\n\t};\n\tmodule.exports = Node;\n\tNode.default = Node;\n}));\nvar require_comment = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Node = require_node();\n\tvar Comment = class extends Node {\n\t\tconstructor(defaults) {\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"comment\";\n\t\t}\n\t};\n\tmodule.exports = Comment;\n\tComment.default = Comment;\n}));\nvar require_declaration = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Node = require_node();\n\tvar Declaration = class extends Node {\n\t\tget variable() {\n\t\t\treturn this.prop.startsWith(\"--\") || this.prop[0] === \"$\";\n\t\t}\n\t\tconstructor(defaults) {\n\t\t\tif (defaults && typeof defaults.value !== \"undefined\" && typeof defaults.value !== \"string\") defaults = {\n\t\t\t\t...defaults,\n\t\t\t\tvalue: String(defaults.value)\n\t\t\t};\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"decl\";\n\t\t}\n\t};\n\tmodule.exports = Declaration;\n\tDeclaration.default = Declaration;\n}));\nvar require_container = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Comment = require_comment();\n\tvar Declaration = require_declaration();\n\tvar Node = require_node();\n\tvar { isClean, my } = require_symbols();\n\tvar AtRule;\n\tvar parse;\n\tvar Root;\n\tvar Rule;\n\tfunction cleanSource(nodes) {\n\t\tlet stack = nodes.slice();\n\t\twhile (stack.length > 0) {\n\t\t\tlet node = stack.pop();\n\t\t\tdelete node.source;\n\t\t\tif (node.nodes) {\n\t\t\t\tnode.nodes = node.nodes.slice();\n\t\t\t\tfor (let i of node.nodes) stack.push(i);\n\t\t\t}\n\t\t}\n\t\treturn nodes.slice();\n\t}\n\tfunction markTreeDirty(node) {\n\t\tlet stack = [node];\n\t\twhile (stack.length > 0) {\n\t\t\tlet next = stack.pop();\n\t\t\tnext[isClean] = false;\n\t\t\tif (next.proxyOf.nodes) for (let i of next.proxyOf.nodes) stack.push(i);\n\t\t}\n\t}\n\tvar Container = class Container extends Node {\n\t\tget first() {\n\t\t\tif (!this.proxyOf.nodes) return void 0;\n\t\t\treturn this.proxyOf.nodes[0];\n\t\t}\n\t\tget last() {\n\t\t\tif (!this.proxyOf.nodes) return void 0;\n\t\t\treturn this.proxyOf.nodes[this.proxyOf.nodes.length - 1];\n\t\t}\n\t\tappend(...children) {\n\t\t\tfor (let child of children) {\n\t\t\t\tlet nodes = this.normalize(child, this.last);\n\t\t\t\tfor (let node of nodes) this.proxyOf.nodes.push(node);\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tcleanRaws(keepBetween) {\n\t\t\tlet stack = [this];\n\t\t\twhile (stack.length > 0) {\n\t\t\t\tlet node = stack.pop();\n\t\t\t\tif (node !== this && node.cleanRaws !== Container.prototype.cleanRaws) {\n\t\t\t\t\tnode.cleanRaws(keepBetween);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tNode.prototype.cleanRaws.call(node, keepBetween);\n\t\t\t\tif (node.nodes) for (let child of node.nodes) stack.push(child);\n\t\t\t}\n\t\t}\n\t\teach(callback) {\n\t\t\tif (!this.proxyOf.nodes) return void 0;\n\t\t\tlet iterator = this.getIterator();\n\t\t\tlet index, result;\n\t\t\twhile (this.indexes[iterator] < this.proxyOf.nodes.length) {\n\t\t\t\tindex = this.indexes[iterator];\n\t\t\t\tresult = callback(this.proxyOf.nodes[index], index);\n\t\t\t\tif (result === false) break;\n\t\t\t\tthis.indexes[iterator] += 1;\n\t\t\t}\n\t\t\tdelete this.indexes[iterator];\n\t\t\treturn result;\n\t\t}\n\t\tevery(condition) {\n\t\t\treturn this.nodes.every(condition);\n\t\t}\n\t\tgetIterator() {\n\t\t\tif (!this.lastEach) this.lastEach = 0;\n\t\t\tif (!this.indexes) this.indexes = {};\n\t\t\tthis.lastEach += 1;\n\t\t\tlet iterator = this.lastEach;\n\t\t\tthis.indexes[iterator] = 0;\n\t\t\treturn iterator;\n\t\t}\n\t\tgetProxyProcessor() {\n\t\t\treturn {\n\t\t\t\tget(node, prop) {\n\t\t\t\t\tif (prop === \"proxyOf\") return node;\n\t\t\t\t\telse if (!node[prop]) return node[prop];\n\t\t\t\t\telse if (prop === \"each\" || typeof prop === \"string\" && prop.startsWith(\"walk\")) return (...args) => {\n\t\t\t\t\t\treturn node[prop](...args.map((i) => {\n\t\t\t\t\t\t\tif (typeof i === \"function\") return (child, index) => i(child.toProxy(), index);\n\t\t\t\t\t\t\telse return i;\n\t\t\t\t\t\t}));\n\t\t\t\t\t};\n\t\t\t\t\telse if (prop === \"every\" || prop === \"some\") return (cb) => {\n\t\t\t\t\t\treturn node[prop]((child, ...other) => cb(child.toProxy(), ...other));\n\t\t\t\t\t};\n\t\t\t\t\telse if (prop === \"root\") return () => node.root().toProxy();\n\t\t\t\t\telse if (prop === \"nodes\") return node.nodes.map((i) => i.toProxy());\n\t\t\t\t\telse if (prop === \"first\" || prop === \"last\") return node[prop].toProxy();\n\t\t\t\t\telse return node[prop];\n\t\t\t\t},\n\t\t\t\tset(node, prop, value) {\n\t\t\t\t\tif (node[prop] === value) return true;\n\t\t\t\t\tnode[prop] = value;\n\t\t\t\t\tif (prop === \"name\" || prop === \"params\" || prop === \"selector\") node.markDirty();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tindex(child) {\n\t\t\tif (typeof child === \"number\") return child;\n\t\t\tif (child.proxyOf) child = child.proxyOf;\n\t\t\treturn this.proxyOf.nodes.indexOf(child);\n\t\t}\n\t\tinsertAfter(exist, add) {\n\t\t\tlet existIndex = this.index(exist);\n\t\t\tlet nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();\n\t\t\texistIndex = this.index(exist);\n\t\t\tfor (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node);\n\t\t\tlet index;\n\t\t\tfor (let id in this.indexes) {\n\t\t\t\tindex = this.indexes[id];\n\t\t\t\tif (existIndex < index) this.indexes[id] = index + nodes.length;\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tinsertBefore(exist, add) {\n\t\t\tlet existIndex = this.index(exist);\n\t\t\tlet type = existIndex === 0 ? \"prepend\" : false;\n\t\t\tlet nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();\n\t\t\texistIndex = this.index(exist);\n\t\t\tfor (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node);\n\t\t\tlet index;\n\t\t\tfor (let id in this.indexes) {\n\t\t\t\tindex = this.indexes[id];\n\t\t\t\tif (existIndex <= index) this.indexes[id] = index + nodes.length;\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tnormalize(nodes, sample) {\n\t\t\tif (typeof nodes === \"string\") nodes = cleanSource(parse(nodes).nodes);\n\t\t\telse if (typeof nodes === \"undefined\") nodes = [];\n\t\t\telse if (Array.isArray(nodes)) {\n\t\t\t\tnodes = nodes.slice(0);\n\t\t\t\tfor (let i of nodes) if (i.parent) i.parent.removeChild(i, \"ignore\");\n\t\t\t} else if (nodes.type === \"root\" && this.type !== \"document\") {\n\t\t\t\tnodes = nodes.nodes.slice(0);\n\t\t\t\tfor (let i of nodes) if (i.parent) i.parent.removeChild(i, \"ignore\");\n\t\t\t} else if (nodes.type) nodes = [nodes];\n\t\t\telse if (nodes.prop) {\n\t\t\t\tif (typeof nodes.value === \"undefined\") throw new Error(\"Value field is missed in node creation\");\n\t\t\t\telse if (typeof nodes.value !== \"string\") nodes.value = String(nodes.value);\n\t\t\t\tnodes = [new Declaration(nodes)];\n\t\t\t} else if (nodes.selector || nodes.selectors) nodes = [new Rule(nodes)];\n\t\t\telse if (nodes.name) nodes = [new AtRule(nodes)];\n\t\t\telse if (nodes.text) nodes = [new Comment(nodes)];\n\t\t\telse throw new Error(\"Unknown node type in node creation\");\n\t\t\treturn nodes.map((i) => {\n\t\t\t\t/* c8 ignore next */\n\t\t\t\tif (!i[my]) Container.rebuild(i);\n\t\t\t\ti = i.proxyOf;\n\t\t\t\tif (i.parent) i.parent.removeChild(i);\n\t\t\t\tif (i[isClean]) markTreeDirty(i);\n\t\t\t\tif (!i.raws) i.raws = {};\n\t\t\t\tif (typeof i.raws.before === \"undefined\") {\n\t\t\t\t\tif (sample && typeof sample.raws.before !== \"undefined\") i.raws.before = sample.raws.before.replace(/\\S/g, \"\");\n\t\t\t\t}\n\t\t\t\ti.parent = this.proxyOf;\n\t\t\t\treturn i;\n\t\t\t});\n\t\t}\n\t\tprepend(...children) {\n\t\t\tchildren = children.reverse();\n\t\t\tfor (let child of children) {\n\t\t\t\tlet nodes = this.normalize(child, this.first, \"prepend\").reverse();\n\t\t\t\tfor (let node of nodes) this.proxyOf.nodes.unshift(node);\n\t\t\t\tfor (let id in this.indexes) this.indexes[id] = this.indexes[id] + nodes.length;\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tpush(child) {\n\t\t\tchild.parent = this;\n\t\t\tthis.proxyOf.nodes.push(child);\n\t\t\treturn this;\n\t\t}\n\t\tremoveAll() {\n\t\t\tfor (let node of this.proxyOf.nodes) node.parent = void 0;\n\t\t\tthis.proxyOf.nodes = [];\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tremoveChild(child) {\n\t\t\tchild = this.index(child);\n\t\t\tthis.proxyOf.nodes[child].parent = void 0;\n\t\t\tthis.proxyOf.nodes.splice(child, 1);\n\t\t\tlet index;\n\t\t\tfor (let id in this.indexes) {\n\t\t\t\tindex = this.indexes[id];\n\t\t\t\tif (index >= child) this.indexes[id] = index - 1;\n\t\t\t}\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\treplaceValues(pattern, opts, callback) {\n\t\t\tif (!callback) {\n\t\t\t\tcallback = opts;\n\t\t\t\topts = {};\n\t\t\t}\n\t\t\tthis.walkDecls((decl) => {\n\t\t\t\tif (opts.props && !opts.props.includes(decl.prop)) return;\n\t\t\t\tif (opts.fast && !decl.value.includes(opts.fast)) return;\n\t\t\t\tdecl.value = decl.value.replace(pattern, callback);\n\t\t\t});\n\t\t\tthis.markDirty();\n\t\t\treturn this;\n\t\t}\n\t\tsome(condition) {\n\t\t\treturn this.nodes.some(condition);\n\t\t}\n\t\twalk(callback) {\n\t\t\tif (!this.proxyOf.nodes) return void 0;\n\t\t\tlet stack = [{\n\t\t\t\titerator: this.getIterator(),\n\t\t\t\tnode: this.proxyOf\n\t\t\t}];\n\t\t\twhile (stack.length > 0) {\n\t\t\t\tlet { iterator, node } = stack[stack.length - 1];\n\t\t\t\tlet index = node.indexes[iterator];\n\t\t\t\tif (index >= node.proxyOf.nodes.length) {\n\t\t\t\t\tdelete node.indexes[iterator];\n\t\t\t\t\tstack.pop();\n\t\t\t\t\tlet parent = stack[stack.length - 1];\n\t\t\t\t\tif (parent) parent.node.indexes[parent.iterator] += 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlet child = node.proxyOf.nodes[index];\n\t\t\t\tlet result;\n\t\t\t\ttry {\n\t\t\t\t\tresult = callback(child, index);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow child.addToError(e);\n\t\t\t\t}\n\t\t\t\tif (result === false) {\n\t\t\t\t\tfor (let opened of stack) delete opened.node.indexes[opened.iterator];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (child.walk && child.proxyOf.nodes) stack.push({\n\t\t\t\t\titerator: child.getIterator(),\n\t\t\t\t\tnode: child\n\t\t\t\t});\n\t\t\t\telse node.indexes[iterator] += 1;\n\t\t\t}\n\t\t}\n\t\twalkAtRules(name, callback) {\n\t\t\tif (!callback) {\n\t\t\t\tcallback = name;\n\t\t\t\treturn this.walk((child, i) => {\n\t\t\t\t\tif (child.type === \"atrule\") return callback(child, i);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (name instanceof RegExp) return this.walk((child, i) => {\n\t\t\t\tif (child.type === \"atrule\" && name.test(child.name)) return callback(child, i);\n\t\t\t});\n\t\t\treturn this.walk((child, i) => {\n\t\t\t\tif (child.type === \"atrule\" && child.name === name) return callback(child, i);\n\t\t\t});\n\t\t}\n\t\twalkComments(callback) {\n\t\t\treturn this.walk((child, i) => {\n\t\t\t\tif (child.type === \"comment\") return callback(child, i);\n\t\t\t});\n\t\t}\n\t\twalkDecls(prop, callback) {\n\t\t\tif (!callback) {\n\t\t\t\tcallback = prop;\n\t\t\t\treturn this.walk((child, i) => {\n\t\t\t\t\tif (child.type === \"decl\") return callback(child, i);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (prop instanceof RegExp) return this.walk((child, i) => {\n\t\t\t\tif (child.type === \"decl\" && prop.test(child.prop)) return callback(child, i);\n\t\t\t});\n\t\t\treturn this.walk((child, i) => {\n\t\t\t\tif (child.type === \"decl\" && child.prop === prop) return callback(child, i);\n\t\t\t});\n\t\t}\n\t\twalkRules(selector, callback) {\n\t\t\tif (!callback) {\n\t\t\t\tcallback = selector;\n\t\t\t\treturn this.walk((child, i) => {\n\t\t\t\t\tif (child.type === \"rule\") return callback(child, i);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (selector instanceof RegExp) return this.walk((child, i) => {\n\t\t\t\tif (child.type === \"rule\" && selector.test(child.selector)) return callback(child, i);\n\t\t\t});\n\t\t\treturn this.walk((child, i) => {\n\t\t\t\tif (child.type === \"rule\" && child.selector === selector) return callback(child, i);\n\t\t\t});\n\t\t}\n\t};\n\tContainer.registerParse = (dependant) => {\n\t\tparse = dependant;\n\t};\n\tContainer.registerRule = (dependant) => {\n\t\tRule = dependant;\n\t};\n\tContainer.registerAtRule = (dependant) => {\n\t\tAtRule = dependant;\n\t};\n\tContainer.registerRoot = (dependant) => {\n\t\tRoot = dependant;\n\t};\n\tmodule.exports = Container;\n\tContainer.default = Container;\n\t/* c8 ignore start */\n\tContainer.rebuild = (node) => {\n\t\tlet stack = [node];\n\t\twhile (stack.length > 0) {\n\t\t\tlet next = stack.pop();\n\t\t\tif (next.type === \"atrule\") Object.setPrototypeOf(next, AtRule.prototype);\n\t\t\telse if (next.type === \"rule\") Object.setPrototypeOf(next, Rule.prototype);\n\t\t\telse if (next.type === \"decl\") Object.setPrototypeOf(next, Declaration.prototype);\n\t\t\telse if (next.type === \"comment\") Object.setPrototypeOf(next, Comment.prototype);\n\t\t\telse if (next.type === \"root\") Object.setPrototypeOf(next, Root.prototype);\n\t\t\tnext[my] = true;\n\t\t\tif (next.nodes) for (let child of next.nodes) stack.push(child);\n\t\t}\n\t};\n}));\n/* c8 ignore stop */\nvar require_at_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar AtRule = class extends Container {\n\t\tconstructor(defaults) {\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"atrule\";\n\t\t}\n\t\tappend(...children) {\n\t\t\tif (!this.proxyOf.nodes) this.nodes = [];\n\t\t\treturn super.append(...children);\n\t\t}\n\t\tprepend(...children) {\n\t\t\tif (!this.proxyOf.nodes) this.nodes = [];\n\t\t\treturn super.prepend(...children);\n\t\t}\n\t};\n\tmodule.exports = AtRule;\n\tAtRule.default = AtRule;\n\tContainer.registerAtRule(AtRule);\n}));\nvar require_document = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar LazyResult;\n\tvar Processor;\n\tvar Document = class extends Container {\n\t\tconstructor(defaults) {\n\t\t\tsuper({\n\t\t\t\ttype: \"document\",\n\t\t\t\t...defaults\n\t\t\t});\n\t\t\tif (!this.nodes) this.nodes = [];\n\t\t}\n\t\ttoResult(opts = {}) {\n\t\t\treturn new LazyResult(new Processor(), this, opts).stringify();\n\t\t}\n\t};\n\tDocument.registerLazyResult = (dependant) => {\n\t\tLazyResult = dependant;\n\t};\n\tDocument.registerProcessor = (dependant) => {\n\t\tProcessor = dependant;\n\t};\n\tmodule.exports = Document;\n\tDocument.default = Document;\n}));\nvar require_non_secure = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\n\tvar customAlphabet = (alphabet, defaultSize = 21) => {\n\t\treturn (size = defaultSize) => {\n\t\t\tlet id = \"\";\n\t\t\tlet i = size | 0;\n\t\t\twhile (i-- > 0) id += alphabet[Math.random() * alphabet.length | 0];\n\t\t\treturn id;\n\t\t};\n\t};\n\tvar nanoid = (size = 21) => {\n\t\tlet id = \"\";\n\t\tlet i = size | 0;\n\t\twhile (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];\n\t\treturn id;\n\t};\n\tmodule.exports = {\n\t\tnanoid,\n\t\tcustomAlphabet\n\t};\n}));\nvar require_previous_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar { existsSync, readFileSync, realpathSync } = require___vite_browser_external();\n\tvar { dirname, isAbsolute, join, relative, sep } = require___vite_browser_external();\n\tvar { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();\n\tfunction realPath(path) {\n\t\ttry {\n\t\t\treturn realpathSync(path);\n\t\t} catch {\n\t\t\treturn path;\n\t\t}\n\t}\n\tfunction fromBase64(str) {\n\t\tif (Buffer) return Buffer.from(str, \"base64\").toString();\n\t\telse\n /* c8 ignore next 2 */\n\t\treturn window.atob(str);\n\t}\n\tvar PreviousMap = class {\n\t\tconstructor(css, opts) {\n\t\t\tif (opts.map === false) return;\n\t\t\tif (opts.unsafeMap) this.unsafeMap = true;\n\t\t\tthis.loadAnnotation(css);\n\t\t\tthis.inline = this.startWith(this.annotation, \"data:\");\n\t\t\tlet prev = opts.map ? opts.map.prev : void 0;\n\t\t\tlet text = this.loadMap(opts.from, prev);\n\t\t\tif (!this.mapFile && opts.from) this.mapFile = opts.from;\n\t\t\tif (this.mapFile) this.root = dirname(this.mapFile);\n\t\t\tif (text) this.text = text;\n\t\t}\n\t\tconsumer() {\n\t\t\tif (!this.consumerCache) this.consumerCache = new SourceMapConsumer(this.json || this.text);\n\t\t\treturn this.consumerCache;\n\t\t}\n\t\tdecodeInline(text) {\n\t\t\tlet baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/;\n\t\t\tlet baseUri = /^data:application\\/json;base64,/;\n\t\t\tlet uriMatch = text.match(/^data:application\\/json;charset=utf-?8,/) || text.match(/^data:application\\/json,/);\n\t\t\tif (uriMatch) return decodeURIComponent(text.substr(uriMatch[0].length));\n\t\t\tlet baseUriMatch = text.match(baseCharsetUri) || text.match(baseUri);\n\t\t\tif (baseUriMatch) return fromBase64(text.substr(baseUriMatch[0].length));\n\t\t\tlet encoding = text.slice(22);\n\t\t\tencoding = encoding.slice(0, encoding.indexOf(\",\"));\n\t\t\tthrow new Error(\"Unsupported source map encoding \" + encoding);\n\t\t}\n\t\tgetAnnotationURL(sourceMapString) {\n\t\t\treturn sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, \"\").trim();\n\t\t}\n\t\tisMap(map) {\n\t\t\tif (typeof map !== \"object\") return false;\n\t\t\treturn typeof map.mappings === \"string\" || typeof map._mappings === \"string\" || Array.isArray(map.sections);\n\t\t}\n\t\tloadAnnotation(css) {\n\t\t\tlet comments = css.match(/\\/\\*\\s*# sourceMappingURL=/g);\n\t\t\tif (!comments) return;\n\t\t\tlet start = css.lastIndexOf(comments.pop());\n\t\t\tlet end = css.indexOf(\"*/\", start);\n\t\t\tif (start > -1 && end > -1) this.annotation = this.getAnnotationURL(css.substring(start, end));\n\t\t}\n\t\tloadFile(path, cssFile, trusted) {\n\t\t\tif (!trusted && !this.unsafeMap) {\n\t\t\t\tif (!/\\.map$/i.test(path)) return void 0;\n\t\t\t\tif (!cssFile) return void 0;\n\t\t\t\tlet rel = relative(realPath(dirname(cssFile)), realPath(path));\n\t\t\t\tif (rel === \"..\" || rel.startsWith(\"..\" + sep) || isAbsolute(rel)) return;\n\t\t\t}\n\t\t\tthis.root = dirname(path);\n\t\t\tif (existsSync(path)) {\n\t\t\t\tthis.mapFile = path;\n\t\t\t\treturn readFileSync(path, \"utf-8\").toString().trim();\n\t\t\t}\n\t\t}\n\t\tloadMap(file, prev) {\n\t\t\tif (prev === false) return false;\n\t\t\tif (prev) {\n\t\t\t\tif (typeof prev === \"string\") return prev;\n\t\t\t\telse if (typeof prev === \"function\") {\n\t\t\t\t\tlet prevPath = prev(file);\n\t\t\t\t\tif (prevPath) {\n\t\t\t\t\t\tlet map = this.loadFile(prevPath, file, true);\n\t\t\t\t\t\tif (!map) throw new Error(\"Unable to load previous source map: \" + prevPath.toString());\n\t\t\t\t\t\treturn map;\n\t\t\t\t\t}\n\t\t\t\t} else if (prev instanceof SourceMapConsumer) return SourceMapGenerator.fromSourceMap(prev).toString();\n\t\t\t\telse if (prev instanceof SourceMapGenerator) return prev.toString();\n\t\t\t\telse if (this.isMap(prev)) return JSON.stringify(prev);\n\t\t\t\telse throw new Error(\"Unsupported previous source map format: \" + prev.toString());\n\t\t\t} else if (this.inline) return this.decodeInline(this.annotation);\n\t\t\telse if (this.annotation) {\n\t\t\t\tlet map = this.annotation;\n\t\t\t\tif (file) map = join(dirname(file), map);\n\t\t\t\tlet unknown = this.loadFile(map, file, false);\n\t\t\t\tif (unknown) try {\n\t\t\t\t\t/* c8 ignore next 4 */\n\t\t\t\t\tthis.json = JSON.parse(unknown.replace(/^\\)]}'[^\\n]*\\n/, \"\"));\n\t\t\t\t} catch {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn unknown;\n\t\t\t}\n\t\t}\n\t\tstartWith(string, start) {\n\t\t\tif (!string) return false;\n\t\t\treturn string.substr(0, start.length) === start;\n\t\t}\n\t\twithContent() {\n\t\t\treturn !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);\n\t\t}\n\t};\n\tmodule.exports = PreviousMap;\n\tPreviousMap.default = PreviousMap;\n}));\nvar require_input = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar { nanoid } = require_non_secure();\n\tvar { isAbsolute, resolve } = require___vite_browser_external();\n\tvar { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();\n\tvar { fileURLToPath, pathToFileURL } = require___vite_browser_external();\n\tvar CssSyntaxError = require_css_syntax_error();\n\tvar PreviousMap = require_previous_map();\n\tvar terminalHighlight = require___vite_browser_external();\n\tvar lineToIndexCache = Symbol(\"lineToIndexCache\");\n\tvar sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);\n\tvar pathAvailable = Boolean(resolve && isAbsolute);\n\tfunction getLineToIndex(input) {\n\t\tif (input[lineToIndexCache]) return input[lineToIndexCache];\n\t\tlet lines = input.css.split(\"\\n\");\n\t\tlet lineToIndex = new Array(lines.length);\n\t\tlet prevIndex = 0;\n\t\tfor (let i = 0, l = lines.length; i < l; i++) {\n\t\t\tlineToIndex[i] = prevIndex;\n\t\t\tprevIndex += lines[i].length + 1;\n\t\t}\n\t\tinput[lineToIndexCache] = lineToIndex;\n\t\treturn lineToIndex;\n\t}\n\tvar Input = class {\n\t\tget from() {\n\t\t\treturn this.file || this.id;\n\t\t}\n\t\tconstructor(css, opts = {}) {\n\t\t\tif (css === null || typeof css === \"undefined\" || typeof css === \"object\" && !css.toString) throw new Error(`PostCSS received ${css} instead of CSS string`);\n\t\t\tthis.css = css.toString();\n\t\t\tif (this.css[0] === \"﻿\" || this.css[0] === \"￾\") {\n\t\t\t\tthis.hasBOM = true;\n\t\t\t\tthis.css = this.css.slice(1);\n\t\t\t} else this.hasBOM = false;\n\t\t\tthis.document = this.css;\n\t\t\tif (opts.document) this.document = opts.document.toString();\n\t\t\tif (opts.from) {\n\t\t\t\tif (!pathAvailable || /^\\w+:\\/\\//.test(opts.from) || isAbsolute(opts.from)) this.file = opts.from;\n\t\t\t\telse this.file = resolve(opts.from);\n\t\t\t}\n\t\t\tif (pathAvailable && sourceMapAvailable) {\n\t\t\t\tlet map = new PreviousMap(this.css, opts);\n\t\t\t\tif (map.text) {\n\t\t\t\t\tthis.map = map;\n\t\t\t\t\tlet file = map.consumer().file;\n\t\t\t\t\tif (!this.file && file) this.file = this.mapResolve(file);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.file) this.id = \"<input css \" + nanoid(6) + \">\";\n\t\t\tif (this.map) this.map.file = this.from;\n\t\t}\n\t\terror(message, line, column, opts = {}) {\n\t\t\tlet endColumn, endLine, endOffset, offset, result;\n\t\t\tif (line && typeof line === \"object\") {\n\t\t\t\tlet start = line;\n\t\t\t\tlet end = column;\n\t\t\t\tif (typeof start.offset === \"number\") {\n\t\t\t\t\toffset = start.offset;\n\t\t\t\t\tlet pos = this.fromOffset(offset);\n\t\t\t\t\tline = pos.line;\n\t\t\t\t\tcolumn = pos.col;\n\t\t\t\t} else {\n\t\t\t\t\tline = start.line;\n\t\t\t\t\tcolumn = start.column;\n\t\t\t\t\toffset = this.fromLineAndColumn(line, column);\n\t\t\t\t}\n\t\t\t\tif (typeof end.offset === \"number\") {\n\t\t\t\t\tendOffset = end.offset;\n\t\t\t\t\tlet pos = this.fromOffset(endOffset);\n\t\t\t\t\tendLine = pos.line;\n\t\t\t\t\tendColumn = pos.col;\n\t\t\t\t} else {\n\t\t\t\t\tendLine = end.line;\n\t\t\t\t\tendColumn = end.column;\n\t\t\t\t\tendOffset = this.fromLineAndColumn(end.line, end.column);\n\t\t\t\t}\n\t\t\t} else if (!column) {\n\t\t\t\toffset = line;\n\t\t\t\tlet pos = this.fromOffset(offset);\n\t\t\t\tline = pos.line;\n\t\t\t\tcolumn = pos.col;\n\t\t\t} else offset = this.fromLineAndColumn(line, column);\n\t\t\tlet origin = this.origin(line, column, endLine, endColumn);\n\t\t\tif (origin) result = new CssSyntaxError(message, origin.endLine === void 0 ? origin.line : {\n\t\t\t\tcolumn: origin.column,\n\t\t\t\tline: origin.line\n\t\t\t}, origin.endLine === void 0 ? origin.column : {\n\t\t\t\tcolumn: origin.endColumn,\n\t\t\t\tline: origin.endLine\n\t\t\t}, origin.source, origin.file, opts.plugin);\n\t\t\telse result = new CssSyntaxError(message, endLine === void 0 ? line : {\n\t\t\t\tcolumn,\n\t\t\t\tline\n\t\t\t}, endLine === void 0 ? column : {\n\t\t\t\tcolumn: endColumn,\n\t\t\t\tline: endLine\n\t\t\t}, this.css, this.file, opts.plugin);\n\t\t\tresult.input = {\n\t\t\t\tcolumn,\n\t\t\t\tendColumn,\n\t\t\t\tendLine,\n\t\t\t\tendOffset,\n\t\t\t\tline,\n\t\t\t\toffset,\n\t\t\t\tsource: this.css\n\t\t\t};\n\t\t\tif (this.file) {\n\t\t\t\tif (pathToFileURL) result.input.url = pathToFileURL(this.file).toString();\n\t\t\t\tresult.input.file = this.file;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\tfromLineAndColumn(line, column) {\n\t\t\treturn getLineToIndex(this)[line - 1] + column - 1;\n\t\t}\n\t\tfromOffset(offset) {\n\t\t\tlet lineToIndex = getLineToIndex(this);\n\t\t\tlet lastLine = lineToIndex[lineToIndex.length - 1];\n\t\t\tlet min = 0;\n\t\t\tif (offset >= lastLine) min = lineToIndex.length - 1;\n\t\t\telse {\n\t\t\t\tlet max = lineToIndex.length - 2;\n\t\t\t\tlet mid;\n\t\t\t\twhile (min < max) {\n\t\t\t\t\tmid = min + (max - min >> 1);\n\t\t\t\t\tif (offset < lineToIndex[mid]) max = mid - 1;\n\t\t\t\t\telse if (offset >= lineToIndex[mid + 1]) min = mid + 1;\n\t\t\t\t\telse {\n\t\t\t\t\t\tmin = mid;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcol: offset - lineToIndex[min] + 1,\n\t\t\t\tline: min + 1\n\t\t\t};\n\t\t}\n\t\tmapResolve(file) {\n\t\t\tif (/^\\w+:\\/\\//.test(file)) return file;\n\t\t\treturn resolve(this.map.consumer().sourceRoot || this.map.root || \".\", file);\n\t\t}\n\t\torigin(line, column, endLine, endColumn) {\n\t\t\tif (!this.map) return false;\n\t\t\tlet consumer = this.map.consumer();\n\t\t\tlet from = consumer.originalPositionFor({\n\t\t\t\tcolumn: column - 1,\n\t\t\t\tline\n\t\t\t});\n\t\t\tif (!from.source) return false;\n\t\t\tlet to;\n\t\t\tif (typeof endLine === \"number\") {\n\t\t\t\tlet toPosition = consumer.originalPositionFor({\n\t\t\t\t\tcolumn: endColumn - 1,\n\t\t\t\t\tline: endLine\n\t\t\t\t});\n\t\t\t\tif (toPosition.source) to = toPosition;\n\t\t\t}\n\t\t\tlet fromUrl;\n\t\t\tif (isAbsolute(from.source)) fromUrl = pathToFileURL(from.source);\n\t\t\telse fromUrl = new URL(from.source, pathToFileURL(this.map.mapFile || resolve(\".\") + \"/\"));\n\t\t\tlet result = {\n\t\t\t\tcolumn: from.column + 1,\n\t\t\t\tendColumn: to && to.column + 1,\n\t\t\t\tendLine: to && to.line,\n\t\t\t\tline: from.line,\n\t\t\t\turl: fromUrl.toString()\n\t\t\t};\n\t\t\tif (fromUrl.protocol === \"file:\") {\n\t\t\t\tif (fileURLToPath) result.file = fileURLToPath(fromUrl);\n\t\t\t\telse\n /* c8 ignore next 2 */\n\t\t\t\tthrow new Error(`file: protocol is not available in this PostCSS build`);\n\t\t\t}\n\t\t\tlet source = consumer.sourceContentFor(from.source);\n\t\t\tif (source) result.source = source;\n\t\t\treturn result;\n\t\t}\n\t\ttoJSON() {\n\t\t\tlet json = {};\n\t\t\tfor (let name of [\n\t\t\t\t\"hasBOM\",\n\t\t\t\t\"css\",\n\t\t\t\t\"file\",\n\t\t\t\t\"id\"\n\t\t\t]) if (this[name] != null) json[name] = this[name];\n\t\t\tif (this.map) {\n\t\t\t\tjson.map = { ...this.map };\n\t\t\t\tif (json.map.consumerCache) json.map.consumerCache = void 0;\n\t\t\t}\n\t\t\treturn json;\n\t\t}\n\t};\n\tmodule.exports = Input;\n\tInput.default = Input;\n\tif (terminalHighlight && terminalHighlight.registerInput) terminalHighlight.registerInput(Input);\n}));\nvar require_root = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar LazyResult;\n\tvar Processor;\n\tvar Root = class extends Container {\n\t\tconstructor(defaults) {\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"root\";\n\t\t\tif (!this.nodes) this.nodes = [];\n\t\t}\n\t\tnormalize(child, sample, type) {\n\t\t\tlet keepBefore = /* @__PURE__ */ new Set();\n\t\t\tfor (let node of Array.isArray(child) ? child : [child]) if (node && typeof node === \"object\" && !node.parent && node.raws && typeof node.raws.before !== \"undefined\") keepBefore.add(node.raws);\n\t\t\tlet nodes = super.normalize(child);\n\t\t\tif (sample) {\n\t\t\t\tif (type === \"prepend\") {\n\t\t\t\t\tif (this.nodes.length > 1) sample.raws.before = this.nodes[1].raws.before;\n\t\t\t\t\telse delete sample.raws.before;\n\t\t\t\t} else if (this.first !== sample) {\n\t\t\t\t\tfor (let node of nodes) if (!keepBefore.has(node.raws)) node.raws.before = sample.raws.before;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nodes;\n\t\t}\n\t\tremoveChild(child, ignore) {\n\t\t\tlet index = this.index(child);\n\t\t\tif (!ignore && index === 0 && this.nodes.length > 1) this.nodes[1].raws.before = this.nodes[index].raws.before;\n\t\t\treturn super.removeChild(child);\n\t\t}\n\t\ttoResult(opts = {}) {\n\t\t\treturn new LazyResult(new Processor(), this, opts).stringify();\n\t\t}\n\t};\n\tRoot.registerLazyResult = (dependant) => {\n\t\tLazyResult = dependant;\n\t};\n\tRoot.registerProcessor = (dependant) => {\n\t\tProcessor = dependant;\n\t};\n\tmodule.exports = Root;\n\tRoot.default = Root;\n\tContainer.registerRoot(Root);\n}));\nvar require_list = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar list = {\n\t\tcomma(string) {\n\t\t\treturn list.split(string, [\",\"], true);\n\t\t},\n\t\tspace(string) {\n\t\t\treturn list.split(string, [\n\t\t\t\t\" \",\n\t\t\t\t\"\\n\",\n\t\t\t\t\"\t\"\n\t\t\t]);\n\t\t},\n\t\tsplit(string, separators, last) {\n\t\t\tif (typeof string !== \"string\") return [];\n\t\t\tlet array = [];\n\t\t\tlet current = \"\";\n\t\t\tlet split = false;\n\t\t\tlet func = 0;\n\t\t\tlet inQuote = false;\n\t\t\tlet prevQuote = \"\";\n\t\t\tlet escape = false;\n\t\t\tlet inComment = false;\n\t\t\tfor (let i = 0; i < string.length; i++) {\n\t\t\t\tlet letter = string[i];\n\t\t\t\tif (inComment) {\n\t\t\t\t\tcurrent += letter;\n\t\t\t\t\tif (letter === \"*\" && string[i + 1] === \"/\") {\n\t\t\t\t\t\tcurrent += \"/\";\n\t\t\t\t\t\ti += 1;\n\t\t\t\t\t\tinComment = false;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (escape) escape = false;\n\t\t\t\telse if (letter === \"\\\\\") escape = true;\n\t\t\t\telse if (inQuote) {\n\t\t\t\t\tif (letter === prevQuote) inQuote = false;\n\t\t\t\t} else if (letter === \"\\\"\" || letter === \"'\") {\n\t\t\t\t\tinQuote = true;\n\t\t\t\t\tprevQuote = letter;\n\t\t\t\t} else if (letter === \"/\" && string[i + 1] === \"*\") {\n\t\t\t\t\tcurrent += \"/*\";\n\t\t\t\t\ti += 1;\n\t\t\t\t\tinComment = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (letter === \"(\") func += 1;\n\t\t\t\telse if (letter === \")\") {\n\t\t\t\t\tif (func > 0) func -= 1;\n\t\t\t\t} else if (func === 0) {\n\t\t\t\t\tif (separators.includes(letter)) split = true;\n\t\t\t\t}\n\t\t\t\tif (split) {\n\t\t\t\t\tlet value = current.trim();\n\t\t\t\t\tif (last || value !== \"\") array.push(value);\n\t\t\t\t\tcurrent = \"\";\n\t\t\t\t\tsplit = false;\n\t\t\t\t} else current += letter;\n\t\t\t}\n\t\t\tlet value = current.trim();\n\t\t\tif (last || value !== \"\") array.push(value);\n\t\t\treturn array;\n\t\t}\n\t};\n\tmodule.exports = list;\n\tlist.default = list;\n}));\nvar require_rule = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar list = require_list();\n\tvar Rule = class extends Container {\n\t\tget selectors() {\n\t\t\treturn list.comma(this.selector);\n\t\t}\n\t\tset selectors(values) {\n\t\t\tlet match = this.selector ? this.selector.match(/,\\s*/) : null;\n\t\t\tlet sep = match ? match[0] : \",\" + this.raw(\"between\", \"beforeOpen\");\n\t\t\tthis.selector = values.join(sep);\n\t\t}\n\t\tconstructor(defaults) {\n\t\t\tsuper(defaults);\n\t\t\tthis.type = \"rule\";\n\t\t\tif (!this.nodes) this.nodes = [];\n\t\t}\n\t};\n\tmodule.exports = Rule;\n\tRule.default = Rule;\n\tContainer.registerRule(Rule);\n}));\nvar require_fromJSON = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar AtRule = require_at_rule();\n\tvar Comment = require_comment();\n\tvar Declaration = require_declaration();\n\tvar Input = require_input();\n\tvar PreviousMap = require_previous_map();\n\tvar Root = require_root();\n\tvar Rule = require_rule();\n\tfunction hydrateInputs(json, inputs) {\n\t\tif (!json.inputs) return inputs;\n\t\treturn json.inputs.map((input) => {\n\t\t\tlet inputHydrated = {\n\t\t\t\t...input,\n\t\t\t\t__proto__: Input.prototype\n\t\t\t};\n\t\t\tif (inputHydrated.map) inputHydrated.map = {\n\t\t\t\t...inputHydrated.map,\n\t\t\t\t__proto__: PreviousMap.prototype\n\t\t\t};\n\t\t\treturn inputHydrated;\n\t\t});\n\t}\n\tfunction constructNode(json, inputs, children) {\n\t\tlet defaults = { ...json };\n\t\tdelete defaults.inputs;\n\t\tdelete defaults.nodes;\n\t\tif (defaults.source) {\n\t\t\tlet { inputId, ...source } = defaults.source;\n\t\t\tdefaults.source = source;\n\t\t\tif (inputId != null) defaults.source.input = inputs[inputId];\n\t\t}\n\t\tlet node;\n\t\tif (defaults.type === \"root\") node = new Root(defaults);\n\t\telse if (defaults.type === \"decl\") node = new Declaration(defaults);\n\t\telse if (defaults.type === \"rule\") node = new Rule(defaults);\n\t\telse if (defaults.type === \"comment\") node = new Comment(defaults);\n\t\telse if (defaults.type === \"atrule\") node = new AtRule(defaults);\n\t\telse throw new Error(\"Unknown node type: \" + json.type);\n\t\tif (children) {\n\t\t\tnode.nodes = children;\n\t\t\tfor (let child of children) child.parent = node;\n\t\t}\n\t\treturn node;\n\t}\n\tfunction fromJSON(json, inputs) {\n\t\tif (Array.isArray(json)) return json.map((n) => fromJSON(n));\n\t\tlet result;\n\t\tlet stack = [{\n\t\t\tchildIndex: 0,\n\t\t\tchildren: [],\n\t\t\tinputs: hydrateInputs(json, inputs),\n\t\t\tjson\n\t\t}];\n\t\twhile (stack.length > 0) {\n\t\t\tlet frame = stack[stack.length - 1];\n\t\t\tlet jsonNodes = frame.json.nodes;\n\t\t\tif (jsonNodes && frame.childIndex < jsonNodes.length) {\n\t\t\t\tlet childJson = jsonNodes[frame.childIndex];\n\t\t\t\tframe.childIndex += 1;\n\t\t\t\tstack.push({\n\t\t\t\t\tchildIndex: 0,\n\t\t\t\t\tchildren: [],\n\t\t\t\t\tinputs: hydrateInputs(childJson, frame.inputs),\n\t\t\t\t\tjson: childJson\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstack.pop();\n\t\t\tlet node = constructNode(frame.json, frame.inputs, jsonNodes ? frame.children : void 0);\n\t\t\tif (stack.length > 0) stack[stack.length - 1].children.push(node);\n\t\t\telse result = node;\n\t\t}\n\t\treturn result;\n\t}\n\tmodule.exports = fromJSON;\n\tfromJSON.default = fromJSON;\n}));\nvar require_map_generator = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar { dirname, relative, resolve, sep } = require___vite_browser_external();\n\tvar { SourceMapConsumer, SourceMapGenerator } = require___vite_browser_external();\n\tvar { pathToFileURL } = require___vite_browser_external();\n\tvar Input = require_input();\n\tvar sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);\n\tvar pathAvailable = Boolean(dirname && resolve && relative && sep);\n\tvar MapGenerator = class {\n\t\tconstructor(stringify, root, opts, cssString) {\n\t\t\tthis.stringify = stringify;\n\t\t\tthis.mapOpts = opts.map || {};\n\t\t\tthis.root = root;\n\t\t\tthis.opts = opts;\n\t\t\tthis.css = cssString;\n\t\t\tthis.originalCSS = cssString;\n\t\t\tthis.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;\n\t\t\tthis.memoizedFileURLs = /* @__PURE__ */ new Map();\n\t\t\tthis.memoizedPaths = /* @__PURE__ */ new Map();\n\t\t\tthis.memoizedURLs = /* @__PURE__ */ new Map();\n\t\t}\n\t\taddAnnotation() {\n\t\t\tlet content;\n\t\t\tif (this.isInline()) content = \"data:application/json;base64,\" + this.toBase64(this.map.toString());\n\t\t\telse if (typeof this.mapOpts.annotation === \"string\") content = this.mapOpts.annotation;\n\t\t\telse if (typeof this.mapOpts.annotation === \"function\") content = this.mapOpts.annotation(this.opts.to, this.root);\n\t\t\telse content = this.outputFile() + \".map\";\n\t\t\tlet eol = \"\\n\";\n\t\t\tif (this.css.includes(\"\\r\\n\")) eol = \"\\r\\n\";\n\t\t\tthis.css += eol + \"/*# sourceMappingURL=\" + content + \" */\";\n\t\t}\n\t\tapplyPrevMaps() {\n\t\t\tfor (let prev of this.previous()) {\n\t\t\t\tlet from = this.toUrl(this.path(prev.file));\n\t\t\t\tlet root = prev.root || dirname(prev.file);\n\t\t\t\tlet map;\n\t\t\t\tif (this.mapOpts.sourcesContent === false) {\n\t\t\t\t\tmap = new SourceMapConsumer(prev.text);\n\t\t\t\t\tif (map.sourcesContent) map.sourcesContent = null;\n\t\t\t\t} else map = prev.consumer();\n\t\t\t\tthis.map.applySourceMap(map, from, this.toUrl(this.path(root)));\n\t\t\t}\n\t\t}\n\t\tclearAnnotation() {\n\t\t\tif (this.mapOpts.annotation === false) return;\n\t\t\tif (this.root) {\n\t\t\t\tlet node;\n\t\t\t\tfor (let i = this.root.nodes.length - 1; i >= 0; i--) {\n\t\t\t\t\tnode = this.root.nodes[i];\n\t\t\t\t\tif (node.type !== \"comment\") continue;\n\t\t\t\t\tif (node.text.startsWith(\"# sourceMappingURL=\")) this.root.removeChild(i);\n\t\t\t\t}\n\t\t\t} else if (this.css) {\n\t\t\t\tlet annotation = \"/*# sourceMappingURL=\";\n\t\t\t\tlet css = \"\";\n\t\t\t\tlet cursor = 0;\n\t\t\t\tlet startIndex;\n\t\t\t\twhile ((startIndex = this.css.indexOf(annotation, cursor)) !== -1) {\n\t\t\t\t\tlet endIndex = this.css.indexOf(\"*/\", startIndex + 21);\n\t\t\t\t\tif (endIndex === -1) break;\n\t\t\t\t\twhile (startIndex > cursor && this.css[startIndex - 1] === \"\\n\") startIndex--;\n\t\t\t\t\tcss += this.css.slice(cursor, startIndex);\n\t\t\t\t\tcursor = endIndex + 2;\n\t\t\t\t}\n\t\t\t\tif (cursor > 0) this.css = css + this.css.slice(cursor);\n\t\t\t}\n\t\t}\n\t\tgenerate() {\n\t\t\tthis.clearAnnotation();\n\t\t\tif (pathAvailable && sourceMapAvailable && this.isMap()) return this.generateMap();\n\t\t\telse {\n\t\t\t\tlet result = \"\";\n\t\t\t\tthis.stringify(this.root, (i) => {\n\t\t\t\t\tresult += i;\n\t\t\t\t});\n\t\t\t\treturn [result];\n\t\t\t}\n\t\t}\n\t\tgenerateMap() {\n\t\t\tif (this.root) this.generateString();\n\t\t\telse if (this.previous().length === 1) {\n\t\t\t\tlet prev = this.previous()[0].consumer();\n\t\t\t\tprev.file = this.outputFile();\n\t\t\t\tthis.map = SourceMapGenerator.fromSourceMap(prev, { ignoreInvalidMapping: true });\n\t\t\t} else {\n\t\t\t\tthis.map = new SourceMapGenerator({\n\t\t\t\t\tfile: this.outputFile(),\n\t\t\t\t\tignoreInvalidMapping: true\n\t\t\t\t});\n\t\t\t\tthis.map.addMapping({\n\t\t\t\t\tgenerated: {\n\t\t\t\t\t\tcolumn: 0,\n\t\t\t\t\t\tline: 1\n\t\t\t\t\t},\n\t\t\t\t\toriginal: {\n\t\t\t\t\t\tcolumn: 0,\n\t\t\t\t\t\tline: 1\n\t\t\t\t\t},\n\t\t\t\t\tsource: this.opts.from ? this.toUrl(this.path(this.opts.from)) : \"<no source>\"\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (this.isSourcesContent()) this.setSourcesContent();\n\t\t\tif (this.root && this.previous().length > 0) this.applyPrevMaps();\n\t\t\tif (this.isAnnotation()) this.addAnnotation();\n\t\t\tif (this.isInline()) return [this.css];\n\t\t\telse return [this.css, this.map];\n\t\t}\n\t\tgenerateString() {\n\t\t\tthis.css = \"\";\n\t\t\tthis.map = new SourceMapGenerator({\n\t\t\t\tfile: this.outputFile(),\n\t\t\t\tignoreInvalidMapping: true\n\t\t\t});\n\t\t\tlet line = 1;\n\t\t\tlet column = 1;\n\t\t\tlet noSource = \"<no source>\";\n\t\t\tlet mapping = {\n\t\t\t\tgenerated: {\n\t\t\t\t\tcolumn: 0,\n\t\t\t\t\tline: 0\n\t\t\t\t},\n\t\t\t\toriginal: {\n\t\t\t\t\tcolumn: 0,\n\t\t\t\t\tline: 0\n\t\t\t\t},\n\t\t\t\tsource: \"\"\n\t\t\t};\n\t\t\tlet last, lines;\n\t\t\tthis.stringify(this.root, (str, node, type) => {\n\t\t\t\tthis.css += str;\n\t\t\t\tif (node && type !== \"end\") {\n\t\t\t\t\tmapping.generated.line = line;\n\t\t\t\t\tmapping.generated.column = column - 1;\n\t\t\t\t\tif (node.source && node.source.start) {\n\t\t\t\t\t\tmapping.source = this.sourcePath(node);\n\t\t\t\t\t\tmapping.original.line = node.source.start.line;\n\t\t\t\t\t\tmapping.original.column = node.source.start.column - 1;\n\t\t\t\t\t\tthis.map.addMapping(mapping);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmapping.source = noSource;\n\t\t\t\t\t\tmapping.original.line = 1;\n\t\t\t\t\t\tmapping.original.column = 0;\n\t\t\t\t\t\tthis.map.addMapping(mapping);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlines = str.match(/\\n/g);\n\t\t\t\tif (lines) {\n\t\t\t\t\tline += lines.length;\n\t\t\t\t\tlast = str.lastIndexOf(\"\\n\");\n\t\t\t\t\tcolumn = str.length - last;\n\t\t\t\t} else column += str.length;\n\t\t\t\tif (node && type !== \"start\") {\n\t\t\t\t\tlet p = node.parent || { raws: {} };\n\t\t\t\t\tif (!(node.type === \"decl\" || node.type === \"atrule\" && !node.nodes) || node !== p.last || p.raws.semicolon) {\n\t\t\t\t\t\tif (node.source && node.source.end) {\n\t\t\t\t\t\t\tmapping.source = this.sourcePath(node);\n\t\t\t\t\t\t\tmapping.original.line = node.source.end.line;\n\t\t\t\t\t\t\tmapping.original.column = node.source.end.column - 1;\n\t\t\t\t\t\t\tmapping.generated.line = line;\n\t\t\t\t\t\t\tmapping.generated.column = column - 2;\n\t\t\t\t\t\t\tthis.map.addMapping(mapping);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmapping.source = noSource;\n\t\t\t\t\t\t\tmapping.original.line = 1;\n\t\t\t\t\t\t\tmapping.original.column = 0;\n\t\t\t\t\t\t\tmapping.generated.line = line;\n\t\t\t\t\t\t\tmapping.generated.column = column - 1;\n\t\t\t\t\t\t\tthis.map.addMapping(mapping);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tisAnnotation() {\n\t\t\tif (this.isInline()) return true;\n\t\t\tif (typeof this.mapOpts.annotation !== \"undefined\") return this.mapOpts.annotation;\n\t\t\tif (this.previous().length) return this.previous().some((i) => i.annotation);\n\t\t\treturn true;\n\t\t}\n\t\tisInline() {\n\t\t\tif (typeof this.mapOpts.inline !== \"undefined\") return this.mapOpts.inline;\n\t\t\tlet annotation = this.mapOpts.annotation;\n\t\t\tif (typeof annotation !== \"undefined\" && annotation !== true) return false;\n\t\t\tif (this.previous().length) return this.previous().some((i) => i.inline);\n\t\t\treturn true;\n\t\t}\n\t\tisMap() {\n\t\t\tif (typeof this.opts.map !== \"undefined\") return !!this.opts.map;\n\t\t\treturn this.previous().length > 0;\n\t\t}\n\t\tisSourcesContent() {\n\t\t\tif (typeof this.mapOpts.sourcesContent !== \"undefined\") return this.mapOpts.sourcesContent;\n\t\t\tif (this.previous().length) return this.previous().some((i) => i.withContent());\n\t\t\treturn true;\n\t\t}\n\t\toutputFile() {\n\t\t\tif (this.opts.to) return this.path(this.opts.to);\n\t\t\telse if (this.opts.from) return this.path(this.opts.from);\n\t\t\telse return \"to.css\";\n\t\t}\n\t\tpath(file) {\n\t\t\tif (this.mapOpts.absolute) return file;\n\t\t\tif (file.charCodeAt(0) === 60) return file;\n\t\t\tif (/^\\w+:\\/\\//.test(file)) return file;\n\t\t\tlet cached = this.memoizedPaths.get(file);\n\t\t\tif (cached) return cached;\n\t\t\tlet from = this.opts.to ? dirname(this.opts.to) : \".\";\n\t\t\tif (typeof this.mapOpts.annotation === \"string\") from = dirname(resolve(from, this.mapOpts.annotation));\n\t\t\tlet path = relative(from, file);\n\t\t\tthis.memoizedPaths.set(file, path);\n\t\t\treturn path;\n\t\t}\n\t\tprevious() {\n\t\t\tif (!this.previousMaps) {\n\t\t\t\tthis.previousMaps = [];\n\t\t\t\tif (this.root) this.root.walk((node) => {\n\t\t\t\t\tif (node.source && node.source.input.map) {\n\t\t\t\t\t\tlet map = node.source.input.map;\n\t\t\t\t\t\tif (!this.previousMaps.includes(map)) this.previousMaps.push(map);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tlet input = new Input(this.originalCSS, this.opts);\n\t\t\t\t\tif (input.map) this.previousMaps.push(input.map);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.previousMaps;\n\t\t}\n\t\tsetSourcesContent() {\n\t\t\tlet already = {};\n\t\t\tif (this.root) this.root.walk((node) => {\n\t\t\t\tif (node.source) {\n\t\t\t\t\tlet from = node.source.input.from;\n\t\t\t\t\tif (from && !already[from]) {\n\t\t\t\t\t\talready[from] = true;\n\t\t\t\t\t\tlet fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));\n\t\t\t\t\t\tthis.map.setSourceContent(fromUrl, node.source.input.css);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\telse if (this.css) {\n\t\t\t\tlet from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : \"<no source>\";\n\t\t\t\tthis.map.setSourceContent(from, this.css);\n\t\t\t}\n\t\t}\n\t\tsourcePath(node) {\n\t\t\tif (this.mapOpts.from) return this.toUrl(this.mapOpts.from);\n\t\t\telse if (this.usesFileUrls) return this.toFileUrl(node.source.input.from);\n\t\t\telse return this.toUrl(this.path(node.source.input.from));\n\t\t}\n\t\ttoBase64(str) {\n\t\t\tif (Buffer) return Buffer.from(str).toString(\"base64\");\n\t\t\telse return window.btoa(unescape(encodeURIComponent(str)));\n\t\t}\n\t\ttoFileUrl(path) {\n\t\t\tlet cached = this.memoizedFileURLs.get(path);\n\t\t\tif (cached) return cached;\n\t\t\tif (pathToFileURL) {\n\t\t\t\tlet fileURL = pathToFileURL(path).toString();\n\t\t\t\tthis.memoizedFileURLs.set(path, fileURL);\n\t\t\t\treturn fileURL;\n\t\t\t} else throw new Error(\"`map.absolute` option is not available in this PostCSS build\");\n\t\t}\n\t\ttoUrl(path) {\n\t\t\tlet cached = this.memoizedURLs.get(path);\n\t\t\tif (cached) return cached;\n\t\t\tif (sep === \"\\\\\") path = path.replace(/\\\\/g, \"/\");\n\t\t\tlet url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);\n\t\t\tthis.memoizedURLs.set(path, url);\n\t\t\treturn url;\n\t\t}\n\t};\n\tmodule.exports = MapGenerator;\n}));\nvar require_tokenize = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar SINGLE_QUOTE = \"'\".charCodeAt(0);\n\tvar DOUBLE_QUOTE = \"\\\"\".charCodeAt(0);\n\tvar BACKSLASH = \"\\\\\".charCodeAt(0);\n\tvar SLASH = \"/\".charCodeAt(0);\n\tvar NEWLINE = \"\\n\".charCodeAt(0);\n\tvar SPACE = \" \".charCodeAt(0);\n\tvar FEED = \"\\f\".charCodeAt(0);\n\tvar TAB = \"\t\".charCodeAt(0);\n\tvar CR = \"\\r\".charCodeAt(0);\n\tvar OPEN_SQUARE = \"[\".charCodeAt(0);\n\tvar CLOSE_SQUARE = \"]\".charCodeAt(0);\n\tvar OPEN_PARENTHESES = \"(\".charCodeAt(0);\n\tvar CLOSE_PARENTHESES = \")\".charCodeAt(0);\n\tvar OPEN_CURLY = \"{\".charCodeAt(0);\n\tvar CLOSE_CURLY = \"}\".charCodeAt(0);\n\tvar SEMICOLON = \";\".charCodeAt(0);\n\tvar ASTERISK = \"*\".charCodeAt(0);\n\tvar COLON = \":\".charCodeAt(0);\n\tvar AT = \"@\".charCodeAt(0);\n\tvar RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g;\n\tvar RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g;\n\tvar RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/;\n\tvar RE_HEX_ESCAPE = /[\\da-f]/i;\n\tmodule.exports = function tokenizer(input, options = {}) {\n\t\tlet css = input.css.valueOf();\n\t\tlet ignore = options.ignoreErrors;\n\t\tlet code, content, escape, next, quote;\n\t\tlet currentToken, escaped, escapePos, n, prev;\n\t\tlet length = css.length;\n\t\tlet pos = 0;\n\t\tlet buffer = [];\n\t\tlet returned = [];\n\t\tlet lastBadParen = -1;\n\t\tfunction position() {\n\t\t\treturn pos;\n\t\t}\n\t\tfunction unclosed(what) {\n\t\t\tthrow input.error(\"Unclosed \" + what, pos);\n\t\t}\n\t\tfunction endOfFile() {\n\t\t\treturn returned.length === 0 && pos >= length;\n\t\t}\n\t\tfunction nextToken(opts) {\n\t\t\tif (returned.length) return returned.pop();\n\t\t\tif (pos >= length) return;\n\t\t\tlet ignoreUnclosed = opts ? opts.ignoreUnclosed : false;\n\t\t\tcode = css.charCodeAt(pos);\n\t\t\tswitch (code) {\n\t\t\t\tcase NEWLINE:\n\t\t\t\tcase SPACE:\n\t\t\t\tcase TAB:\n\t\t\t\tcase CR:\n\t\t\t\tcase FEED:\n\t\t\t\t\tnext = pos;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tnext += 1;\n\t\t\t\t\t\tcode = css.charCodeAt(next);\n\t\t\t\t\t} while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);\n\t\t\t\t\tcurrentToken = [\"space\", css.slice(pos, next)];\n\t\t\t\t\tpos = next - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase OPEN_SQUARE:\n\t\t\t\tcase CLOSE_SQUARE:\n\t\t\t\tcase OPEN_CURLY:\n\t\t\t\tcase CLOSE_CURLY:\n\t\t\t\tcase COLON:\n\t\t\t\tcase SEMICOLON:\n\t\t\t\tcase CLOSE_PARENTHESES: {\n\t\t\t\t\tlet controlChar = String.fromCharCode(code);\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\tcontrolChar,\n\t\t\t\t\t\tcontrolChar,\n\t\t\t\t\t\tpos\n\t\t\t\t\t];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase OPEN_PARENTHESES:\n\t\t\t\t\tprev = buffer.length ? buffer.pop()[1] : \"\";\n\t\t\t\t\tn = css.charCodeAt(pos + 1);\n\t\t\t\t\tif (prev === \"url\" && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) {\n\t\t\t\t\t\tnext = pos;\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tescaped = false;\n\t\t\t\t\t\t\tnext = css.indexOf(\")\", next + 1);\n\t\t\t\t\t\t\tif (next === -1) {\n\t\t\t\t\t\t\t\tif (ignore || ignoreUnclosed) {\n\t\t\t\t\t\t\t\t\tnext = pos;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else unclosed(\"bracket\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tescapePos = next;\n\t\t\t\t\t\t\twhile (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n\t\t\t\t\t\t\t\tescapePos -= 1;\n\t\t\t\t\t\t\t\tescaped = !escaped;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (escaped);\n\t\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\t\"brackets\",\n\t\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\t\tpos,\n\t\t\t\t\t\t\tnext\n\t\t\t\t\t\t];\n\t\t\t\t\t\tpos = next;\n\t\t\t\t\t} else if (pos <= lastBadParen) currentToken = [\n\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\tpos\n\t\t\t\t\t];\n\t\t\t\t\telse {\n\t\t\t\t\t\tnext = css.indexOf(\")\", pos + 1);\n\t\t\t\t\t\tcontent = css.slice(pos, next + 1);\n\t\t\t\t\t\tif (next === -1 || RE_BAD_BRACKET.test(content)) {\n\t\t\t\t\t\t\tlastBadParen = next === -1 ? length : next;\n\t\t\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\t\t\t\"(\",\n\t\t\t\t\t\t\t\tpos\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\t\t\"brackets\",\n\t\t\t\t\t\t\t\tcontent,\n\t\t\t\t\t\t\t\tpos,\n\t\t\t\t\t\t\t\tnext\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\tpos = next;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SINGLE_QUOTE:\n\t\t\t\tcase DOUBLE_QUOTE:\n\t\t\t\t\tquote = code === SINGLE_QUOTE ? \"'\" : \"\\\"\";\n\t\t\t\t\tnext = pos;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tescaped = false;\n\t\t\t\t\t\tnext = css.indexOf(quote, next + 1);\n\t\t\t\t\t\tif (next === -1) {\n\t\t\t\t\t\t\tif (ignore || ignoreUnclosed) {\n\t\t\t\t\t\t\t\tnext = pos + 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else unclosed(\"string\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tescapePos = next;\n\t\t\t\t\t\twhile (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n\t\t\t\t\t\t\tescapePos -= 1;\n\t\t\t\t\t\t\tescaped = !escaped;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (escaped);\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"string\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tpos = next;\n\t\t\t\t\tbreak;\n\t\t\t\tcase AT:\n\t\t\t\t\tRE_AT_END.lastIndex = pos + 1;\n\t\t\t\t\tRE_AT_END.test(css);\n\t\t\t\t\tif (RE_AT_END.lastIndex === 0) next = css.length - 1;\n\t\t\t\t\telse next = RE_AT_END.lastIndex - 2;\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"at-word\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tpos = next;\n\t\t\t\t\tbreak;\n\t\t\t\tcase BACKSLASH:\n\t\t\t\t\tnext = pos;\n\t\t\t\t\tescape = true;\n\t\t\t\t\twhile (css.charCodeAt(next + 1) === BACKSLASH) {\n\t\t\t\t\t\tnext += 1;\n\t\t\t\t\t\tescape = !escape;\n\t\t\t\t\t}\n\t\t\t\t\tcode = css.charCodeAt(next + 1);\n\t\t\t\t\tif (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) {\n\t\t\t\t\t\tnext += 1;\n\t\t\t\t\t\tif (RE_HEX_ESCAPE.test(css.charAt(next))) {\n\t\t\t\t\t\t\twhile (RE_HEX_ESCAPE.test(css.charAt(next + 1))) next += 1;\n\t\t\t\t\t\t\tif (css.charCodeAt(next + 1) === SPACE) next += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"word\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tpos = next;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n\t\t\t\t\tnext = css.indexOf(\"*/\", pos + 2) + 1;\n\t\t\t\t\tif (next === 0) {\n\t\t\t\t\t\tif (ignore || ignoreUnclosed) next = css.length;\n\t\t\t\t\t\telse unclosed(\"comment\");\n\t\t\t\t\t}\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"comment\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tpos = next;\n\t\t\t\t} else {\n\t\t\t\t\tRE_WORD_END.lastIndex = pos + 1;\n\t\t\t\t\tRE_WORD_END.test(css);\n\t\t\t\t\tif (RE_WORD_END.lastIndex === 0) next = css.length - 1;\n\t\t\t\t\telse next = RE_WORD_END.lastIndex - 2;\n\t\t\t\t\tcurrentToken = [\n\t\t\t\t\t\t\"word\",\n\t\t\t\t\t\tcss.slice(pos, next + 1),\n\t\t\t\t\t\tpos,\n\t\t\t\t\t\tnext\n\t\t\t\t\t];\n\t\t\t\t\tbuffer.push(currentToken);\n\t\t\t\t\tpos = next;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpos++;\n\t\t\treturn currentToken;\n\t\t}\n\t\tfunction back(token) {\n\t\t\treturned.push(token);\n\t\t}\n\t\treturn {\n\t\t\tback,\n\t\t\tendOfFile,\n\t\t\tnextToken,\n\t\t\tposition\n\t\t};\n\t};\n}));\nvar require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar AtRule = require_at_rule();\n\tvar Comment = require_comment();\n\tvar Declaration = require_declaration();\n\tvar Root = require_root();\n\tvar Rule = require_rule();\n\tvar tokenizer = require_tokenize();\n\tvar SAFE_COMMENT_NEIGHBOR = {\n\t\tempty: true,\n\t\tspace: true\n\t};\n\tfunction findLastWithPosition(tokens) {\n\t\tfor (let i = tokens.length - 1; i >= 0; i--) {\n\t\t\tlet token = tokens[i];\n\t\t\tlet pos = token[3] || token[2];\n\t\t\tif (pos) return pos;\n\t\t}\n\t}\n\tfunction tokensToString(tokens, from, to) {\n\t\tlet result = \"\";\n\t\tfor (let i = from; i < to; i++) result += tokens[i][1];\n\t\treturn result;\n\t}\n\tvar Parser = class {\n\t\tconstructor(input) {\n\t\t\tthis.input = input;\n\t\t\tthis.root = new Root();\n\t\t\tthis.current = this.root;\n\t\t\tthis.spaces = \"\";\n\t\t\tthis.semicolon = false;\n\t\t\tthis.createTokenizer();\n\t\t\tthis.root.source = {\n\t\t\t\tinput,\n\t\t\t\tstart: {\n\t\t\t\t\tcolumn: 1,\n\t\t\t\t\tline: 1,\n\t\t\t\t\toffset: 0\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\tatrule(token) {\n\t\t\tlet node = new AtRule();\n\t\t\tnode.name = token[1].slice(1);\n\t\t\tif (node.name === \"\") this.unnamedAtrule(node, token);\n\t\t\tthis.init(node, token[2]);\n\t\t\tlet type;\n\t\t\tlet prev;\n\t\t\tlet shift;\n\t\t\tlet last = false;\n\t\t\tlet open = false;\n\t\t\tlet params = [];\n\t\t\tlet brackets = [];\n\t\t\twhile (!this.tokenizer.endOfFile()) {\n\t\t\t\ttoken = this.tokenizer.nextToken();\n\t\t\t\ttype = token[0];\n\t\t\t\tif (type === \"(\" || type === \"[\") brackets.push(type === \"(\" ? \")\" : \"]\");\n\t\t\t\telse if (type === \"{\" && brackets.length > 0) brackets.push(\"}\");\n\t\t\t\telse if (type === brackets[brackets.length - 1]) brackets.pop();\n\t\t\t\tif (brackets.length === 0) {\n\t\t\t\t\tif (type === \";\") {\n\t\t\t\t\t\tnode.source.end = this.getPosition(token[2]);\n\t\t\t\t\t\tnode.source.end.offset++;\n\t\t\t\t\t\tthis.semicolon = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (type === \"{\") {\n\t\t\t\t\t\topen = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (type === \"}\") {\n\t\t\t\t\t\tif (params.length > 0) {\n\t\t\t\t\t\t\tshift = params.length - 1;\n\t\t\t\t\t\t\tprev = params[shift];\n\t\t\t\t\t\t\twhile (prev && prev[0] === \"space\") prev = params[--shift];\n\t\t\t\t\t\t\tif (prev) {\n\t\t\t\t\t\t\t\tnode.source.end = this.getPosition(prev[3] || prev[2]);\n\t\t\t\t\t\t\t\tnode.source.end.offset++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.end(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else params.push(token);\n\t\t\t\t} else params.push(token);\n\t\t\t\tif (this.tokenizer.endOfFile()) {\n\t\t\t\t\tlast = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode.raws.between = this.spacesAndCommentsFromEnd(params);\n\t\t\tif (params.length) {\n\t\t\t\tnode.raws.afterName = this.spacesAndCommentsFromStart(params);\n\t\t\t\tthis.raw(node, \"params\", params);\n\t\t\t\tif (last) {\n\t\t\t\t\ttoken = params[params.length - 1];\n\t\t\t\t\tnode.source.end = this.getPosition(token[3] || token[2]);\n\t\t\t\t\tnode.source.end.offset++;\n\t\t\t\t\tthis.spaces = node.raws.between;\n\t\t\t\t\tnode.raws.between = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.raws.afterName = \"\";\n\t\t\t\tnode.params = \"\";\n\t\t\t}\n\t\t\tif (open) {\n\t\t\t\tnode.nodes = [];\n\t\t\t\tthis.current = node;\n\t\t\t}\n\t\t}\n\t\tcheckMissedSemicolon(tokens) {\n\t\t\tlet colon = this.colon(tokens);\n\t\t\tif (colon === false) return;\n\t\t\tlet founded = 0;\n\t\t\tlet token;\n\t\t\tfor (let j = colon - 1; j >= 0; j--) {\n\t\t\t\ttoken = tokens[j];\n\t\t\t\tif (token[0] !== \"space\") {\n\t\t\t\t\tfounded += 1;\n\t\t\t\t\tif (founded === 2) break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow this.input.error(\"Missed semicolon\", token[0] === \"word\" ? token[3] + 1 : token[2]);\n\t\t}\n\t\tcolon(tokens) {\n\t\t\tlet brackets = 0;\n\t\t\tlet prev, token, type;\n\t\t\tfor (let [i, element] of tokens.entries()) {\n\t\t\t\ttoken = element;\n\t\t\t\ttype = token[0];\n\t\t\t\tif (type === \"(\") brackets += 1;\n\t\t\t\tif (type === \")\") brackets -= 1;\n\t\t\t\tif (brackets === 0 && type === \":\") {\n\t\t\t\t\tif (!prev) this.doubleColon(token);\n\t\t\t\t\telse if (prev[0] === \"word\" && prev[1] === \"progid\") continue;\n\t\t\t\t\telse return i;\n\t\t\t\t}\n\t\t\t\tprev = token;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tcomment(token) {\n\t\t\tlet node = new Comment();\n\t\t\tthis.init(node, token[2]);\n\t\t\tnode.source.end = this.getPosition(token[3] || token[2]);\n\t\t\tnode.source.end.offset++;\n\t\t\tlet text = token[1].slice(2, -2);\n\t\t\tif (!text.trim()) {\n\t\t\t\tnode.text = \"\";\n\t\t\t\tnode.raws.left = text;\n\t\t\t\tnode.raws.right = \"\";\n\t\t\t} else {\n\t\t\t\tlet match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/);\n\t\t\t\tnode.text = match[2];\n\t\t\t\tnode.raws.left = match[1];\n\t\t\t\tnode.raws.right = match[3];\n\t\t\t}\n\t\t}\n\t\tcreateTokenizer() {\n\t\t\tthis.tokenizer = tokenizer(this.input);\n\t\t}\n\t\tdecl(tokens, customProperty) {\n\t\t\tlet node = new Declaration();\n\t\t\tthis.init(node, tokens[0][2]);\n\t\t\tlet last = tokens[tokens.length - 1];\n\t\t\tif (last[0] === \";\") {\n\t\t\t\tthis.semicolon = true;\n\t\t\t\ttokens.pop();\n\t\t\t}\n\t\t\tnode.source.end = this.getPosition(last[3] || last[2] || findLastWithPosition(tokens));\n\t\t\tnode.source.end.offset++;\n\t\t\tlet start = 0;\n\t\t\twhile (tokens[start][0] !== \"word\") {\n\t\t\t\tif (start === tokens.length - 1) this.unknownWord([tokens[start]]);\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tnode.raws.before += tokensToString(tokens, 0, start);\n\t\t\tnode.source.start = this.getPosition(tokens[start][2]);\n\t\t\tlet propStart = start;\n\t\t\twhile (start < tokens.length) {\n\t\t\t\tlet type = tokens[start][0];\n\t\t\t\tif (type === \":\" || type === \"space\" || type === \"comment\") break;\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tnode.prop = tokensToString(tokens, propStart, start);\n\t\t\tlet betweenStart = start;\n\t\t\tlet token;\n\t\t\twhile (start < tokens.length) {\n\t\t\t\ttoken = tokens[start];\n\t\t\t\tstart++;\n\t\t\t\tif (token[0] === \":\") break;\n\t\t\t\tif (token[0] === \"word\" && /\\w/.test(token[1])) this.unknownWord([token]);\n\t\t\t}\n\t\t\tnode.raws.between = tokensToString(tokens, betweenStart, start);\n\t\t\tif (node.prop[0] === \"_\" || node.prop[0] === \"*\") {\n\t\t\t\tnode.raws.before += node.prop[0];\n\t\t\t\tnode.prop = node.prop.slice(1);\n\t\t\t}\n\t\t\tlet firstSpacesStart = start;\n\t\t\twhile (start < tokens.length) {\n\t\t\t\tlet next = tokens[start][0];\n\t\t\t\tif (next !== \"space\" && next !== \"comment\") break;\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tlet firstSpaces = tokens.slice(firstSpacesStart, start);\n\t\t\ttokens = tokens.slice(start);\n\t\t\tthis.precheckMissedSemicolon(tokens);\n\t\t\tfor (let i = tokens.length - 1; i >= 0; i--) {\n\t\t\t\ttoken = tokens[i];\n\t\t\t\tif (token[1].toLowerCase() === \"!important\") {\n\t\t\t\t\tnode.important = true;\n\t\t\t\t\tlet string = this.stringFrom(tokens, i);\n\t\t\t\t\tstring = this.spacesFromEnd(tokens) + string;\n\t\t\t\t\tif (string !== \" !important\") node.raws.important = string;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (token[1].toLowerCase() === \"important\") {\n\t\t\t\t\tlet cache = tokens.slice(0);\n\t\t\t\t\tlet str = \"\";\n\t\t\t\t\tfor (let j = i; j > 0; j--) {\n\t\t\t\t\t\tlet type = cache[j][0];\n\t\t\t\t\t\tif (str.trim().startsWith(\"!\") && type !== \"space\") break;\n\t\t\t\t\t\tstr = cache.pop()[1] + str;\n\t\t\t\t\t}\n\t\t\t\t\tif (str.trim().startsWith(\"!\")) {\n\t\t\t\t\t\tnode.important = true;\n\t\t\t\t\t\tnode.raws.important = str;\n\t\t\t\t\t\ttokens = cache;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (token[0] !== \"space\" && token[0] !== \"comment\") break;\n\t\t\t}\n\t\t\tif (tokens.some((i) => i[0] !== \"space\" && i[0] !== \"comment\")) {\n\t\t\t\tnode.raws.between += firstSpaces.map((i) => i[1]).join(\"\");\n\t\t\t\tfirstSpaces = [];\n\t\t\t}\n\t\t\tthis.raw(node, \"value\", firstSpaces.concat(tokens), customProperty);\n\t\t\tif (node.value.includes(\":\") && !customProperty) this.checkMissedSemicolon(tokens);\n\t\t}\n\t\tdoubleColon(token) {\n\t\t\tthrow this.input.error(\"Double colon\", { offset: token[2] }, { offset: token[2] + token[1].length });\n\t\t}\n\t\temptyRule(token) {\n\t\t\tlet node = new Rule();\n\t\t\tthis.init(node, token[2]);\n\t\t\tnode.selector = \"\";\n\t\t\tnode.raws.between = \"\";\n\t\t\tthis.current = node;\n\t\t}\n\t\tend(token) {\n\t\t\tif (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon;\n\t\t\tthis.semicolon = false;\n\t\t\tthis.current.raws.after = (this.current.raws.after || \"\") + this.spaces;\n\t\t\tthis.spaces = \"\";\n\t\t\tif (this.current.parent) {\n\t\t\t\tthis.current.source.end = this.getPosition(token[2]);\n\t\t\t\tthis.current.source.end.offset++;\n\t\t\t\tthis.current = this.current.parent;\n\t\t\t} else this.unexpectedClose(token);\n\t\t}\n\t\tendFile() {\n\t\t\tif (this.current.parent) this.unclosedBlock();\n\t\t\tif (this.current.nodes && this.current.nodes.length) this.current.raws.semicolon = this.semicolon;\n\t\t\tthis.current.raws.after = (this.current.raws.after || \"\") + this.spaces;\n\t\t\tthis.root.source.end = this.getPosition(this.tokenizer.position());\n\t\t}\n\t\tfreeSemicolon(token) {\n\t\t\tthis.spaces += token[1];\n\t\t\tif (this.current.nodes) {\n\t\t\t\tlet prev = this.current.nodes[this.current.nodes.length - 1];\n\t\t\t\tif (prev && prev.type === \"rule\" && !prev.raws.ownSemicolon) {\n\t\t\t\t\tprev.raws.ownSemicolon = this.spaces;\n\t\t\t\t\tthis.spaces = \"\";\n\t\t\t\t\tprev.source.end = this.getPosition(token[2]);\n\t\t\t\t\tprev.source.end.offset++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tgetPosition(offset) {\n\t\t\tlet pos = this.input.fromOffset(offset);\n\t\t\treturn {\n\t\t\t\tcolumn: pos.col,\n\t\t\t\tline: pos.line,\n\t\t\t\toffset\n\t\t\t};\n\t\t}\n\t\tinit(node, offset) {\n\t\t\tthis.current.push(node);\n\t\t\tnode.source = {\n\t\t\t\tinput: this.input,\n\t\t\t\tstart: this.getPosition(offset)\n\t\t\t};\n\t\t\tnode.raws.before = this.spaces;\n\t\t\tthis.spaces = \"\";\n\t\t\tif (node.type !== \"comment\") this.semicolon = false;\n\t\t}\n\t\tother(start) {\n\t\t\tlet end = false;\n\t\t\tlet type = null;\n\t\t\tlet colon = false;\n\t\t\tlet bracket = null;\n\t\t\tlet brackets = [];\n\t\t\tlet customProperty = start[1].startsWith(\"--\");\n\t\t\tlet tokens = [];\n\t\t\tlet token = start;\n\t\t\twhile (token) {\n\t\t\t\ttype = token[0];\n\t\t\t\ttokens.push(token);\n\t\t\t\tif (type === \"(\" || type === \"[\") {\n\t\t\t\t\tif (!bracket) bracket = token;\n\t\t\t\t\tbrackets.push(type === \"(\" ? \")\" : \"]\");\n\t\t\t\t} else if (customProperty && colon && type === \"{\") {\n\t\t\t\t\tif (!bracket) bracket = token;\n\t\t\t\t\tbrackets.push(\"}\");\n\t\t\t\t} else if (brackets.length === 0) {\n\t\t\t\t\tif (type === \";\") {\n\t\t\t\t\t\tif (colon) {\n\t\t\t\t\t\t\tthis.decl(tokens, customProperty);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} else break;\n\t\t\t\t\t} else if (type === \"{\") {\n\t\t\t\t\t\tthis.rule(tokens);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else if (type === \"}\") {\n\t\t\t\t\t\tthis.tokenizer.back(tokens.pop());\n\t\t\t\t\t\tend = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (type === \":\") colon = true;\n\t\t\t\t} else if (type === brackets[brackets.length - 1]) {\n\t\t\t\t\tbrackets.pop();\n\t\t\t\t\tif (brackets.length === 0) bracket = null;\n\t\t\t\t}\n\t\t\t\ttoken = this.tokenizer.nextToken();\n\t\t\t}\n\t\t\tif (this.tokenizer.endOfFile()) end = true;\n\t\t\tif (brackets.length > 0) this.unclosedBracket(bracket);\n\t\t\tif (end && colon) {\n\t\t\t\tif (!customProperty) while (tokens.length) {\n\t\t\t\t\ttoken = tokens[tokens.length - 1][0];\n\t\t\t\t\tif (token !== \"space\" && token !== \"comment\") break;\n\t\t\t\t\tthis.tokenizer.back(tokens.pop());\n\t\t\t\t}\n\t\t\t\tthis.decl(tokens, customProperty);\n\t\t\t} else this.unknownWord(tokens);\n\t\t}\n\t\tparse() {\n\t\t\tlet token;\n\t\t\twhile (!this.tokenizer.endOfFile()) {\n\t\t\t\ttoken = this.tokenizer.nextToken();\n\t\t\t\tswitch (token[0]) {\n\t\t\t\t\tcase \"space\":\n\t\t\t\t\t\tthis.spaces += token[1];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \";\":\n\t\t\t\t\t\tthis.freeSemicolon(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"}\":\n\t\t\t\t\t\tthis.end(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"comment\":\n\t\t\t\t\t\tthis.comment(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"at-word\":\n\t\t\t\t\t\tthis.atrule(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"{\":\n\t\t\t\t\t\tthis.emptyRule(token);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: this.other(token);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.endFile();\n\t\t}\n\t\tprecheckMissedSemicolon() {}\n\t\traw(node, prop, tokens, customProperty) {\n\t\t\tlet token, type;\n\t\t\tlet length = tokens.length;\n\t\t\tlet value = \"\";\n\t\t\tlet last = \"\";\n\t\t\tlet clean = true;\n\t\t\tlet next, prev;\n\t\t\tfor (let i = 0; i < length; i += 1) {\n\t\t\t\ttoken = tokens[i];\n\t\t\t\ttype = token[0];\n\t\t\t\tif (type === \"space\" && i === length - 1 && !customProperty) clean = false;\n\t\t\t\telse if (type === \"comment\") {\n\t\t\t\t\tprev = tokens[i - 1] ? tokens[i - 1][0] : \"empty\";\n\t\t\t\t\tnext = tokens[i + 1] ? tokens[i + 1][0] : \"empty\";\n\t\t\t\t\tif (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n\t\t\t\t\t\tif (last === \",\") clean = false;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvalue += token[1];\n\t\t\t\t\t\t\tlast = token[1].slice(-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else clean = false;\n\t\t\t\t} else {\n\t\t\t\t\tvalue += token[1];\n\t\t\t\t\tlast = token[1].slice(-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!clean) {\n\t\t\t\tlet raw = tokens.reduce((all, i) => all + i[1], \"\");\n\t\t\t\tnode.raws[prop] = {\n\t\t\t\t\traw,\n\t\t\t\t\tvalue\n\t\t\t\t};\n\t\t\t}\n\t\t\tnode[prop] = value;\n\t\t}\n\t\trule(tokens) {\n\t\t\ttokens.pop();\n\t\t\tlet node = new Rule();\n\t\t\tthis.init(node, tokens[0][2]);\n\t\t\tnode.raws.between = this.spacesAndCommentsFromEnd(tokens);\n\t\t\tthis.raw(node, \"selector\", tokens);\n\t\t\tthis.current = node;\n\t\t}\n\t\tspacesAndCommentsFromEnd(tokens) {\n\t\t\tlet lastTokenType;\n\t\t\tlet spaces = \"\";\n\t\t\twhile (tokens.length) {\n\t\t\t\tlastTokenType = tokens[tokens.length - 1][0];\n\t\t\t\tif (lastTokenType !== \"space\" && lastTokenType !== \"comment\") break;\n\t\t\t\tspaces = tokens.pop()[1] + spaces;\n\t\t\t}\n\t\t\treturn spaces;\n\t\t}\n\t\tspacesAndCommentsFromStart(tokens) {\n\t\t\tlet next;\n\t\t\tlet spaces = \"\";\n\t\t\twhile (tokens.length) {\n\t\t\t\tnext = tokens[0][0];\n\t\t\t\tif (next !== \"space\" && next !== \"comment\") break;\n\t\t\t\tspaces += tokens.shift()[1];\n\t\t\t}\n\t\t\treturn spaces;\n\t\t}\n\t\tspacesFromEnd(tokens) {\n\t\t\tlet lastTokenType;\n\t\t\tlet spaces = \"\";\n\t\t\twhile (tokens.length) {\n\t\t\t\tlastTokenType = tokens[tokens.length - 1][0];\n\t\t\t\tif (lastTokenType !== \"space\") break;\n\t\t\t\tspaces = tokens.pop()[1] + spaces;\n\t\t\t}\n\t\t\treturn spaces;\n\t\t}\n\t\tstringFrom(tokens, from) {\n\t\t\tlet result = \"\";\n\t\t\tfor (let i = from; i < tokens.length; i++) result += tokens[i][1];\n\t\t\ttokens.splice(from, tokens.length - from);\n\t\t\treturn result;\n\t\t}\n\t\tunclosedBlock() {\n\t\t\tlet pos = this.current.source.start;\n\t\t\tthrow this.input.error(\"Unclosed block\", pos.line, pos.column);\n\t\t}\n\t\tunclosedBracket(bracket) {\n\t\t\tthrow this.input.error(\"Unclosed bracket\", { offset: bracket[2] }, { offset: bracket[2] + 1 });\n\t\t}\n\t\tunexpectedClose(token) {\n\t\t\tthrow this.input.error(\"Unexpected }\", { offset: token[2] }, { offset: token[2] + 1 });\n\t\t}\n\t\tunknownWord(tokens) {\n\t\t\tthrow this.input.error(\"Unknown word \" + tokens[0][1], { offset: tokens[0][2] }, { offset: tokens[0][2] + tokens[0][1].length });\n\t\t}\n\t\tunnamedAtrule(node, token) {\n\t\t\tthrow this.input.error(\"At-rule without name\", { offset: token[2] }, { offset: token[2] + token[1].length });\n\t\t}\n\t};\n\tmodule.exports = Parser;\n}));\nvar require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar Input = require_input();\n\tvar Parser = require_parser();\n\tfunction parse(css, opts) {\n\t\tlet parser = new Parser(new Input(css, opts));\n\t\ttry {\n\t\t\tparser.parse();\n\t\t} catch (e) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (e.name === \"CssSyntaxError\" && opts && opts.from) {\n\t\t\t\t\tif (/\\.scss$/i.test(opts.from)) e.message += \"\\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser\";\n\t\t\t\t\telse if (/\\.sass/i.test(opts.from)) e.message += \"\\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser\";\n\t\t\t\t\telse if (/\\.less$/i.test(opts.from)) e.message += \"\\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow e;\n\t\t}\n\t\treturn parser.root;\n\t}\n\tmodule.exports = parse;\n\tparse.default = parse;\n\tContainer.registerParse(parse);\n}));\nvar require_warning = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar { my } = require_symbols();\n\tvar Warning = class {\n\t\tconstructor(text, opts = {}) {\n\t\t\tthis.type = \"warning\";\n\t\t\tthis.text = text;\n\t\t\tif (opts.node && opts.node.source) {\n\t\t\t\tif (!opts.node[my]) Container.rebuild(opts.node);\n\t\t\t\tlet range = opts.node.rangeBy(opts);\n\t\t\t\tthis.line = range.start.line;\n\t\t\t\tthis.column = range.start.column;\n\t\t\t\tthis.endLine = range.end.line;\n\t\t\t\tthis.endColumn = range.end.column;\n\t\t\t}\n\t\t\tfor (let opt in opts) this[opt] = opts[opt];\n\t\t}\n\t\ttoString() {\n\t\t\tif (this.node) return this.node.error(this.text, {\n\t\t\t\tindex: this.index,\n\t\t\t\tplugin: this.plugin,\n\t\t\t\tstart: this.start,\n\t\t\t\tword: this.word\n\t\t\t}).message;\n\t\t\tif (this.plugin) return this.plugin + \": \" + this.text;\n\t\t\treturn this.text;\n\t\t}\n\t};\n\tmodule.exports = Warning;\n\tWarning.default = Warning;\n}));\nvar require_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Warning = require_warning();\n\tvar Result = class {\n\t\tget content() {\n\t\t\treturn this.css;\n\t\t}\n\t\tconstructor(processor, root, opts) {\n\t\t\tthis.processor = processor;\n\t\t\tthis.messages = [];\n\t\t\tthis.root = root;\n\t\t\tthis.opts = opts;\n\t\t\tthis.css = \"\";\n\t\t\tthis.map = void 0;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.css;\n\t\t}\n\t\twarn(text, opts = {}) {\n\t\t\tif (!opts.plugin) {\n\t\t\t\tif (this.lastPlugin && this.lastPlugin.postcssPlugin) opts.plugin = this.lastPlugin.postcssPlugin;\n\t\t\t}\n\t\t\tlet warning = new Warning(text, opts);\n\t\t\tthis.messages.push(warning);\n\t\t\treturn warning;\n\t\t}\n\t\twarnings() {\n\t\t\treturn this.messages.filter((i) => i.type === \"warning\");\n\t\t}\n\t};\n\tmodule.exports = Result;\n\tResult.default = Result;\n}));\nvar require_warn_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar printed = {};\n\tmodule.exports = function warnOnce(message) {\n\t\tif (printed[message]) return;\n\t\tprinted[message] = true;\n\t\tif (typeof console !== \"undefined\" && console.warn) console.warn(message);\n\t};\n}));\nvar require_lazy_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Container = require_container();\n\tvar Document = require_document();\n\tvar MapGenerator = require_map_generator();\n\tvar parse = require_parse();\n\tvar Result = require_result();\n\tvar Root = require_root();\n\tvar stringify = require_stringify();\n\tvar { isClean, my } = require_symbols();\n\tvar warnOnce = require_warn_once();\n\tvar TYPE_TO_CLASS_NAME = {\n\t\tatrule: \"AtRule\",\n\t\tcomment: \"Comment\",\n\t\tdecl: \"Declaration\",\n\t\tdocument: \"Document\",\n\t\troot: \"Root\",\n\t\trule: \"Rule\"\n\t};\n\tvar PLUGIN_PROPS = {\n\t\tAtRule: true,\n\t\tAtRuleExit: true,\n\t\tComment: true,\n\t\tCommentExit: true,\n\t\tDeclaration: true,\n\t\tDeclarationExit: true,\n\t\tDocument: true,\n\t\tDocumentExit: true,\n\t\tOnce: true,\n\t\tOnceExit: true,\n\t\tpostcssPlugin: true,\n\t\tprepare: true,\n\t\tRoot: true,\n\t\tRootExit: true,\n\t\tRule: true,\n\t\tRuleExit: true\n\t};\n\tvar NOT_VISITORS = {\n\t\tOnce: true,\n\t\tpostcssPlugin: true,\n\t\tprepare: true\n\t};\n\tvar CHILDREN = 0;\n\tfunction isPromise(obj) {\n\t\treturn typeof obj === \"object\" && typeof obj.then === \"function\";\n\t}\n\tfunction getEvents(node) {\n\t\tlet key = false;\n\t\tlet type = TYPE_TO_CLASS_NAME[node.type];\n\t\tif (node.type === \"decl\") key = node.prop.toLowerCase();\n\t\telse if (node.type === \"atrule\") key = node.name.toLowerCase();\n\t\tif (key && node.append) return [\n\t\t\ttype,\n\t\t\ttype + \"-\" + key,\n\t\t\tCHILDREN,\n\t\t\ttype + \"Exit\",\n\t\t\ttype + \"Exit-\" + key\n\t\t];\n\t\telse if (key) return [\n\t\t\ttype,\n\t\t\ttype + \"-\" + key,\n\t\t\ttype + \"Exit\",\n\t\t\ttype + \"Exit-\" + key\n\t\t];\n\t\telse if (node.append) return [\n\t\t\ttype,\n\t\t\tCHILDREN,\n\t\t\ttype + \"Exit\"\n\t\t];\n\t\telse return [type, type + \"Exit\"];\n\t}\n\tfunction toStack(node) {\n\t\tlet events;\n\t\tif (node.type === \"document\") events = [\n\t\t\t\"Document\",\n\t\t\tCHILDREN,\n\t\t\t\"DocumentExit\"\n\t\t];\n\t\telse if (node.type === \"root\") events = [\n\t\t\t\"Root\",\n\t\t\tCHILDREN,\n\t\t\t\"RootExit\"\n\t\t];\n\t\telse events = getEvents(node);\n\t\treturn {\n\t\t\teventIndex: 0,\n\t\t\tevents,\n\t\t\titerator: 0,\n\t\t\tnode,\n\t\t\tvisitorIndex: 0,\n\t\t\tvisitors: []\n\t\t};\n\t}\n\tfunction cleanMarks(node) {\n\t\tlet stack = [node];\n\t\twhile (stack.length > 0) {\n\t\t\tlet next = stack.pop();\n\t\t\tnext[isClean] = false;\n\t\t\tif (next.nodes) for (let i of next.nodes) stack.push(i);\n\t\t}\n\t\treturn node;\n\t}\n\tvar postcss = {};\n\tvar LazyResult = class LazyResult {\n\t\tget content() {\n\t\t\treturn this.stringify().content;\n\t\t}\n\t\tget css() {\n\t\t\treturn this.stringify().css;\n\t\t}\n\t\tget map() {\n\t\t\treturn this.stringify().map;\n\t\t}\n\t\tget messages() {\n\t\t\treturn this.sync().messages;\n\t\t}\n\t\tget opts() {\n\t\t\treturn this.result.opts;\n\t\t}\n\t\tget processor() {\n\t\t\treturn this.result.processor;\n\t\t}\n\t\tget root() {\n\t\t\treturn this.sync().root;\n\t\t}\n\t\tget [Symbol.toStringTag]() {\n\t\t\treturn \"LazyResult\";\n\t\t}\n\t\tconstructor(processor, css, opts) {\n\t\t\tthis.stringified = false;\n\t\t\tthis.processed = false;\n\t\t\tlet root;\n\t\t\tif (typeof css === \"object\" && css !== null && (css.type === \"root\" || css.type === \"document\")) root = cleanMarks(css);\n\t\t\telse if (css instanceof LazyResult || css instanceof Result) {\n\t\t\t\troot = cleanMarks(css.root);\n\t\t\t\tif (css.map) {\n\t\t\t\t\tif (typeof opts.map === \"undefined\") opts.map = {};\n\t\t\t\t\tif (!opts.map.inline) opts.map.inline = false;\n\t\t\t\t\topts.map.prev = css.map;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlet parser = parse;\n\t\t\t\tif (opts.syntax) parser = opts.syntax.parse;\n\t\t\t\tif (opts.parser) parser = opts.parser;\n\t\t\t\tif (parser.parse) parser = parser.parse;\n\t\t\t\ttry {\n\t\t\t\t\troot = parser(css, opts);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.processed = true;\n\t\t\t\t\tthis.error = error;\n\t\t\t\t}\n\t\t\t\tif (root && !root[my])\n /* c8 ignore next 2 */\n\t\t\t\tContainer.rebuild(root);\n\t\t\t}\n\t\t\tthis.result = new Result(processor, root, opts);\n\t\t\tthis.helpers = {\n\t\t\t\t...postcss,\n\t\t\t\tpostcss,\n\t\t\t\tresult: this.result\n\t\t\t};\n\t\t\tthis.plugins = this.processor.plugins.map((plugin) => {\n\t\t\t\tif (typeof plugin === \"object\" && plugin.prepare) return {\n\t\t\t\t\t...plugin,\n\t\t\t\t\t...plugin.prepare(this.result)\n\t\t\t\t};\n\t\t\t\telse return plugin;\n\t\t\t});\n\t\t}\n\t\tasync() {\n\t\t\tif (this.error) return Promise.reject(this.error);\n\t\t\tif (this.processed) return Promise.resolve(this.result);\n\t\t\tif (!this.processing) this.processing = this.runAsync();\n\t\t\treturn this.processing;\n\t\t}\n\t\tcatch(onRejected) {\n\t\t\treturn this.async().catch(onRejected);\n\t\t}\n\t\tfinally(onFinally) {\n\t\t\treturn this.async().finally(onFinally);\n\t\t}\n\t\tgetAsyncError() {\n\t\t\tthrow new Error(\"Use process(css).then(cb) to work with async plugins\");\n\t\t}\n\t\thandleError(error, node) {\n\t\t\tlet plugin = this.result.lastPlugin;\n\t\t\ttry {\n\t\t\t\tif (node) node.addToError(error);\n\t\t\t\tthis.error = error;\n\t\t\t\tif (error.name === \"CssSyntaxError\" && !error.plugin) {\n\t\t\t\t\terror.plugin = plugin.postcssPlugin;\n\t\t\t\t\terror.setMessage();\n\t\t\t\t} else if (plugin.postcssVersion) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\t\t\tlet pluginName = plugin.postcssPlugin;\n\t\t\t\t\t\tlet pluginVer = plugin.postcssVersion;\n\t\t\t\t\t\tlet runtimeVer = this.result.processor.version;\n\t\t\t\t\t\tlet a = pluginVer.split(\".\");\n\t\t\t\t\t\tlet b = runtimeVer.split(\".\");\n\t\t\t\t\t\tif (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) console.error(\"Unknown error from PostCSS plugin. Your current PostCSS version is \" + runtimeVer + \", but \" + pluginName + \" uses \" + pluginVer + \". Perhaps this is the source of the error below.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\t/* c8 ignore next 3 */\n\t\t\t\tif (console && console.error) console.error(err);\n\t\t\t}\n\t\t\treturn error;\n\t\t}\n\t\tprepareVisitors() {\n\t\t\tthis.listeners = {};\n\t\t\tlet add = (plugin, type, cb) => {\n\t\t\t\tif (!this.listeners[type]) this.listeners[type] = [];\n\t\t\t\tthis.listeners[type].push([plugin, cb]);\n\t\t\t};\n\t\t\tfor (let plugin of this.plugins) if (typeof plugin === \"object\") for (let event in plugin) {\n\t\t\t\tif (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) throw new Error(`Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);\n\t\t\t\tif (!NOT_VISITORS[event]) {\n\t\t\t\t\tif (typeof plugin[event] === \"object\") for (let filter in plugin[event]) if (filter === \"*\") add(plugin, event, plugin[event][filter]);\n\t\t\t\t\telse add(plugin, event + \"-\" + filter.toLowerCase(), plugin[event][filter]);\n\t\t\t\t\telse if (typeof plugin[event] === \"function\") add(plugin, event, plugin[event]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.hasListener = Object.keys(this.listeners).length > 0;\n\t\t}\n\t\tasync runAsync() {\n\t\t\tthis.plugin = 0;\n\t\t\tfor (let i = 0; i < this.plugins.length; i++) {\n\t\t\t\tlet plugin = this.plugins[i];\n\t\t\t\tlet promise = this.runOnRoot(plugin);\n\t\t\t\tif (isPromise(promise)) try {\n\t\t\t\t\tawait promise;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow this.handleError(error);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.prepareVisitors();\n\t\t\tif (this.hasListener) {\n\t\t\t\tlet root = this.result.root;\n\t\t\t\twhile (!root[isClean]) {\n\t\t\t\t\troot[isClean] = true;\n\t\t\t\t\tlet stack = [toStack(root)];\n\t\t\t\t\twhile (stack.length > 0) {\n\t\t\t\t\t\tlet promise = this.visitTick(stack);\n\t\t\t\t\t\tif (isPromise(promise)) try {\n\t\t\t\t\t\t\tawait promise;\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tlet node = stack[stack.length - 1].node;\n\t\t\t\t\t\t\tthrow this.handleError(e, node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (this.listeners.OnceExit) for (let [plugin, visitor] of this.listeners.OnceExit) {\n\t\t\t\t\tthis.result.lastPlugin = plugin;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (root.type === \"document\") {\n\t\t\t\t\t\t\tlet roots = root.nodes.map((subRoot) => visitor(subRoot, this.helpers));\n\t\t\t\t\t\t\tawait Promise.all(roots);\n\t\t\t\t\t\t} else await visitor(root, this.helpers);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tthrow this.handleError(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.processed = true;\n\t\t\treturn this.stringify();\n\t\t}\n\t\trunOnRoot(plugin) {\n\t\t\tthis.result.lastPlugin = plugin;\n\t\t\ttry {\n\t\t\t\tif (typeof plugin === \"object\" && plugin.Once) {\n\t\t\t\t\tif (this.result.root.type === \"document\") {\n\t\t\t\t\t\tlet roots = this.result.root.nodes.map((root) => plugin.Once(root, this.helpers));\n\t\t\t\t\t\tif (isPromise(roots[0])) return Promise.all(roots);\n\t\t\t\t\t\treturn roots;\n\t\t\t\t\t}\n\t\t\t\t\treturn plugin.Once(this.result.root, this.helpers);\n\t\t\t\t} else if (typeof plugin === \"function\") return plugin(this.result.root, this.result);\n\t\t\t} catch (error) {\n\t\t\t\tthrow this.handleError(error);\n\t\t\t}\n\t\t}\n\t\tstringify() {\n\t\t\tif (this.error) throw this.error;\n\t\t\tif (this.stringified) return this.result;\n\t\t\tthis.stringified = true;\n\t\t\tthis.sync();\n\t\t\tlet opts = this.result.opts;\n\t\t\tlet str = stringify;\n\t\t\tif (opts.syntax) str = opts.syntax.stringify;\n\t\t\tif (opts.stringifier) str = opts.stringifier;\n\t\t\tif (str.stringify) str = str.stringify;\n\t\t\tlet rootSource = this.result.root.source;\n\t\t\tif (opts.map === void 0 && !(rootSource && rootSource.input && rootSource.input.map)) {\n\t\t\t\tlet result = \"\";\n\t\t\t\tstr(this.result.root, (i) => {\n\t\t\t\t\tresult += i;\n\t\t\t\t});\n\t\t\t\tthis.result.css = result;\n\t\t\t\treturn this.result;\n\t\t\t}\n\t\t\tlet data = new MapGenerator(str, this.result.root, this.result.opts).generate();\n\t\t\tthis.result.css = data[0];\n\t\t\tthis.result.map = data[1];\n\t\t\treturn this.result;\n\t\t}\n\t\tsync() {\n\t\t\tif (this.error) throw this.error;\n\t\t\tif (this.processed) return this.result;\n\t\t\tthis.processed = true;\n\t\t\tif (this.processing) throw this.getAsyncError();\n\t\t\tfor (let plugin of this.plugins) if (isPromise(this.runOnRoot(plugin))) throw this.getAsyncError();\n\t\t\tthis.prepareVisitors();\n\t\t\tif (this.hasListener) {\n\t\t\t\tlet root = this.result.root;\n\t\t\t\twhile (!root[isClean]) {\n\t\t\t\t\troot[isClean] = true;\n\t\t\t\t\tthis.walkSync(root);\n\t\t\t\t}\n\t\t\t\tif (this.listeners.OnceExit) {\n\t\t\t\t\tif (root.type === \"document\") for (let subRoot of root.nodes) this.visitSync(this.listeners.OnceExit, subRoot);\n\t\t\t\t\telse this.visitSync(this.listeners.OnceExit, root);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.result;\n\t\t}\n\t\tthen(onFulfilled, onRejected) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!(\"from\" in this.opts)) warnOnce(\"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.\");\n\t\t\t}\n\t\t\treturn this.async().then(onFulfilled, onRejected);\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.css;\n\t\t}\n\t\tvisitSync(visitors, node) {\n\t\t\tfor (let [plugin, visitor] of visitors) {\n\t\t\t\tthis.result.lastPlugin = plugin;\n\t\t\t\tlet promise;\n\t\t\t\ttry {\n\t\t\t\t\tpromise = visitor(node, this.helpers);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow this.handleError(e, node.proxyOf);\n\t\t\t\t}\n\t\t\t\tif (node.type !== \"root\" && node.type !== \"document\" && !node.parent) return true;\n\t\t\t\tif (isPromise(promise)) throw this.getAsyncError();\n\t\t\t}\n\t\t}\n\t\tvisitTick(stack) {\n\t\t\tlet visit = stack[stack.length - 1];\n\t\t\tlet { node, visitors } = visit;\n\t\t\tif (node.type !== \"root\" && node.type !== \"document\" && !node.parent) {\n\t\t\t\tstack.pop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (visitors.length > 0 && visit.visitorIndex < visitors.length) {\n\t\t\t\tlet [plugin, visitor] = visitors[visit.visitorIndex];\n\t\t\t\tvisit.visitorIndex += 1;\n\t\t\t\tif (visit.visitorIndex === visitors.length) {\n\t\t\t\t\tvisit.visitors = [];\n\t\t\t\t\tvisit.visitorIndex = 0;\n\t\t\t\t}\n\t\t\t\tthis.result.lastPlugin = plugin;\n\t\t\t\ttry {\n\t\t\t\t\treturn visitor(node.toProxy(), this.helpers);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tthrow this.handleError(e, node);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (visit.iterator !== 0) {\n\t\t\t\tlet iterator = visit.iterator;\n\t\t\t\tif (visit.descending) {\n\t\t\t\t\tvisit.descending = false;\n\t\t\t\t\tnode.indexes[iterator] += 1;\n\t\t\t\t}\n\t\t\t\tlet child;\n\t\t\t\twhile (child = node.nodes[node.indexes[iterator]]) {\n\t\t\t\t\tif (!child[isClean]) {\n\t\t\t\t\t\tchild[isClean] = true;\n\t\t\t\t\t\tvisit.descending = true;\n\t\t\t\t\t\tstack.push(toStack(child));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnode.indexes[iterator] += 1;\n\t\t\t\t}\n\t\t\t\tvisit.iterator = 0;\n\t\t\t\tdelete node.indexes[iterator];\n\t\t\t}\n\t\t\tlet events = visit.events;\n\t\t\twhile (visit.eventIndex < events.length) {\n\t\t\t\tlet event = events[visit.eventIndex];\n\t\t\t\tvisit.eventIndex += 1;\n\t\t\t\tif (event === CHILDREN) {\n\t\t\t\t\tif (node.nodes && node.nodes.length) {\n\t\t\t\t\t\tnode[isClean] = true;\n\t\t\t\t\t\tvisit.iterator = node.getIterator();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t} else if (this.listeners[event]) {\n\t\t\t\t\tvisit.visitors = this.listeners[event];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstack.pop();\n\t\t}\n\t\twalkSync(node) {\n\t\t\tnode[isClean] = true;\n\t\t\tlet stack = [{\n\t\t\t\teventIndex: 0,\n\t\t\t\tevents: getEvents(node),\n\t\t\t\titerator: 0,\n\t\t\t\tnode\n\t\t\t}];\n\t\t\twhile (stack.length > 0) {\n\t\t\t\tlet visit = stack[stack.length - 1];\n\t\t\t\tlet visitNode = visit.node;\n\t\t\t\tif (visit.iterator !== 0) {\n\t\t\t\t\tlet iterator = visit.iterator;\n\t\t\t\t\tif (visit.descending) {\n\t\t\t\t\t\tvisit.descending = false;\n\t\t\t\t\t\tvisitNode.indexes[iterator] += 1;\n\t\t\t\t\t}\n\t\t\t\t\tlet child;\n\t\t\t\t\tlet descended = false;\n\t\t\t\t\twhile (child = visitNode.nodes[visitNode.indexes[iterator]]) {\n\t\t\t\t\t\tif (!child[isClean]) {\n\t\t\t\t\t\t\tchild[isClean] = true;\n\t\t\t\t\t\t\tvisit.descending = true;\n\t\t\t\t\t\t\tstack.push({\n\t\t\t\t\t\t\t\teventIndex: 0,\n\t\t\t\t\t\t\t\tevents: getEvents(child),\n\t\t\t\t\t\t\t\titerator: 0,\n\t\t\t\t\t\t\t\tnode: child\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tdescended = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvisitNode.indexes[iterator] += 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (descended) continue;\n\t\t\t\t\tvisit.iterator = 0;\n\t\t\t\t\tdelete visitNode.indexes[iterator];\n\t\t\t\t}\n\t\t\t\tif (visit.eventIndex < visit.events.length) {\n\t\t\t\t\tlet event = visit.events[visit.eventIndex];\n\t\t\t\t\tvisit.eventIndex += 1;\n\t\t\t\t\tif (event === CHILDREN) {\n\t\t\t\t\t\tif (visitNode.nodes && visitNode.nodes.length) visit.iterator = visitNode.getIterator();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet visitors = this.listeners[event];\n\t\t\t\t\t\tif (visitors) {\n\t\t\t\t\t\t\tif (this.visitSync(visitors, visitNode.toProxy())) stack.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstack.pop();\n\t\t\t}\n\t\t}\n\t\twarnings() {\n\t\t\treturn this.sync().warnings();\n\t\t}\n\t};\n\tLazyResult.registerPostcss = (dependant) => {\n\t\tpostcss = dependant;\n\t};\n\tmodule.exports = LazyResult;\n\tLazyResult.default = LazyResult;\n\tRoot.registerLazyResult(LazyResult);\n\tDocument.registerLazyResult(LazyResult);\n}));\nvar require_no_work_result = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar MapGenerator = require_map_generator();\n\tvar parse = require_parse();\n\tvar Result = require_result();\n\tvar stringify = require_stringify();\n\tvar warnOnce = require_warn_once();\n\tvar NoWorkResult = class {\n\t\tget content() {\n\t\t\treturn this.result.css;\n\t\t}\n\t\tget css() {\n\t\t\treturn this.result.css;\n\t\t}\n\t\tget map() {\n\t\t\treturn this.result.map;\n\t\t}\n\t\tget messages() {\n\t\t\treturn [];\n\t\t}\n\t\tget opts() {\n\t\t\treturn this.result.opts;\n\t\t}\n\t\tget processor() {\n\t\t\treturn this.result.processor;\n\t\t}\n\t\tget root() {\n\t\t\tif (this._root) return this._root;\n\t\t\tlet root;\n\t\t\tlet parser = parse;\n\t\t\ttry {\n\t\t\t\troot = parser(this._css, this._opts);\n\t\t\t} catch (error) {\n\t\t\t\tthis.error = error;\n\t\t\t}\n\t\t\tif (this.error) throw this.error;\n\t\t\telse {\n\t\t\t\tthis._root = root;\n\t\t\t\treturn root;\n\t\t\t}\n\t\t}\n\t\tget [Symbol.toStringTag]() {\n\t\t\treturn \"NoWorkResult\";\n\t\t}\n\t\tconstructor(processor, css, opts) {\n\t\t\tcss = css.toString();\n\t\t\tthis.stringified = false;\n\t\t\tthis._processor = processor;\n\t\t\tthis._css = css;\n\t\t\tthis._opts = opts;\n\t\t\tthis._map = void 0;\n\t\t\tlet str = stringify;\n\t\t\tthis.result = new Result(this._processor, void 0, this._opts);\n\t\t\tthis.result.css = css;\n\t\t\tlet self = this;\n\t\t\tObject.defineProperty(this.result, \"root\", { get() {\n\t\t\t\treturn self.root;\n\t\t\t} });\n\t\t\tlet map = new MapGenerator(str, void 0, this._opts, css);\n\t\t\tif (map.isMap()) {\n\t\t\t\tlet [generatedCSS, generatedMap] = map.generate();\n\t\t\t\tif (generatedCSS) this.result.css = generatedCSS;\n\t\t\t\tif (generatedMap) this.result.map = generatedMap;\n\t\t\t} else {\n\t\t\t\tmap.clearAnnotation();\n\t\t\t\tthis.result.css = map.css;\n\t\t\t}\n\t\t}\n\t\tasync() {\n\t\t\tif (this.error) return Promise.reject(this.error);\n\t\t\treturn Promise.resolve(this.result);\n\t\t}\n\t\tcatch(onRejected) {\n\t\t\treturn this.async().catch(onRejected);\n\t\t}\n\t\tfinally(onFinally) {\n\t\t\treturn this.async().finally(onFinally);\n\t\t}\n\t\tsync() {\n\t\t\tif (this.error) throw this.error;\n\t\t\treturn this.result;\n\t\t}\n\t\tthen(onFulfilled, onRejected) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!(\"from\" in this._opts)) warnOnce(\"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.\");\n\t\t\t}\n\t\t\treturn this.async().then(onFulfilled, onRejected);\n\t\t}\n\t\ttoString() {\n\t\t\treturn this._css;\n\t\t}\n\t\twarnings() {\n\t\t\treturn [];\n\t\t}\n\t};\n\tmodule.exports = NoWorkResult;\n\tNoWorkResult.default = NoWorkResult;\n}));\nvar require_processor = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar Document = require_document();\n\tvar LazyResult = require_lazy_result();\n\tvar NoWorkResult = require_no_work_result();\n\tvar Root = require_root();\n\tvar Processor = class {\n\t\tconstructor(plugins = []) {\n\t\t\tthis.version = \"8.5.32\";\n\t\t\tthis.plugins = this.normalize(plugins);\n\t\t}\n\t\tnormalize(plugins) {\n\t\t\tlet normalized = [];\n\t\t\tfor (let i of plugins) {\n\t\t\t\tif (i.postcss === true) i = i();\n\t\t\t\telse if (i.postcss) i = i.postcss;\n\t\t\t\tif (typeof i === \"object\" && Array.isArray(i.plugins)) normalized = normalized.concat(i.plugins);\n\t\t\t\telse if (typeof i === \"object\" && i.postcssPlugin) normalized.push(i);\n\t\t\t\telse if (typeof i === \"function\") normalized.push(i);\n\t\t\t\telse if (typeof i === \"object\" && (i.parse || i.stringify)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(\"PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.\");\n\t\t\t\t} else throw new Error(i + \" is not a PostCSS plugin\");\n\t\t\t}\n\t\t\treturn normalized;\n\t\t}\n\t\tprocess(css, opts = {}) {\n\t\t\tif (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) return new NoWorkResult(this, css, opts);\n\t\t\telse return new LazyResult(this, css, opts);\n\t\t}\n\t\tuse(plugin) {\n\t\t\tthis.plugins = this.plugins.concat(this.normalize([plugin]));\n\t\t\treturn this;\n\t\t}\n\t};\n\tmodule.exports = Processor;\n\tProcessor.default = Processor;\n\tRoot.registerProcessor(Processor);\n\tDocument.registerProcessor(Processor);\n}));\nvar import_postcss = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar AtRule = require_at_rule();\n\tvar Comment = require_comment();\n\tvar Container = require_container();\n\tvar CssSyntaxError = require_css_syntax_error();\n\tvar Declaration = require_declaration();\n\tvar Document = require_document();\n\tvar fromJSON = require_fromJSON();\n\tvar Input = require_input();\n\tvar LazyResult = require_lazy_result();\n\tvar list = require_list();\n\tvar Node = require_node();\n\tvar parse = require_parse();\n\tvar Processor = require_processor();\n\tvar Result = require_result();\n\tvar Root = require_root();\n\tvar Rule = require_rule();\n\tvar stringify = require_stringify();\n\tvar Warning = require_warning();\n\tfunction postcss(...plugins) {\n\t\tif (plugins.length === 1 && Array.isArray(plugins[0])) plugins = plugins[0];\n\t\treturn new Processor(plugins);\n\t}\n\tpostcss.plugin = function plugin(name, initializer) {\n\t\tlet warningPrinted = false;\n\t\tfunction creator(...args) {\n\t\t\tif (console && console.warn && !warningPrinted) {\n\t\t\t\twarningPrinted = true;\n\t\t\t\tconsole.warn(name + \": postcss.plugin was deprecated. Migration guide:\\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration\");\n\t\t\t\tif (process.env.LANG && process.env.LANG.startsWith(\"zh\"))\n /* c8 ignore next 7 */\n\t\t\t\tconsole.warn(name + \": 里面 postcss.plugin 被弃用. 迁移指南:\\nhttps://www.w3ctech.com/topic/2226\");\n\t\t\t}\n\t\t\tlet transformer = initializer(...args);\n\t\t\ttransformer.postcssPlugin = name;\n\t\t\ttransformer.postcssVersion = new Processor().version;\n\t\t\treturn transformer;\n\t\t}\n\t\tlet cache;\n\t\tObject.defineProperty(creator, \"postcss\", { get() {\n\t\t\tif (!cache) cache = creator();\n\t\t\treturn cache;\n\t\t} });\n\t\tcreator.process = function(css, processOpts, pluginOpts) {\n\t\t\treturn postcss([creator(pluginOpts)]).process(css, processOpts);\n\t\t};\n\t\treturn creator;\n\t};\n\tpostcss.stringify = stringify;\n\tpostcss.parse = parse;\n\tpostcss.fromJSON = fromJSON;\n\tpostcss.list = list;\n\tpostcss.comment = (defaults) => new Comment(defaults);\n\tpostcss.atRule = (defaults) => new AtRule(defaults);\n\tpostcss.decl = (defaults) => new Declaration(defaults);\n\tpostcss.rule = (defaults) => new Rule(defaults);\n\tpostcss.root = (defaults) => new Root(defaults);\n\tpostcss.document = (defaults) => new Document(defaults);\n\tpostcss.CssSyntaxError = CssSyntaxError;\n\tpostcss.Declaration = Declaration;\n\tpostcss.Container = Container;\n\tpostcss.Processor = Processor;\n\tpostcss.Document = Document;\n\tpostcss.Comment = Comment;\n\tpostcss.Warning = Warning;\n\tpostcss.AtRule = AtRule;\n\tpostcss.Result = Result;\n\tpostcss.Input = Input;\n\tpostcss.Rule = Rule;\n\tpostcss.Root = Root;\n\tpostcss.Node = Node;\n\tLazyResult.registerPostcss(postcss);\n\tmodule.exports = postcss;\n\tpostcss.default = postcss;\n})))(), 1);\nimport_postcss.default;\nimport_postcss.default.stringify;\nimport_postcss.default.fromJSON;\nimport_postcss.default.plugin;\nimport_postcss.default.parse;\nimport_postcss.default.list;\nimport_postcss.default.document;\nimport_postcss.default.comment;\nimport_postcss.default.atRule;\nimport_postcss.default.rule;\nimport_postcss.default.decl;\nimport_postcss.default.root;\nimport_postcss.default.CssSyntaxError;\nimport_postcss.default.Declaration;\nimport_postcss.default.Container;\nimport_postcss.default.Processor;\nimport_postcss.default.Document;\nimport_postcss.default.Comment;\nimport_postcss.default.Warning;\nimport_postcss.default.AtRule;\nimport_postcss.default.Result;\nimport_postcss.default.Input;\nimport_postcss.default.Rule;\nimport_postcss.default.Root;\nimport_postcss.default.Node;\n// ../types/dist/types.js\nvar NodeType$1 = /* @__PURE__ */ function(NodeType) {\n\tNodeType[NodeType[\"Document\"] = 0] = \"Document\";\n\tNodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n\tNodeType[NodeType[\"Element\"] = 2] = \"Element\";\n\tNodeType[NodeType[\"Text\"] = 3] = \"Text\";\n\tNodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n\tNodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n\treturn NodeType;\n}({});\n// src/style.ts\nfunction parseCSSText(cssText) {\n\tconst res = {};\n\tconst listDelimiter = /;(?![^(]*\\))/g;\n\tconst propertyDelimiter = /:(.+)/;\n\tcssText.replace(/\\/\\*.*?\\*\\//g, \"\").split(listDelimiter).forEach(function(item) {\n\t\tif (item) {\n\t\t\tconst tmp = item.split(propertyDelimiter);\n\t\t\ttmp.length > 1 && (res[camelize(tmp[0].trim())] = tmp[1].trim());\n\t\t}\n\t});\n\treturn res;\n}\nfunction toCSSText(style) {\n\tconst properties = [];\n\tfor (const name in style) {\n\t\tconst value = style[name];\n\t\tif (typeof value !== \"string\") continue;\n\t\tconst normalizedName = hyphenate(name);\n\t\tproperties.push(`${normalizedName}: ${value};`);\n\t}\n\treturn properties.join(\" \");\n}\n/**\n* Camelize a hyphen-delimited string.\n*/\nvar camelizeRE = /-([a-z])/g;\nvar CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;\nvar camelize = (str) => {\n\tif (CUSTOM_PROPERTY_REGEX.test(str)) return str;\n\treturn str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n};\n/**\n* Hyphenate a camelCase string.\n*/\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = (str) => {\n\treturn str.replace(hyphenateRE, \"-$1\").toLowerCase();\n};\n// src/document.ts\n/**\n* This is designed as an abstract class so it should never be instantiated.\n*/\nvar BaseRRNode = class BaseRRNode {\n\tparentElement = null;\n\tparentNode = null;\n\townerDocument;\n\tfirstChild = null;\n\tlastChild = null;\n\tpreviousSibling = null;\n\tnextSibling = null;\n\tELEMENT_NODE = 1;\n\tTEXT_NODE = 3;\n\tnodeType;\n\tnodeName;\n\tRRNodeType;\n\tconstructor(..._args) {}\n\tget childNodes() {\n\t\tconst childNodes = [];\n\t\tlet childIterator = this.firstChild;\n\t\twhile (childIterator) {\n\t\t\tchildNodes.push(childIterator);\n\t\t\tchildIterator = childIterator.nextSibling;\n\t\t}\n\t\treturn childNodes;\n\t}\n\tcontains(node) {\n\t\tif (!(node instanceof BaseRRNode)) return false;\n\t\telse if (node.ownerDocument !== this.ownerDocument) return false;\n\t\telse if (node === this) return true;\n\t\twhile (node.parentNode) {\n\t\t\tif (node.parentNode === this) return true;\n\t\t\tnode = node.parentNode;\n\t\t}\n\t\treturn false;\n\t}\n\tappendChild(_newChild) {\n\t\tthrow new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`);\n\t}\n\tinsertBefore(_newChild, _refChild) {\n\t\tthrow new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`);\n\t}\n\tremoveChild(_node) {\n\t\tthrow new Error(`RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`);\n\t}\n\ttoString() {\n\t\treturn \"RRNode\";\n\t}\n};\nvar BaseRRDocument = class BaseRRDocument extends BaseRRNode {\n\tnodeType = 9;\n\tnodeName = \"#document\";\n\tcompatMode = \"CSS1Compat\";\n\tRRNodeType = NodeType$1.Document;\n\ttextContent = null;\n\tconstructor(...args) {\n\t\tsuper(args);\n\t\tthis.ownerDocument = this;\n\t}\n\tget documentElement() {\n\t\treturn this.childNodes.find((node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"HTML\") || null;\n\t}\n\tget body() {\n\t\treturn this.documentElement?.childNodes.find((node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"BODY\") || null;\n\t}\n\tget head() {\n\t\treturn this.documentElement?.childNodes.find((node) => node.RRNodeType === NodeType$1.Element && node.tagName === \"HEAD\") || null;\n\t}\n\tget implementation() {\n\t\treturn this;\n\t}\n\tget firstElementChild() {\n\t\treturn this.documentElement;\n\t}\n\tappendChild(newChild) {\n\t\tconst nodeType = newChild.RRNodeType;\n\t\tif (nodeType === NodeType$1.Element || nodeType === NodeType$1.DocumentType) {\n\t\t\tif (this.childNodes.some((s) => s.RRNodeType === nodeType)) throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${nodeType === NodeType$1.Element ? \"RRElement\" : \"RRDoctype\"} on RRDocument allowed.`);\n\t\t}\n\t\tconst child = appendChild(this, newChild);\n\t\tchild.parentElement = null;\n\t\treturn child;\n\t}\n\tinsertBefore(newChild, refChild) {\n\t\tconst nodeType = newChild.RRNodeType;\n\t\tif (nodeType === NodeType$1.Element || nodeType === NodeType$1.DocumentType) {\n\t\t\tif (this.childNodes.some((s) => s.RRNodeType === nodeType)) throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${nodeType === NodeType$1.Element ? \"RRElement\" : \"RRDoctype\"} on RRDocument allowed.`);\n\t\t}\n\t\tconst child = insertBefore(this, newChild, refChild);\n\t\tchild.parentElement = null;\n\t\treturn child;\n\t}\n\tremoveChild(node) {\n\t\treturn removeChild(this, node);\n\t}\n\topen() {\n\t\tthis.firstChild = null;\n\t\tthis.lastChild = null;\n\t}\n\tclose() {}\n\t/**\n\t* Adhoc implementation for setting xhtml namespace in rebuilt.ts (rrweb-snapshot).\n\t* There are two lines used this function:\n\t* 1. doc.write('\\<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\"\\>')\n\t* 2. doc.write('\\<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\"\\>')\n\t*/\n\twrite(content) {\n\t\tlet publicId;\n\t\tif (content === \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"\\\">\") publicId = \"-//W3C//DTD XHTML 1.0 Transitional//EN\";\n\t\telse if (content === \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD HTML 4.0 Transitional//EN\\\" \\\"\\\">\") publicId = \"-//W3C//DTD HTML 4.0 Transitional//EN\";\n\t\tif (publicId) {\n\t\t\tconst doctype = this.createDocumentType(\"html\", publicId, \"\");\n\t\t\tthis.open();\n\t\t\tthis.appendChild(doctype);\n\t\t}\n\t}\n\tcreateDocument(_namespace, _qualifiedName, _doctype) {\n\t\treturn new BaseRRDocument();\n\t}\n\tcreateDocumentType(qualifiedName, publicId, systemId) {\n\t\tconst doctype = new BaseRRDocumentType(qualifiedName, publicId, systemId);\n\t\tdoctype.ownerDocument = this;\n\t\treturn doctype;\n\t}\n\tcreateElement(tagName) {\n\t\tconst element = new BaseRRElement(tagName);\n\t\telement.ownerDocument = this;\n\t\treturn element;\n\t}\n\tcreateElementNS(_namespaceURI, qualifiedName) {\n\t\treturn this.createElement(qualifiedName);\n\t}\n\tcreateTextNode(data) {\n\t\tconst text = new BaseRRText(data);\n\t\ttext.ownerDocument = this;\n\t\treturn text;\n\t}\n\tcreateComment(data) {\n\t\tconst comment = new BaseRRComment(data);\n\t\tcomment.ownerDocument = this;\n\t\treturn comment;\n\t}\n\tcreateCDATASection(data) {\n\t\tconst CDATASection = new BaseRRCDATASection(data);\n\t\tCDATASection.ownerDocument = this;\n\t\treturn CDATASection;\n\t}\n\ttoString() {\n\t\treturn \"RRDocument\";\n\t}\n};\nvar BaseRRDocumentType = class extends BaseRRNode {\n\tnodeType = 10;\n\tRRNodeType = NodeType$1.DocumentType;\n\tname;\n\tpublicId;\n\tsystemId;\n\ttextContent = null;\n\tconstructor(qualifiedName, publicId, systemId) {\n\t\tsuper();\n\t\tthis.name = qualifiedName;\n\t\tthis.publicId = publicId;\n\t\tthis.systemId = systemId;\n\t\tthis.nodeName = qualifiedName;\n\t}\n\ttoString() {\n\t\treturn \"RRDocumentType\";\n\t}\n};\nvar BaseRRElement = class extends BaseRRNode {\n\tnodeType = 1;\n\tRRNodeType = NodeType$1.Element;\n\ttagName;\n\tattributes = {};\n\tshadowRoot = null;\n\tscrollLeft;\n\tscrollTop;\n\tconstructor(tagName) {\n\t\tsuper();\n\t\tthis.tagName = tagName.toUpperCase();\n\t\tthis.nodeName = tagName.toUpperCase();\n\t}\n\tget textContent() {\n\t\tlet result = \"\";\n\t\tthis.childNodes.forEach((node) => result += node.textContent);\n\t\treturn result;\n\t}\n\tset textContent(textContent) {\n\t\tthis.firstChild = null;\n\t\tthis.lastChild = null;\n\t\tthis.appendChild(this.ownerDocument.createTextNode(textContent));\n\t}\n\tget classList() {\n\t\treturn new ClassList(this.attributes.class, (newClassName) => {\n\t\t\tthis.attributes.class = newClassName;\n\t\t});\n\t}\n\tget id() {\n\t\treturn this.attributes.id || \"\";\n\t}\n\tget className() {\n\t\treturn this.attributes.class || \"\";\n\t}\n\tget style() {\n\t\tconst style = this.attributes.style ? parseCSSText(this.attributes.style) : {};\n\t\tconst hyphenateRE = /\\B([A-Z])/g;\n\t\tstyle.setProperty = (name, value, priority) => {\n\t\t\tif (hyphenateRE.test(name)) return;\n\t\t\tconst normalizedName = camelize(name);\n\t\t\tif (!value) delete style[normalizedName];\n\t\t\telse style[normalizedName] = value;\n\t\t\tif (priority === \"important\") style[normalizedName] += \" !important\";\n\t\t\tthis.attributes.style = toCSSText(style);\n\t\t};\n\t\tstyle.removeProperty = (name) => {\n\t\t\tif (hyphenateRE.test(name)) return \"\";\n\t\t\tconst normalizedName = camelize(name);\n\t\t\tconst value = style[normalizedName] || \"\";\n\t\t\tdelete style[normalizedName];\n\t\t\tthis.attributes.style = toCSSText(style);\n\t\t\treturn value;\n\t\t};\n\t\treturn style;\n\t}\n\tgetAttribute(name) {\n\t\tif (this.attributes[name] === void 0) return null;\n\t\treturn this.attributes[name];\n\t}\n\tsetAttribute(name, attribute) {\n\t\tthis.attributes[name] = attribute;\n\t}\n\tsetAttributeNS(_namespace, qualifiedName, value) {\n\t\tthis.setAttribute(qualifiedName, value);\n\t}\n\tremoveAttribute(name) {\n\t\tdelete this.attributes[name];\n\t}\n\tappendChild(newChild) {\n\t\treturn appendChild(this, newChild);\n\t}\n\tinsertBefore(newChild, refChild) {\n\t\treturn insertBefore(this, newChild, refChild);\n\t}\n\tremoveChild(node) {\n\t\treturn removeChild(this, node);\n\t}\n\tattachShadow(_init) {\n\t\tconst shadowRoot = this.ownerDocument.createElement(\"SHADOWROOT\");\n\t\tthis.shadowRoot = shadowRoot;\n\t\treturn shadowRoot;\n\t}\n\tdispatchEvent(_event) {\n\t\treturn true;\n\t}\n\ttoString() {\n\t\tlet attributeString = \"\";\n\t\tfor (const attribute in this.attributes) attributeString += `${attribute}=\"${this.attributes[attribute]}\" `;\n\t\treturn `${this.tagName} ${attributeString}`;\n\t}\n};\nvar BaseRRMediaElement = class extends BaseRRElement {\n\tcurrentTime;\n\tvolume;\n\tpaused;\n\tmuted;\n\tplaybackRate;\n\tloop;\n\tattachShadow(_init) {\n\t\tthrow new Error(`RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow`);\n\t}\n\tplay() {\n\t\tthis.paused = false;\n\t}\n\tpause() {\n\t\tthis.paused = true;\n\t}\n};\nvar BaseRRDialogElement = class extends BaseRRElement {\n\ttagName = \"DIALOG\";\n\tnodeName = \"DIALOG\";\n\tget isModal() {\n\t\treturn this.getAttribute(\"rr_open_mode\") === \"modal\";\n\t}\n\tget open() {\n\t\treturn this.getAttribute(\"open\") !== null;\n\t}\n\tclose() {\n\t\tthis.removeAttribute(\"open\");\n\t\tthis.removeAttribute(\"rr_open_mode\");\n\t}\n\tshow() {\n\t\tthis.setAttribute(\"open\", \"\");\n\t\tthis.setAttribute(\"rr_open_mode\", \"non-modal\");\n\t}\n\tshowModal() {\n\t\tthis.setAttribute(\"open\", \"\");\n\t\tthis.setAttribute(\"rr_open_mode\", \"modal\");\n\t}\n};\nvar BaseRRText = class extends BaseRRNode {\n\tnodeType = 3;\n\tnodeName = \"#text\";\n\tRRNodeType = NodeType$1.Text;\n\tdata;\n\tconstructor(data) {\n\t\tsuper();\n\t\tthis.data = data;\n\t}\n\tget textContent() {\n\t\treturn this.data;\n\t}\n\tset textContent(textContent) {\n\t\tthis.data = textContent;\n\t}\n\ttoString() {\n\t\treturn `RRText text=${JSON.stringify(this.data)}`;\n\t}\n};\nvar BaseRRComment = class extends BaseRRNode {\n\tnodeType = 8;\n\tnodeName = \"#comment\";\n\tRRNodeType = NodeType$1.Comment;\n\tdata;\n\tconstructor(data) {\n\t\tsuper();\n\t\tthis.data = data;\n\t}\n\tget textContent() {\n\t\treturn this.data;\n\t}\n\tset textContent(textContent) {\n\t\tthis.data = textContent;\n\t}\n\ttoString() {\n\t\treturn `RRComment text=${JSON.stringify(this.data)}`;\n\t}\n};\nvar BaseRRCDATASection = class extends BaseRRNode {\n\tnodeName = \"#cdata-section\";\n\tnodeType = 4;\n\tRRNodeType = NodeType$1.CDATA;\n\tdata;\n\tconstructor(data) {\n\t\tsuper();\n\t\tthis.data = data;\n\t}\n\tget textContent() {\n\t\treturn this.data;\n\t}\n\tset textContent(textContent) {\n\t\tthis.data = textContent;\n\t}\n\ttoString() {\n\t\treturn `RRCDATASection data=${JSON.stringify(this.data)}`;\n\t}\n};\nvar ClassList = class {\n\tonChange;\n\tclasses = [];\n\tconstructor(classText, onChange) {\n\t\tif (classText) {\n\t\t\tconst classes = classText.trim().split(/\\s+/);\n\t\t\tthis.classes.push(...classes);\n\t\t}\n\t\tthis.onChange = onChange;\n\t}\n\tadd = (...classNames) => {\n\t\tfor (const item of classNames) {\n\t\t\tconst className = String(item);\n\t\t\tif (this.classes.indexOf(className) >= 0) continue;\n\t\t\tthis.classes.push(className);\n\t\t}\n\t\tthis.onChange && this.onChange(this.classes.join(\" \"));\n\t};\n\tremove = (...classNames) => {\n\t\tthis.classes = this.classes.filter((item) => classNames.indexOf(item) === -1);\n\t\tthis.onChange && this.onChange(this.classes.join(\" \"));\n\t};\n};\nfunction appendChild(parent, newChild) {\n\tif (newChild.parentNode) newChild.parentNode.removeChild(newChild);\n\tif (parent.lastChild) {\n\t\tparent.lastChild.nextSibling = newChild;\n\t\tnewChild.previousSibling = parent.lastChild;\n\t} else {\n\t\tparent.firstChild = newChild;\n\t\tnewChild.previousSibling = null;\n\t}\n\tparent.lastChild = newChild;\n\tnewChild.nextSibling = null;\n\tnewChild.parentNode = parent;\n\tnewChild.parentElement = parent;\n\tnewChild.ownerDocument = parent.ownerDocument;\n\treturn newChild;\n}\nfunction insertBefore(parent, newChild, refChild) {\n\tif (!refChild) return appendChild(parent, newChild);\n\tif (refChild.parentNode !== parent) throw new Error(\"Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.\");\n\tif (newChild === refChild) return newChild;\n\tif (newChild.parentNode) newChild.parentNode.removeChild(newChild);\n\tnewChild.previousSibling = refChild.previousSibling;\n\trefChild.previousSibling = newChild;\n\tnewChild.nextSibling = refChild;\n\tif (newChild.previousSibling) newChild.previousSibling.nextSibling = newChild;\n\telse parent.firstChild = newChild;\n\tnewChild.parentElement = parent;\n\tnewChild.parentNode = parent;\n\tnewChild.ownerDocument = parent.ownerDocument;\n\treturn newChild;\n}\nfunction removeChild(parent, child) {\n\tif (child.parentNode !== parent) throw new Error(\"Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.\");\n\tif (child.previousSibling) child.previousSibling.nextSibling = child.nextSibling;\n\telse parent.firstChild = child.nextSibling;\n\tif (child.nextSibling) child.nextSibling.previousSibling = child.previousSibling;\n\telse parent.lastChild = child.previousSibling;\n\tchild.previousSibling = null;\n\tchild.nextSibling = null;\n\tchild.parentElement = null;\n\tchild.parentNode = null;\n\treturn child;\n}\nvar NodeType = /* @__PURE__ */ function(NodeType) {\n\tNodeType[NodeType[\"PLACEHOLDER\"] = 0] = \"PLACEHOLDER\";\n\tNodeType[NodeType[\"ELEMENT_NODE\"] = 1] = \"ELEMENT_NODE\";\n\tNodeType[NodeType[\"ATTRIBUTE_NODE\"] = 2] = \"ATTRIBUTE_NODE\";\n\tNodeType[NodeType[\"TEXT_NODE\"] = 3] = \"TEXT_NODE\";\n\tNodeType[NodeType[\"CDATA_SECTION_NODE\"] = 4] = \"CDATA_SECTION_NODE\";\n\tNodeType[NodeType[\"ENTITY_REFERENCE_NODE\"] = 5] = \"ENTITY_REFERENCE_NODE\";\n\tNodeType[NodeType[\"ENTITY_NODE\"] = 6] = \"ENTITY_NODE\";\n\tNodeType[NodeType[\"PROCESSING_INSTRUCTION_NODE\"] = 7] = \"PROCESSING_INSTRUCTION_NODE\";\n\tNodeType[NodeType[\"COMMENT_NODE\"] = 8] = \"COMMENT_NODE\";\n\tNodeType[NodeType[\"DOCUMENT_NODE\"] = 9] = \"DOCUMENT_NODE\";\n\tNodeType[NodeType[\"DOCUMENT_TYPE_NODE\"] = 10] = \"DOCUMENT_TYPE_NODE\";\n\tNodeType[NodeType[\"DOCUMENT_FRAGMENT_NODE\"] = 11] = \"DOCUMENT_FRAGMENT_NODE\";\n\treturn NodeType;\n}({});\n// src/diff.ts\nvar NAMESPACES = {\n\tsvg: \"http://www.w3.org/2000/svg\",\n\t\"xlink:href\": \"http://www.w3.org/1999/xlink\",\n\txmlns: \"http://www.w3.org/2000/xmlns/\"\n};\nvar SVGTagMap = {\n\taltglyph: \"altGlyph\",\n\taltglyphdef: \"altGlyphDef\",\n\taltglyphitem: \"altGlyphItem\",\n\tanimatecolor: \"animateColor\",\n\tanimatemotion: \"animateMotion\",\n\tanimatetransform: \"animateTransform\",\n\tclippath: \"clipPath\",\n\tfeblend: \"feBlend\",\n\tfecolormatrix: \"feColorMatrix\",\n\tfecomponenttransfer: \"feComponentTransfer\",\n\tfecomposite: \"feComposite\",\n\tfeconvolvematrix: \"feConvolveMatrix\",\n\tfediffuselighting: \"feDiffuseLighting\",\n\tfedisplacementmap: \"feDisplacementMap\",\n\tfedistantlight: \"feDistantLight\",\n\tfedropshadow: \"feDropShadow\",\n\tfeflood: \"feFlood\",\n\tfefunca: \"feFuncA\",\n\tfefuncb: \"feFuncB\",\n\tfefuncg: \"feFuncG\",\n\tfefuncr: \"feFuncR\",\n\tfegaussianblur: \"feGaussianBlur\",\n\tfeimage: \"feImage\",\n\tfemerge: \"feMerge\",\n\tfemergenode: \"feMergeNode\",\n\tfemorphology: \"feMorphology\",\n\tfeoffset: \"feOffset\",\n\tfepointlight: \"fePointLight\",\n\tfespecularlighting: \"feSpecularLighting\",\n\tfespotlight: \"feSpotLight\",\n\tfetile: \"feTile\",\n\tfeturbulence: \"feTurbulence\",\n\tforeignobject: \"foreignObject\",\n\tglyphref: \"glyphRef\",\n\tlineargradient: \"linearGradient\",\n\tradialgradient: \"radialGradient\"\n};\nvar createdNodeSet = null;\n/**\n* Make the old tree to have the same structure and properties as the new tree with the diff algorithm.\n* @param oldTree - The old tree to be modified.\n* @param newTree - The new tree which the old tree will be modified to.\n* @param replayer - A slimmed replayer instance including the mirror of the old tree.\n* @param rrnodeMirror - The mirror of the new tree.\n*/\nfunction diff(oldTree, newTree, replayer, rrnodeMirror = newTree.mirror || newTree.ownerDocument.mirror) {\n\toldTree = diffBeforeUpdatingChildren(oldTree, newTree, replayer, rrnodeMirror);\n\tdiffChildren(oldTree, newTree, replayer, rrnodeMirror);\n\tdiffAfterUpdatingChildren(oldTree, newTree, replayer);\n}\n/**\n* Do some preparation work before updating the children of the old tree.\n*/\nfunction diffBeforeUpdatingChildren(oldTree, newTree, replayer, rrnodeMirror) {\n\tif (replayer.afterAppend && !createdNodeSet) {\n\t\tcreatedNodeSet = /* @__PURE__ */ new WeakSet();\n\t\tsetTimeout(() => {\n\t\t\tcreatedNodeSet = null;\n\t\t}, 0);\n\t}\n\tif (!sameNodeType(oldTree, newTree)) {\n\t\tconst calibratedOldTree = createOrGetNode(newTree, replayer.mirror, rrnodeMirror);\n\t\toldTree.parentNode?.replaceChild(calibratedOldTree, oldTree);\n\t\toldTree = calibratedOldTree;\n\t}\n\tswitch (newTree.RRNodeType) {\n\t\tcase NodeType$1.Document:\n\t\t\t/**\n\t\t\t* Special cases for updating the document node:\n\t\t\t* Case 1: If the oldTree is the content document of an iframe element and its content (HTML, HEAD, and BODY) is automatically mounted by browsers, we need to remove them to avoid unexpected behaviors. e.g. Selector matches may be case insensitive.\n\t\t\t* Case 2: The newTree has a different serialized Id (a different document object), we need to reopen it and update the nodeMirror.\n\t\t\t*/\n\t\t\tif (!nodeMatching(oldTree, newTree, replayer.mirror, rrnodeMirror)) {\n\t\t\t\tconst newMeta = rrnodeMirror.getMeta(newTree);\n\t\t\t\tif (newMeta) {\n\t\t\t\t\treplayer.mirror.removeNodeFromMap(oldTree);\n\t\t\t\t\toldTree.close();\n\t\t\t\t\toldTree.open();\n\t\t\t\t\treplayer.mirror.add(oldTree, newMeta);\n\t\t\t\t\tcreatedNodeSet?.add(oldTree);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NodeType$1.Element: {\n\t\t\tconst oldElement = oldTree;\n\t\t\tconst newRRElement = newTree;\n\t\t\tswitch (newRRElement.tagName) {\n\t\t\t\tcase \"IFRAME\": {\n\t\t\t\t\tconst oldContentDocument = oldTree.contentDocument;\n\t\t\t\t\tif (!oldContentDocument) break;\n\t\t\t\t\tdiff(oldContentDocument, newTree.contentDocument, replayer, rrnodeMirror);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (newRRElement.shadowRoot) {\n\t\t\t\tif (!oldElement.shadowRoot) oldElement.attachShadow({ mode: \"open\" });\n\t\t\t\tdiffChildren(oldElement.shadowRoot, newRRElement.shadowRoot, replayer, rrnodeMirror);\n\t\t\t}\n\t\t\t/**\n\t\t\t* Attributes and styles of the old element need to be updated before updating its children because of an edge case:\n\t\t\t* `applyScroll` may fail in `diffAfterUpdatingChildren` when the height of a node when `applyScroll` is called may be incorrect if\n\t\t\t* 1. its parent node contains styles that affects the targeted node's height\n\t\t\t* 2. the CSS selector is targeting an attribute of the parent node\n\t\t\t* by running `diffProps` on the parent node before `diffChildren` is called,\n\t\t\t* we can ensure that the correct attributes (and therefore styles) have applied to parent nodes\n\t\t\t*/\n\t\t\tdiffProps(oldElement, newRRElement, rrnodeMirror);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn oldTree;\n}\n/**\n* Finish the diff work after updating the children of the old tree.\n*/\nfunction diffAfterUpdatingChildren(oldTree, newTree, replayer) {\n\tswitch (newTree.RRNodeType) {\n\t\tcase NodeType$1.Document: {\n\t\t\tconst scrollData = newTree.scrollData;\n\t\t\tscrollData && replayer.applyScroll(scrollData, true);\n\t\t\tbreak;\n\t\t}\n\t\tcase NodeType$1.Element: {\n\t\t\tconst oldElement = oldTree;\n\t\t\tconst newRRElement = newTree;\n\t\t\tnewRRElement.scrollData && replayer.applyScroll(newRRElement.scrollData, true);\n\t\t\t/**\n\t\t\t* Input data need to get applied after all children of this node are updated.\n\t\t\t* Otherwise when we set a value for a select element whose options are empty, the value won't actually update.\n\t\t\t*/\n\t\t\tnewRRElement.inputData && replayer.applyInput(newRRElement.inputData);\n\t\t\tswitch (newRRElement.tagName) {\n\t\t\t\tcase \"AUDIO\":\n\t\t\t\tcase \"VIDEO\": {\n\t\t\t\t\tconst oldMediaElement = oldTree;\n\t\t\t\t\tconst newMediaRRElement = newRRElement;\n\t\t\t\t\tif (newMediaRRElement.paused !== void 0) newMediaRRElement.paused ? oldMediaElement.pause() : oldMediaElement.play();\n\t\t\t\t\tif (newMediaRRElement.muted !== void 0) oldMediaElement.muted = newMediaRRElement.muted;\n\t\t\t\t\tif (newMediaRRElement.volume !== void 0) oldMediaElement.volume = newMediaRRElement.volume;\n\t\t\t\t\tif (newMediaRRElement.currentTime !== void 0) oldMediaElement.currentTime = newMediaRRElement.currentTime;\n\t\t\t\t\tif (newMediaRRElement.playbackRate !== void 0) oldMediaElement.playbackRate = newMediaRRElement.playbackRate;\n\t\t\t\t\tif (newMediaRRElement.loop !== void 0) oldMediaElement.loop = newMediaRRElement.loop;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"CANVAS\": {\n\t\t\t\t\tconst rrCanvasElement = newTree;\n\t\t\t\t\tif (rrCanvasElement.rr_dataURL !== null) {\n\t\t\t\t\t\tconst image = document.createElement(\"img\");\n\t\t\t\t\t\timage.onload = () => {\n\t\t\t\t\t\t\tconst ctx = oldElement.getContext(\"2d\");\n\t\t\t\t\t\t\tif (ctx) ctx.drawImage(image, 0, 0, image.width, image.height);\n\t\t\t\t\t\t};\n\t\t\t\t\t\timage.src = rrCanvasElement.rr_dataURL;\n\t\t\t\t\t}\n\t\t\t\t\trrCanvasElement.canvasMutations.forEach((canvasMutation) => replayer.applyCanvas(canvasMutation.event, canvasMutation.mutation, oldTree));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"STYLE\": {\n\t\t\t\t\tconst styleSheet = oldElement.sheet;\n\t\t\t\t\tstyleSheet && newTree.rules.forEach((data) => replayer.applyStyleSheetMutation(data, styleSheet));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"DIALOG\": {\n\t\t\t\t\tconst dialog = oldElement;\n\t\t\t\t\tconst rrDialog = newRRElement;\n\t\t\t\t\tconst wasOpen = dialog.open;\n\t\t\t\t\tconst wasModal = dialog.matches(\"dialog:modal\");\n\t\t\t\t\tconst shouldBeOpen = rrDialog.open;\n\t\t\t\t\tconst shouldBeModal = rrDialog.isModal;\n\t\t\t\t\tconst modalChanged = wasModal !== shouldBeModal;\n\t\t\t\t\tconst openChanged = wasOpen !== shouldBeOpen;\n\t\t\t\t\tif (modalChanged || wasOpen && openChanged) dialog.close();\n\t\t\t\t\tif (shouldBeOpen && (openChanged || modalChanged)) try {\n\t\t\t\t\t\tif (shouldBeModal) dialog.showModal();\n\t\t\t\t\t\telse dialog.show();\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.warn(e);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase NodeType$1.Text:\n\t\tcase NodeType$1.Comment:\n\t\tcase NodeType$1.CDATA: if (oldTree.textContent !== newTree.data) oldTree.textContent = newTree.data;\n\t}\n\tif (createdNodeSet?.has(oldTree)) {\n\t\tcreatedNodeSet.delete(oldTree);\n\t\treplayer.afterAppend?.(oldTree, replayer.mirror.getId(oldTree));\n\t}\n}\nfunction diffProps(oldTree, newTree, rrnodeMirror) {\n\tconst oldAttributes = oldTree.attributes;\n\tconst newAttributes = newTree.attributes;\n\tfor (const name in newAttributes) {\n\t\tconst newValue = newAttributes[name];\n\t\tif (rrnodeMirror.getMeta(newTree)?.isSVG && NAMESPACES[name]) oldTree.setAttributeNS(NAMESPACES[name], name, newValue);\n\t\telse if (newTree.tagName === \"CANVAS\" && name === \"rr_dataURL\") {\n\t\t\tconst image = document.createElement(\"img\");\n\t\t\timage.src = newValue;\n\t\t\timage.onload = () => {\n\t\t\t\tconst ctx = oldTree.getContext(\"2d\");\n\t\t\t\tif (ctx) ctx.drawImage(image, 0, 0, image.width, image.height);\n\t\t\t};\n\t\t} else if (newTree.tagName === \"IFRAME\" && name === \"srcdoc\") continue;\n\t\telse try {\n\t\t\toldTree.setAttribute(name, newValue);\n\t\t} catch (err) {\n\t\t\tconsole.warn(err);\n\t\t}\n\t}\n\tfor (const { name } of Array.from(oldAttributes)) if (!(name in newAttributes)) oldTree.removeAttribute(name);\n\tnewTree.scrollLeft && (oldTree.scrollLeft = newTree.scrollLeft);\n\tnewTree.scrollTop && (oldTree.scrollTop = newTree.scrollTop);\n}\nfunction diffChildren(oldTree, newTree, replayer, rrnodeMirror) {\n\tconst oldChildren = Array.from(oldTree.childNodes);\n\tconst newChildren = newTree.childNodes;\n\tif (oldChildren.length === 0 && newChildren.length === 0) return;\n\tlet oldStartIndex = 0, oldEndIndex = oldChildren.length - 1, newStartIndex = 0, newEndIndex = newChildren.length - 1;\n\tlet oldStartNode = oldChildren[oldStartIndex], oldEndNode = oldChildren[oldEndIndex], newStartNode = newChildren[newStartIndex], newEndNode = newChildren[newEndIndex];\n\tlet oldIdToIndex = void 0, indexInOld = void 0;\n\twhile (oldStartIndex <= oldEndIndex && newStartIndex <= newEndIndex) if (oldStartNode === void 0) oldStartNode = oldChildren[++oldStartIndex];\n\telse if (oldEndNode === void 0) oldEndNode = oldChildren[--oldEndIndex];\n\telse if (nodeMatching(oldStartNode, newStartNode, replayer.mirror, rrnodeMirror)) {\n\t\toldStartNode = oldChildren[++oldStartIndex];\n\t\tnewStartNode = newChildren[++newStartIndex];\n\t} else if (nodeMatching(oldEndNode, newEndNode, replayer.mirror, rrnodeMirror)) {\n\t\toldEndNode = oldChildren[--oldEndIndex];\n\t\tnewEndNode = newChildren[--newEndIndex];\n\t} else if (nodeMatching(oldStartNode, newEndNode, replayer.mirror, rrnodeMirror)) {\n\t\ttry {\n\t\t\toldTree.insertBefore(oldStartNode, oldEndNode.nextSibling);\n\t\t} catch (e) {\n\t\t\tconsole.warn(e);\n\t\t}\n\t\toldStartNode = oldChildren[++oldStartIndex];\n\t\tnewEndNode = newChildren[--newEndIndex];\n\t} else if (nodeMatching(oldEndNode, newStartNode, replayer.mirror, rrnodeMirror)) {\n\t\ttry {\n\t\t\toldTree.insertBefore(oldEndNode, oldStartNode);\n\t\t} catch (e) {\n\t\t\tconsole.warn(e);\n\t\t}\n\t\toldEndNode = oldChildren[--oldEndIndex];\n\t\tnewStartNode = newChildren[++newStartIndex];\n\t} else {\n\t\tif (!oldIdToIndex) {\n\t\t\toldIdToIndex = {};\n\t\t\tfor (let i = oldStartIndex; i <= oldEndIndex; i++) {\n\t\t\t\tconst oldChild = oldChildren[i];\n\t\t\t\tif (oldChild && replayer.mirror.hasNode(oldChild)) oldIdToIndex[replayer.mirror.getId(oldChild)] = i;\n\t\t\t}\n\t\t}\n\t\tindexInOld = oldIdToIndex[rrnodeMirror.getId(newStartNode)];\n\t\tconst nodeToMove = oldChildren[indexInOld];\n\t\tif (indexInOld !== void 0 && nodeToMove && nodeMatching(nodeToMove, newStartNode, replayer.mirror, rrnodeMirror)) {\n\t\t\ttry {\n\t\t\t\toldTree.insertBefore(nodeToMove, oldStartNode);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e);\n\t\t\t}\n\t\t\toldChildren[indexInOld] = void 0;\n\t\t} else {\n\t\t\tconst newNode = createOrGetNode(newStartNode, replayer.mirror, rrnodeMirror);\n\t\t\tif (oldTree.nodeName === \"#document\" && oldStartNode && (newNode.nodeType === newNode.DOCUMENT_TYPE_NODE && oldStartNode.nodeType === oldStartNode.DOCUMENT_TYPE_NODE || newNode.nodeType === newNode.ELEMENT_NODE && oldStartNode.nodeType === oldStartNode.ELEMENT_NODE)) {\n\t\t\t\toldTree.removeChild(oldStartNode);\n\t\t\t\treplayer.mirror.removeNodeFromMap(oldStartNode);\n\t\t\t\toldStartNode = oldChildren[++oldStartIndex];\n\t\t\t}\n\t\t\ttry {\n\t\t\t\toldTree.insertBefore(newNode, oldStartNode || null);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e);\n\t\t\t}\n\t\t}\n\t\tnewStartNode = newChildren[++newStartIndex];\n\t}\n\tif (oldStartIndex > oldEndIndex) {\n\t\tconst referenceRRNode = newChildren[newEndIndex + 1];\n\t\tlet referenceNode = null;\n\t\tif (referenceRRNode) referenceNode = replayer.mirror.getNode(rrnodeMirror.getId(referenceRRNode));\n\t\tfor (; newStartIndex <= newEndIndex; ++newStartIndex) {\n\t\t\tconst newNode = createOrGetNode(newChildren[newStartIndex], replayer.mirror, rrnodeMirror);\n\t\t\ttry {\n\t\t\t\toldTree.insertBefore(newNode, referenceNode);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(e);\n\t\t\t}\n\t\t}\n\t} else if (newStartIndex > newEndIndex) for (; oldStartIndex <= oldEndIndex; oldStartIndex++) {\n\t\tconst node = oldChildren[oldStartIndex];\n\t\tif (!node || node.parentNode !== oldTree) continue;\n\t\ttry {\n\t\t\toldTree.removeChild(node);\n\t\t\treplayer.mirror.removeNodeFromMap(node);\n\t\t} catch (e) {\n\t\t\tconsole.warn(e);\n\t\t}\n\t}\n\tlet oldChild = oldTree.firstChild;\n\tlet newChild = newTree.firstChild;\n\twhile (oldChild !== null && newChild !== null) {\n\t\tdiff(oldChild, newChild, replayer, rrnodeMirror);\n\t\toldChild = oldChild.nextSibling;\n\t\tnewChild = newChild.nextSibling;\n\t}\n}\nfunction createOrGetNode(rrNode, domMirror, rrnodeMirror) {\n\tconst nodeId = rrnodeMirror.getId(rrNode);\n\tconst sn = rrnodeMirror.getMeta(rrNode);\n\tlet node = null;\n\tif (nodeId > -1) node = domMirror.getNode(nodeId);\n\tif (node !== null && sameNodeType(node, rrNode)) return node;\n\tswitch (rrNode.RRNodeType) {\n\t\tcase NodeType$1.Document:\n\t\t\tnode = new Document();\n\t\t\tbreak;\n\t\tcase NodeType$1.DocumentType:\n\t\t\tnode = document.implementation.createDocumentType(rrNode.name, rrNode.publicId, rrNode.systemId);\n\t\t\tbreak;\n\t\tcase NodeType$1.Element: {\n\t\t\tlet tagName = rrNode.tagName.toLowerCase();\n\t\t\ttagName = SVGTagMap[tagName] || tagName;\n\t\t\tif (sn && \"isSVG\" in sn && sn?.isSVG) node = document.createElementNS(NAMESPACES[\"svg\"], tagName);\n\t\t\telse node = document.createElement(rrNode.tagName);\n\t\t\tbreak;\n\t\t}\n\t\tcase NodeType$1.Text:\n\t\t\tnode = document.createTextNode(rrNode.data);\n\t\t\tbreak;\n\t\tcase NodeType$1.Comment:\n\t\t\tnode = document.createComment(rrNode.data);\n\t\t\tbreak;\n\t\tcase NodeType$1.CDATA: node = document.createCDATASection(rrNode.data);\n\t}\n\tif (sn) domMirror.add(node, { ...sn });\n\ttry {\n\t\tcreatedNodeSet?.add(node);\n\t} catch (e) {}\n\treturn node;\n}\n/**\n* To check whether two nodes are the same type of node. If they are both Elements, check wether their tagNames are same or not.\n*/\nfunction sameNodeType(node1, node2) {\n\tif (node1.nodeType !== node2.nodeType) return false;\n\treturn node1.nodeType !== node1.ELEMENT_NODE || node1.tagName.toUpperCase() === node2.tagName;\n}\n/**\n* To check whether two nodes are matching. If so, they are supposed to have the same serialized Id and node type. If they are both Elements, their tagNames should be the same as well. Otherwise, they are not matching.\n*/\nfunction nodeMatching(node1, node2, domMirror, rrdomMirror) {\n\tconst node1Id = domMirror.getId(node1);\n\tconst node2Id = rrdomMirror.getId(node2);\n\tif (node1Id === -1 || node1Id !== node2Id) return false;\n\treturn sameNodeType(node1, node2);\n}\n// src/index.ts\nvar RRDocument = class RRDocument extends BaseRRDocument {\n\tUNSERIALIZED_STARTING_ID = -2;\n\t_unserializedId = this.UNSERIALIZED_STARTING_ID;\n\t/**\n\t* Every time the id is used, it will minus 1 automatically to avoid collisions.\n\t*/\n\tget unserializedId() {\n\t\treturn this._unserializedId--;\n\t}\n\tmirror = createMirror();\n\tscrollData = null;\n\tconstructor(mirror) {\n\t\tsuper();\n\t\tif (mirror) this.mirror = mirror;\n\t}\n\tcreateDocument(_namespace, _qualifiedName, _doctype) {\n\t\treturn new RRDocument();\n\t}\n\tcreateDocumentType(qualifiedName, publicId, systemId) {\n\t\tconst documentTypeNode = new RRDocumentType(qualifiedName, publicId, systemId);\n\t\tdocumentTypeNode.ownerDocument = this;\n\t\treturn documentTypeNode;\n\t}\n\tcreateElement(tagName) {\n\t\tconst upperTagName = tagName.toUpperCase();\n\t\tlet element;\n\t\tswitch (upperTagName) {\n\t\t\tcase \"AUDIO\":\n\t\t\tcase \"VIDEO\":\n\t\t\t\telement = new RRMediaElement(upperTagName);\n\t\t\t\tbreak;\n\t\t\tcase \"IFRAME\":\n\t\t\t\telement = new RRIFrameElement(upperTagName, this.mirror);\n\t\t\t\tbreak;\n\t\t\tcase \"CANVAS\":\n\t\t\t\telement = new RRCanvasElement(upperTagName);\n\t\t\t\tbreak;\n\t\t\tcase \"STYLE\":\n\t\t\t\telement = new RRStyleElement(upperTagName);\n\t\t\t\tbreak;\n\t\t\tcase \"DIALOG\":\n\t\t\t\telement = new RRDialogElement(upperTagName);\n\t\t\t\tbreak;\n\t\t\tdefault: element = new RRElement(upperTagName);\n\t\t}\n\t\telement.ownerDocument = this;\n\t\treturn element;\n\t}\n\tcreateComment(data) {\n\t\tconst commentNode = new RRComment(data);\n\t\tcommentNode.ownerDocument = this;\n\t\treturn commentNode;\n\t}\n\tcreateCDATASection(data) {\n\t\tconst sectionNode = new RRCDATASection(data);\n\t\tsectionNode.ownerDocument = this;\n\t\treturn sectionNode;\n\t}\n\tcreateTextNode(data) {\n\t\tconst textNode = new RRText(data);\n\t\ttextNode.ownerDocument = this;\n\t\treturn textNode;\n\t}\n\tdestroyTree() {\n\t\tthis.firstChild = null;\n\t\tthis.lastChild = null;\n\t\tthis.mirror.reset();\n\t}\n\topen() {\n\t\tsuper.open();\n\t\tthis._unserializedId = this.UNSERIALIZED_STARTING_ID;\n\t}\n};\nvar RRDocumentType = BaseRRDocumentType;\nvar RRElement = class extends BaseRRElement {\n\tinputData = null;\n\tscrollData = null;\n};\nvar RRMediaElement = class extends BaseRRMediaElement {};\nvar RRDialogElement = class extends BaseRRDialogElement {};\nvar RRCanvasElement = class extends RRElement {\n\trr_dataURL = null;\n\tcanvasMutations = [];\n\t/**\n\t* This is a dummy implementation to distinguish RRCanvasElement from real HTMLCanvasElement.\n\t*/\n\tgetContext() {\n\t\treturn null;\n\t}\n};\nvar RRStyleElement = class extends RRElement {\n\trules = [];\n};\nvar RRIFrameElement = class extends RRElement {\n\tcontentDocument = new RRDocument();\n\tconstructor(upperTagName, mirror) {\n\t\tsuper(upperTagName);\n\t\tthis.contentDocument.mirror = mirror;\n\t}\n};\nvar RRText = BaseRRText;\nvar RRComment = BaseRRComment;\nvar RRCDATASection = BaseRRCDATASection;\nfunction getValidTagName(element) {\n\tif (element instanceof HTMLFormElement) return \"FORM\";\n\treturn element.tagName.toUpperCase();\n}\n/**\n* Build a RRNode from a real Node.\n* @param node - the real Node\n* @param rrdom - the RRDocument\n* @param domMirror - the NodeMirror that records the real document tree\n* @returns the built RRNode\n*/\nfunction buildFromNode(node, rrdom, domMirror, parentRRNode) {\n\tlet rrNode;\n\tswitch (node.nodeType) {\n\t\tcase NodeType.DOCUMENT_NODE:\n\t\t\tif (parentRRNode && parentRRNode.nodeName === \"IFRAME\") rrNode = parentRRNode.contentDocument;\n\t\t\telse {\n\t\t\t\trrNode = rrdom;\n\t\t\t\trrNode.compatMode = node.compatMode;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase NodeType.DOCUMENT_TYPE_NODE: {\n\t\t\tconst documentType = node;\n\t\t\trrNode = rrdom.createDocumentType(documentType.name, documentType.publicId, documentType.systemId);\n\t\t\tbreak;\n\t\t}\n\t\tcase NodeType.ELEMENT_NODE: {\n\t\t\tconst elementNode = node;\n\t\t\tconst tagName = getValidTagName(elementNode);\n\t\t\trrNode = rrdom.createElement(tagName);\n\t\t\tconst rrElement = rrNode;\n\t\t\tfor (const { name, value } of Array.from(elementNode.attributes)) rrElement.attributes[name] = value;\n\t\t\telementNode.scrollLeft && (rrElement.scrollLeft = elementNode.scrollLeft);\n\t\t\telementNode.scrollTop && (rrElement.scrollTop = elementNode.scrollTop);\n\t\t\t/**\n\t\t\t* We don't have to record special values of input elements at the beginning.\n\t\t\t* Because if these values are changed later, the mutation will be applied through the batched input events on its RRElement after the diff algorithm is executed.\n\t\t\t*/\n\t\t\tbreak;\n\t\t}\n\t\tcase NodeType.TEXT_NODE:\n\t\t\trrNode = rrdom.createTextNode(node.textContent || \"\");\n\t\t\tbreak;\n\t\tcase NodeType.CDATA_SECTION_NODE:\n\t\t\trrNode = rrdom.createCDATASection(node.data);\n\t\t\tbreak;\n\t\tcase NodeType.COMMENT_NODE:\n\t\t\trrNode = rrdom.createComment(node.textContent || \"\");\n\t\t\tbreak;\n\t\tcase NodeType.DOCUMENT_FRAGMENT_NODE:\n\t\t\trrNode = parentRRNode.attachShadow({ mode: \"open\" });\n\t\t\tbreak;\n\t\tdefault: return null;\n\t}\n\tlet sn = domMirror.getMeta(node);\n\tif (rrdom instanceof RRDocument) {\n\t\tif (!sn) {\n\t\t\tsn = getDefaultSN(rrNode, rrdom.unserializedId);\n\t\t\tdomMirror.add(node, sn);\n\t\t}\n\t\trrdom.mirror.add(rrNode, { ...sn });\n\t}\n\treturn rrNode;\n}\n/**\n* Build a RRDocument from a real document tree.\n* @param dom - the real document tree\n* @param domMirror - the NodeMirror that records the real document tree\n* @param rrdom - the rrdom object to be constructed\n* @returns the build rrdom\n*/\nfunction buildFromDom(dom, domMirror = createMirror$1(), rrdom = new RRDocument()) {\n\tfunction walk(node, parentRRNode) {\n\t\tconst rrNode = buildFromNode(node, rrdom, domMirror, parentRRNode);\n\t\tif (rrNode === null) return;\n\t\tif (parentRRNode?.nodeName !== \"IFRAME\" && node.nodeType !== NodeType.DOCUMENT_FRAGMENT_NODE) {\n\t\t\tparentRRNode?.appendChild(rrNode);\n\t\t\trrNode.parentNode = parentRRNode;\n\t\t\trrNode.parentElement = parentRRNode;\n\t\t}\n\t\tif (node.nodeName === \"IFRAME\") {\n\t\t\tconst iframeDoc = node.contentDocument;\n\t\t\tiframeDoc && walk(iframeDoc, rrNode);\n\t\t} else if (node.nodeType === NodeType.DOCUMENT_NODE || node.nodeType === NodeType.ELEMENT_NODE || node.nodeType === NodeType.DOCUMENT_FRAGMENT_NODE) {\n\t\t\tif (node.nodeType === NodeType.ELEMENT_NODE && node.shadowRoot) walk(node.shadowRoot, rrNode);\n\t\t\tnode.childNodes.forEach((childNode) => walk(childNode, rrNode));\n\t\t}\n\t}\n\twalk(dom, null);\n\treturn rrdom;\n}\nfunction createMirror() {\n\treturn new Mirror();\n}\nvar Mirror = class {\n\tidNodeMap = /* @__PURE__ */ new Map();\n\tnodeMetaMap = /* @__PURE__ */ new WeakMap();\n\tgetId(n) {\n\t\tif (!n) return -1;\n\t\treturn this.getMeta(n)?.id ?? -1;\n\t}\n\tgetNode(id) {\n\t\treturn this.idNodeMap.get(id) || null;\n\t}\n\tgetIds() {\n\t\treturn Array.from(this.idNodeMap.keys());\n\t}\n\tgetMeta(n) {\n\t\treturn this.nodeMetaMap.get(n) || null;\n\t}\n\tremoveNodeFromMap(n) {\n\t\tconst id = this.getId(n);\n\t\tthis.idNodeMap.delete(id);\n\t\tif (n.childNodes) n.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\n\t}\n\thas(id) {\n\t\treturn this.idNodeMap.has(id);\n\t}\n\thasNode(node) {\n\t\treturn this.nodeMetaMap.has(node);\n\t}\n\tadd(n, meta) {\n\t\tconst id = meta.id;\n\t\tthis.idNodeMap.set(id, n);\n\t\tthis.nodeMetaMap.set(n, meta);\n\t}\n\treplace(id, n) {\n\t\tconst oldNode = this.getNode(id);\n\t\tif (oldNode) {\n\t\t\tconst meta = this.nodeMetaMap.get(oldNode);\n\t\t\tif (meta) this.nodeMetaMap.set(n, meta);\n\t\t}\n\t\tthis.idNodeMap.set(id, n);\n\t}\n\treset() {\n\t\tthis.idNodeMap = /* @__PURE__ */ new Map();\n\t\tthis.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n\t}\n};\n/**\n* Get a default serializedNodeWithId value for a RRNode.\n* @param id - the serialized id to assign\n*/\nfunction getDefaultSN(node, id) {\n\tswitch (node.RRNodeType) {\n\t\tcase NodeType$1.Document: return {\n\t\t\tid,\n\t\t\ttype: node.RRNodeType,\n\t\t\tchildNodes: []\n\t\t};\n\t\tcase NodeType$1.DocumentType: {\n\t\t\tconst doctype = node;\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\ttype: node.RRNodeType,\n\t\t\t\tname: doctype.name,\n\t\t\t\tpublicId: doctype.publicId,\n\t\t\t\tsystemId: doctype.systemId\n\t\t\t};\n\t\t}\n\t\tcase NodeType$1.Element: return {\n\t\t\tid,\n\t\t\ttype: node.RRNodeType,\n\t\t\ttagName: node.tagName.toLowerCase(),\n\t\t\tattributes: {},\n\t\t\tchildNodes: []\n\t\t};\n\t\tcase NodeType$1.Text: return {\n\t\t\tid,\n\t\t\ttype: node.RRNodeType,\n\t\t\ttextContent: node.textContent || \"\"\n\t\t};\n\t\tcase NodeType$1.Comment: return {\n\t\t\tid,\n\t\t\ttype: node.RRNodeType,\n\t\t\ttextContent: node.textContent || \"\"\n\t\t};\n\t\tcase NodeType$1.CDATA: return {\n\t\t\tid,\n\t\t\ttype: node.RRNodeType,\n\t\t\ttextContent: \"\"\n\t\t};\n\t}\n}\n/**\n* Print the RRDom as a string.\n* @param rootNode - the root node of the RRDom tree\n* @param mirror - a rrweb or rrdom Mirror\n* @returns printed string\n*/\nfunction printRRDom(rootNode, mirror) {\n\treturn walk(rootNode, mirror, \"\");\n}\nfunction walk(node, mirror, blankSpace) {\n\tlet printText = `${blankSpace}${mirror.getId(node)} ${node.toString()}\\n`;\n\tif (node.RRNodeType === NodeType$1.Element) {\n\t\tconst element = node;\n\t\tif (element.shadowRoot) printText += walk(element.shadowRoot, mirror, blankSpace + \"  \");\n\t}\n\tfor (const child of node.childNodes) printText += walk(child, mirror, blankSpace + \"  \");\n\tif (node.nodeName === \"IFRAME\") printText += walk(node.contentDocument, mirror, blankSpace + \"  \");\n\treturn printText;\n}\nexport { BaseRRCDATASection, BaseRRComment, BaseRRDialogElement, BaseRRDocument, BaseRRDocumentType, BaseRRElement, BaseRRMediaElement, BaseRRNode, BaseRRNode as RRNode, BaseRRText, ClassList, Mirror, NodeType, RRCDATASection, RRCanvasElement, RRComment, RRDialogElement, RRDocument, RRDocumentType, RRElement, RRIFrameElement, RRMediaElement, RRStyleElement, RRText, buildFromDom, buildFromNode, createMirror, createOrGetNode, diff, getDefaultSN, printRRDom };\n\n//# sourceMappingURL=rrdom.js.map", "// src/index.ts\nvar testableAccessors = {\n\tNode: [\n\t\t\"childNodes\",\n\t\t\"parentNode\",\n\t\t\"parentElement\",\n\t\t\"textContent\",\n\t\t\"ownerDocument\",\n\t\t\"firstChild\",\n\t\t\"lastChild\",\n\t\t\"nextSibling\",\n\t\t\"previousSibling\"\n\t],\n\tShadowRoot: [\"host\", \"styleSheets\"],\n\tElement: [\n\t\t\"shadowRoot\",\n\t\t\"querySelector\",\n\t\t\"querySelectorAll\"\n\t],\n\tMutationObserver: []\n};\nvar testableMethods = {\n\tNode: [\"contains\", \"getRootNode\"],\n\tShadowRoot: [\"getSelection\"],\n\tElement: [],\n\tMutationObserver: [\"constructor\"]\n};\nvar untaintedBasePrototype = {};\nvar untaintedBaseIframeCleanup = {};\nvar mutationObserverUsers = 0;\nfunction angularZoneUnpatchedAlternative(key) {\n\tconst angularUnpatchedVersionSymbol = globalThis?.Zone?.__symbol__?.(key);\n\tif (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) return globalThis[angularUnpatchedVersionSymbol];\n\telse return;\n}\nfunction getUntaintedPrototype(key) {\n\tif (untaintedBasePrototype[key]) return untaintedBasePrototype[key];\n\tconst defaultObj = angularZoneUnpatchedAlternative(key) || globalThis[key];\n\tconst defaultPrototype = defaultObj.prototype;\n\tconst accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;\n\tconst isUntaintedAccessors = Boolean(accessorNames && accessorNames.every((accessor) => Boolean(Object.getOwnPropertyDescriptor(defaultPrototype, accessor)?.get?.toString().includes(\"[native code]\"))));\n\tconst methodNames = key in testableMethods ? testableMethods[key] : void 0;\n\tconst isUntaintedMethods = Boolean(methodNames && methodNames.every((method) => typeof defaultPrototype[method] === \"function\" && defaultPrototype[method]?.toString().includes(\"[native code]\")));\n\tif (isUntaintedAccessors && isUntaintedMethods) {\n\t\tuntaintedBasePrototype[key] = defaultObj.prototype;\n\t\treturn defaultObj.prototype;\n\t}\n\ttry {\n\t\tconst iframeEl = document.createElement(\"iframe\");\n\t\tiframeEl.style.display = \"none\";\n\t\tdocument.body.appendChild(iframeEl);\n\t\tconst win = iframeEl.contentWindow;\n\t\tif (!win) return defaultObj.prototype;\n\t\tconst untaintedObject = win[key].prototype;\n\t\tif (!untaintedObject) {\n\t\t\tiframeEl.remove();\n\t\t\treturn defaultPrototype;\n\t\t}\n\t\tconst ua = navigator.userAgent;\n\t\tif (ua.includes(\"Safari\") && !ua.includes(\"Chrome\")) {\n\t\t\tiframeEl.classList.add(\"rr-block\");\n\t\t\tiframeEl.setAttribute(\"__rrwebUntaintedMutationObserver\", \"\");\n\t\t\tuntaintedBaseIframeCleanup[key] = () => iframeEl.remove();\n\t\t} else iframeEl.remove();\n\t\treturn untaintedBasePrototype[key] = untaintedObject;\n\t} catch {\n\t\treturn defaultPrototype;\n\t}\n}\nvar untaintedAccessorCache = {};\nfunction getUntaintedAccessor(key, instance, accessor) {\n\tconst cached = untaintedAccessorCache[key]?.[accessor];\n\tif (cached) return cached.call(instance);\n\tconst untaintedPrototype = getUntaintedPrototype(key);\n\tconst untaintedAccessor = Object.getOwnPropertyDescriptor(untaintedPrototype, accessor)?.get;\n\tif (!untaintedAccessor) return instance[accessor];\n\t(untaintedAccessorCache[key] ||= {})[accessor] = untaintedAccessor;\n\treturn untaintedAccessor.call(instance);\n}\nvar untaintedMethodCache = {};\nfunction getUntaintedMethod(key, instance, method) {\n\tconst cacheKey = `${key}.${String(method)}`;\n\tif (untaintedMethodCache[cacheKey]) return untaintedMethodCache[cacheKey].bind(instance);\n\tconst untaintedMethod = getUntaintedPrototype(key)[method];\n\tif (typeof untaintedMethod !== \"function\") return instance[method];\n\tuntaintedMethodCache[cacheKey] = untaintedMethod;\n\treturn untaintedMethod.bind(instance);\n}\nfunction ownerDocument(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"ownerDocument\");\n}\nfunction childNodes(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"childNodes\");\n}\nfunction parentNode(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"parentNode\");\n}\nfunction parentElement(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"parentElement\");\n}\nfunction textContent(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"textContent\");\n}\nfunction firstChild(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"firstChild\");\n}\nfunction lastChild(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"lastChild\");\n}\nfunction nextSibling(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"nextSibling\");\n}\nfunction previousSibling(n) {\n\treturn getUntaintedAccessor(\"Node\", n, \"previousSibling\");\n}\nfunction contains(n, other) {\n\treturn getUntaintedMethod(\"Node\", n, \"contains\")(other);\n}\nfunction getRootNode(n) {\n\treturn getUntaintedMethod(\"Node\", n, \"getRootNode\")();\n}\nfunction host(n) {\n\tif (!n || !(\"host\" in n)) return null;\n\treturn getUntaintedAccessor(\"ShadowRoot\", n, \"host\");\n}\nfunction styleSheets(n) {\n\treturn n.styleSheets;\n}\nfunction shadowRoot(n) {\n\tif (!n || !(\"shadowRoot\" in n)) return null;\n\treturn getUntaintedAccessor(\"Element\", n, \"shadowRoot\");\n}\nfunction querySelector(n, selectors) {\n\treturn getUntaintedAccessor(\"Element\", n, \"querySelector\")(selectors);\n}\nfunction querySelectorAll(n, selectors) {\n\treturn getUntaintedAccessor(\"Element\", n, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor() {\n\tconst prototype = getUntaintedPrototype(\"MutationObserver\");\n\tmutationObserverUsers++;\n\tlet stopCalled = false;\n\treturn [prototype.constructor, () => {\n\t\tif (stopCalled) return;\n\t\tstopCalled = true;\n\t\tif (--mutationObserverUsers !== 0) return;\n\t\tconst cleanup = untaintedBaseIframeCleanup[\"MutationObserver\"];\n\t\tif (!cleanup) return;\n\t\ttry {\n\t\t\tcleanup();\n\t\t} finally {\n\t\t\tdelete untaintedBasePrototype[\"MutationObserver\"];\n\t\t\tdelete untaintedBaseIframeCleanup[\"MutationObserver\"];\n\t\t}\n\t}];\n}\nvar nowTimestamp = Date.now;\nif (!/*@__PURE__*/ /[1-9][0-9]{12}/.test(Date.now().toString())) nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\nfunction patch(source, name, replacement) {\n\ttry {\n\t\tif (!(name in source)) return () => {};\n\t\tconst original = source[name];\n\t\tconst wrapped = replacement(original);\n\t\tif (typeof wrapped === \"function\") {\n\t\t\twrapped.prototype = wrapped.prototype || {};\n\t\t\tObject.defineProperties(wrapped, { __rrweb_original__: {\n\t\t\t\tenumerable: false,\n\t\t\t\tvalue: original\n\t\t\t} });\n\t\t}\n\t\tsource[name] = wrapped;\n\t\treturn () => {\n\t\t\tsource[name] = original;\n\t\t};\n\t} catch {\n\t\treturn () => {};\n\t}\n}\nvar src_default = {\n\townerDocument,\n\tchildNodes,\n\tparentNode,\n\tparentElement,\n\ttextContent,\n\tfirstChild,\n\tlastChild,\n\tnextSibling,\n\tpreviousSibling,\n\tcontains,\n\tgetRootNode,\n\thost,\n\tstyleSheets,\n\tshadowRoot,\n\tquerySelector,\n\tquerySelectorAll,\n\tnowTimestamp,\n\tmutationObserverCtor,\n\tpatch\n};\nexport { childNodes, contains, src_default as default, firstChild, getRootNode, getUntaintedAccessor, getUntaintedMethod, getUntaintedPrototype, host, lastChild, mutationObserverCtor, nextSibling, nowTimestamp, ownerDocument, parentElement, parentNode, patch, previousSibling, querySelector, querySelectorAll, shadowRoot, styleSheets, textContent };\n\n//# sourceMappingURL=utils.js.map", "import type {\n  throttleOptions,\n  listenerHandler,\n  hookResetter,\n  blockClass,\n  addedNodeMutation,\n  DocumentDimension,\n  IWindow,\n  DeprecatedMirror,\n  textMutation,\n  IMirror,\n} from '@rrweb/types';\nimport type { Mirror, SlimDOMOptions } from 'rrweb-snapshot';\nimport { isShadowRoot, IGNORED_NODE, classMatchesRegex } from 'rrweb-snapshot';\nimport { RRNode, RRIFrameElement, BaseRRNode } from 'rrdom';\nimport dom from '@rrweb/utils';\nexport { nowTimestamp } from '@rrweb/utils';\n\nexport function on(\n  type: string,\n  fn: EventListenerOrEventListenerObject,\n  target: Document | IWindow = document,\n): listenerHandler {\n  const options = { capture: true, passive: true };\n  target.addEventListener(type, fn, options);\n  return () => target.removeEventListener(type, fn, options);\n}\n\n// https://github.com/rrweb-io/rrweb/pull/407\nconst DEPARTED_MIRROR_ACCESS_WARNING =\n  'Please stop import mirror directly. Instead of that,' +\n  '\\r\\n' +\n  'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +\n  '\\r\\n' +\n  'or you can use record.mirror to access the mirror instance during recording.';\n/** @deprecated */\nexport let _mirror: DeprecatedMirror = {\n  map: {},\n  getId() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return -1;\n  },\n  getNode() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return null;\n  },\n  removeNodeFromMap() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n  },\n  has() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n    return false;\n  },\n  reset() {\n    console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n  },\n};\nif (typeof window !== 'undefined' && window.Proxy && window.Reflect) {\n  _mirror = new Proxy(_mirror, {\n    get(target, prop, receiver) {\n      if (prop === 'map') {\n        console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n      }\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n      return Reflect.get(target, prop, receiver);\n    },\n  });\n}\n\n// copy from underscore and modified\nexport function throttle<T>(\n  func: (arg: T) => void,\n  wait: number,\n  options: throttleOptions = {},\n) {\n  let timeout: ReturnType<typeof setTimeout> | null = null;\n  let previous = 0;\n  return function (...args: T[]) {\n    const now = Date.now();\n    if (!previous && options.leading === false) {\n      previous = now;\n    }\n    const remaining = wait - (now - previous);\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-this-alias\n    const context = this;\n    if (remaining <= 0 || remaining > wait) {\n      if (timeout) {\n        clearTimeout(timeout);\n        timeout = null;\n      }\n      previous = now;\n      func.apply(context, args);\n    } else if (!timeout && options.trailing !== false) {\n      timeout = setTimeout(() => {\n        previous = options.leading === false ? 0 : Date.now();\n        timeout = null;\n        func.apply(context, args);\n      }, remaining);\n    }\n  };\n}\n\nexport function hookSetter<T>(\n  target: T,\n  key: string | number | symbol,\n  d: PropertyDescriptor,\n  isRevoked?: boolean,\n  win = window,\n): hookResetter {\n  const original = win.Object.getOwnPropertyDescriptor(target, key);\n  win.Object.defineProperty(\n    target,\n    key,\n    isRevoked\n      ? d\n      : {\n          set(value) {\n            // put hooked setter into event loop to avoid of set latency\n            setTimeout(() => {\n              d.set!.call(this, value);\n            }, 0);\n            if (original && original.set) {\n              original.set.call(this, value);\n            }\n          },\n        },\n  );\n  return () => hookSetter(target, key, original || {}, true);\n}\n\nexport function getWindowScroll(win: Window) {\n  const doc = win.document;\n  return {\n    left: doc.scrollingElement\n      ? doc.scrollingElement.scrollLeft\n      : win.pageXOffset !== undefined\n      ? win.pageXOffset\n      : doc.documentElement.scrollLeft ||\n        (doc?.body && dom.parentElement(doc.body)?.scrollLeft) ||\n        doc?.body?.scrollLeft ||\n        0,\n    top: doc.scrollingElement\n      ? doc.scrollingElement.scrollTop\n      : win.pageYOffset !== undefined\n      ? win.pageYOffset\n      : doc?.documentElement.scrollTop ||\n        (doc?.body && dom.parentElement(doc.body)?.scrollTop) ||\n        doc?.body?.scrollTop ||\n        0,\n  };\n}\n\nexport function getWindowHeight(): number {\n  return (\n    window.innerHeight ||\n    (document.documentElement && document.documentElement.clientHeight) ||\n    (document.body && document.body.clientHeight)\n  );\n}\n\nexport function getWindowWidth(): number {\n  return (\n    window.innerWidth ||\n    (document.documentElement && document.documentElement.clientWidth) ||\n    (document.body && document.body.clientWidth)\n  );\n}\n\n/**\n * Returns the given node as an HTMLElement if it is one, otherwise the parent node as an HTMLElement\n * @param node - node to check\n * @returns HTMLElement or null\n */\n\nexport function closestElementOfNode(node: Node | null): HTMLElement | null {\n  if (!node) {\n    return null;\n  }\n  const el: HTMLElement | null =\n    node.nodeType === node.ELEMENT_NODE\n      ? (node as HTMLElement)\n      : dom.parentElement(node);\n  return el;\n}\n\n/**\n * Checks if the given element set to be blocked by rrweb\n * @param node - node to check\n * @param blockClass - class name to check\n * @param blockSelector - css selectors to check\n * @param checkAncestors - whether to search through parent nodes for the block class\n * @returns true/false if the node was blocked or not\n */\nexport function isBlocked(\n  node: Node | null,\n  blockClass: blockClass,\n  blockSelector: string | null,\n  checkAncestors: boolean,\n): boolean {\n  if (!node) {\n    return false;\n  }\n  const el = closestElementOfNode(node);\n\n  if (!el) {\n    return false;\n  }\n\n  try {\n    if (typeof blockClass === 'string') {\n      if (el.classList.contains(blockClass)) return true;\n      if (checkAncestors && el.closest('.' + blockClass) !== null) return true;\n    } else {\n      if (classMatchesRegex(el, blockClass, checkAncestors)) return true;\n    }\n  } catch (e) {\n    // e\n  }\n  if (blockSelector) {\n    if (el.matches(blockSelector)) return true;\n    if (checkAncestors && el.closest(blockSelector) !== null) return true;\n  }\n  return false;\n}\n\nexport function isSerialized(n: Node, mirror: Mirror): boolean {\n  return mirror.getId(n) !== -1;\n}\n\nexport function isIgnored(\n  n: Node,\n  mirror: Mirror,\n  slimDOMOptions: SlimDOMOptions,\n): boolean {\n  if ((n as Element).tagName === 'TITLE' && slimDOMOptions.headTitleMutations) {\n    // we do this check here but not in rrweb-snapshot\n    // to block mutations/animations on the title.\n    // the headTitleMutations option isn't intended to block recording of the initial value\n    return true;\n  }\n  // The main part of the slimDOM check happens in\n  // rrweb-snapshot::serializeNodeWithId\n  return mirror.getId(n) === IGNORED_NODE;\n}\n\nexport function isAncestorRemoved(target: Node, mirror: Mirror): boolean {\n  if (isShadowRoot(target)) {\n    return false;\n  }\n  const id = mirror.getId(target);\n  if (!mirror.has(id)) {\n    return true;\n  }\n  const parent = dom.parentNode(target);\n  if (parent && parent.nodeType === target.DOCUMENT_NODE) {\n    return false;\n  }\n  // if the root is not document, it means the node is not in the DOM tree anymore\n  if (!parent) {\n    return true;\n  }\n  return isAncestorRemoved(parent, mirror);\n}\n\nexport function legacy_isTouchEvent(\n  event: MouseEvent | TouchEvent | PointerEvent,\n): event is TouchEvent {\n  return Boolean((event as TouchEvent).changedTouches);\n}\n\nexport function polyfill(win = window) {\n  if ('NodeList' in win && !win.NodeList.prototype.forEach) {\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    win.NodeList.prototype.forEach = Array.prototype\n      .forEach as unknown as NodeList['forEach'];\n  }\n\n  if ('DOMTokenList' in win && !win.DOMTokenList.prototype.forEach) {\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    win.DOMTokenList.prototype.forEach = Array.prototype\n      .forEach as unknown as DOMTokenList['forEach'];\n  }\n}\n\ntype ResolveTree = {\n  value: addedNodeMutation;\n  children: ResolveTree[];\n  parent: ResolveTree | null;\n};\n\nexport function queueToResolveTrees(queue: addedNodeMutation[]): ResolveTree[] {\n  const queueNodeMap: Record<number, ResolveTree> = {};\n  const putIntoMap = (\n    m: addedNodeMutation,\n    parent: ResolveTree | null,\n  ): ResolveTree => {\n    const nodeInTree: ResolveTree = {\n      value: m,\n      parent,\n      children: [],\n    };\n    queueNodeMap[m.node.id] = nodeInTree;\n    return nodeInTree;\n  };\n\n  const queueNodeTrees: ResolveTree[] = [];\n  for (const mutation of queue) {\n    const { nextId, parentId } = mutation;\n    if (nextId && nextId in queueNodeMap) {\n      const nextInTree = queueNodeMap[nextId];\n      if (nextInTree.parent) {\n        const idx = nextInTree.parent.children.indexOf(nextInTree);\n        nextInTree.parent.children.splice(\n          idx,\n          0,\n          putIntoMap(mutation, nextInTree.parent),\n        );\n      } else {\n        const idx = queueNodeTrees.indexOf(nextInTree);\n        queueNodeTrees.splice(idx, 0, putIntoMap(mutation, null));\n      }\n      continue;\n    }\n    if (parentId in queueNodeMap) {\n      const parentInTree = queueNodeMap[parentId];\n      parentInTree.children.push(putIntoMap(mutation, parentInTree));\n      continue;\n    }\n    queueNodeTrees.push(putIntoMap(mutation, null));\n  }\n\n  return queueNodeTrees;\n}\n\nexport function iterateResolveTree(\n  tree: ResolveTree,\n  cb: (mutation: addedNodeMutation) => unknown,\n) {\n  cb(tree.value);\n  /**\n   * The resolve tree was designed to reflect the DOM layout,\n   * but we need append next sibling first, so we do a reverse\n   * loop here.\n   */\n  for (let i = tree.children.length - 1; i >= 0; i--) {\n    iterateResolveTree(tree.children[i], cb);\n  }\n}\n\nexport type AppendedIframe = {\n  mutationInQueue: addedNodeMutation;\n  builtNode: HTMLIFrameElement | RRIFrameElement;\n};\n\nexport function isSerializedIframe<TNode extends Node | RRNode>(\n  n: TNode,\n  mirror: IMirror<TNode>,\n): boolean {\n  return Boolean(n.nodeName === 'IFRAME' && mirror.getMeta(n));\n}\n\nexport function isSerializedStylesheet<TNode extends Node | RRNode>(\n  n: TNode,\n  mirror: IMirror<TNode>,\n): boolean {\n  return Boolean(\n    n.nodeName === 'LINK' &&\n      n.nodeType === n.ELEMENT_NODE &&\n      (n as HTMLElement).getAttribute &&\n      (n as HTMLElement).getAttribute('rel') === 'stylesheet' &&\n      mirror.getMeta(n),\n  );\n}\n\nexport function getBaseDimension(\n  node: Node,\n  rootIframe: Node,\n): DocumentDimension {\n  const frameElement = node.ownerDocument?.defaultView?.frameElement;\n  if (!frameElement || frameElement === rootIframe) {\n    return {\n      x: 0,\n      y: 0,\n      relativeScale: 1,\n      absoluteScale: 1,\n    };\n  }\n\n  const frameDimension = frameElement.getBoundingClientRect();\n  const frameBaseDimension = getBaseDimension(frameElement, rootIframe);\n  // the iframe element may have a scale transform\n  const relativeScale = frameDimension.height / frameElement.clientHeight;\n  return {\n    x:\n      frameDimension.x * frameBaseDimension.relativeScale +\n      frameBaseDimension.x,\n    y:\n      frameDimension.y * frameBaseDimension.relativeScale +\n      frameBaseDimension.y,\n    relativeScale,\n    absoluteScale: frameBaseDimension.absoluteScale * relativeScale,\n  };\n}\n\nexport function hasShadowRoot<T extends Node | RRNode>(\n  n: T,\n): n is T & { shadowRoot: ShadowRoot } {\n  if (!n) return false;\n  if (n instanceof BaseRRNode && 'shadowRoot' in n) {\n    return Boolean(n.shadowRoot);\n  }\n  return Boolean(dom.shadowRoot(n as unknown as Element));\n}\n\n/**\n * Traverses a CSSRuleList to find a nested rule at the given position.\n *\n * Returns null instead of throwing if the rule doesn't exist. This is important\n * because during replay:\n * - StyleDeclaration events may reference rules added dynamically that don't\n *   exist yet due to timing/ordering issues\n * - StyleSheetRule events that create rules may not have been processed yet\n * - Constructed/adopted stylesheets may not be fully synchronized\n *\n * @param rules - The CSSRuleList to traverse\n * @param position - Array of indices, e.g., [0, 1, 0] for rules[0].cssRules[1].cssRules[0]\n * @returns The nested rule, or null if not found\n */\nexport function getNestedRule(\n  rules: CSSRuleList,\n  position: number[],\n): CSSGroupingRule | null {\n  const rule = rules?.[position[0]] as CSSGroupingRule | null;\n  if (!rule) {\n    return null;\n  }\n  if (position.length === 1) {\n    return rule;\n  } else {\n    return getNestedRule(rule.cssRules, position.slice(1));\n  }\n}\n\nexport function getPositionsAndIndex(nestedIndex: number[]) {\n  const positions = [...nestedIndex];\n  const index = positions.pop();\n  return { positions, index };\n}\n\n/**\n * Returns the latest mutation in the queue for each node.\n * @param mutations - mutations The text mutations to filter.\n * @returns The filtered text mutations.\n */\nexport function uniqueTextMutations(mutations: textMutation[]): textMutation[] {\n  const idSet = new Set<number>();\n  const uniqueMutations: textMutation[] = [];\n\n  for (let i = mutations.length; i--; ) {\n    const mutation = mutations[i];\n    if (!idSet.has(mutation.id)) {\n      uniqueMutations.push(mutation);\n      idSet.add(mutation.id);\n    }\n  }\n\n  return uniqueMutations;\n}\n\nexport class StyleSheetMirror {\n  private id = 1;\n  private styleIDMap = new WeakMap<CSSStyleSheet, number>();\n  private idStyleMap = new Map<number, CSSStyleSheet>();\n\n  getId(stylesheet: CSSStyleSheet): number {\n    return this.styleIDMap.get(stylesheet) ?? -1;\n  }\n\n  has(stylesheet: CSSStyleSheet): boolean {\n    return this.styleIDMap.has(stylesheet);\n  }\n\n  /**\n   * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.\n   */\n  add(stylesheet: CSSStyleSheet, id?: number): number {\n    if (this.has(stylesheet)) return this.getId(stylesheet);\n    let newId: number;\n    if (id === undefined) {\n      newId = this.id++;\n    } else newId = id;\n    this.styleIDMap.set(stylesheet, newId);\n    this.idStyleMap.set(newId, stylesheet);\n    return newId;\n  }\n\n  getStyle(id: number): CSSStyleSheet | null {\n    return this.idStyleMap.get(id) || null;\n  }\n\n  reset(): void {\n    this.styleIDMap = new WeakMap();\n    this.idStyleMap = new Map();\n    this.id = 1;\n  }\n\n  generateId(): number {\n    return this.id++;\n  }\n}\n\n/**\n * Get the direct shadow host of a node in shadow dom. Returns null if it is not in a shadow dom.\n */\nexport function getShadowHost(n: Node): Element | null {\n  let shadowHost: Element | null = null;\n  if (\n    'getRootNode' in n &&\n    dom.getRootNode(n)?.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n    dom.host(dom.getRootNode(n) as ShadowRoot)\n  )\n    shadowHost = dom.host(dom.getRootNode(n) as ShadowRoot);\n  return shadowHost;\n}\n\n/**\n * Get the root shadow host of a node in nested shadow doms. Returns the node itself if it is not in a shadow dom.\n */\nexport function getRootShadowHost(n: Node): Node {\n  let rootShadowHost: Node = n;\n\n  let shadowHost: Element | null;\n  // If n is in a nested shadow dom.\n  while ((shadowHost = getShadowHost(rootShadowHost)))\n    rootShadowHost = shadowHost;\n\n  return rootShadowHost;\n}\n\nexport function shadowHostInDom(n: Node): boolean {\n  const doc = dom.ownerDocument(n);\n  if (!doc) return false;\n  const shadowHost = getRootShadowHost(n);\n  return dom.contains(doc, shadowHost);\n}\n\nexport function inDom(n: Node): boolean {\n  const doc = dom.ownerDocument(n);\n  if (!doc) return false;\n  return dom.contains(doc, n) || shadowHostInDom(n);\n}\n", "// src/index.ts\nvar EventType = /* @__PURE__ */ function(EventType) {\n\tEventType[EventType[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n\tEventType[EventType[\"Load\"] = 1] = \"Load\";\n\tEventType[EventType[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n\tEventType[EventType[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n\tEventType[EventType[\"Meta\"] = 4] = \"Meta\";\n\tEventType[EventType[\"Custom\"] = 5] = \"Custom\";\n\tEventType[EventType[\"Plugin\"] = 6] = \"Plugin\";\n\tEventType[EventType[\"Asset\"] = 7] = \"Asset\";\n\tEventType[EventType[\"Annotation\"] = 8] = \"Annotation\";\n\treturn EventType;\n}({});\nvar IncrementalSource = /* @__PURE__ */ function(IncrementalSource) {\n\tIncrementalSource[IncrementalSource[\"Mutation\"] = 0] = \"Mutation\";\n\tIncrementalSource[IncrementalSource[\"MouseMove\"] = 1] = \"MouseMove\";\n\tIncrementalSource[IncrementalSource[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n\tIncrementalSource[IncrementalSource[\"Scroll\"] = 3] = \"Scroll\";\n\tIncrementalSource[IncrementalSource[\"ViewportResize\"] = 4] = \"ViewportResize\";\n\tIncrementalSource[IncrementalSource[\"Input\"] = 5] = \"Input\";\n\tIncrementalSource[IncrementalSource[\"TouchMove\"] = 6] = \"TouchMove\";\n\tIncrementalSource[IncrementalSource[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n\tIncrementalSource[IncrementalSource[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n\tIncrementalSource[IncrementalSource[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n\tIncrementalSource[IncrementalSource[\"Font\"] = 10] = \"Font\";\n\tIncrementalSource[IncrementalSource[\"Log\"] = 11] = \"Log\";\n\tIncrementalSource[IncrementalSource[\"Drag\"] = 12] = \"Drag\";\n\tIncrementalSource[IncrementalSource[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n\tIncrementalSource[IncrementalSource[\"Selection\"] = 14] = \"Selection\";\n\tIncrementalSource[IncrementalSource[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n\tIncrementalSource[IncrementalSource[\"CustomElement\"] = 16] = \"CustomElement\";\n\treturn IncrementalSource;\n}({});\nvar MouseInteractions = /* @__PURE__ */ function(MouseInteractions) {\n\tMouseInteractions[MouseInteractions[\"MouseUp\"] = 0] = \"MouseUp\";\n\tMouseInteractions[MouseInteractions[\"MouseDown\"] = 1] = \"MouseDown\";\n\tMouseInteractions[MouseInteractions[\"Click\"] = 2] = \"Click\";\n\tMouseInteractions[MouseInteractions[\"ContextMenu\"] = 3] = \"ContextMenu\";\n\tMouseInteractions[MouseInteractions[\"DblClick\"] = 4] = \"DblClick\";\n\tMouseInteractions[MouseInteractions[\"Focus\"] = 5] = \"Focus\";\n\tMouseInteractions[MouseInteractions[\"Blur\"] = 6] = \"Blur\";\n\tMouseInteractions[MouseInteractions[\"TouchStart\"] = 7] = \"TouchStart\";\n\tMouseInteractions[MouseInteractions[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n\tMouseInteractions[MouseInteractions[\"TouchEnd\"] = 9] = \"TouchEnd\";\n\tMouseInteractions[MouseInteractions[\"TouchCancel\"] = 10] = \"TouchCancel\";\n\treturn MouseInteractions;\n}({});\nvar PointerTypes = /* @__PURE__ */ function(PointerTypes) {\n\tPointerTypes[PointerTypes[\"Mouse\"] = 0] = \"Mouse\";\n\tPointerTypes[PointerTypes[\"Pen\"] = 1] = \"Pen\";\n\tPointerTypes[PointerTypes[\"Touch\"] = 2] = \"Touch\";\n\treturn PointerTypes;\n}({});\nvar CanvasContext = /* @__PURE__ */ function(CanvasContext) {\n\tCanvasContext[CanvasContext[\"2D\"] = 0] = \"2D\";\n\tCanvasContext[CanvasContext[\"WebGL\"] = 1] = \"WebGL\";\n\tCanvasContext[CanvasContext[\"WebGL2\"] = 2] = \"WebGL2\";\n\treturn CanvasContext;\n}({});\nvar MediaInteractions = /* @__PURE__ */ function(MediaInteractions) {\n\tMediaInteractions[MediaInteractions[\"Play\"] = 0] = \"Play\";\n\tMediaInteractions[MediaInteractions[\"Pause\"] = 1] = \"Pause\";\n\tMediaInteractions[MediaInteractions[\"Seeked\"] = 2] = \"Seeked\";\n\tMediaInteractions[MediaInteractions[\"VolumeChange\"] = 3] = \"VolumeChange\";\n\tMediaInteractions[MediaInteractions[\"RateChange\"] = 4] = \"RateChange\";\n\treturn MediaInteractions;\n}({});\nvar ReplayerEvents = /* @__PURE__ */ function(ReplayerEvents) {\n\tReplayerEvents[\"Start\"] = \"start\";\n\tReplayerEvents[\"Pause\"] = \"pause\";\n\t/**\n\t* @deprecated use Play instead\n\t*/\n\tReplayerEvents[\"Resume\"] = \"resume\";\n\tReplayerEvents[\"Resize\"] = \"resize\";\n\tReplayerEvents[\"Finish\"] = \"finish\";\n\tReplayerEvents[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n\tReplayerEvents[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n\tReplayerEvents[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n\tReplayerEvents[\"SkipStart\"] = \"skip-start\";\n\tReplayerEvents[\"SkipEnd\"] = \"skip-end\";\n\tReplayerEvents[\"MouseInteraction\"] = \"mouse-interaction\";\n\tReplayerEvents[\"EventCast\"] = \"event-cast\";\n\tReplayerEvents[\"CustomEvent\"] = \"custom-event\";\n\tReplayerEvents[\"Annotation\"] = \"annotation\";\n\tReplayerEvents[\"Flush\"] = \"flush\";\n\tReplayerEvents[\"StateChange\"] = \"state-change\";\n\tReplayerEvents[\"PlayBack\"] = \"play-back\";\n\tReplayerEvents[\"Destroy\"] = \"destroy\";\n\treturn ReplayerEvents;\n}({});\nvar NodeType = /* @__PURE__ */ function(NodeType) {\n\tNodeType[NodeType[\"Document\"] = 0] = \"Document\";\n\tNodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n\tNodeType[NodeType[\"Element\"] = 2] = \"Element\";\n\tNodeType[NodeType[\"Text\"] = 3] = \"Text\";\n\tNodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n\tNodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n\treturn NodeType;\n}({});\nexport { CanvasContext, EventType, IncrementalSource, MediaInteractions, MouseInteractions, NodeType, PointerTypes, ReplayerEvents };\n\n//# sourceMappingURL=types.js.map", "import {\n  serializeNodeWithId,\n  transformAttribute,\n  IGNORED_NODE,\n  ignoreAttribute,\n  isShadowRoot,\n  needMaskingText,\n  maskInputValue,\n  isNativeShadowDom,\n  getInputType,\n  toLowerCase,\n} from 'rrweb-snapshot';\nimport type { observerParam, MutationBufferParam } from '../types';\nimport type {\n  mutationRecord,\n  textCursor,\n  attributeCursor,\n  removedNodeMutation,\n  addedNodeMutation,\n} from '@rrweb/types';\nimport {\n  isBlocked,\n  isAncestorRemoved,\n  isIgnored,\n  isSerialized,\n  hasShadowRoot,\n  isSerializedIframe,\n  isSerializedStylesheet,\n  inDom,\n  getShadowHost,\n  closestElementOfNode,\n} from '../utils';\nimport dom from '@rrweb/utils';\n\nconst moveKey = (id: number, parentId: number) => `${id}@${parentId}`;\n\n/**\n * controls behaviour of a MutationObserver\n */\nexport default class MutationBuffer {\n  private frozen = false;\n  private locked = false;\n\n  private texts: textCursor[] = [];\n  private attributes: attributeCursor[] = [];\n  private attributeMap = new WeakMap<Node, attributeCursor>();\n  private removes: removedNodeMutation[] = [];\n  private mapRemoves: Node[] = [];\n\n  private movedMap: Record<string, true> = {};\n\n  /**\n   * the browser MutationObserver emits multiple mutations after\n   * a delay for performance reasons, making tracing added nodes hard\n   * in our `processMutations` callback function.\n   * For example, if we append an element el_1 into body, and then append\n   * another element el_2 into el_1, these two mutations may be passed to the\n   * callback function together when the two operations were done.\n   * Generally we need to trace child nodes of newly added nodes, but in this\n   * case if we count el_2 as el_1's child node in the first mutation record,\n   * then we will count el_2 again in the second mutation record which was\n   * duplicated.\n   * To avoid of duplicate counting added nodes, we use a Set to store\n   * added nodes and its child nodes during iterate mutation records. Then\n   * collect added nodes from the Set which have no duplicate copy. But\n   * this also causes newly added nodes will not be serialized with id ASAP,\n   * which means all the id related calculation should be lazy too.\n   */\n  private addedSet = new Set<Node>();\n  private movedSet = new Set<Node>();\n  private droppedSet = new Set<Node>();\n  private removesSubTreeCache = new Set<Node>();\n\n  private mutationCb: observerParam['mutationCb'];\n  private blockClass: observerParam['blockClass'];\n  private blockSelector: observerParam['blockSelector'];\n  private maskTextClass: observerParam['maskTextClass'];\n  private maskTextSelector: observerParam['maskTextSelector'];\n  private inlineStylesheet: observerParam['inlineStylesheet'];\n  private maskInputOptions: observerParam['maskInputOptions'];\n  private maskTextFn: observerParam['maskTextFn'];\n  private maskInputFn: observerParam['maskInputFn'];\n  private keepIframeSrcFn: observerParam['keepIframeSrcFn'];\n  private recordCanvas: observerParam['recordCanvas'];\n  private inlineImages: observerParam['inlineImages'];\n  private slimDOMOptions: observerParam['slimDOMOptions'];\n  private dataURLOptions: observerParam['dataURLOptions'];\n  private doc: observerParam['doc'];\n  private mirror: observerParam['mirror'];\n\n  // managers: convenience references to per-recording singletons\n  private iframeManager: observerParam['iframeManager'];\n  private stylesheetManager: observerParam['stylesheetManager'];\n  private shadowDomManager: observerParam['shadowDomManager'];\n  private processedNodeManager: observerParam['processedNodeManager'];\n\n  private unattachedDoc: HTMLDocument;\n\n  public init(options: MutationBufferParam) {\n    (\n      [\n        'mutationCb',\n        'blockClass',\n        'blockSelector',\n        'maskTextClass',\n        'maskTextSelector',\n        'inlineStylesheet',\n        'maskInputOptions',\n        'maskTextFn',\n        'maskInputFn',\n        'keepIframeSrcFn',\n        'recordCanvas',\n        'inlineImages',\n        'slimDOMOptions',\n        'dataURLOptions',\n        'doc',\n        'mirror',\n        'iframeManager',\n        'stylesheetManager',\n        'shadowDomManager',\n        'processedNodeManager',\n      ] as const\n    ).forEach((key) => {\n      // just a type trick, the runtime result is correct\n      this[key] = options[key] as never;\n    });\n  }\n\n  public freeze() {\n    this.frozen = true;\n  }\n\n  public unfreeze() {\n    this.frozen = false;\n    this.emit();\n  }\n\n  public isFrozen() {\n    return this.frozen;\n  }\n\n  public lock() {\n    this.locked = true;\n  }\n\n  public unlock() {\n    this.locked = false;\n    this.emit();\n  }\n\n  public processMutations = (mutations: mutationRecord[]) => {\n    mutations.forEach(this.processMutation); // adds mutations to the buffer\n    this.emit(); // clears buffer if not locked/frozen\n  };\n\n  public emit = () => {\n    if (this.frozen || this.locked) {\n      return;\n    }\n\n    // delay any modification of the mirror until this function\n    // so that the mirror for takeFullSnapshot doesn't get mutated while it's event is being processed\n\n    const adds: addedNodeMutation[] = [];\n    const addedIds = new Set<number>();\n\n    while (this.mapRemoves.length) {\n      this.mirror.removeNodeFromMap(this.mapRemoves.shift()!);\n    }\n\n    for (const n of this.movedSet) {\n      const parentNode = dom.parentNode(n);\n      if (\n        this.removesSubTreeCache.has(parentNode as Node) &&\n        !this.movedSet.has(parentNode as Node)\n      ) {\n        continue;\n      }\n      this.addedSet.add(n);\n    }\n\n    let n: Node | null = null;\n    let parentNode: Node | null = null;\n    let parentId = -1;\n    let nextSibling: Node | null = null;\n    let ancestorBad = false;\n    const missingParents = new Set<Node>();\n    const iter = this.addedSet.values();\n    let curr = iter.next();\n    while (this.addedSet.size) {\n      if (n !== null && this.addedSet.has(dom.previousSibling(n) as Node)) {\n        // reuse parentNode, parentId, ancestorBad\n        nextSibling = n; // n is a good next sibling\n        n = dom.previousSibling(n) as Node;\n      } else {\n        if (!this.addedSet.has(curr.value as Node)) {\n          // having the `iter` here rather than picking directly from this.addedSet\n          // ensures we don't get caught re-traversing 'tombstones' in the Set\n          // (we reuse curr in multiple iterations until it's ancestors and nextSiblings are serialized)\n          curr = iter.next();\n        }\n        n = curr.value as Node;\n\n        // eslint-disable-next-line no-constant-condition\n        while (true) {\n          parentNode = dom.parentNode(n);\n          if (this.addedSet.has(parentNode as Node)) {\n            // start at top of added tree so as not to serialize children before their parents (parentId requirement)\n            n = parentNode as Node;\n            continue;\n          }\n          break;\n        }\n\n        if (missingParents.has(parentNode as Node)) {\n          parentNode = null;\n        } else if (parentNode) {\n          // we have a new parentNode for a 'row' of DOM children\n          // perf: we reuse these calculations across all child nodes\n\n          if (!inDom(parentNode)) {\n            ancestorBad = true;\n          } else {\n            ancestorBad =\n              isSelfOrAncestorInSet(this.droppedSet, parentNode) ||\n              this.removesSubTreeCache.has(parentNode);\n\n            if (ancestorBad && isSelfOrAncestorInSet(this.movedSet, n)) {\n              // not bad, just moved\n              ancestorBad = false;\n            }\n          }\n\n          if (this.addedSet.has(dom.lastChild(parentNode) as Node)) {\n            // jump instead of crawling nextSibling to nextSibling\n            n = dom.lastChild(parentNode) as Node;\n            nextSibling = null;\n          } else {\n            // eslint-disable-next-line no-constant-condition\n            while (true) {\n              nextSibling = dom.nextSibling(n);\n              if (this.addedSet.has(nextSibling as Node)) {\n                // keep going as we can't serialize a node before it's next sibling (nextId requirement)\n                n = nextSibling as Node;\n                continue;\n              }\n              break;\n            }\n          }\n\n          parentId = isShadowRoot(parentNode)\n            ? this.mirror.getId(getShadowHost(n))\n            : this.mirror.getId(parentNode);\n\n          // If the node is the direct child of a shadow root, we treat the shadow host as its parent node.\n          if (\n            parentId === -1 &&\n            parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n          ) {\n            const shadowHost = dom.host(parentNode as ShadowRoot);\n            parentId = this.mirror.getId(shadowHost);\n          }\n        }\n      }\n\n      this.addedSet.delete(n); // don't re-iterate\n\n      if (!parentNode || parentId === -1) {\n        missingParents.add(n); // ensure any added child nodes can also early-out\n        continue;\n      } else if (ancestorBad) {\n        // it's possible we could unify missingParents and this.droppedSet\n        // but would need to check the subtleties\n        this.droppedSet.add(n);\n        continue;\n      }\n\n      let cssCaptured = false;\n      if (n.nodeType === Node.TEXT_NODE) {\n        const parentTag = (parentNode as Element).tagName;\n        if (parentTag === 'TEXTAREA') {\n          // genTextAreaValueMutation already called via parent\n          continue;\n        } else if (parentTag === 'STYLE' && addedIds.has(parentId)) {\n          // css content will be recorded via parent's _cssText attribute when\n          // mutation adds entire <style> element\n          cssCaptured = true;\n        }\n      }\n\n      let nextId = nextSibling ? this.mirror.getId(nextSibling) : null;\n      while (nextId === IGNORED_NODE) {\n        nextSibling = nextSibling && dom.nextSibling(nextSibling);\n        nextId = nextSibling && this.mirror.getId(nextSibling);\n      }\n      if (nextId === -1) {\n        // sibling not included in addedNodes, but\n        // no id as not yet serialized?\n        console.warn(\n          \"Couldn't record new node. Couldn't find mirror id for nextSibling:\",\n          nextSibling,\n        );\n        n = null; // don't iterate to previousSibling as we haven't successful serialized this node\n        continue;\n      }\n      const sn = serializeNodeWithId(n, {\n        doc: this.doc,\n        mirror: this.mirror,\n        blockClass: this.blockClass,\n        blockSelector: this.blockSelector,\n        maskTextClass: this.maskTextClass,\n        maskTextSelector: this.maskTextSelector,\n        skipChild: true,\n        newlyAddedElement: true,\n        inlineStylesheet: this.inlineStylesheet,\n        maskInputOptions: this.maskInputOptions,\n        maskTextFn: this.maskTextFn,\n        maskInputFn: this.maskInputFn,\n        slimDOMOptions: this.slimDOMOptions,\n        dataURLOptions: this.dataURLOptions,\n        recordCanvas: this.recordCanvas,\n        inlineImages: this.inlineImages,\n        onSerialize: (currentN) => {\n          if (isSerializedIframe(currentN, this.mirror)) {\n            this.iframeManager.addIframe(currentN as HTMLIFrameElement);\n          }\n          if (isSerializedStylesheet(currentN, this.mirror)) {\n            this.stylesheetManager.trackLinkElement(\n              currentN as HTMLLinkElement,\n            );\n          }\n          if (hasShadowRoot(n as Node)) {\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            this.shadowDomManager.addShadowRoot(\n              dom.shadowRoot(n as Node)!,\n              this.doc,\n            );\n          }\n        },\n        onIframeLoad: (iframe, childSn) => {\n          this.iframeManager.attachIframe(iframe, childSn);\n          this.shadowDomManager.observeAttachShadow(iframe);\n        },\n        onStylesheetLoad: (link, childSn) => {\n          this.stylesheetManager.attachLinkElement(link, childSn);\n        },\n        cssCaptured,\n      });\n      if (sn) {\n        adds.push({\n          parentId,\n          nextId,\n          node: sn,\n        });\n        addedIds.add(sn.id);\n      }\n    }\n\n    const payload = {\n      texts: this.texts\n        .map((text) => {\n          const n = text.node;\n          const parent = dom.parentNode(n);\n          if (parent && (parent as Element).tagName === 'TEXTAREA') {\n            // the node is being ignored as it isn't in the mirror, so shift mutation to attributes on parent textarea\n            this.genTextAreaValueMutation(parent as HTMLTextAreaElement);\n          }\n          return {\n            id: this.mirror.getId(n),\n            value: text.value,\n          };\n        })\n        // no need to include them on added elements, as they have just been serialized with up to date attribubtes\n        .filter((text) => !addedIds.has(text.id))\n        // text mutation's id was not in the mirror map means the target node has been removed\n        .filter((text) => this.mirror.has(text.id)),\n      attributes: this.attributes\n        .map((attribute) => {\n          const { attributes } = attribute;\n          if (typeof attributes.style === 'string') {\n            const diffAsStr = JSON.stringify(attribute.styleDiff);\n            const unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\n            // check if the style diff is actually shorter than the regular string based mutation\n            // (which was the whole point of #464 'compact style mutation').\n            if (diffAsStr.length < attributes.style.length) {\n              // also: CSSOM fails badly when var() is present on shorthand properties, so only proceed with\n              // the compact style mutation if these have all been accounted for\n              if (\n                (diffAsStr + unchangedAsStr).split('var(').length ===\n                attributes.style.split('var(').length\n              ) {\n                attributes.style = attribute.styleDiff;\n              }\n            }\n          }\n          return {\n            id: this.mirror.getId(attribute.node),\n            attributes: attributes,\n          };\n        })\n        // no need to include them on added elements, as they have just been serialized with up to date attribubtes\n        .filter((attribute) => !addedIds.has(attribute.id))\n        // attribute mutation's id was not in the mirror map means the target node has been removed\n        .filter((attribute) => this.mirror.has(attribute.id)),\n      removes: this.removes,\n      adds,\n    };\n    // payload may be empty if the mutations happened in some blocked elements\n    if (\n      !payload.texts.length &&\n      !payload.attributes.length &&\n      !payload.removes.length &&\n      !payload.adds.length\n    ) {\n      return;\n    }\n\n    // reset\n    this.texts = [];\n    this.attributes = [];\n    this.attributeMap = new WeakMap<Node, attributeCursor>();\n    this.removes = [];\n    this.addedSet = new Set<Node>();\n    this.movedSet = new Set<Node>();\n    this.droppedSet = new Set<Node>();\n    this.removesSubTreeCache = new Set<Node>();\n    this.movedMap = {};\n\n    this.mutationCb(payload);\n  };\n\n  private genTextAreaValueMutation = (textarea: HTMLTextAreaElement) => {\n    let item = this.attributeMap.get(textarea);\n    if (!item) {\n      item = {\n        node: textarea,\n        attributes: {},\n        styleDiff: {},\n        _unchangedStyles: {},\n      };\n      this.attributes.push(item);\n      this.attributeMap.set(textarea, item);\n    }\n    const value = Array.from(\n      dom.childNodes(textarea),\n      (cn) => dom.textContent(cn) || '',\n    ).join('');\n    item.attributes.value = maskInputValue({\n      element: textarea,\n      maskInputOptions: this.maskInputOptions,\n      tagName: textarea.tagName,\n      type: getInputType(textarea),\n      value,\n      maskInputFn: this.maskInputFn,\n    });\n  };\n\n  private processMutation = (m: mutationRecord) => {\n    if (isIgnored(m.target, this.mirror, this.slimDOMOptions)) {\n      return;\n    }\n    switch (m.type) {\n      case 'characterData': {\n        const value = dom.textContent(m.target);\n\n        if (\n          !isBlocked(m.target, this.blockClass, this.blockSelector, false) &&\n          value !== m.oldValue\n        ) {\n          this.texts.push({\n            value:\n              needMaskingText(\n                m.target,\n                this.maskTextClass,\n                this.maskTextSelector,\n                true, // checkAncestors\n              ) && value\n                ? this.maskTextFn\n                  ? this.maskTextFn(value, closestElementOfNode(m.target))\n                  : value.replace(/[\\S]/g, '*')\n                : value,\n            node: m.target,\n          });\n        }\n        break;\n      }\n      case 'attributes': {\n        const target = m.target as HTMLElement;\n        const tagNameLower = toLowerCase(target.tagName);\n        let attributeName = m.attributeName as string;\n        let value = (m.target as HTMLElement).getAttribute(attributeName);\n\n        if (attributeName === 'value') {\n          const type = getInputType(target);\n\n          value = maskInputValue({\n            element: target,\n            maskInputOptions: this.maskInputOptions,\n            tagName: target.tagName,\n            type,\n            value,\n            maskInputFn: this.maskInputFn,\n          });\n        }\n        if (\n          isBlocked(m.target, this.blockClass, this.blockSelector, false) ||\n          value === m.oldValue\n        ) {\n          return;\n        }\n\n        let item = this.attributeMap.get(m.target);\n        if (\n          tagNameLower === 'iframe' &&\n          attributeName === 'src' &&\n          !this.keepIframeSrcFn(value as string)\n        ) {\n          if (!(target as HTMLIFrameElement).contentDocument) {\n            // we can't record it directly as we can't see into it\n            // preserve the src attribute so a decision can be taken at replay time\n            attributeName = 'rr_src';\n          } else {\n            return;\n          }\n        }\n        if (!item) {\n          item = {\n            node: m.target,\n            attributes: {},\n            styleDiff: {},\n            _unchangedStyles: {},\n          };\n          this.attributes.push(item);\n          this.attributeMap.set(m.target, item);\n        }\n\n        // Keep this property on inputs that used to be password inputs\n        // This is used to ensure we do not unmask value when using e.g. a \"Show password\" type button\n        if (\n          attributeName === 'type' &&\n          tagNameLower === 'input' &&\n          (m.oldValue || '').toLowerCase() === 'password'\n        ) {\n          target.setAttribute('data-rr-is-password', 'true');\n        }\n\n        if (!ignoreAttribute(tagNameLower, attributeName, value)) {\n          // overwrite attribute if the mutations was triggered in same time\n          item.attributes[attributeName] = transformAttribute(\n            this.doc,\n            tagNameLower,\n            toLowerCase(attributeName),\n            value,\n          );\n          if (attributeName === 'style') {\n            if (!this.unattachedDoc) {\n              try {\n                // avoid upsetting original document from a Content Security point of view\n                this.unattachedDoc =\n                  document.implementation.createHTMLDocument();\n              } catch (e) {\n                // fallback to more direct method\n                this.unattachedDoc = this.doc;\n              }\n            }\n            const old = this.unattachedDoc.createElement('span');\n            if (m.oldValue) {\n              old.setAttribute('style', m.oldValue);\n            }\n            for (const pname of Array.from(target.style)) {\n              const newValue = target.style.getPropertyValue(pname);\n              const newPriority = target.style.getPropertyPriority(pname);\n              if (\n                newValue !== old.style.getPropertyValue(pname) ||\n                newPriority !== old.style.getPropertyPriority(pname)\n              ) {\n                if (newPriority === '') {\n                  item.styleDiff[pname] = newValue;\n                } else {\n                  item.styleDiff[pname] = [newValue, newPriority];\n                }\n              } else {\n                // for checking\n                item._unchangedStyles[pname] = [newValue, newPriority];\n              }\n            }\n            for (const pname of Array.from(old.style)) {\n              if (target.style.getPropertyValue(pname) === '') {\n                // \"if not set, returns the empty string\"\n                item.styleDiff[pname] = false; // delete\n              }\n            }\n          } else if (attributeName === 'open' && target.tagName === 'DIALOG') {\n            if (target.matches('dialog:modal')) {\n              item.attributes['rr_open_mode'] = 'modal';\n            } else {\n              item.attributes['rr_open_mode'] = 'non-modal';\n            }\n          }\n        }\n        break;\n      }\n      case 'childList': {\n        /**\n         * Parent is blocked, ignore all child mutations\n         */\n        if (isBlocked(m.target, this.blockClass, this.blockSelector, true))\n          return;\n\n        if ((m.target as Element).tagName === 'TEXTAREA') {\n          // children would be ignored in genAdds as they aren't in the mirror\n          this.genTextAreaValueMutation(m.target as HTMLTextAreaElement);\n          return; // any removedNodes won't have been in mirror either\n        }\n\n        m.addedNodes.forEach((n) => this.genAdds(n, m.target));\n        m.removedNodes.forEach((n) => {\n          if (!inDom(n)) {\n            this.shadowDomManager.removeShadowRootsIn(n);\n          }\n          const nodeId = this.mirror.getId(n);\n          const parentId = isShadowRoot(m.target)\n            ? this.mirror.getId(dom.host(m.target))\n            : this.mirror.getId(m.target);\n          if (\n            isBlocked(m.target, this.blockClass, this.blockSelector, false) ||\n            isIgnored(n, this.mirror, this.slimDOMOptions) ||\n            !isSerialized(n, this.mirror)\n          ) {\n            return;\n          }\n          // removed node has not been serialized yet, just remove it from the Set\n          if (this.addedSet.has(n)) {\n            deepDelete(this.addedSet, n);\n            this.droppedSet.add(n);\n          } else if (this.addedSet.has(m.target) && nodeId === -1) {\n            /**\n             * If target was newly added and removed child node was\n             * not serialized, it means the child node has been removed\n             * before callback fired, so we can ignore it because\n             * newly added node will be serialized without child nodes.\n             * TODO: verify this\n             */\n          } else if (isAncestorRemoved(m.target, this.mirror)) {\n            /**\n             * If parent id was not in the mirror map any more, it\n             * means the parent node has already been removed. So\n             * the node is also removed which we do not need to track\n             * and replay.\n             */\n          } else if (\n            this.movedSet.has(n) &&\n            this.movedMap[moveKey(nodeId, parentId)]\n          ) {\n            deepDelete(this.movedSet, n);\n          } else {\n            this.removes.push({\n              parentId,\n              id: nodeId,\n              isShadow:\n                isShadowRoot(m.target) && isNativeShadowDom(m.target)\n                  ? true\n                  : undefined,\n            });\n            processRemoves(n, this.removesSubTreeCache);\n          }\n          this.mapRemoves.push(n);\n        });\n        break;\n      }\n      default:\n        break;\n    }\n  };\n\n  /**\n   * Make sure you check if `n`'s parent is blocked before calling this function\n   * */\n  private genAdds = (n: Node, target?: Node) => {\n    // this node was already recorded in other buffer, ignore it\n    if (this.processedNodeManager.inOtherBuffer(n, this)) return;\n\n    // if n is added to set, there is no need to travel it and its' children again\n    if (this.addedSet.has(n) || this.movedSet.has(n)) return;\n\n    if (this.mirror.hasNode(n)) {\n      if (isIgnored(n, this.mirror, this.slimDOMOptions)) {\n        return;\n      }\n      this.movedSet.add(n);\n      let targetId: number | null = null;\n      if (target && this.mirror.hasNode(target)) {\n        targetId = this.mirror.getId(target);\n      }\n      if (targetId && targetId !== -1) {\n        this.movedMap[moveKey(this.mirror.getId(n), targetId)] = true;\n      }\n    } else {\n      this.addedSet.add(n);\n      this.droppedSet.delete(n);\n    }\n\n    // if this node is blocked `serializeNode` will turn it into a placeholder element\n    // but we have to remove it's children otherwise they will be added as placeholders too\n    if (!isBlocked(n, this.blockClass, this.blockSelector, false)) {\n      dom.childNodes(n).forEach((childN) => this.genAdds(childN));\n      if (hasShadowRoot(n)) {\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        dom.childNodes(dom.shadowRoot(n)!).forEach((childN) => {\n          this.processedNodeManager.add(childN, this);\n          this.genAdds(childN, n);\n        });\n      }\n    }\n  };\n}\n\n/**\n * Some utils to handle the mutation observer DOM records.\n * It should be more clear to extend the native data structure\n * like Set and Map, but currently Typescript does not support\n * that.\n */\nfunction deepDelete(addsSet: Set<Node>, n: Node) {\n  addsSet.delete(n);\n  dom.childNodes(n).forEach((childN) => deepDelete(addsSet, childN));\n}\n\nfunction processRemoves(n: Node, cache: Set<Node>) {\n  const queue = [n];\n\n  while (queue.length) {\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const next = queue.pop()!;\n    if (cache.has(next)) continue;\n    cache.add(next);\n    dom.childNodes(next).forEach((n) => queue.push(n));\n  }\n\n  return;\n}\n\nfunction isSelfOrAncestorInSet(set: Set<Node>, n: Node): boolean {\n  if (set.size === 0) return false;\n  return _isSelfOrAncestorInSet(set, n);\n}\n\nfunction _isSelfOrAncestorInSet(set: Set<Node>, n: Node): boolean {\n  if (set.has(n)) {\n    return true;\n  }\n  const parent = dom.parentNode(n);\n  if (!parent) {\n    return false;\n  }\n  return _isSelfOrAncestorInSet(set, parent);\n}\n", "import type { ErrorHandler } from '../types';\n\ntype Callback = (...args: unknown[]) => unknown;\n\nlet errorHandler: ErrorHandler | undefined;\n\nexport function registerErrorHandler(handler: ErrorHandler | undefined) {\n  errorHandler = handler;\n}\n\nexport function unregisterErrorHandler() {\n  errorHandler = undefined;\n}\n\n/**\n * Wrap callbacks in a wrapper that allows to pass errors to a configured `errorHandler` method.\n */\nexport const callbackWrapper = <T extends Callback>(cb: T): T => {\n  if (!errorHandler) {\n    return cb;\n  }\n\n  const rrwebWrapped = ((...rest: unknown[]) => {\n    try {\n      return cb(...rest);\n    } catch (error) {\n      if (errorHandler && errorHandler(error) === true) {\n        return;\n      }\n\n      throw error;\n    }\n  }) as unknown as T;\n\n  return rrwebWrapped;\n};\n", "import {\n  type MaskInputOptions,\n  maskInputValue,\n  Mirror,\n  getInputType,\n  toLowerCase,\n} from 'rrweb-snapshot';\nimport type { FontFaceSet } from 'css-font-loading-module';\nimport {\n  throttle,\n  on,\n  hookSetter,\n  getWindowScroll,\n  getWindowHeight,\n  getWindowWidth,\n  isBlocked,\n  legacy_isTouchEvent,\n  StyleSheetMirror,\n  nowTimestamp,\n} from '../utils';\nimport { patch } from '@rrweb/utils';\nimport type { observerParam, MutationBufferParam } from '../types';\nimport {\n  IncrementalSource,\n  MouseInteractions,\n  PointerTypes,\n  MediaInteractions,\n} from '@rrweb/types';\nimport type {\n  mutationCallBack,\n  mousemoveCallBack,\n  mousePosition,\n  mouseInteractionCallBack,\n  listenerHandler,\n  scrollCallback,\n  styleSheetRuleCallback,\n  viewportResizeCallback,\n  inputValue,\n  inputCallback,\n  hookResetter,\n  hooksParam,\n  Arguments,\n  mediaInteractionCallback,\n  canvasMutationCallback,\n  fontCallback,\n  fontParam,\n  styleDeclarationCallback,\n  IWindow,\n  SelectionRange,\n  selectionCallback,\n  customElementCallback,\n} from '@rrweb/types';\nimport MutationBuffer from './mutation';\nimport { callbackWrapper } from './error-handler';\nimport dom, { mutationObserverCtor } from '@rrweb/utils';\n\n// one principal mutation buffer, but also one per shadowRoot/iframe on the page\nexport const mutationBuffers = new Set<MutationBuffer>();\n\n// Event.path is non-standard and used in some older browsers\ntype NonStandardEvent = Omit<Event, 'composedPath'> & {\n  path: EventTarget[];\n};\n\nfunction getEventTarget(event: Event | NonStandardEvent): EventTarget | null {\n  try {\n    if ('composedPath' in event) {\n      const path = event.composedPath();\n      if (path.length) {\n        return path[0];\n      }\n    } else if ('path' in event && event.path.length) {\n      return event.path[0];\n    }\n  } catch {\n    // fallback to `event.target` below\n  }\n\n  return event && event.target;\n}\n\nexport function initMutationObserver(\n  options: MutationBufferParam,\n  rootEl: Node,\n): listenerHandler {\n  const mutationBuffer = new MutationBuffer();\n  mutationBuffers.add(mutationBuffer);\n  // see mutation.ts for details\n  mutationBuffer.init(options);\n  const [ObserverCtor, releaseObserverConstructor] = mutationObserverCtor();\n  const observer = new (ObserverCtor as new (\n    callback: MutationCallback,\n  ) => MutationObserver)(\n    callbackWrapper(mutationBuffer.processMutations.bind(mutationBuffer)),\n  );\n  observer.observe(rootEl, {\n    attributes: true,\n    attributeOldValue: true,\n    characterData: true,\n    characterDataOldValue: true,\n    childList: true,\n    subtree: true,\n  });\n  const stop = () => {\n    observer.disconnect();\n    mutationBuffers.delete(mutationBuffer);\n    releaseObserverConstructor();\n  };\n  return stop;\n}\n\nfunction initMoveObserver({\n  mousemoveCb,\n  sampling,\n  doc,\n  mirror,\n}: observerParam): listenerHandler {\n  if (sampling.mousemove === false) {\n    return () => {\n      //\n    };\n  }\n\n  const threshold =\n    typeof sampling.mousemove === 'number' ? sampling.mousemove : 50;\n  const callbackThreshold =\n    typeof sampling.mousemoveCallback === 'number'\n      ? sampling.mousemoveCallback\n      : 500;\n\n  let positions: mousePosition[] = [];\n  let timeBaseline: number | null;\n  const wrappedCb = throttle(\n    callbackWrapper(\n      (\n        source:\n          | IncrementalSource.MouseMove\n          | IncrementalSource.TouchMove\n          | IncrementalSource.Drag,\n      ) => {\n        const totalOffset = Date.now() - timeBaseline!;\n        mousemoveCb(\n          positions.map((p) => {\n            p.timeOffset -= totalOffset;\n            return p;\n          }),\n          source,\n        );\n        positions = [];\n        timeBaseline = null;\n      },\n    ),\n    callbackThreshold,\n  );\n  const updatePosition = callbackWrapper(\n    throttle<MouseEvent | TouchEvent | DragEvent>(\n      callbackWrapper((evt) => {\n        const target = getEventTarget(evt);\n        // 'legacy' here as we could switch to https://developer.mozilla.org/en-US/docs/Web/API/Element/pointermove_event\n        const { clientX, clientY } = legacy_isTouchEvent(evt)\n          ? evt.changedTouches[0]\n          : evt;\n        if (!timeBaseline) {\n          timeBaseline = nowTimestamp();\n        }\n        positions.push({\n          x: clientX,\n          y: clientY,\n          id: mirror.getId(target as Node),\n          timeOffset: nowTimestamp() - timeBaseline,\n        });\n        // it is possible DragEvent is undefined even on devices\n        // that support event 'drag'\n        wrappedCb(\n          typeof DragEvent !== 'undefined' && evt instanceof DragEvent\n            ? IncrementalSource.Drag\n            : evt instanceof MouseEvent\n            ? IncrementalSource.MouseMove\n            : IncrementalSource.TouchMove,\n        );\n      }),\n      threshold,\n      {\n        trailing: false,\n      },\n    ),\n  );\n  const handlers = [\n    on('mousemove', updatePosition, doc),\n    on('touchmove', updatePosition, doc),\n    on('drag', updatePosition, doc),\n  ];\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\n\nfunction initMouseInteractionObserver({\n  mouseInteractionCb,\n  doc,\n  mirror,\n  blockClass,\n  blockSelector,\n  sampling,\n}: observerParam): listenerHandler {\n  if (sampling.mouseInteraction === false) {\n    return () => {\n      //\n    };\n  }\n  const disableMap: Record<string, boolean | undefined> =\n    sampling.mouseInteraction === true ||\n    sampling.mouseInteraction === undefined\n      ? {}\n      : sampling.mouseInteraction;\n\n  const handlers: listenerHandler[] = [];\n  let currentPointerType: PointerTypes | null = null;\n  const getHandler = (eventKey: keyof typeof MouseInteractions) => {\n    return (event: MouseEvent | TouchEvent | PointerEvent) => {\n      const target = getEventTarget(event) as Node;\n      if (isBlocked(target, blockClass, blockSelector, true)) {\n        return;\n      }\n      let pointerType: PointerTypes | null = null;\n      let thisEventKey = eventKey;\n      if ('pointerType' in event) {\n        switch (event.pointerType) {\n          case 'mouse':\n            pointerType = PointerTypes.Mouse;\n            break;\n          case 'touch':\n            pointerType = PointerTypes.Touch;\n            break;\n          case 'pen':\n            pointerType = PointerTypes.Pen;\n            break;\n        }\n        if (pointerType === PointerTypes.Touch) {\n          if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {\n            // we are actually listening on 'pointerdown'\n            thisEventKey = 'TouchStart';\n          } else if (\n            MouseInteractions[eventKey] === MouseInteractions.MouseUp\n          ) {\n            // we are actually listening on 'pointerup'\n            thisEventKey = 'TouchEnd';\n          }\n        } else if (pointerType === PointerTypes.Pen) {\n          // TODO: these will get incorrectly emitted as MouseDown/MouseUp\n        }\n      } else if (legacy_isTouchEvent(event)) {\n        pointerType = PointerTypes.Touch;\n      }\n      if (pointerType !== null) {\n        currentPointerType = pointerType;\n        if (\n          (thisEventKey.startsWith('Touch') &&\n            pointerType === PointerTypes.Touch) ||\n          (thisEventKey.startsWith('Mouse') &&\n            pointerType === PointerTypes.Mouse)\n        ) {\n          // don't output redundant info\n          pointerType = null;\n        }\n      } else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n        pointerType = currentPointerType;\n        currentPointerType = null; // cleanup as we've used it\n      }\n      const e = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n      if (!e) {\n        return;\n      }\n      const id = mirror.getId(target);\n      const { clientX, clientY } = e;\n      callbackWrapper(mouseInteractionCb)({\n        type: MouseInteractions[thisEventKey],\n        id,\n        x: clientX,\n        y: clientY,\n        ...(pointerType !== null && { pointerType }),\n      });\n    };\n  };\n  Object.keys(MouseInteractions)\n    .filter(\n      (key) =>\n        Number.isNaN(Number(key)) &&\n        !key.endsWith('_Departed') &&\n        disableMap[key] !== false,\n    )\n    .forEach((eventKey: keyof typeof MouseInteractions) => {\n      let eventName = toLowerCase(eventKey);\n      const handler = getHandler(eventKey);\n      if (window.PointerEvent) {\n        switch (MouseInteractions[eventKey]) {\n          case MouseInteractions.MouseDown:\n          case MouseInteractions.MouseUp:\n            eventName = eventName.replace(\n              'mouse',\n              'pointer',\n            ) as unknown as typeof eventName;\n            break;\n          case MouseInteractions.TouchStart:\n          case MouseInteractions.TouchEnd:\n            // these are handled by pointerdown/pointerup\n            return;\n        }\n      }\n      handlers.push(on(eventName, handler, doc));\n    });\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\n\nexport function initScrollObserver({\n  scrollCb,\n  doc,\n  mirror,\n  blockClass,\n  blockSelector,\n  sampling,\n}: Pick<\n  observerParam,\n  'scrollCb' | 'doc' | 'mirror' | 'blockClass' | 'blockSelector' | 'sampling'\n>): listenerHandler {\n  const updatePosition = callbackWrapper(\n    throttle<UIEvent>(\n      callbackWrapper((evt) => {\n        const target = getEventTarget(evt);\n        if (\n          !target ||\n          isBlocked(target as Node, blockClass, blockSelector, true)\n        ) {\n          return;\n        }\n        const id = mirror.getId(target as Node);\n        if (target === doc && doc.defaultView) {\n          const scrollLeftTop = getWindowScroll(doc.defaultView);\n          scrollCb({\n            id,\n            x: scrollLeftTop.left,\n            y: scrollLeftTop.top,\n          });\n        } else {\n          scrollCb({\n            id,\n            x: (target as HTMLElement).scrollLeft,\n            y: (target as HTMLElement).scrollTop,\n          });\n        }\n      }),\n      sampling.scroll || 100,\n    ),\n  );\n  return on('scroll', updatePosition, doc);\n}\n\nfunction initViewportResizeObserver(\n  { viewportResizeCb }: observerParam,\n  { win }: { win: IWindow },\n): listenerHandler {\n  let lastH = -1;\n  let lastW = -1;\n  const updateDimension = callbackWrapper(\n    throttle(\n      callbackWrapper(() => {\n        const height = getWindowHeight();\n        const width = getWindowWidth();\n        if (lastH !== height || lastW !== width) {\n          viewportResizeCb({\n            width: Number(width),\n            height: Number(height),\n          });\n          lastH = height;\n          lastW = width;\n        }\n      }),\n      200,\n    ),\n  );\n  return on('resize', updateDimension, win);\n}\n\nexport const INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];\nconst lastInputValueMap: WeakMap<EventTarget, inputValue> = new WeakMap();\nfunction initInputObserver({\n  inputCb,\n  doc,\n  mirror,\n  blockClass,\n  blockSelector,\n  ignoreClass,\n  ignoreSelector,\n  maskInputOptions,\n  maskInputFn,\n  sampling,\n  userTriggeredOnInput,\n}: observerParam): listenerHandler {\n  function eventHandler(event: Event) {\n    let target = getEventTarget(event) as HTMLElement | null;\n    const userTriggered = event.isTrusted;\n    const tagName = target && target.tagName;\n\n    /**\n     * If a site changes the value 'selected' of an option element, the value of its parent element, usually a select element, will be changed as well.\n     * We can treat this change as a value change of the select element the current target belongs to.\n     */\n    if (target && tagName === 'OPTION') {\n      target = dom.parentElement(target);\n    }\n    if (\n      !target ||\n      !tagName ||\n      INPUT_TAGS.indexOf(tagName) < 0 ||\n      isBlocked(target as Node, blockClass, blockSelector, true)\n    ) {\n      return;\n    }\n\n    if (\n      target.classList.contains(ignoreClass) ||\n      (ignoreSelector && target.matches(ignoreSelector))\n    ) {\n      return;\n    }\n    let text = (target as HTMLInputElement).value;\n    let isChecked = false;\n    const type: Lowercase<string> = getInputType(target) || '';\n\n    if (type === 'radio' || type === 'checkbox') {\n      isChecked = (target as HTMLInputElement).checked;\n    } else if (\n      maskInputOptions[tagName.toLowerCase() as keyof MaskInputOptions] ||\n      maskInputOptions[type as keyof MaskInputOptions]\n    ) {\n      text = maskInputValue({\n        element: target,\n        maskInputOptions,\n        tagName,\n        type,\n        value: text,\n        maskInputFn,\n      });\n    }\n    cbWithDedup(\n      target,\n      userTriggeredOnInput\n        ? { text, isChecked, userTriggered }\n        : { text, isChecked },\n    );\n    // if a radio was checked\n    // the other radios with the same name attribute will be unchecked.\n    const name: string | undefined = (target as HTMLInputElement).name;\n    if (type === 'radio' && name && isChecked) {\n      doc\n        .querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`)\n        .forEach((el) => {\n          if (el !== target) {\n            const text = (el as HTMLInputElement).value;\n            cbWithDedup(\n              el,\n              userTriggeredOnInput\n                ? { text, isChecked: !isChecked, userTriggered: false }\n                : { text, isChecked: !isChecked },\n            );\n          }\n        });\n    }\n  }\n  function cbWithDedup(target: EventTarget, v: inputValue) {\n    const lastInputValue = lastInputValueMap.get(target);\n    if (\n      !lastInputValue ||\n      lastInputValue.text !== v.text ||\n      lastInputValue.isChecked !== v.isChecked\n    ) {\n      lastInputValueMap.set(target, v);\n      const id = mirror.getId(target as Node);\n      callbackWrapper(inputCb)({\n        ...v,\n        id,\n      });\n    }\n  }\n  const events = sampling.input === 'last' ? ['change'] : ['input', 'change'];\n  const handlers: Array<listenerHandler | hookResetter> = events.map(\n    (eventName) => on(eventName, callbackWrapper(eventHandler), doc),\n  );\n  const currentWindow = doc.defaultView;\n  if (!currentWindow) {\n    return () => {\n      handlers.forEach((h) => h());\n    };\n  }\n  const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(\n    currentWindow.HTMLInputElement.prototype,\n    'value',\n  );\n  const hookProperties: Array<[HTMLElement, string]> = [\n    [currentWindow.HTMLInputElement.prototype, 'value'],\n    [currentWindow.HTMLInputElement.prototype, 'checked'],\n    [currentWindow.HTMLSelectElement.prototype, 'value'],\n    [currentWindow.HTMLTextAreaElement.prototype, 'value'],\n    // Some UI library use selectedIndex to set select value\n    [currentWindow.HTMLSelectElement.prototype, 'selectedIndex'],\n    [currentWindow.HTMLOptionElement.prototype, 'selected'],\n  ];\n  if (propertyDescriptor && propertyDescriptor.set) {\n    handlers.push(\n      ...hookProperties.map((p) =>\n        hookSetter<HTMLElement>(\n          p[0],\n          p[1],\n          {\n            set() {\n              // mock to a normal event\n              callbackWrapper(eventHandler)({\n                target: this as EventTarget,\n                isTrusted: false, // userTriggered to false as this could well be programmatic\n              } as Event);\n            },\n          },\n          false,\n          currentWindow,\n        ),\n      ),\n    );\n  }\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\n\ntype GroupingCSSRule =\n  | CSSGroupingRule\n  | CSSMediaRule\n  | CSSSupportsRule\n  | CSSConditionRule;\ntype GroupingCSSRuleTypes =\n  | typeof CSSGroupingRule\n  | typeof CSSMediaRule\n  | typeof CSSSupportsRule\n  | typeof CSSConditionRule;\n\nfunction getNestedCSSRulePositions(rule: CSSRule): number[] {\n  const positions: number[] = [];\n  function recurse(childRule: CSSRule, pos: number[]) {\n    if (\n      (hasNestedCSSRule('CSSGroupingRule') &&\n        childRule.parentRule instanceof CSSGroupingRule) ||\n      (hasNestedCSSRule('CSSMediaRule') &&\n        childRule.parentRule instanceof CSSMediaRule) ||\n      (hasNestedCSSRule('CSSSupportsRule') &&\n        childRule.parentRule instanceof CSSSupportsRule) ||\n      (hasNestedCSSRule('CSSConditionRule') &&\n        childRule.parentRule instanceof CSSConditionRule)\n    ) {\n      const rules = Array.from(\n        (childRule.parentRule as GroupingCSSRule).cssRules,\n      );\n      const index = rules.indexOf(childRule);\n      pos.unshift(index);\n      return recurse(childRule.parentRule, pos);\n    } else if (childRule.parentStyleSheet) {\n      const rules = Array.from(childRule.parentStyleSheet.cssRules);\n      const index = rules.indexOf(childRule);\n      pos.unshift(index);\n    }\n    return pos;\n  }\n  return recurse(rule, positions);\n}\n\n/**\n * For StyleSheets in Element, this function retrieves id of its host element.\n * For adopted StyleSheets, this function retrieves its styleId from a styleMirror.\n */\nfunction getIdAndStyleId(\n  sheet: CSSStyleSheet | undefined | null,\n  mirror: Mirror,\n  styleMirror: StyleSheetMirror,\n): {\n  styleId?: number;\n  id?: number;\n} {\n  let id, styleId;\n  if (!sheet) return {};\n  if (sheet.ownerNode) id = mirror.getId(sheet.ownerNode as Node);\n  else styleId = styleMirror.getId(sheet);\n  return {\n    styleId,\n    id,\n  };\n}\n\nfunction initStyleSheetObserver(\n  { styleSheetRuleCb, mirror, stylesheetManager }: observerParam,\n  { win }: { win: IWindow },\n): listenerHandler {\n  if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n    // If, for whatever reason, CSSStyleSheet is not available, we skip the observation of stylesheets.\n    return () => {\n      // Do nothing\n    };\n  }\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const insertRule = win.CSSStyleSheet.prototype.insertRule;\n  win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n    apply: callbackWrapper(\n      (\n        target: typeof insertRule,\n        thisArg: CSSStyleSheet,\n        argumentsList: [string, number | undefined],\n      ) => {\n        const [rule, index] = argumentsList;\n\n        const { id, styleId } = getIdAndStyleId(\n          thisArg,\n          mirror,\n          stylesheetManager.styleMirror,\n        );\n\n        if ((id && id !== -1) || (styleId && styleId !== -1)) {\n          styleSheetRuleCb({\n            id,\n            styleId,\n            adds: [{ rule, index }],\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      },\n    ),\n  });\n\n  // Support for deprecated addRule method\n  win.CSSStyleSheet.prototype.addRule = function (\n    this: CSSStyleSheet,\n    selector: string,\n    styleBlock: string,\n    index: number = this.cssRules.length,\n  ) {\n    const rule = `${selector} { ${styleBlock} }`;\n    return win.CSSStyleSheet.prototype.insertRule.apply(this, [rule, index]);\n  };\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n  win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n    apply: callbackWrapper(\n      (\n        target: typeof deleteRule,\n        thisArg: CSSStyleSheet,\n        argumentsList: [number],\n      ) => {\n        const [index] = argumentsList;\n\n        const { id, styleId } = getIdAndStyleId(\n          thisArg,\n          mirror,\n          stylesheetManager.styleMirror,\n        );\n\n        if ((id && id !== -1) || (styleId && styleId !== -1)) {\n          styleSheetRuleCb({\n            id,\n            styleId,\n            removes: [{ index }],\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      },\n    ),\n  });\n\n  // Support for deprecated removeRule method\n  win.CSSStyleSheet.prototype.removeRule = function (\n    this: CSSStyleSheet,\n    index: number,\n  ) {\n    return win.CSSStyleSheet.prototype.deleteRule.apply(this, [index]);\n  };\n\n  let replace: (text: string) => Promise<CSSStyleSheet>;\n\n  if (win.CSSStyleSheet.prototype.replace) {\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    replace = win.CSSStyleSheet.prototype.replace;\n    win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n      apply: callbackWrapper(\n        (\n          target: typeof replace,\n          thisArg: CSSStyleSheet,\n          argumentsList: [string],\n        ) => {\n          const [text] = argumentsList;\n\n          const { id, styleId } = getIdAndStyleId(\n            thisArg,\n            mirror,\n            stylesheetManager.styleMirror,\n          );\n\n          if ((id && id !== -1) || (styleId && styleId !== -1)) {\n            styleSheetRuleCb({\n              id,\n              styleId,\n              replace: text,\n            });\n          }\n          return target.apply(thisArg, argumentsList);\n        },\n      ),\n    });\n  }\n\n  let replaceSync: (text: string) => void;\n  if (win.CSSStyleSheet.prototype.replaceSync) {\n    // eslint-disable-next-line @typescript-eslint/unbound-method\n    replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n    win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n      apply: callbackWrapper(\n        (\n          target: typeof replaceSync,\n          thisArg: CSSStyleSheet,\n          argumentsList: [string],\n        ) => {\n          const [text] = argumentsList;\n\n          const { id, styleId } = getIdAndStyleId(\n            thisArg,\n            mirror,\n            stylesheetManager.styleMirror,\n          );\n\n          if ((id && id !== -1) || (styleId && styleId !== -1)) {\n            styleSheetRuleCb({\n              id,\n              styleId,\n              replaceSync: text,\n            });\n          }\n          return target.apply(thisArg, argumentsList);\n        },\n      ),\n    });\n  }\n\n  const supportedNestedCSSRuleTypes: {\n    [key: string]: GroupingCSSRuleTypes;\n  } = {};\n  if (canMonkeyPatchNestedCSSRule('CSSGroupingRule')) {\n    supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n  } else {\n    // Some browsers (Safari) don't support CSSGroupingRule\n    // https://caniuse.com/?search=cssgroupingrule\n    // fall back to monkey patching classes that would have inherited from CSSGroupingRule\n\n    if (canMonkeyPatchNestedCSSRule('CSSMediaRule')) {\n      supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n    }\n    if (canMonkeyPatchNestedCSSRule('CSSConditionRule')) {\n      supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n    }\n    if (canMonkeyPatchNestedCSSRule('CSSSupportsRule')) {\n      supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n    }\n  }\n\n  const unmodifiedFunctions: {\n    [key: string]: {\n      insertRule: (rule: string, index?: number) => number;\n      deleteRule: (index: number) => void;\n    };\n  } = {};\n\n  Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n    unmodifiedFunctions[typeKey] = {\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      insertRule: type.prototype.insertRule,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      deleteRule: type.prototype.deleteRule,\n    };\n\n    type.prototype.insertRule = new Proxy(\n      unmodifiedFunctions[typeKey].insertRule,\n      {\n        apply: callbackWrapper(\n          (\n            target: typeof insertRule,\n            thisArg: CSSRule,\n            argumentsList: [string, number | undefined],\n          ) => {\n            const [rule, index] = argumentsList;\n\n            const { id, styleId } = getIdAndStyleId(\n              thisArg.parentStyleSheet,\n              mirror,\n              stylesheetManager.styleMirror,\n            );\n\n            if ((id && id !== -1) || (styleId && styleId !== -1)) {\n              styleSheetRuleCb({\n                id,\n                styleId,\n                adds: [\n                  {\n                    rule,\n                    index: [\n                      ...getNestedCSSRulePositions(thisArg),\n                      index || 0, // defaults to 0\n                    ],\n                  },\n                ],\n              });\n            }\n            return target.apply(thisArg, argumentsList);\n          },\n        ),\n      },\n    );\n\n    type.prototype.deleteRule = new Proxy(\n      unmodifiedFunctions[typeKey].deleteRule,\n      {\n        apply: callbackWrapper(\n          (\n            target: typeof deleteRule,\n            thisArg: CSSRule,\n            argumentsList: [number],\n          ) => {\n            const [index] = argumentsList;\n\n            const { id, styleId } = getIdAndStyleId(\n              thisArg.parentStyleSheet,\n              mirror,\n              stylesheetManager.styleMirror,\n            );\n\n            if ((id && id !== -1) || (styleId && styleId !== -1)) {\n              styleSheetRuleCb({\n                id,\n                styleId,\n                removes: [\n                  { index: [...getNestedCSSRulePositions(thisArg), index] },\n                ],\n              });\n            }\n            return target.apply(thisArg, argumentsList);\n          },\n        ),\n      },\n    );\n  });\n\n  return callbackWrapper(() => {\n    win.CSSStyleSheet.prototype.insertRule = insertRule;\n    win.CSSStyleSheet.prototype.deleteRule = deleteRule;\n    replace && (win.CSSStyleSheet.prototype.replace = replace);\n    replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\n    Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n      type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n      type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n    });\n  });\n}\n\nexport function initAdoptedStyleSheetObserver(\n  {\n    mirror,\n    stylesheetManager,\n  }: Pick<observerParam, 'mirror' | 'stylesheetManager'>,\n  host: Document | ShadowRoot,\n): listenerHandler {\n  let hostId: number | null = null;\n  // host of adoptedStyleSheets is outermost document or IFrame's document\n  if (host.nodeName === '#document') hostId = mirror.getId(host);\n  // The host is a ShadowRoot.\n  else hostId = mirror.getId(dom.host(host as ShadowRoot));\n\n  const patchTarget =\n    host.nodeName === '#document'\n      ? (host as Document).defaultView?.Document\n      : host.ownerDocument?.defaultView?.ShadowRoot;\n  const originalPropertyDescriptor = patchTarget?.prototype\n    ? Object.getOwnPropertyDescriptor(\n        patchTarget?.prototype,\n        'adoptedStyleSheets',\n      )\n    : undefined;\n  if (\n    hostId === null ||\n    hostId === -1 ||\n    !patchTarget ||\n    !originalPropertyDescriptor\n  )\n    return () => {\n      //\n    };\n\n  // Patch adoptedStyleSheets by overriding the original one.\n  Object.defineProperty(host, 'adoptedStyleSheets', {\n    configurable: originalPropertyDescriptor.configurable,\n    enumerable: originalPropertyDescriptor.enumerable,\n    get(): CSSStyleSheet[] {\n      return originalPropertyDescriptor.get?.call(this) as CSSStyleSheet[];\n    },\n    set(sheets: CSSStyleSheet[]) {\n      const result = originalPropertyDescriptor.set?.call(this, sheets);\n      if (hostId !== null && hostId !== -1) {\n        try {\n          stylesheetManager.adoptStyleSheets(sheets, hostId);\n        } catch (e) {\n          // for safety\n        }\n      }\n      return result;\n    },\n  });\n\n  return callbackWrapper(() => {\n    Object.defineProperty(host, 'adoptedStyleSheets', {\n      configurable: originalPropertyDescriptor.configurable,\n      enumerable: originalPropertyDescriptor.enumerable,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      get: originalPropertyDescriptor.get,\n      // eslint-disable-next-line @typescript-eslint/unbound-method\n      set: originalPropertyDescriptor.set,\n    });\n  });\n}\n\nfunction initStyleDeclarationObserver(\n  {\n    styleDeclarationCb,\n    mirror,\n    ignoreCSSAttributes,\n    stylesheetManager,\n  }: observerParam,\n  { win }: { win: IWindow },\n): listenerHandler {\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n  win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n    apply: callbackWrapper(\n      (\n        target: typeof setProperty,\n        thisArg: CSSStyleDeclaration,\n        argumentsList: [string, string, string],\n      ) => {\n        const [property, value, priority] = argumentsList;\n\n        // ignore this mutation if we do not care about this css attribute\n        if (ignoreCSSAttributes.has(property)) {\n          return setProperty.apply(thisArg, [property, value, priority]);\n        }\n        const { id, styleId } = getIdAndStyleId(\n          thisArg.parentRule?.parentStyleSheet,\n          mirror,\n          stylesheetManager.styleMirror,\n        );\n        if ((id && id !== -1) || (styleId && styleId !== -1)) {\n          styleDeclarationCb({\n            id,\n            styleId,\n            set: {\n              property,\n              value,\n              priority,\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            index: getNestedCSSRulePositions(thisArg.parentRule!),\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      },\n    ),\n  });\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n  win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n    apply: callbackWrapper(\n      (\n        target: typeof removeProperty,\n        thisArg: CSSStyleDeclaration,\n        argumentsList: [string],\n      ) => {\n        const [property] = argumentsList;\n\n        // ignore this mutation if we do not care about this css attribute\n        if (ignoreCSSAttributes.has(property)) {\n          return removeProperty.apply(thisArg, [property]);\n        }\n        const { id, styleId } = getIdAndStyleId(\n          thisArg.parentRule?.parentStyleSheet,\n          mirror,\n          stylesheetManager.styleMirror,\n        );\n        if ((id && id !== -1) || (styleId && styleId !== -1)) {\n          styleDeclarationCb({\n            id,\n            styleId,\n            remove: {\n              property,\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            index: getNestedCSSRulePositions(thisArg.parentRule!),\n          });\n        }\n        return target.apply(thisArg, argumentsList);\n      },\n    ),\n  });\n\n  return callbackWrapper(() => {\n    win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n    win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n  });\n}\n\nfunction initMediaInteractionObserver({\n  mediaInteractionCb,\n  blockClass,\n  blockSelector,\n  mirror,\n  sampling,\n  doc,\n}: observerParam): listenerHandler {\n  const handler = callbackWrapper((type: MediaInteractions) =>\n    throttle(\n      callbackWrapper((event: Event) => {\n        const target = getEventTarget(event);\n        if (\n          !target ||\n          !(target instanceof HTMLMediaElement) ||\n          isBlocked(target as Node, blockClass, blockSelector, true)\n        ) {\n          return;\n        }\n        const { currentTime, volume, muted, playbackRate, loop } = target;\n        mediaInteractionCb({\n          type,\n          id: mirror.getId(target as Node),\n          currentTime,\n          volume,\n          muted,\n          playbackRate,\n          loop,\n        });\n      }),\n      sampling.media || 500,\n    ),\n  );\n  const handlers = [\n    on('play', handler(MediaInteractions.Play), doc),\n    on('pause', handler(MediaInteractions.Pause), doc),\n    on('seeked', handler(MediaInteractions.Seeked), doc),\n    on('volumechange', handler(MediaInteractions.VolumeChange), doc),\n    on('ratechange', handler(MediaInteractions.RateChange), doc),\n  ];\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\n\nfunction initFontObserver({ fontCb, doc }: observerParam): listenerHandler {\n  const win = doc.defaultView as IWindow;\n  if (!win) {\n    return () => {\n      //\n    };\n  }\n\n  const handlers: listenerHandler[] = [];\n\n  const fontMap = new WeakMap<FontFace, fontParam>();\n\n  const originalFontFace = win.FontFace;\n  win.FontFace = function FontFace(\n    family: string,\n    source: string | ArrayBufferLike,\n    descriptors?: FontFaceDescriptors,\n  ) {\n    const fontFace = new originalFontFace(family, source, descriptors);\n    fontMap.set(fontFace, {\n      family,\n      buffer: typeof source !== 'string',\n      descriptors,\n      fontSource:\n        typeof source === 'string'\n          ? source\n          : JSON.stringify(Array.from(new Uint8Array(source))),\n    });\n    return fontFace;\n  } as unknown as typeof FontFace;\n\n  const restoreHandler = patch(\n    doc.fonts,\n    'add',\n    function (original: (font: FontFace) => void) {\n      return function (this: FontFaceSet, fontFace: FontFace) {\n        setTimeout(\n          callbackWrapper(() => {\n            const p = fontMap.get(fontFace);\n            if (p) {\n              fontCb(p);\n              fontMap.delete(fontFace);\n            }\n          }),\n          0,\n        );\n        return original.apply(this, [fontFace]);\n      };\n    },\n  );\n\n  handlers.push(() => {\n    win.FontFace = originalFontFace;\n  });\n  handlers.push(restoreHandler);\n\n  return callbackWrapper(() => {\n    handlers.forEach((h) => h());\n  });\n}\n\nfunction initSelectionObserver(param: observerParam): listenerHandler {\n  const { doc, mirror, blockClass, blockSelector, selectionCb } = param;\n  let collapsed = true;\n\n  const updateSelection = callbackWrapper(() => {\n    const selection = doc.getSelection();\n\n    if (!selection || (collapsed && selection?.isCollapsed)) return;\n\n    collapsed = selection.isCollapsed || false;\n\n    const ranges: SelectionRange[] = [];\n    const count = selection.rangeCount || 0;\n\n    for (let i = 0; i < count; i++) {\n      const range = selection.getRangeAt(i);\n\n      const { startContainer, startOffset, endContainer, endOffset } = range;\n\n      const blocked =\n        isBlocked(startContainer, blockClass, blockSelector, true) ||\n        isBlocked(endContainer, blockClass, blockSelector, true);\n\n      if (blocked) continue;\n\n      ranges.push({\n        start: mirror.getId(startContainer),\n        startOffset,\n        end: mirror.getId(endContainer),\n        endOffset,\n      });\n    }\n\n    selectionCb({ ranges });\n  });\n\n  updateSelection();\n\n  return on('selectionchange', updateSelection);\n}\n\nfunction initCustomElementObserver({\n  doc,\n  customElementCb,\n}: observerParam): listenerHandler {\n  const win = doc.defaultView as IWindow;\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  if (!win || !win.customElements) return () => {};\n  const restoreHandler = patch(\n    win.customElements,\n    'define',\n    function (\n      original: (\n        name: string,\n        constructor: CustomElementConstructor,\n        options?: ElementDefinitionOptions,\n      ) => void,\n    ) {\n      return function (\n        name: string,\n        constructor: CustomElementConstructor,\n        options?: ElementDefinitionOptions,\n      ) {\n        try {\n          customElementCb({\n            define: {\n              name,\n            },\n          });\n        } catch (e) {\n          console.warn(`Custom element callback failed for ${name}`);\n        }\n        return original.apply(this, [name, constructor, options]);\n      };\n    },\n  );\n  return restoreHandler;\n}\n\nfunction mergeHooks(o: observerParam, hooks: hooksParam) {\n  const {\n    mutationCb,\n    mousemoveCb,\n    mouseInteractionCb,\n    scrollCb,\n    viewportResizeCb,\n    inputCb,\n    mediaInteractionCb,\n    styleSheetRuleCb,\n    styleDeclarationCb,\n    canvasMutationCb,\n    fontCb,\n    selectionCb,\n    customElementCb,\n  } = o;\n  o.mutationCb = (...p: Arguments<mutationCallBack>) => {\n    if (hooks.mutation) {\n      hooks.mutation(...p);\n    }\n    mutationCb(...p);\n  };\n  o.mousemoveCb = (...p: Arguments<mousemoveCallBack>) => {\n    if (hooks.mousemove) {\n      hooks.mousemove(...p);\n    }\n    mousemoveCb(...p);\n  };\n  o.mouseInteractionCb = (...p: Arguments<mouseInteractionCallBack>) => {\n    if (hooks.mouseInteraction) {\n      hooks.mouseInteraction(...p);\n    }\n    mouseInteractionCb(...p);\n  };\n  o.scrollCb = (...p: Arguments<scrollCallback>) => {\n    if (hooks.scroll) {\n      hooks.scroll(...p);\n    }\n    scrollCb(...p);\n  };\n  o.viewportResizeCb = (...p: Arguments<viewportResizeCallback>) => {\n    if (hooks.viewportResize) {\n      hooks.viewportResize(...p);\n    }\n    viewportResizeCb(...p);\n  };\n  o.inputCb = (...p: Arguments<inputCallback>) => {\n    if (hooks.input) {\n      hooks.input(...p);\n    }\n    inputCb(...p);\n  };\n  o.mediaInteractionCb = (...p: Arguments<mediaInteractionCallback>) => {\n    if (hooks.mediaInteaction) {\n      hooks.mediaInteaction(...p);\n    }\n    mediaInteractionCb(...p);\n  };\n  o.styleSheetRuleCb = (...p: Arguments<styleSheetRuleCallback>) => {\n    if (hooks.styleSheetRule) {\n      hooks.styleSheetRule(...p);\n    }\n    styleSheetRuleCb(...p);\n  };\n  o.styleDeclarationCb = (...p: Arguments<styleDeclarationCallback>) => {\n    if (hooks.styleDeclaration) {\n      hooks.styleDeclaration(...p);\n    }\n    styleDeclarationCb(...p);\n  };\n  o.canvasMutationCb = (...p: Arguments<canvasMutationCallback>) => {\n    if (hooks.canvasMutation) {\n      hooks.canvasMutation(...p);\n    }\n    canvasMutationCb(...p);\n  };\n  o.fontCb = (...p: Arguments<fontCallback>) => {\n    if (hooks.font) {\n      hooks.font(...p);\n    }\n    fontCb(...p);\n  };\n  o.selectionCb = (...p: Arguments<selectionCallback>) => {\n    if (hooks.selection) {\n      hooks.selection(...p);\n    }\n    selectionCb(...p);\n  };\n  o.customElementCb = (...c: Arguments<customElementCallback>) => {\n    if (hooks.customElement) {\n      hooks.customElement(...c);\n    }\n    customElementCb(...c);\n  };\n}\n\nexport function initObservers(\n  o: observerParam,\n  hooks: hooksParam = {},\n): listenerHandler {\n  const currentWindow = o.doc.defaultView; // basically document.window\n  if (!currentWindow) {\n    return () => {\n      //\n    };\n  }\n\n  mergeHooks(o, hooks);\n  let stopMutationObserver: listenerHandler | undefined;\n  if (o.recordDOM) {\n    stopMutationObserver = initMutationObserver(o, o.doc);\n  }\n  const mousemoveHandler = initMoveObserver(o);\n  const mouseInteractionHandler = initMouseInteractionObserver(o);\n  const scrollHandler = initScrollObserver(o);\n  const viewportResizeHandler = initViewportResizeObserver(o, {\n    win: currentWindow,\n  });\n  const inputHandler = initInputObserver(o);\n  const mediaInteractionHandler = initMediaInteractionObserver(o);\n\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  let styleSheetObserver = () => {};\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  let adoptedStyleSheetObserver = () => {};\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  let styleDeclarationObserver = () => {};\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  let fontObserver = () => {};\n  if (o.recordDOM) {\n    styleSheetObserver = initStyleSheetObserver(o, { win: currentWindow });\n    adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o, o.doc);\n    styleDeclarationObserver = initStyleDeclarationObserver(o, {\n      win: currentWindow,\n    });\n    if (o.collectFonts) {\n      fontObserver = initFontObserver(o);\n    }\n  }\n  const selectionObserver = initSelectionObserver(o);\n  const customElementObserver = initCustomElementObserver(o);\n\n  // plugins\n  const pluginHandlers: listenerHandler[] = [];\n  for (const plugin of o.plugins) {\n    pluginHandlers.push(\n      plugin.observer(plugin.callback, currentWindow, plugin.options),\n    );\n  }\n\n  return callbackWrapper(() => {\n    stopMutationObserver?.();\n    mousemoveHandler();\n    mouseInteractionHandler();\n    scrollHandler();\n    viewportResizeHandler();\n    inputHandler();\n    mediaInteractionHandler();\n    styleSheetObserver();\n    adoptedStyleSheetObserver();\n    styleDeclarationObserver();\n    fontObserver();\n    selectionObserver();\n    customElementObserver();\n    pluginHandlers.forEach((h) => h());\n  });\n}\n\ntype CSSGroupingProp =\n  | 'CSSGroupingRule'\n  | 'CSSMediaRule'\n  | 'CSSSupportsRule'\n  | 'CSSConditionRule';\n\nfunction hasNestedCSSRule(prop: CSSGroupingProp): boolean {\n  return typeof window[prop] !== 'undefined';\n}\n\nfunction canMonkeyPatchNestedCSSRule(prop: CSSGroupingProp): boolean {\n  return Boolean(\n    typeof window[prop] !== 'undefined' &&\n      // Note: Generally, this check _shouldn't_ be necessary\n      // However, in some scenarios (e.g. jsdom) this can sometimes fail, so we check for it here\n      window[prop].prototype &&\n      'insertRule' in window[prop].prototype &&\n      'deleteRule' in window[prop].prototype,\n  );\n}\n", "import type { ICrossOriginIframeMirror } from '@rrweb/types';\nexport default class CrossOriginIframeMirror\n  implements ICrossOriginIframeMirror\n{\n  private iframeIdToRemoteIdMap: WeakMap<\n    HTMLIFrameElement,\n    Map<number, number>\n  > = new WeakMap();\n  private iframeRemoteIdToIdMap: WeakMap<\n    HTMLIFrameElement,\n    Map<number, number>\n  > = new WeakMap();\n\n  constructor(private generateIdFn: () => number) {}\n\n  getId(\n    iframe: HTMLIFrameElement,\n    remoteId: number,\n    idToRemoteMap?: Map<number, number>,\n    remoteToIdMap?: Map<number, number>,\n  ): number {\n    const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n    const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n\n    let id = idToRemoteIdMap.get(remoteId);\n    if (!id) {\n      id = this.generateIdFn();\n      idToRemoteIdMap.set(remoteId, id);\n      remoteIdToIdMap.set(id, remoteId);\n    }\n    return id;\n  }\n\n  getIds(iframe: HTMLIFrameElement, remoteId: number[]): number[] {\n    const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n    const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n    return remoteId.map((id) =>\n      this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap),\n    );\n  }\n\n  getRemoteId(\n    iframe: HTMLIFrameElement,\n    id: number,\n    map?: Map<number, number>,\n  ): number {\n    const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n\n    if (typeof id !== 'number') return id;\n\n    const remoteId = remoteIdToIdMap.get(id);\n    if (!remoteId) return -1;\n    return remoteId;\n  }\n\n  getRemoteIds(iframe: HTMLIFrameElement, ids: number[]): number[] {\n    const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n\n    return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\n  }\n\n  reset(iframe?: HTMLIFrameElement) {\n    if (!iframe) {\n      this.iframeIdToRemoteIdMap = new WeakMap();\n      this.iframeRemoteIdToIdMap = new WeakMap();\n      return;\n    }\n    this.iframeIdToRemoteIdMap.delete(iframe);\n    this.iframeRemoteIdToIdMap.delete(iframe);\n  }\n\n  private getIdToRemoteIdMap(iframe: HTMLIFrameElement) {\n    let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n    if (!idToRemoteIdMap) {\n      idToRemoteIdMap = new Map();\n      this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n    }\n    return idToRemoteIdMap;\n  }\n\n  private getRemoteIdToIdMap(iframe: HTMLIFrameElement) {\n    let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n    if (!remoteIdToIdMap) {\n      remoteIdToIdMap = new Map();\n      this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n    }\n    return remoteIdToIdMap;\n  }\n}\n", "import type { Mirror } from 'rrweb-snapshot';\nimport { genId } from 'rrweb-snapshot';\nimport type { CrossOriginIframeMessageEvent } from '../types';\nimport CrossOriginIframeMirror from './cross-origin-iframe-mirror';\nimport { EventType, NodeType, IncrementalSource } from '@rrweb/types';\nimport type {\n  eventWithTime,\n  eventWithoutTime,\n  serializedNodeWithId,\n  mutationCallBack,\n  listenerHandler,\n  IWindow,\n} from '@rrweb/types';\nimport type { StylesheetManager } from './stylesheet-manager';\nimport { on } from '../utils';\n\nexport class IframeManager {\n  private iframes: WeakMap<HTMLIFrameElement, true> = new WeakMap();\n  private crossOriginIframeMap: WeakMap<MessageEventSource, HTMLIFrameElement> =\n    new WeakMap();\n  public crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n  public crossOriginIframeStyleMirror: CrossOriginIframeMirror;\n  public crossOriginIframeRootIdMap: WeakMap<HTMLIFrameElement, number> =\n    new WeakMap();\n  private mirror: Mirror;\n  private mutationCb: mutationCallBack;\n  private wrappedEmit: (e: eventWithoutTime, isCheckout?: boolean) => void;\n  private loadListener?: (iframeEl: HTMLIFrameElement) => unknown;\n  private unloadListener?: (doc: Document) => unknown;\n  // Windows of attached same-origin iframes, with the handler that stops listening to them.\n  private attachedWindows: Map<Window, listenerHandler> = new Map();\n  // One handler for all windows, so that attaching an iframe again (e.g. on every full snapshot) doesn't add another.\n  private messageHandler = (message: Event) =>\n    this.handleMessage(message as MessageEvent);\n  private stylesheetManager: StylesheetManager;\n  private recordCrossOriginIframes: boolean;\n\n  constructor(options: {\n    mirror: Mirror;\n    mutationCb: mutationCallBack;\n    stylesheetManager: StylesheetManager;\n    recordCrossOriginIframes: boolean;\n    wrappedEmit: (e: eventWithoutTime, isCheckout?: boolean) => void;\n  }) {\n    this.mutationCb = options.mutationCb;\n    this.wrappedEmit = options.wrappedEmit;\n    this.stylesheetManager = options.stylesheetManager;\n    this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n    this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(\n      this.stylesheetManager.styleMirror.generateId.bind(\n        this.stylesheetManager.styleMirror,\n      ),\n    );\n    this.mirror = options.mirror;\n    if (this.recordCrossOriginIframes) {\n      window.addEventListener('message', this.messageHandler);\n    }\n  }\n\n  public addIframe(iframeEl: HTMLIFrameElement) {\n    this.iframes.set(iframeEl, true);\n    if (iframeEl.contentWindow)\n      this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl);\n  }\n\n  public addLoadListener(cb: (iframeEl: HTMLIFrameElement) => unknown) {\n    this.loadListener = cb;\n  }\n\n  public addUnloadListener(cb: (doc: Document) => unknown) {\n    this.unloadListener = cb;\n  }\n\n  public attachIframe(\n    iframeEl: HTMLIFrameElement,\n    childSn: serializedNodeWithId,\n  ) {\n    this.mutationCb({\n      adds: [\n        {\n          parentId: this.mirror.getId(iframeEl),\n          nextId: null,\n          node: childSn,\n        },\n      ],\n      removes: [],\n      texts: [],\n      attributes: [],\n      isAttachIframe: true,\n    });\n\n    this.watchIframeWindow(iframeEl);\n\n    this.loadListener?.(iframeEl);\n\n    if (\n      iframeEl.contentDocument &&\n      iframeEl.contentDocument.adoptedStyleSheets &&\n      iframeEl.contentDocument.adoptedStyleSheets.length > 0\n    )\n      this.stylesheetManager.adoptStyleSheets(\n        iframeEl.contentDocument.adoptedStyleSheets,\n        this.mirror.getId(iframeEl.contentDocument),\n      );\n  }\n\n  public destroy() {\n    window.removeEventListener('message', this.messageHandler);\n    this.attachedWindows.forEach((stop) => stop());\n  }\n\n  private watchIframeWindow(iframeEl: HTMLIFrameElement) {\n    const win = iframeEl.contentWindow as IWindow | null;\n    if (!win || this.attachedWindows.has(win)) return;\n    const handlers: listenerHandler[] = [];\n    const stop = () => {\n      this.attachedWindows.delete(win);\n      handlers.forEach((handler) => {\n        try {\n          handler();\n        } catch {\n          // the iframe may have navigated to a cross-origin page by now\n        }\n      });\n    };\n    this.attachedWindows.set(win, stop);\n\n    // Receive messages (events) coming from cross-origin iframes that are nested in this same-origin iframe.\n    if (this.recordCrossOriginIframes) {\n      handlers.push(on('message', this.messageHandler, win));\n    }\n    handlers.push(\n      on(\n        'pagehide',\n        (event) => {\n          // A persisted page is kept in the back/forward cache and may be shown again.\n          if ((event as PageTransitionEvent).persisted) return;\n          const doc = win.document;\n          stop();\n          this.unloadListener?.(doc);\n        },\n        win,\n      ),\n    );\n  }\n\n  private handleMessage(message: MessageEvent | CrossOriginIframeMessageEvent) {\n    const crossOriginMessageEvent = message as CrossOriginIframeMessageEvent;\n    if (\n      crossOriginMessageEvent.data.type !== 'rrweb' ||\n      // To filter out the rrweb messages which are forwarded by some sites.\n      crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin\n    )\n      return;\n\n    const iframeSourceWindow = message.source;\n    if (!iframeSourceWindow) return;\n\n    const iframeEl = this.crossOriginIframeMap.get(message.source);\n    if (!iframeEl) return;\n\n    const transformedEvent = this.transformCrossOriginEvent(\n      iframeEl,\n      crossOriginMessageEvent.data.event,\n    );\n\n    if (transformedEvent)\n      this.wrappedEmit(\n        transformedEvent,\n        crossOriginMessageEvent.data.isCheckout,\n      );\n  }\n\n  private transformCrossOriginEvent(\n    iframeEl: HTMLIFrameElement,\n    e: eventWithTime,\n  ): eventWithTime | false {\n    switch (e.type) {\n      case EventType.FullSnapshot: {\n        this.crossOriginIframeMirror.reset(iframeEl);\n        this.crossOriginIframeStyleMirror.reset(iframeEl);\n        /**\n         * Replaces the original id of the iframe with a new set of unique ids\n         */\n        this.replaceIdOnNode(e.data.node, iframeEl);\n        const rootId = e.data.node.id;\n        this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n        this.patchRootIdOnNode(e.data.node, rootId);\n        return {\n          timestamp: e.timestamp,\n          type: EventType.IncrementalSnapshot,\n          data: {\n            source: IncrementalSource.Mutation,\n            adds: [\n              {\n                parentId: this.mirror.getId(iframeEl),\n                nextId: null,\n                node: e.data.node,\n              },\n            ],\n            removes: [],\n            texts: [],\n            attributes: [],\n            isAttachIframe: true,\n          },\n        };\n      }\n      case EventType.Meta:\n      case EventType.Load:\n      case EventType.DomContentLoaded: {\n        return false;\n      }\n      case EventType.Annotation:\n      case EventType.Plugin: {\n        return e;\n      }\n      case EventType.Custom: {\n        this.replaceIds(\n          e.data.payload as {\n            id?: unknown;\n            parentId?: unknown;\n            previousId?: unknown;\n            nextId?: unknown;\n          },\n          iframeEl,\n          ['id', 'parentId', 'previousId', 'nextId'],\n        );\n        return e;\n      }\n      case EventType.IncrementalSnapshot: {\n        switch (e.data.source) {\n          case IncrementalSource.Mutation: {\n            e.data.adds.forEach((n) => {\n              this.replaceIds(n, iframeEl, [\n                'parentId',\n                'nextId',\n                'previousId',\n              ]);\n              this.replaceIdOnNode(n.node, iframeEl);\n              const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n              rootId && this.patchRootIdOnNode(n.node, rootId);\n            });\n            e.data.removes.forEach((n) => {\n              this.replaceIds(n, iframeEl, ['parentId', 'id']);\n            });\n            e.data.attributes.forEach((n) => {\n              this.replaceIds(n, iframeEl, ['id']);\n            });\n            e.data.texts.forEach((n) => {\n              this.replaceIds(n, iframeEl, ['id']);\n            });\n            return e;\n          }\n          case IncrementalSource.Drag:\n          case IncrementalSource.TouchMove:\n          case IncrementalSource.MouseMove: {\n            e.data.positions.forEach((p) => {\n              this.replaceIds(p, iframeEl, ['id']);\n            });\n            return e;\n          }\n          case IncrementalSource.ViewportResize: {\n            // can safely ignore these events\n            return false;\n          }\n          case IncrementalSource.MediaInteraction:\n          case IncrementalSource.MouseInteraction:\n          case IncrementalSource.Scroll:\n          case IncrementalSource.CanvasMutation:\n          case IncrementalSource.Input: {\n            this.replaceIds(e.data, iframeEl, ['id']);\n            return e;\n          }\n          case IncrementalSource.StyleSheetRule:\n          case IncrementalSource.StyleDeclaration: {\n            this.replaceIds(e.data, iframeEl, ['id']);\n            this.replaceStyleIds(e.data, iframeEl, ['styleId']);\n            return e;\n          }\n          case IncrementalSource.Font: {\n            // fine as-is no modification needed\n            return e;\n          }\n          case IncrementalSource.Selection: {\n            e.data.ranges.forEach((range) => {\n              this.replaceIds(range, iframeEl, ['start', 'end']);\n            });\n            return e;\n          }\n          case IncrementalSource.AdoptedStyleSheet: {\n            this.replaceIds(e.data, iframeEl, ['id']);\n            this.replaceStyleIds(e.data, iframeEl, ['styleIds']);\n            e.data.styles?.forEach((style) => {\n              this.replaceStyleIds(style, iframeEl, ['styleId']);\n            });\n            return e;\n          }\n        }\n      }\n    }\n    return false;\n  }\n\n  private replace<T extends Record<string, unknown>>(\n    iframeMirror: CrossOriginIframeMirror,\n    obj: T,\n    iframeEl: HTMLIFrameElement,\n    keys: Array<keyof T>,\n  ): T {\n    for (const key of keys) {\n      if (!Array.isArray(obj[key]) && typeof obj[key] !== 'number') continue;\n      if (Array.isArray(obj[key])) {\n        obj[key] = iframeMirror.getIds(\n          iframeEl,\n          obj[key] as number[],\n        ) as T[keyof T];\n      } else {\n        (obj[key] as number) = iframeMirror.getId(iframeEl, obj[key] as number);\n      }\n    }\n\n    return obj;\n  }\n\n  private replaceIds<T extends Record<string, unknown>>(\n    obj: T,\n    iframeEl: HTMLIFrameElement,\n    keys: Array<keyof T>,\n  ): T {\n    return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n  }\n\n  private replaceStyleIds<T extends Record<string, unknown>>(\n    obj: T,\n    iframeEl: HTMLIFrameElement,\n    keys: Array<keyof T>,\n  ): T {\n    return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n  }\n\n  private replaceIdOnNode(\n    node: serializedNodeWithId,\n    iframeEl: HTMLIFrameElement,\n  ) {\n    this.replaceIds(node, iframeEl, ['id', 'rootId']);\n    if ('childNodes' in node) {\n      node.childNodes.forEach((child) => {\n        this.replaceIdOnNode(child, iframeEl);\n      });\n    }\n  }\n\n  private patchRootIdOnNode(node: serializedNodeWithId, rootId: number) {\n    if (node.type !== NodeType.Document && !node.rootId) node.rootId = rootId;\n    if ('childNodes' in node) {\n      node.childNodes.forEach((child) => {\n        this.patchRootIdOnNode(child, rootId);\n      });\n    }\n  }\n}\n", "import type { MutationBufferParam } from '../types';\nimport type {\n  listenerHandler,\n  mutationCallBack,\n  scrollCallback,\n  SamplingStrategy,\n} from '@rrweb/types';\nimport {\n  initMutationObserver,\n  initScrollObserver,\n  initAdoptedStyleSheetObserver,\n} from './observer';\nimport { inDom } from '../utils';\nimport type { Mirror } from 'rrweb-snapshot';\nimport { isNativeShadowDom } from 'rrweb-snapshot';\nimport dom, { patch } from '@rrweb/utils';\n\ntype BypassOptions = Omit<\n  MutationBufferParam,\n  'doc' | 'mutationCb' | 'mirror' | 'shadowDomManager'\n> & {\n  sampling: SamplingStrategy;\n};\n\nexport class ShadowDomManager {\n  /** Observed shadow roots and the handlers that stop observing them. */\n  private shadowDoms = new Map<ShadowRoot, listenerHandler[]>();\n  private mutationCb: mutationCallBack;\n  private scrollCb: scrollCallback;\n  private bypassOptions: BypassOptions;\n  private mirror: Mirror;\n  private restoreHandlers: (() => void)[] = [];\n\n  constructor(options: {\n    mutationCb: mutationCallBack;\n    scrollCb: scrollCallback;\n    bypassOptions: BypassOptions;\n    mirror: Mirror;\n  }) {\n    this.mutationCb = options.mutationCb;\n    this.scrollCb = options.scrollCb;\n    this.bypassOptions = options.bypassOptions;\n    this.mirror = options.mirror;\n\n    this.init();\n  }\n\n  public init() {\n    this.reset();\n    // Patch 'attachShadow' to observe newly added shadow doms.\n    this.patchAttachShadow(Element, document);\n  }\n\n  public addShadowRoot(shadowRoot: ShadowRoot, doc: Document) {\n    if (!isNativeShadowDom(shadowRoot)) return;\n    if (this.shadowDoms.has(shadowRoot)) return;\n    const handlers: listenerHandler[] = [];\n    this.shadowDoms.set(shadowRoot, handlers);\n    const stopMutationObserver = initMutationObserver(\n      {\n        ...this.bypassOptions,\n        doc,\n        mutationCb: this.mutationCb,\n        mirror: this.mirror,\n        shadowDomManager: this,\n      },\n      shadowRoot,\n    );\n    handlers.push(stopMutationObserver);\n    handlers.push(\n      initScrollObserver({\n        ...this.bypassOptions,\n        scrollCb: this.scrollCb,\n        // https://gist.github.com/praveenpuglia/0832da687ed5a5d7a0907046c9ef1813\n        // scroll is not allowed to pass the boundary, so we need to listen the shadow document\n        doc: shadowRoot as unknown as Document,\n        mirror: this.mirror,\n      }),\n    );\n    // Defer this to avoid adoptedStyleSheet events being created before the full snapshot is created or attachShadow action is recorded.\n    setTimeout(() => {\n      // The shadow root was released, or the manager reset, in the meantime.\n      if (this.shadowDoms.get(shadowRoot) !== handlers) return;\n      if (\n        shadowRoot.adoptedStyleSheets &&\n        shadowRoot.adoptedStyleSheets.length > 0\n      )\n        this.bypassOptions.stylesheetManager.adoptStyleSheets(\n          shadowRoot.adoptedStyleSheets,\n          this.mirror.getId(dom.host(shadowRoot)),\n        );\n      handlers.push(\n        initAdoptedStyleSheetObserver(\n          {\n            mirror: this.mirror,\n            stylesheetManager: this.bypassOptions.stylesheetManager,\n          },\n          shadowRoot,\n        ),\n      );\n    }, 0);\n  }\n\n  public removeShadowRootsIn(n: Node) {\n    if (this.shadowDoms.size === 0) return;\n    const shadowRoot = dom.shadowRoot(n);\n    if (shadowRoot) {\n      if (this.shadowDoms.has(shadowRoot)) {\n        this.removeShadowRoot(shadowRoot);\n      }\n      this.removeShadowRootsIn(shadowRoot);\n    }\n    dom.childNodes(n).forEach((child) => this.removeShadowRootsIn(child));\n  }\n\n  private removeShadowRoot(shadowRoot: ShadowRoot) {\n    const handlers = this.shadowDoms.get(shadowRoot);\n    this.shadowDoms.delete(shadowRoot);\n    handlers?.forEach(runHandler);\n  }\n\n  /**\n   * Monkey patch 'attachShadow' of an IFrameElement to observe newly added shadow doms.\n   */\n  public observeAttachShadow(iframeElement: HTMLIFrameElement) {\n    if (!iframeElement.contentWindow || !iframeElement.contentDocument) return;\n\n    this.patchAttachShadow(\n      (\n        iframeElement.contentWindow as Window & {\n          Element: { prototype: Element };\n        }\n      ).Element,\n      iframeElement.contentDocument,\n    );\n  }\n\n  /**\n   * Patch 'attachShadow' to observe newly added shadow doms.\n   */\n  private patchAttachShadow(\n    element: {\n      prototype: Element;\n    },\n    doc: Document,\n  ) {\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const manager = this;\n    this.restoreHandlers.push(\n      patch(\n        element.prototype,\n        'attachShadow',\n        function (original: (init: ShadowRootInit) => ShadowRoot) {\n          return function (this: Element, option: ShadowRootInit) {\n            const sRoot = original.call(this, option);\n            // For the shadow dom elements in the document, monitor their dom mutations.\n            // For shadow dom elements that aren't in the document yet,\n            // we start monitoring them once their shadow dom host is appended to the document.\n            const shadowRootEl = dom.shadowRoot(this);\n            if (shadowRootEl && inDom(this))\n              manager.addShadowRoot(shadowRootEl, doc);\n            return sRoot;\n          };\n        },\n      ),\n    );\n  }\n\n  public reset() {\n    this.restoreHandlers.forEach(runHandler);\n    this.restoreHandlers = [];\n    const shadowDoms = this.shadowDoms;\n    this.shadowDoms = new Map();\n    shadowDoms.forEach((handlers) => handlers.forEach(runHandler));\n  }\n}\n\nfunction runHandler(handler: listenerHandler) {\n  try {\n    handler();\n  } catch (e) {\n    //\n  }\n}\n", "/*\n * base64-arraybuffer 1.0.2 <https://github.com/niklasvh/base64-arraybuffer>\n * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>\n * Released under MIT License\n */\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n    lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function (arraybuffer) {\n    var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n    for (i = 0; i < len; i += 3) {\n        base64 += chars[bytes[i] >> 2];\n        base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n        base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n        base64 += chars[bytes[i + 2] & 63];\n    }\n    if (len % 3 === 2) {\n        base64 = base64.substring(0, base64.length - 1) + '=';\n    }\n    else if (len % 3 === 1) {\n        base64 = base64.substring(0, base64.length - 2) + '==';\n    }\n    return base64;\n};\nvar decode = function (base64) {\n    var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n    if (base64[base64.length - 1] === '=') {\n        bufferLength--;\n        if (base64[base64.length - 2] === '=') {\n            bufferLength--;\n        }\n    }\n    var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n    for (i = 0; i < len; i += 4) {\n        encoded1 = lookup[base64.charCodeAt(i)];\n        encoded2 = lookup[base64.charCodeAt(i + 1)];\n        encoded3 = lookup[base64.charCodeAt(i + 2)];\n        encoded4 = lookup[base64.charCodeAt(i + 3)];\n        bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n        bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n        bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n    }\n    return arraybuffer;\n};\n\nexport { decode, encode };\n//# sourceMappingURL=base64-arraybuffer.es5.js.map\n", "import { encode } from 'base64-arraybuffer';\nimport type { IWindow, CanvasArg } from '@rrweb/types';\n\n// TODO: unify with `replay/webgl.ts`\ntype CanvasVarMap = Map<string, unknown[]>;\nconst canvasVarMap: Map<RenderingContext, CanvasVarMap> = new Map();\nexport function variableListFor(ctx: RenderingContext, ctor: string) {\n  let contextMap = canvasVarMap.get(ctx);\n  if (!contextMap) {\n    contextMap = new Map();\n    canvasVarMap.set(ctx, contextMap);\n  }\n  if (!contextMap.has(ctor)) {\n    contextMap.set(ctor, []);\n  }\n  return contextMap.get(ctor) as unknown[];\n}\n\nexport const saveWebGLVar = (\n  value: unknown,\n  win: IWindow,\n  ctx: RenderingContext,\n): number | void => {\n  if (\n    !value ||\n    !(isInstanceOfWebGLObject(value, win) || typeof value === 'object')\n  )\n    return;\n\n  const name = value.constructor.name;\n  const list = variableListFor(ctx, name);\n  let index = list.indexOf(value);\n\n  if (index === -1) {\n    index = list.length;\n    list.push(value);\n  }\n  return index;\n};\n\n// from webgl-recorder: https://github.com/evanw/webgl-recorder/blob/bef0e65596e981ee382126587e2dcbe0fc7748e2/webgl-recorder.js#L50-L77\nexport function serializeArg(\n  value: unknown,\n  win: IWindow,\n  ctx: RenderingContext,\n): CanvasArg {\n  if (value instanceof Array) {\n    return value.map((arg) => serializeArg(arg, win, ctx));\n  } else if (value === null) {\n    return value;\n  } else if (\n    value instanceof Float32Array ||\n    value instanceof Float64Array ||\n    value instanceof Int32Array ||\n    value instanceof Uint32Array ||\n    value instanceof Uint8Array ||\n    value instanceof Uint16Array ||\n    value instanceof Int16Array ||\n    value instanceof Int8Array ||\n    value instanceof Uint8ClampedArray\n  ) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [Object.values(value)],\n    };\n  } else if (\n    // SharedArrayBuffer disabled on most browsers due to spectre.\n    // More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/SharedArrayBuffer\n    // value instanceof SharedArrayBuffer ||\n    value instanceof ArrayBuffer\n  ) {\n    const name = value.constructor.name as 'ArrayBuffer';\n    const base64 = encode(value);\n\n    return {\n      rr_type: name,\n      base64,\n    };\n  } else if (value instanceof DataView) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [\n        serializeArg(value.buffer, win, ctx),\n        value.byteOffset,\n        value.byteLength,\n      ],\n    };\n  } else if (value instanceof HTMLImageElement) {\n    const name = value.constructor.name;\n    const { src } = value;\n    return {\n      rr_type: name,\n      src,\n    };\n  } else if (value instanceof HTMLCanvasElement) {\n    const name = 'HTMLImageElement';\n    // TODO: move `toDataURL` to web worker if possible\n    const src = value.toDataURL(); // heavy on large canvas\n    return {\n      rr_type: name,\n      src,\n    };\n  } else if (value instanceof ImageData) {\n    const name = value.constructor.name;\n    return {\n      rr_type: name,\n      args: [serializeArg(value.data, win, ctx), value.width, value.height],\n    };\n    // } else if (value instanceof Blob) {\n    //   const name = value.constructor.name;\n    //   return {\n    //     rr_type: name,\n    //     data: [serializeArg(await value.arrayBuffer(), win, ctx)],\n    //     type: value.type,\n    //   };\n  } else if (isInstanceOfWebGLObject(value, win) || typeof value === 'object') {\n    const name = value.constructor.name;\n    const index = saveWebGLVar(value, win, ctx) as number;\n\n    return {\n      rr_type: name,\n      index: index,\n    };\n  }\n\n  return value as unknown as CanvasArg;\n}\n\nexport const serializeArgs = (\n  args: Array<unknown>,\n  win: IWindow,\n  ctx: RenderingContext,\n) => {\n  return args.map((arg) => serializeArg(arg, win, ctx));\n};\n\nexport const isInstanceOfWebGLObject = (\n  value: unknown,\n  win: IWindow,\n): value is\n  | WebGLActiveInfo\n  | WebGLBuffer\n  | WebGLFramebuffer\n  | WebGLProgram\n  | WebGLRenderbuffer\n  | WebGLShader\n  | WebGLShaderPrecisionFormat\n  | WebGLTexture\n  | WebGLUniformLocation\n  | WebGLVertexArrayObject => {\n  const webGLConstructorNames: string[] = [\n    'WebGLActiveInfo',\n    'WebGLBuffer',\n    'WebGLFramebuffer',\n    'WebGLProgram',\n    'WebGLRenderbuffer',\n    'WebGLShader',\n    'WebGLShaderPrecisionFormat',\n    'WebGLTexture',\n    'WebGLUniformLocation',\n    'WebGLVertexArrayObject',\n    // In old Chrome versions, value won't be an instanceof WebGLVertexArrayObject.\n    'WebGLVertexArrayObjectOES',\n  ];\n  const supportedWebGLConstructorNames = webGLConstructorNames.filter(\n    (name: string) => typeof win[name as keyof Window] === 'function',\n  );\n  return Boolean(\n    supportedWebGLConstructorNames.find(\n      (name: string) => value instanceof win[name as keyof Window],\n    ),\n  );\n};\n", "import {\n  type blockClass,\n  CanvasContext,\n  type canvasManagerMutationCallback,\n  type IWindow,\n  type listenerHandler,\n} from '@rrweb/types';\nimport { hookSetter, isBlocked } from '../../../utils';\nimport { patch } from '@rrweb/utils';\nimport { serializeArgs } from './serialize-args';\n\nexport default function initCanvas2DMutationObserver(\n  cb: canvasManagerMutationCallback,\n  win: IWindow,\n  blockClass: blockClass,\n  blockSelector: string | null,\n): listenerHandler {\n  const handlers: listenerHandler[] = [];\n  const props2D = Object.getOwnPropertyNames(\n    win.CanvasRenderingContext2D.prototype,\n  );\n  for (const prop of props2D) {\n    try {\n      if (\n        typeof win.CanvasRenderingContext2D.prototype[\n          prop as keyof CanvasRenderingContext2D\n        ] !== 'function'\n      ) {\n        continue;\n      }\n      const restoreHandler = patch(\n        win.CanvasRenderingContext2D.prototype,\n        prop,\n        function (\n          original: (\n            this: CanvasRenderingContext2D,\n            ...args: unknown[]\n          ) => void,\n        ) {\n          return function (\n            this: CanvasRenderingContext2D,\n            ...args: Array<unknown>\n          ) {\n            if (!isBlocked(this.canvas, blockClass, blockSelector, true)) {\n              // Using setTimeout as toDataURL can be heavy\n              // and we'd rather not block the main thread\n              setTimeout(() => {\n                const recordArgs = serializeArgs(args, win, this);\n                cb(this.canvas, {\n                  type: CanvasContext['2D'],\n                  property: prop,\n                  args: recordArgs,\n                });\n              }, 0);\n            }\n            return original.apply(this, args);\n          };\n        },\n      );\n      handlers.push(restoreHandler);\n    } catch {\n      const hookHandler = hookSetter<CanvasRenderingContext2D>(\n        win.CanvasRenderingContext2D.prototype,\n        prop,\n        {\n          set(v) {\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n            cb(this.canvas, {\n              type: CanvasContext['2D'],\n              property: prop,\n              args: [v],\n              setter: true,\n            });\n          },\n        },\n      );\n      handlers.push(hookHandler);\n    }\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\n", "import type { ICanvas } from 'rrweb-snapshot';\nimport type { blockClass, IWindow, listenerHandler } from '@rrweb/types';\nimport { isBlocked } from '../../../utils';\nimport { patch } from '@rrweb/utils';\n\nfunction getNormalizedContextName(contextType: string) {\n  return contextType === 'experimental-webgl' ? 'webgl' : contextType;\n}\n\nexport default function initCanvasContextObserver(\n  win: IWindow,\n  blockClass: blockClass,\n  blockSelector: string | null,\n  setPreserveDrawingBufferToTrue: boolean,\n): listenerHandler {\n  const handlers: listenerHandler[] = [];\n  try {\n    const restoreHandler = patch(\n      win.HTMLCanvasElement.prototype,\n      'getContext',\n      function (\n        original: (\n          this: ICanvas | HTMLCanvasElement,\n          contextType: string,\n          ...args: Array<unknown>\n        ) => void,\n      ) {\n        return function (\n          this: ICanvas | HTMLCanvasElement,\n          contextType: string,\n          ...args: Array<unknown>\n        ) {\n          if (!isBlocked(this, blockClass, blockSelector, true)) {\n            const ctxName = getNormalizedContextName(contextType);\n            if (!('__context' in this)) (this as ICanvas).__context = ctxName;\n\n            if (\n              setPreserveDrawingBufferToTrue &&\n              ['webgl', 'webgl2'].includes(ctxName)\n            ) {\n              if (args[0] && typeof args[0] === 'object') {\n                const contextAttributes = args[0] as WebGLContextAttributes;\n                if (!contextAttributes.preserveDrawingBuffer) {\n                  contextAttributes.preserveDrawingBuffer = true;\n                }\n              } else {\n                args.splice(0, 1, {\n                  preserveDrawingBuffer: true,\n                });\n              }\n            }\n          }\n          return original.apply(this, [contextType, ...args]);\n        };\n      },\n    );\n    handlers.push(restoreHandler);\n  } catch {\n    console.error('failed to patch HTMLCanvasElement.prototype.getContext');\n  }\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\n", "import {\n  type blockClass,\n  CanvasContext,\n  type canvasManagerMutationCallback,\n  type canvasMutationWithType,\n  type IWindow,\n  type listenerHandler,\n} from '@rrweb/types';\nimport { hookSetter, isBlocked } from '../../../utils';\nimport { patch } from '@rrweb/utils';\nimport { saveWebGLVar, serializeArgs } from './serialize-args';\n\nfunction patchGLPrototype(\n  prototype: WebGLRenderingContext | WebGL2RenderingContext,\n  type: CanvasContext,\n  cb: canvasManagerMutationCallback,\n  blockClass: blockClass,\n  blockSelector: string | null,\n  win: IWindow,\n): listenerHandler[] {\n  const handlers: listenerHandler[] = [];\n\n  const props = Object.getOwnPropertyNames(prototype);\n\n  for (const prop of props) {\n    if (\n      //prop.startsWith('get') ||  // e.g. getProgramParameter, but too risky\n      [\n        'isContextLost',\n        'canvas',\n        'drawingBufferWidth',\n        'drawingBufferHeight',\n      ].includes(prop)\n    ) {\n      // skip read only propery/functions\n      continue;\n    }\n    try {\n      if (typeof prototype[prop as keyof typeof prototype] !== 'function') {\n        continue;\n      }\n      const restoreHandler = patch(\n        prototype,\n        prop,\n        function (\n          original: (this: typeof prototype, ...args: Array<unknown>) => void,\n        ) {\n          return function (this: typeof prototype, ...args: Array<unknown>) {\n            const result = original.apply(this, args);\n            saveWebGLVar(result, win, this);\n            if (\n              'tagName' in this.canvas &&\n              !isBlocked(this.canvas, blockClass, blockSelector, true)\n            ) {\n              const recordArgs = serializeArgs(args, win, this);\n              const mutation: canvasMutationWithType = {\n                type,\n                property: prop,\n                args: recordArgs,\n              };\n              // TODO: this could potentially also be an OffscreenCanvas as well as HTMLCanvasElement\n              cb(this.canvas, mutation);\n            }\n\n            return result;\n          };\n        },\n      );\n      handlers.push(restoreHandler);\n    } catch {\n      const hookHandler = hookSetter<typeof prototype>(prototype, prop, {\n        set(v) {\n          // TODO: this could potentially also be an OffscreenCanvas as well as HTMLCanvasElement\n          // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n          cb(this.canvas as HTMLCanvasElement, {\n            type,\n            property: prop,\n            args: [v],\n            setter: true,\n          });\n        },\n      });\n      handlers.push(hookHandler);\n    }\n  }\n\n  return handlers;\n}\n\nexport default function initCanvasWebGLMutationObserver(\n  cb: canvasManagerMutationCallback,\n  win: IWindow,\n  blockClass: blockClass,\n  blockSelector: string | null,\n): listenerHandler {\n  const handlers: listenerHandler[] = [];\n\n  if (typeof win.WebGLRenderingContext !== 'undefined') {\n    handlers.push(\n      ...patchGLPrototype(\n        win.WebGLRenderingContext.prototype,\n        CanvasContext.WebGL,\n        cb,\n        blockClass,\n        blockSelector,\n        win,\n      ),\n    );\n  }\n\n  if (typeof win.WebGL2RenderingContext !== 'undefined') {\n    handlers.push(\n      ...patchGLPrototype(\n        win.WebGL2RenderingContext.prototype,\n        CanvasContext.WebGL2,\n        cb,\n        blockClass,\n        blockSelector,\n        win,\n      ),\n    );\n  }\n\n  return () => {\n    handlers.forEach((h) => h());\n  };\n}\n", "import type { ICanvas, Mirror } from 'rrweb-snapshot';\nimport type {\n  blockClass,\n  canvasManagerMutationCallback,\n  canvasMutationCallback,\n  canvasMutationCommand,\n  canvasMutationWithType,\n  IWindow,\n  listenerHandler,\n  CanvasArg,\n  DataURLOptions,\n} from '@rrweb/types';\nimport { isBlocked } from '../../../utils';\nimport { CanvasContext } from '@rrweb/types';\nimport initCanvas2DMutationObserver from './2d';\nimport initCanvasContextObserver from './canvas';\nimport initCanvasWebGLMutationObserver from './webgl';\nimport ImageBitmapDataURLWorker from '../../workers/image-bitmap-data-url-worker?worker&inline';\nimport type { ImageBitmapDataURLRequestWorker } from '../../workers/image-bitmap-data-url-worker';\n\nexport type RafStamps = { latestId: number; invokeId: number | null };\n\ntype pendingCanvasMutationsMap = Map<\n  HTMLCanvasElement,\n  canvasMutationWithType[]\n>;\n\nexport class CanvasManager {\n  private pendingCanvasMutations: pendingCanvasMutationsMap = new Map();\n  private rafStamps: RafStamps = { latestId: 0, invokeId: null };\n  private mirror: Mirror;\n\n  private mutationCb: canvasMutationCallback;\n  private resetObservers?: listenerHandler;\n  private frozen = false;\n  private locked = false;\n\n  public reset() {\n    this.pendingCanvasMutations.clear();\n    this.resetObservers && this.resetObservers();\n  }\n\n  public freeze() {\n    this.frozen = true;\n  }\n\n  public unfreeze() {\n    this.frozen = false;\n  }\n\n  public lock() {\n    this.locked = true;\n  }\n\n  public unlock() {\n    this.locked = false;\n  }\n\n  constructor(options: {\n    recordCanvas: boolean;\n    mutationCb: canvasMutationCallback;\n    win: IWindow;\n    blockClass: blockClass;\n    blockSelector: string | null;\n    mirror: Mirror;\n    sampling?: 'all' | number;\n    dataURLOptions: DataURLOptions;\n  }) {\n    const {\n      sampling = 'all',\n      win,\n      blockClass,\n      blockSelector,\n      recordCanvas,\n      dataURLOptions,\n    } = options;\n    this.mutationCb = options.mutationCb;\n    this.mirror = options.mirror;\n\n    if (recordCanvas && sampling === 'all')\n      this.initCanvasMutationObserver(win, blockClass, blockSelector);\n    if (recordCanvas && typeof sampling === 'number')\n      this.initCanvasFPSObserver(sampling, win, blockClass, blockSelector, {\n        dataURLOptions,\n      });\n  }\n\n  private processMutation: canvasManagerMutationCallback = (\n    target,\n    mutation,\n  ) => {\n    const newFrame =\n      this.rafStamps.invokeId &&\n      this.rafStamps.latestId !== this.rafStamps.invokeId;\n    if (newFrame || !this.rafStamps.invokeId)\n      this.rafStamps.invokeId = this.rafStamps.latestId;\n\n    if (!this.pendingCanvasMutations.has(target)) {\n      this.pendingCanvasMutations.set(target, []);\n    }\n\n    this.pendingCanvasMutations.get(target)!.push(mutation);\n  };\n\n  private initCanvasFPSObserver(\n    fps: number,\n    win: IWindow,\n    blockClass: blockClass,\n    blockSelector: string | null,\n    options: {\n      dataURLOptions: DataURLOptions;\n    },\n  ) {\n    const canvasContextReset = initCanvasContextObserver(\n      win,\n      blockClass,\n      blockSelector,\n      true,\n    );\n    const snapshotInProgressMap: Map<number, boolean> = new Map();\n    const worker =\n      new ImageBitmapDataURLWorker() as ImageBitmapDataURLRequestWorker;\n    worker.onmessage = (e) => {\n      const { id } = e.data;\n      snapshotInProgressMap.set(id, false);\n\n      if (!('base64' in e.data)) return;\n\n      const { base64, type, width, height } = e.data;\n      this.mutationCb({\n        id,\n        type: CanvasContext['2D'],\n        commands: [\n          {\n            property: 'clearRect', // wipe canvas\n            args: [0, 0, width, height],\n          },\n          {\n            property: 'drawImage', // draws (semi-transparent) image\n            args: [\n              {\n                rr_type: 'ImageBitmap',\n                args: [\n                  {\n                    rr_type: 'Blob',\n                    data: [{ rr_type: 'ArrayBuffer', base64 }],\n                    type,\n                  },\n                ],\n              } as CanvasArg,\n              0,\n              0,\n            ],\n          },\n        ],\n      });\n    };\n\n    const timeBetweenSnapshots = 1000 / fps;\n    let lastSnapshotTime = 0;\n    let rafId: number;\n\n    const getCanvas = (): HTMLCanvasElement[] => {\n      const matchedCanvas: HTMLCanvasElement[] = [];\n      win.document.querySelectorAll('canvas').forEach((canvas) => {\n        if (!isBlocked(canvas, blockClass, blockSelector, true)) {\n          matchedCanvas.push(canvas);\n        }\n      });\n      return matchedCanvas;\n    };\n\n    const takeCanvasSnapshots = (timestamp: DOMHighResTimeStamp) => {\n      if (\n        lastSnapshotTime &&\n        timestamp - lastSnapshotTime < timeBetweenSnapshots\n      ) {\n        rafId = requestAnimationFrame(takeCanvasSnapshots);\n        return;\n      }\n      lastSnapshotTime = timestamp;\n\n      getCanvas()\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        .forEach(async (canvas: HTMLCanvasElement) => {\n          const id = this.mirror.getId(canvas);\n          if (snapshotInProgressMap.get(id)) return;\n\n          // The browser throws if the canvas is 0 in size\n          // Uncaught (in promise) DOMException: Failed to execute 'createImageBitmap' on 'Window': The source image width is 0.\n          // Assuming the same happens with height\n          if (canvas.width === 0 || canvas.height === 0) return;\n\n          snapshotInProgressMap.set(id, true);\n          if (['webgl', 'webgl2'].includes((canvas as ICanvas).__context)) {\n            // if the canvas hasn't been modified recently,\n            // its contents won't be in memory and `createImageBitmap`\n            // will return a transparent imageBitmap\n\n            const context = canvas.getContext((canvas as ICanvas).__context) as\n              | WebGLRenderingContext\n              | WebGL2RenderingContext\n              | null;\n            if (\n              context?.getContextAttributes()?.preserveDrawingBuffer === false\n            ) {\n              // Hack to load canvas back into memory so `createImageBitmap` can grab it's contents.\n              // Context: https://twitter.com/Juice10/status/1499775271758704643\n              // Preferably we set `preserveDrawingBuffer` to true, but that's not always possible,\n              // especially when canvas is loaded before rrweb.\n              // This hack can wipe the background color of the canvas in the (unlikely) event that\n              // the canvas background was changed but clear was not called directly afterwards.\n              // Example of this hack having negative side effect: https://visgl.github.io/react-map-gl/examples/layers\n              context.clear(context.COLOR_BUFFER_BIT);\n            }\n          }\n          const bitmap = await createImageBitmap(canvas);\n          worker.postMessage(\n            {\n              id,\n              bitmap,\n              width: canvas.width,\n              height: canvas.height,\n              dataURLOptions: options.dataURLOptions,\n            },\n            [bitmap],\n          );\n        });\n      rafId = requestAnimationFrame(takeCanvasSnapshots);\n    };\n\n    rafId = requestAnimationFrame(takeCanvasSnapshots);\n\n    this.resetObservers = () => {\n      canvasContextReset();\n      cancelAnimationFrame(rafId);\n    };\n  }\n\n  private initCanvasMutationObserver(\n    win: IWindow,\n    blockClass: blockClass,\n    blockSelector: string | null,\n  ): void {\n    this.startRAFTimestamping();\n    this.startPendingCanvasMutationFlusher();\n\n    const canvasContextReset = initCanvasContextObserver(\n      win,\n      blockClass,\n      blockSelector,\n      false,\n    );\n    const canvas2DReset = initCanvas2DMutationObserver(\n      this.processMutation.bind(this),\n      win,\n      blockClass,\n      blockSelector,\n    );\n\n    const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(\n      this.processMutation.bind(this),\n      win,\n      blockClass,\n      blockSelector,\n    );\n\n    this.resetObservers = () => {\n      canvasContextReset();\n      canvas2DReset();\n      canvasWebGL1and2Reset();\n    };\n  }\n\n  private startPendingCanvasMutationFlusher() {\n    requestAnimationFrame(() => this.flushPendingCanvasMutations());\n  }\n\n  private startRAFTimestamping() {\n    const setLatestRAFTimestamp = (timestamp: DOMHighResTimeStamp) => {\n      this.rafStamps.latestId = timestamp;\n      requestAnimationFrame(setLatestRAFTimestamp);\n    };\n    requestAnimationFrame(setLatestRAFTimestamp);\n  }\n\n  flushPendingCanvasMutations() {\n    this.pendingCanvasMutations.forEach(\n      (_values: canvasMutationCommand[], canvas: HTMLCanvasElement) => {\n        const id = this.mirror.getId(canvas);\n        this.flushPendingCanvasMutationFor(canvas, id);\n      },\n    );\n    requestAnimationFrame(() => this.flushPendingCanvasMutations());\n  }\n\n  flushPendingCanvasMutationFor(canvas: HTMLCanvasElement, id: number) {\n    if (this.frozen || this.locked) {\n      return;\n    }\n\n    const valuesWithType = this.pendingCanvasMutations.get(canvas);\n    if (!valuesWithType || id === -1) return;\n\n    const values = valuesWithType.map((value) => {\n      const { type, ...rest } = value;\n      return rest;\n    });\n    const { type } = valuesWithType[0];\n\n    this.mutationCb({ id, type, commands: values });\n\n    this.pendingCanvasMutations.delete(canvas);\n  }\n}\n", "import { stringifyRule } from 'rrweb-snapshot';\nimport type {\n  elementNode,\n  serializedNodeWithId,\n  adoptedStyleSheetCallback,\n  adoptedStyleSheetParam,\n  attributeMutation,\n  mutationCallBack,\n} from '@rrweb/types';\nimport { StyleSheetMirror } from '../utils';\n\nexport class StylesheetManager {\n  private trackedLinkElements: WeakSet<HTMLLinkElement> = new WeakSet();\n  private mutationCb: mutationCallBack;\n  private adoptedStyleSheetCb: adoptedStyleSheetCallback;\n  public styleMirror = new StyleSheetMirror();\n\n  constructor(options: {\n    mutationCb: mutationCallBack;\n    adoptedStyleSheetCb: adoptedStyleSheetCallback;\n  }) {\n    this.mutationCb = options.mutationCb;\n    this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n  }\n\n  public attachLinkElement(\n    linkEl: HTMLLinkElement,\n    childSn: serializedNodeWithId,\n  ) {\n    if ('_cssText' in (childSn as elementNode).attributes)\n      this.mutationCb({\n        adds: [],\n        removes: [],\n        texts: [],\n        attributes: [\n          {\n            id: childSn.id,\n            attributes: (childSn as elementNode)\n              .attributes as attributeMutation['attributes'],\n          },\n        ],\n      });\n\n    this.trackLinkElement(linkEl);\n  }\n\n  public trackLinkElement(linkEl: HTMLLinkElement) {\n    if (this.trackedLinkElements.has(linkEl)) return;\n\n    this.trackedLinkElements.add(linkEl);\n    this.trackStylesheetInLinkElement(linkEl);\n  }\n\n  public adoptStyleSheets(\n    sheets: CSSStyleSheet[] | readonly CSSStyleSheet[],\n    hostId: number,\n  ) {\n    if (sheets.length === 0) return;\n    const adoptedStyleSheetData: adoptedStyleSheetParam = {\n      id: hostId,\n      styleIds: [] as number[],\n    };\n    const styles: NonNullable<adoptedStyleSheetParam['styles']> = [];\n    for (const sheet of sheets) {\n      let styleId;\n      if (!this.styleMirror.has(sheet)) {\n        styleId = this.styleMirror.add(sheet);\n        styles.push({\n          styleId,\n          rules: Array.from(sheet.rules || CSSRule, (r, index) => ({\n            rule: stringifyRule(r, sheet.href),\n            index,\n          })),\n        });\n      } else styleId = this.styleMirror.getId(sheet);\n      adoptedStyleSheetData.styleIds.push(styleId);\n    }\n    if (styles.length > 0) adoptedStyleSheetData.styles = styles;\n    this.adoptedStyleSheetCb(adoptedStyleSheetData);\n  }\n\n  public reset() {\n    this.styleMirror.reset();\n    this.trackedLinkElements = new WeakSet();\n  }\n\n  // TODO: take snapshot on stylesheet reload by applying event listener\n  private trackStylesheetInLinkElement(_linkEl: HTMLLinkElement) {\n    // linkEl.addEventListener('load', () => {\n    //   // re-loaded, maybe take another snapshot?\n    // });\n  }\n}\n", "import type MutationBuffer from './mutation';\n\n/**\n * Keeps a log of nodes that could show up in multiple mutation buffer but shouldn't be handled twice.\n */\nexport default class ProcessedNodeManager {\n  private nodeMap: WeakMap<Node, Set<MutationBuffer>> = new WeakMap();\n\n  private active = false;\n\n  public inOtherBuffer(node: Node, thisBuffer: MutationBuffer) {\n    const buffers = this.nodeMap.get(node);\n    return (\n      buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer)\n    );\n  }\n\n  public add(node: Node, buffer: MutationBuffer) {\n    if (!this.active) {\n      this.active = true;\n      requestAnimationFrame(() => {\n        this.nodeMap = new WeakMap();\n        this.active = false;\n      });\n    }\n    this.nodeMap.set(node, (this.nodeMap.get(node) || new Set()).add(buffer));\n  }\n\n  public destroy() {\n    // cleanup no longer needed\n  }\n}\n", "import {\n  snapshot,\n  slimDOMDefaults,\n  type MaskInputOptions,\n  createMirror,\n} from 'rrweb-snapshot';\nimport { initObservers, mutationBuffers } from './observer';\nimport {\n  on,\n  getWindowWidth,\n  getWindowHeight,\n  getWindowScroll,\n  polyfill,\n  hasShadowRoot,\n  isSerializedIframe,\n  isSerializedStylesheet,\n  nowTimestamp,\n} from '../utils';\nimport type { recordOptions } from '../types';\nimport {\n  EventType,\n  type annotationData,\n  type eventWithoutTime,\n  type eventWithTime,\n  IncrementalSource,\n  type listenerHandler,\n  type mutationCallbackParam,\n  type scrollCallback,\n  type canvasMutationParam,\n  type adoptedStyleSheetParam,\n} from '@rrweb/types';\nimport type { CrossOriginIframeMessageEventContent } from '../types';\nimport { IframeManager } from './iframe-manager';\nimport { ShadowDomManager } from './shadow-dom-manager';\nimport { CanvasManager } from './observers/canvas/canvas-manager';\nimport { StylesheetManager } from './stylesheet-manager';\nimport ProcessedNodeManager from './processed-node-manager';\nimport {\n  callbackWrapper,\n  registerErrorHandler,\n  unregisterErrorHandler,\n} from './error-handler';\nimport dom from '@rrweb/utils';\n\nlet wrappedEmit!: (e: eventWithoutTime, isCheckout?: boolean) => void;\n\nlet takeFullSnapshot!: (isCheckout?: boolean) => void;\nlet canvasManager!: CanvasManager;\nlet recording = false;\n\n// Multiple tools (i.e. MooTools, Prototype.js) override Array.from and drop support for the 2nd parameter\n// Try to pull a clean implementation from a newly created iframe\ntry {\n  if (Array.from([1], (x) => x * 2)[0] !== 2) {\n    const cleanFrame = document.createElement('iframe');\n    document.body.appendChild(cleanFrame);\n    // eslint-disable-next-line @typescript-eslint/unbound-method -- Array.from is static and doesn't rely on binding\n    Array.from = cleanFrame.contentWindow?.Array.from || Array.from;\n    document.body.removeChild(cleanFrame);\n  }\n} catch (err) {\n  console.debug('Unable to override Array.from', err);\n}\n\nconst mirror = createMirror();\nfunction record<T = eventWithTime>(\n  options: recordOptions<T> = {},\n): listenerHandler | undefined {\n  const {\n    emit,\n    checkoutEveryNms,\n    checkoutEveryNth,\n    blockClass = 'rr-block',\n    blockSelector = null,\n    ignoreClass = 'rr-ignore',\n    ignoreSelector = null,\n    maskTextClass = 'rr-mask',\n    maskTextSelector = null,\n    inlineStylesheet = true,\n    maskAllInputs,\n    maskInputOptions: _maskInputOptions,\n    slimDOMOptions: _slimDOMOptions,\n    maskInputFn,\n    maskTextFn,\n    hooks,\n    packFn,\n    sampling = {},\n    dataURLOptions = {},\n    mousemoveWait,\n    recordDOM = true,\n    recordCanvas = false,\n    recordCrossOriginIframes = false,\n    recordAfter = options.recordAfter === 'DOMContentLoaded'\n      ? options.recordAfter\n      : 'load',\n    userTriggeredOnInput = false,\n    collectFonts = false,\n    inlineImages = false,\n    plugins,\n    keepIframeSrcFn = () => false,\n    ignoreCSSAttributes = new Set([]),\n    errorHandler,\n  } = options;\n\n  registerErrorHandler(errorHandler);\n\n  const inEmittingFrame = recordCrossOriginIframes\n    ? window.parent === window\n    : true;\n\n  let passEmitsToParent = false;\n  if (!inEmittingFrame) {\n    try {\n      // throws if parent is cross-origin\n      if (window.parent.document) {\n        passEmitsToParent = false; // if parent is same origin we collect iframe events from the parent\n      }\n    } catch (e) {\n      passEmitsToParent = true;\n    }\n  }\n\n  // runtime checks for user options\n  if (inEmittingFrame && !emit) {\n    throw new Error('emit function is required');\n  }\n  if (!inEmittingFrame && !passEmitsToParent) {\n    return () => {\n      /* no-op since in this case we don't need to record anything from this frame in particular */\n    };\n  }\n  // move departed options to new options\n  if (mousemoveWait !== undefined && sampling.mousemove === undefined) {\n    sampling.mousemove = mousemoveWait;\n  }\n\n  // reset mirror in case `record` this was called earlier\n  mirror.reset();\n\n  const maskInputOptions: MaskInputOptions =\n    maskAllInputs === true\n      ? {\n          color: true,\n          date: true,\n          'datetime-local': true,\n          email: true,\n          month: true,\n          number: true,\n          range: true,\n          search: true,\n          tel: true,\n          text: true,\n          time: true,\n          url: true,\n          week: true,\n          textarea: true,\n          select: true,\n          password: true,\n        }\n      : _maskInputOptions !== undefined\n      ? _maskInputOptions\n      : { password: true };\n\n  const slimDOMOptions = slimDOMDefaults(_slimDOMOptions);\n\n  polyfill();\n\n  let lastFullSnapshotEvent: eventWithTime;\n  let incrementalSnapshotCount = 0;\n\n  const eventProcessor = (e: eventWithTime): T => {\n    for (const plugin of plugins || []) {\n      if (plugin.eventProcessor) {\n        e = plugin.eventProcessor(e);\n      }\n    }\n    if (\n      packFn &&\n      // Disable packing events which will be emitted to parent frames.\n      !passEmitsToParent\n    ) {\n      e = packFn(e) as unknown as eventWithTime;\n    }\n    return e as unknown as T;\n  };\n  wrappedEmit = (r: eventWithoutTime, isCheckout?: boolean) => {\n    const e = r as eventWithTime;\n    e.timestamp = nowTimestamp();\n    if (\n      e.type !== EventType.FullSnapshot &&\n      !(\n        e.type === EventType.IncrementalSnapshot &&\n        e.data.source === IncrementalSource.Mutation\n      )\n    ) {\n      // we've got a user initiated event so if we've been frozen we first need\n      // to apply all DOM changes that have been buffering during paused state\n      canvasManager.unfreeze();\n      for (const buf of mutationBuffers) {\n        if (buf.isFrozen()) {\n          buf.unfreeze();\n        } else {\n          break; // just need to check one as they all get frozen together\n        }\n      }\n    }\n\n    if (inEmittingFrame) {\n      emit?.(eventProcessor(e), isCheckout);\n    } else if (passEmitsToParent) {\n      const message: CrossOriginIframeMessageEventContent<T> = {\n        type: 'rrweb',\n        event: eventProcessor(e),\n        origin: window.location.origin,\n        isCheckout,\n      };\n      window.parent.postMessage(message, '*');\n    }\n\n    if (e.type === EventType.FullSnapshot) {\n      lastFullSnapshotEvent = e;\n      incrementalSnapshotCount = 0;\n    } else if (e.type === EventType.IncrementalSnapshot) {\n      // attach iframe should be considered as full snapshot\n      if (\n        e.data.source === IncrementalSource.Mutation &&\n        e.data.isAttachIframe\n      ) {\n        return;\n      }\n\n      incrementalSnapshotCount++;\n      const exceedCount =\n        checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n      const exceedTime =\n        checkoutEveryNms &&\n        e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n      if (exceedCount || exceedTime) {\n        takeFullSnapshot(true);\n      }\n    }\n  };\n\n  const wrappedMutationEmit = (m: mutationCallbackParam) => {\n    wrappedEmit({\n      type: EventType.IncrementalSnapshot,\n      data: {\n        source: IncrementalSource.Mutation,\n        ...m,\n      },\n    });\n  };\n  const wrappedScrollEmit: scrollCallback = (p) =>\n    wrappedEmit({\n      type: EventType.IncrementalSnapshot,\n      data: {\n        source: IncrementalSource.Scroll,\n        ...p,\n      },\n    });\n  const wrappedCanvasMutationEmit = (p: canvasMutationParam) =>\n    wrappedEmit({\n      type: EventType.IncrementalSnapshot,\n      data: {\n        source: IncrementalSource.CanvasMutation,\n        ...p,\n      },\n    });\n\n  const wrappedAdoptedStyleSheetEmit = (a: adoptedStyleSheetParam) =>\n    wrappedEmit({\n      type: EventType.IncrementalSnapshot,\n      data: {\n        source: IncrementalSource.AdoptedStyleSheet,\n        ...a,\n      },\n    });\n\n  const stylesheetManager = new StylesheetManager({\n    mutationCb: wrappedMutationEmit,\n    adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit,\n  });\n\n  const iframeManager = new IframeManager({\n    mirror,\n    mutationCb: wrappedMutationEmit,\n    stylesheetManager: stylesheetManager,\n    recordCrossOriginIframes,\n    wrappedEmit,\n  });\n\n  /**\n   * Exposes mirror to the plugins\n   */\n  for (const plugin of plugins || []) {\n    if (plugin.getMirror)\n      plugin.getMirror({\n        nodeMirror: mirror,\n        crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n        crossOriginIframeStyleMirror:\n          iframeManager.crossOriginIframeStyleMirror,\n      });\n  }\n\n  const processedNodeManager = new ProcessedNodeManager();\n\n  canvasManager = new CanvasManager({\n    recordCanvas,\n    mutationCb: wrappedCanvasMutationEmit,\n    win: window,\n    blockClass,\n    blockSelector,\n    mirror,\n    sampling: sampling.canvas,\n    dataURLOptions,\n  });\n\n  const shadowDomManager = new ShadowDomManager({\n    mutationCb: wrappedMutationEmit,\n    scrollCb: wrappedScrollEmit,\n    bypassOptions: {\n      blockClass,\n      blockSelector,\n      maskTextClass,\n      maskTextSelector,\n      inlineStylesheet,\n      maskInputOptions,\n      dataURLOptions,\n      maskTextFn,\n      maskInputFn,\n      recordCanvas,\n      inlineImages,\n      sampling,\n      slimDOMOptions,\n      iframeManager,\n      stylesheetManager,\n      canvasManager,\n      keepIframeSrcFn,\n      processedNodeManager,\n    },\n    mirror,\n  });\n\n  takeFullSnapshot = (isCheckout = false) => {\n    if (!recordDOM) {\n      return;\n    }\n    wrappedEmit(\n      {\n        type: EventType.Meta,\n        data: {\n          href: window.location.href,\n          width: getWindowWidth(),\n          height: getWindowHeight(),\n        },\n      },\n      isCheckout,\n    );\n\n    // When we take a full snapshot, old tracked StyleSheets need to be removed.\n    stylesheetManager.reset();\n\n    shadowDomManager.init();\n\n    canvasManager.lock();\n    mutationBuffers.forEach((buf) => buf.lock()); // don't allow any mirror modifications during snapshotting\n    const node = snapshot(document, {\n      mirror,\n      blockClass,\n      blockSelector,\n      maskTextClass,\n      maskTextSelector,\n      inlineStylesheet,\n      maskAllInputs: maskInputOptions,\n      maskTextFn,\n      maskInputFn,\n      slimDOM: slimDOMOptions,\n      dataURLOptions,\n      recordCanvas,\n      inlineImages,\n      onSerialize: (n) => {\n        if (isSerializedIframe(n, mirror)) {\n          iframeManager.addIframe(n as HTMLIFrameElement);\n        }\n        if (isSerializedStylesheet(n, mirror)) {\n          stylesheetManager.trackLinkElement(n as HTMLLinkElement);\n        }\n        if (hasShadowRoot(n)) {\n          // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n          shadowDomManager.addShadowRoot(dom.shadowRoot(n as Node)!, document);\n        }\n      },\n      onIframeLoad: (iframe, childSn) => {\n        iframeManager.attachIframe(iframe, childSn);\n        shadowDomManager.observeAttachShadow(iframe);\n      },\n      onStylesheetLoad: (linkEl, childSn) => {\n        stylesheetManager.attachLinkElement(linkEl, childSn);\n      },\n      keepIframeSrcFn,\n    });\n\n    if (!node) {\n      return console.warn('Failed to snapshot the document');\n    }\n\n    wrappedEmit(\n      {\n        type: EventType.FullSnapshot,\n        data: {\n          node,\n          initialOffset: getWindowScroll(window),\n        },\n      },\n      isCheckout,\n    );\n    canvasManager.unlock();\n    mutationBuffers.forEach((buf) => buf.unlock()); // generate & emit any mutations that happened during snapshotting, as can now apply against the newly built mirror\n\n    // Some old browsers don't support adoptedStyleSheets.\n    if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n      stylesheetManager.adoptStyleSheets(\n        document.adoptedStyleSheets,\n        mirror.getId(document),\n      );\n  };\n\n  try {\n    const handlers: listenerHandler[] = [];\n\n    const observe = (doc: Document) => {\n      return callbackWrapper(initObservers)(\n        {\n          mutationCb: wrappedMutationEmit,\n          mousemoveCb: (positions, source) =>\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source,\n                positions,\n              },\n            }),\n          mouseInteractionCb: (d) =>\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.MouseInteraction,\n                ...d,\n              },\n            }),\n          scrollCb: wrappedScrollEmit,\n          viewportResizeCb: (d) =>\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.ViewportResize,\n                ...d,\n              },\n            }),\n          inputCb: (v) =>\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.Input,\n                ...v,\n              },\n            }),\n          mediaInteractionCb: (p) =>\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.MediaInteraction,\n                ...p,\n              },\n            }),\n          styleSheetRuleCb: (r) =>\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.StyleSheetRule,\n                ...r,\n              },\n            }),\n          styleDeclarationCb: (r) =>\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.StyleDeclaration,\n                ...r,\n              },\n            }),\n          canvasMutationCb: wrappedCanvasMutationEmit,\n          fontCb: (p) =>\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.Font,\n                ...p,\n              },\n            }),\n          selectionCb: (p) => {\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.Selection,\n                ...p,\n              },\n            });\n          },\n          customElementCb: (c) => {\n            wrappedEmit({\n              type: EventType.IncrementalSnapshot,\n              data: {\n                source: IncrementalSource.CustomElement,\n                ...c,\n              },\n            });\n          },\n          blockClass,\n          ignoreClass,\n          ignoreSelector,\n          maskTextClass,\n          maskTextSelector,\n          maskInputOptions,\n          inlineStylesheet,\n          sampling,\n          recordDOM,\n          recordCanvas,\n          inlineImages,\n          userTriggeredOnInput,\n          collectFonts,\n          doc,\n          maskInputFn,\n          maskTextFn,\n          keepIframeSrcFn,\n          blockSelector,\n          slimDOMOptions,\n          dataURLOptions,\n          mirror,\n          iframeManager,\n          stylesheetManager,\n          shadowDomManager,\n          processedNodeManager,\n          canvasManager,\n          ignoreCSSAttributes,\n          plugins:\n            plugins\n              ?.filter((p) => p.observer)\n              ?.map((p) => ({\n                observer: p.observer!,\n                options: p.options,\n                callback: (payload: object) =>\n                  wrappedEmit({\n                    type: EventType.Plugin,\n                    data: {\n                      plugin: p.name,\n                      payload,\n                    },\n                  }),\n              })) || [],\n        },\n        hooks,\n      );\n    };\n\n    // Observers of same-origin iframe documents, stopped when the document unloads.\n    const iframeObservers = new Map<Document, listenerHandler>();\n    iframeManager.addLoadListener((iframeEl) => {\n      try {\n        const doc = iframeEl.contentDocument!;\n        // Iframes are attached again on every full snapshot, but each document needs to be observed only once.\n        if (iframeObservers.has(doc)) return;\n        iframeObservers.set(doc, observe(doc));\n      } catch (error) {\n        // TODO: handle internal error\n        console.warn(error);\n      }\n    });\n    iframeManager.addUnloadListener((doc) => {\n      const stopObserving = iframeObservers.get(doc);\n      if (!stopObserving) return;\n      iframeObservers.delete(doc);\n      stopObserving();\n      shadowDomManager.removeShadowRootsIn(doc);\n      mirror.removeNodeFromMap(doc);\n    });\n\n    const init = () => {\n      takeFullSnapshot();\n      handlers.push(observe(document));\n      recording = true;\n    };\n    if (['interactive', 'complete'].includes(document.readyState)) {\n      init();\n    } else {\n      handlers.push(\n        on('DOMContentLoaded', () => {\n          wrappedEmit({\n            type: EventType.DomContentLoaded,\n            data: {},\n          });\n          if (recordAfter === 'DOMContentLoaded') init();\n        }),\n      );\n      handlers.push(\n        on(\n          'load',\n          () => {\n            wrappedEmit({\n              type: EventType.Load,\n              data: {},\n            });\n            if (recordAfter === 'load') init();\n          },\n          window,\n        ),\n      );\n    }\n    return () => {\n      [...handlers, ...iframeObservers.values()].forEach((handler) => {\n        try {\n          handler();\n        } catch (error) {\n          const msg = String(error).toLowerCase();\n          /**\n           * https://github.com/rrweb-io/rrweb/pull/1695\n           * This error can occur in a known scenario:\n           * If an iframe is initially same-origin and observed, but later its \n           location is changed in an opaque way to a cross-origin URL (perhaps within the iframe via its `document.location` or a redirect) \n           * attempting to execute the handler in the stop record function will \n           throw a \"cannot access cross-origin frame\" error.\n           * This error is expected and can be safely ignored.\n           */\n          if (!msg.includes('cross-origin')) {\n            console.warn(error);\n          }\n        }\n      });\n      iframeObservers.clear();\n      iframeManager.destroy();\n      processedNodeManager.destroy();\n      shadowDomManager.reset();\n      canvasManager.reset();\n      recording = false;\n      unregisterErrorHandler();\n    };\n  } catch (error) {\n    // TODO: handle internal error\n    console.warn(error);\n  }\n}\n\nrecord.addCustomEvent = <T>(tag: string, payload: T) => {\n  if (!recording) {\n    throw new Error('please add custom event after start recording');\n  }\n  wrappedEmit({\n    type: EventType.Custom,\n    data: {\n      tag,\n      payload,\n    },\n  });\n};\n\nrecord.addAnnotation = (annotation: annotationData) => {\n  if (!recording) {\n    throw new Error('please add annotation after recording started');\n  }\n  wrappedEmit({ type: EventType.Annotation, data: annotation });\n};\n\nrecord.freezePage = () => {\n  canvasManager.freeze();\n  mutationBuffers.forEach((buf) => buf.freeze());\n};\n\nrecord.takeFullSnapshot = (isCheckout?: boolean) => {\n  if (!recording) {\n    throw new Error('please take full snapshot after start recording');\n  }\n  takeFullSnapshot(isCheckout);\n};\n\nrecord.mirror = mirror;\n\nexport default record;\n", "export default function(n){return{all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e])},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]))},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e)}),(i=n.get(\"*\"))&&i.slice().map(function(n){n(t,e)})}}}\n//# sourceMappingURL=mitt.mjs.map\n", "/**\n * A fork version of https://github.com/iamdustan/smoothscroll\n * Add support of customize target window and document\n */\n\n/* eslint-disable */\n// @ts-nocheck\nexport function polyfill(w: Window = window, d = document) {\n  // return if scroll behavior is supported and polyfill is not forced\n  if (\n    'scrollBehavior' in d.documentElement.style &&\n    w.__forceSmoothScrollPolyfill__ !== true\n  ) {\n    return;\n  }\n\n  // globals\n  const Element = w.HTMLElement || w.Element;\n  const SCROLL_TIME = 468;\n\n  // object gathering original scroll methods\n  const original = {\n    scroll: w.scroll || w.scrollTo,\n    scrollBy: w.scrollBy,\n    elementScroll: Element.prototype.scroll || scrollElement,\n    scrollIntoView: Element.prototype.scrollIntoView,\n  };\n\n  // define timing method\n  const now =\n    w.performance && w.performance.now\n      ? w.performance.now.bind(w.performance)\n      : Date.now;\n\n  /**\n   * indicates if a the current browser is made by Microsoft\n   * @method isMicrosoftBrowser\n   * @param {String} userAgent\n   * @returns {Boolean}\n   */\n  function isMicrosoftBrowser(userAgent) {\n    const userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];\n\n    return new RegExp(userAgentPatterns.join('|')).test(userAgent);\n  }\n\n  /*\n   * IE has rounding bug rounding down clientHeight and clientWidth and\n   * rounding up scrollHeight and scrollWidth causing false positives\n   * on hasScrollableSpace\n   */\n  const ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;\n\n  /**\n   * changes scroll position inside an element\n   * @method scrollElement\n   * @param {Number} x\n   * @param {Number} y\n   * @returns {undefined}\n   */\n  function scrollElement(x, y) {\n    this.scrollLeft = x;\n    this.scrollTop = y;\n  }\n\n  /**\n   * returns result of applying ease math function to a number\n   * @method ease\n   * @param {Number} k\n   * @returns {Number}\n   */\n  function ease(k) {\n    return 0.5 * (1 - Math.cos(Math.PI * k));\n  }\n\n  /**\n   * indicates if a smooth behavior should be applied\n   * @method shouldBailOut\n   * @param {Number|Object} firstArg\n   * @returns {Boolean}\n   */\n  function shouldBailOut(firstArg) {\n    if (\n      firstArg === null ||\n      typeof firstArg !== 'object' ||\n      firstArg.behavior === undefined ||\n      firstArg.behavior === 'auto' ||\n      firstArg.behavior === 'instant'\n    ) {\n      // first argument is not an object/null\n      // or behavior is auto, instant or undefined\n      return true;\n    }\n\n    if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {\n      // first argument is an object and behavior is smooth\n      return false;\n    }\n\n    // throw error when behavior is not supported\n    throw new TypeError(\n      'behavior member of ScrollOptions ' +\n        firstArg.behavior +\n        ' is not a valid value for enumeration ScrollBehavior.',\n    );\n  }\n\n  /**\n   * indicates if an element has scrollable space in the provided axis\n   * @method hasScrollableSpace\n   * @param {Node} el\n   * @param {String} axis\n   * @returns {Boolean}\n   */\n  function hasScrollableSpace(el, axis) {\n    if (axis === 'Y') {\n      return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;\n    }\n\n    if (axis === 'X') {\n      return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;\n    }\n  }\n\n  /**\n   * indicates if an element has a scrollable overflow property in the axis\n   * @method canOverflow\n   * @param {Node} el\n   * @param {String} axis\n   * @returns {Boolean}\n   */\n  function canOverflow(el, axis) {\n    const overflowValue = w.getComputedStyle(el, null)['overflow' + axis];\n\n    return overflowValue === 'auto' || overflowValue === 'scroll';\n  }\n\n  /**\n   * indicates if an element can be scrolled in either axis\n   * @method isScrollable\n   * @param {Node} el\n   * @param {String} axis\n   * @returns {Boolean}\n   */\n  function isScrollable(el) {\n    const isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');\n    const isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');\n\n    return isScrollableY || isScrollableX;\n  }\n\n  /**\n   * finds scrollable parent of an element\n   * @method findScrollableParent\n   * @param {Node} el\n   * @returns {Node} el\n   */\n  function findScrollableParent(el) {\n    while (el !== d.body && isScrollable(el) === false) {\n      el = el.parentNode || el.host;\n    }\n\n    return el;\n  }\n\n  /**\n   * self invoked function that, given a context, steps through scrolling\n   * @method step\n   * @param {Object} context\n   * @returns {undefined}\n   */\n  function step(context) {\n    const time = now();\n    let value;\n    let currentX;\n    let currentY;\n    let elapsed = (time - context.startTime) / SCROLL_TIME;\n\n    // avoid elapsed times higher than one\n    elapsed = elapsed > 1 ? 1 : elapsed;\n\n    // apply easing to elapsed time\n    value = ease(elapsed);\n\n    currentX = context.startX + (context.x - context.startX) * value;\n    currentY = context.startY + (context.y - context.startY) * value;\n\n    context.method.call(context.scrollable, currentX, currentY);\n\n    // scroll more if we have not reached our destination\n    if (currentX !== context.x || currentY !== context.y) {\n      w.requestAnimationFrame(step.bind(w, context));\n    }\n  }\n\n  /**\n   * scrolls window or element with a smooth behavior\n   * @method smoothScroll\n   * @param {Object|Node} el\n   * @param {Number} x\n   * @param {Number} y\n   * @returns {undefined}\n   */\n  function smoothScroll(el, x, y) {\n    let scrollable;\n    let startX;\n    let startY;\n    let method;\n    const startTime = now();\n\n    // define scroll context\n    if (el === d.body) {\n      scrollable = w;\n      startX = w.scrollX || w.pageXOffset;\n      startY = w.scrollY || w.pageYOffset;\n      method = original.scroll;\n    } else {\n      scrollable = el;\n      startX = el.scrollLeft;\n      startY = el.scrollTop;\n      method = scrollElement;\n    }\n\n    // scroll looping over a frame\n    step({\n      scrollable: scrollable,\n      method: method,\n      startTime: startTime,\n      startX: startX,\n      startY: startY,\n      x: x,\n      y: y,\n    });\n  }\n\n  // ORIGINAL METHODS OVERRIDES\n  // w.scroll and w.scrollTo\n  w.scroll = w.scrollTo = function () {\n    // avoid action when no arguments are passed\n    if (arguments[0] === undefined) {\n      return;\n    }\n\n    // avoid smooth behavior if not required\n    if (shouldBailOut(arguments[0]) === true) {\n      original.scroll.call(\n        w,\n        arguments[0].left !== undefined\n          ? arguments[0].left\n          : typeof arguments[0] !== 'object'\n          ? arguments[0]\n          : w.scrollX || w.pageXOffset,\n        // use top prop, second argument if present or fallback to scrollY\n        arguments[0].top !== undefined\n          ? arguments[0].top\n          : arguments[1] !== undefined\n          ? arguments[1]\n          : w.scrollY || w.pageYOffset,\n      );\n\n      return;\n    }\n\n    // LET THE SMOOTHNESS BEGIN!\n    smoothScroll.call(\n      w,\n      d.body,\n      arguments[0].left !== undefined\n        ? ~~arguments[0].left\n        : w.scrollX || w.pageXOffset,\n      arguments[0].top !== undefined\n        ? ~~arguments[0].top\n        : w.scrollY || w.pageYOffset,\n    );\n  };\n\n  // w.scrollBy\n  w.scrollBy = function () {\n    // avoid action when no arguments are passed\n    if (arguments[0] === undefined) {\n      return;\n    }\n\n    // avoid smooth behavior if not required\n    if (shouldBailOut(arguments[0])) {\n      original.scrollBy.call(\n        w,\n        arguments[0].left !== undefined\n          ? arguments[0].left\n          : typeof arguments[0] !== 'object'\n          ? arguments[0]\n          : 0,\n        arguments[0].top !== undefined\n          ? arguments[0].top\n          : arguments[1] !== undefined\n          ? arguments[1]\n          : 0,\n      );\n\n      return;\n    }\n\n    // LET THE SMOOTHNESS BEGIN!\n    smoothScroll.call(\n      w,\n      d.body,\n      ~~arguments[0].left + (w.scrollX || w.pageXOffset),\n      ~~arguments[0].top + (w.scrollY || w.pageYOffset),\n    );\n  };\n\n  // Element.prototype.scroll and Element.prototype.scrollTo\n  Element.prototype.scroll = Element.prototype.scrollTo = function () {\n    // avoid action when no arguments are passed\n    if (arguments[0] === undefined) {\n      return;\n    }\n\n    // avoid smooth behavior if not required\n    if (shouldBailOut(arguments[0]) === true) {\n      // if one number is passed, throw error to match Firefox implementation\n      if (typeof arguments[0] === 'number' && arguments[1] === undefined) {\n        throw new SyntaxError('Value could not be converted');\n      }\n\n      original.elementScroll.call(\n        this,\n        // use left prop, first number argument or fallback to scrollLeft\n        arguments[0].left !== undefined\n          ? ~~arguments[0].left\n          : typeof arguments[0] !== 'object'\n          ? ~~arguments[0]\n          : this.scrollLeft,\n        // use top prop, second argument or fallback to scrollTop\n        arguments[0].top !== undefined\n          ? ~~arguments[0].top\n          : arguments[1] !== undefined\n          ? ~~arguments[1]\n          : this.scrollTop,\n      );\n\n      return;\n    }\n\n    const left = arguments[0].left;\n    const top = arguments[0].top;\n\n    // LET THE SMOOTHNESS BEGIN!\n    smoothScroll.call(\n      this,\n      this,\n      typeof left === 'undefined' ? this.scrollLeft : ~~left,\n      typeof top === 'undefined' ? this.scrollTop : ~~top,\n    );\n  };\n\n  // Element.prototype.scrollBy\n  Element.prototype.scrollBy = function () {\n    // avoid action when no arguments are passed\n    if (arguments[0] === undefined) {\n      return;\n    }\n\n    // avoid smooth behavior if not required\n    if (shouldBailOut(arguments[0]) === true) {\n      original.elementScroll.call(\n        this,\n        arguments[0].left !== undefined\n          ? ~~arguments[0].left + this.scrollLeft\n          : ~~arguments[0] + this.scrollLeft,\n        arguments[0].top !== undefined\n          ? ~~arguments[0].top + this.scrollTop\n          : ~~arguments[1] + this.scrollTop,\n      );\n\n      return;\n    }\n\n    this.scroll({\n      left: ~~arguments[0].left + this.scrollLeft,\n      top: ~~arguments[0].top + this.scrollTop,\n      behavior: arguments[0].behavior,\n    });\n  };\n\n  // Element.prototype.scrollIntoView\n  Element.prototype.scrollIntoView = function () {\n    // avoid smooth behavior if not required\n    if (shouldBailOut(arguments[0]) === true) {\n      original.scrollIntoView.call(\n        this,\n        arguments[0] === undefined ? true : arguments[0],\n      );\n\n      return;\n    }\n\n    // LET THE SMOOTHNESS BEGIN!\n    const scrollableParent = findScrollableParent(this);\n    const parentRects = scrollableParent.getBoundingClientRect();\n    const clientRects = this.getBoundingClientRect();\n\n    if (scrollableParent !== d.body) {\n      // reveal element inside parent\n      smoothScroll.call(\n        this,\n        scrollableParent,\n        scrollableParent.scrollLeft + clientRects.left - parentRects.left,\n        scrollableParent.scrollTop + clientRects.top - parentRects.top,\n      );\n\n      // reveal parent in viewport unless is fixed\n      if (w.getComputedStyle(scrollableParent).position !== 'fixed') {\n        w.scrollBy({\n          left: parentRects.left,\n          top: parentRects.top,\n          behavior: 'smooth',\n        });\n      }\n    } else {\n      // reveal element in viewport\n      w.scrollBy({\n        left: clientRects.left,\n        top: clientRects.top,\n        behavior: 'smooth',\n      });\n    }\n  };\n}\n", "import {\n  type actionWithDelay,\n  type eventWithTime,\n  EventType,\n  IncrementalSource,\n} from '@rrweb/types';\n\nexport class Timer {\n  public timeOffset = 0;\n  public speed: number;\n\n  private actions: actionWithDelay[];\n  private raf: number | true | null = null;\n  private lastTimestamp: number;\n\n  constructor(\n    actions: actionWithDelay[] = [],\n    config: {\n      speed: number;\n    },\n  ) {\n    this.actions = actions;\n    this.speed = config.speed;\n  }\n  /**\n   * Add an action, possibly after the timer starts.\n   */\n  public addAction(action: actionWithDelay) {\n    const rafWasActive = this.raf === true;\n    if (\n      !this.actions.length ||\n      this.actions[this.actions.length - 1].delay <= action.delay\n    ) {\n      // 'fast track'\n      this.actions.push(action);\n    } else {\n      // binary search - events can arrive out of order in a realtime context\n      const index = this.findActionIndex(action);\n      this.actions.splice(index, 0, action);\n    }\n    if (rafWasActive) {\n      this.raf = requestAnimationFrame(this.rafCheck.bind(this));\n    }\n  }\n\n  public start() {\n    this.timeOffset = 0;\n    this.lastTimestamp = performance.now();\n    this.raf = requestAnimationFrame(this.rafCheck.bind(this));\n  }\n\n  public updateLiveTime() {\n    if (this.raf === true) {\n      // in live mode awaiting new events\n      // we don't run requestAnimationFrame\n      this.rafCheck(); // updates timeOffset\n    }\n  }\n\n  private rafCheck() {\n    const time = performance.now();\n    this.timeOffset += (time - this.lastTimestamp) * this.speed;\n    this.lastTimestamp = time;\n    while (this.actions.length) {\n      const action = this.actions[0];\n\n      if (this.timeOffset >= action.delay) {\n        this.actions.shift();\n        action.doAction();\n      } else {\n        break;\n      }\n    }\n    if (this.actions.length > 0) {\n      this.raf = requestAnimationFrame(this.rafCheck.bind(this));\n    } else {\n      this.raf = true; // was active\n    }\n  }\n\n  public clear() {\n    if (this.raf) {\n      if (this.raf !== true) {\n        cancelAnimationFrame(this.raf);\n      }\n      this.raf = null;\n    }\n    this.actions.length = 0;\n  }\n\n  public setSpeed(speed: number) {\n    this.speed = speed;\n  }\n\n  public isActive() {\n    return this.raf !== null;\n  }\n\n  private findActionIndex(action: actionWithDelay): number {\n    let start = 0;\n    let end = this.actions.length - 1;\n    while (start <= end) {\n      const mid = Math.floor((start + end) / 2);\n      if (this.actions[mid].delay < action.delay) {\n        start = mid + 1;\n      } else if (this.actions[mid].delay > action.delay) {\n        end = mid - 1;\n      } else {\n        // already an action with same delay (timestamp)\n        // the plus one will splice the new one after the existing one\n        return mid + 1;\n      }\n    }\n    return start;\n  }\n}\n\n// TODO: add speed to mouse move timestamp calculation\nexport function addDelay(event: eventWithTime, baselineTime: number): number {\n  // Mouse move events was recorded in a throttle function,\n  // so we need to find the real timestamp by traverse the time offsets.\n  if (\n    event.type === EventType.IncrementalSnapshot &&\n    event.data.source === IncrementalSource.MouseMove &&\n    event.data.positions &&\n    event.data.positions.length\n  ) {\n    const firstOffset = event.data.positions[0].timeOffset;\n    // timeOffset is a negative offset to event.timestamp\n    const firstTimestamp = event.timestamp + firstOffset;\n    event.delay = firstTimestamp - baselineTime;\n    return firstTimestamp - baselineTime;\n  }\n\n  event.delay = event.timestamp - baselineTime;\n  return event.delay;\n}\n", "/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\nfunction t(t,n){var e=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}var n;!function(t){t[t.NotStarted=0]=\"NotStarted\",t[t.Running=1]=\"Running\",t[t.Stopped=2]=\"Stopped\"}(n||(n={}));var e={type:\"xstate.init\"};function r(t){return void 0===t?[]:[].concat(t)}function o(t){return{type:\"xstate.assign\",assignment:t}}function i(t,n){return\"string\"==typeof(t=\"string\"==typeof t&&n&&n[t]?n[t]:t)?{type:t}:\"function\"==typeof t?{type:t.name,exec:t}:t}function a(t){return function(n){return t===n}}function u(t){return\"string\"==typeof t?{type:t}:t}function c(t,n){return{value:t,context:n,actions:[],changed:!1,matches:a(t)}}function f(t,n,e){var r=n,o=!1;return[t.filter((function(t){if(\"xstate.assign\"===t.type){o=!0;var n=Object.assign({},r);return\"function\"==typeof t.assignment?n=t.assignment(r,e):Object.keys(t.assignment).forEach((function(o){n[o]=\"function\"==typeof t.assignment[o]?t.assignment[o](r,e):t.assignment[o]})),r=n,!1}return!0})),r,o]}function s(n,o){void 0===o&&(o={});var s=t(f(r(n.states[n.initial].entry).map((function(t){return i(t,o.actions)})),n.context,e),2),l=s[0],v=s[1],y={config:n,_options:o,initialState:{value:n.initial,actions:l,context:v,matches:a(n.initial)},transition:function(e,o){var s,l,v=\"string\"==typeof e?{value:e,context:n.context}:e,p=v.value,g=v.context,d=u(o),x=n.states[p];if(x.on){var m=r(x.on[d.type]);try{for(var h=function(t){var n=\"function\"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&\"number\"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?\"Object is not iterable.\":\"Symbol.iterator is not defined.\")}(m),b=h.next();!b.done;b=h.next()){var S=b.value;if(void 0===S)return c(p,g);var w=\"string\"==typeof S?{target:S}:S,j=w.target,E=w.actions,R=void 0===E?[]:E,N=w.cond,O=void 0===N?function(){return!0}:N,_=void 0===j,k=null!=j?j:p,T=n.states[k];if(O(g,d)){var q=t(f((_?r(R):[].concat(x.exit,R,T.entry).filter((function(t){return t}))).map((function(t){return i(t,y._options.actions)})),g,d),3),z=q[0],A=q[1],B=q[2],C=null!=j?j:p;return{value:C,context:A,actions:z,changed:j!==p||z.length>0||B,matches:a(C)}}}}catch(t){s={error:t}}finally{try{b&&!b.done&&(l=h.return)&&l.call(h)}finally{if(s)throw s.error}}}return c(p,g)}};return y}var l=function(t,n){return t.actions.forEach((function(e){var r=e.exec;return r&&r(t.context,n)}))};function v(t){var r=t.initialState,o=n.NotStarted,i=new Set,c={_machine:t,send:function(e){o===n.Running&&(r=t.transition(r,e),l(r,u(e)),i.forEach((function(t){return t(r)})))},subscribe:function(t){return i.add(t),t(r),{unsubscribe:function(){return i.delete(t)}}},start:function(i){if(i){var u=\"object\"==typeof i?i:{context:t.config.context,value:i};r={value:u.value,actions:[],context:u.context,matches:a(u.value)}}return o=n.Running,l(r,e),c},stop:function(){return o=n.Stopped,i.clear(),c},get state(){return r},get status(){return o}};return c}export{n as InterpreterStatus,o as assign,s as createMachine,v as interpret};\n", "import {\n  createMachine,\n  interpret,\n  assign,\n  type StateMachine,\n} from '@xstate/fsm';\nimport type { playerConfig } from '../types';\nimport {\n  type eventWithTime,\n  ReplayerEvents,\n  EventType,\n  type Emitter,\n  IncrementalSource,\n} from '@rrweb/types';\nimport { Timer, addDelay } from './timer';\n\nexport type PlayerContext = {\n  events: eventWithTime[];\n  timer: Timer;\n  timeOffset: number;\n  baselineTime: number;\n  lastPlayedEvent: eventWithTime | null;\n};\nexport type PlayerEvent =\n  | {\n      type: 'PLAY';\n      payload: {\n        timeOffset: number;\n      };\n    }\n  | {\n      type: 'CAST_EVENT';\n      payload: {\n        event: eventWithTime;\n      };\n    }\n  | { type: 'PAUSE' }\n  | { type: 'TO_LIVE'; payload: { baselineTime?: number } }\n  | {\n      type: 'ADD_EVENT';\n      payload: {\n        event: eventWithTime;\n      };\n    }\n  | {\n      type: 'END';\n    };\nexport type PlayerState =\n  | {\n      value: 'playing';\n      context: PlayerContext;\n    }\n  | {\n      value: 'paused';\n      context: PlayerContext;\n    }\n  | {\n      value: 'live';\n      context: PlayerContext;\n    };\n\n/**\n * If the array have multiple meta and fullsnapshot events,\n * return the events from last meta to the end.\n */\nexport function discardPriorSnapshots(\n  events: eventWithTime[],\n  baselineTime: number,\n): eventWithTime[] {\n  for (let idx = events.length - 1; idx >= 0; idx--) {\n    const event = events[idx];\n    if (event.type === EventType.Meta) {\n      if (event.timestamp <= baselineTime) {\n        return events.slice(idx);\n      }\n    }\n  }\n  return events;\n}\n\ntype PlayerAssets = {\n  emitter: Emitter;\n  applyEventsSynchronously(events: Array<eventWithTime>): void;\n  getCastFn(event: eventWithTime, isSync: boolean): () => void;\n};\nexport function createPlayerService(\n  context: PlayerContext,\n  { getCastFn, applyEventsSynchronously, emitter }: PlayerAssets,\n) {\n  const playerMachine = createMachine<PlayerContext, PlayerEvent, PlayerState>(\n    {\n      id: 'player',\n      context,\n      initial: 'paused',\n      states: {\n        playing: {\n          on: {\n            PAUSE: {\n              target: 'paused',\n              actions: ['pause'],\n            },\n            CAST_EVENT: {\n              target: 'playing',\n              actions: 'castEvent',\n            },\n            END: {\n              target: 'paused',\n              actions: ['resetLastPlayedEvent', 'pause'],\n            },\n            ADD_EVENT: {\n              target: 'playing',\n              actions: ['addEvent'],\n            },\n          },\n        },\n        paused: {\n          on: {\n            PLAY: {\n              target: 'playing',\n              actions: ['recordTimeOffset', 'play'],\n            },\n            CAST_EVENT: {\n              target: 'paused',\n              actions: 'castEvent',\n            },\n            TO_LIVE: {\n              target: 'live',\n              actions: ['startLive'],\n            },\n            ADD_EVENT: {\n              target: 'paused',\n              actions: ['addEvent'],\n            },\n          },\n        },\n        live: {\n          on: {\n            ADD_EVENT: {\n              target: 'live',\n              actions: ['addEvent'],\n            },\n            CAST_EVENT: {\n              target: 'live',\n              actions: ['castEvent'],\n            },\n          },\n        },\n      },\n    },\n    {\n      actions: {\n        castEvent: assign({\n          lastPlayedEvent: (ctx, event) => {\n            if (event.type === 'CAST_EVENT') {\n              return event.payload.event;\n            }\n            return ctx.lastPlayedEvent;\n          },\n        }),\n        recordTimeOffset: assign((ctx, event) => {\n          let timeOffset = ctx.timeOffset;\n          if ('payload' in event && 'timeOffset' in event.payload) {\n            timeOffset = event.payload.timeOffset;\n          }\n          return {\n            ...ctx,\n            timeOffset,\n            baselineTime: ctx.events[0].timestamp + timeOffset,\n          };\n        }),\n        play(ctx) {\n          const { timer, events, baselineTime, lastPlayedEvent } = ctx;\n          timer.clear();\n\n          for (const event of events) {\n            // TODO: improve this API\n            addDelay(event, baselineTime);\n          }\n          const neededEvents = discardPriorSnapshots(events, baselineTime);\n\n          let lastPlayedTimestamp = lastPlayedEvent?.timestamp;\n          if (\n            lastPlayedEvent?.type === EventType.IncrementalSnapshot &&\n            lastPlayedEvent.data.source === IncrementalSource.MouseMove\n          ) {\n            lastPlayedTimestamp =\n              lastPlayedEvent.timestamp +\n              lastPlayedEvent.data.positions[0]?.timeOffset;\n          }\n          if (baselineTime < (lastPlayedTimestamp || 0)) {\n            emitter.emit(ReplayerEvents.PlayBack);\n          }\n\n          const syncEvents = new Array<eventWithTime>();\n          for (const event of neededEvents) {\n            if (\n              lastPlayedTimestamp &&\n              lastPlayedTimestamp < baselineTime &&\n              (event.timestamp <= lastPlayedTimestamp ||\n                event === lastPlayedEvent)\n            ) {\n              continue;\n            }\n            if (event.timestamp < baselineTime) {\n              syncEvents.push(event);\n            } else {\n              const castFn = getCastFn(event, false);\n              timer.addAction({\n                doAction: () => {\n                  castFn();\n                },\n                delay: event.delay!,\n              });\n            }\n          }\n          applyEventsSynchronously(syncEvents);\n          emitter.emit(ReplayerEvents.Flush);\n          timer.start();\n        },\n        pause(ctx) {\n          ctx.timer.clear();\n        },\n        resetLastPlayedEvent: assign((ctx) => {\n          return {\n            ...ctx,\n            lastPlayedEvent: null,\n          };\n        }),\n        startLive: assign({\n          baselineTime: (ctx, event) => {\n            ctx.timer.start();\n            if (event.type === 'TO_LIVE' && event.payload.baselineTime) {\n              return event.payload.baselineTime;\n            }\n            return Date.now();\n          },\n        }),\n        addEvent: assign((ctx, machineEvent) => {\n          const { baselineTime, timer, events } = ctx;\n          if (machineEvent.type === 'ADD_EVENT') {\n            const { event } = machineEvent.payload;\n            addDelay(event, baselineTime);\n\n            let end = events.length - 1;\n            if (!events[end] || events[end].timestamp <= event.timestamp) {\n              // fast track\n              events.push(event);\n            } else {\n              let insertionIndex = -1;\n              let start = 0;\n              while (start <= end) {\n                const mid = Math.floor((start + end) / 2);\n                if (events[mid].timestamp <= event.timestamp) {\n                  start = mid + 1;\n                } else {\n                  end = mid - 1;\n                }\n              }\n              if (insertionIndex === -1) {\n                insertionIndex = start;\n              }\n              events.splice(insertionIndex, 0, event);\n            }\n\n            const isSync = event.timestamp < baselineTime;\n            const castFn = getCastFn(event, isSync);\n            if (isSync) {\n              castFn();\n            } else if (timer.isActive()) {\n              timer.addAction({\n                doAction: () => {\n                  castFn();\n                },\n                delay: event.delay!,\n              });\n            }\n          }\n          return { ...ctx, events };\n        }),\n      },\n    },\n  );\n  return interpret(playerMachine);\n}\n\nexport type SpeedContext = {\n  normalSpeed: playerConfig['speed'];\n  timer: Timer;\n};\n\nexport type SpeedEvent =\n  | {\n      type: 'FAST_FORWARD';\n      payload: { speed: playerConfig['speed'] };\n    }\n  | {\n      type: 'BACK_TO_NORMAL';\n    }\n  | {\n      type: 'SET_SPEED';\n      payload: { speed: playerConfig['speed'] };\n    };\n\nexport type SpeedState =\n  | {\n      value: 'normal';\n      context: SpeedContext;\n    }\n  | {\n      value: 'skipping';\n      context: SpeedContext;\n    };\n\nexport function createSpeedService(context: SpeedContext) {\n  const speedMachine = createMachine<SpeedContext, SpeedEvent, SpeedState>(\n    {\n      id: 'speed',\n      context,\n      initial: 'normal',\n      states: {\n        normal: {\n          on: {\n            FAST_FORWARD: {\n              target: 'skipping',\n              actions: ['recordSpeed', 'setSpeed'],\n            },\n            SET_SPEED: {\n              target: 'normal',\n              actions: ['setSpeed'],\n            },\n          },\n        },\n        skipping: {\n          on: {\n            BACK_TO_NORMAL: {\n              target: 'normal',\n              actions: ['restoreSpeed'],\n            },\n            SET_SPEED: {\n              target: 'normal',\n              actions: ['setSpeed'],\n            },\n          },\n        },\n      },\n    },\n    {\n      actions: {\n        setSpeed: (ctx, event) => {\n          if ('payload' in event) {\n            ctx.timer.setSpeed(event.payload.speed);\n          }\n        },\n        recordSpeed: assign({\n          normalSpeed: (ctx) => ctx.timer.speed,\n        }),\n        restoreSpeed: (ctx) => {\n          ctx.timer.setSpeed(ctx.normalSpeed);\n        },\n      },\n    },\n  );\n\n  return interpret(speedMachine);\n}\n\nexport type PlayerMachineState = StateMachine.State<\n  PlayerContext,\n  PlayerEvent,\n  PlayerState\n>;\n\nexport type SpeedMachineState = StateMachine.State<\n  SpeedContext,\n  SpeedEvent,\n  SpeedState\n>;\n", "const rules: (blockClass: string) => string[] = (blockClass: string) => [\n  `.${blockClass} { background: currentColor }`,\n  'noscript { display: none !important; }',\n];\n\nexport default rules;\n", "import { decode } from 'base64-arraybuffer';\nimport type { Replayer } from '../';\nimport type { CanvasArg, SerializedCanvasArg } from '@rrweb/types';\n\n// TODO: add ability to wipe this list\ntype GLVarMap = Map<string, any[]>;\nconst webGLVarMap: Map<\n  CanvasRenderingContext2D | WebGLRenderingContext | WebGL2RenderingContext,\n  GLVarMap\n> = new Map();\nexport function variableListFor(\n  ctx:\n    | CanvasRenderingContext2D\n    | WebGLRenderingContext\n    | WebGL2RenderingContext,\n  ctor: string,\n) {\n  let contextMap = webGLVarMap.get(ctx);\n  if (!contextMap) {\n    contextMap = new Map();\n    webGLVarMap.set(ctx, contextMap);\n  }\n  if (!contextMap.has(ctor)) {\n    contextMap.set(ctor, []);\n  }\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n  return contextMap.get(ctor) as any[];\n}\n\nexport function isSerializedArg(arg: unknown): arg is SerializedCanvasArg {\n  return Boolean(arg && typeof arg === 'object' && 'rr_type' in arg);\n}\n\nexport function deserializeArg(\n  imageMap: Replayer['imageMap'],\n  ctx:\n    | CanvasRenderingContext2D\n    | WebGLRenderingContext\n    | WebGL2RenderingContext\n    | null,\n  preload?: {\n    isUnchanged: boolean;\n  },\n): (arg: CanvasArg) => Promise<any> {\n  return async (arg: CanvasArg): Promise<any> => {\n    if (arg && typeof arg === 'object' && 'rr_type' in arg) {\n      if (preload) preload.isUnchanged = false;\n      if (arg.rr_type === 'ImageBitmap' && 'args' in arg) {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        const args = await deserializeArg(imageMap, ctx, preload)(arg.args);\n        // eslint-disable-next-line prefer-spread\n        return await createImageBitmap.apply(null, args);\n      } else if ('index' in arg) {\n        if (preload || ctx === null) return arg; // we are preloading, ctx is unknown\n        const { rr_type: name, index } = arg;\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n        return variableListFor(ctx, name)[index];\n      } else if ('args' in arg) {\n        const { rr_type: name, args } = arg;\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n        const ctor = window[name as keyof Window];\n\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n        return new ctor(\n          ...(await Promise.all(\n            args.map(deserializeArg(imageMap, ctx, preload)),\n          )),\n        );\n      } else if ('base64' in arg) {\n        return decode(arg.base64);\n      } else if ('src' in arg) {\n        const image = imageMap.get(arg.src);\n        if (image) {\n          return image;\n        } else {\n          const image = new Image();\n          image.src = arg.src;\n          imageMap.set(arg.src, image);\n          return image;\n        }\n      } else if ('data' in arg && arg.rr_type === 'Blob') {\n        const blobContents = await Promise.all(\n          arg.data.map(deserializeArg(imageMap, ctx, preload)),\n        );\n        const blob = new Blob(blobContents, {\n          type: arg.type,\n        });\n        return blob;\n      }\n    } else if (Array.isArray(arg)) {\n      const result = await Promise.all(\n        arg.map(deserializeArg(imageMap, ctx, preload)),\n      );\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n      return result;\n    }\n    return arg;\n  };\n}\n", "import type { Replayer } from '../';\nimport { CanvasContext, type canvasMutationCommand } from '@rrweb/types';\nimport { deserializeArg, variableListFor } from './deserialize-args';\n\nfunction getContext(\n  target: HTMLCanvasElement,\n  type: CanvasContext,\n): WebGLRenderingContext | WebGL2RenderingContext | null {\n  // Note to whomever is going to implement support for `contextAttributes`:\n  // if `preserveDrawingBuffer` is set to true,\n  // you might have to do `ctx.flush()` before every webgl canvas event\n  try {\n    if (type === CanvasContext.WebGL) {\n      return (\n        target.getContext('webgl')! || target.getContext('experimental-webgl')\n      );\n    }\n    return target.getContext('webgl2')!;\n  } catch (e) {\n    return null;\n  }\n}\n\nconst WebGLVariableConstructorsNames = [\n  'WebGLActiveInfo',\n  'WebGLBuffer',\n  'WebGLFramebuffer',\n  'WebGLProgram',\n  'WebGLRenderbuffer',\n  'WebGLShader',\n  'WebGLShaderPrecisionFormat',\n  'WebGLTexture',\n  'WebGLUniformLocation',\n  'WebGLVertexArrayObject',\n];\n\nfunction saveToWebGLVarMap(\n  ctx: WebGLRenderingContext | WebGL2RenderingContext,\n  result: any,\n) {\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n  if (!result?.constructor) return; // probably null or undefined\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n  const { name } = result.constructor;\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n  if (!WebGLVariableConstructorsNames.includes(name)) return; // not a WebGL variable\n\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n  const variables = variableListFor(ctx, name);\n  if (!variables.includes(result)) variables.push(result);\n}\n\nexport default async function webglMutation({\n  mutation,\n  target,\n  type,\n  imageMap,\n  errorHandler,\n}: {\n  mutation: canvasMutationCommand;\n  target: HTMLCanvasElement;\n  type: CanvasContext;\n  imageMap: Replayer['imageMap'];\n  errorHandler: Replayer['warnCanvasMutationFailed'];\n}): Promise<void> {\n  try {\n    const ctx = getContext(target, type);\n    if (!ctx) return;\n\n    // NOTE: if `preserveDrawingBuffer` is set to true,\n    // we must flush the buffers on every new canvas event\n    // if (mutation.newFrame) ctx.flush();\n\n    if (mutation.setter) {\n      // skip some read-only type checks\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n      (ctx as any)[mutation.property] = mutation.args[0];\n      return;\n    }\n    const original = ctx[\n      mutation.property as Exclude<keyof typeof ctx, 'canvas'>\n    ] as (\n      ctx: WebGLRenderingContext | WebGL2RenderingContext,\n      args: unknown[],\n    ) => void;\n\n    const args = await Promise.all(\n      mutation.args.map(deserializeArg(imageMap, ctx)),\n    );\n    const result = original.apply(ctx, args);\n    saveToWebGLVarMap(ctx, result);\n\n    // Slows down replay considerably, only use for debugging\n    const debugMode = false;\n    if (debugMode) {\n      if (mutation.property === 'compileShader') {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n        if (!ctx.getShaderParameter(args[0], ctx.COMPILE_STATUS))\n          console.warn(\n            'something went wrong in replay',\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n            ctx.getShaderInfoLog(args[0]),\n          );\n      } else if (mutation.property === 'linkProgram') {\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n        ctx.validateProgram(args[0]);\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n        if (!ctx.getProgramParameter(args[0], ctx.LINK_STATUS))\n          console.warn(\n            'something went wrong in replay',\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n            ctx.getProgramInfoLog(args[0]),\n          );\n      }\n      const webglError = ctx.getError();\n      if (webglError !== ctx.NO_ERROR) {\n        console.warn(\n          'WEBGL ERROR',\n          webglError,\n          'on command:',\n          mutation.property,\n          // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n          ...args,\n        );\n      }\n    }\n  } catch (error) {\n    errorHandler(mutation, error);\n  }\n}\n", "import type { Replayer } from '../';\nimport type { canvasMutationCommand } from '@rrweb/types';\nimport { deserializeArg } from './deserialize-args';\n\nexport default async function canvasMutation({\n  event,\n  mutations,\n  target,\n  imageMap,\n  errorHandler,\n}: {\n  event: Parameters<Replayer['applyIncremental']>[0];\n  mutations: canvasMutationCommand[];\n  target: HTMLCanvasElement;\n  imageMap: Replayer['imageMap'];\n  errorHandler: Replayer['warnCanvasMutationFailed'];\n}): Promise<void> {\n  const ctx = target.getContext('2d');\n\n  if (!ctx) {\n    errorHandler(mutations[0], new Error('Canvas context is null'));\n    return;\n  }\n\n  // step 1, deserialize args, they may be async\n  const mutationArgsPromises = mutations.map(\n    async (mutation: canvasMutationCommand): Promise<unknown[]> => {\n      return Promise.all(mutation.args.map(deserializeArg(imageMap, ctx)));\n    },\n  );\n  const args = await Promise.all(mutationArgsPromises);\n  // step 2 apply all mutations\n  args.forEach((args, index) => {\n    const mutation = mutations[index];\n    try {\n      if (mutation.setter) {\n        // skip some read-only type checks\n        (ctx as unknown as Record<string, unknown>)[mutation.property] =\n          mutation.args[0];\n        return;\n      }\n      const original = ctx[\n        mutation.property as Exclude<keyof typeof ctx, 'canvas'>\n      ] as (ctx: CanvasRenderingContext2D, args: unknown[]) => void;\n\n      /**\n       * We have serialized the image source into base64 string during recording,\n       * which has been preloaded before replay.\n       * So we can get call drawImage SYNCHRONOUSLY which avoid some fragile cast.\n       */\n      if (\n        mutation.property === 'drawImage' &&\n        typeof mutation.args[0] === 'string'\n      ) {\n        imageMap.get(event);\n        original.apply(ctx, mutation.args);\n      } else {\n        original.apply(ctx, args);\n      }\n    } catch (error) {\n      errorHandler(mutation, error);\n    }\n\n    return;\n  });\n}\n", "import type { Replayer } from '..';\nimport {\n  CanvasContext,\n  type canvasMutationCommand,\n  type canvasMutationData,\n  type canvasMutationParam,\n} from '@rrweb/types';\nimport webglMutation from './webgl';\nimport canvas2DMutation from './2d';\n\nexport default async function canvasMutation({\n  event,\n  mutation,\n  target,\n  imageMap,\n  canvasEventMap,\n  errorHandler,\n}: {\n  event: Parameters<Replayer['applyIncremental']>[0];\n  mutation: canvasMutationData;\n  target: HTMLCanvasElement;\n  imageMap: Replayer['imageMap'];\n  canvasEventMap: Replayer['canvasEventMap'];\n  errorHandler: Replayer['warnCanvasMutationFailed'];\n}): Promise<void> {\n  try {\n    const precomputedMutation: canvasMutationParam =\n      canvasEventMap.get(event) || mutation;\n\n    const commands: canvasMutationCommand[] =\n      'commands' in precomputedMutation\n        ? precomputedMutation.commands\n        : [precomputedMutation];\n\n    if ([CanvasContext.WebGL, CanvasContext.WebGL2].includes(mutation.type)) {\n      for (let i = 0; i < commands.length; i++) {\n        const command = commands[i];\n        await webglMutation({\n          mutation: command,\n          type: mutation.type,\n          target,\n          imageMap,\n          errorHandler,\n        });\n      }\n      return;\n    }\n    // default is '2d' for backwards compatibility (rrweb below 1.1.x)\n    await canvas2DMutation({\n      event,\n      mutations: commands,\n      target,\n      imageMap,\n      errorHandler,\n    });\n  } catch (error) {\n    errorHandler(mutation, error);\n  }\n}\n", "import type { Emitter } from '@rrweb/types';\nimport { MediaInteractions, ReplayerEvents } from '@rrweb/types';\nimport type { RRMediaElement } from 'rrdom';\nimport type { createPlayerService, createSpeedService } from '../machine';\nimport type { Mirror } from 'rrweb-snapshot';\nimport type { mediaInteractionData, mediaAttributes } from '@rrweb/types';\n\ntype MediaState = {\n  isPlaying: boolean;\n  currentTimeAtLastInteraction: number;\n  lastInteractionTimeOffset: number;\n  playbackRate: number;\n  loop: boolean;\n  volume: number;\n  muted: boolean;\n};\n\nexport class MediaManager {\n  private mediaMap: Map<HTMLMediaElement | RRMediaElement, MediaState> =\n    new Map();\n  private warn: (...args: Parameters<typeof console.warn>) => void;\n  private service: ReturnType<typeof createPlayerService>;\n  private speedService: ReturnType<typeof createSpeedService>;\n  private emitter: Emitter;\n  private getCurrentTime: () => number;\n  private metadataCallbackMap: WeakMap<\n    HTMLMediaElement | RRMediaElement,\n    () => void\n  > = new Map();\n\n  constructor(options: {\n    warn: (...args: Parameters<typeof console.warn>) => void;\n    service: ReturnType<typeof createPlayerService>;\n    speedService: ReturnType<typeof createSpeedService>;\n    getCurrentTime: () => number;\n    emitter: Emitter;\n  }) {\n    this.warn = options.warn;\n    this.service = options.service;\n    this.speedService = options.speedService;\n    this.emitter = options.emitter;\n    this.getCurrentTime = options.getCurrentTime;\n\n    this.emitter.on(ReplayerEvents.Start, this.start.bind(this));\n    this.emitter.on(ReplayerEvents.SkipStart, this.start.bind(this));\n    this.emitter.on(ReplayerEvents.Pause, this.pause.bind(this));\n    this.emitter.on(ReplayerEvents.Finish, this.pause.bind(this));\n    this.speedService.subscribe(() => {\n      this.syncAllMediaElements();\n    });\n  }\n\n  private syncAllMediaElements(options = { pause: false }) {\n    this.mediaMap.forEach((_mediaState, target) => {\n      this.syncTargetWithState(target);\n      if (options.pause) {\n        try {\n          target.pause();\n        } catch (error) {\n          this.warn(\n            // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions\n            `Failed to sync media element: ${error.message || error}`,\n          );\n        }\n      }\n    });\n  }\n\n  private start() {\n    this.syncAllMediaElements();\n  }\n\n  private pause() {\n    this.syncAllMediaElements({ pause: true });\n  }\n\n  private seekTo({\n    time,\n    target,\n    mediaState,\n  }: {\n    time: number;\n    target: HTMLMediaElement | RRMediaElement;\n    mediaState: MediaState;\n  }) {\n    if (mediaState.isPlaying) {\n      const differenceBetweenCurrentTimeAndMediaMutationTimestamp =\n        time - mediaState.lastInteractionTimeOffset;\n      const mediaPlaybackOffset =\n        (differenceBetweenCurrentTimeAndMediaMutationTimestamp / 1000) *\n        mediaState.playbackRate;\n\n      const duration = 'duration' in target && target.duration;\n\n      // Video hasn't loaded yet, wait for metadata\n      if (Number.isNaN(duration)) {\n        this.waitForMetadata(target);\n        return;\n      }\n\n      let seekToTime =\n        mediaState.currentTimeAtLastInteraction + mediaPlaybackOffset;\n\n      if (\n        target.loop &&\n        // RRMediaElement doesn't have a duration property\n        duration !== false\n      ) {\n        seekToTime = seekToTime % duration;\n      }\n\n      target.currentTime = seekToTime;\n    } else {\n      try {\n        target.pause();\n      } catch (error) {\n        this.warn(\n          // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions\n          `Failed to pause during seek: ${error.message || error}`,\n        );\n      }\n      target.currentTime = mediaState.currentTimeAtLastInteraction;\n    }\n  }\n\n  private waitForMetadata(target: HTMLMediaElement | RRMediaElement) {\n    if (this.metadataCallbackMap.has(target)) return;\n    if (!('addEventListener' in target)) return;\n\n    const onLoadedMetadata = () => {\n      this.metadataCallbackMap.delete(target);\n      const mediaState = this.mediaMap.get(target);\n      if (!mediaState) return;\n      this.seekTo({\n        time: this.getCurrentTime(),\n        target,\n        mediaState,\n      });\n    };\n\n    this.metadataCallbackMap.set(target, onLoadedMetadata);\n    target.addEventListener('loadedmetadata', onLoadedMetadata, {\n      once: true,\n    });\n  }\n\n  private getMediaStateFromMutation({\n    target,\n    timeOffset,\n    mutation,\n  }: {\n    target: HTMLMediaElement | RRMediaElement;\n    timeOffset: number;\n    mutation: mediaInteractionData;\n  }): MediaState {\n    const lastState = this.mediaMap.get(target);\n    const { type, playbackRate, currentTime, muted, volume, loop } = mutation;\n\n    const isPlaying =\n      type === MediaInteractions.Play ||\n      (type !== MediaInteractions.Pause &&\n        (lastState?.isPlaying || target.getAttribute('autoplay') !== null));\n\n    const mediaState: MediaState = {\n      isPlaying,\n      currentTimeAtLastInteraction:\n        currentTime ?? lastState?.currentTimeAtLastInteraction ?? 0,\n      lastInteractionTimeOffset: timeOffset,\n      playbackRate: playbackRate ?? lastState?.playbackRate ?? 1,\n      volume: volume ?? lastState?.volume ?? 1,\n      muted: muted ?? lastState?.muted ?? target.getAttribute('muted') === null,\n      loop: loop ?? lastState?.loop ?? target.getAttribute('loop') === null,\n    };\n\n    return mediaState;\n  }\n\n  private syncTargetWithState(target: HTMLMediaElement | RRMediaElement) {\n    const mediaState = this.mediaMap.get(target);\n    if (!mediaState) return;\n    const { muted, loop, volume, isPlaying } = mediaState;\n    const playerIsPaused = this.service.state.matches('paused');\n    const playbackRate =\n      mediaState.playbackRate * this.speedService.state.context.timer.speed;\n\n    try {\n      this.seekTo({\n        time: this.getCurrentTime(),\n        target,\n        mediaState,\n      });\n\n      if (target.volume !== volume) {\n        target.volume = volume;\n      }\n      target.muted = muted;\n      target.loop = loop;\n\n      if (target.playbackRate !== playbackRate) {\n        // Avoid setting playbackRate when it's already the same\n        // Safari drops frames whenever playbackRate is set, even if it's the same\n        target.playbackRate = playbackRate;\n      }\n\n      if (isPlaying && !playerIsPaused) {\n        // remove listener for 'canplay' event because play() is async and returns a promise\n        // i.e. media will eventually start to play when data is loaded\n        // 'canplay' event fires even when currentTime attribute changes which may lead to\n        // unexpected behavior\n        void target.play();\n      } else {\n        target.pause();\n      }\n    } catch (error) {\n      this.warn(\n        // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions\n        `Failed to replay media interactions: ${error.message || error}`,\n      );\n    }\n  }\n\n  public addMediaElements(node: Node, timeOffset: number, mirror: Mirror) {\n    if (!['AUDIO', 'VIDEO'].includes(node.nodeName)) return;\n    const target = node as HTMLMediaElement;\n    const serializedNode = mirror.getMeta(target);\n    if (!serializedNode || !('attributes' in serializedNode)) return;\n    const playerIsPaused = this.service.state.matches('paused');\n    const mediaAttributes = serializedNode.attributes as\n      | mediaAttributes\n      | Record<string, never>;\n\n    let isPlaying = false;\n    if (mediaAttributes.rr_mediaState) {\n      isPlaying = mediaAttributes.rr_mediaState === 'played';\n    } else {\n      isPlaying = target.getAttribute('autoplay') !== null;\n    }\n    if (isPlaying && playerIsPaused) target.pause();\n\n    let playbackRate = 1;\n    if (typeof mediaAttributes.rr_mediaPlaybackRate === 'number') {\n      playbackRate = mediaAttributes.rr_mediaPlaybackRate;\n    }\n\n    let muted = false;\n    if (typeof mediaAttributes.rr_mediaMuted === 'boolean') {\n      muted = mediaAttributes.rr_mediaMuted;\n    } else {\n      muted = target.getAttribute('muted') !== null;\n    }\n\n    let loop = false;\n    if (typeof mediaAttributes.rr_mediaLoop === 'boolean') {\n      loop = mediaAttributes.rr_mediaLoop;\n    } else {\n      loop = target.getAttribute('loop') !== null;\n    }\n\n    let volume = 1;\n    if (typeof mediaAttributes.rr_mediaVolume === 'number') {\n      volume = mediaAttributes.rr_mediaVolume;\n    }\n\n    let currentTimeAtLastInteraction = 0;\n    if (typeof mediaAttributes.rr_mediaCurrentTime === 'number') {\n      currentTimeAtLastInteraction = mediaAttributes.rr_mediaCurrentTime;\n    }\n\n    this.mediaMap.set(target, {\n      isPlaying,\n      currentTimeAtLastInteraction,\n      lastInteractionTimeOffset: timeOffset,\n      playbackRate,\n      volume,\n      muted,\n      loop,\n    });\n    this.syncTargetWithState(target);\n  }\n\n  public mediaMutation({\n    target,\n    timeOffset,\n    mutation,\n  }: {\n    target: HTMLMediaElement | RRMediaElement;\n    timeOffset: number;\n    mutation: mediaInteractionData;\n  }) {\n    this.mediaMap.set(\n      target,\n      this.getMediaStateFromMutation({\n        target,\n        timeOffset,\n        mutation,\n      }),\n    );\n\n    this.syncTargetWithState(target);\n  }\n\n  public isSupportedMediaElement(node: Node): node is HTMLMediaElement {\n    return ['AUDIO', 'VIDEO'].includes(node.nodeName);\n  }\n\n  public reset() {\n    this.mediaMap.clear();\n  }\n}\n", "import type { attributeMutation } from '@rrweb/types';\nimport { RRNode } from 'rrdom';\n\n/**\n * Checks if the dialog is a top level dialog and applies the dialog to the top level\n * @param node - potential dialog element to apply top level `showModal()` to, or other node (which will be ignored)\n * @param attributeMutation - the attribute mutation used to change the dialog (optional)\n * @returns void\n */\nexport function applyDialogToTopLevel(\n  node: HTMLDialogElement | Node | RRNode,\n  attributeMutation?: attributeMutation,\n): void {\n  if (node.nodeName !== 'DIALOG' || node instanceof RRNode) return;\n  const dialog = node as HTMLDialogElement;\n  const oldIsOpen = dialog.open;\n  const oldIsModalState = oldIsOpen && dialog.matches('dialog:modal');\n  const rrOpenMode = dialog.getAttribute('rr_open_mode');\n\n  const newIsOpen =\n    typeof attributeMutation?.attributes.open === 'string' ||\n    typeof dialog.getAttribute('open') === 'string';\n  const newIsModalState = rrOpenMode === 'modal';\n  const newIsNonModalState = rrOpenMode === 'non-modal';\n\n  const modalStateChanged =\n    (oldIsModalState && newIsNonModalState) ||\n    (!oldIsModalState && newIsModalState);\n\n  if (oldIsOpen && !modalStateChanged) return;\n  // complain if dialog is not attached to the dom\n  if (!dialog.isConnected) {\n    console.warn('dialog is not attached to the dom', dialog);\n    return;\n  }\n\n  if (oldIsOpen) dialog.close();\n  if (!newIsOpen) return;\n\n  if (newIsModalState) dialog.showModal();\n  else dialog.show();\n}\n\n/**\n * Check if the dialog is a top level dialog and removes the dialog from the top level if necessary\n * @param node - potential dialog element to remove from top level, or other node (which will be ignored)\n * @param attributeMutation - the attribute mutation used to change the dialog\n * @returns void\n */\nexport function removeDialogFromTopLevel(\n  node: HTMLDialogElement | Node | RRNode,\n  attributeMutation: attributeMutation,\n): void {\n  if (node.nodeName !== 'DIALOG' || node instanceof RRNode) return;\n  const dialog = node as HTMLDialogElement;\n\n  // complain if dialog is not attached to the dom\n  if (!dialog.isConnected) {\n    console.warn('dialog is not attached to the dom', dialog);\n    return;\n  }\n\n  if (attributeMutation.attributes.open === null) {\n    dialog.removeAttribute('open');\n    dialog.removeAttribute('rr_open_mode');\n  }\n}\n", "import {\n  rebuild,\n  adaptCssForReplay,\n  buildNodeWithSN,\n  type BuildCache,\n  createCache,\n  createSandboxedIframe,\n  Mirror,\n  createMirror,\n  toLowerCase,\n} from 'rrweb-snapshot';\nimport {\n  RRDocument,\n  createOrGetNode,\n  buildFromNode,\n  buildFromDom,\n  diff,\n  getDefaultSN,\n} from 'rrdom';\nimport type {\n  RRNode,\n  RRElement,\n  RRStyleElement,\n  RRIFrameElement,\n  RRMediaElement,\n  RRCanvasElement,\n  ReplayerHandler,\n  Mirror as RRDOMMirror,\n} from 'rrdom';\nimport * as mittProxy from 'mitt';\nimport { polyfill as smoothscrollPolyfill } from './smoothscroll';\nimport { Timer } from './timer';\nimport {\n  createPlayerService,\n  createSpeedService,\n  type PlayerMachineState,\n  type SpeedMachineState,\n} from './machine';\nimport type { playerConfig, missingNodeMap } from '../types';\nimport {\n  NodeType,\n  EventType,\n  IncrementalSource,\n  MouseInteractions,\n  ReplayerEvents,\n} from '@rrweb/types';\nimport type {\n  attributes,\n  fullSnapshotEvent,\n  eventWithTime,\n  playerMetaData,\n  viewportResizeDimension,\n  addedNodeMutation,\n  incrementalSnapshotEvent,\n  incrementalData,\n  Handler,\n  Emitter,\n  metaEvent,\n  mutationData,\n  scrollData,\n  inputData,\n  canvasMutationData,\n  styleValueWithPriority,\n  mouseMovePos,\n  IWindow,\n  canvasMutationCommand,\n  canvasMutationParam,\n  canvasEventWithTime,\n  selectionData,\n  styleSheetRuleData,\n  styleDeclarationData,\n  adoptedStyleSheetData,\n  serializedElementNodeWithId,\n} from '@rrweb/types';\nimport {\n  polyfill,\n  queueToResolveTrees,\n  iterateResolveTree,\n  type AppendedIframe,\n  getBaseDimension,\n  hasShadowRoot,\n  isSerializedIframe,\n  getNestedRule,\n  getPositionsAndIndex,\n  uniqueTextMutations,\n  StyleSheetMirror,\n} from '../utils';\nimport getInjectStyleRules from './styles/inject-style';\nimport './styles/style.css';\nimport canvasMutation from './canvas';\nimport { deserializeArg } from './canvas/deserialize-args';\nimport { MediaManager } from './media';\nimport { applyDialogToTopLevel, removeDialogFromTopLevel } from './dialog';\n\nconst SKIP_TIME_INTERVAL = 5 * 1000;\n\n// https://github.com/rollup/rollup/issues/1267#issuecomment-296395734\nconst mitt = mittProxy.default || mittProxy;\n\nconst REPLAY_CONSOLE_PREFIX = '[replayer]';\n\nconst defaultMouseTailConfig = {\n  duration: 500,\n  lineCap: 'round',\n  lineWidth: 3,\n  strokeStyle: 'red',\n} as const;\n\nfunction indicatesTouchDevice(e: eventWithTime) {\n  return (\n    e.type == EventType.IncrementalSnapshot &&\n    (e.data.source == IncrementalSource.TouchMove ||\n      (e.data.source == IncrementalSource.MouseInteraction &&\n        e.data.type == MouseInteractions.TouchStart))\n  );\n}\n\nexport class Replayer {\n  public wrapper: HTMLDivElement;\n  public iframe: HTMLIFrameElement;\n  private UNSAFE_replayCanvas = false;\n\n  public service: ReturnType<typeof createPlayerService>;\n  public speedService: ReturnType<typeof createSpeedService>;\n  public get timer() {\n    return this.service.state.context.timer;\n  }\n\n  public config: playerConfig;\n\n  // In the fast-forward process, if the virtual-dom optimization is used, this flag value is true.\n  public usingVirtualDom = false;\n  public virtualDom: RRDocument = new RRDocument();\n\n  private mouse: HTMLDivElement;\n  private mouseTail: HTMLCanvasElement | null = null;\n  private tailPositions: Array<{ x: number; y: number }> = [];\n\n  private emitter: Emitter = mitt();\n\n  private nextUserInteractionEvent: eventWithTime | null;\n\n  private legacy_missingNodeRetryMap: missingNodeMap = {};\n\n  // The replayer uses the cache to speed up replay and scrubbing.\n  private cache: BuildCache = createCache();\n\n  private imageMap: Map<eventWithTime | string, HTMLImageElement> = new Map();\n  private canvasEventMap: Map<eventWithTime, canvasMutationParam> = new Map();\n\n  private mirror: Mirror = createMirror();\n\n  // Used to track StyleSheetObjects adopted on multiple document hosts.\n  private styleMirror: StyleSheetMirror = new StyleSheetMirror();\n\n  // Used to track video & audio elements, and keep them in sync with general playback.\n  private mediaManager: MediaManager;\n\n  private firstFullSnapshot: eventWithTime | true | null = null;\n\n  private newDocumentQueue: addedNodeMutation[] = [];\n\n  private mousePos: mouseMovePos | null = null;\n  private touchActive: boolean | null = null;\n  private lastMouseDownEvent: [Node, Event] | null = null;\n\n  // Keep the rootNode of the last hovered element. So  when hovering a new element, we can remove the last hovered element's :hover style.\n  private lastHoveredRootNode: Document | ShadowRoot;\n\n  // In the fast-forward mode, only the last selection data needs to be applied.\n  private lastSelectionData: selectionData | null = null;\n\n  // In the fast-forward mode using VirtualDom optimization, all stylesheetRule, and styleDeclaration events on constructed StyleSheets will be delayed to get applied until the flush stage.\n  private constructedStyleMutations: (\n    | styleSheetRuleData\n    | styleDeclarationData\n  )[] = [];\n\n  // Similar to the reason for constructedStyleMutations.\n  private adoptedStyleSheets: adoptedStyleSheetData[] = [];\n\n  constructor(\n    events: Array<eventWithTime | string>,\n    config?: Partial<playerConfig>,\n  ) {\n    if (!config?.liveMode && events.length < 2) {\n      throw new Error('Replayer need at least 2 events.');\n    }\n    const defaultConfig: playerConfig = {\n      speed: 1,\n      maxSpeed: 360,\n      root: document.body,\n      loadTimeout: 0,\n      skipInactive: false,\n      inactivePeriodThreshold: 10 * 1000,\n      showWarning: true,\n      showDebug: false,\n      blockClass: 'rr-block',\n      liveMode: false,\n      insertStyleRules: [],\n      triggerFocus: true,\n      UNSAFE_replayCanvas: false,\n      pauseAnimation: true,\n      mouseTail: defaultMouseTailConfig,\n      useVirtualDom: true, // Virtual-dom optimization is enabled by default.\n      logger: console,\n    };\n    this.config = Object.assign({}, defaultConfig, config);\n\n    this.handleResize = this.handleResize.bind(this);\n    this.getCastFn = this.getCastFn.bind(this);\n    this.applyEventsSynchronously = this.applyEventsSynchronously.bind(this);\n    this.emitter.on(ReplayerEvents.Resize, this.handleResize as Handler);\n\n    this.setupDom();\n\n    /**\n     * Exposes mirror to the plugins\n     */\n    for (const plugin of this.config.plugins || []) {\n      if (plugin.getMirror) plugin.getMirror({ nodeMirror: this.mirror });\n    }\n\n    this.emitter.on(ReplayerEvents.Flush, () => {\n      if (this.usingVirtualDom) {\n        const replayerHandler: ReplayerHandler = {\n          mirror: this.mirror,\n          applyCanvas: (\n            canvasEvent: canvasEventWithTime,\n            canvasMutationData: canvasMutationData,\n            target: HTMLCanvasElement,\n          ) => {\n            void canvasMutation({\n              event: canvasEvent,\n              mutation: canvasMutationData,\n              target,\n              imageMap: this.imageMap,\n              canvasEventMap: this.canvasEventMap,\n              errorHandler: this.warnCanvasMutationFailed.bind(this),\n            });\n          },\n          applyInput: this.applyInput.bind(this),\n          applyScroll: this.applyScroll.bind(this),\n          applyStyleSheetMutation: (\n            data: styleDeclarationData | styleSheetRuleData,\n            styleSheet: CSSStyleSheet,\n          ) => {\n            if (data.source === IncrementalSource.StyleSheetRule)\n              this.applyStyleSheetRule(data, styleSheet);\n            else if (data.source === IncrementalSource.StyleDeclaration)\n              this.applyStyleDeclaration(data, styleSheet);\n          },\n          afterAppend: (node: Node, id: number) => {\n            for (const plugin of this.config.plugins || []) {\n              if (plugin.onBuild) plugin.onBuild(node, { id, replayer: this });\n            }\n          },\n        };\n        if (this.iframe.contentDocument)\n          try {\n            diff(\n              this.iframe.contentDocument,\n              this.virtualDom,\n              replayerHandler,\n              this.virtualDom.mirror,\n            );\n          } catch (e) {\n            this.warn(e);\n          }\n\n        this.virtualDom.destroyTree();\n        this.usingVirtualDom = false;\n\n        // If these legacy missing nodes haven't been resolved, they should be converted to real Nodes.\n        if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n          for (const key in this.legacy_missingNodeRetryMap) {\n            try {\n              const value = this.legacy_missingNodeRetryMap[key];\n              const realNode = createOrGetNode(\n                value.node as RRNode,\n                this.mirror,\n                this.virtualDom.mirror,\n              );\n              diff(\n                realNode,\n                value.node as RRNode,\n                replayerHandler,\n                this.virtualDom.mirror,\n              );\n              value.node = realNode;\n            } catch (error) {\n              this.warn(error);\n            }\n          }\n        }\n\n        this.constructedStyleMutations.forEach((data) => {\n          this.applyStyleSheetMutation(data);\n        });\n        this.constructedStyleMutations = [];\n\n        this.adoptedStyleSheets.forEach((data) => {\n          this.applyAdoptedStyleSheet(data);\n        });\n        this.adoptedStyleSheets = [];\n      }\n\n      if (this.mousePos) {\n        this.moveAndHover(\n          this.mousePos.x,\n          this.mousePos.y,\n          this.mousePos.id,\n          true,\n          this.mousePos.debugData,\n        );\n        this.mousePos = null;\n      }\n\n      if (this.touchActive === true) {\n        this.mouse.classList.add('touch-active');\n      } else if (this.touchActive === false) {\n        this.mouse.classList.remove('touch-active');\n      }\n      this.touchActive = null;\n\n      if (this.lastMouseDownEvent) {\n        const [target, event] = this.lastMouseDownEvent;\n        target.dispatchEvent(event);\n      }\n      this.lastMouseDownEvent = null;\n\n      if (this.lastSelectionData) {\n        this.applySelection(this.lastSelectionData);\n        this.lastSelectionData = null;\n      }\n    });\n    this.emitter.on(ReplayerEvents.PlayBack, () => {\n      this.firstFullSnapshot = null;\n      this.mirror.reset();\n      this.styleMirror.reset();\n      this.mediaManager.reset();\n    });\n\n    const timer = new Timer([], {\n      speed: this.config.speed,\n    });\n    this.service = createPlayerService(\n      {\n        events: events\n          .map((e) => {\n            if (config && config.unpackFn) {\n              return config.unpackFn(e as string);\n            }\n            return e as eventWithTime;\n          })\n          .sort((a1, a2) => a1.timestamp - a2.timestamp),\n        timer,\n        timeOffset: 0,\n        baselineTime: 0,\n        lastPlayedEvent: null,\n      },\n      {\n        getCastFn: this.getCastFn,\n        applyEventsSynchronously: this.applyEventsSynchronously,\n        emitter: this.emitter,\n      },\n    );\n    this.service.start();\n    this.service.subscribe((state) => {\n      this.emitter.emit(ReplayerEvents.StateChange, {\n        player: state,\n      });\n    });\n    this.speedService = createSpeedService({\n      normalSpeed: -1,\n      timer,\n    });\n    this.speedService.start();\n    this.speedService.subscribe((state) => {\n      this.emitter.emit(ReplayerEvents.StateChange, {\n        speed: state,\n      });\n    });\n    this.mediaManager = new MediaManager({\n      warn: this.warn.bind(this),\n      service: this.service,\n      speedService: this.speedService,\n      emitter: this.emitter,\n      getCurrentTime: this.getCurrentTime.bind(this),\n    });\n\n    // rebuild first full snapshot as the poster of the player\n    // maybe we can cache it for performance optimization\n    const firstMeta = this.service.state.context.events.find(\n      (e) => e.type === EventType.Meta,\n    );\n    const firstFullsnapshot = this.service.state.context.events.find(\n      (e) => e.type === EventType.FullSnapshot,\n    );\n    if (firstMeta) {\n      const { width, height } = firstMeta.data as metaEvent['data'];\n      setTimeout(() => {\n        this.emitter.emit(ReplayerEvents.Resize, {\n          width,\n          height,\n        });\n      }, 0);\n    }\n    if (firstFullsnapshot) {\n      setTimeout(() => {\n        // when something has been played, there is no need to rebuild poster\n        if (this.firstFullSnapshot) {\n          // true if any other fullSnapshot has been executed by Timer already\n          return;\n        }\n        this.firstFullSnapshot = firstFullsnapshot;\n        this.rebuildFullSnapshot(\n          firstFullsnapshot as fullSnapshotEvent & { timestamp: number },\n        );\n        this.iframe.contentWindow?.scrollTo(\n          (firstFullsnapshot as fullSnapshotEvent).data.initialOffset,\n        );\n      }, 1);\n    }\n    if (this.service.state.context.events.find(indicatesTouchDevice)) {\n      this.mouse.classList.add('touch-device');\n    }\n  }\n\n  public on(event: string, handler: Handler) {\n    this.emitter.on(event, handler);\n    return this;\n  }\n\n  public off(event: string, handler: Handler) {\n    this.emitter.off(event, handler);\n    return this;\n  }\n\n  public setConfig(config: Partial<playerConfig>) {\n    Object.keys(config).forEach((key) => {\n      const newConfigValue = config[key as keyof playerConfig];\n      (this.config as Record<keyof playerConfig, typeof newConfigValue>)[\n        key as keyof playerConfig\n      ] = config[key as keyof playerConfig];\n    });\n    if (!this.config.skipInactive) {\n      this.backToNormal();\n    }\n    if (typeof config.speed !== 'undefined') {\n      this.speedService.send({\n        type: 'SET_SPEED',\n        payload: {\n          speed: config.speed,\n        },\n      });\n    }\n    if (typeof config.mouseTail !== 'undefined') {\n      if (config.mouseTail === false) {\n        if (this.mouseTail) {\n          this.mouseTail.style.display = 'none';\n        }\n      } else {\n        if (!this.mouseTail) {\n          this.mouseTail = document.createElement('canvas');\n          this.mouseTail.width = Number.parseFloat(this.iframe.width);\n          this.mouseTail.height = Number.parseFloat(this.iframe.height);\n          this.mouseTail.classList.add('replayer-mouse-tail');\n          this.wrapper.insertBefore(this.mouseTail, this.iframe);\n        }\n        this.mouseTail.style.display = 'inherit';\n      }\n    }\n  }\n\n  public getMetaData(): playerMetaData {\n    const firstEvent = this.service.state.context.events[0];\n    const lastEvent =\n      this.service.state.context.events[\n        this.service.state.context.events.length - 1\n      ];\n    return {\n      startTime: firstEvent.timestamp,\n      endTime: lastEvent.timestamp,\n      totalTime: lastEvent.timestamp - firstEvent.timestamp,\n    };\n  }\n\n  /**\n   * Get the actual time offset the player is at now compared to the first event.\n   */\n  public getCurrentTime(): number {\n    if (this.config.liveMode) {\n      this.timer.updateLiveTime();\n    }\n    return this.timer.timeOffset + this.getTimeOffset();\n  }\n\n  /**\n   * Get the time offset the player is at now compared to the first event, but without regard for the timer.\n   */\n  public getTimeOffset(): number {\n    const { baselineTime, events } = this.service.state.context;\n    return baselineTime - events[0].timestamp;\n  }\n\n  public getMirror(): Mirror {\n    return this.mirror;\n  }\n\n  /**\n   * This API was designed to be used as play at any time offset.\n   * Since we minimized the data collected from recorder, we do not\n   * have the ability of undo an event.\n   * So the implementation of play at any time offset will always iterate\n   * all of the events, cast event before the offset synchronously\n   * and cast event after the offset asynchronously with timer.\n   * @param timeOffset - number\n   */\n  public play(timeOffset = 0) {\n    if (this.service.state.matches('paused')) {\n      this.service.send({ type: 'PLAY', payload: { timeOffset } });\n    } else {\n      this.service.send({ type: 'PAUSE' });\n      this.service.send({ type: 'PLAY', payload: { timeOffset } });\n    }\n    this.iframe.contentDocument\n      ?.getElementsByTagName('html')[0]\n      ?.classList.remove('rrweb-paused');\n    this.emitter.emit(ReplayerEvents.Start);\n  }\n\n  public pause(timeOffset?: number) {\n    if (timeOffset === undefined && this.service.state.matches('playing')) {\n      this.service.send({ type: 'PAUSE' });\n    }\n    if (typeof timeOffset === 'number') {\n      this.play(timeOffset);\n      this.service.send({ type: 'PAUSE' });\n    }\n    this.iframe.contentDocument\n      ?.getElementsByTagName('html')[0]\n      ?.classList.add('rrweb-paused');\n    this.emitter.emit(ReplayerEvents.Pause);\n  }\n\n  public resume(timeOffset = 0) {\n    this.warn(\n      `The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface.`,\n    );\n    this.play(timeOffset);\n    this.emitter.emit(ReplayerEvents.Resume);\n  }\n\n  /**\n   * Totally destroy this replayer and please be careful that this operation is irreversible.\n   * Memory occupation can be released by removing all references to this replayer.\n   */\n  public destroy() {\n    this.pause();\n    this.mirror.reset();\n    this.styleMirror.reset();\n    this.mediaManager.reset();\n    this.config.root.removeChild(this.wrapper);\n    this.emitter.emit(ReplayerEvents.Destroy);\n  }\n\n  public startLive(baselineTime?: number) {\n    this.service.send({ type: 'TO_LIVE', payload: { baselineTime } });\n  }\n\n  public addEvent(rawEvent: eventWithTime | string) {\n    const event = this.config.unpackFn\n      ? this.config.unpackFn(rawEvent as string)\n      : (rawEvent as eventWithTime);\n    if (indicatesTouchDevice(event)) {\n      this.mouse.classList.add('touch-device');\n    }\n    void Promise.resolve().then(() =>\n      this.service.send({ type: 'ADD_EVENT', payload: { event } }),\n    );\n  }\n\n  public enableInteract() {\n    this.iframe.setAttribute('scrolling', 'auto');\n    this.iframe.style.pointerEvents = 'auto';\n  }\n\n  public disableInteract() {\n    this.iframe.setAttribute('scrolling', 'no');\n    this.iframe.style.pointerEvents = 'none';\n  }\n\n  /**\n   * Empties the replayer's cache and reclaims memory.\n   * The replayer will use this cache to speed up the playback.\n   */\n  public resetCache() {\n    this.cache = createCache();\n  }\n\n  private setupDom() {\n    this.wrapper = document.createElement('div');\n    this.wrapper.classList.add('replayer-wrapper');\n    this.config.root.appendChild(this.wrapper);\n\n    this.mouse = document.createElement('div');\n    this.mouse.classList.add('replayer-mouse');\n    this.wrapper.appendChild(this.mouse);\n\n    if (this.config.mouseTail !== false) {\n      this.mouseTail = document.createElement('canvas');\n      this.mouseTail.classList.add('replayer-mouse-tail');\n      this.mouseTail.style.display = 'inherit';\n      this.wrapper.appendChild(this.mouseTail);\n    }\n\n    if (this.config.UNSAFE_replayCanvas) {\n      this.iframe = document.createElement('iframe');\n      this.iframe.setAttribute('sandbox', 'allow-same-origin allow-scripts');\n      this.wrapper.appendChild(this.iframe);\n      this.UNSAFE_replayCanvas = true;\n    } else {\n      this.iframe = createSandboxedIframe({\n        root: this.wrapper,\n      });\n      this.UNSAFE_replayCanvas = false;\n    }\n    // hide iframe before first meta event\n    this.iframe.style.display = 'none';\n    this.disableInteract();\n    if (this.iframe.contentWindow && this.iframe.contentDocument) {\n      smoothscrollPolyfill(\n        this.iframe.contentWindow,\n        this.iframe.contentDocument,\n      );\n\n      polyfill(this.iframe.contentWindow as IWindow);\n    }\n  }\n\n  private handleResize = (dimension: viewportResizeDimension) => {\n    this.iframe.style.display = 'inherit';\n    for (const el of [this.mouseTail, this.iframe]) {\n      if (!el) {\n        continue;\n      }\n      el.setAttribute('width', String(dimension.width));\n      el.setAttribute('height', String(dimension.height));\n    }\n  };\n\n  private applyEventsSynchronously = (events: Array<eventWithTime>) => {\n    for (const event of events) {\n      switch (event.type) {\n        case EventType.DomContentLoaded:\n        case EventType.Load:\n          continue;\n        case EventType.FullSnapshot:\n        case EventType.Meta:\n        case EventType.Plugin:\n        case EventType.IncrementalSnapshot:\n          break;\n        default:\n          break;\n      }\n      const castFn = this.getCastFn(event, true);\n      castFn();\n    }\n  };\n\n  private getCastFn = (event: eventWithTime, isSync = false) => {\n    let castFn: undefined | (() => void);\n    switch (event.type) {\n      case EventType.DomContentLoaded:\n      case EventType.Load:\n        break;\n      case EventType.Annotation:\n        castFn = () => this.emitter.emit(ReplayerEvents.Annotation, event);\n        break;\n      case EventType.Custom:\n        castFn = () => {\n          /**\n           * emit custom-event and pass the event object.\n           *\n           * This will add more value to the custom event and allows the client to react for custom-event.\n           */\n          this.emitter.emit(ReplayerEvents.CustomEvent, event);\n        };\n        break;\n      case EventType.Meta:\n        castFn = () =>\n          this.emitter.emit(ReplayerEvents.Resize, {\n            width: event.data.width,\n            height: event.data.height,\n          });\n        break;\n      case EventType.FullSnapshot:\n        castFn = () => {\n          if (this.firstFullSnapshot) {\n            if (this.firstFullSnapshot === event) {\n              // we've already built this exact FullSnapshot when the player was mounted, and haven't built any other FullSnapshot since\n              this.firstFullSnapshot = true; // forget as we might need to re-execute this FullSnapshot later e.g. to rebuild after scrubbing\n              return;\n            }\n          } else {\n            // Timer (requestAnimationFrame) can be faster than setTimeout(..., 1)\n            this.firstFullSnapshot = true;\n          }\n          this.mediaManager.reset();\n          this.styleMirror.reset();\n          this.rebuildFullSnapshot(event, isSync);\n          this.iframe.contentWindow?.scrollTo(event.data.initialOffset);\n        };\n        break;\n      case EventType.IncrementalSnapshot:\n        castFn = () => {\n          this.applyIncremental(event, isSync);\n          if (isSync) {\n            // do not check skip in sync\n            return;\n          }\n          if (event === this.nextUserInteractionEvent) {\n            this.nextUserInteractionEvent = null;\n            this.backToNormal();\n          }\n          if (this.config.skipInactive && !this.nextUserInteractionEvent) {\n            for (const _event of this.service.state.context.events) {\n              if (_event.timestamp <= event.timestamp) {\n                continue;\n              }\n              if (this.isUserInteraction(_event)) {\n                if (\n                  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                  _event.delay! - event.delay! >\n                  this.config.inactivePeriodThreshold *\n                    this.speedService.state.context.timer.speed\n                ) {\n                  this.nextUserInteractionEvent = _event;\n                }\n                break;\n              }\n            }\n            if (this.nextUserInteractionEvent) {\n              const skipTime =\n                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n                this.nextUserInteractionEvent.delay! - event.delay!;\n              const payload = {\n                speed: Math.min(\n                  Math.round(skipTime / SKIP_TIME_INTERVAL),\n                  this.config.maxSpeed,\n                ),\n              };\n              this.speedService.send({ type: 'FAST_FORWARD', payload });\n              this.emitter.emit(ReplayerEvents.SkipStart, payload);\n            }\n          }\n        };\n        break;\n      default:\n    }\n    const wrappedCastFn = () => {\n      if (castFn) {\n        castFn();\n      }\n\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.handler) plugin.handler(event, isSync, { replayer: this });\n      }\n\n      this.service.send({ type: 'CAST_EVENT', payload: { event } });\n\n      // events are kept sorted by timestamp, check if this is the last event\n      const lastIndex = this.service.state.context.events.length - 1;\n      if (\n        !this.config.liveMode &&\n        event === this.service.state.context.events[lastIndex]\n      ) {\n        const finish = () => {\n          if (lastIndex < this.service.state.context.events.length - 1) {\n            // more events have been added since the setTimeout\n            return;\n          }\n          this.backToNormal();\n          this.service.send('END');\n          this.emitter.emit(ReplayerEvents.Finish);\n        };\n        let finishBuffer = 50; // allow for checking whether new events aren't just about to be loaded in\n        if (\n          event.type === EventType.IncrementalSnapshot &&\n          event.data.source === IncrementalSource.MouseMove &&\n          event.data.positions.length\n        ) {\n          // extend finish event if the last event is a mouse move so that the timer isn't stopped by the service before checking the last event\n          finishBuffer += Math.max(0, -event.data.positions[0].timeOffset);\n        }\n        setTimeout(finish, finishBuffer);\n      }\n\n      this.emitter.emit(ReplayerEvents.EventCast, event);\n    };\n    return wrappedCastFn;\n  };\n\n  private rebuildFullSnapshot(\n    event: fullSnapshotEvent & { timestamp: number },\n    isSync = false,\n  ) {\n    if (!this.iframe.contentDocument) {\n      return this.warn('Looks like your replayer has been destroyed.');\n    }\n    if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n      this.warn(\n        'Found unresolved missing node map',\n        this.legacy_missingNodeRetryMap,\n      );\n    }\n    this.legacy_missingNodeRetryMap = {};\n    const collectedIframes: AppendedIframe[] = [];\n    const collectedDialogs = new Set<HTMLDialogElement>();\n    const afterAppend = (builtNode: Node, id: number) => {\n      if (builtNode.nodeName === 'DIALOG')\n        collectedDialogs.add(builtNode as HTMLDialogElement);\n      this.collectIframeAndAttachDocument(collectedIframes, builtNode);\n      if (this.mediaManager.isSupportedMediaElement(builtNode)) {\n        const { events } = this.service.state.context;\n        this.mediaManager.addMediaElements(\n          builtNode,\n          event.timestamp - events[0].timestamp,\n          this.mirror,\n        );\n      }\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.onBuild)\n          plugin.onBuild(builtNode, {\n            id,\n            replayer: this,\n          });\n      }\n    };\n\n    /**\n     * Normally rebuilding full snapshot should not be under virtual dom environment.\n     * But if the order of data events has some issues, it might be possible.\n     * Adding this check to avoid any potential issues.\n     */\n    if (this.usingVirtualDom) {\n      this.virtualDom.destroyTree();\n      this.usingVirtualDom = false;\n    }\n\n    this.mirror.reset();\n    rebuild(event.data.node, {\n      doc: this.iframe.contentDocument,\n      afterAppend,\n      cache: this.cache,\n      mirror: this.mirror,\n      UNSAFE_allowUnprotectedRebuild: this.UNSAFE_replayCanvas,\n    });\n    afterAppend(this.iframe.contentDocument, event.data.node.id);\n\n    for (const { mutationInQueue, builtNode } of collectedIframes) {\n      this.attachDocumentToIframe(mutationInQueue, builtNode);\n      this.newDocumentQueue = this.newDocumentQueue.filter(\n        (m) => m !== mutationInQueue,\n      );\n    }\n    const { documentElement, head } = this.iframe.contentDocument;\n    this.insertStyleRules(documentElement, head);\n    collectedDialogs.forEach((d) => applyDialogToTopLevel(d));\n    if (!this.service.state.matches('playing')) {\n      this.iframe.contentDocument\n        .getElementsByTagName('html')[0]\n        .classList.add('rrweb-paused');\n    }\n    this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded, event);\n    if (!isSync) {\n      this.waitForStylesheetLoad();\n    }\n    if (this.config.UNSAFE_replayCanvas) {\n      void this.preloadAllImages();\n    }\n  }\n\n  private insertStyleRules(\n    documentElement: HTMLElement | RRElement,\n    head: HTMLHeadElement | RRElement,\n  ) {\n    const injectStylesRules = getInjectStyleRules(\n      this.config.blockClass,\n    ).concat(this.config.insertStyleRules);\n    if (this.config.pauseAnimation) {\n      injectStylesRules.push(\n        'html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }',\n      );\n    }\n    if (!injectStylesRules.length) {\n      return;\n    }\n    if (this.usingVirtualDom) {\n      const styleEl = this.virtualDom.createElement('style');\n      this.virtualDom.mirror.add(\n        styleEl,\n        getDefaultSN(styleEl, this.virtualDom.unserializedId),\n      );\n      (documentElement as RRElement).insertBefore(styleEl, head as RRElement);\n      styleEl.rules.push({\n        source: IncrementalSource.StyleSheetRule,\n        adds: injectStylesRules.map((cssText, index) => ({\n          rule: cssText,\n          index,\n        })),\n      });\n    } else {\n      const styleEl = document.createElement('style');\n      (documentElement as HTMLElement).insertBefore(\n        styleEl,\n        head as HTMLHeadElement,\n      );\n      for (let idx = 0; idx < injectStylesRules.length; idx++) {\n        styleEl.sheet?.insertRule(injectStylesRules[idx], idx);\n      }\n    }\n  }\n\n  private attachDocumentToIframe(\n    mutation: addedNodeMutation,\n    iframeEl: HTMLIFrameElement | RRIFrameElement,\n  ) {\n    const mirror: RRDOMMirror | Mirror = this.usingVirtualDom\n      ? this.virtualDom.mirror\n      : this.mirror;\n    type TNode = typeof mirror extends Mirror ? Node : RRNode;\n    type TMirror = typeof mirror extends Mirror ? Mirror : RRDOMMirror;\n\n    const collectedIframes: AppendedIframe[] = [];\n    const collectedDialogs = new Set<HTMLDialogElement>();\n    const afterAppend = (builtNode: Node, id: number) => {\n      if (builtNode.nodeName === 'DIALOG')\n        collectedDialogs.add(builtNode as HTMLDialogElement);\n      this.collectIframeAndAttachDocument(collectedIframes, builtNode);\n      const sn = (mirror as TMirror).getMeta(builtNode as unknown as TNode);\n      if (\n        sn?.type === NodeType.Element &&\n        sn?.tagName.toUpperCase() === 'HTML'\n      ) {\n        const { documentElement, head } = iframeEl.contentDocument!;\n        this.insertStyleRules(\n          documentElement as HTMLElement | RRElement,\n          head as HTMLElement | RRElement,\n        );\n      }\n\n      // Skip the plugin onBuild callback in the virtual dom mode\n      if (this.usingVirtualDom) return;\n      for (const plugin of this.config.plugins || []) {\n        if (plugin.onBuild)\n          plugin.onBuild(builtNode, {\n            id,\n            replayer: this,\n          });\n      }\n    };\n\n    buildNodeWithSN(mutation.node, {\n      doc: iframeEl.contentDocument! as Document,\n      mirror: mirror as Mirror,\n      hackCss: true,\n      skipChild: false,\n      afterAppend,\n      cache: this.cache,\n    });\n    afterAppend(iframeEl.contentDocument! as Document, mutation.node.id);\n\n    for (const { mutationInQueue, builtNode } of collectedIframes) {\n      this.attachDocumentToIframe(mutationInQueue, builtNode);\n      this.newDocumentQueue = this.newDocumentQueue.filter(\n        (m) => m !== mutationInQueue,\n      );\n    }\n\n    collectedDialogs.forEach((d) => applyDialogToTopLevel(d));\n  }\n\n  private collectIframeAndAttachDocument(\n    collected: AppendedIframe[],\n    builtNode: Node,\n  ) {\n    if (isSerializedIframe(builtNode, this.mirror)) {\n      const mutationInQueue = this.newDocumentQueue.find(\n        (m) => m.parentId === this.mirror.getId(builtNode),\n      );\n      if (mutationInQueue) {\n        collected.push({\n          mutationInQueue,\n          builtNode: builtNode as HTMLIFrameElement,\n        });\n      }\n    }\n  }\n\n  /**\n   * pause when loading style sheet, resume when loaded all timeout exceed\n   */\n  private waitForStylesheetLoad() {\n    const head = this.iframe.contentDocument?.head;\n    if (head) {\n      const unloadSheets: Set<HTMLLinkElement> = new Set();\n      let timer: ReturnType<typeof setTimeout> | -1;\n      let beforeLoadState = this.service.state;\n      const stateHandler = () => {\n        beforeLoadState = this.service.state;\n      };\n      this.emitter.on(ReplayerEvents.Start, stateHandler);\n      this.emitter.on(ReplayerEvents.Pause, stateHandler);\n      const unsubscribe = () => {\n        this.emitter.off(ReplayerEvents.Start, stateHandler);\n        this.emitter.off(ReplayerEvents.Pause, stateHandler);\n      };\n      head\n        .querySelectorAll('link[rel=\"stylesheet\"]')\n        .forEach((css: HTMLLinkElement) => {\n          if (!css.sheet) {\n            unloadSheets.add(css);\n            css.addEventListener('load', () => {\n              unloadSheets.delete(css);\n              // all loaded and timer not released yet\n              if (unloadSheets.size === 0 && timer !== -1) {\n                if (beforeLoadState.matches('playing')) {\n                  this.play(this.getCurrentTime());\n                }\n                this.emitter.emit(ReplayerEvents.LoadStylesheetEnd);\n                if (timer) {\n                  clearTimeout(timer);\n                }\n                unsubscribe();\n              }\n            });\n          }\n        });\n\n      if (unloadSheets.size > 0) {\n        // find some unload sheets after iterate\n        this.service.send({ type: 'PAUSE' });\n        this.emitter.emit(ReplayerEvents.LoadStylesheetStart);\n        timer = setTimeout(() => {\n          if (beforeLoadState.matches('playing')) {\n            this.play(this.getCurrentTime());\n          }\n          // mark timer was called\n          timer = -1;\n          unsubscribe();\n        }, this.config.loadTimeout);\n      }\n    }\n  }\n\n  /**\n   * pause when there are some canvas drawImage args need to be loaded\n   */\n  private async preloadAllImages(): Promise<void[]> {\n    const promises: Promise<void>[] = [];\n    for (const event of this.service.state.context.events) {\n      if (\n        event.type === EventType.IncrementalSnapshot &&\n        event.data.source === IncrementalSource.CanvasMutation\n      ) {\n        promises.push(\n          this.deserializeAndPreloadCanvasEvents(event.data, event),\n        );\n        const commands =\n          'commands' in event.data ? event.data.commands : [event.data];\n        commands.forEach((c) => {\n          this.preloadImages(c, event);\n        });\n      }\n    }\n    return Promise.all(promises);\n  }\n\n  private preloadImages(data: canvasMutationCommand, event: eventWithTime) {\n    if (\n      data.property === 'drawImage' &&\n      typeof data.args[0] === 'string' &&\n      !this.imageMap.has(event)\n    ) {\n      const canvas = document.createElement('canvas');\n      const ctx = canvas.getContext('2d');\n      const imgd = ctx?.createImageData(canvas.width, canvas.height);\n      ctx?.putImageData(imgd!, 0, 0);\n    }\n  }\n  private async deserializeAndPreloadCanvasEvents(\n    data: canvasMutationData,\n    event: eventWithTime,\n  ) {\n    if (!this.canvasEventMap.has(event)) {\n      const status = {\n        isUnchanged: true,\n      };\n      if ('commands' in data) {\n        const commands = await Promise.all(\n          data.commands.map(async (c) => {\n            const args = await Promise.all(\n              c.args.map(deserializeArg(this.imageMap, null, status)),\n            );\n            return { ...c, args };\n          }),\n        );\n        if (status.isUnchanged === false)\n          this.canvasEventMap.set(event, { ...data, commands });\n      } else {\n        const args = await Promise.all(\n          data.args.map(deserializeArg(this.imageMap, null, status)),\n        );\n        if (status.isUnchanged === false)\n          this.canvasEventMap.set(event, { ...data, args });\n      }\n    }\n  }\n\n  private applyIncremental(\n    e: incrementalSnapshotEvent & { timestamp: number; delay?: number },\n    isSync: boolean,\n  ) {\n    const { data: d } = e;\n    switch (d.source) {\n      case IncrementalSource.Mutation: {\n        try {\n          this.applyMutation(d, isSync);\n        } catch (error) {\n          // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions\n          this.warn(`Exception in mutation ${error.message || error}`, d);\n        }\n        break;\n      }\n      case IncrementalSource.Drag:\n      case IncrementalSource.TouchMove:\n      case IncrementalSource.MouseMove:\n        if (isSync) {\n          const lastPosition = d.positions[d.positions.length - 1];\n          this.mousePos = {\n            x: lastPosition.x,\n            y: lastPosition.y,\n            id: lastPosition.id,\n            debugData: d,\n          };\n        } else {\n          d.positions.forEach((p) => {\n            const action = {\n              doAction: () => {\n                this.moveAndHover(p.x, p.y, p.id, isSync, d);\n              },\n              delay:\n                p.timeOffset +\n                e.timestamp -\n                this.service.state.context.baselineTime,\n            };\n            this.timer.addAction(action);\n          });\n          // add a dummy action to keep timer alive\n          this.timer.addAction({\n            doAction() {\n              //\n            },\n            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n            delay: e.delay! - d.positions[0]?.timeOffset,\n          });\n        }\n        break;\n      case IncrementalSource.MouseInteraction: {\n        /**\n         * Same as the situation of missing input target.\n         */\n        if (d.id === -1) {\n          break;\n        }\n        const event = new Event(toLowerCase(MouseInteractions[d.type]));\n        const target = this.mirror.getNode(d.id);\n        if (!target) {\n          return this.debugNodeNotFound(d, d.id);\n        }\n        this.emitter.emit(ReplayerEvents.MouseInteraction, {\n          type: d.type,\n          target,\n        });\n        const { triggerFocus } = this.config;\n        switch (d.type) {\n          case MouseInteractions.Blur:\n            if ('blur' in (target as HTMLElement)) {\n              (target as HTMLElement).blur();\n            }\n            break;\n          case MouseInteractions.Focus:\n            if (triggerFocus && (target as HTMLElement).focus) {\n              (target as HTMLElement).focus({\n                preventScroll: true,\n              });\n            }\n            break;\n          case MouseInteractions.Click:\n          case MouseInteractions.TouchStart:\n          case MouseInteractions.TouchEnd:\n          case MouseInteractions.MouseDown:\n          case MouseInteractions.MouseUp:\n            if (isSync) {\n              if (d.type === MouseInteractions.TouchStart) {\n                this.touchActive = true;\n              } else if (d.type === MouseInteractions.TouchEnd) {\n                this.touchActive = false;\n              }\n              if (d.type === MouseInteractions.MouseDown) {\n                this.lastMouseDownEvent = [target, event];\n              } else if (d.type === MouseInteractions.MouseUp) {\n                this.lastMouseDownEvent = null;\n              }\n              this.mousePos = {\n                x: d.x || 0,\n                y: d.y || 0,\n                id: d.id,\n                debugData: d,\n              };\n            } else {\n              if (d.type === MouseInteractions.TouchStart) {\n                // don't draw a trail as user has lifted finger and is placing at a new point\n                this.tailPositions.length = 0;\n              }\n              this.moveAndHover(d.x || 0, d.y || 0, d.id, isSync, d);\n              if (d.type === MouseInteractions.Click) {\n                /*\n                 * don't want target.click() here as could trigger an iframe navigation\n                 * instead any effects of the click should already be covered by mutations\n                 */\n                /*\n                 * removal and addition of .active class (along with void line to trigger repaint)\n                 * triggers the 'click' css animation in styles/style.css\n                 */\n                this.mouse.classList.remove('active');\n                void this.mouse.offsetWidth;\n                this.mouse.classList.add('active');\n              } else if (d.type === MouseInteractions.TouchStart) {\n                void this.mouse.offsetWidth; // needed for the position update of moveAndHover to apply without the .touch-active transition\n                this.mouse.classList.add('touch-active');\n              } else if (d.type === MouseInteractions.TouchEnd) {\n                this.mouse.classList.remove('touch-active');\n              } else {\n                // for MouseDown & MouseUp also invoke default behavior\n                target.dispatchEvent(event);\n              }\n            }\n            break;\n          case MouseInteractions.TouchCancel:\n            if (isSync) {\n              this.touchActive = false;\n            } else {\n              this.mouse.classList.remove('touch-active');\n            }\n            break;\n          default:\n            target.dispatchEvent(event);\n        }\n        break;\n      }\n      case IncrementalSource.Scroll: {\n        /**\n         * Same as the situation of missing input target.\n         */\n        if (d.id === -1) {\n          break;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(d.id) as RRElement;\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.scrollData = d;\n          break;\n        }\n        // Use isSync rather than this.usingVirtualDom because not every fast-forward process uses virtual dom optimization.\n        this.applyScroll(d, isSync);\n        break;\n      }\n      case IncrementalSource.ViewportResize:\n        this.emitter.emit(ReplayerEvents.Resize, {\n          width: d.width,\n          height: d.height,\n        });\n        break;\n      case IncrementalSource.Input: {\n        /**\n         * Input event on an unserialized node usually means the event\n         * was synchrony triggered programmatically after the node was\n         * created. This means there was not an user observable interaction\n         * and we do not need to replay it.\n         */\n        if (d.id === -1) {\n          break;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(d.id) as RRElement;\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.inputData = d;\n          break;\n        }\n        this.applyInput(d);\n        break;\n      }\n      case IncrementalSource.MediaInteraction: {\n        const target = this.usingVirtualDom\n          ? this.virtualDom.mirror.getNode(d.id)\n          : this.mirror.getNode(d.id);\n        if (!target) {\n          return this.debugNodeNotFound(d, d.id);\n        }\n        const mediaEl = target as HTMLMediaElement | RRMediaElement;\n        const { events } = this.service.state.context;\n\n        this.mediaManager.mediaMutation({\n          target: mediaEl,\n          timeOffset: e.timestamp - events[0].timestamp,\n          mutation: d,\n        });\n\n        break;\n      }\n      case IncrementalSource.StyleSheetRule:\n      case IncrementalSource.StyleDeclaration: {\n        if (this.usingVirtualDom) {\n          if (d.styleId) this.constructedStyleMutations.push(d);\n          else if (d.id)\n            (\n              this.virtualDom.mirror.getNode(d.id) as RRStyleElement | null\n            )?.rules.push(d);\n        } else this.applyStyleSheetMutation(d);\n        break;\n      }\n      case IncrementalSource.CanvasMutation: {\n        if (!this.config.UNSAFE_replayCanvas) {\n          return;\n        }\n        if (this.usingVirtualDom) {\n          const target = this.virtualDom.mirror.getNode(\n            d.id,\n          ) as RRCanvasElement;\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          target.canvasMutations.push({\n            event: e as canvasEventWithTime,\n            mutation: d,\n          });\n        } else {\n          const target = this.mirror.getNode(d.id);\n          if (!target) {\n            return this.debugNodeNotFound(d, d.id);\n          }\n          void canvasMutation({\n            event: e,\n            mutation: d,\n            target: target as HTMLCanvasElement,\n            imageMap: this.imageMap,\n            canvasEventMap: this.canvasEventMap,\n            errorHandler: this.warnCanvasMutationFailed.bind(this),\n          });\n        }\n        break;\n      }\n      case IncrementalSource.Font: {\n        try {\n          const fontFace = new FontFace(\n            d.family,\n            d.buffer\n              ? new Uint8Array(JSON.parse(d.fontSource) as Iterable<number>)\n              : d.fontSource,\n            d.descriptors,\n          );\n          this.iframe.contentDocument?.fonts.add(fontFace);\n        } catch (error) {\n          this.warn(error);\n        }\n        break;\n      }\n      case IncrementalSource.Selection: {\n        if (isSync) {\n          this.lastSelectionData = d;\n          break;\n        }\n        this.applySelection(d);\n        break;\n      }\n      case IncrementalSource.AdoptedStyleSheet: {\n        if (this.usingVirtualDom) this.adoptedStyleSheets.push(d);\n        else this.applyAdoptedStyleSheet(d);\n        break;\n      }\n      default:\n    }\n  }\n\n  /**\n   * Apply the mutation to the virtual dom or the real dom.\n   * @param d - The mutation data.\n   * @param isSync - Whether the mutation should be applied synchronously (while fast-forwarding).\n   */\n  private applyMutation(d: mutationData, isSync: boolean) {\n    // Only apply virtual dom optimization if the fast-forward process has node mutation. Because the cost of creating a virtual dom tree and executing the diff algorithm is usually higher than directly applying other kind of events.\n    if (this.config.useVirtualDom && !this.usingVirtualDom && isSync) {\n      this.usingVirtualDom = true;\n      buildFromDom(this.iframe.contentDocument!, this.mirror, this.virtualDom);\n      // If these legacy missing nodes haven't been resolved, they should be converted to virtual nodes.\n      if (Object.keys(this.legacy_missingNodeRetryMap).length) {\n        for (const key in this.legacy_missingNodeRetryMap) {\n          try {\n            const value = this.legacy_missingNodeRetryMap[key];\n            const virtualNode = buildFromNode(\n              value.node as Node,\n              this.virtualDom,\n              this.mirror,\n            );\n            if (virtualNode) value.node = virtualNode;\n          } catch (error) {\n            this.warn(error);\n          }\n        }\n      }\n    }\n    const mirror = this.usingVirtualDom ? this.virtualDom.mirror : this.mirror;\n    type TNode = typeof mirror extends Mirror ? Node : RRNode;\n\n    d.removes = d.removes.filter((mutation) => {\n      // warn of absence from mirror before we start applying each removal\n      // as earlier removals could remove a tree that includes a later removal\n      if (!mirror.getNode(mutation.id)) {\n        this.warnNodeNotFound(d, mutation.id);\n        return false;\n      }\n      return true;\n    });\n    d.removes.forEach((mutation) => {\n      const target = mirror.getNode(mutation.id);\n      if (!target) {\n        // no need to warn here, an ancestor may have already been removed\n        return;\n      }\n      let parent: Node | null | ShadowRoot | RRNode = mirror.getNode(\n        mutation.parentId,\n      );\n      if (!parent) {\n        return this.warnNodeNotFound(d, mutation.parentId);\n      }\n      if (mutation.isShadow && hasShadowRoot(parent as Node)) {\n        parent = (parent as Element | RRElement).shadowRoot;\n      }\n      // target may be removed with its parents before\n      mirror.removeNodeFromMap(target as Node & RRNode);\n      if (parent)\n        try {\n          parent.removeChild(target as Node & RRNode);\n          /**\n           * https://github.com/rrweb-io/rrweb/pull/887\n           * Remove any virtual style rules for stylesheets if a child text node is removed.\n           */\n          if (\n            this.usingVirtualDom &&\n            target.nodeName === '#text' &&\n            parent.nodeName === 'STYLE' &&\n            (parent as RRStyleElement).rules?.length > 0\n          )\n            (parent as RRStyleElement).rules = [];\n        } catch (error) {\n          if (error instanceof DOMException) {\n            this.warn(\n              'parent could not remove child in mutation',\n              parent,\n              target,\n              d,\n            );\n          } else {\n            throw error;\n          }\n        }\n    });\n\n    const legacy_missingNodeMap: missingNodeMap = {\n      ...this.legacy_missingNodeRetryMap,\n    };\n    const legacy_queue: addedNodeMutation[] = [];\n\n    // next not present at this moment\n    const nextNotInDOM = (mutation: addedNodeMutation) => {\n      let next: TNode | null = null;\n      if (mutation.nextId) {\n        next = mirror.getNode(mutation.nextId) as TNode | null;\n      }\n      // next not present at this moment\n      if (\n        mutation.nextId !== null &&\n        mutation.nextId !== undefined &&\n        mutation.nextId !== -1 &&\n        !next\n      ) {\n        return true;\n      }\n      return false;\n    };\n\n    const appendNode = (mutation: addedNodeMutation) => {\n      if (!this.iframe.contentDocument) {\n        return this.warn('Looks like your replayer has been destroyed.');\n      }\n      let parent: Node | null | ShadowRoot | RRNode = mirror.getNode(\n        mutation.parentId,\n      );\n      if (!parent) {\n        if (mutation.node.type === NodeType.Document) {\n          // is newly added document, maybe the document node of an iframe\n          return this.newDocumentQueue.push(mutation);\n        }\n        return legacy_queue.push(mutation);\n      }\n\n      if (mutation.node.isShadow) {\n        // If the parent is attached a shadow dom after it's created, it won't have a shadow root.\n        if (!hasShadowRoot(parent)) {\n          (parent as Element | RRElement).attachShadow({ mode: 'open' });\n          parent = (parent as Element | RRElement).shadowRoot! as Node | RRNode;\n        } else parent = parent.shadowRoot as Node | RRNode;\n      }\n\n      let previous: Node | RRNode | null = null;\n      let next: Node | RRNode | null = null;\n      if (mutation.previousId) {\n        previous = mirror.getNode(mutation.previousId);\n      }\n      if (mutation.nextId) {\n        next = mirror.getNode(mutation.nextId);\n      }\n      if (nextNotInDOM(mutation)) {\n        return legacy_queue.push(mutation);\n      }\n\n      if (mutation.node.rootId && !mirror.getNode(mutation.node.rootId)) {\n        return;\n      }\n\n      const targetDoc = mutation.node.rootId\n        ? mirror.getNode(mutation.node.rootId)\n        : this.usingVirtualDom\n        ? this.virtualDom\n        : this.iframe.contentDocument;\n      if (isSerializedIframe<typeof parent>(parent, mirror)) {\n        this.attachDocumentToIframe(\n          mutation,\n          parent as HTMLIFrameElement | RRIFrameElement,\n        );\n        return;\n      }\n      const afterAppend = (node: Node | RRNode, id: number) => {\n        // Skip the plugin onBuild callback for virtual dom\n        if (this.usingVirtualDom) return;\n        applyDialogToTopLevel(node);\n        for (const plugin of this.config.plugins || []) {\n          if (plugin.onBuild) plugin.onBuild(node, { id, replayer: this });\n        }\n      };\n\n      const target = buildNodeWithSN(mutation.node, {\n        doc: targetDoc as Document, // can be Document or RRDocument\n        mirror: mirror as Mirror, // can be this.mirror or virtualDom.mirror\n        skipChild: true,\n        hackCss: true,\n        cache: this.cache,\n        /**\n         * caveat: `afterAppend` only gets called on child nodes of target\n         * we have to call it again below when this target was added to the DOM\n         */\n        afterAppend,\n      }) as Node | RRNode;\n\n      // legacy data, we should not have -1 siblings any more\n      if (mutation.previousId === -1 || mutation.nextId === -1) {\n        legacy_missingNodeMap[mutation.node.id] = {\n          node: target,\n          mutation,\n        };\n        return;\n      }\n\n      // Typescripts type system is not smart enough\n      // to understand what is going on with the types below\n      type TNode = typeof mirror extends Mirror ? Node : RRNode;\n      type TMirror = typeof mirror extends Mirror ? Mirror : RRDOMMirror;\n\n      const parentSn = (mirror as TMirror).getMeta(parent as TNode);\n      if (\n        parentSn &&\n        parentSn.type === NodeType.Element &&\n        mutation.node.type === NodeType.Text\n      ) {\n        const prospectiveSiblings = Array.isArray(parent.childNodes)\n          ? parent.childNodes\n          : Array.from(parent.childNodes);\n        if (parentSn.tagName === 'textarea') {\n          // This should be redundant now as we are either recording the value or the childNode, and not both\n          // keeping around for backwards compatibility with old bad double data, see\n\n          // https://github.com/rrweb-io/rrweb/issues/745\n          // parent is textarea, will only keep one child node as the value\n          for (const c of prospectiveSiblings) {\n            if (c.nodeType === parent.TEXT_NODE) {\n              parent.removeChild(c as Node & RRNode);\n            }\n          }\n        } else if (\n          parentSn.tagName === 'style' &&\n          prospectiveSiblings.length === 1\n        ) {\n          // https://github.com/rrweb-io/rrweb/pull/1417\n          /**\n           * If both _cssText and textContent are present for a style element due to some existing bugs, the element was ending up with two child text nodes\n           * We need to remove the textNode created by _cssText as it doesn't have an id in the mirror, and thus cannot be further mutated.\n           */\n          for (const cssText of prospectiveSiblings as (Node & RRNode)[]) {\n            if (\n              cssText.nodeType === parent.TEXT_NODE &&\n              !mirror.hasNode(cssText)\n            ) {\n              target.textContent = cssText.textContent;\n              parent.removeChild(cssText);\n            }\n          }\n        }\n      } else if (parentSn?.type === NodeType.Document) {\n        /**\n         * Sometimes the document object is changed or reopened and the MutationObserver is disconnected, so the removal of child elements can't be detected and recorded.\n         * After the change of document, we may get another mutation which adds a new doctype or a HTML element, while the old one still exists in the dom.\n         * So, we need to remove the old one first to avoid collision.\n         */\n        const parentDoc = parent as Document | RRDocument;\n        /**\n         * To detect the exist of the old doctype before adding a new doctype.\n         * We need to remove the old doctype before adding the new one. Otherwise, code will throw \"mutation Failed to execute 'insertBefore' on 'Node': Only one doctype on document allowed\".\n         */\n        if (\n          mutation.node.type === NodeType.DocumentType &&\n          parentDoc.childNodes[0]?.nodeType === Node.DOCUMENT_TYPE_NODE\n        )\n          parentDoc.removeChild(parentDoc.childNodes[0] as Node & RRNode);\n        /**\n         * To detect the exist of the old HTML element before adding a new HTML element.\n         * The reason is similar to the above. One document only allows exactly one DocType and one HTML Element.\n         */\n        if (target.nodeName === 'HTML' && parentDoc.documentElement)\n          parentDoc.removeChild(\n            parentDoc.documentElement as HTMLElement & RRNode,\n          );\n      }\n\n      if (previous && previous.nextSibling && previous.nextSibling.parentNode) {\n        (parent as TNode).insertBefore(\n          target as TNode,\n          previous.nextSibling as TNode,\n        );\n      } else if (next && next.parentNode) {\n        // making sure the parent contains the reference nodes\n        // before we insert target before next.\n        (parent as TNode).contains(next as TNode)\n          ? (parent as TNode).insertBefore(target as TNode, next as TNode)\n          : (parent as TNode).insertBefore(target as TNode, null);\n      } else {\n        (parent as TNode).appendChild(target as TNode);\n      }\n      /**\n       * target was added, execute plugin hooks\n       */\n      afterAppend(target, mutation.node.id);\n\n      /**\n       * https://github.com/rrweb-io/rrweb/pull/887\n       * Remove any virtual style rules for stylesheets if a new text node is appended.\n       */\n      if (\n        this.usingVirtualDom &&\n        target.nodeName === '#text' &&\n        parent.nodeName === 'STYLE' &&\n        (parent as RRStyleElement).rules?.length > 0\n      )\n        (parent as RRStyleElement).rules = [];\n\n      if (isSerializedIframe(target, this.mirror)) {\n        const targetId = this.mirror.getId(target as HTMLIFrameElement);\n        const mutationInQueue = this.newDocumentQueue.find(\n          (m) => m.parentId === targetId,\n        );\n        if (mutationInQueue) {\n          this.attachDocumentToIframe(\n            mutationInQueue,\n            target as HTMLIFrameElement,\n          );\n          this.newDocumentQueue = this.newDocumentQueue.filter(\n            (m) => m !== mutationInQueue,\n          );\n        }\n      }\n\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(\n          legacy_missingNodeMap,\n          parent,\n          target,\n          mutation,\n        );\n      }\n    };\n\n    d.adds.forEach((mutation) => {\n      appendNode(mutation);\n    });\n\n    const startTime = Date.now();\n    while (legacy_queue.length) {\n      // transform legacy_queue to resolve tree\n      const resolveTrees = queueToResolveTrees(legacy_queue);\n      legacy_queue.length = 0;\n      if (Date.now() - startTime > 500) {\n        this.warn(\n          'Timeout in the loop, please check the resolve tree data:',\n          resolveTrees,\n        );\n        break;\n      }\n      for (const tree of resolveTrees) {\n        const parent = mirror.getNode(tree.value.parentId);\n        if (!parent) {\n          this.debug(\n            'Drop resolve tree since there is no parent for the root node.',\n            tree,\n          );\n        } else {\n          iterateResolveTree(tree, (mutation) => {\n            appendNode(mutation);\n          });\n        }\n      }\n    }\n\n    if (Object.keys(legacy_missingNodeMap).length) {\n      Object.assign(this.legacy_missingNodeRetryMap, legacy_missingNodeMap);\n    }\n\n    uniqueTextMutations(d.texts).forEach((mutation) => {\n      const target = mirror.getNode(mutation.id);\n      if (!target) {\n        if (d.removes.find((r) => r.id === mutation.id)) {\n          // no need to warn, element was already removed\n          return;\n        }\n        return this.warnNodeNotFound(d, mutation.id);\n      }\n\n      const parentEl = target.parentElement as Element | RRElement;\n      if (mutation.value && parentEl && parentEl.tagName === 'STYLE') {\n        // assumes hackCss: true (which isn't currently configurable from rrweb)\n        target.textContent = adaptCssForReplay(mutation.value, this.cache);\n      } else {\n        target.textContent = mutation.value;\n      }\n\n      /**\n       * https://github.com/rrweb-io/rrweb/pull/865\n       * Remove any virtual style rules for stylesheets whose contents are replaced.\n       */\n      if (this.usingVirtualDom) {\n        const parent = target.parentNode as RRStyleElement;\n        if (parent?.rules?.length > 0) parent.rules = [];\n      }\n    });\n    d.attributes.forEach((mutation) => {\n      const target = mirror.getNode(mutation.id);\n      if (!target) {\n        if (d.removes.find((r) => r.id === mutation.id)) {\n          // no need to warn, element was already removed\n          return;\n        }\n        return this.warnNodeNotFound(d, mutation.id);\n      }\n      for (const attributeName in mutation.attributes) {\n        if (typeof attributeName === 'string') {\n          const value = mutation.attributes[attributeName];\n          if (value === null) {\n            (target as Element | RRElement).removeAttribute(attributeName);\n            if (attributeName === 'open')\n              removeDialogFromTopLevel(target, mutation);\n          } else if (typeof value === 'string') {\n            try {\n              // When building snapshot, some link styles haven't loaded. Then they are loaded, they will be inlined as incremental mutation change of attribute. We need to replace the old elements whose styles aren't inlined.\n              if (\n                attributeName === '_cssText' &&\n                (target.nodeName === 'LINK' || target.nodeName === 'STYLE')\n              ) {\n                try {\n                  const newSn = mirror.getMeta(\n                    target as Node & RRNode,\n                  ) as serializedElementNodeWithId;\n                  const newNode = buildNodeWithSN(\n                    {\n                      ...newSn,\n                      attributes: {\n                        ...newSn.attributes,\n                        ...(mutation.attributes as attributes),\n                      },\n                    },\n                    {\n                      doc: target.ownerDocument as Document, // can be Document or RRDocument\n                      mirror: mirror as Mirror,\n                      skipChild: true,\n                      hackCss: true,\n                      cache: this.cache,\n                    },\n                  );\n                  // Update mirror meta's attributes\n                  Object.assign(\n                    newSn.attributes,\n                    mutation.attributes as attributes,\n                  );\n                  const siblingNode = target.nextSibling;\n                  const parentNode = target.parentNode;\n                  if (newNode && parentNode) {\n                    parentNode.removeChild(target as Node & RRNode);\n                    parentNode.insertBefore(\n                      newNode as Node & RRNode,\n                      siblingNode as (Node & RRNode) | null,\n                    );\n                    mirror.replace(mutation.id, newNode as Node & RRNode);\n                    break;\n                  }\n                } catch (e) {\n                  // for safe\n                }\n              }\n              if (attributeName === 'value' && target.nodeName === 'TEXTAREA') {\n                // this may or may not have an effect on the value property (which is what is displayed)\n                // depending on whether the textarea has been modified by the user yet\n                // TODO: replaceChildNodes is not available in RRDom\n                const textarea = target as TNode;\n                textarea.childNodes.forEach((c) =>\n                  textarea.removeChild(c as TNode),\n                );\n                const tn = target.ownerDocument?.createTextNode(value);\n                if (tn) {\n                  textarea.appendChild(tn as TNode);\n                }\n              } else {\n                (target as Element | RRElement).setAttribute(\n                  attributeName,\n                  value,\n                );\n              }\n\n              if (\n                attributeName === 'rr_open_mode' &&\n                target.nodeName === 'DIALOG'\n              ) {\n                applyDialogToTopLevel(target, mutation);\n              }\n            } catch (error) {\n              this.warn(\n                'An error occurred may due to the checkout feature.',\n                error,\n              );\n            }\n          } else if (attributeName === 'style') {\n            const styleValues = value;\n            const targetEl = target as HTMLElement | RRElement;\n            for (const s in styleValues) {\n              if (styleValues[s] === false) {\n                targetEl.style.removeProperty(s);\n              } else if (styleValues[s] instanceof Array) {\n                const svp = styleValues[s] as styleValueWithPriority;\n                targetEl.style.setProperty(s, svp[0], svp[1]);\n              } else {\n                const svs = styleValues[s] as string;\n                targetEl.style.setProperty(s, svs);\n              }\n            }\n          }\n        }\n      }\n    });\n  }\n\n  /**\n   * Apply the scroll data on real elements.\n   * If the replayer is in sync mode, smooth scroll behavior should be disabled.\n   * @param d - the scroll data\n   * @param isSync - whether the replayer is in sync mode(fast-forward)\n   */\n  private applyScroll(d: scrollData, isSync: boolean) {\n    const target = this.mirror.getNode(d.id);\n    if (!target) {\n      return this.debugNodeNotFound(d, d.id);\n    }\n    const sn = this.mirror.getMeta(target);\n    if (target === this.iframe.contentDocument) {\n      this.iframe.contentWindow?.scrollTo({\n        top: d.y,\n        left: d.x,\n        behavior: isSync ? 'auto' : 'smooth',\n      });\n    } else if (sn?.type === NodeType.Document) {\n      // nest iframe content document\n      (target as Document).defaultView?.scrollTo({\n        top: d.y,\n        left: d.x,\n        behavior: isSync ? 'auto' : 'smooth',\n      });\n    } else {\n      try {\n        (target as Element).scrollTo({\n          top: d.y,\n          left: d.x,\n          behavior: isSync ? 'auto' : 'smooth',\n        });\n      } catch (error) {\n        /**\n         * Seldomly we may found scroll target was removed before\n         * its last scroll event.\n         */\n      }\n    }\n  }\n\n  private applyInput(d: inputData) {\n    const target = this.mirror.getNode(d.id);\n    if (!target) {\n      return this.debugNodeNotFound(d, d.id);\n    }\n    try {\n      (target as HTMLInputElement).checked = d.isChecked;\n      (target as HTMLInputElement).value = d.text;\n    } catch (error) {\n      // for safe\n    }\n  }\n\n  private applySelection(d: selectionData) {\n    try {\n      const selectionSet = new Set<Selection>();\n      const ranges = d.ranges.map(({ start, startOffset, end, endOffset }) => {\n        const startContainer = this.mirror.getNode(start);\n        const endContainer = this.mirror.getNode(end);\n\n        if (!startContainer || !endContainer) return;\n\n        const result = new Range();\n\n        result.setStart(startContainer, startOffset);\n        result.setEnd(endContainer, endOffset);\n        const doc = startContainer.ownerDocument;\n        const selection = doc?.getSelection();\n        selection && selectionSet.add(selection);\n\n        return {\n          range: result,\n          selection,\n        };\n      });\n\n      selectionSet.forEach((s) => s.removeAllRanges());\n\n      ranges.forEach((r) => r && r.selection?.addRange(r.range));\n    } catch (error) {\n      // for safe\n    }\n  }\n\n  private applyStyleSheetMutation(\n    data: styleDeclarationData | styleSheetRuleData,\n  ) {\n    let styleSheet: CSSStyleSheet | null = null;\n    if (data.styleId) styleSheet = this.styleMirror.getStyle(data.styleId);\n    else if (data.id)\n      styleSheet =\n        (this.mirror.getNode(data.id) as HTMLStyleElement)?.sheet || null;\n    if (!styleSheet) return;\n    if (data.source === IncrementalSource.StyleSheetRule)\n      this.applyStyleSheetRule(data, styleSheet);\n    else if (data.source === IncrementalSource.StyleDeclaration)\n      this.applyStyleDeclaration(data, styleSheet);\n  }\n\n  private applyStyleSheetRule(\n    data: styleSheetRuleData,\n    styleSheet: CSSStyleSheet,\n  ) {\n    data.adds?.forEach(({ rule, index: nestedIndex }) => {\n      try {\n        if (Array.isArray(nestedIndex)) {\n          const { positions, index } = getPositionsAndIndex(nestedIndex);\n          const nestedRule = getNestedRule(styleSheet.cssRules, positions);\n          // Null check: parent rule may not exist due to timing/ordering issues\n          nestedRule?.insertRule(rule, index);\n        } else {\n          const index =\n            nestedIndex === undefined\n              ? undefined\n              : Math.min(nestedIndex, styleSheet.cssRules.length);\n          styleSheet?.insertRule(rule, index);\n        }\n      } catch (e) {\n        /**\n         * sometimes we may capture rules with browser prefix\n         * insert rule with prefixs in other browsers may cause Error\n         */\n        /**\n         * accessing styleSheet rules may cause SecurityError\n         * for specific access control settings\n         */\n      }\n    });\n\n    data.removes?.forEach(({ index: nestedIndex }) => {\n      try {\n        if (Array.isArray(nestedIndex)) {\n          const { positions, index } = getPositionsAndIndex(nestedIndex);\n          const nestedRule = getNestedRule(styleSheet.cssRules, positions);\n          // Null check: parent rule may not exist due to timing/ordering issues\n          nestedRule?.deleteRule(index || 0);\n        } else {\n          styleSheet?.deleteRule(nestedIndex);\n        }\n      } catch (e) {\n        /**\n         * same as insertRule\n         */\n      }\n    });\n\n    if (typeof data.replace === 'string')\n      try {\n        void styleSheet.replace?.(data.replace);\n      } catch (e) {\n        // for safety\n      }\n\n    if (typeof data.replaceSync === 'string')\n      try {\n        styleSheet.replaceSync?.(data.replaceSync);\n      } catch (e) {\n        // for safety\n      }\n  }\n\n  /**\n   * Apply a StyleDeclaration event (setProperty/removeProperty) to a stylesheet.\n   *\n   * Uses defensive null checks because the rule may not exist:\n   * - Timing issues: The rule was added by a previous StyleSheetRule event\n   *   that hasn't been processed yet\n   * - Dynamic stylesheets: Constructed stylesheets or adopted stylesheets\n   *   may not be fully synchronized\n   * - Nested rules: Rules inside @media/@supports require the parent rule\n   *   to exist first\n   */\n  private applyStyleDeclaration(\n    data: styleDeclarationData,\n    styleSheet: CSSStyleSheet,\n  ) {\n    if (data.set) {\n      const rule = getNestedRule(\n        styleSheet.rules,\n        data.index,\n      ) as unknown as CSSStyleRule;\n      // Null check: rule may not exist due to timing/ordering issues\n      if (rule?.style) {\n        rule.style.setProperty(\n          data.set.property,\n          data.set.value,\n          data.set.priority,\n        );\n      }\n    }\n\n    if (data.remove) {\n      const rule = getNestedRule(\n        styleSheet.rules,\n        data.index,\n      ) as unknown as CSSStyleRule;\n      // Null check: rule may not exist due to timing/ordering issues\n      if (rule?.style) {\n        rule.style.removeProperty(data.remove.property);\n      }\n    }\n  }\n\n  private applyAdoptedStyleSheet(data: adoptedStyleSheetData) {\n    const targetHost = this.mirror.getNode(data.id);\n    if (!targetHost) return;\n    // Create StyleSheet objects which will be adopted after.\n    data.styles?.forEach((style) => {\n      let newStyleSheet: CSSStyleSheet | null = null;\n      /**\n       * Constructed StyleSheet can't share across multiple documents.\n       * The replayer has to get the correct host window to recreate a StyleSheetObject.\n       */\n      let hostWindow: IWindow | null = null;\n      if (hasShadowRoot(targetHost))\n        hostWindow = targetHost.ownerDocument?.defaultView || null;\n      else if (targetHost.nodeName === '#document')\n        hostWindow = (targetHost as Document).defaultView;\n\n      if (!hostWindow) return;\n      try {\n        newStyleSheet = new hostWindow.CSSStyleSheet();\n        this.styleMirror.add(newStyleSheet, style.styleId);\n        // To reuse the code of applying stylesheet rules\n        this.applyStyleSheetRule(\n          {\n            source: IncrementalSource.StyleSheetRule,\n            adds: style.rules,\n          },\n          newStyleSheet,\n        );\n      } catch (e) {\n        // In case some browsers don't support constructing StyleSheet.\n      }\n    });\n\n    const MAX_RETRY_TIME = 10;\n    let count = 0;\n    const adoptStyleSheets = (targetHost: Node, styleIds: number[]) => {\n      const stylesToAdopt = styleIds\n        .map((styleId) => this.styleMirror.getStyle(styleId))\n        .filter((style) => style !== null) as CSSStyleSheet[];\n      if (hasShadowRoot(targetHost))\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        (targetHost as HTMLElement).shadowRoot!.adoptedStyleSheets =\n          stylesToAdopt;\n      else if (targetHost.nodeName === '#document')\n        (targetHost as Document).adoptedStyleSheets = stylesToAdopt;\n\n      /**\n       * In the live mode where events are transferred over network without strict order guarantee, some newer events are applied before some old events and adopted stylesheets may haven't been created.\n       * This retry mechanism can help resolve this situation.\n       */\n      if (stylesToAdopt.length !== styleIds.length && count < MAX_RETRY_TIME) {\n        setTimeout(\n          () => adoptStyleSheets(targetHost, styleIds),\n          0 + 100 * count,\n        );\n        count++;\n      }\n    };\n    adoptStyleSheets(targetHost, data.styleIds);\n  }\n\n  private legacy_resolveMissingNode(\n    map: missingNodeMap,\n    parent: Node | RRNode,\n    target: Node | RRNode,\n    targetMutation: addedNodeMutation,\n  ) {\n    const { previousId, nextId } = targetMutation;\n    const previousInMap = previousId && map[previousId];\n    const nextInMap = nextId && map[nextId];\n    if (previousInMap) {\n      const { node, mutation } = previousInMap;\n      parent.insertBefore(node as Node & RRNode, target as Node & RRNode);\n      delete map[mutation.node.id];\n      delete this.legacy_missingNodeRetryMap[mutation.node.id];\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(map, parent, node, mutation);\n      }\n    }\n    if (nextInMap) {\n      const { node, mutation } = nextInMap;\n      parent.insertBefore(\n        node as Node & RRNode,\n        target.nextSibling as Node & RRNode,\n      );\n      delete map[mutation.node.id];\n      delete this.legacy_missingNodeRetryMap[mutation.node.id];\n      if (mutation.previousId || mutation.nextId) {\n        this.legacy_resolveMissingNode(map, parent, node, mutation);\n      }\n    }\n  }\n\n  private moveAndHover(\n    x: number,\n    y: number,\n    id: number,\n    isSync: boolean,\n    debugData: incrementalData,\n  ) {\n    const target = this.mirror.getNode(id);\n    if (!target) {\n      return this.debugNodeNotFound(debugData, id);\n    }\n\n    const base = getBaseDimension(target, this.iframe);\n    const _x = x * base.absoluteScale + base.x;\n    const _y = y * base.absoluteScale + base.y;\n\n    this.mouse.style.left = `${_x}px`;\n    this.mouse.style.top = `${_y}px`;\n    if (!isSync) {\n      this.drawMouseTail({ x: _x, y: _y });\n    }\n    this.hoverElements(target as Element);\n  }\n\n  private drawMouseTail(position: { x: number; y: number }) {\n    if (!this.mouseTail) {\n      return;\n    }\n\n    const { lineCap, lineWidth, strokeStyle, duration } =\n      this.config.mouseTail === true\n        ? defaultMouseTailConfig\n        : Object.assign({}, defaultMouseTailConfig, this.config.mouseTail);\n\n    const draw = () => {\n      if (!this.mouseTail) {\n        return;\n      }\n      const ctx = this.mouseTail.getContext('2d');\n      if (!ctx || !this.tailPositions.length) {\n        return;\n      }\n      ctx.clearRect(0, 0, this.mouseTail.width, this.mouseTail.height);\n      ctx.beginPath();\n      ctx.lineWidth = lineWidth;\n      ctx.lineCap = lineCap;\n      ctx.strokeStyle = strokeStyle;\n      ctx.moveTo(this.tailPositions[0].x, this.tailPositions[0].y);\n      this.tailPositions.forEach((p) => ctx.lineTo(p.x, p.y));\n      ctx.stroke();\n    };\n\n    this.tailPositions.push(position);\n    draw();\n    setTimeout(() => {\n      this.tailPositions = this.tailPositions.filter((p) => p !== position);\n      draw();\n    }, duration / this.speedService.state.context.timer.speed);\n  }\n\n  private hoverElements(el: Element) {\n    (this.lastHoveredRootNode || this.iframe.contentDocument)\n      ?.querySelectorAll('.\\\\:hover')\n      .forEach((hoveredEl) => {\n        hoveredEl.classList.remove(':hover');\n      });\n    this.lastHoveredRootNode = el.getRootNode() as Document | ShadowRoot;\n    let currentEl: Element | null = el;\n    while (currentEl) {\n      if (currentEl.classList) {\n        currentEl.classList.add(':hover');\n      }\n      currentEl = currentEl.parentElement;\n    }\n  }\n\n  private isUserInteraction(event: eventWithTime): boolean {\n    if (event.type !== EventType.IncrementalSnapshot) {\n      return false;\n    }\n    return (\n      event.data.source > IncrementalSource.Mutation &&\n      event.data.source <= IncrementalSource.Input\n    );\n  }\n\n  private backToNormal() {\n    this.nextUserInteractionEvent = null;\n    if (this.speedService.state.matches('normal')) {\n      return;\n    }\n    this.speedService.send({ type: 'BACK_TO_NORMAL' });\n    this.emitter.emit(ReplayerEvents.SkipEnd, {\n      speed: this.speedService.state.context.normalSpeed,\n    });\n  }\n\n  private warnNodeNotFound(d: incrementalData, id: number) {\n    this.warn(`Node with id '${id}' not found. `, d);\n  }\n\n  private warnCanvasMutationFailed(\n    d: canvasMutationData | canvasMutationCommand,\n    error: unknown,\n  ) {\n    this.warn(`Has error on canvas update`, error, 'canvas mutation:', d);\n  }\n\n  private debugNodeNotFound(d: incrementalData, id: number) {\n    /**\n     * There maybe some valid scenes of node not being found.\n     * Because DOM events are macrotask and MutationObserver callback\n     * is microtask, so events fired on a removed DOM may emit\n     * snapshots in the reverse order.\n     */\n    this.debug(`Node with id '${id}' not found. `, d);\n  }\n\n  private warn(...args: Parameters<typeof console.warn>) {\n    if (!this.config.showWarning) {\n      return;\n    }\n    this.config.logger.warn(REPLAY_CONSOLE_PREFIX, ...args);\n  }\n\n  private debug(...args: Parameters<typeof console.log>) {\n    if (!this.config.showDebug) {\n      return;\n    }\n    this.config.logger.log(REPLAY_CONSOLE_PREFIX, ...args);\n  }\n}\n\nexport { type PlayerMachineState, type SpeedMachineState, type playerConfig };\n", "import record from './record';\nimport {\n  Replayer,\n  type playerConfig,\n  type PlayerMachineState,\n  type SpeedMachineState,\n} from './replay';\nimport canvasMutation from './replay/canvas';\nimport { _mirror } from './utils';\nimport * as utils from './utils';\n\nexport {\n  EventType,\n  IncrementalSource,\n  MouseInteractions,\n  ReplayerEvents,\n  type eventWithTime,\n  type annotationData,\n  type annotationEvent,\n} from '@rrweb/types';\n\n// exports style.css from replay\nimport './replay/styles/style.css';\n\nexport type { recordOptions, ReplayPlugin } from './types';\n\nconst { addCustomEvent, addAnnotation } = record;\nconst { freezePage } = record;\nconst { takeFullSnapshot } = record;\n\nexport {\n  record,\n  addCustomEvent,\n  addAnnotation,\n  freezePage,\n  takeFullSnapshot,\n  Replayer,\n  type playerConfig,\n  type PlayerMachineState,\n  type SpeedMachineState,\n  canvasMutation,\n  _mirror as mirror,\n  utils,\n};\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAIA,aAAW,OAAO;AACtB,IAAIC,cAAY,OAAO;AACvB,IAAIC,qBAAmB,OAAO;AAC9B,IAAIC,sBAAoB,OAAO;AAC/B,IAAIC,iBAAe,OAAO;AAC1B,IAAIC,iBAAe,OAAO,UAAU;AACpC,IAAIC,kBAAAA,CAAiB,IAAI,QAAA,OAAe,QAAQ,IAAI,MAAM,EAAE,SA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AQ;AAElC,kBAAY,UAAU;IACxB;EACF;EAEA,kBAA0B,OAA+B;AACvD,QAAI,MAAM,SAAS,UAAU,oBAC3B,QAAO;AAET,WACE,MAAM,KAAK,SAAS,kBAAkB,YACtC,MAAM,KAAK,UAAU,kBAAkB;EAE3C;EAEA,eAAuB;AACrB,SAAK,2BAA2B;AAChC,QAAI,KAAK,aAAa,MAAM,QAAQ,QAAQ,EAC1C;AAEF,SAAK,aAAa,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACjD,SAAK,QAAQ,KAAK,eAAe,SAAS,EACxC,OAAO,KAAK,aAAa,MAAM,QAAQ,YACzC,CAAC;EACH;EAEA,iBAAyB,GAAoB,IAAY;AACvD,SAAK,KAAK,iBAAiB,EAAA,iBAAmB,CAAC;EACjD;EAEA,yBACE,GACA,OACA;AACA,SAAK,KAAK,8BAA8B,OAAO,oBAAoB,CAAC;EACtE;EAEA,kBAA0B,GAAoB,IAAY;AAOxD,SAAK,MAAM,iBAAiB,EAAA,iBAAmB,CAAC;EAClD;EAEA,QAAgB,MAAuC;AACrD,QAAI,CAAC,KAAK,OAAO,YACf;AAEF,SAAK,OAAO,OAAO,KAAK,uBAAuB,GAAG,IAAI;EACxD;EAEA,SAAiB,MAAsC;AACrD,QAAI,CAAC,KAAK,OAAO,UACf;AAEF,SAAK,OAAO,OAAO,IAAI,uBAAuB,GAAG,IAAI;EACvD;AACF;ACvvEA,IAAM,EAAE,gBAAgB,cAAA,IAAkB;AAC1C,IAAM,EAAE,WAAA,IAAe;AACvB,IAAM,EAAE,iBAAA,IAAqB;;;;;;;;;;;;;;;;;;;;;;;;",
  "names": ["__create", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__getProtoOf", "__hasOwnProp", "__commonJSMin", "__copyProps", "i", "n", "__toESM", "NodeType", "testableAccessors", "testableMethods", "untaintedBasePrototype", "untaintedBaseIframeCleanup", "mutationObserverUsers", "angularZoneUnpatchedAlternative", "_a", "getUntaintedPrototype", "e", "untaintedAccessorCache", "getUntaintedAccessor", "untaintedMethodCache", "getUntaintedMethod", "ownerDocument", "childNodes", "parentNode", "parentElement", "textContent", "firstChild", "lastChild", "nextSibling", "previousSibling", "contains", "getRootNode", "host", "styleSheets", "shadowRoot", "querySelector", "querySelectorAll", "mutationObserverCtor", "nowTimestamp", "patch", "src_default", "s", "rules", "Mirror", "createMirror", "a", "cssNormalizeBase", "getValidTagName", "chars", "c", "mirror", "require_picocolors_browser", "exports", "module", "require___vite_browser_external", "require_css_syntax_error", "CssSyntaxError", "spacing", "require_stringifier", "Stringifier", "require_stringify", "require_symbols", "require_node", "Node", "fixed", "require_comment", "require_declaration", "require_container", "Container", "require_at_rule", "require_document", "Document", "require_non_secure", "require_previous_map", "require_input", "l", "require_root", "require_list", "value", "require_rule", "require_fromJSON", "require_map_generator", "require_tokenize", "require_parser", "require_parse", "require_warning", "require_result", "require_warn_once", "require_lazy_result", "LazyResult", "visit", "require_no_work_result", "self", "require_processor", "import_postcss", "BaseRRNode", "BaseRRDocument", "hyphenateRE", "canvasMutation", "oldChild", "RRDocument", "dom", "polyfill", "EventType", "IncrementalSource", "MouseInteractions", "PointerTypes", "CanvasContext", "MediaInteractions", "ReplayerEvents", "text", "v", "FontFace", "o", "variableListFor", "ImageBitmapDataURLWorker", "type", "r", "takeFullSnapshot", "errorHandler", "t", "Element", "u", "interpret", "createMachine", "assign", "image", "canvas2DMutation", "RRNode", "mittProxy.default", "mittProxy", "getInjectStyleRules", "targetHost"]
}
