parse 3.5.1-beta.1 → 3.5.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.
Files changed (45) hide show
  1. package/README.md +2 -1
  2. package/dist/parse.js +421 -347
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +421 -347
  5. package/dist/parse.weapp.min.js +2 -2
  6. package/lib/browser/CoreManager.js +1 -1
  7. package/lib/browser/EventuallyQueue.js +31 -27
  8. package/lib/browser/LiveQueryClient.js +6 -2
  9. package/lib/browser/LocalDatastore.js +20 -20
  10. package/lib/browser/LocalDatastoreController.js +16 -14
  11. package/lib/browser/LocalDatastoreController.react-native.js +10 -10
  12. package/lib/browser/ParseCLP.js +32 -32
  13. package/lib/browser/ParseFile.js +26 -15
  14. package/lib/browser/ParseLiveQuery.js +6 -6
  15. package/lib/browser/ParseObject.js +84 -69
  16. package/lib/browser/ParseOp.js +3 -1
  17. package/lib/browser/ParseQuery.js +115 -88
  18. package/lib/browser/ParseUser.js +74 -64
  19. package/lib/browser/RESTController.js +6 -7
  20. package/lib/node/CoreManager.js +1 -1
  21. package/lib/node/ParseQuery.js +3 -1
  22. package/lib/react-native/CoreManager.js +1 -1
  23. package/lib/react-native/LiveQueryClient.js +6 -2
  24. package/lib/react-native/LocalDatastore.js +3 -2
  25. package/lib/react-native/ParseCLP.js +32 -32
  26. package/lib/react-native/ParseFile.js +9 -3
  27. package/lib/react-native/ParseObject.js +14 -9
  28. package/lib/react-native/ParseOp.js +3 -1
  29. package/lib/react-native/ParseQuery.js +21 -7
  30. package/lib/react-native/RESTController.js +6 -7
  31. package/lib/weapp/CoreManager.js +1 -1
  32. package/lib/weapp/EventuallyQueue.js +31 -27
  33. package/lib/weapp/LiveQueryClient.js +6 -2
  34. package/lib/weapp/LocalDatastore.js +20 -20
  35. package/lib/weapp/LocalDatastoreController.js +16 -14
  36. package/lib/weapp/LocalDatastoreController.react-native.js +10 -10
  37. package/lib/weapp/ParseCLP.js +32 -32
  38. package/lib/weapp/ParseFile.js +26 -15
  39. package/lib/weapp/ParseLiveQuery.js +6 -6
  40. package/lib/weapp/ParseObject.js +84 -69
  41. package/lib/weapp/ParseOp.js +3 -1
  42. package/lib/weapp/ParseQuery.js +115 -88
  43. package/lib/weapp/ParseUser.js +74 -64
  44. package/lib/weapp/RESTController.js +6 -7
  45. package/package.json +3 -2
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v3.5.1-beta.1
2
+ * Parse JavaScript SDK v3.5.1
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -699,7 +699,7 @@ var config
699
699
  SERVER_AUTH_TOKEN: null,
700
700
  LIVEQUERY_SERVER_URL: null,
701
701
  ENCRYPTED_KEY: null,
702
- VERSION: 'js' + "3.5.1-beta.1",
702
+ VERSION: 'js' + "3.5.1",
703
703
  APPLICATION_ID: null,
704
704
  JAVASCRIPT_KEY: null,
705
705
  MASTER_KEY: null,
@@ -1543,7 +1543,7 @@ var EventuallyQueue = {
1543
1543
 
1544
1544
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1545
1545
  var queueData, queueId, index, prop;
1546
- return _regeneratorRuntime().wrap(function (_context) {
1546
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1547
1547
  while (1) {
1548
1548
  switch (_context.prev = _context.next) {
1549
1549
  case 0:
@@ -1586,10 +1586,10 @@ var EventuallyQueue = {
1586
1586
  }, _callee);
1587
1587
  }))();
1588
1588
  },
1589
- store: function (data) {
1589
+ store: function store(data) {
1590
1590
  return _Storage.default.setItemAsync(QUEUE_KEY, (0, _stringify.default)(data));
1591
1591
  },
1592
- load: function () {
1592
+ load: function load() {
1593
1593
  return _Storage.default.getItemAsync(QUEUE_KEY);
1594
1594
  },
1595
1595
 
@@ -1601,11 +1601,13 @@ var EventuallyQueue = {
1601
1601
  * @returns {Promise<Array>}
1602
1602
  * @static
1603
1603
  */
1604
- getQueue: function ()
1604
+ getQueue: function getQueue()
1605
1605
  /*: Promise<Array>*/
1606
1606
  {
1607
+ var _this2 = this;
1608
+
1607
1609
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1608
- return _regeneratorRuntime().wrap(function (_context2) {
1610
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1609
1611
  while (1) {
1610
1612
  switch (_context2.prev = _context2.next) {
1611
1613
  case 0:
@@ -1616,7 +1618,7 @@ var EventuallyQueue = {
1616
1618
 
1617
1619
  _context2.t0 = JSON;
1618
1620
  _context2.next = 4;
1619
- return this.load();
1621
+ return _this2.load();
1620
1622
 
1621
1623
  case 4:
1622
1624
  _context2.t1 = _context2.sent;
@@ -1653,7 +1655,7 @@ var EventuallyQueue = {
1653
1655
  * @static
1654
1656
  * @ignore
1655
1657
  */
1656
- setQueue: function (queue
1658
+ setQueue: function setQueue(queue
1657
1659
  /*: Queue*/
1658
1660
  )
1659
1661
  /*: Promise<void>*/
@@ -1670,7 +1672,7 @@ var EventuallyQueue = {
1670
1672
  * @static
1671
1673
  * @ignore
1672
1674
  */
1673
- remove: function (queueId
1675
+ remove: function remove(queueId
1674
1676
  /*: string*/
1675
1677
  )
1676
1678
  /*: Promise<void>*/
@@ -1679,7 +1681,7 @@ var EventuallyQueue = {
1679
1681
 
1680
1682
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1681
1683
  var queueData, index;
1682
- return _regeneratorRuntime().wrap(function (_context3) {
1684
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1683
1685
  while (1) {
1684
1686
  switch (_context3.prev = _context3.next) {
1685
1687
  case 0:
@@ -1716,7 +1718,7 @@ var EventuallyQueue = {
1716
1718
  * @returns {Promise} A promise that is fulfilled when queue is cleared.
1717
1719
  * @static
1718
1720
  */
1719
- clear: function ()
1721
+ clear: function clear()
1720
1722
  /*: Promise*/
1721
1723
  {
1722
1724
  queueCache = [];
@@ -1732,7 +1734,7 @@ var EventuallyQueue = {
1732
1734
  * @static
1733
1735
  * @ignore
1734
1736
  */
1735
- queueItemExists: function (queue
1737
+ queueItemExists: function queueItemExists(queue
1736
1738
  /*: Queue*/
1737
1739
  , queueId
1738
1740
  /*: string*/
@@ -1752,17 +1754,19 @@ var EventuallyQueue = {
1752
1754
  * @returns {number}
1753
1755
  * @static
1754
1756
  */
1755
- length: function ()
1757
+ length: function length()
1756
1758
  /*: number*/
1757
1759
  {
1760
+ var _this4 = this;
1761
+
1758
1762
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
1759
1763
  var queueData;
1760
- return _regeneratorRuntime().wrap(function (_context4) {
1764
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1761
1765
  while (1) {
1762
1766
  switch (_context4.prev = _context4.next) {
1763
1767
  case 0:
1764
1768
  _context4.next = 2;
1765
- return this.getQueue();
1769
+ return _this4.getQueue();
1766
1770
 
1767
1771
  case 2:
1768
1772
  queueData = _context4.sent;
@@ -1785,14 +1789,14 @@ var EventuallyQueue = {
1785
1789
  * @returns {Promise<boolean>} Returns true if queue was sent successfully.
1786
1790
  * @static
1787
1791
  */
1788
- sendQueue: function ()
1792
+ sendQueue: function sendQueue()
1789
1793
  /*: Promise<boolean>*/
1790
1794
  {
1791
1795
  var _this5 = this;
1792
1796
 
1793
1797
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
1794
1798
  var queue, queueData, i, queueObject, id, hash, className, ObjectType;
1795
- return _regeneratorRuntime().wrap(function (_context5) {
1799
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1796
1800
  while (1) {
1797
1801
  switch (_context5.prev = _context5.next) {
1798
1802
  case 0:
@@ -1878,7 +1882,7 @@ var EventuallyQueue = {
1878
1882
  * @static
1879
1883
  * @ignore
1880
1884
  */
1881
- sendQueueCallback: function (object
1885
+ sendQueueCallback: function sendQueueCallback(object
1882
1886
  /*: ParseObject*/
1883
1887
  , queueObject
1884
1888
  /*: QueueObject*/
@@ -1888,7 +1892,7 @@ var EventuallyQueue = {
1888
1892
  var _this6 = this;
1889
1893
 
1890
1894
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
1891
- return _regeneratorRuntime().wrap(function (_context6) {
1895
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
1892
1896
  while (1) {
1893
1897
  switch (_context6.prev = _context6.next) {
1894
1898
  case 0:
@@ -1986,7 +1990,7 @@ var EventuallyQueue = {
1986
1990
  * @param [ms] Milliseconds to ping the server. Default 2000ms
1987
1991
  * @static
1988
1992
  */
1989
- poll: function () {
1993
+ poll: function poll() {
1990
1994
  var _this7 = this;
1991
1995
 
1992
1996
  var ms
@@ -2021,7 +2025,7 @@ var EventuallyQueue = {
2021
2025
  * @name Parse.EventuallyQueue.stopPoll
2022
2026
  * @static
2023
2027
  */
2024
- stopPoll: function () {
2028
+ stopPoll: function stopPoll() {
2025
2029
  clearInterval(polling);
2026
2030
  polling = undefined;
2027
2031
  },
@@ -2034,25 +2038,25 @@ var EventuallyQueue = {
2034
2038
  * @returns {boolean}
2035
2039
  * @static
2036
2040
  */
2037
- isPolling: function ()
2041
+ isPolling: function isPolling()
2038
2042
  /*: boolean*/
2039
2043
  {
2040
2044
  return !!polling;
2041
2045
  },
2042
- _setPolling: function (flag
2046
+ _setPolling: function _setPolling(flag
2043
2047
  /*: boolean*/
2044
2048
  ) {
2045
2049
  polling = flag;
2046
2050
  },
2047
2051
  process: {
2048
- create: function (ObjectType, queueObject) {
2052
+ create: function create(ObjectType, queueObject) {
2049
2053
  var object = new ObjectType();
2050
2054
  return EventuallyQueue.sendQueueCallback(object, queueObject);
2051
2055
  },
2052
- byId: function (ObjectType, queueObject) {
2056
+ byId: function byId(ObjectType, queueObject) {
2053
2057
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
2054
2058
  var sessionToken, query, results;
2055
- return _regeneratorRuntime().wrap(function (_context7) {
2059
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2056
2060
  while (1) {
2057
2061
  switch (_context7.prev = _context7.next) {
2058
2062
  case 0:
@@ -2076,10 +2080,10 @@ var EventuallyQueue = {
2076
2080
  }, _callee7);
2077
2081
  }))();
2078
2082
  },
2079
- byHash: function (ObjectType, queueObject) {
2083
+ byHash: function byHash(ObjectType, queueObject) {
2080
2084
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
2081
2085
  var sessionToken, query, results;
2082
- return _regeneratorRuntime().wrap(function (_context8) {
2086
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2083
2087
  while (1) {
2084
2088
  switch (_context8.prev = _context8.next) {
2085
2089
  case 0:
@@ -2852,6 +2856,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2852
2856
  )
2853
2857
  /*: LiveQuerySubscription*/
2854
2858
  {
2859
+ var _this2 = this;
2860
+
2855
2861
  if (!query) {
2856
2862
  return;
2857
2863
  }
@@ -2878,7 +2884,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2878
2884
  this.subscriptions.set(this.requestId, subscription);
2879
2885
  this.requestId += 1;
2880
2886
  this.connectPromise.then(function () {
2881
- this.socket.send((0, _stringify.default)(subscribeRequest));
2887
+ _this2.socket.send((0, _stringify.default)(subscribeRequest));
2882
2888
  });
2883
2889
  return subscription;
2884
2890
  }
@@ -2893,6 +2899,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2893
2899
  value: function (subscription
2894
2900
  /*: Object*/
2895
2901
  ) {
2902
+ var _this3 = this;
2903
+
2896
2904
  if (!subscription) {
2897
2905
  return;
2898
2906
  }
@@ -2903,7 +2911,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2903
2911
  requestId: subscription.id
2904
2912
  };
2905
2913
  this.connectPromise.then(function () {
2906
- this.socket.send((0, _stringify.default)(unsubscribeRequest));
2914
+ _this3.socket.send((0, _stringify.default)(unsubscribeRequest));
2907
2915
  });
2908
2916
  }
2909
2917
  /**
@@ -4042,7 +4050,7 @@ var LocalDatastore = {
4042
4050
 
4043
4051
  var pinName, toPinPromises, objectKeys, _iterator, _step, parent, children, parentKey, json, objectKey, fromPinPromise, _yield$Promise$all, _yield$Promise$all2, pinned, toPin;
4044
4052
 
4045
- return _regeneratorRuntime().wrap(function (_context2) {
4053
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
4046
4054
  while (1) {
4047
4055
  switch (_context2.prev = _context2.next) {
4048
4056
  case 0:
@@ -4096,7 +4104,7 @@ var LocalDatastore = {
4096
4104
  },
4097
4105
  // Removes object and children keys from pin name
4098
4106
  // Keeps the object and children pinned
4099
- _handleUnPinAllWithName: function (name
4107
+ _handleUnPinAllWithName: function _handleUnPinAllWithName(name
4100
4108
  /*: string*/
4101
4109
  , objects
4102
4110
  /*: Array<ParseObject>*/
@@ -4106,7 +4114,7 @@ var LocalDatastore = {
4106
4114
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
4107
4115
  var localDatastore, pinName, promises, objectKeys, _iterator2, _step2, _objectKeys, _context3, parent, children, parentKey, pinned, _iterator3, _step3, objectKey, hasReference, key, pinnedObjects;
4108
4116
 
4109
- return _regeneratorRuntime().wrap(function (_context4) {
4117
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
4110
4118
  while (1) {
4111
4119
  switch (_context4.prev = _context4.next) {
4112
4120
  case 0:
@@ -4228,7 +4236,7 @@ var LocalDatastore = {
4228
4236
  }))();
4229
4237
  },
4230
4238
  // Retrieve all pointer fields from object recursively
4231
- _getChildren: function (object
4239
+ _getChildren: function _getChildren(object
4232
4240
  /*: ParseObject*/
4233
4241
  ) {
4234
4242
  var encountered = {};
@@ -4243,7 +4251,7 @@ var LocalDatastore = {
4243
4251
 
4244
4252
  return encountered;
4245
4253
  },
4246
- _traverse: function (object
4254
+ _traverse: function _traverse(object
4247
4255
  /*: any*/
4248
4256
  , encountered
4249
4257
  /*: any*/
@@ -4273,7 +4281,7 @@ var LocalDatastore = {
4273
4281
  }
4274
4282
  },
4275
4283
  // Transform keys in pin name to objects
4276
- _serializeObjectsFromPinName: function (name
4284
+ _serializeObjectsFromPinName: function _serializeObjectsFromPinName(name
4277
4285
  /*: string*/
4278
4286
  ) {
4279
4287
  var _this3 = this;
@@ -4282,7 +4290,7 @@ var LocalDatastore = {
4282
4290
  var _context5, _concatInstanceProper, _context6;
4283
4291
 
4284
4292
  var localDatastore, allObjects, key, pinName, pinned, promises, objects;
4285
- return _regeneratorRuntime().wrap(function (_context7) {
4293
+ return _regeneratorRuntime().wrap(function _callee3$(_context7) {
4286
4294
  while (1) {
4287
4295
  switch (_context7.prev = _context7.next) {
4288
4296
  case 0:
@@ -4342,7 +4350,7 @@ var LocalDatastore = {
4342
4350
  // Replaces object pointers with pinned pointers
4343
4351
  // The object pointers may contain old data
4344
4352
  // Uses Breadth First Search Algorithm
4345
- _serializeObject: function (objectKey
4353
+ _serializeObject: function _serializeObject(objectKey
4346
4354
  /*: string*/
4347
4355
  , localDatastore
4348
4356
  /*: any*/
@@ -4351,7 +4359,7 @@ var LocalDatastore = {
4351
4359
 
4352
4360
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
4353
4361
  var LDS, root, queue, meta, uniqueId, nodeId, subTreeRoot, field, value, key, pointer;
4354
- return _regeneratorRuntime().wrap(function (_context8) {
4362
+ return _regeneratorRuntime().wrap(function _callee4$(_context8) {
4355
4363
  while (1) {
4356
4364
  switch (_context8.prev = _context8.next) {
4357
4365
  case 0:
@@ -4417,7 +4425,7 @@ var LocalDatastore = {
4417
4425
  },
4418
4426
  // Called when an object is save / fetched
4419
4427
  // Update object pin value
4420
- _updateObjectIfPinned: function (object
4428
+ _updateObjectIfPinned: function _updateObjectIfPinned(object
4421
4429
  /*: ParseObject*/
4422
4430
  )
4423
4431
  /*: Promise<void>*/
@@ -4426,7 +4434,7 @@ var LocalDatastore = {
4426
4434
 
4427
4435
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
4428
4436
  var objectKey, pinned;
4429
- return _regeneratorRuntime().wrap(function (_context9) {
4437
+ return _regeneratorRuntime().wrap(function _callee5$(_context9) {
4430
4438
  while (1) {
4431
4439
  switch (_context9.prev = _context9.next) {
4432
4440
  case 0:
@@ -4466,14 +4474,14 @@ var LocalDatastore = {
4466
4474
  // Called when object is destroyed
4467
4475
  // Unpin object and remove all references from pin names
4468
4476
  // TODO: Destroy children?
4469
- _destroyObjectIfPinned: function (object
4477
+ _destroyObjectIfPinned: function _destroyObjectIfPinned(object
4470
4478
  /*: ParseObject*/
4471
4479
  ) {
4472
4480
  var _this6 = this;
4473
4481
 
4474
4482
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
4475
4483
  var localDatastore, objectKey, pin, promises, key, pinned;
4476
- return _regeneratorRuntime().wrap(function (_context10) {
4484
+ return _regeneratorRuntime().wrap(function _callee6$(_context10) {
4477
4485
  while (1) {
4478
4486
  switch (_context10.prev = _context10.next) {
4479
4487
  case 0:
@@ -4535,7 +4543,7 @@ var LocalDatastore = {
4535
4543
  }))();
4536
4544
  },
4537
4545
  // Update pin and references of the unsaved object
4538
- _updateLocalIdForObject: function (localId
4546
+ _updateLocalIdForObject: function _updateLocalIdForObject(localId
4539
4547
  /*: string*/
4540
4548
  , object
4541
4549
  /*: ParseObject*/
@@ -4546,7 +4554,7 @@ var LocalDatastore = {
4546
4554
  var _context11, _context12;
4547
4555
 
4548
4556
  var localKey, objectKey, unsaved, promises, localDatastore, key, pinned;
4549
- return _regeneratorRuntime().wrap(function (_context13) {
4557
+ return _regeneratorRuntime().wrap(function _callee7$(_context13) {
4550
4558
  while (1) {
4551
4559
  switch (_context13.prev = _context13.next) {
4552
4560
  case 0:
@@ -4618,7 +4626,7 @@ var LocalDatastore = {
4618
4626
  * @name Parse.LocalDatastore.updateFromServer
4619
4627
  * @static
4620
4628
  */
4621
- updateFromServer: function () {
4629
+ updateFromServer: function updateFromServer() {
4622
4630
  var _this8 = this;
4623
4631
 
4624
4632
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
@@ -4626,7 +4634,7 @@ var LocalDatastore = {
4626
4634
 
4627
4635
  var localDatastore, keys, key, pointersHash, _i, _keys, _key, _key$split, _key$split2, className, objectId, queryPromises, responses, objects, pinPromises;
4628
4636
 
4629
- return _regeneratorRuntime().wrap(function (_context15) {
4637
+ return _regeneratorRuntime().wrap(function _callee8$(_context15) {
4630
4638
  while (1) {
4631
4639
  switch (_context15.prev = _context15.next) {
4632
4640
  case 0:
@@ -4745,7 +4753,7 @@ var LocalDatastore = {
4745
4753
  }, _callee8, null, [[24, 35]]);
4746
4754
  }))();
4747
4755
  },
4748
- getKeyForObject: function (object
4756
+ getKeyForObject: function getKeyForObject(object
4749
4757
  /*: any*/
4750
4758
  ) {
4751
4759
  var _context16, _context17;
@@ -4754,7 +4762,7 @@ var LocalDatastore = {
4754
4762
 
4755
4763
  return (0, _concat.default)(_context16 = (0, _concat.default)(_context17 = "".concat(_LocalDatastoreUtils.OBJECT_PREFIX)).call(_context17, object.className, "_")).call(_context16, objectId);
4756
4764
  },
4757
- getPinName: function (pinName
4765
+ getPinName: function getPinName(pinName
4758
4766
  /*: ?string*/
4759
4767
  ) {
4760
4768
  if (!pinName || pinName === _LocalDatastoreUtils.DEFAULT_PIN) {
@@ -4763,7 +4771,7 @@ var LocalDatastore = {
4763
4771
 
4764
4772
  return _LocalDatastoreUtils.PIN_PREFIX + pinName;
4765
4773
  },
4766
- checkIfEnabled: function () {
4774
+ checkIfEnabled: function checkIfEnabled() {
4767
4775
  if (!this.isEnabled) {
4768
4776
  console.error('Parse.enableLocalDatastore() must be called first');
4769
4777
  }
@@ -5267,7 +5275,7 @@ var LocalDatastoreController = {
5267
5275
  {
5268
5276
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5269
5277
  var values, objects;
5270
- return _regeneratorRuntime().wrap(function (_context) {
5278
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5271
5279
  while (1) {
5272
5280
  switch (_context.prev = _context.next) {
5273
5281
  case 0:
@@ -5296,7 +5304,7 @@ var LocalDatastoreController = {
5296
5304
  }, _callee);
5297
5305
  }))();
5298
5306
  },
5299
- pinWithName: function (name
5307
+ pinWithName: function pinWithName(name
5300
5308
  /*: string*/
5301
5309
  , value
5302
5310
  /*: any*/
@@ -5304,17 +5312,17 @@ var LocalDatastoreController = {
5304
5312
  var values = (0, _stringify.default)(value);
5305
5313
  return _Storage.default.setItemAsync(name, values);
5306
5314
  },
5307
- unPinWithName: function (name
5315
+ unPinWithName: function unPinWithName(name
5308
5316
  /*: string*/
5309
5317
  ) {
5310
5318
  return _Storage.default.removeItemAsync(name);
5311
5319
  },
5312
- getAllContents: function ()
5320
+ getAllContents: function getAllContents()
5313
5321
  /*: Object*/
5314
5322
  {
5315
5323
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
5316
5324
  var keys;
5317
- return _regeneratorRuntime().wrap(function (_context3) {
5325
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5318
5326
  while (1) {
5319
5327
  switch (_context3.prev = _context3.next) {
5320
5328
  case 0:
@@ -5326,7 +5334,7 @@ var LocalDatastoreController = {
5326
5334
  return _context3.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5327
5335
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(previousPromise, key) {
5328
5336
  var LDS, value;
5329
- return _regeneratorRuntime().wrap(function (_context2) {
5337
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5330
5338
  while (1) {
5331
5339
  switch (_context2.prev = _context2.next) {
5332
5340
  case 0:
@@ -5364,7 +5372,7 @@ var LocalDatastoreController = {
5364
5372
  }, _callee2);
5365
5373
  }));
5366
5374
 
5367
- return function () {
5375
+ return function (_x, _x2) {
5368
5376
  return _ref.apply(this, arguments);
5369
5377
  };
5370
5378
  }(), _promise.default.resolve({})));
@@ -5378,12 +5386,12 @@ var LocalDatastoreController = {
5378
5386
  }))();
5379
5387
  },
5380
5388
  // Used for testing
5381
- getRawStorage: function ()
5389
+ getRawStorage: function getRawStorage()
5382
5390
  /*: Object*/
5383
5391
  {
5384
5392
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
5385
5393
  var keys;
5386
- return _regeneratorRuntime().wrap(function (_context5) {
5394
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5387
5395
  while (1) {
5388
5396
  switch (_context5.prev = _context5.next) {
5389
5397
  case 0:
@@ -5395,7 +5403,7 @@ var LocalDatastoreController = {
5395
5403
  return _context5.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5396
5404
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(previousPromise, key) {
5397
5405
  var LDS, value;
5398
- return _regeneratorRuntime().wrap(function (_context4) {
5406
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5399
5407
  while (1) {
5400
5408
  switch (_context4.prev = _context4.next) {
5401
5409
  case 0:
@@ -5420,7 +5428,7 @@ var LocalDatastoreController = {
5420
5428
  }, _callee4);
5421
5429
  }));
5422
5430
 
5423
- return function () {
5431
+ return function (_x3, _x4) {
5424
5432
  return _ref2.apply(this, arguments);
5425
5433
  };
5426
5434
  }(), _promise.default.resolve({})));
@@ -5433,13 +5441,15 @@ var LocalDatastoreController = {
5433
5441
  }, _callee5);
5434
5442
  }))();
5435
5443
  },
5436
- clear: function ()
5444
+ clear: function clear()
5437
5445
  /*: Promise*/
5438
5446
  {
5447
+ var _this = this;
5448
+
5439
5449
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
5440
5450
  var keys, toRemove, _iterator, _step, key, promises;
5441
5451
 
5442
- return _regeneratorRuntime().wrap(function (_context6) {
5452
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5443
5453
  while (1) {
5444
5454
  switch (_context6.prev = _context6.next) {
5445
5455
  case 0:
@@ -5465,7 +5475,7 @@ var LocalDatastoreController = {
5465
5475
  _iterator.f();
5466
5476
  }
5467
5477
 
5468
- promises = (0, _map.default)(toRemove).call(toRemove, this.unPinWithName);
5478
+ promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
5469
5479
  return _context6.abrupt("return", _promise.default.all(promises));
5470
5480
 
5471
5481
  case 8:
@@ -7860,7 +7870,7 @@ var ParseCLP = /*#__PURE__*/function () {
7860
7870
  _step;
7861
7871
 
7862
7872
  try {
7863
- var _loop = function () {
7873
+ var _loop = function _loop() {
7864
7874
  var _step$value = (0, _slicedToArray2.default)(_step.value, 2),
7865
7875
  operation = _step$value[0],
7866
7876
  group = _step$value[1];
@@ -7991,7 +8001,7 @@ var ParseCLP = /*#__PURE__*/function () {
7991
8001
 
7992
8002
  (0, _createClass2.default)(ParseCLP, [{
7993
8003
  key: "toJSON",
7994
- value: function ()
8004
+ value: function toJSON()
7995
8005
  /*: PermissionsMap*/
7996
8006
  {
7997
8007
  return _objectSpread({}, this.permissionsMap);
@@ -8005,7 +8015,7 @@ var ParseCLP = /*#__PURE__*/function () {
8005
8015
 
8006
8016
  }, {
8007
8017
  key: "equals",
8008
- value: function (other
8018
+ value: function equals(other
8009
8019
  /*: ParseCLP*/
8010
8020
  )
8011
8021
  /*: boolean*/
@@ -8048,7 +8058,7 @@ var ParseCLP = /*#__PURE__*/function () {
8048
8058
  }
8049
8059
  }, {
8050
8060
  key: "_getRoleName",
8051
- value: function (role
8061
+ value: function _getRoleName(role
8052
8062
  /*: ParseRole | string*/
8053
8063
  )
8054
8064
  /*: string*/
@@ -8068,7 +8078,7 @@ var ParseCLP = /*#__PURE__*/function () {
8068
8078
  }
8069
8079
  }, {
8070
8080
  key: "_parseEntity",
8071
- value: function (entity
8081
+ value: function _parseEntity(entity
8072
8082
  /*: Entity*/
8073
8083
  ) {
8074
8084
  var userId = entity;
@@ -8091,7 +8101,7 @@ var ParseCLP = /*#__PURE__*/function () {
8091
8101
  }
8092
8102
  }, {
8093
8103
  key: "_setAccess",
8094
- value: function (permission
8104
+ value: function _setAccess(permission
8095
8105
  /*: string*/
8096
8106
  , userId
8097
8107
  /*: Entity*/
@@ -8123,7 +8133,7 @@ var ParseCLP = /*#__PURE__*/function () {
8123
8133
  }
8124
8134
  }, {
8125
8135
  key: "_getAccess",
8126
- value: function (permission
8136
+ value: function _getAccess(permission
8127
8137
  /*: string*/
8128
8138
  , userId
8129
8139
  /*: Entity*/
@@ -8146,7 +8156,7 @@ var ParseCLP = /*#__PURE__*/function () {
8146
8156
  }
8147
8157
  }, {
8148
8158
  key: "_setArrayAccess",
8149
- value: function (permission
8159
+ value: function _setArrayAccess(permission
8150
8160
  /*: string*/
8151
8161
  , userId
8152
8162
  /*: Entity*/
@@ -8172,7 +8182,7 @@ var ParseCLP = /*#__PURE__*/function () {
8172
8182
  }
8173
8183
  }, {
8174
8184
  key: "_setGroupPointerPermission",
8175
- value: function (operation
8185
+ value: function _setGroupPointerPermission(operation
8176
8186
  /*: string*/
8177
8187
  , pointerFields
8178
8188
  /*: string[]*/
@@ -8195,7 +8205,7 @@ var ParseCLP = /*#__PURE__*/function () {
8195
8205
  }
8196
8206
  }, {
8197
8207
  key: "_getGroupPointerPermissions",
8198
- value: function (operation
8208
+ value: function _getGroupPointerPermissions(operation
8199
8209
  /*: string*/
8200
8210
  )
8201
8211
  /*: string[]*/
@@ -8210,7 +8220,7 @@ var ParseCLP = /*#__PURE__*/function () {
8210
8220
 
8211
8221
  }, {
8212
8222
  key: "setReadUserFields",
8213
- value: function (pointerFields
8223
+ value: function setReadUserFields(pointerFields
8214
8224
  /*: string[]*/
8215
8225
  ) {
8216
8226
  this._setGroupPointerPermission('readUserFields', pointerFields);
@@ -8221,7 +8231,7 @@ var ParseCLP = /*#__PURE__*/function () {
8221
8231
 
8222
8232
  }, {
8223
8233
  key: "getReadUserFields",
8224
- value: function ()
8234
+ value: function getReadUserFields()
8225
8235
  /*: string[]*/
8226
8236
  {
8227
8237
  return this._getGroupPointerPermissions('readUserFields');
@@ -8234,7 +8244,7 @@ var ParseCLP = /*#__PURE__*/function () {
8234
8244
 
8235
8245
  }, {
8236
8246
  key: "setWriteUserFields",
8237
- value: function (pointerFields
8247
+ value: function setWriteUserFields(pointerFields
8238
8248
  /*: string[]*/
8239
8249
  ) {
8240
8250
  this._setGroupPointerPermission('writeUserFields', pointerFields);
@@ -8245,7 +8255,7 @@ var ParseCLP = /*#__PURE__*/function () {
8245
8255
 
8246
8256
  }, {
8247
8257
  key: "getWriteUserFields",
8248
- value: function ()
8258
+ value: function getWriteUserFields()
8249
8259
  /*: string[]*/
8250
8260
  {
8251
8261
  return this._getGroupPointerPermissions('writeUserFields');
@@ -8259,7 +8269,7 @@ var ParseCLP = /*#__PURE__*/function () {
8259
8269
 
8260
8270
  }, {
8261
8271
  key: "setProtectedFields",
8262
- value: function (userId
8272
+ value: function setProtectedFields(userId
8263
8273
  /*: Entity*/
8264
8274
  , fields
8265
8275
  /*: string[]*/
@@ -8275,7 +8285,7 @@ var ParseCLP = /*#__PURE__*/function () {
8275
8285
 
8276
8286
  }, {
8277
8287
  key: "getProtectedFields",
8278
- value: function (userId
8288
+ value: function getProtectedFields(userId
8279
8289
  /*: Entity*/
8280
8290
  )
8281
8291
  /*: string[]*/
@@ -8291,7 +8301,7 @@ var ParseCLP = /*#__PURE__*/function () {
8291
8301
 
8292
8302
  }, {
8293
8303
  key: "setReadAccess",
8294
- value: function (userId
8304
+ value: function setReadAccess(userId
8295
8305
  /*: Entity*/
8296
8306
  , allowed
8297
8307
  /*: boolean*/
@@ -8314,7 +8324,7 @@ var ParseCLP = /*#__PURE__*/function () {
8314
8324
 
8315
8325
  }, {
8316
8326
  key: "getReadAccess",
8317
- value: function (userId
8327
+ value: function getReadAccess(userId
8318
8328
  /*: Entity*/
8319
8329
  )
8320
8330
  /*: boolean*/
@@ -8330,7 +8340,7 @@ var ParseCLP = /*#__PURE__*/function () {
8330
8340
 
8331
8341
  }, {
8332
8342
  key: "setWriteAccess",
8333
- value: function (userId
8343
+ value: function setWriteAccess(userId
8334
8344
  /*: Entity*/
8335
8345
  , allowed
8336
8346
  /*: boolean*/
@@ -8355,7 +8365,7 @@ var ParseCLP = /*#__PURE__*/function () {
8355
8365
 
8356
8366
  }, {
8357
8367
  key: "getWriteAccess",
8358
- value: function (userId
8368
+ value: function getWriteAccess(userId
8359
8369
  /*: Entity*/
8360
8370
  )
8361
8371
  /*: boolean*/
@@ -8370,7 +8380,7 @@ var ParseCLP = /*#__PURE__*/function () {
8370
8380
 
8371
8381
  }, {
8372
8382
  key: "setPublicReadAccess",
8373
- value: function (allowed
8383
+ value: function setPublicReadAccess(allowed
8374
8384
  /*: boolean*/
8375
8385
  ) {
8376
8386
  this.setReadAccess(PUBLIC_KEY, allowed);
@@ -8383,7 +8393,7 @@ var ParseCLP = /*#__PURE__*/function () {
8383
8393
 
8384
8394
  }, {
8385
8395
  key: "getPublicReadAccess",
8386
- value: function ()
8396
+ value: function getPublicReadAccess()
8387
8397
  /*: boolean*/
8388
8398
  {
8389
8399
  return this.getReadAccess(PUBLIC_KEY);
@@ -8396,7 +8406,7 @@ var ParseCLP = /*#__PURE__*/function () {
8396
8406
 
8397
8407
  }, {
8398
8408
  key: "setPublicWriteAccess",
8399
- value: function (allowed
8409
+ value: function setPublicWriteAccess(allowed
8400
8410
  /*: boolean*/
8401
8411
  ) {
8402
8412
  this.setWriteAccess(PUBLIC_KEY, allowed);
@@ -8409,7 +8419,7 @@ var ParseCLP = /*#__PURE__*/function () {
8409
8419
 
8410
8420
  }, {
8411
8421
  key: "getPublicWriteAccess",
8412
- value: function ()
8422
+ value: function getPublicWriteAccess()
8413
8423
  /*: boolean*/
8414
8424
  {
8415
8425
  return this.getWriteAccess(PUBLIC_KEY);
@@ -8422,7 +8432,7 @@ var ParseCLP = /*#__PURE__*/function () {
8422
8432
 
8423
8433
  }, {
8424
8434
  key: "setPublicProtectedFields",
8425
- value: function (fields
8435
+ value: function setPublicProtectedFields(fields
8426
8436
  /*: string[]*/
8427
8437
  ) {
8428
8438
  this.setProtectedFields(PUBLIC_KEY, fields);
@@ -8435,7 +8445,7 @@ var ParseCLP = /*#__PURE__*/function () {
8435
8445
 
8436
8446
  }, {
8437
8447
  key: "getPublicProtectedFields",
8438
- value: function ()
8448
+ value: function getPublicProtectedFields()
8439
8449
  /*: string[]*/
8440
8450
  {
8441
8451
  return this.getProtectedFields(PUBLIC_KEY);
@@ -8452,7 +8462,7 @@ var ParseCLP = /*#__PURE__*/function () {
8452
8462
 
8453
8463
  }, {
8454
8464
  key: "getRoleReadAccess",
8455
- value: function (role
8465
+ value: function getRoleReadAccess(role
8456
8466
  /*: ParseRole | string*/
8457
8467
  )
8458
8468
  /*: boolean*/
@@ -8471,7 +8481,7 @@ var ParseCLP = /*#__PURE__*/function () {
8471
8481
 
8472
8482
  }, {
8473
8483
  key: "getRoleWriteAccess",
8474
- value: function (role
8484
+ value: function getRoleWriteAccess(role
8475
8485
  /*: ParseRole | string*/
8476
8486
  )
8477
8487
  /*: boolean*/
@@ -8489,7 +8499,7 @@ var ParseCLP = /*#__PURE__*/function () {
8489
8499
 
8490
8500
  }, {
8491
8501
  key: "setRoleReadAccess",
8492
- value: function (role
8502
+ value: function setRoleReadAccess(role
8493
8503
  /*: ParseRole | string*/
8494
8504
  , allowed
8495
8505
  /*: boolean*/
@@ -8507,7 +8517,7 @@ var ParseCLP = /*#__PURE__*/function () {
8507
8517
 
8508
8518
  }, {
8509
8519
  key: "setRoleWriteAccess",
8510
- value: function (role
8520
+ value: function setRoleWriteAccess(role
8511
8521
  /*: ParseRole | string*/
8512
8522
  , allowed
8513
8523
  /*: boolean*/
@@ -8526,7 +8536,7 @@ var ParseCLP = /*#__PURE__*/function () {
8526
8536
 
8527
8537
  }, {
8528
8538
  key: "getRoleProtectedFields",
8529
- value: function (role
8539
+ value: function getRoleProtectedFields(role
8530
8540
  /*: ParseRole | string*/
8531
8541
  )
8532
8542
  /*: string[]*/
@@ -8544,7 +8554,7 @@ var ParseCLP = /*#__PURE__*/function () {
8544
8554
 
8545
8555
  }, {
8546
8556
  key: "setRoleProtectedFields",
8547
- value: function (role
8557
+ value: function setRoleProtectedFields(role
8548
8558
  /*: ParseRole | string*/
8549
8559
  , fields
8550
8560
  /*: string[]*/
@@ -10120,6 +10130,8 @@ var ParseFile = /*#__PURE__*/function () {
10120
10130
  key: "getData",
10121
10131
  value: function () {
10122
10132
  var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10133
+ var _this = this;
10134
+
10123
10135
  var options, controller, result;
10124
10136
  return _regeneratorRuntime().wrap(function (_context4) {
10125
10137
  while (1) {
@@ -10143,7 +10155,7 @@ var ParseFile = /*#__PURE__*/function () {
10143
10155
  case 4:
10144
10156
  options = {
10145
10157
  requestTask: function (task) {
10146
- return this._requestTask = task;
10158
+ return _this._requestTask = task;
10147
10159
  }
10148
10160
  };
10149
10161
  controller = _CoreManager.default.getFileController();
@@ -10163,9 +10175,11 @@ var ParseFile = /*#__PURE__*/function () {
10163
10175
  }, _callee, this);
10164
10176
  }));
10165
10177
 
10166
- return function () {
10178
+ function getData() {
10167
10179
  return _getData.apply(this, arguments);
10168
- };
10180
+ }
10181
+
10182
+ return getData;
10169
10183
  }()
10170
10184
  /**
10171
10185
  * Gets the name of the file. Before save is called, this is the filename
@@ -10410,11 +10424,13 @@ var ParseFile = /*#__PURE__*/function () {
10410
10424
  value: function (metadata
10411
10425
  /*: any*/
10412
10426
  ) {
10427
+ var _this4 = this;
10428
+
10413
10429
  if (metadata && (0, _typeof2.default)(metadata) === 'object') {
10414
10430
  var _context5;
10415
10431
 
10416
10432
  (0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
10417
- this.addMetadata(key, metadata[key]);
10433
+ _this4.addMetadata(key, metadata[key]);
10418
10434
  });
10419
10435
  }
10420
10436
  }
@@ -10447,11 +10463,13 @@ var ParseFile = /*#__PURE__*/function () {
10447
10463
  value: function (tags
10448
10464
  /*: any*/
10449
10465
  ) {
10466
+ var _this5 = this;
10467
+
10450
10468
  if (tags && (0, _typeof2.default)(tags) === 'object') {
10451
10469
  var _context6;
10452
10470
 
10453
10471
  (0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
10454
- this.addTag(key, tags[key]);
10472
+ _this5.addTag(key, tags[key]);
10455
10473
  });
10456
10474
  }
10457
10475
  }
@@ -10522,7 +10540,7 @@ var DefaultController = {
10522
10540
  ) {
10523
10541
  var base64Data, _base64Data$split, _base64Data$split2, first, second, data, newSource;
10524
10542
 
10525
- return _regeneratorRuntime().wrap(function (_context7) {
10543
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
10526
10544
  while (1) {
10527
10545
  switch (_context7.prev = _context7.next) {
10528
10546
  case 0:
@@ -10577,11 +10595,13 @@ var DefaultController = {
10577
10595
  }, _callee2);
10578
10596
  }));
10579
10597
 
10580
- return function () {
10598
+ function saveFile(_x, _x2, _x3) {
10581
10599
  return _saveFile.apply(this, arguments);
10582
- };
10600
+ }
10601
+
10602
+ return saveFile;
10583
10603
  }(),
10584
- saveBase64: function (name
10604
+ saveBase64: function saveBase64(name
10585
10605
  /*: string*/
10586
10606
  , source
10587
10607
  /*: FileSource*/
@@ -10608,16 +10628,17 @@ var DefaultController = {
10608
10628
  data._ContentType = source.type;
10609
10629
  }
10610
10630
 
10611
- return _CoreManager.default.getRESTController().request('POST', 'files/' + name, data, options);
10631
+ var path = 'files/' + name;
10632
+ return _CoreManager.default.getRESTController().request('POST', path, data, options);
10612
10633
  },
10613
- download: function (uri, options) {
10634
+ download: function download(uri, options) {
10614
10635
  if (XHR) {
10615
10636
  return this.downloadAjax(uri, options);
10616
10637
  } else {
10617
10638
  return _promise.default.reject('Cannot make a request: No definition of XMLHttpRequest was found.');
10618
10639
  }
10619
10640
  },
10620
- downloadAjax: function (uri, options) {
10641
+ downloadAjax: function downloadAjax(uri, options) {
10621
10642
  return new _promise.default(function (resolve, reject) {
10622
10643
  var xhr = new XHR();
10623
10644
  xhr.open('GET', uri, true);
@@ -10647,7 +10668,7 @@ var DefaultController = {
10647
10668
  xhr.send();
10648
10669
  });
10649
10670
  },
10650
- deleteFile: function (name
10671
+ deleteFile: function deleteFile(name
10651
10672
  /*: string*/
10652
10673
  , options
10653
10674
  /*:: ?: FullOptions*/
@@ -10676,12 +10697,12 @@ var DefaultController = {
10676
10697
  }
10677
10698
  });
10678
10699
  },
10679
- _setXHR: function (xhr
10700
+ _setXHR: function _setXHR(xhr
10680
10701
  /*: any*/
10681
10702
  ) {
10682
10703
  XHR = xhr;
10683
10704
  },
10684
- _getXHR: function () {
10705
+ _getXHR: function _getXHR() {
10685
10706
  return XHR;
10686
10707
  }
10687
10708
  };
@@ -11500,7 +11521,7 @@ var LiveQuery = new _EventEmitter.default();
11500
11521
 
11501
11522
  LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11502
11523
  var liveQueryClient;
11503
- return _regeneratorRuntime().wrap(function (_context) {
11524
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11504
11525
  while (1) {
11505
11526
  switch (_context.prev = _context.next) {
11506
11527
  case 0:
@@ -11528,7 +11549,7 @@ LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_reg
11528
11549
 
11529
11550
  LiveQuery.close = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11530
11551
  var liveQueryClient;
11531
- return _regeneratorRuntime().wrap(function (_context2) {
11552
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11532
11553
  while (1) {
11533
11554
  switch (_context2.prev = _context2.next) {
11534
11555
  case 0:
@@ -11552,18 +11573,18 @@ var _default = LiveQuery;
11552
11573
  exports.default = _default;
11553
11574
  var defaultLiveQueryClient;
11554
11575
  var DefaultLiveQueryController = {
11555
- setDefaultLiveQueryClient: function (liveQueryClient
11576
+ setDefaultLiveQueryClient: function setDefaultLiveQueryClient(liveQueryClient
11556
11577
  /*: LiveQueryClient*/
11557
11578
  ) {
11558
11579
  defaultLiveQueryClient = liveQueryClient;
11559
11580
  },
11560
- getDefaultLiveQueryClient: function ()
11581
+ getDefaultLiveQueryClient: function getDefaultLiveQueryClient()
11561
11582
  /*: Promise<LiveQueryClient>*/
11562
11583
  {
11563
11584
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
11564
11585
  var _yield$Promise$all, _yield$Promise$all2, currentUser, installationId, sessionToken, liveQueryServerURL, serverURL, protocol, host, applicationId, javascriptKey, masterKey;
11565
11586
 
11566
- return _regeneratorRuntime().wrap(function (_context3) {
11587
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11567
11588
  while (1) {
11568
11589
  switch (_context3.prev = _context3.next) {
11569
11590
  case 0:
@@ -11634,7 +11655,7 @@ var DefaultLiveQueryController = {
11634
11655
  }, _callee3);
11635
11656
  }))();
11636
11657
  },
11637
- _clearCachedDefaultClient: function () {
11658
+ _clearCachedDefaultClient: function _clearCachedDefaultClient() {
11638
11659
  defaultLiveQueryClient = null;
11639
11660
  }
11640
11661
  };
@@ -13583,7 +13604,7 @@ var ParseObject = /*#__PURE__*/function () {
13583
13604
  /*:: ?: RequestOptions*/
13584
13605
  ) {
13585
13606
  var query;
13586
- return _regeneratorRuntime().wrap(function (_context) {
13607
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13587
13608
  while (1) {
13588
13609
  switch (_context.prev = _context.next) {
13589
13610
  case 0:
@@ -13625,9 +13646,11 @@ var ParseObject = /*#__PURE__*/function () {
13625
13646
  }, _callee, this, [[2, 9]]);
13626
13647
  }));
13627
13648
 
13628
- return function () {
13649
+ function exists(_x) {
13629
13650
  return _exists.apply(this, arguments);
13630
- };
13651
+ }
13652
+
13653
+ return exists;
13631
13654
  }()
13632
13655
  /**
13633
13656
  * Checks if the model is currently in a valid state.
@@ -13637,7 +13660,7 @@ var ParseObject = /*#__PURE__*/function () {
13637
13660
 
13638
13661
  }, {
13639
13662
  key: "isValid",
13640
- value: function ()
13663
+ value: function isValid()
13641
13664
  /*: boolean*/
13642
13665
  {
13643
13666
  return !this.validate(this.attributes);
@@ -13655,7 +13678,7 @@ var ParseObject = /*#__PURE__*/function () {
13655
13678
 
13656
13679
  }, {
13657
13680
  key: "validate",
13658
- value: function (attrs
13681
+ value: function validate(attrs
13659
13682
  /*: AttributeMap*/
13660
13683
  )
13661
13684
  /*: ParseError | boolean*/
@@ -13681,7 +13704,7 @@ var ParseObject = /*#__PURE__*/function () {
13681
13704
 
13682
13705
  }, {
13683
13706
  key: "getACL",
13684
- value: function ()
13707
+ value: function getACL()
13685
13708
  /*: ?ParseACL*/
13686
13709
  {
13687
13710
  var acl = this.get('ACL');
@@ -13703,7 +13726,7 @@ var ParseObject = /*#__PURE__*/function () {
13703
13726
 
13704
13727
  }, {
13705
13728
  key: "setACL",
13706
- value: function (acl
13729
+ value: function setACL(acl
13707
13730
  /*: ParseACL*/
13708
13731
  , options
13709
13732
  /*:: ?: mixed*/
@@ -13720,7 +13743,7 @@ var ParseObject = /*#__PURE__*/function () {
13720
13743
 
13721
13744
  }, {
13722
13745
  key: "revert",
13723
- value: function ()
13746
+ value: function revert()
13724
13747
  /*: void*/
13725
13748
  {
13726
13749
  var keysToRevert;
@@ -13762,7 +13785,7 @@ var ParseObject = /*#__PURE__*/function () {
13762
13785
 
13763
13786
  }, {
13764
13787
  key: "clear",
13765
- value: function ()
13788
+ value: function clear()
13766
13789
  /*: ParseObject | boolean*/
13767
13790
  {
13768
13791
  var attributes = this.attributes;
@@ -13803,7 +13826,7 @@ var ParseObject = /*#__PURE__*/function () {
13803
13826
 
13804
13827
  }, {
13805
13828
  key: "fetch",
13806
- value: function (options
13829
+ value: function fetch(options
13807
13830
  /*: RequestOptions*/
13808
13831
  )
13809
13832
  /*: Promise*/
@@ -13868,7 +13891,7 @@ var ParseObject = /*#__PURE__*/function () {
13868
13891
 
13869
13892
  }, {
13870
13893
  key: "fetchWithInclude",
13871
- value: function (keys
13894
+ value: function fetchWithInclude(keys
13872
13895
  /*: String | Array<string | Array<string>>*/
13873
13896
  , options
13874
13897
  /*: RequestOptions*/
@@ -13910,7 +13933,7 @@ var ParseObject = /*#__PURE__*/function () {
13910
13933
  var _saveEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options
13911
13934
  /*: SaveOptions*/
13912
13935
  ) {
13913
- return _regeneratorRuntime().wrap(function (_context4) {
13936
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
13914
13937
  while (1) {
13915
13938
  switch (_context4.prev = _context4.next) {
13916
13939
  case 0:
@@ -13948,9 +13971,11 @@ var ParseObject = /*#__PURE__*/function () {
13948
13971
  }, _callee2, this, [[0, 5]]);
13949
13972
  }));
13950
13973
 
13951
- return function () {
13974
+ function saveEventually(_x2) {
13952
13975
  return _saveEventually.apply(this, arguments);
13953
- };
13976
+ }
13977
+
13978
+ return saveEventually;
13954
13979
  }()
13955
13980
  /**
13956
13981
  * Set a hash of model attributes, and save the model to the server.
@@ -14018,7 +14043,7 @@ var ParseObject = /*#__PURE__*/function () {
14018
14043
 
14019
14044
  }, {
14020
14045
  key: "save",
14021
- value: function (arg1
14046
+ value: function save(arg1
14022
14047
  /*: ?string | { [attr: string]: mixed }*/
14023
14048
  , arg2
14024
14049
  /*: SaveOptions | mixed*/
@@ -14027,6 +14052,8 @@ var ParseObject = /*#__PURE__*/function () {
14027
14052
  )
14028
14053
  /*: Promise*/
14029
14054
  {
14055
+ var _this = this;
14056
+
14030
14057
  var attrs;
14031
14058
  var options;
14032
14059
 
@@ -14075,7 +14102,7 @@ var ParseObject = /*#__PURE__*/function () {
14075
14102
 
14076
14103
  var unsaved = options.cascadeSave !== false ? (0, _unsavedChildren.default)(this) : null;
14077
14104
  return controller.save(unsaved, saveOptions).then(function () {
14078
- return controller.save(this, saveOptions);
14105
+ return controller.save(_this, saveOptions);
14079
14106
  });
14080
14107
  }
14081
14108
  /**
@@ -14107,7 +14134,7 @@ var ParseObject = /*#__PURE__*/function () {
14107
14134
  var _destroyEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(options
14108
14135
  /*: RequestOptions*/
14109
14136
  ) {
14110
- return _regeneratorRuntime().wrap(function (_context5) {
14137
+ return _regeneratorRuntime().wrap(function _callee3$(_context5) {
14111
14138
  while (1) {
14112
14139
  switch (_context5.prev = _context5.next) {
14113
14140
  case 0:
@@ -14145,9 +14172,11 @@ var ParseObject = /*#__PURE__*/function () {
14145
14172
  }, _callee3, this, [[0, 5]]);
14146
14173
  }));
14147
14174
 
14148
- return function () {
14175
+ function destroyEventually(_x3) {
14149
14176
  return _destroyEventually.apply(this, arguments);
14150
- };
14177
+ }
14178
+
14179
+ return destroyEventually;
14151
14180
  }()
14152
14181
  /**
14153
14182
  * Destroy this model on the server if it was already persisted.
@@ -14166,7 +14195,7 @@ var ParseObject = /*#__PURE__*/function () {
14166
14195
 
14167
14196
  }, {
14168
14197
  key: "destroy",
14169
- value: function (options
14198
+ value: function destroy(options
14170
14199
  /*: RequestOptions*/
14171
14200
  )
14172
14201
  /*: Promise*/
@@ -14211,7 +14240,7 @@ var ParseObject = /*#__PURE__*/function () {
14211
14240
 
14212
14241
  }, {
14213
14242
  key: "pin",
14214
- value: function ()
14243
+ value: function pin()
14215
14244
  /*: Promise<void>*/
14216
14245
  {
14217
14246
  return ParseObject.pinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14229,7 +14258,7 @@ var ParseObject = /*#__PURE__*/function () {
14229
14258
 
14230
14259
  }, {
14231
14260
  key: "unPin",
14232
- value: function ()
14261
+ value: function unPin()
14233
14262
  /*: Promise<void>*/
14234
14263
  {
14235
14264
  return ParseObject.unPinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14249,7 +14278,7 @@ var ParseObject = /*#__PURE__*/function () {
14249
14278
  value: function () {
14250
14279
  var _isPinned = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
14251
14280
  var localDatastore, objectKey, pin;
14252
- return _regeneratorRuntime().wrap(function (_context6) {
14281
+ return _regeneratorRuntime().wrap(function _callee4$(_context6) {
14253
14282
  while (1) {
14254
14283
  switch (_context6.prev = _context6.next) {
14255
14284
  case 0:
@@ -14279,9 +14308,11 @@ var ParseObject = /*#__PURE__*/function () {
14279
14308
  }, _callee4, this);
14280
14309
  }));
14281
14310
 
14282
- return function () {
14311
+ function isPinned() {
14283
14312
  return _isPinned.apply(this, arguments);
14284
- };
14313
+ }
14314
+
14315
+ return isPinned;
14285
14316
  }()
14286
14317
  /**
14287
14318
  * Asynchronously stores the objects and every object they point to in the local datastore, recursively.
@@ -14302,7 +14333,7 @@ var ParseObject = /*#__PURE__*/function () {
14302
14333
 
14303
14334
  }, {
14304
14335
  key: "pinWithName",
14305
- value: function (name
14336
+ value: function pinWithName(name
14306
14337
  /*: string*/
14307
14338
  )
14308
14339
  /*: Promise<void>*/
@@ -14322,7 +14353,7 @@ var ParseObject = /*#__PURE__*/function () {
14322
14353
 
14323
14354
  }, {
14324
14355
  key: "unPinWithName",
14325
- value: function (name
14356
+ value: function unPinWithName(name
14326
14357
  /*: string*/
14327
14358
  )
14328
14359
  /*: Promise<void>*/
@@ -14347,7 +14378,7 @@ var ParseObject = /*#__PURE__*/function () {
14347
14378
  value: function () {
14348
14379
  var _fetchFromLocalDatastore = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
14349
14380
  var localDatastore, objectKey, pinned, result;
14350
- return _regeneratorRuntime().wrap(function (_context7) {
14381
+ return _regeneratorRuntime().wrap(function _callee5$(_context7) {
14351
14382
  while (1) {
14352
14383
  switch (_context7.prev = _context7.next) {
14353
14384
  case 0:
@@ -14390,20 +14421,22 @@ var ParseObject = /*#__PURE__*/function () {
14390
14421
  }, _callee5, this);
14391
14422
  }));
14392
14423
 
14393
- return function () {
14424
+ function fetchFromLocalDatastore() {
14394
14425
  return _fetchFromLocalDatastore.apply(this, arguments);
14395
- };
14426
+ }
14427
+
14428
+ return fetchFromLocalDatastore;
14396
14429
  }()
14397
14430
  /** Static methods **/
14398
14431
 
14399
14432
  }], [{
14400
14433
  key: "_getClassMap",
14401
- value: function () {
14434
+ value: function _getClassMap() {
14402
14435
  return classMap;
14403
14436
  }
14404
14437
  }, {
14405
14438
  key: "_clearAllState",
14406
- value: function () {
14439
+ value: function _clearAllState() {
14407
14440
  var stateController = _CoreManager.default.getObjectStateController();
14408
14441
 
14409
14442
  stateController.clearAllState();
@@ -14437,7 +14470,7 @@ var ParseObject = /*#__PURE__*/function () {
14437
14470
 
14438
14471
  }, {
14439
14472
  key: "fetchAll",
14440
- value: function (list
14473
+ value: function fetchAll(list
14441
14474
  /*: Array<ParseObject>*/
14442
14475
  ) {
14443
14476
  var options
@@ -14491,7 +14524,7 @@ var ParseObject = /*#__PURE__*/function () {
14491
14524
 
14492
14525
  }, {
14493
14526
  key: "fetchAllWithInclude",
14494
- value: function (list
14527
+ value: function fetchAllWithInclude(list
14495
14528
  /*: Array<ParseObject>*/
14496
14529
  , keys
14497
14530
  /*: String | Array<string | Array<string>>*/
@@ -14535,7 +14568,7 @@ var ParseObject = /*#__PURE__*/function () {
14535
14568
 
14536
14569
  }, {
14537
14570
  key: "fetchAllIfNeededWithInclude",
14538
- value: function (list
14571
+ value: function fetchAllIfNeededWithInclude(list
14539
14572
  /*: Array<ParseObject>*/
14540
14573
  , keys
14541
14574
  /*: String | Array<string | Array<string>>*/
@@ -14567,7 +14600,7 @@ var ParseObject = /*#__PURE__*/function () {
14567
14600
 
14568
14601
  }, {
14569
14602
  key: "fetchAllIfNeeded",
14570
- value: function (list
14603
+ value: function fetchAllIfNeeded(list
14571
14604
  /*: Array<ParseObject>*/
14572
14605
  , options) {
14573
14606
  options = options || {};
@@ -14589,7 +14622,7 @@ var ParseObject = /*#__PURE__*/function () {
14589
14622
  }
14590
14623
  }, {
14591
14624
  key: "handleIncludeOptions",
14592
- value: function (options) {
14625
+ value: function handleIncludeOptions(options) {
14593
14626
  var include = [];
14594
14627
 
14595
14628
  if ((0, _isArray.default)(options.include)) {
@@ -14657,7 +14690,7 @@ var ParseObject = /*#__PURE__*/function () {
14657
14690
 
14658
14691
  }, {
14659
14692
  key: "destroyAll",
14660
- value: function (list
14693
+ value: function destroyAll(list
14661
14694
  /*: Array<ParseObject>*/
14662
14695
  ) {
14663
14696
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -14702,7 +14735,7 @@ var ParseObject = /*#__PURE__*/function () {
14702
14735
 
14703
14736
  }, {
14704
14737
  key: "saveAll",
14705
- value: function (list
14738
+ value: function saveAll(list
14706
14739
  /*: Array<ParseObject>*/
14707
14740
  ) {
14708
14741
  var options
@@ -14745,7 +14778,7 @@ var ParseObject = /*#__PURE__*/function () {
14745
14778
 
14746
14779
  }, {
14747
14780
  key: "createWithoutData",
14748
- value: function (id
14781
+ value: function createWithoutData(id
14749
14782
  /*: string*/
14750
14783
  ) {
14751
14784
  var obj = new this();
@@ -14765,7 +14798,7 @@ var ParseObject = /*#__PURE__*/function () {
14765
14798
 
14766
14799
  }, {
14767
14800
  key: "fromJSON",
14768
- value: function (json
14801
+ value: function fromJSON(json
14769
14802
  /*: any*/
14770
14803
  , override
14771
14804
  /*:: ?: boolean*/
@@ -14829,7 +14862,7 @@ var ParseObject = /*#__PURE__*/function () {
14829
14862
 
14830
14863
  }, {
14831
14864
  key: "registerSubclass",
14832
- value: function (className
14865
+ value: function registerSubclass(className
14833
14866
  /*: string*/
14834
14867
  , constructor
14835
14868
  /*: any*/
@@ -14860,7 +14893,7 @@ var ParseObject = /*#__PURE__*/function () {
14860
14893
 
14861
14894
  }, {
14862
14895
  key: "unregisterSubclass",
14863
- value: function (className
14896
+ value: function unregisterSubclass(className
14864
14897
  /*: string*/
14865
14898
  ) {
14866
14899
  if (typeof className !== 'string') {
@@ -14909,7 +14942,7 @@ var ParseObject = /*#__PURE__*/function () {
14909
14942
 
14910
14943
  }, {
14911
14944
  key: "extend",
14912
- value: function (className
14945
+ value: function extend(className
14913
14946
  /*: any*/
14914
14947
  , protoProps
14915
14948
  /*: any*/
@@ -14938,7 +14971,7 @@ var ParseObject = /*#__PURE__*/function () {
14938
14971
  parentProto = classMap[adjustedClassName].prototype;
14939
14972
  }
14940
14973
 
14941
- var ParseObjectSubclass = function (attributes, options) {
14974
+ var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) {
14942
14975
  this.className = adjustedClassName;
14943
14976
  this._objCount = objectCount++; // Enable legacy initializers
14944
14977
 
@@ -15013,7 +15046,7 @@ var ParseObject = /*#__PURE__*/function () {
15013
15046
 
15014
15047
  }, {
15015
15048
  key: "enableSingleInstance",
15016
- value: function () {
15049
+ value: function enableSingleInstance() {
15017
15050
  singleInstance = true;
15018
15051
 
15019
15052
  _CoreManager.default.setObjectStateController(SingleInstanceStateController);
@@ -15029,7 +15062,7 @@ var ParseObject = /*#__PURE__*/function () {
15029
15062
 
15030
15063
  }, {
15031
15064
  key: "disableSingleInstance",
15032
- value: function () {
15065
+ value: function disableSingleInstance() {
15033
15066
  singleInstance = false;
15034
15067
 
15035
15068
  _CoreManager.default.setObjectStateController(UniqueInstanceStateController);
@@ -15055,7 +15088,7 @@ var ParseObject = /*#__PURE__*/function () {
15055
15088
 
15056
15089
  }, {
15057
15090
  key: "pinAll",
15058
- value: function (objects
15091
+ value: function pinAll(objects
15059
15092
  /*: Array<ParseObject>*/
15060
15093
  )
15061
15094
  /*: Promise<void>*/
@@ -15089,7 +15122,7 @@ var ParseObject = /*#__PURE__*/function () {
15089
15122
 
15090
15123
  }, {
15091
15124
  key: "pinAllWithName",
15092
- value: function (name
15125
+ value: function pinAllWithName(name
15093
15126
  /*: string*/
15094
15127
  , objects
15095
15128
  /*: Array<ParseObject>*/
@@ -15119,7 +15152,7 @@ var ParseObject = /*#__PURE__*/function () {
15119
15152
 
15120
15153
  }, {
15121
15154
  key: "unPinAll",
15122
- value: function (objects
15155
+ value: function unPinAll(objects
15123
15156
  /*: Array<ParseObject>*/
15124
15157
  )
15125
15158
  /*: Promise<void>*/
@@ -15147,7 +15180,7 @@ var ParseObject = /*#__PURE__*/function () {
15147
15180
 
15148
15181
  }, {
15149
15182
  key: "unPinAllWithName",
15150
- value: function (name
15183
+ value: function unPinAllWithName(name
15151
15184
  /*: string*/
15152
15185
  , objects
15153
15186
  /*: Array<ParseObject>*/
@@ -15175,7 +15208,7 @@ var ParseObject = /*#__PURE__*/function () {
15175
15208
 
15176
15209
  }, {
15177
15210
  key: "unPinAllObjects",
15178
- value: function ()
15211
+ value: function unPinAllObjects()
15179
15212
  /*: Promise<void>*/
15180
15213
  {
15181
15214
  var localDatastore = _CoreManager.default.getLocalDatastore();
@@ -15201,7 +15234,7 @@ var ParseObject = /*#__PURE__*/function () {
15201
15234
 
15202
15235
  }, {
15203
15236
  key: "unPinAllObjectsWithName",
15204
- value: function (name
15237
+ value: function unPinAllObjectsWithName(name
15205
15238
  /*: string*/
15206
15239
  )
15207
15240
  /*: Promise<void>*/
@@ -15219,7 +15252,7 @@ var ParseObject = /*#__PURE__*/function () {
15219
15252
  }();
15220
15253
 
15221
15254
  var DefaultController = {
15222
- fetch: function (target
15255
+ fetch: function fetch(target
15223
15256
  /*: ParseObject | Array<ParseObject>*/
15224
15257
  , forceFetch
15225
15258
  /*: boolean*/
@@ -15281,7 +15314,7 @@ var DefaultController = {
15281
15314
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(objects) {
15282
15315
  var idMap, i, obj, _i, _obj, id, _iterator2, _step2, object;
15283
15316
 
15284
- return _regeneratorRuntime().wrap(function (_context9) {
15317
+ return _regeneratorRuntime().wrap(function _callee6$(_context9) {
15285
15318
  while (1) {
15286
15319
  switch (_context9.prev = _context9.next) {
15287
15320
  case 0:
@@ -15379,7 +15412,7 @@ var DefaultController = {
15379
15412
  }, _callee6, null, [[13, 23, 26, 29]]);
15380
15413
  }));
15381
15414
 
15382
- return function () {
15415
+ return function (_x4) {
15383
15416
  return _ref.apply(this, arguments);
15384
15417
  };
15385
15418
  }());
@@ -15398,7 +15431,7 @@ var DefaultController = {
15398
15431
 
15399
15432
  return RESTController.request('GET', 'classes/' + target.className + '/' + target._getId(), params, options).then( /*#__PURE__*/function () {
15400
15433
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(response) {
15401
- return _regeneratorRuntime().wrap(function (_context10) {
15434
+ return _regeneratorRuntime().wrap(function _callee7$(_context10) {
15402
15435
  while (1) {
15403
15436
  switch (_context10.prev = _context10.next) {
15404
15437
  case 0:
@@ -15422,7 +15455,7 @@ var DefaultController = {
15422
15455
  }, _callee7);
15423
15456
  }));
15424
15457
 
15425
- return function () {
15458
+ return function (_x5) {
15426
15459
  return _ref2.apply(this, arguments);
15427
15460
  };
15428
15461
  }());
@@ -15430,7 +15463,7 @@ var DefaultController = {
15430
15463
 
15431
15464
  return _promise.default.resolve();
15432
15465
  },
15433
- destroy: function (target
15466
+ destroy: function destroy(target
15434
15467
  /*: ParseObject | Array<ParseObject>*/
15435
15468
  , options
15436
15469
  /*: RequestOptions*/
@@ -15439,7 +15472,7 @@ var DefaultController = {
15439
15472
  {
15440
15473
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
15441
15474
  var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
15442
- return _regeneratorRuntime().wrap(function (_context13) {
15475
+ return _regeneratorRuntime().wrap(function _callee10$(_context13) {
15443
15476
  while (1) {
15444
15477
  switch (_context13.prev = _context13.next) {
15445
15478
  case 0:
@@ -15504,7 +15537,7 @@ var DefaultController = {
15504
15537
  return _context13.abrupt("return", deleteCompleted.then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
15505
15538
  var aggregate, _iterator3, _step3, object;
15506
15539
 
15507
- return _regeneratorRuntime().wrap(function (_context11) {
15540
+ return _regeneratorRuntime().wrap(function _callee8$(_context11) {
15508
15541
  while (1) {
15509
15542
  switch (_context11.prev = _context11.next) {
15510
15543
  case 0:
@@ -15572,7 +15605,7 @@ var DefaultController = {
15572
15605
  }
15573
15606
 
15574
15607
  return _context13.abrupt("return", RESTController.request('DELETE', 'classes/' + target.className + '/' + target._getId(), {}, options).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
15575
- return _regeneratorRuntime().wrap(function (_context12) {
15608
+ return _regeneratorRuntime().wrap(function _callee9$(_context12) {
15576
15609
  while (1) {
15577
15610
  switch (_context12.prev = _context12.next) {
15578
15611
  case 0:
@@ -15601,7 +15634,7 @@ var DefaultController = {
15601
15634
  }, _callee10);
15602
15635
  }))();
15603
15636
  },
15604
- save: function (target
15637
+ save: function save(target
15605
15638
  /*: ParseObject | Array<ParseObject | ParseFile>*/
15606
15639
  , options
15607
15640
  /*: RequestOptions*/
@@ -15680,8 +15713,8 @@ var DefaultController = {
15680
15713
  (0, _forEach.default)(batch).call(batch, function (obj, index) {
15681
15714
  var ready = new _promiseUtils.resolvingPromise();
15682
15715
  batchReady.push(ready);
15683
- stateController.pushPendingState(obj._getStateIdentifier());
15684
- batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), function () {
15716
+
15717
+ var task = function task() {
15685
15718
  ready.resolve();
15686
15719
  return batchReturned.then(function (responses) {
15687
15720
  if (responses[index].hasOwnProperty('success')) {
@@ -15702,7 +15735,10 @@ var DefaultController = {
15702
15735
  obj._handleSaveError();
15703
15736
  }
15704
15737
  });
15705
- }));
15738
+ };
15739
+
15740
+ stateController.pushPendingState(obj._getStateIdentifier());
15741
+ batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), task));
15706
15742
  });
15707
15743
  (0, _promiseUtils.when)(batchReady).then(function () {
15708
15744
  // Kick off the batch request
@@ -15721,7 +15757,7 @@ var DefaultController = {
15721
15757
  }).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
15722
15758
  var _iterator4, _step4, object;
15723
15759
 
15724
- return _regeneratorRuntime().wrap(function (_context14) {
15760
+ return _regeneratorRuntime().wrap(function _callee11$(_context14) {
15725
15761
  while (1) {
15726
15762
  switch (_context14.prev = _context14.next) {
15727
15763
  case 0:
@@ -15796,7 +15832,7 @@ var DefaultController = {
15796
15832
 
15797
15833
  var targetCopy = target;
15798
15834
 
15799
- var task = function () {
15835
+ var task = function task() {
15800
15836
  var params = targetCopy._getSaveParams();
15801
15837
 
15802
15838
  return RESTController.request(params.method, params.path, params.body, options).then(function (response) {
@@ -15813,7 +15849,7 @@ var DefaultController = {
15813
15849
 
15814
15850
  stateController.pushPendingState(target._getStateIdentifier());
15815
15851
  return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
15816
- return _regeneratorRuntime().wrap(function (_context15) {
15852
+ return _regeneratorRuntime().wrap(function _callee12$(_context15) {
15817
15853
  while (1) {
15818
15854
  switch (_context15.prev = _context15.next) {
15819
15855
  case 0:
@@ -16630,10 +16666,12 @@ var RelationOp = /*#__PURE__*/function (_Op7) {
16630
16666
  value: function ()
16631
16667
  /*: { __op?: string, objects?: mixed, ops?: mixed }*/
16632
16668
  {
16669
+ var _this7 = this;
16670
+
16633
16671
  var idToPointer = function (id) {
16634
16672
  return {
16635
16673
  __type: 'Pointer',
16636
- className: this._targetClassName,
16674
+ className: _this7._targetClassName,
16637
16675
  objectId: id
16638
16676
  };
16639
16677
  };
@@ -17839,9 +17877,11 @@ var ParseQuery = /*#__PURE__*/function () {
17839
17877
  }, _callee, this);
17840
17878
  }));
17841
17879
 
17842
- return function () {
17880
+ function _handleOfflineQuery() {
17843
17881
  return _handleOfflineQuery2.apply(this, arguments);
17844
- };
17882
+ }
17883
+
17884
+ return _handleOfflineQuery;
17845
17885
  }()
17846
17886
  /**
17847
17887
  * Returns a JSON representation of this query.
@@ -18187,7 +18227,7 @@ var ParseQuery = /*#__PURE__*/function () {
18187
18227
  /*:: ?: BatchOptions*/
18188
18228
  ) {
18189
18229
  var result;
18190
- return _regeneratorRuntime().wrap(function (_context7) {
18230
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
18191
18231
  while (1) {
18192
18232
  switch (_context7.prev = _context7.next) {
18193
18233
  case 0:
@@ -18214,9 +18254,11 @@ var ParseQuery = /*#__PURE__*/function () {
18214
18254
  }, _callee2, this);
18215
18255
  }));
18216
18256
 
18217
- return function () {
18257
+ function findAll(_x2) {
18218
18258
  return _findAll.apply(this, arguments);
18219
- };
18259
+ }
18260
+
18261
+ return findAll;
18220
18262
  }()
18221
18263
  /**
18222
18264
  * Counts the number of objects that match this query.
@@ -18235,7 +18277,7 @@ var ParseQuery = /*#__PURE__*/function () {
18235
18277
 
18236
18278
  }, {
18237
18279
  key: "count",
18238
- value: function (options
18280
+ value: function count(options
18239
18281
  /*:: ?: FullOptions*/
18240
18282
  )
18241
18283
  /*: Promise<number>*/
@@ -18277,7 +18319,7 @@ var ParseQuery = /*#__PURE__*/function () {
18277
18319
 
18278
18320
  }, {
18279
18321
  key: "distinct",
18280
- value: function (key
18322
+ value: function distinct(key
18281
18323
  /*: string*/
18282
18324
  , options
18283
18325
  /*:: ?: FullOptions*/
@@ -18319,7 +18361,7 @@ var ParseQuery = /*#__PURE__*/function () {
18319
18361
 
18320
18362
  }, {
18321
18363
  key: "aggregate",
18322
- value: function (pipeline
18364
+ value: function aggregate(pipeline
18323
18365
  /*: mixed*/
18324
18366
  , options
18325
18367
  /*:: ?: FullOptions*/
@@ -18382,11 +18424,13 @@ var ParseQuery = /*#__PURE__*/function () {
18382
18424
 
18383
18425
  }, {
18384
18426
  key: "first",
18385
- value: function (options
18427
+ value: function first(options
18386
18428
  /*:: ?: FullOptions*/
18387
18429
  )
18388
18430
  /*: Promise<ParseObject | void>*/
18389
18431
  {
18432
+ var _this4 = this;
18433
+
18390
18434
  options = options || {};
18391
18435
  var findOptions = {};
18392
18436
 
@@ -18428,7 +18472,7 @@ var ParseQuery = /*#__PURE__*/function () {
18428
18472
  }
18429
18473
 
18430
18474
  if (!objects[0].className) {
18431
- objects[0].className = this.className;
18475
+ objects[0].className = _this4.className;
18432
18476
  } // Make sure the data object contains keys for all objects that
18433
18477
  // have been requested with a select, so that our cached state
18434
18478
  // updates correctly.
@@ -18469,7 +18513,7 @@ var ParseQuery = /*#__PURE__*/function () {
18469
18513
 
18470
18514
  }, {
18471
18515
  key: "eachBatch",
18472
- value: function (callback
18516
+ value: function eachBatch(callback
18473
18517
  /*: (objs: Array<ParseObject>) => Promise<*>*/
18474
18518
  , options
18475
18519
  /*:: ?: BatchOptions*/
@@ -18481,7 +18525,8 @@ var ParseQuery = /*#__PURE__*/function () {
18481
18525
  options = options || {};
18482
18526
 
18483
18527
  if (this._order || this._skip || this._limit >= 0) {
18484
- return _promise.default.reject('Cannot iterate on a query with sort, skip, or limit.');
18528
+ var error = 'Cannot iterate on a query with sort, skip, or limit.';
18529
+ return _promise.default.reject(error);
18485
18530
  }
18486
18531
 
18487
18532
  var query = new ParseQuery(this.className);
@@ -18546,7 +18591,7 @@ var ParseQuery = /*#__PURE__*/function () {
18546
18591
  }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
18547
18592
  var _yield$Promise$all, _yield$Promise$all2, results;
18548
18593
 
18549
- return _regeneratorRuntime().wrap(function (_context10) {
18594
+ return _regeneratorRuntime().wrap(function _callee3$(_context10) {
18550
18595
  while (1) {
18551
18596
  switch (_context10.prev = _context10.next) {
18552
18597
  case 0:
@@ -18616,7 +18661,7 @@ var ParseQuery = /*#__PURE__*/function () {
18616
18661
 
18617
18662
  }, {
18618
18663
  key: "each",
18619
- value: function (callback
18664
+ value: function each(callback
18620
18665
  /*: (obj: ParseObject) => any*/
18621
18666
  , options
18622
18667
  /*:: ?: BatchOptions*/
@@ -18643,7 +18688,7 @@ var ParseQuery = /*#__PURE__*/function () {
18643
18688
 
18644
18689
  }, {
18645
18690
  key: "hint",
18646
- value: function (value
18691
+ value: function hint(value
18647
18692
  /*: mixed*/
18648
18693
  )
18649
18694
  /*: ParseQuery*/
@@ -18664,7 +18709,7 @@ var ParseQuery = /*#__PURE__*/function () {
18664
18709
 
18665
18710
  }, {
18666
18711
  key: "explain",
18667
- value: function ()
18712
+ value: function explain()
18668
18713
  /*: ParseQuery*/
18669
18714
  {
18670
18715
  var _explain
@@ -18710,8 +18755,10 @@ var ParseQuery = /*#__PURE__*/function () {
18710
18755
  , options
18711
18756
  /*:: ?: BatchOptions*/
18712
18757
  ) {
18758
+ var _this5 = this;
18759
+
18713
18760
  var array, index;
18714
- return _regeneratorRuntime().wrap(function (_context11) {
18761
+ return _regeneratorRuntime().wrap(function _callee4$(_context11) {
18715
18762
  while (1) {
18716
18763
  switch (_context11.prev = _context11.next) {
18717
18764
  case 0:
@@ -18719,7 +18766,7 @@ var ParseQuery = /*#__PURE__*/function () {
18719
18766
  index = 0;
18720
18767
  _context11.next = 4;
18721
18768
  return this.each(function (object) {
18722
- return _promise.default.resolve(callback(object, index, this)).then(function (result) {
18769
+ return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
18723
18770
  array.push(result);
18724
18771
  index += 1;
18725
18772
  });
@@ -18736,9 +18783,11 @@ var ParseQuery = /*#__PURE__*/function () {
18736
18783
  }, _callee4, this);
18737
18784
  }));
18738
18785
 
18739
- return function () {
18786
+ function map(_x3, _x4) {
18740
18787
  return _map.apply(this, arguments);
18741
- };
18788
+ }
18789
+
18790
+ return map;
18742
18791
  }()
18743
18792
  /**
18744
18793
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18775,7 +18824,7 @@ var ParseQuery = /*#__PURE__*/function () {
18775
18824
  /*:: ?: BatchOptions*/
18776
18825
  ) {
18777
18826
  var accumulator, index;
18778
- return _regeneratorRuntime().wrap(function (_context12) {
18827
+ return _regeneratorRuntime().wrap(function _callee5$(_context12) {
18779
18828
  while (1) {
18780
18829
  switch (_context12.prev = _context12.next) {
18781
18830
  case 0:
@@ -18816,9 +18865,11 @@ var ParseQuery = /*#__PURE__*/function () {
18816
18865
  }, _callee5, this);
18817
18866
  }));
18818
18867
 
18819
- return function () {
18868
+ function reduce(_x5, _x6, _x7) {
18820
18869
  return _reduce.apply(this, arguments);
18821
- };
18870
+ }
18871
+
18872
+ return reduce;
18822
18873
  }()
18823
18874
  /**
18824
18875
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18852,8 +18903,10 @@ var ParseQuery = /*#__PURE__*/function () {
18852
18903
  , options
18853
18904
  /*:: ?: BatchOptions*/
18854
18905
  ) {
18906
+ var _this6 = this;
18907
+
18855
18908
  var array, index;
18856
- return _regeneratorRuntime().wrap(function (_context13) {
18909
+ return _regeneratorRuntime().wrap(function _callee6$(_context13) {
18857
18910
  while (1) {
18858
18911
  switch (_context13.prev = _context13.next) {
18859
18912
  case 0:
@@ -18861,7 +18914,7 @@ var ParseQuery = /*#__PURE__*/function () {
18861
18914
  index = 0;
18862
18915
  _context13.next = 4;
18863
18916
  return this.each(function (object) {
18864
- return _promise.default.resolve(callback(object, index, this)).then(function (flag) {
18917
+ return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
18865
18918
  if (flag) {
18866
18919
  array.push(object);
18867
18920
  }
@@ -18881,9 +18934,11 @@ var ParseQuery = /*#__PURE__*/function () {
18881
18934
  }, _callee6, this);
18882
18935
  }));
18883
18936
 
18884
- return function () {
18937
+ function filter(_x8, _x9) {
18885
18938
  return _filter.apply(this, arguments);
18886
- };
18939
+ }
18940
+
18941
+ return filter;
18887
18942
  }()
18888
18943
  /** Query Conditions **/
18889
18944
 
@@ -18898,13 +18953,15 @@ var ParseQuery = /*#__PURE__*/function () {
18898
18953
 
18899
18954
  }, {
18900
18955
  key: "equalTo",
18901
- value: function (key
18956
+ value: function equalTo(key
18902
18957
  /*: string | { [key: string]: any }*/
18903
18958
  , value
18904
18959
  /*: ?mixed*/
18905
18960
  )
18906
18961
  /*: ParseQuery*/
18907
18962
  {
18963
+ var _this7 = this;
18964
+
18908
18965
  if (key && (0, _typeof2.default)(key) === 'object') {
18909
18966
  var _context14;
18910
18967
 
@@ -18913,7 +18970,7 @@ var ParseQuery = /*#__PURE__*/function () {
18913
18970
  k = _ref3[0],
18914
18971
  val = _ref3[1];
18915
18972
 
18916
- return this.equalTo(k, val);
18973
+ return _this7.equalTo(k, val);
18917
18974
  });
18918
18975
  return this;
18919
18976
  }
@@ -18936,13 +18993,15 @@ var ParseQuery = /*#__PURE__*/function () {
18936
18993
 
18937
18994
  }, {
18938
18995
  key: "notEqualTo",
18939
- value: function (key
18996
+ value: function notEqualTo(key
18940
18997
  /*: string | { [key: string]: any }*/
18941
18998
  , value
18942
18999
  /*: ?mixed*/
18943
19000
  )
18944
19001
  /*: ParseQuery*/
18945
19002
  {
19003
+ var _this8 = this;
19004
+
18946
19005
  if (key && (0, _typeof2.default)(key) === 'object') {
18947
19006
  var _context15;
18948
19007
 
@@ -18951,7 +19010,7 @@ var ParseQuery = /*#__PURE__*/function () {
18951
19010
  k = _ref5[0],
18952
19011
  val = _ref5[1];
18953
19012
 
18954
- return this.notEqualTo(k, val);
19013
+ return _this8.notEqualTo(k, val);
18955
19014
  });
18956
19015
  return this;
18957
19016
  }
@@ -18969,7 +19028,7 @@ var ParseQuery = /*#__PURE__*/function () {
18969
19028
 
18970
19029
  }, {
18971
19030
  key: "lessThan",
18972
- value: function (key
19031
+ value: function lessThan(key
18973
19032
  /*: string*/
18974
19033
  , value
18975
19034
  /*: mixed*/
@@ -18989,7 +19048,7 @@ var ParseQuery = /*#__PURE__*/function () {
18989
19048
 
18990
19049
  }, {
18991
19050
  key: "greaterThan",
18992
- value: function (key
19051
+ value: function greaterThan(key
18993
19052
  /*: string*/
18994
19053
  , value
18995
19054
  /*: mixed*/
@@ -19009,7 +19068,7 @@ var ParseQuery = /*#__PURE__*/function () {
19009
19068
 
19010
19069
  }, {
19011
19070
  key: "lessThanOrEqualTo",
19012
- value: function (key
19071
+ value: function lessThanOrEqualTo(key
19013
19072
  /*: string*/
19014
19073
  , value
19015
19074
  /*: mixed*/
@@ -19029,7 +19088,7 @@ var ParseQuery = /*#__PURE__*/function () {
19029
19088
 
19030
19089
  }, {
19031
19090
  key: "greaterThanOrEqualTo",
19032
- value: function (key
19091
+ value: function greaterThanOrEqualTo(key
19033
19092
  /*: string*/
19034
19093
  , value
19035
19094
  /*: mixed*/
@@ -19049,7 +19108,7 @@ var ParseQuery = /*#__PURE__*/function () {
19049
19108
 
19050
19109
  }, {
19051
19110
  key: "containedIn",
19052
- value: function (key
19111
+ value: function containedIn(key
19053
19112
  /*: string*/
19054
19113
  , value
19055
19114
  /*: mixed*/
@@ -19069,7 +19128,7 @@ var ParseQuery = /*#__PURE__*/function () {
19069
19128
 
19070
19129
  }, {
19071
19130
  key: "notContainedIn",
19072
- value: function (key
19131
+ value: function notContainedIn(key
19073
19132
  /*: string*/
19074
19133
  , value
19075
19134
  /*: mixed*/
@@ -19089,7 +19148,7 @@ var ParseQuery = /*#__PURE__*/function () {
19089
19148
 
19090
19149
  }, {
19091
19150
  key: "containedBy",
19092
- value: function (key
19151
+ value: function containedBy(key
19093
19152
  /*: string*/
19094
19153
  , values
19095
19154
  /*: Array<mixed>*/
@@ -19109,7 +19168,7 @@ var ParseQuery = /*#__PURE__*/function () {
19109
19168
 
19110
19169
  }, {
19111
19170
  key: "containsAll",
19112
- value: function (key
19171
+ value: function containsAll(key
19113
19172
  /*: string*/
19114
19173
  , values
19115
19174
  /*: Array<mixed>*/
@@ -19129,20 +19188,22 @@ var ParseQuery = /*#__PURE__*/function () {
19129
19188
 
19130
19189
  }, {
19131
19190
  key: "containsAllStartingWith",
19132
- value: function (key
19191
+ value: function containsAllStartingWith(key
19133
19192
  /*: string*/
19134
19193
  , values
19135
19194
  /*: Array<string>*/
19136
19195
  )
19137
19196
  /*: ParseQuery*/
19138
19197
  {
19198
+ var _this = this;
19199
+
19139
19200
  if (!(0, _isArray.default)(values)) {
19140
19201
  values = [values];
19141
19202
  }
19142
19203
 
19143
19204
  var regexObject = (0, _map2.default)(values).call(values, function (value) {
19144
19205
  return {
19145
- $regex: this._regexStartWith(value)
19206
+ $regex: _this._regexStartWith(value)
19146
19207
  };
19147
19208
  });
19148
19209
  return this.containsAll(key, regexObject);
@@ -19156,7 +19217,7 @@ var ParseQuery = /*#__PURE__*/function () {
19156
19217
 
19157
19218
  }, {
19158
19219
  key: "exists",
19159
- value: function (key
19220
+ value: function exists(key
19160
19221
  /*: string*/
19161
19222
  )
19162
19223
  /*: ParseQuery*/
@@ -19172,7 +19233,7 @@ var ParseQuery = /*#__PURE__*/function () {
19172
19233
 
19173
19234
  }, {
19174
19235
  key: "doesNotExist",
19175
- value: function (key
19236
+ value: function doesNotExist(key
19176
19237
  /*: string*/
19177
19238
  )
19178
19239
  /*: ParseQuery*/
@@ -19192,7 +19253,7 @@ var ParseQuery = /*#__PURE__*/function () {
19192
19253
 
19193
19254
  }, {
19194
19255
  key: "matches",
19195
- value: function (key
19256
+ value: function matches(key
19196
19257
  /*: string*/
19197
19258
  , regex
19198
19259
  /*: RegExp*/
@@ -19233,7 +19294,7 @@ var ParseQuery = /*#__PURE__*/function () {
19233
19294
 
19234
19295
  }, {
19235
19296
  key: "matchesQuery",
19236
- value: function (key
19297
+ value: function matchesQuery(key
19237
19298
  /*: string*/
19238
19299
  , query
19239
19300
  /*: ParseQuery*/
@@ -19256,7 +19317,7 @@ var ParseQuery = /*#__PURE__*/function () {
19256
19317
 
19257
19318
  }, {
19258
19319
  key: "doesNotMatchQuery",
19259
- value: function (key
19320
+ value: function doesNotMatchQuery(key
19260
19321
  /*: string*/
19261
19322
  , query
19262
19323
  /*: ParseQuery*/
@@ -19281,7 +19342,7 @@ var ParseQuery = /*#__PURE__*/function () {
19281
19342
 
19282
19343
  }, {
19283
19344
  key: "matchesKeyInQuery",
19284
- value: function (key
19345
+ value: function matchesKeyInQuery(key
19285
19346
  /*: string*/
19286
19347
  , queryKey
19287
19348
  /*: string*/
@@ -19311,7 +19372,7 @@ var ParseQuery = /*#__PURE__*/function () {
19311
19372
 
19312
19373
  }, {
19313
19374
  key: "doesNotMatchKeyInQuery",
19314
- value: function (key
19375
+ value: function doesNotMatchKeyInQuery(key
19315
19376
  /*: string*/
19316
19377
  , queryKey
19317
19378
  /*: string*/
@@ -19338,7 +19399,7 @@ var ParseQuery = /*#__PURE__*/function () {
19338
19399
 
19339
19400
  }, {
19340
19401
  key: "contains",
19341
- value: function (key
19402
+ value: function contains(key
19342
19403
  /*: string*/
19343
19404
  , substring
19344
19405
  /*: string*/
@@ -19383,7 +19444,7 @@ var ParseQuery = /*#__PURE__*/function () {
19383
19444
 
19384
19445
  }, {
19385
19446
  key: "fullText",
19386
- value: function (key
19447
+ value: function fullText(key
19387
19448
  /*: string*/
19388
19449
  , value
19389
19450
  /*: string*/
@@ -19440,7 +19501,7 @@ var ParseQuery = /*#__PURE__*/function () {
19440
19501
 
19441
19502
  }, {
19442
19503
  key: "sortByTextScore",
19443
- value: function () {
19504
+ value: function sortByTextScore() {
19444
19505
  this.ascending('$score');
19445
19506
  this.select(['$score']);
19446
19507
  return this;
@@ -19458,7 +19519,7 @@ var ParseQuery = /*#__PURE__*/function () {
19458
19519
 
19459
19520
  }, {
19460
19521
  key: "startsWith",
19461
- value: function (key
19522
+ value: function startsWith(key
19462
19523
  /*: string*/
19463
19524
  , prefix
19464
19525
  /*: string*/
@@ -19485,7 +19546,7 @@ var ParseQuery = /*#__PURE__*/function () {
19485
19546
 
19486
19547
  }, {
19487
19548
  key: "endsWith",
19488
- value: function (key
19549
+ value: function endsWith(key
19489
19550
  /*: string*/
19490
19551
  , suffix
19491
19552
  /*: string*/
@@ -19511,7 +19572,7 @@ var ParseQuery = /*#__PURE__*/function () {
19511
19572
 
19512
19573
  }, {
19513
19574
  key: "near",
19514
- value: function (key
19575
+ value: function near(key
19515
19576
  /*: string*/
19516
19577
  , point
19517
19578
  /*: ParseGeoPoint*/
@@ -19540,7 +19601,7 @@ var ParseQuery = /*#__PURE__*/function () {
19540
19601
 
19541
19602
  }, {
19542
19603
  key: "withinRadians",
19543
- value: function (key
19604
+ value: function withinRadians(key
19544
19605
  /*: string*/
19545
19606
  , point
19546
19607
  /*: ParseGeoPoint*/
@@ -19576,7 +19637,7 @@ var ParseQuery = /*#__PURE__*/function () {
19576
19637
 
19577
19638
  }, {
19578
19639
  key: "withinMiles",
19579
- value: function (key
19640
+ value: function withinMiles(key
19580
19641
  /*: string*/
19581
19642
  , point
19582
19643
  /*: ParseGeoPoint*/
@@ -19605,7 +19666,7 @@ var ParseQuery = /*#__PURE__*/function () {
19605
19666
 
19606
19667
  }, {
19607
19668
  key: "withinKilometers",
19608
- value: function (key
19669
+ value: function withinKilometers(key
19609
19670
  /*: string*/
19610
19671
  , point
19611
19672
  /*: ParseGeoPoint*/
@@ -19633,7 +19694,7 @@ var ParseQuery = /*#__PURE__*/function () {
19633
19694
 
19634
19695
  }, {
19635
19696
  key: "withinGeoBox",
19636
- value: function (key
19697
+ value: function withinGeoBox(key
19637
19698
  /*: string*/
19638
19699
  , southwest
19639
19700
  /*: ParseGeoPoint*/
@@ -19670,7 +19731,7 @@ var ParseQuery = /*#__PURE__*/function () {
19670
19731
 
19671
19732
  }, {
19672
19733
  key: "withinPolygon",
19673
- value: function (key
19734
+ value: function withinPolygon(key
19674
19735
  /*: string*/
19675
19736
  , points
19676
19737
  /*: Array<Array<number>>*/
@@ -19692,7 +19753,7 @@ var ParseQuery = /*#__PURE__*/function () {
19692
19753
 
19693
19754
  }, {
19694
19755
  key: "polygonContains",
19695
- value: function (key
19756
+ value: function polygonContains(key
19696
19757
  /*: string*/
19697
19758
  , point
19698
19759
  /*: ParseGeoPoint*/
@@ -19715,7 +19776,7 @@ var ParseQuery = /*#__PURE__*/function () {
19715
19776
 
19716
19777
  }, {
19717
19778
  key: "ascending",
19718
- value: function ()
19779
+ value: function ascending()
19719
19780
  /*: ParseQuery*/
19720
19781
  {
19721
19782
  this._order = [];
@@ -19737,7 +19798,7 @@ var ParseQuery = /*#__PURE__*/function () {
19737
19798
 
19738
19799
  }, {
19739
19800
  key: "addAscending",
19740
- value: function ()
19801
+ value: function addAscending()
19741
19802
  /*: ParseQuery*/
19742
19803
  {
19743
19804
  var _this9 = this;
@@ -19771,7 +19832,7 @@ var ParseQuery = /*#__PURE__*/function () {
19771
19832
 
19772
19833
  }, {
19773
19834
  key: "descending",
19774
- value: function ()
19835
+ value: function descending()
19775
19836
  /*: ParseQuery*/
19776
19837
  {
19777
19838
  this._order = [];
@@ -19793,7 +19854,7 @@ var ParseQuery = /*#__PURE__*/function () {
19793
19854
 
19794
19855
  }, {
19795
19856
  key: "addDescending",
19796
- value: function ()
19857
+ value: function addDescending()
19797
19858
  /*: ParseQuery*/
19798
19859
  {
19799
19860
  var _this10 = this;
@@ -19832,7 +19893,7 @@ var ParseQuery = /*#__PURE__*/function () {
19832
19893
 
19833
19894
  }, {
19834
19895
  key: "skip",
19835
- value: function (n
19896
+ value: function skip(n
19836
19897
  /*: number*/
19837
19898
  )
19838
19899
  /*: ParseQuery*/
@@ -19853,7 +19914,7 @@ var ParseQuery = /*#__PURE__*/function () {
19853
19914
 
19854
19915
  }, {
19855
19916
  key: "limit",
19856
- value: function (n
19917
+ value: function limit(n
19857
19918
  /*: number*/
19858
19919
  )
19859
19920
  /*: ParseQuery*/
@@ -19877,7 +19938,7 @@ var ParseQuery = /*#__PURE__*/function () {
19877
19938
 
19878
19939
  }, {
19879
19940
  key: "withCount",
19880
- value: function ()
19941
+ value: function withCount()
19881
19942
  /*: ParseQuery*/
19882
19943
  {
19883
19944
  var includeCount
@@ -19905,7 +19966,7 @@ var ParseQuery = /*#__PURE__*/function () {
19905
19966
 
19906
19967
  }, {
19907
19968
  key: "include",
19908
- value: function ()
19969
+ value: function include()
19909
19970
  /*: ParseQuery*/
19910
19971
  {
19911
19972
  var _this11 = this;
@@ -19935,7 +19996,7 @@ var ParseQuery = /*#__PURE__*/function () {
19935
19996
 
19936
19997
  }, {
19937
19998
  key: "includeAll",
19938
- value: function ()
19999
+ value: function includeAll()
19939
20000
  /*: ParseQuery*/
19940
20001
  {
19941
20002
  return this.include('*');
@@ -19951,7 +20012,7 @@ var ParseQuery = /*#__PURE__*/function () {
19951
20012
 
19952
20013
  }, {
19953
20014
  key: "select",
19954
- value: function ()
20015
+ value: function select()
19955
20016
  /*: ParseQuery*/
19956
20017
  {
19957
20018
  var _this12 = this;
@@ -19987,7 +20048,7 @@ var ParseQuery = /*#__PURE__*/function () {
19987
20048
 
19988
20049
  }, {
19989
20050
  key: "exclude",
19990
- value: function ()
20051
+ value: function exclude()
19991
20052
  /*: ParseQuery*/
19992
20053
  {
19993
20054
  var _this13 = this;
@@ -20018,7 +20079,7 @@ var ParseQuery = /*#__PURE__*/function () {
20018
20079
 
20019
20080
  }, {
20020
20081
  key: "readPreference",
20021
- value: function (_readPreference
20082
+ value: function readPreference(_readPreference
20022
20083
  /*: string*/
20023
20084
  , includeReadPreference
20024
20085
  /*:: ?: string*/
@@ -20047,7 +20108,7 @@ var ParseQuery = /*#__PURE__*/function () {
20047
20108
  /*:: ?: string*/
20048
20109
  ) {
20049
20110
  var currentUser, liveQueryClient, subscription;
20050
- return _regeneratorRuntime().wrap(function (_context22) {
20111
+ return _regeneratorRuntime().wrap(function _callee7$(_context22) {
20051
20112
  while (1) {
20052
20113
  switch (_context22.prev = _context22.next) {
20053
20114
  case 0:
@@ -20084,9 +20145,11 @@ var ParseQuery = /*#__PURE__*/function () {
20084
20145
  }, _callee7, this);
20085
20146
  }));
20086
20147
 
20087
- return function () {
20148
+ function subscribe(_x10) {
20088
20149
  return _subscribe.apply(this, arguments);
20089
- };
20150
+ }
20151
+
20152
+ return subscribe;
20090
20153
  }()
20091
20154
  /**
20092
20155
  * Constructs a Parse.Query that is the OR of the passed in queries. For
@@ -20109,7 +20172,7 @@ var ParseQuery = /*#__PURE__*/function () {
20109
20172
  *
20110
20173
  * @returns {Parse.Query} Returns the query, so you can chain this call.
20111
20174
  */
20112
- function ()
20175
+ function fromNetwork()
20113
20176
  /*: ParseQuery*/
20114
20177
  {
20115
20178
  this._queriesLocalDatastore = false;
@@ -20124,7 +20187,7 @@ var ParseQuery = /*#__PURE__*/function () {
20124
20187
 
20125
20188
  }, {
20126
20189
  key: "fromLocalDatastore",
20127
- value: function ()
20190
+ value: function fromLocalDatastore()
20128
20191
  /*: ParseQuery*/
20129
20192
  {
20130
20193
  return this.fromPinWithName(null);
@@ -20137,7 +20200,7 @@ var ParseQuery = /*#__PURE__*/function () {
20137
20200
 
20138
20201
  }, {
20139
20202
  key: "fromPin",
20140
- value: function ()
20203
+ value: function fromPin()
20141
20204
  /*: ParseQuery*/
20142
20205
  {
20143
20206
  return this.fromPinWithName(_LocalDatastoreUtils.DEFAULT_PIN);
@@ -20151,7 +20214,7 @@ var ParseQuery = /*#__PURE__*/function () {
20151
20214
 
20152
20215
  }, {
20153
20216
  key: "fromPinWithName",
20154
- value: function (name
20217
+ value: function fromPinWithName(name
20155
20218
  /*:: ?: string*/
20156
20219
  )
20157
20220
  /*: ParseQuery*/
@@ -20173,9 +20236,11 @@ var ParseQuery = /*#__PURE__*/function () {
20173
20236
 
20174
20237
  }, {
20175
20238
  key: "cancel",
20176
- value: function ()
20239
+ value: function cancel()
20177
20240
  /*: ParseQuery*/
20178
20241
  {
20242
+ var _this14 = this;
20243
+
20179
20244
  if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {
20180
20245
  this._xhrRequest.task._aborted = true;
20181
20246
 
@@ -20189,12 +20254,12 @@ var ParseQuery = /*#__PURE__*/function () {
20189
20254
  }
20190
20255
 
20191
20256
  return this._xhrRequest.onchange = function () {
20192
- return this.cancel();
20257
+ return _this14.cancel();
20193
20258
  };
20194
20259
  }
20195
20260
  }, {
20196
20261
  key: "_setRequestTask",
20197
- value: function (options) {
20262
+ value: function _setRequestTask(options) {
20198
20263
  var _this15 = this;
20199
20264
 
20200
20265
  options.requestTask = function (task) {
@@ -20205,7 +20270,7 @@ var ParseQuery = /*#__PURE__*/function () {
20205
20270
  }
20206
20271
  }], [{
20207
20272
  key: "fromJSON",
20208
- value: function (className
20273
+ value: function fromJSON(className
20209
20274
  /*: string*/
20210
20275
  , json
20211
20276
  /*: QueryJSON*/
@@ -20217,7 +20282,7 @@ var ParseQuery = /*#__PURE__*/function () {
20217
20282
  }
20218
20283
  }, {
20219
20284
  key: "or",
20220
- value: function ()
20285
+ value: function or()
20221
20286
  /*: ParseQuery*/
20222
20287
  {
20223
20288
  for (var _len8 = arguments.length, queries = new Array(_len8), _key12 = 0; _key12 < _len8; _key12++) {
@@ -20247,7 +20312,7 @@ var ParseQuery = /*#__PURE__*/function () {
20247
20312
 
20248
20313
  }, {
20249
20314
  key: "and",
20250
- value: function ()
20315
+ value: function and()
20251
20316
  /*: ParseQuery*/
20252
20317
  {
20253
20318
  for (var _len9 = arguments.length, queries = new Array(_len9), _key13 = 0; _key13 < _len9; _key13++) {
@@ -20277,7 +20342,7 @@ var ParseQuery = /*#__PURE__*/function () {
20277
20342
 
20278
20343
  }, {
20279
20344
  key: "nor",
20280
- value: function ()
20345
+ value: function nor()
20281
20346
  /*: ParseQuery*/
20282
20347
  {
20283
20348
  for (var _len10 = arguments.length, queries = new Array(_len10), _key14 = 0; _key14 < _len10; _key14++) {
@@ -20297,7 +20362,7 @@ var ParseQuery = /*#__PURE__*/function () {
20297
20362
  }();
20298
20363
 
20299
20364
  var DefaultController = {
20300
- find: function (className
20365
+ find: function find(className
20301
20366
  /*: string*/
20302
20367
  , params
20303
20368
  /*: QueryJSON*/
@@ -20310,7 +20375,7 @@ var DefaultController = {
20310
20375
 
20311
20376
  return RESTController.request('GET', 'classes/' + className, params, options);
20312
20377
  },
20313
- aggregate: function (className
20378
+ aggregate: function aggregate(className
20314
20379
  /*: string*/
20315
20380
  , params
20316
20381
  /*: any*/
@@ -22539,7 +22604,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22539
22604
  value: function () {
22540
22605
  var _isCurrentAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22541
22606
  var current;
22542
- return _regeneratorRuntime().wrap(function (_context) {
22607
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
22543
22608
  while (1) {
22544
22609
  switch (_context.prev = _context.next) {
22545
22610
  case 0:
@@ -22558,9 +22623,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22558
22623
  }, _callee, this);
22559
22624
  }));
22560
22625
 
22561
- return function () {
22626
+ function isCurrentAsync() {
22562
22627
  return _isCurrentAsync.apply(this, arguments);
22563
- };
22628
+ }
22629
+
22630
+ return isCurrentAsync;
22564
22631
  }()
22565
22632
  /**
22566
22633
  * Returns get("username").
@@ -22570,7 +22637,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22570
22637
 
22571
22638
  }, {
22572
22639
  key: "getUsername",
22573
- value: function ()
22640
+ value: function getUsername()
22574
22641
  /*: ?string*/
22575
22642
  {
22576
22643
  var username = this.get('username');
@@ -22589,7 +22656,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22589
22656
 
22590
22657
  }, {
22591
22658
  key: "setUsername",
22592
- value: function (username
22659
+ value: function setUsername(username
22593
22660
  /*: string*/
22594
22661
  ) {
22595
22662
  // Strip anonymity
@@ -22610,7 +22677,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22610
22677
 
22611
22678
  }, {
22612
22679
  key: "setPassword",
22613
- value: function (password
22680
+ value: function setPassword(password
22614
22681
  /*: string*/
22615
22682
  ) {
22616
22683
  this.set('password', password);
@@ -22623,7 +22690,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22623
22690
 
22624
22691
  }, {
22625
22692
  key: "getEmail",
22626
- value: function ()
22693
+ value: function getEmail()
22627
22694
  /*: ?string*/
22628
22695
  {
22629
22696
  var email = this.get('email');
@@ -22643,7 +22710,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22643
22710
 
22644
22711
  }, {
22645
22712
  key: "setEmail",
22646
- value: function (email
22713
+ value: function setEmail(email
22647
22714
  /*: string*/
22648
22715
  ) {
22649
22716
  return this.set('email', email);
@@ -22658,7 +22725,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22658
22725
 
22659
22726
  }, {
22660
22727
  key: "getSessionToken",
22661
- value: function ()
22728
+ value: function getSessionToken()
22662
22729
  /*: ?string*/
22663
22730
  {
22664
22731
  var token = this.get('sessionToken');
@@ -22677,7 +22744,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22677
22744
 
22678
22745
  }, {
22679
22746
  key: "authenticated",
22680
- value: function ()
22747
+ value: function authenticated()
22681
22748
  /*: boolean*/
22682
22749
  {
22683
22750
  var current = ParseUser.current();
@@ -22699,7 +22766,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22699
22766
 
22700
22767
  }, {
22701
22768
  key: "signUp",
22702
- value: function (attrs
22769
+ value: function signUp(attrs
22703
22770
  /*: AttributeMap*/
22704
22771
  , options
22705
22772
  /*:: ?: FullOptions*/
@@ -22739,7 +22806,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22739
22806
 
22740
22807
  }, {
22741
22808
  key: "logIn",
22742
- value: function (options
22809
+ value: function logIn(options
22743
22810
  /*:: ?: FullOptions*/
22744
22811
  )
22745
22812
  /*: Promise<ParseUser>*/
@@ -22783,7 +22850,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22783
22850
  current,
22784
22851
  _args2 = arguments;
22785
22852
 
22786
- return _regeneratorRuntime().wrap(function (_context2) {
22853
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
22787
22854
  while (1) {
22788
22855
  switch (_context2.prev = _context2.next) {
22789
22856
  case 0:
@@ -22819,9 +22886,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22819
22886
  }, _callee2, this);
22820
22887
  }));
22821
22888
 
22822
- return function () {
22889
+ function save() {
22823
22890
  return _save.apply(this, arguments);
22824
- };
22891
+ }
22892
+
22893
+ return save;
22825
22894
  }()
22826
22895
  /**
22827
22896
  * Wrap the default destroy behavior with functionality that logs out
@@ -22841,7 +22910,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22841
22910
  current,
22842
22911
  _args3 = arguments;
22843
22912
 
22844
- return _regeneratorRuntime().wrap(function (_context3) {
22913
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
22845
22914
  while (1) {
22846
22915
  switch (_context3.prev = _context3.next) {
22847
22916
  case 0:
@@ -22877,9 +22946,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22877
22946
  }, _callee3, this);
22878
22947
  }));
22879
22948
 
22880
- return function () {
22949
+ function destroy() {
22881
22950
  return _destroy.apply(this, arguments);
22882
- };
22951
+ }
22952
+
22953
+ return destroy;
22883
22954
  }()
22884
22955
  /**
22885
22956
  * Wrap the default fetch behavior with functionality to save to local
@@ -22899,7 +22970,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22899
22970
  current,
22900
22971
  _args4 = arguments;
22901
22972
 
22902
- return _regeneratorRuntime().wrap(function (_context4) {
22973
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
22903
22974
  while (1) {
22904
22975
  switch (_context4.prev = _context4.next) {
22905
22976
  case 0:
@@ -22935,9 +23006,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22935
23006
  }, _callee4, this);
22936
23007
  }));
22937
23008
 
22938
- return function () {
23009
+ function fetch() {
22939
23010
  return _fetch.apply(this, arguments);
22940
- };
23011
+ }
23012
+
23013
+ return fetch;
22941
23014
  }()
22942
23015
  /**
22943
23016
  * Wrap the default fetchWithInclude behavior with functionality to save to local
@@ -22957,7 +23030,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22957
23030
  current,
22958
23031
  _args5 = arguments;
22959
23032
 
22960
- return _regeneratorRuntime().wrap(function (_context5) {
23033
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
22961
23034
  while (1) {
22962
23035
  switch (_context5.prev = _context5.next) {
22963
23036
  case 0:
@@ -22993,9 +23066,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22993
23066
  }, _callee5, this);
22994
23067
  }));
22995
23068
 
22996
- return function () {
23069
+ function fetchWithInclude() {
22997
23070
  return _fetchWithInclude.apply(this, arguments);
22998
- };
23071
+ }
23072
+
23073
+ return fetchWithInclude;
22999
23074
  }()
23000
23075
  /**
23001
23076
  * Verify whether a given password is the password of the current user.
@@ -23008,7 +23083,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23008
23083
 
23009
23084
  }, {
23010
23085
  key: "verifyPassword",
23011
- value: function (password
23086
+ value: function verifyPassword(password
23012
23087
  /*: string*/
23013
23088
  , options
23014
23089
  /*:: ?: RequestOptions*/
@@ -23020,7 +23095,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23020
23095
  }
23021
23096
  }], [{
23022
23097
  key: "readOnlyAttributes",
23023
- value: function () {
23098
+ value: function readOnlyAttributes() {
23024
23099
  return ['sessionToken'];
23025
23100
  }
23026
23101
  /**
@@ -23034,7 +23109,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23034
23109
 
23035
23110
  }, {
23036
23111
  key: "extend",
23037
- value: function (protoProps
23112
+ value: function extend(protoProps
23038
23113
  /*: { [prop: string]: any }*/
23039
23114
  , classProps
23040
23115
  /*: { [prop: string]: any }*/
@@ -23077,7 +23152,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23077
23152
 
23078
23153
  }, {
23079
23154
  key: "current",
23080
- value: function ()
23155
+ value: function current()
23081
23156
  /*: ?ParseUser*/
23082
23157
  {
23083
23158
  if (!canUseCurrentUser) {
@@ -23098,7 +23173,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23098
23173
 
23099
23174
  }, {
23100
23175
  key: "currentAsync",
23101
- value: function ()
23176
+ value: function currentAsync()
23102
23177
  /*: Promise<?ParseUser>*/
23103
23178
  {
23104
23179
  if (!canUseCurrentUser) {
@@ -23126,7 +23201,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23126
23201
 
23127
23202
  }, {
23128
23203
  key: "signUp",
23129
- value: function (username
23204
+ value: function signUp(username
23130
23205
  /*: string*/
23131
23206
  , password
23132
23207
  /*: string*/
@@ -23156,7 +23231,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23156
23231
 
23157
23232
  }, {
23158
23233
  key: "logIn",
23159
- value: function (username
23234
+ value: function logIn(username
23160
23235
  /*: string*/
23161
23236
  , password
23162
23237
  /*: string*/
@@ -23192,7 +23267,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23192
23267
 
23193
23268
  }, {
23194
23269
  key: "become",
23195
- value: function (sessionToken
23270
+ value: function become(sessionToken
23196
23271
  /*: string*/
23197
23272
  , options
23198
23273
  /*:: ?: RequestOptions*/
@@ -23228,7 +23303,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23228
23303
 
23229
23304
  }, {
23230
23305
  key: "me",
23231
- value: function (sessionToken
23306
+ value: function me(sessionToken
23232
23307
  /*: string*/
23233
23308
  ) {
23234
23309
  var options
@@ -23263,7 +23338,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23263
23338
 
23264
23339
  }, {
23265
23340
  key: "hydrate",
23266
- value: function (userJSON
23341
+ value: function hydrate(userJSON
23267
23342
  /*: AttributeMap*/
23268
23343
  ) {
23269
23344
  var controller = _CoreManager.default.getUserController();
@@ -23283,7 +23358,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23283
23358
 
23284
23359
  }, {
23285
23360
  key: "logInWith",
23286
- value: function (provider
23361
+ value: function logInWith(provider
23287
23362
  /*: any*/
23288
23363
  , options
23289
23364
  /*: { authData?: AuthData }*/
@@ -23308,7 +23383,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23308
23383
 
23309
23384
  }, {
23310
23385
  key: "logOut",
23311
- value: function () {
23386
+ value: function logOut() {
23312
23387
  var options
23313
23388
  /*: RequestOptions*/
23314
23389
  = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -23331,7 +23406,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23331
23406
 
23332
23407
  }, {
23333
23408
  key: "requestPasswordReset",
23334
- value: function (email
23409
+ value: function requestPasswordReset(email
23335
23410
  /*: string*/
23336
23411
  , options
23337
23412
  /*:: ?: RequestOptions*/
@@ -23359,7 +23434,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23359
23434
 
23360
23435
  }, {
23361
23436
  key: "requestEmailVerification",
23362
- value: function (email
23437
+ value: function requestEmailVerification(email
23363
23438
  /*: string*/
23364
23439
  , options
23365
23440
  /*:: ?: RequestOptions*/
@@ -23388,7 +23463,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23388
23463
 
23389
23464
  }, {
23390
23465
  key: "verifyPassword",
23391
- value: function (username
23466
+ value: function verifyPassword(username
23392
23467
  /*: string*/
23393
23468
  , password
23394
23469
  /*: string*/
@@ -23426,7 +23501,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23426
23501
 
23427
23502
  }, {
23428
23503
  key: "allowCustomUserClass",
23429
- value: function (isAllowed
23504
+ value: function allowCustomUserClass(isAllowed
23430
23505
  /*: boolean*/
23431
23506
  ) {
23432
23507
  _CoreManager.default.set('PERFORM_USER_REWRITE', !isAllowed);
@@ -23448,7 +23523,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23448
23523
 
23449
23524
  }, {
23450
23525
  key: "enableRevocableSession",
23451
- value: function (options
23526
+ value: function enableRevocableSession(options
23452
23527
  /*:: ?: RequestOptions*/
23453
23528
  ) {
23454
23529
  options = options || {};
@@ -23475,7 +23550,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23475
23550
 
23476
23551
  }, {
23477
23552
  key: "enableUnsafeCurrentUser",
23478
- value: function () {
23553
+ value: function enableUnsafeCurrentUser() {
23479
23554
  canUseCurrentUser = true;
23480
23555
  }
23481
23556
  /**
@@ -23488,7 +23563,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23488
23563
 
23489
23564
  }, {
23490
23565
  key: "disableUnsafeCurrentUser",
23491
- value: function () {
23566
+ value: function disableUnsafeCurrentUser() {
23492
23567
  canUseCurrentUser = false;
23493
23568
  }
23494
23569
  /**
@@ -23506,7 +23581,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23506
23581
 
23507
23582
  }, {
23508
23583
  key: "_registerAuthenticationProvider",
23509
- value: function (provider
23584
+ value: function _registerAuthenticationProvider(provider
23510
23585
  /*: any*/
23511
23586
  ) {
23512
23587
  authProviders[provider.getAuthType()] = provider; // Synchronize the current user with the auth provider.
@@ -23528,7 +23603,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23528
23603
 
23529
23604
  }, {
23530
23605
  key: "_logInWith",
23531
- value: function (provider
23606
+ value: function _logInWith(provider
23532
23607
  /*: any*/
23533
23608
  , options
23534
23609
  /*: { authData?: AuthData }*/
@@ -23540,13 +23615,13 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23540
23615
  }
23541
23616
  }, {
23542
23617
  key: "_clearCache",
23543
- value: function () {
23618
+ value: function _clearCache() {
23544
23619
  currentUserCache = null;
23545
23620
  currentUserCacheMatchesDisk = false;
23546
23621
  }
23547
23622
  }, {
23548
23623
  key: "_setCurrentUserCache",
23549
- value: function (user
23624
+ value: function _setCurrentUserCache(user
23550
23625
  /*: ParseUser*/
23551
23626
  ) {
23552
23627
  currentUserCache = user;
@@ -23558,7 +23633,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23558
23633
  _ParseObject2.default.registerSubclass('_User', ParseUser);
23559
23634
 
23560
23635
  var DefaultController = {
23561
- updateUserOnDisk: function (user) {
23636
+ updateUserOnDisk: function updateUserOnDisk(user) {
23562
23637
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23563
23638
 
23564
23639
  var json = user.toJSON();
@@ -23576,14 +23651,14 @@ var DefaultController = {
23576
23651
  return user;
23577
23652
  });
23578
23653
  },
23579
- removeUserFromDisk: function () {
23654
+ removeUserFromDisk: function removeUserFromDisk() {
23580
23655
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23581
23656
 
23582
23657
  currentUserCacheMatchesDisk = true;
23583
23658
  currentUserCache = null;
23584
23659
  return _Storage.default.removeItemAsync(path);
23585
23660
  },
23586
- setCurrentUser: function (user) {
23661
+ setCurrentUser: function setCurrentUser(user) {
23587
23662
  currentUserCache = user;
23588
23663
 
23589
23664
  user._cleanupAuthData();
@@ -23592,7 +23667,7 @@ var DefaultController = {
23592
23667
 
23593
23668
  return DefaultController.updateUserOnDisk(user);
23594
23669
  },
23595
- currentUser: function ()
23670
+ currentUser: function currentUser()
23596
23671
  /*: ?ParseUser*/
23597
23672
  {
23598
23673
  if (currentUserCache) {
@@ -23651,7 +23726,7 @@ var DefaultController = {
23651
23726
 
23652
23727
  return current;
23653
23728
  },
23654
- currentUserAsync: function ()
23729
+ currentUserAsync: function currentUserAsync()
23655
23730
  /*: Promise<?ParseUser>*/
23656
23731
  {
23657
23732
  if (currentUserCache) {
@@ -23706,7 +23781,7 @@ var DefaultController = {
23706
23781
  return _promise.default.resolve(current);
23707
23782
  });
23708
23783
  },
23709
- signUp: function (user
23784
+ signUp: function signUp(user
23710
23785
  /*: ParseUser*/
23711
23786
  , attrs
23712
23787
  /*: AttributeMap*/
@@ -23739,7 +23814,7 @@ var DefaultController = {
23739
23814
  return user;
23740
23815
  });
23741
23816
  },
23742
- logIn: function (user
23817
+ logIn: function logIn(user
23743
23818
  /*: ParseUser*/
23744
23819
  , options
23745
23820
  /*: RequestOptions*/
@@ -23773,7 +23848,7 @@ var DefaultController = {
23773
23848
  return DefaultController.setCurrentUser(user);
23774
23849
  });
23775
23850
  },
23776
- become: function (user
23851
+ become: function become(user
23777
23852
  /*: ParseUser*/
23778
23853
  , options
23779
23854
  /*: RequestOptions*/
@@ -23790,7 +23865,7 @@ var DefaultController = {
23790
23865
  return DefaultController.setCurrentUser(user);
23791
23866
  });
23792
23867
  },
23793
- hydrate: function (user
23868
+ hydrate: function hydrate(user
23794
23869
  /*: ParseUser*/
23795
23870
  , userJSON
23796
23871
  /*: AttributeMap*/
@@ -23807,7 +23882,7 @@ var DefaultController = {
23807
23882
  return _promise.default.resolve(user);
23808
23883
  }
23809
23884
  },
23810
- me: function (user
23885
+ me: function me(user
23811
23886
  /*: ParseUser*/
23812
23887
  , options
23813
23888
  /*: RequestOptions*/
@@ -23824,7 +23899,7 @@ var DefaultController = {
23824
23899
  return user;
23825
23900
  });
23826
23901
  },
23827
- logOut: function (options
23902
+ logOut: function logOut(options
23828
23903
  /*: RequestOptions*/
23829
23904
  )
23830
23905
  /*: Promise<ParseUser>*/
@@ -23863,7 +23938,7 @@ var DefaultController = {
23863
23938
  return promise;
23864
23939
  });
23865
23940
  },
23866
- requestPasswordReset: function (email
23941
+ requestPasswordReset: function requestPasswordReset(email
23867
23942
  /*: string*/
23868
23943
  , options
23869
23944
  /*: RequestOptions*/
@@ -23874,14 +23949,14 @@ var DefaultController = {
23874
23949
  email: email
23875
23950
  }, options);
23876
23951
  },
23877
- upgradeToRevocableSession: function (user
23952
+ upgradeToRevocableSession: function upgradeToRevocableSession(user
23878
23953
  /*: ParseUser*/
23879
23954
  , options
23880
23955
  /*: RequestOptions*/
23881
23956
  ) {
23882
23957
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
23883
23958
  var token, RESTController, result, session, current;
23884
- return _regeneratorRuntime().wrap(function (_context6) {
23959
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
23885
23960
  while (1) {
23886
23961
  switch (_context6.prev = _context6.next) {
23887
23962
  case 0:
@@ -23934,7 +24009,7 @@ var DefaultController = {
23934
24009
  }, _callee6);
23935
24010
  }))();
23936
24011
  },
23937
- linkWith: function (user
24012
+ linkWith: function linkWith(user
23938
24013
  /*: ParseUser*/
23939
24014
  , authData
23940
24015
  /*: AuthData*/
@@ -23951,7 +24026,7 @@ var DefaultController = {
23951
24026
  return user;
23952
24027
  });
23953
24028
  },
23954
- verifyPassword: function (username
24029
+ verifyPassword: function verifyPassword(username
23955
24030
  /*: string*/
23956
24031
  , password
23957
24032
  /*: string*/
@@ -23965,7 +24040,7 @@ var DefaultController = {
23965
24040
  password: password
23966
24041
  }, options);
23967
24042
  },
23968
- requestEmailVerification: function (email
24043
+ requestEmailVerification: function requestEmailVerification(email
23969
24044
  /*: string*/
23970
24045
  , options
23971
24046
  /*: RequestOptions*/
@@ -24306,7 +24381,7 @@ var RESTController = {
24306
24381
  var requestId = isIdempotent ? uuidv4() : '';
24307
24382
  var attempts = 0;
24308
24383
 
24309
- var dispatch = function dispatch() {
24384
+ (function dispatch() {
24310
24385
  if (XHR == null) {
24311
24386
  throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');
24312
24387
  }
@@ -24435,12 +24510,11 @@ var RESTController = {
24435
24510
  if (options && typeof options.requestTask === 'function') {
24436
24511
  options.requestTask(xhr);
24437
24512
  }
24438
- };
24513
+ })();
24439
24514
 
24440
- dispatch();
24441
24515
  return promise;
24442
24516
  },
24443
- request: function (method
24517
+ request: function request(method
24444
24518
  /*: string*/
24445
24519
  , path
24446
24520
  /*: string*/
@@ -24555,7 +24629,7 @@ var RESTController = {
24555
24629
  });
24556
24630
  }).catch(RESTController.handleError);
24557
24631
  },
24558
- handleError: function (response) {
24632
+ handleError: function handleError(response) {
24559
24633
  // Transform the error into an instance of ParseError by trying to parse
24560
24634
  // the error string as JSON
24561
24635
  var error;
@@ -24575,12 +24649,12 @@ var RESTController = {
24575
24649
 
24576
24650
  return _promise.default.reject(error);
24577
24651
  },
24578
- _setXHR: function (xhr
24652
+ _setXHR: function _setXHR(xhr
24579
24653
  /*: any*/
24580
24654
  ) {
24581
24655
  XHR = xhr;
24582
24656
  },
24583
- _getXHR: function () {
24657
+ _getXHR: function _getXHR() {
24584
24658
  return XHR;
24585
24659
  }
24586
24660
  };