@posthog/rrweb-record 0.0.33 → 0.0.35
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/LICENSE +21 -0
- package/dist/rrweb-record.cjs +354 -271
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +354 -271
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +352 -281
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +38 -50
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +56 -56
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
(function (g, f) {
|
|
2
|
-
if ("object" == typeof exports && "object" == typeof module) {
|
|
3
|
-
module.exports = f();
|
|
4
|
-
} else if ("function" == typeof define && define.amd) {
|
|
5
|
-
define("rrweb", [], f);
|
|
6
|
-
} else if ("object" == typeof exports) {
|
|
7
|
-
exports["rrweb"] = f();
|
|
8
|
-
} else {
|
|
9
|
-
g["rrweb"] = f();
|
|
10
|
-
}
|
|
11
|
-
}(this, () => {
|
|
12
|
-
var exports = {};
|
|
13
|
-
var module = { exports };
|
|
1
|
+
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
14
2
|
"use strict";
|
|
15
3
|
var __defProp = Object.defineProperty;
|
|
16
4
|
var __defProps = Object.defineProperties;
|
|
@@ -926,6 +914,7 @@ function hrefFrom(n2) {
|
|
|
926
914
|
return n2.href;
|
|
927
915
|
}
|
|
928
916
|
function serializeElementNode(n2, options) {
|
|
917
|
+
var _a2, _b;
|
|
929
918
|
const {
|
|
930
919
|
doc,
|
|
931
920
|
blockClass,
|
|
@@ -1099,11 +1088,13 @@ function serializeElementNode(n2, options) {
|
|
|
1099
1088
|
}
|
|
1100
1089
|
}
|
|
1101
1090
|
if (needBlock) {
|
|
1102
|
-
const { width, height } = n2.getBoundingClientRect();
|
|
1091
|
+
const { width, height, left, top } = n2.getBoundingClientRect();
|
|
1103
1092
|
attributes = {
|
|
1104
1093
|
class: attributes.class,
|
|
1105
1094
|
rr_width: `${width}px`,
|
|
1106
|
-
rr_height: `${height}px
|
|
1095
|
+
rr_height: `${height}px`,
|
|
1096
|
+
rr_left: `${Math.floor(left + (((_a2 = doc.defaultView) == null ? void 0 : _a2.scrollX) || 0))}px`,
|
|
1097
|
+
rr_top: `${Math.floor(top + (((_b = doc.defaultView) == null ? void 0 : _b.scrollY) || 0))}px`
|
|
1107
1098
|
};
|
|
1108
1099
|
}
|
|
1109
1100
|
if (tagName === "iframe" && !keepIframeSrcFn(attributes.src)) {
|
|
@@ -1474,7 +1465,7 @@ function getDefaultExportFromCjs$1(x) {
|
|
|
1474
1465
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
1475
1466
|
}
|
|
1476
1467
|
function getAugmentedNamespace$1(n2) {
|
|
1477
|
-
if (n2
|
|
1468
|
+
if (Object.prototype.hasOwnProperty.call(n2, "__esModule")) return n2;
|
|
1478
1469
|
var f2 = n2.default;
|
|
1479
1470
|
if (typeof f2 == "function") {
|
|
1480
1471
|
var a2 = function a3() {
|
|
@@ -1993,6 +1984,9 @@ function requireNode$1() {
|
|
|
1993
1984
|
return offset;
|
|
1994
1985
|
}
|
|
1995
1986
|
class Node2 {
|
|
1987
|
+
get proxyOf() {
|
|
1988
|
+
return this;
|
|
1989
|
+
}
|
|
1996
1990
|
constructor(defaults = {}) {
|
|
1997
1991
|
this.raws = {};
|
|
1998
1992
|
this[isClean] = false;
|
|
@@ -2111,7 +2105,7 @@ function requireNode$1() {
|
|
|
2111
2105
|
let index2 = this.parent.index(this);
|
|
2112
2106
|
return this.parent.nodes[index2 + 1];
|
|
2113
2107
|
}
|
|
2114
|
-
positionBy(opts) {
|
|
2108
|
+
positionBy(opts = {}) {
|
|
2115
2109
|
let pos = this.source.start;
|
|
2116
2110
|
if (opts.index) {
|
|
2117
2111
|
pos = this.positionInside(opts.index);
|
|
@@ -2140,27 +2134,38 @@ function requireNode$1() {
|
|
|
2140
2134
|
column += 1;
|
|
2141
2135
|
}
|
|
2142
2136
|
}
|
|
2143
|
-
return { column, line };
|
|
2137
|
+
return { column, line, offset: end };
|
|
2144
2138
|
}
|
|
2145
2139
|
prev() {
|
|
2146
2140
|
if (!this.parent) return void 0;
|
|
2147
2141
|
let index2 = this.parent.index(this);
|
|
2148
2142
|
return this.parent.nodes[index2 - 1];
|
|
2149
2143
|
}
|
|
2150
|
-
rangeBy(opts) {
|
|
2144
|
+
rangeBy(opts = {}) {
|
|
2145
|
+
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
|
|
2151
2146
|
let start = {
|
|
2152
2147
|
column: this.source.start.column,
|
|
2153
|
-
line: this.source.start.line
|
|
2148
|
+
line: this.source.start.line,
|
|
2149
|
+
offset: sourceOffset(inputString, this.source.start)
|
|
2154
2150
|
};
|
|
2155
2151
|
let end = this.source.end ? {
|
|
2156
2152
|
column: this.source.end.column + 1,
|
|
2157
|
-
line: this.source.end.line
|
|
2153
|
+
line: this.source.end.line,
|
|
2154
|
+
offset: typeof this.source.end.offset === "number" ? (
|
|
2155
|
+
// `source.end.offset` is exclusive, so we don't need to add 1
|
|
2156
|
+
this.source.end.offset
|
|
2157
|
+
) : (
|
|
2158
|
+
// Since line/column in this.source.end is inclusive,
|
|
2159
|
+
// the `sourceOffset(... , this.source.end)` returns an inclusive offset.
|
|
2160
|
+
// So, we add 1 to convert it to exclusive.
|
|
2161
|
+
sourceOffset(inputString, this.source.end) + 1
|
|
2162
|
+
)
|
|
2158
2163
|
} : {
|
|
2159
2164
|
column: start.column + 1,
|
|
2160
|
-
line: start.line
|
|
2165
|
+
line: start.line,
|
|
2166
|
+
offset: start.offset + 1
|
|
2161
2167
|
};
|
|
2162
2168
|
if (opts.word) {
|
|
2163
|
-
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
|
|
2164
2169
|
let stringRepresentation = inputString.slice(
|
|
2165
2170
|
sourceOffset(inputString, this.source.start),
|
|
2166
2171
|
sourceOffset(inputString, this.source.end)
|
|
@@ -2168,15 +2173,14 @@ function requireNode$1() {
|
|
|
2168
2173
|
let index2 = stringRepresentation.indexOf(opts.word);
|
|
2169
2174
|
if (index2 !== -1) {
|
|
2170
2175
|
start = this.positionInside(index2);
|
|
2171
|
-
end = this.positionInside(
|
|
2172
|
-
index2 + opts.word.length
|
|
2173
|
-
);
|
|
2176
|
+
end = this.positionInside(index2 + opts.word.length);
|
|
2174
2177
|
}
|
|
2175
2178
|
} else {
|
|
2176
2179
|
if (opts.start) {
|
|
2177
2180
|
start = {
|
|
2178
2181
|
column: opts.start.column,
|
|
2179
|
-
line: opts.start.line
|
|
2182
|
+
line: opts.start.line,
|
|
2183
|
+
offset: sourceOffset(inputString, opts.start)
|
|
2180
2184
|
};
|
|
2181
2185
|
} else if (opts.index) {
|
|
2182
2186
|
start = this.positionInside(opts.index);
|
|
@@ -2184,7 +2188,8 @@ function requireNode$1() {
|
|
|
2184
2188
|
if (opts.end) {
|
|
2185
2189
|
end = {
|
|
2186
2190
|
column: opts.end.column,
|
|
2187
|
-
line: opts.end.line
|
|
2191
|
+
line: opts.end.line,
|
|
2192
|
+
offset: sourceOffset(inputString, opts.end)
|
|
2188
2193
|
};
|
|
2189
2194
|
} else if (typeof opts.endIndex === "number") {
|
|
2190
2195
|
end = this.positionInside(opts.endIndex);
|
|
@@ -2193,7 +2198,11 @@ function requireNode$1() {
|
|
|
2193
2198
|
}
|
|
2194
2199
|
}
|
|
2195
2200
|
if (end.line < start.line || end.line === start.line && end.column <= start.column) {
|
|
2196
|
-
end = {
|
|
2201
|
+
end = {
|
|
2202
|
+
column: start.column + 1,
|
|
2203
|
+
line: start.line,
|
|
2204
|
+
offset: start.offset + 1
|
|
2205
|
+
};
|
|
2197
2206
|
}
|
|
2198
2207
|
return { end, start };
|
|
2199
2208
|
}
|
|
@@ -2257,6 +2266,7 @@ function requireNode$1() {
|
|
|
2257
2266
|
} else if (typeof value === "object" && value.toJSON) {
|
|
2258
2267
|
fixed[name] = value.toJSON(null, inputs);
|
|
2259
2268
|
} else if (name === "source") {
|
|
2269
|
+
if (value == null) continue;
|
|
2260
2270
|
let inputId = inputs.get(value.input);
|
|
2261
2271
|
if (inputId == null) {
|
|
2262
2272
|
inputId = inputsNextIndex;
|
|
@@ -2291,14 +2301,11 @@ function requireNode$1() {
|
|
|
2291
2301
|
});
|
|
2292
2302
|
return result2;
|
|
2293
2303
|
}
|
|
2294
|
-
warn(result2, text, opts) {
|
|
2304
|
+
warn(result2, text, opts = {}) {
|
|
2295
2305
|
let data = { node: this };
|
|
2296
2306
|
for (let i2 in opts) data[i2] = opts[i2];
|
|
2297
2307
|
return result2.warn(text, data);
|
|
2298
2308
|
}
|
|
2299
|
-
get proxyOf() {
|
|
2300
|
-
return this;
|
|
2301
|
-
}
|
|
2302
2309
|
}
|
|
2303
2310
|
node$1 = Node2;
|
|
2304
2311
|
Node2.default = Node2;
|
|
@@ -2327,6 +2334,9 @@ function requireDeclaration$1() {
|
|
|
2327
2334
|
hasRequiredDeclaration$1 = 1;
|
|
2328
2335
|
let Node2 = requireNode$1();
|
|
2329
2336
|
class Declaration extends Node2 {
|
|
2337
|
+
get variable() {
|
|
2338
|
+
return this.prop.startsWith("--") || this.prop[0] === "$";
|
|
2339
|
+
}
|
|
2330
2340
|
constructor(defaults) {
|
|
2331
2341
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
2332
2342
|
defaults = __spreadProps(__spreadValues({}, defaults), { value: String(defaults.value) });
|
|
@@ -2334,9 +2344,6 @@ function requireDeclaration$1() {
|
|
|
2334
2344
|
super(defaults);
|
|
2335
2345
|
this.type = "decl";
|
|
2336
2346
|
}
|
|
2337
|
-
get variable() {
|
|
2338
|
-
return this.prop.startsWith("--") || this.prop[0] === "$";
|
|
2339
|
-
}
|
|
2340
2347
|
}
|
|
2341
2348
|
declaration$1 = Declaration;
|
|
2342
2349
|
Declaration.default = Declaration;
|
|
@@ -2368,6 +2375,14 @@ function requireContainer$1() {
|
|
|
2368
2375
|
}
|
|
2369
2376
|
}
|
|
2370
2377
|
class Container extends Node2 {
|
|
2378
|
+
get first() {
|
|
2379
|
+
if (!this.proxyOf.nodes) return void 0;
|
|
2380
|
+
return this.proxyOf.nodes[0];
|
|
2381
|
+
}
|
|
2382
|
+
get last() {
|
|
2383
|
+
if (!this.proxyOf.nodes) return void 0;
|
|
2384
|
+
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
2385
|
+
}
|
|
2371
2386
|
append(...children) {
|
|
2372
2387
|
for (let child of children) {
|
|
2373
2388
|
let nodes = this.normalize(child, this.last);
|
|
@@ -2680,14 +2695,6 @@ function requireContainer$1() {
|
|
|
2680
2695
|
}
|
|
2681
2696
|
});
|
|
2682
2697
|
}
|
|
2683
|
-
get first() {
|
|
2684
|
-
if (!this.proxyOf.nodes) return void 0;
|
|
2685
|
-
return this.proxyOf.nodes[0];
|
|
2686
|
-
}
|
|
2687
|
-
get last() {
|
|
2688
|
-
if (!this.proxyOf.nodes) return void 0;
|
|
2689
|
-
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
2690
|
-
}
|
|
2691
2698
|
}
|
|
2692
2699
|
Container.registerParse = (dependant) => {
|
|
2693
2700
|
parse = dependant;
|
|
@@ -2937,10 +2944,25 @@ function requireInput$1() {
|
|
|
2937
2944
|
let CssSyntaxError = requireCssSyntaxError$1();
|
|
2938
2945
|
let PreviousMap = requirePreviousMap$1();
|
|
2939
2946
|
let terminalHighlight = require$$2$1;
|
|
2940
|
-
let
|
|
2947
|
+
let lineToIndexCache = Symbol("lineToIndexCache");
|
|
2941
2948
|
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
2942
2949
|
let pathAvailable = Boolean(resolve && isAbsolute);
|
|
2950
|
+
function getLineToIndex(input2) {
|
|
2951
|
+
if (input2[lineToIndexCache]) return input2[lineToIndexCache];
|
|
2952
|
+
let lines = input2.css.split("\n");
|
|
2953
|
+
let lineToIndex = new Array(lines.length);
|
|
2954
|
+
let prevIndex = 0;
|
|
2955
|
+
for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
|
|
2956
|
+
lineToIndex[i2] = prevIndex;
|
|
2957
|
+
prevIndex += lines[i2].length + 1;
|
|
2958
|
+
}
|
|
2959
|
+
input2[lineToIndexCache] = lineToIndex;
|
|
2960
|
+
return lineToIndex;
|
|
2961
|
+
}
|
|
2943
2962
|
class Input {
|
|
2963
|
+
get from() {
|
|
2964
|
+
return this.file || this.id;
|
|
2965
|
+
}
|
|
2944
2966
|
constructor(css, opts = {}) {
|
|
2945
2967
|
if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
|
|
2946
2968
|
throw new Error(`PostCSS received ${css} instead of CSS string`);
|
|
@@ -2975,30 +2997,37 @@ function requireInput$1() {
|
|
|
2975
2997
|
if (this.map) this.map.file = this.from;
|
|
2976
2998
|
}
|
|
2977
2999
|
error(message, line, column, opts = {}) {
|
|
2978
|
-
let endColumn, endLine, result2;
|
|
3000
|
+
let endColumn, endLine, endOffset, offset, result2;
|
|
2979
3001
|
if (line && typeof line === "object") {
|
|
2980
3002
|
let start = line;
|
|
2981
3003
|
let end = column;
|
|
2982
3004
|
if (typeof start.offset === "number") {
|
|
2983
|
-
|
|
3005
|
+
offset = start.offset;
|
|
3006
|
+
let pos = this.fromOffset(offset);
|
|
2984
3007
|
line = pos.line;
|
|
2985
3008
|
column = pos.col;
|
|
2986
3009
|
} else {
|
|
2987
3010
|
line = start.line;
|
|
2988
3011
|
column = start.column;
|
|
3012
|
+
offset = this.fromLineAndColumn(line, column);
|
|
2989
3013
|
}
|
|
2990
3014
|
if (typeof end.offset === "number") {
|
|
2991
|
-
|
|
3015
|
+
endOffset = end.offset;
|
|
3016
|
+
let pos = this.fromOffset(endOffset);
|
|
2992
3017
|
endLine = pos.line;
|
|
2993
3018
|
endColumn = pos.col;
|
|
2994
3019
|
} else {
|
|
2995
3020
|
endLine = end.line;
|
|
2996
3021
|
endColumn = end.column;
|
|
3022
|
+
endOffset = this.fromLineAndColumn(end.line, end.column);
|
|
2997
3023
|
}
|
|
2998
3024
|
} else if (!column) {
|
|
2999
|
-
|
|
3025
|
+
offset = line;
|
|
3026
|
+
let pos = this.fromOffset(offset);
|
|
3000
3027
|
line = pos.line;
|
|
3001
3028
|
column = pos.col;
|
|
3029
|
+
} else {
|
|
3030
|
+
offset = this.fromLineAndColumn(line, column);
|
|
3002
3031
|
}
|
|
3003
3032
|
let origin = this.origin(line, column, endLine, endColumn);
|
|
3004
3033
|
if (origin) {
|
|
@@ -3020,7 +3049,7 @@ function requireInput$1() {
|
|
|
3020
3049
|
opts.plugin
|
|
3021
3050
|
);
|
|
3022
3051
|
}
|
|
3023
|
-
result2.input = { column, endColumn, endLine, line, source: this.css };
|
|
3052
|
+
result2.input = { column, endColumn, endLine, endOffset, line, offset, source: this.css };
|
|
3024
3053
|
if (this.file) {
|
|
3025
3054
|
if (pathToFileURL) {
|
|
3026
3055
|
result2.input.url = pathToFileURL(this.file).toString();
|
|
@@ -3029,21 +3058,14 @@ function requireInput$1() {
|
|
|
3029
3058
|
}
|
|
3030
3059
|
return result2;
|
|
3031
3060
|
}
|
|
3061
|
+
fromLineAndColumn(line, column) {
|
|
3062
|
+
let lineToIndex = getLineToIndex(this);
|
|
3063
|
+
let index2 = lineToIndex[line - 1];
|
|
3064
|
+
return index2 + column - 1;
|
|
3065
|
+
}
|
|
3032
3066
|
fromOffset(offset) {
|
|
3033
|
-
let
|
|
3034
|
-
|
|
3035
|
-
let lines = this.css.split("\n");
|
|
3036
|
-
lineToIndex = new Array(lines.length);
|
|
3037
|
-
let prevIndex = 0;
|
|
3038
|
-
for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
|
|
3039
|
-
lineToIndex[i2] = prevIndex;
|
|
3040
|
-
prevIndex += lines[i2].length + 1;
|
|
3041
|
-
}
|
|
3042
|
-
this[fromOffsetCache] = lineToIndex;
|
|
3043
|
-
} else {
|
|
3044
|
-
lineToIndex = this[fromOffsetCache];
|
|
3045
|
-
}
|
|
3046
|
-
lastLine = lineToIndex[lineToIndex.length - 1];
|
|
3067
|
+
let lineToIndex = getLineToIndex(this);
|
|
3068
|
+
let lastLine = lineToIndex[lineToIndex.length - 1];
|
|
3047
3069
|
let min = 0;
|
|
3048
3070
|
if (offset >= lastLine) {
|
|
3049
3071
|
min = lineToIndex.length - 1;
|
|
@@ -3124,9 +3146,6 @@ function requireInput$1() {
|
|
|
3124
3146
|
}
|
|
3125
3147
|
return json;
|
|
3126
3148
|
}
|
|
3127
|
-
get from() {
|
|
3128
|
-
return this.file || this.id;
|
|
3129
|
-
}
|
|
3130
3149
|
}
|
|
3131
3150
|
input$1 = Input;
|
|
3132
3151
|
Input.default = Input;
|
|
@@ -3252,11 +3271,6 @@ function requireRule$1() {
|
|
|
3252
3271
|
let Container = requireContainer$1();
|
|
3253
3272
|
let list = requireList$1();
|
|
3254
3273
|
class Rule extends Container {
|
|
3255
|
-
constructor(defaults) {
|
|
3256
|
-
super(defaults);
|
|
3257
|
-
this.type = "rule";
|
|
3258
|
-
if (!this.nodes) this.nodes = [];
|
|
3259
|
-
}
|
|
3260
3274
|
get selectors() {
|
|
3261
3275
|
return list.comma(this.selector);
|
|
3262
3276
|
}
|
|
@@ -3265,6 +3279,11 @@ function requireRule$1() {
|
|
|
3265
3279
|
let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
|
|
3266
3280
|
this.selector = values.join(sep);
|
|
3267
3281
|
}
|
|
3282
|
+
constructor(defaults) {
|
|
3283
|
+
super(defaults);
|
|
3284
|
+
this.type = "rule";
|
|
3285
|
+
if (!this.nodes) this.nodes = [];
|
|
3286
|
+
}
|
|
3268
3287
|
}
|
|
3269
3288
|
rule$1 = Rule;
|
|
3270
3289
|
Rule.default = Rule;
|
|
@@ -4163,6 +4182,8 @@ function requireParser$1() {
|
|
|
4163
4182
|
if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
|
|
4164
4183
|
prev.raws.ownSemicolon = this.spaces;
|
|
4165
4184
|
this.spaces = "";
|
|
4185
|
+
prev.source.end = this.getPosition(token[2]);
|
|
4186
|
+
prev.source.end.offset += prev.raws.ownSemicolon.length;
|
|
4166
4187
|
}
|
|
4167
4188
|
}
|
|
4168
4189
|
}
|
|
@@ -4374,7 +4395,7 @@ function requireParser$1() {
|
|
|
4374
4395
|
}
|
|
4375
4396
|
unknownWord(tokens) {
|
|
4376
4397
|
throw this.input.error(
|
|
4377
|
-
"Unknown word",
|
|
4398
|
+
"Unknown word " + tokens[0][1],
|
|
4378
4399
|
{ offset: tokens[0][2] },
|
|
4379
4400
|
{ offset: tokens[0][2] + tokens[0][1].length }
|
|
4380
4401
|
);
|
|
@@ -4467,12 +4488,15 @@ function requireResult$1() {
|
|
|
4467
4488
|
hasRequiredResult$1 = 1;
|
|
4468
4489
|
let Warning = requireWarning$1();
|
|
4469
4490
|
class Result {
|
|
4491
|
+
get content() {
|
|
4492
|
+
return this.css;
|
|
4493
|
+
}
|
|
4470
4494
|
constructor(processor2, root2, opts) {
|
|
4471
4495
|
this.processor = processor2;
|
|
4472
4496
|
this.messages = [];
|
|
4473
4497
|
this.root = root2;
|
|
4474
4498
|
this.opts = opts;
|
|
4475
|
-
this.css =
|
|
4499
|
+
this.css = "";
|
|
4476
4500
|
this.map = void 0;
|
|
4477
4501
|
}
|
|
4478
4502
|
toString() {
|
|
@@ -4491,9 +4515,6 @@ function requireResult$1() {
|
|
|
4491
4515
|
warnings() {
|
|
4492
4516
|
return this.messages.filter((i2) => i2.type === "warning");
|
|
4493
4517
|
}
|
|
4494
|
-
get content() {
|
|
4495
|
-
return this.css;
|
|
4496
|
-
}
|
|
4497
4518
|
}
|
|
4498
4519
|
result$1 = Result;
|
|
4499
4520
|
Result.default = Result;
|
|
@@ -4612,6 +4633,30 @@ function requireLazyResult$1() {
|
|
|
4612
4633
|
}
|
|
4613
4634
|
let postcss2 = {};
|
|
4614
4635
|
class LazyResult {
|
|
4636
|
+
get content() {
|
|
4637
|
+
return this.stringify().content;
|
|
4638
|
+
}
|
|
4639
|
+
get css() {
|
|
4640
|
+
return this.stringify().css;
|
|
4641
|
+
}
|
|
4642
|
+
get map() {
|
|
4643
|
+
return this.stringify().map;
|
|
4644
|
+
}
|
|
4645
|
+
get messages() {
|
|
4646
|
+
return this.sync().messages;
|
|
4647
|
+
}
|
|
4648
|
+
get opts() {
|
|
4649
|
+
return this.result.opts;
|
|
4650
|
+
}
|
|
4651
|
+
get processor() {
|
|
4652
|
+
return this.result.processor;
|
|
4653
|
+
}
|
|
4654
|
+
get root() {
|
|
4655
|
+
return this.sync().root;
|
|
4656
|
+
}
|
|
4657
|
+
get [Symbol.toStringTag]() {
|
|
4658
|
+
return "LazyResult";
|
|
4659
|
+
}
|
|
4615
4660
|
constructor(processor2, css, opts) {
|
|
4616
4661
|
this.stringified = false;
|
|
4617
4662
|
this.processed = false;
|
|
@@ -4954,30 +4999,6 @@ function requireLazyResult$1() {
|
|
|
4954
4999
|
warnings() {
|
|
4955
5000
|
return this.sync().warnings();
|
|
4956
5001
|
}
|
|
4957
|
-
get content() {
|
|
4958
|
-
return this.stringify().content;
|
|
4959
|
-
}
|
|
4960
|
-
get css() {
|
|
4961
|
-
return this.stringify().css;
|
|
4962
|
-
}
|
|
4963
|
-
get map() {
|
|
4964
|
-
return this.stringify().map;
|
|
4965
|
-
}
|
|
4966
|
-
get messages() {
|
|
4967
|
-
return this.sync().messages;
|
|
4968
|
-
}
|
|
4969
|
-
get opts() {
|
|
4970
|
-
return this.result.opts;
|
|
4971
|
-
}
|
|
4972
|
-
get processor() {
|
|
4973
|
-
return this.result.processor;
|
|
4974
|
-
}
|
|
4975
|
-
get root() {
|
|
4976
|
-
return this.sync().root;
|
|
4977
|
-
}
|
|
4978
|
-
get [Symbol.toStringTag]() {
|
|
4979
|
-
return "LazyResult";
|
|
4980
|
-
}
|
|
4981
5002
|
}
|
|
4982
5003
|
LazyResult.registerPostcss = (dependant) => {
|
|
4983
5004
|
postcss2 = dependant;
|
|
@@ -4999,6 +5020,45 @@ function requireNoWorkResult$1() {
|
|
|
4999
5020
|
let stringify = requireStringify$1();
|
|
5000
5021
|
let warnOnce2 = requireWarnOnce$1();
|
|
5001
5022
|
class NoWorkResult {
|
|
5023
|
+
get content() {
|
|
5024
|
+
return this.result.css;
|
|
5025
|
+
}
|
|
5026
|
+
get css() {
|
|
5027
|
+
return this.result.css;
|
|
5028
|
+
}
|
|
5029
|
+
get map() {
|
|
5030
|
+
return this.result.map;
|
|
5031
|
+
}
|
|
5032
|
+
get messages() {
|
|
5033
|
+
return [];
|
|
5034
|
+
}
|
|
5035
|
+
get opts() {
|
|
5036
|
+
return this.result.opts;
|
|
5037
|
+
}
|
|
5038
|
+
get processor() {
|
|
5039
|
+
return this.result.processor;
|
|
5040
|
+
}
|
|
5041
|
+
get root() {
|
|
5042
|
+
if (this._root) {
|
|
5043
|
+
return this._root;
|
|
5044
|
+
}
|
|
5045
|
+
let root2;
|
|
5046
|
+
let parser2 = parse;
|
|
5047
|
+
try {
|
|
5048
|
+
root2 = parser2(this._css, this._opts);
|
|
5049
|
+
} catch (error) {
|
|
5050
|
+
this.error = error;
|
|
5051
|
+
}
|
|
5052
|
+
if (this.error) {
|
|
5053
|
+
throw this.error;
|
|
5054
|
+
} else {
|
|
5055
|
+
this._root = root2;
|
|
5056
|
+
return root2;
|
|
5057
|
+
}
|
|
5058
|
+
}
|
|
5059
|
+
get [Symbol.toStringTag]() {
|
|
5060
|
+
return "NoWorkResult";
|
|
5061
|
+
}
|
|
5002
5062
|
constructor(processor2, css, opts) {
|
|
5003
5063
|
css = css.toString();
|
|
5004
5064
|
this.stringified = false;
|
|
@@ -5060,45 +5120,6 @@ function requireNoWorkResult$1() {
|
|
|
5060
5120
|
warnings() {
|
|
5061
5121
|
return [];
|
|
5062
5122
|
}
|
|
5063
|
-
get content() {
|
|
5064
|
-
return this.result.css;
|
|
5065
|
-
}
|
|
5066
|
-
get css() {
|
|
5067
|
-
return this.result.css;
|
|
5068
|
-
}
|
|
5069
|
-
get map() {
|
|
5070
|
-
return this.result.map;
|
|
5071
|
-
}
|
|
5072
|
-
get messages() {
|
|
5073
|
-
return [];
|
|
5074
|
-
}
|
|
5075
|
-
get opts() {
|
|
5076
|
-
return this.result.opts;
|
|
5077
|
-
}
|
|
5078
|
-
get processor() {
|
|
5079
|
-
return this.result.processor;
|
|
5080
|
-
}
|
|
5081
|
-
get root() {
|
|
5082
|
-
if (this._root) {
|
|
5083
|
-
return this._root;
|
|
5084
|
-
}
|
|
5085
|
-
let root2;
|
|
5086
|
-
let parser2 = parse;
|
|
5087
|
-
try {
|
|
5088
|
-
root2 = parser2(this._css, this._opts);
|
|
5089
|
-
} catch (error) {
|
|
5090
|
-
this.error = error;
|
|
5091
|
-
}
|
|
5092
|
-
if (this.error) {
|
|
5093
|
-
throw this.error;
|
|
5094
|
-
} else {
|
|
5095
|
-
this._root = root2;
|
|
5096
|
-
return root2;
|
|
5097
|
-
}
|
|
5098
|
-
}
|
|
5099
|
-
get [Symbol.toStringTag]() {
|
|
5100
|
-
return "NoWorkResult";
|
|
5101
|
-
}
|
|
5102
5123
|
}
|
|
5103
5124
|
noWorkResult$1 = NoWorkResult;
|
|
5104
5125
|
NoWorkResult.default = NoWorkResult;
|
|
@@ -5115,7 +5136,7 @@ function requireProcessor$1() {
|
|
|
5115
5136
|
let Root = requireRoot$1();
|
|
5116
5137
|
class Processor {
|
|
5117
5138
|
constructor(plugins = []) {
|
|
5118
|
-
this.version = "8.5.
|
|
5139
|
+
this.version = "8.5.6";
|
|
5119
5140
|
this.plugins = this.normalize(plugins);
|
|
5120
5141
|
}
|
|
5121
5142
|
normalize(plugins) {
|
|
@@ -5388,7 +5409,7 @@ function getDefaultExportFromCjs(x) {
|
|
|
5388
5409
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5389
5410
|
}
|
|
5390
5411
|
function getAugmentedNamespace(n2) {
|
|
5391
|
-
if (n2
|
|
5412
|
+
if (Object.prototype.hasOwnProperty.call(n2, "__esModule")) return n2;
|
|
5392
5413
|
var f2 = n2.default;
|
|
5393
5414
|
if (typeof f2 == "function") {
|
|
5394
5415
|
var a2 = function a3() {
|
|
@@ -5907,6 +5928,9 @@ function requireNode() {
|
|
|
5907
5928
|
return offset;
|
|
5908
5929
|
}
|
|
5909
5930
|
class Node2 {
|
|
5931
|
+
get proxyOf() {
|
|
5932
|
+
return this;
|
|
5933
|
+
}
|
|
5910
5934
|
constructor(defaults = {}) {
|
|
5911
5935
|
this.raws = {};
|
|
5912
5936
|
this[isClean] = false;
|
|
@@ -6025,7 +6049,7 @@ function requireNode() {
|
|
|
6025
6049
|
let index2 = this.parent.index(this);
|
|
6026
6050
|
return this.parent.nodes[index2 + 1];
|
|
6027
6051
|
}
|
|
6028
|
-
positionBy(opts) {
|
|
6052
|
+
positionBy(opts = {}) {
|
|
6029
6053
|
let pos = this.source.start;
|
|
6030
6054
|
if (opts.index) {
|
|
6031
6055
|
pos = this.positionInside(opts.index);
|
|
@@ -6054,27 +6078,38 @@ function requireNode() {
|
|
|
6054
6078
|
column += 1;
|
|
6055
6079
|
}
|
|
6056
6080
|
}
|
|
6057
|
-
return { column, line };
|
|
6081
|
+
return { column, line, offset: end };
|
|
6058
6082
|
}
|
|
6059
6083
|
prev() {
|
|
6060
6084
|
if (!this.parent) return void 0;
|
|
6061
6085
|
let index2 = this.parent.index(this);
|
|
6062
6086
|
return this.parent.nodes[index2 - 1];
|
|
6063
6087
|
}
|
|
6064
|
-
rangeBy(opts) {
|
|
6088
|
+
rangeBy(opts = {}) {
|
|
6089
|
+
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
|
|
6065
6090
|
let start = {
|
|
6066
6091
|
column: this.source.start.column,
|
|
6067
|
-
line: this.source.start.line
|
|
6092
|
+
line: this.source.start.line,
|
|
6093
|
+
offset: sourceOffset(inputString, this.source.start)
|
|
6068
6094
|
};
|
|
6069
6095
|
let end = this.source.end ? {
|
|
6070
6096
|
column: this.source.end.column + 1,
|
|
6071
|
-
line: this.source.end.line
|
|
6097
|
+
line: this.source.end.line,
|
|
6098
|
+
offset: typeof this.source.end.offset === "number" ? (
|
|
6099
|
+
// `source.end.offset` is exclusive, so we don't need to add 1
|
|
6100
|
+
this.source.end.offset
|
|
6101
|
+
) : (
|
|
6102
|
+
// Since line/column in this.source.end is inclusive,
|
|
6103
|
+
// the `sourceOffset(... , this.source.end)` returns an inclusive offset.
|
|
6104
|
+
// So, we add 1 to convert it to exclusive.
|
|
6105
|
+
sourceOffset(inputString, this.source.end) + 1
|
|
6106
|
+
)
|
|
6072
6107
|
} : {
|
|
6073
6108
|
column: start.column + 1,
|
|
6074
|
-
line: start.line
|
|
6109
|
+
line: start.line,
|
|
6110
|
+
offset: start.offset + 1
|
|
6075
6111
|
};
|
|
6076
6112
|
if (opts.word) {
|
|
6077
|
-
let inputString = "document" in this.source.input ? this.source.input.document : this.source.input.css;
|
|
6078
6113
|
let stringRepresentation = inputString.slice(
|
|
6079
6114
|
sourceOffset(inputString, this.source.start),
|
|
6080
6115
|
sourceOffset(inputString, this.source.end)
|
|
@@ -6082,15 +6117,14 @@ function requireNode() {
|
|
|
6082
6117
|
let index2 = stringRepresentation.indexOf(opts.word);
|
|
6083
6118
|
if (index2 !== -1) {
|
|
6084
6119
|
start = this.positionInside(index2);
|
|
6085
|
-
end = this.positionInside(
|
|
6086
|
-
index2 + opts.word.length
|
|
6087
|
-
);
|
|
6120
|
+
end = this.positionInside(index2 + opts.word.length);
|
|
6088
6121
|
}
|
|
6089
6122
|
} else {
|
|
6090
6123
|
if (opts.start) {
|
|
6091
6124
|
start = {
|
|
6092
6125
|
column: opts.start.column,
|
|
6093
|
-
line: opts.start.line
|
|
6126
|
+
line: opts.start.line,
|
|
6127
|
+
offset: sourceOffset(inputString, opts.start)
|
|
6094
6128
|
};
|
|
6095
6129
|
} else if (opts.index) {
|
|
6096
6130
|
start = this.positionInside(opts.index);
|
|
@@ -6098,7 +6132,8 @@ function requireNode() {
|
|
|
6098
6132
|
if (opts.end) {
|
|
6099
6133
|
end = {
|
|
6100
6134
|
column: opts.end.column,
|
|
6101
|
-
line: opts.end.line
|
|
6135
|
+
line: opts.end.line,
|
|
6136
|
+
offset: sourceOffset(inputString, opts.end)
|
|
6102
6137
|
};
|
|
6103
6138
|
} else if (typeof opts.endIndex === "number") {
|
|
6104
6139
|
end = this.positionInside(opts.endIndex);
|
|
@@ -6107,7 +6142,11 @@ function requireNode() {
|
|
|
6107
6142
|
}
|
|
6108
6143
|
}
|
|
6109
6144
|
if (end.line < start.line || end.line === start.line && end.column <= start.column) {
|
|
6110
|
-
end = {
|
|
6145
|
+
end = {
|
|
6146
|
+
column: start.column + 1,
|
|
6147
|
+
line: start.line,
|
|
6148
|
+
offset: start.offset + 1
|
|
6149
|
+
};
|
|
6111
6150
|
}
|
|
6112
6151
|
return { end, start };
|
|
6113
6152
|
}
|
|
@@ -6171,6 +6210,7 @@ function requireNode() {
|
|
|
6171
6210
|
} else if (typeof value === "object" && value.toJSON) {
|
|
6172
6211
|
fixed[name] = value.toJSON(null, inputs);
|
|
6173
6212
|
} else if (name === "source") {
|
|
6213
|
+
if (value == null) continue;
|
|
6174
6214
|
let inputId = inputs.get(value.input);
|
|
6175
6215
|
if (inputId == null) {
|
|
6176
6216
|
inputId = inputsNextIndex;
|
|
@@ -6205,14 +6245,11 @@ function requireNode() {
|
|
|
6205
6245
|
});
|
|
6206
6246
|
return result2;
|
|
6207
6247
|
}
|
|
6208
|
-
warn(result2, text, opts) {
|
|
6248
|
+
warn(result2, text, opts = {}) {
|
|
6209
6249
|
let data = { node: this };
|
|
6210
6250
|
for (let i2 in opts) data[i2] = opts[i2];
|
|
6211
6251
|
return result2.warn(text, data);
|
|
6212
6252
|
}
|
|
6213
|
-
get proxyOf() {
|
|
6214
|
-
return this;
|
|
6215
|
-
}
|
|
6216
6253
|
}
|
|
6217
6254
|
node = Node2;
|
|
6218
6255
|
Node2.default = Node2;
|
|
@@ -6241,6 +6278,9 @@ function requireDeclaration() {
|
|
|
6241
6278
|
hasRequiredDeclaration = 1;
|
|
6242
6279
|
let Node2 = requireNode();
|
|
6243
6280
|
class Declaration extends Node2 {
|
|
6281
|
+
get variable() {
|
|
6282
|
+
return this.prop.startsWith("--") || this.prop[0] === "$";
|
|
6283
|
+
}
|
|
6244
6284
|
constructor(defaults) {
|
|
6245
6285
|
if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") {
|
|
6246
6286
|
defaults = __spreadProps(__spreadValues({}, defaults), { value: String(defaults.value) });
|
|
@@ -6248,9 +6288,6 @@ function requireDeclaration() {
|
|
|
6248
6288
|
super(defaults);
|
|
6249
6289
|
this.type = "decl";
|
|
6250
6290
|
}
|
|
6251
|
-
get variable() {
|
|
6252
|
-
return this.prop.startsWith("--") || this.prop[0] === "$";
|
|
6253
|
-
}
|
|
6254
6291
|
}
|
|
6255
6292
|
declaration = Declaration;
|
|
6256
6293
|
Declaration.default = Declaration;
|
|
@@ -6282,6 +6319,14 @@ function requireContainer() {
|
|
|
6282
6319
|
}
|
|
6283
6320
|
}
|
|
6284
6321
|
class Container extends Node2 {
|
|
6322
|
+
get first() {
|
|
6323
|
+
if (!this.proxyOf.nodes) return void 0;
|
|
6324
|
+
return this.proxyOf.nodes[0];
|
|
6325
|
+
}
|
|
6326
|
+
get last() {
|
|
6327
|
+
if (!this.proxyOf.nodes) return void 0;
|
|
6328
|
+
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
6329
|
+
}
|
|
6285
6330
|
append(...children) {
|
|
6286
6331
|
for (let child of children) {
|
|
6287
6332
|
let nodes = this.normalize(child, this.last);
|
|
@@ -6594,14 +6639,6 @@ function requireContainer() {
|
|
|
6594
6639
|
}
|
|
6595
6640
|
});
|
|
6596
6641
|
}
|
|
6597
|
-
get first() {
|
|
6598
|
-
if (!this.proxyOf.nodes) return void 0;
|
|
6599
|
-
return this.proxyOf.nodes[0];
|
|
6600
|
-
}
|
|
6601
|
-
get last() {
|
|
6602
|
-
if (!this.proxyOf.nodes) return void 0;
|
|
6603
|
-
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];
|
|
6604
|
-
}
|
|
6605
6642
|
}
|
|
6606
6643
|
Container.registerParse = (dependant) => {
|
|
6607
6644
|
parse = dependant;
|
|
@@ -6851,10 +6888,25 @@ function requireInput() {
|
|
|
6851
6888
|
let CssSyntaxError = requireCssSyntaxError();
|
|
6852
6889
|
let PreviousMap = requirePreviousMap();
|
|
6853
6890
|
let terminalHighlight = require$$2;
|
|
6854
|
-
let
|
|
6891
|
+
let lineToIndexCache = Symbol("lineToIndexCache");
|
|
6855
6892
|
let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
6856
6893
|
let pathAvailable = Boolean(resolve && isAbsolute);
|
|
6894
|
+
function getLineToIndex(input2) {
|
|
6895
|
+
if (input2[lineToIndexCache]) return input2[lineToIndexCache];
|
|
6896
|
+
let lines = input2.css.split("\n");
|
|
6897
|
+
let lineToIndex = new Array(lines.length);
|
|
6898
|
+
let prevIndex = 0;
|
|
6899
|
+
for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
|
|
6900
|
+
lineToIndex[i2] = prevIndex;
|
|
6901
|
+
prevIndex += lines[i2].length + 1;
|
|
6902
|
+
}
|
|
6903
|
+
input2[lineToIndexCache] = lineToIndex;
|
|
6904
|
+
return lineToIndex;
|
|
6905
|
+
}
|
|
6857
6906
|
class Input {
|
|
6907
|
+
get from() {
|
|
6908
|
+
return this.file || this.id;
|
|
6909
|
+
}
|
|
6858
6910
|
constructor(css, opts = {}) {
|
|
6859
6911
|
if (css === null || typeof css === "undefined" || typeof css === "object" && !css.toString) {
|
|
6860
6912
|
throw new Error(`PostCSS received ${css} instead of CSS string`);
|
|
@@ -6889,30 +6941,37 @@ function requireInput() {
|
|
|
6889
6941
|
if (this.map) this.map.file = this.from;
|
|
6890
6942
|
}
|
|
6891
6943
|
error(message, line, column, opts = {}) {
|
|
6892
|
-
let endColumn, endLine, result2;
|
|
6944
|
+
let endColumn, endLine, endOffset, offset, result2;
|
|
6893
6945
|
if (line && typeof line === "object") {
|
|
6894
6946
|
let start = line;
|
|
6895
6947
|
let end = column;
|
|
6896
6948
|
if (typeof start.offset === "number") {
|
|
6897
|
-
|
|
6949
|
+
offset = start.offset;
|
|
6950
|
+
let pos = this.fromOffset(offset);
|
|
6898
6951
|
line = pos.line;
|
|
6899
6952
|
column = pos.col;
|
|
6900
6953
|
} else {
|
|
6901
6954
|
line = start.line;
|
|
6902
6955
|
column = start.column;
|
|
6956
|
+
offset = this.fromLineAndColumn(line, column);
|
|
6903
6957
|
}
|
|
6904
6958
|
if (typeof end.offset === "number") {
|
|
6905
|
-
|
|
6959
|
+
endOffset = end.offset;
|
|
6960
|
+
let pos = this.fromOffset(endOffset);
|
|
6906
6961
|
endLine = pos.line;
|
|
6907
6962
|
endColumn = pos.col;
|
|
6908
6963
|
} else {
|
|
6909
6964
|
endLine = end.line;
|
|
6910
6965
|
endColumn = end.column;
|
|
6966
|
+
endOffset = this.fromLineAndColumn(end.line, end.column);
|
|
6911
6967
|
}
|
|
6912
6968
|
} else if (!column) {
|
|
6913
|
-
|
|
6969
|
+
offset = line;
|
|
6970
|
+
let pos = this.fromOffset(offset);
|
|
6914
6971
|
line = pos.line;
|
|
6915
6972
|
column = pos.col;
|
|
6973
|
+
} else {
|
|
6974
|
+
offset = this.fromLineAndColumn(line, column);
|
|
6916
6975
|
}
|
|
6917
6976
|
let origin = this.origin(line, column, endLine, endColumn);
|
|
6918
6977
|
if (origin) {
|
|
@@ -6934,7 +6993,7 @@ function requireInput() {
|
|
|
6934
6993
|
opts.plugin
|
|
6935
6994
|
);
|
|
6936
6995
|
}
|
|
6937
|
-
result2.input = { column, endColumn, endLine, line, source: this.css };
|
|
6996
|
+
result2.input = { column, endColumn, endLine, endOffset, line, offset, source: this.css };
|
|
6938
6997
|
if (this.file) {
|
|
6939
6998
|
if (pathToFileURL) {
|
|
6940
6999
|
result2.input.url = pathToFileURL(this.file).toString();
|
|
@@ -6943,21 +7002,14 @@ function requireInput() {
|
|
|
6943
7002
|
}
|
|
6944
7003
|
return result2;
|
|
6945
7004
|
}
|
|
7005
|
+
fromLineAndColumn(line, column) {
|
|
7006
|
+
let lineToIndex = getLineToIndex(this);
|
|
7007
|
+
let index2 = lineToIndex[line - 1];
|
|
7008
|
+
return index2 + column - 1;
|
|
7009
|
+
}
|
|
6946
7010
|
fromOffset(offset) {
|
|
6947
|
-
let
|
|
6948
|
-
|
|
6949
|
-
let lines = this.css.split("\n");
|
|
6950
|
-
lineToIndex = new Array(lines.length);
|
|
6951
|
-
let prevIndex = 0;
|
|
6952
|
-
for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {
|
|
6953
|
-
lineToIndex[i2] = prevIndex;
|
|
6954
|
-
prevIndex += lines[i2].length + 1;
|
|
6955
|
-
}
|
|
6956
|
-
this[fromOffsetCache] = lineToIndex;
|
|
6957
|
-
} else {
|
|
6958
|
-
lineToIndex = this[fromOffsetCache];
|
|
6959
|
-
}
|
|
6960
|
-
lastLine = lineToIndex[lineToIndex.length - 1];
|
|
7011
|
+
let lineToIndex = getLineToIndex(this);
|
|
7012
|
+
let lastLine = lineToIndex[lineToIndex.length - 1];
|
|
6961
7013
|
let min = 0;
|
|
6962
7014
|
if (offset >= lastLine) {
|
|
6963
7015
|
min = lineToIndex.length - 1;
|
|
@@ -7038,9 +7090,6 @@ function requireInput() {
|
|
|
7038
7090
|
}
|
|
7039
7091
|
return json;
|
|
7040
7092
|
}
|
|
7041
|
-
get from() {
|
|
7042
|
-
return this.file || this.id;
|
|
7043
|
-
}
|
|
7044
7093
|
}
|
|
7045
7094
|
input = Input;
|
|
7046
7095
|
Input.default = Input;
|
|
@@ -7166,11 +7215,6 @@ function requireRule() {
|
|
|
7166
7215
|
let Container = requireContainer();
|
|
7167
7216
|
let list = requireList();
|
|
7168
7217
|
class Rule extends Container {
|
|
7169
|
-
constructor(defaults) {
|
|
7170
|
-
super(defaults);
|
|
7171
|
-
this.type = "rule";
|
|
7172
|
-
if (!this.nodes) this.nodes = [];
|
|
7173
|
-
}
|
|
7174
7218
|
get selectors() {
|
|
7175
7219
|
return list.comma(this.selector);
|
|
7176
7220
|
}
|
|
@@ -7179,6 +7223,11 @@ function requireRule() {
|
|
|
7179
7223
|
let sep = match ? match[0] : "," + this.raw("between", "beforeOpen");
|
|
7180
7224
|
this.selector = values.join(sep);
|
|
7181
7225
|
}
|
|
7226
|
+
constructor(defaults) {
|
|
7227
|
+
super(defaults);
|
|
7228
|
+
this.type = "rule";
|
|
7229
|
+
if (!this.nodes) this.nodes = [];
|
|
7230
|
+
}
|
|
7182
7231
|
}
|
|
7183
7232
|
rule = Rule;
|
|
7184
7233
|
Rule.default = Rule;
|
|
@@ -8077,6 +8126,8 @@ function requireParser() {
|
|
|
8077
8126
|
if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) {
|
|
8078
8127
|
prev.raws.ownSemicolon = this.spaces;
|
|
8079
8128
|
this.spaces = "";
|
|
8129
|
+
prev.source.end = this.getPosition(token[2]);
|
|
8130
|
+
prev.source.end.offset += prev.raws.ownSemicolon.length;
|
|
8080
8131
|
}
|
|
8081
8132
|
}
|
|
8082
8133
|
}
|
|
@@ -8288,7 +8339,7 @@ function requireParser() {
|
|
|
8288
8339
|
}
|
|
8289
8340
|
unknownWord(tokens) {
|
|
8290
8341
|
throw this.input.error(
|
|
8291
|
-
"Unknown word",
|
|
8342
|
+
"Unknown word " + tokens[0][1],
|
|
8292
8343
|
{ offset: tokens[0][2] },
|
|
8293
8344
|
{ offset: tokens[0][2] + tokens[0][1].length }
|
|
8294
8345
|
);
|
|
@@ -8381,12 +8432,15 @@ function requireResult() {
|
|
|
8381
8432
|
hasRequiredResult = 1;
|
|
8382
8433
|
let Warning = requireWarning();
|
|
8383
8434
|
class Result {
|
|
8435
|
+
get content() {
|
|
8436
|
+
return this.css;
|
|
8437
|
+
}
|
|
8384
8438
|
constructor(processor2, root2, opts) {
|
|
8385
8439
|
this.processor = processor2;
|
|
8386
8440
|
this.messages = [];
|
|
8387
8441
|
this.root = root2;
|
|
8388
8442
|
this.opts = opts;
|
|
8389
|
-
this.css =
|
|
8443
|
+
this.css = "";
|
|
8390
8444
|
this.map = void 0;
|
|
8391
8445
|
}
|
|
8392
8446
|
toString() {
|
|
@@ -8405,9 +8459,6 @@ function requireResult() {
|
|
|
8405
8459
|
warnings() {
|
|
8406
8460
|
return this.messages.filter((i2) => i2.type === "warning");
|
|
8407
8461
|
}
|
|
8408
|
-
get content() {
|
|
8409
|
-
return this.css;
|
|
8410
|
-
}
|
|
8411
8462
|
}
|
|
8412
8463
|
result = Result;
|
|
8413
8464
|
Result.default = Result;
|
|
@@ -8526,6 +8577,30 @@ function requireLazyResult() {
|
|
|
8526
8577
|
}
|
|
8527
8578
|
let postcss2 = {};
|
|
8528
8579
|
class LazyResult {
|
|
8580
|
+
get content() {
|
|
8581
|
+
return this.stringify().content;
|
|
8582
|
+
}
|
|
8583
|
+
get css() {
|
|
8584
|
+
return this.stringify().css;
|
|
8585
|
+
}
|
|
8586
|
+
get map() {
|
|
8587
|
+
return this.stringify().map;
|
|
8588
|
+
}
|
|
8589
|
+
get messages() {
|
|
8590
|
+
return this.sync().messages;
|
|
8591
|
+
}
|
|
8592
|
+
get opts() {
|
|
8593
|
+
return this.result.opts;
|
|
8594
|
+
}
|
|
8595
|
+
get processor() {
|
|
8596
|
+
return this.result.processor;
|
|
8597
|
+
}
|
|
8598
|
+
get root() {
|
|
8599
|
+
return this.sync().root;
|
|
8600
|
+
}
|
|
8601
|
+
get [Symbol.toStringTag]() {
|
|
8602
|
+
return "LazyResult";
|
|
8603
|
+
}
|
|
8529
8604
|
constructor(processor2, css, opts) {
|
|
8530
8605
|
this.stringified = false;
|
|
8531
8606
|
this.processed = false;
|
|
@@ -8868,30 +8943,6 @@ function requireLazyResult() {
|
|
|
8868
8943
|
warnings() {
|
|
8869
8944
|
return this.sync().warnings();
|
|
8870
8945
|
}
|
|
8871
|
-
get content() {
|
|
8872
|
-
return this.stringify().content;
|
|
8873
|
-
}
|
|
8874
|
-
get css() {
|
|
8875
|
-
return this.stringify().css;
|
|
8876
|
-
}
|
|
8877
|
-
get map() {
|
|
8878
|
-
return this.stringify().map;
|
|
8879
|
-
}
|
|
8880
|
-
get messages() {
|
|
8881
|
-
return this.sync().messages;
|
|
8882
|
-
}
|
|
8883
|
-
get opts() {
|
|
8884
|
-
return this.result.opts;
|
|
8885
|
-
}
|
|
8886
|
-
get processor() {
|
|
8887
|
-
return this.result.processor;
|
|
8888
|
-
}
|
|
8889
|
-
get root() {
|
|
8890
|
-
return this.sync().root;
|
|
8891
|
-
}
|
|
8892
|
-
get [Symbol.toStringTag]() {
|
|
8893
|
-
return "LazyResult";
|
|
8894
|
-
}
|
|
8895
8946
|
}
|
|
8896
8947
|
LazyResult.registerPostcss = (dependant) => {
|
|
8897
8948
|
postcss2 = dependant;
|
|
@@ -8913,6 +8964,45 @@ function requireNoWorkResult() {
|
|
|
8913
8964
|
let stringify = requireStringify();
|
|
8914
8965
|
let warnOnce2 = requireWarnOnce();
|
|
8915
8966
|
class NoWorkResult {
|
|
8967
|
+
get content() {
|
|
8968
|
+
return this.result.css;
|
|
8969
|
+
}
|
|
8970
|
+
get css() {
|
|
8971
|
+
return this.result.css;
|
|
8972
|
+
}
|
|
8973
|
+
get map() {
|
|
8974
|
+
return this.result.map;
|
|
8975
|
+
}
|
|
8976
|
+
get messages() {
|
|
8977
|
+
return [];
|
|
8978
|
+
}
|
|
8979
|
+
get opts() {
|
|
8980
|
+
return this.result.opts;
|
|
8981
|
+
}
|
|
8982
|
+
get processor() {
|
|
8983
|
+
return this.result.processor;
|
|
8984
|
+
}
|
|
8985
|
+
get root() {
|
|
8986
|
+
if (this._root) {
|
|
8987
|
+
return this._root;
|
|
8988
|
+
}
|
|
8989
|
+
let root2;
|
|
8990
|
+
let parser2 = parse;
|
|
8991
|
+
try {
|
|
8992
|
+
root2 = parser2(this._css, this._opts);
|
|
8993
|
+
} catch (error) {
|
|
8994
|
+
this.error = error;
|
|
8995
|
+
}
|
|
8996
|
+
if (this.error) {
|
|
8997
|
+
throw this.error;
|
|
8998
|
+
} else {
|
|
8999
|
+
this._root = root2;
|
|
9000
|
+
return root2;
|
|
9001
|
+
}
|
|
9002
|
+
}
|
|
9003
|
+
get [Symbol.toStringTag]() {
|
|
9004
|
+
return "NoWorkResult";
|
|
9005
|
+
}
|
|
8916
9006
|
constructor(processor2, css, opts) {
|
|
8917
9007
|
css = css.toString();
|
|
8918
9008
|
this.stringified = false;
|
|
@@ -8974,45 +9064,6 @@ function requireNoWorkResult() {
|
|
|
8974
9064
|
warnings() {
|
|
8975
9065
|
return [];
|
|
8976
9066
|
}
|
|
8977
|
-
get content() {
|
|
8978
|
-
return this.result.css;
|
|
8979
|
-
}
|
|
8980
|
-
get css() {
|
|
8981
|
-
return this.result.css;
|
|
8982
|
-
}
|
|
8983
|
-
get map() {
|
|
8984
|
-
return this.result.map;
|
|
8985
|
-
}
|
|
8986
|
-
get messages() {
|
|
8987
|
-
return [];
|
|
8988
|
-
}
|
|
8989
|
-
get opts() {
|
|
8990
|
-
return this.result.opts;
|
|
8991
|
-
}
|
|
8992
|
-
get processor() {
|
|
8993
|
-
return this.result.processor;
|
|
8994
|
-
}
|
|
8995
|
-
get root() {
|
|
8996
|
-
if (this._root) {
|
|
8997
|
-
return this._root;
|
|
8998
|
-
}
|
|
8999
|
-
let root2;
|
|
9000
|
-
let parser2 = parse;
|
|
9001
|
-
try {
|
|
9002
|
-
root2 = parser2(this._css, this._opts);
|
|
9003
|
-
} catch (error) {
|
|
9004
|
-
this.error = error;
|
|
9005
|
-
}
|
|
9006
|
-
if (this.error) {
|
|
9007
|
-
throw this.error;
|
|
9008
|
-
} else {
|
|
9009
|
-
this._root = root2;
|
|
9010
|
-
return root2;
|
|
9011
|
-
}
|
|
9012
|
-
}
|
|
9013
|
-
get [Symbol.toStringTag]() {
|
|
9014
|
-
return "NoWorkResult";
|
|
9015
|
-
}
|
|
9016
9067
|
}
|
|
9017
9068
|
noWorkResult = NoWorkResult;
|
|
9018
9069
|
NoWorkResult.default = NoWorkResult;
|
|
@@ -9029,7 +9080,7 @@ function requireProcessor() {
|
|
|
9029
9080
|
let Root = requireRoot();
|
|
9030
9081
|
class Processor {
|
|
9031
9082
|
constructor(plugins = []) {
|
|
9032
|
-
this.version = "8.5.
|
|
9083
|
+
this.version = "8.5.6";
|
|
9033
9084
|
this.plugins = this.normalize(plugins);
|
|
9034
9085
|
}
|
|
9035
9086
|
normalize(plugins) {
|
|
@@ -11210,7 +11261,11 @@ function initFontObserver({ fontCb, doc }) {
|
|
|
11210
11261
|
const fontMap = /* @__PURE__ */ new WeakMap();
|
|
11211
11262
|
const originalFontFace = win.FontFace;
|
|
11212
11263
|
win.FontFace = function FontFace2(family, source, descriptors) {
|
|
11213
|
-
const fontFace = new originalFontFace(
|
|
11264
|
+
const fontFace = new originalFontFace(
|
|
11265
|
+
family,
|
|
11266
|
+
source,
|
|
11267
|
+
descriptors
|
|
11268
|
+
);
|
|
11214
11269
|
fontMap.set(fontFace, {
|
|
11215
11270
|
family,
|
|
11216
11271
|
buffer: typeof source !== "string",
|
|
@@ -11572,13 +11627,18 @@ class IframeManager {
|
|
|
11572
11627
|
removeLoadListener() {
|
|
11573
11628
|
this.loadListener = void 0;
|
|
11574
11629
|
}
|
|
11630
|
+
trackIframeContent(iframeEl, content) {
|
|
11631
|
+
const iframeId = this.mirror.getId(iframeEl);
|
|
11632
|
+
this.attachedIframes.set(iframeId, { element: iframeEl, content });
|
|
11633
|
+
return iframeId;
|
|
11634
|
+
}
|
|
11575
11635
|
attachIframe(iframeEl, childSn) {
|
|
11576
11636
|
var _a2;
|
|
11577
|
-
this.
|
|
11637
|
+
const iframeId = this.trackIframeContent(iframeEl, childSn);
|
|
11578
11638
|
this.mutationCb({
|
|
11579
11639
|
adds: [
|
|
11580
11640
|
{
|
|
11581
|
-
parentId:
|
|
11641
|
+
parentId: iframeId,
|
|
11582
11642
|
nextId: null,
|
|
11583
11643
|
node: childSn
|
|
11584
11644
|
}
|
|
@@ -11630,7 +11690,7 @@ class IframeManager {
|
|
|
11630
11690
|
const rootId = e2.data.node.id;
|
|
11631
11691
|
this.crossOriginIframeRootIdMap.set(iframeEl, rootId);
|
|
11632
11692
|
this.patchRootIdOnNode(e2.data.node, rootId);
|
|
11633
|
-
this.
|
|
11693
|
+
this.trackIframeContent(iframeEl, e2.data.node);
|
|
11634
11694
|
return {
|
|
11635
11695
|
timestamp: e2.timestamp,
|
|
11636
11696
|
type: EventType.IncrementalSnapshot,
|
|
@@ -11773,21 +11833,27 @@ class IframeManager {
|
|
|
11773
11833
|
});
|
|
11774
11834
|
}
|
|
11775
11835
|
}
|
|
11836
|
+
removeIframeById(iframeId) {
|
|
11837
|
+
const entry = this.attachedIframes.get(iframeId);
|
|
11838
|
+
if (!entry) return;
|
|
11839
|
+
const win = entry.element.contentWindow;
|
|
11840
|
+
if (win && this.nestedIframeListeners.has(win)) {
|
|
11841
|
+
const handler = this.nestedIframeListeners.get(win);
|
|
11842
|
+
win.removeEventListener("message", handler);
|
|
11843
|
+
this.nestedIframeListeners.delete(win);
|
|
11844
|
+
}
|
|
11845
|
+
this.attachedIframes.delete(iframeId);
|
|
11846
|
+
}
|
|
11776
11847
|
reattachIframes() {
|
|
11777
|
-
this.attachedIframes.forEach((content,
|
|
11778
|
-
if (!
|
|
11779
|
-
this.attachedIframes.delete(
|
|
11780
|
-
return;
|
|
11781
|
-
}
|
|
11782
|
-
const parentId = this.mirror.getId(iframe);
|
|
11783
|
-
if (parentId === -1) {
|
|
11784
|
-
this.attachedIframes.delete(iframe);
|
|
11848
|
+
this.attachedIframes.forEach(({ content }, iframeId) => {
|
|
11849
|
+
if (!this.mirror.has(iframeId)) {
|
|
11850
|
+
this.attachedIframes.delete(iframeId);
|
|
11785
11851
|
return;
|
|
11786
11852
|
}
|
|
11787
11853
|
this.mutationCb({
|
|
11788
11854
|
adds: [
|
|
11789
11855
|
{
|
|
11790
|
-
parentId,
|
|
11856
|
+
parentId: iframeId,
|
|
11791
11857
|
nextId: null,
|
|
11792
11858
|
node: content
|
|
11793
11859
|
}
|
|
@@ -12739,6 +12805,11 @@ function record(options = {}) {
|
|
|
12739
12805
|
}
|
|
12740
12806
|
};
|
|
12741
12807
|
const wrappedMutationEmit = (m) => {
|
|
12808
|
+
if (recordCrossOriginIframes && m.removes) {
|
|
12809
|
+
m.removes.forEach(({ id }) => {
|
|
12810
|
+
iframeManager.removeIframeById(id);
|
|
12811
|
+
});
|
|
12812
|
+
}
|
|
12742
12813
|
wrappedEmit({
|
|
12743
12814
|
type: EventType.IncrementalSnapshot,
|
|
12744
12815
|
data: __spreadValues({
|
|
@@ -13092,7 +13163,7 @@ const { addCustomEvent } = record;
|
|
|
13092
13163
|
const { freezePage } = record;
|
|
13093
13164
|
const { takeFullSnapshot } = record;
|
|
13094
13165
|
exports.record = record;
|
|
13095
|
-
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
13166
|
+
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
13096
13167
|
var __cp = (to, from, except, desc) => {
|
|
13097
13168
|
if ((from && typeof from === "object") || typeof from === "function") {
|
|
13098
13169
|
for (let key of Object.getOwnPropertyNames(from)) {
|