@arc-js/intl 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config.js +1 -1
- package/config.min.js +1 -1
- package/core/TranslationService.d.ts +28 -0
- package/core/TranslationService.js +1089 -0
- package/core/TranslationService.min.js +2 -0
- package/core/types.d.ts +21 -0
- package/core/types.js +1 -0
- package/core/types.min.js +2 -0
- package/hooks/useTranslation.d.ts +11 -0
- package/hooks/useTranslation.js +3183 -0
- package/hooks/useTranslation.min.js +2 -0
- package/package.json +1 -1
- package/providers/IntlProvider.jsx +4 -7
- package/providers/IntlProvider.tsx +9 -19
- package/utils/loaders.d.ts +11 -0
- package/utils/loaders.js +961 -0
- package/utils/loaders.min.js +2 -0
- package/utils/mergeTranslations.d.ts +3 -0
- package/utils/mergeTranslations.js +18 -0
- package/utils/mergeTranslations.min.js +2 -0
- package/utils.js +1 -1
- package/utils.min.js +1 -1
|
@@ -0,0 +1,3183 @@
|
|
|
1
|
+
var react = {exports: {}};
|
|
2
|
+
|
|
3
|
+
var react_production = {};
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var hasRequiredReact_production;
|
|
7
|
+
|
|
8
|
+
function requireReact_production () {
|
|
9
|
+
if (hasRequiredReact_production) return react_production;
|
|
10
|
+
hasRequiredReact_production = 1;
|
|
11
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
12
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
13
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
14
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
15
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
16
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
17
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
18
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
19
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
20
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
21
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
22
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
23
|
+
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
24
|
+
function getIteratorFn(maybeIterable) {
|
|
25
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
26
|
+
maybeIterable =
|
|
27
|
+
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
28
|
+
maybeIterable["@@iterator"];
|
|
29
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
30
|
+
}
|
|
31
|
+
var ReactNoopUpdateQueue = {
|
|
32
|
+
isMounted: function () {
|
|
33
|
+
return false;
|
|
34
|
+
},
|
|
35
|
+
enqueueForceUpdate: function () {},
|
|
36
|
+
enqueueReplaceState: function () {},
|
|
37
|
+
enqueueSetState: function () {}
|
|
38
|
+
},
|
|
39
|
+
assign = Object.assign,
|
|
40
|
+
emptyObject = {};
|
|
41
|
+
function Component(props, context, updater) {
|
|
42
|
+
this.props = props;
|
|
43
|
+
this.context = context;
|
|
44
|
+
this.refs = emptyObject;
|
|
45
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
46
|
+
}
|
|
47
|
+
Component.prototype.isReactComponent = {};
|
|
48
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
49
|
+
if (
|
|
50
|
+
"object" !== typeof partialState &&
|
|
51
|
+
"function" !== typeof partialState &&
|
|
52
|
+
null != partialState
|
|
53
|
+
)
|
|
54
|
+
throw Error(
|
|
55
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
56
|
+
);
|
|
57
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
58
|
+
};
|
|
59
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
60
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
61
|
+
};
|
|
62
|
+
function ComponentDummy() {}
|
|
63
|
+
ComponentDummy.prototype = Component.prototype;
|
|
64
|
+
function PureComponent(props, context, updater) {
|
|
65
|
+
this.props = props;
|
|
66
|
+
this.context = context;
|
|
67
|
+
this.refs = emptyObject;
|
|
68
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
69
|
+
}
|
|
70
|
+
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
|
|
71
|
+
pureComponentPrototype.constructor = PureComponent;
|
|
72
|
+
assign(pureComponentPrototype, Component.prototype);
|
|
73
|
+
pureComponentPrototype.isPureReactComponent = true;
|
|
74
|
+
var isArrayImpl = Array.isArray;
|
|
75
|
+
function noop() {}
|
|
76
|
+
var ReactSharedInternals = { H: null, A: null, T: null, S: null },
|
|
77
|
+
hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
78
|
+
function ReactElement(type, key, props) {
|
|
79
|
+
var refProp = props.ref;
|
|
80
|
+
return {
|
|
81
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
82
|
+
type: type,
|
|
83
|
+
key: key,
|
|
84
|
+
ref: void 0 !== refProp ? refProp : null,
|
|
85
|
+
props: props
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
89
|
+
return ReactElement(oldElement.type, newKey, oldElement.props);
|
|
90
|
+
}
|
|
91
|
+
function isValidElement(object) {
|
|
92
|
+
return (
|
|
93
|
+
"object" === typeof object &&
|
|
94
|
+
null !== object &&
|
|
95
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function escape(key) {
|
|
99
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
100
|
+
return (
|
|
101
|
+
"$" +
|
|
102
|
+
key.replace(/[=:]/g, function (match) {
|
|
103
|
+
return escaperLookup[match];
|
|
104
|
+
})
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
108
|
+
function getElementKey(element, index) {
|
|
109
|
+
return "object" === typeof element && null !== element && null != element.key
|
|
110
|
+
? escape("" + element.key)
|
|
111
|
+
: index.toString(36);
|
|
112
|
+
}
|
|
113
|
+
function resolveThenable(thenable) {
|
|
114
|
+
switch (thenable.status) {
|
|
115
|
+
case "fulfilled":
|
|
116
|
+
return thenable.value;
|
|
117
|
+
case "rejected":
|
|
118
|
+
throw thenable.reason;
|
|
119
|
+
default:
|
|
120
|
+
switch (
|
|
121
|
+
("string" === typeof thenable.status
|
|
122
|
+
? thenable.then(noop, noop)
|
|
123
|
+
: ((thenable.status = "pending"),
|
|
124
|
+
thenable.then(
|
|
125
|
+
function (fulfilledValue) {
|
|
126
|
+
"pending" === thenable.status &&
|
|
127
|
+
((thenable.status = "fulfilled"),
|
|
128
|
+
(thenable.value = fulfilledValue));
|
|
129
|
+
},
|
|
130
|
+
function (error) {
|
|
131
|
+
"pending" === thenable.status &&
|
|
132
|
+
((thenable.status = "rejected"), (thenable.reason = error));
|
|
133
|
+
}
|
|
134
|
+
)),
|
|
135
|
+
thenable.status)
|
|
136
|
+
) {
|
|
137
|
+
case "fulfilled":
|
|
138
|
+
return thenable.value;
|
|
139
|
+
case "rejected":
|
|
140
|
+
throw thenable.reason;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
throw thenable;
|
|
144
|
+
}
|
|
145
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
146
|
+
var type = typeof children;
|
|
147
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
148
|
+
var invokeCallback = false;
|
|
149
|
+
if (null === children) invokeCallback = true;
|
|
150
|
+
else
|
|
151
|
+
switch (type) {
|
|
152
|
+
case "bigint":
|
|
153
|
+
case "string":
|
|
154
|
+
case "number":
|
|
155
|
+
invokeCallback = true;
|
|
156
|
+
break;
|
|
157
|
+
case "object":
|
|
158
|
+
switch (children.$$typeof) {
|
|
159
|
+
case REACT_ELEMENT_TYPE:
|
|
160
|
+
case REACT_PORTAL_TYPE:
|
|
161
|
+
invokeCallback = true;
|
|
162
|
+
break;
|
|
163
|
+
case REACT_LAZY_TYPE:
|
|
164
|
+
return (
|
|
165
|
+
(invokeCallback = children._init),
|
|
166
|
+
mapIntoArray(
|
|
167
|
+
invokeCallback(children._payload),
|
|
168
|
+
array,
|
|
169
|
+
escapedPrefix,
|
|
170
|
+
nameSoFar,
|
|
171
|
+
callback
|
|
172
|
+
)
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (invokeCallback)
|
|
177
|
+
return (
|
|
178
|
+
(callback = callback(children)),
|
|
179
|
+
(invokeCallback =
|
|
180
|
+
"" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
|
|
181
|
+
isArrayImpl(callback)
|
|
182
|
+
? ((escapedPrefix = ""),
|
|
183
|
+
null != invokeCallback &&
|
|
184
|
+
(escapedPrefix =
|
|
185
|
+
invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
|
|
186
|
+
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
|
|
187
|
+
return c;
|
|
188
|
+
}))
|
|
189
|
+
: null != callback &&
|
|
190
|
+
(isValidElement(callback) &&
|
|
191
|
+
(callback = cloneAndReplaceKey(
|
|
192
|
+
callback,
|
|
193
|
+
escapedPrefix +
|
|
194
|
+
(null == callback.key ||
|
|
195
|
+
(children && children.key === callback.key)
|
|
196
|
+
? ""
|
|
197
|
+
: ("" + callback.key).replace(
|
|
198
|
+
userProvidedKeyEscapeRegex,
|
|
199
|
+
"$&/"
|
|
200
|
+
) + "/") +
|
|
201
|
+
invokeCallback
|
|
202
|
+
)),
|
|
203
|
+
array.push(callback)),
|
|
204
|
+
1
|
|
205
|
+
);
|
|
206
|
+
invokeCallback = 0;
|
|
207
|
+
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
208
|
+
if (isArrayImpl(children))
|
|
209
|
+
for (var i = 0; i < children.length; i++)
|
|
210
|
+
(nameSoFar = children[i]),
|
|
211
|
+
(type = nextNamePrefix + getElementKey(nameSoFar, i)),
|
|
212
|
+
(invokeCallback += mapIntoArray(
|
|
213
|
+
nameSoFar,
|
|
214
|
+
array,
|
|
215
|
+
escapedPrefix,
|
|
216
|
+
type,
|
|
217
|
+
callback
|
|
218
|
+
));
|
|
219
|
+
else if (((i = getIteratorFn(children)), "function" === typeof i))
|
|
220
|
+
for (
|
|
221
|
+
children = i.call(children), i = 0;
|
|
222
|
+
!(nameSoFar = children.next()).done;
|
|
223
|
+
|
|
224
|
+
)
|
|
225
|
+
(nameSoFar = nameSoFar.value),
|
|
226
|
+
(type = nextNamePrefix + getElementKey(nameSoFar, i++)),
|
|
227
|
+
(invokeCallback += mapIntoArray(
|
|
228
|
+
nameSoFar,
|
|
229
|
+
array,
|
|
230
|
+
escapedPrefix,
|
|
231
|
+
type,
|
|
232
|
+
callback
|
|
233
|
+
));
|
|
234
|
+
else if ("object" === type) {
|
|
235
|
+
if ("function" === typeof children.then)
|
|
236
|
+
return mapIntoArray(
|
|
237
|
+
resolveThenable(children),
|
|
238
|
+
array,
|
|
239
|
+
escapedPrefix,
|
|
240
|
+
nameSoFar,
|
|
241
|
+
callback
|
|
242
|
+
);
|
|
243
|
+
array = String(children);
|
|
244
|
+
throw Error(
|
|
245
|
+
"Objects are not valid as a React child (found: " +
|
|
246
|
+
("[object Object]" === array
|
|
247
|
+
? "object with keys {" + Object.keys(children).join(", ") + "}"
|
|
248
|
+
: array) +
|
|
249
|
+
"). If you meant to render a collection of children, use an array instead."
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
return invokeCallback;
|
|
253
|
+
}
|
|
254
|
+
function mapChildren(children, func, context) {
|
|
255
|
+
if (null == children) return children;
|
|
256
|
+
var result = [],
|
|
257
|
+
count = 0;
|
|
258
|
+
mapIntoArray(children, result, "", "", function (child) {
|
|
259
|
+
return func.call(context, child, count++);
|
|
260
|
+
});
|
|
261
|
+
return result;
|
|
262
|
+
}
|
|
263
|
+
function lazyInitializer(payload) {
|
|
264
|
+
if (-1 === payload._status) {
|
|
265
|
+
var ctor = payload._result;
|
|
266
|
+
ctor = ctor();
|
|
267
|
+
ctor.then(
|
|
268
|
+
function (moduleObject) {
|
|
269
|
+
if (0 === payload._status || -1 === payload._status)
|
|
270
|
+
(payload._status = 1), (payload._result = moduleObject);
|
|
271
|
+
},
|
|
272
|
+
function (error) {
|
|
273
|
+
if (0 === payload._status || -1 === payload._status)
|
|
274
|
+
(payload._status = 2), (payload._result = error);
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
-1 === payload._status && ((payload._status = 0), (payload._result = ctor));
|
|
278
|
+
}
|
|
279
|
+
if (1 === payload._status) return payload._result.default;
|
|
280
|
+
throw payload._result;
|
|
281
|
+
}
|
|
282
|
+
var reportGlobalError =
|
|
283
|
+
"function" === typeof reportError
|
|
284
|
+
? reportError
|
|
285
|
+
: function (error) {
|
|
286
|
+
if (
|
|
287
|
+
"object" === typeof window &&
|
|
288
|
+
"function" === typeof window.ErrorEvent
|
|
289
|
+
) {
|
|
290
|
+
var event = new window.ErrorEvent("error", {
|
|
291
|
+
bubbles: true,
|
|
292
|
+
cancelable: true,
|
|
293
|
+
message:
|
|
294
|
+
"object" === typeof error &&
|
|
295
|
+
null !== error &&
|
|
296
|
+
"string" === typeof error.message
|
|
297
|
+
? String(error.message)
|
|
298
|
+
: String(error),
|
|
299
|
+
error: error
|
|
300
|
+
});
|
|
301
|
+
if (!window.dispatchEvent(event)) return;
|
|
302
|
+
} else if (
|
|
303
|
+
"object" === typeof process &&
|
|
304
|
+
"function" === typeof process.emit
|
|
305
|
+
) {
|
|
306
|
+
process.emit("uncaughtException", error);
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
console.error(error);
|
|
310
|
+
},
|
|
311
|
+
Children = {
|
|
312
|
+
map: mapChildren,
|
|
313
|
+
forEach: function (children, forEachFunc, forEachContext) {
|
|
314
|
+
mapChildren(
|
|
315
|
+
children,
|
|
316
|
+
function () {
|
|
317
|
+
forEachFunc.apply(this, arguments);
|
|
318
|
+
},
|
|
319
|
+
forEachContext
|
|
320
|
+
);
|
|
321
|
+
},
|
|
322
|
+
count: function (children) {
|
|
323
|
+
var n = 0;
|
|
324
|
+
mapChildren(children, function () {
|
|
325
|
+
n++;
|
|
326
|
+
});
|
|
327
|
+
return n;
|
|
328
|
+
},
|
|
329
|
+
toArray: function (children) {
|
|
330
|
+
return (
|
|
331
|
+
mapChildren(children, function (child) {
|
|
332
|
+
return child;
|
|
333
|
+
}) || []
|
|
334
|
+
);
|
|
335
|
+
},
|
|
336
|
+
only: function (children) {
|
|
337
|
+
if (!isValidElement(children))
|
|
338
|
+
throw Error(
|
|
339
|
+
"React.Children.only expected to receive a single React element child."
|
|
340
|
+
);
|
|
341
|
+
return children;
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
react_production.Activity = REACT_ACTIVITY_TYPE;
|
|
345
|
+
react_production.Children = Children;
|
|
346
|
+
react_production.Component = Component;
|
|
347
|
+
react_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
348
|
+
react_production.Profiler = REACT_PROFILER_TYPE;
|
|
349
|
+
react_production.PureComponent = PureComponent;
|
|
350
|
+
react_production.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
351
|
+
react_production.Suspense = REACT_SUSPENSE_TYPE;
|
|
352
|
+
react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
|
353
|
+
ReactSharedInternals;
|
|
354
|
+
react_production.__COMPILER_RUNTIME = {
|
|
355
|
+
__proto__: null,
|
|
356
|
+
c: function (size) {
|
|
357
|
+
return ReactSharedInternals.H.useMemoCache(size);
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
react_production.cache = function (fn) {
|
|
361
|
+
return function () {
|
|
362
|
+
return fn.apply(null, arguments);
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
react_production.cacheSignal = function () {
|
|
366
|
+
return null;
|
|
367
|
+
};
|
|
368
|
+
react_production.cloneElement = function (element, config, children) {
|
|
369
|
+
if (null === element || void 0 === element)
|
|
370
|
+
throw Error(
|
|
371
|
+
"The argument must be a React element, but you passed " + element + "."
|
|
372
|
+
);
|
|
373
|
+
var props = assign({}, element.props),
|
|
374
|
+
key = element.key;
|
|
375
|
+
if (null != config)
|
|
376
|
+
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
|
|
377
|
+
!hasOwnProperty.call(config, propName) ||
|
|
378
|
+
"key" === propName ||
|
|
379
|
+
"__self" === propName ||
|
|
380
|
+
"__source" === propName ||
|
|
381
|
+
("ref" === propName && void 0 === config.ref) ||
|
|
382
|
+
(props[propName] = config[propName]);
|
|
383
|
+
var propName = arguments.length - 2;
|
|
384
|
+
if (1 === propName) props.children = children;
|
|
385
|
+
else if (1 < propName) {
|
|
386
|
+
for (var childArray = Array(propName), i = 0; i < propName; i++)
|
|
387
|
+
childArray[i] = arguments[i + 2];
|
|
388
|
+
props.children = childArray;
|
|
389
|
+
}
|
|
390
|
+
return ReactElement(element.type, key, props);
|
|
391
|
+
};
|
|
392
|
+
react_production.createContext = function (defaultValue) {
|
|
393
|
+
defaultValue = {
|
|
394
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
395
|
+
_currentValue: defaultValue,
|
|
396
|
+
_currentValue2: defaultValue,
|
|
397
|
+
_threadCount: 0,
|
|
398
|
+
Provider: null,
|
|
399
|
+
Consumer: null
|
|
400
|
+
};
|
|
401
|
+
defaultValue.Provider = defaultValue;
|
|
402
|
+
defaultValue.Consumer = {
|
|
403
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
404
|
+
_context: defaultValue
|
|
405
|
+
};
|
|
406
|
+
return defaultValue;
|
|
407
|
+
};
|
|
408
|
+
react_production.createElement = function (type, config, children) {
|
|
409
|
+
var propName,
|
|
410
|
+
props = {},
|
|
411
|
+
key = null;
|
|
412
|
+
if (null != config)
|
|
413
|
+
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
|
|
414
|
+
hasOwnProperty.call(config, propName) &&
|
|
415
|
+
"key" !== propName &&
|
|
416
|
+
"__self" !== propName &&
|
|
417
|
+
"__source" !== propName &&
|
|
418
|
+
(props[propName] = config[propName]);
|
|
419
|
+
var childrenLength = arguments.length - 2;
|
|
420
|
+
if (1 === childrenLength) props.children = children;
|
|
421
|
+
else if (1 < childrenLength) {
|
|
422
|
+
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
|
|
423
|
+
childArray[i] = arguments[i + 2];
|
|
424
|
+
props.children = childArray;
|
|
425
|
+
}
|
|
426
|
+
if (type && type.defaultProps)
|
|
427
|
+
for (propName in ((childrenLength = type.defaultProps), childrenLength))
|
|
428
|
+
void 0 === props[propName] &&
|
|
429
|
+
(props[propName] = childrenLength[propName]);
|
|
430
|
+
return ReactElement(type, key, props);
|
|
431
|
+
};
|
|
432
|
+
react_production.createRef = function () {
|
|
433
|
+
return { current: null };
|
|
434
|
+
};
|
|
435
|
+
react_production.forwardRef = function (render) {
|
|
436
|
+
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
|
|
437
|
+
};
|
|
438
|
+
react_production.isValidElement = isValidElement;
|
|
439
|
+
react_production.lazy = function (ctor) {
|
|
440
|
+
return {
|
|
441
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
442
|
+
_payload: { _status: -1, _result: ctor },
|
|
443
|
+
_init: lazyInitializer
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
react_production.memo = function (type, compare) {
|
|
447
|
+
return {
|
|
448
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
449
|
+
type: type,
|
|
450
|
+
compare: void 0 === compare ? null : compare
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
react_production.startTransition = function (scope) {
|
|
454
|
+
var prevTransition = ReactSharedInternals.T,
|
|
455
|
+
currentTransition = {};
|
|
456
|
+
ReactSharedInternals.T = currentTransition;
|
|
457
|
+
try {
|
|
458
|
+
var returnValue = scope(),
|
|
459
|
+
onStartTransitionFinish = ReactSharedInternals.S;
|
|
460
|
+
null !== onStartTransitionFinish &&
|
|
461
|
+
onStartTransitionFinish(currentTransition, returnValue);
|
|
462
|
+
"object" === typeof returnValue &&
|
|
463
|
+
null !== returnValue &&
|
|
464
|
+
"function" === typeof returnValue.then &&
|
|
465
|
+
returnValue.then(noop, reportGlobalError);
|
|
466
|
+
} catch (error) {
|
|
467
|
+
reportGlobalError(error);
|
|
468
|
+
} finally {
|
|
469
|
+
null !== prevTransition &&
|
|
470
|
+
null !== currentTransition.types &&
|
|
471
|
+
(prevTransition.types = currentTransition.types),
|
|
472
|
+
(ReactSharedInternals.T = prevTransition);
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
react_production.unstable_useCacheRefresh = function () {
|
|
476
|
+
return ReactSharedInternals.H.useCacheRefresh();
|
|
477
|
+
};
|
|
478
|
+
react_production.use = function (usable) {
|
|
479
|
+
return ReactSharedInternals.H.use(usable);
|
|
480
|
+
};
|
|
481
|
+
react_production.useActionState = function (action, initialState, permalink) {
|
|
482
|
+
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
|
|
483
|
+
};
|
|
484
|
+
react_production.useCallback = function (callback, deps) {
|
|
485
|
+
return ReactSharedInternals.H.useCallback(callback, deps);
|
|
486
|
+
};
|
|
487
|
+
react_production.useContext = function (Context) {
|
|
488
|
+
return ReactSharedInternals.H.useContext(Context);
|
|
489
|
+
};
|
|
490
|
+
react_production.useDebugValue = function () {};
|
|
491
|
+
react_production.useDeferredValue = function (value, initialValue) {
|
|
492
|
+
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
|
|
493
|
+
};
|
|
494
|
+
react_production.useEffect = function (create, deps) {
|
|
495
|
+
return ReactSharedInternals.H.useEffect(create, deps);
|
|
496
|
+
};
|
|
497
|
+
react_production.useEffectEvent = function (callback) {
|
|
498
|
+
return ReactSharedInternals.H.useEffectEvent(callback);
|
|
499
|
+
};
|
|
500
|
+
react_production.useId = function () {
|
|
501
|
+
return ReactSharedInternals.H.useId();
|
|
502
|
+
};
|
|
503
|
+
react_production.useImperativeHandle = function (ref, create, deps) {
|
|
504
|
+
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
|
|
505
|
+
};
|
|
506
|
+
react_production.useInsertionEffect = function (create, deps) {
|
|
507
|
+
return ReactSharedInternals.H.useInsertionEffect(create, deps);
|
|
508
|
+
};
|
|
509
|
+
react_production.useLayoutEffect = function (create, deps) {
|
|
510
|
+
return ReactSharedInternals.H.useLayoutEffect(create, deps);
|
|
511
|
+
};
|
|
512
|
+
react_production.useMemo = function (create, deps) {
|
|
513
|
+
return ReactSharedInternals.H.useMemo(create, deps);
|
|
514
|
+
};
|
|
515
|
+
react_production.useOptimistic = function (passthrough, reducer) {
|
|
516
|
+
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
|
|
517
|
+
};
|
|
518
|
+
react_production.useReducer = function (reducer, initialArg, init) {
|
|
519
|
+
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
|
|
520
|
+
};
|
|
521
|
+
react_production.useRef = function (initialValue) {
|
|
522
|
+
return ReactSharedInternals.H.useRef(initialValue);
|
|
523
|
+
};
|
|
524
|
+
react_production.useState = function (initialState) {
|
|
525
|
+
return ReactSharedInternals.H.useState(initialState);
|
|
526
|
+
};
|
|
527
|
+
react_production.useSyncExternalStore = function (
|
|
528
|
+
subscribe,
|
|
529
|
+
getSnapshot,
|
|
530
|
+
getServerSnapshot
|
|
531
|
+
) {
|
|
532
|
+
return ReactSharedInternals.H.useSyncExternalStore(
|
|
533
|
+
subscribe,
|
|
534
|
+
getSnapshot,
|
|
535
|
+
getServerSnapshot
|
|
536
|
+
);
|
|
537
|
+
};
|
|
538
|
+
react_production.useTransition = function () {
|
|
539
|
+
return ReactSharedInternals.H.useTransition();
|
|
540
|
+
};
|
|
541
|
+
react_production.version = "19.2.3";
|
|
542
|
+
return react_production;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
var react_development = {exports: {}};
|
|
546
|
+
|
|
547
|
+
react_development.exports;
|
|
548
|
+
|
|
549
|
+
var hasRequiredReact_development;
|
|
550
|
+
|
|
551
|
+
function requireReact_development () {
|
|
552
|
+
if (hasRequiredReact_development) return react_development.exports;
|
|
553
|
+
hasRequiredReact_development = 1;
|
|
554
|
+
(function (module, exports$1) {
|
|
555
|
+
"production" !== process.env.NODE_ENV &&
|
|
556
|
+
(function () {
|
|
557
|
+
function defineDeprecationWarning(methodName, info) {
|
|
558
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
559
|
+
get: function () {
|
|
560
|
+
console.warn(
|
|
561
|
+
"%s(...) is deprecated in plain JavaScript React classes. %s",
|
|
562
|
+
info[0],
|
|
563
|
+
info[1]
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
function getIteratorFn(maybeIterable) {
|
|
569
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
570
|
+
return null;
|
|
571
|
+
maybeIterable =
|
|
572
|
+
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
|
573
|
+
maybeIterable["@@iterator"];
|
|
574
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
575
|
+
}
|
|
576
|
+
function warnNoop(publicInstance, callerName) {
|
|
577
|
+
publicInstance =
|
|
578
|
+
((publicInstance = publicInstance.constructor) &&
|
|
579
|
+
(publicInstance.displayName || publicInstance.name)) ||
|
|
580
|
+
"ReactClass";
|
|
581
|
+
var warningKey = publicInstance + "." + callerName;
|
|
582
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] ||
|
|
583
|
+
(console.error(
|
|
584
|
+
"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
|
|
585
|
+
callerName,
|
|
586
|
+
publicInstance
|
|
587
|
+
),
|
|
588
|
+
(didWarnStateUpdateForUnmountedComponent[warningKey] = true));
|
|
589
|
+
}
|
|
590
|
+
function Component(props, context, updater) {
|
|
591
|
+
this.props = props;
|
|
592
|
+
this.context = context;
|
|
593
|
+
this.refs = emptyObject;
|
|
594
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
595
|
+
}
|
|
596
|
+
function ComponentDummy() {}
|
|
597
|
+
function PureComponent(props, context, updater) {
|
|
598
|
+
this.props = props;
|
|
599
|
+
this.context = context;
|
|
600
|
+
this.refs = emptyObject;
|
|
601
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
602
|
+
}
|
|
603
|
+
function noop() {}
|
|
604
|
+
function testStringCoercion(value) {
|
|
605
|
+
return "" + value;
|
|
606
|
+
}
|
|
607
|
+
function checkKeyStringCoercion(value) {
|
|
608
|
+
try {
|
|
609
|
+
testStringCoercion(value);
|
|
610
|
+
var JSCompiler_inline_result = !1;
|
|
611
|
+
} catch (e) {
|
|
612
|
+
JSCompiler_inline_result = true;
|
|
613
|
+
}
|
|
614
|
+
if (JSCompiler_inline_result) {
|
|
615
|
+
JSCompiler_inline_result = console;
|
|
616
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
617
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
618
|
+
("function" === typeof Symbol &&
|
|
619
|
+
Symbol.toStringTag &&
|
|
620
|
+
value[Symbol.toStringTag]) ||
|
|
621
|
+
value.constructor.name ||
|
|
622
|
+
"Object";
|
|
623
|
+
JSCompiler_temp_const.call(
|
|
624
|
+
JSCompiler_inline_result,
|
|
625
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
626
|
+
JSCompiler_inline_result$jscomp$0
|
|
627
|
+
);
|
|
628
|
+
return testStringCoercion(value);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
function getComponentNameFromType(type) {
|
|
632
|
+
if (null == type) return null;
|
|
633
|
+
if ("function" === typeof type)
|
|
634
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
635
|
+
? null
|
|
636
|
+
: type.displayName || type.name || null;
|
|
637
|
+
if ("string" === typeof type) return type;
|
|
638
|
+
switch (type) {
|
|
639
|
+
case REACT_FRAGMENT_TYPE:
|
|
640
|
+
return "Fragment";
|
|
641
|
+
case REACT_PROFILER_TYPE:
|
|
642
|
+
return "Profiler";
|
|
643
|
+
case REACT_STRICT_MODE_TYPE:
|
|
644
|
+
return "StrictMode";
|
|
645
|
+
case REACT_SUSPENSE_TYPE:
|
|
646
|
+
return "Suspense";
|
|
647
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
648
|
+
return "SuspenseList";
|
|
649
|
+
case REACT_ACTIVITY_TYPE:
|
|
650
|
+
return "Activity";
|
|
651
|
+
}
|
|
652
|
+
if ("object" === typeof type)
|
|
653
|
+
switch (
|
|
654
|
+
("number" === typeof type.tag &&
|
|
655
|
+
console.error(
|
|
656
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
657
|
+
),
|
|
658
|
+
type.$$typeof)
|
|
659
|
+
) {
|
|
660
|
+
case REACT_PORTAL_TYPE:
|
|
661
|
+
return "Portal";
|
|
662
|
+
case REACT_CONTEXT_TYPE:
|
|
663
|
+
return type.displayName || "Context";
|
|
664
|
+
case REACT_CONSUMER_TYPE:
|
|
665
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
666
|
+
case REACT_FORWARD_REF_TYPE:
|
|
667
|
+
var innerType = type.render;
|
|
668
|
+
type = type.displayName;
|
|
669
|
+
type ||
|
|
670
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
671
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
672
|
+
return type;
|
|
673
|
+
case REACT_MEMO_TYPE:
|
|
674
|
+
return (
|
|
675
|
+
(innerType = type.displayName || null),
|
|
676
|
+
null !== innerType
|
|
677
|
+
? innerType
|
|
678
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
679
|
+
);
|
|
680
|
+
case REACT_LAZY_TYPE:
|
|
681
|
+
innerType = type._payload;
|
|
682
|
+
type = type._init;
|
|
683
|
+
try {
|
|
684
|
+
return getComponentNameFromType(type(innerType));
|
|
685
|
+
} catch (x) {}
|
|
686
|
+
}
|
|
687
|
+
return null;
|
|
688
|
+
}
|
|
689
|
+
function getTaskName(type) {
|
|
690
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
691
|
+
if (
|
|
692
|
+
"object" === typeof type &&
|
|
693
|
+
null !== type &&
|
|
694
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
695
|
+
)
|
|
696
|
+
return "<...>";
|
|
697
|
+
try {
|
|
698
|
+
var name = getComponentNameFromType(type);
|
|
699
|
+
return name ? "<" + name + ">" : "<...>";
|
|
700
|
+
} catch (x) {
|
|
701
|
+
return "<...>";
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
function getOwner() {
|
|
705
|
+
var dispatcher = ReactSharedInternals.A;
|
|
706
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
707
|
+
}
|
|
708
|
+
function UnknownOwner() {
|
|
709
|
+
return Error("react-stack-top-frame");
|
|
710
|
+
}
|
|
711
|
+
function hasValidKey(config) {
|
|
712
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
713
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
714
|
+
if (getter && getter.isReactWarning) return false;
|
|
715
|
+
}
|
|
716
|
+
return void 0 !== config.key;
|
|
717
|
+
}
|
|
718
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
719
|
+
function warnAboutAccessingKey() {
|
|
720
|
+
specialPropKeyWarningShown ||
|
|
721
|
+
((specialPropKeyWarningShown = true),
|
|
722
|
+
console.error(
|
|
723
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
724
|
+
displayName
|
|
725
|
+
));
|
|
726
|
+
}
|
|
727
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
728
|
+
Object.defineProperty(props, "key", {
|
|
729
|
+
get: warnAboutAccessingKey,
|
|
730
|
+
configurable: true
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
734
|
+
var componentName = getComponentNameFromType(this.type);
|
|
735
|
+
didWarnAboutElementRef[componentName] ||
|
|
736
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
737
|
+
console.error(
|
|
738
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
739
|
+
));
|
|
740
|
+
componentName = this.props.ref;
|
|
741
|
+
return void 0 !== componentName ? componentName : null;
|
|
742
|
+
}
|
|
743
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
744
|
+
var refProp = props.ref;
|
|
745
|
+
type = {
|
|
746
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
747
|
+
type: type,
|
|
748
|
+
key: key,
|
|
749
|
+
props: props,
|
|
750
|
+
_owner: owner
|
|
751
|
+
};
|
|
752
|
+
null !== (void 0 !== refProp ? refProp : null)
|
|
753
|
+
? Object.defineProperty(type, "ref", {
|
|
754
|
+
enumerable: false,
|
|
755
|
+
get: elementRefGetterWithDeprecationWarning
|
|
756
|
+
})
|
|
757
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
758
|
+
type._store = {};
|
|
759
|
+
Object.defineProperty(type._store, "validated", {
|
|
760
|
+
configurable: false,
|
|
761
|
+
enumerable: false,
|
|
762
|
+
writable: true,
|
|
763
|
+
value: 0
|
|
764
|
+
});
|
|
765
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
766
|
+
configurable: false,
|
|
767
|
+
enumerable: false,
|
|
768
|
+
writable: true,
|
|
769
|
+
value: null
|
|
770
|
+
});
|
|
771
|
+
Object.defineProperty(type, "_debugStack", {
|
|
772
|
+
configurable: false,
|
|
773
|
+
enumerable: false,
|
|
774
|
+
writable: true,
|
|
775
|
+
value: debugStack
|
|
776
|
+
});
|
|
777
|
+
Object.defineProperty(type, "_debugTask", {
|
|
778
|
+
configurable: false,
|
|
779
|
+
enumerable: false,
|
|
780
|
+
writable: true,
|
|
781
|
+
value: debugTask
|
|
782
|
+
});
|
|
783
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
784
|
+
return type;
|
|
785
|
+
}
|
|
786
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
787
|
+
newKey = ReactElement(
|
|
788
|
+
oldElement.type,
|
|
789
|
+
newKey,
|
|
790
|
+
oldElement.props,
|
|
791
|
+
oldElement._owner,
|
|
792
|
+
oldElement._debugStack,
|
|
793
|
+
oldElement._debugTask
|
|
794
|
+
);
|
|
795
|
+
oldElement._store &&
|
|
796
|
+
(newKey._store.validated = oldElement._store.validated);
|
|
797
|
+
return newKey;
|
|
798
|
+
}
|
|
799
|
+
function validateChildKeys(node) {
|
|
800
|
+
isValidElement(node)
|
|
801
|
+
? node._store && (node._store.validated = 1)
|
|
802
|
+
: "object" === typeof node &&
|
|
803
|
+
null !== node &&
|
|
804
|
+
node.$$typeof === REACT_LAZY_TYPE &&
|
|
805
|
+
("fulfilled" === node._payload.status
|
|
806
|
+
? isValidElement(node._payload.value) &&
|
|
807
|
+
node._payload.value._store &&
|
|
808
|
+
(node._payload.value._store.validated = 1)
|
|
809
|
+
: node._store && (node._store.validated = 1));
|
|
810
|
+
}
|
|
811
|
+
function isValidElement(object) {
|
|
812
|
+
return (
|
|
813
|
+
"object" === typeof object &&
|
|
814
|
+
null !== object &&
|
|
815
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
816
|
+
);
|
|
817
|
+
}
|
|
818
|
+
function escape(key) {
|
|
819
|
+
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
820
|
+
return (
|
|
821
|
+
"$" +
|
|
822
|
+
key.replace(/[=:]/g, function (match) {
|
|
823
|
+
return escaperLookup[match];
|
|
824
|
+
})
|
|
825
|
+
);
|
|
826
|
+
}
|
|
827
|
+
function getElementKey(element, index) {
|
|
828
|
+
return "object" === typeof element &&
|
|
829
|
+
null !== element &&
|
|
830
|
+
null != element.key
|
|
831
|
+
? (checkKeyStringCoercion(element.key), escape("" + element.key))
|
|
832
|
+
: index.toString(36);
|
|
833
|
+
}
|
|
834
|
+
function resolveThenable(thenable) {
|
|
835
|
+
switch (thenable.status) {
|
|
836
|
+
case "fulfilled":
|
|
837
|
+
return thenable.value;
|
|
838
|
+
case "rejected":
|
|
839
|
+
throw thenable.reason;
|
|
840
|
+
default:
|
|
841
|
+
switch (
|
|
842
|
+
("string" === typeof thenable.status
|
|
843
|
+
? thenable.then(noop, noop)
|
|
844
|
+
: ((thenable.status = "pending"),
|
|
845
|
+
thenable.then(
|
|
846
|
+
function (fulfilledValue) {
|
|
847
|
+
"pending" === thenable.status &&
|
|
848
|
+
((thenable.status = "fulfilled"),
|
|
849
|
+
(thenable.value = fulfilledValue));
|
|
850
|
+
},
|
|
851
|
+
function (error) {
|
|
852
|
+
"pending" === thenable.status &&
|
|
853
|
+
((thenable.status = "rejected"),
|
|
854
|
+
(thenable.reason = error));
|
|
855
|
+
}
|
|
856
|
+
)),
|
|
857
|
+
thenable.status)
|
|
858
|
+
) {
|
|
859
|
+
case "fulfilled":
|
|
860
|
+
return thenable.value;
|
|
861
|
+
case "rejected":
|
|
862
|
+
throw thenable.reason;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
throw thenable;
|
|
866
|
+
}
|
|
867
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
868
|
+
var type = typeof children;
|
|
869
|
+
if ("undefined" === type || "boolean" === type) children = null;
|
|
870
|
+
var invokeCallback = false;
|
|
871
|
+
if (null === children) invokeCallback = true;
|
|
872
|
+
else
|
|
873
|
+
switch (type) {
|
|
874
|
+
case "bigint":
|
|
875
|
+
case "string":
|
|
876
|
+
case "number":
|
|
877
|
+
invokeCallback = true;
|
|
878
|
+
break;
|
|
879
|
+
case "object":
|
|
880
|
+
switch (children.$$typeof) {
|
|
881
|
+
case REACT_ELEMENT_TYPE:
|
|
882
|
+
case REACT_PORTAL_TYPE:
|
|
883
|
+
invokeCallback = true;
|
|
884
|
+
break;
|
|
885
|
+
case REACT_LAZY_TYPE:
|
|
886
|
+
return (
|
|
887
|
+
(invokeCallback = children._init),
|
|
888
|
+
mapIntoArray(
|
|
889
|
+
invokeCallback(children._payload),
|
|
890
|
+
array,
|
|
891
|
+
escapedPrefix,
|
|
892
|
+
nameSoFar,
|
|
893
|
+
callback
|
|
894
|
+
)
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
if (invokeCallback) {
|
|
899
|
+
invokeCallback = children;
|
|
900
|
+
callback = callback(invokeCallback);
|
|
901
|
+
var childKey =
|
|
902
|
+
"" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
903
|
+
isArrayImpl(callback)
|
|
904
|
+
? ((escapedPrefix = ""),
|
|
905
|
+
null != childKey &&
|
|
906
|
+
(escapedPrefix =
|
|
907
|
+
childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
|
|
908
|
+
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
|
|
909
|
+
return c;
|
|
910
|
+
}))
|
|
911
|
+
: null != callback &&
|
|
912
|
+
(isValidElement(callback) &&
|
|
913
|
+
(null != callback.key &&
|
|
914
|
+
((invokeCallback && invokeCallback.key === callback.key) ||
|
|
915
|
+
checkKeyStringCoercion(callback.key)),
|
|
916
|
+
(escapedPrefix = cloneAndReplaceKey(
|
|
917
|
+
callback,
|
|
918
|
+
escapedPrefix +
|
|
919
|
+
(null == callback.key ||
|
|
920
|
+
(invokeCallback && invokeCallback.key === callback.key)
|
|
921
|
+
? ""
|
|
922
|
+
: ("" + callback.key).replace(
|
|
923
|
+
userProvidedKeyEscapeRegex,
|
|
924
|
+
"$&/"
|
|
925
|
+
) + "/") +
|
|
926
|
+
childKey
|
|
927
|
+
)),
|
|
928
|
+
"" !== nameSoFar &&
|
|
929
|
+
null != invokeCallback &&
|
|
930
|
+
isValidElement(invokeCallback) &&
|
|
931
|
+
null == invokeCallback.key &&
|
|
932
|
+
invokeCallback._store &&
|
|
933
|
+
!invokeCallback._store.validated &&
|
|
934
|
+
(escapedPrefix._store.validated = 2),
|
|
935
|
+
(callback = escapedPrefix)),
|
|
936
|
+
array.push(callback));
|
|
937
|
+
return 1;
|
|
938
|
+
}
|
|
939
|
+
invokeCallback = 0;
|
|
940
|
+
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
941
|
+
if (isArrayImpl(children))
|
|
942
|
+
for (var i = 0; i < children.length; i++)
|
|
943
|
+
(nameSoFar = children[i]),
|
|
944
|
+
(type = childKey + getElementKey(nameSoFar, i)),
|
|
945
|
+
(invokeCallback += mapIntoArray(
|
|
946
|
+
nameSoFar,
|
|
947
|
+
array,
|
|
948
|
+
escapedPrefix,
|
|
949
|
+
type,
|
|
950
|
+
callback
|
|
951
|
+
));
|
|
952
|
+
else if (((i = getIteratorFn(children)), "function" === typeof i))
|
|
953
|
+
for (
|
|
954
|
+
i === children.entries &&
|
|
955
|
+
(didWarnAboutMaps ||
|
|
956
|
+
console.warn(
|
|
957
|
+
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
958
|
+
),
|
|
959
|
+
(didWarnAboutMaps = true)),
|
|
960
|
+
children = i.call(children),
|
|
961
|
+
i = 0;
|
|
962
|
+
!(nameSoFar = children.next()).done;
|
|
963
|
+
|
|
964
|
+
)
|
|
965
|
+
(nameSoFar = nameSoFar.value),
|
|
966
|
+
(type = childKey + getElementKey(nameSoFar, i++)),
|
|
967
|
+
(invokeCallback += mapIntoArray(
|
|
968
|
+
nameSoFar,
|
|
969
|
+
array,
|
|
970
|
+
escapedPrefix,
|
|
971
|
+
type,
|
|
972
|
+
callback
|
|
973
|
+
));
|
|
974
|
+
else if ("object" === type) {
|
|
975
|
+
if ("function" === typeof children.then)
|
|
976
|
+
return mapIntoArray(
|
|
977
|
+
resolveThenable(children),
|
|
978
|
+
array,
|
|
979
|
+
escapedPrefix,
|
|
980
|
+
nameSoFar,
|
|
981
|
+
callback
|
|
982
|
+
);
|
|
983
|
+
array = String(children);
|
|
984
|
+
throw Error(
|
|
985
|
+
"Objects are not valid as a React child (found: " +
|
|
986
|
+
("[object Object]" === array
|
|
987
|
+
? "object with keys {" + Object.keys(children).join(", ") + "}"
|
|
988
|
+
: array) +
|
|
989
|
+
"). If you meant to render a collection of children, use an array instead."
|
|
990
|
+
);
|
|
991
|
+
}
|
|
992
|
+
return invokeCallback;
|
|
993
|
+
}
|
|
994
|
+
function mapChildren(children, func, context) {
|
|
995
|
+
if (null == children) return children;
|
|
996
|
+
var result = [],
|
|
997
|
+
count = 0;
|
|
998
|
+
mapIntoArray(children, result, "", "", function (child) {
|
|
999
|
+
return func.call(context, child, count++);
|
|
1000
|
+
});
|
|
1001
|
+
return result;
|
|
1002
|
+
}
|
|
1003
|
+
function lazyInitializer(payload) {
|
|
1004
|
+
if (-1 === payload._status) {
|
|
1005
|
+
var ioInfo = payload._ioInfo;
|
|
1006
|
+
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
|
|
1007
|
+
ioInfo = payload._result;
|
|
1008
|
+
var thenable = ioInfo();
|
|
1009
|
+
thenable.then(
|
|
1010
|
+
function (moduleObject) {
|
|
1011
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
1012
|
+
payload._status = 1;
|
|
1013
|
+
payload._result = moduleObject;
|
|
1014
|
+
var _ioInfo = payload._ioInfo;
|
|
1015
|
+
null != _ioInfo && (_ioInfo.end = performance.now());
|
|
1016
|
+
void 0 === thenable.status &&
|
|
1017
|
+
((thenable.status = "fulfilled"),
|
|
1018
|
+
(thenable.value = moduleObject));
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
function (error) {
|
|
1022
|
+
if (0 === payload._status || -1 === payload._status) {
|
|
1023
|
+
payload._status = 2;
|
|
1024
|
+
payload._result = error;
|
|
1025
|
+
var _ioInfo2 = payload._ioInfo;
|
|
1026
|
+
null != _ioInfo2 && (_ioInfo2.end = performance.now());
|
|
1027
|
+
void 0 === thenable.status &&
|
|
1028
|
+
((thenable.status = "rejected"), (thenable.reason = error));
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
);
|
|
1032
|
+
ioInfo = payload._ioInfo;
|
|
1033
|
+
if (null != ioInfo) {
|
|
1034
|
+
ioInfo.value = thenable;
|
|
1035
|
+
var displayName = thenable.displayName;
|
|
1036
|
+
"string" === typeof displayName && (ioInfo.name = displayName);
|
|
1037
|
+
}
|
|
1038
|
+
-1 === payload._status &&
|
|
1039
|
+
((payload._status = 0), (payload._result = thenable));
|
|
1040
|
+
}
|
|
1041
|
+
if (1 === payload._status)
|
|
1042
|
+
return (
|
|
1043
|
+
(ioInfo = payload._result),
|
|
1044
|
+
void 0 === ioInfo &&
|
|
1045
|
+
console.error(
|
|
1046
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
|
|
1047
|
+
ioInfo
|
|
1048
|
+
),
|
|
1049
|
+
"default" in ioInfo ||
|
|
1050
|
+
console.error(
|
|
1051
|
+
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
1052
|
+
ioInfo
|
|
1053
|
+
),
|
|
1054
|
+
ioInfo.default
|
|
1055
|
+
);
|
|
1056
|
+
throw payload._result;
|
|
1057
|
+
}
|
|
1058
|
+
function resolveDispatcher() {
|
|
1059
|
+
var dispatcher = ReactSharedInternals.H;
|
|
1060
|
+
null === dispatcher &&
|
|
1061
|
+
console.error(
|
|
1062
|
+
"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
|
|
1063
|
+
);
|
|
1064
|
+
return dispatcher;
|
|
1065
|
+
}
|
|
1066
|
+
function releaseAsyncTransition() {
|
|
1067
|
+
ReactSharedInternals.asyncTransitions--;
|
|
1068
|
+
}
|
|
1069
|
+
function enqueueTask(task) {
|
|
1070
|
+
if (null === enqueueTaskImpl)
|
|
1071
|
+
try {
|
|
1072
|
+
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
1073
|
+
enqueueTaskImpl = (module && module[requireString]).call(
|
|
1074
|
+
module,
|
|
1075
|
+
"timers"
|
|
1076
|
+
).setImmediate;
|
|
1077
|
+
} catch (_err) {
|
|
1078
|
+
enqueueTaskImpl = function (callback) {
|
|
1079
|
+
false === didWarnAboutMessageChannel &&
|
|
1080
|
+
((didWarnAboutMessageChannel = true),
|
|
1081
|
+
"undefined" === typeof MessageChannel &&
|
|
1082
|
+
console.error(
|
|
1083
|
+
"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
|
|
1084
|
+
));
|
|
1085
|
+
var channel = new MessageChannel();
|
|
1086
|
+
channel.port1.onmessage = callback;
|
|
1087
|
+
channel.port2.postMessage(void 0);
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
return enqueueTaskImpl(task);
|
|
1091
|
+
}
|
|
1092
|
+
function aggregateErrors(errors) {
|
|
1093
|
+
return 1 < errors.length && "function" === typeof AggregateError
|
|
1094
|
+
? new AggregateError(errors)
|
|
1095
|
+
: errors[0];
|
|
1096
|
+
}
|
|
1097
|
+
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
1098
|
+
prevActScopeDepth !== actScopeDepth - 1 &&
|
|
1099
|
+
console.error(
|
|
1100
|
+
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
1101
|
+
);
|
|
1102
|
+
actScopeDepth = prevActScopeDepth;
|
|
1103
|
+
}
|
|
1104
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
1105
|
+
var queue = ReactSharedInternals.actQueue;
|
|
1106
|
+
if (null !== queue)
|
|
1107
|
+
if (0 !== queue.length)
|
|
1108
|
+
try {
|
|
1109
|
+
flushActQueue(queue);
|
|
1110
|
+
enqueueTask(function () {
|
|
1111
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
1112
|
+
});
|
|
1113
|
+
return;
|
|
1114
|
+
} catch (error) {
|
|
1115
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
1116
|
+
}
|
|
1117
|
+
else ReactSharedInternals.actQueue = null;
|
|
1118
|
+
0 < ReactSharedInternals.thrownErrors.length
|
|
1119
|
+
? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
1120
|
+
(ReactSharedInternals.thrownErrors.length = 0),
|
|
1121
|
+
reject(queue))
|
|
1122
|
+
: resolve(returnValue);
|
|
1123
|
+
}
|
|
1124
|
+
function flushActQueue(queue) {
|
|
1125
|
+
if (!isFlushing) {
|
|
1126
|
+
isFlushing = true;
|
|
1127
|
+
var i = 0;
|
|
1128
|
+
try {
|
|
1129
|
+
for (; i < queue.length; i++) {
|
|
1130
|
+
var callback = queue[i];
|
|
1131
|
+
do {
|
|
1132
|
+
ReactSharedInternals.didUsePromise = !1;
|
|
1133
|
+
var continuation = callback(!1);
|
|
1134
|
+
if (null !== continuation) {
|
|
1135
|
+
if (ReactSharedInternals.didUsePromise) {
|
|
1136
|
+
queue[i] = callback;
|
|
1137
|
+
queue.splice(0, i);
|
|
1138
|
+
return;
|
|
1139
|
+
}
|
|
1140
|
+
callback = continuation;
|
|
1141
|
+
} else break;
|
|
1142
|
+
} while (1);
|
|
1143
|
+
}
|
|
1144
|
+
queue.length = 0;
|
|
1145
|
+
} catch (error) {
|
|
1146
|
+
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
1147
|
+
} finally {
|
|
1148
|
+
isFlushing = false;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
1153
|
+
"function" ===
|
|
1154
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
|
|
1155
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1156
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
1157
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
1158
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
1159
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
1160
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
1161
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
1162
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
1163
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
1164
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
1165
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
1166
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
1167
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
1168
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
1169
|
+
MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
|
1170
|
+
didWarnStateUpdateForUnmountedComponent = {},
|
|
1171
|
+
ReactNoopUpdateQueue = {
|
|
1172
|
+
isMounted: function () {
|
|
1173
|
+
return false;
|
|
1174
|
+
},
|
|
1175
|
+
enqueueForceUpdate: function (publicInstance) {
|
|
1176
|
+
warnNoop(publicInstance, "forceUpdate");
|
|
1177
|
+
},
|
|
1178
|
+
enqueueReplaceState: function (publicInstance) {
|
|
1179
|
+
warnNoop(publicInstance, "replaceState");
|
|
1180
|
+
},
|
|
1181
|
+
enqueueSetState: function (publicInstance) {
|
|
1182
|
+
warnNoop(publicInstance, "setState");
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
assign = Object.assign,
|
|
1186
|
+
emptyObject = {};
|
|
1187
|
+
Object.freeze(emptyObject);
|
|
1188
|
+
Component.prototype.isReactComponent = {};
|
|
1189
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
1190
|
+
if (
|
|
1191
|
+
"object" !== typeof partialState &&
|
|
1192
|
+
"function" !== typeof partialState &&
|
|
1193
|
+
null != partialState
|
|
1194
|
+
)
|
|
1195
|
+
throw Error(
|
|
1196
|
+
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
1197
|
+
);
|
|
1198
|
+
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
1199
|
+
};
|
|
1200
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
1201
|
+
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
1202
|
+
};
|
|
1203
|
+
var deprecatedAPIs = {
|
|
1204
|
+
isMounted: [
|
|
1205
|
+
"isMounted",
|
|
1206
|
+
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
1207
|
+
],
|
|
1208
|
+
replaceState: [
|
|
1209
|
+
"replaceState",
|
|
1210
|
+
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
1211
|
+
]
|
|
1212
|
+
};
|
|
1213
|
+
for (fnName in deprecatedAPIs)
|
|
1214
|
+
deprecatedAPIs.hasOwnProperty(fnName) &&
|
|
1215
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
1216
|
+
ComponentDummy.prototype = Component.prototype;
|
|
1217
|
+
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
|
|
1218
|
+
deprecatedAPIs.constructor = PureComponent;
|
|
1219
|
+
assign(deprecatedAPIs, Component.prototype);
|
|
1220
|
+
deprecatedAPIs.isPureReactComponent = true;
|
|
1221
|
+
var isArrayImpl = Array.isArray,
|
|
1222
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
1223
|
+
ReactSharedInternals = {
|
|
1224
|
+
H: null,
|
|
1225
|
+
A: null,
|
|
1226
|
+
T: null,
|
|
1227
|
+
S: null,
|
|
1228
|
+
actQueue: null,
|
|
1229
|
+
asyncTransitions: 0,
|
|
1230
|
+
isBatchingLegacy: false,
|
|
1231
|
+
didScheduleLegacyUpdate: false,
|
|
1232
|
+
didUsePromise: false,
|
|
1233
|
+
thrownErrors: [],
|
|
1234
|
+
getCurrentStack: null,
|
|
1235
|
+
recentlyCreatedOwnerStacks: 0
|
|
1236
|
+
},
|
|
1237
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
1238
|
+
createTask = console.createTask
|
|
1239
|
+
? console.createTask
|
|
1240
|
+
: function () {
|
|
1241
|
+
return null;
|
|
1242
|
+
};
|
|
1243
|
+
deprecatedAPIs = {
|
|
1244
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
1245
|
+
return callStackForError();
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
1249
|
+
var didWarnAboutElementRef = {};
|
|
1250
|
+
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
|
|
1251
|
+
deprecatedAPIs,
|
|
1252
|
+
UnknownOwner
|
|
1253
|
+
)();
|
|
1254
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
1255
|
+
var didWarnAboutMaps = false,
|
|
1256
|
+
userProvidedKeyEscapeRegex = /\/+/g,
|
|
1257
|
+
reportGlobalError =
|
|
1258
|
+
"function" === typeof reportError
|
|
1259
|
+
? reportError
|
|
1260
|
+
: function (error) {
|
|
1261
|
+
if (
|
|
1262
|
+
"object" === typeof window &&
|
|
1263
|
+
"function" === typeof window.ErrorEvent
|
|
1264
|
+
) {
|
|
1265
|
+
var event = new window.ErrorEvent("error", {
|
|
1266
|
+
bubbles: true,
|
|
1267
|
+
cancelable: true,
|
|
1268
|
+
message:
|
|
1269
|
+
"object" === typeof error &&
|
|
1270
|
+
null !== error &&
|
|
1271
|
+
"string" === typeof error.message
|
|
1272
|
+
? String(error.message)
|
|
1273
|
+
: String(error),
|
|
1274
|
+
error: error
|
|
1275
|
+
});
|
|
1276
|
+
if (!window.dispatchEvent(event)) return;
|
|
1277
|
+
} else if (
|
|
1278
|
+
"object" === typeof process &&
|
|
1279
|
+
"function" === typeof process.emit
|
|
1280
|
+
) {
|
|
1281
|
+
process.emit("uncaughtException", error);
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
console.error(error);
|
|
1285
|
+
},
|
|
1286
|
+
didWarnAboutMessageChannel = false,
|
|
1287
|
+
enqueueTaskImpl = null,
|
|
1288
|
+
actScopeDepth = 0,
|
|
1289
|
+
didWarnNoAwaitAct = false,
|
|
1290
|
+
isFlushing = false,
|
|
1291
|
+
queueSeveralMicrotasks =
|
|
1292
|
+
"function" === typeof queueMicrotask
|
|
1293
|
+
? function (callback) {
|
|
1294
|
+
queueMicrotask(function () {
|
|
1295
|
+
return queueMicrotask(callback);
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
: enqueueTask;
|
|
1299
|
+
deprecatedAPIs = Object.freeze({
|
|
1300
|
+
__proto__: null,
|
|
1301
|
+
c: function (size) {
|
|
1302
|
+
return resolveDispatcher().useMemoCache(size);
|
|
1303
|
+
}
|
|
1304
|
+
});
|
|
1305
|
+
var fnName = {
|
|
1306
|
+
map: mapChildren,
|
|
1307
|
+
forEach: function (children, forEachFunc, forEachContext) {
|
|
1308
|
+
mapChildren(
|
|
1309
|
+
children,
|
|
1310
|
+
function () {
|
|
1311
|
+
forEachFunc.apply(this, arguments);
|
|
1312
|
+
},
|
|
1313
|
+
forEachContext
|
|
1314
|
+
);
|
|
1315
|
+
},
|
|
1316
|
+
count: function (children) {
|
|
1317
|
+
var n = 0;
|
|
1318
|
+
mapChildren(children, function () {
|
|
1319
|
+
n++;
|
|
1320
|
+
});
|
|
1321
|
+
return n;
|
|
1322
|
+
},
|
|
1323
|
+
toArray: function (children) {
|
|
1324
|
+
return (
|
|
1325
|
+
mapChildren(children, function (child) {
|
|
1326
|
+
return child;
|
|
1327
|
+
}) || []
|
|
1328
|
+
);
|
|
1329
|
+
},
|
|
1330
|
+
only: function (children) {
|
|
1331
|
+
if (!isValidElement(children))
|
|
1332
|
+
throw Error(
|
|
1333
|
+
"React.Children.only expected to receive a single React element child."
|
|
1334
|
+
);
|
|
1335
|
+
return children;
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
exports$1.Activity = REACT_ACTIVITY_TYPE;
|
|
1339
|
+
exports$1.Children = fnName;
|
|
1340
|
+
exports$1.Component = Component;
|
|
1341
|
+
exports$1.Fragment = REACT_FRAGMENT_TYPE;
|
|
1342
|
+
exports$1.Profiler = REACT_PROFILER_TYPE;
|
|
1343
|
+
exports$1.PureComponent = PureComponent;
|
|
1344
|
+
exports$1.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1345
|
+
exports$1.Suspense = REACT_SUSPENSE_TYPE;
|
|
1346
|
+
exports$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
|
|
1347
|
+
ReactSharedInternals;
|
|
1348
|
+
exports$1.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
1349
|
+
exports$1.act = function (callback) {
|
|
1350
|
+
var prevActQueue = ReactSharedInternals.actQueue,
|
|
1351
|
+
prevActScopeDepth = actScopeDepth;
|
|
1352
|
+
actScopeDepth++;
|
|
1353
|
+
var queue = (ReactSharedInternals.actQueue =
|
|
1354
|
+
null !== prevActQueue ? prevActQueue : []),
|
|
1355
|
+
didAwaitActCall = false;
|
|
1356
|
+
try {
|
|
1357
|
+
var result = callback();
|
|
1358
|
+
} catch (error) {
|
|
1359
|
+
ReactSharedInternals.thrownErrors.push(error);
|
|
1360
|
+
}
|
|
1361
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1362
|
+
throw (
|
|
1363
|
+
(popActScope(prevActQueue, prevActScopeDepth),
|
|
1364
|
+
(callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
1365
|
+
(ReactSharedInternals.thrownErrors.length = 0),
|
|
1366
|
+
callback)
|
|
1367
|
+
);
|
|
1368
|
+
if (
|
|
1369
|
+
null !== result &&
|
|
1370
|
+
"object" === typeof result &&
|
|
1371
|
+
"function" === typeof result.then
|
|
1372
|
+
) {
|
|
1373
|
+
var thenable = result;
|
|
1374
|
+
queueSeveralMicrotasks(function () {
|
|
1375
|
+
didAwaitActCall ||
|
|
1376
|
+
didWarnNoAwaitAct ||
|
|
1377
|
+
((didWarnNoAwaitAct = true),
|
|
1378
|
+
console.error(
|
|
1379
|
+
"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
|
|
1380
|
+
));
|
|
1381
|
+
});
|
|
1382
|
+
return {
|
|
1383
|
+
then: function (resolve, reject) {
|
|
1384
|
+
didAwaitActCall = true;
|
|
1385
|
+
thenable.then(
|
|
1386
|
+
function (returnValue) {
|
|
1387
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1388
|
+
if (0 === prevActScopeDepth) {
|
|
1389
|
+
try {
|
|
1390
|
+
flushActQueue(queue),
|
|
1391
|
+
enqueueTask(function () {
|
|
1392
|
+
return recursivelyFlushAsyncActWork(
|
|
1393
|
+
returnValue,
|
|
1394
|
+
resolve,
|
|
1395
|
+
reject
|
|
1396
|
+
);
|
|
1397
|
+
});
|
|
1398
|
+
} catch (error$0) {
|
|
1399
|
+
ReactSharedInternals.thrownErrors.push(error$0);
|
|
1400
|
+
}
|
|
1401
|
+
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
1402
|
+
var _thrownError = aggregateErrors(
|
|
1403
|
+
ReactSharedInternals.thrownErrors
|
|
1404
|
+
);
|
|
1405
|
+
ReactSharedInternals.thrownErrors.length = 0;
|
|
1406
|
+
reject(_thrownError);
|
|
1407
|
+
}
|
|
1408
|
+
} else resolve(returnValue);
|
|
1409
|
+
},
|
|
1410
|
+
function (error) {
|
|
1411
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1412
|
+
0 < ReactSharedInternals.thrownErrors.length
|
|
1413
|
+
? ((error = aggregateErrors(
|
|
1414
|
+
ReactSharedInternals.thrownErrors
|
|
1415
|
+
)),
|
|
1416
|
+
(ReactSharedInternals.thrownErrors.length = 0),
|
|
1417
|
+
reject(error))
|
|
1418
|
+
: reject(error);
|
|
1419
|
+
}
|
|
1420
|
+
);
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
var returnValue$jscomp$0 = result;
|
|
1425
|
+
popActScope(prevActQueue, prevActScopeDepth);
|
|
1426
|
+
0 === prevActScopeDepth &&
|
|
1427
|
+
(flushActQueue(queue),
|
|
1428
|
+
0 !== queue.length &&
|
|
1429
|
+
queueSeveralMicrotasks(function () {
|
|
1430
|
+
didAwaitActCall ||
|
|
1431
|
+
didWarnNoAwaitAct ||
|
|
1432
|
+
((didWarnNoAwaitAct = true),
|
|
1433
|
+
console.error(
|
|
1434
|
+
"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
|
|
1435
|
+
));
|
|
1436
|
+
}),
|
|
1437
|
+
(ReactSharedInternals.actQueue = null));
|
|
1438
|
+
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
1439
|
+
throw (
|
|
1440
|
+
((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
|
|
1441
|
+
(ReactSharedInternals.thrownErrors.length = 0),
|
|
1442
|
+
callback)
|
|
1443
|
+
);
|
|
1444
|
+
return {
|
|
1445
|
+
then: function (resolve, reject) {
|
|
1446
|
+
didAwaitActCall = true;
|
|
1447
|
+
0 === prevActScopeDepth
|
|
1448
|
+
? ((ReactSharedInternals.actQueue = queue),
|
|
1449
|
+
enqueueTask(function () {
|
|
1450
|
+
return recursivelyFlushAsyncActWork(
|
|
1451
|
+
returnValue$jscomp$0,
|
|
1452
|
+
resolve,
|
|
1453
|
+
reject
|
|
1454
|
+
);
|
|
1455
|
+
}))
|
|
1456
|
+
: resolve(returnValue$jscomp$0);
|
|
1457
|
+
}
|
|
1458
|
+
};
|
|
1459
|
+
};
|
|
1460
|
+
exports$1.cache = function (fn) {
|
|
1461
|
+
return function () {
|
|
1462
|
+
return fn.apply(null, arguments);
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
exports$1.cacheSignal = function () {
|
|
1466
|
+
return null;
|
|
1467
|
+
};
|
|
1468
|
+
exports$1.captureOwnerStack = function () {
|
|
1469
|
+
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
1470
|
+
return null === getCurrentStack ? null : getCurrentStack();
|
|
1471
|
+
};
|
|
1472
|
+
exports$1.cloneElement = function (element, config, children) {
|
|
1473
|
+
if (null === element || void 0 === element)
|
|
1474
|
+
throw Error(
|
|
1475
|
+
"The argument must be a React element, but you passed " +
|
|
1476
|
+
element +
|
|
1477
|
+
"."
|
|
1478
|
+
);
|
|
1479
|
+
var props = assign({}, element.props),
|
|
1480
|
+
key = element.key,
|
|
1481
|
+
owner = element._owner;
|
|
1482
|
+
if (null != config) {
|
|
1483
|
+
var JSCompiler_inline_result;
|
|
1484
|
+
a: {
|
|
1485
|
+
if (
|
|
1486
|
+
hasOwnProperty.call(config, "ref") &&
|
|
1487
|
+
(JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
|
|
1488
|
+
config,
|
|
1489
|
+
"ref"
|
|
1490
|
+
).get) &&
|
|
1491
|
+
JSCompiler_inline_result.isReactWarning
|
|
1492
|
+
) {
|
|
1493
|
+
JSCompiler_inline_result = false;
|
|
1494
|
+
break a;
|
|
1495
|
+
}
|
|
1496
|
+
JSCompiler_inline_result = void 0 !== config.ref;
|
|
1497
|
+
}
|
|
1498
|
+
JSCompiler_inline_result && (owner = getOwner());
|
|
1499
|
+
hasValidKey(config) &&
|
|
1500
|
+
(checkKeyStringCoercion(config.key), (key = "" + config.key));
|
|
1501
|
+
for (propName in config)
|
|
1502
|
+
!hasOwnProperty.call(config, propName) ||
|
|
1503
|
+
"key" === propName ||
|
|
1504
|
+
"__self" === propName ||
|
|
1505
|
+
"__source" === propName ||
|
|
1506
|
+
("ref" === propName && void 0 === config.ref) ||
|
|
1507
|
+
(props[propName] = config[propName]);
|
|
1508
|
+
}
|
|
1509
|
+
var propName = arguments.length - 2;
|
|
1510
|
+
if (1 === propName) props.children = children;
|
|
1511
|
+
else if (1 < propName) {
|
|
1512
|
+
JSCompiler_inline_result = Array(propName);
|
|
1513
|
+
for (var i = 0; i < propName; i++)
|
|
1514
|
+
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
1515
|
+
props.children = JSCompiler_inline_result;
|
|
1516
|
+
}
|
|
1517
|
+
props = ReactElement(
|
|
1518
|
+
element.type,
|
|
1519
|
+
key,
|
|
1520
|
+
props,
|
|
1521
|
+
owner,
|
|
1522
|
+
element._debugStack,
|
|
1523
|
+
element._debugTask
|
|
1524
|
+
);
|
|
1525
|
+
for (key = 2; key < arguments.length; key++)
|
|
1526
|
+
validateChildKeys(arguments[key]);
|
|
1527
|
+
return props;
|
|
1528
|
+
};
|
|
1529
|
+
exports$1.createContext = function (defaultValue) {
|
|
1530
|
+
defaultValue = {
|
|
1531
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1532
|
+
_currentValue: defaultValue,
|
|
1533
|
+
_currentValue2: defaultValue,
|
|
1534
|
+
_threadCount: 0,
|
|
1535
|
+
Provider: null,
|
|
1536
|
+
Consumer: null
|
|
1537
|
+
};
|
|
1538
|
+
defaultValue.Provider = defaultValue;
|
|
1539
|
+
defaultValue.Consumer = {
|
|
1540
|
+
$$typeof: REACT_CONSUMER_TYPE,
|
|
1541
|
+
_context: defaultValue
|
|
1542
|
+
};
|
|
1543
|
+
defaultValue._currentRenderer = null;
|
|
1544
|
+
defaultValue._currentRenderer2 = null;
|
|
1545
|
+
return defaultValue;
|
|
1546
|
+
};
|
|
1547
|
+
exports$1.createElement = function (type, config, children) {
|
|
1548
|
+
for (var i = 2; i < arguments.length; i++)
|
|
1549
|
+
validateChildKeys(arguments[i]);
|
|
1550
|
+
i = {};
|
|
1551
|
+
var key = null;
|
|
1552
|
+
if (null != config)
|
|
1553
|
+
for (propName in (didWarnAboutOldJSXRuntime ||
|
|
1554
|
+
!("__self" in config) ||
|
|
1555
|
+
"key" in config ||
|
|
1556
|
+
((didWarnAboutOldJSXRuntime = true),
|
|
1557
|
+
console.warn(
|
|
1558
|
+
"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
|
|
1559
|
+
)),
|
|
1560
|
+
hasValidKey(config) &&
|
|
1561
|
+
(checkKeyStringCoercion(config.key), (key = "" + config.key)),
|
|
1562
|
+
config))
|
|
1563
|
+
hasOwnProperty.call(config, propName) &&
|
|
1564
|
+
"key" !== propName &&
|
|
1565
|
+
"__self" !== propName &&
|
|
1566
|
+
"__source" !== propName &&
|
|
1567
|
+
(i[propName] = config[propName]);
|
|
1568
|
+
var childrenLength = arguments.length - 2;
|
|
1569
|
+
if (1 === childrenLength) i.children = children;
|
|
1570
|
+
else if (1 < childrenLength) {
|
|
1571
|
+
for (
|
|
1572
|
+
var childArray = Array(childrenLength), _i = 0;
|
|
1573
|
+
_i < childrenLength;
|
|
1574
|
+
_i++
|
|
1575
|
+
)
|
|
1576
|
+
childArray[_i] = arguments[_i + 2];
|
|
1577
|
+
Object.freeze && Object.freeze(childArray);
|
|
1578
|
+
i.children = childArray;
|
|
1579
|
+
}
|
|
1580
|
+
if (type && type.defaultProps)
|
|
1581
|
+
for (propName in ((childrenLength = type.defaultProps), childrenLength))
|
|
1582
|
+
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
1583
|
+
key &&
|
|
1584
|
+
defineKeyPropWarningGetter(
|
|
1585
|
+
i,
|
|
1586
|
+
"function" === typeof type
|
|
1587
|
+
? type.displayName || type.name || "Unknown"
|
|
1588
|
+
: type
|
|
1589
|
+
);
|
|
1590
|
+
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
1591
|
+
return ReactElement(
|
|
1592
|
+
type,
|
|
1593
|
+
key,
|
|
1594
|
+
i,
|
|
1595
|
+
getOwner(),
|
|
1596
|
+
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
1597
|
+
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
1598
|
+
);
|
|
1599
|
+
};
|
|
1600
|
+
exports$1.createRef = function () {
|
|
1601
|
+
var refObject = { current: null };
|
|
1602
|
+
Object.seal(refObject);
|
|
1603
|
+
return refObject;
|
|
1604
|
+
};
|
|
1605
|
+
exports$1.forwardRef = function (render) {
|
|
1606
|
+
null != render && render.$$typeof === REACT_MEMO_TYPE
|
|
1607
|
+
? console.error(
|
|
1608
|
+
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
1609
|
+
)
|
|
1610
|
+
: "function" !== typeof render
|
|
1611
|
+
? console.error(
|
|
1612
|
+
"forwardRef requires a render function but was given %s.",
|
|
1613
|
+
null === render ? "null" : typeof render
|
|
1614
|
+
)
|
|
1615
|
+
: 0 !== render.length &&
|
|
1616
|
+
2 !== render.length &&
|
|
1617
|
+
console.error(
|
|
1618
|
+
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
1619
|
+
1 === render.length
|
|
1620
|
+
? "Did you forget to use the ref parameter?"
|
|
1621
|
+
: "Any additional parameter will be undefined."
|
|
1622
|
+
);
|
|
1623
|
+
null != render &&
|
|
1624
|
+
null != render.defaultProps &&
|
|
1625
|
+
console.error(
|
|
1626
|
+
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
1627
|
+
);
|
|
1628
|
+
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
|
|
1629
|
+
ownName;
|
|
1630
|
+
Object.defineProperty(elementType, "displayName", {
|
|
1631
|
+
enumerable: false,
|
|
1632
|
+
configurable: true,
|
|
1633
|
+
get: function () {
|
|
1634
|
+
return ownName;
|
|
1635
|
+
},
|
|
1636
|
+
set: function (name) {
|
|
1637
|
+
ownName = name;
|
|
1638
|
+
render.name ||
|
|
1639
|
+
render.displayName ||
|
|
1640
|
+
(Object.defineProperty(render, "name", { value: name }),
|
|
1641
|
+
(render.displayName = name));
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
return elementType;
|
|
1645
|
+
};
|
|
1646
|
+
exports$1.isValidElement = isValidElement;
|
|
1647
|
+
exports$1.lazy = function (ctor) {
|
|
1648
|
+
ctor = { _status: -1, _result: ctor };
|
|
1649
|
+
var lazyType = {
|
|
1650
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
1651
|
+
_payload: ctor,
|
|
1652
|
+
_init: lazyInitializer
|
|
1653
|
+
},
|
|
1654
|
+
ioInfo = {
|
|
1655
|
+
name: "lazy",
|
|
1656
|
+
start: -1,
|
|
1657
|
+
end: -1,
|
|
1658
|
+
value: null,
|
|
1659
|
+
owner: null,
|
|
1660
|
+
debugStack: Error("react-stack-top-frame"),
|
|
1661
|
+
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
1662
|
+
};
|
|
1663
|
+
ctor._ioInfo = ioInfo;
|
|
1664
|
+
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
1665
|
+
return lazyType;
|
|
1666
|
+
};
|
|
1667
|
+
exports$1.memo = function (type, compare) {
|
|
1668
|
+
null == type &&
|
|
1669
|
+
console.error(
|
|
1670
|
+
"memo: The first argument must be a component. Instead received: %s",
|
|
1671
|
+
null === type ? "null" : typeof type
|
|
1672
|
+
);
|
|
1673
|
+
compare = {
|
|
1674
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
1675
|
+
type: type,
|
|
1676
|
+
compare: void 0 === compare ? null : compare
|
|
1677
|
+
};
|
|
1678
|
+
var ownName;
|
|
1679
|
+
Object.defineProperty(compare, "displayName", {
|
|
1680
|
+
enumerable: false,
|
|
1681
|
+
configurable: true,
|
|
1682
|
+
get: function () {
|
|
1683
|
+
return ownName;
|
|
1684
|
+
},
|
|
1685
|
+
set: function (name) {
|
|
1686
|
+
ownName = name;
|
|
1687
|
+
type.name ||
|
|
1688
|
+
type.displayName ||
|
|
1689
|
+
(Object.defineProperty(type, "name", { value: name }),
|
|
1690
|
+
(type.displayName = name));
|
|
1691
|
+
}
|
|
1692
|
+
});
|
|
1693
|
+
return compare;
|
|
1694
|
+
};
|
|
1695
|
+
exports$1.startTransition = function (scope) {
|
|
1696
|
+
var prevTransition = ReactSharedInternals.T,
|
|
1697
|
+
currentTransition = {};
|
|
1698
|
+
currentTransition._updatedFibers = new Set();
|
|
1699
|
+
ReactSharedInternals.T = currentTransition;
|
|
1700
|
+
try {
|
|
1701
|
+
var returnValue = scope(),
|
|
1702
|
+
onStartTransitionFinish = ReactSharedInternals.S;
|
|
1703
|
+
null !== onStartTransitionFinish &&
|
|
1704
|
+
onStartTransitionFinish(currentTransition, returnValue);
|
|
1705
|
+
"object" === typeof returnValue &&
|
|
1706
|
+
null !== returnValue &&
|
|
1707
|
+
"function" === typeof returnValue.then &&
|
|
1708
|
+
(ReactSharedInternals.asyncTransitions++,
|
|
1709
|
+
returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
|
|
1710
|
+
returnValue.then(noop, reportGlobalError));
|
|
1711
|
+
} catch (error) {
|
|
1712
|
+
reportGlobalError(error);
|
|
1713
|
+
} finally {
|
|
1714
|
+
null === prevTransition &&
|
|
1715
|
+
currentTransition._updatedFibers &&
|
|
1716
|
+
((scope = currentTransition._updatedFibers.size),
|
|
1717
|
+
currentTransition._updatedFibers.clear(),
|
|
1718
|
+
10 < scope &&
|
|
1719
|
+
console.warn(
|
|
1720
|
+
"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."
|
|
1721
|
+
)),
|
|
1722
|
+
null !== prevTransition &&
|
|
1723
|
+
null !== currentTransition.types &&
|
|
1724
|
+
(null !== prevTransition.types &&
|
|
1725
|
+
prevTransition.types !== currentTransition.types &&
|
|
1726
|
+
console.error(
|
|
1727
|
+
"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
|
|
1728
|
+
),
|
|
1729
|
+
(prevTransition.types = currentTransition.types)),
|
|
1730
|
+
(ReactSharedInternals.T = prevTransition);
|
|
1731
|
+
}
|
|
1732
|
+
};
|
|
1733
|
+
exports$1.unstable_useCacheRefresh = function () {
|
|
1734
|
+
return resolveDispatcher().useCacheRefresh();
|
|
1735
|
+
};
|
|
1736
|
+
exports$1.use = function (usable) {
|
|
1737
|
+
return resolveDispatcher().use(usable);
|
|
1738
|
+
};
|
|
1739
|
+
exports$1.useActionState = function (action, initialState, permalink) {
|
|
1740
|
+
return resolveDispatcher().useActionState(
|
|
1741
|
+
action,
|
|
1742
|
+
initialState,
|
|
1743
|
+
permalink
|
|
1744
|
+
);
|
|
1745
|
+
};
|
|
1746
|
+
exports$1.useCallback = function (callback, deps) {
|
|
1747
|
+
return resolveDispatcher().useCallback(callback, deps);
|
|
1748
|
+
};
|
|
1749
|
+
exports$1.useContext = function (Context) {
|
|
1750
|
+
var dispatcher = resolveDispatcher();
|
|
1751
|
+
Context.$$typeof === REACT_CONSUMER_TYPE &&
|
|
1752
|
+
console.error(
|
|
1753
|
+
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
1754
|
+
);
|
|
1755
|
+
return dispatcher.useContext(Context);
|
|
1756
|
+
};
|
|
1757
|
+
exports$1.useDebugValue = function (value, formatterFn) {
|
|
1758
|
+
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
1759
|
+
};
|
|
1760
|
+
exports$1.useDeferredValue = function (value, initialValue) {
|
|
1761
|
+
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
1762
|
+
};
|
|
1763
|
+
exports$1.useEffect = function (create, deps) {
|
|
1764
|
+
null == create &&
|
|
1765
|
+
console.warn(
|
|
1766
|
+
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1767
|
+
);
|
|
1768
|
+
return resolveDispatcher().useEffect(create, deps);
|
|
1769
|
+
};
|
|
1770
|
+
exports$1.useEffectEvent = function (callback) {
|
|
1771
|
+
return resolveDispatcher().useEffectEvent(callback);
|
|
1772
|
+
};
|
|
1773
|
+
exports$1.useId = function () {
|
|
1774
|
+
return resolveDispatcher().useId();
|
|
1775
|
+
};
|
|
1776
|
+
exports$1.useImperativeHandle = function (ref, create, deps) {
|
|
1777
|
+
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
1778
|
+
};
|
|
1779
|
+
exports$1.useInsertionEffect = function (create, deps) {
|
|
1780
|
+
null == create &&
|
|
1781
|
+
console.warn(
|
|
1782
|
+
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1783
|
+
);
|
|
1784
|
+
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
1785
|
+
};
|
|
1786
|
+
exports$1.useLayoutEffect = function (create, deps) {
|
|
1787
|
+
null == create &&
|
|
1788
|
+
console.warn(
|
|
1789
|
+
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
1790
|
+
);
|
|
1791
|
+
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
1792
|
+
};
|
|
1793
|
+
exports$1.useMemo = function (create, deps) {
|
|
1794
|
+
return resolveDispatcher().useMemo(create, deps);
|
|
1795
|
+
};
|
|
1796
|
+
exports$1.useOptimistic = function (passthrough, reducer) {
|
|
1797
|
+
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
1798
|
+
};
|
|
1799
|
+
exports$1.useReducer = function (reducer, initialArg, init) {
|
|
1800
|
+
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
1801
|
+
};
|
|
1802
|
+
exports$1.useRef = function (initialValue) {
|
|
1803
|
+
return resolveDispatcher().useRef(initialValue);
|
|
1804
|
+
};
|
|
1805
|
+
exports$1.useState = function (initialState) {
|
|
1806
|
+
return resolveDispatcher().useState(initialState);
|
|
1807
|
+
};
|
|
1808
|
+
exports$1.useSyncExternalStore = function (
|
|
1809
|
+
subscribe,
|
|
1810
|
+
getSnapshot,
|
|
1811
|
+
getServerSnapshot
|
|
1812
|
+
) {
|
|
1813
|
+
return resolveDispatcher().useSyncExternalStore(
|
|
1814
|
+
subscribe,
|
|
1815
|
+
getSnapshot,
|
|
1816
|
+
getServerSnapshot
|
|
1817
|
+
);
|
|
1818
|
+
};
|
|
1819
|
+
exports$1.useTransition = function () {
|
|
1820
|
+
return resolveDispatcher().useTransition();
|
|
1821
|
+
};
|
|
1822
|
+
exports$1.version = "19.2.3";
|
|
1823
|
+
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
|
|
1824
|
+
"function" ===
|
|
1825
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
|
|
1826
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1827
|
+
})();
|
|
1828
|
+
} (react_development, react_development.exports));
|
|
1829
|
+
return react_development.exports;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
var hasRequiredReact;
|
|
1833
|
+
|
|
1834
|
+
function requireReact () {
|
|
1835
|
+
if (hasRequiredReact) return react.exports;
|
|
1836
|
+
hasRequiredReact = 1;
|
|
1837
|
+
|
|
1838
|
+
if (process.env.NODE_ENV === 'production') {
|
|
1839
|
+
react.exports = requireReact_production();
|
|
1840
|
+
} else {
|
|
1841
|
+
react.exports = requireReact_development();
|
|
1842
|
+
}
|
|
1843
|
+
return react.exports;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
var reactExports = requireReact();
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1853
|
+
var e = new Error(message);
|
|
1854
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1855
|
+
};
|
|
1856
|
+
|
|
1857
|
+
var jsxRuntime = {exports: {}};
|
|
1858
|
+
|
|
1859
|
+
var reactJsxRuntime_production = {};
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
var hasRequiredReactJsxRuntime_production;
|
|
1863
|
+
|
|
1864
|
+
function requireReactJsxRuntime_production () {
|
|
1865
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
1866
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
1867
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
1868
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
1869
|
+
function jsxProd(type, config, maybeKey) {
|
|
1870
|
+
var key = null;
|
|
1871
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
1872
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
1873
|
+
if ("key" in config) {
|
|
1874
|
+
maybeKey = {};
|
|
1875
|
+
for (var propName in config)
|
|
1876
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
1877
|
+
} else maybeKey = config;
|
|
1878
|
+
config = maybeKey.ref;
|
|
1879
|
+
return {
|
|
1880
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
1881
|
+
type: type,
|
|
1882
|
+
key: key,
|
|
1883
|
+
ref: void 0 !== config ? config : null,
|
|
1884
|
+
props: maybeKey
|
|
1885
|
+
};
|
|
1886
|
+
}
|
|
1887
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
1888
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
1889
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
1890
|
+
return reactJsxRuntime_production;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
var reactJsxRuntime_development = {};
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
var hasRequiredReactJsxRuntime_development;
|
|
1897
|
+
|
|
1898
|
+
function requireReactJsxRuntime_development () {
|
|
1899
|
+
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
1900
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
1901
|
+
"production" !== process.env.NODE_ENV &&
|
|
1902
|
+
(function () {
|
|
1903
|
+
function getComponentNameFromType(type) {
|
|
1904
|
+
if (null == type) return null;
|
|
1905
|
+
if ("function" === typeof type)
|
|
1906
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
1907
|
+
? null
|
|
1908
|
+
: type.displayName || type.name || null;
|
|
1909
|
+
if ("string" === typeof type) return type;
|
|
1910
|
+
switch (type) {
|
|
1911
|
+
case REACT_FRAGMENT_TYPE:
|
|
1912
|
+
return "Fragment";
|
|
1913
|
+
case REACT_PROFILER_TYPE:
|
|
1914
|
+
return "Profiler";
|
|
1915
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1916
|
+
return "StrictMode";
|
|
1917
|
+
case REACT_SUSPENSE_TYPE:
|
|
1918
|
+
return "Suspense";
|
|
1919
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1920
|
+
return "SuspenseList";
|
|
1921
|
+
case REACT_ACTIVITY_TYPE:
|
|
1922
|
+
return "Activity";
|
|
1923
|
+
}
|
|
1924
|
+
if ("object" === typeof type)
|
|
1925
|
+
switch (
|
|
1926
|
+
("number" === typeof type.tag &&
|
|
1927
|
+
console.error(
|
|
1928
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
1929
|
+
),
|
|
1930
|
+
type.$$typeof)
|
|
1931
|
+
) {
|
|
1932
|
+
case REACT_PORTAL_TYPE:
|
|
1933
|
+
return "Portal";
|
|
1934
|
+
case REACT_CONTEXT_TYPE:
|
|
1935
|
+
return type.displayName || "Context";
|
|
1936
|
+
case REACT_CONSUMER_TYPE:
|
|
1937
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
1938
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1939
|
+
var innerType = type.render;
|
|
1940
|
+
type = type.displayName;
|
|
1941
|
+
type ||
|
|
1942
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
1943
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
1944
|
+
return type;
|
|
1945
|
+
case REACT_MEMO_TYPE:
|
|
1946
|
+
return (
|
|
1947
|
+
(innerType = type.displayName || null),
|
|
1948
|
+
null !== innerType
|
|
1949
|
+
? innerType
|
|
1950
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
1951
|
+
);
|
|
1952
|
+
case REACT_LAZY_TYPE:
|
|
1953
|
+
innerType = type._payload;
|
|
1954
|
+
type = type._init;
|
|
1955
|
+
try {
|
|
1956
|
+
return getComponentNameFromType(type(innerType));
|
|
1957
|
+
} catch (x) {}
|
|
1958
|
+
}
|
|
1959
|
+
return null;
|
|
1960
|
+
}
|
|
1961
|
+
function testStringCoercion(value) {
|
|
1962
|
+
return "" + value;
|
|
1963
|
+
}
|
|
1964
|
+
function checkKeyStringCoercion(value) {
|
|
1965
|
+
try {
|
|
1966
|
+
testStringCoercion(value);
|
|
1967
|
+
var JSCompiler_inline_result = !1;
|
|
1968
|
+
} catch (e) {
|
|
1969
|
+
JSCompiler_inline_result = true;
|
|
1970
|
+
}
|
|
1971
|
+
if (JSCompiler_inline_result) {
|
|
1972
|
+
JSCompiler_inline_result = console;
|
|
1973
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
1974
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
1975
|
+
("function" === typeof Symbol &&
|
|
1976
|
+
Symbol.toStringTag &&
|
|
1977
|
+
value[Symbol.toStringTag]) ||
|
|
1978
|
+
value.constructor.name ||
|
|
1979
|
+
"Object";
|
|
1980
|
+
JSCompiler_temp_const.call(
|
|
1981
|
+
JSCompiler_inline_result,
|
|
1982
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
1983
|
+
JSCompiler_inline_result$jscomp$0
|
|
1984
|
+
);
|
|
1985
|
+
return testStringCoercion(value);
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
function getTaskName(type) {
|
|
1989
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
1990
|
+
if (
|
|
1991
|
+
"object" === typeof type &&
|
|
1992
|
+
null !== type &&
|
|
1993
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
1994
|
+
)
|
|
1995
|
+
return "<...>";
|
|
1996
|
+
try {
|
|
1997
|
+
var name = getComponentNameFromType(type);
|
|
1998
|
+
return name ? "<" + name + ">" : "<...>";
|
|
1999
|
+
} catch (x) {
|
|
2000
|
+
return "<...>";
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
function getOwner() {
|
|
2004
|
+
var dispatcher = ReactSharedInternals.A;
|
|
2005
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
2006
|
+
}
|
|
2007
|
+
function UnknownOwner() {
|
|
2008
|
+
return Error("react-stack-top-frame");
|
|
2009
|
+
}
|
|
2010
|
+
function hasValidKey(config) {
|
|
2011
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
2012
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
2013
|
+
if (getter && getter.isReactWarning) return false;
|
|
2014
|
+
}
|
|
2015
|
+
return void 0 !== config.key;
|
|
2016
|
+
}
|
|
2017
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
2018
|
+
function warnAboutAccessingKey() {
|
|
2019
|
+
specialPropKeyWarningShown ||
|
|
2020
|
+
((specialPropKeyWarningShown = true),
|
|
2021
|
+
console.error(
|
|
2022
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
2023
|
+
displayName
|
|
2024
|
+
));
|
|
2025
|
+
}
|
|
2026
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
2027
|
+
Object.defineProperty(props, "key", {
|
|
2028
|
+
get: warnAboutAccessingKey,
|
|
2029
|
+
configurable: true
|
|
2030
|
+
});
|
|
2031
|
+
}
|
|
2032
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
2033
|
+
var componentName = getComponentNameFromType(this.type);
|
|
2034
|
+
didWarnAboutElementRef[componentName] ||
|
|
2035
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
2036
|
+
console.error(
|
|
2037
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
2038
|
+
));
|
|
2039
|
+
componentName = this.props.ref;
|
|
2040
|
+
return void 0 !== componentName ? componentName : null;
|
|
2041
|
+
}
|
|
2042
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
2043
|
+
var refProp = props.ref;
|
|
2044
|
+
type = {
|
|
2045
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
2046
|
+
type: type,
|
|
2047
|
+
key: key,
|
|
2048
|
+
props: props,
|
|
2049
|
+
_owner: owner
|
|
2050
|
+
};
|
|
2051
|
+
null !== (void 0 !== refProp ? refProp : null)
|
|
2052
|
+
? Object.defineProperty(type, "ref", {
|
|
2053
|
+
enumerable: false,
|
|
2054
|
+
get: elementRefGetterWithDeprecationWarning
|
|
2055
|
+
})
|
|
2056
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
2057
|
+
type._store = {};
|
|
2058
|
+
Object.defineProperty(type._store, "validated", {
|
|
2059
|
+
configurable: false,
|
|
2060
|
+
enumerable: false,
|
|
2061
|
+
writable: true,
|
|
2062
|
+
value: 0
|
|
2063
|
+
});
|
|
2064
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
2065
|
+
configurable: false,
|
|
2066
|
+
enumerable: false,
|
|
2067
|
+
writable: true,
|
|
2068
|
+
value: null
|
|
2069
|
+
});
|
|
2070
|
+
Object.defineProperty(type, "_debugStack", {
|
|
2071
|
+
configurable: false,
|
|
2072
|
+
enumerable: false,
|
|
2073
|
+
writable: true,
|
|
2074
|
+
value: debugStack
|
|
2075
|
+
});
|
|
2076
|
+
Object.defineProperty(type, "_debugTask", {
|
|
2077
|
+
configurable: false,
|
|
2078
|
+
enumerable: false,
|
|
2079
|
+
writable: true,
|
|
2080
|
+
value: debugTask
|
|
2081
|
+
});
|
|
2082
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
2083
|
+
return type;
|
|
2084
|
+
}
|
|
2085
|
+
function jsxDEVImpl(
|
|
2086
|
+
type,
|
|
2087
|
+
config,
|
|
2088
|
+
maybeKey,
|
|
2089
|
+
isStaticChildren,
|
|
2090
|
+
debugStack,
|
|
2091
|
+
debugTask
|
|
2092
|
+
) {
|
|
2093
|
+
var children = config.children;
|
|
2094
|
+
if (void 0 !== children)
|
|
2095
|
+
if (isStaticChildren)
|
|
2096
|
+
if (isArrayImpl(children)) {
|
|
2097
|
+
for (
|
|
2098
|
+
isStaticChildren = 0;
|
|
2099
|
+
isStaticChildren < children.length;
|
|
2100
|
+
isStaticChildren++
|
|
2101
|
+
)
|
|
2102
|
+
validateChildKeys(children[isStaticChildren]);
|
|
2103
|
+
Object.freeze && Object.freeze(children);
|
|
2104
|
+
} else
|
|
2105
|
+
console.error(
|
|
2106
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
2107
|
+
);
|
|
2108
|
+
else validateChildKeys(children);
|
|
2109
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
2110
|
+
children = getComponentNameFromType(type);
|
|
2111
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
2112
|
+
return "key" !== k;
|
|
2113
|
+
});
|
|
2114
|
+
isStaticChildren =
|
|
2115
|
+
0 < keys.length
|
|
2116
|
+
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
2117
|
+
: "{key: someKey}";
|
|
2118
|
+
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
2119
|
+
((keys =
|
|
2120
|
+
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
2121
|
+
console.error(
|
|
2122
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
2123
|
+
isStaticChildren,
|
|
2124
|
+
children,
|
|
2125
|
+
keys,
|
|
2126
|
+
children
|
|
2127
|
+
),
|
|
2128
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
2129
|
+
}
|
|
2130
|
+
children = null;
|
|
2131
|
+
void 0 !== maybeKey &&
|
|
2132
|
+
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
2133
|
+
hasValidKey(config) &&
|
|
2134
|
+
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
2135
|
+
if ("key" in config) {
|
|
2136
|
+
maybeKey = {};
|
|
2137
|
+
for (var propName in config)
|
|
2138
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
2139
|
+
} else maybeKey = config;
|
|
2140
|
+
children &&
|
|
2141
|
+
defineKeyPropWarningGetter(
|
|
2142
|
+
maybeKey,
|
|
2143
|
+
"function" === typeof type
|
|
2144
|
+
? type.displayName || type.name || "Unknown"
|
|
2145
|
+
: type
|
|
2146
|
+
);
|
|
2147
|
+
return ReactElement(
|
|
2148
|
+
type,
|
|
2149
|
+
children,
|
|
2150
|
+
maybeKey,
|
|
2151
|
+
getOwner(),
|
|
2152
|
+
debugStack,
|
|
2153
|
+
debugTask
|
|
2154
|
+
);
|
|
2155
|
+
}
|
|
2156
|
+
function validateChildKeys(node) {
|
|
2157
|
+
isValidElement(node)
|
|
2158
|
+
? node._store && (node._store.validated = 1)
|
|
2159
|
+
: "object" === typeof node &&
|
|
2160
|
+
null !== node &&
|
|
2161
|
+
node.$$typeof === REACT_LAZY_TYPE &&
|
|
2162
|
+
("fulfilled" === node._payload.status
|
|
2163
|
+
? isValidElement(node._payload.value) &&
|
|
2164
|
+
node._payload.value._store &&
|
|
2165
|
+
(node._payload.value._store.validated = 1)
|
|
2166
|
+
: node._store && (node._store.validated = 1));
|
|
2167
|
+
}
|
|
2168
|
+
function isValidElement(object) {
|
|
2169
|
+
return (
|
|
2170
|
+
"object" === typeof object &&
|
|
2171
|
+
null !== object &&
|
|
2172
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
2173
|
+
);
|
|
2174
|
+
}
|
|
2175
|
+
var React = requireReact(),
|
|
2176
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
2177
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
2178
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
2179
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
2180
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
2181
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
2182
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
2183
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
2184
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
2185
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
2186
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
2187
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
2188
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
2189
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
2190
|
+
ReactSharedInternals =
|
|
2191
|
+
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
2192
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
2193
|
+
isArrayImpl = Array.isArray,
|
|
2194
|
+
createTask = console.createTask
|
|
2195
|
+
? console.createTask
|
|
2196
|
+
: function () {
|
|
2197
|
+
return null;
|
|
2198
|
+
};
|
|
2199
|
+
React = {
|
|
2200
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
2201
|
+
return callStackForError();
|
|
2202
|
+
}
|
|
2203
|
+
};
|
|
2204
|
+
var specialPropKeyWarningShown;
|
|
2205
|
+
var didWarnAboutElementRef = {};
|
|
2206
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
2207
|
+
React,
|
|
2208
|
+
UnknownOwner
|
|
2209
|
+
)();
|
|
2210
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
2211
|
+
var didWarnAboutKeySpread = {};
|
|
2212
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
2213
|
+
reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
|
|
2214
|
+
var trackActualOwner =
|
|
2215
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
2216
|
+
return jsxDEVImpl(
|
|
2217
|
+
type,
|
|
2218
|
+
config,
|
|
2219
|
+
maybeKey,
|
|
2220
|
+
false,
|
|
2221
|
+
trackActualOwner
|
|
2222
|
+
? Error("react-stack-top-frame")
|
|
2223
|
+
: unknownOwnerDebugStack,
|
|
2224
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
2225
|
+
);
|
|
2226
|
+
};
|
|
2227
|
+
reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
|
|
2228
|
+
var trackActualOwner =
|
|
2229
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
2230
|
+
return jsxDEVImpl(
|
|
2231
|
+
type,
|
|
2232
|
+
config,
|
|
2233
|
+
maybeKey,
|
|
2234
|
+
true,
|
|
2235
|
+
trackActualOwner
|
|
2236
|
+
? Error("react-stack-top-frame")
|
|
2237
|
+
: unknownOwnerDebugStack,
|
|
2238
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
2239
|
+
);
|
|
2240
|
+
};
|
|
2241
|
+
})();
|
|
2242
|
+
return reactJsxRuntime_development;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
var hasRequiredJsxRuntime;
|
|
2246
|
+
|
|
2247
|
+
function requireJsxRuntime () {
|
|
2248
|
+
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
2249
|
+
hasRequiredJsxRuntime = 1;
|
|
2250
|
+
|
|
2251
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2252
|
+
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
2253
|
+
} else {
|
|
2254
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
2255
|
+
}
|
|
2256
|
+
return jsxRuntime.exports;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
requireJsxRuntime();
|
|
2260
|
+
|
|
2261
|
+
var cooks = {};
|
|
2262
|
+
|
|
2263
|
+
var timez = {};
|
|
2264
|
+
|
|
2265
|
+
var hasRequiredTimez;
|
|
2266
|
+
|
|
2267
|
+
function requireTimez () {
|
|
2268
|
+
if (hasRequiredTimez) return timez;
|
|
2269
|
+
hasRequiredTimez = 1;
|
|
2270
|
+
|
|
2271
|
+
Object.defineProperty(timez, '__esModule', { value: true });
|
|
2272
|
+
|
|
2273
|
+
class Timez {
|
|
2274
|
+
constructor(input, enableException = false) {
|
|
2275
|
+
if (this.dateChecker(input) === false) {
|
|
2276
|
+
this._date = undefined;
|
|
2277
|
+
}
|
|
2278
|
+
else {
|
|
2279
|
+
if (input instanceof Timez && !!input && !!(input === null || input === void 0 ? void 0 : input._date)) {
|
|
2280
|
+
this._date = new Date(input === null || input === void 0 ? void 0 : input._date);
|
|
2281
|
+
}
|
|
2282
|
+
else if (input instanceof Date) {
|
|
2283
|
+
this._date = new Date(input);
|
|
2284
|
+
}
|
|
2285
|
+
else if (typeof input === 'string') {
|
|
2286
|
+
this._date = Timez.parseString(input, enableException);
|
|
2287
|
+
}
|
|
2288
|
+
else if (typeof input === 'number') {
|
|
2289
|
+
this._date = new Date(input);
|
|
2290
|
+
}
|
|
2291
|
+
else if (input === undefined ||
|
|
2292
|
+
input === null ||
|
|
2293
|
+
(typeof input === 'number' && isNaN(input))) {
|
|
2294
|
+
this._date = new Date();
|
|
2295
|
+
}
|
|
2296
|
+
else {
|
|
2297
|
+
this._date = undefined;
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
static now() {
|
|
2302
|
+
return new Timez();
|
|
2303
|
+
}
|
|
2304
|
+
static parse(dateString, format) {
|
|
2305
|
+
if (typeof format === 'string' &&
|
|
2306
|
+
format.length > 0 && ((dateString instanceof Timez &&
|
|
2307
|
+
!!dateString &&
|
|
2308
|
+
!!(dateString === null || dateString === void 0 ? void 0 : dateString._date)) ||
|
|
2309
|
+
dateString instanceof Date ||
|
|
2310
|
+
typeof dateString === 'string' ||
|
|
2311
|
+
typeof dateString === 'number' || (dateString === undefined ||
|
|
2312
|
+
dateString === null ||
|
|
2313
|
+
(typeof dateString === 'number' && isNaN(dateString))))) {
|
|
2314
|
+
return Timez.parseWithFormat(dateString, format) || new Timez(dateString);
|
|
2315
|
+
}
|
|
2316
|
+
return new Timez(dateString);
|
|
2317
|
+
}
|
|
2318
|
+
static unix(timestamp) {
|
|
2319
|
+
return new Timez(timestamp * 1000);
|
|
2320
|
+
}
|
|
2321
|
+
static utc() {
|
|
2322
|
+
const now = new Date();
|
|
2323
|
+
return new Timez(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds(), now.getUTCMilliseconds()));
|
|
2324
|
+
}
|
|
2325
|
+
year() {
|
|
2326
|
+
var _a;
|
|
2327
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.getFullYear();
|
|
2328
|
+
}
|
|
2329
|
+
month() {
|
|
2330
|
+
return !!this._date ? this._date.getMonth() + 1 : undefined;
|
|
2331
|
+
}
|
|
2332
|
+
date() {
|
|
2333
|
+
var _a;
|
|
2334
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.getDate();
|
|
2335
|
+
}
|
|
2336
|
+
hour() {
|
|
2337
|
+
var _a;
|
|
2338
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.getHours();
|
|
2339
|
+
}
|
|
2340
|
+
minute() {
|
|
2341
|
+
var _a;
|
|
2342
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.getMinutes();
|
|
2343
|
+
}
|
|
2344
|
+
second() {
|
|
2345
|
+
var _a;
|
|
2346
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.getSeconds();
|
|
2347
|
+
}
|
|
2348
|
+
millisecond() {
|
|
2349
|
+
var _a;
|
|
2350
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.getMilliseconds();
|
|
2351
|
+
}
|
|
2352
|
+
day() {
|
|
2353
|
+
var _a;
|
|
2354
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.getDay();
|
|
2355
|
+
}
|
|
2356
|
+
add(amount, unit) {
|
|
2357
|
+
if (!this._date) {
|
|
2358
|
+
return new Timez(undefined);
|
|
2359
|
+
}
|
|
2360
|
+
const newDate = new Date(this._date);
|
|
2361
|
+
switch (unit) {
|
|
2362
|
+
case 'years':
|
|
2363
|
+
newDate.setFullYear(newDate.getFullYear() + amount);
|
|
2364
|
+
break;
|
|
2365
|
+
case 'months':
|
|
2366
|
+
newDate.setMonth(newDate.getMonth() + amount);
|
|
2367
|
+
break;
|
|
2368
|
+
case 'days':
|
|
2369
|
+
newDate.setDate(newDate.getDate() + amount);
|
|
2370
|
+
break;
|
|
2371
|
+
case 'hours':
|
|
2372
|
+
newDate.setHours(newDate.getHours() + amount);
|
|
2373
|
+
break;
|
|
2374
|
+
case 'minutes':
|
|
2375
|
+
newDate.setMinutes(newDate.getMinutes() + amount);
|
|
2376
|
+
break;
|
|
2377
|
+
case 'seconds':
|
|
2378
|
+
newDate.setSeconds(newDate.getSeconds() + amount);
|
|
2379
|
+
break;
|
|
2380
|
+
case 'milliseconds':
|
|
2381
|
+
newDate.setMilliseconds(newDate.getMilliseconds() + amount);
|
|
2382
|
+
break;
|
|
2383
|
+
}
|
|
2384
|
+
return new Timez(newDate);
|
|
2385
|
+
}
|
|
2386
|
+
subtract(amount, unit) {
|
|
2387
|
+
return this.add(-amount, unit);
|
|
2388
|
+
}
|
|
2389
|
+
startOf(unit) {
|
|
2390
|
+
if (!this._date) {
|
|
2391
|
+
return new Timez(undefined);
|
|
2392
|
+
}
|
|
2393
|
+
const newDate = new Date(this._date);
|
|
2394
|
+
switch (unit) {
|
|
2395
|
+
case 'year':
|
|
2396
|
+
newDate.setMonth(0, 1);
|
|
2397
|
+
newDate.setHours(0, 0, 0, 0);
|
|
2398
|
+
break;
|
|
2399
|
+
case 'month':
|
|
2400
|
+
newDate.setDate(1);
|
|
2401
|
+
newDate.setHours(0, 0, 0, 0);
|
|
2402
|
+
break;
|
|
2403
|
+
case 'day':
|
|
2404
|
+
newDate.setHours(0, 0, 0, 0);
|
|
2405
|
+
break;
|
|
2406
|
+
case 'hour':
|
|
2407
|
+
newDate.setMinutes(0, 0, 0);
|
|
2408
|
+
break;
|
|
2409
|
+
case 'minute':
|
|
2410
|
+
newDate.setSeconds(0, 0);
|
|
2411
|
+
break;
|
|
2412
|
+
case 'second':
|
|
2413
|
+
newDate.setMilliseconds(0);
|
|
2414
|
+
break;
|
|
2415
|
+
}
|
|
2416
|
+
return new Timez(newDate);
|
|
2417
|
+
}
|
|
2418
|
+
endOf(unit) {
|
|
2419
|
+
const start = this.startOf(unit);
|
|
2420
|
+
switch (unit) {
|
|
2421
|
+
case 'year':
|
|
2422
|
+
return start.add(1, 'years').subtract(1, 'milliseconds');
|
|
2423
|
+
case 'month':
|
|
2424
|
+
return start.add(1, 'months').subtract(1, 'milliseconds');
|
|
2425
|
+
case 'day':
|
|
2426
|
+
return start.add(1, 'days').subtract(1, 'milliseconds');
|
|
2427
|
+
case 'hour':
|
|
2428
|
+
return start.add(1, 'hours').subtract(1, 'milliseconds');
|
|
2429
|
+
case 'minute':
|
|
2430
|
+
return start.add(1, 'minutes').subtract(1, 'milliseconds');
|
|
2431
|
+
case 'second':
|
|
2432
|
+
return start.add(1, 'seconds').subtract(1, 'milliseconds');
|
|
2433
|
+
default:
|
|
2434
|
+
return start;
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
isBefore(other, inclusivity = '()') {
|
|
2438
|
+
const isIncluded = inclusivity[1] === ']';
|
|
2439
|
+
const otherTimez = other instanceof Timez ? other : new Timez(other);
|
|
2440
|
+
if (!this._date || !otherTimez._date) {
|
|
2441
|
+
return false;
|
|
2442
|
+
}
|
|
2443
|
+
return ((!isIncluded &&
|
|
2444
|
+
this._date < otherTimez._date) ||
|
|
2445
|
+
(!!isIncluded &&
|
|
2446
|
+
this._date <= otherTimez._date));
|
|
2447
|
+
}
|
|
2448
|
+
isAfter(other, inclusivity = '()') {
|
|
2449
|
+
const isIncluded = inclusivity[0] === '[';
|
|
2450
|
+
const otherTimez = other instanceof Timez ? other : new Timez(other);
|
|
2451
|
+
if (!this._date || !otherTimez._date) {
|
|
2452
|
+
return false;
|
|
2453
|
+
}
|
|
2454
|
+
return ((!isIncluded &&
|
|
2455
|
+
this._date > otherTimez._date) ||
|
|
2456
|
+
(!!isIncluded &&
|
|
2457
|
+
this._date >= otherTimez._date));
|
|
2458
|
+
}
|
|
2459
|
+
isSame(other, unit) {
|
|
2460
|
+
const otherTimez = other instanceof Timez ? other : new Timez(other);
|
|
2461
|
+
if (!unit && this._date && otherTimez._date) {
|
|
2462
|
+
return this._date.getTime() === otherTimez._date.getTime();
|
|
2463
|
+
}
|
|
2464
|
+
const thisStart = !!unit ? this.startOf(unit) : undefined;
|
|
2465
|
+
const otherStart = !!unit ? otherTimez.startOf(unit) : undefined;
|
|
2466
|
+
if (!thisStart || !(thisStart === null || thisStart === void 0 ? void 0 : thisStart._date) || !otherStart || !(otherStart === null || otherStart === void 0 ? void 0 : otherStart._date)) {
|
|
2467
|
+
return false;
|
|
2468
|
+
}
|
|
2469
|
+
return thisStart._date.getTime() === otherStart._date.getTime();
|
|
2470
|
+
}
|
|
2471
|
+
isBetween(start, end, inclusivity = '()') {
|
|
2472
|
+
const startTimez = start instanceof Timez ? start : new Timez(start);
|
|
2473
|
+
const endTimez = end instanceof Timez ? end : new Timez(end);
|
|
2474
|
+
const startIncluded = inclusivity[0] === '[';
|
|
2475
|
+
const endIncluded = inclusivity[1] === ']';
|
|
2476
|
+
const afterStart = startIncluded ?
|
|
2477
|
+
this.isSame(startTimez) || this.isAfter(startTimez) :
|
|
2478
|
+
this.isAfter(startTimez);
|
|
2479
|
+
const beforeEnd = endIncluded ?
|
|
2480
|
+
this.isSame(endTimez) || this.isBefore(endTimez) :
|
|
2481
|
+
this.isBefore(endTimez);
|
|
2482
|
+
return afterStart && beforeEnd;
|
|
2483
|
+
}
|
|
2484
|
+
format(formatString) {
|
|
2485
|
+
if (!formatString) {
|
|
2486
|
+
return this.toISOString();
|
|
2487
|
+
}
|
|
2488
|
+
const predefinedFormat = Timez.PREDEFINED_FORMATS[formatString];
|
|
2489
|
+
if (predefinedFormat) {
|
|
2490
|
+
return this.format(predefinedFormat);
|
|
2491
|
+
}
|
|
2492
|
+
let result = '';
|
|
2493
|
+
let i = 0;
|
|
2494
|
+
while (i < formatString.length) {
|
|
2495
|
+
if (formatString[i] === '[') {
|
|
2496
|
+
const endIndex = formatString.indexOf(']', i);
|
|
2497
|
+
if (endIndex === -1) {
|
|
2498
|
+
result += formatString[i];
|
|
2499
|
+
i++;
|
|
2500
|
+
continue;
|
|
2501
|
+
}
|
|
2502
|
+
const literal = formatString.substring(i + 1, endIndex);
|
|
2503
|
+
result += literal;
|
|
2504
|
+
i = endIndex + 1;
|
|
2505
|
+
}
|
|
2506
|
+
else if (formatString[i] === '%' && i + 1 < formatString.length) {
|
|
2507
|
+
const token = `%${formatString[i + 1]}`;
|
|
2508
|
+
const formatter = Timez.FORMAT_TOKENS[token];
|
|
2509
|
+
if (formatter) {
|
|
2510
|
+
result += formatter(this);
|
|
2511
|
+
}
|
|
2512
|
+
else {
|
|
2513
|
+
result += token;
|
|
2514
|
+
}
|
|
2515
|
+
i += 2;
|
|
2516
|
+
}
|
|
2517
|
+
else {
|
|
2518
|
+
result += formatString[i];
|
|
2519
|
+
i++;
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
return result;
|
|
2523
|
+
}
|
|
2524
|
+
setTimezone(timezone) {
|
|
2525
|
+
if (!this._date) {
|
|
2526
|
+
return new Timez(undefined);
|
|
2527
|
+
}
|
|
2528
|
+
const currentOffset = this._date.getTimezoneOffset();
|
|
2529
|
+
const targetOffset = this.parseTimezoneOffset(timezone);
|
|
2530
|
+
const adjustedDate = new Date(this._date.getTime() + (targetOffset - currentOffset) * 60000);
|
|
2531
|
+
return new Timez(adjustedDate);
|
|
2532
|
+
}
|
|
2533
|
+
utc() {
|
|
2534
|
+
if (!this._date) {
|
|
2535
|
+
return new Timez(undefined);
|
|
2536
|
+
}
|
|
2537
|
+
return new Timez(new Date(Date.UTC(this._date.getUTCFullYear(), this._date.getUTCMonth(), this._date.getUTCDate(), this._date.getUTCHours(), this._date.getUTCMinutes(), this._date.getUTCSeconds(), this._date.getUTCMilliseconds())));
|
|
2538
|
+
}
|
|
2539
|
+
local() {
|
|
2540
|
+
if (!this._date) {
|
|
2541
|
+
return new Timez(undefined);
|
|
2542
|
+
}
|
|
2543
|
+
return new Timez(new Date(this._date.getFullYear(), this._date.getMonth(), this._date.getDate(), this._date.getHours(), this._date.getMinutes(), this._date.getSeconds(), this._date.getMilliseconds()));
|
|
2544
|
+
}
|
|
2545
|
+
toString() {
|
|
2546
|
+
var _a;
|
|
2547
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.toString();
|
|
2548
|
+
}
|
|
2549
|
+
toISOString() {
|
|
2550
|
+
var _a;
|
|
2551
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.toISOString();
|
|
2552
|
+
}
|
|
2553
|
+
toDate() {
|
|
2554
|
+
return !!this._date ? new Date(this._date) : undefined;
|
|
2555
|
+
}
|
|
2556
|
+
valueOf() {
|
|
2557
|
+
var _a;
|
|
2558
|
+
return (_a = this._date) === null || _a === void 0 ? void 0 : _a.getTime();
|
|
2559
|
+
}
|
|
2560
|
+
unix() {
|
|
2561
|
+
return !!this._date ? Math.floor(this._date.getTime() / 1000) : undefined;
|
|
2562
|
+
}
|
|
2563
|
+
utcOffset() {
|
|
2564
|
+
return this._date ? -this._date.getTimezoneOffset() : undefined;
|
|
2565
|
+
}
|
|
2566
|
+
isCorrect() {
|
|
2567
|
+
return !!this._date && !isNaN(this._date.getTime());
|
|
2568
|
+
}
|
|
2569
|
+
timezone() {
|
|
2570
|
+
if (!this._date)
|
|
2571
|
+
return undefined;
|
|
2572
|
+
try {
|
|
2573
|
+
const formatter = new Intl.DateTimeFormat();
|
|
2574
|
+
const timezone = formatter.resolvedOptions().timeZone;
|
|
2575
|
+
return timezone || undefined;
|
|
2576
|
+
}
|
|
2577
|
+
catch (error) {
|
|
2578
|
+
return this.timezoneFromOffset();
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
timezoneAbbr() {
|
|
2582
|
+
if (!this._date)
|
|
2583
|
+
return undefined;
|
|
2584
|
+
try {
|
|
2585
|
+
const formatter = new Intl.DateTimeFormat('en', {
|
|
2586
|
+
timeZoneName: 'short'
|
|
2587
|
+
});
|
|
2588
|
+
const parts = formatter.formatToParts(this._date);
|
|
2589
|
+
const timezonePart = parts.find(part => part.type === 'timeZoneName');
|
|
2590
|
+
return (timezonePart === null || timezonePart === void 0 ? void 0 : timezonePart.value) || undefined;
|
|
2591
|
+
}
|
|
2592
|
+
catch (error) {
|
|
2593
|
+
return this.timezoneAbbrFromOffset();
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
timezoneName() {
|
|
2597
|
+
if (!this._date)
|
|
2598
|
+
return undefined;
|
|
2599
|
+
try {
|
|
2600
|
+
const formatter = new Intl.DateTimeFormat('en', {
|
|
2601
|
+
timeZoneName: 'long'
|
|
2602
|
+
});
|
|
2603
|
+
const parts = formatter.formatToParts(this._date);
|
|
2604
|
+
const timezonePart = parts.find(part => part.type === 'timeZoneName');
|
|
2605
|
+
return (timezonePart === null || timezonePart === void 0 ? void 0 : timezonePart.value) || undefined;
|
|
2606
|
+
}
|
|
2607
|
+
catch (error) {
|
|
2608
|
+
return this.timezoneNameFromOffset();
|
|
2609
|
+
}
|
|
2610
|
+
}
|
|
2611
|
+
timezoneOffsetString() {
|
|
2612
|
+
const offset = this.utcOffset();
|
|
2613
|
+
if (offset === undefined)
|
|
2614
|
+
return undefined;
|
|
2615
|
+
const sign = offset >= 0 ? '+' : '-';
|
|
2616
|
+
const hours = Math.floor(Math.abs(offset) / 60).toString().padStart(2, '0');
|
|
2617
|
+
const minutes = (Math.abs(offset) % 60).toString().padStart(2, '0');
|
|
2618
|
+
return `${sign}${hours}:${minutes}`;
|
|
2619
|
+
}
|
|
2620
|
+
dateChecker(input) {
|
|
2621
|
+
return ((input instanceof Timez &&
|
|
2622
|
+
!!input &&
|
|
2623
|
+
!!(input === null || input === void 0 ? void 0 : input._date)) ||
|
|
2624
|
+
input instanceof Date ||
|
|
2625
|
+
typeof input === 'string' ||
|
|
2626
|
+
typeof input === 'number' || (input === undefined ||
|
|
2627
|
+
input === null ||
|
|
2628
|
+
(typeof input === 'number' && isNaN(input))));
|
|
2629
|
+
}
|
|
2630
|
+
timezoneFromOffset() {
|
|
2631
|
+
const offset = this.utcOffset();
|
|
2632
|
+
if (offset === undefined)
|
|
2633
|
+
return undefined;
|
|
2634
|
+
const offsetToTimezone = {
|
|
2635
|
+
0: 'Etc/UTC',
|
|
2636
|
+
60: 'Europe/Paris',
|
|
2637
|
+
120: 'Europe/Athens',
|
|
2638
|
+
180: 'Europe/Moscow',
|
|
2639
|
+
240: 'Asia/Dubai',
|
|
2640
|
+
270: 'Asia/Tehran',
|
|
2641
|
+
300: 'Asia/Karachi',
|
|
2642
|
+
330: 'Asia/Kolkata',
|
|
2643
|
+
345: 'Asia/Rangoon',
|
|
2644
|
+
360: 'Asia/Dhaka',
|
|
2645
|
+
390: 'Asia/Yangon',
|
|
2646
|
+
420: 'Asia/Bangkok',
|
|
2647
|
+
480: 'Asia/Shanghai',
|
|
2648
|
+
525: 'Asia/Kathmandu',
|
|
2649
|
+
540: 'Asia/Tokyo',
|
|
2650
|
+
570: 'Australia/Adelaide',
|
|
2651
|
+
600: 'Australia/Sydney',
|
|
2652
|
+
630: 'Australia/Lord_Howe',
|
|
2653
|
+
660: 'Pacific/Noumea',
|
|
2654
|
+
675: 'Australia/Eucla',
|
|
2655
|
+
720: 'Pacific/Auckland',
|
|
2656
|
+
780: 'Pacific/Chatham',
|
|
2657
|
+
[-60]: 'Atlantic/Azores',
|
|
2658
|
+
[-120]: 'America/Noronha',
|
|
2659
|
+
[-180]: 'America/Argentina/Buenos_Aires',
|
|
2660
|
+
[-210]: 'America/St_Johns',
|
|
2661
|
+
[-240]: 'America/Halifax',
|
|
2662
|
+
[-270]: 'America/Caracas',
|
|
2663
|
+
[-300]: 'America/New_York',
|
|
2664
|
+
[-360]: 'America/Chicago',
|
|
2665
|
+
[-420]: 'America/Denver',
|
|
2666
|
+
[-480]: 'America/Los_Angeles',
|
|
2667
|
+
[-540]: 'America/Anchorage',
|
|
2668
|
+
[-600]: 'Pacific/Honolulu',
|
|
2669
|
+
[-660]: 'Pacific/Pago_Pago',
|
|
2670
|
+
[-720]: 'Pacific/Kiritimati',
|
|
2671
|
+
};
|
|
2672
|
+
return offsetToTimezone[offset] || `Etc/GMT${offset >= 0 ? '-' : '+'}${Math.abs(offset) / 60}`;
|
|
2673
|
+
}
|
|
2674
|
+
timezoneAbbrFromOffset() {
|
|
2675
|
+
const offset = this.utcOffset();
|
|
2676
|
+
if (offset === undefined)
|
|
2677
|
+
return undefined;
|
|
2678
|
+
const offsetToAbbr = {
|
|
2679
|
+
0: 'GMT',
|
|
2680
|
+
60: 'CET',
|
|
2681
|
+
[-300]: 'EST',
|
|
2682
|
+
[-360]: 'CST',
|
|
2683
|
+
[-420]: 'MST',
|
|
2684
|
+
[-480]: 'PST',
|
|
2685
|
+
};
|
|
2686
|
+
return offsetToAbbr[offset] || `GMT${offset >= 0 ? '+' : ''}${offset / 60}`;
|
|
2687
|
+
}
|
|
2688
|
+
timezoneNameFromOffset() {
|
|
2689
|
+
const offset = this.utcOffset();
|
|
2690
|
+
if (offset === undefined)
|
|
2691
|
+
return undefined;
|
|
2692
|
+
const offsetToName = {
|
|
2693
|
+
0: 'Greenwich Mean Time',
|
|
2694
|
+
60: 'Central European Time',
|
|
2695
|
+
[-300]: 'Eastern Standard Time',
|
|
2696
|
+
[-360]: 'Central Standard Time',
|
|
2697
|
+
[-420]: 'Mountain Standard Time',
|
|
2698
|
+
[-480]: 'Pacific Standard Time',
|
|
2699
|
+
};
|
|
2700
|
+
return offsetToName[offset] || `GMT${offset >= 0 ? '+' : ''}${offset / 60}`;
|
|
2701
|
+
}
|
|
2702
|
+
isDST() {
|
|
2703
|
+
if (!this._date)
|
|
2704
|
+
return undefined;
|
|
2705
|
+
try {
|
|
2706
|
+
const jan = new Date(this._date.getFullYear(), 0, 1);
|
|
2707
|
+
const jul = new Date(this._date.getFullYear(), 6, 1);
|
|
2708
|
+
const stdOffset = Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());
|
|
2709
|
+
return this._date.getTimezoneOffset() < stdOffset;
|
|
2710
|
+
}
|
|
2711
|
+
catch (error) {
|
|
2712
|
+
return undefined;
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
static parseString(dateString, enableException = false) {
|
|
2716
|
+
const isoDate = new Date(dateString);
|
|
2717
|
+
if (!isNaN(isoDate.getTime())) {
|
|
2718
|
+
return isoDate;
|
|
2719
|
+
}
|
|
2720
|
+
const formats = [
|
|
2721
|
+
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d{3})Z$/,
|
|
2722
|
+
/^(\d{4})-(\d{2})-(\d{2})$/,
|
|
2723
|
+
/^(\d{4})\/(\d{2})\/(\d{2}) (\d{2}):(\d{2}):(\d{2})$/,
|
|
2724
|
+
/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/
|
|
2725
|
+
];
|
|
2726
|
+
for (const regex of formats) {
|
|
2727
|
+
const match = dateString.match(regex);
|
|
2728
|
+
if (match) {
|
|
2729
|
+
const components = match.slice(1).map(Number);
|
|
2730
|
+
if (regex === formats[0]) {
|
|
2731
|
+
return new Date(Date.UTC(components[0], components[1] - 1, components[2], components[3], components[4], components[5], components[6]));
|
|
2732
|
+
}
|
|
2733
|
+
else if (regex === formats[1]) {
|
|
2734
|
+
return new Date(components[0], components[1] - 1, components[2]);
|
|
2735
|
+
}
|
|
2736
|
+
else if (regex === formats[2]) {
|
|
2737
|
+
return new Date(components[0], components[1] - 1, components[2], components[3], components[4], components[5]);
|
|
2738
|
+
}
|
|
2739
|
+
else if (regex === formats[3]) {
|
|
2740
|
+
return new Date(components[0], components[1] - 1, components[2], components[3], components[4], components[5]);
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
const fallback = new Date(dateString);
|
|
2745
|
+
if (!isNaN(fallback.getTime())) {
|
|
2746
|
+
return fallback;
|
|
2747
|
+
}
|
|
2748
|
+
if (!!enableException) {
|
|
2749
|
+
throw new Error(`Unable to parse date string: ${dateString}`);
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
static parseWithFormat(value, format) {
|
|
2753
|
+
if (!value || !format)
|
|
2754
|
+
return undefined;
|
|
2755
|
+
const valueStr = String(value).trim();
|
|
2756
|
+
if (!valueStr)
|
|
2757
|
+
return undefined;
|
|
2758
|
+
const tokenHandlers = {
|
|
2759
|
+
'Y': {
|
|
2760
|
+
regex: /\d{4}/,
|
|
2761
|
+
extract: (match) => parseInt(match, 10)
|
|
2762
|
+
},
|
|
2763
|
+
'y': {
|
|
2764
|
+
regex: /\d{2}/,
|
|
2765
|
+
extract: (match) => {
|
|
2766
|
+
const year = parseInt(match, 10);
|
|
2767
|
+
return year >= 70 ? 1900 + year : 2000 + year;
|
|
2768
|
+
}
|
|
2769
|
+
},
|
|
2770
|
+
'm': {
|
|
2771
|
+
regex: /\d{1,2}/,
|
|
2772
|
+
extract: (match) => parseInt(match, 10)
|
|
2773
|
+
},
|
|
2774
|
+
'd': {
|
|
2775
|
+
regex: /\d{1,2}/,
|
|
2776
|
+
extract: (match) => parseInt(match, 10)
|
|
2777
|
+
},
|
|
2778
|
+
'H': {
|
|
2779
|
+
regex: /\d{1,2}/,
|
|
2780
|
+
extract: (match) => parseInt(match, 10)
|
|
2781
|
+
},
|
|
2782
|
+
'M': {
|
|
2783
|
+
regex: /\d{1,2}/,
|
|
2784
|
+
extract: (match) => parseInt(match, 10)
|
|
2785
|
+
},
|
|
2786
|
+
'S': {
|
|
2787
|
+
regex: /\d{1,2}/,
|
|
2788
|
+
extract: (match) => parseInt(match, 10)
|
|
2789
|
+
},
|
|
2790
|
+
'f': {
|
|
2791
|
+
regex: /\d{1,3}/,
|
|
2792
|
+
extract: (match) => parseInt(match, 10)
|
|
2793
|
+
}
|
|
2794
|
+
};
|
|
2795
|
+
const result = {
|
|
2796
|
+
year: new Date().getFullYear(),
|
|
2797
|
+
month: 1,
|
|
2798
|
+
day: 1,
|
|
2799
|
+
hour: 0,
|
|
2800
|
+
minute: 0,
|
|
2801
|
+
second: 0,
|
|
2802
|
+
millisecond: 0
|
|
2803
|
+
};
|
|
2804
|
+
let valueIndex = 0;
|
|
2805
|
+
let formatIndex = 0;
|
|
2806
|
+
let inLiteral = false;
|
|
2807
|
+
let currentLiteral = '';
|
|
2808
|
+
while (formatIndex < format.length && valueIndex < valueStr.length) {
|
|
2809
|
+
const formatChar = format[formatIndex];
|
|
2810
|
+
if (formatChar === '[') {
|
|
2811
|
+
inLiteral = true;
|
|
2812
|
+
currentLiteral = '';
|
|
2813
|
+
formatIndex++;
|
|
2814
|
+
}
|
|
2815
|
+
else if (formatChar === ']' && inLiteral) {
|
|
2816
|
+
if (valueStr.substring(valueIndex, valueIndex + currentLiteral.length) === currentLiteral) {
|
|
2817
|
+
valueIndex += currentLiteral.length;
|
|
2818
|
+
}
|
|
2819
|
+
else {
|
|
2820
|
+
return undefined;
|
|
2821
|
+
}
|
|
2822
|
+
inLiteral = false;
|
|
2823
|
+
currentLiteral = '';
|
|
2824
|
+
formatIndex++;
|
|
2825
|
+
}
|
|
2826
|
+
else if (inLiteral) {
|
|
2827
|
+
currentLiteral += formatChar;
|
|
2828
|
+
formatIndex++;
|
|
2829
|
+
}
|
|
2830
|
+
else if (formatChar === '%' && formatIndex + 1 < format.length) {
|
|
2831
|
+
const token = format[formatIndex + 1];
|
|
2832
|
+
const handler = tokenHandlers[token];
|
|
2833
|
+
if (handler) {
|
|
2834
|
+
const remainingValue = valueStr.substring(valueIndex);
|
|
2835
|
+
const match = remainingValue.match(handler.regex);
|
|
2836
|
+
if (match && match.index === 0) {
|
|
2837
|
+
const matchedValue = match[0];
|
|
2838
|
+
const numericValue = handler.extract(matchedValue);
|
|
2839
|
+
switch (token) {
|
|
2840
|
+
case 'Y':
|
|
2841
|
+
case 'y':
|
|
2842
|
+
result.year = numericValue;
|
|
2843
|
+
break;
|
|
2844
|
+
case 'm':
|
|
2845
|
+
result.month = numericValue;
|
|
2846
|
+
break;
|
|
2847
|
+
case 'd':
|
|
2848
|
+
result.day = numericValue;
|
|
2849
|
+
break;
|
|
2850
|
+
case 'H':
|
|
2851
|
+
result.hour = numericValue;
|
|
2852
|
+
break;
|
|
2853
|
+
case 'M':
|
|
2854
|
+
result.minute = numericValue;
|
|
2855
|
+
break;
|
|
2856
|
+
case 'S':
|
|
2857
|
+
result.second = numericValue;
|
|
2858
|
+
break;
|
|
2859
|
+
case 'f':
|
|
2860
|
+
result.millisecond = numericValue;
|
|
2861
|
+
break;
|
|
2862
|
+
}
|
|
2863
|
+
valueIndex += matchedValue.length;
|
|
2864
|
+
}
|
|
2865
|
+
else {
|
|
2866
|
+
return undefined;
|
|
2867
|
+
}
|
|
2868
|
+
}
|
|
2869
|
+
else {
|
|
2870
|
+
valueIndex++;
|
|
2871
|
+
}
|
|
2872
|
+
formatIndex += 2;
|
|
2873
|
+
}
|
|
2874
|
+
else {
|
|
2875
|
+
if (formatChar === valueStr[valueIndex]) {
|
|
2876
|
+
valueIndex++;
|
|
2877
|
+
formatIndex++;
|
|
2878
|
+
}
|
|
2879
|
+
else {
|
|
2880
|
+
return undefined;
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2884
|
+
if (result.month < 1 || result.month > 12)
|
|
2885
|
+
return undefined;
|
|
2886
|
+
if (result.day < 1 || result.day > 31)
|
|
2887
|
+
return undefined;
|
|
2888
|
+
if (result.hour < 0 || result.hour > 23)
|
|
2889
|
+
return undefined;
|
|
2890
|
+
if (result.minute < 0 || result.minute > 59)
|
|
2891
|
+
return undefined;
|
|
2892
|
+
if (result.second < 0 || result.second > 59)
|
|
2893
|
+
return undefined;
|
|
2894
|
+
if (result.millisecond < 0 || result.millisecond > 999)
|
|
2895
|
+
return undefined;
|
|
2896
|
+
try {
|
|
2897
|
+
const date = new Date(result.year, result.month - 1,
|
|
2898
|
+
result.day, result.hour, result.minute, result.second, result.millisecond);
|
|
2899
|
+
if (isNaN(date.getTime())) {
|
|
2900
|
+
return undefined;
|
|
2901
|
+
}
|
|
2902
|
+
return new Timez(date);
|
|
2903
|
+
}
|
|
2904
|
+
catch (error) {
|
|
2905
|
+
return undefined;
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2908
|
+
static getTokenLength(token) {
|
|
2909
|
+
const tokenLengths = {
|
|
2910
|
+
'Y': 4,
|
|
2911
|
+
'y': 2,
|
|
2912
|
+
'm': 2,
|
|
2913
|
+
'd': 2,
|
|
2914
|
+
'H': 2,
|
|
2915
|
+
'M': 2,
|
|
2916
|
+
'S': 2,
|
|
2917
|
+
'f': 3,
|
|
2918
|
+
'z': 5
|
|
2919
|
+
};
|
|
2920
|
+
return tokenLengths[token] || 1;
|
|
2921
|
+
}
|
|
2922
|
+
parseTimezoneOffset(timezone) {
|
|
2923
|
+
const offsets = {
|
|
2924
|
+
'UTC': 0,
|
|
2925
|
+
'EST': -300,
|
|
2926
|
+
'EDT': -240,
|
|
2927
|
+
'CST': -360,
|
|
2928
|
+
'CDT': -300,
|
|
2929
|
+
'PST': -480,
|
|
2930
|
+
'PDT': -420,
|
|
2931
|
+
};
|
|
2932
|
+
if (offsets[timezone.toUpperCase()] !== undefined) {
|
|
2933
|
+
return offsets[timezone.toUpperCase()];
|
|
2934
|
+
}
|
|
2935
|
+
const match = timezone.match(/^([+-])(\d{1,2}):?(\d{2})?$/);
|
|
2936
|
+
if (match) {
|
|
2937
|
+
const sign = match[1] === '+' ? 1 : -1;
|
|
2938
|
+
const hours = parseInt(match[2], 10);
|
|
2939
|
+
const minutes = match[3] ? parseInt(match[3], 10) : 0;
|
|
2940
|
+
return sign * (hours * 60 + minutes);
|
|
2941
|
+
}
|
|
2942
|
+
return this._date ? -this._date.getTimezoneOffset() : 0;
|
|
2943
|
+
}
|
|
2944
|
+
static get FORMATS() {
|
|
2945
|
+
return Object.assign({}, Timez.PREDEFINED_FORMATS);
|
|
2946
|
+
}
|
|
2947
|
+
static exposeToGlobal() {
|
|
2948
|
+
if (typeof window !== 'undefined') {
|
|
2949
|
+
window.Timez = Timez;
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
Timez.FORMAT_TOKENS = {
|
|
2954
|
+
'%Y': (t) => { var _a; return (_a = t.year()) === null || _a === void 0 ? void 0 : _a.toString().padStart(4, '0'); },
|
|
2955
|
+
'%y': (t) => { var _a; return (_a = t.year()) === null || _a === void 0 ? void 0 : _a.toString().slice(-2).padStart(2, '0'); },
|
|
2956
|
+
'%m': (t) => { var _a; return (_a = t.month()) === null || _a === void 0 ? void 0 : _a.toString().padStart(2, '0'); },
|
|
2957
|
+
'%d': (t) => { var _a; return (_a = t.date()) === null || _a === void 0 ? void 0 : _a.toString().padStart(2, '0'); },
|
|
2958
|
+
'%H': (t) => { var _a; return (_a = t.hour()) === null || _a === void 0 ? void 0 : _a.toString().padStart(2, '0'); },
|
|
2959
|
+
'%M': (t) => { var _a; return (_a = t.minute()) === null || _a === void 0 ? void 0 : _a.toString().padStart(2, '0'); },
|
|
2960
|
+
'%S': (t) => { var _a; return (_a = t.second()) === null || _a === void 0 ? void 0 : _a.toString().padStart(2, '0'); },
|
|
2961
|
+
'%f': (t) => { var _a; return (_a = t.millisecond()) === null || _a === void 0 ? void 0 : _a.toString().padStart(3, '0'); },
|
|
2962
|
+
'%z': (t) => {
|
|
2963
|
+
const offset = t.utcOffset();
|
|
2964
|
+
if (!offset) {
|
|
2965
|
+
return undefined;
|
|
2966
|
+
}
|
|
2967
|
+
const sign = offset >= 0 ? '+' : '-';
|
|
2968
|
+
const hours = Math.floor(Math.abs(offset) / 60).toString().padStart(2, '0');
|
|
2969
|
+
const minutes = (Math.abs(offset) % 60).toString().padStart(2, '0');
|
|
2970
|
+
return `${sign}${hours}${minutes}`;
|
|
2971
|
+
},
|
|
2972
|
+
'%s': (t) => {
|
|
2973
|
+
const val = t.valueOf();
|
|
2974
|
+
return !!val ? Math.floor(val / 1000).toString() : undefined;
|
|
2975
|
+
},
|
|
2976
|
+
};
|
|
2977
|
+
Timez.PREDEFINED_FORMATS = {
|
|
2978
|
+
ISO: '%Y-%m-%dT%H:%M:%S.%fZ',
|
|
2979
|
+
ISO_DATE: '%Y-%m-%d',
|
|
2980
|
+
ISO_TIME: '%H:%M:%S.%fZ',
|
|
2981
|
+
COMPACT: '%Y%m%d%H%M%S',
|
|
2982
|
+
SLASH_DATETIME: '%Y/%m/%d %H:%M:%S.%fZ',
|
|
2983
|
+
SLASH_DATETIME_SEC: '%Y/%m/%d %H:%M:%S',
|
|
2984
|
+
SLASH_DATETIME_MIN: '%Y/%m/%d %H:%M',
|
|
2985
|
+
EUROPEAN: '%d/%m/%Y %H:%M:%S GMT%z',
|
|
2986
|
+
SLASH_DATE: '%Y/%m/%d',
|
|
2987
|
+
TIME_MICRO: '%H:%M:%S.%fZ',
|
|
2988
|
+
TIME_SEC: '%H:%M:%S',
|
|
2989
|
+
CUSTOM_GREETING: '[Bonjour celestin, ][la date actuelle est:: le] %d/%m/%Y [à] %H:%M:%S.%f[Z]',
|
|
2990
|
+
};
|
|
2991
|
+
if (typeof window !== 'undefined') {
|
|
2992
|
+
window.Timez = Timez;
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
timez.Timez = Timez;
|
|
2996
|
+
timez.default = Timez;
|
|
2997
|
+
return timez;
|
|
2998
|
+
}
|
|
2999
|
+
|
|
3000
|
+
var hasRequiredCooks;
|
|
3001
|
+
|
|
3002
|
+
function requireCooks () {
|
|
3003
|
+
if (hasRequiredCooks) return cooks;
|
|
3004
|
+
hasRequiredCooks = 1;
|
|
3005
|
+
|
|
3006
|
+
Object.defineProperty(cooks, '__esModule', { value: true });
|
|
3007
|
+
|
|
3008
|
+
var timez = requireTimez();
|
|
3009
|
+
|
|
3010
|
+
const tabAlphabetique = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
|
|
3011
|
+
[...tabAlphabetique, ...tabAlphabetique.map(x => x.toUpperCase())];
|
|
3012
|
+
|
|
3013
|
+
class Cooks {
|
|
3014
|
+
static set(key, value, options = {}) {
|
|
3015
|
+
if (!this.isBrowser())
|
|
3016
|
+
return;
|
|
3017
|
+
try {
|
|
3018
|
+
const serializedValue = this.serialize(value);
|
|
3019
|
+
const encodedValue = encodeURIComponent(serializedValue);
|
|
3020
|
+
const cookieString = this.buildCookieString(key, encodedValue, options);
|
|
3021
|
+
document.cookie = cookieString;
|
|
3022
|
+
}
|
|
3023
|
+
catch (error) {
|
|
3024
|
+
console.error(`Cooks: Error setting cookie "${key}":`, error);
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
static get(key) {
|
|
3028
|
+
if (!this.isBrowser())
|
|
3029
|
+
return null;
|
|
3030
|
+
try {
|
|
3031
|
+
const cookies = this.getAllCookies();
|
|
3032
|
+
const encodedValue = cookies[key];
|
|
3033
|
+
if (!encodedValue)
|
|
3034
|
+
return null;
|
|
3035
|
+
const decodedValue = decodeURIComponent(encodedValue);
|
|
3036
|
+
return this.deserialize(decodedValue);
|
|
3037
|
+
}
|
|
3038
|
+
catch (error) {
|
|
3039
|
+
console.error(`Cooks: Error getting cookie "${key}":`, error);
|
|
3040
|
+
return null;
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
static remove(key, path = '/', domain) {
|
|
3044
|
+
if (!this.isBrowser())
|
|
3045
|
+
return;
|
|
3046
|
+
const options = {
|
|
3047
|
+
expires: new Date(0),
|
|
3048
|
+
path,
|
|
3049
|
+
domain
|
|
3050
|
+
};
|
|
3051
|
+
this.set(key, '', options);
|
|
3052
|
+
}
|
|
3053
|
+
static has(key) {
|
|
3054
|
+
return this.get(key) !== null;
|
|
3055
|
+
}
|
|
3056
|
+
static keys() {
|
|
3057
|
+
if (!this.isBrowser())
|
|
3058
|
+
return [];
|
|
3059
|
+
const cookies = this.getAllCookies();
|
|
3060
|
+
return Object.keys(cookies);
|
|
3061
|
+
}
|
|
3062
|
+
static clear() {
|
|
3063
|
+
if (!this.isBrowser())
|
|
3064
|
+
return;
|
|
3065
|
+
const cookies = this.getAllCookies();
|
|
3066
|
+
Object.keys(cookies).forEach(key => {
|
|
3067
|
+
this.remove(key);
|
|
3068
|
+
});
|
|
3069
|
+
}
|
|
3070
|
+
static serialize(value) {
|
|
3071
|
+
if (value instanceof Date) {
|
|
3072
|
+
return JSON.stringify({
|
|
3073
|
+
__type: 'Date',
|
|
3074
|
+
__value: value.toISOString()
|
|
3075
|
+
});
|
|
3076
|
+
}
|
|
3077
|
+
return JSON.stringify(value);
|
|
3078
|
+
}
|
|
3079
|
+
static deserialize(value) {
|
|
3080
|
+
const parsed = JSON.parse(value);
|
|
3081
|
+
if (parsed && typeof parsed === 'object' && parsed.__type === 'Date') {
|
|
3082
|
+
return new Date(parsed.__value);
|
|
3083
|
+
}
|
|
3084
|
+
return parsed;
|
|
3085
|
+
}
|
|
3086
|
+
static buildCookieString(key, value, options) {
|
|
3087
|
+
const mergedOptions = Object.assign(Object.assign({}, this.DEFAULT_OPTIONS), options);
|
|
3088
|
+
let cookieString = `${key}=${value}`;
|
|
3089
|
+
if (mergedOptions.expires !== undefined) {
|
|
3090
|
+
let expirationDate;
|
|
3091
|
+
if (typeof mergedOptions.expires === 'number') {
|
|
3092
|
+
const expirationDateInitial = new timez.Timez().add(mergedOptions.expires, 'seconds').toDate();
|
|
3093
|
+
if (!!expirationDateInitial) {
|
|
3094
|
+
expirationDate = expirationDateInitial;
|
|
3095
|
+
}
|
|
3096
|
+
else {
|
|
3097
|
+
expirationDate = new Date();
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
3100
|
+
else {
|
|
3101
|
+
expirationDate = mergedOptions.expires;
|
|
3102
|
+
}
|
|
3103
|
+
cookieString += `; expires=${expirationDate.toUTCString()}`;
|
|
3104
|
+
}
|
|
3105
|
+
if (mergedOptions.path)
|
|
3106
|
+
cookieString += `; path=${mergedOptions.path}`;
|
|
3107
|
+
if (mergedOptions.domain)
|
|
3108
|
+
cookieString += `; domain=${mergedOptions.domain}`;
|
|
3109
|
+
if (mergedOptions.secure)
|
|
3110
|
+
cookieString += `; secure`;
|
|
3111
|
+
if (mergedOptions.sameSite)
|
|
3112
|
+
cookieString += `; samesite=${mergedOptions.sameSite}`;
|
|
3113
|
+
{
|
|
3114
|
+
console.log(`Cooks - buildCookieString | cookieString:: `, cookieString);
|
|
3115
|
+
}
|
|
3116
|
+
return cookieString;
|
|
3117
|
+
}
|
|
3118
|
+
static getAllCookies() {
|
|
3119
|
+
return document.cookie
|
|
3120
|
+
.split(';')
|
|
3121
|
+
.reduce((cookies, cookie) => {
|
|
3122
|
+
const [key, value] = cookie.split('=').map(part => part.trim());
|
|
3123
|
+
if (key) {
|
|
3124
|
+
cookies[key] = value || '';
|
|
3125
|
+
}
|
|
3126
|
+
return cookies;
|
|
3127
|
+
}, {});
|
|
3128
|
+
}
|
|
3129
|
+
static isBrowser() {
|
|
3130
|
+
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
3131
|
+
}
|
|
3132
|
+
static exposeToGlobal() {
|
|
3133
|
+
if (typeof window !== "undefined") {
|
|
3134
|
+
window.Cooks = Cooks;
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
Cooks.DEFAULT_OPTIONS = {
|
|
3139
|
+
path: '/',
|
|
3140
|
+
secure: true,
|
|
3141
|
+
sameSite: 'lax'
|
|
3142
|
+
};
|
|
3143
|
+
if (typeof window !== "undefined") {
|
|
3144
|
+
window.Cooks = Cooks;
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
cooks.Cooks = Cooks;
|
|
3148
|
+
cooks.default = Cooks;
|
|
3149
|
+
return cooks;
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
requireCooks();
|
|
3153
|
+
|
|
3154
|
+
var _a;
|
|
3155
|
+
((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.VITE_APP_SRC_DIR) || '/src';
|
|
3156
|
+
|
|
3157
|
+
import.meta.glob('@/locales/*.json', { eager: false });
|
|
3158
|
+
import.meta.glob('@/modules/*/locales/*.json', { eager: false });
|
|
3159
|
+
|
|
3160
|
+
const ArcIntlContext = reactExports.createContext(null);
|
|
3161
|
+
const useArcIntl = () => {
|
|
3162
|
+
const context = reactExports.useContext(ArcIntlContext);
|
|
3163
|
+
if (!context)
|
|
3164
|
+
throw new Error('useArcIntl must be used within an ArcIntlProvider');
|
|
3165
|
+
return context;
|
|
3166
|
+
};
|
|
3167
|
+
|
|
3168
|
+
const useTranslation = (moduleName) => {
|
|
3169
|
+
const arcIntl = useArcIntl();
|
|
3170
|
+
reactExports.useEffect(() => {
|
|
3171
|
+
if (moduleName) {
|
|
3172
|
+
arcIntl.loadModuleTranslations(moduleName);
|
|
3173
|
+
}
|
|
3174
|
+
}, [moduleName]);
|
|
3175
|
+
return {
|
|
3176
|
+
t: arcIntl.t,
|
|
3177
|
+
changeLocale: arcIntl.changeLocale,
|
|
3178
|
+
currentLocale: arcIntl.currentLocale,
|
|
3179
|
+
isLoading: arcIntl.isLoading,
|
|
3180
|
+
};
|
|
3181
|
+
};
|
|
3182
|
+
|
|
3183
|
+
export { useTranslation };
|