@sailfish-ai/recorder 1.8.10 → 1.8.12-alpha-2
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/graphql.js +7 -0
- package/dist/index.js +35 -5
- package/dist/recorder.cjs +831 -783
- package/dist/recorder.js +839 -786
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +831 -783
- package/dist/recording.js +2 -2
- package/dist/session.js +42 -5
- package/dist/types/graphql.d.ts +2 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/recording.d.ts +1 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types/websocket.d.ts +11 -1
- package/dist/websocket.js +154 -70
- package/package.json +2 -2
package/dist/recorder.cjs
CHANGED
|
@@ -327,9 +327,23 @@ async function deleteNotifyMessageById(e) {
|
|
|
327
327
|
a.delete(e);
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
const H = "undefined" != typeof globalThis && void 0 !== globalThis.window, J = "undefined" != typeof globalThis && void 0 !== globalThis.document, Y = "undefined" != typeof globalThis && "localStorage" in globalThis, X = "undefined" != typeof globalThis && "sessionStorage" in globalThis;
|
|
330
|
+
const H = "undefined" != typeof globalThis && void 0 !== globalThis.window, J = "undefined" != typeof globalThis && void 0 !== globalThis.document, Y = "undefined" != typeof globalThis && "localStorage" in globalThis, X = "undefined" != typeof globalThis && "sessionStorage" in globalThis, Q = "sailfishSessionId", ee = "__sailfish_refresh__";
|
|
331
|
+
let te = null;
|
|
331
332
|
function getOrSetSessionId() {
|
|
332
|
-
|
|
333
|
+
if (!H) return v4();
|
|
334
|
+
if (te) return te;
|
|
335
|
+
const e = window.name.startsWith(ee);
|
|
336
|
+
if (e && (window.name = window.name.substring(20)), e) {
|
|
337
|
+
const e2 = window.sessionStorage.getItem(Q);
|
|
338
|
+
if (e2) return te = e2, e2;
|
|
339
|
+
}
|
|
340
|
+
const a = v4();
|
|
341
|
+
te = a;
|
|
342
|
+
try {
|
|
343
|
+
window.sessionStorage.setItem(Q, a);
|
|
344
|
+
} catch (e2) {
|
|
345
|
+
}
|
|
346
|
+
return a;
|
|
333
347
|
}
|
|
334
348
|
function buildBatches(e, a, u) {
|
|
335
349
|
const m2 = {};
|
|
@@ -356,27 +370,32 @@ function withAppUrlMetadata(e) {
|
|
|
356
370
|
var _a2;
|
|
357
371
|
return { ...e ?? {}, appUrl: (e == null ? void 0 : e.appUrl) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
358
372
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
373
|
+
H && window.addEventListener("beforeunload", () => {
|
|
374
|
+
window.name = ee + window.name;
|
|
375
|
+
}), exports.nowTimestamp = Date.now, /[1-9][0-9]{12}/.test(Date.now().toString()) || (exports.nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime());
|
|
376
|
+
const ne = readDebugFlag(), re = "per_session";
|
|
377
|
+
let oe = null, se = false, ie = null, le = null, ce = false, pe = null, de = null, he = false;
|
|
378
|
+
const me = "sailfish_funcspan_global_state";
|
|
362
379
|
function saveGlobalFuncSpanState(e, a) {
|
|
363
380
|
try {
|
|
364
381
|
if ("undefined" == typeof localStorage) return;
|
|
365
|
-
const u = { enabled: e, expirationTimestampMs: a };
|
|
366
|
-
localStorage.setItem(
|
|
382
|
+
const u = { enabled: e, expirationTimestampMs: a, savedAt: Date.now() };
|
|
383
|
+
localStorage.setItem(me, JSON.stringify(u)), ne && console.log("[Sailfish] Saved funcSpan state to localStorage:", u);
|
|
367
384
|
} catch (e2) {
|
|
368
|
-
|
|
385
|
+
ne && console.warn("[Sailfish] Failed to save funcSpan state to localStorage:", e2);
|
|
369
386
|
}
|
|
370
387
|
}
|
|
371
388
|
function clearGlobalFuncSpanState() {
|
|
372
389
|
try {
|
|
373
390
|
if ("undefined" == typeof localStorage) return;
|
|
374
|
-
localStorage.removeItem(
|
|
391
|
+
localStorage.removeItem(me), ne && console.log("[Sailfish] Cleared funcSpan state from localStorage");
|
|
375
392
|
} catch (e) {
|
|
376
|
-
|
|
393
|
+
ne && console.warn("[Sailfish] Failed to clear funcSpan state from localStorage:", e);
|
|
377
394
|
}
|
|
378
395
|
}
|
|
379
|
-
|
|
396
|
+
function clearStaleFuncSpanState() {
|
|
397
|
+
ce = false, de = null, he = false, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
|
|
398
|
+
}
|
|
380
399
|
function isWebSocketOpen(e) {
|
|
381
400
|
return (e == null ? void 0 : e.readyState) === WebSocket.OPEN;
|
|
382
401
|
}
|
|
@@ -387,15 +406,15 @@ async function flushNotifyQueue() {
|
|
|
387
406
|
u.onsuccess = () => a(u.result), u.onerror = () => a([]);
|
|
388
407
|
})) ?? [];
|
|
389
408
|
})();
|
|
390
|
-
if (isWebSocketOpen(
|
|
391
|
-
for (const a of e)
|
|
409
|
+
if (isWebSocketOpen(oe)) try {
|
|
410
|
+
for (const a of e) oe.send(a.value), await deleteNotifyMessageById(a.id);
|
|
392
411
|
} catch (e2) {
|
|
393
412
|
}
|
|
394
413
|
}
|
|
395
414
|
async function flushBufferedEvents() {
|
|
396
|
-
if (isWebSocketOpen(
|
|
415
|
+
if (isWebSocketOpen(oe)) if (ie) await ie;
|
|
397
416
|
else {
|
|
398
|
-
|
|
417
|
+
ie = (async () => {
|
|
399
418
|
var _a2, _b;
|
|
400
419
|
const e = await (async function getAllIndexedEvents() {
|
|
401
420
|
return await withStore$1("readonly", (e2) => new Promise((a2) => {
|
|
@@ -410,119 +429,138 @@ async function flushBufferedEvents() {
|
|
|
410
429
|
for (const e2 of Object.values(a)) {
|
|
411
430
|
const a2 = buildBatches(e2, (e3) => eventSize(e3.data), 52428800);
|
|
412
431
|
for (const e3 of a2) {
|
|
413
|
-
if (!isWebSocketOpen(
|
|
432
|
+
if (!isWebSocketOpen(oe)) break;
|
|
414
433
|
const a3 = e3.map((e4) => {
|
|
415
434
|
var _a3, _b2;
|
|
416
435
|
return { ...e4.data, appUrl: ((_a3 = e4.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
|
|
417
436
|
}), u = e3.map((e4) => e4.id).filter((e4) => null != e4);
|
|
418
437
|
try {
|
|
419
438
|
const e4 = JSON.stringify({ type: "events", events: a3, mapUuid: window.sfMapUuid });
|
|
420
|
-
|
|
439
|
+
oe.send(e4), await deleteEventsByIds(u);
|
|
421
440
|
} catch (e4) {
|
|
422
441
|
}
|
|
423
442
|
}
|
|
424
443
|
}
|
|
425
444
|
})();
|
|
426
445
|
try {
|
|
427
|
-
await
|
|
446
|
+
await ie;
|
|
428
447
|
} finally {
|
|
429
|
-
|
|
448
|
+
ie = null;
|
|
430
449
|
}
|
|
431
450
|
}
|
|
432
451
|
}
|
|
433
452
|
function sendEvent(e) {
|
|
434
453
|
var _a2;
|
|
435
454
|
const a = { ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
436
|
-
if (
|
|
455
|
+
if (se || !isWebSocketOpen(oe)) return void saveEventToIDB(a);
|
|
437
456
|
const u = JSON.stringify({ type: "event", event: a, mapUuid: window.sfMapUuid });
|
|
438
457
|
try {
|
|
439
|
-
|
|
458
|
+
oe.send(u);
|
|
440
459
|
} catch (e2) {
|
|
441
460
|
saveEventToIDB(a);
|
|
442
461
|
}
|
|
443
462
|
}
|
|
444
|
-
function initializeWebSocket(e, a, u) {
|
|
445
|
-
const
|
|
463
|
+
function initializeWebSocket(e, a, u, m2) {
|
|
464
|
+
const w2 = (function getWebSocketHost(e2) {
|
|
446
465
|
const a2 = document.createElement("a");
|
|
447
466
|
return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
|
|
448
|
-
})(e)
|
|
449
|
-
|
|
450
|
-
|
|
467
|
+
})(e);
|
|
468
|
+
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.12-alpha-2`;
|
|
469
|
+
m2 && (b2 += `&envValue=${encodeURIComponent(m2)}`);
|
|
470
|
+
return oe = new $(b2, [], { connectionTimeout: 3e4 }), oe.addEventListener("open", () => {
|
|
471
|
+
ne && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (ce ? "ENABLED" : "DISABLED"))), (async () => {
|
|
451
472
|
try {
|
|
452
|
-
|
|
473
|
+
se = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
453
474
|
} finally {
|
|
454
|
-
|
|
475
|
+
se = false;
|
|
455
476
|
}
|
|
456
|
-
null !=
|
|
477
|
+
null != le && clearInterval(le), le = window.setInterval(() => {
|
|
457
478
|
flushBufferedEvents();
|
|
458
479
|
}, 2e3);
|
|
459
480
|
})();
|
|
460
|
-
}),
|
|
461
|
-
|
|
462
|
-
}),
|
|
481
|
+
}), oe.addEventListener("close", () => {
|
|
482
|
+
ne && console.log("[Sailfish] WebSocket closed");
|
|
483
|
+
}), oe.addEventListener("message", (e2) => {
|
|
463
484
|
try {
|
|
464
485
|
const a2 = JSON.parse(e2.data);
|
|
465
|
-
if ("funcSpanTrackingControl" === a2.type) if (
|
|
486
|
+
if ("funcSpanTrackingControl" === a2.type) if (ne && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !== pe && (window.clearTimeout(pe), pe = null), ce = a2.enabled, he = false, ne && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
|
|
466
487
|
if (a2.expirationTimestampMs) {
|
|
467
|
-
|
|
468
|
-
const e3 = Date.now(), u2 =
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
488
|
+
de = a2.expirationTimestampMs;
|
|
489
|
+
const e3 = Date.now(), u2 = de - e3;
|
|
490
|
+
ne && console.log(`[Sailfish] Server expiration timestamp: ${de}, ms until expiration: ${u2}`), u2 > 0 ? (saveGlobalFuncSpanState(true, de), pe = window.setTimeout(() => {
|
|
491
|
+
if (!he) {
|
|
492
|
+
ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time");
|
|
493
|
+
try {
|
|
494
|
+
isWebSocketOpen(oe) && (oe.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), ne && console.log("[Sailfish] Notified backend that function span tracking expired"));
|
|
495
|
+
} catch (e4) {
|
|
496
|
+
ne && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}, u2)) : (ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
472
500
|
} else {
|
|
473
501
|
const e3 = a2.timeoutSeconds || 3600;
|
|
474
|
-
e3 > 0 && (
|
|
475
|
-
|
|
502
|
+
e3 > 0 && (de = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, de), pe = window.setTimeout(() => {
|
|
503
|
+
if (!he) {
|
|
504
|
+
ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`);
|
|
505
|
+
try {
|
|
506
|
+
isWebSocketOpen(oe) && (oe.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), ne && console.log("[Sailfish] Notified backend that function span tracking expired (legacy timeout)"));
|
|
507
|
+
} catch (e4) {
|
|
508
|
+
ne && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
476
511
|
}, 1e3 * e3));
|
|
477
512
|
}
|
|
478
513
|
try {
|
|
479
514
|
const e3 = getOrSetSessionId();
|
|
480
|
-
|
|
515
|
+
oe.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" })), ne && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
|
|
481
516
|
} catch (e3) {
|
|
482
|
-
|
|
517
|
+
ne && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
|
|
483
518
|
}
|
|
484
|
-
} else
|
|
519
|
+
} else de = null, clearGlobalFuncSpanState();
|
|
485
520
|
} catch (e3) {
|
|
486
521
|
}
|
|
487
|
-
}),
|
|
522
|
+
}), oe;
|
|
488
523
|
}
|
|
489
524
|
function sendMessage(e) {
|
|
490
525
|
var _a2;
|
|
491
526
|
"sessionId" in e || (e.sessionId = getOrSetSessionId());
|
|
492
527
|
const a = JSON.stringify({ ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) });
|
|
493
|
-
if (isWebSocketOpen(
|
|
494
|
-
|
|
528
|
+
if (se || !isWebSocketOpen(oe)) saveNotifyMessageToIDB(a);
|
|
529
|
+
else try {
|
|
530
|
+
oe.send(a);
|
|
495
531
|
} catch (e2) {
|
|
496
532
|
saveNotifyMessageToIDB(a);
|
|
497
533
|
}
|
|
498
|
-
else saveNotifyMessageToIDB(a);
|
|
499
534
|
}
|
|
500
535
|
function enableFunctionSpanTracking() {
|
|
501
|
-
if (
|
|
502
|
-
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType:
|
|
503
|
-
|
|
536
|
+
if (ne && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), ce = true, he = true, de = null, null !== pe && (window.clearTimeout(pe), pe = null), isWebSocketOpen(oe)) try {
|
|
537
|
+
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: re };
|
|
538
|
+
oe.send(JSON.stringify(e));
|
|
504
539
|
} catch (e) {
|
|
505
540
|
console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e);
|
|
506
541
|
}
|
|
507
|
-
else
|
|
542
|
+
else ne && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
508
543
|
}
|
|
509
544
|
function disableFunctionSpanTracking() {
|
|
510
|
-
if (
|
|
511
|
-
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType:
|
|
512
|
-
|
|
545
|
+
if (ne && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(oe)) try {
|
|
546
|
+
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: re };
|
|
547
|
+
oe.send(JSON.stringify(e));
|
|
513
548
|
} catch (e) {
|
|
514
549
|
console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e);
|
|
515
550
|
}
|
|
516
551
|
else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
517
|
-
|
|
552
|
+
he && (ce = false, he = false, de = null, ne && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== pe && (window.clearTimeout(pe), pe = null);
|
|
518
553
|
}
|
|
519
554
|
function isFunctionSpanTrackingEnabled() {
|
|
520
|
-
return
|
|
555
|
+
return ce;
|
|
556
|
+
}
|
|
557
|
+
function initializeFunctionSpanTrackingFromApi(e) {
|
|
558
|
+
e && !ce ? (ce = true, he = false, de = null, ne && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e && ce && (ce = false, he = false, de = null, ne && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
|
|
521
559
|
}
|
|
522
560
|
function getFuncSpanHeader() {
|
|
523
|
-
if (!
|
|
524
|
-
if (null !==
|
|
525
|
-
if (Date.now() >=
|
|
561
|
+
if (!ce) return null;
|
|
562
|
+
if (null !== de) {
|
|
563
|
+
if (Date.now() >= de) return ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
526
564
|
}
|
|
527
565
|
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
|
|
528
566
|
}
|
|
@@ -530,34 +568,36 @@ function getFuncSpanHeader() {
|
|
|
530
568
|
const e = (function loadGlobalFuncSpanState() {
|
|
531
569
|
try {
|
|
532
570
|
if ("undefined" == typeof localStorage) return null;
|
|
533
|
-
const e2 = localStorage.getItem(
|
|
571
|
+
const e2 = localStorage.getItem(me);
|
|
534
572
|
if (!e2) return null;
|
|
535
573
|
const a = JSON.parse(e2);
|
|
536
|
-
return
|
|
574
|
+
return ne && console.log("[Sailfish] Loaded funcSpan state from localStorage:", a), a;
|
|
537
575
|
} catch (e2) {
|
|
538
|
-
return
|
|
576
|
+
return ne && console.warn("[Sailfish] Failed to load funcSpan state from localStorage:", e2), null;
|
|
539
577
|
}
|
|
540
578
|
})();
|
|
541
|
-
e && e.enabled
|
|
579
|
+
if (e && e.enabled) if (ce = true, de = e.expirationTimestampMs, he = false, ne && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTime: de }), null !== de) {
|
|
580
|
+
Date.now() >= de ? (ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Module init: Persisted tracking already expired, cleared state")) : ne && console.log("[Sailfish] Module init: Function span tracking is active and valid (temporary until WebSocket confirms)");
|
|
581
|
+
} else ne && console.log("[Sailfish] Module init: Function span tracking is active (no expiration, temporary until WebSocket confirms)");
|
|
542
582
|
})();
|
|
543
|
-
const
|
|
544
|
-
var
|
|
583
|
+
const ge = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
|
|
584
|
+
var ye, we, be = {}, ve = {}, Ce = {}, ke = {};
|
|
545
585
|
function requireBase64() {
|
|
546
|
-
if (
|
|
547
|
-
|
|
586
|
+
if (ye) return ke;
|
|
587
|
+
ye = 1;
|
|
548
588
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
549
|
-
return
|
|
589
|
+
return ke.encode = function(a) {
|
|
550
590
|
if (0 <= a && a < e.length) return e[a];
|
|
551
591
|
throw new TypeError("Must be between 0 and 63: " + a);
|
|
552
|
-
},
|
|
592
|
+
}, ke.decode = function(e2) {
|
|
553
593
|
return 65 <= e2 && e2 <= 90 ? e2 - 65 : 97 <= e2 && e2 <= 122 ? e2 - 97 + 26 : 48 <= e2 && e2 <= 57 ? e2 - 48 + 52 : 43 == e2 ? 62 : 47 == e2 ? 63 : -1;
|
|
554
|
-
},
|
|
594
|
+
}, ke;
|
|
555
595
|
}
|
|
556
596
|
function requireBase64Vlq() {
|
|
557
|
-
if (
|
|
558
|
-
|
|
597
|
+
if (we) return Ce;
|
|
598
|
+
we = 1;
|
|
559
599
|
var e = requireBase64();
|
|
560
|
-
return
|
|
600
|
+
return Ce.encode = function base64VLQ_encode(a) {
|
|
561
601
|
var u, m2 = "", w2 = (function toVLQSigned(e2) {
|
|
562
602
|
return e2 < 0 ? 1 + (-e2 << 1) : 0 + (e2 << 1);
|
|
563
603
|
})(a);
|
|
@@ -565,7 +605,7 @@ function requireBase64Vlq() {
|
|
|
565
605
|
u = 31 & w2, (w2 >>>= 5) > 0 && (u |= 32), m2 += e.encode(u);
|
|
566
606
|
} while (w2 > 0);
|
|
567
607
|
return m2;
|
|
568
|
-
},
|
|
608
|
+
}, Ce.decode = function base64VLQ_decode(a, u, m2) {
|
|
569
609
|
var w2, b2, C2 = a.length, x2 = 0, I2 = 0;
|
|
570
610
|
do {
|
|
571
611
|
if (u >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
@@ -576,11 +616,11 @@ function requireBase64Vlq() {
|
|
|
576
616
|
var a2 = e2 >> 1;
|
|
577
617
|
return 1 & ~e2 ? a2 : -a2;
|
|
578
618
|
})(x2), m2.rest = u;
|
|
579
|
-
},
|
|
619
|
+
}, Ce;
|
|
580
620
|
}
|
|
581
|
-
var
|
|
621
|
+
var xe, Me = {};
|
|
582
622
|
function requireUtil() {
|
|
583
|
-
return
|
|
623
|
+
return xe || (xe = 1, (function(e) {
|
|
584
624
|
e.getArg = function getArg(e2, a2, u2) {
|
|
585
625
|
if (a2 in e2) return e2[a2];
|
|
586
626
|
if (3 === arguments.length) return u2;
|
|
@@ -692,12 +732,12 @@ function requireUtil() {
|
|
|
692
732
|
}
|
|
693
733
|
return m2(a2);
|
|
694
734
|
};
|
|
695
|
-
})(
|
|
735
|
+
})(Me)), Me;
|
|
696
736
|
}
|
|
697
|
-
var
|
|
737
|
+
var Ie, Oe = {};
|
|
698
738
|
function requireArraySet() {
|
|
699
|
-
if (
|
|
700
|
-
|
|
739
|
+
if (Ie) return Oe;
|
|
740
|
+
Ie = 1;
|
|
701
741
|
var e = requireUtil(), a = Object.prototype.hasOwnProperty, u = "undefined" != typeof Map;
|
|
702
742
|
function ArraySet() {
|
|
703
743
|
this._array = [], this._set = u ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -728,12 +768,12 @@ function requireArraySet() {
|
|
|
728
768
|
throw new Error("No element indexed by " + e2);
|
|
729
769
|
}, ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
730
770
|
return this._array.slice();
|
|
731
|
-
},
|
|
771
|
+
}, Oe.ArraySet = ArraySet, Oe;
|
|
732
772
|
}
|
|
733
|
-
var
|
|
773
|
+
var Ee, Le, Ae = {};
|
|
734
774
|
function requireMappingList() {
|
|
735
|
-
if (
|
|
736
|
-
|
|
775
|
+
if (Ee) return Ae;
|
|
776
|
+
Ee = 1;
|
|
737
777
|
var e = requireUtil();
|
|
738
778
|
function MappingList() {
|
|
739
779
|
this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
@@ -747,11 +787,11 @@ function requireMappingList() {
|
|
|
747
787
|
})(this._last, a) ? (this._sorted = false, this._array.push(a)) : (this._last = a, this._array.push(a));
|
|
748
788
|
}, MappingList.prototype.toArray = function MappingList_toArray() {
|
|
749
789
|
return this._sorted || (this._array.sort(e.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
|
|
750
|
-
},
|
|
790
|
+
}, Ae.MappingList = MappingList, Ae;
|
|
751
791
|
}
|
|
752
792
|
function requireSourceMapGenerator() {
|
|
753
|
-
if (
|
|
754
|
-
|
|
793
|
+
if (Le) return ve;
|
|
794
|
+
Le = 1;
|
|
755
795
|
var e = requireBase64Vlq(), a = requireUtil(), u = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
|
|
756
796
|
function SourceMapGenerator(e2) {
|
|
757
797
|
e2 || (e2 = {}), this._file = a.getArg(e2, "file", null), this._sourceRoot = a.getArg(e2, "sourceRoot", null), this._skipValidation = a.getArg(e2, "skipValidation", false), this._ignoreInvalidMapping = a.getArg(e2, "ignoreInvalidMapping", false), this._sources = new u(), this._names = new u(), this._mappings = new m2(), this._sourcesContents = null;
|
|
@@ -828,11 +868,11 @@ function requireSourceMapGenerator() {
|
|
|
828
868
|
return null != this._file && (e2.file = this._file), null != this._sourceRoot && (e2.sourceRoot = this._sourceRoot), this._sourcesContents && (e2.sourcesContent = this._generateSourcesContent(e2.sources, e2.sourceRoot)), e2;
|
|
829
869
|
}, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
830
870
|
return JSON.stringify(this.toJSON());
|
|
831
|
-
},
|
|
871
|
+
}, ve.SourceMapGenerator = SourceMapGenerator, ve;
|
|
832
872
|
}
|
|
833
|
-
var
|
|
873
|
+
var Te, De = {}, Ue = {};
|
|
834
874
|
function requireBinarySearch() {
|
|
835
|
-
return
|
|
875
|
+
return Te || (Te = 1, (function(e) {
|
|
836
876
|
function recursiveSearch(a, u, m2, w2, b2, C2) {
|
|
837
877
|
var x2 = Math.floor((u - a) / 2) + a, I2 = b2(m2, w2[x2], true);
|
|
838
878
|
return 0 === I2 ? x2 : I2 > 0 ? u - x2 > 1 ? recursiveSearch(x2, u, m2, w2, b2, C2) : C2 == e.LEAST_UPPER_BOUND ? u < w2.length ? u : -1 : x2 : x2 - a > 1 ? recursiveSearch(a, x2, m2, w2, b2, C2) : C2 == e.LEAST_UPPER_BOUND ? x2 : a < 0 ? -1 : a;
|
|
@@ -844,11 +884,11 @@ function requireBinarySearch() {
|
|
|
844
884
|
for (; b2 - 1 >= 0 && 0 === m2(u[b2], u[b2 - 1], true); ) --b2;
|
|
845
885
|
return b2;
|
|
846
886
|
};
|
|
847
|
-
})(
|
|
887
|
+
})(Ue)), Ue;
|
|
848
888
|
}
|
|
849
|
-
var
|
|
889
|
+
var Be, je, Ge = {};
|
|
850
890
|
function requireQuickSort() {
|
|
851
|
-
if (
|
|
891
|
+
if (Be) return Ge;
|
|
852
892
|
function SortTemplate(e2) {
|
|
853
893
|
function swap(e3, a, u) {
|
|
854
894
|
var m2 = e3[a];
|
|
@@ -867,21 +907,21 @@ function requireQuickSort() {
|
|
|
867
907
|
}
|
|
868
908
|
};
|
|
869
909
|
}
|
|
870
|
-
|
|
910
|
+
Be = 1;
|
|
871
911
|
let e = /* @__PURE__ */ new WeakMap();
|
|
872
|
-
return
|
|
912
|
+
return Ge.quickSort = function(a, u, m2 = 0) {
|
|
873
913
|
let w2 = e.get(u);
|
|
874
914
|
void 0 === w2 && (w2 = (function cloneSort(e2) {
|
|
875
915
|
let a2 = SortTemplate.toString();
|
|
876
916
|
return new Function(`return ${a2}`)()(e2);
|
|
877
917
|
})(u), e.set(u, w2)), w2(a, u, m2, a.length - 1);
|
|
878
|
-
},
|
|
918
|
+
}, Ge;
|
|
879
919
|
}
|
|
880
|
-
var
|
|
881
|
-
var
|
|
882
|
-
return
|
|
883
|
-
if (
|
|
884
|
-
|
|
920
|
+
var Ve, qe, He = {};
|
|
921
|
+
var Je = (function requireSourceMap() {
|
|
922
|
+
return qe || (qe = 1, be.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, be.SourceMapConsumer = (function requireSourceMapConsumer() {
|
|
923
|
+
if (je) return De;
|
|
924
|
+
je = 1;
|
|
885
925
|
var e = requireUtil(), a = requireBinarySearch(), u = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
|
|
886
926
|
function SourceMapConsumer(a2, u2) {
|
|
887
927
|
var m3 = a2;
|
|
@@ -938,7 +978,7 @@ var He = (function requireSourceMap() {
|
|
|
938
978
|
else for (var _2 = x2.originalColumn; x2 && x2.originalLine === m3 && x2.originalColumn == _2; ) b3.push({ line: e.getArg(x2, "generatedLine", null), column: e.getArg(x2, "generatedColumn", null), lastColumn: e.getArg(x2, "lastGeneratedColumn", null) }), x2 = this._originalMappings[++C2];
|
|
939
979
|
}
|
|
940
980
|
return b3;
|
|
941
|
-
},
|
|
981
|
+
}, De.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a2) {
|
|
942
982
|
var u2, m3 = a2;
|
|
943
983
|
if (null != this.sourceRoot && (m3 = e.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
|
|
944
984
|
for (u2 = 0; u2 < this._absoluteSources.length; ++u2) if (this._absoluteSources[u2] == a2) return u2;
|
|
@@ -1055,7 +1095,7 @@ var He = (function requireSourceMap() {
|
|
|
1055
1095
|
if (b3.source === m3.source) return { line: e.getArg(b3, "generatedLine", null), column: e.getArg(b3, "generatedColumn", null), lastColumn: e.getArg(b3, "lastGeneratedColumn", null) };
|
|
1056
1096
|
}
|
|
1057
1097
|
return { line: null, column: null, lastColumn: null };
|
|
1058
|
-
},
|
|
1098
|
+
}, De.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
|
|
1059
1099
|
for (var e2 = [], a2 = 0; a2 < this._sections.length; a2++) for (var u2 = 0; u2 < this._sections[a2].consumer.sources.length; u2++) e2.push(this._sections[a2].consumer.sources[u2]);
|
|
1060
1100
|
return e2;
|
|
1061
1101
|
} }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u2) {
|
|
@@ -1094,10 +1134,10 @@ var He = (function requireSourceMap() {
|
|
|
1094
1134
|
this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
|
|
1095
1135
|
}
|
|
1096
1136
|
w2(this.__generatedMappings, e.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e.compareByOriginalPositions);
|
|
1097
|
-
},
|
|
1098
|
-
})().SourceMapConsumer,
|
|
1099
|
-
if (
|
|
1100
|
-
|
|
1137
|
+
}, De.IndexedSourceMapConsumer = IndexedSourceMapConsumer, De;
|
|
1138
|
+
})().SourceMapConsumer, be.SourceNode = (function requireSourceNode() {
|
|
1139
|
+
if (Ve) return He;
|
|
1140
|
+
Ve = 1;
|
|
1101
1141
|
var e = requireSourceMapGenerator().SourceMapGenerator, a = requireUtil(), u = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
|
|
1102
1142
|
function SourceNode(e2, a2, u2, w2, b2) {
|
|
1103
1143
|
this.children = [], this.sourceContents = {}, this.line = null == e2 ? null : e2, this.column = null == a2 ? null : a2, this.source = null == u2 ? null : u2, this.name = null == b2 ? null : b2, this[m2] = true, null != w2 && this.add(w2);
|
|
@@ -1181,20 +1221,20 @@ var He = (function requireSourceMap() {
|
|
|
1181
1221
|
}), this.walkSourceContents(function(e2, a3) {
|
|
1182
1222
|
m3.setSourceContent(e2, a3);
|
|
1183
1223
|
}), { code: u2.code, map: m3 };
|
|
1184
|
-
},
|
|
1185
|
-
})().SourceNode),
|
|
1224
|
+
}, He.SourceNode = SourceNode, He;
|
|
1225
|
+
})().SourceNode), be;
|
|
1186
1226
|
})();
|
|
1187
|
-
const
|
|
1227
|
+
const Ye = /* @__PURE__ */ new Map(), Xe = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
|
|
1188
1228
|
async function getConsumerFor(e, a) {
|
|
1189
1229
|
const u = (e || `/assets/${a}`).split("?")[0], m2 = [`${u}.map`, u.replace(/\.js$/, ".js.map"), `/assets/${a}.map`];
|
|
1190
1230
|
for (const e2 of m2) try {
|
|
1191
|
-
if (
|
|
1231
|
+
if (Ye.has(e2)) return Ye.get(e2);
|
|
1192
1232
|
const a2 = await fetch(e2);
|
|
1193
1233
|
if (!a2.ok) continue;
|
|
1194
1234
|
const u2 = await a2.json();
|
|
1195
1235
|
if (!u2 || !u2.mappings || !u2.sources) continue;
|
|
1196
|
-
const m3 = await new
|
|
1197
|
-
return
|
|
1236
|
+
const m3 = await new Je.SourceMapConsumer(u2);
|
|
1237
|
+
return Ye.set(e2, m3), m3;
|
|
1198
1238
|
} catch {
|
|
1199
1239
|
}
|
|
1200
1240
|
return null;
|
|
@@ -1206,7 +1246,7 @@ async function captureError(e, a = false) {
|
|
|
1206
1246
|
if (!e2) return ["No stack trace available"];
|
|
1207
1247
|
const a2 = Array.isArray(e2) ? e2 : e2.split("\n"), u2 = [];
|
|
1208
1248
|
for (const e3 of a2) {
|
|
1209
|
-
const a3 = e3.match(
|
|
1249
|
+
const a3 = e3.match(Xe);
|
|
1210
1250
|
if (!a3) {
|
|
1211
1251
|
u2.push(e3);
|
|
1212
1252
|
continue;
|
|
@@ -1221,8 +1261,8 @@ async function captureError(e, a = false) {
|
|
|
1221
1261
|
u2.push(`${e3} [No source map found for ${w3}]`);
|
|
1222
1262
|
continue;
|
|
1223
1263
|
}
|
|
1224
|
-
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias:
|
|
1225
|
-
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias:
|
|
1264
|
+
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias: Je.SourceMapConsumer.GREATEST_LOWER_BOUND });
|
|
1265
|
+
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias: Je.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e4++) ;
|
|
1226
1266
|
if (O2.source && null != O2.line) {
|
|
1227
1267
|
const e4 = O2.name || "anonymous";
|
|
1228
1268
|
u2.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e4})`);
|
|
@@ -1232,11 +1272,11 @@ async function captureError(e, a = false) {
|
|
|
1232
1272
|
})(m2), b2 = w2.filter((e2) => !e2.includes("chunk-") && !e2.includes("react-dom")), C2 = b2.length > 0 ? b2 : w2, x2 = Date.now();
|
|
1233
1273
|
sendMessage({ type: "event", event: { type: 6, timestamp: x2, data: { payload: { message: u, stack: m2, trace: C2, filteredStack: b2, userAgent: navigator.userAgent, url: window.location.href, timestamp: x2, level: "error" } } } });
|
|
1234
1274
|
}
|
|
1235
|
-
const Xe = readDebugFlag();
|
|
1236
1275
|
const Qe = readDebugFlag();
|
|
1276
|
+
const et = readDebugFlag();
|
|
1237
1277
|
function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
1238
1278
|
const C2 = `${u.backendApi}/graphql/?apiKey=${u.apiKey}`;
|
|
1239
|
-
return
|
|
1279
|
+
return et && console.log(`Initial GraphQL request for ${e} at ${C2}`), (function exponentialBackoff(e2, a2, u2 = 5, m3 = 2e3, w3 = 2) {
|
|
1240
1280
|
let b3 = 0;
|
|
1241
1281
|
const attemptRequest = async () => {
|
|
1242
1282
|
try {
|
|
@@ -1244,18 +1284,21 @@ function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
|
1244
1284
|
} catch (e3) {
|
|
1245
1285
|
if (b3++, b3 > u2) throw e3;
|
|
1246
1286
|
const C3 = m3 * Math.pow(w3, b3 - 1);
|
|
1247
|
-
return
|
|
1287
|
+
return Qe && console.log(`Attempt ${b3} failed: ${a2}; Retrying in ${C3}ms...`), await new Promise((e4) => setTimeout(e4, C3)), attemptRequest();
|
|
1248
1288
|
}
|
|
1249
1289
|
};
|
|
1250
1290
|
return attemptRequest();
|
|
1251
1291
|
})(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e, query: a, variables: u }) }).then((e2) => {
|
|
1252
|
-
if (
|
|
1292
|
+
if (et && console.log(`Received response with status: ${e2.status}`), !e2.ok) throw new Error(`GraphQL request failed with status ${e2.status}`);
|
|
1253
1293
|
return e2.json();
|
|
1254
1294
|
}), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
|
|
1255
1295
|
}
|
|
1256
1296
|
function fetchCaptureSettings(e, a) {
|
|
1257
1297
|
return sendGraphQLRequest("GetCaptureSettingsFromApiKey", "\n query GetCaptureSettingsFromApiKey($apiKey: String!) {\n captureSettingsFromApiKey(apiKey: $apiKey) {\n recordCanvas\n recordCrossOriginIframes\n collectFonts\n inlineImages\n recordPassword\n recordRealName\n recordCreditCardInfo\n recordSsn\n recordDob\n sampling\n }\n }\n ", { apiKey: e, backendApi: a });
|
|
1258
1298
|
}
|
|
1299
|
+
function fetchFunctionSpanTrackingEnabled(e, a) {
|
|
1300
|
+
return sendGraphQLRequest("GetFunctionSpanTrackingEnabledFromApiKey", "\n query GetFunctionSpanTrackingEnabledFromApiKey($apiKey: String!) {\n isFunctionSpanTrackingEnabledFromApiKey(apiKey: $apiKey)\n }\n ", { apiKey: e, backendApi: a });
|
|
1301
|
+
}
|
|
1259
1302
|
function startRecordingSession(e, a, u, m2, w2, b2, C2, x2, I2) {
|
|
1260
1303
|
return sendGraphQLRequest("StartSession", "mutation StartSession(\n $apiKey: UUID!,\n $recordingSessionId: UUID!,\n $serviceIdentifier: String!,\n $serviceVersion: String,\n $mapUuid: String,\n $gitSha: String,\n $library: String,\n $serviceAdditionalMetadata: JSON,\n $startRecordingFilePath: String,\n $startRecordingLineNumber: Int\n ) {\n startRecordingSession(\n companyApiKey: $apiKey,\n sessionId: $recordingSessionId,\n serviceIdentifier: $serviceIdentifier,\n serviceVersion: $serviceVersion,\n mapUuid: $mapUuid,\n gitSha: $gitSha,\n library: $library,\n serviceAdditionalMetadata: $serviceAdditionalMetadata,\n startRecordingFilePath: $startRecordingFilePath,\n startRecordingLineNumber: $startRecordingLineNumber\n ) {\n id\n }\n }", { apiKey: e, recordingSessionId: a, backendApi: u, serviceIdentifier: m2, serviceVersion: w2, mapUuid: b2, gitSha: C2, library: x2, serviceAdditionalMetadata: I2, startRecordingFilePath: null, startRecordingLineNumber: null });
|
|
1261
1304
|
}
|
|
@@ -1265,9 +1308,9 @@ function sendDomainsToNotPropagateHeaderTo(e, a, u) {
|
|
|
1265
1308
|
function createTriageFromRecorder(e, a, u, m2, w2, b2) {
|
|
1266
1309
|
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: e, recordingSessionId: u, timestampStart: m2, timestampEnd: w2, description: b2, backendApi: a });
|
|
1267
1310
|
}
|
|
1268
|
-
const
|
|
1311
|
+
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: () => {
|
|
1269
1312
|
} };
|
|
1270
|
-
let
|
|
1313
|
+
let st = null, it = { mode: "lookback", description: "" }, at = null, lt = null, ct = null, ut = false;
|
|
1271
1314
|
function getShortcutKeyCmdCtrlLabel() {
|
|
1272
1315
|
return (function isMacPlatform() {
|
|
1273
1316
|
const e = navigator.userAgentData;
|
|
@@ -1280,11 +1323,11 @@ function getShortcutLabelFromContext(e) {
|
|
|
1280
1323
|
return e2.requireCmdCtrl && a.push(getShortcutKeyCmdCtrlLabel()), a.push((function formatShortcutKeyLabel(e3) {
|
|
1281
1324
|
return ({ escape: "esc" }[e3.toLowerCase()] || e3).toUpperCase();
|
|
1282
1325
|
})(e2.key)), a.map((e3) => `<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;">${e3}</span>`).join(e2.requireCmdCtrl ? " + " : "");
|
|
1283
|
-
})(
|
|
1326
|
+
})(ot.shortcuts[e]);
|
|
1284
1327
|
}
|
|
1285
1328
|
function setupIssueReporting(e) {
|
|
1286
|
-
|
|
1287
|
-
const a2 = { ...
|
|
1329
|
+
ot.apiKey = e.apiKey, ot.backendApi = e.backendApi, ot.resolveSessionId = e.getSessionId, e.customBaseUrl && (ot.triageBaseUrl = e.customBaseUrl), ot.shortcuts = (function mergeShortcutsConfig(e2) {
|
|
1330
|
+
const a2 = { ...nt };
|
|
1288
1331
|
if (!e2) return a2;
|
|
1289
1332
|
"boolean" == typeof e2.enabled && (a2.enabled = e2.enabled);
|
|
1290
1333
|
const u = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
|
|
@@ -1294,7 +1337,7 @@ function setupIssueReporting(e) {
|
|
|
1294
1337
|
}
|
|
1295
1338
|
return a2;
|
|
1296
1339
|
})(e.shortcuts);
|
|
1297
|
-
const { shortcuts: a } =
|
|
1340
|
+
const { shortcuts: a } = ot;
|
|
1298
1341
|
window.addEventListener("keydown", (e2) => {
|
|
1299
1342
|
const u = (function isTypingInInput() {
|
|
1300
1343
|
const e3 = document.activeElement;
|
|
@@ -1304,20 +1347,20 @@ function setupIssueReporting(e) {
|
|
|
1304
1347
|
} : injectModalHTML;
|
|
1305
1348
|
if (C2 && shortcutUsed("openModalExistingMode")) return e2.preventDefault(), void x2("lookback");
|
|
1306
1349
|
if (C2 && shortcutUsed("openModalCaptureNewMode")) return e2.preventDefault(), void x2("startnow");
|
|
1307
|
-
if (b2 && !
|
|
1350
|
+
if (b2 && !ut && shortcutUsed("closeModal")) return e2.preventDefault(), void closeModal();
|
|
1308
1351
|
if (b2 && shortcutUsed("submitReport")) {
|
|
1309
1352
|
const a2 = document.getElementById("sf-issue-submit-btn");
|
|
1310
1353
|
return void (a2 && !a2.disabled && (e2.preventDefault(), a2.click()));
|
|
1311
1354
|
}
|
|
1312
|
-
if (
|
|
1313
|
-
if (b2 && "startnow" ===
|
|
1355
|
+
if (ut && m2 === a.stopRecording.key && w2 === a.stopRecording.requireCmdCtrl) return e2.preventDefault(), void stopRecording();
|
|
1356
|
+
if (b2 && "startnow" === it.mode && m2 === a.startRecording.key && w2 === a.startRecording.requireCmdCtrl && !u) {
|
|
1314
1357
|
const a2 = document.getElementById("sf-start-recording-btn");
|
|
1315
1358
|
return void (a2 && (e2.preventDefault(), a2.click()));
|
|
1316
1359
|
}
|
|
1317
1360
|
});
|
|
1318
1361
|
}
|
|
1319
1362
|
function closeModal() {
|
|
1320
|
-
|
|
1363
|
+
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);
|
|
1321
1364
|
}
|
|
1322
1365
|
function activateModalIsolation(e) {
|
|
1323
1366
|
e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1");
|
|
@@ -1376,9 +1419,9 @@ function activateModalIsolation(e) {
|
|
|
1376
1419
|
};
|
|
1377
1420
|
}
|
|
1378
1421
|
function injectModalHTML(e = "lookback") {
|
|
1379
|
-
|
|
1422
|
+
st && (st.remove(), st = null), st = document.createElement("div"), st.id = "sf-report-issue-modal";
|
|
1380
1423
|
const a = "startnow" === e;
|
|
1381
|
-
|
|
1424
|
+
st.innerHTML = `
|
|
1382
1425
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1383
1426
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1384
1427
|
background:#fff; padding:24px; border-radius:12px;
|
|
@@ -1426,7 +1469,7 @@ function injectModalHTML(e = "lookback") {
|
|
|
1426
1469
|
<textarea id="sf-issue-description" placeholder="Add description here"
|
|
1427
1470
|
style="width:100%; height:80px; padding:8px 12px; font-size:14px;
|
|
1428
1471
|
border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
|
|
1429
|
-
resize:none; outline:none;">${
|
|
1472
|
+
resize:none; outline:none;">${it.description}</textarea>
|
|
1430
1473
|
|
|
1431
1474
|
<div id="sf-lookback-container" style="display:${a ? "none" : "block"}; margin-bottom:20px;">
|
|
1432
1475
|
<label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1514,8 +1557,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1514
1557
|
<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>
|
|
1515
1558
|
</div>
|
|
1516
1559
|
</div>
|
|
1517
|
-
`,
|
|
1518
|
-
const e2 =
|
|
1560
|
+
`, it.mode = e, document.body.appendChild(st), (function bindListeners() {
|
|
1561
|
+
const e2 = st == null ? void 0 : st.querySelectorAll(".sf-issue-tab"), a2 = document.getElementById("sf-start-recording-btn"), u = document.getElementById("sf-modal-close-btn"), m2 = document.getElementById("sf-issue-submit-btn"), w2 = document.getElementById("sf-lookback-minutes");
|
|
1519
1562
|
e2 == null ? void 0 : e2.forEach((e3) => {
|
|
1520
1563
|
e3.addEventListener("click", (e4) => {
|
|
1521
1564
|
const a3 = e4.currentTarget.dataset.mode;
|
|
@@ -1523,11 +1566,11 @@ function injectModalHTML(e = "lookback") {
|
|
|
1523
1566
|
});
|
|
1524
1567
|
}), u && (u.onclick = closeModal);
|
|
1525
1568
|
w2 && w2.addEventListener("change", () => {
|
|
1526
|
-
"lookback" ===
|
|
1569
|
+
"lookback" === it.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
|
|
1527
1570
|
});
|
|
1528
1571
|
a2 && (a2.onclick = () => {
|
|
1529
1572
|
const e3 = document.getElementById("sf-issue-description");
|
|
1530
|
-
e3 && (
|
|
1573
|
+
e3 && (it.description = e3.value), (function startCountdownThenRecord() {
|
|
1531
1574
|
if (document.getElementById("sf-countdown-overlay")) return;
|
|
1532
1575
|
const e4 = document.createElement("div");
|
|
1533
1576
|
e4.id = "sf-countdown-overlay", e4.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 ";
|
|
@@ -1536,9 +1579,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1536
1579
|
const u2 = setInterval(async () => {
|
|
1537
1580
|
if (a3--, a3 > 0) e4.textContent = a3.toString();
|
|
1538
1581
|
else {
|
|
1539
|
-
clearInterval(u2), document.body.removeChild(e4),
|
|
1582
|
+
clearInterval(u2), document.body.removeChild(e4), at = Date.now(), ut = true;
|
|
1540
1583
|
try {
|
|
1541
|
-
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() =>
|
|
1584
|
+
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() => ge);
|
|
1542
1585
|
e5();
|
|
1543
1586
|
} catch (e5) {
|
|
1544
1587
|
console.error("[Report Issue] Failed to enable function span tracking:", e5);
|
|
@@ -1564,8 +1607,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1564
1607
|
`, e5.addEventListener("click", () => stopRecording()), document.body.appendChild(e5);
|
|
1565
1608
|
const a4 = e5.querySelector("#sf-recording-timer");
|
|
1566
1609
|
if (!a4) return;
|
|
1567
|
-
|
|
1568
|
-
const e6 = Date.now() - (
|
|
1610
|
+
ct = setInterval(() => {
|
|
1611
|
+
const e6 = Date.now() - (at ?? Date.now()), u3 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
|
|
1569
1612
|
a4.textContent = `${u3}:${m3}`;
|
|
1570
1613
|
}, 1e3);
|
|
1571
1614
|
})();
|
|
@@ -1573,12 +1616,12 @@ function injectModalHTML(e = "lookback") {
|
|
|
1573
1616
|
}, 1e3);
|
|
1574
1617
|
})();
|
|
1575
1618
|
});
|
|
1576
|
-
|
|
1619
|
+
st == null ? void 0 : st.addEventListener("click", (e3) => {
|
|
1577
1620
|
var _a2;
|
|
1578
1621
|
if (e3.target.closest("#sf-issue-submit-btn")) {
|
|
1579
|
-
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 =
|
|
1622
|
+
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = it.mode;
|
|
1580
1623
|
let u2, m3;
|
|
1581
|
-
if (
|
|
1624
|
+
if (it.description = e4, "startnow" === a3) u2 = at ?? Date.now() - 3e5, m3 = lt ?? Date.now();
|
|
1582
1625
|
else {
|
|
1583
1626
|
const e5 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
|
|
1584
1627
|
m3 = Date.now(), u2 = m3 - e5;
|
|
@@ -1587,9 +1630,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1587
1630
|
var _a3, _b;
|
|
1588
1631
|
try {
|
|
1589
1632
|
showTriageStatusModal(true);
|
|
1590
|
-
const m4 = await createTriageFromRecorder(
|
|
1591
|
-
if (!
|
|
1592
|
-
return
|
|
1633
|
+
const m4 = await createTriageFromRecorder(ot.apiKey, ot.backendApi, (function getSessionIdSafely() {
|
|
1634
|
+
if (!ot.resolveSessionId) throw new Error("getSessionId not defined");
|
|
1635
|
+
return ot.resolveSessionId();
|
|
1593
1636
|
})(), e5, a4, u3), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
|
|
1594
1637
|
w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
|
|
1595
1638
|
} catch (e6) {
|
|
@@ -1598,29 +1641,29 @@ function injectModalHTML(e = "lookback") {
|
|
|
1598
1641
|
})(`${u2}`, `${m3}`, e4);
|
|
1599
1642
|
}
|
|
1600
1643
|
});
|
|
1601
|
-
})(),
|
|
1644
|
+
})(), ot.deactivateIsolation = activateModalIsolation(st);
|
|
1602
1645
|
}
|
|
1603
1646
|
function setActiveTab(e) {
|
|
1604
|
-
|
|
1605
|
-
const a =
|
|
1647
|
+
it.mode = e;
|
|
1648
|
+
const a = st == null ? void 0 : st.querySelector("#sf-tab-lookback"), u = st == null ? void 0 : st.querySelector("#sf-tab-startnow");
|
|
1606
1649
|
"lookback" === e ? (a.style.background = "white", a.style.color = "#0F172A", u.style.background = "transparent", u.style.color = "#64748B") : (u.style.background = "white", u.style.color = "#0F172A", a.style.background = "transparent", a.style.color = "#64748B");
|
|
1607
1650
|
}
|
|
1608
1651
|
function updateModeSpecificUI(e) {
|
|
1609
1652
|
const a = document.querySelector("#sf-issue-mode-info div"), u = 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");
|
|
1610
1653
|
if (a && u && m2 && w2 && b2 && C2 && x2) if ("startnow" === e) {
|
|
1611
1654
|
m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a.textContent = "I want to reproduce the issue right now.";
|
|
1612
|
-
const e2 = null !==
|
|
1613
|
-
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed",
|
|
1614
|
-
const e3 = Math.floor((
|
|
1655
|
+
const e2 = null !== at && null !== lt;
|
|
1656
|
+
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", at && lt) {
|
|
1657
|
+
const e3 = Math.floor((lt - at) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
|
|
1615
1658
|
w2.style.display = "block", b2.textContent = `${a2}:${u2}`;
|
|
1616
1659
|
} else w2.style.display = "none";
|
|
1617
1660
|
} else m2.style.display = "none", w2.style.display = "none", x2.style.display = "block", C2.style.justifyContent = "flex-end", a.textContent = "Something already happened. Capture the past few minutes.", u.disabled = false, u.style.opacity = "1", u.style.cursor = "pointer";
|
|
1618
1661
|
}
|
|
1619
1662
|
async function stopRecording() {
|
|
1620
1663
|
var _a2;
|
|
1621
|
-
|
|
1664
|
+
lt = Date.now(), ut = false, ct && clearInterval(ct), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
|
|
1622
1665
|
try {
|
|
1623
|
-
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() =>
|
|
1666
|
+
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() => ge);
|
|
1624
1667
|
e();
|
|
1625
1668
|
} catch (e) {
|
|
1626
1669
|
console.error("[Report Issue] Failed to disable function span tracking:", e);
|
|
@@ -1633,17 +1676,17 @@ async function stopRecording() {
|
|
|
1633
1676
|
a2 && (a2.textContent = "Re-record");
|
|
1634
1677
|
}
|
|
1635
1678
|
const a = document.getElementById("sf-recording-timer-label"), u = document.getElementById("sf-recording-timer-display");
|
|
1636
|
-
if (a && u &&
|
|
1637
|
-
const e2 = Math.floor((
|
|
1679
|
+
if (a && u && at && lt) {
|
|
1680
|
+
const e2 = Math.floor((lt - at) / 1e3), m3 = Math.floor(e2 / 60).toString().padStart(2, "0"), w3 = (e2 % 60).toString().padStart(2, "0");
|
|
1638
1681
|
u.textContent = `${m3}:${w3}`, a.style.display = "block";
|
|
1639
1682
|
}
|
|
1640
1683
|
const m2 = document.getElementById("sf-issue-description");
|
|
1641
|
-
m2 && (m2.value =
|
|
1684
|
+
m2 && (m2.value = it.description);
|
|
1642
1685
|
const w2 = document.querySelector('input[value="startnow"]');
|
|
1643
1686
|
w2 && (w2.checked = true);
|
|
1644
1687
|
const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
|
|
1645
1688
|
if (b2 && C2) {
|
|
1646
|
-
const e2 = Math.floor(((
|
|
1689
|
+
const e2 = Math.floor(((lt ?? 0) - (at ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
|
|
1647
1690
|
C2.textContent = `${a2}:${u2}`, C2.style.color = "black", b2.style.display = "flex";
|
|
1648
1691
|
}
|
|
1649
1692
|
const x2 = document.getElementById("sf-issue-submit-btn");
|
|
@@ -1656,7 +1699,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1656
1699
|
var _a3, _b;
|
|
1657
1700
|
(_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1658
1701
|
})();
|
|
1659
|
-
const u = a ? `${
|
|
1702
|
+
const u = a ? `${ot.triageBaseUrl}/triage/${a}?from=inAppReportIssue` : "", m2 = document.createElement("div");
|
|
1660
1703
|
m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1661
1704
|
const w2 = e ? "Reporting Issue..." : "Issue reported!", b2 = e ? '<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>' : "", C2 = e ? '<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 = e ? "" : '<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>';
|
|
1662
1705
|
m2.innerHTML = `
|
|
@@ -1718,7 +1761,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1718
1761
|
function fadeCardAndRemove(e, a, u = 300) {
|
|
1719
1762
|
a.style.opacity = "0", a.addEventListener("transitionend", () => e.remove(), { once: true }), setTimeout(() => e.remove(), u + 100);
|
|
1720
1763
|
}
|
|
1721
|
-
var
|
|
1764
|
+
var pt = Object.defineProperty, b$1 = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? pt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), dt = Object.defineProperty, xn = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? dt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), ht = ((e) => (e[e.Document = 0] = "Document", e[e.DocumentType = 1] = "DocumentType", e[e.Element = 2] = "Element", e[e.Text = 3] = "Text", e[e.CDATA = 4] = "CDATA", e[e.Comment = 5] = "Comment", e))(ht || {});
|
|
1722
1765
|
function vr(e) {
|
|
1723
1766
|
return e.nodeType === e.ELEMENT_NODE;
|
|
1724
1767
|
}
|
|
@@ -1760,7 +1803,7 @@ function kr(e) {
|
|
|
1760
1803
|
})(e.cssText);
|
|
1761
1804
|
return a || e.cssText;
|
|
1762
1805
|
}
|
|
1763
|
-
let
|
|
1806
|
+
let gt = class {
|
|
1764
1807
|
constructor() {
|
|
1765
1808
|
xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
|
|
1766
1809
|
}
|
|
@@ -1812,7 +1855,7 @@ function Zt({ element: e, maskInputOptions: a, tagName: u, type: m2, value: w2,
|
|
|
1812
1855
|
function fe(e) {
|
|
1813
1856
|
return e.toLowerCase();
|
|
1814
1857
|
}
|
|
1815
|
-
const
|
|
1858
|
+
const yt = "__rrweb_original__";
|
|
1816
1859
|
function Yt(e) {
|
|
1817
1860
|
const a = e.type;
|
|
1818
1861
|
return e.hasAttribute("data-rr-is-password") ? "password" : a ? fe(a) : null;
|
|
@@ -1827,19 +1870,19 @@ function xr(e, a) {
|
|
|
1827
1870
|
const m2 = u.pathname.match(/\.([0-9a-z]+)(?:$)/i);
|
|
1828
1871
|
return (null == m2 ? void 0 : m2[1]) ?? null;
|
|
1829
1872
|
}
|
|
1830
|
-
let
|
|
1831
|
-
const
|
|
1873
|
+
let wt = 1;
|
|
1874
|
+
const St = new RegExp("[^a-z0-9-_:]");
|
|
1832
1875
|
function Ir() {
|
|
1833
|
-
return
|
|
1876
|
+
return wt++;
|
|
1834
1877
|
}
|
|
1835
|
-
let
|
|
1836
|
-
const
|
|
1878
|
+
let bt, vt;
|
|
1879
|
+
const Ct = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, kt = /^(?:[a-z+]+:)?\/\//i, xt = /^www\..*/i, Mt = /^(data:)([^,]*),(.*)/i;
|
|
1837
1880
|
function Pt(e, a) {
|
|
1838
|
-
return (e || "").replace(
|
|
1881
|
+
return (e || "").replace(Ct, (e2, u, m2, w2, b2, C2) => {
|
|
1839
1882
|
const x2 = m2 || b2 || C2, I2 = u || w2 || "";
|
|
1840
1883
|
if (!x2) return e2;
|
|
1841
|
-
if (
|
|
1842
|
-
if (
|
|
1884
|
+
if (kt.test(x2) || xt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1885
|
+
if (Mt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1843
1886
|
if ("/" === x2[0]) return `url(${I2}${(function Ei(e3) {
|
|
1844
1887
|
let a2 = "";
|
|
1845
1888
|
return a2 = e3.indexOf("//") > -1 ? e3.split("/").slice(0, 3).join("/") : e3.split("/")[0], a2 = a2.split("?")[0], a2;
|
|
@@ -1850,8 +1893,8 @@ function Pt(e, a) {
|
|
|
1850
1893
|
return `url(${I2}${_2.join("/")}${I2})`;
|
|
1851
1894
|
});
|
|
1852
1895
|
}
|
|
1853
|
-
const
|
|
1854
|
-
const
|
|
1896
|
+
const It = /^[^ \t\n\r\u000c]+/, Et = /^[, \t\n\r\u000c]+/;
|
|
1897
|
+
const Lt = /* @__PURE__ */ new WeakMap();
|
|
1855
1898
|
function At(e, a) {
|
|
1856
1899
|
return a && "" !== a.trim() ? $t(e, a) : a;
|
|
1857
1900
|
}
|
|
@@ -1859,8 +1902,8 @@ function Fi(e) {
|
|
|
1859
1902
|
return !("svg" !== e.tagName && !e.ownerSVGElement);
|
|
1860
1903
|
}
|
|
1861
1904
|
function $t(e, a) {
|
|
1862
|
-
let u =
|
|
1863
|
-
if (u || (u = e.createElement("a"),
|
|
1905
|
+
let u = Lt.get(e);
|
|
1906
|
+
if (u || (u = e.createElement("a"), Lt.set(e, u)), a) {
|
|
1864
1907
|
if (a.startsWith("blob:") || a.startsWith("data:")) return a;
|
|
1865
1908
|
} else a = "";
|
|
1866
1909
|
return u.setAttribute("href", a), u.href;
|
|
@@ -1875,8 +1918,8 @@ function Mr(e, a, u, m2) {
|
|
|
1875
1918
|
return w2 ? (m4 = w2[0], u2 += m4.length, m4) : "";
|
|
1876
1919
|
}
|
|
1877
1920
|
const m3 = [];
|
|
1878
|
-
for (; n(
|
|
1879
|
-
let w2 = n(
|
|
1921
|
+
for (; n(Et), !(u2 >= a2.length); ) {
|
|
1922
|
+
let w2 = n(It);
|
|
1880
1923
|
if ("," === w2.slice(-1)) w2 = At(e2, w2.substring(0, w2.length - 1)), m3.push(w2);
|
|
1881
1924
|
else {
|
|
1882
1925
|
let b2 = "";
|
|
@@ -1946,9 +1989,9 @@ function zi(e, a) {
|
|
|
1946
1989
|
})(u, m2);
|
|
1947
1990
|
switch (e.nodeType) {
|
|
1948
1991
|
case e.DOCUMENT_NODE:
|
|
1949
|
-
return "CSS1Compat" !== e.compatMode ? { type:
|
|
1992
|
+
return "CSS1Compat" !== e.compatMode ? { type: ht.Document, childNodes: [], compatMode: e.compatMode } : { type: ht.Document, childNodes: [] };
|
|
1950
1993
|
case e.DOCUMENT_TYPE_NODE:
|
|
1951
|
-
return { type:
|
|
1994
|
+
return { type: ht.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: $2 };
|
|
1952
1995
|
case e.ELEMENT_NODE:
|
|
1953
1996
|
return (function Vi(e2, a2) {
|
|
1954
1997
|
const { doc: u2, blockClass: m3, blockSelector: w3, inlineStylesheet: b3, maskInputOptions: C3 = {}, maskInputFn: x3, dataURLOptions: I3 = {}, inlineImages: _3, recordCanvas: O3, keepIframeSrcFn: E3, newlyAddedElement: D3 = false, rootId: F3 } = a2, U3 = (function Ui(e3, a3, u3) {
|
|
@@ -1966,7 +2009,7 @@ function zi(e, a) {
|
|
|
1966
2009
|
})(e2, m3, w3), B3 = (function Oi(e3) {
|
|
1967
2010
|
if (e3 instanceof HTMLFormElement) return "form";
|
|
1968
2011
|
const a3 = fe(e3.tagName);
|
|
1969
|
-
return
|
|
2012
|
+
return St.test(a3) ? "div" : a3;
|
|
1970
2013
|
})(e2);
|
|
1971
2014
|
let $3 = {};
|
|
1972
2015
|
const z2 = e2.attributes.length;
|
|
@@ -1995,7 +2038,7 @@ function zi(e, a) {
|
|
|
1995
2038
|
const a3 = e3.getContext("2d");
|
|
1996
2039
|
if (!a3) return true;
|
|
1997
2040
|
for (let u3 = 0; u3 < e3.width; u3 += 50) for (let m4 = 0; m4 < e3.height; m4 += 50) {
|
|
1998
|
-
const w4 = a3.getImageData, b4 =
|
|
2041
|
+
const w4 = a3.getImageData, b4 = yt in w4 ? w4[yt] : w4;
|
|
1999
2042
|
if (new Uint32Array(b4.call(a3, u3, m4, Math.min(50, e3.width - u3), Math.min(50, e3.height - m4)).data.buffer).some((e4) => 0 !== e4)) return false;
|
|
2000
2043
|
}
|
|
2001
2044
|
return true;
|
|
@@ -2007,11 +2050,11 @@ function zi(e, a) {
|
|
|
2007
2050
|
}
|
|
2008
2051
|
}
|
|
2009
2052
|
if ("img" === B3 && _3) {
|
|
2010
|
-
|
|
2053
|
+
bt || (bt = u2.createElement("canvas"), vt = bt.getContext("2d"));
|
|
2011
2054
|
const a3 = e2, m4 = a3.currentSrc || a3.getAttribute("src") || "<unknown-src>", w4 = a3.crossOrigin, A = () => {
|
|
2012
2055
|
a3.removeEventListener("load", A);
|
|
2013
2056
|
try {
|
|
2014
|
-
|
|
2057
|
+
bt.width = a3.naturalWidth, bt.height = a3.naturalHeight, vt.drawImage(a3, 0, 0), $3.rr_dataURL = bt.toDataURL(I3.type, I3.quality);
|
|
2015
2058
|
} catch (e3) {
|
|
2016
2059
|
if ("anonymous" !== a3.crossOrigin) return a3.crossOrigin = "anonymous", void (a3.complete && 0 !== a3.naturalWidth ? A() : a3.addEventListener("load", A));
|
|
2017
2060
|
console.warn(`Cannot inline img src=${m4}! Error: ${e3}`);
|
|
@@ -2034,7 +2077,7 @@ function zi(e, a) {
|
|
|
2034
2077
|
customElements.get(B3) && (j2 = true);
|
|
2035
2078
|
} catch {
|
|
2036
2079
|
}
|
|
2037
|
-
return { type:
|
|
2080
|
+
return { type: ht.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e2) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
|
|
2038
2081
|
})(e, { doc: u, blockClass: w2, blockSelector: b2, inlineStylesheet: x2, maskInputOptions: I2, maskInputFn: O2, dataURLOptions: E2, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: B2, rootId: $2 });
|
|
2039
2082
|
case e.TEXT_NODE:
|
|
2040
2083
|
return (function ji(e2, a2) {
|
|
@@ -2050,12 +2093,12 @@ function zi(e, a) {
|
|
|
2050
2093
|
}
|
|
2051
2094
|
x3 = Pt(x3, $t(a2.doc));
|
|
2052
2095
|
}
|
|
2053
|
-
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type:
|
|
2096
|
+
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type: ht.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
|
|
2054
2097
|
})(e, { doc: u, needsMask: C2, maskTextFn: _2, rootId: $2 });
|
|
2055
2098
|
case e.CDATA_SECTION_NODE:
|
|
2056
|
-
return { type:
|
|
2099
|
+
return { type: ht.CDATA, textContent: "", rootId: $2 };
|
|
2057
2100
|
case e.COMMENT_NODE:
|
|
2058
|
-
return { type:
|
|
2101
|
+
return { type: ht.Comment, textContent: e.textContent || "", rootId: $2 };
|
|
2059
2102
|
default:
|
|
2060
2103
|
return false;
|
|
2061
2104
|
}
|
|
@@ -2071,21 +2114,21 @@ function Se(e, a) {
|
|
|
2071
2114
|
if (!ee2) return console.warn(e, "not serialized"), null;
|
|
2072
2115
|
let te2;
|
|
2073
2116
|
te2 = m2.hasNode(e) ? m2.getId(e) : (function Gi(e2, a2) {
|
|
2074
|
-
return !!(a2.comment && e2.type ===
|
|
2075
|
-
})(ee2, F2) || !Q2 && ee2.type ===
|
|
2117
|
+
return !!(a2.comment && e2.type === ht.Comment || e2.type === ht.Element && (a2.script && ("script" === e2.tagName || "link" === e2.tagName && ("preload" === e2.attributes.rel || "modulepreload" === e2.attributes.rel) && "script" === e2.attributes.as || "link" === e2.tagName && "prefetch" === e2.attributes.rel && "string" == typeof e2.attributes.href && "js" === xr(e2.attributes.href)) || a2.headFavicon && ("link" === e2.tagName && "shortcut icon" === e2.attributes.rel || "meta" === e2.tagName && (N(e2.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === N(e2.attributes.name) || "icon" === N(e2.attributes.rel) || "apple-touch-icon" === N(e2.attributes.rel) || "shortcut icon" === N(e2.attributes.rel))) || "meta" === e2.tagName && (a2.headMetaDescKeywords && N(e2.attributes.name).match(/^description|keywords$/) || a2.headMetaSocial && (N(e2.attributes.property).match(/^(og|twitter|fb):/) || N(e2.attributes.name).match(/^(og|twitter):/) || "pinterest" === N(e2.attributes.name)) || a2.headMetaRobots && ("robots" === N(e2.attributes.name) || "googlebot" === N(e2.attributes.name) || "bingbot" === N(e2.attributes.name)) || a2.headMetaHttpEquiv && void 0 !== e2.attributes["http-equiv"] || a2.headMetaAuthorship && ("author" === N(e2.attributes.name) || "generator" === N(e2.attributes.name) || "framework" === N(e2.attributes.name) || "publisher" === N(e2.attributes.name) || "progid" === N(e2.attributes.name) || N(e2.attributes.property).match(/^article:/) || N(e2.attributes.property).match(/^product:/)) || a2.headMetaVerification && ("google-site-verification" === N(e2.attributes.name) || "yandex-verification" === N(e2.attributes.name) || "csrf-token" === N(e2.attributes.name) || "p:domain_verify" === N(e2.attributes.name) || "verify-v1" === N(e2.attributes.name) || "verification" === N(e2.attributes.name) || "shopify-checkout-api-token" === N(e2.attributes.name)))));
|
|
2118
|
+
})(ee2, F2) || !Q2 && ee2.type === ht.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
|
|
2076
2119
|
const ne2 = Object.assign(ee2, { id: te2 });
|
|
2077
2120
|
if (m2.add(e, ne2), -2 === te2) return null;
|
|
2078
2121
|
z2 && z2(e);
|
|
2079
2122
|
let re2 = !I2;
|
|
2080
|
-
if (ne2.type ===
|
|
2123
|
+
if (ne2.type === ht.Element) {
|
|
2081
2124
|
re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
|
|
2082
2125
|
const a2 = e.shadowRoot;
|
|
2083
2126
|
a2 && ze(a2) && (ne2.isShadowHost = true);
|
|
2084
2127
|
}
|
|
2085
|
-
if ((ne2.type ===
|
|
2086
|
-
F2.headWhitespace && ne2.type ===
|
|
2128
|
+
if ((ne2.type === ht.Document || ne2.type === ht.Element) && re2) {
|
|
2129
|
+
F2.headWhitespace && ne2.type === ht.Element && "head" === ne2.tagName && (Q2 = false);
|
|
2087
2130
|
const a2 = { doc: u, 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 };
|
|
2088
|
-
if (ne2.type !==
|
|
2131
|
+
if (ne2.type !== ht.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
|
|
2089
2132
|
const e2 = Se(u2, a2);
|
|
2090
2133
|
e2 && ne2.childNodes.push(e2);
|
|
2091
2134
|
}
|
|
@@ -2094,7 +2137,7 @@ function Se(e, a) {
|
|
|
2094
2137
|
m3 && (ze(e.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
|
|
2095
2138
|
}
|
|
2096
2139
|
}
|
|
2097
|
-
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type ===
|
|
2140
|
+
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type === ht.Element && "iframe" === ne2.tagName && (function _i(e2, a2, u2) {
|
|
2098
2141
|
const m3 = e2.contentWindow;
|
|
2099
2142
|
if (!m3) return;
|
|
2100
2143
|
let w3, b3 = false;
|
|
@@ -2120,7 +2163,7 @@ function Se(e, a) {
|
|
|
2120
2163
|
const u2 = Se(a2, { doc: a2, 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 });
|
|
2121
2164
|
u2 && j2(e, u2);
|
|
2122
2165
|
}
|
|
2123
|
-
}, V2), ne2.type ===
|
|
2166
|
+
}, 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(e2, a2, u2) {
|
|
2124
2167
|
let m3, w3 = false;
|
|
2125
2168
|
try {
|
|
2126
2169
|
m3 = e2.sheet;
|
|
@@ -2160,13 +2203,13 @@ function $i(e) {
|
|
|
2160
2203
|
} });
|
|
2161
2204
|
}), u;
|
|
2162
2205
|
}
|
|
2163
|
-
var
|
|
2164
|
-
return { isColorSupported: false, reset:
|
|
2206
|
+
var Rt = { exports: {} }, Dt = String, Rr = function() {
|
|
2207
|
+
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 };
|
|
2165
2208
|
};
|
|
2166
|
-
|
|
2167
|
-
var
|
|
2168
|
-
const
|
|
2169
|
-
let
|
|
2209
|
+
Rt.exports = Rr(), Rt.exports.createColors = Rr;
|
|
2210
|
+
var Ft = Rt.exports;
|
|
2211
|
+
const Ut = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2212
|
+
let Bt = Ft, Wt = Ut, jt = class Lr extends Error {
|
|
2170
2213
|
constructor(e, a, u, m2, w2, b2) {
|
|
2171
2214
|
super(e), this.name = "CssSyntaxError", this.reason = e, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a < "u" && typeof u < "u" && ("number" == typeof a ? (this.line = a, this.column = u) : (this.line = a.line, this.column = a.column, this.endLine = u.line, this.endColumn = u.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, Lr);
|
|
2172
2215
|
}
|
|
@@ -2176,11 +2219,11 @@ let Ut = Dt, Bt = Ft, Wt = class Lr extends Error {
|
|
|
2176
2219
|
showSourceCode(e) {
|
|
2177
2220
|
if (!this.source) return "";
|
|
2178
2221
|
let a = this.source;
|
|
2179
|
-
null == e && (e =
|
|
2222
|
+
null == e && (e = Bt.isColorSupported);
|
|
2180
2223
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
2181
2224
|
if (e) {
|
|
2182
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
2183
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
2225
|
+
let { bold: e2, gray: a2, red: u2 } = Bt.createColors(true);
|
|
2226
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), Wt && (i = (e3) => Wt(e3));
|
|
2184
2227
|
}
|
|
2185
2228
|
let u = a.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u.length), b2 = String(w2).length;
|
|
2186
2229
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -2201,10 +2244,10 @@ let Ut = Dt, Bt = Ft, Wt = class Lr extends Error {
|
|
|
2201
2244
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
2202
2245
|
}
|
|
2203
2246
|
};
|
|
2204
|
-
var
|
|
2205
|
-
|
|
2206
|
-
const
|
|
2207
|
-
let
|
|
2247
|
+
var Vt = jt;
|
|
2248
|
+
jt.default = jt;
|
|
2249
|
+
const Ht = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
2250
|
+
let Kt = class {
|
|
2208
2251
|
constructor(e) {
|
|
2209
2252
|
this.builder = e;
|
|
2210
2253
|
}
|
|
@@ -2256,7 +2299,7 @@ let Ht = class {
|
|
|
2256
2299
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
2257
2300
|
let w2 = e.parent;
|
|
2258
2301
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
2259
|
-
if (!w2) return
|
|
2302
|
+
if (!w2) return Ht[u];
|
|
2260
2303
|
let b2 = e.root();
|
|
2261
2304
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
2262
2305
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -2268,7 +2311,7 @@ let Ht = class {
|
|
|
2268
2311
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
2269
2312
|
});
|
|
2270
2313
|
}
|
|
2271
|
-
return typeof m2 > "u" && (m2 =
|
|
2314
|
+
return typeof m2 > "u" && (m2 = Ht[u]), b2.rawCache[u] = m2, m2;
|
|
2272
2315
|
}
|
|
2273
2316
|
rawBeforeClose(e) {
|
|
2274
2317
|
let a;
|
|
@@ -2344,17 +2387,17 @@ let Ht = class {
|
|
|
2344
2387
|
this[e.type](e, a);
|
|
2345
2388
|
}
|
|
2346
2389
|
};
|
|
2347
|
-
var
|
|
2348
|
-
|
|
2349
|
-
let
|
|
2390
|
+
var Jt = Kt;
|
|
2391
|
+
Kt.default = Kt;
|
|
2392
|
+
let Xt = Jt;
|
|
2350
2393
|
function ks(e, a) {
|
|
2351
|
-
new
|
|
2394
|
+
new Xt(a).stringify(e);
|
|
2352
2395
|
}
|
|
2353
|
-
var
|
|
2396
|
+
var Qt = ks;
|
|
2354
2397
|
ks.default = ks;
|
|
2355
|
-
var
|
|
2356
|
-
|
|
2357
|
-
let
|
|
2398
|
+
var en = {};
|
|
2399
|
+
en.isClean = Symbol("isClean"), en.my = Symbol("my");
|
|
2400
|
+
let tn = Vt, nn = Jt, rn = Qt, { isClean: on, my: sn } = en;
|
|
2358
2401
|
function Cs(e, a) {
|
|
2359
2402
|
let u = new e.constructor();
|
|
2360
2403
|
for (let m2 in e) {
|
|
@@ -2376,12 +2419,12 @@ function Pe(e, a) {
|
|
|
2376
2419
|
}
|
|
2377
2420
|
return w2;
|
|
2378
2421
|
}
|
|
2379
|
-
let
|
|
2422
|
+
let an = class {
|
|
2380
2423
|
get proxyOf() {
|
|
2381
2424
|
return this;
|
|
2382
2425
|
}
|
|
2383
2426
|
constructor(e = {}) {
|
|
2384
|
-
this.raws = {}, this[
|
|
2427
|
+
this.raws = {}, this[on] = false, this[sn] = true;
|
|
2385
2428
|
for (let a in e) if ("nodes" === a) {
|
|
2386
2429
|
this.nodes = [];
|
|
2387
2430
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -2425,19 +2468,19 @@ let sn = class {
|
|
|
2425
2468
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
2426
2469
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
2427
2470
|
}
|
|
2428
|
-
return new
|
|
2471
|
+
return new tn(e);
|
|
2429
2472
|
}
|
|
2430
2473
|
getProxyProcessor() {
|
|
2431
2474
|
return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
|
|
2432
2475
|
}
|
|
2433
2476
|
markClean() {
|
|
2434
|
-
this[
|
|
2477
|
+
this[on] = true;
|
|
2435
2478
|
}
|
|
2436
2479
|
markDirty() {
|
|
2437
|
-
if (this[
|
|
2438
|
-
this[
|
|
2480
|
+
if (this[on]) {
|
|
2481
|
+
this[on] = false;
|
|
2439
2482
|
let e = this;
|
|
2440
|
-
for (; e = e.parent; ) e[
|
|
2483
|
+
for (; e = e.parent; ) e[on] = false;
|
|
2441
2484
|
}
|
|
2442
2485
|
}
|
|
2443
2486
|
next() {
|
|
@@ -2473,7 +2516,7 @@ let sn = class {
|
|
|
2473
2516
|
return (u.line < a.line || u.line === a.line && u.column <= a.column) && (u = { column: a.column + 1, line: a.line }), { end: u, start: a };
|
|
2474
2517
|
}
|
|
2475
2518
|
raw(e, a) {
|
|
2476
|
-
return new
|
|
2519
|
+
return new nn().raw(this, e, a);
|
|
2477
2520
|
}
|
|
2478
2521
|
remove() {
|
|
2479
2522
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -2510,7 +2553,7 @@ let sn = class {
|
|
|
2510
2553
|
toProxy() {
|
|
2511
2554
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
2512
2555
|
}
|
|
2513
|
-
toString(e =
|
|
2556
|
+
toString(e = rn) {
|
|
2514
2557
|
e.stringify && (e = e.stringify);
|
|
2515
2558
|
let a = "";
|
|
2516
2559
|
return e(this, (e2) => {
|
|
@@ -2523,16 +2566,16 @@ let sn = class {
|
|
|
2523
2566
|
return e.warn(a, m2);
|
|
2524
2567
|
}
|
|
2525
2568
|
};
|
|
2526
|
-
var
|
|
2527
|
-
|
|
2528
|
-
let
|
|
2569
|
+
var ln = an;
|
|
2570
|
+
an.default = an;
|
|
2571
|
+
let cn = ln, un = class extends cn {
|
|
2529
2572
|
constructor(e) {
|
|
2530
2573
|
super(e), this.type = "comment";
|
|
2531
2574
|
}
|
|
2532
2575
|
};
|
|
2533
|
-
var
|
|
2534
|
-
|
|
2535
|
-
let
|
|
2576
|
+
var pn = un;
|
|
2577
|
+
un.default = un;
|
|
2578
|
+
let dn = ln, hn = class extends dn {
|
|
2536
2579
|
get variable() {
|
|
2537
2580
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
2538
2581
|
}
|
|
@@ -2540,16 +2583,16 @@ let pn = an, dn = class extends pn {
|
|
|
2540
2583
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
2541
2584
|
}
|
|
2542
2585
|
};
|
|
2543
|
-
var
|
|
2544
|
-
|
|
2545
|
-
let
|
|
2586
|
+
var fn = hn;
|
|
2587
|
+
hn.default = hn;
|
|
2588
|
+
let mn, gn, yn, wn, Sn = pn, bn = fn, Mn = ln, { isClean: In, my: _n } = en;
|
|
2546
2589
|
function _r(e) {
|
|
2547
2590
|
return e.map((e2) => (e2.nodes && (e2.nodes = _r(e2.nodes)), delete e2.source, e2));
|
|
2548
2591
|
}
|
|
2549
2592
|
function Wr(e) {
|
|
2550
|
-
if (e[
|
|
2593
|
+
if (e[In] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) Wr(a);
|
|
2551
2594
|
}
|
|
2552
|
-
let
|
|
2595
|
+
let On = class zr extends Mn {
|
|
2553
2596
|
get first() {
|
|
2554
2597
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
2555
2598
|
}
|
|
@@ -2601,7 +2644,7 @@ let _n = class zr extends bn {
|
|
|
2601
2644
|
return this.markDirty(), this;
|
|
2602
2645
|
}
|
|
2603
2646
|
normalize(e, a) {
|
|
2604
|
-
if ("string" == typeof e) e = _r(
|
|
2647
|
+
if ("string" == typeof e) e = _r(gn(e).nodes);
|
|
2605
2648
|
else if (typeof e > "u") e = [];
|
|
2606
2649
|
else if (Array.isArray(e)) {
|
|
2607
2650
|
e = e.slice(0);
|
|
@@ -2612,14 +2655,14 @@ let _n = class zr extends bn {
|
|
|
2612
2655
|
} else if (e.type) e = [e];
|
|
2613
2656
|
else if (e.prop) {
|
|
2614
2657
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
2615
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
2616
|
-
} else if (e.selector || e.selectors) e = [new
|
|
2617
|
-
else if (e.name) e = [new
|
|
2658
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new bn(e)];
|
|
2659
|
+
} else if (e.selector || e.selectors) e = [new wn(e)];
|
|
2660
|
+
else if (e.name) e = [new mn(e)];
|
|
2618
2661
|
else {
|
|
2619
2662
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
2620
|
-
e = [new
|
|
2663
|
+
e = [new Sn(e)];
|
|
2621
2664
|
}
|
|
2622
|
-
return e.map((e2) => (e2[
|
|
2665
|
+
return e.map((e2) => (e2[_n] || zr.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[In] && Wr(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
|
|
2623
2666
|
}
|
|
2624
2667
|
prepend(...e) {
|
|
2625
2668
|
e = e.reverse();
|
|
@@ -2695,22 +2738,22 @@ let _n = class zr extends bn {
|
|
|
2695
2738
|
}));
|
|
2696
2739
|
}
|
|
2697
2740
|
};
|
|
2698
|
-
|
|
2741
|
+
On.registerParse = (e) => {
|
|
2742
|
+
gn = e;
|
|
2743
|
+
}, On.registerRule = (e) => {
|
|
2744
|
+
wn = e;
|
|
2745
|
+
}, On.registerAtRule = (e) => {
|
|
2699
2746
|
mn = e;
|
|
2700
|
-
},
|
|
2747
|
+
}, On.registerRoot = (e) => {
|
|
2701
2748
|
yn = e;
|
|
2702
|
-
}, _n.registerAtRule = (e) => {
|
|
2703
|
-
fn = e;
|
|
2704
|
-
}, _n.registerRoot = (e) => {
|
|
2705
|
-
gn = e;
|
|
2706
2749
|
};
|
|
2707
|
-
var
|
|
2708
|
-
|
|
2709
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
2710
|
-
|
|
2750
|
+
var En = On;
|
|
2751
|
+
On.default = On, On.rebuild = (e) => {
|
|
2752
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, mn.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, wn.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, bn.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Sn.prototype) : "root" === e.type && Object.setPrototypeOf(e, yn.prototype), e[_n] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
2753
|
+
On.rebuild(e2);
|
|
2711
2754
|
});
|
|
2712
2755
|
};
|
|
2713
|
-
let
|
|
2756
|
+
let Ln = En, Rn = class extends Ln {
|
|
2714
2757
|
constructor(e) {
|
|
2715
2758
|
super(e), this.type = "atrule";
|
|
2716
2759
|
}
|
|
@@ -2721,38 +2764,38 @@ let En = On, Ln = class extends En {
|
|
|
2721
2764
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
2722
2765
|
}
|
|
2723
2766
|
};
|
|
2724
|
-
var
|
|
2725
|
-
|
|
2726
|
-
let
|
|
2767
|
+
var An = Rn;
|
|
2768
|
+
Rn.default = Rn, Ln.registerAtRule(Rn);
|
|
2769
|
+
let Tn, Nn, Pn = En, Dn = class extends Pn {
|
|
2727
2770
|
constructor(e) {
|
|
2728
2771
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
2729
2772
|
}
|
|
2730
2773
|
toResult(e = {}) {
|
|
2731
|
-
return new
|
|
2774
|
+
return new Tn(new Nn(), this, e).stringify();
|
|
2732
2775
|
}
|
|
2733
2776
|
};
|
|
2734
|
-
|
|
2735
|
-
An = e;
|
|
2736
|
-
}, Pn.registerProcessor = (e) => {
|
|
2777
|
+
Dn.registerLazyResult = (e) => {
|
|
2737
2778
|
Tn = e;
|
|
2779
|
+
}, Dn.registerProcessor = (e) => {
|
|
2780
|
+
Nn = e;
|
|
2738
2781
|
};
|
|
2739
|
-
var
|
|
2740
|
-
|
|
2741
|
-
var
|
|
2782
|
+
var Fn = Dn;
|
|
2783
|
+
Dn.default = Dn;
|
|
2784
|
+
var Un = { nanoid: (e = 21) => {
|
|
2742
2785
|
let a = "", u = 0 | e;
|
|
2743
2786
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
2744
2787
|
return a;
|
|
2745
2788
|
} };
|
|
2746
|
-
let { existsSync:
|
|
2747
|
-
let
|
|
2789
|
+
let { existsSync: Bn, readFileSync: Wn } = Ut, { dirname: zn, join: jn } = Ut, { SourceMapConsumer: Vn, SourceMapGenerator: qn } = Ut;
|
|
2790
|
+
let Zn = class {
|
|
2748
2791
|
constructor(e, a) {
|
|
2749
2792
|
if (false === a.map) return;
|
|
2750
2793
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
2751
2794
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
2752
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
2795
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = zn(this.mapFile)), m2 && (this.text = m2);
|
|
2753
2796
|
}
|
|
2754
2797
|
consumer() {
|
|
2755
|
-
return this.consumerCache || (this.consumerCache = new
|
|
2798
|
+
return this.consumerCache || (this.consumerCache = new Vn(this.text)), this.consumerCache;
|
|
2756
2799
|
}
|
|
2757
2800
|
decodeInline(e) {
|
|
2758
2801
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -2777,15 +2820,15 @@ let qn = class {
|
|
|
2777
2820
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
2778
2821
|
}
|
|
2779
2822
|
loadFile(e) {
|
|
2780
|
-
if (this.root =
|
|
2823
|
+
if (this.root = zn(e), Bn(e)) return this.mapFile = e, Wn(e, "utf-8").toString().trim();
|
|
2781
2824
|
}
|
|
2782
2825
|
loadMap(e, a) {
|
|
2783
2826
|
if (false === a) return false;
|
|
2784
2827
|
if (a) {
|
|
2785
2828
|
if ("string" == typeof a) return a;
|
|
2786
2829
|
if ("function" != typeof a) {
|
|
2787
|
-
if (a instanceof
|
|
2788
|
-
if (a instanceof
|
|
2830
|
+
if (a instanceof Vn) return qn.fromSourceMap(a).toString();
|
|
2831
|
+
if (a instanceof qn) return a.toString();
|
|
2789
2832
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
2790
2833
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
2791
2834
|
}
|
|
@@ -2801,7 +2844,7 @@ let qn = class {
|
|
|
2801
2844
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
2802
2845
|
if (this.annotation) {
|
|
2803
2846
|
let a2 = this.annotation;
|
|
2804
|
-
return e && (a2 = zn(
|
|
2847
|
+
return e && (a2 = jn(zn(e), a2)), this.loadFile(a2);
|
|
2805
2848
|
}
|
|
2806
2849
|
}
|
|
2807
2850
|
}
|
|
@@ -2812,23 +2855,23 @@ let qn = class {
|
|
|
2812
2855
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
2813
2856
|
}
|
|
2814
2857
|
};
|
|
2815
|
-
var
|
|
2816
|
-
|
|
2817
|
-
let { nanoid:
|
|
2858
|
+
var Kn = Zn;
|
|
2859
|
+
Zn.default = Zn;
|
|
2860
|
+
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 {
|
|
2818
2861
|
get from() {
|
|
2819
2862
|
return this.file || this.id;
|
|
2820
2863
|
}
|
|
2821
2864
|
constructor(e, a = {}) {
|
|
2822
2865
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
2823
|
-
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!
|
|
2824
|
-
let e2 = new
|
|
2866
|
+
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!hr || /^\w+:\/\//.test(a.from) || nr(a.from) ? this.file = a.from : this.file = rr(a.from)), hr && dr) {
|
|
2867
|
+
let e2 = new cr(this.css, a);
|
|
2825
2868
|
if (e2.text) {
|
|
2826
2869
|
this.map = e2;
|
|
2827
2870
|
let a2 = e2.consumer().file;
|
|
2828
2871
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
2829
2872
|
}
|
|
2830
2873
|
}
|
|
2831
|
-
this.file || (this.id = "<input css " +
|
|
2874
|
+
this.file || (this.id = "<input css " + Qn(6) + ">"), this.map && (this.map.file = this.from);
|
|
2832
2875
|
}
|
|
2833
2876
|
error(e, a, u, m2 = {}) {
|
|
2834
2877
|
let w2, b2, C2;
|
|
@@ -2847,17 +2890,17 @@ let { nanoid: Kn } = Fn, { isAbsolute: Qn, resolve: nr } = Ft, { SourceMapConsum
|
|
|
2847
2890
|
a = e2.line, u = e2.col;
|
|
2848
2891
|
}
|
|
2849
2892
|
let x2 = this.origin(a, u, b2, w2);
|
|
2850
|
-
return C2 = x2 ? new
|
|
2893
|
+
return C2 = x2 ? new lr(e, 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(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (ar && (C2.input.url = ar(this.file).toString()), C2.input.file = this.file), C2;
|
|
2851
2894
|
}
|
|
2852
2895
|
fromOffset(e) {
|
|
2853
2896
|
let a, u;
|
|
2854
|
-
if (this[
|
|
2897
|
+
if (this[pr]) u = this[pr];
|
|
2855
2898
|
else {
|
|
2856
2899
|
let e2 = this.css.split("\n");
|
|
2857
2900
|
u = new Array(e2.length);
|
|
2858
2901
|
let a2 = 0;
|
|
2859
2902
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
2860
|
-
this[
|
|
2903
|
+
this[pr] = u;
|
|
2861
2904
|
}
|
|
2862
2905
|
a = u[u.length - 1];
|
|
2863
2906
|
let m2 = 0;
|
|
@@ -2876,17 +2919,17 @@ let { nanoid: Kn } = Fn, { isAbsolute: Qn, resolve: nr } = Ft, { SourceMapConsum
|
|
|
2876
2919
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
2877
2920
|
}
|
|
2878
2921
|
mapResolve(e) {
|
|
2879
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
2922
|
+
return /^\w+:\/\//.test(e) ? e : rr(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
2880
2923
|
}
|
|
2881
2924
|
origin(e, a, u, m2) {
|
|
2882
2925
|
if (!this.map) return false;
|
|
2883
2926
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
2884
2927
|
if (!x2.source) return false;
|
|
2885
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
2928
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = nr(x2.source) ? ar(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || ar(this.map.mapFile));
|
|
2886
2929
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
2887
2930
|
if ("file:" === b2.protocol) {
|
|
2888
|
-
if (!
|
|
2889
|
-
I2.file =
|
|
2931
|
+
if (!ir) throw new Error("file: protocol is not available in this PostCSS build");
|
|
2932
|
+
I2.file = ir(b2);
|
|
2890
2933
|
}
|
|
2891
2934
|
let _2 = C2.sourceContentFor(x2.source);
|
|
2892
2935
|
return _2 && (I2.source = _2), I2;
|
|
@@ -2897,9 +2940,9 @@ let { nanoid: Kn } = Fn, { isAbsolute: Qn, resolve: nr } = Ft, { SourceMapConsum
|
|
|
2897
2940
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
2898
2941
|
}
|
|
2899
2942
|
};
|
|
2900
|
-
var
|
|
2901
|
-
|
|
2902
|
-
let
|
|
2943
|
+
var mr = fr;
|
|
2944
|
+
fr.default = fr, ur && ur.registerInput && ur.registerInput(fr);
|
|
2945
|
+
let gr, yr, wr = En, Sr = class extends wr {
|
|
2903
2946
|
constructor(e) {
|
|
2904
2947
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
2905
2948
|
}
|
|
@@ -2916,29 +2959,29 @@ let mr, gr, yr = On, wr = class extends yr {
|
|
|
2916
2959
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
2917
2960
|
}
|
|
2918
2961
|
toResult(e = {}) {
|
|
2919
|
-
return new
|
|
2962
|
+
return new gr(new yr(), this, e).stringify();
|
|
2920
2963
|
}
|
|
2921
2964
|
};
|
|
2922
|
-
|
|
2923
|
-
mr = e;
|
|
2924
|
-
}, wr.registerProcessor = (e) => {
|
|
2965
|
+
Sr.registerLazyResult = (e) => {
|
|
2925
2966
|
gr = e;
|
|
2967
|
+
}, Sr.registerProcessor = (e) => {
|
|
2968
|
+
yr = e;
|
|
2926
2969
|
};
|
|
2927
|
-
var
|
|
2928
|
-
|
|
2929
|
-
let
|
|
2970
|
+
var Cr = Sr;
|
|
2971
|
+
Sr.default = Sr, wr.registerRoot(Sr);
|
|
2972
|
+
let Ar = { comma: (e) => Ar.split(e, [","], true), space(e) {
|
|
2930
2973
|
let a = [" ", "\n", " "];
|
|
2931
|
-
return
|
|
2974
|
+
return Ar.split(e, a);
|
|
2932
2975
|
}, split(e, a, u) {
|
|
2933
2976
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
2934
2977
|
for (let u2 of e) _2 ? _2 = false : "\\" === u2 ? _2 = true : x2 ? u2 === I2 && (x2 = false) : '"' === u2 || "'" === u2 ? (x2 = true, I2 = u2) : "(" === u2 ? C2 += 1 : ")" === u2 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a.includes(u2) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u2;
|
|
2935
2978
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
2936
2979
|
} };
|
|
2937
|
-
var
|
|
2938
|
-
|
|
2939
|
-
let
|
|
2980
|
+
var Tr = Ar;
|
|
2981
|
+
Ar.default = Ar;
|
|
2982
|
+
let Nr = En, Pr = Tr, Dr = class extends Nr {
|
|
2940
2983
|
get selectors() {
|
|
2941
|
-
return
|
|
2984
|
+
return Pr.comma(this.selector);
|
|
2942
2985
|
}
|
|
2943
2986
|
set selectors(e) {
|
|
2944
2987
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -2948,34 +2991,34 @@ let Tr = On, Nr = Ar, Pr = class extends Tr {
|
|
|
2948
2991
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
2949
2992
|
}
|
|
2950
2993
|
};
|
|
2951
|
-
var
|
|
2952
|
-
|
|
2953
|
-
let
|
|
2994
|
+
var Fr = Dr;
|
|
2995
|
+
Dr.default = Dr, Nr.registerRule(Dr);
|
|
2996
|
+
let Ur = An, Br = pn, $r = fn, jr = mr, Gr = Kn, Vr = Cr, qr = Fr;
|
|
2954
2997
|
function Ze(e, a) {
|
|
2955
2998
|
if (Array.isArray(e)) return e.map((e2) => Ze(e2));
|
|
2956
2999
|
let { inputs: u, ...m2 } = e;
|
|
2957
3000
|
if (u) {
|
|
2958
3001
|
a = [];
|
|
2959
3002
|
for (let e2 of u) {
|
|
2960
|
-
let u2 = { ...e2, __proto__:
|
|
2961
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
3003
|
+
let u2 = { ...e2, __proto__: jr.prototype };
|
|
3004
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Gr.prototype }), a.push(u2);
|
|
2962
3005
|
}
|
|
2963
3006
|
}
|
|
2964
3007
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ze(e2, a))), m2.source) {
|
|
2965
3008
|
let { inputId: e2, ...u2 } = m2.source;
|
|
2966
3009
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
2967
3010
|
}
|
|
2968
|
-
if ("root" === m2.type) return new
|
|
2969
|
-
if ("decl" === m2.type) return new
|
|
2970
|
-
if ("rule" === m2.type) return new
|
|
2971
|
-
if ("comment" === m2.type) return new
|
|
2972
|
-
if ("atrule" === m2.type) return new
|
|
3011
|
+
if ("root" === m2.type) return new Vr(m2);
|
|
3012
|
+
if ("decl" === m2.type) return new $r(m2);
|
|
3013
|
+
if ("rule" === m2.type) return new qr(m2);
|
|
3014
|
+
if ("comment" === m2.type) return new Br(m2);
|
|
3015
|
+
if ("atrule" === m2.type) return new Ur(m2);
|
|
2973
3016
|
throw new Error("Unknown node type: " + e.type);
|
|
2974
3017
|
}
|
|
2975
|
-
var
|
|
3018
|
+
var Hr = Ze;
|
|
2976
3019
|
Ze.default = Ze;
|
|
2977
|
-
let { dirname:
|
|
2978
|
-
var
|
|
3020
|
+
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);
|
|
3021
|
+
var ao = class {
|
|
2979
3022
|
constructor(e, a, u, m2) {
|
|
2980
3023
|
this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, 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();
|
|
2981
3024
|
}
|
|
@@ -2987,8 +3030,8 @@ var io = class {
|
|
|
2987
3030
|
}
|
|
2988
3031
|
applyPrevMaps() {
|
|
2989
3032
|
for (let e of this.previous()) {
|
|
2990
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
2991
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
3033
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Zr(e.file);
|
|
3034
|
+
false === this.mapOpts.sourcesContent ? (a = new Xr(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
2992
3035
|
}
|
|
2993
3036
|
}
|
|
2994
3037
|
clearAnnotation() {
|
|
@@ -2998,7 +3041,7 @@ var io = class {
|
|
|
2998
3041
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
2999
3042
|
}
|
|
3000
3043
|
generate() {
|
|
3001
|
-
if (this.clearAnnotation(),
|
|
3044
|
+
if (this.clearAnnotation(), io && oo && this.isMap()) return this.generateMap();
|
|
3002
3045
|
{
|
|
3003
3046
|
let e = "";
|
|
3004
3047
|
return this.stringify(this.root, (a) => {
|
|
@@ -3010,12 +3053,12 @@ var io = class {
|
|
|
3010
3053
|
if (this.root) this.generateString();
|
|
3011
3054
|
else if (1 === this.previous().length) {
|
|
3012
3055
|
let e = this.previous()[0].consumer();
|
|
3013
|
-
e.file = this.outputFile(), this.map =
|
|
3014
|
-
} else this.map = new
|
|
3056
|
+
e.file = this.outputFile(), this.map = Qr.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
3057
|
+
} 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>" });
|
|
3015
3058
|
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];
|
|
3016
3059
|
}
|
|
3017
3060
|
generateString() {
|
|
3018
|
-
this.css = "", this.map = new
|
|
3061
|
+
this.css = "", this.map = new Qr({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
3019
3062
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
3020
3063
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
3021
3064
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u, 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))), a = C2.match(/\n/g), a ? (u += a.length, e = C2.lastIndexOf("\n"), m2 = C2.length - e) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -3045,9 +3088,9 @@ var io = class {
|
|
|
3045
3088
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
3046
3089
|
let a = this.memoizedPaths.get(e);
|
|
3047
3090
|
if (a) return a;
|
|
3048
|
-
let u = this.opts.to ?
|
|
3049
|
-
"string" == typeof this.mapOpts.annotation && (u =
|
|
3050
|
-
let m2 =
|
|
3091
|
+
let u = this.opts.to ? Zr(this.opts.to) : ".";
|
|
3092
|
+
"string" == typeof this.mapOpts.annotation && (u = Zr(Jr(u, this.mapOpts.annotation)));
|
|
3093
|
+
let m2 = Kr(u, e);
|
|
3051
3094
|
return this.memoizedPaths.set(e, m2), m2;
|
|
3052
3095
|
}
|
|
3053
3096
|
previous() {
|
|
@@ -3058,7 +3101,7 @@ var io = class {
|
|
|
3058
3101
|
}
|
|
3059
3102
|
});
|
|
3060
3103
|
else {
|
|
3061
|
-
let e = new
|
|
3104
|
+
let e = new to(this.originalCSS, this.opts);
|
|
3062
3105
|
e.map && this.previousMaps.push(e.map);
|
|
3063
3106
|
}
|
|
3064
3107
|
return this.previousMaps;
|
|
@@ -3089,8 +3132,8 @@ var io = class {
|
|
|
3089
3132
|
toFileUrl(e) {
|
|
3090
3133
|
let a = this.memoizedFileURLs.get(e);
|
|
3091
3134
|
if (a) return a;
|
|
3092
|
-
if (
|
|
3093
|
-
let a2 =
|
|
3135
|
+
if (eo) {
|
|
3136
|
+
let a2 = eo(e).toString();
|
|
3094
3137
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
3095
3138
|
}
|
|
3096
3139
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -3098,13 +3141,13 @@ var io = class {
|
|
|
3098
3141
|
toUrl(e) {
|
|
3099
3142
|
let a = this.memoizedURLs.get(e);
|
|
3100
3143
|
if (a) return a;
|
|
3101
|
-
"\\" ===
|
|
3144
|
+
"\\" === Yr && (e = e.replace(/\\/g, "/"));
|
|
3102
3145
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
3103
3146
|
return this.memoizedURLs.set(e, u), u;
|
|
3104
3147
|
}
|
|
3105
3148
|
};
|
|
3106
|
-
const
|
|
3107
|
-
let
|
|
3149
|
+
const lo = /[\t\n\f\r "#'()/;[\\\]{}]/g, co = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, uo = /.[\r\n"'(/\\]/, ho = /[\da-f]/i;
|
|
3150
|
+
let Mo = An, _o = pn, Ao = fn, No = Cr, Po = Fr, Xa = function(e, a = {}) {
|
|
3108
3151
|
let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
3109
3152
|
function y2(a2) {
|
|
3110
3153
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -3154,7 +3197,7 @@ let ho = Rn, Mo = un, _o = hn, Ao = Sr, No = Dr, Xa = function(e, a = {}) {
|
|
|
3154
3197
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
3155
3198
|
} while (I2);
|
|
3156
3199
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3157
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
3200
|
+
} 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);
|
|
3158
3201
|
break;
|
|
3159
3202
|
case 39:
|
|
3160
3203
|
case 34:
|
|
@@ -3172,31 +3215,31 @@ let ho = Rn, Mo = un, _o = hn, Ao = Sr, No = Dr, Xa = function(e, a = {}) {
|
|
|
3172
3215
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3173
3216
|
break;
|
|
3174
3217
|
case 64:
|
|
3175
|
-
|
|
3218
|
+
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;
|
|
3176
3219
|
break;
|
|
3177
3220
|
case 92:
|
|
3178
3221
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
3179
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
3180
|
-
for (;
|
|
3222
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, ho.test(D2.charAt(b2)))) {
|
|
3223
|
+
for (; ho.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
3181
3224
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
3182
3225
|
}
|
|
3183
3226
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3184
3227
|
break;
|
|
3185
3228
|
default:
|
|
3186
|
-
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
3229
|
+
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? 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);
|
|
3187
3230
|
}
|
|
3188
3231
|
return B2++, x2;
|
|
3189
3232
|
}, position: function S() {
|
|
3190
3233
|
return B2;
|
|
3191
3234
|
} };
|
|
3192
3235
|
};
|
|
3193
|
-
const
|
|
3194
|
-
var
|
|
3236
|
+
const Do = { empty: true, space: true };
|
|
3237
|
+
var Fo = class {
|
|
3195
3238
|
constructor(e) {
|
|
3196
|
-
this.input = e, this.root = new
|
|
3239
|
+
this.input = e, this.root = new No(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
3197
3240
|
}
|
|
3198
3241
|
atrule(e) {
|
|
3199
|
-
let a = new
|
|
3242
|
+
let a = new Mo();
|
|
3200
3243
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
3201
3244
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
3202
3245
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -3248,7 +3291,7 @@ var Do = class {
|
|
|
3248
3291
|
return false;
|
|
3249
3292
|
}
|
|
3250
3293
|
comment(e) {
|
|
3251
|
-
let a = new
|
|
3294
|
+
let a = new _o();
|
|
3252
3295
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
3253
3296
|
let u = e[1].slice(2, -2);
|
|
3254
3297
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -3261,7 +3304,7 @@ var Do = class {
|
|
|
3261
3304
|
this.tokenizer = Xa(this.input);
|
|
3262
3305
|
}
|
|
3263
3306
|
decl(e, a) {
|
|
3264
|
-
let u = new
|
|
3307
|
+
let u = new Ao();
|
|
3265
3308
|
this.init(u, e[0][2]);
|
|
3266
3309
|
let m2, w2 = e[e.length - 1];
|
|
3267
3310
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e2) {
|
|
@@ -3310,7 +3353,7 @@ var Do = class {
|
|
|
3310
3353
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
3311
3354
|
}
|
|
3312
3355
|
emptyRule(e) {
|
|
3313
|
-
let a = new
|
|
3356
|
+
let a = new Po();
|
|
3314
3357
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
3315
3358
|
}
|
|
3316
3359
|
end(e) {
|
|
@@ -3386,7 +3429,7 @@ var Do = class {
|
|
|
3386
3429
|
}
|
|
3387
3430
|
raw(e, a, u, m2) {
|
|
3388
3431
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
3389
|
-
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty",
|
|
3432
|
+
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", Do[x2] || Do[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
3390
3433
|
if (!O2) {
|
|
3391
3434
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
3392
3435
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -3395,7 +3438,7 @@ var Do = class {
|
|
|
3395
3438
|
}
|
|
3396
3439
|
rule(e) {
|
|
3397
3440
|
e.pop();
|
|
3398
|
-
let a = new
|
|
3441
|
+
let a = new Po();
|
|
3399
3442
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
3400
3443
|
}
|
|
3401
3444
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -3435,9 +3478,9 @@ var Do = class {
|
|
|
3435
3478
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
3436
3479
|
}
|
|
3437
3480
|
};
|
|
3438
|
-
let
|
|
3481
|
+
let Uo = En, $o = mr, jo = Fo;
|
|
3439
3482
|
function _t(e, a) {
|
|
3440
|
-
let u = new
|
|
3483
|
+
let u = new $o(e, a), m2 = new jo(u);
|
|
3441
3484
|
try {
|
|
3442
3485
|
m2.parse();
|
|
3443
3486
|
} catch (e2) {
|
|
@@ -3445,9 +3488,9 @@ function _t(e, a) {
|
|
|
3445
3488
|
}
|
|
3446
3489
|
return m2.root;
|
|
3447
3490
|
}
|
|
3448
|
-
var
|
|
3449
|
-
_t.default = _t,
|
|
3450
|
-
let
|
|
3491
|
+
var Go = _t;
|
|
3492
|
+
_t.default = _t, Uo.registerParse(_t);
|
|
3493
|
+
let Vo = class {
|
|
3451
3494
|
constructor(e, a = {}) {
|
|
3452
3495
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
3453
3496
|
let e2 = a.node.rangeBy(a);
|
|
@@ -3459,9 +3502,9 @@ let Go = class {
|
|
|
3459
3502
|
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;
|
|
3460
3503
|
}
|
|
3461
3504
|
};
|
|
3462
|
-
var
|
|
3463
|
-
|
|
3464
|
-
let
|
|
3505
|
+
var qo = Vo;
|
|
3506
|
+
Vo.default = Vo;
|
|
3507
|
+
let Ho = qo, Zo = class {
|
|
3465
3508
|
get content() {
|
|
3466
3509
|
return this.css;
|
|
3467
3510
|
}
|
|
@@ -3473,26 +3516,26 @@ let qo = Vo, Ho = class {
|
|
|
3473
3516
|
}
|
|
3474
3517
|
warn(e, a = {}) {
|
|
3475
3518
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
3476
|
-
let u = new
|
|
3519
|
+
let u = new Ho(e, a);
|
|
3477
3520
|
return this.messages.push(u), u;
|
|
3478
3521
|
}
|
|
3479
3522
|
warnings() {
|
|
3480
3523
|
return this.messages.filter((e) => "warning" === e.type);
|
|
3481
3524
|
}
|
|
3482
3525
|
};
|
|
3483
|
-
var
|
|
3484
|
-
|
|
3485
|
-
let
|
|
3526
|
+
var Ko = Zo;
|
|
3527
|
+
Zo.default = Zo;
|
|
3528
|
+
let Jo = {};
|
|
3486
3529
|
var so = function(e) {
|
|
3487
|
-
|
|
3530
|
+
Jo[e] || (Jo[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
3488
3531
|
};
|
|
3489
|
-
let
|
|
3490
|
-
const
|
|
3532
|
+
let Yo = En, Xo = Fn, Qo = ao, es = Go, ts = Ko, ns = Cr, rs = Qt, { isClean: os, my: ss } = en, is = so;
|
|
3533
|
+
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 };
|
|
3491
3534
|
function Ne(e) {
|
|
3492
3535
|
return "object" == typeof e && "function" == typeof e.then;
|
|
3493
3536
|
}
|
|
3494
3537
|
function no(e) {
|
|
3495
|
-
let a = false, u =
|
|
3538
|
+
let a = false, u = as[e.type];
|
|
3496
3539
|
return "decl" === e.type ? a = e.prop.toLowerCase() : "atrule" === e.type && (a = e.name.toLowerCase()), a && e.append ? [u, u + "-" + a, 0, u + "Exit", u + "Exit-" + a] : a ? [u, u + "-" + a, u + "Exit", u + "Exit-" + a] : e.append ? [u, 0, u + "Exit"] : [u, u + "Exit"];
|
|
3497
3540
|
}
|
|
3498
3541
|
function Gn(e) {
|
|
@@ -3500,9 +3543,9 @@ function Gn(e) {
|
|
|
3500
3543
|
return a = "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : no(e), { eventIndex: 0, events: a, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
3501
3544
|
}
|
|
3502
3545
|
function Ps(e) {
|
|
3503
|
-
return e[
|
|
3546
|
+
return e[os] = false, e.nodes && e.nodes.forEach((e2) => Ps(e2)), e;
|
|
3504
3547
|
}
|
|
3505
|
-
let
|
|
3548
|
+
let us = {}, ps = class ro {
|
|
3506
3549
|
get content() {
|
|
3507
3550
|
return this.stringify().content;
|
|
3508
3551
|
}
|
|
@@ -3529,19 +3572,19 @@ let cs = {}, us = class ro {
|
|
|
3529
3572
|
}
|
|
3530
3573
|
constructor(e, a, u) {
|
|
3531
3574
|
let m2;
|
|
3532
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof
|
|
3575
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof ts) m2 = Ps(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
3533
3576
|
else {
|
|
3534
|
-
let e2 =
|
|
3577
|
+
let e2 = es;
|
|
3535
3578
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
3536
3579
|
try {
|
|
3537
3580
|
m2 = e2(a, u);
|
|
3538
3581
|
} catch (e3) {
|
|
3539
3582
|
this.processed = true, this.error = e3;
|
|
3540
3583
|
}
|
|
3541
|
-
m2 && !m2[
|
|
3584
|
+
m2 && !m2[ss] && Yo.rebuild(m2);
|
|
3542
3585
|
}
|
|
3543
3586
|
else m2 = Ps(a);
|
|
3544
|
-
this.result = new
|
|
3587
|
+
this.result = new ts(e, m2, u), this.helpers = { ...us, postcss: us, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
3545
3588
|
}
|
|
3546
3589
|
async() {
|
|
3547
3590
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -3575,8 +3618,8 @@ let cs = {}, us = class ro {
|
|
|
3575
3618
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
3576
3619
|
};
|
|
3577
3620
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
3578
|
-
if (!
|
|
3579
|
-
if (!
|
|
3621
|
+
if (!ls[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
3622
|
+
if (!cs[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
3580
3623
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
3581
3624
|
}
|
|
3582
3625
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -3593,8 +3636,8 @@ let cs = {}, us = class ro {
|
|
|
3593
3636
|
}
|
|
3594
3637
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3595
3638
|
let e = this.result.root;
|
|
3596
|
-
for (; !e[
|
|
3597
|
-
e[
|
|
3639
|
+
for (; !e[os]; ) {
|
|
3640
|
+
e[os] = true;
|
|
3598
3641
|
let a = [Gn(e)];
|
|
3599
3642
|
for (; a.length > 0; ) {
|
|
3600
3643
|
let e2 = this.visitTick(a);
|
|
@@ -3639,9 +3682,9 @@ let cs = {}, us = class ro {
|
|
|
3639
3682
|
if (this.error) throw this.error;
|
|
3640
3683
|
if (this.stringified) return this.result;
|
|
3641
3684
|
this.stringified = true, this.sync();
|
|
3642
|
-
let e = this.result.opts, a =
|
|
3685
|
+
let e = this.result.opts, a = rs;
|
|
3643
3686
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
3644
|
-
let u = new
|
|
3687
|
+
let u = new Qo(a, this.result.root, this.result.opts).generate();
|
|
3645
3688
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
3646
3689
|
}
|
|
3647
3690
|
sync() {
|
|
@@ -3653,14 +3696,14 @@ let cs = {}, us = class ro {
|
|
|
3653
3696
|
}
|
|
3654
3697
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3655
3698
|
let e = this.result.root;
|
|
3656
|
-
for (; !e[
|
|
3699
|
+
for (; !e[os]; ) e[os] = true, this.walkSync(e);
|
|
3657
3700
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
3658
3701
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
3659
3702
|
}
|
|
3660
3703
|
return this.result;
|
|
3661
3704
|
}
|
|
3662
3705
|
then(e, a) {
|
|
3663
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
3706
|
+
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(e, a);
|
|
3664
3707
|
}
|
|
3665
3708
|
toString() {
|
|
3666
3709
|
return this.css;
|
|
@@ -3692,22 +3735,22 @@ let cs = {}, us = class ro {
|
|
|
3692
3735
|
}
|
|
3693
3736
|
if (0 !== a.iterator) {
|
|
3694
3737
|
let m3, w3 = a.iterator;
|
|
3695
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
3738
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[os]) return m3[os] = true, void e.push(Gn(m3));
|
|
3696
3739
|
a.iterator = 0, delete u.indexes[w3];
|
|
3697
3740
|
}
|
|
3698
3741
|
let w2 = a.events;
|
|
3699
3742
|
for (; a.eventIndex < w2.length; ) {
|
|
3700
3743
|
let e2 = w2[a.eventIndex];
|
|
3701
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
3744
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[os] = true, a.iterator = u.getIterator()));
|
|
3702
3745
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
3703
3746
|
}
|
|
3704
3747
|
e.pop();
|
|
3705
3748
|
}
|
|
3706
3749
|
walkSync(e) {
|
|
3707
|
-
e[
|
|
3750
|
+
e[os] = true;
|
|
3708
3751
|
let a = no(e);
|
|
3709
3752
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
3710
|
-
e2[
|
|
3753
|
+
e2[os] || this.walkSync(e2);
|
|
3711
3754
|
});
|
|
3712
3755
|
else {
|
|
3713
3756
|
let a2 = this.listeners[u];
|
|
@@ -3718,14 +3761,14 @@ let cs = {}, us = class ro {
|
|
|
3718
3761
|
return this.sync().warnings();
|
|
3719
3762
|
}
|
|
3720
3763
|
};
|
|
3721
|
-
|
|
3722
|
-
|
|
3764
|
+
ps.registerPostcss = (e) => {
|
|
3765
|
+
us = e;
|
|
3723
3766
|
};
|
|
3724
|
-
var
|
|
3725
|
-
|
|
3726
|
-
let
|
|
3727
|
-
const
|
|
3728
|
-
let
|
|
3767
|
+
var ds = ps;
|
|
3768
|
+
ps.default = ps, ns.registerLazyResult(ps), Xo.registerLazyResult(ps);
|
|
3769
|
+
let hs = ao, ms = Go;
|
|
3770
|
+
const gs = Ko;
|
|
3771
|
+
let ys = Qt, ws = so, Ss = class {
|
|
3729
3772
|
get content() {
|
|
3730
3773
|
return this.result.css;
|
|
3731
3774
|
}
|
|
@@ -3746,7 +3789,7 @@ let gs = Xt, ys = so, ws = class {
|
|
|
3746
3789
|
}
|
|
3747
3790
|
get root() {
|
|
3748
3791
|
if (this._root) return this._root;
|
|
3749
|
-
let e, a =
|
|
3792
|
+
let e, a = ms;
|
|
3750
3793
|
try {
|
|
3751
3794
|
e = a(this._css, this._opts);
|
|
3752
3795
|
} catch (e2) {
|
|
@@ -3760,11 +3803,11 @@ let gs = Xt, ys = so, ws = class {
|
|
|
3760
3803
|
}
|
|
3761
3804
|
constructor(e, a, u) {
|
|
3762
3805
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
3763
|
-
let m2, w2 =
|
|
3764
|
-
this.result = new
|
|
3806
|
+
let m2, w2 = ys;
|
|
3807
|
+
this.result = new gs(this._processor, m2, this._opts), this.result.css = a;
|
|
3765
3808
|
let b2 = this;
|
|
3766
3809
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
3767
|
-
let C2 = new
|
|
3810
|
+
let C2 = new hs(w2, m2, this._opts, a);
|
|
3768
3811
|
if (C2.isMap()) {
|
|
3769
3812
|
let [e2, a2] = C2.generate();
|
|
3770
3813
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -3784,7 +3827,7 @@ let gs = Xt, ys = so, ws = class {
|
|
|
3784
3827
|
return this.result;
|
|
3785
3828
|
}
|
|
3786
3829
|
then(e, a) {
|
|
3787
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
3830
|
+
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(e, a);
|
|
3788
3831
|
}
|
|
3789
3832
|
toString() {
|
|
3790
3833
|
return this._css;
|
|
@@ -3793,9 +3836,9 @@ let gs = Xt, ys = so, ws = class {
|
|
|
3793
3836
|
return [];
|
|
3794
3837
|
}
|
|
3795
3838
|
};
|
|
3796
|
-
var
|
|
3797
|
-
|
|
3798
|
-
let
|
|
3839
|
+
var bs = Ss;
|
|
3840
|
+
Ss.default = Ss;
|
|
3841
|
+
let vs = Fn, xs = ds, Ms = bs, Is = Cr, _s = class {
|
|
3799
3842
|
constructor(e = []) {
|
|
3800
3843
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
3801
3844
|
}
|
|
@@ -3811,43 +3854,43 @@ let bs = Dn, vs = ps, xs = Ss, Ms = Sr, Is = class {
|
|
|
3811
3854
|
return a;
|
|
3812
3855
|
}
|
|
3813
3856
|
process(e, a = {}) {
|
|
3814
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
3857
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new xs(this, e, a) : new Ms(this, e, a);
|
|
3815
3858
|
}
|
|
3816
3859
|
use(e) {
|
|
3817
3860
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
3818
3861
|
}
|
|
3819
3862
|
};
|
|
3820
|
-
var
|
|
3821
|
-
|
|
3822
|
-
let
|
|
3863
|
+
var Os = _s;
|
|
3864
|
+
_s.default = _s, Is.registerProcessor(_s), vs.registerProcessor(_s);
|
|
3865
|
+
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;
|
|
3823
3866
|
function L$1(...e) {
|
|
3824
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
3867
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Hs(e);
|
|
3825
3868
|
}
|
|
3826
3869
|
L$1.plugin = function(e, a) {
|
|
3827
3870
|
let u, m2 = false;
|
|
3828
3871
|
function n(...u2) {
|
|
3829
3872
|
console && console.warn && !m2 && (m2 = true, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
3830
3873
|
let w2 = a(...u2);
|
|
3831
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
3874
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new Hs().version, w2;
|
|
3832
3875
|
}
|
|
3833
3876
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
3834
3877
|
return L$1([n(u2)]).process(e2, a2);
|
|
3835
3878
|
}, n;
|
|
3836
|
-
}, L$1.stringify =
|
|
3837
|
-
var
|
|
3879
|
+
}, L$1.stringify = Xs, L$1.parse = qs, L$1.fromJSON = $s, L$1.list = Gs, L$1.comment = (e) => new Ls(e), L$1.atRule = (e) => new Es(e), L$1.decl = (e) => new Ts(e), L$1.rule = (e) => new Ys(e), L$1.root = (e) => new Ks(e), L$1.document = (e) => new Ns(e), 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);
|
|
3880
|
+
var ei = L$1;
|
|
3838
3881
|
L$1.default = L$1;
|
|
3839
|
-
const
|
|
3840
|
-
|
|
3841
|
-
var
|
|
3882
|
+
const ti = Yi(ei);
|
|
3883
|
+
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;
|
|
3884
|
+
var si = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(si || {}), ii = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e[e.Typing = 17] = "Typing", e))(ii || {}), ai = ((e) => (e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd", e[e.TouchCancel = 10] = "TouchCancel", e))(ai || {}), li = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(li || {}), ci = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(ci || {}), ui = ((e) => (e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause", e[e.Seeked = 2] = "Seeked", e[e.VolumeChange = 3] = "VolumeChange", e[e.RateChange = 4] = "RateChange", e))(ui || {});
|
|
3842
3885
|
function G(e, a, u = document) {
|
|
3843
3886
|
const m2 = { capture: true, passive: true };
|
|
3844
3887
|
return u.addEventListener(e, a, m2), () => u.removeEventListener(e, a, m2);
|
|
3845
3888
|
}
|
|
3846
|
-
const
|
|
3847
|
-
let
|
|
3848
|
-
console.error(
|
|
3849
|
-
}, has: () => (console.error(
|
|
3850
|
-
console.error(
|
|
3889
|
+
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.";
|
|
3890
|
+
let di = { map: {}, getId: () => (console.error(pi), -1), getNode: () => (console.error(pi), null), removeNodeFromMap() {
|
|
3891
|
+
console.error(pi);
|
|
3892
|
+
}, has: () => (console.error(pi), false), reset() {
|
|
3893
|
+
console.error(pi);
|
|
3851
3894
|
} };
|
|
3852
3895
|
function $e(e, a, u = {}) {
|
|
3853
3896
|
let m2 = null, w2 = 0;
|
|
@@ -3881,8 +3924,8 @@ function Re(e, a, u) {
|
|
|
3881
3924
|
};
|
|
3882
3925
|
}
|
|
3883
3926
|
}
|
|
3884
|
-
typeof window < "u" && window.Proxy && window.Reflect && (
|
|
3885
|
-
let
|
|
3927
|
+
typeof window < "u" && window.Proxy && window.Reflect && (di = new Proxy(di, { get: (e, a, u) => ("map" === a && console.error(pi), Reflect.get(e, a, u)) }));
|
|
3928
|
+
let hi, fi = Date.now;
|
|
3886
3929
|
function po(e) {
|
|
3887
3930
|
var a, u, m2, w2, b2, C2;
|
|
3888
3931
|
const x2 = e.document;
|
|
@@ -3929,7 +3972,7 @@ function bo(e, a) {
|
|
|
3929
3972
|
function Fs(e) {
|
|
3930
3973
|
return !(null == e || !e.shadowRoot);
|
|
3931
3974
|
}
|
|
3932
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
3975
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (fi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
3933
3976
|
class _l {
|
|
3934
3977
|
constructor() {
|
|
3935
3978
|
b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
@@ -3974,11 +4017,11 @@ function vo(e) {
|
|
|
3974
4017
|
const a = e.ownerDocument;
|
|
3975
4018
|
return !!a && (a.contains(e) || zl(e));
|
|
3976
4019
|
}
|
|
3977
|
-
const M = (e) =>
|
|
4020
|
+
const M = (e) => hi ? (...a) => {
|
|
3978
4021
|
try {
|
|
3979
4022
|
return e(...a);
|
|
3980
4023
|
} catch (e2) {
|
|
3981
|
-
if (
|
|
4024
|
+
if (hi && true === hi(e2)) return;
|
|
3982
4025
|
throw e2;
|
|
3983
4026
|
}
|
|
3984
4027
|
} : e;
|
|
@@ -4037,22 +4080,22 @@ class Vl {
|
|
|
4037
4080
|
transformCrossOriginEvent(e, a) {
|
|
4038
4081
|
var u;
|
|
4039
4082
|
switch (a.type) {
|
|
4040
|
-
case
|
|
4083
|
+
case si.FullSnapshot: {
|
|
4041
4084
|
this.crossOriginIframeMirror.reset(e), this.crossOriginIframeStyleMirror.reset(e), this.replaceIdOnNode(a.data.node, e);
|
|
4042
4085
|
const u2 = a.data.node.id;
|
|
4043
|
-
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type:
|
|
4086
|
+
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type: si.IncrementalSnapshot, data: { source: ii.Mutation, adds: [{ parentId: this.mirror.getId(e), nextId: null, node: a.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
|
|
4044
4087
|
}
|
|
4045
|
-
case
|
|
4046
|
-
case
|
|
4047
|
-
case
|
|
4088
|
+
case si.Meta:
|
|
4089
|
+
case si.Load:
|
|
4090
|
+
case si.DomContentLoaded:
|
|
4048
4091
|
return false;
|
|
4049
|
-
case
|
|
4092
|
+
case si.Plugin:
|
|
4050
4093
|
return a;
|
|
4051
|
-
case
|
|
4094
|
+
case si.Custom:
|
|
4052
4095
|
return this.replaceIds(a.data.payload, e, ["id", "parentId", "previousId", "nextId"]), a;
|
|
4053
|
-
case
|
|
4096
|
+
case si.IncrementalSnapshot:
|
|
4054
4097
|
switch (a.data.source) {
|
|
4055
|
-
case
|
|
4098
|
+
case ii.Mutation:
|
|
4056
4099
|
return a.data.adds.forEach((a2) => {
|
|
4057
4100
|
this.replaceIds(a2, e, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a2.node, e);
|
|
4058
4101
|
const u2 = this.crossOriginIframeRootIdMap.get(e);
|
|
@@ -4064,30 +4107,30 @@ class Vl {
|
|
|
4064
4107
|
}), a.data.texts.forEach((a2) => {
|
|
4065
4108
|
this.replaceIds(a2, e, ["id"]);
|
|
4066
4109
|
}), a;
|
|
4067
|
-
case
|
|
4068
|
-
case
|
|
4069
|
-
case
|
|
4110
|
+
case ii.Drag:
|
|
4111
|
+
case ii.TouchMove:
|
|
4112
|
+
case ii.MouseMove:
|
|
4070
4113
|
return a.data.positions.forEach((a2) => {
|
|
4071
4114
|
this.replaceIds(a2, e, ["id"]);
|
|
4072
4115
|
}), a;
|
|
4073
|
-
case
|
|
4116
|
+
case ii.ViewportResize:
|
|
4074
4117
|
return false;
|
|
4075
|
-
case
|
|
4076
|
-
case
|
|
4077
|
-
case
|
|
4078
|
-
case
|
|
4079
|
-
case
|
|
4118
|
+
case ii.MediaInteraction:
|
|
4119
|
+
case ii.MouseInteraction:
|
|
4120
|
+
case ii.Scroll:
|
|
4121
|
+
case ii.CanvasMutation:
|
|
4122
|
+
case ii.Input:
|
|
4080
4123
|
return this.replaceIds(a.data, e, ["id"]), a;
|
|
4081
|
-
case
|
|
4082
|
-
case
|
|
4124
|
+
case ii.StyleSheetRule:
|
|
4125
|
+
case ii.StyleDeclaration:
|
|
4083
4126
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleId"]), a;
|
|
4084
|
-
case
|
|
4127
|
+
case ii.Font:
|
|
4085
4128
|
return a;
|
|
4086
|
-
case
|
|
4129
|
+
case ii.Selection:
|
|
4087
4130
|
return a.data.ranges.forEach((a2) => {
|
|
4088
4131
|
this.replaceIds(a2, e, ["start", "end"]);
|
|
4089
4132
|
}), a;
|
|
4090
|
-
case
|
|
4133
|
+
case ii.AdoptedStyleSheet:
|
|
4091
4134
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleIds"]), null == (u = a.data.styles) || u.forEach((a2) => {
|
|
4092
4135
|
this.replaceStyleIds(a2, e, ["styleId"]);
|
|
4093
4136
|
}), a;
|
|
@@ -4111,7 +4154,7 @@ class Vl {
|
|
|
4111
4154
|
});
|
|
4112
4155
|
}
|
|
4113
4156
|
patchRootIdOnNode(e, a) {
|
|
4114
|
-
e.type !==
|
|
4157
|
+
e.type !== ht.Document && !e.rootId && (e.rootId = a), "childNodes" in e && e.childNodes.forEach((e2) => {
|
|
4115
4158
|
this.patchRootIdOnNode(e2, a);
|
|
4116
4159
|
});
|
|
4117
4160
|
}
|
|
@@ -4329,7 +4372,7 @@ function ko(e, a) {
|
|
|
4329
4372
|
const { parentNode: u } = a;
|
|
4330
4373
|
return !!u && (!!e.has(u) || ko(e, u));
|
|
4331
4374
|
}
|
|
4332
|
-
const
|
|
4375
|
+
const mi = [];
|
|
4333
4376
|
function tt(e) {
|
|
4334
4377
|
try {
|
|
4335
4378
|
if ("composedPath" in e) {
|
|
@@ -4343,7 +4386,7 @@ function tt(e) {
|
|
|
4343
4386
|
function Co(e, a) {
|
|
4344
4387
|
var u, m2;
|
|
4345
4388
|
const w2 = new Zl();
|
|
4346
|
-
|
|
4389
|
+
mi.push(w2), w2.init(e);
|
|
4347
4390
|
let b2 = window.MutationObserver || window.__rrMutationObserver;
|
|
4348
4391
|
const C2 = null == (m2 = null == (u = null == window ? void 0 : window.Zone) ? void 0 : u.__symbol__) ? void 0 : m2.call(u, "MutationObserver");
|
|
4349
4392
|
C2 && window[C2] && (b2 = window[C2]);
|
|
@@ -4355,7 +4398,7 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4355
4398
|
};
|
|
4356
4399
|
const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
|
|
4357
4400
|
let I2 = null;
|
|
4358
|
-
return Object.keys(
|
|
4401
|
+
return Object.keys(ai).filter((e2) => Number.isNaN(Number(e2)) && !e2.endsWith("_Departed") && false !== C2[e2]).forEach((b3) => {
|
|
4359
4402
|
let C3 = fe(b3);
|
|
4360
4403
|
const _2 = /* @__PURE__ */ ((a2) => (b4) => {
|
|
4361
4404
|
const C4 = tt(b4);
|
|
@@ -4364,29 +4407,29 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4364
4407
|
if ("pointerType" in b4) {
|
|
4365
4408
|
switch (b4.pointerType) {
|
|
4366
4409
|
case "mouse":
|
|
4367
|
-
x3 =
|
|
4410
|
+
x3 = li.Mouse;
|
|
4368
4411
|
break;
|
|
4369
4412
|
case "touch":
|
|
4370
|
-
x3 =
|
|
4413
|
+
x3 = li.Touch;
|
|
4371
4414
|
break;
|
|
4372
4415
|
case "pen":
|
|
4373
|
-
x3 =
|
|
4416
|
+
x3 = li.Pen;
|
|
4374
4417
|
}
|
|
4375
|
-
x3 ===
|
|
4376
|
-
} else Ds(b4) && (x3 =
|
|
4377
|
-
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 ===
|
|
4418
|
+
x3 === li.Touch ? ai[a2] === ai.MouseDown ? _3 = "TouchStart" : ai[a2] === ai.MouseUp && (_3 = "TouchEnd") : li.Pen;
|
|
4419
|
+
} else Ds(b4) && (x3 = li.Touch);
|
|
4420
|
+
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === li.Touch || _3.startsWith("Mouse") && x3 === li.Mouse) && (x3 = null)) : ai[a2] === ai.Click && (x3 = I2, I2 = null);
|
|
4378
4421
|
const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
|
|
4379
4422
|
if (!O2) return;
|
|
4380
4423
|
const E2 = u.getId(C4), { clientX: D2, clientY: F2 } = O2;
|
|
4381
|
-
M(e)({ type:
|
|
4424
|
+
M(e)({ type: ai[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
|
|
4382
4425
|
})(b3);
|
|
4383
|
-
if (window.PointerEvent) switch (
|
|
4384
|
-
case
|
|
4385
|
-
case
|
|
4426
|
+
if (window.PointerEvent) switch (ai[b3]) {
|
|
4427
|
+
case ai.MouseDown:
|
|
4428
|
+
case ai.MouseUp:
|
|
4386
4429
|
C3 = C3.replace("mouse", "pointer");
|
|
4387
4430
|
break;
|
|
4388
|
-
case
|
|
4389
|
-
case
|
|
4431
|
+
case ai.TouchStart:
|
|
4432
|
+
case ai.TouchEnd:
|
|
4390
4433
|
return;
|
|
4391
4434
|
}
|
|
4392
4435
|
x2.push(G(C3, _2, a));
|
|
@@ -4405,7 +4448,7 @@ function xo({ scrollCb: e, doc: a, mirror: u, blockClass: m2, blockSelector: w2,
|
|
|
4405
4448
|
} else e({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
|
|
4406
4449
|
}), b2.scroll || 100)), a);
|
|
4407
4450
|
}
|
|
4408
|
-
const
|
|
4451
|
+
const gi = ["INPUT", "TEXTAREA", "SELECT"], yi = /* @__PURE__ */ new WeakMap();
|
|
4409
4452
|
function ql({ deviceChangeCb: e }) {
|
|
4410
4453
|
const t = (a2, u2) => {
|
|
4411
4454
|
const m2 = a2.device.productName ? [a2.device.productName] : ["Unknown USB Device"];
|
|
@@ -4525,7 +4568,7 @@ function au(e, a = {}) {
|
|
|
4525
4568
|
e2(x3.map((e3) => (e3.timeOffset -= u3, e3)), a3), x3 = [], C3 = null;
|
|
4526
4569
|
}), b3), _3 = M($e(M((e3) => {
|
|
4527
4570
|
const a3 = tt(e3), { clientX: u3, clientY: w4 } = Ds(e3) ? e3.changedTouches[0] : e3;
|
|
4528
|
-
C3 || (C3 =
|
|
4571
|
+
C3 || (C3 = fi()), x3.push({ x: u3, y: w4, id: m3.getId(a3), timeOffset: fi() - C3 }), I3(typeof DragEvent < "u" && e3 instanceof DragEvent ? ii.Drag : e3 instanceof MouseEvent ? ii.MouseMove : ii.TouchMove);
|
|
4529
4572
|
}), w3, { trailing: false })), O3 = [G("mousemove", _3, u2), G("touchmove", _3, u2), G("drag", _3, u2)];
|
|
4530
4573
|
return M(() => {
|
|
4531
4574
|
O3.forEach((e3) => e3());
|
|
@@ -4541,7 +4584,7 @@ function au(e, a = {}) {
|
|
|
4541
4584
|
function p(e3) {
|
|
4542
4585
|
let u3 = tt(e3);
|
|
4543
4586
|
const _4 = e3.isTrusted, E4 = u3 && u3.tagName;
|
|
4544
|
-
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 ||
|
|
4587
|
+
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 || gi.indexOf(E4) < 0 || Z(u3, m3, w3, true) || u3.classList.contains(b3) || C3 && u3.matches(C3)) return;
|
|
4545
4588
|
let D4 = u3.value, F4 = false;
|
|
4546
4589
|
const U4 = Yt(u3) || "", { value: B2, masked: $2 } = Zt({ element: u3, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
|
|
4547
4590
|
D4 = B2, ("radio" === U4 || "checkbox" === U4) && (F4 = u3.checked), f2(u3, O3 ? { text: D4, isChecked: F4, masked: $2, userTriggered: _4 } : { text: D4, isChecked: F4, masked: $2 });
|
|
@@ -4554,9 +4597,9 @@ function au(e, a = {}) {
|
|
|
4554
4597
|
});
|
|
4555
4598
|
}
|
|
4556
4599
|
function f2(a3, m4) {
|
|
4557
|
-
const w4 =
|
|
4600
|
+
const w4 = yi.get(a3);
|
|
4558
4601
|
if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
|
|
4559
|
-
|
|
4602
|
+
yi.set(a3, m4);
|
|
4560
4603
|
const w5 = u2.getId(a3);
|
|
4561
4604
|
M(e2)({ ...m4, id: w5 });
|
|
4562
4605
|
}
|
|
@@ -4581,7 +4624,7 @@ function au(e, a = {}) {
|
|
|
4581
4624
|
const { value: e3, masked: a4 } = Zt({ element: w4, maskInputOptions: u2, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
|
|
4582
4625
|
_3 = e3, b3 = a4;
|
|
4583
4626
|
}
|
|
4584
|
-
e2({ source:
|
|
4627
|
+
e2({ source: ii.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e3) => {
|
|
4585
4628
|
var a4;
|
|
4586
4629
|
const u3 = [];
|
|
4587
4630
|
for (; e3; ) {
|
|
@@ -4609,7 +4652,7 @@ function au(e, a = {}) {
|
|
|
4609
4652
|
if (!C4 || Z(C4, a2, u2, true)) return;
|
|
4610
4653
|
const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
|
|
4611
4654
|
e2({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
|
|
4612
|
-
}), w3.media || 500)), x3 = [G("play", C3(
|
|
4655
|
+
}), 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)];
|
|
4613
4656
|
return M(() => {
|
|
4614
4657
|
x3.forEach((e3) => e3());
|
|
4615
4658
|
});
|
|
@@ -4730,7 +4773,7 @@ function au(e, a = {}) {
|
|
|
4730
4773
|
})(e), U2 = [];
|
|
4731
4774
|
for (const a2 of e.plugins) U2.push(a2.observer(a2.callback, u, a2.options));
|
|
4732
4775
|
return M(() => {
|
|
4733
|
-
|
|
4776
|
+
mi.forEach((e2) => e2.reset()), null == m2 || m2.disconnect(), w2(), b2(), C2(), x2(), I2(), _2(), E2(), f(), d2(), g2(), h(), D2(), F2(), O2(), U2.forEach((e2) => e2());
|
|
4734
4777
|
});
|
|
4735
4778
|
}
|
|
4736
4779
|
function ft(e) {
|
|
@@ -4739,29 +4782,29 @@ function ft(e) {
|
|
|
4739
4782
|
function mt(e) {
|
|
4740
4783
|
return !!(typeof window[e] < "u" && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype);
|
|
4741
4784
|
}
|
|
4742
|
-
const
|
|
4743
|
-
var
|
|
4785
|
+
const Mi = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", Ii = typeof self < "u" && self.Blob && new Blob([(Li = Mi, Uint8Array.from(atob(Li), (e) => e.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
|
|
4786
|
+
var Li;
|
|
4744
4787
|
function uu(e) {
|
|
4745
4788
|
let a;
|
|
4746
4789
|
try {
|
|
4747
|
-
if (a =
|
|
4790
|
+
if (a = Ii && (self.URL || self.webkitURL).createObjectURL(Ii), !a) throw "";
|
|
4748
4791
|
const u = new Worker(a, { name: null == e ? void 0 : e.name });
|
|
4749
4792
|
return u.addEventListener("error", () => {
|
|
4750
4793
|
(self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4751
4794
|
}), u;
|
|
4752
4795
|
} catch {
|
|
4753
|
-
return new Worker("data:text/javascript;base64," +
|
|
4796
|
+
return new Worker("data:text/javascript;base64," + Mi, { name: null == e ? void 0 : e.name });
|
|
4754
4797
|
} finally {
|
|
4755
4798
|
a && (self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4756
4799
|
}
|
|
4757
4800
|
}
|
|
4758
|
-
for (var
|
|
4759
|
-
const
|
|
4801
|
+
for (var Ri = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ai = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Ti = 0; Ti < 64; Ti++) Ai[Ri.charCodeAt(Ti)] = Ti;
|
|
4802
|
+
const Ni = /* @__PURE__ */ new Map();
|
|
4760
4803
|
const Oo = (e, a, u) => {
|
|
4761
4804
|
if (!e || !Ro(e, a) && "object" != typeof e) return;
|
|
4762
4805
|
const m2 = (function pu(e2, a2) {
|
|
4763
|
-
let u2 =
|
|
4764
|
-
return u2 || (u2 = /* @__PURE__ */ new Map(),
|
|
4806
|
+
let u2 = Ni.get(e2);
|
|
4807
|
+
return u2 || (u2 = /* @__PURE__ */ new Map(), Ni.set(e2, u2)), u2.has(a2) || u2.set(a2, []), u2.get(a2);
|
|
4765
4808
|
})(u, e.constructor.name);
|
|
4766
4809
|
let w2 = m2.indexOf(e);
|
|
4767
4810
|
return -1 === w2 && (w2 = m2.length, m2.push(e)), w2;
|
|
@@ -4773,7 +4816,7 @@ function Ot(e, a, u) {
|
|
|
4773
4816
|
if (e instanceof ArrayBuffer) {
|
|
4774
4817
|
const a2 = e.constructor.name, u2 = (function(e2) {
|
|
4775
4818
|
var a3, u3 = new Uint8Array(e2), m2 = u3.length, w2 = "";
|
|
4776
|
-
for (a3 = 0; a3 < m2; a3 += 3) w2 +=
|
|
4819
|
+
for (a3 = 0; a3 < m2; a3 += 3) w2 += Ri[u3[a3] >> 2], w2 += Ri[(3 & u3[a3]) << 4 | u3[a3 + 1] >> 4], w2 += Ri[(15 & u3[a3 + 1]) << 2 | u3[a3 + 2] >> 6], w2 += Ri[63 & u3[a3 + 2]];
|
|
4777
4820
|
return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
|
|
4778
4821
|
})(e);
|
|
4779
4822
|
return { rr_type: a2, base64: u2 };
|
|
@@ -4870,7 +4913,7 @@ class gu {
|
|
|
4870
4913
|
const { id: a2 } = e2.data;
|
|
4871
4914
|
if (C2.set(a2, false), !("base64" in e2.data)) return;
|
|
4872
4915
|
const { base64: u2, type: m3, width: w3, height: b3 } = e2.data;
|
|
4873
|
-
this.mutationCb({ id: a2, type:
|
|
4916
|
+
this.mutationCb({ id: a2, 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: u2 }], type: m3 }] }, 0, 0] }] });
|
|
4874
4917
|
};
|
|
4875
4918
|
const I2 = 1e3 / e;
|
|
4876
4919
|
let _2, O2 = 0;
|
|
@@ -4906,14 +4949,14 @@ class gu {
|
|
|
4906
4949
|
return function(...b5) {
|
|
4907
4950
|
return Z(this.canvas, u2, m3, true) || setTimeout(() => {
|
|
4908
4951
|
const u3 = Eo(b5, a2, this);
|
|
4909
|
-
e2(this.canvas, { type:
|
|
4952
|
+
e2(this.canvas, { type: ci["2D"], property: C2, args: u3 });
|
|
4910
4953
|
}, 0), w4.apply(this, b5);
|
|
4911
4954
|
};
|
|
4912
4955
|
});
|
|
4913
4956
|
w3.push(b4);
|
|
4914
4957
|
} catch {
|
|
4915
4958
|
const u3 = qt(a2.CanvasRenderingContext2D.prototype, C2, { set(a3) {
|
|
4916
|
-
e2(this.canvas, { type:
|
|
4959
|
+
e2(this.canvas, { type: ci["2D"], property: C2, args: [a3], setter: true });
|
|
4917
4960
|
} });
|
|
4918
4961
|
w3.push(u3);
|
|
4919
4962
|
}
|
|
@@ -4922,7 +4965,7 @@ class gu {
|
|
|
4922
4965
|
};
|
|
4923
4966
|
})(this.processMutation.bind(this), e, a, u), b2 = (function mu(e2, a2, u2, m3) {
|
|
4924
4967
|
const w3 = [];
|
|
4925
|
-
return w3.push(...tr(a2.WebGLRenderingContext.prototype,
|
|
4968
|
+
return w3.push(...tr(a2.WebGLRenderingContext.prototype, ci.WebGL, e2, u2, m3, a2)), typeof a2.WebGL2RenderingContext < "u" && w3.push(...tr(a2.WebGL2RenderingContext.prototype, ci.WebGL2, e2, u2, m3, a2)), () => {
|
|
4926
4969
|
w3.forEach((e3) => e3());
|
|
4927
4970
|
};
|
|
4928
4971
|
})(this.processMutation.bind(this), e, a, u);
|
|
@@ -5033,23 +5076,23 @@ class bu {
|
|
|
5033
5076
|
trackStylesheetInLinkElement(e) {
|
|
5034
5077
|
}
|
|
5035
5078
|
}
|
|
5036
|
-
let
|
|
5037
|
-
var
|
|
5079
|
+
let Pi, qi, Hi, Ji = false;
|
|
5080
|
+
var Xi;
|
|
5038
5081
|
try {
|
|
5039
5082
|
if (2 !== Array.from([1], (e) => 2 * e)[0]) {
|
|
5040
5083
|
const e = document.createElement("iframe");
|
|
5041
|
-
document.body.appendChild(e), Array.from = (null == (
|
|
5084
|
+
document.body.appendChild(e), Array.from = (null == (Xi = e.contentWindow) ? void 0 : Xi.Array.from) || Array.from, document.body.removeChild(e);
|
|
5042
5085
|
}
|
|
5043
|
-
} catch (
|
|
5044
|
-
console.debug("Unable to override Array.from",
|
|
5086
|
+
} catch (Li2) {
|
|
5087
|
+
console.debug("Unable to override Array.from", Li2);
|
|
5045
5088
|
}
|
|
5046
|
-
const
|
|
5047
|
-
return new
|
|
5089
|
+
const Qi = (function Ci() {
|
|
5090
|
+
return new gt();
|
|
5048
5091
|
})();
|
|
5049
5092
|
function ae(e = {}) {
|
|
5050
5093
|
const { emit: a, checkoutEveryNms: u, 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" === e.recordAfter ? e.recordAfter : "load", userTriggeredOnInput: Q2 = false, collectFonts: ee2 = false, inlineImages: te2 = false, plugins: ne2, keepIframeSrcFn: re2 = () => false, ignoreCSSAttributes: oe2 = /* @__PURE__ */ new Set([]), errorHandler: se2 } = e;
|
|
5051
5094
|
!(function Bl(e2) {
|
|
5052
|
-
|
|
5095
|
+
hi = e2;
|
|
5053
5096
|
})(se2);
|
|
5054
5097
|
const ie2 = !Y2 || window.parent === window;
|
|
5055
5098
|
let le2 = false;
|
|
@@ -5061,7 +5104,7 @@ function ae(e = {}) {
|
|
|
5061
5104
|
if (ie2 && !a) throw new Error("emit function is required");
|
|
5062
5105
|
if (!ie2 && !le2) return () => {
|
|
5063
5106
|
};
|
|
5064
|
-
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2),
|
|
5107
|
+
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), Qi.reset();
|
|
5065
5108
|
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 || {};
|
|
5066
5109
|
!(function Ul(e2 = window) {
|
|
5067
5110
|
"NodeList" in e2 && !e2.NodeList.prototype.forEach && (e2.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e2 && !e2.DOMTokenList.prototype.forEach && (e2.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...e3) => {
|
|
@@ -5078,57 +5121,57 @@ function ae(e = {}) {
|
|
|
5078
5121
|
for (const a2 of ne2 || []) a2.eventProcessor && (e2 = a2.eventProcessor(e2));
|
|
5079
5122
|
return z2 && !le2 && (e2 = z2(e2)), e2;
|
|
5080
5123
|
};
|
|
5081
|
-
|
|
5124
|
+
Pi = (e2, w3) => {
|
|
5082
5125
|
var b3;
|
|
5083
5126
|
const C3 = e2;
|
|
5084
|
-
if (C3.timestamp =
|
|
5127
|
+
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((e3) => e3.unfreeze()), ie2) null == a || a(vn(C3), w3);
|
|
5085
5128
|
else if (le2) {
|
|
5086
5129
|
const e3 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
|
|
5087
5130
|
window.parent.postMessage(e3, "*");
|
|
5088
5131
|
}
|
|
5089
|
-
if (C3.type ===
|
|
5090
|
-
else if (C3.type ===
|
|
5091
|
-
if (C3.data.source ===
|
|
5132
|
+
if (C3.type === si.FullSnapshot) de2 = C3, he2 = 0;
|
|
5133
|
+
else if (C3.type === si.IncrementalSnapshot) {
|
|
5134
|
+
if (C3.data.source === ii.Mutation && C3.data.isAttachIframe) return;
|
|
5092
5135
|
he2++;
|
|
5093
5136
|
const e3 = m2 && he2 >= m2, a2 = u && C3.timestamp - de2.timestamp > u;
|
|
5094
|
-
(e3 || a2) &&
|
|
5137
|
+
(e3 || a2) && qi(true);
|
|
5095
5138
|
}
|
|
5096
5139
|
};
|
|
5097
5140
|
const rt = (e2) => {
|
|
5098
|
-
|
|
5099
|
-
}, kn = (e2) =>
|
|
5100
|
-
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror:
|
|
5141
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.Mutation, ...e2 } });
|
|
5142
|
+
}, kn = (e2) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Scroll, ...e2 } }), Cn = (e2) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.CanvasMutation, ...e2 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e2) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.AdoptedStyleSheet, ...e2 } }) }), ge2 = new Vl({ mirror: Qi, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: Pi });
|
|
5143
|
+
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror: Qi, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
|
|
5101
5144
|
const ye2 = new yu();
|
|
5102
|
-
|
|
5103
|
-
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:
|
|
5104
|
-
|
|
5145
|
+
Hi = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: Qi, sampling: j2.canvas, dataURLOptions: V2 });
|
|
5146
|
+
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 });
|
|
5147
|
+
qi = (e2 = false) => {
|
|
5105
5148
|
if (!H2) return;
|
|
5106
|
-
|
|
5149
|
+
Pi({ type: si.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e2), me2.reset(), we2.init(), mi.forEach((e3) => e3.lock());
|
|
5107
5150
|
const a2 = (function Zi(e3, a3) {
|
|
5108
|
-
const { mirror: u2 = new
|
|
5151
|
+
const { mirror: u2 = 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 } = a3 || {};
|
|
5109
5152
|
return Se(e3, { doc: e3, mirror: u2, 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 });
|
|
5110
|
-
})(document, { mirror:
|
|
5111
|
-
wo(e3,
|
|
5153
|
+
})(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: (e3) => {
|
|
5154
|
+
wo(e3, Qi) && ge2.addIframe(e3), bo(e3, Qi) && me2.trackLinkElement(e3), Fs(e3) && we2.addShadowRoot(e3.shadowRoot, document);
|
|
5112
5155
|
}, onIframeLoad: (e3, a3) => {
|
|
5113
5156
|
ge2.attachIframe(e3, a3), we2.observeAttachShadow(e3);
|
|
5114
5157
|
}, onStylesheetLoad: (e3, a3) => {
|
|
5115
5158
|
me2.attachLinkElement(e3, a3);
|
|
5116
5159
|
}, keepIframeSrcFn: re2 });
|
|
5117
5160
|
if (!a2) return console.warn("Failed to snapshot the document");
|
|
5118
|
-
|
|
5161
|
+
Pi({ type: si.FullSnapshot, data: { node: a2, initialOffset: po(window) } }, e2), mi.forEach((e3) => e3.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, Qi.getId(document));
|
|
5119
5162
|
};
|
|
5120
5163
|
try {
|
|
5121
5164
|
const e2 = [], K = (e3) => {
|
|
5122
5165
|
var a2;
|
|
5123
|
-
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) =>
|
|
5124
|
-
|
|
5166
|
+
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) => Pi({ type: si.IncrementalSnapshot, data: { source: a3, positions: e4 } }), mouseInteractionCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.MouseInteraction, ...e4 } }), scrollCb: kn, viewportResizeCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.ViewportResize, ...e4 } }), inputCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Input, ...e4 } }), mediaInteractionCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.MediaInteraction, ...e4 } }), styleSheetRuleCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.StyleSheetRule, ...e4 } }), styleDeclarationCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.StyleDeclaration, ...e4 } }), canvasMutationCb: Cn, fontCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Font, ...e4 } }), selectionCb: (e4) => {
|
|
5167
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.Selection, ...e4 } });
|
|
5125
5168
|
}, customElementCb: (e4) => {
|
|
5126
|
-
|
|
5169
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.CustomElement, ...e4 } });
|
|
5127
5170
|
}, typingCb: (e4) => {
|
|
5128
|
-
|
|
5171
|
+
Pi({ type: si.IncrementalSnapshot, data: { ...e4 } });
|
|
5129
5172
|
}, deviceChangeCb: (e4) => {
|
|
5130
|
-
|
|
5131
|
-
}, 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: e3, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror:
|
|
5173
|
+
Pi({ type: si.Device, data: { ...e4 } });
|
|
5174
|
+
}, 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: e3, 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 == (a2 = null == ne2 ? void 0 : ne2.filter((e4) => e4.observer)) ? void 0 : a2.map((e4) => ({ observer: e4.observer, options: e4.options, callback: (a3) => Pi({ type: si.Plugin, data: { plugin: e4.name, payload: a3 } }) }))) || [] }, $2);
|
|
5132
5175
|
};
|
|
5133
5176
|
ge2.addLoadListener((a2) => {
|
|
5134
5177
|
try {
|
|
@@ -5138,15 +5181,15 @@ function ae(e = {}) {
|
|
|
5138
5181
|
}
|
|
5139
5182
|
});
|
|
5140
5183
|
const W = () => {
|
|
5141
|
-
|
|
5184
|
+
qi(), e2.push(K(document)), Ji = true;
|
|
5142
5185
|
};
|
|
5143
5186
|
return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e2.push(G("DOMContentLoaded", () => {
|
|
5144
|
-
|
|
5187
|
+
Pi({ type: si.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
|
|
5145
5188
|
})), e2.push(G("load", () => {
|
|
5146
|
-
|
|
5189
|
+
Pi({ type: si.Load, data: {} }), "load" === X2 && W();
|
|
5147
5190
|
}, window))), () => {
|
|
5148
|
-
e2.forEach((e3) => e3()), ye2.destroy(),
|
|
5149
|
-
|
|
5191
|
+
e2.forEach((e3) => e3()), ye2.destroy(), Ji = false, (function jl() {
|
|
5192
|
+
hi = void 0;
|
|
5150
5193
|
})();
|
|
5151
5194
|
};
|
|
5152
5195
|
} catch (e2) {
|
|
@@ -5173,24 +5216,24 @@ function vu(e) {
|
|
|
5173
5216
|
}), u;
|
|
5174
5217
|
}
|
|
5175
5218
|
ae.addCustomEvent = (e, a) => {
|
|
5176
|
-
if (!
|
|
5177
|
-
|
|
5219
|
+
if (!Ji) throw new Error("please add custom event after start recording");
|
|
5220
|
+
Pi({ type: si.Custom, data: { tag: e, payload: a } });
|
|
5178
5221
|
}, ae.addSailfishEvent = (e, a) => {
|
|
5179
|
-
if (!
|
|
5180
|
-
|
|
5222
|
+
if (!Ji) throw new Error("please add Sailfish event after start recording");
|
|
5223
|
+
Pi({ type: e, data: { tag: "sailfish-zendesk-test-tag", payload: a } });
|
|
5181
5224
|
}, ae.freezePage = () => {
|
|
5182
|
-
|
|
5225
|
+
mi.forEach((e) => e.freeze());
|
|
5183
5226
|
}, ae.takeFullSnapshot = (e) => {
|
|
5184
|
-
if (!
|
|
5185
|
-
|
|
5186
|
-
}, ae.mirror =
|
|
5187
|
-
var
|
|
5188
|
-
return { isColorSupported: false, reset:
|
|
5227
|
+
if (!Ji) throw new Error("please take full snapshot after start recording");
|
|
5228
|
+
qi(e);
|
|
5229
|
+
}, ae.mirror = Qi;
|
|
5230
|
+
var ea = { exports: {} }, ta = String, Lo = function() {
|
|
5231
|
+
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 };
|
|
5189
5232
|
};
|
|
5190
|
-
|
|
5191
|
-
var
|
|
5192
|
-
const
|
|
5193
|
-
let
|
|
5233
|
+
ea.exports = Lo(), ea.exports.createColors = Lo;
|
|
5234
|
+
var na = ea.exports;
|
|
5235
|
+
const ra = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
5236
|
+
let oa = na, sa = ra, ia = class To extends Error {
|
|
5194
5237
|
constructor(e, a, u, m2, w2, b2) {
|
|
5195
5238
|
super(e), this.name = "CssSyntaxError", this.reason = e, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a < "u" && typeof u < "u" && ("number" == typeof a ? (this.line = a, this.column = u) : (this.line = a.line, this.column = a.column, this.endLine = u.line, this.endColumn = u.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, To);
|
|
5196
5239
|
}
|
|
@@ -5200,11 +5243,11 @@ let ra = ta, oa = na, sa = class To extends Error {
|
|
|
5200
5243
|
showSourceCode(e) {
|
|
5201
5244
|
if (!this.source) return "";
|
|
5202
5245
|
let a = this.source;
|
|
5203
|
-
null == e && (e =
|
|
5246
|
+
null == e && (e = oa.isColorSupported);
|
|
5204
5247
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
5205
5248
|
if (e) {
|
|
5206
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
5207
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
5249
|
+
let { bold: e2, gray: a2, red: u2 } = oa.createColors(true);
|
|
5250
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), sa && (i = (e3) => sa(e3));
|
|
5208
5251
|
}
|
|
5209
5252
|
let u = a.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u.length), b2 = String(w2).length;
|
|
5210
5253
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -5225,10 +5268,10 @@ let ra = ta, oa = na, sa = class To extends Error {
|
|
|
5225
5268
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
5226
5269
|
}
|
|
5227
5270
|
};
|
|
5228
|
-
var
|
|
5229
|
-
|
|
5230
|
-
const
|
|
5231
|
-
let
|
|
5271
|
+
var aa = ia;
|
|
5272
|
+
ia.default = ia;
|
|
5273
|
+
const la = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
5274
|
+
let ca = class {
|
|
5232
5275
|
constructor(e) {
|
|
5233
5276
|
this.builder = e;
|
|
5234
5277
|
}
|
|
@@ -5280,7 +5323,7 @@ let la = class {
|
|
|
5280
5323
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
5281
5324
|
let w2 = e.parent;
|
|
5282
5325
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
5283
|
-
if (!w2) return
|
|
5326
|
+
if (!w2) return la[u];
|
|
5284
5327
|
let b2 = e.root();
|
|
5285
5328
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
5286
5329
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -5292,7 +5335,7 @@ let la = class {
|
|
|
5292
5335
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
5293
5336
|
});
|
|
5294
5337
|
}
|
|
5295
|
-
return typeof m2 > "u" && (m2 =
|
|
5338
|
+
return typeof m2 > "u" && (m2 = la[u]), b2.rawCache[u] = m2, m2;
|
|
5296
5339
|
}
|
|
5297
5340
|
rawBeforeClose(e) {
|
|
5298
5341
|
let a;
|
|
@@ -5368,17 +5411,17 @@ let la = class {
|
|
|
5368
5411
|
this[e.type](e, a);
|
|
5369
5412
|
}
|
|
5370
5413
|
};
|
|
5371
|
-
var
|
|
5372
|
-
|
|
5373
|
-
let
|
|
5414
|
+
var ua = ca;
|
|
5415
|
+
ca.default = ca;
|
|
5416
|
+
let pa = ua;
|
|
5374
5417
|
function zs(e, a) {
|
|
5375
|
-
new
|
|
5418
|
+
new pa(a).stringify(e);
|
|
5376
5419
|
}
|
|
5377
|
-
var
|
|
5420
|
+
var ha = zs;
|
|
5378
5421
|
zs.default = zs;
|
|
5379
|
-
var
|
|
5380
|
-
|
|
5381
|
-
let
|
|
5422
|
+
var fa = {};
|
|
5423
|
+
fa.isClean = Symbol("isClean"), fa.my = Symbol("my");
|
|
5424
|
+
let ma = aa, ga = ua, ya = ha, { isClean: wa, my: Sa } = fa;
|
|
5382
5425
|
function Bs(e, a) {
|
|
5383
5426
|
let u = new e.constructor();
|
|
5384
5427
|
for (let m2 in e) {
|
|
@@ -5400,12 +5443,12 @@ function Fe(e, a) {
|
|
|
5400
5443
|
}
|
|
5401
5444
|
return w2;
|
|
5402
5445
|
}
|
|
5403
|
-
let
|
|
5446
|
+
let ba = class {
|
|
5404
5447
|
get proxyOf() {
|
|
5405
5448
|
return this;
|
|
5406
5449
|
}
|
|
5407
5450
|
constructor(e = {}) {
|
|
5408
|
-
this.raws = {}, this[
|
|
5451
|
+
this.raws = {}, this[wa] = false, this[Sa] = true;
|
|
5409
5452
|
for (let a in e) if ("nodes" === a) {
|
|
5410
5453
|
this.nodes = [];
|
|
5411
5454
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -5449,19 +5492,19 @@ let Sa = class {
|
|
|
5449
5492
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
5450
5493
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
5451
5494
|
}
|
|
5452
|
-
return new
|
|
5495
|
+
return new ma(e);
|
|
5453
5496
|
}
|
|
5454
5497
|
getProxyProcessor() {
|
|
5455
5498
|
return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
|
|
5456
5499
|
}
|
|
5457
5500
|
markClean() {
|
|
5458
|
-
this[
|
|
5501
|
+
this[wa] = true;
|
|
5459
5502
|
}
|
|
5460
5503
|
markDirty() {
|
|
5461
|
-
if (this[
|
|
5462
|
-
this[
|
|
5504
|
+
if (this[wa]) {
|
|
5505
|
+
this[wa] = false;
|
|
5463
5506
|
let e = this;
|
|
5464
|
-
for (; e = e.parent; ) e[
|
|
5507
|
+
for (; e = e.parent; ) e[wa] = false;
|
|
5465
5508
|
}
|
|
5466
5509
|
}
|
|
5467
5510
|
next() {
|
|
@@ -5497,7 +5540,7 @@ let Sa = class {
|
|
|
5497
5540
|
return (u.line < a.line || u.line === a.line && u.column <= a.column) && (u = { column: a.column + 1, line: a.line }), { end: u, start: a };
|
|
5498
5541
|
}
|
|
5499
5542
|
raw(e, a) {
|
|
5500
|
-
return new
|
|
5543
|
+
return new ga().raw(this, e, a);
|
|
5501
5544
|
}
|
|
5502
5545
|
remove() {
|
|
5503
5546
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -5534,7 +5577,7 @@ let Sa = class {
|
|
|
5534
5577
|
toProxy() {
|
|
5535
5578
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
5536
5579
|
}
|
|
5537
|
-
toString(e =
|
|
5580
|
+
toString(e = ya) {
|
|
5538
5581
|
e.stringify && (e = e.stringify);
|
|
5539
5582
|
let a = "";
|
|
5540
5583
|
return e(this, (e2) => {
|
|
@@ -5547,16 +5590,16 @@ let Sa = class {
|
|
|
5547
5590
|
return e.warn(a, m2);
|
|
5548
5591
|
}
|
|
5549
5592
|
};
|
|
5550
|
-
var
|
|
5551
|
-
|
|
5552
|
-
let
|
|
5593
|
+
var va = ba;
|
|
5594
|
+
ba.default = ba;
|
|
5595
|
+
let Ca = va, ka = class extends Ca {
|
|
5553
5596
|
constructor(e) {
|
|
5554
5597
|
super(e), this.type = "comment";
|
|
5555
5598
|
}
|
|
5556
5599
|
};
|
|
5557
|
-
var
|
|
5558
|
-
|
|
5559
|
-
let
|
|
5600
|
+
var xa = ka;
|
|
5601
|
+
ka.default = ka;
|
|
5602
|
+
let Ma = va, Ia = class extends Ma {
|
|
5560
5603
|
get variable() {
|
|
5561
5604
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
5562
5605
|
}
|
|
@@ -5564,16 +5607,16 @@ let xa = ba, Ma = class extends xa {
|
|
|
5564
5607
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
5565
5608
|
}
|
|
5566
5609
|
};
|
|
5567
|
-
var
|
|
5568
|
-
|
|
5569
|
-
let
|
|
5610
|
+
var _a = Ia;
|
|
5611
|
+
Ia.default = Ia;
|
|
5612
|
+
let Oa, Ea, La, Ra, Aa = xa, Ta = _a, Na = va, { isClean: Pa, my: Da } = fa;
|
|
5570
5613
|
function Wo(e) {
|
|
5571
5614
|
return e.map((e2) => (e2.nodes && (e2.nodes = Wo(e2.nodes)), delete e2.source, e2));
|
|
5572
5615
|
}
|
|
5573
5616
|
function zo(e) {
|
|
5574
|
-
if (e[
|
|
5617
|
+
if (e[Pa] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) zo(a);
|
|
5575
5618
|
}
|
|
5576
|
-
let
|
|
5619
|
+
let Fa = class Bo extends Na {
|
|
5577
5620
|
get first() {
|
|
5578
5621
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
5579
5622
|
}
|
|
@@ -5625,7 +5668,7 @@ let Da = class Bo extends Ta {
|
|
|
5625
5668
|
return this.markDirty(), this;
|
|
5626
5669
|
}
|
|
5627
5670
|
normalize(e, a) {
|
|
5628
|
-
if ("string" == typeof e) e = Wo(
|
|
5671
|
+
if ("string" == typeof e) e = Wo(Ea(e).nodes);
|
|
5629
5672
|
else if (typeof e > "u") e = [];
|
|
5630
5673
|
else if (Array.isArray(e)) {
|
|
5631
5674
|
e = e.slice(0);
|
|
@@ -5636,14 +5679,14 @@ let Da = class Bo extends Ta {
|
|
|
5636
5679
|
} else if (e.type) e = [e];
|
|
5637
5680
|
else if (e.prop) {
|
|
5638
5681
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
5639
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
5640
|
-
} else if (e.selector || e.selectors) e = [new
|
|
5641
|
-
else if (e.name) e = [new
|
|
5682
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Ta(e)];
|
|
5683
|
+
} else if (e.selector || e.selectors) e = [new Ra(e)];
|
|
5684
|
+
else if (e.name) e = [new Oa(e)];
|
|
5642
5685
|
else {
|
|
5643
5686
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
5644
|
-
e = [new
|
|
5687
|
+
e = [new Aa(e)];
|
|
5645
5688
|
}
|
|
5646
|
-
return e.map((e2) => (e2[
|
|
5689
|
+
return e.map((e2) => (e2[Da] || Bo.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[Pa] && zo(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
|
|
5647
5690
|
}
|
|
5648
5691
|
prepend(...e) {
|
|
5649
5692
|
e = e.reverse();
|
|
@@ -5719,22 +5762,22 @@ let Da = class Bo extends Ta {
|
|
|
5719
5762
|
}));
|
|
5720
5763
|
}
|
|
5721
5764
|
};
|
|
5722
|
-
|
|
5765
|
+
Fa.registerParse = (e) => {
|
|
5766
|
+
Ea = e;
|
|
5767
|
+
}, Fa.registerRule = (e) => {
|
|
5768
|
+
Ra = e;
|
|
5769
|
+
}, Fa.registerAtRule = (e) => {
|
|
5723
5770
|
Oa = e;
|
|
5724
|
-
},
|
|
5771
|
+
}, Fa.registerRoot = (e) => {
|
|
5725
5772
|
La = e;
|
|
5726
|
-
}, Da.registerAtRule = (e) => {
|
|
5727
|
-
_a = e;
|
|
5728
|
-
}, Da.registerRoot = (e) => {
|
|
5729
|
-
Ea = e;
|
|
5730
5773
|
};
|
|
5731
|
-
var
|
|
5732
|
-
|
|
5733
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
5734
|
-
|
|
5774
|
+
var Ua = Fa;
|
|
5775
|
+
Fa.default = Fa, Fa.rebuild = (e) => {
|
|
5776
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, Oa.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Ra.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Ta.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Aa.prototype) : "root" === e.type && Object.setPrototypeOf(e, La.prototype), e[Da] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
5777
|
+
Fa.rebuild(e2);
|
|
5735
5778
|
});
|
|
5736
5779
|
};
|
|
5737
|
-
let
|
|
5780
|
+
let Ba = Ua, $a = class extends Ba {
|
|
5738
5781
|
constructor(e) {
|
|
5739
5782
|
super(e), this.type = "atrule";
|
|
5740
5783
|
}
|
|
@@ -5745,38 +5788,38 @@ let Ua = Fa, Ba = class extends Ua {
|
|
|
5745
5788
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
5746
5789
|
}
|
|
5747
5790
|
};
|
|
5748
|
-
var
|
|
5749
|
-
|
|
5750
|
-
let
|
|
5791
|
+
var Wa = $a;
|
|
5792
|
+
$a.default = $a, Ba.registerAtRule($a);
|
|
5793
|
+
let za, ja, Ga = Ua, Va = class extends Ga {
|
|
5751
5794
|
constructor(e) {
|
|
5752
5795
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
5753
5796
|
}
|
|
5754
5797
|
toResult(e = {}) {
|
|
5755
|
-
return new
|
|
5798
|
+
return new za(new ja(), this, e).stringify();
|
|
5756
5799
|
}
|
|
5757
5800
|
};
|
|
5758
|
-
|
|
5759
|
-
Wa = e;
|
|
5760
|
-
}, Ga.registerProcessor = (e) => {
|
|
5801
|
+
Va.registerLazyResult = (e) => {
|
|
5761
5802
|
za = e;
|
|
5803
|
+
}, Va.registerProcessor = (e) => {
|
|
5804
|
+
ja = e;
|
|
5762
5805
|
};
|
|
5763
|
-
var
|
|
5764
|
-
|
|
5765
|
-
var
|
|
5806
|
+
var qa = Va;
|
|
5807
|
+
Va.default = Va;
|
|
5808
|
+
var Za = { nanoid: (e = 21) => {
|
|
5766
5809
|
let a = "", u = 0 | e;
|
|
5767
5810
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
5768
5811
|
return a;
|
|
5769
5812
|
} };
|
|
5770
|
-
let { existsSync:
|
|
5771
|
-
let
|
|
5813
|
+
let { existsSync: Ka, readFileSync: Ja } = ra, { dirname: Ya, join: Qa } = ra, { SourceMapConsumer: el, SourceMapGenerator: tl } = ra;
|
|
5814
|
+
let nl = class {
|
|
5772
5815
|
constructor(e, a) {
|
|
5773
5816
|
if (false === a.map) return;
|
|
5774
5817
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
5775
5818
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
5776
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
5819
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Ya(this.mapFile)), m2 && (this.text = m2);
|
|
5777
5820
|
}
|
|
5778
5821
|
consumer() {
|
|
5779
|
-
return this.consumerCache || (this.consumerCache = new
|
|
5822
|
+
return this.consumerCache || (this.consumerCache = new el(this.text)), this.consumerCache;
|
|
5780
5823
|
}
|
|
5781
5824
|
decodeInline(e) {
|
|
5782
5825
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -5801,15 +5844,15 @@ let tl = class {
|
|
|
5801
5844
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
5802
5845
|
}
|
|
5803
5846
|
loadFile(e) {
|
|
5804
|
-
if (this.root =
|
|
5847
|
+
if (this.root = Ya(e), Ka(e)) return this.mapFile = e, Ja(e, "utf-8").toString().trim();
|
|
5805
5848
|
}
|
|
5806
5849
|
loadMap(e, a) {
|
|
5807
5850
|
if (false === a) return false;
|
|
5808
5851
|
if (a) {
|
|
5809
5852
|
if ("string" == typeof a) return a;
|
|
5810
5853
|
if ("function" != typeof a) {
|
|
5811
|
-
if (a instanceof
|
|
5812
|
-
if (a instanceof
|
|
5854
|
+
if (a instanceof el) return tl.fromSourceMap(a).toString();
|
|
5855
|
+
if (a instanceof tl) return a.toString();
|
|
5813
5856
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
5814
5857
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
5815
5858
|
}
|
|
@@ -5825,7 +5868,7 @@ let tl = class {
|
|
|
5825
5868
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
5826
5869
|
if (this.annotation) {
|
|
5827
5870
|
let a2 = this.annotation;
|
|
5828
|
-
return e && (a2 = Ya(
|
|
5871
|
+
return e && (a2 = Qa(Ya(e), a2)), this.loadFile(a2);
|
|
5829
5872
|
}
|
|
5830
5873
|
}
|
|
5831
5874
|
}
|
|
@@ -5836,23 +5879,23 @@ let tl = class {
|
|
|
5836
5879
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
5837
5880
|
}
|
|
5838
5881
|
};
|
|
5839
|
-
var
|
|
5840
|
-
|
|
5841
|
-
let { nanoid:
|
|
5882
|
+
var rl = nl;
|
|
5883
|
+
nl.default = nl;
|
|
5884
|
+
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 {
|
|
5842
5885
|
get from() {
|
|
5843
5886
|
return this.file || this.id;
|
|
5844
5887
|
}
|
|
5845
5888
|
constructor(e, a = {}) {
|
|
5846
5889
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
5847
|
-
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!
|
|
5848
|
-
let e2 = new
|
|
5890
|
+
if (this.css = e.toString(), "\uFEFF" === this.css[0] || "" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!gl || /^\w+:\/\//.test(a.from) || sl(a.from) ? this.file = a.from : this.file = il(a.from)), gl && ml) {
|
|
5891
|
+
let e2 = new dl(this.css, a);
|
|
5849
5892
|
if (e2.text) {
|
|
5850
5893
|
this.map = e2;
|
|
5851
5894
|
let a2 = e2.consumer().file;
|
|
5852
5895
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
5853
5896
|
}
|
|
5854
5897
|
}
|
|
5855
|
-
this.file || (this.id = "<input css " +
|
|
5898
|
+
this.file || (this.id = "<input css " + ol(6) + ">"), this.map && (this.map.file = this.from);
|
|
5856
5899
|
}
|
|
5857
5900
|
error(e, a, u, m2 = {}) {
|
|
5858
5901
|
let w2, b2, C2;
|
|
@@ -5871,17 +5914,17 @@ let { nanoid: rl } = qa, { isAbsolute: ol, resolve: sl } = na, { SourceMapConsum
|
|
|
5871
5914
|
a = e2.line, u = e2.col;
|
|
5872
5915
|
}
|
|
5873
5916
|
let x2 = this.origin(a, u, b2, w2);
|
|
5874
|
-
return C2 = x2 ? new
|
|
5917
|
+
return C2 = x2 ? new pl(e, 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(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (ul && (C2.input.url = ul(this.file).toString()), C2.input.file = this.file), C2;
|
|
5875
5918
|
}
|
|
5876
5919
|
fromOffset(e) {
|
|
5877
5920
|
let a, u;
|
|
5878
|
-
if (this[
|
|
5921
|
+
if (this[fl]) u = this[fl];
|
|
5879
5922
|
else {
|
|
5880
5923
|
let e2 = this.css.split("\n");
|
|
5881
5924
|
u = new Array(e2.length);
|
|
5882
5925
|
let a2 = 0;
|
|
5883
5926
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
5884
|
-
this[
|
|
5927
|
+
this[fl] = u;
|
|
5885
5928
|
}
|
|
5886
5929
|
a = u[u.length - 1];
|
|
5887
5930
|
let m2 = 0;
|
|
@@ -5900,17 +5943,17 @@ let { nanoid: rl } = qa, { isAbsolute: ol, resolve: sl } = na, { SourceMapConsum
|
|
|
5900
5943
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
5901
5944
|
}
|
|
5902
5945
|
mapResolve(e) {
|
|
5903
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
5946
|
+
return /^\w+:\/\//.test(e) ? e : il(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
5904
5947
|
}
|
|
5905
5948
|
origin(e, a, u, m2) {
|
|
5906
5949
|
if (!this.map) return false;
|
|
5907
5950
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
5908
5951
|
if (!x2.source) return false;
|
|
5909
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
5952
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = sl(x2.source) ? ul(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || ul(this.map.mapFile));
|
|
5910
5953
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
5911
5954
|
if ("file:" === b2.protocol) {
|
|
5912
|
-
if (!
|
|
5913
|
-
I2.file =
|
|
5955
|
+
if (!cl) throw new Error("file: protocol is not available in this PostCSS build");
|
|
5956
|
+
I2.file = cl(b2);
|
|
5914
5957
|
}
|
|
5915
5958
|
let _2 = C2.sourceContentFor(x2.source);
|
|
5916
5959
|
return _2 && (I2.source = _2), I2;
|
|
@@ -5921,9 +5964,9 @@ let { nanoid: rl } = qa, { isAbsolute: ol, resolve: sl } = na, { SourceMapConsum
|
|
|
5921
5964
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
5922
5965
|
}
|
|
5923
5966
|
};
|
|
5924
|
-
var
|
|
5925
|
-
|
|
5926
|
-
let
|
|
5967
|
+
var wl = yl;
|
|
5968
|
+
yl.default = yl, hl && hl.registerInput && hl.registerInput(yl);
|
|
5969
|
+
let Sl, bl, vl = Ua, Cl = class extends vl {
|
|
5927
5970
|
constructor(e) {
|
|
5928
5971
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
5929
5972
|
}
|
|
@@ -5940,29 +5983,29 @@ let wl, Sl, bl = Fa, vl = class extends bl {
|
|
|
5940
5983
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
5941
5984
|
}
|
|
5942
5985
|
toResult(e = {}) {
|
|
5943
|
-
return new
|
|
5986
|
+
return new Sl(new bl(), this, e).stringify();
|
|
5944
5987
|
}
|
|
5945
5988
|
};
|
|
5946
|
-
|
|
5947
|
-
wl = e;
|
|
5948
|
-
}, vl.registerProcessor = (e) => {
|
|
5989
|
+
Cl.registerLazyResult = (e) => {
|
|
5949
5990
|
Sl = e;
|
|
5991
|
+
}, Cl.registerProcessor = (e) => {
|
|
5992
|
+
bl = e;
|
|
5950
5993
|
};
|
|
5951
|
-
var
|
|
5952
|
-
|
|
5953
|
-
let
|
|
5994
|
+
var kl = Cl;
|
|
5995
|
+
Cl.default = Cl, vl.registerRoot(Cl);
|
|
5996
|
+
let xl = { comma: (e) => xl.split(e, [","], true), space(e) {
|
|
5954
5997
|
let a = [" ", "\n", " "];
|
|
5955
|
-
return
|
|
5998
|
+
return xl.split(e, a);
|
|
5956
5999
|
}, split(e, a, u) {
|
|
5957
6000
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
5958
6001
|
for (let u2 of e) _2 ? _2 = false : "\\" === u2 ? _2 = true : x2 ? u2 === I2 && (x2 = false) : '"' === u2 || "'" === u2 ? (x2 = true, I2 = u2) : "(" === u2 ? C2 += 1 : ")" === u2 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a.includes(u2) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u2;
|
|
5959
6002
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
5960
6003
|
} };
|
|
5961
|
-
var
|
|
5962
|
-
|
|
5963
|
-
let
|
|
6004
|
+
var Ml = xl;
|
|
6005
|
+
xl.default = xl;
|
|
6006
|
+
let Il = Ua, Ol = Ml, El = class extends Il {
|
|
5964
6007
|
get selectors() {
|
|
5965
|
-
return
|
|
6008
|
+
return Ol.comma(this.selector);
|
|
5966
6009
|
}
|
|
5967
6010
|
set selectors(e) {
|
|
5968
6011
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -5972,34 +6015,34 @@ let Ml = Fa, Il = xl, Ol = class extends Ml {
|
|
|
5972
6015
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
5973
6016
|
}
|
|
5974
6017
|
};
|
|
5975
|
-
var
|
|
5976
|
-
|
|
5977
|
-
let
|
|
6018
|
+
var Ll = El;
|
|
6019
|
+
El.default = El, Il.registerRule(El);
|
|
6020
|
+
let Rl = Wa, Al = xa, Tl = _a, Nl = wl, Pl = rl, Dl = kl, Jl = Ll;
|
|
5978
6021
|
function Ke(e, a) {
|
|
5979
6022
|
if (Array.isArray(e)) return e.map((e2) => Ke(e2));
|
|
5980
6023
|
let { inputs: u, ...m2 } = e;
|
|
5981
6024
|
if (u) {
|
|
5982
6025
|
a = [];
|
|
5983
6026
|
for (let e2 of u) {
|
|
5984
|
-
let u2 = { ...e2, __proto__:
|
|
5985
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
6027
|
+
let u2 = { ...e2, __proto__: Nl.prototype };
|
|
6028
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Pl.prototype }), a.push(u2);
|
|
5986
6029
|
}
|
|
5987
6030
|
}
|
|
5988
6031
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ke(e2, a))), m2.source) {
|
|
5989
6032
|
let { inputId: e2, ...u2 } = m2.source;
|
|
5990
6033
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
5991
6034
|
}
|
|
5992
|
-
if ("root" === m2.type) return new
|
|
5993
|
-
if ("decl" === m2.type) return new
|
|
5994
|
-
if ("rule" === m2.type) return new
|
|
5995
|
-
if ("comment" === m2.type) return new
|
|
5996
|
-
if ("atrule" === m2.type) return new
|
|
6035
|
+
if ("root" === m2.type) return new Dl(m2);
|
|
6036
|
+
if ("decl" === m2.type) return new Tl(m2);
|
|
6037
|
+
if ("rule" === m2.type) return new Jl(m2);
|
|
6038
|
+
if ("comment" === m2.type) return new Al(m2);
|
|
6039
|
+
if ("atrule" === m2.type) return new Rl(m2);
|
|
5997
6040
|
throw new Error("Unknown node type: " + e.type);
|
|
5998
6041
|
}
|
|
5999
|
-
var
|
|
6042
|
+
var ec = Ke;
|
|
6000
6043
|
Ke.default = Ke;
|
|
6001
|
-
let { dirname:
|
|
6002
|
-
var
|
|
6044
|
+
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);
|
|
6045
|
+
var pc = class {
|
|
6003
6046
|
constructor(e, a, u, m2) {
|
|
6004
6047
|
this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, 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();
|
|
6005
6048
|
}
|
|
@@ -6011,8 +6054,8 @@ var uc = class {
|
|
|
6011
6054
|
}
|
|
6012
6055
|
applyPrevMaps() {
|
|
6013
6056
|
for (let e of this.previous()) {
|
|
6014
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
6015
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
6057
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || tc(e.file);
|
|
6058
|
+
false === this.mapOpts.sourcesContent ? (a = new sc(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
6016
6059
|
}
|
|
6017
6060
|
}
|
|
6018
6061
|
clearAnnotation() {
|
|
@@ -6022,7 +6065,7 @@ var uc = class {
|
|
|
6022
6065
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
6023
6066
|
}
|
|
6024
6067
|
generate() {
|
|
6025
|
-
if (this.clearAnnotation(),
|
|
6068
|
+
if (this.clearAnnotation(), uc && cc && this.isMap()) return this.generateMap();
|
|
6026
6069
|
{
|
|
6027
6070
|
let e = "";
|
|
6028
6071
|
return this.stringify(this.root, (a) => {
|
|
@@ -6034,12 +6077,12 @@ var uc = class {
|
|
|
6034
6077
|
if (this.root) this.generateString();
|
|
6035
6078
|
else if (1 === this.previous().length) {
|
|
6036
6079
|
let e = this.previous()[0].consumer();
|
|
6037
|
-
e.file = this.outputFile(), this.map =
|
|
6038
|
-
} else this.map = new
|
|
6080
|
+
e.file = this.outputFile(), this.map = ic.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
6081
|
+
} 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>" });
|
|
6039
6082
|
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];
|
|
6040
6083
|
}
|
|
6041
6084
|
generateString() {
|
|
6042
|
-
this.css = "", this.map = new
|
|
6085
|
+
this.css = "", this.map = new ic({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
6043
6086
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
6044
6087
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
6045
6088
|
if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u, 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))), a = C2.match(/\n/g), a ? (u += a.length, e = C2.lastIndexOf("\n"), m2 = C2.length - e) : m2 += C2.length, x2 && "start" !== I2) {
|
|
@@ -6069,9 +6112,9 @@ var uc = class {
|
|
|
6069
6112
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
6070
6113
|
let a = this.memoizedPaths.get(e);
|
|
6071
6114
|
if (a) return a;
|
|
6072
|
-
let u = this.opts.to ?
|
|
6073
|
-
"string" == typeof this.mapOpts.annotation && (u =
|
|
6074
|
-
let m2 =
|
|
6115
|
+
let u = this.opts.to ? tc(this.opts.to) : ".";
|
|
6116
|
+
"string" == typeof this.mapOpts.annotation && (u = tc(rc(u, this.mapOpts.annotation)));
|
|
6117
|
+
let m2 = nc(u, e);
|
|
6075
6118
|
return this.memoizedPaths.set(e, m2), m2;
|
|
6076
6119
|
}
|
|
6077
6120
|
previous() {
|
|
@@ -6082,7 +6125,7 @@ var uc = class {
|
|
|
6082
6125
|
}
|
|
6083
6126
|
});
|
|
6084
6127
|
else {
|
|
6085
|
-
let e = new
|
|
6128
|
+
let e = new lc(this.originalCSS, this.opts);
|
|
6086
6129
|
e.map && this.previousMaps.push(e.map);
|
|
6087
6130
|
}
|
|
6088
6131
|
return this.previousMaps;
|
|
@@ -6113,8 +6156,8 @@ var uc = class {
|
|
|
6113
6156
|
toFileUrl(e) {
|
|
6114
6157
|
let a = this.memoizedFileURLs.get(e);
|
|
6115
6158
|
if (a) return a;
|
|
6116
|
-
if (
|
|
6117
|
-
let a2 =
|
|
6159
|
+
if (ac) {
|
|
6160
|
+
let a2 = ac(e).toString();
|
|
6118
6161
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
6119
6162
|
}
|
|
6120
6163
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -6122,13 +6165,13 @@ var uc = class {
|
|
|
6122
6165
|
toUrl(e) {
|
|
6123
6166
|
let a = this.memoizedURLs.get(e);
|
|
6124
6167
|
if (a) return a;
|
|
6125
|
-
"\\" ===
|
|
6168
|
+
"\\" === oc && (e = e.replace(/\\/g, "/"));
|
|
6126
6169
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
6127
6170
|
return this.memoizedURLs.set(e, u), u;
|
|
6128
6171
|
}
|
|
6129
6172
|
};
|
|
6130
|
-
const
|
|
6131
|
-
let
|
|
6173
|
+
const dc = /[\t\n\f\r "#'()/;[\\\]{}]/g, hc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, fc = /.[\r\n"'(/\\]/, mc = /[\da-f]/i;
|
|
6174
|
+
let gc = Wa, yc = xa, wc = _a, Sc = kl, bc = Ll, kc = function(e, a = {}) {
|
|
6132
6175
|
let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
|
|
6133
6176
|
function y2(a2) {
|
|
6134
6177
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -6178,7 +6221,7 @@ let mc = $a, gc = ka, yc = Ia, wc = Cl, Sc = El, kc = function(e, a = {}) {
|
|
|
6178
6221
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
6179
6222
|
} while (I2);
|
|
6180
6223
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6181
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
6224
|
+
} 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);
|
|
6182
6225
|
break;
|
|
6183
6226
|
case 39:
|
|
6184
6227
|
case 34:
|
|
@@ -6196,31 +6239,31 @@ let mc = $a, gc = ka, yc = Ia, wc = Cl, Sc = El, kc = function(e, a = {}) {
|
|
|
6196
6239
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6197
6240
|
break;
|
|
6198
6241
|
case 64:
|
|
6199
|
-
|
|
6242
|
+
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;
|
|
6200
6243
|
break;
|
|
6201
6244
|
case 92:
|
|
6202
6245
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
6203
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
6204
|
-
for (;
|
|
6246
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, mc.test(D2.charAt(b2)))) {
|
|
6247
|
+
for (; mc.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
6205
6248
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
6206
6249
|
}
|
|
6207
6250
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6208
6251
|
break;
|
|
6209
6252
|
default:
|
|
6210
|
-
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (
|
|
6253
|
+
47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? 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);
|
|
6211
6254
|
}
|
|
6212
6255
|
return B2++, x2;
|
|
6213
6256
|
}, position: function S() {
|
|
6214
6257
|
return B2;
|
|
6215
6258
|
} };
|
|
6216
6259
|
};
|
|
6217
|
-
const
|
|
6218
|
-
var
|
|
6260
|
+
const vc = { empty: true, space: true };
|
|
6261
|
+
var xc = class {
|
|
6219
6262
|
constructor(e) {
|
|
6220
|
-
this.input = e, this.root = new
|
|
6263
|
+
this.input = e, this.root = new Sc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
6221
6264
|
}
|
|
6222
6265
|
atrule(e) {
|
|
6223
|
-
let a = new
|
|
6266
|
+
let a = new gc();
|
|
6224
6267
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
6225
6268
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
6226
6269
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -6272,7 +6315,7 @@ var vc = class {
|
|
|
6272
6315
|
return false;
|
|
6273
6316
|
}
|
|
6274
6317
|
comment(e) {
|
|
6275
|
-
let a = new
|
|
6318
|
+
let a = new yc();
|
|
6276
6319
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
6277
6320
|
let u = e[1].slice(2, -2);
|
|
6278
6321
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -6285,7 +6328,7 @@ var vc = class {
|
|
|
6285
6328
|
this.tokenizer = kc(this.input);
|
|
6286
6329
|
}
|
|
6287
6330
|
decl(e, a) {
|
|
6288
|
-
let u = new
|
|
6331
|
+
let u = new wc();
|
|
6289
6332
|
this.init(u, e[0][2]);
|
|
6290
6333
|
let m2, w2 = e[e.length - 1];
|
|
6291
6334
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e2) {
|
|
@@ -6334,7 +6377,7 @@ var vc = class {
|
|
|
6334
6377
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
6335
6378
|
}
|
|
6336
6379
|
emptyRule(e) {
|
|
6337
|
-
let a = new
|
|
6380
|
+
let a = new bc();
|
|
6338
6381
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
6339
6382
|
}
|
|
6340
6383
|
end(e) {
|
|
@@ -6410,7 +6453,7 @@ var vc = class {
|
|
|
6410
6453
|
}
|
|
6411
6454
|
raw(e, a, u, m2) {
|
|
6412
6455
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
6413
|
-
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty",
|
|
6456
|
+
for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", vc[x2] || vc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
6414
6457
|
if (!O2) {
|
|
6415
6458
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
6416
6459
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -6419,7 +6462,7 @@ var vc = class {
|
|
|
6419
6462
|
}
|
|
6420
6463
|
rule(e) {
|
|
6421
6464
|
e.pop();
|
|
6422
|
-
let a = new
|
|
6465
|
+
let a = new bc();
|
|
6423
6466
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
6424
6467
|
}
|
|
6425
6468
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -6459,9 +6502,9 @@ var vc = class {
|
|
|
6459
6502
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
6460
6503
|
}
|
|
6461
6504
|
};
|
|
6462
|
-
let
|
|
6505
|
+
let Mc = Ua, Ic = wl, _c = xc;
|
|
6463
6506
|
function Gt(e, a) {
|
|
6464
|
-
let u = new
|
|
6507
|
+
let u = new Ic(e, a), m2 = new _c(u);
|
|
6465
6508
|
try {
|
|
6466
6509
|
m2.parse();
|
|
6467
6510
|
} catch (e2) {
|
|
@@ -6469,9 +6512,9 @@ function Gt(e, a) {
|
|
|
6469
6512
|
}
|
|
6470
6513
|
return m2.root;
|
|
6471
6514
|
}
|
|
6472
|
-
var
|
|
6473
|
-
Gt.default = Gt,
|
|
6474
|
-
let
|
|
6515
|
+
var Oc = Gt;
|
|
6516
|
+
Gt.default = Gt, Mc.registerParse(Gt);
|
|
6517
|
+
let Ec = class {
|
|
6475
6518
|
constructor(e, a = {}) {
|
|
6476
6519
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
6477
6520
|
let e2 = a.node.rangeBy(a);
|
|
@@ -6483,9 +6526,9 @@ let Oc = class {
|
|
|
6483
6526
|
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;
|
|
6484
6527
|
}
|
|
6485
6528
|
};
|
|
6486
|
-
var
|
|
6487
|
-
|
|
6488
|
-
let
|
|
6529
|
+
var Lc = Ec;
|
|
6530
|
+
Ec.default = Ec;
|
|
6531
|
+
let Rc = Lc, Ac = class {
|
|
6489
6532
|
get content() {
|
|
6490
6533
|
return this.css;
|
|
6491
6534
|
}
|
|
@@ -6497,26 +6540,26 @@ let Lc = Ec, Rc = class {
|
|
|
6497
6540
|
}
|
|
6498
6541
|
warn(e, a = {}) {
|
|
6499
6542
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
6500
|
-
let u = new
|
|
6543
|
+
let u = new Rc(e, a);
|
|
6501
6544
|
return this.messages.push(u), u;
|
|
6502
6545
|
}
|
|
6503
6546
|
warnings() {
|
|
6504
6547
|
return this.messages.filter((e) => "warning" === e.type);
|
|
6505
6548
|
}
|
|
6506
6549
|
};
|
|
6507
|
-
var
|
|
6508
|
-
|
|
6509
|
-
let
|
|
6550
|
+
var Tc = Ac;
|
|
6551
|
+
Ac.default = Ac;
|
|
6552
|
+
let Nc = {};
|
|
6510
6553
|
var ni = function(e) {
|
|
6511
|
-
|
|
6554
|
+
Nc[e] || (Nc[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
6512
6555
|
};
|
|
6513
|
-
let
|
|
6514
|
-
const
|
|
6556
|
+
let Pc = Ua, Dc = qa, Fc = pc, Uc = Oc, Bc = Tc, $c = kl, Wc = ha, { isClean: zc, my: jc } = fa, Gc = ni;
|
|
6557
|
+
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 };
|
|
6515
6558
|
function _e(e) {
|
|
6516
6559
|
return "object" == typeof e && "function" == typeof e.then;
|
|
6517
6560
|
}
|
|
6518
6561
|
function ri(e) {
|
|
6519
|
-
let a = false, u =
|
|
6562
|
+
let a = false, u = Vc[e.type];
|
|
6520
6563
|
return "decl" === e.type ? a = e.prop.toLowerCase() : "atrule" === e.type && (a = e.name.toLowerCase()), a && e.append ? [u, u + "-" + a, 0, u + "Exit", u + "Exit-" + a] : a ? [u, u + "-" + a, u + "Exit", u + "Exit-" + a] : e.append ? [u, 0, u + "Exit"] : [u, u + "Exit"];
|
|
6521
6564
|
}
|
|
6522
6565
|
function br(e) {
|
|
@@ -6524,9 +6567,9 @@ function br(e) {
|
|
|
6524
6567
|
return a = "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : ri(e), { eventIndex: 0, events: a, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
|
|
6525
6568
|
}
|
|
6526
6569
|
function Js(e) {
|
|
6527
|
-
return e[
|
|
6570
|
+
return e[zc] = false, e.nodes && e.nodes.forEach((e2) => Js(e2)), e;
|
|
6528
6571
|
}
|
|
6529
|
-
let
|
|
6572
|
+
let Zc = {}, Kc = class oi {
|
|
6530
6573
|
get content() {
|
|
6531
6574
|
return this.stringify().content;
|
|
6532
6575
|
}
|
|
@@ -6553,19 +6596,19 @@ let Hc = {}, Zc = class oi {
|
|
|
6553
6596
|
}
|
|
6554
6597
|
constructor(e, a, u) {
|
|
6555
6598
|
let m2;
|
|
6556
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof
|
|
6599
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof Bc) m2 = Js(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
6557
6600
|
else {
|
|
6558
|
-
let e2 =
|
|
6601
|
+
let e2 = Uc;
|
|
6559
6602
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
6560
6603
|
try {
|
|
6561
6604
|
m2 = e2(a, u);
|
|
6562
6605
|
} catch (e3) {
|
|
6563
6606
|
this.processed = true, this.error = e3;
|
|
6564
6607
|
}
|
|
6565
|
-
m2 && !m2[
|
|
6608
|
+
m2 && !m2[jc] && Pc.rebuild(m2);
|
|
6566
6609
|
}
|
|
6567
6610
|
else m2 = Js(a);
|
|
6568
|
-
this.result = new
|
|
6611
|
+
this.result = new Bc(e, m2, u), this.helpers = { ...Zc, postcss: Zc, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
6569
6612
|
}
|
|
6570
6613
|
async() {
|
|
6571
6614
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -6599,8 +6642,8 @@ let Hc = {}, Zc = class oi {
|
|
|
6599
6642
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
6600
6643
|
};
|
|
6601
6644
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
6602
|
-
if (!
|
|
6603
|
-
if (!
|
|
6645
|
+
if (!qc[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
6646
|
+
if (!Hc[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
6604
6647
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
6605
6648
|
}
|
|
6606
6649
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -6617,8 +6660,8 @@ let Hc = {}, Zc = class oi {
|
|
|
6617
6660
|
}
|
|
6618
6661
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6619
6662
|
let e = this.result.root;
|
|
6620
|
-
for (; !e[
|
|
6621
|
-
e[
|
|
6663
|
+
for (; !e[zc]; ) {
|
|
6664
|
+
e[zc] = true;
|
|
6622
6665
|
let a = [br(e)];
|
|
6623
6666
|
for (; a.length > 0; ) {
|
|
6624
6667
|
let e2 = this.visitTick(a);
|
|
@@ -6663,9 +6706,9 @@ let Hc = {}, Zc = class oi {
|
|
|
6663
6706
|
if (this.error) throw this.error;
|
|
6664
6707
|
if (this.stringified) return this.result;
|
|
6665
6708
|
this.stringified = true, this.sync();
|
|
6666
|
-
let e = this.result.opts, a =
|
|
6709
|
+
let e = this.result.opts, a = Wc;
|
|
6667
6710
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
6668
|
-
let u = new
|
|
6711
|
+
let u = new Fc(a, this.result.root, this.result.opts).generate();
|
|
6669
6712
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
6670
6713
|
}
|
|
6671
6714
|
sync() {
|
|
@@ -6677,14 +6720,14 @@ let Hc = {}, Zc = class oi {
|
|
|
6677
6720
|
}
|
|
6678
6721
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6679
6722
|
let e = this.result.root;
|
|
6680
|
-
for (; !e[
|
|
6723
|
+
for (; !e[zc]; ) e[zc] = true, this.walkSync(e);
|
|
6681
6724
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
6682
6725
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
6683
6726
|
}
|
|
6684
6727
|
return this.result;
|
|
6685
6728
|
}
|
|
6686
6729
|
then(e, a) {
|
|
6687
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
6730
|
+
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(e, a);
|
|
6688
6731
|
}
|
|
6689
6732
|
toString() {
|
|
6690
6733
|
return this.css;
|
|
@@ -6716,22 +6759,22 @@ let Hc = {}, Zc = class oi {
|
|
|
6716
6759
|
}
|
|
6717
6760
|
if (0 !== a.iterator) {
|
|
6718
6761
|
let m3, w3 = a.iterator;
|
|
6719
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
6762
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[zc]) return m3[zc] = true, void e.push(br(m3));
|
|
6720
6763
|
a.iterator = 0, delete u.indexes[w3];
|
|
6721
6764
|
}
|
|
6722
6765
|
let w2 = a.events;
|
|
6723
6766
|
for (; a.eventIndex < w2.length; ) {
|
|
6724
6767
|
let e2 = w2[a.eventIndex];
|
|
6725
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
6768
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[zc] = true, a.iterator = u.getIterator()));
|
|
6726
6769
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
6727
6770
|
}
|
|
6728
6771
|
e.pop();
|
|
6729
6772
|
}
|
|
6730
6773
|
walkSync(e) {
|
|
6731
|
-
e[
|
|
6774
|
+
e[zc] = true;
|
|
6732
6775
|
let a = ri(e);
|
|
6733
6776
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
6734
|
-
e2[
|
|
6777
|
+
e2[zc] || this.walkSync(e2);
|
|
6735
6778
|
});
|
|
6736
6779
|
else {
|
|
6737
6780
|
let a2 = this.listeners[u];
|
|
@@ -6742,14 +6785,14 @@ let Hc = {}, Zc = class oi {
|
|
|
6742
6785
|
return this.sync().warnings();
|
|
6743
6786
|
}
|
|
6744
6787
|
};
|
|
6745
|
-
|
|
6746
|
-
|
|
6788
|
+
Kc.registerPostcss = (e) => {
|
|
6789
|
+
Zc = e;
|
|
6747
6790
|
};
|
|
6748
|
-
var
|
|
6749
|
-
|
|
6750
|
-
let
|
|
6751
|
-
const
|
|
6752
|
-
let
|
|
6791
|
+
var Jc = Kc;
|
|
6792
|
+
Kc.default = Kc, $c.registerLazyResult(Kc), Dc.registerLazyResult(Kc);
|
|
6793
|
+
let Yc = pc, Xc = Oc;
|
|
6794
|
+
const Qc = Tc;
|
|
6795
|
+
let lu = ha, cu = ni, hu = class {
|
|
6753
6796
|
get content() {
|
|
6754
6797
|
return this.result.css;
|
|
6755
6798
|
}
|
|
@@ -6770,7 +6813,7 @@ let Qc = pa, lu = ni, cu = class {
|
|
|
6770
6813
|
}
|
|
6771
6814
|
get root() {
|
|
6772
6815
|
if (this._root) return this._root;
|
|
6773
|
-
let e, a =
|
|
6816
|
+
let e, a = Xc;
|
|
6774
6817
|
try {
|
|
6775
6818
|
e = a(this._css, this._opts);
|
|
6776
6819
|
} catch (e2) {
|
|
@@ -6784,11 +6827,11 @@ let Qc = pa, lu = ni, cu = class {
|
|
|
6784
6827
|
}
|
|
6785
6828
|
constructor(e, a, u) {
|
|
6786
6829
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
6787
|
-
let m2, w2 =
|
|
6788
|
-
this.result = new
|
|
6830
|
+
let m2, w2 = lu;
|
|
6831
|
+
this.result = new Qc(this._processor, m2, this._opts), this.result.css = a;
|
|
6789
6832
|
let b2 = this;
|
|
6790
6833
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
6791
|
-
let C2 = new
|
|
6834
|
+
let C2 = new Yc(w2, m2, this._opts, a);
|
|
6792
6835
|
if (C2.isMap()) {
|
|
6793
6836
|
let [e2, a2] = C2.generate();
|
|
6794
6837
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -6808,7 +6851,7 @@ let Qc = pa, lu = ni, cu = class {
|
|
|
6808
6851
|
return this.result;
|
|
6809
6852
|
}
|
|
6810
6853
|
then(e, a) {
|
|
6811
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
6854
|
+
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(e, a);
|
|
6812
6855
|
}
|
|
6813
6856
|
toString() {
|
|
6814
6857
|
return this._css;
|
|
@@ -6817,9 +6860,9 @@ let Qc = pa, lu = ni, cu = class {
|
|
|
6817
6860
|
return [];
|
|
6818
6861
|
}
|
|
6819
6862
|
};
|
|
6820
|
-
var
|
|
6821
|
-
|
|
6822
|
-
let
|
|
6863
|
+
var Cu = hu;
|
|
6864
|
+
hu.default = hu;
|
|
6865
|
+
let ku = qa, xu = Jc, Mu = Cu, _u = kl, Ou = class {
|
|
6823
6866
|
constructor(e = []) {
|
|
6824
6867
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
6825
6868
|
}
|
|
@@ -6835,39 +6878,39 @@ let Cu = Va, ku = Kc, xu = hu, Mu = Cl, _u = class {
|
|
|
6835
6878
|
return a;
|
|
6836
6879
|
}
|
|
6837
6880
|
process(e, a = {}) {
|
|
6838
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
6881
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new xu(this, e, a) : new Mu(this, e, a);
|
|
6839
6882
|
}
|
|
6840
6883
|
use(e) {
|
|
6841
6884
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
6842
6885
|
}
|
|
6843
6886
|
};
|
|
6844
|
-
var
|
|
6845
|
-
|
|
6846
|
-
let
|
|
6887
|
+
var Eu = Ou;
|
|
6888
|
+
Ou.default = Ou, _u.registerProcessor(Ou), ku.registerProcessor(Ou);
|
|
6889
|
+
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;
|
|
6847
6890
|
function T$1(...e) {
|
|
6848
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
6891
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new ju(e);
|
|
6849
6892
|
}
|
|
6850
6893
|
T$1.plugin = function(e, a) {
|
|
6851
6894
|
let u, m2 = false;
|
|
6852
6895
|
function n(...u2) {
|
|
6853
6896
|
console && console.warn && !m2 && (m2 = true, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
|
|
6854
6897
|
let w2 = a(...u2);
|
|
6855
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
6898
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new ju().version, w2;
|
|
6856
6899
|
}
|
|
6857
6900
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
6858
6901
|
return T$1([n(u2)]).process(e2, a2);
|
|
6859
6902
|
}, n;
|
|
6860
|
-
}, T$1.stringify =
|
|
6861
|
-
var
|
|
6903
|
+
}, T$1.stringify = Hu, T$1.parse = zu, T$1.fromJSON = Du, T$1.list = $u, T$1.comment = (e) => new Ru(e), T$1.atRule = (e) => new Lu(e), T$1.decl = (e) => new Nu(e), T$1.rule = (e) => new qu(e), T$1.root = (e) => new Vu(e), T$1.document = (e) => new Pu(e), 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);
|
|
6904
|
+
var Ku = T$1;
|
|
6862
6905
|
T$1.default = T$1;
|
|
6863
|
-
const
|
|
6864
|
-
var
|
|
6865
|
-
|
|
6906
|
+
const Ju = Su(Ku);
|
|
6907
|
+
var Yu;
|
|
6908
|
+
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(e) {
|
|
6866
6909
|
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
6867
|
-
})(
|
|
6868
|
-
const { addCustomEvent:
|
|
6869
|
-
var
|
|
6870
|
-
let
|
|
6910
|
+
})(Yu || (Yu = {}));
|
|
6911
|
+
const { addCustomEvent: Xu } = ae, { addSailfishEvent: Qu } = ae, { freezePage: ep } = ae, { takeFullSnapshot: tp } = ae;
|
|
6912
|
+
var np = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? np(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
|
|
6913
|
+
let rp = class d {
|
|
6871
6914
|
constructor(e) {
|
|
6872
6915
|
y(this, "fileName"), y(this, "functionName"), y(this, "lineNumber"), y(this, "columnNumber"), this.fileName = e.fileName || "", this.functionName = e.functionName || "", this.lineNumber = e.lineNumber, this.columnNumber = e.columnNumber;
|
|
6873
6916
|
}
|
|
@@ -6876,8 +6919,8 @@ let np = class d {
|
|
|
6876
6919
|
return this.functionName ? `${this.functionName} (${this.fileName}:${e}:${a})` : `${this.fileName}:${e}:${a}`;
|
|
6877
6920
|
}
|
|
6878
6921
|
};
|
|
6879
|
-
const
|
|
6880
|
-
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(
|
|
6922
|
+
const op = /(^|@)\S+:\d+/, sp = /^\s*at .*(\S+:\d+|\(native\))/m, ip = /^(eval@)?(\[native code])?$/, ap = { parse: function(e) {
|
|
6923
|
+
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(sp) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : (console.warn("[console-record-plugin]: Failed to parse error object:", e), []) : [];
|
|
6881
6924
|
}, extractLocation: function(e) {
|
|
6882
6925
|
if (-1 === e.indexOf(":")) return [e];
|
|
6883
6926
|
const a = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
|
|
@@ -6885,23 +6928,23 @@ const rp = /(^|@)\S+:\d+/, op = /^\s*at .*(\S+:\d+|\(native\))/m, sp = /^(eval@)
|
|
|
6885
6928
|
return [a[1], a[2] || void 0, a[3] || void 0];
|
|
6886
6929
|
}, parseV8OrIE: function(e) {
|
|
6887
6930
|
return e.stack.split("\n").filter(function(e2) {
|
|
6888
|
-
return !!e2.match(
|
|
6931
|
+
return !!e2.match(sp);
|
|
6889
6932
|
}, this).map(function(e2) {
|
|
6890
6933
|
e2.indexOf("(eval ") > -1 && (e2 = e2.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
|
|
6891
6934
|
let a = e2.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
6892
6935
|
const u = a.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
6893
6936
|
a = u ? a.replace(u[0], "") : a;
|
|
6894
6937
|
const m2 = a.split(/\s+/).slice(1), w2 = this.extractLocation(u ? u[1] : m2.pop()), b2 = m2.join(" ") || void 0, C2 = ["eval", "<anonymous>"].indexOf(w2[0]) > -1 ? void 0 : w2[0];
|
|
6895
|
-
return new
|
|
6938
|
+
return new rp({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
|
|
6896
6939
|
}, this);
|
|
6897
6940
|
}, parseFFOrSafari: function(e) {
|
|
6898
6941
|
return e.stack.split("\n").filter(function(e2) {
|
|
6899
|
-
return !e2.match(
|
|
6942
|
+
return !e2.match(ip);
|
|
6900
6943
|
}, this).map(function(e2) {
|
|
6901
|
-
if (e2.indexOf(" > eval") > -1 && (e2 = e2.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e2.indexOf("@") && -1 === e2.indexOf(":")) return new
|
|
6944
|
+
if (e2.indexOf(" > eval") > -1 && (e2 = e2.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e2.indexOf("@") && -1 === e2.indexOf(":")) return new rp({ functionName: e2 });
|
|
6902
6945
|
{
|
|
6903
6946
|
const a = /((.*".+"[^@]*)?[^@]*)(?:@)/, u = e2.match(a), m2 = u && u[1] ? u[1] : void 0, w2 = this.extractLocation(e2.replace(a, ""));
|
|
6904
|
-
return new
|
|
6947
|
+
return new rp({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
|
|
6905
6948
|
}
|
|
6906
6949
|
}, this);
|
|
6907
6950
|
}, parseOpera: function(e) {
|
|
@@ -6910,22 +6953,22 @@ const rp = /(^|@)\S+:\d+/, op = /^\s*at .*(\S+:\d+|\(native\))/m, sp = /^(eval@)
|
|
|
6910
6953
|
const a = /Line (\d+).*script (?:in )?(\S+)/i, u = e.message.split("\n"), m2 = [];
|
|
6911
6954
|
for (let e2 = 2, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6912
6955
|
const w3 = a.exec(u[e2]);
|
|
6913
|
-
w3 && m2.push(new
|
|
6956
|
+
w3 && m2.push(new rp({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6914
6957
|
}
|
|
6915
6958
|
return m2;
|
|
6916
6959
|
}, parseOpera10: function(e) {
|
|
6917
6960
|
const a = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u = e.stacktrace.split("\n"), m2 = [];
|
|
6918
6961
|
for (let e2 = 0, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6919
6962
|
const w3 = a.exec(u[e2]);
|
|
6920
|
-
w3 && m2.push(new
|
|
6963
|
+
w3 && m2.push(new rp({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6921
6964
|
}
|
|
6922
6965
|
return m2;
|
|
6923
6966
|
}, parseOpera11: function(e) {
|
|
6924
6967
|
return e.stack.split("\n").filter(function(e2) {
|
|
6925
|
-
return !!e2.match(
|
|
6968
|
+
return !!e2.match(op) && !e2.match(/^Error created at/);
|
|
6926
6969
|
}, this).map(function(e2) {
|
|
6927
6970
|
const a = e2.split("@"), u = this.extractLocation(a.pop()), m2 = (a.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
6928
|
-
return new
|
|
6971
|
+
return new rp({ functionName: m2, fileName: u[0], lineNumber: u[1], columnNumber: u[2] });
|
|
6929
6972
|
}, this);
|
|
6930
6973
|
} };
|
|
6931
6974
|
function T(e) {
|
|
@@ -6982,9 +7025,9 @@ function g(e, a) {
|
|
|
6982
7025
|
return a2 instanceof Node ? a2 instanceof HTMLElement ? a2 ? a2.outerHTML : "" : a2.nodeName : a2 instanceof Error ? a2.stack ? a2.stack + "\nEnd of stack for Error object" : a2.name + ": " + a2.message : a2;
|
|
6983
7026
|
});
|
|
6984
7027
|
}
|
|
6985
|
-
const
|
|
7028
|
+
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" };
|
|
6986
7029
|
function R(e, a, u) {
|
|
6987
|
-
const m2 = u ? Object.assign({},
|
|
7030
|
+
const m2 = u ? Object.assign({}, lp, u) : lp, w2 = m2.logger;
|
|
6988
7031
|
if (!w2) return () => {
|
|
6989
7032
|
};
|
|
6990
7033
|
let b2;
|
|
@@ -6993,7 +7036,7 @@ function R(e, a, u) {
|
|
|
6993
7036
|
const I2 = [];
|
|
6994
7037
|
if (m2.level.includes("error")) {
|
|
6995
7038
|
const l = (a2) => {
|
|
6996
|
-
const u2 = a2.message, w3 = a2.error, b3 =
|
|
7039
|
+
const u2 = a2.message, w3 = a2.error, b3 = ap.parse(w3).map((e2) => e2.toString()), C3 = [g(u2, m2.stringifyOptions)];
|
|
6997
7040
|
e({ level: "error", trace: b3, payload: C3 });
|
|
6998
7041
|
};
|
|
6999
7042
|
a.addEventListener("error", l), I2.push(() => {
|
|
@@ -7002,7 +7045,7 @@ function R(e, a, u) {
|
|
|
7002
7045
|
const f = (a2) => {
|
|
7003
7046
|
let u2, w3;
|
|
7004
7047
|
a2.reason instanceof Error ? (u2 = a2.reason, w3 = [g(`Uncaught (in promise) ${u2.name}: ${u2.message}`, m2.stringifyOptions)]) : (u2 = new Error(), w3 = [g("Uncaught (in promise)", m2.stringifyOptions), g(a2.reason, m2.stringifyOptions)]);
|
|
7005
|
-
const b3 =
|
|
7048
|
+
const b3 = ap.parse(u2).map((e2) => e2.toString());
|
|
7006
7049
|
e({ level: "error", trace: b3, payload: w3 });
|
|
7007
7050
|
};
|
|
7008
7051
|
a.addEventListener("unhandledrejection", f), I2.push(() => {
|
|
@@ -7030,7 +7073,7 @@ function R(e, a, u) {
|
|
|
7030
7073
|
if (a3.apply(this, w3), !("assert" === u2 && w3[0] || x2)) {
|
|
7031
7074
|
x2 = true;
|
|
7032
7075
|
try {
|
|
7033
|
-
const a4 =
|
|
7076
|
+
const a4 = ap.parse(new Error()).map((e2) => e2.toString()).splice(1), b3 = ("assert" === u2 ? w3.slice(1) : w3).map((e2) => g(e2, m2.stringifyOptions));
|
|
7034
7077
|
C2++, C2 < m2.lengthThreshold ? e({ level: u2, trace: a4, payload: b3 }) : C2 === m2.lengthThreshold && e({ level: "warn", trace: [], payload: [g("The number of log records reached the threshold.")] });
|
|
7035
7078
|
} catch (e2) {
|
|
7036
7079
|
a3("@sailfish-rrweb/rrweb logger error:", e2, ...w3);
|
|
@@ -7042,7 +7085,7 @@ function R(e, a, u) {
|
|
|
7042
7085
|
};
|
|
7043
7086
|
}
|
|
7044
7087
|
}
|
|
7045
|
-
var
|
|
7088
|
+
var cp = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(cp || {});
|
|
7046
7089
|
function suppressConsoleLogsDuringCall(e) {
|
|
7047
7090
|
const a = console.log, u = console.warn, m2 = console.error;
|
|
7048
7091
|
console.log = () => {
|
|
@@ -7055,7 +7098,7 @@ function suppressConsoleLogsDuringCall(e) {
|
|
|
7055
7098
|
console.log = a, console.warn = u, console.error = m2;
|
|
7056
7099
|
}
|
|
7057
7100
|
}
|
|
7058
|
-
const
|
|
7101
|
+
const up = "zendesk_chat", pp = "Zendesk";
|
|
7059
7102
|
function zE_safe(...e) {
|
|
7060
7103
|
try {
|
|
7061
7104
|
if ((function hasZendesk() {
|
|
@@ -7094,11 +7137,11 @@ function initializeDomContentEvents(e) {
|
|
|
7094
7137
|
function initializeConsolePlugin(e, a) {
|
|
7095
7138
|
const { name: u, observer: m2 } = /* @__PURE__ */ ((e2) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e2 }))(e);
|
|
7096
7139
|
m2((e2) => {
|
|
7097
|
-
sendEvent({ type:
|
|
7140
|
+
sendEvent({ type: cp.Plugin, timestamp: Date.now(), data: { plugin: u, payload: e2 }, sessionId: a, ...getUrlAndStoredUuids() });
|
|
7098
7141
|
}, window, e);
|
|
7099
7142
|
}
|
|
7100
|
-
async function initializeRecording(e, a, u, m2) {
|
|
7101
|
-
const
|
|
7143
|
+
async function initializeRecording(e, a, u, m2, w2) {
|
|
7144
|
+
const b2 = initializeWebSocket(a, u, m2, w2);
|
|
7102
7145
|
try {
|
|
7103
7146
|
ae({ emit(e2) {
|
|
7104
7147
|
Object.assign(e2, getUrlAndStoredUuids()), e2.sessionId = m2, sendEvent(e2);
|
|
@@ -7114,11 +7157,11 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7114
7157
|
zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
|
|
7115
7158
|
});
|
|
7116
7159
|
const handleWidgetOpen = () => {
|
|
7117
|
-
ae.addSailfishEvent(
|
|
7160
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "customer support chat opened", element_id: up, provider: pp });
|
|
7118
7161
|
}, handleWidgetClose = () => {
|
|
7119
|
-
ae.addSailfishEvent(
|
|
7162
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "customer support chat closed", element_id: up, provider: pp });
|
|
7120
7163
|
}, handleUnreadMessages = (e2) => {
|
|
7121
|
-
ae.addSailfishEvent(
|
|
7164
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "zendesk unreadmessages", element_id: up, provider: pp });
|
|
7122
7165
|
};
|
|
7123
7166
|
suppressConsoleLogsDuringCall(() => {
|
|
7124
7167
|
zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
|
|
@@ -7127,10 +7170,10 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7127
7170
|
} catch (e2) {
|
|
7128
7171
|
console.error("Error importing plugins!", e2);
|
|
7129
7172
|
}
|
|
7130
|
-
return
|
|
7173
|
+
return b2;
|
|
7131
7174
|
}
|
|
7132
|
-
let
|
|
7133
|
-
const
|
|
7175
|
+
let dp = null, hp = null;
|
|
7176
|
+
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" };
|
|
7134
7177
|
function trackDomainChangesOnce() {
|
|
7135
7178
|
const e = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7136
7179
|
if (e.routeWatcherIntervalId) return;
|
|
@@ -7197,7 +7240,7 @@ function shouldSkipHeadersPropagation(e, a = []) {
|
|
|
7197
7240
|
return true;
|
|
7198
7241
|
}
|
|
7199
7242
|
for (const e2 of E) if (u.pathname.toLowerCase().endsWith(e2)) return true;
|
|
7200
|
-
return !!matchUrlWithWildcard(e, [...
|
|
7243
|
+
return !!matchUrlWithWildcard(e, [...mp, ...a]);
|
|
7201
7244
|
}
|
|
7202
7245
|
function setupFetchInterceptor(e = []) {
|
|
7203
7246
|
const a = window.fetch, u = getOrSetSessionId();
|
|
@@ -7232,7 +7275,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7232
7275
|
F2[e3] = a4;
|
|
7233
7276
|
}) : F2 = { ...w3.headers }), D2 = w3.body;
|
|
7234
7277
|
} catch (e3) {
|
|
7235
|
-
|
|
7278
|
+
fp && console.warn("[Sailfish] Failed to capture request data:", e3);
|
|
7236
7279
|
}
|
|
7237
7280
|
delete F2[b];
|
|
7238
7281
|
const U2 = (_a2 = getFuncSpanHeader()) == null ? void 0 : _a2.name;
|
|
@@ -7242,16 +7285,16 @@ function setupFetchInterceptor(e = []) {
|
|
|
7242
7285
|
const I4 = getFuncSpanHeader();
|
|
7243
7286
|
if (u3 instanceof Request) {
|
|
7244
7287
|
const _3 = u3.clone(), O3 = new Headers(_3.headers);
|
|
7245
|
-
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7288
|
+
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), fp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u3.url, header: I4.name }));
|
|
7246
7289
|
const E3 = new Request(_3, { headers: O3 });
|
|
7247
7290
|
return await e3.call(a4, E3, m4);
|
|
7248
7291
|
}
|
|
7249
7292
|
{
|
|
7250
7293
|
const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
|
|
7251
|
-
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7294
|
+
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), fp && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof u3 ? u3 : u3.href, header: I4.name })), _3.headers = O3, await e3.call(a4, u3, _3);
|
|
7252
7295
|
}
|
|
7253
7296
|
})(e2, a3, m3, w3, C3, _2.page_visit_uuid, I3), B2 = false;
|
|
7254
|
-
|
|
7297
|
+
gp.includes(U3.status) && (fp && console.log("Perform retry as status was fail:", U3), I3 = v4(), U3 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, m4) {
|
|
7255
7298
|
try {
|
|
7256
7299
|
let m5 = u3[0], w4 = u3[1] || {};
|
|
7257
7300
|
if ("string" == typeof m5 || m5 instanceof URL) {
|
|
@@ -7267,7 +7310,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7267
7310
|
}
|
|
7268
7311
|
return e3.apply(a4, u3);
|
|
7269
7312
|
} catch (e4) {
|
|
7270
|
-
throw
|
|
7313
|
+
throw fp && console.log(`Retry without ${b} for ${m4} also failed:`, e4), e4;
|
|
7271
7314
|
}
|
|
7272
7315
|
})(e2, a3, u2, x3), B2 = true);
|
|
7273
7316
|
const $2 = Date.now(), z2 = U3.status, j2 = U3.ok, V2 = j2 ? "" : `Request Error: ${U3.statusText}`;
|
|
@@ -7276,7 +7319,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7276
7319
|
const e3 = U3.clone();
|
|
7277
7320
|
q2 = await e3.text();
|
|
7278
7321
|
} catch (e3) {
|
|
7279
|
-
|
|
7322
|
+
fp && console.warn("[Sailfish] Failed to capture response data:", e3), q2 = null;
|
|
7280
7323
|
}
|
|
7281
7324
|
let H2 = null;
|
|
7282
7325
|
try {
|
|
@@ -7284,12 +7327,12 @@ function setupFetchInterceptor(e = []) {
|
|
|
7284
7327
|
H2[a4] = e3;
|
|
7285
7328
|
});
|
|
7286
7329
|
} catch (e3) {
|
|
7287
|
-
|
|
7330
|
+
fp && console.warn("[Sailfish] Failed to capture response headers:", e3), H2 = null;
|
|
7288
7331
|
}
|
|
7289
7332
|
return sendEvent({ type: 27, timestamp: $2, sessionId: C3, data: { request_id: I3, session_id: C3, 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;
|
|
7290
7333
|
} catch (m4) {
|
|
7291
7334
|
const w4 = Date.now(), b2 = false, U3 = ((_b = m4.response) == null ? void 0 : _b.status) || 500, B2 = m4.message || "Fetch request failed";
|
|
7292
|
-
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(
|
|
7335
|
+
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(yp.toLowerCase()))) return e2.apply(a3, u2);
|
|
7293
7336
|
throw sendEvent({ type: 27, timestamp: w4, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: w4, response_code: U3, success: b2, error: B2, method: O2, url: x3, request_headers: F2, request_body: D2, response_body: null }, ..._2 }), m4;
|
|
7294
7337
|
}
|
|
7295
7338
|
})(a2, m2, w2, x2, I2, u, C2);
|
|
@@ -7321,9 +7364,9 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7321
7364
|
} catch {
|
|
7322
7365
|
}
|
|
7323
7366
|
})(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7324
|
-
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7367
|
+
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.serviceAdditionalMetadata = I2, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7325
7368
|
else {
|
|
7326
|
-
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(
|
|
7369
|
+
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(Sp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
|
|
7327
7370
|
window.addEventListener("error", (e2) => {
|
|
7328
7371
|
captureError(e2.error || e2.message);
|
|
7329
7372
|
}), window.addEventListener("unhandledrejection", (e2) => {
|
|
@@ -7331,7 +7374,12 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7331
7374
|
});
|
|
7332
7375
|
})(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
|
|
7333
7376
|
X && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
|
|
7334
|
-
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a),
|
|
7377
|
+
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), !isFunctionSpanTrackingEnabled() || U2.ws && 1 === U2.ws.readyState || fetchFunctionSpanTrackingEnabled(e, a).then((e2) => {
|
|
7378
|
+
var _a3;
|
|
7379
|
+
((_a3 = e2.data) == null ? void 0 : _a3.isFunctionSpanTrackingEnabledFromApiKey) ?? false ? fp && console.log("[Sailfish] Function span tracking state validated with backend: ACTIVE") : (clearStaleFuncSpanState(), fp && console.log("[Sailfish] Cleared stale function span tracking state - backend validation shows tracking is not active"));
|
|
7380
|
+
}).catch((e2) => {
|
|
7381
|
+
fp && console.warn("[Sailfish] Failed to validate function span tracking status with backend:", e2);
|
|
7382
|
+
}), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...mp], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
|
|
7335
7383
|
const a2 = XMLHttpRequest.prototype.open, u2 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
|
|
7336
7384
|
XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
|
|
7337
7385
|
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, m3.call(this, e3, a3);
|
|
@@ -7349,9 +7397,9 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7349
7397
|
}
|
|
7350
7398
|
const _3 = getFuncSpanHeader();
|
|
7351
7399
|
if (_3) try {
|
|
7352
|
-
this.setRequestHeader(_3.name, _3.value),
|
|
7400
|
+
this.setRequestHeader(_3.name, _3.value), fp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
|
|
7353
7401
|
} catch (e3) {
|
|
7354
|
-
|
|
7402
|
+
fp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e3);
|
|
7355
7403
|
}
|
|
7356
7404
|
const O3 = Date.now();
|
|
7357
7405
|
let E3 = false;
|
|
@@ -7379,7 +7427,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7379
7427
|
2 === a5.length && (u3[a5[0]] = a5[1]);
|
|
7380
7428
|
});
|
|
7381
7429
|
} catch (e4) {
|
|
7382
|
-
|
|
7430
|
+
fp && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), u3 = null;
|
|
7383
7431
|
}
|
|
7384
7432
|
if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", a4, u3);
|
|
7385
7433
|
else {
|
|
@@ -7395,12 +7443,12 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7395
7443
|
sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
|
|
7396
7444
|
})();
|
|
7397
7445
|
try {
|
|
7398
|
-
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) ||
|
|
7446
|
+
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || wp;
|
|
7399
7447
|
if (U2.ws && 1 === U2.ws.readyState) return;
|
|
7400
7448
|
const b2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e, F2, a, O2, E2, D2, _2, "JS/TS", b2);
|
|
7401
7449
|
if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
7402
|
-
const u3 = await initializeRecording(m3, a, e, F2);
|
|
7403
|
-
U2.ws =
|
|
7450
|
+
const u3 = (I2 == null ? void 0 : I2.env) || (I2 == null ? void 0 : I2.environment), b3 = await initializeRecording(m3, a, e, F2, u3);
|
|
7451
|
+
U2.ws = b3, U2.initialized = true, U2.sentMapUuidOnce || (!(function sendMapUuidIfAvailable(e2 = "", a2 = "") {
|
|
7404
7452
|
window.sfMapUuid && sendMessage({ type: "mapUuid", data: { mapUuid: window.sfMapUuid, serviceIdentifier: e2, serviceVersion: a2 } });
|
|
7405
7453
|
})(C2, w2), U2.sentMapUuidOnce = true);
|
|
7406
7454
|
} else console.error("Failed to start recording session:", x3.errors || x3);
|
|
@@ -7431,7 +7479,7 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7431
7479
|
const e = document.visibilityState, a = Date.now();
|
|
7432
7480
|
"visible" === e && getOrSetSessionId();
|
|
7433
7481
|
try {
|
|
7434
|
-
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }),
|
|
7482
|
+
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), fp && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
|
|
7435
7483
|
} catch (e2) {
|
|
7436
7484
|
console.warn("[Sailfish] Failed to send visibility change event:", e2);
|
|
7437
7485
|
}
|
|
@@ -7439,12 +7487,12 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7439
7487
|
}), H && window.addEventListener("beforeunload", () => {
|
|
7440
7488
|
clearPageVisitDataFromSessionStorage();
|
|
7441
7489
|
});
|
|
7442
|
-
exports.DEFAULT_CAPTURE_SETTINGS =
|
|
7490
|
+
exports.DEFAULT_CAPTURE_SETTINGS = wp, exports.DEFAULT_CONSOLE_RECORDING_SETTINGS = Sp, exports.STORAGE_VERSION = 1, exports.addOrUpdateMetadata = function addOrUpdateMetadata(e) {
|
|
7443
7491
|
const a = { type: "addOrUpdateMetadata", metadata: e };
|
|
7444
|
-
|
|
7445
|
-
}, exports.buildBatches = buildBatches, exports.createTriageFromRecorder = createTriageFromRecorder, exports.disableFunctionSpanTracking = disableFunctionSpanTracking, exports.enableFunctionSpanTracking = enableFunctionSpanTracking, exports.eventSize = eventSize, exports.fetchCaptureSettings = fetchCaptureSettings, exports.flushBufferedEvents = flushBufferedEvents, exports.getFuncSpanHeader = getFuncSpanHeader, exports.getUrlAndStoredUuids = getUrlAndStoredUuids, exports.identify = function identify(e, a = {}, u = false) {
|
|
7492
|
+
hp && JSON.stringify(hp) === JSON.stringify(e) || (hp = e, sendMessage(a));
|
|
7493
|
+
}, exports.buildBatches = buildBatches, exports.clearStaleFuncSpanState = clearStaleFuncSpanState, exports.createTriageFromRecorder = createTriageFromRecorder, exports.disableFunctionSpanTracking = disableFunctionSpanTracking, exports.enableFunctionSpanTracking = enableFunctionSpanTracking, exports.eventSize = eventSize, exports.fetchCaptureSettings = fetchCaptureSettings, exports.fetchFunctionSpanTrackingEnabled = fetchFunctionSpanTrackingEnabled, exports.flushBufferedEvents = flushBufferedEvents, exports.getFuncSpanHeader = getFuncSpanHeader, exports.getOrSetSessionId = getOrSetSessionId, exports.getUrlAndStoredUuids = getUrlAndStoredUuids, exports.identify = function identify(e, a = {}, u = false) {
|
|
7446
7494
|
const m2 = { type: "identify", userId: e, traits: a };
|
|
7447
|
-
|
|
7495
|
+
dp && dp.userId === e && JSON.stringify(dp.traits) === JSON.stringify(a) || (dp = { userId: e, traits: a, overwrite: u }, sendMessage(m2));
|
|
7448
7496
|
}, exports.initRecorder = async (e) => {
|
|
7449
7497
|
if ("undefined" == typeof window) return;
|
|
7450
7498
|
const a = window.__sailfish_recorder || (window.__sailfish_recorder = {}), u = getOrSetSessionId();
|
|
@@ -7453,8 +7501,8 @@ exports.DEFAULT_CAPTURE_SETTINGS = yp, exports.DEFAULT_CONSOLE_RECORDING_SETTING
|
|
|
7453
7501
|
})().finally(() => {
|
|
7454
7502
|
delete a.initPromise;
|
|
7455
7503
|
})), a.initPromise);
|
|
7456
|
-
}, exports.initializeConsolePlugin = initializeConsolePlugin, exports.initializeDomContentEvents = initializeDomContentEvents, exports.initializeRecording = initializeRecording, exports.initializeWebSocket = initializeWebSocket, exports.isFunctionSpanTrackingEnabled = isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = matchUrlWithWildcard, exports.openReportIssueModal = function openReportIssueModal() {
|
|
7457
|
-
|
|
7504
|
+
}, exports.initializeConsolePlugin = initializeConsolePlugin, exports.initializeDomContentEvents = initializeDomContentEvents, exports.initializeFunctionSpanTrackingFromApi = initializeFunctionSpanTrackingFromApi, exports.initializeRecording = initializeRecording, exports.initializeWebSocket = initializeWebSocket, exports.isFunctionSpanTrackingEnabled = isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = matchUrlWithWildcard, exports.openReportIssueModal = function openReportIssueModal() {
|
|
7505
|
+
ut ? stopRecording() : (injectModalHTML(), st && document.body.appendChild(st));
|
|
7458
7506
|
}, exports.sendDomainsToNotPropagateHeaderTo = sendDomainsToNotPropagateHeaderTo, exports.sendEvent = sendEvent, exports.sendGraphQLRequest = sendGraphQLRequest, exports.sendMessage = sendMessage, exports.startRecording = startRecording, exports.startRecordingSession = startRecordingSession, exports.trackingEvent = function trackingEvent(e) {
|
|
7459
7507
|
sendMessage({ type: "trackingEvent", trackingData: e, timestamp: exports.nowTimestamp() });
|
|
7460
7508
|
}, exports.withAppUrlMetadata = withAppUrlMetadata;
|