{
  "version": 3,
  "sources": ["../src/cli.ts", "../package.json", "../src/main.ts", "../src/errors/formatError.ts", "../src/formatter.ts", "../src/constants.ts", "../src/processors/adjustSpacesProcessor.ts", "../src/regex.ts", "../src/processors/processor.ts", "../src/processors/bladeBraceProcessor.ts", "../src/util.ts", "../src/indent.ts", "../src/vsctm.ts", "../src/processors/bladeCommentProcessor.ts", "../src/processors/bladeDirectiveInScriptsProcessor.ts", "../src/processors/bladeDirectiveInStylesProcessor.ts", "../src/processors/breakLineBeforeAndAfterDirectiveProcessor.ts", "../src/processors/componentAttributeProcessor.ts", "../src/processors/conditionsProcessor.ts", "../src/processors/curlyBraceForJSProcessor.ts", "../src/processors/customDirectiveProcessor.ts", "../src/processors/escapedBladeDirectiveProcessor.ts", "../src/processors/fomatAsPhpProcessor.ts", "../src/processors/formatAsBladeProcessor.ts", "../src/processors/formatAsHtmlProcessor.ts", "../src/processors/htmlAttributesProcessor.ts", "../src/processors/htmlTagsProcessor.ts", "../src/processors/ignoredLinesProcessor.ts", "../src/processors/inlineDirectiveProcessor.ts", "../src/processors/inlinePhpDirectiveProcessor.ts", "../src/processors/nonnativeScriptsProcessor.ts", "../src/processors/phpBlockProcessor.ts", "../src/comment.ts", "../src/processors/propsProcessor.ts", "../src/processors/rawBladeBraceProcessor.ts", "../src/processors/rawPhpTagProcessor.ts", "../src/processors/scriptsProcessor.ts", "../src/processors/shorthandBindingProcessor.ts", "../src/processors/sortHtmlAttributesProcessor.ts", "../src/processors/sortTailwindClassesProcessor.ts", "../src/processors/unbalancedDirectiveProcessor.ts", "../src/processors/xdataProcessor.ts", "../src/processors/xinitProcessor.ts", "../src/processors/xslotProcessor.ts", "../src/formatContentPipeline.ts", "../src/runtimeConfig.ts"],
  "sourcesContent": ["import chalk from \"chalk\";\nimport concat from \"concat-stream\";\nimport _ from \"lodash\";\nimport { loadWASM } from \"vscode-oniguruma\";\nimport yargs from \"yargs\";\n\nimport { promises as fs } from \"node:fs\";\nimport os from \"node:os\";\n\nimport { hideBin } from \"yargs/helpers\";\nimport { name, version } from \"../package.json\";\nimport { BladeFormatter } from \"./main\";\n\nexport default async function cli() {\n\t// @ts-ignore\n\tconst parsed = await yargs(hideBin(process.argv))\n\t\t.usage(\n\t\t\t`${chalk.green(\n\t\t\t\tname,\n\t\t\t)} ${version}\\nAn opinionated blade template formatter for Laravel. \\n\\n ${chalk.yellow(\n\t\t\t\t\"Usage:\",\n\t\t\t)} $0 [options] [file glob | ...]`,\n\t\t)\n\t\t.wrap(null)\n\t\t.example(\n\t\t\t'$0 \"resources/views/**/*.blade.php\" --write',\n\t\t\t\"Format all files in views directory\",\n\t\t)\n\t\t.option(\"check-formatted\", {\n\t\t\talias: \"c\",\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Only checks files are formatted or not\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"write\", {\n\t\t\talias: \"w\",\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Write to file\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"diff\", {\n\t\t\talias: \"d\",\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Show diffs\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"end-with-newline\", {\n\t\t\talias: \"e\",\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"End output with newline\",\n\t\t\tdefault: true,\n\t\t})\n\t\t.option(\"end-of-line\", {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"End of line character(s). [LF|CRLF]\",\n\t\t\tdefault: os.EOL === \"\\r\\n\" ? \"CRLF\" : \"LF\",\n\t\t})\n\t\t.option(\"indent-size\", {\n\t\t\talias: \"i\",\n\t\t\ttype: \"integer\",\n\t\t\tdescription: \"Indentation size\",\n\t\t\tdefault: 4,\n\t\t})\n\t\t.option(\"wrap-line-length\", {\n\t\t\talias: \"wrap\",\n\t\t\ttype: \"integer\",\n\t\t\tdescription: \"The length of line wrap size\",\n\t\t\tdefault: 120,\n\t\t})\n\t\t.option(\"wrap-attributes\", {\n\t\t\talias: \"wrap-atts\",\n\t\t\ttype: \"string\",\n\t\t\tdescription:\n\t\t\t\t\"The way to wrap attributes.\\n[auto|force|force-aligned|force-expand-multiline|aligned-multiple|preserve|preserve-aligned]\",\n\t\t\tdefault: \"auto\",\n\t\t})\n\t\t.option(\"wrap-attributes-min-attrs\", {\n\t\t\ttype: \"integer\",\n\t\t\talias: \"M\",\n\t\t\tdescription: `Minimum number of html tag attributes for force wrap attribute options. Wrap the first attribute only if 'force-expand-multiline' is specified in wrap attributes`,\n\t\t\tdefault: \"2\",\n\t\t})\n\t\t.option(\"indent-inner-html\", {\n\t\t\talias: \"I\",\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Indent <head> and <body> sections in html.\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"sort-tailwindcss-classes\", {\n\t\t\talias: \"sort-classes\",\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Sort tailwindcss classes\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"tailwindcss-config-path\", {\n\t\t\talias: [\"tailwindcssConfigPath\"],\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Specify path of tailwind config\",\n\t\t\tdefault: null,\n\t\t})\n\t\t.option(\"sort-html-attributes\", {\n\t\t\talias: \"sort-attributes\",\n\t\t\ttype: \"string\",\n\t\t\tchoices: [\n\t\t\t\t\"none\",\n\t\t\t\t\"alphabetical\",\n\t\t\t\t\"code-guide\",\n\t\t\t\t\"idiomatic\",\n\t\t\t\t\"vuejs\",\n\t\t\t\t\"custom\",\n\t\t\t],\n\t\t\tdescription: \"Sort HTML attributes.\",\n\t\t\tdefault: \"none\",\n\t\t\tdefaultDescription: \"none\",\n\t\t})\n\t\t.option(\"custom-html-attributes-order\", {\n\t\t\ttype: \"string\",\n\t\t\tdescription:\n\t\t\t\t\"Comma separated custom HTML attributes order. To enable this you must specify sort html attributes option as `custom`. You can use regex for attribute names.\",\n\t\t\tdefault: null,\n\t\t})\n\t\t.option(\"no-single-quote\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription:\n\t\t\t\t\"Use double quotes instead of single quotes for php expression.\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"single-quote\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"this is a workaround for combine strict && boolean option\",\n\t\t\thidden: true,\n\t\t\tdefault: true,\n\t\t})\n\t\t.option(\"extra-liners\", {\n\t\t\talias: \"E\",\n\t\t\ttype: \"string\",\n\t\t\tdescription:\n\t\t\t\t\"Comma separated list of tags that should have an extra newline before them.\",\n\t\t\tdefault: \"head,body,/html\",\n\t\t\tnullable: true,\n\t\t\tcoerce(formats) {\n\t\t\t\t// Make sure we support comma-separated syntax: --extra-liners head,body\n\t\t\t\treturn _.flatten(\n\t\t\t\t\t_.flatten([formats]).map((format) => format.split(\",\")),\n\t\t\t\t);\n\t\t\t},\n\t\t})\n\t\t.option(\"component-prefix\", {\n\t\t\talias: \"P\",\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Component prefix use to preserve style in html attributes.\",\n\t\t\tdefault: \"x-,livewire:\",\n\t\t\tnullable: true,\n\t\t\tcoerce(formats) {\n\t\t\t\t// Make sure we support comma-separated syntax: --component-prefix x-,livewire:\n\t\t\t\treturn _.flatten(\n\t\t\t\t\t_.flatten([formats]).map((format) => format.split(\",\")),\n\t\t\t\t);\n\t\t\t},\n\t\t})\n\t\t.option(\"no-multiple-empty-lines\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Merge multiple blank lines into a single blank line\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"multiple-empty-lines\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"this is a workaround for combine strict && boolean option\",\n\t\t\thidden: true,\n\t\t\tdefault: true,\n\t\t})\n\t\t.option(\"no-php-syntax-check\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Disable PHP syntax checking\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"php-syntax-check\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"this is a workaround for combine strict && boolean option\",\n\t\t\thidden: true,\n\t\t\tdefault: true,\n\t\t})\n\t\t.option(\"no-trailing-comma-php\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription:\n\t\t\t\t\"If set to true, no trailing commas are printed for php expression.\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"trailing-comma-php\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"this is a workaround for combine strict && boolean option\",\n\t\t\thidden: true,\n\t\t\tdefault: true,\n\t\t})\n\t\t.option(\"php-version\", {\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Allows specifying the PHP version you're using\",\n\t\t\tdefault: \"8.4\",\n\t\t})\n\t\t.option(\"progress\", {\n\t\t\talias: \"p\",\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Print progress\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"stdin\", {\n\t\t\ttype: \"boolean\",\n\t\t\tdescription: \"Format code provided on <STDIN>\",\n\t\t\tdefault: false,\n\t\t})\n\t\t.option(\"config\", {\n\t\t\talias: [\"runtimeConfigPath\"],\n\t\t\ttype: \"string\",\n\t\t\tdescription:\n\t\t\t\t\"Use this configuration, overriding .bladeformatterrc config options if present\",\n\t\t\tdefault: null,\n\t\t})\n\t\t.option(\"ignore-path\", {\n\t\t\talias: [\"ignoreFilePath\"],\n\t\t\ttype: \"string\",\n\t\t\tdescription: \"Specify path of ignore file\",\n\t\t\tdefault: null,\n\t\t})\n\t\t.help(\"h\")\n\t\t.alias(\"h\", \"help\")\n\t\t.strictOptions()\n\t\t.fail((msg, err) => {\n\t\t\tif (err) throw err; // preserve stack\n\t\t\tprocess.stdout.write(`${chalk.red(\"error: \")}${msg}\\n\\n`);\n\t\t\tprocess.stdout.write(\n\t\t\t\t`${chalk.yellow(\"Usage: \")} ${name} [options] [file glob | ...]\\n\\n`,\n\t\t\t);\n\t\t\tprocess.stdout.write(\n\t\t\t\t`For more information try ${chalk.green(\"--help\")}\\n`,\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t})\n\t\t.epilog(\n\t\t\t\"Copyright Shuhei Hayashibara 2022\\nFor more information, see https://github.com/shufo/blade-formatter\",\n\t\t);\n\n\t// @ts-ignore\n\t// eslint-disable-next-line\n\tconst wasm = await fs.readFile(\n\t\trequire.resolve(\"vscode-oniguruma/release/onig.wasm\"),\n\t);\n\tawait loadWASM(wasm.buffer);\n\n\tconst options = _.chain(parsed.argv)\n\t\t.set(\"noMultipleEmptyLines\", !parsed.argv.multipleEmptyLines)\n\t\t.set(\"noPhpSyntaxCheck\", !parsed.argv.phpSyntaxCheck)\n\t\t.set(\"noSingleQuote\", !parsed.argv.singleQuote)\n\t\t.set(\"noTrailingCommaPhp\", !parsed.argv.trailingCommaPhp)\n\t\t.value();\n\n\tif (parsed.argv.stdin) {\n\t\tawait process.stdin.pipe(\n\t\t\tconcat({ encoding: \"string\" }, (text: Buffer) =>\n\t\t\t\tnew BladeFormatter(options)\n\t\t\t\t\t.format(text)\n\t\t\t\t\t.then((result: string | undefined) => {\n\t\t\t\t\t\tif (result !== undefined) {\n\t\t\t\t\t\t\tprocess.stdout.write(result);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.catch((error) => {\n\t\t\t\t\t\tprocess.stdout.write(`${error.toString()}\\n`);\n\t\t\t\t\t\tprocess.exit(1);\n\t\t\t\t\t}),\n\t\t\t),\n\t\t);\n\t\treturn;\n\t}\n\n\tif (parsed.argv._.length === 0) {\n\t\tparsed.showHelp();\n\t\treturn;\n\t}\n\n\tconst formatter = new BladeFormatter(options, parsed.argv._);\n\tawait formatter.formatFromCLI();\n}\n", "{\n  \"name\": \"blade-formatter\",\n  \"engines\": {\n    \"node\": \">= 14.0.0\"\n  },\n  \"keywords\": [\n    \"php\",\n    \"formatter\",\n    \"laravel\"\n  ],\n  \"version\": \"1.44.4\",\n  \"description\": \"An opinionated blade template formatter for Laravel\",\n  \"main\": \"./dist/bundle.cjs\",\n  \"types\": \"./dist/types/main.d.ts\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": {\n      \"import\": \"./dist/bundle.js\",\n      \"require\": \"./dist/bundle.cjs\",\n      \"default\": \"./dist/bundle.js\"\n    },\n    \"./*\": \"./*\"\n  },\n  \"scripts\": {\n    \"build\": \"cross-env NODE_ENV=production node esbuild.js && cross-env NODE_ENV=production ESM_BUILD=true node esbuild.js\",\n    \"prepublish\": \"tsc src/main.ts --declaration --emitDeclarationOnly --outDir ./dist/types || true\",\n    \"watch\": \"node esbuild.js\",\n    \"test\": \"yarn run build && yarn run vitest run\",\n    \"lint\": \"biome lint .\",\n    \"fix\": \"biome lint . --fix\",\n    \"format\": \"biome format . --write\",\n    \"check_formatted\": \"biome format .\",\n    \"changelog\": \"conventional-changelog -p angular -i CHANGELOG.md -s -r 0\",\n    \"prepare\": \"husky install\",\n    \"bin\": \"cross-env ./bin/blade-formatter.cjs\"\n  },\n  \"bin\": {\n    \"blade-formatter\": \"bin/blade-formatter.cjs\"\n  },\n  \"author\": \"Shuhei Hayashibara\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"@prettier/plugin-php\": \"^0.24.0\",\n    \"@shufo/tailwindcss-class-sorter\": \"3.0.1\",\n    \"aigle\": \"^1.14.1\",\n    \"ajv\": \"^8.9.0\",\n    \"chalk\": \"^4.1.0\",\n    \"concat-stream\": \"^2.0.0\",\n    \"detect-indent\": \"^6.0.0\",\n    \"find-config\": \"^1.0.0\",\n    \"glob\": \"^13.0.0\",\n    \"html-attribute-sorter\": \"^0.4.3\",\n    \"ignore\": \"^6.0.0\",\n    \"js-beautify\": \"^1.15.4\",\n    \"lodash\": \"^4.17.19\",\n    \"php-parser\": \"3.5.0\",\n    \"prettier\": \"^3.2.5\",\n    \"string-replace-async\": \"^2.0.0\",\n    \"tailwindcss\": \"^3.1.8\",\n    \"vscode-oniguruma\": \"1.7.0\",\n    \"vscode-textmate\": \"^7.0.1\",\n    \"xregexp\": \"^5.0.1\",\n    \"yargs\": \"^17.3.1\"\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.6.4\",\n    \"@babel/plugin-transform-modules-commonjs\": \"^7.16.5\",\n    \"@babel/preset-env\": \"^7.13.12\",\n    \"@babel/preset-typescript\": \"^7.16.5\",\n    \"@biomejs/biome\": \"2.1.2\",\n    \"@types/concat-stream\": \"^2.0.0\",\n    \"@types/find-config\": \"^1.0.1\",\n    \"@types/fs-extra\": \"^11.0.0\",\n    \"@types/glob\": \"^8.0.0\",\n    \"@types/js-beautify\": \"^1.13.3\",\n    \"@types/lodash\": \"^4.14.178\",\n    \"@types/mocha\": \"^10.0.0\",\n    \"@types/node\": \"^24.0.0\",\n    \"@types/xregexp\": \"^4.4.0\",\n    \"app-root-path\": \"^3.0.0\",\n    \"codecov\": \"^3.8.3\",\n    \"cross-env\": \"^7.0.3\",\n    \"esbuild\": \"^0.25.8\",\n    \"esbuild-node-externals\": \"^1.16.0\",\n    \"fs-extra\": \"^11.0.0\",\n    \"husky\": \"^8.0.0\",\n    \"lint-staged\": \">=10\",\n    \"source-map-loader\": \"^4.0.0\",\n    \"ts-loader\": \"^9.2.6\",\n    \"ts-migrate\": \"^0.1.27\",\n    \"ts-node\": \"^10.4.0\",\n    \"typescript\": \"^5.0.0\",\n    \"vitest\": \"^4.0.0\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/shufo/blade-formatter.git\"\n  },\n  \"files\": [\n    \"dist\",\n    \"src\",\n    \"bin\",\n    \"wasm\",\n    \"syntaxes\",\n    \"CHANGELOG.md\"\n  ],\n  \"lint-staged\": {\n    \"*.ts\": \"yarn run fix\"\n  }\n}\n", "import fs from \"node:fs\";\nimport nodepath from \"node:path\";\nimport process from \"node:process\";\nimport nodeutil from \"node:util\";\nimport chalk from \"chalk\";\nimport findConfig from \"find-config\";\nimport { glob } from \"glob\";\nimport ignore from \"ignore\";\nimport _ from \"lodash\";\nimport type { Config as TailwindConfig } from \"tailwindcss/types/config\";\nimport FormatError from \"./errors/formatError\";\nimport Formatter from \"./formatter\";\nimport {\n\ttype EndOfLine,\n\ttype RuntimeConfig,\n\ttype SortHtmlAttributes,\n\ttype WrapAttributes,\n\tfindRuntimeConfig,\n\treadRuntimeConfig,\n} from \"./runtimeConfig\";\nimport * as util from \"./util\";\n\nexport type CLIOption = {\n\twrite?: boolean;\n\tdiff?: boolean;\n\tcheckFormatted?: boolean;\n\tprogress?: boolean;\n\tignoreFilePath?: string;\n\truntimeConfigPath?: string;\n};\n\nexport type FormatterOption = {\n\tindentSize?: number;\n\twrapLineLength?: number;\n\twrapAttributes?: WrapAttributes;\n\twrapAttributesMinAttrs?: number;\n\tindentInnerHtml?: boolean;\n\tendWithNewline?: boolean;\n\tendOfLine?: EndOfLine;\n\tuseTabs?: boolean;\n\tsortTailwindcssClasses?: true;\n\ttailwindcssConfigPath?: string;\n\ttailwindcssConfig?: TailwindConfig;\n\tsortHtmlAttributes?: SortHtmlAttributes;\n\tcustomHtmlAttributesOrder?: string[] | string;\n\tnoMultipleEmptyLines?: boolean;\n\tnoPhpSyntaxCheck?: boolean;\n\tnoSingleQuote?: boolean;\n\tnoTrailingCommaPhp?: boolean;\n\textraLiners?: string[];\n\tcomponentPrefix?: string[];\n\tphpVersion?: string;\n};\n\nexport type BladeFormatterOption = CLIOption & FormatterOption;\n\nclass BladeFormatter {\n\tdiffs: any = [];\n\terrors: any = [];\n\tformattedFiles: any = [];\n\tignoreFile = \"\";\n\toptions: FormatterOption & CLIOption;\n\toutputs: any = [];\n\tcurrentTargetPath = \".\";\n\tpaths: any = [];\n\ttargetFiles: any = [];\n\tfulFillFiles: any = [];\n\tstatic targetFiles: any = [];\n\truntimeConfigPath: string | null;\n\truntimeConfigCache: RuntimeConfig = {};\n\n\tconstructor(options: BladeFormatterOption = {}, paths: any = []) {\n\t\tthis.options = options;\n\t\tthis.paths = paths;\n\t\tthis.runtimeConfigPath = options.runtimeConfigPath ?? null;\n\t}\n\n\tasync format(content: any, opts: BladeFormatterOption = {}) {\n\t\tthis.options = this.options || opts;\n\t\tconst target = nodepath.resolve(process.cwd(), \"target\");\n\t\tawait this.readIgnoreFile(target);\n\t\tawait this.findTailwindConfig(target);\n\t\tawait this.readRuntimeConfig(target);\n\t\treturn new Formatter(this.options).formatContent(content).catch((err) => {\n\t\t\tthrow new FormatError(err);\n\t\t});\n\t}\n\n\tasync formatFromCLI() {\n\t\ttry {\n\t\t\tthis.printPreamble();\n\t\t\tawait this.readIgnoreFile(process.cwd());\n\t\t\tawait this.processPaths();\n\t\t\tthis.printResults();\n\t\t} catch (_error) {\n\t\t\t// do nothing\n\t\t}\n\t}\n\n\tfileExists(filepath: string) {\n\t\treturn fs.promises\n\t\t\t.access(filepath, fs.constants.F_OK)\n\t\t\t.then(() => true)\n\t\t\t.catch(() => false);\n\t}\n\n\tasync readIgnoreFile(filePath: string) {\n\t\tconst configFilename = \".bladeignore\";\n\t\tconst workingDir = nodepath.dirname(filePath);\n\t\tconst configFilePath =\n\t\t\tthis.options.ignoreFilePath ||\n\t\t\tfindConfig(configFilename, { cwd: workingDir });\n\n\t\tif (!configFilePath) return;\n\n\t\ttry {\n\t\t\tthis.ignoreFile = (await fs.promises.readFile(configFilePath)).toString();\n\t\t} catch (_err) {\n\t\t\t// do nothing\n\t\t}\n\t}\n\n\tasync findTailwindConfig(filePath: string) {\n\t\tif (!this.options.sortTailwindcssClasses) return;\n\n\t\tconst configFilename = \"tailwind.config.js\";\n\t\tlet configFilePath: string | null | undefined;\n\n\t\tif (this.options.tailwindcssConfigPath) {\n\t\t\tconst workingDir = this.runtimeConfigPath\n\t\t\t\t? nodepath.dirname(this.runtimeConfigPath)\n\t\t\t\t: \"\";\n\t\t\tconfigFilePath = nodepath.resolve(\n\t\t\t\tworkingDir,\n\t\t\t\tthis.options.tailwindcssConfigPath,\n\t\t\t);\n\t\t} else {\n\t\t\tconst workingDir = nodepath.dirname(filePath);\n\t\t\tconfigFilePath = findConfig(configFilename, { cwd: workingDir });\n\t\t}\n\n\t\tif (configFilePath) {\n\t\t\tthis.options.tailwindcssConfigPath = configFilePath;\n\t\t}\n\t}\n\n\tasync readRuntimeConfig(\n\t\tfilePath: string,\n\t): Promise<RuntimeConfig | undefined> {\n\t\tif (!_.isEmpty(this.runtimeConfigCache)) {\n\t\t\tthis.options = _.merge(this.options, this.runtimeConfigCache);\n\t\t}\n\n\t\tconst configFile =\n\t\t\tthis.options.runtimeConfigPath || findRuntimeConfig(filePath);\n\t\tif (!configFile) return;\n\n\t\tthis.runtimeConfigPath = configFile;\n\n\t\ttry {\n\t\t\tconst options = await readRuntimeConfig(configFile);\n\t\t\tthis.options = _.mergeWith(this.options, options, (obj, src) =>\n\t\t\t\t!_.isNil(src) ? src : obj,\n\t\t\t);\n\t\t\tthis.runtimeConfigCache = this.options;\n\n\t\t\tif (this.options.sortTailwindcssClasses) {\n\t\t\t\tawait this.findTailwindConfig(filePath);\n\t\t\t}\n\t\t} catch (error: any) {\n\t\t\tthis.handleConfigError(configFile, error);\n\t\t}\n\t}\n\n\thandleConfigError(configFile: string, error: any) {\n\t\tif (error instanceof SyntaxError) {\n\t\t\tprocess.stdout.write(\n\t\t\t\tchalk.red.bold(\"\\nBlade Formatter JSON Syntax Error: \\n\\n\"),\n\t\t\t);\n\t\t\tprocess.stdout.write(nodeutil.format(error));\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tprocess.stdout.write(\n\t\t\tchalk.red.bold(\n\t\t\t\t`\\nBlade Formatter Config Error: ${nodepath.basename(configFile)}\\n\\n`,\n\t\t\t),\n\t\t);\n\t\tprocess.stdout.write(\n\t\t\t`\\`${error.errors[0].instancePath.replace(\"/\", \"\")}\\` ${error.errors[0].message}\\n\\n`,\n\t\t);\n\t\tif (error.errors[0].params?.allowedValues) {\n\t\t\tconsole.log(error.errors[0].params?.allowedValues);\n\t\t}\n\t\tprocess.exit(1);\n\t}\n\n\tasync processPaths() {\n\t\tawait Promise.all(\n\t\t\tthis.paths.map(async (path: any) => this.processPath(path)),\n\t\t);\n\t}\n\n\tasync processPath(path: any) {\n\t\tconst paths = await BladeFormatter.globFiles(path)\n\t\t\t.then((paths: any) =>\n\t\t\t\tpaths.map((target: any) => nodepath.relative(\".\", target)),\n\t\t\t)\n\t\t\t.then((paths) => this.filterFiles(paths))\n\t\t\t.then(this.fulFillFiles);\n\t\tawait this.formatFiles(paths);\n\t}\n\n\tstatic globFiles(path: any) {\n\t\treturn glob(path);\n\t}\n\n\tasync filterFiles(paths: any) {\n\t\tif (this.ignoreFile === \"\") return paths;\n\n\t\tconst REGEX_FILES_NOT_IN_CURRENT_DIR = /^\\.\\.*/;\n\t\tconst filesOutsideTargetDir = paths.filter((path: any) =>\n\t\t\tREGEX_FILES_NOT_IN_CURRENT_DIR.test(nodepath.relative(\".\", path)),\n\t\t);\n\t\tconst filesUnderTargetDir = _.xor(paths, filesOutsideTargetDir);\n\t\tconst filteredFiles = ignore()\n\t\t\t.add(this.ignoreFile)\n\t\t\t.filter(filesUnderTargetDir);\n\n\t\treturn _.concat(filesOutsideTargetDir, filteredFiles);\n\t}\n\n\tstatic fulFillFiles(paths: any) {\n\t\tBladeFormatter.targetFiles.push(paths);\n\t\treturn Promise.resolve(paths);\n\t}\n\n\tasync formatFiles(paths: any) {\n\t\tawait Promise.all(paths.map(async (path: any) => this.formatFile(path)));\n\t}\n\n\tasync formatFile(path: any) {\n\t\tawait this.findTailwindConfig(path);\n\t\tawait this.readRuntimeConfig(path);\n\n\t\ttry {\n\t\t\tconst content = await util\n\t\t\t\t.readFile(path)\n\t\t\t\t.then((data: any) => data.toString(\"utf-8\"));\n\t\t\tconst formatted = await new Formatter(this.options).formatContent(\n\t\t\t\tcontent,\n\t\t\t);\n\t\t\tawait this.checkFormatted(path, formatted);\n\t\t\tawait this.writeToFile(path, formatted);\n\t\t} catch (err) {\n\t\t\tthis.handleError(path, err);\n\t\t}\n\t}\n\n\tasync checkFormatted(path: any, formatted: any) {\n\t\tthis.printFormattedOutput(path, formatted);\n\n\t\tconst originalContent = fs.readFileSync(path, \"utf-8\");\n\t\tconst originalLines = util.splitByLines(originalContent);\n\t\tconst formattedLines = util.splitByLines(formatted);\n\t\tconst diff = util.generateDiff(path, originalLines, formattedLines);\n\n\t\tthis.diffs.push(diff);\n\t\tthis.outputs.push(formatted);\n\n\t\tif (diff.length > 0) {\n\t\t\tif (this.options.progress || this.options.write)\n\t\t\t\tprocess.stdout.write(chalk.green(\"F\"));\n\t\t\tif (this.options.checkFormatted) {\n\t\t\t\tprocess.stdout.write(`${path}\\n`);\n\t\t\t\tprocess.exitCode = 1;\n\t\t\t}\n\t\t\tthis.formattedFiles.push(path);\n\t\t} else if (this.options.progress || this.options.write) {\n\t\t\tprocess.stdout.write(chalk.green(\".\"));\n\t\t}\n\n\t\treturn Promise.resolve(formatted);\n\t}\n\n\tprintFormattedOutput(path: any, formatted: any) {\n\t\tif (this.options.write || this.options.checkFormatted) return;\n\n\t\tprocess.stdout.write(`${formatted}`);\n\t\tconst isLastFile =\n\t\t\t_.last(this.paths) === path || _.last(this.targetFiles) === path;\n\t\tif (!isLastFile && (this.paths.length > 1 || this.targetFiles.length > 1)) {\n\t\t\tprocess.stdout.write(\"\\n\");\n\t\t}\n\t}\n\n\twriteToFile(path: any, content: any) {\n\t\tif (\n\t\t\t!this.options.write ||\n\t\t\tthis.options.checkFormatted ||\n\t\t\t!content ||\n\t\t\t_.isEmpty(content)\n\t\t)\n\t\t\treturn;\n\n\t\tfs.writeFile(path, content, (err: any) => {\n\t\t\tif (err) {\n\t\t\t\tprocess.stdout.write(`${chalk.red(err.message)}\\n`);\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t});\n\t}\n\n\thandleError(path: any, error: any) {\n\t\tif (this.options.progress || this.options.write)\n\t\t\tprocess.stdout.write(chalk.red(\"E\"));\n\t\tprocess.exitCode = 1;\n\t\tthis.errors.push({ path, message: error.message, error });\n\t}\n\n\tprintPreamble() {\n\t\tif (this.options.checkFormatted)\n\t\t\tprocess.stdout.write(\"Check formatting... \\n\");\n\t}\n\n\tasync printResults() {\n\t\tthis.printDescription();\n\t\tthis.printDifferences();\n\t\tthis.printFormattedFiles();\n\t\tthis.printErrors();\n\t}\n\n\tprintDescription() {\n\t\tif (!this.options.write) return;\n\n\t\tprocess.stdout.write(\"\\n\\n\");\n\t\tprocess.stdout.write(chalk.bold.green(\"Fixed: F\\n\"));\n\t\tprocess.stdout.write(chalk.bold.red(\"Errors: E\\n\"));\n\t\tprocess.stdout.write(chalk.bold(\"Not Changed: \") + chalk.bold.green(\".\\n\"));\n\t}\n\n\tprintFormattedFiles() {\n\t\tif (this.formattedFiles.length === 0) {\n\t\t\tif (this.options.checkFormatted)\n\t\t\t\tprocess.stdout.write(\n\t\t\t\t\tchalk.bold(\"\\nAll matched files are formatted! \\n\"),\n\t\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.options.write) {\n\t\t\tif (this.options.checkFormatted) {\n\t\t\t\tprocess.stdout.write(\n\t\t\t\t\t`\\nAbove file(s) are formattable. Forgot to run formatter? Use ${chalk.bold(\"--write\")} option to overwrite.\\n`,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tprocess.stdout.write(chalk.bold(\"\\nFormatted Files: \\n\"));\n\t\tfor (const path of this.formattedFiles) {\n\t\t\tprocess.stdout.write(`${chalk.bold(path)}\\n`);\n\t\t}\n\t}\n\n\tprintDifferences() {\n\t\tif (!this.options.diff) return;\n\n\t\tprocess.stdout.write(chalk.bold(\"\\nDifferences: \\n\\n\"));\n\t\tif (this.diffs.every((diff: any) => diff.length === 0)) {\n\t\t\tprocess.stdout.write(chalk(\"No changes found. \\n\\n\"));\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const diff of this.diffs) {\n\t\t\tutil.printDiffs(diff);\n\t\t}\n\t}\n\n\tprintErrors() {\n\t\tif (_.isEmpty(this.errors)) return;\n\n\t\tprocess.stdout.write(chalk.red.bold(\"\\nErrors: \\n\\n\"));\n\t\tfor (const error of this.errors) {\n\t\t\tprocess.stdout.write(`${nodeutil.format(error)}\\n`);\n\t\t}\n\t}\n}\n\nexport { BladeFormatter, Formatter };\n", "export default class FormatError extends Error {}\n", "/* eslint-disable class-methods-use-this */\n\nimport detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport * as vscodeTmModule from \"vscode-textmate\";\nimport constants from \"./constants\";\nimport { FormatContentPipeline } from \"./formatContentPipeline\";\nimport {\n\thasStartAndEndToken,\n\tindentElseTokens,\n\tindentEndTokens,\n\tindentStartAndEndTokens,\n\tindentStartOrElseTokens,\n\tindentStartTokens,\n\toptionalStartWithoutEndTokens,\n\tphpKeywordEndTokens,\n\tphpKeywordStartTokens,\n\ttokenForIndentStartOrElseTokens,\n} from \"./indent\";\nimport type { BladeFormatterOption, CLIOption, FormatterOption } from \"./main\";\nimport * as util from \"./util\";\n\nexport default class Formatter {\n\targumentCheck: any;\n\n\tcurrentIndentLevel: number;\n\n\tdiffs: any;\n\n\tindentCharacter: any;\n\n\tindentSize: any;\n\n\toniguruma: any;\n\n\toptions: FormatterOption & CLIOption;\n\n\tresult: any;\n\n\tshouldBeIndent: any;\n\n\tstack: any;\n\n\tvsctm: any;\n\n\twrapAttributes: any;\n\n\twrapLineLength: any;\n\n\tisInsideCommentBlock: boolean;\n\n\tdefaultPhpFormatOption: util.FormatPhpOption;\n\n\tendOfLine: string;\n\n\tconstructor(options: BladeFormatterOption) {\n\t\tthis.initializeOptions(options);\n\t\tthis.initializeProperties();\n\t}\n\n\tinitializeOptions(options: BladeFormatterOption) {\n\t\tthis.options = {\n\t\t\t...{\n\t\t\t\tnoPhpSyntaxCheck: false,\n\t\t\t\ttrailingCommaPHP: !options.noTrailingCommaPhp,\n\t\t\t\tprintWidth: options.wrapLineLength || constants.defaultPrintWidth,\n\t\t\t},\n\t\t\t...options,\n\t\t};\n\t\tthis.vsctm = util.optional(this.options).vsctm || vscodeTmModule;\n\t\tthis.oniguruma = util.optional(this.options).oniguruma;\n\t\tthis.indentCharacter = util.optional(this.options).useTabs ? \"\\t\" : \" \";\n\t\tthis.indentSize = util.optional(this.options).indentSize || 4;\n\t\tthis.wrapLineLength =\n\t\t\tutil.optional(this.options).wrapLineLength || constants.defaultPrintWidth;\n\t\tthis.wrapAttributes = util.optional(this.options).wrapAttributes || \"auto\";\n\t\tthis.endOfLine = util.getEndOfLine(util.optional(this.options).endOfLine);\n\t}\n\n\tinitializeProperties() {\n\t\tthis.currentIndentLevel = 0;\n\t\tthis.shouldBeIndent = false;\n\t\tthis.isInsideCommentBlock = false;\n\t\tthis.stack = [];\n\t\tthis.result = [];\n\t\tthis.diffs = [];\n\t\tthis.defaultPhpFormatOption = {\n\t\t\tnoPhpSyntaxCheck: this.options.noPhpSyntaxCheck,\n\t\t\tprintWidth: this.wrapLineLength,\n\t\t};\n\t}\n\n\tasync formatContent(content: any) {\n\t\tconst pipeline = new FormatContentPipeline(this);\n\t\tconst target = await pipeline.formatContent(content);\n\t\tconst formattedResult = await util.checkResult(target);\n\t\treturn formattedResult;\n\t}\n\n\tasync formatTokenizedLines(splittedLines: any, tokenizedLines: any) {\n\t\tthis.result = [];\n\t\tthis.stack = [];\n\t\tfor (let i = 0; i < splittedLines.length; i += 1) {\n\t\t\tconst originalLine = splittedLines[i];\n\t\t\tconst tokenizeLineResult = tokenizedLines[i];\n\t\t\tawait this.processLine(tokenizeLineResult, originalLine);\n\t\t}\n\n\t\treturn this.result.join(this.endOfLine);\n\t}\n\n\tasync processLine(tokenizeLineResult: any, originalLine: any) {\n\t\tawait this.processTokenizeResult(tokenizeLineResult, originalLine);\n\t}\n\n\tasync processKeyword(token: string) {\n\t\tif (_.includes(phpKeywordStartTokens, token)) {\n\t\t\tif (_.last(this.stack) === \"@case\" && token === \"@case\") {\n\t\t\t\tthis.decrementIndentLevel();\n\t\t\t}\n\n\t\t\tif (token === \"@case\") {\n\t\t\t\tthis.shouldBeIndent = true;\n\t\t\t}\n\n\t\t\tthis.stack.push(token);\n\t\t\treturn;\n\t\t}\n\n\t\t// if @break is inside @if, decrement indent after @break\n\t\tif (_.last(this.stack) === \"@if\" && token === \"@break\") {\n\t\t\tthis.shouldBeIndent = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (_.includes(phpKeywordEndTokens, token)) {\n\t\t\tif (token === \"@break\") {\n\t\t\t\tthis.decrementIndentLevel();\n\t\t\t\tthis.stack.pop();\n\t\t\t\tthis.stack.push(token);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_.last(this.stack) !== \"@hassection\") {\n\t\t\t\tthis.stack.pop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (_.includes(indentStartAndEndTokens, token)) {\n\t\t\tthis.shouldBeIndent = true;\n\t\t\tthis.stack.push(token);\n\t\t}\n\n\t\tif (_.includes(indentStartOrElseTokens, token)) {\n\t\t\tif (_.includes(tokenForIndentStartOrElseTokens, _.last(this.stack))) {\n\t\t\t\tthis.decrementIndentLevel();\n\t\t\t\tthis.shouldBeIndent = true;\n\t\t\t}\n\t\t}\n\n\t\tif (_.includes(indentStartTokens, token)) {\n\t\t\tif (_.last(this.stack) === \"@section\" && token === \"@section\") {\n\t\t\t\tif (this.currentIndentLevel > 0) this.decrementIndentLevel();\n\t\t\t\tthis.shouldBeIndent = true;\n\t\t\t\tthis.stack.push(token);\n\t\t\t} else {\n\t\t\t\tthis.shouldBeIndent = true;\n\t\t\t\tthis.stack.push(token);\n\t\t\t}\n\t\t}\n\n\t\tif (_.includes(indentEndTokens, token)) {\n\t\t\tif (token === \"@endswitch\" && _.last(this.stack) === \"@default\") {\n\t\t\t\tthis.decrementIndentLevel(2);\n\t\t\t\tthis.shouldBeIndent = false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.decrementIndentLevel();\n\t\t\tthis.shouldBeIndent = false;\n\t\t\tthis.stack.pop();\n\t\t}\n\n\t\tif (_.includes(indentElseTokens, token)) {\n\t\t\tthis.decrementIndentLevel();\n\t\t\tthis.shouldBeIndent = true;\n\t\t}\n\t}\n\n\tasync processToken(tokenStruct: any, token: string) {\n\t\tif (\n\t\t\t_.includes(\n\t\t\t\ttokenStruct.scopes,\n\t\t\t\t\"punctuation.definition.comment.begin.blade\",\n\t\t\t)\n\t\t) {\n\t\t\tthis.isInsideCommentBlock = true;\n\t\t}\n\n\t\tif (this.argumentCheck) {\n\t\t\tconst { count, inString, stack, unindentOn } = this.argumentCheck;\n\t\t\tif (!inString && token === \")\") {\n\t\t\t\tstack.push(token);\n\t\t\t\tcount[token] += 1;\n\t\t\t\tif (count[\"(\"] === count[token]) {\n\t\t\t\t\t// finished\n\t\t\t\t\tconst expression = stack.join(\"\");\n\t\t\t\t\tconst argumentCount = await util.getArgumentsCount(\n\t\t\t\t\t\texpression,\n\t\t\t\t\t\tthis.options,\n\t\t\t\t\t);\n\n\t\t\t\t\tif (argumentCount >= unindentOn) {\n\t\t\t\t\t\tthis.shouldBeIndent = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.argumentCheck = false;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tstack.push(token);\n\n\t\t\tif (inString === token) {\n\t\t\t\tthis.argumentCheck.inString = false;\n\t\t\t} else if (!inString && (token === '\"' || token === \"'\")) {\n\t\t\t\tthis.argumentCheck.inString = token;\n\t\t\t}\n\n\t\t\tif (token === \"(\" && !inString) {\n\t\t\t\tcount[token] += 1;\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\t_.includes(tokenStruct.scopes, \"punctuation.definition.comment.end.blade\")\n\t\t) {\n\t\t\tthis.isInsideCommentBlock = false;\n\t\t}\n\t\tif (token === \"{{--\" || token.includes(\"{{--\")) {\n\t\t\tthis.isInsideCommentBlock = true;\n\t\t}\n\n\t\tif (token === \"--}}\" || token.includes(\"--}}\")) {\n\t\t\tthis.isInsideCommentBlock = false;\n\t\t}\n\n\t\tif (!_.includes(tokenStruct.scopes, \"keyword.blade\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.isInsideCommentBlock) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait this.processKeyword(token.toLowerCase());\n\n\t\tif (\n\t\t\t_.includes(\n\t\t\t\tObject.keys(optionalStartWithoutEndTokens),\n\t\t\t\ttoken.toLowerCase(),\n\t\t\t)\n\t\t) {\n\t\t\tthis.argumentCheck = {\n\t\t\t\t// @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message\n\t\t\t\tunindentOn: optionalStartWithoutEndTokens[token.toLowerCase()],\n\t\t\t\tstack: [],\n\t\t\t\tinString: false,\n\t\t\t\tcount: { \"(\": 0, \")\": 0 },\n\t\t\t};\n\t\t}\n\t}\n\n\tasync processTokenizeResult(tokenizeLineResult: any, originalLine: any) {\n\t\tif (this.shouldBeIndent) {\n\t\t\tthis.incrementIndentLevel();\n\t\t\tthis.shouldBeIndent = false;\n\t\t}\n\n\t\tif (hasStartAndEndToken(tokenizeLineResult, originalLine)) {\n\t\t\tthis.insertFormattedLineToResult(originalLine);\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let j = 0; j < tokenizeLineResult.tokens.length; j += 1) {\n\t\t\tconst tokenStruct = tokenizeLineResult.tokens[j];\n\n\t\t\tconst token = originalLine\n\t\t\t\t.substring(tokenStruct.startIndex, tokenStruct.endIndex)\n\t\t\t\t.trim();\n\n\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\tawait this.processToken(tokenStruct, token);\n\t\t}\n\n\t\tthis.insertFormattedLineToResult(originalLine);\n\t}\n\n\tinsertFormattedLineToResult(originalLine: any) {\n\t\tconst originalLineWhitespaces = detectIndent(originalLine).amount;\n\t\tconst whitespaces =\n\t\t\toriginalLineWhitespaces + this.indentSize * this.currentIndentLevel;\n\t\tconst formattedLine =\n\t\t\tthis.indentCharacter.repeat(whitespaces < 0 ? 0 : whitespaces) +\n\t\t\toriginalLine.trim();\n\n\t\t// blankline\n\t\tif (originalLine.length === 0) {\n\t\t\tthis.result.push(originalLine);\n\t\t}\n\n\t\t// formatted line\n\t\tif (originalLine.length !== 0 && formattedLine.length > 0) {\n\t\t\tthis.result.push(formattedLine);\n\t\t}\n\n\t\tif (formattedLine !== originalLine) {\n\t\t\tthis.diffs.push({\n\t\t\t\toriginal: originalLine,\n\t\t\t\tformatted: formattedLine,\n\t\t\t});\n\t\t}\n\t}\n\n\tincrementIndentLevel(level = 1) {\n\t\tthis.currentIndentLevel += level;\n\t}\n\n\tdecrementIndentLevel(level = 1) {\n\t\tthis.currentIndentLevel -= level;\n\t}\n}\n", "const constants = {\n\tdefaultPrintWidth: 120,\n};\n\nexport default constants;\n", "import _ from \"lodash\";\nimport { nestedParenthesisRegex } from \"src/regex\";\nimport { Processor } from \"./processor\";\n\nexport class AdjustSpacesProcessor extends Processor {\n\tprivate bladeComments: string[] = [];\n\n\tasync preProcess(_content: string): Promise<any> {}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.adjustSpaces(content);\n\t}\n\n\tprivate async adjustSpaces(content: string): Promise<any> {\n\t\tconst directivesRequiredSpace = [\"@unless\"];\n\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(\n\t\t\t\t`(?<!@)(${directivesRequiredSpace.join(\n\t\t\t\t\t\"|\",\n\t\t\t\t)})\\\\s*${nestedParenthesisRegex}`,\n\t\t\t\t\"gi\",\n\t\t\t),\n\t\t\t(_matched: string, p1: string, p2: string) => `${p1} (${p2})`,\n\t\t);\n\t}\n}\n", "// eslint-disable-next-line import/prefer-default-export\nexport const nestedParenthesisRegex =\n\t\"\\\\(((?:[^)(]+|\\\\((?:[^)(]+|\\\\((?:[^)(]+|\\\\((?:[^)(]+|\\\\([^)(]*\\\\))*\\\\))*\\\\))*\\\\))*)\\\\)?\";\n", "import type Formatter from \"src/formatter\";\n\nexport abstract class Processor {\n\tconstructor(protected formatter: Formatter) {}\n\n\tabstract preProcess(content: string): Promise<any>;\n\tabstract postProcess(content: string): Promise<any>;\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class BladeBraceProcessor extends Processor {\n\tprivate bladeBraces: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveBladeBrace(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreBladeBrace(content);\n\t}\n\n\tprivate async preserveBladeBrace(content: string): Promise<any> {\n\t\treturn _.replace(content, /\\{\\{(.*?)\\}\\}/gs, (_match: any, p1: any) => {\n\t\t\t// if content is blank\n\t\t\tif (p1 === \"\") {\n\t\t\t\treturn this.storeBladeBrace(p1, p1.length);\n\t\t\t}\n\n\t\t\t// preserve a space if content contains only space, tab, or new line character\n\t\t\tif (!/\\S/.test(p1)) {\n\t\t\t\treturn this.storeBladeBrace(\" \", \" \".length);\n\t\t\t}\n\n\t\t\t// any other content\n\t\t\treturn this.storeBladeBrace(p1.trim(), p1.trim().length);\n\t\t});\n\t}\n\n\tprivate async restoreBladeBrace(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res: any) =>\n\t\t\treplaceAsync(\n\t\t\t\tres,\n\t\t\t\tnew RegExp(`${this.getBladeBracePlaceholder(\"(\\\\d+)\")}`, \"gm\"),\n\t\t\t\tasync (_match: string, p1: number) => {\n\t\t\t\t\tconst placeholder = this.getBladeBracePlaceholder(p1.toString());\n\t\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t\t) ?? [\"\"];\n\t\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\t\t\t\t\tconst bladeBrace = this.bladeBraces[p1];\n\n\t\t\t\t\tif (bladeBrace.trim() === \"\") {\n\t\t\t\t\t\treturn `{{${bladeBrace}}}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (util.isInline(bladeBrace)) {\n\t\t\t\t\t\treturn `{{ ${(\n\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(bladeBrace, {\n\t\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\t\ttrailingCommaPHP: false,\n\t\t\t\t\t\t\t\tprintWidth: util.printWidthForInline,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t\t\t\t\t.split(\"\\n\")\n\t\t\t\t\t\t\t.map((line) => line.trim())\n\t\t\t\t\t\t\t.join(\"\")\n\t\t\t\t\t\t\t// @ts-expect-error ts-migrate(2554) FIXME: Expected 0 arguments, but got 1.\n\t\t\t\t\t\t\t.trimRight(\"\\n\")} }}`;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn `{{ ${util.indentRawPhpBlock(\n\t\t\t\t\t\tindent,\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(\n\t\t\t\t\t\t\t\tbladeBrace,\n\t\t\t\t\t\t\t\tthis.formatter.options,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t.trimEnd(),\n\t\t\t\t\t\tthis.formatter,\n\t\t\t\t\t)} }}`;\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreBladeBrace(value: any, length: any) {\n\t\tconst index = this.bladeBraces.push(value) - 1;\n\t\tconst brace = \"{{  }}\";\n\t\treturn this.getBladeBracePlaceholder(index, length + brace.length);\n\t}\n\n\tgetBladeBracePlaceholder(replace: any, length = 0) {\n\t\tif (length > 0) {\n\t\t\tconst template = \"___blade_brace_#___\";\n\t\t\tconst gap = length - template.length;\n\t\t\treturn _.replace(\n\t\t\t\t`___blade_brace_${_.repeat(\"_\", gap > 0 ? gap : 0)}#___`,\n\t\t\t\t\"#\",\n\t\t\t\treplace,\n\t\t\t);\n\t\t}\n\n\t\treturn _.replace(\"___blade_brace_+?#___\", \"#\", replace);\n\t}\n}\n", "import fs from \"node:fs\";\nimport os from \"node:os\";\n// @ts-ignore\n// eslint-disable-next-line\nimport phpPlugin from \"@prettier/plugin-php/standalone\";\nimport chalk from \"chalk\";\nimport detectIndent from \"detect-indent\";\nimport beautify from \"js-beautify\";\n/* eslint-disable max-len */\nimport _ from \"lodash\";\nimport * as prettier from \"prettier/standalone\";\nimport replaceAsync from \"string-replace-async\";\nimport {\n\tindentStartTokens,\n\tphpKeywordEndTokens,\n\tphpKeywordStartTokens,\n} from \"./indent\";\nimport type { Formatter } from \"./main\";\nimport { nestedParenthesisRegex } from \"./regex\";\nimport type { EndOfLine } from \"./runtimeConfig\";\nimport * as vsctm from \"./vsctm\";\n\nexport const optional = (obj: any) => {\n\tconst chain = {\n\t\tget() {\n\t\t\treturn null;\n\t\t},\n\t};\n\n\tif (_.isUndefined(obj) || _.isNull(obj)) {\n\t\treturn chain;\n\t}\n\n\treturn obj;\n};\n\nexport async function readFile(path: any) {\n\treturn new Promise((resolve, reject) => {\n\t\tfs.readFile(path, (error: any, data: any) =>\n\t\t\terror ? reject(error) : resolve(data),\n\t\t);\n\t});\n}\n\nexport function splitByLines(content: any) {\n\tif (!content) {\n\t\treturn \"\";\n\t}\n\n\treturn content.split(/\\r\\n|\\n|\\r/);\n}\n\nexport type FormatPhpOption = {\n\tnoPhpSyntaxCheck?: boolean;\n\tprintWidth?: number;\n\ttrailingCommaPHP?: boolean;\n\tphpVersion?: string;\n\tnoSingleQuote?: boolean;\n};\n\nexport const printWidthForInline = 1000;\n\nconst defaultFormatPhpOption = {\n\tnoPhpSyntaxCheck: false,\n\tprintWidth: printWidthForInline,\n\ttrailingCommaPHP: true,\n\tphpVersion: \"8.4\",\n\tnoSingleQuote: false,\n};\n\nexport async function formatStringAsPhp(\n\tcontent: any,\n\tparams: FormatPhpOption = {},\n): Promise<string> {\n\tconst options = {\n\t\t...defaultFormatPhpOption,\n\t\t...params,\n\t};\n\n\tconst adjust = params.adjustPrintWidthBy ?? 0;\n\tconst printWidth = params.useProjectPrintWidth\n\t\t? options.printWidth - adjust\n\t\t: printWidthForInline;\n\ttry {\n\t\treturn await prettier.format(content.replace(/\\n$/, \"\"), {\n\t\t\tparser: \"php\",\n\t\t\tprintWidth,\n\t\t\tsingleQuote: !options.noSingleQuote,\n\t\t\t// @ts-ignore\n\t\t\tphpVersion: options.phpVersion,\n\t\t\ttrailingCommaPHP: options.trailingCommaPHP,\n\t\t\tplugins: [phpPlugin],\n\t\t});\n\t} catch (error: any) {\n\t\tif (errorHasPhpVersionError(error)) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (options.noPhpSyntaxCheck) {\n\t\t\treturn content;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n\nexport async function formatRawStringAsPhp(\n\tcontent: string,\n\tparams: FormatPhpOption = {},\n) {\n\tconst options = {\n\t\t...defaultFormatPhpOption,\n\t\t...params,\n\t};\n\n\ttry {\n\t\treturn (\n\t\t\tawait prettier.format(`<?php echo ${content} ?>`, {\n\t\t\t\tparser: \"php\",\n\t\t\t\tprintWidth: options.printWidth,\n\t\t\t\tsingleQuote: !options.noSingleQuote,\n\t\t\t\t// @ts-ignore\n\t\t\t\tphpVersion: options.phpVersion,\n\t\t\t\ttrailingCommaPHP: options.trailingCommaPHP,\n\t\t\t\tplugins: [phpPlugin],\n\t\t\t})\n\t\t).replace(/<\\?php echo (.*)?\\?>/gs, (_match: any, p1: any) =>\n\t\t\tp1.trim().replace(/;\\s*$/, \"\"),\n\t\t);\n\t} catch (error) {\n\t\tif (errorHasPhpVersionError(error)) {\n\t\t\tthrow error;\n\t\t}\n\n\t\tif (options.noPhpSyntaxCheck) {\n\t\t\treturn content;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n\nfunction errorHasPhpVersionError(error: any) {\n\treturn error.message.includes(\n\t\t\"Invalid phpVersion value. Expected one of the following values\",\n\t);\n}\n\nexport async function getArgumentsCount(\n\texpression: string,\n\toptions: FormatPhpOption,\n) {\n\tconst code = `<?php tmp_func${expression}; ?>`;\n\n\ttry {\n\t\t// @ts-ignore\n\t\t// eslint-disable-next-line no-underscore-dangle\n\t\tconst { ast } = await prettier.__debug.parse(code, {\n\t\t\tparser: \"php\",\n\t\t\tphpVersion: options.phpVersion,\n\t\t\tplugins: [phpPlugin],\n\t\t});\n\n\t\treturn ast.children[0].expression.arguments.length || 0;\n\t} catch (_e) {\n\t\treturn 0;\n\t}\n}\n\nexport function normalizeIndentLevel(length: any) {\n\tif (length < 0) {\n\t\treturn 0;\n\t}\n\n\treturn length;\n}\n\nexport function printDiffs(diffs: any) {\n\treturn Promise.all(\n\t\t_.map(diffs, async (diff: any) => {\n\t\t\tprocess.stdout.write(`path: ${chalk.bold(diff.path)}:${diff.line}\\n`);\n\t\t\tprocess.stdout.write(chalk.red(`--${diff.original}\\n`));\n\t\t\tprocess.stdout.write(chalk.green(`++${diff.formatted}\\n`));\n\t\t}),\n\t);\n}\n\nexport function generateDiff(\n\tpath: any,\n\toriginalLines: any,\n\tformattedLines: any,\n) {\n\tconst diff = _.map(originalLines, (originalLine: any, index: any) => {\n\t\tif (_.isEmpty(originalLine)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (originalLine === formattedLines[index]) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn {\n\t\t\tpath,\n\t\t\tline: index + 1,\n\t\t\toriginal: originalLine,\n\t\t\tformatted: formattedLines[index],\n\t\t};\n\t});\n\n\treturn _.without(diff, null);\n}\n\nexport async function prettifyPhpContentWithUnescapedTags(\n\tcontent: string,\n\toptions: FormatPhpOption,\n) {\n\tconst directives = _.without(\n\t\tindentStartTokens,\n\t\t\"@switch\",\n\t\t\"@forelse\",\n\t\t\"@php\",\n\t).join(\"|\");\n\n\tconst directiveRegexes = new RegExp(\n\t\t// eslint-disable-next-line max-len\n\t\t`(?!\\\\/\\\\*.*?\\\\*\\\\/)(${directives})(\\\\s*?)${nestedParenthesisRegex}`,\n\t\t\"gmi\",\n\t);\n\n\treturn new Promise((resolve) => resolve(content))\n\t\t.then((res: any) =>\n\t\t\treplaceAsync(\n\t\t\t\tres,\n\t\t\t\tdirectiveRegexes,\n\t\t\t\tasync (_match: any, p1: any, p2: any, p3: any) =>\n\t\t\t\t\t(\n\t\t\t\t\t\tawait formatStringAsPhp(\n\t\t\t\t\t\t\t`<?php ${p1.substr(\"1\")}${p2}(${p3}) ?>`,\n\t\t\t\t\t\t\toptions,\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t\t.replace(\n\t\t\t\t\t\t\t/<\\?php\\s(.*?)(\\s*?)\\((.*?)\\);*\\s\\?>\\n/gs,\n\t\t\t\t\t\t\t(_match2: any, j1: any, j2: any, j3: any) =>\n\t\t\t\t\t\t\t\t`@${j1.trim()}${j2}(${j3.trim()})`,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t\t\t\t.replace(/,\\)$/, \")\")\n\t\t\t\t\t\t.replace(\n\t\t\t\t\t\t\t/(?:\\n\\s*)* as(?= (?:&{0,1}\\$[\\w]+|list|\\[\\$[\\w]+))/g,\n\t\t\t\t\t\t\t\" as\",\n\t\t\t\t\t\t),\n\t\t\t),\n\t\t)\n\t\t.then((res) => formatStringAsPhp(res, options));\n}\n\nexport async function prettifyPhpContentWithEscapedTags(\n\tcontent: string,\n\toptions: FormatPhpOption,\n) {\n\treturn new Promise((resolve) => resolve(content))\n\t\t.then((res: any) => _.replace(res, /{!!/g, \"<?php /*escaped*/\"))\n\t\t.then((res) => _.replace(res, /!!}/g, \"/*escaped*/ ?>\\n\"))\n\t\t.then((res) => formatStringAsPhp(res, options))\n\t\t.then((res) => _.replace(res, /<\\?php\\s\\/\\*escaped\\*\\//g, \"{!! \"))\n\t\t.then((res) => _.replace(res, /\\/\\*escaped\\*\\/\\s\\?>\\n/g, \" !!}\"));\n}\n\nexport async function removeSemicolon(content: any) {\n\treturn new Promise((resolve) => {\n\t\tresolve(content);\n\t})\n\t\t.then((res: any) => _.replace(res, /;[\\n\\s]*!!\\}/g, \" !!}\"))\n\t\t.then((res) => _.replace(res, /;[\\s\\n]*!!}/g, \" !!}\"))\n\t\t.then((res) => _.replace(res, /;[\\n\\s]*}}/g, \" }}\"))\n\t\t.then((res) => _.replace(res, /; }}/g, \" }}\"))\n\t\t.then((res) => _.replace(res, /; --}}/g, \" --}}\"));\n}\n\nexport async function formatAsPhp(content: string, options: FormatPhpOption) {\n\treturn prettifyPhpContentWithUnescapedTags(content, options);\n}\n\nexport async function preserveOriginalPhpTagInHtml(content: any) {\n\treturn new Promise((resolve) => resolve(content))\n\t\t.then((res: any) => _.replace(res, /<\\?php/g, \"/** phptag_start **/\"))\n\t\t.then((res) => _.replace(res, /\\?>/g, \"/** end_phptag **/\"));\n}\n\nexport function revertOriginalPhpTagInHtml(content: any) {\n\treturn new Promise((resolve) => resolve(content))\n\t\t.then((res: any) =>\n\t\t\t_.replace(res, /\\/\\*\\*[\\s\\n]*?phptag_start[\\s\\n]*?\\*\\*\\//gs, \"<?php\"),\n\t\t)\n\t\t.then((res) =>\n\t\t\t_.replace(res, /\\/\\*\\*[\\s\\n]*?end_phptag[\\s\\n]*?\\*\\*\\/[\\s];\\n/g, \"?>;\"),\n\t\t)\n\t\t.then((res) =>\n\t\t\t_.replace(res, /\\/\\*\\*[\\s\\n]*?end_phptag[\\s\\n]*?\\*\\*\\//g, \"?>\"),\n\t\t);\n}\n\nexport function indent(content: any, level: any, options: any) {\n\tconst lines = content.split(\"\\n\");\n\treturn _.map(lines, (line: any, index: any) => {\n\t\tif (!line.match(/\\w/)) {\n\t\t\treturn line;\n\t\t}\n\n\t\tconst ignoreFirstLine = optional(options).ignoreFirstLine || false;\n\n\t\tif (ignoreFirstLine && index === 0) {\n\t\t\treturn line;\n\t\t}\n\n\t\tconst originalLineWhitespaces = detectIndent(line).amount;\n\t\tconst indentChar = optional(options).useTabs ? \"\\t\" : \" \";\n\t\tconst indentSize = optional(options).indentSize || 4;\n\t\tconst whitespaces = originalLineWhitespaces + indentSize * level;\n\n\t\tif (whitespaces < 0) {\n\t\t\treturn line;\n\t\t}\n\n\t\treturn indentChar.repeat(whitespaces) + line.trimLeft();\n\t}).join(\"\\n\");\n}\n\nexport function unindent(\n\t_directive: any,\n\tcontent: any,\n\tlevel: any,\n\toptions: any,\n) {\n\tconst lines = content.split(\"\\n\");\n\treturn _.map(lines, (line: any) => {\n\t\tif (!line.match(/\\w/)) {\n\t\t\treturn line;\n\t\t}\n\n\t\tconst originalLineWhitespaces = detectIndent(line).amount;\n\t\tconst indentChar = optional(options).useTabs ? \"\\t\" : \" \";\n\t\tconst indentSize = optional(options).indentSize || 4;\n\t\tconst whitespaces = originalLineWhitespaces - indentSize * level;\n\n\t\tif (whitespaces < 0) {\n\t\t\treturn line;\n\t\t}\n\n\t\treturn indentChar.repeat(whitespaces) + line.trimLeft();\n\t}).join(\"\\n\");\n}\n\nexport function preserveDirectives(content: any) {\n\tconst startTokens = _.without(phpKeywordStartTokens, \"@case\");\n\tconst endTokens = _.without(phpKeywordEndTokens, \"@break\");\n\n\treturn new Promise((resolve) => resolve(content))\n\t\t.then((res: any) => {\n\t\t\tconst regex = new RegExp(\n\t\t\t\t`(${startTokens.join(\"|\")})([\\\\s]*?)${nestedParenthesisRegex}`,\n\t\t\t\t\"gis\",\n\t\t\t);\n\t\t\treturn _.replace(\n\t\t\t\tres,\n\t\t\t\tregex,\n\t\t\t\t(_match: any, p1: any, p2: any, p3: any) =>\n\t\t\t\t\t`<beautifyTag start=\"${p1}${p2}\" exp=\"^^^${_.escape(p3)}^^^\">`,\n\t\t\t);\n\t\t})\n\t\t.then((res: any) => {\n\t\t\tconst regex = new RegExp(\n\t\t\t\t`(?!end=\".*)(${endTokens.join(\"|\")})(?!.*\")`,\n\t\t\t\t\"gi\",\n\t\t\t);\n\t\t\treturn _.replace(\n\t\t\t\tres,\n\t\t\t\tregex,\n\t\t\t\t(_match: any, p1: any) => `</beautifyTag end=\"${p1}\">`,\n\t\t\t);\n\t\t});\n}\n\nexport function preserveDirectivesInTag(content: any) {\n\treturn new Promise((resolve) => {\n\t\tconst regex = new RegExp(\n\t\t\t`(<[^>]*?)(${phpKeywordStartTokens.join(\n\t\t\t\t\"|\",\n\t\t\t)})([\\\\s]*?)${nestedParenthesisRegex}(.*?)(${phpKeywordEndTokens.join(\n\t\t\t\t\"|\",\n\t\t\t)})([^>]*?>)`,\n\t\t\t\"gis\",\n\t\t);\n\t\tresolve(\n\t\t\t_.replace(\n\t\t\t\tcontent,\n\t\t\t\tregex,\n\t\t\t\t(\n\t\t\t\t\t_match: any,\n\t\t\t\t\tp1: any,\n\t\t\t\t\tp2: any,\n\t\t\t\t\tp3: any,\n\t\t\t\t\tp4: any,\n\t\t\t\t\tp5: any,\n\t\t\t\t\tp6: any,\n\t\t\t\t\tp7: any,\n\t\t\t\t) =>\n\t\t\t\t\t`${p1}|-- start=\"${p2}${p3}\" exp=\"^^^${p4}^^^\" body=\"^^^${_.escape(\n\t\t\t\t\t\t_.trim(p5),\n\t\t\t\t\t)}^^^\" end=\"${p6}\" --|${p7}`,\n\t\t\t),\n\t\t);\n\t});\n}\n\nexport function revertDirectives(content: any) {\n\treturn new Promise((resolve) => resolve(content))\n\t\t.then((res: any) =>\n\t\t\t_.replace(\n\t\t\t\tres,\n\t\t\t\t/<beautifyTag.*?start=\"(.*?)\".*?exp=\".*?\\^\\^\\^(.*?)\\^\\^\\^.*?\"\\s*>/gs,\n\t\t\t\t(_match: any, p1: any, p2: any) => `${p1}(${_.unescape(p2)})`,\n\t\t\t),\n\t\t)\n\t\t.then((res) =>\n\t\t\t_.replace(\n\t\t\t\tres,\n\t\t\t\t/<\\/beautifyTag.*?end=\"(.*?)\"\\s*>/gs,\n\t\t\t\t(_match: any, p1: any) => `${p1}`,\n\t\t\t),\n\t\t);\n}\n\nexport function revertDirectivesInTag(content: any) {\n\treturn new Promise((resolve) => resolve(content))\n\t\t.then((res: any) =>\n\t\t\t_.replace(\n\t\t\t\tres,\n\t\t\t\t/\\|--.*?start=\"(.*?)\".*?exp=\".*?\\^\\^\\^(.*?)\\^\\^\\^.*?\"(.*?)body=\".*?\\^\\^\\^(.*?)\\^\\^\\^.*?\".*?end=\"(.*?)\".*?--\\|/gs,\n\t\t\t\t(_match: any, p1: any, p2: any, _p3: any, p4: any, p5: any) =>\n\t\t\t\t\t`${_.trimStart(p1)}(${p2}) ${_.unescape(p4)} ${p5}`,\n\t\t\t),\n\t\t)\n\t\t.then((res) =>\n\t\t\t_.replace(\n\t\t\t\tres,\n\t\t\t\t/\\/-- end=\"(.*?)\"--\\//gs,\n\t\t\t\t(_match: any, p1: any) => `${p1}`,\n\t\t\t),\n\t\t);\n}\nexport function printDescription() {\n\tconst returnLine = \"\\n\\n\";\n\tprocess.stdout.write(returnLine);\n\tprocess.stdout.write(chalk.bold.green(\"Fixed: F\\n\"));\n\tprocess.stdout.write(chalk.bold.red(\"Errors: E\\n\"));\n\tprocess.stdout.write(chalk.bold(\"Not Changed: \") + chalk.bold.green(\".\\n\"));\n}\n\nconst escapeTags = [\n\t\"/\\\\*\\\\* phptag_start \\\\*\\\\*/\",\n\t\"/\\\\*\\\\* end_phptag \\\\*\\\\*/\",\n\t\"/\\\\*escaped\\\\*/\",\n\t\"__BLADE__;\",\n\t\"/\\\\* blade_comment_start \\\\*/\",\n\t\"/\\\\* blade_comment_end \\\\*/\",\n\t\"/\\\\*\\\\*\\\\*script_placeholder\\\\*\\\\*\\\\*/\",\n\t\"blade___non_native_scripts_\",\n\t\"blade___scripts_\",\n\t\"blade___html_tags_\",\n\t\"beautifyTag\",\n\t\"@customdirective\",\n\t\"@elsecustomdirective\",\n\t\"@endcustomdirective\",\n\t\"x-slot --___\\\\d+___--\",\n\t\"___attrs_+\\\\d+___\",\n];\n\nexport function checkResult(formatted: any) {\n\tif (new RegExp(escapeTags.join(\"|\")).test(formatted)) {\n\t\tthrow new Error(\n\t\t\t[\n\t\t\t\t\"Can't format blade: something goes wrong.\",\n\t\t\t\t// eslint-disable-next-line max-len\n\t\t\t\t\"Please check if template is too complicated or not. Or simplify template might solves issue.\",\n\t\t\t].join(\"\\n\"),\n\t\t);\n\t}\n\n\treturn formatted;\n}\n\nexport function escapeReplacementString(string: string) {\n\treturn string.replace(/\\$/g, \"$$$$\");\n}\n\nexport function debugLog(...content: any) {\n\t_.each(content, (item) => {\n\t\tconsole.log(\"------------------- content start -------------------\");\n\t\tconsole.log(item);\n\t\tconsole.log(\"------------------- content end   -------------------\");\n\t});\n\n\treturn content;\n}\n\nexport function getEndOfLine(endOfLine?: EndOfLine): string {\n\tswitch (endOfLine) {\n\t\tcase \"LF\":\n\t\t\treturn \"\\n\";\n\t\tcase \"CRLF\":\n\t\t\treturn \"\\r\\n\";\n\t\tdefault:\n\t\t\treturn os.EOL;\n\t}\n}\n\nexport function isInline(content: any) {\n\treturn _.split(content, \"\\n\").length === 1;\n}\n\nexport function indentRawPhpBlock(\n\tindent: detectIndent.Indent,\n\tcontent: any,\n\tformatter: Formatter,\n) {\n\tif (_.isEmpty(indent.indent)) {\n\t\treturn content;\n\t}\n\n\tif (isInline(content)) {\n\t\treturn `${content}`;\n\t}\n\n\tconst leftIndentAmount = indent.amount;\n\tconst indentLevel = leftIndentAmount / formatter.indentSize;\n\tconst prefixSpaces = formatter.indentCharacter.repeat(\n\t\tindentLevel < 0 ? 0 : indentLevel * formatter.indentSize,\n\t);\n\n\tconst lines = content.split(\"\\n\");\n\n\treturn _.chain(lines)\n\t\t.map((line: any, index: any) => {\n\t\t\tif (index === 0) {\n\t\t\t\treturn line.trim();\n\t\t\t}\n\n\t\t\treturn prefixSpaces + line;\n\t\t})\n\t\t.value()\n\t\t.join(\"\\n\");\n}\n\nexport function indentPhpComment(\n\tindent: detectIndent.Indent,\n\tcontent: string,\n\tformatter: Formatter,\n) {\n\tif (_.isEmpty(indent.indent)) {\n\t\treturn content;\n\t}\n\n\tif (isInline(content)) {\n\t\treturn `${content}`;\n\t}\n\n\tconst leftIndentAmount = indent.amount;\n\tconst indentLevel = leftIndentAmount / formatter.indentSize;\n\tconst prefixSpaces = formatter.indentCharacter.repeat(\n\t\tindentLevel < 0 ? 0 : indentLevel * formatter.indentSize,\n\t);\n\n\tconst lines = content.split(\"\\n\");\n\tlet withoutCommentLine = false;\n\n\treturn _.chain(lines)\n\t\t.map((line: string, index: number) => {\n\t\t\tif (index === 0) {\n\t\t\t\treturn line.trim();\n\t\t\t}\n\n\t\t\tif (!line.trim().startsWith(\"*\")) {\n\t\t\t\twithoutCommentLine = true;\n\t\t\t\treturn line;\n\t\t\t}\n\n\t\t\tif (line.trim().endsWith(\"*/\") && withoutCommentLine) {\n\t\t\t\treturn line;\n\t\t\t}\n\n\t\t\treturn prefixSpaces + line;\n\t\t})\n\t\t.join(\"\\n\")\n\t\t.value();\n}\n\nexport async function formatExpressionInsideBladeDirective(\n\tmatchedExpression: string,\n\tindent: detectIndent.Indent,\n\tformatter: Formatter,\n\twrapLength: number | undefined = undefined,\n) {\n\tconst formatTarget = `func(${matchedExpression})`;\n\tconst formattedExpression = await formatRawStringAsPhp(formatTarget, {\n\t\t...formatter.options,\n\t\tprintWidth: wrapLength ?? formatter.defaultPhpFormatOption.printWidth,\n\t});\n\n\tif (formattedExpression === formatTarget) {\n\t\treturn matchedExpression;\n\t}\n\n\tlet inside = formattedExpression\n\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t.replace(/(?<!(['\"]).*)(?<=\\()[\\n\\s]+?(?=\\w)/gm, \"\")\n\t\t.replace(/(.*)],[\\n\\s]*?\\)$/gm, (_match: string, p1: string) => `${p1}]\\n)`)\n\t\t.replace(/,[\\n\\s]*?\\)/gs, \")\")\n\t\t.replace(/,(\\s*?\\))$/gm, (_match, p1) => p1)\n\t\t.trim();\n\n\tif (formatter.options.useTabs || false) {\n\t\tinside = _.replace(\n\t\t\tinside,\n\t\t\t/(?<=^ *) {4}/gm,\n\t\t\t\"\\t\".repeat(formatter.indentSize),\n\t\t);\n\t}\n\n\tinside = inside.replace(\n\t\t/func\\((.*)\\)/gis,\n\t\t(_match: string, p1: string) => p1,\n\t);\n\tif (isInline(inside.trim())) {\n\t\tinside = inside.trim();\n\t}\n\n\treturn indentRawPhpBlock(indent, inside, formatter);\n}\n\nexport function indentBladeDirectiveBlock(\n\tindent: detectIndent.Indent,\n\tcontent: any,\n\tformatter: Formatter,\n) {\n\tif (_.isEmpty(indent.indent)) {\n\t\treturn content;\n\t}\n\n\tif (isInline(content)) {\n\t\treturn `${indent.indent}${content}`;\n\t}\n\n\tconst leftIndentAmount = indent.amount;\n\tconst indentLevel = leftIndentAmount / formatter.indentSize;\n\tconst prefixSpaces = formatter.indentCharacter.repeat(\n\t\tindentLevel < 0 ? 0 : indentLevel * formatter.indentSize,\n\t);\n\tconst prefixForEnd = formatter.indentCharacter.repeat(\n\t\tindentLevel < 0 ? 0 : indentLevel * formatter.indentSize,\n\t);\n\n\tconst lines = content.split(\"\\n\");\n\n\treturn _.chain(lines)\n\t\t.map((line: any, index: any) => {\n\t\t\tif (index === lines.length - 1) {\n\t\t\t\treturn prefixForEnd + line;\n\t\t\t}\n\n\t\t\treturn prefixSpaces + line;\n\t\t})\n\t\t.value()\n\t\t.join(\"\\n\");\n}\n\nexport async function isMultilineStatement(\n\trawBlock: any,\n\tformatter: Formatter,\n) {\n\treturn (\n\t\t(await formatStringAsPhp(`<?php${rawBlock}?>`, formatter.options))\n\t\t\t.trimRight()\n\t\t\t.split(\"\\n\").length > 1\n\t);\n}\n\nexport function indentRawBlock(\n\tindent: detectIndent.Indent,\n\tcontent: any,\n\tformatter: Formatter,\n) {\n\tif (isInline(content)) {\n\t\treturn `${indent.indent}${content}`;\n\t}\n\n\tconst leftIndentAmount = indent.amount;\n\tconst indentLevel = leftIndentAmount / formatter.indentSize;\n\tconst prefix = formatter.indentCharacter.repeat(\n\t\tindentLevel < 0 ? 0 : (indentLevel + 1) * formatter.indentSize,\n\t);\n\tconst prefixForEnd = formatter.indentCharacter.repeat(\n\t\tindentLevel < 0 ? 0 : indentLevel * formatter.indentSize,\n\t);\n\n\tconst lines = content.split(\"\\n\");\n\n\treturn _.chain(lines)\n\t\t.map((line: any, index: any) => {\n\t\t\tif (index === 0) {\n\t\t\t\treturn line.trim();\n\t\t\t}\n\n\t\t\tif (index === lines.length - 1) {\n\t\t\t\treturn prefixForEnd + line;\n\t\t\t}\n\n\t\t\tif (line.length === 0) {\n\t\t\t\treturn line;\n\t\t\t}\n\n\t\t\treturn prefix + line;\n\t\t})\n\t\t.join(\"\\n\")\n\t\t.value();\n}\n\nexport function indentComponentAttribute(\n\tprefix: string,\n\tcontent: string,\n\tformatter: Formatter,\n) {\n\tif (_.isEmpty(prefix)) {\n\t\treturn content;\n\t}\n\n\tif (isInline(content)) {\n\t\treturn `${content}`;\n\t}\n\n\tif (isInline(content) && /\\S/.test(prefix)) {\n\t\treturn `${content}`;\n\t}\n\n\tconst leftIndentAmount = detectIndent(prefix).amount;\n\tconst indentLevel = leftIndentAmount / formatter.indentSize;\n\tconst prefixSpaces = formatter.indentCharacter.repeat(\n\t\tindentLevel < 0 ? 0 : indentLevel * formatter.indentSize,\n\t);\n\n\tconst lines = content.split(\"\\n\");\n\n\treturn _.chain(lines)\n\t\t.map((line: any, index: any) => {\n\t\t\tif (index === 0) {\n\t\t\t\treturn line.trim();\n\t\t\t}\n\n\t\t\treturn prefixSpaces + line;\n\t\t})\n\t\t.value()\n\t\t.join(\"\\n\");\n}\n\nexport function formatAsHtml(data: any, formatter: Formatter) {\n\tconst options = {\n\t\tindent_size: optional(formatter.options).indentSize || 4,\n\t\twrap_line_length: optional(formatter.options).wrapLineLength || 120,\n\t\twrap_attributes: optional(formatter.options).wrapAttributes || \"auto\",\n\t\twrap_attributes_min_attrs: optional(formatter.options)\n\t\t\t.wrapAttributesMinAttrs,\n\t\tindent_inner_html: optional(formatter.options).indentInnerHtml || false,\n\t\tend_with_newline: optional(formatter.options).endWithNewline || true,\n\t\tmax_preserve_newlines: optional(formatter.options).noMultipleEmptyLines\n\t\t\t? 1\n\t\t\t: undefined,\n\t\textra_liners: optional(formatter.options).extraLiners,\n\t\tcss: {\n\t\t\tend_with_newline: false,\n\t\t},\n\t\teol: formatter.endOfLine,\n\t};\n\n\tconst promise = new Promise((resolve) => resolve(data))\n\t\t.then((content) => preserveDirectives(content))\n\t\t.then((preserved) => beautify.html_beautify(preserved, options))\n\t\t.then((content) => revertDirectives(content));\n\n\treturn Promise.resolve(promise);\n}\n\nexport async function formatAsBlade(content: any, formatter: Formatter) {\n\t// init parameters\n\tformatter.currentIndentLevel = 0;\n\tformatter.shouldBeIndent = false;\n\n\tconst splittedLines = splitByLines(content);\n\n\tconst vsctmModule = await new vsctm.VscodeTextmate(\n\t\tformatter.vsctm,\n\t\tformatter.oniguruma,\n\t);\n\tconst registry = vsctmModule.createRegistry();\n\n\tconst formatted = registry\n\t\t.loadGrammar(\"text.html.php.blade\")\n\t\t.then((grammar: any) => vsctmModule.tokenizeLines(splittedLines, grammar))\n\t\t.then((tokenizedLines: any) =>\n\t\t\tformatter.formatTokenizedLines(splittedLines, tokenizedLines),\n\t\t)\n\t\t.catch((err: any) => {\n\t\t\tthrow err;\n\t\t});\n\n\treturn formatted;\n}\n\nexport function formatJS(jsCode: string): string {\n\tlet code: string = jsCode;\n\tconst tempVarStore: any = {\n\t\tjs: [],\n\t\tentangle: [],\n\t};\n\tfor (const directive of Object.keys(tempVarStore)) {\n\t\tcode = code.replace(\n\t\t\tnew RegExp(\n\t\t\t\t`@${directive}\\\\((?:[^)(]+|\\\\((?:[^)(]+|\\\\([^)(]*\\\\))*\\\\))*\\\\)`,\n\t\t\t\t\"gs\",\n\t\t\t),\n\t\t\t(m: any) => {\n\t\t\t\tconst index = tempVarStore[directive].push(m) - 1;\n\t\t\t\treturn getPlaceholder(directive, index, m.length);\n\t\t\t},\n\t\t);\n\t}\n\tcode = beautify.js_beautify(code, { brace_style: \"preserve-inline\" });\n\n\tfor (const directive of Object.keys(tempVarStore)) {\n\t\tcode = code.replace(\n\t\t\tnew RegExp(getPlaceholder(directive, \"_*(\\\\d+)\"), \"gms\"),\n\t\t\t(_match: any, p1: any) => tempVarStore[directive][p1],\n\t\t);\n\t}\n\n\treturn code;\n}\n\nexport function getPlaceholder(\n\tattribute: string,\n\treplace: any,\n\tlength: any = null,\n) {\n\tif (length && length > 0) {\n\t\tconst template = `___${attribute}_#___`;\n\t\tconst gap = length - template.length;\n\t\treturn _.replace(\n\t\t\t`___${attribute}${_.repeat(\"_\", gap > 0 ? gap : 1)}#___`,\n\t\t\t\"#\",\n\t\t\treplace,\n\t\t);\n\t}\n\n\tif (_.isNull(length)) {\n\t\treturn _.replace(`___${attribute}_#___`, \"#\", replace);\n\t}\n\n\treturn _.replace(`s___${attribute}_+?#___`, \"#\", replace);\n}\n", "import _ from \"lodash\";\n\nexport const directivePrefix = \"@\";\n\nexport const indentStartTokens = [\n\t\"@alert\",\n\t\"@pushonce\",\n\t\"@push\",\n\t\"@slot\",\n\t\"@switch\",\n\t\"@unless\",\n\t\"@verbatim\",\n\t\"@prependonce\",\n\t\"@prepend\",\n\t\"@once\",\n\t\"@error\",\n\t\"@empty\",\n\t\"@guest\",\n\t\"@isset\",\n\t\"@permission\",\n\t\"@permissions\",\n\t\"@canany\",\n\t\"@cannot\",\n\t\"@can\",\n\t\"@role\",\n\t\"@hasrole\",\n\t\"@hasanyrole\",\n\t\"@hasallroles\",\n\t\"@unlessrole\",\n\t\"@hasexactroles\",\n\t\"@if\",\n\t\"@production\",\n\t\"@env\",\n\t\"@while\",\n\t\"@auth\",\n\t\"@forelse\",\n\t\"@for\",\n\t\"@foreach\",\n\t\"@php\",\n\t\"@component\",\n\t\"@section\",\n\t\"@customdirective\",\n];\n\nexport const indentStartTokensWithoutPrefix = _.map(\n\tindentStartTokens,\n\t(token) => token.substring(1),\n);\n\nexport const indentEndTokens = [\n\t\"@endalert\",\n\t\"@endpushonce\",\n\t\"@endpush\",\n\t\"@endslot\",\n\t\"@endswitch\",\n\t\"@endunless\",\n\t\"@endverbatim\",\n\t\"@show\",\n\t\"@stop\",\n\t\"@endprependonce\",\n\t\"@endprepend\",\n\t\"@endonce\",\n\t\"@enderror\",\n\t\"@append\",\n\t\"@overwrite\",\n\t\"@endempty\",\n\t\"@endguest\",\n\t\"@endisset\",\n\t\"@endpermission\",\n\t\"@endpermissions\",\n\t\"@endcanany\",\n\t\"@endcannot\",\n\t\"@endcan\",\n\t\"@endrole\",\n\t\"@endhasrole\",\n\t\"@endhasanyrole\",\n\t\"@endhasallroles\",\n\t\"@endunlessrole\",\n\t\"@endhasexactroles\",\n\t\"@endif\",\n\t\"@endproduction\",\n\t\"@endenv\",\n\t\"@endwhile\",\n\t\"@endauth\",\n\t\"@endforelse\",\n\t\"@endforeach\",\n\t\"@endfor\",\n\t\"@endphp\",\n\t\"@endcomponent\",\n\t\"@endsection\",\n\t\"@endcustomdirective\",\n];\n\nexport const indentElseTokens = [\n\t\"@elseenv\",\n\t\"@elseguest\",\n\t\"@elseauth\",\n\t\"@elseif\",\n\t\"@elsecanany\",\n\t\"@elsecannot\",\n\t\"@elsecan\",\n\t\"@else\",\n\t\"@elsecustomdirective\",\n];\n\n// Directives which do not need an end token if a parameter is present\nexport const optionalStartWithoutEndTokens = {\n\t\"@section\": 2,\n\t\"@push\": 2,\n\t\"@prepend\": 2,\n\t\"@slot\": 2,\n};\n\nexport const tokenForIndentStartOrElseTokens = [\"@forelse\", \"@if\"];\n\nexport const indentStartOrElseTokens = [\"@empty\"];\n\nexport const indentStartAndEndTokens = [\"@default\"];\n\nexport const phpKeywordStartTokens = [\n\t\"@forelse\",\n\t\"@if\",\n\t\"@for\",\n\t\"@foreach\",\n\t\"@while\",\n\t\"@sectionmissing\",\n\t\"@case\",\n];\n\nexport const phpKeywordEndTokens = [\n\t\"@endforelse\",\n\t\"@endif\",\n\t\"@endforeach\",\n\t\"@endfor\",\n\t\"@endwhile\",\n\t\"@break\",\n];\n\nexport const inlinePhpDirectives = [\n\t\"@button\",\n\t\"@class\",\n\t\"@include\",\n\t\"@disabled\",\n\t\"@checked\",\n\t\"@json\",\n];\n\nexport const inlineFunctionTokens = [\n\t\"@set\",\n\t\"@json\",\n\t\"@js\",\n\t\"@selected\",\n\t\"@checked\",\n\t\"@disabled\",\n\t\"@php\",\n\t\"@include\",\n\t\"@includeif\",\n\t\"@includewhen\",\n\t\"@includeunless\",\n\t\"@includefirst\",\n\t\"@button\",\n\t\"@class\",\n\t\"@props\",\n\t\"@aware\",\n];\n\nexport const conditionalTokens = [\n\t\"@if\",\n\t\"@while\",\n\t\"@case\",\n\t\"@isset\",\n\t\"@empty\",\n\t\"@elseif\",\n\t\"@component\",\n\t\"@hassection\",\n\t\"@unless\",\n];\n\nexport const unbalancedStartTokens = [\"@hassection\"];\n\nexport const cssAtRuleTokens = [\n\t\"@charset\",\n\t\"@color-profile\",\n\t\"@counter-style\",\n\t\"@font-face\",\n\t\"@font-feature-values\",\n\t\"@import\",\n\t\"@keyframes\",\n\t\"@media\",\n\t\"@namespace\",\n\t\"@page\",\n\t\"@property\",\n\t\"@supports\",\n];\n\nexport function hasStartAndEndToken(\n\ttokenizeLineResult: any,\n\toriginalLine: any,\n) {\n\treturn (\n\t\t_.filter(tokenizeLineResult.tokens, (tokenStruct: any) => {\n\t\t\tconst token = originalLine\n\t\t\t\t.substring(tokenStruct.startIndex, tokenStruct.endIndex)\n\t\t\t\t.trim();\n\n\t\t\treturn (\n\t\t\t\t_.includes(indentStartTokens, token) ||\n\t\t\t\t_.includes(indentEndTokens, token)\n\t\t\t);\n\t\t}).length >= 2\n\t);\n}\n", "import { promises as fs } from \"node:fs\";\nimport path from \"node:path\";\nimport _ from \"lodash\";\nimport * as vscodeOniguruma from \"vscode-oniguruma\";\nimport { readFile } from \"./util\";\n\nexport class VscodeTextmate {\n\toniguruma: any;\n\n\tregistry: any;\n\n\tvsctm: any;\n\n\tinitCalled: any;\n\n\tconstructor(vsctm: any, oniguruma: any) {\n\t\t// @ts-ignore\n\t\t// biome-ignore lint/correctness/noConstructorReturn: false positive\n\t\treturn (async () => {\n\t\t\tthis.vsctm = vsctm.default ?? vsctm;\n\t\t\t// @ts-ignore\n\t\t\tthis.oniguruma = oniguruma || vscodeOniguruma?.default || vscodeOniguruma;\n\t\t\tawait this.loadWasm();\n\t\t\treturn this;\n\t\t})();\n\t}\n\n\tasync loadWasm() {\n\t\tconst wasm = await fs.readFile(\n\t\t\t// @ts-ignore\n\t\t\t// eslint-disable-next-line\n\t\t\trequire.resolve(\"vscode-oniguruma/release/onig.wasm\"),\n\t\t);\n\t\tawait this.oniguruma?.loadWASM(wasm.buffer);\n\n\t\tif (!this.initCalled) {\n\t\t\ttry {\n\t\t\t\tthis.oniguruma.loadWASM(wasm.buffer);\n\t\t\t} catch (_error) {\n\t\t\t\tthis.initCalled = true;\n\t\t\t}\n\n\t\t\tthis.initCalled = true;\n\t\t}\n\t}\n\n\tcreateRegistry() {\n\t\tthis.registry = new this.vsctm.Registry({\n\t\t\tloadGrammar: (scopeName: any) => {\n\t\t\t\tif (scopeName === \"text.html.php.blade\") {\n\t\t\t\t\t// https://github.com/onecentlin/\n\t\t\t\t\t// laravel-blade-snippets-vscode/\n\t\t\t\t\t// blob/master/syntaxes/blade.tmLanguage.json\n\t\t\t\t\treturn readFile(\n\t\t\t\t\t\tpath.resolve(__dirname, \"../syntaxes/blade.tmLanguage.json\"),\n\t\t\t\t\t).then((content: any) =>\n\t\t\t\t\t\tthis.vsctm.parseRawGrammar(\n\t\t\t\t\t\t\tcontent.toString(),\n\t\t\t\t\t\t\t\"./blade.tmLanguage.json\",\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\tonigLib: Promise.resolve({\n\t\t\t\tcreateOnigScanner: (sources: any) =>\n\t\t\t\t\tnew this.oniguruma.OnigScanner(sources),\n\t\t\t\tcreateOnigString: (str: any) => new this.oniguruma.OnigString(str),\n\t\t\t}),\n\t\t});\n\n\t\treturn this.registry;\n\t}\n\n\ttokenizeLines(splitedLines: any, grammar: any) {\n\t\treturn _.map(splitedLines, (line: any) =>\n\t\t\tgrammar.tokenizeLine(line, this.vsctm?.INITIAL),\n\t\t);\n\t}\n}\n\nexport default {\n\tVscodeTextmate,\n};\n", "import _ from \"lodash\";\nimport { Processor } from \"./processor\";\n\nexport class BladeCommentProcessor extends Processor {\n\tprivate bladeComments: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveBladeComment(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreBladeComment(content);\n\t}\n\n\tprivate async preserveBladeComment(content: string): Promise<any> {\n\t\treturn _.replace(content, /\\{\\{--(.*?)--\\}\\}/gs, (match: string) =>\n\t\t\tthis.storeBladeComment(match),\n\t\t);\n\t}\n\n\tprivate async restoreBladeComment(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res: any) =>\n\t\t\t_.replace(\n\t\t\t\tres,\n\t\t\t\tnew RegExp(`${this.getBladeCommentPlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t\t(_match: any, p1: any) =>\n\t\t\t\t\tthis.bladeComments[p1]\n\t\t\t\t\t\t.replace(/{{--(?=\\S)/g, \"{{-- \")\n\t\t\t\t\t\t.replace(/(?<=\\S)--}}/g, \" --}}\"),\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreBladeComment(value: string) {\n\t\treturn this.getBladeCommentPlaceholder(this.bladeComments.push(value) - 1);\n\t}\n\n\tgetBladeCommentPlaceholder(replace: any) {\n\t\treturn _.replace(\"___blade_comment_#___\", \"#\", replace);\n\t}\n}\n", "import Aigle from \"aigle\";\nimport detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport {\n\tindentElseTokens,\n\tindentEndTokens,\n\tindentStartOrElseTokens,\n\tindentStartTokens,\n\tinlineFunctionTokens,\n\tphpKeywordStartTokens,\n\tunbalancedStartTokens,\n} from \"src/indent\";\nimport { nestedParenthesisRegex } from \"src/regex\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class BladeDirectiveInScriptsProcessor extends Processor {\n\tprivate bladeDirectives: string[] = [];\n\tprivate directivesInScript: string[] = [];\n\tprivate rawBlocks: string[] = [];\n\tprivate customDirectives: string[] = [];\n\tprivate stringLiteralInPhp: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\tconst result = await this.preserveBladeDirectiveInScripts(content);\n\n\t\t// format preserved blade directives\n\t\tthis.bladeDirectives = await this.formatPreservedBladeDirectives(\n\t\t\tthis.bladeDirectives,\n\t\t);\n\n\t\treturn result;\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\tconst result = await this.restoreBladeDirectiveInScripts(content);\n\n\t\treturn result;\n\t}\n\n\tprivate async preserveBladeDirectiveInScripts(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(?<=<script[^>]*?(?<!=)>)(.*?)(?=<\\/script>)/gis,\n\t\t\t(match: string) => {\n\t\t\t\tconst targetTokens = [...indentStartTokens, ...inlineFunctionTokens];\n\n\t\t\t\tif (new RegExp(targetTokens.join(\"|\"), \"gmi\").test(match) === false) {\n\t\t\t\t\tif (/^[\\s\\n]+$/.test(match)) {\n\t\t\t\t\t\treturn match.trim();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn match;\n\t\t\t\t}\n\n\t\t\t\tconst inlineFunctionDirectives = inlineFunctionTokens.join(\"|\");\n\t\t\t\tconst inlineFunctionRegex = new RegExp(\n\t\t\t\t\t// eslint-disable-next-line max-len\n\t\t\t\t\t`(?!\\\\/\\\\*.*?\\\\*\\\\/)(${inlineFunctionDirectives})(\\\\s*?)${nestedParenthesisRegex}`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\t\t\t\tconst endTokens = _.chain(indentEndTokens).without(\"@endphp\");\n\n\t\t\t\tlet formatted: string = match;\n\n\t\t\t\tformatted = _.replace(formatted, inlineFunctionRegex, (matched: any) =>\n\t\t\t\t\tthis.storeBladeDirective(\n\t\t\t\t\t\tutil.formatRawStringAsPhp(matched, {\n\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\tprintWidth: util.printWidthForInline,\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\tformatted = _.replace(\n\t\t\t\t\tformatted,\n\t\t\t\t\tnew RegExp(\n\t\t\t\t\t\t`(${indentStartTokens.join(\"|\")})\\\\s*?${nestedParenthesisRegex}`,\n\t\t\t\t\t\t\"gis\",\n\t\t\t\t\t),\n\t\t\t\t\t(matched) =>\n\t\t\t\t\t\t`if ( /*${this.storeBladeDirectiveInScript(matched)}*/ ) {`,\n\t\t\t\t);\n\n\t\t\t\tformatted = _.replace(\n\t\t\t\t\tformatted,\n\t\t\t\t\tnew RegExp(\n\t\t\t\t\t\t`(${[...indentElseTokens, ...indentStartOrElseTokens].join(\n\t\t\t\t\t\t\t\"|\",\n\t\t\t\t\t\t)})(?!\\\\w+?\\\\s*?\\\\(.*?\\\\))`,\n\t\t\t\t\t\t\"gis\",\n\t\t\t\t\t),\n\t\t\t\t\t(matched) =>\n\t\t\t\t\t\t`/***script_placeholder***/} /* ${this.storeBladeDirectiveInScript(\n\t\t\t\t\t\t\tmatched,\n\t\t\t\t\t\t)} */ {`,\n\t\t\t\t);\n\n\t\t\t\tformatted = _.replace(\n\t\t\t\t\tformatted,\n\t\t\t\t\tnew RegExp(`(${endTokens.join(\"|\")})`, \"gis\"),\n\t\t\t\t\t(matched) =>\n\t\t\t\t\t\t`/***script_placeholder***/} /*${this.storeBladeDirectiveInScript(\n\t\t\t\t\t\t\tmatched,\n\t\t\t\t\t\t)}*/`,\n\t\t\t\t);\n\n\t\t\t\tformatted = _.replace(\n\t\t\t\t\tformatted,\n\t\t\t\t\t/(?<!@)@php(.*?)@endphp/gis,\n\t\t\t\t\t(_matched: any, p1: any) => this.storeRawBlock(p1),\n\t\t\t\t);\n\n\t\t\t\t// custom directive\n\t\t\t\tformatted = this.preserveCustomDirectiveInScript(formatted);\n\n\t\t\t\treturn formatted;\n\t\t\t},\n\t\t);\n\t}\n\n\t/**\n\t *\n\t * @param content string between <script>~</script>\n\t * @returns string\n\t */\n\tpreserveCustomDirectiveInScript(content: string): string {\n\t\tconst negativeLookAhead = [\n\t\t\t..._.without(indentStartTokens, \"@unless\"),\n\t\t\t...indentEndTokens,\n\t\t\t...indentElseTokens,\n\t\t\t...[\"@unless\\\\(.*?\\\\)\"],\n\t\t].join(\"|\");\n\n\t\tconst inlineNegativeLookAhead = [\n\t\t\t..._.without(indentStartTokens, \"@unless\"),\n\t\t\t...indentEndTokens,\n\t\t\t...indentElseTokens,\n\t\t\t...inlineFunctionTokens,\n\t\t\t...phpKeywordStartTokens,\n\t\t\t...[\"@unless[a-z]*\\\\(.*?\\\\)\"],\n\t\t\t...unbalancedStartTokens,\n\t\t].join(\"|\");\n\n\t\tconst inlineRegex = new RegExp(\n\t\t\t`(?!(${inlineNegativeLookAhead}))(@([a-zA-Z1-9_\\\\-]+))(?!.*?@end\\\\3)${nestedParenthesisRegex}.*?(?<!@end\\\\5)`,\n\t\t\t\"gis\",\n\t\t);\n\n\t\tconst regex = new RegExp(\n\t\t\t`(?!(${negativeLookAhead}))(@(unless)*([a-zA-Z1-9_\\\\-]+))(?!.*?\\\\2)(\\\\s|\\\\(.*?\\\\))+(.*?)(@end\\\\4)`,\n\t\t\t\"gis\",\n\t\t);\n\n\t\tlet formatted: string;\n\n\t\t// preserve inline directives\n\t\tformatted = _.replace(content, inlineRegex, (match: string) =>\n\t\t\tthis.storeInlineCustomDirective(match),\n\t\t);\n\n\t\t// preserve begin~else~end directives\n\t\tformatted = _.replace(\n\t\t\tformatted,\n\t\t\tregex,\n\t\t\t(\n\t\t\t\tmatch: string,\n\t\t\t\t_p1: string,\n\t\t\t\tp2: string,\n\t\t\t\t_p3: string,\n\t\t\t\tp4: string,\n\t\t\t\t_p5: string,\n\t\t\t\t_p6: string,\n\t\t\t\tp7: string,\n\t\t\t) => {\n\t\t\t\tif (indentStartTokens.includes(p2)) {\n\t\t\t\t\treturn match;\n\t\t\t\t}\n\n\t\t\t\tlet result: string = match;\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tnew RegExp(`${p2}(${nestedParenthesisRegex})*`, \"gim\"),\n\t\t\t\t\t(beginStr: string) =>\n\t\t\t\t\t\t`if ( /*${this.storeBladeDirectiveInScript(beginStr)}*/ ) {`,\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tnew RegExp(`@else${p4}(${nestedParenthesisRegex})*`, \"gim\"),\n\t\t\t\t\t(elseStr: string) =>\n\t\t\t\t\t\t`/***script_placeholder***/} /* ${this.storeBladeDirectiveInScript(\n\t\t\t\t\t\t\telseStr,\n\t\t\t\t\t\t)} */ {`,\n\t\t\t\t);\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tp7,\n\t\t\t\t\t(endStr: string) =>\n\t\t\t\t\t\t`/***script_placeholder***/} /*${this.storeBladeDirectiveInScript(\n\t\t\t\t\t\t\tendStr,\n\t\t\t\t\t\t)}*/`,\n\t\t\t\t);\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t);\n\n\t\t// replace directives recursively\n\t\tif (regex.test(formatted)) {\n\t\t\tformatted = this.preserveCustomDirectiveInScript(formatted);\n\t\t}\n\n\t\treturn formatted;\n\t}\n\n\tprivate async restoreBladeDirectiveInScripts(content: string): Promise<any> {\n\t\tconst regex = new RegExp(\n\t\t\t`${this.getBladeDirectivePlaceholder(\"(\\\\d+)\")}`,\n\t\t\t\"gm\",\n\t\t);\n\n\t\t// restore inline blade directive\n\t\tlet result = _.replace(content, regex, (_match: any, p1: number) => {\n\t\t\tconst placeholder = this.getBladeDirectivePlaceholder(p1.toString());\n\t\t\tconst matchedLine = content.match(\n\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t) ?? [\"\"];\n\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\treturn util.indentBladeDirectiveBlock(\n\t\t\t\tindent,\n\t\t\t\tthis.bladeDirectives[p1],\n\t\t\t\tthis.formatter,\n\t\t\t);\n\t\t});\n\n\t\t// restore inline custom directive\n\t\tresult = await this.restoreInlineCustomDirective(result);\n\n\t\tresult = await replaceAsync(\n\t\t\tresult,\n\t\t\t/(?<=<script[^>]*?(?<!=)>)(.*?)(?=<\\/script>)/gis,\n\t\t\tasync (match: string) => {\n\t\t\t\tlet formatted: string = match;\n\n\t\t\t\t// restore begin\n\t\t\t\tformatted = _.replace(\n\t\t\t\t\tformatted,\n\t\t\t\t\tnew RegExp(\n\t\t\t\t\t\t`if \\\\( \\\\/\\\\*(?:(?:${this.getBladeDirectiveInScriptPlaceholder(\n\t\t\t\t\t\t\t\"(\\\\d+)\",\n\t\t\t\t\t\t)}).*?)\\\\*\\\\/ \\\\) \\\\{`,\n\t\t\t\t\t\t\"gis\",\n\t\t\t\t\t),\n\t\t\t\t\t(_match: any, p1: any) => `${this.directivesInScript[p1]}`,\n\t\t\t\t);\n\n\t\t\t\t// restore else\n\t\t\t\tformatted = _.replace(\n\t\t\t\t\tformatted,\n\t\t\t\t\tnew RegExp(\n\t\t\t\t\t\t`} \\\\/\\\\* (?:${this.getBladeDirectiveInScriptPlaceholder(\n\t\t\t\t\t\t\t\"(\\\\d+)\",\n\t\t\t\t\t\t)}) \\\\*\\\\/ {(\\\\s*?\\\\(___directive_condition_\\\\d+___\\\\))?`,\n\t\t\t\t\t\t\"gim\",\n\t\t\t\t\t),\n\t\t\t\t\t(_match: any, p1: number, p2: string) => {\n\t\t\t\t\t\tif (_.isUndefined(p2)) {\n\t\t\t\t\t\t\treturn `${this.directivesInScript[p1].trim()}`;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn `${this.directivesInScript[p1].trim()} ${(p2 ?? \"\").trim()}`;\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\t// restore end\n\t\t\t\tformatted = _.replace(\n\t\t\t\t\tformatted,\n\t\t\t\t\tnew RegExp(\n\t\t\t\t\t\t`} \\\\/\\\\*(?:${this.getBladeDirectiveInScriptPlaceholder(\n\t\t\t\t\t\t\t\"(\\\\d+)\",\n\t\t\t\t\t\t)})\\\\*\\\\/`,\n\t\t\t\t\t\t\"gis\",\n\t\t\t\t\t),\n\t\t\t\t\t(_match: any, p1: any) => `${this.directivesInScript[p1]}`,\n\t\t\t\t);\n\n\t\t\t\t// restore php block\n\t\t\t\tformatted = await replaceAsync(\n\t\t\t\t\tformatted,\n\t\t\t\t\tnew RegExp(`${this.getRawPlaceholder(\"(\\\\d+)\")}`, \"gm\"),\n\t\t\t\t\t// eslint-disable-next-line no-shadow\n\t\t\t\t\tasync (_match: any, p1: number) => {\n\t\t\t\t\t\tlet rawBlock = this.rawBlocks[p1];\n\t\t\t\t\t\tconst placeholder = this.getRawPlaceholder(p1.toString());\n\t\t\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t\t\t) ?? [\"\"];\n\t\t\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tutil.isInline(rawBlock) &&\n\t\t\t\t\t\t\t(await util.isMultilineStatement(rawBlock, this.formatter))\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\trawBlock = (\n\t\t\t\t\t\t\t\tawait util.formatStringAsPhp(\n\t\t\t\t\t\t\t\t\t`<?php\\n${rawBlock}\\n?>`,\n\t\t\t\t\t\t\t\t\tthis.formatter.options,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t).trim();\n\t\t\t\t\t\t} else if (rawBlock.split(\"\\n\").length > 1) {\n\t\t\t\t\t\t\trawBlock = (\n\t\t\t\t\t\t\t\tawait util.formatStringAsPhp(\n\t\t\t\t\t\t\t\t\t`<?php${rawBlock}?>`,\n\t\t\t\t\t\t\t\t\tthis.formatter.options,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t).trim();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trawBlock = `<?php${rawBlock}?>`;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn _.replace(\n\t\t\t\t\t\t\trawBlock,\n\t\t\t\t\t\t\t/^(\\s*)?<\\?php(.*?)\\?>/gms,\n\t\t\t\t\t\t\t(_matched: any, _q1: any, q2: any) => {\n\t\t\t\t\t\t\t\tif (util.isInline(rawBlock)) {\n\t\t\t\t\t\t\t\t\treturn `@php${q2}@endphp`;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconst preserved = this.preserveStringLiteralInPhp(q2);\n\t\t\t\t\t\t\t\tconst indented = util.indentRawBlock(\n\t\t\t\t\t\t\t\t\tindent,\n\t\t\t\t\t\t\t\t\tpreserved,\n\t\t\t\t\t\t\t\t\tthis.formatter,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst restored = this.restoreStringLiteralInPhp(indented);\n\n\t\t\t\t\t\t\t\treturn `@php${restored}@endphp`;\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\n\t\t\t\t// delete place holder\n\t\t\t\tformatted = _.replace(\n\t\t\t\t\tformatted,\n\t\t\t\t\t/(?<=[\\S]+)(\\s*?)\\/\\*\\*\\*script_placeholder\\*\\*\\*\\/(\\s)?/gim,\n\t\t\t\t\t(_match: any, p1: string, p2: string) => {\n\t\t\t\t\t\tif (p2 !== undefined) {\n\t\t\t\t\t\t\treturn p2;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst group1 = p1 ?? \"\";\n\t\t\t\t\t\tconst group2 = p2 ?? \"\";\n\n\t\t\t\t\t\treturn group1 + group2;\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\treturn formatted;\n\t\t\t},\n\t\t);\n\n\t\tif (regex.test(result)) {\n\t\t\tresult = await this.restoreBladeDirectiveInScripts(result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * restore inline custom directives\n\t */\n\tasync restoreInlineCustomDirective(content: string) {\n\t\treturn replaceAsync(\n\t\t\tcontent,\n\t\t\tnew RegExp(\n\t\t\t\t`${this.getInlineCustomDirectivePlaceholder(\"(\\\\d+)\")}`,\n\t\t\t\t\"gim\",\n\t\t\t),\n\t\t\tasync (_match: any, p1: number) => {\n\t\t\t\tconst placeholder = this.getInlineCustomDirectivePlaceholder(\n\t\t\t\t\tp1.toString(),\n\t\t\t\t);\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${_.escapeRegExp(placeholder)}`, \"mi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst matched = `${this.customDirectives[p1]}`;\n\n\t\t\t\treturn replaceAsync(\n\t\t\t\t\tmatched,\n\t\t\t\t\t/(@[a-zA-Z0-9\\-_]+)(.*)/gis,\n\t\t\t\t\tasync (match2: string, p2: string, p3: string) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst formatted = (\n\t\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(`func${p3}`, {\n\t\t\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\t\t\tprintWidth: util.printWidthForInline,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t\t\t\t\t\t.replace(/,(\\s*?\\))$/gm, (_m, p4) => p4)\n\t\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t\t.substring(4);\n\t\t\t\t\t\t\treturn `${p2}${util.indentComponentAttribute(indent.indent, formatted, this.formatter)}`;\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\treturn `${match2}`;\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\tstoreBladeDirective(value: any) {\n\t\treturn this.getBladeDirectivePlaceholder(\n\t\t\tthis.bladeDirectives.push(value) - 1,\n\t\t);\n\t}\n\n\tstoreBladeDirectiveInScript(value: string) {\n\t\treturn this.getBladeDirectiveInScriptPlaceholder(\n\t\t\t(this.directivesInScript.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetBladeDirectiveInScriptPlaceholder(replace: any) {\n\t\treturn _.replace(\"___directives_script_#___\", \"#\", replace);\n\t}\n\n\tgetBladeDirectivePlaceholder(replace: any) {\n\t\treturn _.replace(\"___blade_directive_#___\", \"#\", replace);\n\t}\n\n\tgetInlinePhpPlaceholder(replace: any) {\n\t\treturn _.replace(\"___inline_php_directive_#___\", \"#\", replace);\n\t}\n\n\tasync formatExpressionInsideBladeDirective(\n\t\tmatchedExpression: string,\n\t\tindent: detectIndent.Indent,\n\t\twrapLength: number | undefined = undefined,\n\t) {\n\t\tconst formatTarget = `func(${matchedExpression})`;\n\t\tconst formattedExpression = await util.formatRawStringAsPhp(formatTarget, {\n\t\t\t...this.formatter.options,\n\t\t\tprintWidth:\n\t\t\t\twrapLength ?? this.formatter.defaultPhpFormatOption.printWidth,\n\t\t});\n\n\t\tif (formattedExpression === formatTarget) {\n\t\t\treturn matchedExpression;\n\t\t}\n\n\t\tlet inside = formattedExpression\n\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t.replace(/(?<!(['\"]).*)(?<=\\()[\\n\\s]+?(?=\\w)/gm, \"\")\n\t\t\t.replace(\n\t\t\t\t/(.*)],[\\n\\s]*?\\)$/gm,\n\t\t\t\t(_match: string, p1: string) => `${p1}]\\n)`,\n\t\t\t)\n\t\t\t.replace(/,[\\n\\s]*?\\)/gs, \")\")\n\t\t\t.replace(/,(\\s*?\\))$/gm, (_match, p1) => p1)\n\t\t\t.trim();\n\n\t\tif (this.formatter.options.useTabs || false) {\n\t\t\tinside = _.replace(\n\t\t\t\tinside,\n\t\t\t\t/(?<=^ *) {4}/gm,\n\t\t\t\t\"\\t\".repeat(this.formatter.indentSize),\n\t\t\t);\n\t\t}\n\n\t\tinside = inside.replace(\n\t\t\t/func\\((.*)\\)/gis,\n\t\t\t(_match: string, p1: string) => p1,\n\t\t);\n\t\tif (util.isInline(inside.trim())) {\n\t\t\tinside = inside.trim();\n\t\t}\n\n\t\treturn util.indentRawPhpBlock(indent, inside, this.formatter);\n\t}\n\n\tstoreRawBlock(value: any) {\n\t\treturn this.getRawPlaceholder(this.rawBlocks.push(value) - 1);\n\t}\n\n\tgetRawPlaceholder(replace: any) {\n\t\treturn _.replace(\"___raw_block_#___\", \"#\", replace);\n\t}\n\n\tstoreInlineCustomDirective(value: string) {\n\t\treturn this.getInlineCustomDirectivePlaceholder(\n\t\t\t(this.customDirectives.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetInlineCustomDirectivePlaceholder(replace: string) {\n\t\treturn _.replace(\"___inline_cdis_#___\", \"#\", replace);\n\t}\n\n\tpreserveStringLiteralInPhp(content: any) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(\\\"([^\\\\]|\\\\.)*?\\\"|\\'([^\\\\]|\\\\.)*?\\')/gm,\n\t\t\t(match: string) => `${this.storeStringLiteralInPhp(match)}`,\n\t\t);\n\t}\n\n\tstoreStringLiteralInPhp(value: any) {\n\t\tconst index = this.stringLiteralInPhp.push(value) - 1;\n\t\treturn this.getStringLiteralInPhpPlaceholder(index);\n\t}\n\n\tgetStringLiteralInPhpPlaceholder(replace: any) {\n\t\treturn _.replace(\"'___php_content_#___'\", \"#\", replace);\n\t}\n\n\trestoreStringLiteralInPhp(content: any) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getStringLiteralInPhpPlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t(_match: any, p1: any) => this.stringLiteralInPhp[p1],\n\t\t);\n\t}\n\n\tasync formatPreservedBladeDirectives(directives: any) {\n\t\treturn Aigle.map(directives, async (content: any) => {\n\t\t\tconst formattedAsHtml = await util.formatAsHtml(content, this.formatter);\n\t\t\tconst formatted = await util.formatAsBlade(\n\t\t\t\tformattedAsHtml,\n\t\t\t\tthis.formatter,\n\t\t\t);\n\t\t\treturn formatted.trimRight(\"\\n\");\n\t\t});\n\t}\n}\n", "import _ from \"lodash\";\nimport {\n\tcssAtRuleTokens,\n\tindentElseTokens,\n\tindentEndTokens,\n\tindentStartTokens,\n} from \"src/indent\";\nimport { nestedParenthesisRegex } from \"src/regex\";\nimport { Processor } from \"./processor\";\n\nexport class BladeDirectiveInStylesProcessor extends Processor {\n\tprivate bladeDirectivesInStyle: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveBladeDirectiveInStyles(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreBladeDirectiveInStyles(content);\n\t}\n\n\tprivate async preserveBladeDirectiveInStyles(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(?<=<style[^>]*?(?<!=)>)(.*?)(?=<\\/style>)/gis,\n\t\t\t(inside: string) => {\n\t\t\t\tlet result: string = inside;\n\n\t\t\t\tconst inlineRegex = new RegExp(\n\t\t\t\t\t`(?!${[\"@end\", \"@else\", ...cssAtRuleTokens].join(\n\t\t\t\t\t\t\"|\",\n\t\t\t\t\t)})@(\\\\w+)\\\\s*?(?![^\\\\1]*@end\\\\1)${nestedParenthesisRegex}`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tinlineRegex,\n\t\t\t\t\t(match: string) =>\n\t\t\t\t\t\t`${this.storeBladeDirectiveInStyle(\n\t\t\t\t\t\t\tmatch,\n\t\t\t\t\t\t)} {/* inline_directive */}`,\n\t\t\t\t);\n\n\t\t\t\tconst customStartRegex = new RegExp(\n\t\t\t\t\t`(?!${[\"@end\", \"@else\", ...cssAtRuleTokens].join(\n\t\t\t\t\t\t\"|\",\n\t\t\t\t\t)})@(\\\\w+)\\\\s*?(${nestedParenthesisRegex})`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tcustomStartRegex,\n\t\t\t\t\t(match: string) =>\n\t\t\t\t\t\t`${this.storeBladeDirectiveInStyle(match)} { /*start*/`,\n\t\t\t\t);\n\n\t\t\t\tconst startRegex = new RegExp(\n\t\t\t\t\t`(${indentStartTokens.join(\"|\")})\\\\s*?(${nestedParenthesisRegex})`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tstartRegex,\n\t\t\t\t\t(match: string) =>\n\t\t\t\t\t\t`${this.storeBladeDirectiveInStyle(match)} { /*start*/`,\n\t\t\t\t);\n\n\t\t\t\tconst elseRegex = new RegExp(\n\t\t\t\t\t`(${[\"@else\\\\w+\", ...indentElseTokens].join(\n\t\t\t\t\t\t\"|\",\n\t\t\t\t\t)})\\\\s*?(${nestedParenthesisRegex})?`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\telseRegex,\n\t\t\t\t\t(match: string) =>\n\t\t\t\t\t\t`} ${this.storeBladeDirectiveInStyle(match)} { /*else*/`,\n\t\t\t\t);\n\n\t\t\t\tconst endRegex = new RegExp(\n\t\t\t\t\t`${[\"@end\\\\w+\", ...indentEndTokens].join(\"|\")}`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tendRegex,\n\t\t\t\t\t(match: string) =>\n\t\t\t\t\t\t`} /* ${this.storeBladeDirectiveInStyle(match)} */`,\n\t\t\t\t);\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t);\n\t}\n\n\tprivate async restoreBladeDirectiveInStyles(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(?<=<style[^>]*?(?<!=)>)(.*?)(?=<\\/style>)/gis,\n\t\t\t(inside: string) => {\n\t\t\t\tlet result: string = inside;\n\n\t\t\t\tconst inlineRegex = new RegExp(\n\t\t\t\t\t`${this.getBladeDirectiveInStylePlaceholder(\n\t\t\t\t\t\t\"(\\\\d+)\",\n\t\t\t\t\t)} {\\\\s*?\\/\\\\* inline_directive \\\\*\\/\\\\s*?}`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tinlineRegex,\n\t\t\t\t\t(_match: string, p1: number) => this.bladeDirectivesInStyle[p1],\n\t\t\t\t);\n\n\t\t\t\tconst elseRegex = new RegExp(\n\t\t\t\t\t`}\\\\s*?${this.getBladeDirectiveInStylePlaceholder(\n\t\t\t\t\t\t\"(\\\\d+)\",\n\t\t\t\t\t)} {\\\\s*?\\/\\\\*else\\\\*\\/`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\telseRegex,\n\t\t\t\t\t(_match: string, p1: number) => `${this.bladeDirectivesInStyle[p1]}`,\n\t\t\t\t);\n\n\t\t\t\tconst startRegex = new RegExp(\n\t\t\t\t\t`${this.getBladeDirectiveInStylePlaceholder(\n\t\t\t\t\t\t\"(\\\\d+)\",\n\t\t\t\t\t)} {\\\\s*?\\/\\\\*start\\\\*\\/`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tstartRegex,\n\t\t\t\t\t(_match: string, p1: number) => `${this.bladeDirectivesInStyle[p1]}`,\n\t\t\t\t);\n\n\t\t\t\tconst endRegex = new RegExp(\n\t\t\t\t\t`}\\\\s*?\\/\\\\* ${this.getBladeDirectiveInStylePlaceholder(\n\t\t\t\t\t\t\"(\\\\d+)\",\n\t\t\t\t\t)} \\\\*\\/`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t);\n\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tendRegex,\n\t\t\t\t\t(_match: string, p1: number) => `${this.bladeDirectivesInStyle[p1]}`,\n\t\t\t\t);\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t);\n\t}\n\n\tstoreBladeDirectiveInStyle(value: string) {\n\t\treturn this.getBladeDirectiveInStylePlaceholder(\n\t\t\t(this.bladeDirectivesInStyle.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetBladeDirectiveInStylePlaceholder(replace: string) {\n\t\treturn _.replace(\".___blade_directive_in_style_#__\", \"#\", replace);\n\t}\n}\n", "import _ from \"lodash\";\nimport {\n\tindentElseTokens,\n\tindentEndTokens,\n\tindentStartTokens,\n} from \"src/indent\";\nimport { nestedParenthesisRegex } from \"src/regex\";\nimport XRegExp from \"xregexp\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class BreakLineBeforeAndAfterDirectiveProcessor extends Processor {\n\tprivate bladeComments: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.breakLineBeforeAndAfterDirective(content);\n\t}\n\n\tasync postProcess(_content: string): Promise<any> {}\n\n\tbreakLineBeforeAndAfterDirective(content: string): string {\n\t\t// handle directive around html tags\n\t\tlet formattedContent = _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(\n\t\t\t\t`(?<=<.*?(?<!=)>)(${_.without(indentStartTokens, \"@php\").join(\n\t\t\t\t\t\"|\",\n\t\t\t\t)})(\\\\s*)${nestedParenthesisRegex}.*?(?=<.*?>)`,\n\t\t\t\t\"gmis\",\n\t\t\t),\n\t\t\t(match) => `\\n${match.trim()}\\n`,\n\t\t);\n\n\t\t// eslint-disable-next-line\n\t\tformattedContent = _.replace(\n\t\t\tformattedContent,\n\t\t\tnew RegExp(\n\t\t\t\t`(?<=<.*?(?<!=)>).*?(${_.without(indentEndTokens, \"@endphp\").join(\n\t\t\t\t\t\"|\",\n\t\t\t\t)})(?=<.*?>)`,\n\t\t\t\t\"gmis\",\n\t\t\t),\n\t\t\t(match) => `\\n${match.trim()}\\n`,\n\t\t);\n\n\t\tconst unbalancedConditions = [\"@case\", ...indentElseTokens];\n\n\t\tformattedContent = _.replace(\n\t\t\tformattedContent,\n\t\t\tnew RegExp(\n\t\t\t\t`(\\\\s*?)(${unbalancedConditions.join(\n\t\t\t\t\t\"|\",\n\t\t\t\t)})(\\\\s*?)${nestedParenthesisRegex}(\\\\s*)`,\n\t\t\t\t\"gmi\",\n\t\t\t),\n\t\t\t(match) => `\\n${match.trim()}\\n`,\n\t\t\t// handle else directive\n\t\t);\n\n\t\tformattedContent = _.replace(\n\t\t\tformattedContent,\n\t\t\tnew RegExp(\n\t\t\t\t`\\\\s*?(?!(${_.without(indentElseTokens, \"@else\").join(\"|\")}))@else\\\\s+`,\n\t\t\t\t\"gim\",\n\t\t\t),\n\t\t\t(match) => `\\n${match.trim()}\\n`,\n\t\t\t// handle case directive\n\t\t);\n\n\t\tformattedContent = _.replace(\n\t\t\tformattedContent,\n\t\t\t/@case\\S*?\\s*?@case/gim,\n\t\t\t(match) => {\n\t\t\t\t// handle unbalanced echos\n\t\t\t\treturn `${match.replace(\"\\n\", \"\")}`;\n\t\t\t},\n\t\t);\n\n\t\tconst unbalancedEchos = [\"@break\"];\n\n\t\t_.forEach(unbalancedEchos, (directive) => {\n\t\t\tformattedContent = _.replace(\n\t\t\t\tformattedContent,\n\t\t\t\tnew RegExp(`(\\\\s*?)${directive}\\\\s+`, \"gmi\"),\n\t\t\t\t(match) => {\n\t\t\t\t\treturn `\\n${match.trim()}\\n\\n`;\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\n\t\t// other directives\n\t\t_.forEach([\"@default\"], (directive) => {\n\t\t\tformattedContent = _.replace(\n\t\t\t\tformattedContent,\n\t\t\t\tnew RegExp(`(\\\\s*?)${directive}\\\\s*`, \"gmi\"),\n\t\t\t\t(match) => {\n\t\t\t\t\treturn `\\n\\n${match.trim()}\\n`;\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\n\t\t// add line break around balanced directives\n\t\tconst directives = _.chain(indentStartTokens)\n\t\t\t.map((x: any) => _.replace(x, /@/, \"\"))\n\t\t\t.value();\n\n\t\t_.forEach(directives, (directive: any) => {\n\t\t\ttry {\n\t\t\t\tconst recursivelyMatched = XRegExp.matchRecursive(\n\t\t\t\t\tformattedContent,\n\t\t\t\t\t`\\\\@${directive}`,\n\t\t\t\t\t`\\\\@end${directive}`,\n\t\t\t\t\t\"gmi\",\n\t\t\t\t\t{\n\t\t\t\t\t\tvalueNames: [null, \"left\", \"match\", \"right\"],\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tif (_.isEmpty(recursivelyMatched)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (const matched of recursivelyMatched) {\n\t\t\t\t\tif (matched.name === \"match\") {\n\t\t\t\t\t\tif (new RegExp(indentStartTokens.join(\"|\")).test(matched.value)) {\n\t\t\t\t\t\t\tformattedContent = _.replace(\n\t\t\t\t\t\t\t\tformattedContent,\n\t\t\t\t\t\t\t\tmatched.value,\n\t\t\t\t\t\t\t\tthis.breakLineBeforeAndAfterDirective(\n\t\t\t\t\t\t\t\t\tutil.escapeReplacementString(matched.value),\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\n\t\t\t\t\t\tconst innerRegex = new RegExp(\n\t\t\t\t\t\t\t`^(\\\\s*?)${nestedParenthesisRegex}(.*)`,\n\t\t\t\t\t\t\t\"gmis\",\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst replaced = _.replace(\n\t\t\t\t\t\t\t`${matched.value}`,\n\t\t\t\t\t\t\tinnerRegex,\n\t\t\t\t\t\t\t(_match: string, p1: string, p2: string, p3: string) => {\n\t\t\t\t\t\t\t\tif (p3.trim() === \"\") {\n\t\t\t\t\t\t\t\t\treturn `${p1}(${p2.trim()})\\n${p3.trim()}`;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn `${p1}(${p2.trim()})\\n${p3.trim()}\\n`;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tformattedContent = _.replace(\n\t\t\t\t\t\t\tformattedContent,\n\t\t\t\t\t\t\tmatched.value,\n\t\t\t\t\t\t\tutil.escapeReplacementString(replaced),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (_error) {\n\t\t\t\t// do nothing to ignore unmatched directive pair\n\t\t\t}\n\t\t});\n\n\t\treturn formattedContent;\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport beautify from \"js-beautify\";\nimport _ from \"lodash\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class ComponentAttributeProcessor extends Processor {\n\tprivate componentAttributes: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveComponentAttribute(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreComponentAttribute(content);\n\t}\n\n\tprivate async preserveComponentAttribute(content: string): Promise<any> {\n\t\tconst prefixes =\n\t\t\tArray.isArray(this.formatter.options.componentPrefix) &&\n\t\t\tthis.formatter.options.componentPrefix.length > 0\n\t\t\t\t? this.formatter.options.componentPrefix\n\t\t\t\t: [\"x-\", \"livewire:\"];\n\t\tconst regex = new RegExp(\n\t\t\t`(?<=<(${prefixes.join(\n\t\t\t\t\"|\",\n\t\t\t)})[^<]*?\\\\s):{1,2}(?<!=>)[\\\\w\\-_.]*?=([\"'])(?!=>)[^\\\\2]*?\\\\2(?=[^>]*?\\/*?>)`,\n\t\t\t\"gim\",\n\t\t);\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tregex,\n\t\t\t(match: any) => `${this.storeComponentAttribute(match)}`,\n\t\t);\n\t}\n\n\tprivate async restoreComponentAttribute(content: string): Promise<any> {\n\t\treturn replaceAsync(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getComponentAttributePlaceholder(\"(\\\\d+)\")}`, \"gim\"),\n\t\t\tasync (_match: any, p1: any) => {\n\t\t\t\tconst placeholder = this.getComponentAttributePlaceholder(p1);\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst matched = this.componentAttributes[p1];\n\t\t\t\tconst formatted = await replaceAsync(\n\t\t\t\t\tmatched,\n\t\t\t\t\t/(:{1,2}.*?=)([\"'])(.*?)(?=\\2)/gis,\n\t\t\t\t\tasync (match, p2: string, p3: string, p4: string) => {\n\t\t\t\t\t\tif (p4 === \"\") {\n\t\t\t\t\t\t\treturn match;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (matchedLine[0].startsWith(\"<livewire\")) {\n\t\t\t\t\t\t\treturn `${p2}${p3}${p4}`;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (p2.startsWith(\"::\")) {\n\t\t\t\t\t\t\treturn `${p2}${p3}${beautify\n\t\t\t\t\t\t\t\t.js_beautify(p4, {\n\t\t\t\t\t\t\t\t\twrap_line_length:\n\t\t\t\t\t\t\t\t\t\tthis.formatter.wrapLineLength - indent.amount,\n\t\t\t\t\t\t\t\t\tbrace_style: \"preserve-inline\",\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.trim()}`;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (util.isInline(p4)) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn `${p2}${p3}${(\n\t\t\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(p4, {\n\t\t\t\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\t\t\t\tprintWidth: this.formatter.wrapLineLength - indent.amount,\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t).trimEnd()}`;\n\t\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t\treturn `${p2}${p3}${p4}`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn `${p2}${p3}${(\n\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(p4, {\n\t\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\t\tprintWidth: this.formatter.wrapLineLength - indent.amount,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t).trimEnd()}`;\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\treturn `${util.indentComponentAttribute(indent.indent, formatted, this.formatter)}`;\n\t\t\t},\n\t\t);\n\t}\n\n\tstoreComponentAttribute(value: string) {\n\t\tconst index = this.componentAttributes.push(value) - 1;\n\n\t\treturn this.getComponentAttributePlaceholder(index.toString());\n\t}\n\n\tgetComponentAttributePlaceholder(replace: any) {\n\t\treturn _.replace(\"___attribute_#___\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport { conditionalTokens } from \"src/indent\";\nimport { nestedParenthesisRegex } from \"src/regex\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class ConditionsProcessor extends Processor {\n\tprivate conditions: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveConditions(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreConditions(content);\n\t}\n\n\tprivate async preserveConditions(content: string): Promise<any> {\n\t\tconst regex = new RegExp(\n\t\t\t`(${conditionalTokens.join(\n\t\t\t\t\"|\",\n\t\t\t\t// eslint-disable-next-line max-len\n\t\t\t)})(\\\\s*?)${nestedParenthesisRegex}`,\n\t\t\t\"gi\",\n\t\t);\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tregex,\n\t\t\t(_match: any, p1: any, p2: any, p3: any) =>\n\t\t\t\t`${p1}${p2}(${this.storeConditions(p3)})`,\n\t\t);\n\t}\n\n\tprivate async restoreConditions(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res: any) =>\n\t\t\treplaceAsync(\n\t\t\t\tres,\n\t\t\t\tnew RegExp(`${this.getConditionsPlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t\tasync (_match: any, p1: any) => {\n\t\t\t\t\tconst placeholder = this.getConditionsPlaceholder(p1);\n\t\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t\t) ?? [\"\"];\n\t\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\t\tconst matched = this.conditions[p1];\n\n\t\t\t\t\treturn util.formatExpressionInsideBladeDirective(\n\t\t\t\t\t\tmatched,\n\t\t\t\t\t\tindent,\n\t\t\t\t\t\tthis.formatter,\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreConditions(value: any) {\n\t\treturn this.getConditionsPlaceholder(this.conditions.push(value) - 1);\n\t}\n\n\tgetConditionsPlaceholder(replace: any) {\n\t\treturn _.replace(\"___directive_condition_#___\", \"#\", replace);\n\t}\n}\n", "import beautify from \"js-beautify\";\nimport _ from \"lodash\";\nimport { Processor } from \"./processor\";\n\nexport class CurlyBraceForJSProcessor extends Processor {\n\tprivate curlyBracesWithJSs: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveCurlyBraceForJS(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreCurlyBraceForJS(content);\n\t}\n\n\tprivate async preserveCurlyBraceForJS(content: string): Promise<any> {\n\t\treturn _.replace(content, /@{{(.*?)}}/gs, (_match: any, p1: any) =>\n\t\t\tthis.storeCurlyBraceForJS(p1),\n\t\t);\n\t}\n\n\tstoreCurlyBraceForJS(value: any) {\n\t\treturn this.getCurlyBraceForJSPlaceholder(\n\t\t\tthis.curlyBracesWithJSs.push(value) - 1,\n\t\t);\n\t}\n\n\tgetCurlyBraceForJSPlaceholder(replace: any) {\n\t\treturn _.replace(\"___js_curly_brace_#___\", \"#\", replace);\n\t}\n\n\tprivate async restoreCurlyBraceForJS(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getCurlyBraceForJSPlaceholder(\"(\\\\d+)\")}`, \"gm\"),\n\t\t\t(_match: any, p1: any) =>\n\t\t\t\t`@{{ ${beautify.js_beautify(this.curlyBracesWithJSs[p1].trim())} }}`,\n\t\t);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport {\n\tcssAtRuleTokens,\n\tindentElseTokens,\n\tindentEndTokens,\n\tindentStartTokens,\n\tinlineFunctionTokens,\n\tphpKeywordStartTokens,\n\tunbalancedStartTokens,\n} from \"src/indent\";\nimport { nestedParenthesisRegex } from \"src/regex\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class CustomDirectiveProcessor extends Processor {\n\tprivate customDirectives: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveCustomDirective(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreCustomDirective(content);\n\t}\n\n\tprivate async preserveCustomDirective(content: string): Promise<any> {\n\t\tconst negativeLookAhead = [\n\t\t\t..._.without(indentStartTokens, \"@unless\"),\n\t\t\t...indentEndTokens,\n\t\t\t...indentElseTokens,\n\t\t\t...[\"@unless\\\\(.*?\\\\)\"],\n\t\t].join(\"|\");\n\n\t\tconst inlineNegativeLookAhead = _.chain([\n\t\t\t..._.without(indentStartTokens, \"@unless\", \"@for\"),\n\t\t\t...indentEndTokens,\n\t\t\t...indentElseTokens,\n\t\t\t...inlineFunctionTokens,\n\t\t\t..._.without(phpKeywordStartTokens, \"@for\"),\n\t\t\t...[\"@unless[a-z]*\\\\(.*?\\\\)\", \"@for\\\\(.*?\\\\)\"],\n\t\t\t...unbalancedStartTokens,\n\t\t\t...cssAtRuleTokens,\n\t\t])\n\t\t\t.uniq()\n\t\t\t.join(\"|\")\n\t\t\t.value();\n\n\t\tconst inlineRegex = new RegExp(\n\t\t\t`(?!(${inlineNegativeLookAhead}))(@([a-zA-Z1-9_\\\\-]+))(?!.*?@end\\\\3)${nestedParenthesisRegex}.*?(?<!@end\\\\5)`,\n\t\t\t\"gis\",\n\t\t);\n\n\t\tconst regex = new RegExp(\n\t\t\t`(?!(${negativeLookAhead}))(@(unless)*([a-zA-Z1-9_\\\\-]+))(?!.*?\\\\2)(\\\\s|\\\\(.*?\\\\))+(.*?)(@end\\\\4)`,\n\t\t\t\"gis\",\n\t\t);\n\n\t\tlet formatted: string;\n\n\t\t// preserve inline directives\n\t\tformatted = _.replace(content, inlineRegex, (match: string) =>\n\t\t\tthis.storeInlineCustomDirective(match),\n\t\t);\n\n\t\t// preserve begin~else~end directives\n\t\tformatted = _.replace(\n\t\t\tformatted,\n\t\t\tregex,\n\t\t\t(\n\t\t\t\tmatch: string,\n\t\t\t\t_p1: string,\n\t\t\t\tp2: string,\n\t\t\t\t_p3: string,\n\t\t\t\tp4: string,\n\t\t\t\t_p5: string,\n\t\t\t\t_p6: string,\n\t\t\t\tp7: string,\n\t\t\t) => {\n\t\t\t\tif (indentStartTokens.includes(p2)) {\n\t\t\t\t\treturn match;\n\t\t\t\t}\n\n\t\t\t\tlet result: string = match;\n\n\t\t\t\t// begin directive\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tnew RegExp(`${p2}(${nestedParenthesisRegex})*`, \"gim\"),\n\t\t\t\t\t(beginStr: string) => this.storeBeginCustomDirective(beginStr),\n\t\t\t\t);\n\t\t\t\t// end directive\n\t\t\t\tresult = _.replace(result, p7, this.storeEndCustomDirective(p7));\n\t\t\t\t// else directive\n\t\t\t\tresult = _.replace(\n\t\t\t\t\tresult,\n\t\t\t\t\tnew RegExp(`@else${p4}(${nestedParenthesisRegex})*`, \"gim\"),\n\t\t\t\t\t(elseStr: string) => this.storeElseCustomDirective(elseStr),\n\t\t\t\t);\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t);\n\n\t\t// replace directives recursively\n\t\tif (regex.test(formatted)) {\n\t\t\tformatted = this.preserveCustomDirective(formatted);\n\t\t}\n\n\t\treturn formatted;\n\t}\n\n\tprivate async restoreCustomDirective(content: string): Promise<any> {\n\t\treturn this.restoreInlineCustomDirective(content)\n\t\t\t.then((data: string) => this.restoreBeginCustomDirective(data))\n\t\t\t.then((data: string) => this.restoreElseCustomDirective(data))\n\t\t\t.then((data: string) => this.restoreEndCustomDirective(data));\n\t}\n\n\tasync restoreInlineCustomDirective(content: string) {\n\t\treturn replaceAsync(\n\t\t\tcontent,\n\t\t\tnew RegExp(\n\t\t\t\t`${this.getInlineCustomDirectivePlaceholder(\"(\\\\d+)\")}`,\n\t\t\t\t\"gim\",\n\t\t\t),\n\t\t\tasync (_match: any, p1: number) => {\n\t\t\t\tconst placeholder = this.getInlineCustomDirectivePlaceholder(\n\t\t\t\t\tp1.toString(),\n\t\t\t\t);\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${_.escapeRegExp(placeholder)}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst matched = `${this.customDirectives[p1]}`;\n\n\t\t\t\treturn replaceAsync(\n\t\t\t\t\tmatched,\n\t\t\t\t\t/(@[a-zA-Z0-9\\-_]+)(.*)/gis,\n\t\t\t\t\tasync (match2: string, p2: string, p3: string) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst formatted = (\n\t\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(`func${p3}`, {\n\t\t\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\t\t\tprintWidth: util.printWidthForInline,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t\t\t\t\t\t.replace(/,(\\s*?\\))$/gm, (_m, p4) => p4)\n\t\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t\t.substring(4);\n\t\t\t\t\t\t\treturn `${p2}${util.indentComponentAttribute(\n\t\t\t\t\t\t\t\tindent.indent,\n\t\t\t\t\t\t\t\tformatted,\n\t\t\t\t\t\t\t\tthis.formatter,\n\t\t\t\t\t\t\t)}`;\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\treturn `${match2}`;\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\tasync restoreElseCustomDirective(content: string) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/@else\\(___(\\d+)___\\)/gim,\n\t\t\t(_match: any, p1: number) => `${this.customDirectives[p1]}`,\n\t\t);\n\t}\n\n\tasync restoreEndCustomDirective(content: string) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/@endcustomdirective\\(___(\\d+)___\\)/gim,\n\t\t\t(_match: any, p1: number) => `${this.customDirectives[p1]}`,\n\t\t);\n\t}\n\n\tasync restoreBeginCustomDirective(content: string) {\n\t\treturn replaceAsync(\n\t\t\tcontent,\n\t\t\tnew RegExp(\n\t\t\t\t`@customdirective\\\\(___(\\\\d+)___\\\\)\\\\s*?(${nestedParenthesisRegex})*`,\n\t\t\t\t\"gim\",\n\t\t\t),\n\t\t\tasync (_match: any, p1: number) => {\n\t\t\t\tconst placeholder = this.getBeginCustomDirectivePlaceholder(\n\t\t\t\t\tp1.toString(),\n\t\t\t\t);\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${_.escapeRegExp(placeholder)}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\t\t\t\tconst matched = `${this.customDirectives[p1]}`;\n\n\t\t\t\treturn replaceAsync(\n\t\t\t\t\tmatched,\n\t\t\t\t\t/(@[a-zA-Z0-9\\-_]+)(.*)/gis,\n\t\t\t\t\tasync (match2: string, p3: string, p4: string) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst formatted = (\n\t\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(`func${p4}`, {\n\t\t\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\t\t\ttrailingCommaPHP: false,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t\t.substring(4);\n\t\t\t\t\t\t\treturn `${p3}${util.indentComponentAttribute(\n\t\t\t\t\t\t\t\tindent.indent,\n\t\t\t\t\t\t\t\tformatted,\n\t\t\t\t\t\t\t\tthis.formatter,\n\t\t\t\t\t\t\t)}`;\n\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\treturn `${match2}`;\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\tstoreInlineCustomDirective(value: string) {\n\t\treturn this.getInlineCustomDirectivePlaceholder(\n\t\t\t(this.customDirectives.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tstoreBeginCustomDirective(value: string) {\n\t\treturn this.getBeginCustomDirectivePlaceholder(\n\t\t\t(this.customDirectives.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tstoreEndCustomDirective(value: string) {\n\t\treturn this.getEndCustomDirectivePlaceholder(\n\t\t\t(this.customDirectives.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tstoreElseCustomDirective(value: string) {\n\t\treturn this.getElseCustomDirectivePlaceholder(\n\t\t\t(this.customDirectives.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetInlineCustomDirectivePlaceholder(replace: string) {\n\t\treturn _.replace(\"___inline_cd_#___\", \"#\", replace);\n\t}\n\n\tgetBeginCustomDirectivePlaceholder(replace: string) {\n\t\treturn _.replace(\"@customdirective(___#___)\", \"#\", replace);\n\t}\n\n\tgetEndCustomDirectivePlaceholder(replace: string) {\n\t\treturn _.replace(\"@endcustomdirective(___#___)\", \"#\", replace);\n\t}\n\n\tgetElseCustomDirectivePlaceholder(replace: string) {\n\t\treturn _.replace(\"@else(___#___)\", \"#\", replace);\n\t}\n\n\tgetCustomDirectivePlaceholder(replace: any) {\n\t\treturn _.replace(\"___blade_comment_#___\", \"#\", replace);\n\t}\n}\n", "import _ from \"lodash\";\nimport { Processor } from \"./processor\";\n\nexport class EscapedBladeDirectiveProcessor extends Processor {\n\tprivate escapedBladeDirectives: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveEscapedBladeDirective(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreEscapedBladeDirective(content);\n\t}\n\n\tprivate async preserveEscapedBladeDirective(content: string): Promise<any> {\n\t\treturn _.replace(content, /@@\\w*/gim, (match: string) =>\n\t\t\tthis.storeEscapedBladeDirective(match),\n\t\t);\n\t}\n\n\tprivate async restoreEscapedBladeDirective(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res: any) =>\n\t\t\t_.replace(\n\t\t\t\tres,\n\t\t\t\tnew RegExp(\n\t\t\t\t\t`${this.getEscapedBladeDirectivePlaceholder(\"(\\\\d+)\")}`,\n\t\t\t\t\t\"gms\",\n\t\t\t\t),\n\t\t\t\t(_match: string, p1: number) => this.escapedBladeDirectives[p1],\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreEscapedBladeDirective(value: string) {\n\t\treturn this.getEscapedBladeDirectivePlaceholder(\n\t\t\t(this.escapedBladeDirectives.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetEscapedBladeDirectivePlaceholder(replace: any) {\n\t\treturn _.replace(\"___escaped_directive_#___\", \"#\", replace);\n\t}\n}\n", "import * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class FormatAsPhpProcessor extends Processor {\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await util.formatAsPhp(content, this.formatter.options);\n\t}\n\n\tasync postProcess(_content: string): Promise<any> {}\n}\n", "import * as util from \"../util\";\nimport { Processor } from \"./processor\";\nexport class FormatAsBladeProcessor extends Processor {\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await util.formatAsBlade(content, this.formatter);\n\t}\n\n\tasync postProcess(_content: string): Promise<any> {}\n}\n", "import beautify from \"js-beautify\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class FormatAsHtmlProcessor extends Processor {\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.formatAsHtml(content);\n\t}\n\n\tasync postProcess(_content: string): Promise<any> {}\n\n\tprivate async formatAsHtml(content: string): Promise<any> {\n\t\tconst options = {\n\t\t\tindent_size: util.optional(this.formatter.options).indentSize || 4,\n\t\t\twrap_line_length:\n\t\t\t\tutil.optional(this.formatter.options).wrapLineLength || 120,\n\t\t\twrap_attributes:\n\t\t\t\tutil.optional(this.formatter.options).wrapAttributes || \"auto\",\n\t\t\twrap_attributes_min_attrs: util.optional(this.formatter.options)\n\t\t\t\t.wrapAttributesMinAttrs,\n\t\t\tindent_inner_html:\n\t\t\t\tutil.optional(this.formatter.options).indentInnerHtml || false,\n\t\t\tend_with_newline:\n\t\t\t\tutil.optional(this.formatter.options).endWithNewline || true,\n\t\t\tmax_preserve_newlines: util.optional(this.formatter.options)\n\t\t\t\t.noMultipleEmptyLines\n\t\t\t\t? 1\n\t\t\t\t: undefined,\n\t\t\textra_liners: util.optional(this.formatter.options).extraLiners,\n\t\t\tcss: {\n\t\t\t\tend_with_newline: false,\n\t\t\t},\n\t\t\teol: this.formatter.endOfLine,\n\t\t};\n\n\t\tconst promise = new Promise((resolve) => resolve(content))\n\t\t\t.then((content) => util.preserveDirectives(content))\n\t\t\t.then((preserved) => beautify.html_beautify(preserved, options))\n\t\t\t.then((content) => util.revertDirectives(content));\n\n\t\treturn Promise.resolve(promise);\n\t}\n}\n", "import _ from \"lodash\";\nimport { Processor } from \"./processor\";\n\nexport class HtmlAttributesProcessor extends Processor {\n\tprivate htmlAttributes: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveHtmlAttributes(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreHtmlAttributes(content);\n\t}\n\n\tprivate async preserveHtmlAttributes(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(?<=<[\\w\\-\\.\\:\\_]+.*\\s)(?!x-bind)([^\\s\\:][^\\s\\'\\\"]+\\s*=\\s*([\"'])(?<!\\\\)[^\\2]*?(?<!\\\\)\\2)(?=.*(?<!=)\\/?>)/gms,\n\t\t\t(match: string) => `${this.storeHtmlAttribute(match)}`,\n\t\t);\n\t}\n\n\tprivate async restoreHtmlAttributes(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t// @ts-expect-error ts-migrate(2554) FIXME: Expected 0 arguments, but got 1.\n\t\t\tnew RegExp(`${this.getHtmlAttributePlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t(_match: string, p1: number) => this.htmlAttributes[p1],\n\t\t);\n\t}\n\n\tstoreHtmlAttribute(value: string) {\n\t\tconst index = this.htmlAttributes.push(value) - 1;\n\n\t\tif (value.length > 0) {\n\t\t\treturn this.getHtmlAttributePlaceholder(index.toString(), value.length);\n\t\t}\n\n\t\treturn this.getHtmlAttributePlaceholder(index.toString(), 0);\n\t}\n\n\tgetHtmlAttributePlaceholder(replace: string, length: any) {\n\t\tif (length && length > 0) {\n\t\t\tconst template = \"___attrs_#___\";\n\t\t\tconst gap = length - template.length;\n\t\t\treturn _.replace(\n\t\t\t\t`___attrs${_.repeat(\"_\", gap > 0 ? gap : 1)}#___`,\n\t\t\t\t\"#\",\n\t\t\t\treplace,\n\t\t\t);\n\t\t}\n\n\t\tif (_.isNull(length)) {\n\t\t\treturn _.replace(\"___attrs_#___\", \"#\", replace);\n\t\t}\n\n\t\treturn _.replace(\"___attrs_+?#___\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport beautify from \"js-beautify\";\nimport _ from \"lodash\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class HtmlTagsProcessor extends Processor {\n\tprivate htmlTags: string[] = [];\n\tprivate templatingStrings: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveHtmlTags(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreHtmlTags(content);\n\t}\n\n\tprivate async preserveHtmlTags(content: string): Promise<any> {\n\t\tconst contentUnformatted = [\"textarea\", \"pre\"];\n\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(\n\t\t\t\t`<(${contentUnformatted.join(\n\t\t\t\t\t\"|\",\n\t\t\t\t)})\\\\s{0,1}.*?>.*?<\\\\/(${contentUnformatted.join(\"|\")})>`,\n\t\t\t\t\"gis\",\n\t\t\t),\n\t\t\t(match: string) => this.storeHtmlTags(match),\n\t\t);\n\t}\n\n\tprivate async restoreHtmlTags(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getHtmlTagsPlaceholder(\"(\\\\d+)\")}`, \"gim\"),\n\t\t\t(_match: any, p1: number) => {\n\t\t\t\tconst placeholder = this.getHtmlTagsPlaceholder(p1.toString());\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst options = {\n\t\t\t\t\tindent_size: util.optional(this.formatter.options).indentSize || 4,\n\t\t\t\t\twrap_line_length:\n\t\t\t\t\t\tutil.optional(this.formatter.options).wrapLineLength || 120,\n\t\t\t\t\twrap_attributes:\n\t\t\t\t\t\tutil.optional(this.formatter.options).wrapAttributes || \"auto\",\n\t\t\t\t\twrap_attributes_min_attrs: util.optional(this.formatter.options)\n\t\t\t\t\t\t.wrapAttributesMinAttrs,\n\t\t\t\t\tindent_inner_html:\n\t\t\t\t\t\tutil.optional(this.formatter.options).indentInnerHtml || false,\n\t\t\t\t\textra_liners: util.optional(this.formatter.options).extraLiners,\n\t\t\t\t\tend_with_newline: false,\n\t\t\t\t\ttemplating: [\"php\"],\n\t\t\t\t};\n\n\t\t\t\tconst matched = this.htmlTags[p1];\n\t\t\t\tconst openingTag = _.first(\n\t\t\t\t\tmatched.match(/(<(textarea|pre).*?(?<!=)>)(?=.*?<\\/\\2>)/gis),\n\t\t\t\t);\n\n\t\t\t\tif (openingTag === undefined) {\n\t\t\t\t\treturn `${this.indentScriptBlock(\n\t\t\t\t\t\tindent,\n\t\t\t\t\t\tbeautify.html_beautify(matched, options),\n\t\t\t\t\t)}`;\n\t\t\t\t}\n\n\t\t\t\tconst restofTag = matched.substring(openingTag.length, matched.length);\n\n\t\t\t\treturn `${this.indentScriptBlock(\n\t\t\t\t\tindent,\n\t\t\t\t\tbeautify.html_beautify(openingTag, options),\n\t\t\t\t)}${restofTag}`;\n\t\t\t},\n\t\t);\n\t}\n\n\tstoreHtmlTags(value: string) {\n\t\treturn this.getHtmlTagsPlaceholder(\n\t\t\t(this.htmlTags.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetHtmlTagsPlaceholder(replace: any) {\n\t\treturn _.replace(\"<blade___html_tags_#___ />\", \"#\", replace);\n\t}\n\n\tindentScriptBlock(indent: detectIndent.Indent, content: any) {\n\t\tif (_.isEmpty(indent.indent)) {\n\t\t\treturn content;\n\t\t}\n\n\t\tif (util.isInline(content)) {\n\t\t\treturn `${content}`;\n\t\t}\n\n\t\tconst leftIndentAmount = indent.amount;\n\t\tconst indentLevel = leftIndentAmount / this.formatter.indentSize;\n\t\tconst prefixSpaces = this.formatter.indentCharacter.repeat(\n\t\t\tindentLevel < 0 ? 0 : indentLevel * this.formatter.indentSize,\n\t\t);\n\t\tconst prefixForEnd = this.formatter.indentCharacter.repeat(\n\t\t\tindentLevel < 0 ? 0 : indentLevel * this.formatter.indentSize,\n\t\t);\n\n\t\tconst preserved = _.replace(content, /`.*?`/gs, (match: any) =>\n\t\t\tthis.storeTemplatingString(match),\n\t\t);\n\n\t\tconst lines = preserved.split(\"\\n\");\n\n\t\tconst indented = _.chain(lines)\n\t\t\t.map((line: any, index: any) => {\n\t\t\t\tif (index === 0) {\n\t\t\t\t\treturn line;\n\t\t\t\t}\n\n\t\t\t\tif (index === lines.length - 1) {\n\t\t\t\t\treturn prefixForEnd + line;\n\t\t\t\t}\n\n\t\t\t\tif (_.isEmpty(line)) {\n\t\t\t\t\treturn line;\n\t\t\t\t}\n\n\t\t\t\treturn prefixSpaces + line;\n\t\t\t})\n\t\t\t.value()\n\t\t\t.join(\"\\n\");\n\n\t\treturn this.restoreTemplatingString(`${indented}`);\n\t}\n\n\tstoreTemplatingString(value: any) {\n\t\tconst index = this.templatingStrings.push(value) - 1;\n\t\treturn this.getTemplatingStringPlaceholder(index);\n\t}\n\n\trestoreTemplatingString(content: any) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getTemplatingStringPlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t(_match: any, p1: any) => this.templatingStrings[p1],\n\t\t);\n\t}\n\n\tgetTemplatingStringPlaceholder(replace: any) {\n\t\treturn _.replace(\"___templating_str_#___\", \"#\", replace);\n\t}\n}\n", "import _ from \"lodash\";\nimport { Processor } from \"./processor\";\n\nexport class IgnoredLinesProcessor extends Processor {\n\tprivate ignoredLines: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveIgnoredLines(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreIgnoredLines(content);\n\t}\n\n\tprivate async preserveIgnoredLines(content: string): Promise<any> {\n\t\treturn (\n\t\t\t_.chain(content)\n\t\t\t\t// ignore entire file\n\t\t\t\t.replace(\n\t\t\t\t\t/(^(?<!.+)^{{--\\s*blade-formatter-disable\\s*--}}.*?)([\\r\\n]*)$(?![\\r\\n])/gis,\n\t\t\t\t\t(_match: any, p1: any, p2: any) =>\n\t\t\t\t\t\tthis.storeIgnoredLines(`${p1}${p2.replace(/^\\n/, \"\")}`),\n\t\t\t\t)\n\t\t\t\t// range ignore\n\t\t\t\t.replace(\n\t\t\t\t\t/(?:({{--\\s*?blade-formatter-disable\\s*?--}}|<!--\\s*?prettier-ignore-start\\s*?-->|{{--\\s*?prettier-ignore-start\\s*?--}})).*?(?:({{--\\s*?blade-formatter-enable\\s*?--}}|<!--\\s*?prettier-ignore-end\\s*?-->|{{--\\s*?prettier-ignore-end\\s*?--}}))/gis,\n\t\t\t\t\t(match: any) => this.storeIgnoredLines(match),\n\t\t\t\t)\n\t\t\t\t// line ignore\n\t\t\t\t.replace(\n\t\t\t\t\t/(?:{{--\\s*?blade-formatter-disable-next-line\\s*?--}}|{{--\\s*?prettier-ignore\\s*?--}}|<!--\\s*?prettier-ignore\\s*?-->)[\\r\\n]+[^\\r\\n]+/gis,\n\t\t\t\t\t(match: any) => this.storeIgnoredLines(match),\n\t\t\t\t)\n\t\t\t\t// ignore Front Matter blocks\n\t\t\t\t.replace(/^---\\r?\\n[\\s\\S]*?\\r?\\n---(?=(\\r?\\n))/gis, (match: any) =>\n\t\t\t\t\tthis.storeIgnoredLines(match),\n\t\t\t\t)\n\t\t\t\t.value()\n\t\t);\n\t}\n\n\tprivate async restoreIgnoredLines(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getIgnoredLinePlaceholder(\"(\\\\d+)\")}`, \"gm\"),\n\t\t\t(_match: any, p1: any) => this.ignoredLines[p1],\n\t\t);\n\t}\n\n\tprivate storeIgnoredLines(value: string) {\n\t\treturn this.getIgnoredLinePlaceholder(this.ignoredLines.push(value) - 1);\n\t}\n\n\tprivate getIgnoredLinePlaceholder(replace: any) {\n\t\treturn _.replace(\"___ignored_line_#___\", \"#\", replace);\n\t}\n}\n", "import _ from \"lodash\";\nimport { directivePrefix, indentStartTokensWithoutPrefix } from \"src/indent\";\nimport { Processor } from \"./processor\";\n\nexport class InlineDirectiveProcessor extends Processor {\n\tprivate inlineDirectives: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveInlineDirective(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreInlineDirective(content);\n\t}\n\n\tprivate async preserveInlineDirective(content: string): Promise<any> {\n\t\t// preserve inline directives inside html tag\n\t\tconst regex = new RegExp(\n\t\t\t`(<[\\\\w\\\\-\\\\_]+?[^>]*?)${directivePrefix}(${indentStartTokensWithoutPrefix.join(\n\t\t\t\t\"|\",\n\t\t\t)})(\\\\s*?)?(\\\\([^)]*?\\\\))?((?:(?!@end\\\\2).)+)(@end\\\\2|@endif)(.*?/*>)`,\n\t\t\t\"gims\",\n\t\t);\n\t\tconst replaced = _.replace(\n\t\t\tcontent,\n\t\t\tregex,\n\t\t\t(\n\t\t\t\t_match: string,\n\t\t\t\tp1: string,\n\t\t\t\tp2: string,\n\t\t\t\tp3: string,\n\t\t\t\tp4: string,\n\t\t\t\tp5: string,\n\t\t\t\tp6: string,\n\t\t\t\tp7: string,\n\t\t\t) => {\n\t\t\t\tif (p3 === undefined && p4 === undefined) {\n\t\t\t\t\treturn `${p1}${this.storeInlineDirective(\n\t\t\t\t\t\t`${directivePrefix}${p2.trim()}${p5.trim()} ${p6.trim()}`,\n\t\t\t\t\t)}${p7}`;\n\t\t\t\t}\n\t\t\t\tif (p3 === undefined) {\n\t\t\t\t\treturn `${p1}${this.storeInlineDirective(\n\t\t\t\t\t\t`${directivePrefix}${p2.trim()}${p4.trim()}${p5}${p6.trim()}`,\n\t\t\t\t\t)}${p7}`;\n\t\t\t\t}\n\t\t\t\tif (p4 === undefined) {\n\t\t\t\t\treturn `${p1}${this.storeInlineDirective(\n\t\t\t\t\t\t`${directivePrefix}${p2.trim()}${p3}${p5.trim()} ${p6.trim()}`,\n\t\t\t\t\t)}${p7}`;\n\t\t\t\t}\n\n\t\t\t\treturn `${p1}${this.storeInlineDirective(\n\t\t\t\t\t`${directivePrefix}${p2.trim()}${p3}${p4.trim()} ${p5.trim()} ${p6.trim()}`,\n\t\t\t\t)}${p7}`;\n\t\t\t},\n\t\t);\n\n\t\tif (regex.test(replaced)) {\n\t\t\treturn this.preserveInlineDirective(replaced);\n\t\t}\n\n\t\treturn replaced;\n\t}\n\n\tprivate async restoreInlineDirective(content: any) {\n\t\treturn new Promise((resolve) => resolve(content)).then((res) =>\n\t\t\t_.replace(\n\t\t\t\t// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message\n\t\t\t\tres,\n\t\t\t\tnew RegExp(`${this.getInlinePlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t\t(_match: any, p1: any) => {\n\t\t\t\t\tconst matched = this.inlineDirectives[p1];\n\t\t\t\t\treturn matched;\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreInlineDirective(value: any) {\n\t\treturn this.getInlinePlaceholder(\n\t\t\tthis.inlineDirectives.push(value) - 1,\n\t\t\tvalue.length,\n\t\t);\n\t}\n\n\tgetInlinePlaceholder(replace: any, length = 0) {\n\t\tif (length > 0) {\n\t\t\tconst template = \"___inline_directive_#___\";\n\t\t\tconst gap = length - template.length;\n\t\t\treturn _.replace(\n\t\t\t\t`___inline_directive_${_.repeat(\"_\", gap > 0 ? gap : 0)}#___`,\n\t\t\t\t\"#\",\n\t\t\t\treplace,\n\t\t\t);\n\t\t}\n\n\t\treturn _.replace(\"___inline_directive_+?#___\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport { inlineFunctionTokens, inlinePhpDirectives } from \"src/indent\";\nimport { nestedParenthesisRegex } from \"src/regex\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class InlinePhpDirectiveProcessor extends Processor {\n\tprivate inlinePhpDirectives: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveInlinePhpDirective(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreInlinePhpDirective(content);\n\t}\n\n\tprivate async preserveInlinePhpDirective(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t// eslint-disable-next-line max-len\n\t\t\tnew RegExp(\n\t\t\t\t`(?!\\\\/\\\\*.*?\\\\*\\\\/)(${inlineFunctionTokens.join(\"|\")})(\\\\s*?)${nestedParenthesisRegex}`,\n\t\t\t\t\"gmsi\",\n\t\t\t),\n\t\t\t(match: any) => this.storeInlinePhpDirective(match),\n\t\t);\n\t}\n\n\tprivate async restoreInlinePhpDirective(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res) =>\n\t\t\treplaceAsync(\n\t\t\t\t// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message\n\t\t\t\tres,\n\t\t\t\tnew RegExp(`${this.getInlinePhpPlaceholder(\"(\\\\d+)\")}`, \"gm\"),\n\t\t\t\tasync (_match: any, p1: any) => {\n\t\t\t\t\tconst matched = this.inlinePhpDirectives[p1];\n\t\t\t\t\tconst placeholder = this.getInlinePhpPlaceholder(p1);\n\t\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t\t) ?? [\"\"];\n\t\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\t\tif (matched.includes(\"@php\")) {\n\t\t\t\t\t\treturn `${(\n\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(matched, {\n\t\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\t\ttrailingCommaPHP: false,\n\t\t\t\t\t\t\t\tprintWidth: util.printWidthForInline,\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t// @ts-expect-error ts-migrate(2554) FIXME: Expected 0 arguments, but got 1.\n\t\t\t\t\t\t\t.trimRight(\"\\n\")}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (new RegExp(inlinePhpDirectives.join(\"|\"), \"gi\").test(matched)) {\n\t\t\t\t\t\tconst formatted = replaceAsync(\n\t\t\t\t\t\t\tmatched,\n\t\t\t\t\t\t\tnew RegExp(\n\t\t\t\t\t\t\t\t`(?<=@(${_.map(inlinePhpDirectives, (token) => token.substring(1)).join(\"|\")}).*?\\\\()(.*)(?=\\\\))`,\n\t\t\t\t\t\t\t\t\"gis\",\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tasync (_match2: any, p3: any, p4: any) => {\n\t\t\t\t\t\t\t\tlet wrapLength = this.formatter.wrapLineLength;\n\n\t\t\t\t\t\t\t\tif ([\"button\", \"class\"].includes(p3)) {\n\t\t\t\t\t\t\t\t\twrapLength = 80;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (p3 === \"include\") {\n\t\t\t\t\t\t\t\t\twrapLength =\n\t\t\t\t\t\t\t\t\t\tthis.formatter.wrapLineLength -\n\t\t\t\t\t\t\t\t\t\t\"func\".length -\n\t\t\t\t\t\t\t\t\t\tp1.length -\n\t\t\t\t\t\t\t\t\t\tindent.amount;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn this.formatExpressionInsideBladeDirective(\n\t\t\t\t\t\t\t\t\tp4,\n\t\t\t\t\t\t\t\t\tindent,\n\t\t\t\t\t\t\t\t\twrapLength,\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\n\t\t\t\t\t\treturn formatted;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn `${(\n\t\t\t\t\t\tawait util.formatRawStringAsPhp(matched, {\n\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\tprintWidth: util.printWidthForInline,\n\t\t\t\t\t\t})\n\t\t\t\t\t).trimEnd()}`;\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreInlinePhpDirective(value: any) {\n\t\treturn this.getInlinePhpPlaceholder(\n\t\t\tthis.inlinePhpDirectives.push(value) - 1,\n\t\t);\n\t}\n\n\tgetInlinePhpPlaceholder(replace: any) {\n\t\treturn _.replace(\"___inline_php_directive_#___\", \"#\", replace);\n\t}\n\n\tasync formatExpressionInsideBladeDirective(\n\t\tmatchedExpression: string,\n\t\tindent: detectIndent.Indent,\n\t\twrapLength: number | undefined = undefined,\n\t) {\n\t\tconst formatTarget = `func(${matchedExpression})`;\n\t\tconst formattedExpression = await util.formatRawStringAsPhp(formatTarget, {\n\t\t\t...this.formatter.options,\n\t\t\tprintWidth:\n\t\t\t\twrapLength ?? this.formatter.defaultPhpFormatOption.printWidth,\n\t\t});\n\n\t\tif (formattedExpression === formatTarget) {\n\t\t\treturn matchedExpression;\n\t\t}\n\n\t\tlet inside = formattedExpression\n\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t.replace(/(?<!(['\"]).*)(?<=\\()[\\n\\s]+?(?=\\w)/gm, \"\")\n\t\t\t.replace(\n\t\t\t\t/(.*)],[\\n\\s]*?\\)$/gm,\n\t\t\t\t(_match: string, p1: string) => `${p1}]\\n)`,\n\t\t\t)\n\t\t\t.replace(/,[\\n\\s]*?\\)/gs, \")\")\n\t\t\t.replace(/,(\\s*?\\))$/gm, (_match, p1) => p1)\n\t\t\t.trim();\n\n\t\tif (this.formatter.options.useTabs || false) {\n\t\t\tinside = _.replace(\n\t\t\t\tinside,\n\t\t\t\t/(?<=^ *) {4}/gm,\n\t\t\t\t\"\\t\".repeat(this.formatter.indentSize),\n\t\t\t);\n\t\t}\n\n\t\tinside = inside.replace(\n\t\t\t/func\\((.*)\\)/gis,\n\t\t\t(_match: string, p1: string) => p1,\n\t\t);\n\t\tif (util.isInline(inside.trim())) {\n\t\t\tinside = inside.trim();\n\t\t}\n\n\t\treturn util.indentRawPhpBlock(indent, inside, this.formatter);\n\t}\n}\n", "import _ from \"lodash\";\nimport { Processor } from \"./processor\";\n\nexport class NonnativeScriptsProcessor extends Processor {\n\tprivate nonnativeScripts: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveNonnativeScripts(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreNonnativeScripts(content);\n\t}\n\n\tprivate async preserveNonnativeScripts(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/<script[^>]*?type=([\"'])(?!(text\\/javascript|module))[^\\1]*?\\1[^>]*?>.*?<\\/script>/gis,\n\t\t\t(match: string) => this.storeNonnativeScripts(match),\n\t\t);\n\t}\n\n\tstoreNonnativeScripts(value: string) {\n\t\tconst index = this.nonnativeScripts.push(value) - 1;\n\t\treturn this.getNonnativeScriptPlaceholder(index.toString());\n\t}\n\n\tprivate async restoreNonnativeScripts(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getNonnativeScriptPlaceholder(\"(\\\\d+)\")}`, \"gmi\"),\n\t\t\t(_match: any, p1: number) => `${this.nonnativeScripts[p1]}`,\n\t\t);\n\t}\n\n\tprivate getNonnativeScriptPlaceholder(replace: string) {\n\t\treturn _.replace(\"<blade___non_native_scripts_#___ />\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport { formatPhpComment } from \"src/comment\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class PhpBlockProcessor extends Processor {\n\tprivate rawBlocks: string[] = [];\n\tprivate rawPropsBlocks: string[] = [];\n\tprivate stringLiteralInPhp: string[] = [];\n\tprivate phpComments: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preservePhpBlock(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreRawPhpBlock(content);\n\t}\n\n\tprivate async preservePhpBlock(content: string): Promise<any> {\n\t\treturn this.preserveRawPhpBlock(content);\n\t}\n\n\tasync preserveRawPhpBlock(content: any) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(?<!@)@php(.*?)@endphp/gs,\n\t\t\t(_match: any, p1: any) => this.storeRawBlock(p1),\n\t\t);\n\t}\n\n\tasync restoreRawPhpBlock(content: any) {\n\t\treturn replaceAsync(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getRawPlaceholder(\"(\\\\d+)\")}`, \"gm\"),\n\t\t\tasync (_match: any, p1: number) => {\n\t\t\t\tlet rawBlock = this.rawBlocks[p1];\n\t\t\t\tconst placeholder = this.getRawPlaceholder(p1.toString());\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst isOnSingleLine = util.isInline(rawBlock);\n\t\t\t\tconst isMultipleStatements = await util.isMultilineStatement(\n\t\t\t\t\trawBlock,\n\t\t\t\t\tthis.formatter,\n\t\t\t\t);\n\t\t\t\tif (isOnSingleLine && isMultipleStatements) {\n\t\t\t\t\t// multiple statements on a single line\n\t\t\t\t\trawBlock = (\n\t\t\t\t\t\tawait util.formatStringAsPhp(\n\t\t\t\t\t\t\t`<?php\\n${rawBlock}\\n?>`,\n\t\t\t\t\t\t\tthis.formatter.options,\n\t\t\t\t\t\t)\n\t\t\t\t\t).trim();\n\t\t\t\t} else if (isMultipleStatements) {\n\t\t\t\t\t// multiple statments on mult lines\n\n\t\t\t\t\tconst indentLevel = indent.amount + this.formatter.indentSize;\n\t\t\t\t\trawBlock = (\n\t\t\t\t\t\tawait util.formatStringAsPhp(`<?php${rawBlock}?>`, {\n\t\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t\t\tuseProjectPrintWidth: true,\n\t\t\t\t\t\t\tadjustPrintWidthBy: indentLevel,\n\t\t\t\t\t\t})\n\t\t\t\t\t).trimEnd();\n\t\t\t\t} else if (!isOnSingleLine) {\n\t\t\t\t\t// single statement on mult lines\n\t\t\t\t\trawBlock = (\n\t\t\t\t\t\tawait util.formatStringAsPhp(\n\t\t\t\t\t\t\t`<?php${rawBlock}?>`,\n\t\t\t\t\t\t\tthis.formatter.options,\n\t\t\t\t\t\t)\n\t\t\t\t\t).trimEnd();\n\t\t\t\t} else {\n\t\t\t\t\t// single statement on single line\n\t\t\t\t\trawBlock = `<?php${rawBlock}?>`;\n\t\t\t\t}\n\n\t\t\t\treturn _.replace(\n\t\t\t\t\trawBlock,\n\t\t\t\t\t/^(\\s*)?<\\?php(.*?)\\?>/gms,\n\t\t\t\t\t(_matched: any, _q1: any, q2: any) => {\n\t\t\t\t\t\tif (util.isInline(rawBlock)) {\n\t\t\t\t\t\t\treturn `@php${q2}@endphp`;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet preserved = this.preserveStringLiteralInPhp(q2);\n\t\t\t\t\t\tpreserved = this.preservePhpComment(preserved);\n\t\t\t\t\t\tlet indented = util.indentRawBlock(\n\t\t\t\t\t\t\tindent,\n\t\t\t\t\t\t\tpreserved,\n\t\t\t\t\t\t\tthis.formatter,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tindented = this.restorePhpComment(indented);\n\t\t\t\t\t\tconst restored = this.restoreStringLiteralInPhp(indented);\n\n\t\t\t\t\t\treturn `@php${restored}@endphp`;\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t},\n\t\t);\n\t}\n\n\tstoreRawBlock(value: any) {\n\t\treturn this.getRawPlaceholder(this.rawBlocks.push(value) - 1);\n\t}\n\n\tgetRawPlaceholder(replace: any) {\n\t\treturn _.replace(\"___raw_block_#___\", \"#\", replace);\n\t}\n\n\tpreserveStringLiteralInPhp(content: any) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(\\\"([^\\\\]|\\\\.)*?\\\"|\\'([^\\\\]|\\\\.)*?\\')/gm,\n\t\t\t(match: string) => `${this.storeStringLiteralInPhp(match)}`,\n\t\t);\n\t}\n\n\tstoreStringLiteralInPhp(value: any) {\n\t\tconst index = this.stringLiteralInPhp.push(value) - 1;\n\t\treturn this.getStringLiteralInPhpPlaceholder(index);\n\t}\n\n\tgetStringLiteralInPhpPlaceholder(replace: any) {\n\t\treturn _.replace(\"'___php_content_#___'\", \"#\", replace);\n\t}\n\n\tpreservePhpComment(content: string) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/\\/\\*(?:[^*]|[\\r\\n]|(?:\\*+(?:[^*\\/]|[\\r\\n])))*\\*+\\//gi,\n\t\t\t(match: string) => this.storePhpComment(match),\n\t\t);\n\t}\n\n\tstorePhpComment(value: string) {\n\t\treturn this.getPhpCommentPlaceholder(\n\t\t\t(this.phpComments.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetPhpCommentPlaceholder(replace: string) {\n\t\treturn _.replace(\"___php_comment_#___\", \"#\", replace);\n\t}\n\n\trestorePhpComment(content: string) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getPhpCommentPlaceholder(\"(\\\\d+)\")};{0,1}`, \"gms\"),\n\t\t\t(_match: string, p1: number) => {\n\t\t\t\tconst placeholder = this.getPhpCommentPlaceholder(p1.toString());\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\t\t\t\tconst formatted = formatPhpComment(this.phpComments[p1]);\n\n\t\t\t\treturn util.indentPhpComment(indent, formatted, this.formatter);\n\t\t\t},\n\t\t);\n\t}\n\n\trestoreStringLiteralInPhp(content: any) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getStringLiteralInPhpPlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t(_match: any, p1: any) => this.stringLiteralInPhp[p1],\n\t\t);\n\t}\n}\n", "function splitByLines(content: string): Array<string> {\n\treturn content.split(\"\\n\");\n}\n\nfunction isCommentedLine(line: string): boolean {\n\treturn line.trim().startsWith(\"*\");\n}\n\nfunction isMultiline(lines: Array<string>): boolean {\n\treturn lines.length > 1;\n}\n\nfunction addPrefixToLine(line: string): string {\n\tconst prefix = \" \";\n\n\treturn `${prefix}${line}`;\n}\n\n/**\n * Formats php comment\n *\n * @param comment\n * @returns string\n */\nexport function formatPhpComment(comment: string): string {\n\tconst lines = splitByLines(comment);\n\n\tif (!isMultiline(lines)) {\n\t\treturn comment;\n\t}\n\n\tlet nonCommentLineExists = false;\n\n\tconst mapped = lines.map((line: string, row: number) => {\n\t\tif (row === 0) {\n\t\t\treturn line;\n\t\t}\n\n\t\tif (nonCommentLineExists) {\n\t\t\treturn line;\n\t\t}\n\n\t\tif (!isCommentedLine(line)) {\n\t\t\tnonCommentLineExists = true;\n\t\t\treturn line;\n\t\t}\n\n\t\tconst trimmedLine = line.trim();\n\n\t\treturn addPrefixToLine(trimmedLine);\n\t});\n\n\treturn mapped.join(\"\\n\");\n}\n\nexport default {\n\tformatPhpComment,\n};\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class PropsProcessor extends Processor {\n\tprivate rawPropsBlocks: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveProps(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreRawPropsBlock(content);\n\t}\n\n\tprivate async preserveProps(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/@props\\(((?:[^\\\\(\\\\)]|\\([^\\\\(\\\\)]*\\))*)\\)/gs,\n\t\t\t(_match: any, p1: any) => this.storeRawPropsBlock(p1),\n\t\t);\n\t}\n\n\tasync restoreRawPropsBlock(content: any) {\n\t\tconst regex = this.getRawPropsPlaceholder(\"(\\\\d+)\");\n\t\treturn replaceAsync(\n\t\t\tcontent,\n\t\t\tnew RegExp(regex, \"gms\"),\n\t\t\tasync (_match: any, p1: any) => {\n\t\t\t\tconst placeholder = this.getRawPropsPlaceholder(p1.toString());\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst formatted = `@props(${(\n\t\t\t\t\tawait util.formatRawStringAsPhp(this.rawPropsBlocks[p1], {\n\t\t\t\t\t\t...this.formatter.options,\n\t\t\t\t\t})\n\t\t\t\t).trim()})`;\n\n\t\t\t\treturn util.indentRawPhpBlock(indent, formatted, this.formatter);\n\t\t\t},\n\t\t);\n\t}\n\n\tstoreRawPropsBlock(value: any) {\n\t\treturn this.getRawPropsPlaceholder(this.rawPropsBlocks.push(value) - 1);\n\t}\n\n\tgetRawPropsPlaceholder(replace: any) {\n\t\treturn _.replace(\"@__raw_props_block_#__@\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class RawBladeBraceProcessor extends Processor {\n\tprivate rawBladeBraces: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveRawBladeBrace(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreRawBladeBrace(content);\n\t}\n\n\tprivate async preserveRawBladeBrace(content: string): Promise<any> {\n\t\treturn _.replace(content, /\\{!!(.*?)!!\\}/gs, (_match: any, p1: any) => {\n\t\t\t// if content is blank\n\t\t\tif (p1 === \"\") {\n\t\t\t\treturn this.storeRawBladeBrace(p1);\n\t\t\t}\n\n\t\t\t// preserve a space if content contains only space, tab, or new line character\n\t\t\tif (!/\\S/.test(p1)) {\n\t\t\t\treturn this.storeRawBladeBrace(\" \");\n\t\t\t}\n\n\t\t\t// any other content\n\t\t\treturn this.storeRawBladeBrace(p1.trim());\n\t\t});\n\t}\n\n\tprivate async restoreRawBladeBrace(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res) =>\n\t\t\treplaceAsync(\n\t\t\t\t// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message\n\t\t\t\tres,\n\t\t\t\tnew RegExp(`${this.getRawBladeBracePlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t\tasync (_match: any, p1: any) => {\n\t\t\t\t\tconst placeholder = this.getRawBladeBracePlaceholder(p1);\n\t\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t\t) ?? [\"\"];\n\t\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\t\t\t\t\tconst bladeBrace = this.rawBladeBraces[p1];\n\n\t\t\t\t\tif (bladeBrace.trim() === \"\") {\n\t\t\t\t\t\treturn `{!!${bladeBrace}!!}`;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn util.indentRawPhpBlock(\n\t\t\t\t\t\tindent,\n\t\t\t\t\t\t`{!! ${(\n\t\t\t\t\t\t\tawait util.formatRawStringAsPhp(\n\t\t\t\t\t\t\t\tbladeBrace,\n\t\t\t\t\t\t\t\tthis.formatter.options,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.replace(/([\\n\\s]*)->([\\n\\s]*)/gs, \"->\")\n\t\t\t\t\t\t\t.trim()} !!}`,\n\t\t\t\t\t\tthis.formatter,\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreRawBladeBrace(value: any) {\n\t\tconst index = this.rawBladeBraces.push(value) - 1;\n\t\treturn this.getRawBladeBracePlaceholder(index);\n\t}\n\n\tgetRawBladeBracePlaceholder(replace: any) {\n\t\treturn _.replace(\"___raw_blade_brace_#___\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport { formatPhpComment } from \"src/comment\";\nimport replaceAsync from \"string-replace-async\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class RawPhpTagProcessor extends Processor {\n\tprivate rawPhpTags: string[] = [];\n\tprivate phpComments: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveRawPhpTag(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreRawPhpTag(content);\n\t}\n\n\tprivate async preserveRawPhpTag(content: string): Promise<any> {\n\t\treturn _.replace(content, /<\\?php(.*?)\\?>/gms, (match: any) =>\n\t\t\tthis.storeRawPhpTags(match),\n\t\t);\n\t}\n\n\tprivate async restoreRawPhpTag(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res) =>\n\t\t\treplaceAsync(\n\t\t\t\t// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message\n\t\t\t\tres,\n\t\t\t\tnew RegExp(`${this.getRawPhpTagPlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t\tasync (_match: any, p1: any) => {\n\t\t\t\t\t// const result= this.rawPhpTags[p1];\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst matched = this.rawPhpTags[p1];\n\t\t\t\t\t\tconst commentBlockExists =\n\t\t\t\t\t\t\t/(?<=<\\?php\\s*?)\\/\\*.*?\\*\\/(?=\\s*?\\?>)/gim.test(matched);\n\t\t\t\t\t\tconst inlinedComment = commentBlockExists && util.isInline(matched);\n\t\t\t\t\t\tconst placeholder = this.getRawPhpTagPlaceholder(p1);\n\t\t\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t\t\t) ?? [\"\"];\n\t\t\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\t\t\tif (inlinedComment) {\n\t\t\t\t\t\t\treturn matched;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst result = (\n\t\t\t\t\t\t\tawait util.formatStringAsPhp(\n\t\t\t\t\t\t\t\tthis.rawPhpTags[p1],\n\t\t\t\t\t\t\t\tthis.formatter.options,\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t.trimEnd();\n\n\t\t\t\t\t\tif (util.isInline(result)) {\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet preserved = this.preservePhpComment(result);\n\n\t\t\t\t\t\tif (indent.indent) {\n\t\t\t\t\t\t\tpreserved = util.indentRawPhpBlock(\n\t\t\t\t\t\t\t\tindent,\n\t\t\t\t\t\t\t\tpreserved,\n\t\t\t\t\t\t\t\tthis.formatter,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst restored = this.restorePhpComment(preserved);\n\n\t\t\t\t\t\treturn restored;\n\t\t\t\t\t} catch (_e) {\n\t\t\t\t\t\treturn `${this.rawPhpTags[p1]}`;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreRawPhpTags(value: any) {\n\t\tconst index = this.rawPhpTags.push(value) - 1;\n\t\treturn this.getRawPhpTagPlaceholder(index);\n\t}\n\n\tgetRawPhpTagPlaceholder(replace: any) {\n\t\treturn _.replace(\"___raw_php_tag_#___\", \"#\", replace);\n\t}\n\n\tpreservePhpComment(content: string) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/\\/\\*(?:[^*]|[\\r\\n]|(?:\\*+(?:[^*\\/]|[\\r\\n])))*\\*+\\//gi,\n\t\t\t(match: string) => this.storePhpComment(match),\n\t\t);\n\t}\n\n\trestorePhpComment(content: string) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getPhpCommentPlaceholder(\"(\\\\d+)\")};{0,1}`, \"gms\"),\n\t\t\t(_match: string, p1: number) => {\n\t\t\t\tconst placeholder = this.getPhpCommentPlaceholder(p1.toString());\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\t\t\t\tconst formatted = formatPhpComment(this.phpComments[p1]);\n\n\t\t\t\treturn util.indentPhpComment(indent, formatted, this.formatter);\n\t\t\t},\n\t\t);\n\t}\n\n\tstorePhpComment(value: string) {\n\t\treturn this.getPhpCommentPlaceholder(\n\t\t\t(this.phpComments.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetPhpCommentPlaceholder(replace: string) {\n\t\treturn _.replace(\"___php_comment_#___\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport beautify from \"js-beautify\";\nimport _ from \"lodash\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class ScriptsProcessor extends Processor {\n\tprivate scripts: string[] = [];\n\tprivate templatingStrings: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveScripts(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreScripts(content);\n\t}\n\n\tprivate async preserveScripts(content: string): Promise<any> {\n\t\treturn _.replace(content, /<script.*?>.*?<\\/script>/gis, (match: any) =>\n\t\t\tthis.storeScripts(match),\n\t\t);\n\t}\n\n\tprivate async restoreScripts(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res) =>\n\t\t\t_.replace(\n\t\t\t\t// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'unknown' is not assignable to pa... Remove this comment to see the full error message\n\t\t\t\tres,\n\t\t\t\tnew RegExp(`${this.getScriptPlaceholder(\"(\\\\d+)\")}`, \"gim\"),\n\t\t\t\t(_match: any, p1: number) => {\n\t\t\t\t\tconst script = this.scripts[p1];\n\n\t\t\t\t\tconst placeholder = this.getScriptPlaceholder(p1);\n\t\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t\t) ?? [\"\"];\n\t\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\t\t\t\t\tconst useTabs =\n\t\t\t\t\t\tutil.optional(this.formatter.options).useTabs || false;\n\n\t\t\t\t\tconst options = {\n\t\t\t\t\t\tindent_size: util.optional(this.formatter.options).indentSize || 4,\n\t\t\t\t\t\twrap_line_length:\n\t\t\t\t\t\t\tutil.optional(this.formatter.options).wrapLineLength || 120,\n\t\t\t\t\t\twrap_attributes:\n\t\t\t\t\t\t\tutil.optional(this.formatter.options).wrapAttributes || \"auto\",\n\t\t\t\t\t\twrap_attributes_min_attrs: util.optional(this.formatter.options)\n\t\t\t\t\t\t\t.wrapAttributesMinAttrs,\n\t\t\t\t\t\tindent_inner_html:\n\t\t\t\t\t\t\tutil.optional(this.formatter.options).indentInnerHtml || false,\n\t\t\t\t\t\textra_liners: util.optional(this.formatter.options).extraLiners,\n\t\t\t\t\t\tindent_with_tabs: useTabs,\n\t\t\t\t\t\tend_with_newline: false,\n\t\t\t\t\t\ttemplating: [\"php\"],\n\t\t\t\t\t};\n\n\t\t\t\t\tif (useTabs) {\n\t\t\t\t\t\treturn this.indentScriptBlock(\n\t\t\t\t\t\t\tindent,\n\t\t\t\t\t\t\t_.replace(\n\t\t\t\t\t\t\t\tbeautify.html_beautify(script, options),\n\t\t\t\t\t\t\t\t/\\t/g,\n\t\t\t\t\t\t\t\t\"\\t\".repeat(this.formatter.indentSize),\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\treturn this.indentScriptBlock(\n\t\t\t\t\t\tindent,\n\t\t\t\t\t\tbeautify.html_beautify(script, options),\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t}\n\n\tprivate indentScriptBlock(indent: detectIndent.Indent, content: any) {\n\t\tif (_.isEmpty(indent.indent)) {\n\t\t\treturn content;\n\t\t}\n\n\t\tif (util.isInline(content)) {\n\t\t\treturn `${content}`;\n\t\t}\n\n\t\tconst leftIndentAmount = indent.amount;\n\t\tconst indentLevel = leftIndentAmount / this.formatter.indentSize;\n\t\tconst prefixSpaces = this.formatter.indentCharacter.repeat(\n\t\t\tindentLevel < 0 ? 0 : indentLevel * this.formatter.indentSize,\n\t\t);\n\t\tconst prefixForEnd = this.formatter.indentCharacter.repeat(\n\t\t\tindentLevel < 0 ? 0 : indentLevel * this.formatter.indentSize,\n\t\t);\n\n\t\tconst preserved = _.replace(content, /`.*?`/gs, (match: any) =>\n\t\t\tthis.storeTemplatingString(match),\n\t\t);\n\n\t\tconst lines = preserved.split(\"\\n\");\n\n\t\tconst indented = _.chain(lines)\n\t\t\t.map((line: any, index: any) => {\n\t\t\t\tif (index === 0) {\n\t\t\t\t\treturn line;\n\t\t\t\t}\n\n\t\t\t\tif (index === lines.length - 1) {\n\t\t\t\t\treturn prefixForEnd + line;\n\t\t\t\t}\n\n\t\t\t\tif (_.isEmpty(line)) {\n\t\t\t\t\treturn line;\n\t\t\t\t}\n\n\t\t\t\treturn prefixSpaces + line;\n\t\t\t})\n\t\t\t.value()\n\t\t\t.join(\"\\n\");\n\n\t\treturn this.restoreTemplatingString(`${indented}`);\n\t}\n\n\trestoreTemplatingString(content: any) {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getTemplatingStringPlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t(_match: any, p1: any) => this.templatingStrings[p1],\n\t\t);\n\t}\n\n\tstoreScripts(value: string) {\n\t\tconst index = this.scripts.push(value) - 1;\n\t\treturn this.getScriptPlaceholder(index);\n\t}\n\n\tstoreTemplatingString(value: any) {\n\t\tconst index = this.templatingStrings.push(value) - 1;\n\t\treturn this.getTemplatingStringPlaceholder(index);\n\t}\n\n\tgetScriptPlaceholder(replace: any) {\n\t\treturn _.replace(\"<blade___scripts_#___ />\", \"#\", replace);\n\t}\n\n\tgetTemplatingStringPlaceholder(replace: any) {\n\t\treturn _.replace(\"___templating_str_#___\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport type { JSBeautifyOptions } from \"js-beautify\";\nimport beautify from \"js-beautify\";\nimport _ from \"lodash\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class ShorthandBindingProcessor extends Processor {\n\tprivate shorthandBindings: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveShorthandBinding(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreShorthandBinding(content);\n\t}\n\n\tprivate async preserveShorthandBinding(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(?<=<(?!livewire:)[^<]*?(\\s|x-bind)):{1}(?<!=>)[\\w\\-_.]*?=([\"'])(?!=>)[^\\2]*?\\2(?=[^>]*?\\/*?>)/gim,\n\t\t\t(match: any) => `${this.storeShorthandBinding(match)}`,\n\t\t);\n\t}\n\n\tprivate async restoreShorthandBinding(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getShorthandBindingPlaceholder(\"(\\\\d+)\")}`, \"gms\"),\n\t\t\t(_match: any, p1: any) => {\n\t\t\t\tconst placeholder = this.getShorthandBindingPlaceholder(p1);\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst matched = this.shorthandBindings[p1];\n\n\t\t\t\tconst formatted = _.replace(\n\t\t\t\t\tmatched,\n\t\t\t\t\t/(:{1,2}.*?=)([\"'])(.*?)(?=\\2)/gis,\n\t\t\t\t\t(match, p2: string, p3: string, p4: string) => {\n\t\t\t\t\t\tconst beautifyOpts: JSBeautifyOptions = {\n\t\t\t\t\t\t\twrap_line_length: this.formatter.wrapLineLength - indent.amount,\n\t\t\t\t\t\t\tbrace_style: \"preserve-inline\",\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (p4 === \"\" || p4.includes(\"->\")) {\n\t\t\t\t\t\t\treturn match;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (util.isInline(p4)) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn `${p2}${p3}${beautify\n\t\t\t\t\t\t\t\t\t.js_beautify(p4.trim(), beautifyOpts)\n\t\t\t\t\t\t\t\t\t.trim()}`;\n\t\t\t\t\t\t\t} catch (_error) {\n\t\t\t\t\t\t\t\treturn `${p2}${p3}${p4.trim()}`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn `${p2}${p3}${beautify\n\t\t\t\t\t\t\t.js_beautify(p4.trim(), beautifyOpts)\n\t\t\t\t\t\t\t.trim()}`;\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\treturn `${util.indentComponentAttribute(indent.indent, formatted, this.formatter)}`;\n\t\t\t},\n\t\t);\n\t}\n\n\tstoreShorthandBinding(value: string) {\n\t\tconst index = this.shorthandBindings.push(value) - 1;\n\n\t\treturn this.getShorthandBindingPlaceholder(index.toString(), value.length);\n\t}\n\n\tgetShorthandBindingPlaceholder(replace: string, length: any = 0) {\n\t\tif (length && length > 0) {\n\t\t\tconst template = \"___short_binding_#___\";\n\t\t\tconst gap = length - template.length;\n\t\t\treturn _.replace(\n\t\t\t\t`___short_binding_${_.repeat(\"_\", gap > 0 ? gap : 1)}#___`,\n\t\t\t\t\"#\",\n\t\t\t\treplace,\n\t\t\t);\n\t\t}\n\t\treturn _.replace(\"___short_binding_+?#___\", \"#\", replace);\n\t}\n}\n", "import { sortAttributes } from \"html-attribute-sorter\";\nimport _ from \"lodash\";\nimport type { SortHtmlAttributes } from \"src/runtimeConfig\";\nimport { Processor } from \"./processor\";\n\nexport class SortHtmlAttributesProcessor extends Processor {\n\tprivate bladeComments: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.sortHtmlAttribute(content);\n\t}\n\n\tasync postProcess(_content: string): Promise<any> {}\n\n\tprivate async sortHtmlAttribute(content: string): Promise<any> {\n\t\tconst strategy: SortHtmlAttributes =\n\t\t\tthis.formatter.options.sortHtmlAttributes ?? \"none\";\n\n\t\tif (!_.isEmpty(strategy) && strategy !== \"none\") {\n\t\t\tconst regexes = this.formatter.options.customHtmlAttributesOrder;\n\n\t\t\tif (_.isArray(regexes)) {\n\t\t\t\treturn sortAttributes(content, {\n\t\t\t\t\torder: strategy,\n\t\t\t\t\tcustomRegexes: regexes,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// when option is string\n\t\t\tconst customRegexes = _.chain(regexes).split(\",\").map(_.trim).value();\n\n\t\t\treturn sortAttributes(content, { order: strategy, customRegexes });\n\t\t}\n\n\t\treturn content;\n\t}\n}\n", "import { sortClasses } from \"@shufo/tailwindcss-class-sorter\";\nimport _ from \"lodash\";\nimport { Processor } from \"./processor\";\n\nexport class SortTailwindClassesProcessor extends Processor {\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.sortTailwindClasses(content);\n\t}\n\n\tasync postProcess(_content: string): Promise<any> {}\n\n\tprivate async sortTailwindClasses(content: string): Promise<any> {\n\t\tif (!this.formatter.options.sortTailwindcssClasses) {\n\t\t\treturn content;\n\t\t}\n\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(?<=\\s+(?!:)class\\s*=\\s*([\\\"\\']))(.*?)(?=\\1)/gis,\n\t\t\t(_match, _p1, p2) => {\n\t\t\t\tif (_.isEmpty(p2)) {\n\t\t\t\t\treturn p2;\n\t\t\t\t}\n\n\t\t\t\tif (this.formatter.options.tailwindcssConfigPath) {\n\t\t\t\t\tconst options = {\n\t\t\t\t\t\ttailwindConfigPath: this.formatter.options.tailwindcssConfigPath,\n\t\t\t\t\t};\n\t\t\t\t\treturn sortClasses(p2, options);\n\t\t\t\t}\n\n\t\t\t\tif (this.formatter.options.tailwindcssConfig) {\n\t\t\t\t\tconst options: any = {\n\t\t\t\t\t\ttailwindConfig: this.formatter.options.tailwindcssConfig,\n\t\t\t\t\t};\n\t\t\t\t\treturn sortClasses(p2, options);\n\t\t\t\t}\n\n\t\t\t\treturn sortClasses(p2);\n\t\t\t},\n\t\t);\n\t}\n}\n", "import _ from \"lodash\";\nimport { unbalancedStartTokens } from \"src/indent\";\nimport { Processor } from \"./processor\";\n\nexport class UnbalancedDirectiveProcessor extends Processor {\n\tprivate unbalancedDirectives: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveUnbalancedDirective(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreUnbalancedDirective(content);\n\t}\n\n\tprivate async preserveUnbalancedDirective(content: any): Promise<any> {\n\t\tconst regex = new RegExp(\n\t\t\t`((${unbalancedStartTokens.join(\n\t\t\t\t\"|\",\n\t\t\t)})(?!.*?\\\\2)(?:\\\\s|\\\\(.*?\\\\)))+(?=.*?@endif)`,\n\t\t\t\"gis\",\n\t\t);\n\n\t\tlet replaced: string = _.replace(\n\t\t\tcontent,\n\t\t\tregex,\n\t\t\t(_match: string, p1: string) => `${this.storeUnbalancedDirective(p1)}`,\n\t\t);\n\n\t\tif (regex.test(replaced)) {\n\t\t\treplaced = await this.preserveUnbalancedDirective(replaced);\n\t\t}\n\n\t\treturn replaced;\n\t}\n\n\tprivate async restoreUnbalancedDirective(content: string): Promise<any> {\n\t\treturn new Promise((resolve) => resolve(content)).then((res: any) =>\n\t\t\t_.replace(\n\t\t\t\tres,\n\t\t\t\t/@if \\(unbalanced___(\\d+)___\\)/gms,\n\t\t\t\t(_match: any, p1: any) => {\n\t\t\t\t\tconst matched = this.unbalancedDirectives[p1];\n\t\t\t\t\treturn matched;\n\t\t\t\t},\n\t\t\t),\n\t\t);\n\t}\n\n\tstoreUnbalancedDirective(value: string) {\n\t\treturn this.getUnbalancedDirectivePlaceholder(\n\t\t\t(this.unbalancedDirectives.push(value) - 1).toString(),\n\t\t);\n\t}\n\n\tgetUnbalancedDirectivePlaceholder(replace: string) {\n\t\treturn _.replace(\"@if (unbalanced___#___)\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class XDataProcessor extends Processor {\n\tprivate xData: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveXData(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreXData(content);\n\t}\n\n\tprivate async preserveXData(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(\\s*)x-data=\"(.*?)\"(\\s*)/gs,\n\t\t\t(_match: any, p1: any, p2: any, p3: any) =>\n\t\t\t\t`${p1}x-data=\"${this.storeXData(p2)}\"${p3}`,\n\t\t);\n\t}\n\n\tprivate async restoreXData(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getXDataPlaceholder(\"(\\\\d+)\")}`, \"gm\"),\n\t\t\t(_match: any, p1: any) => {\n\t\t\t\tconst placeholder = this.getXDataPlaceholder(p1.toString());\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst lines = util.formatJS(this.xData[p1]).split(\"\\n\");\n\n\t\t\t\tconst indentLevel =\n\t\t\t\t\tindent.amount / (this.formatter.indentCharacter === \"\\t\" ? 4 : 1);\n\n\t\t\t\tconst firstLine = lines[0];\n\t\t\t\tconst prefix = this.formatter.indentCharacter.repeat(\n\t\t\t\t\tindentLevel < 0 ? 0 : indentLevel,\n\t\t\t\t);\n\t\t\t\tconst offsettedLines = lines.map((line) => prefix + line);\n\t\t\t\toffsettedLines[0] = firstLine;\n\t\t\t\treturn `${offsettedLines.join(\"\\n\")}`;\n\t\t\t},\n\t\t);\n\t}\n\n\tstoreXData(value: string) {\n\t\tconst index = this.xData.push(value) - 1;\n\t\treturn this.getXDataPlaceholder(index);\n\t}\n\n\tgetXDataPlaceholder(replace: any) {\n\t\treturn _.replace(\"___x_data_#___\", \"#\", replace);\n\t}\n}\n", "import detectIndent from \"detect-indent\";\nimport _ from \"lodash\";\nimport * as util from \"../util\";\nimport { Processor } from \"./processor\";\n\nexport class XInitProcessor extends Processor {\n\tprivate xInit: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveXInit(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreXInit(content);\n\t}\n\n\tprivate async preserveXInit(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(\\s*)x-init=\"(.*?)\"(\\s*)/gs,\n\t\t\t(_match: any, p1: any, p2: any, p3: any) =>\n\t\t\t\t`${p1}x-init=\"${this.storeXInit(p2)}\"${p3}`,\n\t\t);\n\t}\n\n\tprivate async restoreXInit(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\tnew RegExp(`${this.getXInitPlaceholder(\"(\\\\d+)\")}`, \"gm\"),\n\t\t\t(_match: any, p1: number) => {\n\t\t\t\tconst placeholder = this.getXInitPlaceholder(p1.toString());\n\t\t\t\tconst matchedLine = content.match(\n\t\t\t\t\tnew RegExp(`^(.*?)${placeholder}`, \"gmi\"),\n\t\t\t\t) ?? [\"\"];\n\t\t\t\tconst indent = detectIndent(matchedLine[0]);\n\n\t\t\t\tconst lines = util.formatJS(this.xInit[p1]).split(\"\\n\");\n\n\t\t\t\tconst indentLevel =\n\t\t\t\t\tindent.amount / (this.formatter.indentCharacter === \"\\t\" ? 4 : 1);\n\n\t\t\t\tconst firstLine = lines[0];\n\t\t\t\tconst prefix = this.formatter.indentCharacter.repeat(\n\t\t\t\t\tindentLevel < 0 ? 0 : indentLevel,\n\t\t\t\t);\n\t\t\t\tconst offsettedLines = lines.map((line) => prefix + line);\n\t\t\t\toffsettedLines[0] = firstLine;\n\t\t\t\treturn `${offsettedLines.join(\"\\n\")}`;\n\t\t\t},\n\t\t);\n\t}\n\n\tstoreXInit(value: string) {\n\t\tconst index = this.xInit.push(value) - 1;\n\t\treturn this.getXInitPlaceholder(index);\n\t}\n\n\tgetXInitPlaceholder(replace: any) {\n\t\treturn _.replace(\"___x_init_#___\", \"#\", replace);\n\t}\n}\n", "import _ from \"lodash\";\nimport { Processor } from \"./processor\";\n\nexport class XslotProcessor extends Processor {\n\tprivate xSlot: string[] = [];\n\n\tasync preProcess(content: string): Promise<any> {\n\t\treturn await this.preserveXslot(content);\n\t}\n\n\tasync postProcess(content: string): Promise<any> {\n\t\treturn await this.restoreXslot(content);\n\t}\n\n\tprivate async preserveXslot(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/(?<=<\\/?)(x-slot:[\\w_\\\\-]+)(?=(?:[^>]*?[^?])?>)/gm,\n\t\t\t(match: string) => this.storeXslot(match),\n\t\t);\n\t}\n\n\tprivate async restoreXslot(content: string): Promise<any> {\n\t\treturn _.replace(\n\t\t\tcontent,\n\t\t\t/x-slot\\s*--___(\\d+)___--/gms,\n\t\t\t(_match: string, p1: number) => this.xSlot[p1],\n\t\t).replace(/(?<=<x-slot:[\\w\\_\\-]*)\\s+(?=\\/?>)/gm, () => \"\");\n\t}\n\n\tstoreXslot(value: string) {\n\t\treturn this.getXslotPlaceholder((this.xSlot.push(value) - 1).toString());\n\t}\n\n\tgetXslotPlaceholder(replace: any) {\n\t\treturn _.replace(\"x-slot --___#___--\", \"#\", replace);\n\t}\n}\n", "import type Formatter from \"./formatter\";\nimport { AdjustSpacesProcessor } from \"./processors/adjustSpacesProcessor\";\nimport { BladeBraceProcessor } from \"./processors/bladeBraceProcessor\";\nimport { BladeCommentProcessor } from \"./processors/bladeCommentProcessor\";\nimport { BladeDirectiveInScriptsProcessor } from \"./processors/bladeDirectiveInScriptsProcessor\";\nimport { BladeDirectiveInStylesProcessor } from \"./processors/bladeDirectiveInStylesProcessor\";\nimport { BreakLineBeforeAndAfterDirectiveProcessor } from \"./processors/breakLineBeforeAndAfterDirectiveProcessor\";\nimport { ComponentAttributeProcessor } from \"./processors/componentAttributeProcessor\";\nimport { ConditionsProcessor } from \"./processors/conditionsProcessor\";\nimport { CurlyBraceForJSProcessor } from \"./processors/curlyBraceForJSProcessor\";\nimport { CustomDirectiveProcessor } from \"./processors/customDirectiveProcessor\";\nimport { EscapedBladeDirectiveProcessor } from \"./processors/escapedBladeDirectiveProcessor\";\nimport { FormatAsPhpProcessor } from \"./processors/fomatAsPhpProcessor\";\nimport { FormatAsBladeProcessor } from \"./processors/formatAsBladeProcessor\";\nimport { FormatAsHtmlProcessor } from \"./processors/formatAsHtmlProcessor\";\nimport { HtmlAttributesProcessor } from \"./processors/htmlAttributesProcessor\";\nimport { HtmlTagsProcessor } from \"./processors/htmlTagsProcessor\";\nimport { IgnoredLinesProcessor } from \"./processors/ignoredLinesProcessor\";\nimport { InlineDirectiveProcessor } from \"./processors/inlineDirectiveProcessor\";\nimport { InlinePhpDirectiveProcessor } from \"./processors/inlinePhpDirectiveProcessor\";\nimport { NonnativeScriptsProcessor } from \"./processors/nonnativeScriptsProcessor\";\nimport { PhpBlockProcessor } from \"./processors/phpBlockProcessor\";\nimport type { Processor } from \"./processors/processor\";\nimport { PropsProcessor } from \"./processors/propsProcessor\";\nimport { RawBladeBraceProcessor } from \"./processors/rawBladeBraceProcessor\";\nimport { RawPhpTagProcessor } from \"./processors/rawPhpTagProcessor\";\nimport { ScriptsProcessor } from \"./processors/scriptsProcessor\";\nimport { ShorthandBindingProcessor } from \"./processors/shorthandBindingProcessor\";\nimport { SortHtmlAttributesProcessor } from \"./processors/sortHtmlAttributesProcessor\";\nimport { SortTailwindClassesProcessor } from \"./processors/sortTailwindClassesProcessor\";\nimport { UnbalancedDirectiveProcessor } from \"./processors/unbalancedDirectiveProcessor\";\nimport { XDataProcessor } from \"./processors/xdataProcessor\";\nimport { XInitProcessor } from \"./processors/xinitProcessor\";\nimport { XslotProcessor } from \"./processors/xslotProcessor\";\n\nexport class FormatContentPipeline {\n\tprivate processors: Processor[];\n\n\tprivate preProcessors: (typeof Processor)[] = [\n\t\tIgnoredLinesProcessor,\n\t\tNonnativeScriptsProcessor,\n\t\tCurlyBraceForJSProcessor,\n\t\tRawPhpTagProcessor,\n\t\tEscapedBladeDirectiveProcessor,\n\t\tFormatAsPhpProcessor,\n\t\tBladeCommentProcessor,\n\t\tBladeBraceProcessor,\n\t\tRawBladeBraceProcessor,\n\t\tConditionsProcessor,\n\t\tPropsProcessor,\n\t\tInlinePhpDirectiveProcessor,\n\t\tInlineDirectiveProcessor,\n\t\tBladeDirectiveInScriptsProcessor,\n\t\tBladeDirectiveInStylesProcessor,\n\t\tCustomDirectiveProcessor,\n\t\tUnbalancedDirectiveProcessor,\n\t\tBreakLineBeforeAndAfterDirectiveProcessor,\n\t\tScriptsProcessor,\n\t\tSortTailwindClassesProcessor,\n\t\tXInitProcessor,\n\t\tXDataProcessor,\n\t\tPhpBlockProcessor,\n\t\tSortHtmlAttributesProcessor,\n\t\tHtmlAttributesProcessor,\n\t\tComponentAttributeProcessor,\n\t\tShorthandBindingProcessor,\n\t\tXslotProcessor,\n\t\tHtmlTagsProcessor,\n\t\tFormatAsHtmlProcessor,\n\t\tFormatAsBladeProcessor,\n\t];\n\n\tprivate postProcessors: (typeof Processor)[] = [\n\t\tHtmlTagsProcessor,\n\t\tXslotProcessor,\n\t\tShorthandBindingProcessor,\n\t\tComponentAttributeProcessor,\n\t\tHtmlAttributesProcessor,\n\t\tPhpBlockProcessor,\n\t\tPropsProcessor,\n\t\tXDataProcessor,\n\t\tXInitProcessor,\n\t\tScriptsProcessor,\n\t\tUnbalancedDirectiveProcessor,\n\t\tCustomDirectiveProcessor,\n\t\tBladeDirectiveInStylesProcessor,\n\t\tBladeDirectiveInScriptsProcessor,\n\t\tInlineDirectiveProcessor,\n\t\tInlinePhpDirectiveProcessor,\n\t\tConditionsProcessor,\n\t\tRawBladeBraceProcessor,\n\t\tBladeBraceProcessor,\n\t\tBladeCommentProcessor,\n\t\tEscapedBladeDirectiveProcessor,\n\t\tRawPhpTagProcessor,\n\t\tCurlyBraceForJSProcessor,\n\t\tNonnativeScriptsProcessor,\n\t\tIgnoredLinesProcessor,\n\t\tAdjustSpacesProcessor,\n\t];\n\n\tconstructor(private formatter: Formatter) {\n\t\tthis.processors = [\n\t\t\tnew IgnoredLinesProcessor(formatter),\n\t\t\tnew NonnativeScriptsProcessor(formatter),\n\t\t\tnew CurlyBraceForJSProcessor(formatter),\n\t\t\tnew RawPhpTagProcessor(formatter),\n\t\t\tnew EscapedBladeDirectiveProcessor(formatter),\n\t\t\tnew FormatAsPhpProcessor(formatter),\n\t\t\tnew BladeCommentProcessor(formatter),\n\t\t\tnew BladeBraceProcessor(formatter),\n\t\t\tnew RawBladeBraceProcessor(formatter),\n\t\t\tnew ConditionsProcessor(formatter),\n\t\t\tnew PropsProcessor(formatter),\n\t\t\tnew InlinePhpDirectiveProcessor(formatter),\n\t\t\tnew InlineDirectiveProcessor(formatter),\n\t\t\tnew BladeDirectiveInScriptsProcessor(formatter),\n\t\t\tnew BladeDirectiveInStylesProcessor(formatter),\n\t\t\tnew CustomDirectiveProcessor(formatter),\n\t\t\tnew UnbalancedDirectiveProcessor(formatter),\n\t\t\tnew BreakLineBeforeAndAfterDirectiveProcessor(formatter),\n\t\t\tnew ScriptsProcessor(formatter),\n\t\t\tnew SortTailwindClassesProcessor(formatter),\n\t\t\tnew XInitProcessor(formatter),\n\t\t\tnew XDataProcessor(formatter),\n\t\t\tnew PhpBlockProcessor(formatter),\n\t\t\tnew SortHtmlAttributesProcessor(formatter),\n\t\t\tnew HtmlAttributesProcessor(formatter),\n\t\t\tnew ComponentAttributeProcessor(formatter),\n\t\t\tnew ShorthandBindingProcessor(formatter),\n\t\t\tnew XslotProcessor(formatter),\n\t\t\tnew HtmlTagsProcessor(formatter),\n\t\t\tnew FormatAsHtmlProcessor(formatter),\n\t\t\tnew FormatAsBladeProcessor(formatter),\n\t\t\tnew AdjustSpacesProcessor(formatter),\n\t\t];\n\t}\n\n\tasync formatContent(content: any): Promise<any> {\n\t\tlet target = await Promise.resolve(content);\n\n\t\t// pre process content\n\t\tconst preProcessors = this.processors.filter((processor) =>\n\t\t\tthis.preProcessors.includes(processor.constructor as typeof Processor),\n\t\t);\n\n\t\tfor (const processor of preProcessors) {\n\t\t\ttarget = await processor.preProcess(target);\n\t\t}\n\n\t\t// post process content\n\t\tconst postProcessors = this.processors.filter((processor) =>\n\t\t\tthis.postProcessors.includes(processor.constructor as typeof Processor),\n\t\t);\n\t\tpostProcessors.sort((a, b) => {\n\t\t\treturn (\n\t\t\t\tthis.postProcessors.indexOf(a.constructor as typeof Processor) -\n\t\t\t\tthis.postProcessors.indexOf(b.constructor as typeof Processor)\n\t\t\t);\n\t\t});\n\n\t\tfor (const processor of postProcessors) {\n\t\t\ttarget = await processor.postProcess(target);\n\t\t}\n\n\t\treturn target;\n\t}\n}\n", "import fs from \"node:fs\";\nimport path from \"node:path\";\nimport Ajv, { type JSONSchemaType } from \"ajv\";\nimport findConfig from \"find-config\";\n\nconst ajv = new Ajv();\n\nexport type WrapAttributes =\n\t| \"auto\"\n\t| \"force\"\n\t| \"force-aligned\"\n\t| \"force-expand-multiline\"\n\t| \"aligned-multiple\"\n\t| \"preserve\"\n\t| \"preserve-aligned\";\n\nexport type SortHtmlAttributes =\n\t| \"none\"\n\t| \"alphabetical\"\n\t| \"code-guide\"\n\t| \"idiomatic\"\n\t| \"vuejs\"\n\t| \"custom\";\n\nexport type EndOfLine = \"LF\" | \"CRLF\";\n\nexport interface RuntimeConfig {\n\tindentSize?: number;\n\twrapLineLength?: number;\n\twrapAttributes?: WrapAttributes;\n\twrapAttributesMinAttrs?: number;\n\tindentInnerHtml?: boolean;\n\tendWithNewline?: boolean;\n\tendOfLine?: EndOfLine;\n\tuseTabs?: boolean;\n\tsortTailwindcssClasses?: boolean;\n\ttailwindcssConfigPath?: string;\n\tsortHtmlAttributes?: SortHtmlAttributes;\n\tcustomHtmlAttributesOrder?: string[] | string;\n\tnoMultipleEmptyLines?: boolean;\n\tnoPhpSyntaxCheck?: boolean;\n\tnoSingleQuote?: boolean;\n\tnoTrailingCommaPhp?: boolean;\n\textraLiners?: string[];\n\tcomponentPrefix?: string[];\n}\n\nconst defaultConfigNames = [\".bladeformatterrc.json\", \".bladeformatterrc\"];\n\nexport function findRuntimeConfig(filePath: string): string | null {\n\tfor (let i = 0; i < defaultConfigNames.length; i += 1) {\n\t\tconst result: string | null = findConfig(defaultConfigNames[i], {\n\t\t\tcwd: path.dirname(filePath),\n\t\t\thome: false,\n\t\t});\n\n\t\tif (result) {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\treturn null;\n}\n\nexport async function readRuntimeConfig(\n\tfilePath: string | null,\n): Promise<RuntimeConfig | undefined> {\n\tif (filePath === null) {\n\t\treturn undefined;\n\t}\n\n\tconst options = JSON.parse((await fs.promises.readFile(filePath)).toString());\n\n\tconst schema: JSONSchemaType<RuntimeConfig> = {\n\t\ttype: \"object\",\n\t\tproperties: {\n\t\t\tindentSize: { type: \"integer\", nullable: true },\n\t\t\twrapLineLength: { type: \"integer\", nullable: true },\n\t\t\twrapAttributes: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tenum: [\n\t\t\t\t\t\"auto\",\n\t\t\t\t\t\"force\",\n\t\t\t\t\t\"force-aligned\",\n\t\t\t\t\t\"force-expand-multiline\",\n\t\t\t\t\t\"aligned-multiple\",\n\t\t\t\t\t\"preserve\",\n\t\t\t\t\t\"preserve-aligned\",\n\t\t\t\t],\n\t\t\t\tnullable: true,\n\t\t\t},\n\t\t\twrapAttributesMinAttrs: { type: \"integer\", nullable: true, default: 2 },\n\t\t\tindentInnerHtml: { type: \"boolean\", nullable: true },\n\t\t\tendWithNewline: { type: \"boolean\", nullable: true },\n\t\t\tendOfLine: { type: \"string\", enum: [\"LF\", \"CRLF\"], nullable: true },\n\t\t\tuseTabs: { type: \"boolean\", nullable: true },\n\t\t\tsortTailwindcssClasses: { type: \"boolean\", nullable: true },\n\t\t\ttailwindcssConfigPath: { type: \"string\", nullable: true },\n\t\t\tsortHtmlAttributes: {\n\t\t\t\ttype: \"string\",\n\t\t\t\tenum: [\n\t\t\t\t\t\"none\",\n\t\t\t\t\t\"alphabetical\",\n\t\t\t\t\t\"code-guide\",\n\t\t\t\t\t\"idiomatic\",\n\t\t\t\t\t\"vuejs\",\n\t\t\t\t\t\"custom\",\n\t\t\t\t],\n\t\t\t\tnullable: true,\n\t\t\t},\n\t\t\tcustomHtmlAttributesOrder: {\n\t\t\t\ttype: \"array\",\n\t\t\t\tnullable: true,\n\t\t\t\titems: { type: \"string\" },\n\t\t\t\tdefault: [],\n\t\t\t},\n\t\t\tnoMultipleEmptyLines: { type: \"boolean\", nullable: true },\n\t\t\tnoPhpSyntaxCheck: { type: \"boolean\", nullable: true },\n\t\t\tnoSingleQuote: { type: \"boolean\", nullable: true },\n\t\t\tnoTrailingCommaPhp: { type: \"boolean\", nullable: true },\n\t\t\textraLiners: {\n\t\t\t\ttype: \"array\",\n\t\t\t\tnullable: true,\n\t\t\t\titems: { type: \"string\" },\n\t\t\t\tdefault: [\"head\", \"body\", \"/html\"],\n\t\t\t},\n\t\t\tcomponentPrefix: {\n\t\t\t\ttype: \"array\",\n\t\t\t\tnullable: true,\n\t\t\t\titems: { type: \"string\" },\n\t\t\t\tdefault: [\"x-\", \"livewire:\"],\n\t\t\t},\n\t\t},\n\t\tadditionalProperties: true,\n\t};\n\tconst validate = ajv.compile(schema);\n\n\tif (!validate(options)) {\n\t\tthrow validate;\n\t}\n\n\treturn options;\n}\n"],
  "mappings": "8kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAAA,IAAAI,GAAkB,sBAClBC,GAAmB,8BACnBC,GAAc,uBACdC,GAAyB,4BACzBC,GAAkB,sBAElBC,GAA+B,cAC/BC,GAAe,mBAEfC,GAAwB,yBCRtB,IAAAC,GAAQ,kBASR,IAAAC,GAAW,SCVb,IAAAC,GAAe,mBACfC,EAAqB,qBACrBC,EAAoB,wBACpBC,GAA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,GAAUA,EAAM,UAAU,CAAC,CAC7B,EAEaC,EAAkB,CAC9B,YACA,eACA,WACA,WACA,aACA,aACA,eACA,QACA,QACA,kBACA,cACA,WACA,YACA,UACA,aACA,YACA,YACA,YACA,iBACA,kBACA,aACA,aACA,UACA,WACA,cACA,iBACA,kBACA,iBACA,oBACA,SACA,iBACA,UACA,YACA,WACA,cACA,cACA,UACA,UACA,gBACA,cACA,qBACD,EAEaC,EAAmB,CAC/B,WACA,aACA,YACA,UACA,cACA,cACA,WACA,QACA,sBACD,EAGaC,GAAgC,CAC5C,WAAY,EACZ,QAAS,EACT,WAAY,EACZ,QAAS,CACV,EAEaC,GAAkC,CAAC,WAAY,KAAK,EAEpDC,GAA0B,CAAC,QAAQ,EAEnCC,GAA0B,CAAC,UAAU,EAErCC,EAAwB,CACpC,WACA,MACA,OACA,WACA,SACA,kBACA,OACD,EAEaC,GAAsB,CAClC,cACA,SACA,cACA,UACA,YACA,QACD,EAEaC,GAAsB,CAClC,UACA,SACA,WACA,YACA,WACA,OACD,EAEaC,EAAuB,CACnC,OACA,QACA,MACA,YACA,WACA,YACA,OACA,WACA,aACA,eACA,iBACA,gBACA,UACA,SACA,SACA,QACD,EAEaC,GAAoB,CAChC,MACA,SACA,QACA,SACA,SACA,UACA,aACA,cACA,SACD,EAEaC,EAAwB,CAAC,aAAa,EAEtCC,GAAkB,CAC9B,WACA,iBACA,iBACA,aACA,uBACA,UACA,aACA,SACA,aACA,QACA,YACA,WACD,EAEO,SAASC,GACfC,EACAC,EACC,CACD,OACC,GAAAjB,QAAE,OAAOgB,EAAmB,OAASE,GAAqB,CACzD,IAAMjB,EAAQgB,EACZ,UAAUC,EAAY,WAAYA,EAAY,QAAQ,EACtD,KAAK,EAEP,OACC,GAAAlB,QAAE,SAASF,EAAmBG,CAAK,GACnC,GAAAD,QAAE,SAASE,EAAiBD,CAAK,CAEnC,CAAC,EAAE,QAAU,CAEf,CCnNA,IAAAkB,GAA+B,cAC/BC,GAAiB,qBACj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import_chalk", "import_concat_stream", "import_lodash", "import_vscode_oniguruma", "import_yargs", "import_node_fs", "import_node_os", "import_helpers", "name", "version", "import_node_fs", "import_node_path", "import_node_process", "import_node_util", "import_chalk", "import_find_config", "import_glob", "import_ignore", "import_lodash", "FormatError", "import_detect_indent", "import_lodash", "vscodeTmModule", "constants", "constants_default", "import_lodash", "nestedParenthesisRegex", "Processor", "formatter", "AdjustSpacesProcessor", "Processor", "_content", "content", "directivesRequiredSpace", "_", "nestedParenthesisRegex", "_matched", "p1", "p2", "import_detect_indent", "import_lodash", "import_string_replace_async", "import_node_fs", "import_node_os", "import_standalone", "import_chalk", "import_detect_indent", "import_js_beautify", "import_lodash", "prettier", "import_string_replace_async", "import_lodash", "directivePrefix", "indentStartTokens", "indentStartTokensWithoutPrefix", "_", "token", "indentEndTokens", "indentElseTokens", "optionalStartWithoutEndTokens", "tokenForIndentStartOrElseTokens", "indentStartOrElseTokens", "indentStartAndEndTokens", "phpKeywordStartTokens", "phpKeywordEndTokens", "inlinePhpDirectives", "inlineFunctionTokens", "conditionalTokens", "unbalancedStartTokens", "cssAtRuleTokens", "hasStartAndEndToken", "tokenizeLineResult", "originalLine", "tokenStruct", "import_node_fs", "import_node_path", "import_lodash", "vscodeOniguruma", "VscodeTextmate", "vsctm", "oniguruma", "_a", "vscodeOniguruma", "wasm", "fs", "scopeName", "readFile", "path", "content", "sources", "str", "splitedLines", "grammar", "_", "line", "optional", "obj", "chain", "_", "readFile", "path", "resolve", "reject", "fs", "error", "data", "splitByLines", "content", "printWidthForInline", "defaultFormatPhpOption", "formatStringAsPhp", "params", "_a", "options", "adjust", "printWidth", "phpPlugin", "errorHasPhpVersionError", "formatRawStringAsPhp", "_match", "p1", "getArgumentsCount", "expression", "code", "ast", "printDiffs", "diffs", "_", "diff", "chalk", "generateDiff", "path", "originalLines", "formattedLines", "originalLine", "index", "prettifyPhpContentWithUnescapedTags", "content", "options", "directives", "indentStartTokens", "directiveRegexes", "nestedParenthesisRegex", "resolve", "res", "replaceAsync", "_match", "p1", "p2", "p3", "formatStringAsPhp", "_match2", "j1", "j2", "j3", "formatAsPhp", "content", "options", "prettifyPhpContentWithUnescapedTags", "preserveDirectives", "content", "startTokens", "_", "phpKeywordStartTokens", "endTokens", "phpKeywordEndTokens", "resolve", "res", "regex", "nestedParenthesisRegex", "_match", "p1", "p2", "p3", "revertDirectives", "content", "resolve", "res", "_", "_match", "p1", "p2", "escapeTags", "checkResult", "formatted", "escapeReplacementString", "string", "getEndOfLine", "endOfLine", "os", "isInline", "content", "_", "indentRawPhpBlock", "indent", "formatter", "indentLevel", "prefixSpaces", "lines", "line", "index", "indentPhpComment", "withoutCommentLine", "formatExpressionInsideBladeDirective", "matchedExpression", "wrapLength", "formatTarget", "formattedExpression", "formatRawStringAsPhp", "inside", "_match", "p1", "indentBladeDirectiveBlock", "prefixForEnd", "isMultilineStatement", "rawBlock", "formatStringAsPhp", "indentRawBlock", "prefix", "indentComponentAttribute", "detectIndent", "formatAsHtml", "data", "options", "optional", "promise", "resolve", "preserveDirectives", "preserved", "beautify", "revertDirectives", "formatAsBlade", "splittedLines", "splitByLines", "vsctmModule", "VscodeTextmate", "grammar", "tokenizedLines", "err", "formatJS", "jsCode", "code", "tempVarStore", "directive", "m", "getPlaceholder", "attribute", "replace", "length", "template", "gap", "BladeBraceProcessor", "Processor", "content", "_", "_match", "p1", "resolve", "res", "replaceAsync", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "bladeBrace", "isInline", "formatRawStringAsPhp", "printWidthForInline", "line", "indentRawPhpBlock", "value", "length", "index", "replace", "gap", "import_lodash", "BladeCommentProcessor", "Processor", "content", "_", "match", "resolve", "res", "_match", "p1", "value", "replace", "import_aigle", "import_detect_indent", "import_lodash", "import_string_replace_async", "BladeDirectiveInScriptsProcessor", "Processor", "content", "result", "_", "match", "targetTokens", "indentStartTokens", "inlineFunctionTokens", "inlineFunctionDirectives", "inlineFunctionRegex", "nestedParenthesisRegex", "endTokens", "indentEndTokens", "formatted", "matched", "formatRawStringAsPhp", "printWidthForInline", "indentElseTokens", "indentStartOrElseTokens", "_matched", "p1", "negativeLookAhead", "inlineNegativeLookAhead", "phpKeywordStartTokens", "unbalancedStartTokens", "inlineRegex", "regex", "_p1", "p2", "_p3", "p4", "_p5", "_p6", "p7", "beginStr", "elseStr", "endStr", "_match", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "indentBladeDirectiveBlock", "replaceAsync", "rawBlock", "isInline", "isMultilineStatement", "formatStringAsPhp", "_q1", "q2", "preserved", "indented", "indentRawBlock", "group1", "group2", "match2", "p3", "_m", "indentComponentAttribute", "value", "replace", "matchedExpression", "wrapLength", "formatTarget", "formattedExpression", "inside", "indentRawPhpBlock", "index", "directives", "Aigle", "formattedAsHtml", "formatAsHtml", "formatAsBlade", "import_lodash", "BladeDirectiveInStylesProcessor", "Processor", "content", "_", "inside", "result", "inlineRegex", "cssAtRuleTokens", "nestedParenthesisRegex", "match", "customStartRegex", "startRegex", "indentStartTokens", "elseRegex", "indentElseTokens", "endRegex", "indentEndTokens", "_match", "p1", "value", "replace", "import_lodash", "import_xregexp", "BreakLineBeforeAndAfterDirectiveProcessor", "Processor", "content", "_content", "formattedContent", "_", "indentStartTokens", "nestedParenthesisRegex", "match", "indentEndTokens", "unbalancedConditions", "indentElseTokens", "unbalancedEchos", "directive", "directives", "x", "recursivelyMatched", "XRegExp", "matched", "escapeReplacementString", "innerRegex", "replaced", "_match", "p1", "p2", "p3", "import_detect_indent", "import_js_beautify", "import_lodash", "import_string_replace_async", "ComponentAttributeProcessor", "Processor", "content", "prefixes", "regex", "_", "match", "replaceAsync", "_match", "p1", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "matched", "formatted", "p2", "p3", "p4", "beautify", "isInline", "formatRawStringAsPhp", "indentComponentAttribute", "value", "index", "replace", "import_detect_indent", "import_lodash", "import_string_replace_async", "ConditionsProcessor", "Processor", "content", "regex", "conditionalTokens", "nestedParenthesisRegex", "_", "_match", "p1", "p2", "p3", "resolve", "res", "replaceAsync", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "matched", "formatExpressionInsideBladeDirective", "value", "replace", "import_js_beautify", "import_lodash", "CurlyBraceForJSProcessor", "Processor", "content", "_", "_match", "p1", "value", "replace", "beautify", "import_detect_indent", "import_lodash", "import_string_replace_async", "CustomDirectiveProcessor", "Processor", "content", "negativeLookAhead", "_", "indentStartTokens", "indentEndTokens", "indentElseTokens", "inlineNegativeLookAhead", "inlineFunctionTokens", "phpKeywordStartTokens", "unbalancedStartTokens", "cssAtRuleTokens", "inlineRegex", "nestedParenthesisRegex", "regex", "formatted", "match", "_p1", "p2", "_p3", "p4", "_p5", "_p6", "p7", "result", "beginStr", "elseStr", "data", "replaceAsync", "_match", "p1", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "matched", "match2", "p3", "formatRawStringAsPhp", "printWidthForInline", "_m", "indentComponentAttribute", "value", "replace", "import_lodash", "EscapedBladeDirectiveProcessor", "Processor", "content", "_", "match", "resolve", "res", "_match", "p1", "value", "replace", "FormatAsPhpProcessor", "Processor", "content", "formatAsPhp", "_content", "FormatAsBladeProcessor", "Processor", "content", "formatAsBlade", "_content", "import_js_beautify", "FormatAsHtmlProcessor", "Processor", "content", "_content", "options", "optional", "promise", "resolve", "preserveDirectives", "preserved", "beautify", "revertDirectives", "import_lodash", "HtmlAttributesProcessor", "Processor", "content", "_", "match", "_match", "p1", "value", "index", "replace", "length", "gap", "import_detect_indent", "import_js_beautify", "import_lodash", "HtmlTagsProcessor", "Processor", "content", "contentUnformatted", "_", "match", "_match", "p1", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "options", "optional", "matched", "openingTag", "beautify", "restofTag", "value", "replace", "isInline", "indentLevel", "prefixSpaces", "prefixForEnd", "lines", "indented", "line", "index", "import_lodash", "IgnoredLinesProcessor", "Processor", "content", "_", "_match", "p1", "p2", "match", "value", "replace", "import_lodash", "InlineDirectiveProcessor", "Processor", "content", "regex", "directivePrefix", "indentStartTokensWithoutPrefix", "replaced", "_", "_match", "p1", "p2", "p3", "p4", "p5", "p6", "p7", "resolve", "res", "value", "replace", "length", "gap", "import_detect_indent", "import_lodash", "import_string_replace_async", "InlinePhpDirectiveProcessor", "Processor", "content", "_", "inlineFunctionTokens", "nestedParenthesisRegex", "match", "resolve", "res", "replaceAsync", "_match", "p1", "_a", "matched", "placeholder", "matchedLine", "indent", "detectIndent", "formatRawStringAsPhp", "printWidthForInline", "inlinePhpDirectives", "token", "_match2", "p3", "p4", "wrapLength", "value", "replace", "matchedExpression", "formatTarget", "formattedExpression", "inside", "isInline", "indentRawPhpBlock", "import_lodash", "NonnativeScriptsProcessor", "Processor", "content", "_", "match", "value", "index", "_match", "p1", "replace", "import_detect_indent", "import_lodash", "splitByLines", "content", "isCommentedLine", "line", "isMultiline", "lines", "addPrefixToLine", "formatPhpComment", "comment", "nonCommentLineExists", "row", "trimmedLine", "import_string_replace_async", "PhpBlockProcessor", "Processor", "content", "_", "_match", "p1", "replaceAsync", "_a", "rawBlock", "placeholder", "matchedLine", "indent", "detectIndent", "isOnSingleLine", "isInline", "isMultipleStatements", "isMultilineStatement", "formatStringAsPhp", "indentLevel", "_matched", "_q1", "q2", "preserved", "indented", "indentRawBlock", "value", "replace", "match", "index", "formatted", "formatPhpComment", "indentPhpComment", "import_detect_indent", "import_lodash", "import_string_replace_async", "PropsProcessor", "Processor", "content", "_", "_match", "p1", "regex", "replaceAsync", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "formatted", "formatRawStringAsPhp", "indentRawPhpBlock", "value", "replace", "import_detect_indent", "import_lodash", "import_string_replace_async", "RawBladeBraceProcessor", "Processor", "content", "_", "_match", "p1", "resolve", "res", "replaceAsync", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "bladeBrace", "indentRawPhpBlock", "formatRawStringAsPhp", "value", "index", "replace", "import_detect_indent", "import_lodash", "import_string_replace_async", "RawPhpTagProcessor", "Processor", "content", "_", "match", "resolve", "res", "replaceAsync", "_match", "p1", "_a", "matched", "inlinedComment", "isInline", "placeholder", "matchedLine", "indent", "detectIndent", "result", "formatStringAsPhp", "preserved", "indentRawPhpBlock", "value", "index", "replace", "formatted", "formatPhpComment", "indentPhpComment", "import_detect_indent", "import_js_beautify", "import_lodash", "ScriptsProcessor", "Processor", "content", "_", "match", "resolve", "res", "_match", "p1", "_a", "script", "placeholder", "matchedLine", "indent", "detectIndent", "useTabs", "optional", "options", "beautify", "isInline", "indentLevel", "prefixSpaces", "prefixForEnd", "lines", "indented", "line", "index", "value", "replace", "import_detect_indent", "import_js_beautify", "import_lodash", "ShorthandBindingProcessor", "Processor", "content", "_", "match", "_match", "p1", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "matched", "formatted", "p2", "p3", "p4", "beautifyOpts", "isInline", "beautify", "indentComponentAttribute", "value", "index", "replace", "length", "gap", "import_html_attribute_sorter", "import_lodash", "SortHtmlAttributesProcessor", "Processor", "content", "_content", "_a", "strategy", "_", "regexes", "customRegexes", "import_tailwindcss_class_sorter", "import_lodash", "SortTailwindClassesProcessor", "Processor", "content", "_content", "_", "_match", "_p1", "p2", "options", "import_lodash", "UnbalancedDirectiveProcessor", "Processor", "content", "regex", "unbalancedStartTokens", "replaced", "_", "_match", "p1", "resolve", "res", "value", "replace", "import_detect_indent", "import_lodash", "XDataProcessor", "Processor", "content", "_", "_match", "p1", "p2", "p3", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "lines", "formatJS", "indentLevel", "firstLine", "prefix", "offsettedLines", "line", "value", "index", "replace", "import_detect_indent", "import_lodash", "XInitProcessor", "Processor", "content", "_", "_match", "p1", "p2", "p3", "_a", "placeholder", "matchedLine", "indent", "detectIndent", "lines", "formatJS", "indentLevel", "firstLine", "prefix", "offsettedLines", "line", "value", "index", "replace", "import_lodash", "XslotProcessor", "Processor", "content", "_", "match", "_match", "p1", "value", "replace", "FormatContentPipeline", "formatter", "IgnoredLinesProcessor", "NonnativeScriptsProcessor", "CurlyBraceForJSProcessor", "RawPhpTagProcessor", "EscapedBladeDirectiveProcessor", "FormatAsPhpProcessor", "BladeCommentProcessor", "BladeBraceProcessor", "RawBladeBraceProcessor", "ConditionsProcessor", "PropsProcessor", "InlinePhpDirectiveProcessor", "InlineDirectiveProcessor", "BladeDirectiveInScriptsProcessor", "BladeDirectiveInStylesProcessor", "CustomDirectiveProcessor", "UnbalancedDirectiveProcessor", "BreakLineBeforeAndAfterDirectiveProcessor", "ScriptsProcessor", "SortTailwindClassesProcessor", "XInitProcessor", "XDataProcessor", "PhpBlockProcessor", "SortHtmlAttributesProcessor", "HtmlAttributesProcessor", "ComponentAttributeProcessor", "ShorthandBindingProcessor", "XslotProcessor", "HtmlTagsProcessor", "FormatAsHtmlProcessor", "FormatAsBladeProcessor", "AdjustSpacesProcessor", "content", "target", "preProcessors", "processor", "postProcessors", "a", "b", "Formatter", "options", "constants_default", "optional", "vscodeTmModule", "getEndOfLine", "content", "target", "FormatContentPipeline", "checkResult", "splittedLines", "tokenizedLines", "i", "originalLine", "tokenizeLineResult", "token", "_", "phpKeywordStartTokens", "phpKeywordEndTokens", "indentStartAndEndTokens", "indentStartOrElseTokens", "tokenForIndentStartOrElseTokens", "indentStartTokens", "indentEndTokens", "indentElseTokens", "tokenStruct", "count", "inString", "stack", "unindentOn", "expression", "getArgumentsCount", "optionalStartWithoutEndTokens", "hasStartAndEndToken", "j", "whitespaces", "detectIndent", "formattedLine", "level", "import_node_fs", "import_node_path", "import_ajv", "import_find_config", "ajv", "Ajv", "defaultConfigNames", "findRuntimeConfig", "filePath", "i", "result", "findConfig", "path", "readRuntimeConfig", "options", "fs", "schema", "validate", "_BladeFormatter", "options", "paths", "_a", "content", "opts", "target", "nodepath", "process", "Formatter", "err", "FormatError", "filepath", "fs", "filePath", "configFilename", "workingDir", "configFilePath", "findConfig", "_", "configFile", "findRuntimeConfig", "readRuntimeConfig", "obj", "src", "error", "_b", "chalk", "nodeutil", "path", "REGEX_FILES_NOT_IN_CURRENT_DIR", "filesOutsideTargetDir", "filesUnderTargetDir", "filteredFiles", "ignore", "readFile", "data", "formatted", "originalContent", "originalLines", "splitByLines", "formattedLines", "diff", "generateDiff", "printDiffs", "BladeFormatter", "cli", "parsed", "yargs", "chalk", "name", "version", "os", "formats", "_", "format", "msg", "err", "wasm", "fs", "options", "concat", "text", "BladeFormatter", "result", "error"]
}
