BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro-source-map/src
Run
Logout
Edit File
Size: 4.25 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro-source-map/src/source-map.js
Text
Base64
"use strict"; const { BundleBuilder, createIndexMap } = require("./BundleBuilder"); const composeSourceMaps = require("./composeSourceMaps"); const Consumer = require("./Consumer"); const normalizeSourcePath = require("./Consumer/normalizeSourcePath"); const { functionMapBabelPlugin, generateFunctionMap, } = require("./generateFunctionMap"); const Generator = require("./Generator"); const SourceMap = require("source-map"); function fromRawMappingsImpl(isBlocking, onDone, modules, offsetLines) { const modulesToProcess = modules.slice(); const generator = new Generator(); let carryOver = offsetLines; function processNextModule() { if (modulesToProcess.length === 0) { return true; } const mod = modulesToProcess.shift(); const { code, map } = mod; if (Array.isArray(map)) { addMappingsForFile(generator, map, mod, carryOver); } else if (map != null) { throw new Error( `Unexpected module with full source map found: ${mod.path}` ); } carryOver = carryOver + countLines(code); return false; } function workLoop() { const time = process.hrtime(); while (true) { const isDone = processNextModule(); if (isDone) { onDone(generator); break; } if (!isBlocking) { const diff = process.hrtime(time); const NS_IN_MS = 1000000; if (diff[1] > 50 * NS_IN_MS) { setImmediate(workLoop); break; } } } } workLoop(); } function fromRawMappings(modules, offsetLines = 0) { let generator; fromRawMappingsImpl( true, (g) => { generator = g; }, modules, offsetLines ); if (generator == null) { throw new Error("Expected fromRawMappingsImpl() to finish synchronously."); } return generator; } async function fromRawMappingsNonBlocking(modules, offsetLines = 0) { return new Promise((resolve) => { fromRawMappingsImpl(false, resolve, modules, offsetLines); }); } function toBabelSegments(sourceMap) { const rawMappings = []; new SourceMap.SourceMapConsumer(sourceMap).eachMapping((map) => { rawMappings.push( map.originalLine == null || map.originalColumn == null ? { generated: { line: map.generatedLine, column: map.generatedColumn, }, source: map.source, name: map.name, } : { generated: { line: map.generatedLine, column: map.generatedColumn, }, original: { line: map.originalLine, column: map.originalColumn, }, source: map.source, name: map.name, } ); }); return rawMappings; } function toSegmentTuple(mapping) { const { column, line } = mapping.generated; const { name, original } = mapping; if (original == null) { return [line, column]; } if (typeof name !== "string") { return [line, column, original.line, original.column]; } return [line, column, original.line, original.column, name]; } function addMappingsForFile(generator, mappings, module, carryOver) { generator.startFile(module.path, module.source, module.functionMap, { addToIgnoreList: module.isIgnored, }); for (let i = 0, n = mappings.length; i < n; ++i) { addMapping(generator, mappings[i], carryOver); } generator.endFile(); } function addMapping(generator, mapping, carryOver) { const line = mapping[0] + carryOver; const column = mapping[1]; switch (mapping.length) { case 2: generator.addSimpleMapping(line, column); return; case 4: generator.addSourceMapping(line, column, mapping[2], mapping[3]); return; case 5: generator.addNamedSourceMapping( line, column, mapping[2], mapping[3], mapping[4] ); return; } throw new Error(`Invalid mapping: [${mapping.join(", ")}]`); } const newline = /\r\n?|\n|\u2028|\u2029/g; const countLines = (string) => (string.match(newline) || []).length + 1; module.exports = { BundleBuilder, composeSourceMaps, Consumer, createIndexMap, generateFunctionMap, fromRawMappings, fromRawMappingsNonBlocking, functionMapBabelPlugin, normalizeSourcePath, toBabelSegments, toSegmentTuple, };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 15
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Consumer
DIR
-
drwxr-xr-x
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
B64Builder.js
1.23 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
B64Builder.js.flow
2.33 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BundleBuilder.js
1.76 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BundleBuilder.js.flow
2.71 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
composeSourceMaps.js
2.85 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
composeSourceMaps.js.flow
3.74 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
encode.js
1001 B
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
encode.js.flow
4.32 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
generateFunctionMap.js
10.27 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
generateFunctionMap.js.flow
16.27 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Generator.js
4.63 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Generator.js.flow
7.14 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
source-map.d.ts
1.53 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
source-map.js
4.25 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
source-map.js.flow
8.79 KB
lrw-r--r--
2025-03-28 11:04:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).