@jetthai/cuora 1.0.183 → 1.0.184-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/bundle.mjs +355 -351
- package/package.json +1 -1
- package/src/api/auth.js +8 -4
- package/src/machine/auth.js +1 -1
- package/src/machine/deposit/loadcard_vn.js +11 -22
- package/src/machine/deposit/qrcode_v2.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.184-1](https://github.com/jetthai/cuora-module/compare/v1.0.184...v1.0.184-1) (2022-10-07)
|
|
6
|
+
|
|
7
|
+
### [1.0.184](https://github.com/jetthai/cuora-module/compare/v1.0.183...v1.0.184) (2022-10-03)
|
|
8
|
+
|
|
5
9
|
### [1.0.183](https://github.com/jetthai/cuora-module/compare/v1.0.182...v1.0.183) (2022-10-03)
|
|
6
10
|
|
|
7
11
|
### [1.0.182](https://github.com/jetthai/cuora-module/compare/v1.0.181...v1.0.182) (2022-10-03)
|
package/dist/bundle.mjs
CHANGED
|
@@ -67,17 +67,21 @@ var auth$1 = {
|
|
|
67
67
|
isPublic: true,
|
|
68
68
|
headers: { 'x-access-captcha': reCaptchaToken },
|
|
69
69
|
}),
|
|
70
|
-
loginApp: ({
|
|
70
|
+
loginApp: ({ provider, accessToken, channel, subchannel, dt, from, id, name, picture }) => ({
|
|
71
71
|
url: 'appLogin',
|
|
72
72
|
method: 'post',
|
|
73
73
|
params: {
|
|
74
74
|
provider,
|
|
75
75
|
data: {
|
|
76
|
+
accessToken,
|
|
77
|
+
channel,
|
|
78
|
+
subchannel,
|
|
79
|
+
dt,
|
|
80
|
+
from,
|
|
76
81
|
id,
|
|
82
|
+
name,
|
|
83
|
+
picture,
|
|
77
84
|
provider,
|
|
78
|
-
displayName,
|
|
79
|
-
pictureUrl,
|
|
80
|
-
accessToken,
|
|
81
85
|
},
|
|
82
86
|
},
|
|
83
87
|
isPublic: true,
|
|
@@ -360,77 +364,77 @@ var form = {
|
|
|
360
364
|
|
|
361
365
|
var index$2 = { activity: activity$2, auth: auth$1, common: common$1, game: game$1, mailbox, payment, user, form };
|
|
362
366
|
|
|
363
|
-
/*! *****************************************************************************
|
|
364
|
-
Copyright (c) Microsoft Corporation.
|
|
365
|
-
|
|
366
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
367
|
-
purpose with or without fee is hereby granted.
|
|
368
|
-
|
|
369
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
370
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
371
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
372
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
373
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
374
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
375
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
376
|
-
***************************************************************************** */
|
|
377
|
-
|
|
378
|
-
var __assign$1 = function() {
|
|
379
|
-
__assign$1 = Object.assign || function __assign(t) {
|
|
380
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
381
|
-
s = arguments[i];
|
|
382
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
383
|
-
}
|
|
384
|
-
return t;
|
|
385
|
-
};
|
|
386
|
-
return __assign$1.apply(this, arguments);
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
function __rest$1(s, e) {
|
|
390
|
-
var t = {};
|
|
391
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
392
|
-
t[p] = s[p];
|
|
393
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
394
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
395
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
396
|
-
t[p[i]] = s[p[i]];
|
|
397
|
-
}
|
|
398
|
-
return t;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
function __values(o) {
|
|
402
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
403
|
-
if (m) return m.call(o);
|
|
404
|
-
if (o && typeof o.length === "number") return {
|
|
405
|
-
next: function () {
|
|
406
|
-
if (o && i >= o.length) o = void 0;
|
|
407
|
-
return { value: o && o[i++], done: !o };
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
function __read(o, n) {
|
|
414
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
415
|
-
if (!m) return o;
|
|
416
|
-
var i = m.call(o), r, ar = [], e;
|
|
417
|
-
try {
|
|
418
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
419
|
-
}
|
|
420
|
-
catch (error) { e = { error: error }; }
|
|
421
|
-
finally {
|
|
422
|
-
try {
|
|
423
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
424
|
-
}
|
|
425
|
-
finally { if (e) throw e.error; }
|
|
426
|
-
}
|
|
427
|
-
return ar;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
function __spreadArray(to, from) {
|
|
431
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
432
|
-
to[j] = from[i];
|
|
433
|
-
return to;
|
|
367
|
+
/*! *****************************************************************************
|
|
368
|
+
Copyright (c) Microsoft Corporation.
|
|
369
|
+
|
|
370
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
371
|
+
purpose with or without fee is hereby granted.
|
|
372
|
+
|
|
373
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
374
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
375
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
376
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
377
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
378
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
379
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
380
|
+
***************************************************************************** */
|
|
381
|
+
|
|
382
|
+
var __assign$1 = function() {
|
|
383
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
384
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
385
|
+
s = arguments[i];
|
|
386
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
387
|
+
}
|
|
388
|
+
return t;
|
|
389
|
+
};
|
|
390
|
+
return __assign$1.apply(this, arguments);
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
function __rest$1(s, e) {
|
|
394
|
+
var t = {};
|
|
395
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
396
|
+
t[p] = s[p];
|
|
397
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
398
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
399
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
400
|
+
t[p[i]] = s[p[i]];
|
|
401
|
+
}
|
|
402
|
+
return t;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
function __values(o) {
|
|
406
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
407
|
+
if (m) return m.call(o);
|
|
408
|
+
if (o && typeof o.length === "number") return {
|
|
409
|
+
next: function () {
|
|
410
|
+
if (o && i >= o.length) o = void 0;
|
|
411
|
+
return { value: o && o[i++], done: !o };
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
function __read(o, n) {
|
|
418
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
419
|
+
if (!m) return o;
|
|
420
|
+
var i = m.call(o), r, ar = [], e;
|
|
421
|
+
try {
|
|
422
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
423
|
+
}
|
|
424
|
+
catch (error) { e = { error: error }; }
|
|
425
|
+
finally {
|
|
426
|
+
try {
|
|
427
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
428
|
+
}
|
|
429
|
+
finally { if (e) throw e.error; }
|
|
430
|
+
}
|
|
431
|
+
return ar;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
function __spreadArray(to, from) {
|
|
435
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
436
|
+
to[j] = from[i];
|
|
437
|
+
return to;
|
|
434
438
|
}
|
|
435
439
|
|
|
436
440
|
var STATE_DELIMITER = '.';
|
|
@@ -567,9 +571,9 @@ function mapFilterValues(collection, iteratee, predicate) {
|
|
|
567
571
|
|
|
568
572
|
return result;
|
|
569
573
|
}
|
|
570
|
-
/**
|
|
571
|
-
* Retrieves a value at the given path.
|
|
572
|
-
* @param props The deep path to the prop of the desired value
|
|
574
|
+
/**
|
|
575
|
+
* Retrieves a value at the given path.
|
|
576
|
+
* @param props The deep path to the prop of the desired value
|
|
573
577
|
*/
|
|
574
578
|
|
|
575
579
|
var path = function (props) {
|
|
@@ -598,9 +602,9 @@ var path = function (props) {
|
|
|
598
602
|
return result;
|
|
599
603
|
};
|
|
600
604
|
};
|
|
601
|
-
/**
|
|
602
|
-
* Retrieves a value at the given path via the nested accessor prop.
|
|
603
|
-
* @param props The deep path to the prop of the desired value
|
|
605
|
+
/**
|
|
606
|
+
* Retrieves a value at the given path via the nested accessor prop.
|
|
607
|
+
* @param props The deep path to the prop of the desired value
|
|
604
608
|
*/
|
|
605
609
|
|
|
606
610
|
function nestedPath(props, accessorProp) {
|
|
@@ -1048,11 +1052,11 @@ function toActivityDefinition(action) {
|
|
|
1048
1052
|
type: actionObject.type
|
|
1049
1053
|
});
|
|
1050
1054
|
}
|
|
1051
|
-
/**
|
|
1052
|
-
* Raises an event. This places the event in the internal event queue, so that
|
|
1053
|
-
* the event is immediately consumed by the machine in the current step.
|
|
1054
|
-
*
|
|
1055
|
-
* @param eventType The event to raise.
|
|
1055
|
+
/**
|
|
1056
|
+
* Raises an event. This places the event in the internal event queue, so that
|
|
1057
|
+
* the event is immediately consumed by the machine in the current step.
|
|
1058
|
+
*
|
|
1059
|
+
* @param eventType The event to raise.
|
|
1056
1060
|
*/
|
|
1057
1061
|
|
|
1058
1062
|
function raise(event) {
|
|
@@ -1073,15 +1077,15 @@ function resolveRaise(action) {
|
|
|
1073
1077
|
_event: toSCXMLEvent(action.event)
|
|
1074
1078
|
};
|
|
1075
1079
|
}
|
|
1076
|
-
/**
|
|
1077
|
-
* Sends an event. This returns an action that will be read by an interpreter to
|
|
1078
|
-
* send the event in the next step, after the current step is finished executing.
|
|
1079
|
-
*
|
|
1080
|
-
* @param event The event to send.
|
|
1081
|
-
* @param options Options to pass into the send event:
|
|
1082
|
-
* - `id` - The unique send event identifier (used with `cancel()`).
|
|
1083
|
-
* - `delay` - The number of milliseconds to delay the sending of the event.
|
|
1084
|
-
* - `to` - The target of this event (by default, the machine the event was sent from).
|
|
1080
|
+
/**
|
|
1081
|
+
* Sends an event. This returns an action that will be read by an interpreter to
|
|
1082
|
+
* send the event in the next step, after the current step is finished executing.
|
|
1083
|
+
*
|
|
1084
|
+
* @param event The event to send.
|
|
1085
|
+
* @param options Options to pass into the send event:
|
|
1086
|
+
* - `id` - The unique send event identifier (used with `cancel()`).
|
|
1087
|
+
* - `delay` - The number of milliseconds to delay the sending of the event.
|
|
1088
|
+
* - `to` - The target of this event (by default, the machine the event was sent from).
|
|
1085
1089
|
*/
|
|
1086
1090
|
|
|
1087
1091
|
function send(event, options) {
|
|
@@ -1123,12 +1127,12 @@ var resolveLog = function (action, ctx, _event) {
|
|
|
1123
1127
|
})
|
|
1124
1128
|
});
|
|
1125
1129
|
};
|
|
1126
|
-
/**
|
|
1127
|
-
* Cancels an in-flight `send(...)` action. A canceled sent action will not
|
|
1128
|
-
* be executed, nor will its event be sent, unless it has already been sent
|
|
1129
|
-
* (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`).
|
|
1130
|
-
*
|
|
1131
|
-
* @param sendId The `id` of the `send(...)` action to cancel.
|
|
1130
|
+
/**
|
|
1131
|
+
* Cancels an in-flight `send(...)` action. A canceled sent action will not
|
|
1132
|
+
* be executed, nor will its event be sent, unless it has already been sent
|
|
1133
|
+
* (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`).
|
|
1134
|
+
*
|
|
1135
|
+
* @param sendId The `id` of the `send(...)` action to cancel.
|
|
1132
1136
|
*/
|
|
1133
1137
|
|
|
1134
1138
|
var cancel = function (sendId) {
|
|
@@ -1137,10 +1141,10 @@ var cancel = function (sendId) {
|
|
|
1137
1141
|
sendId: sendId
|
|
1138
1142
|
};
|
|
1139
1143
|
};
|
|
1140
|
-
/**
|
|
1141
|
-
* Starts an activity.
|
|
1142
|
-
*
|
|
1143
|
-
* @param activity The activity to start.
|
|
1144
|
+
/**
|
|
1145
|
+
* Starts an activity.
|
|
1146
|
+
*
|
|
1147
|
+
* @param activity The activity to start.
|
|
1144
1148
|
*/
|
|
1145
1149
|
|
|
1146
1150
|
function start(activity) {
|
|
@@ -1151,10 +1155,10 @@ function start(activity) {
|
|
|
1151
1155
|
exec: undefined
|
|
1152
1156
|
};
|
|
1153
1157
|
}
|
|
1154
|
-
/**
|
|
1155
|
-
* Stops an activity.
|
|
1156
|
-
*
|
|
1157
|
-
* @param actorRef The activity to stop.
|
|
1158
|
+
/**
|
|
1159
|
+
* Stops an activity.
|
|
1160
|
+
*
|
|
1161
|
+
* @param actorRef The activity to stop.
|
|
1158
1162
|
*/
|
|
1159
1163
|
|
|
1160
1164
|
function stop(actorRef) {
|
|
@@ -1176,10 +1180,10 @@ function resolveStop(action, context, _event) {
|
|
|
1176
1180
|
};
|
|
1177
1181
|
return actionObject;
|
|
1178
1182
|
}
|
|
1179
|
-
/**
|
|
1180
|
-
* Updates the current context of the machine.
|
|
1181
|
-
*
|
|
1182
|
-
* @param assignment An object that represents the partial context to update.
|
|
1183
|
+
/**
|
|
1184
|
+
* Updates the current context of the machine.
|
|
1185
|
+
*
|
|
1186
|
+
* @param assignment An object that represents the partial context to update.
|
|
1183
1187
|
*/
|
|
1184
1188
|
|
|
1185
1189
|
var assign = function (assignment) {
|
|
@@ -1188,24 +1192,24 @@ var assign = function (assignment) {
|
|
|
1188
1192
|
assignment: assignment
|
|
1189
1193
|
};
|
|
1190
1194
|
};
|
|
1191
|
-
/**
|
|
1192
|
-
* Returns an event type that represents an implicit event that
|
|
1193
|
-
* is sent after the specified `delay`.
|
|
1194
|
-
*
|
|
1195
|
-
* @param delayRef The delay in milliseconds
|
|
1196
|
-
* @param id The state node ID where this event is handled
|
|
1195
|
+
/**
|
|
1196
|
+
* Returns an event type that represents an implicit event that
|
|
1197
|
+
* is sent after the specified `delay`.
|
|
1198
|
+
*
|
|
1199
|
+
* @param delayRef The delay in milliseconds
|
|
1200
|
+
* @param id The state node ID where this event is handled
|
|
1197
1201
|
*/
|
|
1198
1202
|
|
|
1199
1203
|
function after(delayRef, id) {
|
|
1200
1204
|
var idSuffix = id ? "#" + id : '';
|
|
1201
1205
|
return ActionTypes.After + "(" + delayRef + ")" + idSuffix;
|
|
1202
1206
|
}
|
|
1203
|
-
/**
|
|
1204
|
-
* Returns an event that represents that a final state node
|
|
1205
|
-
* has been reached in the parent state node.
|
|
1206
|
-
*
|
|
1207
|
-
* @param id The final state node's parent state node `id`
|
|
1208
|
-
* @param data The data to pass into the event
|
|
1207
|
+
/**
|
|
1208
|
+
* Returns an event that represents that a final state node
|
|
1209
|
+
* has been reached in the parent state node.
|
|
1210
|
+
*
|
|
1211
|
+
* @param id The final state node's parent state node `id`
|
|
1212
|
+
* @param data The data to pass into the event
|
|
1209
1213
|
*/
|
|
1210
1214
|
|
|
1211
1215
|
function done(id, data) {
|
|
@@ -1221,14 +1225,14 @@ function done(id, data) {
|
|
|
1221
1225
|
|
|
1222
1226
|
return eventObject;
|
|
1223
1227
|
}
|
|
1224
|
-
/**
|
|
1225
|
-
* Returns an event that represents that an invoked service has terminated.
|
|
1226
|
-
*
|
|
1227
|
-
* An invoked service is terminated when it has reached a top-level final state node,
|
|
1228
|
-
* but not when it is canceled.
|
|
1229
|
-
*
|
|
1230
|
-
* @param id The final state node ID
|
|
1231
|
-
* @param data The data to pass into the event
|
|
1228
|
+
/**
|
|
1229
|
+
* Returns an event that represents that an invoked service has terminated.
|
|
1230
|
+
*
|
|
1231
|
+
* An invoked service is terminated when it has reached a top-level final state node,
|
|
1232
|
+
* but not when it is canceled.
|
|
1233
|
+
*
|
|
1234
|
+
* @param id The final state node ID
|
|
1235
|
+
* @param data The data to pass into the event
|
|
1232
1236
|
*/
|
|
1233
1237
|
|
|
1234
1238
|
function doneInvoke(id, data) {
|
|
@@ -1639,17 +1643,17 @@ var State =
|
|
|
1639
1643
|
|
|
1640
1644
|
/** @class */
|
|
1641
1645
|
function () {
|
|
1642
|
-
/**
|
|
1643
|
-
* Creates a new State instance.
|
|
1644
|
-
* @param value The state value
|
|
1645
|
-
* @param context The extended state
|
|
1646
|
-
* @param historyValue The tree representing historical values of the state nodes
|
|
1647
|
-
* @param history The previous state
|
|
1648
|
-
* @param actions An array of action objects to execute as side-effects
|
|
1649
|
-
* @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`).
|
|
1650
|
-
* @param meta
|
|
1651
|
-
* @param events Internal event queue. Should be empty with run-to-completion semantics.
|
|
1652
|
-
* @param configuration
|
|
1646
|
+
/**
|
|
1647
|
+
* Creates a new State instance.
|
|
1648
|
+
* @param value The state value
|
|
1649
|
+
* @param context The extended state
|
|
1650
|
+
* @param historyValue The tree representing historical values of the state nodes
|
|
1651
|
+
* @param history The previous state
|
|
1652
|
+
* @param actions An array of action objects to execute as side-effects
|
|
1653
|
+
* @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`).
|
|
1654
|
+
* @param meta
|
|
1655
|
+
* @param events Internal event queue. Should be empty with run-to-completion semantics.
|
|
1656
|
+
* @param configuration
|
|
1653
1657
|
*/
|
|
1654
1658
|
function State(config) {
|
|
1655
1659
|
var _this = this;
|
|
@@ -1685,10 +1689,10 @@ function () {
|
|
|
1685
1689
|
}
|
|
1686
1690
|
});
|
|
1687
1691
|
}
|
|
1688
|
-
/**
|
|
1689
|
-
* Creates a new State instance for the given `stateValue` and `context`.
|
|
1690
|
-
* @param stateValue
|
|
1691
|
-
* @param context
|
|
1692
|
+
/**
|
|
1693
|
+
* Creates a new State instance for the given `stateValue` and `context`.
|
|
1694
|
+
* @param stateValue
|
|
1695
|
+
* @param context
|
|
1692
1696
|
*/
|
|
1693
1697
|
|
|
1694
1698
|
|
|
@@ -1732,19 +1736,19 @@ function () {
|
|
|
1732
1736
|
children: {}
|
|
1733
1737
|
});
|
|
1734
1738
|
};
|
|
1735
|
-
/**
|
|
1736
|
-
* Creates a new State instance for the given `config`.
|
|
1737
|
-
* @param config The state config
|
|
1739
|
+
/**
|
|
1740
|
+
* Creates a new State instance for the given `config`.
|
|
1741
|
+
* @param config The state config
|
|
1738
1742
|
*/
|
|
1739
1743
|
|
|
1740
1744
|
|
|
1741
1745
|
State.create = function (config) {
|
|
1742
1746
|
return new State(config);
|
|
1743
1747
|
};
|
|
1744
|
-
/**
|
|
1745
|
-
* Creates a new `State` instance for the given `stateValue` and `context` with no actions (side-effects).
|
|
1746
|
-
* @param stateValue
|
|
1747
|
-
* @param context
|
|
1748
|
+
/**
|
|
1749
|
+
* Creates a new `State` instance for the given `stateValue` and `context` with no actions (side-effects).
|
|
1750
|
+
* @param stateValue
|
|
1751
|
+
* @param context
|
|
1748
1752
|
*/
|
|
1749
1753
|
|
|
1750
1754
|
|
|
@@ -1771,10 +1775,10 @@ function () {
|
|
|
1771
1775
|
|
|
1772
1776
|
return State.from(stateValue, context);
|
|
1773
1777
|
};
|
|
1774
|
-
/**
|
|
1775
|
-
* Returns an array of all the string leaf state node paths.
|
|
1776
|
-
* @param stateValue
|
|
1777
|
-
* @param delimiter The character(s) that separate each subpath in the string state node path.
|
|
1778
|
+
/**
|
|
1779
|
+
* Returns an array of all the string leaf state node paths.
|
|
1780
|
+
* @param stateValue
|
|
1781
|
+
* @param delimiter The character(s) that separate each subpath in the string state node path.
|
|
1778
1782
|
*/
|
|
1779
1783
|
|
|
1780
1784
|
|
|
@@ -1813,28 +1817,28 @@ function () {
|
|
|
1813
1817
|
tags: Array.from(tags)
|
|
1814
1818
|
});
|
|
1815
1819
|
};
|
|
1816
|
-
/**
|
|
1817
|
-
* Whether the current state value is a subset of the given parent state value.
|
|
1818
|
-
* @param parentStateValue
|
|
1820
|
+
/**
|
|
1821
|
+
* Whether the current state value is a subset of the given parent state value.
|
|
1822
|
+
* @param parentStateValue
|
|
1819
1823
|
*/
|
|
1820
1824
|
|
|
1821
1825
|
|
|
1822
1826
|
State.prototype.matches = function (parentStateValue) {
|
|
1823
1827
|
return matchesState(parentStateValue, this.value);
|
|
1824
1828
|
};
|
|
1825
|
-
/**
|
|
1826
|
-
* Whether the current state configuration has a state node with the specified `tag`.
|
|
1827
|
-
* @param tag
|
|
1829
|
+
/**
|
|
1830
|
+
* Whether the current state configuration has a state node with the specified `tag`.
|
|
1831
|
+
* @param tag
|
|
1828
1832
|
*/
|
|
1829
1833
|
|
|
1830
1834
|
|
|
1831
1835
|
State.prototype.hasTag = function (tag) {
|
|
1832
1836
|
return this.tags.has(tag);
|
|
1833
1837
|
};
|
|
1834
|
-
/**
|
|
1835
|
-
* Determines whether sending the `event` will cause a transition.
|
|
1836
|
-
* @param event The event to test
|
|
1837
|
-
* @returns Whether the event will cause a transition
|
|
1838
|
+
/**
|
|
1839
|
+
* Determines whether sending the `event` will cause a transition.
|
|
1840
|
+
* @param event The event to test
|
|
1841
|
+
* @returns Whether the event will cause a transition
|
|
1838
1842
|
*/
|
|
1839
1843
|
|
|
1840
1844
|
|
|
@@ -1851,9 +1855,9 @@ function () {
|
|
|
1851
1855
|
return State;
|
|
1852
1856
|
}();
|
|
1853
1857
|
|
|
1854
|
-
/**
|
|
1855
|
-
* Maintains a stack of the current service in scope.
|
|
1856
|
-
* This is used to provide the correct service to spawn().
|
|
1858
|
+
/**
|
|
1859
|
+
* Maintains a stack of the current service in scope.
|
|
1860
|
+
* This is used to provide the correct service to spawn().
|
|
1857
1861
|
*/
|
|
1858
1862
|
var provide = function (service, fn) {
|
|
1859
1863
|
var result = fn(service);
|
|
@@ -1883,11 +1887,11 @@ function createNullActor(id) {
|
|
|
1883
1887
|
}
|
|
1884
1888
|
};
|
|
1885
1889
|
}
|
|
1886
|
-
/**
|
|
1887
|
-
* Creates a deferred actor that is able to be invoked given the provided
|
|
1888
|
-
* invocation information in its `.meta` value.
|
|
1889
|
-
*
|
|
1890
|
-
* @param invokeDefinition The meta information needed to invoke the actor.
|
|
1890
|
+
/**
|
|
1891
|
+
* Creates a deferred actor that is able to be invoked given the provided
|
|
1892
|
+
* invocation information in its `.meta` value.
|
|
1893
|
+
*
|
|
1894
|
+
* @param invokeDefinition The meta information needed to invoke the actor.
|
|
1891
1895
|
*/
|
|
1892
1896
|
|
|
1893
1897
|
function createInvocableActor(invokeDefinition, machine, context, _event) {
|
|
@@ -1978,12 +1982,12 @@ var StateNode =
|
|
|
1978
1982
|
/** @class */
|
|
1979
1983
|
function () {
|
|
1980
1984
|
function StateNode(
|
|
1981
|
-
/**
|
|
1982
|
-
* The raw config used to create the machine.
|
|
1985
|
+
/**
|
|
1986
|
+
* The raw config used to create the machine.
|
|
1983
1987
|
*/
|
|
1984
1988
|
config, options,
|
|
1985
|
-
/**
|
|
1986
|
-
* The initial extended state
|
|
1989
|
+
/**
|
|
1990
|
+
* The initial extended state
|
|
1987
1991
|
*/
|
|
1988
1992
|
_context // TODO: this is unsafe, but we're removing it in v5 anyway
|
|
1989
1993
|
) {
|
|
@@ -1997,8 +2001,8 @@ function () {
|
|
|
1997
2001
|
|
|
1998
2002
|
this.config = config;
|
|
1999
2003
|
this._context = _context;
|
|
2000
|
-
/**
|
|
2001
|
-
* The order this state node appears. Corresponds to the implicit SCXML document order.
|
|
2004
|
+
/**
|
|
2005
|
+
* The order this state node appears. Corresponds to the implicit SCXML document order.
|
|
2002
2006
|
*/
|
|
2003
2007
|
|
|
2004
2008
|
this.order = -1;
|
|
@@ -2133,11 +2137,11 @@ function () {
|
|
|
2133
2137
|
return stateNode.on;
|
|
2134
2138
|
});
|
|
2135
2139
|
};
|
|
2136
|
-
/**
|
|
2137
|
-
* Clones this state machine with custom options and context.
|
|
2138
|
-
*
|
|
2139
|
-
* @param options Options (actions, guards, activities, services) to recursively merge with the existing options.
|
|
2140
|
-
* @param context Custom context (will override predefined context)
|
|
2140
|
+
/**
|
|
2141
|
+
* Clones this state machine with custom options and context.
|
|
2142
|
+
*
|
|
2143
|
+
* @param options Options (actions, guards, activities, services) to recursively merge with the existing options.
|
|
2144
|
+
* @param context Custom context (will override predefined context)
|
|
2141
2145
|
*/
|
|
2142
2146
|
|
|
2143
2147
|
|
|
@@ -2156,10 +2160,10 @@ function () {
|
|
|
2156
2160
|
delays: __assign$1(__assign$1({}, delays), options.delays)
|
|
2157
2161
|
}, context !== null && context !== void 0 ? context : this.context);
|
|
2158
2162
|
};
|
|
2159
|
-
/**
|
|
2160
|
-
* Clones this state machine with custom context.
|
|
2161
|
-
*
|
|
2162
|
-
* @param context Custom context (will override predefined context, not recursive)
|
|
2163
|
+
/**
|
|
2164
|
+
* Clones this state machine with custom context.
|
|
2165
|
+
*
|
|
2166
|
+
* @param context Custom context (will override predefined context, not recursive)
|
|
2163
2167
|
*/
|
|
2164
2168
|
|
|
2165
2169
|
|
|
@@ -2175,8 +2179,8 @@ function () {
|
|
|
2175
2179
|
configurable: true
|
|
2176
2180
|
});
|
|
2177
2181
|
Object.defineProperty(StateNode.prototype, "definition", {
|
|
2178
|
-
/**
|
|
2179
|
-
* The well-structured state node definition.
|
|
2182
|
+
/**
|
|
2183
|
+
* The well-structured state node definition.
|
|
2180
2184
|
*/
|
|
2181
2185
|
get: function () {
|
|
2182
2186
|
return {
|
|
@@ -2210,8 +2214,8 @@ function () {
|
|
|
2210
2214
|
};
|
|
2211
2215
|
|
|
2212
2216
|
Object.defineProperty(StateNode.prototype, "on", {
|
|
2213
|
-
/**
|
|
2214
|
-
* The mapping of events to transitions.
|
|
2217
|
+
/**
|
|
2218
|
+
* The mapping of events to transitions.
|
|
2215
2219
|
*/
|
|
2216
2220
|
get: function () {
|
|
2217
2221
|
if (this.__cache.on) {
|
|
@@ -2236,8 +2240,8 @@ function () {
|
|
|
2236
2240
|
configurable: true
|
|
2237
2241
|
});
|
|
2238
2242
|
Object.defineProperty(StateNode.prototype, "transitions", {
|
|
2239
|
-
/**
|
|
2240
|
-
* All the transitions that can be taken from this state node.
|
|
2243
|
+
/**
|
|
2244
|
+
* All the transitions that can be taken from this state node.
|
|
2241
2245
|
*/
|
|
2242
2246
|
get: function () {
|
|
2243
2247
|
return this.__cache.transitions || (this.__cache.transitions = this.formatTransitions(), this.__cache.transitions);
|
|
@@ -2260,8 +2264,8 @@ function () {
|
|
|
2260
2264
|
this.__cache.candidates[eventName] = candidates;
|
|
2261
2265
|
return candidates;
|
|
2262
2266
|
};
|
|
2263
|
-
/**
|
|
2264
|
-
* All delayed transitions from the config.
|
|
2267
|
+
/**
|
|
2268
|
+
* All delayed transitions from the config.
|
|
2265
2269
|
*/
|
|
2266
2270
|
|
|
2267
2271
|
|
|
@@ -2313,10 +2317,10 @@ function () {
|
|
|
2313
2317
|
});
|
|
2314
2318
|
});
|
|
2315
2319
|
};
|
|
2316
|
-
/**
|
|
2317
|
-
* Returns the state nodes represented by the current state value.
|
|
2318
|
-
*
|
|
2319
|
-
* @param state The state value or State instance
|
|
2320
|
+
/**
|
|
2321
|
+
* Returns the state nodes represented by the current state value.
|
|
2322
|
+
*
|
|
2323
|
+
* @param state The state value or State instance
|
|
2320
2324
|
*/
|
|
2321
2325
|
|
|
2322
2326
|
|
|
@@ -2347,10 +2351,10 @@ function () {
|
|
|
2347
2351
|
return allSubStateNodes.concat(subStateNode);
|
|
2348
2352
|
}, []));
|
|
2349
2353
|
};
|
|
2350
|
-
/**
|
|
2351
|
-
* Returns `true` if this state node explicitly handles the given event.
|
|
2352
|
-
*
|
|
2353
|
-
* @param event The event in question
|
|
2354
|
+
/**
|
|
2355
|
+
* Returns `true` if this state node explicitly handles the given event.
|
|
2356
|
+
*
|
|
2357
|
+
* @param event The event in question
|
|
2354
2358
|
*/
|
|
2355
2359
|
|
|
2356
2360
|
|
|
@@ -2358,12 +2362,12 @@ function () {
|
|
|
2358
2362
|
var eventType = getEventType(event);
|
|
2359
2363
|
return this.events.includes(eventType);
|
|
2360
2364
|
};
|
|
2361
|
-
/**
|
|
2362
|
-
* Resolves the given `state` to a new `State` instance relative to this machine.
|
|
2363
|
-
*
|
|
2364
|
-
* This ensures that `.events` and `.nextEvents` represent the correct values.
|
|
2365
|
-
*
|
|
2366
|
-
* @param state The state to resolve
|
|
2365
|
+
/**
|
|
2366
|
+
* Resolves the given `state` to a new `State` instance relative to this machine.
|
|
2367
|
+
*
|
|
2368
|
+
* This ensures that `.events` and `.nextEvents` represent the correct values.
|
|
2369
|
+
*
|
|
2370
|
+
* @param state The state to resolve
|
|
2367
2371
|
*/
|
|
2368
2372
|
|
|
2369
2373
|
|
|
@@ -2581,9 +2585,9 @@ function () {
|
|
|
2581
2585
|
|
|
2582
2586
|
return nodes;
|
|
2583
2587
|
};
|
|
2584
|
-
/**
|
|
2585
|
-
* Whether the given state node "escapes" this state node. If the `stateNode` is equal to or the parent of
|
|
2586
|
-
* this state node, it does not escape.
|
|
2588
|
+
/**
|
|
2589
|
+
* Whether the given state node "escapes" this state node. If the `stateNode` is equal to or the parent of
|
|
2590
|
+
* this state node, it does not escape.
|
|
2587
2591
|
*/
|
|
2588
2592
|
|
|
2589
2593
|
|
|
@@ -2708,12 +2712,12 @@ function () {
|
|
|
2708
2712
|
var actions = toActionObjects(exitActions.concat(transition.actions).concat(entryActions), this.machine.options.actions);
|
|
2709
2713
|
return actions;
|
|
2710
2714
|
};
|
|
2711
|
-
/**
|
|
2712
|
-
* Determines the next state given the current `state` and sent `event`.
|
|
2713
|
-
*
|
|
2714
|
-
* @param state The current State instance or state value
|
|
2715
|
-
* @param event The event that was sent at the current state
|
|
2716
|
-
* @param context The current context (extended state) of the current state
|
|
2715
|
+
/**
|
|
2716
|
+
* Determines the next state given the current `state` and sent `event`.
|
|
2717
|
+
*
|
|
2718
|
+
* @param state The current State instance or state value
|
|
2719
|
+
* @param event The event that was sent at the current state
|
|
2720
|
+
* @param context The current context (extended state) of the current state
|
|
2717
2721
|
*/
|
|
2718
2722
|
|
|
2719
2723
|
|
|
@@ -2906,8 +2910,8 @@ function () {
|
|
|
2906
2910
|
})));
|
|
2907
2911
|
return maybeNextState;
|
|
2908
2912
|
};
|
|
2909
|
-
/**
|
|
2910
|
-
* Returns the child state node from its relative `stateKey`, or throws.
|
|
2913
|
+
/**
|
|
2914
|
+
* Returns the child state node from its relative `stateKey`, or throws.
|
|
2911
2915
|
*/
|
|
2912
2916
|
|
|
2913
2917
|
|
|
@@ -2928,10 +2932,10 @@ function () {
|
|
|
2928
2932
|
|
|
2929
2933
|
return result;
|
|
2930
2934
|
};
|
|
2931
|
-
/**
|
|
2932
|
-
* Returns the state node with the given `stateId`, or throws.
|
|
2933
|
-
*
|
|
2934
|
-
* @param stateId The state ID. The prefix "#" is removed.
|
|
2935
|
+
/**
|
|
2936
|
+
* Returns the state node with the given `stateId`, or throws.
|
|
2937
|
+
*
|
|
2938
|
+
* @param stateId The state ID. The prefix "#" is removed.
|
|
2935
2939
|
*/
|
|
2936
2940
|
|
|
2937
2941
|
|
|
@@ -2950,10 +2954,10 @@ function () {
|
|
|
2950
2954
|
|
|
2951
2955
|
return stateNode;
|
|
2952
2956
|
};
|
|
2953
|
-
/**
|
|
2954
|
-
* Returns the relative state node from the given `statePath`, or throws.
|
|
2955
|
-
*
|
|
2956
|
-
* @param statePath The string or string array relative path to the state node.
|
|
2957
|
+
/**
|
|
2958
|
+
* Returns the relative state node from the given `statePath`, or throws.
|
|
2959
|
+
*
|
|
2960
|
+
* @param statePath The string or string array relative path to the state node.
|
|
2957
2961
|
*/
|
|
2958
2962
|
|
|
2959
2963
|
|
|
@@ -2981,10 +2985,10 @@ function () {
|
|
|
2981
2985
|
|
|
2982
2986
|
return currentStateNode;
|
|
2983
2987
|
};
|
|
2984
|
-
/**
|
|
2985
|
-
* Resolves a partial state value with its full representation in this machine.
|
|
2986
|
-
*
|
|
2987
|
-
* @param stateValue The partial state value to resolve.
|
|
2988
|
+
/**
|
|
2989
|
+
* Resolves a partial state value with its full representation in this machine.
|
|
2990
|
+
*
|
|
2991
|
+
* @param stateValue The partial state value to resolve.
|
|
2988
2992
|
*/
|
|
2989
2993
|
|
|
2990
2994
|
|
|
@@ -3088,9 +3092,9 @@ function () {
|
|
|
3088
3092
|
};
|
|
3089
3093
|
|
|
3090
3094
|
Object.defineProperty(StateNode.prototype, "initialState", {
|
|
3091
|
-
/**
|
|
3092
|
-
* The initial State instance, which includes all actions to be executed from
|
|
3093
|
-
* entering the initial state.
|
|
3095
|
+
/**
|
|
3096
|
+
* The initial State instance, which includes all actions to be executed from
|
|
3097
|
+
* entering the initial state.
|
|
3094
3098
|
*/
|
|
3095
3099
|
get: function () {
|
|
3096
3100
|
this._init(); // TODO: this should be in the constructor (see note in constructor)
|
|
@@ -3108,9 +3112,9 @@ function () {
|
|
|
3108
3112
|
configurable: true
|
|
3109
3113
|
});
|
|
3110
3114
|
Object.defineProperty(StateNode.prototype, "target", {
|
|
3111
|
-
/**
|
|
3112
|
-
* The target state value of the history state node, if it exists. This represents the
|
|
3113
|
-
* default state value to transition to if no history value exists yet.
|
|
3115
|
+
/**
|
|
3116
|
+
* The target state value of the history state node, if it exists. This represents the
|
|
3117
|
+
* default state value to transition to if no history value exists yet.
|
|
3114
3118
|
*/
|
|
3115
3119
|
get: function () {
|
|
3116
3120
|
var target;
|
|
@@ -3130,12 +3134,12 @@ function () {
|
|
|
3130
3134
|
enumerable: false,
|
|
3131
3135
|
configurable: true
|
|
3132
3136
|
});
|
|
3133
|
-
/**
|
|
3134
|
-
* Returns the leaf nodes from a state path relative to this state node.
|
|
3135
|
-
*
|
|
3136
|
-
* @param relativeStateId The relative state path to retrieve the state nodes
|
|
3137
|
-
* @param history The previous state to retrieve history
|
|
3138
|
-
* @param resolve Whether state nodes should resolve to initial child state nodes
|
|
3137
|
+
/**
|
|
3138
|
+
* Returns the leaf nodes from a state path relative to this state node.
|
|
3139
|
+
*
|
|
3140
|
+
* @param relativeStateId The relative state path to retrieve the state nodes
|
|
3141
|
+
* @param history The previous state to retrieve history
|
|
3142
|
+
* @param resolve Whether state nodes should resolve to initial child state nodes
|
|
3139
3143
|
*/
|
|
3140
3144
|
|
|
3141
3145
|
StateNode.prototype.getRelativeStateNodes = function (relativeStateId, historyValue, resolve) {
|
|
@@ -3168,11 +3172,11 @@ function () {
|
|
|
3168
3172
|
enumerable: false,
|
|
3169
3173
|
configurable: true
|
|
3170
3174
|
});
|
|
3171
|
-
/**
|
|
3172
|
-
* Retrieves state nodes from a relative path to this state node.
|
|
3173
|
-
*
|
|
3174
|
-
* @param relativePath The relative path from this state node
|
|
3175
|
-
* @param historyValue
|
|
3175
|
+
/**
|
|
3176
|
+
* Retrieves state nodes from a relative path to this state node.
|
|
3177
|
+
*
|
|
3178
|
+
* @param relativePath The relative path from this state node
|
|
3179
|
+
* @param historyValue
|
|
3176
3180
|
*/
|
|
3177
3181
|
|
|
3178
3182
|
StateNode.prototype.getFromRelativePath = function (relativePath) {
|
|
@@ -3220,11 +3224,11 @@ function () {
|
|
|
3220
3224
|
})
|
|
3221
3225
|
};
|
|
3222
3226
|
};
|
|
3223
|
-
/**
|
|
3224
|
-
* Resolves to the historical value(s) of the parent state node,
|
|
3225
|
-
* represented by state nodes.
|
|
3226
|
-
*
|
|
3227
|
-
* @param historyValue
|
|
3227
|
+
/**
|
|
3228
|
+
* Resolves to the historical value(s) of the parent state node,
|
|
3229
|
+
* represented by state nodes.
|
|
3230
|
+
*
|
|
3231
|
+
* @param historyValue
|
|
3228
3232
|
*/
|
|
3229
3233
|
|
|
3230
3234
|
|
|
@@ -3256,8 +3260,8 @@ function () {
|
|
|
3256
3260
|
};
|
|
3257
3261
|
|
|
3258
3262
|
Object.defineProperty(StateNode.prototype, "stateIds", {
|
|
3259
|
-
/**
|
|
3260
|
-
* All the state node IDs of this state node and its descendant state nodes.
|
|
3263
|
+
/**
|
|
3264
|
+
* All the state node IDs of this state node and its descendant state nodes.
|
|
3261
3265
|
*/
|
|
3262
3266
|
get: function () {
|
|
3263
3267
|
var _this = this;
|
|
@@ -3271,8 +3275,8 @@ function () {
|
|
|
3271
3275
|
configurable: true
|
|
3272
3276
|
});
|
|
3273
3277
|
Object.defineProperty(StateNode.prototype, "events", {
|
|
3274
|
-
/**
|
|
3275
|
-
* All the event types accepted by this state node and its descendants.
|
|
3278
|
+
/**
|
|
3279
|
+
* All the event types accepted by this state node and its descendants.
|
|
3276
3280
|
*/
|
|
3277
3281
|
get: function () {
|
|
3278
3282
|
var e_7, _a, e_8, _b;
|
|
@@ -3328,10 +3332,10 @@ function () {
|
|
|
3328
3332
|
configurable: true
|
|
3329
3333
|
});
|
|
3330
3334
|
Object.defineProperty(StateNode.prototype, "ownEvents", {
|
|
3331
|
-
/**
|
|
3332
|
-
* All the events that have transitions directly from this state node.
|
|
3333
|
-
*
|
|
3334
|
-
* Excludes any inert events.
|
|
3335
|
+
/**
|
|
3336
|
+
* All the events that have transitions directly from this state node.
|
|
3337
|
+
*
|
|
3338
|
+
* Excludes any inert events.
|
|
3335
3339
|
*/
|
|
3336
3340
|
get: function () {
|
|
3337
3341
|
var events = new Set(this.transitions.filter(function (transition) {
|
|
@@ -7629,89 +7633,89 @@ var storage = {
|
|
|
7629
7633
|
}
|
|
7630
7634
|
};
|
|
7631
7635
|
|
|
7632
|
-
/*! *****************************************************************************
|
|
7633
|
-
Copyright (c) Microsoft Corporation.
|
|
7634
|
-
|
|
7635
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
7636
|
-
purpose with or without fee is hereby granted.
|
|
7637
|
-
|
|
7638
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7639
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7640
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7641
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7642
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7643
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7644
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
7645
|
-
***************************************************************************** */
|
|
7646
|
-
|
|
7647
|
-
var __assign = function() {
|
|
7648
|
-
__assign = Object.assign || function __assign(t) {
|
|
7649
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7650
|
-
s = arguments[i];
|
|
7651
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7652
|
-
}
|
|
7653
|
-
return t;
|
|
7654
|
-
};
|
|
7655
|
-
return __assign.apply(this, arguments);
|
|
7656
|
-
};
|
|
7657
|
-
|
|
7658
|
-
function __rest(s, e) {
|
|
7659
|
-
var t = {};
|
|
7660
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7661
|
-
t[p] = s[p];
|
|
7662
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7663
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7664
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7665
|
-
t[p[i]] = s[p[i]];
|
|
7666
|
-
}
|
|
7667
|
-
return t;
|
|
7668
|
-
}
|
|
7669
|
-
|
|
7670
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
7671
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7672
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7673
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7674
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7675
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7676
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7677
|
-
});
|
|
7678
|
-
}
|
|
7679
|
-
|
|
7680
|
-
function __generator(thisArg, body) {
|
|
7681
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
7682
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
7683
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
7684
|
-
function step(op) {
|
|
7685
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
7686
|
-
while (_) try {
|
|
7687
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
7688
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
7689
|
-
switch (op[0]) {
|
|
7690
|
-
case 0: case 1: t = op; break;
|
|
7691
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
7692
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
7693
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
7694
|
-
default:
|
|
7695
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
7696
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
7697
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
7698
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
7699
|
-
if (t[2]) _.ops.pop();
|
|
7700
|
-
_.trys.pop(); continue;
|
|
7701
|
-
}
|
|
7702
|
-
op = body.call(thisArg, _);
|
|
7703
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
7704
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
7705
|
-
}
|
|
7706
|
-
}
|
|
7707
|
-
|
|
7708
|
-
/** @deprecated */
|
|
7709
|
-
function __spreadArrays() {
|
|
7710
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
7711
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
7712
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
7713
|
-
r[k] = a[j];
|
|
7714
|
-
return r;
|
|
7636
|
+
/*! *****************************************************************************
|
|
7637
|
+
Copyright (c) Microsoft Corporation.
|
|
7638
|
+
|
|
7639
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7640
|
+
purpose with or without fee is hereby granted.
|
|
7641
|
+
|
|
7642
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7643
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7644
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7645
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7646
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7647
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7648
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
7649
|
+
***************************************************************************** */
|
|
7650
|
+
|
|
7651
|
+
var __assign = function() {
|
|
7652
|
+
__assign = Object.assign || function __assign(t) {
|
|
7653
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
7654
|
+
s = arguments[i];
|
|
7655
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
7656
|
+
}
|
|
7657
|
+
return t;
|
|
7658
|
+
};
|
|
7659
|
+
return __assign.apply(this, arguments);
|
|
7660
|
+
};
|
|
7661
|
+
|
|
7662
|
+
function __rest(s, e) {
|
|
7663
|
+
var t = {};
|
|
7664
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7665
|
+
t[p] = s[p];
|
|
7666
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7667
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7668
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7669
|
+
t[p[i]] = s[p[i]];
|
|
7670
|
+
}
|
|
7671
|
+
return t;
|
|
7672
|
+
}
|
|
7673
|
+
|
|
7674
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
7675
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7676
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7677
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7678
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7679
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7680
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7681
|
+
});
|
|
7682
|
+
}
|
|
7683
|
+
|
|
7684
|
+
function __generator(thisArg, body) {
|
|
7685
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
7686
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
7687
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
7688
|
+
function step(op) {
|
|
7689
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
7690
|
+
while (_) try {
|
|
7691
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
7692
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
7693
|
+
switch (op[0]) {
|
|
7694
|
+
case 0: case 1: t = op; break;
|
|
7695
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
7696
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
7697
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
7698
|
+
default:
|
|
7699
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
7700
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
7701
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
7702
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
7703
|
+
if (t[2]) _.ops.pop();
|
|
7704
|
+
_.trys.pop(); continue;
|
|
7705
|
+
}
|
|
7706
|
+
op = body.call(thisArg, _);
|
|
7707
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
7708
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
7709
|
+
}
|
|
7710
|
+
}
|
|
7711
|
+
|
|
7712
|
+
/** @deprecated */
|
|
7713
|
+
function __spreadArrays() {
|
|
7714
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
7715
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
7716
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
7717
|
+
r[k] = a[j];
|
|
7718
|
+
return r;
|
|
7715
7719
|
}
|
|
7716
7720
|
|
|
7717
7721
|
/**
|
|
@@ -10302,7 +10306,7 @@ function auth (request) {
|
|
|
10302
10306
|
actions: 'redirectTo3Party',
|
|
10303
10307
|
},
|
|
10304
10308
|
LOGIN_APP: {
|
|
10305
|
-
|
|
10309
|
+
target: '.authenticationApp'
|
|
10306
10310
|
},
|
|
10307
10311
|
SET_PLAY: {
|
|
10308
10312
|
actions: 'setPlay',
|
package/package.json
CHANGED
package/src/api/auth.js
CHANGED
|
@@ -11,17 +11,21 @@ export default {
|
|
|
11
11
|
isPublic: true,
|
|
12
12
|
headers: { 'x-access-captcha': reCaptchaToken },
|
|
13
13
|
}),
|
|
14
|
-
loginApp: ({
|
|
14
|
+
loginApp: ({ provider, accessToken, channel, subchannel, dt, from, id, name, picture }) => ({
|
|
15
15
|
url: 'appLogin',
|
|
16
16
|
method: 'post',
|
|
17
17
|
params: {
|
|
18
18
|
provider,
|
|
19
19
|
data: {
|
|
20
|
+
accessToken,
|
|
21
|
+
channel,
|
|
22
|
+
subchannel,
|
|
23
|
+
dt,
|
|
24
|
+
from,
|
|
20
25
|
id,
|
|
26
|
+
name,
|
|
27
|
+
picture,
|
|
21
28
|
provider,
|
|
22
|
-
displayName,
|
|
23
|
-
pictureUrl,
|
|
24
|
-
accessToken,
|
|
25
29
|
},
|
|
26
30
|
},
|
|
27
31
|
isPublic: true,
|
package/src/machine/auth.js
CHANGED
|
@@ -7,15 +7,7 @@ export default function (request) {
|
|
|
7
7
|
id: 'loadcard',
|
|
8
8
|
initial: 'loading',
|
|
9
9
|
context: {
|
|
10
|
-
cards: [
|
|
11
|
-
{ name: 'mobifone', code: 'VMS', category: 'loadcard', methodDescription: 'MOBIFONE' },
|
|
12
|
-
{ name: 'viettel', code: 'VTT', category: 'loadcard', methodDescription: 'VIETTEL' },
|
|
13
|
-
{ name: 'vinaphone', code: 'VNP', category: 'loadcard', methodDescription: 'VINAPHONE' },
|
|
14
|
-
// { name: 'vietnam mobile', code: 'VNM' },
|
|
15
|
-
// { name: 'thẻ zing', code: 'ZING' },
|
|
16
|
-
// { name: 'thẻ gate', code: 'GATE' },
|
|
17
|
-
// { name: 'thẻ garena', code: 'GARENA' },
|
|
18
|
-
],
|
|
10
|
+
cards: [],
|
|
19
11
|
options: [],
|
|
20
12
|
|
|
21
13
|
selectedCard: null,
|
|
@@ -50,7 +42,7 @@ export default function (request) {
|
|
|
50
42
|
actions: 'setCard',
|
|
51
43
|
},
|
|
52
44
|
SELECT_AMOUNT: {
|
|
53
|
-
target: '
|
|
45
|
+
target: 'calculating',
|
|
54
46
|
actions: 'setAmount',
|
|
55
47
|
},
|
|
56
48
|
},
|
|
@@ -85,7 +77,7 @@ export default function (request) {
|
|
|
85
77
|
calculated: {
|
|
86
78
|
on: {
|
|
87
79
|
SELECT_AMOUNT: {
|
|
88
|
-
target: '
|
|
80
|
+
target: 'calculating',
|
|
89
81
|
actions: 'setAmount',
|
|
90
82
|
},
|
|
91
83
|
CONFIRM: {
|
|
@@ -95,7 +87,7 @@ export default function (request) {
|
|
|
95
87
|
target: 'loaded',
|
|
96
88
|
},
|
|
97
89
|
CLEAR_CALCULATION: {
|
|
98
|
-
target: '
|
|
90
|
+
target: 'calculating',
|
|
99
91
|
actions: 'clearCalculation',
|
|
100
92
|
},
|
|
101
93
|
},
|
|
@@ -150,18 +142,20 @@ export default function (request) {
|
|
|
150
142
|
}),
|
|
151
143
|
setInitData: assign((context, event) => {
|
|
152
144
|
const paymentDetails = event.data
|
|
153
|
-
const
|
|
145
|
+
const cards = paymentDetails.filter((element) => element.category === context.currentCategory)
|
|
154
146
|
return {
|
|
155
147
|
paymentDetails,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
148
|
+
cards,
|
|
149
|
+
selectedCard: cards[0],
|
|
150
|
+
currentMethod: cards[0].method,
|
|
151
|
+
options: cards[0].optional
|
|
160
152
|
}
|
|
161
153
|
}),
|
|
162
154
|
setCard: assign((context, event) => {
|
|
163
155
|
return {
|
|
164
156
|
selectedCard: event.data,
|
|
157
|
+
currentMethod: event.data.method,
|
|
158
|
+
options: event.data.optional,
|
|
165
159
|
}
|
|
166
160
|
}),
|
|
167
161
|
setCardNumber: assign((context, event) => {
|
|
@@ -198,11 +192,6 @@ export default function (request) {
|
|
|
198
192
|
fetchInitData: async (context, event) => {
|
|
199
193
|
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
200
194
|
},
|
|
201
|
-
fetchBanksList: async (context, event) => {
|
|
202
|
-
const { paymentDetails, currentCategory } = context
|
|
203
|
-
const method = paymentDetails.find((item) => item.category === currentCategory)?.method
|
|
204
|
-
return await request.send(payment.getBankList(method))
|
|
205
|
-
},
|
|
206
195
|
fetchCalculation: async (context, event) => {
|
|
207
196
|
const { currentMethod, selectedAmount } = context
|
|
208
197
|
return await request.send(
|
|
@@ -199,11 +199,6 @@ export default function (request) {
|
|
|
199
199
|
fetchInitData: async (context, event) => {
|
|
200
200
|
return await request.send(payment.getPaymentDetail({ transferType: 'DEPOSIT' }))
|
|
201
201
|
},
|
|
202
|
-
fetchBanksList: async (context, event) => {
|
|
203
|
-
const { paymentDetails, currentCategory } = context
|
|
204
|
-
const method = paymentDetails.find((item) => item.category === currentCategory)?.method
|
|
205
|
-
return await request.send(payment.getBankList(method))
|
|
206
|
-
},
|
|
207
202
|
fetchCalculation: async (context, event) => {
|
|
208
203
|
const { currentMethod, selectedAmount } = context
|
|
209
204
|
return await request.send(
|