tevrocsdk 0.1.16 → 0.1.18
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/package.json +1 -1
- package/tevroc-sdk.esm.js +129 -1078
- package/tevroc-sdk.min.js +1 -12
- package/tevroc-sdk.umd.js +129 -1068
package/tevroc-sdk.umd.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
var Tevroc = (() => {
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __esm = (fn, res, err) => function __init() {
|
|
9
7
|
if (err) throw err[0];
|
|
@@ -13,13 +11,6 @@ var Tevroc = (() => {
|
|
|
13
11
|
throw err = [e], e;
|
|
14
12
|
}
|
|
15
13
|
};
|
|
16
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
17
|
-
try {
|
|
18
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
-
} catch (e) {
|
|
20
|
-
throw mod = 0, e;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
14
|
var __export = (target, all) => {
|
|
24
15
|
for (var name in all)
|
|
25
16
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -32,1000 +23,8 @@ var Tevroc = (() => {
|
|
|
32
23
|
}
|
|
33
24
|
return to;
|
|
34
25
|
};
|
|
35
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
36
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
37
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
38
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
39
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
40
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
41
|
-
mod
|
|
42
|
-
));
|
|
43
26
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
44
27
|
|
|
45
|
-
// node_modules/react/cjs/react.development.js
|
|
46
|
-
var require_react_development = __commonJS({
|
|
47
|
-
"node_modules/react/cjs/react.development.js"(exports, module) {
|
|
48
|
-
"use strict";
|
|
49
|
-
(function() {
|
|
50
|
-
function defineDeprecationWarning(methodName, info) {
|
|
51
|
-
Object.defineProperty(Component.prototype, methodName, {
|
|
52
|
-
get: function() {
|
|
53
|
-
console.warn(
|
|
54
|
-
"%s(...) is deprecated in plain JavaScript React classes. %s",
|
|
55
|
-
info[0],
|
|
56
|
-
info[1]
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function getIteratorFn(maybeIterable) {
|
|
62
|
-
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
|
63
|
-
return null;
|
|
64
|
-
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
65
|
-
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
66
|
-
}
|
|
67
|
-
function warnNoop(publicInstance, callerName) {
|
|
68
|
-
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
|
69
|
-
var warningKey = publicInstance + "." + callerName;
|
|
70
|
-
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error(
|
|
71
|
-
"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.",
|
|
72
|
-
callerName,
|
|
73
|
-
publicInstance
|
|
74
|
-
), didWarnStateUpdateForUnmountedComponent[warningKey] = true);
|
|
75
|
-
}
|
|
76
|
-
function Component(props, context, updater) {
|
|
77
|
-
this.props = props;
|
|
78
|
-
this.context = context;
|
|
79
|
-
this.refs = emptyObject;
|
|
80
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
81
|
-
}
|
|
82
|
-
function ComponentDummy() {
|
|
83
|
-
}
|
|
84
|
-
function PureComponent(props, context, updater) {
|
|
85
|
-
this.props = props;
|
|
86
|
-
this.context = context;
|
|
87
|
-
this.refs = emptyObject;
|
|
88
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
89
|
-
}
|
|
90
|
-
function noop() {
|
|
91
|
-
}
|
|
92
|
-
function testStringCoercion(value) {
|
|
93
|
-
return "" + value;
|
|
94
|
-
}
|
|
95
|
-
function checkKeyStringCoercion(value) {
|
|
96
|
-
try {
|
|
97
|
-
testStringCoercion(value);
|
|
98
|
-
var JSCompiler_inline_result = false;
|
|
99
|
-
} catch (e) {
|
|
100
|
-
JSCompiler_inline_result = true;
|
|
101
|
-
}
|
|
102
|
-
if (JSCompiler_inline_result) {
|
|
103
|
-
JSCompiler_inline_result = console;
|
|
104
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
105
|
-
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
106
|
-
JSCompiler_temp_const.call(
|
|
107
|
-
JSCompiler_inline_result,
|
|
108
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
-
JSCompiler_inline_result$jscomp$0
|
|
110
|
-
);
|
|
111
|
-
return testStringCoercion(value);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function getComponentNameFromType(type) {
|
|
115
|
-
if (null == type) return null;
|
|
116
|
-
if ("function" === typeof type)
|
|
117
|
-
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
118
|
-
if ("string" === typeof type) return type;
|
|
119
|
-
switch (type) {
|
|
120
|
-
case REACT_FRAGMENT_TYPE:
|
|
121
|
-
return "Fragment";
|
|
122
|
-
case REACT_PROFILER_TYPE:
|
|
123
|
-
return "Profiler";
|
|
124
|
-
case REACT_STRICT_MODE_TYPE:
|
|
125
|
-
return "StrictMode";
|
|
126
|
-
case REACT_SUSPENSE_TYPE:
|
|
127
|
-
return "Suspense";
|
|
128
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
129
|
-
return "SuspenseList";
|
|
130
|
-
case REACT_ACTIVITY_TYPE:
|
|
131
|
-
return "Activity";
|
|
132
|
-
}
|
|
133
|
-
if ("object" === typeof type)
|
|
134
|
-
switch ("number" === typeof type.tag && console.error(
|
|
135
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
136
|
-
), type.$$typeof) {
|
|
137
|
-
case REACT_PORTAL_TYPE:
|
|
138
|
-
return "Portal";
|
|
139
|
-
case REACT_CONTEXT_TYPE:
|
|
140
|
-
return type.displayName || "Context";
|
|
141
|
-
case REACT_CONSUMER_TYPE:
|
|
142
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
143
|
-
case REACT_FORWARD_REF_TYPE:
|
|
144
|
-
var innerType = type.render;
|
|
145
|
-
type = type.displayName;
|
|
146
|
-
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
147
|
-
return type;
|
|
148
|
-
case REACT_MEMO_TYPE:
|
|
149
|
-
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
150
|
-
case REACT_LAZY_TYPE:
|
|
151
|
-
innerType = type._payload;
|
|
152
|
-
type = type._init;
|
|
153
|
-
try {
|
|
154
|
-
return getComponentNameFromType(type(innerType));
|
|
155
|
-
} catch (x) {
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return null;
|
|
159
|
-
}
|
|
160
|
-
function getTaskName(type) {
|
|
161
|
-
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
162
|
-
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
|
|
163
|
-
return "<...>";
|
|
164
|
-
try {
|
|
165
|
-
var name = getComponentNameFromType(type);
|
|
166
|
-
return name ? "<" + name + ">" : "<...>";
|
|
167
|
-
} catch (x) {
|
|
168
|
-
return "<...>";
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
function getOwner() {
|
|
172
|
-
var dispatcher = ReactSharedInternals.A;
|
|
173
|
-
return null === dispatcher ? null : dispatcher.getOwner();
|
|
174
|
-
}
|
|
175
|
-
function UnknownOwner() {
|
|
176
|
-
return Error("react-stack-top-frame");
|
|
177
|
-
}
|
|
178
|
-
function hasValidKey(config) {
|
|
179
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
180
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
181
|
-
if (getter && getter.isReactWarning) return false;
|
|
182
|
-
}
|
|
183
|
-
return void 0 !== config.key;
|
|
184
|
-
}
|
|
185
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
186
|
-
function warnAboutAccessingKey() {
|
|
187
|
-
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
188
|
-
"%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)",
|
|
189
|
-
displayName
|
|
190
|
-
));
|
|
191
|
-
}
|
|
192
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
193
|
-
Object.defineProperty(props, "key", {
|
|
194
|
-
get: warnAboutAccessingKey,
|
|
195
|
-
configurable: true
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
199
|
-
var componentName = getComponentNameFromType(this.type);
|
|
200
|
-
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
201
|
-
"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."
|
|
202
|
-
));
|
|
203
|
-
componentName = this.props.ref;
|
|
204
|
-
return void 0 !== componentName ? componentName : null;
|
|
205
|
-
}
|
|
206
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
207
|
-
var refProp = props.ref;
|
|
208
|
-
type = {
|
|
209
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
210
|
-
type,
|
|
211
|
-
key,
|
|
212
|
-
props,
|
|
213
|
-
_owner: owner
|
|
214
|
-
};
|
|
215
|
-
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
216
|
-
enumerable: false,
|
|
217
|
-
get: elementRefGetterWithDeprecationWarning
|
|
218
|
-
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
219
|
-
type._store = {};
|
|
220
|
-
Object.defineProperty(type._store, "validated", {
|
|
221
|
-
configurable: false,
|
|
222
|
-
enumerable: false,
|
|
223
|
-
writable: true,
|
|
224
|
-
value: 0
|
|
225
|
-
});
|
|
226
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
227
|
-
configurable: false,
|
|
228
|
-
enumerable: false,
|
|
229
|
-
writable: true,
|
|
230
|
-
value: null
|
|
231
|
-
});
|
|
232
|
-
Object.defineProperty(type, "_debugStack", {
|
|
233
|
-
configurable: false,
|
|
234
|
-
enumerable: false,
|
|
235
|
-
writable: true,
|
|
236
|
-
value: debugStack
|
|
237
|
-
});
|
|
238
|
-
Object.defineProperty(type, "_debugTask", {
|
|
239
|
-
configurable: false,
|
|
240
|
-
enumerable: false,
|
|
241
|
-
writable: true,
|
|
242
|
-
value: debugTask
|
|
243
|
-
});
|
|
244
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
245
|
-
return type;
|
|
246
|
-
}
|
|
247
|
-
function cloneAndReplaceKey(oldElement, newKey) {
|
|
248
|
-
newKey = ReactElement(
|
|
249
|
-
oldElement.type,
|
|
250
|
-
newKey,
|
|
251
|
-
oldElement.props,
|
|
252
|
-
oldElement._owner,
|
|
253
|
-
oldElement._debugStack,
|
|
254
|
-
oldElement._debugTask
|
|
255
|
-
);
|
|
256
|
-
oldElement._store && (newKey._store.validated = oldElement._store.validated);
|
|
257
|
-
return newKey;
|
|
258
|
-
}
|
|
259
|
-
function validateChildKeys(node) {
|
|
260
|
-
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
261
|
-
}
|
|
262
|
-
function isValidElement(object) {
|
|
263
|
-
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
264
|
-
}
|
|
265
|
-
function escape2(key) {
|
|
266
|
-
var escaperLookup = { "=": "=0", ":": "=2" };
|
|
267
|
-
return "$" + key.replace(/[=:]/g, function(match) {
|
|
268
|
-
return escaperLookup[match];
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
function getElementKey(element, index) {
|
|
272
|
-
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape2("" + element.key)) : index.toString(36);
|
|
273
|
-
}
|
|
274
|
-
function resolveThenable(thenable) {
|
|
275
|
-
switch (thenable.status) {
|
|
276
|
-
case "fulfilled":
|
|
277
|
-
return thenable.value;
|
|
278
|
-
case "rejected":
|
|
279
|
-
throw thenable.reason;
|
|
280
|
-
default:
|
|
281
|
-
switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(
|
|
282
|
-
function(fulfilledValue) {
|
|
283
|
-
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
|
284
|
-
},
|
|
285
|
-
function(error) {
|
|
286
|
-
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
287
|
-
}
|
|
288
|
-
)), thenable.status) {
|
|
289
|
-
case "fulfilled":
|
|
290
|
-
return thenable.value;
|
|
291
|
-
case "rejected":
|
|
292
|
-
throw thenable.reason;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
throw thenable;
|
|
296
|
-
}
|
|
297
|
-
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
298
|
-
var type = typeof children;
|
|
299
|
-
if ("undefined" === type || "boolean" === type) children = null;
|
|
300
|
-
var invokeCallback = false;
|
|
301
|
-
if (null === children) invokeCallback = true;
|
|
302
|
-
else
|
|
303
|
-
switch (type) {
|
|
304
|
-
case "bigint":
|
|
305
|
-
case "string":
|
|
306
|
-
case "number":
|
|
307
|
-
invokeCallback = true;
|
|
308
|
-
break;
|
|
309
|
-
case "object":
|
|
310
|
-
switch (children.$$typeof) {
|
|
311
|
-
case REACT_ELEMENT_TYPE:
|
|
312
|
-
case REACT_PORTAL_TYPE:
|
|
313
|
-
invokeCallback = true;
|
|
314
|
-
break;
|
|
315
|
-
case REACT_LAZY_TYPE:
|
|
316
|
-
return invokeCallback = children._init, mapIntoArray(
|
|
317
|
-
invokeCallback(children._payload),
|
|
318
|
-
array,
|
|
319
|
-
escapedPrefix,
|
|
320
|
-
nameSoFar,
|
|
321
|
-
callback
|
|
322
|
-
);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
if (invokeCallback) {
|
|
326
|
-
invokeCallback = children;
|
|
327
|
-
callback = callback(invokeCallback);
|
|
328
|
-
var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
|
329
|
-
isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
|
330
|
-
return c;
|
|
331
|
-
})) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(
|
|
332
|
-
callback,
|
|
333
|
-
escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(
|
|
334
|
-
userProvidedKeyEscapeRegex,
|
|
335
|
-
"$&/"
|
|
336
|
-
) + "/") + childKey
|
|
337
|
-
), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
|
|
338
|
-
return 1;
|
|
339
|
-
}
|
|
340
|
-
invokeCallback = 0;
|
|
341
|
-
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
|
342
|
-
if (isArrayImpl(children))
|
|
343
|
-
for (var i = 0; i < children.length; i++)
|
|
344
|
-
nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(
|
|
345
|
-
nameSoFar,
|
|
346
|
-
array,
|
|
347
|
-
escapedPrefix,
|
|
348
|
-
type,
|
|
349
|
-
callback
|
|
350
|
-
);
|
|
351
|
-
else if (i = getIteratorFn(children), "function" === typeof i)
|
|
352
|
-
for (i === children.entries && (didWarnAboutMaps || console.warn(
|
|
353
|
-
"Using Maps as children is not supported. Use an array of keyed ReactElements instead."
|
|
354
|
-
), didWarnAboutMaps = true), children = i.call(children), i = 0; !(nameSoFar = children.next()).done; )
|
|
355
|
-
nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(
|
|
356
|
-
nameSoFar,
|
|
357
|
-
array,
|
|
358
|
-
escapedPrefix,
|
|
359
|
-
type,
|
|
360
|
-
callback
|
|
361
|
-
);
|
|
362
|
-
else if ("object" === type) {
|
|
363
|
-
if ("function" === typeof children.then)
|
|
364
|
-
return mapIntoArray(
|
|
365
|
-
resolveThenable(children),
|
|
366
|
-
array,
|
|
367
|
-
escapedPrefix,
|
|
368
|
-
nameSoFar,
|
|
369
|
-
callback
|
|
370
|
-
);
|
|
371
|
-
array = String(children);
|
|
372
|
-
throw Error(
|
|
373
|
-
"Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
return invokeCallback;
|
|
377
|
-
}
|
|
378
|
-
function mapChildren(children, func, context) {
|
|
379
|
-
if (null == children) return children;
|
|
380
|
-
var result = [], count = 0;
|
|
381
|
-
mapIntoArray(children, result, "", "", function(child) {
|
|
382
|
-
return func.call(context, child, count++);
|
|
383
|
-
});
|
|
384
|
-
return result;
|
|
385
|
-
}
|
|
386
|
-
function lazyInitializer(payload) {
|
|
387
|
-
if (-1 === payload._status) {
|
|
388
|
-
var ioInfo = payload._ioInfo;
|
|
389
|
-
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
|
|
390
|
-
ioInfo = payload._result;
|
|
391
|
-
var thenable = ioInfo();
|
|
392
|
-
thenable.then(
|
|
393
|
-
function(moduleObject) {
|
|
394
|
-
if (0 === payload._status || -1 === payload._status) {
|
|
395
|
-
payload._status = 1;
|
|
396
|
-
payload._result = moduleObject;
|
|
397
|
-
var _ioInfo = payload._ioInfo;
|
|
398
|
-
null != _ioInfo && (_ioInfo.end = performance.now());
|
|
399
|
-
void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
function(error) {
|
|
403
|
-
if (0 === payload._status || -1 === payload._status) {
|
|
404
|
-
payload._status = 2;
|
|
405
|
-
payload._result = error;
|
|
406
|
-
var _ioInfo2 = payload._ioInfo;
|
|
407
|
-
null != _ioInfo2 && (_ioInfo2.end = performance.now());
|
|
408
|
-
void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
);
|
|
412
|
-
ioInfo = payload._ioInfo;
|
|
413
|
-
if (null != ioInfo) {
|
|
414
|
-
ioInfo.value = thenable;
|
|
415
|
-
var displayName = thenable.displayName;
|
|
416
|
-
"string" === typeof displayName && (ioInfo.name = displayName);
|
|
417
|
-
}
|
|
418
|
-
-1 === payload._status && (payload._status = 0, payload._result = thenable);
|
|
419
|
-
}
|
|
420
|
-
if (1 === payload._status)
|
|
421
|
-
return ioInfo = payload._result, void 0 === ioInfo && console.error(
|
|
422
|
-
"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?",
|
|
423
|
-
ioInfo
|
|
424
|
-
), "default" in ioInfo || console.error(
|
|
425
|
-
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
|
|
426
|
-
ioInfo
|
|
427
|
-
), ioInfo.default;
|
|
428
|
-
throw payload._result;
|
|
429
|
-
}
|
|
430
|
-
function resolveDispatcher() {
|
|
431
|
-
var dispatcher = ReactSharedInternals.H;
|
|
432
|
-
null === dispatcher && console.error(
|
|
433
|
-
"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."
|
|
434
|
-
);
|
|
435
|
-
return dispatcher;
|
|
436
|
-
}
|
|
437
|
-
function releaseAsyncTransition() {
|
|
438
|
-
ReactSharedInternals.asyncTransitions--;
|
|
439
|
-
}
|
|
440
|
-
function enqueueTask(task) {
|
|
441
|
-
if (null === enqueueTaskImpl)
|
|
442
|
-
try {
|
|
443
|
-
var requireString = ("require" + Math.random()).slice(0, 7);
|
|
444
|
-
enqueueTaskImpl = (module && module[requireString]).call(
|
|
445
|
-
module,
|
|
446
|
-
"timers"
|
|
447
|
-
).setImmediate;
|
|
448
|
-
} catch (_err) {
|
|
449
|
-
enqueueTaskImpl = function(callback) {
|
|
450
|
-
false === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = true, "undefined" === typeof MessageChannel && console.error(
|
|
451
|
-
"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."
|
|
452
|
-
));
|
|
453
|
-
var channel = new MessageChannel();
|
|
454
|
-
channel.port1.onmessage = callback;
|
|
455
|
-
channel.port2.postMessage(void 0);
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
return enqueueTaskImpl(task);
|
|
459
|
-
}
|
|
460
|
-
function aggregateErrors(errors) {
|
|
461
|
-
return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
|
|
462
|
-
}
|
|
463
|
-
function popActScope(prevActQueue, prevActScopeDepth) {
|
|
464
|
-
prevActScopeDepth !== actScopeDepth - 1 && console.error(
|
|
465
|
-
"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
|
|
466
|
-
);
|
|
467
|
-
actScopeDepth = prevActScopeDepth;
|
|
468
|
-
}
|
|
469
|
-
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
470
|
-
var queue = ReactSharedInternals.actQueue;
|
|
471
|
-
if (null !== queue)
|
|
472
|
-
if (0 !== queue.length)
|
|
473
|
-
try {
|
|
474
|
-
flushActQueue(queue);
|
|
475
|
-
enqueueTask(function() {
|
|
476
|
-
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
477
|
-
});
|
|
478
|
-
return;
|
|
479
|
-
} catch (error) {
|
|
480
|
-
ReactSharedInternals.thrownErrors.push(error);
|
|
481
|
-
}
|
|
482
|
-
else ReactSharedInternals.actQueue = null;
|
|
483
|
-
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
|
|
484
|
-
}
|
|
485
|
-
function flushActQueue(queue) {
|
|
486
|
-
if (!isFlushing) {
|
|
487
|
-
isFlushing = true;
|
|
488
|
-
var i = 0;
|
|
489
|
-
try {
|
|
490
|
-
for (; i < queue.length; i++) {
|
|
491
|
-
var callback = queue[i];
|
|
492
|
-
do {
|
|
493
|
-
ReactSharedInternals.didUsePromise = false;
|
|
494
|
-
var continuation = callback(false);
|
|
495
|
-
if (null !== continuation) {
|
|
496
|
-
if (ReactSharedInternals.didUsePromise) {
|
|
497
|
-
queue[i] = callback;
|
|
498
|
-
queue.splice(0, i);
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
501
|
-
callback = continuation;
|
|
502
|
-
} else break;
|
|
503
|
-
} while (1);
|
|
504
|
-
}
|
|
505
|
-
queue.length = 0;
|
|
506
|
-
} catch (error) {
|
|
507
|
-
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
|
508
|
-
} finally {
|
|
509
|
-
isFlushing = false;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
514
|
-
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
|
|
515
|
-
isMounted: function() {
|
|
516
|
-
return false;
|
|
517
|
-
},
|
|
518
|
-
enqueueForceUpdate: function(publicInstance) {
|
|
519
|
-
warnNoop(publicInstance, "forceUpdate");
|
|
520
|
-
},
|
|
521
|
-
enqueueReplaceState: function(publicInstance) {
|
|
522
|
-
warnNoop(publicInstance, "replaceState");
|
|
523
|
-
},
|
|
524
|
-
enqueueSetState: function(publicInstance) {
|
|
525
|
-
warnNoop(publicInstance, "setState");
|
|
526
|
-
}
|
|
527
|
-
}, assign = Object.assign, emptyObject = {};
|
|
528
|
-
Object.freeze(emptyObject);
|
|
529
|
-
Component.prototype.isReactComponent = {};
|
|
530
|
-
Component.prototype.setState = function(partialState, callback) {
|
|
531
|
-
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState)
|
|
532
|
-
throw Error(
|
|
533
|
-
"takes an object of state variables to update or a function which returns an object of state variables."
|
|
534
|
-
);
|
|
535
|
-
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
|
536
|
-
};
|
|
537
|
-
Component.prototype.forceUpdate = function(callback) {
|
|
538
|
-
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
|
539
|
-
};
|
|
540
|
-
var deprecatedAPIs = {
|
|
541
|
-
isMounted: [
|
|
542
|
-
"isMounted",
|
|
543
|
-
"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
|
|
544
|
-
],
|
|
545
|
-
replaceState: [
|
|
546
|
-
"replaceState",
|
|
547
|
-
"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
|
|
548
|
-
]
|
|
549
|
-
};
|
|
550
|
-
for (fnName in deprecatedAPIs)
|
|
551
|
-
deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
552
|
-
ComponentDummy.prototype = Component.prototype;
|
|
553
|
-
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
|
|
554
|
-
deprecatedAPIs.constructor = PureComponent;
|
|
555
|
-
assign(deprecatedAPIs, Component.prototype);
|
|
556
|
-
deprecatedAPIs.isPureReactComponent = true;
|
|
557
|
-
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), ReactSharedInternals = {
|
|
558
|
-
H: null,
|
|
559
|
-
A: null,
|
|
560
|
-
T: null,
|
|
561
|
-
S: null,
|
|
562
|
-
actQueue: null,
|
|
563
|
-
asyncTransitions: 0,
|
|
564
|
-
isBatchingLegacy: false,
|
|
565
|
-
didScheduleLegacyUpdate: false,
|
|
566
|
-
didUsePromise: false,
|
|
567
|
-
thrownErrors: [],
|
|
568
|
-
getCurrentStack: null,
|
|
569
|
-
recentlyCreatedOwnerStacks: 0
|
|
570
|
-
}, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
|
|
571
|
-
return null;
|
|
572
|
-
};
|
|
573
|
-
deprecatedAPIs = {
|
|
574
|
-
react_stack_bottom_frame: function(callStackForError) {
|
|
575
|
-
return callStackForError();
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
|
579
|
-
var didWarnAboutElementRef = {};
|
|
580
|
-
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
|
|
581
|
-
deprecatedAPIs,
|
|
582
|
-
UnknownOwner
|
|
583
|
-
)();
|
|
584
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
585
|
-
var didWarnAboutMaps = false, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
|
586
|
-
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
|
587
|
-
var event = new window.ErrorEvent("error", {
|
|
588
|
-
bubbles: true,
|
|
589
|
-
cancelable: true,
|
|
590
|
-
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
|
|
591
|
-
error
|
|
592
|
-
});
|
|
593
|
-
if (!window.dispatchEvent(event)) return;
|
|
594
|
-
} else if ("object" === typeof process && "function" === typeof process.emit) {
|
|
595
|
-
process.emit("uncaughtException", error);
|
|
596
|
-
return;
|
|
597
|
-
}
|
|
598
|
-
console.error(error);
|
|
599
|
-
}, didWarnAboutMessageChannel = false, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = false, isFlushing = false, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
|
|
600
|
-
queueMicrotask(function() {
|
|
601
|
-
return queueMicrotask(callback);
|
|
602
|
-
});
|
|
603
|
-
} : enqueueTask;
|
|
604
|
-
deprecatedAPIs = Object.freeze({
|
|
605
|
-
__proto__: null,
|
|
606
|
-
c: function(size) {
|
|
607
|
-
return resolveDispatcher().useMemoCache(size);
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
|
-
var fnName = {
|
|
611
|
-
map: mapChildren,
|
|
612
|
-
forEach: function(children, forEachFunc, forEachContext) {
|
|
613
|
-
mapChildren(
|
|
614
|
-
children,
|
|
615
|
-
function() {
|
|
616
|
-
forEachFunc.apply(this, arguments);
|
|
617
|
-
},
|
|
618
|
-
forEachContext
|
|
619
|
-
);
|
|
620
|
-
},
|
|
621
|
-
count: function(children) {
|
|
622
|
-
var n = 0;
|
|
623
|
-
mapChildren(children, function() {
|
|
624
|
-
n++;
|
|
625
|
-
});
|
|
626
|
-
return n;
|
|
627
|
-
},
|
|
628
|
-
toArray: function(children) {
|
|
629
|
-
return mapChildren(children, function(child) {
|
|
630
|
-
return child;
|
|
631
|
-
}) || [];
|
|
632
|
-
},
|
|
633
|
-
only: function(children) {
|
|
634
|
-
if (!isValidElement(children))
|
|
635
|
-
throw Error(
|
|
636
|
-
"React.Children.only expected to receive a single React element child."
|
|
637
|
-
);
|
|
638
|
-
return children;
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
exports.Activity = REACT_ACTIVITY_TYPE;
|
|
642
|
-
exports.Children = fnName;
|
|
643
|
-
exports.Component = Component;
|
|
644
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
645
|
-
exports.Profiler = REACT_PROFILER_TYPE;
|
|
646
|
-
exports.PureComponent = PureComponent;
|
|
647
|
-
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
648
|
-
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
649
|
-
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
|
650
|
-
exports.__COMPILER_RUNTIME = deprecatedAPIs;
|
|
651
|
-
exports.act = function(callback) {
|
|
652
|
-
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
|
|
653
|
-
actScopeDepth++;
|
|
654
|
-
var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = false;
|
|
655
|
-
try {
|
|
656
|
-
var result = callback();
|
|
657
|
-
} catch (error) {
|
|
658
|
-
ReactSharedInternals.thrownErrors.push(error);
|
|
659
|
-
}
|
|
660
|
-
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
661
|
-
throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
662
|
-
if (null !== result && "object" === typeof result && "function" === typeof result.then) {
|
|
663
|
-
var thenable = result;
|
|
664
|
-
queueSeveralMicrotasks(function() {
|
|
665
|
-
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
|
|
666
|
-
"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 () => ...);"
|
|
667
|
-
));
|
|
668
|
-
});
|
|
669
|
-
return {
|
|
670
|
-
then: function(resolve, reject) {
|
|
671
|
-
didAwaitActCall = true;
|
|
672
|
-
thenable.then(
|
|
673
|
-
function(returnValue) {
|
|
674
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
675
|
-
if (0 === prevActScopeDepth) {
|
|
676
|
-
try {
|
|
677
|
-
flushActQueue(queue), enqueueTask(function() {
|
|
678
|
-
return recursivelyFlushAsyncActWork(
|
|
679
|
-
returnValue,
|
|
680
|
-
resolve,
|
|
681
|
-
reject
|
|
682
|
-
);
|
|
683
|
-
});
|
|
684
|
-
} catch (error$0) {
|
|
685
|
-
ReactSharedInternals.thrownErrors.push(error$0);
|
|
686
|
-
}
|
|
687
|
-
if (0 < ReactSharedInternals.thrownErrors.length) {
|
|
688
|
-
var _thrownError = aggregateErrors(
|
|
689
|
-
ReactSharedInternals.thrownErrors
|
|
690
|
-
);
|
|
691
|
-
ReactSharedInternals.thrownErrors.length = 0;
|
|
692
|
-
reject(_thrownError);
|
|
693
|
-
}
|
|
694
|
-
} else resolve(returnValue);
|
|
695
|
-
},
|
|
696
|
-
function(error) {
|
|
697
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
698
|
-
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(
|
|
699
|
-
ReactSharedInternals.thrownErrors
|
|
700
|
-
), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
|
|
701
|
-
}
|
|
702
|
-
);
|
|
703
|
-
}
|
|
704
|
-
};
|
|
705
|
-
}
|
|
706
|
-
var returnValue$jscomp$0 = result;
|
|
707
|
-
popActScope(prevActQueue, prevActScopeDepth);
|
|
708
|
-
0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
|
|
709
|
-
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error(
|
|
710
|
-
"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(() => ...)"
|
|
711
|
-
));
|
|
712
|
-
}), ReactSharedInternals.actQueue = null);
|
|
713
|
-
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
714
|
-
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
715
|
-
return {
|
|
716
|
-
then: function(resolve, reject) {
|
|
717
|
-
didAwaitActCall = true;
|
|
718
|
-
0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
|
719
|
-
return recursivelyFlushAsyncActWork(
|
|
720
|
-
returnValue$jscomp$0,
|
|
721
|
-
resolve,
|
|
722
|
-
reject
|
|
723
|
-
);
|
|
724
|
-
})) : resolve(returnValue$jscomp$0);
|
|
725
|
-
}
|
|
726
|
-
};
|
|
727
|
-
};
|
|
728
|
-
exports.cache = function(fn) {
|
|
729
|
-
return function() {
|
|
730
|
-
return fn.apply(null, arguments);
|
|
731
|
-
};
|
|
732
|
-
};
|
|
733
|
-
exports.cacheSignal = function() {
|
|
734
|
-
return null;
|
|
735
|
-
};
|
|
736
|
-
exports.captureOwnerStack = function() {
|
|
737
|
-
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
|
738
|
-
return null === getCurrentStack ? null : getCurrentStack();
|
|
739
|
-
};
|
|
740
|
-
exports.cloneElement = function(element, config, children) {
|
|
741
|
-
if (null === element || void 0 === element)
|
|
742
|
-
throw Error(
|
|
743
|
-
"The argument must be a React element, but you passed " + element + "."
|
|
744
|
-
);
|
|
745
|
-
var props = assign({}, element.props), key = element.key, owner = element._owner;
|
|
746
|
-
if (null != config) {
|
|
747
|
-
var JSCompiler_inline_result;
|
|
748
|
-
a: {
|
|
749
|
-
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
|
|
750
|
-
config,
|
|
751
|
-
"ref"
|
|
752
|
-
).get) && JSCompiler_inline_result.isReactWarning) {
|
|
753
|
-
JSCompiler_inline_result = false;
|
|
754
|
-
break a;
|
|
755
|
-
}
|
|
756
|
-
JSCompiler_inline_result = void 0 !== config.ref;
|
|
757
|
-
}
|
|
758
|
-
JSCompiler_inline_result && (owner = getOwner());
|
|
759
|
-
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
|
|
760
|
-
for (propName in config)
|
|
761
|
-
!hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
762
|
-
}
|
|
763
|
-
var propName = arguments.length - 2;
|
|
764
|
-
if (1 === propName) props.children = children;
|
|
765
|
-
else if (1 < propName) {
|
|
766
|
-
JSCompiler_inline_result = Array(propName);
|
|
767
|
-
for (var i = 0; i < propName; i++)
|
|
768
|
-
JSCompiler_inline_result[i] = arguments[i + 2];
|
|
769
|
-
props.children = JSCompiler_inline_result;
|
|
770
|
-
}
|
|
771
|
-
props = ReactElement(
|
|
772
|
-
element.type,
|
|
773
|
-
key,
|
|
774
|
-
props,
|
|
775
|
-
owner,
|
|
776
|
-
element._debugStack,
|
|
777
|
-
element._debugTask
|
|
778
|
-
);
|
|
779
|
-
for (key = 2; key < arguments.length; key++)
|
|
780
|
-
validateChildKeys(arguments[key]);
|
|
781
|
-
return props;
|
|
782
|
-
};
|
|
783
|
-
exports.createContext = function(defaultValue) {
|
|
784
|
-
defaultValue = {
|
|
785
|
-
$$typeof: REACT_CONTEXT_TYPE,
|
|
786
|
-
_currentValue: defaultValue,
|
|
787
|
-
_currentValue2: defaultValue,
|
|
788
|
-
_threadCount: 0,
|
|
789
|
-
Provider: null,
|
|
790
|
-
Consumer: null
|
|
791
|
-
};
|
|
792
|
-
defaultValue.Provider = defaultValue;
|
|
793
|
-
defaultValue.Consumer = {
|
|
794
|
-
$$typeof: REACT_CONSUMER_TYPE,
|
|
795
|
-
_context: defaultValue
|
|
796
|
-
};
|
|
797
|
-
defaultValue._currentRenderer = null;
|
|
798
|
-
defaultValue._currentRenderer2 = null;
|
|
799
|
-
return defaultValue;
|
|
800
|
-
};
|
|
801
|
-
exports.createElement = function(type, config, children) {
|
|
802
|
-
for (var i = 2; i < arguments.length; i++)
|
|
803
|
-
validateChildKeys(arguments[i]);
|
|
804
|
-
i = {};
|
|
805
|
-
var key = null;
|
|
806
|
-
if (null != config)
|
|
807
|
-
for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = true, console.warn(
|
|
808
|
-
"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"
|
|
809
|
-
)), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config)
|
|
810
|
-
hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
|
|
811
|
-
var childrenLength = arguments.length - 2;
|
|
812
|
-
if (1 === childrenLength) i.children = children;
|
|
813
|
-
else if (1 < childrenLength) {
|
|
814
|
-
for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++)
|
|
815
|
-
childArray[_i] = arguments[_i + 2];
|
|
816
|
-
Object.freeze && Object.freeze(childArray);
|
|
817
|
-
i.children = childArray;
|
|
818
|
-
}
|
|
819
|
-
if (type && type.defaultProps)
|
|
820
|
-
for (propName in childrenLength = type.defaultProps, childrenLength)
|
|
821
|
-
void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
|
822
|
-
key && defineKeyPropWarningGetter(
|
|
823
|
-
i,
|
|
824
|
-
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
825
|
-
);
|
|
826
|
-
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
827
|
-
return ReactElement(
|
|
828
|
-
type,
|
|
829
|
-
key,
|
|
830
|
-
i,
|
|
831
|
-
getOwner(),
|
|
832
|
-
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
833
|
-
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
834
|
-
);
|
|
835
|
-
};
|
|
836
|
-
exports.createRef = function() {
|
|
837
|
-
var refObject = { current: null };
|
|
838
|
-
Object.seal(refObject);
|
|
839
|
-
return refObject;
|
|
840
|
-
};
|
|
841
|
-
exports.forwardRef = function(render) {
|
|
842
|
-
null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error(
|
|
843
|
-
"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
|
|
844
|
-
) : "function" !== typeof render ? console.error(
|
|
845
|
-
"forwardRef requires a render function but was given %s.",
|
|
846
|
-
null === render ? "null" : typeof render
|
|
847
|
-
) : 0 !== render.length && 2 !== render.length && console.error(
|
|
848
|
-
"forwardRef render functions accept exactly two parameters: props and ref. %s",
|
|
849
|
-
1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."
|
|
850
|
-
);
|
|
851
|
-
null != render && null != render.defaultProps && console.error(
|
|
852
|
-
"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
|
|
853
|
-
);
|
|
854
|
-
var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render }, ownName;
|
|
855
|
-
Object.defineProperty(elementType, "displayName", {
|
|
856
|
-
enumerable: false,
|
|
857
|
-
configurable: true,
|
|
858
|
-
get: function() {
|
|
859
|
-
return ownName;
|
|
860
|
-
},
|
|
861
|
-
set: function(name) {
|
|
862
|
-
ownName = name;
|
|
863
|
-
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
return elementType;
|
|
867
|
-
};
|
|
868
|
-
exports.isValidElement = isValidElement;
|
|
869
|
-
exports.lazy = function(ctor) {
|
|
870
|
-
ctor = { _status: -1, _result: ctor };
|
|
871
|
-
var lazyType = {
|
|
872
|
-
$$typeof: REACT_LAZY_TYPE,
|
|
873
|
-
_payload: ctor,
|
|
874
|
-
_init: lazyInitializer
|
|
875
|
-
}, ioInfo = {
|
|
876
|
-
name: "lazy",
|
|
877
|
-
start: -1,
|
|
878
|
-
end: -1,
|
|
879
|
-
value: null,
|
|
880
|
-
owner: null,
|
|
881
|
-
debugStack: Error("react-stack-top-frame"),
|
|
882
|
-
debugTask: console.createTask ? console.createTask("lazy()") : null
|
|
883
|
-
};
|
|
884
|
-
ctor._ioInfo = ioInfo;
|
|
885
|
-
lazyType._debugInfo = [{ awaited: ioInfo }];
|
|
886
|
-
return lazyType;
|
|
887
|
-
};
|
|
888
|
-
exports.memo = function(type, compare) {
|
|
889
|
-
null == type && console.error(
|
|
890
|
-
"memo: The first argument must be a component. Instead received: %s",
|
|
891
|
-
null === type ? "null" : typeof type
|
|
892
|
-
);
|
|
893
|
-
compare = {
|
|
894
|
-
$$typeof: REACT_MEMO_TYPE,
|
|
895
|
-
type,
|
|
896
|
-
compare: void 0 === compare ? null : compare
|
|
897
|
-
};
|
|
898
|
-
var ownName;
|
|
899
|
-
Object.defineProperty(compare, "displayName", {
|
|
900
|
-
enumerable: false,
|
|
901
|
-
configurable: true,
|
|
902
|
-
get: function() {
|
|
903
|
-
return ownName;
|
|
904
|
-
},
|
|
905
|
-
set: function(name) {
|
|
906
|
-
ownName = name;
|
|
907
|
-
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
|
|
908
|
-
}
|
|
909
|
-
});
|
|
910
|
-
return compare;
|
|
911
|
-
};
|
|
912
|
-
exports.startTransition = function(scope) {
|
|
913
|
-
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
|
914
|
-
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
|
|
915
|
-
ReactSharedInternals.T = currentTransition;
|
|
916
|
-
try {
|
|
917
|
-
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
|
918
|
-
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
|
919
|
-
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
|
|
920
|
-
} catch (error) {
|
|
921
|
-
reportGlobalError(error);
|
|
922
|
-
} finally {
|
|
923
|
-
null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn(
|
|
924
|
-
"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."
|
|
925
|
-
)), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
|
|
926
|
-
"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."
|
|
927
|
-
), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
|
928
|
-
}
|
|
929
|
-
};
|
|
930
|
-
exports.unstable_useCacheRefresh = function() {
|
|
931
|
-
return resolveDispatcher().useCacheRefresh();
|
|
932
|
-
};
|
|
933
|
-
exports.use = function(usable) {
|
|
934
|
-
return resolveDispatcher().use(usable);
|
|
935
|
-
};
|
|
936
|
-
exports.useActionState = function(action, initialState, permalink) {
|
|
937
|
-
return resolveDispatcher().useActionState(
|
|
938
|
-
action,
|
|
939
|
-
initialState,
|
|
940
|
-
permalink
|
|
941
|
-
);
|
|
942
|
-
};
|
|
943
|
-
exports.useCallback = function(callback, deps) {
|
|
944
|
-
return resolveDispatcher().useCallback(callback, deps);
|
|
945
|
-
};
|
|
946
|
-
exports.useContext = function(Context) {
|
|
947
|
-
var dispatcher = resolveDispatcher();
|
|
948
|
-
Context.$$typeof === REACT_CONSUMER_TYPE && console.error(
|
|
949
|
-
"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
|
|
950
|
-
);
|
|
951
|
-
return dispatcher.useContext(Context);
|
|
952
|
-
};
|
|
953
|
-
exports.useDebugValue = function(value, formatterFn) {
|
|
954
|
-
return resolveDispatcher().useDebugValue(value, formatterFn);
|
|
955
|
-
};
|
|
956
|
-
exports.useDeferredValue = function(value, initialValue) {
|
|
957
|
-
return resolveDispatcher().useDeferredValue(value, initialValue);
|
|
958
|
-
};
|
|
959
|
-
exports.useEffect = function(create, deps) {
|
|
960
|
-
null == create && console.warn(
|
|
961
|
-
"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
962
|
-
);
|
|
963
|
-
return resolveDispatcher().useEffect(create, deps);
|
|
964
|
-
};
|
|
965
|
-
exports.useEffectEvent = function(callback) {
|
|
966
|
-
return resolveDispatcher().useEffectEvent(callback);
|
|
967
|
-
};
|
|
968
|
-
exports.useId = function() {
|
|
969
|
-
return resolveDispatcher().useId();
|
|
970
|
-
};
|
|
971
|
-
exports.useImperativeHandle = function(ref, create, deps) {
|
|
972
|
-
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
|
973
|
-
};
|
|
974
|
-
exports.useInsertionEffect = function(create, deps) {
|
|
975
|
-
null == create && console.warn(
|
|
976
|
-
"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
977
|
-
);
|
|
978
|
-
return resolveDispatcher().useInsertionEffect(create, deps);
|
|
979
|
-
};
|
|
980
|
-
exports.useLayoutEffect = function(create, deps) {
|
|
981
|
-
null == create && console.warn(
|
|
982
|
-
"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
|
|
983
|
-
);
|
|
984
|
-
return resolveDispatcher().useLayoutEffect(create, deps);
|
|
985
|
-
};
|
|
986
|
-
exports.useMemo = function(create, deps) {
|
|
987
|
-
return resolveDispatcher().useMemo(create, deps);
|
|
988
|
-
};
|
|
989
|
-
exports.useOptimistic = function(passthrough, reducer) {
|
|
990
|
-
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
|
991
|
-
};
|
|
992
|
-
exports.useReducer = function(reducer, initialArg, init) {
|
|
993
|
-
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
|
994
|
-
};
|
|
995
|
-
exports.useRef = function(initialValue) {
|
|
996
|
-
return resolveDispatcher().useRef(initialValue);
|
|
997
|
-
};
|
|
998
|
-
exports.useState = function(initialState) {
|
|
999
|
-
return resolveDispatcher().useState(initialState);
|
|
1000
|
-
};
|
|
1001
|
-
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
|
1002
|
-
return resolveDispatcher().useSyncExternalStore(
|
|
1003
|
-
subscribe,
|
|
1004
|
-
getSnapshot,
|
|
1005
|
-
getServerSnapshot
|
|
1006
|
-
);
|
|
1007
|
-
};
|
|
1008
|
-
exports.useTransition = function() {
|
|
1009
|
-
return resolveDispatcher().useTransition();
|
|
1010
|
-
};
|
|
1011
|
-
exports.version = "19.2.7";
|
|
1012
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1013
|
-
})();
|
|
1014
|
-
}
|
|
1015
|
-
});
|
|
1016
|
-
|
|
1017
|
-
// node_modules/react/index.js
|
|
1018
|
-
var require_react = __commonJS({
|
|
1019
|
-
"node_modules/react/index.js"(exports, module) {
|
|
1020
|
-
"use strict";
|
|
1021
|
-
if (false) {
|
|
1022
|
-
module.exports = null;
|
|
1023
|
-
} else {
|
|
1024
|
-
module.exports = require_react_development();
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
});
|
|
1028
|
-
|
|
1029
28
|
// node_modules/@capacitor/core/dist/index.js
|
|
1030
29
|
var ExceptionCode, CapacitorException, getPlatformId, createCapacitor, initCapacitorGlobal, Capacitor, registerPlugin, WebPlugin, encode, decode, CapacitorCookiesPluginWeb, CapacitorCookies, readBlobAsBase64, normalizeHttpHeaders, buildUrlParams, buildRequestInit, CapacitorHttpPluginWeb, CapacitorHttp, SystemBarsStyle, SystemBarType, SystemBarsPluginWeb, SystemBars;
|
|
1031
30
|
var init_dist = __esm({
|
|
@@ -1804,9 +803,6 @@ var Tevroc = (() => {
|
|
|
1804
803
|
createClient: () => createClient
|
|
1805
804
|
});
|
|
1806
805
|
|
|
1807
|
-
// src/services/useGoogleAuth.js
|
|
1808
|
-
var import_react = __toESM(require_react(), 1);
|
|
1809
|
-
|
|
1810
806
|
// node_modules/@capacitor/app/dist/esm/index.js
|
|
1811
807
|
init_dist();
|
|
1812
808
|
var App = registerPlugin("App", {
|
|
@@ -4522,6 +3518,7 @@ var Tevroc = (() => {
|
|
|
4522
3518
|
var isTauri = platform === "tauri";
|
|
4523
3519
|
|
|
4524
3520
|
// src/services/useGoogleAuth.js
|
|
3521
|
+
var googleInitialized = false;
|
|
4525
3522
|
var googleListeners = [];
|
|
4526
3523
|
function emitGoogleLogin(user, err = null) {
|
|
4527
3524
|
googleListeners.forEach((cb) => {
|
|
@@ -4540,39 +3537,6 @@ var Tevroc = (() => {
|
|
|
4540
3537
|
};
|
|
4541
3538
|
}
|
|
4542
3539
|
var authWindowRef = null;
|
|
4543
|
-
var createGoogleLogin = async ({
|
|
4544
|
-
appId = "tevrocsoft",
|
|
4545
|
-
serviceUrl = "https://tevrocsoftapi.netlify.app"
|
|
4546
|
-
} = {}) => {
|
|
4547
|
-
let authUrl = `${serviceUrl}/login?mode=mobile&app=${appId}`;
|
|
4548
|
-
if (isCapacitor) {
|
|
4549
|
-
await Browser2.open({ url: authUrl });
|
|
4550
|
-
return;
|
|
4551
|
-
}
|
|
4552
|
-
if (isTauri) {
|
|
4553
|
-
const url = `${serviceUrl}/login?mode=desktop&app=${appId}`;
|
|
4554
|
-
const win = new WebviewWindow("auth", {
|
|
4555
|
-
url,
|
|
4556
|
-
title: "Tevroc Login",
|
|
4557
|
-
width: 550,
|
|
4558
|
-
height: 500,
|
|
4559
|
-
resizable: true,
|
|
4560
|
-
center: true
|
|
4561
|
-
});
|
|
4562
|
-
authWindowRef = win;
|
|
4563
|
-
win.once("tauri://created", () => {
|
|
4564
|
-
console.log("Auth window opened");
|
|
4565
|
-
});
|
|
4566
|
-
win.once("tauri://error", (e) => {
|
|
4567
|
-
console.error("Auth window error:", e);
|
|
4568
|
-
});
|
|
4569
|
-
return;
|
|
4570
|
-
}
|
|
4571
|
-
const isLocalhost = window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1";
|
|
4572
|
-
const mode = isLocalhost ? "localhost" : "netlify";
|
|
4573
|
-
authUrl = `${serviceUrl}/login?mode=${mode}&app=${appId}`;
|
|
4574
|
-
window.location.href = authUrl;
|
|
4575
|
-
};
|
|
4576
3540
|
var handleCallback = async (url) => {
|
|
4577
3541
|
try {
|
|
4578
3542
|
if (!url?.includes("token=")) return;
|
|
@@ -4602,19 +3566,17 @@ var Tevroc = (() => {
|
|
|
4602
3566
|
emitGoogleLogin(null, err);
|
|
4603
3567
|
}
|
|
4604
3568
|
};
|
|
4605
|
-
|
|
4606
|
-
if (
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
if (
|
|
4614
|
-
let unlisten;
|
|
4615
|
-
const setup = async () => {
|
|
3569
|
+
var initializeGoogleLogin = async () => {
|
|
3570
|
+
if (googleInitialized) return;
|
|
3571
|
+
googleInitialized = true;
|
|
3572
|
+
if (isCapacitor) {
|
|
3573
|
+
App.addListener("appUrlOpen", (event) => {
|
|
3574
|
+
handleCallback(event.url);
|
|
3575
|
+
});
|
|
3576
|
+
}
|
|
3577
|
+
if (isTauri) {
|
|
4616
3578
|
const { listen: listen2 } = await Promise.resolve().then(() => (init_event(), event_exports));
|
|
4617
|
-
|
|
3579
|
+
await listen2("deep-link://open-url", async (event) => {
|
|
4618
3580
|
let url = event.payload;
|
|
4619
3581
|
if (typeof url === "object") {
|
|
4620
3582
|
url = url?.url || url?.payload || null;
|
|
@@ -4629,16 +3591,57 @@ var Tevroc = (() => {
|
|
|
4629
3591
|
}
|
|
4630
3592
|
handleCallback(url);
|
|
4631
3593
|
});
|
|
4632
|
-
}
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
}
|
|
3594
|
+
}
|
|
3595
|
+
};
|
|
3596
|
+
var createGoogleLogin = async ({
|
|
3597
|
+
appId = "tevrocsoft",
|
|
3598
|
+
serviceUrl = "https://tevrocsoftapi.netlify.app"
|
|
3599
|
+
} = {}) => {
|
|
3600
|
+
console.log(isCapacitor, isTauri);
|
|
3601
|
+
return;
|
|
3602
|
+
await initializeGoogleLogin();
|
|
3603
|
+
let authUrl = `${serviceUrl}/login?mode=mobile&app=${appId}`;
|
|
3604
|
+
if (isCapacitor) {
|
|
3605
|
+
await Browser2.open({ url: authUrl });
|
|
3606
|
+
return;
|
|
3607
|
+
}
|
|
3608
|
+
if (isTauri) {
|
|
3609
|
+
const url = `${serviceUrl}/login?mode=desktop&app=${appId}`;
|
|
3610
|
+
const win = new WebviewWindow("auth", {
|
|
3611
|
+
url,
|
|
3612
|
+
title: "Tevroc Login",
|
|
3613
|
+
width: 550,
|
|
3614
|
+
height: 500,
|
|
3615
|
+
resizable: true,
|
|
3616
|
+
center: true
|
|
3617
|
+
});
|
|
3618
|
+
authWindowRef = win;
|
|
3619
|
+
win.once("tauri://created", () => {
|
|
3620
|
+
console.log("Auth window opened");
|
|
3621
|
+
});
|
|
3622
|
+
win.once("tauri://error", (e) => {
|
|
3623
|
+
console.error("Auth window error:", e);
|
|
3624
|
+
});
|
|
3625
|
+
return;
|
|
3626
|
+
}
|
|
3627
|
+
const isLocalhost = window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1";
|
|
3628
|
+
const mode = isLocalhost ? "localhost" : "netlify";
|
|
3629
|
+
authUrl = `${serviceUrl}/login?mode=${mode}&app=${appId}`;
|
|
3630
|
+
window.location.href = authUrl;
|
|
3631
|
+
};
|
|
4638
3632
|
|
|
4639
3633
|
// src/services/useYocoPayment.js
|
|
4640
|
-
var
|
|
3634
|
+
var paymentInitialized = false;
|
|
4641
3635
|
var paymentStatusListeners = [];
|
|
3636
|
+
function emitPaymentStatus(status, err = null) {
|
|
3637
|
+
paymentStatusListeners.forEach((cb) => {
|
|
3638
|
+
try {
|
|
3639
|
+
cb(status, err);
|
|
3640
|
+
} catch (e) {
|
|
3641
|
+
console.error("Payment listener error:", e);
|
|
3642
|
+
}
|
|
3643
|
+
});
|
|
3644
|
+
}
|
|
4642
3645
|
function subscribePaymentStatus(cb) {
|
|
4643
3646
|
paymentStatusListeners.push(cb);
|
|
4644
3647
|
return () => {
|
|
@@ -4647,10 +3650,79 @@ var Tevroc = (() => {
|
|
|
4647
3650
|
};
|
|
4648
3651
|
}
|
|
4649
3652
|
var paymentWindowRef = null;
|
|
3653
|
+
var logs = [];
|
|
3654
|
+
var addLog = (...msgs) => {
|
|
3655
|
+
msgs.forEach((m) => {
|
|
3656
|
+
const log = {
|
|
3657
|
+
message: m,
|
|
3658
|
+
time: (/* @__PURE__ */ new Date()).toISOString()
|
|
3659
|
+
};
|
|
3660
|
+
logs.push(log);
|
|
3661
|
+
console.log(log);
|
|
3662
|
+
});
|
|
3663
|
+
};
|
|
3664
|
+
var handlePaymentCallback = async (url, externalCallback = () => {
|
|
3665
|
+
}) => {
|
|
3666
|
+
try {
|
|
3667
|
+
addLog("PAYMENT CALLBACK:", url);
|
|
3668
|
+
if (!url?.includes("state=")) return;
|
|
3669
|
+
const params = new URLSearchParams(url.split("?")[1]);
|
|
3670
|
+
const state = params.get("state");
|
|
3671
|
+
addLog("PAYMENT RESULT:", state);
|
|
3672
|
+
if (state == "success") {
|
|
3673
|
+
addLog("PAYMENT SUCCESS");
|
|
3674
|
+
} else {
|
|
3675
|
+
addLog("PAYMENT FAILED");
|
|
3676
|
+
}
|
|
3677
|
+
externalCallback(state, null);
|
|
3678
|
+
emitPaymentStatus(state, null);
|
|
3679
|
+
} catch (err) {
|
|
3680
|
+
addLog("PAYMENT CALLBACK ERROR:", err.message);
|
|
3681
|
+
externalCallback(null, err);
|
|
3682
|
+
emitPaymentStatus(null, err);
|
|
3683
|
+
}
|
|
3684
|
+
};
|
|
3685
|
+
var initializePayment = async (externalCallback = () => {
|
|
3686
|
+
}) => {
|
|
3687
|
+
if (paymentInitialized) return;
|
|
3688
|
+
paymentInitialized = true;
|
|
3689
|
+
if (isCapacitor) {
|
|
3690
|
+
App.addListener("appUrlOpen", (event) => {
|
|
3691
|
+
handlePaymentCallback(
|
|
3692
|
+
event.url,
|
|
3693
|
+
externalCallback
|
|
3694
|
+
);
|
|
3695
|
+
});
|
|
3696
|
+
}
|
|
3697
|
+
if (isTauri) {
|
|
3698
|
+
const { listen: listen2 } = await Promise.resolve().then(() => (init_event(), event_exports));
|
|
3699
|
+
await listen2("deep-link://open-url", async (event) => {
|
|
3700
|
+
let url = event.payload;
|
|
3701
|
+
if (typeof url === "object") {
|
|
3702
|
+
url = url?.url || url?.payload || null;
|
|
3703
|
+
}
|
|
3704
|
+
if (!url) return;
|
|
3705
|
+
if (paymentWindowRef) {
|
|
3706
|
+
try {
|
|
3707
|
+
await paymentWindowRef.close();
|
|
3708
|
+
paymentWindowRef = null;
|
|
3709
|
+
} catch (e) {
|
|
3710
|
+
}
|
|
3711
|
+
}
|
|
3712
|
+
handlePaymentCallback(
|
|
3713
|
+
url,
|
|
3714
|
+
externalCallback
|
|
3715
|
+
);
|
|
3716
|
+
});
|
|
3717
|
+
}
|
|
3718
|
+
};
|
|
4650
3719
|
var createPayment = async (amountZAR, {
|
|
4651
3720
|
appId = "tevrocsoft",
|
|
4652
|
-
serviceUrl = "https://tevrocsoftapi.netlify.app"
|
|
3721
|
+
serviceUrl = "https://tevrocsoftapi.netlify.app",
|
|
3722
|
+
externalCallback = () => {
|
|
3723
|
+
}
|
|
4653
3724
|
} = {}) => {
|
|
3725
|
+
await initializePayment(externalCallback);
|
|
4654
3726
|
const cents = Math.round(Number(amountZAR) * 100);
|
|
4655
3727
|
const basePaymentUrl = `${serviceUrl}/pay`;
|
|
4656
3728
|
const paymentUrl = `${basePaymentUrl}?mode=mobile&amount=${cents}&app=${appId}`;
|
|
@@ -5032,17 +4104,6 @@ var Tevroc = (() => {
|
|
|
5032
4104
|
})();
|
|
5033
4105
|
/*! Bundled license information:
|
|
5034
4106
|
|
|
5035
|
-
react/cjs/react.development.js:
|
|
5036
|
-
(**
|
|
5037
|
-
* @license React
|
|
5038
|
-
* react.development.js
|
|
5039
|
-
*
|
|
5040
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5041
|
-
*
|
|
5042
|
-
* This source code is licensed under the MIT license found in the
|
|
5043
|
-
* LICENSE file in the root directory of this source tree.
|
|
5044
|
-
*)
|
|
5045
|
-
|
|
5046
4107
|
@capacitor/core/dist/index.js:
|
|
5047
4108
|
(*! Capacitor: https://capacitorjs.com/ - MIT License *)
|
|
5048
4109
|
*/
|