parse 5.1.0-alpha.9 → 5.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/parse.js +243 -153
  2. package/dist/parse.min.js +2 -2
  3. package/dist/parse.weapp.js +1108 -154
  4. package/dist/parse.weapp.min.js +2 -2
  5. package/lib/browser/CoreManager.js +31 -1
  6. package/lib/browser/EventuallyQueue.js +1 -1
  7. package/lib/browser/ObjectStateMutations.js +3 -2
  8. package/lib/browser/ParseACL.js +21 -11
  9. package/lib/browser/ParseGeoPoint.js +12 -8
  10. package/lib/browser/ParseInstallation.js +1 -1
  11. package/lib/browser/ParseObject.js +74 -68
  12. package/lib/browser/ParseOp.js +21 -7
  13. package/lib/browser/ParseQuery.js +1 -0
  14. package/lib/browser/ParseRelation.js +12 -7
  15. package/lib/browser/ParseRole.js +2 -0
  16. package/lib/browser/ParseUser.js +1 -0
  17. package/lib/browser/SingleInstanceStateController.js +2 -4
  18. package/lib/browser/arrayContainsObject.js +4 -3
  19. package/lib/browser/canBeSerialized.js +6 -4
  20. package/lib/browser/decode.js +8 -5
  21. package/lib/browser/encode.js +6 -4
  22. package/lib/browser/equals.js +4 -3
  23. package/lib/browser/unique.js +3 -2
  24. package/lib/browser/unsavedChildren.js +4 -2
  25. package/lib/browser/uuid.js +11 -5
  26. package/lib/node/CoreManager.js +31 -1
  27. package/lib/node/EventuallyQueue.js +1 -1
  28. package/lib/node/ObjectStateMutations.js +3 -2
  29. package/lib/node/ParseACL.js +21 -11
  30. package/lib/node/ParseGeoPoint.js +11 -11
  31. package/lib/node/ParseInstallation.js +2 -2
  32. package/lib/node/ParseObject.js +68 -66
  33. package/lib/node/ParseOp.js +21 -7
  34. package/lib/node/ParseQuery.js +1 -0
  35. package/lib/node/ParseRelation.js +14 -8
  36. package/lib/node/ParseRole.js +2 -0
  37. package/lib/node/ParseUser.js +1 -0
  38. package/lib/node/SingleInstanceStateController.js +2 -8
  39. package/lib/node/arrayContainsObject.js +4 -3
  40. package/lib/node/canBeSerialized.js +6 -4
  41. package/lib/node/decode.js +9 -5
  42. package/lib/node/encode.js +7 -4
  43. package/lib/node/equals.js +4 -3
  44. package/lib/node/unique.js +3 -2
  45. package/lib/node/unsavedChildren.js +4 -2
  46. package/lib/node/uuid.js +10 -8
  47. package/lib/react-native/CoreManager.js +31 -1
  48. package/lib/react-native/ObjectStateMutations.js +3 -2
  49. package/lib/react-native/ParseACL.js +19 -11
  50. package/lib/react-native/ParseGeoPoint.js +5 -3
  51. package/lib/react-native/ParseObject.js +8 -6
  52. package/lib/react-native/ParseOp.js +20 -6
  53. package/lib/react-native/ParseQuery.js +1 -0
  54. package/lib/react-native/ParseRelation.js +10 -7
  55. package/lib/react-native/ParseRole.js +2 -0
  56. package/lib/react-native/ParseUser.js +1 -0
  57. package/lib/react-native/SingleInstanceStateController.js +0 -2
  58. package/lib/react-native/arrayContainsObject.js +3 -2
  59. package/lib/react-native/canBeSerialized.js +5 -3
  60. package/lib/react-native/decode.js +7 -5
  61. package/lib/react-native/encode.js +6 -4
  62. package/lib/react-native/equals.js +4 -3
  63. package/lib/react-native/unique.js +3 -2
  64. package/lib/react-native/unsavedChildren.js +3 -2
  65. package/lib/react-native/uuid.js +9 -4
  66. package/lib/weapp/CoreManager.js +31 -1
  67. package/lib/weapp/EventuallyQueue.js +1 -1
  68. package/lib/weapp/ObjectStateMutations.js +3 -2
  69. package/lib/weapp/ParseACL.js +21 -11
  70. package/lib/weapp/ParseGeoPoint.js +12 -8
  71. package/lib/weapp/ParseInstallation.js +1 -1
  72. package/lib/weapp/ParseObject.js +74 -68
  73. package/lib/weapp/ParseOp.js +21 -7
  74. package/lib/weapp/ParseQuery.js +1 -0
  75. package/lib/weapp/ParseRelation.js +12 -7
  76. package/lib/weapp/ParseRole.js +2 -0
  77. package/lib/weapp/ParseUser.js +1 -0
  78. package/lib/weapp/SingleInstanceStateController.js +2 -4
  79. package/lib/weapp/arrayContainsObject.js +4 -3
  80. package/lib/weapp/canBeSerialized.js +6 -4
  81. package/lib/weapp/decode.js +8 -5
  82. package/lib/weapp/encode.js +6 -4
  83. package/lib/weapp/equals.js +4 -3
  84. package/lib/weapp/unique.js +3 -2
  85. package/lib/weapp/unsavedChildren.js +4 -2
  86. package/lib/weapp/uuid.js +12 -5
  87. package/package.json +4 -1
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v5.1.0-alpha.9
2
+ * Parse JavaScript SDK v5.1.0-beta.1
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -397,7 +397,7 @@ var config /*: Config & { [key: string]: any }*/ = {
397
397
  SERVER_AUTH_TOKEN: null,
398
398
  LIVEQUERY_SERVER_URL: null,
399
399
  ENCRYPTED_KEY: null,
400
- VERSION: 'js' + "5.1.0-alpha.9",
400
+ VERSION: 'js' + "5.1.0-beta.1",
401
401
  APPLICATION_ID: null,
402
402
  JAVASCRIPT_KEY: null,
403
403
  MASTER_KEY: null,
@@ -599,6 +599,36 @@ var CoreManager = {
599
599
  },
600
600
  getHooksController: function () /*: HooksController*/{
601
601
  return config['HooksController'];
602
+ },
603
+ setParseOp: function (op /*: typeof ParseOp*/) {
604
+ config['ParseOp'] = op;
605
+ },
606
+ getParseOp: function () {
607
+ return config['ParseOp'];
608
+ },
609
+ setParseObject: function (object /*: typeof ParseObject*/) {
610
+ config['ParseObject'] = object;
611
+ },
612
+ getParseObject: function () /*: ParseObject*/{
613
+ return config['ParseObject'];
614
+ },
615
+ setParseQuery: function (query /*: typeof ParseQuery*/) {
616
+ config['ParseQuery'] = query;
617
+ },
618
+ getParseQuery: function () /*: ParseQuery*/{
619
+ return config['ParseQuery'];
620
+ },
621
+ setParseRole: function (role /*: typeof ParseRole*/) {
622
+ config['ParseRole'] = role;
623
+ },
624
+ getParseRole: function () /*: ParseRole*/{
625
+ return config['ParseRole'];
626
+ },
627
+ setParseUser: function (user /*: typeof ParseUser*/) {
628
+ config['ParseUser'] = user;
629
+ },
630
+ getParseUser: function () /*: ParseUser*/{
631
+ return config['ParseUser'];
602
632
  }
603
633
  };
604
634
  module.exports = CoreManager;
@@ -1096,7 +1126,7 @@ var EventuallyQueue = {
1096
1126
  */
1097
1127
  poll: function () {
1098
1128
  var _this7 = this;
1099
- var ms /*: number*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
1129
+ var ms /*:: ?: number*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2000;
1100
1130
  if (polling) {
1101
1131
  return;
1102
1132
  }
@@ -3422,8 +3452,8 @@ var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/he
3422
3452
  var _includes = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/includes"));
3423
3453
  var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
3424
3454
  var _encode = _interopRequireDefault(_dereq_("./encode"));
3455
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
3425
3456
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
3426
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
3427
3457
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
3428
3458
  var _TaskQueue = _interopRequireDefault(_dereq_("./TaskQueue"));
3429
3459
  var _ParseOp = _dereq_("./ParseOp");
@@ -3577,16 +3607,17 @@ function nestedSet(obj, key, value) {
3577
3607
  }
3578
3608
  }
3579
3609
  function commitServerChanges(serverData /*: AttributeMap*/, objectCache /*: ObjectCache*/, changes /*: AttributeMap*/) {
3610
+ var ParseObject = _CoreManager.default.getParseObject();
3580
3611
  for (var _attr3 in changes) {
3581
3612
  var val = changes[_attr3];
3582
3613
  nestedSet(serverData, _attr3, val);
3583
- if (val && (0, _typeof2.default)(val) === 'object' && !(val instanceof _ParseObject.default) && !(val instanceof _ParseFile.default) && !(val instanceof _ParseRelation.default)) {
3614
+ if (val && (0, _typeof2.default)(val) === 'object' && !(val instanceof ParseObject) && !(val instanceof _ParseFile.default) && !(val instanceof _ParseRelation.default)) {
3584
3615
  var json = (0, _encode.default)(val, false, true);
3585
3616
  objectCache[_attr3] = (0, _stringify.default)(json);
3586
3617
  }
3587
3618
  }
3588
3619
  }
3589
- },{"./ParseFile":24,"./ParseObject":28,"./ParseOp":29,"./ParseRelation":32,"./TaskQueue":43,"./encode":49,"@babel/runtime-corejs3/core-js-stable/instance/filter":64,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/includes":68,"@babel/runtime-corejs3/core-js-stable/json/stringify":78,"@babel/runtime-corejs3/core-js-stable/object/define-properties":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":87,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":89,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],18:[function(_dereq_,module,exports){
3620
+ },{"./CoreManager":4,"./ParseFile":24,"./ParseOp":29,"./ParseRelation":32,"./TaskQueue":43,"./encode":49,"@babel/runtime-corejs3/core-js-stable/instance/filter":64,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/includes":68,"@babel/runtime-corejs3/core-js-stable/json/stringify":78,"@babel/runtime-corejs3/core-js-stable/object/define-properties":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":87,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":89,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],18:[function(_dereq_,module,exports){
3590
3621
  "use strict";
3591
3622
 
3592
3623
  var _sliceInstanceProperty2 = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/slice");
@@ -4674,11 +4705,12 @@ var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/ty
4674
4705
  var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
4675
4706
  var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
4676
4707
  var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
4677
- var _ParseRole = _interopRequireDefault(_dereq_("./ParseRole"));
4678
- var _ParseUser = _interopRequireDefault(_dereq_("./ParseUser"));
4708
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
4679
4709
  /**
4680
4710
  * @flow
4681
4711
  */
4712
+ /*:: import type ParseRole from './ParseRole';*/
4713
+ /*:: import type ParseUser from './ParseUser';*/
4682
4714
  /*:: type PermissionsMap = { [permission: string]: boolean };*/
4683
4715
  /*:: type ByIdMap = { [userId: string]: PermissionsMap };*/
4684
4716
  var PUBLIC_KEY = '*';
@@ -4706,7 +4738,8 @@ var ParseACL = /*#__PURE__*/function () {
4706
4738
  (0, _defineProperty2.default)(this, "permissionsById", void 0);
4707
4739
  this.permissionsById = {};
4708
4740
  if (arg1 && (0, _typeof2.default)(arg1) === 'object') {
4709
- if (arg1 instanceof _ParseUser.default) {
4741
+ var _ParseUser = _CoreManager.default.getParseUser();
4742
+ if (arg1 instanceof _ParseUser) {
4710
4743
  this.setReadAccess(arg1, true);
4711
4744
  this.setWriteAccess(arg1, true);
4712
4745
  } else {
@@ -4778,9 +4811,11 @@ var ParseACL = /*#__PURE__*/function () {
4778
4811
  }, {
4779
4812
  key: "_setAccess",
4780
4813
  value: function (accessType /*: string*/, userId /*: ParseUser | ParseRole | string*/, allowed /*: boolean*/) {
4781
- if (userId instanceof _ParseUser.default) {
4814
+ var ParseRole = _CoreManager.default.getParseRole();
4815
+ var ParseUser = _CoreManager.default.getParseUser();
4816
+ if (userId instanceof ParseUser) {
4782
4817
  userId = userId.id;
4783
- } else if (userId instanceof _ParseRole.default) {
4818
+ } else if (userId instanceof ParseRole) {
4784
4819
  var name = userId.getName();
4785
4820
  if (!name) {
4786
4821
  throw new TypeError('Role must have a name');
@@ -4815,12 +4850,14 @@ var ParseACL = /*#__PURE__*/function () {
4815
4850
  }, {
4816
4851
  key: "_getAccess",
4817
4852
  value: function (accessType /*: string*/, userId /*: ParseUser | ParseRole | string*/) /*: boolean*/{
4818
- if (userId instanceof _ParseUser.default) {
4853
+ var ParseRole = _CoreManager.default.getParseRole();
4854
+ var ParseUser = _CoreManager.default.getParseUser();
4855
+ if (userId instanceof ParseUser) {
4819
4856
  userId = userId.id;
4820
4857
  if (!userId) {
4821
4858
  throw new Error('Cannot get access for a ParseUser without an ID');
4822
4859
  }
4823
- } else if (userId instanceof _ParseRole.default) {
4860
+ } else if (userId instanceof ParseRole) {
4824
4861
  var name = userId.getName();
4825
4862
  if (!name) {
4826
4863
  throw new TypeError('Role must have a name');
@@ -4944,7 +4981,8 @@ var ParseACL = /*#__PURE__*/function () {
4944
4981
  }, {
4945
4982
  key: "getRoleReadAccess",
4946
4983
  value: function (role /*: ParseRole | string*/) /*: boolean*/{
4947
- if (role instanceof _ParseRole.default) {
4984
+ var ParseRole = _CoreManager.default.getParseRole();
4985
+ if (role instanceof ParseRole) {
4948
4986
  // Normalize to the String name
4949
4987
  role = role.getName();
4950
4988
  }
@@ -4966,7 +5004,8 @@ var ParseACL = /*#__PURE__*/function () {
4966
5004
  }, {
4967
5005
  key: "getRoleWriteAccess",
4968
5006
  value: function (role /*: ParseRole | string*/) /*: boolean*/{
4969
- if (role instanceof _ParseRole.default) {
5007
+ var ParseRole = _CoreManager.default.getParseRole();
5008
+ if (role instanceof ParseRole) {
4970
5009
  // Normalize to the String name
4971
5010
  role = role.getName();
4972
5011
  }
@@ -4987,7 +5026,8 @@ var ParseACL = /*#__PURE__*/function () {
4987
5026
  }, {
4988
5027
  key: "setRoleReadAccess",
4989
5028
  value: function (role /*: ParseRole | string*/, allowed /*: boolean*/) {
4990
- if (role instanceof _ParseRole.default) {
5029
+ var ParseRole = _CoreManager.default.getParseRole();
5030
+ if (role instanceof ParseRole) {
4991
5031
  // Normalize to the String name
4992
5032
  role = role.getName();
4993
5033
  }
@@ -5008,7 +5048,8 @@ var ParseACL = /*#__PURE__*/function () {
5008
5048
  }, {
5009
5049
  key: "setRoleWriteAccess",
5010
5050
  value: function (role /*: ParseRole | string*/, allowed /*: boolean*/) {
5011
- if (role instanceof _ParseRole.default) {
5051
+ var ParseRole = _CoreManager.default.getParseRole();
5052
+ if (role instanceof ParseRole) {
5012
5053
  // Normalize to the String name
5013
5054
  role = role.getName();
5014
5055
  }
@@ -5022,7 +5063,7 @@ var ParseACL = /*#__PURE__*/function () {
5022
5063
  }();
5023
5064
  var _default = ParseACL;
5024
5065
  exports.default = _default;
5025
- },{"./ParseRole":33,"./ParseUser":36,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],21:[function(_dereq_,module,exports){
5066
+ },{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],21:[function(_dereq_,module,exports){
5026
5067
  "use strict";
5027
5068
 
5028
5069
  var _sliceInstanceProperty2 = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/slice");
@@ -7312,13 +7353,11 @@ _Object$defineProperty(exports, "__esModule", {
7312
7353
  });
7313
7354
  exports.default = void 0;
7314
7355
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
7356
+ var _promise = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/promise"));
7315
7357
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
7316
7358
  var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
7317
7359
  var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
7318
7360
  var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
7319
- /**
7320
- * @flow
7321
- */
7322
7361
  /**
7323
7362
  * Creates a new GeoPoint with any of the following forms:<br>
7324
7363
  * <pre>
@@ -7421,7 +7460,7 @@ var ParseGeoPoint = /*#__PURE__*/function () {
7421
7460
  }
7422
7461
  }, {
7423
7462
  key: "equals",
7424
- value: function (other /*: mixed*/) /*: boolean*/{
7463
+ value: function (other /*: any*/) /*: boolean*/{
7425
7464
  return other instanceof ParseGeoPoint && this.latitude === other.latitude && this.longitude === other.longitude;
7426
7465
  }
7427
7466
 
@@ -7497,14 +7536,20 @@ var ParseGeoPoint = /*#__PURE__*/function () {
7497
7536
  /**
7498
7537
  * Creates a GeoPoint with the user's current location, if available.
7499
7538
  *
7539
+ * @param {object} options The options.
7540
+ * @param {boolean} [options.enableHighAccuracy=false] A boolean value that indicates the application would like to receive the best possible results. If true and if the device is able to provide a more accurate position, it will do so. Note that this can result in slower response times or increased power consumption (with a GPS chip on a mobile device for example). On the other hand, if false, the device can take the liberty to save resources by responding more quickly and/or using less power. Default: false.
7541
+ * @param {number} [options.timeout=Infinity] A positive long value representing the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. The default value is Infinity, meaning that getCurrentPosition() won't return until the position is available.
7542
+ * @param {number} [options.maximumAge=0] A positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return. If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to Infinity the device must return a cached position regardless of its age. Default: 0.
7500
7543
  * @static
7501
- * @returns {Parse.GeoPoint} User's current location
7544
+ * @returns {Promise<Parse.GeoPoint>} User's current location
7502
7545
  */
7503
7546
  }, {
7504
7547
  key: "current",
7505
- value: function () {
7506
- return navigator.geolocation.getCurrentPosition(function (location) {
7507
- return new ParseGeoPoint(location.coords.latitude, location.coords.longitude);
7548
+ value: function (options) /*: Promise<ParseGeoPoint>*/{
7549
+ return new _promise.default(function (resolve, reject) {
7550
+ navigator.geolocation.getCurrentPosition(function (location) {
7551
+ resolve(new ParseGeoPoint(location.coords.latitude, location.coords.longitude));
7552
+ }, reject, options);
7508
7553
  });
7509
7554
  }
7510
7555
  }]);
@@ -7512,7 +7557,7 @@ var ParseGeoPoint = /*#__PURE__*/function () {
7512
7557
  }();
7513
7558
  var _default = ParseGeoPoint;
7514
7559
  exports.default = _default;
7515
- },{"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],26:[function(_dereq_,module,exports){
7560
+ },{"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/promise":93,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],26:[function(_dereq_,module,exports){
7516
7561
  "use strict";
7517
7562
 
7518
7563
  var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
@@ -7766,7 +7811,7 @@ var ParseInstallation = /*#__PURE__*/function (_ParseObject) {
7766
7811
  * Parse.Installation.DEVICE_TYPES.WEB
7767
7812
  * </pre
7768
7813
  *
7769
- * @property {Object} DEVICE_TYPES
7814
+ * @property {object} DEVICE_TYPES
7770
7815
  * @static
7771
7816
  */
7772
7817
  }, {
@@ -8104,8 +8149,8 @@ var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
8104
8149
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
8105
8150
  var _promiseUtils = _dereq_("./promiseUtils");
8106
8151
  var _LocalDatastoreUtils = _dereq_("./LocalDatastoreUtils");
8152
+ var _uuid = _interopRequireDefault(_dereq_("./uuid"));
8107
8153
  var _ParseOp = _dereq_("./ParseOp");
8108
- var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
8109
8154
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
8110
8155
  var SingleInstanceStateController = _interopRequireWildcard(_dereq_("./SingleInstanceStateController"));
8111
8156
  var _unique = _interopRequireDefault(_dereq_("./unique"));
@@ -8235,25 +8280,17 @@ function _objectSpread(target) {
8235
8280
  });
8236
8281
  }
8237
8282
  return target;
8238
- } /**
8239
- * @flow
8240
- */
8241
- /*:: import type { AttributeMap, OpsMap } from './ObjectStateMutations';*/
8242
- /*:: import type { RequestOptions, FullOptions } from './RESTController';*/
8243
- var uuidv4 = _dereq_('./uuid');
8283
+ }
8244
8284
  /*:: export type Pointer = {
8245
8285
  __type: string,
8246
8286
  className: string,
8247
- objectId: string,
8248
- };*/
8249
- /*:: type SaveParams = {
8250
- method: string,
8251
- path: string,
8252
- body: AttributeMap,
8287
+ objectId?: string,
8288
+ _localId?: string,
8253
8289
  };*/
8254
8290
  /*:: export type SaveOptions = FullOptions & {
8255
8291
  cascadeSave?: boolean,
8256
8292
  context?: AttributeMap,
8293
+ batchSize?: number,
8257
8294
  };*/
8258
8295
  // Mapping of class names to constructors, so we can populate objects from the
8259
8296
  // server with appropriate subclasses of ParseObject
@@ -8303,7 +8340,7 @@ var ParseObject = /*#__PURE__*/function () {
8303
8340
  * @param {object} attributes The initial set of data to store in the object.
8304
8341
  * @param {object} options The options for this object instance.
8305
8342
  */
8306
- function ParseObject(className /*: ?string | { className: string, [attr: string]: mixed }*/, attributes /*:: ?: { [attr: string]: mixed }*/, options /*:: ?: { ignoreValidation: boolean }*/) {
8343
+ function ParseObject(className /*:: ?: string | { className: string, [attr: string]: any }*/, attributes /*:: ?: { [attr: string]: any }*/, options /*:: ?: { ignoreValidation: boolean }*/) {
8307
8344
  (0, _classCallCheck2.default)(this, ParseObject);
8308
8345
  /**
8309
8346
  * The ID of this object, unique within its class.
@@ -8358,7 +8395,7 @@ var ParseObject = /*#__PURE__*/function () {
8358
8395
  */
8359
8396
  }, {
8360
8397
  key: "createdAt",
8361
- get: function () /*: ?Date*/{
8398
+ get: function () /*: Date | undefined*/{
8362
8399
  return this._getServerData().createdAt;
8363
8400
  }
8364
8401
 
@@ -8370,7 +8407,7 @@ var ParseObject = /*#__PURE__*/function () {
8370
8407
  */
8371
8408
  }, {
8372
8409
  key: "updatedAt",
8373
- get: function () /*: ?Date*/{
8410
+ get: function () /*: Date | undefined*/{
8374
8411
  return this._getServerData().updatedAt;
8375
8412
  }
8376
8413
 
@@ -8390,7 +8427,7 @@ var ParseObject = /*#__PURE__*/function () {
8390
8427
  if (typeof this._localId === 'string') {
8391
8428
  return this._localId;
8392
8429
  }
8393
- var localId = 'local' + uuidv4();
8430
+ var localId = 'local' + (0, _uuid.default)();
8394
8431
  this._localId = localId;
8395
8432
  return localId;
8396
8433
  }
@@ -8484,7 +8521,7 @@ var ParseObject = /*#__PURE__*/function () {
8484
8521
  }, {
8485
8522
  key: "_toFullJSON",
8486
8523
  value: function (seen /*:: ?: Array<any>*/, offline /*:: ?: boolean*/) /*: AttributeMap*/{
8487
- var json /*: { [key: string]: mixed }*/ = this.toJSON(seen, offline);
8524
+ var json /*: { [key: string]: any }*/ = this.toJSON(seen, offline);
8488
8525
  json.__type = 'Object';
8489
8526
  json.className = this.className;
8490
8527
  return json;
@@ -8551,7 +8588,13 @@ var ParseObject = /*#__PURE__*/function () {
8551
8588
  }
8552
8589
  var stateController = _CoreManager.default.getObjectStateController();
8553
8590
  stateController.initializeState(this._getStateIdentifier());
8554
- var decoded = {};
8591
+ var decoded
8592
+ /*: Partial<{
8593
+ createdAt?: Date,
8594
+ updatedAt?: Date,
8595
+ ACL?: any,
8596
+ [key: string]: any,
8597
+ }>*/ = {};
8555
8598
  for (var _attr4 in serverData) {
8556
8599
  if (_attr4 === 'ACL') {
8557
8600
  decoded[_attr4] = new _ParseACL.default(serverData[_attr4]);
@@ -8603,7 +8646,12 @@ var ParseObject = /*#__PURE__*/function () {
8603
8646
  }, {
8604
8647
  key: "_handleSaveResponse",
8605
8648
  value: function (response /*: AttributeMap*/, status /*: number*/) {
8606
- var changes = {};
8649
+ var changes
8650
+ /*: Partial<{
8651
+ createdAt: string,
8652
+ updatedAt: string,
8653
+ [key: string]: any
8654
+ }>*/ = {};
8607
8655
  var stateController = _CoreManager.default.getObjectStateController();
8608
8656
  var pending = stateController.popPendingState(this._getStateIdentifier());
8609
8657
  for (var attr in pending) {
@@ -8666,7 +8714,7 @@ var ParseObject = /*#__PURE__*/function () {
8666
8714
  value: function (seen /*: Array<any> | void*/, offline /*:: ?: boolean*/) /*: AttributeMap*/{
8667
8715
  var seenEntry = this.id ? this.className + ':' + this.id : this;
8668
8716
  seen = seen || [seenEntry];
8669
- var json = {};
8717
+ var json /*: AttributeMap*/ = {};
8670
8718
  var attrs = this.attributes;
8671
8719
  for (var _attr5 in attrs) {
8672
8720
  if ((_attr5 === 'createdAt' || _attr5 === 'updatedAt') && attrs[_attr5].toJSON) {
@@ -8689,7 +8737,7 @@ var ParseObject = /*#__PURE__*/function () {
8689
8737
  */
8690
8738
  }, {
8691
8739
  key: "equals",
8692
- value: function (other /*: mixed*/) /*: boolean*/{
8740
+ value: function (other /*: any*/) /*: boolean*/{
8693
8741
  if (this === other) {
8694
8742
  return true;
8695
8743
  }
@@ -8810,7 +8858,7 @@ var ParseObject = /*#__PURE__*/function () {
8810
8858
  */
8811
8859
  }, {
8812
8860
  key: "get",
8813
- value: function (attr /*: string*/) /*: mixed*/{
8861
+ value: function (attr /*: string*/) /*: any*/{
8814
8862
  return this.attributes[attr];
8815
8863
  }
8816
8864
 
@@ -8905,7 +8953,7 @@ var ParseObject = /*#__PURE__*/function () {
8905
8953
  */
8906
8954
  }, {
8907
8955
  key: "set",
8908
- value: function (key /*: mixed*/, value /*: mixed*/, options /*:: ?: mixed*/) /*: ParseObject | boolean*/{
8956
+ value: function (key /*: any*/, value /*:: ?: any*/, options /*:: ?: any*/) /*: ParseObject | boolean*/{
8909
8957
  var changes = {};
8910
8958
  var newOps = {};
8911
8959
  if (key && (0, _typeof2.default)(key) === 'object') {
@@ -8994,7 +9042,7 @@ var ParseObject = /*#__PURE__*/function () {
8994
9042
  */
8995
9043
  }, {
8996
9044
  key: "unset",
8997
- value: function (attr /*: string*/, options /*:: ?: { [opt: string]: mixed }*/) /*: ParseObject | boolean*/{
9045
+ value: function (attr /*: string*/, options /*:: ?: { [opt: string]: any }*/) /*: ParseObject | boolean*/{
8998
9046
  options = options || {};
8999
9047
  options.unset = true;
9000
9048
  return this.set(attr, null, options);
@@ -9050,7 +9098,7 @@ var ParseObject = /*#__PURE__*/function () {
9050
9098
  */
9051
9099
  }, {
9052
9100
  key: "add",
9053
- value: function (attr /*: string*/, item /*: mixed*/) /*: ParseObject | boolean*/{
9101
+ value: function (attr /*: string*/, item /*: any*/) /*: ParseObject | boolean*/{
9054
9102
  return this.set(attr, new _ParseOp.AddOp([item]));
9055
9103
  }
9056
9104
 
@@ -9064,7 +9112,7 @@ var ParseObject = /*#__PURE__*/function () {
9064
9112
  */
9065
9113
  }, {
9066
9114
  key: "addAll",
9067
- value: function (attr /*: string*/, items /*: Array<mixed>*/) /*: ParseObject | boolean*/{
9115
+ value: function (attr /*: string*/, items /*: Array<any>*/) /*: ParseObject | boolean*/{
9068
9116
  return this.set(attr, new _ParseOp.AddOp(items));
9069
9117
  }
9070
9118
 
@@ -9079,7 +9127,7 @@ var ParseObject = /*#__PURE__*/function () {
9079
9127
  */
9080
9128
  }, {
9081
9129
  key: "addUnique",
9082
- value: function (attr /*: string*/, item /*: mixed*/) /*: ParseObject | boolean*/{
9130
+ value: function (attr /*: string*/, item /*: any*/) /*: ParseObject | boolean*/{
9083
9131
  return this.set(attr, new _ParseOp.AddUniqueOp([item]));
9084
9132
  }
9085
9133
 
@@ -9094,7 +9142,7 @@ var ParseObject = /*#__PURE__*/function () {
9094
9142
  */
9095
9143
  }, {
9096
9144
  key: "addAllUnique",
9097
- value: function (attr /*: string*/, items /*: Array<mixed>*/) /*: ParseObject | boolean*/{
9145
+ value: function (attr /*: string*/, items /*: Array<any>*/) /*: ParseObject | boolean*/{
9098
9146
  return this.set(attr, new _ParseOp.AddUniqueOp(items));
9099
9147
  }
9100
9148
 
@@ -9108,7 +9156,7 @@ var ParseObject = /*#__PURE__*/function () {
9108
9156
  */
9109
9157
  }, {
9110
9158
  key: "remove",
9111
- value: function (attr /*: string*/, item /*: mixed*/) /*: ParseObject | boolean*/{
9159
+ value: function (attr /*: string*/, item /*: any*/) /*: ParseObject | boolean*/{
9112
9160
  return this.set(attr, new _ParseOp.RemoveOp([item]));
9113
9161
  }
9114
9162
 
@@ -9122,7 +9170,7 @@ var ParseObject = /*#__PURE__*/function () {
9122
9170
  */
9123
9171
  }, {
9124
9172
  key: "removeAll",
9125
- value: function (attr /*: string*/, items /*: Array<mixed>*/) /*: ParseObject | boolean*/{
9173
+ value: function (attr /*: string*/, items /*: Array<any>*/) /*: ParseObject | boolean*/{
9126
9174
  return this.set(attr, new _ParseOp.RemoveOp(items));
9127
9175
  }
9128
9176
 
@@ -9137,7 +9185,7 @@ var ParseObject = /*#__PURE__*/function () {
9137
9185
  */
9138
9186
  }, {
9139
9187
  key: "op",
9140
- value: function (attr /*: string*/) /*: ?Op*/{
9188
+ value: function (attr /*: string*/) /*: Op | undefined*/{
9141
9189
  var pending = this._getPendingOps();
9142
9190
  for (var i = pending.length; i--;) {
9143
9191
  if (pending[i][attr]) {
@@ -9243,7 +9291,7 @@ var ParseObject = /*#__PURE__*/function () {
9243
9291
  key: "exists",
9244
9292
  value: function () {
9245
9293
  var _exists = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options /*:: ?: RequestOptions*/) {
9246
- var query;
9294
+ var ParseQuery, query;
9247
9295
  return _regenerator.default.wrap(function (_context) {
9248
9296
  while (1) switch (_context.prev = _context.next) {
9249
9297
  case 0:
@@ -9254,26 +9302,27 @@ var ParseObject = /*#__PURE__*/function () {
9254
9302
  return _context.abrupt("return", false);
9255
9303
  case 2:
9256
9304
  _context.prev = 2;
9257
- query = new _ParseQuery.default(this.className);
9258
- _context.next = 6;
9305
+ ParseQuery = _CoreManager.default.getParseQuery();
9306
+ query = new ParseQuery(this.className);
9307
+ _context.next = 7;
9259
9308
  return query.get(this.id, options);
9260
- case 6:
9309
+ case 7:
9261
9310
  return _context.abrupt("return", true);
9262
- case 9:
9263
- _context.prev = 9;
9311
+ case 10:
9312
+ _context.prev = 10;
9264
9313
  _context.t0 = _context["catch"](2);
9265
9314
  if (!(_context.t0.code === _ParseError.default.OBJECT_NOT_FOUND)) {
9266
- _context.next = 13;
9315
+ _context.next = 14;
9267
9316
  break;
9268
9317
  }
9269
9318
  return _context.abrupt("return", false);
9270
- case 13:
9271
- throw _context.t0;
9272
9319
  case 14:
9320
+ throw _context.t0;
9321
+ case 15:
9273
9322
  case "end":
9274
9323
  return _context.stop();
9275
9324
  }
9276
- }, _callee, this, [[2, 9]]);
9325
+ }, _callee, this, [[2, 10]]);
9277
9326
  }));
9278
9327
  function exists() {
9279
9328
  return _exists.apply(this, arguments);
@@ -9323,7 +9372,7 @@ var ParseObject = /*#__PURE__*/function () {
9323
9372
  */
9324
9373
  }, {
9325
9374
  key: "getACL",
9326
- value: function () /*: ?ParseACL*/{
9375
+ value: function () /*: ParseACL | null*/{
9327
9376
  var acl = this.get('ACL');
9328
9377
  if (acl instanceof _ParseACL.default) {
9329
9378
  return acl;
@@ -9341,7 +9390,7 @@ var ParseObject = /*#__PURE__*/function () {
9341
9390
  */
9342
9391
  }, {
9343
9392
  key: "setACL",
9344
- value: function (acl /*: ParseACL*/, options /*:: ?: mixed*/) /*: ParseObject | boolean*/{
9393
+ value: function (acl /*: ParseACL*/, options /*:: ?: any*/) /*: ParseObject | boolean*/{
9345
9394
  return this.set('ACL', acl, options);
9346
9395
  }
9347
9396
 
@@ -9422,9 +9471,9 @@ var ParseObject = /*#__PURE__*/function () {
9422
9471
  */
9423
9472
  }, {
9424
9473
  key: "fetch",
9425
- value: function (options /*: RequestOptions*/) /*: Promise*/{
9474
+ value: function (options /*: FetchOptions*/) /*: Promise<any>*/{
9426
9475
  options = options || {};
9427
- var fetchOptions = {};
9476
+ var fetchOptions /*: FetchOptions*/ = {};
9428
9477
  if (options.hasOwnProperty('useMasterKey')) {
9429
9478
  fetchOptions.useMasterKey = options.useMasterKey;
9430
9479
  }
@@ -9474,7 +9523,7 @@ var ParseObject = /*#__PURE__*/function () {
9474
9523
  */
9475
9524
  }, {
9476
9525
  key: "fetchWithInclude",
9477
- value: function (keys /*: String | Array<string | Array<string>>*/, options /*: RequestOptions*/) /*: Promise*/{
9526
+ value: function (keys /*: String | Array<string | Array<string>>*/, options /*: RequestOptions*/) /*: Promise<any>*/{
9478
9527
  options = options || {};
9479
9528
  options.include = keys;
9480
9529
  return this.fetch(options);
@@ -9606,7 +9655,7 @@ var ParseObject = /*#__PURE__*/function () {
9606
9655
  */
9607
9656
  }, {
9608
9657
  key: "save",
9609
- value: function (arg1 /*: ?string | { [attr: string]: mixed }*/, arg2 /*: SaveOptions | mixed*/, arg3 /*:: ?: SaveOptions*/) /*: Promise*/{
9658
+ value: function (arg1 /*: undefined | string | { [attr: string]: any } | null*/, arg2 /*: SaveOptions | any*/, arg3 /*:: ?: SaveOptions*/) /*: Promise<this>*/{
9610
9659
  var _this = this;
9611
9660
  var attrs;
9612
9661
  var options;
@@ -9631,7 +9680,7 @@ var ParseObject = /*#__PURE__*/function () {
9631
9680
  return _promise.default.reject(validationError);
9632
9681
  }
9633
9682
  }
9634
- var saveOptions = {};
9683
+ var saveOptions /*: SaveOptions*/ = {};
9635
9684
  if (options.hasOwnProperty('useMasterKey')) {
9636
9685
  saveOptions.useMasterKey = !!options.useMasterKey;
9637
9686
  }
@@ -9726,9 +9775,9 @@ var ParseObject = /*#__PURE__*/function () {
9726
9775
  */
9727
9776
  }, {
9728
9777
  key: "destroy",
9729
- value: function (options /*: RequestOptions*/) /*: Promise*/{
9778
+ value: function (options /*: RequestOptions*/) /*: Promise<void | ParseObject>*/{
9730
9779
  options = options || {};
9731
- var destroyOptions = {};
9780
+ var destroyOptions /*: RequestOptions*/ = {};
9732
9781
  if (options.hasOwnProperty('useMasterKey')) {
9733
9782
  destroyOptions.useMasterKey = options.useMasterKey;
9734
9783
  }
@@ -9955,7 +10004,7 @@ var ParseObject = /*#__PURE__*/function () {
9955
10004
  key: "fetchAll",
9956
10005
  value: function (list /*: Array<ParseObject>*/) {
9957
10006
  var options /*: RequestOptions*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9958
- var queryOptions = {};
10007
+ var queryOptions /*: RequestOptions*/ = {};
9959
10008
  if (options.hasOwnProperty('useMasterKey')) {
9960
10009
  queryOptions.useMasterKey = options.useMasterKey;
9961
10010
  }
@@ -10063,9 +10112,9 @@ var ParseObject = /*#__PURE__*/function () {
10063
10112
  */
10064
10113
  }, {
10065
10114
  key: "fetchAllIfNeeded",
10066
- value: function (list /*: Array<ParseObject>*/, options) {
10115
+ value: function (list /*: Array<ParseObject>*/, options /*: FetchOptions*/) {
10067
10116
  options = options || {};
10068
- var queryOptions = {};
10117
+ var queryOptions /*: FetchOptions*/ = {};
10069
10118
  if (options.hasOwnProperty('useMasterKey')) {
10070
10119
  queryOptions.useMasterKey = options.useMasterKey;
10071
10120
  }
@@ -10079,7 +10128,7 @@ var ParseObject = /*#__PURE__*/function () {
10079
10128
  }
10080
10129
  }, {
10081
10130
  key: "handleIncludeOptions",
10082
- value: function (options) {
10131
+ value: function (options /*: { include?: string | string[] }*/) {
10083
10132
  var include = [];
10084
10133
  if ((0, _isArray.default)(options.include)) {
10085
10134
  var _context8;
@@ -10145,8 +10194,8 @@ var ParseObject = /*#__PURE__*/function () {
10145
10194
  }, {
10146
10195
  key: "destroyAll",
10147
10196
  value: function (list /*: Array<ParseObject>*/) {
10148
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10149
- var destroyOptions = {};
10197
+ var options /*: SaveOptions*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10198
+ var destroyOptions /*: SaveOptions*/ = {};
10150
10199
  if (options.hasOwnProperty('useMasterKey')) {
10151
10200
  destroyOptions.useMasterKey = options.useMasterKey;
10152
10201
  }
@@ -10183,8 +10232,8 @@ var ParseObject = /*#__PURE__*/function () {
10183
10232
  }, {
10184
10233
  key: "saveAll",
10185
10234
  value: function (list /*: Array<ParseObject>*/) {
10186
- var options /*: RequestOptions*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10187
- var saveOptions = {};
10235
+ var options /*: SaveOptions*/ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10236
+ var saveOptions /*: SaveOptions*/ = {};
10188
10237
  if (options.hasOwnProperty('useMasterKey')) {
10189
10238
  saveOptions.useMasterKey = options.useMasterKey;
10190
10239
  }
@@ -10216,7 +10265,7 @@ var ParseObject = /*#__PURE__*/function () {
10216
10265
  */
10217
10266
  }, {
10218
10267
  key: "createWithoutData",
10219
- value: function (id /*: string*/) {
10268
+ value: function (id /*: string*/) /*: ParseObject*/{
10220
10269
  var obj = new this();
10221
10270
  obj.id = id;
10222
10271
  return obj;
@@ -10234,13 +10283,13 @@ var ParseObject = /*#__PURE__*/function () {
10234
10283
  */
10235
10284
  }, {
10236
10285
  key: "fromJSON",
10237
- value: function (json /*: any*/, override /*:: ?: boolean*/, dirty /*:: ?: boolean*/) {
10286
+ value: function (json /*: any*/, override /*:: ?: boolean*/, dirty /*:: ?: boolean*/) /*: ParseObject*/{
10238
10287
  if (!json.className) {
10239
10288
  throw new Error('Cannot create an object without a className');
10240
10289
  }
10241
10290
  var constructor = classMap[json.className];
10242
10291
  var o = constructor ? new constructor(json.className) : new ParseObject(json.className);
10243
- var otherAttributes = {};
10292
+ var otherAttributes /*: AttributeMap*/ = {};
10244
10293
  for (var _attr11 in json) {
10245
10294
  if (_attr11 !== 'className' && _attr11 !== '__type') {
10246
10295
  otherAttributes[_attr11] = json[_attr11];
@@ -10627,7 +10676,7 @@ var ParseObject = /*#__PURE__*/function () {
10627
10676
  return ParseObject;
10628
10677
  }();
10629
10678
  var DefaultController = {
10630
- fetch: function (target /*: ParseObject | Array<ParseObject>*/, forceFetch /*: boolean*/, options /*: RequestOptions*/) /*: Promise<Array<void> | ParseObject>*/{
10679
+ fetch: function (target /*: ParseObject | Array<ParseObject>*/, forceFetch /*: boolean*/, options /*: RequestOptions*/) /*: Promise<Array<ParseObject | undefined> | ParseObject | undefined>*/{
10631
10680
  var localDatastore = _CoreManager.default.getLocalDatastore();
10632
10681
  if ((0, _isArray.default)(target)) {
10633
10682
  if (target.length < 1) {
@@ -10660,7 +10709,8 @@ var DefaultController = {
10660
10709
  if (error) {
10661
10710
  return _promise.default.reject(error);
10662
10711
  }
10663
- var query = new _ParseQuery.default(className);
10712
+ var ParseQuery = _CoreManager.default.getParseQuery();
10713
+ var query = new ParseQuery(className);
10664
10714
  query.containedIn('objectId', ids);
10665
10715
  if (options && options.include) {
10666
10716
  query.include(options.include);
@@ -10738,7 +10788,7 @@ var DefaultController = {
10738
10788
  return _promise.default.reject(new _ParseError.default(_ParseError.default.MISSING_OBJECT_ID, 'Object does not have an ID'));
10739
10789
  }
10740
10790
  var RESTController = _CoreManager.default.getRESTController();
10741
- var params = {};
10791
+ var params /*: RequestOptions*/ = {};
10742
10792
  if (options && options.include) {
10743
10793
  params.include = options.include.join();
10744
10794
  }
@@ -10765,9 +10815,9 @@ var DefaultController = {
10765
10815
  };
10766
10816
  }());
10767
10817
  }
10768
- return _promise.default.resolve();
10818
+ return _promise.default.resolve(undefined);
10769
10819
  },
10770
- destroy: function (target /*: ParseObject | Array<ParseObject>*/, options /*: RequestOptions*/) /*: Promise<Array<void> | ParseObject>*/{
10820
+ destroy: function (target /*: ParseObject | Array<ParseObject>*/, options /*: RequestOptions*/) /*: Promise<ParseObject | Array<ParseObject>>*/{
10771
10821
  return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
10772
10822
  var batchSize, localDatastore, RESTController, batches, deleteCompleted, errors;
10773
10823
  return _regenerator.default.wrap(function (_context14) {
@@ -10897,7 +10947,7 @@ var DefaultController = {
10897
10947
  }, _callee10);
10898
10948
  }))();
10899
10949
  },
10900
- save: function (target /*: ParseObject | Array<ParseObject | ParseFile>*/, options /*: RequestOptions*/) {
10950
+ save: function (target /*: ParseObject | Array<ParseObject | ParseFile>*/, options /*: RequestOptions*/) /*: Promise<ParseObject | Array<ParseObject> | ParseFile>*/{
10901
10951
  var batchSize = options && options.batchSize ? options.batchSize : _CoreManager.default.get('REQUEST_BATCH_SIZE');
10902
10952
  var localDatastore = _CoreManager.default.getLocalDatastore();
10903
10953
  var mapIdForPin = {};
@@ -11092,10 +11142,11 @@ var DefaultController = {
11092
11142
  return _promise.default.resolve();
11093
11143
  }
11094
11144
  };
11145
+ _CoreManager.default.setParseObject(ParseObject);
11095
11146
  _CoreManager.default.setObjectController(DefaultController);
11096
11147
  var _default = ParseObject;
11097
11148
  exports.default = _default;
11098
- },{"./CoreManager":4,"./LocalDatastoreUtils":16,"./ParseACL":20,"./ParseError":23,"./ParseFile":24,"./ParseOp":29,"./ParseQuery":31,"./ParseRelation":32,"./SingleInstanceStateController":39,"./UniqueInstanceStateController":44,"./canBeSerialized":47,"./decode":48,"./encode":49,"./escape":51,"./parseDate":53,"./promiseUtils":54,"./unique":55,"./unsavedChildren":56,"./uuid":57,"@babel/runtime-corejs3/core-js-stable/array/from":58,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/concat":61,"@babel/runtime-corejs3/core-js-stable/instance/filter":64,"@babel/runtime-corejs3/core-js-stable/instance/find":66,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/includes":68,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/instance/map":71,"@babel/runtime-corejs3/core-js-stable/instance/slice":73,"@babel/runtime-corejs3/core-js-stable/json/stringify":78,"@babel/runtime-corejs3/core-js-stable/object/create":82,"@babel/runtime-corejs3/core-js-stable/object/define-properties":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/freeze":86,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":87,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":89,"@babel/runtime-corejs3/core-js-stable/object/get-prototype-of":90,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/core-js-stable/promise":93,"@babel/runtime-corejs3/core-js-stable/symbol":98,"@babel/runtime-corejs3/core-js-stable/weak-map":99,"@babel/runtime-corejs3/core-js/get-iterator-method":100,"@babel/runtime-corejs3/helpers/asyncToGenerator":105,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/toConsumableArray":125,"@babel/runtime-corejs3/helpers/typeof":128,"@babel/runtime-corejs3/regenerator":131}],29:[function(_dereq_,module,exports){
11149
+ },{"./CoreManager":4,"./LocalDatastoreUtils":16,"./ParseACL":20,"./ParseError":23,"./ParseFile":24,"./ParseOp":29,"./ParseRelation":32,"./SingleInstanceStateController":39,"./UniqueInstanceStateController":44,"./canBeSerialized":47,"./decode":48,"./encode":49,"./escape":51,"./parseDate":53,"./promiseUtils":54,"./unique":55,"./unsavedChildren":56,"./uuid":57,"@babel/runtime-corejs3/core-js-stable/array/from":58,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/concat":61,"@babel/runtime-corejs3/core-js-stable/instance/filter":64,"@babel/runtime-corejs3/core-js-stable/instance/find":66,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/includes":68,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/instance/map":71,"@babel/runtime-corejs3/core-js-stable/instance/slice":73,"@babel/runtime-corejs3/core-js-stable/json/stringify":78,"@babel/runtime-corejs3/core-js-stable/object/create":82,"@babel/runtime-corejs3/core-js-stable/object/define-properties":83,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/freeze":86,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":87,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":88,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":89,"@babel/runtime-corejs3/core-js-stable/object/get-prototype-of":90,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/core-js-stable/promise":93,"@babel/runtime-corejs3/core-js-stable/symbol":98,"@babel/runtime-corejs3/core-js-stable/weak-map":99,"@babel/runtime-corejs3/core-js/get-iterator-method":100,"@babel/runtime-corejs3/helpers/asyncToGenerator":105,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/toConsumableArray":125,"@babel/runtime-corejs3/helpers/typeof":128,"@babel/runtime-corejs3/regenerator":131}],29:[function(_dereq_,module,exports){
11099
11150
  "use strict";
11100
11151
 
11101
11152
  var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
@@ -11122,7 +11173,7 @@ var _map = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable
11122
11173
  var _arrayContainsObject = _interopRequireDefault(_dereq_("./arrayContainsObject"));
11123
11174
  var _decode = _interopRequireDefault(_dereq_("./decode"));
11124
11175
  var _encode = _interopRequireDefault(_dereq_("./encode"));
11125
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
11176
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
11126
11177
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
11127
11178
  var _unique = _interopRequireDefault(_dereq_("./unique"));
11128
11179
  function _createSuper(Derived) {
@@ -11151,7 +11202,7 @@ function _isNativeReflectConstruct() {
11151
11202
  }
11152
11203
  } /**
11153
11204
  * @flow
11154
- */
11205
+ */ /*:: import type ParseObject from './ParseObject';*/
11155
11206
  function opFromJSON(json /*: { [key: string]: any }*/) /*: ?Op*/{
11156
11207
  if (!json || !json.__op) {
11157
11208
  return null;
@@ -11400,9 +11451,10 @@ var AddUniqueOp = /*#__PURE__*/function (_Op5) {
11400
11451
  }
11401
11452
  if ((0, _isArray.default)(value)) {
11402
11453
  var _context;
11454
+ var ParseObject = _CoreManager.default.getParseObject();
11403
11455
  var toAdd = [];
11404
11456
  (0, _forEach.default)(_context = this._value).call(_context, function (v) {
11405
- if (v instanceof _ParseObject.default) {
11457
+ if (v instanceof ParseObject) {
11406
11458
  if (!(0, _arrayContainsObject.default)(value, v)) {
11407
11459
  toAdd.push(v);
11408
11460
  }
@@ -11463,6 +11515,7 @@ var RemoveOp = /*#__PURE__*/function (_Op6) {
11463
11515
  return [];
11464
11516
  }
11465
11517
  if ((0, _isArray.default)(value)) {
11518
+ var ParseObject = _CoreManager.default.getParseObject();
11466
11519
  // var i = value.indexOf(this._value);
11467
11520
  var removed = (0, _concat.default)(value).call(value, []);
11468
11521
  for (var i = 0; i < this._value.length; i++) {
@@ -11471,9 +11524,9 @@ var RemoveOp = /*#__PURE__*/function (_Op6) {
11471
11524
  (0, _splice.default)(removed).call(removed, index, 1);
11472
11525
  index = (0, _indexOf.default)(removed).call(removed, this._value[i]);
11473
11526
  }
11474
- if (this._value[i] instanceof _ParseObject.default && this._value[i].id) {
11527
+ if (this._value[i] instanceof ParseObject && this._value[i].id) {
11475
11528
  for (var j = 0; j < removed.length; j++) {
11476
- if (removed[j] instanceof _ParseObject.default && this._value[i].id === removed[j].id) {
11529
+ if (removed[j] instanceof ParseObject && this._value[i].id === removed[j].id) {
11477
11530
  (0, _splice.default)(removed).call(removed, j, 1);
11478
11531
  j--;
11479
11532
  }
@@ -11498,9 +11551,10 @@ var RemoveOp = /*#__PURE__*/function (_Op6) {
11498
11551
  }
11499
11552
  if (previous instanceof RemoveOp) {
11500
11553
  var _context2;
11554
+ var ParseObject = _CoreManager.default.getParseObject();
11501
11555
  var uniques = (0, _concat.default)(_context2 = previous._value).call(_context2, []);
11502
11556
  for (var i = 0; i < this._value.length; i++) {
11503
- if (this._value[i] instanceof _ParseObject.default) {
11557
+ if (this._value[i] instanceof ParseObject) {
11504
11558
  if (!(0, _arrayContainsObject.default)(uniques, this._value[i])) {
11505
11559
  uniques.push(this._value[i]);
11506
11560
  }
@@ -11676,7 +11730,18 @@ var RelationOp = /*#__PURE__*/function (_Op7) {
11676
11730
  return RelationOp;
11677
11731
  }(Op);
11678
11732
  exports.RelationOp = RelationOp;
11679
- },{"./ParseObject":28,"./ParseRelation":32,"./arrayContainsObject":46,"./decode":48,"./encode":49,"./unique":55,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/concat":61,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/instance/map":71,"@babel/runtime-corejs3/core-js-stable/instance/splice":75,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/reflect/construct":94,"@babel/runtime-corejs3/helpers/assertThisInitialized":104,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/getPrototypeOf":111,"@babel/runtime-corejs3/helpers/inherits":112,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":120}],30:[function(_dereq_,module,exports){
11733
+ _CoreManager.default.setParseOp({
11734
+ Op: Op,
11735
+ opFromJSON: opFromJSON,
11736
+ SetOp: SetOp,
11737
+ UnsetOp: UnsetOp,
11738
+ IncrementOp: IncrementOp,
11739
+ AddOp: AddOp,
11740
+ RelationOp: RelationOp,
11741
+ RemoveOp: RemoveOp,
11742
+ AddUniqueOp: AddUniqueOp
11743
+ });
11744
+ },{"./CoreManager":4,"./ParseRelation":32,"./arrayContainsObject":46,"./decode":48,"./encode":49,"./unique":55,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/concat":61,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/instance/map":71,"@babel/runtime-corejs3/core-js-stable/instance/splice":75,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/reflect/construct":94,"@babel/runtime-corejs3/helpers/assertThisInitialized":104,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/getPrototypeOf":111,"@babel/runtime-corejs3/helpers/inherits":112,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":120}],30:[function(_dereq_,module,exports){
11680
11745
  "use strict";
11681
11746
 
11682
11747
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -14275,6 +14340,7 @@ var DefaultController = {
14275
14340
  return RESTController.request('GET', 'aggregate/' + className, params, options);
14276
14341
  }
14277
14342
  };
14343
+ _CoreManager.default.setParseQuery(ParseQuery);
14278
14344
  _CoreManager.default.setQueryController(DefaultController);
14279
14345
  var _default = ParseQuery;
14280
14346
  exports.default = _default;
@@ -14291,12 +14357,12 @@ var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-st
14291
14357
  var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
14292
14358
  var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
14293
14359
  var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
14294
- var _ParseOp = _dereq_("./ParseOp");
14295
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
14296
- var _ParseQuery = _interopRequireDefault(_dereq_("./ParseQuery"));
14360
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
14297
14361
  /**
14298
14362
  * @flow
14299
14363
  */
14364
+ /*:: import type ParseObject from './ParseObject';*/
14365
+ /*:: import type ParseQuery from './ParseQuery';*/
14300
14366
  /**
14301
14367
  * Creates a new Relation for the given parent object and key. This
14302
14368
  * constructor should rarely be used directly, but rather created by
@@ -14363,7 +14429,9 @@ var ParseRelation = /*#__PURE__*/function () {
14363
14429
  if (!(0, _isArray.default)(objects)) {
14364
14430
  objects = [objects];
14365
14431
  }
14366
- var change = new _ParseOp.RelationOp(objects, []);
14432
+ var _CoreManager$getParse = _CoreManager.default.getParseOp(),
14433
+ RelationOp = _CoreManager$getParse.RelationOp;
14434
+ var change = new RelationOp(objects, []);
14367
14435
  var parent = this.parent;
14368
14436
  if (!parent) {
14369
14437
  throw new Error('Cannot add to a Relation without a parent');
@@ -14387,7 +14455,9 @@ var ParseRelation = /*#__PURE__*/function () {
14387
14455
  if (!(0, _isArray.default)(objects)) {
14388
14456
  objects = [objects];
14389
14457
  }
14390
- var change = new _ParseOp.RelationOp([], objects);
14458
+ var _CoreManager$getParse2 = _CoreManager.default.getParseOp(),
14459
+ RelationOp = _CoreManager$getParse2.RelationOp;
14460
+ var change = new RelationOp([], objects);
14391
14461
  if (!this.parent) {
14392
14462
  throw new Error('Cannot remove from a Relation without a parent');
14393
14463
  }
@@ -14426,11 +14496,12 @@ var ParseRelation = /*#__PURE__*/function () {
14426
14496
  if (!parent) {
14427
14497
  throw new Error('Cannot construct a query for a Relation without a parent');
14428
14498
  }
14499
+ var ParseQuery = _CoreManager.default.getParseQuery();
14429
14500
  if (!this.targetClassName) {
14430
- query = new _ParseQuery.default(parent.className);
14501
+ query = new ParseQuery(parent.className);
14431
14502
  query._extraOptions.redirectClassNameForKey = this.key;
14432
14503
  } else {
14433
- query = new _ParseQuery.default(this.targetClassName);
14504
+ query = new ParseQuery(this.targetClassName);
14434
14505
  }
14435
14506
  query._addCondition('$relatedTo', 'object', {
14436
14507
  __type: 'Pointer',
@@ -14445,7 +14516,7 @@ var ParseRelation = /*#__PURE__*/function () {
14445
14516
  }();
14446
14517
  var _default = ParseRelation;
14447
14518
  exports.default = _default;
14448
- },{"./ParseObject":28,"./ParseOp":29,"./ParseQuery":31,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113}],33:[function(_dereq_,module,exports){
14519
+ },{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/defineProperty":109,"@babel/runtime-corejs3/helpers/interopRequireDefault":113}],33:[function(_dereq_,module,exports){
14449
14520
  "use strict";
14450
14521
 
14451
14522
  var _Reflect$construct = _dereq_("@babel/runtime-corejs3/core-js-stable/reflect/construct");
@@ -14461,6 +14532,7 @@ var _get2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/get")
14461
14532
  var _inherits2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/inherits"));
14462
14533
  var _possibleConstructorReturn2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
14463
14534
  var _getPrototypeOf2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/getPrototypeOf"));
14535
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
14464
14536
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
14465
14537
  var _ParseError = _interopRequireDefault(_dereq_("./ParseError"));
14466
14538
  var _ParseObject2 = _interopRequireDefault(_dereq_("./ParseObject"));
@@ -14634,10 +14706,11 @@ var ParseRole = /*#__PURE__*/function (_ParseObject) {
14634
14706
  }]);
14635
14707
  return ParseRole;
14636
14708
  }(_ParseObject2.default);
14709
+ _CoreManager.default.setParseRole(ParseRole);
14637
14710
  _ParseObject2.default.registerSubclass('_Role', ParseRole);
14638
14711
  var _default = ParseRole;
14639
14712
  exports.default = _default;
14640
- },{"./ParseACL":20,"./ParseError":23,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/reflect/construct":94,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/get":110,"@babel/runtime-corejs3/helpers/getPrototypeOf":111,"@babel/runtime-corejs3/helpers/inherits":112,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":120}],34:[function(_dereq_,module,exports){
14713
+ },{"./CoreManager":4,"./ParseACL":20,"./ParseError":23,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/reflect/construct":94,"@babel/runtime-corejs3/helpers/classCallCheck":106,"@babel/runtime-corejs3/helpers/createClass":108,"@babel/runtime-corejs3/helpers/get":110,"@babel/runtime-corejs3/helpers/getPrototypeOf":111,"@babel/runtime-corejs3/helpers/inherits":112,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/possibleConstructorReturn":120}],34:[function(_dereq_,module,exports){
14641
14714
  "use strict";
14642
14715
 
14643
14716
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -16903,6 +16976,7 @@ var DefaultController = {
16903
16976
  }, options);
16904
16977
  }
16905
16978
  };
16979
+ _CoreManager.default.setParseUser(ParseUser);
16906
16980
  _CoreManager.default.setUserController(DefaultController);
16907
16981
  var _default = ParseUser;
16908
16982
  exports.default = _default;
@@ -17398,7 +17472,6 @@ var _typeof = _dereq_("@babel/runtime-corejs3/helpers/typeof");
17398
17472
  var _WeakMap = _dereq_("@babel/runtime-corejs3/core-js-stable/weak-map");
17399
17473
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
17400
17474
  var _Object$getOwnPropertyDescriptor = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
17401
- var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
17402
17475
  _Object$defineProperty(exports, "__esModule", {
17403
17476
  value: true
17404
17477
  });
@@ -17420,7 +17493,6 @@ exports.removeState = removeState;
17420
17493
  exports.setPendingOp = setPendingOp;
17421
17494
  exports.setServerData = setServerData;
17422
17495
  var ObjectStateMutations = _interopRequireWildcard(_dereq_("./ObjectStateMutations"));
17423
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
17424
17496
  function _getRequireWildcardCache(nodeInterop) {
17425
17497
  if (typeof _WeakMap !== "function") return null;
17426
17498
  var cacheBabelInterop = new _WeakMap();
@@ -17544,12 +17616,12 @@ function getObjectCache(obj /*: ObjectIdentifier*/) /*: ObjectCache*/{
17544
17616
  }
17545
17617
  return {};
17546
17618
  }
17547
- function estimateAttribute(obj /*: ParseObject*/, attr /*: string*/) /*: mixed*/{
17619
+ function estimateAttribute(obj /*: ObjectIdentifier*/, attr /*: string*/) /*: mixed*/{
17548
17620
  var serverData = getServerData(obj);
17549
17621
  var pendingOps = getPendingOps(obj);
17550
17622
  return ObjectStateMutations.estimateAttribute(serverData, pendingOps, obj, attr);
17551
17623
  }
17552
- function estimateAttributes(obj /*: ParseObject*/) /*: AttributeMap*/{
17624
+ function estimateAttributes(obj /*: ObjectIdentifier*/) /*: AttributeMap*/{
17553
17625
  var serverData = getServerData(obj);
17554
17626
  var pendingOps = getPendingOps(obj);
17555
17627
  return ObjectStateMutations.estimateAttributes(serverData, pendingOps, obj);
@@ -17568,7 +17640,7 @@ function clearAllState() {
17568
17640
  function duplicateState(source /*: { id: string }*/, dest /*: { id: string }*/) {
17569
17641
  dest.id = source.id;
17570
17642
  }
17571
- },{"./ObjectStateMutations":17,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":87,"@babel/runtime-corejs3/core-js-stable/weak-map":99,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],40:[function(_dereq_,module,exports){
17643
+ },{"./ObjectStateMutations":17,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":87,"@babel/runtime-corejs3/core-js-stable/weak-map":99,"@babel/runtime-corejs3/helpers/typeof":128}],40:[function(_dereq_,module,exports){
17572
17644
  "use strict";
17573
17645
 
17574
17646
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -17975,23 +18047,24 @@ _Object$defineProperty(exports, "__esModule", {
17975
18047
  });
17976
18048
  exports.default = arrayContainsObject;
17977
18049
  var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
17978
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18050
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
17979
18051
  /**
17980
18052
  * @flow
17981
18053
  */
17982
-
18054
+ /*:: import type ParseObject from './ParseObject';*/
17983
18055
  function arrayContainsObject(array /*: Array<any>*/, object /*: ParseObject*/) /*: boolean*/{
17984
18056
  if ((0, _indexOf.default)(array).call(array, object) > -1) {
17985
18057
  return true;
17986
18058
  }
18059
+ var ParseObject = _CoreManager.default.getParseObject();
17987
18060
  for (var i = 0; i < array.length; i++) {
17988
- if (array[i] instanceof _ParseObject.default && array[i].className === object.className && array[i]._getId() === object._getId()) {
18061
+ if (array[i] instanceof ParseObject && array[i].className === object.className && array[i]._getId() === object._getId()) {
17989
18062
  return true;
17990
18063
  }
17991
18064
  }
17992
18065
  return false;
17993
18066
  }
17994
- },{"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113}],47:[function(_dereq_,module,exports){
18067
+ },{"./CoreManager":4,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113}],47:[function(_dereq_,module,exports){
17995
18068
  "use strict";
17996
18069
 
17997
18070
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18002,15 +18075,16 @@ _Object$defineProperty(exports, "__esModule", {
18002
18075
  exports.default = canBeSerialized;
18003
18076
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
18004
18077
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
18078
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18005
18079
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
18006
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18007
18080
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
18008
18081
  /**
18009
18082
  * @flow
18010
18083
  */
18011
-
18084
+ /*:: import type ParseObject from './ParseObject';*/
18012
18085
  function canBeSerialized(obj /*: ParseObject*/) /*: boolean*/{
18013
- if (!(obj instanceof _ParseObject.default)) {
18086
+ var ParseObject = _CoreManager.default.getParseObject();
18087
+ if (!(obj instanceof ParseObject)) {
18014
18088
  return true;
18015
18089
  }
18016
18090
  var attributes = obj.attributes;
@@ -18029,7 +18103,8 @@ function canBeSerializedHelper(value /*: any*/) /*: boolean*/{
18029
18103
  if (value instanceof _ParseRelation.default) {
18030
18104
  return true;
18031
18105
  }
18032
- if (value instanceof _ParseObject.default) {
18106
+ var ParseObject = _CoreManager.default.getParseObject();
18107
+ if (value instanceof ParseObject) {
18033
18108
  return !!value.id;
18034
18109
  }
18035
18110
  if (value instanceof _ParseFile.default) {
@@ -18053,7 +18128,7 @@ function canBeSerializedHelper(value /*: any*/) /*: boolean*/{
18053
18128
  }
18054
18129
  return true;
18055
18130
  }
18056
- },{"./ParseFile":24,"./ParseObject":28,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],48:[function(_dereq_,module,exports){
18131
+ },{"./CoreManager":4,"./ParseFile":24,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],48:[function(_dereq_,module,exports){
18057
18132
  "use strict";
18058
18133
 
18059
18134
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18065,16 +18140,16 @@ exports.default = decode;
18065
18140
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
18066
18141
  var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
18067
18142
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
18143
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18068
18144
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
18069
18145
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
18070
18146
  var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
18071
18147
  var _ParsePolygon = _interopRequireDefault(_dereq_("./ParsePolygon"));
18072
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18073
- var _ParseOp = _dereq_("./ParseOp");
18074
18148
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
18075
18149
  /**
18076
18150
  * @flow
18077
18151
  */
18152
+
18078
18153
  // eslint-disable-line no-unused-vars
18079
18154
 
18080
18155
  function decode(value /*: any*/) /*: any*/{
@@ -18089,13 +18164,16 @@ function decode(value /*: any*/) /*: any*/{
18089
18164
  return dup;
18090
18165
  }
18091
18166
  if (typeof value.__op === 'string') {
18092
- return (0, _ParseOp.opFromJSON)(value);
18167
+ var _CoreManager$getParse = _CoreManager.default.getParseOp(),
18168
+ opFromJSON = _CoreManager$getParse.opFromJSON;
18169
+ return opFromJSON(value);
18093
18170
  }
18171
+ var ParseObject = _CoreManager.default.getParseObject();
18094
18172
  if (value.__type === 'Pointer' && value.className) {
18095
- return _ParseObject.default.fromJSON(value);
18173
+ return ParseObject.fromJSON(value);
18096
18174
  }
18097
18175
  if (value.__type === 'Object' && value.className) {
18098
- return _ParseObject.default.fromJSON(value);
18176
+ return ParseObject.fromJSON(value);
18099
18177
  }
18100
18178
  if (value.__type === 'Relation') {
18101
18179
  // The parent and key fields will be populated by the parent
@@ -18124,7 +18202,7 @@ function decode(value /*: any*/) /*: any*/{
18124
18202
  }
18125
18203
  return copy;
18126
18204
  }
18127
- },{"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParseObject":28,"./ParseOp":29,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],49:[function(_dereq_,module,exports){
18205
+ },{"./CoreManager":4,"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],49:[function(_dereq_,module,exports){
18128
18206
  "use strict";
18129
18207
 
18130
18208
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18140,19 +18218,19 @@ var _startsWith = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js
18140
18218
  var _concat = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/concat"));
18141
18219
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
18142
18220
  var _map = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/map"));
18221
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18143
18222
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
18144
18223
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
18145
18224
  var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
18146
18225
  var _ParsePolygon = _interopRequireDefault(_dereq_("./ParsePolygon"));
18147
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18148
- var _ParseOp = _dereq_("./ParseOp");
18149
18226
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
18150
18227
  /**
18151
18228
  * @flow
18152
18229
  */
18153
18230
 
18154
18231
  function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers /*: boolean*/, seen /*: Array<mixed>*/, offline /*: boolean*/) /*: any*/{
18155
- if (value instanceof _ParseObject.default) {
18232
+ var ParseObject = _CoreManager.default.getParseObject();
18233
+ if (value instanceof ParseObject) {
18156
18234
  if (disallowObjects) {
18157
18235
  throw new Error('Parse Objects not allowed here');
18158
18236
  }
@@ -18167,7 +18245,9 @@ function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers
18167
18245
  seen = (0, _concat.default)(seen).call(seen, seenEntry);
18168
18246
  return value._toFullJSON(seen, offline);
18169
18247
  }
18170
- if (value instanceof _ParseOp.Op || value instanceof _ParseACL.default || value instanceof _ParseGeoPoint.default || value instanceof _ParsePolygon.default || value instanceof _ParseRelation.default) {
18248
+ var _CoreManager$getParse = _CoreManager.default.getParseOp(),
18249
+ Op = _CoreManager$getParse.Op;
18250
+ if (value instanceof Op || value instanceof _ParseACL.default || value instanceof _ParseGeoPoint.default || value instanceof _ParsePolygon.default || value instanceof _ParseRelation.default) {
18171
18251
  return value.toJSON();
18172
18252
  }
18173
18253
  if (value instanceof _ParseFile.default) {
@@ -18205,7 +18285,7 @@ function encode(value /*: mixed*/, disallowObjects /*: boolean*/, forcePointers
18205
18285
  function _default(value /*: mixed*/, disallowObjects /*:: ?: boolean*/, forcePointers /*:: ?: boolean*/, seen /*:: ?: Array<mixed>*/, offline /*:: ?: boolean*/) /*: any*/{
18206
18286
  return encode(value, !!disallowObjects, !!forcePointers, seen || [], offline);
18207
18287
  }
18208
- },{"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParseObject":28,"./ParseOp":29,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/concat":61,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/instance/map":71,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],50:[function(_dereq_,module,exports){
18288
+ },{"./CoreManager":4,"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParsePolygon":30,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/concat":61,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/instance/map":71,"@babel/runtime-corejs3/core-js-stable/instance/starts-with":76,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],50:[function(_dereq_,module,exports){
18209
18289
  "use strict";
18210
18290
 
18211
18291
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18217,10 +18297,10 @@ exports.default = equals;
18217
18297
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
18218
18298
  var _keys = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/object/keys"));
18219
18299
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
18300
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18220
18301
  var _ParseACL = _interopRequireDefault(_dereq_("./ParseACL"));
18221
18302
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
18222
18303
  var _ParseGeoPoint = _interopRequireDefault(_dereq_("./ParseGeoPoint"));
18223
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18224
18304
  function equals(a, b) {
18225
18305
  var toString = Object.prototype.toString;
18226
18306
  if (toString.call(a) === '[object Date]' || toString.call(b) === '[object Date]') {
@@ -18249,10 +18329,11 @@ function equals(a, b) {
18249
18329
  }
18250
18330
  return true;
18251
18331
  }
18252
- if (a instanceof _ParseACL.default || a instanceof _ParseFile.default || a instanceof _ParseGeoPoint.default || a instanceof _ParseObject.default) {
18332
+ var ParseObject = _CoreManager.default.getParseObject();
18333
+ if (a instanceof _ParseACL.default || a instanceof _ParseFile.default || a instanceof _ParseGeoPoint.default || a instanceof ParseObject) {
18253
18334
  return a.equals(b);
18254
18335
  }
18255
- if (b instanceof _ParseObject.default) {
18336
+ if (b instanceof ParseObject) {
18256
18337
  if (a.__type === 'Object' || a.__type === 'Pointer') {
18257
18338
  return a.objectId === b.id && a.className === b.className;
18258
18339
  }
@@ -18267,7 +18348,7 @@ function equals(a, b) {
18267
18348
  }
18268
18349
  return true;
18269
18350
  }
18270
- },{"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"./ParseObject":28,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],51:[function(_dereq_,module,exports){
18351
+ },{"./CoreManager":4,"./ParseACL":20,"./ParseFile":24,"./ParseGeoPoint":25,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/core-js-stable/object/keys":91,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],51:[function(_dereq_,module,exports){
18271
18352
  "use strict";
18272
18353
 
18273
18354
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18432,7 +18513,7 @@ exports.default = unique;
18432
18513
  var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
18433
18514
  var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
18434
18515
  var _arrayContainsObject = _interopRequireDefault(_dereq_("./arrayContainsObject"));
18435
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18516
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18436
18517
  /**
18437
18518
  * @flow
18438
18519
  */
@@ -18440,7 +18521,8 @@ var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18440
18521
  function unique /*:: <T>*/(arr /*: Array<T>*/) /*: Array<T>*/{
18441
18522
  var uniques = [];
18442
18523
  (0, _forEach.default)(arr).call(arr, function (value) {
18443
- if (value instanceof _ParseObject.default) {
18524
+ var ParseObject = _CoreManager.default.getParseObject();
18525
+ if (value instanceof ParseObject) {
18444
18526
  if (!(0, _arrayContainsObject.default)(uniques, value)) {
18445
18527
  uniques.push(value);
18446
18528
  }
@@ -18452,7 +18534,7 @@ function unique /*:: <T>*/(arr /*: Array<T>*/) /*: Array<T>*/{
18452
18534
  });
18453
18535
  return uniques;
18454
18536
  }
18455
- },{"./ParseObject":28,"./arrayContainsObject":46,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113}],56:[function(_dereq_,module,exports){
18537
+ },{"./CoreManager":4,"./arrayContainsObject":46,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113}],56:[function(_dereq_,module,exports){
18456
18538
  "use strict";
18457
18539
 
18458
18540
  var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
@@ -18466,12 +18548,13 @@ var _indexOf = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-st
18466
18548
  var _isArray = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/array/is-array"));
18467
18549
  var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
18468
18550
  var _typeof2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/typeof"));
18551
+ var _CoreManager = _interopRequireDefault(_dereq_("./CoreManager"));
18469
18552
  var _ParseFile = _interopRequireDefault(_dereq_("./ParseFile"));
18470
- var _ParseObject = _interopRequireDefault(_dereq_("./ParseObject"));
18471
18553
  var _ParseRelation = _interopRequireDefault(_dereq_("./ParseRelation"));
18472
18554
  /**
18473
18555
  * @flow
18474
18556
  */
18557
+ /*:: import type ParseObject from './ParseObject';*/
18475
18558
  /*:: type EncounterMap = {
18476
18559
  objects: { [identifier: string]: ParseObject | boolean },
18477
18560
  files: Array<ParseFile>,
@@ -18506,7 +18589,8 @@ function unsavedChildren(obj /*: ParseObject*/, allowDeepUnsaved /*:: ?: boolean
18506
18589
  return (0, _concat.default)(unsaved).call(unsaved, encountered.files);
18507
18590
  }
18508
18591
  function traverse(obj /*: ParseObject*/, encountered /*: EncounterMap*/, shouldThrow /*: boolean*/, allowDeepUnsaved /*: boolean*/) {
18509
- if (obj instanceof _ParseObject.default) {
18592
+ var ParseObject = _CoreManager.default.getParseObject();
18593
+ if (obj instanceof ParseObject) {
18510
18594
  if (!obj.id && shouldThrow) {
18511
18595
  throw new Error('Cannot create a pointer to an unsaved Object.');
18512
18596
  }
@@ -18545,15 +18629,21 @@ function traverse(obj /*: ParseObject*/, encountered /*: EncounterMap*/, shouldT
18545
18629
  }
18546
18630
  }
18547
18631
  }
18548
- },{"./ParseFile":24,"./ParseObject":28,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/concat":61,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],57:[function(_dereq_,module,exports){
18632
+ },{"./CoreManager":4,"./ParseFile":24,"./ParseRelation":32,"@babel/runtime-corejs3/core-js-stable/array/is-array":59,"@babel/runtime-corejs3/core-js-stable/instance/concat":61,"@babel/runtime-corejs3/core-js-stable/instance/for-each":67,"@babel/runtime-corejs3/core-js-stable/instance/index-of":69,"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"@babel/runtime-corejs3/helpers/interopRequireDefault":113,"@babel/runtime-corejs3/helpers/typeof":128}],57:[function(_dereq_,module,exports){
18549
18633
  "use strict";
18550
18634
 
18551
- var uuid = null;
18552
- var _require = _dereq_('uuid'),
18553
- v4 = _require.v4;
18554
- uuid = v4;
18635
+ var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
18636
+ _Object$defineProperty(exports, "__esModule", {
18637
+ value: true
18638
+ });
18639
+ exports.default = void 0;
18640
+ var _uuid = _dereq_("uuid");
18641
+ var uuid /*: () => string*/ = null;
18642
+ uuid = _uuid.v4;
18555
18643
  module.exports = uuid;
18556
- },{"uuid":624}],58:[function(_dereq_,module,exports){
18644
+ var _default = uuid;
18645
+ exports.default = _default;
18646
+ },{"@babel/runtime-corejs3/core-js-stable/object/define-property":84,"uuid":624}],58:[function(_dereq_,module,exports){
18557
18647
  module.exports = _dereq_("core-js-pure/stable/array/from");
18558
18648
  },{"core-js-pure/stable/array/from":560}],59:[function(_dereq_,module,exports){
18559
18649
  module.exports = _dereq_("core-js-pure/stable/array/is-array");