parse 3.5.0 → 3.5.1-alpha.2

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 (50) hide show
  1. package/README.md +2 -1
  2. package/dist/parse.js +422 -347
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +422 -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 +27 -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/browser/StorageController.react-native.js +7 -12
  21. package/lib/node/CoreManager.js +1 -1
  22. package/lib/node/ParseFile.js +1 -0
  23. package/lib/node/ParseQuery.js +3 -1
  24. package/lib/node/StorageController.react-native.js +7 -13
  25. package/lib/react-native/CoreManager.js +1 -1
  26. package/lib/react-native/LiveQueryClient.js +6 -2
  27. package/lib/react-native/LocalDatastore.js +3 -2
  28. package/lib/react-native/ParseCLP.js +32 -32
  29. package/lib/react-native/ParseFile.js +10 -3
  30. package/lib/react-native/ParseObject.js +14 -9
  31. package/lib/react-native/ParseOp.js +3 -1
  32. package/lib/react-native/ParseQuery.js +21 -7
  33. package/lib/react-native/RESTController.js +6 -7
  34. package/lib/react-native/StorageController.react-native.js +7 -10
  35. package/lib/weapp/CoreManager.js +1 -1
  36. package/lib/weapp/EventuallyQueue.js +31 -27
  37. package/lib/weapp/LiveQueryClient.js +6 -2
  38. package/lib/weapp/LocalDatastore.js +20 -20
  39. package/lib/weapp/LocalDatastoreController.js +16 -14
  40. package/lib/weapp/LocalDatastoreController.react-native.js +10 -10
  41. package/lib/weapp/ParseCLP.js +32 -32
  42. package/lib/weapp/ParseFile.js +27 -15
  43. package/lib/weapp/ParseLiveQuery.js +6 -6
  44. package/lib/weapp/ParseObject.js +84 -69
  45. package/lib/weapp/ParseOp.js +3 -1
  46. package/lib/weapp/ParseQuery.js +115 -88
  47. package/lib/weapp/ParseUser.js +74 -64
  48. package/lib/weapp/RESTController.js +6 -7
  49. package/lib/weapp/StorageController.react-native.js +7 -12
  50. package/package.json +3 -2
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v3.5.0
2
+ * Parse JavaScript SDK v3.5.1-alpha.2
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.0",
702
+ VERSION: 'js' + "3.5.1-alpha.2",
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:
@@ -2806,6 +2810,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2806
2810
  )
2807
2811
  /*: LiveQuerySubscription*/
2808
2812
  {
2813
+ var _this2 = this;
2814
+
2809
2815
  if (!query) {
2810
2816
  return;
2811
2817
  }
@@ -2832,7 +2838,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2832
2838
  this.subscriptions.set(this.requestId, subscription);
2833
2839
  this.requestId += 1;
2834
2840
  this.connectPromise.then(function () {
2835
- this.socket.send((0, _stringify.default)(subscribeRequest));
2841
+ _this2.socket.send((0, _stringify.default)(subscribeRequest));
2836
2842
  });
2837
2843
  return subscription;
2838
2844
  }
@@ -2847,6 +2853,8 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2847
2853
  value: function (subscription
2848
2854
  /*: Object*/
2849
2855
  ) {
2856
+ var _this3 = this;
2857
+
2850
2858
  if (!subscription) {
2851
2859
  return;
2852
2860
  }
@@ -2857,7 +2865,7 @@ var LiveQueryClient = /*#__PURE__*/function (_EventEmitter) {
2857
2865
  requestId: subscription.id
2858
2866
  };
2859
2867
  this.connectPromise.then(function () {
2860
- this.socket.send((0, _stringify.default)(unsubscribeRequest));
2868
+ _this3.socket.send((0, _stringify.default)(unsubscribeRequest));
2861
2869
  });
2862
2870
  }
2863
2871
  /**
@@ -3996,7 +4004,7 @@ var LocalDatastore = {
3996
4004
 
3997
4005
  var pinName, toPinPromises, objectKeys, _iterator, _step, parent, children, parentKey, json, objectKey, fromPinPromise, _yield$Promise$all, _yield$Promise$all2, pinned, toPin;
3998
4006
 
3999
- return _regeneratorRuntime().wrap(function (_context2) {
4007
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
4000
4008
  while (1) {
4001
4009
  switch (_context2.prev = _context2.next) {
4002
4010
  case 0:
@@ -4050,7 +4058,7 @@ var LocalDatastore = {
4050
4058
  },
4051
4059
  // Removes object and children keys from pin name
4052
4060
  // Keeps the object and children pinned
4053
- _handleUnPinAllWithName: function (name
4061
+ _handleUnPinAllWithName: function _handleUnPinAllWithName(name
4054
4062
  /*: string*/
4055
4063
  , objects
4056
4064
  /*: Array<ParseObject>*/
@@ -4060,7 +4068,7 @@ var LocalDatastore = {
4060
4068
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
4061
4069
  var localDatastore, pinName, promises, objectKeys, _iterator2, _step2, _objectKeys, _context3, parent, children, parentKey, pinned, _iterator3, _step3, objectKey, hasReference, key, pinnedObjects;
4062
4070
 
4063
- return _regeneratorRuntime().wrap(function (_context4) {
4071
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
4064
4072
  while (1) {
4065
4073
  switch (_context4.prev = _context4.next) {
4066
4074
  case 0:
@@ -4182,7 +4190,7 @@ var LocalDatastore = {
4182
4190
  }))();
4183
4191
  },
4184
4192
  // Retrieve all pointer fields from object recursively
4185
- _getChildren: function (object
4193
+ _getChildren: function _getChildren(object
4186
4194
  /*: ParseObject*/
4187
4195
  ) {
4188
4196
  var encountered = {};
@@ -4197,7 +4205,7 @@ var LocalDatastore = {
4197
4205
 
4198
4206
  return encountered;
4199
4207
  },
4200
- _traverse: function (object
4208
+ _traverse: function _traverse(object
4201
4209
  /*: any*/
4202
4210
  , encountered
4203
4211
  /*: any*/
@@ -4227,7 +4235,7 @@ var LocalDatastore = {
4227
4235
  }
4228
4236
  },
4229
4237
  // Transform keys in pin name to objects
4230
- _serializeObjectsFromPinName: function (name
4238
+ _serializeObjectsFromPinName: function _serializeObjectsFromPinName(name
4231
4239
  /*: string*/
4232
4240
  ) {
4233
4241
  var _this3 = this;
@@ -4236,7 +4244,7 @@ var LocalDatastore = {
4236
4244
  var _context5, _concatInstanceProper, _context6;
4237
4245
 
4238
4246
  var localDatastore, allObjects, key, pinName, pinned, promises, objects;
4239
- return _regeneratorRuntime().wrap(function (_context7) {
4247
+ return _regeneratorRuntime().wrap(function _callee3$(_context7) {
4240
4248
  while (1) {
4241
4249
  switch (_context7.prev = _context7.next) {
4242
4250
  case 0:
@@ -4296,7 +4304,7 @@ var LocalDatastore = {
4296
4304
  // Replaces object pointers with pinned pointers
4297
4305
  // The object pointers may contain old data
4298
4306
  // Uses Breadth First Search Algorithm
4299
- _serializeObject: function (objectKey
4307
+ _serializeObject: function _serializeObject(objectKey
4300
4308
  /*: string*/
4301
4309
  , localDatastore
4302
4310
  /*: any*/
@@ -4305,7 +4313,7 @@ var LocalDatastore = {
4305
4313
 
4306
4314
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
4307
4315
  var LDS, root, queue, meta, uniqueId, nodeId, subTreeRoot, field, value, key, pointer;
4308
- return _regeneratorRuntime().wrap(function (_context8) {
4316
+ return _regeneratorRuntime().wrap(function _callee4$(_context8) {
4309
4317
  while (1) {
4310
4318
  switch (_context8.prev = _context8.next) {
4311
4319
  case 0:
@@ -4371,7 +4379,7 @@ var LocalDatastore = {
4371
4379
  },
4372
4380
  // Called when an object is save / fetched
4373
4381
  // Update object pin value
4374
- _updateObjectIfPinned: function (object
4382
+ _updateObjectIfPinned: function _updateObjectIfPinned(object
4375
4383
  /*: ParseObject*/
4376
4384
  )
4377
4385
  /*: Promise<void>*/
@@ -4380,7 +4388,7 @@ var LocalDatastore = {
4380
4388
 
4381
4389
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
4382
4390
  var objectKey, pinned;
4383
- return _regeneratorRuntime().wrap(function (_context9) {
4391
+ return _regeneratorRuntime().wrap(function _callee5$(_context9) {
4384
4392
  while (1) {
4385
4393
  switch (_context9.prev = _context9.next) {
4386
4394
  case 0:
@@ -4420,14 +4428,14 @@ var LocalDatastore = {
4420
4428
  // Called when object is destroyed
4421
4429
  // Unpin object and remove all references from pin names
4422
4430
  // TODO: Destroy children?
4423
- _destroyObjectIfPinned: function (object
4431
+ _destroyObjectIfPinned: function _destroyObjectIfPinned(object
4424
4432
  /*: ParseObject*/
4425
4433
  ) {
4426
4434
  var _this6 = this;
4427
4435
 
4428
4436
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
4429
4437
  var localDatastore, objectKey, pin, promises, key, pinned;
4430
- return _regeneratorRuntime().wrap(function (_context10) {
4438
+ return _regeneratorRuntime().wrap(function _callee6$(_context10) {
4431
4439
  while (1) {
4432
4440
  switch (_context10.prev = _context10.next) {
4433
4441
  case 0:
@@ -4489,7 +4497,7 @@ var LocalDatastore = {
4489
4497
  }))();
4490
4498
  },
4491
4499
  // Update pin and references of the unsaved object
4492
- _updateLocalIdForObject: function (localId
4500
+ _updateLocalIdForObject: function _updateLocalIdForObject(localId
4493
4501
  /*: string*/
4494
4502
  , object
4495
4503
  /*: ParseObject*/
@@ -4500,7 +4508,7 @@ var LocalDatastore = {
4500
4508
  var _context11, _context12;
4501
4509
 
4502
4510
  var localKey, objectKey, unsaved, promises, localDatastore, key, pinned;
4503
- return _regeneratorRuntime().wrap(function (_context13) {
4511
+ return _regeneratorRuntime().wrap(function _callee7$(_context13) {
4504
4512
  while (1) {
4505
4513
  switch (_context13.prev = _context13.next) {
4506
4514
  case 0:
@@ -4572,7 +4580,7 @@ var LocalDatastore = {
4572
4580
  * @name Parse.LocalDatastore.updateFromServer
4573
4581
  * @static
4574
4582
  */
4575
- updateFromServer: function () {
4583
+ updateFromServer: function updateFromServer() {
4576
4584
  var _this8 = this;
4577
4585
 
4578
4586
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
@@ -4580,7 +4588,7 @@ var LocalDatastore = {
4580
4588
 
4581
4589
  var localDatastore, keys, key, pointersHash, _i, _keys, _key, _key$split, _key$split2, className, objectId, queryPromises, responses, objects, pinPromises;
4582
4590
 
4583
- return _regeneratorRuntime().wrap(function (_context15) {
4591
+ return _regeneratorRuntime().wrap(function _callee8$(_context15) {
4584
4592
  while (1) {
4585
4593
  switch (_context15.prev = _context15.next) {
4586
4594
  case 0:
@@ -4699,7 +4707,7 @@ var LocalDatastore = {
4699
4707
  }, _callee8, null, [[24, 35]]);
4700
4708
  }))();
4701
4709
  },
4702
- getKeyForObject: function (object
4710
+ getKeyForObject: function getKeyForObject(object
4703
4711
  /*: any*/
4704
4712
  ) {
4705
4713
  var _context16, _context17;
@@ -4708,7 +4716,7 @@ var LocalDatastore = {
4708
4716
 
4709
4717
  return (0, _concat.default)(_context16 = (0, _concat.default)(_context17 = "".concat(_LocalDatastoreUtils.OBJECT_PREFIX)).call(_context17, object.className, "_")).call(_context16, objectId);
4710
4718
  },
4711
- getPinName: function (pinName
4719
+ getPinName: function getPinName(pinName
4712
4720
  /*: ?string*/
4713
4721
  ) {
4714
4722
  if (!pinName || pinName === _LocalDatastoreUtils.DEFAULT_PIN) {
@@ -4717,7 +4725,7 @@ var LocalDatastore = {
4717
4725
 
4718
4726
  return _LocalDatastoreUtils.PIN_PREFIX + pinName;
4719
4727
  },
4720
- checkIfEnabled: function () {
4728
+ checkIfEnabled: function checkIfEnabled() {
4721
4729
  if (!this.isEnabled) {
4722
4730
  console.error('Parse.enableLocalDatastore() must be called first');
4723
4731
  }
@@ -5221,7 +5229,7 @@ var LocalDatastoreController = {
5221
5229
  {
5222
5230
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5223
5231
  var values, objects;
5224
- return _regeneratorRuntime().wrap(function (_context) {
5232
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5225
5233
  while (1) {
5226
5234
  switch (_context.prev = _context.next) {
5227
5235
  case 0:
@@ -5250,7 +5258,7 @@ var LocalDatastoreController = {
5250
5258
  }, _callee);
5251
5259
  }))();
5252
5260
  },
5253
- pinWithName: function (name
5261
+ pinWithName: function pinWithName(name
5254
5262
  /*: string*/
5255
5263
  , value
5256
5264
  /*: any*/
@@ -5258,17 +5266,17 @@ var LocalDatastoreController = {
5258
5266
  var values = (0, _stringify.default)(value);
5259
5267
  return _Storage.default.setItemAsync(name, values);
5260
5268
  },
5261
- unPinWithName: function (name
5269
+ unPinWithName: function unPinWithName(name
5262
5270
  /*: string*/
5263
5271
  ) {
5264
5272
  return _Storage.default.removeItemAsync(name);
5265
5273
  },
5266
- getAllContents: function ()
5274
+ getAllContents: function getAllContents()
5267
5275
  /*: Object*/
5268
5276
  {
5269
5277
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
5270
5278
  var keys;
5271
- return _regeneratorRuntime().wrap(function (_context3) {
5279
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5272
5280
  while (1) {
5273
5281
  switch (_context3.prev = _context3.next) {
5274
5282
  case 0:
@@ -5280,7 +5288,7 @@ var LocalDatastoreController = {
5280
5288
  return _context3.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5281
5289
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(previousPromise, key) {
5282
5290
  var LDS, value;
5283
- return _regeneratorRuntime().wrap(function (_context2) {
5291
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5284
5292
  while (1) {
5285
5293
  switch (_context2.prev = _context2.next) {
5286
5294
  case 0:
@@ -5318,7 +5326,7 @@ var LocalDatastoreController = {
5318
5326
  }, _callee2);
5319
5327
  }));
5320
5328
 
5321
- return function () {
5329
+ return function (_x, _x2) {
5322
5330
  return _ref.apply(this, arguments);
5323
5331
  };
5324
5332
  }(), _promise.default.resolve({})));
@@ -5332,12 +5340,12 @@ var LocalDatastoreController = {
5332
5340
  }))();
5333
5341
  },
5334
5342
  // Used for testing
5335
- getRawStorage: function ()
5343
+ getRawStorage: function getRawStorage()
5336
5344
  /*: Object*/
5337
5345
  {
5338
5346
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
5339
5347
  var keys;
5340
- return _regeneratorRuntime().wrap(function (_context5) {
5348
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5341
5349
  while (1) {
5342
5350
  switch (_context5.prev = _context5.next) {
5343
5351
  case 0:
@@ -5349,7 +5357,7 @@ var LocalDatastoreController = {
5349
5357
  return _context5.abrupt("return", (0, _reduce.default)(keys).call(keys, /*#__PURE__*/function () {
5350
5358
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(previousPromise, key) {
5351
5359
  var LDS, value;
5352
- return _regeneratorRuntime().wrap(function (_context4) {
5360
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5353
5361
  while (1) {
5354
5362
  switch (_context4.prev = _context4.next) {
5355
5363
  case 0:
@@ -5374,7 +5382,7 @@ var LocalDatastoreController = {
5374
5382
  }, _callee4);
5375
5383
  }));
5376
5384
 
5377
- return function () {
5385
+ return function (_x3, _x4) {
5378
5386
  return _ref2.apply(this, arguments);
5379
5387
  };
5380
5388
  }(), _promise.default.resolve({})));
@@ -5387,13 +5395,15 @@ var LocalDatastoreController = {
5387
5395
  }, _callee5);
5388
5396
  }))();
5389
5397
  },
5390
- clear: function ()
5398
+ clear: function clear()
5391
5399
  /*: Promise*/
5392
5400
  {
5401
+ var _this = this;
5402
+
5393
5403
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
5394
5404
  var keys, toRemove, _iterator, _step, key, promises;
5395
5405
 
5396
- return _regeneratorRuntime().wrap(function (_context6) {
5406
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5397
5407
  while (1) {
5398
5408
  switch (_context6.prev = _context6.next) {
5399
5409
  case 0:
@@ -5419,7 +5429,7 @@ var LocalDatastoreController = {
5419
5429
  _iterator.f();
5420
5430
  }
5421
5431
 
5422
- promises = (0, _map.default)(toRemove).call(toRemove, this.unPinWithName);
5432
+ promises = (0, _map.default)(toRemove).call(toRemove, _this.unPinWithName);
5423
5433
  return _context6.abrupt("return", _promise.default.all(promises));
5424
5434
 
5425
5435
  case 8:
@@ -7805,7 +7815,7 @@ var ParseCLP = /*#__PURE__*/function () {
7805
7815
  _step;
7806
7816
 
7807
7817
  try {
7808
- var _loop = function () {
7818
+ var _loop = function _loop() {
7809
7819
  var _step$value = (0, _slicedToArray2.default)(_step.value, 2),
7810
7820
  operation = _step$value[0],
7811
7821
  group = _step$value[1];
@@ -7936,7 +7946,7 @@ var ParseCLP = /*#__PURE__*/function () {
7936
7946
 
7937
7947
  (0, _createClass2.default)(ParseCLP, [{
7938
7948
  key: "toJSON",
7939
- value: function ()
7949
+ value: function toJSON()
7940
7950
  /*: PermissionsMap*/
7941
7951
  {
7942
7952
  return _objectSpread({}, this.permissionsMap);
@@ -7950,7 +7960,7 @@ var ParseCLP = /*#__PURE__*/function () {
7950
7960
 
7951
7961
  }, {
7952
7962
  key: "equals",
7953
- value: function (other
7963
+ value: function equals(other
7954
7964
  /*: ParseCLP*/
7955
7965
  )
7956
7966
  /*: boolean*/
@@ -7993,7 +8003,7 @@ var ParseCLP = /*#__PURE__*/function () {
7993
8003
  }
7994
8004
  }, {
7995
8005
  key: "_getRoleName",
7996
- value: function (role
8006
+ value: function _getRoleName(role
7997
8007
  /*: ParseRole | string*/
7998
8008
  )
7999
8009
  /*: string*/
@@ -8013,7 +8023,7 @@ var ParseCLP = /*#__PURE__*/function () {
8013
8023
  }
8014
8024
  }, {
8015
8025
  key: "_parseEntity",
8016
- value: function (entity
8026
+ value: function _parseEntity(entity
8017
8027
  /*: Entity*/
8018
8028
  ) {
8019
8029
  var userId = entity;
@@ -8036,7 +8046,7 @@ var ParseCLP = /*#__PURE__*/function () {
8036
8046
  }
8037
8047
  }, {
8038
8048
  key: "_setAccess",
8039
- value: function (permission
8049
+ value: function _setAccess(permission
8040
8050
  /*: string*/
8041
8051
  , userId
8042
8052
  /*: Entity*/
@@ -8068,7 +8078,7 @@ var ParseCLP = /*#__PURE__*/function () {
8068
8078
  }
8069
8079
  }, {
8070
8080
  key: "_getAccess",
8071
- value: function (permission
8081
+ value: function _getAccess(permission
8072
8082
  /*: string*/
8073
8083
  , userId
8074
8084
  /*: Entity*/
@@ -8091,7 +8101,7 @@ var ParseCLP = /*#__PURE__*/function () {
8091
8101
  }
8092
8102
  }, {
8093
8103
  key: "_setArrayAccess",
8094
- value: function (permission
8104
+ value: function _setArrayAccess(permission
8095
8105
  /*: string*/
8096
8106
  , userId
8097
8107
  /*: Entity*/
@@ -8117,7 +8127,7 @@ var ParseCLP = /*#__PURE__*/function () {
8117
8127
  }
8118
8128
  }, {
8119
8129
  key: "_setGroupPointerPermission",
8120
- value: function (operation
8130
+ value: function _setGroupPointerPermission(operation
8121
8131
  /*: string*/
8122
8132
  , pointerFields
8123
8133
  /*: string[]*/
@@ -8140,7 +8150,7 @@ var ParseCLP = /*#__PURE__*/function () {
8140
8150
  }
8141
8151
  }, {
8142
8152
  key: "_getGroupPointerPermissions",
8143
- value: function (operation
8153
+ value: function _getGroupPointerPermissions(operation
8144
8154
  /*: string*/
8145
8155
  )
8146
8156
  /*: string[]*/
@@ -8155,7 +8165,7 @@ var ParseCLP = /*#__PURE__*/function () {
8155
8165
 
8156
8166
  }, {
8157
8167
  key: "setReadUserFields",
8158
- value: function (pointerFields
8168
+ value: function setReadUserFields(pointerFields
8159
8169
  /*: string[]*/
8160
8170
  ) {
8161
8171
  this._setGroupPointerPermission('readUserFields', pointerFields);
@@ -8166,7 +8176,7 @@ var ParseCLP = /*#__PURE__*/function () {
8166
8176
 
8167
8177
  }, {
8168
8178
  key: "getReadUserFields",
8169
- value: function ()
8179
+ value: function getReadUserFields()
8170
8180
  /*: string[]*/
8171
8181
  {
8172
8182
  return this._getGroupPointerPermissions('readUserFields');
@@ -8179,7 +8189,7 @@ var ParseCLP = /*#__PURE__*/function () {
8179
8189
 
8180
8190
  }, {
8181
8191
  key: "setWriteUserFields",
8182
- value: function (pointerFields
8192
+ value: function setWriteUserFields(pointerFields
8183
8193
  /*: string[]*/
8184
8194
  ) {
8185
8195
  this._setGroupPointerPermission('writeUserFields', pointerFields);
@@ -8190,7 +8200,7 @@ var ParseCLP = /*#__PURE__*/function () {
8190
8200
 
8191
8201
  }, {
8192
8202
  key: "getWriteUserFields",
8193
- value: function ()
8203
+ value: function getWriteUserFields()
8194
8204
  /*: string[]*/
8195
8205
  {
8196
8206
  return this._getGroupPointerPermissions('writeUserFields');
@@ -8204,7 +8214,7 @@ var ParseCLP = /*#__PURE__*/function () {
8204
8214
 
8205
8215
  }, {
8206
8216
  key: "setProtectedFields",
8207
- value: function (userId
8217
+ value: function setProtectedFields(userId
8208
8218
  /*: Entity*/
8209
8219
  , fields
8210
8220
  /*: string[]*/
@@ -8220,7 +8230,7 @@ var ParseCLP = /*#__PURE__*/function () {
8220
8230
 
8221
8231
  }, {
8222
8232
  key: "getProtectedFields",
8223
- value: function (userId
8233
+ value: function getProtectedFields(userId
8224
8234
  /*: Entity*/
8225
8235
  )
8226
8236
  /*: string[]*/
@@ -8236,7 +8246,7 @@ var ParseCLP = /*#__PURE__*/function () {
8236
8246
 
8237
8247
  }, {
8238
8248
  key: "setReadAccess",
8239
- value: function (userId
8249
+ value: function setReadAccess(userId
8240
8250
  /*: Entity*/
8241
8251
  , allowed
8242
8252
  /*: boolean*/
@@ -8259,7 +8269,7 @@ var ParseCLP = /*#__PURE__*/function () {
8259
8269
 
8260
8270
  }, {
8261
8271
  key: "getReadAccess",
8262
- value: function (userId
8272
+ value: function getReadAccess(userId
8263
8273
  /*: Entity*/
8264
8274
  )
8265
8275
  /*: boolean*/
@@ -8275,7 +8285,7 @@ var ParseCLP = /*#__PURE__*/function () {
8275
8285
 
8276
8286
  }, {
8277
8287
  key: "setWriteAccess",
8278
- value: function (userId
8288
+ value: function setWriteAccess(userId
8279
8289
  /*: Entity*/
8280
8290
  , allowed
8281
8291
  /*: boolean*/
@@ -8300,7 +8310,7 @@ var ParseCLP = /*#__PURE__*/function () {
8300
8310
 
8301
8311
  }, {
8302
8312
  key: "getWriteAccess",
8303
- value: function (userId
8313
+ value: function getWriteAccess(userId
8304
8314
  /*: Entity*/
8305
8315
  )
8306
8316
  /*: boolean*/
@@ -8315,7 +8325,7 @@ var ParseCLP = /*#__PURE__*/function () {
8315
8325
 
8316
8326
  }, {
8317
8327
  key: "setPublicReadAccess",
8318
- value: function (allowed
8328
+ value: function setPublicReadAccess(allowed
8319
8329
  /*: boolean*/
8320
8330
  ) {
8321
8331
  this.setReadAccess(PUBLIC_KEY, allowed);
@@ -8328,7 +8338,7 @@ var ParseCLP = /*#__PURE__*/function () {
8328
8338
 
8329
8339
  }, {
8330
8340
  key: "getPublicReadAccess",
8331
- value: function ()
8341
+ value: function getPublicReadAccess()
8332
8342
  /*: boolean*/
8333
8343
  {
8334
8344
  return this.getReadAccess(PUBLIC_KEY);
@@ -8341,7 +8351,7 @@ var ParseCLP = /*#__PURE__*/function () {
8341
8351
 
8342
8352
  }, {
8343
8353
  key: "setPublicWriteAccess",
8344
- value: function (allowed
8354
+ value: function setPublicWriteAccess(allowed
8345
8355
  /*: boolean*/
8346
8356
  ) {
8347
8357
  this.setWriteAccess(PUBLIC_KEY, allowed);
@@ -8354,7 +8364,7 @@ var ParseCLP = /*#__PURE__*/function () {
8354
8364
 
8355
8365
  }, {
8356
8366
  key: "getPublicWriteAccess",
8357
- value: function ()
8367
+ value: function getPublicWriteAccess()
8358
8368
  /*: boolean*/
8359
8369
  {
8360
8370
  return this.getWriteAccess(PUBLIC_KEY);
@@ -8367,7 +8377,7 @@ var ParseCLP = /*#__PURE__*/function () {
8367
8377
 
8368
8378
  }, {
8369
8379
  key: "setPublicProtectedFields",
8370
- value: function (fields
8380
+ value: function setPublicProtectedFields(fields
8371
8381
  /*: string[]*/
8372
8382
  ) {
8373
8383
  this.setProtectedFields(PUBLIC_KEY, fields);
@@ -8380,7 +8390,7 @@ var ParseCLP = /*#__PURE__*/function () {
8380
8390
 
8381
8391
  }, {
8382
8392
  key: "getPublicProtectedFields",
8383
- value: function ()
8393
+ value: function getPublicProtectedFields()
8384
8394
  /*: string[]*/
8385
8395
  {
8386
8396
  return this.getProtectedFields(PUBLIC_KEY);
@@ -8397,7 +8407,7 @@ var ParseCLP = /*#__PURE__*/function () {
8397
8407
 
8398
8408
  }, {
8399
8409
  key: "getRoleReadAccess",
8400
- value: function (role
8410
+ value: function getRoleReadAccess(role
8401
8411
  /*: ParseRole | string*/
8402
8412
  )
8403
8413
  /*: boolean*/
@@ -8416,7 +8426,7 @@ var ParseCLP = /*#__PURE__*/function () {
8416
8426
 
8417
8427
  }, {
8418
8428
  key: "getRoleWriteAccess",
8419
- value: function (role
8429
+ value: function getRoleWriteAccess(role
8420
8430
  /*: ParseRole | string*/
8421
8431
  )
8422
8432
  /*: boolean*/
@@ -8434,7 +8444,7 @@ var ParseCLP = /*#__PURE__*/function () {
8434
8444
 
8435
8445
  }, {
8436
8446
  key: "setRoleReadAccess",
8437
- value: function (role
8447
+ value: function setRoleReadAccess(role
8438
8448
  /*: ParseRole | string*/
8439
8449
  , allowed
8440
8450
  /*: boolean*/
@@ -8452,7 +8462,7 @@ var ParseCLP = /*#__PURE__*/function () {
8452
8462
 
8453
8463
  }, {
8454
8464
  key: "setRoleWriteAccess",
8455
- value: function (role
8465
+ value: function setRoleWriteAccess(role
8456
8466
  /*: ParseRole | string*/
8457
8467
  , allowed
8458
8468
  /*: boolean*/
@@ -8471,7 +8481,7 @@ var ParseCLP = /*#__PURE__*/function () {
8471
8481
 
8472
8482
  }, {
8473
8483
  key: "getRoleProtectedFields",
8474
- value: function (role
8484
+ value: function getRoleProtectedFields(role
8475
8485
  /*: ParseRole | string*/
8476
8486
  )
8477
8487
  /*: string[]*/
@@ -8489,7 +8499,7 @@ var ParseCLP = /*#__PURE__*/function () {
8489
8499
 
8490
8500
  }, {
8491
8501
  key: "setRoleProtectedFields",
8492
- value: function (role
8502
+ value: function setRoleProtectedFields(role
8493
8503
  /*: ParseRole | string*/
8494
8504
  , fields
8495
8505
  /*: string[]*/
@@ -10043,6 +10053,7 @@ var ParseFile = /*#__PURE__*/function () {
10043
10053
 
10044
10054
  var base64 = (0, _slice.default)(_context = data.base64.split(',')).call(_context, -1)[0];
10045
10055
  var dataType = specifiedType || (0, _slice.default)(_context2 = (0, _slice.default)(_context3 = data.base64.split(';')).call(_context3, 0, 1)[0].split(':')).call(_context2, 1, 2)[0] || 'text/plain';
10056
+ this._data = base64;
10046
10057
  this._source = {
10047
10058
  format: 'base64',
10048
10059
  base64: base64,
@@ -10066,6 +10077,8 @@ var ParseFile = /*#__PURE__*/function () {
10066
10077
  key: "getData",
10067
10078
  value: function () {
10068
10079
  var _getData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10080
+ var _this = this;
10081
+
10069
10082
  var options, controller, result;
10070
10083
  return _regeneratorRuntime().wrap(function (_context4) {
10071
10084
  while (1) {
@@ -10089,7 +10102,7 @@ var ParseFile = /*#__PURE__*/function () {
10089
10102
  case 4:
10090
10103
  options = {
10091
10104
  requestTask: function (task) {
10092
- return this._requestTask = task;
10105
+ return _this._requestTask = task;
10093
10106
  }
10094
10107
  };
10095
10108
  controller = _CoreManager.default.getFileController();
@@ -10109,9 +10122,11 @@ var ParseFile = /*#__PURE__*/function () {
10109
10122
  }, _callee, this);
10110
10123
  }));
10111
10124
 
10112
- return function () {
10125
+ function getData() {
10113
10126
  return _getData.apply(this, arguments);
10114
- };
10127
+ }
10128
+
10129
+ return getData;
10115
10130
  }()
10116
10131
  /**
10117
10132
  * Gets the name of the file. Before save is called, this is the filename
@@ -10356,11 +10371,13 @@ var ParseFile = /*#__PURE__*/function () {
10356
10371
  value: function (metadata
10357
10372
  /*: any*/
10358
10373
  ) {
10374
+ var _this4 = this;
10375
+
10359
10376
  if (metadata && (0, _typeof2.default)(metadata) === 'object') {
10360
10377
  var _context5;
10361
10378
 
10362
10379
  (0, _forEach.default)(_context5 = (0, _keys.default)(metadata)).call(_context5, function (key) {
10363
- this.addMetadata(key, metadata[key]);
10380
+ _this4.addMetadata(key, metadata[key]);
10364
10381
  });
10365
10382
  }
10366
10383
  }
@@ -10393,11 +10410,13 @@ var ParseFile = /*#__PURE__*/function () {
10393
10410
  value: function (tags
10394
10411
  /*: any*/
10395
10412
  ) {
10413
+ var _this5 = this;
10414
+
10396
10415
  if (tags && (0, _typeof2.default)(tags) === 'object') {
10397
10416
  var _context6;
10398
10417
 
10399
10418
  (0, _forEach.default)(_context6 = (0, _keys.default)(tags)).call(_context6, function (key) {
10400
- this.addTag(key, tags[key]);
10419
+ _this5.addTag(key, tags[key]);
10401
10420
  });
10402
10421
  }
10403
10422
  }
@@ -10468,7 +10487,7 @@ var DefaultController = {
10468
10487
  ) {
10469
10488
  var base64Data, _base64Data$split, _base64Data$split2, first, second, data, newSource;
10470
10489
 
10471
- return _regeneratorRuntime().wrap(function (_context7) {
10490
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
10472
10491
  while (1) {
10473
10492
  switch (_context7.prev = _context7.next) {
10474
10493
  case 0:
@@ -10523,11 +10542,13 @@ var DefaultController = {
10523
10542
  }, _callee2);
10524
10543
  }));
10525
10544
 
10526
- return function () {
10545
+ function saveFile(_x, _x2, _x3) {
10527
10546
  return _saveFile.apply(this, arguments);
10528
- };
10547
+ }
10548
+
10549
+ return saveFile;
10529
10550
  }(),
10530
- saveBase64: function (name
10551
+ saveBase64: function saveBase64(name
10531
10552
  /*: string*/
10532
10553
  , source
10533
10554
  /*: FileSource*/
@@ -10554,16 +10575,17 @@ var DefaultController = {
10554
10575
  data._ContentType = source.type;
10555
10576
  }
10556
10577
 
10557
- return _CoreManager.default.getRESTController().request('POST', 'files/' + name, data, options);
10578
+ var path = 'files/' + name;
10579
+ return _CoreManager.default.getRESTController().request('POST', path, data, options);
10558
10580
  },
10559
- download: function (uri, options) {
10581
+ download: function download(uri, options) {
10560
10582
  if (XHR) {
10561
10583
  return this.downloadAjax(uri, options);
10562
10584
  } else {
10563
10585
  return _promise.default.reject('Cannot make a request: No definition of XMLHttpRequest was found.');
10564
10586
  }
10565
10587
  },
10566
- downloadAjax: function (uri, options) {
10588
+ downloadAjax: function downloadAjax(uri, options) {
10567
10589
  return new _promise.default(function (resolve, reject) {
10568
10590
  var xhr = new XHR();
10569
10591
  xhr.open('GET', uri, true);
@@ -10593,7 +10615,7 @@ var DefaultController = {
10593
10615
  xhr.send();
10594
10616
  });
10595
10617
  },
10596
- deleteFile: function (name
10618
+ deleteFile: function deleteFile(name
10597
10619
  /*: string*/
10598
10620
  , options
10599
10621
  /*:: ?: FullOptions*/
@@ -10622,12 +10644,12 @@ var DefaultController = {
10622
10644
  }
10623
10645
  });
10624
10646
  },
10625
- _setXHR: function (xhr
10647
+ _setXHR: function _setXHR(xhr
10626
10648
  /*: any*/
10627
10649
  ) {
10628
10650
  XHR = xhr;
10629
10651
  },
10630
- _getXHR: function () {
10652
+ _getXHR: function _getXHR() {
10631
10653
  return XHR;
10632
10654
  }
10633
10655
  };
@@ -11446,7 +11468,7 @@ var LiveQuery = new _EventEmitter.default();
11446
11468
 
11447
11469
  LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11448
11470
  var liveQueryClient;
11449
- return _regeneratorRuntime().wrap(function (_context) {
11471
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11450
11472
  while (1) {
11451
11473
  switch (_context.prev = _context.next) {
11452
11474
  case 0:
@@ -11474,7 +11496,7 @@ LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_reg
11474
11496
 
11475
11497
  LiveQuery.close = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11476
11498
  var liveQueryClient;
11477
- return _regeneratorRuntime().wrap(function (_context2) {
11499
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11478
11500
  while (1) {
11479
11501
  switch (_context2.prev = _context2.next) {
11480
11502
  case 0:
@@ -11498,18 +11520,18 @@ var _default = LiveQuery;
11498
11520
  exports.default = _default;
11499
11521
  var defaultLiveQueryClient;
11500
11522
  var DefaultLiveQueryController = {
11501
- setDefaultLiveQueryClient: function (liveQueryClient
11523
+ setDefaultLiveQueryClient: function setDefaultLiveQueryClient(liveQueryClient
11502
11524
  /*: LiveQueryClient*/
11503
11525
  ) {
11504
11526
  defaultLiveQueryClient = liveQueryClient;
11505
11527
  },
11506
- getDefaultLiveQueryClient: function ()
11528
+ getDefaultLiveQueryClient: function getDefaultLiveQueryClient()
11507
11529
  /*: Promise<LiveQueryClient>*/
11508
11530
  {
11509
11531
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
11510
11532
  var _yield$Promise$all, _yield$Promise$all2, currentUser, installationId, sessionToken, liveQueryServerURL, serverURL, protocol, host, applicationId, javascriptKey, masterKey;
11511
11533
 
11512
- return _regeneratorRuntime().wrap(function (_context3) {
11534
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11513
11535
  while (1) {
11514
11536
  switch (_context3.prev = _context3.next) {
11515
11537
  case 0:
@@ -11580,7 +11602,7 @@ var DefaultLiveQueryController = {
11580
11602
  }, _callee3);
11581
11603
  }))();
11582
11604
  },
11583
- _clearCachedDefaultClient: function () {
11605
+ _clearCachedDefaultClient: function _clearCachedDefaultClient() {
11584
11606
  defaultLiveQueryClient = null;
11585
11607
  }
11586
11608
  };
@@ -13529,7 +13551,7 @@ var ParseObject = /*#__PURE__*/function () {
13529
13551
  /*:: ?: RequestOptions*/
13530
13552
  ) {
13531
13553
  var query;
13532
- return _regeneratorRuntime().wrap(function (_context) {
13554
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
13533
13555
  while (1) {
13534
13556
  switch (_context.prev = _context.next) {
13535
13557
  case 0:
@@ -13571,9 +13593,11 @@ var ParseObject = /*#__PURE__*/function () {
13571
13593
  }, _callee, this, [[2, 9]]);
13572
13594
  }));
13573
13595
 
13574
- return function () {
13596
+ function exists(_x) {
13575
13597
  return _exists.apply(this, arguments);
13576
- };
13598
+ }
13599
+
13600
+ return exists;
13577
13601
  }()
13578
13602
  /**
13579
13603
  * Checks if the model is currently in a valid state.
@@ -13583,7 +13607,7 @@ var ParseObject = /*#__PURE__*/function () {
13583
13607
 
13584
13608
  }, {
13585
13609
  key: "isValid",
13586
- value: function ()
13610
+ value: function isValid()
13587
13611
  /*: boolean*/
13588
13612
  {
13589
13613
  return !this.validate(this.attributes);
@@ -13601,7 +13625,7 @@ var ParseObject = /*#__PURE__*/function () {
13601
13625
 
13602
13626
  }, {
13603
13627
  key: "validate",
13604
- value: function (attrs
13628
+ value: function validate(attrs
13605
13629
  /*: AttributeMap*/
13606
13630
  )
13607
13631
  /*: ParseError | boolean*/
@@ -13627,7 +13651,7 @@ var ParseObject = /*#__PURE__*/function () {
13627
13651
 
13628
13652
  }, {
13629
13653
  key: "getACL",
13630
- value: function ()
13654
+ value: function getACL()
13631
13655
  /*: ?ParseACL*/
13632
13656
  {
13633
13657
  var acl = this.get('ACL');
@@ -13649,7 +13673,7 @@ var ParseObject = /*#__PURE__*/function () {
13649
13673
 
13650
13674
  }, {
13651
13675
  key: "setACL",
13652
- value: function (acl
13676
+ value: function setACL(acl
13653
13677
  /*: ParseACL*/
13654
13678
  , options
13655
13679
  /*:: ?: mixed*/
@@ -13666,7 +13690,7 @@ var ParseObject = /*#__PURE__*/function () {
13666
13690
 
13667
13691
  }, {
13668
13692
  key: "revert",
13669
- value: function ()
13693
+ value: function revert()
13670
13694
  /*: void*/
13671
13695
  {
13672
13696
  var keysToRevert;
@@ -13708,7 +13732,7 @@ var ParseObject = /*#__PURE__*/function () {
13708
13732
 
13709
13733
  }, {
13710
13734
  key: "clear",
13711
- value: function ()
13735
+ value: function clear()
13712
13736
  /*: ParseObject | boolean*/
13713
13737
  {
13714
13738
  var attributes = this.attributes;
@@ -13749,7 +13773,7 @@ var ParseObject = /*#__PURE__*/function () {
13749
13773
 
13750
13774
  }, {
13751
13775
  key: "fetch",
13752
- value: function (options
13776
+ value: function fetch(options
13753
13777
  /*: RequestOptions*/
13754
13778
  )
13755
13779
  /*: Promise*/
@@ -13814,7 +13838,7 @@ var ParseObject = /*#__PURE__*/function () {
13814
13838
 
13815
13839
  }, {
13816
13840
  key: "fetchWithInclude",
13817
- value: function (keys
13841
+ value: function fetchWithInclude(keys
13818
13842
  /*: String | Array<string | Array<string>>*/
13819
13843
  , options
13820
13844
  /*: RequestOptions*/
@@ -13856,7 +13880,7 @@ var ParseObject = /*#__PURE__*/function () {
13856
13880
  var _saveEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options
13857
13881
  /*: SaveOptions*/
13858
13882
  ) {
13859
- return _regeneratorRuntime().wrap(function (_context4) {
13883
+ return _regeneratorRuntime().wrap(function _callee2$(_context4) {
13860
13884
  while (1) {
13861
13885
  switch (_context4.prev = _context4.next) {
13862
13886
  case 0:
@@ -13894,9 +13918,11 @@ var ParseObject = /*#__PURE__*/function () {
13894
13918
  }, _callee2, this, [[0, 5]]);
13895
13919
  }));
13896
13920
 
13897
- return function () {
13921
+ function saveEventually(_x2) {
13898
13922
  return _saveEventually.apply(this, arguments);
13899
- };
13923
+ }
13924
+
13925
+ return saveEventually;
13900
13926
  }()
13901
13927
  /**
13902
13928
  * Set a hash of model attributes, and save the model to the server.
@@ -13964,7 +13990,7 @@ var ParseObject = /*#__PURE__*/function () {
13964
13990
 
13965
13991
  }, {
13966
13992
  key: "save",
13967
- value: function (arg1
13993
+ value: function save(arg1
13968
13994
  /*: ?string | { [attr: string]: mixed }*/
13969
13995
  , arg2
13970
13996
  /*: SaveOptions | mixed*/
@@ -13973,6 +13999,8 @@ var ParseObject = /*#__PURE__*/function () {
13973
13999
  )
13974
14000
  /*: Promise*/
13975
14001
  {
14002
+ var _this = this;
14003
+
13976
14004
  var attrs;
13977
14005
  var options;
13978
14006
 
@@ -14021,7 +14049,7 @@ var ParseObject = /*#__PURE__*/function () {
14021
14049
 
14022
14050
  var unsaved = options.cascadeSave !== false ? (0, _unsavedChildren.default)(this) : null;
14023
14051
  return controller.save(unsaved, saveOptions).then(function () {
14024
- return controller.save(this, saveOptions);
14052
+ return controller.save(_this, saveOptions);
14025
14053
  });
14026
14054
  }
14027
14055
  /**
@@ -14053,7 +14081,7 @@ var ParseObject = /*#__PURE__*/function () {
14053
14081
  var _destroyEventually = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(options
14054
14082
  /*: RequestOptions*/
14055
14083
  ) {
14056
- return _regeneratorRuntime().wrap(function (_context5) {
14084
+ return _regeneratorRuntime().wrap(function _callee3$(_context5) {
14057
14085
  while (1) {
14058
14086
  switch (_context5.prev = _context5.next) {
14059
14087
  case 0:
@@ -14091,9 +14119,11 @@ var ParseObject = /*#__PURE__*/function () {
14091
14119
  }, _callee3, this, [[0, 5]]);
14092
14120
  }));
14093
14121
 
14094
- return function () {
14122
+ function destroyEventually(_x3) {
14095
14123
  return _destroyEventually.apply(this, arguments);
14096
- };
14124
+ }
14125
+
14126
+ return destroyEventually;
14097
14127
  }()
14098
14128
  /**
14099
14129
  * Destroy this model on the server if it was already persisted.
@@ -14112,7 +14142,7 @@ var ParseObject = /*#__PURE__*/function () {
14112
14142
 
14113
14143
  }, {
14114
14144
  key: "destroy",
14115
- value: function (options
14145
+ value: function destroy(options
14116
14146
  /*: RequestOptions*/
14117
14147
  )
14118
14148
  /*: Promise*/
@@ -14157,7 +14187,7 @@ var ParseObject = /*#__PURE__*/function () {
14157
14187
 
14158
14188
  }, {
14159
14189
  key: "pin",
14160
- value: function ()
14190
+ value: function pin()
14161
14191
  /*: Promise<void>*/
14162
14192
  {
14163
14193
  return ParseObject.pinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14175,7 +14205,7 @@ var ParseObject = /*#__PURE__*/function () {
14175
14205
 
14176
14206
  }, {
14177
14207
  key: "unPin",
14178
- value: function ()
14208
+ value: function unPin()
14179
14209
  /*: Promise<void>*/
14180
14210
  {
14181
14211
  return ParseObject.unPinAllWithName(_LocalDatastoreUtils.DEFAULT_PIN, [this]);
@@ -14195,7 +14225,7 @@ var ParseObject = /*#__PURE__*/function () {
14195
14225
  value: function () {
14196
14226
  var _isPinned = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
14197
14227
  var localDatastore, objectKey, pin;
14198
- return _regeneratorRuntime().wrap(function (_context6) {
14228
+ return _regeneratorRuntime().wrap(function _callee4$(_context6) {
14199
14229
  while (1) {
14200
14230
  switch (_context6.prev = _context6.next) {
14201
14231
  case 0:
@@ -14225,9 +14255,11 @@ var ParseObject = /*#__PURE__*/function () {
14225
14255
  }, _callee4, this);
14226
14256
  }));
14227
14257
 
14228
- return function () {
14258
+ function isPinned() {
14229
14259
  return _isPinned.apply(this, arguments);
14230
- };
14260
+ }
14261
+
14262
+ return isPinned;
14231
14263
  }()
14232
14264
  /**
14233
14265
  * Asynchronously stores the objects and every object they point to in the local datastore, recursively.
@@ -14248,7 +14280,7 @@ var ParseObject = /*#__PURE__*/function () {
14248
14280
 
14249
14281
  }, {
14250
14282
  key: "pinWithName",
14251
- value: function (name
14283
+ value: function pinWithName(name
14252
14284
  /*: string*/
14253
14285
  )
14254
14286
  /*: Promise<void>*/
@@ -14268,7 +14300,7 @@ var ParseObject = /*#__PURE__*/function () {
14268
14300
 
14269
14301
  }, {
14270
14302
  key: "unPinWithName",
14271
- value: function (name
14303
+ value: function unPinWithName(name
14272
14304
  /*: string*/
14273
14305
  )
14274
14306
  /*: Promise<void>*/
@@ -14293,7 +14325,7 @@ var ParseObject = /*#__PURE__*/function () {
14293
14325
  value: function () {
14294
14326
  var _fetchFromLocalDatastore = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
14295
14327
  var localDatastore, objectKey, pinned, result;
14296
- return _regeneratorRuntime().wrap(function (_context7) {
14328
+ return _regeneratorRuntime().wrap(function _callee5$(_context7) {
14297
14329
  while (1) {
14298
14330
  switch (_context7.prev = _context7.next) {
14299
14331
  case 0:
@@ -14336,20 +14368,22 @@ var ParseObject = /*#__PURE__*/function () {
14336
14368
  }, _callee5, this);
14337
14369
  }));
14338
14370
 
14339
- return function () {
14371
+ function fetchFromLocalDatastore() {
14340
14372
  return _fetchFromLocalDatastore.apply(this, arguments);
14341
- };
14373
+ }
14374
+
14375
+ return fetchFromLocalDatastore;
14342
14376
  }()
14343
14377
  /** Static methods **/
14344
14378
 
14345
14379
  }], [{
14346
14380
  key: "_getClassMap",
14347
- value: function () {
14381
+ value: function _getClassMap() {
14348
14382
  return classMap;
14349
14383
  }
14350
14384
  }, {
14351
14385
  key: "_clearAllState",
14352
- value: function () {
14386
+ value: function _clearAllState() {
14353
14387
  var stateController = _CoreManager.default.getObjectStateController();
14354
14388
 
14355
14389
  stateController.clearAllState();
@@ -14383,7 +14417,7 @@ var ParseObject = /*#__PURE__*/function () {
14383
14417
 
14384
14418
  }, {
14385
14419
  key: "fetchAll",
14386
- value: function (list
14420
+ value: function fetchAll(list
14387
14421
  /*: Array<ParseObject>*/
14388
14422
  ) {
14389
14423
  var options
@@ -14437,7 +14471,7 @@ var ParseObject = /*#__PURE__*/function () {
14437
14471
 
14438
14472
  }, {
14439
14473
  key: "fetchAllWithInclude",
14440
- value: function (list
14474
+ value: function fetchAllWithInclude(list
14441
14475
  /*: Array<ParseObject>*/
14442
14476
  , keys
14443
14477
  /*: String | Array<string | Array<string>>*/
@@ -14481,7 +14515,7 @@ var ParseObject = /*#__PURE__*/function () {
14481
14515
 
14482
14516
  }, {
14483
14517
  key: "fetchAllIfNeededWithInclude",
14484
- value: function (list
14518
+ value: function fetchAllIfNeededWithInclude(list
14485
14519
  /*: Array<ParseObject>*/
14486
14520
  , keys
14487
14521
  /*: String | Array<string | Array<string>>*/
@@ -14513,7 +14547,7 @@ var ParseObject = /*#__PURE__*/function () {
14513
14547
 
14514
14548
  }, {
14515
14549
  key: "fetchAllIfNeeded",
14516
- value: function (list
14550
+ value: function fetchAllIfNeeded(list
14517
14551
  /*: Array<ParseObject>*/
14518
14552
  , options) {
14519
14553
  options = options || {};
@@ -14535,7 +14569,7 @@ var ParseObject = /*#__PURE__*/function () {
14535
14569
  }
14536
14570
  }, {
14537
14571
  key: "handleIncludeOptions",
14538
- value: function (options) {
14572
+ value: function handleIncludeOptions(options) {
14539
14573
  var include = [];
14540
14574
 
14541
14575
  if ((0, _isArray.default)(options.include)) {
@@ -14603,7 +14637,7 @@ var ParseObject = /*#__PURE__*/function () {
14603
14637
 
14604
14638
  }, {
14605
14639
  key: "destroyAll",
14606
- value: function (list
14640
+ value: function destroyAll(list
14607
14641
  /*: Array<ParseObject>*/
14608
14642
  ) {
14609
14643
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -14648,7 +14682,7 @@ var ParseObject = /*#__PURE__*/function () {
14648
14682
 
14649
14683
  }, {
14650
14684
  key: "saveAll",
14651
- value: function (list
14685
+ value: function saveAll(list
14652
14686
  /*: Array<ParseObject>*/
14653
14687
  ) {
14654
14688
  var options
@@ -14691,7 +14725,7 @@ var ParseObject = /*#__PURE__*/function () {
14691
14725
 
14692
14726
  }, {
14693
14727
  key: "createWithoutData",
14694
- value: function (id
14728
+ value: function createWithoutData(id
14695
14729
  /*: string*/
14696
14730
  ) {
14697
14731
  var obj = new this();
@@ -14711,7 +14745,7 @@ var ParseObject = /*#__PURE__*/function () {
14711
14745
 
14712
14746
  }, {
14713
14747
  key: "fromJSON",
14714
- value: function (json
14748
+ value: function fromJSON(json
14715
14749
  /*: any*/
14716
14750
  , override
14717
14751
  /*:: ?: boolean*/
@@ -14775,7 +14809,7 @@ var ParseObject = /*#__PURE__*/function () {
14775
14809
 
14776
14810
  }, {
14777
14811
  key: "registerSubclass",
14778
- value: function (className
14812
+ value: function registerSubclass(className
14779
14813
  /*: string*/
14780
14814
  , constructor
14781
14815
  /*: any*/
@@ -14806,7 +14840,7 @@ var ParseObject = /*#__PURE__*/function () {
14806
14840
 
14807
14841
  }, {
14808
14842
  key: "unregisterSubclass",
14809
- value: function (className
14843
+ value: function unregisterSubclass(className
14810
14844
  /*: string*/
14811
14845
  ) {
14812
14846
  if (typeof className !== 'string') {
@@ -14855,7 +14889,7 @@ var ParseObject = /*#__PURE__*/function () {
14855
14889
 
14856
14890
  }, {
14857
14891
  key: "extend",
14858
- value: function (className
14892
+ value: function extend(className
14859
14893
  /*: any*/
14860
14894
  , protoProps
14861
14895
  /*: any*/
@@ -14884,7 +14918,7 @@ var ParseObject = /*#__PURE__*/function () {
14884
14918
  parentProto = classMap[adjustedClassName].prototype;
14885
14919
  }
14886
14920
 
14887
- var ParseObjectSubclass = function (attributes, options) {
14921
+ var ParseObjectSubclass = function ParseObjectSubclass(attributes, options) {
14888
14922
  this.className = adjustedClassName;
14889
14923
  this._objCount = objectCount++; // Enable legacy initializers
14890
14924
 
@@ -14959,7 +14993,7 @@ var ParseObject = /*#__PURE__*/function () {
14959
14993
 
14960
14994
  }, {
14961
14995
  key: "enableSingleInstance",
14962
- value: function () {
14996
+ value: function enableSingleInstance() {
14963
14997
  singleInstance = true;
14964
14998
 
14965
14999
  _CoreManager.default.setObjectStateController(SingleInstanceStateController);
@@ -14975,7 +15009,7 @@ var ParseObject = /*#__PURE__*/function () {
14975
15009
 
14976
15010
  }, {
14977
15011
  key: "disableSingleInstance",
14978
- value: function () {
15012
+ value: function disableSingleInstance() {
14979
15013
  singleInstance = false;
14980
15014
 
14981
15015
  _CoreManager.default.setObjectStateController(UniqueInstanceStateController);
@@ -15001,7 +15035,7 @@ var ParseObject = /*#__PURE__*/function () {
15001
15035
 
15002
15036
  }, {
15003
15037
  key: "pinAll",
15004
- value: function (objects
15038
+ value: function pinAll(objects
15005
15039
  /*: Array<ParseObject>*/
15006
15040
  )
15007
15041
  /*: Promise<void>*/
@@ -15035,7 +15069,7 @@ var ParseObject = /*#__PURE__*/function () {
15035
15069
 
15036
15070
  }, {
15037
15071
  key: "pinAllWithName",
15038
- value: function (name
15072
+ value: function pinAllWithName(name
15039
15073
  /*: string*/
15040
15074
  , objects
15041
15075
  /*: Array<ParseObject>*/
@@ -15065,7 +15099,7 @@ var ParseObject = /*#__PURE__*/function () {
15065
15099
 
15066
15100
  }, {
15067
15101
  key: "unPinAll",
15068
- value: function (objects
15102
+ value: function unPinAll(objects
15069
15103
  /*: Array<ParseObject>*/
15070
15104
  )
15071
15105
  /*: Promise<void>*/
@@ -15093,7 +15127,7 @@ var ParseObject = /*#__PURE__*/function () {
15093
15127
 
15094
15128
  }, {
15095
15129
  key: "unPinAllWithName",
15096
- value: function (name
15130
+ value: function unPinAllWithName(name
15097
15131
  /*: string*/
15098
15132
  , objects
15099
15133
  /*: Array<ParseObject>*/
@@ -15121,7 +15155,7 @@ var ParseObject = /*#__PURE__*/function () {
15121
15155
 
15122
15156
  }, {
15123
15157
  key: "unPinAllObjects",
15124
- value: function ()
15158
+ value: function unPinAllObjects()
15125
15159
  /*: Promise<void>*/
15126
15160
  {
15127
15161
  var localDatastore = _CoreManager.default.getLocalDatastore();
@@ -15147,7 +15181,7 @@ var ParseObject = /*#__PURE__*/function () {
15147
15181
 
15148
15182
  }, {
15149
15183
  key: "unPinAllObjectsWithName",
15150
- value: function (name
15184
+ value: function unPinAllObjectsWithName(name
15151
15185
  /*: string*/
15152
15186
  )
15153
15187
  /*: Promise<void>*/
@@ -15165,7 +15199,7 @@ var ParseObject = /*#__PURE__*/function () {
15165
15199
  }();
15166
15200
 
15167
15201
  var DefaultController = {
15168
- fetch: function (target
15202
+ fetch: function fetch(target
15169
15203
  /*: ParseObject | Array<ParseObject>*/
15170
15204
  , forceFetch
15171
15205
  /*: boolean*/
@@ -15227,7 +15261,7 @@ var DefaultController = {
15227
15261
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(objects) {
15228
15262
  var idMap, i, obj, _i, _obj, id, _iterator2, _step2, object;
15229
15263
 
15230
- return _regeneratorRuntime().wrap(function (_context9) {
15264
+ return _regeneratorRuntime().wrap(function _callee6$(_context9) {
15231
15265
  while (1) {
15232
15266
  switch (_context9.prev = _context9.next) {
15233
15267
  case 0:
@@ -15325,7 +15359,7 @@ var DefaultController = {
15325
15359
  }, _callee6, null, [[13, 23, 26, 29]]);
15326
15360
  }));
15327
15361
 
15328
- return function () {
15362
+ return function (_x4) {
15329
15363
  return _ref.apply(this, arguments);
15330
15364
  };
15331
15365
  }());
@@ -15344,7 +15378,7 @@ var DefaultController = {
15344
15378
 
15345
15379
  return RESTController.request('GET', 'classes/' + target.className + '/' + target._getId(), params, options).then( /*#__PURE__*/function () {
15346
15380
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(response) {
15347
- return _regeneratorRuntime().wrap(function (_context10) {
15381
+ return _regeneratorRuntime().wrap(function _callee7$(_context10) {
15348
15382
  while (1) {
15349
15383
  switch (_context10.prev = _context10.next) {
15350
15384
  case 0:
@@ -15368,7 +15402,7 @@ var DefaultController = {
15368
15402
  }, _callee7);
15369
15403
  }));
15370
15404
 
15371
- return function () {
15405
+ return function (_x5) {
15372
15406
  return _ref2.apply(this, arguments);
15373
15407
  };
15374
15408
  }());
@@ -15376,7 +15410,7 @@ var DefaultController = {
15376
15410
 
15377
15411
  return _promise.default.resolve();
15378
15412
  },
15379
- destroy: function (target
15413
+ destroy: function destroy(target
15380
15414
  /*: ParseObject | Array<ParseObject>*/
15381
15415
  , options
15382
15416
  /*: RequestOptions*/
@@ -15385,7 +15419,7 @@ var DefaultController = {
15385
15419
  {
15386
15420
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
15387
15421
  var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
15388
- return _regeneratorRuntime().wrap(function (_context13) {
15422
+ return _regeneratorRuntime().wrap(function _callee10$(_context13) {
15389
15423
  while (1) {
15390
15424
  switch (_context13.prev = _context13.next) {
15391
15425
  case 0:
@@ -15450,7 +15484,7 @@ var DefaultController = {
15450
15484
  return _context13.abrupt("return", deleteCompleted.then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
15451
15485
  var aggregate, _iterator3, _step3, object;
15452
15486
 
15453
- return _regeneratorRuntime().wrap(function (_context11) {
15487
+ return _regeneratorRuntime().wrap(function _callee8$(_context11) {
15454
15488
  while (1) {
15455
15489
  switch (_context11.prev = _context11.next) {
15456
15490
  case 0:
@@ -15518,7 +15552,7 @@ var DefaultController = {
15518
15552
  }
15519
15553
 
15520
15554
  return _context13.abrupt("return", RESTController.request('DELETE', 'classes/' + target.className + '/' + target._getId(), {}, options).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
15521
- return _regeneratorRuntime().wrap(function (_context12) {
15555
+ return _regeneratorRuntime().wrap(function _callee9$(_context12) {
15522
15556
  while (1) {
15523
15557
  switch (_context12.prev = _context12.next) {
15524
15558
  case 0:
@@ -15547,7 +15581,7 @@ var DefaultController = {
15547
15581
  }, _callee10);
15548
15582
  }))();
15549
15583
  },
15550
- save: function (target
15584
+ save: function save(target
15551
15585
  /*: ParseObject | Array<ParseObject | ParseFile>*/
15552
15586
  , options
15553
15587
  /*: RequestOptions*/
@@ -15626,8 +15660,8 @@ var DefaultController = {
15626
15660
  (0, _forEach.default)(batch).call(batch, function (obj, index) {
15627
15661
  var ready = new _promiseUtils.resolvingPromise();
15628
15662
  batchReady.push(ready);
15629
- stateController.pushPendingState(obj._getStateIdentifier());
15630
- batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), function () {
15663
+
15664
+ var task = function task() {
15631
15665
  ready.resolve();
15632
15666
  return batchReturned.then(function (responses) {
15633
15667
  if (responses[index].hasOwnProperty('success')) {
@@ -15648,7 +15682,10 @@ var DefaultController = {
15648
15682
  obj._handleSaveError();
15649
15683
  }
15650
15684
  });
15651
- }));
15685
+ };
15686
+
15687
+ stateController.pushPendingState(obj._getStateIdentifier());
15688
+ batchTasks.push(stateController.enqueueTask(obj._getStateIdentifier(), task));
15652
15689
  });
15653
15690
  (0, _promiseUtils.when)(batchReady).then(function () {
15654
15691
  // Kick off the batch request
@@ -15667,7 +15704,7 @@ var DefaultController = {
15667
15704
  }).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
15668
15705
  var _iterator4, _step4, object;
15669
15706
 
15670
- return _regeneratorRuntime().wrap(function (_context14) {
15707
+ return _regeneratorRuntime().wrap(function _callee11$(_context14) {
15671
15708
  while (1) {
15672
15709
  switch (_context14.prev = _context14.next) {
15673
15710
  case 0:
@@ -15742,7 +15779,7 @@ var DefaultController = {
15742
15779
 
15743
15780
  var targetCopy = target;
15744
15781
 
15745
- var task = function () {
15782
+ var task = function task() {
15746
15783
  var params = targetCopy._getSaveParams();
15747
15784
 
15748
15785
  return RESTController.request(params.method, params.path, params.body, options).then(function (response) {
@@ -15759,7 +15796,7 @@ var DefaultController = {
15759
15796
 
15760
15797
  stateController.pushPendingState(target._getStateIdentifier());
15761
15798
  return stateController.enqueueTask(target._getStateIdentifier(), task).then( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
15762
- return _regeneratorRuntime().wrap(function (_context15) {
15799
+ return _regeneratorRuntime().wrap(function _callee12$(_context15) {
15763
15800
  while (1) {
15764
15801
  switch (_context15.prev = _context15.next) {
15765
15802
  case 0:
@@ -16576,10 +16613,12 @@ var RelationOp = /*#__PURE__*/function (_Op7) {
16576
16613
  value: function ()
16577
16614
  /*: { __op?: string, objects?: mixed, ops?: mixed }*/
16578
16615
  {
16616
+ var _this7 = this;
16617
+
16579
16618
  var idToPointer = function (id) {
16580
16619
  return {
16581
16620
  __type: 'Pointer',
16582
- className: this._targetClassName,
16621
+ className: _this7._targetClassName,
16583
16622
  objectId: id
16584
16623
  };
16585
16624
  };
@@ -17785,9 +17824,11 @@ var ParseQuery = /*#__PURE__*/function () {
17785
17824
  }, _callee, this);
17786
17825
  }));
17787
17826
 
17788
- return function () {
17827
+ function _handleOfflineQuery() {
17789
17828
  return _handleOfflineQuery2.apply(this, arguments);
17790
- };
17829
+ }
17830
+
17831
+ return _handleOfflineQuery;
17791
17832
  }()
17792
17833
  /**
17793
17834
  * Returns a JSON representation of this query.
@@ -18133,7 +18174,7 @@ var ParseQuery = /*#__PURE__*/function () {
18133
18174
  /*:: ?: BatchOptions*/
18134
18175
  ) {
18135
18176
  var result;
18136
- return _regeneratorRuntime().wrap(function (_context7) {
18177
+ return _regeneratorRuntime().wrap(function _callee2$(_context7) {
18137
18178
  while (1) {
18138
18179
  switch (_context7.prev = _context7.next) {
18139
18180
  case 0:
@@ -18160,9 +18201,11 @@ var ParseQuery = /*#__PURE__*/function () {
18160
18201
  }, _callee2, this);
18161
18202
  }));
18162
18203
 
18163
- return function () {
18204
+ function findAll(_x2) {
18164
18205
  return _findAll.apply(this, arguments);
18165
- };
18206
+ }
18207
+
18208
+ return findAll;
18166
18209
  }()
18167
18210
  /**
18168
18211
  * Counts the number of objects that match this query.
@@ -18181,7 +18224,7 @@ var ParseQuery = /*#__PURE__*/function () {
18181
18224
 
18182
18225
  }, {
18183
18226
  key: "count",
18184
- value: function (options
18227
+ value: function count(options
18185
18228
  /*:: ?: FullOptions*/
18186
18229
  )
18187
18230
  /*: Promise<number>*/
@@ -18223,7 +18266,7 @@ var ParseQuery = /*#__PURE__*/function () {
18223
18266
 
18224
18267
  }, {
18225
18268
  key: "distinct",
18226
- value: function (key
18269
+ value: function distinct(key
18227
18270
  /*: string*/
18228
18271
  , options
18229
18272
  /*:: ?: FullOptions*/
@@ -18265,7 +18308,7 @@ var ParseQuery = /*#__PURE__*/function () {
18265
18308
 
18266
18309
  }, {
18267
18310
  key: "aggregate",
18268
- value: function (pipeline
18311
+ value: function aggregate(pipeline
18269
18312
  /*: mixed*/
18270
18313
  , options
18271
18314
  /*:: ?: FullOptions*/
@@ -18328,11 +18371,13 @@ var ParseQuery = /*#__PURE__*/function () {
18328
18371
 
18329
18372
  }, {
18330
18373
  key: "first",
18331
- value: function (options
18374
+ value: function first(options
18332
18375
  /*:: ?: FullOptions*/
18333
18376
  )
18334
18377
  /*: Promise<ParseObject | void>*/
18335
18378
  {
18379
+ var _this4 = this;
18380
+
18336
18381
  options = options || {};
18337
18382
  var findOptions = {};
18338
18383
 
@@ -18374,7 +18419,7 @@ var ParseQuery = /*#__PURE__*/function () {
18374
18419
  }
18375
18420
 
18376
18421
  if (!objects[0].className) {
18377
- objects[0].className = this.className;
18422
+ objects[0].className = _this4.className;
18378
18423
  } // Make sure the data object contains keys for all objects that
18379
18424
  // have been requested with a select, so that our cached state
18380
18425
  // updates correctly.
@@ -18415,7 +18460,7 @@ var ParseQuery = /*#__PURE__*/function () {
18415
18460
 
18416
18461
  }, {
18417
18462
  key: "eachBatch",
18418
- value: function (callback
18463
+ value: function eachBatch(callback
18419
18464
  /*: (objs: Array<ParseObject>) => Promise<*>*/
18420
18465
  , options
18421
18466
  /*:: ?: BatchOptions*/
@@ -18427,7 +18472,8 @@ var ParseQuery = /*#__PURE__*/function () {
18427
18472
  options = options || {};
18428
18473
 
18429
18474
  if (this._order || this._skip || this._limit >= 0) {
18430
- return _promise.default.reject('Cannot iterate on a query with sort, skip, or limit.');
18475
+ var error = 'Cannot iterate on a query with sort, skip, or limit.';
18476
+ return _promise.default.reject(error);
18431
18477
  }
18432
18478
 
18433
18479
  var query = new ParseQuery(this.className);
@@ -18492,7 +18538,7 @@ var ParseQuery = /*#__PURE__*/function () {
18492
18538
  }, /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
18493
18539
  var _yield$Promise$all, _yield$Promise$all2, results;
18494
18540
 
18495
- return _regeneratorRuntime().wrap(function (_context10) {
18541
+ return _regeneratorRuntime().wrap(function _callee3$(_context10) {
18496
18542
  while (1) {
18497
18543
  switch (_context10.prev = _context10.next) {
18498
18544
  case 0:
@@ -18562,7 +18608,7 @@ var ParseQuery = /*#__PURE__*/function () {
18562
18608
 
18563
18609
  }, {
18564
18610
  key: "each",
18565
- value: function (callback
18611
+ value: function each(callback
18566
18612
  /*: (obj: ParseObject) => any*/
18567
18613
  , options
18568
18614
  /*:: ?: BatchOptions*/
@@ -18589,7 +18635,7 @@ var ParseQuery = /*#__PURE__*/function () {
18589
18635
 
18590
18636
  }, {
18591
18637
  key: "hint",
18592
- value: function (value
18638
+ value: function hint(value
18593
18639
  /*: mixed*/
18594
18640
  )
18595
18641
  /*: ParseQuery*/
@@ -18610,7 +18656,7 @@ var ParseQuery = /*#__PURE__*/function () {
18610
18656
 
18611
18657
  }, {
18612
18658
  key: "explain",
18613
- value: function ()
18659
+ value: function explain()
18614
18660
  /*: ParseQuery*/
18615
18661
  {
18616
18662
  var _explain
@@ -18656,8 +18702,10 @@ var ParseQuery = /*#__PURE__*/function () {
18656
18702
  , options
18657
18703
  /*:: ?: BatchOptions*/
18658
18704
  ) {
18705
+ var _this5 = this;
18706
+
18659
18707
  var array, index;
18660
- return _regeneratorRuntime().wrap(function (_context11) {
18708
+ return _regeneratorRuntime().wrap(function _callee4$(_context11) {
18661
18709
  while (1) {
18662
18710
  switch (_context11.prev = _context11.next) {
18663
18711
  case 0:
@@ -18665,7 +18713,7 @@ var ParseQuery = /*#__PURE__*/function () {
18665
18713
  index = 0;
18666
18714
  _context11.next = 4;
18667
18715
  return this.each(function (object) {
18668
- return _promise.default.resolve(callback(object, index, this)).then(function (result) {
18716
+ return _promise.default.resolve(callback(object, index, _this5)).then(function (result) {
18669
18717
  array.push(result);
18670
18718
  index += 1;
18671
18719
  });
@@ -18682,9 +18730,11 @@ var ParseQuery = /*#__PURE__*/function () {
18682
18730
  }, _callee4, this);
18683
18731
  }));
18684
18732
 
18685
- return function () {
18733
+ function map(_x3, _x4) {
18686
18734
  return _map.apply(this, arguments);
18687
- };
18735
+ }
18736
+
18737
+ return map;
18688
18738
  }()
18689
18739
  /**
18690
18740
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18721,7 +18771,7 @@ var ParseQuery = /*#__PURE__*/function () {
18721
18771
  /*:: ?: BatchOptions*/
18722
18772
  ) {
18723
18773
  var accumulator, index;
18724
- return _regeneratorRuntime().wrap(function (_context12) {
18774
+ return _regeneratorRuntime().wrap(function _callee5$(_context12) {
18725
18775
  while (1) {
18726
18776
  switch (_context12.prev = _context12.next) {
18727
18777
  case 0:
@@ -18762,9 +18812,11 @@ var ParseQuery = /*#__PURE__*/function () {
18762
18812
  }, _callee5, this);
18763
18813
  }));
18764
18814
 
18765
- return function () {
18815
+ function reduce(_x5, _x6, _x7) {
18766
18816
  return _reduce.apply(this, arguments);
18767
- };
18817
+ }
18818
+
18819
+ return reduce;
18768
18820
  }()
18769
18821
  /**
18770
18822
  * Iterates over each result of a query, calling a callback for each one. If
@@ -18798,8 +18850,10 @@ var ParseQuery = /*#__PURE__*/function () {
18798
18850
  , options
18799
18851
  /*:: ?: BatchOptions*/
18800
18852
  ) {
18853
+ var _this6 = this;
18854
+
18801
18855
  var array, index;
18802
- return _regeneratorRuntime().wrap(function (_context13) {
18856
+ return _regeneratorRuntime().wrap(function _callee6$(_context13) {
18803
18857
  while (1) {
18804
18858
  switch (_context13.prev = _context13.next) {
18805
18859
  case 0:
@@ -18807,7 +18861,7 @@ var ParseQuery = /*#__PURE__*/function () {
18807
18861
  index = 0;
18808
18862
  _context13.next = 4;
18809
18863
  return this.each(function (object) {
18810
- return _promise.default.resolve(callback(object, index, this)).then(function (flag) {
18864
+ return _promise.default.resolve(callback(object, index, _this6)).then(function (flag) {
18811
18865
  if (flag) {
18812
18866
  array.push(object);
18813
18867
  }
@@ -18827,9 +18881,11 @@ var ParseQuery = /*#__PURE__*/function () {
18827
18881
  }, _callee6, this);
18828
18882
  }));
18829
18883
 
18830
- return function () {
18884
+ function filter(_x8, _x9) {
18831
18885
  return _filter.apply(this, arguments);
18832
- };
18886
+ }
18887
+
18888
+ return filter;
18833
18889
  }()
18834
18890
  /** Query Conditions **/
18835
18891
 
@@ -18844,13 +18900,15 @@ var ParseQuery = /*#__PURE__*/function () {
18844
18900
 
18845
18901
  }, {
18846
18902
  key: "equalTo",
18847
- value: function (key
18903
+ value: function equalTo(key
18848
18904
  /*: string | { [key: string]: any }*/
18849
18905
  , value
18850
18906
  /*: ?mixed*/
18851
18907
  )
18852
18908
  /*: ParseQuery*/
18853
18909
  {
18910
+ var _this7 = this;
18911
+
18854
18912
  if (key && (0, _typeof2.default)(key) === 'object') {
18855
18913
  var _context14;
18856
18914
 
@@ -18859,7 +18917,7 @@ var ParseQuery = /*#__PURE__*/function () {
18859
18917
  k = _ref3[0],
18860
18918
  val = _ref3[1];
18861
18919
 
18862
- return this.equalTo(k, val);
18920
+ return _this7.equalTo(k, val);
18863
18921
  });
18864
18922
  return this;
18865
18923
  }
@@ -18882,13 +18940,15 @@ var ParseQuery = /*#__PURE__*/function () {
18882
18940
 
18883
18941
  }, {
18884
18942
  key: "notEqualTo",
18885
- value: function (key
18943
+ value: function notEqualTo(key
18886
18944
  /*: string | { [key: string]: any }*/
18887
18945
  , value
18888
18946
  /*: ?mixed*/
18889
18947
  )
18890
18948
  /*: ParseQuery*/
18891
18949
  {
18950
+ var _this8 = this;
18951
+
18892
18952
  if (key && (0, _typeof2.default)(key) === 'object') {
18893
18953
  var _context15;
18894
18954
 
@@ -18897,7 +18957,7 @@ var ParseQuery = /*#__PURE__*/function () {
18897
18957
  k = _ref5[0],
18898
18958
  val = _ref5[1];
18899
18959
 
18900
- return this.notEqualTo(k, val);
18960
+ return _this8.notEqualTo(k, val);
18901
18961
  });
18902
18962
  return this;
18903
18963
  }
@@ -18915,7 +18975,7 @@ var ParseQuery = /*#__PURE__*/function () {
18915
18975
 
18916
18976
  }, {
18917
18977
  key: "lessThan",
18918
- value: function (key
18978
+ value: function lessThan(key
18919
18979
  /*: string*/
18920
18980
  , value
18921
18981
  /*: mixed*/
@@ -18935,7 +18995,7 @@ var ParseQuery = /*#__PURE__*/function () {
18935
18995
 
18936
18996
  }, {
18937
18997
  key: "greaterThan",
18938
- value: function (key
18998
+ value: function greaterThan(key
18939
18999
  /*: string*/
18940
19000
  , value
18941
19001
  /*: mixed*/
@@ -18955,7 +19015,7 @@ var ParseQuery = /*#__PURE__*/function () {
18955
19015
 
18956
19016
  }, {
18957
19017
  key: "lessThanOrEqualTo",
18958
- value: function (key
19018
+ value: function lessThanOrEqualTo(key
18959
19019
  /*: string*/
18960
19020
  , value
18961
19021
  /*: mixed*/
@@ -18975,7 +19035,7 @@ var ParseQuery = /*#__PURE__*/function () {
18975
19035
 
18976
19036
  }, {
18977
19037
  key: "greaterThanOrEqualTo",
18978
- value: function (key
19038
+ value: function greaterThanOrEqualTo(key
18979
19039
  /*: string*/
18980
19040
  , value
18981
19041
  /*: mixed*/
@@ -18995,7 +19055,7 @@ var ParseQuery = /*#__PURE__*/function () {
18995
19055
 
18996
19056
  }, {
18997
19057
  key: "containedIn",
18998
- value: function (key
19058
+ value: function containedIn(key
18999
19059
  /*: string*/
19000
19060
  , value
19001
19061
  /*: mixed*/
@@ -19015,7 +19075,7 @@ var ParseQuery = /*#__PURE__*/function () {
19015
19075
 
19016
19076
  }, {
19017
19077
  key: "notContainedIn",
19018
- value: function (key
19078
+ value: function notContainedIn(key
19019
19079
  /*: string*/
19020
19080
  , value
19021
19081
  /*: mixed*/
@@ -19035,7 +19095,7 @@ var ParseQuery = /*#__PURE__*/function () {
19035
19095
 
19036
19096
  }, {
19037
19097
  key: "containedBy",
19038
- value: function (key
19098
+ value: function containedBy(key
19039
19099
  /*: string*/
19040
19100
  , values
19041
19101
  /*: Array<mixed>*/
@@ -19055,7 +19115,7 @@ var ParseQuery = /*#__PURE__*/function () {
19055
19115
 
19056
19116
  }, {
19057
19117
  key: "containsAll",
19058
- value: function (key
19118
+ value: function containsAll(key
19059
19119
  /*: string*/
19060
19120
  , values
19061
19121
  /*: Array<mixed>*/
@@ -19075,20 +19135,22 @@ var ParseQuery = /*#__PURE__*/function () {
19075
19135
 
19076
19136
  }, {
19077
19137
  key: "containsAllStartingWith",
19078
- value: function (key
19138
+ value: function containsAllStartingWith(key
19079
19139
  /*: string*/
19080
19140
  , values
19081
19141
  /*: Array<string>*/
19082
19142
  )
19083
19143
  /*: ParseQuery*/
19084
19144
  {
19145
+ var _this = this;
19146
+
19085
19147
  if (!(0, _isArray.default)(values)) {
19086
19148
  values = [values];
19087
19149
  }
19088
19150
 
19089
19151
  var regexObject = (0, _map2.default)(values).call(values, function (value) {
19090
19152
  return {
19091
- $regex: this._regexStartWith(value)
19153
+ $regex: _this._regexStartWith(value)
19092
19154
  };
19093
19155
  });
19094
19156
  return this.containsAll(key, regexObject);
@@ -19102,7 +19164,7 @@ var ParseQuery = /*#__PURE__*/function () {
19102
19164
 
19103
19165
  }, {
19104
19166
  key: "exists",
19105
- value: function (key
19167
+ value: function exists(key
19106
19168
  /*: string*/
19107
19169
  )
19108
19170
  /*: ParseQuery*/
@@ -19118,7 +19180,7 @@ var ParseQuery = /*#__PURE__*/function () {
19118
19180
 
19119
19181
  }, {
19120
19182
  key: "doesNotExist",
19121
- value: function (key
19183
+ value: function doesNotExist(key
19122
19184
  /*: string*/
19123
19185
  )
19124
19186
  /*: ParseQuery*/
@@ -19138,7 +19200,7 @@ var ParseQuery = /*#__PURE__*/function () {
19138
19200
 
19139
19201
  }, {
19140
19202
  key: "matches",
19141
- value: function (key
19203
+ value: function matches(key
19142
19204
  /*: string*/
19143
19205
  , regex
19144
19206
  /*: RegExp*/
@@ -19179,7 +19241,7 @@ var ParseQuery = /*#__PURE__*/function () {
19179
19241
 
19180
19242
  }, {
19181
19243
  key: "matchesQuery",
19182
- value: function (key
19244
+ value: function matchesQuery(key
19183
19245
  /*: string*/
19184
19246
  , query
19185
19247
  /*: ParseQuery*/
@@ -19202,7 +19264,7 @@ var ParseQuery = /*#__PURE__*/function () {
19202
19264
 
19203
19265
  }, {
19204
19266
  key: "doesNotMatchQuery",
19205
- value: function (key
19267
+ value: function doesNotMatchQuery(key
19206
19268
  /*: string*/
19207
19269
  , query
19208
19270
  /*: ParseQuery*/
@@ -19227,7 +19289,7 @@ var ParseQuery = /*#__PURE__*/function () {
19227
19289
 
19228
19290
  }, {
19229
19291
  key: "matchesKeyInQuery",
19230
- value: function (key
19292
+ value: function matchesKeyInQuery(key
19231
19293
  /*: string*/
19232
19294
  , queryKey
19233
19295
  /*: string*/
@@ -19257,7 +19319,7 @@ var ParseQuery = /*#__PURE__*/function () {
19257
19319
 
19258
19320
  }, {
19259
19321
  key: "doesNotMatchKeyInQuery",
19260
- value: function (key
19322
+ value: function doesNotMatchKeyInQuery(key
19261
19323
  /*: string*/
19262
19324
  , queryKey
19263
19325
  /*: string*/
@@ -19284,7 +19346,7 @@ var ParseQuery = /*#__PURE__*/function () {
19284
19346
 
19285
19347
  }, {
19286
19348
  key: "contains",
19287
- value: function (key
19349
+ value: function contains(key
19288
19350
  /*: string*/
19289
19351
  , substring
19290
19352
  /*: string*/
@@ -19329,7 +19391,7 @@ var ParseQuery = /*#__PURE__*/function () {
19329
19391
 
19330
19392
  }, {
19331
19393
  key: "fullText",
19332
- value: function (key
19394
+ value: function fullText(key
19333
19395
  /*: string*/
19334
19396
  , value
19335
19397
  /*: string*/
@@ -19386,7 +19448,7 @@ var ParseQuery = /*#__PURE__*/function () {
19386
19448
 
19387
19449
  }, {
19388
19450
  key: "sortByTextScore",
19389
- value: function () {
19451
+ value: function sortByTextScore() {
19390
19452
  this.ascending('$score');
19391
19453
  this.select(['$score']);
19392
19454
  return this;
@@ -19404,7 +19466,7 @@ var ParseQuery = /*#__PURE__*/function () {
19404
19466
 
19405
19467
  }, {
19406
19468
  key: "startsWith",
19407
- value: function (key
19469
+ value: function startsWith(key
19408
19470
  /*: string*/
19409
19471
  , prefix
19410
19472
  /*: string*/
@@ -19431,7 +19493,7 @@ var ParseQuery = /*#__PURE__*/function () {
19431
19493
 
19432
19494
  }, {
19433
19495
  key: "endsWith",
19434
- value: function (key
19496
+ value: function endsWith(key
19435
19497
  /*: string*/
19436
19498
  , suffix
19437
19499
  /*: string*/
@@ -19457,7 +19519,7 @@ var ParseQuery = /*#__PURE__*/function () {
19457
19519
 
19458
19520
  }, {
19459
19521
  key: "near",
19460
- value: function (key
19522
+ value: function near(key
19461
19523
  /*: string*/
19462
19524
  , point
19463
19525
  /*: ParseGeoPoint*/
@@ -19486,7 +19548,7 @@ var ParseQuery = /*#__PURE__*/function () {
19486
19548
 
19487
19549
  }, {
19488
19550
  key: "withinRadians",
19489
- value: function (key
19551
+ value: function withinRadians(key
19490
19552
  /*: string*/
19491
19553
  , point
19492
19554
  /*: ParseGeoPoint*/
@@ -19522,7 +19584,7 @@ var ParseQuery = /*#__PURE__*/function () {
19522
19584
 
19523
19585
  }, {
19524
19586
  key: "withinMiles",
19525
- value: function (key
19587
+ value: function withinMiles(key
19526
19588
  /*: string*/
19527
19589
  , point
19528
19590
  /*: ParseGeoPoint*/
@@ -19551,7 +19613,7 @@ var ParseQuery = /*#__PURE__*/function () {
19551
19613
 
19552
19614
  }, {
19553
19615
  key: "withinKilometers",
19554
- value: function (key
19616
+ value: function withinKilometers(key
19555
19617
  /*: string*/
19556
19618
  , point
19557
19619
  /*: ParseGeoPoint*/
@@ -19579,7 +19641,7 @@ var ParseQuery = /*#__PURE__*/function () {
19579
19641
 
19580
19642
  }, {
19581
19643
  key: "withinGeoBox",
19582
- value: function (key
19644
+ value: function withinGeoBox(key
19583
19645
  /*: string*/
19584
19646
  , southwest
19585
19647
  /*: ParseGeoPoint*/
@@ -19616,7 +19678,7 @@ var ParseQuery = /*#__PURE__*/function () {
19616
19678
 
19617
19679
  }, {
19618
19680
  key: "withinPolygon",
19619
- value: function (key
19681
+ value: function withinPolygon(key
19620
19682
  /*: string*/
19621
19683
  , points
19622
19684
  /*: Array<Array<number>>*/
@@ -19638,7 +19700,7 @@ var ParseQuery = /*#__PURE__*/function () {
19638
19700
 
19639
19701
  }, {
19640
19702
  key: "polygonContains",
19641
- value: function (key
19703
+ value: function polygonContains(key
19642
19704
  /*: string*/
19643
19705
  , point
19644
19706
  /*: ParseGeoPoint*/
@@ -19661,7 +19723,7 @@ var ParseQuery = /*#__PURE__*/function () {
19661
19723
 
19662
19724
  }, {
19663
19725
  key: "ascending",
19664
- value: function ()
19726
+ value: function ascending()
19665
19727
  /*: ParseQuery*/
19666
19728
  {
19667
19729
  this._order = [];
@@ -19683,7 +19745,7 @@ var ParseQuery = /*#__PURE__*/function () {
19683
19745
 
19684
19746
  }, {
19685
19747
  key: "addAscending",
19686
- value: function ()
19748
+ value: function addAscending()
19687
19749
  /*: ParseQuery*/
19688
19750
  {
19689
19751
  var _this9 = this;
@@ -19717,7 +19779,7 @@ var ParseQuery = /*#__PURE__*/function () {
19717
19779
 
19718
19780
  }, {
19719
19781
  key: "descending",
19720
- value: function ()
19782
+ value: function descending()
19721
19783
  /*: ParseQuery*/
19722
19784
  {
19723
19785
  this._order = [];
@@ -19739,7 +19801,7 @@ var ParseQuery = /*#__PURE__*/function () {
19739
19801
 
19740
19802
  }, {
19741
19803
  key: "addDescending",
19742
- value: function ()
19804
+ value: function addDescending()
19743
19805
  /*: ParseQuery*/
19744
19806
  {
19745
19807
  var _this10 = this;
@@ -19778,7 +19840,7 @@ var ParseQuery = /*#__PURE__*/function () {
19778
19840
 
19779
19841
  }, {
19780
19842
  key: "skip",
19781
- value: function (n
19843
+ value: function skip(n
19782
19844
  /*: number*/
19783
19845
  )
19784
19846
  /*: ParseQuery*/
@@ -19799,7 +19861,7 @@ var ParseQuery = /*#__PURE__*/function () {
19799
19861
 
19800
19862
  }, {
19801
19863
  key: "limit",
19802
- value: function (n
19864
+ value: function limit(n
19803
19865
  /*: number*/
19804
19866
  )
19805
19867
  /*: ParseQuery*/
@@ -19823,7 +19885,7 @@ var ParseQuery = /*#__PURE__*/function () {
19823
19885
 
19824
19886
  }, {
19825
19887
  key: "withCount",
19826
- value: function ()
19888
+ value: function withCount()
19827
19889
  /*: ParseQuery*/
19828
19890
  {
19829
19891
  var includeCount
@@ -19851,7 +19913,7 @@ var ParseQuery = /*#__PURE__*/function () {
19851
19913
 
19852
19914
  }, {
19853
19915
  key: "include",
19854
- value: function ()
19916
+ value: function include()
19855
19917
  /*: ParseQuery*/
19856
19918
  {
19857
19919
  var _this11 = this;
@@ -19881,7 +19943,7 @@ var ParseQuery = /*#__PURE__*/function () {
19881
19943
 
19882
19944
  }, {
19883
19945
  key: "includeAll",
19884
- value: function ()
19946
+ value: function includeAll()
19885
19947
  /*: ParseQuery*/
19886
19948
  {
19887
19949
  return this.include('*');
@@ -19897,7 +19959,7 @@ var ParseQuery = /*#__PURE__*/function () {
19897
19959
 
19898
19960
  }, {
19899
19961
  key: "select",
19900
- value: function ()
19962
+ value: function select()
19901
19963
  /*: ParseQuery*/
19902
19964
  {
19903
19965
  var _this12 = this;
@@ -19933,7 +19995,7 @@ var ParseQuery = /*#__PURE__*/function () {
19933
19995
 
19934
19996
  }, {
19935
19997
  key: "exclude",
19936
- value: function ()
19998
+ value: function exclude()
19937
19999
  /*: ParseQuery*/
19938
20000
  {
19939
20001
  var _this13 = this;
@@ -19964,7 +20026,7 @@ var ParseQuery = /*#__PURE__*/function () {
19964
20026
 
19965
20027
  }, {
19966
20028
  key: "readPreference",
19967
- value: function (_readPreference
20029
+ value: function readPreference(_readPreference
19968
20030
  /*: string*/
19969
20031
  , includeReadPreference
19970
20032
  /*:: ?: string*/
@@ -19993,7 +20055,7 @@ var ParseQuery = /*#__PURE__*/function () {
19993
20055
  /*:: ?: string*/
19994
20056
  ) {
19995
20057
  var currentUser, liveQueryClient, subscription;
19996
- return _regeneratorRuntime().wrap(function (_context22) {
20058
+ return _regeneratorRuntime().wrap(function _callee7$(_context22) {
19997
20059
  while (1) {
19998
20060
  switch (_context22.prev = _context22.next) {
19999
20061
  case 0:
@@ -20030,9 +20092,11 @@ var ParseQuery = /*#__PURE__*/function () {
20030
20092
  }, _callee7, this);
20031
20093
  }));
20032
20094
 
20033
- return function () {
20095
+ function subscribe(_x10) {
20034
20096
  return _subscribe.apply(this, arguments);
20035
- };
20097
+ }
20098
+
20099
+ return subscribe;
20036
20100
  }()
20037
20101
  /**
20038
20102
  * Constructs a Parse.Query that is the OR of the passed in queries. For
@@ -20055,7 +20119,7 @@ var ParseQuery = /*#__PURE__*/function () {
20055
20119
  *
20056
20120
  * @returns {Parse.Query} Returns the query, so you can chain this call.
20057
20121
  */
20058
- function ()
20122
+ function fromNetwork()
20059
20123
  /*: ParseQuery*/
20060
20124
  {
20061
20125
  this._queriesLocalDatastore = false;
@@ -20070,7 +20134,7 @@ var ParseQuery = /*#__PURE__*/function () {
20070
20134
 
20071
20135
  }, {
20072
20136
  key: "fromLocalDatastore",
20073
- value: function ()
20137
+ value: function fromLocalDatastore()
20074
20138
  /*: ParseQuery*/
20075
20139
  {
20076
20140
  return this.fromPinWithName(null);
@@ -20083,7 +20147,7 @@ var ParseQuery = /*#__PURE__*/function () {
20083
20147
 
20084
20148
  }, {
20085
20149
  key: "fromPin",
20086
- value: function ()
20150
+ value: function fromPin()
20087
20151
  /*: ParseQuery*/
20088
20152
  {
20089
20153
  return this.fromPinWithName(_LocalDatastoreUtils.DEFAULT_PIN);
@@ -20097,7 +20161,7 @@ var ParseQuery = /*#__PURE__*/function () {
20097
20161
 
20098
20162
  }, {
20099
20163
  key: "fromPinWithName",
20100
- value: function (name
20164
+ value: function fromPinWithName(name
20101
20165
  /*:: ?: string*/
20102
20166
  )
20103
20167
  /*: ParseQuery*/
@@ -20119,9 +20183,11 @@ var ParseQuery = /*#__PURE__*/function () {
20119
20183
 
20120
20184
  }, {
20121
20185
  key: "cancel",
20122
- value: function ()
20186
+ value: function cancel()
20123
20187
  /*: ParseQuery*/
20124
20188
  {
20189
+ var _this14 = this;
20190
+
20125
20191
  if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {
20126
20192
  this._xhrRequest.task._aborted = true;
20127
20193
 
@@ -20135,12 +20201,12 @@ var ParseQuery = /*#__PURE__*/function () {
20135
20201
  }
20136
20202
 
20137
20203
  return this._xhrRequest.onchange = function () {
20138
- return this.cancel();
20204
+ return _this14.cancel();
20139
20205
  };
20140
20206
  }
20141
20207
  }, {
20142
20208
  key: "_setRequestTask",
20143
- value: function (options) {
20209
+ value: function _setRequestTask(options) {
20144
20210
  var _this15 = this;
20145
20211
 
20146
20212
  options.requestTask = function (task) {
@@ -20151,7 +20217,7 @@ var ParseQuery = /*#__PURE__*/function () {
20151
20217
  }
20152
20218
  }], [{
20153
20219
  key: "fromJSON",
20154
- value: function (className
20220
+ value: function fromJSON(className
20155
20221
  /*: string*/
20156
20222
  , json
20157
20223
  /*: QueryJSON*/
@@ -20163,7 +20229,7 @@ var ParseQuery = /*#__PURE__*/function () {
20163
20229
  }
20164
20230
  }, {
20165
20231
  key: "or",
20166
- value: function ()
20232
+ value: function or()
20167
20233
  /*: ParseQuery*/
20168
20234
  {
20169
20235
  for (var _len8 = arguments.length, queries = new Array(_len8), _key12 = 0; _key12 < _len8; _key12++) {
@@ -20193,7 +20259,7 @@ var ParseQuery = /*#__PURE__*/function () {
20193
20259
 
20194
20260
  }, {
20195
20261
  key: "and",
20196
- value: function ()
20262
+ value: function and()
20197
20263
  /*: ParseQuery*/
20198
20264
  {
20199
20265
  for (var _len9 = arguments.length, queries = new Array(_len9), _key13 = 0; _key13 < _len9; _key13++) {
@@ -20223,7 +20289,7 @@ var ParseQuery = /*#__PURE__*/function () {
20223
20289
 
20224
20290
  }, {
20225
20291
  key: "nor",
20226
- value: function ()
20292
+ value: function nor()
20227
20293
  /*: ParseQuery*/
20228
20294
  {
20229
20295
  for (var _len10 = arguments.length, queries = new Array(_len10), _key14 = 0; _key14 < _len10; _key14++) {
@@ -20243,7 +20309,7 @@ var ParseQuery = /*#__PURE__*/function () {
20243
20309
  }();
20244
20310
 
20245
20311
  var DefaultController = {
20246
- find: function (className
20312
+ find: function find(className
20247
20313
  /*: string*/
20248
20314
  , params
20249
20315
  /*: QueryJSON*/
@@ -20256,7 +20322,7 @@ var DefaultController = {
20256
20322
 
20257
20323
  return RESTController.request('GET', 'classes/' + className, params, options);
20258
20324
  },
20259
- aggregate: function (className
20325
+ aggregate: function aggregate(className
20260
20326
  /*: string*/
20261
20327
  , params
20262
20328
  /*: any*/
@@ -22485,7 +22551,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22485
22551
  value: function () {
22486
22552
  var _isCurrentAsync = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
22487
22553
  var current;
22488
- return _regeneratorRuntime().wrap(function (_context) {
22554
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
22489
22555
  while (1) {
22490
22556
  switch (_context.prev = _context.next) {
22491
22557
  case 0:
@@ -22504,9 +22570,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22504
22570
  }, _callee, this);
22505
22571
  }));
22506
22572
 
22507
- return function () {
22573
+ function isCurrentAsync() {
22508
22574
  return _isCurrentAsync.apply(this, arguments);
22509
- };
22575
+ }
22576
+
22577
+ return isCurrentAsync;
22510
22578
  }()
22511
22579
  /**
22512
22580
  * Returns get("username").
@@ -22516,7 +22584,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22516
22584
 
22517
22585
  }, {
22518
22586
  key: "getUsername",
22519
- value: function ()
22587
+ value: function getUsername()
22520
22588
  /*: ?string*/
22521
22589
  {
22522
22590
  var username = this.get('username');
@@ -22535,7 +22603,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22535
22603
 
22536
22604
  }, {
22537
22605
  key: "setUsername",
22538
- value: function (username
22606
+ value: function setUsername(username
22539
22607
  /*: string*/
22540
22608
  ) {
22541
22609
  // Strip anonymity
@@ -22556,7 +22624,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22556
22624
 
22557
22625
  }, {
22558
22626
  key: "setPassword",
22559
- value: function (password
22627
+ value: function setPassword(password
22560
22628
  /*: string*/
22561
22629
  ) {
22562
22630
  this.set('password', password);
@@ -22569,7 +22637,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22569
22637
 
22570
22638
  }, {
22571
22639
  key: "getEmail",
22572
- value: function ()
22640
+ value: function getEmail()
22573
22641
  /*: ?string*/
22574
22642
  {
22575
22643
  var email = this.get('email');
@@ -22589,7 +22657,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22589
22657
 
22590
22658
  }, {
22591
22659
  key: "setEmail",
22592
- value: function (email
22660
+ value: function setEmail(email
22593
22661
  /*: string*/
22594
22662
  ) {
22595
22663
  return this.set('email', email);
@@ -22604,7 +22672,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22604
22672
 
22605
22673
  }, {
22606
22674
  key: "getSessionToken",
22607
- value: function ()
22675
+ value: function getSessionToken()
22608
22676
  /*: ?string*/
22609
22677
  {
22610
22678
  var token = this.get('sessionToken');
@@ -22623,7 +22691,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22623
22691
 
22624
22692
  }, {
22625
22693
  key: "authenticated",
22626
- value: function ()
22694
+ value: function authenticated()
22627
22695
  /*: boolean*/
22628
22696
  {
22629
22697
  var current = ParseUser.current();
@@ -22645,7 +22713,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22645
22713
 
22646
22714
  }, {
22647
22715
  key: "signUp",
22648
- value: function (attrs
22716
+ value: function signUp(attrs
22649
22717
  /*: AttributeMap*/
22650
22718
  , options
22651
22719
  /*:: ?: FullOptions*/
@@ -22685,7 +22753,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22685
22753
 
22686
22754
  }, {
22687
22755
  key: "logIn",
22688
- value: function (options
22756
+ value: function logIn(options
22689
22757
  /*:: ?: FullOptions*/
22690
22758
  )
22691
22759
  /*: Promise<ParseUser>*/
@@ -22729,7 +22797,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22729
22797
  current,
22730
22798
  _args2 = arguments;
22731
22799
 
22732
- return _regeneratorRuntime().wrap(function (_context2) {
22800
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
22733
22801
  while (1) {
22734
22802
  switch (_context2.prev = _context2.next) {
22735
22803
  case 0:
@@ -22765,9 +22833,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22765
22833
  }, _callee2, this);
22766
22834
  }));
22767
22835
 
22768
- return function () {
22836
+ function save() {
22769
22837
  return _save.apply(this, arguments);
22770
- };
22838
+ }
22839
+
22840
+ return save;
22771
22841
  }()
22772
22842
  /**
22773
22843
  * Wrap the default destroy behavior with functionality that logs out
@@ -22787,7 +22857,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22787
22857
  current,
22788
22858
  _args3 = arguments;
22789
22859
 
22790
- return _regeneratorRuntime().wrap(function (_context3) {
22860
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
22791
22861
  while (1) {
22792
22862
  switch (_context3.prev = _context3.next) {
22793
22863
  case 0:
@@ -22823,9 +22893,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22823
22893
  }, _callee3, this);
22824
22894
  }));
22825
22895
 
22826
- return function () {
22896
+ function destroy() {
22827
22897
  return _destroy.apply(this, arguments);
22828
- };
22898
+ }
22899
+
22900
+ return destroy;
22829
22901
  }()
22830
22902
  /**
22831
22903
  * Wrap the default fetch behavior with functionality to save to local
@@ -22845,7 +22917,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22845
22917
  current,
22846
22918
  _args4 = arguments;
22847
22919
 
22848
- return _regeneratorRuntime().wrap(function (_context4) {
22920
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
22849
22921
  while (1) {
22850
22922
  switch (_context4.prev = _context4.next) {
22851
22923
  case 0:
@@ -22881,9 +22953,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22881
22953
  }, _callee4, this);
22882
22954
  }));
22883
22955
 
22884
- return function () {
22956
+ function fetch() {
22885
22957
  return _fetch.apply(this, arguments);
22886
- };
22958
+ }
22959
+
22960
+ return fetch;
22887
22961
  }()
22888
22962
  /**
22889
22963
  * Wrap the default fetchWithInclude behavior with functionality to save to local
@@ -22903,7 +22977,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22903
22977
  current,
22904
22978
  _args5 = arguments;
22905
22979
 
22906
- return _regeneratorRuntime().wrap(function (_context5) {
22980
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
22907
22981
  while (1) {
22908
22982
  switch (_context5.prev = _context5.next) {
22909
22983
  case 0:
@@ -22939,9 +23013,11 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22939
23013
  }, _callee5, this);
22940
23014
  }));
22941
23015
 
22942
- return function () {
23016
+ function fetchWithInclude() {
22943
23017
  return _fetchWithInclude.apply(this, arguments);
22944
- };
23018
+ }
23019
+
23020
+ return fetchWithInclude;
22945
23021
  }()
22946
23022
  /**
22947
23023
  * Verify whether a given password is the password of the current user.
@@ -22954,7 +23030,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22954
23030
 
22955
23031
  }, {
22956
23032
  key: "verifyPassword",
22957
- value: function (password
23033
+ value: function verifyPassword(password
22958
23034
  /*: string*/
22959
23035
  , options
22960
23036
  /*:: ?: RequestOptions*/
@@ -22966,7 +23042,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22966
23042
  }
22967
23043
  }], [{
22968
23044
  key: "readOnlyAttributes",
22969
- value: function () {
23045
+ value: function readOnlyAttributes() {
22970
23046
  return ['sessionToken'];
22971
23047
  }
22972
23048
  /**
@@ -22980,7 +23056,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
22980
23056
 
22981
23057
  }, {
22982
23058
  key: "extend",
22983
- value: function (protoProps
23059
+ value: function extend(protoProps
22984
23060
  /*: { [prop: string]: any }*/
22985
23061
  , classProps
22986
23062
  /*: { [prop: string]: any }*/
@@ -23023,7 +23099,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23023
23099
 
23024
23100
  }, {
23025
23101
  key: "current",
23026
- value: function ()
23102
+ value: function current()
23027
23103
  /*: ?ParseUser*/
23028
23104
  {
23029
23105
  if (!canUseCurrentUser) {
@@ -23044,7 +23120,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23044
23120
 
23045
23121
  }, {
23046
23122
  key: "currentAsync",
23047
- value: function ()
23123
+ value: function currentAsync()
23048
23124
  /*: Promise<?ParseUser>*/
23049
23125
  {
23050
23126
  if (!canUseCurrentUser) {
@@ -23072,7 +23148,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23072
23148
 
23073
23149
  }, {
23074
23150
  key: "signUp",
23075
- value: function (username
23151
+ value: function signUp(username
23076
23152
  /*: string*/
23077
23153
  , password
23078
23154
  /*: string*/
@@ -23102,7 +23178,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23102
23178
 
23103
23179
  }, {
23104
23180
  key: "logIn",
23105
- value: function (username
23181
+ value: function logIn(username
23106
23182
  /*: string*/
23107
23183
  , password
23108
23184
  /*: string*/
@@ -23138,7 +23214,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23138
23214
 
23139
23215
  }, {
23140
23216
  key: "become",
23141
- value: function (sessionToken
23217
+ value: function become(sessionToken
23142
23218
  /*: string*/
23143
23219
  , options
23144
23220
  /*:: ?: RequestOptions*/
@@ -23174,7 +23250,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23174
23250
 
23175
23251
  }, {
23176
23252
  key: "me",
23177
- value: function (sessionToken
23253
+ value: function me(sessionToken
23178
23254
  /*: string*/
23179
23255
  ) {
23180
23256
  var options
@@ -23209,7 +23285,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23209
23285
 
23210
23286
  }, {
23211
23287
  key: "hydrate",
23212
- value: function (userJSON
23288
+ value: function hydrate(userJSON
23213
23289
  /*: AttributeMap*/
23214
23290
  ) {
23215
23291
  var controller = _CoreManager.default.getUserController();
@@ -23229,7 +23305,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23229
23305
 
23230
23306
  }, {
23231
23307
  key: "logInWith",
23232
- value: function (provider
23308
+ value: function logInWith(provider
23233
23309
  /*: any*/
23234
23310
  , options
23235
23311
  /*: { authData?: AuthData }*/
@@ -23254,7 +23330,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23254
23330
 
23255
23331
  }, {
23256
23332
  key: "logOut",
23257
- value: function () {
23333
+ value: function logOut() {
23258
23334
  var options
23259
23335
  /*: RequestOptions*/
23260
23336
  = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -23277,7 +23353,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23277
23353
 
23278
23354
  }, {
23279
23355
  key: "requestPasswordReset",
23280
- value: function (email
23356
+ value: function requestPasswordReset(email
23281
23357
  /*: string*/
23282
23358
  , options
23283
23359
  /*:: ?: RequestOptions*/
@@ -23305,7 +23381,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23305
23381
 
23306
23382
  }, {
23307
23383
  key: "requestEmailVerification",
23308
- value: function (email
23384
+ value: function requestEmailVerification(email
23309
23385
  /*: string*/
23310
23386
  , options
23311
23387
  /*:: ?: RequestOptions*/
@@ -23334,7 +23410,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23334
23410
 
23335
23411
  }, {
23336
23412
  key: "verifyPassword",
23337
- value: function (username
23413
+ value: function verifyPassword(username
23338
23414
  /*: string*/
23339
23415
  , password
23340
23416
  /*: string*/
@@ -23372,7 +23448,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23372
23448
 
23373
23449
  }, {
23374
23450
  key: "allowCustomUserClass",
23375
- value: function (isAllowed
23451
+ value: function allowCustomUserClass(isAllowed
23376
23452
  /*: boolean*/
23377
23453
  ) {
23378
23454
  _CoreManager.default.set('PERFORM_USER_REWRITE', !isAllowed);
@@ -23394,7 +23470,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23394
23470
 
23395
23471
  }, {
23396
23472
  key: "enableRevocableSession",
23397
- value: function (options
23473
+ value: function enableRevocableSession(options
23398
23474
  /*:: ?: RequestOptions*/
23399
23475
  ) {
23400
23476
  options = options || {};
@@ -23421,7 +23497,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23421
23497
 
23422
23498
  }, {
23423
23499
  key: "enableUnsafeCurrentUser",
23424
- value: function () {
23500
+ value: function enableUnsafeCurrentUser() {
23425
23501
  canUseCurrentUser = true;
23426
23502
  }
23427
23503
  /**
@@ -23434,7 +23510,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23434
23510
 
23435
23511
  }, {
23436
23512
  key: "disableUnsafeCurrentUser",
23437
- value: function () {
23513
+ value: function disableUnsafeCurrentUser() {
23438
23514
  canUseCurrentUser = false;
23439
23515
  }
23440
23516
  /**
@@ -23452,7 +23528,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23452
23528
 
23453
23529
  }, {
23454
23530
  key: "_registerAuthenticationProvider",
23455
- value: function (provider
23531
+ value: function _registerAuthenticationProvider(provider
23456
23532
  /*: any*/
23457
23533
  ) {
23458
23534
  authProviders[provider.getAuthType()] = provider; // Synchronize the current user with the auth provider.
@@ -23474,7 +23550,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23474
23550
 
23475
23551
  }, {
23476
23552
  key: "_logInWith",
23477
- value: function (provider
23553
+ value: function _logInWith(provider
23478
23554
  /*: any*/
23479
23555
  , options
23480
23556
  /*: { authData?: AuthData }*/
@@ -23486,13 +23562,13 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23486
23562
  }
23487
23563
  }, {
23488
23564
  key: "_clearCache",
23489
- value: function () {
23565
+ value: function _clearCache() {
23490
23566
  currentUserCache = null;
23491
23567
  currentUserCacheMatchesDisk = false;
23492
23568
  }
23493
23569
  }, {
23494
23570
  key: "_setCurrentUserCache",
23495
- value: function (user
23571
+ value: function _setCurrentUserCache(user
23496
23572
  /*: ParseUser*/
23497
23573
  ) {
23498
23574
  currentUserCache = user;
@@ -23504,7 +23580,7 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
23504
23580
  _ParseObject2.default.registerSubclass('_User', ParseUser);
23505
23581
 
23506
23582
  var DefaultController = {
23507
- updateUserOnDisk: function (user) {
23583
+ updateUserOnDisk: function updateUserOnDisk(user) {
23508
23584
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23509
23585
 
23510
23586
  var json = user.toJSON();
@@ -23522,14 +23598,14 @@ var DefaultController = {
23522
23598
  return user;
23523
23599
  });
23524
23600
  },
23525
- removeUserFromDisk: function () {
23601
+ removeUserFromDisk: function removeUserFromDisk() {
23526
23602
  var path = _Storage.default.generatePath(CURRENT_USER_KEY);
23527
23603
 
23528
23604
  currentUserCacheMatchesDisk = true;
23529
23605
  currentUserCache = null;
23530
23606
  return _Storage.default.removeItemAsync(path);
23531
23607
  },
23532
- setCurrentUser: function (user) {
23608
+ setCurrentUser: function setCurrentUser(user) {
23533
23609
  currentUserCache = user;
23534
23610
 
23535
23611
  user._cleanupAuthData();
@@ -23538,7 +23614,7 @@ var DefaultController = {
23538
23614
 
23539
23615
  return DefaultController.updateUserOnDisk(user);
23540
23616
  },
23541
- currentUser: function ()
23617
+ currentUser: function currentUser()
23542
23618
  /*: ?ParseUser*/
23543
23619
  {
23544
23620
  if (currentUserCache) {
@@ -23597,7 +23673,7 @@ var DefaultController = {
23597
23673
 
23598
23674
  return current;
23599
23675
  },
23600
- currentUserAsync: function ()
23676
+ currentUserAsync: function currentUserAsync()
23601
23677
  /*: Promise<?ParseUser>*/
23602
23678
  {
23603
23679
  if (currentUserCache) {
@@ -23652,7 +23728,7 @@ var DefaultController = {
23652
23728
  return _promise.default.resolve(current);
23653
23729
  });
23654
23730
  },
23655
- signUp: function (user
23731
+ signUp: function signUp(user
23656
23732
  /*: ParseUser*/
23657
23733
  , attrs
23658
23734
  /*: AttributeMap*/
@@ -23685,7 +23761,7 @@ var DefaultController = {
23685
23761
  return user;
23686
23762
  });
23687
23763
  },
23688
- logIn: function (user
23764
+ logIn: function logIn(user
23689
23765
  /*: ParseUser*/
23690
23766
  , options
23691
23767
  /*: RequestOptions*/
@@ -23719,7 +23795,7 @@ var DefaultController = {
23719
23795
  return DefaultController.setCurrentUser(user);
23720
23796
  });
23721
23797
  },
23722
- become: function (user
23798
+ become: function become(user
23723
23799
  /*: ParseUser*/
23724
23800
  , options
23725
23801
  /*: RequestOptions*/
@@ -23736,7 +23812,7 @@ var DefaultController = {
23736
23812
  return DefaultController.setCurrentUser(user);
23737
23813
  });
23738
23814
  },
23739
- hydrate: function (user
23815
+ hydrate: function hydrate(user
23740
23816
  /*: ParseUser*/
23741
23817
  , userJSON
23742
23818
  /*: AttributeMap*/
@@ -23753,7 +23829,7 @@ var DefaultController = {
23753
23829
  return _promise.default.resolve(user);
23754
23830
  }
23755
23831
  },
23756
- me: function (user
23832
+ me: function me(user
23757
23833
  /*: ParseUser*/
23758
23834
  , options
23759
23835
  /*: RequestOptions*/
@@ -23770,7 +23846,7 @@ var DefaultController = {
23770
23846
  return user;
23771
23847
  });
23772
23848
  },
23773
- logOut: function (options
23849
+ logOut: function logOut(options
23774
23850
  /*: RequestOptions*/
23775
23851
  )
23776
23852
  /*: Promise<ParseUser>*/
@@ -23809,7 +23885,7 @@ var DefaultController = {
23809
23885
  return promise;
23810
23886
  });
23811
23887
  },
23812
- requestPasswordReset: function (email
23888
+ requestPasswordReset: function requestPasswordReset(email
23813
23889
  /*: string*/
23814
23890
  , options
23815
23891
  /*: RequestOptions*/
@@ -23820,14 +23896,14 @@ var DefaultController = {
23820
23896
  email: email
23821
23897
  }, options);
23822
23898
  },
23823
- upgradeToRevocableSession: function (user
23899
+ upgradeToRevocableSession: function upgradeToRevocableSession(user
23824
23900
  /*: ParseUser*/
23825
23901
  , options
23826
23902
  /*: RequestOptions*/
23827
23903
  ) {
23828
23904
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
23829
23905
  var token, RESTController, result, session, current;
23830
- return _regeneratorRuntime().wrap(function (_context6) {
23906
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
23831
23907
  while (1) {
23832
23908
  switch (_context6.prev = _context6.next) {
23833
23909
  case 0:
@@ -23880,7 +23956,7 @@ var DefaultController = {
23880
23956
  }, _callee6);
23881
23957
  }))();
23882
23958
  },
23883
- linkWith: function (user
23959
+ linkWith: function linkWith(user
23884
23960
  /*: ParseUser*/
23885
23961
  , authData
23886
23962
  /*: AuthData*/
@@ -23897,7 +23973,7 @@ var DefaultController = {
23897
23973
  return user;
23898
23974
  });
23899
23975
  },
23900
- verifyPassword: function (username
23976
+ verifyPassword: function verifyPassword(username
23901
23977
  /*: string*/
23902
23978
  , password
23903
23979
  /*: string*/
@@ -23911,7 +23987,7 @@ var DefaultController = {
23911
23987
  password: password
23912
23988
  }, options);
23913
23989
  },
23914
- requestEmailVerification: function (email
23990
+ requestEmailVerification: function requestEmailVerification(email
23915
23991
  /*: string*/
23916
23992
  , options
23917
23993
  /*: RequestOptions*/
@@ -24253,7 +24329,7 @@ var RESTController = {
24253
24329
  var requestId = isIdempotent ? uuidv4() : '';
24254
24330
  var attempts = 0;
24255
24331
 
24256
- var dispatch = function dispatch() {
24332
+ (function dispatch() {
24257
24333
  if (XHR == null) {
24258
24334
  throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');
24259
24335
  }
@@ -24382,12 +24458,11 @@ var RESTController = {
24382
24458
  if (options && typeof options.requestTask === 'function') {
24383
24459
  options.requestTask(xhr);
24384
24460
  }
24385
- };
24461
+ })();
24386
24462
 
24387
- dispatch();
24388
24463
  return promise;
24389
24464
  },
24390
- request: function (method
24465
+ request: function request(method
24391
24466
  /*: string*/
24392
24467
  , path
24393
24468
  /*: string*/
@@ -24502,7 +24577,7 @@ var RESTController = {
24502
24577
  });
24503
24578
  }).catch(RESTController.handleError);
24504
24579
  },
24505
- handleError: function (response) {
24580
+ handleError: function handleError(response) {
24506
24581
  // Transform the error into an instance of ParseError by trying to parse
24507
24582
  // the error string as JSON
24508
24583
  var error;
@@ -24522,12 +24597,12 @@ var RESTController = {
24522
24597
 
24523
24598
  return _promise.default.reject(error);
24524
24599
  },
24525
- _setXHR: function (xhr
24600
+ _setXHR: function _setXHR(xhr
24526
24601
  /*: any*/
24527
24602
  ) {
24528
24603
  XHR = xhr;
24529
24604
  },
24530
- _getXHR: function () {
24605
+ _getXHR: function _getXHR() {
24531
24606
  return XHR;
24532
24607
  }
24533
24608
  };