@fluidattacks/design 3.1.12 → 3.1.13
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/components/@core/index.js +2 -2
- package/dist/components/accordion/accordion-content/index.js +18 -5
- package/dist/components/accordion/index.js +71 -14
- package/dist/components/alert/index.js +108 -57
- package/dist/components/button/index.js +64 -13
- package/dist/components/card/card-header/index.js +78 -9
- package/dist/components/card/card-with-image/index.js +88 -13
- package/dist/components/card/card-with-input/index.js +72 -23
- package/dist/components/card/card-with-selector/index.js +63 -8
- package/dist/components/card/card-with-switch/index.js +46 -8
- package/dist/components/carousel/index.js +54 -28
- package/dist/components/checkbox/index.js +66 -32
- package/dist/components/cloud-image/index.js +2 -2
- package/dist/components/code-snippet/index.js +64 -19
- package/dist/components/code-snippet/location-code/index.js +146 -100
- package/dist/components/colors/index.js +220 -5
- package/dist/components/confirm-dialog/index.js +41 -18
- package/dist/components/container/index.js +39 -15
- package/dist/components/content-card/category-tag/index.js +37 -8
- package/dist/components/content-card/event-date/index.js +53 -10
- package/dist/components/content-card/index.js +118 -13
- package/dist/components/content-card-carousel/index.js +87 -7
- package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
- package/dist/components/divider/index.js +22 -7
- package/dist/components/empty-state/empty-button/index.js +4 -4
- package/dist/components/empty-state/index.js +52 -15
- package/dist/components/file-preview/index.js +28 -12
- package/dist/components/form/index.js +46 -9
- package/dist/components/grid-container/index.js +31 -11
- package/dist/components/group-selector/index.js +126 -17
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +78 -18
- package/dist/components/icon-button/index.js +63 -14
- package/dist/components/indicator-card/index.js +70 -11
- package/dist/components/info-sidebar/index.js +107 -7
- package/dist/components/inputs/fields/combobox/index.js +141 -21
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +22 -11
- package/dist/components/inputs/fields/date/calendar/grid/index.js +21 -10
- package/dist/components/inputs/fields/date/calendar/header/index.js +35 -13
- package/dist/components/inputs/fields/date/calendar/index.js +26 -11
- package/dist/components/inputs/fields/date/index.js +65 -15
- package/dist/components/inputs/fields/date-range/calendar/index.js +29 -10
- package/dist/components/inputs/fields/date-range/index.js +98 -18
- package/dist/components/inputs/fields/date-time/calendar/index.js +44 -15
- package/dist/components/inputs/fields/date-time/index.js +65 -14
- package/dist/components/inputs/fields/editable/index.js +22 -10
- package/dist/components/inputs/fields/input/index.js +74 -10
- package/dist/components/inputs/fields/input-file/index.js +114 -21
- package/dist/components/inputs/fields/input-tags/index.js +60 -11
- package/dist/components/inputs/fields/number/index.js +54 -7
- package/dist/components/inputs/fields/number-range/index.js +46 -8
- package/dist/components/inputs/fields/phone/index.js +446 -286
- package/dist/components/inputs/fields/text-area/index.js +78 -10
- package/dist/components/inputs/label/index.js +34 -8
- package/dist/components/inputs/outline-container/index.js +98 -12
- package/dist/components/inputs/utils/action-button/index.js +28 -7
- package/dist/components/inputs/utils/calendar-button/index.js +34 -10
- package/dist/components/inputs/utils/date-selector/index.js +60 -6
- package/dist/components/inputs/utils/date-time-field/index.js +129 -28
- package/dist/components/inputs/utils/dialog/index.js +10 -7
- package/dist/components/inputs/utils/number-field/index.js +81 -8
- package/dist/components/inputs/utils/popover/index.js +41 -10
- package/dist/components/interactive-card/icon/index.js +1 -1
- package/dist/components/interactive-card/index.js +110 -7
- package/dist/components/language-selector/index.js +34 -10
- package/dist/components/language-selector/item-list/index.js +1 -1
- package/dist/components/link/index.js +71 -17
- package/dist/components/list-item/index.js +64 -13
- package/dist/components/little-flag/index.js +26 -9
- package/dist/components/loading/index.js +48 -21
- package/dist/components/logo/index.js +10 -4
- package/dist/components/logo-carousel/index.js +40 -5
- package/dist/components/lottie/index.js +12 -7
- package/dist/components/menu/index.js +53 -9
- package/dist/components/message-banner/index.js +79 -13
- package/dist/components/modal/index.js +59 -13
- package/dist/components/modal/modal-confirm/index.js +48 -7
- package/dist/components/modal/modal-footer/index.js +22 -13
- package/dist/components/modal/modal-header/index.js +45 -19
- package/dist/components/notification/index.js +65 -20
- package/dist/components/notification-sign/index.js +27 -10
- package/dist/components/number-input/index.js +58 -21
- package/dist/components/oauth-selector/index.js +97 -23
- package/dist/components/oauth-selector/option-container/index.js +68 -7
- package/dist/components/plan-card/index.js +99 -28
- package/dist/components/plan-card/recommended-tag/index.js +23 -2
- package/dist/components/pop-up/description/index.js +47 -9
- package/dist/components/pop-up/index.js +146 -17
- package/dist/components/premium-feature/index.js +56 -16
- package/dist/components/priority-score/index.js +24 -9
- package/dist/components/progress/index.js +30 -17
- package/dist/components/progress-bar/index.js +99 -41
- package/dist/components/radio-button/index.js +64 -27
- package/dist/components/scroll-button/index.js +33 -15
- package/dist/components/search/index.js +77 -35
- package/dist/components/search-bar/index.js +211 -24
- package/dist/components/search-bar/item-searching/index.js +1 -1
- package/dist/components/severity-badge/index.js +66 -6
- package/dist/components/severity-overview/badge/index.js +62 -11
- package/dist/components/severity-overview/index.js +15 -5
- package/dist/components/show-on-hover/index.js +16 -10
- package/dist/components/slide-out-menu/index.js +2611 -1164
- package/dist/components/slide-out-menu/menu-item/index.js +58 -6
- package/dist/components/slider/index.js +79 -48
- package/dist/components/slider/thumb/index.js +13 -6
- package/dist/components/step-lapse/index.js +81 -23
- package/dist/components/table-button/index.js +65 -24
- package/dist/components/tabs/fixed-tabs/index.js +24 -4
- package/dist/components/tabs/index.js +54 -11
- package/dist/components/tabs/tab/index.js +37 -6
- package/dist/components/tag/index.js +95 -27
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +15 -5
- package/dist/components/toggle/index.js +65 -25
- package/dist/components/toggle-buttons/index.js +51 -22
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +3897 -1829
- package/dist/components/typography/heading/index.js +43 -5
- package/dist/components/typography/span/index.js +38 -6
- package/dist/components/typography/text/index.js +44 -6
- package/dist/components/web-form/index.js +28 -19
- package/dist/hooks/index.js +5 -5
- package/dist/index-BMHVi812.mjs +234 -0
- package/dist/index-BzAniA2J.mjs +135 -0
- package/dist/index-C6LbClYh.mjs +146 -0
- package/dist/index-CAIe8hBv.mjs +130 -0
- package/dist/index-CUQBAqt_.mjs +75 -0
- package/dist/index-CWlrSlUk.mjs +68 -0
- package/dist/index-Ckmu1TfV.mjs +86 -0
- package/dist/index-DwznImvK.mjs +1678 -0
- package/dist/index-maWH3JYC.mjs +3561 -0
- package/dist/index.js +11 -11
- package/dist/styles-B2N0JLw1.mjs +114 -0
- package/dist/styles-B64DVBIF.mjs +115 -0
- package/dist/{styles-lSVV9kjn.mjs → styles-BXFVwnWT.mjs} +28 -28
- package/dist/styles-BZQOqe8p.mjs +141 -0
- package/dist/styles-Bdque9TT.mjs +65 -0
- package/dist/{styles-CI-I6joH.mjs → styles-BlHspTrz.mjs} +18 -18
- package/dist/{styles-Cx93EcVo.mjs → styles-CROOwXEH.mjs} +5 -5
- package/dist/styles-CplEd2kw.mjs +228 -0
- package/dist/styles-D1eTIklB.mjs +110 -0
- package/dist/styles-ePGii_9g.mjs +74 -0
- package/dist/use-carousel-CgAF78h3.mjs +23 -0
- package/dist/use-click-outside-BUll8Ag-.mjs +18 -0
- package/dist/use-cloudinary-image-BCxwj15o.mjs +1176 -0
- package/dist/use-modal-CtgexKnf.mjs +14 -0
- package/dist/use-search-Dj47QDw9.mjs +15 -0
- package/dist/utils-V0EumEPM.mjs +6 -0
- package/package.json +1 -3
- package/dist/index-38JqtnAI.mjs +0 -122
- package/dist/index-B5yoGFs6.mjs +0 -54
- package/dist/index-BLbKylyw.mjs +0 -209
- package/dist/index-Bu448Tz2.mjs +0 -106
- package/dist/index-BwFnfaRh.mjs +0 -2310
- package/dist/index-Co_k0WFk.mjs +0 -75
- package/dist/index-Cu7uUMlx.mjs +0 -82
- package/dist/index-D-lcuEHY.mjs +0 -1018
- package/dist/index-DrfjITyT.mjs +0 -61
- package/dist/styles-7_q7nHce.mjs +0 -110
- package/dist/styles-BA0WIQL-.mjs +0 -74
- package/dist/styles-C3cZmKVJ.mjs +0 -131
- package/dist/styles-D85YYIjM.mjs +0 -131
- package/dist/styles-EIbGRPlk.mjs +0 -106
- package/dist/styles-Q1VXuWI7.mjs +0 -65
- package/dist/styles-fH2c4cfc.mjs +0 -77
- package/dist/use-carousel-CvRxi2FI.mjs +0 -17
- package/dist/use-click-outside-BtZLIoU1.mjs +0 -18
- package/dist/use-cloudinary-image-fG7ODNgr.mjs +0 -611
- package/dist/use-modal-CkrZ-_-M.mjs +0 -14
- package/dist/use-search-DpLNvt7Q.mjs +0 -12
- package/dist/utils-CQvBF-wY.mjs +0 -4
|
@@ -0,0 +1,3561 @@
|
|
|
1
|
+
import { jsx as mi } from "react/jsx-runtime";
|
|
2
|
+
import _i from "react";
|
|
3
|
+
import { u as bi } from "./use-cloudinary-image-BCxwj15o.mjs";
|
|
4
|
+
import "lodash";
|
|
5
|
+
var ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Sr = { exports: {} };
|
|
6
|
+
(function(t, e) {
|
|
7
|
+
var r = 200, o = "__lodash_hash_undefined__", s = 9007199254740991, u = "[object Arguments]", p = "[object Array]", h = "[object Boolean]", m = "[object Date]", g = "[object Error]", O = "[object Function]", X = "[object GeneratorFunction]", q = "[object Map]", ve = "[object Number]", me = "[object Object]", Z = "[object Promise]", _e = "[object RegExp]", ue = "[object Set]", ut = "[object String]", ct = "[object Symbol]", Le = "[object WeakMap]", Fe = "[object ArrayBuffer]", be = "[object DataView]", Ve = "[object Float32Array]", De = "[object Float64Array]", lt = "[object Int8Array]", L = "[object Int16Array]", we = "[object Int32Array]", ft = "[object Uint8Array]", dt = "[object Uint8ClampedArray]", pt = "[object Uint16Array]", ht = "[object Uint32Array]", F = /[\\^$.*+?()[\]{}|]/g, ee = /\w*$/, ce = /^\[object .+?Constructor\]$/, te = /^(?:0|[1-9]\d*)$/, C = {};
|
|
8
|
+
C[u] = C[p] = C[Fe] = C[be] = C[h] = C[m] = C[Ve] = C[De] = C[lt] = C[L] = C[we] = C[q] = C[ve] = C[me] = C[_e] = C[ue] = C[ut] = C[ct] = C[ft] = C[dt] = C[pt] = C[ht] = !0, C[g] = C[O] = C[Le] = !1;
|
|
9
|
+
var Ne = typeof ae == "object" && ae && ae.Object === Object && ae, Ee = typeof self == "object" && self && self.Object === Object && self, A = Ne || Ee || Function("return this")(), Be = e && !e.nodeType && e, Ue = Be && !0 && t && !t.nodeType && t, Qe = Ue && Ue.exports === Be;
|
|
10
|
+
function gt(i, c) {
|
|
11
|
+
return i.set(c[0], c[1]), i;
|
|
12
|
+
}
|
|
13
|
+
function Ge(i, c) {
|
|
14
|
+
return i.add(c), i;
|
|
15
|
+
}
|
|
16
|
+
function z(i, c) {
|
|
17
|
+
for (var f = -1, v = i ? i.length : 0; ++f < v && c(i[f], f, i) !== !1; )
|
|
18
|
+
;
|
|
19
|
+
return i;
|
|
20
|
+
}
|
|
21
|
+
function qe(i, c) {
|
|
22
|
+
for (var f = -1, v = c.length, j = i.length; ++f < v; )
|
|
23
|
+
i[j + f] = c[f];
|
|
24
|
+
return i;
|
|
25
|
+
}
|
|
26
|
+
function yt(i, c, f, v) {
|
|
27
|
+
for (var j = -1, k = i ? i.length : 0; ++j < k; )
|
|
28
|
+
f = c(f, i[j], j, i);
|
|
29
|
+
return f;
|
|
30
|
+
}
|
|
31
|
+
function ze(i, c) {
|
|
32
|
+
for (var f = -1, v = Array(i); ++f < i; )
|
|
33
|
+
v[f] = c(f);
|
|
34
|
+
return v;
|
|
35
|
+
}
|
|
36
|
+
function vt(i, c) {
|
|
37
|
+
return i == null ? void 0 : i[c];
|
|
38
|
+
}
|
|
39
|
+
function Oe(i) {
|
|
40
|
+
var c = !1;
|
|
41
|
+
if (i != null && typeof i.toString != "function")
|
|
42
|
+
try {
|
|
43
|
+
c = !!(i + "");
|
|
44
|
+
} catch {
|
|
45
|
+
}
|
|
46
|
+
return c;
|
|
47
|
+
}
|
|
48
|
+
function Ae(i) {
|
|
49
|
+
var c = -1, f = Array(i.size);
|
|
50
|
+
return i.forEach(function(v, j) {
|
|
51
|
+
f[++c] = [j, v];
|
|
52
|
+
}), f;
|
|
53
|
+
}
|
|
54
|
+
function Ye(i, c) {
|
|
55
|
+
return function(f) {
|
|
56
|
+
return i(c(f));
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function le(i) {
|
|
60
|
+
var c = -1, f = Array(i.size);
|
|
61
|
+
return i.forEach(function(v) {
|
|
62
|
+
f[++c] = v;
|
|
63
|
+
}), f;
|
|
64
|
+
}
|
|
65
|
+
var mt = Array.prototype, _t = Function.prototype, fe = Object.prototype, de = A["__core-js_shared__"], We = function() {
|
|
66
|
+
var i = /[^.]+$/.exec(de && de.keys && de.keys.IE_PROTO || "");
|
|
67
|
+
return i ? "Symbol(src)_1." + i : "";
|
|
68
|
+
}(), He = _t.toString, G = fe.hasOwnProperty, Se = fe.toString, Ut = RegExp(
|
|
69
|
+
"^" + He.call(G).replace(F, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
70
|
+
), Te = Qe ? A.Buffer : void 0, bt = A.Symbol, wt = A.Uint8Array, Qt = Ye(Object.getPrototypeOf, Object), re = Object.create, Et = fe.propertyIsEnumerable, Gt = mt.splice, Ot = Object.getOwnPropertySymbols, At = Te ? Te.isBuffer : void 0, qt = Ye(Object.keys, Object), Ce = b(A, "DataView"), pe = b(A, "Map"), ne = b(A, "Promise"), Re = b(A, "Set"), xe = b(A, "WeakMap"), Y = b(Object, "create"), Je = ge(Ce), Ke = ge(pe), zt = ge(ne), Yt = ge(Re), Wt = ge(xe), Pe = bt ? bt.prototype : void 0, St = Pe ? Pe.valueOf : void 0;
|
|
71
|
+
function W(i) {
|
|
72
|
+
var c = -1, f = i ? i.length : 0;
|
|
73
|
+
for (this.clear(); ++c < f; ) {
|
|
74
|
+
var v = i[c];
|
|
75
|
+
this.set(v[0], v[1]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function Ht() {
|
|
79
|
+
this.__data__ = Y ? Y(null) : {};
|
|
80
|
+
}
|
|
81
|
+
function Jt(i) {
|
|
82
|
+
return this.has(i) && delete this.__data__[i];
|
|
83
|
+
}
|
|
84
|
+
function Kt(i) {
|
|
85
|
+
var c = this.__data__;
|
|
86
|
+
if (Y) {
|
|
87
|
+
var f = c[i];
|
|
88
|
+
return f === o ? void 0 : f;
|
|
89
|
+
}
|
|
90
|
+
return G.call(c, i) ? c[i] : void 0;
|
|
91
|
+
}
|
|
92
|
+
function Xt(i) {
|
|
93
|
+
var c = this.__data__;
|
|
94
|
+
return Y ? c[i] !== void 0 : G.call(c, i);
|
|
95
|
+
}
|
|
96
|
+
function Zt(i, c) {
|
|
97
|
+
var f = this.__data__;
|
|
98
|
+
return f[i] = Y && c === void 0 ? o : c, this;
|
|
99
|
+
}
|
|
100
|
+
W.prototype.clear = Ht, W.prototype.delete = Jt, W.prototype.get = Kt, W.prototype.has = Xt, W.prototype.set = Zt;
|
|
101
|
+
function V(i) {
|
|
102
|
+
var c = -1, f = i ? i.length : 0;
|
|
103
|
+
for (this.clear(); ++c < f; ) {
|
|
104
|
+
var v = i[c];
|
|
105
|
+
this.set(v[0], v[1]);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function er() {
|
|
109
|
+
this.__data__ = [];
|
|
110
|
+
}
|
|
111
|
+
function D(i) {
|
|
112
|
+
var c = this.__data__, f = he(c, i);
|
|
113
|
+
if (f < 0)
|
|
114
|
+
return !1;
|
|
115
|
+
var v = c.length - 1;
|
|
116
|
+
return f == v ? c.pop() : Gt.call(c, f, 1), !0;
|
|
117
|
+
}
|
|
118
|
+
function tr(i) {
|
|
119
|
+
var c = this.__data__, f = he(c, i);
|
|
120
|
+
return f < 0 ? void 0 : c[f][1];
|
|
121
|
+
}
|
|
122
|
+
function rr(i) {
|
|
123
|
+
return he(this.__data__, i) > -1;
|
|
124
|
+
}
|
|
125
|
+
function nr(i, c) {
|
|
126
|
+
var f = this.__data__, v = he(f, i);
|
|
127
|
+
return v < 0 ? f.push([i, c]) : f[v][1] = c, this;
|
|
128
|
+
}
|
|
129
|
+
V.prototype.clear = er, V.prototype.delete = D, V.prototype.get = tr, V.prototype.has = rr, V.prototype.set = nr;
|
|
130
|
+
function ie(i) {
|
|
131
|
+
var c = -1, f = i ? i.length : 0;
|
|
132
|
+
for (this.clear(); ++c < f; ) {
|
|
133
|
+
var v = i[c];
|
|
134
|
+
this.set(v[0], v[1]);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function ir() {
|
|
138
|
+
this.__data__ = {
|
|
139
|
+
hash: new W(),
|
|
140
|
+
map: new (pe || V)(),
|
|
141
|
+
string: new W()
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function or(i) {
|
|
145
|
+
return _(this, i).delete(i);
|
|
146
|
+
}
|
|
147
|
+
function ar(i) {
|
|
148
|
+
return _(this, i).get(i);
|
|
149
|
+
}
|
|
150
|
+
function sr(i) {
|
|
151
|
+
return _(this, i).has(i);
|
|
152
|
+
}
|
|
153
|
+
function ur(i, c) {
|
|
154
|
+
return _(this, i).set(i, c), this;
|
|
155
|
+
}
|
|
156
|
+
ie.prototype.clear = ir, ie.prototype.delete = or, ie.prototype.get = ar, ie.prototype.has = sr, ie.prototype.set = ur;
|
|
157
|
+
function oe(i) {
|
|
158
|
+
this.__data__ = new V(i);
|
|
159
|
+
}
|
|
160
|
+
function Xe() {
|
|
161
|
+
this.__data__ = new V();
|
|
162
|
+
}
|
|
163
|
+
function Tt(i) {
|
|
164
|
+
return this.__data__.delete(i);
|
|
165
|
+
}
|
|
166
|
+
function cr(i) {
|
|
167
|
+
return this.__data__.get(i);
|
|
168
|
+
}
|
|
169
|
+
function lr(i) {
|
|
170
|
+
return this.__data__.has(i);
|
|
171
|
+
}
|
|
172
|
+
function Ct(i, c) {
|
|
173
|
+
var f = this.__data__;
|
|
174
|
+
if (f instanceof V) {
|
|
175
|
+
var v = f.__data__;
|
|
176
|
+
if (!pe || v.length < r - 1)
|
|
177
|
+
return v.push([i, c]), this;
|
|
178
|
+
f = this.__data__ = new ie(v);
|
|
179
|
+
}
|
|
180
|
+
return f.set(i, c), this;
|
|
181
|
+
}
|
|
182
|
+
oe.prototype.clear = Xe, oe.prototype.delete = Tt, oe.prototype.get = cr, oe.prototype.has = lr, oe.prototype.set = Ct;
|
|
183
|
+
function fr(i, c) {
|
|
184
|
+
var f = br(i) || fi(i) ? ze(i.length, String) : [], v = f.length, j = !!v;
|
|
185
|
+
for (var k in i)
|
|
186
|
+
G.call(i, k) && !(j && (k == "length" || N(k, v))) && f.push(k);
|
|
187
|
+
return f;
|
|
188
|
+
}
|
|
189
|
+
function Ze(i, c, f) {
|
|
190
|
+
var v = i[c];
|
|
191
|
+
(!(G.call(i, c) && Kr(v, f)) || f === void 0 && !(c in i)) && (i[c] = f);
|
|
192
|
+
}
|
|
193
|
+
function he(i, c) {
|
|
194
|
+
for (var f = i.length; f--; )
|
|
195
|
+
if (Kr(i[f][0], c))
|
|
196
|
+
return f;
|
|
197
|
+
return -1;
|
|
198
|
+
}
|
|
199
|
+
function Rt(i, c) {
|
|
200
|
+
return i && d(c, wr(c), i);
|
|
201
|
+
}
|
|
202
|
+
function et(i, c, f, v, j, k, J) {
|
|
203
|
+
var I;
|
|
204
|
+
if (v && (I = k ? v(i, j, k, J) : v(i)), I !== void 0)
|
|
205
|
+
return I;
|
|
206
|
+
if (!$t(i))
|
|
207
|
+
return i;
|
|
208
|
+
var en = br(i);
|
|
209
|
+
if (en) {
|
|
210
|
+
if (I = $(i), !c)
|
|
211
|
+
return l(i, I);
|
|
212
|
+
} else {
|
|
213
|
+
var je = P(i), tn = je == O || je == X;
|
|
214
|
+
if (pi(i))
|
|
215
|
+
return hr(i, c);
|
|
216
|
+
if (je == me || je == u || tn && !k) {
|
|
217
|
+
if (Oe(i))
|
|
218
|
+
return k ? i : {};
|
|
219
|
+
if (I = M(tn ? {} : i), !c)
|
|
220
|
+
return y(i, Rt(I, i));
|
|
221
|
+
} else {
|
|
222
|
+
if (!C[je])
|
|
223
|
+
return k ? i : {};
|
|
224
|
+
I = H(i, je, et, c);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
J || (J = new oe());
|
|
228
|
+
var rn = J.get(i);
|
|
229
|
+
if (rn)
|
|
230
|
+
return rn;
|
|
231
|
+
if (J.set(i, I), !en)
|
|
232
|
+
var nn = f ? E(i) : wr(i);
|
|
233
|
+
return z(nn || i, function(Er, kt) {
|
|
234
|
+
nn && (kt = Er, Er = i[kt]), Ze(I, kt, et(Er, c, f, v, kt, i, J));
|
|
235
|
+
}), I;
|
|
236
|
+
}
|
|
237
|
+
function xt(i) {
|
|
238
|
+
return $t(i) ? re(i) : {};
|
|
239
|
+
}
|
|
240
|
+
function Pt(i, c, f) {
|
|
241
|
+
var v = c(i);
|
|
242
|
+
return br(i) ? v : qe(v, f(i));
|
|
243
|
+
}
|
|
244
|
+
function dr(i) {
|
|
245
|
+
return Se.call(i);
|
|
246
|
+
}
|
|
247
|
+
function pr(i) {
|
|
248
|
+
if (!$t(i) || Mt(i))
|
|
249
|
+
return !1;
|
|
250
|
+
var c = Zr(i) || Oe(i) ? Ut : ce;
|
|
251
|
+
return c.test(ge(i));
|
|
252
|
+
}
|
|
253
|
+
function jt(i) {
|
|
254
|
+
if (!rt(i))
|
|
255
|
+
return qt(i);
|
|
256
|
+
var c = [];
|
|
257
|
+
for (var f in Object(i))
|
|
258
|
+
G.call(i, f) && f != "constructor" && c.push(f);
|
|
259
|
+
return c;
|
|
260
|
+
}
|
|
261
|
+
function hr(i, c) {
|
|
262
|
+
if (c)
|
|
263
|
+
return i.slice();
|
|
264
|
+
var f = new i.constructor(i.length);
|
|
265
|
+
return i.copy(f), f;
|
|
266
|
+
}
|
|
267
|
+
function tt(i) {
|
|
268
|
+
var c = new i.constructor(i.byteLength);
|
|
269
|
+
return new wt(c).set(new wt(i)), c;
|
|
270
|
+
}
|
|
271
|
+
function gr(i, c) {
|
|
272
|
+
var f = c ? tt(i.buffer) : i.buffer;
|
|
273
|
+
return new i.constructor(f, i.byteOffset, i.byteLength);
|
|
274
|
+
}
|
|
275
|
+
function yr(i, c, f) {
|
|
276
|
+
var v = c ? f(Ae(i), !0) : Ae(i);
|
|
277
|
+
return yt(v, gt, new i.constructor());
|
|
278
|
+
}
|
|
279
|
+
function vr(i) {
|
|
280
|
+
var c = new i.constructor(i.source, ee.exec(i));
|
|
281
|
+
return c.lastIndex = i.lastIndex, c;
|
|
282
|
+
}
|
|
283
|
+
function mr(i, c, f) {
|
|
284
|
+
var v = c ? f(le(i), !0) : le(i);
|
|
285
|
+
return yt(v, Ge, new i.constructor());
|
|
286
|
+
}
|
|
287
|
+
function n(i) {
|
|
288
|
+
return St ? Object(St.call(i)) : {};
|
|
289
|
+
}
|
|
290
|
+
function a(i, c) {
|
|
291
|
+
var f = c ? tt(i.buffer) : i.buffer;
|
|
292
|
+
return new i.constructor(f, i.byteOffset, i.length);
|
|
293
|
+
}
|
|
294
|
+
function l(i, c) {
|
|
295
|
+
var f = -1, v = i.length;
|
|
296
|
+
for (c || (c = Array(v)); ++f < v; )
|
|
297
|
+
c[f] = i[f];
|
|
298
|
+
return c;
|
|
299
|
+
}
|
|
300
|
+
function d(i, c, f, v) {
|
|
301
|
+
f || (f = {});
|
|
302
|
+
for (var j = -1, k = c.length; ++j < k; ) {
|
|
303
|
+
var J = c[j], I = void 0;
|
|
304
|
+
Ze(f, J, I === void 0 ? i[J] : I);
|
|
305
|
+
}
|
|
306
|
+
return f;
|
|
307
|
+
}
|
|
308
|
+
function y(i, c) {
|
|
309
|
+
return d(i, x(i), c);
|
|
310
|
+
}
|
|
311
|
+
function E(i) {
|
|
312
|
+
return Pt(i, wr, x);
|
|
313
|
+
}
|
|
314
|
+
function _(i, c) {
|
|
315
|
+
var f = i.__data__;
|
|
316
|
+
return _r(c) ? f[typeof c == "string" ? "string" : "hash"] : f.map;
|
|
317
|
+
}
|
|
318
|
+
function b(i, c) {
|
|
319
|
+
var f = vt(i, c);
|
|
320
|
+
return pr(f) ? f : void 0;
|
|
321
|
+
}
|
|
322
|
+
var x = Ot ? Ye(Ot, Object) : yi, P = dr;
|
|
323
|
+
(Ce && P(new Ce(new ArrayBuffer(1))) != be || pe && P(new pe()) != q || ne && P(ne.resolve()) != Z || Re && P(new Re()) != ue || xe && P(new xe()) != Le) && (P = function(i) {
|
|
324
|
+
var c = Se.call(i), f = c == me ? i.constructor : void 0, v = f ? ge(f) : void 0;
|
|
325
|
+
if (v)
|
|
326
|
+
switch (v) {
|
|
327
|
+
case Je:
|
|
328
|
+
return be;
|
|
329
|
+
case Ke:
|
|
330
|
+
return q;
|
|
331
|
+
case zt:
|
|
332
|
+
return Z;
|
|
333
|
+
case Yt:
|
|
334
|
+
return ue;
|
|
335
|
+
case Wt:
|
|
336
|
+
return Le;
|
|
337
|
+
}
|
|
338
|
+
return c;
|
|
339
|
+
});
|
|
340
|
+
function $(i) {
|
|
341
|
+
var c = i.length, f = i.constructor(c);
|
|
342
|
+
return c && typeof i[0] == "string" && G.call(i, "index") && (f.index = i.index, f.input = i.input), f;
|
|
343
|
+
}
|
|
344
|
+
function M(i) {
|
|
345
|
+
return typeof i.constructor == "function" && !rt(i) ? xt(Qt(i)) : {};
|
|
346
|
+
}
|
|
347
|
+
function H(i, c, f, v) {
|
|
348
|
+
var j = i.constructor;
|
|
349
|
+
switch (c) {
|
|
350
|
+
case Fe:
|
|
351
|
+
return tt(i);
|
|
352
|
+
case h:
|
|
353
|
+
case m:
|
|
354
|
+
return new j(+i);
|
|
355
|
+
case be:
|
|
356
|
+
return gr(i, v);
|
|
357
|
+
case Ve:
|
|
358
|
+
case De:
|
|
359
|
+
case lt:
|
|
360
|
+
case L:
|
|
361
|
+
case we:
|
|
362
|
+
case ft:
|
|
363
|
+
case dt:
|
|
364
|
+
case pt:
|
|
365
|
+
case ht:
|
|
366
|
+
return a(i, v);
|
|
367
|
+
case q:
|
|
368
|
+
return yr(i, v, f);
|
|
369
|
+
case ve:
|
|
370
|
+
case ut:
|
|
371
|
+
return new j(i);
|
|
372
|
+
case _e:
|
|
373
|
+
return vr(i);
|
|
374
|
+
case ue:
|
|
375
|
+
return mr(i, v, f);
|
|
376
|
+
case ct:
|
|
377
|
+
return n(i);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
function N(i, c) {
|
|
381
|
+
return c = c ?? s, !!c && (typeof i == "number" || te.test(i)) && i > -1 && i % 1 == 0 && i < c;
|
|
382
|
+
}
|
|
383
|
+
function _r(i) {
|
|
384
|
+
var c = typeof i;
|
|
385
|
+
return c == "string" || c == "number" || c == "symbol" || c == "boolean" ? i !== "__proto__" : i === null;
|
|
386
|
+
}
|
|
387
|
+
function Mt(i) {
|
|
388
|
+
return !!We && We in i;
|
|
389
|
+
}
|
|
390
|
+
function rt(i) {
|
|
391
|
+
var c = i && i.constructor, f = typeof c == "function" && c.prototype || fe;
|
|
392
|
+
return i === f;
|
|
393
|
+
}
|
|
394
|
+
function ge(i) {
|
|
395
|
+
if (i != null) {
|
|
396
|
+
try {
|
|
397
|
+
return He.call(i);
|
|
398
|
+
} catch {
|
|
399
|
+
}
|
|
400
|
+
try {
|
|
401
|
+
return i + "";
|
|
402
|
+
} catch {
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return "";
|
|
406
|
+
}
|
|
407
|
+
function li(i) {
|
|
408
|
+
return et(i, !0, !0);
|
|
409
|
+
}
|
|
410
|
+
function Kr(i, c) {
|
|
411
|
+
return i === c || i !== i && c !== c;
|
|
412
|
+
}
|
|
413
|
+
function fi(i) {
|
|
414
|
+
return di(i) && G.call(i, "callee") && (!Et.call(i, "callee") || Se.call(i) == u);
|
|
415
|
+
}
|
|
416
|
+
var br = Array.isArray;
|
|
417
|
+
function Xr(i) {
|
|
418
|
+
return i != null && hi(i.length) && !Zr(i);
|
|
419
|
+
}
|
|
420
|
+
function di(i) {
|
|
421
|
+
return gi(i) && Xr(i);
|
|
422
|
+
}
|
|
423
|
+
var pi = At || vi;
|
|
424
|
+
function Zr(i) {
|
|
425
|
+
var c = $t(i) ? Se.call(i) : "";
|
|
426
|
+
return c == O || c == X;
|
|
427
|
+
}
|
|
428
|
+
function hi(i) {
|
|
429
|
+
return typeof i == "number" && i > -1 && i % 1 == 0 && i <= s;
|
|
430
|
+
}
|
|
431
|
+
function $t(i) {
|
|
432
|
+
var c = typeof i;
|
|
433
|
+
return !!i && (c == "object" || c == "function");
|
|
434
|
+
}
|
|
435
|
+
function gi(i) {
|
|
436
|
+
return !!i && typeof i == "object";
|
|
437
|
+
}
|
|
438
|
+
function wr(i) {
|
|
439
|
+
return Xr(i) ? fr(i) : jt(i);
|
|
440
|
+
}
|
|
441
|
+
function yi() {
|
|
442
|
+
return [];
|
|
443
|
+
}
|
|
444
|
+
function vi() {
|
|
445
|
+
return !1;
|
|
446
|
+
}
|
|
447
|
+
t.exports = li;
|
|
448
|
+
})(Sr, Sr.exports);
|
|
449
|
+
var se = Sr.exports, Tr = function() {
|
|
450
|
+
return Tr = Object.assign || function(e) {
|
|
451
|
+
for (var r, o = 1, s = arguments.length; o < s; o++) {
|
|
452
|
+
r = arguments[o];
|
|
453
|
+
for (var u in r) Object.prototype.hasOwnProperty.call(r, u) && (e[u] = r[u]);
|
|
454
|
+
}
|
|
455
|
+
return e;
|
|
456
|
+
}, Tr.apply(this, arguments);
|
|
457
|
+
};
|
|
458
|
+
function wi(t, e, r, o) {
|
|
459
|
+
function s(u) {
|
|
460
|
+
return u instanceof r ? u : new r(function(p) {
|
|
461
|
+
p(u);
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
return new (r || (r = Promise))(function(u, p) {
|
|
465
|
+
function h(O) {
|
|
466
|
+
try {
|
|
467
|
+
g(o.next(O));
|
|
468
|
+
} catch (X) {
|
|
469
|
+
p(X);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
function m(O) {
|
|
473
|
+
try {
|
|
474
|
+
g(o.throw(O));
|
|
475
|
+
} catch (X) {
|
|
476
|
+
p(X);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
function g(O) {
|
|
480
|
+
O.done ? u(O.value) : s(O.value).then(h, m);
|
|
481
|
+
}
|
|
482
|
+
g((o = o.apply(t, [])).next());
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
function Ei(t, e) {
|
|
486
|
+
var r = { label: 0, sent: function() {
|
|
487
|
+
if (u[0] & 1) throw u[1];
|
|
488
|
+
return u[1];
|
|
489
|
+
}, trys: [], ops: [] }, o, s, u, p = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
490
|
+
return p.next = h(0), p.throw = h(1), p.return = h(2), typeof Symbol == "function" && (p[Symbol.iterator] = function() {
|
|
491
|
+
return this;
|
|
492
|
+
}), p;
|
|
493
|
+
function h(g) {
|
|
494
|
+
return function(O) {
|
|
495
|
+
return m([g, O]);
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
function m(g) {
|
|
499
|
+
if (o) throw new TypeError("Generator is already executing.");
|
|
500
|
+
for (; p && (p = 0, g[0] && (r = 0)), r; ) try {
|
|
501
|
+
if (o = 1, s && (u = g[0] & 2 ? s.return : g[0] ? s.throw || ((u = s.return) && u.call(s), 0) : s.next) && !(u = u.call(s, g[1])).done) return u;
|
|
502
|
+
switch (s = 0, u && (g = [g[0] & 2, u.value]), g[0]) {
|
|
503
|
+
case 0:
|
|
504
|
+
case 1:
|
|
505
|
+
u = g;
|
|
506
|
+
break;
|
|
507
|
+
case 4:
|
|
508
|
+
return r.label++, { value: g[1], done: !1 };
|
|
509
|
+
case 5:
|
|
510
|
+
r.label++, s = g[1], g = [0];
|
|
511
|
+
continue;
|
|
512
|
+
case 7:
|
|
513
|
+
g = r.ops.pop(), r.trys.pop();
|
|
514
|
+
continue;
|
|
515
|
+
default:
|
|
516
|
+
if (u = r.trys, !(u = u.length > 0 && u[u.length - 1]) && (g[0] === 6 || g[0] === 2)) {
|
|
517
|
+
r = 0;
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
if (g[0] === 3 && (!u || g[1] > u[0] && g[1] < u[3])) {
|
|
521
|
+
r.label = g[1];
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
if (g[0] === 6 && r.label < u[1]) {
|
|
525
|
+
r.label = u[1], u = g;
|
|
526
|
+
break;
|
|
527
|
+
}
|
|
528
|
+
if (u && r.label < u[2]) {
|
|
529
|
+
r.label = u[2], r.ops.push(g);
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
u[2] && r.ops.pop(), r.trys.pop();
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
g = e.call(t, r);
|
|
536
|
+
} catch (O) {
|
|
537
|
+
g = [6, O], s = 0;
|
|
538
|
+
} finally {
|
|
539
|
+
o = u = 0;
|
|
540
|
+
}
|
|
541
|
+
if (g[0] & 5) throw g[1];
|
|
542
|
+
return { value: g[0] ? g[1] : void 0, done: !0 };
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
function It(t, e, r, o, s) {
|
|
546
|
+
return wi(this, void 0, void 0, function() {
|
|
547
|
+
var u, p;
|
|
548
|
+
return Ei(this, function(h) {
|
|
549
|
+
switch (h.label) {
|
|
550
|
+
case 0:
|
|
551
|
+
if (r === void 0)
|
|
552
|
+
return [
|
|
553
|
+
2
|
|
554
|
+
/*return*/
|
|
555
|
+
];
|
|
556
|
+
p = 0, h.label = 1;
|
|
557
|
+
case 1:
|
|
558
|
+
return p < r.length ? [4, r[p](t, e, o, s, r)] : [3, 4];
|
|
559
|
+
case 2:
|
|
560
|
+
if (u = h.sent(), u === "canceled")
|
|
561
|
+
return [3, 4];
|
|
562
|
+
h.label = 3;
|
|
563
|
+
case 3:
|
|
564
|
+
return p++, [3, 1];
|
|
565
|
+
case 4:
|
|
566
|
+
return u !== "canceled" ? [2, u] : [
|
|
567
|
+
2
|
|
568
|
+
/*return*/
|
|
569
|
+
];
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
var Cr = function(t, e) {
|
|
575
|
+
return e === void 0 && (e = {}), t ? {
|
|
576
|
+
trackedAnalytics: Tr({ sdkCode: t.sdkCode, sdkSemver: t.sdkSemver, techVersion: t.techVersion }, e)
|
|
577
|
+
} : null;
|
|
578
|
+
}, Oi = (
|
|
579
|
+
/** @class */
|
|
580
|
+
function() {
|
|
581
|
+
function t(e, r, o, s) {
|
|
582
|
+
var u = this;
|
|
583
|
+
this.isMounted = !0, this.imgElement = e, this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] };
|
|
584
|
+
var p = se(r);
|
|
585
|
+
It(e, p, o, this.htmlPluginState, s).then(function(h) {
|
|
586
|
+
if (u.isMounted) {
|
|
587
|
+
u.htmlPluginState.pluginEventSubscription.forEach(function(g) {
|
|
588
|
+
g();
|
|
589
|
+
});
|
|
590
|
+
var m = Cr(s, h);
|
|
591
|
+
u.imgElement.setAttribute("src", p.toURL(m));
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
return t.prototype.update = function(e, r, o) {
|
|
596
|
+
var s = this, u = se(e);
|
|
597
|
+
It(this.imgElement, u, r, this.htmlPluginState).then(function(p) {
|
|
598
|
+
if (s.isMounted) {
|
|
599
|
+
var h = Cr(o, p);
|
|
600
|
+
s.imgElement.setAttribute("src", u.toURL(h));
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
}, t.prototype.unmount = function() {
|
|
604
|
+
this.isMounted = !1;
|
|
605
|
+
}, t;
|
|
606
|
+
}()
|
|
607
|
+
);
|
|
608
|
+
class R {
|
|
609
|
+
/**
|
|
610
|
+
*
|
|
611
|
+
* @param {QualifierValue | QualifierValue[] | any[] | string | number}qualifierValue
|
|
612
|
+
*/
|
|
613
|
+
constructor(e) {
|
|
614
|
+
this.values = [], this.delimiter = ":", this.hasValue(e) && this.addValue(e);
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* @description Joins the provided values with the provided delimiter
|
|
618
|
+
*/
|
|
619
|
+
toString() {
|
|
620
|
+
return this.values.join(this.delimiter);
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* @description Checks if the provided argument has a value
|
|
624
|
+
* @param {any} v
|
|
625
|
+
* @private
|
|
626
|
+
* @return {boolean}
|
|
627
|
+
*/
|
|
628
|
+
hasValue(e) {
|
|
629
|
+
return typeof e < "u" && e !== null && e !== "";
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* @desc Adds a value for the this qualifier instance
|
|
633
|
+
* @param {any} value
|
|
634
|
+
* @return {this}
|
|
635
|
+
*/
|
|
636
|
+
addValue(e) {
|
|
637
|
+
return Array.isArray(e) ? this.values = this.values.concat(e) : this.values.push(e), this.values = this.values.filter((r) => this.hasValue(r)), this;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* @description Sets the delimiter for this instance
|
|
641
|
+
* @param delimiter
|
|
642
|
+
*/
|
|
643
|
+
setDelimiter(e) {
|
|
644
|
+
return this.delimiter = e, this;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
class Ai extends Error {
|
|
648
|
+
constructor(e = "Unsupported") {
|
|
649
|
+
super(e);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
function Ir(t) {
|
|
653
|
+
return new Ai(t);
|
|
654
|
+
}
|
|
655
|
+
function Si() {
|
|
656
|
+
return this._qualifierModel || { error: Ir(`unsupported qualifier ${this.constructor.name}`) };
|
|
657
|
+
}
|
|
658
|
+
class Ti {
|
|
659
|
+
constructor() {
|
|
660
|
+
this._qualifierModel = {};
|
|
661
|
+
}
|
|
662
|
+
toJson() {
|
|
663
|
+
return Si.apply(this);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
class w extends Ti {
|
|
667
|
+
constructor(e, r) {
|
|
668
|
+
super(), this.delimiter = "_", this.key = e, r instanceof R ? this.qualifierValue = r : (this.qualifierValue = new R(), this.qualifierValue.addValue(r));
|
|
669
|
+
}
|
|
670
|
+
toString() {
|
|
671
|
+
const { key: e, delimiter: r, qualifierValue: o } = this;
|
|
672
|
+
return `${e}${r}${o.toString()}`;
|
|
673
|
+
}
|
|
674
|
+
addValue(e) {
|
|
675
|
+
return this.qualifierValue.addValue(e), this;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
class B extends w {
|
|
679
|
+
constructor(e, r) {
|
|
680
|
+
let o;
|
|
681
|
+
r ? o = new R([e, `${r}`]).setDelimiter(":") : o = e, super("fl", o), this.flagValue = r;
|
|
682
|
+
}
|
|
683
|
+
toString() {
|
|
684
|
+
return super.toString().replace(/\./g, "%2E");
|
|
685
|
+
}
|
|
686
|
+
getFlagValue() {
|
|
687
|
+
return this.flagValue;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
function Ci(t, e) {
|
|
691
|
+
const r = Array.from(t.entries());
|
|
692
|
+
return e.forEach((o) => {
|
|
693
|
+
r.push(["fl", o]);
|
|
694
|
+
}), r.sort().map((o) => o[1]);
|
|
695
|
+
}
|
|
696
|
+
function Ri() {
|
|
697
|
+
var t, e, r;
|
|
698
|
+
const o = this._actionModel && Object.keys(this._actionModel).length, s = (r = (e = (t = this._actionModel) === null || t === void 0 ? void 0 : t.source) === null || e === void 0 ? void 0 : e.transformation) === null || r === void 0 ? void 0 : r.error;
|
|
699
|
+
return s && s instanceof Error ? { error: s } : o ? this._actionModel : { error: Ir(`unsupported action ${this.constructor.name}`) };
|
|
700
|
+
}
|
|
701
|
+
class xi {
|
|
702
|
+
constructor() {
|
|
703
|
+
this._actionModel = {};
|
|
704
|
+
}
|
|
705
|
+
toJson() {
|
|
706
|
+
return Ri.apply(this);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
class U extends xi {
|
|
710
|
+
constructor() {
|
|
711
|
+
super(...arguments), this.qualifiers = /* @__PURE__ */ new Map(), this.flags = [], this.delimiter = ",", this.actionTag = "";
|
|
712
|
+
}
|
|
713
|
+
prepareQualifiers() {
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* @description Returns the custom name tag that was given to this action
|
|
717
|
+
* @return {string}
|
|
718
|
+
*/
|
|
719
|
+
getActionTag() {
|
|
720
|
+
return this.actionTag;
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* @description Sets the custom name tag for this action
|
|
724
|
+
* @return {this}
|
|
725
|
+
*/
|
|
726
|
+
setActionTag(e) {
|
|
727
|
+
return this.actionTag = e, this;
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* @description Calls toString() on all child qualifiers (implicitly by using .join()).
|
|
731
|
+
* @return {string}
|
|
732
|
+
*/
|
|
733
|
+
toString() {
|
|
734
|
+
return this.prepareQualifiers(), Ci(this.qualifiers, this.flags).join(this.delimiter);
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* @description Adds the parameter to the action.
|
|
738
|
+
* @param {SDK.Qualifier} qualifier
|
|
739
|
+
* @return {this}
|
|
740
|
+
*/
|
|
741
|
+
addQualifier(e) {
|
|
742
|
+
if (typeof e == "string") {
|
|
743
|
+
const [r, o] = e.toLowerCase().split("_");
|
|
744
|
+
r === "fl" ? this.flags.push(new B(o)) : this.qualifiers.set(r, new w(r, o));
|
|
745
|
+
} else
|
|
746
|
+
this.qualifiers.set(e.key, e);
|
|
747
|
+
return this;
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* @description Adds a flag to the current action.
|
|
751
|
+
* @param {Qualifiers.Flag} flag
|
|
752
|
+
* @return {this}
|
|
753
|
+
*/
|
|
754
|
+
addFlag(e) {
|
|
755
|
+
return typeof e == "string" ? this.flags.push(new B(e)) : e instanceof B && this.flags.push(e), this;
|
|
756
|
+
}
|
|
757
|
+
addValueToQualifier(e, r) {
|
|
758
|
+
return this.qualifiers.get(e).addValue(r), this;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
class Lr extends U {
|
|
762
|
+
constructor(e) {
|
|
763
|
+
super(), this.regionType = e, this._actionModel.regionType = e;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
class Vt extends Lr {
|
|
767
|
+
constructor() {
|
|
768
|
+
super("custom");
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* @description The x position in pixels.
|
|
772
|
+
* @param {number | string} x
|
|
773
|
+
*/
|
|
774
|
+
x(e) {
|
|
775
|
+
return this._actionModel.x = e, this.addQualifier(new w("x", e)), this;
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* @description The y position in pixels.
|
|
779
|
+
* @param {number | string} y
|
|
780
|
+
*/
|
|
781
|
+
y(e) {
|
|
782
|
+
return this._actionModel.y = e, this.addQualifier(new w("y", e)), this;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* @description The width of the region in pixels.
|
|
786
|
+
* @param {number | string} width
|
|
787
|
+
*/
|
|
788
|
+
width(e) {
|
|
789
|
+
return this._actionModel.width = e, this.addQualifier(new w("w", e)), this;
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* @description The height of the region in pixels.
|
|
793
|
+
* @param {number | string} height
|
|
794
|
+
*/
|
|
795
|
+
height(e) {
|
|
796
|
+
return this._actionModel.height = e, this.addQualifier(new w("h", e)), this;
|
|
797
|
+
}
|
|
798
|
+
static fromJson(e) {
|
|
799
|
+
const r = new Vt();
|
|
800
|
+
return e.width && r.width(e.width), e.height && r.height(e.height), e.x && r.x(e.x), e.y && r.y(e.y), r;
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
function Pi() {
|
|
804
|
+
return new Vt();
|
|
805
|
+
}
|
|
806
|
+
function yn() {
|
|
807
|
+
return new Lr("faces");
|
|
808
|
+
}
|
|
809
|
+
function ji() {
|
|
810
|
+
return new Lr("ocr_text");
|
|
811
|
+
}
|
|
812
|
+
class Mi extends U {
|
|
813
|
+
constructor(e) {
|
|
814
|
+
super(), this._actionModel = {}, this._strength = e, this._actionModel.actionType = "blur", this._actionModel.strength = e;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* @description Specifies the region to blur.
|
|
818
|
+
* @param {NamedRegion} blurRegion
|
|
819
|
+
*/
|
|
820
|
+
region(e) {
|
|
821
|
+
return this._region = e, this._actionModel.region = e.toJson(), this;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* @description Sets the strength of the blur effect.
|
|
825
|
+
* @param {number | string} strength
|
|
826
|
+
*/
|
|
827
|
+
strength(e) {
|
|
828
|
+
return this._strength = e, this._actionModel.strength = e, this;
|
|
829
|
+
}
|
|
830
|
+
prepareQualifiers() {
|
|
831
|
+
const e = this._strength ? `:${this._strength}` : "";
|
|
832
|
+
"_region" in this ? (this._region.qualifiers.forEach((o) => this.addQualifier(o)), this._region.regionType === "custom" && this.addQualifier(new w("e", `blur_region${e}`)), this._region.regionType === "ocr_text" && (this.addQualifier(new w("e", `blur_region${e}`)), this.addQualifier(new w("g", "ocr_text"))), this._region.regionType === "faces" && this.addQualifier(new w("e", `blur_faces${e}`))) : this.addQualifier(new w("e", `blur${e}`));
|
|
833
|
+
}
|
|
834
|
+
static fromJson(e) {
|
|
835
|
+
const { strength: r, region: o } = e, s = new this(r);
|
|
836
|
+
return r && s.strength(r), o && o.regionType === "faces" && s.region(yn()), o && o.regionType === "ocr_text" && s.region(ji()), o && o.regionType === "custom" && s.region(Vt.fromJson(o)), s;
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
function ye(t) {
|
|
840
|
+
const e = {};
|
|
841
|
+
return Object.keys(t).forEach((r) => {
|
|
842
|
+
e[t[r]] = r;
|
|
843
|
+
}), e;
|
|
844
|
+
}
|
|
845
|
+
const vn = {
|
|
846
|
+
limitFit: "limit",
|
|
847
|
+
limitFill: "lfill",
|
|
848
|
+
minimumFit: "mfit",
|
|
849
|
+
thumbnail: "thumb",
|
|
850
|
+
limitPad: "lpad",
|
|
851
|
+
minimumPad: "mpad",
|
|
852
|
+
autoPad: "auto_pad"
|
|
853
|
+
}, $i = {
|
|
854
|
+
colorSpace: "cs",
|
|
855
|
+
dpr: "dpr",
|
|
856
|
+
density: "dn",
|
|
857
|
+
defaultImage: "d",
|
|
858
|
+
format: "f",
|
|
859
|
+
quality: "q"
|
|
860
|
+
}, mn = {
|
|
861
|
+
redEye: "redeye",
|
|
862
|
+
advancedRedEye: "adv_redeye",
|
|
863
|
+
oilPaint: "oil_paint",
|
|
864
|
+
unsharpMask: "unsharp_mask",
|
|
865
|
+
makeTransparent: "make_transparent",
|
|
866
|
+
generativeRestore: "gen_restore",
|
|
867
|
+
upscale: "upscale"
|
|
868
|
+
}, _n = {
|
|
869
|
+
autoBest: "auto:best",
|
|
870
|
+
autoEco: "auto:eco",
|
|
871
|
+
autoGood: "auto:good",
|
|
872
|
+
autoLow: "auto:low",
|
|
873
|
+
jpegminiHigh: "jpegmini:1",
|
|
874
|
+
jpegminiMedium: "jpegmini:2",
|
|
875
|
+
jpegminiBest: "jpegmini:0"
|
|
876
|
+
}, ki = {
|
|
877
|
+
fullHd: "full_hd",
|
|
878
|
+
fullHdWifi: "full_hd_wifi",
|
|
879
|
+
fullHdLean: "full_hd_lean",
|
|
880
|
+
hdLean: "hd_lean"
|
|
881
|
+
}, bn = {
|
|
882
|
+
444: "CHROMA_444",
|
|
883
|
+
420: "CHROMA_420"
|
|
884
|
+
}, Ii = {
|
|
885
|
+
noCmyk: "no_cmyk",
|
|
886
|
+
keepCmyk: "keep_cmyk",
|
|
887
|
+
tinySrgb: "tinysrgb",
|
|
888
|
+
srgbTrueColor: "srgb:truecolor"
|
|
889
|
+
}, Li = ye(bn);
|
|
890
|
+
ye(Ii);
|
|
891
|
+
const Fi = ye(vn), Vi = ye($i), wn = ye(mn);
|
|
892
|
+
ye(_n);
|
|
893
|
+
ye(ki);
|
|
894
|
+
class En extends U {
|
|
895
|
+
constructor(e, r) {
|
|
896
|
+
super(), this._actionModel = {}, this._actionModel.actionType = wn[e] || e;
|
|
897
|
+
const o = this.createEffectQualifier(e, r);
|
|
898
|
+
this.addQualifier(o);
|
|
899
|
+
}
|
|
900
|
+
createEffectQualifier(e, r) {
|
|
901
|
+
let o;
|
|
902
|
+
return r ? o = new R([e, `${r}`]).setDelimiter(":") : o = new R(e), new w("e", o);
|
|
903
|
+
}
|
|
904
|
+
static fromJson(e) {
|
|
905
|
+
const { actionType: r, level: o, strength: s } = e, u = mn[r] || r;
|
|
906
|
+
return new this(u, o || s);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
class Di extends En {
|
|
910
|
+
constructor(e, r) {
|
|
911
|
+
super(e, r), this.LEVEL_NAME = "level", this._actionModel = {}, this.effectType = e, this._actionModel.actionType = wn[e] || e, r && this.setLevel(r);
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
*
|
|
915
|
+
* @description Sets the effect level for the action
|
|
916
|
+
* @param {string | number} level - The strength of the effect
|
|
917
|
+
* @protected
|
|
918
|
+
*/
|
|
919
|
+
setLevel(e) {
|
|
920
|
+
this._actionModel[this.LEVEL_NAME] = e;
|
|
921
|
+
const r = this.createEffectQualifier(this.effectType, e);
|
|
922
|
+
return this.addQualifier(r), this;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
function Dt(t) {
|
|
926
|
+
return t && (t.match(/^#/) ? `rgb:${t.substr(1)}` : t);
|
|
927
|
+
}
|
|
928
|
+
class Ni extends U {
|
|
929
|
+
constructor() {
|
|
930
|
+
super(), this._actionModel = {}, this._actionModel.actionType = "vectorize";
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* @description The number of colors. (Range: 2 to 30, Server default: 10)
|
|
934
|
+
* @param {number | string} num
|
|
935
|
+
* @return {this}
|
|
936
|
+
*/
|
|
937
|
+
numOfColors(e) {
|
|
938
|
+
return this._actionModel.numOfColors = e, this._numOfColors = e, this;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* @description The level of detail. Specify either a percentage of the original image (Range: 0.0 to 1.0) or an absolute number of pixels (Range: 0 to 1000). (Server default: 300)
|
|
942
|
+
* @param {number | string} num
|
|
943
|
+
* @return {this}
|
|
944
|
+
*/
|
|
945
|
+
detailsLevel(e) {
|
|
946
|
+
return this._actionModel.detailLevel = e, this._detailsLevel = e, this;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* @description The size of speckles to suppress. Specify either a percentage of the original image (Range: 0.0 to 1.0) or an absolute number of pixels (Range: 0 to 100, Server default: 2)
|
|
950
|
+
* @param {number | string} num
|
|
951
|
+
* @return {this}
|
|
952
|
+
*/
|
|
953
|
+
despeckleLevel(e) {
|
|
954
|
+
return this._actionModel.despeckleLevel = e, this._despeckleLevel = e, this;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* @description The corner threshold. Specify 100 for no smoothing (polygon corners), 0 for completely smooth corners. (Range: 0 to 100, Default: 25)
|
|
958
|
+
* @param {number | string} num
|
|
959
|
+
* @return {this}
|
|
960
|
+
*/
|
|
961
|
+
cornersLevel(e) {
|
|
962
|
+
return this._actionModel.cornersLevel = e, this._cornersLevel = e, this;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* @description The optimization value. Specify 100 for least optimization and the largest file. (Range: 0 to 100, Server default: 100).
|
|
966
|
+
* @param {number} num
|
|
967
|
+
* @return {this}
|
|
968
|
+
*/
|
|
969
|
+
paths(e) {
|
|
970
|
+
return this._actionModel.paths = e, this._paths = e, this;
|
|
971
|
+
}
|
|
972
|
+
prepareQualifiers() {
|
|
973
|
+
let e = "vectorize";
|
|
974
|
+
this._numOfColors && (e += `:${new R(`colors:${this._numOfColors}`).toString()}`), this._detailsLevel && (e += `:${new R(`detail:${this._detailsLevel}`).toString()}`), this._despeckleLevel && (e += `:${new R(`despeckle:${this._despeckleLevel}`).toString()}`), this._paths && (e += `:${new R(`paths:${this._paths}`).toString()}`), this._cornersLevel && (e += `:${new R(`corners:${this._cornersLevel}`).toString()}`), this.addQualifier(new w("e", e));
|
|
975
|
+
}
|
|
976
|
+
static fromJson(e) {
|
|
977
|
+
const { actionType: r, paths: o, cornersLevel: s, despeckleLevel: u, detailLevel: p, numOfColors: h } = e, m = new this();
|
|
978
|
+
return o && m.paths(o), s && m.cornersLevel(s), u && m.despeckleLevel(u), p && m.detailsLevel(p), h && m.numOfColors(h), m;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
class Bi extends Di {
|
|
982
|
+
level(e) {
|
|
983
|
+
return this._actionModel.level = e, this.setLevel(e);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
class Ui extends U {
|
|
987
|
+
constructor() {
|
|
988
|
+
super(), this._actionModel = {}, this._actionModel.actionType = "assistColorblind", this.addQualifier(new w("e", new R("assist_colorblind")));
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* @description Replaces problematic colors with colors that are easier to differentiate.
|
|
992
|
+
* @return {this}
|
|
993
|
+
*/
|
|
994
|
+
xray() {
|
|
995
|
+
return this._actionModel.type = "xray", this.addQualifier(new w("e", new R(["assist_colorblind", "xray"]).setDelimiter(":")));
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* @description Applies stripes of the specified intensity to help people with common color blind conditions to differentiate between colors that are similar for them.
|
|
999
|
+
* @param {number | string} strength The intensity of the stripes. (Range: 1 to 100, Server default: 10)
|
|
1000
|
+
* @return {this}
|
|
1001
|
+
*/
|
|
1002
|
+
stripesStrength(e) {
|
|
1003
|
+
return this._actionModel.type = "stripes", this._actionModel.stripesStrength = e, this.addQualifier(new w("e", new R(["assist_colorblind", e]).setDelimiter(":")));
|
|
1004
|
+
}
|
|
1005
|
+
static fromJson(e) {
|
|
1006
|
+
const { actionType: r, type: o, stripesStrength: s } = e, u = new this();
|
|
1007
|
+
return o === "xray" && u.xray(), o === "stripes" && s && u.stripesStrength(s), u;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
class Qi extends Bi {
|
|
1011
|
+
/**
|
|
1012
|
+
* @description The color to use for colorization. Specify HTML name or RGB hex code. (Server default: gray)
|
|
1013
|
+
* @param {string} color HTML name(red, green, etc.) or RGB hex code. (Server default: gray)
|
|
1014
|
+
* @return {this}
|
|
1015
|
+
*/
|
|
1016
|
+
color(e) {
|
|
1017
|
+
return this._actionModel.color = e, this.addQualifier(new w("co", new R(Dt(e))));
|
|
1018
|
+
}
|
|
1019
|
+
static fromJson(e) {
|
|
1020
|
+
const { actionType: r, level: o, color: s } = e, u = new this(r, o);
|
|
1021
|
+
return s && u.color(s), u;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
class Gi extends U {
|
|
1025
|
+
constructor(e) {
|
|
1026
|
+
super(), this._actionModel = {}, this._squareSize = e, this._actionModel.actionType = "pixelate", this._actionModel.squareSize = e;
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* @description Specifies the region to piexlate.
|
|
1030
|
+
* @param {NamedRegion} pixelateRegion
|
|
1031
|
+
*/
|
|
1032
|
+
region(e) {
|
|
1033
|
+
return this._region = e, this._actionModel.region = { regionType: this._region.regionType }, this;
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* @description Sets the squareSize of the pixelate effect.
|
|
1037
|
+
* @param {number | string} squareSize
|
|
1038
|
+
*/
|
|
1039
|
+
squareSize(e) {
|
|
1040
|
+
return this._squareSize = e, this._actionModel.squareSize = e, this;
|
|
1041
|
+
}
|
|
1042
|
+
prepareQualifiers() {
|
|
1043
|
+
const e = this._squareSize ? `:${this._squareSize}` : "";
|
|
1044
|
+
"_region" in this ? (this._region.qualifiers.forEach((o) => this.addQualifier(o)), this._region.regionType === "custom" && this.addQualifier(new w("e", `pixelate_region${e}`)), this._region.regionType === "ocr_text" && (this.addQualifier(new w("e", `pixelate_region${e}`)), this.addQualifier(new w("g", "ocr_text"))), this._region.regionType === "faces" && this.addQualifier(new w("e", `pixelate_faces${e}`))) : this.addQualifier(new w("e", `pixelate${e}`));
|
|
1045
|
+
}
|
|
1046
|
+
static fromJson(e) {
|
|
1047
|
+
const { region: r, squareSize: o } = e, s = new this(o);
|
|
1048
|
+
return o && s.squareSize(o), r && r.regionType === "faces" && s.region(yn()), r && r.regionType === "custom" && s.region(Pi()), s;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
function qi(t) {
|
|
1052
|
+
return new Mi(t);
|
|
1053
|
+
}
|
|
1054
|
+
function zi() {
|
|
1055
|
+
return new En("grayscale");
|
|
1056
|
+
}
|
|
1057
|
+
function on(t) {
|
|
1058
|
+
return new Qi("colorize", t);
|
|
1059
|
+
}
|
|
1060
|
+
function Yi() {
|
|
1061
|
+
return new Ni();
|
|
1062
|
+
}
|
|
1063
|
+
function Wi() {
|
|
1064
|
+
return new Ui();
|
|
1065
|
+
}
|
|
1066
|
+
function Hi(t) {
|
|
1067
|
+
return new Gi(t);
|
|
1068
|
+
}
|
|
1069
|
+
class Ji extends U {
|
|
1070
|
+
constructor(e) {
|
|
1071
|
+
super(), this._actionModel = {}, this.addQualifier(new w("b", new R(Dt(e)).setDelimiter("_"))), this._actionModel.color = e, this._actionModel.actionType = "backgroundColor";
|
|
1072
|
+
}
|
|
1073
|
+
static fromJson(e) {
|
|
1074
|
+
const { color: r } = e;
|
|
1075
|
+
return new this(r);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
class an {
|
|
1079
|
+
constructor(e) {
|
|
1080
|
+
this.raw = e;
|
|
1081
|
+
}
|
|
1082
|
+
toString() {
|
|
1083
|
+
return this.raw;
|
|
1084
|
+
}
|
|
1085
|
+
toJson() {
|
|
1086
|
+
return { error: Ir(`unsupported action ${this.constructor.name}`) };
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
function Ki(t) {
|
|
1090
|
+
const e = t;
|
|
1091
|
+
return "error" in e && !!e.error;
|
|
1092
|
+
}
|
|
1093
|
+
function Xi() {
|
|
1094
|
+
return new B("ignore_aspect_ratio");
|
|
1095
|
+
}
|
|
1096
|
+
function Zi() {
|
|
1097
|
+
return new B("lossy");
|
|
1098
|
+
}
|
|
1099
|
+
function eo() {
|
|
1100
|
+
return new B("preserve_transparency");
|
|
1101
|
+
}
|
|
1102
|
+
function to(t) {
|
|
1103
|
+
return new B("progressive", t);
|
|
1104
|
+
}
|
|
1105
|
+
function ro() {
|
|
1106
|
+
return new B("region_relative");
|
|
1107
|
+
}
|
|
1108
|
+
function no() {
|
|
1109
|
+
return new B("relative");
|
|
1110
|
+
}
|
|
1111
|
+
class Fr extends R {
|
|
1112
|
+
constructor(e) {
|
|
1113
|
+
super(e), this.val = e;
|
|
1114
|
+
}
|
|
1115
|
+
getValue() {
|
|
1116
|
+
return this.val;
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
class On extends U {
|
|
1120
|
+
/**
|
|
1121
|
+
* @param {string} deliveryKey A generic Delivery Action Key (such as q, f, dn, etc.)
|
|
1122
|
+
* @param {string} deliveryType A Format Qualifiers for the action, such as Quality.auto()
|
|
1123
|
+
* @param {string} modelProperty internal model property of the action, for example quality uses `level` while dpr uses `density`
|
|
1124
|
+
* @see Visit {@link Actions.Delivery|Delivery} for an example
|
|
1125
|
+
*/
|
|
1126
|
+
constructor(e, r, o) {
|
|
1127
|
+
super(), this._actionModel = {};
|
|
1128
|
+
let s;
|
|
1129
|
+
r instanceof Fr ? s = r.getValue() : s = r, this._actionModel.actionType = Vi[e], this._actionModel[o] = s, this.addQualifier(new w(e, r));
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
class io extends B {
|
|
1133
|
+
constructor(e) {
|
|
1134
|
+
super("progressive", e);
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
class Rr extends On {
|
|
1138
|
+
constructor(e, r) {
|
|
1139
|
+
super(e, r, "formatType");
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* @description Uses lossy compression when delivering animated GIF files.
|
|
1143
|
+
* @return {this}
|
|
1144
|
+
*/
|
|
1145
|
+
lossy() {
|
|
1146
|
+
return this._actionModel.lossy = !0, this.addFlag(Zi()), this;
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* @description Uses progressive compression when delivering JPG file format.
|
|
1150
|
+
* @return {this}
|
|
1151
|
+
*/
|
|
1152
|
+
progressive(e) {
|
|
1153
|
+
return e instanceof io ? (this._actionModel.progressive = { mode: e.getFlagValue() }, this.addFlag(e)) : (this._actionModel.progressive = { mode: e }, this.addFlag(to(e))), this;
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* @description Ensures that images with a transparency channel are delivered in PNG format.
|
|
1157
|
+
*/
|
|
1158
|
+
preserveTransparency() {
|
|
1159
|
+
return this._actionModel.preserveTransparency = !0, this.addFlag(eo()), this;
|
|
1160
|
+
}
|
|
1161
|
+
static fromJson(e) {
|
|
1162
|
+
const { formatType: r, lossy: o, progressive: s, preserveTransparency: u } = e;
|
|
1163
|
+
let p;
|
|
1164
|
+
return r ? p = new this("f", r) : p = new this("f"), s && (s.mode ? p.progressive(s.mode) : p.progressive()), o && p.lossy(), u && p.preserveTransparency(), p;
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
class ke {
|
|
1168
|
+
constructor() {
|
|
1169
|
+
this.actions = [];
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* @param {SDK.Action | string} action
|
|
1173
|
+
* @return {this}
|
|
1174
|
+
*/
|
|
1175
|
+
addAction(e) {
|
|
1176
|
+
let r;
|
|
1177
|
+
if (typeof e == "string") {
|
|
1178
|
+
if (e.indexOf("/") >= 0)
|
|
1179
|
+
throw "addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead";
|
|
1180
|
+
r = new an(e);
|
|
1181
|
+
} else
|
|
1182
|
+
r = e;
|
|
1183
|
+
return this.actions.push(r), this;
|
|
1184
|
+
}
|
|
1185
|
+
/**
|
|
1186
|
+
* @description Allows the injection of a raw transformation as a string into the transformation, or a Transformation instance that was previously created
|
|
1187
|
+
* @param {string | SDK.Transformation} tx
|
|
1188
|
+
* @example
|
|
1189
|
+
* import {Transformation} from "@cloudinary/url-gen";
|
|
1190
|
+
*
|
|
1191
|
+
* const transformation = new Transformation();
|
|
1192
|
+
* transformation.addTransformation('w_100/w_200/w_300');
|
|
1193
|
+
* @return {this}
|
|
1194
|
+
*/
|
|
1195
|
+
addTransformation(e) {
|
|
1196
|
+
return e instanceof ke ? this.actions = this.actions.concat(e.actions) : this.actions.push(new an(e)), this;
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* @return {string}
|
|
1200
|
+
*/
|
|
1201
|
+
toString() {
|
|
1202
|
+
return this.actions.map((e) => e.toString()).filter((e) => e).join("/");
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* @description Delivers an animated GIF.
|
|
1206
|
+
* @param {AnimatedAction} animatedAction
|
|
1207
|
+
* @return {this}
|
|
1208
|
+
*/
|
|
1209
|
+
animated(e) {
|
|
1210
|
+
return this.addAction(e);
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* @description Adds a border around the image.
|
|
1214
|
+
* @param {Border} borderAction
|
|
1215
|
+
* @return {this}
|
|
1216
|
+
*/
|
|
1217
|
+
border(e) {
|
|
1218
|
+
return this.addAction(e);
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
* @description Adjusts the shape of the delivered image. </br>
|
|
1222
|
+
* <b>Learn more:</b> {@link https://cloudinary.com/documentation/effects_and_artistic_enhancements#distort|Shape changes and distortion effects}
|
|
1223
|
+
* @param {IReshape} reshapeAction
|
|
1224
|
+
* @return {this}
|
|
1225
|
+
*/
|
|
1226
|
+
reshape(e) {
|
|
1227
|
+
return this.addAction(e);
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* @description Resize the asset using provided resize action
|
|
1231
|
+
* @param {ResizeSimpleAction} resizeAction
|
|
1232
|
+
* @return {this}
|
|
1233
|
+
*/
|
|
1234
|
+
resize(e) {
|
|
1235
|
+
return this.addAction(e);
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* @desc An alias to Action Delivery.quality
|
|
1239
|
+
* @param {string|number} quality
|
|
1240
|
+
* @return {this}
|
|
1241
|
+
*/
|
|
1242
|
+
quality(e) {
|
|
1243
|
+
return this.addAction(new Rr("q", e)), this;
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* @desc An alias to Action Delivery.format
|
|
1247
|
+
* @param {string} format
|
|
1248
|
+
* @return {this}
|
|
1249
|
+
*/
|
|
1250
|
+
format(e) {
|
|
1251
|
+
return this.addAction(new Rr("f", e)), this;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* @description Rounds the specified corners of an image.
|
|
1255
|
+
* @param roundCornersAction
|
|
1256
|
+
* @return {this}
|
|
1257
|
+
*/
|
|
1258
|
+
roundCorners(e) {
|
|
1259
|
+
return this.addAction(e);
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* @description Adds an overlay over the base image.
|
|
1263
|
+
* @param {LayerAction} overlayAction
|
|
1264
|
+
* @return {this}
|
|
1265
|
+
*/
|
|
1266
|
+
overlay(e) {
|
|
1267
|
+
return this.addAction(e);
|
|
1268
|
+
}
|
|
1269
|
+
/**
|
|
1270
|
+
* @description Adds an underlay under the base image.
|
|
1271
|
+
* @param {LayerAction} underlayAction
|
|
1272
|
+
* @return {this}
|
|
1273
|
+
*/
|
|
1274
|
+
underlay(e) {
|
|
1275
|
+
return e.setLayerType("u"), this.addAction(e);
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* @description Defines an new user variable.
|
|
1279
|
+
* @param {VariableAction} variableAction
|
|
1280
|
+
* @return {this}
|
|
1281
|
+
*/
|
|
1282
|
+
addVariable(e) {
|
|
1283
|
+
return this.addAction(e);
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* @description Specifies a condition to be met before applying a transformation.
|
|
1287
|
+
* @param {ConditionalAction} conditionAction
|
|
1288
|
+
* @return {this}
|
|
1289
|
+
*/
|
|
1290
|
+
conditional(e) {
|
|
1291
|
+
return this.addAction(e);
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* @description Applies a filter or an effect on an asset.
|
|
1295
|
+
* @param {SimpleEffectAction} effectAction
|
|
1296
|
+
* @return {this}
|
|
1297
|
+
*/
|
|
1298
|
+
effect(e) {
|
|
1299
|
+
return this.addAction(e);
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* @description Applies adjustment effect on an asset.
|
|
1303
|
+
* @param action
|
|
1304
|
+
* @return {this}
|
|
1305
|
+
*/
|
|
1306
|
+
adjust(e) {
|
|
1307
|
+
return this.addAction(e);
|
|
1308
|
+
}
|
|
1309
|
+
/**
|
|
1310
|
+
* @description Rotates the asset by the given angle.
|
|
1311
|
+
* @param {RotateAction} rotateAction
|
|
1312
|
+
* @return {this}
|
|
1313
|
+
*/
|
|
1314
|
+
rotate(e) {
|
|
1315
|
+
return this.addAction(e);
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* @description Applies a pre-defined named transformation of the given name.
|
|
1319
|
+
* @param {NamedTransformation} namedTransformation
|
|
1320
|
+
* @return {this}
|
|
1321
|
+
*/
|
|
1322
|
+
namedTransformation(e) {
|
|
1323
|
+
return this.addAction(e);
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* @description Applies delivery action.
|
|
1327
|
+
* @param deliveryAction
|
|
1328
|
+
* @return {this}
|
|
1329
|
+
*/
|
|
1330
|
+
delivery(e) {
|
|
1331
|
+
return this.addAction(e);
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* @description Sets the color of the background.
|
|
1335
|
+
* @param {Qualifiers.Color} color
|
|
1336
|
+
* @return {this}
|
|
1337
|
+
*/
|
|
1338
|
+
backgroundColor(e) {
|
|
1339
|
+
return this.addAction(new Ji(e));
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
* @description Adds a layer in a Photoshop document.
|
|
1343
|
+
* @param action
|
|
1344
|
+
* @return {this}
|
|
1345
|
+
*/
|
|
1346
|
+
psdTools(e) {
|
|
1347
|
+
return this.addAction(e);
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* @description Extracts an image or a page using an index, a range, or a name from a layered media asset.
|
|
1351
|
+
* @param action
|
|
1352
|
+
* @return {this}
|
|
1353
|
+
*/
|
|
1354
|
+
extract(e) {
|
|
1355
|
+
return this.addAction(e);
|
|
1356
|
+
}
|
|
1357
|
+
/**
|
|
1358
|
+
* @description Adds a flag as a separate action.
|
|
1359
|
+
* @param {Qualifiers.Flag | string} flagQualifier
|
|
1360
|
+
* @return {this}
|
|
1361
|
+
*/
|
|
1362
|
+
addFlag(e) {
|
|
1363
|
+
const r = new U();
|
|
1364
|
+
let o = e;
|
|
1365
|
+
return typeof e == "string" && (o = new B(e)), r.addQualifier(o), this.addAction(r);
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* @description Inject a custom function into the image transformation pipeline.
|
|
1369
|
+
* @return {this}
|
|
1370
|
+
*/
|
|
1371
|
+
customFunction(e) {
|
|
1372
|
+
return this.addAction(e);
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Transcodes the video (or audio) to another format.
|
|
1376
|
+
* @param {Action} action
|
|
1377
|
+
* @return {this}
|
|
1378
|
+
*/
|
|
1379
|
+
transcode(e) {
|
|
1380
|
+
return this.addAction(e);
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Applies the specified video edit action.
|
|
1384
|
+
*
|
|
1385
|
+
* @param {videoEditType} action
|
|
1386
|
+
* @return {this}
|
|
1387
|
+
*/
|
|
1388
|
+
videoEdit(e) {
|
|
1389
|
+
return this.addAction(e);
|
|
1390
|
+
}
|
|
1391
|
+
toJson() {
|
|
1392
|
+
const e = [];
|
|
1393
|
+
for (const r of this.actions) {
|
|
1394
|
+
const o = r.toJson();
|
|
1395
|
+
if (Ki(o))
|
|
1396
|
+
return o;
|
|
1397
|
+
e.push(o);
|
|
1398
|
+
}
|
|
1399
|
+
return { actions: e };
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
function sn(t) {
|
|
1403
|
+
const e = t.toString();
|
|
1404
|
+
return e.match(/[A-Z]/gi) || e.length > 1 && e[0] === "0" ? e : !isNaN(parseFloat(e)) && e.indexOf(":") === -1 && e.indexOf(".") === -1 ? `${e}.0` : e;
|
|
1405
|
+
}
|
|
1406
|
+
class oo extends R {
|
|
1407
|
+
}
|
|
1408
|
+
class ao extends U {
|
|
1409
|
+
/**
|
|
1410
|
+
* @param {string} cropType
|
|
1411
|
+
* @param {number | string} cropWidth The required width of a transformed asset.
|
|
1412
|
+
* @param {number | string} cropHeight The required height of a transformed asset.
|
|
1413
|
+
*/
|
|
1414
|
+
constructor(e, r, o) {
|
|
1415
|
+
super(), this._actionModel = { dimensions: {} }, this._actionModel.actionType = Fi[e] || e, this.addQualifier(new w("c", e)), r && this.width(r), o && this.height(o);
|
|
1416
|
+
}
|
|
1417
|
+
/**
|
|
1418
|
+
* @description Sets the height of the resize
|
|
1419
|
+
* @param {string | number} x The height in pixels (if an integer is specified) or as a percentage (if a float is specified).
|
|
1420
|
+
*/
|
|
1421
|
+
height(e) {
|
|
1422
|
+
return this._actionModel.dimensions.height = e, this.addQualifier(new w("h", e));
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* @description Sets the width of the resize
|
|
1426
|
+
* @param {string | number} x The width in pixels (if an integer is specified) or as a percentage (if a float is specified).
|
|
1427
|
+
*/
|
|
1428
|
+
width(e) {
|
|
1429
|
+
return this._actionModel.dimensions.width = e, this.addQualifier(new w("w", e));
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* @description Sets the aspect ratio of the asset.
|
|
1433
|
+
* For a list of supported types see {@link Qualifiers.AspectRatio|
|
|
1434
|
+
* AspectRatio values}
|
|
1435
|
+
* @param {AspectRatioType|number|string} ratio The new aspect ratio, specified as a percentage or ratio.
|
|
1436
|
+
* @return {this}
|
|
1437
|
+
*/
|
|
1438
|
+
aspectRatio(e) {
|
|
1439
|
+
if (e instanceof oo)
|
|
1440
|
+
return this._actionModel.dimensions.aspectRatio = `${e}`, this.addQualifier(new w("ar", e));
|
|
1441
|
+
if (typeof e == "number" || typeof e == "string")
|
|
1442
|
+
return this._actionModel.dimensions.aspectRatio = sn(e), this.addQualifier(new w("ar", sn(e)));
|
|
1443
|
+
if (e instanceof B)
|
|
1444
|
+
return this._actionModel.dimensions.aspectRatio = `${e.qualifierValue}`, this.addFlag(e);
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the containing image instead of the added layer.
|
|
1448
|
+
* @return {this}
|
|
1449
|
+
*/
|
|
1450
|
+
relative() {
|
|
1451
|
+
return this._actionModel.relative = !0, this.addFlag(no());
|
|
1452
|
+
}
|
|
1453
|
+
/**
|
|
1454
|
+
* @description Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region
|
|
1455
|
+
* @return {this}
|
|
1456
|
+
*/
|
|
1457
|
+
regionRelative() {
|
|
1458
|
+
return this._actionModel.regionRelative = !0, this.addFlag(ro());
|
|
1459
|
+
}
|
|
1460
|
+
static fromJson(e) {
|
|
1461
|
+
const { actionType: r, dimensions: o, relative: s, regionRelative: u } = e, { aspectRatio: p, width: h, height: m } = o, g = vn[r] || r, O = new this(g, h, m);
|
|
1462
|
+
return p && O.aspectRatio(p === "ignore_aspect_ratio" ? Xi() : p), s && O.relative(), u && O.regionRelative(), O;
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
class Vr extends w {
|
|
1466
|
+
/**
|
|
1467
|
+
* @param value, an array containing (GravityObject | AutoGravity | string) or a string;
|
|
1468
|
+
*/
|
|
1469
|
+
constructor(e) {
|
|
1470
|
+
super("g", new R(e));
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
class An extends Vr {
|
|
1474
|
+
constructor() {
|
|
1475
|
+
super("auto");
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* @description Autofocuses on objects, allowing their priority within the algorithm to be configured.
|
|
1479
|
+
* @param {AutoFocus} AutoFocusObjects
|
|
1480
|
+
*/
|
|
1481
|
+
autoFocus(...e) {
|
|
1482
|
+
return this.addValue(e), this;
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
class Sn extends Vr {
|
|
1486
|
+
constructor(e) {
|
|
1487
|
+
super(e);
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* @description Specifies the gravity to use if none of the other gravity objects are found.
|
|
1491
|
+
* @param {Qualifiers.Gravity.AutoGravity} val
|
|
1492
|
+
*/
|
|
1493
|
+
fallbackGravity(e) {
|
|
1494
|
+
return this.addValue(e.qualifierValue), this;
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
class Tn extends Vr {
|
|
1498
|
+
constructor(e) {
|
|
1499
|
+
super(e);
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
function so(t) {
|
|
1503
|
+
return new Tn(t);
|
|
1504
|
+
}
|
|
1505
|
+
function Cn(...t) {
|
|
1506
|
+
const e = [...t];
|
|
1507
|
+
return new Sn(e);
|
|
1508
|
+
}
|
|
1509
|
+
function Rn() {
|
|
1510
|
+
return new An();
|
|
1511
|
+
}
|
|
1512
|
+
class $e extends R {
|
|
1513
|
+
constructor(e) {
|
|
1514
|
+
super(), this.name = e;
|
|
1515
|
+
}
|
|
1516
|
+
toString() {
|
|
1517
|
+
return this.name;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
function uo() {
|
|
1521
|
+
return new $e("ocr_text");
|
|
1522
|
+
}
|
|
1523
|
+
function co(t) {
|
|
1524
|
+
return t && `${t}`.split(":")[0] === "auto";
|
|
1525
|
+
}
|
|
1526
|
+
function lo(t) {
|
|
1527
|
+
const e = Dr(t);
|
|
1528
|
+
return ["north", "center", "east", "west", "south", "north_west", "south_east", "south_west", "north_east"].includes(e);
|
|
1529
|
+
}
|
|
1530
|
+
function Dr(t) {
|
|
1531
|
+
return `${t}`.replace("g_", "");
|
|
1532
|
+
}
|
|
1533
|
+
function fo(t) {
|
|
1534
|
+
return {
|
|
1535
|
+
compass: Dr(t),
|
|
1536
|
+
gravityType: "direction"
|
|
1537
|
+
};
|
|
1538
|
+
}
|
|
1539
|
+
function po(t) {
|
|
1540
|
+
return Dr(t) === "ocr_text";
|
|
1541
|
+
}
|
|
1542
|
+
function ho() {
|
|
1543
|
+
return {
|
|
1544
|
+
gravityType: "ocr"
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
function go(t) {
|
|
1548
|
+
return `${t.qualifierValue}`.split(":")[0] === "auto";
|
|
1549
|
+
}
|
|
1550
|
+
function yo(t) {
|
|
1551
|
+
const r = t.toString().split("_"), o = {
|
|
1552
|
+
object: r[0]
|
|
1553
|
+
};
|
|
1554
|
+
return r.length > 1 && (r[1] === "avoid" ? o.avoid = !0 : o.weight = +r[1]), o;
|
|
1555
|
+
}
|
|
1556
|
+
function xn(t) {
|
|
1557
|
+
let e;
|
|
1558
|
+
const r = t === "auto" ? new An() : t;
|
|
1559
|
+
return `${t}`.startsWith("auto:") ? e = `${t}`.split(":").filter((s) => s !== "auto") : e = r.qualifierValue.values.filter((s) => s !== "auto"), {
|
|
1560
|
+
gravityType: "auto",
|
|
1561
|
+
autoFocus: e.map(yo)
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
function vo(t) {
|
|
1565
|
+
const e = `${t}`.split(":").includes("auto"), r = t.qualifierValue.values, s = {
|
|
1566
|
+
gravityType: "object",
|
|
1567
|
+
focusOnObjects: (e ? r.slice(0, r.length - 1) : r).map((u) => `${u}`)
|
|
1568
|
+
};
|
|
1569
|
+
if (e) {
|
|
1570
|
+
const u = r[r.length - 1].values.slice(1), p = Rn().autoFocus(...u);
|
|
1571
|
+
s.fallbackGravity = xn(p);
|
|
1572
|
+
}
|
|
1573
|
+
return s;
|
|
1574
|
+
}
|
|
1575
|
+
function mo(t) {
|
|
1576
|
+
const r = t.split(":").map((o) => new $e(o));
|
|
1577
|
+
return new Sn(r);
|
|
1578
|
+
}
|
|
1579
|
+
function _o(t) {
|
|
1580
|
+
return lo(t) ? fo(t) : po(t) ? ho() : co(t) || go(t) ? xn(t) : vo(typeof t == "string" ? mo(t) : t);
|
|
1581
|
+
}
|
|
1582
|
+
class Nr extends R {
|
|
1583
|
+
constructor(e, r) {
|
|
1584
|
+
super(), this._weight = r, this.focusOn = e, this.shouldAvoid = !1;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* @summary qualifier
|
|
1588
|
+
* @description Specifies the object to focus on automatically
|
|
1589
|
+
* Accepts an AutoFocusObject (which is just a wrapper for a FocusOn object, but with extra method: avoid, weight)
|
|
1590
|
+
* @param {Qualifiers.FocusOn} obj The object to focus on.
|
|
1591
|
+
* @param {number} weight
|
|
1592
|
+
*/
|
|
1593
|
+
static focusOn(e, r) {
|
|
1594
|
+
const o = e instanceof $e ? e : new $e(e);
|
|
1595
|
+
return new Nr(o, r);
|
|
1596
|
+
}
|
|
1597
|
+
shouldAddWeight() {
|
|
1598
|
+
return typeof this._weight == "number" || typeof this._weight == "string" || this.shouldAvoid;
|
|
1599
|
+
}
|
|
1600
|
+
/**
|
|
1601
|
+
* @summary qualifier
|
|
1602
|
+
* @desc Get the name of the of the object
|
|
1603
|
+
*/
|
|
1604
|
+
getName() {
|
|
1605
|
+
return this.focusOn.name;
|
|
1606
|
+
}
|
|
1607
|
+
/**
|
|
1608
|
+
* @summary qualifier
|
|
1609
|
+
* @desc Get the weight for the object
|
|
1610
|
+
*/
|
|
1611
|
+
getWeight() {
|
|
1612
|
+
return this.shouldAvoid ? "avoid" : this._weight;
|
|
1613
|
+
}
|
|
1614
|
+
/**
|
|
1615
|
+
* @summary qualifier
|
|
1616
|
+
* @desc Return the string representation of this QualifierValue
|
|
1617
|
+
*/
|
|
1618
|
+
toString() {
|
|
1619
|
+
return this.shouldAddWeight() ? `${this.getName()}_${this.getWeight()}` : `${this.getName()}`;
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* @summary qualifier
|
|
1623
|
+
* @description Sets the importance level of the object within the automatic gravity algorithm
|
|
1624
|
+
* @param {numebr} w The focus weight for the object
|
|
1625
|
+
* @return {this}
|
|
1626
|
+
*/
|
|
1627
|
+
weight(e) {
|
|
1628
|
+
return this._weight = e, this;
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* @summary qualifier
|
|
1632
|
+
* @description Attempts to avoid the detected object in the image
|
|
1633
|
+
* @return {this}
|
|
1634
|
+
*/
|
|
1635
|
+
avoid() {
|
|
1636
|
+
return this.shouldAvoid = !0, this;
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
class Pn extends R {
|
|
1640
|
+
constructor(e) {
|
|
1641
|
+
super(), this.val = e;
|
|
1642
|
+
}
|
|
1643
|
+
toString() {
|
|
1644
|
+
return this.val;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
function bo(t) {
|
|
1648
|
+
return t.gravityType === "direction";
|
|
1649
|
+
}
|
|
1650
|
+
function wo(t) {
|
|
1651
|
+
return t.gravityType === "ocr";
|
|
1652
|
+
}
|
|
1653
|
+
function Eo(t) {
|
|
1654
|
+
return t.gravityType === "auto";
|
|
1655
|
+
}
|
|
1656
|
+
function Oo(t) {
|
|
1657
|
+
const { object: e, weight: r, avoid: o } = t, s = new Nr(new $e(e));
|
|
1658
|
+
return (r || r === 0) && s.weight(r), o && s.avoid(), s;
|
|
1659
|
+
}
|
|
1660
|
+
function jn(t) {
|
|
1661
|
+
const r = (t.autoFocus || []).map(Oo);
|
|
1662
|
+
return Rn().autoFocus(...r);
|
|
1663
|
+
}
|
|
1664
|
+
function Ao(t) {
|
|
1665
|
+
const e = (t.focusOnObjects || []).map((o) => new $e(o)), r = Cn(...e);
|
|
1666
|
+
if (t.fallbackGravity) {
|
|
1667
|
+
const o = jn(t.fallbackGravity);
|
|
1668
|
+
r.fallbackGravity(o);
|
|
1669
|
+
}
|
|
1670
|
+
return r;
|
|
1671
|
+
}
|
|
1672
|
+
function So(t) {
|
|
1673
|
+
return bo(t) ? new Tn(new Pn(t.compass)) : wo(t) ? Cn(uo()) : Eo(t) ? jn(t) : Ao(t);
|
|
1674
|
+
}
|
|
1675
|
+
class Br extends ao {
|
|
1676
|
+
/**
|
|
1677
|
+
* @description Which part of the original image to include.
|
|
1678
|
+
* @param {Qualifiers.Gravity} gravity
|
|
1679
|
+
*/
|
|
1680
|
+
gravity(e) {
|
|
1681
|
+
this._actionModel.gravity = _o(e);
|
|
1682
|
+
const r = typeof e == "string" ? new w("g", e) : e;
|
|
1683
|
+
return this.addQualifier(r);
|
|
1684
|
+
}
|
|
1685
|
+
static fromJson(e) {
|
|
1686
|
+
const r = super.fromJson.apply(this, [e]);
|
|
1687
|
+
return e.gravity && r.gravity(So(e.gravity)), r;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
class ot extends w {
|
|
1691
|
+
constructor(e) {
|
|
1692
|
+
super("b"), e && this.addValue(e);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
const Mn = 100, To = 0;
|
|
1696
|
+
class Co extends ot {
|
|
1697
|
+
/**
|
|
1698
|
+
* @description Sets the intensity of the blur.
|
|
1699
|
+
* @param {number} value - The intensity of the blur.
|
|
1700
|
+
*/
|
|
1701
|
+
intensity(e) {
|
|
1702
|
+
return this.intensityLevel = e, this;
|
|
1703
|
+
}
|
|
1704
|
+
/**
|
|
1705
|
+
* @description Sets the brightness of the background.
|
|
1706
|
+
* @param {number} value - The brightness of the background.
|
|
1707
|
+
*/
|
|
1708
|
+
brightness(e) {
|
|
1709
|
+
return this.brightnessLevel = e, this;
|
|
1710
|
+
}
|
|
1711
|
+
/**
|
|
1712
|
+
* @description
|
|
1713
|
+
* Stringify the qualifier
|
|
1714
|
+
* BackgroundQualifiers don't have a value, but instead override the toString() function
|
|
1715
|
+
*/
|
|
1716
|
+
toString() {
|
|
1717
|
+
const e = this.intensityLevel !== void 0 ? `:${this.intensityLevel}` : "", r = this.brightnessLevel !== void 0 ? this.intensityLevel !== void 0 ? `:${this.brightnessLevel}` : `:${Mn}:${this.brightnessLevel}` : "";
|
|
1718
|
+
return `b_blurred${e}${r}`;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
var $n = Co;
|
|
1722
|
+
class Ur extends ot {
|
|
1723
|
+
constructor() {
|
|
1724
|
+
super(), this._palette = [];
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* @description Selects the strongest contrasting color to use for padding.
|
|
1728
|
+
* @return {this}
|
|
1729
|
+
*/
|
|
1730
|
+
contrast() {
|
|
1731
|
+
return this._contrast = !0, this;
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1734
|
+
* @description Defines the custom colors to use when resizing using content-aware padding.
|
|
1735
|
+
* @param {...string} colors One or more colors - Example: palette('green', 'red', blue')
|
|
1736
|
+
* @return {this}
|
|
1737
|
+
*/
|
|
1738
|
+
palette(...e) {
|
|
1739
|
+
return this._palette = e.map((r) => Dt(r)), this;
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
class kn extends Ur {
|
|
1743
|
+
/**
|
|
1744
|
+
* @description
|
|
1745
|
+
* Stringify the qualifier
|
|
1746
|
+
* BackgroundQualifiers don't have a value, but instead override the toString() function.
|
|
1747
|
+
*/
|
|
1748
|
+
toString() {
|
|
1749
|
+
return `
|
|
1750
|
+
b_auto:border
|
|
1751
|
+
${this._contrast ? "_contrast" : ""}
|
|
1752
|
+
${this._palette.length ? `:palette_${this._palette.join("_")}` : ""}
|
|
1753
|
+
`.replace(/\s+/g, "");
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
class In extends Ur {
|
|
1757
|
+
/**
|
|
1758
|
+
*
|
|
1759
|
+
* @description Sets the number of predominant colors to use (2 or 4).
|
|
1760
|
+
* @param {number} num
|
|
1761
|
+
* @return {this}
|
|
1762
|
+
*/
|
|
1763
|
+
gradientColors(e) {
|
|
1764
|
+
return this._gradientColors = e, this;
|
|
1765
|
+
}
|
|
1766
|
+
/**
|
|
1767
|
+
* @description Sets the direction for a background gradient fade effect.
|
|
1768
|
+
* @param {Qualifiers.GradientDirection | GradientDirectionType | string} direction Use one of these functions
|
|
1769
|
+
* provided by {@link Qualifiers.GradientDirection|GradientDirection}
|
|
1770
|
+
* @return {this}
|
|
1771
|
+
*/
|
|
1772
|
+
gradientDirection(e) {
|
|
1773
|
+
return this._gradientDirection = e, this;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
class Ln extends In {
|
|
1777
|
+
/**
|
|
1778
|
+
* @description
|
|
1779
|
+
* Stringify the qualifier
|
|
1780
|
+
* BackgroundQualifiers don't have a value, but instead override the toString() function.
|
|
1781
|
+
*/
|
|
1782
|
+
toString() {
|
|
1783
|
+
return `
|
|
1784
|
+
b_auto:border_gradient
|
|
1785
|
+
${this._contrast ? "_contrast" : ""}
|
|
1786
|
+
${this._gradientColors ? `:${this._gradientColors}` : ""}
|
|
1787
|
+
${this._gradientDirection ? `:${this._gradientDirection}` : ""}
|
|
1788
|
+
${this._palette.length ? `:palette_${this._palette.join("_")}` : ""}
|
|
1789
|
+
`.replace(/\s+/g, "");
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
class Fn extends In {
|
|
1793
|
+
/**
|
|
1794
|
+
* @description
|
|
1795
|
+
* Stringify the qualifier
|
|
1796
|
+
* BackgroundQualifiers don't have a value, but instead override the toString() function.
|
|
1797
|
+
*/
|
|
1798
|
+
toString() {
|
|
1799
|
+
return `
|
|
1800
|
+
b_auto:predominant_gradient
|
|
1801
|
+
${this._contrast ? "_contrast" : ""}
|
|
1802
|
+
${this._gradientColors ? `:${this._gradientColors}` : ""}
|
|
1803
|
+
${this._gradientDirection ? `:${this._gradientDirection}` : ""}
|
|
1804
|
+
${this._palette.length ? `:palette_${this._palette.join("_")}` : ""}
|
|
1805
|
+
`.replace(/\s+/g, "");
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
class Vn extends Ur {
|
|
1809
|
+
/**
|
|
1810
|
+
* @description
|
|
1811
|
+
* Stringify the qualifier
|
|
1812
|
+
* BackgroundQualifiers don't have a value, but instead override the toString() function.
|
|
1813
|
+
*/
|
|
1814
|
+
toString() {
|
|
1815
|
+
return `
|
|
1816
|
+
b_auto:predominant
|
|
1817
|
+
${this._contrast ? "_contrast" : ""}
|
|
1818
|
+
${this._palette.length ? `:palette_${this._palette.join("_")}` : ""}
|
|
1819
|
+
`.replace(/\s+/g, "");
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
class Dn extends ot {
|
|
1823
|
+
constructor() {
|
|
1824
|
+
super("gen_fill"), this._backgroundType = "generativeFill";
|
|
1825
|
+
}
|
|
1826
|
+
prompt(e) {
|
|
1827
|
+
return this._prompt = e, this;
|
|
1828
|
+
}
|
|
1829
|
+
getPrompt() {
|
|
1830
|
+
return this._prompt;
|
|
1831
|
+
}
|
|
1832
|
+
getBackgroundType() {
|
|
1833
|
+
return this._backgroundType;
|
|
1834
|
+
}
|
|
1835
|
+
/**
|
|
1836
|
+
* @description
|
|
1837
|
+
* Override the toString() function to explicitly stringify the qualifier.
|
|
1838
|
+
*/
|
|
1839
|
+
toString() {
|
|
1840
|
+
return `b_gen_fill${this._prompt ? `:prompt_${this._prompt}` : ""}`;
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
function Nn(t) {
|
|
1844
|
+
return `${t}`.replace("b_", "");
|
|
1845
|
+
}
|
|
1846
|
+
function Ro() {
|
|
1847
|
+
return { backgroundType: "auto" };
|
|
1848
|
+
}
|
|
1849
|
+
function xo(t) {
|
|
1850
|
+
const { intensityLevel: e, brightnessLevel: r } = t, o = {
|
|
1851
|
+
backgroundType: "blurred"
|
|
1852
|
+
};
|
|
1853
|
+
return (e || e === 0) && (o.intensity = e), (r || r === 0) && (o.brightness = r), o;
|
|
1854
|
+
}
|
|
1855
|
+
function Qr(t) {
|
|
1856
|
+
const e = t._contrast, r = t._palette, o = {
|
|
1857
|
+
backgroundType: ""
|
|
1858
|
+
};
|
|
1859
|
+
return e && (o.contrast = !0), r && (o.palette = r), o;
|
|
1860
|
+
}
|
|
1861
|
+
function Po(t) {
|
|
1862
|
+
return Object.assign(Object.assign({}, Qr(t)), { backgroundType: "border" });
|
|
1863
|
+
}
|
|
1864
|
+
function Bn(t) {
|
|
1865
|
+
const e = t._gradientColors, r = `${t._gradientDirection}`, o = Qr(t);
|
|
1866
|
+
return e && (o.gradientColors = e), r && (o.gradientDirection = r), o;
|
|
1867
|
+
}
|
|
1868
|
+
function jo(t) {
|
|
1869
|
+
return Object.assign(Object.assign({}, Bn(t)), { backgroundType: "borderGradient" });
|
|
1870
|
+
}
|
|
1871
|
+
function Mo(t) {
|
|
1872
|
+
return {
|
|
1873
|
+
backgroundType: "color",
|
|
1874
|
+
color: Nn(t)
|
|
1875
|
+
};
|
|
1876
|
+
}
|
|
1877
|
+
function $o(t) {
|
|
1878
|
+
return Object.assign(Object.assign({}, Qr(t)), { backgroundType: "predominant" });
|
|
1879
|
+
}
|
|
1880
|
+
function ko(t) {
|
|
1881
|
+
return Object.assign(Object.assign({}, Bn(t)), { backgroundType: "predominantGradient" });
|
|
1882
|
+
}
|
|
1883
|
+
function Io(t) {
|
|
1884
|
+
return Object.assign({ backgroundType: t.getBackgroundType() }, t.getPrompt() ? { prompt: t.getPrompt() } : {});
|
|
1885
|
+
}
|
|
1886
|
+
function Lo(t) {
|
|
1887
|
+
return Nn(t) === "auto" ? Ro() : t instanceof $n ? xo(t) : t instanceof kn ? Po(t) : t instanceof Ln ? jo(t) : t instanceof Vn ? $o(t) : t instanceof Fn ? ko(t) : t instanceof Dn ? Io(t) : Mo(t);
|
|
1888
|
+
}
|
|
1889
|
+
function Fo() {
|
|
1890
|
+
return new Fr("svg");
|
|
1891
|
+
}
|
|
1892
|
+
function Gr() {
|
|
1893
|
+
return new Fr("auto");
|
|
1894
|
+
}
|
|
1895
|
+
function Un() {
|
|
1896
|
+
return new kn();
|
|
1897
|
+
}
|
|
1898
|
+
function Qn() {
|
|
1899
|
+
return new ot("auto");
|
|
1900
|
+
}
|
|
1901
|
+
function Gn() {
|
|
1902
|
+
return new Ln();
|
|
1903
|
+
}
|
|
1904
|
+
function qn() {
|
|
1905
|
+
return new Fn();
|
|
1906
|
+
}
|
|
1907
|
+
function zn() {
|
|
1908
|
+
return new Vn();
|
|
1909
|
+
}
|
|
1910
|
+
function Yn(t) {
|
|
1911
|
+
return new ot(Dt(t));
|
|
1912
|
+
}
|
|
1913
|
+
function Vo() {
|
|
1914
|
+
return new $n();
|
|
1915
|
+
}
|
|
1916
|
+
function Wn() {
|
|
1917
|
+
return new Dn();
|
|
1918
|
+
}
|
|
1919
|
+
const Hn = {
|
|
1920
|
+
auto: Qn,
|
|
1921
|
+
border: Un,
|
|
1922
|
+
borderGradient: Gn,
|
|
1923
|
+
predominantGradient: qn,
|
|
1924
|
+
predominant: zn,
|
|
1925
|
+
color: Yn,
|
|
1926
|
+
blurred: Vo,
|
|
1927
|
+
generativeFill: Wn
|
|
1928
|
+
};
|
|
1929
|
+
function Do(t) {
|
|
1930
|
+
const { brightness: e, intensity: r } = t, o = Hn.blurred();
|
|
1931
|
+
return o.brightness(e ?? To), o.intensity(r ?? Mn), o;
|
|
1932
|
+
}
|
|
1933
|
+
function un(t, e) {
|
|
1934
|
+
const { gradientColors: r, gradientDirection: o, contrast: s, palette: u } = e;
|
|
1935
|
+
return s && t.contrast(), u && t.palette(...u), r && t.gradientColors(+r), o && t.gradientDirection(o), t;
|
|
1936
|
+
}
|
|
1937
|
+
function cn(t, e) {
|
|
1938
|
+
const { contrast: r, palette: o } = e;
|
|
1939
|
+
return r && t.contrast(), o && t.palette(...o), t;
|
|
1940
|
+
}
|
|
1941
|
+
function No(t, e) {
|
|
1942
|
+
const { prompt: r } = e;
|
|
1943
|
+
return r && t.prompt(r), t;
|
|
1944
|
+
}
|
|
1945
|
+
function Bo(t) {
|
|
1946
|
+
const { backgroundType: e } = t;
|
|
1947
|
+
switch (e) {
|
|
1948
|
+
case "auto":
|
|
1949
|
+
return Qn();
|
|
1950
|
+
case "blurred":
|
|
1951
|
+
return Do(t);
|
|
1952
|
+
case "border":
|
|
1953
|
+
return cn(Un(), t);
|
|
1954
|
+
case "borderGradient":
|
|
1955
|
+
return un(Gn(), t);
|
|
1956
|
+
case "predominant":
|
|
1957
|
+
return cn(zn(), t);
|
|
1958
|
+
case "predominantGradient":
|
|
1959
|
+
return un(qn(), t);
|
|
1960
|
+
case "generativeFill":
|
|
1961
|
+
return No(Wn(), t);
|
|
1962
|
+
default:
|
|
1963
|
+
return Yn(t.color);
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
class Uo extends Br {
|
|
1967
|
+
/**
|
|
1968
|
+
* @description Sets the background.
|
|
1969
|
+
* @param {Qualifiers.Background} backgroundQualifier Defines the background color to use instead of
|
|
1970
|
+
* transparent background areas or when resizing with padding.
|
|
1971
|
+
*/
|
|
1972
|
+
background(e) {
|
|
1973
|
+
return this._actionModel.background = Lo(e), this.addQualifier(e);
|
|
1974
|
+
}
|
|
1975
|
+
/**
|
|
1976
|
+
* @description Horizontal position for custom-coordinates based padding.
|
|
1977
|
+
* @param {number} x The x position.
|
|
1978
|
+
*/
|
|
1979
|
+
offsetX(e) {
|
|
1980
|
+
return this._actionModel.x = e, this.addQualifier(new w("x", e));
|
|
1981
|
+
}
|
|
1982
|
+
/**
|
|
1983
|
+
* @description Vertical position for custom-coordinates based padding
|
|
1984
|
+
* @param {number} y The y position.
|
|
1985
|
+
*/
|
|
1986
|
+
offsetY(e) {
|
|
1987
|
+
return this._actionModel.y = e, this.addQualifier(new w("y", e));
|
|
1988
|
+
}
|
|
1989
|
+
static fromJson(e) {
|
|
1990
|
+
const r = super.fromJson.apply(this, [e]);
|
|
1991
|
+
return e.background && r.background(Bo(e.background)), e.x && r.offsetX(e.x), e.y && r.offsetY(e.y), e.zoom && r.zoom(e.zoom), r;
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
class Qo extends Br {
|
|
1995
|
+
/**
|
|
1996
|
+
* @description Horizontal position for custom-coordinates based cropping.
|
|
1997
|
+
* @param {number} x The x position.
|
|
1998
|
+
*/
|
|
1999
|
+
x(e) {
|
|
2000
|
+
return this._actionModel.x = e, this.addQualifier(new w("x", e));
|
|
2001
|
+
}
|
|
2002
|
+
/**
|
|
2003
|
+
* @description Vertical position for custom-coordinates based cropping
|
|
2004
|
+
* @param {number} y The y position.
|
|
2005
|
+
*/
|
|
2006
|
+
y(e) {
|
|
2007
|
+
return this._actionModel.y = e, this.addQualifier(new w("y", e));
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* @description Controls how much of the original image surrounding the face to keep when using either the 'crop' or 'thumb' cropping modes with face detection.
|
|
2011
|
+
* @param {number | string} z The zoom factor. (Default: 1.0)
|
|
2012
|
+
*/
|
|
2013
|
+
zoom(e) {
|
|
2014
|
+
return this._actionModel.zoom = e, this.addQualifier(new w("z", e));
|
|
2015
|
+
}
|
|
2016
|
+
static fromJson(e) {
|
|
2017
|
+
const r = super.fromJson.apply(this, [e]);
|
|
2018
|
+
return e.x && r.x(e.x), e.y && r.y(e.y), e.zoom && r.zoom(e.zoom), r;
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
class Go extends Br {
|
|
2022
|
+
/**
|
|
2023
|
+
* @description Absolute X position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}}
|
|
2024
|
+
* @param {number} x The x position.
|
|
2025
|
+
*/
|
|
2026
|
+
x(e) {
|
|
2027
|
+
return this._actionModel.x = e, this.addQualifier(new w("x", e));
|
|
2028
|
+
}
|
|
2029
|
+
/**
|
|
2030
|
+
* @description Absolute Y position when used with Gravity.xyCenter {@link Qualifiers.Gravity.GravityQualifier}}
|
|
2031
|
+
* @param {number} y The y position.
|
|
2032
|
+
*/
|
|
2033
|
+
y(e) {
|
|
2034
|
+
return this._actionModel.y = e, this.addQualifier(new w("y", e));
|
|
2035
|
+
}
|
|
2036
|
+
static fromJson(e) {
|
|
2037
|
+
const r = super.fromJson.apply(this, [e]);
|
|
2038
|
+
return e.x && r.x(e.x), e.y && r.y(e.y), r;
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
function qo(t, e) {
|
|
2042
|
+
return new Qo("crop", t, e);
|
|
2043
|
+
}
|
|
2044
|
+
function zo(t, e) {
|
|
2045
|
+
return new Go("fill", t, e);
|
|
2046
|
+
}
|
|
2047
|
+
function Yo(t, e) {
|
|
2048
|
+
return new Uo("pad", t, e);
|
|
2049
|
+
}
|
|
2050
|
+
class Wo extends On {
|
|
2051
|
+
/**
|
|
2052
|
+
* @param {Qualifiers.Quality} qualityValue a Quality value
|
|
2053
|
+
*/
|
|
2054
|
+
constructor(e) {
|
|
2055
|
+
super("q", e.toString(), "level");
|
|
2056
|
+
}
|
|
2057
|
+
/**
|
|
2058
|
+
* Selet the Chroma sub sampling</br>
|
|
2059
|
+
* <b>Learn more</b>: {@link https://cloudinary.com/documentation/image_optimization#toggle_chroma_subsampling|Toggling chroma subsampling}
|
|
2060
|
+
* @param {420 | 444 | number} type The chroma sub sampling type
|
|
2061
|
+
*/
|
|
2062
|
+
chromaSubSampling(e) {
|
|
2063
|
+
this._actionModel.chromaSubSampling = bn[e];
|
|
2064
|
+
const r = new R([this._actionModel.level, e]);
|
|
2065
|
+
return r.setDelimiter(":"), this.addQualifier(new w("q", r));
|
|
2066
|
+
}
|
|
2067
|
+
/**
|
|
2068
|
+
* Controls the final quality by setting a maximum quantization percentage
|
|
2069
|
+
* @param {number} val
|
|
2070
|
+
*/
|
|
2071
|
+
quantization(e) {
|
|
2072
|
+
this._actionModel.quantization = e;
|
|
2073
|
+
const r = new R([this._actionModel.level, `qmax_${e}`]).setDelimiter(":");
|
|
2074
|
+
return this.addQualifier(new w("q", r));
|
|
2075
|
+
}
|
|
2076
|
+
static fromJson(e) {
|
|
2077
|
+
const { level: r, chromaSubSampling: o, quantization: s } = e, u = _n[r] || r, p = new this(u);
|
|
2078
|
+
if (o) {
|
|
2079
|
+
const h = Li[o.toUpperCase()];
|
|
2080
|
+
h && p.chromaSubSampling(+h);
|
|
2081
|
+
}
|
|
2082
|
+
return s && p.quantization(s), p;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
function Nt(t) {
|
|
2086
|
+
return new Rr("f", t);
|
|
2087
|
+
}
|
|
2088
|
+
function Bt(t) {
|
|
2089
|
+
return new Wo(t);
|
|
2090
|
+
}
|
|
2091
|
+
function Ho() {
|
|
2092
|
+
return new Pn("north_east");
|
|
2093
|
+
}
|
|
2094
|
+
on(70).color("black"), on(40).color("white"), zi(), Wi();
|
|
2095
|
+
var Jo = new ke().effect(Yi()).delivery(Bt("auto")).delivery(Nt(Fo())), Ko = new ke().effect(Hi()).delivery(Bt("auto")).delivery(Nt(Gr())), Xo = new ke().effect(qi(2e3)).delivery(Bt("auto")).delivery(Nt(Gr())), Zo = new ke().resize(Yo("iw_div_2").aspectRatio(1).background(Hn.auto())).resize(qo(1, 1).gravity(so(Ho()))).resize(zo().height("ih").width("iw")).delivery(Bt("auto")).delivery(Nt(Gr())), ln = {
|
|
2096
|
+
vectorize: Jo,
|
|
2097
|
+
pixelate: Ko,
|
|
2098
|
+
blur: Xo,
|
|
2099
|
+
"predominant-color": Zo
|
|
2100
|
+
}, fn = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", dn = {
|
|
2101
|
+
flv: "x-flv",
|
|
2102
|
+
"3gp": "3gpp",
|
|
2103
|
+
mov: "quicktime",
|
|
2104
|
+
mpg: "mpeg",
|
|
2105
|
+
avi: "x-msvideo",
|
|
2106
|
+
wmv: "x-ms-wmv",
|
|
2107
|
+
ogv: "ogg",
|
|
2108
|
+
webm: "webm",
|
|
2109
|
+
mp4: "mp4"
|
|
2110
|
+
}, pn = "?_a=", ea = (
|
|
2111
|
+
/** @class */
|
|
2112
|
+
function() {
|
|
2113
|
+
function t(e, r, o, s, u, p, h) {
|
|
2114
|
+
var m = this;
|
|
2115
|
+
this.mimeType = "video", this.mimeSubTypes = dn, this.videoElement = e, this.originalVideo = r, this.videoOptions = h, this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] };
|
|
2116
|
+
var g = se(r);
|
|
2117
|
+
It(e, r, s, this.htmlPluginState).then(function() {
|
|
2118
|
+
m.htmlPluginState.pluginEventSubscription.forEach(function(O) {
|
|
2119
|
+
O();
|
|
2120
|
+
}), m.setVideoAttributes(u, p), m.handleSourceToVideo(g, o);
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
return t.prototype.handleSourceToVideo = function(e, r) {
|
|
2124
|
+
var o = this;
|
|
2125
|
+
if (r)
|
|
2126
|
+
this.generateUserSources(e, r);
|
|
2127
|
+
else {
|
|
2128
|
+
var s = ["webm", "mp4", "ogv"];
|
|
2129
|
+
s.forEach(function(u) {
|
|
2130
|
+
o.appendSourceTag(se(e), u);
|
|
2131
|
+
});
|
|
2132
|
+
}
|
|
2133
|
+
}, t.prototype.generateUserSources = function(e, r) {
|
|
2134
|
+
var o = this;
|
|
2135
|
+
r.map(function(s) {
|
|
2136
|
+
var u = s.type, p = s.codecs, h = s.transcode;
|
|
2137
|
+
return o.appendSourceTag(se(e).transcode(h), u, o.buildMimeType(u, p));
|
|
2138
|
+
});
|
|
2139
|
+
}, t.prototype.appendSourceTag = function(e, r, o) {
|
|
2140
|
+
var s, u = document.createElement("source"), p = (s = this.videoOptions) === null || s === void 0 ? void 0 : s.useFetchFormat;
|
|
2141
|
+
p && e.format(r);
|
|
2142
|
+
var h = e.toURL(), m = h.split(pn), g = m[1] ? "".concat(pn).concat(m[1]) : "", O = p ? "" : ".".concat(r);
|
|
2143
|
+
u.src = "".concat(m[0]).concat(O).concat(g), u.type = o || "video/".concat(dn[r] || r), this.videoElement.appendChild(u);
|
|
2144
|
+
}, t.prototype.buildMimeType = function(e, r) {
|
|
2145
|
+
var o = "".concat(this.mimeType, "/").concat(this.mimeSubTypes[e] || e);
|
|
2146
|
+
return r && (o += "; codecs=" + (Array.isArray(r) ? r.join(", ") : r)), o;
|
|
2147
|
+
}, t.prototype.setVideoAttributes = function(e, r) {
|
|
2148
|
+
var o;
|
|
2149
|
+
if (e === void 0 && (e = {}), r === "auto") {
|
|
2150
|
+
var s = se(this.originalVideo);
|
|
2151
|
+
e.poster = s.quality("auto").format("jpg").addTransformation("so_auto").toURL();
|
|
2152
|
+
} else r && (e.poster = (o = r.toURL) === null || o === void 0 ? void 0 : o.call(r));
|
|
2153
|
+
for (var u = 0, p = Object.entries(e); u < p.length; u++) {
|
|
2154
|
+
var h = p[u], m = h[0], g = h[1];
|
|
2155
|
+
g && this.videoElement.setAttribute(m, m === "poster" ? g : "");
|
|
2156
|
+
}
|
|
2157
|
+
}, t.prototype.update = function(e, r, o, s, u) {
|
|
2158
|
+
var p = this;
|
|
2159
|
+
if (e !== this.originalVideo) {
|
|
2160
|
+
for (var h = this.videoElement.getElementsByTagName("SOURCE"); h[0]; )
|
|
2161
|
+
h[0].parentNode.removeChild(h[0]);
|
|
2162
|
+
It(this.videoElement, e, o, this.htmlPluginState).then(function() {
|
|
2163
|
+
p.setVideoAttributes(s, u), p.handleSourceToVideo(e, r), p.videoElement.load();
|
|
2164
|
+
});
|
|
2165
|
+
}
|
|
2166
|
+
}, t;
|
|
2167
|
+
}()
|
|
2168
|
+
), ta = typeof ae == "object" && ae && ae.Object === Object && ae, ra = typeof self == "object" && self && self.Object === Object && self;
|
|
2169
|
+
ta || ra || Function("return this")();
|
|
2170
|
+
function qr() {
|
|
2171
|
+
return typeof window < "u";
|
|
2172
|
+
}
|
|
2173
|
+
function na(t) {
|
|
2174
|
+
return t instanceof HTMLImageElement;
|
|
2175
|
+
}
|
|
2176
|
+
function ia(t) {
|
|
2177
|
+
var e = {}, r = e.rootMargin, o = r === void 0 ? "0px" : r, s = e.threshold, u = s === void 0 ? 0.1 : s;
|
|
2178
|
+
return oa.bind(null, o, u);
|
|
2179
|
+
}
|
|
2180
|
+
function oa(t, e, r, o, s, u) {
|
|
2181
|
+
return t === void 0 && (t = "0px"), e === void 0 && (e = 0.1), qr() ? new Promise(function(p) {
|
|
2182
|
+
var h = function() {
|
|
2183
|
+
return p({ lazyload: !0 });
|
|
2184
|
+
}, m = sa(r, h, t, e);
|
|
2185
|
+
s.cleanupCallbacks.push(function() {
|
|
2186
|
+
m(), p("canceled");
|
|
2187
|
+
});
|
|
2188
|
+
}) : !1;
|
|
2189
|
+
}
|
|
2190
|
+
function aa() {
|
|
2191
|
+
return window && "IntersectionObserver" in window;
|
|
2192
|
+
}
|
|
2193
|
+
function sa(t, e, r, o) {
|
|
2194
|
+
try {
|
|
2195
|
+
if (!aa())
|
|
2196
|
+
return e(), function() {
|
|
2197
|
+
};
|
|
2198
|
+
var s = new IntersectionObserver(function(u) {
|
|
2199
|
+
u.forEach(function(p) {
|
|
2200
|
+
p.isIntersecting && (s.unobserve(p.target), e());
|
|
2201
|
+
});
|
|
2202
|
+
}, { rootMargin: r, threshold: o });
|
|
2203
|
+
return s.observe(t), function() {
|
|
2204
|
+
t && s.observe(t);
|
|
2205
|
+
};
|
|
2206
|
+
} catch {
|
|
2207
|
+
e();
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
function ua(t) {
|
|
2211
|
+
var e = {}, r = e.mode, o = r === void 0 ? "vectorize" : r;
|
|
2212
|
+
return ca.bind(null, o);
|
|
2213
|
+
}
|
|
2214
|
+
function ca(t, e, r, o, s, u) {
|
|
2215
|
+
ln[t] || (t = "vectorize");
|
|
2216
|
+
var p = ln[t].actions, h = se(r);
|
|
2217
|
+
if (p.forEach(function(g) {
|
|
2218
|
+
h.addAction(g);
|
|
2219
|
+
}), !qr())
|
|
2220
|
+
return r.transformation = h.transformation, !0;
|
|
2221
|
+
if (na(e)) {
|
|
2222
|
+
h.transformation.actions.forEach(function(g, O) {
|
|
2223
|
+
g instanceof U && g.getActionTag() === "responsive" && delete h.transformation.actions[O];
|
|
2224
|
+
});
|
|
2225
|
+
var m = Cr(s, { placeholder: !0 });
|
|
2226
|
+
return e.src = h.toURL(m), e.onerror = function() {
|
|
2227
|
+
e.src = fn;
|
|
2228
|
+
}, new Promise(function(g) {
|
|
2229
|
+
e.onload = function() {
|
|
2230
|
+
g();
|
|
2231
|
+
};
|
|
2232
|
+
}).then(function() {
|
|
2233
|
+
return new Promise(function(g) {
|
|
2234
|
+
o.cleanupCallbacks.push(function() {
|
|
2235
|
+
e.src = fn, g("canceled");
|
|
2236
|
+
});
|
|
2237
|
+
var O = new Image();
|
|
2238
|
+
O.src = r.toURL(m), O.onload = function() {
|
|
2239
|
+
g({ placeholder: !0 });
|
|
2240
|
+
}, O.onerror = function() {
|
|
2241
|
+
g({ placeholder: !0 });
|
|
2242
|
+
};
|
|
2243
|
+
});
|
|
2244
|
+
});
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
function la(t, e, r) {
|
|
2248
|
+
var o = se(e);
|
|
2249
|
+
if (t)
|
|
2250
|
+
for (var s = 0; s < t.length; s++) {
|
|
2251
|
+
var u = t[s](null, o);
|
|
2252
|
+
if (!u)
|
|
2253
|
+
break;
|
|
2254
|
+
}
|
|
2255
|
+
return o.toURL({ trackedAnalytics: r });
|
|
2256
|
+
}
|
|
2257
|
+
function Lt(t) {
|
|
2258
|
+
t.cleanupCallbacks.forEach(function(e) {
|
|
2259
|
+
e();
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2262
|
+
var xr = function(t, e) {
|
|
2263
|
+
return xr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, o) {
|
|
2264
|
+
r.__proto__ = o;
|
|
2265
|
+
} || function(r, o) {
|
|
2266
|
+
for (var s in o) Object.prototype.hasOwnProperty.call(o, s) && (r[s] = o[s]);
|
|
2267
|
+
}, xr(t, e);
|
|
2268
|
+
};
|
|
2269
|
+
function Jn(t, e) {
|
|
2270
|
+
if (typeof e != "function" && e !== null)
|
|
2271
|
+
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
|
|
2272
|
+
xr(t, e);
|
|
2273
|
+
function r() {
|
|
2274
|
+
this.constructor = t;
|
|
2275
|
+
}
|
|
2276
|
+
t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype, new r());
|
|
2277
|
+
}
|
|
2278
|
+
var nt = function() {
|
|
2279
|
+
return nt = Object.assign || function(e) {
|
|
2280
|
+
for (var r, o = 1, s = arguments.length; o < s; o++) {
|
|
2281
|
+
r = arguments[o];
|
|
2282
|
+
for (var u in r) Object.prototype.hasOwnProperty.call(r, u) && (e[u] = r[u]);
|
|
2283
|
+
}
|
|
2284
|
+
return e;
|
|
2285
|
+
}, nt.apply(this, arguments);
|
|
2286
|
+
};
|
|
2287
|
+
function Kn(t, e) {
|
|
2288
|
+
var r = {};
|
|
2289
|
+
for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.indexOf(o) < 0 && (r[o] = t[o]);
|
|
2290
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
2291
|
+
for (var s = 0, o = Object.getOwnPropertySymbols(t); s < o.length; s++)
|
|
2292
|
+
e.indexOf(o[s]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[s]) && (r[o[s]] = t[o[s]]);
|
|
2293
|
+
return r;
|
|
2294
|
+
}
|
|
2295
|
+
var it = { exports: {} }, T = {};
|
|
2296
|
+
/*
|
|
2297
|
+
object-assign
|
|
2298
|
+
(c) Sindre Sorhus
|
|
2299
|
+
@license MIT
|
|
2300
|
+
*/
|
|
2301
|
+
var hn = Object.getOwnPropertySymbols, fa = Object.prototype.hasOwnProperty, da = Object.prototype.propertyIsEnumerable;
|
|
2302
|
+
function pa(t) {
|
|
2303
|
+
if (t == null)
|
|
2304
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
2305
|
+
return Object(t);
|
|
2306
|
+
}
|
|
2307
|
+
function ha() {
|
|
2308
|
+
try {
|
|
2309
|
+
if (!Object.assign)
|
|
2310
|
+
return !1;
|
|
2311
|
+
var t = new String("abc");
|
|
2312
|
+
if (t[5] = "de", Object.getOwnPropertyNames(t)[0] === "5")
|
|
2313
|
+
return !1;
|
|
2314
|
+
for (var e = {}, r = 0; r < 10; r++)
|
|
2315
|
+
e["_" + String.fromCharCode(r)] = r;
|
|
2316
|
+
var o = Object.getOwnPropertyNames(e).map(function(u) {
|
|
2317
|
+
return e[u];
|
|
2318
|
+
});
|
|
2319
|
+
if (o.join("") !== "0123456789")
|
|
2320
|
+
return !1;
|
|
2321
|
+
var s = {};
|
|
2322
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(u) {
|
|
2323
|
+
s[u] = u;
|
|
2324
|
+
}), Object.keys(Object.assign({}, s)).join("") === "abcdefghijklmnopqrst";
|
|
2325
|
+
} catch {
|
|
2326
|
+
return !1;
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
var Xn = ha() ? Object.assign : function(t, e) {
|
|
2330
|
+
for (var r, o = pa(t), s, u = 1; u < arguments.length; u++) {
|
|
2331
|
+
r = Object(arguments[u]);
|
|
2332
|
+
for (var p in r)
|
|
2333
|
+
fa.call(r, p) && (o[p] = r[p]);
|
|
2334
|
+
if (hn) {
|
|
2335
|
+
s = hn(r);
|
|
2336
|
+
for (var h = 0; h < s.length; h++)
|
|
2337
|
+
da.call(r, s[h]) && (o[s[h]] = r[s[h]]);
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
return o;
|
|
2341
|
+
};
|
|
2342
|
+
/** @license React v16.14.0
|
|
2343
|
+
* react.production.min.js
|
|
2344
|
+
*
|
|
2345
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2346
|
+
*
|
|
2347
|
+
* This source code is licensed under the MIT license found in the
|
|
2348
|
+
* LICENSE file in the root directory of this source tree.
|
|
2349
|
+
*/
|
|
2350
|
+
var zr = Xn, Q = typeof Symbol == "function" && Symbol.for, at = Q ? Symbol.for("react.element") : 60103, ga = Q ? Symbol.for("react.portal") : 60106, ya = Q ? Symbol.for("react.fragment") : 60107, va = Q ? Symbol.for("react.strict_mode") : 60108, ma = Q ? Symbol.for("react.profiler") : 60114, _a = Q ? Symbol.for("react.provider") : 60109, ba = Q ? Symbol.for("react.context") : 60110, wa = Q ? Symbol.for("react.forward_ref") : 60112, Ea = Q ? Symbol.for("react.suspense") : 60113, Oa = Q ? Symbol.for("react.memo") : 60115, Aa = Q ? Symbol.for("react.lazy") : 60116, gn = typeof Symbol == "function" && Symbol.iterator;
|
|
2351
|
+
function st(t) {
|
|
2352
|
+
for (var e = "https://reactjs.org/docs/error-decoder.html?invariant=" + t, r = 1; r < arguments.length; r++) e += "&args[]=" + encodeURIComponent(arguments[r]);
|
|
2353
|
+
return "Minified React error #" + t + "; visit " + e + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
|
2354
|
+
}
|
|
2355
|
+
var Zn = { isMounted: function() {
|
|
2356
|
+
return !1;
|
|
2357
|
+
}, enqueueForceUpdate: function() {
|
|
2358
|
+
}, enqueueReplaceState: function() {
|
|
2359
|
+
}, enqueueSetState: function() {
|
|
2360
|
+
} }, ei = {};
|
|
2361
|
+
function Ie(t, e, r) {
|
|
2362
|
+
this.props = t, this.context = e, this.refs = ei, this.updater = r || Zn;
|
|
2363
|
+
}
|
|
2364
|
+
Ie.prototype.isReactComponent = {};
|
|
2365
|
+
Ie.prototype.setState = function(t, e) {
|
|
2366
|
+
if (typeof t != "object" && typeof t != "function" && t != null) throw Error(st(85));
|
|
2367
|
+
this.updater.enqueueSetState(this, t, e, "setState");
|
|
2368
|
+
};
|
|
2369
|
+
Ie.prototype.forceUpdate = function(t) {
|
|
2370
|
+
this.updater.enqueueForceUpdate(this, t, "forceUpdate");
|
|
2371
|
+
};
|
|
2372
|
+
function ti() {
|
|
2373
|
+
}
|
|
2374
|
+
ti.prototype = Ie.prototype;
|
|
2375
|
+
function Yr(t, e, r) {
|
|
2376
|
+
this.props = t, this.context = e, this.refs = ei, this.updater = r || Zn;
|
|
2377
|
+
}
|
|
2378
|
+
var Wr = Yr.prototype = new ti();
|
|
2379
|
+
Wr.constructor = Yr;
|
|
2380
|
+
zr(Wr, Ie.prototype);
|
|
2381
|
+
Wr.isPureReactComponent = !0;
|
|
2382
|
+
var Hr = { current: null }, ri = Object.prototype.hasOwnProperty, ni = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
2383
|
+
function ii(t, e, r) {
|
|
2384
|
+
var o, s = {}, u = null, p = null;
|
|
2385
|
+
if (e != null) for (o in e.ref !== void 0 && (p = e.ref), e.key !== void 0 && (u = "" + e.key), e) ri.call(e, o) && !ni.hasOwnProperty(o) && (s[o] = e[o]);
|
|
2386
|
+
var h = arguments.length - 2;
|
|
2387
|
+
if (h === 1) s.children = r;
|
|
2388
|
+
else if (1 < h) {
|
|
2389
|
+
for (var m = Array(h), g = 0; g < h; g++) m[g] = arguments[g + 2];
|
|
2390
|
+
s.children = m;
|
|
2391
|
+
}
|
|
2392
|
+
if (t && t.defaultProps) for (o in h = t.defaultProps, h) s[o] === void 0 && (s[o] = h[o]);
|
|
2393
|
+
return { $$typeof: at, type: t, key: u, ref: p, props: s, _owner: Hr.current };
|
|
2394
|
+
}
|
|
2395
|
+
function Sa(t, e) {
|
|
2396
|
+
return { $$typeof: at, type: t.type, key: e, ref: t.ref, props: t.props, _owner: t._owner };
|
|
2397
|
+
}
|
|
2398
|
+
function Jr(t) {
|
|
2399
|
+
return typeof t == "object" && t !== null && t.$$typeof === at;
|
|
2400
|
+
}
|
|
2401
|
+
function Ta(t) {
|
|
2402
|
+
var e = { "=": "=0", ":": "=2" };
|
|
2403
|
+
return "$" + ("" + t).replace(/[=:]/g, function(r) {
|
|
2404
|
+
return e[r];
|
|
2405
|
+
});
|
|
2406
|
+
}
|
|
2407
|
+
var oi = /\/+/g, Ft = [];
|
|
2408
|
+
function ai(t, e, r, o) {
|
|
2409
|
+
if (Ft.length) {
|
|
2410
|
+
var s = Ft.pop();
|
|
2411
|
+
return s.result = t, s.keyPrefix = e, s.func = r, s.context = o, s.count = 0, s;
|
|
2412
|
+
}
|
|
2413
|
+
return { result: t, keyPrefix: e, func: r, context: o, count: 0 };
|
|
2414
|
+
}
|
|
2415
|
+
function si(t) {
|
|
2416
|
+
t.result = null, t.keyPrefix = null, t.func = null, t.context = null, t.count = 0, 10 > Ft.length && Ft.push(t);
|
|
2417
|
+
}
|
|
2418
|
+
function Pr(t, e, r, o) {
|
|
2419
|
+
var s = typeof t;
|
|
2420
|
+
(s === "undefined" || s === "boolean") && (t = null);
|
|
2421
|
+
var u = !1;
|
|
2422
|
+
if (t === null) u = !0;
|
|
2423
|
+
else switch (s) {
|
|
2424
|
+
case "string":
|
|
2425
|
+
case "number":
|
|
2426
|
+
u = !0;
|
|
2427
|
+
break;
|
|
2428
|
+
case "object":
|
|
2429
|
+
switch (t.$$typeof) {
|
|
2430
|
+
case at:
|
|
2431
|
+
case ga:
|
|
2432
|
+
u = !0;
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
if (u) return r(o, t, e === "" ? "." + Or(t, 0) : e), 1;
|
|
2436
|
+
if (u = 0, e = e === "" ? "." : e + ":", Array.isArray(t)) for (var p = 0; p < t.length; p++) {
|
|
2437
|
+
s = t[p];
|
|
2438
|
+
var h = e + Or(s, p);
|
|
2439
|
+
u += Pr(s, h, r, o);
|
|
2440
|
+
}
|
|
2441
|
+
else if (t === null || typeof t != "object" ? h = null : (h = gn && t[gn] || t["@@iterator"], h = typeof h == "function" ? h : null), typeof h == "function") for (t = h.call(t), p = 0; !(s = t.next()).done; ) s = s.value, h = e + Or(s, p++), u += Pr(s, h, r, o);
|
|
2442
|
+
else if (s === "object") throw r = "" + t, Error(st(31, r === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : r, ""));
|
|
2443
|
+
return u;
|
|
2444
|
+
}
|
|
2445
|
+
function jr(t, e, r) {
|
|
2446
|
+
return t == null ? 0 : Pr(t, "", e, r);
|
|
2447
|
+
}
|
|
2448
|
+
function Or(t, e) {
|
|
2449
|
+
return typeof t == "object" && t !== null && t.key != null ? Ta(t.key) : e.toString(36);
|
|
2450
|
+
}
|
|
2451
|
+
function Ca(t, e) {
|
|
2452
|
+
t.func.call(t.context, e, t.count++);
|
|
2453
|
+
}
|
|
2454
|
+
function Ra(t, e, r) {
|
|
2455
|
+
var o = t.result, s = t.keyPrefix;
|
|
2456
|
+
t = t.func.call(t.context, e, t.count++), Array.isArray(t) ? Mr(t, o, r, function(u) {
|
|
2457
|
+
return u;
|
|
2458
|
+
}) : t != null && (Jr(t) && (t = Sa(t, s + (!t.key || e && e.key === t.key ? "" : ("" + t.key).replace(oi, "$&/") + "/") + r)), o.push(t));
|
|
2459
|
+
}
|
|
2460
|
+
function Mr(t, e, r, o, s) {
|
|
2461
|
+
var u = "";
|
|
2462
|
+
r != null && (u = ("" + r).replace(oi, "$&/") + "/"), e = ai(e, u, o, s), jr(t, Ra, e), si(e);
|
|
2463
|
+
}
|
|
2464
|
+
var ui = { current: null };
|
|
2465
|
+
function K() {
|
|
2466
|
+
var t = ui.current;
|
|
2467
|
+
if (t === null) throw Error(st(321));
|
|
2468
|
+
return t;
|
|
2469
|
+
}
|
|
2470
|
+
var xa = { ReactCurrentDispatcher: ui, ReactCurrentBatchConfig: { suspense: null }, ReactCurrentOwner: Hr, IsSomeRendererActing: { current: !1 }, assign: zr };
|
|
2471
|
+
T.Children = { map: function(t, e, r) {
|
|
2472
|
+
if (t == null) return t;
|
|
2473
|
+
var o = [];
|
|
2474
|
+
return Mr(t, o, null, e, r), o;
|
|
2475
|
+
}, forEach: function(t, e, r) {
|
|
2476
|
+
if (t == null) return t;
|
|
2477
|
+
e = ai(null, null, e, r), jr(t, Ca, e), si(e);
|
|
2478
|
+
}, count: function(t) {
|
|
2479
|
+
return jr(t, function() {
|
|
2480
|
+
return null;
|
|
2481
|
+
}, null);
|
|
2482
|
+
}, toArray: function(t) {
|
|
2483
|
+
var e = [];
|
|
2484
|
+
return Mr(t, e, null, function(r) {
|
|
2485
|
+
return r;
|
|
2486
|
+
}), e;
|
|
2487
|
+
}, only: function(t) {
|
|
2488
|
+
if (!Jr(t)) throw Error(st(143));
|
|
2489
|
+
return t;
|
|
2490
|
+
} };
|
|
2491
|
+
T.Component = Ie;
|
|
2492
|
+
T.Fragment = ya;
|
|
2493
|
+
T.Profiler = ma;
|
|
2494
|
+
T.PureComponent = Yr;
|
|
2495
|
+
T.StrictMode = va;
|
|
2496
|
+
T.Suspense = Ea;
|
|
2497
|
+
T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = xa;
|
|
2498
|
+
T.cloneElement = function(t, e, r) {
|
|
2499
|
+
if (t == null) throw Error(st(267, t));
|
|
2500
|
+
var o = zr({}, t.props), s = t.key, u = t.ref, p = t._owner;
|
|
2501
|
+
if (e != null) {
|
|
2502
|
+
if (e.ref !== void 0 && (u = e.ref, p = Hr.current), e.key !== void 0 && (s = "" + e.key), t.type && t.type.defaultProps) var h = t.type.defaultProps;
|
|
2503
|
+
for (m in e) ri.call(e, m) && !ni.hasOwnProperty(m) && (o[m] = e[m] === void 0 && h !== void 0 ? h[m] : e[m]);
|
|
2504
|
+
}
|
|
2505
|
+
var m = arguments.length - 2;
|
|
2506
|
+
if (m === 1) o.children = r;
|
|
2507
|
+
else if (1 < m) {
|
|
2508
|
+
h = Array(m);
|
|
2509
|
+
for (var g = 0; g < m; g++) h[g] = arguments[g + 2];
|
|
2510
|
+
o.children = h;
|
|
2511
|
+
}
|
|
2512
|
+
return {
|
|
2513
|
+
$$typeof: at,
|
|
2514
|
+
type: t.type,
|
|
2515
|
+
key: s,
|
|
2516
|
+
ref: u,
|
|
2517
|
+
props: o,
|
|
2518
|
+
_owner: p
|
|
2519
|
+
};
|
|
2520
|
+
};
|
|
2521
|
+
T.createContext = function(t, e) {
|
|
2522
|
+
return e === void 0 && (e = null), t = { $$typeof: ba, _calculateChangedBits: e, _currentValue: t, _currentValue2: t, _threadCount: 0, Provider: null, Consumer: null }, t.Provider = { $$typeof: _a, _context: t }, t.Consumer = t;
|
|
2523
|
+
};
|
|
2524
|
+
T.createElement = ii;
|
|
2525
|
+
T.createFactory = function(t) {
|
|
2526
|
+
var e = ii.bind(null, t);
|
|
2527
|
+
return e.type = t, e;
|
|
2528
|
+
};
|
|
2529
|
+
T.createRef = function() {
|
|
2530
|
+
return { current: null };
|
|
2531
|
+
};
|
|
2532
|
+
T.forwardRef = function(t) {
|
|
2533
|
+
return { $$typeof: wa, render: t };
|
|
2534
|
+
};
|
|
2535
|
+
T.isValidElement = Jr;
|
|
2536
|
+
T.lazy = function(t) {
|
|
2537
|
+
return { $$typeof: Aa, _ctor: t, _status: -1, _result: null };
|
|
2538
|
+
};
|
|
2539
|
+
T.memo = function(t, e) {
|
|
2540
|
+
return { $$typeof: Oa, type: t, compare: e === void 0 ? null : e };
|
|
2541
|
+
};
|
|
2542
|
+
T.useCallback = function(t, e) {
|
|
2543
|
+
return K().useCallback(t, e);
|
|
2544
|
+
};
|
|
2545
|
+
T.useContext = function(t, e) {
|
|
2546
|
+
return K().useContext(t, e);
|
|
2547
|
+
};
|
|
2548
|
+
T.useDebugValue = function() {
|
|
2549
|
+
};
|
|
2550
|
+
T.useEffect = function(t, e) {
|
|
2551
|
+
return K().useEffect(t, e);
|
|
2552
|
+
};
|
|
2553
|
+
T.useImperativeHandle = function(t, e, r) {
|
|
2554
|
+
return K().useImperativeHandle(t, e, r);
|
|
2555
|
+
};
|
|
2556
|
+
T.useLayoutEffect = function(t, e) {
|
|
2557
|
+
return K().useLayoutEffect(t, e);
|
|
2558
|
+
};
|
|
2559
|
+
T.useMemo = function(t, e) {
|
|
2560
|
+
return K().useMemo(t, e);
|
|
2561
|
+
};
|
|
2562
|
+
T.useReducer = function(t, e, r) {
|
|
2563
|
+
return K().useReducer(t, e, r);
|
|
2564
|
+
};
|
|
2565
|
+
T.useRef = function(t) {
|
|
2566
|
+
return K().useRef(t);
|
|
2567
|
+
};
|
|
2568
|
+
T.useState = function(t) {
|
|
2569
|
+
return K().useState(t);
|
|
2570
|
+
};
|
|
2571
|
+
T.version = "16.14.0";
|
|
2572
|
+
var S = {}, Pa = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", ja = Pa, Ma = Function.call.bind(Object.prototype.hasOwnProperty), $r = function() {
|
|
2573
|
+
};
|
|
2574
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2575
|
+
var $a = ja, kr = {}, ka = Ma;
|
|
2576
|
+
$r = function(t) {
|
|
2577
|
+
var e = "Warning: " + t;
|
|
2578
|
+
typeof console < "u" && console.error(e);
|
|
2579
|
+
try {
|
|
2580
|
+
throw new Error(e);
|
|
2581
|
+
} catch {
|
|
2582
|
+
}
|
|
2583
|
+
};
|
|
2584
|
+
}
|
|
2585
|
+
function ci(t, e, r, o, s) {
|
|
2586
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2587
|
+
for (var u in t)
|
|
2588
|
+
if (ka(t, u)) {
|
|
2589
|
+
var p;
|
|
2590
|
+
try {
|
|
2591
|
+
if (typeof t[u] != "function") {
|
|
2592
|
+
var h = Error(
|
|
2593
|
+
(o || "React class") + ": " + r + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
2594
|
+
);
|
|
2595
|
+
throw h.name = "Invariant Violation", h;
|
|
2596
|
+
}
|
|
2597
|
+
p = t[u](e, u, o, r, null, $a);
|
|
2598
|
+
} catch (g) {
|
|
2599
|
+
p = g;
|
|
2600
|
+
}
|
|
2601
|
+
if (p && !(p instanceof Error) && $r(
|
|
2602
|
+
(o || "React class") + ": type specification of " + r + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
2603
|
+
), p instanceof Error && !(p.message in kr)) {
|
|
2604
|
+
kr[p.message] = !0;
|
|
2605
|
+
var m = s ? s() : "";
|
|
2606
|
+
$r(
|
|
2607
|
+
"Failed " + r + " type: " + p.message + (m ?? "")
|
|
2608
|
+
);
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
ci.resetWarningCache = function() {
|
|
2614
|
+
process.env.NODE_ENV !== "production" && (kr = {});
|
|
2615
|
+
};
|
|
2616
|
+
var Ia = ci;
|
|
2617
|
+
/** @license React v16.14.0
|
|
2618
|
+
* react.development.js
|
|
2619
|
+
*
|
|
2620
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2621
|
+
*
|
|
2622
|
+
* This source code is licensed under the MIT license found in the
|
|
2623
|
+
* LICENSE file in the root directory of this source tree.
|
|
2624
|
+
*/
|
|
2625
|
+
process.env.NODE_ENV !== "production" && function() {
|
|
2626
|
+
var t = Xn, e = Ia, r = "16.14.0", o = typeof Symbol == "function" && Symbol.for, s = o ? Symbol.for("react.element") : 60103, u = o ? Symbol.for("react.portal") : 60106, p = o ? Symbol.for("react.fragment") : 60107, h = o ? Symbol.for("react.strict_mode") : 60108, m = o ? Symbol.for("react.profiler") : 60114, g = o ? Symbol.for("react.provider") : 60109, O = o ? Symbol.for("react.context") : 60110, X = o ? Symbol.for("react.concurrent_mode") : 60111, q = o ? Symbol.for("react.forward_ref") : 60112, ve = o ? Symbol.for("react.suspense") : 60113, me = o ? Symbol.for("react.suspense_list") : 60120, Z = o ? Symbol.for("react.memo") : 60115, _e = o ? Symbol.for("react.lazy") : 60116, ue = o ? Symbol.for("react.block") : 60121, ut = o ? Symbol.for("react.fundamental") : 60117, ct = o ? Symbol.for("react.responder") : 60118, Le = o ? Symbol.for("react.scope") : 60119, Fe = typeof Symbol == "function" && Symbol.iterator, be = "@@iterator";
|
|
2627
|
+
function Ve(n) {
|
|
2628
|
+
if (n === null || typeof n != "object")
|
|
2629
|
+
return null;
|
|
2630
|
+
var a = Fe && n[Fe] || n[be];
|
|
2631
|
+
return typeof a == "function" ? a : null;
|
|
2632
|
+
}
|
|
2633
|
+
var De = {
|
|
2634
|
+
/**
|
|
2635
|
+
* @internal
|
|
2636
|
+
* @type {ReactComponent}
|
|
2637
|
+
*/
|
|
2638
|
+
current: null
|
|
2639
|
+
}, lt = {
|
|
2640
|
+
suspense: null
|
|
2641
|
+
}, L = {
|
|
2642
|
+
/**
|
|
2643
|
+
* @internal
|
|
2644
|
+
* @type {ReactComponent}
|
|
2645
|
+
*/
|
|
2646
|
+
current: null
|
|
2647
|
+
}, we = /^(.*)[\\\/]/;
|
|
2648
|
+
function ft(n, a, l) {
|
|
2649
|
+
var d = "";
|
|
2650
|
+
if (a) {
|
|
2651
|
+
var y = a.fileName, E = y.replace(we, "");
|
|
2652
|
+
if (/^index\./.test(E)) {
|
|
2653
|
+
var _ = y.match(we);
|
|
2654
|
+
if (_) {
|
|
2655
|
+
var b = _[1];
|
|
2656
|
+
if (b) {
|
|
2657
|
+
var x = b.replace(we, "");
|
|
2658
|
+
E = x + "/" + E;
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
d = " (at " + E + ":" + a.lineNumber + ")";
|
|
2663
|
+
} else l && (d = " (created by " + l + ")");
|
|
2664
|
+
return `
|
|
2665
|
+
in ` + (n || "Unknown") + d;
|
|
2666
|
+
}
|
|
2667
|
+
var dt = 1;
|
|
2668
|
+
function pt(n) {
|
|
2669
|
+
return n._status === dt ? n._result : null;
|
|
2670
|
+
}
|
|
2671
|
+
function ht(n, a, l) {
|
|
2672
|
+
var d = a.displayName || a.name || "";
|
|
2673
|
+
return n.displayName || (d !== "" ? l + "(" + d + ")" : l);
|
|
2674
|
+
}
|
|
2675
|
+
function F(n) {
|
|
2676
|
+
if (n == null)
|
|
2677
|
+
return null;
|
|
2678
|
+
if (typeof n.tag == "number" && A("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
2679
|
+
return n.displayName || n.name || null;
|
|
2680
|
+
if (typeof n == "string")
|
|
2681
|
+
return n;
|
|
2682
|
+
switch (n) {
|
|
2683
|
+
case p:
|
|
2684
|
+
return "Fragment";
|
|
2685
|
+
case u:
|
|
2686
|
+
return "Portal";
|
|
2687
|
+
case m:
|
|
2688
|
+
return "Profiler";
|
|
2689
|
+
case h:
|
|
2690
|
+
return "StrictMode";
|
|
2691
|
+
case ve:
|
|
2692
|
+
return "Suspense";
|
|
2693
|
+
case me:
|
|
2694
|
+
return "SuspenseList";
|
|
2695
|
+
}
|
|
2696
|
+
if (typeof n == "object")
|
|
2697
|
+
switch (n.$$typeof) {
|
|
2698
|
+
case O:
|
|
2699
|
+
return "Context.Consumer";
|
|
2700
|
+
case g:
|
|
2701
|
+
return "Context.Provider";
|
|
2702
|
+
case q:
|
|
2703
|
+
return ht(n, n.render, "ForwardRef");
|
|
2704
|
+
case Z:
|
|
2705
|
+
return F(n.type);
|
|
2706
|
+
case ue:
|
|
2707
|
+
return F(n.render);
|
|
2708
|
+
case _e: {
|
|
2709
|
+
var a = n, l = pt(a);
|
|
2710
|
+
if (l)
|
|
2711
|
+
return F(l);
|
|
2712
|
+
break;
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
return null;
|
|
2716
|
+
}
|
|
2717
|
+
var ee = {}, ce = null;
|
|
2718
|
+
function te(n) {
|
|
2719
|
+
ce = n;
|
|
2720
|
+
}
|
|
2721
|
+
ee.getCurrentStack = null, ee.getStackAddendum = function() {
|
|
2722
|
+
var n = "";
|
|
2723
|
+
if (ce) {
|
|
2724
|
+
var a = F(ce.type), l = ce._owner;
|
|
2725
|
+
n += ft(a, ce._source, l && F(l.type));
|
|
2726
|
+
}
|
|
2727
|
+
var d = ee.getCurrentStack;
|
|
2728
|
+
return d && (n += d() || ""), n;
|
|
2729
|
+
};
|
|
2730
|
+
var C = {
|
|
2731
|
+
current: !1
|
|
2732
|
+
}, Ne = {
|
|
2733
|
+
ReactCurrentDispatcher: De,
|
|
2734
|
+
ReactCurrentBatchConfig: lt,
|
|
2735
|
+
ReactCurrentOwner: L,
|
|
2736
|
+
IsSomeRendererActing: C,
|
|
2737
|
+
// Used by renderers to avoid bundling object-assign twice in UMD bundles:
|
|
2738
|
+
assign: t
|
|
2739
|
+
};
|
|
2740
|
+
t(Ne, {
|
|
2741
|
+
// These should not be included in production.
|
|
2742
|
+
ReactDebugCurrentFrame: ee,
|
|
2743
|
+
// Shim for React DOM 16.0.0 which still destructured (but not used) this.
|
|
2744
|
+
// TODO: remove in React 17.0.
|
|
2745
|
+
ReactComponentTreeHook: {}
|
|
2746
|
+
});
|
|
2747
|
+
function Ee(n) {
|
|
2748
|
+
{
|
|
2749
|
+
for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), d = 1; d < a; d++)
|
|
2750
|
+
l[d - 1] = arguments[d];
|
|
2751
|
+
Be("warn", n, l);
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
function A(n) {
|
|
2755
|
+
{
|
|
2756
|
+
for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), d = 1; d < a; d++)
|
|
2757
|
+
l[d - 1] = arguments[d];
|
|
2758
|
+
Be("error", n, l);
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
function Be(n, a, l) {
|
|
2762
|
+
{
|
|
2763
|
+
var d = l.length > 0 && typeof l[l.length - 1] == "string" && l[l.length - 1].indexOf(`
|
|
2764
|
+
in`) === 0;
|
|
2765
|
+
if (!d) {
|
|
2766
|
+
var y = Ne.ReactDebugCurrentFrame, E = y.getStackAddendum();
|
|
2767
|
+
E !== "" && (a += "%s", l = l.concat([E]));
|
|
2768
|
+
}
|
|
2769
|
+
var _ = l.map(function(P) {
|
|
2770
|
+
return "" + P;
|
|
2771
|
+
});
|
|
2772
|
+
_.unshift("Warning: " + a), Function.prototype.apply.call(console[n], console, _);
|
|
2773
|
+
try {
|
|
2774
|
+
var b = 0, x = "Warning: " + a.replace(/%s/g, function() {
|
|
2775
|
+
return l[b++];
|
|
2776
|
+
});
|
|
2777
|
+
throw new Error(x);
|
|
2778
|
+
} catch {
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
var Ue = {};
|
|
2783
|
+
function Qe(n, a) {
|
|
2784
|
+
{
|
|
2785
|
+
var l = n.constructor, d = l && (l.displayName || l.name) || "ReactClass", y = d + "." + a;
|
|
2786
|
+
if (Ue[y])
|
|
2787
|
+
return;
|
|
2788
|
+
A("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", a, d), Ue[y] = !0;
|
|
2789
|
+
}
|
|
2790
|
+
}
|
|
2791
|
+
var gt = {
|
|
2792
|
+
/**
|
|
2793
|
+
* Checks whether or not this composite component is mounted.
|
|
2794
|
+
* @param {ReactClass} publicInstance The instance we want to test.
|
|
2795
|
+
* @return {boolean} True if mounted, false otherwise.
|
|
2796
|
+
* @protected
|
|
2797
|
+
* @final
|
|
2798
|
+
*/
|
|
2799
|
+
isMounted: function(n) {
|
|
2800
|
+
return !1;
|
|
2801
|
+
},
|
|
2802
|
+
/**
|
|
2803
|
+
* Forces an update. This should only be invoked when it is known with
|
|
2804
|
+
* certainty that we are **not** in a DOM transaction.
|
|
2805
|
+
*
|
|
2806
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
2807
|
+
* component's state has changed but `setState` was not called.
|
|
2808
|
+
*
|
|
2809
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
2810
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
2811
|
+
*
|
|
2812
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
2813
|
+
* @param {?function} callback Called after component is updated.
|
|
2814
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
2815
|
+
* @internal
|
|
2816
|
+
*/
|
|
2817
|
+
enqueueForceUpdate: function(n, a, l) {
|
|
2818
|
+
Qe(n, "forceUpdate");
|
|
2819
|
+
},
|
|
2820
|
+
/**
|
|
2821
|
+
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
2822
|
+
* You should treat `this.state` as immutable.
|
|
2823
|
+
*
|
|
2824
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
2825
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
2826
|
+
*
|
|
2827
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
2828
|
+
* @param {object} completeState Next state.
|
|
2829
|
+
* @param {?function} callback Called after component is updated.
|
|
2830
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
2831
|
+
* @internal
|
|
2832
|
+
*/
|
|
2833
|
+
enqueueReplaceState: function(n, a, l, d) {
|
|
2834
|
+
Qe(n, "replaceState");
|
|
2835
|
+
},
|
|
2836
|
+
/**
|
|
2837
|
+
* Sets a subset of the state. This only exists because _pendingState is
|
|
2838
|
+
* internal. This provides a merging strategy that is not available to deep
|
|
2839
|
+
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
2840
|
+
* during the merge.
|
|
2841
|
+
*
|
|
2842
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
2843
|
+
* @param {object} partialState Next partial state to be merged with state.
|
|
2844
|
+
* @param {?function} callback Called after component is updated.
|
|
2845
|
+
* @param {?string} Name of the calling function in the public API.
|
|
2846
|
+
* @internal
|
|
2847
|
+
*/
|
|
2848
|
+
enqueueSetState: function(n, a, l, d) {
|
|
2849
|
+
Qe(n, "setState");
|
|
2850
|
+
}
|
|
2851
|
+
}, Ge = {};
|
|
2852
|
+
Object.freeze(Ge);
|
|
2853
|
+
function z(n, a, l) {
|
|
2854
|
+
this.props = n, this.context = a, this.refs = Ge, this.updater = l || gt;
|
|
2855
|
+
}
|
|
2856
|
+
z.prototype.isReactComponent = {}, z.prototype.setState = function(n, a) {
|
|
2857
|
+
if (!(typeof n == "object" || typeof n == "function" || n == null))
|
|
2858
|
+
throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
2859
|
+
this.updater.enqueueSetState(this, n, a, "setState");
|
|
2860
|
+
}, z.prototype.forceUpdate = function(n) {
|
|
2861
|
+
this.updater.enqueueForceUpdate(this, n, "forceUpdate");
|
|
2862
|
+
};
|
|
2863
|
+
{
|
|
2864
|
+
var qe = {
|
|
2865
|
+
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
2866
|
+
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
2867
|
+
}, yt = function(n, a) {
|
|
2868
|
+
Object.defineProperty(z.prototype, n, {
|
|
2869
|
+
get: function() {
|
|
2870
|
+
Ee("%s(...) is deprecated in plain JavaScript React classes. %s", a[0], a[1]);
|
|
2871
|
+
}
|
|
2872
|
+
});
|
|
2873
|
+
};
|
|
2874
|
+
for (var ze in qe)
|
|
2875
|
+
qe.hasOwnProperty(ze) && yt(ze, qe[ze]);
|
|
2876
|
+
}
|
|
2877
|
+
function vt() {
|
|
2878
|
+
}
|
|
2879
|
+
vt.prototype = z.prototype;
|
|
2880
|
+
function Oe(n, a, l) {
|
|
2881
|
+
this.props = n, this.context = a, this.refs = Ge, this.updater = l || gt;
|
|
2882
|
+
}
|
|
2883
|
+
var Ae = Oe.prototype = new vt();
|
|
2884
|
+
Ae.constructor = Oe, t(Ae, z.prototype), Ae.isPureReactComponent = !0;
|
|
2885
|
+
function Ye() {
|
|
2886
|
+
var n = {
|
|
2887
|
+
current: null
|
|
2888
|
+
};
|
|
2889
|
+
return Object.seal(n), n;
|
|
2890
|
+
}
|
|
2891
|
+
var le = Object.prototype.hasOwnProperty, mt = {
|
|
2892
|
+
key: !0,
|
|
2893
|
+
ref: !0,
|
|
2894
|
+
__self: !0,
|
|
2895
|
+
__source: !0
|
|
2896
|
+
}, _t, fe, de;
|
|
2897
|
+
de = {};
|
|
2898
|
+
function We(n) {
|
|
2899
|
+
if (le.call(n, "ref")) {
|
|
2900
|
+
var a = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
2901
|
+
if (a && a.isReactWarning)
|
|
2902
|
+
return !1;
|
|
2903
|
+
}
|
|
2904
|
+
return n.ref !== void 0;
|
|
2905
|
+
}
|
|
2906
|
+
function He(n) {
|
|
2907
|
+
if (le.call(n, "key")) {
|
|
2908
|
+
var a = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
2909
|
+
if (a && a.isReactWarning)
|
|
2910
|
+
return !1;
|
|
2911
|
+
}
|
|
2912
|
+
return n.key !== void 0;
|
|
2913
|
+
}
|
|
2914
|
+
function G(n, a) {
|
|
2915
|
+
var l = function() {
|
|
2916
|
+
_t || (_t = !0, A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)", a));
|
|
2917
|
+
};
|
|
2918
|
+
l.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
2919
|
+
get: l,
|
|
2920
|
+
configurable: !0
|
|
2921
|
+
});
|
|
2922
|
+
}
|
|
2923
|
+
function Se(n, a) {
|
|
2924
|
+
var l = function() {
|
|
2925
|
+
fe || (fe = !0, A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)", a));
|
|
2926
|
+
};
|
|
2927
|
+
l.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
2928
|
+
get: l,
|
|
2929
|
+
configurable: !0
|
|
2930
|
+
});
|
|
2931
|
+
}
|
|
2932
|
+
function Ut(n) {
|
|
2933
|
+
if (typeof n.ref == "string" && L.current && n.__self && L.current.stateNode !== n.__self) {
|
|
2934
|
+
var a = F(L.current.type);
|
|
2935
|
+
de[a] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref', F(L.current.type), n.ref), de[a] = !0);
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
var Te = function(n, a, l, d, y, E, _) {
|
|
2939
|
+
var b = {
|
|
2940
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
2941
|
+
$$typeof: s,
|
|
2942
|
+
// Built-in properties that belong on the element
|
|
2943
|
+
type: n,
|
|
2944
|
+
key: a,
|
|
2945
|
+
ref: l,
|
|
2946
|
+
props: _,
|
|
2947
|
+
// Record the component responsible for creating this element.
|
|
2948
|
+
_owner: E
|
|
2949
|
+
};
|
|
2950
|
+
return b._store = {}, Object.defineProperty(b._store, "validated", {
|
|
2951
|
+
configurable: !1,
|
|
2952
|
+
enumerable: !1,
|
|
2953
|
+
writable: !0,
|
|
2954
|
+
value: !1
|
|
2955
|
+
}), Object.defineProperty(b, "_self", {
|
|
2956
|
+
configurable: !1,
|
|
2957
|
+
enumerable: !1,
|
|
2958
|
+
writable: !1,
|
|
2959
|
+
value: d
|
|
2960
|
+
}), Object.defineProperty(b, "_source", {
|
|
2961
|
+
configurable: !1,
|
|
2962
|
+
enumerable: !1,
|
|
2963
|
+
writable: !1,
|
|
2964
|
+
value: y
|
|
2965
|
+
}), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
|
|
2966
|
+
};
|
|
2967
|
+
function bt(n, a, l) {
|
|
2968
|
+
var d, y = {}, E = null, _ = null, b = null, x = null;
|
|
2969
|
+
if (a != null) {
|
|
2970
|
+
We(a) && (_ = a.ref, Ut(a)), He(a) && (E = "" + a.key), b = a.__self === void 0 ? null : a.__self, x = a.__source === void 0 ? null : a.__source;
|
|
2971
|
+
for (d in a)
|
|
2972
|
+
le.call(a, d) && !mt.hasOwnProperty(d) && (y[d] = a[d]);
|
|
2973
|
+
}
|
|
2974
|
+
var P = arguments.length - 2;
|
|
2975
|
+
if (P === 1)
|
|
2976
|
+
y.children = l;
|
|
2977
|
+
else if (P > 1) {
|
|
2978
|
+
for (var $ = Array(P), M = 0; M < P; M++)
|
|
2979
|
+
$[M] = arguments[M + 2];
|
|
2980
|
+
Object.freeze && Object.freeze($), y.children = $;
|
|
2981
|
+
}
|
|
2982
|
+
if (n && n.defaultProps) {
|
|
2983
|
+
var H = n.defaultProps;
|
|
2984
|
+
for (d in H)
|
|
2985
|
+
y[d] === void 0 && (y[d] = H[d]);
|
|
2986
|
+
}
|
|
2987
|
+
if (E || _) {
|
|
2988
|
+
var N = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
2989
|
+
E && G(y, N), _ && Se(y, N);
|
|
2990
|
+
}
|
|
2991
|
+
return Te(n, E, _, b, x, L.current, y);
|
|
2992
|
+
}
|
|
2993
|
+
function wt(n, a) {
|
|
2994
|
+
var l = Te(n.type, a, n.ref, n._self, n._source, n._owner, n.props);
|
|
2995
|
+
return l;
|
|
2996
|
+
}
|
|
2997
|
+
function Qt(n, a, l) {
|
|
2998
|
+
if (n == null)
|
|
2999
|
+
throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + n + ".");
|
|
3000
|
+
var d, y = t({}, n.props), E = n.key, _ = n.ref, b = n._self, x = n._source, P = n._owner;
|
|
3001
|
+
if (a != null) {
|
|
3002
|
+
We(a) && (_ = a.ref, P = L.current), He(a) && (E = "" + a.key);
|
|
3003
|
+
var $;
|
|
3004
|
+
n.type && n.type.defaultProps && ($ = n.type.defaultProps);
|
|
3005
|
+
for (d in a)
|
|
3006
|
+
le.call(a, d) && !mt.hasOwnProperty(d) && (a[d] === void 0 && $ !== void 0 ? y[d] = $[d] : y[d] = a[d]);
|
|
3007
|
+
}
|
|
3008
|
+
var M = arguments.length - 2;
|
|
3009
|
+
if (M === 1)
|
|
3010
|
+
y.children = l;
|
|
3011
|
+
else if (M > 1) {
|
|
3012
|
+
for (var H = Array(M), N = 0; N < M; N++)
|
|
3013
|
+
H[N] = arguments[N + 2];
|
|
3014
|
+
y.children = H;
|
|
3015
|
+
}
|
|
3016
|
+
return Te(n.type, E, _, b, x, P, y);
|
|
3017
|
+
}
|
|
3018
|
+
function re(n) {
|
|
3019
|
+
return typeof n == "object" && n !== null && n.$$typeof === s;
|
|
3020
|
+
}
|
|
3021
|
+
var Et = ".", Gt = ":";
|
|
3022
|
+
function Ot(n) {
|
|
3023
|
+
var a = /[=:]/g, l = {
|
|
3024
|
+
"=": "=0",
|
|
3025
|
+
":": "=2"
|
|
3026
|
+
}, d = ("" + n).replace(a, function(y) {
|
|
3027
|
+
return l[y];
|
|
3028
|
+
});
|
|
3029
|
+
return "$" + d;
|
|
3030
|
+
}
|
|
3031
|
+
var At = !1, qt = /\/+/g;
|
|
3032
|
+
function Ce(n) {
|
|
3033
|
+
return ("" + n).replace(qt, "$&/");
|
|
3034
|
+
}
|
|
3035
|
+
var pe = 10, ne = [];
|
|
3036
|
+
function Re(n, a, l, d) {
|
|
3037
|
+
if (ne.length) {
|
|
3038
|
+
var y = ne.pop();
|
|
3039
|
+
return y.result = n, y.keyPrefix = a, y.func = l, y.context = d, y.count = 0, y;
|
|
3040
|
+
} else
|
|
3041
|
+
return {
|
|
3042
|
+
result: n,
|
|
3043
|
+
keyPrefix: a,
|
|
3044
|
+
func: l,
|
|
3045
|
+
context: d,
|
|
3046
|
+
count: 0
|
|
3047
|
+
};
|
|
3048
|
+
}
|
|
3049
|
+
function xe(n) {
|
|
3050
|
+
n.result = null, n.keyPrefix = null, n.func = null, n.context = null, n.count = 0, ne.length < pe && ne.push(n);
|
|
3051
|
+
}
|
|
3052
|
+
function Y(n, a, l, d) {
|
|
3053
|
+
var y = typeof n;
|
|
3054
|
+
(y === "undefined" || y === "boolean") && (n = null);
|
|
3055
|
+
var E = !1;
|
|
3056
|
+
if (n === null)
|
|
3057
|
+
E = !0;
|
|
3058
|
+
else
|
|
3059
|
+
switch (y) {
|
|
3060
|
+
case "string":
|
|
3061
|
+
case "number":
|
|
3062
|
+
E = !0;
|
|
3063
|
+
break;
|
|
3064
|
+
case "object":
|
|
3065
|
+
switch (n.$$typeof) {
|
|
3066
|
+
case s:
|
|
3067
|
+
case u:
|
|
3068
|
+
E = !0;
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
if (E)
|
|
3072
|
+
return l(
|
|
3073
|
+
d,
|
|
3074
|
+
n,
|
|
3075
|
+
// If it's the only child, treat the name as if it was wrapped in an array
|
|
3076
|
+
// so that it's consistent if the number of children grows.
|
|
3077
|
+
a === "" ? Et + Ke(n, 0) : a
|
|
3078
|
+
), 1;
|
|
3079
|
+
var _, b, x = 0, P = a === "" ? Et : a + Gt;
|
|
3080
|
+
if (Array.isArray(n))
|
|
3081
|
+
for (var $ = 0; $ < n.length; $++)
|
|
3082
|
+
_ = n[$], b = P + Ke(_, $), x += Y(_, b, l, d);
|
|
3083
|
+
else {
|
|
3084
|
+
var M = Ve(n);
|
|
3085
|
+
if (typeof M == "function") {
|
|
3086
|
+
M === n.entries && (At || Ee("Using Maps as children is deprecated and will be removed in a future major release. Consider converting children to an array of keyed ReactElements instead."), At = !0);
|
|
3087
|
+
for (var H = M.call(n), N, _r = 0; !(N = H.next()).done; )
|
|
3088
|
+
_ = N.value, b = P + Ke(_, _r++), x += Y(_, b, l, d);
|
|
3089
|
+
} else if (y === "object") {
|
|
3090
|
+
var Mt = "";
|
|
3091
|
+
Mt = " If you meant to render a collection of children, use an array instead." + ee.getStackAddendum();
|
|
3092
|
+
var rt = "" + n;
|
|
3093
|
+
throw Error("Objects are not valid as a React child (found: " + (rt === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : rt) + ")." + Mt);
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
return x;
|
|
3097
|
+
}
|
|
3098
|
+
function Je(n, a, l) {
|
|
3099
|
+
return n == null ? 0 : Y(n, "", a, l);
|
|
3100
|
+
}
|
|
3101
|
+
function Ke(n, a) {
|
|
3102
|
+
return typeof n == "object" && n !== null && n.key != null ? Ot(n.key) : a.toString(36);
|
|
3103
|
+
}
|
|
3104
|
+
function zt(n, a, l) {
|
|
3105
|
+
var d = n.func, y = n.context;
|
|
3106
|
+
d.call(y, a, n.count++);
|
|
3107
|
+
}
|
|
3108
|
+
function Yt(n, a, l) {
|
|
3109
|
+
if (n == null)
|
|
3110
|
+
return n;
|
|
3111
|
+
var d = Re(null, null, a, l);
|
|
3112
|
+
Je(n, zt, d), xe(d);
|
|
3113
|
+
}
|
|
3114
|
+
function Wt(n, a, l) {
|
|
3115
|
+
var d = n.result, y = n.keyPrefix, E = n.func, _ = n.context, b = E.call(_, a, n.count++);
|
|
3116
|
+
Array.isArray(b) ? Pe(b, d, l, function(x) {
|
|
3117
|
+
return x;
|
|
3118
|
+
}) : b != null && (re(b) && (b = wt(
|
|
3119
|
+
b,
|
|
3120
|
+
// Keep both the (mapped) and old keys if they differ, just as
|
|
3121
|
+
// traverseAllChildren used to do for objects as children
|
|
3122
|
+
y + (b.key && (!a || a.key !== b.key) ? Ce(b.key) + "/" : "") + l
|
|
3123
|
+
)), d.push(b));
|
|
3124
|
+
}
|
|
3125
|
+
function Pe(n, a, l, d, y) {
|
|
3126
|
+
var E = "";
|
|
3127
|
+
l != null && (E = Ce(l) + "/");
|
|
3128
|
+
var _ = Re(a, E, d, y);
|
|
3129
|
+
Je(n, Wt, _), xe(_);
|
|
3130
|
+
}
|
|
3131
|
+
function St(n, a, l) {
|
|
3132
|
+
if (n == null)
|
|
3133
|
+
return n;
|
|
3134
|
+
var d = [];
|
|
3135
|
+
return Pe(n, d, null, a, l), d;
|
|
3136
|
+
}
|
|
3137
|
+
function W(n) {
|
|
3138
|
+
return Je(n, function() {
|
|
3139
|
+
return null;
|
|
3140
|
+
}, null);
|
|
3141
|
+
}
|
|
3142
|
+
function Ht(n) {
|
|
3143
|
+
var a = [];
|
|
3144
|
+
return Pe(n, a, null, function(l) {
|
|
3145
|
+
return l;
|
|
3146
|
+
}), a;
|
|
3147
|
+
}
|
|
3148
|
+
function Jt(n) {
|
|
3149
|
+
if (!re(n))
|
|
3150
|
+
throw Error("React.Children.only expected to receive a single React element child.");
|
|
3151
|
+
return n;
|
|
3152
|
+
}
|
|
3153
|
+
function Kt(n, a) {
|
|
3154
|
+
a === void 0 ? a = null : a !== null && typeof a != "function" && A("createContext: Expected the optional second argument to be a function. Instead received: %s", a);
|
|
3155
|
+
var l = {
|
|
3156
|
+
$$typeof: O,
|
|
3157
|
+
_calculateChangedBits: a,
|
|
3158
|
+
// As a workaround to support multiple concurrent renderers, we categorize
|
|
3159
|
+
// some renderers as primary and others as secondary. We only expect
|
|
3160
|
+
// there to be two concurrent renderers at most: React Native (primary) and
|
|
3161
|
+
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
3162
|
+
// Secondary renderers store their context values on separate fields.
|
|
3163
|
+
_currentValue: n,
|
|
3164
|
+
_currentValue2: n,
|
|
3165
|
+
// Used to track how many concurrent renderers this context currently
|
|
3166
|
+
// supports within in a single renderer. Such as parallel server rendering.
|
|
3167
|
+
_threadCount: 0,
|
|
3168
|
+
// These are circular
|
|
3169
|
+
Provider: null,
|
|
3170
|
+
Consumer: null
|
|
3171
|
+
};
|
|
3172
|
+
l.Provider = {
|
|
3173
|
+
$$typeof: g,
|
|
3174
|
+
_context: l
|
|
3175
|
+
};
|
|
3176
|
+
var d = !1, y = !1;
|
|
3177
|
+
{
|
|
3178
|
+
var E = {
|
|
3179
|
+
$$typeof: O,
|
|
3180
|
+
_context: l,
|
|
3181
|
+
_calculateChangedBits: l._calculateChangedBits
|
|
3182
|
+
};
|
|
3183
|
+
Object.defineProperties(E, {
|
|
3184
|
+
Provider: {
|
|
3185
|
+
get: function() {
|
|
3186
|
+
return y || (y = !0, A("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), l.Provider;
|
|
3187
|
+
},
|
|
3188
|
+
set: function(_) {
|
|
3189
|
+
l.Provider = _;
|
|
3190
|
+
}
|
|
3191
|
+
},
|
|
3192
|
+
_currentValue: {
|
|
3193
|
+
get: function() {
|
|
3194
|
+
return l._currentValue;
|
|
3195
|
+
},
|
|
3196
|
+
set: function(_) {
|
|
3197
|
+
l._currentValue = _;
|
|
3198
|
+
}
|
|
3199
|
+
},
|
|
3200
|
+
_currentValue2: {
|
|
3201
|
+
get: function() {
|
|
3202
|
+
return l._currentValue2;
|
|
3203
|
+
},
|
|
3204
|
+
set: function(_) {
|
|
3205
|
+
l._currentValue2 = _;
|
|
3206
|
+
}
|
|
3207
|
+
},
|
|
3208
|
+
_threadCount: {
|
|
3209
|
+
get: function() {
|
|
3210
|
+
return l._threadCount;
|
|
3211
|
+
},
|
|
3212
|
+
set: function(_) {
|
|
3213
|
+
l._threadCount = _;
|
|
3214
|
+
}
|
|
3215
|
+
},
|
|
3216
|
+
Consumer: {
|
|
3217
|
+
get: function() {
|
|
3218
|
+
return d || (d = !0, A("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), l.Consumer;
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
}), l.Consumer = E;
|
|
3222
|
+
}
|
|
3223
|
+
return l._currentRenderer = null, l._currentRenderer2 = null, l;
|
|
3224
|
+
}
|
|
3225
|
+
function Xt(n) {
|
|
3226
|
+
var a = {
|
|
3227
|
+
$$typeof: _e,
|
|
3228
|
+
_ctor: n,
|
|
3229
|
+
// React uses these fields to store the result.
|
|
3230
|
+
_status: -1,
|
|
3231
|
+
_result: null
|
|
3232
|
+
};
|
|
3233
|
+
{
|
|
3234
|
+
var l, d;
|
|
3235
|
+
Object.defineProperties(a, {
|
|
3236
|
+
defaultProps: {
|
|
3237
|
+
configurable: !0,
|
|
3238
|
+
get: function() {
|
|
3239
|
+
return l;
|
|
3240
|
+
},
|
|
3241
|
+
set: function(y) {
|
|
3242
|
+
A("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), l = y, Object.defineProperty(a, "defaultProps", {
|
|
3243
|
+
enumerable: !0
|
|
3244
|
+
});
|
|
3245
|
+
}
|
|
3246
|
+
},
|
|
3247
|
+
propTypes: {
|
|
3248
|
+
configurable: !0,
|
|
3249
|
+
get: function() {
|
|
3250
|
+
return d;
|
|
3251
|
+
},
|
|
3252
|
+
set: function(y) {
|
|
3253
|
+
A("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), d = y, Object.defineProperty(a, "propTypes", {
|
|
3254
|
+
enumerable: !0
|
|
3255
|
+
});
|
|
3256
|
+
}
|
|
3257
|
+
}
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
return a;
|
|
3261
|
+
}
|
|
3262
|
+
function Zt(n) {
|
|
3263
|
+
return n != null && n.$$typeof === Z ? A("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof n != "function" ? A("forwardRef requires a render function but was given %s.", n === null ? "null" : typeof n) : n.length !== 0 && n.length !== 2 && A("forwardRef render functions accept exactly two parameters: props and ref. %s", n.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), n != null && (n.defaultProps != null || n.propTypes != null) && A("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"), {
|
|
3264
|
+
$$typeof: q,
|
|
3265
|
+
render: n
|
|
3266
|
+
};
|
|
3267
|
+
}
|
|
3268
|
+
function V(n) {
|
|
3269
|
+
return typeof n == "string" || typeof n == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
3270
|
+
n === p || n === X || n === m || n === h || n === ve || n === me || typeof n == "object" && n !== null && (n.$$typeof === _e || n.$$typeof === Z || n.$$typeof === g || n.$$typeof === O || n.$$typeof === q || n.$$typeof === ut || n.$$typeof === ct || n.$$typeof === Le || n.$$typeof === ue);
|
|
3271
|
+
}
|
|
3272
|
+
function er(n, a) {
|
|
3273
|
+
return V(n) || A("memo: The first argument must be a component. Instead received: %s", n === null ? "null" : typeof n), {
|
|
3274
|
+
$$typeof: Z,
|
|
3275
|
+
type: n,
|
|
3276
|
+
compare: a === void 0 ? null : a
|
|
3277
|
+
};
|
|
3278
|
+
}
|
|
3279
|
+
function D() {
|
|
3280
|
+
var n = De.current;
|
|
3281
|
+
if (n === null)
|
|
3282
|
+
throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
3283
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
3284
|
+
2. You might be breaking the Rules of Hooks
|
|
3285
|
+
3. You might have more than one copy of React in the same app
|
|
3286
|
+
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.`);
|
|
3287
|
+
return n;
|
|
3288
|
+
}
|
|
3289
|
+
function tr(n, a) {
|
|
3290
|
+
var l = D();
|
|
3291
|
+
if (a !== void 0 && A("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s", a, typeof a == "number" && Array.isArray(arguments[2]) ? `
|
|
3292
|
+
|
|
3293
|
+
Did you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks` : ""), n._context !== void 0) {
|
|
3294
|
+
var d = n._context;
|
|
3295
|
+
d.Consumer === n ? A("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : d.Provider === n && A("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
|
|
3296
|
+
}
|
|
3297
|
+
return l.useContext(n, a);
|
|
3298
|
+
}
|
|
3299
|
+
function rr(n) {
|
|
3300
|
+
var a = D();
|
|
3301
|
+
return a.useState(n);
|
|
3302
|
+
}
|
|
3303
|
+
function nr(n, a, l) {
|
|
3304
|
+
var d = D();
|
|
3305
|
+
return d.useReducer(n, a, l);
|
|
3306
|
+
}
|
|
3307
|
+
function ie(n) {
|
|
3308
|
+
var a = D();
|
|
3309
|
+
return a.useRef(n);
|
|
3310
|
+
}
|
|
3311
|
+
function ir(n, a) {
|
|
3312
|
+
var l = D();
|
|
3313
|
+
return l.useEffect(n, a);
|
|
3314
|
+
}
|
|
3315
|
+
function or(n, a) {
|
|
3316
|
+
var l = D();
|
|
3317
|
+
return l.useLayoutEffect(n, a);
|
|
3318
|
+
}
|
|
3319
|
+
function ar(n, a) {
|
|
3320
|
+
var l = D();
|
|
3321
|
+
return l.useCallback(n, a);
|
|
3322
|
+
}
|
|
3323
|
+
function sr(n, a) {
|
|
3324
|
+
var l = D();
|
|
3325
|
+
return l.useMemo(n, a);
|
|
3326
|
+
}
|
|
3327
|
+
function ur(n, a, l) {
|
|
3328
|
+
var d = D();
|
|
3329
|
+
return d.useImperativeHandle(n, a, l);
|
|
3330
|
+
}
|
|
3331
|
+
function oe(n, a) {
|
|
3332
|
+
{
|
|
3333
|
+
var l = D();
|
|
3334
|
+
return l.useDebugValue(n, a);
|
|
3335
|
+
}
|
|
3336
|
+
}
|
|
3337
|
+
var Xe;
|
|
3338
|
+
Xe = !1;
|
|
3339
|
+
function Tt() {
|
|
3340
|
+
if (L.current) {
|
|
3341
|
+
var n = F(L.current.type);
|
|
3342
|
+
if (n)
|
|
3343
|
+
return `
|
|
3344
|
+
|
|
3345
|
+
Check the render method of \`` + n + "`.";
|
|
3346
|
+
}
|
|
3347
|
+
return "";
|
|
3348
|
+
}
|
|
3349
|
+
function cr(n) {
|
|
3350
|
+
if (n !== void 0) {
|
|
3351
|
+
var a = n.fileName.replace(/^.*[\\\/]/, ""), l = n.lineNumber;
|
|
3352
|
+
return `
|
|
3353
|
+
|
|
3354
|
+
Check your code at ` + a + ":" + l + ".";
|
|
3355
|
+
}
|
|
3356
|
+
return "";
|
|
3357
|
+
}
|
|
3358
|
+
function lr(n) {
|
|
3359
|
+
return n != null ? cr(n.__source) : "";
|
|
3360
|
+
}
|
|
3361
|
+
var Ct = {};
|
|
3362
|
+
function fr(n) {
|
|
3363
|
+
var a = Tt();
|
|
3364
|
+
if (!a) {
|
|
3365
|
+
var l = typeof n == "string" ? n : n.displayName || n.name;
|
|
3366
|
+
l && (a = `
|
|
3367
|
+
|
|
3368
|
+
Check the top-level render call using <` + l + ">.");
|
|
3369
|
+
}
|
|
3370
|
+
return a;
|
|
3371
|
+
}
|
|
3372
|
+
function Ze(n, a) {
|
|
3373
|
+
if (!(!n._store || n._store.validated || n.key != null)) {
|
|
3374
|
+
n._store.validated = !0;
|
|
3375
|
+
var l = fr(a);
|
|
3376
|
+
if (!Ct[l]) {
|
|
3377
|
+
Ct[l] = !0;
|
|
3378
|
+
var d = "";
|
|
3379
|
+
n && n._owner && n._owner !== L.current && (d = " It was passed a child from " + F(n._owner.type) + "."), te(n), A('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.', l, d), te(null);
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
}
|
|
3383
|
+
function he(n, a) {
|
|
3384
|
+
if (typeof n == "object") {
|
|
3385
|
+
if (Array.isArray(n))
|
|
3386
|
+
for (var l = 0; l < n.length; l++) {
|
|
3387
|
+
var d = n[l];
|
|
3388
|
+
re(d) && Ze(d, a);
|
|
3389
|
+
}
|
|
3390
|
+
else if (re(n))
|
|
3391
|
+
n._store && (n._store.validated = !0);
|
|
3392
|
+
else if (n) {
|
|
3393
|
+
var y = Ve(n);
|
|
3394
|
+
if (typeof y == "function" && y !== n.entries)
|
|
3395
|
+
for (var E = y.call(n), _; !(_ = E.next()).done; )
|
|
3396
|
+
re(_.value) && Ze(_.value, a);
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
function Rt(n) {
|
|
3401
|
+
{
|
|
3402
|
+
var a = n.type;
|
|
3403
|
+
if (a == null || typeof a == "string")
|
|
3404
|
+
return;
|
|
3405
|
+
var l = F(a), d;
|
|
3406
|
+
if (typeof a == "function")
|
|
3407
|
+
d = a.propTypes;
|
|
3408
|
+
else if (typeof a == "object" && (a.$$typeof === q || // Note: Memo only checks outer props here.
|
|
3409
|
+
// Inner props are checked in the reconciler.
|
|
3410
|
+
a.$$typeof === Z))
|
|
3411
|
+
d = a.propTypes;
|
|
3412
|
+
else
|
|
3413
|
+
return;
|
|
3414
|
+
d ? (te(n), e(d, n.props, "prop", l, ee.getStackAddendum), te(null)) : a.PropTypes !== void 0 && !Xe && (Xe = !0, A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown")), typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
3415
|
+
}
|
|
3416
|
+
}
|
|
3417
|
+
function et(n) {
|
|
3418
|
+
{
|
|
3419
|
+
te(n);
|
|
3420
|
+
for (var a = Object.keys(n.props), l = 0; l < a.length; l++) {
|
|
3421
|
+
var d = a[l];
|
|
3422
|
+
if (d !== "children" && d !== "key") {
|
|
3423
|
+
A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", d);
|
|
3424
|
+
break;
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3427
|
+
n.ref !== null && A("Invalid attribute `ref` supplied to `React.Fragment`."), te(null);
|
|
3428
|
+
}
|
|
3429
|
+
}
|
|
3430
|
+
function xt(n, a, l) {
|
|
3431
|
+
var d = V(n);
|
|
3432
|
+
if (!d) {
|
|
3433
|
+
var y = "";
|
|
3434
|
+
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
3435
|
+
var E = lr(a);
|
|
3436
|
+
E ? y += E : y += Tt();
|
|
3437
|
+
var _;
|
|
3438
|
+
n === null ? _ = "null" : Array.isArray(n) ? _ = "array" : n !== void 0 && n.$$typeof === s ? (_ = "<" + (F(n.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof n, A("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, y);
|
|
3439
|
+
}
|
|
3440
|
+
var b = bt.apply(this, arguments);
|
|
3441
|
+
if (b == null)
|
|
3442
|
+
return b;
|
|
3443
|
+
if (d)
|
|
3444
|
+
for (var x = 2; x < arguments.length; x++)
|
|
3445
|
+
he(arguments[x], n);
|
|
3446
|
+
return n === p ? et(b) : Rt(b), b;
|
|
3447
|
+
}
|
|
3448
|
+
var Pt = !1;
|
|
3449
|
+
function dr(n) {
|
|
3450
|
+
var a = xt.bind(null, n);
|
|
3451
|
+
return a.type = n, Pt || (Pt = !0, Ee("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(a, "type", {
|
|
3452
|
+
enumerable: !1,
|
|
3453
|
+
get: function() {
|
|
3454
|
+
return Ee("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
|
|
3455
|
+
value: n
|
|
3456
|
+
}), n;
|
|
3457
|
+
}
|
|
3458
|
+
}), a;
|
|
3459
|
+
}
|
|
3460
|
+
function pr(n, a, l) {
|
|
3461
|
+
for (var d = Qt.apply(this, arguments), y = 2; y < arguments.length; y++)
|
|
3462
|
+
he(arguments[y], d.type);
|
|
3463
|
+
return Rt(d), d;
|
|
3464
|
+
}
|
|
3465
|
+
try {
|
|
3466
|
+
var jt = Object.freeze({}), hr = /* @__PURE__ */ new Map([[jt, null]]), tt = /* @__PURE__ */ new Set([jt]);
|
|
3467
|
+
hr.set(0, 0), tt.add(0);
|
|
3468
|
+
} catch {
|
|
3469
|
+
}
|
|
3470
|
+
var gr = xt, yr = pr, vr = dr, mr = {
|
|
3471
|
+
map: St,
|
|
3472
|
+
forEach: Yt,
|
|
3473
|
+
count: W,
|
|
3474
|
+
toArray: Ht,
|
|
3475
|
+
only: Jt
|
|
3476
|
+
};
|
|
3477
|
+
S.Children = mr, S.Component = z, S.Fragment = p, S.Profiler = m, S.PureComponent = Oe, S.StrictMode = h, S.Suspense = ve, S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ne, S.cloneElement = yr, S.createContext = Kt, S.createElement = gr, S.createFactory = vr, S.createRef = Ye, S.forwardRef = Zt, S.isValidElement = re, S.lazy = Xt, S.memo = er, S.useCallback = ar, S.useContext = tr, S.useDebugValue = oe, S.useEffect = ir, S.useImperativeHandle = ur, S.useLayoutEffect = or, S.useMemo = sr, S.useReducer = nr, S.useRef = ie, S.useState = rr, S.version = r;
|
|
3478
|
+
}();
|
|
3479
|
+
process.env.NODE_ENV === "production" ? it.exports = T : it.exports = S;
|
|
3480
|
+
var Me = it.exports, Ar = {
|
|
3481
|
+
sdkSemver: "1.13.1",
|
|
3482
|
+
techVersion: Me.version,
|
|
3483
|
+
sdkCode: "J"
|
|
3484
|
+
}, La = (
|
|
3485
|
+
/** @class */
|
|
3486
|
+
function(t) {
|
|
3487
|
+
Jn(e, t);
|
|
3488
|
+
function e(r) {
|
|
3489
|
+
var o = t.call(this, r) || this;
|
|
3490
|
+
return o.imageRef = Me.createRef(), o;
|
|
3491
|
+
}
|
|
3492
|
+
return e.prototype.componentDidMount = function() {
|
|
3493
|
+
this.htmlLayerInstance = new Oi(this.imageRef.current, this.props.cldImg, this.props.plugins, Ar);
|
|
3494
|
+
}, e.prototype.componentDidUpdate = function() {
|
|
3495
|
+
Lt(this.htmlLayerInstance.htmlPluginState), this.htmlLayerInstance.update(this.props.cldImg, this.props.plugins, Ar);
|
|
3496
|
+
}, e.prototype.componentWillUnmount = function() {
|
|
3497
|
+
Lt(this.htmlLayerInstance.htmlPluginState), this.htmlLayerInstance.unmount();
|
|
3498
|
+
}, e.prototype.render = function() {
|
|
3499
|
+
var r = this.props;
|
|
3500
|
+
r.cldImg, r.plugins;
|
|
3501
|
+
var o = Kn(r, ["cldImg", "plugins"]);
|
|
3502
|
+
if (qr())
|
|
3503
|
+
return Me.createElement("img", nt({ suppressHydrationWarning: !0 }, o, { ref: this.imageRef }));
|
|
3504
|
+
var s = la(this.props.plugins, this.props.cldImg, Ar);
|
|
3505
|
+
return Me.createElement("img", nt({}, o, { src: s }));
|
|
3506
|
+
}, e;
|
|
3507
|
+
}(Me.Component)
|
|
3508
|
+
), Fa = ["controls", "loop", "muted", "poster", "preload", "autoplay", "playsinline"];
|
|
3509
|
+
(function(t) {
|
|
3510
|
+
Jn(e, t);
|
|
3511
|
+
function e(r) {
|
|
3512
|
+
var o = t.call(this, r) || this;
|
|
3513
|
+
return o.videoRef = it.exports.createRef(), o.attachRef = o.attachRef.bind(o), o;
|
|
3514
|
+
}
|
|
3515
|
+
return e.prototype.componentDidMount = function() {
|
|
3516
|
+
this.htmlVideoLayerInstance = new ea(this.videoRef && this.videoRef.current, this.props.cldVid, this.props.sources, this.props.plugins, this.getVideoAttributes(), this.props.cldPoster, {
|
|
3517
|
+
useFetchFormat: this.props.useFetchFormat
|
|
3518
|
+
});
|
|
3519
|
+
}, e.prototype.componentDidUpdate = function() {
|
|
3520
|
+
Lt(this.htmlVideoLayerInstance.htmlPluginState), this.htmlVideoLayerInstance.update(this.props.cldVid, this.props.sources, this.props.plugins, this.getVideoAttributes(), this.props.cldPoster);
|
|
3521
|
+
}, e.prototype.componentWillUnmount = function() {
|
|
3522
|
+
Lt(this.htmlVideoLayerInstance.htmlPluginState);
|
|
3523
|
+
}, e.prototype.getVideoAttributes = function() {
|
|
3524
|
+
var r = this, o = {};
|
|
3525
|
+
return Fa.forEach(function(s) {
|
|
3526
|
+
s in r.props && (o[s] = r.props[s]);
|
|
3527
|
+
}), o;
|
|
3528
|
+
}, e.prototype.attachRef = function(r) {
|
|
3529
|
+
this.videoRef.current = r;
|
|
3530
|
+
var o = this.props.innerRef;
|
|
3531
|
+
o && (o instanceof Function ? o(r) : o.current = r);
|
|
3532
|
+
}, e.prototype.render = function() {
|
|
3533
|
+
var r = this.props;
|
|
3534
|
+
r.cldVid, r.cldPoster, r.plugins, r.sources, r.innerRef, r.useFetchFormat;
|
|
3535
|
+
var o = Kn(r, ["cldVid", "cldPoster", "plugins", "sources", "innerRef", "useFetchFormat"]);
|
|
3536
|
+
return Me.createElement("video", nt({}, o, { ref: this.attachRef }));
|
|
3537
|
+
}, e;
|
|
3538
|
+
})(it.exports.Component);
|
|
3539
|
+
const Va = ({
|
|
3540
|
+
alt: t = "img",
|
|
3541
|
+
height: e = "",
|
|
3542
|
+
width: r = "",
|
|
3543
|
+
plugins: o = [ia(), ua()],
|
|
3544
|
+
publicId: s
|
|
3545
|
+
}) => {
|
|
3546
|
+
const u = bi({ publicId: s });
|
|
3547
|
+
return /* @__PURE__ */ mi(
|
|
3548
|
+
La,
|
|
3549
|
+
{
|
|
3550
|
+
alt: t,
|
|
3551
|
+
cldImg: u,
|
|
3552
|
+
height: e,
|
|
3553
|
+
plugins: o,
|
|
3554
|
+
width: r
|
|
3555
|
+
}
|
|
3556
|
+
);
|
|
3557
|
+
}, Qa = _i.memo(Va);
|
|
3558
|
+
export {
|
|
3559
|
+
Qa as M,
|
|
3560
|
+
ua as p
|
|
3561
|
+
};
|