stream-engine-widgets 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArrowForwardIosRounded-B6hhTKmm.js → ArrowForwardIosRounded-kAWxFI14.js} +2 -3
- package/dist/{ArrowForwardIosRounded-B6hhTKmm.js.map → ArrowForwardIosRounded-kAWxFI14.js.map} +1 -1
- package/dist/{PlayArrowRounded-CAKOiTT6.js → PlayArrowRounded-C3I-U6R0.js} +2 -3
- package/dist/{PlayArrowRounded-CAKOiTT6.js.map → PlayArrowRounded-C3I-U6R0.js.map} +1 -1
- package/dist/{gallery-B8LUc7bk.js → gallery-CpY4HCl_.js} +3 -5
- package/dist/{gallery-B8LUc7bk.js.map → gallery-CpY4HCl_.js.map} +1 -1
- package/dist/{style-Cvh-1NSh.js → index-D_bS9-0-.js} +32698 -21989
- package/dist/index-D_bS9-0-.js.map +1 -0
- package/dist/matchItem-CdD0nYG4.js +188 -0
- package/dist/matchItem-CdD0nYG4.js.map +1 -0
- package/dist/{matches-CschU_h9.js → matches-D_5MbDt9.js} +45 -37
- package/dist/matches-D_5MbDt9.js.map +1 -0
- package/dist/{matchesStandalone-DbqxMvqg.js → matchesStandalone-DBX3JZdV.js} +44 -36
- package/dist/matchesStandalone-DBX3JZdV.js.map +1 -0
- package/dist/{player-DxyaJi4M.js → player-DsDocv6n.js} +2 -4
- package/dist/{player-DxyaJi4M.js.map → player-DsDocv6n.js.map} +1 -1
- package/dist/{poster-LqRyW65i.js → poster-yKbQ7hs7.js} +3 -4
- package/dist/{poster-LqRyW65i.js.map → poster-yKbQ7hs7.js.map} +1 -1
- package/dist/{posterItem-rRMX2uVL.js → posterItem-9DATZ2Zn.js} +4 -5
- package/dist/{posterItem-rRMX2uVL.js.map → posterItem-9DATZ2Zn.js.map} +1 -1
- package/dist/{scroll-DxmvAhab.js → scroll-DIJEIwCN.js} +4 -6
- package/dist/{scroll-DxmvAhab.js.map → scroll-DIJEIwCN.js.map} +1 -1
- package/dist/{stateTimeIndicator-CiAT9Izj.js → stateTimeIndicator-BbN1iEb6.js} +2 -2
- package/dist/{stateTimeIndicator-CiAT9Izj.js.map → stateTimeIndicator-BbN1iEb6.js.map} +1 -1
- package/dist/{story-C-jPJ27D.js → story-ByDp9dzj.js} +4 -5
- package/dist/{story-C-jPJ27D.js.map → story-ByDp9dzj.js.map} +1 -1
- package/dist/stream-engine-widgets.css +35 -22
- package/dist/stream-engine-widgets.js +1 -1
- package/dist/{useMediaQuery-DyRc0pGH.js → useMediaQuery-CfqnIvsa.js} +22 -3
- package/dist/useMediaQuery-CfqnIvsa.js.map +1 -0
- package/package.json +3 -2
- package/dist/createSvgIcon-Ia23aJjr.js +0 -5279
- package/dist/createSvgIcon-Ia23aJjr.js.map +0 -1
- package/dist/galleryItem-CRNDBJpB.js +0 -24
- package/dist/galleryItem-CRNDBJpB.js.map +0 -1
- package/dist/index-Cli5VWqj.js +0 -2481
- package/dist/index-Cli5VWqj.js.map +0 -1
- package/dist/lib-Bi4hDut5.js +0 -1241
- package/dist/lib-Bi4hDut5.js.map +0 -1
- package/dist/matches-CschU_h9.js.map +0 -1
- package/dist/matchesStandalone-DbqxMvqg.js.map +0 -1
- package/dist/player-static-B1qEACdr.js +0 -135
- package/dist/player-static-B1qEACdr.js.map +0 -1
- package/dist/style-Cvh-1NSh.js.map +0 -1
- package/dist/thumbnail-CQDzPpJc.js +0 -34
- package/dist/thumbnail-CQDzPpJc.js.map +0 -1
- package/dist/useMediaQuery-DyRc0pGH.js.map +0 -1
package/dist/index-Cli5VWqj.js
DELETED
|
@@ -1,2481 +0,0 @@
|
|
|
1
|
-
import { r as reactDomExports } from './index-Cc_e_B7r.js';
|
|
2
|
-
import { g as getDefaultExportFromCjs, r as reactExports } from './index-DxAI6Tai.js';
|
|
3
|
-
|
|
4
|
-
function _mergeNamespaces(n, m) {
|
|
5
|
-
for (var i = 0; i < m.length; i++) {
|
|
6
|
-
const e = m[i];
|
|
7
|
-
if (typeof e !== 'string' && !Array.isArray(e)) { for (const k in e) {
|
|
8
|
-
if (k !== 'default' && !(k in n)) {
|
|
9
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
-
if (d) {
|
|
11
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: () => e[k]
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
} }
|
|
18
|
-
}
|
|
19
|
-
return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: 'Module' }));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const buildIdentifier = "[0-9A-Za-z-]+";
|
|
23
|
-
const build = `(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`;
|
|
24
|
-
const numericIdentifier = "0|[1-9]\\d*";
|
|
25
|
-
const numericIdentifierLoose = "[0-9]+";
|
|
26
|
-
const nonNumericIdentifier = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
|
|
27
|
-
const preReleaseIdentifierLoose = `(?:${numericIdentifierLoose}|${nonNumericIdentifier})`;
|
|
28
|
-
const preReleaseLoose = `(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`;
|
|
29
|
-
const preReleaseIdentifier = `(?:${numericIdentifier}|${nonNumericIdentifier})`;
|
|
30
|
-
const preRelease = `(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`;
|
|
31
|
-
const xRangeIdentifier = `${numericIdentifier}|x|X|\\*`;
|
|
32
|
-
const xRangePlain = `[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`;
|
|
33
|
-
const hyphenRange = `^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`;
|
|
34
|
-
const mainVersionLoose = `(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`;
|
|
35
|
-
const loosePlain = `[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`;
|
|
36
|
-
const gtlt = "((?:<|>)?=?)";
|
|
37
|
-
const comparatorTrim = `(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`;
|
|
38
|
-
const loneTilde = "(?:~>?)";
|
|
39
|
-
const tildeTrim = `(\\s*)${loneTilde}\\s+`;
|
|
40
|
-
const loneCaret = "(?:\\^)";
|
|
41
|
-
const caretTrim = `(\\s*)${loneCaret}\\s+`;
|
|
42
|
-
const star = "(<|>)?=?\\s*\\*";
|
|
43
|
-
const caret = `^${loneCaret}${xRangePlain}$`;
|
|
44
|
-
const mainVersion = `(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`;
|
|
45
|
-
const fullPlain = `v?${mainVersion}${preRelease}?${build}?`;
|
|
46
|
-
const tilde = `^${loneTilde}${xRangePlain}$`;
|
|
47
|
-
const xRange = `^${gtlt}\\s*${xRangePlain}$`;
|
|
48
|
-
const comparator = `^${gtlt}\\s*(${fullPlain})$|^$`;
|
|
49
|
-
const gte0 = "^\\s*>=\\s*0.0.0\\s*$";
|
|
50
|
-
function parseRegex(source) {
|
|
51
|
-
return new RegExp(source);
|
|
52
|
-
}
|
|
53
|
-
function isXVersion(version) {
|
|
54
|
-
return !version || version.toLowerCase() === "x" || version === "*";
|
|
55
|
-
}
|
|
56
|
-
function pipe(...fns) {
|
|
57
|
-
return (x) => {
|
|
58
|
-
return fns.reduce((v, f) => f(v), x);
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function extractComparator(comparatorString) {
|
|
62
|
-
return comparatorString.match(parseRegex(comparator));
|
|
63
|
-
}
|
|
64
|
-
function combineVersion(major, minor, patch, preRelease2) {
|
|
65
|
-
const mainVersion2 = `${major}.${minor}.${patch}`;
|
|
66
|
-
if (preRelease2) {
|
|
67
|
-
return `${mainVersion2}-${preRelease2}`;
|
|
68
|
-
}
|
|
69
|
-
return mainVersion2;
|
|
70
|
-
}
|
|
71
|
-
function parseHyphen(range) {
|
|
72
|
-
return range.replace(
|
|
73
|
-
parseRegex(hyphenRange),
|
|
74
|
-
(_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease) => {
|
|
75
|
-
if (isXVersion(fromMajor)) {
|
|
76
|
-
from = "";
|
|
77
|
-
} else if (isXVersion(fromMinor)) {
|
|
78
|
-
from = `>=${fromMajor}.0.0`;
|
|
79
|
-
} else if (isXVersion(fromPatch)) {
|
|
80
|
-
from = `>=${fromMajor}.${fromMinor}.0`;
|
|
81
|
-
} else {
|
|
82
|
-
from = `>=${from}`;
|
|
83
|
-
}
|
|
84
|
-
if (isXVersion(toMajor)) {
|
|
85
|
-
to = "";
|
|
86
|
-
} else if (isXVersion(toMinor)) {
|
|
87
|
-
to = `<${+toMajor + 1}.0.0-0`;
|
|
88
|
-
} else if (isXVersion(toPatch)) {
|
|
89
|
-
to = `<${toMajor}.${+toMinor + 1}.0-0`;
|
|
90
|
-
} else if (toPreRelease) {
|
|
91
|
-
to = `<=${toMajor}.${toMinor}.${toPatch}-${toPreRelease}`;
|
|
92
|
-
} else {
|
|
93
|
-
to = `<=${to}`;
|
|
94
|
-
}
|
|
95
|
-
return `${from} ${to}`.trim();
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
function parseComparatorTrim(range) {
|
|
100
|
-
return range.replace(parseRegex(comparatorTrim), "$1$2$3");
|
|
101
|
-
}
|
|
102
|
-
function parseTildeTrim(range) {
|
|
103
|
-
return range.replace(parseRegex(tildeTrim), "$1~");
|
|
104
|
-
}
|
|
105
|
-
function parseCaretTrim(range) {
|
|
106
|
-
return range.replace(parseRegex(caretTrim), "$1^");
|
|
107
|
-
}
|
|
108
|
-
function parseCarets(range) {
|
|
109
|
-
return range.trim().split(/\s+/).map((rangeVersion) => {
|
|
110
|
-
return rangeVersion.replace(
|
|
111
|
-
parseRegex(caret),
|
|
112
|
-
(_, major, minor, patch, preRelease2) => {
|
|
113
|
-
if (isXVersion(major)) {
|
|
114
|
-
return "";
|
|
115
|
-
} else if (isXVersion(minor)) {
|
|
116
|
-
return `>=${major}.0.0 <${+major + 1}.0.0-0`;
|
|
117
|
-
} else if (isXVersion(patch)) {
|
|
118
|
-
if (major === "0") {
|
|
119
|
-
return `>=${major}.${minor}.0 <${major}.${+minor + 1}.0-0`;
|
|
120
|
-
} else {
|
|
121
|
-
return `>=${major}.${minor}.0 <${+major + 1}.0.0-0`;
|
|
122
|
-
}
|
|
123
|
-
} else if (preRelease2) {
|
|
124
|
-
if (major === "0") {
|
|
125
|
-
if (minor === "0") {
|
|
126
|
-
return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${minor}.${+patch + 1}-0`;
|
|
127
|
-
} else {
|
|
128
|
-
return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${+minor + 1}.0-0`;
|
|
129
|
-
}
|
|
130
|
-
} else {
|
|
131
|
-
return `>=${major}.${minor}.${patch}-${preRelease2} <${+major + 1}.0.0-0`;
|
|
132
|
-
}
|
|
133
|
-
} else {
|
|
134
|
-
if (major === "0") {
|
|
135
|
-
if (minor === "0") {
|
|
136
|
-
return `>=${major}.${minor}.${patch} <${major}.${minor}.${+patch + 1}-0`;
|
|
137
|
-
} else {
|
|
138
|
-
return `>=${major}.${minor}.${patch} <${major}.${+minor + 1}.0-0`;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return `>=${major}.${minor}.${patch} <${+major + 1}.0.0-0`;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
}).join(" ");
|
|
146
|
-
}
|
|
147
|
-
function parseTildes(range) {
|
|
148
|
-
return range.trim().split(/\s+/).map((rangeVersion) => {
|
|
149
|
-
return rangeVersion.replace(
|
|
150
|
-
parseRegex(tilde),
|
|
151
|
-
(_, major, minor, patch, preRelease2) => {
|
|
152
|
-
if (isXVersion(major)) {
|
|
153
|
-
return "";
|
|
154
|
-
} else if (isXVersion(minor)) {
|
|
155
|
-
return `>=${major}.0.0 <${+major + 1}.0.0-0`;
|
|
156
|
-
} else if (isXVersion(patch)) {
|
|
157
|
-
return `>=${major}.${minor}.0 <${major}.${+minor + 1}.0-0`;
|
|
158
|
-
} else if (preRelease2) {
|
|
159
|
-
return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${+minor + 1}.0-0`;
|
|
160
|
-
}
|
|
161
|
-
return `>=${major}.${minor}.${patch} <${major}.${+minor + 1}.0-0`;
|
|
162
|
-
}
|
|
163
|
-
);
|
|
164
|
-
}).join(" ");
|
|
165
|
-
}
|
|
166
|
-
function parseXRanges(range) {
|
|
167
|
-
return range.split(/\s+/).map((rangeVersion) => {
|
|
168
|
-
return rangeVersion.trim().replace(
|
|
169
|
-
parseRegex(xRange),
|
|
170
|
-
(ret, gtlt2, major, minor, patch, preRelease2) => {
|
|
171
|
-
const isXMajor = isXVersion(major);
|
|
172
|
-
const isXMinor = isXMajor || isXVersion(minor);
|
|
173
|
-
const isXPatch = isXMinor || isXVersion(patch);
|
|
174
|
-
if (gtlt2 === "=" && isXPatch) {
|
|
175
|
-
gtlt2 = "";
|
|
176
|
-
}
|
|
177
|
-
preRelease2 = "";
|
|
178
|
-
if (isXMajor) {
|
|
179
|
-
if (gtlt2 === ">" || gtlt2 === "<") {
|
|
180
|
-
return "<0.0.0-0";
|
|
181
|
-
} else {
|
|
182
|
-
return "*";
|
|
183
|
-
}
|
|
184
|
-
} else if (gtlt2 && isXPatch) {
|
|
185
|
-
if (isXMinor) {
|
|
186
|
-
minor = 0;
|
|
187
|
-
}
|
|
188
|
-
patch = 0;
|
|
189
|
-
if (gtlt2 === ">") {
|
|
190
|
-
gtlt2 = ">=";
|
|
191
|
-
if (isXMinor) {
|
|
192
|
-
major = +major + 1;
|
|
193
|
-
minor = 0;
|
|
194
|
-
patch = 0;
|
|
195
|
-
} else {
|
|
196
|
-
minor = +minor + 1;
|
|
197
|
-
patch = 0;
|
|
198
|
-
}
|
|
199
|
-
} else if (gtlt2 === "<=") {
|
|
200
|
-
gtlt2 = "<";
|
|
201
|
-
if (isXMinor) {
|
|
202
|
-
major = +major + 1;
|
|
203
|
-
} else {
|
|
204
|
-
minor = +minor + 1;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
if (gtlt2 === "<") {
|
|
208
|
-
preRelease2 = "-0";
|
|
209
|
-
}
|
|
210
|
-
return `${gtlt2 + major}.${minor}.${patch}${preRelease2}`;
|
|
211
|
-
} else if (isXMinor) {
|
|
212
|
-
return `>=${major}.0.0${preRelease2} <${+major + 1}.0.0-0`;
|
|
213
|
-
} else if (isXPatch) {
|
|
214
|
-
return `>=${major}.${minor}.0${preRelease2} <${major}.${+minor + 1}.0-0`;
|
|
215
|
-
}
|
|
216
|
-
return ret;
|
|
217
|
-
}
|
|
218
|
-
);
|
|
219
|
-
}).join(" ");
|
|
220
|
-
}
|
|
221
|
-
function parseStar(range) {
|
|
222
|
-
return range.trim().replace(parseRegex(star), "");
|
|
223
|
-
}
|
|
224
|
-
function parseGTE0(comparatorString) {
|
|
225
|
-
return comparatorString.trim().replace(parseRegex(gte0), "");
|
|
226
|
-
}
|
|
227
|
-
function compareAtom(rangeAtom, versionAtom) {
|
|
228
|
-
rangeAtom = +rangeAtom || rangeAtom;
|
|
229
|
-
versionAtom = +versionAtom || versionAtom;
|
|
230
|
-
if (rangeAtom > versionAtom) {
|
|
231
|
-
return 1;
|
|
232
|
-
}
|
|
233
|
-
if (rangeAtom === versionAtom) {
|
|
234
|
-
return 0;
|
|
235
|
-
}
|
|
236
|
-
return -1;
|
|
237
|
-
}
|
|
238
|
-
function comparePreRelease(rangeAtom, versionAtom) {
|
|
239
|
-
const { preRelease: rangePreRelease } = rangeAtom;
|
|
240
|
-
const { preRelease: versionPreRelease } = versionAtom;
|
|
241
|
-
if (rangePreRelease === void 0 && !!versionPreRelease) {
|
|
242
|
-
return 1;
|
|
243
|
-
}
|
|
244
|
-
if (!!rangePreRelease && versionPreRelease === void 0) {
|
|
245
|
-
return -1;
|
|
246
|
-
}
|
|
247
|
-
if (rangePreRelease === void 0 && versionPreRelease === void 0) {
|
|
248
|
-
return 0;
|
|
249
|
-
}
|
|
250
|
-
for (let i = 0, n = rangePreRelease.length; i <= n; i++) {
|
|
251
|
-
const rangeElement = rangePreRelease[i];
|
|
252
|
-
const versionElement = versionPreRelease[i];
|
|
253
|
-
if (rangeElement === versionElement) {
|
|
254
|
-
continue;
|
|
255
|
-
}
|
|
256
|
-
if (rangeElement === void 0 && versionElement === void 0) {
|
|
257
|
-
return 0;
|
|
258
|
-
}
|
|
259
|
-
if (!rangeElement) {
|
|
260
|
-
return 1;
|
|
261
|
-
}
|
|
262
|
-
if (!versionElement) {
|
|
263
|
-
return -1;
|
|
264
|
-
}
|
|
265
|
-
return compareAtom(rangeElement, versionElement);
|
|
266
|
-
}
|
|
267
|
-
return 0;
|
|
268
|
-
}
|
|
269
|
-
function compareVersion(rangeAtom, versionAtom) {
|
|
270
|
-
return compareAtom(rangeAtom.major, versionAtom.major) || compareAtom(rangeAtom.minor, versionAtom.minor) || compareAtom(rangeAtom.patch, versionAtom.patch) || comparePreRelease(rangeAtom, versionAtom);
|
|
271
|
-
}
|
|
272
|
-
function eq(rangeAtom, versionAtom) {
|
|
273
|
-
return rangeAtom.version === versionAtom.version;
|
|
274
|
-
}
|
|
275
|
-
function compare(rangeAtom, versionAtom) {
|
|
276
|
-
switch (rangeAtom.operator) {
|
|
277
|
-
case "":
|
|
278
|
-
case "=":
|
|
279
|
-
return eq(rangeAtom, versionAtom);
|
|
280
|
-
case ">":
|
|
281
|
-
return compareVersion(rangeAtom, versionAtom) < 0;
|
|
282
|
-
case ">=":
|
|
283
|
-
return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) < 0;
|
|
284
|
-
case "<":
|
|
285
|
-
return compareVersion(rangeAtom, versionAtom) > 0;
|
|
286
|
-
case "<=":
|
|
287
|
-
return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) > 0;
|
|
288
|
-
case void 0: {
|
|
289
|
-
return true;
|
|
290
|
-
}
|
|
291
|
-
default:
|
|
292
|
-
return false;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
function parseComparatorString(range) {
|
|
296
|
-
return pipe(
|
|
297
|
-
parseCarets,
|
|
298
|
-
parseTildes,
|
|
299
|
-
parseXRanges,
|
|
300
|
-
parseStar
|
|
301
|
-
)(range);
|
|
302
|
-
}
|
|
303
|
-
function parseRange(range) {
|
|
304
|
-
return pipe(
|
|
305
|
-
parseHyphen,
|
|
306
|
-
parseComparatorTrim,
|
|
307
|
-
parseTildeTrim,
|
|
308
|
-
parseCaretTrim
|
|
309
|
-
)(range.trim()).split(/\s+/).join(" ");
|
|
310
|
-
}
|
|
311
|
-
function satisfy(version, range) {
|
|
312
|
-
if (!version) {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
const parsedRange = parseRange(range);
|
|
316
|
-
const parsedComparator = parsedRange.split(" ").map((rangeVersion) => parseComparatorString(rangeVersion)).join(" ");
|
|
317
|
-
const comparators = parsedComparator.split(/\s+/).map((comparator2) => parseGTE0(comparator2));
|
|
318
|
-
const extractedVersion = extractComparator(version);
|
|
319
|
-
if (!extractedVersion) {
|
|
320
|
-
return false;
|
|
321
|
-
}
|
|
322
|
-
const [
|
|
323
|
-
,
|
|
324
|
-
versionOperator,
|
|
325
|
-
,
|
|
326
|
-
versionMajor,
|
|
327
|
-
versionMinor,
|
|
328
|
-
versionPatch,
|
|
329
|
-
versionPreRelease
|
|
330
|
-
] = extractedVersion;
|
|
331
|
-
const versionAtom = {
|
|
332
|
-
operator: versionOperator,
|
|
333
|
-
version: combineVersion(
|
|
334
|
-
versionMajor,
|
|
335
|
-
versionMinor,
|
|
336
|
-
versionPatch,
|
|
337
|
-
versionPreRelease
|
|
338
|
-
),
|
|
339
|
-
major: versionMajor,
|
|
340
|
-
minor: versionMinor,
|
|
341
|
-
patch: versionPatch,
|
|
342
|
-
preRelease: versionPreRelease == null ? void 0 : versionPreRelease.split(".")
|
|
343
|
-
};
|
|
344
|
-
for (const comparator2 of comparators) {
|
|
345
|
-
const extractedComparator = extractComparator(comparator2);
|
|
346
|
-
if (!extractedComparator) {
|
|
347
|
-
return false;
|
|
348
|
-
}
|
|
349
|
-
const [
|
|
350
|
-
,
|
|
351
|
-
rangeOperator,
|
|
352
|
-
,
|
|
353
|
-
rangeMajor,
|
|
354
|
-
rangeMinor,
|
|
355
|
-
rangePatch,
|
|
356
|
-
rangePreRelease
|
|
357
|
-
] = extractedComparator;
|
|
358
|
-
const rangeAtom = {
|
|
359
|
-
operator: rangeOperator,
|
|
360
|
-
version: combineVersion(
|
|
361
|
-
rangeMajor,
|
|
362
|
-
rangeMinor,
|
|
363
|
-
rangePatch,
|
|
364
|
-
rangePreRelease
|
|
365
|
-
),
|
|
366
|
-
major: rangeMajor,
|
|
367
|
-
minor: rangeMinor,
|
|
368
|
-
patch: rangePatch,
|
|
369
|
-
preRelease: rangePreRelease == null ? void 0 : rangePreRelease.split(".")
|
|
370
|
-
};
|
|
371
|
-
if (!compare(rangeAtom, versionAtom)) {
|
|
372
|
-
return false;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
return true;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
const currentImports$1 = {};
|
|
379
|
-
|
|
380
|
-
// eslint-disable-next-line no-undef
|
|
381
|
-
const moduleMap = {'react':{get:()=>()=>__federation_import$1(new URL('__federation_shared_react-mmI5WPQQ.js', import.meta.url).href),import:true},'react-dom':{get:()=>()=>__federation_import$1(new URL('__federation_shared_react-dom-BSxTar_g.js', import.meta.url).href),import:true}};
|
|
382
|
-
const moduleCache = Object.create(null);
|
|
383
|
-
async function importShared(name, shareScope = 'default') {
|
|
384
|
-
return moduleCache[name]
|
|
385
|
-
? new Promise((r) => r(moduleCache[name]))
|
|
386
|
-
: (await getSharedFromRuntime(name, shareScope)) || getSharedFromLocal(name)
|
|
387
|
-
}
|
|
388
|
-
// eslint-disable-next-line
|
|
389
|
-
async function __federation_import$1(name) {
|
|
390
|
-
currentImports$1[name] ??= import(name);
|
|
391
|
-
return currentImports$1[name]
|
|
392
|
-
}
|
|
393
|
-
async function getSharedFromRuntime(name, shareScope) {
|
|
394
|
-
let module = null;
|
|
395
|
-
if (globalThis?.__federation_shared__?.[shareScope]?.[name]) {
|
|
396
|
-
const versionObj = globalThis.__federation_shared__[shareScope][name];
|
|
397
|
-
const versionKey = Object.keys(versionObj)[0];
|
|
398
|
-
const versionValue = Object.values(versionObj)[0];
|
|
399
|
-
if (moduleMap[name]?.requiredVersion) {
|
|
400
|
-
// judge version satisfy
|
|
401
|
-
if (satisfy(versionKey, moduleMap[name].requiredVersion)) {
|
|
402
|
-
module = await (await versionValue.get())();
|
|
403
|
-
} else {
|
|
404
|
-
console.log(
|
|
405
|
-
`provider support ${name}(${versionKey}) is not satisfied requiredVersion(\${moduleMap[name].requiredVersion})`
|
|
406
|
-
);
|
|
407
|
-
}
|
|
408
|
-
} else {
|
|
409
|
-
module = await (await versionValue.get())();
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
if (module) {
|
|
413
|
-
return flattenModule(module, name)
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
async function getSharedFromLocal(name) {
|
|
417
|
-
if (moduleMap[name]?.import) {
|
|
418
|
-
let module = await (await moduleMap[name].get())();
|
|
419
|
-
return flattenModule(module, name)
|
|
420
|
-
} else {
|
|
421
|
-
console.error(
|
|
422
|
-
`consumer config import=false,so cant use callback shared module`
|
|
423
|
-
);
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
function flattenModule(module, name) {
|
|
427
|
-
// use a shared module which export default a function will getting error 'TypeError: xxx is not a function'
|
|
428
|
-
if (typeof module.default === 'function') {
|
|
429
|
-
Object.keys(module).forEach((key) => {
|
|
430
|
-
if (key !== 'default') {
|
|
431
|
-
module.default[key] = module[key];
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
moduleCache[name] = module.default;
|
|
435
|
-
return module.default
|
|
436
|
-
}
|
|
437
|
-
if (module.default) module = Object.assign({}, module.default, module);
|
|
438
|
-
moduleCache[name] = module;
|
|
439
|
-
return module
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
var client = {};
|
|
443
|
-
|
|
444
|
-
var hydrateRoot;
|
|
445
|
-
var createRoot;
|
|
446
|
-
var m$1 = reactDomExports;
|
|
447
|
-
{
|
|
448
|
-
var i = m$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
449
|
-
createRoot = client.createRoot = function(c, o) {
|
|
450
|
-
i.usingClientEntryPoint = true;
|
|
451
|
-
try {
|
|
452
|
-
return m$1.createRoot(c, o);
|
|
453
|
-
} finally {
|
|
454
|
-
i.usingClientEntryPoint = false;
|
|
455
|
-
}
|
|
456
|
-
};
|
|
457
|
-
hydrateRoot = client.hydrateRoot = function(c, h, o) {
|
|
458
|
-
i.usingClientEntryPoint = true;
|
|
459
|
-
try {
|
|
460
|
-
return m$1.hydrateRoot(c, h, o);
|
|
461
|
-
} finally {
|
|
462
|
-
i.usingClientEntryPoint = false;
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
const ReactDOM = /*#__PURE__*/_mergeNamespaces({
|
|
468
|
-
__proto__: null,
|
|
469
|
-
get createRoot () { return createRoot; },
|
|
470
|
-
default: client,
|
|
471
|
-
get hydrateRoot () { return hydrateRoot; }
|
|
472
|
-
}, [client]);
|
|
473
|
-
|
|
474
|
-
const l = Symbol.for("r2wc.reactRender"), h = Symbol.for("r2wc.shouldRender"), f = Symbol.for("r2wc.root");
|
|
475
|
-
function w(r = "") {
|
|
476
|
-
return r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
477
|
-
}
|
|
478
|
-
function m(r = "") {
|
|
479
|
-
return r.replace(/-([a-z0-9])/g, function(a) {
|
|
480
|
-
return a[1].toUpperCase();
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
var b = {
|
|
484
|
-
expando: function(r, a, s) {
|
|
485
|
-
Object.defineProperty(r, a, {
|
|
486
|
-
enumerable: !0,
|
|
487
|
-
get: function() {
|
|
488
|
-
return s;
|
|
489
|
-
},
|
|
490
|
-
set: function(i) {
|
|
491
|
-
s = i, this[l]();
|
|
492
|
-
}
|
|
493
|
-
}), r[l]();
|
|
494
|
-
}
|
|
495
|
-
};
|
|
496
|
-
function S(r, a, s, i = {}) {
|
|
497
|
-
var d = {
|
|
498
|
-
isConnected: "isConnected" in HTMLElement.prototype
|
|
499
|
-
}, p = !1, c = function() {
|
|
500
|
-
var t = Reflect.construct(HTMLElement, arguments, this.constructor);
|
|
501
|
-
return typeof i.shadow == "string" ? t.attachShadow({ mode: i.shadow }) : i.shadow && (console.warn(
|
|
502
|
-
'Specifying the "shadow" option as a boolean is deprecated and will be removed in a future version.'
|
|
503
|
-
), t.attachShadow({ mode: "open" })), t;
|
|
504
|
-
}, u = Object.create(HTMLElement.prototype);
|
|
505
|
-
u.constructor = c;
|
|
506
|
-
var y = new Proxy(u, {
|
|
507
|
-
has: function(t, e) {
|
|
508
|
-
return e in r.propTypes || e in u;
|
|
509
|
-
},
|
|
510
|
-
set: function(t, e, o, n) {
|
|
511
|
-
return p && (d[e] = !0), typeof e == "symbol" || d[e] || e in t ? (r.propTypes && e in r.propTypes && b.expando(n, e, o), Reflect.set(t, e, o, n)) : (b.expando(n, e, o), !0);
|
|
512
|
-
},
|
|
513
|
-
getOwnPropertyDescriptor: function(t, e) {
|
|
514
|
-
var o = Reflect.getOwnPropertyDescriptor(t, e);
|
|
515
|
-
if (o)
|
|
516
|
-
return o;
|
|
517
|
-
if (e in r.propTypes)
|
|
518
|
-
return {
|
|
519
|
-
configurable: !0,
|
|
520
|
-
enumerable: !0,
|
|
521
|
-
writable: !0,
|
|
522
|
-
value: void 0
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
return c.prototype = y, u.connectedCallback = function() {
|
|
527
|
-
this[h] = !0, this[l]();
|
|
528
|
-
}, u.disconnectedCallback = function() {
|
|
529
|
-
typeof s.createRoot == "function" ? this[f].unmount() : s.unmountComponentAtNode(this);
|
|
530
|
-
}, u[l] = function() {
|
|
531
|
-
if (this[h] === !0) {
|
|
532
|
-
var t = {};
|
|
533
|
-
Object.keys(this).forEach(function(n) {
|
|
534
|
-
d[n] !== !1 && (t[n] = this[n]);
|
|
535
|
-
}, this), p = !0;
|
|
536
|
-
const e = i.shadow ? this.shadowRoot : this, o = a.createElement(r, t);
|
|
537
|
-
typeof s.createRoot == "function" ? (this[f] || (this[f] = s.createRoot(e)), this[f].render(o)) : s.render(o, e), p = !1;
|
|
538
|
-
}
|
|
539
|
-
}, r.propTypes && (c.observedAttributes = i.dashStyleAttributes ? Object.keys(r.propTypes).map(function(t) {
|
|
540
|
-
return w(t);
|
|
541
|
-
}) : Object.keys(r.propTypes), u.attributeChangedCallback = function(t, e, o) {
|
|
542
|
-
var n = i.dashStyleAttributes ? m(t) : t;
|
|
543
|
-
this[n] = o;
|
|
544
|
-
}), c;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
var propTypes = {exports: {}};
|
|
548
|
-
|
|
549
|
-
var reactIs = {exports: {}};
|
|
550
|
-
|
|
551
|
-
var reactIs_development = {};
|
|
552
|
-
|
|
553
|
-
/** @license React v16.13.1
|
|
554
|
-
* react-is.development.js
|
|
555
|
-
*
|
|
556
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
557
|
-
*
|
|
558
|
-
* This source code is licensed under the MIT license found in the
|
|
559
|
-
* LICENSE file in the root directory of this source tree.
|
|
560
|
-
*/
|
|
561
|
-
{
|
|
562
|
-
(function() {
|
|
563
|
-
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
564
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
565
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
566
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
567
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
568
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
569
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
570
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
571
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
572
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
573
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
574
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
575
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
576
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
577
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
578
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
579
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
580
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
581
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
582
|
-
function isValidElementType(type) {
|
|
583
|
-
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
584
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
585
|
-
}
|
|
586
|
-
function typeOf(object) {
|
|
587
|
-
if (typeof object === "object" && object !== null) {
|
|
588
|
-
var $$typeof = object.$$typeof;
|
|
589
|
-
switch ($$typeof) {
|
|
590
|
-
case REACT_ELEMENT_TYPE:
|
|
591
|
-
var type = object.type;
|
|
592
|
-
switch (type) {
|
|
593
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
594
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
595
|
-
case REACT_FRAGMENT_TYPE:
|
|
596
|
-
case REACT_PROFILER_TYPE:
|
|
597
|
-
case REACT_STRICT_MODE_TYPE:
|
|
598
|
-
case REACT_SUSPENSE_TYPE:
|
|
599
|
-
return type;
|
|
600
|
-
default:
|
|
601
|
-
var $$typeofType = type && type.$$typeof;
|
|
602
|
-
switch ($$typeofType) {
|
|
603
|
-
case REACT_CONTEXT_TYPE:
|
|
604
|
-
case REACT_FORWARD_REF_TYPE:
|
|
605
|
-
case REACT_LAZY_TYPE:
|
|
606
|
-
case REACT_MEMO_TYPE:
|
|
607
|
-
case REACT_PROVIDER_TYPE:
|
|
608
|
-
return $$typeofType;
|
|
609
|
-
default:
|
|
610
|
-
return $$typeof;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
case REACT_PORTAL_TYPE:
|
|
614
|
-
return $$typeof;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
return void 0;
|
|
618
|
-
}
|
|
619
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
620
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
621
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
622
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
623
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
624
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
625
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
626
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
627
|
-
var Memo = REACT_MEMO_TYPE;
|
|
628
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
629
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
630
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
631
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
632
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
633
|
-
function isAsyncMode(object) {
|
|
634
|
-
{
|
|
635
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
636
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
637
|
-
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
641
|
-
}
|
|
642
|
-
function isConcurrentMode(object) {
|
|
643
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
644
|
-
}
|
|
645
|
-
function isContextConsumer(object) {
|
|
646
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
647
|
-
}
|
|
648
|
-
function isContextProvider(object) {
|
|
649
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
650
|
-
}
|
|
651
|
-
function isElement(object) {
|
|
652
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
653
|
-
}
|
|
654
|
-
function isForwardRef(object) {
|
|
655
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
656
|
-
}
|
|
657
|
-
function isFragment(object) {
|
|
658
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
659
|
-
}
|
|
660
|
-
function isLazy(object) {
|
|
661
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
662
|
-
}
|
|
663
|
-
function isMemo(object) {
|
|
664
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
665
|
-
}
|
|
666
|
-
function isPortal(object) {
|
|
667
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
668
|
-
}
|
|
669
|
-
function isProfiler(object) {
|
|
670
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
671
|
-
}
|
|
672
|
-
function isStrictMode(object) {
|
|
673
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
674
|
-
}
|
|
675
|
-
function isSuspense(object) {
|
|
676
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
677
|
-
}
|
|
678
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
679
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
680
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
681
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
682
|
-
reactIs_development.Element = Element;
|
|
683
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
684
|
-
reactIs_development.Fragment = Fragment;
|
|
685
|
-
reactIs_development.Lazy = Lazy;
|
|
686
|
-
reactIs_development.Memo = Memo;
|
|
687
|
-
reactIs_development.Portal = Portal;
|
|
688
|
-
reactIs_development.Profiler = Profiler;
|
|
689
|
-
reactIs_development.StrictMode = StrictMode;
|
|
690
|
-
reactIs_development.Suspense = Suspense;
|
|
691
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
692
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
693
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
694
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
695
|
-
reactIs_development.isElement = isElement;
|
|
696
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
697
|
-
reactIs_development.isFragment = isFragment;
|
|
698
|
-
reactIs_development.isLazy = isLazy;
|
|
699
|
-
reactIs_development.isMemo = isMemo;
|
|
700
|
-
reactIs_development.isPortal = isPortal;
|
|
701
|
-
reactIs_development.isProfiler = isProfiler;
|
|
702
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
703
|
-
reactIs_development.isSuspense = isSuspense;
|
|
704
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
705
|
-
reactIs_development.typeOf = typeOf;
|
|
706
|
-
})();
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
{
|
|
710
|
-
reactIs.exports = reactIs_development;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
var reactIsExports = reactIs.exports;
|
|
714
|
-
|
|
715
|
-
/*
|
|
716
|
-
object-assign
|
|
717
|
-
(c) Sindre Sorhus
|
|
718
|
-
@license MIT
|
|
719
|
-
*/
|
|
720
|
-
/* eslint-disable no-unused-vars */
|
|
721
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
722
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
723
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
724
|
-
|
|
725
|
-
function toObject(val) {
|
|
726
|
-
if (val === null || val === undefined) {
|
|
727
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
return Object(val);
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
function shouldUseNative() {
|
|
734
|
-
try {
|
|
735
|
-
if (!Object.assign) {
|
|
736
|
-
return false;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
740
|
-
|
|
741
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
742
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
743
|
-
test1[5] = 'de';
|
|
744
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
745
|
-
return false;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
749
|
-
var test2 = {};
|
|
750
|
-
for (var i = 0; i < 10; i++) {
|
|
751
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
752
|
-
}
|
|
753
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
754
|
-
return test2[n];
|
|
755
|
-
});
|
|
756
|
-
if (order2.join('') !== '0123456789') {
|
|
757
|
-
return false;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
761
|
-
var test3 = {};
|
|
762
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
763
|
-
test3[letter] = letter;
|
|
764
|
-
});
|
|
765
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
766
|
-
'abcdefghijklmnopqrst') {
|
|
767
|
-
return false;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
return true;
|
|
771
|
-
} catch (err) {
|
|
772
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
773
|
-
return false;
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
778
|
-
var from;
|
|
779
|
-
var to = toObject(target);
|
|
780
|
-
var symbols;
|
|
781
|
-
|
|
782
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
783
|
-
from = Object(arguments[s]);
|
|
784
|
-
|
|
785
|
-
for (var key in from) {
|
|
786
|
-
if (hasOwnProperty.call(from, key)) {
|
|
787
|
-
to[key] = from[key];
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
if (getOwnPropertySymbols) {
|
|
792
|
-
symbols = getOwnPropertySymbols(from);
|
|
793
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
794
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
795
|
-
to[symbols[i]] = from[symbols[i]];
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
return to;
|
|
802
|
-
};
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
806
|
-
*
|
|
807
|
-
* This source code is licensed under the MIT license found in the
|
|
808
|
-
* LICENSE file in the root directory of this source tree.
|
|
809
|
-
*/
|
|
810
|
-
|
|
811
|
-
var ReactPropTypesSecret$2 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
812
|
-
|
|
813
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$2;
|
|
814
|
-
|
|
815
|
-
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
816
|
-
|
|
817
|
-
var printWarning$1 = function() {
|
|
818
|
-
};
|
|
819
|
-
{
|
|
820
|
-
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
821
|
-
var loggedTypeFailures = {};
|
|
822
|
-
var has$1 = has$2;
|
|
823
|
-
printWarning$1 = function(text) {
|
|
824
|
-
var message = "Warning: " + text;
|
|
825
|
-
if (typeof console !== "undefined") {
|
|
826
|
-
console.error(message);
|
|
827
|
-
}
|
|
828
|
-
try {
|
|
829
|
-
throw new Error(message);
|
|
830
|
-
} catch (x) {
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
835
|
-
{
|
|
836
|
-
for (var typeSpecName in typeSpecs) {
|
|
837
|
-
if (has$1(typeSpecs, typeSpecName)) {
|
|
838
|
-
var error;
|
|
839
|
-
try {
|
|
840
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
841
|
-
var err = Error(
|
|
842
|
-
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
843
|
-
);
|
|
844
|
-
err.name = "Invariant Violation";
|
|
845
|
-
throw err;
|
|
846
|
-
}
|
|
847
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
|
|
848
|
-
} catch (ex) {
|
|
849
|
-
error = ex;
|
|
850
|
-
}
|
|
851
|
-
if (error && !(error instanceof Error)) {
|
|
852
|
-
printWarning$1(
|
|
853
|
-
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
854
|
-
);
|
|
855
|
-
}
|
|
856
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
857
|
-
loggedTypeFailures[error.message] = true;
|
|
858
|
-
var stack = getStack ? getStack() : "";
|
|
859
|
-
printWarning$1(
|
|
860
|
-
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
861
|
-
);
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
checkPropTypes$1.resetWarningCache = function() {
|
|
868
|
-
{
|
|
869
|
-
loggedTypeFailures = {};
|
|
870
|
-
}
|
|
871
|
-
};
|
|
872
|
-
var checkPropTypes_1 = checkPropTypes$1;
|
|
873
|
-
|
|
874
|
-
var ReactIs$1 = reactIsExports;
|
|
875
|
-
var assign = objectAssign;
|
|
876
|
-
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
877
|
-
var has = has$2;
|
|
878
|
-
var checkPropTypes = checkPropTypes_1;
|
|
879
|
-
var printWarning = function() {
|
|
880
|
-
};
|
|
881
|
-
{
|
|
882
|
-
printWarning = function(text) {
|
|
883
|
-
var message = "Warning: " + text;
|
|
884
|
-
if (typeof console !== "undefined") {
|
|
885
|
-
console.error(message);
|
|
886
|
-
}
|
|
887
|
-
try {
|
|
888
|
-
throw new Error(message);
|
|
889
|
-
} catch (x) {
|
|
890
|
-
}
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
function emptyFunctionThatReturnsNull() {
|
|
894
|
-
return null;
|
|
895
|
-
}
|
|
896
|
-
var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
897
|
-
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
898
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
899
|
-
function getIteratorFn(maybeIterable) {
|
|
900
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
901
|
-
if (typeof iteratorFn === "function") {
|
|
902
|
-
return iteratorFn;
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
var ANONYMOUS = "<<anonymous>>";
|
|
906
|
-
var ReactPropTypes = {
|
|
907
|
-
array: createPrimitiveTypeChecker("array"),
|
|
908
|
-
bigint: createPrimitiveTypeChecker("bigint"),
|
|
909
|
-
bool: createPrimitiveTypeChecker("boolean"),
|
|
910
|
-
func: createPrimitiveTypeChecker("function"),
|
|
911
|
-
number: createPrimitiveTypeChecker("number"),
|
|
912
|
-
object: createPrimitiveTypeChecker("object"),
|
|
913
|
-
string: createPrimitiveTypeChecker("string"),
|
|
914
|
-
symbol: createPrimitiveTypeChecker("symbol"),
|
|
915
|
-
any: createAnyTypeChecker(),
|
|
916
|
-
arrayOf: createArrayOfTypeChecker,
|
|
917
|
-
element: createElementTypeChecker(),
|
|
918
|
-
elementType: createElementTypeTypeChecker(),
|
|
919
|
-
instanceOf: createInstanceTypeChecker,
|
|
920
|
-
node: createNodeChecker(),
|
|
921
|
-
objectOf: createObjectOfTypeChecker,
|
|
922
|
-
oneOf: createEnumTypeChecker,
|
|
923
|
-
oneOfType: createUnionTypeChecker,
|
|
924
|
-
shape: createShapeTypeChecker,
|
|
925
|
-
exact: createStrictShapeTypeChecker
|
|
926
|
-
};
|
|
927
|
-
function is(x, y) {
|
|
928
|
-
if (x === y) {
|
|
929
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
930
|
-
} else {
|
|
931
|
-
return x !== x && y !== y;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
function PropTypeError(message, data) {
|
|
935
|
-
this.message = message;
|
|
936
|
-
this.data = data && typeof data === "object" ? data : {};
|
|
937
|
-
this.stack = "";
|
|
938
|
-
}
|
|
939
|
-
PropTypeError.prototype = Error.prototype;
|
|
940
|
-
function createChainableTypeChecker(validate) {
|
|
941
|
-
{
|
|
942
|
-
var manualPropTypeCallCache = {};
|
|
943
|
-
var manualPropTypeWarningCount = 0;
|
|
944
|
-
}
|
|
945
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
946
|
-
componentName = componentName || ANONYMOUS;
|
|
947
|
-
propFullName = propFullName || propName;
|
|
948
|
-
if (secret !== ReactPropTypesSecret) {
|
|
949
|
-
if (throwOnDirectAccess) {
|
|
950
|
-
var err = new Error(
|
|
951
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
952
|
-
);
|
|
953
|
-
err.name = "Invariant Violation";
|
|
954
|
-
throw err;
|
|
955
|
-
} else if (typeof console !== "undefined") {
|
|
956
|
-
var cacheKey = componentName + ":" + propName;
|
|
957
|
-
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
958
|
-
manualPropTypeWarningCount < 3) {
|
|
959
|
-
printWarning(
|
|
960
|
-
"You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
961
|
-
);
|
|
962
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
963
|
-
manualPropTypeWarningCount++;
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
if (props[propName] == null) {
|
|
968
|
-
if (isRequired) {
|
|
969
|
-
if (props[propName] === null) {
|
|
970
|
-
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
|
|
971
|
-
}
|
|
972
|
-
return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
|
|
973
|
-
}
|
|
974
|
-
return null;
|
|
975
|
-
} else {
|
|
976
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
980
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
981
|
-
return chainedCheckType;
|
|
982
|
-
}
|
|
983
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
984
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
985
|
-
var propValue = props[propName];
|
|
986
|
-
var propType = getPropType(propValue);
|
|
987
|
-
if (propType !== expectedType) {
|
|
988
|
-
var preciseType = getPreciseType(propValue);
|
|
989
|
-
return new PropTypeError(
|
|
990
|
-
"Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
|
|
991
|
-
{ expectedType }
|
|
992
|
-
);
|
|
993
|
-
}
|
|
994
|
-
return null;
|
|
995
|
-
}
|
|
996
|
-
return createChainableTypeChecker(validate);
|
|
997
|
-
}
|
|
998
|
-
function createAnyTypeChecker() {
|
|
999
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
1000
|
-
}
|
|
1001
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
1002
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1003
|
-
if (typeof typeChecker !== "function") {
|
|
1004
|
-
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
|
|
1005
|
-
}
|
|
1006
|
-
var propValue = props[propName];
|
|
1007
|
-
if (!Array.isArray(propValue)) {
|
|
1008
|
-
var propType = getPropType(propValue);
|
|
1009
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
|
|
1010
|
-
}
|
|
1011
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
1012
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
|
1013
|
-
if (error instanceof Error) {
|
|
1014
|
-
return error;
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
return null;
|
|
1018
|
-
}
|
|
1019
|
-
return createChainableTypeChecker(validate);
|
|
1020
|
-
}
|
|
1021
|
-
function createElementTypeChecker() {
|
|
1022
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1023
|
-
var propValue = props[propName];
|
|
1024
|
-
if (!isValidElement(propValue)) {
|
|
1025
|
-
var propType = getPropType(propValue);
|
|
1026
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
1027
|
-
}
|
|
1028
|
-
return null;
|
|
1029
|
-
}
|
|
1030
|
-
return createChainableTypeChecker(validate);
|
|
1031
|
-
}
|
|
1032
|
-
function createElementTypeTypeChecker() {
|
|
1033
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1034
|
-
var propValue = props[propName];
|
|
1035
|
-
if (!ReactIs$1.isValidElementType(propValue)) {
|
|
1036
|
-
var propType = getPropType(propValue);
|
|
1037
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
|
|
1038
|
-
}
|
|
1039
|
-
return null;
|
|
1040
|
-
}
|
|
1041
|
-
return createChainableTypeChecker(validate);
|
|
1042
|
-
}
|
|
1043
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
1044
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1045
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
1046
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1047
|
-
var actualClassName = getClassName(props[propName]);
|
|
1048
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
|
|
1049
|
-
}
|
|
1050
|
-
return null;
|
|
1051
|
-
}
|
|
1052
|
-
return createChainableTypeChecker(validate);
|
|
1053
|
-
}
|
|
1054
|
-
function createEnumTypeChecker(expectedValues) {
|
|
1055
|
-
if (!Array.isArray(expectedValues)) {
|
|
1056
|
-
{
|
|
1057
|
-
if (arguments.length > 1) {
|
|
1058
|
-
printWarning(
|
|
1059
|
-
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1060
|
-
);
|
|
1061
|
-
} else {
|
|
1062
|
-
printWarning("Invalid argument supplied to oneOf, expected an array.");
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
return emptyFunctionThatReturnsNull;
|
|
1066
|
-
}
|
|
1067
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1068
|
-
var propValue = props[propName];
|
|
1069
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
1070
|
-
if (is(propValue, expectedValues[i])) {
|
|
1071
|
-
return null;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1075
|
-
var type = getPreciseType(value);
|
|
1076
|
-
if (type === "symbol") {
|
|
1077
|
-
return String(value);
|
|
1078
|
-
}
|
|
1079
|
-
return value;
|
|
1080
|
-
});
|
|
1081
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
|
|
1082
|
-
}
|
|
1083
|
-
return createChainableTypeChecker(validate);
|
|
1084
|
-
}
|
|
1085
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
1086
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1087
|
-
if (typeof typeChecker !== "function") {
|
|
1088
|
-
return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
|
|
1089
|
-
}
|
|
1090
|
-
var propValue = props[propName];
|
|
1091
|
-
var propType = getPropType(propValue);
|
|
1092
|
-
if (propType !== "object") {
|
|
1093
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
|
|
1094
|
-
}
|
|
1095
|
-
for (var key in propValue) {
|
|
1096
|
-
if (has(propValue, key)) {
|
|
1097
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
1098
|
-
if (error instanceof Error) {
|
|
1099
|
-
return error;
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
return null;
|
|
1104
|
-
}
|
|
1105
|
-
return createChainableTypeChecker(validate);
|
|
1106
|
-
}
|
|
1107
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
1108
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
1109
|
-
printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") ;
|
|
1110
|
-
return emptyFunctionThatReturnsNull;
|
|
1111
|
-
}
|
|
1112
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1113
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1114
|
-
if (typeof checker !== "function") {
|
|
1115
|
-
printWarning(
|
|
1116
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
|
|
1117
|
-
);
|
|
1118
|
-
return emptyFunctionThatReturnsNull;
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1122
|
-
var expectedTypes = [];
|
|
1123
|
-
for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
|
|
1124
|
-
var checker2 = arrayOfTypeCheckers[i2];
|
|
1125
|
-
var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
1126
|
-
if (checkerResult == null) {
|
|
1127
|
-
return null;
|
|
1128
|
-
}
|
|
1129
|
-
if (checkerResult.data && has(checkerResult.data, "expectedType")) {
|
|
1130
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
|
|
1134
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
|
|
1135
|
-
}
|
|
1136
|
-
return createChainableTypeChecker(validate);
|
|
1137
|
-
}
|
|
1138
|
-
function createNodeChecker() {
|
|
1139
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1140
|
-
if (!isNode(props[propName])) {
|
|
1141
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
|
|
1142
|
-
}
|
|
1143
|
-
return null;
|
|
1144
|
-
}
|
|
1145
|
-
return createChainableTypeChecker(validate);
|
|
1146
|
-
}
|
|
1147
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
1148
|
-
return new PropTypeError(
|
|
1149
|
-
(componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
|
|
1150
|
-
);
|
|
1151
|
-
}
|
|
1152
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
1153
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1154
|
-
var propValue = props[propName];
|
|
1155
|
-
var propType = getPropType(propValue);
|
|
1156
|
-
if (propType !== "object") {
|
|
1157
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
1158
|
-
}
|
|
1159
|
-
for (var key in shapeTypes) {
|
|
1160
|
-
var checker = shapeTypes[key];
|
|
1161
|
-
if (typeof checker !== "function") {
|
|
1162
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1163
|
-
}
|
|
1164
|
-
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
1165
|
-
if (error) {
|
|
1166
|
-
return error;
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
return null;
|
|
1170
|
-
}
|
|
1171
|
-
return createChainableTypeChecker(validate);
|
|
1172
|
-
}
|
|
1173
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1174
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1175
|
-
var propValue = props[propName];
|
|
1176
|
-
var propType = getPropType(propValue);
|
|
1177
|
-
if (propType !== "object") {
|
|
1178
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
|
|
1179
|
-
}
|
|
1180
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
1181
|
-
for (var key in allKeys) {
|
|
1182
|
-
var checker = shapeTypes[key];
|
|
1183
|
-
if (has(shapeTypes, key) && typeof checker !== "function") {
|
|
1184
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1185
|
-
}
|
|
1186
|
-
if (!checker) {
|
|
1187
|
-
return new PropTypeError(
|
|
1188
|
-
"Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
|
|
1189
|
-
);
|
|
1190
|
-
}
|
|
1191
|
-
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
1192
|
-
if (error) {
|
|
1193
|
-
return error;
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
return null;
|
|
1197
|
-
}
|
|
1198
|
-
return createChainableTypeChecker(validate);
|
|
1199
|
-
}
|
|
1200
|
-
function isNode(propValue) {
|
|
1201
|
-
switch (typeof propValue) {
|
|
1202
|
-
case "number":
|
|
1203
|
-
case "string":
|
|
1204
|
-
case "undefined":
|
|
1205
|
-
return true;
|
|
1206
|
-
case "boolean":
|
|
1207
|
-
return !propValue;
|
|
1208
|
-
case "object":
|
|
1209
|
-
if (Array.isArray(propValue)) {
|
|
1210
|
-
return propValue.every(isNode);
|
|
1211
|
-
}
|
|
1212
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1213
|
-
return true;
|
|
1214
|
-
}
|
|
1215
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1216
|
-
if (iteratorFn) {
|
|
1217
|
-
var iterator = iteratorFn.call(propValue);
|
|
1218
|
-
var step;
|
|
1219
|
-
if (iteratorFn !== propValue.entries) {
|
|
1220
|
-
while (!(step = iterator.next()).done) {
|
|
1221
|
-
if (!isNode(step.value)) {
|
|
1222
|
-
return false;
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
} else {
|
|
1226
|
-
while (!(step = iterator.next()).done) {
|
|
1227
|
-
var entry = step.value;
|
|
1228
|
-
if (entry) {
|
|
1229
|
-
if (!isNode(entry[1])) {
|
|
1230
|
-
return false;
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
} else {
|
|
1236
|
-
return false;
|
|
1237
|
-
}
|
|
1238
|
-
return true;
|
|
1239
|
-
default:
|
|
1240
|
-
return false;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
function isSymbol(propType, propValue) {
|
|
1244
|
-
if (propType === "symbol") {
|
|
1245
|
-
return true;
|
|
1246
|
-
}
|
|
1247
|
-
if (!propValue) {
|
|
1248
|
-
return false;
|
|
1249
|
-
}
|
|
1250
|
-
if (propValue["@@toStringTag"] === "Symbol") {
|
|
1251
|
-
return true;
|
|
1252
|
-
}
|
|
1253
|
-
if (typeof Symbol === "function" && propValue instanceof Symbol) {
|
|
1254
|
-
return true;
|
|
1255
|
-
}
|
|
1256
|
-
return false;
|
|
1257
|
-
}
|
|
1258
|
-
function getPropType(propValue) {
|
|
1259
|
-
var propType = typeof propValue;
|
|
1260
|
-
if (Array.isArray(propValue)) {
|
|
1261
|
-
return "array";
|
|
1262
|
-
}
|
|
1263
|
-
if (propValue instanceof RegExp) {
|
|
1264
|
-
return "object";
|
|
1265
|
-
}
|
|
1266
|
-
if (isSymbol(propType, propValue)) {
|
|
1267
|
-
return "symbol";
|
|
1268
|
-
}
|
|
1269
|
-
return propType;
|
|
1270
|
-
}
|
|
1271
|
-
function getPreciseType(propValue) {
|
|
1272
|
-
if (typeof propValue === "undefined" || propValue === null) {
|
|
1273
|
-
return "" + propValue;
|
|
1274
|
-
}
|
|
1275
|
-
var propType = getPropType(propValue);
|
|
1276
|
-
if (propType === "object") {
|
|
1277
|
-
if (propValue instanceof Date) {
|
|
1278
|
-
return "date";
|
|
1279
|
-
} else if (propValue instanceof RegExp) {
|
|
1280
|
-
return "regexp";
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
return propType;
|
|
1284
|
-
}
|
|
1285
|
-
function getPostfixForTypeWarning(value) {
|
|
1286
|
-
var type = getPreciseType(value);
|
|
1287
|
-
switch (type) {
|
|
1288
|
-
case "array":
|
|
1289
|
-
case "object":
|
|
1290
|
-
return "an " + type;
|
|
1291
|
-
case "boolean":
|
|
1292
|
-
case "date":
|
|
1293
|
-
case "regexp":
|
|
1294
|
-
return "a " + type;
|
|
1295
|
-
default:
|
|
1296
|
-
return type;
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
function getClassName(propValue) {
|
|
1300
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1301
|
-
return ANONYMOUS;
|
|
1302
|
-
}
|
|
1303
|
-
return propValue.constructor.name;
|
|
1304
|
-
}
|
|
1305
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
1306
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
1307
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1308
|
-
return ReactPropTypes;
|
|
1309
|
-
};
|
|
1310
|
-
|
|
1311
|
-
{
|
|
1312
|
-
var ReactIs = reactIsExports;
|
|
1313
|
-
var throwOnDirectAccess = true;
|
|
1314
|
-
propTypes.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
var propTypesExports = propTypes.exports;
|
|
1318
|
-
const PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
1319
|
-
|
|
1320
|
-
const remotesMap = {
|
|
1321
|
-
'VFCMF':{url:'https://www.staging-vfchannel.io/_next/static/chunks/remoteEntry.js',format:'var',from:'webpack'}
|
|
1322
|
-
};
|
|
1323
|
-
const currentImports = {};
|
|
1324
|
-
const loadJS = async (url, fn) => {
|
|
1325
|
-
const resolvedUrl = typeof url === 'function' ? await url() : url;
|
|
1326
|
-
const script = document.createElement('script');
|
|
1327
|
-
script.type = 'text/javascript';
|
|
1328
|
-
script.onload = fn;
|
|
1329
|
-
script.src = resolvedUrl;
|
|
1330
|
-
document.getElementsByTagName('head')[0].appendChild(script);
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
|
-
function get(name, remoteFrom) {
|
|
1334
|
-
return __federation_import(name).then(module => () => {
|
|
1335
|
-
if (remoteFrom === 'webpack') {
|
|
1336
|
-
return Object.prototype.toString.call(module).indexOf('Module') > -1 && module.default ? module.default : module
|
|
1337
|
-
}
|
|
1338
|
-
return module
|
|
1339
|
-
})
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
function merge(obj1, obj2) {
|
|
1343
|
-
const mergedObj = Object.assign(obj1, obj2);
|
|
1344
|
-
for (const key of Object.keys(mergedObj)) {
|
|
1345
|
-
if (typeof mergedObj[key] === 'object' && typeof obj2[key] === 'object') {
|
|
1346
|
-
mergedObj[key] = merge(mergedObj[key], obj2[key]);
|
|
1347
|
-
}
|
|
1348
|
-
}
|
|
1349
|
-
return mergedObj;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
const wrapShareModule = remoteFrom => {
|
|
1353
|
-
return merge({
|
|
1354
|
-
'react':{'18.2.0':{get:()=>get(new URL('__federation_shared_react-mmI5WPQQ.js', import.meta.url).href, remoteFrom), loaded:1}},'react-dom':{'18.2.0':{get:()=>get(new URL('__federation_shared_react-dom-BSxTar_g.js', import.meta.url).href, remoteFrom), loaded:1}}
|
|
1355
|
-
}, (globalThis.__federation_shared__ || {})['default'] || {});
|
|
1356
|
-
};
|
|
1357
|
-
|
|
1358
|
-
async function __federation_import(name) {
|
|
1359
|
-
currentImports[name] ??= import(name);
|
|
1360
|
-
return currentImports[name]
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
async function __federation_method_ensure(remoteId) {
|
|
1364
|
-
const remote = remotesMap[remoteId];
|
|
1365
|
-
if (!remote.inited) {
|
|
1366
|
-
if ('var' === remote.format) {
|
|
1367
|
-
// loading js with script tag
|
|
1368
|
-
return new Promise(resolve => {
|
|
1369
|
-
const callback = () => {
|
|
1370
|
-
if (!remote.inited) {
|
|
1371
|
-
remote.lib = window[remoteId];
|
|
1372
|
-
remote.lib.init(wrapShareModule(remote.from));
|
|
1373
|
-
remote.inited = true;
|
|
1374
|
-
}
|
|
1375
|
-
resolve(remote.lib);
|
|
1376
|
-
};
|
|
1377
|
-
return loadJS(remote.url, callback);
|
|
1378
|
-
});
|
|
1379
|
-
} else if (['esm', 'systemjs'].includes(remote.format)) {
|
|
1380
|
-
// loading js with import(...)
|
|
1381
|
-
return new Promise((resolve, reject) => {
|
|
1382
|
-
const getUrl = typeof remote.url === 'function' ? remote.url : () => Promise.resolve(remote.url);
|
|
1383
|
-
getUrl().then(url => {
|
|
1384
|
-
import(/* @vite-ignore */ url).then(lib => {
|
|
1385
|
-
if (!remote.inited) {
|
|
1386
|
-
const shareScope = wrapShareModule(remote.from);
|
|
1387
|
-
lib.init(shareScope);
|
|
1388
|
-
remote.lib = lib;
|
|
1389
|
-
remote.lib.init(shareScope);
|
|
1390
|
-
remote.inited = true;
|
|
1391
|
-
}
|
|
1392
|
-
resolve(remote.lib);
|
|
1393
|
-
}).catch(reject);
|
|
1394
|
-
});
|
|
1395
|
-
})
|
|
1396
|
-
}
|
|
1397
|
-
} else {
|
|
1398
|
-
return remote.lib;
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
function __federation_method_unwrapDefault(module) {
|
|
1403
|
-
return (module?.__esModule || module?.[Symbol.toStringTag] === 'Module') ? module.default : module
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
function __federation_method_getRemote(remoteName, componentName) {
|
|
1407
|
-
return __federation_method_ensure(remoteName).then((remote) => remote.get(componentName).then(factory => factory()));
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
1411
|
-
const v = glob[path];
|
|
1412
|
-
if (v) {
|
|
1413
|
-
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
1414
|
-
}
|
|
1415
|
-
return new Promise((_, reject) => {
|
|
1416
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
1417
|
-
reject.bind(
|
|
1418
|
-
null,
|
|
1419
|
-
new Error(
|
|
1420
|
-
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
|
1421
|
-
)
|
|
1422
|
-
)
|
|
1423
|
-
);
|
|
1424
|
-
});
|
|
1425
|
-
};
|
|
1426
|
-
|
|
1427
|
-
var jsxRuntime = {exports: {}};
|
|
1428
|
-
|
|
1429
|
-
var reactJsxRuntime_development = {};
|
|
1430
|
-
|
|
1431
|
-
/**
|
|
1432
|
-
* @license React
|
|
1433
|
-
* react-jsx-runtime.development.js
|
|
1434
|
-
*
|
|
1435
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1436
|
-
*
|
|
1437
|
-
* This source code is licensed under the MIT license found in the
|
|
1438
|
-
* LICENSE file in the root directory of this source tree.
|
|
1439
|
-
*/
|
|
1440
|
-
{
|
|
1441
|
-
(function() {
|
|
1442
|
-
var React = reactExports;
|
|
1443
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
1444
|
-
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
1445
|
-
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
1446
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
1447
|
-
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
1448
|
-
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
1449
|
-
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
1450
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
1451
|
-
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
1452
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
1453
|
-
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
1454
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
1455
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
1456
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
1457
|
-
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
1458
|
-
function getIteratorFn(maybeIterable) {
|
|
1459
|
-
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
|
1460
|
-
return null;
|
|
1461
|
-
}
|
|
1462
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
1463
|
-
if (typeof maybeIterator === "function") {
|
|
1464
|
-
return maybeIterator;
|
|
1465
|
-
}
|
|
1466
|
-
return null;
|
|
1467
|
-
}
|
|
1468
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1469
|
-
function error(format) {
|
|
1470
|
-
{
|
|
1471
|
-
{
|
|
1472
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
1473
|
-
args[_key2 - 1] = arguments[_key2];
|
|
1474
|
-
}
|
|
1475
|
-
printWarning("error", format, args);
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
function printWarning(level, format, args) {
|
|
1480
|
-
{
|
|
1481
|
-
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1482
|
-
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
|
1483
|
-
if (stack !== "") {
|
|
1484
|
-
format += "%s";
|
|
1485
|
-
args = args.concat([stack]);
|
|
1486
|
-
}
|
|
1487
|
-
var argsWithFormat = args.map(function(item) {
|
|
1488
|
-
return String(item);
|
|
1489
|
-
});
|
|
1490
|
-
argsWithFormat.unshift("Warning: " + format);
|
|
1491
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
var enableScopeAPI = false;
|
|
1495
|
-
var enableCacheElement = false;
|
|
1496
|
-
var enableTransitionTracing = false;
|
|
1497
|
-
var enableLegacyHidden = false;
|
|
1498
|
-
var enableDebugTracing = false;
|
|
1499
|
-
var REACT_MODULE_REFERENCE;
|
|
1500
|
-
{
|
|
1501
|
-
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
1502
|
-
}
|
|
1503
|
-
function isValidElementType(type) {
|
|
1504
|
-
if (typeof type === "string" || typeof type === "function") {
|
|
1505
|
-
return true;
|
|
1506
|
-
}
|
|
1507
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
1508
|
-
return true;
|
|
1509
|
-
}
|
|
1510
|
-
if (typeof type === "object" && type !== null) {
|
|
1511
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
1512
|
-
// types supported by any Flight configuration anywhere since
|
|
1513
|
-
// we don't know which Flight build this will end up being used
|
|
1514
|
-
// with.
|
|
1515
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
1516
|
-
return true;
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
return false;
|
|
1520
|
-
}
|
|
1521
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
1522
|
-
var displayName = outerType.displayName;
|
|
1523
|
-
if (displayName) {
|
|
1524
|
-
return displayName;
|
|
1525
|
-
}
|
|
1526
|
-
var functionName = innerType.displayName || innerType.name || "";
|
|
1527
|
-
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
1528
|
-
}
|
|
1529
|
-
function getContextName(type) {
|
|
1530
|
-
return type.displayName || "Context";
|
|
1531
|
-
}
|
|
1532
|
-
function getComponentNameFromType(type) {
|
|
1533
|
-
if (type == null) {
|
|
1534
|
-
return null;
|
|
1535
|
-
}
|
|
1536
|
-
{
|
|
1537
|
-
if (typeof type.tag === "number") {
|
|
1538
|
-
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
if (typeof type === "function") {
|
|
1542
|
-
return type.displayName || type.name || null;
|
|
1543
|
-
}
|
|
1544
|
-
if (typeof type === "string") {
|
|
1545
|
-
return type;
|
|
1546
|
-
}
|
|
1547
|
-
switch (type) {
|
|
1548
|
-
case REACT_FRAGMENT_TYPE:
|
|
1549
|
-
return "Fragment";
|
|
1550
|
-
case REACT_PORTAL_TYPE:
|
|
1551
|
-
return "Portal";
|
|
1552
|
-
case REACT_PROFILER_TYPE:
|
|
1553
|
-
return "Profiler";
|
|
1554
|
-
case REACT_STRICT_MODE_TYPE:
|
|
1555
|
-
return "StrictMode";
|
|
1556
|
-
case REACT_SUSPENSE_TYPE:
|
|
1557
|
-
return "Suspense";
|
|
1558
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
1559
|
-
return "SuspenseList";
|
|
1560
|
-
}
|
|
1561
|
-
if (typeof type === "object") {
|
|
1562
|
-
switch (type.$$typeof) {
|
|
1563
|
-
case REACT_CONTEXT_TYPE:
|
|
1564
|
-
var context = type;
|
|
1565
|
-
return getContextName(context) + ".Consumer";
|
|
1566
|
-
case REACT_PROVIDER_TYPE:
|
|
1567
|
-
var provider = type;
|
|
1568
|
-
return getContextName(provider._context) + ".Provider";
|
|
1569
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1570
|
-
return getWrappedName(type, type.render, "ForwardRef");
|
|
1571
|
-
case REACT_MEMO_TYPE:
|
|
1572
|
-
var outerName = type.displayName || null;
|
|
1573
|
-
if (outerName !== null) {
|
|
1574
|
-
return outerName;
|
|
1575
|
-
}
|
|
1576
|
-
return getComponentNameFromType(type.type) || "Memo";
|
|
1577
|
-
case REACT_LAZY_TYPE: {
|
|
1578
|
-
var lazyComponent = type;
|
|
1579
|
-
var payload = lazyComponent._payload;
|
|
1580
|
-
var init = lazyComponent._init;
|
|
1581
|
-
try {
|
|
1582
|
-
return getComponentNameFromType(init(payload));
|
|
1583
|
-
} catch (x) {
|
|
1584
|
-
return null;
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
return null;
|
|
1590
|
-
}
|
|
1591
|
-
var assign = Object.assign;
|
|
1592
|
-
var disabledDepth = 0;
|
|
1593
|
-
var prevLog;
|
|
1594
|
-
var prevInfo;
|
|
1595
|
-
var prevWarn;
|
|
1596
|
-
var prevError;
|
|
1597
|
-
var prevGroup;
|
|
1598
|
-
var prevGroupCollapsed;
|
|
1599
|
-
var prevGroupEnd;
|
|
1600
|
-
function disabledLog() {
|
|
1601
|
-
}
|
|
1602
|
-
disabledLog.__reactDisabledLog = true;
|
|
1603
|
-
function disableLogs() {
|
|
1604
|
-
{
|
|
1605
|
-
if (disabledDepth === 0) {
|
|
1606
|
-
prevLog = console.log;
|
|
1607
|
-
prevInfo = console.info;
|
|
1608
|
-
prevWarn = console.warn;
|
|
1609
|
-
prevError = console.error;
|
|
1610
|
-
prevGroup = console.group;
|
|
1611
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
1612
|
-
prevGroupEnd = console.groupEnd;
|
|
1613
|
-
var props = {
|
|
1614
|
-
configurable: true,
|
|
1615
|
-
enumerable: true,
|
|
1616
|
-
value: disabledLog,
|
|
1617
|
-
writable: true
|
|
1618
|
-
};
|
|
1619
|
-
Object.defineProperties(console, {
|
|
1620
|
-
info: props,
|
|
1621
|
-
log: props,
|
|
1622
|
-
warn: props,
|
|
1623
|
-
error: props,
|
|
1624
|
-
group: props,
|
|
1625
|
-
groupCollapsed: props,
|
|
1626
|
-
groupEnd: props
|
|
1627
|
-
});
|
|
1628
|
-
}
|
|
1629
|
-
disabledDepth++;
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
function reenableLogs() {
|
|
1633
|
-
{
|
|
1634
|
-
disabledDepth--;
|
|
1635
|
-
if (disabledDepth === 0) {
|
|
1636
|
-
var props = {
|
|
1637
|
-
configurable: true,
|
|
1638
|
-
enumerable: true,
|
|
1639
|
-
writable: true
|
|
1640
|
-
};
|
|
1641
|
-
Object.defineProperties(console, {
|
|
1642
|
-
log: assign({}, props, {
|
|
1643
|
-
value: prevLog
|
|
1644
|
-
}),
|
|
1645
|
-
info: assign({}, props, {
|
|
1646
|
-
value: prevInfo
|
|
1647
|
-
}),
|
|
1648
|
-
warn: assign({}, props, {
|
|
1649
|
-
value: prevWarn
|
|
1650
|
-
}),
|
|
1651
|
-
error: assign({}, props, {
|
|
1652
|
-
value: prevError
|
|
1653
|
-
}),
|
|
1654
|
-
group: assign({}, props, {
|
|
1655
|
-
value: prevGroup
|
|
1656
|
-
}),
|
|
1657
|
-
groupCollapsed: assign({}, props, {
|
|
1658
|
-
value: prevGroupCollapsed
|
|
1659
|
-
}),
|
|
1660
|
-
groupEnd: assign({}, props, {
|
|
1661
|
-
value: prevGroupEnd
|
|
1662
|
-
})
|
|
1663
|
-
});
|
|
1664
|
-
}
|
|
1665
|
-
if (disabledDepth < 0) {
|
|
1666
|
-
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
1671
|
-
var prefix;
|
|
1672
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
1673
|
-
{
|
|
1674
|
-
if (prefix === void 0) {
|
|
1675
|
-
try {
|
|
1676
|
-
throw Error();
|
|
1677
|
-
} catch (x) {
|
|
1678
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
1679
|
-
prefix = match && match[1] || "";
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
return "\n" + prefix + name;
|
|
1683
|
-
}
|
|
1684
|
-
}
|
|
1685
|
-
var reentry = false;
|
|
1686
|
-
var componentFrameCache;
|
|
1687
|
-
{
|
|
1688
|
-
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
|
1689
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
1690
|
-
}
|
|
1691
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
1692
|
-
if (!fn || reentry) {
|
|
1693
|
-
return "";
|
|
1694
|
-
}
|
|
1695
|
-
{
|
|
1696
|
-
var frame = componentFrameCache.get(fn);
|
|
1697
|
-
if (frame !== void 0) {
|
|
1698
|
-
return frame;
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
var control;
|
|
1702
|
-
reentry = true;
|
|
1703
|
-
var previousPrepareStackTrace = Error.prepareStackTrace;
|
|
1704
|
-
Error.prepareStackTrace = void 0;
|
|
1705
|
-
var previousDispatcher;
|
|
1706
|
-
{
|
|
1707
|
-
previousDispatcher = ReactCurrentDispatcher.current;
|
|
1708
|
-
ReactCurrentDispatcher.current = null;
|
|
1709
|
-
disableLogs();
|
|
1710
|
-
}
|
|
1711
|
-
try {
|
|
1712
|
-
if (construct) {
|
|
1713
|
-
var Fake = function() {
|
|
1714
|
-
throw Error();
|
|
1715
|
-
};
|
|
1716
|
-
Object.defineProperty(Fake.prototype, "props", {
|
|
1717
|
-
set: function() {
|
|
1718
|
-
throw Error();
|
|
1719
|
-
}
|
|
1720
|
-
});
|
|
1721
|
-
if (typeof Reflect === "object" && Reflect.construct) {
|
|
1722
|
-
try {
|
|
1723
|
-
Reflect.construct(Fake, []);
|
|
1724
|
-
} catch (x) {
|
|
1725
|
-
control = x;
|
|
1726
|
-
}
|
|
1727
|
-
Reflect.construct(fn, [], Fake);
|
|
1728
|
-
} else {
|
|
1729
|
-
try {
|
|
1730
|
-
Fake.call();
|
|
1731
|
-
} catch (x) {
|
|
1732
|
-
control = x;
|
|
1733
|
-
}
|
|
1734
|
-
fn.call(Fake.prototype);
|
|
1735
|
-
}
|
|
1736
|
-
} else {
|
|
1737
|
-
try {
|
|
1738
|
-
throw Error();
|
|
1739
|
-
} catch (x) {
|
|
1740
|
-
control = x;
|
|
1741
|
-
}
|
|
1742
|
-
fn();
|
|
1743
|
-
}
|
|
1744
|
-
} catch (sample) {
|
|
1745
|
-
if (sample && control && typeof sample.stack === "string") {
|
|
1746
|
-
var sampleLines = sample.stack.split("\n");
|
|
1747
|
-
var controlLines = control.stack.split("\n");
|
|
1748
|
-
var s = sampleLines.length - 1;
|
|
1749
|
-
var c = controlLines.length - 1;
|
|
1750
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
1751
|
-
c--;
|
|
1752
|
-
}
|
|
1753
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
1754
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
1755
|
-
if (s !== 1 || c !== 1) {
|
|
1756
|
-
do {
|
|
1757
|
-
s--;
|
|
1758
|
-
c--;
|
|
1759
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
1760
|
-
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
|
1761
|
-
if (fn.displayName && _frame.includes("<anonymous>")) {
|
|
1762
|
-
_frame = _frame.replace("<anonymous>", fn.displayName);
|
|
1763
|
-
}
|
|
1764
|
-
{
|
|
1765
|
-
if (typeof fn === "function") {
|
|
1766
|
-
componentFrameCache.set(fn, _frame);
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
return _frame;
|
|
1770
|
-
}
|
|
1771
|
-
} while (s >= 1 && c >= 0);
|
|
1772
|
-
}
|
|
1773
|
-
break;
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
} finally {
|
|
1778
|
-
reentry = false;
|
|
1779
|
-
{
|
|
1780
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
1781
|
-
reenableLogs();
|
|
1782
|
-
}
|
|
1783
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
1784
|
-
}
|
|
1785
|
-
var name = fn ? fn.displayName || fn.name : "";
|
|
1786
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
|
1787
|
-
{
|
|
1788
|
-
if (typeof fn === "function") {
|
|
1789
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
return syntheticFrame;
|
|
1793
|
-
}
|
|
1794
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
1795
|
-
{
|
|
1796
|
-
return describeNativeComponentFrame(fn, false);
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
function shouldConstruct(Component) {
|
|
1800
|
-
var prototype = Component.prototype;
|
|
1801
|
-
return !!(prototype && prototype.isReactComponent);
|
|
1802
|
-
}
|
|
1803
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
1804
|
-
if (type == null) {
|
|
1805
|
-
return "";
|
|
1806
|
-
}
|
|
1807
|
-
if (typeof type === "function") {
|
|
1808
|
-
{
|
|
1809
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
if (typeof type === "string") {
|
|
1813
|
-
return describeBuiltInComponentFrame(type);
|
|
1814
|
-
}
|
|
1815
|
-
switch (type) {
|
|
1816
|
-
case REACT_SUSPENSE_TYPE:
|
|
1817
|
-
return describeBuiltInComponentFrame("Suspense");
|
|
1818
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
1819
|
-
return describeBuiltInComponentFrame("SuspenseList");
|
|
1820
|
-
}
|
|
1821
|
-
if (typeof type === "object") {
|
|
1822
|
-
switch (type.$$typeof) {
|
|
1823
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1824
|
-
return describeFunctionComponentFrame(type.render);
|
|
1825
|
-
case REACT_MEMO_TYPE:
|
|
1826
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
1827
|
-
case REACT_LAZY_TYPE: {
|
|
1828
|
-
var lazyComponent = type;
|
|
1829
|
-
var payload = lazyComponent._payload;
|
|
1830
|
-
var init = lazyComponent._init;
|
|
1831
|
-
try {
|
|
1832
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
1833
|
-
} catch (x) {
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
return "";
|
|
1839
|
-
}
|
|
1840
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1841
|
-
var loggedTypeFailures = {};
|
|
1842
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
1843
|
-
function setCurrentlyValidatingElement(element) {
|
|
1844
|
-
{
|
|
1845
|
-
if (element) {
|
|
1846
|
-
var owner = element._owner;
|
|
1847
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
1848
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
1849
|
-
} else {
|
|
1850
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
1855
|
-
{
|
|
1856
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
1857
|
-
for (var typeSpecName in typeSpecs) {
|
|
1858
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
1859
|
-
var error$1 = void 0;
|
|
1860
|
-
try {
|
|
1861
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
1862
|
-
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
1863
|
-
err.name = "Invariant Violation";
|
|
1864
|
-
throw err;
|
|
1865
|
-
}
|
|
1866
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1867
|
-
} catch (ex) {
|
|
1868
|
-
error$1 = ex;
|
|
1869
|
-
}
|
|
1870
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
1871
|
-
setCurrentlyValidatingElement(element);
|
|
1872
|
-
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
|
1873
|
-
setCurrentlyValidatingElement(null);
|
|
1874
|
-
}
|
|
1875
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
1876
|
-
loggedTypeFailures[error$1.message] = true;
|
|
1877
|
-
setCurrentlyValidatingElement(element);
|
|
1878
|
-
error("Failed %s type: %s", location, error$1.message);
|
|
1879
|
-
setCurrentlyValidatingElement(null);
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
var isArrayImpl = Array.isArray;
|
|
1886
|
-
function isArray(a) {
|
|
1887
|
-
return isArrayImpl(a);
|
|
1888
|
-
}
|
|
1889
|
-
function typeName(value) {
|
|
1890
|
-
{
|
|
1891
|
-
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
|
1892
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
1893
|
-
return type;
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
function willCoercionThrow(value) {
|
|
1897
|
-
{
|
|
1898
|
-
try {
|
|
1899
|
-
testStringCoercion(value);
|
|
1900
|
-
return false;
|
|
1901
|
-
} catch (e) {
|
|
1902
|
-
return true;
|
|
1903
|
-
}
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
function testStringCoercion(value) {
|
|
1907
|
-
return "" + value;
|
|
1908
|
-
}
|
|
1909
|
-
function checkKeyStringCoercion(value) {
|
|
1910
|
-
{
|
|
1911
|
-
if (willCoercionThrow(value)) {
|
|
1912
|
-
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
|
1913
|
-
return testStringCoercion(value);
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
1918
|
-
var RESERVED_PROPS = {
|
|
1919
|
-
key: true,
|
|
1920
|
-
ref: true,
|
|
1921
|
-
__self: true,
|
|
1922
|
-
__source: true
|
|
1923
|
-
};
|
|
1924
|
-
var specialPropKeyWarningShown;
|
|
1925
|
-
var specialPropRefWarningShown;
|
|
1926
|
-
var didWarnAboutStringRefs;
|
|
1927
|
-
{
|
|
1928
|
-
didWarnAboutStringRefs = {};
|
|
1929
|
-
}
|
|
1930
|
-
function hasValidRef(config) {
|
|
1931
|
-
{
|
|
1932
|
-
if (hasOwnProperty.call(config, "ref")) {
|
|
1933
|
-
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
1934
|
-
if (getter && getter.isReactWarning) {
|
|
1935
|
-
return false;
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
return config.ref !== void 0;
|
|
1940
|
-
}
|
|
1941
|
-
function hasValidKey(config) {
|
|
1942
|
-
{
|
|
1943
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
1944
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
1945
|
-
if (getter && getter.isReactWarning) {
|
|
1946
|
-
return false;
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
return config.key !== void 0;
|
|
1951
|
-
}
|
|
1952
|
-
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
1953
|
-
{
|
|
1954
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
|
1955
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
1956
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
1957
|
-
error('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://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
|
1958
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
1964
|
-
{
|
|
1965
|
-
var warnAboutAccessingKey = function() {
|
|
1966
|
-
if (!specialPropKeyWarningShown) {
|
|
1967
|
-
specialPropKeyWarningShown = true;
|
|
1968
|
-
error("%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://reactjs.org/link/special-props)", displayName);
|
|
1969
|
-
}
|
|
1970
|
-
};
|
|
1971
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
1972
|
-
Object.defineProperty(props, "key", {
|
|
1973
|
-
get: warnAboutAccessingKey,
|
|
1974
|
-
configurable: true
|
|
1975
|
-
});
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
1979
|
-
{
|
|
1980
|
-
var warnAboutAccessingRef = function() {
|
|
1981
|
-
if (!specialPropRefWarningShown) {
|
|
1982
|
-
specialPropRefWarningShown = true;
|
|
1983
|
-
error("%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://reactjs.org/link/special-props)", displayName);
|
|
1984
|
-
}
|
|
1985
|
-
};
|
|
1986
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
1987
|
-
Object.defineProperty(props, "ref", {
|
|
1988
|
-
get: warnAboutAccessingRef,
|
|
1989
|
-
configurable: true
|
|
1990
|
-
});
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
|
1994
|
-
var element = {
|
|
1995
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
1996
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
1997
|
-
// Built-in properties that belong on the element
|
|
1998
|
-
type,
|
|
1999
|
-
key,
|
|
2000
|
-
ref,
|
|
2001
|
-
props,
|
|
2002
|
-
// Record the component responsible for creating this element.
|
|
2003
|
-
_owner: owner
|
|
2004
|
-
};
|
|
2005
|
-
{
|
|
2006
|
-
element._store = {};
|
|
2007
|
-
Object.defineProperty(element._store, "validated", {
|
|
2008
|
-
configurable: false,
|
|
2009
|
-
enumerable: false,
|
|
2010
|
-
writable: true,
|
|
2011
|
-
value: false
|
|
2012
|
-
});
|
|
2013
|
-
Object.defineProperty(element, "_self", {
|
|
2014
|
-
configurable: false,
|
|
2015
|
-
enumerable: false,
|
|
2016
|
-
writable: false,
|
|
2017
|
-
value: self
|
|
2018
|
-
});
|
|
2019
|
-
Object.defineProperty(element, "_source", {
|
|
2020
|
-
configurable: false,
|
|
2021
|
-
enumerable: false,
|
|
2022
|
-
writable: false,
|
|
2023
|
-
value: source
|
|
2024
|
-
});
|
|
2025
|
-
if (Object.freeze) {
|
|
2026
|
-
Object.freeze(element.props);
|
|
2027
|
-
Object.freeze(element);
|
|
2028
|
-
}
|
|
2029
|
-
}
|
|
2030
|
-
return element;
|
|
2031
|
-
};
|
|
2032
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
2033
|
-
{
|
|
2034
|
-
var propName;
|
|
2035
|
-
var props = {};
|
|
2036
|
-
var key = null;
|
|
2037
|
-
var ref = null;
|
|
2038
|
-
if (maybeKey !== void 0) {
|
|
2039
|
-
{
|
|
2040
|
-
checkKeyStringCoercion(maybeKey);
|
|
2041
|
-
}
|
|
2042
|
-
key = "" + maybeKey;
|
|
2043
|
-
}
|
|
2044
|
-
if (hasValidKey(config)) {
|
|
2045
|
-
{
|
|
2046
|
-
checkKeyStringCoercion(config.key);
|
|
2047
|
-
}
|
|
2048
|
-
key = "" + config.key;
|
|
2049
|
-
}
|
|
2050
|
-
if (hasValidRef(config)) {
|
|
2051
|
-
ref = config.ref;
|
|
2052
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
2053
|
-
}
|
|
2054
|
-
for (propName in config) {
|
|
2055
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
2056
|
-
props[propName] = config[propName];
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
if (type && type.defaultProps) {
|
|
2060
|
-
var defaultProps = type.defaultProps;
|
|
2061
|
-
for (propName in defaultProps) {
|
|
2062
|
-
if (props[propName] === void 0) {
|
|
2063
|
-
props[propName] = defaultProps[propName];
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
}
|
|
2067
|
-
if (key || ref) {
|
|
2068
|
-
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
|
2069
|
-
if (key) {
|
|
2070
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
2071
|
-
}
|
|
2072
|
-
if (ref) {
|
|
2073
|
-
defineRefPropWarningGetter(props, displayName);
|
|
2074
|
-
}
|
|
2075
|
-
}
|
|
2076
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
2080
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2081
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
2082
|
-
{
|
|
2083
|
-
if (element) {
|
|
2084
|
-
var owner = element._owner;
|
|
2085
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2086
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
2087
|
-
} else {
|
|
2088
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
|
-
var propTypesMisspellWarningShown;
|
|
2093
|
-
{
|
|
2094
|
-
propTypesMisspellWarningShown = false;
|
|
2095
|
-
}
|
|
2096
|
-
function isValidElement(object) {
|
|
2097
|
-
{
|
|
2098
|
-
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
function getDeclarationErrorAddendum() {
|
|
2102
|
-
{
|
|
2103
|
-
if (ReactCurrentOwner$1.current) {
|
|
2104
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
2105
|
-
if (name) {
|
|
2106
|
-
return "\n\nCheck the render method of `" + name + "`.";
|
|
2107
|
-
}
|
|
2108
|
-
}
|
|
2109
|
-
return "";
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
function getSourceInfoErrorAddendum(source) {
|
|
2113
|
-
{
|
|
2114
|
-
return "";
|
|
2115
|
-
}
|
|
2116
|
-
}
|
|
2117
|
-
var ownerHasKeyUseWarning = {};
|
|
2118
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
2119
|
-
{
|
|
2120
|
-
var info = getDeclarationErrorAddendum();
|
|
2121
|
-
if (!info) {
|
|
2122
|
-
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
|
2123
|
-
if (parentName) {
|
|
2124
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
return info;
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
|
-
function validateExplicitKey(element, parentType) {
|
|
2131
|
-
{
|
|
2132
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
2133
|
-
return;
|
|
2134
|
-
}
|
|
2135
|
-
element._store.validated = true;
|
|
2136
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
2137
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
2138
|
-
return;
|
|
2139
|
-
}
|
|
2140
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
|
2141
|
-
var childOwner = "";
|
|
2142
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
2143
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
2144
|
-
}
|
|
2145
|
-
setCurrentlyValidatingElement$1(element);
|
|
2146
|
-
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
2147
|
-
setCurrentlyValidatingElement$1(null);
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
2150
|
-
function validateChildKeys(node, parentType) {
|
|
2151
|
-
{
|
|
2152
|
-
if (typeof node !== "object") {
|
|
2153
|
-
return;
|
|
2154
|
-
}
|
|
2155
|
-
if (isArray(node)) {
|
|
2156
|
-
for (var i = 0; i < node.length; i++) {
|
|
2157
|
-
var child = node[i];
|
|
2158
|
-
if (isValidElement(child)) {
|
|
2159
|
-
validateExplicitKey(child, parentType);
|
|
2160
|
-
}
|
|
2161
|
-
}
|
|
2162
|
-
} else if (isValidElement(node)) {
|
|
2163
|
-
if (node._store) {
|
|
2164
|
-
node._store.validated = true;
|
|
2165
|
-
}
|
|
2166
|
-
} else if (node) {
|
|
2167
|
-
var iteratorFn = getIteratorFn(node);
|
|
2168
|
-
if (typeof iteratorFn === "function") {
|
|
2169
|
-
if (iteratorFn !== node.entries) {
|
|
2170
|
-
var iterator = iteratorFn.call(node);
|
|
2171
|
-
var step;
|
|
2172
|
-
while (!(step = iterator.next()).done) {
|
|
2173
|
-
if (isValidElement(step.value)) {
|
|
2174
|
-
validateExplicitKey(step.value, parentType);
|
|
2175
|
-
}
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
}
|
|
2182
|
-
function validatePropTypes(element) {
|
|
2183
|
-
{
|
|
2184
|
-
var type = element.type;
|
|
2185
|
-
if (type === null || type === void 0 || typeof type === "string") {
|
|
2186
|
-
return;
|
|
2187
|
-
}
|
|
2188
|
-
var propTypes;
|
|
2189
|
-
if (typeof type === "function") {
|
|
2190
|
-
propTypes = type.propTypes;
|
|
2191
|
-
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
2192
|
-
// Inner props are checked in the reconciler.
|
|
2193
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
2194
|
-
propTypes = type.propTypes;
|
|
2195
|
-
} else {
|
|
2196
|
-
return;
|
|
2197
|
-
}
|
|
2198
|
-
if (propTypes) {
|
|
2199
|
-
var name = getComponentNameFromType(type);
|
|
2200
|
-
checkPropTypes(propTypes, element.props, "prop", name, element);
|
|
2201
|
-
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
|
2202
|
-
propTypesMisspellWarningShown = true;
|
|
2203
|
-
var _name = getComponentNameFromType(type);
|
|
2204
|
-
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
|
2205
|
-
}
|
|
2206
|
-
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
|
2207
|
-
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
2208
|
-
}
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
function validateFragmentProps(fragment) {
|
|
2212
|
-
{
|
|
2213
|
-
var keys = Object.keys(fragment.props);
|
|
2214
|
-
for (var i = 0; i < keys.length; i++) {
|
|
2215
|
-
var key = keys[i];
|
|
2216
|
-
if (key !== "children" && key !== "key") {
|
|
2217
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
2218
|
-
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
|
2219
|
-
setCurrentlyValidatingElement$1(null);
|
|
2220
|
-
break;
|
|
2221
|
-
}
|
|
2222
|
-
}
|
|
2223
|
-
if (fragment.ref !== null) {
|
|
2224
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
2225
|
-
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
|
2226
|
-
setCurrentlyValidatingElement$1(null);
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
2231
|
-
{
|
|
2232
|
-
var validType = isValidElementType(type);
|
|
2233
|
-
if (!validType) {
|
|
2234
|
-
var info = "";
|
|
2235
|
-
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
|
2236
|
-
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
2237
|
-
}
|
|
2238
|
-
var sourceInfo = getSourceInfoErrorAddendum();
|
|
2239
|
-
if (sourceInfo) {
|
|
2240
|
-
info += sourceInfo;
|
|
2241
|
-
} else {
|
|
2242
|
-
info += getDeclarationErrorAddendum();
|
|
2243
|
-
}
|
|
2244
|
-
var typeString;
|
|
2245
|
-
if (type === null) {
|
|
2246
|
-
typeString = "null";
|
|
2247
|
-
} else if (isArray(type)) {
|
|
2248
|
-
typeString = "array";
|
|
2249
|
-
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
2250
|
-
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
|
2251
|
-
info = " Did you accidentally export a JSX literal instead of a component?";
|
|
2252
|
-
} else {
|
|
2253
|
-
typeString = typeof type;
|
|
2254
|
-
}
|
|
2255
|
-
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
2256
|
-
}
|
|
2257
|
-
var element = jsxDEV(type, props, key, source, self);
|
|
2258
|
-
if (element == null) {
|
|
2259
|
-
return element;
|
|
2260
|
-
}
|
|
2261
|
-
if (validType) {
|
|
2262
|
-
var children = props.children;
|
|
2263
|
-
if (children !== void 0) {
|
|
2264
|
-
if (isStaticChildren) {
|
|
2265
|
-
if (isArray(children)) {
|
|
2266
|
-
for (var i = 0; i < children.length; i++) {
|
|
2267
|
-
validateChildKeys(children[i], type);
|
|
2268
|
-
}
|
|
2269
|
-
if (Object.freeze) {
|
|
2270
|
-
Object.freeze(children);
|
|
2271
|
-
}
|
|
2272
|
-
} else {
|
|
2273
|
-
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
2274
|
-
}
|
|
2275
|
-
} else {
|
|
2276
|
-
validateChildKeys(children, type);
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
}
|
|
2280
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
2281
|
-
validateFragmentProps(element);
|
|
2282
|
-
} else {
|
|
2283
|
-
validatePropTypes(element);
|
|
2284
|
-
}
|
|
2285
|
-
return element;
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
2289
|
-
{
|
|
2290
|
-
return jsxWithValidation(type, props, key, true);
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
2294
|
-
{
|
|
2295
|
-
return jsxWithValidation(type, props, key, false);
|
|
2296
|
-
}
|
|
2297
|
-
}
|
|
2298
|
-
var jsx = jsxWithValidationDynamic;
|
|
2299
|
-
var jsxs = jsxWithValidationStatic;
|
|
2300
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
2301
|
-
reactJsxRuntime_development.jsx = jsx;
|
|
2302
|
-
reactJsxRuntime_development.jsxs = jsxs;
|
|
2303
|
-
})();
|
|
2304
|
-
}
|
|
2305
|
-
|
|
2306
|
-
{
|
|
2307
|
-
jsxRuntime.exports = reactJsxRuntime_development;
|
|
2308
|
-
}
|
|
2309
|
-
|
|
2310
|
-
var jsxRuntimeExports = jsxRuntime.exports;
|
|
2311
|
-
|
|
2312
|
-
const {Suspense: Suspense$1,lazy: lazy$1,useEffect: useEffect$1,useState: useState$1} = await importShared('react');
|
|
2313
|
-
|
|
2314
|
-
const __federation_var_VFCMFSectionGrid = await __federation_method_getRemote("VFCMF" , "./SectionGrid");
|
|
2315
|
-
let SectionGrid = __federation_method_unwrapDefault(__federation_var_VFCMFSectionGrid);
|
|
2316
|
-
const __federation_var_VFCMFSectionScroll = await __federation_method_getRemote("VFCMF" , "./SectionScroll");
|
|
2317
|
-
let SectionScroll = __federation_method_unwrapDefault(__federation_var_VFCMFSectionScroll);
|
|
2318
|
-
const __federation_var_VFCMFSectionPromo = await __federation_method_getRemote("VFCMF" , "./SectionPromo");
|
|
2319
|
-
let SectionPromo = __federation_method_unwrapDefault(__federation_var_VFCMFSectionPromo);
|
|
2320
|
-
const __federation_var_VFCMFSectionItemVideo = await __federation_method_getRemote("VFCMF" , "./SectionItemVideo");
|
|
2321
|
-
let SectionItemVideo = __federation_method_unwrapDefault(__federation_var_VFCMFSectionItemVideo);
|
|
2322
|
-
const VIDEO_SECTION_TYPE = "videoSection";
|
|
2323
|
-
const SECTION_COMPONENTS = {
|
|
2324
|
-
grid: SectionGrid,
|
|
2325
|
-
promo: SectionPromo,
|
|
2326
|
-
scroll: SectionScroll,
|
|
2327
|
-
default: SectionGrid
|
|
2328
|
-
};
|
|
2329
|
-
const LoadingSpinner = () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-full flex justify-center items-center py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-black/90 p-2 rounded-md", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-white animate-pulse", children: "Loading..." }) }) });
|
|
2330
|
-
const Widget = ({ token, apiurl }) => {
|
|
2331
|
-
const [widgetState, setWidgetState] = useState$1({
|
|
2332
|
-
data: {},
|
|
2333
|
-
loading: true,
|
|
2334
|
-
error: "",
|
|
2335
|
-
Component: null,
|
|
2336
|
-
type: null
|
|
2337
|
-
});
|
|
2338
|
-
const apiUrl = apiurl || "https://apiv3.videoflow.io";
|
|
2339
|
-
const widgetDataToSectionData = (data2) => {
|
|
2340
|
-
return {
|
|
2341
|
-
description: "",
|
|
2342
|
-
items: {
|
|
2343
|
-
data: data2?.content?.map(({ id, src, ...rest }) => ({
|
|
2344
|
-
input: { id, src, ...rest },
|
|
2345
|
-
token: id,
|
|
2346
|
-
url: src
|
|
2347
|
-
})) || []
|
|
2348
|
-
},
|
|
2349
|
-
SectionItem: SectionItemVideo,
|
|
2350
|
-
layout: data2.settings.layout,
|
|
2351
|
-
settings: data2.settings.common,
|
|
2352
|
-
name: data2.name,
|
|
2353
|
-
theme: {
|
|
2354
|
-
...data2.settings.common,
|
|
2355
|
-
...data2.defaultStyle.section,
|
|
2356
|
-
itemCount: data2?.content?.length || 0
|
|
2357
|
-
/*
|
|
2358
|
-
ADDITIONAL PARAMS:
|
|
2359
|
-
link : {enabled: true, url : "YOUR URL"}, //For Asset section
|
|
2360
|
-
src: "[ASSET URL]", //For Asset section
|
|
2361
|
-
css: {}, //For HTML sections
|
|
2362
|
-
code: "<h1>Some HTML</h1>", //For HTML and Markdown sections
|
|
2363
|
-
*/
|
|
2364
|
-
},
|
|
2365
|
-
token: data2.id,
|
|
2366
|
-
type: data2.settings.type,
|
|
2367
|
-
/*
|
|
2368
|
-
ADDITIONAL PARAMS:
|
|
2369
|
-
itemURLFormat : (sectionType, item, url) => {//Your URL logic here} //Optional - For additional/custom url formatting
|
|
2370
|
-
*/
|
|
2371
|
-
apiUrl
|
|
2372
|
-
};
|
|
2373
|
-
};
|
|
2374
|
-
const transformWidgetData = (data2) => {
|
|
2375
|
-
if (data2.type === VIDEO_SECTION_TYPE) {
|
|
2376
|
-
return widgetDataToSectionData(data2);
|
|
2377
|
-
}
|
|
2378
|
-
return {
|
|
2379
|
-
data: data2,
|
|
2380
|
-
apiUrl
|
|
2381
|
-
};
|
|
2382
|
-
};
|
|
2383
|
-
const applyStyle = (css) => {
|
|
2384
|
-
if (!css) return;
|
|
2385
|
-
const style = document.createElement("style");
|
|
2386
|
-
style.type = "text/css";
|
|
2387
|
-
style.appendChild(document.createTextNode(css));
|
|
2388
|
-
document.head.appendChild(style);
|
|
2389
|
-
return () => style.remove();
|
|
2390
|
-
};
|
|
2391
|
-
const getComponent = (type2, layout) => {
|
|
2392
|
-
if (type2 === VIDEO_SECTION_TYPE) {
|
|
2393
|
-
return SECTION_COMPONENTS[layout] || SECTION_COMPONENTS.default;
|
|
2394
|
-
}
|
|
2395
|
-
return lazy$1(() => __variableDynamicImportRuntimeHelper((/* #__PURE__ */ Object.assign({"./widgets/gallery/gallery.jsx": () => import('./gallery-B8LUc7bk.js'),"./widgets/matches/matches.jsx": () => import('./matches-CschU_h9.js'),"./widgets/matchesStandalone/matchesStandalone.jsx": () => import('./matchesStandalone-DbqxMvqg.js'),"./widgets/player/player.jsx": () => import('./player-DxyaJi4M.js'),"./widgets/poster/poster.jsx": () => import('./poster-LqRyW65i.js'),"./widgets/poster/posterItem.jsx": () => import('./posterItem-rRMX2uVL.js'),"./widgets/scroll/scroll.jsx": () => import('./scroll-DxmvAhab.js'),"./widgets/story/story.jsx": () => import('./story-C-jPJ27D.js')})), `./widgets/${type2}/${type2}.jsx`, 4));
|
|
2396
|
-
};
|
|
2397
|
-
useEffect$1(() => {
|
|
2398
|
-
const fetchData = async () => {
|
|
2399
|
-
try {
|
|
2400
|
-
const response = await fetch(`${apiUrl}/widgets/${token}`);
|
|
2401
|
-
if (!response.ok) {
|
|
2402
|
-
throw new Error(`${response.status}: ${response.statusText}`);
|
|
2403
|
-
}
|
|
2404
|
-
const resData = await response.json();
|
|
2405
|
-
const transformedData = transformWidgetData(resData);
|
|
2406
|
-
const component = getComponent(resData.type, resData.settings?.layout);
|
|
2407
|
-
if (resData.style && resData.type !== VIDEO_SECTION_TYPE) {
|
|
2408
|
-
applyStyle(resData.style);
|
|
2409
|
-
}
|
|
2410
|
-
setWidgetState({
|
|
2411
|
-
data: transformedData,
|
|
2412
|
-
loading: false,
|
|
2413
|
-
error: "",
|
|
2414
|
-
Component: component,
|
|
2415
|
-
type: resData.type
|
|
2416
|
-
});
|
|
2417
|
-
} catch (error2) {
|
|
2418
|
-
console.error("Widget fetch error:", error2);
|
|
2419
|
-
setWidgetState((state) => ({
|
|
2420
|
-
...state,
|
|
2421
|
-
loading: false,
|
|
2422
|
-
error: "Content is not available"
|
|
2423
|
-
}));
|
|
2424
|
-
}
|
|
2425
|
-
};
|
|
2426
|
-
fetchData();
|
|
2427
|
-
}, [token, apiUrl]);
|
|
2428
|
-
const { data, loading, error, Component, type } = widgetState;
|
|
2429
|
-
if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingSpinner, {});
|
|
2430
|
-
if (error) return null;
|
|
2431
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense$1, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingSpinner, {}), children: Component && (type === VIDEO_SECTION_TYPE ? /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...data }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { data: data.data, apiUrl: data.apiUrl })) });
|
|
2432
|
-
};
|
|
2433
|
-
|
|
2434
|
-
const {useState,useEffect,lazy,Suspense} = await importShared('react');
|
|
2435
|
-
const ChannelWidget = ({ token, type }) => {
|
|
2436
|
-
const [data, setData] = useState({});
|
|
2437
|
-
const [loading, setLoading] = useState(true);
|
|
2438
|
-
const [error, setError] = useState("");
|
|
2439
|
-
const [Component, setComponent] = useState();
|
|
2440
|
-
const getData = async () => {
|
|
2441
|
-
console.log(`Pulling data from: ${token}`);
|
|
2442
|
-
const res = await fetch(`${"https://apiv3.videoflow.io"}/widgets/channel/${token}`);
|
|
2443
|
-
if (res.ok) {
|
|
2444
|
-
const resData = await res.json();
|
|
2445
|
-
console.log(resData);
|
|
2446
|
-
setData(resData);
|
|
2447
|
-
const w = lazy(() => __variableDynamicImportRuntimeHelper((/* #__PURE__ */ Object.assign({})), `./widgets/${type}/${type}.js`, 4));
|
|
2448
|
-
setComponent(w);
|
|
2449
|
-
setLoading(false);
|
|
2450
|
-
} else {
|
|
2451
|
-
setLoading(false);
|
|
2452
|
-
setError("Content is not available");
|
|
2453
|
-
}
|
|
2454
|
-
};
|
|
2455
|
-
useEffect(() => {
|
|
2456
|
-
getData();
|
|
2457
|
-
}, []);
|
|
2458
|
-
if (loading) {
|
|
2459
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full h-full flex justify-center items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-black/90 p-5 rounded-md", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-white animate-pulse", children: "Loading..." }) }) });
|
|
2460
|
-
} else {
|
|
2461
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { data }) });
|
|
2462
|
-
}
|
|
2463
|
-
};
|
|
2464
|
-
|
|
2465
|
-
const React = await importShared('react');
|
|
2466
|
-
|
|
2467
|
-
Widget.propTypes = {
|
|
2468
|
-
token : PropTypes.string,
|
|
2469
|
-
apiurl : PropTypes.string
|
|
2470
|
-
};
|
|
2471
|
-
|
|
2472
|
-
ChannelWidget.propTypes = {
|
|
2473
|
-
token : PropTypes.string,
|
|
2474
|
-
type : PropTypes.string
|
|
2475
|
-
};
|
|
2476
|
-
|
|
2477
|
-
customElements.define("vf-widget", S(Widget, React, ReactDOM));
|
|
2478
|
-
customElements.define("vfc-widget", S(ChannelWidget, React, ReactDOM));
|
|
2479
|
-
|
|
2480
|
-
export { PropTypes as P, importShared as i, jsxRuntimeExports as j, reactIsExports as r };
|
|
2481
|
-
//# sourceMappingURL=index-Cli5VWqj.js.map
|