@fluid-experimental/property-changeset 2.0.0-internal.3.0.5 → 2.0.0-internal.3.1.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 (113) hide show
  1. package/README.md +1 -0
  2. package/dist/changeset.d.ts +2 -2
  3. package/dist/changeset.d.ts.map +1 -1
  4. package/dist/changeset.js +61 -45
  5. package/dist/changeset.js.map +1 -1
  6. package/dist/changeset_operations/array.d.ts +6 -6
  7. package/dist/changeset_operations/array.d.ts.map +1 -1
  8. package/dist/changeset_operations/array.js +87 -56
  9. package/dist/changeset_operations/array.js.map +1 -1
  10. package/dist/changeset_operations/arrayChangesetIterator.d.ts.map +1 -1
  11. package/dist/changeset_operations/arrayChangesetIterator.js +43 -41
  12. package/dist/changeset_operations/arrayChangesetIterator.js.map +1 -1
  13. package/dist/changeset_operations/changesetConflictTypes.d.ts.map +1 -1
  14. package/dist/changeset_operations/changesetConflictTypes.js.map +1 -1
  15. package/dist/changeset_operations/indexedCollection.d.ts.map +1 -1
  16. package/dist/changeset_operations/indexedCollection.js +76 -44
  17. package/dist/changeset_operations/indexedCollection.js.map +1 -1
  18. package/dist/changeset_operations/isEmptyChangeset.d.ts.map +1 -1
  19. package/dist/changeset_operations/isEmptyChangeset.js +2 -1
  20. package/dist/changeset_operations/isEmptyChangeset.js.map +1 -1
  21. package/dist/changeset_operations/operationTypes.d.ts.map +1 -1
  22. package/dist/changeset_operations/operationTypes.js.map +1 -1
  23. package/dist/helpers/typeidHelper.d.ts +10 -10
  24. package/dist/helpers/typeidHelper.d.ts.map +1 -1
  25. package/dist/helpers/typeidHelper.js +19 -17
  26. package/dist/helpers/typeidHelper.js.map +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/isReservedKeyword.d.ts.map +1 -1
  30. package/dist/isReservedKeyword.js.map +1 -1
  31. package/dist/pathHelper.d.ts.map +1 -1
  32. package/dist/pathHelper.js +16 -10
  33. package/dist/pathHelper.js.map +1 -1
  34. package/dist/rebase.d.ts.map +1 -1
  35. package/dist/rebase.js +20 -13
  36. package/dist/rebase.js.map +1 -1
  37. package/dist/templateSchema.d.ts.map +1 -1
  38. package/dist/templateSchema.js +10 -11
  39. package/dist/templateSchema.js.map +1 -1
  40. package/dist/templateValidator.d.ts.map +1 -1
  41. package/dist/templateValidator.js +135 -102
  42. package/dist/templateValidator.js.map +1 -1
  43. package/dist/test/array.spec.js +141 -343
  44. package/dist/test/array.spec.js.map +1 -1
  45. package/dist/test/pathHelper.spec.js +299 -166
  46. package/dist/test/pathHelper.spec.js.map +1 -1
  47. package/dist/test/reversibleCs.spec.js.map +1 -1
  48. package/dist/test/schemaValidator.js +3 -1
  49. package/dist/test/schemaValidator.js.map +1 -1
  50. package/dist/test/schemas/badBothPropertiesAndTypeid.js +8 -8
  51. package/dist/test/schemas/badBothPropertiesAndTypeid.js.map +1 -1
  52. package/dist/test/schemas/badInvalidSemverInTypeid.js +18 -16
  53. package/dist/test/schemas/badInvalidSemverInTypeid.js.map +1 -1
  54. package/dist/test/schemas/badMissingSemverInTypeid.js +18 -16
  55. package/dist/test/schemas/badMissingSemverInTypeid.js.map +1 -1
  56. package/dist/test/schemas/badNestedProperties.js +18 -17
  57. package/dist/test/schemas/badNestedProperties.js.map +1 -1
  58. package/dist/test/schemas/badPrimitiveTypeid.js +9 -8
  59. package/dist/test/schemas/badPrimitiveTypeid.js.map +1 -1
  60. package/dist/test/schemas/badVersionedTypeid.js +19 -17
  61. package/dist/test/schemas/badVersionedTypeid.js.map +1 -1
  62. package/dist/test/schemas/goodColorPalette.js +4 -4
  63. package/dist/test/schemas/goodColorPalette.js.map +1 -1
  64. package/dist/test/schemas/goodDraftAsVersion.js +2 -4
  65. package/dist/test/schemas/goodDraftAsVersion.js.map +1 -1
  66. package/dist/test/schemas/goodPointId.js +18 -16
  67. package/dist/test/schemas/goodPointId.js.map +1 -1
  68. package/dist/test/schemas/goodReferenceAndRegular.js +5 -5
  69. package/dist/test/schemas/goodReferenceAndRegular.js.map +1 -1
  70. package/dist/test/schemas/goodReservedTypes.js +8 -7
  71. package/dist/test/schemas/goodReservedTypes.js.map +1 -1
  72. package/dist/test/schemas/goodUIBorder.js +19 -16
  73. package/dist/test/schemas/goodUIBorder.js.map +1 -1
  74. package/dist/test/tsconfig.tsbuildinfo +1 -1
  75. package/dist/test/validator/templateSyntax.spec.js.map +1 -1
  76. package/dist/test/validator/templateValidator.spec.js +329 -306
  77. package/dist/test/validator/templateValidator.spec.js.map +1 -1
  78. package/dist/test/validator/typeidHelper.spec.js +98 -65
  79. package/dist/test/validator/typeidHelper.spec.js.map +1 -1
  80. package/dist/utils.d.ts +1 -1
  81. package/dist/utils.d.ts.map +1 -1
  82. package/dist/utils.js +149 -95
  83. package/dist/utils.js.map +1 -1
  84. package/dist/validationResultBuilder.d.ts.map +1 -1
  85. package/dist/validationResultBuilder.js.map +1 -1
  86. package/lib/changeset.js +63 -47
  87. package/lib/changeset.js.map +1 -1
  88. package/lib/changeset_operations/array.js +88 -57
  89. package/lib/changeset_operations/array.js.map +1 -1
  90. package/lib/changeset_operations/arrayChangesetIterator.js +43 -41
  91. package/lib/changeset_operations/arrayChangesetIterator.js.map +1 -1
  92. package/lib/changeset_operations/changesetConflictTypes.js.map +1 -1
  93. package/lib/changeset_operations/indexedCollection.js +76 -44
  94. package/lib/changeset_operations/indexedCollection.js.map +1 -1
  95. package/lib/changeset_operations/isEmptyChangeset.js +2 -1
  96. package/lib/changeset_operations/isEmptyChangeset.js.map +1 -1
  97. package/lib/changeset_operations/operationTypes.js.map +1 -1
  98. package/lib/helpers/typeidHelper.js +19 -17
  99. package/lib/helpers/typeidHelper.js.map +1 -1
  100. package/lib/index.js.map +1 -1
  101. package/lib/isReservedKeyword.js.map +1 -1
  102. package/lib/pathHelper.js +17 -11
  103. package/lib/pathHelper.js.map +1 -1
  104. package/lib/rebase.js +20 -13
  105. package/lib/rebase.js.map +1 -1
  106. package/lib/templateSchema.js +10 -11
  107. package/lib/templateSchema.js.map +1 -1
  108. package/lib/templateValidator.js +135 -102
  109. package/lib/templateValidator.js.map +1 -1
  110. package/lib/utils.js +149 -95
  111. package/lib/utils.js.map +1 -1
  112. package/lib/validationResultBuilder.js.map +1 -1
  113. package/package.json +100 -100
@@ -96,7 +96,8 @@ const getRangeForCurrentStateOperation = function (io_operation, in_aOffset, io_
96
96
  io_resultingRange.end = io_operation.operation[0];
97
97
  io_resultingRange.op = io_operation;
98
98
  io_resultingRange.flag = ArrayChangeSetRangeType.completeA;
99
- io_resultingRange.removeInsertOperation = io_operation.removeInsertOperation;
99
+ io_resultingRange.removeInsertOperation =
100
+ io_operation.removeInsertOperation;
100
101
  return;
101
102
  case arrayChangesetIterator_1.ArrayChangeSetIterator.types.MODIFY:
102
103
  io_resultingRange.begin = io_operation.operation[0];
@@ -108,7 +109,7 @@ const getRangeForCurrentStateOperation = function (io_operation, in_aOffset, io_
108
109
  throw new Error(`getRangeForCurrentStateOperation: ${MSG.UNKNOWN_OPERATION}`);
109
110
  }
110
111
  };
111
- const getOpLength = (op) => (0, isNumber_1.default)(op[1]) ? op[1] : op[1].length;
112
+ const getOpLength = (op) => ((0, isNumber_1.default)(op[1]) ? op[1] : op[1].length);
112
113
  /**
113
114
  * Computes the impact range for a given operation of the applied change set
114
115
  * @param in_operation - The op
@@ -284,7 +285,8 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
284
285
  }
285
286
  if (io_rangeB.removeInsertOperation &&
286
287
  io_rangeB.op.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE &&
287
- (io_rangeA.begin === undefined || io_rangeB.removeInsertOperation[0] < io_rangeA.begin - io_rangeA.op.offset) &&
288
+ (io_rangeA.begin === undefined ||
289
+ io_rangeB.removeInsertOperation[0] < io_rangeA.begin - io_rangeA.op.offset) &&
288
290
  io_rangeB.removeInsertOperation[0] < io_rangeB.begin &&
289
291
  !io_rangeB.insertAlreadyProcessed) {
290
292
  io_resultingSegment.begin = io_rangeB.removeInsertOperation[0];
@@ -321,17 +323,18 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
321
323
  nextInsertOffset = getOpLength(io_rangeA.removeInsertOperation);
322
324
  }
323
325
  if (!in_rebasing &&
324
- (io_rangeA.begin <= io_rangeB.begin) &&
325
- (io_rangeA.begin + nextInsertOffset >= io_rangeB.begin) &&
326
- (io_rangeA.op.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE) &&
326
+ io_rangeA.begin <= io_rangeB.begin &&
327
+ io_rangeA.begin + nextInsertOffset >= io_rangeB.begin &&
328
+ io_rangeA.op.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE &&
327
329
  Array.isArray(io_rangeA.op.operation[1]) && // This is a reversible remove operation
328
- (io_rangeB.op.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.INSERT)) {
330
+ io_rangeB.op.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.INSERT) {
329
331
  // Are the two operations canceling out?
330
332
  let startOffset = 0;
331
333
  let rangeStart = 0;
332
334
  let matchFound = false;
333
335
  let rangeLength = io_rangeB.op.operation[1].length;
334
- const operationMetaInfo = in_options && in_options.applyAfterMetaInformation &&
336
+ const operationMetaInfo = in_options &&
337
+ in_options.applyAfterMetaInformation &&
335
338
  in_options.applyAfterMetaInformation.get(io_rangeB.op.operation[1]);
336
339
  if (operationMetaInfo && operationMetaInfo.rebasedRemoveInsertRanges) {
337
340
  if (operationMetaInfo.currentInsertOffset === undefined) {
@@ -340,13 +343,16 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
340
343
  }
341
344
  let i = 0;
342
345
  for (; i < operationMetaInfo.rebasedRemoveInsertRanges.length; i++) {
343
- if (operationMetaInfo.rebasedRemoveInsertRanges[i].rangeStart >= operationMetaInfo.currentInsertOffset) {
344
- startOffset = operationMetaInfo.rebasedRemoveInsertRanges[i].originalStartPosition -
345
- io_rangeA.op.operation[0] +
346
- io_rangeA.op.offset +
347
- io_rangeB.op.offset;
348
- rangeStart = operationMetaInfo.rebasedRemoveInsertRanges[i].rangeStart -
349
- operationMetaInfo.currentInsertOffset;
346
+ if (operationMetaInfo.rebasedRemoveInsertRanges[i].rangeStart >=
347
+ operationMetaInfo.currentInsertOffset) {
348
+ startOffset =
349
+ operationMetaInfo.rebasedRemoveInsertRanges[i].originalStartPosition -
350
+ io_rangeA.op.operation[0] +
351
+ io_rangeA.op.offset +
352
+ io_rangeB.op.offset;
353
+ rangeStart =
354
+ operationMetaInfo.rebasedRemoveInsertRanges[i].rangeStart -
355
+ operationMetaInfo.currentInsertOffset;
350
356
  rangeLength = operationMetaInfo.rebasedRemoveInsertRanges[i].rangeLength;
351
357
  if (io_rangeA.op.operation[1].length - startOffset >= rangeLength &&
352
358
  (0, isEqual_1.default)(io_rangeA.op.operation[1].slice(startOffset, startOffset + rangeLength), io_rangeB.op.operation[1].slice(rangeStart, rangeStart + rangeLength))) {
@@ -415,14 +421,16 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
415
421
  io_resultingSegment.end = io_rangeA.end;
416
422
  io_resultingSegment.op = undefined; // This is used to indicate that we don't need any operation
417
423
  if (io_rangeB.op.operation[1].length === rangeLength) {
418
- io_resultingSegment.flag = io_rangeA.op.operation[1].length === rangeLength
419
- ? ArrayChangeSetRangeType.completeAcompleteB
420
- : ArrayChangeSetRangeType.completeBpartOfA;
424
+ io_resultingSegment.flag =
425
+ io_rangeA.op.operation[1].length === rangeLength
426
+ ? ArrayChangeSetRangeType.completeAcompleteB
427
+ : ArrayChangeSetRangeType.completeBpartOfA;
421
428
  }
422
429
  else {
423
- io_resultingSegment.flag = io_rangeA.op.operation[1].length === rangeLength
424
- ? ArrayChangeSetRangeType.completeApartOfB
425
- : ArrayChangeSetRangeType.partOfApartOfB;
430
+ io_resultingSegment.flag =
431
+ io_rangeA.op.operation[1].length === rangeLength
432
+ ? ArrayChangeSetRangeType.completeApartOfB
433
+ : ArrayChangeSetRangeType.partOfApartOfB;
426
434
  }
427
435
  // cut the remaining segment entry
428
436
  if (io_resultingSegment.flag === ArrayChangeSetRangeType.partOfApartOfB ||
@@ -439,9 +447,9 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
439
447
  }
440
448
  }
441
449
  }
442
- if ((io_rangeA.end < io_rangeB.begin) || // please see in_rebasing comments in the function description
450
+ if (io_rangeA.end < io_rangeB.begin || // please see in_rebasing comments in the function description
443
451
  ((!in_rebasing || io_rangeA.op.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE) &&
444
- (io_rangeA.end === io_rangeB.begin))) {
452
+ io_rangeA.end === io_rangeB.begin)) {
445
453
  io_resultingSegment.begin = io_rangeA.begin;
446
454
  io_resultingSegment.end = io_rangeA.end;
447
455
  io_resultingSegment.op = io_rangeA.op;
@@ -456,18 +464,20 @@ const splitOverlapping = function (io_rangeA, io_rangeB, io_resultingSegment, in
456
464
  length = length.length;
457
465
  }
458
466
  in_options.applyAfterMetaInformation.set(io_rangeB.op.operation[1], {
459
- rebasedRemoveInsertRanges: [{
467
+ rebasedRemoveInsertRanges: [
468
+ {
460
469
  rangeStart: 0,
461
470
  rangeLength: length,
462
471
  originalStartPosition: io_rangeA.end + io_rangeB.op.offset,
463
- }],
472
+ },
473
+ ],
464
474
  });
465
475
  }
466
476
  }
467
477
  return;
468
478
  }
469
- if ((io_rangeB.end < io_rangeA.begin) || // please see in_rebasing comments in the function description
470
- (!in_rebasing && (io_rangeB.end === io_rangeA.begin))) {
479
+ if (io_rangeB.end < io_rangeA.begin || // please see in_rebasing comments in the function description
480
+ (!in_rebasing && io_rangeB.end === io_rangeA.begin)) {
471
481
  io_resultingSegment.begin = io_rangeB.begin;
472
482
  io_resultingSegment.end = io_rangeB.end;
473
483
  io_resultingSegment.op = io_rangeB.op;
@@ -685,16 +695,20 @@ const pushOp = function (in_op, io_changeset, in_indexOffset, in_options, in_las
685
695
  }
686
696
  switch (in_op.type) {
687
697
  case arrayChangesetIterator_1.ArrayChangeSetIterator.types.INSERT: {
688
- if (in_options && in_options.applyAfterMetaInformation && !(0, isNumber_1.default)(in_op.operation[1])) {
698
+ if (in_options &&
699
+ in_options.applyAfterMetaInformation &&
700
+ !(0, isNumber_1.default)(in_op.operation[1])) {
689
701
  // If we don't have any meta information yet, we add an entry with the correct offset applied
690
702
  const metaInfo = in_options.applyAfterMetaInformation.get(in_op.operation[1]);
691
703
  if (!metaInfo) {
692
704
  in_options.applyAfterMetaInformation.set(in_op.operation[1], {
693
- rebasedRemoveInsertRanges: [{
705
+ rebasedRemoveInsertRanges: [
706
+ {
694
707
  rangeStart: 0,
695
708
  rangeLength: in_op.operation[1].length,
696
709
  originalStartPosition: in_op.operation[0],
697
- }],
710
+ },
711
+ ],
698
712
  });
699
713
  }
700
714
  }
@@ -717,7 +731,11 @@ const pushOp = function (in_op, io_changeset, in_indexOffset, in_options, in_las
717
731
  case arrayChangesetIterator_1.ArrayChangeSetIterator.types.MODIFY: {
718
732
  if (!mergeWithLastIfPossible(in_op, io_changeset, writeTargetIndex, in_options)) {
719
733
  if (in_op.operation[2] !== undefined) {
720
- io_changeset.modify.push([writeTargetIndex, in_op.operation[1], in_op.operation[2]]);
734
+ io_changeset.modify.push([
735
+ writeTargetIndex,
736
+ in_op.operation[1],
737
+ in_op.operation[2],
738
+ ]);
721
739
  }
722
740
  else {
723
741
  io_changeset.modify.push([writeTargetIndex, in_op.operation[1]]);
@@ -753,7 +771,9 @@ const handleCombinations = function (in_segment, in_isPrimitiveType) {
753
771
  }
754
772
  case arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE: {
755
773
  // Attention: B removes A completely, kill A to avoid zero inserts
756
- const opBLen = (0, isNumber_1.default)(opB.operation[1]) ? opB.operation[1] : opB.operation[1].length;
774
+ const opBLen = (0, isNumber_1.default)(opB.operation[1])
775
+ ? opB.operation[1]
776
+ : opB.operation[1].length;
757
777
  if (opBLen !== opA.operation[1].length) {
758
778
  throw new Error("handleCombinations: insert-remove: unequal number of affected entries");
759
779
  }
@@ -918,11 +938,13 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
918
938
  if (!(0, isNumber_1.default)(insertEntries)) {
919
939
  length = insertEntries.length;
920
940
  in_options.applyAfterMetaInformation.set(insertEntries, {
921
- rebasedRemoveInsertRanges: [{
941
+ rebasedRemoveInsertRanges: [
942
+ {
922
943
  rangeStart: 0,
923
944
  rangeLength: length,
924
945
  originalStartPosition,
925
- }],
946
+ },
947
+ ],
926
948
  });
927
949
  }
928
950
  }
@@ -981,8 +1003,12 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
981
1003
  }
982
1004
  case arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE: {
983
1005
  // Remove already in A, no need to add the same again -> write nop
984
- const opBLen = (0, isNumber_1.default)(opB.operation[1]) ? opB.operation[1] : opB.operation[1].length;
985
- const opALen = (0, isNumber_1.default)(opA.operation[1]) ? opA.operation[1] : opA.operation[1].length;
1006
+ const opBLen = (0, isNumber_1.default)(opB.operation[1])
1007
+ ? opB.operation[1]
1008
+ : opB.operation[1].length;
1009
+ const opALen = (0, isNumber_1.default)(opA.operation[1])
1010
+ ? opA.operation[1]
1011
+ : opA.operation[1].length;
986
1012
  if (opBLen !== opALen) {
987
1013
  throw new Error("handleRebaseCombinations: remove-remove: unequal number of affected entries, " +
988
1014
  "this should never happen! Probably a bug in splitRange.");
@@ -1016,7 +1042,8 @@ const handleRebaseCombinations = function (in_segment, out_conflicts, in_basePat
1016
1042
  case arrayChangesetIterator_1.ArrayChangeSetIterator.types.MODIFY: {
1017
1043
  if (in_isPrimitiveType) {
1018
1044
  // just use opB and notify accordingly
1019
- if (opB.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.MODIFY && opB.operation[1].length > 0) {
1045
+ if (opB.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.MODIFY &&
1046
+ opB.operation[1].length > 0) {
1020
1047
  delete opA._absoluteBegin;
1021
1048
  delete opB.offset;
1022
1049
  let conflict = {
@@ -1079,7 +1106,9 @@ const applySegment = function (in_segment, io_changeset, in_currentIndexOffset,
1079
1106
  throw Error("applySegment: in_segment is undefined!");
1080
1107
  }
1081
1108
  // No operation needs to be performed
1082
- if (in_segment.op === undefined && in_segment.opA === undefined && in_segment.opB === undefined) {
1109
+ if (in_segment.op === undefined &&
1110
+ in_segment.opA === undefined &&
1111
+ in_segment.opB === undefined) {
1083
1112
  return;
1084
1113
  }
1085
1114
  if (in_segment.flag === ArrayChangeSetRangeType.completeA ||
@@ -1142,8 +1171,8 @@ var ChangeSetArrayFunctions;
1142
1171
  property_common_1.ConsoleUtils.assert(!(0, isString_1.default)(in_appliedPropertyChanges), in_appliedPropertyChanges);
1143
1172
  const isPrimitiveTypeid = isPrimitiveType(in_typeid);
1144
1173
  // Iterator to process the changes in the ChangeSet in the correct order
1145
- const iteratorA = new arrayChangesetIterator_1.ArrayChangeSetIterator((io_basePropertyChanges));
1146
- const iteratorB = new arrayChangesetIterator_1.ArrayChangeSetIterator((in_appliedPropertyChanges));
1174
+ const iteratorA = new arrayChangesetIterator_1.ArrayChangeSetIterator(io_basePropertyChanges);
1175
+ const iteratorB = new arrayChangesetIterator_1.ArrayChangeSetIterator(in_appliedPropertyChanges);
1147
1176
  const rangeA = {};
1148
1177
  const rangeB = {};
1149
1178
  const opA = iteratorA.opDescription;
@@ -1168,8 +1197,7 @@ var ChangeSetArrayFunctions;
1168
1197
  }
1169
1198
  else {
1170
1199
  iteratorB.next();
1171
- if (skipIteratorBOperation &&
1172
- opB.operation === skipIteratorBOperation) {
1200
+ if (skipIteratorBOperation && opB.operation === skipIteratorBOperation) {
1173
1201
  iteratorB.next();
1174
1202
  }
1175
1203
  skipIteratorBOperation = undefined;
@@ -1186,13 +1214,14 @@ var ChangeSetArrayFunctions;
1186
1214
  let indexOffset = currentIndexOffset;
1187
1215
  if (lastOpWasNop &&
1188
1216
  (rangeA.begin === undefined || rangeA.begin >= segment.begin) &&
1189
- (segment.flag === ArrayChangeSetRangeType.completeB &&
1190
- segment.op.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.INSERT &&
1191
- segment.op.operation[0] === canceledSegmentBegin)) {
1217
+ segment.flag === ArrayChangeSetRangeType.completeB &&
1218
+ segment.op.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.INSERT &&
1219
+ segment.op.operation[0] === canceledSegmentBegin) {
1192
1220
  indexOffset = lastIndexOffset;
1193
1221
  }
1194
1222
  applySegment.call(this, segment, resultPropertyChanges, indexOffset, lastIteratorARemove, isPrimitiveTypeid);
1195
- lastOpWasNop = segment.opB !== undefined && segment.opB.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.NOP;
1223
+ lastOpWasNop =
1224
+ segment.opB !== undefined && segment.opB.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.NOP;
1196
1225
  if (lastOpWasNop) {
1197
1226
  canceledSegmentBegin = segment.begin;
1198
1227
  }
@@ -1206,8 +1235,7 @@ var ChangeSetArrayFunctions;
1206
1235
  // be placed behind the remove. We detect this case and correct the offset accordingly
1207
1236
  // in pushOp
1208
1237
  if (opA.type === arrayChangesetIterator_1.ArrayChangeSetIterator.types.REMOVE) {
1209
- if (!lastIteratorARemove ||
1210
- lastIteratorARemove.position !== opA.operation[0]) {
1238
+ if (!lastIteratorARemove || lastIteratorARemove.position !== opA.operation[0]) {
1211
1239
  lastIteratorARemove = {
1212
1240
  position: opA.operation[0],
1213
1241
  length: getOpLength(opA.operation),
@@ -1218,7 +1246,8 @@ var ChangeSetArrayFunctions;
1218
1246
  // we have to adjust the position to the end of this operation (an insert that is
1219
1247
  // applied at the position of the remove would be shifted behind this insert)
1220
1248
  if (opA.removeInsertOperation) {
1221
- if (opA.removeInsertOperation[0] + opA.offset === lastIteratorARemove.position) {
1249
+ if (opA.removeInsertOperation[0] + opA.offset ===
1250
+ lastIteratorARemove.position) {
1222
1251
  lastIteratorARemove.position += getOpLength(opA.removeInsertOperation);
1223
1252
  }
1224
1253
  }
@@ -1228,7 +1257,8 @@ var ChangeSetArrayFunctions;
1228
1257
  // The offset will only be incremented as soon as the iterator reaches an operation at a different index.
1229
1258
  // We detect this case and keep track, whether the remove has already been added to the offset or not.
1230
1259
  if (lastIteratorARemove &&
1231
- (opA.operation === undefined || opA.operation[0] !== lastIteratorARemove.currentIndex)) {
1260
+ (opA.operation === undefined ||
1261
+ opA.operation[0] !== lastIteratorARemove.currentIndex)) {
1232
1262
  lastIteratorARemove.offsetIncremented = true;
1233
1263
  }
1234
1264
  getRangeForCurrentStateOperation(iteratorA.opDescription, moreAs ? opA.offset : 0, rangeA);
@@ -1301,8 +1331,8 @@ var ChangeSetArrayFunctions;
1301
1331
  function _rebaseArrayChangeSetForProperty(in_ownPropertyChangeSet, io_rebasePropertyChangeSet, in_basePath, out_conflicts, in_typeid, in_options) {
1302
1332
  const isPrimitiveTypeid = isPrimitiveType(in_typeid);
1303
1333
  // Iterator to process the changes in the ChangeSet in the correct order
1304
- const iteratorA = new arrayChangesetIterator_1.ArrayChangeSetIterator((in_ownPropertyChangeSet));
1305
- const iteratorB = new arrayChangesetIterator_1.ArrayChangeSetIterator((io_rebasePropertyChangeSet));
1334
+ const iteratorA = new arrayChangesetIterator_1.ArrayChangeSetIterator(in_ownPropertyChangeSet);
1335
+ const iteratorB = new arrayChangesetIterator_1.ArrayChangeSetIterator(io_rebasePropertyChangeSet);
1306
1336
  const opA = iteratorA.opDescription;
1307
1337
  const rangeA = {};
1308
1338
  getRangeForAppliedOperation(opA, rangeA, ArrayChangeSetRangeType.completeA, in_options);
@@ -1438,8 +1468,9 @@ var ChangeSetArrayFunctions;
1438
1468
  * @param out_conflicts - A list of paths that resulted in conflicts together with the type of the conflict
1439
1469
  */
1440
1470
  function _rebaseChangeSetForString(in_ownPropertyChangeSet, io_rebasePropertyChangeSetParent, in_key, in_basePath, out_conflicts, in_options) {
1441
- if ((0, isString_1.default)(io_rebasePropertyChangeSetParent[in_key]) || (io_rebasePropertyChangeSetParent[in_key] &&
1442
- io_rebasePropertyChangeSetParent[in_key].hasOwnProperty("value"))) {
1471
+ if ((0, isString_1.default)(io_rebasePropertyChangeSetParent[in_key]) ||
1472
+ (io_rebasePropertyChangeSetParent[in_key] &&
1473
+ io_rebasePropertyChangeSetParent[in_key].hasOwnProperty("value"))) {
1443
1474
  // other overwrites any old changes, we ignore them and report the conflict
1444
1475
  let conflict = {
1445
1476
  path: in_basePath,
@@ -1460,8 +1491,8 @@ var ChangeSetArrayFunctions;
1460
1491
  delete io_rebasePropertyChangeSetParent[in_key];
1461
1492
  }
1462
1493
  }
1463
- else if ((0, isString_1.default)(in_ownPropertyChangeSet) || (in_ownPropertyChangeSet &&
1464
- in_ownPropertyChangeSet.hasOwnProperty("value"))) {
1494
+ else if ((0, isString_1.default)(in_ownPropertyChangeSet) ||
1495
+ (in_ownPropertyChangeSet && in_ownPropertyChangeSet.hasOwnProperty("value"))) {
1465
1496
  // we have a conflict since we cannot allow insert/remove/modify on an unknown state
1466
1497
  // we just ignore other's modifications and take own's set
1467
1498
  let conflict = {