GULP DIST

This commit is contained in:
2022-04-07 14:11:14 +02:00
parent 0a1f83b99c
commit 5e7215d041
137 changed files with 18556 additions and 2641 deletions

View File

@@ -1,4 +1,4 @@
import { _ as _createClass, a as _classCallCheck, b as _objectWithoutProperties } from '../../_rollupPluginBabelHelpers-a0b34764.js';
import { _ as _createClass, a as _classCallCheck, b as _objectWithoutProperties } from '../../_rollupPluginBabelHelpers-b054ecd2.js';
import ChangeDetails from '../../core/change-details.js';
import { isString } from '../../core/utils.js';
import ContinuousTailDetails from '../../core/continuous-tail-details.js';
@@ -30,7 +30,8 @@ var ChunksTailDetails = /*#__PURE__*/function () {
if (!String(tailChunk)) return;
if (isString(tailChunk)) tailChunk = new ContinuousTailDetails(String(tailChunk));
var lastChunk = this.chunks[this.chunks.length - 1];
var extendLast = lastChunk && (lastChunk.stop === tailChunk.stop || tailChunk.stop == null) && // if tail chunk goes just after last chunk
var extendLast = lastChunk && ( // if stops are same or tail has no stop
lastChunk.stop === tailChunk.stop || tailChunk.stop == null) && // if tail chunk goes just after last chunk
tailChunk.from === lastChunk.from + lastChunk.toString().length;
if (tailChunk instanceof ContinuousTailDetails) {
@@ -81,7 +82,8 @@ var ChunksTailDetails = /*#__PURE__*/function () {
var stop = chunk.stop;
var chunkBlock = void 0;
if (stop != null && (!lastBlockIter || lastBlockIter.index <= stop)) {
if (stop != null && ( // if block not found or stop is behind lastBlock
!lastBlockIter || lastBlockIter.index <= stop)) {
if (chunk instanceof ChunksTailDetails || // for continuous block also check if stop is exist
masked._stops.indexOf(stop) >= 0) {
details.aggregate(masked._appendPlaceholder(stop));
@@ -134,15 +136,15 @@ var ChunksTailDetails = /*#__PURE__*/function () {
});
}
}, {
key: "shiftBefore",
value: function shiftBefore(pos) {
if (this.from >= pos || !this.chunks.length) return '';
var chunkShiftPos = pos - this.from;
key: "unshift",
value: function unshift(beforePos) {
if (!this.chunks.length || beforePos != null && this.from >= beforePos) return '';
var chunkShiftPos = beforePos != null ? beforePos - this.from : beforePos;
var ci = 0;
while (ci < this.chunks.length) {
var chunk = this.chunks[ci];
var shiftChar = chunk.shiftBefore(chunkShiftPos);
var shiftChar = chunk.unshift(chunkShiftPos);
if (chunk.toString()) {
// chunk still contains value
@@ -157,6 +159,31 @@ var ChunksTailDetails = /*#__PURE__*/function () {
if (shiftChar) return shiftChar;
}
return '';
}
}, {
key: "shift",
value: function shift() {
if (!this.chunks.length) return '';
var ci = this.chunks.length - 1;
while (0 <= ci) {
var chunk = this.chunks[ci];
var shiftChar = chunk.shift();
if (chunk.toString()) {
// chunk still contains value
// but not shifted - means no more available chars to shift
if (!shiftChar) break;
--ci;
} else {
// clean if chunk has no value
this.chunks.splice(ci, 1);
}
if (shiftChar) return shiftChar;
}
return '';
}
}]);