Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/vite/dist/node/runtime.js

    rd565449 r0c6b92a  
    9595  intToChar[i] = c, charToInt[c] = i;
    9696}
    97 function decode(mappings) {
    98   const state = new Int32Array(5), decoded = [];
    99   let index = 0;
    100   do {
    101     const semi = indexOf(mappings, index), line = [];
    102     let sorted = !0, lastCol = 0;
    103     state[0] = 0;
    104     for (let i = index; i < semi; i++) {
    105       let seg;
    106       i = decodeInteger(mappings, i, state, 0);
    107       const col = state[0];
    108       col < lastCol && (sorted = !1), lastCol = col, hasMoreVlq(mappings, i, semi) ? (i = decodeInteger(mappings, i, state, 1), i = decodeInteger(mappings, i, state, 2), i = decodeInteger(mappings, i, state, 3), hasMoreVlq(mappings, i, semi) ? (i = decodeInteger(mappings, i, state, 4), seg = [col, state[1], state[2], state[3], state[4]]) : seg = [col, state[1], state[2], state[3]]) : seg = [col], line.push(seg);
    109     }
    110     sorted || sort(line), decoded.push(line), index = semi + 1;
    111   } while (index <= mappings.length);
    112   return decoded;
    113 }
    114 function indexOf(mappings, index) {
    115   const idx = mappings.indexOf(";", index);
    116   return idx === -1 ? mappings.length : idx;
    117 }
    118 function decodeInteger(mappings, pos, state, j) {
     97function decodeInteger(reader, relative) {
    11998  let value = 0, shift = 0, integer = 0;
    12099  do {
    121     const c = mappings.charCodeAt(pos++);
     100    const c = reader.next();
    122101    integer = charToInt[c], value |= (integer & 31) << shift, shift += 5;
    123102  } while (integer & 32);
    124103  const shouldNegate = value & 1;
    125   return value >>>= 1, shouldNegate && (value = -2147483648 | -value), state[j] += value, pos;
    126 }
    127 function hasMoreVlq(mappings, i, length) {
    128   return i >= length ? !1 : mappings.charCodeAt(i) !== comma;
     104  return value >>>= 1, shouldNegate && (value = -2147483648 | -value), relative + value;
     105}
     106function hasMoreVlq(reader, max) {
     107  return reader.pos >= max ? !1 : reader.peek() !== comma;
     108}
     109class StringReader {
     110  constructor(buffer) {
     111    this.pos = 0, this.buffer = buffer;
     112  }
     113  next() {
     114    return this.buffer.charCodeAt(this.pos++);
     115  }
     116  peek() {
     117    return this.buffer.charCodeAt(this.pos);
     118  }
     119  indexOf(char) {
     120    const { buffer, pos } = this, idx = buffer.indexOf(char, pos);
     121    return idx === -1 ? buffer.length : idx;
     122  }
     123}
     124function decode(mappings) {
     125  const { length } = mappings, reader = new StringReader(mappings), decoded = [];
     126  let genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;
     127  do {
     128    const semi = reader.indexOf(";"), line = [];
     129    let sorted = !0, lastCol = 0;
     130    for (genColumn = 0; reader.pos < semi; ) {
     131      let seg;
     132      genColumn = decodeInteger(reader, genColumn), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), hasMoreVlq(reader, semi) ? (namesIndex = decodeInteger(reader, namesIndex), seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]) : seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]) : seg = [genColumn], line.push(seg), reader.pos++;
     133    }
     134    sorted || sort(line), decoded.push(line), reader.pos = semi + 1;
     135  } while (reader.pos <= length);
     136  return decoded;
    129137}
    130138function sort(line) {
     
    317325    if (mod.map) return mod.map;
    318326    if (!mod.meta || !("code" in mod.meta)) return null;
    319     const mapString = mod.meta.code.match(
    320       VITE_RUNTIME_SOURCEMAPPING_REGEXP
    321     )?.[1];
     327    const mapString = VITE_RUNTIME_SOURCEMAPPING_REGEXP.exec(mod.meta.code)?.[1];
    322328    if (!mapString) return null;
    323329    const baseFile = mod.meta.file || moduleId.split("?")[0];
Note: See TracChangeset for help on using the changeset viewer.