From 349e47d55e73c3cb47808d76431d0bbbdcb9f194 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Mon, 14 Dec 2020 13:38:23 +0800 Subject: [PATCH 01/23] Update the short URL of colab. --- README.md | 2 +- docs/source/index.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c7a5e6f..2fe3ca6 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Omnizart is a Python library that aims for democratizing automatic music transcr Given polyphonic music, it is able to transcribe pitched instruments, vocal melody, chords, drum events, and beat. This is powered by the research outcomes from [Music and Culture Technology (MCT) Lab](https://sites.google.com/view/mctl/home). -### Transcribe your favorite songs now in Colab! [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://bit.ly/omnizart-colab) +### Transcribe your favorite songs now in Colab! [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://bit.ly/OmnizartColab) # Quick start diff --git a/docs/source/index.rst b/docs/source/index.rst index 66deda6..0be5312 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,7 +18,7 @@ analyzing polyphonic music and transcribes **chord progression** :cite:`chord`, **drum events** :cite:`drum`, **frame-level vocal melody** :cite:`vocalcontour`, -**note-level vocal melody** :cite:`vocal`, and +**note-level vocal melody** :cite:`vocal`, and **beat** :cite:`beat`. Omnizart provides the main functionalities that construct the life-cycle of deep learning-based music transcription, @@ -31,7 +31,7 @@ Demonstration Colab ***** -Play with the `Colab notebook `_ to transcribe your favorite song almost immediately! +Play with the `Colab notebook `_ to transcribe your favorite song almost immediately! Sound samples ************* From 6bce5d7f4b5896bec5b0479d3f757634fba246aa Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Mon, 14 Dec 2020 14:04:56 +0800 Subject: [PATCH 02/23] Fix bibtex bug --- docs/source/index.rst | 3 +-- docs/source/refs.bib | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 0be5312..4f902a0 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -125,5 +125,4 @@ You can use *Audacity* to open the files. References ########## -.. bibliography:: - refs.bib +.. bibliography:: refs.bib diff --git a/docs/source/refs.bib b/docs/source/refs.bib index 64c1777..2335616 100644 --- a/docs/source/refs.bib +++ b/docs/source/refs.bib @@ -26,7 +26,7 @@ @inproceedings{vocalcontour year = {2018} } -@inproceedings{vocal, +@inproceedings{beat, author = {Y.-C. Chuang and L. Su}, title = {Beat and Downbeat tracking of Symbolic Music Data Using Deep Recurrent Neural Networks}, booktitle = {APSIPA ASC}, From 1086213685405485384ce03fb151a5e56beb8ddb Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Thu, 24 Dec 2020 11:41:07 +0800 Subject: [PATCH 03/23] temp update --- docs/source/index.rst | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 0d0c868..62933ec 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -18,7 +18,7 @@ analyzing polyphonic music and transcribes **chord progression** :cite:`chord`, **drum events** :cite:`drum`, **frame-level vocal melody** :cite:`vocalcontour`, -**note-level vocal melody** :cite:`vocal`, and +**note-level vocal melody** :cite:`vocal`, and **beat** :cite:`beat`. Omnizart provides the main functionalities that construct the life-cycle of deep learning-based music transcription, @@ -31,7 +31,7 @@ Demonstration Colab ***** -Play with the `Colab notebook `_ to transcribe your favorite song almost immediately! +Play with the `Colab notebook `_ to transcribe your favorite song almost immediately! Sound samples ************* @@ -125,4 +125,13 @@ You can use *Audacity* to open the files. References ########## -.. bibliography:: refs.bib +.. bibliography:: + refs.bib + +[1]_ Tsung-Ping Chen and Lis Su, "Harmony Transformer: Incorporating Chord Segmentation Into Harmony Recognition," +International Society of Music Information Retrieval Conference (ISMIR), 2019. + +[2]_ + +[3]_ Wei-Tsung Lu and Li Su, "Vocal Melody Extraction With Semantic Segmentation and Audio-Symbolic Domain +Transfer Learning," International Society of Music Information Retrieval Conference (ISMIR), 2018. From 0ab5a273991a5526b52dc2b10f3a90e2d8500924 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Tue, 29 Dec 2020 12:56:26 +0800 Subject: [PATCH 04/23] Initial commit --- docs/source/add-new-modules.rst | 79 +++++++++++++++++++++++++++++++++ docs/source/index.rst | 7 +++ 2 files changed, 86 insertions(+) create mode 100644 docs/source/add-new-modules.rst diff --git a/docs/source/add-new-modules.rst b/docs/source/add-new-modules.rst new file mode 100644 index 0000000..5ad55f1 --- /dev/null +++ b/docs/source/add-new-modules.rst @@ -0,0 +1,79 @@ +Add New Modules +=============== + +This page describes how to add new modules into Omnizart project, adapt the original implementations +to omnizart's architecture. + +Before starting walking through the integration process, be sure you have already read the +`CONTRIBUTING.md `_, +and the `slides of omnziart `_ +could also be helpful for your understanding of this project. +Additionally, there are few more things to be always kept in mind while developing omnizart. + +Principles +########## + +* **Find an existing module and start development** - There are already several implemented modules + that are fully functional, and being great examples that give you hints on your way developing + new modules. Most of them are very similar of their overall architecture, but vary in detail. + Most the time, you could just copy and paste the small pieces to your module, and modify just a + small part of them to adapt to your task. +* **Try not to make your own wheels** - There have been many useful and validated functions that are + developed to deal with the daily works. They are already there to cover 90% of every details of a + module, thus new logics are in very small chances being needed. + Most of the time you need to implement the most would be the part of feature and label extraction, + which will be explained in the upcoming sections. +* **Check with linters frequently** - You should always do ``make lint`` before you push to github, + checking that there aren't any errors with the code format, or the build process would fail. +* **Don't permit linter errors easily** - You may find some comments that permits the linter errors + while surfing the code. Those are quick solutions while in the early development of omnizart, which + saves lots of time fixing those lint errors. But it should not be the main concern now, as the + architecture is more stable and less error prone. You should follow every hints by the linters + and fix them before you file a pull request. + + +---- + +So now we are all set and ready to add a new module to omnizart. Here we will take the +`PR #11 `_ as the example. + +Setup +##### + +Implement Feature Generation +############################ + +Implement Model Training +######################## + +Implement Transcription +####################### + +Add Unit Tests +############## + +Commit Checkpoints +################## + +Implement CLI +############# + +Add Documentation +################# + +---- + +Optional +######## + +This section holds the optional actions you can do, while it is not necessary to be done +during implementing a new module. + +Add new supported datasets +************************** + +If you want to add a new dataset that is currently not supported by ``omnizart`` (which is defined in +:class:`omnizart.constants.datasets`), things should be noticed are explained in this section. + +(To be continue...) + diff --git a/docs/source/index.rst b/docs/source/index.rst index b3e066b..53d0da9 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -92,6 +92,13 @@ You can use *Audacity* to open the files. quick-start.rst tutorial.rst + add-new-modules.rst + + +.. toctree:: + :maxdepth: 2 + :caption: Commnad Line Interface + music/cli.rst drum/cli.rst chord/cli.rst From 375bb17f5ed2f00167432c74fa22e4dfd47003c2 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Tue, 29 Dec 2020 22:35:01 +0800 Subject: [PATCH 05/23] Add section of feature generation --- docs/source/add-new-modules.rst | 64 +++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/docs/source/add-new-modules.rst b/docs/source/add-new-modules.rst index 5ad55f1..aceaab9 100644 --- a/docs/source/add-new-modules.rst +++ b/docs/source/add-new-modules.rst @@ -40,9 +40,73 @@ So now we are all set and ready to add a new module to omnizart. Here we will ta Setup ##### +1. **IMPORTANT** - Give your module a short, yet descriptive name. In the example, the name is + ``PatchCNN`` (camel-case), ``patch_cnn`` (snake-case), and ``patch-cnn`` (for CLI use). + +2. Create a folder named after your module under ``omnizart``. There should be at least two files: + ``app.py`` and ``__init__.py``. + Implement Feature Generation ############################ +The process unit should be **a dataset**, means the function accepts the path to the dataset itself, and will handle the rest +of the things like dataset type inferring, folder structure handling, file parsing, feature extraction, and output storage. + +Commits +******* + +* `3ff6c4a `_ + - Builds the main structure of feature extraction. +* `f3138eb `_ + - Contains the patch of label extraction function. +* `0190f18 `_ + - Contains the patch of label extraction function. + +Critical Files/Functions +************************ + +* `omnizart.patch_cnn.app.PatchCNNTranscription.generate_feature `_ + - The main function for managing the process of feature generation. + +* `omnizart.feature.cfp.extract_patch_cfp `_ + - The function for feature extraction, which takes audio path as the input and outputs the required feature representations. + +* `omnizart.patch_cnn.app.extract_label `_ + - The function for label extraction, generating the representation of ground-truth. Accepts the path to the ground-truth file, parses the contents + into intermediate format (see :class:`omnizart.base.Label`), and extracts necessary informations. + + Normally, it should be defined in a separate file called ``labels.py`` under *omnizart//* when the extraction process contains lots of logics. + Since the label extraction in this example is relativly simple, it is okay to put it under ``omnizart.patch_cnn.app``. + See the conventional case :class:`omnizart.drum.labels`. + +* `omnizart.patch_cnn._parallel_feature_extraction `_ + - To boost the process of feature extraction, files are processed in parallel. You can use the function :class:`omnizart.utils.parallel_generator` + to accelerate the process. + +* `omnizart.setting_loaders.PatchCNNSettings `_ + - The data class that holds the necessary hyper parameters that will be used by different functions of this module. For feature extraction, the + parameters are registered under ``PatchCNNSettings.feature`` attribute. + +* `omnizart/defatuls/patch_cnn.yaml `_ + - The configuration file of the module, records the values of hyper parameters and will be consumed by the data class (i.e. PatchCNNSettings). + +Overall Process Flow +******************** + +1. Determine the dataset type from the given dataset path. + * `music module `_ +2. Choose the coressponding dataset strcuture class. + * `patch-cnn module `_ + * `music module `_ +3. Parse audio/ground-truth file pairs. + * `patch-cnn module `_ +4. Make sure feature output path exists. + * `patch-cnn module `_ +5. Parallel generate feature and label representation. + * `patch-cnn module `_ +6. Write the settings to the output path, named as *.success.yaml*. + * `patch-cnn module `_ + Implement Model Training ######################## From 1cc916e084fa610393ff875b94248468ce517081 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Wed, 30 Dec 2020 15:31:39 +0800 Subject: [PATCH 06/23] Add section of model training --- docs/source/add-new-modules.rst | 73 +++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/docs/source/add-new-modules.rst b/docs/source/add-new-modules.rst index aceaab9..0566692 100644 --- a/docs/source/add-new-modules.rst +++ b/docs/source/add-new-modules.rst @@ -80,8 +80,9 @@ Critical Files/Functions See the conventional case :class:`omnizart.drum.labels`. * `omnizart.patch_cnn._parallel_feature_extraction `_ - - To boost the process of feature extraction, files are processed in parallel. You can use the function :class:`omnizart.utils.parallel_generator` - to accelerate the process. + + - To boost the process of feature extraction, files are processed in parallel. You can use the function + :class:`omnizart.utils.parallel_generator` to accelerate the process. * `omnizart.setting_loaders.PatchCNNSettings `_ - The data class that holds the necessary hyper parameters that will be used by different functions of this module. For feature extraction, the @@ -96,20 +97,78 @@ Overall Process Flow 1. Determine the dataset type from the given dataset path. * `music module `_ 2. Choose the coressponding dataset strcuture class. - * `patch-cnn module `_ + * `patch-cnn `_ * `music module `_ 3. Parse audio/ground-truth file pairs. - * `patch-cnn module `_ + * `patch-cnn `_ 4. Make sure feature output path exists. - * `patch-cnn module `_ + * `patch-cnn `_ 5. Parallel generate feature and label representation. - * `patch-cnn module `_ + * `patch-cnn `_ 6. Write the settings to the output path, named as *.success.yaml*. - * `patch-cnn module `_ + * `patch-cnn `_ + Implement Model Training ######################## +All the training should happen in the ``.fit()`` function to fine-tune the model. There is supposed no need to manually +write the training loop. + +Commits +******* + +* `2d6f74d `_ + +Critical Files/Functions +************************ + +* `omnizart.patch_cnn.app.PatchCNNTranscription.train `_ + - The main function for managing the training flow. + +* `omnizart.models.patch_cnn `_ + - Definition of the model. You can also customize the ``train_step`` function to do more sophisticated loss computation. See examples + in `vocal `_ + and `chord `_ + modules. + +* `omnizart.patch_cnn.app.PatchCNNDatasetLoader `_ + - The dataset loader for feeding data to models. Dealing with listing files, iterating through all feature/label pairs, + indexing, and additionally augmenting, cliping, or transforming the feature/label on the fly. + +* `omnizart.setting_loaders.PatchCNNSettings `_ + - The data class that holds the necessary hyper parameters that will be used by different functions of this module. For model training, + related hyper parameters are registered under ``PatchCNNSettings.dataset``, ``PatchCNNSettings.model``, and + ``PatchCNNSettings.training`` attributes. + +* `omnizart/defatuls/patch_cnn.yaml (1) `_ / + `omnizart/defatuls/patch_cnn.yaml (2) `_ + - The configuration file of the module, records the values of hyper parameters and will be consumed by the data class (i.e. PatchCNNSettings). + +Overall Process Flow +******************** + +1. Check whether there is an input model or not. If given input model path, this indicating the user wants to fine-tune on a previously trained model. The coressponding settings should also be updated. + * `patch-cnn `_ + * `drum `_ +2. Decide the portion of training and validation set. + * `patch-cnn `_ + * `drum `_ +3. Construct dataset loader instances for training and validation. + * `patch-cnn `_ +4. Construct a fresh model if there is no input model. + * `patch-cnn `_ +5. Compile the model with loss function + * `patch-cnn `_ + * `music `_ +6. Resolve the output path of the model + * `patch-cnn `_ +7. Construct the callbacks for storing the checkpoints, early stopping the training, and others. + * `patch-cnn `_ +8. Start training + * `patch-cnn `_ + + Implement Transcription ####################### From ea2ed2463fc44d68c2d7aacf45cfaaba9c337efa Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Mar 2021 15:03:09 +0800 Subject: [PATCH 07/23] Add demo page --- docs/source/_static/css/waveform-list.css | 275 + docs/source/_static/demo-collage.html | 92 + docs/source/_static/demo-cosmo.html | 104 + docs/source/_static/demo-dreamshade.html | 100 + docs/source/_static/demo-stardust.html | 96 + docs/source/_static/demo-surrealist.html | 92 + docs/source/_static/js/emitter.js | 388 + docs/source/_static/js/stem-tracks.js | 38 + .../_static/js/waveform-playlist.var.js | 9282 +++++++++++++++++ .../_static/js/waveform-playlist.var.js.map | 1 + docs/source/conf.py | 2 +- docs/source/demo.rst | 43 + docs/source/index.rst | 3 +- 13 files changed, 10513 insertions(+), 3 deletions(-) create mode 100644 docs/source/_static/css/waveform-list.css create mode 100644 docs/source/_static/demo-collage.html create mode 100644 docs/source/_static/demo-cosmo.html create mode 100644 docs/source/_static/demo-dreamshade.html create mode 100644 docs/source/_static/demo-stardust.html create mode 100644 docs/source/_static/demo-surrealist.html create mode 100644 docs/source/_static/js/emitter.js create mode 100644 docs/source/_static/js/stem-tracks.js create mode 100644 docs/source/_static/js/waveform-playlist.var.js create mode 100644 docs/source/_static/js/waveform-playlist.var.js.map create mode 100644 docs/source/demo.rst diff --git a/docs/source/_static/css/waveform-list.css b/docs/source/_static/css/waveform-list.css new file mode 100644 index 0000000..d784a06 --- /dev/null +++ b/docs/source/_static/css/waveform-list.css @@ -0,0 +1,275 @@ +.playlist { + margin: 2em 0; +} + +.playlist .playlist-time-scale { + height: 30px; +} + +.playlist .playlist-tracks { + background: #E0EFF1; +} + +.playlist .channel { + background: grey; +} + +.playlist .channel-progress { + background: orange; +} + +.playlist .cursor { + background: black; +} + +.playlist .wp-fade { + background-color: rgba(0, 0, 0, 0.1); +} + +.playlist .state-cursor, +.playlist .state-select { + cursor: text; +} + +.playlist .state-fadein { + cursor: w-resize; +} + +.playlist .state-fadeout { + cursor: e-resize; +} + +.playlist .state-shift { + cursor: ew-resize; +} + +.playlist .selection.point { + background: red; +} + +.playlist .selection.segment { + background: rgba(0, 0, 0, 0.1); +} + +.playlist .channel-wrapper.silent .channel { + opacity: 0.3; +} + +.playlist .controls { + background: white; + text-align: center; +} + +.playlist .controls header { + overflow: hidden; + color: rgb(0, 0, 0); + background-color: rgba(43, 226, 52, 0.418); + margin-bottom: 1em; + height: 20px; +} + +.playlist .controls label { + margin: 1em auto; + width: 100%; + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + transform: translate(0, 0); +} + +.playlist .controls label:before { + content: "\f027"; + color: black; + font-size: 18px; + padding-right: 5px; + -moz-osx-font-smoothing: grayscale; +} + +.playlist .controls label:after { + content: "\f028"; + color: black; + font-size: 18px; + padding-left: 5px; +} + +.playlist .controls input[type=range] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + display: inline-block; + width: 75%; +} + +.playlist .controls input[type=range]::-webkit-slider-runnable-track { + height: 8px; + background: #ddd; + border: none; + border-radius: 3px; + padding: 1px; +} + +.playlist .controls input[type=range]::-moz-range-track { + height: 8px; + background: #ddd; + border: none; + border-radius: 3px; + padding: 1px; +} + +.playlist .controls input[type=range]::-webkit-slider-thumb { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border: none; + height: 16px; + width: 16px; + border-radius: 50%; + background: goldenrod; + margin-top: -5px; + cursor: ew-resize; +} + +.playlist .controls input[type=range]::-moz-range-thumb { + border: none; + height: 16px; + width: 16px; + border-radius: 50%; + background: goldenrod; + margin-top: -5px; + cursor: ew-resize; +} + +.playlist .controls input[type=range]:focus { + outline: none; +} + +.playlist .controls input[type=range]:focus::-webkit-slider-runnable-track { + background: #ccc; +} + +.playlist .controls input[type=range]:focus::-moz-range-track { + background: #ccc; +} + +.playlist .annotations .annotations-boxes { + text-align: center; +} + +.playlist .annotations .annotation-box { + border: 2px dashed grey; + padding: 0 10px; +} + +.playlist .annotations .annotation-box .resize-handle { + background: grey; + opacity: 0.3; + cursor: ew-resize; +} + +.playlist .annotations .annotation-box .id { + cursor: pointer; + display: inline-block; + width: 100%; + height: 100%; +} + +.playlist .annotations .annotations-text { + font-size: 19px; + font-weight: 300; + margin-top: 1em; + height: 160px; + overflow-x: hidden; + overflow-y: auto; +} + +.playlist .annotations .annotations-text .annotation { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: flex-start; + align-items: stretch; +} + +.playlist .annotations .annotations-text .annotation span { + margin: 0.3rem 0.6rem; +} + +.playlist .annotations .annotations-text .annotation span:last-of-type { + margin-right: 1.2rem; +} + +.playlist .annotations .annotations-text .annotation .annotation-id { + font-size: 16px; + line-height: 27px; +} + +.playlist .annotations .annotations-text .annotation .annotation-start { + font-size: 16px; + line-height: 27px; +} + +.playlist .annotations .annotations-text .annotation .annotation-end { + font-size: 16px; + line-height: 27px; +} + +.playlist .annotations .annotations-text .annotation .annotation-lines { + flex-grow: 10; +} + +.playlist .annotations .annotations-text .annotation .annotation-actions { + flex-basis: auto; + width: 80px; + text-align: right; + font-size: 16px; +} + +.playlist .annotations .annotations-text .annotation .annotation-actions i { + margin-right: 0.6rem; +} + +.playlist .annotations .annotations-text .annotation .annotation-actions i:last-of-type { + margin-right: 0; +} + +.playlist .annotations .annotations-text .annotation .annotation-actions i:hover { + color: orange; + cursor: pointer; +} + +.playlist .annotations .current { + background-color: #EBF4F6; +} + +.playlist .vocals { + background-color: #c0dce0; +} + +.playlist .vocals header { + background-color: green; +} + +.track-drop { + border: 2px dashed blue; + height: 100px; + width: 200px; + margin: 1em 0; +} + +.track-drop::before { + content: "Drop audio file(s) here!"; +} + +.track-drop.drag-enter { + border: 2px solid orange; +} + +footer { + margin-top: 2em; +} + + +/*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/docs/source/_static/demo-collage.html b/docs/source/_static/demo-collage.html new file mode 100644 index 0000000..98151d4 --- /dev/null +++ b/docs/source/_static/demo-collage.html @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + +
+
+ + + + + + +
+ 00:00:00.0 +
+
+
+
+
+ + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/docs/source/_static/demo-cosmo.html b/docs/source/_static/demo-cosmo.html new file mode 100644 index 0000000..86fc13a --- /dev/null +++ b/docs/source/_static/demo-cosmo.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + +
+
+ + + + + + +
+ 00:00:00.0 +
+
+
+
+
+ + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/docs/source/_static/demo-dreamshade.html b/docs/source/_static/demo-dreamshade.html new file mode 100644 index 0000000..5cc2482 --- /dev/null +++ b/docs/source/_static/demo-dreamshade.html @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + +
+
+ + + + + + +
+ 00:00:00.0 +
+
+
+
+
+ + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/docs/source/_static/demo-stardust.html b/docs/source/_static/demo-stardust.html new file mode 100644 index 0000000..357397f --- /dev/null +++ b/docs/source/_static/demo-stardust.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + +
+
+ + + + + + +
+ 00:00:00.0 +
+
+
+
+
+ + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/docs/source/_static/demo-surrealist.html b/docs/source/_static/demo-surrealist.html new file mode 100644 index 0000000..4a2c285 --- /dev/null +++ b/docs/source/_static/demo-surrealist.html @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ + + + + +
+
+ + + + + + +
+ 00:00:00.0 +
+
+
+
+
+ + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/docs/source/_static/js/emitter.js b/docs/source/_static/js/emitter.js new file mode 100644 index 0000000..c13ebb1 --- /dev/null +++ b/docs/source/_static/js/emitter.js @@ -0,0 +1,388 @@ +/* + * This script is provided to give an example how the playlist can be controlled using the event emitter. + * This enables projects to create/control the useability of the project. + */ + +var ee = playlist.getEventEmitter(); +var $container = $("body"); +var $timeFormat = $container.find('.time-format'); +var $audioStart = $container.find('.audio-start'); +var $audioEnd = $container.find('.audio-end'); +var $time = $container.find('.audio-pos'); + +var format = "hh:mm:ss.uuu"; +var startTime = 0; +var endTime = 0; +var audioPos = 0; +var downloadUrl = undefined; +var isLooping = false; +var playoutPromises; + +function toggleActive(node) { + var active = node.parentNode.querySelectorAll('.active'); + var i = 0, + len = active.length; + + for (; i < len; i++) { + active[i].classList.remove('active'); + } + + node.classList.toggle('active'); +} + +function cueFormatters(format) { + + function clockFormat(seconds, decimals) { + var hours, + minutes, + secs, + result; + + hours = parseInt(seconds / 3600, 10) % 24; + minutes = parseInt(seconds / 60, 10) % 60; + secs = seconds % 60; + secs = secs.toFixed(decimals); + + result = (hours < 10 ? "0" + hours : hours) + ":" + (minutes < 10 ? "0" + minutes : minutes) + ":" + (secs < 10 ? "0" + secs : secs); + + return result; + } + + var formats = { + "seconds": function(seconds) { + return seconds.toFixed(0); + }, + "thousandths": function(seconds) { + return seconds.toFixed(3); + }, + "hh:mm:ss": function(seconds) { + return clockFormat(seconds, 0); + }, + "hh:mm:ss.u": function(seconds) { + return clockFormat(seconds, 1); + }, + "hh:mm:ss.uu": function(seconds) { + return clockFormat(seconds, 2); + }, + "hh:mm:ss.uuu": function(seconds) { + return clockFormat(seconds, 3); + } + }; + + return formats[format]; +} + +function updateSelect(start, end) { + if (start < end) { + $('.btn-trim-audio').removeClass('disabled'); + $('.btn-loop').removeClass('disabled'); + } else { + $('.btn-trim-audio').addClass('disabled'); + $('.btn-loop').addClass('disabled'); + } + + $audioStart.val(cueFormatters(format)(start)); + $audioEnd.val(cueFormatters(format)(end)); + + startTime = start; + endTime = end; +} + +function updateTime(time) { + $time.html(cueFormatters(format)(time)); + + audioPos = time; +} + +updateSelect(startTime, endTime); +updateTime(audioPos); + + + +/* + * Code below sets up events to send messages to the playlist. + */ +// $container.on("click", ".btn-playlist-state-group", function() { +// //reset these for now. +// $('.btn-fade-state-group').addClass('hidden'); +// $('.btn-select-state-group').addClass('hidden'); + +// if ($('.btn-select').hasClass('active')) { +// $('.btn-select-state-group').removeClass('hidden'); +// } + +// if ($('.btn-fadein').hasClass('active') || $('.btn-fadeout').hasClass('active')) { +// $('.btn-fade-state-group').removeClass('hidden'); +// } +// }); + +$container.on("click", ".btn-annotations-download", function() { + ee.emit("annotationsrequest"); +}); + +$container.on("click", ".btn-loop", function() { + isLooping = true; + playoutPromises = playlist.play(startTime, endTime); +}); + +$container.on("click", ".btn-play", function() { + ee.emit("play"); +}); + +$container.on("click", ".btn-pause", function() { + isLooping = false; + ee.emit("pause"); +}); + +$container.on("click", ".btn-stop", function() { + isLooping = false; + ee.emit("stop"); +}); + +$container.on("click", ".btn-rewind", function() { + isLooping = false; + ee.emit("rewind"); +}); + +$container.on("click", ".btn-fast-forward", function() { + isLooping = false; + ee.emit("fastforward"); +}); + +$container.on("click", ".btn-clear", function() { + isLooping = false; + ee.emit("clear"); +}); + +$container.on("click", ".btn-record", function() { + ee.emit("record"); +}); + +//track interaction states +$container.on("click", ".btn-cursor", function() { + ee.emit("statechange", "cursor"); + toggleActive(this); +}); + +$container.on("click", ".btn-select", function() { + ee.emit("statechange", "select"); + toggleActive(this); +}); + +$container.on("click", ".btn-shift", function() { + ee.emit("statechange", "shift"); + toggleActive(this); +}); + +$container.on("click", ".btn-fadein", function() { + ee.emit("statechange", "fadein"); + toggleActive(this); +}); + +$container.on("click", ".btn-fadeout", function() { + ee.emit("statechange", "fadeout"); + toggleActive(this); +}); + +//fade types +$container.on("click", ".btn-logarithmic", function() { + ee.emit("fadetype", "logarithmic"); + toggleActive(this); +}); + +$container.on("click", ".btn-linear", function() { + ee.emit("fadetype", "linear"); + toggleActive(this); +}); + +$container.on("click", ".btn-scurve", function() { + ee.emit("fadetype", "sCurve"); + toggleActive(this); +}); + +$container.on("click", ".btn-exponential", function() { + ee.emit("fadetype", "exponential"); + toggleActive(this); +}); + +//zoom buttons +$container.on("click", ".btn-zoom-in", function() { + ee.emit("zoomin"); +}); + +$container.on("click", ".btn-zoom-out", function() { + ee.emit("zoomout"); +}); + +$container.on("click", ".btn-trim-audio", function() { + ee.emit("trim"); +}); + +$container.on("click", ".btn-info", function() { + console.log(playlist.getInfo()); +}); + +$container.on("click", ".btn-download", function() { + ee.emit('startaudiorendering', 'wav'); +}); + +$container.on("click", ".btn-seektotime", function() { + var time = parseInt(document.getElementById("seektime").value, 10); + ee.emit("select", time, time); +}); + +$container.on("change", ".select-seek-style", function(node) { + playlist.setSeekStyle(node.target.value); +}); + +//track drop +$container.on("dragenter", ".track-drop", function(e) { + e.preventDefault(); + e.target.classList.add("drag-enter"); +}); + +$container.on("dragover", ".track-drop", function(e) { + e.preventDefault(); +}); + +$container.on("dragleave", ".track-drop", function(e) { + e.preventDefault(); + e.target.classList.remove("drag-enter"); +}); + +$container.on("drop", ".track-drop", function(e) { + e.preventDefault(); + e.target.classList.remove("drag-enter"); + + var dropEvent = e.originalEvent; + + for (var i = 0; i < dropEvent.dataTransfer.files.length; i++) { + ee.emit("newtrack", dropEvent.dataTransfer.files[i]); + } +}); + +$container.on("change", ".time-format", function(e) { + format = $timeFormat.val(); + ee.emit("durationformat", format); + + updateSelect(startTime, endTime); + updateTime(audioPos); +}); + +$container.on("input change", ".master-gain", function(e) { + ee.emit("mastervolumechange", e.target.value); +}); + +$container.on("change", ".continuous-play", function(e) { + ee.emit("continuousplay", $(e.target).is(':checked')); +}); + +$container.on("change", ".link-endpoints", function(e) { + ee.emit("linkendpoints", $(e.target).is(':checked')); +}); + +$container.on("change", ".automatic-scroll", function(e) { + ee.emit("automaticscroll", $(e.target).is(':checked')); +}); + +function displaySoundStatus(status) { + $(".sound-status").html(status); +} + +function displayLoadingData(data) { + var info = $("
").append(data); + $(".loading-data").append(info); +} + +function displayDownloadLink(link) { + var dateString = (new Date()).toISOString(); + var $link = $("", { + 'href': link, + 'download': 'waveformplaylist' + dateString + '.wav', + 'text': 'Download mix ' + dateString, + 'class': 'btn btn-small btn-download-link' + }); + + $('.btn-download-link').remove(); + $('.btn-download').after($link); +} + + +/* + * Code below receives updates from the playlist. + */ +ee.on("select", updateSelect); + +ee.on("timeupdate", updateTime); + +ee.on("mute", function(track) { + displaySoundStatus("Mute button pressed for " + track.name); +}); + +ee.on("solo", function(track) { + displaySoundStatus("Solo button pressed for " + track.name); +}); + +ee.on("volumechange", function(volume, track) { + displaySoundStatus(track.name + " now has volume " + volume + "."); +}); + +ee.on("mastervolumechange", function(volume) { + displaySoundStatus("Master volume now has volume " + volume + "."); +}); + + +var audioStates = ["uninitialized", "loading", "decoding", "finished"]; + +ee.on("audiorequeststatechange", function(state, src) { + var name = src; + + if (src instanceof File) { + name = src.name; + } + + displayLoadingData("Track " + name + " is in state " + audioStates[state]); +}); + +ee.on("loadprogress", function(percent, src) { + var name = src; + + if (src instanceof File) { + name = src.name; + } + + displayLoadingData("Track " + name + " has loaded " + percent + "%"); +}); + +ee.on("audiosourcesloaded", function() { + displayLoadingData("Tracks have all finished decoding."); +}); + +ee.on("audiosourcesrendered", function() { + displayLoadingData("Tracks have been rendered"); +}); + +ee.on("audiosourceserror", function(e) { + displayLoadingData(e.message); +}); + +ee.on('audiorenderingfinished', function(type, data) { + if (type == 'wav') { + if (downloadUrl) { + window.URL.revokeObjectURL(downloadUrl); + } + + downloadUrl = window.URL.createObjectURL(data); + displayDownloadLink(downloadUrl); + } +}); + +ee.on('finished', function() { + console.log("The cursor has reached the end of the selection !"); + + if (isLooping) { + playoutPromises.then(function() { + playoutPromises = playlist.play(startTime, endTime); + }); + } +}); \ No newline at end of file diff --git a/docs/source/_static/js/stem-tracks.js b/docs/source/_static/js/stem-tracks.js new file mode 100644 index 0000000..8eb65cb --- /dev/null +++ b/docs/source/_static/js/stem-tracks.js @@ -0,0 +1,38 @@ +// Available arguments can be found in the following page. +// https://github.com/naomiaro/waveform-playlist/#playlist-options +// https://github.com/naomiaro/waveform-playlist/#track-options + +var playlist = WaveformPlaylist.init({ + samplesPerPixel: 5000, + waveHeight: 100, + container: document.getElementById("collage-results"), + timescale: true, + state: 'cursor', + colors: { + waveOutlineColor: '#E0EFF1' + }, + controls: { + show: true, //whether or not to include the track controls + width: 180 //width of controls in pixels + }, + zoomLevels: [1000, 3000, 5000], + exclSolo: true, + isAutomaticScroll: true +}); + +playlist.load([{ + "src": "../_audio/collage.mp3", + "name": "Original Song", + "gain": 0.5 + }, + { + "src": "../_audio/collage_vocal_contour.mp3", + "name": "Vocal Contour", + "gain": 1 + }, + { + "src": "../_audio/collage_vocal.mp3", + "name": "Vocal", + "gain": 1 + } +]) \ No newline at end of file diff --git a/docs/source/_static/js/waveform-playlist.var.js b/docs/source/_static/js/waveform-playlist.var.js new file mode 100644 index 0000000..82d1acf --- /dev/null +++ b/docs/source/_static/js/waveform-playlist.var.js @@ -0,0 +1,9282 @@ +var WaveformPlaylist = + /******/ + (function(modules) { // webpackBootstrap + /******/ // The module cache + /******/ + var installedModules = {}; + /******/ + /******/ // The require function + /******/ + function __webpack_require__(moduleId) { + /******/ + /******/ // Check if module is in cache + /******/ + if (installedModules[moduleId]) + /******/ + return installedModules[moduleId].exports; + /******/ + /******/ // Create a new module (and put it into the cache) + /******/ + var module = installedModules[moduleId] = { + /******/ + exports: {}, + /******/ + id: moduleId, + /******/ + loaded: false + /******/ + }; + /******/ + /******/ // Execute the module function + /******/ + modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + /******/ + /******/ // Flag the module as loaded + /******/ + module.loaded = true; + /******/ + /******/ // Return the exports of the module + /******/ + return module.exports; + /******/ + } + /******/ + /******/ + /******/ // expose the modules object (__webpack_modules__) + /******/ + __webpack_require__.m = modules; + /******/ + /******/ // expose the module cache + /******/ + __webpack_require__.c = installedModules; + /******/ + /******/ // __webpack_public_path__ + /******/ + __webpack_require__.p = "/waveform-playlist/js/"; + /******/ + /******/ // Load entry module and return exports + /******/ + return __webpack_require__(0); + /******/ + }) + /************************************************************************/ + /******/ + ([ + /* 0 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.init = init; + + exports.default = function() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var ee = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _eventEmitter2.default)(); + + return init(options, ee); + }; + + var _lodash = __webpack_require__(1); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _createElement = __webpack_require__(2); + + var _createElement2 = _interopRequireDefault(_createElement); + + var _eventEmitter = __webpack_require__(15); + + var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + + var _Playlist = __webpack_require__(36); + + var _Playlist2 = _interopRequireDefault(_Playlist); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function init() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var ee = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (0, _eventEmitter2.default)(); + + if (options.container === undefined) { + throw new Error('DOM element container must be given.'); + } + + window.OfflineAudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext; + window.AudioContext = window.AudioContext || window.webkitAudioContext; + + var audioContext = new window.AudioContext(); + + var defaults = { + ac: audioContext, + sampleRate: audioContext.sampleRate, + samplesPerPixel: 5000, + mono: true, + fadeType: 'logarithmic', + exclSolo: true, + timescale: true, + controls: { + show: true, + width: 180 + }, + colors: { + waveOutlineColor: '#E0EFF1', + timeColor: 'grey', + fadeColor: 'black' + }, + seekStyle: 'line', + waveHeight: 100, + state: 'cursor', + zoomLevels: [1000, 3000, 5000], + annotationList: { + annotations: [], + controls: [], + editable: false, + linkEndpoints: false, + isContinuousPlay: false + }, + isAutomaticScroll: true + }; + + var config = (0, _lodash2.default)(defaults, options); + var zoomIndex = config.zoomLevels.indexOf(config.samplesPerPixel); + + if (zoomIndex === -1) { + throw new Error('initial samplesPerPixel must be included in array zoomLevels'); + } + + var playlist = new _Playlist2.default(); + playlist.setSampleRate(config.sampleRate); + playlist.setSamplesPerPixel(config.samplesPerPixel); + playlist.setAudioContext(config.ac); + playlist.setEventEmitter(ee); + playlist.setUpEventEmitter(); + playlist.setTimeSelection(0, 0); + playlist.setState(config.state); + playlist.setControlOptions(config.controls); + playlist.setWaveHeight(config.waveHeight); + playlist.setColors(config.colors); + playlist.setZoomLevels(config.zoomLevels); + playlist.setZoomIndex(zoomIndex); + playlist.setMono(config.mono); + playlist.setExclSolo(config.exclSolo); + playlist.setShowTimeScale(config.timescale); + playlist.setSeekStyle(config.seekStyle); + playlist.setAnnotations(config.annotationList); + playlist.isAutomaticScroll = config.isAutomaticScroll; + playlist.isContinuousPlay = config.isContinuousPlay; + playlist.linkedEndpoints = config.linkedEndpoints; + + // take care of initial virtual dom rendering. + var tree = playlist.render(); + var rootNode = (0, _createElement2.default)(tree); + + config.container.appendChild(rootNode); + playlist.tree = tree; + playlist.rootNode = rootNode; + + return playlist; + } + + /***/ + }), + /* 1 */ + /***/ + (function(module, exports) { + + /** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max; + + /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ + var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) ? + baseTimes(value.length, String) : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer ? + customizer(object[key], source[key], key, object, source) : + undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') ? + (length--, customizer) : + undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' ? + (isArrayLike(object) && isIndex(index, object.length)) : + (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + module.exports = assign; + + + /***/ + }), + /* 2 */ + /***/ + (function(module, exports, __webpack_require__) { + + var createElement = __webpack_require__(3) + + module.exports = createElement + + + /***/ + }), + /* 3 */ + /***/ + (function(module, exports, __webpack_require__) { + + var document = __webpack_require__(4) + + var applyProperties = __webpack_require__(6) + + var isVNode = __webpack_require__(9) + var isVText = __webpack_require__(11) + var isWidget = __webpack_require__(12) + var handleThunk = __webpack_require__(13) + + module.exports = createElement + + function createElement(vnode, opts) { + var doc = opts ? opts.document || document : document + var warn = opts ? opts.warn : null + + vnode = handleThunk(vnode).a + + if (isWidget(vnode)) { + return vnode.init() + } else if (isVText(vnode)) { + return doc.createTextNode(vnode.text) + } else if (!isVNode(vnode)) { + if (warn) { + warn("Item is not a valid virtual dom node", vnode) + } + return null + } + + var node = (vnode.namespace === null) ? + doc.createElement(vnode.tagName) : + doc.createElementNS(vnode.namespace, vnode.tagName) + + var props = vnode.properties + applyProperties(node, props) + + var children = vnode.children + + for (var i = 0; i < children.length; i++) { + var childNode = createElement(children[i], opts) + if (childNode) { + node.appendChild(childNode) + } + } + + return node + } + + + /***/ + }), + /* 4 */ + /***/ + (function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */ + (function(global) { + var topLevel = typeof global !== 'undefined' ? global : + typeof window !== 'undefined' ? window : {} + var minDoc = __webpack_require__(5); + + var doccy; + + if (typeof document !== 'undefined') { + doccy = document; + } else { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; + } + } + + module.exports = doccy; + + /* WEBPACK VAR INJECTION */ + }.call(exports, (function() { return this; }()))) + + /***/ + }), + /* 5 */ + /***/ + (function(module, exports) { + + /* (ignored) */ + + /***/ + }), + /* 6 */ + /***/ + (function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(7) + var isHook = __webpack_require__(8) + + module.exports = applyProperties + + function applyProperties(node, props, previous) { + for (var propName in props) { + var propValue = props[propName] + + if (propValue === undefined) { + removeProperty(node, propName, propValue, previous); + } else if (isHook(propValue)) { + removeProperty(node, propName, propValue, previous) + if (propValue.hook) { + propValue.hook(node, + propName, + previous ? previous[propName] : undefined) + } + } else { + if (isObject(propValue)) { + patchObject(node, props, previous, propName, propValue); + } else { + node[propName] = propValue + } + } + } + } + + function removeProperty(node, propName, propValue, previous) { + if (previous) { + var previousValue = previous[propName] + + if (!isHook(previousValue)) { + if (propName === "attributes") { + for (var attrName in previousValue) { + node.removeAttribute(attrName) + } + } else if (propName === "style") { + for (var i in previousValue) { + node.style[i] = "" + } + } else if (typeof previousValue === "string") { + node[propName] = "" + } else { + node[propName] = null + } + } else if (previousValue.unhook) { + previousValue.unhook(node, propName, propValue) + } + } + } + + function patchObject(node, props, previous, propName, propValue) { + var previousValue = previous ? previous[propName] : undefined + + // Set attributes + if (propName === "attributes") { + for (var attrName in propValue) { + var attrValue = propValue[attrName] + + if (attrValue === undefined) { + node.removeAttribute(attrName) + } else { + node.setAttribute(attrName, attrValue) + } + } + + return + } + + if (previousValue && isObject(previousValue) && + getPrototype(previousValue) !== getPrototype(propValue)) { + node[propName] = propValue + return + } + + if (!isObject(node[propName])) { + node[propName] = {} + } + + var replacer = propName === "style" ? "" : undefined + + for (var k in propValue) { + var value = propValue[k] + node[propName][k] = (value === undefined) ? replacer : value + } + } + + function getPrototype(value) { + if (Object.getPrototypeOf) { + return Object.getPrototypeOf(value) + } else if (value.__proto__) { + return value.__proto__ + } else if (value.constructor) { + return value.constructor.prototype + } + } + + + /***/ + }), + /* 7 */ + /***/ + (function(module, exports) { + + "use strict"; + + module.exports = function isObject(x) { + return typeof x === "object" && x !== null; + }; + + + /***/ + }), + /* 8 */ + /***/ + (function(module, exports) { + + module.exports = isHook + + function isHook(hook) { + return hook && + (typeof hook.hook === "function" && !hook.hasOwnProperty("hook") || + typeof hook.unhook === "function" && !hook.hasOwnProperty("unhook")) + } + + + /***/ + }), + /* 9 */ + /***/ + (function(module, exports, __webpack_require__) { + + var version = __webpack_require__(10) + + module.exports = isVirtualNode + + function isVirtualNode(x) { + return x && x.type === "VirtualNode" && x.version === version + } + + + /***/ + }), + /* 10 */ + /***/ + (function(module, exports) { + + module.exports = "2" + + + /***/ + }), + /* 11 */ + /***/ + (function(module, exports, __webpack_require__) { + + var version = __webpack_require__(10) + + module.exports = isVirtualText + + function isVirtualText(x) { + return x && x.type === "VirtualText" && x.version === version + } + + + /***/ + }), + /* 12 */ + /***/ + (function(module, exports) { + + module.exports = isWidget + + function isWidget(w) { + return w && w.type === "Widget" + } + + + /***/ + }), + /* 13 */ + /***/ + (function(module, exports, __webpack_require__) { + + var isVNode = __webpack_require__(9) + var isVText = __webpack_require__(11) + var isWidget = __webpack_require__(12) + var isThunk = __webpack_require__(14) + + module.exports = handleThunk + + function handleThunk(a, b) { + var renderedA = a + var renderedB = b + + if (isThunk(b)) { + renderedB = renderThunk(b, a) + } + + if (isThunk(a)) { + renderedA = renderThunk(a, null) + } + + return { + a: renderedA, + b: renderedB + } + } + + function renderThunk(thunk, previous) { + var renderedThunk = thunk.vnode + + if (!renderedThunk) { + renderedThunk = thunk.vnode = thunk.render(previous) + } + + if (!(isVNode(renderedThunk) || + isVText(renderedThunk) || + isWidget(renderedThunk))) { + throw new Error("thunk did not return a valid node"); + } + + return renderedThunk + } + + + /***/ + }), + /* 14 */ + /***/ + (function(module, exports) { + + module.exports = isThunk + + function isThunk(t) { + return t && t.type === "Thunk" + } + + + /***/ + }), + /* 15 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + var d = __webpack_require__(16), + callable = __webpack_require__(35) + + , apply = Function.prototype.apply, call = Function.prototype.call, create = Object.create, defineProperty = Object.defineProperty, defineProperties = Object.defineProperties, hasOwnProperty = Object.prototype.hasOwnProperty, descriptor = { configurable: true, enumerable: false, writable: true } + + , on, once, off, emit, methods, descriptors, base; + + on = function(type, listener) { + var data; + + callable(listener); + + if (!hasOwnProperty.call(this, '__ee__')) { + data = descriptor.value = create(null); + defineProperty(this, '__ee__', descriptor); + descriptor.value = null; + } else { + data = this.__ee__; + } + if (!data[type]) data[type] = listener; + else if (typeof data[type] === 'object') data[type].push(listener); + else data[type] = [data[type], listener]; + + return this; + }; + + once = function(type, listener) { + var once, self; + + callable(listener); + self = this; + on.call(this, type, once = function() { + off.call(self, type, once); + apply.call(listener, this, arguments); + }); + + once.__eeOnceListener__ = listener; + return this; + }; + + off = function(type, listener) { + var data, listeners, candidate, i; + + callable(listener); + + if (!hasOwnProperty.call(this, '__ee__')) return this; + data = this.__ee__; + if (!data[type]) return this; + listeners = data[type]; + + if (typeof listeners === 'object') { + for (i = 0; + (candidate = listeners[i]); ++i) { + if ((candidate === listener) || + (candidate.__eeOnceListener__ === listener)) { + if (listeners.length === 2) data[type] = listeners[i ? 0 : 1]; + else listeners.splice(i, 1); + } + } + } else { + if ((listeners === listener) || + (listeners.__eeOnceListener__ === listener)) { + delete data[type]; + } + } + + return this; + }; + + emit = function(type) { + var i, l, listener, listeners, args; + + if (!hasOwnProperty.call(this, '__ee__')) return; + listeners = this.__ee__[type]; + if (!listeners) return; + + if (typeof listeners === 'object') { + l = arguments.length; + args = new Array(l - 1); + for (i = 1; i < l; ++i) args[i - 1] = arguments[i]; + + listeners = listeners.slice(); + for (i = 0; + (listener = listeners[i]); ++i) { + apply.call(listener, this, args); + } + } else { + switch (arguments.length) { + case 1: + call.call(listeners, this); + break; + case 2: + call.call(listeners, this, arguments[1]); + break; + case 3: + call.call(listeners, this, arguments[1], arguments[2]); + break; + default: + l = arguments.length; + args = new Array(l - 1); + for (i = 1; i < l; ++i) { + args[i - 1] = arguments[i]; + } + apply.call(listeners, this, args); + } + } + }; + + methods = { + on: on, + once: once, + off: off, + emit: emit + }; + + descriptors = { + on: d(on), + once: d(once), + off: d(off), + emit: d(emit) + }; + + base = defineProperties({}, descriptors); + + module.exports = exports = function(o) { + return (o == null) ? create(base) : defineProperties(Object(o), descriptors); + }; + exports.methods = methods; + + + /***/ + }), + /* 16 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var isValue = __webpack_require__(17), + isPlainFunction = __webpack_require__(18), + assign = __webpack_require__(22), + normalizeOpts = __webpack_require__(31), + contains = __webpack_require__(32); + + var d = (module.exports = function(dscr, value /*, options*/ ) { + var c, e, w, options, desc; + if (arguments.length < 2 || typeof dscr !== "string") { + options = value; + value = dscr; + dscr = null; + } else { + options = arguments[2]; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + w = contains.call(dscr, "w"); + } else { + c = w = true; + e = false; + } + + desc = { value: value, configurable: c, enumerable: e, writable: w }; + return !options ? desc : assign(normalizeOpts(options), desc); + }); + + d.gs = function(dscr, get, set /*, options*/ ) { + var c, e, options, desc; + if (typeof dscr !== "string") { + options = set; + set = get; + get = dscr; + dscr = null; + } else { + options = arguments[3]; + } + if (!isValue(get)) { + get = undefined; + } else if (!isPlainFunction(get)) { + options = get; + get = set = undefined; + } else if (!isValue(set)) { + set = undefined; + } else if (!isPlainFunction(set)) { + options = set; + set = undefined; + } + if (isValue(dscr)) { + c = contains.call(dscr, "c"); + e = contains.call(dscr, "e"); + } else { + c = true; + e = false; + } + + desc = { get: get, set: set, configurable: c, enumerable: e }; + return !options ? desc : assign(normalizeOpts(options), desc); + }; + + + /***/ + }), + /* 17 */ + /***/ + (function(module, exports) { + + "use strict"; + + // ES3 safe + var _undefined = void 0; + + module.exports = function(value) { return value !== _undefined && value !== null; }; + + + /***/ + }), + /* 18 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var isFunction = __webpack_require__(19); + + var classRe = /^\s*class[\s{/}]/, + functionToString = Function.prototype.toString; + + module.exports = function(value) { + if (!isFunction(value)) return false; + if (classRe.test(functionToString.call(value))) return false; + return true; + }; + + + /***/ + }), + /* 19 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var isPrototype = __webpack_require__(20); + + module.exports = function(value) { + if (typeof value !== "function") return false; + + if (!hasOwnProperty.call(value, "length")) return false; + + try { + if (typeof value.length !== "number") return false; + if (typeof value.call !== "function") return false; + if (typeof value.apply !== "function") return false; + } catch (error) { + return false; + } + + return !isPrototype(value); + }; + + + /***/ + }), + /* 20 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var isObject = __webpack_require__(21); + + module.exports = function(value) { + if (!isObject(value)) return false; + try { + if (!value.constructor) return false; + return value.constructor.prototype === value; + } catch (error) { + return false; + } + }; + + + /***/ + }), + /* 21 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var isValue = __webpack_require__(17); + + // prettier-ignore + var possibleTypes = { "object": true, "function": true, "undefined": true /* document.all */ }; + + module.exports = function(value) { + if (!isValue(value)) return false; + return hasOwnProperty.call(possibleTypes, typeof value); + }; + + + /***/ + }), + /* 22 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + module.exports = __webpack_require__(23)() ? Object.assign : __webpack_require__(24); + + + /***/ + }), + /* 23 */ + /***/ + (function(module, exports) { + + "use strict"; + + module.exports = function() { + var assign = Object.assign, + obj; + if (typeof assign !== "function") return false; + obj = { foo: "raz" }; + assign(obj, { bar: "dwa" }, { trzy: "trzy" }); + return obj.foo + obj.bar + obj.trzy === "razdwatrzy"; + }; + + + /***/ + }), + /* 24 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var keys = __webpack_require__(25), + value = __webpack_require__(30), + max = Math.max; + + module.exports = function(dest, src /*, …srcn*/ ) { + var error, i, length = max(arguments.length, 2), + assign; + dest = Object(value(dest)); + assign = function(key) { + try { + dest[key] = src[key]; + } catch (e) { + if (!error) error = e; + } + }; + for (i = 1; i < length; ++i) { + src = arguments[i]; + keys(src).forEach(assign); + } + if (error !== undefined) throw error; + return dest; + }; + + + /***/ + }), + /* 25 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + module.exports = __webpack_require__(26)() ? Object.keys : __webpack_require__(27); + + + /***/ + }), + /* 26 */ + /***/ + (function(module, exports) { + + "use strict"; + + module.exports = function() { + try { + Object.keys("primitive"); + return true; + } catch (e) { + return false; + } + }; + + + /***/ + }), + /* 27 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var isValue = __webpack_require__(28); + + var keys = Object.keys; + + module.exports = function(object) { return keys(isValue(object) ? Object(object) : object); }; + + + /***/ + }), + /* 28 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var _undefined = __webpack_require__(29)(); // Support ES3 engines + + module.exports = function(val) { return val !== _undefined && val !== null; }; + + + /***/ + }), + /* 29 */ + /***/ + (function(module, exports) { + + "use strict"; + + // eslint-disable-next-line no-empty-function + module.exports = function() {}; + + + /***/ + }), + /* 30 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var isValue = __webpack_require__(28); + + module.exports = function(value) { + if (!isValue(value)) throw new TypeError("Cannot use null or undefined"); + return value; + }; + + + /***/ + }), + /* 31 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + var isValue = __webpack_require__(28); + + var forEach = Array.prototype.forEach, + create = Object.create; + + var process = function(src, obj) { + var key; + for (key in src) obj[key] = src[key]; + }; + + // eslint-disable-next-line no-unused-vars + module.exports = function(opts1 /*, …options*/ ) { + var result = create(null); + forEach.call(arguments, function(options) { + if (!isValue(options)) return; + process(Object(options), result); + }); + return result; + }; + + + /***/ + }), + /* 32 */ + /***/ + (function(module, exports, __webpack_require__) { + + "use strict"; + + module.exports = __webpack_require__(33)() ? String.prototype.contains : __webpack_require__(34); + + + /***/ + }), + /* 33 */ + /***/ + (function(module, exports) { + + "use strict"; + + var str = "razdwatrzy"; + + module.exports = function() { + if (typeof str.contains !== "function") return false; + return str.contains("dwa") === true && str.contains("foo") === false; + }; + + + /***/ + }), + /* 34 */ + /***/ + (function(module, exports) { + + "use strict"; + + var indexOf = String.prototype.indexOf; + + module.exports = function(searchString /*, position*/ ) { + return indexOf.call(this, searchString, arguments[1]) > -1; + }; + + + /***/ + }), + /* 35 */ + /***/ + (function(module, exports) { + + "use strict"; + + module.exports = function(fn) { + if (typeof fn !== "function") throw new TypeError(fn + " is not a function"); + return fn; + }; + + + /***/ + }), + /* 36 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _lodash = __webpack_require__(37); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _h = __webpack_require__(38); + + var _h2 = _interopRequireDefault(_h); + + var _diff = __webpack_require__(50); + + var _diff2 = _interopRequireDefault(_diff); + + var _patch = __webpack_require__(54); + + var _patch2 = _interopRequireDefault(_patch); + + var _inlineWorker = __webpack_require__(59); + + var _inlineWorker2 = _interopRequireDefault(_inlineWorker); + + var _conversions = __webpack_require__(60); + + var _LoaderFactory = __webpack_require__(61); + + var _LoaderFactory2 = _interopRequireDefault(_LoaderFactory); + + var _ScrollHook = __webpack_require__(65); + + var _ScrollHook2 = _interopRequireDefault(_ScrollHook); + + var _TimeScale = __webpack_require__(66); + + var _TimeScale2 = _interopRequireDefault(_TimeScale); + + var _Track = __webpack_require__(68); + + var _Track2 = _interopRequireDefault(_Track); + + var _Playout = __webpack_require__(84); + + var _Playout2 = _interopRequireDefault(_Playout); + + var _AnnotationList = __webpack_require__(85); + + var _AnnotationList2 = _interopRequireDefault(_AnnotationList); + + var _recorderWorker = __webpack_require__(91); + + var _recorderWorker2 = _interopRequireDefault(_recorderWorker); + + var _exportWavWorker = __webpack_require__(92); + + var _exportWavWorker2 = _interopRequireDefault(_exportWavWorker); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class() { + _classCallCheck(this, _class); + + this.tracks = []; + this.soloedTracks = []; + this.mutedTracks = []; + this.playoutPromises = []; + + this.cursor = 0; + this.playbackSeconds = 0; + this.duration = 0; + this.scrollLeft = 0; + this.scrollTimer = undefined; + this.showTimescale = false; + // whether a user is scrolling the waveform + this.isScrolling = false; + + this.fadeType = 'logarithmic'; + this.masterGain = 1; + this.annotations = []; + this.durationFormat = 'hh:mm:ss.uuu'; + this.isAutomaticScroll = false; + this.resetDrawTimer = undefined; + } + + // TODO extract into a plugin + + + _createClass(_class, [{ + key: 'initExporter', + value: function initExporter() { + this.exportWorker = new _inlineWorker2.default(_exportWavWorker2.default); + } + + // TODO extract into a plugin + + }, { + key: 'initRecorder', + value: function initRecorder(stream) { + var _this = this; + + this.mediaRecorder = new window.MediaRecorder(stream); + + this.mediaRecorder.onstart = function() { + var track = new _Track2.default(); + track.setName('Recording'); + track.setEnabledStates(); + track.setEventEmitter(_this.ee); + + _this.recordingTrack = track; + _this.tracks.push(track); + + _this.chunks = []; + _this.working = false; + }; + + this.mediaRecorder.ondataavailable = function(e) { + _this.chunks.push(e.data); + + // throttle peaks calculation + if (!_this.working) { + var recording = new Blob(_this.chunks, { type: 'audio/ogg; codecs=opus' }); + var loader = _LoaderFactory2.default.createLoader(recording, _this.ac); + loader.load().then(function(audioBuffer) { + // ask web worker for peaks. + _this.recorderWorker.postMessage({ + samples: audioBuffer.getChannelData(0), + samplesPerPixel: _this.samplesPerPixel + }); + _this.recordingTrack.setCues(0, audioBuffer.duration); + _this.recordingTrack.setBuffer(audioBuffer); + _this.recordingTrack.setPlayout(new _Playout2.default(_this.ac, audioBuffer)); + _this.adjustDuration(); + }).catch(function() { + _this.working = false; + }); + _this.working = true; + } + }; + + this.mediaRecorder.onstop = function() { + _this.chunks = []; + _this.working = false; + }; + + this.recorderWorker = new _inlineWorker2.default(_recorderWorker2.default); + // use a worker for calculating recording peaks. + this.recorderWorker.onmessage = function(e) { + _this.recordingTrack.setPeaks(e.data); + _this.working = false; + _this.drawRequest(); + }; + } + }, { + key: 'setShowTimeScale', + value: function setShowTimeScale(show) { + this.showTimescale = show; + } + }, { + key: 'setMono', + value: function setMono(mono) { + this.mono = mono; + } + }, { + key: 'setExclSolo', + value: function setExclSolo(exclSolo) { + this.exclSolo = exclSolo; + } + }, { + key: 'setSeekStyle', + value: function setSeekStyle(style) { + this.seekStyle = style; + } + }, { + key: 'getSeekStyle', + value: function getSeekStyle() { + return this.seekStyle; + } + }, { + key: 'setSampleRate', + value: function setSampleRate(sampleRate) { + this.sampleRate = sampleRate; + } + }, { + key: 'setSamplesPerPixel', + value: function setSamplesPerPixel(samplesPerPixel) { + this.samplesPerPixel = samplesPerPixel; + } + }, { + key: 'setAudioContext', + value: function setAudioContext(ac) { + this.ac = ac; + } + }, { + key: 'setControlOptions', + value: function setControlOptions(controlOptions) { + this.controls = controlOptions; + } + }, { + key: 'setWaveHeight', + value: function setWaveHeight(height) { + this.waveHeight = height; + } + }, { + key: 'setColors', + value: function setColors(colors) { + this.colors = colors; + } + }, { + key: 'setAnnotations', + value: function setAnnotations(config) { + this.annotationList = new _AnnotationList2.default(this, config.annotations, config.controls, config.editable, config.linkEndpoints, config.isContinuousPlay); + } + }, { + key: 'setEventEmitter', + value: function setEventEmitter(ee) { + this.ee = ee; + } + }, { + key: 'getEventEmitter', + value: function getEventEmitter() { + return this.ee; + } + }, { + key: 'setUpEventEmitter', + value: function setUpEventEmitter() { + var _this2 = this; + + var ee = this.ee; + + ee.on('automaticscroll', function(val) { + _this2.isAutomaticScroll = val; + }); + + ee.on('durationformat', function(format) { + _this2.durationFormat = format; + _this2.drawRequest(); + }); + + ee.on('select', function(start, end, track) { + if (_this2.isPlaying()) { + _this2.lastSeeked = start; + _this2.pausedAt = undefined; + _this2.restartPlayFrom(start); + } else { + // reset if it was paused. + _this2.seek(start, end, track); + _this2.ee.emit('timeupdate', start); + _this2.drawRequest(); + } + }); + + ee.on('startaudiorendering', function(type) { + _this2.startOfflineRender(type); + }); + + ee.on('statechange', function(state) { + _this2.setState(state); + _this2.drawRequest(); + }); + + ee.on('shift', function(deltaTime, track) { + track.setStartTime(track.getStartTime() + deltaTime); + _this2.adjustDuration(); + _this2.drawRequest(); + }); + + ee.on('record', function() { + _this2.record(); + }); + + ee.on('play', function(start, end) { + _this2.play(start, end); + }); + + ee.on('pause', function() { + _this2.pause(); + }); + + ee.on('stop', function() { + _this2.stop(); + }); + + ee.on('rewind', function() { + _this2.rewind(); + }); + + ee.on('fastforward', function() { + _this2.fastForward(); + }); + + ee.on('clear', function() { + _this2.clear().then(function() { + _this2.drawRequest(); + }); + }); + + ee.on('solo', function(track) { + _this2.soloTrack(track); + _this2.adjustTrackPlayout(); + _this2.drawRequest(); + }); + + ee.on('mute', function(track) { + _this2.muteTrack(track); + _this2.adjustTrackPlayout(); + _this2.drawRequest(); + }); + + ee.on('volumechange', function(volume, track) { + track.setGainLevel(volume / 100); + }); + + ee.on('mastervolumechange', function(volume) { + _this2.masterGain = volume / 100; + _this2.tracks.forEach(function(track) { + track.setMasterGainLevel(_this2.masterGain); + }); + }); + + ee.on('fadein', function(duration, track) { + track.setFadeIn(duration, _this2.fadeType); + _this2.drawRequest(); + }); + + ee.on('fadeout', function(duration, track) { + track.setFadeOut(duration, _this2.fadeType); + _this2.drawRequest(); + }); + + ee.on('stereopan', function(panvalue, track) { + track.setStereoPanValue(panvalue); + }); + + ee.on('fadetype', function(type) { + _this2.fadeType = type; + }); + + ee.on('newtrack', function(file) { + _this2.load([{ + src: file, + name: file.name + }]); + }); + + ee.on('trim', function() { + var track = _this2.getActiveTrack(); + var timeSelection = _this2.getTimeSelection(); + + track.trim(timeSelection.start, timeSelection.end); + track.calculatePeaks(_this2.samplesPerPixel, _this2.sampleRate); + + _this2.setTimeSelection(0, 0); + _this2.drawRequest(); + }); + + ee.on('zoomin', function() { + var zoomIndex = Math.max(0, _this2.zoomIndex - 1); + var zoom = _this2.zoomLevels[zoomIndex]; + + if (zoom !== _this2.samplesPerPixel) { + _this2.setZoom(zoom); + _this2.drawRequest(); + } + }); + + ee.on('zoomout', function() { + var zoomIndex = Math.min(_this2.zoomLevels.length - 1, _this2.zoomIndex + 1); + var zoom = _this2.zoomLevels[zoomIndex]; + + if (zoom !== _this2.samplesPerPixel) { + _this2.setZoom(zoom); + _this2.drawRequest(); + } + }); + + ee.on('scroll', function() { + _this2.isScrolling = true; + _this2.drawRequest(); + clearTimeout(_this2.scrollTimer); + _this2.scrollTimer = setTimeout(function() { + _this2.isScrolling = false; + }, 200); + }); + } + }, { + key: 'load', + value: function load(trackList) { + var _this3 = this; + + var loadPromises = trackList.map(function(trackInfo) { + var loader = _LoaderFactory2.default.createLoader(trackInfo.src, _this3.ac, _this3.ee); + return loader.load(); + }); + + return Promise.all(loadPromises).then(function(audioBuffers) { + _this3.ee.emit('audiosourcesloaded'); + + var tracks = audioBuffers.map(function(audioBuffer, index) { + var info = trackList[index]; + var name = info.name || 'Untitled'; + var start = info.start || 0; + var states = info.states || {}; + var fadeIn = info.fadeIn; + var fadeOut = info.fadeOut; + var cueIn = info.cuein || 0; + var cueOut = info.cueout || audioBuffer.duration; + var gain = info.gain || 1; + var muted = info.muted || false; + var soloed = info.soloed || false; + var selection = info.selected; + var peaks = info.peaks || { type: 'WebAudio', mono: _this3.mono }; + var customClass = info.customClass || undefined; + var waveOutlineColor = info.waveOutlineColor || undefined; + var stereoPan = info.stereoPan || 0; + + // webaudio specific playout for now. + var playout = new _Playout2.default(_this3.ac, audioBuffer); + + var track = new _Track2.default(); + track.src = info.src; + track.setBuffer(audioBuffer); + track.setName(name); + track.setEventEmitter(_this3.ee); + track.setEnabledStates(states); + track.setCues(cueIn, cueOut); + track.setCustomClass(customClass); + track.setWaveOutlineColor(waveOutlineColor); + + if (fadeIn !== undefined) { + track.setFadeIn(fadeIn.duration, fadeIn.shape); + } + + if (fadeOut !== undefined) { + track.setFadeOut(fadeOut.duration, fadeOut.shape); + } + + if (selection !== undefined) { + _this3.setActiveTrack(track); + _this3.setTimeSelection(selection.start, selection.end); + } + + if (peaks !== undefined) { + track.setPeakData(peaks); + } + + track.setState(_this3.getState()); + track.setStartTime(start); + track.setPlayout(playout); + + track.setGainLevel(gain); + track.setStereoPanValue(stereoPan); + + if (muted) { + _this3.muteTrack(track); + } + + if (soloed) { + _this3.soloTrack(track); + } + + // extract peaks with AudioContext for now. + track.calculatePeaks(_this3.samplesPerPixel, _this3.sampleRate); + + return track; + }); + + _this3.tracks = _this3.tracks.concat(tracks); + _this3.adjustDuration(); + _this3.draw(_this3.render()); + + _this3.ee.emit('audiosourcesrendered'); + }).catch(function(e) { + _this3.ee.emit('audiosourceserror', e); + }); + } + + /* + track instance of Track. + */ + + }, { + key: 'setActiveTrack', + value: function setActiveTrack(track) { + this.activeTrack = track; + } + }, { + key: 'getActiveTrack', + value: function getActiveTrack() { + return this.activeTrack; + } + }, { + key: 'isSegmentSelection', + value: function isSegmentSelection() { + return this.timeSelection.start !== this.timeSelection.end; + } + + /* + start, end in seconds. + */ + + }, { + key: 'setTimeSelection', + value: function setTimeSelection() { + var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var end = arguments[1]; + + this.timeSelection = { + start: start, + end: end === undefined ? start : end + }; + + this.cursor = start; + } + }, { + key: 'startOfflineRender', + value: function startOfflineRender(type) { + var _this4 = this; + + if (this.isRendering) { + return; + } + + this.isRendering = true; + this.offlineAudioContext = new OfflineAudioContext(2, 44100 * this.duration, 44100); + + var currentTime = this.offlineAudioContext.currentTime; + + this.tracks.forEach(function(track) { + track.setOfflinePlayout(new _Playout2.default(_this4.offlineAudioContext, track.buffer)); + track.schedulePlay(currentTime, 0, 0, { + shouldPlay: _this4.shouldTrackPlay(track), + masterGain: 1, + isOffline: true + }); + }); + + /* + TODO cleanup of different audio playouts handling. + */ + this.offlineAudioContext.startRendering().then(function(audioBuffer) { + if (type === 'buffer') { + _this4.ee.emit('audiorenderingfinished', type, audioBuffer); + _this4.isRendering = false; + return; + } + + if (type === 'wav') { + _this4.exportWorker.postMessage({ + command: 'init', + config: { + sampleRate: 44100 + } + }); + + // callback for `exportWAV` + _this4.exportWorker.onmessage = function(e) { + _this4.ee.emit('audiorenderingfinished', type, e.data); + _this4.isRendering = false; + + // clear out the buffer for next renderings. + _this4.exportWorker.postMessage({ + command: 'clear' + }); + }; + + // send the channel data from our buffer to the worker + _this4.exportWorker.postMessage({ + command: 'record', + buffer: [audioBuffer.getChannelData(0), audioBuffer.getChannelData(1)] + }); + + // ask the worker for a WAV + _this4.exportWorker.postMessage({ + command: 'exportWAV', + type: 'audio/wav' + }); + } + }).catch(function(e) { + throw e; + }); + } + }, { + key: 'getTimeSelection', + value: function getTimeSelection() { + return this.timeSelection; + } + }, { + key: 'setState', + value: function setState(state) { + this.state = state; + + this.tracks.forEach(function(track) { + track.setState(state); + }); + } + }, { + key: 'getState', + value: function getState() { + return this.state; + } + }, { + key: 'setZoomIndex', + value: function setZoomIndex(index) { + this.zoomIndex = index; + } + }, { + key: 'setZoomLevels', + value: function setZoomLevels(levels) { + this.zoomLevels = levels; + } + }, { + key: 'setZoom', + value: function setZoom(zoom) { + var _this5 = this; + + this.samplesPerPixel = zoom; + this.zoomIndex = this.zoomLevels.indexOf(zoom); + this.tracks.forEach(function(track) { + track.calculatePeaks(zoom, _this5.sampleRate); + }); + } + }, { + key: 'muteTrack', + value: function muteTrack(track) { + var index = this.mutedTracks.indexOf(track); + + if (index > -1) { + this.mutedTracks.splice(index, 1); + } else { + this.mutedTracks.push(track); + } + } + }, { + key: 'soloTrack', + value: function soloTrack(track) { + var index = this.soloedTracks.indexOf(track); + + if (index > -1) { + this.soloedTracks.splice(index, 1); + } else if (this.exclSolo) { + this.soloedTracks = [track]; + } else { + this.soloedTracks.push(track); + } + } + }, { + key: 'adjustTrackPlayout', + value: function adjustTrackPlayout() { + var _this6 = this; + + this.tracks.forEach(function(track) { + track.setShouldPlay(_this6.shouldTrackPlay(track)); + }); + } + }, { + key: 'adjustDuration', + value: function adjustDuration() { + this.duration = this.tracks.reduce(function(duration, track) { + return Math.max(duration, track.getEndTime()); + }, 0); + } + }, { + key: 'shouldTrackPlay', + value: function shouldTrackPlay(track) { + var shouldPlay = void 0; + // if there are solo tracks, only they should play. + if (this.soloedTracks.length > 0) { + shouldPlay = false; + if (this.soloedTracks.indexOf(track) > -1) { + shouldPlay = true; + } + } else { + // play all tracks except any muted tracks. + shouldPlay = true; + if (this.mutedTracks.indexOf(track) > -1) { + shouldPlay = false; + } + } + + return shouldPlay; + } + }, { + key: 'isPlaying', + value: function isPlaying() { + return this.tracks.reduce(function(isPlaying, track) { + return isPlaying || track.isPlaying(); + }, false); + } + + /* + * returns the current point of time in the playlist in seconds. + */ + + }, { + key: 'getCurrentTime', + value: function getCurrentTime() { + var cursorPos = this.lastSeeked || this.pausedAt || this.cursor; + + return cursorPos + this.getElapsedTime(); + } + }, { + key: 'getElapsedTime', + value: function getElapsedTime() { + return this.ac.currentTime - this.lastPlay; + } + }, { + key: 'setMasterGain', + value: function setMasterGain(gain) { + this.ee.emit('mastervolumechange', gain); + } + }, { + key: 'restartPlayFrom', + value: function restartPlayFrom(start, end) { + this.stopAnimation(); + + this.tracks.forEach(function(editor) { + editor.scheduleStop(); + }); + + return Promise.all(this.playoutPromises).then(this.play.bind(this, start, end)); + } + }, { + key: 'play', + value: function play(startTime, endTime) { + var _this7 = this; + + clearTimeout(this.resetDrawTimer); + + var currentTime = this.ac.currentTime; + var selected = this.getTimeSelection(); + var playoutPromises = []; + + var start = startTime || this.pausedAt || this.cursor; + var end = endTime; + + if (!end && selected.end !== selected.start && selected.end > start) { + end = selected.end; + } + + if (this.isPlaying()) { + return this.restartPlayFrom(start, end); + } + + this.tracks.forEach(function(track) { + track.setState('cursor'); + playoutPromises.push(track.schedulePlay(currentTime, start, end, { + shouldPlay: _this7.shouldTrackPlay(track), + masterGain: _this7.masterGain + })); + }); + + this.lastPlay = currentTime; + // use these to track when the playlist has fully stopped. + this.playoutPromises = playoutPromises; + this.startAnimation(start); + + return Promise.all(this.playoutPromises); + } + }, { + key: 'pause', + value: function pause() { + if (!this.isPlaying()) { + return Promise.all(this.playoutPromises); + } + + this.pausedAt = this.getCurrentTime(); + return this.playbackReset(); + } + }, { + key: 'stop', + value: function stop() { + if (this.mediaRecorder && this.mediaRecorder.state === 'recording') { + this.mediaRecorder.stop(); + } + + this.pausedAt = undefined; + this.playbackSeconds = 0; + return this.playbackReset(); + } + }, { + key: 'playbackReset', + value: function playbackReset() { + var _this8 = this; + + this.lastSeeked = undefined; + this.stopAnimation(); + + this.tracks.forEach(function(track) { + track.scheduleStop(); + track.setState(_this8.getState()); + }); + + this.drawRequest(); + return Promise.all(this.playoutPromises); + } + }, { + key: 'rewind', + value: function rewind() { + var _this9 = this; + + return this.stop().then(function() { + _this9.scrollLeft = 0; + _this9.ee.emit('select', 0, 0); + }); + } + }, { + key: 'fastForward', + value: function fastForward() { + var _this10 = this; + + return this.stop().then(function() { + if (_this10.viewDuration < _this10.duration) { + _this10.scrollLeft = _this10.duration - _this10.viewDuration; + } else { + _this10.scrollLeft = 0; + } + + _this10.ee.emit('select', _this10.duration, _this10.duration); + }); + } + }, { + key: 'clear', + value: function clear() { + var _this11 = this; + + return this.stop().then(function() { + _this11.tracks = []; + _this11.soloedTracks = []; + _this11.mutedTracks = []; + _this11.playoutPromises = []; + + _this11.cursor = 0; + _this11.playbackSeconds = 0; + _this11.duration = 0; + _this11.scrollLeft = 0; + + _this11.seek(0, 0, undefined); + }); + } + }, { + key: 'record', + value: function record() { + var _this12 = this; + + var playoutPromises = []; + this.mediaRecorder.start(300); + + this.tracks.forEach(function(track) { + track.setState('none'); + playoutPromises.push(track.schedulePlay(_this12.ac.currentTime, 0, undefined, { + shouldPlay: _this12.shouldTrackPlay(track) + })); + }); + + this.playoutPromises = playoutPromises; + } + }, { + key: 'startAnimation', + value: function startAnimation(startTime) { + var _this13 = this; + + this.lastDraw = this.ac.currentTime; + this.animationRequest = window.requestAnimationFrame(function() { + _this13.updateEditor(startTime); + }); + } + }, { + key: 'stopAnimation', + value: function stopAnimation() { + window.cancelAnimationFrame(this.animationRequest); + this.lastDraw = undefined; + } + }, { + key: 'seek', + value: function seek(start, end, track) { + if (this.isPlaying()) { + this.lastSeeked = start; + this.pausedAt = undefined; + this.restartPlayFrom(start); + } else { + // reset if it was paused. + this.setActiveTrack(track || this.tracks[0]); + this.pausedAt = start; + this.setTimeSelection(start, end); + if (this.getSeekStyle() === 'fill') { + this.playbackSeconds = start; + } + } + } + + /* + * Animation function for the playlist. + * Keep under 16.7 milliseconds based on a typical screen refresh rate of 60fps. + */ + + }, { + key: 'updateEditor', + value: function updateEditor(cursor) { + var _this14 = this; + + var currentTime = this.ac.currentTime; + var selection = this.getTimeSelection(); + var cursorPos = cursor || this.cursor; + var elapsed = currentTime - this.lastDraw; + + if (this.isPlaying()) { + var playbackSeconds = cursorPos + elapsed; + this.ee.emit('timeupdate', playbackSeconds); + this.animationRequest = window.requestAnimationFrame(function() { + _this14.updateEditor(playbackSeconds); + }); + + this.playbackSeconds = playbackSeconds; + this.draw(this.render()); + this.lastDraw = currentTime; + } else { + if (cursorPos + elapsed >= (this.isSegmentSelection() ? selection.end : this.duration)) { + this.ee.emit('finished'); + } + + this.stopAnimation(); + + this.resetDrawTimer = setTimeout(function() { + _this14.pausedAt = undefined; + _this14.lastSeeked = undefined; + _this14.setState(_this14.getState()); + + _this14.playbackSeconds = 0; + _this14.draw(_this14.render()); + }, 0); + } + } + }, { + key: 'drawRequest', + value: function drawRequest() { + var _this15 = this; + + window.requestAnimationFrame(function() { + _this15.draw(_this15.render()); + }); + } + }, { + key: 'draw', + value: function draw(newTree) { + var patches = (0, _diff2.default)(this.tree, newTree); + this.rootNode = (0, _patch2.default)(this.rootNode, patches); + this.tree = newTree; + + // use for fast forwarding. + this.viewDuration = (0, _conversions.pixelsToSeconds)(this.rootNode.clientWidth - this.controls.width, this.samplesPerPixel, this.sampleRate); + } + }, { + key: 'getTrackRenderData', + value: function getTrackRenderData() { + var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var defaults = { + height: this.waveHeight, + resolution: this.samplesPerPixel, + sampleRate: this.sampleRate, + controls: this.controls, + isActive: false, + timeSelection: this.getTimeSelection(), + playlistLength: this.duration, + playbackSeconds: this.playbackSeconds, + colors: this.colors + }; + + return (0, _lodash2.default)(data, defaults); + } + }, { + key: 'isActiveTrack', + value: function isActiveTrack(track) { + var activeTrack = this.getActiveTrack(); + + if (this.isSegmentSelection()) { + return activeTrack === track; + } + + return true; + } + }, { + key: 'renderAnnotations', + value: function renderAnnotations() { + return this.annotationList.render(); + } + }, { + key: 'renderTimeScale', + value: function renderTimeScale() { + var controlWidth = this.controls.show ? this.controls.width : 0; + var timeScale = new _TimeScale2.default(this.duration, this.scrollLeft, this.samplesPerPixel, this.sampleRate, controlWidth, this.colors); + + return timeScale.render(); + } + }, { + key: 'renderTrackSection', + value: function renderTrackSection() { + var _this16 = this; + + var trackElements = this.tracks.map(function(track) { + return track.render(_this16.getTrackRenderData({ + isActive: _this16.isActiveTrack(track), + shouldPlay: _this16.shouldTrackPlay(track), + soloed: _this16.soloedTracks.indexOf(track) > -1, + muted: _this16.mutedTracks.indexOf(track) > -1 + })); + }); + + return (0, _h2.default)('div.playlist-tracks', { + attributes: { + style: 'overflow: auto;' + }, + onscroll: function onscroll(e) { + _this16.scrollLeft = (0, _conversions.pixelsToSeconds)(e.target.scrollLeft, _this16.samplesPerPixel, _this16.sampleRate); + + _this16.ee.emit('scroll', _this16.scrollLeft); + }, + hook: new _ScrollHook2.default(this) + }, trackElements); + } + }, { + key: 'render', + value: function render() { + var containerChildren = []; + + if (this.showTimescale) { + containerChildren.push(this.renderTimeScale()); + } + + containerChildren.push(this.renderTrackSection()); + + if (this.annotationList.length) { + containerChildren.push(this.renderAnnotations()); + } + + return (0, _h2.default)('div.playlist', { + attributes: { + style: 'overflow: hidden; position: relative;' + } + }, containerChildren); + } + }, { + key: 'getInfo', + value: function getInfo() { + var info = []; + + this.tracks.forEach(function(track) { + info.push(track.getTrackDetails()); + }); + + return info; + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 37 */ + /***/ + (function(module, exports) { + + /** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) ? + baseTimes(value.length, String) : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function assignInDefaults(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + object[key] = value; + } + } + + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ + function copyObject(source, props, object, customizer) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + + var newValue = customizer ? + customizer(object[key], source[key], key, object, source) : + undefined; + + assignValue(object, key, newValue === undefined ? source[key] : newValue); + } + return object; + } + + /** + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') ? + (length--, customizer) : + undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' ? + (isArrayLike(object) && isIndex(index, object.length)) : + (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; + } + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var defaults = baseRest(function(args) { + args.push(undefined, assignInDefaults); + return apply(assignInWith, undefined, args); + }); + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + + module.exports = defaults; + + + /***/ + }), + /* 38 */ + /***/ + (function(module, exports, __webpack_require__) { + + var h = __webpack_require__(39) + + module.exports = h + + + /***/ + }), + /* 39 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + var isArray = __webpack_require__(40); + + var VNode = __webpack_require__(41); + var VText = __webpack_require__(42); + var isVNode = __webpack_require__(9); + var isVText = __webpack_require__(11); + var isWidget = __webpack_require__(12); + var isHook = __webpack_require__(8); + var isVThunk = __webpack_require__(14); + + var parseTag = __webpack_require__(43); + var softSetHook = __webpack_require__(45); + var evHook = __webpack_require__(46); + + module.exports = h; + + function h(tagName, properties, children) { + var childNodes = []; + var tag, props, key, namespace; + + if (!children && isChildren(properties)) { + children = properties; + props = {}; + } + + props = props || properties || {}; + tag = parseTag(tagName, props); + + // support keys + if (props.hasOwnProperty('key')) { + key = props.key; + props.key = undefined; + } + + // support namespace + if (props.hasOwnProperty('namespace')) { + namespace = props.namespace; + props.namespace = undefined; + } + + // fix cursor bug + if (tag === 'INPUT' && + !namespace && + props.hasOwnProperty('value') && + props.value !== undefined && + !isHook(props.value) + ) { + props.value = softSetHook(props.value); + } + + transformProperties(props); + + if (children !== undefined && children !== null) { + addChild(children, childNodes, tag, props); + } + + + return new VNode(tag, props, childNodes, key, namespace); + } + + function addChild(c, childNodes, tag, props) { + if (typeof c === 'string') { + childNodes.push(new VText(c)); + } else if (typeof c === 'number') { + childNodes.push(new VText(String(c))); + } else if (isChild(c)) { + childNodes.push(c); + } else if (isArray(c)) { + for (var i = 0; i < c.length; i++) { + addChild(c[i], childNodes, tag, props); + } + } else if (c === null || c === undefined) { + return; + } else { + throw UnexpectedVirtualElement({ + foreignObject: c, + parentVnode: { + tagName: tag, + properties: props + } + }); + } + } + + function transformProperties(props) { + for (var propName in props) { + if (props.hasOwnProperty(propName)) { + var value = props[propName]; + + if (isHook(value)) { + continue; + } + + if (propName.substr(0, 3) === 'ev-') { + // add ev-foo support + props[propName] = evHook(value); + } + } + } + } + + function isChild(x) { + return isVNode(x) || isVText(x) || isWidget(x) || isVThunk(x); + } + + function isChildren(x) { + return typeof x === 'string' || isArray(x) || isChild(x); + } + + function UnexpectedVirtualElement(data) { + var err = new Error(); + + err.type = 'virtual-hyperscript.unexpected.virtual-element'; + err.message = 'Unexpected virtual child passed to h().\n' + + 'Expected a VNode / Vthunk / VWidget / string but:\n' + + 'got:\n' + + errorString(data.foreignObject) + + '.\n' + + 'The parent vnode is:\n' + + errorString(data.parentVnode) + '\n' + + 'Suggested fix: change your `h(..., [ ... ])` callsite.'; + err.foreignObject = data.foreignObject; + err.parentVnode = data.parentVnode; + + return err; + } + + function errorString(obj) { + try { + return JSON.stringify(obj, null, ' '); + } catch (e) { + return String(obj); + } + } + + + /***/ + }), + /* 40 */ + /***/ + (function(module, exports) { + + var nativeIsArray = Array.isArray + var toString = Object.prototype.toString + + module.exports = nativeIsArray || isArray + + function isArray(obj) { + return toString.call(obj) === "[object Array]" + } + + + /***/ + }), + /* 41 */ + /***/ + (function(module, exports, __webpack_require__) { + + var version = __webpack_require__(10) + var isVNode = __webpack_require__(9) + var isWidget = __webpack_require__(12) + var isThunk = __webpack_require__(14) + var isVHook = __webpack_require__(8) + + module.exports = VirtualNode + + var noProperties = {} + var noChildren = [] + + function VirtualNode(tagName, properties, children, key, namespace) { + this.tagName = tagName + this.properties = properties || noProperties + this.children = children || noChildren + this.key = key != null ? String(key) : undefined + this.namespace = (typeof namespace === "string") ? namespace : null + + var count = (children && children.length) || 0 + var descendants = 0 + var hasWidgets = false + var hasThunks = false + var descendantHooks = false + var hooks + + for (var propName in properties) { + if (properties.hasOwnProperty(propName)) { + var property = properties[propName] + if (isVHook(property) && property.unhook) { + if (!hooks) { + hooks = {} + } + + hooks[propName] = property + } + } + } + + for (var i = 0; i < count; i++) { + var child = children[i] + if (isVNode(child)) { + descendants += child.count || 0 + + if (!hasWidgets && child.hasWidgets) { + hasWidgets = true + } + + if (!hasThunks && child.hasThunks) { + hasThunks = true + } + + if (!descendantHooks && (child.hooks || child.descendantHooks)) { + descendantHooks = true + } + } else if (!hasWidgets && isWidget(child)) { + if (typeof child.destroy === "function") { + hasWidgets = true + } + } else if (!hasThunks && isThunk(child)) { + hasThunks = true; + } + } + + this.count = count + descendants + this.hasWidgets = hasWidgets + this.hasThunks = hasThunks + this.hooks = hooks + this.descendantHooks = descendantHooks + } + + VirtualNode.prototype.version = version + VirtualNode.prototype.type = "VirtualNode" + + + /***/ + }), + /* 42 */ + /***/ + (function(module, exports, __webpack_require__) { + + var version = __webpack_require__(10) + + module.exports = VirtualText + + function VirtualText(text) { + this.text = String(text) + } + + VirtualText.prototype.version = version + VirtualText.prototype.type = "VirtualText" + + + /***/ + }), + /* 43 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + var split = __webpack_require__(44); + + var classIdSplit = /([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/; + var notClassId = /^\.|#/; + + module.exports = parseTag; + + function parseTag(tag, props) { + if (!tag) { + return 'DIV'; + } + + var noId = !(props.hasOwnProperty('id')); + + var tagParts = split(tag, classIdSplit); + var tagName = null; + + if (notClassId.test(tagParts[1])) { + tagName = 'DIV'; + } + + var classes, part, type, i; + + for (i = 0; i < tagParts.length; i++) { + part = tagParts[i]; + + if (!part) { + continue; + } + + type = part.charAt(0); + + if (!tagName) { + tagName = part; + } else if (type === '.') { + classes = classes || []; + classes.push(part.substring(1, part.length)); + } else if (type === '#' && noId) { + props.id = part.substring(1, part.length); + } + } + + if (classes) { + if (props.className) { + classes.push(props.className); + } + + props.className = classes.join(' '); + } + + return props.namespace ? tagName : tagName.toUpperCase(); + } + + + /***/ + }), + /* 44 */ + /***/ + (function(module, exports) { + + /*! + * Cross-Browser Split 1.1.1 + * Copyright 2007-2012 Steven Levithan + * Available under the MIT License + * ECMAScript compliant, uniform cross-browser split method + */ + + /** + * Splits a string into an array of strings using a regex or string separator. Matches of the + * separator are not included in the result array. However, if `separator` is a regex that contains + * capturing groups, backreferences are spliced into the result each time `separator` is matched. + * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably + * cross-browser. + * @param {String} str String to split. + * @param {RegExp|String} separator Regex or string to use for separating the string. + * @param {Number} [limit] Maximum number of items to include in the result array. + * @returns {Array} Array of substrings. + * @example + * + * // Basic use + * split('a b c d', ' '); + * // -> ['a', 'b', 'c', 'd'] + * + * // With limit + * split('a b c d', ' ', 2); + * // -> ['a', 'b'] + * + * // Backreferences in result array + * split('..word1 word2..', /([a-z]+)(\d+)/i); + * // -> ['..', 'word', '1', ' ', 'word', '2', '..'] + */ + module.exports = (function split(undef) { + + var nativeSplit = String.prototype.split, + compliantExecNpcg = /()??/.exec("")[1] === undef, + // NPCG: nonparticipating capturing group + self; + + self = function(str, separator, limit) { + // If `separator` is not a regex, use `nativeSplit` + if (Object.prototype.toString.call(separator) !== "[object RegExp]") { + return nativeSplit.call(str, separator, limit); + } + var output = [], + flags = (separator.ignoreCase ? "i" : "") + (separator.multiline ? "m" : "") + (separator.extended ? "x" : "") + // Proposed for ES6 + (separator.sticky ? "y" : ""), + // Firefox 3+ + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator = new RegExp(separator.source, flags + "g"), + separator2, match, lastIndex, lastLength; + str += ""; // Type-convert + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp("^" + separator.source + "$(?!\\s)", flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // Math.pow(2, 32) - 1 + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + limit = limit === undef ? -1 >>> 0 : // Math.pow(2, 32) - 1 + limit >>> 0; // ToUint32(limit) + while (match = separator.exec(str)) { + // `separator.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + match[0].replace(separator2, function() { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undef) { + match[i] = undef; + } + } + }); + } + if (match.length > 1 && match.index < str.length) { + Array.prototype.push.apply(output, match.slice(1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= limit) { + break; + } + } + if (separator.lastIndex === match.index) { + separator.lastIndex++; // Avoid an infinite loop + } + } + if (lastLastIndex === str.length) { + if (lastLength || !separator.test("")) { + output.push(""); + } + } else { + output.push(str.slice(lastLastIndex)); + } + return output.length > limit ? output.slice(0, limit) : output; + }; + + return self; + })(); + + + /***/ + }), + /* 45 */ + /***/ + (function(module, exports) { + + 'use strict'; + + module.exports = SoftSetHook; + + function SoftSetHook(value) { + if (!(this instanceof SoftSetHook)) { + return new SoftSetHook(value); + } + + this.value = value; + } + + SoftSetHook.prototype.hook = function(node, propertyName) { + if (node[propertyName] !== this.value) { + node[propertyName] = this.value; + } + }; + + + /***/ + }), + /* 46 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + var EvStore = __webpack_require__(47); + + module.exports = EvHook; + + function EvHook(value) { + if (!(this instanceof EvHook)) { + return new EvHook(value); + } + + this.value = value; + } + + EvHook.prototype.hook = function(node, propertyName) { + var es = EvStore(node); + var propName = propertyName.substr(3); + + es[propName] = this.value; + }; + + EvHook.prototype.unhook = function(node, propertyName) { + var es = EvStore(node); + var propName = propertyName.substr(3); + + es[propName] = undefined; + }; + + + /***/ + }), + /* 47 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + var OneVersionConstraint = __webpack_require__(48); + + var MY_VERSION = '7'; + OneVersionConstraint('ev-store', MY_VERSION); + + var hashKey = '__EV_STORE_KEY@' + MY_VERSION; + + module.exports = EvStore; + + function EvStore(elem) { + var hash = elem[hashKey]; + + if (!hash) { + hash = elem[hashKey] = {}; + } + + return hash; + } + + + /***/ + }), + /* 48 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + var Individual = __webpack_require__(49); + + module.exports = OneVersion; + + function OneVersion(moduleName, version, defaultValue) { + var key = '__INDIVIDUAL_ONE_VERSION_' + moduleName; + var enforceKey = key + '_ENFORCE_SINGLETON'; + + var versionValue = Individual(enforceKey, version); + + if (versionValue !== version) { + throw new Error('Can only have one copy of ' + + moduleName + '.\n' + + 'You already have version ' + versionValue + + ' installed.\n' + + 'This means you cannot install version ' + version); + } + + return Individual(key, defaultValue); + } + + + /***/ + }), + /* 49 */ + /***/ + (function(module, exports) { + + /* WEBPACK VAR INJECTION */ + (function(global) { + 'use strict'; + + /*global window, global*/ + + var root = typeof window !== 'undefined' ? + window : typeof global !== 'undefined' ? + global : {}; + + module.exports = Individual; + + function Individual(key, value) { + if (key in root) { + return root[key]; + } + + root[key] = value; + + return value; + } + + /* WEBPACK VAR INJECTION */ + }.call(exports, (function() { return this; }()))) + + /***/ + }), + /* 50 */ + /***/ + (function(module, exports, __webpack_require__) { + + var diff = __webpack_require__(51) + + module.exports = diff + + + /***/ + }), + /* 51 */ + /***/ + (function(module, exports, __webpack_require__) { + + var isArray = __webpack_require__(40) + + var VPatch = __webpack_require__(52) + var isVNode = __webpack_require__(9) + var isVText = __webpack_require__(11) + var isWidget = __webpack_require__(12) + var isThunk = __webpack_require__(14) + var handleThunk = __webpack_require__(13) + + var diffProps = __webpack_require__(53) + + module.exports = diff + + function diff(a, b) { + var patch = { a: a } + walk(a, b, patch, 0) + return patch + } + + function walk(a, b, patch, index) { + if (a === b) { + return + } + + var apply = patch[index] + var applyClear = false + + if (isThunk(a) || isThunk(b)) { + thunks(a, b, patch, index) + } else if (b == null) { + + // If a is a widget we will add a remove patch for it + // Otherwise any child widgets/hooks must be destroyed. + // This prevents adding two remove patches for a widget. + if (!isWidget(a)) { + clearState(a, patch, index) + apply = patch[index] + } + + apply = appendPatch(apply, new VPatch(VPatch.REMOVE, a, b)) + } else if (isVNode(b)) { + if (isVNode(a)) { + if (a.tagName === b.tagName && + a.namespace === b.namespace && + a.key === b.key) { + var propsPatch = diffProps(a.properties, b.properties) + if (propsPatch) { + apply = appendPatch(apply, + new VPatch(VPatch.PROPS, a, propsPatch)) + } + apply = diffChildren(a, b, patch, apply, index) + } else { + apply = appendPatch(apply, new VPatch(VPatch.VNODE, a, b)) + applyClear = true + } + } else { + apply = appendPatch(apply, new VPatch(VPatch.VNODE, a, b)) + applyClear = true + } + } else if (isVText(b)) { + if (!isVText(a)) { + apply = appendPatch(apply, new VPatch(VPatch.VTEXT, a, b)) + applyClear = true + } else if (a.text !== b.text) { + apply = appendPatch(apply, new VPatch(VPatch.VTEXT, a, b)) + } + } else if (isWidget(b)) { + if (!isWidget(a)) { + applyClear = true + } + + apply = appendPatch(apply, new VPatch(VPatch.WIDGET, a, b)) + } + + if (apply) { + patch[index] = apply + } + + if (applyClear) { + clearState(a, patch, index) + } + } + + function diffChildren(a, b, patch, apply, index) { + var aChildren = a.children + var orderedSet = reorder(aChildren, b.children) + var bChildren = orderedSet.children + + var aLen = aChildren.length + var bLen = bChildren.length + var len = aLen > bLen ? aLen : bLen + + for (var i = 0; i < len; i++) { + var leftNode = aChildren[i] + var rightNode = bChildren[i] + index += 1 + + if (!leftNode) { + if (rightNode) { + // Excess nodes in b need to be added + apply = appendPatch(apply, + new VPatch(VPatch.INSERT, null, rightNode)) + } + } else { + walk(leftNode, rightNode, patch, index) + } + + if (isVNode(leftNode) && leftNode.count) { + index += leftNode.count + } + } + + if (orderedSet.moves) { + // Reorder nodes last + apply = appendPatch(apply, new VPatch( + VPatch.ORDER, + a, + orderedSet.moves + )) + } + + return apply + } + + function clearState(vNode, patch, index) { + // TODO: Make this a single walk, not two + unhook(vNode, patch, index) + destroyWidgets(vNode, patch, index) + } + + // Patch records for all destroyed widgets must be added because we need + // a DOM node reference for the destroy function + function destroyWidgets(vNode, patch, index) { + if (isWidget(vNode)) { + if (typeof vNode.destroy === "function") { + patch[index] = appendPatch( + patch[index], + new VPatch(VPatch.REMOVE, vNode, null) + ) + } + } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) { + var children = vNode.children + var len = children.length + for (var i = 0; i < len; i++) { + var child = children[i] + index += 1 + + destroyWidgets(child, patch, index) + + if (isVNode(child) && child.count) { + index += child.count + } + } + } else if (isThunk(vNode)) { + thunks(vNode, null, patch, index) + } + } + + // Create a sub-patch for thunks + function thunks(a, b, patch, index) { + var nodes = handleThunk(a, b) + var thunkPatch = diff(nodes.a, nodes.b) + if (hasPatches(thunkPatch)) { + patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch) + } + } + + function hasPatches(patch) { + for (var index in patch) { + if (index !== "a") { + return true + } + } + + return false + } + + // Execute hooks when two nodes are identical + function unhook(vNode, patch, index) { + if (isVNode(vNode)) { + if (vNode.hooks) { + patch[index] = appendPatch( + patch[index], + new VPatch( + VPatch.PROPS, + vNode, + undefinedKeys(vNode.hooks) + ) + ) + } + + if (vNode.descendantHooks || vNode.hasThunks) { + var children = vNode.children + var len = children.length + for (var i = 0; i < len; i++) { + var child = children[i] + index += 1 + + unhook(child, patch, index) + + if (isVNode(child) && child.count) { + index += child.count + } + } + } + } else if (isThunk(vNode)) { + thunks(vNode, null, patch, index) + } + } + + function undefinedKeys(obj) { + var result = {} + + for (var key in obj) { + result[key] = undefined + } + + return result + } + + // List diff, naive left to right reordering + function reorder(aChildren, bChildren) { + // O(M) time, O(M) memory + var bChildIndex = keyIndex(bChildren) + var bKeys = bChildIndex.keys + var bFree = bChildIndex.free + + if (bFree.length === bChildren.length) { + return { + children: bChildren, + moves: null + } + } + + // O(N) time, O(N) memory + var aChildIndex = keyIndex(aChildren) + var aKeys = aChildIndex.keys + var aFree = aChildIndex.free + + if (aFree.length === aChildren.length) { + return { + children: bChildren, + moves: null + } + } + + // O(MAX(N, M)) memory + var newChildren = [] + + var freeIndex = 0 + var freeCount = bFree.length + var deletedItems = 0 + + // Iterate through a and match a node in b + // O(N) time, + for (var i = 0; i < aChildren.length; i++) { + var aItem = aChildren[i] + var itemIndex + + if (aItem.key) { + if (bKeys.hasOwnProperty(aItem.key)) { + // Match up the old keys + itemIndex = bKeys[aItem.key] + newChildren.push(bChildren[itemIndex]) + + } else { + // Remove old keyed items + itemIndex = i - deletedItems++ + newChildren.push(null) + } + } else { + // Match the item in a with the next free item in b + if (freeIndex < freeCount) { + itemIndex = bFree[freeIndex++] + newChildren.push(bChildren[itemIndex]) + } else { + // There are no free items in b to match with + // the free items in a, so the extra free nodes + // are deleted. + itemIndex = i - deletedItems++ + newChildren.push(null) + } + } + } + + var lastFreeIndex = freeIndex >= bFree.length ? + bChildren.length : + bFree[freeIndex] + + // Iterate through b and append any new keys + // O(M) time + for (var j = 0; j < bChildren.length; j++) { + var newItem = bChildren[j] + + if (newItem.key) { + if (!aKeys.hasOwnProperty(newItem.key)) { + // Add any new keyed items + // We are adding new items to the end and then sorting them + // in place. In future we should insert new items in place. + newChildren.push(newItem) + } + } else if (j >= lastFreeIndex) { + // Add any leftover non-keyed items + newChildren.push(newItem) + } + } + + var simulate = newChildren.slice() + var simulateIndex = 0 + var removes = [] + var inserts = [] + var simulateItem + + for (var k = 0; k < bChildren.length;) { + var wantedItem = bChildren[k] + simulateItem = simulate[simulateIndex] + + // remove items + while (simulateItem === null && simulate.length) { + removes.push(remove(simulate, simulateIndex, null)) + simulateItem = simulate[simulateIndex] + } + + if (!simulateItem || simulateItem.key !== wantedItem.key) { + // if we need a key in this position... + if (wantedItem.key) { + if (simulateItem && simulateItem.key) { + // if an insert doesn't put this key in place, it needs to move + if (bKeys[simulateItem.key] !== k + 1) { + removes.push(remove(simulate, simulateIndex, simulateItem.key)) + simulateItem = simulate[simulateIndex] + // if the remove didn't put the wanted item in place, we need to insert it + if (!simulateItem || simulateItem.key !== wantedItem.key) { + inserts.push({ key: wantedItem.key, to: k }) + } + // items are matching, so skip ahead + else { + simulateIndex++ + } + } else { + inserts.push({ key: wantedItem.key, to: k }) + } + } else { + inserts.push({ key: wantedItem.key, to: k }) + } + k++ + } + // a key in simulate has no matching wanted key, remove it + else if (simulateItem && simulateItem.key) { + removes.push(remove(simulate, simulateIndex, simulateItem.key)) + } + } else { + simulateIndex++ + k++ + } + } + + // remove all the remaining nodes from simulate + while (simulateIndex < simulate.length) { + simulateItem = simulate[simulateIndex] + removes.push(remove(simulate, simulateIndex, simulateItem && simulateItem.key)) + } + + // If the only moves we have are deletes then we can just + // let the delete patch remove these items. + if (removes.length === deletedItems && !inserts.length) { + return { + children: newChildren, + moves: null + } + } + + return { + children: newChildren, + moves: { + removes: removes, + inserts: inserts + } + } + } + + function remove(arr, index, key) { + arr.splice(index, 1) + + return { + from: index, + key: key + } + } + + function keyIndex(children) { + var keys = {} + var free = [] + var length = children.length + + for (var i = 0; i < length; i++) { + var child = children[i] + + if (child.key) { + keys[child.key] = i + } else { + free.push(i) + } + } + + return { + keys: keys, // A hash of key name to index + free: free // An array of unkeyed item indices + } + } + + function appendPatch(apply, patch) { + if (apply) { + if (isArray(apply)) { + apply.push(patch) + } else { + apply = [apply, patch] + } + + return apply + } else { + return patch + } + } + + + /***/ + }), + /* 52 */ + /***/ + (function(module, exports, __webpack_require__) { + + var version = __webpack_require__(10) + + VirtualPatch.NONE = 0 + VirtualPatch.VTEXT = 1 + VirtualPatch.VNODE = 2 + VirtualPatch.WIDGET = 3 + VirtualPatch.PROPS = 4 + VirtualPatch.ORDER = 5 + VirtualPatch.INSERT = 6 + VirtualPatch.REMOVE = 7 + VirtualPatch.THUNK = 8 + + module.exports = VirtualPatch + + function VirtualPatch(type, vNode, patch) { + this.type = Number(type) + this.vNode = vNode + this.patch = patch + } + + VirtualPatch.prototype.version = version + VirtualPatch.prototype.type = "VirtualPatch" + + + /***/ + }), + /* 53 */ + /***/ + (function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(7) + var isHook = __webpack_require__(8) + + module.exports = diffProps + + function diffProps(a, b) { + var diff + + for (var aKey in a) { + if (!(aKey in b)) { + diff = diff || {} + diff[aKey] = undefined + } + + var aValue = a[aKey] + var bValue = b[aKey] + + if (aValue === bValue) { + continue + } else if (isObject(aValue) && isObject(bValue)) { + if (getPrototype(bValue) !== getPrototype(aValue)) { + diff = diff || {} + diff[aKey] = bValue + } else if (isHook(bValue)) { + diff = diff || {} + diff[aKey] = bValue + } else { + var objectDiff = diffProps(aValue, bValue) + if (objectDiff) { + diff = diff || {} + diff[aKey] = objectDiff + } + } + } else { + diff = diff || {} + diff[aKey] = bValue + } + } + + for (var bKey in b) { + if (!(bKey in a)) { + diff = diff || {} + diff[bKey] = b[bKey] + } + } + + return diff + } + + function getPrototype(value) { + if (Object.getPrototypeOf) { + return Object.getPrototypeOf(value) + } else if (value.__proto__) { + return value.__proto__ + } else if (value.constructor) { + return value.constructor.prototype + } + } + + + /***/ + }), + /* 54 */ + /***/ + (function(module, exports, __webpack_require__) { + + var patch = __webpack_require__(55) + + module.exports = patch + + + /***/ + }), + /* 55 */ + /***/ + (function(module, exports, __webpack_require__) { + + var document = __webpack_require__(4) + var isArray = __webpack_require__(40) + + var render = __webpack_require__(3) + var domIndex = __webpack_require__(56) + var patchOp = __webpack_require__(57) + module.exports = patch + + function patch(rootNode, patches, renderOptions) { + renderOptions = renderOptions || {} + renderOptions.patch = renderOptions.patch && renderOptions.patch !== patch ? + renderOptions.patch : + patchRecursive + renderOptions.render = renderOptions.render || render + + return renderOptions.patch(rootNode, patches, renderOptions) + } + + function patchRecursive(rootNode, patches, renderOptions) { + var indices = patchIndices(patches) + + if (indices.length === 0) { + return rootNode + } + + var index = domIndex(rootNode, patches.a, indices) + var ownerDocument = rootNode.ownerDocument + + if (!renderOptions.document && ownerDocument !== document) { + renderOptions.document = ownerDocument + } + + for (var i = 0; i < indices.length; i++) { + var nodeIndex = indices[i] + rootNode = applyPatch(rootNode, + index[nodeIndex], + patches[nodeIndex], + renderOptions) + } + + return rootNode + } + + function applyPatch(rootNode, domNode, patchList, renderOptions) { + if (!domNode) { + return rootNode + } + + var newNode + + if (isArray(patchList)) { + for (var i = 0; i < patchList.length; i++) { + newNode = patchOp(patchList[i], domNode, renderOptions) + + if (domNode === rootNode) { + rootNode = newNode + } + } + } else { + newNode = patchOp(patchList, domNode, renderOptions) + + if (domNode === rootNode) { + rootNode = newNode + } + } + + return rootNode + } + + function patchIndices(patches) { + var indices = [] + + for (var key in patches) { + if (key !== "a") { + indices.push(Number(key)) + } + } + + return indices + } + + + /***/ + }), + /* 56 */ + /***/ + (function(module, exports) { + + // Maps a virtual DOM tree onto a real DOM tree in an efficient manner. + // We don't want to read all of the DOM nodes in the tree so we use + // the in-order tree indexing to eliminate recursion down certain branches. + // We only recurse into a DOM node if we know that it contains a child of + // interest. + + var noChild = {} + + module.exports = domIndex + + function domIndex(rootNode, tree, indices, nodes) { + if (!indices || indices.length === 0) { + return {} + } else { + indices.sort(ascending) + return recurse(rootNode, tree, indices, nodes, 0) + } + } + + function recurse(rootNode, tree, indices, nodes, rootIndex) { + nodes = nodes || {} + + + if (rootNode) { + if (indexInRange(indices, rootIndex, rootIndex)) { + nodes[rootIndex] = rootNode + } + + var vChildren = tree.children + + if (vChildren) { + + var childNodes = rootNode.childNodes + + for (var i = 0; i < tree.children.length; i++) { + rootIndex += 1 + + var vChild = vChildren[i] || noChild + var nextIndex = rootIndex + (vChild.count || 0) + + // skip recursion down the tree if there are no nodes down here + if (indexInRange(indices, rootIndex, nextIndex)) { + recurse(childNodes[i], vChild, indices, nodes, rootIndex) + } + + rootIndex = nextIndex + } + } + } + + return nodes + } + + // Binary search for an index in the interval [left, right] + function indexInRange(indices, left, right) { + if (indices.length === 0) { + return false + } + + var minIndex = 0 + var maxIndex = indices.length - 1 + var currentIndex + var currentItem + + while (minIndex <= maxIndex) { + currentIndex = ((maxIndex + minIndex) / 2) >> 0 + currentItem = indices[currentIndex] + + if (minIndex === maxIndex) { + return currentItem >= left && currentItem <= right + } else if (currentItem < left) { + minIndex = currentIndex + 1 + } else if (currentItem > right) { + maxIndex = currentIndex - 1 + } else { + return true + } + } + + return false; + } + + function ascending(a, b) { + return a > b ? 1 : -1 + } + + + /***/ + }), + /* 57 */ + /***/ + (function(module, exports, __webpack_require__) { + + var applyProperties = __webpack_require__(6) + + var isWidget = __webpack_require__(12) + var VPatch = __webpack_require__(52) + + var updateWidget = __webpack_require__(58) + + module.exports = applyPatch + + function applyPatch(vpatch, domNode, renderOptions) { + var type = vpatch.type + var vNode = vpatch.vNode + var patch = vpatch.patch + + switch (type) { + case VPatch.REMOVE: + return removeNode(domNode, vNode) + case VPatch.INSERT: + return insertNode(domNode, patch, renderOptions) + case VPatch.VTEXT: + return stringPatch(domNode, vNode, patch, renderOptions) + case VPatch.WIDGET: + return widgetPatch(domNode, vNode, patch, renderOptions) + case VPatch.VNODE: + return vNodePatch(domNode, vNode, patch, renderOptions) + case VPatch.ORDER: + reorderChildren(domNode, patch) + return domNode + case VPatch.PROPS: + applyProperties(domNode, patch, vNode.properties) + return domNode + case VPatch.THUNK: + return replaceRoot(domNode, + renderOptions.patch(domNode, patch, renderOptions)) + default: + return domNode + } + } + + function removeNode(domNode, vNode) { + var parentNode = domNode.parentNode + + if (parentNode) { + parentNode.removeChild(domNode) + } + + destroyWidget(domNode, vNode); + + return null + } + + function insertNode(parentNode, vNode, renderOptions) { + var newNode = renderOptions.render(vNode, renderOptions) + + if (parentNode) { + parentNode.appendChild(newNode) + } + + return parentNode + } + + function stringPatch(domNode, leftVNode, vText, renderOptions) { + var newNode + + if (domNode.nodeType === 3) { + domNode.replaceData(0, domNode.length, vText.text) + newNode = domNode + } else { + var parentNode = domNode.parentNode + newNode = renderOptions.render(vText, renderOptions) + + if (parentNode && newNode !== domNode) { + parentNode.replaceChild(newNode, domNode) + } + } + + return newNode + } + + function widgetPatch(domNode, leftVNode, widget, renderOptions) { + var updating = updateWidget(leftVNode, widget) + var newNode + + if (updating) { + newNode = widget.update(leftVNode, domNode) || domNode + } else { + newNode = renderOptions.render(widget, renderOptions) + } + + var parentNode = domNode.parentNode + + if (parentNode && newNode !== domNode) { + parentNode.replaceChild(newNode, domNode) + } + + if (!updating) { + destroyWidget(domNode, leftVNode) + } + + return newNode + } + + function vNodePatch(domNode, leftVNode, vNode, renderOptions) { + var parentNode = domNode.parentNode + var newNode = renderOptions.render(vNode, renderOptions) + + if (parentNode && newNode !== domNode) { + parentNode.replaceChild(newNode, domNode) + } + + return newNode + } + + function destroyWidget(domNode, w) { + if (typeof w.destroy === "function" && isWidget(w)) { + w.destroy(domNode) + } + } + + function reorderChildren(domNode, moves) { + var childNodes = domNode.childNodes + var keyMap = {} + var node + var remove + var insert + + for (var i = 0; i < moves.removes.length; i++) { + remove = moves.removes[i] + node = childNodes[remove.from] + if (remove.key) { + keyMap[remove.key] = node + } + domNode.removeChild(node) + } + + var length = childNodes.length + for (var j = 0; j < moves.inserts.length; j++) { + insert = moves.inserts[j] + node = keyMap[insert.key] + // this is the weirdest bug i've ever seen in webkit + domNode.insertBefore(node, insert.to >= length++ ? null : childNodes[insert.to]) + } + } + + function replaceRoot(oldRoot, newRoot) { + if (oldRoot && newRoot && oldRoot !== newRoot && oldRoot.parentNode) { + oldRoot.parentNode.replaceChild(newRoot, oldRoot) + } + + return newRoot; + } + + + /***/ + }), + /* 58 */ + /***/ + (function(module, exports, __webpack_require__) { + + var isWidget = __webpack_require__(12) + + module.exports = updateWidget + + function updateWidget(a, b) { + if (isWidget(a) && isWidget(b)) { + if ("name" in a && "name" in b) { + return a.id === b.id + } else { + return a.init === b.init + } + } + + return false + } + + + /***/ + }), + /* 59 */ + /***/ + (function(module, exports) { + + /* WEBPACK VAR INJECTION */ + (function(global) { + var WORKER_ENABLED = !!(global === global.window && global.URL && global.Blob && global.Worker); + + function InlineWorker(func, self) { + var _this = this; + var functionBody; + + self = self || {}; + + if (WORKER_ENABLED) { + functionBody = func.toString().trim().match( + /^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/ + )[1]; + + return new global.Worker(global.URL.createObjectURL( + new global.Blob([functionBody], { type: "text/javascript" }) + )); + } + + function postMessage(data) { + setTimeout(function() { + _this.onmessage({ data: data }); + }, 0); + } + + this.self = self; + this.self.postMessage = postMessage; + + setTimeout(func.bind(self, self), 0); + } + + InlineWorker.prototype.postMessage = function postMessage(data) { + var _this = this; + + setTimeout(function() { + _this.self.onmessage({ data: data }); + }, 0); + }; + + module.exports = InlineWorker; + + /* WEBPACK VAR INJECTION */ + }.call(exports, (function() { return this; }()))) + + /***/ + }), + /* 60 */ + /***/ + (function(module, exports) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.samplesToSeconds = samplesToSeconds; + exports.secondsToSamples = secondsToSamples; + exports.samplesToPixels = samplesToPixels; + exports.pixelsToSamples = pixelsToSamples; + exports.pixelsToSeconds = pixelsToSeconds; + exports.secondsToPixels = secondsToPixels; + + function samplesToSeconds(samples, sampleRate) { + return samples / sampleRate; + } + + function secondsToSamples(seconds, sampleRate) { + return Math.ceil(seconds * sampleRate); + } + + function samplesToPixels(samples, resolution) { + return Math.floor(samples / resolution); + } + + function pixelsToSamples(pixels, resolution) { + return Math.floor(pixels * resolution); + } + + function pixelsToSeconds(pixels, resolution, sampleRate) { + return pixels * resolution / sampleRate; + } + + function secondsToPixels(seconds, resolution, sampleRate) { + return Math.ceil(seconds * sampleRate / resolution); + } + + /***/ + }), + /* 61 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _BlobLoader = __webpack_require__(62); + + var _BlobLoader2 = _interopRequireDefault(_BlobLoader); + + var _XHRLoader = __webpack_require__(64); + + var _XHRLoader2 = _interopRequireDefault(_XHRLoader); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class() { + _classCallCheck(this, _class); + } + + _createClass(_class, null, [{ + key: 'createLoader', + value: function createLoader(src, audioContext, ee) { + if (src instanceof Blob) { + return new _BlobLoader2.default(src, audioContext, ee); + } else if (typeof src === 'string') { + return new _XHRLoader2.default(src, audioContext, ee); + } + + throw new Error('Unsupported src type'); + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 62 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + + var _Loader2 = __webpack_require__(63); + + var _Loader3 = _interopRequireDefault(_Loader2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + } + + var _class = function(_Loader) { + _inherits(_class, _Loader); + + function _class() { + _classCallCheck(this, _class); + + return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments)); + } + + _createClass(_class, [{ + key: 'load', + + + /* + * Loads an audio file via a FileReader + */ + value: function load() { + var _this2 = this; + + return new Promise(function(resolve, reject) { + if (_this2.src.type.match(/audio.*/) || + // added for problems with Firefox mime types + ogg. + _this2.src.type.match(/video\/ogg/)) { + var fr = new FileReader(); + + fr.readAsArrayBuffer(_this2.src); + + fr.addEventListener('progress', function(e) { + _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'fileProgress', _this2).call(_this2, e); + }); + + fr.addEventListener('load', function(e) { + var decoderPromise = _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'fileLoad', _this2).call(_this2, e); + + decoderPromise.then(function(audioBuffer) { + resolve(audioBuffer); + }).catch(reject); + }); + + fr.addEventListener('error', reject); + } else { + reject(Error('Unsupported file type ' + _this2.src.type)); + } + }); + } + }]); + + return _class; + }(_Loader3.default); + + exports.default = _class; + + /***/ + }), + /* 63 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.STATE_FINISHED = exports.STATE_DECODING = exports.STATE_LOADING = exports.STATE_UNINITIALIZED = undefined; + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _eventEmitter = __webpack_require__(15); + + var _eventEmitter2 = _interopRequireDefault(_eventEmitter); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var STATE_UNINITIALIZED = exports.STATE_UNINITIALIZED = 0; + var STATE_LOADING = exports.STATE_LOADING = 1; + var STATE_DECODING = exports.STATE_DECODING = 2; + var STATE_FINISHED = exports.STATE_FINISHED = 3; + + var _class = function() { + function _class(src, audioContext) { + var ee = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (0, _eventEmitter2.default)(); + + _classCallCheck(this, _class); + + this.src = src; + this.ac = audioContext; + this.audioRequestState = STATE_UNINITIALIZED; + this.ee = ee; + } + + _createClass(_class, [{ + key: 'setStateChange', + value: function setStateChange(state) { + this.audioRequestState = state; + this.ee.emit('audiorequeststatechange', this.audioRequestState, this.src); + } + }, { + key: 'fileProgress', + value: function fileProgress(e) { + var percentComplete = 0; + + if (this.audioRequestState === STATE_UNINITIALIZED) { + this.setStateChange(STATE_LOADING); + } + + if (e.lengthComputable) { + percentComplete = e.loaded / e.total * 100; + } + + this.ee.emit('loadprogress', percentComplete, this.src); + } + }, { + key: 'fileLoad', + value: function fileLoad(e) { + var _this = this; + + var audioData = e.target.response || e.target.result; + + this.setStateChange(STATE_DECODING); + + return new Promise(function(resolve, reject) { + _this.ac.decodeAudioData(audioData, function(audioBuffer) { + _this.audioBuffer = audioBuffer; + _this.setStateChange(STATE_FINISHED); + + resolve(audioBuffer); + }, function(err) { + if (err === null) { + // Safari issues with null error + reject(Error('MediaDecodeAudioDataUnknownContentType')); + } else { + reject(err); + } + }); + }); + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 64 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; + + var _Loader2 = __webpack_require__(63); + + var _Loader3 = _interopRequireDefault(_Loader2); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + } + + var _class = function(_Loader) { + _inherits(_class, _Loader); + + function _class() { + _classCallCheck(this, _class); + + return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments)); + } + + _createClass(_class, [{ + key: 'load', + + + /** + * Loads an audio file via XHR. + */ + value: function load() { + var _this2 = this; + + return new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + + xhr.open('GET', _this2.src, true); + xhr.responseType = 'arraybuffer'; + xhr.send(); + + xhr.addEventListener('progress', function(e) { + _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'fileProgress', _this2).call(_this2, e); + }); + + xhr.addEventListener('load', function(e) { + var decoderPromise = _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'fileLoad', _this2).call(_this2, e); + + decoderPromise.then(function(audioBuffer) { + resolve(audioBuffer); + }).catch(reject); + }); + + xhr.addEventListener('error', function() { + reject(Error('Track ' + _this2.src + ' failed to load')); + }); + }); + } + }]); + + return _class; + }(_Loader3.default); + + exports.default = _class; + + /***/ + }), + /* 65 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _conversions = __webpack_require__(60); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + /* + * virtual-dom hook for scrolling the track container. + */ + var _class = function() { + function _class(playlist) { + _classCallCheck(this, _class); + + this.playlist = playlist; + } + + _createClass(_class, [{ + key: 'hook', + value: function hook(node) { + var playlist = this.playlist; + if (!playlist.isScrolling) { + var el = node; + + if (playlist.isAutomaticScroll && node.querySelector('.cursor')) { + var rect = node.getBoundingClientRect(); + var cursorRect = node.querySelector('.cursor').getBoundingClientRect(); + + if (cursorRect.right > rect.right || cursorRect.right < 0) { + var controlWidth = playlist.controls.show ? playlist.controls.width : 0; + var width = (0, _conversions.pixelsToSeconds)(rect.right - rect.left, playlist.samplesPerPixel, playlist.sampleRate); + playlist.scrollLeft = Math.min(playlist.playbackSeconds, playlist.duration - (width - controlWidth)); + } + } + + var left = (0, _conversions.secondsToPixels)(playlist.scrollLeft, playlist.samplesPerPixel, playlist.sampleRate); + + el.scrollLeft = left; + } + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 66 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _h = __webpack_require__(38); + + var _h2 = _interopRequireDefault(_h); + + var _conversions = __webpack_require__(60); + + var _TimeScaleHook = __webpack_require__(67); + + var _TimeScaleHook2 = _interopRequireDefault(_TimeScaleHook); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var TimeScale = function() { + function TimeScale(duration, offset, samplesPerPixel, sampleRate) { + var marginLeft = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; + var colors = arguments[5]; + + _classCallCheck(this, TimeScale); + + this.duration = duration; + this.offset = offset; + this.samplesPerPixel = samplesPerPixel; + this.sampleRate = sampleRate; + this.marginLeft = marginLeft; + this.colors = colors; + + this.timeinfo = { + 20000: { + marker: 30000, + bigStep: 10000, + smallStep: 5000, + secondStep: 5 + }, + 12000: { + marker: 15000, + bigStep: 5000, + smallStep: 1000, + secondStep: 1 + }, + 10000: { + marker: 10000, + bigStep: 5000, + smallStep: 1000, + secondStep: 1 + }, + 5000: { + marker: 5000, + bigStep: 1000, + smallStep: 500, + secondStep: 1 / 2 + }, + 2500: { + marker: 2000, + bigStep: 1000, + smallStep: 500, + secondStep: 1 / 2 + }, + 1500: { + marker: 2000, + bigStep: 1000, + smallStep: 200, + secondStep: 1 / 5 + }, + 700: { + marker: 1000, + bigStep: 500, + smallStep: 100, + secondStep: 1 / 10 + } + }; + } + + _createClass(TimeScale, [{ + key: 'getScaleInfo', + value: function getScaleInfo(resolution) { + var keys = Object.keys(this.timeinfo).map(function(item) { + return parseInt(item, 10); + }); + + // make sure keys are numerically sorted. + keys = keys.sort(function(a, b) { + return a - b; + }); + + for (var i = 0; i < keys.length; i += 1) { + if (resolution <= keys[i]) { + return this.timeinfo[keys[i]]; + } + } + + return this.timeinfo[keys[0]]; + } + + /* + Return time in format mm:ss + */ + + }, { + key: 'render', + value: function render() { + var widthX = (0, _conversions.secondsToPixels)(this.duration, this.samplesPerPixel, this.sampleRate); + var pixPerSec = this.sampleRate / this.samplesPerPixel; + var pixOffset = (0, _conversions.secondsToPixels)(this.offset, this.samplesPerPixel, this.sampleRate); + var scaleInfo = this.getScaleInfo(this.samplesPerPixel); + var canvasInfo = {}; + var timeMarkers = []; + var end = widthX + pixOffset; + var counter = 0; + + for (var i = 0; i < end; i += pixPerSec * scaleInfo.secondStep) { + var pixIndex = Math.floor(i); + var pix = pixIndex - pixOffset; + + if (pixIndex >= pixOffset) { + // put a timestamp every 30 seconds. + if (scaleInfo.marker && counter % scaleInfo.marker === 0) { + timeMarkers.push((0, _h2.default)('div.time', { + attributes: { + style: 'position: absolute; left: ' + pix + 'px;' + } + }, [TimeScale.formatTime(counter)])); + + canvasInfo[pix] = 10; + } else if (scaleInfo.bigStep && counter % scaleInfo.bigStep === 0) { + canvasInfo[pix] = 5; + } else if (scaleInfo.smallStep && counter % scaleInfo.smallStep === 0) { + canvasInfo[pix] = 2; + } + } + + counter += 1000 * scaleInfo.secondStep; + } + + return (0, _h2.default)('div.playlist-time-scale', { + attributes: { + style: 'position: relative; left: 0; right: 0; margin-left: ' + this.marginLeft + 'px;' + } + }, [timeMarkers, (0, _h2.default)('canvas', { + attributes: { + width: widthX, + height: 30, + style: 'position: absolute; left: 0; right: 0; top: 0; bottom: 0;' + }, + hook: new _TimeScaleHook2.default(canvasInfo, this.offset, this.samplesPerPixel, this.duration, this.colors) + })]); + } + }], [{ + key: 'formatTime', + value: function formatTime(milliseconds) { + var seconds = milliseconds / 1000; + var s = seconds % 60; + var m = (seconds - s) / 60; + + if (s < 10) { + s = '0' + s; + } + + return m + ':' + s; + } + }]); + + return TimeScale; + }(); + + exports.default = TimeScale; + + /***/ + }), + /* 67 */ + /***/ + (function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + /* + * virtual-dom hook for rendering the time scale canvas. + */ + var _class = function() { + function _class(tickInfo, offset, samplesPerPixel, duration, colors) { + _classCallCheck(this, _class); + + this.tickInfo = tickInfo; + this.offset = offset; + this.samplesPerPixel = samplesPerPixel; + this.duration = duration; + this.colors = colors; + } + + _createClass(_class, [{ + key: 'hook', + value: function hook(canvas, prop, prev) { + var _this = this; + + // canvas is up to date + if (prev !== undefined && prev.offset === this.offset && prev.duration === this.duration && prev.samplesPerPixel === this.samplesPerPixel) { + return; + } + + var width = canvas.width; + var height = canvas.height; + var ctx = canvas.getContext('2d'); + + ctx.clearRect(0, 0, width, height); + ctx.fillStyle = this.colors.timeColor; + + Object.keys(this.tickInfo).forEach(function(x) { + var scaleHeight = _this.tickInfo[x]; + var scaleY = height - scaleHeight; + ctx.fillRect(x, scaleY, 1, scaleHeight); + }); + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 68 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _lodash = __webpack_require__(1); + + var _lodash2 = _interopRequireDefault(_lodash); + + var _lodash3 = __webpack_require__(69); + + var _lodash4 = _interopRequireDefault(_lodash3); + + var _uuid = __webpack_require__(70); + + var _uuid2 = _interopRequireDefault(_uuid); + + var _h = __webpack_require__(38); + + var _h2 = _interopRequireDefault(_h); + + var _webaudioPeaks = __webpack_require__(72); + + var _webaudioPeaks2 = _interopRequireDefault(_webaudioPeaks); + + var _fadeMaker = __webpack_require__(73); + + var _conversions = __webpack_require__(60); + + var _states = __webpack_require__(75); + + var _states2 = _interopRequireDefault(_states); + + var _CanvasHook = __webpack_require__(81); + + var _CanvasHook2 = _interopRequireDefault(_CanvasHook); + + var _FadeCanvasHook = __webpack_require__(82); + + var _FadeCanvasHook2 = _interopRequireDefault(_FadeCanvasHook); + + var _VolumeSliderHook = __webpack_require__(83); + + var _VolumeSliderHook2 = _interopRequireDefault(_VolumeSliderHook); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var MAX_CANVAS_WIDTH = 1000; + + var _class = function() { + function _class() { + _classCallCheck(this, _class); + + this.name = 'Untitled'; + this.customClass = undefined; + this.waveOutlineColor = undefined; + this.gain = 1; + this.fades = {}; + this.peakData = { + type: 'WebAudio', + mono: false + }; + + this.cueIn = 0; + this.cueOut = 0; + this.duration = 0; + this.startTime = 0; + this.endTime = 0; + this.stereoPan = 0; + } + + _createClass(_class, [{ + key: 'setEventEmitter', + value: function setEventEmitter(ee) { + this.ee = ee; + } + }, { + key: 'setName', + value: function setName(name) { + this.name = name; + } + }, { + key: 'setCustomClass', + value: function setCustomClass(className) { + this.customClass = className; + } + }, { + key: 'setWaveOutlineColor', + value: function setWaveOutlineColor(color) { + this.waveOutlineColor = color; + } + }, { + key: 'setCues', + value: function setCues(cueIn, cueOut) { + if (cueOut < cueIn) { + throw new Error('cue out cannot be less than cue in'); + } + + this.cueIn = cueIn; + this.cueOut = cueOut; + this.duration = this.cueOut - this.cueIn; + this.endTime = this.startTime + this.duration; + } + + /* + * start, end in seconds relative to the entire playlist. + */ + + }, { + key: 'trim', + value: function trim(start, end) { + var trackStart = this.getStartTime(); + var trackEnd = this.getEndTime(); + var offset = this.cueIn - trackStart; + + if (trackStart <= start && trackEnd >= start || trackStart <= end && trackEnd >= end) { + var cueIn = start < trackStart ? trackStart : start; + var cueOut = end > trackEnd ? trackEnd : end; + + this.setCues(cueIn + offset, cueOut + offset); + if (start > trackStart) { + this.setStartTime(start); + } + } + } + }, { + key: 'setStartTime', + value: function setStartTime(start) { + this.startTime = start; + this.endTime = start + this.duration; + } + }, { + key: 'setPlayout', + value: function setPlayout(playout) { + this.playout = playout; + } + }, { + key: 'setOfflinePlayout', + value: function setOfflinePlayout(playout) { + this.offlinePlayout = playout; + } + }, { + key: 'setEnabledStates', + value: function setEnabledStates() { + var enabledStates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var defaultStatesEnabled = { + cursor: true, + fadein: true, + fadeout: true, + select: true, + shift: true + }; + + this.enabledStates = (0, _lodash2.default)({}, defaultStatesEnabled, enabledStates); + } + }, { + key: 'setFadeIn', + value: function setFadeIn(duration) { + var shape = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'logarithmic'; + + if (duration > this.duration) { + throw new Error('Invalid Fade In'); + } + + var fade = { + shape: shape, + start: 0, + end: duration + }; + + if (this.fadeIn) { + this.removeFade(this.fadeIn); + this.fadeIn = undefined; + } + + this.fadeIn = this.saveFade(_fadeMaker.FADEIN, fade.shape, fade.start, fade.end); + } + }, { + key: 'setFadeOut', + value: function setFadeOut(duration) { + var shape = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'logarithmic'; + + if (duration > this.duration) { + throw new Error('Invalid Fade Out'); + } + + var fade = { + shape: shape, + start: this.duration - duration, + end: this.duration + }; + + if (this.fadeOut) { + this.removeFade(this.fadeOut); + this.fadeOut = undefined; + } + + this.fadeOut = this.saveFade(_fadeMaker.FADEOUT, fade.shape, fade.start, fade.end); + } + }, { + key: 'saveFade', + value: function saveFade(type, shape, start, end) { + var id = _uuid2.default.v4(); + + this.fades[id] = { + type: type, + shape: shape, + start: start, + end: end + }; + + return id; + } + }, { + key: 'removeFade', + value: function removeFade(id) { + delete this.fades[id]; + } + }, { + key: 'setBuffer', + value: function setBuffer(buffer) { + this.buffer = buffer; + } + }, { + key: 'setPeakData', + value: function setPeakData(data) { + this.peakData = data; + } + }, { + key: 'calculatePeaks', + value: function calculatePeaks(samplesPerPixel, sampleRate) { + var cueIn = (0, _conversions.secondsToSamples)(this.cueIn, sampleRate); + var cueOut = (0, _conversions.secondsToSamples)(this.cueOut, sampleRate); + + this.setPeaks((0, _webaudioPeaks2.default)(this.buffer, samplesPerPixel, this.peakData.mono, cueIn, cueOut)); + } + }, { + key: 'setPeaks', + value: function setPeaks(peaks) { + this.peaks = peaks; + } + }, { + key: 'setState', + value: function setState(state) { + this.state = state; + + if (this.state && this.enabledStates[this.state]) { + var StateClass = _states2.default[this.state]; + this.stateObj = new StateClass(this); + } else { + this.stateObj = undefined; + } + } + }, { + key: 'getStartTime', + value: function getStartTime() { + return this.startTime; + } + }, { + key: 'getEndTime', + value: function getEndTime() { + return this.endTime; + } + }, { + key: 'getDuration', + value: function getDuration() { + return this.duration; + } + }, { + key: 'isPlaying', + value: function isPlaying() { + return this.playout.isPlaying(); + } + }, { + key: 'setShouldPlay', + value: function setShouldPlay(bool) { + this.playout.setShouldPlay(bool); + } + }, { + key: 'setGainLevel', + value: function setGainLevel(level) { + this.gain = level; + this.playout.setVolumeGainLevel(level); + } + }, { + key: 'setMasterGainLevel', + value: function setMasterGainLevel(level) { + this.playout.setMasterGainLevel(level); + } + }, { + key: 'setStereoPanValue', + value: function setStereoPanValue(value) { + this.stereoPan = value; + this.playout.setStereoPanValue(value); + } + + /* + startTime, endTime in seconds (float). + segment is for a highlighted section in the UI. + returns a Promise that will resolve when the AudioBufferSource + is either stopped or plays out naturally. + */ + + }, { + key: 'schedulePlay', + value: function schedulePlay(now, startTime, endTime, config) { + var start = void 0; + var duration = void 0; + var when = now; + var segment = endTime ? endTime - startTime : undefined; + + var defaultOptions = { + shouldPlay: true, + masterGain: 1, + isOffline: false + }; + + var options = (0, _lodash2.default)({}, defaultOptions, config); + var playoutSystem = options.isOffline ? this.offlinePlayout : this.playout; + + // 1) track has no content to play. + // 2) track does not play in this selection. + if (this.endTime <= startTime || segment && startTime + segment < this.startTime) { + // return a resolved promise since this track is technically "stopped". + return Promise.resolve(); + } + + // track should have something to play if it gets here. + + // the track starts in the future or on the cursor position + if (this.startTime >= startTime) { + start = 0; + // schedule additional delay for this audio node. + when += this.startTime - startTime; + + if (endTime) { + segment -= this.startTime - startTime; + duration = Math.min(segment, this.duration); + } else { + duration = this.duration; + } + } else { + start = startTime - this.startTime; + + if (endTime) { + duration = Math.min(segment, this.duration - start); + } else { + duration = this.duration - start; + } + } + + start += this.cueIn; + var relPos = startTime - this.startTime; + var sourcePromise = playoutSystem.setUpSource(); + + // param relPos: cursor position in seconds relative to this track. + // can be negative if the cursor is placed before the start of this track etc. + (0, _lodash4.default)(this.fades, function(fade) { + var fadeStart = void 0; + var fadeDuration = void 0; + + // only apply fade if it's ahead of the cursor. + if (relPos < fade.end) { + if (relPos <= fade.start) { + fadeStart = now + (fade.start - relPos); + fadeDuration = fade.end - fade.start; + } else if (relPos > fade.start && relPos < fade.end) { + fadeStart = now - (relPos - fade.start); + fadeDuration = fade.end - fade.start; + } + + switch (fade.type) { + case _fadeMaker.FADEIN: + { + playoutSystem.applyFadeIn(fadeStart, fadeDuration, fade.shape); + break; + } + case _fadeMaker.FADEOUT: + { + playoutSystem.applyFadeOut(fadeStart, fadeDuration, fade.shape); + break; + } + default: + { + throw new Error('Invalid fade type saved on track.'); + } + } + } + }); + + playoutSystem.setVolumeGainLevel(this.gain); + playoutSystem.setShouldPlay(options.shouldPlay); + playoutSystem.setMasterGainLevel(options.masterGain); + playoutSystem.setStereoPanValue(this.stereoPan); + playoutSystem.play(when, start, duration); + + return sourcePromise; + } + }, { + key: 'scheduleStop', + value: function scheduleStop() { + var when = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + + this.playout.stop(when); + } + }, { + key: 'renderOverlay', + value: function renderOverlay(data) { + var _this = this; + + var channelPixels = (0, _conversions.secondsToPixels)(data.playlistLength, data.resolution, data.sampleRate); + + var config = { + attributes: { + style: 'position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: ' + channelPixels + 'px; z-index: 9;' + } + }; + + var overlayClass = ''; + + if (this.stateObj) { + this.stateObj.setup(data.resolution, data.sampleRate); + var StateClass = _states2.default[this.state]; + var events = StateClass.getEvents(); + + events.forEach(function(event) { + config['on' + event] = _this.stateObj[event].bind(_this.stateObj); + }); + + overlayClass = StateClass.getClass(); + } + // use this overlay for track event cursor position calculations. + return (0, _h2.default)('div.playlist-overlay' + overlayClass, config); + } + }, { + key: 'renderControls', + value: function renderControls(data) { + var _this2 = this; + + var muteClass = data.muted ? '.active' : ''; + var soloClass = data.soloed ? '.active' : ''; + var numChan = this.peaks.data.length; + + return (0, _h2.default)('div.controls', { + attributes: { + style: 'height: ' + numChan * data.height + 'px; width: ' + data.controls.width + 'px; position: absolute; left: 0; z-index: 10;' + } + }, [(0, _h2.default)('header', [this.name]), (0, _h2.default)('div.btn-group', [(0, _h2.default)('span.btn.btn-default.btn-xs.btn-mute' + muteClass, { + onclick: function onclick() { + _this2.ee.emit('mute', _this2); + } + }, ['Mute']), (0, _h2.default)('span.btn.btn-default.btn-xs.btn-solo' + soloClass, { + onclick: function onclick() { + _this2.ee.emit('solo', _this2); + } + }, ['Solo'])]), (0, _h2.default)('label', [(0, _h2.default)('input.volume-slider', { + attributes: { + type: 'range', + min: 0, + max: 100, + value: 100 + }, + hook: new _VolumeSliderHook2.default(this.gain), + oninput: function oninput(e) { + _this2.ee.emit('volumechange', e.target.value, _this2); + } + })])]); + } + }, { + key: 'render', + value: function render(data) { + var _this3 = this; + + var width = this.peaks.length; + var playbackX = (0, _conversions.secondsToPixels)(data.playbackSeconds, data.resolution, data.sampleRate); + var startX = (0, _conversions.secondsToPixels)(this.startTime, data.resolution, data.sampleRate); + var endX = (0, _conversions.secondsToPixels)(this.endTime, data.resolution, data.sampleRate); + var progressWidth = 0; + var numChan = this.peaks.data.length; + var scale = window.devicePixelRatio; + + if (playbackX > 0 && playbackX > startX) { + if (playbackX < endX) { + progressWidth = playbackX - startX; + } else { + progressWidth = width; + } + } + + var waveformChildren = [(0, _h2.default)('div.cursor', { + attributes: { + style: 'position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: ' + playbackX + 'px; bottom: 0; z-index: 5;' + } + })]; + + var channels = Object.keys(this.peaks.data).map(function(channelNum) { + var channelChildren = [(0, _h2.default)('div.channel-progress', { + attributes: { + style: 'position: absolute; width: ' + progressWidth + 'px; height: ' + data.height + 'px; z-index: 2;' + } + })]; + var offset = 0; + var totalWidth = width; + var peaks = _this3.peaks.data[channelNum]; + + while (totalWidth > 0) { + var currentWidth = Math.min(totalWidth, MAX_CANVAS_WIDTH); + var canvasColor = _this3.waveOutlineColor ? _this3.waveOutlineColor : data.colors.waveOutlineColor; + + channelChildren.push((0, _h2.default)('canvas', { + attributes: { + width: currentWidth * scale, + height: data.height * scale, + style: 'float: left; position: relative; margin: 0; padding: 0; z-index: 3; width: ' + currentWidth + 'px; height: ' + data.height + 'px;' + }, + hook: new _CanvasHook2.default(peaks, offset, _this3.peaks.bits, canvasColor, scale) + })); + + totalWidth -= currentWidth; + offset += MAX_CANVAS_WIDTH; + } + + // if there are fades, display them. + if (_this3.fadeIn) { + var fadeIn = _this3.fades[_this3.fadeIn]; + var fadeWidth = (0, _conversions.secondsToPixels)(fadeIn.end - fadeIn.start, data.resolution, data.sampleRate); + + channelChildren.push((0, _h2.default)('div.wp-fade.wp-fadein', { + attributes: { + style: 'position: absolute; height: ' + data.height + 'px; width: ' + fadeWidth + 'px; top: 0; left: 0; z-index: 4;' + } + }, [(0, _h2.default)('canvas', { + attributes: { + width: fadeWidth, + height: data.height + }, + hook: new _FadeCanvasHook2.default(fadeIn.type, fadeIn.shape, fadeIn.end - fadeIn.start, data.resolution) + })])); + } + + if (_this3.fadeOut) { + var fadeOut = _this3.fades[_this3.fadeOut]; + var _fadeWidth = (0, _conversions.secondsToPixels)(fadeOut.end - fadeOut.start, data.resolution, data.sampleRate); + + channelChildren.push((0, _h2.default)('div.wp-fade.wp-fadeout', { + attributes: { + style: 'position: absolute; height: ' + data.height + 'px; width: ' + _fadeWidth + 'px; top: 0; right: 0; z-index: 4;' + } + }, [(0, _h2.default)('canvas', { + attributes: { + width: _fadeWidth, + height: data.height + }, + hook: new _FadeCanvasHook2.default(fadeOut.type, fadeOut.shape, fadeOut.end - fadeOut.start, data.resolution) + })])); + } + + return (0, _h2.default)('div.channel.channel-' + channelNum, { + attributes: { + style: 'height: ' + data.height + 'px; width: ' + width + 'px; top: ' + channelNum * data.height + 'px; left: ' + startX + 'px; position: absolute; margin: 0; padding: 0; z-index: 1;' + } + }, channelChildren); + }); + + waveformChildren.push(channels); + waveformChildren.push(this.renderOverlay(data)); + + // draw cursor selection on active track. + if (data.isActive === true) { + var cStartX = (0, _conversions.secondsToPixels)(data.timeSelection.start, data.resolution, data.sampleRate); + var cEndX = (0, _conversions.secondsToPixels)(data.timeSelection.end, data.resolution, data.sampleRate); + var cWidth = cEndX - cStartX + 1; + var cClassName = cWidth > 1 ? '.segment' : '.point'; + + waveformChildren.push((0, _h2.default)('div.selection' + cClassName, { + attributes: { + style: 'position: absolute; width: ' + cWidth + 'px; bottom: 0; top: 0; left: ' + cStartX + 'px; z-index: 4;' + } + })); + } + + var waveform = (0, _h2.default)('div.waveform', { + attributes: { + style: 'height: ' + numChan * data.height + 'px; position: relative;' + } + }, waveformChildren); + + var channelChildren = []; + var channelMargin = 0; + + if (data.controls.show) { + channelChildren.push(this.renderControls(data)); + channelMargin = data.controls.width; + } + + channelChildren.push(waveform); + + var audibleClass = data.shouldPlay ? '' : '.silent'; + var customClass = this.customClass === undefined ? '' : '.' + this.customClass; + + return (0, _h2.default)('div.channel-wrapper' + audibleClass + customClass, { + attributes: { + style: 'margin-left: ' + channelMargin + 'px; height: ' + data.height * numChan + 'px;' + } + }, channelChildren); + } + }, { + key: 'getTrackDetails', + value: function getTrackDetails() { + var info = { + src: this.src, + start: this.startTime, + end: this.endTime, + name: this.name, + customClass: this.customClass, + cuein: this.cueIn, + cueout: this.cueOut + }; + + if (this.fadeIn) { + var fadeIn = this.fades[this.fadeIn]; + + info.fadeIn = { + shape: fadeIn.shape, + duration: fadeIn.end - fadeIn.start + }; + } + + if (this.fadeOut) { + var fadeOut = this.fades[this.fadeOut]; + + info.fadeOut = { + shape: fadeOut.shape, + duration: fadeOut.end - fadeOut.start + }; + } + + return info; + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 69 */ + /***/ + (function(module, exports) { + + /** + * lodash (Custom Build) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]'; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var objectToString = objectProto.toString; + + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = overArg(Object.keys, Object); + + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + // Safari 9 makes `arguments.length` enumerable in strict mode. + var result = (isArray(value) || isArguments(value)) ? + baseTimes(value.length, String) : []; + + var length = result.length, + skipIndexes = !!length; + + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; + } + + /** + * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && + (typeof value == 'number' || reIsUint.test(value)) && + (value > -1 && value % 1 == 0 && value < length); + } + + /** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } + + /** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + // Safari 8.1 makes `arguments.callee` enumerable in strict mode. + return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && + (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + /** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + + /** + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false + */ + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 8-9 which returns 'object' for typed array and other constructors. + var tag = isObject(value) ? objectToString.call(value) : ''; + return tag == funcTag || tag == genTag; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @example + * + * _.isLength(3); + * // => true + * + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false + */ + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, typeof iteratee == 'function' ? iteratee : identity); + } + + /** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + + /** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ + function identity(value) { + return value; + } + + module.exports = forOwn; + + + /***/ + }), + /* 70 */ + /***/ + (function(module, exports, __webpack_require__) { + + // uuid.js + // + // Copyright (c) 2010-2012 Robert Kieffer + // MIT License - http://opensource.org/licenses/mit-license.php + + // Unique ID creation requires a high quality random # generator. We feature + // detect to determine the best RNG source, normalizing to a function that + // returns 128-bits of randomness, since that's what's usually required + var _rng = __webpack_require__(71); + + // Maps for number <-> hex string conversion + var _byteToHex = []; + var _hexToByte = {}; + for (var i = 0; i < 256; i++) { + _byteToHex[i] = (i + 0x100).toString(16).substr(1); + _hexToByte[_byteToHex[i]] = i; + } + + // **`parse()` - Parse a UUID into it's component bytes** + function parse(s, buf, offset) { + var i = (buf && offset) || 0, + ii = 0; + + buf = buf || []; + s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) { + if (ii < 16) { // Don't overflow! + buf[i + ii++] = _hexToByte[oct]; + } + }); + + // Zero out remaining bytes if string was short + while (ii < 16) { + buf[i + ii++] = 0; + } + + return buf; + } + + // **`unparse()` - Convert UUID byte array (ala parse()) into a string** + function unparse(buf, offset) { + var i = offset || 0, + bth = _byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; + } + + // **`v1()` - Generate time-based UUID** + // + // Inspired by https://github.com/LiosK/UUID.js + // and http://docs.python.org/library/uuid.html + + // random #'s we need to init node and clockseq + var _seedBytes = _rng(); + + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + var _nodeId = [ + _seedBytes[0] | 0x01, + _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] + ]; + + // Per 4.2.2, randomize (14 bit) clockseq + var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; + + // Previous uuid creation time + var _lastMSecs = 0, + _lastNSecs = 0; + + // See https://github.com/broofa/node-uuid for API details + function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs) / 10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + var node = options.node || _nodeId; + for (var n = 0; n < 6; n++) { + b[i + n] = node[n]; + } + + return buf ? buf : unparse(b); + } + + // **`v4()` - Generate random UUID** + + // See https://github.com/broofa/node-uuid for API details + function v4(options, buf, offset) { + // Deprecated - 'format' argument, as supported in v1.2 + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options == 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || _rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ii++) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || unparse(rnds); + } + + // Export public API + var uuid = v4; + uuid.v1 = v1; + uuid.v4 = v4; + uuid.parse = parse; + uuid.unparse = unparse; + + module.exports = uuid; + + + /***/ + }), + /* 71 */ + /***/ + (function(module, exports) { + + /* WEBPACK VAR INJECTION */ + (function(global) { + var rng; + + var crypto = global.crypto || global.msCrypto; // for IE 11 + if (crypto && crypto.getRandomValues) { + // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto + // Moderately fast, high quality + var _rnds8 = new Uint8Array(16); + rng = function whatwgRNG() { + crypto.getRandomValues(_rnds8); + return _rnds8; + }; + } + + if (!rng) { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var _rnds = new Array(16); + rng = function() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return _rnds; + }; + } + + module.exports = rng; + + + /* WEBPACK VAR INJECTION */ + }.call(exports, (function() { return this; }()))) + + /***/ + }), + /* 72 */ + /***/ + (function(module, exports) { + + 'use strict'; + + //http://jsperf.com/typed-array-min-max/2 + //plain for loop for finding min/max is way faster than anything else. + /** + * @param {TypedArray} array - Subarray of audio to calculate peaks from. + */ + function findMinMax(array) { + var min = Infinity; + var max = -Infinity; + var i = 0; + var len = array.length; + var curr; + + for (; i < len; i++) { + curr = array[i]; + if (min > curr) { + min = curr; + } + if (max < curr) { + max = curr; + } + } + + return { + min: min, + max: max + }; + } + + /** + * @param {Number} n - peak to convert from float to Int8, Int16 etc. + * @param {Number} bits - convert to #bits two's complement signed integer + */ + function convert(n, bits) { + var max = Math.pow(2, bits - 1); + var v = n < 0 ? n * max : n * max - 1; + return Math.max(-max, Math.min(max - 1, v)); + } + + /** + * @param {TypedArray} channel - Audio track frames to calculate peaks from. + * @param {Number} samplesPerPixel - Audio frames per peak + */ + function extractPeaks(channel, samplesPerPixel, bits) { + var i; + var chanLength = channel.length; + var numPeaks = Math.ceil(chanLength / samplesPerPixel); + var start; + var end; + var segment; + var max; + var min; + var extrema; + + //create interleaved array of min,max + var peaks = new(eval("Int" + bits + "Array"))(numPeaks * 2); + + for (i = 0; i < numPeaks; i++) { + + start = i * samplesPerPixel; + end = (i + 1) * samplesPerPixel > chanLength ? chanLength : (i + 1) * samplesPerPixel; + + segment = channel.subarray(start, end); + extrema = findMinMax(segment); + min = convert(extrema.min, bits); + max = convert(extrema.max, bits); + + peaks[i * 2] = min; + peaks[i * 2 + 1] = max; + } + + return peaks; + } + + function makeMono(channelPeaks, bits) { + var numChan = channelPeaks.length; + var weight = 1 / numChan; + var numPeaks = channelPeaks[0].length / 2; + var c = 0; + var i = 0; + var min; + var max; + var peaks = new(eval("Int" + bits + "Array"))(numPeaks * 2); + + for (i = 0; i < numPeaks; i++) { + min = 0; + max = 0; + + for (c = 0; c < numChan; c++) { + min += weight * channelPeaks[c][i * 2]; + max += weight * channelPeaks[c][i * 2 + 1]; + } + + peaks[i * 2] = min; + peaks[i * 2 + 1] = max; + } + + //return in array so channel number counts still work. + return [peaks]; + } + + /** + * @param {AudioBuffer,TypedArray} source - Source of audio samples for peak calculations. + * @param {Number} samplesPerPixel - Number of audio samples per peak. + * @param {Number} cueIn - index in channel to start peak calculations from. + * @param {Number} cueOut - index in channel to end peak calculations from (non-inclusive). + */ + module.exports = function(source, samplesPerPixel, isMono, cueIn, cueOut, bits) { + samplesPerPixel = samplesPerPixel || 10000; + bits = bits || 8; + + if (isMono === null || isMono === undefined) { + isMono = true; + } + + if ([8, 16, 32].indexOf(bits) < 0) { + throw new Error("Invalid number of bits specified for peaks."); + } + + var numChan = source.numberOfChannels; + var peaks = []; + var c; + var numPeaks; + var channel; + var slice; + + if (typeof source.subarray === "undefined") { + for (c = 0; c < numChan; c++) { + channel = source.getChannelData(c); + cueIn = cueIn || 0; + cueOut = cueOut || channel.length; + slice = channel.subarray(cueIn, cueOut); + peaks.push(extractPeaks(slice, samplesPerPixel, bits)); + } + } else { + cueIn = cueIn || 0; + cueOut = cueOut || source.length; + peaks.push(extractPeaks(source.subarray(cueIn, cueOut), samplesPerPixel, bits)); + } + + if (isMono && peaks.length > 1) { + peaks = makeMono(peaks, bits); + } + + numPeaks = peaks[0].length / 2; + + return { + length: numPeaks, + data: peaks, + bits: bits + }; + }; + + /***/ + }), + /* 73 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.FADEOUT = exports.FADEIN = exports.LOGARITHMIC = exports.EXPONENTIAL = exports.LINEAR = exports.SCURVE = undefined; + exports.createFadeIn = createFadeIn; + exports.createFadeOut = createFadeOut; + + var _fadeCurves = __webpack_require__(74); + + var SCURVE = exports.SCURVE = "sCurve"; + var LINEAR = exports.LINEAR = "linear"; + var EXPONENTIAL = exports.EXPONENTIAL = "exponential"; + var LOGARITHMIC = exports.LOGARITHMIC = "logarithmic"; + + var FADEIN = exports.FADEIN = "FadeIn"; + var FADEOUT = exports.FADEOUT = "FadeOut"; + + function sCurveFadeIn(start, duration) { + var curve = (0, _fadeCurves.sCurve)(10000, 1); + this.setValueCurveAtTime(curve, start, duration); + } + + function sCurveFadeOut(start, duration) { + var curve = (0, _fadeCurves.sCurve)(10000, -1); + this.setValueCurveAtTime(curve, start, duration); + } + + function linearFadeIn(start, duration) { + this.linearRampToValueAtTime(0, start); + this.linearRampToValueAtTime(1, start + duration); + } + + function linearFadeOut(start, duration) { + this.linearRampToValueAtTime(1, start); + this.linearRampToValueAtTime(0, start + duration); + } + + function exponentialFadeIn(start, duration) { + this.exponentialRampToValueAtTime(0.01, start); + this.exponentialRampToValueAtTime(1, start + duration); + } + + function exponentialFadeOut(start, duration) { + this.exponentialRampToValueAtTime(1, start); + this.exponentialRampToValueAtTime(0.01, start + duration); + } + + function logarithmicFadeIn(start, duration) { + var curve = (0, _fadeCurves.logarithmic)(10000, 10, 1); + this.setValueCurveAtTime(curve, start, duration); + } + + function logarithmicFadeOut(start, duration) { + var curve = (0, _fadeCurves.logarithmic)(10000, 10, -1); + this.setValueCurveAtTime(curve, start, duration); + } + + function createFadeIn(gain, shape, start, duration) { + switch (shape) { + case SCURVE: + sCurveFadeIn.call(gain, start, duration); + break; + case LINEAR: + linearFadeIn.call(gain, start, duration); + break; + case EXPONENTIAL: + exponentialFadeIn.call(gain, start, duration); + break; + case LOGARITHMIC: + logarithmicFadeIn.call(gain, start, duration); + break; + default: + throw new Error("Unsupported Fade type"); + } + } + + function createFadeOut(gain, shape, start, duration) { + switch (shape) { + case SCURVE: + sCurveFadeOut.call(gain, start, duration); + break; + case LINEAR: + linearFadeOut.call(gain, start, duration); + break; + case EXPONENTIAL: + exponentialFadeOut.call(gain, start, duration); + break; + case LOGARITHMIC: + logarithmicFadeOut.call(gain, start, duration); + break; + default: + throw new Error("Unsupported Fade type"); + } + } + + + /***/ + }), + /* 74 */ + /***/ + (function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.linear = linear; + exports.exponential = exponential; + exports.sCurve = sCurve; + exports.logarithmic = logarithmic; + + function linear(length, rotation) { + var curve = new Float32Array(length), + i, + x, + scale = length - 1; + + for (i = 0; i < length; i++) { + x = i / scale; + + if (rotation > 0) { + curve[i] = x; + } else { + curve[i] = 1 - x; + } + } + + return curve; + } + + function exponential(length, rotation) { + var curve = new Float32Array(length), + i, + x, + scale = length - 1, + index; + + for (i = 0; i < length; i++) { + x = i / scale; + index = rotation > 0 ? i : length - 1 - i; + + curve[index] = Math.exp(2 * x - 1) / Math.exp(1); + } + + return curve; + } + + //creating a curve to simulate an S-curve with setValueCurveAtTime. + function sCurve(length, rotation) { + var curve = new Float32Array(length), + i, + phase = rotation > 0 ? Math.PI / 2 : -(Math.PI / 2); + + for (i = 0; i < length; ++i) { + curve[i] = Math.sin(Math.PI * i / length - phase) / 2 + 0.5; + } + return curve; + } + + //creating a curve to simulate a logarithmic curve with setValueCurveAtTime. + function logarithmic(length, base, rotation) { + var curve = new Float32Array(length), + index, + x = 0, + i; + + for (i = 0; i < length; i++) { + //index for the curve array. + index = rotation > 0 ? i : length - 1 - i; + + x = i / length; + curve[index] = Math.log(1 + base * x) / Math.log(1 + base); + } + + return curve; + } + + + /***/ + }), + /* 75 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _CursorState = __webpack_require__(76); + + var _CursorState2 = _interopRequireDefault(_CursorState); + + var _SelectState = __webpack_require__(77); + + var _SelectState2 = _interopRequireDefault(_SelectState); + + var _ShiftState = __webpack_require__(78); + + var _ShiftState2 = _interopRequireDefault(_ShiftState); + + var _FadeInState = __webpack_require__(79); + + var _FadeInState2 = _interopRequireDefault(_FadeInState); + + var _FadeOutState = __webpack_require__(80); + + var _FadeOutState2 = _interopRequireDefault(_FadeOutState); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + exports.default = { + cursor: _CursorState2.default, + select: _SelectState2.default, + shift: _ShiftState2.default, + fadein: _FadeInState2.default, + fadeout: _FadeOutState2.default + }; + + /***/ + }), + /* 76 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _conversions = __webpack_require__(60); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class(track) { + _classCallCheck(this, _class); + + this.track = track; + } + + _createClass(_class, [{ + key: 'setup', + value: function setup(samplesPerPixel, sampleRate) { + this.samplesPerPixel = samplesPerPixel; + this.sampleRate = sampleRate; + } + }, { + key: 'click', + value: function click(e) { + e.preventDefault(); + + var startX = e.offsetX; + var startTime = (0, _conversions.pixelsToSeconds)(startX, this.samplesPerPixel, this.sampleRate); + + this.track.ee.emit('select', startTime, startTime, this.track); + } + }], [{ + key: 'getClass', + value: function getClass() { + return '.state-cursor'; + } + }, { + key: 'getEvents', + value: function getEvents() { + return ['click']; + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 77 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _conversions = __webpack_require__(60); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class(track) { + _classCallCheck(this, _class); + + this.track = track; + this.active = false; + } + + _createClass(_class, [{ + key: 'setup', + value: function setup(samplesPerPixel, sampleRate) { + this.samplesPerPixel = samplesPerPixel; + this.sampleRate = sampleRate; + } + }, { + key: 'emitSelection', + value: function emitSelection(x) { + var minX = Math.min(x, this.startX); + var maxX = Math.max(x, this.startX); + var startTime = (0, _conversions.pixelsToSeconds)(minX, this.samplesPerPixel, this.sampleRate); + var endTime = (0, _conversions.pixelsToSeconds)(maxX, this.samplesPerPixel, this.sampleRate); + + this.track.ee.emit('select', startTime, endTime, this.track); + } + }, { + key: 'complete', + value: function complete(x) { + this.emitSelection(x); + this.active = false; + } + }, { + key: 'mousedown', + value: function mousedown(e) { + e.preventDefault(); + this.active = true; + + this.startX = e.offsetX; + var startTime = (0, _conversions.pixelsToSeconds)(this.startX, this.samplesPerPixel, this.sampleRate); + + this.track.ee.emit('select', startTime, startTime, this.track); + } + }, { + key: 'mousemove', + value: function mousemove(e) { + if (this.active) { + e.preventDefault(); + this.emitSelection(e.offsetX); + } + } + }, { + key: 'mouseup', + value: function mouseup(e) { + if (this.active) { + e.preventDefault(); + this.complete(e.offsetX); + } + } + }, { + key: 'mouseleave', + value: function mouseleave(e) { + if (this.active) { + e.preventDefault(); + this.complete(e.offsetX); + } + } + }], [{ + key: 'getClass', + value: function getClass() { + return '.state-select'; + } + }, { + key: 'getEvents', + value: function getEvents() { + return ['mousedown', 'mousemove', 'mouseup', 'mouseleave']; + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 78 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _conversions = __webpack_require__(60); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class(track) { + _classCallCheck(this, _class); + + this.track = track; + this.active = false; + } + + _createClass(_class, [{ + key: 'setup', + value: function setup(samplesPerPixel, sampleRate) { + this.samplesPerPixel = samplesPerPixel; + this.sampleRate = sampleRate; + } + }, { + key: 'emitShift', + value: function emitShift(x) { + var deltaX = x - this.prevX; + var deltaTime = (0, _conversions.pixelsToSeconds)(deltaX, this.samplesPerPixel, this.sampleRate); + this.prevX = x; + this.track.ee.emit('shift', deltaTime, this.track); + } + }, { + key: 'complete', + value: function complete(x) { + this.emitShift(x); + this.active = false; + } + }, { + key: 'mousedown', + value: function mousedown(e) { + e.preventDefault(); + + this.active = true; + this.el = e.target; + this.prevX = e.offsetX; + } + }, { + key: 'mousemove', + value: function mousemove(e) { + if (this.active) { + e.preventDefault(); + this.emitShift(e.offsetX); + } + } + }, { + key: 'mouseup', + value: function mouseup(e) { + if (this.active) { + e.preventDefault(); + this.complete(e.offsetX); + } + } + }, { + key: 'mouseleave', + value: function mouseleave(e) { + if (this.active) { + e.preventDefault(); + this.complete(e.offsetX); + } + } + }], [{ + key: 'getClass', + value: function getClass() { + return '.state-shift'; + } + }, { + key: 'getEvents', + value: function getEvents() { + return ['mousedown', 'mousemove', 'mouseup', 'mouseleave']; + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 79 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _conversions = __webpack_require__(60); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class(track) { + _classCallCheck(this, _class); + + this.track = track; + } + + _createClass(_class, [{ + key: 'setup', + value: function setup(samplesPerPixel, sampleRate) { + this.samplesPerPixel = samplesPerPixel; + this.sampleRate = sampleRate; + } + }, { + key: 'click', + value: function click(e) { + var startX = e.offsetX; + var time = (0, _conversions.pixelsToSeconds)(startX, this.samplesPerPixel, this.sampleRate); + + if (time > this.track.getStartTime() && time < this.track.getEndTime()) { + this.track.ee.emit('fadein', time - this.track.getStartTime(), this.track); + } + } + }], [{ + key: 'getClass', + value: function getClass() { + return '.state-fadein'; + } + }, { + key: 'getEvents', + value: function getEvents() { + return ['click']; + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 80 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _conversions = __webpack_require__(60); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class(track) { + _classCallCheck(this, _class); + + this.track = track; + } + + _createClass(_class, [{ + key: 'setup', + value: function setup(samplesPerPixel, sampleRate) { + this.samplesPerPixel = samplesPerPixel; + this.sampleRate = sampleRate; + } + }, { + key: 'click', + value: function click(e) { + var startX = e.offsetX; + var time = (0, _conversions.pixelsToSeconds)(startX, this.samplesPerPixel, this.sampleRate); + + if (time > this.track.getStartTime() && time < this.track.getEndTime()) { + this.track.ee.emit('fadeout', this.track.getEndTime() - time, this.track); + } + } + }], [{ + key: 'getClass', + value: function getClass() { + return '.state-fadeout'; + } + }, { + key: 'getEvents', + value: function getEvents() { + return ['click']; + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 81 */ + /***/ + (function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + /* + * virtual-dom hook for drawing to the canvas element. + */ + var CanvasHook = function() { + function CanvasHook(peaks, offset, bits, color, scale) { + _classCallCheck(this, CanvasHook); + + this.peaks = peaks; + // http://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element + this.offset = offset; + this.color = color; + this.bits = bits; + this.scale = scale; + } + + _createClass(CanvasHook, [{ + key: 'hook', + value: function hook(canvas, prop, prev) { + // canvas is up to date + if (prev !== undefined && prev.peaks === this.peaks) { + return; + } + + var scale = this.scale; + var len = canvas.width / scale; + var cc = canvas.getContext('2d'); + var h2 = canvas.height / scale / 2; + var maxValue = Math.pow(2, this.bits - 1); + + cc.clearRect(0, 0, canvas.width, canvas.height); + cc.fillStyle = this.color; + cc.scale(scale, scale); + + for (var i = 0; i < len; i += 1) { + var minPeak = this.peaks[(i + this.offset) * 2] / maxValue; + var maxPeak = this.peaks[(i + this.offset) * 2 + 1] / maxValue; + CanvasHook.drawFrame(cc, h2, i, minPeak, maxPeak); + } + } + }], [{ + key: 'drawFrame', + value: function drawFrame(cc, h2, x, minPeak, maxPeak) { + var min = Math.abs(minPeak * h2); + var max = Math.abs(maxPeak * h2); + + // draw max + cc.fillRect(x, 0, 1, h2 - max); + // draw min + cc.fillRect(x, h2 + min, 1, h2 - min); + } + }]); + + return CanvasHook; + }(); + + exports.default = CanvasHook; + + /***/ + }), + /* 82 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _fadeMaker = __webpack_require__(73); + + var _fadeCurves = __webpack_require__(74); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + /* + * virtual-dom hook for drawing the fade curve to the canvas element. + */ + var FadeCanvasHook = function() { + function FadeCanvasHook(type, shape, duration, samplesPerPixel) { + _classCallCheck(this, FadeCanvasHook); + + this.type = type; + this.shape = shape; + this.duration = duration; + this.samplesPerPixel = samplesPerPixel; + } + + _createClass(FadeCanvasHook, [{ + key: 'hook', + value: function hook(canvas, prop, prev) { + // node is up to date. + if (prev !== undefined && prev.shape === this.shape && prev.type === this.type && prev.duration === this.duration && prev.samplesPerPixel === this.samplesPerPixel) { + return; + } + + var ctx = canvas.getContext('2d'); + var width = canvas.width; + var height = canvas.height; + var curve = FadeCanvasHook.createCurve(this.shape, this.type, width); + var len = curve.length; + var y = height - curve[0] * height; + + ctx.strokeStyle = 'black'; + ctx.beginPath(); + ctx.moveTo(0, y); + + for (var i = 1; i < len; i += 1) { + y = height - curve[i] * height; + ctx.lineTo(i, y); + } + ctx.stroke(); + } + }], [{ + key: 'createCurve', + value: function createCurve(shape, type, width) { + var reflection = void 0; + var curve = void 0; + + switch (type) { + case _fadeMaker.FADEIN: + { + reflection = 1; + break; + } + case _fadeMaker.FADEOUT: + { + reflection = -1; + break; + } + default: + { + throw new Error('Unsupported fade type.'); + } + } + + switch (shape) { + case _fadeMaker.SCURVE: + { + curve = (0, _fadeCurves.sCurve)(width, reflection); + break; + } + case _fadeMaker.LINEAR: + { + curve = (0, _fadeCurves.linear)(width, reflection); + break; + } + case _fadeMaker.EXPONENTIAL: + { + curve = (0, _fadeCurves.exponential)(width, reflection); + break; + } + case _fadeMaker.LOGARITHMIC: + { + curve = (0, _fadeCurves.logarithmic)(width, 10, reflection); + break; + } + default: + { + throw new Error('Unsupported fade shape'); + } + } + + return curve; + } + }]); + + return FadeCanvasHook; + }(); + + exports.default = FadeCanvasHook; + + /***/ + }), + /* 83 */ + /***/ + (function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + /* + * virtual-dom hook for setting the volume input programmatically. + */ + var _class = function() { + function _class(gain) { + _classCallCheck(this, _class); + + this.gain = gain; + } + + _createClass(_class, [{ + key: 'hook', + value: function hook(volumeInput) { + volumeInput.setAttribute('value', this.gain * 100); + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 84 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _fadeMaker = __webpack_require__(73); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class(ac, buffer) { + _classCallCheck(this, _class); + + this.ac = ac; + this.gain = 1; + this.buffer = buffer; + this.destination = this.ac.destination; + this.ac.createStereoPanner = ac.createStereoPanner || ac.createPanner; + } + + _createClass(_class, [{ + key: 'applyFade', + value: function applyFade(type, start, duration) { + var shape = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'logarithmic'; + + if (type === _fadeMaker.FADEIN) { + (0, _fadeMaker.createFadeIn)(this.fadeGain.gain, shape, start, duration); + } else if (type === _fadeMaker.FADEOUT) { + (0, _fadeMaker.createFadeOut)(this.fadeGain.gain, shape, start, duration); + } else { + throw new Error('Unsupported fade type'); + } + } + }, { + key: 'applyFadeIn', + value: function applyFadeIn(start, duration) { + var shape = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'logarithmic'; + + this.applyFade(_fadeMaker.FADEIN, start, duration, shape); + } + }, { + key: 'applyFadeOut', + value: function applyFadeOut(start, duration) { + var shape = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'logarithmic'; + + this.applyFade(_fadeMaker.FADEOUT, start, duration, shape); + } + }, { + key: 'isPlaying', + value: function isPlaying() { + return this.source !== undefined; + } + }, { + key: 'getDuration', + value: function getDuration() { + return this.buffer.duration; + } + }, { + key: 'setAudioContext', + value: function setAudioContext(ac) { + this.ac = ac; + this.ac.createStereoPanner = ac.createStereoPanner || ac.createPanner; + this.destination = this.ac.destination; + } + }, { + key: 'setUpSource', + value: function setUpSource() { + var _this = this; + + this.source = this.ac.createBufferSource(); + this.source.buffer = this.buffer; + + var sourcePromise = new Promise(function(resolve) { + // keep track of the buffer state. + _this.source.onended = function() { + _this.source.disconnect(); + _this.fadeGain.disconnect(); + _this.volumeGain.disconnect(); + _this.shouldPlayGain.disconnect(); + _this.panner.disconnect(); + _this.masterGain.disconnect(); + + _this.source = undefined; + _this.fadeGain = undefined; + _this.volumeGain = undefined; + _this.shouldPlayGain = undefined; + _this.panner = undefined; + _this.masterGain = undefined; + + resolve(); + }; + }); + + this.fadeGain = this.ac.createGain(); + // used for track volume slider + this.volumeGain = this.ac.createGain(); + // used for solo/mute + this.shouldPlayGain = this.ac.createGain(); + this.masterGain = this.ac.createGain(); + + this.panner = this.ac.createStereoPanner(); + + this.source.connect(this.fadeGain); + this.fadeGain.connect(this.volumeGain); + this.volumeGain.connect(this.shouldPlayGain); + this.shouldPlayGain.connect(this.masterGain); + this.masterGain.connect(this.panner); + this.panner.connect(this.destination); + + return sourcePromise; + } + }, { + key: 'setVolumeGainLevel', + value: function setVolumeGainLevel(level) { + if (this.volumeGain) { + this.volumeGain.gain.value = level; + } + } + }, { + key: 'setShouldPlay', + value: function setShouldPlay(bool) { + if (this.shouldPlayGain) { + this.shouldPlayGain.gain.value = bool ? 1 : 0; + } + } + }, { + key: 'setMasterGainLevel', + value: function setMasterGainLevel(level) { + if (this.masterGain) { + this.masterGain.gain.value = level; + } + } + }, { + key: 'setStereoPanValue', + value: function setStereoPanValue(value) { + var pan = value === undefined ? 0 : value; + + if (this.panner) { + if (this.panner.pan !== undefined) { + this.panner.pan.value = pan; + } else { + this.panner.panningModel = 'equalpower'; + this.panner.setPosition(pan, 0, 1 - Math.abs(pan)); + } + } + } + + /* + source.start is picky when passing the end time. + If rounding error causes a number to make the source think + it is playing slightly more samples than it has it won't play at all. + Unfortunately it doesn't seem to work if you just give it a start time. + */ + + }, { + key: 'play', + value: function play(when, start, duration) { + this.source.start(when, start, duration); + } + }, { + key: 'stop', + value: function stop() { + var when = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + + if (this.source) { + this.source.stop(when); + } + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 85 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _h = __webpack_require__(38); + + var _h2 = _interopRequireDefault(_h); + + var _aeneas = __webpack_require__(86); + + var _aeneas2 = _interopRequireDefault(_aeneas); + + var _aeneas3 = __webpack_require__(87); + + var _aeneas4 = _interopRequireDefault(_aeneas3); + + var _conversions = __webpack_require__(60); + + var _DragInteraction = __webpack_require__(88); + + var _DragInteraction2 = _interopRequireDefault(_DragInteraction); + + var _ScrollTopHook = __webpack_require__(89); + + var _ScrollTopHook2 = _interopRequireDefault(_ScrollTopHook); + + var _timeformat = __webpack_require__(90); + + var _timeformat2 = _interopRequireDefault(_timeformat); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var AnnotationList = function() { + function AnnotationList(playlist, annotations) { + var controls = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + var editable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var linkEndpoints = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + var isContinuousPlay = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; + + _classCallCheck(this, AnnotationList); + + this.playlist = playlist; + this.resizeHandlers = []; + this.editable = editable; + this.annotations = annotations.map(function(a) { + return ( + // TODO support different formats later on. + (0, _aeneas2.default)(a) + ); + }); + this.setupInteractions(); + + this.controls = controls; + this.setupEE(playlist.ee); + + // TODO actually make a real plugin system that's not terrible. + this.playlist.isContinuousPlay = isContinuousPlay; + this.playlist.linkEndpoints = linkEndpoints; + this.length = this.annotations.length; + } + + _createClass(AnnotationList, [{ + key: 'setupInteractions', + value: function setupInteractions() { + var _this = this; + + this.annotations.forEach(function(a, i) { + var leftShift = new _DragInteraction2.default(_this.playlist, { + direction: 'left', + index: i + }); + var rightShift = new _DragInteraction2.default(_this.playlist, { + direction: 'right', + index: i + }); + + _this.resizeHandlers.push(leftShift); + _this.resizeHandlers.push(rightShift); + }); + } + }, { + key: 'setupEE', + value: function setupEE(ee) { + var _this2 = this; + + ee.on('dragged', function(deltaTime, data) { + var annotationIndex = data.index; + var annotations = _this2.annotations; + var note = annotations[annotationIndex]; + + // resizing to the left + if (data.direction === 'left') { + var originalVal = note.start; + note.start += deltaTime; + + if (note.start < 0) { + note.start = 0; + } + + if (annotationIndex && annotations[annotationIndex - 1].end > note.start) { + annotations[annotationIndex - 1].end = note.start; + } + + if (_this2.playlist.linkEndpoints && annotationIndex && annotations[annotationIndex - 1].end === originalVal) { + annotations[annotationIndex - 1].end = note.start; + } + } else { + // resizing to the right + var _originalVal = note.end; + note.end += deltaTime; + + if (note.end > _this2.playlist.duration) { + note.end = _this2.playlist.duration; + } + + if (annotationIndex < annotations.length - 1 && annotations[annotationIndex + 1].start < note.end) { + annotations[annotationIndex + 1].start = note.end; + } + + if (_this2.playlist.linkEndpoints && annotationIndex < annotations.length - 1 && annotations[annotationIndex + 1].start === _originalVal) { + annotations[annotationIndex + 1].start = note.end; + } + } + + _this2.playlist.drawRequest(); + }); + + ee.on('continuousplay', function(val) { + _this2.playlist.isContinuousPlay = val; + }); + + ee.on('linkendpoints', function(val) { + _this2.playlist.linkEndpoints = val; + }); + + ee.on('annotationsrequest', function() { + _this2.export(); + }); + + return ee; + } + }, { + key: 'export', + value: function _export() { + var output = this.annotations.map(function(a) { + return (0, _aeneas4.default)(a); + }); + var dataStr = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(output)); + var a = document.createElement('a'); + + document.body.appendChild(a); + a.href = dataStr; + a.download = 'annotations.json'; + a.click(); + document.body.removeChild(a); + } + }, { + key: 'renderResizeLeft', + value: function renderResizeLeft(i) { + var events = _DragInteraction2.default.getEvents(); + var config = { + attributes: { + style: 'position: absolute; height: 30px; width: 10px; top: 0; left: -2px', + draggable: true + } + }; + var handler = this.resizeHandlers[i * 2]; + + events.forEach(function(event) { + config['on' + event] = handler[event].bind(handler); + }); + + return (0, _h2.default)('div.resize-handle.resize-w', config); + } + }, { + key: 'renderResizeRight', + value: function renderResizeRight(i) { + var events = _DragInteraction2.default.getEvents(); + var config = { + attributes: { + style: 'position: absolute; height: 30px; width: 10px; top: 0; right: -2px', + draggable: true + } + }; + var handler = this.resizeHandlers[i * 2 + 1]; + + events.forEach(function(event) { + config['on' + event] = handler[event].bind(handler); + }); + + return (0, _h2.default)('div.resize-handle.resize-e', config); + } + }, { + key: 'renderControls', + value: function renderControls(note, i) { + var _this3 = this; + + // seems to be a bug with references, or I'm missing something. + var that = this; + return this.controls.map(function(ctrl) { + return (0, _h2.default)('i.' + ctrl.class, { + attributes: { + title: ctrl.title + }, + onclick: function onclick() { + ctrl.action(note, i, that.annotations, { + linkEndpoints: that.playlist.linkEndpoints + }); + _this3.setupInteractions(); + that.playlist.drawRequest(); + } + }); + }); + } + }, { + key: 'render', + value: function render() { + var _this4 = this; + + var boxes = (0, _h2.default)('div.annotations-boxes', { + attributes: { + style: 'height: 30px;' + } + }, this.annotations.map(function(note, i) { + var samplesPerPixel = _this4.playlist.samplesPerPixel; + var sampleRate = _this4.playlist.sampleRate; + var pixPerSec = sampleRate / samplesPerPixel; + var pixOffset = (0, _conversions.secondsToPixels)(_this4.playlist.scrollLeft, samplesPerPixel, sampleRate); + var left = Math.floor(note.start * pixPerSec - pixOffset); + var width = Math.ceil(note.end * pixPerSec - note.start * pixPerSec); + + return (0, _h2.default)('div.annotation-box', { + attributes: { + style: 'position: absolute; height: 30px; width: ' + width + 'px; left: ' + left + 'px', + 'data-id': note.id + } + }, [_this4.renderResizeLeft(i), (0, _h2.default)('span.id', { + onclick: function onclick() { + if (_this4.playlist.isContinuousPlay) { + _this4.playlist.ee.emit('play', _this4.annotations[i].start); + } else { + _this4.playlist.ee.emit('play', _this4.annotations[i].start, _this4.annotations[i].end); + } + } + }, [note.id]), _this4.renderResizeRight(i)]); + })); + + var boxesWrapper = (0, _h2.default)('div.annotations-boxes-wrapper', { + attributes: { + style: 'overflow: hidden;' + } + }, [boxes]); + + var text = (0, _h2.default)('div.annotations-text', { + hook: new _ScrollTopHook2.default() + }, this.annotations.map(function(note, i) { + var format = (0, _timeformat2.default)(_this4.playlist.durationFormat); + var start = format(note.start); + var end = format(note.end); + + var segmentClass = ''; + if (_this4.playlist.isPlaying() && _this4.playlist.playbackSeconds >= note.start && _this4.playlist.playbackSeconds <= note.end) { + segmentClass = '.current'; + } + + var editableConfig = { + attributes: { + contenteditable: true + }, + oninput: function oninput(e) { + // needed currently for references + // eslint-disable-next-line no-param-reassign + note.lines = [e.target.innerText]; + }, + onkeypress: function onkeypress(e) { + if (e.which === 13 || e.keyCode === 13) { + e.target.blur(); + e.preventDefault(); + } + } + }; + + var linesConfig = _this4.editable ? editableConfig : {}; + + return (0, _h2.default)('div.annotation' + segmentClass, [(0, _h2.default)('span.annotation-id', [note.id]), (0, _h2.default)('span.annotation-start', [start]), (0, _h2.default)('span.annotation-end', [end]), (0, _h2.default)('span.annotation-lines', linesConfig, [note.lines]), (0, _h2.default)('span.annotation-actions', _this4.renderControls(note, i))]); + })); + + return (0, _h2.default)('div.annotations', [boxesWrapper, text]); + } + }]); + + return AnnotationList; + }(); + + exports.default = AnnotationList; + + /***/ + }), + /* 86 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.default = function(aeneas) { + var annotation = { + id: aeneas.id || _uuid2.default.v4(), + start: Number(aeneas.begin) || 0, + end: Number(aeneas.end) || 0, + lines: aeneas.lines || [''], + lang: aeneas.language || 'en' + }; + + return annotation; + }; + + var _uuid = __webpack_require__(70); + + var _uuid2 = _interopRequireDefault(_uuid); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + /***/ + }), + /* 87 */ + /***/ + (function(module, exports) { + + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.default = function(annotation) { + return { + begin: String(annotation.start.toFixed(3)), + end: String(annotation.end.toFixed(3)), + id: String(annotation.id), + language: annotation.lang, + lines: annotation.lines + }; + }; + + /***/ + }), + /* 88 */ + /***/ + (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _createClass = function() { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; + }(); + + var _conversions = __webpack_require__(60); + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + var _class = function() { + function _class(playlist) { + var _this = this; + + var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, _class); + + this.playlist = playlist; + this.data = data; + this.active = false; + + this.ondragover = function(e) { + if (_this.active) { + e.preventDefault(); + _this.emitDrag(e.clientX); + } + }; + } + + _createClass(_class, [{ + key: 'emitDrag', + value: function emitDrag(x) { + var deltaX = x - this.prevX; + + // emit shift event if not 0 + if (deltaX) { + var deltaTime = (0, _conversions.pixelsToSeconds)(deltaX, this.playlist.samplesPerPixel, this.playlist.sampleRate); + this.prevX = x; + this.playlist.ee.emit('dragged', deltaTime, this.data); + } + } + }, { + key: 'complete', + value: function complete() { + this.active = false; + document.removeEventListener('dragover', this.ondragover); + } + }, { + key: 'dragstart', + value: function dragstart(e) { + var ev = e; + this.active = true; + this.prevX = e.clientX; + + ev.dataTransfer.dropEffect = 'move'; + ev.dataTransfer.effectAllowed = 'move'; + ev.dataTransfer.setData('text/plain', ''); + document.addEventListener('dragover', this.ondragover); + } + }, { + key: 'dragend', + value: function dragend(e) { + if (this.active) { + e.preventDefault(); + this.complete(); + } + } + }], [{ + key: 'getClass', + value: function getClass() { + return '.shift'; + } + }, { + key: 'getEvents', + value: function getEvents() { + return ['dragstart', 'dragend']; + } + }]); + + return _class; + }(); + + exports.default = _class; + + /***/ + }), + /* 89 */ + /***/ + (function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + /* + * virtual-dom hook for scrolling to the text annotation. + */ + var Hook = function ScrollTopHook() {}; + Hook.prototype.hook = function hook(node) { + var el = node.querySelector('.current'); + if (el) { + var box = node.getBoundingClientRect(); + var row = el.getBoundingClientRect(); + var diff = row.top - box.top; + var list = node; + list.scrollTop += diff; + } + }; + + exports.default = Hook; + + /***/ + }), + /* 90 */ + /***/ + (function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.default = function(format) { + function clockFormat(seconds, decimals) { + var hours = parseInt(seconds / 3600, 10) % 24; + var minutes = parseInt(seconds / 60, 10) % 60; + var secs = (seconds % 60).toFixed(decimals); + + var sHours = hours < 10 ? '0' + hours : hours; + var sMinutes = minutes < 10 ? '0' + minutes : minutes; + var sSeconds = secs < 10 ? '0' + secs : secs; + + return sHours + ':' + sMinutes + ':' + sSeconds; + } + + var formats = { + seconds: function seconds(_seconds) { + return _seconds.toFixed(0); + }, + thousandths: function thousandths(seconds) { + return seconds.toFixed(3); + }, + + 'hh:mm:ss': function hhmmss(seconds) { + return clockFormat(seconds, 0); + }, + 'hh:mm:ss.u': function hhmmssu(seconds) { + return clockFormat(seconds, 1); + }, + 'hh:mm:ss.uu': function hhmmssuu(seconds) { + return clockFormat(seconds, 2); + }, + 'hh:mm:ss.uuu': function hhmmssuuu(seconds) { + return clockFormat(seconds, 3); + } + }; + + return formats[format]; + }; + + /***/ + }), + /* 91 */ + /***/ + (function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.default = function() { + // http://jsperf.com/typed-array-min-max/2 + // plain for loop for finding min/max is way faster than anything else. + /** + * @param {TypedArray} array - Subarray of audio to calculate peaks from. + */ + function findMinMax(array) { + var min = Infinity; + var max = -Infinity; + var curr = void 0; + + for (var i = 0; i < array.length; i += 1) { + curr = array[i]; + if (min > curr) { + min = curr; + } + if (max < curr) { + max = curr; + } + } + + return { + min: min, + max: max + }; + } + + /** + * @param {Number} n - peak to convert from float to Int8, Int16 etc. + * @param {Number} bits - convert to #bits two's complement signed integer + */ + function convert(n, bits) { + var max = Math.pow(2, bits - 1); + var v = n < 0 ? n * max : n * max - 1; + return Math.max(-max, Math.min(max - 1, v)); + } + + /** + * @param {TypedArray} channel - Audio track frames to calculate peaks from. + * @param {Number} samplesPerPixel - Audio frames per peak + */ + function extractPeaks(channel, samplesPerPixel, bits) { + var chanLength = channel.length; + var numPeaks = Math.ceil(chanLength / samplesPerPixel); + var start = void 0; + var end = void 0; + var segment = void 0; + var max = void 0; + var min = void 0; + var extrema = void 0; + + // create interleaved array of min,max + var peaks = new self['Int' + bits + 'Array'](numPeaks * 2); + + for (var i = 0; i < numPeaks; i += 1) { + start = i * samplesPerPixel; + end = (i + 1) * samplesPerPixel > chanLength ? chanLength : (i + 1) * samplesPerPixel; + + segment = channel.subarray(start, end); + extrema = findMinMax(segment); + min = convert(extrema.min, bits); + max = convert(extrema.max, bits); + + peaks[i * 2] = min; + peaks[i * 2 + 1] = max; + } + + return peaks; + } + + /** + * @param {TypedArray} source - Source of audio samples for peak calculations. + * @param {Number} samplesPerPixel - Number of audio samples per peak. + * @param {Number} cueIn - index in channel to start peak calculations from. + * @param {Number} cueOut - index in channel to end peak calculations from (non-inclusive). + */ + function audioPeaks(source) { + var samplesPerPixel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10000; + var bits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 8; + + if ([8, 16, 32].indexOf(bits) < 0) { + throw new Error('Invalid number of bits specified for peaks.'); + } + + var peaks = []; + var start = 0; + var end = source.length; + peaks.push(extractPeaks(source.subarray(start, end), samplesPerPixel, bits)); + + var length = peaks[0].length / 2; + + return { + bits: bits, + length: length, + data: peaks + }; + } + + onmessage = function onmessage(e) { + var peaks = audioPeaks(e.data.samples, e.data.samplesPerPixel); + + postMessage(peaks); + }; + }; + + /***/ + }), + /* 92 */ + /***/ + (function(module, exports) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + exports.default = function() { + var recLength = 0; + var recBuffersL = []; + var recBuffersR = []; + var sampleRate = void 0; + + function init(config) { + sampleRate = config.sampleRate; + } + + function record(inputBuffer) { + recBuffersL.push(inputBuffer[0]); + recBuffersR.push(inputBuffer[1]); + recLength += inputBuffer[0].length; + } + + function writeString(view, offset, string) { + for (var i = 0; i < string.length; i += 1) { + view.setUint8(offset + i, string.charCodeAt(i)); + } + } + + function floatTo16BitPCM(output, offset, input) { + var writeOffset = offset; + for (var i = 0; i < input.length; i += 1, writeOffset += 2) { + var s = Math.max(-1, Math.min(1, input[i])); + output.setInt16(writeOffset, s < 0 ? s * 0x8000 : s * 0x7FFF, true); + } + } + + function encodeWAV(samples) { + var mono = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var buffer = new ArrayBuffer(44 + samples.length * 2); + var view = new DataView(buffer); + + /* RIFF identifier */ + writeString(view, 0, 'RIFF'); + /* file length */ + view.setUint32(4, 32 + samples.length * 2, true); + /* RIFF type */ + writeString(view, 8, 'WAVE'); + /* format chunk identifier */ + writeString(view, 12, 'fmt '); + /* format chunk length */ + view.setUint32(16, 16, true); + /* sample format (raw) */ + view.setUint16(20, 1, true); + /* channel count */ + view.setUint16(22, mono ? 1 : 2, true); + /* sample rate */ + view.setUint32(24, sampleRate, true); + /* byte rate (sample rate * block align) */ + view.setUint32(28, sampleRate * 4, true); + /* block align (channel count * bytes per sample) */ + view.setUint16(32, 4, true); + /* bits per sample */ + view.setUint16(34, 16, true); + /* data chunk identifier */ + writeString(view, 36, 'data'); + /* data chunk length */ + view.setUint32(40, samples.length * 2, true); + + floatTo16BitPCM(view, 44, samples); + + return view; + } + + function mergeBuffers(recBuffers, length) { + var result = new Float32Array(length); + var offset = 0; + + for (var i = 0; i < recBuffers.length; i += 1) { + result.set(recBuffers[i], offset); + offset += recBuffers[i].length; + } + return result; + } + + function interleave(inputL, inputR) { + var length = inputL.length + inputR.length; + var result = new Float32Array(length); + + var index = 0; + var inputIndex = 0; + + while (index < length) { + result[index += 1] = inputL[inputIndex]; + result[index += 1] = inputR[inputIndex]; + inputIndex += 1; + } + + return result; + } + + function exportWAV(type) { + var bufferL = mergeBuffers(recBuffersL, recLength); + var bufferR = mergeBuffers(recBuffersR, recLength); + var interleaved = interleave(bufferL, bufferR); + var dataview = encodeWAV(interleaved); + var audioBlob = new Blob([dataview], { type: type }); + + postMessage(audioBlob); + } + + function clear() { + recLength = 0; + recBuffersL = []; + recBuffersR = []; + } + + onmessage = function onmessage(e) { + switch (e.data.command) { + case 'init': + { + init(e.data.config); + break; + } + case 'record': + { + record(e.data.buffer); + break; + } + case 'exportWAV': + { + exportWAV(e.data.type); + break; + } + case 'clear': + { + clear(); + break; + } + default: + { + throw new Error('Unknown export worker command'); + } + } + }; + }; + + /***/ + }) + /******/ + ]); +//# sourceMappingURL=waveform-playlist.var.js.map \ No newline at end of file diff --git a/docs/source/_static/js/waveform-playlist.var.js.map b/docs/source/_static/js/waveform-playlist.var.js.map new file mode 100644 index 0000000..5b0b13e --- /dev/null +++ b/docs/source/_static/js/waveform-playlist.var.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap 9938ac60cb0a7bc0ddaa","webpack:///./src/app.js","webpack:///./~/lodash.assign/index.js","webpack:///./~/virtual-dom/create-element.js","webpack:///./~/virtual-dom/vdom/create-element.js","webpack:///./~/global/document.js","webpack:///min-document (ignored)","webpack:///./~/virtual-dom/vdom/apply-properties.js","webpack:///./~/is-object/index.js","webpack:///./~/virtual-dom/vnode/is-vhook.js","webpack:///./~/virtual-dom/vnode/is-vnode.js","webpack:///./~/virtual-dom/vnode/version.js","webpack:///./~/virtual-dom/vnode/is-vtext.js","webpack:///./~/virtual-dom/vnode/is-widget.js","webpack:///./~/virtual-dom/vnode/handle-thunk.js","webpack:///./~/virtual-dom/vnode/is-thunk.js","webpack:///./~/event-emitter/index.js","webpack:///./~/d/index.js","webpack:///./~/type/value/is.js","webpack:///./~/type/plain-function/is.js","webpack:///./~/type/function/is.js","webpack:///./~/type/prototype/is.js","webpack:///./~/type/object/is.js","webpack:///./~/es5-ext/object/assign/index.js","webpack:///./~/es5-ext/object/assign/is-implemented.js","webpack:///./~/es5-ext/object/assign/shim.js","webpack:///./~/es5-ext/object/keys/index.js","webpack:///./~/es5-ext/object/keys/is-implemented.js","webpack:///./~/es5-ext/object/keys/shim.js","webpack:///./~/es5-ext/object/is-value.js","webpack:///./~/es5-ext/function/noop.js","webpack:///./~/es5-ext/object/valid-value.js","webpack:///./~/es5-ext/object/normalize-options.js","webpack:///./~/es5-ext/string/#/contains/index.js","webpack:///./~/es5-ext/string/#/contains/is-implemented.js","webpack:///./~/es5-ext/string/#/contains/shim.js","webpack:///./~/es5-ext/object/valid-callable.js","webpack:///./src/Playlist.js","webpack:///./~/lodash.defaults/index.js","webpack:///./~/virtual-dom/h.js","webpack:///./~/virtual-dom/virtual-hyperscript/index.js","webpack:///./~/x-is-array/index.js","webpack:///./~/virtual-dom/vnode/vnode.js","webpack:///./~/virtual-dom/vnode/vtext.js","webpack:///./~/virtual-dom/virtual-hyperscript/parse-tag.js","webpack:///./~/browser-split/index.js","webpack:///./~/virtual-dom/virtual-hyperscript/hooks/soft-set-hook.js","webpack:///./~/virtual-dom/virtual-hyperscript/hooks/ev-hook.js","webpack:///./~/ev-store/index.js","webpack:///./~/individual/one-version.js","webpack:///./~/individual/index.js","webpack:///./~/virtual-dom/diff.js","webpack:///./~/virtual-dom/vtree/diff.js","webpack:///./~/virtual-dom/vnode/vpatch.js","webpack:///./~/virtual-dom/vtree/diff-props.js","webpack:///./~/virtual-dom/patch.js","webpack:///./~/virtual-dom/vdom/patch.js","webpack:///./~/virtual-dom/vdom/dom-index.js","webpack:///./~/virtual-dom/vdom/patch-op.js","webpack:///./~/virtual-dom/vdom/update-widget.js","webpack:///./~/inline-worker/index.js","webpack:///./src/utils/conversions.js","webpack:///./src/track/loader/LoaderFactory.js","webpack:///./src/track/loader/BlobLoader.js","webpack:///./src/track/loader/Loader.js","webpack:///./src/track/loader/XHRLoader.js","webpack:///./src/render/ScrollHook.js","webpack:///./src/TimeScale.js","webpack:///./src/render/TimeScaleHook.js","webpack:///./src/Track.js","webpack:///./~/lodash.forown/index.js","webpack:///./~/uuid/uuid.js","webpack:///./~/uuid/rng-browser.js","webpack:///./~/webaudio-peaks/index.js","webpack:///./~/fade-maker/index.js","webpack:///./~/fade-curves/index.js","webpack:///./src/track/states.js","webpack:///./src/track/states/CursorState.js","webpack:///./src/track/states/SelectState.js","webpack:///./src/track/states/ShiftState.js","webpack:///./src/track/states/FadeInState.js","webpack:///./src/track/states/FadeOutState.js","webpack:///./src/render/CanvasHook.js","webpack:///./src/render/FadeCanvasHook.js","webpack:///./src/render/VolumeSliderHook.js","webpack:///./src/Playout.js","webpack:///./src/annotation/AnnotationList.js","webpack:///./src/annotation/input/aeneas.js","webpack:///./src/annotation/output/aeneas.js","webpack:///./src/interaction/DragInteraction.js","webpack:///./src/annotation/render/ScrollTopHook.js","webpack:///./src/utils/timeformat.js","webpack:///./src/utils/recorderWorker.js","webpack:///./src/utils/exportWavWorker.js"],"names":["init","options","ee","container","undefined","Error","window","OfflineAudioContext","webkitOfflineAudioContext","AudioContext","webkitAudioContext","audioContext","defaults","ac","sampleRate","samplesPerPixel","mono","fadeType","exclSolo","timescale","controls","show","width","colors","waveOutlineColor","timeColor","fadeColor","seekStyle","waveHeight","state","zoomLevels","annotationList","annotations","editable","linkEndpoints","isContinuousPlay","isAutomaticScroll","config","zoomIndex","indexOf","playlist","Playlist","setSampleRate","setSamplesPerPixel","setAudioContext","setEventEmitter","setUpEventEmitter","setTimeSelection","setState","setControlOptions","setWaveHeight","setColors","setZoomLevels","setZoomIndex","setMono","setExclSolo","setShowTimeScale","setSeekStyle","setAnnotations","linkedEndpoints","tree","render","rootNode","appendChild","tracks","soloedTracks","mutedTracks","playoutPromises","cursor","playbackSeconds","duration","scrollLeft","scrollTimer","showTimescale","isScrolling","masterGain","durationFormat","resetDrawTimer","exportWorker","InlineWorker","ExportWavWorkerFunction","stream","mediaRecorder","MediaRecorder","onstart","track","Track","setName","setEnabledStates","recordingTrack","push","chunks","working","ondataavailable","e","data","recording","Blob","type","loader","LoaderFactory","createLoader","load","then","audioBuffer","recorderWorker","postMessage","samples","getChannelData","setCues","setBuffer","setPlayout","Playout","adjustDuration","catch","onstop","RecorderWorkerFunction","onmessage","setPeaks","drawRequest","style","controlOptions","height","AnnotationList","on","val","format","start","end","isPlaying","lastSeeked","pausedAt","restartPlayFrom","seek","emit","startOfflineRender","deltaTime","setStartTime","getStartTime","record","play","pause","stop","rewind","fastForward","clear","soloTrack","adjustTrackPlayout","muteTrack","volume","setGainLevel","forEach","setMasterGainLevel","setFadeIn","setFadeOut","panvalue","setStereoPanValue","file","src","name","getActiveTrack","timeSelection","getTimeSelection","trim","calculatePeaks","Math","max","zoom","setZoom","min","length","clearTimeout","setTimeout","trackList","loadPromises","map","trackInfo","Promise","all","audioBuffers","index","info","states","fadeIn","fadeOut","cueIn","cuein","cueOut","cueout","gain","muted","soloed","selection","selected","peaks","customClass","stereoPan","playout","setCustomClass","setWaveOutlineColor","shape","setActiveTrack","setPeakData","getState","concat","draw","activeTrack","isRendering","offlineAudioContext","currentTime","setOfflinePlayout","buffer","schedulePlay","shouldPlay","shouldTrackPlay","isOffline","startRendering","command","levels","splice","setShouldPlay","reduce","getEndTime","cursorPos","getElapsedTime","lastPlay","stopAnimation","editor","scheduleStop","bind","startTime","endTime","startAnimation","getCurrentTime","playbackReset","viewDuration","lastDraw","animationRequest","requestAnimationFrame","updateEditor","cancelAnimationFrame","getSeekStyle","elapsed","isSegmentSelection","newTree","patches","clientWidth","resolution","isActive","playlistLength","controlWidth","timeScale","TimeScale","trackElements","getTrackRenderData","isActiveTrack","attributes","onscroll","target","hook","ScrollHook","containerChildren","renderTimeScale","renderTrackSection","renderAnnotations","getTrackDetails","samplesToSeconds","secondsToSamples","samplesToPixels","pixelsToSamples","pixelsToSeconds","secondsToPixels","seconds","ceil","floor","pixels","BlobLoader","XHRLoader","resolve","reject","match","fr","FileReader","readAsArrayBuffer","addEventListener","decoderPromise","Loader","STATE_UNINITIALIZED","STATE_LOADING","STATE_DECODING","STATE_FINISHED","audioRequestState","percentComplete","setStateChange","lengthComputable","loaded","total","audioData","response","result","decodeAudioData","err","xhr","XMLHttpRequest","open","responseType","send","node","el","querySelector","rect","getBoundingClientRect","cursorRect","right","left","offset","marginLeft","timeinfo","marker","bigStep","smallStep","secondStep","keys","Object","parseInt","item","sort","a","b","i","widthX","pixPerSec","pixOffset","scaleInfo","getScaleInfo","canvasInfo","timeMarkers","counter","pixIndex","pix","formatTime","TimeScaleHook","milliseconds","s","m","tickInfo","canvas","prop","prev","ctx","getContext","clearRect","fillStyle","x","scaleHeight","scaleY","fillRect","MAX_CANVAS_WIDTH","fades","peakData","className","color","trackStart","trackEnd","offlinePlayout","enabledStates","defaultStatesEnabled","fadein","fadeout","select","shift","fade","removeFade","saveFade","FADEIN","FADEOUT","id","uuid","v4","StateClass","stateClasses","stateObj","bool","level","setVolumeGainLevel","value","now","when","segment","defaultOptions","playoutSystem","relPos","sourcePromise","setUpSource","fadeStart","fadeDuration","applyFadeIn","applyFadeOut","channelPixels","overlayClass","setup","events","getEvents","event","getClass","muteClass","soloClass","numChan","onclick","VolumeSliderHook","oninput","playbackX","startX","endX","progressWidth","scale","devicePixelRatio","waveformChildren","channels","channelNum","channelChildren","totalWidth","currentWidth","canvasColor","CanvasHook","bits","fadeWidth","FadeCanvasHook","renderOverlay","cStartX","cEndX","cWidth","cClassName","waveform","channelMargin","renderControls","audibleClass","preventDefault","offsetX","active","minX","maxX","emitSelection","complete","deltaX","prevX","emitShift","time","len","cc","h2","maxValue","minPeak","maxPeak","drawFrame","abs","curve","createCurve","y","strokeStyle","beginPath","moveTo","lineTo","stroke","reflection","SCURVE","LINEAR","EXPONENTIAL","LOGARITHMIC","volumeInput","setAttribute","destination","createStereoPanner","createPanner","fadeGain","applyFade","source","createBufferSource","onended","disconnect","volumeGain","shouldPlayGain","panner","createGain","connect","pan","panningModel","setPosition","resizeHandlers","setupInteractions","setupEE","leftShift","DragInteraction","direction","rightShift","annotationIndex","note","originalVal","export","output","dataStr","encodeURIComponent","JSON","stringify","document","createElement","body","href","download","click","removeChild","draggable","handler","that","ctrl","class","title","action","boxes","renderResizeLeft","renderResizeRight","boxesWrapper","text","ScrollTopHook","segmentClass","editableConfig","contenteditable","lines","innerText","onkeypress","which","keyCode","blur","linesConfig","aeneas","annotation","Number","begin","lang","language","String","toFixed","ondragover","emitDrag","clientX","removeEventListener","ev","dataTransfer","dropEffect","effectAllowed","setData","Hook","prototype","box","row","diff","top","list","scrollTop","clockFormat","decimals","hours","minutes","secs","sHours","sMinutes","sSeconds","formats","thousandths","hhmmss","hhmmssu","hhmmssuu","hhmmssuuu","findMinMax","array","Infinity","curr","convert","n","v","extractPeaks","channel","chanLength","numPeaks","extrema","self","subarray","audioPeaks","recLength","recBuffersL","recBuffersR","inputBuffer","writeString","view","string","setUint8","charCodeAt","floatTo16BitPCM","input","writeOffset","setInt16","encodeWAV","ArrayBuffer","DataView","setUint32","setUint16","mergeBuffers","recBuffers","Float32Array","set","interleave","inputL","inputR","inputIndex","exportWAV","bufferL","bufferR","interleaved","dataview","audioBlob"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;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ASoB,IAAT,GAAgBA,IAAhB;AACApB,YAASsB,QAAT,GAAoBA,QAApB;;AAEA,UAAOtB,QAAP;AACD,E;;;;;;ACrFD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,EAAE;AACb,YAAW,MAAM;AACjB,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,SAAS;AACpB,cAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kDAAiD,eAAe;;AAEhE;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,QAAQ;AACnB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,MAAM;AACjB,YAAW,OAAO,WAAW;AAC7B,YAAW,SAAS;AACpB,cAAa,OAAO;AACpB;AACA;AACA,yBAAwB;;AAExB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,EAAE;AACb,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,kBAAiB;AACjB,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA,8BAA6B,kBAAkB,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,UAAU;AACrB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,SAAS;AACtB,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC5nBA;;AAEA;;;;;;;ACFA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,oBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;AC7CA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,EAAC;AACD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;AChBA,gB;;;;;;ACAA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA,cAAa;AACb;AACA,cAAa;AACb;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;;;;;;AChGA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACNA;;AAEA;;AAEA;AACA;AACA;;;;;;;ACNA;;;;;;;ACAA;;AAEA;;AAEA;AACA;AACA;;;;;;;ACNA;;AAEA;AACA;AACA;;;;;;;ACJA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;ACvCA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAkB;;AAElB;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAa,4BAA4B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,OAAO;;AAEpB;AACA,cAAa,2BAA2B;AACxC;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA0B;;AAE1B;AACA;AACA;AACA;;;;;;;ACnIA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA,UAAS;AACT;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA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AAClB,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,MAAM;AACjB,YAAW,OAAO,WAAW;AAC7B,YAAW,SAAS;AACpB,cAAa,OAAO;AACpB;AACA;AACA,yBAAwB;;AAExB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,EAAE;AACb,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,kBAAiB;AACjB,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA,8BAA6B,kBAAkB,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,UAAU;AACrB,YAAW,SAAS;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa,SAAS,GAAG,SAAS,GAAG,SAAS;AAC9C,WAAU;AACV;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,UAAU;AACrB,cAAa,OAAO;AACpB;AACA;AACA;AACA,gBAAe,SAAS,GAAG,SAAS,GAAG,SAAS;AAChD,WAAU;AACV;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC3pBA;;AAEA;;;;;;;ACFA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA,MAAK;AACL,wBAAuB,cAAc;AACrC;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;;;;;;ACxIA;AACA;;AAEA;;AAEA;AACA;AACA;;;;;;;ACPA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAmB,WAAW;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;ACvEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;ACTA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,gBAAe,qBAAqB;AACpC;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,cAAc;AACzB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAqD;AACrD;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA,EAAC;;;;;;;ACzGD;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;AChBA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;AC1BA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;ACnBA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;ACrBA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;AClBA;;AAEA;;;;;;;ACFA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,kBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,UAAS;AACT;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAmB,SAAS;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,wBAAuB,SAAS;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA2B,SAAS;AACpC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qBAAoB,sBAAsB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,cAAa;AACb;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB,sBAAsB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA0C,2BAA2B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,2BAA2B;AACjE;AACA;AACA;AACA,mCAAkC,2BAA2B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAmB,YAAY;AAC/B;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;;AAEA;AACA,MAAK;AACL;AACA;AACA;;;;;;;AC1aA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;ACrBA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,cAAa;AACb;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;;;;;;;ACzDA;;AAEA;;;;;;;ACFA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wBAAuB,sBAAsB;AAC7C;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;AC/EA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,4BAA2B,0BAA0B;AACrD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;ACpFA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;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SAAS;AACpB,cAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,QAAQ;AACnB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,cAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,SAAS;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,QAAQ;AACnB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA,8BAA6B,kBAAkB,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,SAAS;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,EAAE;AACf;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACrfA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAoC,EAAE;AACtC,mBAAkB;AAClB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oCAAmC;AACnC;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAiB,OAAO;AACxB;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qBAAoB,SAAS;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACrLA;;AAEA,+CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB,QAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;AC9BA;;AAEA;AACA;AACA;AACA,WAAU,WAAW;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAU,OAAO;AACjB,WAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAU,WAAW;AACrB,WAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,a;AACA;AACA;;AAEA;AACA;;AAEA,gBAAe,cAAc;;AAE7B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,cAAc;AAC7B;AACA;;AAEA,oBAAmB,aAAa;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAU,uBAAuB;AACjC,WAAU,OAAO;AACjB,WAAU,OAAO;AACjB,WAAU,OAAO;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,G;;;;;;ACzJA;;AAEA;AACA;AACA,EAAC;AACD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC/FA;;AAEA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,YAAY;AAC3B;;AAEA;AACA;AACA,UAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,YAAY;AAC3B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,YAAY;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,YAAY;AAC3B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACzEA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;;;mBAEe;AACbjH,gCADa;AAEb6S,gCAFa;AAGbC,8BAHa;AAIbH,gCAJa;AAKbC;AALa,E;;;;;;;;;;;;;;ACNf;;;;;AAGE,mBAAY3R,KAAZ,EAAmB;AAAA;;AACjB,UAAKA,KAAL,GAAaA,KAAb;AACD;;;;2BAEKtE,e,EAAiBD,U,EAAY;AACjC,YAAKC,eAAL,GAAuBA,eAAvB;AACA,YAAKD,UAAL,GAAkBA,UAAlB;AACD;;;2BAEKgF,C,EAAG;AACPA,SAAEuV,cAAF;;AAEA,WAAMzB,SAAS9T,EAAEwV,OAAjB;AACA,WAAMhN,YAAY,kCAAgBsL,MAAhB,E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,MAAL;AAAa;AACXzN,gBAAK8F,EAAEC,IAAF,CAAO1D,MAAZ;AACA;AACD;AACD,YAAK,QAAL;AAAe;AACbsG,kBAAO7C,EAAEC,IAAF,CAAOoH,MAAd;AACA;AACD;AACD,YAAK,WAAL;AAAkB;AAChBmZ,qBAAUxgB,EAAEC,IAAF,CAAOG,IAAjB;AACA;AACD;AACD,YAAK,OAAL;AAAc;AACZ+C;AACA;AACD;AACD;AAAS;AACP,iBAAM,IAAI5I,KAAJ,CAAU,+BAAV,CAAN;AACD;AAnBH;AAqBD,IAtBD;AAuBD,E","file":"waveform-playlist.var.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/waveform-playlist/js/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9938ac60cb0a7bc0ddaa","import _assign from 'lodash.assign';\nimport createElement from 'virtual-dom/create-element';\nimport EventEmitter from 'event-emitter';\nimport Playlist from './Playlist';\n\n\nexport function init(options = {}, ee = EventEmitter()) {\n if (options.container === undefined) {\n throw new Error('DOM element container must be given.');\n }\n\n window.OfflineAudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;\n window.AudioContext = window.AudioContext || window.webkitAudioContext;\n\n const audioContext = new window.AudioContext();\n\n const defaults = {\n ac: audioContext,\n sampleRate: audioContext.sampleRate,\n samplesPerPixel: 4096,\n mono: true,\n fadeType: 'logarithmic',\n exclSolo: false,\n timescale: false,\n controls: {\n show: false,\n width: 150,\n },\n colors: {\n waveOutlineColor: 'white',\n timeColor: 'grey',\n fadeColor: 'black',\n },\n seekStyle: 'line',\n waveHeight: 128,\n state: 'cursor',\n zoomLevels: [512, 1024, 2048, 4096],\n annotationList: {\n annotations: [],\n controls: [],\n editable: false,\n linkEndpoints: false,\n isContinuousPlay: false,\n },\n isAutomaticScroll: false,\n };\n\n const config = _assign(defaults, options);\n const zoomIndex = config.zoomLevels.indexOf(config.samplesPerPixel);\n\n if (zoomIndex === -1) {\n throw new Error('initial samplesPerPixel must be included in array zoomLevels');\n }\n\n const playlist = new Playlist();\n playlist.setSampleRate(config.sampleRate);\n playlist.setSamplesPerPixel(config.samplesPerPixel);\n playlist.setAudioContext(config.ac);\n playlist.setEventEmitter(ee);\n playlist.setUpEventEmitter();\n playlist.setTimeSelection(0, 0);\n playlist.setState(config.state);\n playlist.setControlOptions(config.controls);\n playlist.setWaveHeight(config.waveHeight);\n playlist.setColors(config.colors);\n playlist.setZoomLevels(config.zoomLevels);\n playlist.setZoomIndex(zoomIndex);\n playlist.setMono(config.mono);\n playlist.setExclSolo(config.exclSolo);\n playlist.setShowTimeScale(config.timescale);\n playlist.setSeekStyle(config.seekStyle);\n playlist.setAnnotations(config.annotationList);\n playlist.isAutomaticScroll = config.isAutomaticScroll;\n playlist.isContinuousPlay = config.isContinuousPlay;\n playlist.linkedEndpoints = config.linkedEndpoints;\n\n // take care of initial virtual dom rendering.\n const tree = playlist.render();\n const rootNode = createElement(tree);\n\n config.container.appendChild(rootNode);\n playlist.tree = tree;\n playlist.rootNode = rootNode;\n\n return playlist;\n}\n\nexport default function (options = {}, ee = EventEmitter()) {\n return init(options, ee);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/app.js","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max;\n\n/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */\nvar nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = assign;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.assign/index.js\n// module id = 1\n// module chunks = 0","var createElement = require(\"./vdom/create-element.js\")\n\nmodule.exports = createElement\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/create-element.js\n// module id = 2\n// module chunks = 0","var document = require(\"global/document\")\n\nvar applyProperties = require(\"./apply-properties\")\n\nvar isVNode = require(\"../vnode/is-vnode.js\")\nvar isVText = require(\"../vnode/is-vtext.js\")\nvar isWidget = require(\"../vnode/is-widget.js\")\nvar handleThunk = require(\"../vnode/handle-thunk.js\")\n\nmodule.exports = createElement\n\nfunction createElement(vnode, opts) {\n var doc = opts ? opts.document || document : document\n var warn = opts ? opts.warn : null\n\n vnode = handleThunk(vnode).a\n\n if (isWidget(vnode)) {\n return vnode.init()\n } else if (isVText(vnode)) {\n return doc.createTextNode(vnode.text)\n } else if (!isVNode(vnode)) {\n if (warn) {\n warn(\"Item is not a valid virtual dom node\", vnode)\n }\n return null\n }\n\n var node = (vnode.namespace === null) ?\n doc.createElement(vnode.tagName) :\n doc.createElementNS(vnode.namespace, vnode.tagName)\n\n var props = vnode.properties\n applyProperties(node, props)\n\n var children = vnode.children\n\n for (var i = 0; i < children.length; i++) {\n var childNode = createElement(children[i], opts)\n if (childNode) {\n node.appendChild(childNode)\n }\n }\n\n return node\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vdom/create-element.js\n// module id = 3\n// module chunks = 0","var topLevel = typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n doccy = document;\n} else {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n}\n\nmodule.exports = doccy;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/global/document.js\n// module id = 4\n// module chunks = 0","/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// min-document (ignored)\n// module id = 5\n// module chunks = 0","var isObject = require(\"is-object\")\nvar isHook = require(\"../vnode/is-vhook.js\")\n\nmodule.exports = applyProperties\n\nfunction applyProperties(node, props, previous) {\n for (var propName in props) {\n var propValue = props[propName]\n\n if (propValue === undefined) {\n removeProperty(node, propName, propValue, previous);\n } else if (isHook(propValue)) {\n removeProperty(node, propName, propValue, previous)\n if (propValue.hook) {\n propValue.hook(node,\n propName,\n previous ? previous[propName] : undefined)\n }\n } else {\n if (isObject(propValue)) {\n patchObject(node, props, previous, propName, propValue);\n } else {\n node[propName] = propValue\n }\n }\n }\n}\n\nfunction removeProperty(node, propName, propValue, previous) {\n if (previous) {\n var previousValue = previous[propName]\n\n if (!isHook(previousValue)) {\n if (propName === \"attributes\") {\n for (var attrName in previousValue) {\n node.removeAttribute(attrName)\n }\n } else if (propName === \"style\") {\n for (var i in previousValue) {\n node.style[i] = \"\"\n }\n } else if (typeof previousValue === \"string\") {\n node[propName] = \"\"\n } else {\n node[propName] = null\n }\n } else if (previousValue.unhook) {\n previousValue.unhook(node, propName, propValue)\n }\n }\n}\n\nfunction patchObject(node, props, previous, propName, propValue) {\n var previousValue = previous ? previous[propName] : undefined\n\n // Set attributes\n if (propName === \"attributes\") {\n for (var attrName in propValue) {\n var attrValue = propValue[attrName]\n\n if (attrValue === undefined) {\n node.removeAttribute(attrName)\n } else {\n node.setAttribute(attrName, attrValue)\n }\n }\n\n return\n }\n\n if(previousValue && isObject(previousValue) &&\n getPrototype(previousValue) !== getPrototype(propValue)) {\n node[propName] = propValue\n return\n }\n\n if (!isObject(node[propName])) {\n node[propName] = {}\n }\n\n var replacer = propName === \"style\" ? \"\" : undefined\n\n for (var k in propValue) {\n var value = propValue[k]\n node[propName][k] = (value === undefined) ? replacer : value\n }\n}\n\nfunction getPrototype(value) {\n if (Object.getPrototypeOf) {\n return Object.getPrototypeOf(value)\n } else if (value.__proto__) {\n return value.__proto__\n } else if (value.constructor) {\n return value.constructor.prototype\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vdom/apply-properties.js\n// module id = 6\n// module chunks = 0","\"use strict\";\n\nmodule.exports = function isObject(x) {\n\treturn typeof x === \"object\" && x !== null;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/is-object/index.js\n// module id = 7\n// module chunks = 0","module.exports = isHook\n\nfunction isHook(hook) {\n return hook &&\n (typeof hook.hook === \"function\" && !hook.hasOwnProperty(\"hook\") ||\n typeof hook.unhook === \"function\" && !hook.hasOwnProperty(\"unhook\"))\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/is-vhook.js\n// module id = 8\n// module chunks = 0","var version = require(\"./version\")\n\nmodule.exports = isVirtualNode\n\nfunction isVirtualNode(x) {\n return x && x.type === \"VirtualNode\" && x.version === version\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/is-vnode.js\n// module id = 9\n// module chunks = 0","module.exports = \"2\"\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/version.js\n// module id = 10\n// module chunks = 0","var version = require(\"./version\")\n\nmodule.exports = isVirtualText\n\nfunction isVirtualText(x) {\n return x && x.type === \"VirtualText\" && x.version === version\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/is-vtext.js\n// module id = 11\n// module chunks = 0","module.exports = isWidget\n\nfunction isWidget(w) {\n return w && w.type === \"Widget\"\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/is-widget.js\n// module id = 12\n// module chunks = 0","var isVNode = require(\"./is-vnode\")\nvar isVText = require(\"./is-vtext\")\nvar isWidget = require(\"./is-widget\")\nvar isThunk = require(\"./is-thunk\")\n\nmodule.exports = handleThunk\n\nfunction handleThunk(a, b) {\n var renderedA = a\n var renderedB = b\n\n if (isThunk(b)) {\n renderedB = renderThunk(b, a)\n }\n\n if (isThunk(a)) {\n renderedA = renderThunk(a, null)\n }\n\n return {\n a: renderedA,\n b: renderedB\n }\n}\n\nfunction renderThunk(thunk, previous) {\n var renderedThunk = thunk.vnode\n\n if (!renderedThunk) {\n renderedThunk = thunk.vnode = thunk.render(previous)\n }\n\n if (!(isVNode(renderedThunk) ||\n isVText(renderedThunk) ||\n isWidget(renderedThunk))) {\n throw new Error(\"thunk did not return a valid node\");\n }\n\n return renderedThunk\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/handle-thunk.js\n// module id = 13\n// module chunks = 0","module.exports = isThunk\r\n\r\nfunction isThunk(t) {\r\n return t && t.type === \"Thunk\"\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/is-thunk.js\n// module id = 14\n// module chunks = 0","'use strict';\n\nvar d = require('d')\n , callable = require('es5-ext/object/valid-callable')\n\n , apply = Function.prototype.apply, call = Function.prototype.call\n , create = Object.create, defineProperty = Object.defineProperty\n , defineProperties = Object.defineProperties\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , descriptor = { configurable: true, enumerable: false, writable: true }\n\n , on, once, off, emit, methods, descriptors, base;\n\non = function (type, listener) {\n\tvar data;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) {\n\t\tdata = descriptor.value = create(null);\n\t\tdefineProperty(this, '__ee__', descriptor);\n\t\tdescriptor.value = null;\n\t} else {\n\t\tdata = this.__ee__;\n\t}\n\tif (!data[type]) data[type] = listener;\n\telse if (typeof data[type] === 'object') data[type].push(listener);\n\telse data[type] = [data[type], listener];\n\n\treturn this;\n};\n\nonce = function (type, listener) {\n\tvar once, self;\n\n\tcallable(listener);\n\tself = this;\n\ton.call(this, type, once = function () {\n\t\toff.call(self, type, once);\n\t\tapply.call(listener, this, arguments);\n\t});\n\n\tonce.__eeOnceListener__ = listener;\n\treturn this;\n};\n\noff = function (type, listener) {\n\tvar data, listeners, candidate, i;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return this;\n\tdata = this.__ee__;\n\tif (!data[type]) return this;\n\tlisteners = data[type];\n\n\tif (typeof listeners === 'object') {\n\t\tfor (i = 0; (candidate = listeners[i]); ++i) {\n\t\t\tif ((candidate === listener) ||\n\t\t\t\t\t(candidate.__eeOnceListener__ === listener)) {\n\t\t\t\tif (listeners.length === 2) data[type] = listeners[i ? 0 : 1];\n\t\t\t\telse listeners.splice(i, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ((listeners === listener) ||\n\t\t\t\t(listeners.__eeOnceListener__ === listener)) {\n\t\t\tdelete data[type];\n\t\t}\n\t}\n\n\treturn this;\n};\n\nemit = function (type) {\n\tvar i, l, listener, listeners, args;\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return;\n\tlisteners = this.__ee__[type];\n\tif (!listeners) return;\n\n\tif (typeof listeners === 'object') {\n\t\tl = arguments.length;\n\t\targs = new Array(l - 1);\n\t\tfor (i = 1; i < l; ++i) args[i - 1] = arguments[i];\n\n\t\tlisteners = listeners.slice();\n\t\tfor (i = 0; (listener = listeners[i]); ++i) {\n\t\t\tapply.call(listener, this, args);\n\t\t}\n\t} else {\n\t\tswitch (arguments.length) {\n\t\tcase 1:\n\t\t\tcall.call(listeners, this);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcall.call(listeners, this, arguments[1]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcall.call(listeners, this, arguments[1], arguments[2]);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tl = arguments.length;\n\t\t\targs = new Array(l - 1);\n\t\t\tfor (i = 1; i < l; ++i) {\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\t}\n\t\t\tapply.call(listeners, this, args);\n\t\t}\n\t}\n};\n\nmethods = {\n\ton: on,\n\tonce: once,\n\toff: off,\n\temit: emit\n};\n\ndescriptors = {\n\ton: d(on),\n\tonce: d(once),\n\toff: d(off),\n\temit: d(emit)\n};\n\nbase = defineProperties({}, descriptors);\n\nmodule.exports = exports = function (o) {\n\treturn (o == null) ? create(base) : defineProperties(Object(o), descriptors);\n};\nexports.methods = methods;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/event-emitter/index.js\n// module id = 15\n// module chunks = 0","\"use strict\";\n\nvar isValue = require(\"type/value/is\")\n , isPlainFunction = require(\"type/plain-function/is\")\n , assign = require(\"es5-ext/object/assign\")\n , normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , contains = require(\"es5-ext/string/#/contains\");\n\nvar d = (module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif (arguments.length < 2 || typeof dscr !== \"string\") {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t\tw = contains.call(dscr, \"w\");\n\t} else {\n\t\tc = w = true;\n\t\te = false;\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n});\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== \"string\") {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (!isValue(get)) {\n\t\tget = undefined;\n\t} else if (!isPlainFunction(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (!isValue(set)) {\n\t\tset = undefined;\n\t} else if (!isPlainFunction(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t} else {\n\t\tc = true;\n\t\te = false;\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/d/index.js\n// module id = 16\n// module chunks = 0","\"use strict\";\n\n// ES3 safe\nvar _undefined = void 0;\n\nmodule.exports = function (value) { return value !== _undefined && value !== null; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/type/value/is.js\n// module id = 17\n// module chunks = 0","\"use strict\";\n\nvar isFunction = require(\"../function/is\");\n\nvar classRe = /^\\s*class[\\s{/}]/, functionToString = Function.prototype.toString;\n\nmodule.exports = function (value) {\n\tif (!isFunction(value)) return false;\n\tif (classRe.test(functionToString.call(value))) return false;\n\treturn true;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/type/plain-function/is.js\n// module id = 18\n// module chunks = 0","\"use strict\";\n\nvar isPrototype = require(\"../prototype/is\");\n\nmodule.exports = function (value) {\n\tif (typeof value !== \"function\") return false;\n\n\tif (!hasOwnProperty.call(value, \"length\")) return false;\n\n\ttry {\n\t\tif (typeof value.length !== \"number\") return false;\n\t\tif (typeof value.call !== \"function\") return false;\n\t\tif (typeof value.apply !== \"function\") return false;\n\t} catch (error) {\n\t\treturn false;\n\t}\n\n\treturn !isPrototype(value);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/type/function/is.js\n// module id = 19\n// module chunks = 0","\"use strict\";\n\nvar isObject = require(\"../object/is\");\n\nmodule.exports = function (value) {\n\tif (!isObject(value)) return false;\n\ttry {\n\t\tif (!value.constructor) return false;\n\t\treturn value.constructor.prototype === value;\n\t} catch (error) {\n\t\treturn false;\n\t}\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/type/prototype/is.js\n// module id = 20\n// module chunks = 0","\"use strict\";\n\nvar isValue = require(\"../value/is\");\n\n// prettier-ignore\nvar possibleTypes = { \"object\": true, \"function\": true, \"undefined\": true /* document.all */ };\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\treturn hasOwnProperty.call(possibleTypes, typeof value);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/type/object/is.js\n// module id = 21\n// module chunks = 0","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.assign : require(\"./shim\");\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/assign/index.js\n// module id = 22\n// module chunks = 0","\"use strict\";\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn obj.foo + obj.bar + obj.trzy === \"razdwatrzy\";\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/assign/is-implemented.js\n// module id = 23\n// module chunks = 0","\"use strict\";\n\nvar keys = require(\"../keys\")\n , value = require(\"../valid-value\")\n , max = Math.max;\n\nmodule.exports = function (dest, src/*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/assign/shim.js\n// module id = 24\n// module chunks = 0","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.keys : require(\"./shim\");\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/keys/index.js\n// module id = 25\n// module chunks = 0","\"use strict\";\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/keys/is-implemented.js\n// module id = 26\n// module chunks = 0","\"use strict\";\n\nvar isValue = require(\"../is-value\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/keys/shim.js\n// module id = 27\n// module chunks = 0","\"use strict\";\n\nvar _undefined = require(\"../function/noop\")(); // Support ES3 engines\n\nmodule.exports = function (val) { return val !== _undefined && val !== null; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/is-value.js\n// module id = 28\n// module chunks = 0","\"use strict\";\n\n// eslint-disable-next-line no-empty-function\nmodule.exports = function () {};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/function/noop.js\n// module id = 29\n// module chunks = 0","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/valid-value.js\n// module id = 30\n// module chunks = 0","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1/*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/normalize-options.js\n// module id = 31\n// module chunks = 0","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? String.prototype.contains : require(\"./shim\");\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/string/#/contains/index.js\n// module id = 32\n// module chunks = 0","\"use strict\";\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn str.contains(\"dwa\") === true && str.contains(\"foo\") === false;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/string/#/contains/is-implemented.js\n// module id = 33\n// module chunks = 0","\"use strict\";\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString/*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/string/#/contains/shim.js\n// module id = 34\n// module chunks = 0","\"use strict\";\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/es5-ext/object/valid-callable.js\n// module id = 35\n// module chunks = 0","import _defaults from 'lodash.defaults';\n\nimport h from 'virtual-dom/h';\nimport diff from 'virtual-dom/diff';\nimport patch from 'virtual-dom/patch';\nimport InlineWorker from 'inline-worker';\n\nimport { pixelsToSeconds } from './utils/conversions';\nimport LoaderFactory from './track/loader/LoaderFactory';\nimport ScrollHook from './render/ScrollHook';\nimport TimeScale from './TimeScale';\nimport Track from './Track';\nimport Playout from './Playout';\nimport AnnotationList from './annotation/AnnotationList';\n\nimport RecorderWorkerFunction from './utils/recorderWorker';\nimport ExportWavWorkerFunction from './utils/exportWavWorker';\n\nexport default class {\n constructor() {\n this.tracks = [];\n this.soloedTracks = [];\n this.mutedTracks = [];\n this.playoutPromises = [];\n\n this.cursor = 0;\n this.playbackSeconds = 0;\n this.duration = 0;\n this.scrollLeft = 0;\n this.scrollTimer = undefined;\n this.showTimescale = false;\n // whether a user is scrolling the waveform\n this.isScrolling = false;\n\n this.fadeType = 'logarithmic';\n this.masterGain = 1;\n this.annotations = [];\n this.durationFormat = 'hh:mm:ss.uuu';\n this.isAutomaticScroll = false;\n this.resetDrawTimer = undefined;\n }\n\n // TODO extract into a plugin\n initExporter() {\n this.exportWorker = new InlineWorker(ExportWavWorkerFunction);\n }\n\n // TODO extract into a plugin\n initRecorder(stream) {\n this.mediaRecorder = new window.MediaRecorder(stream);\n\n this.mediaRecorder.onstart = () => {\n const track = new Track();\n track.setName('Recording');\n track.setEnabledStates();\n track.setEventEmitter(this.ee);\n\n this.recordingTrack = track;\n this.tracks.push(track);\n\n this.chunks = [];\n this.working = false;\n };\n\n this.mediaRecorder.ondataavailable = (e) => {\n this.chunks.push(e.data);\n\n // throttle peaks calculation\n if (!this.working) {\n const recording = new Blob(this.chunks, { type: 'audio/ogg; codecs=opus' });\n const loader = LoaderFactory.createLoader(recording, this.ac);\n loader.load().then((audioBuffer) => {\n // ask web worker for peaks.\n this.recorderWorker.postMessage({\n samples: audioBuffer.getChannelData(0),\n samplesPerPixel: this.samplesPerPixel,\n });\n this.recordingTrack.setCues(0, audioBuffer.duration);\n this.recordingTrack.setBuffer(audioBuffer);\n this.recordingTrack.setPlayout(new Playout(this.ac, audioBuffer));\n this.adjustDuration();\n }).catch(() => {\n this.working = false;\n });\n this.working = true;\n }\n };\n\n this.mediaRecorder.onstop = () => {\n this.chunks = [];\n this.working = false;\n };\n\n this.recorderWorker = new InlineWorker(RecorderWorkerFunction);\n // use a worker for calculating recording peaks.\n this.recorderWorker.onmessage = (e) => {\n this.recordingTrack.setPeaks(e.data);\n this.working = false;\n this.drawRequest();\n };\n }\n\n setShowTimeScale(show) {\n this.showTimescale = show;\n }\n\n setMono(mono) {\n this.mono = mono;\n }\n\n setExclSolo(exclSolo) {\n this.exclSolo = exclSolo;\n }\n\n setSeekStyle(style) {\n this.seekStyle = style;\n }\n\n getSeekStyle() {\n return this.seekStyle;\n }\n\n setSampleRate(sampleRate) {\n this.sampleRate = sampleRate;\n }\n\n setSamplesPerPixel(samplesPerPixel) {\n this.samplesPerPixel = samplesPerPixel;\n }\n\n setAudioContext(ac) {\n this.ac = ac;\n }\n\n setControlOptions(controlOptions) {\n this.controls = controlOptions;\n }\n\n setWaveHeight(height) {\n this.waveHeight = height;\n }\n\n setColors(colors) {\n this.colors = colors;\n }\n\n setAnnotations(config) {\n this.annotationList = new AnnotationList(\n this,\n config.annotations,\n config.controls,\n config.editable,\n config.linkEndpoints,\n config.isContinuousPlay,\n );\n }\n\n setEventEmitter(ee) {\n this.ee = ee;\n }\n\n getEventEmitter() {\n return this.ee;\n }\n\n setUpEventEmitter() {\n const ee = this.ee;\n\n ee.on('automaticscroll', (val) => {\n this.isAutomaticScroll = val;\n });\n\n ee.on('durationformat', (format) => {\n this.durationFormat = format;\n this.drawRequest();\n });\n\n ee.on('select', (start, end, track) => {\n if (this.isPlaying()) {\n this.lastSeeked = start;\n this.pausedAt = undefined;\n this.restartPlayFrom(start);\n } else {\n // reset if it was paused.\n this.seek(start, end, track);\n this.ee.emit('timeupdate', start);\n this.drawRequest();\n }\n });\n\n ee.on('startaudiorendering', (type) => {\n this.startOfflineRender(type);\n });\n\n ee.on('statechange', (state) => {\n this.setState(state);\n this.drawRequest();\n });\n\n ee.on('shift', (deltaTime, track) => {\n track.setStartTime(track.getStartTime() + deltaTime);\n this.adjustDuration();\n this.drawRequest();\n });\n\n ee.on('record', () => {\n this.record();\n });\n\n ee.on('play', (start, end) => {\n this.play(start, end);\n });\n\n ee.on('pause', () => {\n this.pause();\n });\n\n ee.on('stop', () => {\n this.stop();\n });\n\n ee.on('rewind', () => {\n this.rewind();\n });\n\n ee.on('fastforward', () => {\n this.fastForward();\n });\n\n ee.on('clear', () => {\n this.clear().then(() => {\n this.drawRequest();\n });\n });\n\n ee.on('solo', (track) => {\n this.soloTrack(track);\n this.adjustTrackPlayout();\n this.drawRequest();\n });\n\n ee.on('mute', (track) => {\n this.muteTrack(track);\n this.adjustTrackPlayout();\n this.drawRequest();\n });\n\n ee.on('volumechange', (volume, track) => {\n track.setGainLevel(volume / 100);\n });\n\n ee.on('mastervolumechange', (volume) => {\n this.masterGain = volume / 100;\n this.tracks.forEach((track) => {\n track.setMasterGainLevel(this.masterGain);\n });\n });\n\n ee.on('fadein', (duration, track) => {\n track.setFadeIn(duration, this.fadeType);\n this.drawRequest();\n });\n\n ee.on('fadeout', (duration, track) => {\n track.setFadeOut(duration, this.fadeType);\n this.drawRequest();\n });\n\n ee.on('stereopan', (panvalue, track) => {\n track.setStereoPanValue(panvalue);\n });\n\n ee.on('fadetype', (type) => {\n this.fadeType = type;\n });\n\n ee.on('newtrack', (file) => {\n this.load([{\n src: file,\n name: file.name,\n }]);\n });\n\n ee.on('trim', () => {\n const track = this.getActiveTrack();\n const timeSelection = this.getTimeSelection();\n\n track.trim(timeSelection.start, timeSelection.end);\n track.calculatePeaks(this.samplesPerPixel, this.sampleRate);\n\n this.setTimeSelection(0, 0);\n this.drawRequest();\n });\n\n ee.on('zoomin', () => {\n const zoomIndex = Math.max(0, this.zoomIndex - 1);\n const zoom = this.zoomLevels[zoomIndex];\n\n if (zoom !== this.samplesPerPixel) {\n this.setZoom(zoom);\n this.drawRequest();\n }\n });\n\n ee.on('zoomout', () => {\n const zoomIndex = Math.min(this.zoomLevels.length - 1, this.zoomIndex + 1);\n const zoom = this.zoomLevels[zoomIndex];\n\n if (zoom !== this.samplesPerPixel) {\n this.setZoom(zoom);\n this.drawRequest();\n }\n });\n\n ee.on('scroll', () => {\n this.isScrolling = true;\n this.drawRequest();\n clearTimeout(this.scrollTimer);\n this.scrollTimer = setTimeout(() => {\n this.isScrolling = false;\n }, 200);\n });\n }\n\n load(trackList) {\n const loadPromises = trackList.map((trackInfo) => {\n const loader = LoaderFactory.createLoader(trackInfo.src, this.ac, this.ee);\n return loader.load();\n });\n\n return Promise.all(loadPromises).then((audioBuffers) => {\n this.ee.emit('audiosourcesloaded');\n\n const tracks = audioBuffers.map((audioBuffer, index) => {\n const info = trackList[index];\n const name = info.name || 'Untitled';\n const start = info.start || 0;\n const states = info.states || {};\n const fadeIn = info.fadeIn;\n const fadeOut = info.fadeOut;\n const cueIn = info.cuein || 0;\n const cueOut = info.cueout || audioBuffer.duration;\n const gain = info.gain || 1;\n const muted = info.muted || false;\n const soloed = info.soloed || false;\n const selection = info.selected;\n const peaks = info.peaks || { type: 'WebAudio', mono: this.mono };\n const customClass = info.customClass || undefined;\n const waveOutlineColor = info.waveOutlineColor || undefined;\n const stereoPan = info.stereoPan || 0;\n\n // webaudio specific playout for now.\n const playout = new Playout(this.ac, audioBuffer);\n\n const track = new Track();\n track.src = info.src;\n track.setBuffer(audioBuffer);\n track.setName(name);\n track.setEventEmitter(this.ee);\n track.setEnabledStates(states);\n track.setCues(cueIn, cueOut);\n track.setCustomClass(customClass);\n track.setWaveOutlineColor(waveOutlineColor);\n\n if (fadeIn !== undefined) {\n track.setFadeIn(fadeIn.duration, fadeIn.shape);\n }\n\n if (fadeOut !== undefined) {\n track.setFadeOut(fadeOut.duration, fadeOut.shape);\n }\n\n if (selection !== undefined) {\n this.setActiveTrack(track);\n this.setTimeSelection(selection.start, selection.end);\n }\n\n if (peaks !== undefined) {\n track.setPeakData(peaks);\n }\n\n track.setState(this.getState());\n track.setStartTime(start);\n track.setPlayout(playout);\n\n track.setGainLevel(gain);\n track.setStereoPanValue(stereoPan);\n\n if (muted) {\n this.muteTrack(track);\n }\n\n if (soloed) {\n this.soloTrack(track);\n }\n\n // extract peaks with AudioContext for now.\n track.calculatePeaks(this.samplesPerPixel, this.sampleRate);\n\n return track;\n });\n\n this.tracks = this.tracks.concat(tracks);\n this.adjustDuration();\n this.draw(this.render());\n\n this.ee.emit('audiosourcesrendered');\n }).catch((e) => {\n this.ee.emit('audiosourceserror', e);\n });\n }\n\n /*\n track instance of Track.\n */\n setActiveTrack(track) {\n this.activeTrack = track;\n }\n\n getActiveTrack() {\n return this.activeTrack;\n }\n\n isSegmentSelection() {\n return this.timeSelection.start !== this.timeSelection.end;\n }\n\n /*\n start, end in seconds.\n */\n setTimeSelection(start = 0, end) {\n this.timeSelection = {\n start,\n end: (end === undefined) ? start : end,\n };\n\n this.cursor = start;\n }\n\n startOfflineRender(type) {\n if (this.isRendering) {\n return;\n }\n\n this.isRendering = true;\n this.offlineAudioContext = new OfflineAudioContext(2, 44100 * this.duration, 44100);\n\n const currentTime = this.offlineAudioContext.currentTime;\n\n this.tracks.forEach((track) => {\n track.setOfflinePlayout(new Playout(this.offlineAudioContext, track.buffer));\n track.schedulePlay(currentTime, 0, 0, {\n shouldPlay: this.shouldTrackPlay(track),\n masterGain: 1,\n isOffline: true,\n });\n });\n\n /*\n TODO cleanup of different audio playouts handling.\n */\n this.offlineAudioContext.startRendering().then((audioBuffer) => {\n if (type === 'buffer') {\n this.ee.emit('audiorenderingfinished', type, audioBuffer);\n this.isRendering = false;\n return;\n }\n\n if (type === 'wav') {\n this.exportWorker.postMessage({\n command: 'init',\n config: {\n sampleRate: 44100,\n },\n });\n\n // callback for `exportWAV`\n this.exportWorker.onmessage = (e) => {\n this.ee.emit('audiorenderingfinished', type, e.data);\n this.isRendering = false;\n\n // clear out the buffer for next renderings.\n this.exportWorker.postMessage({\n command: 'clear',\n });\n };\n\n // send the channel data from our buffer to the worker\n this.exportWorker.postMessage({\n command: 'record',\n buffer: [\n audioBuffer.getChannelData(0),\n audioBuffer.getChannelData(1),\n ],\n });\n\n // ask the worker for a WAV\n this.exportWorker.postMessage({\n command: 'exportWAV',\n type: 'audio/wav',\n });\n }\n }).catch((e) => {\n throw e;\n });\n }\n\n getTimeSelection() {\n return this.timeSelection;\n }\n\n setState(state) {\n this.state = state;\n\n this.tracks.forEach((track) => {\n track.setState(state);\n });\n }\n\n getState() {\n return this.state;\n }\n\n setZoomIndex(index) {\n this.zoomIndex = index;\n }\n\n setZoomLevels(levels) {\n this.zoomLevels = levels;\n }\n\n setZoom(zoom) {\n this.samplesPerPixel = zoom;\n this.zoomIndex = this.zoomLevels.indexOf(zoom);\n this.tracks.forEach((track) => {\n track.calculatePeaks(zoom, this.sampleRate);\n });\n }\n\n muteTrack(track) {\n const index = this.mutedTracks.indexOf(track);\n\n if (index > -1) {\n this.mutedTracks.splice(index, 1);\n } else {\n this.mutedTracks.push(track);\n }\n }\n\n soloTrack(track) {\n const index = this.soloedTracks.indexOf(track);\n\n if (index > -1) {\n this.soloedTracks.splice(index, 1);\n } else if (this.exclSolo) {\n this.soloedTracks = [track];\n } else {\n this.soloedTracks.push(track);\n }\n }\n\n adjustTrackPlayout() {\n this.tracks.forEach((track) => {\n track.setShouldPlay(this.shouldTrackPlay(track));\n });\n }\n\n adjustDuration() {\n this.duration = this.tracks.reduce(\n (duration, track) => Math.max(duration, track.getEndTime()),\n 0,\n );\n }\n\n shouldTrackPlay(track) {\n let shouldPlay;\n // if there are solo tracks, only they should play.\n if (this.soloedTracks.length > 0) {\n shouldPlay = false;\n if (this.soloedTracks.indexOf(track) > -1) {\n shouldPlay = true;\n }\n } else {\n // play all tracks except any muted tracks.\n shouldPlay = true;\n if (this.mutedTracks.indexOf(track) > -1) {\n shouldPlay = false;\n }\n }\n\n return shouldPlay;\n }\n\n isPlaying() {\n return this.tracks.reduce(\n (isPlaying, track) => isPlaying || track.isPlaying(),\n false,\n );\n }\n\n /*\n * returns the current point of time in the playlist in seconds.\n */\n getCurrentTime() {\n const cursorPos = this.lastSeeked || this.pausedAt || this.cursor;\n\n return cursorPos + this.getElapsedTime();\n }\n\n getElapsedTime() {\n return this.ac.currentTime - this.lastPlay;\n }\n\n setMasterGain(gain) {\n this.ee.emit('mastervolumechange', gain);\n }\n\n restartPlayFrom(start, end) {\n this.stopAnimation();\n\n this.tracks.forEach((editor) => {\n editor.scheduleStop();\n });\n\n return Promise.all(this.playoutPromises).then(this.play.bind(this, start, end));\n }\n\n play(startTime, endTime) {\n clearTimeout(this.resetDrawTimer);\n\n const currentTime = this.ac.currentTime;\n const selected = this.getTimeSelection();\n const playoutPromises = [];\n\n const start = startTime || this.pausedAt || this.cursor;\n let end = endTime;\n\n if (!end && selected.end !== selected.start && selected.end > start) {\n end = selected.end;\n }\n\n if (this.isPlaying()) {\n return this.restartPlayFrom(start, end);\n }\n\n this.tracks.forEach((track) => {\n track.setState('cursor');\n playoutPromises.push(track.schedulePlay(currentTime, start, end, {\n shouldPlay: this.shouldTrackPlay(track),\n masterGain: this.masterGain,\n }));\n });\n\n this.lastPlay = currentTime;\n // use these to track when the playlist has fully stopped.\n this.playoutPromises = playoutPromises;\n this.startAnimation(start);\n\n return Promise.all(this.playoutPromises);\n }\n\n pause() {\n if (!this.isPlaying()) {\n return Promise.all(this.playoutPromises);\n }\n\n this.pausedAt = this.getCurrentTime();\n return this.playbackReset();\n }\n\n stop() {\n if (this.mediaRecorder && this.mediaRecorder.state === 'recording') {\n this.mediaRecorder.stop();\n }\n\n this.pausedAt = undefined;\n this.playbackSeconds = 0;\n return this.playbackReset();\n }\n\n playbackReset() {\n this.lastSeeked = undefined;\n this.stopAnimation();\n\n this.tracks.forEach((track) => {\n track.scheduleStop();\n track.setState(this.getState());\n });\n\n this.drawRequest();\n return Promise.all(this.playoutPromises);\n }\n\n rewind() {\n return this.stop().then(() => {\n this.scrollLeft = 0;\n this.ee.emit('select', 0, 0);\n });\n }\n\n fastForward() {\n return this.stop().then(() => {\n if (this.viewDuration < this.duration) {\n this.scrollLeft = this.duration - this.viewDuration;\n } else {\n this.scrollLeft = 0;\n }\n\n this.ee.emit('select', this.duration, this.duration);\n });\n }\n\n clear() {\n return this.stop().then(() => {\n this.tracks = [];\n this.soloedTracks = [];\n this.mutedTracks = [];\n this.playoutPromises = [];\n\n this.cursor = 0;\n this.playbackSeconds = 0;\n this.duration = 0;\n this.scrollLeft = 0;\n\n this.seek(0, 0, undefined);\n });\n }\n\n record() {\n const playoutPromises = [];\n this.mediaRecorder.start(300);\n\n this.tracks.forEach((track) => {\n track.setState('none');\n playoutPromises.push(track.schedulePlay(this.ac.currentTime, 0, undefined, {\n shouldPlay: this.shouldTrackPlay(track),\n }));\n });\n\n this.playoutPromises = playoutPromises;\n }\n\n startAnimation(startTime) {\n this.lastDraw = this.ac.currentTime;\n this.animationRequest = window.requestAnimationFrame(() => {\n this.updateEditor(startTime);\n });\n }\n\n stopAnimation() {\n window.cancelAnimationFrame(this.animationRequest);\n this.lastDraw = undefined;\n }\n\n seek(start, end, track) {\n if (this.isPlaying()) {\n this.lastSeeked = start;\n this.pausedAt = undefined;\n this.restartPlayFrom(start);\n } else {\n // reset if it was paused.\n this.setActiveTrack(track || this.tracks[0]);\n this.pausedAt = start;\n this.setTimeSelection(start, end);\n if (this.getSeekStyle() === 'fill') {\n this.playbackSeconds = start;\n }\n }\n }\n\n /*\n * Animation function for the playlist.\n * Keep under 16.7 milliseconds based on a typical screen refresh rate of 60fps.\n */\n updateEditor(cursor) {\n const currentTime = this.ac.currentTime;\n const selection = this.getTimeSelection();\n const cursorPos = cursor || this.cursor;\n const elapsed = currentTime - this.lastDraw;\n\n if (this.isPlaying()) {\n const playbackSeconds = cursorPos + elapsed;\n this.ee.emit('timeupdate', playbackSeconds);\n this.animationRequest = window.requestAnimationFrame(() => {\n this.updateEditor(playbackSeconds);\n });\n\n this.playbackSeconds = playbackSeconds;\n this.draw(this.render());\n this.lastDraw = currentTime;\n } else {\n if ((cursorPos + elapsed) >=\n (this.isSegmentSelection() ? selection.end : this.duration)) {\n this.ee.emit('finished');\n }\n\n this.stopAnimation();\n\n this.resetDrawTimer = setTimeout(() => {\n this.pausedAt = undefined;\n this.lastSeeked = undefined;\n this.setState(this.getState());\n\n this.playbackSeconds = 0;\n this.draw(this.render());\n }, 0);\n }\n }\n\n drawRequest() {\n window.requestAnimationFrame(() => {\n this.draw(this.render());\n });\n }\n\n draw(newTree) {\n const patches = diff(this.tree, newTree);\n this.rootNode = patch(this.rootNode, patches);\n this.tree = newTree;\n\n // use for fast forwarding.\n this.viewDuration = pixelsToSeconds(\n this.rootNode.clientWidth - this.controls.width,\n this.samplesPerPixel,\n this.sampleRate,\n );\n }\n\n getTrackRenderData(data = {}) {\n const defaults = {\n height: this.waveHeight,\n resolution: this.samplesPerPixel,\n sampleRate: this.sampleRate,\n controls: this.controls,\n isActive: false,\n timeSelection: this.getTimeSelection(),\n playlistLength: this.duration,\n playbackSeconds: this.playbackSeconds,\n colors: this.colors,\n };\n\n return _defaults(data, defaults);\n }\n\n isActiveTrack(track) {\n const activeTrack = this.getActiveTrack();\n\n if (this.isSegmentSelection()) {\n return activeTrack === track;\n }\n\n return true;\n }\n\n renderAnnotations() {\n return this.annotationList.render();\n }\n\n renderTimeScale() {\n const controlWidth = this.controls.show ? this.controls.width : 0;\n const timeScale = new TimeScale(this.duration, this.scrollLeft,\n this.samplesPerPixel, this.sampleRate, controlWidth, this.colors);\n\n return timeScale.render();\n }\n\n renderTrackSection() {\n const trackElements = this.tracks.map(track =>\n track.render(this.getTrackRenderData({\n isActive: this.isActiveTrack(track),\n shouldPlay: this.shouldTrackPlay(track),\n soloed: this.soloedTracks.indexOf(track) > -1,\n muted: this.mutedTracks.indexOf(track) > -1,\n })),\n );\n\n return h('div.playlist-tracks',\n {\n attributes: {\n style: 'overflow: auto;',\n },\n onscroll: (e) => {\n this.scrollLeft = pixelsToSeconds(\n e.target.scrollLeft,\n this.samplesPerPixel,\n this.sampleRate,\n );\n\n this.ee.emit('scroll', this.scrollLeft);\n },\n hook: new ScrollHook(this),\n },\n trackElements,\n );\n }\n\n render() {\n const containerChildren = [];\n\n if (this.showTimescale) {\n containerChildren.push(this.renderTimeScale());\n }\n\n containerChildren.push(this.renderTrackSection());\n\n if (this.annotationList.length) {\n containerChildren.push(this.renderAnnotations());\n }\n\n return h('div.playlist',\n {\n attributes: {\n style: 'overflow: hidden; position: relative;',\n },\n },\n containerChildren,\n );\n }\n\n getInfo() {\n const info = [];\n\n this.tracks.forEach((track) => {\n info.push(track.getTrackDetails());\n });\n\n return info;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Playlist.js","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Used by `_.defaults` to customize its `_.assignIn` use.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\nfunction assignInDefaults(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n});\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(args) {\n args.push(undefined, assignInDefaults);\n return apply(assignInWith, undefined, args);\n});\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.defaults/index.js\n// module id = 37\n// module chunks = 0","var h = require(\"./virtual-hyperscript/index.js\")\n\nmodule.exports = h\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/h.js\n// module id = 38\n// module chunks = 0","'use strict';\n\nvar isArray = require('x-is-array');\n\nvar VNode = require('../vnode/vnode.js');\nvar VText = require('../vnode/vtext.js');\nvar isVNode = require('../vnode/is-vnode');\nvar isVText = require('../vnode/is-vtext');\nvar isWidget = require('../vnode/is-widget');\nvar isHook = require('../vnode/is-vhook');\nvar isVThunk = require('../vnode/is-thunk');\n\nvar parseTag = require('./parse-tag.js');\nvar softSetHook = require('./hooks/soft-set-hook.js');\nvar evHook = require('./hooks/ev-hook.js');\n\nmodule.exports = h;\n\nfunction h(tagName, properties, children) {\n var childNodes = [];\n var tag, props, key, namespace;\n\n if (!children && isChildren(properties)) {\n children = properties;\n props = {};\n }\n\n props = props || properties || {};\n tag = parseTag(tagName, props);\n\n // support keys\n if (props.hasOwnProperty('key')) {\n key = props.key;\n props.key = undefined;\n }\n\n // support namespace\n if (props.hasOwnProperty('namespace')) {\n namespace = props.namespace;\n props.namespace = undefined;\n }\n\n // fix cursor bug\n if (tag === 'INPUT' &&\n !namespace &&\n props.hasOwnProperty('value') &&\n props.value !== undefined &&\n !isHook(props.value)\n ) {\n props.value = softSetHook(props.value);\n }\n\n transformProperties(props);\n\n if (children !== undefined && children !== null) {\n addChild(children, childNodes, tag, props);\n }\n\n\n return new VNode(tag, props, childNodes, key, namespace);\n}\n\nfunction addChild(c, childNodes, tag, props) {\n if (typeof c === 'string') {\n childNodes.push(new VText(c));\n } else if (typeof c === 'number') {\n childNodes.push(new VText(String(c)));\n } else if (isChild(c)) {\n childNodes.push(c);\n } else if (isArray(c)) {\n for (var i = 0; i < c.length; i++) {\n addChild(c[i], childNodes, tag, props);\n }\n } else if (c === null || c === undefined) {\n return;\n } else {\n throw UnexpectedVirtualElement({\n foreignObject: c,\n parentVnode: {\n tagName: tag,\n properties: props\n }\n });\n }\n}\n\nfunction transformProperties(props) {\n for (var propName in props) {\n if (props.hasOwnProperty(propName)) {\n var value = props[propName];\n\n if (isHook(value)) {\n continue;\n }\n\n if (propName.substr(0, 3) === 'ev-') {\n // add ev-foo support\n props[propName] = evHook(value);\n }\n }\n }\n}\n\nfunction isChild(x) {\n return isVNode(x) || isVText(x) || isWidget(x) || isVThunk(x);\n}\n\nfunction isChildren(x) {\n return typeof x === 'string' || isArray(x) || isChild(x);\n}\n\nfunction UnexpectedVirtualElement(data) {\n var err = new Error();\n\n err.type = 'virtual-hyperscript.unexpected.virtual-element';\n err.message = 'Unexpected virtual child passed to h().\\n' +\n 'Expected a VNode / Vthunk / VWidget / string but:\\n' +\n 'got:\\n' +\n errorString(data.foreignObject) +\n '.\\n' +\n 'The parent vnode is:\\n' +\n errorString(data.parentVnode)\n '\\n' +\n 'Suggested fix: change your `h(..., [ ... ])` callsite.';\n err.foreignObject = data.foreignObject;\n err.parentVnode = data.parentVnode;\n\n return err;\n}\n\nfunction errorString(obj) {\n try {\n return JSON.stringify(obj, null, ' ');\n } catch (e) {\n return String(obj);\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/virtual-hyperscript/index.js\n// module id = 39\n// module chunks = 0","var nativeIsArray = Array.isArray\nvar toString = Object.prototype.toString\n\nmodule.exports = nativeIsArray || isArray\n\nfunction isArray(obj) {\n return toString.call(obj) === \"[object Array]\"\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/x-is-array/index.js\n// module id = 40\n// module chunks = 0","var version = require(\"./version\")\nvar isVNode = require(\"./is-vnode\")\nvar isWidget = require(\"./is-widget\")\nvar isThunk = require(\"./is-thunk\")\nvar isVHook = require(\"./is-vhook\")\n\nmodule.exports = VirtualNode\n\nvar noProperties = {}\nvar noChildren = []\n\nfunction VirtualNode(tagName, properties, children, key, namespace) {\n this.tagName = tagName\n this.properties = properties || noProperties\n this.children = children || noChildren\n this.key = key != null ? String(key) : undefined\n this.namespace = (typeof namespace === \"string\") ? namespace : null\n\n var count = (children && children.length) || 0\n var descendants = 0\n var hasWidgets = false\n var hasThunks = false\n var descendantHooks = false\n var hooks\n\n for (var propName in properties) {\n if (properties.hasOwnProperty(propName)) {\n var property = properties[propName]\n if (isVHook(property) && property.unhook) {\n if (!hooks) {\n hooks = {}\n }\n\n hooks[propName] = property\n }\n }\n }\n\n for (var i = 0; i < count; i++) {\n var child = children[i]\n if (isVNode(child)) {\n descendants += child.count || 0\n\n if (!hasWidgets && child.hasWidgets) {\n hasWidgets = true\n }\n\n if (!hasThunks && child.hasThunks) {\n hasThunks = true\n }\n\n if (!descendantHooks && (child.hooks || child.descendantHooks)) {\n descendantHooks = true\n }\n } else if (!hasWidgets && isWidget(child)) {\n if (typeof child.destroy === \"function\") {\n hasWidgets = true\n }\n } else if (!hasThunks && isThunk(child)) {\n hasThunks = true;\n }\n }\n\n this.count = count + descendants\n this.hasWidgets = hasWidgets\n this.hasThunks = hasThunks\n this.hooks = hooks\n this.descendantHooks = descendantHooks\n}\n\nVirtualNode.prototype.version = version\nVirtualNode.prototype.type = \"VirtualNode\"\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/vnode.js\n// module id = 41\n// module chunks = 0","var version = require(\"./version\")\n\nmodule.exports = VirtualText\n\nfunction VirtualText(text) {\n this.text = String(text)\n}\n\nVirtualText.prototype.version = version\nVirtualText.prototype.type = \"VirtualText\"\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/vtext.js\n// module id = 42\n// module chunks = 0","'use strict';\n\nvar split = require('browser-split');\n\nvar classIdSplit = /([\\.#]?[a-zA-Z0-9\\u007F-\\uFFFF_:-]+)/;\nvar notClassId = /^\\.|#/;\n\nmodule.exports = parseTag;\n\nfunction parseTag(tag, props) {\n if (!tag) {\n return 'DIV';\n }\n\n var noId = !(props.hasOwnProperty('id'));\n\n var tagParts = split(tag, classIdSplit);\n var tagName = null;\n\n if (notClassId.test(tagParts[1])) {\n tagName = 'DIV';\n }\n\n var classes, part, type, i;\n\n for (i = 0; i < tagParts.length; i++) {\n part = tagParts[i];\n\n if (!part) {\n continue;\n }\n\n type = part.charAt(0);\n\n if (!tagName) {\n tagName = part;\n } else if (type === '.') {\n classes = classes || [];\n classes.push(part.substring(1, part.length));\n } else if (type === '#' && noId) {\n props.id = part.substring(1, part.length);\n }\n }\n\n if (classes) {\n if (props.className) {\n classes.push(props.className);\n }\n\n props.className = classes.join(' ');\n }\n\n return props.namespace ? tagName : tagName.toUpperCase();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/virtual-hyperscript/parse-tag.js\n// module id = 43\n// module chunks = 0","/*!\n * Cross-Browser Split 1.1.1\n * Copyright 2007-2012 Steven Levithan \n * Available under the MIT License\n * ECMAScript compliant, uniform cross-browser split method\n */\n\n/**\n * Splits a string into an array of strings using a regex or string separator. Matches of the\n * separator are not included in the result array. However, if `separator` is a regex that contains\n * capturing groups, backreferences are spliced into the result each time `separator` is matched.\n * Fixes browser bugs compared to the native `String.prototype.split` and can be used reliably\n * cross-browser.\n * @param {String} str String to split.\n * @param {RegExp|String} separator Regex or string to use for separating the string.\n * @param {Number} [limit] Maximum number of items to include in the result array.\n * @returns {Array} Array of substrings.\n * @example\n *\n * // Basic use\n * split('a b c d', ' ');\n * // -> ['a', 'b', 'c', 'd']\n *\n * // With limit\n * split('a b c d', ' ', 2);\n * // -> ['a', 'b']\n *\n * // Backreferences in result array\n * split('..word1 word2..', /([a-z]+)(\\d+)/i);\n * // -> ['..', 'word', '1', ' ', 'word', '2', '..']\n */\nmodule.exports = (function split(undef) {\n\n var nativeSplit = String.prototype.split,\n compliantExecNpcg = /()??/.exec(\"\")[1] === undef,\n // NPCG: nonparticipating capturing group\n self;\n\n self = function(str, separator, limit) {\n // If `separator` is not a regex, use `nativeSplit`\n if (Object.prototype.toString.call(separator) !== \"[object RegExp]\") {\n return nativeSplit.call(str, separator, limit);\n }\n var output = [],\n flags = (separator.ignoreCase ? \"i\" : \"\") + (separator.multiline ? \"m\" : \"\") + (separator.extended ? \"x\" : \"\") + // Proposed for ES6\n (separator.sticky ? \"y\" : \"\"),\n // Firefox 3+\n lastLastIndex = 0,\n // Make `global` and avoid `lastIndex` issues by working with a copy\n separator = new RegExp(separator.source, flags + \"g\"),\n separator2, match, lastIndex, lastLength;\n str += \"\"; // Type-convert\n if (!compliantExecNpcg) {\n // Doesn't need flags gy, but they don't hurt\n separator2 = new RegExp(\"^\" + separator.source + \"$(?!\\\\s)\", flags);\n }\n /* Values for `limit`, per the spec:\n * If undefined: 4294967295 // Math.pow(2, 32) - 1\n * If 0, Infinity, or NaN: 0\n * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296;\n * If negative number: 4294967296 - Math.floor(Math.abs(limit))\n * If other: Type-convert, then use the above rules\n */\n limit = limit === undef ? -1 >>> 0 : // Math.pow(2, 32) - 1\n limit >>> 0; // ToUint32(limit)\n while (match = separator.exec(str)) {\n // `separator.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0].length;\n if (lastIndex > lastLastIndex) {\n output.push(str.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for\n // nonparticipating capturing groups\n if (!compliantExecNpcg && match.length > 1) {\n match[0].replace(separator2, function() {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undef) {\n match[i] = undef;\n }\n }\n });\n }\n if (match.length > 1 && match.index < str.length) {\n Array.prototype.push.apply(output, match.slice(1));\n }\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= limit) {\n break;\n }\n }\n if (separator.lastIndex === match.index) {\n separator.lastIndex++; // Avoid an infinite loop\n }\n }\n if (lastLastIndex === str.length) {\n if (lastLength || !separator.test(\"\")) {\n output.push(\"\");\n }\n } else {\n output.push(str.slice(lastLastIndex));\n }\n return output.length > limit ? output.slice(0, limit) : output;\n };\n\n return self;\n})();\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/browser-split/index.js\n// module id = 44\n// module chunks = 0","'use strict';\n\nmodule.exports = SoftSetHook;\n\nfunction SoftSetHook(value) {\n if (!(this instanceof SoftSetHook)) {\n return new SoftSetHook(value);\n }\n\n this.value = value;\n}\n\nSoftSetHook.prototype.hook = function (node, propertyName) {\n if (node[propertyName] !== this.value) {\n node[propertyName] = this.value;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/virtual-hyperscript/hooks/soft-set-hook.js\n// module id = 45\n// module chunks = 0","'use strict';\n\nvar EvStore = require('ev-store');\n\nmodule.exports = EvHook;\n\nfunction EvHook(value) {\n if (!(this instanceof EvHook)) {\n return new EvHook(value);\n }\n\n this.value = value;\n}\n\nEvHook.prototype.hook = function (node, propertyName) {\n var es = EvStore(node);\n var propName = propertyName.substr(3);\n\n es[propName] = this.value;\n};\n\nEvHook.prototype.unhook = function(node, propertyName) {\n var es = EvStore(node);\n var propName = propertyName.substr(3);\n\n es[propName] = undefined;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/virtual-hyperscript/hooks/ev-hook.js\n// module id = 46\n// module chunks = 0","'use strict';\n\nvar OneVersionConstraint = require('individual/one-version');\n\nvar MY_VERSION = '7';\nOneVersionConstraint('ev-store', MY_VERSION);\n\nvar hashKey = '__EV_STORE_KEY@' + MY_VERSION;\n\nmodule.exports = EvStore;\n\nfunction EvStore(elem) {\n var hash = elem[hashKey];\n\n if (!hash) {\n hash = elem[hashKey] = {};\n }\n\n return hash;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/ev-store/index.js\n// module id = 47\n// module chunks = 0","'use strict';\n\nvar Individual = require('./index.js');\n\nmodule.exports = OneVersion;\n\nfunction OneVersion(moduleName, version, defaultValue) {\n var key = '__INDIVIDUAL_ONE_VERSION_' + moduleName;\n var enforceKey = key + '_ENFORCE_SINGLETON';\n\n var versionValue = Individual(enforceKey, version);\n\n if (versionValue !== version) {\n throw new Error('Can only have one copy of ' +\n moduleName + '.\\n' +\n 'You already have version ' + versionValue +\n ' installed.\\n' +\n 'This means you cannot install version ' + version);\n }\n\n return Individual(key, defaultValue);\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/individual/one-version.js\n// module id = 48\n// module chunks = 0","'use strict';\n\n/*global window, global*/\n\nvar root = typeof window !== 'undefined' ?\n window : typeof global !== 'undefined' ?\n global : {};\n\nmodule.exports = Individual;\n\nfunction Individual(key, value) {\n if (key in root) {\n return root[key];\n }\n\n root[key] = value;\n\n return value;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/individual/index.js\n// module id = 49\n// module chunks = 0","var diff = require(\"./vtree/diff.js\")\n\nmodule.exports = diff\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/diff.js\n// module id = 50\n// module chunks = 0","var isArray = require(\"x-is-array\")\n\nvar VPatch = require(\"../vnode/vpatch\")\nvar isVNode = require(\"../vnode/is-vnode\")\nvar isVText = require(\"../vnode/is-vtext\")\nvar isWidget = require(\"../vnode/is-widget\")\nvar isThunk = require(\"../vnode/is-thunk\")\nvar handleThunk = require(\"../vnode/handle-thunk\")\n\nvar diffProps = require(\"./diff-props\")\n\nmodule.exports = diff\n\nfunction diff(a, b) {\n var patch = { a: a }\n walk(a, b, patch, 0)\n return patch\n}\n\nfunction walk(a, b, patch, index) {\n if (a === b) {\n return\n }\n\n var apply = patch[index]\n var applyClear = false\n\n if (isThunk(a) || isThunk(b)) {\n thunks(a, b, patch, index)\n } else if (b == null) {\n\n // If a is a widget we will add a remove patch for it\n // Otherwise any child widgets/hooks must be destroyed.\n // This prevents adding two remove patches for a widget.\n if (!isWidget(a)) {\n clearState(a, patch, index)\n apply = patch[index]\n }\n\n apply = appendPatch(apply, new VPatch(VPatch.REMOVE, a, b))\n } else if (isVNode(b)) {\n if (isVNode(a)) {\n if (a.tagName === b.tagName &&\n a.namespace === b.namespace &&\n a.key === b.key) {\n var propsPatch = diffProps(a.properties, b.properties)\n if (propsPatch) {\n apply = appendPatch(apply,\n new VPatch(VPatch.PROPS, a, propsPatch))\n }\n apply = diffChildren(a, b, patch, apply, index)\n } else {\n apply = appendPatch(apply, new VPatch(VPatch.VNODE, a, b))\n applyClear = true\n }\n } else {\n apply = appendPatch(apply, new VPatch(VPatch.VNODE, a, b))\n applyClear = true\n }\n } else if (isVText(b)) {\n if (!isVText(a)) {\n apply = appendPatch(apply, new VPatch(VPatch.VTEXT, a, b))\n applyClear = true\n } else if (a.text !== b.text) {\n apply = appendPatch(apply, new VPatch(VPatch.VTEXT, a, b))\n }\n } else if (isWidget(b)) {\n if (!isWidget(a)) {\n applyClear = true\n }\n\n apply = appendPatch(apply, new VPatch(VPatch.WIDGET, a, b))\n }\n\n if (apply) {\n patch[index] = apply\n }\n\n if (applyClear) {\n clearState(a, patch, index)\n }\n}\n\nfunction diffChildren(a, b, patch, apply, index) {\n var aChildren = a.children\n var orderedSet = reorder(aChildren, b.children)\n var bChildren = orderedSet.children\n\n var aLen = aChildren.length\n var bLen = bChildren.length\n var len = aLen > bLen ? aLen : bLen\n\n for (var i = 0; i < len; i++) {\n var leftNode = aChildren[i]\n var rightNode = bChildren[i]\n index += 1\n\n if (!leftNode) {\n if (rightNode) {\n // Excess nodes in b need to be added\n apply = appendPatch(apply,\n new VPatch(VPatch.INSERT, null, rightNode))\n }\n } else {\n walk(leftNode, rightNode, patch, index)\n }\n\n if (isVNode(leftNode) && leftNode.count) {\n index += leftNode.count\n }\n }\n\n if (orderedSet.moves) {\n // Reorder nodes last\n apply = appendPatch(apply, new VPatch(\n VPatch.ORDER,\n a,\n orderedSet.moves\n ))\n }\n\n return apply\n}\n\nfunction clearState(vNode, patch, index) {\n // TODO: Make this a single walk, not two\n unhook(vNode, patch, index)\n destroyWidgets(vNode, patch, index)\n}\n\n// Patch records for all destroyed widgets must be added because we need\n// a DOM node reference for the destroy function\nfunction destroyWidgets(vNode, patch, index) {\n if (isWidget(vNode)) {\n if (typeof vNode.destroy === \"function\") {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(VPatch.REMOVE, vNode, null)\n )\n }\n } else if (isVNode(vNode) && (vNode.hasWidgets || vNode.hasThunks)) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n destroyWidgets(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}\n\n// Create a sub-patch for thunks\nfunction thunks(a, b, patch, index) {\n var nodes = handleThunk(a, b)\n var thunkPatch = diff(nodes.a, nodes.b)\n if (hasPatches(thunkPatch)) {\n patch[index] = new VPatch(VPatch.THUNK, null, thunkPatch)\n }\n}\n\nfunction hasPatches(patch) {\n for (var index in patch) {\n if (index !== \"a\") {\n return true\n }\n }\n\n return false\n}\n\n// Execute hooks when two nodes are identical\nfunction unhook(vNode, patch, index) {\n if (isVNode(vNode)) {\n if (vNode.hooks) {\n patch[index] = appendPatch(\n patch[index],\n new VPatch(\n VPatch.PROPS,\n vNode,\n undefinedKeys(vNode.hooks)\n )\n )\n }\n\n if (vNode.descendantHooks || vNode.hasThunks) {\n var children = vNode.children\n var len = children.length\n for (var i = 0; i < len; i++) {\n var child = children[i]\n index += 1\n\n unhook(child, patch, index)\n\n if (isVNode(child) && child.count) {\n index += child.count\n }\n }\n }\n } else if (isThunk(vNode)) {\n thunks(vNode, null, patch, index)\n }\n}\n\nfunction undefinedKeys(obj) {\n var result = {}\n\n for (var key in obj) {\n result[key] = undefined\n }\n\n return result\n}\n\n// List diff, naive left to right reordering\nfunction reorder(aChildren, bChildren) {\n // O(M) time, O(M) memory\n var bChildIndex = keyIndex(bChildren)\n var bKeys = bChildIndex.keys\n var bFree = bChildIndex.free\n\n if (bFree.length === bChildren.length) {\n return {\n children: bChildren,\n moves: null\n }\n }\n\n // O(N) time, O(N) memory\n var aChildIndex = keyIndex(aChildren)\n var aKeys = aChildIndex.keys\n var aFree = aChildIndex.free\n\n if (aFree.length === aChildren.length) {\n return {\n children: bChildren,\n moves: null\n }\n }\n\n // O(MAX(N, M)) memory\n var newChildren = []\n\n var freeIndex = 0\n var freeCount = bFree.length\n var deletedItems = 0\n\n // Iterate through a and match a node in b\n // O(N) time,\n for (var i = 0 ; i < aChildren.length; i++) {\n var aItem = aChildren[i]\n var itemIndex\n\n if (aItem.key) {\n if (bKeys.hasOwnProperty(aItem.key)) {\n // Match up the old keys\n itemIndex = bKeys[aItem.key]\n newChildren.push(bChildren[itemIndex])\n\n } else {\n // Remove old keyed items\n itemIndex = i - deletedItems++\n newChildren.push(null)\n }\n } else {\n // Match the item in a with the next free item in b\n if (freeIndex < freeCount) {\n itemIndex = bFree[freeIndex++]\n newChildren.push(bChildren[itemIndex])\n } else {\n // There are no free items in b to match with\n // the free items in a, so the extra free nodes\n // are deleted.\n itemIndex = i - deletedItems++\n newChildren.push(null)\n }\n }\n }\n\n var lastFreeIndex = freeIndex >= bFree.length ?\n bChildren.length :\n bFree[freeIndex]\n\n // Iterate through b and append any new keys\n // O(M) time\n for (var j = 0; j < bChildren.length; j++) {\n var newItem = bChildren[j]\n\n if (newItem.key) {\n if (!aKeys.hasOwnProperty(newItem.key)) {\n // Add any new keyed items\n // We are adding new items to the end and then sorting them\n // in place. In future we should insert new items in place.\n newChildren.push(newItem)\n }\n } else if (j >= lastFreeIndex) {\n // Add any leftover non-keyed items\n newChildren.push(newItem)\n }\n }\n\n var simulate = newChildren.slice()\n var simulateIndex = 0\n var removes = []\n var inserts = []\n var simulateItem\n\n for (var k = 0; k < bChildren.length;) {\n var wantedItem = bChildren[k]\n simulateItem = simulate[simulateIndex]\n\n // remove items\n while (simulateItem === null && simulate.length) {\n removes.push(remove(simulate, simulateIndex, null))\n simulateItem = simulate[simulateIndex]\n }\n\n if (!simulateItem || simulateItem.key !== wantedItem.key) {\n // if we need a key in this position...\n if (wantedItem.key) {\n if (simulateItem && simulateItem.key) {\n // if an insert doesn't put this key in place, it needs to move\n if (bKeys[simulateItem.key] !== k + 1) {\n removes.push(remove(simulate, simulateIndex, simulateItem.key))\n simulateItem = simulate[simulateIndex]\n // if the remove didn't put the wanted item in place, we need to insert it\n if (!simulateItem || simulateItem.key !== wantedItem.key) {\n inserts.push({key: wantedItem.key, to: k})\n }\n // items are matching, so skip ahead\n else {\n simulateIndex++\n }\n }\n else {\n inserts.push({key: wantedItem.key, to: k})\n }\n }\n else {\n inserts.push({key: wantedItem.key, to: k})\n }\n k++\n }\n // a key in simulate has no matching wanted key, remove it\n else if (simulateItem && simulateItem.key) {\n removes.push(remove(simulate, simulateIndex, simulateItem.key))\n }\n }\n else {\n simulateIndex++\n k++\n }\n }\n\n // remove all the remaining nodes from simulate\n while(simulateIndex < simulate.length) {\n simulateItem = simulate[simulateIndex]\n removes.push(remove(simulate, simulateIndex, simulateItem && simulateItem.key))\n }\n\n // If the only moves we have are deletes then we can just\n // let the delete patch remove these items.\n if (removes.length === deletedItems && !inserts.length) {\n return {\n children: newChildren,\n moves: null\n }\n }\n\n return {\n children: newChildren,\n moves: {\n removes: removes,\n inserts: inserts\n }\n }\n}\n\nfunction remove(arr, index, key) {\n arr.splice(index, 1)\n\n return {\n from: index,\n key: key\n }\n}\n\nfunction keyIndex(children) {\n var keys = {}\n var free = []\n var length = children.length\n\n for (var i = 0; i < length; i++) {\n var child = children[i]\n\n if (child.key) {\n keys[child.key] = i\n } else {\n free.push(i)\n }\n }\n\n return {\n keys: keys, // A hash of key name to index\n free: free // An array of unkeyed item indices\n }\n}\n\nfunction appendPatch(apply, patch) {\n if (apply) {\n if (isArray(apply)) {\n apply.push(patch)\n } else {\n apply = [apply, patch]\n }\n\n return apply\n } else {\n return patch\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vtree/diff.js\n// module id = 51\n// module chunks = 0","var version = require(\"./version\")\n\nVirtualPatch.NONE = 0\nVirtualPatch.VTEXT = 1\nVirtualPatch.VNODE = 2\nVirtualPatch.WIDGET = 3\nVirtualPatch.PROPS = 4\nVirtualPatch.ORDER = 5\nVirtualPatch.INSERT = 6\nVirtualPatch.REMOVE = 7\nVirtualPatch.THUNK = 8\n\nmodule.exports = VirtualPatch\n\nfunction VirtualPatch(type, vNode, patch) {\n this.type = Number(type)\n this.vNode = vNode\n this.patch = patch\n}\n\nVirtualPatch.prototype.version = version\nVirtualPatch.prototype.type = \"VirtualPatch\"\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vnode/vpatch.js\n// module id = 52\n// module chunks = 0","var isObject = require(\"is-object\")\nvar isHook = require(\"../vnode/is-vhook\")\n\nmodule.exports = diffProps\n\nfunction diffProps(a, b) {\n var diff\n\n for (var aKey in a) {\n if (!(aKey in b)) {\n diff = diff || {}\n diff[aKey] = undefined\n }\n\n var aValue = a[aKey]\n var bValue = b[aKey]\n\n if (aValue === bValue) {\n continue\n } else if (isObject(aValue) && isObject(bValue)) {\n if (getPrototype(bValue) !== getPrototype(aValue)) {\n diff = diff || {}\n diff[aKey] = bValue\n } else if (isHook(bValue)) {\n diff = diff || {}\n diff[aKey] = bValue\n } else {\n var objectDiff = diffProps(aValue, bValue)\n if (objectDiff) {\n diff = diff || {}\n diff[aKey] = objectDiff\n }\n }\n } else {\n diff = diff || {}\n diff[aKey] = bValue\n }\n }\n\n for (var bKey in b) {\n if (!(bKey in a)) {\n diff = diff || {}\n diff[bKey] = b[bKey]\n }\n }\n\n return diff\n}\n\nfunction getPrototype(value) {\n if (Object.getPrototypeOf) {\n return Object.getPrototypeOf(value)\n } else if (value.__proto__) {\n return value.__proto__\n } else if (value.constructor) {\n return value.constructor.prototype\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vtree/diff-props.js\n// module id = 53\n// module chunks = 0","var patch = require(\"./vdom/patch.js\")\n\nmodule.exports = patch\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/patch.js\n// module id = 54\n// module chunks = 0","var document = require(\"global/document\")\nvar isArray = require(\"x-is-array\")\n\nvar render = require(\"./create-element\")\nvar domIndex = require(\"./dom-index\")\nvar patchOp = require(\"./patch-op\")\nmodule.exports = patch\n\nfunction patch(rootNode, patches, renderOptions) {\n renderOptions = renderOptions || {}\n renderOptions.patch = renderOptions.patch && renderOptions.patch !== patch\n ? renderOptions.patch\n : patchRecursive\n renderOptions.render = renderOptions.render || render\n\n return renderOptions.patch(rootNode, patches, renderOptions)\n}\n\nfunction patchRecursive(rootNode, patches, renderOptions) {\n var indices = patchIndices(patches)\n\n if (indices.length === 0) {\n return rootNode\n }\n\n var index = domIndex(rootNode, patches.a, indices)\n var ownerDocument = rootNode.ownerDocument\n\n if (!renderOptions.document && ownerDocument !== document) {\n renderOptions.document = ownerDocument\n }\n\n for (var i = 0; i < indices.length; i++) {\n var nodeIndex = indices[i]\n rootNode = applyPatch(rootNode,\n index[nodeIndex],\n patches[nodeIndex],\n renderOptions)\n }\n\n return rootNode\n}\n\nfunction applyPatch(rootNode, domNode, patchList, renderOptions) {\n if (!domNode) {\n return rootNode\n }\n\n var newNode\n\n if (isArray(patchList)) {\n for (var i = 0; i < patchList.length; i++) {\n newNode = patchOp(patchList[i], domNode, renderOptions)\n\n if (domNode === rootNode) {\n rootNode = newNode\n }\n }\n } else {\n newNode = patchOp(patchList, domNode, renderOptions)\n\n if (domNode === rootNode) {\n rootNode = newNode\n }\n }\n\n return rootNode\n}\n\nfunction patchIndices(patches) {\n var indices = []\n\n for (var key in patches) {\n if (key !== \"a\") {\n indices.push(Number(key))\n }\n }\n\n return indices\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vdom/patch.js\n// module id = 55\n// module chunks = 0","// Maps a virtual DOM tree onto a real DOM tree in an efficient manner.\n// We don't want to read all of the DOM nodes in the tree so we use\n// the in-order tree indexing to eliminate recursion down certain branches.\n// We only recurse into a DOM node if we know that it contains a child of\n// interest.\n\nvar noChild = {}\n\nmodule.exports = domIndex\n\nfunction domIndex(rootNode, tree, indices, nodes) {\n if (!indices || indices.length === 0) {\n return {}\n } else {\n indices.sort(ascending)\n return recurse(rootNode, tree, indices, nodes, 0)\n }\n}\n\nfunction recurse(rootNode, tree, indices, nodes, rootIndex) {\n nodes = nodes || {}\n\n\n if (rootNode) {\n if (indexInRange(indices, rootIndex, rootIndex)) {\n nodes[rootIndex] = rootNode\n }\n\n var vChildren = tree.children\n\n if (vChildren) {\n\n var childNodes = rootNode.childNodes\n\n for (var i = 0; i < tree.children.length; i++) {\n rootIndex += 1\n\n var vChild = vChildren[i] || noChild\n var nextIndex = rootIndex + (vChild.count || 0)\n\n // skip recursion down the tree if there are no nodes down here\n if (indexInRange(indices, rootIndex, nextIndex)) {\n recurse(childNodes[i], vChild, indices, nodes, rootIndex)\n }\n\n rootIndex = nextIndex\n }\n }\n }\n\n return nodes\n}\n\n// Binary search for an index in the interval [left, right]\nfunction indexInRange(indices, left, right) {\n if (indices.length === 0) {\n return false\n }\n\n var minIndex = 0\n var maxIndex = indices.length - 1\n var currentIndex\n var currentItem\n\n while (minIndex <= maxIndex) {\n currentIndex = ((maxIndex + minIndex) / 2) >> 0\n currentItem = indices[currentIndex]\n\n if (minIndex === maxIndex) {\n return currentItem >= left && currentItem <= right\n } else if (currentItem < left) {\n minIndex = currentIndex + 1\n } else if (currentItem > right) {\n maxIndex = currentIndex - 1\n } else {\n return true\n }\n }\n\n return false;\n}\n\nfunction ascending(a, b) {\n return a > b ? 1 : -1\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vdom/dom-index.js\n// module id = 56\n// module chunks = 0","var applyProperties = require(\"./apply-properties\")\n\nvar isWidget = require(\"../vnode/is-widget.js\")\nvar VPatch = require(\"../vnode/vpatch.js\")\n\nvar updateWidget = require(\"./update-widget\")\n\nmodule.exports = applyPatch\n\nfunction applyPatch(vpatch, domNode, renderOptions) {\n var type = vpatch.type\n var vNode = vpatch.vNode\n var patch = vpatch.patch\n\n switch (type) {\n case VPatch.REMOVE:\n return removeNode(domNode, vNode)\n case VPatch.INSERT:\n return insertNode(domNode, patch, renderOptions)\n case VPatch.VTEXT:\n return stringPatch(domNode, vNode, patch, renderOptions)\n case VPatch.WIDGET:\n return widgetPatch(domNode, vNode, patch, renderOptions)\n case VPatch.VNODE:\n return vNodePatch(domNode, vNode, patch, renderOptions)\n case VPatch.ORDER:\n reorderChildren(domNode, patch)\n return domNode\n case VPatch.PROPS:\n applyProperties(domNode, patch, vNode.properties)\n return domNode\n case VPatch.THUNK:\n return replaceRoot(domNode,\n renderOptions.patch(domNode, patch, renderOptions))\n default:\n return domNode\n }\n}\n\nfunction removeNode(domNode, vNode) {\n var parentNode = domNode.parentNode\n\n if (parentNode) {\n parentNode.removeChild(domNode)\n }\n\n destroyWidget(domNode, vNode);\n\n return null\n}\n\nfunction insertNode(parentNode, vNode, renderOptions) {\n var newNode = renderOptions.render(vNode, renderOptions)\n\n if (parentNode) {\n parentNode.appendChild(newNode)\n }\n\n return parentNode\n}\n\nfunction stringPatch(domNode, leftVNode, vText, renderOptions) {\n var newNode\n\n if (domNode.nodeType === 3) {\n domNode.replaceData(0, domNode.length, vText.text)\n newNode = domNode\n } else {\n var parentNode = domNode.parentNode\n newNode = renderOptions.render(vText, renderOptions)\n\n if (parentNode && newNode !== domNode) {\n parentNode.replaceChild(newNode, domNode)\n }\n }\n\n return newNode\n}\n\nfunction widgetPatch(domNode, leftVNode, widget, renderOptions) {\n var updating = updateWidget(leftVNode, widget)\n var newNode\n\n if (updating) {\n newNode = widget.update(leftVNode, domNode) || domNode\n } else {\n newNode = renderOptions.render(widget, renderOptions)\n }\n\n var parentNode = domNode.parentNode\n\n if (parentNode && newNode !== domNode) {\n parentNode.replaceChild(newNode, domNode)\n }\n\n if (!updating) {\n destroyWidget(domNode, leftVNode)\n }\n\n return newNode\n}\n\nfunction vNodePatch(domNode, leftVNode, vNode, renderOptions) {\n var parentNode = domNode.parentNode\n var newNode = renderOptions.render(vNode, renderOptions)\n\n if (parentNode && newNode !== domNode) {\n parentNode.replaceChild(newNode, domNode)\n }\n\n return newNode\n}\n\nfunction destroyWidget(domNode, w) {\n if (typeof w.destroy === \"function\" && isWidget(w)) {\n w.destroy(domNode)\n }\n}\n\nfunction reorderChildren(domNode, moves) {\n var childNodes = domNode.childNodes\n var keyMap = {}\n var node\n var remove\n var insert\n\n for (var i = 0; i < moves.removes.length; i++) {\n remove = moves.removes[i]\n node = childNodes[remove.from]\n if (remove.key) {\n keyMap[remove.key] = node\n }\n domNode.removeChild(node)\n }\n\n var length = childNodes.length\n for (var j = 0; j < moves.inserts.length; j++) {\n insert = moves.inserts[j]\n node = keyMap[insert.key]\n // this is the weirdest bug i've ever seen in webkit\n domNode.insertBefore(node, insert.to >= length++ ? null : childNodes[insert.to])\n }\n}\n\nfunction replaceRoot(oldRoot, newRoot) {\n if (oldRoot && newRoot && oldRoot !== newRoot && oldRoot.parentNode) {\n oldRoot.parentNode.replaceChild(newRoot, oldRoot)\n }\n\n return newRoot;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vdom/patch-op.js\n// module id = 57\n// module chunks = 0","var isWidget = require(\"../vnode/is-widget.js\")\n\nmodule.exports = updateWidget\n\nfunction updateWidget(a, b) {\n if (isWidget(a) && isWidget(b)) {\n if (\"name\" in a && \"name\" in b) {\n return a.id === b.id\n } else {\n return a.init === b.init\n }\n }\n\n return false\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/virtual-dom/vdom/update-widget.js\n// module id = 58\n// module chunks = 0","var WORKER_ENABLED = !!(global === global.window && global.URL && global.Blob && global.Worker);\n\nfunction InlineWorker(func, self) {\n var _this = this;\n var functionBody;\n\n self = self || {};\n\n if (WORKER_ENABLED) {\n functionBody = func.toString().trim().match(\n /^function\\s*\\w*\\s*\\([\\w\\s,]*\\)\\s*{([\\w\\W]*?)}$/\n )[1];\n\n return new global.Worker(global.URL.createObjectURL(\n new global.Blob([ functionBody ], { type: \"text/javascript\" })\n ));\n }\n\n function postMessage(data) {\n setTimeout(function() {\n _this.onmessage({ data: data });\n }, 0);\n }\n\n this.self = self;\n this.self.postMessage = postMessage;\n\n setTimeout(func.bind(self, self), 0);\n}\n\nInlineWorker.prototype.postMessage = function postMessage(data) {\n var _this = this;\n\n setTimeout(function() {\n _this.self.onmessage({ data: data });\n }, 0);\n};\n\nmodule.exports = InlineWorker;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/inline-worker/index.js\n// module id = 59\n// module chunks = 0","export function samplesToSeconds(samples, sampleRate) {\n return samples / sampleRate;\n}\n\nexport function secondsToSamples(seconds, sampleRate) {\n return Math.ceil(seconds * sampleRate);\n}\n\nexport function samplesToPixels(samples, resolution) {\n return Math.floor(samples / resolution);\n}\n\nexport function pixelsToSamples(pixels, resolution) {\n return Math.floor(pixels * resolution);\n}\n\nexport function pixelsToSeconds(pixels, resolution, sampleRate) {\n return (pixels * resolution) / sampleRate;\n}\n\nexport function secondsToPixels(seconds, resolution, sampleRate) {\n return Math.ceil((seconds * sampleRate) / resolution);\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/conversions.js","import BlobLoader from './BlobLoader';\nimport XHRLoader from './XHRLoader';\n\nexport default class {\n static createLoader(src, audioContext, ee) {\n if (src instanceof Blob) {\n return new BlobLoader(src, audioContext, ee);\n } else if (typeof (src) === 'string') {\n return new XHRLoader(src, audioContext, ee);\n }\n\n throw new Error('Unsupported src type');\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/loader/LoaderFactory.js","import Loader from './Loader';\n\nexport default class extends Loader {\n\n /*\n * Loads an audio file via a FileReader\n */\n load() {\n return new Promise((resolve, reject) => {\n if (this.src.type.match(/audio.*/) ||\n // added for problems with Firefox mime types + ogg.\n this.src.type.match(/video\\/ogg/)) {\n const fr = new FileReader();\n\n fr.readAsArrayBuffer(this.src);\n\n fr.addEventListener('progress', (e) => {\n super.fileProgress(e);\n });\n\n fr.addEventListener('load', (e) => {\n const decoderPromise = super.fileLoad(e);\n\n decoderPromise.then((audioBuffer) => {\n resolve(audioBuffer);\n }).catch(reject);\n });\n\n fr.addEventListener('error', reject);\n } else {\n reject(Error(`Unsupported file type ${this.src.type}`));\n }\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/loader/BlobLoader.js","import EventEmitter from 'event-emitter';\n\nexport const STATE_UNINITIALIZED = 0;\nexport const STATE_LOADING = 1;\nexport const STATE_DECODING = 2;\nexport const STATE_FINISHED = 3;\n\n\nexport default class {\n constructor(src, audioContext, ee = EventEmitter()) {\n this.src = src;\n this.ac = audioContext;\n this.audioRequestState = STATE_UNINITIALIZED;\n this.ee = ee;\n }\n\n setStateChange(state) {\n this.audioRequestState = state;\n this.ee.emit('audiorequeststatechange', this.audioRequestState, this.src);\n }\n\n fileProgress(e) {\n let percentComplete = 0;\n\n if (this.audioRequestState === STATE_UNINITIALIZED) {\n this.setStateChange(STATE_LOADING);\n }\n\n if (e.lengthComputable) {\n percentComplete = (e.loaded / e.total) * 100;\n }\n\n this.ee.emit('loadprogress', percentComplete, this.src);\n }\n\n fileLoad(e) {\n const audioData = e.target.response || e.target.result;\n\n this.setStateChange(STATE_DECODING);\n\n return new Promise((resolve, reject) => {\n this.ac.decodeAudioData(\n audioData,\n (audioBuffer) => {\n this.audioBuffer = audioBuffer;\n this.setStateChange(STATE_FINISHED);\n\n resolve(audioBuffer);\n },\n (err) => {\n if (err === null) {\n // Safari issues with null error\n reject(Error('MediaDecodeAudioDataUnknownContentType'));\n } else {\n reject(err);\n }\n },\n );\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/loader/Loader.js","import Loader from './Loader';\n\nexport default class extends Loader {\n\n /**\n * Loads an audio file via XHR.\n */\n load() {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.open('GET', this.src, true);\n xhr.responseType = 'arraybuffer';\n xhr.send();\n\n xhr.addEventListener('progress', (e) => {\n super.fileProgress(e);\n });\n\n xhr.addEventListener('load', (e) => {\n const decoderPromise = super.fileLoad(e);\n\n decoderPromise.then((audioBuffer) => {\n resolve(audioBuffer);\n }).catch(reject);\n });\n\n xhr.addEventListener('error', () => {\n reject(Error(`Track ${this.src} failed to load`));\n });\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/loader/XHRLoader.js","import { secondsToPixels, pixelsToSeconds } from '../utils/conversions';\n\n/*\n * virtual-dom hook for scrolling the track container.\n */\nexport default class {\n constructor(playlist) {\n this.playlist = playlist;\n }\n\n hook(node) {\n const playlist = this.playlist;\n if (!playlist.isScrolling) {\n const el = node;\n\n if (playlist.isAutomaticScroll && node.querySelector('.cursor')) {\n const rect = node.getBoundingClientRect();\n const cursorRect = node\n .querySelector('.cursor')\n .getBoundingClientRect();\n\n if (cursorRect.right > rect.right || cursorRect.right < 0) {\n const controlWidth = playlist.controls.show\n ? playlist.controls.width\n : 0;\n const width = pixelsToSeconds(\n rect.right - rect.left,\n playlist.samplesPerPixel,\n playlist.sampleRate,\n );\n playlist.scrollLeft = Math.min(\n playlist.playbackSeconds,\n playlist.duration - (width - controlWidth),\n );\n }\n }\n\n const left = secondsToPixels(\n playlist.scrollLeft,\n playlist.samplesPerPixel,\n playlist.sampleRate,\n );\n\n el.scrollLeft = left;\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/render/ScrollHook.js","import h from 'virtual-dom/h';\n\nimport { secondsToPixels } from './utils/conversions';\nimport TimeScaleHook from './render/TimeScaleHook';\n\nclass TimeScale {\n constructor(duration, offset, samplesPerPixel, sampleRate, marginLeft = 0, colors) {\n this.duration = duration;\n this.offset = offset;\n this.samplesPerPixel = samplesPerPixel;\n this.sampleRate = sampleRate;\n this.marginLeft = marginLeft;\n this.colors = colors;\n\n this.timeinfo = {\n 20000: {\n marker: 30000,\n bigStep: 10000,\n smallStep: 5000,\n secondStep: 5,\n },\n 12000: {\n marker: 15000,\n bigStep: 5000,\n smallStep: 1000,\n secondStep: 1,\n },\n 10000: {\n marker: 10000,\n bigStep: 5000,\n smallStep: 1000,\n secondStep: 1,\n },\n 5000: {\n marker: 5000,\n bigStep: 1000,\n smallStep: 500,\n secondStep: 1 / 2,\n },\n 2500: {\n marker: 2000,\n bigStep: 1000,\n smallStep: 500,\n secondStep: 1 / 2,\n },\n 1500: {\n marker: 2000,\n bigStep: 1000,\n smallStep: 200,\n secondStep: 1 / 5,\n },\n 700: {\n marker: 1000,\n bigStep: 500,\n smallStep: 100,\n secondStep: 1 / 10,\n },\n };\n }\n\n getScaleInfo(resolution) {\n let keys = Object.keys(this.timeinfo).map(item => parseInt(item, 10));\n\n // make sure keys are numerically sorted.\n keys = keys.sort((a, b) => a - b);\n\n for (let i = 0; i < keys.length; i += 1) {\n if (resolution <= keys[i]) {\n return this.timeinfo[keys[i]];\n }\n }\n\n return this.timeinfo[keys[0]];\n }\n\n /*\n Return time in format mm:ss\n */\n static formatTime(milliseconds) {\n const seconds = milliseconds / 1000;\n let s = seconds % 60;\n const m = (seconds - s) / 60;\n\n if (s < 10) {\n s = `0${s}`;\n }\n\n return `${m}:${s}`;\n }\n\n render() {\n const widthX = secondsToPixels(this.duration, this.samplesPerPixel, this.sampleRate);\n const pixPerSec = this.sampleRate / this.samplesPerPixel;\n const pixOffset = secondsToPixels(this.offset, this.samplesPerPixel, this.sampleRate);\n const scaleInfo = this.getScaleInfo(this.samplesPerPixel);\n const canvasInfo = {};\n const timeMarkers = [];\n const end = widthX + pixOffset;\n let counter = 0;\n\n for (let i = 0; i < end; i += (pixPerSec * scaleInfo.secondStep)) {\n const pixIndex = Math.floor(i);\n const pix = pixIndex - pixOffset;\n\n if (pixIndex >= pixOffset) {\n // put a timestamp every 30 seconds.\n if (scaleInfo.marker && (counter % scaleInfo.marker === 0)) {\n timeMarkers.push(h('div.time',\n {\n attributes: {\n style: `position: absolute; left: ${pix}px;`,\n },\n },\n [TimeScale.formatTime(counter)],\n ));\n\n canvasInfo[pix] = 10;\n } else if (scaleInfo.bigStep && (counter % scaleInfo.bigStep === 0)) {\n canvasInfo[pix] = 5;\n } else if (scaleInfo.smallStep && (counter % scaleInfo.smallStep === 0)) {\n canvasInfo[pix] = 2;\n }\n }\n\n counter += (1000 * scaleInfo.secondStep);\n }\n\n return h('div.playlist-time-scale',\n {\n attributes: {\n style: `position: relative; left: 0; right: 0; margin-left: ${this.marginLeft}px;`,\n },\n },\n [\n timeMarkers,\n h('canvas',\n {\n attributes: {\n width: widthX,\n height: 30,\n style: 'position: absolute; left: 0; right: 0; top: 0; bottom: 0;',\n },\n hook: new TimeScaleHook(canvasInfo, this.offset, this.samplesPerPixel,\n this.duration, this.colors),\n },\n ),\n ],\n );\n }\n}\n\nexport default TimeScale;\n\n\n\n// WEBPACK FOOTER //\n// ./src/TimeScale.js","/*\n* virtual-dom hook for rendering the time scale canvas.\n*/\nexport default class {\n constructor(tickInfo, offset, samplesPerPixel, duration, colors) {\n this.tickInfo = tickInfo;\n this.offset = offset;\n this.samplesPerPixel = samplesPerPixel;\n this.duration = duration;\n this.colors = colors;\n }\n\n hook(canvas, prop, prev) {\n // canvas is up to date\n if (prev !== undefined\n && (prev.offset === this.offset)\n && (prev.duration === this.duration)\n && (prev.samplesPerPixel === this.samplesPerPixel)) {\n return;\n }\n\n const width = canvas.width;\n const height = canvas.height;\n const ctx = canvas.getContext('2d');\n\n ctx.clearRect(0, 0, width, height);\n ctx.fillStyle = this.colors.timeColor;\n\n Object.keys(this.tickInfo).forEach((x) => {\n const scaleHeight = this.tickInfo[x];\n const scaleY = height - scaleHeight;\n ctx.fillRect(x, scaleY, 1, scaleHeight);\n });\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/render/TimeScaleHook.js","import _assign from 'lodash.assign';\nimport _forOwn from 'lodash.forown';\n\nimport uuid from 'uuid';\nimport h from 'virtual-dom/h';\n\nimport extractPeaks from 'webaudio-peaks';\nimport { FADEIN, FADEOUT } from 'fade-maker';\n\nimport { secondsToPixels, secondsToSamples } from './utils/conversions';\nimport stateClasses from './track/states';\n\nimport CanvasHook from './render/CanvasHook';\nimport FadeCanvasHook from './render/FadeCanvasHook';\nimport VolumeSliderHook from './render/VolumeSliderHook';\n\nconst MAX_CANVAS_WIDTH = 1000;\n\nexport default class {\n\n constructor() {\n this.name = 'Untitled';\n this.customClass = undefined;\n this.waveOutlineColor = undefined;\n this.gain = 1;\n this.fades = {};\n this.peakData = {\n type: 'WebAudio',\n mono: false,\n };\n\n this.cueIn = 0;\n this.cueOut = 0;\n this.duration = 0;\n this.startTime = 0;\n this.endTime = 0;\n this.stereoPan = 0;\n }\n\n setEventEmitter(ee) {\n this.ee = ee;\n }\n\n setName(name) {\n this.name = name;\n }\n\n setCustomClass(className) {\n this.customClass = className;\n }\n\n setWaveOutlineColor(color) {\n this.waveOutlineColor = color;\n }\n\n setCues(cueIn, cueOut) {\n if (cueOut < cueIn) {\n throw new Error('cue out cannot be less than cue in');\n }\n\n this.cueIn = cueIn;\n this.cueOut = cueOut;\n this.duration = this.cueOut - this.cueIn;\n this.endTime = this.startTime + this.duration;\n }\n\n /*\n * start, end in seconds relative to the entire playlist.\n */\n trim(start, end) {\n const trackStart = this.getStartTime();\n const trackEnd = this.getEndTime();\n const offset = this.cueIn - trackStart;\n\n if ((trackStart <= start && trackEnd >= start) ||\n (trackStart <= end && trackEnd >= end)) {\n const cueIn = (start < trackStart) ? trackStart : start;\n const cueOut = (end > trackEnd) ? trackEnd : end;\n\n this.setCues(cueIn + offset, cueOut + offset);\n if (start > trackStart) {\n this.setStartTime(start);\n }\n }\n }\n\n setStartTime(start) {\n this.startTime = start;\n this.endTime = start + this.duration;\n }\n\n setPlayout(playout) {\n this.playout = playout;\n }\n\n setOfflinePlayout(playout) {\n this.offlinePlayout = playout;\n }\n\n setEnabledStates(enabledStates = {}) {\n const defaultStatesEnabled = {\n cursor: true,\n fadein: true,\n fadeout: true,\n select: true,\n shift: true,\n };\n\n this.enabledStates = _assign({}, defaultStatesEnabled, enabledStates);\n }\n\n setFadeIn(duration, shape = 'logarithmic') {\n if (duration > this.duration) {\n throw new Error('Invalid Fade In');\n }\n\n const fade = {\n shape,\n start: 0,\n end: duration,\n };\n\n if (this.fadeIn) {\n this.removeFade(this.fadeIn);\n this.fadeIn = undefined;\n }\n\n this.fadeIn = this.saveFade(FADEIN, fade.shape, fade.start, fade.end);\n }\n\n setFadeOut(duration, shape = 'logarithmic') {\n if (duration > this.duration) {\n throw new Error('Invalid Fade Out');\n }\n\n const fade = {\n shape,\n start: this.duration - duration,\n end: this.duration,\n };\n\n if (this.fadeOut) {\n this.removeFade(this.fadeOut);\n this.fadeOut = undefined;\n }\n\n this.fadeOut = this.saveFade(FADEOUT, fade.shape, fade.start, fade.end);\n }\n\n saveFade(type, shape, start, end) {\n const id = uuid.v4();\n\n this.fades[id] = {\n type,\n shape,\n start,\n end,\n };\n\n return id;\n }\n\n removeFade(id) {\n delete this.fades[id];\n }\n\n setBuffer(buffer) {\n this.buffer = buffer;\n }\n\n setPeakData(data) {\n this.peakData = data;\n }\n\n calculatePeaks(samplesPerPixel, sampleRate) {\n const cueIn = secondsToSamples(this.cueIn, sampleRate);\n const cueOut = secondsToSamples(this.cueOut, sampleRate);\n\n this.setPeaks(extractPeaks(this.buffer, samplesPerPixel, this.peakData.mono, cueIn, cueOut));\n }\n\n setPeaks(peaks) {\n this.peaks = peaks;\n }\n\n setState(state) {\n this.state = state;\n\n if (this.state && this.enabledStates[this.state]) {\n const StateClass = stateClasses[this.state];\n this.stateObj = new StateClass(this);\n } else {\n this.stateObj = undefined;\n }\n }\n\n getStartTime() {\n return this.startTime;\n }\n\n getEndTime() {\n return this.endTime;\n }\n\n getDuration() {\n return this.duration;\n }\n\n isPlaying() {\n return this.playout.isPlaying();\n }\n\n setShouldPlay(bool) {\n this.playout.setShouldPlay(bool);\n }\n\n setGainLevel(level) {\n this.gain = level;\n this.playout.setVolumeGainLevel(level);\n }\n\n setMasterGainLevel(level) {\n this.playout.setMasterGainLevel(level);\n }\n\n setStereoPanValue(value) {\n this.stereoPan = value;\n this.playout.setStereoPanValue(value);\n }\n\n /*\n startTime, endTime in seconds (float).\n segment is for a highlighted section in the UI.\n\n returns a Promise that will resolve when the AudioBufferSource\n is either stopped or plays out naturally.\n */\n schedulePlay(now, startTime, endTime, config) {\n let start;\n let duration;\n let when = now;\n let segment = (endTime) ? (endTime - startTime) : undefined;\n\n const defaultOptions = {\n shouldPlay: true,\n masterGain: 1,\n isOffline: false,\n };\n\n const options = _assign({}, defaultOptions, config);\n const playoutSystem = options.isOffline ? this.offlinePlayout : this.playout;\n\n // 1) track has no content to play.\n // 2) track does not play in this selection.\n if ((this.endTime <= startTime) || (segment && (startTime + segment) < this.startTime)) {\n // return a resolved promise since this track is technically \"stopped\".\n return Promise.resolve();\n }\n\n // track should have something to play if it gets here.\n\n // the track starts in the future or on the cursor position\n if (this.startTime >= startTime) {\n start = 0;\n // schedule additional delay for this audio node.\n when += (this.startTime - startTime);\n\n if (endTime) {\n segment -= (this.startTime - startTime);\n duration = Math.min(segment, this.duration);\n } else {\n duration = this.duration;\n }\n } else {\n start = startTime - this.startTime;\n\n if (endTime) {\n duration = Math.min(segment, this.duration - start);\n } else {\n duration = this.duration - start;\n }\n }\n\n start += this.cueIn;\n const relPos = startTime - this.startTime;\n const sourcePromise = playoutSystem.setUpSource();\n\n // param relPos: cursor position in seconds relative to this track.\n // can be negative if the cursor is placed before the start of this track etc.\n _forOwn(this.fades, (fade) => {\n let fadeStart;\n let fadeDuration;\n\n // only apply fade if it's ahead of the cursor.\n if (relPos < fade.end) {\n if (relPos <= fade.start) {\n fadeStart = now + (fade.start - relPos);\n fadeDuration = fade.end - fade.start;\n } else if (relPos > fade.start && relPos < fade.end) {\n fadeStart = now - (relPos - fade.start);\n fadeDuration = fade.end - fade.start;\n }\n\n switch (fade.type) {\n case FADEIN: {\n playoutSystem.applyFadeIn(fadeStart, fadeDuration, fade.shape);\n break;\n }\n case FADEOUT: {\n playoutSystem.applyFadeOut(fadeStart, fadeDuration, fade.shape);\n break;\n }\n default: {\n throw new Error('Invalid fade type saved on track.');\n }\n }\n }\n });\n\n playoutSystem.setVolumeGainLevel(this.gain);\n playoutSystem.setShouldPlay(options.shouldPlay);\n playoutSystem.setMasterGainLevel(options.masterGain);\n playoutSystem.setStereoPanValue(this.stereoPan);\n playoutSystem.play(when, start, duration);\n\n return sourcePromise;\n }\n\n scheduleStop(when = 0) {\n this.playout.stop(when);\n }\n\n renderOverlay(data) {\n const channelPixels = secondsToPixels(data.playlistLength, data.resolution, data.sampleRate);\n\n const config = {\n attributes: {\n style: `position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: ${channelPixels}px; z-index: 9;`,\n },\n };\n\n let overlayClass = '';\n\n if (this.stateObj) {\n this.stateObj.setup(data.resolution, data.sampleRate);\n const StateClass = stateClasses[this.state];\n const events = StateClass.getEvents();\n\n events.forEach((event) => {\n config[`on${event}`] = this.stateObj[event].bind(this.stateObj);\n });\n\n overlayClass = StateClass.getClass();\n }\n // use this overlay for track event cursor position calculations.\n return h(`div.playlist-overlay${overlayClass}`, config);\n }\n\n renderControls(data) {\n const muteClass = data.muted ? '.active' : '';\n const soloClass = data.soloed ? '.active' : '';\n const numChan = this.peaks.data.length;\n\n return h('div.controls',\n {\n attributes: {\n style: `height: ${numChan * data.height}px; width: ${data.controls.width}px; position: absolute; left: 0; z-index: 10;`,\n },\n }, [\n h('header', [this.name]),\n h('div.btn-group', [\n h(`span.btn.btn-default.btn-xs.btn-mute${muteClass}`, {\n onclick: () => {\n this.ee.emit('mute', this);\n },\n }, ['Mute']),\n h(`span.btn.btn-default.btn-xs.btn-solo${soloClass}`, {\n onclick: () => {\n this.ee.emit('solo', this);\n },\n }, ['Solo']),\n ]),\n h('label', [\n h('input.volume-slider', {\n attributes: {\n type: 'range',\n min: 0,\n max: 100,\n value: 100,\n },\n hook: new VolumeSliderHook(this.gain),\n oninput: (e) => {\n this.ee.emit('volumechange', e.target.value, this);\n },\n }),\n ]),\n ],\n );\n }\n\n render(data) {\n const width = this.peaks.length;\n const playbackX = secondsToPixels(data.playbackSeconds, data.resolution, data.sampleRate);\n const startX = secondsToPixels(this.startTime, data.resolution, data.sampleRate);\n const endX = secondsToPixels(this.endTime, data.resolution, data.sampleRate);\n let progressWidth = 0;\n const numChan = this.peaks.data.length;\n const scale = window.devicePixelRatio;\n\n if (playbackX > 0 && playbackX > startX) {\n if (playbackX < endX) {\n progressWidth = playbackX - startX;\n } else {\n progressWidth = width;\n }\n }\n\n const waveformChildren = [\n h('div.cursor', {\n attributes: {\n style: `position: absolute; width: 1px; margin: 0; padding: 0; top: 0; left: ${playbackX}px; bottom: 0; z-index: 5;`,\n },\n }),\n ];\n\n const channels = Object.keys(this.peaks.data).map((channelNum) => {\n const channelChildren = [\n h('div.channel-progress', {\n attributes: {\n style: `position: absolute; width: ${progressWidth}px; height: ${data.height}px; z-index: 2;`,\n },\n }),\n ];\n let offset = 0;\n let totalWidth = width;\n const peaks = this.peaks.data[channelNum];\n\n while (totalWidth > 0) {\n const currentWidth = Math.min(totalWidth, MAX_CANVAS_WIDTH);\n const canvasColor = this.waveOutlineColor\n ? this.waveOutlineColor\n : data.colors.waveOutlineColor;\n\n channelChildren.push(h('canvas', {\n attributes: {\n width: currentWidth * scale,\n height: data.height * scale,\n style: `float: left; position: relative; margin: 0; padding: 0; z-index: 3; width: ${currentWidth}px; height: ${data.height}px;`,\n },\n hook: new CanvasHook(peaks, offset, this.peaks.bits, canvasColor, scale),\n }));\n\n totalWidth -= currentWidth;\n offset += MAX_CANVAS_WIDTH;\n }\n\n // if there are fades, display them.\n if (this.fadeIn) {\n const fadeIn = this.fades[this.fadeIn];\n const fadeWidth = secondsToPixels(\n fadeIn.end - fadeIn.start,\n data.resolution,\n data.sampleRate,\n );\n\n channelChildren.push(h('div.wp-fade.wp-fadein',\n {\n attributes: {\n style: `position: absolute; height: ${data.height}px; width: ${fadeWidth}px; top: 0; left: 0; z-index: 4;`,\n },\n }, [\n h('canvas',\n {\n attributes: {\n width: fadeWidth,\n height: data.height,\n },\n hook: new FadeCanvasHook(\n fadeIn.type,\n fadeIn.shape,\n fadeIn.end - fadeIn.start,\n data.resolution,\n ),\n },\n ),\n ],\n ));\n }\n\n if (this.fadeOut) {\n const fadeOut = this.fades[this.fadeOut];\n const fadeWidth = secondsToPixels(\n fadeOut.end - fadeOut.start,\n data.resolution,\n data.sampleRate,\n );\n\n channelChildren.push(h('div.wp-fade.wp-fadeout',\n {\n attributes: {\n style: `position: absolute; height: ${data.height}px; width: ${fadeWidth}px; top: 0; right: 0; z-index: 4;`,\n },\n },\n [\n h('canvas', {\n attributes: {\n width: fadeWidth,\n height: data.height,\n },\n hook: new FadeCanvasHook(\n fadeOut.type,\n fadeOut.shape,\n fadeOut.end - fadeOut.start,\n data.resolution,\n ),\n }),\n ],\n ));\n }\n\n return h(`div.channel.channel-${channelNum}`,\n {\n attributes: {\n style: `height: ${data.height}px; width: ${width}px; top: ${channelNum * data.height}px; left: ${startX}px; position: absolute; margin: 0; padding: 0; z-index: 1;`,\n },\n },\n channelChildren,\n );\n });\n\n waveformChildren.push(channels);\n waveformChildren.push(this.renderOverlay(data));\n\n // draw cursor selection on active track.\n if (data.isActive === true) {\n const cStartX = secondsToPixels(data.timeSelection.start, data.resolution, data.sampleRate);\n const cEndX = secondsToPixels(data.timeSelection.end, data.resolution, data.sampleRate);\n const cWidth = (cEndX - cStartX) + 1;\n const cClassName = (cWidth > 1) ? '.segment' : '.point';\n\n waveformChildren.push(h(`div.selection${cClassName}`, {\n attributes: {\n style: `position: absolute; width: ${cWidth}px; bottom: 0; top: 0; left: ${cStartX}px; z-index: 4;`,\n },\n }));\n }\n\n const waveform = h('div.waveform',\n {\n attributes: {\n style: `height: ${numChan * data.height}px; position: relative;`,\n },\n },\n waveformChildren,\n );\n\n const channelChildren = [];\n let channelMargin = 0;\n\n if (data.controls.show) {\n channelChildren.push(this.renderControls(data));\n channelMargin = data.controls.width;\n }\n\n channelChildren.push(waveform);\n\n const audibleClass = data.shouldPlay ? '' : '.silent';\n const customClass = (this.customClass === undefined) ? '' : `.${this.customClass}`;\n\n return h(`div.channel-wrapper${audibleClass}${customClass}`,\n {\n attributes: {\n style: `margin-left: ${channelMargin}px; height: ${data.height * numChan}px;`,\n },\n },\n channelChildren,\n );\n }\n\n getTrackDetails() {\n const info = {\n src: this.src,\n start: this.startTime,\n end: this.endTime,\n name: this.name,\n customClass: this.customClass,\n cuein: this.cueIn,\n cueout: this.cueOut,\n };\n\n if (this.fadeIn) {\n const fadeIn = this.fades[this.fadeIn];\n\n info.fadeIn = {\n shape: fadeIn.shape,\n duration: fadeIn.end - fadeIn.start,\n };\n }\n\n if (this.fadeOut) {\n const fadeOut = this.fades[this.fadeOut];\n\n info.fadeOut = {\n shape: fadeOut.shape,\n duration: fadeOut.end - fadeOut.start,\n };\n }\n\n return info;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Track.js","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forOwn(object, iteratee) {\n return object && baseForOwn(object, typeof iteratee == 'function' ? iteratee : identity);\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = forOwn;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.forown/index.js\n// module id = 69\n// module chunks = 0","// uuid.js\n//\n// Copyright (c) 2010-2012 Robert Kieffer\n// MIT License - http://opensource.org/licenses/mit-license.php\n\n// Unique ID creation requires a high quality random # generator. We feature\n// detect to determine the best RNG source, normalizing to a function that\n// returns 128-bits of randomness, since that's what's usually required\nvar _rng = require('./rng');\n\n// Maps for number <-> hex string conversion\nvar _byteToHex = [];\nvar _hexToByte = {};\nfor (var i = 0; i < 256; i++) {\n _byteToHex[i] = (i + 0x100).toString(16).substr(1);\n _hexToByte[_byteToHex[i]] = i;\n}\n\n// **`parse()` - Parse a UUID into it's component bytes**\nfunction parse(s, buf, offset) {\n var i = (buf && offset) || 0, ii = 0;\n\n buf = buf || [];\n s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {\n if (ii < 16) { // Don't overflow!\n buf[i + ii++] = _hexToByte[oct];\n }\n });\n\n // Zero out remaining bytes if string was short\n while (ii < 16) {\n buf[i + ii++] = 0;\n }\n\n return buf;\n}\n\n// **`unparse()` - Convert UUID byte array (ala parse()) into a string**\nfunction unparse(buf, offset) {\n var i = offset || 0, bth = _byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] + '-' +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]] +\n bth[buf[i++]] + bth[buf[i++]];\n}\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\n// random #'s we need to init node and clockseq\nvar _seedBytes = _rng();\n\n// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\nvar _nodeId = [\n _seedBytes[0] | 0x01,\n _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]\n];\n\n// Per 4.2.2, randomize (14 bit) clockseq\nvar _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;\n\n// Previous uuid creation time\nvar _lastMSecs = 0, _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n var node = options.node || _nodeId;\n for (var n = 0; n < 6; n++) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : unparse(b);\n}\n\n// **`v4()` - Generate random UUID**\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v4(options, buf, offset) {\n // Deprecated - 'format' argument, as supported in v1.2\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options == 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || _rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ii++) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || unparse(rnds);\n}\n\n// Export public API\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\nuuid.parse = parse;\nuuid.unparse = unparse;\n\nmodule.exports = uuid;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/uuid/uuid.js\n// module id = 70\n// module chunks = 0","\nvar rng;\n\nvar crypto = global.crypto || global.msCrypto; // for IE 11\nif (crypto && crypto.getRandomValues) {\n // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto\n // Moderately fast, high quality\n var _rnds8 = new Uint8Array(16);\n rng = function whatwgRNG() {\n crypto.getRandomValues(_rnds8);\n return _rnds8;\n };\n}\n\nif (!rng) {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var _rnds = new Array(16);\n rng = function() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return _rnds;\n };\n}\n\nmodule.exports = rng;\n\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/uuid/rng-browser.js\n// module id = 71\n// module chunks = 0","'use strict';\n\n//http://jsperf.com/typed-array-min-max/2\n//plain for loop for finding min/max is way faster than anything else.\n/**\n* @param {TypedArray} array - Subarray of audio to calculate peaks from.\n*/\nfunction findMinMax(array) {\n var min = Infinity;\n var max = -Infinity;\n var i = 0;\n var len = array.length;\n var curr;\n\n for(; i < len; i++) {\n curr = array[i];\n if (min > curr) {\n min = curr;\n }\n if (max < curr) {\n max = curr;\n }\n }\n\n return {\n min: min,\n max: max\n };\n}\n\n/**\n* @param {Number} n - peak to convert from float to Int8, Int16 etc.\n* @param {Number} bits - convert to #bits two's complement signed integer\n*/\nfunction convert(n, bits) {\n var max = Math.pow(2, bits-1);\n var v = n < 0 ? n * max : n * max - 1;\n return Math.max(-max, Math.min(max-1, v));\n}\n\n/**\n* @param {TypedArray} channel - Audio track frames to calculate peaks from.\n* @param {Number} samplesPerPixel - Audio frames per peak\n*/\nfunction extractPeaks(channel, samplesPerPixel, bits) {\n var i;\n var chanLength = channel.length;\n var numPeaks = Math.ceil(chanLength / samplesPerPixel);\n var start;\n var end;\n var segment;\n var max; \n var min;\n var extrema;\n\n //create interleaved array of min,max\n var peaks = new (eval(\"Int\"+bits+\"Array\"))(numPeaks*2);\n\n for (i = 0; i < numPeaks; i++) {\n\n start = i * samplesPerPixel;\n end = (i + 1) * samplesPerPixel > chanLength ? chanLength : (i + 1) * samplesPerPixel;\n\n segment = channel.subarray(start, end);\n extrema = findMinMax(segment);\n min = convert(extrema.min, bits);\n max = convert(extrema.max, bits);\n\n peaks[i*2] = min;\n peaks[i*2+1] = max;\n }\n\n return peaks;\n}\n\nfunction makeMono(channelPeaks, bits) {\n var numChan = channelPeaks.length;\n var weight = 1 / numChan;\n var numPeaks = channelPeaks[0].length / 2;\n var c = 0;\n var i = 0;\n var min;\n var max;\n var peaks = new (eval(\"Int\"+bits+\"Array\"))(numPeaks*2);\n\n for (i = 0; i < numPeaks; i++) {\n min = 0;\n max = 0;\n\n for (c = 0; c < numChan; c++) {\n min += weight * channelPeaks[c][i*2];\n max += weight * channelPeaks[c][i*2+1];\n }\n\n peaks[i*2] = min;\n peaks[i*2+1] = max;\n }\n\n //return in array so channel number counts still work.\n return [peaks];\n}\n\n/**\n* @param {AudioBuffer,TypedArray} source - Source of audio samples for peak calculations.\n* @param {Number} samplesPerPixel - Number of audio samples per peak.\n* @param {Number} cueIn - index in channel to start peak calculations from.\n* @param {Number} cueOut - index in channel to end peak calculations from (non-inclusive).\n*/\nmodule.exports = function(source, samplesPerPixel, isMono, cueIn, cueOut, bits) {\n samplesPerPixel = samplesPerPixel || 10000;\n bits = bits || 8;\n \n if (isMono === null || isMono === undefined) {\n isMono = true;\n }\n\n if ([8, 16, 32].indexOf(bits) < 0) {\n throw new Error(\"Invalid number of bits specified for peaks.\");\n }\n\n var numChan = source.numberOfChannels;\n var peaks = [];\n var c;\n var numPeaks;\n var channel;\n var slice;\n\n if (typeof source.subarray === \"undefined\") {\n for (c = 0; c < numChan; c++) {\n channel = source.getChannelData(c);\n cueIn = cueIn || 0;\n cueOut = cueOut || channel.length;\n slice = channel.subarray(cueIn, cueOut);\n peaks.push(extractPeaks(slice, samplesPerPixel, bits));\n }\n }\n else {\n cueIn = cueIn || 0;\n cueOut = cueOut || source.length;\n peaks.push(extractPeaks(source.subarray(cueIn, cueOut), samplesPerPixel, bits));\n }\n\n if (isMono && peaks.length > 1) {\n peaks = makeMono(peaks, bits);\n }\n\n numPeaks = peaks[0].length / 2;\n\n return {\n length: numPeaks,\n data: peaks,\n bits: bits\n };\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/webaudio-peaks/index.js\n// module id = 72\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FADEOUT = exports.FADEIN = exports.LOGARITHMIC = exports.EXPONENTIAL = exports.LINEAR = exports.SCURVE = undefined;\nexports.createFadeIn = createFadeIn;\nexports.createFadeOut = createFadeOut;\n\nvar _fadeCurves = require('fade-curves');\n\nvar SCURVE = exports.SCURVE = \"sCurve\";\nvar LINEAR = exports.LINEAR = \"linear\";\nvar EXPONENTIAL = exports.EXPONENTIAL = \"exponential\";\nvar LOGARITHMIC = exports.LOGARITHMIC = \"logarithmic\";\n\nvar FADEIN = exports.FADEIN = \"FadeIn\";\nvar FADEOUT = exports.FADEOUT = \"FadeOut\";\n\nfunction sCurveFadeIn(start, duration) {\n var curve = (0, _fadeCurves.sCurve)(10000, 1);\n this.setValueCurveAtTime(curve, start, duration);\n}\n\nfunction sCurveFadeOut(start, duration) {\n var curve = (0, _fadeCurves.sCurve)(10000, -1);\n this.setValueCurveAtTime(curve, start, duration);\n}\n\nfunction linearFadeIn(start, duration) {\n this.linearRampToValueAtTime(0, start);\n this.linearRampToValueAtTime(1, start + duration);\n}\n\nfunction linearFadeOut(start, duration) {\n this.linearRampToValueAtTime(1, start);\n this.linearRampToValueAtTime(0, start + duration);\n}\n\nfunction exponentialFadeIn(start, duration) {\n this.exponentialRampToValueAtTime(0.01, start);\n this.exponentialRampToValueAtTime(1, start + duration);\n}\n\nfunction exponentialFadeOut(start, duration) {\n this.exponentialRampToValueAtTime(1, start);\n this.exponentialRampToValueAtTime(0.01, start + duration);\n}\n\nfunction logarithmicFadeIn(start, duration) {\n var curve = (0, _fadeCurves.logarithmic)(10000, 10, 1);\n this.setValueCurveAtTime(curve, start, duration);\n}\n\nfunction logarithmicFadeOut(start, duration) {\n var curve = (0, _fadeCurves.logarithmic)(10000, 10, -1);\n this.setValueCurveAtTime(curve, start, duration);\n}\n\nfunction createFadeIn(gain, shape, start, duration) {\n switch (shape) {\n case SCURVE:\n sCurveFadeIn.call(gain, start, duration);\n break;\n case LINEAR:\n linearFadeIn.call(gain, start, duration);\n break;\n case EXPONENTIAL:\n exponentialFadeIn.call(gain, start, duration);\n break;\n case LOGARITHMIC:\n logarithmicFadeIn.call(gain, start, duration);\n break;\n default:\n throw new Error(\"Unsupported Fade type\");\n }\n}\n\nfunction createFadeOut(gain, shape, start, duration) {\n switch (shape) {\n case SCURVE:\n sCurveFadeOut.call(gain, start, duration);\n break;\n case LINEAR:\n linearFadeOut.call(gain, start, duration);\n break;\n case EXPONENTIAL:\n exponentialFadeOut.call(gain, start, duration);\n break;\n case LOGARITHMIC:\n logarithmicFadeOut.call(gain, start, duration);\n break;\n default:\n throw new Error(\"Unsupported Fade type\");\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fade-maker/index.js\n// module id = 73\n// module chunks = 0","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.linear = linear;\nexports.exponential = exponential;\nexports.sCurve = sCurve;\nexports.logarithmic = logarithmic;\nfunction linear(length, rotation) {\n var curve = new Float32Array(length),\n i,\n x,\n scale = length - 1;\n\n for (i = 0; i < length; i++) {\n x = i / scale;\n\n if (rotation > 0) {\n curve[i] = x;\n } else {\n curve[i] = 1 - x;\n }\n }\n\n return curve;\n}\n\nfunction exponential(length, rotation) {\n var curve = new Float32Array(length),\n i,\n x,\n scale = length - 1,\n index;\n\n for (i = 0; i < length; i++) {\n x = i / scale;\n index = rotation > 0 ? i : length - 1 - i;\n\n curve[index] = Math.exp(2 * x - 1) / Math.exp(1);\n }\n\n return curve;\n}\n\n//creating a curve to simulate an S-curve with setValueCurveAtTime.\nfunction sCurve(length, rotation) {\n var curve = new Float32Array(length),\n i,\n phase = rotation > 0 ? Math.PI / 2 : -(Math.PI / 2);\n\n for (i = 0; i < length; ++i) {\n curve[i] = Math.sin(Math.PI * i / length - phase) / 2 + 0.5;\n }\n return curve;\n}\n\n//creating a curve to simulate a logarithmic curve with setValueCurveAtTime.\nfunction logarithmic(length, base, rotation) {\n var curve = new Float32Array(length),\n index,\n x = 0,\n i;\n\n for (i = 0; i < length; i++) {\n //index for the curve array.\n index = rotation > 0 ? i : length - 1 - i;\n\n x = i / length;\n curve[index] = Math.log(1 + base * x) / Math.log(1 + base);\n }\n\n return curve;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/fade-curves/index.js\n// module id = 74\n// module chunks = 0","import cursor from './states/CursorState';\nimport select from './states/SelectState';\nimport shift from './states/ShiftState';\nimport fadein from './states/FadeInState';\nimport fadeout from './states/FadeOutState';\n\nexport default {\n cursor,\n select,\n shift,\n fadein,\n fadeout,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/states.js","import { pixelsToSeconds } from '../../utils/conversions';\n\nexport default class {\n constructor(track) {\n this.track = track;\n }\n\n setup(samplesPerPixel, sampleRate) {\n this.samplesPerPixel = samplesPerPixel;\n this.sampleRate = sampleRate;\n }\n\n click(e) {\n e.preventDefault();\n\n const startX = e.offsetX;\n const startTime = pixelsToSeconds(startX, this.samplesPerPixel, this.sampleRate);\n\n this.track.ee.emit('select', startTime, startTime, this.track);\n }\n\n static getClass() {\n return '.state-cursor';\n }\n\n static getEvents() {\n return ['click'];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/states/CursorState.js","import { pixelsToSeconds } from '../../utils/conversions';\n\nexport default class {\n constructor(track) {\n this.track = track;\n this.active = false;\n }\n\n setup(samplesPerPixel, sampleRate) {\n this.samplesPerPixel = samplesPerPixel;\n this.sampleRate = sampleRate;\n }\n\n emitSelection(x) {\n const minX = Math.min(x, this.startX);\n const maxX = Math.max(x, this.startX);\n const startTime = pixelsToSeconds(minX, this.samplesPerPixel, this.sampleRate);\n const endTime = pixelsToSeconds(maxX, this.samplesPerPixel, this.sampleRate);\n\n this.track.ee.emit('select', startTime, endTime, this.track);\n }\n\n complete(x) {\n this.emitSelection(x);\n this.active = false;\n }\n\n mousedown(e) {\n e.preventDefault();\n this.active = true;\n\n this.startX = e.offsetX;\n const startTime = pixelsToSeconds(this.startX, this.samplesPerPixel, this.sampleRate);\n\n this.track.ee.emit('select', startTime, startTime, this.track);\n }\n\n mousemove(e) {\n if (this.active) {\n e.preventDefault();\n this.emitSelection(e.offsetX);\n }\n }\n\n mouseup(e) {\n if (this.active) {\n e.preventDefault();\n this.complete(e.offsetX);\n }\n }\n\n mouseleave(e) {\n if (this.active) {\n e.preventDefault();\n this.complete(e.offsetX);\n }\n }\n\n static getClass() {\n return '.state-select';\n }\n\n static getEvents() {\n return ['mousedown', 'mousemove', 'mouseup', 'mouseleave'];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/states/SelectState.js","import { pixelsToSeconds } from '../../utils/conversions';\n\nexport default class {\n constructor(track) {\n this.track = track;\n this.active = false;\n }\n\n setup(samplesPerPixel, sampleRate) {\n this.samplesPerPixel = samplesPerPixel;\n this.sampleRate = sampleRate;\n }\n\n emitShift(x) {\n const deltaX = x - this.prevX;\n const deltaTime = pixelsToSeconds(deltaX, this.samplesPerPixel, this.sampleRate);\n this.prevX = x;\n this.track.ee.emit('shift', deltaTime, this.track);\n }\n\n complete(x) {\n this.emitShift(x);\n this.active = false;\n }\n\n mousedown(e) {\n e.preventDefault();\n\n this.active = true;\n this.el = e.target;\n this.prevX = e.offsetX;\n }\n\n mousemove(e) {\n if (this.active) {\n e.preventDefault();\n this.emitShift(e.offsetX);\n }\n }\n\n mouseup(e) {\n if (this.active) {\n e.preventDefault();\n this.complete(e.offsetX);\n }\n }\n\n mouseleave(e) {\n if (this.active) {\n e.preventDefault();\n this.complete(e.offsetX);\n }\n }\n\n static getClass() {\n return '.state-shift';\n }\n\n static getEvents() {\n return ['mousedown', 'mousemove', 'mouseup', 'mouseleave'];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/states/ShiftState.js","import { pixelsToSeconds } from '../../utils/conversions';\n\nexport default class {\n constructor(track) {\n this.track = track;\n }\n\n setup(samplesPerPixel, sampleRate) {\n this.samplesPerPixel = samplesPerPixel;\n this.sampleRate = sampleRate;\n }\n\n click(e) {\n const startX = e.offsetX;\n const time = pixelsToSeconds(startX, this.samplesPerPixel, this.sampleRate);\n\n if (time > this.track.getStartTime() && time < this.track.getEndTime()) {\n this.track.ee.emit('fadein', time - this.track.getStartTime(), this.track);\n }\n }\n\n static getClass() {\n return '.state-fadein';\n }\n\n static getEvents() {\n return ['click'];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/states/FadeInState.js","import { pixelsToSeconds } from '../../utils/conversions';\n\nexport default class {\n constructor(track) {\n this.track = track;\n }\n\n setup(samplesPerPixel, sampleRate) {\n this.samplesPerPixel = samplesPerPixel;\n this.sampleRate = sampleRate;\n }\n\n click(e) {\n const startX = e.offsetX;\n const time = pixelsToSeconds(startX, this.samplesPerPixel, this.sampleRate);\n\n if (time > this.track.getStartTime() && time < this.track.getEndTime()) {\n this.track.ee.emit('fadeout', this.track.getEndTime() - time, this.track);\n }\n }\n\n static getClass() {\n return '.state-fadeout';\n }\n\n static getEvents() {\n return ['click'];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/track/states/FadeOutState.js","/*\n* virtual-dom hook for drawing to the canvas element.\n*/\nclass CanvasHook {\n constructor(peaks, offset, bits, color, scale) {\n this.peaks = peaks;\n // http://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element\n this.offset = offset;\n this.color = color;\n this.bits = bits;\n this.scale = scale;\n }\n\n static drawFrame(cc, h2, x, minPeak, maxPeak) {\n const min = Math.abs(minPeak * h2);\n const max = Math.abs(maxPeak * h2);\n\n // draw max\n cc.fillRect(x, 0, 1, h2 - max);\n // draw min\n cc.fillRect(x, h2 + min, 1, h2 - min);\n }\n\n hook(canvas, prop, prev) {\n // canvas is up to date\n if (prev !== undefined &&\n (prev.peaks === this.peaks)) {\n return;\n }\n\n const scale = this.scale;\n const len = canvas.width / scale;\n const cc = canvas.getContext('2d');\n const h2 = canvas.height / scale / 2;\n const maxValue = 2 ** (this.bits - 1);\n\n cc.clearRect(0, 0, canvas.width, canvas.height);\n cc.fillStyle = this.color;\n cc.scale(scale, scale);\n\n for (let i = 0; i < len; i += 1) {\n const minPeak = this.peaks[(i + this.offset) * 2] / maxValue;\n const maxPeak = this.peaks[((i + this.offset) * 2) + 1] / maxValue;\n CanvasHook.drawFrame(cc, h2, i, minPeak, maxPeak);\n }\n }\n}\n\nexport default CanvasHook;\n\n\n\n// WEBPACK FOOTER //\n// ./src/render/CanvasHook.js","import { FADEIN, FADEOUT, SCURVE, LINEAR, EXPONENTIAL, LOGARITHMIC } from 'fade-maker';\nimport { sCurve, logarithmic, linear, exponential } from 'fade-curves';\n\n/*\n* virtual-dom hook for drawing the fade curve to the canvas element.\n*/\nclass FadeCanvasHook {\n constructor(type, shape, duration, samplesPerPixel) {\n this.type = type;\n this.shape = shape;\n this.duration = duration;\n this.samplesPerPixel = samplesPerPixel;\n }\n\n static createCurve(shape, type, width) {\n let reflection;\n let curve;\n\n switch (type) {\n case FADEIN: {\n reflection = 1;\n break;\n }\n case FADEOUT: {\n reflection = -1;\n break;\n }\n default: {\n throw new Error('Unsupported fade type.');\n }\n }\n\n switch (shape) {\n case SCURVE: {\n curve = sCurve(width, reflection);\n break;\n }\n case LINEAR: {\n curve = linear(width, reflection);\n break;\n }\n case EXPONENTIAL: {\n curve = exponential(width, reflection);\n break;\n }\n case LOGARITHMIC: {\n curve = logarithmic(width, 10, reflection);\n break;\n }\n default: {\n throw new Error('Unsupported fade shape');\n }\n }\n\n return curve;\n }\n\n hook(canvas, prop, prev) {\n // node is up to date.\n if (prev !== undefined &&\n prev.shape === this.shape &&\n prev.type === this.type &&\n prev.duration === this.duration &&\n prev.samplesPerPixel === this.samplesPerPixel) {\n return;\n }\n\n const ctx = canvas.getContext('2d');\n const width = canvas.width;\n const height = canvas.height;\n const curve = FadeCanvasHook.createCurve(this.shape, this.type, width);\n const len = curve.length;\n let y = height - (curve[0] * height);\n\n ctx.strokeStyle = 'black';\n ctx.beginPath();\n ctx.moveTo(0, y);\n\n for (let i = 1; i < len; i += 1) {\n y = height - (curve[i] * height);\n ctx.lineTo(i, y);\n }\n ctx.stroke();\n }\n}\n\nexport default FadeCanvasHook;\n\n\n\n// WEBPACK FOOTER //\n// ./src/render/FadeCanvasHook.js","/*\n* virtual-dom hook for setting the volume input programmatically.\n*/\nexport default class {\n constructor(gain) {\n this.gain = gain;\n }\n\n hook(volumeInput) {\n volumeInput.setAttribute('value', this.gain * 100);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/render/VolumeSliderHook.js","import { FADEIN, FADEOUT, createFadeIn, createFadeOut } from 'fade-maker';\n\nexport default class {\n\n constructor(ac, buffer) {\n this.ac = ac;\n this.gain = 1;\n this.buffer = buffer;\n this.destination = this.ac.destination;\n this.ac.createStereoPanner = ac.createStereoPanner || ac.createPanner;\n }\n\n applyFade(type, start, duration, shape = 'logarithmic') {\n if (type === FADEIN) {\n createFadeIn(this.fadeGain.gain, shape, start, duration);\n } else if (type === FADEOUT) {\n createFadeOut(this.fadeGain.gain, shape, start, duration);\n } else {\n throw new Error('Unsupported fade type');\n }\n }\n\n applyFadeIn(start, duration, shape = 'logarithmic') {\n this.applyFade(FADEIN, start, duration, shape);\n }\n\n applyFadeOut(start, duration, shape = 'logarithmic') {\n this.applyFade(FADEOUT, start, duration, shape);\n }\n\n isPlaying() {\n return this.source !== undefined;\n }\n\n getDuration() {\n return this.buffer.duration;\n }\n\n setAudioContext(ac) {\n this.ac = ac;\n this.ac.createStereoPanner = ac.createStereoPanner || ac.createPanner;\n this.destination = this.ac.destination;\n }\n\n setUpSource() {\n this.source = this.ac.createBufferSource();\n this.source.buffer = this.buffer;\n\n const sourcePromise = new Promise((resolve) => {\n // keep track of the buffer state.\n this.source.onended = () => {\n this.source.disconnect();\n this.fadeGain.disconnect();\n this.volumeGain.disconnect();\n this.shouldPlayGain.disconnect();\n this.panner.disconnect();\n this.masterGain.disconnect();\n\n\n this.source = undefined;\n this.fadeGain = undefined;\n this.volumeGain = undefined;\n this.shouldPlayGain = undefined;\n this.panner = undefined;\n this.masterGain = undefined;\n\n resolve();\n };\n });\n\n this.fadeGain = this.ac.createGain();\n // used for track volume slider\n this.volumeGain = this.ac.createGain();\n // used for solo/mute\n this.shouldPlayGain = this.ac.createGain();\n this.masterGain = this.ac.createGain();\n\n this.panner = this.ac.createStereoPanner();\n\n this.source.connect(this.fadeGain);\n this.fadeGain.connect(this.volumeGain);\n this.volumeGain.connect(this.shouldPlayGain);\n this.shouldPlayGain.connect(this.masterGain);\n this.masterGain.connect(this.panner);\n this.panner.connect(this.destination);\n\n return sourcePromise;\n }\n\n setVolumeGainLevel(level) {\n if (this.volumeGain) {\n this.volumeGain.gain.value = level;\n }\n }\n\n setShouldPlay(bool) {\n if (this.shouldPlayGain) {\n this.shouldPlayGain.gain.value = bool ? 1 : 0;\n }\n }\n\n setMasterGainLevel(level) {\n if (this.masterGain) {\n this.masterGain.gain.value = level;\n }\n }\n\n setStereoPanValue(value) {\n const pan = value === undefined ? 0 : value;\n\n if (this.panner) {\n if (this.panner.pan !== undefined) {\n this.panner.pan.value = pan;\n } else {\n this.panner.panningModel = 'equalpower';\n this.panner.setPosition(pan, 0, 1 - Math.abs(pan));\n }\n }\n }\n\n /*\n source.start is picky when passing the end time.\n If rounding error causes a number to make the source think\n it is playing slightly more samples than it has it won't play at all.\n Unfortunately it doesn't seem to work if you just give it a start time.\n */\n play(when, start, duration) {\n this.source.start(when, start, duration);\n }\n\n stop(when = 0) {\n if (this.source) {\n this.source.stop(when);\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Playout.js","import h from 'virtual-dom/h';\n\nimport inputAeneas from './input/aeneas';\nimport outputAeneas from './output/aeneas';\nimport { secondsToPixels } from '../utils/conversions';\nimport DragInteraction from '../interaction/DragInteraction';\nimport ScrollTopHook from './render/ScrollTopHook';\nimport timeformat from '../utils/timeformat';\n\nclass AnnotationList {\n constructor(playlist, annotations, controls = [], editable = false,\n linkEndpoints = false, isContinuousPlay = false) {\n this.playlist = playlist;\n this.resizeHandlers = [];\n this.editable = editable;\n this.annotations = annotations.map(a =>\n // TODO support different formats later on.\n inputAeneas(a),\n );\n this.setupInteractions();\n\n this.controls = controls;\n this.setupEE(playlist.ee);\n\n // TODO actually make a real plugin system that's not terrible.\n this.playlist.isContinuousPlay = isContinuousPlay;\n this.playlist.linkEndpoints = linkEndpoints;\n this.length = this.annotations.length;\n }\n\n setupInteractions() {\n this.annotations.forEach((a, i) => {\n const leftShift = new DragInteraction(this.playlist, {\n direction: 'left',\n index: i,\n });\n const rightShift = new DragInteraction(this.playlist, {\n direction: 'right',\n index: i,\n });\n\n this.resizeHandlers.push(leftShift);\n this.resizeHandlers.push(rightShift);\n });\n }\n\n setupEE(ee) {\n ee.on('dragged', (deltaTime, data) => {\n const annotationIndex = data.index;\n const annotations = this.annotations;\n const note = annotations[annotationIndex];\n\n // resizing to the left\n if (data.direction === 'left') {\n const originalVal = note.start;\n note.start += deltaTime;\n\n if (note.start < 0) {\n note.start = 0;\n }\n\n if (annotationIndex &&\n (annotations[annotationIndex - 1].end > note.start)) {\n annotations[annotationIndex - 1].end = note.start;\n }\n\n if (this.playlist.linkEndpoints &&\n annotationIndex &&\n (annotations[annotationIndex - 1].end === originalVal)) {\n annotations[annotationIndex - 1].end = note.start;\n }\n } else {\n // resizing to the right\n const originalVal = note.end;\n note.end += deltaTime;\n\n if (note.end > this.playlist.duration) {\n note.end = this.playlist.duration;\n }\n\n if (annotationIndex < (annotations.length - 1) &&\n (annotations[annotationIndex + 1].start < note.end)) {\n annotations[annotationIndex + 1].start = note.end;\n }\n\n if (this.playlist.linkEndpoints &&\n (annotationIndex < (annotations.length - 1)) &&\n (annotations[annotationIndex + 1].start === originalVal)) {\n annotations[annotationIndex + 1].start = note.end;\n }\n }\n\n this.playlist.drawRequest();\n });\n\n ee.on('continuousplay', (val) => {\n this.playlist.isContinuousPlay = val;\n });\n\n ee.on('linkendpoints', (val) => {\n this.playlist.linkEndpoints = val;\n });\n\n ee.on('annotationsrequest', () => {\n this.export();\n });\n\n return ee;\n }\n\n export() {\n const output = this.annotations.map(a => outputAeneas(a));\n const dataStr = `data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(output))}`;\n const a = document.createElement('a');\n\n document.body.appendChild(a);\n a.href = dataStr;\n a.download = 'annotations.json';\n a.click();\n document.body.removeChild(a);\n }\n\n renderResizeLeft(i) {\n const events = DragInteraction.getEvents();\n const config = { attributes: {\n style: 'position: absolute; height: 30px; width: 10px; top: 0; left: -2px',\n draggable: true,\n } };\n const handler = this.resizeHandlers[i * 2];\n\n events.forEach((event) => {\n config[`on${event}`] = handler[event].bind(handler);\n });\n\n return h('div.resize-handle.resize-w', config);\n }\n\n renderResizeRight(i) {\n const events = DragInteraction.getEvents();\n const config = { attributes: {\n style: 'position: absolute; height: 30px; width: 10px; top: 0; right: -2px',\n draggable: true,\n } };\n const handler = this.resizeHandlers[(i * 2) + 1];\n\n events.forEach((event) => {\n config[`on${event}`] = handler[event].bind(handler);\n });\n\n return h('div.resize-handle.resize-e', config);\n }\n\n renderControls(note, i) {\n // seems to be a bug with references, or I'm missing something.\n const that = this;\n return this.controls.map(ctrl =>\n h(`i.${ctrl.class}`, {\n attributes: {\n title: ctrl.title,\n },\n onclick: () => {\n ctrl.action(note, i, that.annotations, {\n linkEndpoints: that.playlist.linkEndpoints,\n });\n this.setupInteractions();\n that.playlist.drawRequest();\n },\n }),\n );\n }\n\n render() {\n const boxes = h('div.annotations-boxes',\n {\n attributes: {\n style: 'height: 30px;',\n },\n },\n this.annotations.map((note, i) => {\n const samplesPerPixel = this.playlist.samplesPerPixel;\n const sampleRate = this.playlist.sampleRate;\n const pixPerSec = sampleRate / samplesPerPixel;\n const pixOffset = secondsToPixels(this.playlist.scrollLeft, samplesPerPixel, sampleRate);\n const left = Math.floor((note.start * pixPerSec) - pixOffset);\n const width = Math.ceil((note.end * pixPerSec) - (note.start * pixPerSec));\n\n return h('div.annotation-box',\n {\n attributes: {\n style: `position: absolute; height: 30px; width: ${width}px; left: ${left}px`,\n 'data-id': note.id,\n },\n },\n [\n this.renderResizeLeft(i),\n h('span.id',\n {\n onclick: () => {\n if (this.playlist.isContinuousPlay) {\n this.playlist.ee.emit('play', this.annotations[i].start);\n } else {\n this.playlist.ee.emit('play', this.annotations[i].start, this.annotations[i].end);\n }\n },\n },\n [\n note.id,\n ],\n ),\n this.renderResizeRight(i),\n ],\n );\n }),\n );\n\n const boxesWrapper = h('div.annotations-boxes-wrapper',\n {\n attributes: {\n style: 'overflow: hidden;',\n },\n },\n [\n boxes,\n ],\n );\n\n const text = h('div.annotations-text',\n {\n hook: new ScrollTopHook(),\n },\n this.annotations.map((note, i) => {\n const format = timeformat(this.playlist.durationFormat);\n const start = format(note.start);\n const end = format(note.end);\n\n\n let segmentClass = '';\n if (this.playlist.isPlaying() &&\n (this.playlist.playbackSeconds >= note.start) &&\n (this.playlist.playbackSeconds <= note.end)) {\n segmentClass = '.current';\n }\n\n const editableConfig = {\n attributes: {\n contenteditable: true,\n },\n oninput: (e) => {\n // needed currently for references\n // eslint-disable-next-line no-param-reassign\n note.lines = [e.target.innerText];\n },\n onkeypress: (e) => {\n if (e.which === 13 || e.keyCode === 13) {\n e.target.blur();\n e.preventDefault();\n }\n },\n };\n\n const linesConfig = this.editable ? editableConfig : {};\n\n return h(`div.annotation${segmentClass}`,\n [\n h('span.annotation-id', [\n note.id,\n ]),\n h('span.annotation-start', [\n start,\n ]),\n h('span.annotation-end', [\n end,\n ]),\n h('span.annotation-lines',\n linesConfig,\n [\n note.lines,\n ],\n ),\n h('span.annotation-actions',\n this.renderControls(note, i),\n ),\n ],\n );\n }),\n );\n\n return h('div.annotations',\n [\n boxesWrapper,\n text,\n ],\n );\n }\n}\n\nexport default AnnotationList;\n\n\n\n// WEBPACK FOOTER //\n// ./src/annotation/AnnotationList.js","/*\n{\n \"begin\": \"5.759\",\n \"end\": \"9.155\",\n \"id\": \"002\",\n \"language\": \"en\",\n \"lines\": [\n \"I just wanted to hold\"\n ]\n},\n */\n\nimport uuid from 'uuid';\n\nexport default function (aeneas) {\n const annotation = {\n id: aeneas.id || uuid.v4(),\n start: Number(aeneas.begin) || 0,\n end: Number(aeneas.end) || 0,\n lines: aeneas.lines || [''],\n lang: aeneas.language || 'en',\n };\n\n return annotation;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/annotation/input/aeneas.js","/*\n{\n \"begin\": \"5.759\",\n \"end\": \"9.155\",\n \"id\": \"002\",\n \"language\": \"en\",\n \"lines\": [\n \"I just wanted to hold\"\n ]\n},\n */\n\nexport default function (annotation) {\n return {\n begin: String(annotation.start.toFixed(3)),\n end: String(annotation.end.toFixed(3)),\n id: String(annotation.id),\n language: annotation.lang,\n lines: annotation.lines,\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/annotation/output/aeneas.js","import { pixelsToSeconds } from '../utils/conversions';\n\nexport default class {\n constructor(playlist, data = {}) {\n this.playlist = playlist;\n this.data = data;\n this.active = false;\n\n this.ondragover = (e) => {\n if (this.active) {\n e.preventDefault();\n this.emitDrag(e.clientX);\n }\n };\n }\n\n emitDrag(x) {\n const deltaX = x - this.prevX;\n\n // emit shift event if not 0\n if (deltaX) {\n const deltaTime = pixelsToSeconds(\n deltaX,\n this.playlist.samplesPerPixel,\n this.playlist.sampleRate,\n );\n this.prevX = x;\n this.playlist.ee.emit('dragged', deltaTime, this.data);\n }\n }\n\n complete() {\n this.active = false;\n document.removeEventListener('dragover', this.ondragover);\n }\n\n dragstart(e) {\n const ev = e;\n this.active = true;\n this.prevX = e.clientX;\n\n ev.dataTransfer.dropEffect = 'move';\n ev.dataTransfer.effectAllowed = 'move';\n ev.dataTransfer.setData('text/plain', '');\n document.addEventListener('dragover', this.ondragover);\n }\n\n dragend(e) {\n if (this.active) {\n e.preventDefault();\n this.complete();\n }\n }\n\n static getClass() {\n return '.shift';\n }\n\n static getEvents() {\n return ['dragstart', 'dragend'];\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/interaction/DragInteraction.js","/*\n* virtual-dom hook for scrolling to the text annotation.\n*/\nconst Hook = function ScrollTopHook() {};\nHook.prototype.hook = function hook(node) {\n const el = node.querySelector('.current');\n if (el) {\n const box = node.getBoundingClientRect();\n const row = el.getBoundingClientRect();\n const diff = row.top - box.top;\n const list = node;\n list.scrollTop += diff;\n }\n};\n\nexport default Hook;\n\n\n\n// WEBPACK FOOTER //\n// ./src/annotation/render/ScrollTopHook.js","export default function (format) {\n function clockFormat(seconds, decimals) {\n const hours = parseInt(seconds / 3600, 10) % 24;\n const minutes = parseInt(seconds / 60, 10) % 60;\n const secs = (seconds % 60).toFixed(decimals);\n\n const sHours = (hours < 10) ? `0${hours}` : hours;\n const sMinutes = (minutes < 10) ? `0${minutes}` : minutes;\n const sSeconds = (secs < 10) ? `0${secs}` : secs;\n\n return `${sHours}:${sMinutes}:${sSeconds}`;\n }\n\n const formats = {\n seconds(seconds) {\n return seconds.toFixed(0);\n },\n thousandths(seconds) {\n return seconds.toFixed(3);\n },\n 'hh:mm:ss': function hhmmss(seconds) {\n return clockFormat(seconds, 0);\n },\n 'hh:mm:ss.u': function hhmmssu(seconds) {\n return clockFormat(seconds, 1);\n },\n 'hh:mm:ss.uu': function hhmmssuu(seconds) {\n return clockFormat(seconds, 2);\n },\n 'hh:mm:ss.uuu': function hhmmssuuu(seconds) {\n return clockFormat(seconds, 3);\n },\n };\n\n return formats[format];\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/timeformat.js","export default function () {\n // http://jsperf.com/typed-array-min-max/2\n // plain for loop for finding min/max is way faster than anything else.\n /**\n * @param {TypedArray} array - Subarray of audio to calculate peaks from.\n */\n function findMinMax(array) {\n let min = Infinity;\n let max = -Infinity;\n let curr;\n\n for (let i = 0; i < array.length; i += 1) {\n curr = array[i];\n if (min > curr) {\n min = curr;\n }\n if (max < curr) {\n max = curr;\n }\n }\n\n return {\n min,\n max,\n };\n }\n\n /**\n * @param {Number} n - peak to convert from float to Int8, Int16 etc.\n * @param {Number} bits - convert to #bits two's complement signed integer\n */\n function convert(n, bits) {\n const max = 2 ** (bits - 1);\n const v = n < 0 ? (n * max) : (n * max) - 1;\n return Math.max(-max, Math.min(max - 1, v));\n }\n\n /**\n * @param {TypedArray} channel - Audio track frames to calculate peaks from.\n * @param {Number} samplesPerPixel - Audio frames per peak\n */\n function extractPeaks(channel, samplesPerPixel, bits) {\n const chanLength = channel.length;\n const numPeaks = Math.ceil(chanLength / samplesPerPixel);\n let start;\n let end;\n let segment;\n let max;\n let min;\n let extrema;\n\n // create interleaved array of min,max\n const peaks = new self[`Int${bits}Array`](numPeaks * 2);\n\n for (let i = 0; i < numPeaks; i += 1) {\n start = i * samplesPerPixel;\n end = (i + 1) * samplesPerPixel > chanLength ? chanLength : (i + 1) * samplesPerPixel;\n\n segment = channel.subarray(start, end);\n extrema = findMinMax(segment);\n min = convert(extrema.min, bits);\n max = convert(extrema.max, bits);\n\n peaks[i * 2] = min;\n peaks[(i * 2) + 1] = max;\n }\n\n return peaks;\n }\n\n /**\n * @param {TypedArray} source - Source of audio samples for peak calculations.\n * @param {Number} samplesPerPixel - Number of audio samples per peak.\n * @param {Number} cueIn - index in channel to start peak calculations from.\n * @param {Number} cueOut - index in channel to end peak calculations from (non-inclusive).\n */\n function audioPeaks(source, samplesPerPixel = 10000, bits = 8) {\n if ([8, 16, 32].indexOf(bits) < 0) {\n throw new Error('Invalid number of bits specified for peaks.');\n }\n\n const peaks = [];\n const start = 0;\n const end = source.length;\n peaks.push(extractPeaks(source.subarray(start, end), samplesPerPixel, bits));\n\n const length = peaks[0].length / 2;\n\n return {\n bits,\n length,\n data: peaks,\n };\n }\n\n onmessage = function onmessage(e) {\n const peaks = audioPeaks(e.data.samples, e.data.samplesPerPixel);\n\n postMessage(peaks);\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/recorderWorker.js","export default function () {\n let recLength = 0;\n let recBuffersL = [];\n let recBuffersR = [];\n let sampleRate;\n\n function init(config) {\n sampleRate = config.sampleRate;\n }\n\n function record(inputBuffer) {\n recBuffersL.push(inputBuffer[0]);\n recBuffersR.push(inputBuffer[1]);\n recLength += inputBuffer[0].length;\n }\n\n function writeString(view, offset, string) {\n for (let i = 0; i < string.length; i += 1) {\n view.setUint8(offset + i, string.charCodeAt(i));\n }\n }\n\n function floatTo16BitPCM(output, offset, input) {\n let writeOffset = offset;\n for (let i = 0; i < input.length; i += 1, writeOffset += 2) {\n const s = Math.max(-1, Math.min(1, input[i]));\n output.setInt16(writeOffset, s < 0 ? s * 0x8000 : s * 0x7FFF, true);\n }\n }\n\n function encodeWAV(samples, mono = false) {\n const buffer = new ArrayBuffer(44 + (samples.length * 2));\n const view = new DataView(buffer);\n\n /* RIFF identifier */\n writeString(view, 0, 'RIFF');\n /* file length */\n view.setUint32(4, 32 + (samples.length * 2), true);\n /* RIFF type */\n writeString(view, 8, 'WAVE');\n /* format chunk identifier */\n writeString(view, 12, 'fmt ');\n /* format chunk length */\n view.setUint32(16, 16, true);\n /* sample format (raw) */\n view.setUint16(20, 1, true);\n /* channel count */\n view.setUint16(22, mono ? 1 : 2, true);\n /* sample rate */\n view.setUint32(24, sampleRate, true);\n /* byte rate (sample rate * block align) */\n view.setUint32(28, sampleRate * 4, true);\n /* block align (channel count * bytes per sample) */\n view.setUint16(32, 4, true);\n /* bits per sample */\n view.setUint16(34, 16, true);\n /* data chunk identifier */\n writeString(view, 36, 'data');\n /* data chunk length */\n view.setUint32(40, samples.length * 2, true);\n\n floatTo16BitPCM(view, 44, samples);\n\n return view;\n }\n\n function mergeBuffers(recBuffers, length) {\n const result = new Float32Array(length);\n let offset = 0;\n\n for (let i = 0; i < recBuffers.length; i += 1) {\n result.set(recBuffers[i], offset);\n offset += recBuffers[i].length;\n }\n return result;\n }\n\n function interleave(inputL, inputR) {\n const length = inputL.length + inputR.length;\n const result = new Float32Array(length);\n\n let index = 0;\n let inputIndex = 0;\n\n while (index < length) {\n result[index += 1] = inputL[inputIndex];\n result[index += 1] = inputR[inputIndex];\n inputIndex += 1;\n }\n\n return result;\n }\n\n function exportWAV(type) {\n const bufferL = mergeBuffers(recBuffersL, recLength);\n const bufferR = mergeBuffers(recBuffersR, recLength);\n const interleaved = interleave(bufferL, bufferR);\n const dataview = encodeWAV(interleaved);\n const audioBlob = new Blob([dataview], { type });\n\n postMessage(audioBlob);\n }\n\n function clear() {\n recLength = 0;\n recBuffersL = [];\n recBuffersR = [];\n }\n\n onmessage = function onmessage(e) {\n switch (e.data.command) {\n case 'init': {\n init(e.data.config);\n break;\n }\n case 'record': {\n record(e.data.buffer);\n break;\n }\n case 'exportWAV': {\n exportWAV(e.data.type);\n break;\n }\n case 'clear': {\n clear();\n break;\n }\n default: {\n throw new Error('Unknown export worker command');\n }\n }\n };\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils/exportWavWorker.js"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 5945495..d3632c2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -66,7 +66,7 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] -html_css_files = ["css/custom.css"] +html_css_files = ["css/custom.css", "css/waveform-list.css"] source_suffix = ['.py', '.rst'] master_doc = 'index' diff --git a/docs/source/demo.rst b/docs/source/demo.rst new file mode 100644 index 0000000..e064590 --- /dev/null +++ b/docs/source/demo.rst @@ -0,0 +1,43 @@ +Demonstration +============= + + +葬予規路火烌猶在 - 柯拉琪 Collage +------------------------------- + +.. raw:: html + + + + +Last Stardust Piano Ver. - Animenz +--------------------------------- + +.. raw:: html + + + + +Self Spiral - The Surrealist +---------------------------- +A pure instrumental piece. + +.. raw:: html + + + + +Question Everything - Dreamshade +-------------------------------- + +.. raw:: html + + + + +Cosmo Funk - Snail's House +-------------------------- + +.. raw:: html + + diff --git a/docs/source/index.rst b/docs/source/index.rst index 0ac67c9..cb457a3 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -92,8 +92,7 @@ You can use *Audacity* to open the files. quick-start.rst tutorial.rst - add-new-modules.rst - + demo.rst .. toctree:: :maxdepth: 2 From 907fcc3f2883c24a3545d4ff1cc6a0f1513f660a Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Wed, 26 May 2021 13:18:21 +0800 Subject: [PATCH 08/23] Shoten the length of onsets and degrade the value more faster --- omnizart/music/labels.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omnizart/music/labels.py b/omnizart/music/labels.py index aa914ff..265fae8 100755 --- a/omnizart/music/labels.py +++ b/omnizart/music/labels.py @@ -260,7 +260,7 @@ def process(cls, label_list, out_path, t_unit=0.02, onset_len_sec=0.05): print("") @classmethod - def extract_label(cls, label_path, t_unit, onset_len_sec=0.05): + def extract_label(cls, label_path, t_unit, onset_len_sec=0.03): """Extract labels into customized storage format. Process the given path of label into list of :class:`Label` instances, @@ -282,12 +282,12 @@ def extract_label(cls, label_path, t_unit, onset_len_sec=0.05): end_note = max(label_list, key=lambda label: label.end_time) num_frm = int(round(end_note.end_time / t_unit)) label_obj = [{} for _ in range(num_frm)] + onset_len_frm = int(round(onset_len_sec / t_unit)) for label in label_list: start_frm = int(round(label.start_time / t_unit)) end_frm = int(round(label.end_time / t_unit)) pitch = str(label.note - LOWEST_MIDI_NOTE) onset_value = 1 - onset_len_frm = int(round(onset_len_sec / t_unit)) for idx, frm_idx in enumerate(range(start_frm, end_frm)): if pitch not in label_obj[frm_idx]: label_obj[frm_idx][pitch] = {} @@ -295,7 +295,7 @@ def extract_label(cls, label_path, t_unit, onset_len_sec=0.05): # Decrease the onset probability if idx >= onset_len_frm and onset_value > 1e-5: - onset_value /= idx + onset_value = 1 / pow(idx, 2) return label_obj @classmethod From b6252a5c9eda36a549d416e31e049181b09080c7 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Wed, 26 May 2021 13:19:50 +0800 Subject: [PATCH 09/23] Modify the way of feeding the feature slices with overlapping --- omnizart/music/prediction.py | 126 ++++++++++++++++++++++++++++++++++- 1 file changed, 123 insertions(+), 3 deletions(-) diff --git a/omnizart/music/prediction.py b/omnizart/music/prediction.py index 9b6397e..e16e850 100644 --- a/omnizart/music/prediction.py +++ b/omnizart/music/prediction.py @@ -29,7 +29,7 @@ def cut_batch_pred(b_pred): return np.array(cut_pp) -def create_batches(feature, b_size, timesteps, feature_num=384): +def create_batches_old(feature, b_size, timesteps, feature_num=384): frms = np.ceil(len(feature) / timesteps) bss = np.ceil(frms / b_size).astype("int") @@ -55,7 +55,127 @@ def create_batches(feature, b_size, timesteps, feature_num=384): return batch -def predict(feature, model, timesteps=128, feature_num=384, batch_size=4): +def create_batches(feature, timesteps, b_size=8, step_size=10): + """Create a series of batch input. + + The size of the last batch could smaller than the given ``b_size``. + + Parameters + ---------- + feature: numpy.ndarray + The only constraint is the first dimension should time index. There is no limit + on the number of dimensions. + timesteps: int + Input feature length of the model. + b_size: int + Batch size of the input. + step_size: int + Step size for hopping the feature. Value smaller than ``timesteps`` indicates there + will be overlapping between each feature slice. + + Returns + ------- + batches: list + List of input batches. + """ + step_size = max(1, min(timesteps, step_size)) + batches = [] + batch = [] + cur_len = 0 + for idx in range(0, len(feature)-timesteps, step_size): + feat = feature[idx:idx+timesteps] + batch.append(feat) + cur_len += timesteps + if len(batch) == b_size: + batches.append(batch) + batch = [] + + feat = feature[cur_len:] + if len(feat) < timesteps: + pad = np.zeros((timesteps-len(feat),)+feat.shape[1:]) + feat = np.concatenate([feat, pad]) + + if len(batches[-1]) < b_size: + batches[-1].append(feat) + else: + batches.append([feat]) + + return batches + + +def merge_batches(batches, step_size=10): + """Reverse process of ``create_batches``. + + Merge the list of batch predictions into the complete predicted results. + + Parameters + ---------- + batches: numpy.ndarray + List of predicted batches. + step_size: int + Should be the same as passing to ``create_batches``. + + Returns + ------- + pred: numpy.ndarray + The final predicted results. + """ + total_slice = 0 + for batch in batches: + total_slice += len(batch) + + pred_shape = batches[0][0].shape + out_len = (total_slice - 1) * step_size + pred_shape[0] + output = np.zeros((out_len,) + pred_shape[1:]) + idx = 0 + for batch in batches: + for pred in batch: + start = idx * step_size + end = start + pred_shape[0] + output[start:end] += pred + idx += 1 + + mask = np.zeros_like(output) + for idx in range(0, out_len-pred_shape[0]+1, step_size): + mask[idx:idx+pred_shape[0]] += 1 + output /= mask + + return output + + +def predict(feature, model, timesteps=128, batch_size=4, step_size=64): + """Make predictions on the feature. + + Generate predictions by using the loaded model. + + Parameters + ---------- + feature: numpy.ndarray + Extracted feature of the audio. Dimension: timesteps x feature_size x channels + model: keras.Model + The loaded model instance. + batch_size: int + Batch size for the prediction iteration. + step_size: int + Step size for hopping the feature. Value smaller then ``timesteps`` means there will be + overlapping. + + Returns + ------- + pred: numpy.ndarray + The predicted results. + """ + batches = create_batches(feature, timesteps, b_size=batch_size, step_size=step_size) + batch_pred = [] + for idx, batch in enumerate(batches): + print(f"{idx+1}/{len(batches)}", end='\r') + pred = model.predict(np.array(batch)) + batch_pred.append(expit(pred)) + pred = merge_batches(batch_pred, step_size=step_size) + return pred + + +def predict_old(feature, model, timesteps=128, feature_num=384, batch_size=4): """Make predictions on the feature. Generate predictions by using the loaded model. @@ -79,7 +199,7 @@ def predict(feature, model, timesteps=128, feature_num=384, batch_size=4): """ # Create batches of the feature - features = create_batches(feature, b_size=batch_size, timesteps=timesteps, feature_num=feature_num) + features = create_batches_old(feature, b_size=batch_size, timesteps=timesteps, feature_num=feature_num) # Container for the batch prediction pred = [] From fac2d2e27891b840c96e6cde82057901d5e4bf30 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Wed, 26 May 2021 13:20:42 +0800 Subject: [PATCH 10/23] Minor updates of peak finding parameters --- omnizart/music/inference.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/omnizart/music/inference.py b/omnizart/music/inference.py index 9b082ed..143ecaf 100644 --- a/omnizart/music/inference.py +++ b/omnizart/music/inference.py @@ -80,29 +80,28 @@ def down_sample(pred, occur_num=3): return d_sample -def infer_pitch(pitch, shortest=5, offset_interval=6): +def infer_pitch(pitch, shortest=7, offset_interval=6): w_on = pitch[:, 2] w_dura = pitch[:, 1] - peaks, _ = find_peaks(w_on, distance=shortest, width=5) + peaks, _ = find_peaks(w_on, distance=shortest, width=3) if len(peaks) == 0: return [] notes = [] - adjust = 5 if shortest == 10 else 2 for i in range(len(peaks) - 1): - notes.append({"start": peaks[i] - adjust, "end": peaks[i + 1] - adjust, "stren": pitch[peaks[i], 2]}) - notes.append({"start": peaks[-1] - adjust, "end": len(w_on) - adjust, "stren": pitch[peaks[-1], 2]}) + notes.append({"start": peaks[i], "end": peaks[i + 1], "stren": pitch[peaks[i], 2]}) + notes.append({"start": peaks[-1], "end": len(w_on), "stren": pitch[peaks[-1], 2]}) del_idx = [] for idx, peak in enumerate(peaks): upper = int(peaks[idx + 1]) if idx < len(peaks) - 1 else len(w_dura) for i in range(peak, upper): if np.sum(w_dura[i:i + offset_interval]) == 0: - if i - notes[idx]["start"] - adjust < shortest - 1: + if i - notes[idx]["start"] < shortest - 1: del_idx.append(idx) else: - notes[idx]["end"] = i - adjust + notes[idx]["end"] = i break for ii, i in enumerate(del_idx): @@ -111,7 +110,7 @@ def infer_pitch(pitch, shortest=5, offset_interval=6): return notes -def infer_piece(piece, shortest_sec=0.1, offset_sec=0.12, t_unit=0.02): +def infer_piece(piece, shortest_sec=0.05, offset_sec=0.12, t_unit=0.02): """ Dim: time x 88 x 4 (off, dura, onset, offset) """ @@ -329,7 +328,7 @@ def note_inference( mode="note", onset_th=7.5, lower_onset_th=None, - split_bound=36, + split_bound=25, dura_th=2, frm_th=1, normalize=True, From afbc09f0ffdcec10c8b9c9ca7aa1a6ab44964eb9 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Wed, 26 May 2021 13:25:55 +0800 Subject: [PATCH 11/23] Add value of prediction's entropy to smooth loss --- omnizart/music/losses.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/omnizart/music/losses.py b/omnizart/music/losses.py index 223d49e..bf3e500 100644 --- a/omnizart/music/losses.py +++ b/omnizart/music/losses.py @@ -56,10 +56,10 @@ def q_func(y_true, gamma=0.1, total_chs=22): return (1-gamma) * y_true + gamma/total_chs # noqa: E226 -def smooth_loss(y_true, y_pred, gamma=0.15, total_chs=22): +def smooth_loss(y_true, y_pred, gamma=0.15, total_chs=22, weight=None): """Function to compute loss after applying **label-smoothing**.""" - total_chs = min(25, max(total_chs, 5)) + total_chs = min(25, max(total_chs, 10)) clip_value = lambda v_in: tf.clip_by_value(v_in, 1e-8, 1.0) target = clip_value(q_func(y_true, gamma=gamma, total_chs=total_chs)) neg_target = clip_value(q_func(1 - y_true, gamma=gamma, total_chs=total_chs)) @@ -67,4 +67,11 @@ def smooth_loss(y_true, y_pred, gamma=0.15, total_chs=22): neg_sigmoid_p = clip_value(tf.nn.sigmoid(1 - y_pred)) cross_entropy = -target * tf.math.log(sigmoid_p) - neg_target * tf.math.log(neg_sigmoid_p) - return tf.reduce_mean(cross_entropy) + entropy = -sigmoid_p * tf.math.log(sigmoid_p) + mix_ent = 0.85 * cross_entropy + 0.15 * entropy + + if weight is not None: + # 'weight' should be an 1D list with length the same as channel numbers (last axis). + mix_ent *= weight + + return tf.reduce_mean(mix_ent) From 90d60ea4dbcbf2c98a50aca270127255adc7b330 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Wed, 26 May 2021 13:27:11 +0800 Subject: [PATCH 12/23] Modify training loop to use the built-in model.fit. --- omnizart/music/app.py | 61 ++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/omnizart/music/app.py b/omnizart/music/app.py index 1c955c6..af6ec43 100644 --- a/omnizart/music/app.py +++ b/omnizart/music/app.py @@ -111,12 +111,7 @@ def transcribe(self, input_audio, model_path=None, output="./"): logger.info("Predicting...") channels = [FEATURE_NAME_TO_NUMBER[ch_name] for ch_name in model_settings.training.channels] - pred = predict( - feature[:, :, channels], - model, - timesteps=model_settings.training.timesteps, - feature_num=model_settings.training.feature_num - ) + pred = predict(feature[:, :, channels], model, timesteps=model_settings.training.timesteps) logger.info("Infering notes....") midi = multi_inst_note_inference( @@ -132,7 +127,7 @@ def transcribe(self, input_audio, model_path=None, output="./"): self._output_midi(output=output, input_audio=input_audio, midi=midi) if os.environ.get("LOG_LEVEL", "") == "debug": - dump_pickle({"pred": pred}, "./debug_pred.pickle") + dump_pickle({"pred": pred, "feature": feature}, "./debug_pred.pickle") logger.info("Transcription finished") return midi @@ -272,24 +267,28 @@ def train(self, feature_folder, model_name=None, input_model_path=None, music_se train_feat_files, val_feat_files = get_train_val_feat_file_list(feature_folder, split=split) output_types = (tf.float32, tf.float32) + output_shapes = ( + (settings.training.timesteps, settings.training.feature_num, len(settings.training.channels)), + (settings.training.timesteps, settings.training.feature_num, l_type.get_out_classes()) + ) train_dataset = MusicDatasetLoader( l_type.get_conversion_func(), feature_files=train_feat_files, - num_samples=settings.training.batch_size * settings.training.steps, + num_samples=settings.training.epoch * settings.training.batch_size * settings.training.steps, timesteps=settings.training.timesteps, channels=[FEATURE_NAME_TO_NUMBER[ch_name] for ch_name in settings.training.channels], feature_num=settings.training.feature_num ) \ - .get_dataset(settings.training.batch_size, output_types=output_types) + .get_dataset(settings.training.batch_size, output_types=output_types, output_shapes=output_shapes) val_dataset = MusicDatasetLoader( l_type.get_conversion_func(), feature_files=val_feat_files, - num_samples=settings.training.val_batch_size * settings.training.val_steps, + num_samples=settings.training.epoch * settings.training.val_batch_size * settings.training.val_steps, timesteps=settings.training.timesteps, channels=[FEATURE_NAME_TO_NUMBER[ch_name] for ch_name in settings.training.channels], feature_num=settings.training.feature_num ) \ - .get_dataset(settings.training.val_batch_size, output_types=output_types) + .get_dataset(settings.training.val_batch_size, output_types=output_types, output_shapes=output_shapes) if input_model_path is None: logger.info("Creating new model with type: %s", settings.model.model_type) @@ -305,11 +304,12 @@ def train(self, feature_folder, model_name=None, input_model_path=None, music_se logger.info("Compiling model with loss function type: %s", settings.training.loss_function) loss_func = { - "smooth": lambda y, x: smooth_loss(y, x, total_chs=l_type.get_out_classes()), + "smooth": lambda y, x: smooth_loss(y, x, total_chs=l_type.get_out_classes(), weight=[1, 0.5, 1.5]), "focal": focal_loss, "bce": tf.keras.losses.BinaryCrossentropy() }[settings.training.loss_function] - model.compile(optimizer="adam", loss=loss_func, metrics=['accuracy']) + optim = tf.keras.optimizers.Adam(learning_rate=1e-4) + model.compile(optimizer=optim, loss=loss_func, metrics=['accuracy']) logger.info("Resolving model output path") if model_name is None: @@ -324,19 +324,20 @@ def train(self, feature_folder, model_name=None, input_model_path=None, music_se logger.info("Constructing callbacks") callbacks = [ - EarlyStopping(patience=settings.training.early_stop), - ModelCheckpoint(model_save_path, save_weights_only=True) + tf.keras.callbacks.EarlyStopping( + patience=settings.training.early_stop, restore_best_weights=True, monitor='val_acc'), + tf.keras.callbacks.ModelCheckpoint( + jpath(model_save_path, "weights.h5"), save_weights_only=True, monitor='val_acc') ] logger.info("Callback list: %s", callbacks) logger.info("Start training") - history = train_epochs( - model, + history = model.fit( train_dataset, - validate_dataset=val_dataset, + validation_data=val_dataset, epochs=settings.training.epoch, - steps=settings.training.steps, - val_steps=settings.training.val_steps, + steps_per_epoch=settings.training.steps, + validation_steps=settings.training.val_steps, callbacks=callbacks ) return model_save_path, history @@ -462,7 +463,11 @@ def __init__( def _get_feature(self, hdf_name, slice_start): feat = self.hdf_refs[hdf_name]["feature"] - feat = feat[slice_start:slice_start + self.slice_hop, :, self.channels].squeeze() + container = [] + for ch in self.channels: + container.append(feat[slice_start:slice_start + self.slice_hop, :, ch].squeeze()) + feat = np.dstack(container) + # feat = feat[slice_start:slice_start + self.slice_hop, :, self.channels].squeeze() if self.pad: feat = np.pad(feat, self.pad_shape, constant_values=0) return feat @@ -503,6 +508,20 @@ def _pre_yield(self, feature, label): return feature, label +class Entropy(tf.keras.metrics.Metric): + def __init__(self, name='entropy', **kwargs): + super(Entropy, self).__init__(name=name, **kwargs) + self.ent = self.add_weight(name='entropy', initializer='zeros') + + def update_state(self, y_true, y_pred, sample_weight=None): + prob = tf.math.sigmoid(y_pred) + ent = -prob * tf.math.log(prob) + self.ent.assign_add(tf.reduce_mean(ent)) + + def result(self): + return self.ent + + if __name__ == "__main__": settings = MusicSettings() app = MusicTranscription() From e342f9bd10b3ab5f9a02410472d3238d2c2f7b82 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Wed, 26 May 2021 13:57:27 +0800 Subject: [PATCH 13/23] Modify default onset threshold --- omnizart/checkpoints/music/music_piano/configurations.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnizart/checkpoints/music/music_piano/configurations.yaml b/omnizart/checkpoints/music/music_piano/configurations.yaml index 3a6dfa9..89851ba 100644 --- a/omnizart/checkpoints/music/music_piano/configurations.yaml +++ b/omnizart/checkpoints/music/music_piano/configurations.yaml @@ -103,7 +103,7 @@ General: OnsetTh: Description: Threshold of predicted onset channel. Type: Float - Value: 6.0 + Value: 6.5 DuraTh: Description: Threshold of predicted duration channel. Type: Float From d795b4f462a994c58d47349f4d8bbf8d710f8e14 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Fri, 28 May 2021 15:45:32 +0800 Subject: [PATCH 14/23] Remove entropy value from smooth loss --- omnizart/music/losses.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/omnizart/music/losses.py b/omnizart/music/losses.py index bf3e500..fce8678 100644 --- a/omnizart/music/losses.py +++ b/omnizart/music/losses.py @@ -63,15 +63,12 @@ def smooth_loss(y_true, y_pred, gamma=0.15, total_chs=22, weight=None): clip_value = lambda v_in: tf.clip_by_value(v_in, 1e-8, 1.0) target = clip_value(q_func(y_true, gamma=gamma, total_chs=total_chs)) neg_target = clip_value(q_func(1 - y_true, gamma=gamma, total_chs=total_chs)) - sigmoid_p = clip_value(tf.nn.sigmoid(y_pred)) - neg_sigmoid_p = clip_value(tf.nn.sigmoid(1 - y_pred)) - - cross_entropy = -target * tf.math.log(sigmoid_p) - neg_target * tf.math.log(neg_sigmoid_p) - entropy = -sigmoid_p * tf.math.log(sigmoid_p) - mix_ent = 0.85 * cross_entropy + 0.15 * entropy + sigmoid_p = clip_value(tf.math.sigmoid(y_pred)) + neg_sigmoid_p = clip_value(1 - sigmoid_p) + loss = -target * tf.math.log(sigmoid_p) - neg_target * tf.math.log(neg_sigmoid_p) if weight is not None: # 'weight' should be an 1D list with length the same as channel numbers (last axis). - mix_ent *= weight + loss *= weight - return tf.reduce_mean(mix_ent) + return tf.reduce_mean(loss) From 6140a2faa9a4ba3debce27e8689299783ee88e8d Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Fri, 28 May 2021 15:46:07 +0800 Subject: [PATCH 15/23] Add learning rate scheduler callback --- omnizart/music/app.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/omnizart/music/app.py b/omnizart/music/app.py index af6ec43..b005a5c 100644 --- a/omnizart/music/app.py +++ b/omnizart/music/app.py @@ -304,11 +304,11 @@ def train(self, feature_folder, model_name=None, input_model_path=None, music_se logger.info("Compiling model with loss function type: %s", settings.training.loss_function) loss_func = { - "smooth": lambda y, x: smooth_loss(y, x, total_chs=l_type.get_out_classes(), weight=[1, 0.5, 1.5]), + "smooth": lambda y, x: smooth_loss(y, x, total_chs=l_type.get_out_classes()), "focal": focal_loss, "bce": tf.keras.losses.BinaryCrossentropy() }[settings.training.loss_function] - optim = tf.keras.optimizers.Adam(learning_rate=1e-4) + optim = tf.keras.optimizers.Adam(learning_rate=1e-6) model.compile(optimizer=optim, loss=loss_func, metrics=['accuracy']) logger.info("Resolving model output path") @@ -327,7 +327,8 @@ def train(self, feature_folder, model_name=None, input_model_path=None, music_se tf.keras.callbacks.EarlyStopping( patience=settings.training.early_stop, restore_best_weights=True, monitor='val_acc'), tf.keras.callbacks.ModelCheckpoint( - jpath(model_save_path, "weights.h5"), save_weights_only=True, monitor='val_acc') + jpath(model_save_path, "weights.h5"), save_weights_only=True, monitor='val_acc'), + tf.keras.callbacks.LearningRateScheduler(lr_scheduler) ] logger.info("Callback list: %s", callbacks) @@ -521,6 +522,12 @@ def update_state(self, y_true, y_pred, sample_weight=None): def result(self): return self.ent +def lr_scheduler(epoch, lr): + if epoch < 5: + return lr + return lr / 3 + + if __name__ == "__main__": settings = MusicSettings() From 50d5e42a4f9228eca1211084602c5beb34c0ba52 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Fri, 28 May 2021 15:47:41 +0800 Subject: [PATCH 16/23] Modify UNet parameters --- .gitignore | 3 ++- omnizart/models/u_net.py | 49 +++++++++++++++------------------------- 2 files changed, 20 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index bbed113..f113791 100644 --- a/.gitignore +++ b/.gitignore @@ -18,9 +18,10 @@ tf_dataset_experiment/ htmlcov/ .vscode/ .python-version -*.code-workspace .coverage .cookie +*.code-workspace +*.pickle # Transcription results *.mid diff --git a/omnizart/models/u_net.py b/omnizart/models/u_net.py index c0734c3..0b7a1db 100644 --- a/omnizart/models/u_net.py +++ b/omnizart/models/u_net.py @@ -63,42 +63,34 @@ def transpose_conv_block(input_tensor, channel, kernel_size, strides=(2, 2), dro def semantic_segmentation( - feature_num=352, timesteps=256, multi_grid_layer_n=1, multi_grid_n=3, ch_num=1, out_class=2 + feature_num=352, timesteps=256, multi_grid_layer_n=1, multi_grid_n=5, ch_num=1, out_class=2, dropout=0.4 ): """Improved U-net model with Atrous Spatial Pyramid Pooling (ASPP) block.""" - layer_out = [] - input_score = Input(shape=(timesteps, feature_num, ch_num), name="input_score_48") - en = Conv2D(2**5, (7, 7), strides=(1, 1), padding="same")(input_score) - layer_out.append(en) + en = Conv2D(2**7, (7, 7), strides=(1, 1), padding="same")(input_score) - en_l1 = conv_block(en, 2**5, (3, 3), strides=(2, 2)) - en_l1 = conv_block(en_l1, 2**5, (3, 3), strides=(1, 1)) - layer_out.append(en_l1) + en_l1 = conv_block(en, 2**7, (3, 3), strides=(2, 2)) + en_l1 = conv_block(en_l1, 2**7, (3, 3), strides=(1, 1)) - en_l2 = conv_block(en_l1, 2**6, (3, 3), strides=(2, 2)) - en_l2 = conv_block(en_l2, 2**6, (3, 3), strides=(1, 1)) - en_l2 = conv_block(en_l2, 2**6, (3, 3), strides=(1, 1)) - layer_out.append(en_l2) + en_l2 = conv_block(en_l1, 2**7, (3, 3), strides=(2, 2)) + en_l2 = conv_block(en_l2, 2**7, (3, 3), strides=(1, 1)) + en_l2 = conv_block(en_l2, 2**7, (3, 3), strides=(1, 1)) en_l3 = conv_block(en_l2, 2**7, (3, 3), strides=(2, 2)) en_l3 = conv_block(en_l3, 2**7, (3, 3), strides=(1, 1)) en_l3 = conv_block(en_l3, 2**7, (3, 3), strides=(1, 1)) en_l3 = conv_block(en_l3, 2**7, (3, 3), strides=(1, 1)) - layer_out.append(en_l3) en_l4 = conv_block(en_l3, 2**8, (3, 3), strides=(2, 2)) en_l4 = conv_block(en_l4, 2**8, (3, 3), strides=(1, 1)) en_l4 = conv_block(en_l4, 2**8, (3, 3), strides=(1, 1)) en_l4 = conv_block(en_l4, 2**8, (3, 3), strides=(1, 1)) en_l4 = conv_block(en_l4, 2**8, (3, 3), strides=(1, 1)) - layer_out.append(en_l4) feature = en_l4 - for _ in range(multi_grid_layer_n): feature = BatchNormalization()(Activation("relu")(feature)) - feature = Dropout(0.3)(feature) + feature = Dropout(dropout)(feature) m = BatchNormalization()(Conv2D(2**9, (1, 1), strides=(1, 1), padding="same", activation="relu")(feature)) multi_grid = m for ii in range(multi_grid_n): @@ -106,46 +98,41 @@ def semantic_segmentation( Conv2D(2**9, (3, 3), strides=(1, 1), dilation_rate=2**ii, padding="same", activation="relu")(feature) ) multi_grid = Concatenate()([multi_grid, m]) - multi_grid = Dropout(0.3)(multi_grid) + multi_grid = Dropout(dropout)(multi_grid) feature = Conv2D(2**9, (1, 1), strides=(1, 1), padding="same")(multi_grid) - layer_out.append(feature) feature = BatchNormalization()(Activation("relu")(feature)) feature = Conv2D(2**8, (1, 1), strides=(1, 1), padding="same")(feature) feature = Add()([feature, en_l4]) de_l1 = transpose_conv_block(feature, 2**7, (3, 3), strides=(2, 2)) - layer_out.append(de_l1) skip = de_l1 de_l1 = BatchNormalization()(Activation("relu")(de_l1)) de_l1 = Concatenate()([de_l1, BatchNormalization()(Activation("relu")(en_l3))]) - de_l1 = Dropout(0.4)(de_l1) + de_l1 = Dropout(dropout)(de_l1) de_l1 = Conv2D(2**7, (1, 1), strides=(1, 1), padding="same")(de_l1) de_l1 = Add()([de_l1, skip]) - de_l2 = transpose_conv_block(de_l1, 2**6, (3, 3), strides=(2, 2)) - layer_out.append(de_l2) + de_l2 = transpose_conv_block(de_l1, 2**7, (3, 3), strides=(2, 2)) skip = de_l2 de_l2 = BatchNormalization()(Activation("relu")(de_l2)) de_l2 = Concatenate()([de_l2, BatchNormalization()(Activation("relu")(en_l2))]) - de_l2 = Dropout(0.4)(de_l2) - de_l2 = Conv2D(2**6, (1, 1), strides=(1, 1), padding="same")(de_l2) + de_l2 = Dropout(dropout)(de_l2) + de_l2 = Conv2D(2**7, (1, 1), strides=(1, 1), padding="same")(de_l2) de_l2 = Add()([de_l2, skip]) - de_l3 = transpose_conv_block(de_l2, 2**5, (3, 3), strides=(2, 2)) - layer_out.append(de_l3) + de_l3 = transpose_conv_block(de_l2, 2**7, (3, 3), strides=(2, 2)) skip = de_l3 de_l3 = BatchNormalization()(Activation("relu")(de_l3)) de_l3 = Concatenate()([de_l3, BatchNormalization()(Activation("relu")(en_l1))]) - de_l3 = Dropout(0.4)(de_l3) - de_l3 = Conv2D(2**5, (1, 1), strides=(1, 1), padding="same")(de_l3) + de_l3 = Dropout(dropout)(de_l3) + de_l3 = Conv2D(2**7, (1, 1), strides=(1, 1), padding="same")(de_l3) de_l3 = Add()([de_l3, skip]) - de_l4 = transpose_conv_block(de_l3, 2**5, (3, 3), strides=(2, 2)) - layer_out.append(de_l4) + de_l4 = transpose_conv_block(de_l3, 2**7, (3, 3), strides=(2, 2)) de_l4 = BatchNormalization()(Activation("relu")(de_l4)) - de_l4 = Dropout(0.4)(de_l4) + de_l4 = Dropout(dropout)(de_l4) out = Conv2D(out_class, (1, 1), strides=(1, 1), padding="same", name="prediction")(de_l4) return Model(inputs=input_score, outputs=out) From 3481ef54b427db260d0217ae63604528a45c7ac1 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Fri, 28 May 2021 23:01:42 +0800 Subject: [PATCH 17/23] Fix a critical bug that could lead to missing onsets. --- omnizart/music/inference.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/omnizart/music/inference.py b/omnizart/music/inference.py index 143ecaf..15c82c3 100644 --- a/omnizart/music/inference.py +++ b/omnizart/music/inference.py @@ -50,8 +50,7 @@ def roll_down_sample(data, occur_num=3, base=88): for i in range(0, data.shape[1], scale): total = np.sum(data[:, i:i + scale], axis=1) - return_v[:, int(i / scale)] = np.where(total >= occur_num, total / occur_num, 0) - return_v = np.where(return_v >= 1, 1, return_v) + return_v[:, int(i / scale)] = np.where(total >= occur_num, total / scale, 0) return return_v @@ -80,11 +79,11 @@ def down_sample(pred, occur_num=3): return d_sample -def infer_pitch(pitch, shortest=7, offset_interval=6): +def infer_pitch(pitch, shortest=10, offset_interval=6): w_on = pitch[:, 2] w_dura = pitch[:, 1] - peaks, _ = find_peaks(w_on, distance=shortest, width=3) + peaks, _ = find_peaks(w_on, distance=shortest, width=7) if len(peaks) == 0: return [] From 560097f6487a67644808276369011719737f4f5f Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Sun, 30 May 2021 18:00:22 +0800 Subject: [PATCH 18/23] Fix bug of vocal modele while computing perturbation --- omnizart/models/pyramid_net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnizart/models/pyramid_net.py b/omnizart/models/pyramid_net.py index 8f5fb7b..897219d 100644 --- a/omnizart/models/pyramid_net.py +++ b/omnizart/models/pyramid_net.py @@ -319,7 +319,7 @@ def _gen_virtual_adv_perturbation(self, unsup_feat, unsup_pred): perturb_pred = self(unsup_feat + perturb) dist = self.kl_loss(unsup_pred_copy, perturb_pred) grad = tf.gradients(dist, [perturb], aggregation_method=2)[0] - perturb_pred = tf.stop_gradient(grad) + perturb = tf.stop_gradient(grad) self._switch_batch_norm_trainable_stat() return self.semi_epsilon * _normalize(perturb) From f83fd79d11fcfc6b371a3347e9dd42a1a8f8514a Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Mon, 31 May 2021 14:50:07 +0800 Subject: [PATCH 19/23] Add tests on music inference --- tests/music/test_inference.py | 41 +++++++++++++++++----------------- tests/music/test_prediction.py | 21 +++++++++++++++-- 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/tests/music/test_inference.py b/tests/music/test_inference.py index 54724d3..a9eaa95 100644 --- a/tests/music/test_inference.py +++ b/tests/music/test_inference.py @@ -19,37 +19,36 @@ def validate_down_sample(out, on_pitch): def test_roll_down_sample(): - frame_size = 200 - scale = 4 - occur_num = 3 - on_pitch = np.random.randint(88, size=frame_size) - - pred = generate_pred(frame_size, on_pitch, scale=scale, occur_num=occur_num) - out = inf.roll_down_sample(pred, occur_num=occur_num) - - assert out.shape == (frame_size, 88) - validate_down_sample(out, on_pitch) - - pred_under_th = generate_pred(frame_size, on_pitch, scale=scale, occur_num=occur_num-1) - out = inf.roll_down_sample(pred_under_th, occur_num=occur_num) - assert np.array_equiv(out, 0) - + bar = np.array([ + [1, 1, 0, 0, 0, 1, 1, 0.6, 0.4, 0.1, 0, 0], + [1, 1, 0.5, 0, 0, 0.8, 1, 0.6, 0.2, 0.1, 0, 0.5], + [1, 1, 0.2, 0, 0, 0.7, 0, 0.6, 0.3, 0.1, 0, 0.1], + [1, 0, 0, 0, 0.1, 0.9, 0, 0.6, 0.2, 0.1, 0, 0.2] + ]).T + expected_bar = np.array([1, 0.75, 0.175, 0, 0.025, 0.85, 0.5, 0.6, 0.275, 0.1, 0, 0.2]) + data = np.zeros((200, 352)) + data[:12, :4] = bar + data[50:62, 40:44] = bar + out = inf.roll_down_sample(data) + + assert out.shape == (200, 88) + assert np.array_equal(out[:12, 0], expected_bar) + assert np.array_equal(out[50:62, 10], expected_bar) def test_down_sample(): frame_size = 300 - occur_num = 3 channels = 10 preds = [] on_pitches = [] for _ in range(channels): on_pitch = np.random.randint(88, size=frame_size) - pred = generate_pred(frame_size, on_pitch, occur_num=occur_num) + pred = generate_pred(frame_size, on_pitch) on_pitches.append(on_pitch) preds.append(pred) preds = np.dstack(preds) - outs = inf.down_sample(preds, occur_num=occur_num) + outs = inf.down_sample(preds) assert outs.shape == (frame_size, 88, channels) for idx in range(channels): validate_down_sample(outs[:,:,idx], on_pitches[idx]) @@ -91,12 +90,12 @@ def test_infer_pitch(): dura = np.array([ 0, 0, 0.5, 0.8, 1.8, 2, 2, 0.6, 1.5, 1.3, 1.4, 1.9, 2.5, 2.6, 0, 0, 0, 0, 0, 0.2, 0.3, 0.8, 1.2, 1.4, 1.8, 2, 2, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0.3, 0.8, 0, 0, 0, + 0.8, 0.4, 0, 0, 0, 0, 0, 0, 0, 0.1, 0.3, 0.8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]) expected = [ - {"start": 5, "end": 18, "stren": 3.3}, - {"start": 18, "end": 26, "stren": 3.1} + {"start": 7, "end": 20, "stren": 3.3}, + {"start": 20, "end": 30, "stren": 3.1} ] pitch = np.stack([zeros, dura, onset], axis=1) diff --git a/tests/music/test_prediction.py b/tests/music/test_prediction.py index 216255d..a6d46e8 100644 --- a/tests/music/test_prediction.py +++ b/tests/music/test_prediction.py @@ -1,3 +1,5 @@ +import math + import pytest import numpy as np @@ -25,11 +27,26 @@ def test_cut_batch_pred(): @pytest.mark.parametrize("length,b_size", [(100, 3), (1024, 4), (3000, 16), (5000, 8)]) -def test_create_batches(length, b_size): +def test_create_batches_old(length, b_size): channels = 4 feat = np.ones((length, 352, channels)) timesteps = 128 expected_len = np.ceil(length/b_size/timesteps) - out = np.array(putils.create_batches(feat, b_size=b_size, timesteps=timesteps)) + out = np.array(putils.create_batches_old(feat, b_size=b_size, timesteps=timesteps)) assert out.shape == (expected_len, b_size, timesteps, 384, channels) + + +@pytest.mark.parametrize("shape,b_size,timesteps,step_size", [ + ((2000, 20, 4, 2), 10, 100, 25), + ((256, 10), 8, 50, 10), + ((100, 5, 3, 4, 8), 2, 10, 0), + ((456, 80, 2), 9, 20, 21) +]) +def test_create_batches(shape, b_size, timesteps, step_size): + step_size = max(1, min(timesteps, step_size)) + num_batches = math.ceil(((shape[0] - timesteps) / step_size + 1) / b_size) + data = np.zeros(shape) + out = putils.create_batches(data, b_size=b_size, timesteps=timesteps, step_size=step_size) + assert len(out) == num_batches + From 58897e15b553fbb647741a85135b176f8101dcdb Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Mon, 31 May 2021 14:50:39 +0800 Subject: [PATCH 20/23] Modify default onset threshold of music piano model --- omnizart/checkpoints/music/music_piano/configurations.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omnizart/checkpoints/music/music_piano/configurations.yaml b/omnizart/checkpoints/music/music_piano/configurations.yaml index 89851ba..aa3e422 100644 --- a/omnizart/checkpoints/music/music_piano/configurations.yaml +++ b/omnizart/checkpoints/music/music_piano/configurations.yaml @@ -103,7 +103,7 @@ General: OnsetTh: Description: Threshold of predicted onset channel. Type: Float - Value: 6.5 + Value: 4 DuraTh: Description: Threshold of predicted duration channel. Type: Float From 748fb177badc51e116709dcf39d6a1156c56394c Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Mon, 31 May 2021 14:53:27 +0800 Subject: [PATCH 21/23] Various improvements on infering notes --- omnizart/music/app.py | 21 +++++++++++---------- omnizart/music/inference.py | 32 +++++++++++--------------------- 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/omnizart/music/app.py b/omnizart/music/app.py index b005a5c..d15a528 100644 --- a/omnizart/music/app.py +++ b/omnizart/music/app.py @@ -29,8 +29,7 @@ from omnizart.base import BaseTranscription, BaseDatasetLoader from omnizart.utils import get_logger, parallel_generator, ensure_path_exists, resolve_dataset_type from omnizart.io import dump_pickle, write_yaml -from omnizart.train import train_epochs, get_train_val_feat_file_list -from omnizart.callbacks import EarlyStopping, ModelCheckpoint +from omnizart.train import get_train_val_feat_file_list from omnizart.setting_loaders import MusicSettings from omnizart.constants.midi import MUSICNET_INSTRUMENT_PROGRAMS, POP_INSTRUMENT_PROGRAMES from omnizart.constants.feature import FEATURE_NAME_TO_NUMBER @@ -308,7 +307,7 @@ def train(self, feature_folder, model_name=None, input_model_path=None, music_se "focal": focal_loss, "bce": tf.keras.losses.BinaryCrossentropy() }[settings.training.loss_function] - optim = tf.keras.optimizers.Adam(learning_rate=1e-6) + optim = tf.keras.optimizers.Adam(learning_rate=1e-3) model.compile(optimizer=optim, loss=loss_func, metrics=['accuracy']) logger.info("Resolving model output path") @@ -323,12 +322,14 @@ def train(self, feature_folder, model_name=None, input_model_path=None, music_se logger.info("Model output to: %s", model_save_path) logger.info("Constructing callbacks") + weight_name = "weights.h5" # "weights.{epoch:02d}-{val_loss:.4f}-{val_accuracy:.4f}.h5" callbacks = [ tf.keras.callbacks.EarlyStopping( - patience=settings.training.early_stop, restore_best_weights=True, monitor='val_acc'), + patience=settings.training.early_stop, monitor='val_acc'), tf.keras.callbacks.ModelCheckpoint( - jpath(model_save_path, "weights.h5"), save_weights_only=True, monitor='val_acc'), - tf.keras.callbacks.LearningRateScheduler(lr_scheduler) + jpath(model_save_path, weight_name), save_weights_only=True, monitor='val_acc'), + tf.keras.callbacks.LearningRateScheduler( + lambda epoch, lr: lr_scheduler(epoch, lr, update_after=5, dec_every=3, dec_rate=0.5)) ] logger.info("Callback list: %s", callbacks) @@ -522,11 +523,11 @@ def update_state(self, y_true, y_pred, sample_weight=None): def result(self): return self.ent -def lr_scheduler(epoch, lr): - if epoch < 5: - return lr - return lr / 3 +def lr_scheduler(epoch, lr, update_after=5, dec_every=3, dec_rate=0.5): + if epoch >= update_after and (epoch - update_after) % dec_every == 0: + lr *= dec_rate + return max(lr, 5e-8) if __name__ == "__main__": diff --git a/omnizart/music/inference.py b/omnizart/music/inference.py index 15c82c3..f98e8d1 100644 --- a/omnizart/music/inference.py +++ b/omnizart/music/inference.py @@ -15,7 +15,7 @@ logger = get_logger("Music Inference") -def roll_down_sample(data, occur_num=3, base=88): +def roll_down_sample(data, base=88): """Down sample feature size for a single pitch. Down sample the feature size from 354 to 88 for infering the notes. @@ -24,9 +24,6 @@ def roll_down_sample(data, occur_num=3, base=88): ---------- data: 2D numpy array The thresholded 2D prediction.. - occur_num: int - For each pitch, the original prediction expands 4 bins wide. This value determines how many positive bins - should there be to say there is a real activation after down sampling. base Should be constant as there are 88 pitches on the piano. @@ -44,18 +41,15 @@ def roll_down_sample(data, occur_num=3, base=88): assert total_roll % base == 0, f"Wrong length: {total_roll}, {total_roll} % {base} should be zero!" scale = round(total_roll / base) - assert 0 < occur_num <= scale - - return_v = np.zeros((len(data), base), dtype=int) - + return_v = np.zeros((len(data), base)) for i in range(0, data.shape[1], scale): total = np.sum(data[:, i:i + scale], axis=1) - return_v[:, int(i / scale)] = np.where(total >= occur_num, total / scale, 0) + return_v[:, int(i / scale)] = total / scale return return_v -def down_sample(pred, occur_num=3): +def down_sample(pred): """Down sample multi-channel predictions along the feature dimension. Down sample the feature size from 354 to 88 for infering the notes from a multi-channel prediction. @@ -64,17 +58,15 @@ def down_sample(pred, occur_num=3): ---------- pred: 3D numpy array Thresholded prediction with multiple channels. Dimension: [timesteps x pitch x instruments] - occur_num: int - Minimum occurance of each pitch for determining true activation of the pitch. Returns ------- d_sample: 3D numpy array Down-sampled prediction. Dimension: [timesteps x 88 x instruments] """ - d_sample = roll_down_sample(pred[:, :, 0], occur_num=occur_num) + d_sample = roll_down_sample(pred[:, :, 0]) for i in range(1, pred.shape[2]): - d_sample = np.dstack([d_sample, roll_down_sample(pred[:, :, i], occur_num=occur_num)]) + d_sample = np.dstack([d_sample, roll_down_sample(pred[:, :, i])]) return d_sample @@ -83,7 +75,7 @@ def infer_pitch(pitch, shortest=10, offset_interval=6): w_on = pitch[:, 2] w_dura = pitch[:, 1] - peaks, _ = find_peaks(w_on, distance=shortest, width=7) + peaks, _ = find_peaks(w_on, distance=shortest, prominence=1, width=5) if len(peaks) == 0: return [] @@ -198,20 +190,18 @@ def to_midi(notes, t_unit=0.02): # Some tricky steps to determine the velocity of the notes l_bound, u_bound = find_min_max_stren(notes) - s_low = 60 + s_low = 110 s_up = 127 v_map = lambda stren: int( - s_low + ((s_up-s_low) * ((stren-l_bound) / (u_bound-l_bound+0.0001))) # noqa: E226 + s_low + ((s_up-s_low) * ((u_bound-stren) / (u_bound-l_bound+0.0001))) # noqa: E226 ) low_b = note_to_midi("A0") - coll = set() for note in notes: pitch = note["pitch"] + low_b start = note["start"] * t_unit end = note["end"] * t_unit volume = v_map(note["stren"]) - coll.add(pitch) m_note = pretty_midi.Note(velocity=volume, pitch=pitch, start=start, end=end) piano.notes.append(m_note) midi.instruments.append(piano) @@ -248,7 +238,7 @@ def norm_onset_dura(pred, onset_th, dura_th, interpolate=True, normalize=True): onset = np.where(onset < dura, 0, onset) norm_onset = norm(onset) if normalize else onset - onset = np.where(norm_onset < onset_th, 0, norm_onset) + onset = np.where(norm_onset < onset_th, 0, norm_onset-onset_th) norm_pred[:, :, 2] = onset norm_dura = norm(dura) + onset if normalize else dura + onset @@ -347,7 +337,7 @@ def note_inference( else: norm_pred = norm_onset_dura(pred, onset_th=onset_th, dura_th=dura_th, interpolate=True, normalize=normalize) - norm_pred = np.where(norm_pred > 0, norm_pred + 1, 0) + # norm_pred = np.where(norm_pred > 0, norm_pred + 1, 0) notes = infer_piece(down_sample(norm_pred), t_unit=0.01) midi = to_midi(notes, t_unit=t_unit / 2) From 895635d7a11a577c0ecfbdf4f8d6354d0aa2b03b Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Mon, 31 May 2021 14:54:42 +0800 Subject: [PATCH 22/23] Fix format according to linters --- omnizart/music/inference.py | 2 +- omnizart/music/prediction.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/omnizart/music/inference.py b/omnizart/music/inference.py index f98e8d1..547ff72 100644 --- a/omnizart/music/inference.py +++ b/omnizart/music/inference.py @@ -238,7 +238,7 @@ def norm_onset_dura(pred, onset_th, dura_th, interpolate=True, normalize=True): onset = np.where(onset < dura, 0, onset) norm_onset = norm(onset) if normalize else onset - onset = np.where(norm_onset < onset_th, 0, norm_onset-onset_th) + onset = np.where(norm_onset < onset_th, 0, norm_onset - onset_th) norm_pred[:, :, 2] = onset norm_dura = norm(dura) + onset if normalize else dura + onset diff --git a/omnizart/music/prediction.py b/omnizart/music/prediction.py index e16e850..e482874 100644 --- a/omnizart/music/prediction.py +++ b/omnizart/music/prediction.py @@ -82,8 +82,8 @@ def create_batches(feature, timesteps, b_size=8, step_size=10): batches = [] batch = [] cur_len = 0 - for idx in range(0, len(feature)-timesteps, step_size): - feat = feature[idx:idx+timesteps] + for idx in range(0, len(feature)-timesteps, step_size): # noqa: E226 + feat = feature[idx:idx+timesteps] # noqa: E226 batch.append(feat) cur_len += timesteps if len(batch) == b_size: @@ -92,7 +92,7 @@ def create_batches(feature, timesteps, b_size=8, step_size=10): feat = feature[cur_len:] if len(feat) < timesteps: - pad = np.zeros((timesteps-len(feat),)+feat.shape[1:]) + pad = np.zeros((timesteps - len(feat),) + feat.shape[1:]) feat = np.concatenate([feat, pad]) if len(batches[-1]) < b_size: @@ -136,8 +136,8 @@ def merge_batches(batches, step_size=10): idx += 1 mask = np.zeros_like(output) - for idx in range(0, out_len-pred_shape[0]+1, step_size): - mask[idx:idx+pred_shape[0]] += 1 + for idx in range(0, out_len-pred_shape[0]+1, step_size): # noqa: E226 + mask[idx:idx+pred_shape[0]] += 1 # noqa: E226 output /= mask return output From 6cdaec0f13d4a0b54e7125d50097321d30d64130 Mon Sep 17 00:00:00 2001 From: BreezeWhite Date: Mon, 31 May 2021 15:22:47 +0800 Subject: [PATCH 23/23] Update versions of dependencies --- poetry.lock | 409 ++++++++++++++++++++++++----------------------- requirements.txt | 243 ++++++++++++++-------------- setup.py | 4 +- 3 files changed, 333 insertions(+), 323 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2f86e4b..1e44491 100644 --- a/poetry.lock +++ b/poetry.lock @@ -27,7 +27,7 @@ python-versions = "*" [[package]] name = "astroid" -version = "2.5.6" +version = "2.5.7" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false @@ -36,6 +36,7 @@ python-versions = "~=3.6" [package.dependencies] lazy-object-proxy = ">=1.4.0" typed-ast = {version = ">=1.4.0,<1.5", markers = "implementation_name == \"cpython\" and python_version < \"3.8\""} +typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} wrapt = ">=1.11,<1.13" [[package]] @@ -59,11 +60,11 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "21.1.0" +version = "21.2.0" description = "Classes Without Boilerplate" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] @@ -120,7 +121,7 @@ python-versions = "~=3.5" [[package]] name = "certifi" -version = "2020.12.5" +version = "2021.5.30" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false @@ -180,6 +181,9 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +[package.dependencies] +toml = {version = "*", optional = true, markers = "extra == \"toml\""} + [package.extras] toml = ["toml"] @@ -191,9 +195,17 @@ category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "dataclasses" +version = "0.8" +description = "A backport of the dataclasses module for Python 3.6" +category = "main" +optional = false +python-versions = ">=3.6, <3.7" + [[package]] name = "decorator" -version = "5.0.7" +version = "5.0.9" description = "Decorators for Humans" category = "main" optional = false @@ -201,7 +213,7 @@ python-versions = ">=3.5" [[package]] name = "docutils" -version = "0.17.1" +version = "0.16" description = "Docutils -- Python Documentation Utilities" category = "dev" optional = false @@ -223,7 +235,7 @@ dev = ["future (==0.17.1)", "numpy (==1.16.4)", "pytest-mock (==1.10.4)", "pytes [[package]] name = "flake8" -version = "3.9.1" +version = "3.9.2" description = "the modular source code checker: pep8 pyflakes and co" category = "dev" optional = false @@ -253,7 +265,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "google-auth" -version = "1.30.0" +version = "1.30.1" description = "Google Authentication Library" category = "main" optional = false @@ -298,7 +310,7 @@ six = "*" [[package]] name = "grpcio" -version = "1.37.1" +version = "1.38.0" description = "HTTP/2-based RPC framework" category = "main" optional = false @@ -308,7 +320,7 @@ python-versions = "*" six = ">=1.5.2" [package.extras] -protobuf = ["grpcio-tools (>=1.37.1)"] +protobuf = ["grpcio-tools (>=1.38.0)"] [[package]] name = "h11" @@ -465,17 +477,17 @@ colors = ["colorama (>=0.4.3,<0.5.0)"] [[package]] name = "jinja2" -version = "2.11.3" +version = "3.0.1" description = "A very fast and expressive template engine." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" [package.dependencies] -MarkupSafe = ">=0.23" +MarkupSafe = ">=2.0" [package.extras] -i18n = ["Babel (>=0.8)"] +i18n = ["Babel (>=2.7)"] [[package]] name = "joblib" @@ -602,11 +614,11 @@ testing = ["coverage", "pyyaml"] [[package]] name = "markupsafe" -version = "1.1.1" +version = "2.0.1" description = "Safely add untrusted strings to HTML/XML markup." category = "dev" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +python-versions = ">=3.6" [[package]] name = "mccabe" @@ -618,7 +630,7 @@ python-versions = "*" [[package]] name = "mido" -version = "1.2.9" +version = "1.2.10" description = "MIDI Objects for Python" category = "main" optional = false @@ -648,7 +660,7 @@ testing = ["matplotlib (>=2.1.0,<3)"] [[package]] name = "more-itertools" -version = "8.7.0" +version = "8.8.0" description = "More routines for operating on iterables, beyond itertools" category = "dev" optional = false @@ -720,7 +732,7 @@ signedtoken = ["cryptography", "pyjwt (>=1.0.0)"] [[package]] name = "opencv-python" -version = "4.5.1.48" +version = "4.5.2.52" description = "Wrapper package for OpenCV python bindings." category = "main" optional = false @@ -829,7 +841,7 @@ six = "*" [[package]] name = "protobuf" -version = "3.15.8" +version = "3.17.1" description = "Protocol Buffers" category = "main" optional = false @@ -992,14 +1004,14 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "pytest-cov" -version = "2.11.1" +version = "2.12.0" description = "Pytest plugin for measuring coverage." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -coverage = ">=5.2.1" +coverage = {version = ">=5.2.1", extras = ["toml"]} pytest = ">=4.6" [package.extras] @@ -1007,7 +1019,7 @@ testing = ["fields", "hunter", "process-tests (==2.0.2)", "six", "pytest-xdist", [[package]] name = "pytest-mock" -version = "3.6.0" +version = "3.6.1" description = "Thin-wrapper around the mock package for easier use with pytest" category = "dev" optional = false @@ -1107,7 +1119,7 @@ tests = ["pytest (<4)", "pytest-cov"] [[package]] name = "rfc3986" -version = "1.4.0" +version = "1.5.0" description = "Validating URI References per RFC 3986" category = "main" optional = false @@ -1204,7 +1216,7 @@ numpy = ["numpy"] [[package]] name = "sphinx" -version = "3.5.3" +version = "3.5.4" description = "Python documentation generator" category = "dev" optional = false @@ -1214,7 +1226,7 @@ python-versions = ">=3.5" alabaster = ">=0.7,<0.8" babel = ">=1.3" colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.12" +docutils = ">=0.12,<0.17" imagesize = "*" Jinja2 = ">=2.3" packaging = "*" @@ -1297,11 +1309,11 @@ test = ["pytest"] [[package]] name = "sphinxcontrib-htmlhelp" -version = "1.0.3" +version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.extras] lint = ["flake8", "mypy", "docutils-stubs"] @@ -1332,7 +1344,7 @@ test = ["pytest"] [[package]] name = "sphinxcontrib-serializinghtml" -version = "1.1.4" +version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." category = "dev" optional = false @@ -1462,7 +1474,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tqdm" -version = "4.60.0" +version = "4.61.0" description = "Fast, Extensible Progress Meter" category = "main" optional = false @@ -1537,14 +1549,16 @@ python-versions = "*" [[package]] name = "werkzeug" -version = "1.0.1" +version = "2.0.1" description = "The comprehensive WSGI web application library." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" + +[package.dependencies] +dataclasses = {version = "*", markers = "python_version < \"3.7\""} [package.extras] -dev = ["pytest", "pytest-timeout", "coverage", "tox", "sphinx", "pallets-sphinx-themes", "sphinx-issues"] watchdog = ["watchdog"] [[package]] @@ -1594,8 +1608,8 @@ appdirs = [ {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, ] astroid = [ - {file = "astroid-2.5.6-py3-none-any.whl", hash = "sha256:4db03ab5fc3340cf619dbc25e42c2cc3755154ce6009469766d7143d1fc2ee4e"}, - {file = "astroid-2.5.6.tar.gz", hash = "sha256:8a398dfce302c13f14bab13e2b14fe385d32b73f4e4853b9bdfb64598baa1975"}, + {file = "astroid-2.5.7-py3-none-any.whl", hash = "sha256:3c9a2d84354185d13213ff2640ec03d39168dbcd13648abc84fb13ca3b2e2761"}, + {file = "astroid-2.5.7.tar.gz", hash = "sha256:d66a600e1602736a0f24f725a511b0e50d12eb18f54b31ec276d2c26a0a62c6a"}, ] astunparse = [ {file = "astunparse-1.6.3-py2.py3-none-any.whl", hash = "sha256:c2652417f2c8b5bb325c885ae329bdf3f86424075c4fd1a128674bc6fba4b8e8"}, @@ -1606,8 +1620,8 @@ atomicwrites = [ {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, ] attrs = [ - {file = "attrs-21.1.0-py2.py3-none-any.whl", hash = "sha256:8ee1e5f5a1afc5b19bdfae4fdf0c35ed324074bdce3500c939842c8f818645d9"}, - {file = "attrs-21.1.0.tar.gz", hash = "sha256:3901be1cb7c2a780f14668691474d9252c070a756be0a9ead98cfeabfa11aeb8"}, + {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, + {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, ] audioread = [ {file = "audioread-2.1.9.tar.gz", hash = "sha256:a3480e42056c8e80a8192a54f6729a280ef66d27782ee11cbd63e9d4d1523089"}, @@ -1625,8 +1639,8 @@ cachetools = [ {file = "cachetools-4.2.2.tar.gz", hash = "sha256:61b5ed1e22a0924aed1d23b478f37e8d52549ff8a961de2909c69bf950020cff"}, ] certifi = [ - {file = "certifi-2020.12.5-py2.py3-none-any.whl", hash = "sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830"}, - {file = "certifi-2020.12.5.tar.gz", hash = "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"}, + {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, + {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, ] cffi = [ {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"}, @@ -1773,21 +1787,25 @@ cython = [ {file = "Cython-0.29.23-py2.py3-none-any.whl", hash = "sha256:282263628c5d601b313d5920f7b6d7e08c7fedbddacd080c4858aa04d86b6b4b"}, {file = "Cython-0.29.23.tar.gz", hash = "sha256:6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e"}, ] +dataclasses = [ + {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, + {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, +] decorator = [ - {file = "decorator-5.0.7-py3-none-any.whl", hash = "sha256:945d84890bb20cc4a2f4a31fc4311c0c473af65ea318617f13a7257c9a58bc98"}, - {file = "decorator-5.0.7.tar.gz", hash = "sha256:6f201a6c4dac3d187352661f508b9364ec8091217442c9478f1f83c003a0f060"}, + {file = "decorator-5.0.9-py3-none-any.whl", hash = "sha256:6e5c199c16f7a9f0e3a61a4a54b3d27e7dad0dbdde92b944426cb20914376323"}, + {file = "decorator-5.0.9.tar.gz", hash = "sha256:72ecfba4320a893c53f9706bebb2d55c270c1e51a28789361aa93e4a21319ed5"}, ] docutils = [ - {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, - {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, + {file = "docutils-0.16-py2.py3-none-any.whl", hash = "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af"}, + {file = "docutils-0.16.tar.gz", hash = "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc"}, ] ffmpeg-python = [ {file = "ffmpeg-python-0.2.0.tar.gz", hash = "sha256:65225db34627c578ef0e11c8b1eb528bb35e024752f6f10b78c011f6f64c4127"}, {file = "ffmpeg_python-0.2.0-py3-none-any.whl", hash = "sha256:ac441a0404e053f8b6a1113a77c0f452f1cfc62f6344a769475ffdc0f56c23c5"}, ] flake8 = [ - {file = "flake8-3.9.1-py2.py3-none-any.whl", hash = "sha256:3b9f848952dddccf635be78098ca75010f073bfe14d2c6bda867154bea728d2a"}, - {file = "flake8-3.9.1.tar.gz", hash = "sha256:1aa8990be1e689d96c745c5682b687ea49f2e05a443aff1f8251092b0014e378"}, + {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, + {file = "flake8-3.9.2.tar.gz", hash = "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b"}, ] future = [ {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, @@ -1797,8 +1815,8 @@ gast = [ {file = "gast-0.3.3.tar.gz", hash = "sha256:b881ef288a49aa81440d2c5eb8aeefd4c2bb8993d5f50edae7413a85bfdb3b57"}, ] google-auth = [ - {file = "google-auth-1.30.0.tar.gz", hash = "sha256:9ad25fba07f46a628ad4d0ca09f38dcb262830df2ac95b217f9b0129c9e42206"}, - {file = "google_auth-1.30.0-py2.py3-none-any.whl", hash = "sha256:588bdb03a41ecb4978472b847881e5518b5d9ec6153d3d679aa127a55e13b39f"}, + {file = "google-auth-1.30.1.tar.gz", hash = "sha256:044d81b1e58012f8ebc71cc134e191c1fa312f543f1fbc99973afe28c25e3228"}, + {file = "google_auth-1.30.1-py2.py3-none-any.whl", hash = "sha256:b3ca7a8ff9ab3bdefee3ad5aefb11fc6485423767eee016f5942d8e606ca23fb"}, ] google-auth-oauthlib = [ {file = "google-auth-oauthlib-0.4.4.tar.gz", hash = "sha256:09832c6e75032f93818edf1affe4746121d640c625a5bef9b5c96af676e98eee"}, @@ -1810,57 +1828,57 @@ google-pasta = [ {file = "google_pasta-0.2.0-py3-none-any.whl", hash = "sha256:b32482794a366b5366a32c92a9a9201b107821889935a02b3e51f6b432ea84ed"}, ] grpcio = [ - {file = "grpcio-1.37.1-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:0d64b5995e17eb9f086e82e6a4edadd1295827b593be71b516e7a442067784b5"}, - {file = "grpcio-1.37.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:6f44b8244bafcbea63daff222ae1b27d048b9d8fd47eb3d11e61ee092078e766"}, - {file = "grpcio-1.37.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:37e265b72e69ef8e33efca8d1123bdc349ae3eabb92563e76adfce209c9df51a"}, - {file = "grpcio-1.37.1-cp27-cp27m-win32.whl", hash = "sha256:ee0537fe2423307b885ba44e6789249e6d7624247cb38a20b9f38f4b40f5ab03"}, - {file = "grpcio-1.37.1-cp27-cp27m-win_amd64.whl", hash = "sha256:1de472a3c2a3d89d4d400d8179f2777ec99f7da0e87c0c1f196226141816d621"}, - {file = "grpcio-1.37.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:99a627471275f93d400399b55e4c1d798602ff79d693e7def0a0b276912bff7e"}, - {file = "grpcio-1.37.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:e7da0319003d150611b30cd864e0474a283324b3db9107107aa3ef9a71c53130"}, - {file = "grpcio-1.37.1-cp35-cp35m-macosx_10_10_intel.whl", hash = "sha256:22b0cc3531d3c405fae9a8519004a0e62ecbd1f005b55b3622098a4881d36b96"}, - {file = "grpcio-1.37.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:f6a73167fce4a41e5c0b34ceaad1048a14e9eeb4fc324da49da0537c199efab7"}, - {file = "grpcio-1.37.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:fa279b99878bae9b804c09e023f2b47de79d0b5e813ab85ddf28673784d610f0"}, - {file = "grpcio-1.37.1-cp35-cp35m-manylinux2014_i686.whl", hash = "sha256:9674fffd1f599aec7389a61d48c1a8c8aaba69591609895911c6d8386d86dd45"}, - {file = "grpcio-1.37.1-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:80c3c9d24ecd236571d3c86657243431a8bafef022dcce83f9f2aeb6eecb96b9"}, - {file = "grpcio-1.37.1-cp35-cp35m-win32.whl", hash = "sha256:e236d0580f7e69a35c420ce60f960b294e9dc973b8c31499fa476eb4d4ba4088"}, - {file = "grpcio-1.37.1-cp35-cp35m-win_amd64.whl", hash = "sha256:30ba9712547c9497a438bfeb2c7f393fa983df1609e1c81243d4b0d1b1bfefbf"}, - {file = "grpcio-1.37.1-cp36-cp36m-linux_armv7l.whl", hash = "sha256:ad03ff6b15f3481f3c999d5d22b5c56295dffc49b8e2cbdbc04c7bf358d3034e"}, - {file = "grpcio-1.37.1-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:728292f5ccb849f30774c0805ef5c39452b3a5f4d193ac499ae5b78d268ff64b"}, - {file = "grpcio-1.37.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:5dabaac759a98bcfd979d22874dcd7ccf8779678a2fe841d355dd93fee143974"}, - {file = "grpcio-1.37.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:f933dd10948a5e5ed4258a1581e45aec1bb84069e62368084eb2dcf4cce51e78"}, - {file = "grpcio-1.37.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:67b482c810d05d9317e29b82900864ab888b9f842701906ba54c3eb176cd8eab"}, - {file = "grpcio-1.37.1-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:494cce1709f7cd63c2610c25b41f886048f1d993511ddb23f766b77ac142ba78"}, - {file = "grpcio-1.37.1-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:264f6d9a922f5124f79f50b1880349fd16c657a9b4fdf0f29fca939d40584f7f"}, - {file = "grpcio-1.37.1-cp36-cp36m-win32.whl", hash = "sha256:e3e0fb7d32f163699cef5132b060e3f613dc914408164eb3e3ac69095861ea04"}, - {file = "grpcio-1.37.1-cp36-cp36m-win_amd64.whl", hash = "sha256:640f49187105fb6c2b1b7acea06df3b0ccf5fe33a075c73b8a741013bc5cc802"}, - {file = "grpcio-1.37.1-cp37-cp37m-linux_armv7l.whl", hash = "sha256:f1287ae8a3bef97fd702dac95967aaf52031a6dceb2bd30da165f16e3b617293"}, - {file = "grpcio-1.37.1-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:30807f3979ebb3872588fa166876a2a24febe17e0db5950d5bedd67320d11b8c"}, - {file = "grpcio-1.37.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:23666be3ed366f647f09c9caf89c48ca0daa12be8fe4786e5a368a6cd69de1f6"}, - {file = "grpcio-1.37.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:8f5a16f8b650efddd5ff3f750cca5b45c045923be13e79cdd1b886332307f46a"}, - {file = "grpcio-1.37.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:e72d8df53624098d8b1fe01c961888d61f90d7c0aa8116d76db80a535da9b445"}, - {file = "grpcio-1.37.1-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:4850c96d3a22d941b0d6af4dccbc739caec7f367b783aad049c843b28b458ff0"}, - {file = "grpcio-1.37.1-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:4493365334baaa3d775f5e4a91d9a844ac676560232223405a0964dfddb31924"}, - {file = "grpcio-1.37.1-cp37-cp37m-win32.whl", hash = "sha256:34d6f626062e7ef47ab30ff8976825c58fa8846ccd8c645b57291ccc74b9d413"}, - {file = "grpcio-1.37.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4c0503b5ef6fcabc52c296d750a095ef29fd707d0f85322e95e5c261b3a684f9"}, - {file = "grpcio-1.37.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:ac4174b1cf4daea0653fcfee7676bb04a8a43644e9ddf1913834d1542a9c697b"}, - {file = "grpcio-1.37.1-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:d232802ba15b465000263bc17171f9863173b7669bdd72dbdffdfcc0f6e637dc"}, - {file = "grpcio-1.37.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:c87599137f6022ed5079b0df47da83134b9810d4b00999b87edfc901347f26a9"}, - {file = "grpcio-1.37.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:609297d3d5d32f47e04bf7dc61c7756df50bc37dec4dfd63e996388eba42fb3b"}, - {file = "grpcio-1.37.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:025fa7dffb0cf724070cfcbe2ff600a18b0cf84642ede5c92f2717162e2a8c95"}, - {file = "grpcio-1.37.1-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:0b8817acef140cb9a3543208c13282d3bf4bb0103e930ddbb779677604085ada"}, - {file = "grpcio-1.37.1-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:a1cd40eac72d3c914eea73f8f7730ddbd86061098a8ce712d1ce108e9d87d449"}, - {file = "grpcio-1.37.1-cp38-cp38-win32.whl", hash = "sha256:d7ae05ded17c4697ef80784dc89cad3025db0d90c5a8a0ada47a8d0749617d58"}, - {file = "grpcio-1.37.1-cp38-cp38-win_amd64.whl", hash = "sha256:b948a00764fee55cf111e0bf3d987167557152abf879f2c13bd2f278a6247ded"}, - {file = "grpcio-1.37.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:8d3cdca5cfd6761a8824bc8acc8ac7bc37ad5ef75899308ca0458cf7952ce12d"}, - {file = "grpcio-1.37.1-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:9364f35949c3cff5470b583a03ccfd927b71cbe1ab7583a6529d5d67ed76e91e"}, - {file = "grpcio-1.37.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:1aab01ee3e4b88ed6419f0b25ff21c83deb6c823c6fb77e655def0796526e3a3"}, - {file = "grpcio-1.37.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:74aad86c7c1b9163d01c3d9e75861e9b09c65e0947592ca315c30353a0f6c4d1"}, - {file = "grpcio-1.37.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:3ee1bef5f5e4208998cdef44933db3c30c52a7ebde424cfc4186404ffded1d35"}, - {file = "grpcio-1.37.1-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:7533d2c9698dd3038fcf3dd0df243b76a9e0db8008f8575c305e20a3593189eb"}, - {file = "grpcio-1.37.1-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:b7cc965538da06c9e9cf0e01bae91f274c75baf224ca6a734717c0f003ddf1f2"}, - {file = "grpcio-1.37.1-cp39-cp39-win32.whl", hash = "sha256:6ad11c1ea337720a42fc31959bd44a38b8837e3ae25bdab681e2e1a28096b02a"}, - {file = "grpcio-1.37.1-cp39-cp39-win_amd64.whl", hash = "sha256:7b2a2cf3621f94b123a9d7a68e4a8d948b29520136f096927f7c9653f24c8fca"}, - {file = "grpcio-1.37.1.tar.gz", hash = "sha256:df8305806311d3fe913d4f7eb3ef28e2072159ea12f95baab5d447f1380a71e3"}, + {file = "grpcio-1.38.0-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:db01eaea57e7a1898c69271e35a84341cf8150cfdec5f0411eddcfb65b5f590e"}, + {file = "grpcio-1.38.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:f6f6d51c9efbfe56af9eb9eeb4881cad1b869e4c0e2a32c1d345897fd0979ee3"}, + {file = "grpcio-1.38.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:7466eef3b57b5ac8c7585251b26b917b093ab015750bf98aab4e0836c39e2a2b"}, + {file = "grpcio-1.38.0-cp27-cp27m-win32.whl", hash = "sha256:604da72df5bece8844a15990ce0b3f2f8c5243a1333d3dcc02371048bf6f9269"}, + {file = "grpcio-1.38.0-cp27-cp27m-win_amd64.whl", hash = "sha256:924552099365ea1dd32237dc161849452cd567d931efc57e8427260d8f0eacdb"}, + {file = "grpcio-1.38.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:f19bd4b5bcf88ee059f478c4ab46a1607f09835587750294038fbd0120f1a9dc"}, + {file = "grpcio-1.38.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:c47e85eae34af5d17d1c2007a1f0b13a0293d4b7a6d8c8ae23761d718293803e"}, + {file = "grpcio-1.38.0-cp35-cp35m-macosx_10_10_intel.whl", hash = "sha256:d631304e66c908d5d2d1a3cc9c02d372d2f8bed8c3632902d6f3f77d7ca34ac2"}, + {file = "grpcio-1.38.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:4a1dd16ccf76ddc18c1cde900049c04ed996e6c02e0588d88d06396c398e6023"}, + {file = "grpcio-1.38.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:32067791bd56a13614399f1994454afea9e2475019fcabc4abd3112f09892005"}, + {file = "grpcio-1.38.0-cp35-cp35m-manylinux2014_i686.whl", hash = "sha256:0247b045feb7b138754c91efcca9ea7f7d2cc9f0bd2cc73f6588c523f38873c3"}, + {file = "grpcio-1.38.0-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:07abf6b36c138bf247cef7ac0bad9f8ab1c8242f7c1302af23bb8e6877d08163"}, + {file = "grpcio-1.38.0-cp35-cp35m-win32.whl", hash = "sha256:2c26cb7566e8942542ff1aee71f10ed35e2f9ee95c2f27179b198af0727fbebb"}, + {file = "grpcio-1.38.0-cp35-cp35m-win_amd64.whl", hash = "sha256:e72dd202c982a5922c3b846976cae3b699e3fa8d2355d9d5bad119d066cf23ee"}, + {file = "grpcio-1.38.0-cp36-cp36m-linux_armv7l.whl", hash = "sha256:34fb08d46a70750bef6566c9556a16b98e08af6345a3bad6574477eb0b08c3dd"}, + {file = "grpcio-1.38.0-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:1d157a2ac6632d31a3ff21f56bbe73420e1d7a21e4fe89d8c7ac792b79c1a589"}, + {file = "grpcio-1.38.0-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3cacfee78310b5a89769b2fac20b8cd723470130f5b1ba0c960da8db39e74a97"}, + {file = "grpcio-1.38.0-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:e83ab148911e6c8ae4ec5e1334e6d800c6b84c432b92eb0ebf0808087117cb39"}, + {file = "grpcio-1.38.0-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:a836f21a1d08d28c8344e149b28729649ff4732c318a59a3628451bbd6c3c9ac"}, + {file = "grpcio-1.38.0-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:b4cd8fb4e3725e8852b1da734904edb3579c76660ae26a72283ac580779e5bf0"}, + {file = "grpcio-1.38.0-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:d3566acd87a65a0bc93875125a7064293ab2b6ffb9327333030939681d269f4f"}, + {file = "grpcio-1.38.0-cp36-cp36m-win32.whl", hash = "sha256:f2c4ff0e8c98418c5d55c28ba4ff954e3a5d3c723af5008e8d3ddeae8f0ecb41"}, + {file = "grpcio-1.38.0-cp36-cp36m-win_amd64.whl", hash = "sha256:9a2216df1be9fdbc3c1ebd3c5184d1ef4afb387c29224fce00346b9ddec7c7e3"}, + {file = "grpcio-1.38.0-cp37-cp37m-linux_armv7l.whl", hash = "sha256:9f1747b81d44daed0649ff10395b58c4f29b03139a628afeb058f3e942ba6893"}, + {file = "grpcio-1.38.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:ac05434a7a7f444b2ddd109d72f87f4704364be159aea42a04bd6ea2ba6e10e4"}, + {file = "grpcio-1.38.0-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:a4789014f9d9e9ff29551314a004266b1ac90225c8a009dc87947aaf823fd83c"}, + {file = "grpcio-1.38.0-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:e3072b9ebb573fe1f6757a55b610e4975979d2d58247cbe18ff4385f5aaa81a5"}, + {file = "grpcio-1.38.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:7b74c48b2e41dd506f889a4a9974d40b3eead965b0fd2e0b1d55a9b3c0e3bc6e"}, + {file = "grpcio-1.38.0-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:291dcde4139bc25629de6a743cfcc0ca861e289e3547421ecd2273b51d95b8e1"}, + {file = "grpcio-1.38.0-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:0ab78d4c16d7f3924718711689f5e301aec52cfcf38eb4143bed0f74b7c4fd10"}, + {file = "grpcio-1.38.0-cp37-cp37m-win32.whl", hash = "sha256:10a6c62e0cddd456db91f9f04b53a8cccf67d86d7ca814d989423939099c2723"}, + {file = "grpcio-1.38.0-cp37-cp37m-win_amd64.whl", hash = "sha256:be83ca2d24321c8bf6516b9cd1064da15ac3ff3978c6c502643be114e2a54af2"}, + {file = "grpcio-1.38.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:897bcd54890e6ec6359063affb35e19a61a58ba37bc61c9e8ac6b464b854233e"}, + {file = "grpcio-1.38.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:f8dd51b05e7fde843d7a3140b058f02801fbec5784a036d5f6abb374450d4608"}, + {file = "grpcio-1.38.0-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:277faad1d8d462bd1b986f43a47a2c2fe795b2e0de72c9318e11826d921e665a"}, + {file = "grpcio-1.38.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:a0d7c88b4cf9748147cd6c16e14569a124b683a3eb5d7787f43eb9d48cf86755"}, + {file = "grpcio-1.38.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:2736b109ec5bd9fcf580bf871b5fd4f136c6ae9728407f344a3c64ad87bb6519"}, + {file = "grpcio-1.38.0-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:cbd2754da81bf5f18454c7808b4afe5b57c6736955a742fb599b32b6353fe99f"}, + {file = "grpcio-1.38.0-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:a8f9fcf5623282e4804595166a4ee1401cf4ccfc16fe84bb69e1eb23ffd836ac"}, + {file = "grpcio-1.38.0-cp38-cp38-win32.whl", hash = "sha256:1c11041ecb69d962d49e8a38a35736cdc6fc74230867b5f0ac6138770387a950"}, + {file = "grpcio-1.38.0-cp38-cp38-win_amd64.whl", hash = "sha256:1d212af1008bdbfd4b8a287e17a8e63e14d72ac450475307452f20c1bbb6bae4"}, + {file = "grpcio-1.38.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:8c4f39ad529fb4a33cd6e58d1d860c3b583902208547614b4b5b75fc306f13f6"}, + {file = "grpcio-1.38.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:f9b3678920017842a1b576de3524ecf8f6a2bf4b39f86fb25b870693141e0584"}, + {file = "grpcio-1.38.0-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:1e88a8d5d961df958362f61b1b79ad3981a8b051f99224717b09308546298902"}, + {file = "grpcio-1.38.0-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6461d69a8ae20e7abce4c6d9cc2603e9f16f4d6b64865eddd0e664127349c04d"}, + {file = "grpcio-1.38.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:cd220606259f8aa2403bc0f4a4483bae5e36be879364ca3e256f0304ac44f575"}, + {file = "grpcio-1.38.0-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:25028420d004fe33d64015f5d4d97207c53530acdb493310e217fac76dcd2513"}, + {file = "grpcio-1.38.0-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:b86a1b0654804b5f2248d9262c77a9d5f19882481fc21df53eb2823d0875b86d"}, + {file = "grpcio-1.38.0-cp39-cp39-win32.whl", hash = "sha256:752593a275e26ef250dc4d93a6f7917dd9986396b41eabcc114b0e0315ec1bf6"}, + {file = "grpcio-1.38.0-cp39-cp39-win_amd64.whl", hash = "sha256:6824567e2372dde1bd70214427d23b709d09f1a02a552133d1e0f504b616c84e"}, + {file = "grpcio-1.38.0.tar.gz", hash = "sha256:abbf9c8c3df4d5233d5888c6cfa85c1bb68a6923749bd4dd1abc6e1e93986f17"}, ] h11 = [ {file = "h11-0.12.0-py3-none-any.whl", hash = "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6"}, @@ -1955,8 +1973,8 @@ isort = [ {file = "isort-5.8.0.tar.gz", hash = "sha256:0a943902919f65c5684ac4e0154b1ad4fac6dcaa5d9f3426b732f1c8b5419be6"}, ] jinja2 = [ - {file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"}, - {file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"}, + {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, + {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, ] joblib = [ {file = "joblib-1.0.1-py3-none-any.whl", hash = "sha256:feeb1ec69c4d45129954f1b7034954241eedfd6ba39b5e9e4b6883be3332d5e5"}, @@ -2037,54 +2055,55 @@ markdown = [ {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ] markupsafe = [ - {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, - {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, + {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, ] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] mido = [ - {file = "mido-1.2.9-py2.py3-none-any.whl", hash = "sha256:fc6364efa028c8405166f63e6a83cbc6c17aaeac2c28680abe64ae48703a89dd"}, - {file = "mido-1.2.9.tar.gz", hash = "sha256:c4a7d5528fefa3d3dcaa2056d4bc873e2c96a395658d15af5a89c8c3fa7c7acc"}, + {file = "mido-1.2.10-py2.py3-none-any.whl", hash = "sha256:0e618232063e0a220249da4961563c7636fea00096cfb3e2b87a4231f0ac1a9e"}, + {file = "mido-1.2.10.tar.gz", hash = "sha256:17b38a8e4594497b850ec6e78b848eac3661706bfc49d484a36d91335a373499"}, ] mir-eval = [ {file = "mir_eval-0.6.tar.gz", hash = "sha256:f87310e326ad9f80ba65e3f0d1ced2013a2845016fc51d7af56c79195668d216"}, ] more-itertools = [ - {file = "more-itertools-8.7.0.tar.gz", hash = "sha256:c5d6da9ca3ff65220c3bfd2a8db06d698f05d4d2b9be57e1deb2be5a45019713"}, - {file = "more_itertools-8.7.0-py3-none-any.whl", hash = "sha256:5652a9ac72209ed7df8d9c15daf4e1aa0e3d2ccd3c87f8265a0673cd9cbc9ced"}, + {file = "more-itertools-8.8.0.tar.gz", hash = "sha256:83f0308e05477c68f56ea3a888172c78ed5d5b3c282addb67508e7ba6c8f813a"}, + {file = "more_itertools-8.8.0-py3-none-any.whl", hash = "sha256:2cf89ec599962f2ddc4d568a05defc40e0a587fbc10d5989713638864c36be4d"}, ] norbert = [ {file = "norbert-0.2.1-py2.py3-none-any.whl", hash = "sha256:409ac3f173cfb1fdaad21563b8f730d7cbe01af81349bcd96fb2b8b9d5f74339"}, @@ -2150,31 +2169,22 @@ oauthlib = [ {file = "oauthlib-3.1.0.tar.gz", hash = "sha256:bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889"}, ] opencv-python = [ - {file = "opencv-python-4.5.1.48.tar.gz", hash = "sha256:78a6db8467639383caedf1d111da3510a4ee1a0aacf2117821cae2ee8f92ce37"}, - {file = "opencv_python-4.5.1.48-cp36-cp36m-macosx_10_13_x86_64.whl", hash = "sha256:bcb27773cfd5340b2b599b303d9f5499838ef4780c20c038f6030175408c64df"}, - {file = "opencv_python-4.5.1.48-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9646875c501788b1b098f282d777b667d6da69801739504f1b2fd1268970d1da"}, - {file = "opencv_python-4.5.1.48-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:ebe83901971a6755512424c4fe9f63341cca501b7c497bf608dd38ee31ba3f4c"}, - {file = "opencv_python-4.5.1.48-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:d8aefcb30b71064dbbaa2b0ace161a36464c29375a83998fbda39a1d1740f942"}, - {file = "opencv_python-4.5.1.48-cp36-cp36m-win32.whl", hash = "sha256:32dee1c9fd3e31e28edef7b56f868e2b40e280b7062304f9fb8a14dbc51547d5"}, - {file = "opencv_python-4.5.1.48-cp36-cp36m-win_amd64.whl", hash = "sha256:9c77d508e6822f1f40c727d21b822d017622d8305dce7eccf0ab06caac16d5c6"}, - {file = "opencv_python-4.5.1.48-cp37-cp37m-macosx_10_13_x86_64.whl", hash = "sha256:4982fa8ccc38310a2bd93e06334ba090b12b6aff2f6fcb8ff9613e3c9bc48f48"}, - {file = "opencv_python-4.5.1.48-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:c0503bfaa2b7b743d6ff5d81f1dd8428dbf4c33e7e4f836456d11be20c2e7721"}, - {file = "opencv_python-4.5.1.48-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:e27d062fa1098d90f48b6c047351c89816492a08906a021c973ce510b04a7b9d"}, - {file = "opencv_python-4.5.1.48-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:6d8434a45e8f75c4da5fd0068ce001f4f8e35771cc851d746d4721eeaf517e25"}, - {file = "opencv_python-4.5.1.48-cp37-cp37m-win32.whl", hash = "sha256:e2c17714da59d9d516ceef0450766ff9557ee232d62f702665af905193557582"}, - {file = "opencv_python-4.5.1.48-cp37-cp37m-win_amd64.whl", hash = "sha256:efac9893d9e21cfb599828801c755ecde8f1e657f05ec6f002efe19422456d5a"}, - {file = "opencv_python-4.5.1.48-cp38-cp38-macosx_10_13_x86_64.whl", hash = "sha256:e77d0feaff37326f62b127098264e2a7099deb476e38432b1083ce11cdedf560"}, - {file = "opencv_python-4.5.1.48-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:ffc75c614b8dc3d8102f3ba15dafd6ec0400c7ffa71a91953d41511964ee50e0"}, - {file = "opencv_python-4.5.1.48-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:c1159d91f29a85c3333edef6ca420284566d9bcdae46dda2fe7282515b48c8b6"}, - {file = "opencv_python-4.5.1.48-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:d16144c435b816c5536d5ff012c1a2b7e93155017db7103942ff7efb98c4df1f"}, - {file = "opencv_python-4.5.1.48-cp38-cp38-win32.whl", hash = "sha256:b2b9ac86aec5f2dd531545cebdea1a1ef4f81ef1fb1760d78b4725f9575504f9"}, - {file = "opencv_python-4.5.1.48-cp38-cp38-win_amd64.whl", hash = "sha256:30edebc81b260bcfeb760b3600c367c5261dfb2fe41e5d1408d5357d0867b40d"}, - {file = "opencv_python-4.5.1.48-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:e38fbd7b2db03204ec09930609b7313d6b6d2b271c8fe2c0aa271fa69b726a1b"}, - {file = "opencv_python-4.5.1.48-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:fc1472b825d26c8a4f1cfb172a90c3cc47733e4af7522276c1c2efe8f6006a8b"}, - {file = "opencv_python-4.5.1.48-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:c4ea4f8b217f3e8be6247fc0787fb81797d85202c722523f41070124a7a621c7"}, - {file = "opencv_python-4.5.1.48-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:a1dfa0486db367594510c0c799ec7481247dc86e651b69008806d875ab731471"}, - {file = "opencv_python-4.5.1.48-cp39-cp39-win32.whl", hash = "sha256:5172cb37dfd8a0b4945b071a493eb36e5f17675a160637fa380f9c1d9d80535c"}, - {file = "opencv_python-4.5.1.48-cp39-cp39-win_amd64.whl", hash = "sha256:c8cc1f5ff3c352ebe756119014c4e4ec7ae5ac536d1f66b0316667ced37637c8"}, + {file = "opencv_python-4.5.2.52-cp36-cp36m-macosx_10_15_x86_64.whl", hash = "sha256:950242774a367efc90e3bed89e6e2fab7ff2867e2eafa440e4775b1ae57ac9f8"}, + {file = "opencv_python-4.5.2.52-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:72f4e4f28169ecb9282570c4a86e992a762ea35ff67b19c05aab2c84eee212ca"}, + {file = "opencv_python-4.5.2.52-cp36-cp36m-win32.whl", hash = "sha256:68f1baa789a1ae92642ad436d29088051471b2e5cea40705cb8c9f8c9fc3c050"}, + {file = "opencv_python-4.5.2.52-cp36-cp36m-win_amd64.whl", hash = "sha256:2cc96b8a9011fa3451d71699069a6a8c3578d91d0158c559def997a1a049ae0c"}, + {file = "opencv_python-4.5.2.52-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:71adc9f528d54fb41bfe275d7038ed4c9c5f1a4468419d4cac12dde6e938f3b8"}, + {file = "opencv_python-4.5.2.52-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:b236001a5bacd18622db037e581521b38cffae070f345e05a7dd837dc3b7f2ef"}, + {file = "opencv_python-4.5.2.52-cp37-cp37m-win32.whl", hash = "sha256:642ff6fe8d0a8297e248bf21676172381afbda767cd15ad51ab9d10201d99078"}, + {file = "opencv_python-4.5.2.52-cp37-cp37m-win_amd64.whl", hash = "sha256:c8ee913a45aec73c4bb14c6c72c3c6ddbb0a1dd3ca45338b68bf169220396941"}, + {file = "opencv_python-4.5.2.52-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:35d4fccd1e339df1e38eb1938af36c1972ab818684a747160403c1562008d867"}, + {file = "opencv_python-4.5.2.52-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:a7aa72195cfd325a51fba287fadc61166367a3f89c57e7fe3e041132e192ac06"}, + {file = "opencv_python-4.5.2.52-cp38-cp38-win32.whl", hash = "sha256:dfa168f827561c52f746d5d80e3b10f31d6428bf6f72652765139129f189110b"}, + {file = "opencv_python-4.5.2.52-cp38-cp38-win_amd64.whl", hash = "sha256:cd231e073579192a8e4c88739e263de23bdaee0be7d85daae3afbda77e477da7"}, + {file = "opencv_python-4.5.2.52-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:fd2e9e70ce30bdfdba6beeffeab117b760e6390e6b606e4b9f4ff03ccd2d7d1f"}, + {file = "opencv_python-4.5.2.52-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:7e8e31b0e206c3567cb96408eb0e27314bb1526eb072f9e509db77af0262ecaf"}, + {file = "opencv_python-4.5.2.52-cp39-cp39-win32.whl", hash = "sha256:1a9d6dd0b1d5cb6031c38b6acf2043b2ec1717093b39592c2a0b98f5b31c8d3e"}, + {file = "opencv_python-4.5.2.52-cp39-cp39-win_amd64.whl", hash = "sha256:31d6a413d459a18ef280d88e8d9257cc5e5009657022c88bb88694a94ccce3ba"}, ] opt-einsum = [ {file = "opt_einsum-3.3.0-py3-none-any.whl", hash = "sha256:2455e59e3947d3c275477df7f5205b30635e266fe6dc300e3d9f9646bfcea147"}, @@ -2221,26 +2231,29 @@ pretty-midi = [ {file = "pretty_midi-0.2.9.tar.gz", hash = "sha256:f6a249cb843441e1cb78c4c0a1290948d6f56df7486f7974e20d5c80486dc99e"}, ] protobuf = [ - {file = "protobuf-3.15.8-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:fad4f971ec38d8df7f4b632c819bf9bbf4f57cfd7312cf526c69ce17ef32436a"}, - {file = "protobuf-3.15.8-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:f17b352d7ce33c81773cf81d536ca70849de6f73c96413f17309f4b43ae7040b"}, - {file = "protobuf-3.15.8-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:4a054b0b5900b7ea7014099e783fb8c4618e4209fffcd6050857517b3f156e18"}, - {file = "protobuf-3.15.8-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:efa4c4d4fc9ba734e5e85eaced70e1b63fb3c8d08482d839eb838566346f1737"}, - {file = "protobuf-3.15.8-cp35-cp35m-win32.whl", hash = "sha256:07eec4e2ccbc74e95bb9b3afe7da67957947ee95bdac2b2e91b038b832dd71f0"}, - {file = "protobuf-3.15.8-cp35-cp35m-win_amd64.whl", hash = "sha256:f9cadaaa4065d5dd4d15245c3b68b967b3652a3108e77f292b58b8c35114b56c"}, - {file = "protobuf-3.15.8-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:2dc0e8a9e4962207bdc46a365b63a3f1aca6f9681a5082a326c5837ef8f4b745"}, - {file = "protobuf-3.15.8-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:f80afc0a0ba13339bbab25ca0409e9e2836b12bb012364c06e97c2df250c3343"}, - {file = "protobuf-3.15.8-cp36-cp36m-win32.whl", hash = "sha256:c5566f956a26cda3abdfacc0ca2e21db6c9f3d18f47d8d4751f2209d6c1a5297"}, - {file = "protobuf-3.15.8-cp36-cp36m-win_amd64.whl", hash = "sha256:dab75b56a12b1ceb3e40808b5bd9dfdaef3a1330251956e6744e5b6ed8f8830b"}, - {file = "protobuf-3.15.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3053f13207e7f13dc7be5e9071b59b02020172f09f648e85dc77e3fcb50d1044"}, - {file = "protobuf-3.15.8-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:1f0b5d156c3df08cc54bc2c8b8b875648ea4cd7ebb2a9a130669f7547ec3488c"}, - {file = "protobuf-3.15.8-cp37-cp37m-win32.whl", hash = "sha256:90270fe5732c1f1ff664a3bd7123a16456d69b4e66a09a139a00443a32f210b8"}, - {file = "protobuf-3.15.8-cp37-cp37m-win_amd64.whl", hash = "sha256:f42c2f5fb67da5905bfc03733a311f72fa309252bcd77c32d1462a1ad519521e"}, - {file = "protobuf-3.15.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f6077db37bfa16494dca58a4a02bfdacd87662247ad6bc1f7f8d13ff3f0013e1"}, - {file = "protobuf-3.15.8-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:510e66491f1a5ac5953c908aa8300ec47f793130097e4557482803b187a8ee05"}, - {file = "protobuf-3.15.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5ff9fa0e67fcab442af9bc8d4ec3f82cb2ff3be0af62dba047ed4187f0088b7d"}, - {file = "protobuf-3.15.8-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:1c0e9e56202b9dccbc094353285a252e2b7940b74fdf75f1b4e1b137833fabd7"}, - {file = "protobuf-3.15.8-py2.py3-none-any.whl", hash = "sha256:a0a08c6b2e6d6c74a6eb5bf6184968eefb1569279e78714e239d33126e753403"}, - {file = "protobuf-3.15.8.tar.gz", hash = "sha256:0277f62b1e42210cafe79a71628c1d553348da81cbd553402a7f7549c50b11d0"}, + {file = "protobuf-3.17.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:6e48c9b26d8e262331c79b208c4bf6b499a71912b1213d77b63c5ca248fc2a4e"}, + {file = "protobuf-3.17.1-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:d06ef0f7873e04e2d1a2bfa0701d063e4dde5242b2946c6f071a442e4cb3be0b"}, + {file = "protobuf-3.17.1-cp35-cp35m-macosx_10_9_intel.whl", hash = "sha256:437d4681160ac5310457c4dc8ab973ec56769a236c479393c53fa71a26dfb38f"}, + {file = "protobuf-3.17.1-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:4ef4865ee740d5b45adfc96481adf1fcbfbb454bd51b86f4c4a5065262d0b08b"}, + {file = "protobuf-3.17.1-cp35-cp35m-win32.whl", hash = "sha256:5057744a363d65d2780dc01fa751bb14e860c507b2598b22af241aabb28a0ae9"}, + {file = "protobuf-3.17.1-cp35-cp35m-win_amd64.whl", hash = "sha256:94be4d5c2ba372ff159b2cc804d274acbaa7ebf361966f5619f99880c7c09a3c"}, + {file = "protobuf-3.17.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fea786428b34385b073ef619d896282889b432b87dc043c0b815c72d35d64025"}, + {file = "protobuf-3.17.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:2c6ad26f079301bcf9f1b5d5b4b2dbac0e2e7c0111c6fbecf94f558952c78ee0"}, + {file = "protobuf-3.17.1-cp36-cp36m-win32.whl", hash = "sha256:ad17d3dd80f3377fc70a9dd677ec51231a892f9f65783cf7d2d24ee381f0feca"}, + {file = "protobuf-3.17.1-cp36-cp36m-win_amd64.whl", hash = "sha256:0f237c1e84e46747397a3e8173edb3116e81163b2878fc944a5193b05876eaee"}, + {file = "protobuf-3.17.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c1631570af7aae611f1cd7c6918fe4a7154507169ef30e8c5f380eba36ee2659"}, + {file = "protobuf-3.17.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:8a509097ba25452c9b44198843b0df67f921bd36f37adcbcfaaf6ee5cbe09132"}, + {file = "protobuf-3.17.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:cbd132f0aa7180f099d3c47fecfbcdca1590ef3b7da8346146192ba580c9b24e"}, + {file = "protobuf-3.17.1-cp37-cp37m-win32.whl", hash = "sha256:762faa8873d0569466cf66128bdbadd5e500600bdf2f87cf039493ed9d2725b6"}, + {file = "protobuf-3.17.1-cp37-cp37m-win_amd64.whl", hash = "sha256:27c7c933b838a0837eb1f429e7994310ee8577a7b69abc38e84d5db97a2650a2"}, + {file = "protobuf-3.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fcace96670b8512e805d6e275bd59b860967a7648e05cfad35ec1e7c03d7262"}, + {file = "protobuf-3.17.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:2a88be54fce118d69f083b847554afd1852053c0869bdac396678ec9ec6a94d5"}, + {file = "protobuf-3.17.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:ad8cdbc594c886483970ac274b5af98483b272e873b7c5dac60aa3a7222301b3"}, + {file = "protobuf-3.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b92f95994ff27a6992ea2cf3f369476ad0065986eb00252b760d0bc55c5454a8"}, + {file = "protobuf-3.17.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:40bf764b63f06a816b1c079f7718184fdd8dbfd9dad3cd1a446382492ca00b3e"}, + {file = "protobuf-3.17.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:a15898d88307dba0363767b30960396a2dec74b8ffe7bcb4e885312a569eda3f"}, + {file = "protobuf-3.17.1-py2.py3-none-any.whl", hash = "sha256:36d306dda3c159a5fe0025ba0e9728aac00dd69523dd12ee3fb7b1717cd80e7d"}, + {file = "protobuf-3.17.1.tar.gz", hash = "sha256:25bc4f1c23aced9b3a9e70eef7f03e63bcbd6cfbd881a91b5688412dce8992e1"}, ] py = [ {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, @@ -2320,12 +2333,12 @@ pytest = [ {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, ] pytest-cov = [ - {file = "pytest-cov-2.11.1.tar.gz", hash = "sha256:359952d9d39b9f822d9d29324483e7ba04a3a17dd7d05aa6beb7ea01e359e5f7"}, - {file = "pytest_cov-2.11.1-py2.py3-none-any.whl", hash = "sha256:bdb9fdb0b85a7cc825269a4c56b48ccaa5c7e365054b6038772c32ddcdc969da"}, + {file = "pytest-cov-2.12.0.tar.gz", hash = "sha256:8535764137fecce504a49c2b742288e3d34bc09eed298ad65963616cc98fd45e"}, + {file = "pytest_cov-2.12.0-py2.py3-none-any.whl", hash = "sha256:95d4933dcbbacfa377bb60b29801daa30d90c33981ab2a79e9ab4452c165066e"}, ] pytest-mock = [ - {file = "pytest-mock-3.6.0.tar.gz", hash = "sha256:f7c3d42d6287f4e45846c8231c31902b6fa2bea98735af413a43da4cf5b727f1"}, - {file = "pytest_mock-3.6.0-py3-none-any.whl", hash = "sha256:952139a535b5b48ac0bb2f90b5dd36b67c7e1ba92601f3a8012678c4bd7f0bcc"}, + {file = "pytest-mock-3.6.1.tar.gz", hash = "sha256:40217a058c52a63f1042f0784f62009e976ba824c418cced42e88d5f40ab0e62"}, + {file = "pytest_mock-3.6.1-py3-none-any.whl", hash = "sha256:30c2f2cc9759e76eee674b81ea28c9f0b94f8f0445a1b87762cadf774f0df7e3"}, ] python-dateutil = [ {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, @@ -2422,8 +2435,8 @@ resampy = [ {file = "resampy-0.2.2.tar.gz", hash = "sha256:62af020d8a6674d8117f62320ce9470437bb1d738a5d06cd55591b69b463929e"}, ] rfc3986 = [ - {file = "rfc3986-1.4.0-py2.py3-none-any.whl", hash = "sha256:af9147e9aceda37c91a05f4deb128d4b4b49d6b199775fd2d2927768abdc8f50"}, - {file = "rfc3986-1.4.0.tar.gz", hash = "sha256:112398da31a3344dc25dbf477d8df6cb34f9278a94fee2625d89e4514be8bb9d"}, + {file = "rfc3986-1.5.0-py2.py3-none-any.whl", hash = "sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97"}, + {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, ] rsa = [ {file = "rsa-4.7.2-py3-none-any.whl", hash = "sha256:78f9a9bf4e7be0c5ded4583326e7461e3a3c5aae24073648b4bdfa797d78c9d2"}, @@ -2507,8 +2520,8 @@ soundfile = [ {file = "SoundFile-0.10.3.post1.tar.gz", hash = "sha256:490cff42650733d1832728b937fe99fa1802896f5ef4d61bcf78cf7ebecb107b"}, ] sphinx = [ - {file = "Sphinx-3.5.3-py3-none-any.whl", hash = "sha256:3f01732296465648da43dec8fb40dc451ba79eb3e2cc5c6d79005fd98197107d"}, - {file = "Sphinx-3.5.3.tar.gz", hash = "sha256:ce9c228456131bab09a3d7d10ae58474de562a6f79abb3dc811ae401cf8c1abc"}, + {file = "Sphinx-3.5.4-py3-none-any.whl", hash = "sha256:2320d4e994a191f4b4be27da514e46b3d6b420f2ff895d064f52415d342461e8"}, + {file = "Sphinx-3.5.4.tar.gz", hash = "sha256:19010b7b9fa0dc7756a6e105b2aacd3a80f798af3c25c273be64d7beeb482cb1"}, ] sphinx-click = [ {file = "sphinx-click-2.7.1.tar.gz", hash = "sha256:1b6175df5392564fd3780000d4627e5a2c8c3b29d05ad311dbbe38fcf5f3327b"}, @@ -2530,8 +2543,8 @@ sphinxcontrib-devhelp = [ {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, ] sphinxcontrib-htmlhelp = [ - {file = "sphinxcontrib-htmlhelp-1.0.3.tar.gz", hash = "sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b"}, - {file = "sphinxcontrib_htmlhelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f"}, + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, ] sphinxcontrib-jsmath = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, @@ -2542,8 +2555,8 @@ sphinxcontrib-qthelp = [ {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, ] sphinxcontrib-serializinghtml = [ - {file = "sphinxcontrib-serializinghtml-1.1.4.tar.gz", hash = "sha256:eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc"}, - {file = "sphinxcontrib_serializinghtml-1.1.4-py2.py3-none-any.whl", hash = "sha256:f242a81d423f59617a8e5cf16f5d4d74e28ee9a66f9e5b637a18082991db5a9a"}, + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, ] spleeter = [ {file = "spleeter-2.2.2-py3-none-any.whl", hash = "sha256:5241b061185a68a04ab513256b27ed38f75ace1333de670a3b2e4876c9ea9b02"}, @@ -2589,8 +2602,8 @@ toml = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tqdm = [ - {file = "tqdm-4.60.0-py2.py3-none-any.whl", hash = "sha256:daec693491c52e9498632dfbe9ccfc4882a557f5fa08982db1b4d3adbe0887c3"}, - {file = "tqdm-4.60.0.tar.gz", hash = "sha256:ebdebdb95e3477ceea267decfc0784859aa3df3e27e22d23b83e9b272bf157ae"}, + {file = "tqdm-4.61.0-py2.py3-none-any.whl", hash = "sha256:736524215c690621b06fc89d0310a49822d75e599fcd0feb7cc742b98d692493"}, + {file = "tqdm-4.61.0.tar.gz", hash = "sha256:cd5791b5d7c3f2f1819efc81d36eb719a38e0906a7380365c556779f585ea042"}, ] typed-ast = [ {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, @@ -2647,8 +2660,8 @@ wcwidth = [ {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] werkzeug = [ - {file = "Werkzeug-1.0.1-py2.py3-none-any.whl", hash = "sha256:2de2a5db0baeae7b2d2664949077c2ac63fbd16d98da0ff71837f7d1dea3fd43"}, - {file = "Werkzeug-1.0.1.tar.gz", hash = "sha256:6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c"}, + {file = "Werkzeug-2.0.1-py3-none-any.whl", hash = "sha256:6c1ec500dcdba0baa27600f6a22f6333d8b662d22027ff9f6202e3367413caa8"}, + {file = "Werkzeug-2.0.1.tar.gz", hash = "sha256:1de1db30d010ff1af14a009224ec49ab2329ad2cde454c8a708130642d579c42"}, ] wrapt = [ {file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"}, diff --git a/requirements.txt b/requirements.txt index 689a359..b13f1ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,17 +7,17 @@ appdirs==1.4.4; python_version >= "3.6" \ astunparse==1.6.3; python_full_version >= "3.6.1" and python_version < "3.9" \ --hash=sha256:c2652417f2c8b5bb325c885ae329bdf3f86424075c4fd1a128674bc6fba4b8e8 \ --hash=sha256:5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872 -attrs==21.1.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" \ - --hash=sha256:8ee1e5f5a1afc5b19bdfae4fdf0c35ed324074bdce3500c939842c8f818645d9 \ - --hash=sha256:3901be1cb7c2a780f14668691474d9252c070a756be0a9ead98cfeabfa11aeb8 +attrs==21.2.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ + --hash=sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1 \ + --hash=sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb audioread==2.1.9; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" \ --hash=sha256:a3480e42056c8e80a8192a54f6729a280ef66d27782ee11cbd63e9d4d1523089 cachetools==4.2.2; python_version >= "3.5" and python_version < "4.0" and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") \ --hash=sha256:2cc0b89715337ab6dbba85b5b50effe2b0c74e035d83ee8ed637cf52f12ae001 \ --hash=sha256:61b5ed1e22a0924aed1d23b478f37e8d52549ff8a961de2909c69bf950020cff -certifi==2020.12.5; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6") \ - --hash=sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830 \ - --hash=sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c +certifi==2021.5.30; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6") \ + --hash=sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8 \ + --hash=sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee cffi==1.14.5; python_version >= "3.6" \ --hash=sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991 \ --hash=sha256:34eff4b97f3d982fb93e2831e6750127d1355a923ebaeeb565407b3d2f8d41a1 \ @@ -100,9 +100,12 @@ cython==0.29.23; python_version >= "2.6" and python_full_version < "3.0.0" or py --hash=sha256:2365f3b5e6451b6bc6dcd262230656f4ade1d862ec2f6c22154deebef37c08b6 \ --hash=sha256:282263628c5d601b313d5920f7b6d7e08c7fedbddacd080c4858aa04d86b6b4b \ --hash=sha256:6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e -decorator==5.0.7; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" \ - --hash=sha256:945d84890bb20cc4a2f4a31fc4311c0c473af65ea318617f13a7257c9a58bc98 \ - --hash=sha256:6f201a6c4dac3d187352661f508b9364ec8091217442c9478f1f83c003a0f060 +dataclasses==0.8; python_version >= "3.6" and python_version < "3.7" and (python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.7" or python_full_version >= "3.2.0" and python_version >= "3.6" and python_version < "3.7") \ + --hash=sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf \ + --hash=sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97 +decorator==5.0.9; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" \ + --hash=sha256:6e5c199c16f7a9f0e3a61a4a54b3d27e7dad0dbdde92b944426cb20914376323 \ + --hash=sha256:72ecfba4320a893c53f9706bebb2d55c270c1e51a28789361aa93e4a21319ed5 ffmpeg-python==0.2.0; python_full_version >= "3.6.1" and python_version < "3.9" \ --hash=sha256:65225db34627c578ef0e11c8b1eb528bb35e024752f6f10b78c011f6f64c4127 \ --hash=sha256:ac441a0404e053f8b6a1113a77c0f452f1cfc62f6344a769475ffdc0f56c23c5 @@ -114,65 +117,65 @@ gast==0.3.3; python_full_version >= "3.6.1" and python_version < "3.9" \ google-auth-oauthlib==0.4.4; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.2.0" and python_version >= "3.6" \ --hash=sha256:09832c6e75032f93818edf1affe4746121d640c625a5bef9b5c96af676e98eee \ --hash=sha256:0e92aacacfb94978de3b7972cf4b0f204c3cd206f74ddd0dc0b31e91164e6317 -google-auth==1.30.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6" \ - --hash=sha256:9ad25fba07f46a628ad4d0ca09f38dcb262830df2ac95b217f9b0129c9e42206 \ - --hash=sha256:588bdb03a41ecb4978472b847881e5518b5d9ec6153d3d679aa127a55e13b39f +google-auth==1.30.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6" \ + --hash=sha256:044d81b1e58012f8ebc71cc134e191c1fa312f543f1fbc99973afe28c25e3228 \ + --hash=sha256:b3ca7a8ff9ab3bdefee3ad5aefb11fc6485423767eee016f5942d8e606ca23fb google-pasta==0.2.0; python_full_version >= "3.6.1" and python_version < "3.9" \ --hash=sha256:c9f2c8dfc8f96d0d5808299920721be30c9eec37f2389f28904f454565c8a16e \ --hash=sha256:4612951da876b1a10fe3960d7226f0c7682cf901e16ac06e473b267a5afa8954 \ --hash=sha256:b32482794a366b5366a32c92a9a9201b107821889935a02b3e51f6b432ea84ed -grpcio==1.37.1; python_full_version >= "3.6.1" and python_version < "3.9" \ - --hash=sha256:0d64b5995e17eb9f086e82e6a4edadd1295827b593be71b516e7a442067784b5 \ - --hash=sha256:6f44b8244bafcbea63daff222ae1b27d048b9d8fd47eb3d11e61ee092078e766 \ - --hash=sha256:37e265b72e69ef8e33efca8d1123bdc349ae3eabb92563e76adfce209c9df51a \ - --hash=sha256:ee0537fe2423307b885ba44e6789249e6d7624247cb38a20b9f38f4b40f5ab03 \ - --hash=sha256:1de472a3c2a3d89d4d400d8179f2777ec99f7da0e87c0c1f196226141816d621 \ - --hash=sha256:99a627471275f93d400399b55e4c1d798602ff79d693e7def0a0b276912bff7e \ - --hash=sha256:e7da0319003d150611b30cd864e0474a283324b3db9107107aa3ef9a71c53130 \ - --hash=sha256:22b0cc3531d3c405fae9a8519004a0e62ecbd1f005b55b3622098a4881d36b96 \ - --hash=sha256:f6a73167fce4a41e5c0b34ceaad1048a14e9eeb4fc324da49da0537c199efab7 \ - --hash=sha256:fa279b99878bae9b804c09e023f2b47de79d0b5e813ab85ddf28673784d610f0 \ - --hash=sha256:9674fffd1f599aec7389a61d48c1a8c8aaba69591609895911c6d8386d86dd45 \ - --hash=sha256:80c3c9d24ecd236571d3c86657243431a8bafef022dcce83f9f2aeb6eecb96b9 \ - --hash=sha256:e236d0580f7e69a35c420ce60f960b294e9dc973b8c31499fa476eb4d4ba4088 \ - --hash=sha256:30ba9712547c9497a438bfeb2c7f393fa983df1609e1c81243d4b0d1b1bfefbf \ - --hash=sha256:ad03ff6b15f3481f3c999d5d22b5c56295dffc49b8e2cbdbc04c7bf358d3034e \ - --hash=sha256:728292f5ccb849f30774c0805ef5c39452b3a5f4d193ac499ae5b78d268ff64b \ - --hash=sha256:5dabaac759a98bcfd979d22874dcd7ccf8779678a2fe841d355dd93fee143974 \ - --hash=sha256:f933dd10948a5e5ed4258a1581e45aec1bb84069e62368084eb2dcf4cce51e78 \ - --hash=sha256:67b482c810d05d9317e29b82900864ab888b9f842701906ba54c3eb176cd8eab \ - --hash=sha256:494cce1709f7cd63c2610c25b41f886048f1d993511ddb23f766b77ac142ba78 \ - --hash=sha256:264f6d9a922f5124f79f50b1880349fd16c657a9b4fdf0f29fca939d40584f7f \ - --hash=sha256:e3e0fb7d32f163699cef5132b060e3f613dc914408164eb3e3ac69095861ea04 \ - --hash=sha256:640f49187105fb6c2b1b7acea06df3b0ccf5fe33a075c73b8a741013bc5cc802 \ - --hash=sha256:f1287ae8a3bef97fd702dac95967aaf52031a6dceb2bd30da165f16e3b617293 \ - --hash=sha256:30807f3979ebb3872588fa166876a2a24febe17e0db5950d5bedd67320d11b8c \ - --hash=sha256:23666be3ed366f647f09c9caf89c48ca0daa12be8fe4786e5a368a6cd69de1f6 \ - --hash=sha256:8f5a16f8b650efddd5ff3f750cca5b45c045923be13e79cdd1b886332307f46a \ - --hash=sha256:e72d8df53624098d8b1fe01c961888d61f90d7c0aa8116d76db80a535da9b445 \ - --hash=sha256:4850c96d3a22d941b0d6af4dccbc739caec7f367b783aad049c843b28b458ff0 \ - --hash=sha256:4493365334baaa3d775f5e4a91d9a844ac676560232223405a0964dfddb31924 \ - --hash=sha256:34d6f626062e7ef47ab30ff8976825c58fa8846ccd8c645b57291ccc74b9d413 \ - --hash=sha256:4c0503b5ef6fcabc52c296d750a095ef29fd707d0f85322e95e5c261b3a684f9 \ - --hash=sha256:ac4174b1cf4daea0653fcfee7676bb04a8a43644e9ddf1913834d1542a9c697b \ - --hash=sha256:d232802ba15b465000263bc17171f9863173b7669bdd72dbdffdfcc0f6e637dc \ - --hash=sha256:c87599137f6022ed5079b0df47da83134b9810d4b00999b87edfc901347f26a9 \ - --hash=sha256:609297d3d5d32f47e04bf7dc61c7756df50bc37dec4dfd63e996388eba42fb3b \ - --hash=sha256:025fa7dffb0cf724070cfcbe2ff600a18b0cf84642ede5c92f2717162e2a8c95 \ - --hash=sha256:0b8817acef140cb9a3543208c13282d3bf4bb0103e930ddbb779677604085ada \ - --hash=sha256:a1cd40eac72d3c914eea73f8f7730ddbd86061098a8ce712d1ce108e9d87d449 \ - --hash=sha256:d7ae05ded17c4697ef80784dc89cad3025db0d90c5a8a0ada47a8d0749617d58 \ - --hash=sha256:b948a00764fee55cf111e0bf3d987167557152abf879f2c13bd2f278a6247ded \ - --hash=sha256:8d3cdca5cfd6761a8824bc8acc8ac7bc37ad5ef75899308ca0458cf7952ce12d \ - --hash=sha256:9364f35949c3cff5470b583a03ccfd927b71cbe1ab7583a6529d5d67ed76e91e \ - --hash=sha256:1aab01ee3e4b88ed6419f0b25ff21c83deb6c823c6fb77e655def0796526e3a3 \ - --hash=sha256:74aad86c7c1b9163d01c3d9e75861e9b09c65e0947592ca315c30353a0f6c4d1 \ - --hash=sha256:3ee1bef5f5e4208998cdef44933db3c30c52a7ebde424cfc4186404ffded1d35 \ - --hash=sha256:7533d2c9698dd3038fcf3dd0df243b76a9e0db8008f8575c305e20a3593189eb \ - --hash=sha256:b7cc965538da06c9e9cf0e01bae91f274c75baf224ca6a734717c0f003ddf1f2 \ - --hash=sha256:6ad11c1ea337720a42fc31959bd44a38b8837e3ae25bdab681e2e1a28096b02a \ - --hash=sha256:7b2a2cf3621f94b123a9d7a68e4a8d948b29520136f096927f7c9653f24c8fca \ - --hash=sha256:df8305806311d3fe913d4f7eb3ef28e2072159ea12f95baab5d447f1380a71e3 +grpcio==1.38.0; python_full_version >= "3.6.1" and python_version < "3.9" \ + --hash=sha256:db01eaea57e7a1898c69271e35a84341cf8150cfdec5f0411eddcfb65b5f590e \ + --hash=sha256:f6f6d51c9efbfe56af9eb9eeb4881cad1b869e4c0e2a32c1d345897fd0979ee3 \ + --hash=sha256:7466eef3b57b5ac8c7585251b26b917b093ab015750bf98aab4e0836c39e2a2b \ + --hash=sha256:604da72df5bece8844a15990ce0b3f2f8c5243a1333d3dcc02371048bf6f9269 \ + --hash=sha256:924552099365ea1dd32237dc161849452cd567d931efc57e8427260d8f0eacdb \ + --hash=sha256:f19bd4b5bcf88ee059f478c4ab46a1607f09835587750294038fbd0120f1a9dc \ + --hash=sha256:c47e85eae34af5d17d1c2007a1f0b13a0293d4b7a6d8c8ae23761d718293803e \ + --hash=sha256:d631304e66c908d5d2d1a3cc9c02d372d2f8bed8c3632902d6f3f77d7ca34ac2 \ + --hash=sha256:4a1dd16ccf76ddc18c1cde900049c04ed996e6c02e0588d88d06396c398e6023 \ + --hash=sha256:32067791bd56a13614399f1994454afea9e2475019fcabc4abd3112f09892005 \ + --hash=sha256:0247b045feb7b138754c91efcca9ea7f7d2cc9f0bd2cc73f6588c523f38873c3 \ + --hash=sha256:07abf6b36c138bf247cef7ac0bad9f8ab1c8242f7c1302af23bb8e6877d08163 \ + --hash=sha256:2c26cb7566e8942542ff1aee71f10ed35e2f9ee95c2f27179b198af0727fbebb \ + --hash=sha256:e72dd202c982a5922c3b846976cae3b699e3fa8d2355d9d5bad119d066cf23ee \ + --hash=sha256:34fb08d46a70750bef6566c9556a16b98e08af6345a3bad6574477eb0b08c3dd \ + --hash=sha256:1d157a2ac6632d31a3ff21f56bbe73420e1d7a21e4fe89d8c7ac792b79c1a589 \ + --hash=sha256:3cacfee78310b5a89769b2fac20b8cd723470130f5b1ba0c960da8db39e74a97 \ + --hash=sha256:e83ab148911e6c8ae4ec5e1334e6d800c6b84c432b92eb0ebf0808087117cb39 \ + --hash=sha256:a836f21a1d08d28c8344e149b28729649ff4732c318a59a3628451bbd6c3c9ac \ + --hash=sha256:b4cd8fb4e3725e8852b1da734904edb3579c76660ae26a72283ac580779e5bf0 \ + --hash=sha256:d3566acd87a65a0bc93875125a7064293ab2b6ffb9327333030939681d269f4f \ + --hash=sha256:f2c4ff0e8c98418c5d55c28ba4ff954e3a5d3c723af5008e8d3ddeae8f0ecb41 \ + --hash=sha256:9a2216df1be9fdbc3c1ebd3c5184d1ef4afb387c29224fce00346b9ddec7c7e3 \ + --hash=sha256:9f1747b81d44daed0649ff10395b58c4f29b03139a628afeb058f3e942ba6893 \ + --hash=sha256:ac05434a7a7f444b2ddd109d72f87f4704364be159aea42a04bd6ea2ba6e10e4 \ + --hash=sha256:a4789014f9d9e9ff29551314a004266b1ac90225c8a009dc87947aaf823fd83c \ + --hash=sha256:e3072b9ebb573fe1f6757a55b610e4975979d2d58247cbe18ff4385f5aaa81a5 \ + --hash=sha256:7b74c48b2e41dd506f889a4a9974d40b3eead965b0fd2e0b1d55a9b3c0e3bc6e \ + --hash=sha256:291dcde4139bc25629de6a743cfcc0ca861e289e3547421ecd2273b51d95b8e1 \ + --hash=sha256:0ab78d4c16d7f3924718711689f5e301aec52cfcf38eb4143bed0f74b7c4fd10 \ + --hash=sha256:10a6c62e0cddd456db91f9f04b53a8cccf67d86d7ca814d989423939099c2723 \ + --hash=sha256:be83ca2d24321c8bf6516b9cd1064da15ac3ff3978c6c502643be114e2a54af2 \ + --hash=sha256:897bcd54890e6ec6359063affb35e19a61a58ba37bc61c9e8ac6b464b854233e \ + --hash=sha256:f8dd51b05e7fde843d7a3140b058f02801fbec5784a036d5f6abb374450d4608 \ + --hash=sha256:277faad1d8d462bd1b986f43a47a2c2fe795b2e0de72c9318e11826d921e665a \ + --hash=sha256:a0d7c88b4cf9748147cd6c16e14569a124b683a3eb5d7787f43eb9d48cf86755 \ + --hash=sha256:2736b109ec5bd9fcf580bf871b5fd4f136c6ae9728407f344a3c64ad87bb6519 \ + --hash=sha256:cbd2754da81bf5f18454c7808b4afe5b57c6736955a742fb599b32b6353fe99f \ + --hash=sha256:a8f9fcf5623282e4804595166a4ee1401cf4ccfc16fe84bb69e1eb23ffd836ac \ + --hash=sha256:1c11041ecb69d962d49e8a38a35736cdc6fc74230867b5f0ac6138770387a950 \ + --hash=sha256:1d212af1008bdbfd4b8a287e17a8e63e14d72ac450475307452f20c1bbb6bae4 \ + --hash=sha256:8c4f39ad529fb4a33cd6e58d1d860c3b583902208547614b4b5b75fc306f13f6 \ + --hash=sha256:f9b3678920017842a1b576de3524ecf8f6a2bf4b39f86fb25b870693141e0584 \ + --hash=sha256:1e88a8d5d961df958362f61b1b79ad3981a8b051f99224717b09308546298902 \ + --hash=sha256:6461d69a8ae20e7abce4c6d9cc2603e9f16f4d6b64865eddd0e664127349c04d \ + --hash=sha256:cd220606259f8aa2403bc0f4a4483bae5e36be879364ca3e256f0304ac44f575 \ + --hash=sha256:25028420d004fe33d64015f5d4d97207c53530acdb493310e217fac76dcd2513 \ + --hash=sha256:b86a1b0654804b5f2248d9262c77a9d5f19882481fc21df53eb2823d0875b86d \ + --hash=sha256:752593a275e26ef250dc4d93a6f7917dd9986396b41eabcc114b0e0315ec1bf6 \ + --hash=sha256:6824567e2372dde1bd70214427d23b709d09f1a02a552133d1e0f504b616c84e \ + --hash=sha256:abbf9c8c3df4d5233d5888c6cfa85c1bb68a6923749bd4dd1abc6e1e93986f17 h11==0.12.0; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" \ --hash=sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6 \ --hash=sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042 @@ -289,9 +292,9 @@ madmom==0.16.1 \ markdown==3.3.4; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.2.0" and python_version >= "3.6" \ --hash=sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c \ --hash=sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49 -mido==1.2.9 \ - --hash=sha256:fc6364efa028c8405166f63e6a83cbc6c17aaeac2c28680abe64ae48703a89dd \ - --hash=sha256:c4a7d5528fefa3d3dcaa2056d4bc873e2c96a395658d15af5a89c8c3fa7c7acc +mido==1.2.10 \ + --hash=sha256:0e618232063e0a220249da4961563c7636fea00096cfb3e2b87a4231f0ac1a9e \ + --hash=sha256:17b38a8e4594497b850ec6e78b848eac3661706bfc49d484a36d91335a373499 mir-eval==0.6 \ --hash=sha256:f87310e326ad9f80ba65e3f0d1ced2013a2845016fc51d7af56c79195668d216 norbert==0.2.1; python_full_version >= "3.6.1" and python_version < "3.9" \ @@ -349,32 +352,23 @@ numpy==1.18.5; python_full_version >= "3.6.1" and python_version < "3.9" and pyt oauthlib==3.1.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" \ --hash=sha256:df884cd6cbe20e32633f1db1072e9356f53638e4361bef4e8b03c9127c9328ea \ --hash=sha256:bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889 -opencv-python==4.5.1.48; python_version >= "3.6" \ - --hash=sha256:78a6db8467639383caedf1d111da3510a4ee1a0aacf2117821cae2ee8f92ce37 \ - --hash=sha256:bcb27773cfd5340b2b599b303d9f5499838ef4780c20c038f6030175408c64df \ - --hash=sha256:9646875c501788b1b098f282d777b667d6da69801739504f1b2fd1268970d1da \ - --hash=sha256:ebe83901971a6755512424c4fe9f63341cca501b7c497bf608dd38ee31ba3f4c \ - --hash=sha256:d8aefcb30b71064dbbaa2b0ace161a36464c29375a83998fbda39a1d1740f942 \ - --hash=sha256:32dee1c9fd3e31e28edef7b56f868e2b40e280b7062304f9fb8a14dbc51547d5 \ - --hash=sha256:9c77d508e6822f1f40c727d21b822d017622d8305dce7eccf0ab06caac16d5c6 \ - --hash=sha256:4982fa8ccc38310a2bd93e06334ba090b12b6aff2f6fcb8ff9613e3c9bc48f48 \ - --hash=sha256:c0503bfaa2b7b743d6ff5d81f1dd8428dbf4c33e7e4f836456d11be20c2e7721 \ - --hash=sha256:e27d062fa1098d90f48b6c047351c89816492a08906a021c973ce510b04a7b9d \ - --hash=sha256:6d8434a45e8f75c4da5fd0068ce001f4f8e35771cc851d746d4721eeaf517e25 \ - --hash=sha256:e2c17714da59d9d516ceef0450766ff9557ee232d62f702665af905193557582 \ - --hash=sha256:efac9893d9e21cfb599828801c755ecde8f1e657f05ec6f002efe19422456d5a \ - --hash=sha256:e77d0feaff37326f62b127098264e2a7099deb476e38432b1083ce11cdedf560 \ - --hash=sha256:ffc75c614b8dc3d8102f3ba15dafd6ec0400c7ffa71a91953d41511964ee50e0 \ - --hash=sha256:c1159d91f29a85c3333edef6ca420284566d9bcdae46dda2fe7282515b48c8b6 \ - --hash=sha256:d16144c435b816c5536d5ff012c1a2b7e93155017db7103942ff7efb98c4df1f \ - --hash=sha256:b2b9ac86aec5f2dd531545cebdea1a1ef4f81ef1fb1760d78b4725f9575504f9 \ - --hash=sha256:30edebc81b260bcfeb760b3600c367c5261dfb2fe41e5d1408d5357d0867b40d \ - --hash=sha256:e38fbd7b2db03204ec09930609b7313d6b6d2b271c8fe2c0aa271fa69b726a1b \ - --hash=sha256:fc1472b825d26c8a4f1cfb172a90c3cc47733e4af7522276c1c2efe8f6006a8b \ - --hash=sha256:c4ea4f8b217f3e8be6247fc0787fb81797d85202c722523f41070124a7a621c7 \ - --hash=sha256:a1dfa0486db367594510c0c799ec7481247dc86e651b69008806d875ab731471 \ - --hash=sha256:5172cb37dfd8a0b4945b071a493eb36e5f17675a160637fa380f9c1d9d80535c \ - --hash=sha256:c8cc1f5ff3c352ebe756119014c4e4ec7ae5ac536d1f66b0316667ced37637c8 +opencv-python==4.5.2.52; python_version >= "3.6" \ + --hash=sha256:950242774a367efc90e3bed89e6e2fab7ff2867e2eafa440e4775b1ae57ac9f8 \ + --hash=sha256:72f4e4f28169ecb9282570c4a86e992a762ea35ff67b19c05aab2c84eee212ca \ + --hash=sha256:68f1baa789a1ae92642ad436d29088051471b2e5cea40705cb8c9f8c9fc3c050 \ + --hash=sha256:2cc96b8a9011fa3451d71699069a6a8c3578d91d0158c559def997a1a049ae0c \ + --hash=sha256:71adc9f528d54fb41bfe275d7038ed4c9c5f1a4468419d4cac12dde6e938f3b8 \ + --hash=sha256:b236001a5bacd18622db037e581521b38cffae070f345e05a7dd837dc3b7f2ef \ + --hash=sha256:642ff6fe8d0a8297e248bf21676172381afbda767cd15ad51ab9d10201d99078 \ + --hash=sha256:c8ee913a45aec73c4bb14c6c72c3c6ddbb0a1dd3ca45338b68bf169220396941 \ + --hash=sha256:35d4fccd1e339df1e38eb1938af36c1972ab818684a747160403c1562008d867 \ + --hash=sha256:a7aa72195cfd325a51fba287fadc61166367a3f89c57e7fe3e041132e192ac06 \ + --hash=sha256:dfa168f827561c52f746d5d80e3b10f31d6428bf6f72652765139129f189110b \ + --hash=sha256:cd231e073579192a8e4c88739e263de23bdaee0be7d85daae3afbda77e477da7 \ + --hash=sha256:fd2e9e70ce30bdfdba6beeffeab117b760e6390e6b606e4b9f4ff03ccd2d7d1f \ + --hash=sha256:7e8e31b0e206c3567cb96408eb0e27314bb1526eb072f9e509db77af0262ecaf \ + --hash=sha256:1a9d6dd0b1d5cb6031c38b6acf2043b2ec1717093b39592c2a0b98f5b31c8d3e \ + --hash=sha256:31d6a413d459a18ef280d88e8d9257cc5e5009657022c88bb88694a94ccce3ba opt-einsum==3.3.0; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.5" \ --hash=sha256:2455e59e3947d3c275477df7f5205b30635e266fe6dc300e3d9f9646bfcea147 \ --hash=sha256:59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549 @@ -403,27 +397,30 @@ pooch==1.3.0; python_full_version >= "3.6.1" and python_version < "3.9" and pyth --hash=sha256:30d448e825904e2d763bbbe418831a788813c32f636b21c8d60ee5f474532898 pretty-midi==0.2.9 \ --hash=sha256:f6a249cb843441e1cb78c4c0a1290948d6f56df7486f7974e20d5c80486dc99e -protobuf==3.15.8; python_full_version >= "3.6.1" and python_version < "3.9" \ - --hash=sha256:fad4f971ec38d8df7f4b632c819bf9bbf4f57cfd7312cf526c69ce17ef32436a \ - --hash=sha256:f17b352d7ce33c81773cf81d536ca70849de6f73c96413f17309f4b43ae7040b \ - --hash=sha256:4a054b0b5900b7ea7014099e783fb8c4618e4209fffcd6050857517b3f156e18 \ - --hash=sha256:efa4c4d4fc9ba734e5e85eaced70e1b63fb3c8d08482d839eb838566346f1737 \ - --hash=sha256:07eec4e2ccbc74e95bb9b3afe7da67957947ee95bdac2b2e91b038b832dd71f0 \ - --hash=sha256:f9cadaaa4065d5dd4d15245c3b68b967b3652a3108e77f292b58b8c35114b56c \ - --hash=sha256:2dc0e8a9e4962207bdc46a365b63a3f1aca6f9681a5082a326c5837ef8f4b745 \ - --hash=sha256:f80afc0a0ba13339bbab25ca0409e9e2836b12bb012364c06e97c2df250c3343 \ - --hash=sha256:c5566f956a26cda3abdfacc0ca2e21db6c9f3d18f47d8d4751f2209d6c1a5297 \ - --hash=sha256:dab75b56a12b1ceb3e40808b5bd9dfdaef3a1330251956e6744e5b6ed8f8830b \ - --hash=sha256:3053f13207e7f13dc7be5e9071b59b02020172f09f648e85dc77e3fcb50d1044 \ - --hash=sha256:1f0b5d156c3df08cc54bc2c8b8b875648ea4cd7ebb2a9a130669f7547ec3488c \ - --hash=sha256:90270fe5732c1f1ff664a3bd7123a16456d69b4e66a09a139a00443a32f210b8 \ - --hash=sha256:f42c2f5fb67da5905bfc03733a311f72fa309252bcd77c32d1462a1ad519521e \ - --hash=sha256:f6077db37bfa16494dca58a4a02bfdacd87662247ad6bc1f7f8d13ff3f0013e1 \ - --hash=sha256:510e66491f1a5ac5953c908aa8300ec47f793130097e4557482803b187a8ee05 \ - --hash=sha256:5ff9fa0e67fcab442af9bc8d4ec3f82cb2ff3be0af62dba047ed4187f0088b7d \ - --hash=sha256:1c0e9e56202b9dccbc094353285a252e2b7940b74fdf75f1b4e1b137833fabd7 \ - --hash=sha256:a0a08c6b2e6d6c74a6eb5bf6184968eefb1569279e78714e239d33126e753403 \ - --hash=sha256:0277f62b1e42210cafe79a71628c1d553348da81cbd553402a7f7549c50b11d0 +protobuf==3.17.1; python_full_version >= "3.6.1" and python_version < "3.9" \ + --hash=sha256:6e48c9b26d8e262331c79b208c4bf6b499a71912b1213d77b63c5ca248fc2a4e \ + --hash=sha256:d06ef0f7873e04e2d1a2bfa0701d063e4dde5242b2946c6f071a442e4cb3be0b \ + --hash=sha256:437d4681160ac5310457c4dc8ab973ec56769a236c479393c53fa71a26dfb38f \ + --hash=sha256:4ef4865ee740d5b45adfc96481adf1fcbfbb454bd51b86f4c4a5065262d0b08b \ + --hash=sha256:5057744a363d65d2780dc01fa751bb14e860c507b2598b22af241aabb28a0ae9 \ + --hash=sha256:94be4d5c2ba372ff159b2cc804d274acbaa7ebf361966f5619f99880c7c09a3c \ + --hash=sha256:fea786428b34385b073ef619d896282889b432b87dc043c0b815c72d35d64025 \ + --hash=sha256:2c6ad26f079301bcf9f1b5d5b4b2dbac0e2e7c0111c6fbecf94f558952c78ee0 \ + --hash=sha256:ad17d3dd80f3377fc70a9dd677ec51231a892f9f65783cf7d2d24ee381f0feca \ + --hash=sha256:0f237c1e84e46747397a3e8173edb3116e81163b2878fc944a5193b05876eaee \ + --hash=sha256:c1631570af7aae611f1cd7c6918fe4a7154507169ef30e8c5f380eba36ee2659 \ + --hash=sha256:8a509097ba25452c9b44198843b0df67f921bd36f37adcbcfaaf6ee5cbe09132 \ + --hash=sha256:cbd132f0aa7180f099d3c47fecfbcdca1590ef3b7da8346146192ba580c9b24e \ + --hash=sha256:762faa8873d0569466cf66128bdbadd5e500600bdf2f87cf039493ed9d2725b6 \ + --hash=sha256:27c7c933b838a0837eb1f429e7994310ee8577a7b69abc38e84d5db97a2650a2 \ + --hash=sha256:1fcace96670b8512e805d6e275bd59b860967a7648e05cfad35ec1e7c03d7262 \ + --hash=sha256:2a88be54fce118d69f083b847554afd1852053c0869bdac396678ec9ec6a94d5 \ + --hash=sha256:ad8cdbc594c886483970ac274b5af98483b272e873b7c5dac60aa3a7222301b3 \ + --hash=sha256:b92f95994ff27a6992ea2cf3f369476ad0065986eb00252b760d0bc55c5454a8 \ + --hash=sha256:40bf764b63f06a816b1c079f7718184fdd8dbfd9dad3cd1a446382492ca00b3e \ + --hash=sha256:a15898d88307dba0363767b30960396a2dec74b8ffe7bcb4e885312a569eda3f \ + --hash=sha256:36d306dda3c159a5fe0025ba0e9728aac00dd69523dd12ee3fb7b1717cd80e7d \ + --hash=sha256:25bc4f1c23aced9b3a9e70eef7f03e63bcbd6cfbd881a91b5688412dce8992e1 pyasn1-modules==0.2.8; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" \ --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ --hash=sha256:0fe1b68d1e486a1ed5473f1302bd991c1611d319bba158e98b106ff86e1d7199 \ @@ -508,9 +505,9 @@ requests==2.25.1; python_version >= "3.6" and python_full_version < "3.0.0" or p --hash=sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804 resampy==0.2.2; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" \ --hash=sha256:62af020d8a6674d8117f62320ce9470437bb1d738a5d06cd55591b69b463929e -rfc3986==1.4.0; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" \ - --hash=sha256:af9147e9aceda37c91a05f4deb128d4b4b49d6b199775fd2d2927768abdc8f50 \ - --hash=sha256:112398da31a3344dc25dbf477d8df6cb34f9278a94fee2625d89e4514be8bb9d +rfc3986==1.5.0; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" \ + --hash=sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97 \ + --hash=sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835 rsa==4.7.2; python_version >= "3.5" and python_version < "4" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6") \ --hash=sha256:78f9a9bf4e7be0c5ded4583326e7461e3a3c5aae24073648b4bdfa797d78c9d2 \ --hash=sha256:9d689e6ca1b3038bc82bf8d23e944b6b6037bc02301a574935b2dd946e0353b9 @@ -613,9 +610,9 @@ termcolor==1.1.0; python_full_version >= "3.6.1" and python_version < "3.9" \ threadpoolctl==2.1.0; python_version >= "3.6" \ --hash=sha256:38b74ca20ff3bb42caca8b00055111d74159ee95c4370882bbff2b93d24da725 \ --hash=sha256:ddc57c96a38beb63db45d6c159b5ab07b6bced12c45a1f07b2b92f272aebfa6b -tqdm==4.60.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0") \ - --hash=sha256:daec693491c52e9498632dfbe9ccfc4882a557f5fa08982db1b4d3adbe0887c3 \ - --hash=sha256:ebdebdb95e3477ceea267decfc0784859aa3df3e27e22d23b83e9b272bf157ae +tqdm==4.61.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0") \ + --hash=sha256:736524215c690621b06fc89d0310a49822d75e599fcd0feb7cc742b98d692493 \ + --hash=sha256:cd5791b5d7c3f2f1819efc81d36eb719a38e0906a7380365c556779f585ea042 typer==0.3.2; python_full_version >= "3.6.1" and python_version < "3.9" and python_version >= "3.6" \ --hash=sha256:ba58b920ce851b12a2d790143009fa00ac1d05b3ff3257061ff69dbdfc3d161b \ --hash=sha256:5455d750122cff96745b0dec87368f56d023725a7ebc9d2e54dd23dc86816303 @@ -630,9 +627,9 @@ vamp==1.1.0 \ --hash=sha256:fadca706892260c283729be2ce714848bca9ee575fde46e4c1190e8d04cc13c6 \ --hash=sha256:e6c0a1dd325f934f26ea7b2c5dc2d3759cd08d295004a8951a4ddc32955b9e35 \ --hash=sha256:d40e0916e958e2806d37920f903c2518cc46959a4f21e020737b6a48f6e7e82d -werkzeug==1.0.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" \ - --hash=sha256:2de2a5db0baeae7b2d2664949077c2ac63fbd16d98da0ff71837f7d1dea3fd43 \ - --hash=sha256:6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c +werkzeug==2.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.2.0" and python_version >= "3.6" \ + --hash=sha256:6c1ec500dcdba0baa27600f6a22f6333d8b662d22027ff9f6202e3367413caa8 \ + --hash=sha256:1de1db30d010ff1af14a009224ec49ab2329ad2cde454c8a708130642d579c42 wrapt==1.12.1; python_full_version >= "3.6.1" and python_version < "3.9" \ --hash=sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7 zipp==3.4.1; python_version >= "3.6" and python_version < "3.7" and python_full_version >= "3.6.1" \ diff --git a/setup.py b/setup.py index a3ac49e..0a3ced3 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ 'spleeter>=2.0.1,<3.0.0', 'tensorflow>=2.3.0,<3.0.0', 'tqdm>=4.49.0,<5.0.0', - 'urllib3>=1.25.11,<2.0.0', + 'urllib3==1.26.4', 'vamp>=1.1.0,<2.0.0'] entry_points = \ @@ -59,7 +59,7 @@ setup_kwargs = { 'name': 'omnizart', - 'version': '0.3.2', + 'version': '0.3.3', 'description': 'Omniscient Mozart, being able to transcribe everything in the music.', 'long_description': '# OMNIZART\n\n[![build](https://github.com/Music-and-Culture-Technology-Lab/omnizart/workflows/general-check/badge.svg)](https://github.com/Music-and-Culture-Technology-Lab/omnizart/actions?query=workflow%3Ageneral-check)\n[![docs](https://github.com/Music-and-Culture-Technology-Lab/omnizart/workflows/docs/badge.svg?branch=build_doc)](https://music-and-culture-technology-lab.github.io/omnizart-doc/)\n[![PyPI version](https://badge.fury.io/py/omnizart.svg)](https://badge.fury.io/py/omnizart)\n![PyPI - License](https://img.shields.io/pypi/l/omnizart)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/omnizart)](https://pypistats.org/packages/omnizart)\n[![Docker Pulls](https://img.shields.io/docker/pulls/mctlab/omnizart)](https://hub.docker.com/r/mctlab/omnizart)\n\nOmnizart is a Python library that aims for democratizing automatic music transcription.\nGiven polyphonic music, it is able to transcribe pitched instruments, vocal melody, chords, drum events, and beat.\nThis is powered by the research outcomes from [Music and Culture Technology (MCT) Lab](https://sites.google.com/view/mctl/home).\n\n### Transcribe your favorite songs now in Colab! [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://bit.ly/OmnizartColab)\n\n# Quick start\n\nVisit the [complete document](https://music-and-culture-technology-lab.github.io/omnizart-doc/) for detailed guidance.\n\n## Pip\n``` bash\n# Install omnizart\npip install omnizart\n\n# Download the checkpoints\nomnizart download-checkpoints\n\n# Transcribe your songs\nomnizart drum transcribe \nomnizart chord transcribe \nomnizart music transcribe \n```\n\n## Docker\n```\ndocker pull mctlab/omnizart:latest\ndocker run -it mctlab/omnizart:latest bash\n```\n\n# Supported applications\n| Application | Transcription | Training | Evaluation | Description |\n|------------------|--------------------|--------------------|------------|--------------------------------------------------|\n| music | :heavy_check_mark: | :heavy_check_mark: | | Transcribe musical notes of pitched instruments. |\n| drum | :heavy_check_mark: | :interrobang: | | Transcribe events of percussive instruments. |\n| vocal | :heavy_check_mark: | :heavy_check_mark: | | Transcribe note-level vocal melody. |\n| vocal-contour | :heavy_check_mark: | :heavy_check_mark: | | Transcribe frame-level vocal melody (F0). |\n| chord | :heavy_check_mark: | :heavy_check_mark: | | Transcribe chord progressions. |\n| beat | :heavy_check_mark: | :heavy_check_mark: | | Transcribe beat position. |\n\n**NOTES**\nThe current implementation for the drum model has unknown bugs, preventing loss convergence when training from scratch.\nFortunately, you can still enjoy drum transcription with the provided checkpoints.\n\n', 'author': 'BreezeWhite',