@sailfish-ai/recorder 1.8.8 → 1.8.9
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/README.md +2 -0
- package/dist/recorder.cjs +792 -760
- package/dist/recorder.js +794 -762
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +792 -760
- package/dist/websocket.js +131 -15
- package/package.json +1 -1
package/dist/recorder.umd.cjs
CHANGED
|
@@ -359,8 +359,26 @@
|
|
|
359
359
|
return { ...e2 ?? {}, appUrl: (e2 == null ? void 0 : e2.appUrl) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
360
360
|
}
|
|
361
361
|
e.nowTimestamp = Date.now, /[1-9][0-9]{12}/.test(Date.now().toString()) || (e.nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime());
|
|
362
|
-
const ee = readDebugFlag(), te = "per_session";
|
|
363
|
-
let
|
|
362
|
+
const ee = readDebugFlag(), te = "per_session", ne = "sailfish_funcspan_global_state";
|
|
363
|
+
let re = null, oe = false, se = null, ie = null;
|
|
364
|
+
function saveGlobalFuncSpanState(e2, a2) {
|
|
365
|
+
try {
|
|
366
|
+
if ("undefined" == typeof localStorage) return;
|
|
367
|
+
const u2 = { enabled: e2, expirationTimestampMs: a2 };
|
|
368
|
+
localStorage.setItem(ne, JSON.stringify(u2)), ee && console.log("[Sailfish] Saved global function span state to localStorage:", u2);
|
|
369
|
+
} catch (e3) {
|
|
370
|
+
ee && console.warn("[Sailfish] Failed to save global function span state to localStorage:", e3);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
function clearGlobalFuncSpanState() {
|
|
374
|
+
try {
|
|
375
|
+
if ("undefined" == typeof localStorage) return;
|
|
376
|
+
localStorage.removeItem(ne), ee && console.log("[Sailfish] Cleared global function span state from localStorage");
|
|
377
|
+
} catch (e2) {
|
|
378
|
+
ee && console.warn("[Sailfish] Failed to clear global function span state from localStorage:", e2);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
let le = false, ce = null, pe = null, de = false, he = null, me = null;
|
|
364
382
|
function isWebSocketOpen(e2) {
|
|
365
383
|
return (e2 == null ? void 0 : e2.readyState) === WebSocket.OPEN;
|
|
366
384
|
}
|
|
@@ -371,15 +389,15 @@
|
|
|
371
389
|
u2.onsuccess = () => a2(u2.result), u2.onerror = () => a2([]);
|
|
372
390
|
})) ?? [];
|
|
373
391
|
})();
|
|
374
|
-
if (isWebSocketOpen(
|
|
375
|
-
for (const a2 of e2)
|
|
392
|
+
if (isWebSocketOpen(re)) try {
|
|
393
|
+
for (const a2 of e2) re.send(a2.value), await deleteNotifyMessageById(a2.id);
|
|
376
394
|
} catch (e3) {
|
|
377
395
|
}
|
|
378
396
|
}
|
|
379
397
|
async function flushBufferedEvents() {
|
|
380
|
-
if (isWebSocketOpen(
|
|
398
|
+
if (isWebSocketOpen(re)) if (se) await se;
|
|
381
399
|
else {
|
|
382
|
-
|
|
400
|
+
se = (async () => {
|
|
383
401
|
var _a2, _b;
|
|
384
402
|
const e2 = await (async function getAllIndexedEvents() {
|
|
385
403
|
return await withStore$1("readonly", (e3) => new Promise((a3) => {
|
|
@@ -394,33 +412,33 @@
|
|
|
394
412
|
for (const e3 of Object.values(a2)) {
|
|
395
413
|
const a3 = buildBatches(e3, (e4) => eventSize(e4.data), 52428800);
|
|
396
414
|
for (const e4 of a3) {
|
|
397
|
-
if (!isWebSocketOpen(
|
|
415
|
+
if (!isWebSocketOpen(re)) break;
|
|
398
416
|
const a4 = e4.map((e5) => {
|
|
399
417
|
var _a3, _b2;
|
|
400
418
|
return { ...e5.data, appUrl: ((_a3 = e5.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
|
|
401
419
|
}), u2 = e4.map((e5) => e5.id).filter((e5) => null != e5);
|
|
402
420
|
try {
|
|
403
421
|
const e5 = JSON.stringify({ type: "events", events: a4, mapUuid: window.sfMapUuid });
|
|
404
|
-
|
|
422
|
+
re.send(e5), await deleteEventsByIds(u2);
|
|
405
423
|
} catch (e5) {
|
|
406
424
|
}
|
|
407
425
|
}
|
|
408
426
|
}
|
|
409
427
|
})();
|
|
410
428
|
try {
|
|
411
|
-
await
|
|
429
|
+
await se;
|
|
412
430
|
} finally {
|
|
413
|
-
|
|
431
|
+
se = null;
|
|
414
432
|
}
|
|
415
433
|
}
|
|
416
434
|
}
|
|
417
435
|
function sendEvent(e2) {
|
|
418
436
|
var _a2;
|
|
419
437
|
const a2 = { ...e2, app_url: (e2 == null ? void 0 : e2.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
420
|
-
if (
|
|
438
|
+
if (oe || !isWebSocketOpen(re)) return void saveEventToIDB(a2);
|
|
421
439
|
const u2 = JSON.stringify({ type: "event", event: a2, mapUuid: window.sfMapUuid });
|
|
422
440
|
try {
|
|
423
|
-
|
|
441
|
+
re.send(u2);
|
|
424
442
|
} catch (e3) {
|
|
425
443
|
saveEventToIDB(a2);
|
|
426
444
|
}
|
|
@@ -430,104 +448,118 @@
|
|
|
430
448
|
const a3 = document.createElement("a");
|
|
431
449
|
return a3.href = e3, `${a3.hostname}${a3.port ? `:${a3.port}` : ""}`;
|
|
432
450
|
})(e2), w2 = new URL(e2).protocol;
|
|
433
|
-
return
|
|
434
|
-
ee && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (
|
|
451
|
+
return re = new z(`${"https:" === w2 ? "wss" : "ws"}://${m2}/ws/notify/?apiKey=${a2}&sessionId=${u2}&sender=JS%2FTS&version=1.8.9`, [], { connectionTimeout: 3e4 }), re.addEventListener("open", () => {
|
|
452
|
+
ee && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (le ? "ENABLED" : "DISABLED"))), (async () => {
|
|
435
453
|
try {
|
|
436
|
-
|
|
454
|
+
oe = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
437
455
|
} finally {
|
|
438
|
-
|
|
456
|
+
oe = false;
|
|
439
457
|
}
|
|
440
|
-
null !=
|
|
458
|
+
null != ie && clearInterval(ie), ie = window.setInterval(() => {
|
|
441
459
|
flushBufferedEvents();
|
|
442
460
|
}, 2e3);
|
|
443
461
|
})();
|
|
444
|
-
}),
|
|
462
|
+
}), re.addEventListener("close", () => {
|
|
445
463
|
ee && console.log("[Sailfish] WebSocket closed");
|
|
446
|
-
}),
|
|
464
|
+
}), re.addEventListener("message", (e3) => {
|
|
447
465
|
try {
|
|
448
466
|
const a3 = JSON.parse(e3.data);
|
|
449
|
-
if ("funcSpanTrackingControl" === a3.type) if (ee && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a3.enabled, timeoutSeconds: a3.timeoutSeconds, expirationTimestampMs: a3.expirationTimestampMs }), null !==
|
|
467
|
+
if ("funcSpanTrackingControl" === a3.type) if (ee && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a3.enabled, timeoutSeconds: a3.timeoutSeconds, expirationTimestampMs: a3.expirationTimestampMs }), null !== ce && (window.clearTimeout(ce), ce = null), le = a3.enabled, de = false, ee && console.log("[Sailfish] Function span tracking " + (a3.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a3.enabled) {
|
|
450
468
|
if (a3.expirationTimestampMs) {
|
|
451
|
-
|
|
452
|
-
const e4 = Date.now(), u3 =
|
|
453
|
-
ee && console.log(`[Sailfish] Server expiration timestamp: ${
|
|
454
|
-
|
|
455
|
-
}, u3) : (
|
|
469
|
+
pe = a3.expirationTimestampMs;
|
|
470
|
+
const e4 = Date.now(), u3 = pe - e4;
|
|
471
|
+
ee && console.log(`[Sailfish] Server expiration timestamp: ${pe}, ms until expiration: ${u3}`), u3 > 0 ? (saveGlobalFuncSpanState(true, pe), ce = window.setTimeout(() => {
|
|
472
|
+
de || (le = false, pe = null, clearGlobalFuncSpanState(), ee && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time"));
|
|
473
|
+
}, u3)) : (le = false, pe = null, clearGlobalFuncSpanState(), ee && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
456
474
|
} else {
|
|
457
475
|
const e4 = a3.timeoutSeconds || 3600;
|
|
458
|
-
e4 > 0 && (
|
|
459
|
-
|
|
476
|
+
e4 > 0 && (pe = Date.now() + 1e3 * e4, saveGlobalFuncSpanState(true, pe), ce = window.setTimeout(() => {
|
|
477
|
+
de || (le = false, pe = null, clearGlobalFuncSpanState(), ee && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e4}s (legacy)`));
|
|
460
478
|
}, 1e3 * e4));
|
|
461
479
|
}
|
|
462
480
|
try {
|
|
463
481
|
const e4 = getOrSetSessionId();
|
|
464
|
-
|
|
482
|
+
re.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e4, enabled: true, configurationType: "global" })), ee && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e4}`);
|
|
465
483
|
} catch (e4) {
|
|
466
484
|
ee && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e4);
|
|
467
485
|
}
|
|
468
|
-
} else
|
|
486
|
+
} else pe = null, clearGlobalFuncSpanState();
|
|
469
487
|
} catch (e4) {
|
|
470
488
|
}
|
|
471
|
-
}),
|
|
489
|
+
}), re;
|
|
472
490
|
}
|
|
473
491
|
function sendMessage(e2) {
|
|
474
492
|
var _a2;
|
|
475
493
|
"sessionId" in e2 || (e2.sessionId = getOrSetSessionId());
|
|
476
494
|
const a2 = JSON.stringify({ ...e2, app_url: (e2 == null ? void 0 : e2.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) });
|
|
477
|
-
if (isWebSocketOpen(
|
|
478
|
-
|
|
495
|
+
if (isWebSocketOpen(re)) try {
|
|
496
|
+
re.send(a2);
|
|
479
497
|
} catch (e3) {
|
|
480
498
|
saveNotifyMessageToIDB(a2);
|
|
481
499
|
}
|
|
482
500
|
else saveNotifyMessageToIDB(a2);
|
|
483
501
|
}
|
|
484
502
|
function enableFunctionSpanTracking() {
|
|
485
|
-
if (ee && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"),
|
|
503
|
+
if (ee && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), le && !de && (he = ce, me = pe, ee && console.log("[Sailfish] Saved global tracking state while switching to local mode")), le = true, de = true, pe = null, ce = null, isWebSocketOpen(re)) try {
|
|
486
504
|
const e2 = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: te };
|
|
487
|
-
|
|
505
|
+
re.send(JSON.stringify(e2));
|
|
488
506
|
} catch (e2) {
|
|
489
507
|
console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e2);
|
|
490
508
|
}
|
|
491
509
|
else ee && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
492
510
|
}
|
|
493
511
|
function disableFunctionSpanTracking() {
|
|
494
|
-
if (ee && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(
|
|
512
|
+
if (ee && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(re)) try {
|
|
495
513
|
const e2 = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: te };
|
|
496
|
-
|
|
514
|
+
re.send(JSON.stringify(e2));
|
|
497
515
|
} catch (e2) {
|
|
498
516
|
console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e2);
|
|
499
517
|
}
|
|
500
518
|
else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
501
|
-
|
|
519
|
+
de && (de = false, null !== he || null !== me ? (le = true, pe = me, ce = he, ee && console.log("[Sailfish] LOCAL tracking mode disabled, restored GLOBAL tracking state"), he = null, me = null) : (le = false, pe = null, ce = null, ee && console.log("[Sailfish] LOCAL tracking mode disabled, no global tracking to restore")));
|
|
502
520
|
}
|
|
503
521
|
function isFunctionSpanTrackingEnabled() {
|
|
504
|
-
return
|
|
522
|
+
return le;
|
|
505
523
|
}
|
|
506
524
|
function getFuncSpanHeader() {
|
|
507
|
-
if (!
|
|
508
|
-
if (null !==
|
|
509
|
-
if (Date.now() >=
|
|
525
|
+
if (!le) return null;
|
|
526
|
+
if (null !== pe) {
|
|
527
|
+
if (Date.now() >= pe) return le = false, pe = null, ee && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
510
528
|
}
|
|
511
529
|
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
|
|
512
530
|
}
|
|
513
|
-
|
|
514
|
-
|
|
531
|
+
(() => {
|
|
532
|
+
const e2 = (function loadGlobalFuncSpanState() {
|
|
533
|
+
try {
|
|
534
|
+
if ("undefined" == typeof localStorage) return null;
|
|
535
|
+
const e3 = localStorage.getItem(ne);
|
|
536
|
+
if (!e3) return null;
|
|
537
|
+
const a2 = JSON.parse(e3);
|
|
538
|
+
return a2.enabled && a2.expirationTimestampMs && Date.now() >= a2.expirationTimestampMs ? (ee && console.log("[Sailfish] Stored global function span state has expired, clearing"), localStorage.removeItem(ne), null) : (ee && console.log("[Sailfish] Loaded global function span state from localStorage:", a2), a2);
|
|
539
|
+
} catch (e3) {
|
|
540
|
+
return ee && console.warn("[Sailfish] Failed to load global function span state from localStorage:", e3), null;
|
|
541
|
+
}
|
|
542
|
+
})();
|
|
543
|
+
e2 && e2.enabled && (le = true, pe = e2.expirationTimestampMs, de = false, ee && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTimestampMs: pe }));
|
|
544
|
+
})();
|
|
545
|
+
const ge = Object.freeze(Object.defineProperty({ __proto__: null, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
|
|
546
|
+
var ye, we, be = {}, ve = {}, Ce = {}, ke = {};
|
|
515
547
|
function requireBase64() {
|
|
516
|
-
if (
|
|
517
|
-
|
|
548
|
+
if (ye) return ke;
|
|
549
|
+
ye = 1;
|
|
518
550
|
var e2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
519
|
-
return
|
|
551
|
+
return ke.encode = function(a2) {
|
|
520
552
|
if (0 <= a2 && a2 < e2.length) return e2[a2];
|
|
521
553
|
throw new TypeError("Must be between 0 and 63: " + a2);
|
|
522
|
-
},
|
|
554
|
+
}, ke.decode = function(e3) {
|
|
523
555
|
return 65 <= e3 && e3 <= 90 ? e3 - 65 : 97 <= e3 && e3 <= 122 ? e3 - 97 + 26 : 48 <= e3 && e3 <= 57 ? e3 - 48 + 52 : 43 == e3 ? 62 : 47 == e3 ? 63 : -1;
|
|
524
|
-
},
|
|
556
|
+
}, ke;
|
|
525
557
|
}
|
|
526
558
|
function requireBase64Vlq() {
|
|
527
|
-
if (
|
|
528
|
-
|
|
559
|
+
if (we) return Ce;
|
|
560
|
+
we = 1;
|
|
529
561
|
var e2 = requireBase64();
|
|
530
|
-
return
|
|
562
|
+
return Ce.encode = function base64VLQ_encode(a2) {
|
|
531
563
|
var u2, m2 = "", w2 = (function toVLQSigned(e3) {
|
|
532
564
|
return e3 < 0 ? 1 + (-e3 << 1) : 0 + (e3 << 1);
|
|
533
565
|
})(a2);
|
|
@@ -535,7 +567,7 @@
|
|
|
535
567
|
u2 = 31 & w2, (w2 >>>= 5) > 0 && (u2 |= 32), m2 += e2.encode(u2);
|
|
536
568
|
} while (w2 > 0);
|
|
537
569
|
return m2;
|
|
538
|
-
},
|
|
570
|
+
}, Ce.decode = function base64VLQ_decode(a2, u2, m2) {
|
|
539
571
|
var w2, b2, C2 = a2.length, x2 = 0, I2 = 0;
|
|
540
572
|
do {
|
|
541
573
|
if (u2 >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
@@ -546,11 +578,11 @@
|
|
|
546
578
|
var a3 = e3 >> 1;
|
|
547
579
|
return 1 & ~e3 ? a3 : -a3;
|
|
548
580
|
})(x2), m2.rest = u2;
|
|
549
|
-
},
|
|
581
|
+
}, Ce;
|
|
550
582
|
}
|
|
551
|
-
var
|
|
583
|
+
var xe, Me = {};
|
|
552
584
|
function requireUtil() {
|
|
553
|
-
return
|
|
585
|
+
return xe || (xe = 1, (function(e2) {
|
|
554
586
|
e2.getArg = function getArg(e3, a3, u3) {
|
|
555
587
|
if (a3 in e3) return e3[a3];
|
|
556
588
|
if (3 === arguments.length) return u3;
|
|
@@ -662,12 +694,12 @@
|
|
|
662
694
|
}
|
|
663
695
|
return m2(a3);
|
|
664
696
|
};
|
|
665
|
-
})(
|
|
697
|
+
})(Me)), Me;
|
|
666
698
|
}
|
|
667
|
-
var
|
|
699
|
+
var Ie, Oe = {};
|
|
668
700
|
function requireArraySet() {
|
|
669
|
-
if (
|
|
670
|
-
|
|
701
|
+
if (Ie) return Oe;
|
|
702
|
+
Ie = 1;
|
|
671
703
|
var e2 = requireUtil(), a2 = Object.prototype.hasOwnProperty, u2 = "undefined" != typeof Map;
|
|
672
704
|
function ArraySet() {
|
|
673
705
|
this._array = [], this._set = u2 ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -698,12 +730,12 @@
|
|
|
698
730
|
throw new Error("No element indexed by " + e3);
|
|
699
731
|
}, ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
700
732
|
return this._array.slice();
|
|
701
|
-
},
|
|
733
|
+
}, Oe.ArraySet = ArraySet, Oe;
|
|
702
734
|
}
|
|
703
|
-
var
|
|
735
|
+
var Ee, Le, Ae = {};
|
|
704
736
|
function requireMappingList() {
|
|
705
|
-
if (
|
|
706
|
-
|
|
737
|
+
if (Ee) return Ae;
|
|
738
|
+
Ee = 1;
|
|
707
739
|
var e2 = requireUtil();
|
|
708
740
|
function MappingList() {
|
|
709
741
|
this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
@@ -717,11 +749,11 @@
|
|
|
717
749
|
})(this._last, a2) ? (this._sorted = false, this._array.push(a2)) : (this._last = a2, this._array.push(a2));
|
|
718
750
|
}, MappingList.prototype.toArray = function MappingList_toArray() {
|
|
719
751
|
return this._sorted || (this._array.sort(e2.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
|
|
720
|
-
},
|
|
752
|
+
}, Ae.MappingList = MappingList, Ae;
|
|
721
753
|
}
|
|
722
754
|
function requireSourceMapGenerator() {
|
|
723
|
-
if (
|
|
724
|
-
|
|
755
|
+
if (Le) return ve;
|
|
756
|
+
Le = 1;
|
|
725
757
|
var e2 = requireBase64Vlq(), a2 = requireUtil(), u2 = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
|
|
726
758
|
function SourceMapGenerator(e3) {
|
|
727
759
|
e3 || (e3 = {}), this._file = a2.getArg(e3, "file", null), this._sourceRoot = a2.getArg(e3, "sourceRoot", null), this._skipValidation = a2.getArg(e3, "skipValidation", false), this._ignoreInvalidMapping = a2.getArg(e3, "ignoreInvalidMapping", false), this._sources = new u2(), this._names = new u2(), this._mappings = new m2(), this._sourcesContents = null;
|
|
@@ -798,11 +830,11 @@
|
|
|
798
830
|
return null != this._file && (e3.file = this._file), null != this._sourceRoot && (e3.sourceRoot = this._sourceRoot), this._sourcesContents && (e3.sourcesContent = this._generateSourcesContent(e3.sources, e3.sourceRoot)), e3;
|
|
799
831
|
}, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
800
832
|
return JSON.stringify(this.toJSON());
|
|
801
|
-
},
|
|
833
|
+
}, ve.SourceMapGenerator = SourceMapGenerator, ve;
|
|
802
834
|
}
|
|
803
|
-
var
|
|
835
|
+
var Te, De = {}, Ue = {};
|
|
804
836
|
function requireBinarySearch() {
|
|
805
|
-
return
|
|
837
|
+
return Te || (Te = 1, (function(e2) {
|
|
806
838
|
function recursiveSearch(a2, u2, m2, w2, b2, C2) {
|
|
807
839
|
var x2 = Math.floor((u2 - a2) / 2) + a2, I2 = b2(m2, w2[x2], true);
|
|
808
840
|
return 0 === I2 ? x2 : I2 > 0 ? u2 - x2 > 1 ? recursiveSearch(x2, u2, m2, w2, b2, C2) : C2 == e2.LEAST_UPPER_BOUND ? u2 < w2.length ? u2 : -1 : x2 : x2 - a2 > 1 ? recursiveSearch(a2, x2, m2, w2, b2, C2) : C2 == e2.LEAST_UPPER_BOUND ? x2 : a2 < 0 ? -1 : a2;
|
|
@@ -814,11 +846,11 @@
|
|
|
814
846
|
for (; b2 - 1 >= 0 && 0 === m2(u2[b2], u2[b2 - 1], true); ) --b2;
|
|
815
847
|
return b2;
|
|
816
848
|
};
|
|
817
|
-
})(
|
|
849
|
+
})(Ue)), Ue;
|
|
818
850
|
}
|
|
819
|
-
var
|
|
851
|
+
var Be, je, Ge = {};
|
|
820
852
|
function requireQuickSort() {
|
|
821
|
-
if (
|
|
853
|
+
if (Be) return Ge;
|
|
822
854
|
function SortTemplate(e3) {
|
|
823
855
|
function swap(e4, a2, u2) {
|
|
824
856
|
var m2 = e4[a2];
|
|
@@ -837,21 +869,21 @@
|
|
|
837
869
|
}
|
|
838
870
|
};
|
|
839
871
|
}
|
|
840
|
-
|
|
872
|
+
Be = 1;
|
|
841
873
|
let e2 = /* @__PURE__ */ new WeakMap();
|
|
842
|
-
return
|
|
874
|
+
return Ge.quickSort = function(a2, u2, m2 = 0) {
|
|
843
875
|
let w2 = e2.get(u2);
|
|
844
876
|
void 0 === w2 && (w2 = (function cloneSort(e3) {
|
|
845
877
|
let a3 = SortTemplate.toString();
|
|
846
878
|
return new Function(`return ${a3}`)()(e3);
|
|
847
879
|
})(u2), e2.set(u2, w2)), w2(a2, u2, m2, a2.length - 1);
|
|
848
|
-
},
|
|
880
|
+
}, Ge;
|
|
849
881
|
}
|
|
850
|
-
var
|
|
851
|
-
var
|
|
852
|
-
return
|
|
853
|
-
if (
|
|
854
|
-
|
|
882
|
+
var Ve, qe, He = {};
|
|
883
|
+
var Je = (function requireSourceMap() {
|
|
884
|
+
return qe || (qe = 1, be.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, be.SourceMapConsumer = (function requireSourceMapConsumer() {
|
|
885
|
+
if (je) return De;
|
|
886
|
+
je = 1;
|
|
855
887
|
var e2 = requireUtil(), a2 = requireBinarySearch(), u2 = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
|
|
856
888
|
function SourceMapConsumer(a3, u3) {
|
|
857
889
|
var m3 = a3;
|
|
@@ -908,7 +940,7 @@
|
|
|
908
940
|
else for (var _2 = x2.originalColumn; x2 && x2.originalLine === m3 && x2.originalColumn == _2; ) b3.push({ line: e2.getArg(x2, "generatedLine", null), column: e2.getArg(x2, "generatedColumn", null), lastColumn: e2.getArg(x2, "lastGeneratedColumn", null) }), x2 = this._originalMappings[++C2];
|
|
909
941
|
}
|
|
910
942
|
return b3;
|
|
911
|
-
},
|
|
943
|
+
}, De.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a3) {
|
|
912
944
|
var u3, m3 = a3;
|
|
913
945
|
if (null != this.sourceRoot && (m3 = e2.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
|
|
914
946
|
for (u3 = 0; u3 < this._absoluteSources.length; ++u3) if (this._absoluteSources[u3] == a3) return u3;
|
|
@@ -1025,7 +1057,7 @@
|
|
|
1025
1057
|
if (b3.source === m3.source) return { line: e2.getArg(b3, "generatedLine", null), column: e2.getArg(b3, "generatedColumn", null), lastColumn: e2.getArg(b3, "lastGeneratedColumn", null) };
|
|
1026
1058
|
}
|
|
1027
1059
|
return { line: null, column: null, lastColumn: null };
|
|
1028
|
-
},
|
|
1060
|
+
}, De.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
|
|
1029
1061
|
for (var e3 = [], a3 = 0; a3 < this._sections.length; a3++) for (var u3 = 0; u3 < this._sections[a3].consumer.sources.length; u3++) e3.push(this._sections[a3].consumer.sources[u3]);
|
|
1030
1062
|
return e3;
|
|
1031
1063
|
} }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u3) {
|
|
@@ -1064,10 +1096,10 @@
|
|
|
1064
1096
|
this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
|
|
1065
1097
|
}
|
|
1066
1098
|
w2(this.__generatedMappings, e2.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e2.compareByOriginalPositions);
|
|
1067
|
-
},
|
|
1068
|
-
})().SourceMapConsumer,
|
|
1069
|
-
if (
|
|
1070
|
-
|
|
1099
|
+
}, De.IndexedSourceMapConsumer = IndexedSourceMapConsumer, De;
|
|
1100
|
+
})().SourceMapConsumer, be.SourceNode = (function requireSourceNode() {
|
|
1101
|
+
if (Ve) return He;
|
|
1102
|
+
Ve = 1;
|
|
1071
1103
|
var e2 = requireSourceMapGenerator().SourceMapGenerator, a2 = requireUtil(), u2 = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
|
|
1072
1104
|
function SourceNode(e3, a3, u3, w2, b2) {
|
|
1073
1105
|
this.children = [], this.sourceContents = {}, this.line = null == e3 ? null : e3, this.column = null == a3 ? null : a3, this.source = null == u3 ? null : u3, this.name = null == b2 ? null : b2, this[m2] = true, null != w2 && this.add(w2);
|
|
@@ -1151,20 +1183,20 @@
|
|
|
1151
1183
|
}), this.walkSourceContents(function(e3, a4) {
|
|
1152
1184
|
m3.setSourceContent(e3, a4);
|
|
1153
1185
|
}), { code: u3.code, map: m3 };
|
|
1154
|
-
},
|
|
1155
|
-
})().SourceNode),
|
|
1186
|
+
}, He.SourceNode = SourceNode, He;
|
|
1187
|
+
})().SourceNode), be;
|
|
1156
1188
|
})();
|
|
1157
|
-
const
|
|
1189
|
+
const Ye = /* @__PURE__ */ new Map(), Xe = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
|
|
1158
1190
|
async function getConsumerFor(e2, a2) {
|
|
1159
1191
|
const u2 = (e2 || `/assets/${a2}`).split("?")[0], m2 = [`${u2}.map`, u2.replace(/\.js$/, ".js.map"), `/assets/${a2}.map`];
|
|
1160
1192
|
for (const e3 of m2) try {
|
|
1161
|
-
if (
|
|
1193
|
+
if (Ye.has(e3)) return Ye.get(e3);
|
|
1162
1194
|
const a3 = await fetch(e3);
|
|
1163
1195
|
if (!a3.ok) continue;
|
|
1164
1196
|
const u3 = await a3.json();
|
|
1165
1197
|
if (!u3 || !u3.mappings || !u3.sources) continue;
|
|
1166
|
-
const m3 = await new
|
|
1167
|
-
return
|
|
1198
|
+
const m3 = await new Je.SourceMapConsumer(u3);
|
|
1199
|
+
return Ye.set(e3, m3), m3;
|
|
1168
1200
|
} catch {
|
|
1169
1201
|
}
|
|
1170
1202
|
return null;
|
|
@@ -1176,7 +1208,7 @@
|
|
|
1176
1208
|
if (!e3) return ["No stack trace available"];
|
|
1177
1209
|
const a3 = Array.isArray(e3) ? e3 : e3.split("\n"), u3 = [];
|
|
1178
1210
|
for (const e4 of a3) {
|
|
1179
|
-
const a4 = e4.match(
|
|
1211
|
+
const a4 = e4.match(Xe);
|
|
1180
1212
|
if (!a4) {
|
|
1181
1213
|
u3.push(e4);
|
|
1182
1214
|
continue;
|
|
@@ -1191,8 +1223,8 @@
|
|
|
1191
1223
|
u3.push(`${e4} [No source map found for ${w3}]`);
|
|
1192
1224
|
continue;
|
|
1193
1225
|
}
|
|
1194
|
-
let O2 = _2.originalPositionFor({ line: x2, column: I2, bias:
|
|
1195
|
-
if (!O2.source || null == O2.line) for (let e5 = 1; e5 <= 20 && (O2 = _2.originalPositionFor({ line: x2, column: Math.max(0, I2 - e5), bias:
|
|
1226
|
+
let O2 = _2.originalPositionFor({ line: x2, column: I2, bias: Je.SourceMapConsumer.GREATEST_LOWER_BOUND });
|
|
1227
|
+
if (!O2.source || null == O2.line) for (let e5 = 1; e5 <= 20 && (O2 = _2.originalPositionFor({ line: x2, column: Math.max(0, I2 - e5), bias: Je.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e5++) ;
|
|
1196
1228
|
if (O2.source && null != O2.line) {
|
|
1197
1229
|
const e5 = O2.name || "anonymous";
|
|
1198
1230
|
u3.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e5})`);
|
|
@@ -1202,11 +1234,11 @@
|
|
|
1202
1234
|
})(m2), b2 = w2.filter((e3) => !e3.includes("chunk-") && !e3.includes("react-dom"));
|
|
1203
1235
|
sendMessage({ type: "event", event: { type: 6, data: { payload: { message: u2, stack: m2, trace: b2.length > 0 ? b2 : w2, filteredStack: b2, userAgent: navigator.userAgent, url: window.location.href, timestamp: Date.now(), level: "error" } } } });
|
|
1204
1236
|
}
|
|
1205
|
-
const
|
|
1206
|
-
const
|
|
1237
|
+
const Qe = readDebugFlag();
|
|
1238
|
+
const et = readDebugFlag();
|
|
1207
1239
|
function sendGraphQLRequest(e2, a2, u2, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
1208
1240
|
const C2 = `${u2.backendApi}/graphql/?apiKey=${u2.apiKey}`;
|
|
1209
|
-
return
|
|
1241
|
+
return et && console.log(`Initial GraphQL request for ${e2} at ${C2}`), (function exponentialBackoff(e3, a3, u3 = 5, m3 = 2e3, w3 = 2) {
|
|
1210
1242
|
let b3 = 0;
|
|
1211
1243
|
const attemptRequest = async () => {
|
|
1212
1244
|
try {
|
|
@@ -1214,12 +1246,12 @@
|
|
|
1214
1246
|
} catch (e4) {
|
|
1215
1247
|
if (b3++, b3 > u3) throw e4;
|
|
1216
1248
|
const C3 = m3 * Math.pow(w3, b3 - 1);
|
|
1217
|
-
return
|
|
1249
|
+
return Qe && console.log(`Attempt ${b3} failed: ${a3}; Retrying in ${C3}ms...`), await new Promise((e5) => setTimeout(e5, C3)), attemptRequest();
|
|
1218
1250
|
}
|
|
1219
1251
|
};
|
|
1220
1252
|
return attemptRequest();
|
|
1221
1253
|
})(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e2, query: a2, variables: u2 }) }).then((e3) => {
|
|
1222
|
-
if (
|
|
1254
|
+
if (et && console.log(`Received response with status: ${e3.status}`), !e3.ok) throw new Error(`GraphQL request failed with status ${e3.status}`);
|
|
1223
1255
|
return e3.json();
|
|
1224
1256
|
}), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
|
|
1225
1257
|
}
|
|
@@ -1235,9 +1267,9 @@
|
|
|
1235
1267
|
function createTriageFromRecorder(e2, a2, u2, m2, w2, b2) {
|
|
1236
1268
|
return sendGraphQLRequest("CreateTriageFromRecorder", "mutation CreateTriageFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String\n ) {\n createTriageFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description\n ) {\n id\n }\n }\n ", { apiKey: e2, recordingSessionId: u2, timestampStart: m2, timestampEnd: w2, description: b2, backendApi: a2 });
|
|
1237
1269
|
}
|
|
1238
|
-
const
|
|
1270
|
+
const nt = { enabled: false, openModalExistingMode: { key: "e", requireCmdCtrl: false }, openModalCaptureNewMode: { key: "n", requireCmdCtrl: false }, closeModal: { key: "escape", requireCmdCtrl: false }, submitReport: { key: "enter", requireCmdCtrl: true }, startRecording: { key: "r", requireCmdCtrl: false }, stopRecording: { key: "escape", requireCmdCtrl: true } }, ot = { shortcuts: { ...nt }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
|
|
1239
1271
|
} };
|
|
1240
|
-
let
|
|
1272
|
+
let st = null, it = { mode: "lookback", description: "" }, at = null, lt = null, ct = null, ut = false;
|
|
1241
1273
|
function getShortcutKeyCmdCtrlLabel() {
|
|
1242
1274
|
return (function isMacPlatform() {
|
|
1243
1275
|
const e2 = navigator.userAgentData;
|
|
@@ -1250,11 +1282,11 @@
|
|
|
1250
1282
|
return e3.requireCmdCtrl && a2.push(getShortcutKeyCmdCtrlLabel()), a2.push((function formatShortcutKeyLabel(e4) {
|
|
1251
1283
|
return ({ escape: "esc" }[e4.toLowerCase()] || e4).toUpperCase();
|
|
1252
1284
|
})(e3.key)), a2.map((e4) => `<span style="background: #F1F5F9; border:1px solid #cbd5e1; border-radius: 4px; padding: 0 4px; font-weight: 500; font-size: 12px; color: #94A3B8; line-height: 16px;">${e4}</span>`).join(e3.requireCmdCtrl ? " + " : "");
|
|
1253
|
-
})(
|
|
1285
|
+
})(ot.shortcuts[e2]);
|
|
1254
1286
|
}
|
|
1255
1287
|
function setupIssueReporting(e2) {
|
|
1256
|
-
|
|
1257
|
-
const a3 = { ...
|
|
1288
|
+
ot.apiKey = e2.apiKey, ot.backendApi = e2.backendApi, ot.resolveSessionId = e2.getSessionId, e2.customBaseUrl && (ot.triageBaseUrl = e2.customBaseUrl), ot.shortcuts = (function mergeShortcutsConfig(e3) {
|
|
1289
|
+
const a3 = { ...nt };
|
|
1258
1290
|
if (!e3) return a3;
|
|
1259
1291
|
"boolean" == typeof e3.enabled && (a3.enabled = e3.enabled);
|
|
1260
1292
|
const u2 = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
|
|
@@ -1264,7 +1296,7 @@
|
|
|
1264
1296
|
}
|
|
1265
1297
|
return a3;
|
|
1266
1298
|
})(e2.shortcuts);
|
|
1267
|
-
const { shortcuts: a2 } =
|
|
1299
|
+
const { shortcuts: a2 } = ot;
|
|
1268
1300
|
window.addEventListener("keydown", (e3) => {
|
|
1269
1301
|
const u2 = (function isTypingInInput() {
|
|
1270
1302
|
const e4 = document.activeElement;
|
|
@@ -1274,20 +1306,20 @@
|
|
|
1274
1306
|
} : injectModalHTML;
|
|
1275
1307
|
if (C2 && shortcutUsed("openModalExistingMode")) return e3.preventDefault(), void x2("lookback");
|
|
1276
1308
|
if (C2 && shortcutUsed("openModalCaptureNewMode")) return e3.preventDefault(), void x2("startnow");
|
|
1277
|
-
if (b2 && !
|
|
1309
|
+
if (b2 && !ut && shortcutUsed("closeModal")) return e3.preventDefault(), void closeModal();
|
|
1278
1310
|
if (b2 && shortcutUsed("submitReport")) {
|
|
1279
1311
|
const a3 = document.getElementById("sf-issue-submit-btn");
|
|
1280
1312
|
return void (a3 && !a3.disabled && (e3.preventDefault(), a3.click()));
|
|
1281
1313
|
}
|
|
1282
|
-
if (
|
|
1283
|
-
if (b2 && "startnow" ===
|
|
1314
|
+
if (ut && m2 === a2.stopRecording.key && w2 === a2.stopRecording.requireCmdCtrl) return e3.preventDefault(), void stopRecording();
|
|
1315
|
+
if (b2 && "startnow" === it.mode && m2 === a2.startRecording.key && w2 === a2.startRecording.requireCmdCtrl && !u2) {
|
|
1284
1316
|
const a3 = document.getElementById("sf-start-recording-btn");
|
|
1285
1317
|
return void (a3 && (e3.preventDefault(), a3.click()));
|
|
1286
1318
|
}
|
|
1287
1319
|
});
|
|
1288
1320
|
}
|
|
1289
1321
|
function closeModal() {
|
|
1290
|
-
|
|
1322
|
+
ot.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (st == null ? void 0 : st.parentNode) && st.parentNode.removeChild(st), st = null, ut || (it = { mode: "lookback", description: "", occurredInThisTab: true }, at = null, lt = null), ct && clearInterval(ct);
|
|
1291
1323
|
}
|
|
1292
1324
|
function activateModalIsolation(e2) {
|
|
1293
1325
|
e2.setAttribute("role", "dialog"), e2.setAttribute("aria-modal", "true"), e2.hasAttribute("tabindex") || e2.setAttribute("tabindex", "-1");
|
|
@@ -1346,9 +1378,9 @@
|
|
|
1346
1378
|
};
|
|
1347
1379
|
}
|
|
1348
1380
|
function injectModalHTML(e2 = "lookback") {
|
|
1349
|
-
|
|
1381
|
+
st && (st.remove(), st = null), st = document.createElement("div"), st.id = "sf-report-issue-modal";
|
|
1350
1382
|
const a2 = "startnow" === e2;
|
|
1351
|
-
|
|
1383
|
+
st.innerHTML = `
|
|
1352
1384
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1353
1385
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1354
1386
|
background:#fff; padding:24px; border-radius:12px;
|
|
@@ -1396,7 +1428,7 @@
|
|
|
1396
1428
|
<textarea id="sf-issue-description" placeholder="Add description here"
|
|
1397
1429
|
style="width:100%; height:80px; padding:8px 12px; font-size:14px;
|
|
1398
1430
|
border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
|
|
1399
|
-
resize:none; outline:none;">${
|
|
1431
|
+
resize:none; outline:none;">${it.description}</textarea>
|
|
1400
1432
|
|
|
1401
1433
|
<div id="sf-lookback-container" style="display:${a2 ? "none" : "block"}; margin-bottom:20px;">
|
|
1402
1434
|
<label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1484,8 +1516,8 @@
|
|
|
1484
1516
|
<a href="mailto:info@sailfishqa.com?subject=I'd%20love%20to%20learn%20more&body=Hey%2C%20Sailfish%20AI%20team%20-%20I'd%20love%20to%20learn%20more%20about%20Sailfish%20AI!">Powered by Sailfish AI</a>
|
|
1485
1517
|
</div>
|
|
1486
1518
|
</div>
|
|
1487
|
-
`,
|
|
1488
|
-
const e3 =
|
|
1519
|
+
`, it.mode = e2, document.body.appendChild(st), (function bindListeners() {
|
|
1520
|
+
const e3 = st == null ? void 0 : st.querySelectorAll(".sf-issue-tab"), a3 = document.getElementById("sf-start-recording-btn"), u2 = document.getElementById("sf-modal-close-btn"), m2 = document.getElementById("sf-issue-submit-btn"), w2 = document.getElementById("sf-lookback-minutes");
|
|
1489
1521
|
e3 == null ? void 0 : e3.forEach((e4) => {
|
|
1490
1522
|
e4.addEventListener("click", (e5) => {
|
|
1491
1523
|
const a4 = e5.currentTarget.dataset.mode;
|
|
@@ -1493,11 +1525,11 @@
|
|
|
1493
1525
|
});
|
|
1494
1526
|
}), u2 && (u2.onclick = closeModal);
|
|
1495
1527
|
w2 && w2.addEventListener("change", () => {
|
|
1496
|
-
"lookback" ===
|
|
1528
|
+
"lookback" === it.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
|
|
1497
1529
|
});
|
|
1498
1530
|
a3 && (a3.onclick = () => {
|
|
1499
1531
|
const e4 = document.getElementById("sf-issue-description");
|
|
1500
|
-
e4 && (
|
|
1532
|
+
e4 && (it.description = e4.value), (function startCountdownThenRecord() {
|
|
1501
1533
|
if (document.getElementById("sf-countdown-overlay")) return;
|
|
1502
1534
|
const e5 = document.createElement("div");
|
|
1503
1535
|
e5.id = "sf-countdown-overlay", e5.style.cssText = "\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.6);\n z-index: 10001;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 80px;\n font-weight: bold;\n color: white;\n font-family: sans-serif;\n ";
|
|
@@ -1506,9 +1538,9 @@
|
|
|
1506
1538
|
const u3 = setInterval(async () => {
|
|
1507
1539
|
if (a4--, a4 > 0) e5.textContent = a4.toString();
|
|
1508
1540
|
else {
|
|
1509
|
-
clearInterval(u3), document.body.removeChild(e5),
|
|
1541
|
+
clearInterval(u3), document.body.removeChild(e5), at = Date.now(), ut = true;
|
|
1510
1542
|
try {
|
|
1511
|
-
const { enableFunctionSpanTracking: e6 } = await Promise.resolve().then(() =>
|
|
1543
|
+
const { enableFunctionSpanTracking: e6 } = await Promise.resolve().then(() => ge);
|
|
1512
1544
|
e6();
|
|
1513
1545
|
} catch (e6) {
|
|
1514
1546
|
console.error("[Report Issue] Failed to enable function span tracking:", e6);
|
|
@@ -1534,8 +1566,8 @@
|
|
|
1534
1566
|
`, e6.addEventListener("click", () => stopRecording()), document.body.appendChild(e6);
|
|
1535
1567
|
const a5 = e6.querySelector("#sf-recording-timer");
|
|
1536
1568
|
if (!a5) return;
|
|
1537
|
-
|
|
1538
|
-
const e7 = Date.now() - (
|
|
1569
|
+
ct = setInterval(() => {
|
|
1570
|
+
const e7 = Date.now() - (at ?? Date.now()), u4 = Math.floor(e7 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e7 % 6e4 / 1e3).toString().padStart(2, "0");
|
|
1539
1571
|
a5.textContent = `${u4}:${m3}`;
|
|
1540
1572
|
}, 1e3);
|
|
1541
1573
|
})();
|
|
@@ -1543,12 +1575,12 @@
|
|
|
1543
1575
|
}, 1e3);
|
|
1544
1576
|
})();
|
|
1545
1577
|
});
|
|
1546
|
-
|
|
1578
|
+
st == null ? void 0 : st.addEventListener("click", (e4) => {
|
|
1547
1579
|
var _a2;
|
|
1548
1580
|
if (e4.target.closest("#sf-issue-submit-btn")) {
|
|
1549
|
-
const e5 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a4 =
|
|
1581
|
+
const e5 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a4 = it.mode;
|
|
1550
1582
|
let u3, m3;
|
|
1551
|
-
if (
|
|
1583
|
+
if (it.description = e5, "startnow" === a4) u3 = at ?? Date.now() - 3e5, m3 = lt ?? Date.now();
|
|
1552
1584
|
else {
|
|
1553
1585
|
const e6 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
|
|
1554
1586
|
m3 = Date.now(), u3 = m3 - e6;
|
|
@@ -1557,9 +1589,9 @@
|
|
|
1557
1589
|
var _a3, _b;
|
|
1558
1590
|
try {
|
|
1559
1591
|
showTriageStatusModal(true);
|
|
1560
|
-
const m4 = await createTriageFromRecorder(
|
|
1561
|
-
if (!
|
|
1562
|
-
return
|
|
1592
|
+
const m4 = await createTriageFromRecorder(ot.apiKey, ot.backendApi, (function getSessionIdSafely() {
|
|
1593
|
+
if (!ot.resolveSessionId) throw new Error("getSessionId not defined");
|
|
1594
|
+
return ot.resolveSessionId();
|
|
1563
1595
|
})(), e6, a5, u4), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
|
|
1564
1596
|
w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
|
|
1565
1597
|
} catch (e7) {
|
|
@@ -1568,29 +1600,29 @@
|
|
|
1568
1600
|
})(`${u3}`, `${m3}`, e5);
|
|
1569
1601
|
}
|
|
1570
1602
|
});
|
|
1571
|
-
})(),
|
|
1603
|
+
})(), ot.deactivateIsolation = activateModalIsolation(st);
|
|
1572
1604
|
}
|
|
1573
1605
|
function setActiveTab(e2) {
|
|
1574
|
-
|
|
1575
|
-
const a2 =
|
|
1606
|
+
it.mode = e2;
|
|
1607
|
+
const a2 = st == null ? void 0 : st.querySelector("#sf-tab-lookback"), u2 = st == null ? void 0 : st.querySelector("#sf-tab-startnow");
|
|
1576
1608
|
"lookback" === e2 ? (a2.style.background = "white", a2.style.color = "#0F172A", u2.style.background = "transparent", u2.style.color = "#64748B") : (u2.style.background = "white", u2.style.color = "#0F172A", a2.style.background = "transparent", a2.style.color = "#64748B");
|
|
1577
1609
|
}
|
|
1578
1610
|
function updateModeSpecificUI(e2) {
|
|
1579
1611
|
const a2 = document.querySelector("#sf-issue-mode-info div"), u2 = document.getElementById("sf-issue-submit-btn"), m2 = document.getElementById("sf-record-button-container"), w2 = document.getElementById("sf-recording-timer-label"), b2 = document.getElementById("sf-recording-timer-display"), C2 = document.getElementById("sf-modal-footer"), x2 = document.getElementById("sf-lookback-container");
|
|
1580
1612
|
if (a2 && u2 && m2 && w2 && b2 && C2 && x2) if ("startnow" === e2) {
|
|
1581
1613
|
m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a2.textContent = "I want to reproduce the issue right now.";
|
|
1582
|
-
const e3 = null !==
|
|
1583
|
-
if (u2.disabled = !e3, u2.style.opacity = e3 ? "1" : "0.4", u2.style.cursor = e3 ? "pointer" : "not-allowed",
|
|
1584
|
-
const e4 = Math.floor((
|
|
1614
|
+
const e3 = null !== at && null !== lt;
|
|
1615
|
+
if (u2.disabled = !e3, u2.style.opacity = e3 ? "1" : "0.4", u2.style.cursor = e3 ? "pointer" : "not-allowed", at && lt) {
|
|
1616
|
+
const e4 = Math.floor((lt - at) / 1e3), a3 = String(Math.floor(e4 / 60)).padStart(2, "0"), u3 = String(e4 % 60).padStart(2, "0");
|
|
1585
1617
|
w2.style.display = "block", b2.textContent = `${a3}:${u3}`;
|
|
1586
1618
|
} else w2.style.display = "none";
|
|
1587
1619
|
} else m2.style.display = "none", w2.style.display = "none", x2.style.display = "block", C2.style.justifyContent = "flex-end", a2.textContent = "Something already happened. Capture the past few minutes.", u2.disabled = false, u2.style.opacity = "1", u2.style.cursor = "pointer";
|
|
1588
1620
|
}
|
|
1589
1621
|
async function stopRecording() {
|
|
1590
1622
|
var _a2;
|
|
1591
|
-
|
|
1623
|
+
lt = Date.now(), ut = false, ct && clearInterval(ct), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
|
|
1592
1624
|
try {
|
|
1593
|
-
const { disableFunctionSpanTracking: e2 } = await Promise.resolve().then(() =>
|
|
1625
|
+
const { disableFunctionSpanTracking: e2 } = await Promise.resolve().then(() => ge);
|
|
1594
1626
|
e2();
|
|
1595
1627
|
} catch (e2) {
|
|
1596
1628
|
console.error("[Report Issue] Failed to disable function span tracking:", e2);
|
|
@@ -1603,17 +1635,17 @@
|
|
|
1603
1635
|
a3 && (a3.textContent = "Re-record");
|
|
1604
1636
|
}
|
|
1605
1637
|
const a2 = document.getElementById("sf-recording-timer-label"), u2 = document.getElementById("sf-recording-timer-display");
|
|
1606
|
-
if (a2 && u2 &&
|
|
1607
|
-
const e3 = Math.floor((
|
|
1638
|
+
if (a2 && u2 && at && lt) {
|
|
1639
|
+
const e3 = Math.floor((lt - at) / 1e3), m3 = Math.floor(e3 / 60).toString().padStart(2, "0"), w3 = (e3 % 60).toString().padStart(2, "0");
|
|
1608
1640
|
u2.textContent = `${m3}:${w3}`, a2.style.display = "block";
|
|
1609
1641
|
}
|
|
1610
1642
|
const m2 = document.getElementById("sf-issue-description");
|
|
1611
|
-
m2 && (m2.value =
|
|
1643
|
+
m2 && (m2.value = it.description);
|
|
1612
1644
|
const w2 = document.querySelector('input[value="startnow"]');
|
|
1613
1645
|
w2 && (w2.checked = true);
|
|
1614
1646
|
const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
|
|
1615
1647
|
if (b2 && C2) {
|
|
1616
|
-
const e3 = Math.floor(((
|
|
1648
|
+
const e3 = Math.floor(((lt ?? 0) - (at ?? 0)) / 1e3), a3 = Math.floor(e3 / 60).toString().padStart(2, "0"), u3 = Math.floor(e3 % 60).toString().padStart(2, "0");
|
|
1617
1649
|
C2.textContent = `${a3}:${u3}`, C2.style.color = "black", b2.style.display = "flex";
|
|
1618
1650
|
}
|
|
1619
1651
|
const x2 = document.getElementById("sf-issue-submit-btn");
|
|
@@ -1626,7 +1658,7 @@
|
|
|
1626
1658
|
var _a3, _b;
|
|
1627
1659
|
(_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1628
1660
|
})();
|
|
1629
|
-
const u2 = a2 ? `${
|
|
1661
|
+
const u2 = a2 ? `${ot.triageBaseUrl}/triage/${a2}?from=inAppReportIssue` : "", m2 = document.createElement("div");
|
|
1630
1662
|
m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1631
1663
|
const w2 = e2 ? "Reporting Issue..." : "Issue reported!", b2 = e2 ? '<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>' : "", C2 = e2 ? '<div style="display:flex; justify-content:center; align-items:center; padding: 40px 0;">\n <div style="width:24px; height:24px; border:2px solid #295dbf; border-top:2px solid white; border-radius:50%; animation:spin 1s linear infinite;"></div>\n </div>' : "", x2 = e2 ? "" : '<div id="sf-copied-status" style="display:none; font-size:12px; font-weight:500; color:white;\n background-color:#22c55e; padding:4px 8px; border-radius:6px; white-space:nowrap; align-items:center; gap:6px;">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M21 7.5L9 19.5L3 13.5L5.25 11.25L9 15L18.75 5.25L21 7.5Z" fill="white"/>\n </svg>\n Copied\n </div>';
|
|
1632
1664
|
m2.innerHTML = `
|
|
@@ -1688,7 +1720,7 @@
|
|
|
1688
1720
|
function fadeCardAndRemove(e2, a2, u2 = 300) {
|
|
1689
1721
|
a2.style.opacity = "0", a2.addEventListener("transitionend", () => e2.remove(), { once: true }), setTimeout(() => e2.remove(), u2 + 100);
|
|
1690
1722
|
}
|
|
1691
|
-
var
|
|
1723
|
+
var pt = Object.defineProperty, b$1 = (e2, a2, u2) => ((e3, a3, u3) => a3 in e3 ? pt(e3, a3, { enumerable: true, configurable: true, writable: true, value: u3 }) : e3[a3] = u3)(e2, "symbol" != typeof a2 ? a2 + "" : a2, u2), dt = Object.defineProperty, xn = (e2, a2, u2) => ((e3, a3, u3) => a3 in e3 ? dt(e3, a3, { enumerable: true, configurable: true, writable: true, value: u3 }) : e3[a3] = u3)(e2, "symbol" != typeof a2 ? a2 + "" : a2, u2), ht = ((e2) => (e2[e2.Document = 0] = "Document", e2[e2.DocumentType = 1] = "DocumentType", e2[e2.Element = 2] = "Element", e2[e2.Text = 3] = "Text", e2[e2.CDATA = 4] = "CDATA", e2[e2.Comment = 5] = "Comment", e2))(ht || {});
|
|
1692
1724
|
function vr(e2) {
|
|
1693
1725
|
return e2.nodeType === e2.ELEMENT_NODE;
|
|
1694
1726
|
}
|
|
@@ -1730,7 +1762,7 @@
|
|
|
1730
1762
|
})(e2.cssText);
|
|
1731
1763
|
return a2 || e2.cssText;
|
|
1732
1764
|
}
|
|
1733
|
-
let
|
|
1765
|
+
let gt = class {
|
|
1734
1766
|
constructor() {
|
|
1735
1767
|
xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
|
|
1736
1768
|
}
|
|
@@ -1782,7 +1814,7 @@
|
|
|
1782
1814
|
function fe(e2) {
|
|
1783
1815
|
return e2.toLowerCase();
|
|
1784
1816
|
}
|
|
1785
|
-
const
|
|
1817
|
+
const yt = "__rrweb_original__";
|
|
1786
1818
|
function Yt(e2) {
|
|
1787
1819
|
const a2 = e2.type;
|
|
1788
1820
|
return e2.hasAttribute("data-rr-is-password") ? "password" : a2 ? fe(a2) : null;
|
|
@@ -1797,19 +1829,19 @@
|
|
|
1797
1829
|
const m2 = u2.pathname.match(/\.([0-9a-z]+)(?:$)/i);
|
|
1798
1830
|
return (null == m2 ? void 0 : m2[1]) ?? null;
|
|
1799
1831
|
}
|
|
1800
|
-
let
|
|
1801
|
-
const
|
|
1832
|
+
let wt = 1;
|
|
1833
|
+
const St = new RegExp("[^a-z0-9-_:]");
|
|
1802
1834
|
function Ir() {
|
|
1803
|
-
return
|
|
1835
|
+
return wt++;
|
|
1804
1836
|
}
|
|
1805
|
-
let
|
|
1806
|
-
const
|
|
1837
|
+
let bt, vt;
|
|
1838
|
+
const Ct = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, kt = /^(?:[a-z+]+:)?\/\//i, xt = /^www\..*/i, Mt = /^(data:)([^,]*),(.*)/i;
|
|
1807
1839
|
function Pt(e2, a2) {
|
|
1808
|
-
return (e2 || "").replace(
|
|
1840
|
+
return (e2 || "").replace(Ct, (e3, u2, m2, w2, b2, C2) => {
|
|
1809
1841
|
const x2 = m2 || b2 || C2, I2 = u2 || w2 || "";
|
|
1810
1842
|
if (!x2) return e3;
|
|
1811
|
-
if (
|
|
1812
|
-
if (
|
|
1843
|
+
if (kt.test(x2) || xt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1844
|
+
if (Mt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1813
1845
|
if ("/" === x2[0]) return `url(${I2}${(function Ei(e4) {
|
|
1814
1846
|
let a3 = "";
|
|
1815
1847
|
return a3 = e4.indexOf("//") > -1 ? e4.split("/").slice(0, 3).join("/") : e4.split("/")[0], a3 = a3.split("?")[0], a3;
|
|
@@ -1820,8 +1852,8 @@
|
|
|
1820
1852
|
return `url(${I2}${_2.join("/")}${I2})`;
|
|
1821
1853
|
});
|
|
1822
1854
|
}
|
|
1823
|
-
const
|
|
1824
|
-
const
|
|
1855
|
+
const It = /^[^ \t\n\r\u000c]+/, Et = /^[, \t\n\r\u000c]+/;
|
|
1856
|
+
const Lt = /* @__PURE__ */ new WeakMap();
|
|
1825
1857
|
function At(e2, a2) {
|
|
1826
1858
|
return a2 && "" !== a2.trim() ? $t(e2, a2) : a2;
|
|
1827
1859
|
}
|
|
@@ -1829,8 +1861,8 @@
|
|
|
1829
1861
|
return !("svg" !== e2.tagName && !e2.ownerSVGElement);
|
|
1830
1862
|
}
|
|
1831
1863
|
function $t(e2, a2) {
|
|
1832
|
-
let u2 =
|
|
1833
|
-
if (u2 || (u2 = e2.createElement("a"),
|
|
1864
|
+
let u2 = Lt.get(e2);
|
|
1865
|
+
if (u2 || (u2 = e2.createElement("a"), Lt.set(e2, u2)), a2) {
|
|
1834
1866
|
if (a2.startsWith("blob:") || a2.startsWith("data:")) return a2;
|
|
1835
1867
|
} else a2 = "";
|
|
1836
1868
|
return u2.setAttribute("href", a2), u2.href;
|
|
@@ -1845,8 +1877,8 @@
|
|
|
1845
1877
|
return w2 ? (m4 = w2[0], u3 += m4.length, m4) : "";
|
|
1846
1878
|
}
|
|
1847
1879
|
const m3 = [];
|
|
1848
|
-
for (; n(
|
|
1849
|
-
let w2 = n(
|
|
1880
|
+
for (; n(Et), !(u3 >= a3.length); ) {
|
|
1881
|
+
let w2 = n(It);
|
|
1850
1882
|
if ("," === w2.slice(-1)) w2 = At(e3, w2.substring(0, w2.length - 1)), m3.push(w2);
|
|
1851
1883
|
else {
|
|
1852
1884
|
let b2 = "";
|
|
@@ -1916,9 +1948,9 @@
|
|
|
1916
1948
|
})(u2, m2);
|
|
1917
1949
|
switch (e2.nodeType) {
|
|
1918
1950
|
case e2.DOCUMENT_NODE:
|
|
1919
|
-
return "CSS1Compat" !== e2.compatMode ? { type:
|
|
1951
|
+
return "CSS1Compat" !== e2.compatMode ? { type: ht.Document, childNodes: [], compatMode: e2.compatMode } : { type: ht.Document, childNodes: [] };
|
|
1920
1952
|
case e2.DOCUMENT_TYPE_NODE:
|
|
1921
|
-
return { type:
|
|
1953
|
+
return { type: ht.DocumentType, name: e2.name, publicId: e2.publicId, systemId: e2.systemId, rootId: $2 };
|
|
1922
1954
|
case e2.ELEMENT_NODE:
|
|
1923
1955
|
return (function Vi(e3, a3) {
|
|
1924
1956
|
const { doc: u3, blockClass: m3, blockSelector: w3, inlineStylesheet: b3, maskInputOptions: C3 = {}, maskInputFn: x3, dataURLOptions: I3 = {}, inlineImages: _3, recordCanvas: O3, keepIframeSrcFn: E3, newlyAddedElement: D3 = false, rootId: F3 } = a3, U3 = (function Ui(e4, a4, u4) {
|
|
@@ -1936,7 +1968,7 @@
|
|
|
1936
1968
|
})(e3, m3, w3), B3 = (function Oi(e4) {
|
|
1937
1969
|
if (e4 instanceof HTMLFormElement) return "form";
|
|
1938
1970
|
const a4 = fe(e4.tagName);
|
|
1939
|
-
return
|
|
1971
|
+
return St.test(a4) ? "div" : a4;
|
|
1940
1972
|
})(e3);
|
|
1941
1973
|
let $3 = {};
|
|
1942
1974
|
const z2 = e3.attributes.length;
|
|
@@ -1965,7 +1997,7 @@
|
|
|
1965
1997
|
const a4 = e4.getContext("2d");
|
|
1966
1998
|
if (!a4) return true;
|
|
1967
1999
|
for (let u4 = 0; u4 < e4.width; u4 += 50) for (let m4 = 0; m4 < e4.height; m4 += 50) {
|
|
1968
|
-
const w4 = a4.getImageData, b4 =
|
|
2000
|
+
const w4 = a4.getImageData, b4 = yt in w4 ? w4[yt] : w4;
|
|
1969
2001
|
if (new Uint32Array(b4.call(a4, u4, m4, Math.min(50, e4.width - u4), Math.min(50, e4.height - m4)).data.buffer).some((e5) => 0 !== e5)) return false;
|
|
1970
2002
|
}
|
|
1971
2003
|
return true;
|
|
@@ -1977,11 +2009,11 @@
|
|
|
1977
2009
|
}
|
|
1978
2010
|
}
|
|
1979
2011
|
if ("img" === B3 && _3) {
|
|
1980
|
-
|
|
2012
|
+
bt || (bt = u3.createElement("canvas"), vt = bt.getContext("2d"));
|
|
1981
2013
|
const a4 = e3, m4 = a4.currentSrc || a4.getAttribute("src") || "<unknown-src>", w4 = a4.crossOrigin, A = () => {
|
|
1982
2014
|
a4.removeEventListener("load", A);
|
|
1983
2015
|
try {
|
|
1984
|
-
|
|
2016
|
+
bt.width = a4.naturalWidth, bt.height = a4.naturalHeight, vt.drawImage(a4, 0, 0), $3.rr_dataURL = bt.toDataURL(I3.type, I3.quality);
|
|
1985
2017
|
} catch (e4) {
|
|
1986
2018
|
if ("anonymous" !== a4.crossOrigin) return a4.crossOrigin = "anonymous", void (a4.complete && 0 !== a4.naturalWidth ? A() : a4.addEventListener("load", A));
|
|
1987
2019
|
console.warn(`Cannot inline img src=${m4}! Error: ${e4}`);
|
|
@@ -2004,7 +2036,7 @@
|
|
|
2004
2036
|
customElements.get(B3) && (j2 = true);
|
|
2005
2037
|
} catch {
|
|
2006
2038
|
}
|
|
2007
|
-
return { type:
|
|
2039
|
+
return { type: ht.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e3) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
|
|
2008
2040
|
})(e2, { doc: u2, blockClass: w2, blockSelector: b2, inlineStylesheet: x2, maskInputOptions: I2, maskInputFn: O2, dataURLOptions: E2, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: B2, rootId: $2 });
|
|
2009
2041
|
case e2.TEXT_NODE:
|
|
2010
2042
|
return (function ji(e3, a3) {
|
|
@@ -2020,12 +2052,12 @@
|
|
|
2020
2052
|
}
|
|
2021
2053
|
x3 = Pt(x3, $t(a3.doc));
|
|
2022
2054
|
}
|
|
2023
|
-
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e3.parentElement) : x3.replace(/[\S]/g, "*")), { type:
|
|
2055
|
+
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e3.parentElement) : x3.replace(/[\S]/g, "*")), { type: ht.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
|
|
2024
2056
|
})(e2, { doc: u2, needsMask: C2, maskTextFn: _2, rootId: $2 });
|
|
2025
2057
|
case e2.CDATA_SECTION_NODE:
|
|
2026
|
-
return { type:
|
|
2058
|
+
return { type: ht.CDATA, textContent: "", rootId: $2 };
|
|
2027
2059
|
case e2.COMMENT_NODE:
|
|
2028
|
-
return { type:
|
|
2060
|
+
return { type: ht.Comment, textContent: e2.textContent || "", rootId: $2 };
|
|
2029
2061
|
default:
|
|
2030
2062
|
return false;
|
|
2031
2063
|
}
|
|
@@ -2041,21 +2073,21 @@
|
|
|
2041
2073
|
if (!ee2) return console.warn(e2, "not serialized"), null;
|
|
2042
2074
|
let te2;
|
|
2043
2075
|
te2 = m2.hasNode(e2) ? m2.getId(e2) : (function Gi(e3, a3) {
|
|
2044
|
-
return !!(a3.comment && e3.type ===
|
|
2045
|
-
})(ee2, F2) || !Q2 && ee2.type ===
|
|
2076
|
+
return !!(a3.comment && e3.type === ht.Comment || e3.type === ht.Element && (a3.script && ("script" === e3.tagName || "link" === e3.tagName && ("preload" === e3.attributes.rel || "modulepreload" === e3.attributes.rel) && "script" === e3.attributes.as || "link" === e3.tagName && "prefetch" === e3.attributes.rel && "string" == typeof e3.attributes.href && "js" === xr(e3.attributes.href)) || a3.headFavicon && ("link" === e3.tagName && "shortcut icon" === e3.attributes.rel || "meta" === e3.tagName && (N(e3.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === N(e3.attributes.name) || "icon" === N(e3.attributes.rel) || "apple-touch-icon" === N(e3.attributes.rel) || "shortcut icon" === N(e3.attributes.rel))) || "meta" === e3.tagName && (a3.headMetaDescKeywords && N(e3.attributes.name).match(/^description|keywords$/) || a3.headMetaSocial && (N(e3.attributes.property).match(/^(og|twitter|fb):/) || N(e3.attributes.name).match(/^(og|twitter):/) || "pinterest" === N(e3.attributes.name)) || a3.headMetaRobots && ("robots" === N(e3.attributes.name) || "googlebot" === N(e3.attributes.name) || "bingbot" === N(e3.attributes.name)) || a3.headMetaHttpEquiv && void 0 !== e3.attributes["http-equiv"] || a3.headMetaAuthorship && ("author" === N(e3.attributes.name) || "generator" === N(e3.attributes.name) || "framework" === N(e3.attributes.name) || "publisher" === N(e3.attributes.name) || "progid" === N(e3.attributes.name) || N(e3.attributes.property).match(/^article:/) || N(e3.attributes.property).match(/^product:/)) || a3.headMetaVerification && ("google-site-verification" === N(e3.attributes.name) || "yandex-verification" === N(e3.attributes.name) || "csrf-token" === N(e3.attributes.name) || "p:domain_verify" === N(e3.attributes.name) || "verify-v1" === N(e3.attributes.name) || "verification" === N(e3.attributes.name) || "shopify-checkout-api-token" === N(e3.attributes.name)))));
|
|
2077
|
+
})(ee2, F2) || !Q2 && ee2.type === ht.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
|
|
2046
2078
|
const ne2 = Object.assign(ee2, { id: te2 });
|
|
2047
2079
|
if (m2.add(e2, ne2), -2 === te2) return null;
|
|
2048
2080
|
z2 && z2(e2);
|
|
2049
2081
|
let re2 = !I2;
|
|
2050
|
-
if (ne2.type ===
|
|
2082
|
+
if (ne2.type === ht.Element) {
|
|
2051
2083
|
re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
|
|
2052
2084
|
const a3 = e2.shadowRoot;
|
|
2053
2085
|
a3 && ze(a3) && (ne2.isShadowHost = true);
|
|
2054
2086
|
}
|
|
2055
|
-
if ((ne2.type ===
|
|
2056
|
-
F2.headWhitespace && ne2.type ===
|
|
2087
|
+
if ((ne2.type === ht.Document || ne2.type === ht.Element) && re2) {
|
|
2088
|
+
F2.headWhitespace && ne2.type === ht.Element && "head" === ne2.tagName && (Q2 = false);
|
|
2057
2089
|
const a3 = { doc: u2, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 };
|
|
2058
|
-
if (ne2.type !==
|
|
2090
|
+
if (ne2.type !== ht.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u3 of Array.from(e2.childNodes)) {
|
|
2059
2091
|
const e3 = Se(u3, a3);
|
|
2060
2092
|
e3 && ne2.childNodes.push(e3);
|
|
2061
2093
|
}
|
|
@@ -2064,7 +2096,7 @@
|
|
|
2064
2096
|
m3 && (ze(e2.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
|
|
2065
2097
|
}
|
|
2066
2098
|
}
|
|
2067
|
-
return e2.parentNode && We(e2.parentNode) && ze(e2.parentNode) && (ne2.isShadow = true), ne2.type ===
|
|
2099
|
+
return e2.parentNode && We(e2.parentNode) && ze(e2.parentNode) && (ne2.isShadow = true), ne2.type === ht.Element && "iframe" === ne2.tagName && (function _i(e3, a3, u3) {
|
|
2068
2100
|
const m3 = e3.contentWindow;
|
|
2069
2101
|
if (!m3) return;
|
|
2070
2102
|
let w3, b3 = false;
|
|
@@ -2090,7 +2122,7 @@
|
|
|
2090
2122
|
const u3 = Se(a3, { doc: a3, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: false, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 });
|
|
2091
2123
|
u3 && j2(e2, u3);
|
|
2092
2124
|
}
|
|
2093
|
-
}, V2), ne2.type ===
|
|
2125
|
+
}, V2), ne2.type === ht.Element && "link" === ne2.tagName && "string" == typeof ne2.attributes.rel && ("stylesheet" === ne2.attributes.rel || "preload" === ne2.attributes.rel && "string" == typeof ne2.attributes.href && "css" === xr(ne2.attributes.href)) && (function Wi(e3, a3, u3) {
|
|
2094
2126
|
let m3, w3 = false;
|
|
2095
2127
|
try {
|
|
2096
2128
|
m3 = e3.sheet;
|
|
@@ -2130,13 +2162,13 @@
|
|
|
2130
2162
|
} });
|
|
2131
2163
|
}), u2;
|
|
2132
2164
|
}
|
|
2133
|
-
var
|
|
2134
|
-
return { isColorSupported: false, reset:
|
|
2165
|
+
var Rt = { exports: {} }, Dt = String, Rr = function() {
|
|
2166
|
+
return { isColorSupported: false, reset: Dt, bold: Dt, dim: Dt, italic: Dt, underline: Dt, inverse: Dt, hidden: Dt, strikethrough: Dt, black: Dt, red: Dt, green: Dt, yellow: Dt, blue: Dt, magenta: Dt, cyan: Dt, white: Dt, gray: Dt, bgBlack: Dt, bgRed: Dt, bgGreen: Dt, bgYellow: Dt, bgBlue: Dt, bgMagenta: Dt, bgCyan: Dt, bgWhite: Dt, blackBright: Dt, redBright: Dt, greenBright: Dt, yellowBright: Dt, blueBright: Dt, magentaBright: Dt, cyanBright: Dt, whiteBright: Dt, bgBlackBright: Dt, bgRedBright: Dt, bgGreenBright: Dt, bgYellowBright: Dt, bgBlueBright: Dt, bgMagentaBright: Dt, bgCyanBright: Dt, bgWhiteBright: Dt };
|
|
2135
2167
|
};
|
|
2136
|
-
|
|
2137
|
-
var
|
|
2138
|
-
const
|
|
2139
|
-
let
|
|
2168
|
+
Rt.exports = Rr(), Rt.exports.createColors = Rr;
|
|
2169
|
+
var Ft = Rt.exports;
|
|
2170
|
+
const Ut = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2171
|
+
let Bt = Ft, Wt = Ut, jt = class Lr extends Error {
|
|
2140
2172
|
constructor(e2, a2, u2, m2, w2, b2) {
|
|
2141
2173
|
super(e2), this.name = "CssSyntaxError", this.reason = e2, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a2 < "u" && typeof u2 < "u" && ("number" == typeof a2 ? (this.line = a2, this.column = u2) : (this.line = a2.line, this.column = a2.column, this.endLine = u2.line, this.endColumn = u2.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, Lr);
|
|
2142
2174
|
}
|
|
@@ -2146,11 +2178,11 @@
|
|
|
2146
2178
|
showSourceCode(e2) {
|
|
2147
2179
|
if (!this.source) return "";
|
|
2148
2180
|
let a2 = this.source;
|
|
2149
|
-
null == e2 && (e2 =
|
|
2181
|
+
null == e2 && (e2 = Bt.isColorSupported);
|
|
2150
2182
|
let n = (e3) => e3, r = (e3) => e3, i = (e3) => e3;
|
|
2151
2183
|
if (e2) {
|
|
2152
|
-
let { bold: e3, gray: a3, red: u3 } =
|
|
2153
|
-
r = (a4) => e3(u3(a4)), n = (e4) => a3(e4),
|
|
2184
|
+
let { bold: e3, gray: a3, red: u3 } = Bt.createColors(true);
|
|
2185
|
+
r = (a4) => e3(u3(a4)), n = (e4) => a3(e4), Wt && (i = (e4) => Wt(e4));
|
|
2154
2186
|
}
|
|
2155
2187
|
let u2 = a2.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u2.length), b2 = String(w2).length;
|
|
2156
2188
|
return u2.slice(m2, w2).map((e3, a3) => {
|
|
@@ -2171,10 +2203,10 @@
|
|
|
2171
2203
|
return e2 && (e2 = "\n\n" + e2 + "\n"), this.name + ": " + this.message + e2;
|
|
2172
2204
|
}
|
|
2173
2205
|
};
|
|
2174
|
-
var
|
|
2175
|
-
|
|
2176
|
-
const
|
|
2177
|
-
let
|
|
2206
|
+
var Vt = jt;
|
|
2207
|
+
jt.default = jt;
|
|
2208
|
+
const Ht = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
2209
|
+
let Kt = class {
|
|
2178
2210
|
constructor(e2) {
|
|
2179
2211
|
this.builder = e2;
|
|
2180
2212
|
}
|
|
@@ -2226,7 +2258,7 @@
|
|
|
2226
2258
|
if (u2 || (u2 = a2), a2 && (m2 = e2.raws[a2], typeof m2 < "u")) return m2;
|
|
2227
2259
|
let w2 = e2.parent;
|
|
2228
2260
|
if ("before" === u2 && (!w2 || "root" === w2.type && w2.first === e2 || w2 && "document" === w2.type)) return "";
|
|
2229
|
-
if (!w2) return
|
|
2261
|
+
if (!w2) return Ht[u2];
|
|
2230
2262
|
let b2 = e2.root();
|
|
2231
2263
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u2] < "u") return b2.rawCache[u2];
|
|
2232
2264
|
if ("before" === u2 || "after" === u2) return this.beforeAfter(e2, u2);
|
|
@@ -2238,7 +2270,7 @@
|
|
|
2238
2270
|
if (m2 = e3.raws[a2], typeof m2 < "u") return false;
|
|
2239
2271
|
});
|
|
2240
2272
|
}
|
|
2241
|
-
return typeof m2 > "u" && (m2 =
|
|
2273
|
+
return typeof m2 > "u" && (m2 = Ht[u2]), b2.rawCache[u2] = m2, m2;
|
|
2242
2274
|
}
|
|
2243
2275
|
rawBeforeClose(e2) {
|
|
2244
2276
|
let a2;
|
|
@@ -2314,17 +2346,17 @@
|
|
|
2314
2346
|
this[e2.type](e2, a2);
|
|
2315
2347
|
}
|
|
2316
2348
|
};
|
|
2317
|
-
var
|
|
2318
|
-
|
|
2319
|
-
let
|
|
2349
|
+
var Jt = Kt;
|
|
2350
|
+
Kt.default = Kt;
|
|
2351
|
+
let Xt = Jt;
|
|
2320
2352
|
function ks(e2, a2) {
|
|
2321
|
-
new
|
|
2353
|
+
new Xt(a2).stringify(e2);
|
|
2322
2354
|
}
|
|
2323
|
-
var
|
|
2355
|
+
var Qt = ks;
|
|
2324
2356
|
ks.default = ks;
|
|
2325
|
-
var
|
|
2326
|
-
|
|
2327
|
-
let
|
|
2357
|
+
var en = {};
|
|
2358
|
+
en.isClean = Symbol("isClean"), en.my = Symbol("my");
|
|
2359
|
+
let tn = Vt, nn = Jt, rn = Qt, { isClean: on, my: sn } = en;
|
|
2328
2360
|
function Cs(e2, a2) {
|
|
2329
2361
|
let u2 = new e2.constructor();
|
|
2330
2362
|
for (let m2 in e2) {
|
|
@@ -2346,12 +2378,12 @@
|
|
|
2346
2378
|
}
|
|
2347
2379
|
return w2;
|
|
2348
2380
|
}
|
|
2349
|
-
let
|
|
2381
|
+
let an = class {
|
|
2350
2382
|
get proxyOf() {
|
|
2351
2383
|
return this;
|
|
2352
2384
|
}
|
|
2353
2385
|
constructor(e2 = {}) {
|
|
2354
|
-
this.raws = {}, this[
|
|
2386
|
+
this.raws = {}, this[on] = false, this[sn] = true;
|
|
2355
2387
|
for (let a2 in e2) if ("nodes" === a2) {
|
|
2356
2388
|
this.nodes = [];
|
|
2357
2389
|
for (let u2 of e2[a2]) "function" == typeof u2.clone ? this.append(u2.clone()) : this.append(u2);
|
|
@@ -2395,19 +2427,19 @@
|
|
|
2395
2427
|
let { end: u2, start: m2 } = this.rangeBy(a2);
|
|
2396
2428
|
return this.source.input.error(e2, { column: m2.column, line: m2.line }, { column: u2.column, line: u2.line }, a2);
|
|
2397
2429
|
}
|
|
2398
|
-
return new
|
|
2430
|
+
return new tn(e2);
|
|
2399
2431
|
}
|
|
2400
2432
|
getProxyProcessor() {
|
|
2401
2433
|
return { get: (e2, a2) => "proxyOf" === a2 ? e2 : "root" === a2 ? () => e2.root().toProxy() : e2[a2], set: (e2, a2, u2) => (e2[a2] === u2 || (e2[a2] = u2, ("prop" === a2 || "value" === a2 || "name" === a2 || "params" === a2 || "important" === a2 || "text" === a2) && e2.markDirty()), true) };
|
|
2402
2434
|
}
|
|
2403
2435
|
markClean() {
|
|
2404
|
-
this[
|
|
2436
|
+
this[on] = true;
|
|
2405
2437
|
}
|
|
2406
2438
|
markDirty() {
|
|
2407
|
-
if (this[
|
|
2408
|
-
this[
|
|
2439
|
+
if (this[on]) {
|
|
2440
|
+
this[on] = false;
|
|
2409
2441
|
let e2 = this;
|
|
2410
|
-
for (; e2 = e2.parent; ) e2[
|
|
2442
|
+
for (; e2 = e2.parent; ) e2[on] = false;
|
|
2411
2443
|
}
|
|
2412
2444
|
}
|
|
2413
2445
|
next() {
|
|
@@ -2443,7 +2475,7 @@
|
|
|
2443
2475
|
return (u2.line < a2.line || u2.line === a2.line && u2.column <= a2.column) && (u2 = { column: a2.column + 1, line: a2.line }), { end: u2, start: a2 };
|
|
2444
2476
|
}
|
|
2445
2477
|
raw(e2, a2) {
|
|
2446
|
-
return new
|
|
2478
|
+
return new nn().raw(this, e2, a2);
|
|
2447
2479
|
}
|
|
2448
2480
|
remove() {
|
|
2449
2481
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -2480,7 +2512,7 @@
|
|
|
2480
2512
|
toProxy() {
|
|
2481
2513
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
2482
2514
|
}
|
|
2483
|
-
toString(e2 =
|
|
2515
|
+
toString(e2 = rn) {
|
|
2484
2516
|
e2.stringify && (e2 = e2.stringify);
|
|
2485
2517
|
let a2 = "";
|
|
2486
2518
|
return e2(this, (e3) => {
|
|
@@ -2493,16 +2525,16 @@
|
|
|
2493
2525
|
return e2.warn(a2, m2);
|
|
2494
2526
|
}
|
|
2495
2527
|
};
|
|
2496
|
-
var
|
|
2497
|
-
|
|
2498
|
-
let
|
|
2528
|
+
var ln = an;
|
|
2529
|
+
an.default = an;
|
|
2530
|
+
let cn = ln, un = class extends cn {
|
|
2499
2531
|
constructor(e2) {
|
|
2500
2532
|
super(e2), this.type = "comment";
|
|
2501
2533
|
}
|
|
2502
2534
|
};
|
|
2503
|
-
var
|
|
2504
|
-
|
|
2505
|
-
let
|
|
2535
|
+
var pn = un;
|
|
2536
|
+
un.default = un;
|
|
2537
|
+
let dn = ln, hn = class extends dn {
|
|
2506
2538
|
get variable() {
|
|
2507
2539
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
2508
2540
|
}
|
|
@@ -2510,16 +2542,16 @@
|
|
|
2510
2542
|
e2 && typeof e2.value < "u" && "string" != typeof e2.value && (e2 = { ...e2, value: String(e2.value) }), super(e2), this.type = "decl";
|
|
2511
2543
|
}
|
|
2512
2544
|
};
|
|
2513
|
-
var
|
|
2514
|
-
|
|
2515
|
-
let
|
|
2545
|
+
var fn = hn;
|
|
2546
|
+
hn.default = hn;
|
|
2547
|
+
let mn, gn, yn, wn, Sn = pn, bn = fn, Mn = ln, { isClean: In, my: _n } = en;
|
|
2516
2548
|
function _r(e2) {
|
|
2517
2549
|
return e2.map((e3) => (e3.nodes && (e3.nodes = _r(e3.nodes)), delete e3.source, e3));
|
|
2518
2550
|
}
|
|
2519
2551
|
function Wr(e2) {
|
|
2520
|
-
if (e2[
|
|
2552
|
+
if (e2[In] = false, e2.proxyOf.nodes) for (let a2 of e2.proxyOf.nodes) Wr(a2);
|
|
2521
2553
|
}
|
|
2522
|
-
let
|
|
2554
|
+
let On = class zr extends Mn {
|
|
2523
2555
|
get first() {
|
|
2524
2556
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
2525
2557
|
}
|
|
@@ -2571,7 +2603,7 @@
|
|
|
2571
2603
|
return this.markDirty(), this;
|
|
2572
2604
|
}
|
|
2573
2605
|
normalize(e2, a2) {
|
|
2574
|
-
if ("string" == typeof e2) e2 = _r(
|
|
2606
|
+
if ("string" == typeof e2) e2 = _r(gn(e2).nodes);
|
|
2575
2607
|
else if (typeof e2 > "u") e2 = [];
|
|
2576
2608
|
else if (Array.isArray(e2)) {
|
|
2577
2609
|
e2 = e2.slice(0);
|
|
@@ -2582,14 +2614,14 @@
|
|
|
2582
2614
|
} else if (e2.type) e2 = [e2];
|
|
2583
2615
|
else if (e2.prop) {
|
|
2584
2616
|
if (typeof e2.value > "u") throw new Error("Value field is missed in node creation");
|
|
2585
|
-
"string" != typeof e2.value && (e2.value = String(e2.value)), e2 = [new
|
|
2586
|
-
} else if (e2.selector || e2.selectors) e2 = [new
|
|
2587
|
-
else if (e2.name) e2 = [new
|
|
2617
|
+
"string" != typeof e2.value && (e2.value = String(e2.value)), e2 = [new bn(e2)];
|
|
2618
|
+
} else if (e2.selector || e2.selectors) e2 = [new wn(e2)];
|
|
2619
|
+
else if (e2.name) e2 = [new mn(e2)];
|
|
2588
2620
|
else {
|
|
2589
2621
|
if (!e2.text) throw new Error("Unknown node type in node creation");
|
|
2590
|
-
e2 = [new
|
|
2622
|
+
e2 = [new Sn(e2)];
|
|
2591
2623
|
}
|
|
2592
|
-
return e2.map((e3) => (e3[
|
|
2624
|
+
return e2.map((e3) => (e3[_n] || zr.rebuild(e3), (e3 = e3.proxyOf).parent && e3.parent.removeChild(e3), e3[In] && Wr(e3), e3.raws || (e3.raws = {}), typeof e3.raws.before > "u" && a2 && typeof a2.raws.before < "u" && (e3.raws.before = a2.raws.before.replace(/\S/g, "")), e3.parent = this.proxyOf, e3));
|
|
2593
2625
|
}
|
|
2594
2626
|
prepend(...e2) {
|
|
2595
2627
|
e2 = e2.reverse();
|
|
@@ -2665,22 +2697,22 @@
|
|
|
2665
2697
|
}));
|
|
2666
2698
|
}
|
|
2667
2699
|
};
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
},
|
|
2700
|
+
On.registerParse = (e2) => {
|
|
2701
|
+
gn = e2;
|
|
2702
|
+
}, On.registerRule = (e2) => {
|
|
2703
|
+
wn = e2;
|
|
2704
|
+
}, On.registerAtRule = (e2) => {
|
|
2671
2705
|
mn = e2;
|
|
2672
|
-
},
|
|
2673
|
-
|
|
2674
|
-
}, Mn.registerRoot = (e2) => {
|
|
2675
|
-
fn = e2;
|
|
2706
|
+
}, On.registerRoot = (e2) => {
|
|
2707
|
+
yn = e2;
|
|
2676
2708
|
};
|
|
2677
|
-
var
|
|
2678
|
-
|
|
2679
|
-
"atrule" === e2.type ? Object.setPrototypeOf(e2,
|
|
2680
|
-
|
|
2709
|
+
var En = On;
|
|
2710
|
+
On.default = On, On.rebuild = (e2) => {
|
|
2711
|
+
"atrule" === e2.type ? Object.setPrototypeOf(e2, mn.prototype) : "rule" === e2.type ? Object.setPrototypeOf(e2, wn.prototype) : "decl" === e2.type ? Object.setPrototypeOf(e2, bn.prototype) : "comment" === e2.type ? Object.setPrototypeOf(e2, Sn.prototype) : "root" === e2.type && Object.setPrototypeOf(e2, yn.prototype), e2[_n] = true, e2.nodes && e2.nodes.forEach((e3) => {
|
|
2712
|
+
On.rebuild(e3);
|
|
2681
2713
|
});
|
|
2682
2714
|
};
|
|
2683
|
-
let
|
|
2715
|
+
let Ln = En, Rn = class extends Ln {
|
|
2684
2716
|
constructor(e2) {
|
|
2685
2717
|
super(e2), this.type = "atrule";
|
|
2686
2718
|
}
|
|
@@ -2691,38 +2723,38 @@
|
|
|
2691
2723
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e2);
|
|
2692
2724
|
}
|
|
2693
2725
|
};
|
|
2694
|
-
var
|
|
2695
|
-
|
|
2696
|
-
let
|
|
2726
|
+
var An = Rn;
|
|
2727
|
+
Rn.default = Rn, Ln.registerAtRule(Rn);
|
|
2728
|
+
let Tn, Nn, Pn = En, Dn = class extends Pn {
|
|
2697
2729
|
constructor(e2) {
|
|
2698
2730
|
super({ type: "document", ...e2 }), this.nodes || (this.nodes = []);
|
|
2699
2731
|
}
|
|
2700
2732
|
toResult(e2 = {}) {
|
|
2701
|
-
return new
|
|
2733
|
+
return new Tn(new Nn(), this, e2).stringify();
|
|
2702
2734
|
}
|
|
2703
2735
|
};
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
},
|
|
2707
|
-
|
|
2736
|
+
Dn.registerLazyResult = (e2) => {
|
|
2737
|
+
Tn = e2;
|
|
2738
|
+
}, Dn.registerProcessor = (e2) => {
|
|
2739
|
+
Nn = e2;
|
|
2708
2740
|
};
|
|
2709
|
-
var
|
|
2710
|
-
|
|
2711
|
-
var
|
|
2741
|
+
var Fn = Dn;
|
|
2742
|
+
Dn.default = Dn;
|
|
2743
|
+
var Un = { nanoid: (e2 = 21) => {
|
|
2712
2744
|
let a2 = "", u2 = 0 | e2;
|
|
2713
2745
|
for (; u2--; ) a2 += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
2714
2746
|
return a2;
|
|
2715
2747
|
} };
|
|
2716
|
-
let { existsSync:
|
|
2717
|
-
let
|
|
2748
|
+
let { existsSync: Bn, readFileSync: Wn } = Ut, { dirname: zn, join: jn } = Ut, { SourceMapConsumer: Vn, SourceMapGenerator: qn } = Ut;
|
|
2749
|
+
let Zn = class {
|
|
2718
2750
|
constructor(e2, a2) {
|
|
2719
2751
|
if (false === a2.map) return;
|
|
2720
2752
|
this.loadAnnotation(e2), this.inline = this.startWith(this.annotation, "data:");
|
|
2721
2753
|
let u2 = a2.map ? a2.map.prev : void 0, m2 = this.loadMap(a2.from, u2);
|
|
2722
|
-
!this.mapFile && a2.from && (this.mapFile = a2.from), this.mapFile && (this.root =
|
|
2754
|
+
!this.mapFile && a2.from && (this.mapFile = a2.from), this.mapFile && (this.root = zn(this.mapFile)), m2 && (this.text = m2);
|
|
2723
2755
|
}
|
|
2724
2756
|
consumer() {
|
|
2725
|
-
return this.consumerCache || (this.consumerCache = new
|
|
2757
|
+
return this.consumerCache || (this.consumerCache = new Vn(this.text)), this.consumerCache;
|
|
2726
2758
|
}
|
|
2727
2759
|
decodeInline(e2) {
|
|
2728
2760
|
let a2 = e2.match(/^data:application\/json;charset=utf-?8,/) || e2.match(/^data:application\/json,/);
|
|
@@ -2747,15 +2779,15 @@
|
|
|
2747
2779
|
u2 > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e2.substring(u2, m2)));
|
|
2748
2780
|
}
|
|
2749
2781
|
loadFile(e2) {
|
|
2750
|
-
if (this.root =
|
|
2782
|
+
if (this.root = zn(e2), Bn(e2)) return this.mapFile = e2, Wn(e2, "utf-8").toString().trim();
|
|
2751
2783
|
}
|
|
2752
2784
|
loadMap(e2, a2) {
|
|
2753
2785
|
if (false === a2) return false;
|
|
2754
2786
|
if (a2) {
|
|
2755
2787
|
if ("string" == typeof a2) return a2;
|
|
2756
2788
|
if ("function" != typeof a2) {
|
|
2757
|
-
if (a2 instanceof
|
|
2758
|
-
if (a2 instanceof
|
|
2789
|
+
if (a2 instanceof Vn) return qn.fromSourceMap(a2).toString();
|
|
2790
|
+
if (a2 instanceof qn) return a2.toString();
|
|
2759
2791
|
if (this.isMap(a2)) return JSON.stringify(a2);
|
|
2760
2792
|
throw new Error("Unsupported previous source map format: " + a2.toString());
|
|
2761
2793
|
}
|
|
@@ -2771,7 +2803,7 @@
|
|
|
2771
2803
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
2772
2804
|
if (this.annotation) {
|
|
2773
2805
|
let a3 = this.annotation;
|
|
2774
|
-
return e2 && (a3 =
|
|
2806
|
+
return e2 && (a3 = jn(zn(e2), a3)), this.loadFile(a3);
|
|
2775
2807
|
}
|
|
2776
2808
|
}
|
|
2777
2809
|
}
|
|
@@ -2782,23 +2814,23 @@
|
|
|
2782
2814
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
2783
2815
|
}
|
|
2784
2816
|
};
|
|
2785
|
-
var
|
|
2786
|
-
|
|
2787
|
-
let { nanoid:
|
|
2817
|
+
var Kn = Zn;
|
|
2818
|
+
Zn.default = Zn;
|
|
2819
|
+
let { nanoid: Qn } = Un, { isAbsolute: nr, resolve: rr } = Ut, { SourceMapConsumer: or, SourceMapGenerator: sr } = Ut, { fileURLToPath: ir, pathToFileURL: ar } = Ut, lr = Vt, cr = Kn, ur = Ut, pr = Symbol("fromOffsetCache"), dr = !(!or || !sr), hr = !(!rr || !nr), fr = class {
|
|
2788
2820
|
get from() {
|
|
2789
2821
|
return this.file || this.id;
|
|
2790
2822
|
}
|
|
2791
2823
|
constructor(e2, a2 = {}) {
|
|
2792
2824
|
if (null === e2 || typeof e2 > "u" || "object" == typeof e2 && !e2.toString) throw new Error(`PostCSS received ${e2} instead of CSS string`);
|
|
2793
|
-
if (this.css = e2.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a2.document && (this.document = a2.document.toString()), a2.from && (!
|
|
2794
|
-
let e3 = new
|
|
2825
|
+
if (this.css = e2.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a2.document && (this.document = a2.document.toString()), a2.from && (!hr || /^\w+:\/\//.test(a2.from) || nr(a2.from) ? this.file = a2.from : this.file = rr(a2.from)), hr && dr) {
|
|
2826
|
+
let e3 = new cr(this.css, a2);
|
|
2795
2827
|
if (e3.text) {
|
|
2796
2828
|
this.map = e3;
|
|
2797
2829
|
let a3 = e3.consumer().file;
|
|
2798
2830
|
!this.file && a3 && (this.file = this.mapResolve(a3));
|
|
2799
2831
|
}
|
|
2800
2832
|
}
|
|
2801
|
-
this.file || (this.id = "<input css " +
|
|
2833
|
+
this.file || (this.id = "<input css " + Qn(6) + ">"), this.map && (this.map.file = this.from);
|
|
2802
2834
|
}
|
|
2803
2835
|
error(e2, a2, u2, m2 = {}) {
|
|
2804
2836
|
let w2, b2, C2;
|
|
@@ -2817,17 +2849,17 @@
|
|
|
2817
2849
|
a2 = e3.line, u2 = e3.col;
|
|
2818
2850
|
}
|
|
2819
2851
|
let x2 = this.origin(a2, u2, b2, w2);
|
|
2820
|
-
return C2 = x2 ? new
|
|
2852
|
+
return C2 = x2 ? new lr(e2, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new lr(e2, void 0 === b2 ? a2 : { column: u2, line: a2 }, void 0 === b2 ? u2 : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u2, endColumn: w2, endLine: b2, line: a2, source: this.css }, this.file && (ar && (C2.input.url = ar(this.file).toString()), C2.input.file = this.file), C2;
|
|
2821
2853
|
}
|
|
2822
2854
|
fromOffset(e2) {
|
|
2823
2855
|
let a2, u2;
|
|
2824
|
-
if (this[
|
|
2856
|
+
if (this[pr]) u2 = this[pr];
|
|
2825
2857
|
else {
|
|
2826
2858
|
let e3 = this.css.split("\n");
|
|
2827
2859
|
u2 = new Array(e3.length);
|
|
2828
2860
|
let a3 = 0;
|
|
2829
2861
|
for (let m3 = 0, w2 = e3.length; m3 < w2; m3++) u2[m3] = a3, a3 += e3[m3].length + 1;
|
|
2830
|
-
this[
|
|
2862
|
+
this[pr] = u2;
|
|
2831
2863
|
}
|
|
2832
2864
|
a2 = u2[u2.length - 1];
|
|
2833
2865
|
let m2 = 0;
|
|
@@ -2846,17 +2878,17 @@
|
|
|
2846
2878
|
return { col: e2 - u2[m2] + 1, line: m2 + 1 };
|
|
2847
2879
|
}
|
|
2848
2880
|
mapResolve(e2) {
|
|
2849
|
-
return /^\w+:\/\//.test(e2) ? e2 :
|
|
2881
|
+
return /^\w+:\/\//.test(e2) ? e2 : rr(this.map.consumer().sourceRoot || this.map.root || ".", e2);
|
|
2850
2882
|
}
|
|
2851
2883
|
origin(e2, a2, u2, m2) {
|
|
2852
2884
|
if (!this.map) return false;
|
|
2853
2885
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a2, line: e2 });
|
|
2854
2886
|
if (!x2.source) return false;
|
|
2855
|
-
"number" == typeof u2 && (w2 = C2.originalPositionFor({ column: m2, line: u2 })), b2 =
|
|
2887
|
+
"number" == typeof u2 && (w2 = C2.originalPositionFor({ column: m2, line: u2 })), b2 = nr(x2.source) ? ar(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || ar(this.map.mapFile));
|
|
2856
2888
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
2857
2889
|
if ("file:" === b2.protocol) {
|
|
2858
|
-
if (!
|
|
2859
|
-
I2.file =
|
|
2890
|
+
if (!ir) throw new Error("file: protocol is not available in this PostCSS build");
|
|
2891
|
+
I2.file = ir(b2);
|
|
2860
2892
|
}
|
|
2861
2893
|
let _2 = C2.sourceContentFor(x2.source);
|
|
2862
2894
|
return _2 && (I2.source = _2), I2;
|
|
@@ -2867,9 +2899,9 @@
|
|
|
2867
2899
|
return this.map && (e2.map = { ...this.map }, e2.map.consumerCache && (e2.map.consumerCache = void 0)), e2;
|
|
2868
2900
|
}
|
|
2869
2901
|
};
|
|
2870
|
-
var
|
|
2871
|
-
|
|
2872
|
-
let
|
|
2902
|
+
var mr = fr;
|
|
2903
|
+
fr.default = fr, ur && ur.registerInput && ur.registerInput(fr);
|
|
2904
|
+
let gr, yr, wr = En, Sr = class extends wr {
|
|
2873
2905
|
constructor(e2) {
|
|
2874
2906
|
super(e2), this.type = "root", this.nodes || (this.nodes = []);
|
|
2875
2907
|
}
|
|
@@ -2886,29 +2918,29 @@
|
|
|
2886
2918
|
return !a2 && 0 === u2 && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u2].raws.before), super.removeChild(e2);
|
|
2887
2919
|
}
|
|
2888
2920
|
toResult(e2 = {}) {
|
|
2889
|
-
return new
|
|
2921
|
+
return new gr(new yr(), this, e2).stringify();
|
|
2890
2922
|
}
|
|
2891
2923
|
};
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
},
|
|
2895
|
-
|
|
2924
|
+
Sr.registerLazyResult = (e2) => {
|
|
2925
|
+
gr = e2;
|
|
2926
|
+
}, Sr.registerProcessor = (e2) => {
|
|
2927
|
+
yr = e2;
|
|
2896
2928
|
};
|
|
2897
|
-
var
|
|
2898
|
-
|
|
2899
|
-
let
|
|
2929
|
+
var Cr = Sr;
|
|
2930
|
+
Sr.default = Sr, wr.registerRoot(Sr);
|
|
2931
|
+
let Ar = { comma: (e2) => Ar.split(e2, [","], true), space(e2) {
|
|
2900
2932
|
let a2 = [" ", "\n", " "];
|
|
2901
|
-
return
|
|
2933
|
+
return Ar.split(e2, a2);
|
|
2902
2934
|
}, split(e2, a2, u2) {
|
|
2903
2935
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
2904
2936
|
for (let u3 of e2) _2 ? _2 = false : "\\" === u3 ? _2 = true : x2 ? u3 === I2 && (x2 = false) : '"' === u3 || "'" === u3 ? (x2 = true, I2 = u3) : "(" === u3 ? C2 += 1 : ")" === u3 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a2.includes(u3) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u3;
|
|
2905
2937
|
return (u2 || "" !== w2) && m2.push(w2.trim()), m2;
|
|
2906
2938
|
} };
|
|
2907
|
-
var
|
|
2908
|
-
|
|
2909
|
-
let
|
|
2939
|
+
var Tr = Ar;
|
|
2940
|
+
Ar.default = Ar;
|
|
2941
|
+
let Nr = En, Pr = Tr, Dr = class extends Nr {
|
|
2910
2942
|
get selectors() {
|
|
2911
|
-
return
|
|
2943
|
+
return Pr.comma(this.selector);
|
|
2912
2944
|
}
|
|
2913
2945
|
set selectors(e2) {
|
|
2914
2946
|
let a2 = this.selector ? this.selector.match(/,\s*/) : null, u2 = a2 ? a2[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -2918,34 +2950,34 @@
|
|
|
2918
2950
|
super(e2), this.type = "rule", this.nodes || (this.nodes = []);
|
|
2919
2951
|
}
|
|
2920
2952
|
};
|
|
2921
|
-
var
|
|
2922
|
-
|
|
2923
|
-
let
|
|
2953
|
+
var Fr = Dr;
|
|
2954
|
+
Dr.default = Dr, Nr.registerRule(Dr);
|
|
2955
|
+
let Ur = An, Br = pn, $r = fn, jr = mr, Gr = Kn, Vr = Cr, qr = Fr;
|
|
2924
2956
|
function Ze(e2, a2) {
|
|
2925
2957
|
if (Array.isArray(e2)) return e2.map((e3) => Ze(e3));
|
|
2926
2958
|
let { inputs: u2, ...m2 } = e2;
|
|
2927
2959
|
if (u2) {
|
|
2928
2960
|
a2 = [];
|
|
2929
2961
|
for (let e3 of u2) {
|
|
2930
|
-
let u3 = { ...e3, __proto__:
|
|
2931
|
-
u3.map && (u3.map = { ...u3.map, __proto__:
|
|
2962
|
+
let u3 = { ...e3, __proto__: jr.prototype };
|
|
2963
|
+
u3.map && (u3.map = { ...u3.map, __proto__: Gr.prototype }), a2.push(u3);
|
|
2932
2964
|
}
|
|
2933
2965
|
}
|
|
2934
2966
|
if (m2.nodes && (m2.nodes = e2.nodes.map((e3) => Ze(e3, a2))), m2.source) {
|
|
2935
2967
|
let { inputId: e3, ...u3 } = m2.source;
|
|
2936
2968
|
m2.source = u3, null != e3 && (m2.source.input = a2[e3]);
|
|
2937
2969
|
}
|
|
2938
|
-
if ("root" === m2.type) return new
|
|
2939
|
-
if ("decl" === m2.type) return new
|
|
2940
|
-
if ("rule" === m2.type) return new
|
|
2941
|
-
if ("comment" === m2.type) return new
|
|
2942
|
-
if ("atrule" === m2.type) return new
|
|
2970
|
+
if ("root" === m2.type) return new Vr(m2);
|
|
2971
|
+
if ("decl" === m2.type) return new $r(m2);
|
|
2972
|
+
if ("rule" === m2.type) return new qr(m2);
|
|
2973
|
+
if ("comment" === m2.type) return new Br(m2);
|
|
2974
|
+
if ("atrule" === m2.type) return new Ur(m2);
|
|
2943
2975
|
throw new Error("Unknown node type: " + e2.type);
|
|
2944
2976
|
}
|
|
2945
|
-
var
|
|
2977
|
+
var Hr = Ze;
|
|
2946
2978
|
Ze.default = Ze;
|
|
2947
|
-
let { dirname:
|
|
2948
|
-
var
|
|
2979
|
+
let { dirname: Zr, relative: Kr, resolve: Jr, sep: Yr } = Ut, { SourceMapConsumer: Xr, SourceMapGenerator: Qr } = Ut, { pathToFileURL: eo } = Ut, to = mr, oo = !(!Xr || !Qr), io = !!(Zr && Jr && Kr && Yr);
|
|
2980
|
+
var ao = class {
|
|
2949
2981
|
constructor(e2, a2, u2, m2) {
|
|
2950
2982
|
this.stringify = e2, this.mapOpts = u2.map || {}, this.root = a2, this.opts = u2, this.css = m2, this.originalCSS = m2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
2951
2983
|
}
|
|
@@ -2957,8 +2989,8 @@
|
|
|
2957
2989
|
}
|
|
2958
2990
|
applyPrevMaps() {
|
|
2959
2991
|
for (let e2 of this.previous()) {
|
|
2960
|
-
let a2, u2 = this.toUrl(this.path(e2.file)), m2 = e2.root ||
|
|
2961
|
-
false === this.mapOpts.sourcesContent ? (a2 = new
|
|
2992
|
+
let a2, u2 = this.toUrl(this.path(e2.file)), m2 = e2.root || Zr(e2.file);
|
|
2993
|
+
false === this.mapOpts.sourcesContent ? (a2 = new Xr(e2.text), a2.sourcesContent && (a2.sourcesContent = null)) : a2 = e2.consumer(), this.map.applySourceMap(a2, u2, this.toUrl(this.path(m2)));
|
|
2962
2994
|
}
|
|
2963
2995
|
}
|
|
2964
2996
|
clearAnnotation() {
|
|
@@ -2968,7 +3000,7 @@
|
|
|
2968
3000
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
2969
3001
|
}
|
|
2970
3002
|
generate() {
|
|
2971
|
-
if (this.clearAnnotation(),
|
|
3003
|
+
if (this.clearAnnotation(), io && oo && this.isMap()) return this.generateMap();
|
|
2972
3004
|
{
|
|
2973
3005
|
let e2 = "";
|
|
2974
3006
|
return this.stringify(this.root, (a2) => {
|
|
@@ -2980,12 +3012,12 @@
|
|
|
2980
3012
|
if (this.root) this.generateString();
|
|
2981
3013
|
else if (1 === this.previous().length) {
|
|
2982
3014
|
let e2 = this.previous()[0].consumer();
|
|
2983
|
-
e2.file = this.outputFile(), this.map =
|
|
2984
|
-
} else this.map = new
|
|
3015
|
+
e2.file = this.outputFile(), this.map = Qr.fromSourceMap(e2, { ignoreInvalidMapping: true });
|
|
3016
|
+
} else this.map = new Qr({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
|
|
2985
3017
|
return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
|
|
2986
3018
|
}
|
|
2987
3019
|
generateString() {
|
|
2988
|
-
this.css = "", this.map = new
|
|
3020
|
+
this.css = "", this.map = new Qr({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
2989
3021
|
let e2, a2, u2 = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
2990
3022
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
2991
3023
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u2, b2.generated.column = m2 - 1, x2.source && x2.source.start ? (b2.source = this.sourcePath(x2), b2.original.line = x2.source.start.line, b2.original.column = x2.source.start.column - 1, this.map.addMapping(b2)) : (b2.source = w2, b2.original.line = 1, b2.original.column = 0, this.map.addMapping(b2))), a2 = C2.match(/\n/g), a2 ? (u2 += a2.length, e2 = C2.lastIndexOf("\n"), m2 = C2.length - e2) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -3015,9 +3047,9 @@
|
|
|
3015
3047
|
if (this.mapOpts.absolute || 60 === e2.charCodeAt(0) || /^\w+:\/\//.test(e2)) return e2;
|
|
3016
3048
|
let a2 = this.memoizedPaths.get(e2);
|
|
3017
3049
|
if (a2) return a2;
|
|
3018
|
-
let u2 = this.opts.to ?
|
|
3019
|
-
"string" == typeof this.mapOpts.annotation && (u2 =
|
|
3020
|
-
let m2 =
|
|
3050
|
+
let u2 = this.opts.to ? Zr(this.opts.to) : ".";
|
|
3051
|
+
"string" == typeof this.mapOpts.annotation && (u2 = Zr(Jr(u2, this.mapOpts.annotation)));
|
|
3052
|
+
let m2 = Kr(u2, e2);
|
|
3021
3053
|
return this.memoizedPaths.set(e2, m2), m2;
|
|
3022
3054
|
}
|
|
3023
3055
|
previous() {
|
|
@@ -3028,7 +3060,7 @@
|
|
|
3028
3060
|
}
|
|
3029
3061
|
});
|
|
3030
3062
|
else {
|
|
3031
|
-
let e2 = new
|
|
3063
|
+
let e2 = new to(this.originalCSS, this.opts);
|
|
3032
3064
|
e2.map && this.previousMaps.push(e2.map);
|
|
3033
3065
|
}
|
|
3034
3066
|
return this.previousMaps;
|
|
@@ -3059,8 +3091,8 @@
|
|
|
3059
3091
|
toFileUrl(e2) {
|
|
3060
3092
|
let a2 = this.memoizedFileURLs.get(e2);
|
|
3061
3093
|
if (a2) return a2;
|
|
3062
|
-
if (
|
|
3063
|
-
let a3 =
|
|
3094
|
+
if (eo) {
|
|
3095
|
+
let a3 = eo(e2).toString();
|
|
3064
3096
|
return this.memoizedFileURLs.set(e2, a3), a3;
|
|
3065
3097
|
}
|
|
3066
3098
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -3068,13 +3100,13 @@
|
|
|
3068
3100
|
toUrl(e2) {
|
|
3069
3101
|
let a2 = this.memoizedURLs.get(e2);
|
|
3070
3102
|
if (a2) return a2;
|
|
3071
|
-
"\\" ===
|
|
3103
|
+
"\\" === Yr && (e2 = e2.replace(/\\/g, "/"));
|
|
3072
3104
|
let u2 = encodeURI(e2).replace(/[#?]/g, encodeURIComponent);
|
|
3073
3105
|
return this.memoizedURLs.set(e2, u2), u2;
|
|
3074
3106
|
}
|
|
3075
3107
|
};
|
|
3076
|
-
const
|
|
3077
|
-
let
|
|
3108
|
+
const lo = /[\t\n\f\r "#'()/;[\\\]{}]/g, co = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, uo = /.[\r\n"'(/\\]/, ho = /[\da-f]/i;
|
|
3109
|
+
let Mo = An, _o = pn, Ao = fn, No = Cr, Po = Fr, Xa = function(e2, a2 = {}) {
|
|
3078
3110
|
let u2, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e2.css.valueOf(), F2 = a2.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
3079
3111
|
function y2(a3) {
|
|
3080
3112
|
throw e2.error("Unclosed " + a3, B2);
|
|
@@ -3124,7 +3156,7 @@
|
|
|
3124
3156
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
3125
3157
|
} while (I2);
|
|
3126
3158
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3127
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
3159
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || uo.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
3128
3160
|
break;
|
|
3129
3161
|
case 39:
|
|
3130
3162
|
case 34:
|
|
@@ -3142,31 +3174,31 @@
|
|
|
3142
3174
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3143
3175
|
break;
|
|
3144
3176
|
case 64:
|
|
3145
|
-
|
|
3177
|
+
lo.lastIndex = B2 + 1, lo.test(D2), b2 = 0 === lo.lastIndex ? D2.length - 1 : lo.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3146
3178
|
break;
|
|
3147
3179
|
case 92:
|
|
3148
3180
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
3149
|
-
if (u2 = D2.charCodeAt(b2 + 1), w2 && 47 !== u2 && 32 !== u2 && 10 !== u2 && 9 !== u2 && 13 !== u2 && 12 !== u2 && (b2 += 1,
|
|
3150
|
-
for (;
|
|
3181
|
+
if (u2 = D2.charCodeAt(b2 + 1), w2 && 47 !== u2 && 32 !== u2 && 10 !== u2 && 9 !== u2 && 13 !== u2 && 12 !== u2 && (b2 += 1, ho.test(D2.charAt(b2)))) {
|
|
3182
|
+
for (; ho.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
3151
3183
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
3152
3184
|
}
|
|
3153
3185
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3154
3186
|
break;
|
|
3155
3187
|
default:
|
|
3156
|
-
47 === u2 && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a3 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
3188
|
+
47 === u2 && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a3 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (co.lastIndex = B2 + 1, co.test(D2), b2 = 0 === co.lastIndex ? D2.length - 1 : co.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
3157
3189
|
}
|
|
3158
3190
|
return B2++, x2;
|
|
3159
3191
|
}, position: function S() {
|
|
3160
3192
|
return B2;
|
|
3161
3193
|
} };
|
|
3162
3194
|
};
|
|
3163
|
-
const
|
|
3164
|
-
var
|
|
3195
|
+
const Do = { empty: true, space: true };
|
|
3196
|
+
var Fo = class {
|
|
3165
3197
|
constructor(e2) {
|
|
3166
|
-
this.input = e2, this.root = new
|
|
3198
|
+
this.input = e2, this.root = new No(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e2, start: { column: 1, line: 1, offset: 0 } };
|
|
3167
3199
|
}
|
|
3168
3200
|
atrule(e2) {
|
|
3169
|
-
let a2 = new
|
|
3201
|
+
let a2 = new Mo();
|
|
3170
3202
|
a2.name = e2[1].slice(1), "" === a2.name && this.unnamedAtrule(a2, e2), this.init(a2, e2[2]);
|
|
3171
3203
|
let u2, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
3172
3204
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -3218,7 +3250,7 @@
|
|
|
3218
3250
|
return false;
|
|
3219
3251
|
}
|
|
3220
3252
|
comment(e2) {
|
|
3221
|
-
let a2 = new
|
|
3253
|
+
let a2 = new _o();
|
|
3222
3254
|
this.init(a2, e2[2]), a2.source.end = this.getPosition(e2[3] || e2[2]), a2.source.end.offset++;
|
|
3223
3255
|
let u2 = e2[1].slice(2, -2);
|
|
3224
3256
|
if (/^\s*$/.test(u2)) a2.text = "", a2.raws.left = u2, a2.raws.right = "";
|
|
@@ -3231,7 +3263,7 @@
|
|
|
3231
3263
|
this.tokenizer = Xa(this.input);
|
|
3232
3264
|
}
|
|
3233
3265
|
decl(e2, a2) {
|
|
3234
|
-
let u2 = new
|
|
3266
|
+
let u2 = new Ao();
|
|
3235
3267
|
this.init(u2, e2[0][2]);
|
|
3236
3268
|
let m2, w2 = e2[e2.length - 1];
|
|
3237
3269
|
for (";" === w2[0] && (this.semicolon = true, e2.pop()), u2.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e3) {
|
|
@@ -3280,7 +3312,7 @@
|
|
|
3280
3312
|
throw this.input.error("Double colon", { offset: e2[2] }, { offset: e2[2] + e2[1].length });
|
|
3281
3313
|
}
|
|
3282
3314
|
emptyRule(e2) {
|
|
3283
|
-
let a2 = new
|
|
3315
|
+
let a2 = new Po();
|
|
3284
3316
|
this.init(a2, e2[2]), a2.selector = "", a2.raws.between = "", this.current = a2;
|
|
3285
3317
|
}
|
|
3286
3318
|
end(e2) {
|
|
@@ -3356,7 +3388,7 @@
|
|
|
3356
3388
|
}
|
|
3357
3389
|
raw(e2, a2, u2, m2) {
|
|
3358
3390
|
let w2, b2, C2, x2, I2 = u2.length, _2 = "", O2 = true;
|
|
3359
|
-
for (let e3 = 0; e3 < I2; e3 += 1) w2 = u2[e3], b2 = w2[0], "space" !== b2 || e3 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u2[e3 - 1] ? u2[e3 - 1][0] : "empty", C2 = u2[e3 + 1] ? u2[e3 + 1][0] : "empty",
|
|
3391
|
+
for (let e3 = 0; e3 < I2; e3 += 1) w2 = u2[e3], b2 = w2[0], "space" !== b2 || e3 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u2[e3 - 1] ? u2[e3 - 1][0] : "empty", C2 = u2[e3 + 1] ? u2[e3 + 1][0] : "empty", Do[x2] || Do[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
3360
3392
|
if (!O2) {
|
|
3361
3393
|
let m3 = u2.reduce((e3, a3) => e3 + a3[1], "");
|
|
3362
3394
|
e2.raws[a2] = { raw: m3, value: _2 };
|
|
@@ -3365,7 +3397,7 @@
|
|
|
3365
3397
|
}
|
|
3366
3398
|
rule(e2) {
|
|
3367
3399
|
e2.pop();
|
|
3368
|
-
let a2 = new
|
|
3400
|
+
let a2 = new Po();
|
|
3369
3401
|
this.init(a2, e2[0][2]), a2.raws.between = this.spacesAndCommentsFromEnd(e2), this.raw(a2, "selector", e2), this.current = a2;
|
|
3370
3402
|
}
|
|
3371
3403
|
spacesAndCommentsFromEnd(e2) {
|
|
@@ -3405,9 +3437,9 @@
|
|
|
3405
3437
|
throw this.input.error("At-rule without name", { offset: a2[2] }, { offset: a2[2] + a2[1].length });
|
|
3406
3438
|
}
|
|
3407
3439
|
};
|
|
3408
|
-
let
|
|
3440
|
+
let Uo = En, $o = mr, jo = Fo;
|
|
3409
3441
|
function _t(e2, a2) {
|
|
3410
|
-
let u2 = new
|
|
3442
|
+
let u2 = new $o(e2, a2), m2 = new jo(u2);
|
|
3411
3443
|
try {
|
|
3412
3444
|
m2.parse();
|
|
3413
3445
|
} catch (e3) {
|
|
@@ -3415,9 +3447,9 @@
|
|
|
3415
3447
|
}
|
|
3416
3448
|
return m2.root;
|
|
3417
3449
|
}
|
|
3418
|
-
var
|
|
3419
|
-
_t.default = _t,
|
|
3420
|
-
let
|
|
3450
|
+
var Go = _t;
|
|
3451
|
+
_t.default = _t, Uo.registerParse(_t);
|
|
3452
|
+
let Vo = class {
|
|
3421
3453
|
constructor(e2, a2 = {}) {
|
|
3422
3454
|
if (this.type = "warning", this.text = e2, a2.node && a2.node.source) {
|
|
3423
3455
|
let e3 = a2.node.rangeBy(a2);
|
|
@@ -3429,9 +3461,9 @@
|
|
|
3429
3461
|
return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
|
|
3430
3462
|
}
|
|
3431
3463
|
};
|
|
3432
|
-
var
|
|
3433
|
-
|
|
3434
|
-
let
|
|
3464
|
+
var qo = Vo;
|
|
3465
|
+
Vo.default = Vo;
|
|
3466
|
+
let Ho = qo, Zo = class {
|
|
3435
3467
|
get content() {
|
|
3436
3468
|
return this.css;
|
|
3437
3469
|
}
|
|
@@ -3443,26 +3475,26 @@
|
|
|
3443
3475
|
}
|
|
3444
3476
|
warn(e2, a2 = {}) {
|
|
3445
3477
|
a2.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a2.plugin = this.lastPlugin.postcssPlugin);
|
|
3446
|
-
let u2 = new
|
|
3478
|
+
let u2 = new Ho(e2, a2);
|
|
3447
3479
|
return this.messages.push(u2), u2;
|
|
3448
3480
|
}
|
|
3449
3481
|
warnings() {
|
|
3450
3482
|
return this.messages.filter((e2) => "warning" === e2.type);
|
|
3451
3483
|
}
|
|
3452
3484
|
};
|
|
3453
|
-
var
|
|
3454
|
-
|
|
3455
|
-
let
|
|
3485
|
+
var Ko = Zo;
|
|
3486
|
+
Zo.default = Zo;
|
|
3487
|
+
let Jo = {};
|
|
3456
3488
|
var so = function(e2) {
|
|
3457
|
-
|
|
3489
|
+
Jo[e2] || (Jo[e2] = true, typeof console < "u" && console.warn && console.warn(e2));
|
|
3458
3490
|
};
|
|
3459
|
-
let
|
|
3460
|
-
const
|
|
3491
|
+
let Yo = En, Xo = Fn, Qo = ao, es = Go, ts = Ko, ns = Cr, rs = Qt, { isClean: os, my: ss } = en, is = so;
|
|
3492
|
+
const as = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, ls = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, cs = { Once: true, postcssPlugin: true, prepare: true };
|
|
3461
3493
|
function Ne(e2) {
|
|
3462
3494
|
return "object" == typeof e2 && "function" == typeof e2.then;
|
|
3463
3495
|
}
|
|
3464
3496
|
function no(e2) {
|
|
3465
|
-
let a2 = false, u2 =
|
|
3497
|
+
let a2 = false, u2 = as[e2.type];
|
|
3466
3498
|
return "decl" === e2.type ? a2 = e2.prop.toLowerCase() : "atrule" === e2.type && (a2 = e2.name.toLowerCase()), a2 && e2.append ? [u2, u2 + "-" + a2, 0, u2 + "Exit", u2 + "Exit-" + a2] : a2 ? [u2, u2 + "-" + a2, u2 + "Exit", u2 + "Exit-" + a2] : e2.append ? [u2, 0, u2 + "Exit"] : [u2, u2 + "Exit"];
|
|
3467
3499
|
}
|
|
3468
3500
|
function Gn(e2) {
|
|
@@ -3470,9 +3502,9 @@
|
|
|
3470
3502
|
return a2 = "document" === e2.type ? ["Document", 0, "DocumentExit"] : "root" === e2.type ? ["Root", 0, "RootExit"] : no(e2), { eventIndex: 0, events: a2, iterator: 0, node: e2, visitorIndex: 0, visitors: [] };
|
|
3471
3503
|
}
|
|
3472
3504
|
function Ps(e2) {
|
|
3473
|
-
return e2[
|
|
3505
|
+
return e2[os] = false, e2.nodes && e2.nodes.forEach((e3) => Ps(e3)), e2;
|
|
3474
3506
|
}
|
|
3475
|
-
let
|
|
3507
|
+
let us = {}, ps = class ro {
|
|
3476
3508
|
get content() {
|
|
3477
3509
|
return this.stringify().content;
|
|
3478
3510
|
}
|
|
@@ -3499,19 +3531,19 @@
|
|
|
3499
3531
|
}
|
|
3500
3532
|
constructor(e2, a2, u2) {
|
|
3501
3533
|
let m2;
|
|
3502
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a2 || null === a2 || "root" !== a2.type && "document" !== a2.type) if (a2 instanceof ro || a2 instanceof
|
|
3534
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a2 || null === a2 || "root" !== a2.type && "document" !== a2.type) if (a2 instanceof ro || a2 instanceof ts) m2 = Ps(a2.root), a2.map && (typeof u2.map > "u" && (u2.map = {}), u2.map.inline || (u2.map.inline = false), u2.map.prev = a2.map);
|
|
3503
3535
|
else {
|
|
3504
|
-
let e3 =
|
|
3536
|
+
let e3 = es;
|
|
3505
3537
|
u2.syntax && (e3 = u2.syntax.parse), u2.parser && (e3 = u2.parser), e3.parse && (e3 = e3.parse);
|
|
3506
3538
|
try {
|
|
3507
3539
|
m2 = e3(a2, u2);
|
|
3508
3540
|
} catch (e4) {
|
|
3509
3541
|
this.processed = true, this.error = e4;
|
|
3510
3542
|
}
|
|
3511
|
-
m2 && !m2[
|
|
3543
|
+
m2 && !m2[ss] && Yo.rebuild(m2);
|
|
3512
3544
|
}
|
|
3513
3545
|
else m2 = Ps(a2);
|
|
3514
|
-
this.result = new
|
|
3546
|
+
this.result = new ts(e2, m2, u2), this.helpers = { ...us, postcss: us, result: this.result }, this.plugins = this.processor.plugins.map((e3) => "object" == typeof e3 && e3.prepare ? { ...e3, ...e3.prepare(this.result) } : e3);
|
|
3515
3547
|
}
|
|
3516
3548
|
async() {
|
|
3517
3549
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -3545,8 +3577,8 @@
|
|
|
3545
3577
|
this.listeners[a2] || (this.listeners[a2] = []), this.listeners[a2].push([e2, u2]);
|
|
3546
3578
|
};
|
|
3547
3579
|
for (let e2 of this.plugins) if ("object" == typeof e2) for (let a2 in e2) {
|
|
3548
|
-
if (!
|
|
3549
|
-
if (!
|
|
3580
|
+
if (!ls[a2] && /^[A-Z]/.test(a2)) throw new Error(`Unknown event ${a2} in ${e2.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
3581
|
+
if (!cs[a2]) if ("object" == typeof e2[a2]) for (let u2 in e2[a2]) t(e2, "*" === u2 ? a2 : a2 + "-" + u2.toLowerCase(), e2[a2][u2]);
|
|
3550
3582
|
else "function" == typeof e2[a2] && t(e2, a2, e2[a2]);
|
|
3551
3583
|
}
|
|
3552
3584
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -3563,8 +3595,8 @@
|
|
|
3563
3595
|
}
|
|
3564
3596
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3565
3597
|
let e2 = this.result.root;
|
|
3566
|
-
for (; !e2[
|
|
3567
|
-
e2[
|
|
3598
|
+
for (; !e2[os]; ) {
|
|
3599
|
+
e2[os] = true;
|
|
3568
3600
|
let a2 = [Gn(e2)];
|
|
3569
3601
|
for (; a2.length > 0; ) {
|
|
3570
3602
|
let e3 = this.visitTick(a2);
|
|
@@ -3609,9 +3641,9 @@
|
|
|
3609
3641
|
if (this.error) throw this.error;
|
|
3610
3642
|
if (this.stringified) return this.result;
|
|
3611
3643
|
this.stringified = true, this.sync();
|
|
3612
|
-
let e2 = this.result.opts, a2 =
|
|
3644
|
+
let e2 = this.result.opts, a2 = rs;
|
|
3613
3645
|
e2.syntax && (a2 = e2.syntax.stringify), e2.stringifier && (a2 = e2.stringifier), a2.stringify && (a2 = a2.stringify);
|
|
3614
|
-
let u2 = new
|
|
3646
|
+
let u2 = new Qo(a2, this.result.root, this.result.opts).generate();
|
|
3615
3647
|
return this.result.css = u2[0], this.result.map = u2[1], this.result;
|
|
3616
3648
|
}
|
|
3617
3649
|
sync() {
|
|
@@ -3623,14 +3655,14 @@
|
|
|
3623
3655
|
}
|
|
3624
3656
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3625
3657
|
let e2 = this.result.root;
|
|
3626
|
-
for (; !e2[
|
|
3658
|
+
for (; !e2[os]; ) e2[os] = true, this.walkSync(e2);
|
|
3627
3659
|
if (this.listeners.OnceExit) if ("document" === e2.type) for (let a2 of e2.nodes) this.visitSync(this.listeners.OnceExit, a2);
|
|
3628
3660
|
else this.visitSync(this.listeners.OnceExit, e2);
|
|
3629
3661
|
}
|
|
3630
3662
|
return this.result;
|
|
3631
3663
|
}
|
|
3632
3664
|
then(e2, a2) {
|
|
3633
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
3665
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || is("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e2, a2);
|
|
3634
3666
|
}
|
|
3635
3667
|
toString() {
|
|
3636
3668
|
return this.css;
|
|
@@ -3662,22 +3694,22 @@
|
|
|
3662
3694
|
}
|
|
3663
3695
|
if (0 !== a2.iterator) {
|
|
3664
3696
|
let m3, w3 = a2.iterator;
|
|
3665
|
-
for (; m3 = u2.nodes[u2.indexes[w3]]; ) if (u2.indexes[w3] += 1, !m3[
|
|
3697
|
+
for (; m3 = u2.nodes[u2.indexes[w3]]; ) if (u2.indexes[w3] += 1, !m3[os]) return m3[os] = true, void e2.push(Gn(m3));
|
|
3666
3698
|
a2.iterator = 0, delete u2.indexes[w3];
|
|
3667
3699
|
}
|
|
3668
3700
|
let w2 = a2.events;
|
|
3669
3701
|
for (; a2.eventIndex < w2.length; ) {
|
|
3670
3702
|
let e3 = w2[a2.eventIndex];
|
|
3671
|
-
if (a2.eventIndex += 1, 0 === e3) return void (u2.nodes && u2.nodes.length && (u2[
|
|
3703
|
+
if (a2.eventIndex += 1, 0 === e3) return void (u2.nodes && u2.nodes.length && (u2[os] = true, a2.iterator = u2.getIterator()));
|
|
3672
3704
|
if (this.listeners[e3]) return void (a2.visitors = this.listeners[e3]);
|
|
3673
3705
|
}
|
|
3674
3706
|
e2.pop();
|
|
3675
3707
|
}
|
|
3676
3708
|
walkSync(e2) {
|
|
3677
|
-
e2[
|
|
3709
|
+
e2[os] = true;
|
|
3678
3710
|
let a2 = no(e2);
|
|
3679
3711
|
for (let u2 of a2) if (0 === u2) e2.nodes && e2.each((e3) => {
|
|
3680
|
-
e3[
|
|
3712
|
+
e3[os] || this.walkSync(e3);
|
|
3681
3713
|
});
|
|
3682
3714
|
else {
|
|
3683
3715
|
let a3 = this.listeners[u2];
|
|
@@ -3688,14 +3720,14 @@
|
|
|
3688
3720
|
return this.sync().warnings();
|
|
3689
3721
|
}
|
|
3690
3722
|
};
|
|
3691
|
-
|
|
3692
|
-
|
|
3723
|
+
ps.registerPostcss = (e2) => {
|
|
3724
|
+
us = e2;
|
|
3693
3725
|
};
|
|
3694
|
-
var
|
|
3695
|
-
|
|
3696
|
-
let
|
|
3697
|
-
const
|
|
3698
|
-
let
|
|
3726
|
+
var ds = ps;
|
|
3727
|
+
ps.default = ps, ns.registerLazyResult(ps), Xo.registerLazyResult(ps);
|
|
3728
|
+
let hs = ao, ms = Go;
|
|
3729
|
+
const gs = Ko;
|
|
3730
|
+
let ys = Qt, ws = so, Ss = class {
|
|
3699
3731
|
get content() {
|
|
3700
3732
|
return this.result.css;
|
|
3701
3733
|
}
|
|
@@ -3716,7 +3748,7 @@
|
|
|
3716
3748
|
}
|
|
3717
3749
|
get root() {
|
|
3718
3750
|
if (this._root) return this._root;
|
|
3719
|
-
let e2, a2 =
|
|
3751
|
+
let e2, a2 = ms;
|
|
3720
3752
|
try {
|
|
3721
3753
|
e2 = a2(this._css, this._opts);
|
|
3722
3754
|
} catch (e3) {
|
|
@@ -3730,11 +3762,11 @@
|
|
|
3730
3762
|
}
|
|
3731
3763
|
constructor(e2, a2, u2) {
|
|
3732
3764
|
a2 = a2.toString(), this.stringified = false, this._processor = e2, this._css = a2, this._opts = u2, this._map = void 0;
|
|
3733
|
-
let m2, w2 =
|
|
3734
|
-
this.result = new
|
|
3765
|
+
let m2, w2 = ys;
|
|
3766
|
+
this.result = new gs(this._processor, m2, this._opts), this.result.css = a2;
|
|
3735
3767
|
let b2 = this;
|
|
3736
3768
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
3737
|
-
let C2 = new
|
|
3769
|
+
let C2 = new hs(w2, m2, this._opts, a2);
|
|
3738
3770
|
if (C2.isMap()) {
|
|
3739
3771
|
let [e3, a3] = C2.generate();
|
|
3740
3772
|
e3 && (this.result.css = e3), a3 && (this.result.map = a3);
|
|
@@ -3754,7 +3786,7 @@
|
|
|
3754
3786
|
return this.result;
|
|
3755
3787
|
}
|
|
3756
3788
|
then(e2, a2) {
|
|
3757
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
3789
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || ws("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e2, a2);
|
|
3758
3790
|
}
|
|
3759
3791
|
toString() {
|
|
3760
3792
|
return this._css;
|
|
@@ -3763,9 +3795,9 @@
|
|
|
3763
3795
|
return [];
|
|
3764
3796
|
}
|
|
3765
3797
|
};
|
|
3766
|
-
var
|
|
3767
|
-
|
|
3768
|
-
let
|
|
3798
|
+
var bs = Ss;
|
|
3799
|
+
Ss.default = Ss;
|
|
3800
|
+
let vs = Fn, xs = ds, Ms = bs, Is = Cr, _s = class {
|
|
3769
3801
|
constructor(e2 = []) {
|
|
3770
3802
|
this.version = "8.5.3", this.plugins = this.normalize(e2);
|
|
3771
3803
|
}
|
|
@@ -3781,43 +3813,43 @@
|
|
|
3781
3813
|
return a2;
|
|
3782
3814
|
}
|
|
3783
3815
|
process(e2, a2 = {}) {
|
|
3784
|
-
return this.plugins.length || a2.parser || a2.stringifier || a2.syntax ? new
|
|
3816
|
+
return this.plugins.length || a2.parser || a2.stringifier || a2.syntax ? new xs(this, e2, a2) : new Ms(this, e2, a2);
|
|
3785
3817
|
}
|
|
3786
3818
|
use(e2) {
|
|
3787
3819
|
return this.plugins = this.plugins.concat(this.normalize([e2])), this;
|
|
3788
3820
|
}
|
|
3789
3821
|
};
|
|
3790
|
-
var
|
|
3791
|
-
|
|
3792
|
-
let
|
|
3822
|
+
var Os = _s;
|
|
3823
|
+
_s.default = _s, Is.registerProcessor(_s), vs.registerProcessor(_s);
|
|
3824
|
+
let Es = An, Ls = pn, Rs = En, As = Vt, Ts = fn, Ns = Fn, $s = Hr, Ws = mr, js = ds, Gs = Tr, Vs = ln, qs = Go, Hs = Os, Zs = Ko, Ks = Cr, Ys = Fr, Xs = Qt, Qs = qo;
|
|
3793
3825
|
function L$1(...e2) {
|
|
3794
|
-
return 1 === e2.length && Array.isArray(e2[0]) && (e2 = e2[0]), new
|
|
3826
|
+
return 1 === e2.length && Array.isArray(e2[0]) && (e2 = e2[0]), new Hs(e2);
|
|
3795
3827
|
}
|
|
3796
3828
|
L$1.plugin = function(e2, a2) {
|
|
3797
3829
|
let u2, m2 = false;
|
|
3798
3830
|
function n(...u3) {
|
|
3799
3831
|
console && console.warn && !m2 && (m2 = true, console.warn(e2 + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e2 + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
3800
3832
|
let w2 = a2(...u3);
|
|
3801
|
-
return w2.postcssPlugin = e2, w2.postcssVersion = new
|
|
3833
|
+
return w2.postcssPlugin = e2, w2.postcssVersion = new Hs().version, w2;
|
|
3802
3834
|
}
|
|
3803
3835
|
return Object.defineProperty(n, "postcss", { get: () => (u2 || (u2 = n()), u2) }), n.process = function(e3, a3, u3) {
|
|
3804
3836
|
return L$1([n(u3)]).process(e3, a3);
|
|
3805
3837
|
}, n;
|
|
3806
|
-
}, L$1.stringify =
|
|
3807
|
-
var
|
|
3838
|
+
}, L$1.stringify = Xs, L$1.parse = qs, L$1.fromJSON = $s, L$1.list = Gs, L$1.comment = (e2) => new Ls(e2), L$1.atRule = (e2) => new Es(e2), L$1.decl = (e2) => new Ts(e2), L$1.rule = (e2) => new Ys(e2), L$1.root = (e2) => new Ks(e2), L$1.document = (e2) => new Ns(e2), L$1.CssSyntaxError = As, L$1.Declaration = Ts, L$1.Container = Rs, L$1.Processor = Hs, L$1.Document = Ns, L$1.Comment = Ls, L$1.Warning = Qs, L$1.AtRule = Es, L$1.Result = Zs, L$1.Input = Ws, L$1.Rule = Ys, L$1.Root = Ks, L$1.Node = Vs, js.registerPostcss(L$1);
|
|
3839
|
+
var ei = L$1;
|
|
3808
3840
|
L$1.default = L$1;
|
|
3809
|
-
const
|
|
3810
|
-
|
|
3811
|
-
var
|
|
3841
|
+
const ti = Yi(ei);
|
|
3842
|
+
ti.stringify, ti.fromJSON, ti.plugin, ti.parse, ti.list, ti.document, ti.comment, ti.atRule, ti.rule, ti.decl, ti.root, ti.CssSyntaxError, ti.Declaration, ti.Container, ti.Processor, ti.Document, ti.Comment, ti.Warning, ti.AtRule, ti.Result, ti.Input, ti.Rule, ti.Root, ti.Node;
|
|
3843
|
+
var si = ((e2) => (e2[e2.DomContentLoaded = 0] = "DomContentLoaded", e2[e2.Load = 1] = "Load", e2[e2.FullSnapshot = 2] = "FullSnapshot", e2[e2.IncrementalSnapshot = 3] = "IncrementalSnapshot", e2[e2.Meta = 4] = "Meta", e2[e2.Custom = 5] = "Custom", e2[e2.Plugin = 6] = "Plugin", e2[e2.Device = 24] = "Device", e2[e2.SailfishCustom = 25] = "SailfishCustom", e2))(si || {}), ii = ((e2) => (e2[e2.Mutation = 0] = "Mutation", e2[e2.MouseMove = 1] = "MouseMove", e2[e2.MouseInteraction = 2] = "MouseInteraction", e2[e2.Scroll = 3] = "Scroll", e2[e2.ViewportResize = 4] = "ViewportResize", e2[e2.Input = 5] = "Input", e2[e2.TouchMove = 6] = "TouchMove", e2[e2.MediaInteraction = 7] = "MediaInteraction", e2[e2.StyleSheetRule = 8] = "StyleSheetRule", e2[e2.CanvasMutation = 9] = "CanvasMutation", e2[e2.Font = 10] = "Font", e2[e2.Log = 11] = "Log", e2[e2.Drag = 12] = "Drag", e2[e2.StyleDeclaration = 13] = "StyleDeclaration", e2[e2.Selection = 14] = "Selection", e2[e2.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e2[e2.CustomElement = 16] = "CustomElement", e2[e2.Typing = 17] = "Typing", e2))(ii || {}), ai = ((e2) => (e2[e2.MouseUp = 0] = "MouseUp", e2[e2.MouseDown = 1] = "MouseDown", e2[e2.Click = 2] = "Click", e2[e2.ContextMenu = 3] = "ContextMenu", e2[e2.DblClick = 4] = "DblClick", e2[e2.Focus = 5] = "Focus", e2[e2.Blur = 6] = "Blur", e2[e2.TouchStart = 7] = "TouchStart", e2[e2.TouchMove_Departed = 8] = "TouchMove_Departed", e2[e2.TouchEnd = 9] = "TouchEnd", e2[e2.TouchCancel = 10] = "TouchCancel", e2))(ai || {}), li = ((e2) => (e2[e2.Mouse = 0] = "Mouse", e2[e2.Pen = 1] = "Pen", e2[e2.Touch = 2] = "Touch", e2))(li || {}), ci = ((e2) => (e2[e2["2D"] = 0] = "2D", e2[e2.WebGL = 1] = "WebGL", e2[e2.WebGL2 = 2] = "WebGL2", e2))(ci || {}), ui = ((e2) => (e2[e2.Play = 0] = "Play", e2[e2.Pause = 1] = "Pause", e2[e2.Seeked = 2] = "Seeked", e2[e2.VolumeChange = 3] = "VolumeChange", e2[e2.RateChange = 4] = "RateChange", e2))(ui || {});
|
|
3812
3844
|
function G(e2, a2, u2 = document) {
|
|
3813
3845
|
const m2 = { capture: true, passive: true };
|
|
3814
3846
|
return u2.addEventListener(e2, a2, m2), () => u2.removeEventListener(e2, a2, m2);
|
|
3815
3847
|
}
|
|
3816
|
-
const
|
|
3817
|
-
let
|
|
3818
|
-
console.error(
|
|
3819
|
-
}, has: () => (console.error(
|
|
3820
|
-
console.error(
|
|
3848
|
+
const pi = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
|
|
3849
|
+
let di = { map: {}, getId: () => (console.error(pi), -1), getNode: () => (console.error(pi), null), removeNodeFromMap() {
|
|
3850
|
+
console.error(pi);
|
|
3851
|
+
}, has: () => (console.error(pi), false), reset() {
|
|
3852
|
+
console.error(pi);
|
|
3821
3853
|
} };
|
|
3822
3854
|
function $e(e2, a2, u2 = {}) {
|
|
3823
3855
|
let m2 = null, w2 = 0;
|
|
@@ -3851,8 +3883,8 @@
|
|
|
3851
3883
|
};
|
|
3852
3884
|
}
|
|
3853
3885
|
}
|
|
3854
|
-
typeof window < "u" && window.Proxy && window.Reflect && (
|
|
3855
|
-
let
|
|
3886
|
+
typeof window < "u" && window.Proxy && window.Reflect && (di = new Proxy(di, { get: (e2, a2, u2) => ("map" === a2 && console.error(pi), Reflect.get(e2, a2, u2)) }));
|
|
3887
|
+
let hi, fi = Date.now;
|
|
3856
3888
|
function po(e2) {
|
|
3857
3889
|
var a2, u2, m2, w2, b2, C2;
|
|
3858
3890
|
const x2 = e2.document;
|
|
@@ -3899,7 +3931,7 @@
|
|
|
3899
3931
|
function Fs(e2) {
|
|
3900
3932
|
return !(null == e2 || !e2.shadowRoot);
|
|
3901
3933
|
}
|
|
3902
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
3934
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (fi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
3903
3935
|
class _l {
|
|
3904
3936
|
constructor() {
|
|
3905
3937
|
b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
@@ -3944,11 +3976,11 @@
|
|
|
3944
3976
|
const a2 = e2.ownerDocument;
|
|
3945
3977
|
return !!a2 && (a2.contains(e2) || zl(e2));
|
|
3946
3978
|
}
|
|
3947
|
-
const M = (e2) =>
|
|
3979
|
+
const M = (e2) => hi ? (...a2) => {
|
|
3948
3980
|
try {
|
|
3949
3981
|
return e2(...a2);
|
|
3950
3982
|
} catch (e3) {
|
|
3951
|
-
if (
|
|
3983
|
+
if (hi && true === hi(e3)) return;
|
|
3952
3984
|
throw e3;
|
|
3953
3985
|
}
|
|
3954
3986
|
} : e2;
|
|
@@ -4007,22 +4039,22 @@
|
|
|
4007
4039
|
transformCrossOriginEvent(e2, a2) {
|
|
4008
4040
|
var u2;
|
|
4009
4041
|
switch (a2.type) {
|
|
4010
|
-
case
|
|
4042
|
+
case si.FullSnapshot: {
|
|
4011
4043
|
this.crossOriginIframeMirror.reset(e2), this.crossOriginIframeStyleMirror.reset(e2), this.replaceIdOnNode(a2.data.node, e2);
|
|
4012
4044
|
const u3 = a2.data.node.id;
|
|
4013
|
-
return this.crossOriginIframeRootIdMap.set(e2, u3), this.patchRootIdOnNode(a2.data.node, u3), { timestamp: a2.timestamp, type:
|
|
4045
|
+
return this.crossOriginIframeRootIdMap.set(e2, u3), this.patchRootIdOnNode(a2.data.node, u3), { timestamp: a2.timestamp, type: si.IncrementalSnapshot, data: { source: ii.Mutation, adds: [{ parentId: this.mirror.getId(e2), nextId: null, node: a2.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
|
|
4014
4046
|
}
|
|
4015
|
-
case
|
|
4016
|
-
case
|
|
4017
|
-
case
|
|
4047
|
+
case si.Meta:
|
|
4048
|
+
case si.Load:
|
|
4049
|
+
case si.DomContentLoaded:
|
|
4018
4050
|
return false;
|
|
4019
|
-
case
|
|
4051
|
+
case si.Plugin:
|
|
4020
4052
|
return a2;
|
|
4021
|
-
case
|
|
4053
|
+
case si.Custom:
|
|
4022
4054
|
return this.replaceIds(a2.data.payload, e2, ["id", "parentId", "previousId", "nextId"]), a2;
|
|
4023
|
-
case
|
|
4055
|
+
case si.IncrementalSnapshot:
|
|
4024
4056
|
switch (a2.data.source) {
|
|
4025
|
-
case
|
|
4057
|
+
case ii.Mutation:
|
|
4026
4058
|
return a2.data.adds.forEach((a3) => {
|
|
4027
4059
|
this.replaceIds(a3, e2, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a3.node, e2);
|
|
4028
4060
|
const u3 = this.crossOriginIframeRootIdMap.get(e2);
|
|
@@ -4034,30 +4066,30 @@
|
|
|
4034
4066
|
}), a2.data.texts.forEach((a3) => {
|
|
4035
4067
|
this.replaceIds(a3, e2, ["id"]);
|
|
4036
4068
|
}), a2;
|
|
4037
|
-
case
|
|
4038
|
-
case
|
|
4039
|
-
case
|
|
4069
|
+
case ii.Drag:
|
|
4070
|
+
case ii.TouchMove:
|
|
4071
|
+
case ii.MouseMove:
|
|
4040
4072
|
return a2.data.positions.forEach((a3) => {
|
|
4041
4073
|
this.replaceIds(a3, e2, ["id"]);
|
|
4042
4074
|
}), a2;
|
|
4043
|
-
case
|
|
4075
|
+
case ii.ViewportResize:
|
|
4044
4076
|
return false;
|
|
4045
|
-
case
|
|
4046
|
-
case
|
|
4047
|
-
case
|
|
4048
|
-
case
|
|
4049
|
-
case
|
|
4077
|
+
case ii.MediaInteraction:
|
|
4078
|
+
case ii.MouseInteraction:
|
|
4079
|
+
case ii.Scroll:
|
|
4080
|
+
case ii.CanvasMutation:
|
|
4081
|
+
case ii.Input:
|
|
4050
4082
|
return this.replaceIds(a2.data, e2, ["id"]), a2;
|
|
4051
|
-
case
|
|
4052
|
-
case
|
|
4083
|
+
case ii.StyleSheetRule:
|
|
4084
|
+
case ii.StyleDeclaration:
|
|
4053
4085
|
return this.replaceIds(a2.data, e2, ["id"]), this.replaceStyleIds(a2.data, e2, ["styleId"]), a2;
|
|
4054
|
-
case
|
|
4086
|
+
case ii.Font:
|
|
4055
4087
|
return a2;
|
|
4056
|
-
case
|
|
4088
|
+
case ii.Selection:
|
|
4057
4089
|
return a2.data.ranges.forEach((a3) => {
|
|
4058
4090
|
this.replaceIds(a3, e2, ["start", "end"]);
|
|
4059
4091
|
}), a2;
|
|
4060
|
-
case
|
|
4092
|
+
case ii.AdoptedStyleSheet:
|
|
4061
4093
|
return this.replaceIds(a2.data, e2, ["id"]), this.replaceStyleIds(a2.data, e2, ["styleIds"]), null == (u2 = a2.data.styles) || u2.forEach((a3) => {
|
|
4062
4094
|
this.replaceStyleIds(a3, e2, ["styleId"]);
|
|
4063
4095
|
}), a2;
|
|
@@ -4081,7 +4113,7 @@
|
|
|
4081
4113
|
});
|
|
4082
4114
|
}
|
|
4083
4115
|
patchRootIdOnNode(e2, a2) {
|
|
4084
|
-
e2.type !==
|
|
4116
|
+
e2.type !== ht.Document && !e2.rootId && (e2.rootId = a2), "childNodes" in e2 && e2.childNodes.forEach((e3) => {
|
|
4085
4117
|
this.patchRootIdOnNode(e3, a2);
|
|
4086
4118
|
});
|
|
4087
4119
|
}
|
|
@@ -4299,7 +4331,7 @@
|
|
|
4299
4331
|
const { parentNode: u2 } = a2;
|
|
4300
4332
|
return !!u2 && (!!e2.has(u2) || ko(e2, u2));
|
|
4301
4333
|
}
|
|
4302
|
-
const
|
|
4334
|
+
const mi = [];
|
|
4303
4335
|
function tt(e2) {
|
|
4304
4336
|
try {
|
|
4305
4337
|
if ("composedPath" in e2) {
|
|
@@ -4313,7 +4345,7 @@
|
|
|
4313
4345
|
function Co(e2, a2) {
|
|
4314
4346
|
var u2, m2;
|
|
4315
4347
|
const w2 = new Zl();
|
|
4316
|
-
|
|
4348
|
+
mi.push(w2), w2.init(e2);
|
|
4317
4349
|
let b2 = window.MutationObserver || window.__rrMutationObserver;
|
|
4318
4350
|
const C2 = null == (m2 = null == (u2 = null == window ? void 0 : window.Zone) ? void 0 : u2.__symbol__) ? void 0 : m2.call(u2, "MutationObserver");
|
|
4319
4351
|
C2 && window[C2] && (b2 = window[C2]);
|
|
@@ -4325,7 +4357,7 @@
|
|
|
4325
4357
|
};
|
|
4326
4358
|
const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
|
|
4327
4359
|
let I2 = null;
|
|
4328
|
-
return Object.keys(
|
|
4360
|
+
return Object.keys(ai).filter((e3) => Number.isNaN(Number(e3)) && !e3.endsWith("_Departed") && false !== C2[e3]).forEach((b3) => {
|
|
4329
4361
|
let C3 = fe(b3);
|
|
4330
4362
|
const _2 = /* @__PURE__ */ ((a3) => (b4) => {
|
|
4331
4363
|
const C4 = tt(b4);
|
|
@@ -4334,29 +4366,29 @@
|
|
|
4334
4366
|
if ("pointerType" in b4) {
|
|
4335
4367
|
switch (b4.pointerType) {
|
|
4336
4368
|
case "mouse":
|
|
4337
|
-
x3 =
|
|
4369
|
+
x3 = li.Mouse;
|
|
4338
4370
|
break;
|
|
4339
4371
|
case "touch":
|
|
4340
|
-
x3 =
|
|
4372
|
+
x3 = li.Touch;
|
|
4341
4373
|
break;
|
|
4342
4374
|
case "pen":
|
|
4343
|
-
x3 =
|
|
4375
|
+
x3 = li.Pen;
|
|
4344
4376
|
}
|
|
4345
|
-
x3 ===
|
|
4346
|
-
} else Ds(b4) && (x3 =
|
|
4347
|
-
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 ===
|
|
4377
|
+
x3 === li.Touch ? ai[a3] === ai.MouseDown ? _3 = "TouchStart" : ai[a3] === ai.MouseUp && (_3 = "TouchEnd") : li.Pen;
|
|
4378
|
+
} else Ds(b4) && (x3 = li.Touch);
|
|
4379
|
+
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === li.Touch || _3.startsWith("Mouse") && x3 === li.Mouse) && (x3 = null)) : ai[a3] === ai.Click && (x3 = I2, I2 = null);
|
|
4348
4380
|
const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
|
|
4349
4381
|
if (!O2) return;
|
|
4350
4382
|
const E2 = u2.getId(C4), { clientX: D2, clientY: F2 } = O2;
|
|
4351
|
-
M(e2)({ type:
|
|
4383
|
+
M(e2)({ type: ai[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
|
|
4352
4384
|
})(b3);
|
|
4353
|
-
if (window.PointerEvent) switch (
|
|
4354
|
-
case
|
|
4355
|
-
case
|
|
4385
|
+
if (window.PointerEvent) switch (ai[b3]) {
|
|
4386
|
+
case ai.MouseDown:
|
|
4387
|
+
case ai.MouseUp:
|
|
4356
4388
|
C3 = C3.replace("mouse", "pointer");
|
|
4357
4389
|
break;
|
|
4358
|
-
case
|
|
4359
|
-
case
|
|
4390
|
+
case ai.TouchStart:
|
|
4391
|
+
case ai.TouchEnd:
|
|
4360
4392
|
return;
|
|
4361
4393
|
}
|
|
4362
4394
|
x2.push(G(C3, _2, a2));
|
|
@@ -4375,7 +4407,7 @@
|
|
|
4375
4407
|
} else e2({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
|
|
4376
4408
|
}), b2.scroll || 100)), a2);
|
|
4377
4409
|
}
|
|
4378
|
-
const
|
|
4410
|
+
const gi = ["INPUT", "TEXTAREA", "SELECT"], yi = /* @__PURE__ */ new WeakMap();
|
|
4379
4411
|
function ql({ deviceChangeCb: e2 }) {
|
|
4380
4412
|
const t = (a3, u3) => {
|
|
4381
4413
|
const m2 = a3.device.productName ? [a3.device.productName] : ["Unknown USB Device"];
|
|
@@ -4495,7 +4527,7 @@
|
|
|
4495
4527
|
e3(x3.map((e4) => (e4.timeOffset -= u4, e4)), a4), x3 = [], C3 = null;
|
|
4496
4528
|
}), b3), _3 = M($e(M((e4) => {
|
|
4497
4529
|
const a4 = tt(e4), { clientX: u4, clientY: w4 } = Ds(e4) ? e4.changedTouches[0] : e4;
|
|
4498
|
-
C3 || (C3 =
|
|
4530
|
+
C3 || (C3 = fi()), x3.push({ x: u4, y: w4, id: m3.getId(a4), timeOffset: fi() - C3 }), I3(typeof DragEvent < "u" && e4 instanceof DragEvent ? ii.Drag : e4 instanceof MouseEvent ? ii.MouseMove : ii.TouchMove);
|
|
4499
4531
|
}), w3, { trailing: false })), O3 = [G("mousemove", _3, u3), G("touchmove", _3, u3), G("drag", _3, u3)];
|
|
4500
4532
|
return M(() => {
|
|
4501
4533
|
O3.forEach((e4) => e4());
|
|
@@ -4511,7 +4543,7 @@
|
|
|
4511
4543
|
function p(e4) {
|
|
4512
4544
|
let u4 = tt(e4);
|
|
4513
4545
|
const _4 = e4.isTrusted, E4 = u4 && u4.tagName;
|
|
4514
|
-
if (u4 && "OPTION" === E4 && (u4 = u4.parentElement), !u4 || !E4 ||
|
|
4546
|
+
if (u4 && "OPTION" === E4 && (u4 = u4.parentElement), !u4 || !E4 || gi.indexOf(E4) < 0 || Z(u4, m3, w3, true) || u4.classList.contains(b3) || C3 && u4.matches(C3)) return;
|
|
4515
4547
|
let D4 = u4.value, F4 = false;
|
|
4516
4548
|
const U4 = Yt(u4) || "", { value: B2, masked: $2 } = Zt({ element: u4, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
|
|
4517
4549
|
D4 = B2, ("radio" === U4 || "checkbox" === U4) && (F4 = u4.checked), f2(u4, O3 ? { text: D4, isChecked: F4, masked: $2, userTriggered: _4 } : { text: D4, isChecked: F4, masked: $2 });
|
|
@@ -4524,9 +4556,9 @@
|
|
|
4524
4556
|
});
|
|
4525
4557
|
}
|
|
4526
4558
|
function f2(a4, m4) {
|
|
4527
|
-
const w4 =
|
|
4559
|
+
const w4 = yi.get(a4);
|
|
4528
4560
|
if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
|
|
4529
|
-
|
|
4561
|
+
yi.set(a4, m4);
|
|
4530
4562
|
const w5 = u3.getId(a4);
|
|
4531
4563
|
M(e3)({ ...m4, id: w5 });
|
|
4532
4564
|
}
|
|
@@ -4551,7 +4583,7 @@
|
|
|
4551
4583
|
const { value: e4, masked: a5 } = Zt({ element: w4, maskInputOptions: u3, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
|
|
4552
4584
|
_3 = e4, b3 = a5;
|
|
4553
4585
|
}
|
|
4554
|
-
e3({ source:
|
|
4586
|
+
e3({ source: ii.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e4) => {
|
|
4555
4587
|
var a5;
|
|
4556
4588
|
const u4 = [];
|
|
4557
4589
|
for (; e4; ) {
|
|
@@ -4579,7 +4611,7 @@
|
|
|
4579
4611
|
if (!C4 || Z(C4, a3, u3, true)) return;
|
|
4580
4612
|
const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
|
|
4581
4613
|
e3({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
|
|
4582
|
-
}), w3.media || 500)), x3 = [G("play", C3(
|
|
4614
|
+
}), w3.media || 500)), x3 = [G("play", C3(ui.Play), b3), G("pause", C3(ui.Pause), b3), G("seeked", C3(ui.Seeked), b3), G("volumechange", C3(ui.VolumeChange), b3), G("ratechange", C3(ui.RateChange), b3)];
|
|
4583
4615
|
return M(() => {
|
|
4584
4616
|
x3.forEach((e4) => e4());
|
|
4585
4617
|
});
|
|
@@ -4700,7 +4732,7 @@
|
|
|
4700
4732
|
})(e2), U2 = [];
|
|
4701
4733
|
for (const a3 of e2.plugins) U2.push(a3.observer(a3.callback, u2, a3.options));
|
|
4702
4734
|
return M(() => {
|
|
4703
|
-
|
|
4735
|
+
mi.forEach((e3) => e3.reset()), null == m2 || m2.disconnect(), w2(), b2(), C2(), x2(), I2(), _2(), E2(), f(), d(), g2(), h(), D2(), F2(), O2(), U2.forEach((e3) => e3());
|
|
4704
4736
|
});
|
|
4705
4737
|
}
|
|
4706
4738
|
function ft(e2) {
|
|
@@ -4709,29 +4741,29 @@
|
|
|
4709
4741
|
function mt(e2) {
|
|
4710
4742
|
return !!(typeof window[e2] < "u" && window[e2].prototype && "insertRule" in window[e2].prototype && "deleteRule" in window[e2].prototype);
|
|
4711
4743
|
}
|
|
4712
|
-
const
|
|
4713
|
-
var
|
|
4744
|
+
const Mi = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", Ii = typeof self < "u" && self.Blob && new Blob([(Li = Mi, Uint8Array.from(atob(Li), (e2) => e2.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
|
|
4745
|
+
var Li;
|
|
4714
4746
|
function uu(e2) {
|
|
4715
4747
|
let a2;
|
|
4716
4748
|
try {
|
|
4717
|
-
if (a2 =
|
|
4749
|
+
if (a2 = Ii && (self.URL || self.webkitURL).createObjectURL(Ii), !a2) throw "";
|
|
4718
4750
|
const u2 = new Worker(a2, { name: null == e2 ? void 0 : e2.name });
|
|
4719
4751
|
return u2.addEventListener("error", () => {
|
|
4720
4752
|
(self.URL || self.webkitURL).revokeObjectURL(a2);
|
|
4721
4753
|
}), u2;
|
|
4722
4754
|
} catch {
|
|
4723
|
-
return new Worker("data:text/javascript;base64," +
|
|
4755
|
+
return new Worker("data:text/javascript;base64," + Mi, { name: null == e2 ? void 0 : e2.name });
|
|
4724
4756
|
} finally {
|
|
4725
4757
|
a2 && (self.URL || self.webkitURL).revokeObjectURL(a2);
|
|
4726
4758
|
}
|
|
4727
4759
|
}
|
|
4728
|
-
for (var
|
|
4729
|
-
const
|
|
4760
|
+
for (var Ri = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ai = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Ti = 0; Ti < 64; Ti++) Ai[Ri.charCodeAt(Ti)] = Ti;
|
|
4761
|
+
const Ni = /* @__PURE__ */ new Map();
|
|
4730
4762
|
const Oo = (e2, a2, u2) => {
|
|
4731
4763
|
if (!e2 || !Ro(e2, a2) && "object" != typeof e2) return;
|
|
4732
4764
|
const m2 = (function pu(e3, a3) {
|
|
4733
|
-
let u3 =
|
|
4734
|
-
return u3 || (u3 = /* @__PURE__ */ new Map(),
|
|
4765
|
+
let u3 = Ni.get(e3);
|
|
4766
|
+
return u3 || (u3 = /* @__PURE__ */ new Map(), Ni.set(e3, u3)), u3.has(a3) || u3.set(a3, []), u3.get(a3);
|
|
4735
4767
|
})(u2, e2.constructor.name);
|
|
4736
4768
|
let w2 = m2.indexOf(e2);
|
|
4737
4769
|
return -1 === w2 && (w2 = m2.length, m2.push(e2)), w2;
|
|
@@ -4743,7 +4775,7 @@
|
|
|
4743
4775
|
if (e2 instanceof ArrayBuffer) {
|
|
4744
4776
|
const a3 = e2.constructor.name, u3 = (function(e3) {
|
|
4745
4777
|
var a4, u4 = new Uint8Array(e3), m2 = u4.length, w2 = "";
|
|
4746
|
-
for (a4 = 0; a4 < m2; a4 += 3) w2 +=
|
|
4778
|
+
for (a4 = 0; a4 < m2; a4 += 3) w2 += Ri[u4[a4] >> 2], w2 += Ri[(3 & u4[a4]) << 4 | u4[a4 + 1] >> 4], w2 += Ri[(15 & u4[a4 + 1]) << 2 | u4[a4 + 2] >> 6], w2 += Ri[63 & u4[a4 + 2]];
|
|
4747
4779
|
return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
|
|
4748
4780
|
})(e2);
|
|
4749
4781
|
return { rr_type: a3, base64: u3 };
|
|
@@ -4840,7 +4872,7 @@
|
|
|
4840
4872
|
const { id: a3 } = e3.data;
|
|
4841
4873
|
if (C2.set(a3, false), !("base64" in e3.data)) return;
|
|
4842
4874
|
const { base64: u3, type: m3, width: w3, height: b3 } = e3.data;
|
|
4843
|
-
this.mutationCb({ id: a3, type:
|
|
4875
|
+
this.mutationCb({ id: a3, type: ci["2D"], commands: [{ property: "clearRect", args: [0, 0, w3, b3] }, { property: "drawImage", args: [{ rr_type: "ImageBitmap", args: [{ rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: u3 }], type: m3 }] }, 0, 0] }] });
|
|
4844
4876
|
};
|
|
4845
4877
|
const I2 = 1e3 / e2;
|
|
4846
4878
|
let _2, O2 = 0;
|
|
@@ -4876,14 +4908,14 @@
|
|
|
4876
4908
|
return function(...b5) {
|
|
4877
4909
|
return Z(this.canvas, u3, m3, true) || setTimeout(() => {
|
|
4878
4910
|
const u4 = Eo(b5, a3, this);
|
|
4879
|
-
e3(this.canvas, { type:
|
|
4911
|
+
e3(this.canvas, { type: ci["2D"], property: C2, args: u4 });
|
|
4880
4912
|
}, 0), w4.apply(this, b5);
|
|
4881
4913
|
};
|
|
4882
4914
|
});
|
|
4883
4915
|
w3.push(b4);
|
|
4884
4916
|
} catch {
|
|
4885
4917
|
const u4 = qt(a3.CanvasRenderingContext2D.prototype, C2, { set(a4) {
|
|
4886
|
-
e3(this.canvas, { type:
|
|
4918
|
+
e3(this.canvas, { type: ci["2D"], property: C2, args: [a4], setter: true });
|
|
4887
4919
|
} });
|
|
4888
4920
|
w3.push(u4);
|
|
4889
4921
|
}
|
|
@@ -4892,7 +4924,7 @@
|
|
|
4892
4924
|
};
|
|
4893
4925
|
})(this.processMutation.bind(this), e2, a2, u2), b2 = (function mu(e3, a3, u3, m3) {
|
|
4894
4926
|
const w3 = [];
|
|
4895
|
-
return w3.push(...tr(a3.WebGLRenderingContext.prototype,
|
|
4927
|
+
return w3.push(...tr(a3.WebGLRenderingContext.prototype, ci.WebGL, e3, u3, m3, a3)), typeof a3.WebGL2RenderingContext < "u" && w3.push(...tr(a3.WebGL2RenderingContext.prototype, ci.WebGL2, e3, u3, m3, a3)), () => {
|
|
4896
4928
|
w3.forEach((e4) => e4());
|
|
4897
4929
|
};
|
|
4898
4930
|
})(this.processMutation.bind(this), e2, a2, u2);
|
|
@@ -5003,23 +5035,23 @@
|
|
|
5003
5035
|
trackStylesheetInLinkElement(e2) {
|
|
5004
5036
|
}
|
|
5005
5037
|
}
|
|
5006
|
-
let
|
|
5007
|
-
var
|
|
5038
|
+
let Pi, qi, Hi, Ji = false;
|
|
5039
|
+
var Xi;
|
|
5008
5040
|
try {
|
|
5009
5041
|
if (2 !== Array.from([1], (e2) => 2 * e2)[0]) {
|
|
5010
5042
|
const e2 = document.createElement("iframe");
|
|
5011
|
-
document.body.appendChild(e2), Array.from = (null == (
|
|
5043
|
+
document.body.appendChild(e2), Array.from = (null == (Xi = e2.contentWindow) ? void 0 : Xi.Array.from) || Array.from, document.body.removeChild(e2);
|
|
5012
5044
|
}
|
|
5013
|
-
} catch (
|
|
5014
|
-
console.debug("Unable to override Array.from",
|
|
5045
|
+
} catch (Li2) {
|
|
5046
|
+
console.debug("Unable to override Array.from", Li2);
|
|
5015
5047
|
}
|
|
5016
|
-
const
|
|
5017
|
-
return new
|
|
5048
|
+
const Qi = (function Ci() {
|
|
5049
|
+
return new gt();
|
|
5018
5050
|
})();
|
|
5019
5051
|
function ae(e2 = {}) {
|
|
5020
5052
|
const { emit: a2, checkoutEveryNms: u2, checkoutEveryNth: m2, blockClass: w2 = "rr-block", blockSelector: b2 = null, ignoreClass: C2 = "rr-ignore", ignoreSelector: x2 = null, maskTextClass: I2 = "rr-mask", maskTextSelector: _2 = null, inlineStylesheet: O2 = true, maskAllInputs: E2, maskInputOptions: D2, slimDOMOptions: F2, maskInputFn: U2, maskTextFn: B2, hooks: $2, packFn: z2, sampling: j2 = {}, dataURLOptions: V2 = {}, mousemoveWait: q2, recordDOM: H2 = true, recordCanvas: J2 = false, recordCrossOriginIframes: Y2 = false, recordAfter: X2 = "DOMContentLoaded" === e2.recordAfter ? e2.recordAfter : "load", userTriggeredOnInput: Q2 = false, collectFonts: ee2 = false, inlineImages: te2 = false, plugins: ne2, keepIframeSrcFn: re2 = () => false, ignoreCSSAttributes: oe2 = /* @__PURE__ */ new Set([]), errorHandler: se2 } = e2;
|
|
5021
5053
|
!(function Bl(e3) {
|
|
5022
|
-
|
|
5054
|
+
hi = e3;
|
|
5023
5055
|
})(se2);
|
|
5024
5056
|
const ie2 = !Y2 || window.parent === window;
|
|
5025
5057
|
let le2 = false;
|
|
@@ -5031,7 +5063,7 @@
|
|
|
5031
5063
|
if (ie2 && !a2) throw new Error("emit function is required");
|
|
5032
5064
|
if (!ie2 && !le2) return () => {
|
|
5033
5065
|
};
|
|
5034
|
-
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2),
|
|
5066
|
+
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), Qi.reset();
|
|
5035
5067
|
const ce2 = true === E2 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : void 0 !== D2 ? D2 : { password: true }, pe2 = true === F2 || "all" === F2 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaVerification: true, headMetaAuthorship: "all" === F2, headMetaDescKeywords: "all" === F2, headTitleMutations: "all" === F2 } : F2 || {};
|
|
5036
5068
|
!(function Ul(e3 = window) {
|
|
5037
5069
|
"NodeList" in e3 && !e3.NodeList.prototype.forEach && (e3.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e3 && !e3.DOMTokenList.prototype.forEach && (e3.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...e4) => {
|
|
@@ -5048,57 +5080,57 @@
|
|
|
5048
5080
|
for (const a3 of ne2 || []) a3.eventProcessor && (e3 = a3.eventProcessor(e3));
|
|
5049
5081
|
return z2 && !le2 && (e3 = z2(e3)), e3;
|
|
5050
5082
|
};
|
|
5051
|
-
|
|
5083
|
+
Pi = (e3, w3) => {
|
|
5052
5084
|
var b3;
|
|
5053
5085
|
const C3 = e3;
|
|
5054
|
-
if (C3.timestamp =
|
|
5086
|
+
if (C3.timestamp = fi(), null != (b3 = mi[0]) && b3.isFrozen() && C3.type !== si.FullSnapshot && !(C3.type === si.IncrementalSnapshot && C3.data.source === ii.Mutation) && mi.forEach((e4) => e4.unfreeze()), ie2) null == a2 || a2(vn(C3), w3);
|
|
5055
5087
|
else if (le2) {
|
|
5056
5088
|
const e4 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
|
|
5057
5089
|
window.parent.postMessage(e4, "*");
|
|
5058
5090
|
}
|
|
5059
|
-
if (C3.type ===
|
|
5060
|
-
else if (C3.type ===
|
|
5061
|
-
if (C3.data.source ===
|
|
5091
|
+
if (C3.type === si.FullSnapshot) de2 = C3, he2 = 0;
|
|
5092
|
+
else if (C3.type === si.IncrementalSnapshot) {
|
|
5093
|
+
if (C3.data.source === ii.Mutation && C3.data.isAttachIframe) return;
|
|
5062
5094
|
he2++;
|
|
5063
5095
|
const e4 = m2 && he2 >= m2, a3 = u2 && C3.timestamp - de2.timestamp > u2;
|
|
5064
|
-
(e4 || a3) &&
|
|
5096
|
+
(e4 || a3) && qi(true);
|
|
5065
5097
|
}
|
|
5066
5098
|
};
|
|
5067
5099
|
const rt = (e3) => {
|
|
5068
|
-
|
|
5069
|
-
}, kn = (e3) =>
|
|
5070
|
-
for (const e3 of ne2 || []) e3.getMirror && e3.getMirror({ nodeMirror:
|
|
5100
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.Mutation, ...e3 } });
|
|
5101
|
+
}, kn = (e3) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Scroll, ...e3 } }), Cn = (e3) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.CanvasMutation, ...e3 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e3) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.AdoptedStyleSheet, ...e3 } }) }), ge2 = new Vl({ mirror: Qi, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: Pi });
|
|
5102
|
+
for (const e3 of ne2 || []) e3.getMirror && e3.getMirror({ nodeMirror: Qi, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
|
|
5071
5103
|
const ye2 = new yu();
|
|
5072
|
-
|
|
5073
|
-
const we2 = new wu({ mutationCb: rt, scrollCb: kn, bypassOptions: { blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskInputOptions: ce2, dataURLOptions: V2, maskTextFn: B2, maskInputFn: U2, recordCanvas: J2, inlineImages: te2, sampling: j2, slimDOMOptions: pe2, iframeManager: ge2, stylesheetManager: me2, canvasManager:
|
|
5074
|
-
|
|
5104
|
+
Hi = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: Qi, sampling: j2.canvas, dataURLOptions: V2 });
|
|
5105
|
+
const we2 = new wu({ mutationCb: rt, scrollCb: kn, bypassOptions: { blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskInputOptions: ce2, dataURLOptions: V2, maskTextFn: B2, maskInputFn: U2, recordCanvas: J2, inlineImages: te2, sampling: j2, slimDOMOptions: pe2, iframeManager: ge2, stylesheetManager: me2, canvasManager: Hi, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: Qi });
|
|
5106
|
+
qi = (e3 = false) => {
|
|
5075
5107
|
if (!H2) return;
|
|
5076
|
-
|
|
5108
|
+
Pi({ type: si.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e3), me2.reset(), we2.init(), mi.forEach((e4) => e4.lock());
|
|
5077
5109
|
const a3 = (function Zi(e4, a4) {
|
|
5078
|
-
const { mirror: u3 = new
|
|
5110
|
+
const { mirror: u3 = new gt(), blockClass: m3 = "rr-block", blockSelector: w3 = null, maskTextClass: b3 = "rr-mask", maskTextSelector: C3 = null, inlineStylesheet: x3 = true, inlineImages: I3 = false, recordCanvas: _3 = false, maskAllInputs: O3 = false, maskTextFn: E3, maskInputFn: D3, slimDOM: F3 = false, dataURLOptions: U3, preserveWhiteSpace: B3, onSerialize: $3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3 = () => false } = a4 || {};
|
|
5079
5111
|
return Se(e4, { doc: e4, mirror: u3, blockClass: m3, blockSelector: w3, maskTextClass: b3, maskTextSelector: C3, skipChild: false, inlineStylesheet: x3, maskInputOptions: true === O3 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : false === O3 ? { password: true } : O3, maskTextFn: E3, maskInputFn: D3, slimDOMOptions: true === F3 || "all" === F3 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: "all" === F3, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true } : false === F3 ? {} : F3, dataURLOptions: U3, inlineImages: I3, recordCanvas: _3, preserveWhiteSpace: B3, onSerialize: $3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3, newlyAddedElement: false });
|
|
5080
|
-
})(document, { mirror:
|
|
5081
|
-
wo(e4,
|
|
5112
|
+
})(document, { mirror: Qi, blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskAllInputs: ce2, maskTextFn: B2, maskInputFn: U2, slimDOM: pe2, dataURLOptions: V2, recordCanvas: J2, inlineImages: te2, onSerialize: (e4) => {
|
|
5113
|
+
wo(e4, Qi) && ge2.addIframe(e4), bo(e4, Qi) && me2.trackLinkElement(e4), Fs(e4) && we2.addShadowRoot(e4.shadowRoot, document);
|
|
5082
5114
|
}, onIframeLoad: (e4, a4) => {
|
|
5083
5115
|
ge2.attachIframe(e4, a4), we2.observeAttachShadow(e4);
|
|
5084
5116
|
}, onStylesheetLoad: (e4, a4) => {
|
|
5085
5117
|
me2.attachLinkElement(e4, a4);
|
|
5086
5118
|
}, keepIframeSrcFn: re2 });
|
|
5087
5119
|
if (!a3) return console.warn("Failed to snapshot the document");
|
|
5088
|
-
|
|
5120
|
+
Pi({ type: si.FullSnapshot, data: { node: a3, initialOffset: po(window) } }, e3), mi.forEach((e4) => e4.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, Qi.getId(document));
|
|
5089
5121
|
};
|
|
5090
5122
|
try {
|
|
5091
5123
|
const e3 = [], K = (e4) => {
|
|
5092
5124
|
var a3;
|
|
5093
|
-
return M(au)({ mutationCb: rt, mousemoveCb: (e5, a4) =>
|
|
5094
|
-
|
|
5125
|
+
return M(au)({ mutationCb: rt, mousemoveCb: (e5, a4) => Pi({ type: si.IncrementalSnapshot, data: { source: a4, positions: e5 } }), mouseInteractionCb: (e5) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.MouseInteraction, ...e5 } }), scrollCb: kn, viewportResizeCb: (e5) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.ViewportResize, ...e5 } }), inputCb: (e5) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Input, ...e5 } }), mediaInteractionCb: (e5) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.MediaInteraction, ...e5 } }), styleSheetRuleCb: (e5) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.StyleSheetRule, ...e5 } }), styleDeclarationCb: (e5) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.StyleDeclaration, ...e5 } }), canvasMutationCb: Cn, fontCb: (e5) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Font, ...e5 } }), selectionCb: (e5) => {
|
|
5126
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.Selection, ...e5 } });
|
|
5095
5127
|
}, customElementCb: (e5) => {
|
|
5096
|
-
|
|
5128
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.CustomElement, ...e5 } });
|
|
5097
5129
|
}, typingCb: (e5) => {
|
|
5098
|
-
|
|
5130
|
+
Pi({ type: si.IncrementalSnapshot, data: { ...e5 } });
|
|
5099
5131
|
}, deviceChangeCb: (e5) => {
|
|
5100
|
-
|
|
5101
|
-
}, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas: J2, inlineImages: te2, userTriggeredOnInput: Q2, collectFonts: ee2, doc: e4, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror:
|
|
5132
|
+
Pi({ type: si.Device, data: { ...e5 } });
|
|
5133
|
+
}, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas: J2, inlineImages: te2, userTriggeredOnInput: Q2, collectFonts: ee2, doc: e4, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror: Qi, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: Hi, ignoreCSSAttributes: oe2, plugins: (null == (a3 = null == ne2 ? void 0 : ne2.filter((e5) => e5.observer)) ? void 0 : a3.map((e5) => ({ observer: e5.observer, options: e5.options, callback: (a4) => Pi({ type: si.Plugin, data: { plugin: e5.name, payload: a4 } }) }))) || [] }, $2);
|
|
5102
5134
|
};
|
|
5103
5135
|
ge2.addLoadListener((a3) => {
|
|
5104
5136
|
try {
|
|
@@ -5108,15 +5140,15 @@
|
|
|
5108
5140
|
}
|
|
5109
5141
|
});
|
|
5110
5142
|
const W = () => {
|
|
5111
|
-
|
|
5143
|
+
qi(), e3.push(K(document)), Ji = true;
|
|
5112
5144
|
};
|
|
5113
5145
|
return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e3.push(G("DOMContentLoaded", () => {
|
|
5114
|
-
|
|
5146
|
+
Pi({ type: si.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
|
|
5115
5147
|
})), e3.push(G("load", () => {
|
|
5116
|
-
|
|
5148
|
+
Pi({ type: si.Load, data: {} }), "load" === X2 && W();
|
|
5117
5149
|
}, window))), () => {
|
|
5118
|
-
e3.forEach((e4) => e4()), ye2.destroy(),
|
|
5119
|
-
|
|
5150
|
+
e3.forEach((e4) => e4()), ye2.destroy(), Ji = false, (function jl() {
|
|
5151
|
+
hi = void 0;
|
|
5120
5152
|
})();
|
|
5121
5153
|
};
|
|
5122
5154
|
} catch (e3) {
|
|
@@ -5143,24 +5175,24 @@
|
|
|
5143
5175
|
}), u2;
|
|
5144
5176
|
}
|
|
5145
5177
|
ae.addCustomEvent = (e2, a2) => {
|
|
5146
|
-
if (!
|
|
5147
|
-
|
|
5178
|
+
if (!Ji) throw new Error("please add custom event after start recording");
|
|
5179
|
+
Pi({ type: si.Custom, data: { tag: e2, payload: a2 } });
|
|
5148
5180
|
}, ae.addSailfishEvent = (e2, a2) => {
|
|
5149
|
-
if (!
|
|
5150
|
-
|
|
5181
|
+
if (!Ji) throw new Error("please add Sailfish event after start recording");
|
|
5182
|
+
Pi({ type: e2, data: { tag: "sailfish-zendesk-test-tag", payload: a2 } });
|
|
5151
5183
|
}, ae.freezePage = () => {
|
|
5152
|
-
|
|
5184
|
+
mi.forEach((e2) => e2.freeze());
|
|
5153
5185
|
}, ae.takeFullSnapshot = (e2) => {
|
|
5154
|
-
if (!
|
|
5155
|
-
|
|
5156
|
-
}, ae.mirror =
|
|
5157
|
-
var
|
|
5158
|
-
return { isColorSupported: false, reset:
|
|
5186
|
+
if (!Ji) throw new Error("please take full snapshot after start recording");
|
|
5187
|
+
qi(e2);
|
|
5188
|
+
}, ae.mirror = Qi;
|
|
5189
|
+
var ea = { exports: {} }, ta = String, Lo = function() {
|
|
5190
|
+
return { isColorSupported: false, reset: ta, bold: ta, dim: ta, italic: ta, underline: ta, inverse: ta, hidden: ta, strikethrough: ta, black: ta, red: ta, green: ta, yellow: ta, blue: ta, magenta: ta, cyan: ta, white: ta, gray: ta, bgBlack: ta, bgRed: ta, bgGreen: ta, bgYellow: ta, bgBlue: ta, bgMagenta: ta, bgCyan: ta, bgWhite: ta, blackBright: ta, redBright: ta, greenBright: ta, yellowBright: ta, blueBright: ta, magentaBright: ta, cyanBright: ta, whiteBright: ta, bgBlackBright: ta, bgRedBright: ta, bgGreenBright: ta, bgYellowBright: ta, bgBlueBright: ta, bgMagentaBright: ta, bgCyanBright: ta, bgWhiteBright: ta };
|
|
5159
5191
|
};
|
|
5160
|
-
|
|
5161
|
-
var
|
|
5162
|
-
const
|
|
5163
|
-
let
|
|
5192
|
+
ea.exports = Lo(), ea.exports.createColors = Lo;
|
|
5193
|
+
var na = ea.exports;
|
|
5194
|
+
const ra = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
5195
|
+
let oa = na, sa = ra, ia = class To extends Error {
|
|
5164
5196
|
constructor(e2, a2, u2, m2, w2, b2) {
|
|
5165
5197
|
super(e2), this.name = "CssSyntaxError", this.reason = e2, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a2 < "u" && typeof u2 < "u" && ("number" == typeof a2 ? (this.line = a2, this.column = u2) : (this.line = a2.line, this.column = a2.column, this.endLine = u2.line, this.endColumn = u2.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, To);
|
|
5166
5198
|
}
|
|
@@ -5170,11 +5202,11 @@
|
|
|
5170
5202
|
showSourceCode(e2) {
|
|
5171
5203
|
if (!this.source) return "";
|
|
5172
5204
|
let a2 = this.source;
|
|
5173
|
-
null == e2 && (e2 =
|
|
5205
|
+
null == e2 && (e2 = oa.isColorSupported);
|
|
5174
5206
|
let n = (e3) => e3, r = (e3) => e3, i = (e3) => e3;
|
|
5175
5207
|
if (e2) {
|
|
5176
|
-
let { bold: e3, gray: a3, red: u3 } =
|
|
5177
|
-
r = (a4) => e3(u3(a4)), n = (e4) => a3(e4),
|
|
5208
|
+
let { bold: e3, gray: a3, red: u3 } = oa.createColors(true);
|
|
5209
|
+
r = (a4) => e3(u3(a4)), n = (e4) => a3(e4), sa && (i = (e4) => sa(e4));
|
|
5178
5210
|
}
|
|
5179
5211
|
let u2 = a2.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u2.length), b2 = String(w2).length;
|
|
5180
5212
|
return u2.slice(m2, w2).map((e3, a3) => {
|
|
@@ -5195,10 +5227,10 @@
|
|
|
5195
5227
|
return e2 && (e2 = "\n\n" + e2 + "\n"), this.name + ": " + this.message + e2;
|
|
5196
5228
|
}
|
|
5197
5229
|
};
|
|
5198
|
-
var
|
|
5199
|
-
|
|
5200
|
-
const
|
|
5201
|
-
let
|
|
5230
|
+
var aa = ia;
|
|
5231
|
+
ia.default = ia;
|
|
5232
|
+
const la = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
5233
|
+
let ca = class {
|
|
5202
5234
|
constructor(e2) {
|
|
5203
5235
|
this.builder = e2;
|
|
5204
5236
|
}
|
|
@@ -5250,7 +5282,7 @@
|
|
|
5250
5282
|
if (u2 || (u2 = a2), a2 && (m2 = e2.raws[a2], typeof m2 < "u")) return m2;
|
|
5251
5283
|
let w2 = e2.parent;
|
|
5252
5284
|
if ("before" === u2 && (!w2 || "root" === w2.type && w2.first === e2 || w2 && "document" === w2.type)) return "";
|
|
5253
|
-
if (!w2) return
|
|
5285
|
+
if (!w2) return la[u2];
|
|
5254
5286
|
let b2 = e2.root();
|
|
5255
5287
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u2] < "u") return b2.rawCache[u2];
|
|
5256
5288
|
if ("before" === u2 || "after" === u2) return this.beforeAfter(e2, u2);
|
|
@@ -5262,7 +5294,7 @@
|
|
|
5262
5294
|
if (m2 = e3.raws[a2], typeof m2 < "u") return false;
|
|
5263
5295
|
});
|
|
5264
5296
|
}
|
|
5265
|
-
return typeof m2 > "u" && (m2 =
|
|
5297
|
+
return typeof m2 > "u" && (m2 = la[u2]), b2.rawCache[u2] = m2, m2;
|
|
5266
5298
|
}
|
|
5267
5299
|
rawBeforeClose(e2) {
|
|
5268
5300
|
let a2;
|
|
@@ -5338,17 +5370,17 @@
|
|
|
5338
5370
|
this[e2.type](e2, a2);
|
|
5339
5371
|
}
|
|
5340
5372
|
};
|
|
5341
|
-
var
|
|
5342
|
-
|
|
5343
|
-
let
|
|
5373
|
+
var ua = ca;
|
|
5374
|
+
ca.default = ca;
|
|
5375
|
+
let pa = ua;
|
|
5344
5376
|
function zs(e2, a2) {
|
|
5345
|
-
new
|
|
5377
|
+
new pa(a2).stringify(e2);
|
|
5346
5378
|
}
|
|
5347
|
-
var
|
|
5379
|
+
var ha = zs;
|
|
5348
5380
|
zs.default = zs;
|
|
5349
|
-
var
|
|
5350
|
-
|
|
5351
|
-
let
|
|
5381
|
+
var fa = {};
|
|
5382
|
+
fa.isClean = Symbol("isClean"), fa.my = Symbol("my");
|
|
5383
|
+
let ma = aa, ga = ua, ya = ha, { isClean: wa, my: Sa } = fa;
|
|
5352
5384
|
function Bs(e2, a2) {
|
|
5353
5385
|
let u2 = new e2.constructor();
|
|
5354
5386
|
for (let m2 in e2) {
|
|
@@ -5370,12 +5402,12 @@
|
|
|
5370
5402
|
}
|
|
5371
5403
|
return w2;
|
|
5372
5404
|
}
|
|
5373
|
-
let
|
|
5405
|
+
let ba = class {
|
|
5374
5406
|
get proxyOf() {
|
|
5375
5407
|
return this;
|
|
5376
5408
|
}
|
|
5377
5409
|
constructor(e2 = {}) {
|
|
5378
|
-
this.raws = {}, this[
|
|
5410
|
+
this.raws = {}, this[wa] = false, this[Sa] = true;
|
|
5379
5411
|
for (let a2 in e2) if ("nodes" === a2) {
|
|
5380
5412
|
this.nodes = [];
|
|
5381
5413
|
for (let u2 of e2[a2]) "function" == typeof u2.clone ? this.append(u2.clone()) : this.append(u2);
|
|
@@ -5419,19 +5451,19 @@
|
|
|
5419
5451
|
let { end: u2, start: m2 } = this.rangeBy(a2);
|
|
5420
5452
|
return this.source.input.error(e2, { column: m2.column, line: m2.line }, { column: u2.column, line: u2.line }, a2);
|
|
5421
5453
|
}
|
|
5422
|
-
return new
|
|
5454
|
+
return new ma(e2);
|
|
5423
5455
|
}
|
|
5424
5456
|
getProxyProcessor() {
|
|
5425
5457
|
return { get: (e2, a2) => "proxyOf" === a2 ? e2 : "root" === a2 ? () => e2.root().toProxy() : e2[a2], set: (e2, a2, u2) => (e2[a2] === u2 || (e2[a2] = u2, ("prop" === a2 || "value" === a2 || "name" === a2 || "params" === a2 || "important" === a2 || "text" === a2) && e2.markDirty()), true) };
|
|
5426
5458
|
}
|
|
5427
5459
|
markClean() {
|
|
5428
|
-
this[
|
|
5460
|
+
this[wa] = true;
|
|
5429
5461
|
}
|
|
5430
5462
|
markDirty() {
|
|
5431
|
-
if (this[
|
|
5432
|
-
this[
|
|
5463
|
+
if (this[wa]) {
|
|
5464
|
+
this[wa] = false;
|
|
5433
5465
|
let e2 = this;
|
|
5434
|
-
for (; e2 = e2.parent; ) e2[
|
|
5466
|
+
for (; e2 = e2.parent; ) e2[wa] = false;
|
|
5435
5467
|
}
|
|
5436
5468
|
}
|
|
5437
5469
|
next() {
|
|
@@ -5467,7 +5499,7 @@
|
|
|
5467
5499
|
return (u2.line < a2.line || u2.line === a2.line && u2.column <= a2.column) && (u2 = { column: a2.column + 1, line: a2.line }), { end: u2, start: a2 };
|
|
5468
5500
|
}
|
|
5469
5501
|
raw(e2, a2) {
|
|
5470
|
-
return new
|
|
5502
|
+
return new ga().raw(this, e2, a2);
|
|
5471
5503
|
}
|
|
5472
5504
|
remove() {
|
|
5473
5505
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -5504,7 +5536,7 @@
|
|
|
5504
5536
|
toProxy() {
|
|
5505
5537
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
5506
5538
|
}
|
|
5507
|
-
toString(e2 =
|
|
5539
|
+
toString(e2 = ya) {
|
|
5508
5540
|
e2.stringify && (e2 = e2.stringify);
|
|
5509
5541
|
let a2 = "";
|
|
5510
5542
|
return e2(this, (e3) => {
|
|
@@ -5517,16 +5549,16 @@
|
|
|
5517
5549
|
return e2.warn(a2, m2);
|
|
5518
5550
|
}
|
|
5519
5551
|
};
|
|
5520
|
-
var
|
|
5521
|
-
|
|
5522
|
-
let
|
|
5552
|
+
var va = ba;
|
|
5553
|
+
ba.default = ba;
|
|
5554
|
+
let Ca = va, ka = class extends Ca {
|
|
5523
5555
|
constructor(e2) {
|
|
5524
5556
|
super(e2), this.type = "comment";
|
|
5525
5557
|
}
|
|
5526
5558
|
};
|
|
5527
|
-
var
|
|
5528
|
-
|
|
5529
|
-
let
|
|
5559
|
+
var xa = ka;
|
|
5560
|
+
ka.default = ka;
|
|
5561
|
+
let Ma = va, Ia = class extends Ma {
|
|
5530
5562
|
get variable() {
|
|
5531
5563
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
5532
5564
|
}
|
|
@@ -5534,16 +5566,16 @@
|
|
|
5534
5566
|
e2 && typeof e2.value < "u" && "string" != typeof e2.value && (e2 = { ...e2, value: String(e2.value) }), super(e2), this.type = "decl";
|
|
5535
5567
|
}
|
|
5536
5568
|
};
|
|
5537
|
-
var
|
|
5538
|
-
|
|
5539
|
-
let
|
|
5569
|
+
var _a = Ia;
|
|
5570
|
+
Ia.default = Ia;
|
|
5571
|
+
let Oa, Ea, La, Ra, Aa = xa, Ta = _a, Na = va, { isClean: Pa, my: Da } = fa;
|
|
5540
5572
|
function Wo(e2) {
|
|
5541
5573
|
return e2.map((e3) => (e3.nodes && (e3.nodes = Wo(e3.nodes)), delete e3.source, e3));
|
|
5542
5574
|
}
|
|
5543
5575
|
function zo(e2) {
|
|
5544
|
-
if (e2[
|
|
5576
|
+
if (e2[Pa] = false, e2.proxyOf.nodes) for (let a2 of e2.proxyOf.nodes) zo(a2);
|
|
5545
5577
|
}
|
|
5546
|
-
let
|
|
5578
|
+
let Fa = class Bo extends Na {
|
|
5547
5579
|
get first() {
|
|
5548
5580
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
5549
5581
|
}
|
|
@@ -5595,7 +5627,7 @@
|
|
|
5595
5627
|
return this.markDirty(), this;
|
|
5596
5628
|
}
|
|
5597
5629
|
normalize(e2, a2) {
|
|
5598
|
-
if ("string" == typeof e2) e2 = Wo(
|
|
5630
|
+
if ("string" == typeof e2) e2 = Wo(Ea(e2).nodes);
|
|
5599
5631
|
else if (typeof e2 > "u") e2 = [];
|
|
5600
5632
|
else if (Array.isArray(e2)) {
|
|
5601
5633
|
e2 = e2.slice(0);
|
|
@@ -5606,14 +5638,14 @@
|
|
|
5606
5638
|
} else if (e2.type) e2 = [e2];
|
|
5607
5639
|
else if (e2.prop) {
|
|
5608
5640
|
if (typeof e2.value > "u") throw new Error("Value field is missed in node creation");
|
|
5609
|
-
"string" != typeof e2.value && (e2.value = String(e2.value)), e2 = [new
|
|
5610
|
-
} else if (e2.selector || e2.selectors) e2 = [new
|
|
5611
|
-
else if (e2.name) e2 = [new
|
|
5641
|
+
"string" != typeof e2.value && (e2.value = String(e2.value)), e2 = [new Ta(e2)];
|
|
5642
|
+
} else if (e2.selector || e2.selectors) e2 = [new Ra(e2)];
|
|
5643
|
+
else if (e2.name) e2 = [new Oa(e2)];
|
|
5612
5644
|
else {
|
|
5613
5645
|
if (!e2.text) throw new Error("Unknown node type in node creation");
|
|
5614
|
-
e2 = [new
|
|
5646
|
+
e2 = [new Aa(e2)];
|
|
5615
5647
|
}
|
|
5616
|
-
return e2.map((e3) => (e3[
|
|
5648
|
+
return e2.map((e3) => (e3[Da] || Bo.rebuild(e3), (e3 = e3.proxyOf).parent && e3.parent.removeChild(e3), e3[Pa] && zo(e3), e3.raws || (e3.raws = {}), typeof e3.raws.before > "u" && a2 && typeof a2.raws.before < "u" && (e3.raws.before = a2.raws.before.replace(/\S/g, "")), e3.parent = this.proxyOf, e3));
|
|
5617
5649
|
}
|
|
5618
5650
|
prepend(...e2) {
|
|
5619
5651
|
e2 = e2.reverse();
|
|
@@ -5689,22 +5721,22 @@
|
|
|
5689
5721
|
}));
|
|
5690
5722
|
}
|
|
5691
5723
|
};
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
},
|
|
5724
|
+
Fa.registerParse = (e2) => {
|
|
5725
|
+
Ea = e2;
|
|
5726
|
+
}, Fa.registerRule = (e2) => {
|
|
5727
|
+
Ra = e2;
|
|
5728
|
+
}, Fa.registerAtRule = (e2) => {
|
|
5695
5729
|
Oa = e2;
|
|
5696
|
-
},
|
|
5697
|
-
|
|
5698
|
-
}, Na.registerRoot = (e2) => {
|
|
5699
|
-
_a = e2;
|
|
5730
|
+
}, Fa.registerRoot = (e2) => {
|
|
5731
|
+
La = e2;
|
|
5700
5732
|
};
|
|
5701
|
-
var
|
|
5702
|
-
|
|
5703
|
-
"atrule" === e2.type ? Object.setPrototypeOf(e2,
|
|
5704
|
-
|
|
5733
|
+
var Ua = Fa;
|
|
5734
|
+
Fa.default = Fa, Fa.rebuild = (e2) => {
|
|
5735
|
+
"atrule" === e2.type ? Object.setPrototypeOf(e2, Oa.prototype) : "rule" === e2.type ? Object.setPrototypeOf(e2, Ra.prototype) : "decl" === e2.type ? Object.setPrototypeOf(e2, Ta.prototype) : "comment" === e2.type ? Object.setPrototypeOf(e2, Aa.prototype) : "root" === e2.type && Object.setPrototypeOf(e2, La.prototype), e2[Da] = true, e2.nodes && e2.nodes.forEach((e3) => {
|
|
5736
|
+
Fa.rebuild(e3);
|
|
5705
5737
|
});
|
|
5706
5738
|
};
|
|
5707
|
-
let
|
|
5739
|
+
let Ba = Ua, $a = class extends Ba {
|
|
5708
5740
|
constructor(e2) {
|
|
5709
5741
|
super(e2), this.type = "atrule";
|
|
5710
5742
|
}
|
|
@@ -5715,38 +5747,38 @@
|
|
|
5715
5747
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e2);
|
|
5716
5748
|
}
|
|
5717
5749
|
};
|
|
5718
|
-
var
|
|
5719
|
-
|
|
5720
|
-
let
|
|
5750
|
+
var Wa = $a;
|
|
5751
|
+
$a.default = $a, Ba.registerAtRule($a);
|
|
5752
|
+
let za, ja, Ga = Ua, Va = class extends Ga {
|
|
5721
5753
|
constructor(e2) {
|
|
5722
5754
|
super({ type: "document", ...e2 }), this.nodes || (this.nodes = []);
|
|
5723
5755
|
}
|
|
5724
5756
|
toResult(e2 = {}) {
|
|
5725
|
-
return new
|
|
5757
|
+
return new za(new ja(), this, e2).stringify();
|
|
5726
5758
|
}
|
|
5727
5759
|
};
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
},
|
|
5731
|
-
|
|
5760
|
+
Va.registerLazyResult = (e2) => {
|
|
5761
|
+
za = e2;
|
|
5762
|
+
}, Va.registerProcessor = (e2) => {
|
|
5763
|
+
ja = e2;
|
|
5732
5764
|
};
|
|
5733
|
-
var
|
|
5734
|
-
|
|
5735
|
-
var
|
|
5765
|
+
var qa = Va;
|
|
5766
|
+
Va.default = Va;
|
|
5767
|
+
var Za = { nanoid: (e2 = 21) => {
|
|
5736
5768
|
let a2 = "", u2 = 0 | e2;
|
|
5737
5769
|
for (; u2--; ) a2 += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
5738
5770
|
return a2;
|
|
5739
5771
|
} };
|
|
5740
|
-
let { existsSync:
|
|
5741
|
-
let
|
|
5772
|
+
let { existsSync: Ka, readFileSync: Ja } = ra, { dirname: Ya, join: Qa } = ra, { SourceMapConsumer: el, SourceMapGenerator: tl } = ra;
|
|
5773
|
+
let nl = class {
|
|
5742
5774
|
constructor(e2, a2) {
|
|
5743
5775
|
if (false === a2.map) return;
|
|
5744
5776
|
this.loadAnnotation(e2), this.inline = this.startWith(this.annotation, "data:");
|
|
5745
5777
|
let u2 = a2.map ? a2.map.prev : void 0, m2 = this.loadMap(a2.from, u2);
|
|
5746
|
-
!this.mapFile && a2.from && (this.mapFile = a2.from), this.mapFile && (this.root =
|
|
5778
|
+
!this.mapFile && a2.from && (this.mapFile = a2.from), this.mapFile && (this.root = Ya(this.mapFile)), m2 && (this.text = m2);
|
|
5747
5779
|
}
|
|
5748
5780
|
consumer() {
|
|
5749
|
-
return this.consumerCache || (this.consumerCache = new
|
|
5781
|
+
return this.consumerCache || (this.consumerCache = new el(this.text)), this.consumerCache;
|
|
5750
5782
|
}
|
|
5751
5783
|
decodeInline(e2) {
|
|
5752
5784
|
let a2 = e2.match(/^data:application\/json;charset=utf-?8,/) || e2.match(/^data:application\/json,/);
|
|
@@ -5771,15 +5803,15 @@
|
|
|
5771
5803
|
u2 > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e2.substring(u2, m2)));
|
|
5772
5804
|
}
|
|
5773
5805
|
loadFile(e2) {
|
|
5774
|
-
if (this.root =
|
|
5806
|
+
if (this.root = Ya(e2), Ka(e2)) return this.mapFile = e2, Ja(e2, "utf-8").toString().trim();
|
|
5775
5807
|
}
|
|
5776
5808
|
loadMap(e2, a2) {
|
|
5777
5809
|
if (false === a2) return false;
|
|
5778
5810
|
if (a2) {
|
|
5779
5811
|
if ("string" == typeof a2) return a2;
|
|
5780
5812
|
if ("function" != typeof a2) {
|
|
5781
|
-
if (a2 instanceof
|
|
5782
|
-
if (a2 instanceof
|
|
5813
|
+
if (a2 instanceof el) return tl.fromSourceMap(a2).toString();
|
|
5814
|
+
if (a2 instanceof tl) return a2.toString();
|
|
5783
5815
|
if (this.isMap(a2)) return JSON.stringify(a2);
|
|
5784
5816
|
throw new Error("Unsupported previous source map format: " + a2.toString());
|
|
5785
5817
|
}
|
|
@@ -5795,7 +5827,7 @@
|
|
|
5795
5827
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
5796
5828
|
if (this.annotation) {
|
|
5797
5829
|
let a3 = this.annotation;
|
|
5798
|
-
return e2 && (a3 =
|
|
5830
|
+
return e2 && (a3 = Qa(Ya(e2), a3)), this.loadFile(a3);
|
|
5799
5831
|
}
|
|
5800
5832
|
}
|
|
5801
5833
|
}
|
|
@@ -5806,23 +5838,23 @@
|
|
|
5806
5838
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
5807
5839
|
}
|
|
5808
5840
|
};
|
|
5809
|
-
var
|
|
5810
|
-
|
|
5811
|
-
let { nanoid:
|
|
5841
|
+
var rl = nl;
|
|
5842
|
+
nl.default = nl;
|
|
5843
|
+
let { nanoid: ol } = Za, { isAbsolute: sl, resolve: il } = ra, { SourceMapConsumer: al, SourceMapGenerator: ll } = ra, { fileURLToPath: cl, pathToFileURL: ul } = ra, pl = aa, dl = rl, hl = ra, fl = Symbol("fromOffsetCache"), ml = !(!al || !ll), gl = !(!il || !sl), yl = class {
|
|
5812
5844
|
get from() {
|
|
5813
5845
|
return this.file || this.id;
|
|
5814
5846
|
}
|
|
5815
5847
|
constructor(e2, a2 = {}) {
|
|
5816
5848
|
if (null === e2 || typeof e2 > "u" || "object" == typeof e2 && !e2.toString) throw new Error(`PostCSS received ${e2} instead of CSS string`);
|
|
5817
|
-
if (this.css = e2.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a2.document && (this.document = a2.document.toString()), a2.from && (!
|
|
5818
|
-
let e3 = new
|
|
5849
|
+
if (this.css = e2.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a2.document && (this.document = a2.document.toString()), a2.from && (!gl || /^\w+:\/\//.test(a2.from) || sl(a2.from) ? this.file = a2.from : this.file = il(a2.from)), gl && ml) {
|
|
5850
|
+
let e3 = new dl(this.css, a2);
|
|
5819
5851
|
if (e3.text) {
|
|
5820
5852
|
this.map = e3;
|
|
5821
5853
|
let a3 = e3.consumer().file;
|
|
5822
5854
|
!this.file && a3 && (this.file = this.mapResolve(a3));
|
|
5823
5855
|
}
|
|
5824
5856
|
}
|
|
5825
|
-
this.file || (this.id = "<input css " +
|
|
5857
|
+
this.file || (this.id = "<input css " + ol(6) + ">"), this.map && (this.map.file = this.from);
|
|
5826
5858
|
}
|
|
5827
5859
|
error(e2, a2, u2, m2 = {}) {
|
|
5828
5860
|
let w2, b2, C2;
|
|
@@ -5841,17 +5873,17 @@
|
|
|
5841
5873
|
a2 = e3.line, u2 = e3.col;
|
|
5842
5874
|
}
|
|
5843
5875
|
let x2 = this.origin(a2, u2, b2, w2);
|
|
5844
|
-
return C2 = x2 ? new
|
|
5876
|
+
return C2 = x2 ? new pl(e2, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new pl(e2, void 0 === b2 ? a2 : { column: u2, line: a2 }, void 0 === b2 ? u2 : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u2, endColumn: w2, endLine: b2, line: a2, source: this.css }, this.file && (ul && (C2.input.url = ul(this.file).toString()), C2.input.file = this.file), C2;
|
|
5845
5877
|
}
|
|
5846
5878
|
fromOffset(e2) {
|
|
5847
5879
|
let a2, u2;
|
|
5848
|
-
if (this[
|
|
5880
|
+
if (this[fl]) u2 = this[fl];
|
|
5849
5881
|
else {
|
|
5850
5882
|
let e3 = this.css.split("\n");
|
|
5851
5883
|
u2 = new Array(e3.length);
|
|
5852
5884
|
let a3 = 0;
|
|
5853
5885
|
for (let m3 = 0, w2 = e3.length; m3 < w2; m3++) u2[m3] = a3, a3 += e3[m3].length + 1;
|
|
5854
|
-
this[
|
|
5886
|
+
this[fl] = u2;
|
|
5855
5887
|
}
|
|
5856
5888
|
a2 = u2[u2.length - 1];
|
|
5857
5889
|
let m2 = 0;
|
|
@@ -5870,17 +5902,17 @@
|
|
|
5870
5902
|
return { col: e2 - u2[m2] + 1, line: m2 + 1 };
|
|
5871
5903
|
}
|
|
5872
5904
|
mapResolve(e2) {
|
|
5873
|
-
return /^\w+:\/\//.test(e2) ? e2 :
|
|
5905
|
+
return /^\w+:\/\//.test(e2) ? e2 : il(this.map.consumer().sourceRoot || this.map.root || ".", e2);
|
|
5874
5906
|
}
|
|
5875
5907
|
origin(e2, a2, u2, m2) {
|
|
5876
5908
|
if (!this.map) return false;
|
|
5877
5909
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a2, line: e2 });
|
|
5878
5910
|
if (!x2.source) return false;
|
|
5879
|
-
"number" == typeof u2 && (w2 = C2.originalPositionFor({ column: m2, line: u2 })), b2 =
|
|
5911
|
+
"number" == typeof u2 && (w2 = C2.originalPositionFor({ column: m2, line: u2 })), b2 = sl(x2.source) ? ul(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || ul(this.map.mapFile));
|
|
5880
5912
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
5881
5913
|
if ("file:" === b2.protocol) {
|
|
5882
|
-
if (!
|
|
5883
|
-
I2.file =
|
|
5914
|
+
if (!cl) throw new Error("file: protocol is not available in this PostCSS build");
|
|
5915
|
+
I2.file = cl(b2);
|
|
5884
5916
|
}
|
|
5885
5917
|
let _2 = C2.sourceContentFor(x2.source);
|
|
5886
5918
|
return _2 && (I2.source = _2), I2;
|
|
@@ -5891,9 +5923,9 @@
|
|
|
5891
5923
|
return this.map && (e2.map = { ...this.map }, e2.map.consumerCache && (e2.map.consumerCache = void 0)), e2;
|
|
5892
5924
|
}
|
|
5893
5925
|
};
|
|
5894
|
-
var
|
|
5895
|
-
|
|
5896
|
-
let
|
|
5926
|
+
var wl = yl;
|
|
5927
|
+
yl.default = yl, hl && hl.registerInput && hl.registerInput(yl);
|
|
5928
|
+
let Sl, bl, vl = Ua, Cl = class extends vl {
|
|
5897
5929
|
constructor(e2) {
|
|
5898
5930
|
super(e2), this.type = "root", this.nodes || (this.nodes = []);
|
|
5899
5931
|
}
|
|
@@ -5910,29 +5942,29 @@
|
|
|
5910
5942
|
return !a2 && 0 === u2 && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u2].raws.before), super.removeChild(e2);
|
|
5911
5943
|
}
|
|
5912
5944
|
toResult(e2 = {}) {
|
|
5913
|
-
return new
|
|
5945
|
+
return new Sl(new bl(), this, e2).stringify();
|
|
5914
5946
|
}
|
|
5915
5947
|
};
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
},
|
|
5919
|
-
|
|
5948
|
+
Cl.registerLazyResult = (e2) => {
|
|
5949
|
+
Sl = e2;
|
|
5950
|
+
}, Cl.registerProcessor = (e2) => {
|
|
5951
|
+
bl = e2;
|
|
5920
5952
|
};
|
|
5921
|
-
var
|
|
5922
|
-
|
|
5923
|
-
let
|
|
5953
|
+
var kl = Cl;
|
|
5954
|
+
Cl.default = Cl, vl.registerRoot(Cl);
|
|
5955
|
+
let xl = { comma: (e2) => xl.split(e2, [","], true), space(e2) {
|
|
5924
5956
|
let a2 = [" ", "\n", " "];
|
|
5925
|
-
return
|
|
5957
|
+
return xl.split(e2, a2);
|
|
5926
5958
|
}, split(e2, a2, u2) {
|
|
5927
5959
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
5928
5960
|
for (let u3 of e2) _2 ? _2 = false : "\\" === u3 ? _2 = true : x2 ? u3 === I2 && (x2 = false) : '"' === u3 || "'" === u3 ? (x2 = true, I2 = u3) : "(" === u3 ? C2 += 1 : ")" === u3 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a2.includes(u3) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u3;
|
|
5929
5961
|
return (u2 || "" !== w2) && m2.push(w2.trim()), m2;
|
|
5930
5962
|
} };
|
|
5931
|
-
var
|
|
5932
|
-
|
|
5933
|
-
let
|
|
5963
|
+
var Ml = xl;
|
|
5964
|
+
xl.default = xl;
|
|
5965
|
+
let Il = Ua, Ol = Ml, El = class extends Il {
|
|
5934
5966
|
get selectors() {
|
|
5935
|
-
return
|
|
5967
|
+
return Ol.comma(this.selector);
|
|
5936
5968
|
}
|
|
5937
5969
|
set selectors(e2) {
|
|
5938
5970
|
let a2 = this.selector ? this.selector.match(/,\s*/) : null, u2 = a2 ? a2[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -5942,34 +5974,34 @@
|
|
|
5942
5974
|
super(e2), this.type = "rule", this.nodes || (this.nodes = []);
|
|
5943
5975
|
}
|
|
5944
5976
|
};
|
|
5945
|
-
var
|
|
5946
|
-
|
|
5947
|
-
let
|
|
5977
|
+
var Ll = El;
|
|
5978
|
+
El.default = El, Il.registerRule(El);
|
|
5979
|
+
let Rl = Wa, Al = xa, Tl = _a, Nl = wl, Pl = rl, Dl = kl, Jl = Ll;
|
|
5948
5980
|
function Ke(e2, a2) {
|
|
5949
5981
|
if (Array.isArray(e2)) return e2.map((e3) => Ke(e3));
|
|
5950
5982
|
let { inputs: u2, ...m2 } = e2;
|
|
5951
5983
|
if (u2) {
|
|
5952
5984
|
a2 = [];
|
|
5953
5985
|
for (let e3 of u2) {
|
|
5954
|
-
let u3 = { ...e3, __proto__:
|
|
5955
|
-
u3.map && (u3.map = { ...u3.map, __proto__:
|
|
5986
|
+
let u3 = { ...e3, __proto__: Nl.prototype };
|
|
5987
|
+
u3.map && (u3.map = { ...u3.map, __proto__: Pl.prototype }), a2.push(u3);
|
|
5956
5988
|
}
|
|
5957
5989
|
}
|
|
5958
5990
|
if (m2.nodes && (m2.nodes = e2.nodes.map((e3) => Ke(e3, a2))), m2.source) {
|
|
5959
5991
|
let { inputId: e3, ...u3 } = m2.source;
|
|
5960
5992
|
m2.source = u3, null != e3 && (m2.source.input = a2[e3]);
|
|
5961
5993
|
}
|
|
5962
|
-
if ("root" === m2.type) return new
|
|
5963
|
-
if ("decl" === m2.type) return new
|
|
5964
|
-
if ("rule" === m2.type) return new
|
|
5965
|
-
if ("comment" === m2.type) return new
|
|
5966
|
-
if ("atrule" === m2.type) return new
|
|
5994
|
+
if ("root" === m2.type) return new Dl(m2);
|
|
5995
|
+
if ("decl" === m2.type) return new Tl(m2);
|
|
5996
|
+
if ("rule" === m2.type) return new Jl(m2);
|
|
5997
|
+
if ("comment" === m2.type) return new Al(m2);
|
|
5998
|
+
if ("atrule" === m2.type) return new Rl(m2);
|
|
5967
5999
|
throw new Error("Unknown node type: " + e2.type);
|
|
5968
6000
|
}
|
|
5969
|
-
var
|
|
6001
|
+
var ec = Ke;
|
|
5970
6002
|
Ke.default = Ke;
|
|
5971
|
-
let { dirname:
|
|
5972
|
-
var
|
|
6003
|
+
let { dirname: tc, relative: nc, resolve: rc, sep: oc } = ra, { SourceMapConsumer: sc, SourceMapGenerator: ic } = ra, { pathToFileURL: ac } = ra, lc = wl, cc = !(!sc || !ic), uc = !!(tc && rc && nc && oc);
|
|
6004
|
+
var pc = class {
|
|
5973
6005
|
constructor(e2, a2, u2, m2) {
|
|
5974
6006
|
this.stringify = e2, this.mapOpts = u2.map || {}, this.root = a2, this.opts = u2, this.css = m2, this.originalCSS = m2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
|
|
5975
6007
|
}
|
|
@@ -5981,8 +6013,8 @@
|
|
|
5981
6013
|
}
|
|
5982
6014
|
applyPrevMaps() {
|
|
5983
6015
|
for (let e2 of this.previous()) {
|
|
5984
|
-
let a2, u2 = this.toUrl(this.path(e2.file)), m2 = e2.root ||
|
|
5985
|
-
false === this.mapOpts.sourcesContent ? (a2 = new
|
|
6016
|
+
let a2, u2 = this.toUrl(this.path(e2.file)), m2 = e2.root || tc(e2.file);
|
|
6017
|
+
false === this.mapOpts.sourcesContent ? (a2 = new sc(e2.text), a2.sourcesContent && (a2.sourcesContent = null)) : a2 = e2.consumer(), this.map.applySourceMap(a2, u2, this.toUrl(this.path(m2)));
|
|
5986
6018
|
}
|
|
5987
6019
|
}
|
|
5988
6020
|
clearAnnotation() {
|
|
@@ -5992,7 +6024,7 @@
|
|
|
5992
6024
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
5993
6025
|
}
|
|
5994
6026
|
generate() {
|
|
5995
|
-
if (this.clearAnnotation(),
|
|
6027
|
+
if (this.clearAnnotation(), uc && cc && this.isMap()) return this.generateMap();
|
|
5996
6028
|
{
|
|
5997
6029
|
let e2 = "";
|
|
5998
6030
|
return this.stringify(this.root, (a2) => {
|
|
@@ -6004,12 +6036,12 @@
|
|
|
6004
6036
|
if (this.root) this.generateString();
|
|
6005
6037
|
else if (1 === this.previous().length) {
|
|
6006
6038
|
let e2 = this.previous()[0].consumer();
|
|
6007
|
-
e2.file = this.outputFile(), this.map =
|
|
6008
|
-
} else this.map = new
|
|
6039
|
+
e2.file = this.outputFile(), this.map = ic.fromSourceMap(e2, { ignoreInvalidMapping: true });
|
|
6040
|
+
} else this.map = new ic({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
|
|
6009
6041
|
return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
|
|
6010
6042
|
}
|
|
6011
6043
|
generateString() {
|
|
6012
|
-
this.css = "", this.map = new
|
|
6044
|
+
this.css = "", this.map = new ic({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
6013
6045
|
let e2, a2, u2 = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
6014
6046
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
6015
6047
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u2, b2.generated.column = m2 - 1, x2.source && x2.source.start ? (b2.source = this.sourcePath(x2), b2.original.line = x2.source.start.line, b2.original.column = x2.source.start.column - 1, this.map.addMapping(b2)) : (b2.source = w2, b2.original.line = 1, b2.original.column = 0, this.map.addMapping(b2))), a2 = C2.match(/\n/g), a2 ? (u2 += a2.length, e2 = C2.lastIndexOf("\n"), m2 = C2.length - e2) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -6039,9 +6071,9 @@
|
|
|
6039
6071
|
if (this.mapOpts.absolute || 60 === e2.charCodeAt(0) || /^\w+:\/\//.test(e2)) return e2;
|
|
6040
6072
|
let a2 = this.memoizedPaths.get(e2);
|
|
6041
6073
|
if (a2) return a2;
|
|
6042
|
-
let u2 = this.opts.to ?
|
|
6043
|
-
"string" == typeof this.mapOpts.annotation && (u2 =
|
|
6044
|
-
let m2 =
|
|
6074
|
+
let u2 = this.opts.to ? tc(this.opts.to) : ".";
|
|
6075
|
+
"string" == typeof this.mapOpts.annotation && (u2 = tc(rc(u2, this.mapOpts.annotation)));
|
|
6076
|
+
let m2 = nc(u2, e2);
|
|
6045
6077
|
return this.memoizedPaths.set(e2, m2), m2;
|
|
6046
6078
|
}
|
|
6047
6079
|
previous() {
|
|
@@ -6052,7 +6084,7 @@
|
|
|
6052
6084
|
}
|
|
6053
6085
|
});
|
|
6054
6086
|
else {
|
|
6055
|
-
let e2 = new
|
|
6087
|
+
let e2 = new lc(this.originalCSS, this.opts);
|
|
6056
6088
|
e2.map && this.previousMaps.push(e2.map);
|
|
6057
6089
|
}
|
|
6058
6090
|
return this.previousMaps;
|
|
@@ -6083,8 +6115,8 @@
|
|
|
6083
6115
|
toFileUrl(e2) {
|
|
6084
6116
|
let a2 = this.memoizedFileURLs.get(e2);
|
|
6085
6117
|
if (a2) return a2;
|
|
6086
|
-
if (
|
|
6087
|
-
let a3 =
|
|
6118
|
+
if (ac) {
|
|
6119
|
+
let a3 = ac(e2).toString();
|
|
6088
6120
|
return this.memoizedFileURLs.set(e2, a3), a3;
|
|
6089
6121
|
}
|
|
6090
6122
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -6092,13 +6124,13 @@
|
|
|
6092
6124
|
toUrl(e2) {
|
|
6093
6125
|
let a2 = this.memoizedURLs.get(e2);
|
|
6094
6126
|
if (a2) return a2;
|
|
6095
|
-
"\\" ===
|
|
6127
|
+
"\\" === oc && (e2 = e2.replace(/\\/g, "/"));
|
|
6096
6128
|
let u2 = encodeURI(e2).replace(/[#?]/g, encodeURIComponent);
|
|
6097
6129
|
return this.memoizedURLs.set(e2, u2), u2;
|
|
6098
6130
|
}
|
|
6099
6131
|
};
|
|
6100
|
-
const
|
|
6101
|
-
let
|
|
6132
|
+
const dc = /[\t\n\f\r "#'()/;[\\\]{}]/g, hc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, fc = /.[\r\n"'(/\\]/, mc = /[\da-f]/i;
|
|
6133
|
+
let gc = Wa, yc = xa, wc = _a, Sc = kl, bc = Ll, kc = function(e2, a2 = {}) {
|
|
6102
6134
|
let u2, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e2.css.valueOf(), F2 = a2.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
6103
6135
|
function y2(a3) {
|
|
6104
6136
|
throw e2.error("Unclosed " + a3, B2);
|
|
@@ -6148,7 +6180,7 @@
|
|
|
6148
6180
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
6149
6181
|
} while (I2);
|
|
6150
6182
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6151
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
6183
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || fc.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
6152
6184
|
break;
|
|
6153
6185
|
case 39:
|
|
6154
6186
|
case 34:
|
|
@@ -6166,31 +6198,31 @@
|
|
|
6166
6198
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6167
6199
|
break;
|
|
6168
6200
|
case 64:
|
|
6169
|
-
|
|
6201
|
+
dc.lastIndex = B2 + 1, dc.test(D2), b2 = 0 === dc.lastIndex ? D2.length - 1 : dc.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6170
6202
|
break;
|
|
6171
6203
|
case 92:
|
|
6172
6204
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
6173
|
-
if (u2 = D2.charCodeAt(b2 + 1), w2 && 47 !== u2 && 32 !== u2 && 10 !== u2 && 9 !== u2 && 13 !== u2 && 12 !== u2 && (b2 += 1,
|
|
6174
|
-
for (;
|
|
6205
|
+
if (u2 = D2.charCodeAt(b2 + 1), w2 && 47 !== u2 && 32 !== u2 && 10 !== u2 && 9 !== u2 && 13 !== u2 && 12 !== u2 && (b2 += 1, mc.test(D2.charAt(b2)))) {
|
|
6206
|
+
for (; mc.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
6175
6207
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
6176
6208
|
}
|
|
6177
6209
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6178
6210
|
break;
|
|
6179
6211
|
default:
|
|
6180
|
-
47 === u2 && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a3 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
6212
|
+
47 === u2 && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a3 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (hc.lastIndex = B2 + 1, hc.test(D2), b2 = 0 === hc.lastIndex ? D2.length - 1 : hc.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
6181
6213
|
}
|
|
6182
6214
|
return B2++, x2;
|
|
6183
6215
|
}, position: function S() {
|
|
6184
6216
|
return B2;
|
|
6185
6217
|
} };
|
|
6186
6218
|
};
|
|
6187
|
-
const
|
|
6188
|
-
var
|
|
6219
|
+
const vc = { empty: true, space: true };
|
|
6220
|
+
var xc = class {
|
|
6189
6221
|
constructor(e2) {
|
|
6190
|
-
this.input = e2, this.root = new
|
|
6222
|
+
this.input = e2, this.root = new Sc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e2, start: { column: 1, line: 1, offset: 0 } };
|
|
6191
6223
|
}
|
|
6192
6224
|
atrule(e2) {
|
|
6193
|
-
let a2 = new
|
|
6225
|
+
let a2 = new gc();
|
|
6194
6226
|
a2.name = e2[1].slice(1), "" === a2.name && this.unnamedAtrule(a2, e2), this.init(a2, e2[2]);
|
|
6195
6227
|
let u2, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
6196
6228
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -6242,7 +6274,7 @@
|
|
|
6242
6274
|
return false;
|
|
6243
6275
|
}
|
|
6244
6276
|
comment(e2) {
|
|
6245
|
-
let a2 = new
|
|
6277
|
+
let a2 = new yc();
|
|
6246
6278
|
this.init(a2, e2[2]), a2.source.end = this.getPosition(e2[3] || e2[2]), a2.source.end.offset++;
|
|
6247
6279
|
let u2 = e2[1].slice(2, -2);
|
|
6248
6280
|
if (/^\s*$/.test(u2)) a2.text = "", a2.raws.left = u2, a2.raws.right = "";
|
|
@@ -6255,7 +6287,7 @@
|
|
|
6255
6287
|
this.tokenizer = kc(this.input);
|
|
6256
6288
|
}
|
|
6257
6289
|
decl(e2, a2) {
|
|
6258
|
-
let u2 = new
|
|
6290
|
+
let u2 = new wc();
|
|
6259
6291
|
this.init(u2, e2[0][2]);
|
|
6260
6292
|
let m2, w2 = e2[e2.length - 1];
|
|
6261
6293
|
for (";" === w2[0] && (this.semicolon = true, e2.pop()), u2.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e3) {
|
|
@@ -6304,7 +6336,7 @@
|
|
|
6304
6336
|
throw this.input.error("Double colon", { offset: e2[2] }, { offset: e2[2] + e2[1].length });
|
|
6305
6337
|
}
|
|
6306
6338
|
emptyRule(e2) {
|
|
6307
|
-
let a2 = new
|
|
6339
|
+
let a2 = new bc();
|
|
6308
6340
|
this.init(a2, e2[2]), a2.selector = "", a2.raws.between = "", this.current = a2;
|
|
6309
6341
|
}
|
|
6310
6342
|
end(e2) {
|
|
@@ -6380,7 +6412,7 @@
|
|
|
6380
6412
|
}
|
|
6381
6413
|
raw(e2, a2, u2, m2) {
|
|
6382
6414
|
let w2, b2, C2, x2, I2 = u2.length, _2 = "", O2 = true;
|
|
6383
|
-
for (let e3 = 0; e3 < I2; e3 += 1) w2 = u2[e3], b2 = w2[0], "space" !== b2 || e3 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u2[e3 - 1] ? u2[e3 - 1][0] : "empty", C2 = u2[e3 + 1] ? u2[e3 + 1][0] : "empty",
|
|
6415
|
+
for (let e3 = 0; e3 < I2; e3 += 1) w2 = u2[e3], b2 = w2[0], "space" !== b2 || e3 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u2[e3 - 1] ? u2[e3 - 1][0] : "empty", C2 = u2[e3 + 1] ? u2[e3 + 1][0] : "empty", vc[x2] || vc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
6384
6416
|
if (!O2) {
|
|
6385
6417
|
let m3 = u2.reduce((e3, a3) => e3 + a3[1], "");
|
|
6386
6418
|
e2.raws[a2] = { raw: m3, value: _2 };
|
|
@@ -6389,7 +6421,7 @@
|
|
|
6389
6421
|
}
|
|
6390
6422
|
rule(e2) {
|
|
6391
6423
|
e2.pop();
|
|
6392
|
-
let a2 = new
|
|
6424
|
+
let a2 = new bc();
|
|
6393
6425
|
this.init(a2, e2[0][2]), a2.raws.between = this.spacesAndCommentsFromEnd(e2), this.raw(a2, "selector", e2), this.current = a2;
|
|
6394
6426
|
}
|
|
6395
6427
|
spacesAndCommentsFromEnd(e2) {
|
|
@@ -6429,9 +6461,9 @@
|
|
|
6429
6461
|
throw this.input.error("At-rule without name", { offset: a2[2] }, { offset: a2[2] + a2[1].length });
|
|
6430
6462
|
}
|
|
6431
6463
|
};
|
|
6432
|
-
let
|
|
6464
|
+
let Mc = Ua, Ic = wl, _c = xc;
|
|
6433
6465
|
function Gt(e2, a2) {
|
|
6434
|
-
let u2 = new
|
|
6466
|
+
let u2 = new Ic(e2, a2), m2 = new _c(u2);
|
|
6435
6467
|
try {
|
|
6436
6468
|
m2.parse();
|
|
6437
6469
|
} catch (e3) {
|
|
@@ -6439,9 +6471,9 @@
|
|
|
6439
6471
|
}
|
|
6440
6472
|
return m2.root;
|
|
6441
6473
|
}
|
|
6442
|
-
var
|
|
6443
|
-
Gt.default = Gt,
|
|
6444
|
-
let
|
|
6474
|
+
var Oc = Gt;
|
|
6475
|
+
Gt.default = Gt, Mc.registerParse(Gt);
|
|
6476
|
+
let Ec = class {
|
|
6445
6477
|
constructor(e2, a2 = {}) {
|
|
6446
6478
|
if (this.type = "warning", this.text = e2, a2.node && a2.node.source) {
|
|
6447
6479
|
let e3 = a2.node.rangeBy(a2);
|
|
@@ -6453,9 +6485,9 @@
|
|
|
6453
6485
|
return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
|
|
6454
6486
|
}
|
|
6455
6487
|
};
|
|
6456
|
-
var
|
|
6457
|
-
|
|
6458
|
-
let
|
|
6488
|
+
var Lc = Ec;
|
|
6489
|
+
Ec.default = Ec;
|
|
6490
|
+
let Rc = Lc, Ac = class {
|
|
6459
6491
|
get content() {
|
|
6460
6492
|
return this.css;
|
|
6461
6493
|
}
|
|
@@ -6467,26 +6499,26 @@
|
|
|
6467
6499
|
}
|
|
6468
6500
|
warn(e2, a2 = {}) {
|
|
6469
6501
|
a2.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a2.plugin = this.lastPlugin.postcssPlugin);
|
|
6470
|
-
let u2 = new
|
|
6502
|
+
let u2 = new Rc(e2, a2);
|
|
6471
6503
|
return this.messages.push(u2), u2;
|
|
6472
6504
|
}
|
|
6473
6505
|
warnings() {
|
|
6474
6506
|
return this.messages.filter((e2) => "warning" === e2.type);
|
|
6475
6507
|
}
|
|
6476
6508
|
};
|
|
6477
|
-
var
|
|
6478
|
-
|
|
6479
|
-
let
|
|
6509
|
+
var Tc = Ac;
|
|
6510
|
+
Ac.default = Ac;
|
|
6511
|
+
let Nc = {};
|
|
6480
6512
|
var ni = function(e2) {
|
|
6481
|
-
|
|
6513
|
+
Nc[e2] || (Nc[e2] = true, typeof console < "u" && console.warn && console.warn(e2));
|
|
6482
6514
|
};
|
|
6483
|
-
let
|
|
6484
|
-
const
|
|
6515
|
+
let Pc = Ua, Dc = qa, Fc = pc, Uc = Oc, Bc = Tc, $c = kl, Wc = ha, { isClean: zc, my: jc } = fa, Gc = ni;
|
|
6516
|
+
const Vc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, qc = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, Hc = { Once: true, postcssPlugin: true, prepare: true };
|
|
6485
6517
|
function _e(e2) {
|
|
6486
6518
|
return "object" == typeof e2 && "function" == typeof e2.then;
|
|
6487
6519
|
}
|
|
6488
6520
|
function ri(e2) {
|
|
6489
|
-
let a2 = false, u2 =
|
|
6521
|
+
let a2 = false, u2 = Vc[e2.type];
|
|
6490
6522
|
return "decl" === e2.type ? a2 = e2.prop.toLowerCase() : "atrule" === e2.type && (a2 = e2.name.toLowerCase()), a2 && e2.append ? [u2, u2 + "-" + a2, 0, u2 + "Exit", u2 + "Exit-" + a2] : a2 ? [u2, u2 + "-" + a2, u2 + "Exit", u2 + "Exit-" + a2] : e2.append ? [u2, 0, u2 + "Exit"] : [u2, u2 + "Exit"];
|
|
6491
6523
|
}
|
|
6492
6524
|
function br(e2) {
|
|
@@ -6494,9 +6526,9 @@
|
|
|
6494
6526
|
return a2 = "document" === e2.type ? ["Document", 0, "DocumentExit"] : "root" === e2.type ? ["Root", 0, "RootExit"] : ri(e2), { eventIndex: 0, events: a2, iterator: 0, node: e2, visitorIndex: 0, visitors: [] };
|
|
6495
6527
|
}
|
|
6496
6528
|
function Js(e2) {
|
|
6497
|
-
return e2[
|
|
6529
|
+
return e2[zc] = false, e2.nodes && e2.nodes.forEach((e3) => Js(e3)), e2;
|
|
6498
6530
|
}
|
|
6499
|
-
let
|
|
6531
|
+
let Zc = {}, Kc = class oi {
|
|
6500
6532
|
get content() {
|
|
6501
6533
|
return this.stringify().content;
|
|
6502
6534
|
}
|
|
@@ -6523,19 +6555,19 @@
|
|
|
6523
6555
|
}
|
|
6524
6556
|
constructor(e2, a2, u2) {
|
|
6525
6557
|
let m2;
|
|
6526
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a2 || null === a2 || "root" !== a2.type && "document" !== a2.type) if (a2 instanceof oi || a2 instanceof
|
|
6558
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a2 || null === a2 || "root" !== a2.type && "document" !== a2.type) if (a2 instanceof oi || a2 instanceof Bc) m2 = Js(a2.root), a2.map && (typeof u2.map > "u" && (u2.map = {}), u2.map.inline || (u2.map.inline = false), u2.map.prev = a2.map);
|
|
6527
6559
|
else {
|
|
6528
|
-
let e3 =
|
|
6560
|
+
let e3 = Uc;
|
|
6529
6561
|
u2.syntax && (e3 = u2.syntax.parse), u2.parser && (e3 = u2.parser), e3.parse && (e3 = e3.parse);
|
|
6530
6562
|
try {
|
|
6531
6563
|
m2 = e3(a2, u2);
|
|
6532
6564
|
} catch (e4) {
|
|
6533
6565
|
this.processed = true, this.error = e4;
|
|
6534
6566
|
}
|
|
6535
|
-
m2 && !m2[
|
|
6567
|
+
m2 && !m2[jc] && Pc.rebuild(m2);
|
|
6536
6568
|
}
|
|
6537
6569
|
else m2 = Js(a2);
|
|
6538
|
-
this.result = new
|
|
6570
|
+
this.result = new Bc(e2, m2, u2), this.helpers = { ...Zc, postcss: Zc, result: this.result }, this.plugins = this.processor.plugins.map((e3) => "object" == typeof e3 && e3.prepare ? { ...e3, ...e3.prepare(this.result) } : e3);
|
|
6539
6571
|
}
|
|
6540
6572
|
async() {
|
|
6541
6573
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -6569,8 +6601,8 @@
|
|
|
6569
6601
|
this.listeners[a2] || (this.listeners[a2] = []), this.listeners[a2].push([e2, u2]);
|
|
6570
6602
|
};
|
|
6571
6603
|
for (let e2 of this.plugins) if ("object" == typeof e2) for (let a2 in e2) {
|
|
6572
|
-
if (!
|
|
6573
|
-
if (!
|
|
6604
|
+
if (!qc[a2] && /^[A-Z]/.test(a2)) throw new Error(`Unknown event ${a2} in ${e2.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
6605
|
+
if (!Hc[a2]) if ("object" == typeof e2[a2]) for (let u2 in e2[a2]) t(e2, "*" === u2 ? a2 : a2 + "-" + u2.toLowerCase(), e2[a2][u2]);
|
|
6574
6606
|
else "function" == typeof e2[a2] && t(e2, a2, e2[a2]);
|
|
6575
6607
|
}
|
|
6576
6608
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -6587,8 +6619,8 @@
|
|
|
6587
6619
|
}
|
|
6588
6620
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6589
6621
|
let e2 = this.result.root;
|
|
6590
|
-
for (; !e2[
|
|
6591
|
-
e2[
|
|
6622
|
+
for (; !e2[zc]; ) {
|
|
6623
|
+
e2[zc] = true;
|
|
6592
6624
|
let a2 = [br(e2)];
|
|
6593
6625
|
for (; a2.length > 0; ) {
|
|
6594
6626
|
let e3 = this.visitTick(a2);
|
|
@@ -6633,9 +6665,9 @@
|
|
|
6633
6665
|
if (this.error) throw this.error;
|
|
6634
6666
|
if (this.stringified) return this.result;
|
|
6635
6667
|
this.stringified = true, this.sync();
|
|
6636
|
-
let e2 = this.result.opts, a2 =
|
|
6668
|
+
let e2 = this.result.opts, a2 = Wc;
|
|
6637
6669
|
e2.syntax && (a2 = e2.syntax.stringify), e2.stringifier && (a2 = e2.stringifier), a2.stringify && (a2 = a2.stringify);
|
|
6638
|
-
let u2 = new
|
|
6670
|
+
let u2 = new Fc(a2, this.result.root, this.result.opts).generate();
|
|
6639
6671
|
return this.result.css = u2[0], this.result.map = u2[1], this.result;
|
|
6640
6672
|
}
|
|
6641
6673
|
sync() {
|
|
@@ -6647,14 +6679,14 @@
|
|
|
6647
6679
|
}
|
|
6648
6680
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6649
6681
|
let e2 = this.result.root;
|
|
6650
|
-
for (; !e2[
|
|
6682
|
+
for (; !e2[zc]; ) e2[zc] = true, this.walkSync(e2);
|
|
6651
6683
|
if (this.listeners.OnceExit) if ("document" === e2.type) for (let a2 of e2.nodes) this.visitSync(this.listeners.OnceExit, a2);
|
|
6652
6684
|
else this.visitSync(this.listeners.OnceExit, e2);
|
|
6653
6685
|
}
|
|
6654
6686
|
return this.result;
|
|
6655
6687
|
}
|
|
6656
6688
|
then(e2, a2) {
|
|
6657
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
6689
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || Gc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e2, a2);
|
|
6658
6690
|
}
|
|
6659
6691
|
toString() {
|
|
6660
6692
|
return this.css;
|
|
@@ -6686,22 +6718,22 @@
|
|
|
6686
6718
|
}
|
|
6687
6719
|
if (0 !== a2.iterator) {
|
|
6688
6720
|
let m3, w3 = a2.iterator;
|
|
6689
|
-
for (; m3 = u2.nodes[u2.indexes[w3]]; ) if (u2.indexes[w3] += 1, !m3[
|
|
6721
|
+
for (; m3 = u2.nodes[u2.indexes[w3]]; ) if (u2.indexes[w3] += 1, !m3[zc]) return m3[zc] = true, void e2.push(br(m3));
|
|
6690
6722
|
a2.iterator = 0, delete u2.indexes[w3];
|
|
6691
6723
|
}
|
|
6692
6724
|
let w2 = a2.events;
|
|
6693
6725
|
for (; a2.eventIndex < w2.length; ) {
|
|
6694
6726
|
let e3 = w2[a2.eventIndex];
|
|
6695
|
-
if (a2.eventIndex += 1, 0 === e3) return void (u2.nodes && u2.nodes.length && (u2[
|
|
6727
|
+
if (a2.eventIndex += 1, 0 === e3) return void (u2.nodes && u2.nodes.length && (u2[zc] = true, a2.iterator = u2.getIterator()));
|
|
6696
6728
|
if (this.listeners[e3]) return void (a2.visitors = this.listeners[e3]);
|
|
6697
6729
|
}
|
|
6698
6730
|
e2.pop();
|
|
6699
6731
|
}
|
|
6700
6732
|
walkSync(e2) {
|
|
6701
|
-
e2[
|
|
6733
|
+
e2[zc] = true;
|
|
6702
6734
|
let a2 = ri(e2);
|
|
6703
6735
|
for (let u2 of a2) if (0 === u2) e2.nodes && e2.each((e3) => {
|
|
6704
|
-
e3[
|
|
6736
|
+
e3[zc] || this.walkSync(e3);
|
|
6705
6737
|
});
|
|
6706
6738
|
else {
|
|
6707
6739
|
let a3 = this.listeners[u2];
|
|
@@ -6712,14 +6744,14 @@
|
|
|
6712
6744
|
return this.sync().warnings();
|
|
6713
6745
|
}
|
|
6714
6746
|
};
|
|
6715
|
-
|
|
6716
|
-
|
|
6747
|
+
Kc.registerPostcss = (e2) => {
|
|
6748
|
+
Zc = e2;
|
|
6717
6749
|
};
|
|
6718
|
-
var
|
|
6719
|
-
|
|
6720
|
-
let
|
|
6721
|
-
const
|
|
6722
|
-
let
|
|
6750
|
+
var Jc = Kc;
|
|
6751
|
+
Kc.default = Kc, $c.registerLazyResult(Kc), Dc.registerLazyResult(Kc);
|
|
6752
|
+
let Yc = pc, Xc = Oc;
|
|
6753
|
+
const Qc = Tc;
|
|
6754
|
+
let lu = ha, cu = ni, hu = class {
|
|
6723
6755
|
get content() {
|
|
6724
6756
|
return this.result.css;
|
|
6725
6757
|
}
|
|
@@ -6740,7 +6772,7 @@
|
|
|
6740
6772
|
}
|
|
6741
6773
|
get root() {
|
|
6742
6774
|
if (this._root) return this._root;
|
|
6743
|
-
let e2, a2 =
|
|
6775
|
+
let e2, a2 = Xc;
|
|
6744
6776
|
try {
|
|
6745
6777
|
e2 = a2(this._css, this._opts);
|
|
6746
6778
|
} catch (e3) {
|
|
@@ -6754,11 +6786,11 @@
|
|
|
6754
6786
|
}
|
|
6755
6787
|
constructor(e2, a2, u2) {
|
|
6756
6788
|
a2 = a2.toString(), this.stringified = false, this._processor = e2, this._css = a2, this._opts = u2, this._map = void 0;
|
|
6757
|
-
let m2, w2 =
|
|
6758
|
-
this.result = new
|
|
6789
|
+
let m2, w2 = lu;
|
|
6790
|
+
this.result = new Qc(this._processor, m2, this._opts), this.result.css = a2;
|
|
6759
6791
|
let b2 = this;
|
|
6760
6792
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
6761
|
-
let C2 = new
|
|
6793
|
+
let C2 = new Yc(w2, m2, this._opts, a2);
|
|
6762
6794
|
if (C2.isMap()) {
|
|
6763
6795
|
let [e3, a3] = C2.generate();
|
|
6764
6796
|
e3 && (this.result.css = e3), a3 && (this.result.map = a3);
|
|
@@ -6778,7 +6810,7 @@
|
|
|
6778
6810
|
return this.result;
|
|
6779
6811
|
}
|
|
6780
6812
|
then(e2, a2) {
|
|
6781
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
6813
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || cu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e2, a2);
|
|
6782
6814
|
}
|
|
6783
6815
|
toString() {
|
|
6784
6816
|
return this._css;
|
|
@@ -6787,9 +6819,9 @@
|
|
|
6787
6819
|
return [];
|
|
6788
6820
|
}
|
|
6789
6821
|
};
|
|
6790
|
-
var
|
|
6791
|
-
|
|
6792
|
-
let
|
|
6822
|
+
var Cu = hu;
|
|
6823
|
+
hu.default = hu;
|
|
6824
|
+
let ku = qa, xu = Jc, Mu = Cu, _u = kl, Ou = class {
|
|
6793
6825
|
constructor(e2 = []) {
|
|
6794
6826
|
this.version = "8.5.3", this.plugins = this.normalize(e2);
|
|
6795
6827
|
}
|
|
@@ -6805,39 +6837,39 @@
|
|
|
6805
6837
|
return a2;
|
|
6806
6838
|
}
|
|
6807
6839
|
process(e2, a2 = {}) {
|
|
6808
|
-
return this.plugins.length || a2.parser || a2.stringifier || a2.syntax ? new
|
|
6840
|
+
return this.plugins.length || a2.parser || a2.stringifier || a2.syntax ? new xu(this, e2, a2) : new Mu(this, e2, a2);
|
|
6809
6841
|
}
|
|
6810
6842
|
use(e2) {
|
|
6811
6843
|
return this.plugins = this.plugins.concat(this.normalize([e2])), this;
|
|
6812
6844
|
}
|
|
6813
6845
|
};
|
|
6814
|
-
var
|
|
6815
|
-
|
|
6816
|
-
let
|
|
6846
|
+
var Eu = Ou;
|
|
6847
|
+
Ou.default = Ou, _u.registerProcessor(Ou), ku.registerProcessor(Ou);
|
|
6848
|
+
let Lu = Wa, Ru = xa, Au = Ua, Tu = aa, Nu = _a, Pu = qa, Du = ec, Fu = wl, Uu = Jc, $u = Ml, Wu = va, zu = Oc, ju = Eu, Gu = Tc, Vu = kl, qu = Ll, Hu = ha, Zu = Lc;
|
|
6817
6849
|
function T$1(...e2) {
|
|
6818
|
-
return 1 === e2.length && Array.isArray(e2[0]) && (e2 = e2[0]), new
|
|
6850
|
+
return 1 === e2.length && Array.isArray(e2[0]) && (e2 = e2[0]), new ju(e2);
|
|
6819
6851
|
}
|
|
6820
6852
|
T$1.plugin = function(e2, a2) {
|
|
6821
6853
|
let u2, m2 = false;
|
|
6822
6854
|
function n(...u3) {
|
|
6823
6855
|
console && console.warn && !m2 && (m2 = true, console.warn(e2 + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e2 + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
6824
6856
|
let w2 = a2(...u3);
|
|
6825
|
-
return w2.postcssPlugin = e2, w2.postcssVersion = new
|
|
6857
|
+
return w2.postcssPlugin = e2, w2.postcssVersion = new ju().version, w2;
|
|
6826
6858
|
}
|
|
6827
6859
|
return Object.defineProperty(n, "postcss", { get: () => (u2 || (u2 = n()), u2) }), n.process = function(e3, a3, u3) {
|
|
6828
6860
|
return T$1([n(u3)]).process(e3, a3);
|
|
6829
6861
|
}, n;
|
|
6830
|
-
}, T$1.stringify =
|
|
6831
|
-
var
|
|
6862
|
+
}, T$1.stringify = Hu, T$1.parse = zu, T$1.fromJSON = Du, T$1.list = $u, T$1.comment = (e2) => new Ru(e2), T$1.atRule = (e2) => new Lu(e2), T$1.decl = (e2) => new Nu(e2), T$1.rule = (e2) => new qu(e2), T$1.root = (e2) => new Vu(e2), T$1.document = (e2) => new Pu(e2), T$1.CssSyntaxError = Tu, T$1.Declaration = Nu, T$1.Container = Au, T$1.Processor = ju, T$1.Document = Pu, T$1.Comment = Ru, T$1.Warning = Zu, T$1.AtRule = Lu, T$1.Result = Gu, T$1.Input = Fu, T$1.Rule = qu, T$1.Root = Vu, T$1.Node = Wu, Uu.registerPostcss(T$1);
|
|
6863
|
+
var Ku = T$1;
|
|
6832
6864
|
T$1.default = T$1;
|
|
6833
|
-
const
|
|
6834
|
-
var
|
|
6835
|
-
|
|
6865
|
+
const Ju = Su(Ku);
|
|
6866
|
+
var Yu;
|
|
6867
|
+
Ju.stringify, Ju.fromJSON, Ju.plugin, Ju.parse, Ju.list, Ju.document, Ju.comment, Ju.atRule, Ju.rule, Ju.decl, Ju.root, Ju.CssSyntaxError, Ju.Declaration, Ju.Container, Ju.Processor, Ju.Document, Ju.Comment, Ju.Warning, Ju.AtRule, Ju.Result, Ju.Input, Ju.Rule, Ju.Root, Ju.Node, (function(e2) {
|
|
6836
6868
|
e2[e2.NotStarted = 0] = "NotStarted", e2[e2.Running = 1] = "Running", e2[e2.Stopped = 2] = "Stopped";
|
|
6837
|
-
})(
|
|
6838
|
-
const { addCustomEvent:
|
|
6839
|
-
var
|
|
6840
|
-
let
|
|
6869
|
+
})(Yu || (Yu = {}));
|
|
6870
|
+
const { addCustomEvent: Xu } = ae, { addSailfishEvent: Qu } = ae, { freezePage: ep } = ae, { takeFullSnapshot: tp } = ae;
|
|
6871
|
+
var np = Object.defineProperty, y = (e2, a2, u2) => ((e3, a3, u3) => a3 in e3 ? np(e3, a3, { enumerable: true, configurable: true, writable: true, value: u3 }) : e3[a3] = u3)(e2, "symbol" != typeof a2 ? a2 + "" : a2, u2);
|
|
6872
|
+
let rp = class d {
|
|
6841
6873
|
constructor(e2) {
|
|
6842
6874
|
y(this, "fileName"), y(this, "functionName"), y(this, "lineNumber"), y(this, "columnNumber"), this.fileName = e2.fileName || "", this.functionName = e2.functionName || "", this.lineNumber = e2.lineNumber, this.columnNumber = e2.columnNumber;
|
|
6843
6875
|
}
|
|
@@ -6846,8 +6878,8 @@
|
|
|
6846
6878
|
return this.functionName ? `${this.functionName} (${this.fileName}:${e2}:${a2})` : `${this.fileName}:${e2}:${a2}`;
|
|
6847
6879
|
}
|
|
6848
6880
|
};
|
|
6849
|
-
const
|
|
6850
|
-
return e2 ? typeof e2.stacktrace < "u" || typeof e2["opera#sourceloc"] < "u" ? this.parseOpera(e2) : e2.stack && e2.stack.match(
|
|
6881
|
+
const op = /(^|@)\S+:\d+/, sp = /^\s*at .*(\S+:\d+|\(native\))/m, ip = /^(eval@)?(\[native code])?$/, ap = { parse: function(e2) {
|
|
6882
|
+
return e2 ? typeof e2.stacktrace < "u" || typeof e2["opera#sourceloc"] < "u" ? this.parseOpera(e2) : e2.stack && e2.stack.match(sp) ? this.parseV8OrIE(e2) : e2.stack ? this.parseFFOrSafari(e2) : (console.warn("[console-record-plugin]: Failed to parse error object:", e2), []) : [];
|
|
6851
6883
|
}, extractLocation: function(e2) {
|
|
6852
6884
|
if (-1 === e2.indexOf(":")) return [e2];
|
|
6853
6885
|
const a2 = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e2.replace(/[()]/g, ""));
|
|
@@ -6855,23 +6887,23 @@
|
|
|
6855
6887
|
return [a2[1], a2[2] || void 0, a2[3] || void 0];
|
|
6856
6888
|
}, parseV8OrIE: function(e2) {
|
|
6857
6889
|
return e2.stack.split("\n").filter(function(e3) {
|
|
6858
|
-
return !!e3.match(
|
|
6890
|
+
return !!e3.match(sp);
|
|
6859
6891
|
}, this).map(function(e3) {
|
|
6860
6892
|
e3.indexOf("(eval ") > -1 && (e3 = e3.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
|
|
6861
6893
|
let a2 = e3.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
6862
6894
|
const u2 = a2.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
6863
6895
|
a2 = u2 ? a2.replace(u2[0], "") : a2;
|
|
6864
6896
|
const m2 = a2.split(/\s+/).slice(1), w2 = this.extractLocation(u2 ? u2[1] : m2.pop()), b2 = m2.join(" ") || void 0, C2 = ["eval", "<anonymous>"].indexOf(w2[0]) > -1 ? void 0 : w2[0];
|
|
6865
|
-
return new
|
|
6897
|
+
return new rp({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
|
|
6866
6898
|
}, this);
|
|
6867
6899
|
}, parseFFOrSafari: function(e2) {
|
|
6868
6900
|
return e2.stack.split("\n").filter(function(e3) {
|
|
6869
|
-
return !e3.match(
|
|
6901
|
+
return !e3.match(ip);
|
|
6870
6902
|
}, this).map(function(e3) {
|
|
6871
|
-
if (e3.indexOf(" > eval") > -1 && (e3 = e3.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e3.indexOf("@") && -1 === e3.indexOf(":")) return new
|
|
6903
|
+
if (e3.indexOf(" > eval") > -1 && (e3 = e3.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e3.indexOf("@") && -1 === e3.indexOf(":")) return new rp({ functionName: e3 });
|
|
6872
6904
|
{
|
|
6873
6905
|
const a2 = /((.*".+"[^@]*)?[^@]*)(?:@)/, u2 = e3.match(a2), m2 = u2 && u2[1] ? u2[1] : void 0, w2 = this.extractLocation(e3.replace(a2, ""));
|
|
6874
|
-
return new
|
|
6906
|
+
return new rp({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
|
|
6875
6907
|
}
|
|
6876
6908
|
}, this);
|
|
6877
6909
|
}, parseOpera: function(e2) {
|
|
@@ -6880,22 +6912,22 @@
|
|
|
6880
6912
|
const a2 = /Line (\d+).*script (?:in )?(\S+)/i, u2 = e2.message.split("\n"), m2 = [];
|
|
6881
6913
|
for (let e3 = 2, w2 = u2.length; e3 < w2; e3 += 2) {
|
|
6882
6914
|
const w3 = a2.exec(u2[e3]);
|
|
6883
|
-
w3 && m2.push(new
|
|
6915
|
+
w3 && m2.push(new rp({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6884
6916
|
}
|
|
6885
6917
|
return m2;
|
|
6886
6918
|
}, parseOpera10: function(e2) {
|
|
6887
6919
|
const a2 = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u2 = e2.stacktrace.split("\n"), m2 = [];
|
|
6888
6920
|
for (let e3 = 0, w2 = u2.length; e3 < w2; e3 += 2) {
|
|
6889
6921
|
const w3 = a2.exec(u2[e3]);
|
|
6890
|
-
w3 && m2.push(new
|
|
6922
|
+
w3 && m2.push(new rp({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6891
6923
|
}
|
|
6892
6924
|
return m2;
|
|
6893
6925
|
}, parseOpera11: function(e2) {
|
|
6894
6926
|
return e2.stack.split("\n").filter(function(e3) {
|
|
6895
|
-
return !!e3.match(
|
|
6927
|
+
return !!e3.match(op) && !e3.match(/^Error created at/);
|
|
6896
6928
|
}, this).map(function(e3) {
|
|
6897
6929
|
const a2 = e3.split("@"), u2 = this.extractLocation(a2.pop()), m2 = (a2.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
6898
|
-
return new
|
|
6930
|
+
return new rp({ functionName: m2, fileName: u2[0], lineNumber: u2[1], columnNumber: u2[2] });
|
|
6899
6931
|
}, this);
|
|
6900
6932
|
} };
|
|
6901
6933
|
function T(e2) {
|
|
@@ -6952,9 +6984,9 @@
|
|
|
6952
6984
|
return a3 instanceof Node ? a3 instanceof HTMLElement ? a3 ? a3.outerHTML : "" : a3.nodeName : a3 instanceof Error ? a3.stack ? a3.stack + "\nEnd of stack for Error object" : a3.name + ": " + a3.message : a3;
|
|
6953
6985
|
});
|
|
6954
6986
|
}
|
|
6955
|
-
const
|
|
6987
|
+
const lp = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
|
|
6956
6988
|
function R(e2, a2, u2) {
|
|
6957
|
-
const m2 = u2 ? Object.assign({},
|
|
6989
|
+
const m2 = u2 ? Object.assign({}, lp, u2) : lp, w2 = m2.logger;
|
|
6958
6990
|
if (!w2) return () => {
|
|
6959
6991
|
};
|
|
6960
6992
|
let b2;
|
|
@@ -6963,7 +6995,7 @@
|
|
|
6963
6995
|
const I2 = [];
|
|
6964
6996
|
if (m2.level.includes("error")) {
|
|
6965
6997
|
const l = (a3) => {
|
|
6966
|
-
const u3 = a3.message, w3 = a3.error, b3 =
|
|
6998
|
+
const u3 = a3.message, w3 = a3.error, b3 = ap.parse(w3).map((e3) => e3.toString()), C3 = [g(u3, m2.stringifyOptions)];
|
|
6967
6999
|
e2({ level: "error", trace: b3, payload: C3 });
|
|
6968
7000
|
};
|
|
6969
7001
|
a2.addEventListener("error", l), I2.push(() => {
|
|
@@ -6972,7 +7004,7 @@
|
|
|
6972
7004
|
const f = (a3) => {
|
|
6973
7005
|
let u3, w3;
|
|
6974
7006
|
a3.reason instanceof Error ? (u3 = a3.reason, w3 = [g(`Uncaught (in promise) ${u3.name}: ${u3.message}`, m2.stringifyOptions)]) : (u3 = new Error(), w3 = [g("Uncaught (in promise)", m2.stringifyOptions), g(a3.reason, m2.stringifyOptions)]);
|
|
6975
|
-
const b3 =
|
|
7007
|
+
const b3 = ap.parse(u3).map((e3) => e3.toString());
|
|
6976
7008
|
e2({ level: "error", trace: b3, payload: w3 });
|
|
6977
7009
|
};
|
|
6978
7010
|
a2.addEventListener("unhandledrejection", f), I2.push(() => {
|
|
@@ -7000,7 +7032,7 @@
|
|
|
7000
7032
|
if (a4.apply(this, w3), !("assert" === u3 && w3[0] || x2)) {
|
|
7001
7033
|
x2 = true;
|
|
7002
7034
|
try {
|
|
7003
|
-
const a5 =
|
|
7035
|
+
const a5 = ap.parse(new Error()).map((e3) => e3.toString()).splice(1), b3 = ("assert" === u3 ? w3.slice(1) : w3).map((e3) => g(e3, m2.stringifyOptions));
|
|
7004
7036
|
C2++, C2 < m2.lengthThreshold ? e2({ level: u3, trace: a5, payload: b3 }) : C2 === m2.lengthThreshold && e2({ level: "warn", trace: [], payload: [g("The number of log records reached the threshold.")] });
|
|
7005
7037
|
} catch (e3) {
|
|
7006
7038
|
a4("@sailfish-rrweb/rrweb logger error:", e3, ...w3);
|
|
@@ -7012,7 +7044,7 @@
|
|
|
7012
7044
|
};
|
|
7013
7045
|
}
|
|
7014
7046
|
}
|
|
7015
|
-
var
|
|
7047
|
+
var cp = ((e2) => (e2[e2.DomContentLoaded = 0] = "DomContentLoaded", e2[e2.Load = 1] = "Load", e2[e2.FullSnapshot = 2] = "FullSnapshot", e2[e2.IncrementalSnapshot = 3] = "IncrementalSnapshot", e2[e2.Meta = 4] = "Meta", e2[e2.Custom = 5] = "Custom", e2[e2.Plugin = 6] = "Plugin", e2[e2.Device = 24] = "Device", e2[e2.SailfishCustom = 25] = "SailfishCustom", e2))(cp || {});
|
|
7016
7048
|
function suppressConsoleLogsDuringCall(e2) {
|
|
7017
7049
|
const a2 = console.log, u2 = console.warn, m2 = console.error;
|
|
7018
7050
|
console.log = () => {
|
|
@@ -7025,7 +7057,7 @@
|
|
|
7025
7057
|
console.log = a2, console.warn = u2, console.error = m2;
|
|
7026
7058
|
}
|
|
7027
7059
|
}
|
|
7028
|
-
const
|
|
7060
|
+
const up = "zendesk_chat", pp = "Zendesk";
|
|
7029
7061
|
function zE_safe(...e2) {
|
|
7030
7062
|
try {
|
|
7031
7063
|
if ((function hasZendesk() {
|
|
@@ -7064,7 +7096,7 @@
|
|
|
7064
7096
|
function initializeConsolePlugin(e2, a2) {
|
|
7065
7097
|
const { name: u2, observer: m2 } = /* @__PURE__ */ ((e3) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e3 }))(e2);
|
|
7066
7098
|
m2((e3) => {
|
|
7067
|
-
sendEvent({ type:
|
|
7099
|
+
sendEvent({ type: cp.Plugin, timestamp: Date.now(), data: { plugin: u2, payload: e3 }, sessionId: a2, ...getUrlAndStoredUuids() });
|
|
7068
7100
|
}, window, e2);
|
|
7069
7101
|
}
|
|
7070
7102
|
async function initializeRecording(e2, a2, u2, m2) {
|
|
@@ -7084,11 +7116,11 @@
|
|
|
7084
7116
|
zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
|
|
7085
7117
|
});
|
|
7086
7118
|
const handleWidgetOpen = () => {
|
|
7087
|
-
ae.addSailfishEvent(
|
|
7119
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "customer support chat opened", element_id: up, provider: pp });
|
|
7088
7120
|
}, handleWidgetClose = () => {
|
|
7089
|
-
ae.addSailfishEvent(
|
|
7121
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "customer support chat closed", element_id: up, provider: pp });
|
|
7090
7122
|
}, handleUnreadMessages = (e3) => {
|
|
7091
|
-
ae.addSailfishEvent(
|
|
7123
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "zendesk unreadmessages", element_id: up, provider: pp });
|
|
7092
7124
|
};
|
|
7093
7125
|
suppressConsoleLogsDuringCall(() => {
|
|
7094
7126
|
zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
|
|
@@ -7099,8 +7131,8 @@
|
|
|
7099
7131
|
}
|
|
7100
7132
|
return w2;
|
|
7101
7133
|
}
|
|
7102
|
-
let
|
|
7103
|
-
const
|
|
7134
|
+
let dp = null, hp = null;
|
|
7135
|
+
const fp = readDebugFlag(), mp = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], gp = [400, 403], yp = "CORS", wp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, Sp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
|
|
7104
7136
|
function trackDomainChangesOnce() {
|
|
7105
7137
|
const e2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7106
7138
|
if (e2.routeWatcherIntervalId) return;
|
|
@@ -7167,7 +7199,7 @@
|
|
|
7167
7199
|
return true;
|
|
7168
7200
|
}
|
|
7169
7201
|
for (const e3 of D) if (u2.pathname.toLowerCase().endsWith(e3)) return true;
|
|
7170
|
-
return !!matchUrlWithWildcard(e2, [...
|
|
7202
|
+
return !!matchUrlWithWildcard(e2, [...mp, ...a2]);
|
|
7171
7203
|
}
|
|
7172
7204
|
function setupFetchInterceptor(e2 = []) {
|
|
7173
7205
|
const a2 = window.fetch, u2 = getOrSetSessionId();
|
|
@@ -7202,7 +7234,7 @@
|
|
|
7202
7234
|
F2[e4] = a5;
|
|
7203
7235
|
}) : F2 = { ...w3.headers }), D2 = w3.body;
|
|
7204
7236
|
} catch (e4) {
|
|
7205
|
-
|
|
7237
|
+
fp && console.warn("[Sailfish] Failed to capture request data:", e4);
|
|
7206
7238
|
}
|
|
7207
7239
|
delete F2[C];
|
|
7208
7240
|
const U2 = (_a2 = getFuncSpanHeader()) == null ? void 0 : _a2.name;
|
|
@@ -7212,16 +7244,16 @@
|
|
|
7212
7244
|
const I4 = getFuncSpanHeader();
|
|
7213
7245
|
if (u4 instanceof Request) {
|
|
7214
7246
|
const _3 = u4.clone(), O3 = new Headers(_3.headers);
|
|
7215
|
-
O3.set(C, `${w4}/${b4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7247
|
+
O3.set(C, `${w4}/${b4}/${x4}`), I4 && (O3.set(I4.name, I4.value), fp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u4.url, header: I4.name }));
|
|
7216
7248
|
const E3 = new Request(_3, { headers: O3 });
|
|
7217
7249
|
return await e4.call(a5, E3, m4);
|
|
7218
7250
|
}
|
|
7219
7251
|
{
|
|
7220
7252
|
const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
|
|
7221
|
-
return O3.set(C, `${w4}/${b4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7253
|
+
return O3.set(C, `${w4}/${b4}/${x4}`), I4 && (O3.set(I4.name, I4.value), fp && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof u4 ? u4 : u4.href, header: I4.name })), _3.headers = O3, await e4.call(a5, u4, _3);
|
|
7222
7254
|
}
|
|
7223
7255
|
})(e3, a4, m3, w3, b3, _2.page_visit_uuid, I3), B2 = false;
|
|
7224
|
-
|
|
7256
|
+
gp.includes(U3.status) && (fp && console.log("Perform retry as status was fail:", U3), I3 = v4(), U3 = await (async function retryWithoutPropagateHeaders(e4, a5, u4, m4) {
|
|
7225
7257
|
try {
|
|
7226
7258
|
let m5 = u4[0], w4 = u4[1] || {};
|
|
7227
7259
|
if ("string" == typeof m5 || m5 instanceof URL) {
|
|
@@ -7237,7 +7269,7 @@
|
|
|
7237
7269
|
}
|
|
7238
7270
|
return e4.apply(a5, u4);
|
|
7239
7271
|
} catch (e5) {
|
|
7240
|
-
throw
|
|
7272
|
+
throw fp && console.log(`Retry without ${C} for ${m4} also failed:`, e5), e5;
|
|
7241
7273
|
}
|
|
7242
7274
|
})(e3, a4, u3, x3), B2 = true);
|
|
7243
7275
|
const $2 = Date.now(), z2 = U3.status, j2 = U3.ok, V2 = j2 ? "" : `Request Error: ${U3.statusText}`;
|
|
@@ -7246,7 +7278,7 @@
|
|
|
7246
7278
|
const e4 = U3.clone();
|
|
7247
7279
|
q2 = await e4.text();
|
|
7248
7280
|
} catch (e4) {
|
|
7249
|
-
|
|
7281
|
+
fp && console.warn("[Sailfish] Failed to capture response data:", e4), q2 = null;
|
|
7250
7282
|
}
|
|
7251
7283
|
let H2 = null;
|
|
7252
7284
|
try {
|
|
@@ -7254,12 +7286,12 @@
|
|
|
7254
7286
|
H2[a5] = e4;
|
|
7255
7287
|
});
|
|
7256
7288
|
} catch (e4) {
|
|
7257
|
-
|
|
7289
|
+
fp && console.warn("[Sailfish] Failed to capture response headers:", e4), H2 = null;
|
|
7258
7290
|
}
|
|
7259
7291
|
return sendEvent({ type: 27, timestamp: $2, sessionId: b3, data: { request_id: I3, session_id: b3, timestamp_start: E2, timestamp_end: $2, response_code: z2, success: j2, error: V2, method: O2, url: x3, retry_without_trace_id: B2, request_headers: F2, request_body: D2, response_headers: H2, response_body: q2 }, ..._2 }), U3;
|
|
7260
7292
|
} catch (m4) {
|
|
7261
7293
|
const w4 = Date.now(), C2 = false, U3 = ((_b = m4.response) == null ? void 0 : _b.status) || 500, B2 = m4.message || "Fetch request failed";
|
|
7262
|
-
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(
|
|
7294
|
+
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(yp.toLowerCase()))) return e3.apply(a4, u3);
|
|
7263
7295
|
throw sendEvent({ type: 27, timestamp: w4, sessionId: b3, data: { request_id: I3, session_id: b3, timestamp_start: E2, timestamp_end: w4, response_code: U3, success: C2, error: B2, method: O2, url: x3, request_headers: F2, request_body: D2, response_body: null }, ..._2 }), m4;
|
|
7264
7296
|
}
|
|
7265
7297
|
})(a3, m2, w2, x2, I2, u2, b2);
|
|
@@ -7293,7 +7325,7 @@
|
|
|
7293
7325
|
})(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7294
7326
|
if (U2.sessionId = F2, U2.apiKey = e2, U2.backendApi = a2, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7295
7327
|
else {
|
|
7296
|
-
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(
|
|
7328
|
+
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(Sp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
|
|
7297
7329
|
window.addEventListener("error", (e3) => {
|
|
7298
7330
|
captureError(e3.error || e3.message);
|
|
7299
7331
|
}), window.addEventListener("unhandledrejection", (e3) => {
|
|
@@ -7301,7 +7333,7 @@
|
|
|
7301
7333
|
});
|
|
7302
7334
|
})(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e3, backendApi: a3 }) {
|
|
7303
7335
|
Q && (sessionStorage.setItem("sailfishApiKey", e3), sessionStorage.setItem("sailfishBackendApi", a3));
|
|
7304
|
-
})({ apiKey: e2, backendApi: a2 }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e2, [...m2, ...
|
|
7336
|
+
})({ apiKey: e2, backendApi: a2 }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e2, [...m2, ...mp], a2).catch((e3) => console.error("Failed to send domains to not propagate header to:", e3)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e3 = []) {
|
|
7305
7337
|
const a3 = XMLHttpRequest.prototype.open, u3 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
|
|
7306
7338
|
XMLHttpRequest.prototype.setRequestHeader = function(e4, a4) {
|
|
7307
7339
|
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e4] = a4, m3.call(this, e4, a4);
|
|
@@ -7319,9 +7351,9 @@
|
|
|
7319
7351
|
}
|
|
7320
7352
|
const _3 = getFuncSpanHeader();
|
|
7321
7353
|
if (_3) try {
|
|
7322
|
-
this.setRequestHeader(_3.name, _3.value),
|
|
7354
|
+
this.setRequestHeader(_3.name, _3.value), fp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
|
|
7323
7355
|
} catch (e4) {
|
|
7324
|
-
|
|
7356
|
+
fp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e4);
|
|
7325
7357
|
}
|
|
7326
7358
|
const O3 = Date.now();
|
|
7327
7359
|
let E3 = false;
|
|
@@ -7349,7 +7381,7 @@
|
|
|
7349
7381
|
2 === a6.length && (u4[a6[0]] = a6[1]);
|
|
7350
7382
|
});
|
|
7351
7383
|
} catch (e5) {
|
|
7352
|
-
|
|
7384
|
+
fp && console.warn("[Sailfish] Failed to capture XHR response headers:", e5), u4 = null;
|
|
7353
7385
|
}
|
|
7354
7386
|
if (e4 >= 200 && e4 < 300) emitFinished(true, e4, "", a5, u4);
|
|
7355
7387
|
else {
|
|
@@ -7365,7 +7397,7 @@
|
|
|
7365
7397
|
sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
|
|
7366
7398
|
})();
|
|
7367
7399
|
try {
|
|
7368
|
-
const u3 = await fetchCaptureSettings(e2, a2), m3 = ((_a2 = u3.data) == null ? void 0 : _a2.captureSettingsFromApiKey) ||
|
|
7400
|
+
const u3 = await fetchCaptureSettings(e2, a2), m3 = ((_a2 = u3.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || wp;
|
|
7369
7401
|
if (U2.ws && 1 === U2.ws.readyState) return;
|
|
7370
7402
|
const C2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e2, F2, a2, O2, E2, D2, _2, "JS/TS", C2);
|
|
7371
7403
|
if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
@@ -7401,7 +7433,7 @@
|
|
|
7401
7433
|
const e2 = document.visibilityState, a2 = Date.now();
|
|
7402
7434
|
"visible" === e2 && getOrSetSessionId();
|
|
7403
7435
|
try {
|
|
7404
|
-
sendMessage({ type: "visibilityChange", data: { state: e2, url: window.location.href.split("?")[0], timestamp: a2, ...getUrlAndStoredUuids() } }),
|
|
7436
|
+
sendMessage({ type: "visibilityChange", data: { state: e2, url: window.location.href.split("?")[0], timestamp: a2, ...getUrlAndStoredUuids() } }), fp && console.log(`[Sailfish] Tab became ${e2}, sent visibility change event`);
|
|
7405
7437
|
} catch (e3) {
|
|
7406
7438
|
console.warn("[Sailfish] Failed to send visibility change event:", e3);
|
|
7407
7439
|
}
|
|
@@ -7409,12 +7441,12 @@
|
|
|
7409
7441
|
}), J && window.addEventListener("beforeunload", () => {
|
|
7410
7442
|
clearPageVisitDataFromSessionStorage();
|
|
7411
7443
|
});
|
|
7412
|
-
e.DEFAULT_CAPTURE_SETTINGS =
|
|
7444
|
+
e.DEFAULT_CAPTURE_SETTINGS = wp, e.DEFAULT_CONSOLE_RECORDING_SETTINGS = Sp, e.STORAGE_VERSION = 1, e.addOrUpdateMetadata = function addOrUpdateMetadata(e2) {
|
|
7413
7445
|
const a2 = { type: "addOrUpdateMetadata", metadata: e2 };
|
|
7414
|
-
|
|
7446
|
+
hp && JSON.stringify(hp) === JSON.stringify(e2) || (hp = e2, sendMessage(a2));
|
|
7415
7447
|
}, e.buildBatches = buildBatches, e.createTriageFromRecorder = createTriageFromRecorder, e.disableFunctionSpanTracking = disableFunctionSpanTracking, e.enableFunctionSpanTracking = enableFunctionSpanTracking, e.eventSize = eventSize, e.fetchCaptureSettings = fetchCaptureSettings, e.flushBufferedEvents = flushBufferedEvents, e.getFuncSpanHeader = getFuncSpanHeader, e.getUrlAndStoredUuids = getUrlAndStoredUuids, e.identify = function identify(e2, a2 = {}, u2 = false) {
|
|
7416
7448
|
const m2 = { type: "identify", userId: e2, traits: a2 };
|
|
7417
|
-
|
|
7449
|
+
dp && dp.userId === e2 && JSON.stringify(dp.traits) === JSON.stringify(a2) || (dp = { userId: e2, traits: a2, overwrite: u2 }, sendMessage(m2));
|
|
7418
7450
|
}, e.initRecorder = async (e2) => {
|
|
7419
7451
|
if ("undefined" == typeof window) return;
|
|
7420
7452
|
const a2 = window.__sailfish_recorder || (window.__sailfish_recorder = {}), u2 = getOrSetSessionId();
|
|
@@ -7424,7 +7456,7 @@
|
|
|
7424
7456
|
delete a2.initPromise;
|
|
7425
7457
|
})), a2.initPromise);
|
|
7426
7458
|
}, e.initializeConsolePlugin = initializeConsolePlugin, e.initializeDomContentEvents = initializeDomContentEvents, e.initializeRecording = initializeRecording, e.initializeWebSocket = initializeWebSocket, e.isFunctionSpanTrackingEnabled = isFunctionSpanTrackingEnabled, e.matchUrlWithWildcard = matchUrlWithWildcard, e.openReportIssueModal = function openReportIssueModal() {
|
|
7427
|
-
|
|
7459
|
+
ut ? stopRecording() : (injectModalHTML(), st && document.body.appendChild(st));
|
|
7428
7460
|
}, e.sendDomainsToNotPropagateHeaderTo = sendDomainsToNotPropagateHeaderTo, e.sendEvent = sendEvent, e.sendGraphQLRequest = sendGraphQLRequest, e.sendMessage = sendMessage, e.startRecording = startRecording, e.startRecordingSession = startRecordingSession, e.trackingEvent = function trackingEvent(a2) {
|
|
7429
7461
|
sendMessage({ type: "trackingEvent", trackingData: a2, timestamp: e.nowTimestamp() });
|
|
7430
7462
|
}, e.withAppUrlMetadata = withAppUrlMetadata, Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
|