microboard-temp 0.13.77 → 0.13.78

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.
@@ -6269,6 +6269,21 @@ class EventsLog {
6269
6269
  }
6270
6270
  return records[records.length - 1].event;
6271
6271
  }
6272
+ refreshUnconfirmedIdentity(sessionId, authorUserId) {
6273
+ const records = [
6274
+ ...this.list.getRecordsToSend(),
6275
+ ...this.list.getNewRecords()
6276
+ ];
6277
+ for (const record of records) {
6278
+ record.event.body.sessionId = sessionId;
6279
+ record.event.body.userId = sessionId;
6280
+ record.event.body.authorUserId = authorUserId;
6281
+ }
6282
+ if (this.pendingEvent) {
6283
+ this.pendingEvent = null;
6284
+ this.firstSentTime = null;
6285
+ }
6286
+ }
6272
6287
  }
6273
6288
  function createEventsLog(board, commandFactory) {
6274
6289
  return new EventsLog(board, commandFactory);
@@ -6286,15 +6301,6 @@ var init_Log = __esm(() => {
6286
6301
  init_EventsLog();
6287
6302
  });
6288
6303
 
6289
- // src/Items/ItemsCommandUtils.ts
6290
- function mapItemsByOperation(item, getCallback) {
6291
- const items = Array.isArray(item) ? item : [item];
6292
- return items.map((item2) => {
6293
- const operation = getCallback(item2);
6294
- return { item: item2, operation };
6295
- });
6296
- }
6297
-
6298
6304
  // src/Items/Shape/ShapeCommand.ts
6299
6305
  class ShapeCommand {
6300
6306
  shape;
@@ -6325,52 +6331,73 @@ class ShapeCommand {
6325
6331
  const shape = this.shape;
6326
6332
  switch (this.operation.method) {
6327
6333
  case "setBackgroundColor":
6328
- return mapItemsByOperation(shape, (shape2) => {
6334
+ return shape.map((shape2) => {
6329
6335
  return {
6330
- ...this.operation,
6331
- backgroundColor: shape2.getBackgroundColor()
6336
+ item: shape2,
6337
+ operation: {
6338
+ ...this.operation,
6339
+ backgroundColor: shape2.getBackgroundColor()
6340
+ }
6332
6341
  };
6333
6342
  });
6334
6343
  case "setBackgroundOpacity":
6335
- return mapItemsByOperation(shape, (shape2) => {
6344
+ return shape.map((shape2) => {
6336
6345
  return {
6337
- ...this.operation,
6338
- backgroundOpacity: shape2.getBackgroundOpacity()
6346
+ item: shape2,
6347
+ operation: {
6348
+ ...this.operation,
6349
+ backgroundOpacity: shape2.getBackgroundOpacity()
6350
+ }
6339
6351
  };
6340
6352
  });
6341
6353
  case "setBorderColor":
6342
- return mapItemsByOperation(shape, (shape2) => {
6354
+ return shape.map((shape2) => {
6343
6355
  return {
6344
- ...this.operation,
6345
- borderColor: shape2.getStrokeColor()
6356
+ item: shape2,
6357
+ operation: {
6358
+ ...this.operation,
6359
+ borderColor: shape2.getStrokeColor()
6360
+ }
6346
6361
  };
6347
6362
  });
6348
6363
  case "setBorderOpacity":
6349
- return mapItemsByOperation(shape, (shape2) => {
6364
+ return shape.map((shape2) => {
6350
6365
  return {
6351
- ...this.operation,
6352
- borderOpacity: shape2.getBorderOpacity()
6366
+ item: shape2,
6367
+ operation: {
6368
+ ...this.operation,
6369
+ borderOpacity: shape2.getBorderOpacity()
6370
+ }
6353
6371
  };
6354
6372
  });
6355
6373
  case "setBorderStyle":
6356
- return mapItemsByOperation(shape, (shape2) => {
6374
+ return shape.map((shape2) => {
6357
6375
  return {
6358
- ...this.operation,
6359
- borderStyle: shape2.getBorderStyle()
6376
+ item: shape2,
6377
+ operation: {
6378
+ ...this.operation,
6379
+ borderStyle: shape2.getBorderStyle()
6380
+ }
6360
6381
  };
6361
6382
  });
6362
6383
  case "setBorderWidth":
6363
- return mapItemsByOperation(shape, (_shape) => {
6384
+ return shape.map((_shape) => {
6364
6385
  return {
6365
- ...this.operation,
6366
- borderWidth: this.operation.prevBorderWidth
6386
+ item: _shape,
6387
+ operation: {
6388
+ ...this.operation,
6389
+ borderWidth: this.operation.prevBorderWidth
6390
+ }
6367
6391
  };
6368
6392
  });
6369
6393
  case "setShapeType":
6370
- return mapItemsByOperation(shape, (shape2) => {
6394
+ return shape.map((shape2) => {
6371
6395
  return {
6372
- ...this.operation,
6373
- shapeType: shape2.getShapeType()
6396
+ item: shape2,
6397
+ operation: {
6398
+ ...this.operation,
6399
+ shapeType: shape2.getShapeType()
6400
+ }
6374
6401
  };
6375
6402
  });
6376
6403
  }
@@ -6453,78 +6480,99 @@ class TransformationCommand {
6453
6480
  });
6454
6481
  }
6455
6482
  case "translateTo":
6456
- return mapItemsByOperation(this.transformation, (transformation) => {
6483
+ return this.transformation.map((transformation) => {
6457
6484
  return {
6458
- ...this.operation,
6459
- x: transformation.getTranslation().x,
6460
- y: transformation.getTranslation().y
6485
+ item: transformation,
6486
+ operation: {
6487
+ ...this.operation,
6488
+ x: transformation.getTranslation().x,
6489
+ y: transformation.getTranslation().y
6490
+ }
6461
6491
  };
6462
6492
  });
6463
6493
  case "translateBy": {
6464
6494
  const op2 = this.operation;
6465
- return mapItemsByOperation(this.transformation, () => {
6495
+ return this.transformation.map((transformation) => {
6466
6496
  return {
6467
- ...this.operation,
6468
- x: -op2.x,
6469
- y: -op2.y
6497
+ item: transformation,
6498
+ operation: {
6499
+ ...this.operation,
6500
+ x: -op2.x,
6501
+ y: -op2.y
6502
+ }
6470
6503
  };
6471
6504
  });
6472
6505
  }
6473
6506
  case "scaleTo":
6474
6507
  case "scaleToRelativeTo": {
6475
- return mapItemsByOperation(this.transformation, (transformation) => {
6508
+ return this.transformation.map((transformation) => {
6476
6509
  return {
6477
- ...op,
6478
- x: transformation.getScale().x,
6479
- y: transformation.getScale().y
6510
+ item: transformation,
6511
+ operation: {
6512
+ ...op,
6513
+ x: transformation.getScale().x,
6514
+ y: transformation.getScale().y
6515
+ }
6480
6516
  };
6481
6517
  });
6482
6518
  }
6483
6519
  case "scaleBy":
6484
6520
  case "scaleByRelativeTo": {
6485
6521
  const op2 = this.operation;
6486
- return mapItemsByOperation(this.transformation, () => {
6522
+ return this.transformation.map((transformation) => {
6487
6523
  return {
6488
- ...op2,
6489
- x: 1 / op2.x,
6490
- y: 1 / op2.y
6524
+ item: transformation,
6525
+ operation: {
6526
+ ...op2,
6527
+ x: 1 / op2.x,
6528
+ y: 1 / op2.y
6529
+ }
6491
6530
  };
6492
6531
  });
6493
6532
  }
6494
6533
  case "scaleByTranslateBy": {
6495
6534
  const op2 = this.operation;
6496
- const scaleTransformation = mapItemsByOperation(this.transformation, () => {
6535
+ const scaleTransformation = this.transformation.map((transformation) => {
6497
6536
  const scaleX = 1 / op2.scale.x;
6498
6537
  const scaleY = 1 / op2.scale.y;
6499
6538
  const translateX = -op2.translate.x;
6500
6539
  const translateY = -op2.translate.y;
6501
6540
  return {
6502
- ...op2,
6503
- scale: {
6504
- x: scaleX,
6505
- y: scaleY
6506
- },
6507
- translate: {
6508
- x: translateX,
6509
- y: translateY
6541
+ item: transformation,
6542
+ operation: {
6543
+ ...op2,
6544
+ scale: {
6545
+ x: scaleX,
6546
+ y: scaleY
6547
+ },
6548
+ translate: {
6549
+ x: translateX,
6550
+ y: translateY
6551
+ }
6510
6552
  }
6511
6553
  };
6512
6554
  });
6513
6555
  return scaleTransformation;
6514
6556
  }
6515
6557
  case "rotateTo":
6516
- return mapItemsByOperation(this.transformation, (transformation) => {
6558
+ return this.transformation.map((transformation) => {
6517
6559
  return {
6518
- ...this.operation,
6519
- degree: transformation.getRotation()
6560
+ item: transformation,
6561
+ operation: {
6562
+ ...this.operation,
6563
+ degree: transformation.getRotation()
6564
+ }
6520
6565
  };
6521
6566
  });
6522
6567
  case "rotateBy": {
6523
6568
  const op2 = this.operation;
6524
- return mapItemsByOperation(this.transformation, () => {
6569
+ return this.transformation.map((transformation) => {
6525
6570
  return {
6526
- ...this.operation,
6527
- degree: -op2.degree
6571
+ item: transformation,
6572
+ operation: {
6573
+ ...this.operation,
6574
+ degree: -op2.degree
6575
+ }
6528
6576
  };
6529
6577
  });
6530
6578
  }
@@ -6562,23 +6610,29 @@ class TransformationCommand {
6562
6610
  }
6563
6611
  case "locked": {
6564
6612
  const op2 = this.operation;
6565
- return mapItemsByOperation(this.transformation, () => {
6613
+ return this.transformation.map((transformation) => {
6566
6614
  return {
6567
- ...op2,
6568
- item: [...op2.item],
6569
- method: "unlocked",
6570
- locked: false
6615
+ item: transformation,
6616
+ operation: {
6617
+ ...op2,
6618
+ item: [...op2.item],
6619
+ method: "unlocked",
6620
+ locked: false
6621
+ }
6571
6622
  };
6572
6623
  });
6573
6624
  }
6574
6625
  case "unlocked": {
6575
6626
  const op2 = this.operation;
6576
- return mapItemsByOperation(this.transformation, () => {
6627
+ return this.transformation.map((transformation) => {
6577
6628
  return {
6578
- ...op2,
6579
- item: [...op2.item],
6580
- method: "locked",
6581
- locked: true
6629
+ item: transformation,
6630
+ operation: {
6631
+ ...op2,
6632
+ item: [...op2.item],
6633
+ method: "locked",
6634
+ locked: true
6635
+ }
6582
6636
  };
6583
6637
  });
6584
6638
  }
@@ -7098,16 +7152,18 @@ class StickerCommand {
7098
7152
  getReverse() {
7099
7153
  switch (this.operation.method) {
7100
7154
  case "setBackgroundColor":
7101
- return mapItemsByOperation(this.sticker, (sticker) => {
7155
+ return this.sticker.map((sticker) => {
7102
7156
  return {
7103
- ...this.operation,
7104
- backgroundColor: sticker.getBackgroundColor()
7157
+ item: sticker,
7158
+ operation: {
7159
+ ...this.operation,
7160
+ backgroundColor: sticker.getBackgroundColor()
7161
+ }
7105
7162
  };
7106
7163
  });
7107
7164
  }
7108
7165
  }
7109
7166
  }
7110
- var init_StickerCommand = () => {};
7111
7167
 
7112
7168
  // src/Items/Frame/FrameCommand.ts
7113
7169
  class FrameCommand {
@@ -7133,51 +7189,68 @@ class FrameCommand {
7133
7189
  const frame = this.frame;
7134
7190
  switch (this.operation.method) {
7135
7191
  case "setBackgroundColor":
7136
- return mapItemsByOperation(frame, (frame2) => {
7192
+ return frame.map((frame2) => {
7137
7193
  return {
7138
- ...this.operation,
7139
- backgroundColor: frame2.getBackgroundColor()
7194
+ item: frame2,
7195
+ operation: {
7196
+ ...this.operation,
7197
+ backgroundColor: frame2.getBackgroundColor()
7198
+ }
7140
7199
  };
7141
7200
  });
7142
7201
  case "setCanChangeRatio":
7143
- return mapItemsByOperation(frame, (frame2) => {
7202
+ return frame.map((frame2) => {
7144
7203
  return {
7145
- ...this.operation,
7146
- canChangeRatio: frame2.getCanChangeRatio()
7204
+ item: frame2,
7205
+ operation: {
7206
+ ...this.operation,
7207
+ canChangeRatio: frame2.getCanChangeRatio()
7208
+ }
7147
7209
  };
7148
7210
  });
7149
7211
  case "setFrameType":
7150
- return mapItemsByOperation(frame, () => {
7212
+ return frame.map((frame2) => {
7151
7213
  return {
7152
- ...this.operation,
7153
- shapeType: this.operation.prevShapeType
7214
+ item: frame2,
7215
+ operation: {
7216
+ ...this.operation,
7217
+ shapeType: this.operation.prevShapeType
7218
+ }
7154
7219
  };
7155
7220
  });
7156
7221
  case "addChild":
7157
- return mapItemsByOperation(frame, (frame2) => {
7222
+ return frame.map((frame2) => {
7158
7223
  return {
7159
- ...this.operation,
7160
- children: frame2.getChildrenIds()
7224
+ item: frame2,
7225
+ operation: {
7226
+ ...this.operation,
7227
+ children: frame2.getChildrenIds()
7228
+ }
7161
7229
  };
7162
7230
  });
7163
7231
  case "removeChild":
7164
- return mapItemsByOperation(frame, (frame2) => {
7232
+ return frame.map((frame2) => {
7165
7233
  return {
7166
- ...this.operation,
7167
- children: frame2.getChildrenIds()
7234
+ item: frame2,
7235
+ operation: {
7236
+ ...this.operation,
7237
+ children: frame2.getChildrenIds()
7238
+ }
7168
7239
  };
7169
7240
  });
7170
7241
  case "addChildren":
7171
7242
  case "removeChildren":
7172
- return mapItemsByOperation(frame, (item) => {
7243
+ return frame.map((item) => {
7173
7244
  return {
7174
- ...this.operation
7245
+ item,
7246
+ operation: {
7247
+ ...this.operation
7248
+ }
7175
7249
  };
7176
7250
  });
7177
7251
  }
7178
7252
  }
7179
7253
  }
7180
- var init_FrameCommand = () => {};
7181
7254
 
7182
7255
  // src/SubjectOperation.ts
7183
7256
  class SubjectOperation {
@@ -7659,60 +7732,80 @@ class CommentCommand {
7659
7732
  const op = this.operation;
7660
7733
  switch (op.method) {
7661
7734
  case "createMessage":
7662
- return mapItemsByOperation(this.comment, (comment) => {
7735
+ return this.comment.map((comment) => {
7663
7736
  return {
7664
- ...this.operation,
7665
- message: comment.getThread()[comment.getThread().length - 1]
7737
+ item: comment,
7738
+ operation: {
7739
+ ...this.operation,
7740
+ message: comment.getThread()[comment.getThread().length - 1]
7741
+ }
7666
7742
  };
7667
7743
  });
7668
7744
  case "editMessage":
7669
- return mapItemsByOperation(this.comment, (comment) => {
7745
+ return this.comment.map((comment) => {
7670
7746
  return {
7671
- ...op,
7672
- message: comment.getThread().find((mes) => mes.id === op.message.id)
7747
+ item: comment,
7748
+ operation: {
7749
+ ...op,
7750
+ message: comment.getThread().find((mes) => mes.id === op.message.id)
7751
+ }
7673
7752
  };
7674
7753
  });
7675
7754
  case "removeMessage":
7676
- return mapItemsByOperation(this.comment, (comment) => {
7755
+ return this.comment.map((comment) => {
7677
7756
  return {
7678
- ...this.operation,
7679
- messageId: op.messageId
7757
+ item: comment,
7758
+ operation: {
7759
+ ...this.operation,
7760
+ messageId: op.messageId
7761
+ }
7680
7762
  };
7681
7763
  });
7682
7764
  case "setResolved":
7683
- return mapItemsByOperation(this.comment, (comment) => {
7765
+ return this.comment.map((comment) => {
7684
7766
  return {
7685
- ...this.operation,
7686
- resolved: comment.getResolved()
7767
+ item: comment,
7768
+ operation: {
7769
+ ...this.operation,
7770
+ resolved: comment.getResolved()
7771
+ }
7687
7772
  };
7688
7773
  });
7689
7774
  case "markMessagesAsRead":
7690
- return mapItemsByOperation(this.comment, (comment) => {
7775
+ return this.comment.map((comment) => {
7691
7776
  return {
7692
- ...this.operation,
7693
- messageIds: comment.getThread().filter((mes) => op.messageIds.includes(mes.id)).map((mes) => mes.id),
7694
- userId: op.userId
7777
+ item: comment,
7778
+ operation: {
7779
+ ...this.operation,
7780
+ messageIds: comment.getThread().filter((mes) => op.messageIds.includes(mes.id)).map((mes) => mes.id),
7781
+ userId: op.userId
7782
+ }
7695
7783
  };
7696
7784
  });
7697
7785
  case "markThreadAsUnread":
7698
7786
  case "markThreadAsRead":
7699
- return mapItemsByOperation(this.comment, (comment) => {
7787
+ return this.comment.map((comment) => {
7700
7788
  return {
7701
- ...this.operation,
7702
- userId: op.userId
7789
+ item: comment,
7790
+ operation: {
7791
+ ...this.operation,
7792
+ userId: op.userId
7793
+ }
7703
7794
  };
7704
7795
  });
7705
7796
  case "setItemToFollow":
7706
- return mapItemsByOperation(this.comment, (comment) => {
7797
+ return this.comment.map((comment) => {
7707
7798
  return {
7708
- ...this.operation,
7709
- itemId: op.itemId
7799
+ item: comment,
7800
+ operation: {
7801
+ ...this.operation,
7802
+ itemId: op.itemId
7803
+ }
7710
7804
  };
7711
7805
  });
7712
7806
  }
7713
7807
  }
7714
7808
  }
7715
- var init_CommentCommand = () => {};
7716
7809
 
7717
7810
  // src/Items/GeometricNormal.ts
7718
7811
  class GeometricNormal {
@@ -8346,16 +8439,18 @@ class LinkToCommand {
8346
8439
  getReverse() {
8347
8440
  switch (this.operation.method) {
8348
8441
  case "setLinkTo":
8349
- return mapItemsByOperation(this.linkTo, (linkTo) => {
8442
+ return this.linkTo.map((linkTo) => {
8350
8443
  return {
8351
- ...this.operation,
8352
- link: linkTo.link
8444
+ item: linkTo,
8445
+ operation: {
8446
+ ...this.operation,
8447
+ link: linkTo.link
8448
+ }
8353
8449
  };
8354
8450
  });
8355
8451
  }
8356
8452
  }
8357
8453
  }
8358
- var init_LinkToCommand = () => {};
8359
8454
 
8360
8455
  // src/Items/LinkTo/LinkTo.ts
8361
8456
  class LinkTo {
@@ -8461,7 +8556,6 @@ class LinkTo {
8461
8556
  }
8462
8557
  }
8463
8558
  var init_LinkTo = __esm(() => {
8464
- init_LinkToCommand();
8465
8559
  init_Settings();
8466
8560
  });
8467
8561
 
@@ -13487,7 +13581,6 @@ var ANONYMOUS_ID = 9999999999, Comment;
13487
13581
  var init_Comment = __esm(() => {
13488
13582
  init_Point2();
13489
13583
  init_Transformation2();
13490
- init_CommentCommand();
13491
13584
  init_Mbr2();
13492
13585
  init_Line2();
13493
13586
  init_esm_browser();
@@ -13841,7 +13934,6 @@ var init_Comment = __esm(() => {
13841
13934
  // src/Items/Comment/index.ts
13842
13935
  var init_Comment2 = __esm(() => {
13843
13936
  init_Comment();
13844
- init_CommentCommand();
13845
13937
  });
13846
13938
 
13847
13939
  // src/Items/Group/GroupCommand.ts
@@ -13948,30 +14040,38 @@ class PlaceholderCommand {
13948
14040
  const placeholder = this.placeholder;
13949
14041
  switch (this.operation.method) {
13950
14042
  case "setBackgroundColor":
13951
- return mapItemsByOperation(placeholder, (placeholder2) => {
14043
+ return placeholder.map((placeholder2) => {
13952
14044
  return {
13953
- ...this.operation,
13954
- backgroundColor: placeholder2.getBackgroundColor()
14045
+ item: placeholder2,
14046
+ operation: {
14047
+ ...this.operation,
14048
+ backgroundColor: placeholder2.getBackgroundColor()
14049
+ }
13955
14050
  };
13956
14051
  });
13957
14052
  case "setIcon":
13958
- return mapItemsByOperation(placeholder, (placeholder2) => {
14053
+ return placeholder.map((placeholder2) => {
13959
14054
  return {
13960
- ...this.operation,
13961
- icon: placeholder2.getIcon()
14055
+ item: placeholder2,
14056
+ operation: {
14057
+ ...this.operation,
14058
+ icon: placeholder2.getIcon()
14059
+ }
13962
14060
  };
13963
14061
  });
13964
14062
  case "setMiroData":
13965
- return mapItemsByOperation(placeholder, (placeholder2) => {
14063
+ return placeholder.map((placeholder2) => {
13966
14064
  return {
13967
- ...this.operation,
13968
- miroData: placeholder2.getIcon()
14065
+ item: placeholder2,
14066
+ operation: {
14067
+ ...this.operation,
14068
+ miroData: placeholder2.getIcon()
14069
+ }
13969
14070
  };
13970
14071
  });
13971
14072
  }
13972
14073
  }
13973
14074
  }
13974
- var init_PlaceholderCommand = () => {};
13975
14075
 
13976
14076
  // src/Items/Image/ImageCommand.ts
13977
14077
  class ImageCommand {
@@ -14209,11 +14309,7 @@ var init_CreateCommand = __esm(() => {
14209
14309
  init_EventsCommand();
14210
14310
  init_ConnectorCommand();
14211
14311
  init_DrawingCommand();
14212
- init_StickerCommand();
14213
- init_FrameCommand();
14214
14312
  init_Comment2();
14215
- init_LinkToCommand();
14216
- init_PlaceholderCommand();
14217
14313
  init_Command();
14218
14314
  itemCommandFactories = {
14219
14315
  Sticker: createStickerCommand,
@@ -58473,7 +58569,6 @@ var init_Sticker = __esm(() => {
58473
58569
  init_Transformation();
58474
58570
  init_getResizeMatrix();
58475
58571
  init_RichText();
58476
- init_StickerCommand();
58477
58572
  init_StickerOperation();
58478
58573
  init_LinkTo();
58479
58574
  init_SessionStorage();
@@ -59725,7 +59820,6 @@ var init_Frame = __esm(() => {
59725
59820
  init_RichText();
59726
59821
  init_Matrix();
59727
59822
  init_Basic();
59728
- init_FrameCommand();
59729
59823
  init_exportBoardSnapshot();
59730
59824
  init_LinkTo();
59731
59825
  init_HTMLRender();
@@ -60255,7 +60349,6 @@ var init_Frame = __esm(() => {
60255
60349
  // src/Items/Frame/index.ts
60256
60350
  var init_Frame2 = __esm(() => {
60257
60351
  init_Frame();
60258
- init_FrameCommand();
60259
60352
  init_FrameData();
60260
60353
  init_FrameData();
60261
60354
  init_Basic();
@@ -69465,7 +69558,6 @@ var init_Placeholder2 = __esm(() => {
69465
69558
  init_Shape2();
69466
69559
  init_Path();
69467
69560
  init_Transformation();
69468
- init_PlaceholderCommand();
69469
69561
  init_getResizeMatrix();
69470
69562
  init_BaseItem();
69471
69563
  Placeholder2 = class Placeholder2 extends BaseItem {
@@ -70378,10 +70470,10 @@ function normalizeForBoard(msg) {
70378
70470
  }
70379
70471
  function handleSeqNumApplication(initialSequenceNumber, board) {
70380
70472
  const { log } = board.events;
70473
+ const sessionId = getConnectionSessionId(board.events.connection);
70474
+ const authorUserId = getConnectionAuthorUserId(board.events.connection);
70475
+ log.refreshUnconfirmedIdentity(sessionId, authorUserId);
70381
70476
  log.currentSequenceNumber = initialSequenceNumber;
70382
- if (log.pendingEvent) {
70383
- log.pendingEvent.sequenceNumber = log.currentSequenceNumber;
70384
- }
70385
70477
  startIntervals(board);
70386
70478
  }
70387
70479
  function startIntervals(board) {