@jetthai/cuora 1.0.175 → 1.0.177

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 CHANGED
@@ -2,6 +2,26 @@
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.177](https://github.com/jetthai/cuora-module/compare/v1.0.168-1...v1.0.177) (2022-09-23)
6
+
7
+ ### [1.0.176](https://github.com/jetthai/cuora-module/compare/v1.0.175...v1.0.176) (2022-09-23)
8
+
9
+ ### [1.0.175](https://github.com/jetthai/cuora-module/compare/v1.0.174...v1.0.175) (2022-09-23)
10
+
11
+ ### [1.0.174](https://github.com/jetthai/cuora-module/compare/v1.0.173...v1.0.174) (2022-09-22)
12
+
13
+ ### [1.0.173](https://github.com/jetthai/cuora-module/compare/v1.0.172...v1.0.173) (2022-09-22)
14
+
15
+ ### [1.0.172](https://github.com/jetthai/cuora-module/compare/v1.0.171...v1.0.172) (2022-09-22)
16
+
17
+ ### [1.0.171](https://github.com/jetthai/cuora-module/compare/v1.0.170...v1.0.171) (2022-09-21)
18
+
19
+ ### [1.0.170](https://github.com/jetthai/cuora-module/compare/v1.0.169...v1.0.170) (2022-09-19)
20
+
21
+ ### [1.0.169](https://github.com/jetthai/cuora-module/compare/v1.0.168...v1.0.169) (2022-09-19)
22
+
23
+ ### [1.0.176](https://github.com/jetthai/cuora-module/compare/v1.0.175...v1.0.176) (2022-09-23)
24
+
5
25
  ### [1.0.175](https://github.com/jetthai/cuora-module/compare/v1.0.174...v1.0.175) (2022-09-23)
6
26
 
7
27
  ### [1.0.174](https://github.com/jetthai/cuora-module/compare/v1.0.173...v1.0.174) (2022-09-22)
@@ -16,6 +36,8 @@ All notable changes to this project will be documented in this file. See [standa
16
36
 
17
37
  ### [1.0.169](https://github.com/jetthai/cuora-module/compare/v1.0.168...v1.0.169) (2022-09-19)
18
38
 
39
+ ### [1.0.168-1](https://github.com/jetthai/cuora-module/compare/v1.0.168...v1.0.168-1) (2022-09-23)
40
+
19
41
  ### [1.0.168](https://github.com/jetthai/cuora-module/compare/v1.0.167...v1.0.168) (2022-09-12)
20
42
 
21
43
  ### [1.0.167](https://github.com/jetthai/cuora-module/compare/v1.0.166...v1.0.167) (2022-09-07)
package/dist/bundle.mjs CHANGED
@@ -345,77 +345,77 @@ var form = {
345
345
 
346
346
  var index$2 = { activity: activity$2, auth: auth$1, common: common$1, game: game$1, mailbox, payment, user, form };
347
347
 
348
- /*! *****************************************************************************
349
- Copyright (c) Microsoft Corporation.
350
-
351
- Permission to use, copy, modify, and/or distribute this software for any
352
- purpose with or without fee is hereby granted.
353
-
354
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
355
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
356
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
357
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
358
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
359
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
360
- PERFORMANCE OF THIS SOFTWARE.
361
- ***************************************************************************** */
362
-
363
- var __assign$2 = function() {
364
- __assign$2 = Object.assign || function __assign(t) {
365
- for (var s, i = 1, n = arguments.length; i < n; i++) {
366
- s = arguments[i];
367
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
368
- }
369
- return t;
370
- };
371
- return __assign$2.apply(this, arguments);
372
- };
373
-
374
- function __rest$1(s, e) {
375
- var t = {};
376
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
377
- t[p] = s[p];
378
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
379
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
380
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
381
- t[p[i]] = s[p[i]];
382
- }
383
- return t;
384
- }
385
-
386
- function __values(o) {
387
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
388
- if (m) return m.call(o);
389
- if (o && typeof o.length === "number") return {
390
- next: function () {
391
- if (o && i >= o.length) o = void 0;
392
- return { value: o && o[i++], done: !o };
393
- }
394
- };
395
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
396
- }
397
-
398
- function __read(o, n) {
399
- var m = typeof Symbol === "function" && o[Symbol.iterator];
400
- if (!m) return o;
401
- var i = m.call(o), r, ar = [], e;
402
- try {
403
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
404
- }
405
- catch (error) { e = { error: error }; }
406
- finally {
407
- try {
408
- if (r && !r.done && (m = i["return"])) m.call(i);
409
- }
410
- finally { if (e) throw e.error; }
411
- }
412
- return ar;
413
- }
414
-
415
- function __spreadArray(to, from) {
416
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
417
- to[j] = from[i];
418
- return to;
348
+ /*! *****************************************************************************
349
+ Copyright (c) Microsoft Corporation.
350
+
351
+ Permission to use, copy, modify, and/or distribute this software for any
352
+ purpose with or without fee is hereby granted.
353
+
354
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
355
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
356
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
357
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
358
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
359
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
360
+ PERFORMANCE OF THIS SOFTWARE.
361
+ ***************************************************************************** */
362
+
363
+ var __assign$2 = function() {
364
+ __assign$2 = Object.assign || function __assign(t) {
365
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
366
+ s = arguments[i];
367
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
368
+ }
369
+ return t;
370
+ };
371
+ return __assign$2.apply(this, arguments);
372
+ };
373
+
374
+ function __rest$1(s, e) {
375
+ var t = {};
376
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
377
+ t[p] = s[p];
378
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
379
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
380
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
381
+ t[p[i]] = s[p[i]];
382
+ }
383
+ return t;
384
+ }
385
+
386
+ function __values(o) {
387
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
388
+ if (m) return m.call(o);
389
+ if (o && typeof o.length === "number") return {
390
+ next: function () {
391
+ if (o && i >= o.length) o = void 0;
392
+ return { value: o && o[i++], done: !o };
393
+ }
394
+ };
395
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
396
+ }
397
+
398
+ function __read(o, n) {
399
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
400
+ if (!m) return o;
401
+ var i = m.call(o), r, ar = [], e;
402
+ try {
403
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
404
+ }
405
+ catch (error) { e = { error: error }; }
406
+ finally {
407
+ try {
408
+ if (r && !r.done && (m = i["return"])) m.call(i);
409
+ }
410
+ finally { if (e) throw e.error; }
411
+ }
412
+ return ar;
413
+ }
414
+
415
+ function __spreadArray(to, from) {
416
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
417
+ to[j] = from[i];
418
+ return to;
419
419
  }
420
420
 
421
421
  var STATE_DELIMITER = '.';
@@ -552,9 +552,9 @@ function mapFilterValues(collection, iteratee, predicate) {
552
552
 
553
553
  return result;
554
554
  }
555
- /**
556
- * Retrieves a value at the given path.
557
- * @param props The deep path to the prop of the desired value
555
+ /**
556
+ * Retrieves a value at the given path.
557
+ * @param props The deep path to the prop of the desired value
558
558
  */
559
559
 
560
560
  var path = function (props) {
@@ -583,9 +583,9 @@ var path = function (props) {
583
583
  return result;
584
584
  };
585
585
  };
586
- /**
587
- * Retrieves a value at the given path via the nested accessor prop.
588
- * @param props The deep path to the prop of the desired value
586
+ /**
587
+ * Retrieves a value at the given path via the nested accessor prop.
588
+ * @param props The deep path to the prop of the desired value
589
589
  */
590
590
 
591
591
  function nestedPath(props, accessorProp) {
@@ -1033,11 +1033,11 @@ function toActivityDefinition(action) {
1033
1033
  type: actionObject.type
1034
1034
  });
1035
1035
  }
1036
- /**
1037
- * Raises an event. This places the event in the internal event queue, so that
1038
- * the event is immediately consumed by the machine in the current step.
1039
- *
1040
- * @param eventType The event to raise.
1036
+ /**
1037
+ * Raises an event. This places the event in the internal event queue, so that
1038
+ * the event is immediately consumed by the machine in the current step.
1039
+ *
1040
+ * @param eventType The event to raise.
1041
1041
  */
1042
1042
 
1043
1043
  function raise(event) {
@@ -1058,15 +1058,15 @@ function resolveRaise(action) {
1058
1058
  _event: toSCXMLEvent(action.event)
1059
1059
  };
1060
1060
  }
1061
- /**
1062
- * Sends an event. This returns an action that will be read by an interpreter to
1063
- * send the event in the next step, after the current step is finished executing.
1064
- *
1065
- * @param event The event to send.
1066
- * @param options Options to pass into the send event:
1067
- * - `id` - The unique send event identifier (used with `cancel()`).
1068
- * - `delay` - The number of milliseconds to delay the sending of the event.
1069
- * - `to` - The target of this event (by default, the machine the event was sent from).
1061
+ /**
1062
+ * Sends an event. This returns an action that will be read by an interpreter to
1063
+ * send the event in the next step, after the current step is finished executing.
1064
+ *
1065
+ * @param event The event to send.
1066
+ * @param options Options to pass into the send event:
1067
+ * - `id` - The unique send event identifier (used with `cancel()`).
1068
+ * - `delay` - The number of milliseconds to delay the sending of the event.
1069
+ * - `to` - The target of this event (by default, the machine the event was sent from).
1070
1070
  */
1071
1071
 
1072
1072
  function send(event, options) {
@@ -1108,12 +1108,12 @@ var resolveLog = function (action, ctx, _event) {
1108
1108
  })
1109
1109
  });
1110
1110
  };
1111
- /**
1112
- * Cancels an in-flight `send(...)` action. A canceled sent action will not
1113
- * be executed, nor will its event be sent, unless it has already been sent
1114
- * (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`).
1115
- *
1116
- * @param sendId The `id` of the `send(...)` action to cancel.
1111
+ /**
1112
+ * Cancels an in-flight `send(...)` action. A canceled sent action will not
1113
+ * be executed, nor will its event be sent, unless it has already been sent
1114
+ * (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`).
1115
+ *
1116
+ * @param sendId The `id` of the `send(...)` action to cancel.
1117
1117
  */
1118
1118
 
1119
1119
  var cancel = function (sendId) {
@@ -1122,10 +1122,10 @@ var cancel = function (sendId) {
1122
1122
  sendId: sendId
1123
1123
  };
1124
1124
  };
1125
- /**
1126
- * Starts an activity.
1127
- *
1128
- * @param activity The activity to start.
1125
+ /**
1126
+ * Starts an activity.
1127
+ *
1128
+ * @param activity The activity to start.
1129
1129
  */
1130
1130
 
1131
1131
  function start(activity) {
@@ -1136,10 +1136,10 @@ function start(activity) {
1136
1136
  exec: undefined
1137
1137
  };
1138
1138
  }
1139
- /**
1140
- * Stops an activity.
1141
- *
1142
- * @param actorRef The activity to stop.
1139
+ /**
1140
+ * Stops an activity.
1141
+ *
1142
+ * @param actorRef The activity to stop.
1143
1143
  */
1144
1144
 
1145
1145
  function stop(actorRef) {
@@ -1161,10 +1161,10 @@ function resolveStop(action, context, _event) {
1161
1161
  };
1162
1162
  return actionObject;
1163
1163
  }
1164
- /**
1165
- * Updates the current context of the machine.
1166
- *
1167
- * @param assignment An object that represents the partial context to update.
1164
+ /**
1165
+ * Updates the current context of the machine.
1166
+ *
1167
+ * @param assignment An object that represents the partial context to update.
1168
1168
  */
1169
1169
 
1170
1170
  var assign = function (assignment) {
@@ -1173,24 +1173,24 @@ var assign = function (assignment) {
1173
1173
  assignment: assignment
1174
1174
  };
1175
1175
  };
1176
- /**
1177
- * Returns an event type that represents an implicit event that
1178
- * is sent after the specified `delay`.
1179
- *
1180
- * @param delayRef The delay in milliseconds
1181
- * @param id The state node ID where this event is handled
1176
+ /**
1177
+ * Returns an event type that represents an implicit event that
1178
+ * is sent after the specified `delay`.
1179
+ *
1180
+ * @param delayRef The delay in milliseconds
1181
+ * @param id The state node ID where this event is handled
1182
1182
  */
1183
1183
 
1184
1184
  function after(delayRef, id) {
1185
1185
  var idSuffix = id ? "#" + id : '';
1186
1186
  return ActionTypes.After + "(" + delayRef + ")" + idSuffix;
1187
1187
  }
1188
- /**
1189
- * Returns an event that represents that a final state node
1190
- * has been reached in the parent state node.
1191
- *
1192
- * @param id The final state node's parent state node `id`
1193
- * @param data The data to pass into the event
1188
+ /**
1189
+ * Returns an event that represents that a final state node
1190
+ * has been reached in the parent state node.
1191
+ *
1192
+ * @param id The final state node's parent state node `id`
1193
+ * @param data The data to pass into the event
1194
1194
  */
1195
1195
 
1196
1196
  function done(id, data) {
@@ -1206,14 +1206,14 @@ function done(id, data) {
1206
1206
 
1207
1207
  return eventObject;
1208
1208
  }
1209
- /**
1210
- * Returns an event that represents that an invoked service has terminated.
1211
- *
1212
- * An invoked service is terminated when it has reached a top-level final state node,
1213
- * but not when it is canceled.
1214
- *
1215
- * @param id The final state node ID
1216
- * @param data The data to pass into the event
1209
+ /**
1210
+ * Returns an event that represents that an invoked service has terminated.
1211
+ *
1212
+ * An invoked service is terminated when it has reached a top-level final state node,
1213
+ * but not when it is canceled.
1214
+ *
1215
+ * @param id The final state node ID
1216
+ * @param data The data to pass into the event
1217
1217
  */
1218
1218
 
1219
1219
  function doneInvoke(id, data) {
@@ -1624,17 +1624,17 @@ var State =
1624
1624
 
1625
1625
  /** @class */
1626
1626
  function () {
1627
- /**
1628
- * Creates a new State instance.
1629
- * @param value The state value
1630
- * @param context The extended state
1631
- * @param historyValue The tree representing historical values of the state nodes
1632
- * @param history The previous state
1633
- * @param actions An array of action objects to execute as side-effects
1634
- * @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`).
1635
- * @param meta
1636
- * @param events Internal event queue. Should be empty with run-to-completion semantics.
1637
- * @param configuration
1627
+ /**
1628
+ * Creates a new State instance.
1629
+ * @param value The state value
1630
+ * @param context The extended state
1631
+ * @param historyValue The tree representing historical values of the state nodes
1632
+ * @param history The previous state
1633
+ * @param actions An array of action objects to execute as side-effects
1634
+ * @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`).
1635
+ * @param meta
1636
+ * @param events Internal event queue. Should be empty with run-to-completion semantics.
1637
+ * @param configuration
1638
1638
  */
1639
1639
  function State(config) {
1640
1640
  var _this = this;
@@ -1670,10 +1670,10 @@ function () {
1670
1670
  }
1671
1671
  });
1672
1672
  }
1673
- /**
1674
- * Creates a new State instance for the given `stateValue` and `context`.
1675
- * @param stateValue
1676
- * @param context
1673
+ /**
1674
+ * Creates a new State instance for the given `stateValue` and `context`.
1675
+ * @param stateValue
1676
+ * @param context
1677
1677
  */
1678
1678
 
1679
1679
 
@@ -1717,19 +1717,19 @@ function () {
1717
1717
  children: {}
1718
1718
  });
1719
1719
  };
1720
- /**
1721
- * Creates a new State instance for the given `config`.
1722
- * @param config The state config
1720
+ /**
1721
+ * Creates a new State instance for the given `config`.
1722
+ * @param config The state config
1723
1723
  */
1724
1724
 
1725
1725
 
1726
1726
  State.create = function (config) {
1727
1727
  return new State(config);
1728
1728
  };
1729
- /**
1730
- * Creates a new `State` instance for the given `stateValue` and `context` with no actions (side-effects).
1731
- * @param stateValue
1732
- * @param context
1729
+ /**
1730
+ * Creates a new `State` instance for the given `stateValue` and `context` with no actions (side-effects).
1731
+ * @param stateValue
1732
+ * @param context
1733
1733
  */
1734
1734
 
1735
1735
 
@@ -1756,10 +1756,10 @@ function () {
1756
1756
 
1757
1757
  return State.from(stateValue, context);
1758
1758
  };
1759
- /**
1760
- * Returns an array of all the string leaf state node paths.
1761
- * @param stateValue
1762
- * @param delimiter The character(s) that separate each subpath in the string state node path.
1759
+ /**
1760
+ * Returns an array of all the string leaf state node paths.
1761
+ * @param stateValue
1762
+ * @param delimiter The character(s) that separate each subpath in the string state node path.
1763
1763
  */
1764
1764
 
1765
1765
 
@@ -1798,28 +1798,28 @@ function () {
1798
1798
  tags: Array.from(tags)
1799
1799
  });
1800
1800
  };
1801
- /**
1802
- * Whether the current state value is a subset of the given parent state value.
1803
- * @param parentStateValue
1801
+ /**
1802
+ * Whether the current state value is a subset of the given parent state value.
1803
+ * @param parentStateValue
1804
1804
  */
1805
1805
 
1806
1806
 
1807
1807
  State.prototype.matches = function (parentStateValue) {
1808
1808
  return matchesState(parentStateValue, this.value);
1809
1809
  };
1810
- /**
1811
- * Whether the current state configuration has a state node with the specified `tag`.
1812
- * @param tag
1810
+ /**
1811
+ * Whether the current state configuration has a state node with the specified `tag`.
1812
+ * @param tag
1813
1813
  */
1814
1814
 
1815
1815
 
1816
1816
  State.prototype.hasTag = function (tag) {
1817
1817
  return this.tags.has(tag);
1818
1818
  };
1819
- /**
1820
- * Determines whether sending the `event` will cause a transition.
1821
- * @param event The event to test
1822
- * @returns Whether the event will cause a transition
1819
+ /**
1820
+ * Determines whether sending the `event` will cause a transition.
1821
+ * @param event The event to test
1822
+ * @returns Whether the event will cause a transition
1823
1823
  */
1824
1824
 
1825
1825
 
@@ -1836,9 +1836,9 @@ function () {
1836
1836
  return State;
1837
1837
  }();
1838
1838
 
1839
- /**
1840
- * Maintains a stack of the current service in scope.
1841
- * This is used to provide the correct service to spawn().
1839
+ /**
1840
+ * Maintains a stack of the current service in scope.
1841
+ * This is used to provide the correct service to spawn().
1842
1842
  */
1843
1843
  var provide = function (service, fn) {
1844
1844
  var result = fn(service);
@@ -1868,11 +1868,11 @@ function createNullActor(id) {
1868
1868
  }
1869
1869
  };
1870
1870
  }
1871
- /**
1872
- * Creates a deferred actor that is able to be invoked given the provided
1873
- * invocation information in its `.meta` value.
1874
- *
1875
- * @param invokeDefinition The meta information needed to invoke the actor.
1871
+ /**
1872
+ * Creates a deferred actor that is able to be invoked given the provided
1873
+ * invocation information in its `.meta` value.
1874
+ *
1875
+ * @param invokeDefinition The meta information needed to invoke the actor.
1876
1876
  */
1877
1877
 
1878
1878
  function createInvocableActor(invokeDefinition, machine, context, _event) {
@@ -1963,12 +1963,12 @@ var StateNode =
1963
1963
  /** @class */
1964
1964
  function () {
1965
1965
  function StateNode(
1966
- /**
1967
- * The raw config used to create the machine.
1966
+ /**
1967
+ * The raw config used to create the machine.
1968
1968
  */
1969
1969
  config, options,
1970
- /**
1971
- * The initial extended state
1970
+ /**
1971
+ * The initial extended state
1972
1972
  */
1973
1973
  _context // TODO: this is unsafe, but we're removing it in v5 anyway
1974
1974
  ) {
@@ -1982,8 +1982,8 @@ function () {
1982
1982
 
1983
1983
  this.config = config;
1984
1984
  this._context = _context;
1985
- /**
1986
- * The order this state node appears. Corresponds to the implicit SCXML document order.
1985
+ /**
1986
+ * The order this state node appears. Corresponds to the implicit SCXML document order.
1987
1987
  */
1988
1988
 
1989
1989
  this.order = -1;
@@ -2118,11 +2118,11 @@ function () {
2118
2118
  return stateNode.on;
2119
2119
  });
2120
2120
  };
2121
- /**
2122
- * Clones this state machine with custom options and context.
2123
- *
2124
- * @param options Options (actions, guards, activities, services) to recursively merge with the existing options.
2125
- * @param context Custom context (will override predefined context)
2121
+ /**
2122
+ * Clones this state machine with custom options and context.
2123
+ *
2124
+ * @param options Options (actions, guards, activities, services) to recursively merge with the existing options.
2125
+ * @param context Custom context (will override predefined context)
2126
2126
  */
2127
2127
 
2128
2128
 
@@ -2141,10 +2141,10 @@ function () {
2141
2141
  delays: __assign$2(__assign$2({}, delays), options.delays)
2142
2142
  }, context !== null && context !== void 0 ? context : this.context);
2143
2143
  };
2144
- /**
2145
- * Clones this state machine with custom context.
2146
- *
2147
- * @param context Custom context (will override predefined context, not recursive)
2144
+ /**
2145
+ * Clones this state machine with custom context.
2146
+ *
2147
+ * @param context Custom context (will override predefined context, not recursive)
2148
2148
  */
2149
2149
 
2150
2150
 
@@ -2160,8 +2160,8 @@ function () {
2160
2160
  configurable: true
2161
2161
  });
2162
2162
  Object.defineProperty(StateNode.prototype, "definition", {
2163
- /**
2164
- * The well-structured state node definition.
2163
+ /**
2164
+ * The well-structured state node definition.
2165
2165
  */
2166
2166
  get: function () {
2167
2167
  return {
@@ -2195,8 +2195,8 @@ function () {
2195
2195
  };
2196
2196
 
2197
2197
  Object.defineProperty(StateNode.prototype, "on", {
2198
- /**
2199
- * The mapping of events to transitions.
2198
+ /**
2199
+ * The mapping of events to transitions.
2200
2200
  */
2201
2201
  get: function () {
2202
2202
  if (this.__cache.on) {
@@ -2221,8 +2221,8 @@ function () {
2221
2221
  configurable: true
2222
2222
  });
2223
2223
  Object.defineProperty(StateNode.prototype, "transitions", {
2224
- /**
2225
- * All the transitions that can be taken from this state node.
2224
+ /**
2225
+ * All the transitions that can be taken from this state node.
2226
2226
  */
2227
2227
  get: function () {
2228
2228
  return this.__cache.transitions || (this.__cache.transitions = this.formatTransitions(), this.__cache.transitions);
@@ -2245,8 +2245,8 @@ function () {
2245
2245
  this.__cache.candidates[eventName] = candidates;
2246
2246
  return candidates;
2247
2247
  };
2248
- /**
2249
- * All delayed transitions from the config.
2248
+ /**
2249
+ * All delayed transitions from the config.
2250
2250
  */
2251
2251
 
2252
2252
 
@@ -2298,10 +2298,10 @@ function () {
2298
2298
  });
2299
2299
  });
2300
2300
  };
2301
- /**
2302
- * Returns the state nodes represented by the current state value.
2303
- *
2304
- * @param state The state value or State instance
2301
+ /**
2302
+ * Returns the state nodes represented by the current state value.
2303
+ *
2304
+ * @param state The state value or State instance
2305
2305
  */
2306
2306
 
2307
2307
 
@@ -2332,10 +2332,10 @@ function () {
2332
2332
  return allSubStateNodes.concat(subStateNode);
2333
2333
  }, []));
2334
2334
  };
2335
- /**
2336
- * Returns `true` if this state node explicitly handles the given event.
2337
- *
2338
- * @param event The event in question
2335
+ /**
2336
+ * Returns `true` if this state node explicitly handles the given event.
2337
+ *
2338
+ * @param event The event in question
2339
2339
  */
2340
2340
 
2341
2341
 
@@ -2343,12 +2343,12 @@ function () {
2343
2343
  var eventType = getEventType(event);
2344
2344
  return this.events.includes(eventType);
2345
2345
  };
2346
- /**
2347
- * Resolves the given `state` to a new `State` instance relative to this machine.
2348
- *
2349
- * This ensures that `.events` and `.nextEvents` represent the correct values.
2350
- *
2351
- * @param state The state to resolve
2346
+ /**
2347
+ * Resolves the given `state` to a new `State` instance relative to this machine.
2348
+ *
2349
+ * This ensures that `.events` and `.nextEvents` represent the correct values.
2350
+ *
2351
+ * @param state The state to resolve
2352
2352
  */
2353
2353
 
2354
2354
 
@@ -2566,9 +2566,9 @@ function () {
2566
2566
 
2567
2567
  return nodes;
2568
2568
  };
2569
- /**
2570
- * Whether the given state node "escapes" this state node. If the `stateNode` is equal to or the parent of
2571
- * this state node, it does not escape.
2569
+ /**
2570
+ * Whether the given state node "escapes" this state node. If the `stateNode` is equal to or the parent of
2571
+ * this state node, it does not escape.
2572
2572
  */
2573
2573
 
2574
2574
 
@@ -2693,12 +2693,12 @@ function () {
2693
2693
  var actions = toActionObjects(exitActions.concat(transition.actions).concat(entryActions), this.machine.options.actions);
2694
2694
  return actions;
2695
2695
  };
2696
- /**
2697
- * Determines the next state given the current `state` and sent `event`.
2698
- *
2699
- * @param state The current State instance or state value
2700
- * @param event The event that was sent at the current state
2701
- * @param context The current context (extended state) of the current state
2696
+ /**
2697
+ * Determines the next state given the current `state` and sent `event`.
2698
+ *
2699
+ * @param state The current State instance or state value
2700
+ * @param event The event that was sent at the current state
2701
+ * @param context The current context (extended state) of the current state
2702
2702
  */
2703
2703
 
2704
2704
 
@@ -2891,8 +2891,8 @@ function () {
2891
2891
  })));
2892
2892
  return maybeNextState;
2893
2893
  };
2894
- /**
2895
- * Returns the child state node from its relative `stateKey`, or throws.
2894
+ /**
2895
+ * Returns the child state node from its relative `stateKey`, or throws.
2896
2896
  */
2897
2897
 
2898
2898
 
@@ -2913,10 +2913,10 @@ function () {
2913
2913
 
2914
2914
  return result;
2915
2915
  };
2916
- /**
2917
- * Returns the state node with the given `stateId`, or throws.
2918
- *
2919
- * @param stateId The state ID. The prefix "#" is removed.
2916
+ /**
2917
+ * Returns the state node with the given `stateId`, or throws.
2918
+ *
2919
+ * @param stateId The state ID. The prefix "#" is removed.
2920
2920
  */
2921
2921
 
2922
2922
 
@@ -2935,10 +2935,10 @@ function () {
2935
2935
 
2936
2936
  return stateNode;
2937
2937
  };
2938
- /**
2939
- * Returns the relative state node from the given `statePath`, or throws.
2940
- *
2941
- * @param statePath The string or string array relative path to the state node.
2938
+ /**
2939
+ * Returns the relative state node from the given `statePath`, or throws.
2940
+ *
2941
+ * @param statePath The string or string array relative path to the state node.
2942
2942
  */
2943
2943
 
2944
2944
 
@@ -2966,10 +2966,10 @@ function () {
2966
2966
 
2967
2967
  return currentStateNode;
2968
2968
  };
2969
- /**
2970
- * Resolves a partial state value with its full representation in this machine.
2971
- *
2972
- * @param stateValue The partial state value to resolve.
2969
+ /**
2970
+ * Resolves a partial state value with its full representation in this machine.
2971
+ *
2972
+ * @param stateValue The partial state value to resolve.
2973
2973
  */
2974
2974
 
2975
2975
 
@@ -3073,9 +3073,9 @@ function () {
3073
3073
  };
3074
3074
 
3075
3075
  Object.defineProperty(StateNode.prototype, "initialState", {
3076
- /**
3077
- * The initial State instance, which includes all actions to be executed from
3078
- * entering the initial state.
3076
+ /**
3077
+ * The initial State instance, which includes all actions to be executed from
3078
+ * entering the initial state.
3079
3079
  */
3080
3080
  get: function () {
3081
3081
  this._init(); // TODO: this should be in the constructor (see note in constructor)
@@ -3093,9 +3093,9 @@ function () {
3093
3093
  configurable: true
3094
3094
  });
3095
3095
  Object.defineProperty(StateNode.prototype, "target", {
3096
- /**
3097
- * The target state value of the history state node, if it exists. This represents the
3098
- * default state value to transition to if no history value exists yet.
3096
+ /**
3097
+ * The target state value of the history state node, if it exists. This represents the
3098
+ * default state value to transition to if no history value exists yet.
3099
3099
  */
3100
3100
  get: function () {
3101
3101
  var target;
@@ -3115,12 +3115,12 @@ function () {
3115
3115
  enumerable: false,
3116
3116
  configurable: true
3117
3117
  });
3118
- /**
3119
- * Returns the leaf nodes from a state path relative to this state node.
3120
- *
3121
- * @param relativeStateId The relative state path to retrieve the state nodes
3122
- * @param history The previous state to retrieve history
3123
- * @param resolve Whether state nodes should resolve to initial child state nodes
3118
+ /**
3119
+ * Returns the leaf nodes from a state path relative to this state node.
3120
+ *
3121
+ * @param relativeStateId The relative state path to retrieve the state nodes
3122
+ * @param history The previous state to retrieve history
3123
+ * @param resolve Whether state nodes should resolve to initial child state nodes
3124
3124
  */
3125
3125
 
3126
3126
  StateNode.prototype.getRelativeStateNodes = function (relativeStateId, historyValue, resolve) {
@@ -3153,11 +3153,11 @@ function () {
3153
3153
  enumerable: false,
3154
3154
  configurable: true
3155
3155
  });
3156
- /**
3157
- * Retrieves state nodes from a relative path to this state node.
3158
- *
3159
- * @param relativePath The relative path from this state node
3160
- * @param historyValue
3156
+ /**
3157
+ * Retrieves state nodes from a relative path to this state node.
3158
+ *
3159
+ * @param relativePath The relative path from this state node
3160
+ * @param historyValue
3161
3161
  */
3162
3162
 
3163
3163
  StateNode.prototype.getFromRelativePath = function (relativePath) {
@@ -3205,11 +3205,11 @@ function () {
3205
3205
  })
3206
3206
  };
3207
3207
  };
3208
- /**
3209
- * Resolves to the historical value(s) of the parent state node,
3210
- * represented by state nodes.
3211
- *
3212
- * @param historyValue
3208
+ /**
3209
+ * Resolves to the historical value(s) of the parent state node,
3210
+ * represented by state nodes.
3211
+ *
3212
+ * @param historyValue
3213
3213
  */
3214
3214
 
3215
3215
 
@@ -3241,8 +3241,8 @@ function () {
3241
3241
  };
3242
3242
 
3243
3243
  Object.defineProperty(StateNode.prototype, "stateIds", {
3244
- /**
3245
- * All the state node IDs of this state node and its descendant state nodes.
3244
+ /**
3245
+ * All the state node IDs of this state node and its descendant state nodes.
3246
3246
  */
3247
3247
  get: function () {
3248
3248
  var _this = this;
@@ -3256,8 +3256,8 @@ function () {
3256
3256
  configurable: true
3257
3257
  });
3258
3258
  Object.defineProperty(StateNode.prototype, "events", {
3259
- /**
3260
- * All the event types accepted by this state node and its descendants.
3259
+ /**
3260
+ * All the event types accepted by this state node and its descendants.
3261
3261
  */
3262
3262
  get: function () {
3263
3263
  var e_7, _a, e_8, _b;
@@ -3313,10 +3313,10 @@ function () {
3313
3313
  configurable: true
3314
3314
  });
3315
3315
  Object.defineProperty(StateNode.prototype, "ownEvents", {
3316
- /**
3317
- * All the events that have transitions directly from this state node.
3318
- *
3319
- * Excludes any inert events.
3316
+ /**
3317
+ * All the events that have transitions directly from this state node.
3318
+ *
3319
+ * Excludes any inert events.
3320
3320
  */
3321
3321
  get: function () {
3322
3322
  var events = new Set(this.transitions.filter(function (transition) {
@@ -7777,213 +7777,213 @@ function tryDecode(str, decode) {
7777
7777
  }
7778
7778
  }
7779
7779
 
7780
- function hasDocumentCookie() {
7781
- // Can we get/set cookies on document.cookie?
7782
- return typeof document === 'object' && typeof document.cookie === 'string';
7783
- }
7784
- function parseCookies(cookies, options) {
7785
- if (typeof cookies === 'string') {
7786
- return parse_1(cookies, options);
7787
- }
7788
- else if (typeof cookies === 'object' && cookies !== null) {
7789
- return cookies;
7790
- }
7791
- else {
7792
- return {};
7793
- }
7794
- }
7795
- function isParsingCookie(value, doNotParse) {
7796
- if (typeof doNotParse === 'undefined') {
7797
- // We guess if the cookie start with { or [, it has been serialized
7798
- doNotParse =
7799
- !value || (value[0] !== '{' && value[0] !== '[' && value[0] !== '"');
7800
- }
7801
- return !doNotParse;
7802
- }
7803
- function readCookie(value, options) {
7804
- if (options === void 0) { options = {}; }
7805
- var cleanValue = cleanupCookieValue(value);
7806
- if (isParsingCookie(cleanValue, options.doNotParse)) {
7807
- try {
7808
- return JSON.parse(cleanValue);
7809
- }
7810
- catch (e) {
7811
- // At least we tried
7812
- }
7813
- }
7814
- // Ignore clean value if we failed the deserialization
7815
- // It is not relevant anymore to trim those values
7816
- return value;
7817
- }
7818
- function cleanupCookieValue(value) {
7819
- // express prepend j: before serializing a cookie
7820
- if (value && value[0] === 'j' && value[1] === ':') {
7821
- return value.substr(2);
7822
- }
7823
- return value;
7824
- }
7825
-
7826
- var __assign$1 = (undefined && undefined.__assign) || function () {
7827
- __assign$1 = Object.assign || function(t) {
7828
- for (var s, i = 1, n = arguments.length; i < n; i++) {
7829
- s = arguments[i];
7830
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7831
- t[p] = s[p];
7832
- }
7833
- return t;
7834
- };
7835
- return __assign$1.apply(this, arguments);
7836
- };
7837
- var Cookies = /** @class */ (function () {
7838
- function Cookies(cookies, options) {
7839
- var _this = this;
7840
- this.changeListeners = [];
7841
- this.HAS_DOCUMENT_COOKIE = false;
7842
- this.cookies = parseCookies(cookies, options);
7843
- new Promise(function () {
7844
- _this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();
7845
- }).catch(function () { });
7846
- }
7847
- Cookies.prototype._updateBrowserValues = function (parseOptions) {
7848
- if (!this.HAS_DOCUMENT_COOKIE) {
7849
- return;
7850
- }
7851
- this.cookies = parse_1(document.cookie, parseOptions);
7852
- };
7853
- Cookies.prototype._emitChange = function (params) {
7854
- for (var i = 0; i < this.changeListeners.length; ++i) {
7855
- this.changeListeners[i](params);
7856
- }
7857
- };
7858
- Cookies.prototype.get = function (name, options, parseOptions) {
7859
- if (options === void 0) { options = {}; }
7860
- this._updateBrowserValues(parseOptions);
7861
- return readCookie(this.cookies[name], options);
7862
- };
7863
- Cookies.prototype.getAll = function (options, parseOptions) {
7864
- if (options === void 0) { options = {}; }
7865
- this._updateBrowserValues(parseOptions);
7866
- var result = {};
7867
- for (var name_1 in this.cookies) {
7868
- result[name_1] = readCookie(this.cookies[name_1], options);
7869
- }
7870
- return result;
7871
- };
7872
- Cookies.prototype.set = function (name, value, options) {
7873
- var _a;
7874
- if (typeof value === 'object') {
7875
- value = JSON.stringify(value);
7876
- }
7877
- this.cookies = __assign$1(__assign$1({}, this.cookies), (_a = {}, _a[name] = value, _a));
7878
- if (this.HAS_DOCUMENT_COOKIE) {
7879
- document.cookie = serialize_1(name, value, options);
7880
- }
7881
- this._emitChange({ name: name, value: value, options: options });
7882
- };
7883
- Cookies.prototype.remove = function (name, options) {
7884
- var finalOptions = (options = __assign$1(__assign$1({}, options), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 }));
7885
- this.cookies = __assign$1({}, this.cookies);
7886
- delete this.cookies[name];
7887
- if (this.HAS_DOCUMENT_COOKIE) {
7888
- document.cookie = serialize_1(name, '', finalOptions);
7889
- }
7890
- this._emitChange({ name: name, value: undefined, options: options });
7891
- };
7892
- Cookies.prototype.addChangeListener = function (callback) {
7893
- this.changeListeners.push(callback);
7894
- };
7895
- Cookies.prototype.removeChangeListener = function (callback) {
7896
- var idx = this.changeListeners.indexOf(callback);
7897
- if (idx >= 0) {
7898
- this.changeListeners.splice(idx, 1);
7899
- }
7900
- };
7901
- return Cookies;
7780
+ function hasDocumentCookie() {
7781
+ // Can we get/set cookies on document.cookie?
7782
+ return typeof document === 'object' && typeof document.cookie === 'string';
7783
+ }
7784
+ function parseCookies(cookies, options) {
7785
+ if (typeof cookies === 'string') {
7786
+ return parse_1(cookies, options);
7787
+ }
7788
+ else if (typeof cookies === 'object' && cookies !== null) {
7789
+ return cookies;
7790
+ }
7791
+ else {
7792
+ return {};
7793
+ }
7794
+ }
7795
+ function isParsingCookie(value, doNotParse) {
7796
+ if (typeof doNotParse === 'undefined') {
7797
+ // We guess if the cookie start with { or [, it has been serialized
7798
+ doNotParse =
7799
+ !value || (value[0] !== '{' && value[0] !== '[' && value[0] !== '"');
7800
+ }
7801
+ return !doNotParse;
7802
+ }
7803
+ function readCookie(value, options) {
7804
+ if (options === void 0) { options = {}; }
7805
+ var cleanValue = cleanupCookieValue(value);
7806
+ if (isParsingCookie(cleanValue, options.doNotParse)) {
7807
+ try {
7808
+ return JSON.parse(cleanValue);
7809
+ }
7810
+ catch (e) {
7811
+ // At least we tried
7812
+ }
7813
+ }
7814
+ // Ignore clean value if we failed the deserialization
7815
+ // It is not relevant anymore to trim those values
7816
+ return value;
7817
+ }
7818
+ function cleanupCookieValue(value) {
7819
+ // express prepend j: before serializing a cookie
7820
+ if (value && value[0] === 'j' && value[1] === ':') {
7821
+ return value.substr(2);
7822
+ }
7823
+ return value;
7824
+ }
7825
+
7826
+ var __assign$1 = (undefined && undefined.__assign) || function () {
7827
+ __assign$1 = Object.assign || function(t) {
7828
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
7829
+ s = arguments[i];
7830
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7831
+ t[p] = s[p];
7832
+ }
7833
+ return t;
7834
+ };
7835
+ return __assign$1.apply(this, arguments);
7836
+ };
7837
+ var Cookies = /** @class */ (function () {
7838
+ function Cookies(cookies, options) {
7839
+ var _this = this;
7840
+ this.changeListeners = [];
7841
+ this.HAS_DOCUMENT_COOKIE = false;
7842
+ this.cookies = parseCookies(cookies, options);
7843
+ new Promise(function () {
7844
+ _this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();
7845
+ }).catch(function () { });
7846
+ }
7847
+ Cookies.prototype._updateBrowserValues = function (parseOptions) {
7848
+ if (!this.HAS_DOCUMENT_COOKIE) {
7849
+ return;
7850
+ }
7851
+ this.cookies = parse_1(document.cookie, parseOptions);
7852
+ };
7853
+ Cookies.prototype._emitChange = function (params) {
7854
+ for (var i = 0; i < this.changeListeners.length; ++i) {
7855
+ this.changeListeners[i](params);
7856
+ }
7857
+ };
7858
+ Cookies.prototype.get = function (name, options, parseOptions) {
7859
+ if (options === void 0) { options = {}; }
7860
+ this._updateBrowserValues(parseOptions);
7861
+ return readCookie(this.cookies[name], options);
7862
+ };
7863
+ Cookies.prototype.getAll = function (options, parseOptions) {
7864
+ if (options === void 0) { options = {}; }
7865
+ this._updateBrowserValues(parseOptions);
7866
+ var result = {};
7867
+ for (var name_1 in this.cookies) {
7868
+ result[name_1] = readCookie(this.cookies[name_1], options);
7869
+ }
7870
+ return result;
7871
+ };
7872
+ Cookies.prototype.set = function (name, value, options) {
7873
+ var _a;
7874
+ if (typeof value === 'object') {
7875
+ value = JSON.stringify(value);
7876
+ }
7877
+ this.cookies = __assign$1(__assign$1({}, this.cookies), (_a = {}, _a[name] = value, _a));
7878
+ if (this.HAS_DOCUMENT_COOKIE) {
7879
+ document.cookie = serialize_1(name, value, options);
7880
+ }
7881
+ this._emitChange({ name: name, value: value, options: options });
7882
+ };
7883
+ Cookies.prototype.remove = function (name, options) {
7884
+ var finalOptions = (options = __assign$1(__assign$1({}, options), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 }));
7885
+ this.cookies = __assign$1({}, this.cookies);
7886
+ delete this.cookies[name];
7887
+ if (this.HAS_DOCUMENT_COOKIE) {
7888
+ document.cookie = serialize_1(name, '', finalOptions);
7889
+ }
7890
+ this._emitChange({ name: name, value: undefined, options: options });
7891
+ };
7892
+ Cookies.prototype.addChangeListener = function (callback) {
7893
+ this.changeListeners.push(callback);
7894
+ };
7895
+ Cookies.prototype.removeChangeListener = function (callback) {
7896
+ var idx = this.changeListeners.indexOf(callback);
7897
+ if (idx >= 0) {
7898
+ this.changeListeners.splice(idx, 1);
7899
+ }
7900
+ };
7901
+ return Cookies;
7902
7902
  }());
7903
7903
 
7904
- /*! *****************************************************************************
7905
- Copyright (c) Microsoft Corporation.
7906
-
7907
- Permission to use, copy, modify, and/or distribute this software for any
7908
- purpose with or without fee is hereby granted.
7909
-
7910
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7911
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7912
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
7913
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
7914
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
7915
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7916
- PERFORMANCE OF THIS SOFTWARE.
7917
- ***************************************************************************** */
7918
-
7919
- var __assign = function() {
7920
- __assign = Object.assign || function __assign(t) {
7921
- for (var s, i = 1, n = arguments.length; i < n; i++) {
7922
- s = arguments[i];
7923
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
7924
- }
7925
- return t;
7926
- };
7927
- return __assign.apply(this, arguments);
7928
- };
7929
-
7930
- function __rest(s, e) {
7931
- var t = {};
7932
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
7933
- t[p] = s[p];
7934
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7935
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7936
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
7937
- t[p[i]] = s[p[i]];
7938
- }
7939
- return t;
7940
- }
7941
-
7942
- function __awaiter(thisArg, _arguments, P, generator) {
7943
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7944
- return new (P || (P = Promise))(function (resolve, reject) {
7945
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7946
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7947
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7948
- step((generator = generator.apply(thisArg, _arguments || [])).next());
7949
- });
7950
- }
7951
-
7952
- function __generator(thisArg, body) {
7953
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7954
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7955
- function verb(n) { return function (v) { return step([n, v]); }; }
7956
- function step(op) {
7957
- if (f) throw new TypeError("Generator is already executing.");
7958
- while (_) try {
7959
- 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;
7960
- if (y = 0, t) op = [op[0] & 2, t.value];
7961
- switch (op[0]) {
7962
- case 0: case 1: t = op; break;
7963
- case 4: _.label++; return { value: op[1], done: false };
7964
- case 5: _.label++; y = op[1]; op = [0]; continue;
7965
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
7966
- default:
7967
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7968
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7969
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7970
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7971
- if (t[2]) _.ops.pop();
7972
- _.trys.pop(); continue;
7973
- }
7974
- op = body.call(thisArg, _);
7975
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7976
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7977
- }
7978
- }
7979
-
7980
- /** @deprecated */
7981
- function __spreadArrays() {
7982
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7983
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
7984
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7985
- r[k] = a[j];
7986
- return r;
7904
+ /*! *****************************************************************************
7905
+ Copyright (c) Microsoft Corporation.
7906
+
7907
+ Permission to use, copy, modify, and/or distribute this software for any
7908
+ purpose with or without fee is hereby granted.
7909
+
7910
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7911
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7912
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
7913
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
7914
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
7915
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7916
+ PERFORMANCE OF THIS SOFTWARE.
7917
+ ***************************************************************************** */
7918
+
7919
+ var __assign = function() {
7920
+ __assign = Object.assign || function __assign(t) {
7921
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
7922
+ s = arguments[i];
7923
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
7924
+ }
7925
+ return t;
7926
+ };
7927
+ return __assign.apply(this, arguments);
7928
+ };
7929
+
7930
+ function __rest(s, e) {
7931
+ var t = {};
7932
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
7933
+ t[p] = s[p];
7934
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7935
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7936
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
7937
+ t[p[i]] = s[p[i]];
7938
+ }
7939
+ return t;
7940
+ }
7941
+
7942
+ function __awaiter(thisArg, _arguments, P, generator) {
7943
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7944
+ return new (P || (P = Promise))(function (resolve, reject) {
7945
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7946
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7947
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7948
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
7949
+ });
7950
+ }
7951
+
7952
+ function __generator(thisArg, body) {
7953
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7954
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7955
+ function verb(n) { return function (v) { return step([n, v]); }; }
7956
+ function step(op) {
7957
+ if (f) throw new TypeError("Generator is already executing.");
7958
+ while (_) try {
7959
+ 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;
7960
+ if (y = 0, t) op = [op[0] & 2, t.value];
7961
+ switch (op[0]) {
7962
+ case 0: case 1: t = op; break;
7963
+ case 4: _.label++; return { value: op[1], done: false };
7964
+ case 5: _.label++; y = op[1]; op = [0]; continue;
7965
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
7966
+ default:
7967
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7968
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7969
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7970
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7971
+ if (t[2]) _.ops.pop();
7972
+ _.trys.pop(); continue;
7973
+ }
7974
+ op = body.call(thisArg, _);
7975
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7976
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7977
+ }
7978
+ }
7979
+
7980
+ /** @deprecated */
7981
+ function __spreadArrays() {
7982
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7983
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
7984
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7985
+ r[k] = a[j];
7986
+ return r;
7987
7987
  }
7988
7988
 
7989
7989
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.175",
3
+ "version": "1.0.177",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -39,23 +39,6 @@ export default function (request) {
39
39
  idle: {
40
40
  entry: 'fetchToken',
41
41
  always: [{ target: 'authenticated', cond: 'hasToken' }],
42
- on: {
43
- LOGIN_GUEST: {
44
- target: 'authenticationGuest',
45
- },
46
- LOGIN_PHONE: {
47
- target: 'authentication',
48
- actions: ['setReCaptchaToken', 'setLoginPhone'],
49
- },
50
- LOGIN_EMAIL: {
51
- target: 'authentication',
52
- actions: ['setReCaptchaToken', 'setLoginEmail'],
53
- },
54
- LOGIN_LOCAL: {
55
- target: 'authentication',
56
- actions: 'setLoginLocal',
57
- },
58
- },
59
42
  },
60
43
  authentication: {
61
44
  invoke: {
@@ -177,6 +160,21 @@ export default function (request) {
177
160
  CLEAR: {
178
161
  target: '.logout',
179
162
  },
163
+ LOGIN_GUEST: {
164
+ target: '.authenticationGuest',
165
+ },
166
+ LOGIN_PHONE: {
167
+ target: '.authentication',
168
+ actions: ['setReCaptchaToken', 'setLoginPhone'],
169
+ },
170
+ LOGIN_EMAIL: {
171
+ target: '.authentication',
172
+ actions: ['setReCaptchaToken', 'setLoginEmail'],
173
+ },
174
+ LOGIN_LOCAL: {
175
+ target: '.authentication',
176
+ actions: 'setLoginLocal',
177
+ },
180
178
  LOGIN_3PARTY: {
181
179
  actions: 'redirectTo3Party',
182
180
  },