@flagship.io/react-sdk 5.1.1-beta.1 → 5.2.0-beta.1

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