export declare function addHoverClass(cssText: string, cache: BuildCache): string; export declare type attributes = { [key: string]: string | number | true | null; }; export declare type BuildCache = { stylesWithHoverClass: Map; }; export declare function buildNodeWithSN(n: serializedNodeWithId, options: { doc: Document; mirror: Mirror; skipChild?: boolean; hackCss: boolean; afterAppend?: (n: Node, id: number) => unknown; cache: BuildCache; }): Node | null; export declare type cdataNode = { type: NodeType.CDATA; textContent: ''; }; export declare function classMatchesRegex(node: Node | null, regex: RegExp, checkAncestors: boolean): boolean; export declare function cleanupSnapshot(): void; declare function clearTimeout_2(...rest: Parameters): ReturnType; export { clearTimeout_2 as clearTimeout } export declare type commentNode = { type: NodeType.Comment; textContent: string; }; export declare function createCache(): BuildCache; export declare function createMatchPredicate(className: string | RegExp | null, selector: string | null): (node: Node) => boolean; export declare function createMirror(): Mirror; declare interface CSSImportRule_2 extends CSSRule { readonly href: string; readonly layerName: string | null; readonly media: MediaList; readonly styleSheet: CSSStyleSheet; readonly supportsText?: string | null; } export declare type DataURLOptions = Partial<{ type: string; quality: number; }>; export declare function distanceToMatch(node: Node | null, matchPredicate: (node: Node) => boolean, limit?: number, distance?: number): number; export declare type documentNode = { type: NodeType.Document; childNodes: serializedNodeWithId[]; compatMode?: string; }; export declare type documentTypeNode = { type: NodeType.DocumentType; name: string; publicId: string; systemId: string; }; export declare type elementNode = { type: NodeType.Element; tagName: string; attributes: attributes; childNodes: serializedNodeWithId[]; isSVG?: true; needBlock?: boolean; isCustom?: true; }; export declare function escapeImportStatement(rule: CSSImportRule_2): string; export declare function extractFileExtension(path: string, baseURL?: string): string | null; export declare function filterCSSPropertiesFromInlineStyle(cssText: string, ignoredProperties: Set): string; export declare function fixAllCssProperty(rule: CSSStyleRule): string; export declare function fixSafariColons(cssStringified: string): string; export declare function genId(): number; export declare function getIFrameContentDocument(iframe?: HTMLIFrameElement): Document | null | undefined; export declare function getIFrameContentWindow(iframe?: HTMLIFrameElement): Window | null | undefined; export declare function getInputType(element: HTMLElement): Lowercase | null; export declare function getInputValue(el: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLOptionElement, tagName: Uppercase, type: Lowercase | null): string; export declare interface ICanvas extends HTMLCanvasElement { __context: string; } export declare type idNodeMap = Map; export declare function ignoreAttribute(tagName: string, name: string, _value: unknown): boolean; export declare const IGNORED_NODE = -2; export declare interface IMirror { getId(n: TNode | undefined | null): number; getNode(id: number): TNode | null; getIds(): number[]; getMeta(n: TNode): serializedNodeWithId | null; removeNodeFromMap(n: TNode): void; has(id: number): boolean; hasNode(node: TNode): boolean; add(n: TNode, meta: serializedNodeWithId): void; replace(id: number, n: TNode): void; reset(): void; } export declare interface INode extends Node { __sn: serializedNodeWithId; } export declare function is2DCanvasBlank(canvas: HTMLCanvasElement): boolean; export declare function isCSSImportRule(rule: CSSRule): rule is CSSImportRule_2; export declare function isCSSStyleRule(rule: CSSRule): rule is CSSStyleRule; export declare function isElement(n: Node): n is Element; export declare function isNativeShadowDom(shadowRoot: ShadowRoot): boolean; export declare function isNodeMetaEqual(a: serializedNode, b: serializedNode): boolean; export declare function isShadowRoot(n: Node): n is ShadowRoot; export declare type KeepIframeSrcFn = (src: string) => boolean; export declare type legacyAttributes = { selected: false; }; export declare type MaskAttributeFn = (attributeName: string, attributeValue: string, element: HTMLElement) => string; export declare type MaskInputFn = (text: string, element: HTMLElement) => string; export declare type MaskInputOptions = Partial<{ color: boolean; date: boolean; 'datetime-local': boolean; email: boolean; month: boolean; number: boolean; range: boolean; search: boolean; tel: boolean; text: boolean; time: boolean; url: boolean; week: boolean; textarea: boolean; select: boolean; radio: boolean; checkbox: boolean; }>; export declare function maskInputValue({ isMasked, element, value, maskInputFn, }: { isMasked: boolean; element: HTMLElement; value: string | null; maskInputFn?: MaskInputFn; }): string; export declare type MaskTextFn = (text: string, element: HTMLElement | null) => string; export declare class Mirror implements IMirror { private idNodeMap; private nodeMetaMap; getId(n: Node | undefined | null): number; getNode(id: number): Node | null; getIds(): number[]; getMeta(n: Node): serializedNodeWithId | null; removeNodeFromMap(n: Node): void; has(id: number): boolean; hasNode(node: Node): boolean; add(n: Node, meta: serializedNodeWithId): void; replace(id: number, n: Node): void; reset(): void; } export declare function needMaskingText(node: Node, maskTextClass: string | RegExp, maskTextSelector: string | null, unmaskTextClass: string | RegExp | null, unmaskTextSelector: string | null, maskAllText: boolean): boolean; export declare type nodeMetaMap = WeakMap; export declare enum NodeType { Document = 0, DocumentType = 1, Element = 2, Text = 3, CDATA = 4, Comment = 5 } export declare function onRequestAnimationFrame(...rest: Parameters): ReturnType; export declare function rebuild(n: serializedNodeWithId, options: { doc: Document; onVisit?: (node: Node) => unknown; hackCss?: boolean; afterAppend?: (n: Node, id: number) => unknown; cache: BuildCache; mirror: Mirror; }): Node | null; export declare type serializedElementNodeWithId = Extract>; export declare type serializedNode = (documentNode | documentTypeNode | elementNode | textNode | cdataNode | commentNode) & { rootId?: number; isShadowHost?: boolean; isShadow?: boolean; }; export declare type serializedNodeWithId = serializedNode & { id: number; }; export declare function serializeNodeWithId(n: Node, options: { doc: Document; mirror: Mirror; blockClass: string | RegExp; blockSelector: string | null; unblockSelector: string | null; maskTextClass: string | RegExp; unmaskTextClass: string | RegExp | null; maskTextSelector: string | null; unmaskTextSelector: string | null; skipChild: boolean; inlineStylesheet: boolean; newlyAddedElement?: boolean; maskInputOptions?: MaskInputOptions; maskAllText: boolean; maskAttributeFn: MaskAttributeFn | undefined; maskTextFn: MaskTextFn | undefined; maskInputFn: MaskInputFn | undefined; slimDOMOptions: SlimDOMOptions; dataURLOptions?: DataURLOptions; keepIframeSrcFn?: KeepIframeSrcFn; inlineImages?: boolean; recordCanvas?: boolean; preserveWhiteSpace?: boolean; onSerialize?: (n: Node) => unknown; onIframeLoad?: (iframeNode: HTMLIFrameElement, node: serializedElementNodeWithId) => unknown; iframeLoadTimeout?: number; onBlockedImageLoad?: (imageEl: HTMLImageElement, node: serializedElementNodeWithId, rect: DOMRect) => unknown; onStylesheetLoad?: (linkNode: HTMLLinkElement, node: serializedElementNodeWithId) => unknown; stylesheetLoadTimeout?: number; ignoreCSSAttributes?: Set; }): serializedNodeWithId | null; declare function setTimeout_2(...rest: Parameters): ReturnType; export { setTimeout_2 as setTimeout } export declare function shouldMaskInput({ maskInputOptions, tagName, type, }: { maskInputOptions: MaskInputOptions; tagName: Uppercase; type: Lowercase | null; }): boolean; export declare type SlimDOMOptions = Partial<{ script: boolean; comment: boolean; headFavicon: boolean; headWhitespace: boolean; headMetaDescKeywords: boolean; headMetaSocial: boolean; headMetaRobots: boolean; headMetaHttpEquiv: boolean; headMetaAuthorship: boolean; headMetaVerification: boolean; }>; export declare function snapshot(n: Document, options?: { mirror?: Mirror; blockClass?: string | RegExp; blockSelector?: string | null; unblockSelector?: string | null; maskAllText?: boolean; maskTextClass?: string | RegExp; unmaskTextClass?: string | RegExp | null; maskTextSelector?: string | null; unmaskTextSelector?: string | null; inlineStylesheet?: boolean; maskAllInputs?: boolean | MaskInputOptions; maskAttributeFn?: MaskAttributeFn; maskTextFn?: MaskTextFn; maskInputFn?: MaskInputFn; slimDOM?: 'all' | boolean | SlimDOMOptions; dataURLOptions?: DataURLOptions; inlineImages?: boolean; recordCanvas?: boolean; preserveWhiteSpace?: boolean; onSerialize?: (n: Node) => unknown; onIframeLoad?: (iframeNode: HTMLIFrameElement, node: serializedElementNodeWithId) => unknown; iframeLoadTimeout?: number; onBlockedImageLoad?: (imageEl: HTMLImageElement, node: serializedElementNodeWithId, rect: DOMRect) => unknown; onStylesheetLoad?: (linkNode: HTMLLinkElement, node: serializedElementNodeWithId) => unknown; stylesheetLoadTimeout?: number; keepIframeSrcFn?: KeepIframeSrcFn; ignoreCSSAttributes?: Set; }): serializedNodeWithId | null; export declare function stringifyRule(rule: CSSRule): string; export declare function stringifyStylesheet(s: CSSStyleSheet): string | null; export declare type tagMap = { [key: string]: string; }; export declare type textNode = { type: NodeType.Text; textContent: string; isStyle?: true; }; export declare function toLowerCase(str: T): Lowercase; export declare function toUpperCase(str: T): Uppercase; export declare function transformAttribute(doc: Document, tagName: Lowercase, name: Lowercase, value: string | null, element: HTMLElement, maskAttributeFn: MaskAttributeFn | undefined, ignoreCSSAttributes?: Set): string | null; export declare function visitSnapshot(node: serializedNodeWithId, onVisit: (node: serializedNodeWithId) => unknown): void; export { }