@learnosity/lib-qti-converter 0.12.7 → 0.12.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/packages/cli/dist/{batchProcessors-DU1HwpHY.js → batchProcessors-CUJoQD8a.js} +3 -3
- package/packages/cli/dist/{batchProcessors-DU1HwpHY.js.map → batchProcessors-CUJoQD8a.js.map} +1 -1
- package/packages/cli/dist/batchWorker.js +1 -1
- package/packages/cli/dist/{create-prompt-DU9wLVhI.js → create-prompt-DyNnKXYU.js} +63 -53
- package/packages/cli/dist/create-prompt-DyNnKXYU.js.map +1 -0
- package/packages/cli/dist/{dist-DjpU2mIj.js → dist-D3v6G5F8.js} +6 -6
- package/packages/cli/dist/{dist-DjpU2mIj.js.map → dist-D3v6G5F8.js.map} +1 -1
- package/packages/cli/dist/{learnosityToQti-BSbH3jyx.js → learnosityToQti-CvfVQ6Kl.js} +4 -4
- package/packages/cli/dist/{learnosityToQti-BSbH3jyx.js.map → learnosityToQti-CvfVQ6Kl.js.map} +1 -1
- package/packages/cli/dist/{learnosityToQtiPackage-B0xRzYmy.js → learnosityToQtiPackage-CXMsJNQD.js} +7 -7
- package/packages/cli/dist/{learnosityToQtiPackage-B0xRzYmy.js.map → learnosityToQtiPackage-CXMsJNQD.js.map} +1 -1
- package/packages/cli/dist/main.js +5 -5
- package/packages/cli/dist/{nodeFileAccess-BkzSHCOh.js → nodeFileAccess-BhCoGDOi.js} +6 -3
- package/packages/cli/dist/{nodeFileAccess-BkzSHCOh.js.map → nodeFileAccess-BhCoGDOi.js.map} +1 -1
- package/packages/cli/dist/{pathUtils-B9yPTlVF.js → pathUtils-DmtCfutO.js} +26 -20
- package/packages/cli/dist/pathUtils-DmtCfutO.js.map +1 -0
- package/packages/cli/dist/{qtiPackageToLearnosity-C7JaaUDU.js → qtiPackageToLearnosity-FhfNr7gf.js} +5 -5
- package/packages/cli/dist/{qtiPackageToLearnosity-C7JaaUDU.js.map → qtiPackageToLearnosity-FhfNr7gf.js.map} +1 -1
- package/packages/cli/dist/{qtiToLearnosity-CYoG2aIX.js → qtiToLearnosity-5lQ5f3-t.js} +5 -5
- package/packages/cli/dist/{qtiToLearnosity-CYoG2aIX.js.map → qtiToLearnosity-5lQ5f3-t.js.map} +1 -1
- package/packages/cli/dist/{resolveOptions-CW80R2EQ.js → resolveOptions-lHxSyq9F.js} +5 -5
- package/packages/cli/dist/{resolveOptions-CW80R2EQ.js.map → resolveOptions-lHxSyq9F.js.map} +1 -1
- package/packages/cli/dist/{table-DjOn2Tsk.js → table-7b-8MN2z.js} +91 -65
- package/packages/cli/dist/table-7b-8MN2z.js.map +1 -0
- package/packages/core/dist/index.d.ts +184 -184
- package/packages/core/dist/index.js +90 -64
- package/packages/core/dist/node.d.ts +196 -196
- package/packages/core/dist/node.js +95 -66
- package/packages/cli/dist/create-prompt-DU9wLVhI.js.map +0 -1
- package/packages/cli/dist/pathUtils-B9yPTlVF.js.map +0 -1
- package/packages/cli/dist/table-DjOn2Tsk.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeFileAccess-BkzSHCOh.js","names":["containedPath"],"sources":["../../core/src/qti-to-learnosity/utils/passageResolver.ts","../../core/src/qti-to-learnosity/utils/lomFinder.ts","../../core/src/qti-to-learnosity/utils/imageDimensions.ts","../../core/src/qti-to-learnosity/nodeFileAccess.ts"],"sourcesContent":["/**\n * Passage HTML file resolver\n * Resolves and reads external HTML files referenced by <object> tags in QTI passages\n */\n\nimport { existsSync, readFileSync } from 'fs';\nimport { dirname, join, isAbsolute, resolve, relative, sep } from 'path';\n\n/**\n * Resolve `candidate` and confirm it stays inside `root`.\n *\n * The `data` attribute of an <object> tag comes from the QTI file being\n * converted, which is untrusted input. Without this check a crafted value such\n * as \"../../../../etc/passwd\" would let a QTI package read arbitrary files.\n *\n * @param candidate - Path to check (absolute or already joined)\n * @param root - Directory the path must stay within\n * @returns Absolute path if contained by root, undefined otherwise\n */\nfunction containedPath(candidate: string, root: string): string | undefined {\n // These two resolve() calls are the sanitiser, not a sink: normalising both\n // sides is what makes the relative() comparison below meaningful.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedRoot = resolve(root);\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedCandidate = resolve(candidate);\n const rel = relative(resolvedRoot, resolvedCandidate);\n\n // Empty means the candidate is the root itself; a leading \"..\" segment or an\n // absolute result means it escaped the root (e.g. a different drive).\n if (rel === '' || isAbsolute(rel) || rel.split(sep)[0] === '..') {\n return undefined;\n }\n\n return resolvedCandidate;\n}\n\n/**\n * Resolve and read a passage HTML file referenced by an <object> tag\n *\n * @param objectDataPath - The path from the object's data attribute (e.g., \"passages/passage.html\")\n * @param sourceFile - The absolute path to the source QTI XML file\n * @returns The HTML content of the passage file, or undefined if not found\n */\nexport function resolvePassageFile(\n objectDataPath: string,\n sourceFile?: string\n): string | undefined {\n if (!sourceFile || !objectDataPath) {\n return undefined;\n }\n\n // Get the directory containing the source XML file\n const sourceDir = dirname(sourceFile);\n\n // Passages sit either beside the item (passages/passage.html) or one level\n // up (items/item.xml -> ../passages/passage.html), so the parent directory\n // is the widest location a passage may legitimately be read from.\n const root = dirname(sourceDir);\n\n // Candidates, in priority order: relative to the source directory, then\n // relative to its parent. Absolute values are taken as-is. Each one is passed\n // through containedPath() below before it reaches the filesystem.\n const candidates: string[] = [];\n\n if (isAbsolute(objectDataPath)) {\n candidates.push(objectDataPath);\n } else {\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n candidates.push(join(sourceDir, objectDataPath));\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n candidates.push(join(root, objectDataPath));\n }\n\n for (const candidate of candidates) {\n // Every candidate is confined to `root` before it reaches the filesystem\n const passagePath = containedPath(candidate, root);\n\n if (!passagePath || !existsSync(passagePath)) {\n continue;\n }\n\n try {\n return readFileSync(passagePath, 'utf-8').replace(/^\\uFEFF/, '');\n } catch {\n // File exists but couldn't be read\n return undefined;\n }\n }\n\n return undefined;\n}\n\n","/**\n * LOM file discovery utility\n * Locates LOM metadata files for QTI items\n */\n\nimport { existsSync, readFileSync } from 'fs';\nimport { dirname, basename, join } from 'path';\n\n/**\n * Find LOM file for a given QTI item file path\n * Checks for:\n * - .../items/<id>.xml → .../metadata/<id>.lom.xml\n * - <dir>/<id>.xml → <dir>/metadata/<id>.lom.xml\n * - <dir>/<id>.xml → <dir>/../metadata/<id>.lom.xml\n *\n * @param itemPath - Absolute path to the QTI item XML file\n * @returns LOM XML content if found, undefined otherwise\n */\nexport function findAndReadLomFile(itemPath: string): string | undefined {\n const dir = dirname(itemPath);\n const filename = basename(itemPath);\n const itemId = filename.replace(/\\.xml$/i, '');\n\n // basename() strips every directory separator, so lomFilename cannot carry\n // traversal segments. The joins below stay within dir or its parent, both of\n // which are derived from the item path the operator asked us to convert.\n const lomFilename = `${itemId}.lom.xml`;\n\n // Pattern 1: .../items/<id>.xml → .../metadata/<id>.lom.xml (sibling folder)\n if (dir.endsWith('/items') || dir.endsWith('\\\\items')) {\n const parentDir = dirname(dir);\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const lomPath = join(parentDir, 'metadata', lomFilename);\n\n if (existsSync(lomPath)) {\n try {\n return readFileSync(lomPath, 'utf-8');\n } catch {\n return undefined;\n }\n }\n }\n\n // Pattern 2: <dir>/<id>.xml → <dir>/metadata/<id>.lom.xml\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const lomPath1 = join(dir, 'metadata', lomFilename);\n\n if (existsSync(lomPath1)) {\n try {\n return readFileSync(lomPath1, 'utf-8');\n } catch {\n return undefined;\n }\n }\n\n // Pattern 3: <dir>/<id>.xml → <dir>/../metadata/<id>.lom.xml\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const lomPath2 = join(dir, '..', 'metadata', lomFilename);\n\n if (existsSync(lomPath2)) {\n try {\n return readFileSync(lomPath2, 'utf-8');\n } catch {\n return undefined;\n }\n }\n\n return undefined;\n}\n","/**\n * Image dimension resolver\n *\n * Resolves an image file referenced by a QTI `<object data=\"...\">` /\n * `<img src=\"...\">` tag and reads its intrinsic pixel dimensions directly from\n * the file header. This is a dependency-free reader for the formats commonly\n * found in QTI packages (GIF, PNG, JPEG). It reads only the small header region\n * needed to determine dimensions, not the whole file.\n *\n * QTI legitimately allows an `<object>` without width/height attributes, but\n * some Learnosity question types (e.g. hotspot) need pixel dimensions to convert\n * absolute coordinates into percentages. When the markup omits them, the\n * dimensions are recovered from the referenced image file.\n */\n\nimport { existsSync, closeSync, openSync, readSync, realpathSync } from 'fs';\nimport { dirname, join, isAbsolute, resolve, relative, sep } from 'path';\n\nexport interface ImageDimensions {\n width: number;\n height: number;\n}\n\n/**\n * Only the leading bytes of an image are needed to read its dimensions: GIF and\n * PNG carry them in the first ~24 bytes, and a JPEG's first Start-Of-Frame\n * marker is virtually always within the first segments. Cap the read so a huge\n * asset can never be loaded whole into memory.\n */\nconst MAX_HEADER_BYTES = 64 * 1024;\n\n/**\n * Check that `resolvedCandidate` stays lexically inside `resolvedRoot`.\n *\n * Both arguments must already be absolute/normalised. Returns true when the\n * candidate is contained (and is not the root itself).\n */\nfunction isContained(resolvedCandidate: string, resolvedRoot: string): boolean {\n const rel = relative(resolvedRoot, resolvedCandidate);\n\n return rel !== '' && !isAbsolute(rel) && rel.split(sep)[0] !== '..';\n}\n\n/**\n * Resolve `candidate` and confirm it stays inside `root`, both lexically and\n * after dereferencing symlinks.\n *\n * The `data`/`src` attribute comes from the QTI file being converted, which is\n * untrusted input. A lexical check alone is insufficient: a package could place\n * a symlink under `root` that targets a file outside it (e.g. `/dev/zero`), so\n * the real path is re-verified against the real root before it is returned for\n * reading.\n *\n * @returns The real (symlink-dereferenced) absolute path if contained, else undefined.\n */\nfunction containedPath(candidate: string, root: string): string | undefined {\n // These resolve() calls are the sanitiser, not a sink: normalising both\n // sides is what makes the relative() comparison below meaningful.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedRoot = resolve(root);\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedCandidate = resolve(candidate);\n\n // Lexical containment first (cheap, and rejects obvious \"../\" escapes even\n // when the target does not exist).\n if (!isContained(resolvedCandidate, resolvedRoot)) {\n return undefined;\n }\n\n if (!existsSync(resolvedCandidate)) {\n return undefined;\n }\n\n // Dereference symlinks on both sides and re-verify: this closes the gap\n // where a symlink inside root points outside it. If realpath fails (broken\n // link, race), treat as not resolvable.\n let realCandidate: string;\n let realRoot: string;\n\n try {\n realCandidate = realpathSync(resolvedCandidate);\n realRoot = realpathSync(resolvedRoot);\n } catch {\n return undefined;\n }\n\n if (!isContained(realCandidate, realRoot)) {\n return undefined;\n }\n\n return realCandidate;\n}\n\n/**\n * Read up to {@link MAX_HEADER_BYTES} from the start of a file without loading\n * the whole file into memory. Returns the bytes actually read.\n */\nfunction readHeaderBytes(path: string): Buffer | undefined {\n let fd: number | undefined;\n\n try {\n fd = openSync(path, 'r');\n const buf = Buffer.alloc(MAX_HEADER_BYTES);\n const bytesRead = readSync(fd, buf, 0, MAX_HEADER_BYTES, 0);\n\n return buf.subarray(0, bytesRead);\n } catch {\n return undefined;\n } finally {\n if (fd !== undefined) {\n try {\n closeSync(fd);\n } catch {\n // Best-effort close; nothing actionable if it fails.\n }\n }\n }\n}\n\n/**\n * Read image dimensions from an in-memory file header buffer.\n * Exported for unit testing without touching the filesystem.\n *\n * Supports GIF (87a/89a), PNG, and JPEG (baseline and progressive).\n *\n * @param buf - The image file bytes (at least the header region)\n * @returns The pixel dimensions, or undefined if the format is unrecognised\n */\nexport function readImageDimensionsFromBuffer(buf: Buffer): ImageDimensions | undefined {\n // GIF: \"GIF87a\" or \"GIF89a\"; width/height are little-endian uint16 at offset 6/8.\n if (\n buf.length >= 10 &&\n buf[0] === 0x47 && // G\n buf[1] === 0x49 && // I\n buf[2] === 0x46 // F\n ) {\n const width = buf.readUInt16LE(6);\n const height = buf.readUInt16LE(8);\n\n if (width > 0 && height > 0) {\n return { width, height };\n }\n\n return undefined;\n }\n\n // PNG: 8-byte signature, then IHDR with width/height as big-endian uint32\n // at offset 16/20.\n if (\n buf.length >= 24 &&\n buf[0] === 0x89 &&\n buf[1] === 0x50 && // P\n buf[2] === 0x4e && // N\n buf[3] === 0x47 // G\n ) {\n const width = buf.readUInt32BE(16);\n const height = buf.readUInt32BE(20);\n\n if (width > 0 && height > 0) {\n return { width, height };\n }\n\n return undefined;\n }\n\n // JPEG: starts with 0xFFD8. Scan marker segments for a Start Of Frame\n // (SOF0-SOF15, excluding non-SOF markers 0xC4/0xC8/0xCC) which carries\n // height/width as big-endian uint16.\n if (buf.length >= 4 && buf[0] === 0xff && buf[1] === 0xd8) {\n let offset = 2;\n\n while (offset + 9 < buf.length) {\n // A marker is 0xFF followed by a non-0xFF, non-0x00 marker code.\n // JPEG permits any number of 0xFF fill bytes before the marker code,\n // so skip the whole run of 0xFF and land on the marker byte itself.\n if (buf[offset] !== 0xff) {\n offset++;\n continue;\n }\n\n let markerOffset = offset;\n\n while (markerOffset < buf.length && buf[markerOffset] === 0xff) {\n markerOffset++;\n }\n\n if (markerOffset >= buf.length) {\n break;\n }\n\n const marker = buf[markerOffset];\n // The length field (if any) follows the marker code byte.\n const segmentStart = markerOffset + 1;\n\n // 0x00 after 0xFF is a stuffed byte inside entropy-coded data, not a\n // marker; skip past it and keep scanning.\n if (marker === 0x00) {\n offset = segmentStart;\n continue;\n }\n\n // Standalone markers without a length payload.\n if (marker === 0xd8 || marker === 0xd9 || (marker >= 0xd0 && marker <= 0xd7)) {\n offset = segmentStart;\n continue;\n }\n\n if (segmentStart + 1 >= buf.length) {\n break;\n }\n\n const segmentLength = buf.readUInt16BE(segmentStart);\n\n // SOF markers carrying frame dimensions (exclude DHT 0xC4, JPG 0xC8,\n // DAC 0xCC which share the 0xCn range but are not frame headers).\n const isSof =\n marker >= 0xc0 &&\n marker <= 0xcf &&\n marker !== 0xc4 &&\n marker !== 0xc8 &&\n marker !== 0xcc;\n\n if (isSof) {\n // SOF payload after the 2-byte length: precision (1 byte),\n // height (2 bytes), width (2 bytes).\n if (segmentStart + 6 >= buf.length) {\n break;\n }\n\n const height = buf.readUInt16BE(segmentStart + 3);\n const width = buf.readUInt16BE(segmentStart + 5);\n\n if (width > 0 && height > 0) {\n return { width, height };\n }\n\n return undefined;\n }\n\n // Advance past this segment: length field + its payload.\n offset = segmentStart + segmentLength;\n }\n }\n\n return undefined;\n}\n\n/**\n * Resolve and read the intrinsic dimensions of an image referenced by a QTI\n * `<object>`/`<img>` tag.\n *\n * Security model: the `objectDataPath` comes from untrusted QTI markup, so every\n * resolved path is confined to a containment root before it is read.\n *\n * - When `packageRoot` is supplied (the normal case for package conversion), any\n * asset located anywhere inside the package is allowed — including assets a\n * sibling directory up, e.g. `questions/item.xml` referencing\n * `../images/foo.png`. This does not rely on directory names.\n * - When `packageRoot` is omitted (in-memory callers with no package context),\n * the read is confined to the source file's own directory. This is the safe\n * default: no path is read from outside where the item lives.\n *\n * @param objectDataPath - Path from the data/src attribute (e.g. \"754493.gif\")\n * @param sourceFile - Absolute path to the source QTI XML file\n * @param packageRoot - Absolute path to the package root that bounds all reads\n * @returns The image dimensions, or undefined if it cannot be resolved/read.\n */\nexport function resolveImageDimensions(\n objectDataPath: string,\n sourceFile?: string,\n packageRoot?: string\n): ImageDimensions | undefined {\n if (!sourceFile || !objectDataPath) {\n return undefined;\n }\n\n const sourceDir = dirname(sourceFile);\n\n // The containment root: the package root when known (so any in-package asset\n // resolves regardless of directory naming), otherwise the item's own\n // directory. If a packageRoot is given but the source file somehow sits\n // outside it, fall back to the source directory rather than trusting it.\n let root = sourceDir;\n\n if (packageRoot) {\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedRoot = resolve(packageRoot);\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedSourceDir = resolve(sourceDir);\n const rel = relative(resolvedRoot, resolvedSourceDir);\n const sourceInsideRoot = rel === '' || (!isAbsolute(rel) && rel.split(sep)[0] !== '..');\n\n root = sourceInsideRoot ? resolvedRoot : resolvedSourceDir;\n }\n\n const candidates: string[] = [];\n\n if (isAbsolute(objectDataPath)) {\n candidates.push(objectDataPath);\n } else {\n // Resolve relative to the item first (most common), then relative to the\n // package root. Both are re-checked for containment before any read.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n candidates.push(join(sourceDir, objectDataPath));\n\n if (resolve(root) !== resolve(sourceDir)) {\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n candidates.push(join(root, objectDataPath));\n }\n }\n\n for (const candidate of candidates) {\n // containedPath dereferences symlinks and re-verifies containment, so\n // the returned path is safe to read.\n const imagePath = containedPath(candidate, root);\n\n if (!imagePath) {\n continue;\n }\n\n // Read only a bounded header region: enough for GIF/PNG and to scan the\n // early JPEG marker segments that carry frame dimensions, without\n // loading a potentially very large asset into memory.\n const buf = readHeaderBytes(imagePath);\n\n if (buf) {\n return readImageDimensionsFromBuffer(buf);\n }\n }\n\n return undefined;\n}\n","/**\n * Filesystem-backed {@link FileAccess} for Node.js callers (the CLI and\n * disk-based package conversion). Reads passage HTML and LOM metadata from the\n * local filesystem.\n *\n * This module imports Node built-ins (via the resolver helpers) and is therefore\n * NOT part of the browser-safe surface — it is wired in by Node entry points.\n */\nimport type { FileAccess } from './fileAccess.js';\nimport { resolvePassageFile } from './utils/passageResolver.js';\nimport { findAndReadLomFile } from './utils/lomFinder.js';\nimport { resolveImageDimensions } from './utils/imageDimensions.js';\n\nexport const nodeFileAccess: FileAccess = {\n resolvePassageFile,\n findAndReadLomFile,\n resolveImageDimensions,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAASA,gBAAc,WAAmB,MAAkC;CAIxE,MAAM,eAAe,QAAQ,IAAI;CAEjC,MAAM,oBAAoB,QAAQ,SAAS;CAC3C,MAAM,MAAM,SAAS,cAAc,iBAAiB;CAIpD,IAAI,QAAQ,MAAM,WAAW,GAAG,KAAK,IAAI,MAAM,GAAG,CAAC,CAAC,OAAO,MACvD;CAGJ,OAAO;AACX;;;;;;;;AASA,SAAgB,mBACZ,gBACA,YACkB;CAClB,IAAI,CAAC,cAAc,CAAC,gBAChB;CAIJ,MAAM,YAAY,QAAQ,UAAU;CAKpC,MAAM,OAAO,QAAQ,SAAS;CAK9B,MAAM,aAAuB,CAAC;CAE9B,IAAI,WAAW,cAAc,GACzB,WAAW,KAAK,cAAc;MAC3B;EAEH,WAAW,KAAK,KAAK,WAAW,cAAc,CAAC;EAE/C,WAAW,KAAK,KAAK,MAAM,cAAc,CAAC;CAC9C;CAEA,KAAK,MAAM,aAAa,YAAY;EAEhC,MAAM,cAAcA,gBAAc,WAAW,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K,MAAM,cAAc,CAAC;CAElD;CAEA,KAAK,MAAM,aAAa,YAAY;EAGhC,MAAM,YAAY,cAAc,WAAW,IAAI;EAE/C,IAAI,CAAC,WACD;EAMJ,MAAM,MAAM,gBAAgB,SAAS;EAErC,IAAI,KACA,OAAO,8BAA8B,GAAG;CAEhD;AAGJ;;;AC9TA,MAAa,iBAA6B;CACtC;CACA;CACA;AACJ"}
|
|
1
|
+
{"version":3,"file":"nodeFileAccess-BhCoGDOi.js","names":["containedPath"],"sources":["../../core/src/qti-to-learnosity/utils/passageResolver.ts","../../core/src/qti-to-learnosity/utils/lomFinder.ts","../../core/src/qti-to-learnosity/utils/imageDimensions.ts","../../core/src/qti-to-learnosity/nodeFileAccess.ts"],"sourcesContent":["/**\n * Passage HTML file resolver\n * Resolves and reads external HTML files referenced by <object> tags in QTI passages\n */\n\nimport { existsSync, readFileSync } from 'fs';\nimport { dirname, join, isAbsolute, resolve, relative, sep } from 'path';\n\n/**\n * Resolve `candidate` and confirm it stays inside `root`.\n *\n * The `data` attribute of an <object> tag comes from the QTI file being\n * converted, which is untrusted input. Without this check a crafted value such\n * as \"../../../../etc/passwd\" would let a QTI package read arbitrary files.\n *\n * @param candidate - Path to check (absolute or already joined)\n * @param root - Directory the path must stay within\n * @returns Absolute path if contained by root, undefined otherwise\n */\nfunction containedPath(candidate: string, root: string): string | undefined {\n // These two resolve() calls are the sanitiser, not a sink: normalising both\n // sides is what makes the relative() comparison below meaningful.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedRoot = resolve(root);\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedCandidate = resolve(candidate);\n const rel = relative(resolvedRoot, resolvedCandidate);\n\n // Empty means the candidate is the root itself; a leading \"..\" segment or an\n // absolute result means it escaped the root (e.g. a different drive).\n if (rel === '' || isAbsolute(rel) || rel.split(sep)[0] === '..') {\n return undefined;\n }\n\n return resolvedCandidate;\n}\n\n/**\n * Resolve and read a passage HTML file referenced by an <object> tag\n *\n * @param objectDataPath - The path from the object's data attribute (e.g., \"passages/passage.html\")\n * @param sourceFile - The absolute path to the source QTI XML file\n * @returns The HTML content of the passage file, or undefined if not found\n */\nexport function resolvePassageFile(\n objectDataPath: string,\n sourceFile?: string\n): string | undefined {\n if (!sourceFile || !objectDataPath) {\n return undefined;\n }\n\n // Get the directory containing the source XML file\n const sourceDir = dirname(sourceFile);\n\n // Passages sit either beside the item (passages/passage.html) or one level\n // up (items/item.xml -> ../passages/passage.html), so the parent directory\n // is the widest location a passage may legitimately be read from.\n const root = dirname(sourceDir);\n\n // Candidates, in priority order: relative to the source directory, then\n // relative to its parent. Absolute values are taken as-is. Each one is passed\n // through containedPath() below before it reaches the filesystem.\n const candidates: string[] = [];\n\n if (isAbsolute(objectDataPath)) {\n candidates.push(objectDataPath);\n } else {\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n candidates.push(join(sourceDir, objectDataPath));\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n candidates.push(join(root, objectDataPath));\n }\n\n for (const candidate of candidates) {\n // Every candidate is confined to `root` before it reaches the filesystem\n const passagePath = containedPath(candidate, root);\n\n if (!passagePath || !existsSync(passagePath)) {\n continue;\n }\n\n try {\n return readFileSync(passagePath, 'utf-8').replace(/^\\uFEFF/, '');\n } catch {\n // File exists but couldn't be read\n return undefined;\n }\n }\n\n return undefined;\n}\n\n","/**\n * LOM file discovery utility\n * Locates LOM metadata files for QTI items\n */\n\nimport { existsSync, readFileSync } from 'fs';\nimport { dirname, basename, join } from 'path';\n\n/**\n * Find LOM file for a given QTI item file path\n * Checks for:\n * - .../items/<id>.xml → .../metadata/<id>.lom.xml\n * - <dir>/<id>.xml → <dir>/metadata/<id>.lom.xml\n * - <dir>/<id>.xml → <dir>/../metadata/<id>.lom.xml\n *\n * @param itemPath - Absolute path to the QTI item XML file\n * @returns LOM XML content if found, undefined otherwise\n */\nexport function findAndReadLomFile(itemPath: string): string | undefined {\n const dir = dirname(itemPath);\n const filename = basename(itemPath);\n const itemId = filename.replace(/\\.xml$/i, '');\n\n // basename() strips every directory separator, so lomFilename cannot carry\n // traversal segments. The joins below stay within dir or its parent, both of\n // which are derived from the item path the operator asked us to convert.\n const lomFilename = `${itemId}.lom.xml`;\n\n // Pattern 1: .../items/<id>.xml → .../metadata/<id>.lom.xml (sibling folder)\n if (dir.endsWith('/items') || dir.endsWith('\\\\items')) {\n const parentDir = dirname(dir);\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const lomPath = join(parentDir, 'metadata', lomFilename);\n\n if (existsSync(lomPath)) {\n try {\n return readFileSync(lomPath, 'utf-8');\n } catch {\n return undefined;\n }\n }\n }\n\n // Pattern 2: <dir>/<id>.xml → <dir>/metadata/<id>.lom.xml\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const lomPath1 = join(dir, 'metadata', lomFilename);\n\n if (existsSync(lomPath1)) {\n try {\n return readFileSync(lomPath1, 'utf-8');\n } catch {\n return undefined;\n }\n }\n\n // Pattern 3: <dir>/<id>.xml → <dir>/../metadata/<id>.lom.xml\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const lomPath2 = join(dir, '..', 'metadata', lomFilename);\n\n if (existsSync(lomPath2)) {\n try {\n return readFileSync(lomPath2, 'utf-8');\n } catch {\n return undefined;\n }\n }\n\n return undefined;\n}\n","/**\n * Image dimension resolver\n *\n * Resolves an image file referenced by a QTI `<object data=\"...\">` /\n * `<img src=\"...\">` tag and reads its intrinsic pixel dimensions directly from\n * the file header. This is a dependency-free reader for the formats commonly\n * found in QTI packages (GIF, PNG, JPEG). It reads only the small header region\n * needed to determine dimensions, not the whole file.\n *\n * QTI legitimately allows an `<object>` without width/height attributes, but\n * some Learnosity question types (e.g. hotspot) need pixel dimensions to convert\n * absolute coordinates into percentages. When the markup omits them, the\n * dimensions are recovered from the referenced image file.\n */\n\nimport { existsSync, closeSync, openSync, readSync, realpathSync } from 'fs';\nimport { dirname, join, isAbsolute, resolve, relative, sep } from 'path';\n\nexport interface ImageDimensions {\n width: number;\n height: number;\n}\n\n/**\n * Only the leading bytes of an image are needed to read its dimensions: GIF and\n * PNG carry them in the first ~24 bytes, and a JPEG's first Start-Of-Frame\n * marker is virtually always within the first segments. Cap the read so a huge\n * asset can never be loaded whole into memory.\n */\nconst MAX_HEADER_BYTES = 64 * 1024;\n\n/**\n * Check that `resolvedCandidate` stays lexically inside `resolvedRoot`.\n *\n * Both arguments must already be absolute/normalised. Returns true when the\n * candidate is contained (and is not the root itself).\n */\nfunction isContained(resolvedCandidate: string, resolvedRoot: string): boolean {\n const rel = relative(resolvedRoot, resolvedCandidate);\n\n return rel !== '' && !isAbsolute(rel) && rel.split(sep)[0] !== '..';\n}\n\n/**\n * Resolve `candidate` and confirm it stays inside `root`, both lexically and\n * after dereferencing symlinks.\n *\n * The `data`/`src` attribute comes from the QTI file being converted, which is\n * untrusted input. A lexical check alone is insufficient: a package could place\n * a symlink under `root` that targets a file outside it (e.g. `/dev/zero`), so\n * the real path is re-verified against the real root before it is returned for\n * reading.\n *\n * @returns The real (symlink-dereferenced) absolute path if contained, else undefined.\n */\nfunction containedPath(candidate: string, root: string): string | undefined {\n // These resolve() calls are the sanitiser, not a sink: normalising both\n // sides is what makes the relative() comparison below meaningful.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedRoot = resolve(root);\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedCandidate = resolve(candidate);\n\n // Lexical containment first (cheap, and rejects obvious \"../\" escapes even\n // when the target does not exist).\n if (!isContained(resolvedCandidate, resolvedRoot)) {\n return undefined;\n }\n\n if (!existsSync(resolvedCandidate)) {\n return undefined;\n }\n\n // Dereference symlinks on both sides and re-verify: this closes the gap\n // where a symlink inside root points outside it. If realpath fails (broken\n // link, race), treat as not resolvable.\n let realCandidate: string;\n let realRoot: string;\n\n try {\n realCandidate = realpathSync(resolvedCandidate);\n realRoot = realpathSync(resolvedRoot);\n } catch {\n return undefined;\n }\n\n if (!isContained(realCandidate, realRoot)) {\n return undefined;\n }\n\n return realCandidate;\n}\n\n/**\n * Read up to {@link MAX_HEADER_BYTES} from the start of a file without loading\n * the whole file into memory. Returns the bytes actually read.\n */\nfunction readHeaderBytes(path: string): Buffer | undefined {\n let fd: number | undefined;\n\n try {\n fd = openSync(path, 'r');\n const buf = Buffer.alloc(MAX_HEADER_BYTES);\n const bytesRead = readSync(fd, buf, 0, MAX_HEADER_BYTES, 0);\n\n return buf.subarray(0, bytesRead);\n } catch {\n return undefined;\n } finally {\n if (fd !== undefined) {\n try {\n closeSync(fd);\n } catch {\n // Best-effort close; nothing actionable if it fails.\n }\n }\n }\n}\n\n/**\n * Read image dimensions from an in-memory file header buffer.\n * Exported for unit testing without touching the filesystem.\n *\n * Supports GIF (87a/89a), PNG, and JPEG (baseline and progressive).\n *\n * @param buf - The image file bytes (at least the header region)\n * @returns The pixel dimensions, or undefined if the format is unrecognised\n */\nexport function readImageDimensionsFromBuffer(buf: Buffer): ImageDimensions | undefined {\n // GIF: \"GIF87a\" or \"GIF89a\"; width/height are little-endian uint16 at offset 6/8.\n if (\n buf.length >= 10 &&\n buf[0] === 0x47 && // G\n buf[1] === 0x49 && // I\n buf[2] === 0x46 // F\n ) {\n const width = buf.readUInt16LE(6);\n const height = buf.readUInt16LE(8);\n\n if (width > 0 && height > 0) {\n return { width, height };\n }\n\n return undefined;\n }\n\n // PNG: 8-byte signature, then IHDR with width/height as big-endian uint32\n // at offset 16/20.\n if (\n buf.length >= 24 &&\n buf[0] === 0x89 &&\n buf[1] === 0x50 && // P\n buf[2] === 0x4e && // N\n buf[3] === 0x47 // G\n ) {\n const width = buf.readUInt32BE(16);\n const height = buf.readUInt32BE(20);\n\n if (width > 0 && height > 0) {\n return { width, height };\n }\n\n return undefined;\n }\n\n // JPEG: starts with 0xFFD8. Scan marker segments for a Start Of Frame\n // (SOF0-SOF15, excluding non-SOF markers 0xC4/0xC8/0xCC) which carries\n // height/width as big-endian uint16.\n if (buf.length >= 4 && buf[0] === 0xff && buf[1] === 0xd8) {\n let offset = 2;\n\n while (offset + 9 < buf.length) {\n // A marker is 0xFF followed by a non-0xFF, non-0x00 marker code.\n // JPEG permits any number of 0xFF fill bytes before the marker code,\n // so skip the whole run of 0xFF and land on the marker byte itself.\n if (buf[offset] !== 0xff) {\n offset++;\n continue;\n }\n\n let markerOffset = offset;\n\n while (markerOffset < buf.length && buf[markerOffset] === 0xff) {\n markerOffset++;\n }\n\n if (markerOffset >= buf.length) {\n break;\n }\n\n const marker = buf[markerOffset];\n // The length field (if any) follows the marker code byte.\n const segmentStart = markerOffset + 1;\n\n // 0x00 after 0xFF is a stuffed byte inside entropy-coded data, not a\n // marker; skip past it and keep scanning.\n if (marker === 0x00) {\n offset = segmentStart;\n continue;\n }\n\n // Standalone markers without a length payload.\n if (marker === 0xd8 || marker === 0xd9 || (marker >= 0xd0 && marker <= 0xd7)) {\n offset = segmentStart;\n continue;\n }\n\n if (segmentStart + 1 >= buf.length) {\n break;\n }\n\n const segmentLength = buf.readUInt16BE(segmentStart);\n\n // SOF markers carrying frame dimensions (exclude DHT 0xC4, JPG 0xC8,\n // DAC 0xCC which share the 0xCn range but are not frame headers).\n const isSof =\n marker >= 0xc0 &&\n marker <= 0xcf &&\n marker !== 0xc4 &&\n marker !== 0xc8 &&\n marker !== 0xcc;\n\n if (isSof) {\n // SOF payload after the 2-byte length: precision (1 byte),\n // height (2 bytes), width (2 bytes).\n if (segmentStart + 6 >= buf.length) {\n break;\n }\n\n const height = buf.readUInt16BE(segmentStart + 3);\n const width = buf.readUInt16BE(segmentStart + 5);\n\n if (width > 0 && height > 0) {\n return { width, height };\n }\n\n return undefined;\n }\n\n // Advance past this segment: length field + its payload.\n offset = segmentStart + segmentLength;\n }\n }\n\n return undefined;\n}\n\n/**\n * Resolve and read the intrinsic dimensions of an image referenced by a QTI\n * `<object>`/`<img>` tag.\n *\n * Security model: the `objectDataPath` comes from untrusted QTI markup, so every\n * resolved path is confined to a containment root before it is read.\n *\n * - When `packageRoot` is supplied (the normal case for package conversion), any\n * asset located anywhere inside the package is allowed — including assets a\n * sibling directory up, e.g. `questions/item.xml` referencing\n * `../images/foo.png`. This does not rely on directory names.\n * - When `packageRoot` is omitted (in-memory callers with no package context),\n * the read is confined to the source file's own directory. This is the safe\n * default: no path is read from outside where the item lives.\n *\n * @param objectDataPath - Path from the data/src attribute (e.g. \"754493.gif\")\n * @param sourceFile - Absolute path to the source QTI XML file\n * @param packageRoot - Absolute path to the package root that bounds all reads\n * @returns The image dimensions, or undefined if it cannot be resolved/read.\n */\nexport function resolveImageDimensions(\n objectDataPath: string,\n sourceFile?: string,\n packageRoot?: string\n): ImageDimensions | undefined {\n if (!sourceFile || !objectDataPath) {\n return undefined;\n }\n\n const sourceDir = dirname(sourceFile);\n\n // The containment root: the package root when known (so any in-package asset\n // resolves regardless of directory naming), otherwise the item's own\n // directory. If a packageRoot is given but the source file somehow sits\n // outside it, fall back to the source directory rather than trusting it.\n let root = sourceDir;\n let shouldTryPackageRoot = false;\n\n if (packageRoot) {\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedRoot = resolve(packageRoot);\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const resolvedSourceDir = resolve(sourceDir);\n const rel = relative(resolvedRoot, resolvedSourceDir);\n const sourceInsideRoot = rel === '' || (!isAbsolute(rel) && rel.split(sep)[0] !== '..');\n\n root = sourceInsideRoot ? resolvedRoot : resolvedSourceDir;\n shouldTryPackageRoot = sourceInsideRoot && resolvedRoot !== resolvedSourceDir;\n }\n\n const candidates: string[] = [];\n\n if (isAbsolute(objectDataPath)) {\n candidates.push(objectDataPath);\n } else {\n // Resolve relative to the item first (most common), then relative to the\n // package root. Both are re-checked for containment before any read.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n candidates.push(join(sourceDir, objectDataPath));\n\n if (shouldTryPackageRoot) {\n // The candidate is rechecked by containedPath() for lexical and\n // realpath containment before it can reach the filesystem.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n candidates.push(join(root, objectDataPath));\n }\n }\n\n for (const candidate of candidates) {\n // containedPath dereferences symlinks and re-verifies containment, so\n // the returned path is safe to read.\n const imagePath = containedPath(candidate, root);\n\n if (!imagePath) {\n continue;\n }\n\n // Read only a bounded header region: enough for GIF/PNG and to scan the\n // early JPEG marker segments that carry frame dimensions, without\n // loading a potentially very large asset into memory.\n const buf = readHeaderBytes(imagePath);\n\n if (buf) {\n return readImageDimensionsFromBuffer(buf);\n }\n }\n\n return undefined;\n}\n","/**\n * Filesystem-backed {@link FileAccess} for Node.js callers (the CLI and\n * disk-based package conversion). Reads passage HTML and LOM metadata from the\n * local filesystem.\n *\n * This module imports Node built-ins (via the resolver helpers) and is therefore\n * NOT part of the browser-safe surface — it is wired in by Node entry points.\n */\nimport type { FileAccess } from './fileAccess.js';\nimport { resolvePassageFile } from './utils/passageResolver.js';\nimport { findAndReadLomFile } from './utils/lomFinder.js';\nimport { resolveImageDimensions } from './utils/imageDimensions.js';\n\nexport const nodeFileAccess: FileAccess = {\n resolvePassageFile,\n findAndReadLomFile,\n resolveImageDimensions,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAASA,gBAAc,WAAmB,MAAkC;CAIxE,MAAM,eAAe,QAAQ,IAAI;CAEjC,MAAM,oBAAoB,QAAQ,SAAS;CAC3C,MAAM,MAAM,SAAS,cAAc,iBAAiB;CAIpD,IAAI,QAAQ,MAAM,WAAW,GAAG,KAAK,IAAI,MAAM,GAAG,CAAC,CAAC,OAAO,MACvD;CAGJ,OAAO;AACX;;;;;;;;AASA,SAAgB,mBACZ,gBACA,YACkB;CAClB,IAAI,CAAC,cAAc,CAAC,gBAChB;CAIJ,MAAM,YAAY,QAAQ,UAAU;CAKpC,MAAM,OAAO,QAAQ,SAAS;CAK9B,MAAM,aAAuB,CAAC;CAE9B,IAAI,WAAW,cAAc,GACzB,WAAW,KAAK,cAAc;MAC3B;EAEH,WAAW,KAAK,KAAK,WAAW,cAAc,CAAC;EAE/C,WAAW,KAAK,KAAK,MAAM,cAAc,CAAC;CAC9C;CAEA,KAAK,MAAM,aAAa,YAAY;EAEhC,MAAM,cAAcA,gBAAc,WAAW,IAAI;EAEjD,IAAI,CAAC,eAAe,CAAC,WAAW,WAAW,GACvC;EAGJ,IAAI;GACA,OAAO,aAAa,aAAa,OAAO,CAAC,CAAC,QAAQ,WAAW,EAAE;EACnE,QAAQ;GAEJ;EACJ;CACJ;AAGJ;;;;;;;;;;;;;;;;;ACzEA,SAAgB,mBAAmB,UAAsC;CACrE,MAAM,MAAM,QAAQ,QAAQ;CAO5B,MAAM,cAAc,GANH,SAAS,QACJ,CAAC,CAAC,QAAQ,WAAW,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
|
|
|
1
1
|
import { i as __toESM, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.js";
|
|
2
|
-
import { _ as isEnterKey, b as isTabKey, c as usePrefix, d as useEffect, f as useState, h as isBackspaceKey, l as makeTheme, o as useKeypress, t as createPrompt } from "./create-prompt-
|
|
3
|
-
import { i as chalk$1, o as require_string_width, x as DiagnosticCode } from "./table-
|
|
2
|
+
import { _ as isEnterKey, b as isTabKey, c as usePrefix, d as useEffect, f as useState, h as isBackspaceKey, l as makeTheme, o as useKeypress, t as createPrompt } from "./create-prompt-DyNnKXYU.js";
|
|
3
|
+
import { i as chalk$1, o as require_string_width, x as DiagnosticCode } from "./table-7b-8MN2z.js";
|
|
4
4
|
import process$1 from "node:process";
|
|
5
5
|
import { access, readFile } from "fs/promises";
|
|
6
6
|
import { resolve } from "path";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import { homedir } from "os";
|
|
9
9
|
import tty from "node:tty";
|
|
10
|
-
//#region ../../node_modules/.pnpm/@inquirer+input@5.1.
|
|
10
|
+
//#region ../../node_modules/.pnpm/@inquirer+input@5.1.6_@types+node@26.6.2/node_modules/@inquirer/input/dist/index.js
|
|
11
11
|
const inputTheme = { validationFailureMode: "keep" };
|
|
12
12
|
var dist_default = createPrompt((config, done) => {
|
|
13
13
|
const { prefill = "tab" } = config;
|
|
@@ -578,11 +578,15 @@ const wideRanges = [
|
|
|
578
578
|
94192,
|
|
579
579
|
94198,
|
|
580
580
|
94208,
|
|
581
|
-
|
|
581
|
+
101594,
|
|
582
582
|
101631,
|
|
583
|
-
|
|
583
|
+
101664,
|
|
584
584
|
101760,
|
|
585
585
|
101874,
|
|
586
|
+
101888,
|
|
587
|
+
102801,
|
|
588
|
+
102816,
|
|
589
|
+
102866,
|
|
586
590
|
110576,
|
|
587
591
|
110579,
|
|
588
592
|
110581,
|
|
@@ -590,7 +594,7 @@ const wideRanges = [
|
|
|
590
594
|
110589,
|
|
591
595
|
110590,
|
|
592
596
|
110592,
|
|
593
|
-
|
|
597
|
+
110888,
|
|
594
598
|
110898,
|
|
595
599
|
110898,
|
|
596
600
|
110928,
|
|
@@ -598,7 +602,7 @@ const wideRanges = [
|
|
|
598
602
|
110933,
|
|
599
603
|
110933,
|
|
600
604
|
110948,
|
|
601
|
-
|
|
605
|
+
110952,
|
|
602
606
|
110960,
|
|
603
607
|
111355,
|
|
604
608
|
119552,
|
|
@@ -613,6 +617,8 @@ const wideRanges = [
|
|
|
613
617
|
127374,
|
|
614
618
|
127377,
|
|
615
619
|
127386,
|
|
620
|
+
127406,
|
|
621
|
+
127406,
|
|
616
622
|
127488,
|
|
617
623
|
127490,
|
|
618
624
|
127504,
|
|
@@ -666,13 +672,15 @@ const wideRanges = [
|
|
|
666
672
|
128720,
|
|
667
673
|
128722,
|
|
668
674
|
128725,
|
|
669
|
-
|
|
675
|
+
128729,
|
|
670
676
|
128732,
|
|
671
677
|
128735,
|
|
672
678
|
128747,
|
|
673
679
|
128748,
|
|
674
680
|
128756,
|
|
675
681
|
128764,
|
|
682
|
+
128986,
|
|
683
|
+
128986,
|
|
676
684
|
128992,
|
|
677
685
|
129003,
|
|
678
686
|
129008,
|
|
@@ -686,24 +694,22 @@ const wideRanges = [
|
|
|
686
694
|
129648,
|
|
687
695
|
129660,
|
|
688
696
|
129664,
|
|
689
|
-
129674,
|
|
690
|
-
129678,
|
|
691
697
|
129734,
|
|
692
698
|
129736,
|
|
693
699
|
129736,
|
|
694
|
-
|
|
695
|
-
|
|
700
|
+
129740,
|
|
701
|
+
129757,
|
|
696
702
|
129759,
|
|
697
|
-
|
|
703
|
+
129771,
|
|
698
704
|
129775,
|
|
699
|
-
|
|
705
|
+
129786,
|
|
700
706
|
131072,
|
|
701
707
|
196605,
|
|
702
708
|
196608,
|
|
703
709
|
262141
|
|
704
710
|
];
|
|
705
711
|
//#endregion
|
|
706
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
712
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/utilities.js
|
|
707
713
|
/**
|
|
708
714
|
Binary search on a sorted flat array of [start, end] pairs.
|
|
709
715
|
|
|
@@ -724,7 +730,7 @@ const isInRange = (ranges, codePoint) => {
|
|
|
724
730
|
return false;
|
|
725
731
|
};
|
|
726
732
|
//#endregion
|
|
727
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
733
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup.js
|
|
728
734
|
const commonCjkCodePoint = 19968;
|
|
729
735
|
const [wideFastPathStart, wideFastPathEnd] = /* #__PURE__ */ findWideFastPathRange(wideRanges);
|
|
730
736
|
function findWideFastPathRange(ranges) {
|
|
@@ -745,7 +751,7 @@ const isAmbiguous = (codePoint) => {
|
|
|
745
751
|
if (codePoint < 161 || codePoint > 1114109) return false;
|
|
746
752
|
return isInRange(ambiguousRanges, codePoint);
|
|
747
753
|
};
|
|
748
|
-
const
|
|
754
|
+
const isFullwidth = (codePoint) => {
|
|
749
755
|
if (codePoint < 12288 || codePoint > 65510) return false;
|
|
750
756
|
return isInRange(fullwidthRanges, codePoint);
|
|
751
757
|
};
|
|
@@ -755,13 +761,13 @@ const isWide = (codePoint) => {
|
|
|
755
761
|
return isInRange(wideRanges, codePoint);
|
|
756
762
|
};
|
|
757
763
|
//#endregion
|
|
758
|
-
//#region ../../node_modules/.pnpm/get-east-asian-width@1.
|
|
764
|
+
//#region ../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/index.js
|
|
759
765
|
function validate(codePoint) {
|
|
760
766
|
if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
761
767
|
}
|
|
762
768
|
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
763
769
|
validate(codePoint);
|
|
764
|
-
if (
|
|
770
|
+
if (isFullwidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
|
|
765
771
|
return 1;
|
|
766
772
|
}
|
|
767
773
|
//#endregion
|
|
@@ -2238,4 +2244,4 @@ function expandTilde(filePath) {
|
|
|
2238
2244
|
//#endregion
|
|
2239
2245
|
export { chalk as a, dist_default as c, boxen as i, loadConfig as n, eastAsianWidth as o, showBanner as r, stripAnsi as s, expandTilde as t };
|
|
2240
2246
|
|
|
2241
|
-
//# sourceMappingURL=pathUtils-
|
|
2247
|
+
//# sourceMappingURL=pathUtils-DmtCfutO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathUtils-DmtCfutO.js","names":["emojiRegex","ANSI_BACKGROUND_OFFSET","wrapAnsi16","wrapAnsi256","wrapAnsi16m","styles","modifierNames","foregroundColorNames","backgroundColorNames","colorNames","assembleStyles","ansiStyles","process","styles","ansiStyles","process","cliBoxes","ansiAlign","chalk"],"sources":["../../../node_modules/.pnpm/@inquirer+input@5.1.6_@types+node@26.6.2/node_modules/@inquirer/input/dist/index.js","../../../node_modules/.pnpm/ansi-regex@6.3.0/node_modules/ansi-regex/index.js","../../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js","../../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup-data.js","../../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/utilities.js","../../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup.js","../../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/index.js","../../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.js","../../../node_modules/.pnpm/string-width@7.2.0/node_modules/string-width/index.js","../../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js","../../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js","../../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js","../../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js","../../../node_modules/.pnpm/widest-line@5.0.0/node_modules/widest-line/index.js","../../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/boxes.json","../../../node_modules/.pnpm/cli-boxes@3.0.0/node_modules/cli-boxes/index.js","../../../node_modules/.pnpm/camelcase@8.0.0/node_modules/camelcase/index.js","../../../node_modules/.pnpm/ansi-align@3.0.1/node_modules/ansi-align/index.js","../../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js","../../../node_modules/.pnpm/wrap-ansi@9.0.2/node_modules/wrap-ansi/index.js","../../../node_modules/.pnpm/boxen@8.0.1/node_modules/boxen/index.js","../src/ux/banner.ts","../src/options/schema.ts","../src/options/loadConfig.ts","../src/utils/pathUtils.ts"],"sourcesContent":["import { createPrompt, useState, useKeypress, useEffect, usePrefix, isBackspaceKey, isEnterKey, isTabKey, makeTheme, } from '@inquirer/core';\nconst inputTheme = {\n validationFailureMode: 'keep',\n};\nexport default createPrompt((config, done) => {\n const { prefill = 'tab' } = config;\n const theme = makeTheme(inputTheme, config.theme);\n const [status, setStatus] = useState('idle');\n // Coerce to string to handle runtime values that may be numbers despite TypeScript types\n // oxlint-disable-next-line typescript/no-unnecessary-type-conversion\n const [defaultValue, setDefaultValue] = useState(String(config.default ?? ''));\n const [errorMsg, setError] = useState();\n const [value, setValue] = useState('');\n const prefix = usePrefix({ status, theme });\n async function validate(value) {\n const { required, pattern, patternError = 'Invalid input' } = config;\n if (required && !value) {\n return 'You must provide a value';\n }\n if (pattern && !pattern.test(value)) {\n return patternError;\n }\n if (typeof config.validate === 'function') {\n return (await config.validate(value)) || 'You must provide a valid value';\n }\n return true;\n }\n useKeypress(async (key, rl) => {\n // Ignore keypress while our prompt is doing other processing.\n if (status !== 'idle') {\n return;\n }\n if (isEnterKey(key)) {\n const answer = value || defaultValue;\n setStatus('loading');\n const isValid = await validate(answer);\n if (isValid === true) {\n setValue(answer);\n setStatus('done');\n done(answer);\n }\n else {\n if (theme.validationFailureMode === 'clear') {\n setValue('');\n }\n else {\n // Reset the readline line value to the previous value. On line event, the value\n // get cleared, forcing the user to re-enter the value instead of fixing it.\n rl.write(value);\n }\n setError(isValid);\n setStatus('idle');\n }\n }\n else if (isBackspaceKey(key) && !value) {\n setDefaultValue('');\n }\n else if (isTabKey(key) && !value) {\n setDefaultValue('');\n rl.clearLine(0); // Remove the tab character.\n rl.write(defaultValue);\n setValue(defaultValue);\n }\n else {\n setValue(rl.line);\n setError(undefined);\n }\n });\n // If prefill is set to 'editable' cut out the default value and paste into current state and the user's cli buffer\n // They can edit the value immediately instead of needing to press 'tab'\n useEffect((rl) => {\n if (prefill === 'editable' && defaultValue) {\n rl.write(defaultValue);\n setValue(defaultValue);\n }\n }, []);\n const message = theme.style.message(config.message, status);\n let formattedValue = value;\n if (typeof config.transformer === 'function') {\n formattedValue = config.transformer(value, { isFinal: status === 'done' });\n }\n else if (status === 'done') {\n formattedValue = theme.style.answer(value);\n }\n let defaultStr;\n if (defaultValue && status !== 'done' && !value) {\n defaultStr = theme.style.defaultAnswer(defaultValue);\n }\n let error = '';\n if (errorMsg) {\n error = theme.style.error(errorMsg);\n }\n return [\n [prefix, message, defaultStr, formattedValue]\n .filter((v) => v !== undefined)\n .join(' '),\n error,\n ];\n});\n","export default function ansiRegex({onlyFirst = false} = {}) {\n\t// Valid string terminator sequences are BEL, ESC\\, and 0x9c\n\tconst ST = '(?:\\\\u0007|\\\\u001B\\\\u005C|\\\\u009C)';\n\n\t// OSC sequences only: ESC ] ... ST\n\t// The payload stops at the first terminator character rather than scanning ahead for one, so an unterminated `ESC ]` cannot rescan the rest of the input. Terminals likewise abort a control string on an unexpected ESC.\n\tconst osc = `(?:\\\\u001B\\\\][^\\\\u0007\\\\u001B\\\\u009C]*${ST})`;\n\n\t// CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte\n\tconst csi = '[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:\\\\d{1,4}(?:[;:]\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]';\n\n\tconst pattern = `${osc}|${csi}`;\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n}\n","import ansiRegex from 'ansi-regex';\n\nconst regex = ansiRegex();\n\nexport default function stripAnsi(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\t}\n\n\t// Fast path: ANSI codes require ESC (7-bit) or CSI (8-bit) introducer\n\tif (!string.includes('\\u001B') && !string.includes('\\u009B')) {\n\t\treturn string;\n\t}\n\n\t// Even though the regex is global, we don't need to reset the `.lastIndex`\n\t// because unlike `.exec()` and `.test()`, `.replace()` does it automatically\n\t// and doing it manually has a performance penalty.\n\treturn string.replace(regex, '');\n}\n","// Generated by scripts/build.js\n\nexport const ambiguousMinimalCodePoint = 161;\nexport const ambiguousMaximumCodePoint = 1114109;\nexport const ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];\n\nexport const fullwidthMinimalCodePoint = 12288;\nexport const fullwidthMaximumCodePoint = 65510;\nexport const fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];\n\nexport const halfwidthMinimalCodePoint = 8361;\nexport const halfwidthMaximumCodePoint = 65518;\nexport const halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];\n\nexport const narrowMinimalCodePoint = 32;\nexport const narrowMaximumCodePoint = 10630;\nexport const narrowRanges = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];\n\nexport const wideMinimalCodePoint = 4352;\nexport const wideMaximumCodePoint = 262141;\nexport const wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];\n","/**\nBinary search on a sorted flat array of [start, end] pairs.\n\n@param {number[]} ranges - Flat array of inclusive [start, end] range pairs, e.g. [0, 5, 10, 20].\n@param {number} codePoint - The value to search for.\n@returns {boolean} Whether the value falls within any of the ranges.\n*/\nexport const isInRange = (ranges, codePoint) => {\n\tlet low = 0;\n\tlet high = Math.floor(ranges.length / 2) - 1;\n\twhile (low <= high) {\n\t\tconst mid = Math.floor((low + high) / 2);\n\t\tconst i = mid * 2;\n\t\tif (codePoint < ranges[i]) {\n\t\t\thigh = mid - 1;\n\t\t} else if (codePoint > ranges[i + 1]) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n","import {\n\tambiguousMinimalCodePoint,\n\tambiguousMaximumCodePoint,\n\tambiguousRanges,\n\n\tfullwidthMinimalCodePoint,\n\tfullwidthMaximumCodePoint,\n\tfullwidthRanges,\n\n\thalfwidthMinimalCodePoint,\n\thalfwidthMaximumCodePoint,\n\thalfwidthRanges,\n\n\tnarrowMinimalCodePoint,\n\tnarrowMaximumCodePoint,\n\tnarrowRanges,\n\n\twideMinimalCodePoint,\n\twideMaximumCodePoint,\n\twideRanges,\n} from './lookup-data.js';\nimport {isInRange} from './utilities.js';\n\nconst commonCjkCodePoint = 0x4E_00;\nconst [wideFastPathStart, wideFastPathEnd] = /* #__PURE__ */ findWideFastPathRange(wideRanges);\n\n// Use a hot-path range so common `isWide` calls can skip binary search.\n// The range containing U+4E00 covers common CJK ideographs;\n// fallback to the largest range for resilience to Unicode table changes.\nfunction findWideFastPathRange(ranges) {\n\tlet fastPathStart = ranges[0];\n\tlet fastPathEnd = ranges[1];\n\n\tfor (let index = 0; index < ranges.length; index += 2) {\n\t\tconst start = ranges[index];\n\t\tconst end = ranges[index + 1];\n\n\t\tif (\n\t\t\tcommonCjkCodePoint >= start\n\t\t\t&& commonCjkCodePoint <= end\n\t\t) {\n\t\t\treturn [start, end];\n\t\t}\n\n\t\tif ((end - start) > (fastPathEnd - fastPathStart)) {\n\t\t\tfastPathStart = start;\n\t\t\tfastPathEnd = end;\n\t\t}\n\t}\n\n\treturn [fastPathStart, fastPathEnd];\n}\n\nexport const isAmbiguous = codePoint => {\n\tif (\n\t\tcodePoint < ambiguousMinimalCodePoint\n\t\t|| codePoint > ambiguousMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(ambiguousRanges, codePoint);\n};\n\nexport const isFullwidth = codePoint => {\n\tif (\n\t\tcodePoint < fullwidthMinimalCodePoint\n\t\t|| codePoint > fullwidthMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(fullwidthRanges, codePoint);\n};\n\nconst isHalfwidth = codePoint => {\n\tif (\n\t\tcodePoint < halfwidthMinimalCodePoint\n\t\t|| codePoint > halfwidthMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(halfwidthRanges, codePoint);\n};\n\nconst isNarrow = codePoint => {\n\tif (\n\t\tcodePoint < narrowMinimalCodePoint\n\t\t|| codePoint > narrowMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(narrowRanges, codePoint);\n};\n\nexport const isWide = codePoint => {\n\tif (\n\t\tcodePoint >= wideFastPathStart\n\t\t&& codePoint <= wideFastPathEnd\n\t) {\n\t\treturn true;\n\t}\n\n\tif (\n\t\tcodePoint < wideMinimalCodePoint\n\t\t|| codePoint > wideMaximumCodePoint\n\t) {\n\t\treturn false;\n\t}\n\n\treturn isInRange(wideRanges, codePoint);\n};\n\nexport function getCategory(codePoint) {\n\tif (isAmbiguous(codePoint)) {\n\t\treturn 'ambiguous';\n\t}\n\n\tif (isFullwidth(codePoint)) {\n\t\treturn 'fullwidth';\n\t}\n\n\tif (isHalfwidth(codePoint)) {\n\t\treturn 'halfwidth';\n\t}\n\n\tif (isNarrow(codePoint)) {\n\t\treturn 'narrow';\n\t}\n\n\tif (isWide(codePoint)) {\n\t\treturn 'wide';\n\t}\n\n\treturn 'neutral';\n}\n","import {getCategory, isAmbiguous, isFullwidth, isWide} from './lookup.js';\n\nfunction validate(codePoint) {\n\tif (!Number.isSafeInteger(codePoint)) {\n\t\tthrow new TypeError(`Expected a code point, got \\`${typeof codePoint}\\`.`);\n\t}\n}\n\nexport function eastAsianWidthType(codePoint) {\n\tvalidate(codePoint);\n\n\treturn getCategory(codePoint);\n}\n\nexport function eastAsianWidth(codePoint, {ambiguousAsWide = false} = {}) {\n\tvalidate(codePoint);\n\n\tif (\n\t\tisFullwidth(codePoint)\n\t\t|| isWide(codePoint)\n\t\t|| (ambiguousAsWide && isAmbiguous(codePoint))\n\t) {\n\t\treturn 2;\n\t}\n\n\treturn 1;\n}\n\n// Private exports for https://github.com/sindresorhus/is-fullwidth-code-point\nexport {\n\tisFullwidth as _isFullwidth,\n\t// TODO: Remove this in the next major version.\n\tisFullwidth as _isFullWidth,\n\tisWide as _isWide,\n} from './lookup.js';\n","module.exports = () => {\n\t// https://mths.be/emoji\n\treturn /[#*0-9]\\uFE0F?\\u20E3|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26AA\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C8\\u26CF\\u26D1\\u26E9\\u26F0-\\u26F5\\u26F7\\u26F8\\u26FA\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B55\\u3030\\u303D\\u3297\\u3299]\\uFE0F?|[\\u261D\\u270C\\u270D](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?|[\\u270A\\u270B](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u2693\\u26A1\\u26AB\\u26C5\\u26CE\\u26D4\\u26EA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2795-\\u2797\\u27B0\\u27BF\\u2B50]|\\u26D3\\uFE0F?(?:\\u200D\\uD83D\\uDCA5)?|\\u26F9(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\u2764\\uFE0F?(?:\\u200D(?:\\uD83D\\uDD25|\\uD83E\\uDE79))?|\\uD83C(?:[\\uDC04\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDE02\\uDE37\\uDF21\\uDF24-\\uDF2C\\uDF36\\uDF7D\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E\\uDF9F\\uDFCD\\uDFCE\\uDFD4-\\uDFDF\\uDFF5\\uDFF7]\\uFE0F?|[\\uDF85\\uDFC2\\uDFC7](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\uDFC4\\uDFCA](?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[\\uDFCB\\uDFCC](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|[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\\uDC6A\\uDC79-\\uDC7B\\uDC7D-\\uDC80\\uDC84\\uDC88-\\uDC8E\\uDC90\\uDC92-\\uDCA9\\uDCAB-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDDA4\\uDDFB-\\uDE2D\\uDE2F-\\uDE34\\uDE37-\\uDE41\\uDE43\\uDE44\\uDE48-\\uDE4A\\uDE80-\\uDEA2\\uDEA4-\\uDEB3\\uDEB7-\\uDEBF\\uDEC1-\\uDEC5\\uDED0-\\uDED2\\uDED5-\\uDED8\\uDEDC-\\uDEDF\\uDEEB\\uDEEC\\uDEF4-\\uDEFC\\uDFE0-\\uDFEB\\uDFF0]|\\uDC08(?:\\u200D\\u2B1B)?|\\uDC15(?:\\u200D\\uD83E\\uDDBA)?|\\uDC26(?:\\u200D(?:\\u2B1B|\\uD83D\\uDD25))?|\\uDC3B(?:\\u200D\\u2744\\uFE0F?)?|\\uDC41\\uFE0F?(?:\\u200D\\uD83D\\uDDE8\\uFE0F?)?|\\uDC68(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDC68\\uDC69]\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDD1D\\uDEEF]\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE]|[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3])))?))?|\\uDC69(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?[\\uDC68\\uDC69]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?|\\uDC69\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?))|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFC-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFD\\uDFFF]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFE]|\\uDEEF\\u200D\\uD83D\\uDC69\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDD75(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\uDE2E(?:\\u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\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1|\\uDDD1\\u200D\\uD83E\\uDDD2(?:\\u200D\\uD83E\\uDDD2)?|\\uDDD2(?:\\u200D\\uD83E\\uDDD2)?))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFC-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFC-\\uDFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD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DFFF])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC30\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE])|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3\\uDE70]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF]|\\uDEEF\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDEF1(?:\\uD83C(?:\\uDFFB(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFC-\\uDFFF])?|\\uDFFC(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])?|\\uDFFD(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])?|\\uDFFE(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])?|\\uDFFF(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFE])?))?)/g;\n};\n","import stripAnsi from 'strip-ansi';\nimport {eastAsianWidth} from 'get-east-asian-width';\nimport emojiRegex from 'emoji-regex';\n\nconst segmenter = new Intl.Segmenter();\n\nconst defaultIgnorableCodePointRegex = /^\\p{Default_Ignorable_Code_Point}$/u;\n\nexport default function stringWidth(string, options = {}) {\n\tif (typeof string !== 'string' || string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tconst {\n\t\tambiguousIsNarrow = true,\n\t\tcountAnsiEscapeCodes = false,\n\t} = options;\n\n\tif (!countAnsiEscapeCodes) {\n\t\tstring = stripAnsi(string);\n\t}\n\n\tif (string.length === 0) {\n\t\treturn 0;\n\t}\n\n\tlet width = 0;\n\tconst eastAsianWidthOptions = {ambiguousAsWide: !ambiguousIsNarrow};\n\n\tfor (const {segment: character} of segmenter.segment(string)) {\n\t\tconst codePoint = character.codePointAt(0);\n\n\t\t// Ignore control characters\n\t\tif (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore zero-width characters\n\t\tif (\n\t\t\t(codePoint >= 0x20_0B && codePoint <= 0x20_0F) // Zero-width space, non-joiner, joiner, left-to-right mark, right-to-left mark\n\t\t\t|| codePoint === 0xFE_FF // Zero-width no-break space\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore combining characters\n\t\tif (\n\t\t\t(codePoint >= 0x3_00 && codePoint <= 0x3_6F) // Combining diacritical marks\n\t\t\t|| (codePoint >= 0x1A_B0 && codePoint <= 0x1A_FF) // Combining diacritical marks extended\n\t\t\t|| (codePoint >= 0x1D_C0 && codePoint <= 0x1D_FF) // Combining diacritical marks supplement\n\t\t\t|| (codePoint >= 0x20_D0 && codePoint <= 0x20_FF) // Combining diacritical marks for symbols\n\t\t\t|| (codePoint >= 0xFE_20 && codePoint <= 0xFE_2F) // Combining half marks\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore surrogate pairs\n\t\tif (codePoint >= 0xD8_00 && codePoint <= 0xDF_FF) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Ignore variation selectors\n\t\tif (codePoint >= 0xFE_00 && codePoint <= 0xFE_0F) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// This covers some of the above cases, but we still keep them for performance reasons.\n\t\tif (defaultIgnorableCodePointRegex.test(character)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// TODO: Use `/\\p{RGI_Emoji}/v` when targeting Node.js 20.\n\t\tif (emojiRegex().test(character)) {\n\t\t\twidth += 2;\n\t\t\tcontinue;\n\t\t}\n\n\t\twidth += eastAsianWidth(codePoint, eastAsianWidthOptions);\n\t}\n\n\treturn width;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","import stringWidth from 'string-width';\n\nexport default function widestLine(string) {\n\tlet lineWidth = 0;\n\n\tfor (const line of string.split('\\n')) {\n\t\tlineWidth = Math.max(lineWidth, stringWidth(line));\n\t}\n\n\treturn lineWidth;\n}\n","","'use strict';\nconst cliBoxes = require('./boxes.json');\n\nmodule.exports = cliBoxes;\n// TODO: Remove this for the next major release\nmodule.exports.default = cliBoxes;\n","const UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\tlet isLastLastCharPreserved = false;\n\n\tfor (let index = 0; index < string.length; index++) {\n\t\tconst character = string[index];\n\t\tisLastLastCharPreserved = index > 2 ? string[index - 3] === '-' : true;\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, index) + '-' + string.slice(index);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\tindex++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {\n\t\t\tstring = string.slice(0, index - 1) + '-' + string.slice(index - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replaceAll(LEADING_CAPITAL, match => toLowerCase(match));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input\n\t\t.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ['_', '-'].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match))\n\t\t.replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));\n};\n\nexport default function camelCase(input, options) {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false\n\t\t? string => string.toLowerCase()\n\t\t: string => string.toLocaleLowerCase(options.locale);\n\n\tconst toUpperCase = options.locale === false\n\t\t? string => string.toUpperCase()\n\t\t: string => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\tif (SEPARATORS.test(input)) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\tinput = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n}\n","'use strict'\n\nconst stringWidth = require('string-width')\n\nfunction ansiAlign (text, opts) {\n if (!text) return text\n\n opts = opts || {}\n const align = opts.align || 'center'\n\n // short-circuit `align: 'left'` as no-op\n if (align === 'left') return text\n\n const split = opts.split || '\\n'\n const pad = opts.pad || ' '\n const widthDiffFn = align !== 'right' ? halfDiff : fullDiff\n\n let returnString = false\n if (!Array.isArray(text)) {\n returnString = true\n text = String(text).split(split)\n }\n\n let width\n let maxWidth = 0\n text = text.map(function (str) {\n str = String(str)\n width = stringWidth(str)\n maxWidth = Math.max(width, maxWidth)\n return {\n str,\n width\n }\n }).map(function (obj) {\n return new Array(widthDiffFn(maxWidth, obj.width) + 1).join(pad) + obj.str\n })\n\n return returnString ? text.join(split) : text\n}\n\nansiAlign.left = function left (text) {\n return ansiAlign(text, { align: 'left' })\n}\n\nansiAlign.center = function center (text) {\n return ansiAlign(text, { align: 'center' })\n}\n\nansiAlign.right = function right (text) {\n return ansiAlign(text, { align: 'right' })\n}\n\nmodule.exports = ansiAlign\n\nfunction halfDiff (maxWidth, curWidth) {\n return Math.floor((maxWidth - curWidth) / 2)\n}\n\nfunction fullDiff (maxWidth, curWidth) {\n return maxWidth - curWidth\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import stringWidth from 'string-width';\nimport stripAnsi from 'strip-ansi';\nimport ansiStyles from 'ansi-styles';\n\nconst ESCAPES = new Set([\n\t'\\u001B',\n\t'\\u009B',\n]);\n\nconst END_CODE = 39;\nconst ANSI_ESCAPE_BELL = '\\u0007';\nconst ANSI_CSI = '[';\nconst ANSI_OSC = ']';\nconst ANSI_SGR_TERMINATOR = 'm';\nconst ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;\n\nconst wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;\nconst wrapAnsiHyperlink = url => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;\n\n// Calculate the length of words split on ' ', ignoring\n// the extra characters added by ansi escape codes\nconst wordLengths = string => string.split(' ').map(character => stringWidth(character));\n\n// Wrap a long word across multiple rows\n// Ansi escape codes do not count towards length\nconst wrapWord = (rows, word, columns) => {\n\tconst characters = [...word];\n\n\tlet isInsideEscape = false;\n\tlet isInsideLinkEscape = false;\n\tlet visible = stringWidth(stripAnsi(rows.at(-1)));\n\n\tfor (const [index, character] of characters.entries()) {\n\t\tconst characterLength = stringWidth(character);\n\n\t\tif (visible + characterLength <= columns) {\n\t\t\trows[rows.length - 1] += character;\n\t\t} else {\n\t\t\trows.push(character);\n\t\t\tvisible = 0;\n\t\t}\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tisInsideEscape = true;\n\n\t\t\tconst ansiEscapeLinkCandidate = characters.slice(index + 1, index + 1 + ANSI_ESCAPE_LINK.length).join('');\n\t\t\tisInsideLinkEscape = ansiEscapeLinkCandidate === ANSI_ESCAPE_LINK;\n\t\t}\n\n\t\tif (isInsideEscape) {\n\t\t\tif (isInsideLinkEscape) {\n\t\t\t\tif (character === ANSI_ESCAPE_BELL) {\n\t\t\t\t\tisInsideEscape = false;\n\t\t\t\t\tisInsideLinkEscape = false;\n\t\t\t\t}\n\t\t\t} else if (character === ANSI_SGR_TERMINATOR) {\n\t\t\t\tisInsideEscape = false;\n\t\t\t}\n\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisible += characterLength;\n\n\t\tif (visible === columns && index < characters.length - 1) {\n\t\t\trows.push('');\n\t\t\tvisible = 0;\n\t\t}\n\t}\n\n\t// It's possible that the last row we copy over is only\n\t// ansi escape characters, handle this edge-case\n\tif (!visible && rows.at(-1).length > 0 && rows.length > 1) {\n\t\trows[rows.length - 2] += rows.pop();\n\t}\n};\n\n// Trims spaces from a string ignoring invisible sequences\nconst stringVisibleTrimSpacesRight = string => {\n\tconst words = string.split(' ');\n\tlet last = words.length;\n\n\twhile (last > 0) {\n\t\tif (stringWidth(words[last - 1]) > 0) {\n\t\t\tbreak;\n\t\t}\n\n\t\tlast--;\n\t}\n\n\tif (last === words.length) {\n\t\treturn string;\n\t}\n\n\treturn words.slice(0, last).join(' ') + words.slice(last).join('');\n};\n\n// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode.\n//\n// 'hard' will never allow a string to take up more than columns characters.\n//\n// 'soft' allows long words to expand past the column length.\nconst exec = (string, columns, options = {}) => {\n\tif (options.trim !== false && string.trim() === '') {\n\t\treturn '';\n\t}\n\n\tlet returnValue = '';\n\tlet escapeCode;\n\tlet escapeUrl;\n\n\tconst lengths = wordLengths(string);\n\tlet rows = [''];\n\n\tfor (const [index, word] of string.split(' ').entries()) {\n\t\tif (options.trim !== false) {\n\t\t\trows[rows.length - 1] = rows.at(-1).trimStart();\n\t\t}\n\n\t\tlet rowLength = stringWidth(rows.at(-1));\n\n\t\tif (index !== 0) {\n\t\t\tif (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {\n\t\t\t\t// If we start with a new word but the current row length equals the length of the columns, add a new row\n\t\t\t\trows.push('');\n\t\t\t\trowLength = 0;\n\t\t\t}\n\n\t\t\tif (rowLength > 0 || options.trim === false) {\n\t\t\t\trows[rows.length - 1] += ' ';\n\t\t\t\trowLength++;\n\t\t\t}\n\t\t}\n\n\t\t// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'\n\t\tif (options.hard && lengths[index] > columns) {\n\t\t\tconst remainingColumns = (columns - rowLength);\n\t\t\tconst breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);\n\t\t\tconst breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);\n\t\t\tif (breaksStartingNextLine < breaksStartingThisLine) {\n\t\t\t\trows.push('');\n\t\t\t}\n\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {\n\t\t\tif (options.wordWrap === false && rowLength < columns) {\n\t\t\t\twrapWord(rows, word, columns);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trows.push('');\n\t\t}\n\n\t\tif (rowLength + lengths[index] > columns && options.wordWrap === false) {\n\t\t\twrapWord(rows, word, columns);\n\t\t\tcontinue;\n\t\t}\n\n\t\trows[rows.length - 1] += word;\n\t}\n\n\tif (options.trim !== false) {\n\t\trows = rows.map(row => stringVisibleTrimSpacesRight(row));\n\t}\n\n\tconst preString = rows.join('\\n');\n\tconst pre = [...preString];\n\n\t// We need to keep a separate index as `String#slice()` works on Unicode code units, while `pre` is an array of codepoints.\n\tlet preStringIndex = 0;\n\n\tfor (const [index, character] of pre.entries()) {\n\t\treturnValue += character;\n\n\t\tif (ESCAPES.has(character)) {\n\t\t\tconst {groups} = new RegExp(`(?:\\\\${ANSI_CSI}(?<code>\\\\d+)m|\\\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(preString.slice(preStringIndex)) || {groups: {}};\n\t\t\tif (groups.code !== undefined) {\n\t\t\t\tconst code = Number.parseFloat(groups.code);\n\t\t\t\tescapeCode = code === END_CODE ? undefined : code;\n\t\t\t} else if (groups.uri !== undefined) {\n\t\t\t\tescapeUrl = groups.uri.length === 0 ? undefined : groups.uri;\n\t\t\t}\n\t\t}\n\n\t\tconst code = ansiStyles.codes.get(Number(escapeCode));\n\n\t\tif (pre[index + 1] === '\\n') {\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink('');\n\t\t\t}\n\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(code);\n\t\t\t}\n\t\t} else if (character === '\\n') {\n\t\t\tif (escapeCode && code) {\n\t\t\t\treturnValue += wrapAnsiCode(escapeCode);\n\t\t\t}\n\n\t\t\tif (escapeUrl) {\n\t\t\t\treturnValue += wrapAnsiHyperlink(escapeUrl);\n\t\t\t}\n\t\t}\n\n\t\tpreStringIndex += character.length;\n\t}\n\n\treturn returnValue;\n};\n\n// For each newline, invoke the method separately\nexport default function wrapAnsi(string, columns, options) {\n\treturn String(string)\n\t\t.normalize()\n\t\t.replaceAll('\\r\\n', '\\n')\n\t\t.split('\\n')\n\t\t.map(line => exec(line, columns, options))\n\t\t.join('\\n');\n}\n","import process from 'node:process';\nimport stringWidth from 'string-width';\nimport chalk from 'chalk';\nimport widestLine from 'widest-line';\nimport cliBoxes from 'cli-boxes';\nimport camelCase from 'camelcase';\nimport ansiAlign from 'ansi-align';\nimport wrapAnsi from 'wrap-ansi';\n\nconst NEWLINE = '\\n';\nconst PAD = ' ';\nconst NONE = 'none';\n\nconst terminalColumns = () => {\n\tconst {env, stdout, stderr} = process;\n\n\tif (stdout?.columns) {\n\t\treturn stdout.columns;\n\t}\n\n\tif (stderr?.columns) {\n\t\treturn stderr.columns;\n\t}\n\n\tif (env.COLUMNS) {\n\t\treturn Number.parseInt(env.COLUMNS, 10);\n\t}\n\n\treturn 80;\n};\n\nconst getObject = detail => typeof detail === 'number' ? {\n\ttop: detail,\n\tright: detail * 3,\n\tbottom: detail,\n\tleft: detail * 3,\n} : {\n\ttop: 0,\n\tright: 0,\n\tbottom: 0,\n\tleft: 0,\n\t...detail,\n};\n\nconst getBorderWidth = borderStyle => borderStyle === NONE ? 0 : 2;\n\nconst getBorderChars = borderStyle => {\n\tconst sides = [\n\t\t'topLeft',\n\t\t'topRight',\n\t\t'bottomRight',\n\t\t'bottomLeft',\n\t\t'left',\n\t\t'right',\n\t\t'top',\n\t\t'bottom',\n\t];\n\n\tlet characters;\n\n\t// Create empty border style\n\tif (borderStyle === NONE) {\n\t\tborderStyle = {};\n\t\tfor (const side of sides) {\n\t\t\tborderStyle[side] = '';\n\t\t}\n\t}\n\n\tif (typeof borderStyle === 'string') {\n\t\tcharacters = cliBoxes[borderStyle];\n\n\t\tif (!characters) {\n\t\t\tthrow new TypeError(`Invalid border style: ${borderStyle}`);\n\t\t}\n\t} else {\n\t\t// Ensure retro-compatibility\n\t\tif (typeof borderStyle?.vertical === 'string') {\n\t\t\tborderStyle.left = borderStyle.vertical;\n\t\t\tborderStyle.right = borderStyle.vertical;\n\t\t}\n\n\t\t// Ensure retro-compatibility\n\t\tif (typeof borderStyle?.horizontal === 'string') {\n\t\t\tborderStyle.top = borderStyle.horizontal;\n\t\t\tborderStyle.bottom = borderStyle.horizontal;\n\t\t}\n\n\t\tfor (const side of sides) {\n\t\t\tif (borderStyle[side] === null || typeof borderStyle[side] !== 'string') {\n\t\t\t\tthrow new TypeError(`Invalid border style: ${side}`);\n\t\t\t}\n\t\t}\n\n\t\tcharacters = borderStyle;\n\t}\n\n\treturn characters;\n};\n\nconst makeTitle = (text, horizontal, alignment) => {\n\tlet title = '';\n\n\tconst textWidth = stringWidth(text);\n\n\tswitch (alignment) {\n\t\tcase 'left': {\n\t\t\ttitle = text + horizontal.slice(textWidth);\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'right': {\n\t\t\ttitle = horizontal.slice(textWidth) + text;\n\t\t\tbreak;\n\t\t}\n\n\t\tdefault: {\n\t\t\thorizontal = horizontal.slice(textWidth);\n\n\t\t\tif (horizontal.length % 2 === 1) { // This is needed in case the length is odd\n\t\t\t\thorizontal = horizontal.slice(Math.floor(horizontal.length / 2));\n\t\t\t\ttitle = horizontal.slice(1) + text + horizontal; // We reduce the left part of one character to avoid the bar to go beyond its limit\n\t\t\t} else {\n\t\t\t\thorizontal = horizontal.slice(horizontal.length / 2);\n\t\t\t\ttitle = horizontal + text + horizontal;\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn title;\n};\n\nconst makeContentText = (text, {padding, width, textAlignment, height}) => {\n\ttext = ansiAlign(text, {align: textAlignment});\n\tlet lines = text.split(NEWLINE);\n\tconst textWidth = widestLine(text);\n\n\tconst max = width - padding.left - padding.right;\n\n\tif (textWidth > max) {\n\t\tconst newLines = [];\n\t\tfor (const line of lines) {\n\t\t\tconst createdLines = wrapAnsi(line, max, {hard: true});\n\t\t\tconst alignedLines = ansiAlign(createdLines, {align: textAlignment});\n\t\t\tconst alignedLinesArray = alignedLines.split('\\n');\n\t\t\tconst longestLength = Math.max(...alignedLinesArray.map(s => stringWidth(s)));\n\n\t\t\tfor (const alignedLine of alignedLinesArray) {\n\t\t\t\tlet paddedLine;\n\t\t\t\tswitch (textAlignment) {\n\t\t\t\t\tcase 'center': {\n\t\t\t\t\t\tpaddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase 'right': {\n\t\t\t\t\t\tpaddedLine = PAD.repeat(max - longestLength) + alignedLine;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tpaddedLine = alignedLine;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnewLines.push(paddedLine);\n\t\t\t}\n\t\t}\n\n\t\tlines = newLines;\n\t}\n\n\tif (textAlignment === 'center' && textWidth < max) {\n\t\tlines = lines.map(line => PAD.repeat((max - textWidth) / 2) + line);\n\t} else if (textAlignment === 'right' && textWidth < max) {\n\t\tlines = lines.map(line => PAD.repeat(max - textWidth) + line);\n\t}\n\n\tconst paddingLeft = PAD.repeat(padding.left);\n\tconst paddingRight = PAD.repeat(padding.right);\n\n\tlines = lines.map(line => {\n\t\tconst newLine = paddingLeft + line + paddingRight;\n\n\t\treturn newLine + PAD.repeat(width - stringWidth(newLine));\n\t});\n\n\tif (padding.top > 0) {\n\t\tlines = [...Array.from({length: padding.top}).fill(PAD.repeat(width)), ...lines];\n\t}\n\n\tif (padding.bottom > 0) {\n\t\tlines = [...lines, ...Array.from({length: padding.bottom}).fill(PAD.repeat(width))];\n\t}\n\n\tif (height && lines.length > height) {\n\t\tlines = lines.slice(0, height);\n\t} else if (height && lines.length < height) {\n\t\tlines = [...lines, ...Array.from({length: height - lines.length}).fill(PAD.repeat(width))];\n\t}\n\n\treturn lines.join(NEWLINE);\n};\n\nconst boxContent = (content, contentWidth, options) => {\n\tconst colorizeBorder = border => {\n\t\tconst newBorder = options.borderColor ? getColorFunction(options.borderColor)(border) : border;\n\t\treturn options.dimBorder ? chalk.dim(newBorder) : newBorder;\n\t};\n\n\tconst colorizeContent = content => options.backgroundColor ? getBGColorFunction(options.backgroundColor)(content) : content;\n\n\tconst chars = getBorderChars(options.borderStyle);\n\tconst columns = terminalColumns();\n\tlet marginLeft = PAD.repeat(options.margin.left);\n\n\tif (options.float === 'center') {\n\t\tconst marginWidth = Math.max((columns - contentWidth - getBorderWidth(options.borderStyle)) / 2, 0);\n\t\tmarginLeft = PAD.repeat(marginWidth);\n\t} else if (options.float === 'right') {\n\t\tconst marginWidth = Math.max(columns - contentWidth - options.margin.right - getBorderWidth(options.borderStyle), 0);\n\t\tmarginLeft = PAD.repeat(marginWidth);\n\t}\n\n\tlet result = '';\n\n\tif (options.margin.top) {\n\t\tresult += NEWLINE.repeat(options.margin.top);\n\t}\n\n\tif (options.borderStyle !== NONE || options.title) {\n\t\tresult += colorizeBorder(marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight) + NEWLINE;\n\t}\n\n\tconst lines = content.split(NEWLINE);\n\n\tresult += lines.map(line => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);\n\n\tif (options.borderStyle !== NONE) {\n\t\tresult += NEWLINE + colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight);\n\t}\n\n\tif (options.margin.bottom) {\n\t\tresult += NEWLINE.repeat(options.margin.bottom);\n\t}\n\n\treturn result;\n};\n\nconst sanitizeOptions = options => {\n\t// If fullscreen is enabled, max-out unspecified width/height\n\tif (options.fullscreen && process?.stdout) {\n\t\tlet newDimensions = [process.stdout.columns, process.stdout.rows];\n\n\t\tif (typeof options.fullscreen === 'function') {\n\t\t\tnewDimensions = options.fullscreen(...newDimensions);\n\t\t}\n\n\t\toptions.width ||= newDimensions[0];\n\n\t\toptions.height ||= newDimensions[1];\n\t}\n\n\t// If width is provided, make sure it's not below 1\n\toptions.width &&= Math.max(1, options.width - getBorderWidth(options.borderStyle));\n\n\t// If height is provided, make sure it's not below 1\n\toptions.height &&= Math.max(1, options.height - getBorderWidth(options.borderStyle));\n\n\treturn options;\n};\n\nconst formatTitle = (title, borderStyle) => borderStyle === NONE ? title : ` ${title} `;\n\nconst determineDimensions = (text, options) => {\n\toptions = sanitizeOptions(options);\n\tconst widthOverride = options.width !== undefined;\n\tconst columns = terminalColumns();\n\tconst borderWidth = getBorderWidth(options.borderStyle);\n\tconst maxWidth = columns - options.margin.left - options.margin.right - borderWidth;\n\n\tconst widest = widestLine(wrapAnsi(text, columns - borderWidth, {hard: true, trim: false})) + options.padding.left + options.padding.right;\n\n\t// If title and width are provided, title adheres to fixed width\n\tif (options.title && widthOverride) {\n\t\toptions.title = options.title.slice(0, Math.max(0, options.width - 2));\n\t\toptions.title &&= formatTitle(options.title, options.borderStyle);\n\t} else if (options.title) {\n\t\toptions.title = options.title.slice(0, Math.max(0, maxWidth - 2));\n\n\t\t// Recheck if title isn't empty now\n\t\tif (options.title) {\n\t\t\toptions.title = formatTitle(options.title, options.borderStyle);\n\t\t\t// If the title is larger than content, box adheres to title width\n\t\t\tif (stringWidth(options.title) > widest) {\n\t\t\t\toptions.width = stringWidth(options.title);\n\t\t\t}\n\t\t}\n\t}\n\n\t// If fixed width is provided, use it or content width as reference\n\toptions.width ||= widest;\n\n\tif (!widthOverride) {\n\t\tif ((options.margin.left && options.margin.right) && options.width > maxWidth) {\n\t\t\t// Let's assume we have margins: left = 3, right = 5, in total = 8\n\t\t\tconst spaceForMargins = columns - options.width - borderWidth;\n\t\t\t// Let's assume we have space = 4\n\t\t\tconst multiplier = spaceForMargins / (options.margin.left + options.margin.right);\n\t\t\t// Here: multiplier = 4/8 = 0.5\n\t\t\toptions.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));\n\t\t\toptions.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));\n\t\t\t// Left: 3 * 0.5 = 1.5 -> 1\n\t\t\t// Right: 6 * 0.5 = 3\n\t\t}\n\n\t\t// Re-cap width considering the margins after shrinking\n\t\toptions.width = Math.min(options.width, columns - borderWidth - options.margin.left - options.margin.right);\n\t}\n\n\t// Prevent padding overflow\n\tif (options.width - (options.padding.left + options.padding.right) <= 0) {\n\t\toptions.padding.left = 0;\n\t\toptions.padding.right = 0;\n\t}\n\n\tif (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {\n\t\toptions.padding.top = 0;\n\t\toptions.padding.bottom = 0;\n\t}\n\n\treturn options;\n};\n\nconst isHex = color => color.match(/^#(?:[0-f]{3}){1,2}$/i);\nconst isColorValid = color => typeof color === 'string' && (chalk[color] ?? isHex(color));\nconst getColorFunction = color => isHex(color) ? chalk.hex(color) : chalk[color];\nconst getBGColorFunction = color => isHex(color) ? chalk.bgHex(color) : chalk[camelCase(['bg', color])];\n\nexport default function boxen(text, options) {\n\toptions = {\n\t\tpadding: 0,\n\t\tborderStyle: 'single',\n\t\tdimBorder: false,\n\t\ttextAlignment: 'left',\n\t\tfloat: 'left',\n\t\ttitleAlignment: 'left',\n\t\t...options,\n\t};\n\n\t// This option is deprecated\n\tif (options.align) {\n\t\toptions.textAlignment = options.align;\n\t}\n\n\tif (options.borderColor && !isColorValid(options.borderColor)) {\n\t\tthrow new Error(`${options.borderColor} is not a valid borderColor`);\n\t}\n\n\tif (options.backgroundColor && !isColorValid(options.backgroundColor)) {\n\t\tthrow new Error(`${options.backgroundColor} is not a valid backgroundColor`);\n\t}\n\n\toptions.padding = getObject(options.padding);\n\toptions.margin = getObject(options.margin);\n\n\toptions = determineDimensions(text, options);\n\n\ttext = makeContentText(text, options);\n\n\treturn boxContent(text, options.width, options);\n}\n\nexport {default as _borderStyles} from 'cli-boxes';\n","import boxen from 'boxen';\nimport chalk from 'chalk';\n\n/**\n * Display the tool banner\n */\nexport function showBanner(command: string, version: string, quiet = false): void {\n if (quiet) {\n return;\n }\n\n const banner = boxen(\n `${chalk.bold.cyan('QTI <-> Learnosity Converter')}\\n` + `${chalk.dim('Version:')} ${version}\\n` + `${chalk.dim('Command:')} ${command}`,\n {\n padding: 1,\n margin: 1,\n borderStyle: 'round',\n borderColor: 'cyan',\n }\n );\n\n console.log(banner);\n}\n","import type { ConfigOptions } from './types.js';\nimport type { Diagnostic, QtiVersion, OutputFormat, DiagnosticsOutput, ItemReferenceSource, ItemFilenameSource } from '@learnosity/converter-core';\nimport { DiagnosticCode } from '@learnosity/converter-core';\n\nconst VALID_QTI_VERSIONS: QtiVersion[] = ['2.1', '2.2'];\nconst VALID_OUTPUT_FORMATS: OutputFormat[] = ['dir', 'zip', 'stdout'];\nconst VALID_DIAGNOSTICS_OUTPUTS: DiagnosticsOutput[] = ['stderr', 'file', 'both', 'none'];\nconst VALID_ITEM_REFERENCE_SOURCES: ItemReferenceSource[] = ['sourceFilename', 'qti', 'uuid'];\nconst VALID_ITEM_FILENAME_SOURCES: ItemFilenameSource[] = ['sourceFilename', 'qti'];\n\nconst KNOWN_CONFIG_KEYS = new Set(['qtiVersion', 'outputFormat', 'diagnostics', 'pretty', 'verbose', 'output', 'organisationId', 'mediaVault', 'customAssetUrl', 'itemReferenceSource', 'itemFilenameSource', 'truncateTags']);\n\n/**\n * Validate config object and return diagnostics\n */\nexport function validateConfig(config: Record<string, unknown>): { valid: ConfigOptions; diagnostics: Diagnostic[] } {\n const diagnostics: Diagnostic[] = [];\n const valid: ConfigOptions = {};\n\n // Check for unknown keys\n for (const key of Object.keys(config)) {\n if (!KNOWN_CONFIG_KEYS.has(key)) {\n diagnostics.push({\n level: 'warning',\n code: DiagnosticCode.CONFIG_UNKNOWN_KEY,\n message: `Unknown config key: \"${key}\"`,\n file: '',\n context: { key },\n });\n }\n }\n\n // Validate qtiVersion\n if ('qtiVersion' in config) {\n if (typeof config.qtiVersion === 'string' && VALID_QTI_VERSIONS.includes(config.qtiVersion as QtiVersion)) {\n valid.qtiVersion = config.qtiVersion as QtiVersion;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid qtiVersion: \"${config.qtiVersion}\". Must be \"2.1\" or \"2.2\".`,\n file: 'qtiVersion',\n });\n }\n }\n\n // Validate outputFormat\n if ('outputFormat' in config) {\n if (typeof config.outputFormat === 'string' && VALID_OUTPUT_FORMATS.includes(config.outputFormat as OutputFormat)) {\n valid.outputFormat = config.outputFormat as OutputFormat;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid outputFormat: \"${config.outputFormat}\". Must be \"dir\", \"zip\", or \"stdout\".`,\n file: 'outputFormat',\n });\n }\n }\n\n // Validate diagnostics\n if ('diagnostics' in config) {\n if (typeof config.diagnostics === 'string' && VALID_DIAGNOSTICS_OUTPUTS.includes(config.diagnostics as DiagnosticsOutput)) {\n valid.diagnostics = config.diagnostics as DiagnosticsOutput;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid diagnostics: \"${config.diagnostics}\". Must be \"stderr\", \"file\", \"both\", or \"none\".`,\n file: 'diagnostics',\n });\n }\n }\n\n // Validate pretty\n if ('pretty' in config) {\n if (typeof config.pretty === 'boolean') {\n valid.pretty = config.pretty;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid pretty: \"${config.pretty}\". Must be boolean.`,\n file: 'pretty',\n });\n }\n }\n\n // Validate verbose\n if ('verbose' in config) {\n if (typeof config.verbose === 'boolean') {\n valid.verbose = config.verbose;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid verbose: \"${config.verbose}\". Must be boolean.`,\n file: 'verbose',\n });\n }\n }\n\n // Validate output\n if ('output' in config) {\n if (typeof config.output === 'string') {\n valid.output = config.output;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid output: \"${config.output}\". Must be string.`,\n file: 'output',\n });\n }\n }\n\n // Validate organisationId\n if ('organisationId' in config) {\n if (typeof config.organisationId === 'number' && Number.isInteger(config.organisationId)) {\n valid.organisationId = config.organisationId;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid organisationId: \"${config.organisationId}\". Must be an integer.`,\n file: 'organisationId',\n });\n }\n }\n\n // Validate mediaVault\n if ('mediaVault' in config) {\n if (typeof config.mediaVault === 'boolean') {\n valid.mediaVault = config.mediaVault;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid mediaVault: \"${config.mediaVault}\". Must be boolean.`,\n file: 'mediaVault',\n });\n }\n }\n\n // Validate customAssetUrl\n if ('customAssetUrl' in config) {\n if (typeof config.customAssetUrl === 'string') {\n valid.customAssetUrl = config.customAssetUrl;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid customAssetUrl: \"${config.customAssetUrl}\". Must be string.`,\n file: 'customAssetUrl',\n });\n }\n }\n\n // Validate itemReferenceSource\n if ('itemReferenceSource' in config) {\n if (typeof config.itemReferenceSource === 'string' && VALID_ITEM_REFERENCE_SOURCES.includes(config.itemReferenceSource as ItemReferenceSource)) {\n valid.itemReferenceSource = config.itemReferenceSource as ItemReferenceSource;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid itemReferenceSource: \"${config.itemReferenceSource}\". Must be \"sourceFilename\", \"qti\", or \"uuid\".`,\n file: 'itemReferenceSource',\n });\n }\n }\n\n // Validate truncateTags\n if ('truncateTags' in config) {\n if (typeof config.truncateTags === 'boolean') {\n valid.truncateTags = config.truncateTags;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid truncateTags: \"${config.truncateTags}\". Must be boolean.`,\n file: 'truncateTags',\n });\n }\n }\n\n // Validate itemFilenameSource\n if ('itemFilenameSource' in config) {\n if (typeof config.itemFilenameSource === 'string' && VALID_ITEM_FILENAME_SOURCES.includes(config.itemFilenameSource as ItemFilenameSource)) {\n valid.itemFilenameSource = config.itemFilenameSource as ItemFilenameSource;\n } else {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: `Invalid itemFilenameSource: \"${config.itemFilenameSource}\". Must be \"sourceFilename\" or \"qti\".`,\n file: 'itemFilenameSource',\n });\n }\n }\n\n return { valid, diagnostics };\n}\n","import { readFile, access } from 'fs/promises';\nimport { resolve } from 'path';\nimport type { ConfigOptions } from './types.js';\nimport type { Diagnostic } from '@learnosity/converter-core';\nimport { DiagnosticCode } from '@learnosity/converter-core';\nimport { validateConfig } from './schema.js';\n\nexport interface ConfigLoadResult {\n config: ConfigOptions | null;\n diagnostics: Diagnostic[];\n configPath: string | null;\n}\n\n/**\n * Load config from file path\n */\nexport async function loadConfigFromPath(configPath: string): Promise<ConfigLoadResult> {\n const diagnostics: Diagnostic[] = [];\n\n // configPath is the operator's own --config argument. Resolving it is the\n // intended behaviour: the CLI must be able to load a config from anywhere on\n // the machine the operator can already read.\n // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal, javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal\n const absolutePath = resolve(configPath);\n\n try {\n await access(absolutePath);\n } catch {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_FILE_NOT_FOUND,\n message: `Config file not found: ${absolutePath}`,\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n let content: string;\n\n try {\n content = await readFile(absolutePath, 'utf-8');\n } catch (error) {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_FILE_NOT_FOUND,\n message: `Failed to read config file: ${error instanceof Error ? error.message : 'unknown error'}`,\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n let parsed: unknown;\n\n try {\n parsed = JSON.parse(content);\n } catch (error) {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_FILE_INVALID_JSON,\n message: `Invalid JSON in config file: ${error instanceof Error ? error.message : 'unknown error'}`,\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {\n diagnostics.push({\n level: 'error',\n code: DiagnosticCode.CONFIG_SCHEMA_INVALID,\n message: 'Config file must be a JSON object',\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n const { valid, diagnostics: validationDiagnostics } = validateConfig(\n parsed as Record<string, unknown>\n );\n\n diagnostics.push(...validationDiagnostics);\n\n // If there are errors, don't return config\n const hasErrors = diagnostics.some((d) => d.level === 'error');\n\n if (hasErrors) {\n return { config: null, diagnostics, configPath: null };\n }\n\n diagnostics.push({\n level: 'info',\n code: DiagnosticCode.CONFIG_LOADED,\n message: `Config loaded from ${absolutePath}`,\n file: '',\n context: { configPath: absolutePath },\n });\n\n return { config: valid, diagnostics, configPath: absolutePath };\n}\n\n/**\n * Load config with discovery (default path or explicit)\n */\nexport async function loadConfig(\n explicitPath?: string,\n noConfig?: boolean\n): Promise<ConfigLoadResult> {\n const diagnostics: Diagnostic[] = [];\n\n // If --no-config, return early\n if (noConfig) {\n diagnostics.push({\n level: 'info',\n code: DiagnosticCode.CONFIG_DISABLED,\n message: 'Config loading disabled via --no-config',\n file: '',\n });\n\n return { config: null, diagnostics, configPath: null };\n }\n\n // If explicit path provided, load it\n if (explicitPath) {\n return loadConfigFromPath(explicitPath);\n }\n\n // Try default path\n const defaultPath = resolve(process.cwd(), 'lrn-converter.config.json');\n\n try {\n await access(defaultPath);\n\n return loadConfigFromPath(defaultPath);\n } catch {\n // Default config doesn't exist, that's fine\n return { config: null, diagnostics: [], configPath: null };\n }\n}\n","import { homedir } from 'os';\n\n/**\n * Expand tilde (~) to home directory in paths.\n *\n * Handles:\n * - `~/path` → `/home/user/path`\n * - `~` → `/home/user`\n *\n * Does NOT handle `~username/path` syntax (returns unchanged).\n *\n * @param filePath - The file path that may contain a tilde\n * @returns The path with tilde expanded to home directory\n */\nexport function expandTilde(filePath: string): string {\n if (filePath.startsWith('~/')) {\n return filePath.replace('~', homedir());\n }\n if (filePath === '~') {\n return homedir();\n }\n\n return filePath;\n}\n\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"mappings":";;;;;;;;;;AACA,MAAM,aAAa,EACf,uBAAuB,OAC3B;AACA,IAAA,eAAe,cAAc,QAAQ,SAAS;CAC1C,MAAM,EAAE,UAAU,UAAU;CAC5B,MAAM,QAAQ,UAAU,YAAY,OAAO,KAAK;CAChD,MAAM,CAAC,QAAQ,aAAa,SAAS,MAAM;CAG3C,MAAM,CAAC,cAAc,mBAAmB,SAAS,OAAO,OAAO,WAAW,EAAE,CAAC;CAC7E,MAAM,CAAC,UAAU,YAAY,SAAS;CACtC,MAAM,CAAC,OAAO,YAAY,SAAS,EAAE;CACrC,MAAM,SAAS,UAAU;EAAE;EAAQ;CAAM,CAAC;CAC1C,eAAe,SAAS,OAAO;EAC3B,MAAM,EAAE,UAAU,SAAS,eAAe,oBAAoB;EAC9D,IAAI,YAAY,CAAC,OACb,OAAO;EAEX,IAAI,WAAW,CAAC,QAAQ,KAAK,KAAK,GAC9B,OAAO;EAEX,IAAI,OAAO,OAAO,aAAa,YAC3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