@fkn/lib 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{background-DWzRqH12.cjs → background-D-gZyvaP.cjs} +1 -1
- package/{background-_3_Cnyol.js → background-DCdL9DVK.js} +2 -2
- package/index.cjs +6 -8
- package/index.d.ts +27 -30
- package/index.js +266 -1748
- package/locator-Bz_60Zup.cjs +53 -0
- package/{locator-1wWrCOyE.js → locator-fXEVniGP.js} +358 -92
- package/package.json +3 -4
- package/_redirects +0 -5
- package/locator-DHsqhrFb.cjs +0 -31
- package/logo.png +0 -0
- package/logo.svg +0 -7
|
@@ -324,7 +324,7 @@ var pe = (e) => {
|
|
|
324
324
|
}), ye = "owner", be = (e) => {
|
|
325
325
|
throw Error("owner: must be processed by the executor as an upward pivot");
|
|
326
326
|
}, xe = async () => {
|
|
327
|
-
let { backgroundResolvers: e } = await import("./background-
|
|
327
|
+
let { backgroundResolvers: e } = await import("./background-DCdL9DVK.js"), t = await (await e).getParentFrameId();
|
|
328
328
|
if (!t) throw Error("owner: already at top frame");
|
|
329
329
|
return t;
|
|
330
330
|
}, Se = () => ({
|
|
@@ -348,7 +348,7 @@ var pe = (e) => {
|
|
|
348
348
|
}
|
|
349
349
|
}, F;
|
|
350
350
|
(function(e) {
|
|
351
|
-
e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.container = "container", e.charset = "charset", e.document = "document", e.customMedia = "custom-media", e.fontFace = "font-face", e.host = "host", e.import = "import", e.keyframes = "keyframes", e.keyframe = "keyframe", e.layer = "layer", e.media = "media", e.namespace = "namespace", e.page = "page", e.startingStyle = "starting-style", e.supports = "supports";
|
|
351
|
+
e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.atRule = "at-rule", e.container = "container", e.charset = "charset", e.counterStyle = "counter-style", e.document = "document", e.customMedia = "custom-media", e.fontFace = "font-face", e.fontFeatureValues = "font-feature-values", e.host = "host", e.import = "import", e.keyframes = "keyframes", e.keyframe = "keyframe", e.layer = "layer", e.media = "media", e.namespace = "namespace", e.page = "page", e.pageMarginBox = "page-margin-box", e.positionTry = "position-try", e.property = "property", e.scope = "scope", e.startingStyle = "starting-style", e.supports = "supports", e.viewTransition = "view-transition";
|
|
352
352
|
})(F ||= {});
|
|
353
353
|
var I = (e, t, n) => {
|
|
354
354
|
let r = n, i = 1e4;
|
|
@@ -440,9 +440,11 @@ var Te = class {
|
|
|
440
440
|
case F.comment: return this.comment(e);
|
|
441
441
|
case F.container: return this.container(e);
|
|
442
442
|
case F.charset: return this.charset(e);
|
|
443
|
+
case F.counterStyle: return this.counterStyle(e);
|
|
443
444
|
case F.document: return this.document(e);
|
|
444
445
|
case F.customMedia: return this.customMedia(e);
|
|
445
446
|
case F.fontFace: return this.fontFace(e);
|
|
447
|
+
case F.fontFeatureValues: return this.fontFeatureValues(e);
|
|
446
448
|
case F.host: return this.host(e);
|
|
447
449
|
case F.import: return this.import(e);
|
|
448
450
|
case F.keyframes: return this.keyframes(e);
|
|
@@ -451,8 +453,14 @@ var Te = class {
|
|
|
451
453
|
case F.media: return this.media(e);
|
|
452
454
|
case F.namespace: return this.namespace(e);
|
|
453
455
|
case F.page: return this.page(e);
|
|
456
|
+
case F.pageMarginBox: return this.pageMarginBox(e);
|
|
457
|
+
case F.positionTry: return this.positionTry(e);
|
|
458
|
+
case F.property: return this.property(e);
|
|
459
|
+
case F.scope: return this.scope(e);
|
|
454
460
|
case F.startingStyle: return this.startingStyle(e);
|
|
455
461
|
case F.supports: return this.supports(e);
|
|
462
|
+
case F.viewTransition: return this.viewTransition(e);
|
|
463
|
+
case F.atRule: return this.genericAtRule(e);
|
|
456
464
|
}
|
|
457
465
|
}
|
|
458
466
|
mapVisit(e, t) {
|
|
@@ -513,6 +521,9 @@ var Te = class {
|
|
|
513
521
|
let t = e.selectors.length ? `${e.selectors.join(", ")} ` : "";
|
|
514
522
|
return this.emit(`@page ${t}`, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
515
523
|
}
|
|
524
|
+
pageMarginBox(e) {
|
|
525
|
+
return this.compress ? this.emit(`@${e.name}`, e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit(`${this.indent()}@${e.name} `, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit(`\n${this.indent()}}`);
|
|
526
|
+
}
|
|
516
527
|
fontFace(e) {
|
|
517
528
|
return this.compress ? this.emit("@font-face", e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit("@font-face ", e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
518
529
|
}
|
|
@@ -522,6 +533,32 @@ var Te = class {
|
|
|
522
533
|
customMedia(e) {
|
|
523
534
|
return this.emit(`@custom-media ${e.name} ${e.media};`, e.position);
|
|
524
535
|
}
|
|
536
|
+
property(e) {
|
|
537
|
+
return this.compress ? this.emit(`@property ${e.name}`, e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit(`@property ${e.name} `, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
538
|
+
}
|
|
539
|
+
counterStyle(e) {
|
|
540
|
+
return this.compress ? this.emit(`@counter-style ${e.name}`, e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit(`@counter-style ${e.name} `, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
541
|
+
}
|
|
542
|
+
fontFeatureValues(e) {
|
|
543
|
+
return this.compress ? this.emit(`@font-feature-values ${e.fontFamily}`, e.position) + this.emit("{") + this.mapVisit(e.rules) + this.emit("}") : this.emit(`${this.indent()}@font-feature-values ${e.fontFamily}`, e.position) + this.emit(` {\n${this.indent(1)}`) + this.mapVisit(e.rules, "\n\n") + this.emit(`\n${this.indent(-1)}${this.indent()}}`);
|
|
544
|
+
}
|
|
545
|
+
scope(e) {
|
|
546
|
+
let t = e.scope ? ` ${e.scope}` : "";
|
|
547
|
+
return this.compress ? this.emit(`@scope${t}`, e.position) + this.emit("{") + this.mapVisit(e.rules) + this.emit("}") : this.emit(`${this.indent()}@scope${t}`, e.position) + this.emit(` {\n${this.indent(1)}`) + this.mapVisit(e.rules, "\n\n") + this.emit(`\n${this.indent(-1)}${this.indent()}}`);
|
|
548
|
+
}
|
|
549
|
+
viewTransition(e) {
|
|
550
|
+
return this.compress ? this.emit("@view-transition", e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit("@view-transition ", e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
551
|
+
}
|
|
552
|
+
positionTry(e) {
|
|
553
|
+
return this.compress ? this.emit(`@position-try ${e.name}`, e.position) + this.emit("{") + this.mapVisit(e.declarations) + this.emit("}") : this.emit(`@position-try ${e.name} `, e.position) + this.emit("{\n") + this.emit(this.indent(1)) + this.mapVisit(e.declarations, "\n") + this.emit(this.indent(-1)) + this.emit("\n}");
|
|
554
|
+
}
|
|
555
|
+
genericAtRule(e) {
|
|
556
|
+
let t = e.prelude ? ` ${e.prelude}` : "";
|
|
557
|
+
if (this.compress) return this.emit(`@${e.name}${t}`, e.position) + (e.rules ? this.emit("{") + this.mapVisit(e.rules) + this.emit("}") : ";");
|
|
558
|
+
if (!e.rules) return this.emit(`${this.indent()}@${e.name}${t};`, e.position);
|
|
559
|
+
let n = e.rules.some((e) => e.type !== F.declaration && e.type !== F.comment), r = n ? "\n\n" : "\n";
|
|
560
|
+
return this.emit(`${this.indent()}@${e.name}${t}`, e.position) + this.emit(n ? ` {\n${this.indent(1)}` : " {\n") + this.emit(n ? "" : this.indent(1)) + this.mapVisit(e.rules, r) + this.emit(n ? `\n${this.indent(-1)}${this.indent()}}` : `${this.indent(-1)}\n${this.indent()}}`);
|
|
561
|
+
}
|
|
525
562
|
rule(e) {
|
|
526
563
|
let t = e.declarations;
|
|
527
564
|
if (!t.length) return "";
|
|
@@ -543,7 +580,7 @@ var Te = class {
|
|
|
543
580
|
return (i) => (i.position = new we(e, {
|
|
544
581
|
line: n,
|
|
545
582
|
column: r
|
|
546
|
-
}, t?.source || ""),
|
|
583
|
+
}, t?.source || ""), u(), i);
|
|
547
584
|
}
|
|
548
585
|
let a = [];
|
|
549
586
|
function o(i) {
|
|
@@ -553,18 +590,13 @@ var Te = class {
|
|
|
553
590
|
}
|
|
554
591
|
function s() {
|
|
555
592
|
let t = /^{\s*/.exec(e);
|
|
556
|
-
return !!t && (
|
|
593
|
+
return !!t && (l(t), !0);
|
|
557
594
|
}
|
|
558
595
|
function c() {
|
|
559
596
|
let t = /^}/.exec(e);
|
|
560
|
-
return !!t && (
|
|
597
|
+
return !!t && (l(t), !0);
|
|
561
598
|
}
|
|
562
|
-
function l() {
|
|
563
|
-
let t, n = [];
|
|
564
|
-
for (d(), f(n); e.length && e.charAt(0) !== "}" && (t = S() || C(), t);) n.push(t), f(n);
|
|
565
|
-
return n;
|
|
566
|
-
}
|
|
567
|
-
function u(t) {
|
|
599
|
+
function l(t) {
|
|
568
600
|
let i = t[0];
|
|
569
601
|
return function(e) {
|
|
570
602
|
let t = e.match(/\n/g);
|
|
@@ -573,28 +605,30 @@ var Te = class {
|
|
|
573
605
|
r = ~i ? e.length - i : r + e.length;
|
|
574
606
|
}(i), e = e.slice(i.length), t;
|
|
575
607
|
}
|
|
576
|
-
function
|
|
608
|
+
function u() {
|
|
577
609
|
let t = /^\s*/.exec(e);
|
|
578
|
-
t &&
|
|
610
|
+
t && l(t);
|
|
579
611
|
}
|
|
580
|
-
function
|
|
612
|
+
function d(e) {
|
|
581
613
|
e ||= [];
|
|
582
|
-
let t =
|
|
583
|
-
for (; t;) e.push(t), t =
|
|
614
|
+
let t = f();
|
|
615
|
+
for (; t;) e.push(t), t = f();
|
|
584
616
|
return e;
|
|
585
617
|
}
|
|
586
|
-
function
|
|
618
|
+
function f() {
|
|
587
619
|
let t = i();
|
|
588
620
|
if (e.charAt(0) !== "/" || e.charAt(1) !== "*") return;
|
|
589
621
|
let n = /^\/\*[^]*?\*\//.exec(e);
|
|
590
|
-
return n ? (
|
|
622
|
+
return n ? (l(n), t({
|
|
591
623
|
type: F.comment,
|
|
592
624
|
comment: n[0].slice(2, -2)
|
|
593
625
|
})) : o("End of comment missing");
|
|
594
626
|
}
|
|
595
|
-
function
|
|
596
|
-
let t =
|
|
597
|
-
if (t
|
|
627
|
+
function p() {
|
|
628
|
+
let t = L(e, ["{"]);
|
|
629
|
+
if (t === -1 || t === 0) return;
|
|
630
|
+
let n = e.substring(0, t);
|
|
631
|
+
return l([n]), ((e, t) => {
|
|
598
632
|
let n = [], r = 0;
|
|
599
633
|
for (; r < e.length;) {
|
|
600
634
|
let i = L(e, t, r);
|
|
@@ -602,78 +636,171 @@ var Te = class {
|
|
|
602
636
|
n.push(e.substring(r, i)), r = i + 1;
|
|
603
637
|
}
|
|
604
638
|
return n;
|
|
605
|
-
})(z(
|
|
639
|
+
})(z(n).replace(R, ""), [","]).map((e) => z(e));
|
|
606
640
|
}
|
|
607
|
-
function
|
|
641
|
+
function m() {
|
|
608
642
|
let t = i(), n = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);
|
|
609
643
|
if (!n) return;
|
|
610
|
-
|
|
644
|
+
l(n);
|
|
611
645
|
let r = z(n[0]), a = /^:\s*/.exec(e);
|
|
612
646
|
if (!a) return o("property missing ':'");
|
|
613
|
-
|
|
647
|
+
l(a);
|
|
614
648
|
let s = "", c = L(e, [";", "}"]);
|
|
615
|
-
c !== -1 && (s = e.substring(0, c),
|
|
616
|
-
let
|
|
649
|
+
c !== -1 && (s = e.substring(0, c), l([s]), s = z(s).replace(R, ""));
|
|
650
|
+
let u = t({
|
|
617
651
|
type: F.declaration,
|
|
618
652
|
property: r.replace(R, ""),
|
|
619
653
|
value: s
|
|
620
654
|
}), d = /^[;\s]*/.exec(e);
|
|
621
|
-
return d &&
|
|
655
|
+
return d && l(d), u;
|
|
622
656
|
}
|
|
623
|
-
function
|
|
624
|
-
let
|
|
657
|
+
function h() {
|
|
658
|
+
let n = [];
|
|
625
659
|
if (!s()) return o("missing '{'");
|
|
626
|
-
|
|
627
|
-
let
|
|
628
|
-
for (;
|
|
629
|
-
|
|
660
|
+
d(n);
|
|
661
|
+
let r = m();
|
|
662
|
+
for (; r;) n.push(r), d(n), r = m();
|
|
663
|
+
for (; t?.silent && e.length && e.charAt(0) !== "}";) {
|
|
664
|
+
let t = e.indexOf(";"), i = e.indexOf("}");
|
|
665
|
+
if (t === -1 || !(i === -1 || t < i)) break;
|
|
666
|
+
for (l([e.substring(0, t + 1)]), u(), d(n), r = m(); r;) n.push(r), d(n), r = m();
|
|
667
|
+
}
|
|
668
|
+
return c() ? n : o("missing '}'");
|
|
669
|
+
}
|
|
670
|
+
function g() {
|
|
671
|
+
let t = L(e, ["{"]);
|
|
672
|
+
if (t === -1) return !1;
|
|
673
|
+
let n = L(e, [";"]), r = L(e, ["}"]);
|
|
674
|
+
return !(n !== -1 && n < t) && !(r !== -1 && r < t);
|
|
630
675
|
}
|
|
631
676
|
function _() {
|
|
677
|
+
let n = [];
|
|
678
|
+
if (!s()) return o("missing '{'");
|
|
679
|
+
for (d(n); e.length && e.charAt(0) !== "}";) {
|
|
680
|
+
if (e.charAt(0) === "@") {
|
|
681
|
+
let e = T();
|
|
682
|
+
if (e) {
|
|
683
|
+
n.push(e), d(n);
|
|
684
|
+
continue;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
if (g()) {
|
|
688
|
+
let e = E();
|
|
689
|
+
if (e) {
|
|
690
|
+
n.push(e), d(n);
|
|
691
|
+
continue;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
let r = m();
|
|
695
|
+
if (!r) {
|
|
696
|
+
if (t?.silent) {
|
|
697
|
+
let t = e.indexOf(";"), r = e.indexOf("}");
|
|
698
|
+
if (t !== -1 && (r === -1 || t < r)) {
|
|
699
|
+
l([e.substring(0, t + 1)]), u(), d(n);
|
|
700
|
+
continue;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
n.push(r), d(n);
|
|
706
|
+
}
|
|
707
|
+
return c() ? n : o("missing '}'");
|
|
708
|
+
}
|
|
709
|
+
function v() {
|
|
710
|
+
let n = [];
|
|
711
|
+
for (u(), d(n); e.length && e.charAt(0) !== "}";) {
|
|
712
|
+
if (e.charAt(0) === "@") {
|
|
713
|
+
let e = T();
|
|
714
|
+
if (e) {
|
|
715
|
+
n.push(e), d(n);
|
|
716
|
+
continue;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
if (g()) {
|
|
720
|
+
let e = E();
|
|
721
|
+
if (e) {
|
|
722
|
+
n.push(e), d(n);
|
|
723
|
+
continue;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
let r = m();
|
|
727
|
+
if (!r) {
|
|
728
|
+
if (t?.silent) {
|
|
729
|
+
let t = e.indexOf(";"), r = e.indexOf("}");
|
|
730
|
+
if (t !== -1 && (r === -1 || t < r)) {
|
|
731
|
+
l([e.substring(0, t + 1)]), u(), d(n);
|
|
732
|
+
continue;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
break;
|
|
736
|
+
}
|
|
737
|
+
n.push(r), d(n);
|
|
738
|
+
}
|
|
739
|
+
return n;
|
|
740
|
+
}
|
|
741
|
+
function y() {
|
|
632
742
|
let t = [], n = i(), r = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
|
|
633
743
|
for (; r;) {
|
|
634
|
-
let n =
|
|
744
|
+
let n = l(r);
|
|
635
745
|
t.push(n[1]);
|
|
636
746
|
let i = /^,\s*/.exec(e);
|
|
637
|
-
i &&
|
|
747
|
+
i && l(i), r = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
|
|
638
748
|
}
|
|
639
749
|
if (t.length) return n({
|
|
640
750
|
type: F.keyframe,
|
|
641
751
|
values: t,
|
|
642
|
-
declarations:
|
|
752
|
+
declarations: h() || []
|
|
643
753
|
});
|
|
644
754
|
}
|
|
645
|
-
let
|
|
646
|
-
|
|
755
|
+
let b = RegExp(`^@(${[
|
|
756
|
+
"top-left-corner",
|
|
757
|
+
"top-left",
|
|
758
|
+
"top-center",
|
|
759
|
+
"top-right",
|
|
760
|
+
"top-right-corner",
|
|
761
|
+
"bottom-left-corner",
|
|
762
|
+
"bottom-left",
|
|
763
|
+
"bottom-center",
|
|
764
|
+
"bottom-right",
|
|
765
|
+
"bottom-right-corner",
|
|
766
|
+
"left-top",
|
|
767
|
+
"left-middle",
|
|
768
|
+
"left-bottom",
|
|
769
|
+
"right-top",
|
|
770
|
+
"right-middle",
|
|
771
|
+
"right-bottom"
|
|
772
|
+
].join("|")})(?![\\w-])\\s*`), x = w("import"), S = w("charset"), C = w("namespace");
|
|
773
|
+
function w(t) {
|
|
647
774
|
let n = RegExp("^@" + t + "\\s*((?::?[^;'\"]|\"(?:\\\\\"|[^\"])*?\"|'(?:\\\\'|[^'])*?')+)(?:;|$)");
|
|
648
775
|
return () => {
|
|
649
776
|
let r = i(), a = n.exec(e);
|
|
650
777
|
if (!a) return;
|
|
651
|
-
let o =
|
|
778
|
+
let o = l(a), s = { type: t };
|
|
652
779
|
return s[t] = o[1].trim(), r(s);
|
|
653
780
|
};
|
|
654
781
|
}
|
|
655
|
-
function
|
|
782
|
+
function T() {
|
|
656
783
|
if (e[0] === "@") return function() {
|
|
657
784
|
let t = i(), n = /^@([-\w]+)?keyframes\s*/.exec(e);
|
|
658
785
|
if (!n) return;
|
|
659
|
-
let r =
|
|
786
|
+
let r = l(n)[1], a = /^([-\w]+)\s*/.exec(e);
|
|
660
787
|
if (!a) return o("@keyframes missing name");
|
|
661
|
-
let
|
|
788
|
+
let u = l(a)[1];
|
|
662
789
|
if (!s()) return o("@keyframes missing '{'");
|
|
663
|
-
let
|
|
664
|
-
for (; p;)
|
|
790
|
+
let f = d(), p = y();
|
|
791
|
+
for (; p;) f.push(p), f = f.concat(d()), p = y();
|
|
665
792
|
return c() ? t({
|
|
666
793
|
type: F.keyframes,
|
|
667
|
-
name:
|
|
794
|
+
name: u,
|
|
668
795
|
vendor: r,
|
|
669
|
-
keyframes:
|
|
796
|
+
keyframes: f
|
|
670
797
|
}) : o("@keyframes missing '}'");
|
|
671
798
|
}() || function() {
|
|
672
799
|
let t = i(), n = /^@media *([^{]+)/.exec(e);
|
|
673
800
|
if (!n) return;
|
|
674
|
-
let r = z(
|
|
801
|
+
let r = z(l(n)[1]);
|
|
675
802
|
if (!s()) return o("@media missing '{'");
|
|
676
|
-
let a =
|
|
803
|
+
let a = v();
|
|
677
804
|
return c() ? t({
|
|
678
805
|
type: F.media,
|
|
679
806
|
media: r,
|
|
@@ -682,7 +809,7 @@ var Te = class {
|
|
|
682
809
|
}() || function() {
|
|
683
810
|
let t = i(), n = /^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);
|
|
684
811
|
if (!n) return;
|
|
685
|
-
let r =
|
|
812
|
+
let r = l(n);
|
|
686
813
|
return t({
|
|
687
814
|
type: F.customMedia,
|
|
688
815
|
name: z(r[1]),
|
|
@@ -691,34 +818,45 @@ var Te = class {
|
|
|
691
818
|
}() || function() {
|
|
692
819
|
let t = i(), n = /^@supports *([^{]+)/.exec(e);
|
|
693
820
|
if (!n) return;
|
|
694
|
-
let r = z(
|
|
821
|
+
let r = z(l(n)[1]);
|
|
695
822
|
if (!s()) return o("@supports missing '{'");
|
|
696
|
-
let a =
|
|
823
|
+
let a = v();
|
|
697
824
|
return c() ? t({
|
|
698
825
|
type: F.supports,
|
|
699
826
|
supports: r,
|
|
700
827
|
rules: a
|
|
701
828
|
}) : o("@supports missing '}'");
|
|
702
|
-
}() ||
|
|
829
|
+
}() || x() || S() || C() || function() {
|
|
703
830
|
let t = i(), n = /^@([-\w]+)?document *([^{]+)/.exec(e);
|
|
704
831
|
if (!n) return;
|
|
705
|
-
let r =
|
|
832
|
+
let r = l(n), a = z(r[1]), u = z(r[2]);
|
|
706
833
|
if (!s()) return o("@document missing '{'");
|
|
707
|
-
let
|
|
834
|
+
let d = v();
|
|
708
835
|
return c() ? t({
|
|
709
836
|
type: F.document,
|
|
710
|
-
document:
|
|
837
|
+
document: u,
|
|
711
838
|
vendor: a,
|
|
712
|
-
rules:
|
|
839
|
+
rules: d
|
|
713
840
|
}) : o("@document missing '}'");
|
|
714
841
|
}() || function() {
|
|
715
842
|
let t = i(), n = /^@page */.exec(e);
|
|
716
843
|
if (!n) return;
|
|
717
|
-
|
|
718
|
-
let r =
|
|
844
|
+
l(n);
|
|
845
|
+
let r = p() || [];
|
|
719
846
|
if (!s()) return o("@page missing '{'");
|
|
720
|
-
let a =
|
|
721
|
-
for (;
|
|
847
|
+
let a = [];
|
|
848
|
+
for (d(a); e.length && e.charAt(0) !== "}";) {
|
|
849
|
+
if (e.charAt(0) === "@") {
|
|
850
|
+
let e = T();
|
|
851
|
+
if (e) {
|
|
852
|
+
a.push(e), d(a);
|
|
853
|
+
continue;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
let t = m();
|
|
857
|
+
if (!t) break;
|
|
858
|
+
a.push(t), d(a);
|
|
859
|
+
}
|
|
722
860
|
return c() ? t({
|
|
723
861
|
type: F.page,
|
|
724
862
|
selectors: r,
|
|
@@ -727,8 +865,8 @@ var Te = class {
|
|
|
727
865
|
}() || function() {
|
|
728
866
|
let t = i(), n = /^@host\s*/.exec(e);
|
|
729
867
|
if (!n) return;
|
|
730
|
-
if (
|
|
731
|
-
let r =
|
|
868
|
+
if (l(n), !s()) return o("@host missing '{'");
|
|
869
|
+
let r = v();
|
|
732
870
|
return c() ? t({
|
|
733
871
|
type: F.host,
|
|
734
872
|
rules: r
|
|
@@ -736,19 +874,30 @@ var Te = class {
|
|
|
736
874
|
}() || function() {
|
|
737
875
|
let t = i(), n = /^@font-face\s*/.exec(e);
|
|
738
876
|
if (!n) return;
|
|
739
|
-
if (
|
|
740
|
-
let r =
|
|
741
|
-
for (; a;) r.push(a), r = r.concat(
|
|
877
|
+
if (l(n), !s()) return o("@font-face missing '{'");
|
|
878
|
+
let r = d(), a = m();
|
|
879
|
+
for (; a;) r.push(a), r = r.concat(d()), a = m();
|
|
742
880
|
return c() ? t({
|
|
743
881
|
type: F.fontFace,
|
|
744
882
|
declarations: r
|
|
745
883
|
}) : o("@font-face missing '}'");
|
|
884
|
+
}() || function() {
|
|
885
|
+
let t = i(), n = /^@font-feature-values\s+([^{]+)/.exec(e);
|
|
886
|
+
if (!n) return;
|
|
887
|
+
let r = z(l(n)[1]);
|
|
888
|
+
if (!s()) return o("@font-feature-values missing '{'");
|
|
889
|
+
let a = v();
|
|
890
|
+
return c() ? t({
|
|
891
|
+
type: F.fontFeatureValues,
|
|
892
|
+
fontFamily: r,
|
|
893
|
+
rules: a
|
|
894
|
+
}) : o("@font-feature-values missing '}'");
|
|
746
895
|
}() || function() {
|
|
747
896
|
let t = i(), n = /^@container *([^{]+)/.exec(e);
|
|
748
897
|
if (!n) return;
|
|
749
|
-
let r = z(
|
|
898
|
+
let r = z(l(n)[1]);
|
|
750
899
|
if (!s()) return o("@container missing '{'");
|
|
751
|
-
let a =
|
|
900
|
+
let a = v();
|
|
752
901
|
return c() ? t({
|
|
753
902
|
type: F.container,
|
|
754
903
|
container: r,
|
|
@@ -757,8 +906,8 @@ var Te = class {
|
|
|
757
906
|
}() || function() {
|
|
758
907
|
let t = i(), n = /^@starting-style\s*/.exec(e);
|
|
759
908
|
if (!n) return;
|
|
760
|
-
if (
|
|
761
|
-
let r =
|
|
909
|
+
if (l(n), !s()) return o("@starting-style missing '{'");
|
|
910
|
+
let r = v();
|
|
762
911
|
return c() ? t({
|
|
763
912
|
type: F.startingStyle,
|
|
764
913
|
rules: r
|
|
@@ -766,37 +915,145 @@ var Te = class {
|
|
|
766
915
|
}() || function() {
|
|
767
916
|
let t = i(), n = /^@layer *([^{;@]+)/.exec(e);
|
|
768
917
|
if (!n) return;
|
|
769
|
-
let r = z(
|
|
918
|
+
let r = z(l(n)[1]);
|
|
770
919
|
if (!s()) {
|
|
771
920
|
let n = /^[;\s]*/.exec(e);
|
|
772
|
-
return n &&
|
|
921
|
+
return n && l(n), t({
|
|
773
922
|
type: F.layer,
|
|
774
923
|
layer: r
|
|
775
924
|
});
|
|
776
925
|
}
|
|
777
|
-
let a =
|
|
926
|
+
let a = v();
|
|
778
927
|
return c() ? t({
|
|
779
928
|
type: F.layer,
|
|
780
929
|
layer: r,
|
|
781
930
|
rules: a
|
|
782
931
|
}) : o("@layer missing '}'");
|
|
932
|
+
}() || function() {
|
|
933
|
+
let t = i(), n = /^@property\s+(--[-\w]+)\s*/.exec(e);
|
|
934
|
+
if (!n) return;
|
|
935
|
+
let r = l(n)[1];
|
|
936
|
+
if (!s()) return o("@property missing '{'");
|
|
937
|
+
let a = d(), u = m();
|
|
938
|
+
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
939
|
+
return c() ? t({
|
|
940
|
+
type: F.property,
|
|
941
|
+
name: r,
|
|
942
|
+
declarations: a
|
|
943
|
+
}) : o("@property missing '}'");
|
|
944
|
+
}() || function() {
|
|
945
|
+
let t = i(), n = /^@counter-style\s+([-\w]+)\s*/.exec(e);
|
|
946
|
+
if (!n) return;
|
|
947
|
+
let r = l(n)[1];
|
|
948
|
+
if (!s()) return o("@counter-style missing '{'");
|
|
949
|
+
let a = d(), u = m();
|
|
950
|
+
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
951
|
+
return c() ? t({
|
|
952
|
+
type: F.counterStyle,
|
|
953
|
+
name: r,
|
|
954
|
+
declarations: a
|
|
955
|
+
}) : o("@counter-style missing '}'");
|
|
956
|
+
}() || function() {
|
|
957
|
+
let t = i(), n = /^@scope\s*([^{]*)/.exec(e);
|
|
958
|
+
if (!n) return;
|
|
959
|
+
let r = z(l(n)[1]);
|
|
960
|
+
if (!s()) return o("@scope missing '{'");
|
|
961
|
+
let a = v();
|
|
962
|
+
return c() ? t({
|
|
963
|
+
type: F.scope,
|
|
964
|
+
scope: r,
|
|
965
|
+
rules: a
|
|
966
|
+
}) : o("@scope missing '}'");
|
|
967
|
+
}() || function() {
|
|
968
|
+
let t = i(), n = /^@view-transition\s*/.exec(e);
|
|
969
|
+
if (!n) return;
|
|
970
|
+
if (l(n), !s()) return o("@view-transition missing '{'");
|
|
971
|
+
let r = d(), a = m();
|
|
972
|
+
for (; a;) r.push(a), r = r.concat(d()), a = m();
|
|
973
|
+
return c() ? t({
|
|
974
|
+
type: F.viewTransition,
|
|
975
|
+
declarations: r
|
|
976
|
+
}) : o("@view-transition missing '}'");
|
|
977
|
+
}() || function() {
|
|
978
|
+
let t = i(), n = /^@position-try\s+(--[-\w]+)\s*/.exec(e);
|
|
979
|
+
if (!n) return;
|
|
980
|
+
let r = l(n)[1];
|
|
981
|
+
if (!s()) return o("@position-try missing '{'");
|
|
982
|
+
let a = d(), u = m();
|
|
983
|
+
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
984
|
+
return c() ? t({
|
|
985
|
+
type: F.positionTry,
|
|
986
|
+
name: r,
|
|
987
|
+
declarations: a
|
|
988
|
+
}) : o("@position-try missing '}'");
|
|
989
|
+
}() || function() {
|
|
990
|
+
let t = i(), n = b.exec(e);
|
|
991
|
+
if (!n) return;
|
|
992
|
+
let r = l(n)[1];
|
|
993
|
+
if (!s()) return o(`@${r} missing '{'`);
|
|
994
|
+
let a = d(), u = m();
|
|
995
|
+
for (; u;) a.push(u), a = a.concat(d()), u = m();
|
|
996
|
+
return c() ? t({
|
|
997
|
+
type: F.pageMarginBox,
|
|
998
|
+
name: r,
|
|
999
|
+
declarations: a
|
|
1000
|
+
}) : o(`@${r} missing '}'`);
|
|
1001
|
+
}() || function() {
|
|
1002
|
+
let t = i(), n = /^@([-\w]+)\s*/.exec(e);
|
|
1003
|
+
if (!n) return;
|
|
1004
|
+
let r = l(n)[1], a = "", u = L(e, ["{", ";"]);
|
|
1005
|
+
if (u !== -1 && u > 0 && (a = z(e.substring(0, u)), l([e.substring(0, u)])), s()) {
|
|
1006
|
+
let e = v();
|
|
1007
|
+
return c() ? t({
|
|
1008
|
+
type: F.atRule,
|
|
1009
|
+
name: r,
|
|
1010
|
+
prelude: a,
|
|
1011
|
+
rules: e
|
|
1012
|
+
}) : o(`@${r} missing '}'`);
|
|
1013
|
+
}
|
|
1014
|
+
let d = /^[;\s]*/.exec(e);
|
|
1015
|
+
return d && l(d), t({
|
|
1016
|
+
type: F.atRule,
|
|
1017
|
+
name: r,
|
|
1018
|
+
prelude: a
|
|
1019
|
+
});
|
|
783
1020
|
}();
|
|
784
1021
|
}
|
|
785
|
-
function
|
|
786
|
-
let e = i(), t =
|
|
787
|
-
return t ? (
|
|
1022
|
+
function E() {
|
|
1023
|
+
let e = i(), t = p();
|
|
1024
|
+
return t ? (d(), e({
|
|
788
1025
|
type: F.rule,
|
|
789
1026
|
selectors: t,
|
|
790
|
-
declarations:
|
|
1027
|
+
declarations: _() || []
|
|
791
1028
|
})) : o("selector missing");
|
|
792
1029
|
}
|
|
793
1030
|
return B(function() {
|
|
794
|
-
let
|
|
1031
|
+
let n = function() {
|
|
1032
|
+
let n, r = [];
|
|
1033
|
+
for (u(), d(r); e.length;) {
|
|
1034
|
+
if (e.charAt(0) === "}") {
|
|
1035
|
+
if (t?.silent) {
|
|
1036
|
+
o("extra '}'"), l(["}"]), u(), d(r);
|
|
1037
|
+
continue;
|
|
1038
|
+
}
|
|
1039
|
+
break;
|
|
1040
|
+
}
|
|
1041
|
+
if (n = T() || E(), !n) {
|
|
1042
|
+
if (t?.silent) {
|
|
1043
|
+
l([e.charAt(0)]), u(), d(r);
|
|
1044
|
+
continue;
|
|
1045
|
+
}
|
|
1046
|
+
break;
|
|
1047
|
+
}
|
|
1048
|
+
r.push(n), d(r);
|
|
1049
|
+
}
|
|
1050
|
+
return r;
|
|
1051
|
+
}();
|
|
795
1052
|
return {
|
|
796
1053
|
type: F.stylesheet,
|
|
797
1054
|
stylesheet: {
|
|
798
1055
|
source: t?.source,
|
|
799
|
-
rules:
|
|
1056
|
+
rules: n,
|
|
800
1057
|
parsingErrors: a
|
|
801
1058
|
}
|
|
802
1059
|
};
|
|
@@ -917,7 +1174,7 @@ var Te = class {
|
|
|
917
1174
|
operationModules: X
|
|
918
1175
|
});
|
|
919
1176
|
//#endregion
|
|
920
|
-
//#region
|
|
1177
|
+
//#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/factory.js
|
|
921
1178
|
function Re(e) {
|
|
922
1179
|
return (t, n, r = []) => ({
|
|
923
1180
|
...Object.fromEntries(e.selectorModules.map((i) => [i.type, (...a) => {
|
|
@@ -928,11 +1185,12 @@ function Re(e) {
|
|
|
928
1185
|
}];
|
|
929
1186
|
return (i.nextLocatorType ?? e.ownType) === "locator" ? Gt(t, n, o) : Le(t, n, o);
|
|
930
1187
|
}])),
|
|
931
|
-
...Object.fromEntries(e.operationModules.map(({ type: e }) => [e, (...i) => se(t, r, e, i, n)]))
|
|
1188
|
+
...Object.fromEntries(e.operationModules.map(({ type: e }) => [e, (...i) => se(t, r, e, i, n)])),
|
|
1189
|
+
ensure: (e, t = {}) => n ? n(r, e, [t]) : Promise.resolve()
|
|
932
1190
|
});
|
|
933
1191
|
}
|
|
934
1192
|
//#endregion
|
|
935
|
-
//#region
|
|
1193
|
+
//#region node_modules/@mfkn/web-extension/lib/content-script/resolvers/locators/selectors/get-by-role.js
|
|
936
1194
|
var ze = /* @__PURE__ */ a({
|
|
937
1195
|
render: () => He,
|
|
938
1196
|
resolve: () => Ve,
|
|
@@ -1077,17 +1335,25 @@ var ze = /* @__PURE__ */ a({
|
|
|
1077
1335
|
title: "Hover over the page",
|
|
1078
1336
|
description: "Lets the app point at things to reveal menus or tooltips."
|
|
1079
1337
|
}, vt = (e, t = {}) => {
|
|
1080
|
-
let n = Z(e.elements)
|
|
1081
|
-
n.dispatchEvent(new MouseEvent("mouseenter", {
|
|
1082
|
-
bubbles: !1,
|
|
1083
|
-
cancelable: !0
|
|
1084
|
-
})), n.dispatchEvent(new MouseEvent("mouseover", {
|
|
1338
|
+
let n = Z(e.elements), r = n.getBoundingClientRect(), i = {
|
|
1085
1339
|
bubbles: !0,
|
|
1086
|
-
cancelable: !0
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
}
|
|
1340
|
+
cancelable: !0,
|
|
1341
|
+
composed: !0,
|
|
1342
|
+
clientX: r.left + r.width * (t.position?.x ?? .5),
|
|
1343
|
+
clientY: r.top + r.height * (t.position?.y ?? .5)
|
|
1344
|
+
}, a = {
|
|
1345
|
+
...i,
|
|
1346
|
+
pointerType: "mouse",
|
|
1347
|
+
pointerId: 1,
|
|
1348
|
+
isPrimary: !0
|
|
1349
|
+
};
|
|
1350
|
+
n.dispatchEvent(new PointerEvent("pointerover", a)), n.dispatchEvent(new PointerEvent("pointerenter", {
|
|
1351
|
+
...a,
|
|
1352
|
+
bubbles: !1
|
|
1353
|
+
})), n.dispatchEvent(new MouseEvent("mouseenter", {
|
|
1354
|
+
...i,
|
|
1355
|
+
bubbles: !1
|
|
1356
|
+
})), n.dispatchEvent(new MouseEvent("mouseover", i)), n.dispatchEvent(new PointerEvent("pointermove", a)), n.dispatchEvent(new MouseEvent("mousemove", i));
|
|
1091
1357
|
}, yt = /* @__PURE__ */ a({
|
|
1092
1358
|
permission: () => xt,
|
|
1093
1359
|
resolve: () => St,
|