@marmooo/midy 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,12 +26,6 @@ class Note {
26
26
  writable: true,
27
27
  value: false
28
28
  });
29
- Object.defineProperty(this, "pending", {
30
- enumerable: true,
31
- configurable: true,
32
- writable: true,
33
- value: true
34
- });
35
29
  Object.defineProperty(this, "bufferSource", {
36
30
  enumerable: true,
37
31
  configurable: true,
@@ -77,6 +71,9 @@ class Note {
77
71
  this.noteNumber = noteNumber;
78
72
  this.velocity = velocity;
79
73
  this.startTime = startTime;
74
+ this.ready = new Promise((resolve) => {
75
+ this.resolveReady = resolve;
76
+ });
80
77
  }
81
78
  }
82
79
  const drumExclusiveClasses = new Uint8Array(128);
@@ -163,8 +160,9 @@ const pitchEnvelopeKeys = [
163
160
  "playbackRate",
164
161
  ];
165
162
  const pitchEnvelopeKeySet = new Set(pitchEnvelopeKeys);
166
- export class MidyGMLite {
163
+ export class MidyGMLite extends EventTarget {
167
164
  constructor(audioContext) {
165
+ super();
168
166
  Object.defineProperty(this, "mode", {
169
167
  enumerable: true,
170
168
  configurable: true,
@@ -279,6 +277,12 @@ export class MidyGMLite {
279
277
  writable: true,
280
278
  value: false
281
279
  });
280
+ Object.defineProperty(this, "loop", {
281
+ enumerable: true,
282
+ configurable: true,
283
+ writable: true,
284
+ value: false
285
+ });
282
286
  Object.defineProperty(this, "playPromise", {
283
287
  enumerable: true,
284
288
  configurable: true,
@@ -474,7 +478,7 @@ export class MidyGMLite {
474
478
  }
475
479
  return bufferSource;
476
480
  }
477
- async scheduleTimelineEvents(scheduleTime, queueIndex) {
481
+ scheduleTimelineEvents(scheduleTime, queueIndex) {
478
482
  const timeOffset = this.resumeTime - this.startTime;
479
483
  const lookAheadCheckTime = scheduleTime + timeOffset + this.lookAhead;
480
484
  const schedulingOffset = this.startDelay - timeOffset;
@@ -486,7 +490,7 @@ export class MidyGMLite {
486
490
  const startTime = event.startTime + schedulingOffset;
487
491
  switch (event.type) {
488
492
  case "noteOn":
489
- await this.noteOn(event.channel, event.noteNumber, event.velocity, startTime);
493
+ this.noteOn(event.channel, event.noteNumber, event.velocity, startTime);
490
494
  break;
491
495
  case "noteOff": {
492
496
  this.noteOff(event.channel, event.noteNumber, event.velocity, startTime, false);
@@ -527,22 +531,23 @@ export class MidyGMLite {
527
531
  }
528
532
  }
529
533
  updateStates(queueIndex, nextQueueIndex) {
534
+ const now = this.audioContext.currentTime;
530
535
  if (nextQueueIndex < queueIndex)
531
536
  queueIndex = 0;
532
537
  for (let i = queueIndex; i < nextQueueIndex; i++) {
533
538
  const event = this.timeline[i];
534
539
  switch (event.type) {
535
540
  case "controller":
536
- this.setControlChange(event.channel, event.controllerType, event.value, 0);
541
+ this.setControlChange(event.channel, event.controllerType, event.value, now - this.resumeTime + event.startTime);
537
542
  break;
538
543
  case "programChange":
539
- this.setProgramChange(event.channel, event.programNumber, 0);
544
+ this.setProgramChange(event.channel, event.programNumber, now - this.resumeTime + event.startTime);
540
545
  break;
541
546
  case "pitchBend":
542
- this.setPitchBend(event.channel, event.value + 8192, 0);
547
+ this.setPitchBend(event.channel, event.value + 8192, now - this.resumeTime + event.startTime);
543
548
  break;
544
549
  case "sysEx":
545
- this.handleSysEx(event.data, 0);
550
+ this.handleSysEx(event.data, now - this.resumeTime + event.startTime);
546
551
  }
547
552
  }
548
553
  }
@@ -550,50 +555,80 @@ export class MidyGMLite {
550
555
  if (this.audioContext.state === "suspended") {
551
556
  await this.audioContext.resume();
552
557
  }
558
+ const paused = this.isPaused;
553
559
  this.isPlaying = true;
554
560
  this.isPaused = false;
555
561
  this.startTime = this.audioContext.currentTime;
562
+ if (paused) {
563
+ this.dispatchEvent(new Event("resumed"));
564
+ }
565
+ else {
566
+ this.dispatchEvent(new Event("started"));
567
+ }
556
568
  let queueIndex = this.getQueueIndex(this.resumeTime);
557
- let finished = false;
569
+ let exitReason;
558
570
  this.notePromises = [];
559
- while (queueIndex < this.timeline.length) {
571
+ while (true) {
560
572
  const now = this.audioContext.currentTime;
573
+ if (this.timeline.length <= queueIndex) {
574
+ await this.stopNotes(0, true, now);
575
+ if (this.loop) {
576
+ this.notePromises = [];
577
+ this.resetAllStates();
578
+ this.startTime = this.audioContext.currentTime;
579
+ this.resumeTime = 0;
580
+ queueIndex = 0;
581
+ this.dispatchEvent(new Event("looped"));
582
+ continue;
583
+ }
584
+ else {
585
+ await this.audioContext.suspend();
586
+ exitReason = "ended";
587
+ break;
588
+ }
589
+ }
561
590
  if (this.isPausing) {
562
591
  await this.stopNotes(0, true, now);
563
592
  await this.audioContext.suspend();
564
593
  this.notePromises = [];
594
+ this.isPausing = false;
595
+ exitReason = "paused";
565
596
  break;
566
597
  }
567
598
  else if (this.isStopping) {
568
599
  await this.stopNotes(0, true, now);
569
600
  await this.audioContext.suspend();
570
- finished = true;
601
+ this.isStopping = false;
602
+ exitReason = "stopped";
571
603
  break;
572
604
  }
573
605
  else if (this.isSeeking) {
574
- await this.stopNotes(0, true, now);
606
+ this.stopNotes(0, true, now);
575
607
  this.startTime = this.audioContext.currentTime;
576
608
  const nextQueueIndex = this.getQueueIndex(this.resumeTime);
577
609
  this.updateStates(queueIndex, nextQueueIndex);
578
610
  queueIndex = nextQueueIndex;
579
611
  this.isSeeking = false;
612
+ this.dispatchEvent(new Event("seeked"));
580
613
  continue;
581
614
  }
582
- queueIndex = await this.scheduleTimelineEvents(now, queueIndex);
615
+ queueIndex = this.scheduleTimelineEvents(now, queueIndex);
583
616
  const waitTime = now + this.noteCheckInterval;
584
617
  await this.scheduleTask(() => { }, waitTime);
585
618
  }
586
- if (this.timeline.length <= queueIndex) {
587
- const now = this.audioContext.currentTime;
588
- await this.stopNotes(0, true, now);
589
- await this.audioContext.suspend();
590
- finished = true;
591
- }
592
- if (finished) {
619
+ if (exitReason !== "paused") {
593
620
  this.notePromises = [];
594
621
  this.resetAllStates();
595
622
  }
596
623
  this.isPlaying = false;
624
+ if (exitReason === "paused") {
625
+ this.isPaused = true;
626
+ this.dispatchEvent(new Event("paused"));
627
+ }
628
+ else {
629
+ this.isPaused = false;
630
+ this.dispatchEvent(new Event(exitReason));
631
+ }
597
632
  }
598
633
  ticksToSecond(ticks, secondsPerBeat) {
599
634
  return ticks * secondsPerBeat / this.ticksPerBeat;
@@ -700,24 +735,20 @@ export class MidyGMLite {
700
735
  return;
701
736
  this.isStopping = true;
702
737
  await this.playPromise;
703
- this.isStopping = false;
704
738
  }
705
739
  async pause() {
706
740
  if (!this.isPlaying || this.isPaused)
707
741
  return;
708
742
  const now = this.audioContext.currentTime;
709
- this.resumeTime = now - this.startTime - this.startDelay;
743
+ this.resumeTime = now + this.resumeTime - this.startTime;
710
744
  this.isPausing = true;
711
745
  await this.playPromise;
712
- this.isPausing = false;
713
- this.isPaused = true;
714
746
  }
715
747
  async resume() {
716
748
  if (!this.isPaused)
717
749
  return;
718
750
  this.playPromise = this.playNotes();
719
751
  await this.playPromise;
720
- this.isPaused = false;
721
752
  }
722
753
  seekTo(second) {
723
754
  this.resumeTime = second;
@@ -740,19 +771,23 @@ export class MidyGMLite {
740
771
  const now = this.audioContext.currentTime;
741
772
  return now + this.resumeTime - this.startTime;
742
773
  }
743
- processScheduledNotes(channel, callback) {
774
+ async processScheduledNotes(channel, callback) {
744
775
  const scheduledNotes = channel.scheduledNotes;
776
+ const tasks = [];
745
777
  for (let i = channel.scheduleIndex; i < scheduledNotes.length; i++) {
746
778
  const note = scheduledNotes[i];
747
779
  if (!note)
748
780
  continue;
749
781
  if (note.ending)
750
782
  continue;
751
- callback(note);
783
+ const task = note.ready.then(() => callback(note));
784
+ tasks.push(task);
752
785
  }
786
+ await Promise.all(tasks);
753
787
  }
754
- processActiveNotes(channel, scheduleTime, callback) {
788
+ async processActiveNotes(channel, scheduleTime, callback) {
755
789
  const scheduledNotes = channel.scheduledNotes;
790
+ const tasks = [];
756
791
  for (let i = channel.scheduleIndex; i < scheduledNotes.length; i++) {
757
792
  const note = scheduledNotes[i];
758
793
  if (!note)
@@ -761,8 +796,10 @@ export class MidyGMLite {
761
796
  continue;
762
797
  if (scheduleTime < note.startTime)
763
798
  break;
764
- callback(note);
799
+ const task = note.ready.then(() => callback(note));
800
+ tasks.push(task);
765
801
  }
802
+ await Promise.all(tasks);
766
803
  }
767
804
  cbToRatio(cb) {
768
805
  return Math.pow(10, cb / 200);
@@ -998,11 +1035,7 @@ export class MidyGMLite {
998
1035
  return;
999
1036
  await this.setNoteAudioNode(channel, note, realtime);
1000
1037
  this.setNoteRouting(channelNumber, note, startTime);
1001
- note.pending = false;
1002
- const off = note.offEvent;
1003
- if (off) {
1004
- this.noteOff(channelNumber, noteNumber, off.velocity, off.startTime);
1005
- }
1038
+ note.resolveReady();
1006
1039
  }
1007
1040
  disconnectNote(note) {
1008
1041
  note.bufferSource.disconnect();
@@ -1036,7 +1069,7 @@ export class MidyGMLite {
1036
1069
  }, stopTime);
1037
1070
  });
1038
1071
  }
1039
- noteOff(channelNumber, noteNumber, velocity, endTime, force) {
1072
+ async noteOff(channelNumber, noteNumber, _velocity, endTime, force) {
1040
1073
  const channel = this.channels[channelNumber];
1041
1074
  if (!force) {
1042
1075
  if (channel.isDrum)
@@ -1048,13 +1081,11 @@ export class MidyGMLite {
1048
1081
  if (index < 0)
1049
1082
  return;
1050
1083
  const note = channel.scheduledNotes[index];
1051
- if (note.pending) {
1052
- note.offEvent = { velocity, startTime: endTime };
1053
- return;
1054
- }
1055
1084
  note.ending = true;
1056
1085
  this.setNoteIndex(channel, index);
1057
- const promise = this.releaseNote(channel, note, endTime);
1086
+ const promise = note.ready.then(() => {
1087
+ return this.releaseNote(channel, note, endTime);
1088
+ });
1058
1089
  this.notePromises.push(promise);
1059
1090
  return promise;
1060
1091
  }
@@ -1142,7 +1173,8 @@ export class MidyGMLite {
1142
1173
  }
1143
1174
  setPitchBend(channelNumber, value, scheduleTime) {
1144
1175
  const channel = this.channels[channelNumber];
1145
- scheduleTime ??= this.audioContext.currentTime;
1176
+ if (!(0 <= scheduleTime))
1177
+ scheduleTime = this.audioContext.currentTime;
1146
1178
  const state = channel.state;
1147
1179
  const prev = state.pitchWheel * 2 - 1;
1148
1180
  const next = (value - 8192) / 8192;
@@ -1306,12 +1338,14 @@ export class MidyGMLite {
1306
1338
  }
1307
1339
  setModulationDepth(channelNumber, modulation, scheduleTime) {
1308
1340
  const channel = this.channels[channelNumber];
1309
- scheduleTime ??= this.audioContext.currentTime;
1341
+ if (!(0 <= scheduleTime))
1342
+ scheduleTime = this.audioContext.currentTime;
1310
1343
  channel.state.modulationDepth = modulation / 127;
1311
1344
  this.updateModulation(channel, scheduleTime);
1312
1345
  }
1313
1346
  setVolume(channelNumber, volume, scheduleTime) {
1314
- scheduleTime ??= this.audioContext.currentTime;
1347
+ if (!(0 <= scheduleTime))
1348
+ scheduleTime = this.audioContext.currentTime;
1315
1349
  const channel = this.channels[channelNumber];
1316
1350
  channel.state.volume = volume / 127;
1317
1351
  this.updateChannelVolume(channel, scheduleTime);
@@ -1324,13 +1358,15 @@ export class MidyGMLite {
1324
1358
  };
1325
1359
  }
1326
1360
  setPan(channelNumber, pan, scheduleTime) {
1327
- scheduleTime ??= this.audioContext.currentTime;
1361
+ if (!(0 <= scheduleTime))
1362
+ scheduleTime = this.audioContext.currentTime;
1328
1363
  const channel = this.channels[channelNumber];
1329
1364
  channel.state.pan = pan / 127;
1330
1365
  this.updateChannelVolume(channel, scheduleTime);
1331
1366
  }
1332
1367
  setExpression(channelNumber, expression, scheduleTime) {
1333
- scheduleTime ??= this.audioContext.currentTime;
1368
+ if (!(0 <= scheduleTime))
1369
+ scheduleTime = this.audioContext.currentTime;
1334
1370
  const channel = this.channels[channelNumber];
1335
1371
  channel.state.expression = expression / 127;
1336
1372
  this.updateChannelVolume(channel, scheduleTime);
@@ -1352,7 +1388,8 @@ export class MidyGMLite {
1352
1388
  }
1353
1389
  setSustainPedal(channelNumber, value, scheduleTime) {
1354
1390
  const channel = this.channels[channelNumber];
1355
- scheduleTime ??= this.audioContext.currentTime;
1391
+ if (!(0 <= scheduleTime))
1392
+ scheduleTime = this.audioContext.currentTime;
1356
1393
  channel.state.sustainPedal = value / 127;
1357
1394
  if (64 <= value) {
1358
1395
  this.processScheduledNotes(channel, (note) => {
@@ -1410,7 +1447,8 @@ export class MidyGMLite {
1410
1447
  }
1411
1448
  setPitchBendRange(channelNumber, value, scheduleTime) {
1412
1449
  const channel = this.channels[channelNumber];
1413
- scheduleTime ??= this.audioContext.currentTime;
1450
+ if (!(0 <= scheduleTime))
1451
+ scheduleTime = this.audioContext.currentTime;
1414
1452
  const state = channel.state;
1415
1453
  const prev = state.pitchWheelSensitivity;
1416
1454
  const next = value / 12800;
@@ -1420,7 +1458,8 @@ export class MidyGMLite {
1420
1458
  this.applyVoiceParams(channel, 16, scheduleTime);
1421
1459
  }
1422
1460
  allSoundOff(channelNumber, _value, scheduleTime) {
1423
- scheduleTime ??= this.audioContext.currentTime;
1461
+ if (!(0 <= scheduleTime))
1462
+ scheduleTime = this.audioContext.currentTime;
1424
1463
  return this.stopActiveNotes(channelNumber, 0, true, scheduleTime);
1425
1464
  }
1426
1465
  resetChannelStates(channelNumber) {
@@ -1472,7 +1511,8 @@ export class MidyGMLite {
1472
1511
  }
1473
1512
  }
1474
1513
  allNotesOff(channelNumber, _value, scheduleTime) {
1475
- scheduleTime ??= this.audioContext.currentTime;
1514
+ if (!(0 <= scheduleTime))
1515
+ scheduleTime = this.audioContext.currentTime;
1476
1516
  return this.stopActiveNotes(channelNumber, 0, false, scheduleTime);
1477
1517
  }
1478
1518
  handleUniversalNonRealTimeExclusiveMessage(data, scheduleTime) {
@@ -1493,7 +1533,8 @@ export class MidyGMLite {
1493
1533
  }
1494
1534
  }
1495
1535
  GM1SystemOn(scheduleTime) {
1496
- scheduleTime ??= this.audioContext.currentTime;
1536
+ if (!(0 <= scheduleTime))
1537
+ scheduleTime = this.audioContext.currentTime;
1497
1538
  this.mode = "GM1";
1498
1539
  for (let i = 0; i < this.channels.length; i++) {
1499
1540
  this.allSoundOff(i, 0, scheduleTime);
@@ -1521,7 +1562,8 @@ export class MidyGMLite {
1521
1562
  this.setMasterVolume(volume, scheduleTime);
1522
1563
  }
1523
1564
  setMasterVolume(value, scheduleTime) {
1524
- scheduleTime ??= this.audioContext.currentTime;
1565
+ if (!(0 <= scheduleTime))
1566
+ scheduleTime = this.audioContext.currentTime;
1525
1567
  this.masterVolume.gain
1526
1568
  .cancelScheduledValues(scheduleTime)
1527
1569
  .setValueAtTime(value * value, scheduleTime);
package/esm/midy.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export class Midy {
1
+ export class Midy extends EventTarget {
2
2
  static channelSettings: {
3
3
  scheduleIndex: number;
4
4
  detune: number;
@@ -51,6 +51,8 @@ export class Midy {
51
51
  isPaused: boolean;
52
52
  isStopping: boolean;
53
53
  isSeeking: boolean;
54
+ loop: boolean;
55
+ loopStart: number;
54
56
  playPromise: any;
55
57
  timeline: any[];
56
58
  notePromises: any[];
@@ -106,7 +108,7 @@ export class Midy {
106
108
  createAudioBuffer(voiceParams: any): Promise<any>;
107
109
  isLoopDrum(channel: any, noteNumber: any): boolean;
108
110
  createBufferSource(channel: any, noteNumber: any, voiceParams: any, audioBuffer: any): any;
109
- scheduleTimelineEvents(scheduleTime: any, queueIndex: any): Promise<any>;
111
+ scheduleTimelineEvents(scheduleTime: any, queueIndex: any): any;
110
112
  getQueueIndex(second: any): number;
111
113
  resetAllStates(): void;
112
114
  updateStates(queueIndex: any, nextQueueIndex: any): void;
@@ -128,8 +130,8 @@ export class Midy {
128
130
  seekTo(second: any): void;
129
131
  calcTotalTime(): number;
130
132
  currentTime(): number;
131
- processScheduledNotes(channel: any, callback: any): void;
132
- processActiveNotes(channel: any, scheduleTime: any, callback: any): void;
133
+ processScheduledNotes(channel: any, callback: any): Promise<void>;
134
+ processActiveNotes(channel: any, scheduleTime: any, callback: any): Promise<void>;
133
135
  createConvolutionReverbImpulse(audioContext: any, decay: any, preDecay: any): any;
134
136
  createConvolutionReverb(audioContext: any, impulse: any): {
135
137
  input: any;
@@ -183,11 +185,11 @@ export class Midy {
183
185
  noteOn(channelNumber: any, noteNumber: any, velocity: any, startTime: any): Promise<void>;
184
186
  disconnectNote(note: any): void;
185
187
  releaseNote(channel: any, note: any, endTime: any): Promise<any>;
186
- noteOff(channelNumber: any, noteNumber: any, velocity: any, endTime: any, force: any): Promise<any> | undefined;
188
+ noteOff(channelNumber: any, noteNumber: any, _velocity: any, endTime: any, force: any): any;
187
189
  setNoteIndex(channel: any, index: any): void;
188
190
  findNoteOffIndex(channel: any, noteNumber: any): any;
189
- releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): (Promise<any> | undefined)[];
190
- releaseSostenutoPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): (Promise<any> | undefined)[];
191
+ releaseSustainPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): any[];
192
+ releaseSostenutoPedal(channelNumber: any, halfVelocity: any, scheduleTime: any): any[];
191
193
  createMessageHandlers(): any[];
192
194
  handleMessage(data: any, scheduleTime: any): void;
193
195
  activeSensing(): void;
@@ -272,6 +274,7 @@ export class Midy {
272
274
  setCoarseTuning(channelNumber: any, value: any, scheduleTime: any): void;
273
275
  handleModulationDepthRangeRPN(channelNumber: any, scheduleTime: any): void;
274
276
  setModulationDepthRange(channelNumber: any, value: any, scheduleTime: any): void;
277
+ setRPGMakerLoop(_channelNumber: any, _value: any, scheduleTime: any): void;
275
278
  allSoundOff(channelNumber: any, _value: any, scheduleTime: any): Promise<any[]>;
276
279
  resetChannelStates(channelNumber: any): void;
277
280
  resetAllControllers(channelNumber: any, _value: any, scheduleTime: any): void;
package/esm/midy.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"midy.d.ts","sourceRoot":"","sources":["../src/midy.js"],"names":[],"mappings":"AAmKA;IA6CE;;;;;;;;;;;;;;;MAeE;IAEF,+BAoBC;IAjFD,aAAa;IACb,yBAAqB;IACrB,2BAAuB;IAC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,+EAuCC;IAED,qCAYC;IAED,qCAYC;IAED,4EAqEC;IAED,4DAGC;IAED,qDAKC;IAED,gEAIC;IAED,yDAWC;IAED,kEAGC;IAED,2DAWC;IAED,sEAeC;IAED,4CAOC;IAED,+BAIC;IAED,qDAiBC;IAED,gCAGC;IAED,kCAEC;IA6BD,4CAEC;IAED,+DAaC;IAED,kDAiBC;IAED,2GAKC;IAED,sDAIC;IAED,qCAEC;IAED,uDAMC;IAED,sCAEC;IAED,uDASC;IAED,sCAEC;IAED,2DAqBC;IAED,0CAEC;IAED,mCAeC;IAED,2FAgBC;IAED,2FAoBC;IAED,iDAMC;IAED,wDAUC;IAED,qDAUC;IAED,kDAUC;IAED,mDAUC;IAED,sDAUC;IAED,yEAgBC;IAED,wEAaC;IAED,2CAIC;IAED,oFAOC;IAED,6DAcC;IAED,yEAIC;IAED,0CAuEC;IAED,yEAcC;IAED,gDAYC;IAGD,6DAgBC;CACF"}
1
+ {"version":3,"file":"midy.d.ts","sourceRoot":"","sources":["../src/midy.js"],"names":[],"mappings":"AAsKA;IA+CE;;;;;;;;;;;;;;;MAeE;IAEF,+BAqBC;IApFD,aAAa;IACb,yBAAqB;IACrB,2BAAuB;IACvB;;;;MAIE;IACF;;;;;;MAME;IACF,oBAAiB;IACjB,qBAAmB;IACnB,kBAAc;IACd,0BAAsB;IACtB,+BAA6B;IAC7B,0BAAwB;IACxB,kBAAc;IACd,mBAAiB;IACjB,kBAAc;IACd,mBAAe;IACf,kBAAgB;IAChB,0BAAuD;IACvD,4BAAyB;IACzB,0BAAuB;IACvB,kCAA+B;IAC/B,mBAAkB;IAClB,mBAAkB;IAClB,kBAAiB;IACjB,oBAAmB;IACnB,mBAAkB;IAClB,cAAY;IACZ,kBAAc;IACd,iBAAY;IACZ,gBAAc;IACd,oBAAkB;IAClB,sBAAwB;IACxB,2BAAqC;IACrC,+BAEE;IAqBA,kBAAgC;IAChC,kBAA8C;IAC9C,eAAwD;IACxD,qBAGE;IACF,uBAAmD;IAC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