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CACL,KAAM,UAEN,KAAM,CACL,aAAa,EACb,YACC,4DACD,IAAK,4EAGN,SAAU,CACT,SACC,8DAIH,OAAO,IACC,CACN,QAAA,CAAS,GACR,MAAM,KAAE,GAAS,EAAK,KACT,WAAT,GAA8B,UAAT,GACxB,EAAQ,OAAO,CACd,IAAK,EAAK,IACV,UAAW,WACX,KAAM,CAAE,SAGX,KAKH,IAAI,MAAQ,CACR,oBAAqB,OACrB,gBAAiB,OACjB,uBAAwB,OACxB,mBAAoB,OACpB,YAAa,OACb,oBAAqB,MAazB,MAAM,OAAS,CACd,KAAM,CACL,KAAM,eACN,QAAS,UAEV,UAAW,CACV,KAAM,IAAI,aAAa,CAAE,KAAM,SAC/B,MAAO,IAAI,aAAa,CAAE,KAAM,UAChC,MAAO,IAAI,aAAa,CAAE,KAAM,WAEjC,YACA,QAAS,CACR,YAAa,CACZ,QAAS,CAAC,EACV,MAAO,WAOT,OAAO,QAAQ,YAAY,QAAQ,KAAO,cAGlC,aAAc,eAAgB","file":"/npm/@eslint/json@0.14.0/dist/esm/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@eslint/json@0.14.0/dist/esm/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\n/**\n * @import { DocumentNode, AnyNode, Token, LocationRange, MemberNode } from \"@humanwhocodes/momoa\"\n * @import { FileProblem, DirectiveType, RulesConfig, Language, OkParseResult, ParseResult, File } from \"@eslint/core\"\n * @import { JSONSyntaxElement, JSONRuleDefinition } from \"./types.ts\"\n */\n// @ts-self-types=\"./index.d.ts\"\nimport { iterator, visitorKeys, parse } from '@humanwhocodes/momoa';\nimport { ConfigCommentParser, TextSourceCodeBase, Directive, VisitNodeStep } from '@eslint/plugin-kit';\nimport naturalCompare from 'natural-compare';\n\n/**\n * @fileoverview The JSONSourceCode class.\n * @author Nicholas C. Zakas\n */\n\n\n//-----------------------------------------------------------------------------\n// Types\n//-----------------------------------------------------------------------------\n\n/**\n */\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\nconst commentParser = new ConfigCommentParser();\n\nconst INLINE_CONFIG =\n\t/^\\s*eslint(?:-enable|-disable(?:(?:-next)?-line)?)?(?:\\s|$)/u;\n\n/**\n * A class to represent a step in the traversal process.\n */\nclass JSONTraversalStep extends VisitNodeStep {\n\t/**\n\t * The target of the step.\n\t * @type {AnyNode}\n\t */\n\ttarget = undefined;\n\n\t/**\n\t * Creates a new instance.\n\t * @param {Object} options The options for the step.\n\t * @param {AnyNode} options.target The target of the step.\n\t * @param {1|2} options.phase The phase of the step.\n\t * @param {Array<any>} options.args The arguments of the step.\n\t */\n\tconstructor({ target, phase, args }) {\n\t\tsuper({ target, phase, args });\n\n\t\tthis.target = target;\n\t}\n}\n\n/**\n * Processes tokens to extract comments and their starting tokens.\n * @param {Array<Token>} tokens The tokens to process.\n * @returns {{ comments: Array<Token>, starts: Map<number, number>, ends: Map<number, number>}}\n * An object containing an array of comments, a map of starting token range to token index, and\n * a map of ending token range to token index.\n */\nfunction processTokens(tokens) {\n\t/** @type {Array<Token>} */\n\tconst comments = [];\n\n\t/** @type {Map<number, number>} */\n\tconst starts = new Map();\n\n\t/** @type {Map<number, number>} */\n\tconst ends = new Map();\n\n\tfor (let i = 0; i < tokens.length; i++) {\n\t\tconst token = tokens[i];\n\n\t\tif (token.type.endsWith(\"Comment\")) {\n\t\t\tcomments.push(token);\n\t\t}\n\n\t\tstarts.set(token.range[0], i);\n\t\tends.set(token.range[1], i);\n\t}\n\n\treturn { comments, starts, ends };\n}\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * JSON Source Code Object\n * @extends {TextSourceCodeBase<{LangOptions: JSONLanguageOptions, RootNode: DocumentNode, SyntaxElementWithLoc: JSONSyntaxElement, ConfigNode: Token}>}\n */\nclass JSONSourceCode extends TextSourceCodeBase {\n\t/**\n\t * Cached traversal steps.\n\t * @type {Array<JSONTraversalStep>|undefined}\n\t */\n\t#steps;\n\n\t/**\n\t * Cache of parent nodes.\n\t * @type {WeakMap<AnyNode, AnyNode>}\n\t */\n\t#parents = new WeakMap();\n\n\t/**\n\t * Collection of inline configuration comments.\n\t * @type {Array<Token>}\n\t */\n\t#inlineConfigComments;\n\n\t/**\n\t * The AST of the source code.\n\t * @type {DocumentNode}\n\t */\n\tast = undefined;\n\n\t/**\n\t * The comment tokens in the source code.\n\t * @type {Array<Token>|undefined}\n\t */\n\tcomments;\n\n\t/**\n\t * A map of token start positions to their corresponding index.\n\t * @type {Map<number, number>}\n\t */\n\t#tokenStarts;\n\n\t/**\n\t * A map of token end positions to their corresponding index.\n\t * @type {Map<number, number>}\n\t */\n\t#tokenEnds;\n\n\t/**\n\t * Creates a new instance.\n\t * @param {Object} options The options for the instance.\n\t * @param {string} options.text The source code text.\n\t * @param {DocumentNode} options.ast The root AST node.\n\t */\n\tconstructor({ text, ast }) {\n\t\tsuper({ text, ast, lineEndingPattern: /\\r\\n|[\\r\\n]/u });\n\t\tthis.ast = ast;\n\n\t\tconst { comments, starts, ends } = processTokens(this.ast.tokens ?? []);\n\t\tthis.comments = comments;\n\t\tthis.#tokenStarts = starts;\n\t\tthis.#tokenEnds = ends;\n\t}\n\n\t/**\n\t * Returns the value of the given comment.\n\t * @param {Token} comment The comment to get the value of.\n\t * @returns {string} The value of the comment.\n\t * @throws {Error} When an unexpected comment type is passed.\n\t */\n\t#getCommentValue(comment) {\n\t\tif (comment.type === \"LineComment\") {\n\t\t\treturn this.getText(comment).slice(2); // strip leading `//`\n\t\t}\n\n\t\tif (comment.type === \"BlockComment\") {\n\t\t\treturn this.getText(comment).slice(2, -2); // strip leading `/*` and trailing `*/`\n\t\t}\n\n\t\tthrow new Error(`Unexpected comment type '${comment.type}'`);\n\t}\n\n\t/**\n\t * Returns an array of all inline configuration nodes found in the\n\t * source code.\n\t * @returns {Array<Token>} An array of all inline configuration nodes.\n\t */\n\tgetInlineConfigNodes() {\n\t\tif (!this.#inlineConfigComments) {\n\t\t\tthis.#inlineConfigComments = this.comments.filter(comment =>\n\t\t\t\tINLINE_CONFIG.test(this.#getCommentValue(comment)),\n\t\t\t);\n\t\t}\n\n\t\treturn this.#inlineConfigComments ?? [];\n\t}\n\n\t/**\n\t * Returns directives that enable or disable rules along with any problems\n\t * encountered while parsing the directives.\n\t * @returns {{problems:Array<FileProblem>,directives:Array<Directive>}} Information\n\t *      that ESLint needs to further process the directives.\n\t */\n\tgetDisableDirectives() {\n\t\t/** @type {Array<FileProblem>} */\n\t\tconst problems = [];\n\t\t/** @type {Array<Directive>} */\n\t\tconst directives = [];\n\n\t\tthis.getInlineConfigNodes().forEach(comment => {\n\t\t\tconst { label, value, justification } =\n\t\t\t\tcommentParser.parseDirective(this.#getCommentValue(comment));\n\n\t\t\t// `eslint-disable-line` directives are not allowed to span multiple lines as it would be confusing to which lines they apply\n\t\t\tif (\n\t\t\t\tlabel === \"eslint-disable-line\" &&\n\t\t\t\tcomment.loc.start.line !== comment.loc.end.line\n\t\t\t) {\n\t\t\t\tconst message = `${label} comment should not span multiple lines.`;\n\n\t\t\t\tproblems.push({\n\t\t\t\t\truleId: null,\n\t\t\t\t\tmessage,\n\t\t\t\t\tloc: comment.loc,\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tswitch (label) {\n\t\t\t\tcase \"eslint-disable\":\n\t\t\t\tcase \"eslint-enable\":\n\t\t\t\tcase \"eslint-disable-next-line\":\n\t\t\t\tcase \"eslint-disable-line\": {\n\t\t\t\t\tconst directiveType = label.slice(\"eslint-\".length);\n\n\t\t\t\t\tdirectives.push(\n\t\t\t\t\t\tnew Directive({\n\t\t\t\t\t\t\ttype: /** @type {DirectiveType} */ (directiveType),\n\t\t\t\t\t\t\tnode: comment,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\tjustification,\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// no default\n\t\t\t}\n\t\t});\n\n\t\treturn { problems, directives };\n\t}\n\n\t/**\n\t * Returns inline rule configurations along with any problems\n\t * encountered while parsing the configurations.\n\t * @returns {{problems:Array<FileProblem>,configs:Array<{config:{rules:RulesConfig},loc:LocationRange}>}} Information\n\t *      that ESLint needs to further process the rule configurations.\n\t */\n\tapplyInlineConfig() {\n\t\t/** @type {Array<FileProblem>} */\n\t\tconst problems = [];\n\t\t/** @type {Array<{config:{rules:RulesConfig},loc:LocationRange}>} */\n\t\tconst configs = [];\n\n\t\tthis.getInlineConfigNodes().forEach(comment => {\n\t\t\tconst { label, value } = commentParser.parseDirective(\n\t\t\t\tthis.#getCommentValue(comment),\n\t\t\t);\n\n\t\t\tif (label === \"eslint\") {\n\t\t\t\tconst parseResult = commentParser.parseJSONLikeConfig(value);\n\n\t\t\t\tif (parseResult.ok) {\n\t\t\t\t\tconfigs.push({\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\trules: parseResult.config,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tloc: comment.loc,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tproblems.push({\n\t\t\t\t\t\truleId: null,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t/** @type {{ok: false, error: { message: string }}} */ (\n\t\t\t\t\t\t\t\tparseResult\n\t\t\t\t\t\t\t).error.message,\n\t\t\t\t\t\tloc: comment.loc,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tconfigs,\n\t\t\tproblems,\n\t\t};\n\t}\n\n\t/**\n\t * Returns the parent of the given node.\n\t * @param {AnyNode} node The node to get the parent of.\n\t * @returns {AnyNode|undefined} The parent of the node.\n\t */\n\tgetParent(node) {\n\t\treturn this.#parents.get(node);\n\t}\n\n\t/**\n\t * Traverse the source code and return the steps that were taken.\n\t * @returns {Iterable<JSONTraversalStep>} The steps that were taken while traversing the source code.\n\t */\n\ttraverse() {\n\t\t// Because the AST doesn't mutate, we can cache the steps\n\t\tif (this.#steps) {\n\t\t\treturn this.#steps.values();\n\t\t}\n\n\t\t/** @type {Array<JSONTraversalStep>} */\n\t\tconst steps = (this.#steps = []);\n\n\t\tfor (const { node, parent, phase } of iterator(this.ast)) {\n\t\t\tif (parent) {\n\t\t\t\tthis.#parents.set(\n\t\t\t\t\t/** @type {AnyNode} */ (node),\n\t\t\t\t\t/** @type {AnyNode} */ (parent),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tsteps.push(\n\t\t\t\tnew JSONTraversalStep({\n\t\t\t\t\ttarget: /** @type {AnyNode} */ (node),\n\t\t\t\t\tphase: phase === \"enter\" ? 1 : 2,\n\t\t\t\t\targs: [node, parent],\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\treturn steps;\n\t}\n\n\t/**\n\t * Gets the token before the given node or token, optionally including comments.\n\t * @param {AnyNode|Token} nodeOrToken The node or token to get the previous token for.\n\t * @param {Object} [options] Options object.\n\t * @param {boolean} [options.includeComments] If true, return comments when they are present.\n\t * @returns {Token|null} The previous token or comment, or null if there is none.\n\t */\n\tgetTokenBefore(nodeOrToken, { includeComments = false } = {}) {\n\t\tconst index = this.#tokenStarts.get(nodeOrToken.range[0]);\n\n\t\tif (index === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet previousIndex = index - 1;\n\t\tif (previousIndex < 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst tokens = this.ast.tokens;\n\t\tlet tokenOrComment = tokens[previousIndex];\n\n\t\tif (includeComments) {\n\t\t\treturn tokenOrComment;\n\t\t}\n\n\t\t// skip comments\n\t\twhile (tokenOrComment?.type.endsWith(\"Comment\")) {\n\t\t\tpreviousIndex--;\n\n\t\t\tif (previousIndex < 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\ttokenOrComment = tokens[previousIndex];\n\t\t}\n\t\treturn tokenOrComment;\n\t}\n\n\t/**\n\t * Gets the token after the given node or token, skipping any comments unless includeComments is true.\n\t * @param {AnyNode|Token} nodeOrToken The node or token to get the next token for.\n\t * @param {Object} [options] Options object.\n\t * @param {boolean} [options.includeComments=false] If true, return comments when they are present.\n\t * @returns {Token|null} The next token or comment, or null if there is none.\n\t */\n\tgetTokenAfter(nodeOrToken, { includeComments = false } = {}) {\n\t\tconst index = this.#tokenEnds.get(nodeOrToken.range[1]);\n\n\t\tif (index === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet nextIndex = index + 1;\n\t\tconst tokens = this.ast.tokens;\n\t\tif (nextIndex >= tokens.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet tokenOrComment = tokens[nextIndex];\n\n\t\tif (includeComments) {\n\t\t\treturn tokenOrComment;\n\t\t}\n\n\t\t// skip comments\n\t\twhile (tokenOrComment?.type.endsWith(\"Comment\")) {\n\t\t\tnextIndex++;\n\n\t\t\tif (nextIndex >= tokens.length) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\ttokenOrComment = tokens[nextIndex];\n\t\t}\n\n\t\treturn tokenOrComment;\n\t}\n}\n\n/**\n * @fileoverview The JSONLanguage class.\n * @author Nicholas C. Zakas\n */\n\n\n//-----------------------------------------------------------------------------\n// Types\n//-----------------------------------------------------------------------------\n\n/**\n *\n * @typedef {OkParseResult<DocumentNode>} JSONOkParseResult\n * @typedef {ParseResult<DocumentNode>} JSONParseResult\n *\n * @typedef {Object} JSONLanguageOptions\n * @property {boolean} [allowTrailingCommas] Whether to allow trailing commas in JSONC mode.\n */\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * JSON Language Object\n * @implements {Language<{ LangOptions: JSONLanguageOptions; Code: JSONSourceCode; RootNode: DocumentNode; Node: AnyNode }>}\n */\nclass JSONLanguage {\n\t/**\n\t * The type of file to read.\n\t * @type {\"text\"}\n\t */\n\tfileType = \"text\";\n\n\t/**\n\t * The line number at which the parser starts counting.\n\t * @type {0|1}\n\t */\n\tlineStart = 1;\n\n\t/**\n\t * The column number at which the parser starts counting.\n\t * @type {0|1}\n\t */\n\tcolumnStart = 1;\n\n\t/**\n\t * The name of the key that holds the type of the node.\n\t * @type {string}\n\t */\n\tnodeTypeKey = \"type\";\n\n\t/**\n\t * The parser mode.\n\t * @type {\"json\"|\"jsonc\"|\"json5\"}\n\t */\n\t#mode = \"json\";\n\n\t/**\n\t * The visitor keys.\n\t * @type {Record<string, string[]>}\n\t */\n\tvisitorKeys = Object.fromEntries([...visitorKeys]);\n\n\t/**\n\t * Creates a new instance.\n\t * @param {Object} options The options to use for this instance.\n\t * @param {\"json\"|\"jsonc\"|\"json5\"} options.mode The parser mode to use.\n\t */\n\tconstructor({ mode }) {\n\t\tthis.#mode = mode;\n\t}\n\n\t/**\n\t * Validates the language options.\n\t * @param {JSONLanguageOptions} languageOptions The language options to validate.\n\t * @returns {void}\n\t * @throws {Error} When the language options are invalid.\n\t */\n\tvalidateLanguageOptions(languageOptions) {\n\t\tif (languageOptions.allowTrailingCommas !== undefined) {\n\t\t\tif (typeof languageOptions.allowTrailingCommas !== \"boolean\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"allowTrailingCommas must be a boolean if provided.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// we know that allowTrailingCommas is a boolean here\n\n\t\t\t// only allowed in JSONC mode\n\t\t\tif (this.#mode !== \"jsonc\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"allowTrailingCommas option is only available in JSONC.\",\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Parses the given file into an AST.\n\t * @param {File} file The virtual file to parse.\n\t * @param {{languageOptions: JSONLanguageOptions}} context The options to use for parsing.\n\t * @returns {JSONParseResult} The result of parsing.\n\t */\n\tparse(file, context) {\n\t\t// Note: BOM already removed\n\t\tconst text = /** @type {string} */ (file.body);\n\t\tconst allowTrailingCommas =\n\t\t\tcontext?.languageOptions?.allowTrailingCommas;\n\n\t\t/*\n\t\t * Check for parsing errors first. If there's a parsing error, nothing\n\t\t * else can happen. However, a parsing error does not throw an error\n\t\t * from this method - it's just considered a fatal error message, a\n\t\t * problem that ESLint identified just like any other.\n\t\t */\n\t\ttry {\n\t\t\tconst root = parse(text, {\n\t\t\t\tmode: this.#mode,\n\t\t\t\tranges: true,\n\t\t\t\ttokens: true,\n\t\t\t\tallowTrailingCommas,\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\tok: true,\n\t\t\t\tast: root,\n\t\t\t};\n\t\t} catch (ex) {\n\t\t\t// error messages end with (line:column) so we strip that off for ESLint\n\t\t\tconst message = ex.message\n\t\t\t\t.slice(0, ex.message.lastIndexOf(\"(\"))\n\t\t\t\t.trim();\n\n\t\t\treturn {\n\t\t\t\tok: false,\n\t\t\t\terrors: [\n\t\t\t\t\t{\n\t\t\t\t\t\t...ex,\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\t\t}\n\t}\n\n\t/* eslint-disable class-methods-use-this -- Required to complete interface. */\n\t/**\n\t * Creates a new `JSONSourceCode` object from the given information.\n\t * @param {File} file The virtual file to create a `JSONSourceCode` object from.\n\t * @param {JSONOkParseResult} parseResult The result returned from `parse()`.\n\t * @returns {JSONSourceCode} The new `JSONSourceCode` object.\n\t */\n\tcreateSourceCode(file, parseResult) {\n\t\treturn new JSONSourceCode({\n\t\t\ttext: /** @type {string} */ (file.body),\n\t\t\tast: parseResult.ast,\n\t\t});\n\t}\n\t/* eslint-enable class-methods-use-this -- Required to complete interface. */\n}\n\nconst rules$1 = /** @type {const} */ ({\n    \"json/no-duplicate-keys\": \"error\",\n    \"json/no-empty-keys\": \"error\",\n    \"json/no-unnormalized-keys\": \"error\",\n    \"json/no-unsafe-values\": \"error\"\n});\n\n/**\n * @fileoverview Rule to prevent duplicate keys in JSON.\n * @author Nicholas C. Zakas\n */\n\n//-----------------------------------------------------------------------------\n// Type Definitions\n//-----------------------------------------------------------------------------\n\n/**\n *\n * @typedef {\"duplicateKey\"} NoDuplicateKeysMessageIds\n * @typedef {JSONRuleDefinition<{ MessageIds: NoDuplicateKeysMessageIds }>} NoDuplicateKeysRuleDefinition\n */\n\n//-----------------------------------------------------------------------------\n// Rule Definition\n//-----------------------------------------------------------------------------\n\n/** @type {NoDuplicateKeysRuleDefinition} */\nconst rule$5 = {\n\tmeta: {\n\t\ttype: \"problem\",\n\n\t\tdocs: {\n\t\t\trecommended: true,\n\t\t\tdescription: \"Disallow duplicate keys in JSON objects\",\n\t\t\turl: \"https://github.com/eslint/json/tree/main/docs/rules/no-duplicate-keys.md\",\n\t\t},\n\n\t\tmessages: {\n\t\t\tduplicateKey: 'Duplicate key \"{{key}}\" found.',\n\t\t},\n\t},\n\n\tcreate(context) {\n\t\t/** @type {Array<Map<string, MemberNode>|undefined>} */\n\t\tconst objectKeys = [];\n\n\t\t/** @type {Map<string, MemberNode>|undefined} */\n\t\tlet keys;\n\n\t\treturn {\n\t\t\tObject() {\n\t\t\t\tobjectKeys.push(keys);\n\t\t\t\tkeys = new Map();\n\t\t\t},\n\n\t\t\tMember(node) {\n\t\t\t\tconst key =\n\t\t\t\t\tnode.name.type === \"String\"\n\t\t\t\t\t\t? node.name.value\n\t\t\t\t\t\t: node.name.name;\n\n\t\t\t\tif (keys.has(key)) {\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tloc: node.name.loc,\n\t\t\t\t\t\tmessageId: \"duplicateKey\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tkeys.set(key, node);\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"Object:exit\"() {\n\t\t\t\tkeys = objectKeys.pop();\n\t\t\t},\n\t\t};\n\t},\n};\n\n/**\n * @fileoverview Rule to prevent empty keys in JSON.\n * @author Nicholas C. Zakas\n */\n\n//-----------------------------------------------------------------------------\n// Type Definitions\n//-----------------------------------------------------------------------------\n\n/**\n *\n * @typedef {\"emptyKey\"} NoEmptyKeysMessageIds\n * @typedef {JSONRuleDefinition<{ MessageIds: NoEmptyKeysMessageIds }>} NoEmptyKeysRuleDefinition\n */\n\n//-----------------------------------------------------------------------------\n// Rule Definition\n//-----------------------------------------------------------------------------\n\n/** @type {NoEmptyKeysRuleDefinition} */\nconst rule$4 = {\n\tmeta: {\n\t\ttype: \"problem\",\n\n\t\tdocs: {\n\t\t\trecommended: true,\n\t\t\tdescription: \"Disallow empty keys in JSON objects\",\n\t\t\turl: \"https://github.com/eslint/json/tree/main/docs/rules/no-empty-keys.md\",\n\t\t},\n\n\t\tmessages: {\n\t\t\temptyKey: \"Empty key found.\",\n\t\t},\n\t},\n\n\tcreate(context) {\n\t\treturn {\n\t\t\tMember(node) {\n\t\t\t\tconst key =\n\t\t\t\t\tnode.name.type === \"String\"\n\t\t\t\t\t\t? node.name.value\n\t\t\t\t\t\t: node.name.name;\n\n\t\t\t\tif (key.trim() === \"\") {\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tloc: node.name.loc,\n\t\t\t\t\t\tmessageId: \"emptyKey\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t},\n};\n\n/**\n * @fileoverview Rule to detect unnormalized keys in JSON.\n * @author Bradley Meck Farias\n */\n\n//-----------------------------------------------------------------------------\n// Type Definitions\n//-----------------------------------------------------------------------------\n\n/**\n *\n * @typedef {\"unnormalizedKey\"} NoUnnormalizedKeysMessageIds\n * @typedef {{ form: string }} NoUnnormalizedKeysOptions\n * @typedef {JSONRuleDefinition<{ RuleOptions: [NoUnnormalizedKeysOptions], MessageIds: NoUnnormalizedKeysMessageIds }>} NoUnnormalizedKeysRuleDefinition\n */\n\n//-----------------------------------------------------------------------------\n// Rule Definition\n//-----------------------------------------------------------------------------\n\n/** @type {NoUnnormalizedKeysRuleDefinition} */\nconst rule$3 = {\n\tmeta: {\n\t\ttype: \"problem\",\n\n\t\tdocs: {\n\t\t\trecommended: true,\n\t\t\tdescription: \"Disallow JSON keys that are not normalized\",\n\t\t\turl: \"https://github.com/eslint/json/tree/main/docs/rules/no-unnormalized-keys.md\",\n\t\t},\n\n\t\tmessages: {\n\t\t\tunnormalizedKey: \"Unnormalized key '{{key}}' found.\",\n\t\t},\n\n\t\tschema: [\n\t\t\t{\n\t\t\t\ttype: \"object\",\n\t\t\t\tproperties: {\n\t\t\t\t\tform: {\n\t\t\t\t\t\tenum: [\"NFC\", \"NFD\", \"NFKC\", \"NFKD\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tadditionalProperties: false,\n\t\t\t},\n\t\t],\n\n\t\tdefaultOptions: [\n\t\t\t{\n\t\t\t\tform: \"NFC\",\n\t\t\t},\n\t\t],\n\t},\n\n\tcreate(context) {\n\t\tconst [{ form }] = context.options;\n\n\t\treturn {\n\t\t\tMember(node) {\n\t\t\t\tconst key =\n\t\t\t\t\tnode.name.type === \"String\"\n\t\t\t\t\t\t? node.name.value\n\t\t\t\t\t\t: node.name.name;\n\n\t\t\t\tif (key.normalize(form) !== key) {\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tloc: node.name.loc,\n\t\t\t\t\t\tmessageId: \"unnormalizedKey\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tkey,\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},\n};\n\n/**\n * @fileoverview Rule to detect unsafe values in JSON.\n * @author Bradley Meck Farias\n */\n\n//-----------------------------------------------------------------------------\n// Type Definitions\n//-----------------------------------------------------------------------------\n\n/**\n *\n * @typedef {\"unsafeNumber\"|\"unsafeInteger\"|\"unsafeZero\"|\"subnormal\"|\"loneSurrogate\"} NoUnsafeValuesMessageIds\n * @typedef {JSONRuleDefinition<{ MessageIds: NoUnsafeValuesMessageIds }>} NoUnsafeValuesRuleDefinition\n */\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/*\n * This rule is based on the JSON grammar from RFC 8259, section 6.\n * https://tools.ietf.org/html/rfc8259#section-6\n *\n * We separately capture the integer and fractional parts of a number, so that\n * we can check for unsafe numbers that will evaluate to Infinity.\n */\nconst NUMBER = /^-?(?<int>0|([1-9]\\d*))(?:\\.(?<frac>\\d+))?(?:e[+-]?\\d+)?$/iu;\nconst NON_ZERO = /[1-9]/u;\n\n//-----------------------------------------------------------------------------\n// Rule Definition\n//-----------------------------------------------------------------------------\n\n/** @type {NoUnsafeValuesRuleDefinition} */\nconst rule$2 = {\n\tmeta: {\n\t\ttype: \"problem\",\n\n\t\tdocs: {\n\t\t\trecommended: true,\n\t\t\tdescription: \"Disallow JSON values that are unsafe for interchange\",\n\t\t\turl: \"https://github.com/eslint/json/tree/main/docs/rules/no-unsafe-values.md\",\n\t\t},\n\n\t\tmessages: {\n\t\t\tunsafeNumber: \"The number '{{ value }}' will evaluate to Infinity.\",\n\t\t\tunsafeInteger:\n\t\t\t\t\"The integer '{{ value }}' is outside the safe integer range.\",\n\t\t\tunsafeZero: \"The number '{{ value }}' will evaluate to zero.\",\n\t\t\tsubnormal:\n\t\t\t\t\"Unexpected subnormal number '{{ value }}' found, which may cause interoperability issues.\",\n\t\t\tloneSurrogate: \"Lone surrogate '{{ surrogate }}' found.\",\n\t\t},\n\t},\n\n\tcreate(context) {\n\t\treturn {\n\t\t\tNumber(node) {\n\t\t\t\tconst value = context.sourceCode.getText(node);\n\n\t\t\t\tif (Number.isFinite(node.value) !== true) {\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tloc: node.loc,\n\t\t\t\t\t\tmessageId: \"unsafeNumber\",\n\t\t\t\t\t\tdata: { value },\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t// Also matches -0, intentionally\n\t\t\t\t\tif (node.value === 0) {\n\t\t\t\t\t\t// If the value has been rounded down to 0, but there was some\n\t\t\t\t\t\t// fraction or non-zero part before the e-, this is a very small\n\t\t\t\t\t\t// number that doesn't fit inside an f64.\n\t\t\t\t\t\tconst match = value.match(NUMBER);\n\t\t\t\t\t\t// assert(match, \"If the regex is right, match is always truthy\")\n\n\t\t\t\t\t\t// If any part of the number other than the exponent has a\n\t\t\t\t\t\t// non-zero digit in it, this number was not intended to be\n\t\t\t\t\t\t// evaluated down to a zero.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tNON_ZERO.test(match.groups.int) ||\n\t\t\t\t\t\t\tNON_ZERO.test(match.groups.frac)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\tloc: node.loc,\n\t\t\t\t\t\t\t\tmessageId: \"unsafeZero\",\n\t\t\t\t\t\t\t\tdata: { value },\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!/[.e]/iu.test(value)) {\n\t\t\t\t\t\t// Intended to be an integer\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tnode.value > Number.MAX_SAFE_INTEGER ||\n\t\t\t\t\t\t\tnode.value < Number.MIN_SAFE_INTEGER\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\tloc: node.loc,\n\t\t\t\t\t\t\t\tmessageId: \"unsafeInteger\",\n\t\t\t\t\t\t\t\tdata: { value },\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Floating point.  Check for subnormal.\n\t\t\t\t\t\tconst buffer = new ArrayBuffer(8);\n\t\t\t\t\t\tconst view = new DataView(buffer);\n\t\t\t\t\t\tview.setFloat64(0, node.value, false);\n\t\t\t\t\t\tconst asBigInt = view.getBigUint64(0, false);\n\t\t\t\t\t\t// Subnormals have an 11-bit exponent of 0 and a non-zero mantissa.\n\t\t\t\t\t\tif ((asBigInt & 0x7ff0000000000000n) === 0n) {\n\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\tloc: node.loc,\n\t\t\t\t\t\t\t\tmessageId: \"subnormal\",\n\t\t\t\t\t\t\t\t// Value included so that it's seen in scientific notation\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t});\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\tString(node) {\n\t\t\t\tif (node.value.isWellFormed) {\n\t\t\t\t\tif (node.value.isWellFormed()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// match any high surrogate and, if it exists, a paired low surrogate\n\t\t\t\t// match any low surrogate not already matched\n\t\t\t\tconst surrogatePattern =\n\t\t\t\t\t/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?|[\\uDC00-\\uDFFF]/gu;\n\t\t\t\tlet match = surrogatePattern.exec(node.value);\n\t\t\t\twhile (match) {\n\t\t\t\t\t// only need to report non-paired surrogates\n\t\t\t\t\tif (match[0].length < 2) {\n\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\tloc: node.loc,\n\t\t\t\t\t\t\tmessageId: \"loneSurrogate\",\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tsurrogate: JSON.stringify(match[0]).slice(\n\t\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\t\t-1,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tmatch = surrogatePattern.exec(node.value);\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t},\n};\n\n/**\n * @fileoverview Rule to require JSON object keys to be sorted.\n * Copied largely from https://github.com/eslint/eslint/blob/main/lib/rules/sort-keys.js\n * @author Robin Thomas\n */\n\n\n//-----------------------------------------------------------------------------\n// Type Definitions\n//-----------------------------------------------------------------------------\n\n/**\n *\n * @typedef {Object} SortOptions\n * @property {boolean} caseSensitive\n * @property {boolean} natural\n * @property {number} minKeys\n * @property {boolean} allowLineSeparatedGroups\n *\n * @typedef {\"sortKeys\"} SortKeysMessageIds\n * @typedef {\"asc\"|\"desc\"} SortDirection\n * @typedef {[SortDirection, SortOptions]} SortKeysRuleOptions\n * @typedef {JSONRuleDefinition<{ RuleOptions: SortKeysRuleOptions, MessageIds: SortKeysMessageIds }>} SortKeysRuleDefinition\n * @typedef {(a:string,b:string) => boolean} Comparator\n */\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\nconst hasNonWhitespace = /\\S/u;\n\nconst comparators = {\n\tascending: {\n\t\talphanumeric: {\n\t\t\t/** @type {Comparator} */\n\t\t\tsensitive: (a, b) => a <= b,\n\n\t\t\t/** @type {Comparator} */\n\t\t\tinsensitive: (a, b) => a.toLowerCase() <= b.toLowerCase(),\n\t\t},\n\t\tnatural: {\n\t\t\t/** @type {Comparator} */\n\t\t\tsensitive: (a, b) => naturalCompare(a, b) <= 0,\n\n\t\t\t/** @type {Comparator} */\n\t\t\tinsensitive: (a, b) =>\n\t\t\t\tnaturalCompare(a.toLowerCase(), b.toLowerCase()) <= 0,\n\t\t},\n\t},\n\tdescending: {\n\t\talphanumeric: {\n\t\t\t/** @type {Comparator} */\n\t\t\tsensitive: (a, b) =>\n\t\t\t\tcomparators.ascending.alphanumeric.sensitive(b, a),\n\n\t\t\t/** @type {Comparator} */\n\t\t\tinsensitive: (a, b) =>\n\t\t\t\tcomparators.ascending.alphanumeric.insensitive(b, a),\n\t\t},\n\t\tnatural: {\n\t\t\t/** @type {Comparator} */\n\t\t\tsensitive: (a, b) => comparators.ascending.natural.sensitive(b, a),\n\n\t\t\t/** @type {Comparator} */\n\t\t\tinsensitive: (a, b) =>\n\t\t\t\tcomparators.ascending.natural.insensitive(b, a),\n\t\t},\n\t},\n};\n\n/**\n * Gets the MemberNode's string key value.\n * @param {MemberNode} member\n * @return {string}\n */\nfunction getKey(member) {\n\treturn member.name.type === \"Identifier\"\n\t\t? member.name.name\n\t\t: member.name.value;\n}\n\n//-----------------------------------------------------------------------------\n// Rule Definition\n//-----------------------------------------------------------------------------\n\n/** @type {SortKeysRuleDefinition} */\nconst rule$1 = {\n\tmeta: {\n\t\ttype: \"suggestion\",\n\n\t\tdefaultOptions: [\n\t\t\t\"asc\",\n\t\t\t{\n\t\t\t\tallowLineSeparatedGroups: false,\n\t\t\t\tcaseSensitive: true,\n\t\t\t\tminKeys: 2,\n\t\t\t\tnatural: false,\n\t\t\t},\n\t\t],\n\n\t\tdocs: {\n\t\t\trecommended: false,\n\t\t\tdescription: `Require JSON object keys to be sorted`,\n\t\t\turl: \"https://github.com/eslint/json/tree/main/docs/rules/sort-keys.md\",\n\t\t},\n\n\t\tmessages: {\n\t\t\tsortKeys:\n\t\t\t\t\"Expected object keys to be in {{sortName}} case-{{sensitivity}} {{direction}} order. '{{thisName}}' should be before '{{prevName}}'.\",\n\t\t},\n\n\t\tschema: [\n\t\t\t{\n\t\t\t\tenum: [\"asc\", \"desc\"],\n\t\t\t},\n\t\t\t{\n\t\t\t\ttype: \"object\",\n\t\t\t\tproperties: {\n\t\t\t\t\tcaseSensitive: {\n\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t},\n\t\t\t\t\tnatural: {\n\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t},\n\t\t\t\t\tminKeys: {\n\t\t\t\t\t\ttype: \"integer\",\n\t\t\t\t\t\tminimum: 2,\n\t\t\t\t\t},\n\t\t\t\t\tallowLineSeparatedGroups: {\n\t\t\t\t\t\ttype: \"boolean\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tadditionalProperties: false,\n\t\t\t},\n\t\t],\n\t},\n\n\tcreate(context) {\n\t\tconst [\n\t\t\tdirectionShort,\n\t\t\t{ allowLineSeparatedGroups, caseSensitive, natural, minKeys },\n\t\t] = context.options;\n\n\t\tconst direction = directionShort === \"asc\" ? \"ascending\" : \"descending\";\n\t\tconst sortName = natural ? \"natural\" : \"alphanumeric\";\n\t\tconst sensitivity = caseSensitive ? \"sensitive\" : \"insensitive\";\n\t\tconst isValidOrder = comparators[direction][sortName][sensitivity];\n\n\t\t// Note that @humanwhocodes/momoa doesn't include comments in the object.members tree, so we can't just see if a member is preceded by a comment\n\t\tconst commentLineNums = new Set();\n\t\tfor (const comment of context.sourceCode.comments) {\n\t\t\tfor (\n\t\t\t\tlet lineNum = comment.loc.start.line;\n\t\t\t\tlineNum <= comment.loc.end.line;\n\t\t\t\tlineNum += 1\n\t\t\t) {\n\t\t\t\tcommentLineNums.add(lineNum);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Checks if two members are line-separated.\n\t\t * @param {MemberNode} prevMember The previous member.\n\t\t * @param {MemberNode} member The current member.\n\t\t * @return {boolean}\n\t\t */\n\t\tfunction isLineSeparated(prevMember, member) {\n\t\t\t// Note that there can be comments *inside* members, e.g. `{\"foo: /* comment *\\/ \"bar\"}`, but these are ignored when calculating line-separated groups\n\t\t\tconst prevMemberEndLine = prevMember.loc.end.line;\n\t\t\tconst thisStartLine = member.loc.start.line;\n\t\t\tif (thisStartLine - prevMemberEndLine < 2) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor (\n\t\t\t\tlet lineNum = prevMemberEndLine + 1;\n\t\t\t\tlineNum < thisStartLine;\n\t\t\t\tlineNum += 1\n\t\t\t) {\n\t\t\t\tif (\n\t\t\t\t\t!commentLineNums.has(lineNum) &&\n\t\t\t\t\t!hasNonWhitespace.test(\n\t\t\t\t\t\tcontext.sourceCode.lines[lineNum - 1],\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn {\n\t\t\tObject(node) {\n\t\t\t\tlet prevMember;\n\t\t\t\tlet prevName;\n\n\t\t\t\tif (node.members.length < minKeys) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (const member of node.members) {\n\t\t\t\t\tconst thisName = getKey(member);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tprevMember &&\n\t\t\t\t\t\t!isValidOrder(prevName, thisName) &&\n\t\t\t\t\t\t(!allowLineSeparatedGroups ||\n\t\t\t\t\t\t\t!isLineSeparated(prevMember, member))\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\tloc: member.name.loc,\n\t\t\t\t\t\t\tmessageId: \"sortKeys\",\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\tthisName,\n\t\t\t\t\t\t\t\tprevName,\n\t\t\t\t\t\t\t\tdirection,\n\t\t\t\t\t\t\t\tsensitivity,\n\t\t\t\t\t\t\t\tsortName,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tprevMember = member;\n\t\t\t\t\tprevName = thisName;\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t},\n};\n\n/**\n * @fileoverview Rule to ensure top-level items are either an array or object.\n * @author Joe Hildebrand\n */\n\n//-----------------------------------------------------------------------------\n// Type Definitions\n//-----------------------------------------------------------------------------\n\n/**\n *\n * @typedef {\"topLevel\"} TopLevelInteropMessageIds\n * @typedef {JSONRuleDefinition<{ MessageIds: TopLevelInteropMessageIds }>} TopLevelInteropRuleDefinition\n */\n\n//-----------------------------------------------------------------------------\n// Rule Definition\n//-----------------------------------------------------------------------------\n\n/** @type {TopLevelInteropRuleDefinition} */\nconst rule = {\n\tmeta: {\n\t\ttype: \"problem\",\n\n\t\tdocs: {\n\t\t\trecommended: false,\n\t\t\tdescription:\n\t\t\t\t\"Require the JSON top-level value to be an array or object\",\n\t\t\turl: \"https://github.com/eslint/json/tree/main/docs/rules/top-level-interop.md\",\n\t\t},\n\n\t\tmessages: {\n\t\t\ttopLevel:\n\t\t\t\t\"Top level item should be array or object, got '{{type}}'.\",\n\t\t},\n\t},\n\n\tcreate(context) {\n\t\treturn {\n\t\t\tDocument(node) {\n\t\t\t\tconst { type } = node.body;\n\t\t\t\tif (type !== \"Object\" && type !== \"Array\") {\n\t\t\t\t\tcontext.report({\n\t\t\t\t\t\tloc: node.loc,\n\t\t\t\t\t\tmessageId: \"topLevel\",\n\t\t\t\t\t\tdata: { type },\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t},\n};\n\nvar rules = {\n    \"no-duplicate-keys\": rule$5,\n    \"no-empty-keys\": rule$4,\n    \"no-unnormalized-keys\": rule$3,\n    \"no-unsafe-values\": rule$2,\n    \"sort-keys\": rule$1,\n    \"top-level-interop\": rule,\n};\n\n/**\n * @fileoverview JSON plugin.\n * @author Nicholas C. Zakas\n */\n\n\n//-----------------------------------------------------------------------------\n// Plugin\n//-----------------------------------------------------------------------------\n\nconst plugin = {\n\tmeta: {\n\t\tname: \"@eslint/json\",\n\t\tversion: \"0.14.0\", // x-release-please-version\n\t},\n\tlanguages: {\n\t\tjson: new JSONLanguage({ mode: \"json\" }),\n\t\tjsonc: new JSONLanguage({ mode: \"jsonc\" }),\n\t\tjson5: new JSONLanguage({ mode: \"json5\" }),\n\t},\n\trules,\n\tconfigs: {\n\t\trecommended: {\n\t\t\tplugins: {},\n\t\t\trules: rules$1,\n\t\t},\n\t},\n};\n\n// eslint-disable-next-line no-lone-blocks -- The block syntax { ... } ensures that TypeScript does not get confused about the type of `plugin`.\n{\n\tplugin.configs.recommended.plugins.json = plugin;\n}\n\nexport { JSONLanguage, JSONSourceCode, plugin as default };\n"]}