@flagship.io/react-sdk 5.0.0-alpha.0 → 5.0.1-beta.0
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/index.node.js +1 -2080
- package/dist/index.node.js.map +1 -1
- package/dist/src/FlagshipHooks.js +1 -1
- package/dist/src/FlagshipProvider.js +0 -1
- package/dist/src/sdkVersion.d.ts +1 -1
- package/dist/src/sdkVersion.js +1 -1
- package/dist/src/type.d.ts +1 -1
- package/package.json +9 -11
package/dist/index.node.js
CHANGED
|
@@ -1,2081 +1,2 @@
|
|
|
1
|
-
/******/ (() => { // webpackBootstrap
|
|
2
|
-
/******/ "use strict";
|
|
3
|
-
/******/ var __webpack_modules__ = ({
|
|
4
|
-
|
|
5
|
-
/***/ "./src/FSFlag.ts":
|
|
6
|
-
/*!***********************!*\
|
|
7
|
-
!*** ./src/FSFlag.ts ***!
|
|
8
|
-
\***********************/
|
|
9
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
10
|
-
|
|
11
|
-
__webpack_require__.r(__webpack_exports__);
|
|
12
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13
|
-
/* harmony export */ FSFlag: () => (/* binding */ FSFlag)
|
|
14
|
-
/* harmony export */ });
|
|
15
|
-
/* harmony import */ var core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.flags.js */ "./node_modules/core-js/modules/es.regexp.flags.js");
|
|
16
|
-
/* harmony import */ var core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
17
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @flagship.io/js-sdk */ "@flagship.io/js-sdk");
|
|
18
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__);
|
|
19
|
-
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
|
|
20
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./src/utils.ts");
|
|
21
|
-
|
|
22
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
24
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class FSFlag {
|
|
29
|
-
constructor(key, state) {
|
|
30
|
-
_defineProperty(this, "key", void 0);
|
|
31
|
-
_defineProperty(this, "flag", void 0);
|
|
32
|
-
const flagsData = state.flags;
|
|
33
|
-
if (!state.hasVisitorData) {
|
|
34
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.logWarn)(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.Flagship.getConfig(), _constants__WEBPACK_IMPORTED_MODULE_3__.noVisitorMessage, 'GetFlag');
|
|
35
|
-
}
|
|
36
|
-
this.key = key;
|
|
37
|
-
this.flag = flagsData === null || flagsData === void 0 ? void 0 : flagsData.get(key);
|
|
38
|
-
}
|
|
39
|
-
getValue(defaultValue) {
|
|
40
|
-
if (!this.flag) {
|
|
41
|
-
return defaultValue;
|
|
42
|
-
}
|
|
43
|
-
if (this.flag.value === null || this.flag.value === undefined) {
|
|
44
|
-
return defaultValue;
|
|
45
|
-
}
|
|
46
|
-
if (defaultValue !== null && defaultValue !== undefined && !(0,_utils__WEBPACK_IMPORTED_MODULE_2__.hasSameType)(this.flag.value, defaultValue)) {
|
|
47
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_2__.logInfo)(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.Flagship.getConfig(), (0,_utils__WEBPACK_IMPORTED_MODULE_2__.sprintf)(_constants__WEBPACK_IMPORTED_MODULE_3__.GET_FLAG_CAST_ERROR, this.key), 'getValue');
|
|
48
|
-
return defaultValue;
|
|
49
|
-
}
|
|
50
|
-
return this.flag.value;
|
|
51
|
-
}
|
|
52
|
-
exists() {
|
|
53
|
-
if (!this.flag) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
return !!(this.flag.campaignId && this.flag.variationId && this.flag.variationGroupId);
|
|
57
|
-
}
|
|
58
|
-
async visitorExposed() {
|
|
59
|
-
// do nothing
|
|
60
|
-
}
|
|
61
|
-
get metadata() {
|
|
62
|
-
if (!this.flag) {
|
|
63
|
-
return _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.FSFlagMetadata.Empty();
|
|
64
|
-
}
|
|
65
|
-
return new _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.FSFlagMetadata({
|
|
66
|
-
campaignId: this.flag.campaignId,
|
|
67
|
-
campaignName: this.flag.campaignName,
|
|
68
|
-
variationGroupId: this.flag.variationGroupId,
|
|
69
|
-
variationGroupName: this.flag.variationGroupName,
|
|
70
|
-
variationId: this.flag.variationId,
|
|
71
|
-
variationName: this.flag.variationName,
|
|
72
|
-
isReference: !!this.flag.isReference,
|
|
73
|
-
campaignType: this.flag.campaignType,
|
|
74
|
-
slug: this.flag.slug
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
get status() {
|
|
78
|
-
if (!this.exists()) {
|
|
79
|
-
return _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.FSFlagStatus.NOT_FOUND;
|
|
80
|
-
}
|
|
81
|
-
return _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.FSFlagStatus.FETCHED;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/***/ }),
|
|
86
|
-
|
|
87
|
-
/***/ "./src/FlagshipContext.tsx":
|
|
88
|
-
/*!*********************************!*\
|
|
89
|
-
!*** ./src/FlagshipContext.tsx ***!
|
|
90
|
-
\*********************************/
|
|
91
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
92
|
-
|
|
93
|
-
__webpack_require__.r(__webpack_exports__);
|
|
94
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
95
|
-
/* harmony export */ FlagshipContext: () => (/* binding */ FlagshipContext),
|
|
96
|
-
/* harmony export */ initStat: () => (/* binding */ initStat)
|
|
97
|
-
/* harmony export */ });
|
|
98
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
99
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
100
|
-
'use client';
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const initStat = {
|
|
104
|
-
isInitializing: true
|
|
105
|
-
};
|
|
106
|
-
const FlagshipContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({
|
|
107
|
-
state: {
|
|
108
|
-
...initStat
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
/***/ }),
|
|
113
|
-
|
|
114
|
-
/***/ "./src/FlagshipHooks.ts":
|
|
115
|
-
/*!******************************!*\
|
|
116
|
-
!*** ./src/FlagshipHooks.ts ***!
|
|
117
|
-
\******************************/
|
|
118
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
119
|
-
|
|
120
|
-
__webpack_require__.r(__webpack_exports__);
|
|
121
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
122
|
-
/* harmony export */ useFlagship: () => (/* binding */ useFlagship),
|
|
123
|
-
/* harmony export */ useFsFlag: () => (/* binding */ useFsFlag)
|
|
124
|
-
/* harmony export */ });
|
|
125
|
-
/* harmony import */ var core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.regexp.flags.js */ "./node_modules/core-js/modules/es.regexp.flags.js");
|
|
126
|
-
/* harmony import */ var core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_flags_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
127
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
128
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
129
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @flagship.io/js-sdk */ "@flagship.io/js-sdk");
|
|
130
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_2__);
|
|
131
|
-
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./constants */ "./src/constants.ts");
|
|
132
|
-
/* harmony import */ var _FlagshipContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FlagshipContext */ "./src/FlagshipContext.tsx");
|
|
133
|
-
/* harmony import */ var _FSFlag__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FSFlag */ "./src/FSFlag.ts");
|
|
134
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./src/utils.ts");
|
|
135
|
-
'use client';
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* This hook returns a flag object by its key. If no flag match the given key an empty flag will be returned.
|
|
147
|
-
* @param key
|
|
148
|
-
* @param defaultValue
|
|
149
|
-
* @returns
|
|
150
|
-
*/
|
|
151
|
-
const useFsFlag = key => {
|
|
152
|
-
const {
|
|
153
|
-
state
|
|
154
|
-
} = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_FlagshipContext__WEBPACK_IMPORTED_MODULE_3__.FlagshipContext);
|
|
155
|
-
const {
|
|
156
|
-
visitor
|
|
157
|
-
} = state;
|
|
158
|
-
if (!visitor) {
|
|
159
|
-
return new _FSFlag__WEBPACK_IMPORTED_MODULE_4__.FSFlag(key, state);
|
|
160
|
-
}
|
|
161
|
-
return visitor.getFlag(key);
|
|
162
|
-
};
|
|
163
|
-
const handleContextChange = param => {
|
|
164
|
-
const {
|
|
165
|
-
updateFunction,
|
|
166
|
-
functionName,
|
|
167
|
-
visitor,
|
|
168
|
-
config
|
|
169
|
-
} = param;
|
|
170
|
-
if (!visitor) {
|
|
171
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.logError)(config, _constants__WEBPACK_IMPORTED_MODULE_6__.noVisitorMessage, functionName);
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
const originalContextClone = (0,_utils__WEBPACK_IMPORTED_MODULE_5__.deepClone)(visitor.context);
|
|
175
|
-
updateFunction();
|
|
176
|
-
const updatedContext = visitor.context;
|
|
177
|
-
if ((0,_utils__WEBPACK_IMPORTED_MODULE_5__.hasContextChanged)(originalContextClone, updatedContext)) {
|
|
178
|
-
visitor.fetchFlags();
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
const useFlagship = () => {
|
|
182
|
-
const {
|
|
183
|
-
state
|
|
184
|
-
} = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_FlagshipContext__WEBPACK_IMPORTED_MODULE_3__.FlagshipContext);
|
|
185
|
-
const {
|
|
186
|
-
visitor,
|
|
187
|
-
config
|
|
188
|
-
} = state;
|
|
189
|
-
const fsUpdateContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(context => {
|
|
190
|
-
handleContextChange({
|
|
191
|
-
config,
|
|
192
|
-
visitor,
|
|
193
|
-
updateFunction: () => visitor === null || visitor === void 0 ? void 0 : visitor.updateContext(context),
|
|
194
|
-
functionName: 'updateContext'
|
|
195
|
-
});
|
|
196
|
-
}, [visitor]);
|
|
197
|
-
const fsClearContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {
|
|
198
|
-
handleContextChange({
|
|
199
|
-
config,
|
|
200
|
-
visitor,
|
|
201
|
-
updateFunction: () => visitor === null || visitor === void 0 ? void 0 : visitor.clearContext(),
|
|
202
|
-
functionName: 'cleanContext'
|
|
203
|
-
});
|
|
204
|
-
}, [visitor]);
|
|
205
|
-
const fsAuthenticate = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(visitorId => {
|
|
206
|
-
const functionName = 'authenticate';
|
|
207
|
-
if (!visitor) {
|
|
208
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.logError)(config, _constants__WEBPACK_IMPORTED_MODULE_6__.noVisitorMessage, functionName);
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
const originalVisitorId = visitor.visitorId;
|
|
212
|
-
visitor.authenticate(visitorId);
|
|
213
|
-
if (originalVisitorId !== visitorId) {
|
|
214
|
-
visitor.fetchFlags();
|
|
215
|
-
}
|
|
216
|
-
}, [visitor]);
|
|
217
|
-
const fsUnauthenticate = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {
|
|
218
|
-
const functionName = 'unauthenticate';
|
|
219
|
-
if (!visitor) {
|
|
220
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.logError)(config, _constants__WEBPACK_IMPORTED_MODULE_6__.noVisitorMessage, functionName);
|
|
221
|
-
return;
|
|
222
|
-
}
|
|
223
|
-
const originalVisitorId = visitor.visitorId;
|
|
224
|
-
visitor.unauthenticate();
|
|
225
|
-
if (originalVisitorId !== visitor.visitorId) {
|
|
226
|
-
visitor.fetchFlags();
|
|
227
|
-
}
|
|
228
|
-
}, [visitor]);
|
|
229
|
-
const fsSendHit = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(hit => {
|
|
230
|
-
const functionName = 'sendHit';
|
|
231
|
-
if (!visitor) {
|
|
232
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.logError)(config, _constants__WEBPACK_IMPORTED_MODULE_6__.noVisitorMessage, functionName);
|
|
233
|
-
return Promise.resolve();
|
|
234
|
-
}
|
|
235
|
-
if (Array.isArray(hit)) {
|
|
236
|
-
return visitor.sendHits(hit);
|
|
237
|
-
}
|
|
238
|
-
return visitor.sendHit(hit);
|
|
239
|
-
}, [visitor]);
|
|
240
|
-
const getFlag = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(key => {
|
|
241
|
-
if (!visitor) {
|
|
242
|
-
return new _FSFlag__WEBPACK_IMPORTED_MODULE_4__.FSFlag(key, state);
|
|
243
|
-
}
|
|
244
|
-
return visitor.getFlag(key);
|
|
245
|
-
}, [visitor]);
|
|
246
|
-
const fetchFlags = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async () => {
|
|
247
|
-
if (!visitor) {
|
|
248
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.logWarn)(config, _constants__WEBPACK_IMPORTED_MODULE_6__.noVisitorMessage, 'fetchFlags');
|
|
249
|
-
return Promise.resolve();
|
|
250
|
-
}
|
|
251
|
-
return visitor.fetchFlags();
|
|
252
|
-
}, [visitor]);
|
|
253
|
-
const setConsent = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(hasConsented => {
|
|
254
|
-
if (!visitor) {
|
|
255
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_5__.logWarn)(config, _constants__WEBPACK_IMPORTED_MODULE_6__.noVisitorMessage, 'setConsent');
|
|
256
|
-
return;
|
|
257
|
-
}
|
|
258
|
-
visitor.setConsent(hasConsented);
|
|
259
|
-
}, [visitor]);
|
|
260
|
-
const close = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {
|
|
261
|
-
return _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_2__.Flagship.close();
|
|
262
|
-
}, []);
|
|
263
|
-
const getFlags = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(() => {
|
|
264
|
-
if (!visitor) {
|
|
265
|
-
var _state$flags;
|
|
266
|
-
const flags = new Map();
|
|
267
|
-
(_state$flags = state.flags) === null || _state$flags === void 0 || _state$flags.forEach((flag, key) => {
|
|
268
|
-
flags.set(key, new _FSFlag__WEBPACK_IMPORTED_MODULE_4__.FSFlag(key, state));
|
|
269
|
-
});
|
|
270
|
-
return new _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_2__.FSFlagCollection({
|
|
271
|
-
flags
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
return visitor.getFlags();
|
|
275
|
-
}, [visitor]);
|
|
276
|
-
const collectEAIEventsAsync = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(async (...args) => {
|
|
277
|
-
if (!visitor) {
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
return visitor.collectEAIEventsAsync(...args);
|
|
281
|
-
}, [visitor]);
|
|
282
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => ({
|
|
283
|
-
visitorId: visitor === null || visitor === void 0 ? void 0 : visitor.visitorId,
|
|
284
|
-
anonymousId: visitor === null || visitor === void 0 ? void 0 : visitor.anonymousId,
|
|
285
|
-
context: {
|
|
286
|
-
...(visitor === null || visitor === void 0 ? void 0 : visitor.context)
|
|
287
|
-
},
|
|
288
|
-
hasConsented: visitor === null || visitor === void 0 ? void 0 : visitor.hasConsented,
|
|
289
|
-
sdkStatus: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_2__.Flagship.getStatus(),
|
|
290
|
-
fetchStatus: visitor === null || visitor === void 0 ? void 0 : visitor.fetchStatus,
|
|
291
|
-
setConsent,
|
|
292
|
-
updateContext: fsUpdateContext,
|
|
293
|
-
clearContext: fsClearContext,
|
|
294
|
-
authenticate: fsAuthenticate,
|
|
295
|
-
unauthenticate: fsUnauthenticate,
|
|
296
|
-
sendHits: fsSendHit,
|
|
297
|
-
getFlag,
|
|
298
|
-
fetchFlags,
|
|
299
|
-
close,
|
|
300
|
-
getFlags,
|
|
301
|
-
collectEAIEventsAsync
|
|
302
|
-
}), [visitor, setConsent, fsUpdateContext, fsClearContext, fsAuthenticate, fsUnauthenticate, fsSendHit, getFlag, fetchFlags, close, getFlags, collectEAIEventsAsync]);
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
/***/ }),
|
|
306
|
-
|
|
307
|
-
/***/ "./src/FlagshipProvider.tsx":
|
|
308
|
-
/*!**********************************!*\
|
|
309
|
-
!*** ./src/FlagshipProvider.tsx ***!
|
|
310
|
-
\**********************************/
|
|
311
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
312
|
-
|
|
313
|
-
__webpack_require__.r(__webpack_exports__);
|
|
314
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
315
|
-
/* harmony export */ FlagshipProvider: () => (/* binding */ FlagshipProvider)
|
|
316
|
-
/* harmony export */ });
|
|
317
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
318
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
319
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @flagship.io/js-sdk */ "@flagship.io/js-sdk");
|
|
320
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__);
|
|
321
|
-
/* harmony import */ var _FlagshipContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FlagshipContext */ "./src/FlagshipContext.tsx");
|
|
322
|
-
/* harmony import */ var _internalType__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internalType */ "./src/internalType.ts");
|
|
323
|
-
/* harmony import */ var _sdkVersion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sdkVersion */ "./src/sdkVersion.ts");
|
|
324
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils */ "./src/utils.ts");
|
|
325
|
-
'use client';
|
|
326
|
-
|
|
327
|
-
// eslint-disable-next-line no-use-before-define
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
function FlagshipProvider({
|
|
335
|
-
children,
|
|
336
|
-
envId,
|
|
337
|
-
apiKey,
|
|
338
|
-
decisionMode = _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.DecisionMode.DECISION_API,
|
|
339
|
-
visitorData,
|
|
340
|
-
loadingComponent,
|
|
341
|
-
onSdkStatusChanged,
|
|
342
|
-
onBucketingUpdated,
|
|
343
|
-
initialCampaigns,
|
|
344
|
-
initialFlagsData,
|
|
345
|
-
fetchFlagsOnBucketingUpdated,
|
|
346
|
-
hitDeduplicationTime = 2,
|
|
347
|
-
fetchNow = true,
|
|
348
|
-
language = 1,
|
|
349
|
-
sdkVersion = _sdkVersion__WEBPACK_IMPORTED_MODULE_2__.version,
|
|
350
|
-
onFlagsStatusChanged,
|
|
351
|
-
shouldSaveInstance,
|
|
352
|
-
...props
|
|
353
|
-
}) {
|
|
354
|
-
var _state$config;
|
|
355
|
-
const flags = (0,_utils__WEBPACK_IMPORTED_MODULE_3__.extractFlagsMap)(initialFlagsData, initialCampaigns);
|
|
356
|
-
const [state, setState] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
|
357
|
-
..._FlagshipContext__WEBPACK_IMPORTED_MODULE_4__.initStat,
|
|
358
|
-
flags,
|
|
359
|
-
hasVisitorData: !!visitorData
|
|
360
|
-
});
|
|
361
|
-
const [lastModified, setLastModified] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();
|
|
362
|
-
const stateRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
363
|
-
stateRef.current = state;
|
|
364
|
-
const visitorDataRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(visitorData);
|
|
365
|
-
|
|
366
|
-
// #region functions
|
|
367
|
-
|
|
368
|
-
const onBucketingLastModified = lastUpdate => {
|
|
369
|
-
if (onBucketingUpdated) {
|
|
370
|
-
onBucketingUpdated(lastUpdate);
|
|
371
|
-
}
|
|
372
|
-
setLastModified(lastUpdate);
|
|
373
|
-
};
|
|
374
|
-
const statusChanged = status => {
|
|
375
|
-
if (onSdkStatusChanged) {
|
|
376
|
-
onSdkStatusChanged(status);
|
|
377
|
-
}
|
|
378
|
-
switch (status) {
|
|
379
|
-
case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.FSSdkStatus.SDK_PANIC:
|
|
380
|
-
case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.FSSdkStatus.SDK_INITIALIZED:
|
|
381
|
-
createVisitor();
|
|
382
|
-
break;
|
|
383
|
-
case _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.FSSdkStatus.SDK_NOT_INITIALIZED:
|
|
384
|
-
setState(prev => ({
|
|
385
|
-
...prev,
|
|
386
|
-
config: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default().getConfig(),
|
|
387
|
-
isInitializing: false
|
|
388
|
-
}));
|
|
389
|
-
break;
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
const initSdk = () => {
|
|
393
|
-
_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default().start(envId, apiKey, {
|
|
394
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
395
|
-
decisionMode: decisionMode,
|
|
396
|
-
fetchNow,
|
|
397
|
-
onSdkStatusChanged: statusChanged,
|
|
398
|
-
onBucketingUpdated: onBucketingLastModified,
|
|
399
|
-
hitDeduplicationTime,
|
|
400
|
-
language,
|
|
401
|
-
sdkVersion,
|
|
402
|
-
...props
|
|
403
|
-
});
|
|
404
|
-
};
|
|
405
|
-
function initializeState(param) {
|
|
406
|
-
setState(currentState => ({
|
|
407
|
-
...currentState,
|
|
408
|
-
visitor: param.fsVisitor,
|
|
409
|
-
config: _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default().getConfig(),
|
|
410
|
-
isInitializing: false,
|
|
411
|
-
hasVisitorData: !!visitorData
|
|
412
|
-
}));
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
416
|
-
const onVisitorReady = (fsVisitor, error) => {
|
|
417
|
-
if (error) {
|
|
418
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.logError)(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default().getConfig(), error.message || error, 'onReady');
|
|
419
|
-
}
|
|
420
|
-
initializeState({
|
|
421
|
-
fsVisitor
|
|
422
|
-
});
|
|
423
|
-
};
|
|
424
|
-
const createVisitor = () => {
|
|
425
|
-
if (!visitorDataRef.current) {
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
const fsVisitor = _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default().newVisitor({
|
|
429
|
-
visitorId: visitorDataRef.current.id,
|
|
430
|
-
context: visitorDataRef.current.context,
|
|
431
|
-
isAuthenticated: visitorDataRef.current.isAuthenticated,
|
|
432
|
-
hasConsented: visitorDataRef.current.hasConsented,
|
|
433
|
-
initialCampaigns,
|
|
434
|
-
initialFlagsData,
|
|
435
|
-
onFlagsStatusChanged,
|
|
436
|
-
shouldSaveInstance
|
|
437
|
-
});
|
|
438
|
-
fsVisitor === null || fsVisitor === void 0 || fsVisitor.on('ready', error => {
|
|
439
|
-
onVisitorReady(fsVisitor, error);
|
|
440
|
-
});
|
|
441
|
-
if (!fetchNow) {
|
|
442
|
-
initializeState({
|
|
443
|
-
fsVisitor
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
};
|
|
447
|
-
function updateVisitor() {
|
|
448
|
-
if (!visitorDataRef.current || _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default().getStatus() !== _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.FSSdkStatus.SDK_INITIALIZED) {
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
if (!state.visitor || state.visitor.visitorId !== visitorDataRef.current.id && (!visitorDataRef.current.isAuthenticated || visitorDataRef.current.isAuthenticated && state.visitor.anonymousId)) {
|
|
452
|
-
var _state$visitor;
|
|
453
|
-
(_state$visitor = state.visitor) === null || _state$visitor === void 0 || _state$visitor.cleanup();
|
|
454
|
-
createVisitor();
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
457
|
-
if (visitorDataRef.current.hasConsented !== state.visitor.hasConsented) {
|
|
458
|
-
var _visitorDataRef$curre;
|
|
459
|
-
state.visitor.setConsent((_visitorDataRef$curre = visitorDataRef.current.hasConsented) !== null && _visitorDataRef$curre !== void 0 ? _visitorDataRef$curre : true);
|
|
460
|
-
}
|
|
461
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
462
|
-
state.visitor.updateContext(visitorDataRef.current.context);
|
|
463
|
-
if (!state.visitor.anonymousId && visitorDataRef.current.isAuthenticated) {
|
|
464
|
-
state.visitor.authenticate(visitorDataRef.current.id);
|
|
465
|
-
}
|
|
466
|
-
if (state.visitor.anonymousId && !visitorDataRef.current.isAuthenticated) {
|
|
467
|
-
state.visitor.unauthenticate();
|
|
468
|
-
}
|
|
469
|
-
state.visitor.fetchFlags();
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
// #endregion
|
|
473
|
-
|
|
474
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.useNonInitialEffect)(() => {
|
|
475
|
-
if (fetchFlagsOnBucketingUpdated) {
|
|
476
|
-
var _state$visitor2;
|
|
477
|
-
(_state$visitor2 = state.visitor) === null || _state$visitor2 === void 0 || _state$visitor2.fetchFlags();
|
|
478
|
-
}
|
|
479
|
-
}, [lastModified]);
|
|
480
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_3__.useNonInitialEffect)(() => {
|
|
481
|
-
visitorDataRef.current = visitorData;
|
|
482
|
-
updateVisitor();
|
|
483
|
-
}, [JSON.stringify(visitorData)]);
|
|
484
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
485
|
-
initSdk();
|
|
486
|
-
}, [envId, apiKey, decisionMode]);
|
|
487
|
-
const handleDisplay = () => {
|
|
488
|
-
const isFirstInit = !state.visitor;
|
|
489
|
-
if (state.isInitializing && loadingComponent && isFirstInit && fetchNow) {
|
|
490
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, loadingComponent);
|
|
491
|
-
}
|
|
492
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, children);
|
|
493
|
-
};
|
|
494
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
495
|
-
var _window, _window$addEventListe;
|
|
496
|
-
(_window = window) === null || _window === void 0 || (_window$addEventListe = _window.addEventListener) === null || _window$addEventListe === void 0 || _window$addEventListe.call(_window, _internalType__WEBPACK_IMPORTED_MODULE_5__.INTERNAL_EVENTS.FsTriggerRendering, onVariationsForced);
|
|
497
|
-
return () => {
|
|
498
|
-
var _window2, _window2$removeEventL;
|
|
499
|
-
return (_window2 = window) === null || _window2 === void 0 || (_window2$removeEventL = _window2.removeEventListener) === null || _window2$removeEventL === void 0 ? void 0 : _window2$removeEventL.call(_window2, _internalType__WEBPACK_IMPORTED_MODULE_5__.INTERNAL_EVENTS.FsTriggerRendering, onVariationsForced);
|
|
500
|
-
};
|
|
501
|
-
}, [(_state$config = state.config) === null || _state$config === void 0 ? void 0 : _state$config.isQAModeEnabled]);
|
|
502
|
-
const onVariationsForced = e => {
|
|
503
|
-
const {
|
|
504
|
-
detail
|
|
505
|
-
} = e;
|
|
506
|
-
if (detail.forcedReFetchFlags) {
|
|
507
|
-
var _stateRef$current;
|
|
508
|
-
(_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.visitor) === null || _stateRef$current === void 0 || _stateRef$current.fetchFlags();
|
|
509
|
-
} else {
|
|
510
|
-
setState(state => ({
|
|
511
|
-
...state,
|
|
512
|
-
toggleForcedVariations: !state.toggleForcedVariations
|
|
513
|
-
}));
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_FlagshipContext__WEBPACK_IMPORTED_MODULE_4__.FlagshipContext.Provider, {
|
|
517
|
-
value: {
|
|
518
|
-
state,
|
|
519
|
-
setState
|
|
520
|
-
}
|
|
521
|
-
}, handleDisplay());
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/***/ }),
|
|
525
|
-
|
|
526
|
-
/***/ "./src/constants.ts":
|
|
527
|
-
/*!**************************!*\
|
|
528
|
-
!*** ./src/constants.ts ***!
|
|
529
|
-
\**************************/
|
|
530
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
531
|
-
|
|
532
|
-
__webpack_require__.r(__webpack_exports__);
|
|
533
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
534
|
-
/* harmony export */ GET_FLAG_CAST_ERROR: () => (/* binding */ GET_FLAG_CAST_ERROR),
|
|
535
|
-
/* harmony export */ GET_METADATA_CAST_ERROR: () => (/* binding */ GET_METADATA_CAST_ERROR),
|
|
536
|
-
/* harmony export */ noVisitorDefault: () => (/* binding */ noVisitorDefault),
|
|
537
|
-
/* harmony export */ noVisitorMessage: () => (/* binding */ noVisitorMessage)
|
|
538
|
-
/* harmony export */ });
|
|
539
|
-
const noVisitorMessage = 'flagship Visitor not initialized.';
|
|
540
|
-
const noVisitorDefault = 'fsVisitor not initialized, returns default value';
|
|
541
|
-
const GET_FLAG_CAST_ERROR = 'Flag for key {0} has a different type. Default value is returned.';
|
|
542
|
-
const GET_METADATA_CAST_ERROR = 'Flag for key {0} has a different type with defaultValue, an empty metadata object is returned';
|
|
543
|
-
|
|
544
|
-
/***/ }),
|
|
545
|
-
|
|
546
|
-
/***/ "./src/internalType.ts":
|
|
547
|
-
/*!*****************************!*\
|
|
548
|
-
!*** ./src/internalType.ts ***!
|
|
549
|
-
\*****************************/
|
|
550
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
551
|
-
|
|
552
|
-
__webpack_require__.r(__webpack_exports__);
|
|
553
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
554
|
-
/* harmony export */ INTERNAL_EVENTS: () => (/* binding */ INTERNAL_EVENTS)
|
|
555
|
-
/* harmony export */ });
|
|
556
|
-
let INTERNAL_EVENTS = /*#__PURE__*/function (INTERNAL_EVENTS) {
|
|
557
|
-
INTERNAL_EVENTS["FsTriggerRendering"] = "FS_TRIGGER_RENDERING";
|
|
558
|
-
return INTERNAL_EVENTS;
|
|
559
|
-
}({});
|
|
560
|
-
|
|
561
|
-
/***/ }),
|
|
562
|
-
|
|
563
|
-
/***/ "./src/sdkVersion.ts":
|
|
564
|
-
/*!***************************!*\
|
|
565
|
-
!*** ./src/sdkVersion.ts ***!
|
|
566
|
-
\***************************/
|
|
567
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
568
|
-
|
|
569
|
-
__webpack_require__.r(__webpack_exports__);
|
|
570
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
571
|
-
/* harmony export */ version: () => (/* binding */ version)
|
|
572
|
-
/* harmony export */ });
|
|
573
|
-
// Generated by genversion.
|
|
574
|
-
const version = '5.0.0-alpha.0';
|
|
575
|
-
|
|
576
|
-
/***/ }),
|
|
577
|
-
|
|
578
|
-
/***/ "./src/utils.ts":
|
|
579
|
-
/*!**********************!*\
|
|
580
|
-
!*** ./src/utils.ts ***!
|
|
581
|
-
\**********************/
|
|
582
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
583
|
-
|
|
584
|
-
__webpack_require__.r(__webpack_exports__);
|
|
585
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
586
|
-
/* harmony export */ deepClone: () => (/* binding */ deepClone),
|
|
587
|
-
/* harmony export */ extractFlagsMap: () => (/* binding */ extractFlagsMap),
|
|
588
|
-
/* harmony export */ getFlagsFromCampaigns: () => (/* binding */ getFlagsFromCampaigns),
|
|
589
|
-
/* harmony export */ hasContextChanged: () => (/* binding */ hasContextChanged),
|
|
590
|
-
/* harmony export */ hasSameType: () => (/* binding */ hasSameType),
|
|
591
|
-
/* harmony export */ hexToValue: () => (/* binding */ hexToValue),
|
|
592
|
-
/* harmony export */ logError: () => (/* binding */ logError),
|
|
593
|
-
/* harmony export */ logInfo: () => (/* binding */ logInfo),
|
|
594
|
-
/* harmony export */ logWarn: () => (/* binding */ logWarn),
|
|
595
|
-
/* harmony export */ sprintf: () => (/* binding */ sprintf),
|
|
596
|
-
/* harmony export */ useNonInitialEffect: () => (/* binding */ useNonInitialEffect),
|
|
597
|
-
/* harmony export */ uuidV4: () => (/* binding */ uuidV4)
|
|
598
|
-
/* harmony export */ });
|
|
599
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
600
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
601
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @flagship.io/js-sdk */ "@flagship.io/js-sdk");
|
|
602
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__);
|
|
603
|
-
'use client';
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
function logError(config, message, tag) {
|
|
608
|
-
if (!config || !config.logLevel || config.logLevel < _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.LogLevel.ERROR) {
|
|
609
|
-
return;
|
|
610
|
-
}
|
|
611
|
-
if (typeof config.onLog === 'function') {
|
|
612
|
-
config.onLog(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.LogLevel.ERROR, tag, message);
|
|
613
|
-
}
|
|
614
|
-
if (config.logManager && typeof config.logManager.error === 'function') {
|
|
615
|
-
config.logManager.error(message, tag);
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
function logInfo(config, message, tag) {
|
|
619
|
-
if (!config || !config.logLevel || config.logLevel < _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.LogLevel.INFO) {
|
|
620
|
-
return;
|
|
621
|
-
}
|
|
622
|
-
if (typeof config.onLog === 'function') {
|
|
623
|
-
config.onLog(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.LogLevel.INFO, tag, message);
|
|
624
|
-
}
|
|
625
|
-
if (config.logManager && typeof config.logManager.info === 'function') {
|
|
626
|
-
config.logManager.info(message, tag);
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
function logWarn(config, message, tag) {
|
|
630
|
-
if (!config || !config.logLevel || config.logLevel < _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.LogLevel.WARNING) {
|
|
631
|
-
return;
|
|
632
|
-
}
|
|
633
|
-
if (typeof config.onLog === 'function') {
|
|
634
|
-
config.onLog(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1__.LogLevel.WARNING, tag, message);
|
|
635
|
-
}
|
|
636
|
-
if (config.logManager && typeof config.logManager.warning === 'function') {
|
|
637
|
-
config.logManager.warning(message, tag);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
const getFlagsFromCampaigns = campaigns => {
|
|
641
|
-
const flags = new Map();
|
|
642
|
-
if (!campaigns || !Array.isArray(campaigns)) {
|
|
643
|
-
return flags;
|
|
644
|
-
}
|
|
645
|
-
campaigns.forEach(campaign => {
|
|
646
|
-
const object = campaign.variation.modifications.value;
|
|
647
|
-
for (const key in object) {
|
|
648
|
-
const value = object[key];
|
|
649
|
-
flags.set(key, {
|
|
650
|
-
key,
|
|
651
|
-
campaignId: campaign.id,
|
|
652
|
-
campaignName: campaign.name || '',
|
|
653
|
-
variationGroupId: campaign.variationGroupId,
|
|
654
|
-
variationGroupName: campaign.variationGroupName || '',
|
|
655
|
-
variationId: campaign.variation.id,
|
|
656
|
-
variationName: campaign.variation.name || '',
|
|
657
|
-
isReference: campaign.variation.reference,
|
|
658
|
-
slug: campaign.slug || '',
|
|
659
|
-
value
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
return flags;
|
|
664
|
-
};
|
|
665
|
-
function uuidV4() {
|
|
666
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (char) {
|
|
667
|
-
const rand = Math.random() * 16 | 0;
|
|
668
|
-
const value = char === 'x' ? rand : rand & 0x3 | 0x8;
|
|
669
|
-
return value.toString(16);
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
function useNonInitialEffect(effect, deps) {
|
|
673
|
-
const initialRender = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(true);
|
|
674
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
|
|
675
|
-
if (initialRender.current) {
|
|
676
|
-
initialRender.current = false;
|
|
677
|
-
return;
|
|
678
|
-
}
|
|
679
|
-
if (typeof effect === 'function') {
|
|
680
|
-
return effect();
|
|
681
|
-
}
|
|
682
|
-
}, deps);
|
|
683
|
-
}
|
|
684
|
-
function hasSameType(flagValue, defaultValue) {
|
|
685
|
-
if (typeof flagValue !== typeof defaultValue) {
|
|
686
|
-
return false;
|
|
687
|
-
}
|
|
688
|
-
if (typeof flagValue === 'object' && typeof defaultValue === 'object' && Array.isArray(flagValue) !== Array.isArray(defaultValue)) {
|
|
689
|
-
return false;
|
|
690
|
-
}
|
|
691
|
-
return true;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
695
|
-
function sprintf(format, ...value) {
|
|
696
|
-
let formatted = format;
|
|
697
|
-
for (let i = 0; i < value.length; i++) {
|
|
698
|
-
const element = value[i];
|
|
699
|
-
formatted = formatted.replace(new RegExp(`\\{${i}\\}`, 'g'), element);
|
|
700
|
-
}
|
|
701
|
-
return formatted;
|
|
702
|
-
}
|
|
703
|
-
function hexToValue(hex, config) {
|
|
704
|
-
if (typeof hex !== 'string') {
|
|
705
|
-
logError(config, `Invalid hex string: ${hex}`, 'hexToValue');
|
|
706
|
-
return null;
|
|
707
|
-
}
|
|
708
|
-
let jsonString = '';
|
|
709
|
-
for (let i = 0; i < hex.length; i += 2) {
|
|
710
|
-
const hexChar = hex.slice(i, i + 2);
|
|
711
|
-
const charCode = parseInt(hexChar, 16);
|
|
712
|
-
if (isNaN(charCode)) {
|
|
713
|
-
logError(config, `Invalid hex character: ${hexChar}`, 'hexToValue');
|
|
714
|
-
return null;
|
|
715
|
-
}
|
|
716
|
-
jsonString += String.fromCharCode(charCode);
|
|
717
|
-
}
|
|
718
|
-
try {
|
|
719
|
-
const value = JSON.parse(jsonString);
|
|
720
|
-
return value;
|
|
721
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
722
|
-
} catch (error) {
|
|
723
|
-
logError(config, `Error while parsing JSON: ${error === null || error === void 0 ? void 0 : error.message}`, 'hexToValue');
|
|
724
|
-
return null;
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
function extractFlagsMap(initialFlagsData, initialCampaigns) {
|
|
728
|
-
let flags = new Map();
|
|
729
|
-
if (Array.isArray(initialFlagsData)) {
|
|
730
|
-
initialFlagsData.forEach(flag => {
|
|
731
|
-
var _hexToValue;
|
|
732
|
-
flags.set(flag.key, {
|
|
733
|
-
key: flag.key,
|
|
734
|
-
campaignId: flag.campaignId,
|
|
735
|
-
campaignName: flag.campaignName,
|
|
736
|
-
variationGroupId: flag.variationGroupId,
|
|
737
|
-
variationGroupName: flag.variationGroupName,
|
|
738
|
-
variationId: flag.variationId,
|
|
739
|
-
variationName: flag.variationName,
|
|
740
|
-
isReference: flag.isReference,
|
|
741
|
-
campaignType: flag.campaignType,
|
|
742
|
-
slug: flag.slug,
|
|
743
|
-
value: (_hexToValue = hexToValue(flag.hex, _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_1___default().getConfig())) === null || _hexToValue === void 0 ? void 0 : _hexToValue.v
|
|
744
|
-
});
|
|
745
|
-
});
|
|
746
|
-
} else if (initialCampaigns) {
|
|
747
|
-
flags = getFlagsFromCampaigns(initialCampaigns);
|
|
748
|
-
}
|
|
749
|
-
return flags;
|
|
750
|
-
}
|
|
751
|
-
function deepClone(obj) {
|
|
752
|
-
return JSON.parse(JSON.stringify(obj));
|
|
753
|
-
}
|
|
754
|
-
function hasContextChanged(original, updated) {
|
|
755
|
-
return JSON.stringify(original) !== JSON.stringify(updated);
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
/***/ }),
|
|
759
|
-
|
|
760
|
-
/***/ "@flagship.io/js-sdk":
|
|
761
|
-
/*!**************************************!*\
|
|
762
|
-
!*** external "@flagship.io/js-sdk" ***!
|
|
763
|
-
\**************************************/
|
|
764
|
-
/***/ ((module) => {
|
|
765
|
-
|
|
766
|
-
module.exports = require("@flagship.io/js-sdk");
|
|
767
|
-
|
|
768
|
-
/***/ }),
|
|
769
|
-
|
|
770
|
-
/***/ "react":
|
|
771
|
-
/*!************************!*\
|
|
772
|
-
!*** external "react" ***!
|
|
773
|
-
\************************/
|
|
774
|
-
/***/ ((module) => {
|
|
775
|
-
|
|
776
|
-
module.exports = require("react");
|
|
777
|
-
|
|
778
|
-
/***/ }),
|
|
779
|
-
|
|
780
|
-
/***/ "./node_modules/core-js/internals/a-callable.js":
|
|
781
|
-
/*!******************************************************!*\
|
|
782
|
-
!*** ./node_modules/core-js/internals/a-callable.js ***!
|
|
783
|
-
\******************************************************/
|
|
784
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
|
|
788
|
-
var tryToString = __webpack_require__(/*! ../internals/try-to-string */ "./node_modules/core-js/internals/try-to-string.js");
|
|
789
|
-
|
|
790
|
-
var $TypeError = TypeError;
|
|
791
|
-
|
|
792
|
-
// `Assert: IsCallable(argument) is true`
|
|
793
|
-
module.exports = function (argument) {
|
|
794
|
-
if (isCallable(argument)) return argument;
|
|
795
|
-
throw new $TypeError(tryToString(argument) + ' is not a function');
|
|
796
|
-
};
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
/***/ }),
|
|
800
|
-
|
|
801
|
-
/***/ "./node_modules/core-js/internals/an-object.js":
|
|
802
|
-
/*!*****************************************************!*\
|
|
803
|
-
!*** ./node_modules/core-js/internals/an-object.js ***!
|
|
804
|
-
\*****************************************************/
|
|
805
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
809
|
-
|
|
810
|
-
var $String = String;
|
|
811
|
-
var $TypeError = TypeError;
|
|
812
|
-
|
|
813
|
-
// `Assert: Type(argument) is Object`
|
|
814
|
-
module.exports = function (argument) {
|
|
815
|
-
if (isObject(argument)) return argument;
|
|
816
|
-
throw new $TypeError($String(argument) + ' is not an object');
|
|
817
|
-
};
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
/***/ }),
|
|
821
|
-
|
|
822
|
-
/***/ "./node_modules/core-js/internals/create-non-enumerable-property.js":
|
|
823
|
-
/*!**************************************************************************!*\
|
|
824
|
-
!*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
|
|
825
|
-
\**************************************************************************/
|
|
826
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
830
|
-
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
|
|
831
|
-
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "./node_modules/core-js/internals/create-property-descriptor.js");
|
|
832
|
-
|
|
833
|
-
module.exports = DESCRIPTORS ? function (object, key, value) {
|
|
834
|
-
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
835
|
-
} : function (object, key, value) {
|
|
836
|
-
object[key] = value;
|
|
837
|
-
return object;
|
|
838
|
-
};
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
/***/ }),
|
|
842
|
-
|
|
843
|
-
/***/ "./node_modules/core-js/internals/create-property-descriptor.js":
|
|
844
|
-
/*!**********************************************************************!*\
|
|
845
|
-
!*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
|
|
846
|
-
\**********************************************************************/
|
|
847
|
-
/***/ ((module) => {
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
module.exports = function (bitmap, value) {
|
|
851
|
-
return {
|
|
852
|
-
enumerable: !(bitmap & 1),
|
|
853
|
-
configurable: !(bitmap & 2),
|
|
854
|
-
writable: !(bitmap & 4),
|
|
855
|
-
value: value
|
|
856
|
-
};
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
/***/ }),
|
|
861
|
-
|
|
862
|
-
/***/ "./node_modules/core-js/internals/define-built-in-accessor.js":
|
|
863
|
-
/*!********************************************************************!*\
|
|
864
|
-
!*** ./node_modules/core-js/internals/define-built-in-accessor.js ***!
|
|
865
|
-
\********************************************************************/
|
|
866
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
var makeBuiltIn = __webpack_require__(/*! ../internals/make-built-in */ "./node_modules/core-js/internals/make-built-in.js");
|
|
870
|
-
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "./node_modules/core-js/internals/object-define-property.js");
|
|
871
|
-
|
|
872
|
-
module.exports = function (target, name, descriptor) {
|
|
873
|
-
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
874
|
-
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
875
|
-
return defineProperty.f(target, name, descriptor);
|
|
876
|
-
};
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
/***/ }),
|
|
880
|
-
|
|
881
|
-
/***/ "./node_modules/core-js/internals/define-global-property.js":
|
|
882
|
-
/*!******************************************************************!*\
|
|
883
|
-
!*** ./node_modules/core-js/internals/define-global-property.js ***!
|
|
884
|
-
\******************************************************************/
|
|
885
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
889
|
-
|
|
890
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
891
|
-
var defineProperty = Object.defineProperty;
|
|
892
|
-
|
|
893
|
-
module.exports = function (key, value) {
|
|
894
|
-
try {
|
|
895
|
-
defineProperty(global, key, { value: value, configurable: true, writable: true });
|
|
896
|
-
} catch (error) {
|
|
897
|
-
global[key] = value;
|
|
898
|
-
} return value;
|
|
899
|
-
};
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
/***/ }),
|
|
903
|
-
|
|
904
|
-
/***/ "./node_modules/core-js/internals/descriptors.js":
|
|
905
|
-
/*!*******************************************************!*\
|
|
906
|
-
!*** ./node_modules/core-js/internals/descriptors.js ***!
|
|
907
|
-
\*******************************************************/
|
|
908
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
912
|
-
|
|
913
|
-
// Detect IE8's incomplete defineProperty implementation
|
|
914
|
-
module.exports = !fails(function () {
|
|
915
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
916
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
917
|
-
});
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
/***/ }),
|
|
921
|
-
|
|
922
|
-
/***/ "./node_modules/core-js/internals/document-create-element.js":
|
|
923
|
-
/*!*******************************************************************!*\
|
|
924
|
-
!*** ./node_modules/core-js/internals/document-create-element.js ***!
|
|
925
|
-
\*******************************************************************/
|
|
926
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
930
|
-
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
931
|
-
|
|
932
|
-
var document = global.document;
|
|
933
|
-
// typeof document.createElement is 'object' in old IE
|
|
934
|
-
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
935
|
-
|
|
936
|
-
module.exports = function (it) {
|
|
937
|
-
return EXISTS ? document.createElement(it) : {};
|
|
938
|
-
};
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
/***/ }),
|
|
942
|
-
|
|
943
|
-
/***/ "./node_modules/core-js/internals/engine-user-agent.js":
|
|
944
|
-
/*!*************************************************************!*\
|
|
945
|
-
!*** ./node_modules/core-js/internals/engine-user-agent.js ***!
|
|
946
|
-
\*************************************************************/
|
|
947
|
-
/***/ ((module) => {
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
module.exports = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
/***/ }),
|
|
954
|
-
|
|
955
|
-
/***/ "./node_modules/core-js/internals/engine-v8-version.js":
|
|
956
|
-
/*!*************************************************************!*\
|
|
957
|
-
!*** ./node_modules/core-js/internals/engine-v8-version.js ***!
|
|
958
|
-
\*************************************************************/
|
|
959
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
963
|
-
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "./node_modules/core-js/internals/engine-user-agent.js");
|
|
964
|
-
|
|
965
|
-
var process = global.process;
|
|
966
|
-
var Deno = global.Deno;
|
|
967
|
-
var versions = process && process.versions || Deno && Deno.version;
|
|
968
|
-
var v8 = versions && versions.v8;
|
|
969
|
-
var match, version;
|
|
970
|
-
|
|
971
|
-
if (v8) {
|
|
972
|
-
match = v8.split('.');
|
|
973
|
-
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
974
|
-
// but their correct versions are not interesting for us
|
|
975
|
-
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
979
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
980
|
-
if (!version && userAgent) {
|
|
981
|
-
match = userAgent.match(/Edge\/(\d+)/);
|
|
982
|
-
if (!match || match[1] >= 74) {
|
|
983
|
-
match = userAgent.match(/Chrome\/(\d+)/);
|
|
984
|
-
if (match) version = +match[1];
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
module.exports = version;
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
/***/ }),
|
|
992
|
-
|
|
993
|
-
/***/ "./node_modules/core-js/internals/fails.js":
|
|
994
|
-
/*!*************************************************!*\
|
|
995
|
-
!*** ./node_modules/core-js/internals/fails.js ***!
|
|
996
|
-
\*************************************************/
|
|
997
|
-
/***/ ((module) => {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
module.exports = function (exec) {
|
|
1001
|
-
try {
|
|
1002
|
-
return !!exec();
|
|
1003
|
-
} catch (error) {
|
|
1004
|
-
return true;
|
|
1005
|
-
}
|
|
1006
|
-
};
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
/***/ }),
|
|
1010
|
-
|
|
1011
|
-
/***/ "./node_modules/core-js/internals/function-bind-native.js":
|
|
1012
|
-
/*!****************************************************************!*\
|
|
1013
|
-
!*** ./node_modules/core-js/internals/function-bind-native.js ***!
|
|
1014
|
-
\****************************************************************/
|
|
1015
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1019
|
-
|
|
1020
|
-
module.exports = !fails(function () {
|
|
1021
|
-
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
1022
|
-
var test = (function () { /* empty */ }).bind();
|
|
1023
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
1024
|
-
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
1025
|
-
});
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
/***/ }),
|
|
1029
|
-
|
|
1030
|
-
/***/ "./node_modules/core-js/internals/function-call.js":
|
|
1031
|
-
/*!*********************************************************!*\
|
|
1032
|
-
!*** ./node_modules/core-js/internals/function-call.js ***!
|
|
1033
|
-
\*********************************************************/
|
|
1034
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ "./node_modules/core-js/internals/function-bind-native.js");
|
|
1038
|
-
|
|
1039
|
-
var call = Function.prototype.call;
|
|
1040
|
-
|
|
1041
|
-
module.exports = NATIVE_BIND ? call.bind(call) : function () {
|
|
1042
|
-
return call.apply(call, arguments);
|
|
1043
|
-
};
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
/***/ }),
|
|
1047
|
-
|
|
1048
|
-
/***/ "./node_modules/core-js/internals/function-name.js":
|
|
1049
|
-
/*!*********************************************************!*\
|
|
1050
|
-
!*** ./node_modules/core-js/internals/function-name.js ***!
|
|
1051
|
-
\*********************************************************/
|
|
1052
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
1056
|
-
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
|
|
1057
|
-
|
|
1058
|
-
var FunctionPrototype = Function.prototype;
|
|
1059
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1060
|
-
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
|
|
1061
|
-
|
|
1062
|
-
var EXISTS = hasOwn(FunctionPrototype, 'name');
|
|
1063
|
-
// additional protection from minified / mangled / dropped function names
|
|
1064
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
1065
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
1066
|
-
|
|
1067
|
-
module.exports = {
|
|
1068
|
-
EXISTS: EXISTS,
|
|
1069
|
-
PROPER: PROPER,
|
|
1070
|
-
CONFIGURABLE: CONFIGURABLE
|
|
1071
|
-
};
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
/***/ }),
|
|
1075
|
-
|
|
1076
|
-
/***/ "./node_modules/core-js/internals/function-uncurry-this.js":
|
|
1077
|
-
/*!*****************************************************************!*\
|
|
1078
|
-
!*** ./node_modules/core-js/internals/function-uncurry-this.js ***!
|
|
1079
|
-
\*****************************************************************/
|
|
1080
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ "./node_modules/core-js/internals/function-bind-native.js");
|
|
1084
|
-
|
|
1085
|
-
var FunctionPrototype = Function.prototype;
|
|
1086
|
-
var call = FunctionPrototype.call;
|
|
1087
|
-
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
|
|
1088
|
-
|
|
1089
|
-
module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
1090
|
-
return function () {
|
|
1091
|
-
return call.apply(fn, arguments);
|
|
1092
|
-
};
|
|
1093
|
-
};
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
/***/ }),
|
|
1097
|
-
|
|
1098
|
-
/***/ "./node_modules/core-js/internals/get-built-in.js":
|
|
1099
|
-
/*!********************************************************!*\
|
|
1100
|
-
!*** ./node_modules/core-js/internals/get-built-in.js ***!
|
|
1101
|
-
\********************************************************/
|
|
1102
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1106
|
-
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
|
|
1107
|
-
|
|
1108
|
-
var aFunction = function (argument) {
|
|
1109
|
-
return isCallable(argument) ? argument : undefined;
|
|
1110
|
-
};
|
|
1111
|
-
|
|
1112
|
-
module.exports = function (namespace, method) {
|
|
1113
|
-
return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
|
|
1114
|
-
};
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
/***/ }),
|
|
1118
|
-
|
|
1119
|
-
/***/ "./node_modules/core-js/internals/get-method.js":
|
|
1120
|
-
/*!******************************************************!*\
|
|
1121
|
-
!*** ./node_modules/core-js/internals/get-method.js ***!
|
|
1122
|
-
\******************************************************/
|
|
1123
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
var aCallable = __webpack_require__(/*! ../internals/a-callable */ "./node_modules/core-js/internals/a-callable.js");
|
|
1127
|
-
var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ "./node_modules/core-js/internals/is-null-or-undefined.js");
|
|
1128
|
-
|
|
1129
|
-
// `GetMethod` abstract operation
|
|
1130
|
-
// https://tc39.es/ecma262/#sec-getmethod
|
|
1131
|
-
module.exports = function (V, P) {
|
|
1132
|
-
var func = V[P];
|
|
1133
|
-
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
1134
|
-
};
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
/***/ }),
|
|
1138
|
-
|
|
1139
|
-
/***/ "./node_modules/core-js/internals/global.js":
|
|
1140
|
-
/*!**************************************************!*\
|
|
1141
|
-
!*** ./node_modules/core-js/internals/global.js ***!
|
|
1142
|
-
\**************************************************/
|
|
1143
|
-
/***/ (function(module) {
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
var check = function (it) {
|
|
1147
|
-
return it && it.Math === Math && it;
|
|
1148
|
-
};
|
|
1149
|
-
|
|
1150
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
1151
|
-
module.exports =
|
|
1152
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
1153
|
-
check(typeof globalThis == 'object' && globalThis) ||
|
|
1154
|
-
check(typeof window == 'object' && window) ||
|
|
1155
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
1156
|
-
check(typeof self == 'object' && self) ||
|
|
1157
|
-
check(typeof global == 'object' && global) ||
|
|
1158
|
-
check(typeof this == 'object' && this) ||
|
|
1159
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
1160
|
-
(function () { return this; })() || Function('return this')();
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
/***/ }),
|
|
1164
|
-
|
|
1165
|
-
/***/ "./node_modules/core-js/internals/has-own-property.js":
|
|
1166
|
-
/*!************************************************************!*\
|
|
1167
|
-
!*** ./node_modules/core-js/internals/has-own-property.js ***!
|
|
1168
|
-
\************************************************************/
|
|
1169
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
|
|
1173
|
-
var toObject = __webpack_require__(/*! ../internals/to-object */ "./node_modules/core-js/internals/to-object.js");
|
|
1174
|
-
|
|
1175
|
-
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
|
|
1176
|
-
|
|
1177
|
-
// `HasOwnProperty` abstract operation
|
|
1178
|
-
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
1179
|
-
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
1180
|
-
module.exports = Object.hasOwn || function hasOwn(it, key) {
|
|
1181
|
-
return hasOwnProperty(toObject(it), key);
|
|
1182
|
-
};
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
/***/ }),
|
|
1186
|
-
|
|
1187
|
-
/***/ "./node_modules/core-js/internals/hidden-keys.js":
|
|
1188
|
-
/*!*******************************************************!*\
|
|
1189
|
-
!*** ./node_modules/core-js/internals/hidden-keys.js ***!
|
|
1190
|
-
\*******************************************************/
|
|
1191
|
-
/***/ ((module) => {
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
module.exports = {};
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
/***/ }),
|
|
1198
|
-
|
|
1199
|
-
/***/ "./node_modules/core-js/internals/ie8-dom-define.js":
|
|
1200
|
-
/*!**********************************************************!*\
|
|
1201
|
-
!*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
|
|
1202
|
-
\**********************************************************/
|
|
1203
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
1207
|
-
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1208
|
-
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "./node_modules/core-js/internals/document-create-element.js");
|
|
1209
|
-
|
|
1210
|
-
// Thanks to IE8 for its funny defineProperty
|
|
1211
|
-
module.exports = !DESCRIPTORS && !fails(function () {
|
|
1212
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1213
|
-
return Object.defineProperty(createElement('div'), 'a', {
|
|
1214
|
-
get: function () { return 7; }
|
|
1215
|
-
}).a !== 7;
|
|
1216
|
-
});
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
/***/ }),
|
|
1220
|
-
|
|
1221
|
-
/***/ "./node_modules/core-js/internals/inspect-source.js":
|
|
1222
|
-
/*!**********************************************************!*\
|
|
1223
|
-
!*** ./node_modules/core-js/internals/inspect-source.js ***!
|
|
1224
|
-
\**********************************************************/
|
|
1225
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
|
|
1229
|
-
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
|
|
1230
|
-
var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
|
|
1231
|
-
|
|
1232
|
-
var functionToString = uncurryThis(Function.toString);
|
|
1233
|
-
|
|
1234
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
1235
|
-
if (!isCallable(store.inspectSource)) {
|
|
1236
|
-
store.inspectSource = function (it) {
|
|
1237
|
-
return functionToString(it);
|
|
1238
|
-
};
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
module.exports = store.inspectSource;
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
/***/ }),
|
|
1245
|
-
|
|
1246
|
-
/***/ "./node_modules/core-js/internals/internal-state.js":
|
|
1247
|
-
/*!**********************************************************!*\
|
|
1248
|
-
!*** ./node_modules/core-js/internals/internal-state.js ***!
|
|
1249
|
-
\**********************************************************/
|
|
1250
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ "./node_modules/core-js/internals/weak-map-basic-detection.js");
|
|
1254
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1255
|
-
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
1256
|
-
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "./node_modules/core-js/internals/create-non-enumerable-property.js");
|
|
1257
|
-
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
|
|
1258
|
-
var shared = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
|
|
1259
|
-
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "./node_modules/core-js/internals/shared-key.js");
|
|
1260
|
-
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "./node_modules/core-js/internals/hidden-keys.js");
|
|
1261
|
-
|
|
1262
|
-
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
1263
|
-
var TypeError = global.TypeError;
|
|
1264
|
-
var WeakMap = global.WeakMap;
|
|
1265
|
-
var set, get, has;
|
|
1266
|
-
|
|
1267
|
-
var enforce = function (it) {
|
|
1268
|
-
return has(it) ? get(it) : set(it, {});
|
|
1269
|
-
};
|
|
1270
|
-
|
|
1271
|
-
var getterFor = function (TYPE) {
|
|
1272
|
-
return function (it) {
|
|
1273
|
-
var state;
|
|
1274
|
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
1275
|
-
throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
1276
|
-
} return state;
|
|
1277
|
-
};
|
|
1278
|
-
};
|
|
1279
|
-
|
|
1280
|
-
if (NATIVE_WEAK_MAP || shared.state) {
|
|
1281
|
-
var store = shared.state || (shared.state = new WeakMap());
|
|
1282
|
-
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
1283
|
-
store.get = store.get;
|
|
1284
|
-
store.has = store.has;
|
|
1285
|
-
store.set = store.set;
|
|
1286
|
-
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
1287
|
-
set = function (it, metadata) {
|
|
1288
|
-
if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
1289
|
-
metadata.facade = it;
|
|
1290
|
-
store.set(it, metadata);
|
|
1291
|
-
return metadata;
|
|
1292
|
-
};
|
|
1293
|
-
get = function (it) {
|
|
1294
|
-
return store.get(it) || {};
|
|
1295
|
-
};
|
|
1296
|
-
has = function (it) {
|
|
1297
|
-
return store.has(it);
|
|
1298
|
-
};
|
|
1299
|
-
} else {
|
|
1300
|
-
var STATE = sharedKey('state');
|
|
1301
|
-
hiddenKeys[STATE] = true;
|
|
1302
|
-
set = function (it, metadata) {
|
|
1303
|
-
if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
1304
|
-
metadata.facade = it;
|
|
1305
|
-
createNonEnumerableProperty(it, STATE, metadata);
|
|
1306
|
-
return metadata;
|
|
1307
|
-
};
|
|
1308
|
-
get = function (it) {
|
|
1309
|
-
return hasOwn(it, STATE) ? it[STATE] : {};
|
|
1310
|
-
};
|
|
1311
|
-
has = function (it) {
|
|
1312
|
-
return hasOwn(it, STATE);
|
|
1313
|
-
};
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
module.exports = {
|
|
1317
|
-
set: set,
|
|
1318
|
-
get: get,
|
|
1319
|
-
has: has,
|
|
1320
|
-
enforce: enforce,
|
|
1321
|
-
getterFor: getterFor
|
|
1322
|
-
};
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
/***/ }),
|
|
1326
|
-
|
|
1327
|
-
/***/ "./node_modules/core-js/internals/is-callable.js":
|
|
1328
|
-
/*!*******************************************************!*\
|
|
1329
|
-
!*** ./node_modules/core-js/internals/is-callable.js ***!
|
|
1330
|
-
\*******************************************************/
|
|
1331
|
-
/***/ ((module) => {
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
1335
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
1336
|
-
|
|
1337
|
-
// `IsCallable` abstract operation
|
|
1338
|
-
// https://tc39.es/ecma262/#sec-iscallable
|
|
1339
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
1340
|
-
module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
1341
|
-
return typeof argument == 'function' || argument === documentAll;
|
|
1342
|
-
} : function (argument) {
|
|
1343
|
-
return typeof argument == 'function';
|
|
1344
|
-
};
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
/***/ }),
|
|
1348
|
-
|
|
1349
|
-
/***/ "./node_modules/core-js/internals/is-null-or-undefined.js":
|
|
1350
|
-
/*!****************************************************************!*\
|
|
1351
|
-
!*** ./node_modules/core-js/internals/is-null-or-undefined.js ***!
|
|
1352
|
-
\****************************************************************/
|
|
1353
|
-
/***/ ((module) => {
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
// we can't use just `it == null` since of `document.all` special case
|
|
1357
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
1358
|
-
module.exports = function (it) {
|
|
1359
|
-
return it === null || it === undefined;
|
|
1360
|
-
};
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
/***/ }),
|
|
1364
|
-
|
|
1365
|
-
/***/ "./node_modules/core-js/internals/is-object.js":
|
|
1366
|
-
/*!*****************************************************!*\
|
|
1367
|
-
!*** ./node_modules/core-js/internals/is-object.js ***!
|
|
1368
|
-
\*****************************************************/
|
|
1369
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
|
|
1373
|
-
|
|
1374
|
-
module.exports = function (it) {
|
|
1375
|
-
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
1376
|
-
};
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
/***/ }),
|
|
1380
|
-
|
|
1381
|
-
/***/ "./node_modules/core-js/internals/is-pure.js":
|
|
1382
|
-
/*!***************************************************!*\
|
|
1383
|
-
!*** ./node_modules/core-js/internals/is-pure.js ***!
|
|
1384
|
-
\***************************************************/
|
|
1385
|
-
/***/ ((module) => {
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
module.exports = false;
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
/***/ }),
|
|
1392
|
-
|
|
1393
|
-
/***/ "./node_modules/core-js/internals/is-symbol.js":
|
|
1394
|
-
/*!*****************************************************!*\
|
|
1395
|
-
!*** ./node_modules/core-js/internals/is-symbol.js ***!
|
|
1396
|
-
\*****************************************************/
|
|
1397
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "./node_modules/core-js/internals/get-built-in.js");
|
|
1401
|
-
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
|
|
1402
|
-
var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ "./node_modules/core-js/internals/object-is-prototype-of.js");
|
|
1403
|
-
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
|
|
1404
|
-
|
|
1405
|
-
var $Object = Object;
|
|
1406
|
-
|
|
1407
|
-
module.exports = USE_SYMBOL_AS_UID ? function (it) {
|
|
1408
|
-
return typeof it == 'symbol';
|
|
1409
|
-
} : function (it) {
|
|
1410
|
-
var $Symbol = getBuiltIn('Symbol');
|
|
1411
|
-
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
/***/ }),
|
|
1416
|
-
|
|
1417
|
-
/***/ "./node_modules/core-js/internals/make-built-in.js":
|
|
1418
|
-
/*!*********************************************************!*\
|
|
1419
|
-
!*** ./node_modules/core-js/internals/make-built-in.js ***!
|
|
1420
|
-
\*********************************************************/
|
|
1421
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
|
|
1425
|
-
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1426
|
-
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
|
|
1427
|
-
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
|
|
1428
|
-
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
1429
|
-
var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(/*! ../internals/function-name */ "./node_modules/core-js/internals/function-name.js").CONFIGURABLE);
|
|
1430
|
-
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "./node_modules/core-js/internals/inspect-source.js");
|
|
1431
|
-
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "./node_modules/core-js/internals/internal-state.js");
|
|
1432
|
-
|
|
1433
|
-
var enforceInternalState = InternalStateModule.enforce;
|
|
1434
|
-
var getInternalState = InternalStateModule.get;
|
|
1435
|
-
var $String = String;
|
|
1436
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1437
|
-
var defineProperty = Object.defineProperty;
|
|
1438
|
-
var stringSlice = uncurryThis(''.slice);
|
|
1439
|
-
var replace = uncurryThis(''.replace);
|
|
1440
|
-
var join = uncurryThis([].join);
|
|
1441
|
-
|
|
1442
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
|
|
1443
|
-
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
1444
|
-
});
|
|
1445
|
-
|
|
1446
|
-
var TEMPLATE = String(String).split('String');
|
|
1447
|
-
|
|
1448
|
-
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
1449
|
-
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
1450
|
-
name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
1451
|
-
}
|
|
1452
|
-
if (options && options.getter) name = 'get ' + name;
|
|
1453
|
-
if (options && options.setter) name = 'set ' + name;
|
|
1454
|
-
if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
1455
|
-
if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
|
|
1456
|
-
else value.name = name;
|
|
1457
|
-
}
|
|
1458
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
|
|
1459
|
-
defineProperty(value, 'length', { value: options.arity });
|
|
1460
|
-
}
|
|
1461
|
-
try {
|
|
1462
|
-
if (options && hasOwn(options, 'constructor') && options.constructor) {
|
|
1463
|
-
if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
|
|
1464
|
-
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
1465
|
-
} else if (value.prototype) value.prototype = undefined;
|
|
1466
|
-
} catch (error) { /* empty */ }
|
|
1467
|
-
var state = enforceInternalState(value);
|
|
1468
|
-
if (!hasOwn(state, 'source')) {
|
|
1469
|
-
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
1470
|
-
} return value;
|
|
1471
|
-
};
|
|
1472
|
-
|
|
1473
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
1474
|
-
// eslint-disable-next-line no-extend-native -- required
|
|
1475
|
-
Function.prototype.toString = makeBuiltIn(function toString() {
|
|
1476
|
-
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
1477
|
-
}, 'toString');
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
/***/ }),
|
|
1481
|
-
|
|
1482
|
-
/***/ "./node_modules/core-js/internals/object-define-property.js":
|
|
1483
|
-
/*!******************************************************************!*\
|
|
1484
|
-
!*** ./node_modules/core-js/internals/object-define-property.js ***!
|
|
1485
|
-
\******************************************************************/
|
|
1486
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
1490
|
-
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "./node_modules/core-js/internals/ie8-dom-define.js");
|
|
1491
|
-
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ "./node_modules/core-js/internals/v8-prototype-define-bug.js");
|
|
1492
|
-
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
|
|
1493
|
-
var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ "./node_modules/core-js/internals/to-property-key.js");
|
|
1494
|
-
|
|
1495
|
-
var $TypeError = TypeError;
|
|
1496
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1497
|
-
var $defineProperty = Object.defineProperty;
|
|
1498
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1499
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1500
|
-
var ENUMERABLE = 'enumerable';
|
|
1501
|
-
var CONFIGURABLE = 'configurable';
|
|
1502
|
-
var WRITABLE = 'writable';
|
|
1503
|
-
|
|
1504
|
-
// `Object.defineProperty` method
|
|
1505
|
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
1506
|
-
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
|
1507
|
-
anObject(O);
|
|
1508
|
-
P = toPropertyKey(P);
|
|
1509
|
-
anObject(Attributes);
|
|
1510
|
-
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
1511
|
-
var current = $getOwnPropertyDescriptor(O, P);
|
|
1512
|
-
if (current && current[WRITABLE]) {
|
|
1513
|
-
O[P] = Attributes.value;
|
|
1514
|
-
Attributes = {
|
|
1515
|
-
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
1516
|
-
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
1517
|
-
writable: false
|
|
1518
|
-
};
|
|
1519
|
-
}
|
|
1520
|
-
} return $defineProperty(O, P, Attributes);
|
|
1521
|
-
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
1522
|
-
anObject(O);
|
|
1523
|
-
P = toPropertyKey(P);
|
|
1524
|
-
anObject(Attributes);
|
|
1525
|
-
if (IE8_DOM_DEFINE) try {
|
|
1526
|
-
return $defineProperty(O, P, Attributes);
|
|
1527
|
-
} catch (error) { /* empty */ }
|
|
1528
|
-
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
|
|
1529
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
|
1530
|
-
return O;
|
|
1531
|
-
};
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
/***/ }),
|
|
1535
|
-
|
|
1536
|
-
/***/ "./node_modules/core-js/internals/object-is-prototype-of.js":
|
|
1537
|
-
/*!******************************************************************!*\
|
|
1538
|
-
!*** ./node_modules/core-js/internals/object-is-prototype-of.js ***!
|
|
1539
|
-
\******************************************************************/
|
|
1540
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
|
|
1544
|
-
|
|
1545
|
-
module.exports = uncurryThis({}.isPrototypeOf);
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
/***/ }),
|
|
1549
|
-
|
|
1550
|
-
/***/ "./node_modules/core-js/internals/ordinary-to-primitive.js":
|
|
1551
|
-
/*!*****************************************************************!*\
|
|
1552
|
-
!*** ./node_modules/core-js/internals/ordinary-to-primitive.js ***!
|
|
1553
|
-
\*****************************************************************/
|
|
1554
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/core-js/internals/function-call.js");
|
|
1558
|
-
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
|
|
1559
|
-
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
1560
|
-
|
|
1561
|
-
var $TypeError = TypeError;
|
|
1562
|
-
|
|
1563
|
-
// `OrdinaryToPrimitive` abstract operation
|
|
1564
|
-
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
1565
|
-
module.exports = function (input, pref) {
|
|
1566
|
-
var fn, val;
|
|
1567
|
-
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
|
1568
|
-
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
|
|
1569
|
-
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
|
|
1570
|
-
throw new $TypeError("Can't convert object to primitive value");
|
|
1571
|
-
};
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
/***/ }),
|
|
1575
|
-
|
|
1576
|
-
/***/ "./node_modules/core-js/internals/regexp-flags.js":
|
|
1577
|
-
/*!********************************************************!*\
|
|
1578
|
-
!*** ./node_modules/core-js/internals/regexp-flags.js ***!
|
|
1579
|
-
\********************************************************/
|
|
1580
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
var anObject = __webpack_require__(/*! ../internals/an-object */ "./node_modules/core-js/internals/an-object.js");
|
|
1584
|
-
|
|
1585
|
-
// `RegExp.prototype.flags` getter implementation
|
|
1586
|
-
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1587
|
-
module.exports = function () {
|
|
1588
|
-
var that = anObject(this);
|
|
1589
|
-
var result = '';
|
|
1590
|
-
if (that.hasIndices) result += 'd';
|
|
1591
|
-
if (that.global) result += 'g';
|
|
1592
|
-
if (that.ignoreCase) result += 'i';
|
|
1593
|
-
if (that.multiline) result += 'm';
|
|
1594
|
-
if (that.dotAll) result += 's';
|
|
1595
|
-
if (that.unicode) result += 'u';
|
|
1596
|
-
if (that.unicodeSets) result += 'v';
|
|
1597
|
-
if (that.sticky) result += 'y';
|
|
1598
|
-
return result;
|
|
1599
|
-
};
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
/***/ }),
|
|
1603
|
-
|
|
1604
|
-
/***/ "./node_modules/core-js/internals/require-object-coercible.js":
|
|
1605
|
-
/*!********************************************************************!*\
|
|
1606
|
-
!*** ./node_modules/core-js/internals/require-object-coercible.js ***!
|
|
1607
|
-
\********************************************************************/
|
|
1608
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ "./node_modules/core-js/internals/is-null-or-undefined.js");
|
|
1612
|
-
|
|
1613
|
-
var $TypeError = TypeError;
|
|
1614
|
-
|
|
1615
|
-
// `RequireObjectCoercible` abstract operation
|
|
1616
|
-
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
1617
|
-
module.exports = function (it) {
|
|
1618
|
-
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
|
|
1619
|
-
return it;
|
|
1620
|
-
};
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
/***/ }),
|
|
1624
|
-
|
|
1625
|
-
/***/ "./node_modules/core-js/internals/shared-key.js":
|
|
1626
|
-
/*!******************************************************!*\
|
|
1627
|
-
!*** ./node_modules/core-js/internals/shared-key.js ***!
|
|
1628
|
-
\******************************************************/
|
|
1629
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
|
|
1633
|
-
var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
|
|
1634
|
-
|
|
1635
|
-
var keys = shared('keys');
|
|
1636
|
-
|
|
1637
|
-
module.exports = function (key) {
|
|
1638
|
-
return keys[key] || (keys[key] = uid(key));
|
|
1639
|
-
};
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
/***/ }),
|
|
1643
|
-
|
|
1644
|
-
/***/ "./node_modules/core-js/internals/shared-store.js":
|
|
1645
|
-
/*!********************************************************!*\
|
|
1646
|
-
!*** ./node_modules/core-js/internals/shared-store.js ***!
|
|
1647
|
-
\********************************************************/
|
|
1648
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "./node_modules/core-js/internals/is-pure.js");
|
|
1652
|
-
var globalThis = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1653
|
-
var defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ "./node_modules/core-js/internals/define-global-property.js");
|
|
1654
|
-
|
|
1655
|
-
var SHARED = '__core-js_shared__';
|
|
1656
|
-
var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
|
|
1657
|
-
|
|
1658
|
-
(store.versions || (store.versions = [])).push({
|
|
1659
|
-
version: '3.36.1',
|
|
1660
|
-
mode: IS_PURE ? 'pure' : 'global',
|
|
1661
|
-
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
1662
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
|
|
1663
|
-
source: 'https://github.com/zloirock/core-js'
|
|
1664
|
-
});
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
/***/ }),
|
|
1668
|
-
|
|
1669
|
-
/***/ "./node_modules/core-js/internals/shared.js":
|
|
1670
|
-
/*!**************************************************!*\
|
|
1671
|
-
!*** ./node_modules/core-js/internals/shared.js ***!
|
|
1672
|
-
\**************************************************/
|
|
1673
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
var store = __webpack_require__(/*! ../internals/shared-store */ "./node_modules/core-js/internals/shared-store.js");
|
|
1677
|
-
|
|
1678
|
-
module.exports = function (key, value) {
|
|
1679
|
-
return store[key] || (store[key] = value || {});
|
|
1680
|
-
};
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
/***/ }),
|
|
1684
|
-
|
|
1685
|
-
/***/ "./node_modules/core-js/internals/symbol-constructor-detection.js":
|
|
1686
|
-
/*!************************************************************************!*\
|
|
1687
|
-
!*** ./node_modules/core-js/internals/symbol-constructor-detection.js ***!
|
|
1688
|
-
\************************************************************************/
|
|
1689
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
1693
|
-
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "./node_modules/core-js/internals/engine-v8-version.js");
|
|
1694
|
-
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1695
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1696
|
-
|
|
1697
|
-
var $String = global.String;
|
|
1698
|
-
|
|
1699
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
1700
|
-
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
1701
|
-
var symbol = Symbol('symbol detection');
|
|
1702
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
1703
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
1704
|
-
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
1705
|
-
// of course, fail.
|
|
1706
|
-
return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
1707
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
1708
|
-
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
1709
|
-
});
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
/***/ }),
|
|
1713
|
-
|
|
1714
|
-
/***/ "./node_modules/core-js/internals/to-object.js":
|
|
1715
|
-
/*!*****************************************************!*\
|
|
1716
|
-
!*** ./node_modules/core-js/internals/to-object.js ***!
|
|
1717
|
-
\*****************************************************/
|
|
1718
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "./node_modules/core-js/internals/require-object-coercible.js");
|
|
1722
|
-
|
|
1723
|
-
var $Object = Object;
|
|
1724
|
-
|
|
1725
|
-
// `ToObject` abstract operation
|
|
1726
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
1727
|
-
module.exports = function (argument) {
|
|
1728
|
-
return $Object(requireObjectCoercible(argument));
|
|
1729
|
-
};
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
/***/ }),
|
|
1733
|
-
|
|
1734
|
-
/***/ "./node_modules/core-js/internals/to-primitive.js":
|
|
1735
|
-
/*!********************************************************!*\
|
|
1736
|
-
!*** ./node_modules/core-js/internals/to-primitive.js ***!
|
|
1737
|
-
\********************************************************/
|
|
1738
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
var call = __webpack_require__(/*! ../internals/function-call */ "./node_modules/core-js/internals/function-call.js");
|
|
1742
|
-
var isObject = __webpack_require__(/*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js");
|
|
1743
|
-
var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ "./node_modules/core-js/internals/is-symbol.js");
|
|
1744
|
-
var getMethod = __webpack_require__(/*! ../internals/get-method */ "./node_modules/core-js/internals/get-method.js");
|
|
1745
|
-
var ordinaryToPrimitive = __webpack_require__(/*! ../internals/ordinary-to-primitive */ "./node_modules/core-js/internals/ordinary-to-primitive.js");
|
|
1746
|
-
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "./node_modules/core-js/internals/well-known-symbol.js");
|
|
1747
|
-
|
|
1748
|
-
var $TypeError = TypeError;
|
|
1749
|
-
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
1750
|
-
|
|
1751
|
-
// `ToPrimitive` abstract operation
|
|
1752
|
-
// https://tc39.es/ecma262/#sec-toprimitive
|
|
1753
|
-
module.exports = function (input, pref) {
|
|
1754
|
-
if (!isObject(input) || isSymbol(input)) return input;
|
|
1755
|
-
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
1756
|
-
var result;
|
|
1757
|
-
if (exoticToPrim) {
|
|
1758
|
-
if (pref === undefined) pref = 'default';
|
|
1759
|
-
result = call(exoticToPrim, input, pref);
|
|
1760
|
-
if (!isObject(result) || isSymbol(result)) return result;
|
|
1761
|
-
throw new $TypeError("Can't convert object to primitive value");
|
|
1762
|
-
}
|
|
1763
|
-
if (pref === undefined) pref = 'number';
|
|
1764
|
-
return ordinaryToPrimitive(input, pref);
|
|
1765
|
-
};
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
/***/ }),
|
|
1769
|
-
|
|
1770
|
-
/***/ "./node_modules/core-js/internals/to-property-key.js":
|
|
1771
|
-
/*!***********************************************************!*\
|
|
1772
|
-
!*** ./node_modules/core-js/internals/to-property-key.js ***!
|
|
1773
|
-
\***********************************************************/
|
|
1774
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "./node_modules/core-js/internals/to-primitive.js");
|
|
1778
|
-
var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ "./node_modules/core-js/internals/is-symbol.js");
|
|
1779
|
-
|
|
1780
|
-
// `ToPropertyKey` abstract operation
|
|
1781
|
-
// https://tc39.es/ecma262/#sec-topropertykey
|
|
1782
|
-
module.exports = function (argument) {
|
|
1783
|
-
var key = toPrimitive(argument, 'string');
|
|
1784
|
-
return isSymbol(key) ? key : key + '';
|
|
1785
|
-
};
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
/***/ }),
|
|
1789
|
-
|
|
1790
|
-
/***/ "./node_modules/core-js/internals/try-to-string.js":
|
|
1791
|
-
/*!*********************************************************!*\
|
|
1792
|
-
!*** ./node_modules/core-js/internals/try-to-string.js ***!
|
|
1793
|
-
\*********************************************************/
|
|
1794
|
-
/***/ ((module) => {
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
var $String = String;
|
|
1798
|
-
|
|
1799
|
-
module.exports = function (argument) {
|
|
1800
|
-
try {
|
|
1801
|
-
return $String(argument);
|
|
1802
|
-
} catch (error) {
|
|
1803
|
-
return 'Object';
|
|
1804
|
-
}
|
|
1805
|
-
};
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
/***/ }),
|
|
1809
|
-
|
|
1810
|
-
/***/ "./node_modules/core-js/internals/uid.js":
|
|
1811
|
-
/*!***********************************************!*\
|
|
1812
|
-
!*** ./node_modules/core-js/internals/uid.js ***!
|
|
1813
|
-
\***********************************************/
|
|
1814
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ "./node_modules/core-js/internals/function-uncurry-this.js");
|
|
1818
|
-
|
|
1819
|
-
var id = 0;
|
|
1820
|
-
var postfix = Math.random();
|
|
1821
|
-
var toString = uncurryThis(1.0.toString);
|
|
1822
|
-
|
|
1823
|
-
module.exports = function (key) {
|
|
1824
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
1825
|
-
};
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
/***/ }),
|
|
1829
|
-
|
|
1830
|
-
/***/ "./node_modules/core-js/internals/use-symbol-as-uid.js":
|
|
1831
|
-
/*!*************************************************************!*\
|
|
1832
|
-
!*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***!
|
|
1833
|
-
\*************************************************************/
|
|
1834
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
1838
|
-
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ "./node_modules/core-js/internals/symbol-constructor-detection.js");
|
|
1839
|
-
|
|
1840
|
-
module.exports = NATIVE_SYMBOL
|
|
1841
|
-
&& !Symbol.sham
|
|
1842
|
-
&& typeof Symbol.iterator == 'symbol';
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
/***/ }),
|
|
1846
|
-
|
|
1847
|
-
/***/ "./node_modules/core-js/internals/v8-prototype-define-bug.js":
|
|
1848
|
-
/*!*******************************************************************!*\
|
|
1849
|
-
!*** ./node_modules/core-js/internals/v8-prototype-define-bug.js ***!
|
|
1850
|
-
\*******************************************************************/
|
|
1851
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
1855
|
-
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1856
|
-
|
|
1857
|
-
// V8 ~ Chrome 36-
|
|
1858
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
1859
|
-
module.exports = DESCRIPTORS && fails(function () {
|
|
1860
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1861
|
-
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
1862
|
-
value: 42,
|
|
1863
|
-
writable: false
|
|
1864
|
-
}).prototype !== 42;
|
|
1865
|
-
});
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
/***/ }),
|
|
1869
|
-
|
|
1870
|
-
/***/ "./node_modules/core-js/internals/weak-map-basic-detection.js":
|
|
1871
|
-
/*!********************************************************************!*\
|
|
1872
|
-
!*** ./node_modules/core-js/internals/weak-map-basic-detection.js ***!
|
|
1873
|
-
\********************************************************************/
|
|
1874
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1878
|
-
var isCallable = __webpack_require__(/*! ../internals/is-callable */ "./node_modules/core-js/internals/is-callable.js");
|
|
1879
|
-
|
|
1880
|
-
var WeakMap = global.WeakMap;
|
|
1881
|
-
|
|
1882
|
-
module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
/***/ }),
|
|
1886
|
-
|
|
1887
|
-
/***/ "./node_modules/core-js/internals/well-known-symbol.js":
|
|
1888
|
-
/*!*************************************************************!*\
|
|
1889
|
-
!*** ./node_modules/core-js/internals/well-known-symbol.js ***!
|
|
1890
|
-
\*************************************************************/
|
|
1891
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1895
|
-
var shared = __webpack_require__(/*! ../internals/shared */ "./node_modules/core-js/internals/shared.js");
|
|
1896
|
-
var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ "./node_modules/core-js/internals/has-own-property.js");
|
|
1897
|
-
var uid = __webpack_require__(/*! ../internals/uid */ "./node_modules/core-js/internals/uid.js");
|
|
1898
|
-
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ "./node_modules/core-js/internals/symbol-constructor-detection.js");
|
|
1899
|
-
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "./node_modules/core-js/internals/use-symbol-as-uid.js");
|
|
1900
|
-
|
|
1901
|
-
var Symbol = global.Symbol;
|
|
1902
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
1903
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
|
|
1904
|
-
|
|
1905
|
-
module.exports = function (name) {
|
|
1906
|
-
if (!hasOwn(WellKnownSymbolsStore, name)) {
|
|
1907
|
-
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
|
|
1908
|
-
? Symbol[name]
|
|
1909
|
-
: createWellKnownSymbol('Symbol.' + name);
|
|
1910
|
-
} return WellKnownSymbolsStore[name];
|
|
1911
|
-
};
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
/***/ }),
|
|
1915
|
-
|
|
1916
|
-
/***/ "./node_modules/core-js/modules/es.regexp.flags.js":
|
|
1917
|
-
/*!*********************************************************!*\
|
|
1918
|
-
!*** ./node_modules/core-js/modules/es.regexp.flags.js ***!
|
|
1919
|
-
\*********************************************************/
|
|
1920
|
-
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
var global = __webpack_require__(/*! ../internals/global */ "./node_modules/core-js/internals/global.js");
|
|
1924
|
-
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "./node_modules/core-js/internals/descriptors.js");
|
|
1925
|
-
var defineBuiltInAccessor = __webpack_require__(/*! ../internals/define-built-in-accessor */ "./node_modules/core-js/internals/define-built-in-accessor.js");
|
|
1926
|
-
var regExpFlags = __webpack_require__(/*! ../internals/regexp-flags */ "./node_modules/core-js/internals/regexp-flags.js");
|
|
1927
|
-
var fails = __webpack_require__(/*! ../internals/fails */ "./node_modules/core-js/internals/fails.js");
|
|
1928
|
-
|
|
1929
|
-
// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError
|
|
1930
|
-
var RegExp = global.RegExp;
|
|
1931
|
-
var RegExpPrototype = RegExp.prototype;
|
|
1932
|
-
|
|
1933
|
-
var FORCED = DESCRIPTORS && fails(function () {
|
|
1934
|
-
var INDICES_SUPPORT = true;
|
|
1935
|
-
try {
|
|
1936
|
-
RegExp('.', 'd');
|
|
1937
|
-
} catch (error) {
|
|
1938
|
-
INDICES_SUPPORT = false;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
var O = {};
|
|
1942
|
-
// modern V8 bug
|
|
1943
|
-
var calls = '';
|
|
1944
|
-
var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';
|
|
1945
|
-
|
|
1946
|
-
var addGetter = function (key, chr) {
|
|
1947
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1948
|
-
Object.defineProperty(O, key, { get: function () {
|
|
1949
|
-
calls += chr;
|
|
1950
|
-
return true;
|
|
1951
|
-
} });
|
|
1952
|
-
};
|
|
1953
|
-
|
|
1954
|
-
var pairs = {
|
|
1955
|
-
dotAll: 's',
|
|
1956
|
-
global: 'g',
|
|
1957
|
-
ignoreCase: 'i',
|
|
1958
|
-
multiline: 'm',
|
|
1959
|
-
sticky: 'y'
|
|
1960
|
-
};
|
|
1961
|
-
|
|
1962
|
-
if (INDICES_SUPPORT) pairs.hasIndices = 'd';
|
|
1963
|
-
|
|
1964
|
-
for (var key in pairs) addGetter(key, pairs[key]);
|
|
1965
|
-
|
|
1966
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1967
|
-
var result = Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call(O);
|
|
1968
|
-
|
|
1969
|
-
return result !== expected || calls !== expected;
|
|
1970
|
-
});
|
|
1971
|
-
|
|
1972
|
-
// `RegExp.prototype.flags` getter
|
|
1973
|
-
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1974
|
-
if (FORCED) defineBuiltInAccessor(RegExpPrototype, 'flags', {
|
|
1975
|
-
configurable: true,
|
|
1976
|
-
get: regExpFlags
|
|
1977
|
-
});
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
/***/ })
|
|
1981
|
-
|
|
1982
|
-
/******/ });
|
|
1983
|
-
/************************************************************************/
|
|
1984
|
-
/******/ // The module cache
|
|
1985
|
-
/******/ var __webpack_module_cache__ = {};
|
|
1986
|
-
/******/
|
|
1987
|
-
/******/ // The require function
|
|
1988
|
-
/******/ function __webpack_require__(moduleId) {
|
|
1989
|
-
/******/ // Check if module is in cache
|
|
1990
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
1991
|
-
/******/ if (cachedModule !== undefined) {
|
|
1992
|
-
/******/ return cachedModule.exports;
|
|
1993
|
-
/******/ }
|
|
1994
|
-
/******/ // Create a new module (and put it into the cache)
|
|
1995
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
1996
|
-
/******/ // no module.id needed
|
|
1997
|
-
/******/ // no module.loaded needed
|
|
1998
|
-
/******/ exports: {}
|
|
1999
|
-
/******/ };
|
|
2000
|
-
/******/
|
|
2001
|
-
/******/ // Execute the module function
|
|
2002
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
2003
|
-
/******/
|
|
2004
|
-
/******/ // Return the exports of the module
|
|
2005
|
-
/******/ return module.exports;
|
|
2006
|
-
/******/ }
|
|
2007
|
-
/******/
|
|
2008
|
-
/************************************************************************/
|
|
2009
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
2010
|
-
/******/ (() => {
|
|
2011
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
2012
|
-
/******/ __webpack_require__.n = (module) => {
|
|
2013
|
-
/******/ var getter = module && module.__esModule ?
|
|
2014
|
-
/******/ () => (module['default']) :
|
|
2015
|
-
/******/ () => (module);
|
|
2016
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
2017
|
-
/******/ return getter;
|
|
2018
|
-
/******/ };
|
|
2019
|
-
/******/ })();
|
|
2020
|
-
/******/
|
|
2021
|
-
/******/ /* webpack/runtime/define property getters */
|
|
2022
|
-
/******/ (() => {
|
|
2023
|
-
/******/ // define getter functions for harmony exports
|
|
2024
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
2025
|
-
/******/ for(var key in definition) {
|
|
2026
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
2027
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
2028
|
-
/******/ }
|
|
2029
|
-
/******/ }
|
|
2030
|
-
/******/ };
|
|
2031
|
-
/******/ })();
|
|
2032
|
-
/******/
|
|
2033
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2034
|
-
/******/ (() => {
|
|
2035
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2036
|
-
/******/ })();
|
|
2037
|
-
/******/
|
|
2038
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
2039
|
-
/******/ (() => {
|
|
2040
|
-
/******/ // define __esModule on exports
|
|
2041
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
2042
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2043
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2044
|
-
/******/ }
|
|
2045
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
2046
|
-
/******/ };
|
|
2047
|
-
/******/ })();
|
|
2048
|
-
/******/
|
|
2049
|
-
/************************************************************************/
|
|
2050
|
-
var __webpack_exports__ = {};
|
|
2051
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
2052
|
-
(() => {
|
|
2053
|
-
/*!***********************!*\
|
|
2054
|
-
!*** ./src/index.tsx ***!
|
|
2055
|
-
\***********************/
|
|
2056
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2057
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2058
|
-
/* harmony export */ FlagshipProvider: () => (/* reexport safe */ _FlagshipProvider__WEBPACK_IMPORTED_MODULE_2__.FlagshipProvider),
|
|
2059
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
2060
|
-
/* harmony export */ useFlagship: () => (/* reexport safe */ _FlagshipHooks__WEBPACK_IMPORTED_MODULE_1__.useFlagship),
|
|
2061
|
-
/* harmony export */ useFsFlag: () => (/* reexport safe */ _FlagshipHooks__WEBPACK_IMPORTED_MODULE_1__.useFsFlag)
|
|
2062
|
-
/* harmony export */ });
|
|
2063
|
-
/* harmony import */ var _FlagshipProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FlagshipProvider */ "./src/FlagshipProvider.tsx");
|
|
2064
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @flagship.io/js-sdk */ "@flagship.io/js-sdk");
|
|
2065
|
-
/* harmony import */ var _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_0__);
|
|
2066
|
-
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
2067
|
-
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_0__) if(["default","FlagshipProvider"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _flagship_io_js_sdk__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__]
|
|
2068
|
-
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
2069
|
-
/* harmony import */ var _FlagshipHooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FlagshipHooks */ "./src/FlagshipHooks.ts");
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_FlagshipProvider__WEBPACK_IMPORTED_MODULE_2__.FlagshipProvider);
|
|
2076
|
-
})();
|
|
2077
|
-
|
|
2078
|
-
module.exports = __webpack_exports__;
|
|
2079
|
-
/******/ })()
|
|
2080
|
-
;
|
|
1
|
+
(()=>{"use strict";var t={5663:(t,e,n)=>{n.d(e,{f:()=>o,g:()=>i});var r=n(2015);const o={isInitializing:!0},i=(0,r.createContext)({state:{...o}})},483:(t,e,n)=>{n.d(e,{E:()=>g,r:()=>l}),n(9479);var r=n(2015),o=n(2473);const i="flagship Visitor not initialized.";var a=n(5663),s=n(6495);function u(t,e,n){var r;return(e="symbol"==typeof(r=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e))?r:r+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class c{constructor(t,e){u(this,"key",void 0),u(this,"flag",void 0);const n=e.flags;e.hasVisitorData||(0,s.JE)(o.Flagship.getConfig(),i,"GetFlag"),this.key=t,this.flag=null==n?void 0:n.get(t)}getValue(t){return this.flag?null===this.flag.value||void 0===this.flag.value?t:null==t||(0,s.N0)(this.flag.value,t)?this.flag.value:((0,s.fH)(o.Flagship.getConfig(),(0,s.nv)("Flag for key {0} has a different type. Default value is returned.",this.key),"getValue"),t):t}exists(){return!!this.flag&&!!(this.flag.campaignId&&this.flag.variationId&&this.flag.variationGroupId)}async visitorExposed(){}get metadata(){return this.flag?new o.FSFlagMetadata({campaignId:this.flag.campaignId,campaignName:this.flag.campaignName,variationGroupId:this.flag.variationGroupId,variationGroupName:this.flag.variationGroupName,variationId:this.flag.variationId,variationName:this.flag.variationName,isReference:!!this.flag.isReference,campaignType:this.flag.campaignType,slug:this.flag.slug}):o.FSFlagMetadata.Empty()}get status(){return this.exists()?o.FSFlagStatus.FETCHED:o.FSFlagStatus.NOT_FOUND}}const l=t=>{const{state:e}=(0,r.useContext)(a.g),{visitor:n}=e;return n?n.getFlag(t):new c(t,e)},f=t=>{const{updateFunction:e,functionName:n,visitor:r,config:o}=t;if(!r)return void(0,s.vV)(o,i,n);const a=(0,s.Go)(r.context);e();const u=r.context;(0,s.I0)(a,u)&&r.fetchFlags()},g=()=>{const{state:t}=(0,r.useContext)(a.g),{visitor:e,config:n}=t,u=(0,r.useCallback)((t=>{f({config:n,visitor:e,updateFunction:()=>null==e?void 0:e.updateContext(t),functionName:"updateContext"})}),[e]),l=(0,r.useCallback)((()=>{f({config:n,visitor:e,updateFunction:()=>null==e?void 0:e.clearContext(),functionName:"cleanContext"})}),[e]),g=(0,r.useCallback)((t=>{if(!e)return void(0,s.vV)(n,i,"authenticate");const r=e.visitorId;e.authenticate(t),r!==t&&e.fetchFlags()}),[e]),v=(0,r.useCallback)((()=>{if(!e)return void(0,s.vV)(n,i,"unauthenticate");const t=e.visitorId;e.unauthenticate(),t!==e.visitorId&&e.fetchFlags()}),[e]),p=(0,r.useCallback)((t=>e?Array.isArray(t)?e.sendHits(t):e.sendHit(t):((0,s.vV)(n,i,"sendHit"),Promise.resolve())),[e]),d=(0,r.useCallback)((n=>e?e.getFlag(n):new c(n,t)),[e]),h=(0,r.useCallback)((async()=>e?e.fetchFlags():((0,s.JE)(n,i,"fetchFlags"),Promise.resolve())),[e]),y=(0,r.useCallback)((t=>{e?e.setConsent(t):(0,s.JE)(n,i,"setConsent")}),[e]),m=(0,r.useCallback)((()=>o.Flagship.close()),[]),b=(0,r.useCallback)((()=>{if(!e){var n;const e=new Map;return null===(n=t.flags)||void 0===n||n.forEach(((n,r)=>{e.set(r,new c(r,t))})),new o.FSFlagCollection({flags:e})}return e.getFlags()}),[e]),S=(0,r.useCallback)((async(...t)=>{if(e)return e.collectEAIEventsAsync(...t)}),[e]);return(0,r.useMemo)((()=>({visitorId:null==e?void 0:e.visitorId,anonymousId:null==e?void 0:e.anonymousId,context:{...null==e?void 0:e.context},hasConsented:null==e?void 0:e.hasConsented,sdkStatus:o.Flagship.getStatus(),flagsStatus:null==e?void 0:e.flagsStatus,setConsent:y,updateContext:u,clearContext:l,authenticate:g,unauthenticate:v,sendHits:p,getFlag:d,fetchFlags:h,close:m,getFlags:b,collectEAIEventsAsync:S})),[e,y,u,l,g,v,p,d,h,m,b,S])}},1935:(t,e,n)=>{n.d(e,{_:()=>f});var r=n(2015),o=n.n(r),i=n(2473),a=n.n(i),s=n(5663);let u=function(t){return t.FsTriggerRendering="FS_TRIGGER_RENDERING",t}({});const c="5.0.1-beta.0";var l=n(6495);function f({children:t,envId:e,apiKey:n,decisionMode:f=i.DecisionMode.DECISION_API,visitorData:g,loadingComponent:v,onSdkStatusChanged:p,onBucketingUpdated:d,initialCampaigns:h,initialFlagsData:y,fetchFlagsOnBucketingUpdated:m,hitDeduplicationTime:b=2,fetchNow:S=!0,language:x=1,sdkVersion:I=c,onFlagsStatusChanged:F,shouldSaveInstance:w,...C}){var E;const O=(0,l.FG)(y,h),[N,k]=(0,r.useState)({...s.f,flags:O,hasVisitorData:!!g}),[j,A]=(0,r.useState)(),L=(0,r.useRef)();L.current=N;const P=(0,r.useRef)(g),T=t=>{d&&d(t),A(t)},R=t=>{switch(p&&p(t),t){case i.FSSdkStatus.SDK_PANIC:case i.FSSdkStatus.SDK_INITIALIZED:D();break;case i.FSSdkStatus.SDK_NOT_INITIALIZED:k((t=>({...t,config:a().getConfig(),isInitializing:!1})))}};function M(t){k((e=>({...e,visitor:t.fsVisitor,config:a().getConfig(),isInitializing:!1,hasVisitorData:!!g})))}const D=()=>{if(!P.current)return;const t=a().newVisitor({visitorId:P.current.id,context:P.current.context,isAuthenticated:P.current.isAuthenticated,hasConsented:P.current.hasConsented,initialCampaigns:h,initialFlagsData:y,onFlagsStatusChanged:F,shouldSaveInstance:w});null==t||t.on("ready",(e=>{((t,e)=>{e&&(0,l.vV)(a().getConfig(),e.message||e,"onReady"),M({fsVisitor:t})})(t,e)})),S||M({fsVisitor:t})};(0,l.ig)((()=>{var t;m&&(null===(t=N.visitor)||void 0===t||t.fetchFlags())}),[j]),(0,l.ig)((()=>{P.current=g,function(){if(P.current&&a().getStatus()===i.FSSdkStatus.SDK_INITIALIZED){var t,e;if(!N.visitor||N.visitor.visitorId!==P.current.id&&(!P.current.isAuthenticated||P.current.isAuthenticated&&N.visitor.anonymousId))return null===(t=N.visitor)||void 0===t||t.cleanup(),void D();P.current.hasConsented!==N.visitor.hasConsented&&N.visitor.setConsent(null===(e=P.current.hasConsented)||void 0===e||e),N.visitor.updateContext(P.current.context),!N.visitor.anonymousId&&P.current.isAuthenticated&&N.visitor.authenticate(P.current.id),N.visitor.anonymousId&&!P.current.isAuthenticated&&N.visitor.unauthenticate(),N.visitor.fetchFlags()}}()}),[JSON.stringify(g)]),(0,r.useEffect)((()=>{a().start(e,n,{decisionMode:f,fetchNow:S,onSdkStatusChanged:R,onBucketingUpdated:T,hitDeduplicationTime:b,language:x,sdkVersion:I,...C})}),[e,n,f]),(0,r.useEffect)((()=>{var t,e;return null===(t=window)||void 0===t||null===(e=t.addEventListener)||void 0===e||e.call(t,u.FsTriggerRendering,G),()=>{var t,e;return null===(t=window)||void 0===t||null===(e=t.removeEventListener)||void 0===e?void 0:e.call(t,u.FsTriggerRendering,G)}}),[null===(E=N.config)||void 0===E?void 0:E.isQAModeEnabled]);const G=t=>{const{detail:e}=t;var n;e.forcedReFetchFlags?null===(n=L.current)||void 0===n||null===(n=n.visitor)||void 0===n||n.fetchFlags():k((t=>({...t,toggleForcedVariations:!t.toggleForcedVariations})))};return o().createElement(s.g.Provider,{value:{state:N,setState:k}},(()=>{const e=!N.visitor;return N.isInitializing&&v&&e&&S?o().createElement(o().Fragment,null,v):o().createElement(o().Fragment,null,t)})())}},6495:(t,e,n)=>{n.d(e,{FG:()=>p,Go:()=>d,I0:()=>h,JE:()=>u,N0:()=>f,fH:()=>s,ig:()=>l,nv:()=>g,vV:()=>a});var r=n(2015),o=n(2473),i=n.n(o);function a(t,e,n){!t||!t.logLevel||t.logLevel<o.LogLevel.ERROR||("function"==typeof t.onLog&&t.onLog(o.LogLevel.ERROR,n,e),t.logManager&&"function"==typeof t.logManager.error&&t.logManager.error(e,n))}function s(t,e,n){!t||!t.logLevel||t.logLevel<o.LogLevel.INFO||("function"==typeof t.onLog&&t.onLog(o.LogLevel.INFO,n,e),t.logManager&&"function"==typeof t.logManager.info&&t.logManager.info(e,n))}function u(t,e,n){!t||!t.logLevel||t.logLevel<o.LogLevel.WARNING||("function"==typeof t.onLog&&t.onLog(o.LogLevel.WARNING,n,e),t.logManager&&"function"==typeof t.logManager.warning&&t.logManager.warning(e,n))}const c=t=>{const e=new Map;return t&&Array.isArray(t)?(t.forEach((t=>{const n=t.variation.modifications.value;for(const r in n){const o=n[r];e.set(r,{key:r,campaignId:t.id,campaignName:t.name||"",variationGroupId:t.variationGroupId,variationGroupName:t.variationGroupName||"",variationId:t.variation.id,variationName:t.variation.name||"",isReference:t.variation.reference,slug:t.slug||"",value:o})}})),e):e};function l(t,e){const n=(0,r.useRef)(!0);(0,r.useEffect)((()=>{if(!n.current)return"function"==typeof t?t():void 0;n.current=!1}),e)}function f(t,e){return typeof t==typeof e&&("object"!=typeof t||"object"!=typeof e||Array.isArray(t)===Array.isArray(e))}function g(t,...e){let n=t;for(let t=0;t<e.length;t++){const r=e[t];n=n.replace(new RegExp(`\\{${t}\\}`,"g"),r)}return n}function v(t,e){if("string"!=typeof t)return a(e,`Invalid hex string: ${t}`,"hexToValue"),null;let n="";for(let r=0;r<t.length;r+=2){const o=t.slice(r,r+2),i=parseInt(o,16);if(isNaN(i))return a(e,`Invalid hex character: ${o}`,"hexToValue"),null;n+=String.fromCharCode(i)}try{return JSON.parse(n)}catch(t){return a(e,`Error while parsing JSON: ${null==t?void 0:t.message}`,"hexToValue"),null}}function p(t,e){let n=new Map;return Array.isArray(t)?t.forEach((t=>{var e;n.set(t.key,{key:t.key,campaignId:t.campaignId,campaignName:t.campaignName,variationGroupId:t.variationGroupId,variationGroupName:t.variationGroupName,variationId:t.variationId,variationName:t.variationName,isReference:t.isReference,campaignType:t.campaignType,slug:t.slug,value:null===(e=v(t.hex,i().getConfig()))||void 0===e?void 0:e.v})})):e&&(n=c(e)),n}function d(t){return JSON.parse(JSON.stringify(t))}function h(t,e){return JSON.stringify(t)!==JSON.stringify(e)}},2473:t=>{t.exports=require("@flagship.io/js-sdk")},2015:t=>{t.exports=require("react")},9306:(t,e,n)=>{var r=n(4901),o=n(6823),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},8551:(t,e,n)=>{var r=n(34),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},6699:(t,e,n)=>{var r=n(3724),o=n(4913),i=n(6980);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},6980:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2106:(t,e,n)=>{var r=n(283),o=n(4913);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),o.f(t,e,n)}},9433:(t,e,n)=>{var r=n(4475),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},3724:(t,e,n)=>{var r=n(9039);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,e,n)=>{var r=n(4475),o=n(34),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},9392:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7388:(t,e,n)=>{var r,o,i=n(4475),a=n(9392),s=i.process,u=i.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},9039:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},616:(t,e,n)=>{var r=n(9039);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},9565:(t,e,n)=>{var r=n(616),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},350:(t,e,n)=>{var r=n(3724),o=n(9297),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},9504:(t,e,n)=>{var r=n(616),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);t.exports=r?a:function(t){return function(){return i.apply(t,arguments)}}},7751:(t,e,n)=>{var r=n(4475),o=n(4901);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},5966:(t,e,n)=>{var r=n(9306),o=n(4117);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},4475:function(t){var e=function(t){return t&&t.Math===Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||e("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,e,n)=>{var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},421:t=>{t.exports={}},5917:(t,e,n)=>{var r=n(3724),o=n(9039),i=n(4055);t.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},3706:(t,e,n)=>{var r=n(9504),o=n(4901),i=n(7629),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},1181:(t,e,n)=>{var r,o,i,a=n(8622),s=n(4475),u=n(34),c=n(6699),l=n(9297),f=n(7629),g=n(6119),v=n(421),p="Object already initialized",d=s.TypeError,h=s.WeakMap;if(a||f.state){var y=f.state||(f.state=new h);y.get=y.get,y.has=y.has,y.set=y.set,r=function(t,e){if(y.has(t))throw new d(p);return e.facade=t,y.set(t,e),e},o=function(t){return y.get(t)||{}},i=function(t){return y.has(t)}}else{var m=g("state");v[m]=!0,r=function(t,e){if(l(t,m))throw new d(p);return e.facade=t,c(t,m,e),e},o=function(t){return l(t,m)?t[m]:{}},i=function(t){return l(t,m)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw new d("Incompatible receiver, "+t+" required");return n}}}},4901:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4117:t=>{t.exports=function(t){return null==t}},34:(t,e,n)=>{var r=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},6395:t=>{t.exports=!1},757:(t,e,n)=>{var r=n(7751),o=n(4901),i=n(1625),a=n(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,s(t))}},283:(t,e,n)=>{var r=n(9504),o=n(9039),i=n(4901),a=n(9297),s=n(3724),u=n(350).CONFIGURABLE,c=n(3706),l=n(1181),f=l.enforce,g=l.get,v=String,p=Object.defineProperty,d=r("".slice),h=r("".replace),y=r([].join),m=s&&!o((function(){return 8!==p((function(){}),"length",{value:8}).length})),b=String(String).split("String"),S=t.exports=function(t,e,n){"Symbol("===d(v(e),0,7)&&(e="["+h(v(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||u&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),m&&n&&a(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=f(t);return a(r,"source")||(r.source=y(b,"string"==typeof e?e:"")),t};Function.prototype.toString=S((function(){return i(this)&&g(this).source||c(this)}),"toString")},4913:(t,e,n)=>{var r=n(3724),o=n(5917),i=n(8686),a=n(8551),s=n(6969),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",g="configurable",v="writable";e.f=r?i?function(t,e,n){if(a(t),e=s(e),a(n),"function"==typeof t&&"prototype"===e&&"value"in n&&v in n&&!n[v]){var r=l(t,e);r&&r[v]&&(t[e]=n.value,n={configurable:g in n?n[g]:r[g],enumerable:f in n?n[f]:r[f],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(a(t),e=s(e),a(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1625:(t,e,n)=>{var r=n(9504);t.exports=r({}.isPrototypeOf)},4270:(t,e,n)=>{var r=n(9565),o=n(4901),i=n(34),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!i(s=r(n,t)))return s;if(o(n=t.valueOf)&&!i(s=r(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!i(s=r(n,t)))return s;throw new a("Can't convert object to primitive value")}},7979:(t,e,n)=>{var r=n(8551);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},7750:(t,e,n)=>{var r=n(4117),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},6119:(t,e,n)=>{var r=n(5745),o=n(3392),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},7629:(t,e,n)=>{var r=n(6395),o=n(4475),i=n(9433),a="__core-js_shared__",s=t.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.36.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(t,e,n)=>{var r=n(7629);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},4495:(t,e,n)=>{var r=n(7388),o=n(9039),i=n(4475).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8981:(t,e,n)=>{var r=n(7750),o=Object;t.exports=function(t){return o(r(t))}},2777:(t,e,n)=>{var r=n(9565),o=n(34),i=n(757),a=n(5966),s=n(4270),u=n(8227),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,u=a(t,l);if(u){if(void 0===e&&(e="default"),n=r(u,t,e),!o(n)||i(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},6969:(t,e,n)=>{var r=n(2777),o=n(757);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},6823:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:(t,e,n)=>{var r=n(9504),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},7040:(t,e,n)=>{var r=n(4495);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,e,n)=>{var r=n(3724),o=n(9039);t.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8622:(t,e,n)=>{var r=n(4475),o=n(4901),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},8227:(t,e,n)=>{var r=n(4475),o=n(5745),i=n(9297),a=n(3392),s=n(4495),u=n(7040),c=r.Symbol,l=o("wks"),f=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return i(l,t)||(l[t]=s&&i(c,t)?c[t]:f("Symbol."+t)),l[t]}},9479:(t,e,n)=>{var r=n(4475),o=n(3724),i=n(2106),a=n(7979),s=n(9039),u=r.RegExp,c=u.prototype;o&&s((function(){var t=!0;try{u(".","d")}catch(e){t=!1}var e={},n="",r=t?"dgimsy":"gimsy",o=function(t,r){Object.defineProperty(e,t,{get:function(){return n+=r,!0}})},i={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in t&&(i.hasIndices="d"),i)o(a,i[a]);return Object.getOwnPropertyDescriptor(c,"flags").get.call(e)!==r||n!==r}))&&i(c,"flags",{configurable:!0,get:a})}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{n.r(r),n.d(r,{FlagshipProvider:()=>t._,default:()=>a,useFlagship:()=>i.E,useFsFlag:()=>i.r});var t=n(1935),e=n(2473),o={};for(const t in e)["default","FlagshipProvider"].indexOf(t)<0&&(o[t]=()=>e[t]);n.d(r,o);var i=n(483);const a=t._})(),module.exports=r})();
|
|
2081
2
|
//# sourceMappingURL=index.node.js.map
|