@jolibox/ads 1.1.55 → 1.2.0-beta.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/dist/afg/adbreak-async-proxy.d.ts +8 -0
- package/dist/index.js +169 -146
- package/package.json +3 -3
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { IAFGAdBreakServerParams } from './type';
|
|
2
2
|
import type { IAbstractAFGProvider, IPlacementInfo, IAdBreakParams } from './ads-interface';
|
|
3
3
|
import type { IAdsContext } from '../type/base';
|
|
4
|
+
export declare enum ECrossFrameEvent {
|
|
5
|
+
JOLIBOX_AD_CALL_AD_BREAK_TIMEOUT = "JOLIBOX_AD_CALL_AD_BREAK_TIMEOUT",
|
|
6
|
+
JOLIBOX_AD_CALL_AD_BREAK = "JOLIBOX_AD_CALL_AD_BREAK",
|
|
7
|
+
JOLIBOX_AD_CALL_BEFORE_AD = "JOLIBOX_AD_CALL_BEFORE_AD",
|
|
8
|
+
JOLIBOX_AD_CALL_BEFORE_REWARD = "JOLIBOX_AD_CALL_BEFORE_REWARD",
|
|
9
|
+
JOLIBOX_AD_CALL_AFTER_AD = "JOLIBOX_AD_CALL_AFTER_AD",
|
|
10
|
+
JOLIBOX_AD_CALL_AD_BREAK_DONE = "JOLIBOX_AD_CALL_AD_BREAK_DONE"
|
|
11
|
+
}
|
|
4
12
|
export declare class AdBreakAsyncProxy {
|
|
5
13
|
private context;
|
|
6
14
|
private continueCallback?;
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Rt = Object.getOwnPropertySymbols;
|
|
2
2
|
var Mi = Object.prototype.hasOwnProperty, $i = Object.prototype.propertyIsEnumerable;
|
|
3
|
-
var
|
|
3
|
+
var It = (t, e) => {
|
|
4
4
|
var i = {};
|
|
5
5
|
for (var n in t)
|
|
6
6
|
Mi.call(t, n) && e.indexOf(n) < 0 && (i[n] = t[n]);
|
|
7
|
-
if (t != null &&
|
|
8
|
-
for (var n of
|
|
7
|
+
if (t != null && Rt)
|
|
8
|
+
for (var n of Rt(t))
|
|
9
9
|
e.indexOf(n) < 0 && $i.call(t, n) && (i[n] = t[n]);
|
|
10
10
|
return i;
|
|
11
11
|
};
|
|
12
|
-
import { options as ve, Component as
|
|
13
|
-
import { useRef as
|
|
12
|
+
import { options as ve, Component as Bi, isValidElement as Fi } from "preact";
|
|
13
|
+
import { useRef as ji, useLayoutEffect as Ui, useEffect as Je, useMemo as Vi, useState as Qt, useCallback as Gi, render as oe, createRef as xt } from "preact/compat";
|
|
14
14
|
var Zt = Object.defineProperty, qi = Object.defineProperties, Ki = Object.getOwnPropertyDescriptors, Ot = Object.getOwnPropertySymbols, zi = Object.prototype.hasOwnProperty, Hi = Object.prototype.propertyIsEnumerable, Tt = (t, e, i) => e in t ? Zt(t, e, {
|
|
15
15
|
enumerable: !0,
|
|
16
16
|
configurable: !0,
|
|
@@ -127,7 +127,7 @@ globalThis[Ct] || (globalThis[Ct] = sn);
|
|
|
127
127
|
var Dt = Symbol.for("Jolibox.canIUseMap.native"), an = {};
|
|
128
128
|
globalThis[Dt] || (globalThis[Dt] = an);
|
|
129
129
|
var ii = ((t) => (t[t.Other = 0] = "Other", t[t.Route = 1] = "Route", t[t.Click = 2] = "Click", t[t.View = 3] = "View", t[t.Expose = 4] = "Expose", t[t.Swipe = 5] = "Swipe", t[t.Input = 6] = "Input", t[t.Select = 7] = "Select", t[t.SwitchOn = 8] = "SwitchOn", t[t.SwitchOff = 9] = "SwitchOff", t[t.Submit = 10] = "Submit", t[t.Scroll = 11] = "Scroll", t[t.Hide = 12] = "Hide", t[t.System = 1e3] = "System", t[t.ErrorTrace = 1001] = "ErrorTrace", t[t.UserDefined = 1002] = "UserDefined", t))(ii || {}), ni = ((t) => (t.MiniGame = "mini-game", t.MiniDrama = "mini-drama", t.App = "app", t.WebSDK = "web-sdk", t.AppSDK = "app-sdk", t))(ni || {}), ri = ((t) => (t[t.App = 0] = "App", t[t.H5 = 1] = "H5", t[t.Weapp = 2] = "Weapp", t[t.Alipay = 3] = "Alipay", t[t.Gcash = 4] = "Gcash", t[t.Dana = 5] = "Dana", t[t.Umma = 6] = "Umma", t[t.WebSDK = 1e3] = "WebSDK", t[t.AppSDK = 1001] = "AppSDK", t[t.Other = 9999] = "Other", t))(ri || {}), Lt = ["name", "params"], dn = ["name", "type", "location", "target", "extra", "timestamp", "userId"], ln = ["platform", "os", "appVersion", "appId", "model", "brand", "uuid", "jsSdkVersion", "extra"];
|
|
130
|
-
function
|
|
130
|
+
function Be(t, e) {
|
|
131
131
|
return e.map((i) => {
|
|
132
132
|
if (i === "params" && t[i]) {
|
|
133
133
|
let n = t[i];
|
|
@@ -137,14 +137,14 @@ function je(t, e) {
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
function un(t) {
|
|
140
|
-
let e = t.location ?
|
|
141
|
-
return
|
|
140
|
+
let e = t.location ? Be(t.location, Lt) : null, i = t.target ? Be(t.target, Lt) : null;
|
|
141
|
+
return Be(Ji(Wi({}, t), {
|
|
142
142
|
location: e,
|
|
143
143
|
target: i
|
|
144
144
|
}), dn);
|
|
145
145
|
}
|
|
146
146
|
function cn(t) {
|
|
147
|
-
let e = t.events.map((n) => un(n)), i =
|
|
147
|
+
let e = t.events.map((n) => un(n)), i = Be(t.device, ln);
|
|
148
148
|
return [t.protocolVersion, e, i, t.project];
|
|
149
149
|
}
|
|
150
150
|
function hn() {
|
|
@@ -551,7 +551,12 @@ class En {
|
|
|
551
551
|
n = !1;
|
|
552
552
|
}), n = !this.videoChecker.paused, this.videoChecker.pause(), this.context.track("CallShowAdFn", Object.assign({}, {
|
|
553
553
|
userEvent: n
|
|
554
|
-
}, this.paramsToTrack)),
|
|
554
|
+
}, this.paramsToTrack)), window.postMessage({
|
|
555
|
+
type: "JOLIBOX_AD_CALL_BEFORE_REWARD",
|
|
556
|
+
data: Object.assign({}, {
|
|
557
|
+
userEvent: n
|
|
558
|
+
}, this.paramsToTrack)
|
|
559
|
+
}, "*"), at() && this.context.track("mmp_ad_impression", {
|
|
555
560
|
ad_network: (s = (o = this.currentProvider) == null ? void 0 : o.name) != null ? s : "",
|
|
556
561
|
ad_format: "rewarded",
|
|
557
562
|
module: "game",
|
|
@@ -572,7 +577,10 @@ class En {
|
|
|
572
577
|
wrapBeforeAd(e) {
|
|
573
578
|
return () => {
|
|
574
579
|
var i, n, r, o;
|
|
575
|
-
if (this.adsHasResponse = !0, this.context.track("CallBeforeAd", this.paramsToTrack),
|
|
580
|
+
if (this.adsHasResponse = !0, this.context.track("CallBeforeAd", this.paramsToTrack), window.postMessage({
|
|
581
|
+
type: "JOLIBOX_AD_CALL_BEFORE_AD",
|
|
582
|
+
data: this.paramsToTrack
|
|
583
|
+
}, "*"), !this.isBeforeAdCalled) {
|
|
576
584
|
this.isBeforeAdCalled = !0;
|
|
577
585
|
const s = ae(e);
|
|
578
586
|
s == null || s(), ((i = this.currentClientParams) == null ? void 0 : i.type) !== "reward" && ((n = this.adIsShowingCallback) == null || n.call(this, !0), at() && this.context.track("mmp_ad_impression", {
|
|
@@ -609,7 +617,10 @@ class En {
|
|
|
609
617
|
}
|
|
610
618
|
wrapAfterAd(e) {
|
|
611
619
|
return () => {
|
|
612
|
-
if (this.adsHasResponse = !0, this.context.track("CallAfterAd", this.paramsToTrack),
|
|
620
|
+
if (this.adsHasResponse = !0, this.context.track("CallAfterAd", this.paramsToTrack), window.postMessage({
|
|
621
|
+
type: "JOLIBOX_AD_CALL_AFTER_AD",
|
|
622
|
+
data: this.paramsToTrack
|
|
623
|
+
}, "*"), !this.isAfterAdCalled) {
|
|
613
624
|
this.isAfterAdCalled = !0;
|
|
614
625
|
const i = ae(e);
|
|
615
626
|
i == null || i();
|
|
@@ -618,24 +629,33 @@ class En {
|
|
|
618
629
|
}
|
|
619
630
|
wrapAdBreakDone(e) {
|
|
620
631
|
return (i) => {
|
|
621
|
-
var n, r, o, s, a, d;
|
|
632
|
+
var n, r, o, s, a, d, l, u, h;
|
|
622
633
|
switch (this.adsHasResponse = !0, this.context.track("CallAdBreakDone", {
|
|
623
634
|
provider: (r = (n = this.currentProvider) == null ? void 0 : n.name) != null ? r : null,
|
|
624
635
|
breakType: i.breakType,
|
|
625
636
|
breakName: (o = i.breakName) != null ? o : "",
|
|
626
637
|
breakFormat: i.breakFormat,
|
|
627
638
|
breakStatus: i.breakStatus
|
|
628
|
-
}),
|
|
639
|
+
}), window.postMessage({
|
|
640
|
+
type: "JOLIBOX_AD_CALL_AD_BREAK_DONE",
|
|
641
|
+
data: {
|
|
642
|
+
provider: (a = (s = this.currentProvider) == null ? void 0 : s.name) != null ? a : null,
|
|
643
|
+
breakType: i.breakType,
|
|
644
|
+
breakName: (d = i.breakName) != null ? d : "",
|
|
645
|
+
breakFormat: i.breakFormat,
|
|
646
|
+
breakStatus: i.breakStatus
|
|
647
|
+
}
|
|
648
|
+
}, "*"), i.breakStatus) {
|
|
629
649
|
case "viewed":
|
|
630
650
|
case "ignored":
|
|
631
651
|
case "dismissed":
|
|
632
652
|
case "error": {
|
|
633
|
-
const
|
|
634
|
-
|
|
653
|
+
const c = ae(e);
|
|
654
|
+
c == null || c(i), (l = this.adIsShowingCallback) == null || l.call(this, !1), (u = this.continueCallback) == null || u.call(this, [!1, i]);
|
|
635
655
|
break;
|
|
636
656
|
}
|
|
637
657
|
default: {
|
|
638
|
-
(
|
|
658
|
+
(h = this.continueCallback) == null || h.call(this, [!0, i]);
|
|
639
659
|
break;
|
|
640
660
|
}
|
|
641
661
|
}
|
|
@@ -694,7 +714,10 @@ class En {
|
|
|
694
714
|
breakFormat: i.type === "reward" ? "reward" : "interstitial",
|
|
695
715
|
breakStatus: "timeout"
|
|
696
716
|
}]), (h = this.adIsShowingCallback) == null || h.call(this, !1));
|
|
697
|
-
}, 5e3), this.context.track("CallAdBreak", this.paramsToTrack),
|
|
717
|
+
}, 5e3), this.context.track("CallAdBreak", this.paramsToTrack), window.postMessage({
|
|
718
|
+
type: "JOLIBOX_AD_CALL_AD_BREAK",
|
|
719
|
+
data: this.paramsToTrack
|
|
720
|
+
}, "*"), e.adBreak(s, n), window.JoliTesterBridge && console.log("joli-fullscreen-ad-show");
|
|
698
721
|
});
|
|
699
722
|
}
|
|
700
723
|
}
|
|
@@ -702,10 +725,10 @@ function Pe(t, e, i) {
|
|
|
702
725
|
return (e = kn(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
703
726
|
}
|
|
704
727
|
function kn(t) {
|
|
705
|
-
var e =
|
|
728
|
+
var e = Rn(t, "string");
|
|
706
729
|
return typeof e == "symbol" ? e : e + "";
|
|
707
730
|
}
|
|
708
|
-
function
|
|
731
|
+
function Rn(t, e) {
|
|
709
732
|
if (typeof t != "object" || !t)
|
|
710
733
|
return t;
|
|
711
734
|
var i = t[Symbol.toPrimitive];
|
|
@@ -717,7 +740,7 @@ function In(t, e) {
|
|
|
717
740
|
}
|
|
718
741
|
return (e === "string" ? String : Number)(t);
|
|
719
742
|
}
|
|
720
|
-
class
|
|
743
|
+
class In {
|
|
721
744
|
constructor(e) {
|
|
722
745
|
Pe(this, "context", void 0), Pe(this, "adBreakIsShowing", !1), Pe(this, "reportPageJumpOut", () => {
|
|
723
746
|
this.context.track("AdBreakJumpOut", {
|
|
@@ -809,7 +832,7 @@ class Ln {
|
|
|
809
832
|
}), Q(this, "adConfig", (n) => {
|
|
810
833
|
const s = n, {
|
|
811
834
|
onReady: r
|
|
812
|
-
} = s, o =
|
|
835
|
+
} = s, o = It(s, [
|
|
813
836
|
"onReady"
|
|
814
837
|
]);
|
|
815
838
|
this.context.track("CallAdConfig", o), this.configured ? console.warn("Ad config already set, skipping") : (this.configured = !0, this.push(n));
|
|
@@ -851,9 +874,9 @@ class Ln {
|
|
|
851
874
|
l.appendChild(c), new MutationObserver((b) => {
|
|
852
875
|
b.forEach((T) => {
|
|
853
876
|
if (T.type === "attributes" && T.attributeName === "data-ad-status") {
|
|
854
|
-
const
|
|
877
|
+
const I = c.getAttribute("data-ad-status");
|
|
855
878
|
this.context.track("AdSenseUnitStatusChanged", {
|
|
856
|
-
status:
|
|
879
|
+
status: I != null ? I : "null"
|
|
857
880
|
});
|
|
858
881
|
}
|
|
859
882
|
});
|
|
@@ -916,7 +939,7 @@ var Mn = /* @__PURE__ */ function() {
|
|
|
916
939
|
return (r = n.parentNode) == null ? void 0 : r.removeChild(n);
|
|
917
940
|
}), this.tags = [], this.ctr = 0;
|
|
918
941
|
}, t;
|
|
919
|
-
}(),
|
|
942
|
+
}(), B = "-ms-", Ke = "-moz-", m = "-webkit-", si = "comm", bt = "rule", At = "decl", $n = "@import", ai = "@keyframes", Bn = "@layer", Fn = Math.abs, Ye = String.fromCharCode, jn = Object.assign;
|
|
920
943
|
function Un(t, e) {
|
|
921
944
|
return N(t, 0) ^ 45 ? (((e << 2 ^ N(t, 0)) << 2 ^ N(t, 1)) << 2 ^ N(t, 2)) << 2 ^ N(t, 3) : 0;
|
|
922
945
|
}
|
|
@@ -935,7 +958,7 @@ function ht(t, e) {
|
|
|
935
958
|
function N(t, e) {
|
|
936
959
|
return t.charCodeAt(e) | 0;
|
|
937
960
|
}
|
|
938
|
-
function
|
|
961
|
+
function Re(t, e, i) {
|
|
939
962
|
return t.slice(e, i);
|
|
940
963
|
}
|
|
941
964
|
function Y(t) {
|
|
@@ -955,7 +978,7 @@ function Qe(t, e, i, n, r, o, s) {
|
|
|
955
978
|
return { value: t, root: e, parent: i, type: n, props: r, children: o, line: Xe, column: ge, length: s, return: "" };
|
|
956
979
|
}
|
|
957
980
|
function me(t, e) {
|
|
958
|
-
return
|
|
981
|
+
return jn(Qe("", null, null, "", null, null, 0), t, { length: -t.length }, e);
|
|
959
982
|
}
|
|
960
983
|
function qn() {
|
|
961
984
|
return C;
|
|
@@ -969,13 +992,13 @@ function K() {
|
|
|
969
992
|
function X() {
|
|
970
993
|
return N(ye, G);
|
|
971
994
|
}
|
|
972
|
-
function
|
|
995
|
+
function Fe() {
|
|
973
996
|
return G;
|
|
974
997
|
}
|
|
975
998
|
function xe(t, e) {
|
|
976
|
-
return
|
|
999
|
+
return Re(ye, t, e);
|
|
977
1000
|
}
|
|
978
|
-
function
|
|
1001
|
+
function Ie(t) {
|
|
979
1002
|
switch (t) {
|
|
980
1003
|
case 0:
|
|
981
1004
|
case 9:
|
|
@@ -1013,18 +1036,18 @@ function ui(t) {
|
|
|
1013
1036
|
function ci(t) {
|
|
1014
1037
|
return ye = "", t;
|
|
1015
1038
|
}
|
|
1016
|
-
function
|
|
1039
|
+
function je(t) {
|
|
1017
1040
|
return di(xe(G - 1, ft(t === 91 ? t + 2 : t === 40 ? t + 1 : t)));
|
|
1018
1041
|
}
|
|
1019
1042
|
function zn(t) {
|
|
1020
1043
|
for (; (C = X()) && C < 33; )
|
|
1021
1044
|
K();
|
|
1022
|
-
return
|
|
1045
|
+
return Ie(t) > 2 || Ie(C) > 3 ? "" : " ";
|
|
1023
1046
|
}
|
|
1024
1047
|
function Hn(t, e) {
|
|
1025
1048
|
for (; --e && K() && !(C < 48 || C > 102 || C > 57 && C < 65 || C > 70 && C < 97); )
|
|
1026
1049
|
;
|
|
1027
|
-
return xe(t,
|
|
1050
|
+
return xe(t, Fe() + (e < 6 && X() == 32 && K() == 32));
|
|
1028
1051
|
}
|
|
1029
1052
|
function ft(t) {
|
|
1030
1053
|
for (; K(); )
|
|
@@ -1051,7 +1074,7 @@ function Wn(t, e) {
|
|
|
1051
1074
|
return "/*" + xe(e, G - 1) + "*" + Ye(t === 47 ? t : K());
|
|
1052
1075
|
}
|
|
1053
1076
|
function Jn(t) {
|
|
1054
|
-
for (; !
|
|
1077
|
+
for (; !Ie(X()); )
|
|
1055
1078
|
K();
|
|
1056
1079
|
return xe(t, G);
|
|
1057
1080
|
}
|
|
@@ -1059,17 +1082,17 @@ function Yn(t) {
|
|
|
1059
1082
|
return ci(Ue("", null, null, null, [""], t = ui(t), 0, [0], t));
|
|
1060
1083
|
}
|
|
1061
1084
|
function Ue(t, e, i, n, r, o, s, a, d) {
|
|
1062
|
-
for (var l = 0, u = 0, h = s, c = 0, f = 0, w = 0, g = 1, p = 1, y = 1, v = 0, b = "", T = r,
|
|
1085
|
+
for (var l = 0, u = 0, h = s, c = 0, f = 0, w = 0, g = 1, p = 1, y = 1, v = 0, b = "", T = r, I = o, O = n, A = b; p; )
|
|
1063
1086
|
switch (w = v, v = K()) {
|
|
1064
1087
|
case 40:
|
|
1065
1088
|
if (w != 108 && N(A, h - 1) == 58) {
|
|
1066
|
-
ht(A += S(
|
|
1089
|
+
ht(A += S(je(v), "&", "&\f"), "&\f") != -1 && (y = -1);
|
|
1067
1090
|
break;
|
|
1068
1091
|
}
|
|
1069
1092
|
case 34:
|
|
1070
1093
|
case 39:
|
|
1071
1094
|
case 91:
|
|
1072
|
-
A +=
|
|
1095
|
+
A += je(v);
|
|
1073
1096
|
break;
|
|
1074
1097
|
case 9:
|
|
1075
1098
|
case 10:
|
|
@@ -1078,13 +1101,13 @@ function Ue(t, e, i, n, r, o, s, a, d) {
|
|
|
1078
1101
|
A += zn(w);
|
|
1079
1102
|
break;
|
|
1080
1103
|
case 92:
|
|
1081
|
-
A += Hn(
|
|
1104
|
+
A += Hn(Fe() - 1, 7);
|
|
1082
1105
|
continue;
|
|
1083
1106
|
case 47:
|
|
1084
1107
|
switch (X()) {
|
|
1085
1108
|
case 42:
|
|
1086
1109
|
case 47:
|
|
1087
|
-
Me(Xn(Wn(K(),
|
|
1110
|
+
Me(Xn(Wn(K(), Fe()), e, i), d);
|
|
1088
1111
|
break;
|
|
1089
1112
|
default:
|
|
1090
1113
|
A += "/";
|
|
@@ -1105,19 +1128,19 @@ function Ue(t, e, i, n, r, o, s, a, d) {
|
|
|
1105
1128
|
case 59:
|
|
1106
1129
|
A += ";";
|
|
1107
1130
|
default:
|
|
1108
|
-
if (Me(O = Nt(A, e, i, l, u, r, a, b, T = [],
|
|
1131
|
+
if (Me(O = Nt(A, e, i, l, u, r, a, b, T = [], I = [], h), o), v === 123)
|
|
1109
1132
|
if (u === 0)
|
|
1110
|
-
Ue(A, e, O, O, T, o, h, a,
|
|
1133
|
+
Ue(A, e, O, O, T, o, h, a, I);
|
|
1111
1134
|
else
|
|
1112
1135
|
switch (c === 99 && N(A, 3) === 110 ? 100 : c) {
|
|
1113
1136
|
case 100:
|
|
1114
1137
|
case 108:
|
|
1115
1138
|
case 109:
|
|
1116
1139
|
case 115:
|
|
1117
|
-
Ue(t, O, O, n && Me(Nt(t, O, O, 0, 0, r, a, b, r, T = [], h),
|
|
1140
|
+
Ue(t, O, O, n && Me(Nt(t, O, O, 0, 0, r, a, b, r, T = [], h), I), r, I, h, a, n ? T : I);
|
|
1118
1141
|
break;
|
|
1119
1142
|
default:
|
|
1120
|
-
Ue(A, O, O, O, [""],
|
|
1143
|
+
Ue(A, O, O, O, [""], I, 0, a, I);
|
|
1121
1144
|
}
|
|
1122
1145
|
}
|
|
1123
1146
|
l = u = f = 0, g = y = 1, b = A = "", h = s;
|
|
@@ -1139,7 +1162,7 @@ function Ue(t, e, i, n, r, o, s, a, d) {
|
|
|
1139
1162
|
a[l++] = (Y(A) - 1) * y, y = 1;
|
|
1140
1163
|
break;
|
|
1141
1164
|
case 64:
|
|
1142
|
-
X() === 45 && (A +=
|
|
1165
|
+
X() === 45 && (A += je(K())), c = X(), u = h = Y(b = A += Jn(Fe())), v++;
|
|
1143
1166
|
break;
|
|
1144
1167
|
case 45:
|
|
1145
1168
|
w === 45 && Y(A) == 2 && (g = 0);
|
|
@@ -1149,15 +1172,15 @@ function Ue(t, e, i, n, r, o, s, a, d) {
|
|
|
1149
1172
|
}
|
|
1150
1173
|
function Nt(t, e, i, n, r, o, s, a, d, l, u) {
|
|
1151
1174
|
for (var h = r - 1, c = r === 0 ? o : [""], f = _t(c), w = 0, g = 0, p = 0; w < n; ++w)
|
|
1152
|
-
for (var y = 0, v =
|
|
1175
|
+
for (var y = 0, v = Re(t, h + 1, h = Fn(g = s[w])), b = t; y < f; ++y)
|
|
1153
1176
|
(b = di(g > 0 ? c[y] + " " + v : S(v, /&\f/g, c[y]))) && (d[p++] = b);
|
|
1154
1177
|
return Qe(t, e, i, r === 0 ? bt : a, d, l, u);
|
|
1155
1178
|
}
|
|
1156
1179
|
function Xn(t, e, i) {
|
|
1157
|
-
return Qe(t, e, i, si, Ye(qn()),
|
|
1180
|
+
return Qe(t, e, i, si, Ye(qn()), Re(t, 2, -2), 0);
|
|
1158
1181
|
}
|
|
1159
1182
|
function Mt(t, e, i, n) {
|
|
1160
|
-
return Qe(t, e, i, At,
|
|
1183
|
+
return Qe(t, e, i, At, Re(t, 0, n), Re(t, n + 1, -1), n);
|
|
1161
1184
|
}
|
|
1162
1185
|
function fe(t, e) {
|
|
1163
1186
|
for (var i = "", n = _t(t), r = 0; r < n; r++)
|
|
@@ -1166,7 +1189,7 @@ function fe(t, e) {
|
|
|
1166
1189
|
}
|
|
1167
1190
|
function Qn(t, e, i, n) {
|
|
1168
1191
|
switch (t.type) {
|
|
1169
|
-
case
|
|
1192
|
+
case Bn:
|
|
1170
1193
|
if (t.children.length)
|
|
1171
1194
|
break;
|
|
1172
1195
|
case $n:
|
|
@@ -1201,18 +1224,18 @@ function tr(t) {
|
|
|
1201
1224
|
};
|
|
1202
1225
|
}
|
|
1203
1226
|
var ir = function(e, i, n) {
|
|
1204
|
-
for (var r = 0, o = 0; r = o, o = X(), r === 38 && o === 12 && (i[n] = 1), !
|
|
1227
|
+
for (var r = 0, o = 0; r = o, o = X(), r === 38 && o === 12 && (i[n] = 1), !Ie(o); )
|
|
1205
1228
|
K();
|
|
1206
1229
|
return xe(e, G);
|
|
1207
1230
|
}, nr = function(e, i) {
|
|
1208
1231
|
var n = -1, r = 44;
|
|
1209
1232
|
do
|
|
1210
|
-
switch (
|
|
1233
|
+
switch (Ie(r)) {
|
|
1211
1234
|
case 0:
|
|
1212
1235
|
r === 38 && X() === 12 && (i[n] = 1), e[n] += ir(G - 1, i, n);
|
|
1213
1236
|
break;
|
|
1214
1237
|
case 2:
|
|
1215
|
-
e[n] +=
|
|
1238
|
+
e[n] += je(r);
|
|
1216
1239
|
break;
|
|
1217
1240
|
case 4:
|
|
1218
1241
|
if (r === 44) {
|
|
@@ -1283,24 +1306,24 @@ function hi(t, e) {
|
|
|
1283
1306
|
case 4810:
|
|
1284
1307
|
case 6968:
|
|
1285
1308
|
case 2756:
|
|
1286
|
-
return m + t + Ke + t +
|
|
1309
|
+
return m + t + Ke + t + B + t + t;
|
|
1287
1310
|
case 6828:
|
|
1288
1311
|
case 4268:
|
|
1289
|
-
return m + t +
|
|
1312
|
+
return m + t + B + t + t;
|
|
1290
1313
|
case 6165:
|
|
1291
|
-
return m + t +
|
|
1314
|
+
return m + t + B + "flex-" + t + t;
|
|
1292
1315
|
case 5187:
|
|
1293
|
-
return m + t + S(t, /(\w+).+(:[^]+)/, m + "box-$1$2" +
|
|
1316
|
+
return m + t + S(t, /(\w+).+(:[^]+)/, m + "box-$1$2" + B + "flex-$1$2") + t;
|
|
1294
1317
|
case 5443:
|
|
1295
|
-
return m + t +
|
|
1318
|
+
return m + t + B + "flex-item-" + S(t, /flex-|-self/, "") + t;
|
|
1296
1319
|
case 4675:
|
|
1297
|
-
return m + t +
|
|
1320
|
+
return m + t + B + "flex-line-pack" + S(t, /align-content|flex-|-self/, "") + t;
|
|
1298
1321
|
case 5548:
|
|
1299
|
-
return m + t +
|
|
1322
|
+
return m + t + B + S(t, "shrink", "negative") + t;
|
|
1300
1323
|
case 5292:
|
|
1301
|
-
return m + t +
|
|
1324
|
+
return m + t + B + S(t, "basis", "preferred-size") + t;
|
|
1302
1325
|
case 6060:
|
|
1303
|
-
return m + "box-" + S(t, "-grow", "") + m + t +
|
|
1326
|
+
return m + "box-" + S(t, "-grow", "") + m + t + B + S(t, "grow", "positive") + t;
|
|
1304
1327
|
case 4554:
|
|
1305
1328
|
return m + S(t, /([^-])(transform)/g, "$1" + m + "$2") + t;
|
|
1306
1329
|
case 6187:
|
|
@@ -1309,7 +1332,7 @@ function hi(t, e) {
|
|
|
1309
1332
|
case 3959:
|
|
1310
1333
|
return S(t, /(image-set\([^]*)/, m + "$1$`$1");
|
|
1311
1334
|
case 4968:
|
|
1312
|
-
return S(S(t, /(.+:)(flex-)?(.*)/, m + "box-pack:$3" +
|
|
1335
|
+
return S(S(t, /(.+:)(flex-)?(.*)/, m + "box-pack:$3" + B + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + m + t + t;
|
|
1313
1336
|
case 4095:
|
|
1314
1337
|
case 3583:
|
|
1315
1338
|
case 4068:
|
|
@@ -1346,19 +1369,19 @@ function hi(t, e) {
|
|
|
1346
1369
|
case 107:
|
|
1347
1370
|
return S(t, ":", ":" + m) + t;
|
|
1348
1371
|
case 101:
|
|
1349
|
-
return S(t, /(.+:)([^;!]+)(;|!.+)?/, "$1" + m + (N(t, 14) === 45 ? "inline-" : "") + "box$3$1" + m + "$2$3$1" +
|
|
1372
|
+
return S(t, /(.+:)([^;!]+)(;|!.+)?/, "$1" + m + (N(t, 14) === 45 ? "inline-" : "") + "box$3$1" + m + "$2$3$1" + B + "$2box$3") + t;
|
|
1350
1373
|
}
|
|
1351
1374
|
break;
|
|
1352
1375
|
case 5936:
|
|
1353
1376
|
switch (N(t, e + 11)) {
|
|
1354
1377
|
case 114:
|
|
1355
|
-
return m + t +
|
|
1378
|
+
return m + t + B + S(t, /[svh]\w+-[tblr]{2}/, "tb") + t;
|
|
1356
1379
|
case 108:
|
|
1357
|
-
return m + t +
|
|
1380
|
+
return m + t + B + S(t, /[svh]\w+-[tblr]{2}/, "tb-rl") + t;
|
|
1358
1381
|
case 45:
|
|
1359
|
-
return m + t +
|
|
1382
|
+
return m + t + B + S(t, /[svh]\w+-[tblr]{2}/, "lr") + t;
|
|
1360
1383
|
}
|
|
1361
|
-
return m + t +
|
|
1384
|
+
return m + t + B + t + t;
|
|
1362
1385
|
}
|
|
1363
1386
|
return t;
|
|
1364
1387
|
}
|
|
@@ -1387,7 +1410,7 @@ var ar = function(e, i, n, r) {
|
|
|
1387
1410
|
}), me(e, {
|
|
1388
1411
|
props: [S(o, /:(plac\w+)/, ":" + Ke + "$1")]
|
|
1389
1412
|
}), me(e, {
|
|
1390
|
-
props: [S(o, /:(plac\w+)/,
|
|
1413
|
+
props: [S(o, /:(plac\w+)/, B + "input-$1")]
|
|
1391
1414
|
})], r);
|
|
1392
1415
|
}
|
|
1393
1416
|
return "";
|
|
@@ -1511,11 +1534,11 @@ var cr = {
|
|
|
1511
1534
|
strokeWidth: 1
|
|
1512
1535
|
}, hr = /[A-Z]|^ms/g, fr = /_EMO_([^_]+?)_([^]*?)_EMO_/g, fi = function(e) {
|
|
1513
1536
|
return e.charCodeAt(1) === 45;
|
|
1514
|
-
},
|
|
1537
|
+
}, Bt = function(e) {
|
|
1515
1538
|
return e != null && typeof e != "boolean";
|
|
1516
1539
|
}, tt = /* @__PURE__ */ tr(function(t) {
|
|
1517
1540
|
return fi(t) ? t : t.replace(hr, "-$&").toLowerCase();
|
|
1518
|
-
}),
|
|
1541
|
+
}), Ft = function(e, i) {
|
|
1519
1542
|
switch (e) {
|
|
1520
1543
|
case "animation":
|
|
1521
1544
|
case "animationName":
|
|
@@ -1579,10 +1602,10 @@ function vr(t, e, i) {
|
|
|
1579
1602
|
var s = i[o];
|
|
1580
1603
|
if (typeof s != "object") {
|
|
1581
1604
|
var a = s;
|
|
1582
|
-
e != null && e[a] !== void 0 ? n += o + "{" + e[a] + "}" :
|
|
1605
|
+
e != null && e[a] !== void 0 ? n += o + "{" + e[a] + "}" : Bt(a) && (n += tt(o) + ":" + Ft(o, a) + ";");
|
|
1583
1606
|
} else if (Array.isArray(s) && typeof s[0] == "string" && (e == null || e[s[0]] === void 0))
|
|
1584
1607
|
for (var d = 0; d < s.length; d++)
|
|
1585
|
-
|
|
1608
|
+
Bt(s[d]) && (n += tt(o) + ":" + Ft(o, s[d]) + ";");
|
|
1586
1609
|
else {
|
|
1587
1610
|
var l = ze(t, e, s);
|
|
1588
1611
|
switch (o) {
|
|
@@ -1598,7 +1621,7 @@ function vr(t, e, i) {
|
|
|
1598
1621
|
}
|
|
1599
1622
|
return n;
|
|
1600
1623
|
}
|
|
1601
|
-
var
|
|
1624
|
+
var jt = /label:\s*([^\s;{]+)\s*(;|$)/g, ne;
|
|
1602
1625
|
function it(t, e, i) {
|
|
1603
1626
|
if (t.length === 1 && typeof t[0] == "object" && t[0] !== null && t[0].styles !== void 0)
|
|
1604
1627
|
return t[0];
|
|
@@ -1616,8 +1639,8 @@ function it(t, e, i) {
|
|
|
1616
1639
|
var d = o;
|
|
1617
1640
|
r += d[a];
|
|
1618
1641
|
}
|
|
1619
|
-
|
|
1620
|
-
for (var l = "", u; (u =
|
|
1642
|
+
jt.lastIndex = 0;
|
|
1643
|
+
for (var l = "", u; (u = jt.exec(r)) !== null; )
|
|
1621
1644
|
l += "-" + u[1];
|
|
1622
1645
|
var h = ur(r) + l;
|
|
1623
1646
|
return {
|
|
@@ -2076,9 +2099,9 @@ function Ei(t) {
|
|
|
2076
2099
|
var f = n.value.value;
|
|
2077
2100
|
return f === 0 ? 0 : f === !0 ? "" : f || "";
|
|
2078
2101
|
}), u = Ee(function() {
|
|
2079
|
-
return !Array.isArray(l.value) && !
|
|
2102
|
+
return !Array.isArray(l.value) && !Fi(l.value);
|
|
2080
2103
|
}), h = Te(function() {
|
|
2081
|
-
if (this.N =
|
|
2104
|
+
if (this.N = Ri, u.value) {
|
|
2082
2105
|
var f = l.value;
|
|
2083
2106
|
a.__v && a.__v.__e && a.__v.__e.nodeType === 3 && (a.__v.__e.data = f);
|
|
2084
2107
|
}
|
|
@@ -2135,18 +2158,18 @@ be("diffed", function(t, e) {
|
|
|
2135
2158
|
o = {}, i.U = o;
|
|
2136
2159
|
for (var d in n) {
|
|
2137
2160
|
var l = o[d], u = n[d];
|
|
2138
|
-
l === void 0 ? (l =
|
|
2161
|
+
l === void 0 ? (l = Rr(i, d, u, r), o[d] = l) : l.o(u, r);
|
|
2139
2162
|
}
|
|
2140
2163
|
}
|
|
2141
2164
|
}
|
|
2142
2165
|
t(e);
|
|
2143
2166
|
});
|
|
2144
|
-
function
|
|
2167
|
+
function Rr(t, e, i, n) {
|
|
2145
2168
|
var r = e in t && t.ownerSVGElement === void 0, o = E(i);
|
|
2146
2169
|
return { o: function(s, a) {
|
|
2147
2170
|
o.value = s, n = a;
|
|
2148
2171
|
}, d: Te(function() {
|
|
2149
|
-
this.N =
|
|
2172
|
+
this.N = Ri;
|
|
2150
2173
|
var s = o.value.value;
|
|
2151
2174
|
n[e] !== s && (n[e] = s, r ? t[e] = s : s ? t.setAttribute(e, s) : t.removeAttribute(e));
|
|
2152
2175
|
}) };
|
|
@@ -2176,7 +2199,7 @@ be("unmount", function(t, e) {
|
|
|
2176
2199
|
be("__h", function(t, e, i, n) {
|
|
2177
2200
|
(n < 3 || n === 9) && (e.__$f |= 2), t(e, i, n);
|
|
2178
2201
|
});
|
|
2179
|
-
|
|
2202
|
+
Bi.prototype.shouldComponentUpdate = function(t, e) {
|
|
2180
2203
|
var i = this.__$u, n = i && i.s !== void 0;
|
|
2181
2204
|
for (var r in e)
|
|
2182
2205
|
return !0;
|
|
@@ -2199,7 +2222,7 @@ function ki(t) {
|
|
|
2199
2222
|
return E(t);
|
|
2200
2223
|
}, []);
|
|
2201
2224
|
}
|
|
2202
|
-
var
|
|
2225
|
+
var Ir = function(t) {
|
|
2203
2226
|
queueMicrotask(function() {
|
|
2204
2227
|
queueMicrotask(t);
|
|
2205
2228
|
});
|
|
@@ -2210,10 +2233,10 @@ function xr() {
|
|
|
2210
2233
|
mi.call(t);
|
|
2211
2234
|
});
|
|
2212
2235
|
}
|
|
2213
|
-
function
|
|
2214
|
-
Si.push(this) === 1 && (ve.requestAnimationFrame ||
|
|
2236
|
+
function Ri() {
|
|
2237
|
+
Si.push(this) === 1 && (ve.requestAnimationFrame || Ir)(xr);
|
|
2215
2238
|
}
|
|
2216
|
-
const
|
|
2239
|
+
const F = we`
|
|
2217
2240
|
inset: 0;
|
|
2218
2241
|
clear: none;
|
|
2219
2242
|
float: none;
|
|
@@ -2233,7 +2256,7 @@ const B = we`
|
|
|
2233
2256
|
'Helvetica Neue', sans-serif;
|
|
2234
2257
|
`;
|
|
2235
2258
|
function Or(t, e) {
|
|
2236
|
-
const i =
|
|
2259
|
+
const i = ji(t);
|
|
2237
2260
|
Ui(() => {
|
|
2238
2261
|
i.current = t;
|
|
2239
2262
|
}, [t]), Je(() => {
|
|
@@ -2261,7 +2284,7 @@ function _(t, e, i, n, r, o) {
|
|
|
2261
2284
|
return ve.vnode && ve.vnode(l), l;
|
|
2262
2285
|
}
|
|
2263
2286
|
const Cr = we`
|
|
2264
|
-
${
|
|
2287
|
+
${F}
|
|
2265
2288
|
position: fixed;
|
|
2266
2289
|
top: 0;
|
|
2267
2290
|
left: 0;
|
|
@@ -2274,7 +2297,7 @@ const Cr = we`
|
|
|
2274
2297
|
height: 100vh;
|
|
2275
2298
|
|
|
2276
2299
|
.card-wrapper {
|
|
2277
|
-
${
|
|
2300
|
+
${F}
|
|
2278
2301
|
position: relative;
|
|
2279
2302
|
display: flex;
|
|
2280
2303
|
flex-direction: column;
|
|
@@ -2288,7 +2311,7 @@ const Cr = we`
|
|
|
2288
2311
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
2289
2312
|
|
|
2290
2313
|
.body {
|
|
2291
|
-
${
|
|
2314
|
+
${F}
|
|
2292
2315
|
display: flex;
|
|
2293
2316
|
flex-direction: column;
|
|
2294
2317
|
width: 100%;
|
|
@@ -2297,7 +2320,7 @@ const Cr = we`
|
|
|
2297
2320
|
box-sizing: border-box;
|
|
2298
2321
|
justify-content: center;
|
|
2299
2322
|
.title {
|
|
2300
|
-
${
|
|
2323
|
+
${F}
|
|
2301
2324
|
text-align: center;
|
|
2302
2325
|
font-size: 16px;
|
|
2303
2326
|
font-weight: bold;
|
|
@@ -2305,7 +2328,7 @@ const Cr = we`
|
|
|
2305
2328
|
}
|
|
2306
2329
|
|
|
2307
2330
|
.content {
|
|
2308
|
-
${
|
|
2331
|
+
${F}
|
|
2309
2332
|
font-size: 14px;
|
|
2310
2333
|
color: #888;
|
|
2311
2334
|
margin-bottom: 16px;
|
|
@@ -2313,13 +2336,13 @@ const Cr = we`
|
|
|
2313
2336
|
}
|
|
2314
2337
|
|
|
2315
2338
|
.footer {
|
|
2316
|
-
${
|
|
2339
|
+
${F}
|
|
2317
2340
|
display: flex;
|
|
2318
2341
|
align-items: center;
|
|
2319
2342
|
width: 100%;
|
|
2320
2343
|
height: 40px;
|
|
2321
2344
|
button {
|
|
2322
|
-
${
|
|
2345
|
+
${F}
|
|
2323
2346
|
border: none;
|
|
2324
2347
|
outline: none;
|
|
2325
2348
|
height: 100%;
|
|
@@ -2384,7 +2407,7 @@ const Cr = we`
|
|
|
2384
2407
|
})]
|
|
2385
2408
|
})
|
|
2386
2409
|
}) : null, Mr = we`
|
|
2387
|
-
${
|
|
2410
|
+
${F}
|
|
2388
2411
|
position: relative;
|
|
2389
2412
|
display: flex;
|
|
2390
2413
|
align-items: center;
|
|
@@ -2402,7 +2425,7 @@ const Cr = we`
|
|
|
2402
2425
|
}
|
|
2403
2426
|
|
|
2404
2427
|
button {
|
|
2405
|
-
${
|
|
2428
|
+
${F}
|
|
2406
2429
|
padding: 0 20px;
|
|
2407
2430
|
height: 30px;
|
|
2408
2431
|
line-height: 30px;
|
|
@@ -2427,7 +2450,7 @@ const Cr = we`
|
|
|
2427
2450
|
});
|
|
2428
2451
|
}
|
|
2429
2452
|
};
|
|
2430
|
-
},
|
|
2453
|
+
}, Br = (t) => {
|
|
2431
2454
|
let {
|
|
2432
2455
|
countdown: e = 0,
|
|
2433
2456
|
mode: i,
|
|
@@ -2492,7 +2515,7 @@ const Cr = we`
|
|
|
2492
2515
|
})
|
|
2493
2516
|
})]
|
|
2494
2517
|
});
|
|
2495
|
-
},
|
|
2518
|
+
}, Ii = () => {
|
|
2496
2519
|
const t = E(), e = E(), i = E(), n = E(), r = E(), o = E(!1), s = E(15), a = E(""), d = E("reward");
|
|
2497
2520
|
return {
|
|
2498
2521
|
afterAd: t,
|
|
@@ -2505,8 +2528,8 @@ const Cr = we`
|
|
|
2505
2528
|
src: a,
|
|
2506
2529
|
mode: d
|
|
2507
2530
|
};
|
|
2508
|
-
},
|
|
2509
|
-
${
|
|
2531
|
+
}, Fr = we`
|
|
2532
|
+
${F}
|
|
2510
2533
|
position: fixed;
|
|
2511
2534
|
z-index: 2147483647;
|
|
2512
2535
|
background: white;
|
|
@@ -2516,7 +2539,7 @@ const Cr = we`
|
|
|
2516
2539
|
flex-direction: column;
|
|
2517
2540
|
|
|
2518
2541
|
iframe {
|
|
2519
|
-
${
|
|
2542
|
+
${F}
|
|
2520
2543
|
flex: 1;
|
|
2521
2544
|
position: relative;
|
|
2522
2545
|
display: block;
|
|
@@ -2550,8 +2573,8 @@ const Cr = we`
|
|
|
2550
2573
|
h.startTimer();
|
|
2551
2574
|
}, 100);
|
|
2552
2575
|
}, [c, u.value]), a.value ? _("div", {
|
|
2553
|
-
className:
|
|
2554
|
-
children: [_(
|
|
2576
|
+
className: Fr,
|
|
2577
|
+
children: [_(Br, {
|
|
2555
2578
|
mode: u.value,
|
|
2556
2579
|
onClose: w,
|
|
2557
2580
|
countdown: d.value,
|
|
@@ -2564,9 +2587,9 @@ const Cr = we`
|
|
|
2564
2587
|
}) : null;
|
|
2565
2588
|
};
|
|
2566
2589
|
function Z(t, e, i) {
|
|
2567
|
-
return (e =
|
|
2590
|
+
return (e = jr(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
2568
2591
|
}
|
|
2569
|
-
function
|
|
2592
|
+
function jr(t) {
|
|
2570
2593
|
var e = Ur(t, "string");
|
|
2571
2594
|
return typeof e == "symbol" ? e : e + "";
|
|
2572
2595
|
}
|
|
@@ -2584,7 +2607,7 @@ function Ur(t, e) {
|
|
|
2584
2607
|
}
|
|
2585
2608
|
class Vr {
|
|
2586
2609
|
constructor(e, i) {
|
|
2587
|
-
Z(this, "name", "OKSPIN"), Z(this, "initialized", !1), Z(this, "initCompleter", null), Z(this, "context", void 0), Z(this, "initParams", void 0), Z(this, "adsOverlay", null), Z(this, "adsIsShowing", !1), Z(this, "lastUnDisplayedAdBreak", null), Z(this, "state",
|
|
2610
|
+
Z(this, "name", "OKSPIN"), Z(this, "initialized", !1), Z(this, "initCompleter", null), Z(this, "context", void 0), Z(this, "initParams", void 0), Z(this, "adsOverlay", null), Z(this, "adsIsShowing", !1), Z(this, "lastUnDisplayedAdBreak", null), Z(this, "state", Ii()), this.context = e, this.initParams = i;
|
|
2588
2611
|
}
|
|
2589
2612
|
async init() {
|
|
2590
2613
|
var e;
|
|
@@ -2729,7 +2752,7 @@ const de = (t, e) => {
|
|
|
2729
2752
|
src: d
|
|
2730
2753
|
};
|
|
2731
2754
|
}, Gr = we`
|
|
2732
|
-
${
|
|
2755
|
+
${F}
|
|
2733
2756
|
position: fixed;
|
|
2734
2757
|
z-index: 2147483647;
|
|
2735
2758
|
background: white;
|
|
@@ -2739,7 +2762,7 @@ const de = (t, e) => {
|
|
|
2739
2762
|
flex-direction: column;
|
|
2740
2763
|
|
|
2741
2764
|
iframe {
|
|
2742
|
-
${
|
|
2765
|
+
${F}
|
|
2743
2766
|
flex: 1;
|
|
2744
2767
|
position: relative;
|
|
2745
2768
|
display: block;
|
|
@@ -3257,7 +3280,7 @@ class no {
|
|
|
3257
3280
|
return cn(r);
|
|
3258
3281
|
}
|
|
3259
3282
|
}
|
|
3260
|
-
function
|
|
3283
|
+
function j(t, e, i) {
|
|
3261
3284
|
return (e = ro(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
3262
3285
|
}
|
|
3263
3286
|
function ro(t) {
|
|
@@ -3278,7 +3301,7 @@ function oo(t, e) {
|
|
|
3278
3301
|
}
|
|
3279
3302
|
class St {
|
|
3280
3303
|
constructor(e) {
|
|
3281
|
-
|
|
3304
|
+
j(this, "context", void 0), j(this, "adsTrackSerializer", void 0), j(this, "contextInfo", void 0), this.context = e, this.contextInfo = e.getContextInfo(), this.adsTrackSerializer = new no(this.context);
|
|
3282
3305
|
}
|
|
3283
3306
|
getRequestContextData(e) {
|
|
3284
3307
|
var r, o;
|
|
@@ -3317,10 +3340,10 @@ class St {
|
|
|
3317
3340
|
class Li {
|
|
3318
3341
|
constructor(e, i) {
|
|
3319
3342
|
var n = this;
|
|
3320
|
-
|
|
3343
|
+
j(this, "context", void 0), j(this, "contextInfo", void 0), j(this, "requestContext", void 0), j(this, "pendingAFGAdsInfo", {
|
|
3321
3344
|
REWARD: Promise.resolve(null),
|
|
3322
3345
|
INTERSTITIAL: Promise.resolve(null)
|
|
3323
|
-
}),
|
|
3346
|
+
}), j(this, "pendingAFVAdsInfo", Promise.resolve(null)), j(this, "doFetchAdsInfo", async (r) => {
|
|
3324
3347
|
const o = r === "afv" ? "AdsAFVSDKRequest" : "AdsAFGSDKAdBreak", s = r === "afv" ? "REWARD_INTERSTITIAL" : r === "reward" ? "REWARD" : "INTERSTITIAL", a = r === "afv" ? void 0 : "cached", {
|
|
3325
3348
|
data: d,
|
|
3326
3349
|
code: l
|
|
@@ -3337,18 +3360,18 @@ class Li {
|
|
|
3337
3360
|
code: l,
|
|
3338
3361
|
data: d
|
|
3339
3362
|
} : null;
|
|
3340
|
-
}),
|
|
3363
|
+
}), j(this, "cacheRewardInfo", () => {
|
|
3341
3364
|
this.pendingAFGAdsInfo.REWARD = this.doFetchAdsInfo("reward").catch(() => null);
|
|
3342
|
-
}),
|
|
3365
|
+
}), j(this, "cacheInterstitialInfo", (r) => {
|
|
3343
3366
|
this.pendingAFGAdsInfo.INTERSTITIAL = this.doFetchAdsInfo(r).catch(() => null);
|
|
3344
|
-
}),
|
|
3367
|
+
}), j(this, "cacheAFVInfo", () => {
|
|
3345
3368
|
this.pendingAFVAdsInfo = this.doFetchAdsInfo("afv").catch(() => null);
|
|
3346
|
-
}),
|
|
3369
|
+
}), j(this, "cacheNextAFGAdsInfo", async (r) => {
|
|
3347
3370
|
r === "reward" ? this.cacheRewardInfo() : this.cacheInterstitialInfo(r);
|
|
3348
|
-
}),
|
|
3371
|
+
}), j(this, "getAFGAdsInfo", async (r) => {
|
|
3349
3372
|
const o = await (r === "reward" ? this.pendingAFGAdsInfo.REWARD : this.pendingAFGAdsInfo.INTERSTITIAL);
|
|
3350
3373
|
return this.cacheNextAFGAdsInfo(r), o;
|
|
3351
|
-
}),
|
|
3374
|
+
}), j(this, "getAFVAdsInfo", async function() {
|
|
3352
3375
|
if (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) {
|
|
3353
3376
|
const o = await n.pendingAFVAdsInfo;
|
|
3354
3377
|
return n.cacheAFVInfo(), o;
|
|
@@ -3379,7 +3402,7 @@ function ao(t, e) {
|
|
|
3379
3402
|
class Go {
|
|
3380
3403
|
constructor(e) {
|
|
3381
3404
|
if (z(this, "context", void 0), z(this, "contextInfo", void 0), z(this, "providers", {}), z(this, "channelPolicy", void 0), z(this, "adsActionDetection", void 0), z(this, "requestContext", void 0), z(this, "adsRequest", void 0), z(this, "initialized", !1), z(this, "adsIsShowing", !1), z(this, "lastAdBreak", void 0), z(this, "initializedTimeStamp", Date.now()), e)
|
|
3382
|
-
this.context = e, this.channelPolicy = new Tn(this.context), this.adsActionDetection = new
|
|
3405
|
+
this.context = e, this.channelPolicy = new Tn(this.context), this.adsActionDetection = new In(this.context), this.contextInfo = this.context.getContextInfo(), this.adsRequest = new Li(e), this.requestContext = new St(e);
|
|
3383
3406
|
else
|
|
3384
3407
|
throw new Error("JoliboxAdsForGame requires a configuration object");
|
|
3385
3408
|
}
|
|
@@ -3486,8 +3509,8 @@ class Go {
|
|
|
3486
3509
|
}
|
|
3487
3510
|
case "reward": {
|
|
3488
3511
|
e.beforeReward(() => {
|
|
3489
|
-
var
|
|
3490
|
-
(
|
|
3512
|
+
var I, O, A, Ce;
|
|
3513
|
+
(I = e.beforeAd) == null || I.call(e), (O = e.adViewed) == null || O.call(e), (A = e.afterAd) == null || A.call(e), (Ce = e.adBreakDone) == null || Ce.call(e, {
|
|
3491
3514
|
breakType: e.type,
|
|
3492
3515
|
breakName: e.name,
|
|
3493
3516
|
breakFormat: "reward",
|
|
@@ -3517,8 +3540,8 @@ class Go {
|
|
|
3517
3540
|
});
|
|
3518
3541
|
return;
|
|
3519
3542
|
} else {
|
|
3520
|
-
const
|
|
3521
|
-
if (
|
|
3543
|
+
const I = b.sort((De, Le) => De.seq - Le.seq);
|
|
3544
|
+
if (I.length === 0) {
|
|
3522
3545
|
(w = e.adBreakDone) == null || w.call(e, {
|
|
3523
3546
|
breakType: e.type,
|
|
3524
3547
|
breakName: e.type === "preroll" ? void 0 : e.name,
|
|
@@ -3529,8 +3552,8 @@ class Go {
|
|
|
3529
3552
|
}
|
|
3530
3553
|
let O = !0, A = null;
|
|
3531
3554
|
const Ce = new En(this.context);
|
|
3532
|
-
for (this.adsActionDetection.adBreakIsShowing = !0;
|
|
3533
|
-
const De =
|
|
3555
|
+
for (this.adsActionDetection.adBreakIsShowing = !0; I.length > 0; ) {
|
|
3556
|
+
const De = I.shift(), Le = this.providers[De.provider];
|
|
3534
3557
|
if (Le) {
|
|
3535
3558
|
const [Pi, Ni] = await Ce.callAdBreakAndContinue(Le, e, De, (Et) => {
|
|
3536
3559
|
var kt;
|
|
@@ -3665,7 +3688,7 @@ class P extends Error {
|
|
|
3665
3688
|
}
|
|
3666
3689
|
}
|
|
3667
3690
|
}
|
|
3668
|
-
function
|
|
3691
|
+
function R(t, e, i) {
|
|
3669
3692
|
return (e = vo(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
3670
3693
|
}
|
|
3671
3694
|
function vo(t) {
|
|
@@ -3686,10 +3709,10 @@ function go(t, e) {
|
|
|
3686
3709
|
}
|
|
3687
3710
|
class yo {
|
|
3688
3711
|
constructor(e, i, n) {
|
|
3689
|
-
|
|
3712
|
+
R(this, "adsLoader", void 0), R(this, "adDisplayContainer", void 0), R(this, "isAdPlaying", !1), R(this, "isContentFinished", !1), R(this, "videoContent", void 0), R(this, "adContainer", void 0), R(this, "adsManager", void 0), R(this, "intervalTimer", void 0), R(this, "completed", !1), R(this, "adTagUrl", void 0), R(this, "notifyRequestAd", void 0), R(this, "notifyLoaded", void 0), R(this, "notifyPlayingAd", void 0), R(this, "notifyCompleted", void 0), R(this, "notifyError", void 0), R(this, "destroy", () => {
|
|
3690
3713
|
var r, o, s, a, d, l, u, h, c, f, w;
|
|
3691
3714
|
this.intervalTimer && clearInterval(this.intervalTimer), (r = this.adsManager) == null || r.stop(), (o = this.adDisplayContainer) == null || o.destroy(), (s = this.adsLoader) == null || s.removeEventListener(window.google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, this.onAdsManagerLoaded), (a = this.adsLoader) == null || a.removeEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR, this.onAdError), (d = this.adsManager) == null || d.removeEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR, this.onAdError), (l = this.adsManager) == null || l.removeEventListener(window.google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, this.onContentPauseRequested), (u = this.adsManager) == null || u.removeEventListener(window.google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, this.onContentResumeRequested), (h = this.adsManager) == null || h.removeEventListener(window.google.ima.AdEvent.Type.ALL_ADS_COMPLETED, this.onAdEvent), (c = this.adsManager) == null || c.removeEventListener(window.google.ima.AdEvent.Type.LOADED, this.onAdEvent), (f = this.adsManager) == null || f.removeEventListener(window.google.ima.AdEvent.Type.STARTED, this.onAdEvent), (w = this.adsManager) == null || w.removeEventListener(window.google.ima.AdEvent.Type.COMPLETE, this.onAdEvent);
|
|
3692
|
-
}),
|
|
3715
|
+
}), R(this, "requestAds", async (r, o) => {
|
|
3693
3716
|
var u;
|
|
3694
3717
|
this.createAdDisplayContainer(), this.notifyRequestAd = r.onAdRequested, this.notifyLoaded = r.onAdLoaded, this.notifyPlayingAd = r.onAdPlaying, this.notifyCompleted = r.onAdCompleted, this.notifyError = (h) => {
|
|
3695
3718
|
var c;
|
|
@@ -3708,9 +3731,9 @@ class yo {
|
|
|
3708
3731
|
});
|
|
3709
3732
|
const l = `${this.adTagUrl}${d}`;
|
|
3710
3733
|
a.adTagUrl = l, a.linearAdSlotWidth = 640, a.linearAdSlotHeight = 400, a.nonLinearAdSlotWidth = 640, a.nonLinearAdSlotHeight = 150, this.adsLoader.requestAds(a), (u = this.notifyRequestAd) == null || u.call(this);
|
|
3711
|
-
}),
|
|
3734
|
+
}), R(this, "createAdDisplayContainer", () => {
|
|
3712
3735
|
this.adDisplayContainer = new window.google.ima.AdDisplayContainer(this.adContainer, this.videoContent);
|
|
3713
|
-
}),
|
|
3736
|
+
}), R(this, "playAds", () => {
|
|
3714
3737
|
var r, o;
|
|
3715
3738
|
this.videoContent.load(), this.adDisplayContainer.initialize(), this.completed = !1;
|
|
3716
3739
|
try {
|
|
@@ -3718,10 +3741,10 @@ class yo {
|
|
|
3718
3741
|
} catch (s) {
|
|
3719
3742
|
console.error("[JoliboxAFV] Google IMA Error: ", s), this.videoContent.play();
|
|
3720
3743
|
}
|
|
3721
|
-
}),
|
|
3744
|
+
}), R(this, "onAdsManagerLoaded", (r) => {
|
|
3722
3745
|
const o = new window.google.ima.AdsRenderingSettings();
|
|
3723
3746
|
o.restoreCustomPlaybackStateOnAdBreakComplete = !0, this.adsManager = r.getAdsManager(this.videoContent, o), this.adsManager.addEventListener(window.google.ima.AdErrorEvent.Type.AD_ERROR, this.onAdError), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED, this.onContentPauseRequested), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED, this.onContentResumeRequested), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.ALL_ADS_COMPLETED, this.onAdEvent), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.LOADED, this.onAdEvent), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.STARTED, this.onAdEvent), this.adsManager.addEventListener(window.google.ima.AdEvent.Type.COMPLETE, this.onAdEvent), r.type === "adsManagerLoaded" && this.playAds();
|
|
3724
|
-
}),
|
|
3747
|
+
}), R(this, "onAdEvent", (r) => {
|
|
3725
3748
|
var s, a, d, l;
|
|
3726
3749
|
const o = r.getAd();
|
|
3727
3750
|
switch (r.type) {
|
|
@@ -3739,12 +3762,12 @@ class yo {
|
|
|
3739
3762
|
o != null && o.isLinear() && clearInterval(this.intervalTimer), this.completed || (this.completed = !0, (l = this.notifyCompleted) == null || l.call(this, r));
|
|
3740
3763
|
break;
|
|
3741
3764
|
}
|
|
3742
|
-
}),
|
|
3765
|
+
}), R(this, "onAdError", (r) => {
|
|
3743
3766
|
var o, s;
|
|
3744
3767
|
(o = this.notifyError) == null || o.call(this, r.getError()), (s = this.adsManager) == null || s.destroy();
|
|
3745
|
-
}),
|
|
3768
|
+
}), R(this, "onContentPauseRequested", () => {
|
|
3746
3769
|
this.isAdPlaying = !0, this.videoContent.pause();
|
|
3747
|
-
}),
|
|
3770
|
+
}), R(this, "onContentResumeRequested", () => {
|
|
3748
3771
|
this.isAdPlaying = !1;
|
|
3749
3772
|
}), this.adTagUrl = e, this.videoContent = i, this.adContainer = n;
|
|
3750
3773
|
}
|
|
@@ -3760,7 +3783,7 @@ const wo = () => {
|
|
|
3760
3783
|
adContainerRef: r
|
|
3761
3784
|
};
|
|
3762
3785
|
}, po = we`
|
|
3763
|
-
${
|
|
3786
|
+
${F}
|
|
3764
3787
|
position: fixed;
|
|
3765
3788
|
left: 0;
|
|
3766
3789
|
top: 0;
|
|
@@ -3775,7 +3798,7 @@ const wo = () => {
|
|
|
3775
3798
|
}
|
|
3776
3799
|
|
|
3777
3800
|
.ads-wrapper {
|
|
3778
|
-
${
|
|
3801
|
+
${F}
|
|
3779
3802
|
position: relative;
|
|
3780
3803
|
width: 100%;
|
|
3781
3804
|
height: 100%;
|
|
@@ -3798,7 +3821,7 @@ const wo = () => {
|
|
|
3798
3821
|
}
|
|
3799
3822
|
|
|
3800
3823
|
.retry-button {
|
|
3801
|
-
${
|
|
3824
|
+
${F}
|
|
3802
3825
|
position: absolute;
|
|
3803
3826
|
width: 100%;
|
|
3804
3827
|
height: 100%;
|
|
@@ -3989,7 +4012,7 @@ function Eo(t, e) {
|
|
|
3989
4012
|
}
|
|
3990
4013
|
class ko {
|
|
3991
4014
|
constructor(e) {
|
|
3992
|
-
J(this, "name", "OKSPIN"), J(this, "initialized", !1), J(this, "initCompleter", null), J(this, "context", void 0), J(this, "adsOverlay", null), J(this, "adsIsShowing", !1), J(this, "state",
|
|
4015
|
+
J(this, "name", "OKSPIN"), J(this, "initialized", !1), J(this, "initCompleter", null), J(this, "context", void 0), J(this, "adsOverlay", null), J(this, "adsIsShowing", !1), J(this, "state", Ii()), J(this, "init", async (i) => {
|
|
3993
4016
|
var n;
|
|
3994
4017
|
this.initialized || (this.adsOverlay = document.createElement("div"), this.adsOverlay.setAttribute("data-placement-info", "afv"), oe(_(xi, {
|
|
3995
4018
|
state: this.state
|
|
@@ -4023,13 +4046,13 @@ class ko {
|
|
|
4023
4046
|
}
|
|
4024
4047
|
}
|
|
4025
4048
|
function H(t, e, i) {
|
|
4026
|
-
return (e =
|
|
4049
|
+
return (e = Ro(e)) in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t;
|
|
4027
4050
|
}
|
|
4028
|
-
function
|
|
4029
|
-
var e =
|
|
4051
|
+
function Ro(t) {
|
|
4052
|
+
var e = Io(t, "string");
|
|
4030
4053
|
return typeof e == "symbol" ? e : e + "";
|
|
4031
4054
|
}
|
|
4032
|
-
function
|
|
4055
|
+
function Io(t, e) {
|
|
4033
4056
|
if (typeof t != "object" || !t)
|
|
4034
4057
|
return t;
|
|
4035
4058
|
var i = t[Symbol.toPrimitive];
|
|
@@ -4245,7 +4268,7 @@ class qo {
|
|
|
4245
4268
|
return;
|
|
4246
4269
|
}
|
|
4247
4270
|
if (g) {
|
|
4248
|
-
const p = g == null ? void 0 : g.sort((T,
|
|
4271
|
+
const p = g == null ? void 0 : g.sort((T, I) => T.seq - I.seq);
|
|
4249
4272
|
if (p.length === 0) {
|
|
4250
4273
|
const T = P.from(new Error("No ads available"), "JOLIBOX_IMA_ERROR");
|
|
4251
4274
|
(l = e.onAdError) == null || l.call(e, T);
|
|
@@ -4254,9 +4277,9 @@ class qo {
|
|
|
4254
4277
|
let y = !0, v = null;
|
|
4255
4278
|
const b = new co(this.context);
|
|
4256
4279
|
for (; p.length > 0; ) {
|
|
4257
|
-
const T = p.shift(),
|
|
4258
|
-
if (
|
|
4259
|
-
const [O, A] = await b.callAdRequestAndContinue(
|
|
4280
|
+
const T = p.shift(), I = this.providers[T.provider];
|
|
4281
|
+
if (I) {
|
|
4282
|
+
const [O, A] = await b.callAdRequestAndContinue(I, e, T);
|
|
4260
4283
|
y = O, v = A;
|
|
4261
4284
|
} else
|
|
4262
4285
|
y = !0, v = P.from(new Error("No provider available"), "JOLIBOX_IMA_ERROR");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jolibox/ads",
|
|
3
3
|
"description": "This project is for integrating Jolibox ads providers",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0-beta.9",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
],
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@jolibox/common": "1.
|
|
15
|
+
"@jolibox/common": "1.2.0-beta.9",
|
|
16
16
|
"@emotion/css": "11.13.5",
|
|
17
|
-
"@jolibox/types": "1.
|
|
17
|
+
"@jolibox/types": "1.2.0-beta.9",
|
|
18
18
|
"preact": "10.26.4",
|
|
19
19
|
"@preact/signals": "2.0.4"
|
|
20
20
|
},
|